@duetso/agent 0.1.167 → 0.1.168
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/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAkChE,wBAAgB,oCAAoC,CAAC,KAAK,EAAE;IAC1D,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACnC,GAAG,MAAM,CAYT;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE;IACzD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAkChE,wBAAgB,oCAAoC,CAAC,KAAK,EAAE;IAC1D,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IACzB,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACnC,GAAG,MAAM,CAYT;AAED,wBAAgB,mCAAmC,CAAC,KAAK,EAAE;IACzD,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,GAAG,MAAM,CAkDT;AAED;;;;;;;;;GASG;AACH,wBAAgB,mCAAmC,IAAI,MAAM,CAW5D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oCAAoC,IAAI,MAAM,CAS7D"}
|
|
@@ -70,6 +70,7 @@ export function createStateMachineSystemPromptLayer(input) {
|
|
|
70
70
|
'State-machine work also keeps the user unblocked. While states run in the background the user can still send messages and you (the parent) respond without waiting for the state machine to finish. State-machine progress continues regardless of what you do here — by default just answer the user. Only call select_state_machine_state if the user explicitly wants to redirect or change the running work; questions, status checks, and side conversations should be answered with plain replies. A "steer" message reaches you immediately as an interruption (right shape for redirects or anything time-sensitive); a "follow_up" message is queued and delivered when your current turn settles (right shape for context that does not need to interrupt). Doing the same multi-step work via todo_write would block the user behind your own tool calls instead.',
|
|
71
71
|
"If the request is simple or unrelated, answer normally without calling a turn-runner control tool — do not invent a state machine for genuinely one-shot questions.",
|
|
72
72
|
"After you select a state-machine state, the runner executes that state outside your current assistant message and may later sleep, wake, or continue in the background. When the state finishes you (the parent) are woken with its result and decide the next transition — select the next state, finalize with a terminal state, or hand back to the user. You stay the orchestrator; sub-agents and scripts only do the per-state work.",
|
|
73
|
+
"The user never sees a sub-agent's output directly — only you do. A state's result, the files it touched, the values it computed, and anything it reported back land in your context alone, not in the user-facing transcript. So whenever you want the user to know something a sub-agent produced — a summary, a file path, a number, a finding, a completed result — you must restate it yourself in plain text in your reply. Do not say things like \"see the sub-agent's output\" or assume the user can read what a state returned; if it matters to the user, repeat it in your own words.",
|
|
73
74
|
"Every state-machine terminal — whether you chose it via select_state_machine_state or a state failed at runtime — wakes you one more time with the terminal details (state, status, reason) before the user-facing turn ends. Use that turn to summarize the outcome to the user in plain text and, when appropriate, to start follow-up work by calling create_state_machine_definition. Your own transcript shows whether you selected the terminal or it ended on its own — frame the reply accordingly. Do not call select_state_machine_state on the acknowledgment turn (the state machine is already terminal).",
|
|
74
75
|
"State prompts and script commands may use template strings like {{ input.email }}. Add inputSchema to states that need template input, and pass matching input when selecting that state.",
|
|
75
76
|
"You are responsible for every sub-agent's output. A sub-agent's response is a claim, not ground truth — it may have hallucinated success, skipped a step, misread a file, swallowed an error, or declared the work done while leaving the repo broken. When a state finishes, review what it actually produced before transitioning: read the result it returned, spot-check the files it claims to have changed, run the build/test/lint it claims to have passed, and confirm any IDs, paths, or numbers it asserts. If the sub-agent's output is wrong, incomplete, or unverifiable, re-select the same state with a corrected prompt or input, or select a different state — do not propagate an unverified claim into the next state's prompt as if it were fact, and do not relay it to the user as a finished result. The orchestrator owns correctness; the sub-agent only owns effort. The same rule applies after the state machine has finished: when the user contradicts a sub-agent claim you previously relayed (“it didn’t work”, “that file isn’t there”, “nothing changed”), the user is the source of truth and the sub-agent was wrong. Do not just verbally agree, do not blame an “isolated container” or invent an environment excuse, and do not offer to do the work yourself outside the state machine. Take corrective action via the state-machine tools: call create_state_machine_definition to restart the work with a tuned sub-agent prompt that prevents the same hallucination.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/turn-runner/prompts.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAE1D,SAAS,eAAe,CAAC,GAAW;IAClC,OAAO,MAAM,CAAA;;iCAEkB,GAAG;;;GAGjC,CAAC;AACJ,CAAC;AAED,SAAS,uBAAuB;IAC9B,+EAA+E;IAC/E,2EAA2E;IAC3E,gDAAgD;IAChD,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CA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