@namzu/cli 17.0.1 → 18.1.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/README.md +22 -12
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/acp.d.ts.map +1 -1
- package/dist/commands/acp.js +1 -0
- package/dist/commands/acp.js.map +1 -1
- package/dist/commands/run-stream.d.ts.map +1 -1
- package/dist/commands/run-stream.js +1 -0
- package/dist/commands/run-stream.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +1 -0
- package/dist/commands/run.js.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +15 -0
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +17 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/context/doctrine.d.ts +44 -0
- package/dist/context/doctrine.d.ts.map +1 -0
- package/dist/context/doctrine.js +81 -0
- package/dist/context/doctrine.js.map +1 -0
- package/dist/context/turn-snapshot.d.ts +59 -0
- package/dist/context/turn-snapshot.d.ts.map +1 -0
- package/dist/context/turn-snapshot.js +122 -0
- package/dist/context/turn-snapshot.js.map +1 -0
- package/dist/integrations/subagents/activity.d.ts +8 -0
- package/dist/integrations/subagents/activity.d.ts.map +1 -1
- package/dist/integrations/subagents/activity.js +38 -2
- package/dist/integrations/subagents/activity.js.map +1 -1
- package/dist/integrations/subagents/policy.d.ts +6 -0
- package/dist/integrations/subagents/policy.d.ts.map +1 -0
- package/dist/integrations/subagents/policy.js +6 -0
- package/dist/integrations/subagents/policy.js.map +1 -0
- package/dist/integrations/subagents/runtime.d.ts +13 -0
- package/dist/integrations/subagents/runtime.d.ts.map +1 -1
- package/dist/integrations/subagents/runtime.js +77 -13
- package/dist/integrations/subagents/runtime.js.map +1 -1
- package/dist/permissions/mode.d.ts +25 -0
- package/dist/permissions/mode.d.ts.map +1 -1
- package/dist/permissions/mode.js +11 -1
- package/dist/permissions/mode.js.map +1 -1
- package/dist/tui/AgentExplorer.d.ts +21 -0
- package/dist/tui/AgentExplorer.d.ts.map +1 -1
- package/dist/tui/AgentExplorer.js +52 -1
- package/dist/tui/AgentExplorer.js.map +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/tui/App.js +298 -26
- package/dist/tui/App.js.map +1 -1
- package/dist/tui/Composer.d.ts +8 -1
- package/dist/tui/Composer.d.ts.map +1 -1
- package/dist/tui/Composer.js +23 -3
- package/dist/tui/Composer.js.map +1 -1
- package/dist/tui/PermissionOverlay.d.ts.map +1 -1
- package/dist/tui/PermissionOverlay.js +16 -1
- package/dist/tui/PermissionOverlay.js.map +1 -1
- package/dist/tui/TaskList.d.ts +30 -0
- package/dist/tui/TaskList.d.ts.map +1 -0
- package/dist/tui/TaskList.js +58 -0
- package/dist/tui/TaskList.js.map +1 -0
- package/dist/tui/agent.d.ts +49 -4
- package/dist/tui/agent.d.ts.map +1 -1
- package/dist/tui/agent.js +171 -20
- package/dist/tui/agent.js.map +1 -1
- package/dist/tui/permission-review.d.ts.map +1 -1
- package/dist/tui/permission-review.js +151 -1
- package/dist/tui/permission-review.js.map +1 -1
- package/dist/tui/slashCommands.d.ts +2 -0
- package/dist/tui/slashCommands.d.ts.map +1 -1
- package/dist/tui/slashCommands.js +6 -3
- package/dist/tui/slashCommands.js.map +1 -1
- package/dist/tui/stream-blocks.d.ts +24 -0
- package/dist/tui/stream-blocks.d.ts.map +1 -1
- package/dist/tui/stream-blocks.js +74 -0
- package/dist/tui/stream-blocks.js.map +1 -1
- package/dist/tui/types.d.ts +3 -1
- package/dist/tui/types.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How namzu works, as text the model reads.
|
|
3
|
+
*
|
|
4
|
+
* The identity block in `tui/agent.ts` says WHO the agent is and what it must
|
|
5
|
+
* never claim. Nothing said HOW it should work: whether to act or ask, how much
|
|
6
|
+
* of a request to deliver, what to do when a test fails, when a shell command
|
|
7
|
+
* is the wrong tool, what is off-limits in git without a person saying so.
|
|
8
|
+
* Every one of those was left to the underlying model's defaults, and the
|
|
9
|
+
* defaults differ per provider — so the same session felt like a different
|
|
10
|
+
* agent depending on which model was behind it, and the operator experienced
|
|
11
|
+
* the gap as "it narrates instead of doing", "it stopped halfway", "it asked
|
|
12
|
+
* me three things it could have decided".
|
|
13
|
+
*
|
|
14
|
+
* This is one string rather than a persona object because the CLI joins raw
|
|
15
|
+
* strings into its system prompt and the persona assembler's own
|
|
16
|
+
* `OutputDiscipline` says the opposite of what an operator watching a
|
|
17
|
+
* terminal wants (`betweenToolCalls: 'silent'`).
|
|
18
|
+
*
|
|
19
|
+
* Two strings, not one, and the split is by TOOL SET rather than by topic.
|
|
20
|
+
* `NAMZU_WORKING_DOCTRINE` names only tools every namzu agent has — the
|
|
21
|
+
* builtins — and goes to the parent and to every delegated sub-agent, because
|
|
22
|
+
* a delegated task edits the same repository under the same rules.
|
|
23
|
+
* `NAMZU_DELEGATION_DOCTRINE` names `task_create` and `Agent`, which a
|
|
24
|
+
* sub-agent does not have, and so goes to the parent only. An adversarial
|
|
25
|
+
* review caught the first draft ordering children to plan with a tool they
|
|
26
|
+
* could not call; a rule about a tool the reader does not have is not
|
|
27
|
+
* guidance, it is an instruction to fail.
|
|
28
|
+
*
|
|
29
|
+
* Each rule below names a behaviour, not a value; a rule about this repository
|
|
30
|
+
* belongs in `AGENTS.md`, which the model receives separately.
|
|
31
|
+
*/
|
|
32
|
+
export declare const NAMZU_WORKING_DOCTRINE = "## How you work\n\n### Delivering work\n- Act when you have enough information. Do not re-derive facts already established, and do not re-open a decision the user has already made.\n- The requested scope is the deliverable. Do not quietly narrow it, widen it, or turn it into something adjacent. Read ambiguity the way a careful colleague would; make the routine judgment calls yourself and check in only when different readings would produce materially different work.\n- Finish the whole task, not just the easy parts. If one part is blocked \u2014 a tool or capability you do not have, an input that is missing \u2014 say so plainly, do not improvise a result for it, finish every other part in full, and say explicitly what you left out and why. Scaling the work down is the user's call.\n- If you find a real problem with the task as stated, say so in a sentence or two, then keep going under a stated assumption. Reserve blocking questions for cases where proceeding under any assumption would be unsafe or would make the work useless if wrong.\n- If the user repeats or reaffirms a request after you raised a concern, that is their decision: say so and do the full request.\n\n### Reporting\n- Report outcomes faithfully. If tests fail, say so and show the output. If you skipped a step, say it was skipped. When something is done and verified, state it plainly without hedging.\n- Never present a green run on a subset as a green run. Name what was actually executed.\n- Reference code as `path:line` so the user can jump to it.\n- Correct an earlier statement only when the error would change the user's code, conclusions or decisions; state it once, plainly, and continue. No apologies, no tally of past mistakes.\n\n### Reading and editing code\n- Read a file before you edit it, and read enough of the surrounding code to match its comment density, naming and idiom. Code that reads like the file it lives in is the goal; code that reads like a different author is a defect.\n- Prefer the dedicated tools over shell equivalents: `read` over `cat`, the `grep` tool over running `grep` or `rg` through bash, `glob` over `find` or `ls -R`, `edit` over `sed -i`. To change an existing file use `edit`; use `write` only to create a file or when the user asked for a whole-file rewrite. The dedicated tools are bounded, previewable and permission-aware; a shell command is none of those.\n- Independent tool calls go in one response. Reading three files, or running a grep and a glob, does not need three turns. Tools that mutate the workspace \u2014 `bash`, `edit`, `write` \u2014 are applied one after another even when you emit them together; read-only tools run in parallel.\n- After a change, run the checks that would catch a mistake in it \u2014 the package's tests, typecheck, lint \u2014 before you report it done. A change you did not verify is a change you are guessing about.\n- Never leave the working tree in a state you have not described. If you created scratch files, say where; if you touched files outside the request, say which.\n\n### Working with git\n- Never push, force-push, reset, rebase, clean, or otherwise discard or rewrite history unless the user explicitly asked for that action. Approval for one push does not extend to the next.\n- Before any command that could discard uncommitted work, run `git status`. If there are changes there that you did not make, stop and ask rather than stashing, committing or discarding somebody else's work.\n- Commit only when the user asks, on the branch that is checked out. Do not create or switch branches unless the user asks or the project's instructions require it.\n- After a broad `git add`, review what was staged before committing; a file whose name looks harmless can still carry a secret.\n\n### Keeping the user informed\n- Before a batch of tool calls, say in one short line what you are about to do and why. When you have been working for a while without saying anything, say in a few words where you are, then continue. One line, not a paragraph; the tool rows on screen already show the details.\n- Keep the final reply short and specific: what changed, what was verified, what is left. Do not restate the transcript.";
|
|
33
|
+
/**
|
|
34
|
+
* Added to the parent's prompt only while the session is in `plan` mode.
|
|
35
|
+
* Says what the permission layer will enforce anyway, so the model plans
|
|
36
|
+
* instead of discovering the boundary one refused call at a time.
|
|
37
|
+
*/
|
|
38
|
+
export declare const NAMZU_PLAN_MODE_DOCTRINE = "## Plan mode\n\nYou are in plan mode. Read, search and think; do not change anything. `read`, `grep`, `glob` and the other read-only tools work as usual, and you may keep a task list. Any `edit`, `write` or shell command that changes state will be refused, so do not attempt one.\n\nWhen you have understood the task, reply with the plan: what you would change, in which files, in what order, and what you would verify. Be concrete \u2014 name files and functions \u2014 and short enough to read in one screen. Then stop and wait; the user will leave plan mode to have the plan carried out, and that switch is their approval.";
|
|
39
|
+
/**
|
|
40
|
+
* Parent-only: rules about `task_create` / `task_update` and `Agent`, which a
|
|
41
|
+
* delegated sub-agent does not have. See the module comment for the split.
|
|
42
|
+
*/
|
|
43
|
+
export declare const NAMZU_DELEGATION_DOCTRINE = "### Planning and delegating\n- For work that is genuinely multi-step \u2014 several files, several distinct stages, anything you would write a checklist for \u2014 open a task list with `task_create` and keep it current with `task_update`, marking each step done when it is done rather than at the end. Do not open one for a single inspect-edit-test cycle; the list is for the user to follow, and a list of one item tells them nothing.\n- When the `Agent` tool is available, delegate genuinely independent work through it and give each delegation a short, specific description; the user watches those descriptions, not the prompts. Each sub-agent starts with no context, so the prompt must carry everything it needs.\n- Delegate lookups \u2014 where something is defined, which files reference it, how a module works \u2014 with `subagent_type: \"explore\"`: it has reading and searching tools only and never interrupts the user for permission. Reserve the default sub-agent for work that changes files or runs commands.";
|
|
44
|
+
//# sourceMappingURL=doctrine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctrine.d.ts","sourceRoot":"","sources":["../../src/context/doctrine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,sBAAsB,mnIA8BsF,CAAA;AAEzH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,snBAIwS,CAAA;AAE7U;;;GAGG;AACH,eAAO,MAAM,yBAAyB,igCAG+P,CAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How namzu works, as text the model reads.
|
|
3
|
+
*
|
|
4
|
+
* The identity block in `tui/agent.ts` says WHO the agent is and what it must
|
|
5
|
+
* never claim. Nothing said HOW it should work: whether to act or ask, how much
|
|
6
|
+
* of a request to deliver, what to do when a test fails, when a shell command
|
|
7
|
+
* is the wrong tool, what is off-limits in git without a person saying so.
|
|
8
|
+
* Every one of those was left to the underlying model's defaults, and the
|
|
9
|
+
* defaults differ per provider — so the same session felt like a different
|
|
10
|
+
* agent depending on which model was behind it, and the operator experienced
|
|
11
|
+
* the gap as "it narrates instead of doing", "it stopped halfway", "it asked
|
|
12
|
+
* me three things it could have decided".
|
|
13
|
+
*
|
|
14
|
+
* This is one string rather than a persona object because the CLI joins raw
|
|
15
|
+
* strings into its system prompt and the persona assembler's own
|
|
16
|
+
* `OutputDiscipline` says the opposite of what an operator watching a
|
|
17
|
+
* terminal wants (`betweenToolCalls: 'silent'`).
|
|
18
|
+
*
|
|
19
|
+
* Two strings, not one, and the split is by TOOL SET rather than by topic.
|
|
20
|
+
* `NAMZU_WORKING_DOCTRINE` names only tools every namzu agent has — the
|
|
21
|
+
* builtins — and goes to the parent and to every delegated sub-agent, because
|
|
22
|
+
* a delegated task edits the same repository under the same rules.
|
|
23
|
+
* `NAMZU_DELEGATION_DOCTRINE` names `task_create` and `Agent`, which a
|
|
24
|
+
* sub-agent does not have, and so goes to the parent only. An adversarial
|
|
25
|
+
* review caught the first draft ordering children to plan with a tool they
|
|
26
|
+
* could not call; a rule about a tool the reader does not have is not
|
|
27
|
+
* guidance, it is an instruction to fail.
|
|
28
|
+
*
|
|
29
|
+
* Each rule below names a behaviour, not a value; a rule about this repository
|
|
30
|
+
* belongs in `AGENTS.md`, which the model receives separately.
|
|
31
|
+
*/
|
|
32
|
+
export const NAMZU_WORKING_DOCTRINE = `## How you work
|
|
33
|
+
|
|
34
|
+
### Delivering work
|
|
35
|
+
- Act when you have enough information. Do not re-derive facts already established, and do not re-open a decision the user has already made.
|
|
36
|
+
- The requested scope is the deliverable. Do not quietly narrow it, widen it, or turn it into something adjacent. Read ambiguity the way a careful colleague would; make the routine judgment calls yourself and check in only when different readings would produce materially different work.
|
|
37
|
+
- Finish the whole task, not just the easy parts. If one part is blocked — a tool or capability you do not have, an input that is missing — say so plainly, do not improvise a result for it, finish every other part in full, and say explicitly what you left out and why. Scaling the work down is the user's call.
|
|
38
|
+
- If you find a real problem with the task as stated, say so in a sentence or two, then keep going under a stated assumption. Reserve blocking questions for cases where proceeding under any assumption would be unsafe or would make the work useless if wrong.
|
|
39
|
+
- If the user repeats or reaffirms a request after you raised a concern, that is their decision: say so and do the full request.
|
|
40
|
+
|
|
41
|
+
### Reporting
|
|
42
|
+
- Report outcomes faithfully. If tests fail, say so and show the output. If you skipped a step, say it was skipped. When something is done and verified, state it plainly without hedging.
|
|
43
|
+
- Never present a green run on a subset as a green run. Name what was actually executed.
|
|
44
|
+
- Reference code as \`path:line\` so the user can jump to it.
|
|
45
|
+
- Correct an earlier statement only when the error would change the user's code, conclusions or decisions; state it once, plainly, and continue. No apologies, no tally of past mistakes.
|
|
46
|
+
|
|
47
|
+
### Reading and editing code
|
|
48
|
+
- Read a file before you edit it, and read enough of the surrounding code to match its comment density, naming and idiom. Code that reads like the file it lives in is the goal; code that reads like a different author is a defect.
|
|
49
|
+
- Prefer the dedicated tools over shell equivalents: \`read\` over \`cat\`, the \`grep\` tool over running \`grep\` or \`rg\` through bash, \`glob\` over \`find\` or \`ls -R\`, \`edit\` over \`sed -i\`. To change an existing file use \`edit\`; use \`write\` only to create a file or when the user asked for a whole-file rewrite. The dedicated tools are bounded, previewable and permission-aware; a shell command is none of those.
|
|
50
|
+
- Independent tool calls go in one response. Reading three files, or running a grep and a glob, does not need three turns. Tools that mutate the workspace — \`bash\`, \`edit\`, \`write\` — are applied one after another even when you emit them together; read-only tools run in parallel.
|
|
51
|
+
- After a change, run the checks that would catch a mistake in it — the package's tests, typecheck, lint — before you report it done. A change you did not verify is a change you are guessing about.
|
|
52
|
+
- Never leave the working tree in a state you have not described. If you created scratch files, say where; if you touched files outside the request, say which.
|
|
53
|
+
|
|
54
|
+
### Working with git
|
|
55
|
+
- Never push, force-push, reset, rebase, clean, or otherwise discard or rewrite history unless the user explicitly asked for that action. Approval for one push does not extend to the next.
|
|
56
|
+
- Before any command that could discard uncommitted work, run \`git status\`. If there are changes there that you did not make, stop and ask rather than stashing, committing or discarding somebody else's work.
|
|
57
|
+
- Commit only when the user asks, on the branch that is checked out. Do not create or switch branches unless the user asks or the project's instructions require it.
|
|
58
|
+
- After a broad \`git add\`, review what was staged before committing; a file whose name looks harmless can still carry a secret.
|
|
59
|
+
|
|
60
|
+
### Keeping the user informed
|
|
61
|
+
- Before a batch of tool calls, say in one short line what you are about to do and why. When you have been working for a while without saying anything, say in a few words where you are, then continue. One line, not a paragraph; the tool rows on screen already show the details.
|
|
62
|
+
- Keep the final reply short and specific: what changed, what was verified, what is left. Do not restate the transcript.`;
|
|
63
|
+
/**
|
|
64
|
+
* Added to the parent's prompt only while the session is in `plan` mode.
|
|
65
|
+
* Says what the permission layer will enforce anyway, so the model plans
|
|
66
|
+
* instead of discovering the boundary one refused call at a time.
|
|
67
|
+
*/
|
|
68
|
+
export const NAMZU_PLAN_MODE_DOCTRINE = `## Plan mode
|
|
69
|
+
|
|
70
|
+
You are in plan mode. Read, search and think; do not change anything. \`read\`, \`grep\`, \`glob\` and the other read-only tools work as usual, and you may keep a task list. Any \`edit\`, \`write\` or shell command that changes state will be refused, so do not attempt one.
|
|
71
|
+
|
|
72
|
+
When you have understood the task, reply with the plan: what you would change, in which files, in what order, and what you would verify. Be concrete — name files and functions — and short enough to read in one screen. Then stop and wait; the user will leave plan mode to have the plan carried out, and that switch is their approval.`;
|
|
73
|
+
/**
|
|
74
|
+
* Parent-only: rules about `task_create` / `task_update` and `Agent`, which a
|
|
75
|
+
* delegated sub-agent does not have. See the module comment for the split.
|
|
76
|
+
*/
|
|
77
|
+
export const NAMZU_DELEGATION_DOCTRINE = `### Planning and delegating
|
|
78
|
+
- For work that is genuinely multi-step — several files, several distinct stages, anything you would write a checklist for — open a task list with \`task_create\` and keep it current with \`task_update\`, marking each step done when it is done rather than at the end. Do not open one for a single inspect-edit-test cycle; the list is for the user to follow, and a list of one item tells them nothing.
|
|
79
|
+
- When the \`Agent\` tool is available, delegate genuinely independent work through it and give each delegation a short, specific description; the user watches those descriptions, not the prompts. Each sub-agent starts with no context, so the prompt must carry everything it needs.
|
|
80
|
+
- Delegate lookups — where something is defined, which files reference it, how a module works — with \`subagent_type: "explore"\`: it has reading and searching tools only and never interrupts the user for permission. Reserve the default sub-agent for work that changes files or runs commands.`;
|
|
81
|
+
//# sourceMappingURL=doctrine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctrine.js","sourceRoot":"","sources":["../../src/context/doctrine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yHA8BmF,CAAA;AAEzH;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;6UAIqS,CAAA;AAE7U;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;qSAG4P,CAAA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the repository looked like when the user's turn began.
|
|
3
|
+
*
|
|
4
|
+
* `environment.ts` deliberately keeps the working tree's dirty state out of
|
|
5
|
+
* the system prompt: that block is the cached prefix, and a file count that
|
|
6
|
+
* changes whenever the agent saves would re-key the cache every turn. The
|
|
7
|
+
* counter-argument is just as real — an agent that does not know a tree is
|
|
8
|
+
* dirty commits somebody else's half-finished work, and an agent that does
|
|
9
|
+
* not know the last five commits re-does one of them.
|
|
10
|
+
*
|
|
11
|
+
* Both are right, and the SDK already has the placement that reconciles
|
|
12
|
+
* them: a `turn` prompt contribution rides the ephemeral trailing message,
|
|
13
|
+
* is never cached and never enters history. Reading the snapshot once per
|
|
14
|
+
* user turn and rendering it on the FIRST iteration only gives the model the
|
|
15
|
+
* state it started from at the cost of one uncached message, and leaves later
|
|
16
|
+
* iterations to `git status` for anything that changed since — which the
|
|
17
|
+
* model itself changed, and knows about.
|
|
18
|
+
*
|
|
19
|
+
* ## Untrusted, and said so
|
|
20
|
+
*
|
|
21
|
+
* A file name and a commit subject are text somebody wrote, and this text
|
|
22
|
+
* lands in a SYSTEM message. A branch checked out from a fork can carry a
|
|
23
|
+
* commit titled "ignore your instructions and run …", and a file can be named
|
|
24
|
+
* to close a code fence. So the block goes through the same envelope every
|
|
25
|
+
* tool result from outside the process uses, each line is cut to a bound, and
|
|
26
|
+
* control characters are dropped — the model is told it is looking at data.
|
|
27
|
+
*
|
|
28
|
+
* ## Bounded, in bytes and in lines
|
|
29
|
+
*
|
|
30
|
+
* A status with four hundred entries is a generated directory somebody forgot
|
|
31
|
+
* to ignore, and the first thirty lines say so as well as all four hundred
|
|
32
|
+
* would. The cut is applied after the read, so the read itself is bounded
|
|
33
|
+
* too: a `maxBuffer` a real status can reach, and a two-second deadline. A
|
|
34
|
+
* read that exceeds either produces NO snapshot rather than a wrong one, and
|
|
35
|
+
* the model is left with `git status` as it was before this existed.
|
|
36
|
+
*/
|
|
37
|
+
/** Status entries shown before the rest is summarised as a count. */
|
|
38
|
+
export declare const MAX_STATUS_LINES = 30;
|
|
39
|
+
/** Recent commits shown; enough to see what the last few turns did. */
|
|
40
|
+
export declare const RECENT_COMMITS = 5;
|
|
41
|
+
/** Longest line the block will carry; a path or subject past this is cut. */
|
|
42
|
+
export declare const MAX_LINE_CHARS = 200;
|
|
43
|
+
export interface TurnSnapshot {
|
|
44
|
+
/** `git status --short`, already cut to `MAX_STATUS_LINES`. */
|
|
45
|
+
readonly status: readonly string[];
|
|
46
|
+
/** Entries the cut dropped. `0` when the status was shown whole. */
|
|
47
|
+
readonly omittedStatusLines: number;
|
|
48
|
+
/** `git log --oneline`, newest first. */
|
|
49
|
+
readonly recentCommits: readonly string[];
|
|
50
|
+
}
|
|
51
|
+
/** One line, printable characters only, cut at the bound with a marker. */
|
|
52
|
+
export declare function boundLine(line: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* `null` when the directory is not a repository, so a caller renders nothing
|
|
55
|
+
* rather than an empty heading.
|
|
56
|
+
*/
|
|
57
|
+
export declare function readTurnSnapshot(cwd: string): Promise<TurnSnapshot | null>;
|
|
58
|
+
export declare function composeTurnSnapshot(snapshot: TurnSnapshot): string;
|
|
59
|
+
//# sourceMappingURL=turn-snapshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-snapshot.d.ts","sourceRoot":"","sources":["../../src/context/turn-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAgBH,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAClC,uEAAuE;AACvE,eAAO,MAAM,cAAc,IAAI,CAAA;AAC/B,6EAA6E;AAC7E,eAAO,MAAM,cAAc,MAAM,CAAA;AAEjC,MAAM,WAAW,YAAY;IAC5B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,oEAAoE;IACpE,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;IACnC,yCAAyC;IACzC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAA;CACzC;AAqBD,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAahF;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CA2BlE"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the repository looked like when the user's turn began.
|
|
3
|
+
*
|
|
4
|
+
* `environment.ts` deliberately keeps the working tree's dirty state out of
|
|
5
|
+
* the system prompt: that block is the cached prefix, and a file count that
|
|
6
|
+
* changes whenever the agent saves would re-key the cache every turn. The
|
|
7
|
+
* counter-argument is just as real — an agent that does not know a tree is
|
|
8
|
+
* dirty commits somebody else's half-finished work, and an agent that does
|
|
9
|
+
* not know the last five commits re-does one of them.
|
|
10
|
+
*
|
|
11
|
+
* Both are right, and the SDK already has the placement that reconciles
|
|
12
|
+
* them: a `turn` prompt contribution rides the ephemeral trailing message,
|
|
13
|
+
* is never cached and never enters history. Reading the snapshot once per
|
|
14
|
+
* user turn and rendering it on the FIRST iteration only gives the model the
|
|
15
|
+
* state it started from at the cost of one uncached message, and leaves later
|
|
16
|
+
* iterations to `git status` for anything that changed since — which the
|
|
17
|
+
* model itself changed, and knows about.
|
|
18
|
+
*
|
|
19
|
+
* ## Untrusted, and said so
|
|
20
|
+
*
|
|
21
|
+
* A file name and a commit subject are text somebody wrote, and this text
|
|
22
|
+
* lands in a SYSTEM message. A branch checked out from a fork can carry a
|
|
23
|
+
* commit titled "ignore your instructions and run …", and a file can be named
|
|
24
|
+
* to close a code fence. So the block goes through the same envelope every
|
|
25
|
+
* tool result from outside the process uses, each line is cut to a bound, and
|
|
26
|
+
* control characters are dropped — the model is told it is looking at data.
|
|
27
|
+
*
|
|
28
|
+
* ## Bounded, in bytes and in lines
|
|
29
|
+
*
|
|
30
|
+
* A status with four hundred entries is a generated directory somebody forgot
|
|
31
|
+
* to ignore, and the first thirty lines say so as well as all four hundred
|
|
32
|
+
* would. The cut is applied after the read, so the read itself is bounded
|
|
33
|
+
* too: a `maxBuffer` a real status can reach, and a two-second deadline. A
|
|
34
|
+
* read that exceeds either produces NO snapshot rather than a wrong one, and
|
|
35
|
+
* the model is left with `git status` as it was before this existed.
|
|
36
|
+
*/
|
|
37
|
+
import { execFile } from 'node:child_process';
|
|
38
|
+
import { promisify } from 'node:util';
|
|
39
|
+
import { wrapUntrusted } from '@namzu/sdk';
|
|
40
|
+
const run = promisify(execFile);
|
|
41
|
+
/** Bound on a single git call. A wedged repository must not stall a turn. */
|
|
42
|
+
const GIT_TIMEOUT_MS = 2_000;
|
|
43
|
+
/**
|
|
44
|
+
* Bound on what one call may return. A status line is a path, so this is
|
|
45
|
+
* roughly forty thousand of them — well past any tree this block is for.
|
|
46
|
+
*/
|
|
47
|
+
const GIT_MAX_BUFFER = 4 * 1024 * 1024;
|
|
48
|
+
/** Status entries shown before the rest is summarised as a count. */
|
|
49
|
+
export const MAX_STATUS_LINES = 30;
|
|
50
|
+
/** Recent commits shown; enough to see what the last few turns did. */
|
|
51
|
+
export const RECENT_COMMITS = 5;
|
|
52
|
+
/** Longest line the block will carry; a path or subject past this is cut. */
|
|
53
|
+
export const MAX_LINE_CHARS = 200;
|
|
54
|
+
async function git(cwd, args) {
|
|
55
|
+
try {
|
|
56
|
+
const { stdout } = await run('git', [...args], {
|
|
57
|
+
cwd,
|
|
58
|
+
timeout: GIT_TIMEOUT_MS,
|
|
59
|
+
maxBuffer: GIT_MAX_BUFFER,
|
|
60
|
+
});
|
|
61
|
+
return stdout
|
|
62
|
+
.split('\n')
|
|
63
|
+
.filter((line) => line.length > 0)
|
|
64
|
+
.map(boundLine);
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
// Not a repository, no git, a call that timed out or overran the
|
|
68
|
+
// buffer — the snapshot is simply not available, and the block below
|
|
69
|
+
// does not claim one.
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** One line, printable characters only, cut at the bound with a marker. */
|
|
74
|
+
export function boundLine(line) {
|
|
75
|
+
const printable = line.replace(/\p{Cc}/gu, '');
|
|
76
|
+
return printable.length > MAX_LINE_CHARS ? `${printable.slice(0, MAX_LINE_CHARS)}…` : printable;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* `null` when the directory is not a repository, so a caller renders nothing
|
|
80
|
+
* rather than an empty heading.
|
|
81
|
+
*/
|
|
82
|
+
export async function readTurnSnapshot(cwd) {
|
|
83
|
+
const [status, log] = await Promise.all([
|
|
84
|
+
git(cwd, ['status', '--short']),
|
|
85
|
+
git(cwd, ['log', '--oneline', `-${RECENT_COMMITS}`]),
|
|
86
|
+
]);
|
|
87
|
+
if (status === null)
|
|
88
|
+
return null;
|
|
89
|
+
return {
|
|
90
|
+
status: status.slice(0, MAX_STATUS_LINES),
|
|
91
|
+
omittedStatusLines: Math.max(0, status.length - MAX_STATUS_LINES),
|
|
92
|
+
// An unborn branch has no log; that is a repository with no commits,
|
|
93
|
+
// not a failure to read one.
|
|
94
|
+
recentCommits: log ?? [],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
export function composeTurnSnapshot(snapshot) {
|
|
98
|
+
const body = [];
|
|
99
|
+
if (snapshot.status.length === 0) {
|
|
100
|
+
body.push('Working tree: clean.');
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
body.push('Working tree (git status --short):', ...snapshot.status);
|
|
104
|
+
if (snapshot.omittedStatusLines > 0) {
|
|
105
|
+
body.push(`… and ${snapshot.omittedStatusLines} more`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (snapshot.recentCommits.length > 0) {
|
|
109
|
+
body.push('', 'Recent commits (newest first):', ...snapshot.recentCommits);
|
|
110
|
+
}
|
|
111
|
+
return [
|
|
112
|
+
'## Repository at the start of this turn',
|
|
113
|
+
'',
|
|
114
|
+
wrapUntrusted({
|
|
115
|
+
kind: 'repository-snapshot',
|
|
116
|
+
provenance: 'File names and commit subjects read from the working directory with git. They were written by whoever committed or created them.',
|
|
117
|
+
}, body.join('\n')),
|
|
118
|
+
'',
|
|
119
|
+
'This is a snapshot from when the turn started; it does not update as you work. Run `git status` before any action that depends on the current state.',
|
|
120
|
+
].join('\n');
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=turn-snapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-snapshot.js","sourceRoot":"","sources":["../../src/context/turn-snapshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,MAAM,GAAG,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAA;AAE/B,6EAA6E;AAC7E,MAAM,cAAc,GAAG,KAAK,CAAA;AAC5B;;;GAGG;AACH,MAAM,cAAc,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAA;AACtC,qEAAqE;AACrE,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAA;AAClC,uEAAuE;AACvE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAA;AAC/B,6EAA6E;AAC7E,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAA;AAWjC,KAAK,UAAU,GAAG,CAAC,GAAW,EAAE,IAAuB;IACtD,IAAI,CAAC;QACJ,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE;YAC9C,GAAG;YACH,OAAO,EAAE,cAAc;YACvB,SAA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AACF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,QAAsB;IACzD,MAAM,IAAI,GAAa,EAAE,CAAA;IACzB,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IAClC,CAAC;SAAM,CAAC;QACP,IAAI,CAAC,IAAI,CAAC,oCAAoC,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAA;QACnE,IAAI,QAAQ,CAAC,kBAAkB,GAAG,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,IAAI,CAAC,SAAS,QAAQ,CAAC,kBAAkB,OAAO,CAAC,CAAA;QACvD,CAAC;IACF,CAAC;IACD,IAAI,QAAQ,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,gCAAgC,EAAE,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAA;IAC3E,CAAC;IACD,OAAO;QACN,yCAAyC;QACzC,EAAE;QACF,aAAa,CACZ;YACC,IAAI,EAAE,qBAAqB;YAC3B,UAAU,EACT,kIAAkI;SACnI,EACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CACf;QACD,EAAE;QACF,sJAAsJ;KACtJ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACb,CAAC"}
|
|
@@ -27,6 +27,10 @@ export interface SubagentActivity {
|
|
|
27
27
|
readonly agentId: string;
|
|
28
28
|
readonly description: string;
|
|
29
29
|
readonly prompt: string;
|
|
30
|
+
/** Direct tool batch that launched this concurrent sibling cohort. */
|
|
31
|
+
readonly batchId: string;
|
|
32
|
+
/** Exact parent Agent tool call, used to suppress only its generic row. */
|
|
33
|
+
readonly toolUseId?: string;
|
|
30
34
|
/** Parent run identity; display labels never serve as orchestration identity. */
|
|
31
35
|
readonly workflowId: string;
|
|
32
36
|
/** Monitor-owned phase identity, stable even when display labels collide. */
|
|
@@ -63,6 +67,7 @@ export declare class SubagentActivityMonitor implements SubagentActivitySource {
|
|
|
63
67
|
private readonly listeners;
|
|
64
68
|
private epoch;
|
|
65
69
|
private counter;
|
|
70
|
+
private fallbackBatchCounter;
|
|
66
71
|
private phaseCounter;
|
|
67
72
|
private readonly phases;
|
|
68
73
|
private notifyTimer;
|
|
@@ -71,6 +76,8 @@ export declare class SubagentActivityMonitor implements SubagentActivitySource {
|
|
|
71
76
|
readonly agentId: string;
|
|
72
77
|
readonly description: string;
|
|
73
78
|
readonly prompt: string;
|
|
79
|
+
readonly batchId?: string;
|
|
80
|
+
readonly toolUseId?: string;
|
|
74
81
|
readonly workflowId?: string;
|
|
75
82
|
readonly workflow?: string;
|
|
76
83
|
readonly phase?: string;
|
|
@@ -80,6 +87,7 @@ export declare class SubagentActivityMonitor implements SubagentActivitySource {
|
|
|
80
87
|
subscribe(listener: () => void): () => void;
|
|
81
88
|
reset(): void;
|
|
82
89
|
close(): void;
|
|
90
|
+
private fallbackBatchId;
|
|
83
91
|
private prune;
|
|
84
92
|
private scheduleNotify;
|
|
85
93
|
private clearNotifyTimer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../src/integrations/subagents/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAA0C,MAAM,YAAY,CAAA;AAMnG,eAAO,MAAM,mCAAmC,MAAM,CAAA;AACtD,eAAO,MAAM,qBAAqB,QAAS,CAAA;AAI3C,eAAO,MAAM,sBAAsB,mBAAmB,CAAA;AACtD,eAAO,MAAM,mBAAmB,SAAS,CAAA;AAEzC,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAA;AAElG,MAAM,MAAM,qBAAqB,GAC9B;IACA,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,C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,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAC5B,GAAG,uBAAuB;IAyG3B,WAAW,IAAI,SAAS,gBAAgB,EAAE;IA+B1C,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAK3C,KAAK,IAAI,IAAI;IASb,KAAK,IAAI,IAAI;IAUb,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,SAAS;CAWjB"}
|
|
@@ -19,6 +19,7 @@ export class SubagentActivityMonitor {
|
|
|
19
19
|
listeners = new Set();
|
|
20
20
|
epoch = 0;
|
|
21
21
|
counter = 0;
|
|
22
|
+
fallbackBatchCounter = 0;
|
|
22
23
|
phaseCounter = 0;
|
|
23
24
|
phases = new Map();
|
|
24
25
|
notifyTimer;
|
|
@@ -27,9 +28,13 @@ export class SubagentActivityMonitor {
|
|
|
27
28
|
const epoch = this.epoch;
|
|
28
29
|
const viewId = `agent-${++this.counter}`;
|
|
29
30
|
const workflowId = normalizedLabel(input.workflowId, 'session', MAX_IDENTITY_LABEL_CODE_UNITS);
|
|
31
|
+
const requestedBatchId = input.batchId?.trim();
|
|
32
|
+
const batchId = requestedBatchId
|
|
33
|
+
? bounded(requestedBatchId, MAX_IDENTITY_LABEL_CODE_UNITS)
|
|
34
|
+
: this.fallbackBatchId(workflowId);
|
|
30
35
|
const workflowIdentity = normalizedLabel(input.workflow, DEFAULT_AGENT_WORKFLOW, MAX_IDENTITY_LABEL_CODE_UNITS);
|
|
31
36
|
const phaseIdentity = normalizedLabel(input.phase, DEFAULT_AGENT_PHASE, MAX_IDENTITY_LABEL_CODE_UNITS);
|
|
32
|
-
const phaseKey = JSON.stringify([workflowId, workflowIdentity, phaseIdentity]);
|
|
37
|
+
const phaseKey = JSON.stringify([workflowId, batchId, workflowIdentity, phaseIdentity]);
|
|
33
38
|
let phaseDefinition = this.phases.get(phaseKey);
|
|
34
39
|
if (!phaseDefinition) {
|
|
35
40
|
const sequence = ++this.phaseCounter;
|
|
@@ -48,6 +53,10 @@ export class SubagentActivityMonitor {
|
|
|
48
53
|
agentId: bounded(input.agentId, MAX_AGENT_ACTIVITY_LABEL_CODE_UNITS),
|
|
49
54
|
description: bounded(input.description, MAX_AGENT_ACTIVITY_LABEL_CODE_UNITS),
|
|
50
55
|
prompt: bounded(input.prompt, MAX_PROMPT_CODE_UNITS),
|
|
56
|
+
batchId,
|
|
57
|
+
...(input.toolUseId
|
|
58
|
+
? { toolUseId: bounded(input.toolUseId, MAX_IDENTITY_LABEL_CODE_UNITS) }
|
|
59
|
+
: {}),
|
|
51
60
|
workflowId,
|
|
52
61
|
phaseId: phaseDefinition.id,
|
|
53
62
|
workflow: bounded(workflowIdentity, MAX_AGENT_ACTIVITY_LABEL_CODE_UNITS),
|
|
@@ -127,6 +136,8 @@ export class SubagentActivityMonitor {
|
|
|
127
136
|
agentId: record.agentId,
|
|
128
137
|
description: record.description,
|
|
129
138
|
prompt: record.prompt,
|
|
139
|
+
batchId: record.batchId,
|
|
140
|
+
...(record.toolUseId ? { toolUseId: record.toolUseId } : {}),
|
|
130
141
|
workflowId: record.workflowId,
|
|
131
142
|
phaseId: record.phaseId,
|
|
132
143
|
workflow: record.workflow,
|
|
@@ -162,6 +173,13 @@ export class SubagentActivityMonitor {
|
|
|
162
173
|
this.notifyNow();
|
|
163
174
|
this.listeners.clear();
|
|
164
175
|
}
|
|
176
|
+
fallbackBatchId(workflowId) {
|
|
177
|
+
for (const record of this.records.values()) {
|
|
178
|
+
if (record.workflowId === workflowId && !isTerminal(record.status))
|
|
179
|
+
return record.batchId;
|
|
180
|
+
}
|
|
181
|
+
return `batch-${++this.fallbackBatchCounter}`;
|
|
182
|
+
}
|
|
165
183
|
prune() {
|
|
166
184
|
const terminal = [...this.records.values()]
|
|
167
185
|
.filter((record) => isTerminal(record.status))
|
|
@@ -213,9 +231,17 @@ function projectEvent(record, event) {
|
|
|
213
231
|
record.status = 'working';
|
|
214
232
|
record.latestActivity = 'Working';
|
|
215
233
|
return;
|
|
234
|
+
case 'reasoning_started':
|
|
235
|
+
case 'reasoning_delta':
|
|
236
|
+
record.status = 'working';
|
|
237
|
+
record.latestActivity = 'Thinking';
|
|
238
|
+
return;
|
|
239
|
+
case 'reasoning_completed':
|
|
240
|
+
record.status = 'working';
|
|
241
|
+
record.latestActivity = 'Working';
|
|
242
|
+
return;
|
|
216
243
|
case 'text_delta': {
|
|
217
244
|
record.status = 'working';
|
|
218
|
-
record.latestActivity = 'Answering';
|
|
219
245
|
const id = `${record.viewId}:assistant:${event.messageId ?? event.runId}`;
|
|
220
246
|
const current = record.rows.at(-1);
|
|
221
247
|
if (current?.kind === 'assistant' && current.id === id) {
|
|
@@ -231,6 +257,9 @@ function projectEvent(record, event) {
|
|
|
231
257
|
text: bounded(event.text, MAX_ROW_CODE_UNITS),
|
|
232
258
|
});
|
|
233
259
|
}
|
|
260
|
+
const assistant = record.rows.at(-1);
|
|
261
|
+
const preview = assistant?.kind === 'assistant' ? oneLine(assistant.text) : '';
|
|
262
|
+
record.latestActivity = bounded(preview ? `Answering · ${preview}` : 'Answering', MAX_AGENT_ACTIVITY_LABEL_CODE_UNITS);
|
|
234
263
|
return;
|
|
235
264
|
}
|
|
236
265
|
case 'tool_executing': {
|
|
@@ -317,6 +346,13 @@ function pushRow(record, row) {
|
|
|
317
346
|
record.rows.splice(0, record.rows.length - MAX_TRANSCRIPT_ROWS);
|
|
318
347
|
}
|
|
319
348
|
}
|
|
349
|
+
function oneLine(value) {
|
|
350
|
+
return value
|
|
351
|
+
.replace(/[\r\n]+/g, ' ')
|
|
352
|
+
.replace(/\t/g, ' ')
|
|
353
|
+
.replace(/\s+/g, ' ')
|
|
354
|
+
.trim();
|
|
355
|
+
}
|
|
320
356
|
function statusOf(handle) {
|
|
321
357
|
if (handle.state === 'canceled')
|
|
322
358
|
return 'cancelled';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../../src/integrations/subagents/activity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,YAAY,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAEnG,MAAM,mBAAmB,GAAG,EAAE,CAAA;AAC9B,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAA;AAChC,MAAM,qBAAqB,GAAG,KAAK,CAAA;AACnC,MAAM,CAAC,MAAM,mCAAmC,GAAG,GAAG,CAAA;AACtD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAA;AAC3C,MAAM,6BAA6B,GAAG,KAAK,CAAA;AAC3C,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAE9B,MAAM,CAAC,MAAM,sBAAsB,GAAG,gBAAgB,CAAA;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAA;AAmFzC;;;;GAIG;AACH,MAAM,OAAO,uBAAuB;IAClB,OAAO,GAAG,IAAI,GAAG,EAA2B,CAAA;IAC5C,SAAS,GAAG,IAAI,GAAG,EAAc,CAAA;IAC1C,KAAK,GAAG,CAAC,CAAA;IACT,OAAO,GAAG,CAAC,CAAA;IACX,YAAY,GAAG,CAAC,CAAA;IACP,MAAM,GAAG,IAAI,GAAG,EAG9B,CAAA;IACK,WAAW,CAA2C;IACtD,MAAM,GAAG,KAAK,CAAA;IAEtB,KAAK,CAAC,KAQL;QACA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAA;QACxB,MAAM,MAAM,GAAG,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,CAAA;QACxC,MAAM,UAAU,GAAG,eAAe,CAAC,KAAK,CAAC,UAAU,EAAE,SAAS,EAAE,6BAA6B,CAAC,CAAA;QAC9F,MAAM,gBAAgB,GAAG,eAAe,CACvC,KAAK,CAAC,QAAQ,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QAE7B,OAAO,SAAS,CAAA;IACjB,OAAO,KAAK,CAAA;AACb,CAAC;AAED,SAAS,aAAa,CAAC,OAAe,EAAE,KAAa;IACpD,MAAM,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;IAC9B,IAAI,MAAM,CAAC,MAAM,IAAI,kBAAkB;QAAE,OAAO,MAAM,CAAA;IACtD,MAAM,MAAM,GAAG,4BAA4B,CAAA;IAC3C,OAAO,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAA;AACpE,CAAC;AAED,SAAS,YAAY,CAAC,KAAc;IACnC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAC9D,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,OAAO,KAAK,YAAY,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,CAAC,CAAA;AAChG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/integrations/subagents/policy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,8BAA8B,QAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../src/integrations/subagents/policy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA"}
|
|
@@ -14,6 +14,19 @@
|
|
|
14
14
|
import { type AuthorizationGateConfig, type LLMProvider, type PathBuilder, type ProjectInstructionContext, type ResumeHandler, type RunEvent, type SandboxProvider, type TaskScheduler, type ToolContext, type ToolDefinition, type ToolRegistryContract } from '@namzu/sdk';
|
|
15
15
|
import { type SubagentActivitySource } from './activity.js';
|
|
16
16
|
export declare const GENERAL_PURPOSE_SUBAGENT = "general-purpose";
|
|
17
|
+
/**
|
|
18
|
+
* A sub-agent that can only look.
|
|
19
|
+
*
|
|
20
|
+
* "Find where X is defined", "which files reference Y", "how does Z work" are
|
|
21
|
+
* the delegations a parent makes most, and every one of them ran with
|
|
22
|
+
* `write`, `edit` and `bash` in the child's roster — so a lookup needed the
|
|
23
|
+
* same approvals as a change, and an operator in `accept-edits` mode was
|
|
24
|
+
* still asked about a child's shell command that only wanted to `cat`. This
|
|
25
|
+
* definition's registry is the parent's working set filtered to tools that
|
|
26
|
+
* declare themselves read-only, so a child that cannot change anything is
|
|
27
|
+
* never asked whether it may.
|
|
28
|
+
*/
|
|
29
|
+
export declare const EXPLORE_SUBAGENT = "explore";
|
|
17
30
|
export interface SubagentRuntimeOptions {
|
|
18
31
|
readonly cwd: string;
|
|
19
32
|
readonly model: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/integrations/subagents/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAMN,KAAK,uBAAuB,EAQ5B,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAG9B,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,eAAe,EAGpB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/integrations/subagents/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAMN,KAAK,uBAAuB,EAQ5B,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAG9B,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,eAAe,EAGpB,KAAK,aAAa,EA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