@namzu/sdk 71.1.0 → 73.0.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/CHANGELOG.md +55 -0
- package/dist/agents/QueryAgent.d.ts.map +1 -1
- package/dist/agents/QueryAgent.js +1 -0
- package/dist/agents/QueryAgent.js.map +1 -1
- package/dist/agents/examples/SupervisorAgent.d.ts.map +1 -1
- package/dist/agents/examples/SupervisorAgent.js +5 -0
- package/dist/agents/examples/SupervisorAgent.js.map +1 -1
- package/dist/authorization/protected-paths.d.ts.map +1 -1
- package/dist/authorization/protected-paths.js +4 -0
- package/dist/authorization/protected-paths.js.map +1 -1
- package/dist/compaction/index.d.ts +1 -1
- package/dist/compaction/index.d.ts.map +1 -1
- package/dist/compaction/index.js +1 -1
- package/dist/compaction/index.js.map +1 -1
- package/dist/compaction/manual.d.ts +24 -1
- package/dist/compaction/manual.d.ts.map +1 -1
- package/dist/compaction/manual.js +80 -21
- package/dist/compaction/manual.js.map +1 -1
- package/dist/compaction/model-summary.d.ts +24 -6
- package/dist/compaction/model-summary.d.ts.map +1 -1
- package/dist/compaction/model-summary.js +108 -23
- package/dist/compaction/model-summary.js.map +1 -1
- package/dist/compaction/precompute.d.ts +179 -0
- package/dist/compaction/precompute.d.ts.map +1 -0
- package/dist/compaction/precompute.js +274 -0
- package/dist/compaction/precompute.js.map +1 -0
- package/dist/compaction/restore.d.ts +23 -0
- package/dist/compaction/restore.d.ts.map +1 -1
- package/dist/compaction/restore.js +59 -1
- package/dist/compaction/restore.js.map +1 -1
- package/dist/compaction/summary.d.ts +37 -2
- package/dist/compaction/summary.d.ts.map +1 -1
- package/dist/compaction/summary.js +46 -6
- package/dist/compaction/summary.js.map +1 -1
- package/dist/config/runtime.d.ts +4 -0
- package/dist/config/runtime.d.ts.map +1 -1
- package/dist/config/runtime.js +20 -3
- package/dist/config/runtime.js.map +1 -1
- package/dist/connector/index.d.ts +2 -2
- package/dist/connector/index.d.ts.map +1 -1
- package/dist/connector/index.js +1 -1
- package/dist/connector/index.js.map +1 -1
- package/dist/connector/mcp/client.d.ts +26 -6
- package/dist/connector/mcp/client.d.ts.map +1 -1
- package/dist/connector/mcp/client.js +49 -7
- package/dist/connector/mcp/client.js.map +1 -1
- package/dist/connector/mcp/index.d.ts +2 -0
- package/dist/connector/mcp/index.d.ts.map +1 -1
- package/dist/connector/mcp/index.js +1 -0
- package/dist/connector/mcp/index.js.map +1 -1
- package/dist/connector/mcp/sandbox-stdio.d.ts +67 -0
- package/dist/connector/mcp/sandbox-stdio.d.ts.map +1 -0
- package/dist/connector/mcp/sandbox-stdio.js +178 -0
- package/dist/connector/mcp/sandbox-stdio.js.map +1 -0
- package/dist/connector/mcp/stdio-program.d.ts +34 -0
- package/dist/connector/mcp/stdio-program.d.ts.map +1 -0
- package/dist/connector/mcp/stdio-program.js +47 -0
- package/dist/connector/mcp/stdio-program.js.map +1 -0
- package/dist/connector/mcp/stdio.d.ts.map +1 -1
- package/dist/connector/mcp/stdio.js +5 -2
- package/dist/connector/mcp/stdio.js.map +1 -1
- package/dist/connector/web/guarded-fetch.d.ts +51 -2
- package/dist/connector/web/guarded-fetch.d.ts.map +1 -1
- package/dist/connector/web/guarded-fetch.js +140 -19
- package/dist/connector/web/guarded-fetch.js.map +1 -1
- package/dist/connector/web/index.d.ts +2 -2
- package/dist/connector/web/index.d.ts.map +1 -1
- package/dist/connector/web/index.js +1 -1
- package/dist/connector/web/index.js.map +1 -1
- package/dist/manager/agent/lifecycle.d.ts.map +1 -1
- package/dist/manager/agent/lifecycle.js +9 -1
- package/dist/manager/agent/lifecycle.js.map +1 -1
- package/dist/manager/session/turn-recorder.d.ts +26 -0
- package/dist/manager/session/turn-recorder.d.ts.map +1 -1
- package/dist/manager/session/turn-recorder.js +72 -5
- package/dist/manager/session/turn-recorder.js.map +1 -1
- package/dist/peers/protocol.d.ts +9 -0
- package/dist/peers/protocol.d.ts.map +1 -1
- package/dist/peers/protocol.js +4 -0
- package/dist/peers/protocol.js.map +1 -1
- package/dist/peers/record.d.ts +6 -0
- package/dist/peers/record.d.ts.map +1 -1
- package/dist/peers/record.js +4 -0
- package/dist/peers/record.js.map +1 -1
- package/dist/plugin/hook-module/capabilities.d.ts.map +1 -1
- package/dist/plugin/hook-module/capabilities.js +24 -13
- package/dist/plugin/hook-module/capabilities.js.map +1 -1
- package/dist/plugin/hook-module/host.d.ts +31 -0
- package/dist/plugin/hook-module/host.d.ts.map +1 -1
- package/dist/plugin/hook-module/host.js +56 -13
- package/dist/plugin/hook-module/host.js.map +1 -1
- package/dist/plugin/hook-module/index.d.ts +3 -2
- package/dist/plugin/hook-module/index.d.ts.map +1 -1
- package/dist/plugin/hook-module/index.js +2 -1
- package/dist/plugin/hook-module/index.js.map +1 -1
- package/dist/plugin/index.d.ts +3 -2
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +2 -1
- package/dist/plugin/index.js.map +1 -1
- package/dist/plugin/shell-hook-execute.d.ts +55 -0
- package/dist/plugin/shell-hook-execute.d.ts.map +1 -0
- package/dist/plugin/shell-hook-execute.js +73 -0
- package/dist/plugin/shell-hook-execute.js.map +1 -0
- package/dist/plugin/shell-hook-restrict.d.ts +31 -0
- package/dist/plugin/shell-hook-restrict.d.ts.map +1 -0
- package/dist/plugin/shell-hook-restrict.js +69 -0
- package/dist/plugin/shell-hook-restrict.js.map +1 -0
- package/dist/plugin/shell-hook.d.ts +59 -2
- package/dist/plugin/shell-hook.d.ts.map +1 -1
- package/dist/plugin/shell-hook.js +79 -12
- package/dist/plugin/shell-hook.js.map +1 -1
- package/dist/public-runtime.d.ts +11 -7
- package/dist/public-runtime.d.ts.map +1 -1
- package/dist/public-runtime.js +9 -6
- package/dist/public-runtime.js.map +1 -1
- package/dist/public-tools.d.ts +1 -1
- package/dist/public-tools.d.ts.map +1 -1
- package/dist/public-tools.js +1 -1
- package/dist/public-tools.js.map +1 -1
- package/dist/public-types.d.ts +5 -2
- package/dist/public-types.d.ts.map +1 -1
- package/dist/registry/command/kernel-commands.d.ts +7 -1
- package/dist/registry/command/kernel-commands.d.ts.map +1 -1
- package/dist/registry/command/kernel-commands.js +40 -2
- package/dist/registry/command/kernel-commands.js.map +1 -1
- package/dist/registry/tool/execute.d.ts +8 -0
- package/dist/registry/tool/execute.d.ts.map +1 -1
- package/dist/registry/tool/execute.js +12 -0
- package/dist/registry/tool/execute.js.map +1 -1
- package/dist/runtime/jobs/websocket-source.d.ts +2 -22
- package/dist/runtime/jobs/websocket-source.d.ts.map +1 -1
- package/dist/runtime/jobs/websocket-source.js +2 -33
- package/dist/runtime/jobs/websocket-source.js.map +1 -1
- package/dist/runtime/query/budget-nudge.d.ts +27 -0
- package/dist/runtime/query/budget-nudge.d.ts.map +1 -0
- package/dist/runtime/query/budget-nudge.js +66 -0
- package/dist/runtime/query/budget-nudge.js.map +1 -0
- package/dist/runtime/query/compact-session.d.ts +9 -0
- package/dist/runtime/query/compact-session.d.ts.map +1 -1
- package/dist/runtime/query/compact-session.js +158 -76
- package/dist/runtime/query/compact-session.js.map +1 -1
- package/dist/runtime/query/events.d.ts +7 -0
- package/dist/runtime/query/events.d.ts.map +1 -1
- package/dist/runtime/query/events.js +29 -11
- package/dist/runtime/query/events.js.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.d.ts.map +1 -1
- package/dist/runtime/query/executor/tool-call-admission.js +51 -10
- package/dist/runtime/query/executor/tool-call-admission.js.map +1 -1
- package/dist/runtime/query/guard.d.ts +8 -0
- package/dist/runtime/query/guard.d.ts.map +1 -1
- package/dist/runtime/query/guard.js +20 -0
- package/dist/runtime/query/guard.js.map +1 -1
- package/dist/runtime/query/index.d.ts +6 -0
- package/dist/runtime/query/index.d.ts.map +1 -1
- package/dist/runtime/query/index.js +3 -0
- package/dist/runtime/query/index.js.map +1 -1
- package/dist/runtime/query/iteration/index.d.ts +2 -0
- package/dist/runtime/query/iteration/index.d.ts.map +1 -1
- package/dist/runtime/query/iteration/index.js +27 -1
- package/dist/runtime/query/iteration/index.js.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.d.ts +1 -0
- package/dist/runtime/query/iteration/phases/compaction.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/compaction.js +164 -43
- package/dist/runtime/query/iteration/phases/compaction.js.map +1 -1
- package/dist/runtime/query/iteration/phases/context.d.ts +4 -0
- package/dist/runtime/query/iteration/phases/context.d.ts.map +1 -1
- package/dist/runtime/query/iteration/phases/context.js.map +1 -1
- package/dist/runtime/query/iteration/phases/precompute.d.ts +60 -0
- package/dist/runtime/query/iteration/phases/precompute.d.ts.map +1 -0
- package/dist/runtime/query/iteration/phases/precompute.js +240 -0
- package/dist/runtime/query/iteration/phases/precompute.js.map +1 -0
- package/dist/runtime/query/turn/outcome-ledger.d.ts +14 -0
- package/dist/runtime/query/turn/outcome-ledger.d.ts.map +1 -1
- package/dist/runtime/query/turn/outcome-ledger.js +28 -0
- package/dist/runtime/query/turn/outcome-ledger.js.map +1 -1
- package/dist/scheduler/completion-inbox.d.ts.map +1 -1
- package/dist/scheduler/completion-inbox.js +15 -0
- package/dist/scheduler/completion-inbox.js.map +1 -1
- package/dist/store/goal/gates.d.ts +53 -0
- package/dist/store/goal/gates.d.ts.map +1 -0
- package/dist/store/goal/gates.js +664 -0
- package/dist/store/goal/gates.js.map +1 -0
- package/dist/store/goal/index.d.ts +16 -1
- package/dist/store/goal/index.d.ts.map +1 -1
- package/dist/store/goal/index.js +74 -0
- package/dist/store/goal/index.js.map +1 -1
- package/dist/store/session-index/index.d.ts +13 -0
- package/dist/store/session-index/index.d.ts.map +1 -1
- package/dist/store/session-index/index.js +1 -0
- package/dist/store/session-index/index.js.map +1 -1
- package/dist/store/session-index/rebuild.d.ts +12 -0
- package/dist/store/session-index/rebuild.d.ts.map +1 -1
- package/dist/store/session-index/rebuild.js +20 -4
- package/dist/store/session-index/rebuild.js.map +1 -1
- package/dist/store/session-index/sqlite.d.ts +20 -0
- package/dist/store/session-index/sqlite.d.ts.map +1 -1
- package/dist/store/session-index/sqlite.js +50 -12
- package/dist/store/session-index/sqlite.js.map +1 -1
- package/dist/tools/admit-facts.d.ts.map +1 -1
- package/dist/tools/admit-facts.js +59 -0
- package/dist/tools/admit-facts.js.map +1 -1
- package/dist/tools/builtins/bash.js +1 -1
- package/dist/tools/builtins/bash.js.map +1 -1
- package/dist/tools/builtins/browser.d.ts.map +1 -1
- package/dist/tools/builtins/browser.js +2 -0
- package/dist/tools/builtins/browser.js.map +1 -1
- package/dist/tools/builtins/monitor.d.ts.map +1 -1
- package/dist/tools/builtins/monitor.js +1 -0
- package/dist/tools/builtins/monitor.js.map +1 -1
- package/dist/tools/builtins/search-tools.js +2 -2
- package/dist/tools/builtins/search-tools.js.map +1 -1
- package/dist/tools/builtins/sleep-guard.js +1 -1
- package/dist/tools/builtins/sleep-guard.js.map +1 -1
- package/dist/tools/builtins/wait-for-job.js +1 -1
- package/dist/tools/builtins/wait-for-job.js.map +1 -1
- package/dist/tools/coordinator/ask-user-question.d.ts.map +1 -1
- package/dist/tools/coordinator/ask-user-question.js +92 -3
- package/dist/tools/coordinator/ask-user-question.js.map +1 -1
- package/dist/tools/coordinator/index.d.ts.map +1 -1
- package/dist/tools/coordinator/index.js +3 -0
- package/dist/tools/coordinator/index.js.map +1 -1
- package/dist/tools/defineTool.d.ts +2 -0
- package/dist/tools/defineTool.d.ts.map +1 -1
- package/dist/tools/defineTool.js +3 -0
- package/dist/tools/defineTool.js.map +1 -1
- package/dist/tools/goal/confirmation.d.ts +40 -2
- package/dist/tools/goal/confirmation.d.ts.map +1 -1
- package/dist/tools/goal/confirmation.js +117 -0
- package/dist/tools/goal/confirmation.js.map +1 -1
- package/dist/tools/goal/index.d.ts.map +1 -1
- package/dist/tools/goal/index.js +14 -2
- package/dist/tools/goal/index.js.map +1 -1
- package/dist/tools/memory/save.d.ts.map +1 -1
- package/dist/tools/memory/save.js +1 -0
- package/dist/tools/memory/save.js.map +1 -1
- package/dist/tools/schedules/index.d.ts +1 -0
- package/dist/tools/schedules/index.d.ts.map +1 -1
- package/dist/tools/schedules/index.js +1 -0
- package/dist/tools/schedules/index.js.map +1 -1
- package/dist/tools/schedules/loop-tool.d.ts.map +1 -1
- package/dist/tools/schedules/loop-tool.js +1 -0
- package/dist/tools/schedules/loop-tool.js.map +1 -1
- package/dist/tools/schedules/present.d.ts.map +1 -1
- package/dist/tools/schedules/present.js +2 -0
- package/dist/tools/schedules/present.js.map +1 -1
- package/dist/tools/schedules/schedule-tool.d.ts.map +1 -1
- package/dist/tools/schedules/schedule-tool.js +79 -9
- package/dist/tools/schedules/schedule-tool.js.map +1 -1
- package/dist/tools/schedules/self-tool.d.ts +16 -0
- package/dist/tools/schedules/self-tool.d.ts.map +1 -0
- package/dist/tools/schedules/self-tool.js +140 -0
- package/dist/tools/schedules/self-tool.js.map +1 -0
- package/dist/tools/schedules/timer-tools.d.ts.map +1 -1
- package/dist/tools/schedules/timer-tools.js +1 -0
- package/dist/tools/schedules/timer-tools.js.map +1 -1
- package/dist/tools/schedules/types.d.ts +63 -0
- package/dist/tools/schedules/types.d.ts.map +1 -1
- package/dist/toolsets/manager.d.ts +10 -0
- package/dist/toolsets/manager.d.ts.map +1 -1
- package/dist/toolsets/manager.js +56 -7
- package/dist/toolsets/manager.js.map +1 -1
- package/dist/turn/memory-promoter.d.ts.map +1 -1
- package/dist/turn/memory-promoter.js +20 -4
- package/dist/turn/memory-promoter.js.map +1 -1
- package/dist/types/agent/base.d.ts +6 -0
- package/dist/types/agent/base.d.ts.map +1 -1
- package/dist/types/agent/supervisor.d.ts +10 -0
- package/dist/types/agent/supervisor.d.ts.map +1 -1
- package/dist/types/agent/task.d.ts +11 -0
- package/dist/types/agent/task.d.ts.map +1 -1
- package/dist/types/agent/task.js.map +1 -1
- package/dist/types/goal/index.d.ts +66 -0
- package/dist/types/goal/index.d.ts.map +1 -1
- package/dist/types/hitl/index.d.ts +8 -0
- package/dist/types/hitl/index.d.ts.map +1 -1
- package/dist/types/hitl/index.js.map +1 -1
- package/dist/types/message/index.d.ts +7 -0
- package/dist/types/message/index.d.ts.map +1 -1
- package/dist/types/message/index.js.map +1 -1
- package/dist/types/session/events.d.ts +7 -0
- package/dist/types/session/events.d.ts.map +1 -1
- package/dist/types/session/events.js.map +1 -1
- package/dist/types/session/outcome.d.ts +12 -0
- package/dist/types/session/outcome.d.ts.map +1 -1
- package/dist/types/session/outcome.js.map +1 -1
- package/dist/types/session/records.d.ts +79 -1
- package/dist/types/session/records.d.ts.map +1 -1
- package/dist/types/session/records.js +24 -0
- package/dist/types/session/records.js.map +1 -1
- package/dist/types/tool/index.d.ts +7 -0
- package/dist/types/tool/index.d.ts.map +1 -1
- package/dist/types/tool/index.js.map +1 -1
- package/dist/types/tool/presentation.d.ts +21 -0
- package/dist/types/tool/presentation.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/agents/QueryAgent.ts +1 -0
- package/src/agents/examples/SupervisorAgent.ts +5 -0
- package/src/authorization/protected-paths.ts +4 -0
- package/src/compaction/index.ts +1 -0
- package/src/compaction/manual.ts +130 -23
- package/src/compaction/model-summary.ts +118 -23
- package/src/compaction/precompute.ts +390 -0
- package/src/compaction/restore.ts +74 -1
- package/src/compaction/summary.ts +69 -3
- package/src/config/runtime.ts +20 -3
- package/src/connector/index.ts +3 -0
- package/src/connector/mcp/client.ts +49 -7
- package/src/connector/mcp/index.ts +5 -0
- package/src/connector/mcp/sandbox-stdio.ts +214 -0
- package/src/connector/mcp/stdio-program.ts +68 -0
- package/src/connector/mcp/stdio.ts +5 -2
- package/src/connector/web/guarded-fetch.ts +197 -30
- package/src/connector/web/index.ts +4 -1
- package/src/manager/agent/lifecycle.ts +10 -1
- package/src/manager/session/turn-recorder.ts +92 -5
- package/src/peers/protocol.ts +4 -0
- package/src/peers/record.ts +4 -0
- package/src/plugin/hook-module/capabilities.ts +36 -14
- package/src/plugin/hook-module/host.ts +86 -13
- package/src/plugin/hook-module/index.ts +3 -0
- package/src/plugin/index.ts +3 -0
- package/src/plugin/shell-hook-execute.ts +126 -0
- package/src/plugin/shell-hook-restrict.ts +66 -0
- package/src/plugin/shell-hook.ts +138 -10
- package/src/public-runtime.ts +41 -0
- package/src/public-tools.ts +2 -0
- package/src/public-types.ts +21 -0
- package/src/registry/command/kernel-commands.ts +62 -3
- package/src/registry/tool/execute.ts +14 -0
- package/src/runtime/jobs/websocket-source.ts +2 -46
- package/src/runtime/query/budget-nudge.ts +92 -0
- package/src/runtime/query/compact-session.ts +195 -70
- package/src/runtime/query/events.ts +29 -11
- package/src/runtime/query/executor/tool-call-admission.ts +62 -17
- package/src/runtime/query/guard.ts +22 -0
- package/src/runtime/query/index.ts +10 -0
- package/src/runtime/query/iteration/index.ts +26 -1
- package/src/runtime/query/iteration/phases/compaction.ts +173 -43
- package/src/runtime/query/iteration/phases/context.ts +6 -0
- package/src/runtime/query/iteration/phases/precompute.ts +277 -0
- package/src/runtime/query/turn/outcome-ledger.ts +34 -0
- package/src/scheduler/completion-inbox.ts +14 -0
- package/src/store/goal/gates.ts +738 -0
- package/src/store/goal/index.ts +109 -0
- package/src/store/session-index/index.ts +14 -0
- package/src/store/session-index/rebuild.ts +22 -4
- package/src/store/session-index/sqlite.ts +63 -14
- package/src/tools/admit-facts.ts +64 -0
- package/src/tools/builtins/bash.ts +1 -1
- package/src/tools/builtins/browser.ts +4 -0
- package/src/tools/builtins/monitor.ts +2 -0
- package/src/tools/builtins/search-tools.ts +2 -2
- package/src/tools/builtins/sleep-guard.ts +1 -1
- package/src/tools/builtins/wait-for-job.ts +1 -1
- package/src/tools/coordinator/ask-user-question.ts +124 -13
- package/src/tools/coordinator/index.ts +3 -0
- package/src/tools/defineTool.ts +5 -0
- package/src/tools/goal/confirmation.ts +171 -3
- package/src/tools/goal/index.ts +15 -3
- package/src/tools/memory/save.ts +2 -0
- package/src/tools/schedules/index.ts +1 -0
- package/src/tools/schedules/loop-tool.ts +2 -0
- package/src/tools/schedules/present.ts +2 -0
- package/src/tools/schedules/schedule-tool.ts +84 -9
- package/src/tools/schedules/self-tool.ts +152 -0
- package/src/tools/schedules/timer-tools.ts +2 -0
- package/src/tools/schedules/types.ts +62 -0
- package/src/toolsets/manager.ts +55 -8
- package/src/turn/memory-promoter.ts +24 -3
- package/src/types/agent/base.ts +7 -0
- package/src/types/agent/supervisor.ts +11 -0
- package/src/types/agent/task.ts +12 -0
- package/src/types/goal/index.ts +72 -0
- package/src/types/hitl/index.ts +8 -0
- package/src/types/message/index.ts +7 -0
- package/src/types/session/events.ts +7 -0
- package/src/types/session/outcome.ts +16 -1
- package/src/types/session/records.ts +27 -0
- package/src/types/tool/index.ts +7 -0
- package/src/types/tool/presentation.ts +22 -0
package/src/types/goal/index.ts
CHANGED
|
@@ -73,6 +73,13 @@ export interface SessionGoal extends GoalRef {
|
|
|
73
73
|
readonly wrapUpRound?: number
|
|
74
74
|
/** What a check of the completion report found missing; leads the next round. */
|
|
75
75
|
readonly missing?: readonly string[]
|
|
76
|
+
/**
|
|
77
|
+
* Commands the host runs at the end of each round; the goal completes only
|
|
78
|
+
* when every one of them passed on the files as they are. Fixed when the
|
|
79
|
+
* goal is created, so a settings file that changes later does not change a
|
|
80
|
+
* goal that is running. Absent: the goal has no gates.
|
|
81
|
+
*/
|
|
82
|
+
readonly gates?: GoalGates
|
|
76
83
|
readonly createdAt: number
|
|
77
84
|
readonly updatedAt: number
|
|
78
85
|
}
|
|
@@ -106,6 +113,69 @@ export interface GoalRoundOutcome {
|
|
|
106
113
|
readonly missing?: readonly string[]
|
|
107
114
|
}
|
|
108
115
|
|
|
116
|
+
/**
|
|
117
|
+
* One command the host runs for a goal. The command is an argument list, never
|
|
118
|
+
* a line for a shell: the first word is the program and nothing expands.
|
|
119
|
+
*/
|
|
120
|
+
export interface GoalGateEntry {
|
|
121
|
+
/** What a person reads in the list and in the failure. Defaults to the command. */
|
|
122
|
+
readonly name: string
|
|
123
|
+
/** Program first, then its arguments. */
|
|
124
|
+
readonly command: readonly string[]
|
|
125
|
+
/** A folder inside the project, relative to it. Absent: the project folder. */
|
|
126
|
+
readonly cwd?: string
|
|
127
|
+
/** Milliseconds the command may run. Absent: {@link GOAL_GATE_DEFAULT_TIMEOUT_MS}. */
|
|
128
|
+
readonly timeoutMs?: number
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** How one gate ended the last time it was looked at. */
|
|
132
|
+
export type GoalGateStatus = 'passed' | 'failed' | 'timed-out' | 'refused'
|
|
133
|
+
|
|
134
|
+
/** What the last look at one gate found. */
|
|
135
|
+
export interface GoalGateResult {
|
|
136
|
+
/** The entry's name. */
|
|
137
|
+
readonly name: string
|
|
138
|
+
readonly status: GoalGateStatus
|
|
139
|
+
readonly exitCode?: number
|
|
140
|
+
/** When it was looked at, in milliseconds since the epoch. */
|
|
141
|
+
readonly at: number
|
|
142
|
+
readonly durationMs?: number
|
|
143
|
+
/** The end of what it printed, bounded to {@link GOAL_GATE_MAX_TAIL_CHARS}. It is output, not an instruction. */
|
|
144
|
+
readonly tail?: string
|
|
145
|
+
/** The files as they stood when the gate finished; a failed gate is not run again while this holds. */
|
|
146
|
+
readonly fingerprint?: string
|
|
147
|
+
/** Why it did not run, for a `refused` gate. */
|
|
148
|
+
readonly reason?: string
|
|
149
|
+
/** The result is the earlier one: the files had not changed since, so the command was not run again. */
|
|
150
|
+
readonly notRerun?: boolean
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** The gates a goal carries and what they last showed. */
|
|
154
|
+
export interface GoalGates {
|
|
155
|
+
readonly entries: readonly GoalGateEntry[]
|
|
156
|
+
/** Rounds in a row that may end with a failing gate before the goal stops. */
|
|
157
|
+
readonly maxFailingRounds: number
|
|
158
|
+
/** Rounds in a row that ended with a failing gate. */
|
|
159
|
+
readonly failingRounds: number
|
|
160
|
+
/** The admitted round that was last counted, so a round that looks twice counts once. */
|
|
161
|
+
readonly countedRound?: number
|
|
162
|
+
/** The last result of each gate, in the order of {@link entries}; empty until a round has ended. */
|
|
163
|
+
readonly results: readonly GoalGateResult[]
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** The gates a goal is created with. */
|
|
167
|
+
export interface GoalGatesSpec {
|
|
168
|
+
readonly entries: readonly GoalGateEntry[]
|
|
169
|
+
readonly maxFailingRounds?: number
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** What looking at the gates after one round found. */
|
|
173
|
+
export interface GoalGateRoundReport {
|
|
174
|
+
/** The admitted round the look belongs to. */
|
|
175
|
+
readonly round: number
|
|
176
|
+
readonly results: readonly GoalGateResult[]
|
|
177
|
+
}
|
|
178
|
+
|
|
109
179
|
/** Immutable authority carried by exactly one admitted automatic turn. */
|
|
110
180
|
export interface GoalRoundAuthority extends GoalRef {
|
|
111
181
|
readonly sessionId: SessionId
|
|
@@ -121,4 +191,6 @@ export interface GoalRoundAuthority extends GoalRef {
|
|
|
121
191
|
readonly wrapUp?: boolean
|
|
122
192
|
/** What a check of an earlier completion report found missing; leads this round. */
|
|
123
193
|
readonly missing?: readonly string[]
|
|
194
|
+
/** The gates that did not pass when the last round ended, with the end of their output; leads this round. */
|
|
195
|
+
readonly gateFailures?: readonly GoalGateResult[]
|
|
124
196
|
}
|
package/src/types/hitl/index.ts
CHANGED
|
@@ -123,6 +123,14 @@ export type HITLResumeDecision =
|
|
|
123
123
|
* question.
|
|
124
124
|
*/
|
|
125
125
|
questionId?: string
|
|
126
|
+
/**
|
|
127
|
+
* The person chose to talk the question over instead of answering
|
|
128
|
+
* it. Nothing is picked (send `[]`); the tool returns an error
|
|
129
|
+
* result telling the model the person wants to talk the questions
|
|
130
|
+
* over first, lists them with no answer, and says not to assume a
|
|
131
|
+
* choice and to take the person's next message as the way forward.
|
|
132
|
+
*/
|
|
133
|
+
discuss?: true
|
|
126
134
|
}
|
|
127
135
|
| { action: 'pause'; reason: string }
|
|
128
136
|
| { action: 'abort'; reason: string }
|
|
@@ -311,6 +311,13 @@ export interface SystemMessage extends BaseMessage {
|
|
|
311
311
|
* what an earlier one did.
|
|
312
312
|
*/
|
|
313
313
|
revealedTools?: readonly ToolRevealReceipt[]
|
|
314
|
+
/**
|
|
315
|
+
* On a compaction summary: the names of the tools the conversation called
|
|
316
|
+
* before the pass cut the calls. Written only by the summary renderer, from
|
|
317
|
+
* the calls themselves, and read back from here and never from the summary's
|
|
318
|
+
* text, so words in a summary cannot add a name. Cumulative across passes.
|
|
319
|
+
*/
|
|
320
|
+
toolsUsed?: readonly string[]
|
|
314
321
|
}
|
|
315
322
|
|
|
316
323
|
/**
|
|
@@ -267,6 +267,13 @@ type CoreSessionEvent =
|
|
|
267
267
|
* want to surface that the turn is running tight.
|
|
268
268
|
*/
|
|
269
269
|
reachedResetThreshold?: boolean
|
|
270
|
+
/** What started the pass, and how long it took from the decision to the swap. */
|
|
271
|
+
trigger?: 'auto' | 'manual' | 'idle' | 'prepared'
|
|
272
|
+
durationMs?: number
|
|
273
|
+
/** True when a summary written ahead of time was installed at once. */
|
|
274
|
+
precomputed?: boolean
|
|
275
|
+
/** `cache_expired`: a turn that started after the provider's prompt cache lapsed installed a summary written earlier. */
|
|
276
|
+
cause?: 'cache_expired'
|
|
270
277
|
}
|
|
271
278
|
/**
|
|
272
279
|
* Oversized tool results were emptied instead of the history being
|
|
@@ -103,6 +103,14 @@ export interface AnswerClaimMismatch {
|
|
|
103
103
|
readonly recordSays: string
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
/** A check the host itself ran for the turn, handed to the record as it stands. */
|
|
107
|
+
export interface HostCheck {
|
|
108
|
+
/** The command as a person reads it. */
|
|
109
|
+
readonly command: string
|
|
110
|
+
readonly result: 'passed' | 'failed'
|
|
111
|
+
readonly exitCode?: number
|
|
112
|
+
}
|
|
113
|
+
|
|
106
114
|
/** Host hooks for the turn's outcome record. */
|
|
107
115
|
export interface TurnOutcomeConfig {
|
|
108
116
|
/**
|
|
@@ -130,7 +138,14 @@ export interface TurnOutcomeConfig {
|
|
|
130
138
|
*/
|
|
131
139
|
readonly beforeEnd?: (
|
|
132
140
|
read: () => Promise<TurnOutcome | undefined>,
|
|
133
|
-
context?: {
|
|
141
|
+
context?: {
|
|
142
|
+
readonly finalMessage?: string
|
|
143
|
+
/**
|
|
144
|
+
* Adds a check the host ran to the turn's record: it reads like a recognised
|
|
145
|
+
* check of the files as they are now, whether or not the turn ran one.
|
|
146
|
+
*/
|
|
147
|
+
readonly recordCheck?: (check: HostCheck) => Promise<void>
|
|
148
|
+
},
|
|
134
149
|
) => string | undefined | Promise<string | undefined>
|
|
135
150
|
}
|
|
136
151
|
|
|
@@ -541,6 +541,30 @@ export const CompactionRecordSchema = recordSchema('compaction', {
|
|
|
541
541
|
tokensAfter: count,
|
|
542
542
|
})
|
|
543
543
|
|
|
544
|
+
/**
|
|
545
|
+
* What a compaction pass measured beyond the sizes its `compaction` record
|
|
546
|
+
* holds: what really started it, how long it took, the running total of tokens
|
|
547
|
+
* every pass of the session has dropped, and whether a summary written ahead
|
|
548
|
+
* of time was installed. Written just after the `compaction` record it names,
|
|
549
|
+
* flagged `ignorable`, and never a field of that record: a release that does
|
|
550
|
+
* not know this type keeps it in the hash chain and skips it, where a new
|
|
551
|
+
* field or a new `trigger` value on the strict `compaction` record would make
|
|
552
|
+
* it refuse the whole log. `trigger` here may be `prepared`; the record it
|
|
553
|
+
* names says `auto` then, which an earlier release also reads.
|
|
554
|
+
*/
|
|
555
|
+
export const CompactionMeasuredRecordSchema = recordSchema('compaction_measured', {
|
|
556
|
+
ignorable: z.literal(true),
|
|
557
|
+
/** The `compactionId` of the `compaction` record this describes. */
|
|
558
|
+
compactionId: text.min(1),
|
|
559
|
+
trigger: z.enum(['auto', 'manual', 'idle', 'prepared']),
|
|
560
|
+
/** Wall-clock milliseconds the pass took, from the decision to the swap. */
|
|
561
|
+
durationMs: count.optional(),
|
|
562
|
+
/** Tokens every compaction in this session has dropped so far, this one included. */
|
|
563
|
+
cumulativeDroppedTokens: count.optional(),
|
|
564
|
+
/** True when the summary was written ahead of time and installed at once. */
|
|
565
|
+
precomputed: z.boolean().optional(),
|
|
566
|
+
})
|
|
567
|
+
|
|
544
568
|
// Children (the live child_session_* events, plus one record-only type)
|
|
545
569
|
//
|
|
546
570
|
// A child can outlive the parent turn that spawned it (`Turn.abandonedTaskIds`
|
|
@@ -729,6 +753,7 @@ const RECORD_ONLY_SCHEMAS = {
|
|
|
729
753
|
decision_resolved: DecisionResolvedRecordSchema,
|
|
730
754
|
decision_expired: DecisionExpiredRecordSchema,
|
|
731
755
|
compaction: CompactionRecordSchema,
|
|
756
|
+
compaction_measured: CompactionMeasuredRecordSchema,
|
|
732
757
|
child_session_ended: ChildSessionEndedRecordSchema,
|
|
733
758
|
audit: AuditRecordSchema,
|
|
734
759
|
budget_bound: BudgetBoundRecordSchema,
|
|
@@ -1152,6 +1177,7 @@ export type DecisionRequestedRecord = z.infer<typeof DecisionRequestedRecordSche
|
|
|
1152
1177
|
export type DecisionResolvedRecord = z.infer<typeof DecisionResolvedRecordSchema>
|
|
1153
1178
|
export type DecisionExpiredRecord = z.infer<typeof DecisionExpiredRecordSchema>
|
|
1154
1179
|
export type CompactionRecord = z.infer<typeof CompactionRecordSchema>
|
|
1180
|
+
export type CompactionMeasuredRecord = z.infer<typeof CompactionMeasuredRecordSchema>
|
|
1155
1181
|
export type ChildSessionEndedRecord = z.infer<typeof ChildSessionEndedRecordSchema>
|
|
1156
1182
|
export type AuditRecord = z.infer<typeof AuditRecordSchema>
|
|
1157
1183
|
export type BudgetBoundRecord = z.infer<typeof BudgetBoundRecordSchema>
|
|
@@ -1174,6 +1200,7 @@ export type SessionRecordOnly =
|
|
|
1174
1200
|
| DecisionResolvedRecord
|
|
1175
1201
|
| DecisionExpiredRecord
|
|
1176
1202
|
| CompactionRecord
|
|
1203
|
+
| CompactionMeasuredRecord
|
|
1177
1204
|
| ChildSessionEndedRecord
|
|
1178
1205
|
| AuditRecord
|
|
1179
1206
|
| BudgetBoundRecord
|
package/src/types/tool/index.ts
CHANGED
|
@@ -1357,6 +1357,13 @@ export interface ToolDefinition<TInput = unknown> extends ToolPresentation<TInpu
|
|
|
1357
1357
|
* otherwise have to search for: a loaded schema rides every later request.
|
|
1358
1358
|
*/
|
|
1359
1359
|
loadsWith?: readonly string[]
|
|
1360
|
+
/**
|
|
1361
|
+
* One line, at most 100 characters, that says what a deferred tool is for
|
|
1362
|
+
* and when to use it. The catalogue of deferred tools shows it in place of
|
|
1363
|
+
* the first sentence of `description`, which can be cut before the part
|
|
1364
|
+
* that says when to use the tool. Longer text is cut at 100 characters.
|
|
1365
|
+
*/
|
|
1366
|
+
discoveryHint?: string
|
|
1360
1367
|
/**
|
|
1361
1368
|
* A refusal that needs no person's answer: the call cannot run as it stands,
|
|
1362
1369
|
* and the tool can already tell.
|
|
@@ -233,6 +233,28 @@ export type ToolFacts =
|
|
|
233
233
|
/** The one file is an image the agent made: the prompt it was made from. A host draws the picture itself. */
|
|
234
234
|
readonly generatedImage?: { readonly prompt: string }
|
|
235
235
|
}
|
|
236
|
+
| {
|
|
237
|
+
/**
|
|
238
|
+
* What the person answered to an `ask_user_question` call, one entry per
|
|
239
|
+
* question, as they gave it. A host draws its block from these and never
|
|
240
|
+
* reads the person's words back out of the model's receipt.
|
|
241
|
+
*/
|
|
242
|
+
readonly kind: 'questions'
|
|
243
|
+
/** `discussed`: the person set the questions aside to talk them over; nothing was answered. */
|
|
244
|
+
readonly outcome: 'answered' | 'discussed'
|
|
245
|
+
readonly questions: readonly {
|
|
246
|
+
readonly question: string
|
|
247
|
+
/** The short label a batch answer is keyed by. */
|
|
248
|
+
readonly header?: string
|
|
249
|
+
/** The options offered, in order (what a talk-it-over lists). */
|
|
250
|
+
readonly options?: readonly string[]
|
|
251
|
+
/** The labels the person picked. */
|
|
252
|
+
readonly picked?: readonly string[]
|
|
253
|
+
/** What the person typed: their own words when nothing was picked, or a note beside the pick. */
|
|
254
|
+
readonly freeText?: string
|
|
255
|
+
readonly answered: boolean
|
|
256
|
+
}[]
|
|
257
|
+
}
|
|
236
258
|
| {
|
|
237
259
|
readonly kind: 'failure'
|
|
238
260
|
readonly reason: ToolFailureReason
|