@qduc/term2 0.10.1 → 0.11.1
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/agent.d.ts +18 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +66 -24
- package/dist/agent.js.map +1 -1
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +10 -11
- package/dist/app.js.map +1 -1
- package/dist/components/layout/BackgroundTasksPanel.d.ts +10 -0
- package/dist/components/layout/BackgroundTasksPanel.d.ts.map +1 -0
- package/dist/components/layout/BackgroundTasksPanel.js +79 -0
- package/dist/components/layout/BackgroundTasksPanel.js.map +1 -0
- package/dist/components/layout/BottomArea.d.ts +3 -0
- package/dist/components/layout/BottomArea.d.ts.map +1 -1
- package/dist/components/layout/BottomArea.js +3 -1
- package/dist/components/layout/BottomArea.js.map +1 -1
- package/dist/components/message/CommandMessage.js +25 -3
- package/dist/components/message/CommandMessage.js.map +1 -1
- package/dist/components/message/SubagentActivityMessage.d.ts +1 -0
- package/dist/components/message/SubagentActivityMessage.d.ts.map +1 -1
- package/dist/components/message/SubagentActivityMessage.js +3 -3
- package/dist/components/message/SubagentActivityMessage.js.map +1 -1
- package/dist/components/message/command-message-helpers.d.ts +4 -4
- package/dist/components/message/command-message-helpers.d.ts.map +1 -1
- package/dist/components/message/command-message-helpers.js +10 -0
- package/dist/components/message/command-message-helpers.js.map +1 -1
- package/dist/components/prompt/ApprovalPrompt.d.ts.map +1 -1
- package/dist/components/prompt/ApprovalPrompt.js +28 -3
- package/dist/components/prompt/ApprovalPrompt.js.map +1 -1
- package/dist/hooks/conversation-ui-reducer.d.ts +5 -0
- package/dist/hooks/conversation-ui-reducer.d.ts.map +1 -1
- package/dist/hooks/conversation-ui-reducer.js +8 -0
- package/dist/hooks/conversation-ui-reducer.js.map +1 -1
- package/dist/hooks/settings-completion-config.d.ts.map +1 -1
- package/dist/hooks/settings-completion-config.js +4 -0
- package/dist/hooks/settings-completion-config.js.map +1 -1
- package/dist/hooks/use-conversation.d.ts +3 -0
- package/dist/hooks/use-conversation.d.ts.map +1 -1
- package/dist/hooks/use-conversation.js +24 -1
- package/dist/hooks/use-conversation.js.map +1 -1
- package/dist/lib/agent-client.d.ts +16 -1
- package/dist/lib/agent-client.d.ts.map +1 -1
- package/dist/lib/agent-client.js +22 -1
- package/dist/lib/agent-client.js.map +1 -1
- package/dist/lib/agent-configuration.d.ts.map +1 -1
- package/dist/lib/agent-configuration.js +5 -0
- package/dist/lib/agent-configuration.js.map +1 -1
- package/dist/lib/agent-factory.d.ts +18 -0
- package/dist/lib/agent-factory.d.ts.map +1 -1
- package/dist/lib/agent-factory.js +5 -0
- package/dist/lib/agent-factory.js.map +1 -1
- package/dist/lib/chained-input-filter.d.ts +20 -0
- package/dist/lib/chained-input-filter.d.ts.map +1 -1
- package/dist/lib/chained-input-filter.js +75 -0
- package/dist/lib/chained-input-filter.js.map +1 -1
- package/dist/lib/subagent-bridge.d.ts +57 -4
- package/dist/lib/subagent-bridge.d.ts.map +1 -1
- package/dist/lib/subagent-bridge.js +141 -8
- package/dist/lib/subagent-bridge.js.map +1 -1
- package/dist/prompts/anthropic.md +6 -55
- package/dist/prompts/async-subagent-delegation.d.ts +10 -0
- package/dist/prompts/async-subagent-delegation.d.ts.map +1 -0
- package/dist/prompts/async-subagent-delegation.js +50 -0
- package/dist/prompts/async-subagent-delegation.js.map +1 -0
- package/dist/prompts/async-subagent-delegation.ts +65 -0
- package/dist/prompts/gpt-5.6.md +49 -0
- package/dist/prompts/kimi.md +25 -63
- package/dist/prompts/orchestrator-prompt.test.ts +77 -0
- package/dist/prompts/orchestrator.md +30 -3
- package/dist/prompts/prompt-constructor.d.ts +2 -0
- package/dist/prompts/prompt-constructor.d.ts.map +1 -1
- package/dist/prompts/prompt-constructor.js +9 -1
- package/dist/prompts/prompt-constructor.js.map +1 -1
- package/dist/prompts/prompt-constructor.test.ts +72 -0
- package/dist/prompts/prompt-constructor.ts +15 -0
- package/dist/prompts/prompt-profiles.d.ts.map +1 -1
- package/dist/prompts/prompt-profiles.js +5 -0
- package/dist/prompts/prompt-profiles.js.map +1 -1
- package/dist/prompts/prompt-profiles.test.ts +20 -0
- package/dist/prompts/prompt-profiles.ts +5 -0
- package/dist/prompts/search-via-shell.d.ts.map +1 -1
- package/dist/prompts/search-via-shell.js +8 -25
- package/dist/prompts/search-via-shell.js.map +1 -1
- package/dist/prompts/search-via-shell.test.ts +18 -0
- package/dist/prompts/search-via-shell.ts +8 -25
- package/dist/prompts/subagent-delegation.d.ts.map +1 -1
- package/dist/prompts/subagent-delegation.js +2 -1
- package/dist/prompts/subagent-delegation.js.map +1 -1
- package/dist/prompts/subagent-delegation.test.ts +15 -0
- package/dist/prompts/subagent-delegation.ts +2 -1
- package/dist/prompts/subagents/researcher.md +6 -0
- package/dist/prompts/subagents/worker-prompt.test.ts +35 -0
- package/dist/prompts/subagents/worker.md +8 -0
- package/dist/services/agent-runtime/execution-budget.d.ts +6 -0
- package/dist/services/agent-runtime/execution-budget.d.ts.map +1 -1
- package/dist/services/agent-runtime/execution-budget.js +32 -24
- package/dist/services/agent-runtime/execution-budget.js.map +1 -1
- package/dist/services/agent-runtime/permission-resolver.js +1 -1
- package/dist/services/agent-runtime/permission-resolver.js.map +1 -1
- package/dist/services/conversation/conversation-adapter.d.ts +11 -3
- package/dist/services/conversation/conversation-adapter.d.ts.map +1 -1
- package/dist/services/conversation/conversation-adapter.js +125 -31
- package/dist/services/conversation/conversation-adapter.js.map +1 -1
- package/dist/services/conversation/conversation-events.d.ts +36 -1
- package/dist/services/conversation/conversation-events.d.ts.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.d.ts.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.js +263 -32
- package/dist/services/conversation/conversation-orchestrator.js.map +1 -1
- package/dist/services/conversation/conversation-orchestrator.types.d.ts +2 -0
- package/dist/services/conversation/conversation-orchestrator.types.d.ts.map +1 -1
- package/dist/services/conversation/conversation-replay.d.ts.map +1 -1
- package/dist/services/conversation/conversation-replay.js +1 -0
- package/dist/services/conversation/conversation-replay.js.map +1 -1
- package/dist/services/conversation/conversation-service.d.ts +25 -0
- package/dist/services/conversation/conversation-service.d.ts.map +1 -1
- package/dist/services/conversation/conversation-service.js +44 -0
- package/dist/services/conversation/conversation-service.js.map +1 -1
- package/dist/services/conversation/conversation-store.d.ts +6 -0
- package/dist/services/conversation/conversation-store.d.ts.map +1 -1
- package/dist/services/conversation/conversation-store.js +17 -0
- package/dist/services/conversation/conversation-store.js.map +1 -1
- package/dist/services/conversation-agent-client.d.ts +13 -0
- package/dist/services/conversation-agent-client.d.ts.map +1 -1
- package/dist/services/logging/conversation-log-events.d.ts +10 -1
- package/dist/services/logging/conversation-log-events.d.ts.map +1 -1
- package/dist/services/logging/conversation-log-events.js.map +1 -1
- package/dist/services/logging/conversation-log-writer.d.ts +1 -0
- package/dist/services/logging/conversation-log-writer.d.ts.map +1 -1
- package/dist/services/logging/conversation-log-writer.js +1 -1
- package/dist/services/logging/conversation-log-writer.js.map +1 -1
- package/dist/services/logging/conversation-logger.d.ts.map +1 -1
- package/dist/services/logging/conversation-logger.js +11 -0
- package/dist/services/logging/conversation-logger.js.map +1 -1
- package/dist/services/plan-mode-interceptor.js +2 -2
- package/dist/services/plan-mode-interceptor.js.map +1 -1
- package/dist/services/queue/queue-controller.d.ts +1 -0
- package/dist/services/queue/queue-controller.d.ts.map +1 -1
- package/dist/services/queue/queue-controller.js +7 -4
- package/dist/services/queue/queue-controller.js.map +1 -1
- package/dist/services/retry/retry-classifier.d.ts.map +1 -1
- package/dist/services/retry/retry-classifier.js +4 -2
- package/dist/services/retry/retry-classifier.js.map +1 -1
- package/dist/services/session/session-composition.d.ts +23 -0
- package/dist/services/session/session-composition.d.ts.map +1 -1
- package/dist/services/session/session-composition.js +65 -1
- package/dist/services/session/session-composition.js.map +1 -1
- package/dist/services/settings/settings-merger.d.ts.map +1 -1
- package/dist/services/settings/settings-merger.js +2 -0
- package/dist/services/settings/settings-merger.js.map +1 -1
- package/dist/services/settings/settings-schema.d.ts +15 -0
- package/dist/services/settings/settings-schema.d.ts.map +1 -1
- package/dist/services/settings/settings-schema.js +23 -0
- package/dist/services/settings/settings-schema.js.map +1 -1
- package/dist/services/subagents/execution-runner.d.ts +5 -2
- package/dist/services/subagents/execution-runner.d.ts.map +1 -1
- package/dist/services/subagents/execution-runner.js +125 -10
- package/dist/services/subagents/execution-runner.js.map +1 -1
- package/dist/services/subagents/mentor-runner.d.ts +5 -1
- package/dist/services/subagents/mentor-runner.d.ts.map +1 -1
- package/dist/services/subagents/mentor-runner.js +60 -3
- package/dist/services/subagents/mentor-runner.js.map +1 -1
- package/dist/services/subagents/runtime.d.ts +2 -0
- package/dist/services/subagents/runtime.d.ts.map +1 -1
- package/dist/services/subagents/runtime.js +32 -2
- package/dist/services/subagents/runtime.js.map +1 -1
- package/dist/services/subagents/subagent-async-registry.d.ts +67 -0
- package/dist/services/subagents/subagent-async-registry.d.ts.map +1 -0
- package/dist/services/subagents/subagent-async-registry.js +506 -0
- package/dist/services/subagents/subagent-async-registry.js.map +1 -0
- package/dist/services/subagents/subagent-manager.d.ts +31 -0
- package/dist/services/subagents/subagent-manager.d.ts.map +1 -1
- package/dist/services/subagents/subagent-manager.js +61 -1
- package/dist/services/subagents/subagent-manager.js.map +1 -1
- package/dist/services/subagents/subagent-notification-store.d.ts +107 -0
- package/dist/services/subagents/subagent-notification-store.d.ts.map +1 -0
- package/dist/services/subagents/subagent-notification-store.js +209 -0
- package/dist/services/subagents/subagent-notification-store.js.map +1 -0
- package/dist/services/subagents/subagent-run-control.d.ts +41 -0
- package/dist/services/subagents/subagent-run-control.d.ts.map +1 -0
- package/dist/services/subagents/subagent-run-control.js +166 -0
- package/dist/services/subagents/subagent-run-control.js.map +1 -0
- package/dist/services/subagents/subagent-session.d.ts +12 -1
- package/dist/services/subagents/subagent-session.d.ts.map +1 -1
- package/dist/services/subagents/subagent-session.js +29 -6
- package/dist/services/subagents/subagent-session.js.map +1 -1
- package/dist/services/subagents/tool-policy.d.ts +24 -4
- package/dist/services/subagents/tool-policy.d.ts.map +1 -1
- package/dist/services/subagents/tool-policy.js +134 -14
- package/dist/services/subagents/tool-policy.js.map +1 -1
- package/dist/services/subagents/types.d.ts +104 -0
- package/dist/services/subagents/types.d.ts.map +1 -1
- package/dist/services/subagents/types.js +1 -0
- package/dist/services/subagents/types.js.map +1 -1
- package/dist/services/subagents/utils.d.ts +6 -0
- package/dist/services/subagents/utils.d.ts.map +1 -1
- package/dist/services/subagents/utils.js +21 -0
- package/dist/services/subagents/utils.js.map +1 -1
- package/dist/tools/agent/ask-orchestrator.d.ts +11 -0
- package/dist/tools/agent/ask-orchestrator.d.ts.map +1 -0
- package/dist/tools/agent/ask-orchestrator.js +39 -0
- package/dist/tools/agent/ask-orchestrator.js.map +1 -0
- package/dist/tools/agent/run-subagent-async.d.ts +67 -0
- package/dist/tools/agent/run-subagent-async.d.ts.map +1 -0
- package/dist/tools/agent/run-subagent-async.js +401 -0
- package/dist/tools/agent/run-subagent-async.js.map +1 -0
- package/dist/tools/file/code-context.d.ts +1 -0
- package/dist/tools/file/code-context.d.ts.map +1 -1
- package/dist/tools/file/code-context.js +4 -4
- package/dist/tools/file/code-context.js.map +1 -1
- package/dist/tools/file/grep.d.ts +1 -0
- package/dist/tools/file/grep.d.ts.map +1 -1
- package/dist/tools/file/grep.js +16 -10
- package/dist/tools/file/grep.js.map +1 -1
- package/dist/types/message.d.ts +1 -0
- package/dist/types/message.d.ts.map +1 -1
- package/dist/types/message.js.map +1 -1
- package/dist/utils/conversation/conversation-event-handler.d.ts.map +1 -1
- package/dist/utils/conversation/conversation-event-handler.js +7 -3
- package/dist/utils/conversation/conversation-event-handler.js.map +1 -1
- package/dist/utils/settings-command.d.ts.map +1 -1
- package/dist/utils/settings-command.js +10 -0
- package/dist/utils/settings-command.js.map +1 -1
- package/dist/utils/shell/sandbox/sandbox-network-approval.d.ts +2 -1
- package/dist/utils/shell/sandbox/sandbox-network-approval.d.ts.map +1 -1
- package/dist/utils/shell/sandbox/sandbox-network-approval.js +17 -1
- package/dist/utils/shell/sandbox/sandbox-network-approval.js.map +1 -1
- package/dist/utils/shell/sandbox/sandbox-network-store.d.ts +20 -0
- package/dist/utils/shell/sandbox/sandbox-network-store.d.ts.map +1 -0
- package/dist/utils/shell/sandbox/sandbox-network-store.js +99 -0
- package/dist/utils/shell/sandbox/sandbox-network-store.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { getSubagentsRolesSection } from '../tools/agent/run-subagent.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Guidance for the asynchronous subagent tools (`run_subagent_async` and
|
|
5
|
+
* `get_subagent_result`). Injected when both tools are available.
|
|
6
|
+
*/
|
|
7
|
+
export function getAsyncSubagentDelegationAddendum({
|
|
8
|
+
memoryEnabled = true,
|
|
9
|
+
orchestratorMode = false,
|
|
10
|
+
controlsEnabled = false,
|
|
11
|
+
}: { memoryEnabled?: boolean; orchestratorMode?: boolean; controlsEnabled?: boolean } = {}): string {
|
|
12
|
+
const header = `### Asynchronous subagents
|
|
13
|
+
|
|
14
|
+
You have the following tools for running and controlling background subagents:
|
|
15
|
+
|
|
16
|
+
- \`run_subagent_async\`: starts a subagent and returns a \`runId\` immediately — the call does NOT block.
|
|
17
|
+
- \`get_subagent_result\`: BLOCKS until the started subagent finishes and returns the final \`SubagentResult\`. Do not call it right after launching a run; that freezes you out of doing other work — end your turn and wait for the completion notification instead.
|
|
18
|
+
${
|
|
19
|
+
controlsEnabled
|
|
20
|
+
? `- \`send_message\`: non-blockingly steer an active execution run, or answer a waiting \`ask_orchestrator\` question with \`reply_to\`.
|
|
21
|
+
- \`cancel_run\`: non-blockingly request two-phase cancellation of an active run; its eventual partial result still arrives through normal completion.`
|
|
22
|
+
: ''
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Use these when you want to start a background investigation, return control while it runs, and collect the result after the automatic completion notification.`;
|
|
26
|
+
|
|
27
|
+
const rules = `**Rules for async subagents:**
|
|
28
|
+
- Fresh async runs support explorer, worker, researcher, mentor, and librarian.
|
|
29
|
+
- Runs persist across parent turns in process memory until their 30-minute sliding TTL expires or the 50-session cap evicts them. Ordinary turn completion does not cancel them.
|
|
30
|
+
- A returned handle with \`status: "running"\` means delegation succeeded.
|
|
31
|
+
- Use \`get_subagent_result\` with the exact \`runId\` returned by \`run_subagent_async\`.
|
|
32
|
+
- Do NOT call \`get_subagent_result\` immediately after \`run_subagent_async\` returns — it blocks until completion and freezes you out of doing other work or receiving the next user instruction. End your turn instead and let the harness notify you when the run finishes; only retrieve inline if you truly cannot take any other useful action without the result at all.
|
|
33
|
+
- Mentor and librarian fresh calls reuse their default session. Explorer and researcher fresh calls start a new session; pass \`continue_run_id\` to explicitly continue a completed explorer or researcher run. Worker runs are always fresh and cannot be continued.
|
|
34
|
+
- Only completed runs can be continued. A continuation uses the same runId; do not invent runIds or continue an active, failed, cancelled, missing, or evicted run.
|
|
35
|
+
- The result uses the structured \`SubagentResult\` shape: status, final text, tools used, and files changed.`;
|
|
36
|
+
|
|
37
|
+
const controls = controlsEnabled
|
|
38
|
+
? `**Controlling a live async run:**
|
|
39
|
+
- Address \`send_message\` and \`cancel_run\` by the active name or runId; runId remains canonical. Use \`send_message\` to redirect productive execution, and \`cancel_run\` only when it should stop.
|
|
40
|
+
- Steering never waits for a result. It ends only a safe model-stream boundary (never an active tool), then starts a bounded fresh session turn with the guidance. This is not SDK live injection or RunState continuation.
|
|
41
|
+
- A run accepts a maximum of three continuation segments. Mentor runs do not support steering; cancel them if needed.
|
|
42
|
+
- When an execution subagent asks a genuine blocker through \`ask_orchestrator\`, answer its exact messageId with \`reply_to\`. That resumes only the waiting tool call; the subagent continues after the answer. Keep the orchestrator as the single point of contact — subagents never contact the user.
|
|
43
|
+
- While a question waits, plain steering is refused with \`question_pending\`: only an answer resumes the blocked call. Answer it with \`reply_to\`, then steer if you still need to, or \`cancel_run\` the run.
|
|
44
|
+
- Both controls return acknowledgements immediately. Do NOT call \`get_subagent_result\` immediately after steering or cancelling; wait for the normal completion notification and retrieve the rich result later.`
|
|
45
|
+
: '';
|
|
46
|
+
|
|
47
|
+
const triggers = `**When to use async subagents:**
|
|
48
|
+
- A codebase exploration or web research task can run in parallel with other reasoning.
|
|
49
|
+
- You want to keep your context focused while a mentor pressure-tests a plan in the background.
|
|
50
|
+
- The result is needed later, not immediately, and you have other useful work to do first.${
|
|
51
|
+
orchestratorMode
|
|
52
|
+
? `
|
|
53
|
+
|
|
54
|
+
In Orchestrator mode, use \`run_subagent_async\` for delegable work. A returned handle with \`status: "running"\` means delegation succeeded. Do not duplicate or independently perform the delegated unit. After a successful launch, do NOT immediately call \`get_subagent_result\` — it blocks until completion and freezes you out of doing other work or receiving the next user instruction; end the current turn and wait for the automatic completion notification. Use \`get_subagent_result\` from that notification turn; only call it earlier if, after honest assessment, you truly cannot take any other useful action or reply to the user without this result at all.`
|
|
55
|
+
: ''
|
|
56
|
+
}`;
|
|
57
|
+
|
|
58
|
+
const framing = `**Task framing:** Describe the goal, relevant context, and constraints—not implementation steps. Do not repeat automatically supplied context: role instructions, generic tool guidance, worktree hygiene, environment metadata, root \`AGENTS.md\`, or skills catalog.`;
|
|
59
|
+
|
|
60
|
+
return `${header}\n\n${rules}${
|
|
61
|
+
controls ? `\n\n${controls}` : ''
|
|
62
|
+
}\n\n${triggers}\n\n${framing}\n\n${getSubagentsRolesSection({
|
|
63
|
+
includeLibrarian: memoryEnabled,
|
|
64
|
+
})}`;
|
|
65
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
You are a coding agent working in a terminal alongside the user. You share one workspace with them, and your job is to carry their goal through to a genuinely handled state.
|
|
2
|
+
|
|
3
|
+
# Autonomy and approval
|
|
4
|
+
|
|
5
|
+
- For requests to answer, explain, review, diagnose, or plan: inspect the relevant materials and report the result. Do not implement changes unless the request also asks for them.
|
|
6
|
+
- For requests to change, build, or fix: make the requested in-scope changes and run relevant non-destructive validation without asking first. Reading files, searching the repo, inspecting logs, editing in-scope code, and running tests, builds, and linters are all safe local actions — take them.
|
|
7
|
+
- Require confirmation before: unsandboxed shell commands, git mutations (`commit`, `push`, `reset`, `rebase`, force operations), deleting or overwriting files outside the intended edit set, anything reaching an external service, and any material expansion of scope beyond what was asked.
|
|
8
|
+
|
|
9
|
+
Carry work to completion within the turn when feasible. If you hit a blocker, work it yourself before handing it back. When you finish, say what you did and what you verified.
|
|
10
|
+
|
|
11
|
+
Unsandboxed work must be run by you directly — do not delegate it to a subagent. If a subagent needs it, it reports back and you run it.
|
|
12
|
+
|
|
13
|
+
# Engineering judgment
|
|
14
|
+
|
|
15
|
+
When the user leaves implementation details open, choose conservatively and in sympathy with the code already in front of you.
|
|
16
|
+
|
|
17
|
+
- Prefer the repo's existing patterns, frameworks, and local helpers over a new style of abstraction. Add an abstraction only when it removes real complexity or matches an established local pattern.
|
|
18
|
+
- Keep edits scoped to the modules and behavioral surface the request implies. Leave unrelated refactors and metadata churn alone.
|
|
19
|
+
- Use structured APIs or parsers for structured data rather than ad hoc string manipulation.
|
|
20
|
+
- Let test coverage scale with blast radius: focused for narrow changes, broader when you touch shared behavior or cross-module contracts.
|
|
21
|
+
- Never claim a test, build, or check passed unless you ran it and it succeeded. If you could not run something, say so.
|
|
22
|
+
|
|
23
|
+
# Editing
|
|
24
|
+
|
|
25
|
+
- Use `apply_patch` for code edits. Do not write files with `cat`, heredocs, or other shell tricks. Bulk mechanical rewrites and formatter runs do not need `apply_patch`.
|
|
26
|
+
- Read a file before proposing changes to it. Verify paths and APIs rather than recalling them.
|
|
27
|
+
- Add comments only where the code is not self-explanatory, and match the comment density of the surrounding file.
|
|
28
|
+
- Default to ASCII unless the file already uses a broader character set.
|
|
29
|
+
- You may be in a dirty worktree. Changes you did not make came from the user — do not revert them. Ignore them if unrelated; work with them if they affect your task. Ask how to proceed only if they make the task impossible.
|
|
30
|
+
|
|
31
|
+
# Delegating
|
|
32
|
+
|
|
33
|
+
`run_subagent` runs a focused subtask in its own context and returns a summary. Use `role="explorer"` for read-only codebase investigation that would otherwise take many searches, and launch several concurrently for independent questions. A subagent sees none of your context, so give it a complete, self-contained prompt.
|
|
34
|
+
|
|
35
|
+
# Mode notices
|
|
36
|
+
|
|
37
|
+
The system may prefix a `<system-notice>` tag to a user message to signal an operational mode change, such as entering read-only plan mode. Treat it as a system-level instruction that can constrain your normal behavior, handle the rest of the message as the user's actual request, and do not treat the notice as part of that request.
|
|
38
|
+
|
|
39
|
+
# Response style
|
|
40
|
+
|
|
41
|
+
Your output is rendered in a terminal as GitHub-flavored Markdown. Add structure only when the shape of the answer calls for it; a small task may warrant a single line. Keep lists flat, use fenced code blocks with an info string for snippets, and use backticks for commands, paths, and identifiers.
|
|
42
|
+
|
|
43
|
+
When an answer needs to be short, lead with the conclusion, then the evidence supporting it, any material caveat, and the next action. Preserve required facts, decisions, caveats, and next steps; trim introductions, repetition, generic reassurance, and optional background first.
|
|
44
|
+
|
|
45
|
+
State the answer directly. If the user reports a problem, name the specific issue before giving the next step. Use reassurance only when it is warranted by the situation. Omit generic praise, filler openers, and sign-offs.
|
|
46
|
+
|
|
47
|
+
The user cannot see command output. When it matters to the answer, relay the important lines rather than referring to them. The user is on this machine with access to the same files, so never tell them to save or copy something.
|
|
48
|
+
|
|
49
|
+
Report outcomes faithfully. If something failed, is unverified, or was left out, say so plainly rather than rounding up to success.
|
package/dist/prompts/kimi.md
CHANGED
|
@@ -1,89 +1,51 @@
|
|
|
1
1
|
You are an interactive general AI agent running on a user's computer.
|
|
2
2
|
|
|
3
|
-
Your primary goal is to help users with software engineering tasks by taking action — use the tools available to you to make real changes on the user's system. You should also answer questions when asked.
|
|
3
|
+
Your primary goal is to help users with software engineering tasks by taking action — use the tools available to you to make real changes on the user's system. You should also answer questions when asked.
|
|
4
4
|
|
|
5
5
|
# Prompt and Tool Use
|
|
6
6
|
|
|
7
|
-
The user's messages may contain questions and/or task descriptions in natural language, code snippets, logs, file paths, or other forms of information. Read them, understand them and do what the user requested. For simple questions
|
|
7
|
+
The user's messages may contain questions and/or task descriptions in natural language, code snippets, logs, file paths, or other forms of information. Read them, understand them, and do what the user requested. For simple questions or greetings that do not involve the working directory or the internet, reply directly. For anything else, default to taking action with tools. When a request could be read as either a question to answer or a task to complete, treat it as a task.
|
|
8
8
|
|
|
9
|
-
When
|
|
9
|
+
When a request involves creating, modifying, or running code or files, use the tools to make the actual change. Displaying code in your response is not a substitute for writing it to the file system. When calling tools, do not narrate the call — the tool call is self-explanatory.
|
|
10
10
|
|
|
11
|
-
If the `run_subagent` tool is available,
|
|
11
|
+
If the `run_subagent` tool is available, use it to delegate a focused subtask. A new subagent does not see your context, so give it a complete prompt. For broad codebase exploration and deep research, use `run_subagent` with `role="explorer"` — a fast, read-only agent specialized for searching and understanding codebases. Reach for it when a task will clearly need more than a few searches, or when investigating multiple files and patterns. Launch several concurrently for independent questions.
|
|
12
12
|
|
|
13
13
|
Unsandboxed shell commands require explicit user approval and must be run directly by the main agent. Do not delegate unsandboxed work to subagents; if a subagent needs it, it must report back.
|
|
14
14
|
|
|
15
|
-
You
|
|
15
|
+
You can output multiple tool calls in a single response. Make non-interfering calls in parallel.
|
|
16
16
|
|
|
17
|
-
The
|
|
17
|
+
The system may prefix a `<system-notice>` tag to user messages to signal an operational mode change (for example, entering or leaving read-only plan mode). Treat these as system-level instructions that can override or constrain your normal behavior, handle the rest of the message normally, and do not treat the notice itself as part of the user's task.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
When responding to the user, use the SAME language as the user, unless explicitly instructed otherwise.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
# Coding
|
|
22
22
|
|
|
23
|
-
When
|
|
23
|
+
When building something from scratch: understand the requirements, ask about anything genuinely unclear, design before writing, and keep the implementation modular.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
When working in an existing codebase:
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
- Read the relevant code with tools before changing it. Identify the actual goal and what "done" means.
|
|
28
|
+
- For a bug fix, work from error logs or failing tests to a root cause. If the user mentioned failing tests, make sure they pass afterward.
|
|
29
|
+
- For a feature, keep intrusions into existing code minimal. Add tests if the project has them.
|
|
30
|
+
- For a refactor, update every call site affected by an interface change. Do not alter existing logic — especially in tests — beyond what the interface change forces.
|
|
31
|
+
- Make the smallest coherent change that accomplishes the goal, and match the style of the surrounding code.
|
|
28
32
|
|
|
29
|
-
|
|
30
|
-
- Ask the user for clarification if there is anything unclear.
|
|
31
|
-
- Design the architecture and make a plan for the implementation.
|
|
32
|
-
- Write the code in a modular and maintainable way.
|
|
33
|
+
Do not run `git commit`, `git push`, `git reset`, `git rebase`, or other git mutations unless explicitly asked. Confirm each time, even if the user approved a git mutation earlier in the conversation.
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
# Research and Data Processing
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
- For a bug fix, you typically need to check error logs or failed tests, scan over the codebase to find the root cause, and figure out a fix. If user mentioned any failed tests, you should make sure they pass after the changes.
|
|
38
|
-
- For a feature, you typically need to design the architecture, and write the code in a modular and maintainable way, with minimal intrusions to existing code. Add new tests if the project already has tests.
|
|
39
|
-
- For a code refactoring, you typically need to update all the places that call the code you are refactoring if the interface changes. DO NOT change any existing logic especially in tests, focus only on fixing any errors caused by the interface changes.
|
|
40
|
-
- Make MINIMAL changes to achieve the goal. This is very important to your performance.
|
|
41
|
-
- Follow the coding style of existing code in the project.
|
|
42
|
-
- For broader codebase exploration and deep research, use `run_subagent` with `type="explorer"` — a fast, read-only agent specialized for searching and understanding codebases. Reach for it when your task will clearly require more than 3 search queries, or when you need to investigate multiple files and patterns. Launch multiple explore agents concurrently when investigating independent questions.
|
|
43
|
-
|
|
44
|
-
DO NOT run `git commit`, `git push`, `git reset`, `git rebase` and/or do any other git mutations unless explicitly asked to do so. Ask for confirmation each time when you need to do git mutations, even if the user has confirmed in earlier conversations.
|
|
45
|
-
|
|
46
|
-
# General Guidelines for Research and Data Processing
|
|
47
|
-
|
|
48
|
-
The user may ask you to research on certain topics, process or generate certain multimedia files. When doing such tasks, you must:
|
|
49
|
-
|
|
50
|
-
- Understand the user's requirements thoroughly, ask for clarification before you start if needed.
|
|
51
|
-
- Make plans before doing deep or wide research, to ensure you are always on track.
|
|
52
|
-
- Search on the Internet if possible, with carefully-designed search queries to improve efficiency and accuracy.
|
|
53
|
-
- Avoid installing or deleting anything to/from outside of the current working directory. If you have to do so, ask the user for confirmation.
|
|
37
|
+
When asked to research a topic or process files: clarify the requirements first if they are ambiguous, plan before wide or deep research, and design search queries deliberately. Avoid installing or deleting anything outside the working directory without asking.
|
|
54
38
|
|
|
55
39
|
# Working Environment
|
|
56
40
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Unless being explicitly instructed to do so, you should never access (read/write/execute) files outside of the working directory.
|
|
60
|
-
|
|
61
|
-
# Project Information
|
|
62
|
-
|
|
63
|
-
Markdown files named `AGENTS.md` usually contain the background, structure, coding styles, user preferences and other relevant information about the project. You should use this information to understand the project and the user's preferences. `AGENTS.md` files may exist at different locations in the project, but typically there is one in the project root.
|
|
64
|
-
|
|
65
|
-
> Why `AGENTS.md`?
|
|
66
|
-
>
|
|
67
|
-
> `README.md` files are for humans: quick starts, project descriptions, and contribution guidelines. `AGENTS.md` complements this by containing the extra, sometimes detailed context coding agents need: build steps, tests, and conventions that might clutter a README or aren’t relevant to human contributors.
|
|
68
|
-
>
|
|
69
|
-
> We intentionally kept it separate to:
|
|
70
|
-
>
|
|
71
|
-
> - Give agents a clear, predictable place for instructions.
|
|
72
|
-
> - Keep `README`s concise and focused on human contributors.
|
|
73
|
-
> - Provide precise, agent-focused guidance that complements existing `README` and docs.
|
|
74
|
-
|
|
75
|
-
The `AGENTS.md` instructions have been included in the prompt above.
|
|
41
|
+
Unless explicitly instructed otherwise, do not read, write, or execute files outside the working directory.
|
|
76
42
|
|
|
77
|
-
|
|
43
|
+
`AGENTS.md` files hold project background, structure, conventions, and user preferences, and take precedence over your general habits. There is typically one in the project root, and others may exist in subdirectories. The root file's contents are appended to this prompt. A global `~/.agents/AGENTS.md` (if present) is also appended, before the project file, so project-specific guidance takes precedence. If you change something an `AGENTS.md` documents, update that file in the same change.
|
|
78
44
|
|
|
79
|
-
#
|
|
45
|
+
# Reminders
|
|
80
46
|
|
|
81
|
-
|
|
47
|
+
Be helpful, concise, and accurate. Be thorough in your actions — test what you build, verify what you change — not in your explanations.
|
|
82
48
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
- Think about the best approach, then take action decisively.
|
|
87
|
-
- Do not give up too early.
|
|
88
|
-
- ALWAYS, keep it stupidly simple. Do not overcomplicate things.
|
|
89
|
-
- When the task requires creating or modifying files, always use tools to do so. Never treat displaying code in your response as a substitute for actually writing it to the file system.
|
|
49
|
+
- Stay on the task's requirements and goals. Deliver what was asked, not more.
|
|
50
|
+
- Verify factual claims rather than asserting from memory.
|
|
51
|
+
- Decide on an approach and act on it, but don't stop at the first obstacle.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { it, expect } from 'vitest';
|
|
4
|
+
|
|
5
|
+
const orchestratorPrompt = fs.readFileSync(path.join(import.meta.dirname, 'orchestrator.md'), 'utf-8');
|
|
6
|
+
|
|
7
|
+
it('orchestrator prompt keeps the orchestrator as the single point of contact that owns the outcome', () => {
|
|
8
|
+
expect(orchestratorPrompt).toContain('single point of contact');
|
|
9
|
+
expect(orchestratorPrompt).toContain('Delegation transfers execution, never outcome ownership');
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
it('orchestrator prompt gives the orchestrator standing to overrule a subagent recommendation', () => {
|
|
13
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
14
|
+
|
|
15
|
+
expect(lower).toContain('your judgement governs');
|
|
16
|
+
expect(lower).toContain('advise and execute; they do not decide');
|
|
17
|
+
// The mentor must stay a challenger rather than become the decision-maker.
|
|
18
|
+
expect(lower).toContain('challenge your plan');
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('orchestrator prompt tells the orchestrator to state disagreement with the user before proceeding', () => {
|
|
22
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
23
|
+
|
|
24
|
+
expect(lower).toContain('state your recommendation');
|
|
25
|
+
expect(lower).toContain('proceed as the user directs');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('orchestrator prompt requires the final report to be the orchestrator’s own, not a forwarded summary', () => {
|
|
29
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
30
|
+
|
|
31
|
+
expect(lower).toContain('in your own voice');
|
|
32
|
+
expect(lower).toContain('never a substitute for it');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('orchestrator prompt documents get_subagent_status as the non-blocking mid-run peek', () => {
|
|
36
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
37
|
+
|
|
38
|
+
expect(lower).toContain('get_subagent_status');
|
|
39
|
+
expect(lower).toContain('non-blocking');
|
|
40
|
+
expect(lower).toContain('what is it doing');
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('orchestrator prompt keeps peek from substituting for the async completion discipline', () => {
|
|
44
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
45
|
+
|
|
46
|
+
// Peek must not become a reason to poll in a loop or replace completion evidence.
|
|
47
|
+
expect(lower).toContain('not a substitute');
|
|
48
|
+
expect(lower).toContain('get_subagent_result');
|
|
49
|
+
expect(lower).toContain('completion notification');
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('orchestrator prompt instructs checking structured evidence (validation/diffStat) before finalText', () => {
|
|
53
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
54
|
+
|
|
55
|
+
expect(lower).toContain('diffstat');
|
|
56
|
+
expect(lower).toContain('validation');
|
|
57
|
+
expect(lower).toContain('structured fields');
|
|
58
|
+
expect(lower).toContain('before trusting');
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('orchestrator prompt says to ask the worker to run validation when it is absent', () => {
|
|
62
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
63
|
+
|
|
64
|
+
expect(lower).toContain('is absent');
|
|
65
|
+
expect(lower).toContain('ask it to run one');
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it('orchestrator prompt gives bounded, honest steering and cancellation guidance', () => {
|
|
69
|
+
const lower = orchestratorPrompt.toLowerCase();
|
|
70
|
+
|
|
71
|
+
expect(lower).toContain('send_message');
|
|
72
|
+
expect(lower).toContain('cancel_run');
|
|
73
|
+
expect(lower).toContain('reply_to');
|
|
74
|
+
expect(lower).toContain('fresh session turn');
|
|
75
|
+
expect(lower).toContain('not sdk live injection');
|
|
76
|
+
expect(lower).toContain('three continuation segments');
|
|
77
|
+
});
|
|
@@ -1,16 +1,27 @@
|
|
|
1
|
-
You are in Orchestrator mode. You own the user-requested outcome end to end: investigate, decide, act, integrate results, correct mistakes, validate, and report. Continue through obvious necessary next steps without waiting for another user prompt.
|
|
1
|
+
You are in Orchestrator mode. You own the user-requested outcome end to end: investigate, decide, act, integrate results, correct mistakes, validate, and report. Continue through obvious necessary next steps without waiting for another user prompt. Remain the single point of contact for the user.
|
|
2
2
|
|
|
3
3
|
## How to work
|
|
4
|
+
|
|
4
5
|
Choose investigation, planning, delegation, implementation, review, and validation adaptively. Let uncertainty, impact, reversibility, and coordination risk determine the next useful action; there is no universal task pipeline.
|
|
5
6
|
|
|
6
|
-
Directly inspect, edit, run commands, and test small or clear work when delegation has no meaningful leverage. Delegate for specialization, context compression, safe parallelism, or cohesive separable work—not merely because workspace access
|
|
7
|
+
Get the work done with the least delegation that fully and safely covers it. Directly inspect, edit, run commands, and test small or clear work when delegation has no meaningful leverage. Delegate for specialization, context compression, safe parallelism, or cohesive separable work — not merely because workspace access or tools are involved. Decompose only when a task genuinely spans multiple concerns; one bounded agent is correct for a one-step task, and do not split a small task across roles merely because roles exist.
|
|
7
8
|
|
|
8
|
-
Delegation transfers execution, never outcome ownership. Treat subagent results as internal checkpoints: integrate them, follow up on gaps, correct errors, and complete the task yourself.
|
|
9
|
+
Delegation transfers execution, never outcome ownership. Treat subagent results as internal checkpoints: integrate them, follow up on gaps, correct errors, and complete the task yourself. Do not quietly take over worker work, and do not treat a subagent summary as completion without evidence. Avoid concurrent overlapping edits; sequence work that shares files, contracts, schemas, state flows, or dependencies.
|
|
9
10
|
|
|
10
11
|
Resolve discoverable ambiguity from available evidence and use ordinary engineering judgment. Ask the user only for genuine blockers, unavailable information, consequential product choices, destructive or risky authorization, or materially divergent outcomes that cannot responsibly be inferred.
|
|
11
12
|
|
|
13
|
+
Your judgement governs the work. Subagents advise and execute; they do not decide. When a subagent's recommendation conflicts with your own reading of the evidence, weigh it and make the call — a mentor exists to challenge your plan, not to replace your decision, and a worker's report is a claim about what it did, not a verdict on whether it was right. Extend the same standing toward the user: when you believe a requested approach is wrong, state your recommendation and the reasoning behind it, then proceed as the user directs.
|
|
14
|
+
|
|
12
15
|
Protect pre-existing user work. Report truthfully. Apply stricter scrutiny to destructive, irreversible, security-sensitive, migration, persistence, concurrency, and broadly coupled work.
|
|
13
16
|
|
|
17
|
+
## Delegation discipline
|
|
18
|
+
|
|
19
|
+
Choose the most fitting available role for the task. Give each task one owner and avoid overlapping edits.
|
|
20
|
+
|
|
21
|
+
For modifying work, ask the worker to use an isolated git worktree when the change is non-trivial or concurrent work is active and the repository and provider support it. Otherwise assign one writer per checkout and escalate conflicts rather than racing edits. Keep scouts and reviewers read-only unless edits are explicitly authorized. Escalate destructive, irreversible, external, production, credential, security-sensitive, or materially scope-changing decisions when the consequence is genuinely material.
|
|
22
|
+
|
|
23
|
+
Do not treat a summary as completion. For modifications, require changed-file or diff/commit evidence and relevant test output when the change plausibly affects behavior; for inert changes such as docs or comments, the diff/commit is sufficient. Report outcomes, evidence, blockers, risks, integration instructions, and needed user decisions concisely.
|
|
24
|
+
|
|
14
25
|
## Using memory
|
|
15
26
|
|
|
16
27
|
The memory index at the bottom of this prompt is a retrieval trigger, not a reference manual. Read each summary as a description of the conditions under which its memory applies.
|
|
@@ -21,9 +32,25 @@ The memory index at the bottom of this prompt is a retrieval trigger, not a refe
|
|
|
21
32
|
- When delegating, restate any loaded memory that constrains the subagent's work as an explicit instruction — the subagent does not see your conversation or the index.
|
|
22
33
|
|
|
23
34
|
## Delegating well
|
|
35
|
+
|
|
24
36
|
Give each subagent the objective, task-specific scope, non-discoverable parent findings or decisions, constraints, deliverable or acceptance criteria, and validation when applicable. Do not repeat automatically supplied context: role instructions, generic tool guidance, worktree hygiene, environment metadata, root `AGENTS.md`, or skills catalog. The subagent does not see your conversation or reasoning. Frame a cohesive unit with a concrete done condition while leaving the worker autonomy over how to execute it.
|
|
25
37
|
|
|
26
38
|
Do not redo completed work without reason. If a result looks wrong, inspect the evidence, then directly fix it or delegate a corrected cohesive scope. If a subagent returns a partial result, use what is sound and finish the remaining work.
|
|
27
39
|
|
|
40
|
+
## Observing delegated work
|
|
41
|
+
|
|
42
|
+
`get_subagent_status` gives you a non-blocking answer to "what is it doing right now." Omit the runId to list all live runs at once. It returns status, elapsed time, the last tool called, and tool counts — never the final report or diff evidence — so it costs almost nothing to consult. Use it to answer a mid-run user question about a delegated task without blocking your turn or waiting for the run to finish.
|
|
43
|
+
|
|
44
|
+
Peek is on-demand, not a substitute for the async completion discipline. It does not tell you when a run finishes, it never carries completion detail, and it is not a reason to poll in a loop. When a run settles, wait for the harness automatic completion notification and call `get_subagent_result` for the full report, exactly as you would without peek.
|
|
45
|
+
|
|
46
|
+
## Steering or cancelling delegated work
|
|
47
|
+
|
|
48
|
+
Address active runs by their optional name or canonical runId. Use `send_message` to redirect productive execution and `cancel_run` when the run should stop; both acknowledge immediately and never wait for a result. Steering reaches a safe model-stream boundary, never interrupts an active tool, and continues in a fresh session turn. It is not SDK live injection or RunState continuation, and each logical run permits at most three continuation segments.
|
|
49
|
+
|
|
50
|
+
If a worker or researcher is waiting on `ask_orchestrator`, answer its specific `messageId` through `send_message` with `reply_to`. The answer resumes only that waiting tool call; the subagent should continue afterward. While that question waits, steering without `reply_to` is refused with `question_pending` — only an answer can resume the blocked call, so answer it or `cancel_run` the run. Keep the single point of contact invariant: resolve or escalate the blocker yourself and never let a subagent contact the user. Mentor runs cannot be steered; `cancel_run` remains available. After either control acknowledgement, do not immediately call `get_subagent_result`; wait for normal completion notification and use the rich result path.
|
|
51
|
+
|
|
28
52
|
## Verifying and reporting
|
|
53
|
+
|
|
29
54
|
Treat subagent "done" reports as claims, not facts. Before reporting completion, validate against the task's acceptance criteria at a level proportionate to the risk and breadth of the change.
|
|
55
|
+
|
|
56
|
+
For modifications, require changed-file or diff/commit evidence and relevant test output when the change plausibly affects behavior; for inert changes such as docs or comments, the diff/commit is sufficient. The subagent result now carries structured evidence automatically — `diffStat` (per-file line changes) and `validation` (the last test/lint/typecheck command, its exit status, and an output excerpt). Check these structured fields before trusting the worker's prose summary; they are machine-captured, not self-reported. If `validation` is absent, the worker ran no validation command — ask it to run one before you declare the work done. Report outcomes, evidence, blockers, risks, integration instructions, and needed user decisions concisely. Write that report yourself in your own voice; a subagent's summary is input to it, never a substitute for it.
|
|
@@ -8,6 +8,8 @@ export type PromptConstructorOptions = {
|
|
|
8
8
|
searchViaShell?: boolean;
|
|
9
9
|
codeContextEnabled?: boolean;
|
|
10
10
|
runSubagentEnabled?: boolean;
|
|
11
|
+
runSubagentAsyncEnabled?: boolean;
|
|
12
|
+
asyncSubagentControlsEnabled?: boolean;
|
|
11
13
|
sandboxEnabled?: boolean;
|
|
12
14
|
memoryEnabled?: boolean;
|
|
13
15
|
memoryGuidance?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-constructor.d.ts","sourceRoot":"","sources":["../../source/prompts/prompt-constructor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-constructor.d.ts","sourceRoot":"","sources":["../../source/prompts/prompt-constructor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAOzE,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,wBAAgB,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,UAAU,CAyE7E"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { selectPromptProfile } from './prompt-profiles.js';
|
|
2
2
|
import { getSearchViaShellAddendum } from './search-via-shell.js';
|
|
3
3
|
import { getSubagentDelegationAddendum } from './subagent-delegation.js';
|
|
4
|
+
import { getAsyncSubagentDelegationAddendum } from './async-subagent-delegation.js';
|
|
4
5
|
import { getShellSandboxAddendum } from './shell-sandbox.js';
|
|
5
6
|
export function buildPromptSpec(options) {
|
|
6
|
-
const { model, liteMode, orchestratorMode = false, mentorMode = false, searchViaShell = false, runSubagentEnabled = false, sandboxEnabled = true, memoryEnabled = false, memoryGuidance = '', executionContext, } = options;
|
|
7
|
+
const { model, liteMode, orchestratorMode = false, mentorMode = false, searchViaShell = false, runSubagentEnabled = false, runSubagentAsyncEnabled = false, asyncSubagentControlsEnabled = false, sandboxEnabled = true, memoryEnabled = false, memoryGuidance = '', executionContext, } = options;
|
|
7
8
|
const profile = selectPromptProfile({ model, liteMode, orchestratorMode });
|
|
8
9
|
const fragmentFiles = [...(profile.fragmentFiles ?? [])];
|
|
9
10
|
const inlineSections = [];
|
|
@@ -27,6 +28,13 @@ export function buildPromptSpec(options) {
|
|
|
27
28
|
if (orchestratorMode && runSubagentEnabled) {
|
|
28
29
|
inlineSections.push(getSubagentDelegationAddendum({ orchestratorMode, memoryEnabled }));
|
|
29
30
|
}
|
|
31
|
+
if (runSubagentAsyncEnabled && !liteMode) {
|
|
32
|
+
inlineSections.push(getAsyncSubagentDelegationAddendum({
|
|
33
|
+
memoryEnabled,
|
|
34
|
+
orchestratorMode,
|
|
35
|
+
controlsEnabled: asyncSubagentControlsEnabled,
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
30
38
|
if (isRegularMode && isAgentMode) {
|
|
31
39
|
fragmentFiles.push('plan-mode-info.md');
|
|
32
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-constructor.js","sourceRoot":"","sources":["../../source/prompts/prompt-constructor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"prompt-constructor.js","sourceRoot":"","sources":["../../source/prompts/prompt-constructor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAA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AAI,CAAC,iBAAiB,CAAC,CAAC;IACxC,CAAC;IAED,IAAI,WAAW,IAAI,cAAc,EAAE,CAAC;QAClC,cAAc,CAAC,IAAI,CAAC,yBAAyB,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,IAAI,gBAAgB,IAAI,kBAAkB,EAAE,CAAC;QAC3C,cAAc,CAAC,IAAI,CAAC,6BAA6B,CAAC,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;IAC1F,CAAC;IAED,IAAI,uBAAuB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACzC,cAAc,CAAC,IAAI,CACjB,kCAAkC,CAAC;YACjC,aAAa;YACb,gBAAgB;YAChB,eAAe,EAAE,4BAA4B;SAC9C,CAAC,CACH,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,aAAa,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,cAAc,EAAE,CAAC;QACnB,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC;IAED,OAAO;QACL,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,aAAa;QACb,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -11,6 +11,26 @@ it('buildPromptSpec preserves mode precedence for base prompts', () => {
|
|
|
11
11
|
expect(buildPromptSpec({ model: 'gpt-4o', liteMode: false }).basePromptFile).toBe('simple_v4.md');
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
+
it('buildPromptSpec routes gpt-5.6 to its own base prompt without capturing other gpt-5 versions', () => {
|
|
15
|
+
expect(buildPromptSpec({ model: 'gpt-5.6', liteMode: false }).basePromptFile).toBe('gpt-5.6.md');
|
|
16
|
+
expect(buildPromptSpec({ model: 'gpt-5.6-2026-07-01', liteMode: false }).basePromptFile).toBe('gpt-5.6.md');
|
|
17
|
+
|
|
18
|
+
expect(buildPromptSpec({ model: 'gpt-5.5', liteMode: false }).basePromptFile).toBe('gpt-5.5.md');
|
|
19
|
+
expect(buildPromptSpec({ model: 'gpt-5.4', liteMode: false }).basePromptFile).toBe('gpt-5-modern.md');
|
|
20
|
+
expect(buildPromptSpec({ model: 'gpt-5.2', liteMode: false }).basePromptFile).toBe('gpt-5-modern.md');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('buildPromptSpec keeps gpt-5.6 codex variants on the codex base prompt', () => {
|
|
24
|
+
expect(buildPromptSpec({ model: 'gpt-5.6-codex', liteMode: false }).basePromptFile).toBe('codex.md');
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
it('buildPromptSpec still applies mode precedence over the gpt-5.6 profile', () => {
|
|
28
|
+
expect(buildPromptSpec({ model: 'gpt-5.6', liteMode: true }).basePromptFile).toBe('lite.md');
|
|
29
|
+
expect(buildPromptSpec({ model: 'gpt-5.6', liteMode: false, orchestratorMode: true }).basePromptFile).toBe(
|
|
30
|
+
'orchestrator.md',
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
|
|
14
34
|
// it('buildPromptSpec adds GPT version fragments without changing the base GPT prompt fallback', () => {
|
|
15
35
|
// const gpt55 = buildPromptSpec({ model: 'gpt-5.5-2026-04-23', liteMode: false });
|
|
16
36
|
// expect(gpt55.basePromptFile).toBe('gpt-5-modern.md');
|
|
@@ -111,3 +131,55 @@ it('adds persistent-memory guidance only when memory tools are enabled', () => {
|
|
|
111
131
|
'memory.md',
|
|
112
132
|
);
|
|
113
133
|
});
|
|
134
|
+
|
|
135
|
+
it('buildPromptSpec includes async subagent guidance when async tools are enabled', () => {
|
|
136
|
+
const spec = buildPromptSpec({
|
|
137
|
+
model: 'gpt-4o',
|
|
138
|
+
liteMode: false,
|
|
139
|
+
runSubagentAsyncEnabled: true,
|
|
140
|
+
});
|
|
141
|
+
expect(spec.inlineSections.some((s) => s.includes('Asynchronous subagents'))).toBe(true);
|
|
142
|
+
expect(spec.inlineSections.some((s) => s.includes('run_subagent_async'))).toBe(true);
|
|
143
|
+
expect(spec.inlineSections.some((s) => s.includes('get_subagent_result'))).toBe(true);
|
|
144
|
+
expect(spec.inlineSections.some((s) => s.includes('explorer'))).toBe(true);
|
|
145
|
+
expect(spec.inlineSections.some((s) => s.includes('researcher'))).toBe(true);
|
|
146
|
+
expect(spec.inlineSections.some((s) => s.includes('mentor'))).toBe(true);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
it('buildPromptSpec tells orchestrators to trust successful delegation and wait without duplicating it', () => {
|
|
150
|
+
const spec = buildPromptSpec({
|
|
151
|
+
model: 'gpt-4o',
|
|
152
|
+
liteMode: false,
|
|
153
|
+
orchestratorMode: true,
|
|
154
|
+
runSubagentEnabled: true,
|
|
155
|
+
runSubagentAsyncEnabled: true,
|
|
156
|
+
});
|
|
157
|
+
const guidance = spec.inlineSections.join('\n');
|
|
158
|
+
|
|
159
|
+
expect(guidance).toContain('use `run_subagent_async` for delegable work');
|
|
160
|
+
expect(guidance).toContain('A returned handle with `status: "running"` means delegation succeeded');
|
|
161
|
+
expect(guidance).toContain('Do not duplicate or independently perform the delegated unit');
|
|
162
|
+
expect(guidance).toContain('end the current turn and wait for the automatic completion notification');
|
|
163
|
+
expect(guidance).toContain('Use `get_subagent_result` from that notification turn');
|
|
164
|
+
expect(guidance).toContain('do NOT immediately call');
|
|
165
|
+
expect(guidance).toContain('blocks until completion');
|
|
166
|
+
expect(guidance).not.toContain('Use `run_subagent` only');
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it('buildPromptSpec excludes async subagent guidance in lite mode', () => {
|
|
170
|
+
const spec = buildPromptSpec({
|
|
171
|
+
model: 'gpt-4o',
|
|
172
|
+
liteMode: true,
|
|
173
|
+
runSubagentAsyncEnabled: true,
|
|
174
|
+
});
|
|
175
|
+
expect(spec.inlineSections.some((s) => s.includes('Asynchronous subagents'))).toBe(false);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
it('buildPromptSpec excludes async subagent guidance when disabled', () => {
|
|
179
|
+
const spec = buildPromptSpec({
|
|
180
|
+
model: 'gpt-4o',
|
|
181
|
+
liteMode: false,
|
|
182
|
+
runSubagentAsyncEnabled: false,
|
|
183
|
+
});
|
|
184
|
+
expect(spec.inlineSections.some((s) => s.includes('Asynchronous subagents'))).toBe(false);
|
|
185
|
+
});
|
|
@@ -2,6 +2,7 @@ import type { ExecutionContext } from '../services/execution-context.js';
|
|
|
2
2
|
import { selectPromptProfile } from './prompt-profiles.js';
|
|
3
3
|
import { getSearchViaShellAddendum } from './search-via-shell.js';
|
|
4
4
|
import { getSubagentDelegationAddendum } from './subagent-delegation.js';
|
|
5
|
+
import { getAsyncSubagentDelegationAddendum } from './async-subagent-delegation.js';
|
|
5
6
|
import { getShellSandboxAddendum } from './shell-sandbox.js';
|
|
6
7
|
|
|
7
8
|
export type PromptConstructorOptions = {
|
|
@@ -13,6 +14,8 @@ export type PromptConstructorOptions = {
|
|
|
13
14
|
searchViaShell?: boolean;
|
|
14
15
|
codeContextEnabled?: boolean;
|
|
15
16
|
runSubagentEnabled?: boolean;
|
|
17
|
+
runSubagentAsyncEnabled?: boolean;
|
|
18
|
+
asyncSubagentControlsEnabled?: boolean;
|
|
16
19
|
sandboxEnabled?: boolean;
|
|
17
20
|
memoryEnabled?: boolean;
|
|
18
21
|
memoryGuidance?: string;
|
|
@@ -33,6 +36,8 @@ export function buildPromptSpec(options: PromptConstructorOptions): PromptSpec {
|
|
|
33
36
|
mentorMode = false,
|
|
34
37
|
searchViaShell = false,
|
|
35
38
|
runSubagentEnabled = false,
|
|
39
|
+
runSubagentAsyncEnabled = false,
|
|
40
|
+
asyncSubagentControlsEnabled = false,
|
|
36
41
|
sandboxEnabled = true,
|
|
37
42
|
memoryEnabled = false,
|
|
38
43
|
memoryGuidance = '',
|
|
@@ -69,6 +74,16 @@ export function buildPromptSpec(options: PromptConstructorOptions): PromptSpec {
|
|
|
69
74
|
inlineSections.push(getSubagentDelegationAddendum({ orchestratorMode, memoryEnabled }));
|
|
70
75
|
}
|
|
71
76
|
|
|
77
|
+
if (runSubagentAsyncEnabled && !liteMode) {
|
|
78
|
+
inlineSections.push(
|
|
79
|
+
getAsyncSubagentDelegationAddendum({
|
|
80
|
+
memoryEnabled,
|
|
81
|
+
orchestratorMode,
|
|
82
|
+
controlsEnabled: asyncSubagentControlsEnabled,
|
|
83
|
+
}),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
72
87
|
if (isRegularMode && isAgentMode) {
|
|
73
88
|
fragmentFiles.push('plan-mode-info.md');
|
|
74
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-profiles.d.ts","sourceRoot":"","sources":["../../source/prompts/prompt-profiles.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;CAC3G,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"prompt-profiles.d.ts","sourceRoot":"","sources":["../../source/prompts/prompt-profiles.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,CAAC,OAAO,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC;CAC3G,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,aAAa,EA8D1C,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,GAAG,aAAa,CAGhB"}
|
|
@@ -24,6 +24,11 @@ export const PROMPT_PROFILES = [
|
|
|
24
24
|
basePromptFile: 'codex.md',
|
|
25
25
|
matches: ({ normalizedModel }) => normalizedModel.includes('gpt-5') && normalizedModel.includes('codex'),
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
id: 'gpt-5.6',
|
|
29
|
+
basePromptFile: 'gpt-5.6.md',
|
|
30
|
+
matches: ({ normalizedModel }) => normalizedModel.includes('gpt-5.6'),
|
|
31
|
+
},
|
|
27
32
|
{
|
|
28
33
|
id: 'gpt-5.5',
|
|
29
34
|
basePromptFile: 'gpt-5.5.md',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-profiles.js","sourceRoot":"","sources":["../../source/prompts/prompt-profiles.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C;QACE,EAAE,EAAE,MAAM;QACV,cAAc,EAAE,SAAS;QACzB,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,QAAQ;KACpC;IACD;QACE,EAAE,EAAE,cAAc;QAClB,cAAc,EAAE,iBAAiB;QACjC,OAAO,EAAE,CAAC,EAAE,gBAAgB,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,gBAAgB,CAAC;KAC7D;IACD;QACE,EAAE,EAAE,WAAW;QACf,cAAc,EAAE,cAAc;QAC9B,OAAO,EAAE,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