@qvac/harness 1.0.0-rc.2 → 1.0.0-rc.20
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/.nvmrc +1 -0
- package/CHANGELOG.md +3050 -1485
- package/README.md +110 -46
- package/dist-lib/index.d.ts +60 -15
- package/dist-lib/index.js +228 -35
- package/dist-lib/lib/agent/delegate.d.ts +3 -2
- package/dist-lib/lib/agent/delegate.js +6 -4
- package/dist-lib/lib/agent/follow.d.ts +5 -0
- package/dist-lib/lib/agent/follow.js +11 -2
- package/dist-lib/lib/agent/resolve.js +29 -17
- package/dist-lib/lib/agent/tool-selection.d.ts +4 -2
- package/dist-lib/lib/agent/tool-selection.js +5 -6
- package/dist-lib/lib/agent/tools.d.ts +2 -0
- package/dist-lib/lib/agent/tools.js +2 -1
- package/dist-lib/lib/capabilities/agent-ports.d.ts +1 -1
- package/dist-lib/lib/capabilities/agent-ports.js +11 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/batching.js +1 -0
- package/dist-lib/lib/capabilities/completion-engine/actors/direct-search.js +2 -0
- package/dist-lib/lib/capabilities/completion-engine/actors/executing.d.ts +2 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/executing.js +129 -12
- package/dist-lib/lib/capabilities/completion-engine/actors/execution-plan.js +10 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/inspect-prepare.js +3 -2
- package/dist-lib/lib/capabilities/completion-engine/actors/inspecting.d.ts +1 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/inspecting.js +54 -10
- package/dist-lib/lib/capabilities/completion-engine/actors/loading-skill.d.ts +1 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/loading-skill.js +10 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/preparing.js +137 -50
- package/dist-lib/lib/capabilities/completion-engine/actors/rejecting.js +10 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/resolving.js +69 -17
- package/dist-lib/lib/capabilities/completion-engine/actors/retrieving.d.ts +2 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/retrieving.js +33 -16
- package/dist-lib/lib/capabilities/completion-engine/actors/run-prepare.js +36 -22
- package/dist-lib/lib/capabilities/completion-engine/actors/skill-step.js +50 -12
- package/dist-lib/lib/capabilities/completion-engine/actors/stream.d.ts +10 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/stream.js +80 -3
- package/dist-lib/lib/capabilities/completion-engine/actors/streaming.d.ts +5 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/streaming.js +95 -35
- package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.d.ts +2 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.js +55 -16
- package/dist-lib/lib/capabilities/completion-engine/driver.js +58 -15
- package/dist-lib/lib/capabilities/completion-engine/durable.d.ts +3 -1
- package/dist-lib/lib/capabilities/completion-engine/durable.js +12 -2
- package/dist-lib/lib/capabilities/completion-engine/engine.d.ts +4 -1
- package/dist-lib/lib/capabilities/completion-engine/engine.js +14 -1
- package/dist-lib/lib/capabilities/completion-engine/index.d.ts +5 -1
- package/dist-lib/lib/capabilities/completion-engine/index.js +5 -2
- package/dist-lib/lib/capabilities/completion-engine/loop.d.ts +25 -3
- package/dist-lib/lib/capabilities/completion-engine/loop.js +13 -2
- package/dist-lib/lib/capabilities/completion-engine/metrics.d.ts +9 -2
- package/dist-lib/lib/capabilities/completion-engine/metrics.js +28 -7
- package/dist-lib/lib/capabilities/completion-engine/model-round.d.ts +63 -0
- package/dist-lib/lib/capabilities/completion-engine/model-round.js +99 -0
- package/dist-lib/lib/capabilities/completion-engine/operations.js +30 -10
- package/dist-lib/lib/capabilities/completion-engine/ports.js +6 -9
- package/dist-lib/lib/capabilities/completion-engine/prepare-step.d.ts +4 -1
- package/dist-lib/lib/capabilities/completion-engine/round.d.ts +38 -6
- package/dist-lib/lib/capabilities/completion-engine/round.js +393 -116
- package/dist-lib/lib/capabilities/completion-engine/session.d.ts +12 -4
- package/dist-lib/lib/capabilities/completion-engine/session.js +31 -2
- package/dist-lib/lib/capabilities/completion-engine/tool-caller.js +3 -2
- package/dist-lib/lib/capabilities/completion-engine/tool-execution.d.ts +5 -4
- package/dist-lib/lib/capabilities/completion-engine/tool-execution.js +32 -12
- package/dist-lib/lib/capabilities/completion-engine/tool-sets.d.ts +24 -0
- package/dist-lib/lib/capabilities/completion-engine/tool-sets.js +15 -0
- package/dist-lib/lib/capabilities/completion-engine/turns.d.ts +17 -9
- package/dist-lib/lib/capabilities/completion-engine/turns.js +96 -87
- package/dist-lib/lib/capabilities/detect-language.d.ts +2 -1
- package/dist-lib/lib/capabilities/detect-language.js +14 -2
- package/dist-lib/lib/capabilities/download.d.ts +10 -8
- package/dist-lib/lib/capabilities/download.js +1 -1
- package/dist-lib/lib/capabilities/enhance.d.ts +1 -1
- package/dist-lib/lib/capabilities/enhance.js +23 -11
- package/dist-lib/lib/capabilities/kv-cache.d.ts +1 -1
- package/dist-lib/lib/capabilities/preview-model-source.d.ts +7 -0
- package/dist-lib/lib/capabilities/preview-model-source.js +83 -23
- package/dist-lib/lib/capabilities/prompt-prefix.d.ts +3 -1
- package/dist-lib/lib/capabilities/prompt-prefix.js +8 -0
- package/dist-lib/lib/capabilities/sdk-tool.d.ts +13 -4
- package/dist-lib/lib/capabilities/sdk-tool.js +59 -7
- package/dist-lib/lib/capabilities/skill-entry.d.ts +13 -1
- package/dist-lib/lib/capabilities/skill-entry.js +33 -2
- package/dist-lib/lib/capabilities/tool-failed-note.d.ts +1 -0
- package/dist-lib/lib/capabilities/tool-failed-note.js +1 -0
- package/dist-lib/lib/capabilities/tool-plan.d.ts +5 -1
- package/dist-lib/lib/capabilities/tool-plan.js +20 -5
- package/dist-lib/lib/capabilities/tool-prompt-log.d.ts +1 -1
- package/dist-lib/lib/capabilities/tool-prompt-log.js +3 -3
- package/dist-lib/lib/capabilities/tool-turns.d.ts +20 -9
- package/dist-lib/lib/capabilities/tool-turns.js +77 -49
- package/dist-lib/lib/capabilities/usage-breakdown.d.ts +1 -0
- package/dist-lib/lib/capabilities/usage-breakdown.js +4 -1
- package/dist-lib/lib/client/index.d.ts +19 -0
- package/dist-lib/lib/client/index.js +263 -0
- package/dist-lib/lib/connect.d.ts +19 -10
- package/dist-lib/lib/connect.js +239 -32
- package/dist-lib/lib/context-window.d.ts +2 -0
- package/dist-lib/lib/context-window.js +9 -3
- package/dist-lib/lib/contract/agent.d.ts +13 -3
- package/dist-lib/lib/contract/completion.d.ts +77 -31
- package/dist-lib/lib/contract/drive.d.ts +4 -0
- package/dist-lib/lib/contract/drive.js +1 -0
- package/dist-lib/lib/contract/egress-proxy.d.ts +13 -0
- package/dist-lib/lib/contract/egress-proxy.js +1 -0
- package/dist-lib/lib/contract/exec.d.ts +4 -3
- package/dist-lib/lib/contract/hooks.d.ts +4 -1
- package/dist-lib/lib/contract/index.d.ts +4 -0
- package/dist-lib/lib/contract/knowledge.d.ts +10 -0
- package/dist-lib/lib/contract/managed-skills.d.ts +1 -0
- package/dist-lib/lib/contract/managed-skills.js +1 -0
- package/dist-lib/lib/contract/media.d.ts +58 -0
- package/dist-lib/lib/contract/media.js +1 -0
- package/dist-lib/lib/contract/models.d.ts +12 -6
- package/dist-lib/lib/contract/ocr.d.ts +13 -0
- package/dist-lib/lib/contract/ocr.js +1 -0
- package/dist-lib/lib/contract/policy.d.ts +75 -0
- package/dist-lib/lib/contract/policy.js +1 -0
- package/dist-lib/lib/contract/run.d.ts +28 -3
- package/dist-lib/lib/contract/sandbox.d.ts +3 -1
- package/dist-lib/lib/contract/speech.d.ts +1 -1
- package/dist-lib/lib/contract/translation.d.ts +20 -0
- package/dist-lib/lib/contract/translation.js +1 -0
- package/dist-lib/lib/contract-types.d.ts +46 -16
- package/dist-lib/lib/embeddings/index.d.ts +7 -1
- package/dist-lib/lib/embeddings/index.js +26 -5
- package/dist-lib/lib/errors.d.ts +278 -0
- package/dist-lib/lib/errors.js +212 -0
- package/dist-lib/lib/fold/index.d.ts +26 -1
- package/dist-lib/lib/fold/index.js +76 -9
- package/dist-lib/lib/guarded-fetch.js +11 -7
- package/dist-lib/lib/guards.d.ts +2 -0
- package/dist-lib/lib/guards.js +7 -0
- package/dist-lib/lib/hardware/capability-probe.js +10 -7
- package/dist-lib/lib/hardware/cpu-placement.d.ts +8 -0
- package/dist-lib/lib/hardware/cpu-placement.js +48 -0
- package/dist-lib/lib/hardware/gpu-probe-addon.js +26 -11
- package/dist-lib/lib/hardware/gpu-probe.js +10 -1
- package/dist-lib/lib/hardware/gpu-stats.native.cjs +17 -1
- package/dist-lib/lib/helpers/completion-params.d.ts +7 -2
- package/dist-lib/lib/helpers/completion-params.js +26 -2
- package/dist-lib/lib/helpers/control-tokens.d.ts +3 -0
- package/dist-lib/lib/helpers/control-tokens.js +25 -0
- package/dist-lib/lib/helpers/engine-error.d.ts +2 -1
- package/dist-lib/lib/helpers/engine-error.js +12 -12
- package/dist-lib/lib/helpers/goal-check.d.ts +44 -0
- package/dist-lib/lib/helpers/goal-check.js +407 -0
- package/dist-lib/lib/helpers/head-tail.js +1 -1
- package/dist-lib/lib/helpers/html-helpers.js +9 -6
- package/dist-lib/lib/helpers/load-stall.d.ts +1 -1
- package/dist-lib/lib/helpers/load-stall.js +2 -2
- package/dist-lib/lib/helpers/markup-stream-filter.d.ts +4 -1
- package/dist-lib/lib/helpers/markup-stream-filter.js +20 -6
- package/dist-lib/lib/helpers/repeated-reply.js +24 -16
- package/dist-lib/lib/helpers/require-peers.d.ts +3 -0
- package/dist-lib/lib/helpers/require-peers.js +23 -0
- package/dist-lib/lib/helpers/run-outcome.d.ts +2 -0
- package/dist-lib/lib/helpers/run-outcome.js +6 -2
- package/dist-lib/lib/helpers/spawn-path.d.ts +1 -0
- package/dist-lib/lib/helpers/spawn-path.js +2 -1
- package/dist-lib/lib/helpers/thinking.d.ts +3 -2
- package/dist-lib/lib/helpers/thinking.js +19 -0
- package/dist-lib/lib/hooks/built-in/arg-repair.js +6 -2
- package/dist-lib/lib/hooks/built-in/policy-rules.d.ts +8 -0
- package/dist-lib/lib/hooks/built-in/policy-rules.js +192 -0
- package/dist-lib/lib/hooks/built-in/sandbox.js +23 -5
- package/dist-lib/lib/hooks/index.d.ts +4 -1
- package/dist-lib/lib/hooks/index.js +9 -4
- package/dist-lib/lib/hooks/run.js +3 -3
- package/dist-lib/lib/lifecycle/index.js +15 -14
- package/dist-lib/lib/lifecycle/machine.js +2 -2
- package/dist-lib/lib/log.d.ts +26 -5
- package/dist-lib/lib/log.js +86 -23
- package/dist-lib/lib/machine/completion/actions/completion.d.ts +11 -6
- package/dist-lib/lib/machine/completion/actions/completion.js +251 -35
- package/dist-lib/lib/machine/completion/actions/prepare.js +1 -1
- package/dist-lib/lib/machine/completion/actions/tools.js +122 -6
- package/dist-lib/lib/machine/completion/context.js +11 -1
- package/dist-lib/lib/machine/completion/guards/retry.d.ts +3 -1
- package/dist-lib/lib/machine/completion/guards/retry.js +9 -2
- package/dist-lib/lib/machine/completion/implementations.d.ts +16 -7
- package/dist-lib/lib/machine/completion/implementations.js +59 -15
- package/dist-lib/lib/machine/completion/machine.d.ts +36 -7
- package/dist-lib/lib/machine/completion/machine.js +58 -9
- package/dist-lib/lib/machine/completion/rules.d.ts +23 -2
- package/dist-lib/lib/machine/completion/rules.js +91 -6
- package/dist-lib/lib/machine/completion/types.d.ts +77 -1
- package/dist-lib/lib/machine/index.d.ts +48 -9
- package/dist-lib/lib/machine/index.js +11 -1
- package/dist-lib/lib/media-host.d.ts +12 -0
- package/dist-lib/lib/media-host.js +52 -0
- package/dist-lib/lib/media-port.d.ts +20 -0
- package/dist-lib/lib/media-port.js +77 -0
- package/dist-lib/lib/media-wire.d.ts +8 -0
- package/dist-lib/lib/media-wire.js +111 -0
- package/dist-lib/lib/models/context-choice.d.ts +15 -0
- package/dist-lib/lib/models/context-choice.js +62 -0
- package/dist-lib/lib/models/context.d.ts +1 -1
- package/dist-lib/lib/models/custom-model-cache.d.ts +1 -0
- package/dist-lib/lib/models/custom-model-cache.js +3 -0
- package/dist-lib/lib/models/download-gate.d.ts +20 -0
- package/dist-lib/lib/models/download-gate.js +73 -0
- package/dist-lib/lib/models/gguf-header.d.ts +11 -0
- package/dist-lib/lib/models/gguf-header.js +203 -15
- package/dist-lib/lib/models/gpu-selection.d.ts +6 -1
- package/dist-lib/lib/models/gpu-selection.js +29 -5
- package/dist-lib/lib/models/kv-cache.d.ts +2 -0
- package/dist-lib/lib/models/kv-cache.js +8 -0
- package/dist-lib/lib/models/llm-presets.d.ts +6 -1
- package/dist-lib/lib/models/llm-presets.js +33 -6
- package/dist-lib/lib/models/load-requests.d.ts +9 -0
- package/dist-lib/lib/models/load-requests.js +42 -0
- package/dist-lib/lib/models/memory-cap.d.ts +13 -0
- package/dist-lib/lib/models/memory-cap.js +21 -0
- package/dist-lib/lib/models/model-catalog-constants.d.ts +2 -2
- package/dist-lib/lib/models/model-catalog-constants.js +3 -4
- package/dist-lib/lib/models/model-catalog.d.ts +7 -3
- package/dist-lib/lib/models/model-catalog.js +44 -11
- package/dist-lib/lib/models/model-delete.d.ts +1 -1
- package/dist-lib/lib/models/model-fit.d.ts +2 -2
- package/dist-lib/lib/models/model-fit.js +5 -6
- package/dist-lib/lib/models/model-handle.d.ts +9 -2
- package/dist-lib/lib/models/model-handle.js +14 -3
- package/dist-lib/lib/models/model-list.d.ts +9 -2
- package/dist-lib/lib/models/model-list.js +23 -0
- package/dist-lib/lib/models/model-pool.d.ts +42 -7
- package/dist-lib/lib/models/model-pool.js +139 -49
- package/dist-lib/lib/models/model-source.d.ts +3 -2
- package/dist-lib/lib/models/model-source.js +23 -5
- package/dist-lib/lib/models/opencl-cache.js +2 -2
- package/dist-lib/lib/models/sdk-faults.d.ts +1 -0
- package/dist-lib/lib/models/sdk-faults.js +9 -0
- package/dist-lib/lib/models/tool-dialect.d.ts +1 -1
- package/dist-lib/lib/models/tts-model-default.d.ts +2 -1
- package/dist-lib/lib/models/tts-model-default.js +8 -6
- package/dist-lib/lib/no-redirect-fetch-bare.js +2 -1
- package/dist-lib/lib/no-redirect-fetch-impl.d.ts +2 -1
- package/dist-lib/lib/no-redirect-fetch-impl.js +46 -8
- package/dist-lib/lib/office/engine/pptx/picture-area.d.ts +23 -0
- package/dist-lib/lib/office/engine/pptx/picture-area.js +84 -0
- package/dist-lib/lib/office/engine/pptx/presentation.d.ts +2 -0
- package/dist-lib/lib/office/engine/pptx/presentation.js +64 -21
- package/dist-lib/lib/office/engine/pptx/types.d.ts +1 -0
- package/dist-lib/lib/office/engine/xlsx/sheet.js +10 -4
- package/dist-lib/lib/office/engine/xlsx/workbook.d.ts +1 -0
- package/dist-lib/lib/office/engine/xlsx/workbook.js +34 -3
- package/dist-lib/lib/office/extract.js +4 -3
- package/dist-lib/lib/office/index.js +2 -1
- package/dist-lib/lib/plugins/registry.d.ts +15 -0
- package/dist-lib/lib/plugins/registry.js +91 -22
- package/dist-lib/lib/plugins/require-bare.d.ts +1 -0
- package/dist-lib/lib/plugins/require-bare.js +13 -0
- package/dist-lib/lib/policy/index.d.ts +11 -0
- package/dist-lib/lib/policy/index.js +235 -0
- package/dist-lib/lib/prompt.d.ts +9 -4
- package/dist-lib/lib/prompt.js +95 -32
- package/dist-lib/lib/residency/completion-runtime.d.ts +15 -5
- package/dist-lib/lib/residency/completion-runtime.js +47 -36
- package/dist-lib/lib/residency/index.d.ts +56 -4
- package/dist-lib/lib/residency/index.js +442 -40
- package/dist-lib/lib/resolution-detector.js +3 -3
- package/dist-lib/lib/round-host.d.ts +12 -0
- package/dist-lib/lib/round-host.js +57 -0
- package/dist-lib/lib/round-port.d.ts +24 -0
- package/dist-lib/lib/round-port.js +81 -0
- package/dist-lib/lib/rpc-session.js +2 -1
- package/dist-lib/lib/run-log/request-codec.js +2 -2
- package/dist-lib/lib/sdk-loader.d.ts +1 -1
- package/dist-lib/lib/sdk-loader.js +47 -17
- package/dist-lib/lib/sdk-storage.d.ts +1 -0
- package/dist-lib/lib/sdk-storage.js +18 -2
- package/dist-lib/lib/serve.js +242 -50
- package/dist-lib/lib/sidecar/index.d.ts +39 -0
- package/dist-lib/lib/sidecar/index.js +205 -0
- package/dist-lib/lib/sidecar/user-plugins.d.ts +9 -0
- package/dist-lib/lib/sidecar/user-plugins.js +119 -0
- package/dist-lib/lib/skills-host/index.d.ts +3 -1
- package/dist-lib/lib/skills-host/index.js +27 -14
- package/dist-lib/lib/spawn.d.ts +6 -4
- package/dist-lib/lib/spawn.js +22 -20
- package/dist-lib/lib/spill.d.ts +1 -0
- package/dist-lib/lib/spill.js +12 -8
- package/dist-lib/lib/tools/ask-user.d.ts +2 -0
- package/dist-lib/lib/tools/ask-user.js +137 -0
- package/dist-lib/lib/tools/attachments/delivered.d.ts +5 -0
- package/dist-lib/lib/tools/attachments/delivered.js +16 -0
- package/dist-lib/lib/tools/attachments/fetched-file.d.ts +32 -0
- package/dist-lib/lib/tools/attachments/fetched-file.js +134 -0
- package/dist-lib/lib/tools/attachments/staging.d.ts +1 -0
- package/dist-lib/lib/tools/attachments/staging.js +19 -8
- package/dist-lib/lib/tools/exec/runner.d.ts +4 -0
- package/dist-lib/lib/tools/exec/runner.js +20 -2
- package/dist-lib/lib/tools/exec/scope.d.ts +0 -1
- package/dist-lib/lib/tools/exec/scope.js +23 -114
- package/dist-lib/lib/tools/exec/shell-guidance.js +4 -4
- package/dist-lib/lib/tools/exec/shell-line.d.ts +26 -0
- package/dist-lib/lib/tools/exec/shell-line.js +334 -0
- package/dist-lib/lib/tools/exec.d.ts +4 -1
- package/dist-lib/lib/tools/exec.js +89 -27
- package/dist-lib/lib/tools/files/edit-file.d.ts +6 -0
- package/dist-lib/lib/tools/files/edit-file.js +266 -0
- package/dist-lib/lib/tools/files/glob.d.ts +3 -0
- package/dist-lib/lib/tools/files/glob.js +65 -0
- package/dist-lib/lib/tools/files/grep.d.ts +6 -0
- package/dist-lib/lib/tools/files/grep.js +212 -0
- package/dist-lib/lib/tools/files/index.d.ts +3 -0
- package/dist-lib/lib/tools/files/index.js +25 -0
- package/dist-lib/lib/tools/files/list-dir.d.ts +6 -0
- package/dist-lib/lib/tools/files/list-dir.js +136 -0
- package/dist-lib/lib/tools/files/make-dir.d.ts +3 -0
- package/dist-lib/lib/tools/files/make-dir.js +48 -0
- package/dist-lib/lib/tools/files/read-file.d.ts +3 -0
- package/dist-lib/lib/tools/files/read-file.js +224 -0
- package/dist-lib/lib/tools/files/transfer.d.ts +4 -0
- package/dist-lib/lib/tools/files/transfer.js +83 -0
- package/dist-lib/lib/tools/files/trash-file.d.ts +4 -0
- package/dist-lib/lib/tools/files/trash-file.js +62 -0
- package/dist-lib/lib/tools/files/write-file.d.ts +3 -0
- package/dist-lib/lib/tools/files/write-file.js +56 -0
- package/dist-lib/lib/tools/fs/document-text.d.ts +8 -0
- package/dist-lib/lib/tools/fs/document-text.js +22 -0
- package/dist-lib/lib/tools/fs/drive.d.ts +10 -14
- package/dist-lib/lib/tools/fs/drive.js +9 -1
- package/dist-lib/lib/tools/fs/edit-match.d.ts +33 -0
- package/dist-lib/lib/tools/fs/edit-match.js +445 -0
- package/dist-lib/lib/tools/fs/ignore.d.ts +13 -0
- package/dist-lib/lib/tools/fs/ignore.js +104 -0
- package/dist-lib/lib/tools/fs/local.js +28 -5
- package/dist-lib/lib/tools/fs/remote-protocol.d.ts +45 -3
- package/dist-lib/lib/tools/fs/remote-protocol.js +1 -1
- package/dist-lib/lib/tools/fs/remote.d.ts +3 -11
- package/dist-lib/lib/tools/fs/remote.js +24 -14
- package/dist-lib/lib/tools/fs/scope.d.ts +5 -1
- package/dist-lib/lib/tools/fs/scope.js +5 -2
- package/dist-lib/lib/tools/fs/search.d.ts +41 -0
- package/dist-lib/lib/tools/fs/search.js +383 -0
- package/dist-lib/lib/tools/{file-glob.d.ts → fs/targets.d.ts} +1 -5
- package/dist-lib/lib/tools/fs/targets.js +32 -0
- package/dist-lib/lib/tools/fs/tool-path.d.ts +27 -0
- package/dist-lib/lib/tools/fs/tool-path.js +70 -0
- package/dist-lib/lib/tools/fs/walk.d.ts +16 -3
- package/dist-lib/lib/tools/fs/walk.js +119 -24
- package/dist-lib/lib/tools/http-request/request.d.ts +4 -2
- package/dist-lib/lib/tools/http-request/request.js +2 -1
- package/dist-lib/lib/tools/http-request/truncate-response.d.ts +16 -1
- package/dist-lib/lib/tools/http-request/truncate-response.js +56 -11
- package/dist-lib/lib/tools/http-request.d.ts +1 -0
- package/dist-lib/lib/tools/http-request.js +101 -16
- package/dist-lib/lib/tools/index.d.ts +4 -1
- package/dist-lib/lib/tools/index.js +8 -12
- package/dist-lib/lib/tools/office/ops.d.ts +1 -0
- package/dist-lib/lib/tools/office/ops.js +5 -1
- package/dist-lib/lib/tools/office.d.ts +2 -1
- package/dist-lib/lib/tools/office.js +273 -56
- package/dist-lib/lib/tools/operations/builders.d.ts +4 -3
- package/dist-lib/lib/tools/operations/builders.js +41 -3
- package/dist-lib/lib/tools/operations/calendar-range.d.ts +16 -0
- package/dist-lib/lib/tools/operations/calendar-range.js +40 -0
- package/dist-lib/lib/tools/operations/compile.js +8 -6
- package/dist-lib/lib/tools/operations/manifest.d.ts +4 -0
- package/dist-lib/lib/tools/pdf/build.d.ts +15 -1
- package/dist-lib/lib/tools/pdf/build.js +77 -16
- package/dist-lib/lib/tools/pdf/pages.d.ts +12 -0
- package/dist-lib/lib/tools/pdf/pages.js +31 -0
- package/dist-lib/lib/tools/pdf/recognize.d.ts +13 -0
- package/dist-lib/lib/tools/pdf/recognize.js +59 -0
- package/dist-lib/lib/tools/pdf.js +56 -12
- package/dist-lib/lib/tools/skill.js +10 -7
- package/dist-lib/lib/tools/skills/bundled-dir.d.ts +5 -1
- package/dist-lib/lib/tools/skills/bundled-dir.js +27 -24
- package/dist-lib/lib/tools/skills/catalog.d.ts +3 -1
- package/dist-lib/lib/tools/skills/catalog.js +7 -3
- package/dist-lib/lib/tools/skills/cli-argv.js +25 -5
- package/dist-lib/lib/tools/skills/cli-schema-check.d.ts +1 -0
- package/dist-lib/lib/tools/skills/cli-schema-check.js +3 -0
- package/dist-lib/lib/tools/skills/cli-schema-load.js +10 -0
- package/dist-lib/lib/tools/skills/cli-schema-types.d.ts +2 -0
- package/dist-lib/lib/tools/skills/cli-schema.js +6 -3
- package/dist-lib/lib/tools/skills/credential-check.d.ts +1 -0
- package/dist-lib/lib/tools/skills/credential-check.js +3 -0
- package/dist-lib/lib/tools/skills/credential-health.js +3 -3
- package/dist-lib/lib/tools/skills/frontmatter-parser.d.ts +3 -0
- package/dist-lib/lib/tools/skills/frontmatter-parser.js +5 -0
- package/dist-lib/lib/tools/skills/manifest-parse.d.ts +1 -0
- package/dist-lib/lib/tools/skills/manifest-parse.js +39 -3
- package/dist-lib/lib/tools/skills/manifest.d.ts +1 -0
- package/dist-lib/lib/tools/skills/mention-name.d.ts +6 -0
- package/dist-lib/lib/tools/skills/mention-name.js +6 -0
- package/dist-lib/lib/tools/skills/mention.d.ts +2 -2
- package/dist-lib/lib/tools/skills/mention.js +11 -4
- package/dist-lib/lib/tools/skills/overlay-crud.d.ts +3 -3
- package/dist-lib/lib/tools/skills/overlay-crud.js +7 -6
- package/dist-lib/lib/tools/skills/overlay-watch.d.ts +2 -2
- package/dist-lib/lib/tools/skills/overlay-watch.js +4 -3
- package/dist-lib/lib/tools/skills/scope-key.d.ts +1 -0
- package/dist-lib/lib/tools/skills/scope-key.js +4 -0
- package/dist-lib/lib/tools/skills/skill-state-constants.d.ts +1 -0
- package/dist-lib/lib/tools/skills/skill-state-constants.js +4 -0
- package/dist-lib/lib/tools/url-guard.d.ts +6 -1
- package/dist-lib/lib/tools/url-guard.js +8 -2
- package/dist-lib/lib/tools/web-fetch.js +50 -133
- package/dist-lib/lib/wire.d.ts +13 -0
- package/dist-lib/lib/wire.js +78 -6
- package/dist-lib/plugins/coding/index.d.ts +1 -1
- package/dist-lib/plugins/coding/index.js +2 -4
- package/dist-lib/plugins/coding/read-only.d.ts +1 -0
- package/dist-lib/plugins/coding/read-only.js +264 -0
- package/dist-lib/plugins/coding/session.d.ts +6 -4
- package/dist-lib/plugins/coding/session.js +45 -16
- package/dist-lib/plugins/coding-guards/index.d.ts +25 -0
- package/dist-lib/plugins/coding-guards/index.js +126 -0
- package/dist-lib/plugins/command-hooks/index.js +5 -3
- package/dist-lib/plugins/egress-proxy/index.d.ts +53 -0
- package/dist-lib/plugins/egress-proxy/index.js +184 -0
- package/dist-lib/plugins/image/edit-image.d.ts +3 -22
- package/dist-lib/plugins/image/edit-image.js +23 -46
- package/dist-lib/plugins/image/fit.d.ts +31 -0
- package/dist-lib/plugins/image/fit.js +28 -0
- package/dist-lib/plugins/image/generate-image.d.ts +27 -6
- package/dist-lib/plugins/image/generate-image.js +201 -74
- package/dist-lib/plugins/image/index.d.ts +2 -1
- package/dist-lib/plugins/image/index.js +29 -12
- package/dist-lib/plugins/knowledge/index.d.ts +3 -0
- package/dist-lib/plugins/knowledge/index.js +5 -0
- package/dist-lib/plugins/knowledge/manifest.d.ts +53 -0
- package/dist-lib/plugins/knowledge/manifest.js +86 -0
- package/dist-lib/plugins/knowledge/search-tool.js +8 -8
- package/dist-lib/plugins/knowledge/store.d.ts +45 -8
- package/dist-lib/plugins/knowledge/store.js +428 -166
- package/dist-lib/plugins/language-hint/index.d.ts +15 -0
- package/dist-lib/plugins/language-hint/index.js +54 -0
- package/dist-lib/plugins/lsp/tool.js +2 -2
- package/dist-lib/plugins/mcp/call.js +15 -4
- package/dist-lib/plugins/mcp/index.js +6 -3
- package/dist-lib/plugins/mcp/protocol.d.ts +10 -2
- package/dist-lib/plugins/mcp/protocol.js +13 -12
- package/dist-lib/plugins/mcp/server.js +1 -1
- package/dist-lib/plugins/mcp/tool-listing.d.ts +6 -0
- package/dist-lib/plugins/mcp/tool-listing.js +97 -0
- package/dist-lib/plugins/music/generate-music.d.ts +24 -5
- package/dist-lib/plugins/music/generate-music.js +170 -64
- package/dist-lib/plugins/music/index.d.ts +2 -1
- package/dist-lib/plugins/music/index.js +23 -11
- package/dist-lib/plugins/obsidian/command.js +2 -2
- package/dist-lib/plugins/obsidian/index.js +14 -4
- package/dist-lib/plugins/obsidian/note-name.js +2 -1
- package/dist-lib/plugins/obsidian/readiness.js +2 -2
- package/dist-lib/plugins/obsidian/safe-path.js +5 -4
- package/dist-lib/plugins/obsidian/vault-create.js +3 -2
- package/dist-lib/plugins/obsidian/vault-fs.js +2 -2
- package/dist-lib/plugins/obsidian/vault-paths.js +3 -2
- package/dist-lib/plugins/obsidian/vault-read.js +20 -18
- package/dist-lib/plugins/obsidian/vault-write.js +13 -12
- package/dist-lib/plugins/ocr/bmp.d.ts +2 -0
- package/dist-lib/plugins/ocr/bmp.js +27 -0
- package/dist-lib/plugins/ocr/index.d.ts +12 -0
- package/dist-lib/plugins/ocr/index.js +20 -0
- package/dist-lib/plugins/ocr/ocr-runtime.d.ts +23 -0
- package/dist-lib/plugins/ocr/ocr-runtime.js +82 -0
- package/dist-lib/plugins/ocr/reading-order.d.ts +5 -0
- package/dist-lib/plugins/ocr/reading-order.js +218 -0
- package/dist-lib/plugins/python/bare-floor.d.ts +1 -0
- package/dist-lib/plugins/python/bare-floor.js +2 -0
- package/dist-lib/plugins/python/guarded-fetch.d.ts +2 -1
- package/dist-lib/plugins/python/guarded-fetch.js +5 -1
- package/dist-lib/plugins/python/index.d.ts +4 -1
- package/dist-lib/plugins/python/index.js +6 -1
- package/dist-lib/plugins/python/interrupt-timer.js +2 -2
- package/dist-lib/plugins/python/language.js +11 -10
- package/dist-lib/plugins/python/loader.d.ts +1 -0
- package/dist-lib/plugins/python/loader.js +76 -3
- package/dist-lib/plugins/python/memfs.js +2 -2
- package/dist-lib/plugins/python/pyodide.d.ts +1 -0
- package/dist-lib/plugins/python/pyodide.js +9 -8
- package/dist-lib/plugins/python/python-adapter.d.ts +6 -1
- package/dist-lib/plugins/python/python-adapter.js +37 -2
- package/dist-lib/plugins/python/run-session.d.ts +1 -0
- package/dist-lib/plugins/python/run-session.js +19 -8
- package/dist-lib/plugins/python/wheels.js +8 -6
- package/dist-lib/plugins/python/worker/active.js +2 -2
- package/dist-lib/plugins/python/worker/client.js +10 -9
- package/dist-lib/plugins/python/worker/entry.js +2 -8
- package/dist-lib/plugins/python/worker/preload.d.ts +1 -0
- package/dist-lib/plugins/python/worker/preload.js +2 -0
- package/dist-lib/plugins/python/worker/protocol.d.ts +2 -0
- package/dist-lib/plugins/python/worker/serve.js +23 -4
- package/dist-lib/plugins/python/worker/spawn.d.ts +2 -1
- package/dist-lib/plugins/python/worker/spawn.js +3 -2
- package/dist-lib/plugins/quickjs/index.js +4 -0
- package/dist-lib/plugins/quickjs/runtime.js +8 -3
- package/dist-lib/plugins/run-report/chain.d.ts +2 -0
- package/dist-lib/plugins/run-report/chain.js +73 -0
- package/dist-lib/plugins/run-report/flow-view.js +2 -1
- package/dist-lib/plugins/run-report/flow.d.ts +1 -1
- package/dist-lib/plugins/run-report/flow.js +66 -14
- package/dist-lib/plugins/run-report/index.d.ts +23 -2
- package/dist-lib/plugins/run-report/index.js +32 -13
- package/dist-lib/plugins/run-report/layout.js +1 -1
- package/dist-lib/plugins/run-report/model.d.ts +10 -1
- package/dist-lib/plugins/run-report/model.js +12 -6
- package/dist-lib/plugins/run-report/page.d.ts +9 -0
- package/dist-lib/plugins/run-report/page.js +55 -15
- package/dist-lib/plugins/run-report/script.js +317 -43
- package/dist-lib/plugins/run-report/story.d.ts +2 -1
- package/dist-lib/plugins/run-report/story.js +7 -4
- package/dist-lib/plugins/run-report/style.d.ts +1 -1
- package/dist-lib/plugins/run-report/style.js +126 -0
- package/dist-lib/plugins/run-report/why.js +1 -1
- package/dist-lib/plugins/sandbox-linux/index.d.ts +62 -0
- package/dist-lib/plugins/sandbox-linux/index.js +354 -0
- package/dist-lib/plugins/sandbox-linux/seccomp.d.ts +2 -0
- package/dist-lib/plugins/sandbox-linux/seccomp.js +74 -0
- package/dist-lib/plugins/sandbox-macos/index.d.ts +25 -11
- package/dist-lib/plugins/sandbox-macos/index.js +244 -49
- package/dist-lib/plugins/sandbox-vm/index.d.ts +2 -1
- package/dist-lib/plugins/sandbox-vm/index.js +5 -2
- package/dist-lib/plugins/sandbox-vm/vm-shell.d.ts +7 -3
- package/dist-lib/plugins/sandbox-vm/vm-shell.js +54 -20
- package/dist-lib/plugins/sandbox-windows/helper/qvac-sandbox.c +554 -0
- package/dist-lib/plugins/sandbox-windows/index.d.ts +53 -0
- package/dist-lib/plugins/sandbox-windows/index.js +205 -0
- package/dist-lib/plugins/sandbox-windows/prebuilds/win32-arm64/qvac-sandbox.exe +0 -0
- package/dist-lib/plugins/sandbox-windows/prebuilds/win32-x64/qvac-sandbox.exe +0 -0
- package/dist-lib/plugins/speech/audio-resample.d.ts +1 -1
- package/dist-lib/plugins/speech/audio-resample.js +8 -8
- package/dist-lib/plugins/speech/audio-transcode-bare.d.ts +1 -1
- package/dist-lib/plugins/speech/audio-transcode-bare.js +23 -26
- package/dist-lib/plugins/speech/audio-transcode-node.d.ts +1 -1
- package/dist-lib/plugins/speech/audio-transcode-node.js +1 -3
- package/dist-lib/plugins/speech/index.d.ts +1 -0
- package/dist-lib/plugins/speech/index.js +8 -1
- package/dist-lib/plugins/speech/speech-engine.d.ts +1 -1
- package/dist-lib/plugins/speech/speech-engine.js +10 -5
- package/dist-lib/plugins/speech/speech-runtime.js +37 -37
- package/dist-lib/plugins/speech/speech-text.d.ts +1 -0
- package/dist-lib/plugins/speech/speech-text.js +9 -4
- package/dist-lib/plugins/speech/voice.d.ts +5 -1
- package/dist-lib/plugins/speech/voice.js +107 -33
- package/dist-lib/plugins/translation/index.d.ts +2 -1
- package/dist-lib/plugins/translation/index.js +21 -10
- package/dist-lib/plugins/translation/translate.d.ts +9 -5
- package/dist-lib/plugins/translation/translate.js +69 -64
- package/dist-lib/plugins/walkie-talkie/index.d.ts +4 -2
- package/dist-lib/plugins/walkie-talkie/index.js +19 -6
- package/dist-lib/plugins/walkie-talkie/wire.d.ts +5 -0
- package/dist-lib/plugins/walkie-talkie/wire.js +6 -5
- package/dist-lib/plugins/weather/geocode.js +2 -1
- package/dist-lib/plugins/weather/lookup.js +6 -4
- package/dist-lib/plugins/web-search/engines/bing.js +2 -1
- package/dist-lib/plugins/web-search/engines/google.js +2 -1
- package/dist-lib/plugins/web-search/fetch-html.d.ts +5 -5
- package/dist-lib/plugins/web-search/fetch-html.js +12 -15
- package/dist-lib/plugins/web-search/tool.js +1 -0
- package/dist-lib/schema/generate.js +8 -1
- package/dist-lib/schema/harness.js +91 -12
- package/dist-lib/spec/bind.js +12 -0
- package/dist-lib/spec/calls.js +4 -0
- package/dist-lib/spec/hrpc/hrpc.json +55 -3
- package/dist-lib/spec/hrpc/index.js +58 -10
- package/dist-lib/spec/hrpc/messages.js +461 -209
- package/dist-lib/spec/hyperschema/index.js +461 -209
- package/dist-lib/spec/hyperschema/schema.json +285 -85
- package/dist-lib/spec/hyperschema/types.d.ts +41 -5
- package/package.json +264 -64
- package/patches/pyodide@314.0.2.patch +37 -8
- package/scripts/addon-externals.cjs +16 -5
- package/worker/harness-sidecar.mjs +23 -154
- package/dist-lib/lib/tools/create-documents.d.ts +0 -3
- package/dist-lib/lib/tools/create-documents.js +0 -95
- package/dist-lib/lib/tools/edit-documents.d.ts +0 -3
- package/dist-lib/lib/tools/edit-documents.js +0 -132
- package/dist-lib/lib/tools/exec/shell-argv.d.ts +0 -2
- package/dist-lib/lib/tools/exec/shell-argv.js +0 -61
- package/dist-lib/lib/tools/file-glob.js +0 -118
- package/dist-lib/lib/tools/grep.d.ts +0 -5
- package/dist-lib/lib/tools/grep.js +0 -184
- package/dist-lib/lib/tools/read-files.d.ts +0 -5
- package/dist-lib/lib/tools/read-files.js +0 -160
- package/dist-lib/plugins/coding/write-file.d.ts +0 -3
- package/dist-lib/plugins/coding/write-file.js +0 -52
- package/patches/@qvac%2Finference@0.21.0.patch +0 -67
- package/patches/bare-stow@0.1.5.patch +0 -68
- package/patches/hypercore-blob-server@1.15.0.patch +0 -15
- package/patches/localwatch@1.4.3.patch +0 -13
|
@@ -98,6 +98,12 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
98
98
|
deadline: ({ context }) => {
|
|
99
99
|
const deadline = context.durable?.runBudget.deadlineMs;
|
|
100
100
|
return deadline === undefined ? MAX_DELAY : clamp(deadline - now());
|
|
101
|
+
},
|
|
102
|
+
halfTime: ({ context }) => {
|
|
103
|
+
const budget = context.durable?.runBudget;
|
|
104
|
+
return budget?.totalMs === undefined
|
|
105
|
+
? MAX_DELAY
|
|
106
|
+
: clamp(budget.deadlineMs - budget.totalMs / 2 - now());
|
|
101
107
|
}
|
|
102
108
|
}
|
|
103
109
|
}).createMachine({
|
|
@@ -139,7 +145,10 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
139
145
|
states: {
|
|
140
146
|
active: {
|
|
141
147
|
initial: 'idle',
|
|
142
|
-
after: {
|
|
148
|
+
after: {
|
|
149
|
+
deadline: { actions: 'markTimeUp' },
|
|
150
|
+
halfTime: { actions: 'markHalfTime' }
|
|
151
|
+
},
|
|
143
152
|
on: {
|
|
144
153
|
PAUSE: { target: '#completion.pausing', actions: 'recordPause' },
|
|
145
154
|
FAIL: [
|
|
@@ -292,6 +301,16 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
292
301
|
target: 'tools',
|
|
293
302
|
actions: { type: 'resolveTools', params: ({ event }) => event.output }
|
|
294
303
|
},
|
|
304
|
+
{
|
|
305
|
+
guard: and(['roundCut', or(['canRetryCut', 'timeUp'])]),
|
|
306
|
+
target: 'round',
|
|
307
|
+
actions: [nextRoundAck, 'retryCutRound']
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
guard: 'roundCut',
|
|
311
|
+
target: 'wrapping',
|
|
312
|
+
actions: [sameRoundAck, 'wrapCutCompletion']
|
|
313
|
+
},
|
|
295
314
|
{
|
|
296
315
|
guard: 'malformedToolCall',
|
|
297
316
|
target: 'round',
|
|
@@ -309,8 +328,21 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
309
328
|
guard: 'hasAnswer',
|
|
310
329
|
target: 'answering'
|
|
311
330
|
},
|
|
312
|
-
{
|
|
313
|
-
|
|
331
|
+
{
|
|
332
|
+
guard: 'canMuteRetry',
|
|
333
|
+
target: 'round',
|
|
334
|
+
actions: [
|
|
335
|
+
{ type: 'resetCutRound', params: ({ event }) => event.output },
|
|
336
|
+
{ type: 'retryMuteRound', params: ({ event }) => event.output }
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
target: 'wrapping',
|
|
341
|
+
actions: [
|
|
342
|
+
{ type: 'resetCutRound', params: ({ event }) => event.output },
|
|
343
|
+
{ type: 'wrapMuteCompletion', params: ({ event }) => event.output }
|
|
344
|
+
]
|
|
345
|
+
}
|
|
314
346
|
]
|
|
315
347
|
}
|
|
316
348
|
},
|
|
@@ -321,12 +353,12 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
321
353
|
input: withParent,
|
|
322
354
|
onDone: [
|
|
323
355
|
{
|
|
324
|
-
guard: and(['
|
|
356
|
+
guard: and(['hasFollowUp', 'hasRoundsLeft', not('timeUp')]),
|
|
325
357
|
target: 'retrieving',
|
|
326
358
|
actions: [
|
|
327
359
|
{ type: 'answerCompletion', params: ({ event }) => event.output },
|
|
328
|
-
'
|
|
329
|
-
'
|
|
360
|
+
'ackFollowUps',
|
|
361
|
+
'continueWithFollowUps'
|
|
330
362
|
]
|
|
331
363
|
},
|
|
332
364
|
{
|
|
@@ -338,7 +370,13 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
338
370
|
]
|
|
339
371
|
},
|
|
340
372
|
{
|
|
341
|
-
guard: and([
|
|
373
|
+
guard: and([
|
|
374
|
+
'goalUnmet',
|
|
375
|
+
'hasRoundsLeft',
|
|
376
|
+
not('timeUp'),
|
|
377
|
+
'goalTokensLeft',
|
|
378
|
+
not('goalStalled')
|
|
379
|
+
]),
|
|
342
380
|
target: 'round',
|
|
343
381
|
actions: [
|
|
344
382
|
{ type: 'answerCompletion', params: ({ event }) => event.output },
|
|
@@ -372,7 +410,7 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
372
410
|
selecting: {
|
|
373
411
|
always: [
|
|
374
412
|
{
|
|
375
|
-
guard: and(['hasQueuedTool', '
|
|
413
|
+
guard: and(['hasQueuedTool', 'headCutOff']),
|
|
376
414
|
target: 'rejecting',
|
|
377
415
|
actions: {
|
|
378
416
|
type: 'rejectCutOffTool',
|
|
@@ -408,10 +446,21 @@ const createCompletionMachineImplementation = (context, now = noClock) => setup(
|
|
|
408
446
|
target: '#completion.active.wrapping',
|
|
409
447
|
actions: [sameRoundAck, 'wrapDeliveredCompletion']
|
|
410
448
|
},
|
|
449
|
+
{
|
|
450
|
+
guard: and([
|
|
451
|
+
'repeatsBlocked',
|
|
452
|
+
'goalUnmet',
|
|
453
|
+
'hasRoundsLeft',
|
|
454
|
+
not('timeUp'),
|
|
455
|
+
'goalTokensLeft'
|
|
456
|
+
]),
|
|
457
|
+
target: '#completion.active.round',
|
|
458
|
+
actions: [nextRoundAck, 'continueStalledGoal']
|
|
459
|
+
},
|
|
411
460
|
{
|
|
412
461
|
guard: 'repeatsBlocked',
|
|
413
462
|
target: '#completion.active.wrapping',
|
|
414
|
-
actions: [sameRoundAck, 'wrapExhaustedCompletion']
|
|
463
|
+
actions: [sameRoundAck, 'wrapExhaustedCompletion', 'markGoalStalled']
|
|
415
464
|
},
|
|
416
465
|
{
|
|
417
466
|
guard: and(['allResolvedToolsCapped', 'canRetrySearchCap', 'hasRoundsLeft']),
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import type { CompletionHistoryEntry, HistorySplice, PlanStep, RoundSpeed, RunBackendUse, ToolSpeed } from '../../contract/run.ts';
|
|
2
2
|
import { type FailureResultValue } from '../../helpers/failure-result.ts';
|
|
3
|
-
import type { CompletionStats, SettledCall, CompletionContext, ResolvedCallSnapshot, ToolPreflightFacts } from './types.ts';
|
|
3
|
+
import type { CompletionStats, GoalCheck, RunPolicy, SettledCall, CompletionContext, ResolvedCallSnapshot, ToolPreflightFacts } from './types.ts';
|
|
4
4
|
export declare function runsUnasked(facts: Pick<ToolPreflightFacts, 'effect' | 'autoApprove' | 'skipApprovals' | 'permission'>): boolean;
|
|
5
5
|
export declare const MAX_MUTE_ROUNDS = 1;
|
|
6
|
+
export declare const MAX_CUT_ROUNDS = 2;
|
|
6
7
|
export declare const MAX_CAPPED_ROUNDS = 1;
|
|
7
8
|
export declare const MAX_BLOCKED_REPEATS = 3;
|
|
9
|
+
export declare const MAX_UNCHANGED_RESULTS = 3;
|
|
10
|
+
export declare const MAX_ROUND_REPEATS = 3;
|
|
11
|
+
export declare const MAX_ROUND_CALLS = 32;
|
|
12
|
+
export declare const MAX_SHOWN_IMAGES = 4;
|
|
8
13
|
export declare function nudgeWithPlan(nudge: string, plan: readonly PlanStep[]): string;
|
|
9
|
-
export declare function
|
|
14
|
+
export declare function imagesShownNote(fileNames: readonly string[]): string;
|
|
15
|
+
export declare function goalMet(context: Readonly<CompletionContext>): boolean;
|
|
16
|
+
export declare function casesDue(context: Readonly<CompletionContext>): boolean;
|
|
17
|
+
export declare function checksMet({ plan, goal }: Readonly<CompletionContext>): boolean;
|
|
18
|
+
export declare function nudgeWithChecks(nudge: string, checks: readonly GoalCheck[], unnamed?: boolean): string;
|
|
10
19
|
export declare function goalTokensLeft({ goal, metrics }: Readonly<CompletionContext>): boolean;
|
|
20
|
+
export declare function goalStalled({ outcome }: Readonly<CompletionContext>): boolean;
|
|
21
|
+
export declare function settledSince(settled: CompletionContext['settledResults']): CompletionContext['settledResults'];
|
|
11
22
|
export declare function retainFailureResults(history: readonly CompletionHistoryEntry[], values: Readonly<Record<string, FailureResultValue>>, failedCalls: Readonly<Record<string, SettledCall>>): Record<string, FailureResultValue>;
|
|
12
23
|
export declare function activate(activated: string[], names: readonly string[]): string[];
|
|
13
24
|
export interface ApplyHistorySpliceOptions {
|
|
@@ -33,8 +44,18 @@ export interface FinishedRound {
|
|
|
33
44
|
stopReason?: string | undefined;
|
|
34
45
|
durationMs?: number | undefined;
|
|
35
46
|
ctxSize?: number | undefined;
|
|
47
|
+
overflows?: number | undefined;
|
|
48
|
+
reasoningDeltas?: number | undefined;
|
|
49
|
+
keyed?: boolean | undefined;
|
|
36
50
|
}
|
|
37
51
|
export declare function foldMetrics(state: MetricsState, round: number, finished: FinishedRound): void;
|
|
52
|
+
type StoppedRound = Pick<FinishedRound, 'stats' | 'stopReason'> & {
|
|
53
|
+
cut?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
export declare function atContextBoundary({ stats, stopReason }: StoppedRound): boolean;
|
|
56
|
+
export declare function cutShort(round: StoppedRound): boolean;
|
|
57
|
+
export declare function cutOffMessage(policy: RunPolicy, round: StoppedRound | null): string;
|
|
38
58
|
export declare function recordTool(context: Readonly<CompletionContext>, call: ResolvedCallSnapshot | null, durationMs: number | undefined): CompletionContext['metrics'];
|
|
39
59
|
export declare function leadingReads(context: Readonly<CompletionContext>): number;
|
|
40
60
|
export declare function applySplice(history: CompletionHistoryEntry[], splice?: HistorySplice): CompletionHistoryEntry[];
|
|
61
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isFailureResultReference } from '../../helpers/failure-result.js';
|
|
2
|
+
import { asksChecks, codeUnrun, deliverableChecked, GOAL_CHECKS_ASK, GOAL_PROOF_ASK } from '../../helpers/goal-check.js';
|
|
2
3
|
export function runsUnasked(facts) {
|
|
3
4
|
if (facts.permission === 'ask')
|
|
4
5
|
return false;
|
|
@@ -8,8 +9,13 @@ export function runsUnasked(facts) {
|
|
|
8
9
|
facts.skipApprovals);
|
|
9
10
|
}
|
|
10
11
|
export const MAX_MUTE_ROUNDS = 1;
|
|
12
|
+
export const MAX_CUT_ROUNDS = 2;
|
|
11
13
|
export const MAX_CAPPED_ROUNDS = 1;
|
|
12
14
|
export const MAX_BLOCKED_REPEATS = 3;
|
|
15
|
+
export const MAX_UNCHANGED_RESULTS = 3;
|
|
16
|
+
export const MAX_ROUND_REPEATS = 3;
|
|
17
|
+
export const MAX_ROUND_CALLS = 32;
|
|
18
|
+
export const MAX_SHOWN_IMAGES = 4;
|
|
13
19
|
const PLAN_MARKS = {
|
|
14
20
|
pending: '[ ]',
|
|
15
21
|
in_progress: '[>]',
|
|
@@ -22,15 +28,64 @@ export function nudgeWithPlan(nudge, plan) {
|
|
|
22
28
|
const lines = plan.map(({ step, status }) => `${PLAN_MARKS[status]} ${step}`);
|
|
23
29
|
return `${nudge}\nPlan:\n${lines.join('\n')}`;
|
|
24
30
|
}
|
|
31
|
+
export function imagesShownNote(fileNames) {
|
|
32
|
+
const named = fileNames.map((name) => `"${name}"`).join(', ');
|
|
33
|
+
return fileNames.length === 1
|
|
34
|
+
? `[The image at the start of this turn is ${named}, which a tool above attached. You can see it: use what it shows, with no tool to open it.]`
|
|
35
|
+
: `[The images at the start of this turn are ${named}, which tools above attached. You can see them: use what they show, with no tool to open them.]`;
|
|
36
|
+
}
|
|
25
37
|
function isDone(step) {
|
|
26
38
|
return step.status === 'done';
|
|
27
39
|
}
|
|
28
|
-
|
|
40
|
+
function planDone(plan) {
|
|
29
41
|
return plan.length > 0 && plan.every(isDone);
|
|
30
42
|
}
|
|
43
|
+
export function goalMet(context) {
|
|
44
|
+
return checksMet(context) && !reviewPending(context.goal) && !casesOpen(context);
|
|
45
|
+
}
|
|
46
|
+
export function casesDue(context) {
|
|
47
|
+
return checksMet(context) && !reviewPending(context.goal) && casesOpen(context);
|
|
48
|
+
}
|
|
49
|
+
function casesOpen(context) {
|
|
50
|
+
return !!context.goal?.checkable && !context.goal.cases && halfLeft(context);
|
|
51
|
+
}
|
|
52
|
+
function halfLeft({ halfTime, round, policy, goal, metrics }) {
|
|
53
|
+
return (!halfTime &&
|
|
54
|
+
(round + 1) * 2 < policy.maxToolRounds &&
|
|
55
|
+
(!goal || goal.tokens === null || metrics.tokens * 2 < goal.tokens));
|
|
56
|
+
}
|
|
57
|
+
export function checksMet({ plan, goal }) {
|
|
58
|
+
const checks = goal?.checks ?? [];
|
|
59
|
+
return (planDone(plan) &&
|
|
60
|
+
!(goal && asksChecks(goal)) &&
|
|
61
|
+
checks.every((check) => check.passed) &&
|
|
62
|
+
(!goal || (deliverableChecked(goal) && !codeUnrun(goal))));
|
|
63
|
+
}
|
|
64
|
+
function reviewPending(goal) {
|
|
65
|
+
return !!goal?.checkable && (goal.review === 'due' || goal.review === 'asked');
|
|
66
|
+
}
|
|
67
|
+
export function nudgeWithChecks(nudge, checks, unnamed) {
|
|
68
|
+
if (!checks.length) {
|
|
69
|
+
return unnamed ? `${nudge}\n${GOAL_CHECKS_ASK}` : nudge;
|
|
70
|
+
}
|
|
71
|
+
const asked = unnamed ? `${nudge}\n${GOAL_PROOF_ASK}` : nudge;
|
|
72
|
+
const open = checks.filter((check) => !check.passed);
|
|
73
|
+
if (!open.length) {
|
|
74
|
+
return asked;
|
|
75
|
+
}
|
|
76
|
+
const lines = open.map(({ name, output }) => output === null ? `- ${name}: not run yet` : `- ${name}: failed. Its last output:\n${output}`);
|
|
77
|
+
return (`${asked}\nChecks: the goal is met only once each of these runs as its own command and ` +
|
|
78
|
+
`exits 0, with no pipe or ; after it to hide its exit code.\n${lines.join('\n')}`);
|
|
79
|
+
}
|
|
31
80
|
export function goalTokensLeft({ goal, metrics }) {
|
|
32
81
|
return !goal || goal.tokens === null || metrics.tokens < goal.tokens;
|
|
33
82
|
}
|
|
83
|
+
export function goalStalled({ outcome }) {
|
|
84
|
+
return outcome === 'exhausted';
|
|
85
|
+
}
|
|
86
|
+
export function settledSince(settled) {
|
|
87
|
+
return Object.fromEntries(Object.entries(settled).map(([key, result]) => [key, { ...result, repeats: 0 }]));
|
|
88
|
+
}
|
|
34
89
|
export function retainFailureResults(history, values, failedCalls) {
|
|
35
90
|
const retained = new Set();
|
|
36
91
|
for (const entry of history) {
|
|
@@ -68,6 +123,9 @@ export function foldMetrics(state, round, finished) {
|
|
|
68
123
|
state.ctxSize = finished.ctxSize;
|
|
69
124
|
}
|
|
70
125
|
if (!stats) {
|
|
126
|
+
if (finished.keyed === false) {
|
|
127
|
+
delete state.cacheTokens;
|
|
128
|
+
}
|
|
71
129
|
return;
|
|
72
130
|
}
|
|
73
131
|
if (state.ttft === undefined && stats.timeToFirstToken) {
|
|
@@ -80,12 +138,15 @@ export function foldMetrics(state, round, finished) {
|
|
|
80
138
|
state.timedTokens += stats.generatedTokens;
|
|
81
139
|
}
|
|
82
140
|
}
|
|
83
|
-
if (stats.promptTokens) {
|
|
141
|
+
if (stats.promptTokens !== undefined) {
|
|
84
142
|
state.promptTokens = stats.promptTokens;
|
|
85
143
|
}
|
|
86
|
-
if (stats.cacheTokens) {
|
|
144
|
+
if (stats.cacheTokens !== undefined) {
|
|
87
145
|
state.cacheTokens = stats.cacheTokens;
|
|
88
146
|
}
|
|
147
|
+
if (finished.keyed === false && stats.cacheTokens === undefined) {
|
|
148
|
+
delete state.cacheTokens;
|
|
149
|
+
}
|
|
89
150
|
}
|
|
90
151
|
const ROUND_STATS = [
|
|
91
152
|
'promptTokens',
|
|
@@ -93,9 +154,10 @@ const ROUND_STATS = [
|
|
|
93
154
|
'generatedTokens',
|
|
94
155
|
'promptTokensPerSecond',
|
|
95
156
|
'tokensPerSecond',
|
|
96
|
-
'timeToFirstToken'
|
|
157
|
+
'timeToFirstToken',
|
|
158
|
+
'avgConcurrentSeq'
|
|
97
159
|
];
|
|
98
|
-
function roundSpeed(round, { stats, stopReason, durationMs }) {
|
|
160
|
+
function roundSpeed(round, { stats, stopReason, durationMs, overflows, reasoningDeltas, keyed }) {
|
|
99
161
|
const speed = { round, durationMs: durationMs ?? 0 };
|
|
100
162
|
for (const key of ROUND_STATS) {
|
|
101
163
|
const value = stats?.[key];
|
|
@@ -103,11 +165,34 @@ function roundSpeed(round, { stats, stopReason, durationMs }) {
|
|
|
103
165
|
speed[key] = value;
|
|
104
166
|
}
|
|
105
167
|
}
|
|
168
|
+
if (keyed === false) {
|
|
169
|
+
speed.cacheTokens = 0;
|
|
170
|
+
}
|
|
106
171
|
if (stopReason) {
|
|
107
172
|
speed.stopReason = stopReason;
|
|
108
173
|
}
|
|
174
|
+
if (overflows) {
|
|
175
|
+
speed.overflows = overflows;
|
|
176
|
+
}
|
|
177
|
+
if (atContextBoundary({ stats, stopReason })) {
|
|
178
|
+
speed.contextBoundary = true;
|
|
179
|
+
}
|
|
180
|
+
if (reasoningDeltas) {
|
|
181
|
+
speed.reasoningDeltas = reasoningDeltas;
|
|
182
|
+
}
|
|
109
183
|
return speed;
|
|
110
184
|
}
|
|
185
|
+
export function atContextBoundary({ stats, stopReason }) {
|
|
186
|
+
return stopReason === 'length' && stats?.contextBoundary !== false;
|
|
187
|
+
}
|
|
188
|
+
export function cutShort(round) {
|
|
189
|
+
return round.stopReason === 'length' || round.cut !== undefined;
|
|
190
|
+
}
|
|
191
|
+
export function cutOffMessage(policy, round) {
|
|
192
|
+
if (round?.cut !== undefined)
|
|
193
|
+
return policy.roundCutMessage;
|
|
194
|
+
return round && atContextBoundary(round) ? policy.contextBoundaryMessage : policy.cutOffMessage;
|
|
195
|
+
}
|
|
111
196
|
export function recordTool(context, call, durationMs) {
|
|
112
197
|
if (durationMs === undefined || !call) {
|
|
113
198
|
return context.metrics;
|
|
@@ -118,7 +203,7 @@ export function recordTool(context, call, durationMs) {
|
|
|
118
203
|
export function leadingReads(context) {
|
|
119
204
|
const keys = new Set();
|
|
120
205
|
for (const call of context.toolQueue) {
|
|
121
|
-
if (!call.concurrent || keys.has(call.key) || context.failedCalls[call.key]) {
|
|
206
|
+
if (!call.concurrent || call.cutOff || keys.has(call.key) || context.failedCalls[call.key]) {
|
|
122
207
|
break;
|
|
123
208
|
}
|
|
124
209
|
keys.add(call.key);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CompletionHistoryEntry, GoalStatus, HistorySplice, HookRejection, Operation, PlanStep, ResourceDescriptor, RoundSpeed, RunBackendUse, RunBudget, RunOutcome, ToolActivityEvent, ToolCallDisplay, ToolEffect, ToolExecutionOutcome, ToolSpeed, TrustedSourceFacts } from '../../contract/run.ts';
|
|
1
|
+
import type { CompletionHistoryEntry, GoalStatus, HistorySplice, HookRejection, Operation, PlanStep, ResourceDescriptor, RoundSpeed, RunBackendUse, RunBudget, RunOutcome, ToolActivityEvent, ToolCallDisplay, ToolEffect, ToolExecutionOutcome, ToolSpeed, TrustedSourceFacts, TurnContext } from '../../contract/run.ts';
|
|
2
2
|
import type { EngineError } from '../../helpers/engine-error.ts';
|
|
3
3
|
import type { FailureResultValue } from '../../helpers/failure-result.ts';
|
|
4
4
|
export interface CompletionStats {
|
|
@@ -8,6 +8,8 @@ export interface CompletionStats {
|
|
|
8
8
|
tokensPerSecond?: number | undefined;
|
|
9
9
|
promptTokens?: number | undefined;
|
|
10
10
|
cacheTokens?: number | undefined;
|
|
11
|
+
avgConcurrentSeq?: number | undefined;
|
|
12
|
+
contextBoundary?: boolean | undefined;
|
|
11
13
|
}
|
|
12
14
|
export interface EngineEvent {
|
|
13
15
|
type: string;
|
|
@@ -20,6 +22,10 @@ export interface EngineEvent {
|
|
|
20
22
|
replacedTypes?: ('content' | 'thinking')[];
|
|
21
23
|
status?: GoalStatus;
|
|
22
24
|
turn?: number;
|
|
25
|
+
checks?: string[];
|
|
26
|
+
proof?: string;
|
|
27
|
+
cases?: true;
|
|
28
|
+
context?: TurnContext;
|
|
23
29
|
}
|
|
24
30
|
export interface EngineFacts extends Record<string, unknown> {
|
|
25
31
|
runBudget: RunBudget;
|
|
@@ -72,11 +78,15 @@ export interface RoundDonePayload {
|
|
|
72
78
|
stopReason?: string;
|
|
73
79
|
durationMs: number;
|
|
74
80
|
ctxSize?: number | undefined;
|
|
81
|
+
overflows?: number | undefined;
|
|
82
|
+
reasoningDeltas?: number | undefined;
|
|
75
83
|
replay: string | null;
|
|
76
84
|
response?: string;
|
|
77
85
|
history?: HistorySplice;
|
|
78
86
|
cacheable?: boolean;
|
|
87
|
+
keyed?: boolean;
|
|
79
88
|
fallbackResponse?: string;
|
|
89
|
+
cut?: string;
|
|
80
90
|
}
|
|
81
91
|
export interface ResolvedCallSnapshot {
|
|
82
92
|
key: string;
|
|
@@ -89,6 +99,7 @@ export interface ResolvedCallSnapshot {
|
|
|
89
99
|
permission?: 'allow' | 'ask';
|
|
90
100
|
concurrent?: true;
|
|
91
101
|
leavesPlan?: true;
|
|
102
|
+
cutOff?: true;
|
|
92
103
|
}
|
|
93
104
|
export interface ToolExecutionSnapshot {
|
|
94
105
|
kind: 'direct' | 'tool';
|
|
@@ -120,6 +131,10 @@ export interface ApprovalGate {
|
|
|
120
131
|
approver: boolean;
|
|
121
132
|
call: ApprovalCall;
|
|
122
133
|
}
|
|
134
|
+
export interface ShownImage {
|
|
135
|
+
path: string;
|
|
136
|
+
fileName: string;
|
|
137
|
+
}
|
|
123
138
|
export interface ToolDonePayload {
|
|
124
139
|
deniedKey?: string;
|
|
125
140
|
webSearch?: boolean;
|
|
@@ -134,13 +149,28 @@ export interface ToolDonePayload {
|
|
|
134
149
|
};
|
|
135
150
|
progressed?: boolean;
|
|
136
151
|
blockedRepeat?: boolean;
|
|
152
|
+
unchanged?: boolean;
|
|
153
|
+
settled?: {
|
|
154
|
+
key: string;
|
|
155
|
+
digest: string;
|
|
156
|
+
};
|
|
157
|
+
stableRead?: true;
|
|
137
158
|
endedRun?: boolean;
|
|
138
159
|
answer?: string;
|
|
139
160
|
delivered?: boolean;
|
|
161
|
+
deliveryEndsRun?: boolean;
|
|
162
|
+
shown?: ShownImage[];
|
|
140
163
|
durationMs?: number;
|
|
141
164
|
activate?: string;
|
|
142
165
|
plan?: PlanStep[];
|
|
143
166
|
leftPlanMode?: boolean;
|
|
167
|
+
checked?: GoalCheck[];
|
|
168
|
+
proved?: GoalCheck;
|
|
169
|
+
wrote?: {
|
|
170
|
+
path: string;
|
|
171
|
+
proving?: boolean;
|
|
172
|
+
}[];
|
|
173
|
+
ran?: string;
|
|
144
174
|
}
|
|
145
175
|
export interface BatchDonePayload {
|
|
146
176
|
history?: HistorySplice;
|
|
@@ -187,6 +217,7 @@ export interface PreparingPayload {
|
|
|
187
217
|
sources?: TrustedSourceFacts[];
|
|
188
218
|
availableTools?: string[];
|
|
189
219
|
promptPrefix?: string;
|
|
220
|
+
checkable?: boolean;
|
|
190
221
|
}
|
|
191
222
|
export interface PrepareStepProposal {
|
|
192
223
|
id: string;
|
|
@@ -223,6 +254,7 @@ export interface AnsweredPayload {
|
|
|
223
254
|
durationMs?: number;
|
|
224
255
|
narrated?: string;
|
|
225
256
|
malformed?: boolean;
|
|
257
|
+
cutOff?: true;
|
|
226
258
|
}
|
|
227
259
|
export interface ToolsResolvedPayload {
|
|
228
260
|
calls: ResolvedCallSnapshot[];
|
|
@@ -232,24 +264,58 @@ export interface RunPolicy {
|
|
|
232
264
|
maxToolRounds: number;
|
|
233
265
|
continuationNudge: string;
|
|
234
266
|
deliveredNudge: string;
|
|
267
|
+
wrapUpNudge?: string;
|
|
235
268
|
deniedMessage: string;
|
|
236
269
|
cutOffMessage: string;
|
|
270
|
+
contextBoundaryMessage: string;
|
|
271
|
+
roundCutMessage: string;
|
|
272
|
+
repeatedCallMessage: string;
|
|
273
|
+
repeatedFailureMessage: string;
|
|
274
|
+
unchangedMessage: string;
|
|
275
|
+
failingMessage?: string;
|
|
237
276
|
goalNudge: string;
|
|
277
|
+
goalStalledNudge: string;
|
|
278
|
+
}
|
|
279
|
+
export interface SettledResult {
|
|
280
|
+
name?: string;
|
|
281
|
+
digest: string;
|
|
282
|
+
repeats: number;
|
|
283
|
+
round: number;
|
|
284
|
+
folded?: true;
|
|
285
|
+
}
|
|
286
|
+
export interface GoalCheck {
|
|
287
|
+
name: string;
|
|
288
|
+
passed: boolean;
|
|
289
|
+
output: string | null;
|
|
238
290
|
}
|
|
239
291
|
export interface GoalState {
|
|
240
292
|
objective: string;
|
|
241
293
|
tokens: number | null;
|
|
242
294
|
turns: number;
|
|
243
295
|
status: GoalStatus;
|
|
296
|
+
checks: GoalCheck[];
|
|
297
|
+
checkable?: boolean;
|
|
298
|
+
named?: boolean;
|
|
299
|
+
stalled?: true;
|
|
300
|
+
review?: 'due' | 'asked' | 'done';
|
|
301
|
+
deliverable?: string[];
|
|
302
|
+
proving?: string[];
|
|
303
|
+
edited?: string[];
|
|
304
|
+
proof?: string;
|
|
305
|
+
reviewAsks?: number;
|
|
306
|
+
cases?: true;
|
|
244
307
|
}
|
|
245
308
|
export interface QueuedInput {
|
|
246
309
|
id?: string;
|
|
247
310
|
text: string;
|
|
311
|
+
context?: TurnContext;
|
|
312
|
+
content?: string;
|
|
248
313
|
}
|
|
249
314
|
export interface CompletionContext {
|
|
250
315
|
runId: string;
|
|
251
316
|
policy: RunPolicy;
|
|
252
317
|
timeUp: boolean;
|
|
318
|
+
halfTime?: true;
|
|
253
319
|
pauseCount: number;
|
|
254
320
|
durable: EngineFacts | null;
|
|
255
321
|
recovery: Operation | undefined;
|
|
@@ -262,6 +328,7 @@ export interface CompletionContext {
|
|
|
262
328
|
round: number;
|
|
263
329
|
roundsSent: number;
|
|
264
330
|
mute: number;
|
|
331
|
+
cuts: number;
|
|
265
332
|
narrated: boolean;
|
|
266
333
|
malformed: boolean;
|
|
267
334
|
webSearches: number;
|
|
@@ -271,10 +338,15 @@ export interface CompletionContext {
|
|
|
271
338
|
deniedKeys: string[];
|
|
272
339
|
failedCalls: Record<string, SettledCall>;
|
|
273
340
|
blockedRepeats: number;
|
|
341
|
+
settledResults: Record<string, SettledResult>;
|
|
342
|
+
failureStreaks?: Record<string, number>;
|
|
343
|
+
answeredReads?: string[];
|
|
274
344
|
roundProgressed: boolean;
|
|
275
345
|
answer: string | null;
|
|
276
346
|
delivered: boolean;
|
|
277
347
|
deliveredThisRound: boolean;
|
|
348
|
+
deliveryEndsRun: boolean;
|
|
349
|
+
shownThisRound?: ShownImage[];
|
|
278
350
|
activated: string[];
|
|
279
351
|
outcome: RunOutcome | 'failed' | null;
|
|
280
352
|
metrics: CompletionMetrics;
|
|
@@ -299,6 +371,7 @@ export interface CompletionContext {
|
|
|
299
371
|
failMessage: string | null;
|
|
300
372
|
steering: QueuedInput[];
|
|
301
373
|
followUps: QueuedInput[];
|
|
374
|
+
edgeInputs: QueuedInput[];
|
|
302
375
|
plan: PlanStep[];
|
|
303
376
|
planMode: boolean;
|
|
304
377
|
goal: GoalState | null;
|
|
@@ -333,6 +406,7 @@ export interface ToolRejection {
|
|
|
333
406
|
emitCall?: boolean;
|
|
334
407
|
emitResult?: boolean;
|
|
335
408
|
capped?: boolean;
|
|
409
|
+
repeat?: ToolExecutionOutcome;
|
|
336
410
|
}
|
|
337
411
|
export interface SearchingOutput {
|
|
338
412
|
directTool: DirectToolOutput | null;
|
|
@@ -413,4 +487,6 @@ export type CompletionMachineEvent = {
|
|
|
413
487
|
mode: 'steer' | 'follow-up';
|
|
414
488
|
id?: string;
|
|
415
489
|
text: string;
|
|
490
|
+
context?: TurnContext;
|
|
491
|
+
content?: string;
|
|
416
492
|
};
|