@namzu/cli 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +22 -2
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/agent.d.ts +10 -0
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +10 -0
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +83 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +157 -0
- package/dist/tui/slashCommands.js.map +1 -1
- package/package.json +11 -6
- package/dist/__tests__/environment-reaches-the-turn.test.d.ts +0 -17
- package/dist/__tests__/environment-reaches-the-turn.test.d.ts.map +0 -1
- package/dist/__tests__/environment-reaches-the-turn.test.js +0 -128
- package/dist/__tests__/environment-reaches-the-turn.test.js.map +0 -1
- package/dist/__tests__/headless-trust-gate.test.d.ts +0 -23
- package/dist/__tests__/headless-trust-gate.test.d.ts.map +0 -1
- package/dist/__tests__/headless-trust-gate.test.js +0 -227
- package/dist/__tests__/headless-trust-gate.test.js.map +0 -1
- package/dist/__tests__/mcp-servers-reach-the-session.test.d.ts +0 -17
- package/dist/__tests__/mcp-servers-reach-the-session.test.d.ts.map +0 -1
- package/dist/__tests__/mcp-servers-reach-the-session.test.js +0 -171
- package/dist/__tests__/mcp-servers-reach-the-session.test.js.map +0 -1
- package/dist/__tests__/permission-rules-reach-the-turn.test.d.ts +0 -31
- package/dist/__tests__/permission-rules-reach-the-turn.test.d.ts.map +0 -1
- package/dist/__tests__/permission-rules-reach-the-turn.test.js +0 -132
- package/dist/__tests__/permission-rules-reach-the-turn.test.js.map +0 -1
- package/dist/__tests__/project-instructions-reach-the-turn.test.d.ts +0 -24
- package/dist/__tests__/project-instructions-reach-the-turn.test.d.ts.map +0 -1
- package/dist/__tests__/project-instructions-reach-the-turn.test.js +0 -153
- package/dist/__tests__/project-instructions-reach-the-turn.test.js.map +0 -1
- package/dist/cli.test.d.ts +0 -2
- package/dist/cli.test.d.ts.map +0 -1
- package/dist/cli.test.js +0 -108
- package/dist/cli.test.js.map +0 -1
- package/dist/commands/__tests__/eval.test.d.ts +0 -2
- package/dist/commands/__tests__/eval.test.d.ts.map +0 -1
- package/dist/commands/__tests__/eval.test.js +0 -165
- package/dist/commands/__tests__/eval.test.js.map +0 -1
- package/dist/commands/__tests__/passthrough-help.test.d.ts +0 -2
- package/dist/commands/__tests__/passthrough-help.test.d.ts.map +0 -1
- package/dist/commands/__tests__/passthrough-help.test.js +0 -96
- package/dist/commands/__tests__/passthrough-help.test.js.map +0 -1
- package/dist/commands/__tests__/resume.test.d.ts +0 -15
- package/dist/commands/__tests__/resume.test.d.ts.map +0 -1
- package/dist/commands/__tests__/resume.test.js +0 -116
- package/dist/commands/__tests__/resume.test.js.map +0 -1
- package/dist/commands/__tests__/run-exit-code.test.d.ts +0 -2
- package/dist/commands/__tests__/run-exit-code.test.d.ts.map +0 -1
- package/dist/commands/__tests__/run-exit-code.test.js +0 -100
- package/dist/commands/__tests__/run-exit-code.test.js.map +0 -1
- package/dist/commands/__tests__/run-flags.test.d.ts +0 -11
- package/dist/commands/__tests__/run-flags.test.d.ts.map +0 -1
- package/dist/commands/__tests__/run-flags.test.js +0 -238
- package/dist/commands/__tests__/run-flags.test.js.map +0 -1
- package/dist/commands/__tests__/run-stream-flags.test.d.ts +0 -2
- package/dist/commands/__tests__/run-stream-flags.test.d.ts.map +0 -1
- package/dist/commands/__tests__/run-stream-flags.test.js +0 -295
- package/dist/commands/__tests__/run-stream-flags.test.js.map +0 -1
- package/dist/commands/doctor.test.d.ts +0 -2
- package/dist/commands/doctor.test.d.ts.map +0 -1
- package/dist/commands/doctor.test.js +0 -82
- package/dist/commands/doctor.test.js.map +0 -1
- package/dist/config/load.test.d.ts +0 -2
- package/dist/config/load.test.d.ts.map +0 -1
- package/dist/config/load.test.js +0 -57
- package/dist/config/load.test.js.map +0 -1
- package/dist/context/__tests__/environment.test.d.ts +0 -10
- package/dist/context/__tests__/environment.test.d.ts.map +0 -1
- package/dist/context/__tests__/environment.test.js +0 -84
- package/dist/context/__tests__/environment.test.js.map +0 -1
- package/dist/context/__tests__/project.test.d.ts +0 -12
- package/dist/context/__tests__/project.test.d.ts.map +0 -1
- package/dist/context/__tests__/project.test.js +0 -201
- package/dist/context/__tests__/project.test.js.map +0 -1
- package/dist/doctor/checks/credentials.test.d.ts +0 -10
- package/dist/doctor/checks/credentials.test.d.ts.map +0 -1
- package/dist/doctor/checks/credentials.test.js +0 -47
- package/dist/doctor/checks/credentials.test.js.map +0 -1
- package/dist/doctor/checks/sandbox.test.d.ts +0 -2
- package/dist/doctor/checks/sandbox.test.d.ts.map +0 -1
- package/dist/doctor/checks/sandbox.test.js +0 -59
- package/dist/doctor/checks/sandbox.test.js.map +0 -1
- package/dist/doctor/registry.test.d.ts +0 -7
- package/dist/doctor/registry.test.d.ts.map +0 -1
- package/dist/doctor/registry.test.js +0 -379
- package/dist/doctor/registry.test.js.map +0 -1
- package/dist/integrations/mcp/__tests__/connect.test.d.ts +0 -11
- package/dist/integrations/mcp/__tests__/connect.test.d.ts.map +0 -1
- package/dist/integrations/mcp/__tests__/connect.test.js +0 -231
- package/dist/integrations/mcp/__tests__/connect.test.js.map +0 -1
- package/dist/integrations/providers/discover.test.d.ts +0 -2
- package/dist/integrations/providers/discover.test.d.ts.map +0 -1
- package/dist/integrations/providers/discover.test.js +0 -93
- package/dist/integrations/providers/discover.test.js.map +0 -1
- package/dist/integrations/providers/keychain.test.d.ts +0 -2
- package/dist/integrations/providers/keychain.test.d.ts.map +0 -1
- package/dist/integrations/providers/keychain.test.js +0 -21
- package/dist/integrations/providers/keychain.test.js.map +0 -1
- package/dist/integrations/providers/oauth.test.d.ts +0 -2
- package/dist/integrations/providers/oauth.test.d.ts.map +0 -1
- package/dist/integrations/providers/oauth.test.js +0 -86
- package/dist/integrations/providers/oauth.test.js.map +0 -1
- package/dist/integrations/providers/preferences.test.d.ts +0 -2
- package/dist/integrations/providers/preferences.test.d.ts.map +0 -1
- package/dist/integrations/providers/preferences.test.js +0 -76
- package/dist/integrations/providers/preferences.test.js.map +0 -1
- package/dist/integrations/sessions/__tests__/archived-workspace.test.d.ts +0 -21
- package/dist/integrations/sessions/__tests__/archived-workspace.test.d.ts.map +0 -1
- package/dist/integrations/sessions/__tests__/archived-workspace.test.js +0 -62
- package/dist/integrations/sessions/__tests__/archived-workspace.test.js.map +0 -1
- package/dist/integrations/subagents/__tests__/delegation-trace.test.d.ts +0 -2
- package/dist/integrations/subagents/__tests__/delegation-trace.test.d.ts.map +0 -1
- package/dist/integrations/subagents/__tests__/delegation-trace.test.js +0 -114
- package/dist/integrations/subagents/__tests__/delegation-trace.test.js.map +0 -1
- package/dist/integrations/trust/store.test.d.ts +0 -2
- package/dist/integrations/trust/store.test.d.ts.map +0 -1
- package/dist/integrations/trust/store.test.js +0 -50
- package/dist/integrations/trust/store.test.js.map +0 -1
- package/dist/memory/store.test.d.ts +0 -2
- package/dist/memory/store.test.d.ts.map +0 -1
- package/dist/memory/store.test.js +0 -63
- package/dist/memory/store.test.js.map +0 -1
- package/dist/output/formatter.test.d.ts +0 -2
- package/dist/output/formatter.test.d.ts.map +0 -1
- package/dist/output/formatter.test.js +0 -88
- package/dist/output/formatter.test.js.map +0 -1
- package/dist/output/rendered-payload.test.d.ts +0 -2
- package/dist/output/rendered-payload.test.d.ts.map +0 -1
- package/dist/output/rendered-payload.test.js +0 -61
- package/dist/output/rendered-payload.test.js.map +0 -1
- package/dist/permissions/__tests__/mode.test.d.ts +0 -10
- package/dist/permissions/__tests__/mode.test.d.ts.map +0 -1
- package/dist/permissions/__tests__/mode.test.js +0 -115
- package/dist/permissions/__tests__/mode.test.js.map +0 -1
- package/dist/permissions/__tests__/rules.test.d.ts +0 -10
- package/dist/permissions/__tests__/rules.test.d.ts.map +0 -1
- package/dist/permissions/__tests__/rules.test.js +0 -196
- package/dist/permissions/__tests__/rules.test.js.map +0 -1
- package/dist/skills/store.test.d.ts +0 -2
- package/dist/skills/store.test.d.ts.map +0 -1
- package/dist/skills/store.test.js +0 -80
- package/dist/skills/store.test.js.map +0 -1
- package/dist/tui/__tests__/context-gauge.test.d.ts +0 -2
- package/dist/tui/__tests__/context-gauge.test.d.ts.map +0 -1
- package/dist/tui/__tests__/context-gauge.test.js +0 -83
- package/dist/tui/__tests__/context-gauge.test.js.map +0 -1
- package/dist/tui/__tests__/deferred-tool-discovery.test.d.ts +0 -24
- package/dist/tui/__tests__/deferred-tool-discovery.test.d.ts.map +0 -1
- package/dist/tui/__tests__/deferred-tool-discovery.test.js +0 -111
- package/dist/tui/__tests__/deferred-tool-discovery.test.js.map +0 -1
- package/dist/tui/__tests__/to-agent-event.test.d.ts +0 -2
- package/dist/tui/__tests__/to-agent-event.test.d.ts.map +0 -1
- package/dist/tui/__tests__/to-agent-event.test.js +0 -230
- package/dist/tui/__tests__/to-agent-event.test.js.map +0 -1
- package/dist/tui/__tests__/working-directory.test.d.ts +0 -13
- package/dist/tui/__tests__/working-directory.test.d.ts.map +0 -1
- package/dist/tui/__tests__/working-directory.test.js +0 -109
- package/dist/tui/__tests__/working-directory.test.js.map +0 -1
- package/dist/tui/agent.test.d.ts +0 -2
- package/dist/tui/agent.test.d.ts.map +0 -1
- package/dist/tui/agent.test.js +0 -225
- package/dist/tui/agent.test.js.map +0 -1
- package/dist/tui/markdownParser.test.d.ts +0 -2
- package/dist/tui/markdownParser.test.d.ts.map +0 -1
- package/dist/tui/markdownParser.test.js +0 -90
- package/dist/tui/markdownParser.test.js.map +0 -1
- package/dist/tui/mentions.test.d.ts +0 -2
- package/dist/tui/mentions.test.d.ts.map +0 -1
- package/dist/tui/mentions.test.js +0 -35
- package/dist/tui/mentions.test.js.map +0 -1
- package/dist/tui/slashCommands.test.d.ts +0 -2
- package/dist/tui/slashCommands.test.d.ts.map +0 -1
- package/dist/tui/slashCommands.test.js +0 -114
- package/dist/tui/slashCommands.test.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headless-trust-gate.test.js","sourceRoot":"","sources":["../../src/__tests__/headless-trust-gate.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjD;;;;GAIG;AACH,IAAI,WAAW,GAAkB,IAAI,CAAA;AAErC,EAAE,CAAC,IAAI,CAAC,gCAAgC,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAClE,MAAM,MAAM,GAAG,MAAM,cAAc,EAAmD,CAAA;IACtF,OAAO;QACN,GAAG,MAAM;QACT,SAAS,EAAE,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;KAC9F,CAAA;AACF,CAAC,CAAC,CAAA;AAEF,8EAA8E;AAC9E,8EAA8E;AAC9E,MAAM,eAAe,GAAa,EAAE,CAAA;AACpC,EAAE,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,iBAAiB,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QACrC,WAAW,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,E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E;QAClE,WAAW;QACX,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,QAAQ,CAAC,CAAA;QAEjD,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QACjC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QACrC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QACvD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC7E,MAAM,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;IACpC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,uBAAuB,EAAE,KAAK,IAAI,EAAE;QACtC,0EAA0E;QAC1E,wEAAwE;QACxE,0EAA0E;QAC1E,yDAAyD;QACzD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,CAAC,CAAC,CAAA;QAExE,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACpB,MAAM,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC5C,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A tool server written into a config file ends up in the roster the model is
|
|
3
|
-
* shown.
|
|
4
|
-
*
|
|
5
|
-
* The chain has three places to break, in series, and `packages/cli` has been
|
|
6
|
-
* cut by two of them before:
|
|
7
|
-
*
|
|
8
|
-
* namzu.config.json → loadConfig() → createAgentSession() → the tool registry
|
|
9
|
-
* ↑ the reader ↑ the connect ↑ the register
|
|
10
|
-
*
|
|
11
|
-
* `permissions` was dropped by the loader for its whole existence and again by
|
|
12
|
-
* the turn, and every test at the time sat on one side or the other of a break.
|
|
13
|
-
* So this one starts at a real config file and ends at `session.toolNames` —
|
|
14
|
-
* the list `/tools` prints and the registry the turn is built from.
|
|
15
|
-
*/
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=mcp-servers-reach-the-session.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-servers-reach-the-session.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/mcp-servers-reach-the-session.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A tool server written into a config file ends up in the roster the model is
|
|
3
|
-
* shown.
|
|
4
|
-
*
|
|
5
|
-
* The chain has three places to break, in series, and `packages/cli` has been
|
|
6
|
-
* cut by two of them before:
|
|
7
|
-
*
|
|
8
|
-
* namzu.config.json → loadConfig() → createAgentSession() → the tool registry
|
|
9
|
-
* ↑ the reader ↑ the connect ↑ the register
|
|
10
|
-
*
|
|
11
|
-
* `permissions` was dropped by the loader for its whole existence and again by
|
|
12
|
-
* the turn, and every test at the time sat on one side or the other of a break.
|
|
13
|
-
* So this one starts at a real config file and ends at `session.toolNames` —
|
|
14
|
-
* the list `/tools` prints and the registry the turn is built from.
|
|
15
|
-
*/
|
|
16
|
-
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
17
|
-
import { tmpdir } from 'node:os';
|
|
18
|
-
import { join } from 'node:path';
|
|
19
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
20
|
-
import { loadConfig } from '../config/load.js';
|
|
21
|
-
vi.mock('@namzu/sdk', async (importOriginal) => {
|
|
22
|
-
const actual = await importOriginal();
|
|
23
|
-
return {
|
|
24
|
-
...actual,
|
|
25
|
-
query: () => (async function* () { })(),
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
let work;
|
|
29
|
-
const SERVER = `
|
|
30
|
-
let buf = ''
|
|
31
|
-
process.stdin.on('data', (chunk) => {
|
|
32
|
-
buf += chunk
|
|
33
|
-
let i
|
|
34
|
-
while ((i = buf.indexOf('\\n')) >= 0) {
|
|
35
|
-
const line = buf.slice(0, i)
|
|
36
|
-
buf = buf.slice(i + 1)
|
|
37
|
-
if (!line.trim()) continue
|
|
38
|
-
const msg = JSON.parse(line)
|
|
39
|
-
if (msg.method === 'initialize') {
|
|
40
|
-
send({ jsonrpc: '2.0', id: msg.id, result: {
|
|
41
|
-
protocolVersion: msg.params.protocolVersion,
|
|
42
|
-
serverInfo: { name: 'tickets', version: '1' },
|
|
43
|
-
capabilities: { tools: {} },
|
|
44
|
-
}})
|
|
45
|
-
} else if (msg.method === 'tools/list') {
|
|
46
|
-
send({ jsonrpc: '2.0', id: msg.id, result: { tools: [
|
|
47
|
-
{ name: 'create', description: 'Open a ticket', inputSchema: {
|
|
48
|
-
type: 'object', properties: { title: { type: 'string' } }, required: ['title'] } },
|
|
49
|
-
]}})
|
|
50
|
-
} else if (msg.id !== undefined) {
|
|
51
|
-
send({ jsonrpc: '2.0', id: msg.id, result: {} })
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
function send(o) { process.stdout.write(JSON.stringify(o) + '\\n') }
|
|
56
|
-
`;
|
|
57
|
-
beforeEach(() => {
|
|
58
|
-
work = mkdtempSync(join(tmpdir(), 'namzu-mcp-session-'));
|
|
59
|
-
});
|
|
60
|
-
afterEach(async () => {
|
|
61
|
-
for (let attempt = 0; attempt < 20; attempt++) {
|
|
62
|
-
try {
|
|
63
|
-
rmSync(work, { recursive: true, force: true });
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
catch {
|
|
67
|
-
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
rmSync(work, { recursive: true, force: true });
|
|
71
|
-
});
|
|
72
|
-
const prefs = {
|
|
73
|
-
version: 2,
|
|
74
|
-
provider: 'anthropic',
|
|
75
|
-
subagents: { active: [] },
|
|
76
|
-
};
|
|
77
|
-
function detectedAnthropic() {
|
|
78
|
-
return [
|
|
79
|
-
{
|
|
80
|
-
entry: {
|
|
81
|
-
id: 'anthropic',
|
|
82
|
-
label: 'Anthropic',
|
|
83
|
-
defaultModel: 'claude-sonnet-4-5',
|
|
84
|
-
requiresApiKey: true,
|
|
85
|
-
envVars: ['ANTHROPIC_API_KEY'],
|
|
86
|
-
},
|
|
87
|
-
source: 'env',
|
|
88
|
-
apiKey: 'sk-ant-not-a-real-key',
|
|
89
|
-
alternatives: [],
|
|
90
|
-
},
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
|
-
describe('a tool server declared in namzu.config.json', () => {
|
|
94
|
-
it('survives the config loader', () => {
|
|
95
|
-
// The failure this pins: a public config field with no reader is parsed,
|
|
96
|
-
// type-checks, and never arrives. It happened to `permissions`.
|
|
97
|
-
writeFileSync(join(work, 'namzu.config.json'), JSON.stringify({ mcpServers: { tickets: { command: 'node', args: ['x.js'] } } }));
|
|
98
|
-
const cfg = loadConfig({ cwd: work, home: work, env: {} });
|
|
99
|
-
expect(cfg.mcpServers?.tickets?.command).toBe('node');
|
|
100
|
-
expect(cfg.mcpServers?.tickets?.args).toEqual(['x.js']);
|
|
101
|
-
});
|
|
102
|
-
it('is in the tool roster the session hands the model', async () => {
|
|
103
|
-
const server = join(work, 'tickets.js');
|
|
104
|
-
writeFileSync(server, SERVER);
|
|
105
|
-
writeFileSync(join(work, 'namzu.config.json'), JSON.stringify({
|
|
106
|
-
mcpServers: { tickets: { command: process.execPath, args: [server] } },
|
|
107
|
-
}));
|
|
108
|
-
const cfg = loadConfig({ cwd: work, home: work, env: {} });
|
|
109
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
110
|
-
const session = await createAgentSession(prefs, detectedAnthropic(), {
|
|
111
|
-
cwd: work,
|
|
112
|
-
...(cfg.mcpServers ? { mcpServers: cfg.mcpServers } : {}),
|
|
113
|
-
});
|
|
114
|
-
try {
|
|
115
|
-
expect(session.mcpFailed).toEqual([]);
|
|
116
|
-
expect(session.mcpConnected).toEqual([{ name: 'tickets', toolCount: 1 }]);
|
|
117
|
-
// The load-bearing one. Connecting and adapting is not the feature —
|
|
118
|
-
// the model has to be able to see and call it.
|
|
119
|
-
expect(session.toolNames).toContain('mcp_tickets_create');
|
|
120
|
-
}
|
|
121
|
-
finally {
|
|
122
|
-
await session.close();
|
|
123
|
-
}
|
|
124
|
-
}, 20_000);
|
|
125
|
-
it('does not take the builtin tools away', async () => {
|
|
126
|
-
// Registering an extra set is the ordinary way to lose the existing one.
|
|
127
|
-
const server = join(work, 'tickets.js');
|
|
128
|
-
writeFileSync(server, SERVER);
|
|
129
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
130
|
-
const session = await createAgentSession(prefs, detectedAnthropic(), {
|
|
131
|
-
cwd: work,
|
|
132
|
-
mcpServers: { tickets: { command: process.execPath, args: [server] } },
|
|
133
|
-
});
|
|
134
|
-
try {
|
|
135
|
-
expect(session.toolNames).toContain('bash');
|
|
136
|
-
expect(session.toolNames).toContain('read');
|
|
137
|
-
expect(session.toolNames).toContain('mcp_tickets_create');
|
|
138
|
-
}
|
|
139
|
-
finally {
|
|
140
|
-
await session.close();
|
|
141
|
-
}
|
|
142
|
-
}, 20_000);
|
|
143
|
-
it('reports a server that failed, and adds no tools from it', async () => {
|
|
144
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
145
|
-
const session = await createAgentSession(prefs, detectedAnthropic(), {
|
|
146
|
-
cwd: work,
|
|
147
|
-
mcpServers: { tickets: { command: join(work, 'no-such-executable') } },
|
|
148
|
-
});
|
|
149
|
-
try {
|
|
150
|
-
expect(session.mcpConnected).toEqual([]);
|
|
151
|
-
expect(session.mcpFailed.map((f) => f.name)).toEqual(['tickets']);
|
|
152
|
-
expect(session.toolNames.some((n) => n.startsWith('mcp_'))).toBe(false);
|
|
153
|
-
}
|
|
154
|
-
finally {
|
|
155
|
-
await session.close();
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
it('adds nothing and reports nothing when none is configured', async () => {
|
|
159
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
160
|
-
const session = await createAgentSession(prefs, detectedAnthropic(), { cwd: work });
|
|
161
|
-
try {
|
|
162
|
-
expect(session.mcpConnected).toEqual([]);
|
|
163
|
-
expect(session.mcpFailed).toEqual([]);
|
|
164
|
-
expect(session.toolNames.some((n) => n.startsWith('mcp_'))).toBe(false);
|
|
165
|
-
}
|
|
166
|
-
finally {
|
|
167
|
-
await session.close();
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
//# sourceMappingURL=mcp-servers-reach-the-session.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-servers-reach-the-session.test.js","sourceRoot":"","sources":["../../src/__tests__/mcp-servers-reach-the-session.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,MAAM,cAAc,EAA+B,CAAA;IAClE,O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AU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxE,CAAC;gBAAS,CAAC;YACV,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;QACtB,CAAC;IACF,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,0DAA0D,EAAE,KAAK,IAAI,EAAE;QACzE,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAA;QAC9D,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAA;QACnF,IAAI,CAAC;YACJ,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YACxC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YACrC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxE,CAAC;gBAAS,CAAC;YACV,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;QACtB,CAAC;IACF,CAAC,CAAC,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An operator's `permissions` config reaches the turn that enforces it.
|
|
3
|
-
*
|
|
4
|
-
* There was no test that started from a real config FILE and ended at a real
|
|
5
|
-
* turn, and that gap is the whole reason this shipped: the chain is broken in
|
|
6
|
-
* two independent places, in series, and every existing test sits on one side
|
|
7
|
-
* or the other of a break.
|
|
8
|
-
*
|
|
9
|
-
* config file → loadConfig() → compilePermissions() → createAgentSession()
|
|
10
|
-
* ↑ break 1 → query()
|
|
11
|
-
* ↑ break 2
|
|
12
|
-
*
|
|
13
|
-
* - **Break 1.** `sanitize()` in `config/load.ts` copies exactly `format` and
|
|
14
|
-
* `quiet` off a parsed config, so `permissions` is dropped from every file
|
|
15
|
-
* namzu reads. `compilePermissions(ctx.config.permissions)` in `run.ts` and
|
|
16
|
-
* `run-stream.ts` is therefore always compiling `undefined`.
|
|
17
|
-
* - **Break 2.** `runTurn` destructures `rules` and passes the module-level
|
|
18
|
-
* `VERIFICATION_GATE` — whose `rules` is a hardcoded `[]` — to `query()`.
|
|
19
|
-
* So even a caller that hands rules in explicitly has them dropped.
|
|
20
|
-
*
|
|
21
|
-
* Either break alone is enough to make a configured rule do nothing, which is
|
|
22
|
-
* why this test is end-to-end: fixing one and testing that one would report
|
|
23
|
-
* success while the feature stayed broken.
|
|
24
|
-
*
|
|
25
|
-
* The failure is silent by construction. `ask` compiles to no rule because the
|
|
26
|
-
* gate's fallback is already to ask, so a dropped `deny` looks exactly like a
|
|
27
|
-
* config that was honoured — the tool prompts instead of refusing, and a user
|
|
28
|
-
* who clicks approve never learns their `deny` was ignored.
|
|
29
|
-
*/
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=permission-rules-reach-the-turn.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-rules-reach-the-turn.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/permission-rules-reach-the-turn.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG"}
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An operator's `permissions` config reaches the turn that enforces it.
|
|
3
|
-
*
|
|
4
|
-
* There was no test that started from a real config FILE and ended at a real
|
|
5
|
-
* turn, and that gap is the whole reason this shipped: the chain is broken in
|
|
6
|
-
* two independent places, in series, and every existing test sits on one side
|
|
7
|
-
* or the other of a break.
|
|
8
|
-
*
|
|
9
|
-
* config file → loadConfig() → compilePermissions() → createAgentSession()
|
|
10
|
-
* ↑ break 1 → query()
|
|
11
|
-
* ↑ break 2
|
|
12
|
-
*
|
|
13
|
-
* - **Break 1.** `sanitize()` in `config/load.ts` copies exactly `format` and
|
|
14
|
-
* `quiet` off a parsed config, so `permissions` is dropped from every file
|
|
15
|
-
* namzu reads. `compilePermissions(ctx.config.permissions)` in `run.ts` and
|
|
16
|
-
* `run-stream.ts` is therefore always compiling `undefined`.
|
|
17
|
-
* - **Break 2.** `runTurn` destructures `rules` and passes the module-level
|
|
18
|
-
* `VERIFICATION_GATE` — whose `rules` is a hardcoded `[]` — to `query()`.
|
|
19
|
-
* So even a caller that hands rules in explicitly has them dropped.
|
|
20
|
-
*
|
|
21
|
-
* Either break alone is enough to make a configured rule do nothing, which is
|
|
22
|
-
* why this test is end-to-end: fixing one and testing that one would report
|
|
23
|
-
* success while the feature stayed broken.
|
|
24
|
-
*
|
|
25
|
-
* The failure is silent by construction. `ask` compiles to no rule because the
|
|
26
|
-
* gate's fallback is already to ask, so a dropped `deny` looks exactly like a
|
|
27
|
-
* config that was honoured — the tool prompts instead of refusing, and a user
|
|
28
|
-
* who clicks approve never learns their `deny` was ignored.
|
|
29
|
-
*/
|
|
30
|
-
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
31
|
-
import { tmpdir } from 'node:os';
|
|
32
|
-
import { join } from 'node:path';
|
|
33
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
34
|
-
import { loadConfig } from '../config/load.js';
|
|
35
|
-
import { compilePermissions } from '../permissions/rules.js';
|
|
36
|
-
const queryCalls = [];
|
|
37
|
-
vi.mock('@namzu/sdk', async (importOriginal) => {
|
|
38
|
-
const actual = await importOriginal();
|
|
39
|
-
return {
|
|
40
|
-
...actual,
|
|
41
|
-
query: (params) => {
|
|
42
|
-
queryCalls.push(params);
|
|
43
|
-
return (async function* () { })();
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
let workDir;
|
|
48
|
-
beforeEach(() => {
|
|
49
|
-
queryCalls.length = 0;
|
|
50
|
-
workDir = mkdtempSync(join(tmpdir(), 'namzu-perms-'));
|
|
51
|
-
});
|
|
52
|
-
afterEach(() => {
|
|
53
|
-
rmSync(workDir, { recursive: true, force: true });
|
|
54
|
-
});
|
|
55
|
-
/** A real config file, in the real project-config location and format. */
|
|
56
|
-
function writeProjectConfig(permissions) {
|
|
57
|
-
writeFileSync(join(workDir, 'namzu.config.json'), JSON.stringify({ permissions }, null, 2));
|
|
58
|
-
}
|
|
59
|
-
const prefs = {
|
|
60
|
-
version: 2,
|
|
61
|
-
provider: 'anthropic',
|
|
62
|
-
subagents: { active: [] },
|
|
63
|
-
};
|
|
64
|
-
function detectedAnthropic() {
|
|
65
|
-
return [
|
|
66
|
-
{
|
|
67
|
-
entry: {
|
|
68
|
-
id: 'anthropic',
|
|
69
|
-
label: 'Anthropic',
|
|
70
|
-
defaultModel: 'claude-sonnet-4-5',
|
|
71
|
-
requiresApiKey: true,
|
|
72
|
-
envVars: ['ANTHROPIC_API_KEY'],
|
|
73
|
-
},
|
|
74
|
-
source: 'env',
|
|
75
|
-
apiKey: 'sk-ant-not-a-real-key',
|
|
76
|
-
alternatives: [],
|
|
77
|
-
},
|
|
78
|
-
];
|
|
79
|
-
}
|
|
80
|
-
describe('a permissions rule written in a config file', () => {
|
|
81
|
-
it('survives loadConfig', () => {
|
|
82
|
-
writeProjectConfig({ bash: 'deny' });
|
|
83
|
-
const cfg = loadConfig({ cwd: workDir, home: workDir, env: {} });
|
|
84
|
-
expect(cfg.permissions, 'the loader dropped the permissions table off a config file it parsed').toBeDefined();
|
|
85
|
-
expect(cfg.permissions?.bash).toBe('deny');
|
|
86
|
-
});
|
|
87
|
-
it('reaches the gate of the turn that has to enforce it', async () => {
|
|
88
|
-
writeProjectConfig({ bash: 'deny' });
|
|
89
|
-
// Exactly what `run.ts` does, from the same starting point a user has.
|
|
90
|
-
const cfg = loadConfig({ cwd: workDir, home: workDir, env: {} });
|
|
91
|
-
const compiled = compilePermissions(cfg.permissions);
|
|
92
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
93
|
-
const session = await createAgentSession(prefs, detectedAnthropic(), {
|
|
94
|
-
cwd: workDir,
|
|
95
|
-
rules: compiled.rules,
|
|
96
|
-
});
|
|
97
|
-
for await (const _ of session.send([{ role: 'user', content: 'hi', timestamp: 0 }])) {
|
|
98
|
-
// drain
|
|
99
|
-
}
|
|
100
|
-
expect(queryCalls.length, 'the turn must have reached query()').toBe(1);
|
|
101
|
-
const gate = queryCalls[0]?.verificationGate;
|
|
102
|
-
expect(gate?.rules).toEqual([{ type: 'deny_by_name', toolNames: ['bash'] }]);
|
|
103
|
-
});
|
|
104
|
-
it('is not silently replaced by the empty default when handed in directly', async () => {
|
|
105
|
-
// DO NOT DELETE THIS AS REDUNDANT WITH THE TEST ABOVE. It looks like a
|
|
106
|
-
// subset of it and it is the opposite: it is the only test that isolates
|
|
107
|
-
// the turn path from the loader.
|
|
108
|
-
//
|
|
109
|
-
// There were two faults, in series. Rules were dropped by the loader AND
|
|
110
|
-
// again by the turn, and either one alone makes a configured rule do
|
|
111
|
-
// nothing. A suite with only the end-to-end test above would go green the
|
|
112
|
-
// moment ONE of them was fixed — reporting success on a feature that was
|
|
113
|
-
// still dead — and a suite with only a loader test would never have looked
|
|
114
|
-
// at the turn at all.
|
|
115
|
-
//
|
|
116
|
-
// So: no config file here, rules handed straight to the session. When this
|
|
117
|
-
// fails and the end-to-end one fails, the turn drops them. When only the
|
|
118
|
-
// end-to-end one fails, the loader is the sole fault. The pair of results
|
|
119
|
-
// is the diagnosis; neither test gives it alone.
|
|
120
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
121
|
-
const session = await createAgentSession(prefs, detectedAnthropic(), {
|
|
122
|
-
cwd: workDir,
|
|
123
|
-
rules: [{ type: 'deny_by_name', toolNames: ['bash'] }],
|
|
124
|
-
});
|
|
125
|
-
for await (const _ of session.send([{ role: 'user', content: 'hi', timestamp: 0 }])) {
|
|
126
|
-
// drain
|
|
127
|
-
}
|
|
128
|
-
const gate = queryCalls[0]?.verificationGate;
|
|
129
|
-
expect(gate?.rules).toEqual([{ type: 'deny_by_name', toolNames: ['bash'] }]);
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
//# sourceMappingURL=permission-rules-reach-the-turn.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permission-rules-reach-the-turn.test.js","sourceRoot":"","sources":["../../src/__tests__/permission-rules-reach-the-turn.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAExE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,UAAU,GAA8B,EAAE,CAAA;AAChD,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;IAC9C,MAAM,MAAM,GAAG,MAAM,cAAc,EAA+B,CAAA;IAClE,OAAO;QACN,GAAG,MAAM;QACT,KAAK,EAAE,CAAC,MAA+B,EAAE,EAAE;YAC1C,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YACvB,OAAO,CAAC,KAAK,SAAS,CAAC,MAAK,CAAC,CAAC,EAAE,CAAA;QACjC,CAAC;KACD,CAAA;AACF,CAAC,CAAC,CAAA;AAEF,IAAI,OAAe,CAAA;AAEnB,UAAU,CAAC,GAAG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ENTS.md on disk → loadProjectInstructions() → createAgentSession()
|
|
7
|
-
* → the systemPrompt query() is called with
|
|
8
|
-
* → and, separately, the sub-agent definition's prompt
|
|
9
|
-
*
|
|
10
|
-
* and the reason this test starts at a real file rather than at the loader is
|
|
11
|
-
* that a loader test passes with every hop after it deleted. The composed
|
|
12
|
-
* block being correct proves nothing about it being composed INTO anything;
|
|
13
|
-
* the failure mode this feature invites is the string existing and being
|
|
14
|
-
* dropped one function short of the provider, which is silent — the run
|
|
15
|
-
* succeeds and writes code the project would reject, exactly as it did before
|
|
16
|
-
* the feature existed.
|
|
17
|
-
*
|
|
18
|
-
* The sub-agent assertion is here rather than beside the other sub-agent tests
|
|
19
|
-
* on purpose. Two paths carry the same signal, and one of two paths carrying a
|
|
20
|
-
* signal is how this class of defect survives a green suite: the parent would
|
|
21
|
-
* honour the project's rules and every task it delegated would quietly not.
|
|
22
|
-
*/
|
|
23
|
-
export {};
|
|
24
|
-
//# sourceMappingURL=project-instructions-reach-the-turn.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-instructions-reach-the-turn.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/project-instructions-reach-the-turn.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A project's `AGENTS.md` reaches the turn that is supposed to obey it.
|
|
3
|
-
*
|
|
4
|
-
* The chain is
|
|
5
|
-
*
|
|
6
|
-
* AGENTS.md on disk → loadProjectInstructions() → createAgentSession()
|
|
7
|
-
* → the systemPrompt query() is called with
|
|
8
|
-
* → and, separately, the sub-agent definition's prompt
|
|
9
|
-
*
|
|
10
|
-
* and the reason this test starts at a real file rather than at the loader is
|
|
11
|
-
* that a loader test passes with every hop after it deleted. The composed
|
|
12
|
-
* block being correct proves nothing about it being composed INTO anything;
|
|
13
|
-
* the failure mode this feature invites is the string existing and being
|
|
14
|
-
* dropped one function short of the provider, which is silent — the run
|
|
15
|
-
* succeeds and writes code the project would reject, exactly as it did before
|
|
16
|
-
* the feature existed.
|
|
17
|
-
*
|
|
18
|
-
* The sub-agent assertion is here rather than beside the other sub-agent tests
|
|
19
|
-
* on purpose. Two paths carry the same signal, and one of two paths carrying a
|
|
20
|
-
* signal is how this class of defect survives a green suite: the parent would
|
|
21
|
-
* honour the project's rules and every task it delegated would quietly not.
|
|
22
|
-
*/
|
|
23
|
-
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
24
|
-
import { tmpdir } from 'node:os';
|
|
25
|
-
import { join } from 'node:path';
|
|
26
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
27
|
-
import { AgentRegistry } from '@namzu/sdk';
|
|
28
|
-
const queryCalls = [];
|
|
29
|
-
vi.mock('@namzu/sdk', async (importOriginal) => {
|
|
30
|
-
const actual = await importOriginal();
|
|
31
|
-
return {
|
|
32
|
-
...actual,
|
|
33
|
-
query: (params) => {
|
|
34
|
-
queryCalls.push(params);
|
|
35
|
-
return (async function* () { })();
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
let root;
|
|
40
|
-
let repo;
|
|
41
|
-
let pkg;
|
|
42
|
-
beforeEach(() => {
|
|
43
|
-
queryCalls.length = 0;
|
|
44
|
-
root = mkdtempSync(join(tmpdir(), 'namzu-project-'));
|
|
45
|
-
repo = join(root, 'repo');
|
|
46
|
-
pkg = join(repo, 'pkg');
|
|
47
|
-
mkdirSync(pkg, { recursive: true });
|
|
48
|
-
// A real repository boundary, so nothing above the temp directory can leak
|
|
49
|
-
// into the walk and make an assertion pass for the wrong reason.
|
|
50
|
-
mkdirSync(join(repo, '.git'));
|
|
51
|
-
});
|
|
52
|
-
afterEach(() => {
|
|
53
|
-
vi.restoreAllMocks();
|
|
54
|
-
rmSync(root, { recursive: true, force: true });
|
|
55
|
-
});
|
|
56
|
-
const prefs = {
|
|
57
|
-
version: 2,
|
|
58
|
-
provider: 'anthropic',
|
|
59
|
-
subagents: { active: [] },
|
|
60
|
-
};
|
|
61
|
-
function detectedAnthropic() {
|
|
62
|
-
return [
|
|
63
|
-
{
|
|
64
|
-
entry: {
|
|
65
|
-
id: 'anthropic',
|
|
66
|
-
label: 'Anthropic',
|
|
67
|
-
defaultModel: 'claude-sonnet-4-5',
|
|
68
|
-
requiresApiKey: true,
|
|
69
|
-
envVars: ['ANTHROPIC_API_KEY'],
|
|
70
|
-
},
|
|
71
|
-
source: 'env',
|
|
72
|
-
apiKey: 'sk-ant-not-a-real-key',
|
|
73
|
-
alternatives: [],
|
|
74
|
-
},
|
|
75
|
-
];
|
|
76
|
-
}
|
|
77
|
-
async function openSessionIn(cwd) {
|
|
78
|
-
const { createAgentSession } = await import('../tui/agent.js');
|
|
79
|
-
return createAgentSession(prefs, detectedAnthropic(), { cwd });
|
|
80
|
-
}
|
|
81
|
-
async function drive(cwd) {
|
|
82
|
-
const session = await openSessionIn(cwd);
|
|
83
|
-
for await (const _ of session.send([{ role: 'user', content: 'hi', timestamp: 0 }])) {
|
|
84
|
-
// drain
|
|
85
|
-
}
|
|
86
|
-
expect(queryCalls.length, 'the turn must have reached query()').toBe(1);
|
|
87
|
-
return String(queryCalls[0]?.systemPrompt ?? '');
|
|
88
|
-
}
|
|
89
|
-
describe("the project's instructions", () => {
|
|
90
|
-
it('are in the system prompt the turn is actually run with', async () => {
|
|
91
|
-
writeFileSync(join(pkg, 'AGENTS.md'), '# House rules\n\nNever use a default export.');
|
|
92
|
-
const systemPrompt = await drive(pkg);
|
|
93
|
-
expect(systemPrompt).toContain('Never use a default export.');
|
|
94
|
-
});
|
|
95
|
-
it('carry the whole ancestor chain, nearest last', async () => {
|
|
96
|
-
writeFileSync(join(repo, 'AGENTS.md'), 'Repository rule: commits are signed.');
|
|
97
|
-
writeFileSync(join(pkg, 'AGENTS.md'), 'Package rule: this package is generated.');
|
|
98
|
-
const systemPrompt = await drive(pkg);
|
|
99
|
-
expect(systemPrompt).toContain('Repository rule: commits are signed.');
|
|
100
|
-
expect(systemPrompt).toContain('Package rule: this package is generated.');
|
|
101
|
-
expect(systemPrompt.indexOf('Repository rule'), 'the nearer file has to come last or its override never takes effect').toBeLessThan(systemPrompt.indexOf('Package rule'));
|
|
102
|
-
});
|
|
103
|
-
it('do not displace the identity block or the memory that was already there', async () => {
|
|
104
|
-
// The composition is a join over a list, and the ordinary way to break a
|
|
105
|
-
// join is to replace an element instead of adding one. If the project
|
|
106
|
-
// block arrived by overwriting `NAMZU_IDENTITY`, every assertion above
|
|
107
|
-
// would still pass and the agent would have lost its anti-fabrication
|
|
108
|
-
// rules to a file it found on disk.
|
|
109
|
-
writeFileSync(join(pkg, 'AGENTS.md'), 'Never use a default export.');
|
|
110
|
-
const systemPrompt = await drive(pkg);
|
|
111
|
-
expect(systemPrompt).toContain('You are namzu');
|
|
112
|
-
expect(systemPrompt).toContain('CRITICAL — never fabricate');
|
|
113
|
-
expect(systemPrompt.indexOf('You are namzu'), 'instructions read off a working directory must not precede the rules they cannot rewrite').toBeLessThan(systemPrompt.indexOf('Never use a default export.'));
|
|
114
|
-
});
|
|
115
|
-
it('add nothing to the prompt when the project declares none', async () => {
|
|
116
|
-
const systemPrompt = await drive(pkg);
|
|
117
|
-
expect(systemPrompt).not.toContain('Project instructions');
|
|
118
|
-
// The loader returns `null` for "no file", and the composition is a join
|
|
119
|
-
// over a list. Drop the filter that removes the empty slots and the
|
|
120
|
-
// literal four characters `null` are sent to the model between the
|
|
121
|
-
// identity block and the skills block, on every run in every directory
|
|
122
|
-
// with no AGENTS.md — while the assertion above still passes.
|
|
123
|
-
expect(systemPrompt, 'an absent block must be absent, not the word null').not.toContain('null');
|
|
124
|
-
expect(systemPrompt, 'the identity block still has to be there').toContain('You are namzu');
|
|
125
|
-
});
|
|
126
|
-
it('are reported by the session, as the exact set that was injected', async () => {
|
|
127
|
-
writeFileSync(join(repo, 'AGENTS.md'), 'Repository rule.');
|
|
128
|
-
writeFileSync(join(pkg, 'AGENTS.md'), 'Package rule.');
|
|
129
|
-
const session = await openSessionIn(pkg);
|
|
130
|
-
expect(session.instructionFiles).toEqual([join(repo, 'AGENTS.md'), join(pkg, 'AGENTS.md')]);
|
|
131
|
-
});
|
|
132
|
-
it('bind the sub-agents this session can delegate to', async () => {
|
|
133
|
-
const registered = [];
|
|
134
|
-
vi.spyOn(AgentRegistry.prototype, 'register').mockImplementation((def) => {
|
|
135
|
-
for (const d of Array.isArray(def) ? def : [def])
|
|
136
|
-
registered.push(d);
|
|
137
|
-
});
|
|
138
|
-
writeFileSync(join(pkg, 'AGENTS.md'), 'Never use a default export.');
|
|
139
|
-
await openSessionIn(pkg);
|
|
140
|
-
const general = registered.find((d) => d.info.id === 'general-purpose');
|
|
141
|
-
if (!general?.configBuilder) {
|
|
142
|
-
throw new Error('the sub-agent runtime did not stand up — this test proves nothing');
|
|
143
|
-
}
|
|
144
|
-
// `systemPrompt` is on the config the builder produces, not on the
|
|
145
|
-
// definition: the definition is what a reader would reach for and it
|
|
146
|
-
// carries no prompt at all.
|
|
147
|
-
const config = (await general.configBuilder({}));
|
|
148
|
-
const childPrompt = config.systemPrompt ?? '';
|
|
149
|
-
expect(childPrompt).toContain('Never use a default export.');
|
|
150
|
-
expect(childPrompt, "a delegated task must keep its own guardrails as well as the project's").toContain('Never fabricate.');
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
//# sourceMappingURL=project-instructions-reach-the-turn.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project-instructions-reach-the-turn.test.js","sourceRoot":"","sources":["../../src/__tests__/project-instructions-reach-the-turn.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;A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