Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
1.2 KiB
TypeScript
29 lines
1.2 KiB
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { ClientCallContext, ClientCallContextKey } from '../../src/client/context.js';
|
|
|
|
describe('ClientCallContext', () => {
|
|
const testKey = new ClientCallContextKey<string>('My key');
|
|
|
|
it('should create new context', () => {
|
|
const context = ClientCallContext.create(testKey.set('example-value'));
|
|
expect(testKey.get(context)).to.be.equal('example-value');
|
|
});
|
|
|
|
it('should create context from existing', () => {
|
|
const existingContext = ClientCallContext.createFrom(undefined, testKey.set('example-value'));
|
|
const context = ClientCallContext.createFrom(existingContext, testKey.set('new-value'));
|
|
expect(testKey.get(context)).to.be.equal('new-value');
|
|
});
|
|
});
|
|
|
|
describe('ClientCallContextKey', () => {
|
|
it('should be unique', () => {
|
|
const key1 = new ClientCallContextKey<string>('My key');
|
|
const key2 = new ClientCallContextKey<string>('My key');
|
|
expect(key1.symbol).to.not.equal(key2.symbol);
|
|
const context = ClientCallContext.create(key1.set('key1-value'), key2.set('key2-value'));
|
|
expect(key1.get(context)).to.be.equal('key1-value');
|
|
expect(key2.get(context)).to.be.equal('key2-value');
|
|
});
|
|
});
|