@qvac/harness 1.0.0-rc.3 → 1.0.0-rc.5
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 +2302 -1485
- package/README.md +44 -31
- package/dist-lib/index.d.ts +51 -6
- package/dist-lib/index.js +130 -28
- 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 +2 -0
- package/dist-lib/lib/agent/resolve.js +22 -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 +1 -0
- package/dist-lib/lib/agent/tools.js +2 -1
- package/dist-lib/lib/capabilities/agent-ports.js +3 -3
- 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.js +60 -9
- package/dist-lib/lib/capabilities/completion-engine/actors/execution-plan.js +4 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/inspect-prepare.js +3 -2
- package/dist-lib/lib/capabilities/completion-engine/actors/inspecting.js +35 -6
- 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 +2 -0
- package/dist-lib/lib/capabilities/completion-engine/actors/preparing.js +104 -40
- package/dist-lib/lib/capabilities/completion-engine/actors/rejecting.js +6 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/resolving.js +61 -16
- package/dist-lib/lib/capabilities/completion-engine/actors/retrieving.js +22 -13
- package/dist-lib/lib/capabilities/completion-engine/actors/skill-step.js +23 -13
- package/dist-lib/lib/capabilities/completion-engine/actors/stream.d.ts +8 -3
- package/dist-lib/lib/capabilities/completion-engine/actors/stream.js +61 -3
- package/dist-lib/lib/capabilities/completion-engine/actors/streaming.d.ts +5 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/streaming.js +50 -22
- package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.d.ts +1 -0
- package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.js +33 -6
- package/dist-lib/lib/capabilities/completion-engine/driver.js +28 -13
- package/dist-lib/lib/capabilities/completion-engine/durable.d.ts +1 -0
- package/dist-lib/lib/capabilities/completion-engine/durable.js +5 -1
- 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 +2 -1
- package/dist-lib/lib/capabilities/completion-engine/index.js +2 -2
- package/dist-lib/lib/capabilities/completion-engine/loop.d.ts +16 -2
- package/dist-lib/lib/capabilities/completion-engine/loop.js +7 -0
- 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 +46 -0
- package/dist-lib/lib/capabilities/completion-engine/model-round.js +45 -0
- package/dist-lib/lib/capabilities/completion-engine/operations.js +1 -1
- package/dist-lib/lib/capabilities/completion-engine/ports.js +3 -7
- package/dist-lib/lib/capabilities/completion-engine/round.d.ts +23 -3
- package/dist-lib/lib/capabilities/completion-engine/round.js +323 -97
- package/dist-lib/lib/capabilities/completion-engine/session.d.ts +10 -3
- package/dist-lib/lib/capabilities/completion-engine/session.js +30 -2
- package/dist-lib/lib/capabilities/completion-engine/tool-caller.js +3 -2
- package/dist-lib/lib/capabilities/completion-engine/tool-execution.d.ts +4 -3
- package/dist-lib/lib/capabilities/completion-engine/tool-execution.js +15 -10
- package/dist-lib/lib/capabilities/completion-engine/turns.d.ts +14 -9
- package/dist-lib/lib/capabilities/completion-engine/turns.js +63 -86
- package/dist-lib/lib/capabilities/download.d.ts +9 -7
- 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 +20 -8
- 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/sdk-tool.d.ts +1 -0
- package/dist-lib/lib/capabilities/sdk-tool.js +18 -1
- package/dist-lib/lib/capabilities/tool-plan.d.ts +1 -1
- package/dist-lib/lib/capabilities/tool-plan.js +5 -5
- package/dist-lib/lib/capabilities/tool-prompt-log.js +3 -3
- package/dist-lib/lib/capabilities/tool-turns.d.ts +7 -9
- package/dist-lib/lib/capabilities/tool-turns.js +25 -20
- package/dist-lib/lib/client/index.d.ts +19 -0
- package/dist-lib/lib/client/index.js +262 -0
- package/dist-lib/lib/connect.d.ts +13 -10
- package/dist-lib/lib/connect.js +68 -26
- package/dist-lib/lib/context-window.d.ts +1 -0
- package/dist-lib/lib/context-window.js +3 -3
- package/dist-lib/lib/contract/agent.d.ts +7 -3
- package/dist-lib/lib/contract/completion.d.ts +51 -30
- 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 +3 -3
- package/dist-lib/lib/contract/hooks.d.ts +4 -1
- package/dist-lib/lib/contract/index.d.ts +3 -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/models.d.ts +6 -4
- 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 +15 -3
- package/dist-lib/lib/contract/sandbox.d.ts +3 -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 +35 -15
- 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 +266 -0
- package/dist-lib/lib/errors.js +198 -0
- package/dist-lib/lib/fold/index.d.ts +25 -1
- package/dist-lib/lib/fold/index.js +75 -9
- package/dist-lib/lib/guarded-fetch.js +11 -7
- package/dist-lib/lib/hardware/gpu-probe.js +10 -1
- package/dist-lib/lib/helpers/completion-params.d.ts +6 -2
- package/dist-lib/lib/helpers/completion-params.js +10 -1
- 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 +4 -0
- package/dist-lib/lib/helpers/goal-check.js +81 -0
- package/dist-lib/lib/helpers/head-tail.js +1 -1
- 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/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 +4 -2
- package/dist-lib/lib/machine/completion/actions/completion.js +78 -12
- package/dist-lib/lib/machine/completion/actions/prepare.js +1 -1
- package/dist-lib/lib/machine/completion/actions/tools.js +48 -5
- package/dist-lib/lib/machine/completion/context.js +5 -1
- package/dist-lib/lib/machine/completion/guards/retry.d.ts +1 -0
- package/dist-lib/lib/machine/completion/guards/retry.js +8 -2
- package/dist-lib/lib/machine/completion/implementations.d.ts +10 -4
- package/dist-lib/lib/machine/completion/implementations.js +43 -10
- package/dist-lib/lib/machine/completion/machine.d.ts +23 -3
- package/dist-lib/lib/machine/completion/machine.js +33 -4
- package/dist-lib/lib/machine/completion/rules.d.ts +17 -2
- package/dist-lib/lib/machine/completion/rules.js +49 -3
- package/dist-lib/lib/machine/completion/types.d.ts +43 -1
- package/dist-lib/lib/machine/index.d.ts +29 -4
- package/dist-lib/lib/machine/index.js +6 -1
- package/dist-lib/lib/models/context-choice.d.ts +15 -0
- package/dist-lib/lib/models/context-choice.js +55 -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 +5 -0
- package/dist-lib/lib/models/gguf-header.js +165 -14
- package/dist-lib/lib/models/llm-presets.d.ts +5 -1
- package/dist-lib/lib/models/llm-presets.js +6 -5
- 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.d.ts +2 -0
- package/dist-lib/lib/models/model-catalog.js +15 -0
- package/dist-lib/lib/models/model-fit.d.ts +1 -1
- package/dist-lib/lib/models/model-fit.js +5 -6
- package/dist-lib/lib/models/model-handle.d.ts +8 -2
- package/dist-lib/lib/models/model-handle.js +14 -3
- package/dist-lib/lib/models/model-list.d.ts +8 -1
- package/dist-lib/lib/models/model-list.js +23 -0
- package/dist-lib/lib/models/model-pool.d.ts +35 -5
- package/dist-lib/lib/models/model-pool.js +121 -43
- package/dist-lib/lib/models/model-source.d.ts +1 -0
- package/dist-lib/lib/models/model-source.js +23 -5
- 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/no-redirect-fetch-bare.js +2 -1
- package/dist-lib/lib/no-redirect-fetch-impl.js +2 -1
- 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 +55 -17
- package/dist-lib/lib/office/engine/pptx/types.d.ts +1 -0
- 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 +3 -0
- package/dist-lib/lib/plugins/registry.js +16 -7
- package/dist-lib/lib/policy/index.d.ts +10 -0
- package/dist-lib/lib/policy/index.js +229 -0
- package/dist-lib/lib/prompt.d.ts +1 -0
- package/dist-lib/lib/prompt.js +7 -1
- package/dist-lib/lib/residency/completion-runtime.d.ts +1 -0
- package/dist-lib/lib/residency/completion-runtime.js +11 -4
- package/dist-lib/lib/residency/index.d.ts +44 -4
- package/dist-lib/lib/residency/index.js +399 -35
- package/dist-lib/lib/resolution-detector.js +3 -3
- package/dist-lib/lib/rpc-session.js +2 -1
- package/dist-lib/lib/sdk-loader.js +17 -11
- package/dist-lib/lib/serve.js +83 -38
- package/dist-lib/lib/sidecar/index.d.ts +29 -0
- package/dist-lib/lib/sidecar/index.js +174 -0
- package/dist-lib/lib/sidecar/user-plugins.d.ts +8 -0
- package/dist-lib/lib/sidecar/user-plugins.js +117 -0
- package/dist-lib/lib/skills-host/index.d.ts +1 -0
- package/dist-lib/lib/skills-host/index.js +8 -4
- package/dist-lib/lib/spawn.d.ts +3 -4
- package/dist-lib/lib/spawn.js +17 -17
- package/dist-lib/lib/spill.d.ts +1 -0
- package/dist-lib/lib/spill.js +12 -8
- package/dist-lib/lib/tools/attachments/staging.js +8 -8
- package/dist-lib/lib/tools/exec/runner.js +2 -1
- 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 +87 -26
- package/dist-lib/lib/tools/files/edit-file.d.ts +3 -0
- package/dist-lib/lib/tools/files/edit-file.js +74 -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 +114 -0
- package/dist-lib/lib/tools/files/index.d.ts +3 -0
- package/dist-lib/lib/tools/files/index.js +23 -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 +105 -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 +2 -0
- package/dist-lib/lib/tools/fs/document-text.js +38 -0
- package/dist-lib/lib/tools/fs/drive.d.ts +14 -3
- package/dist-lib/lib/tools/fs/drive.js +9 -1
- package/dist-lib/lib/tools/fs/edit-match.d.ts +11 -0
- package/dist-lib/lib/tools/fs/edit-match.js +85 -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 +23 -3
- package/dist-lib/lib/tools/fs/remote.d.ts +3 -4
- package/dist-lib/lib/tools/fs/remote.js +23 -13
- 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 +382 -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 +15 -3
- package/dist-lib/lib/tools/fs/walk.js +118 -24
- package/dist-lib/lib/tools/http-request.js +12 -2
- package/dist-lib/lib/tools/index.js +2 -10
- package/dist-lib/lib/tools/office/ops.js +1 -1
- package/dist-lib/lib/tools/office.js +77 -21
- package/dist-lib/lib/tools/pdf/build.d.ts +5 -1
- package/dist-lib/lib/tools/pdf/build.js +31 -6
- package/dist-lib/lib/tools/pdf.js +17 -2
- package/dist-lib/lib/tools/skill.js +10 -7
- package/dist-lib/lib/tools/skills/bundled-dir.js +4 -4
- package/dist-lib/lib/tools/skills/catalog.d.ts +2 -0
- package/dist-lib/lib/tools/skills/catalog.js +6 -2
- 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-health.js +3 -3
- package/dist-lib/lib/tools/skills/frontmatter-parser.d.ts +2 -0
- package/dist-lib/lib/tools/skills/frontmatter-parser.js +4 -0
- package/dist-lib/lib/tools/skills/manifest-parse.d.ts +1 -0
- package/dist-lib/lib/tools/skills/manifest-parse.js +12 -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.js +3 -2
- 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 +10 -4
- package/dist-lib/lib/wire.js +8 -5
- package/dist-lib/plugins/coding/index.d.ts +1 -1
- package/dist-lib/plugins/coding/index.js +2 -4
- package/dist-lib/plugins/coding/session.d.ts +3 -3
- package/dist-lib/plugins/coding/session.js +26 -14
- 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 +182 -0
- package/dist-lib/plugins/image/edit-image.js +4 -3
- package/dist-lib/plugins/image/generate-image.d.ts +4 -3
- package/dist-lib/plugins/image/generate-image.js +10 -9
- package/dist-lib/plugins/image/index.d.ts +1 -1
- package/dist-lib/plugins/image/index.js +13 -10
- package/dist-lib/plugins/language-hint/index.d.ts +15 -0
- package/dist-lib/plugins/language-hint/index.js +51 -0
- package/dist-lib/plugins/lsp/tool.js +2 -2
- package/dist-lib/plugins/mcp/index.js +6 -3
- package/dist-lib/plugins/music/generate-music.d.ts +4 -2
- package/dist-lib/plugins/music/generate-music.js +7 -4
- package/dist-lib/plugins/music/index.js +12 -9
- package/dist-lib/plugins/obsidian/command.js +2 -2
- package/dist-lib/plugins/obsidian/note-name.js +2 -1
- 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 +6 -5
- package/dist-lib/plugins/obsidian/vault-write.js +13 -12
- 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/interrupt-timer.js +2 -2
- package/dist-lib/plugins/python/loader.js +68 -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.js +3 -1
- 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 +9 -8
- 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 +2 -1
- 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 +27 -12
- 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 +3 -3
- 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 +60 -0
- package/dist-lib/plugins/sandbox-linux/index.js +347 -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 +23 -11
- package/dist-lib/plugins/sandbox-macos/index.js +239 -49
- package/dist-lib/plugins/sandbox-vm/vm-shell.d.ts +4 -2
- package/dist-lib/plugins/sandbox-vm/vm-shell.js +9 -4
- 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 +7 -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/speech-runtime.js +37 -37
- package/dist-lib/plugins/speech/voice.d.ts +5 -1
- package/dist-lib/plugins/speech/voice.js +100 -31
- package/dist-lib/plugins/translation/index.d.ts +1 -0
- package/dist-lib/plugins/translation/index.js +16 -9
- package/dist-lib/plugins/translation/translate.d.ts +7 -3
- package/dist-lib/plugins/translation/translate.js +64 -58
- package/dist-lib/plugins/weather/geocode.js +2 -1
- package/dist-lib/plugins/weather/lookup.js +5 -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/harness.js +52 -9
- package/dist-lib/spec/bind.js +9 -0
- package/dist-lib/spec/calls.js +3 -0
- package/dist-lib/spec/hrpc/hrpc.json +42 -3
- package/dist-lib/spec/hrpc/index.js +44 -8
- package/dist-lib/spec/hrpc/messages.js +310 -205
- package/dist-lib/spec/hyperschema/index.js +310 -205
- package/dist-lib/spec/hyperschema/schema.json +164 -84
- package/dist-lib/spec/hyperschema/types.d.ts +25 -4
- package/package.json +98 -26
- package/patches/@qvac%2Finference@0.22.0.patch +59 -0
- package/patches/pyodide@314.0.2.patch +37 -8
- package/scripts/addon-externals.cjs +10 -5
- package/worker/harness-sidecar.mjs +18 -154
- package/bench/README.md +0 -94
- package/bench/bfcl/checker.ts +0 -313
- package/bench/bfcl/data.ts +0 -93
- package/bench/bfcl/observe.ts +0 -93
- package/bench/bfcl/run.ts +0 -213
- package/bench/bfcl/tools.ts +0 -72
- package/bench/bridge/bridge.ts +0 -392
- package/bench/bridge/openai.ts +0 -150
- package/bench/bridge/python/qvac_bench/__init__.py +0 -3
- package/bench/bridge/python/qvac_bench/airline.py +0 -42
- package/bench/bridge/python/qvac_bench/approval.py +0 -26
- package/bench/bridge/python/qvac_bench/bfcl_multi_turn.py +0 -152
- package/bench/bridge/python/qvac_bench/client.py +0 -88
- package/bench/bridge/python/qvac_bench/harbor_agent.py +0 -85
- package/bench/bridge/python/qvac_bench/session.py +0 -107
- package/bench/bridge/python/qvac_bench/speed.py +0 -30
- package/bench/bridge/python/qvac_bench/tau2_agent.py +0 -106
- package/bench/bridge/python/qvac_bench/tools.py +0 -11
- package/bench/bridge/python/run_bfcl_multi_turn.py +0 -95
- package/bench/bridge/python/run_tau2.py +0 -150
- package/bench/bridge/python/smoke.py +0 -47
- package/bench/bridge/python/test_airline.py +0 -28
- package/bench/bridge/python/test_approval.py +0 -57
- package/bench/bridge/python/test_bfcl_multi_turn.py +0 -185
- package/bench/bridge/python/test_harbor_agent.py +0 -107
- package/bench/bridge/serve.ts +0 -52
- package/bench/bridge/transcript.ts +0 -52
- package/bench/bun-tsconfig.json +0 -15
- package/bench/cpu-main.mjs +0 -216
- package/bench/cpu.ts +0 -457
- package/bench/evidence/2026-09-28-review15.md +0 -225
- package/bench/evidence/redact-bun1.3.14.json +0 -92
- package/bench/evidence/redact-node24.11.json +0 -92
- package/bench/graph-metrics.ts +0 -43
- package/bench/harness.ts +0 -73
- package/bench/issue129-matrix.mjs +0 -722
- package/bench/redact-adversarial.ts +0 -256
- package/bench/repeat-cpu.mjs +0 -281
- package/bench/report.ts +0 -1075
- package/bench/skill-eval/harness.ts +0 -30
- package/bench/skill-eval/laws.ts +0 -37
- package/bench/skill-eval/mermaid/client.ts +0 -132
- package/bench/skill-eval/mermaid/validate.mjs +0 -115
- package/bench/skill-eval/pack.ts +0 -61
- package/bench/skill-eval/packs/diagrams/cases.ts +0 -281
- package/bench/skill-eval/packs/diagrams/index.ts +0 -50
- package/bench/skill-eval/packs/diagrams/score.ts +0 -74
- package/bench/skill-eval/packs/index.ts +0 -5
- package/bench/skill-eval/packs/weather/cases.ts +0 -279
- package/bench/skill-eval/packs/weather/fixtures/wttr.json +0 -566
- package/bench/skill-eval/packs/weather/fixtures.ts +0 -84
- package/bench/skill-eval/packs/weather/index.ts +0 -55
- package/bench/skill-eval/packs/weather/score.ts +0 -92
- package/bench/skill-eval/report.ts +0 -194
- package/bench/skill-eval/run.ts +0 -316
- package/bench/speed.ts +0 -80
- 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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CompletionFinal, Tool as SdkTool, ToolCallWithCall, ToolDialect } from '@qvac/sdk';
|
|
1
|
+
import type { CompletionEvent as SdkCompletionEvent, CompletionFinal, Tool as SdkTool, ToolCallWithCall, ToolDialect } from '@qvac/sdk';
|
|
2
2
|
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
3
3
|
import type { TextEvent } from '../helpers/thinking.ts';
|
|
4
4
|
import type { LlmGenerationParams } from '../models/llm-presets.ts';
|
|
@@ -7,7 +7,8 @@ import type { DriveRoot } from '../tools/fs/scope.ts';
|
|
|
7
7
|
import type { CliValidator } from '../tools/skills/cli-schema-types.ts';
|
|
8
8
|
import type { UsageBreakdown } from '../capabilities/usage-breakdown.ts';
|
|
9
9
|
import type { KnowledgeGrant } from './knowledge.ts';
|
|
10
|
-
import type {
|
|
10
|
+
import type { AccessPolicy, CompiledPolicy } from './policy.ts';
|
|
11
|
+
import type { GoalStatus, HistoryToolCall, HookRejection, Message, ResourceDescriptor, RoundSpeed, RunBackendUse, RunBudget, RunLifecycleEvent, RunOutcome, ToolActivityEvent, ToolCallDisplay, ToolDecision, ToolEffect, ToolSpeed, TrustedSource, TrustedSourceFacts, TurnContext } from './run.ts';
|
|
11
12
|
export type { CliValidator, DriveRoot, LlmGenerationParams };
|
|
12
13
|
export interface OutboundGuard {
|
|
13
14
|
facts(origin: TrustedSourceFacts['origin'], text: string): TrustedSourceFacts;
|
|
@@ -39,7 +40,7 @@ export interface AgentConfig {
|
|
|
39
40
|
imageHeight?: number | null;
|
|
40
41
|
approvalMode?: 'ask' | 'skip-all' | null;
|
|
41
42
|
disabledToolsets?: string[] | null;
|
|
42
|
-
|
|
43
|
+
policy?: AccessPolicy | null;
|
|
43
44
|
handoffs?: AgentHandoff[] | null;
|
|
44
45
|
plan?: boolean | null;
|
|
45
46
|
model?: string | null;
|
|
@@ -139,6 +140,7 @@ export interface ToolExecuteContext {
|
|
|
139
140
|
runId?: string;
|
|
140
141
|
callId?: string;
|
|
141
142
|
ctxSize?: number | undefined;
|
|
143
|
+
session?: string | undefined;
|
|
142
144
|
image?: ImageSettings | undefined;
|
|
143
145
|
settings?: Record<string, unknown> | undefined;
|
|
144
146
|
turnImages?: {
|
|
@@ -155,7 +157,7 @@ export interface ToolExecuteContext {
|
|
|
155
157
|
runBudget?: RunBudget | undefined;
|
|
156
158
|
reportBackend?: ((use: RunBackendUse) => void) | undefined;
|
|
157
159
|
uncappedResponse?: boolean | undefined;
|
|
158
|
-
|
|
160
|
+
policy?: CompiledPolicy | undefined;
|
|
159
161
|
toolNames?: readonly string[] | undefined;
|
|
160
162
|
approval?: ToolDecision | undefined;
|
|
161
163
|
fetch?: ToolFetch | undefined;
|
|
@@ -202,6 +204,7 @@ export interface ToolDefinition {
|
|
|
202
204
|
prompt?: ToolPromptDefinition;
|
|
203
205
|
autoApprove?: boolean;
|
|
204
206
|
skillGated?: boolean;
|
|
207
|
+
ungatedFor?: ReadonlyArray<CapabilityProfile>;
|
|
205
208
|
rootsRequired?: boolean;
|
|
206
209
|
writeRootsRequired?: boolean;
|
|
207
210
|
externalWrite?: boolean;
|
|
@@ -212,9 +215,12 @@ export interface ToolDefinition {
|
|
|
212
215
|
resource?: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => ResourceDescriptor | null;
|
|
213
216
|
quote?: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => string | null;
|
|
214
217
|
egress?: (args: Record<string, unknown>) => string | readonly string[] | null;
|
|
218
|
+
command?: (args: Record<string, unknown>) => string | null;
|
|
219
|
+
paths?: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => readonly string[] | null;
|
|
215
220
|
compiled?: true;
|
|
216
221
|
endsRun?: true;
|
|
217
222
|
concurrent?: true;
|
|
223
|
+
stableRead?: boolean;
|
|
218
224
|
callsTools?: true;
|
|
219
225
|
defer?: true;
|
|
220
226
|
group?: string;
|
|
@@ -223,20 +229,20 @@ export interface ToolDefinition {
|
|
|
223
229
|
addons?: AddonLoaders;
|
|
224
230
|
execute: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => Promise<unknown>;
|
|
225
231
|
}
|
|
226
|
-
export
|
|
232
|
+
export type ToolCallEvent = {
|
|
227
233
|
type: 'tool-call';
|
|
228
234
|
name: string;
|
|
229
235
|
args: Record<string, unknown>;
|
|
230
236
|
rawCall?: string | undefined;
|
|
231
237
|
effect?: ToolEffect | undefined;
|
|
232
238
|
display?: ToolCallDisplay | undefined;
|
|
233
|
-
}
|
|
234
|
-
export
|
|
239
|
+
};
|
|
240
|
+
export type ToolResultEvent = {
|
|
235
241
|
type: 'tool-result';
|
|
236
242
|
name: string;
|
|
237
243
|
result: unknown;
|
|
238
|
-
}
|
|
239
|
-
export
|
|
244
|
+
};
|
|
245
|
+
export type ErrorEvent = {
|
|
240
246
|
type: 'error';
|
|
241
247
|
message: string;
|
|
242
248
|
name?: string;
|
|
@@ -247,11 +253,11 @@ export interface ErrorEvent {
|
|
|
247
253
|
forkAt?: number | null;
|
|
248
254
|
forkSafe?: boolean;
|
|
249
255
|
recoveryOperationIds?: string[];
|
|
250
|
-
}
|
|
251
|
-
export
|
|
256
|
+
};
|
|
257
|
+
export type AbortedEvent = {
|
|
252
258
|
type: 'aborted';
|
|
253
|
-
}
|
|
254
|
-
export
|
|
259
|
+
};
|
|
260
|
+
export type MetricsEvent = {
|
|
255
261
|
type: 'metrics';
|
|
256
262
|
totalTokens: number;
|
|
257
263
|
durationMs: number;
|
|
@@ -268,25 +274,26 @@ export interface MetricsEvent {
|
|
|
268
274
|
backends?: RunBackendUse[] | undefined;
|
|
269
275
|
usage?: UsageBreakdown | undefined;
|
|
270
276
|
stopReason?: string | undefined;
|
|
277
|
+
outcome?: RunOutcome | undefined;
|
|
271
278
|
route?: 'direct' | 'enhanced' | undefined;
|
|
272
279
|
routeModel?: string | undefined;
|
|
273
|
-
}
|
|
280
|
+
};
|
|
274
281
|
export interface InferenceCall {
|
|
275
282
|
round: number;
|
|
276
283
|
droppedTurns: number;
|
|
277
284
|
modelId: string;
|
|
278
285
|
messages: Message[];
|
|
279
286
|
tools: SdkTool[] | undefined;
|
|
280
|
-
generationParams: LlmGenerationParams | undefined;
|
|
287
|
+
generationParams: Partial<LlmGenerationParams> | undefined;
|
|
281
288
|
responseFormat: ResponseFormat | undefined;
|
|
282
289
|
toolDialect: ToolDialect | undefined;
|
|
283
290
|
cacheKey: string | undefined;
|
|
284
291
|
promptPrefix: string;
|
|
285
292
|
}
|
|
286
|
-
export
|
|
293
|
+
export type InferenceCallEvent = {
|
|
287
294
|
type: 'inference-call';
|
|
288
295
|
call: InferenceCall;
|
|
289
|
-
}
|
|
296
|
+
};
|
|
290
297
|
export type TransferEvent = {
|
|
291
298
|
type: 'transfer';
|
|
292
299
|
from: string;
|
|
@@ -298,23 +305,30 @@ export interface RunInput {
|
|
|
298
305
|
text: string;
|
|
299
306
|
id?: string;
|
|
300
307
|
}
|
|
301
|
-
export
|
|
308
|
+
export type InputEvent = {
|
|
302
309
|
type: 'input';
|
|
303
310
|
id?: string;
|
|
304
311
|
text: string;
|
|
305
312
|
round: number;
|
|
306
|
-
}
|
|
307
|
-
export
|
|
313
|
+
};
|
|
314
|
+
export type ContextEvent = {
|
|
315
|
+
type: 'context';
|
|
316
|
+
id?: string;
|
|
317
|
+
context: TurnContext;
|
|
318
|
+
round: number;
|
|
319
|
+
};
|
|
320
|
+
export type InputRejectedEvent = {
|
|
308
321
|
type: 'input-rejected';
|
|
309
322
|
reason: string;
|
|
310
|
-
}
|
|
311
|
-
export
|
|
323
|
+
};
|
|
324
|
+
export type GoalEvent = {
|
|
312
325
|
type: 'goal';
|
|
313
326
|
status: GoalStatus;
|
|
314
327
|
turn: number;
|
|
315
328
|
round: number;
|
|
316
329
|
text?: string;
|
|
317
|
-
|
|
330
|
+
checks?: string[];
|
|
331
|
+
};
|
|
318
332
|
export type FoldEvent = {
|
|
319
333
|
type: 'fold';
|
|
320
334
|
phase: 'start';
|
|
@@ -325,22 +339,21 @@ export type FoldEvent = {
|
|
|
325
339
|
throughId: string;
|
|
326
340
|
foldedTurns: number;
|
|
327
341
|
};
|
|
328
|
-
export
|
|
342
|
+
export type InferenceSentEvent = {
|
|
329
343
|
type: 'inference-sent';
|
|
330
344
|
round: number;
|
|
331
345
|
droppedTurns: number;
|
|
332
|
-
messages: Message[] | undefined;
|
|
333
346
|
tokens: InferenceTokens | undefined;
|
|
334
347
|
outcome: 'completed' | 'overflowed' | 'failed';
|
|
335
348
|
reason: string | undefined;
|
|
336
|
-
}
|
|
349
|
+
};
|
|
337
350
|
export interface InferenceTokens {
|
|
338
351
|
prompt?: number | undefined;
|
|
339
352
|
generated?: number | undefined;
|
|
340
353
|
cached?: number | undefined;
|
|
341
354
|
timeToFirstToken?: number | undefined;
|
|
342
355
|
}
|
|
343
|
-
export type CompletionEvent = (RunLifecycleEvent | TextEvent | ToolCallEvent | ToolResultEvent | ToolActivityEvent | ErrorEvent | AbortedEvent | MetricsEvent | InferenceCallEvent | InferenceSentEvent | TransferEvent | InputEvent | InputRejectedEvent | GoalEvent | FoldEvent) & {
|
|
356
|
+
export type CompletionEvent = (RunLifecycleEvent | TextEvent | ToolCallEvent | ToolResultEvent | ToolActivityEvent | ErrorEvent | AbortedEvent | MetricsEvent | InferenceCallEvent | InferenceSentEvent | TransferEvent | InputEvent | ContextEvent | InputRejectedEvent | GoalEvent | FoldEvent) & {
|
|
344
357
|
runId?: string;
|
|
345
358
|
round?: number;
|
|
346
359
|
callId?: string;
|
|
@@ -348,7 +361,10 @@ export type CompletionEvent = (RunLifecycleEvent | TextEvent | ToolCallEvent | T
|
|
|
348
361
|
};
|
|
349
362
|
export interface CompletionSdkResult {
|
|
350
363
|
requestId?: string;
|
|
351
|
-
|
|
364
|
+
events: AsyncIterable<SdkCompletionEvent>;
|
|
365
|
+
toolCallStream?: AsyncIterable<{
|
|
366
|
+
call: CompletionFinal['toolCalls'][number];
|
|
367
|
+
}>;
|
|
352
368
|
final: Promise<CompletionFinal>;
|
|
353
369
|
}
|
|
354
370
|
export type ResponseFormat = {
|
|
@@ -364,13 +380,17 @@ export type ResponseFormat = {
|
|
|
364
380
|
strict?: boolean;
|
|
365
381
|
};
|
|
366
382
|
};
|
|
383
|
+
export type SdkMessage = Message & {
|
|
384
|
+
toolCalls?: HistoryToolCall[];
|
|
385
|
+
toolCallId?: string;
|
|
386
|
+
};
|
|
367
387
|
export interface CompletionSdk {
|
|
368
388
|
completion(params: {
|
|
369
389
|
modelId: string;
|
|
370
|
-
history:
|
|
390
|
+
history: SdkMessage[];
|
|
371
391
|
stream: true;
|
|
372
392
|
tools?: SdkTool[] | undefined;
|
|
373
|
-
generationParams?: LlmGenerationParams | undefined;
|
|
393
|
+
generationParams?: Partial<LlmGenerationParams> | undefined;
|
|
374
394
|
responseFormat?: ResponseFormat | undefined;
|
|
375
395
|
toolDialect?: ToolDialect | undefined;
|
|
376
396
|
kvCache?: string | boolean;
|
|
@@ -387,6 +407,7 @@ export interface CompletionSdk {
|
|
|
387
407
|
export interface RoundModelLease {
|
|
388
408
|
modelId: string;
|
|
389
409
|
ctxSize?: number | undefined;
|
|
410
|
+
slots?: number | undefined;
|
|
390
411
|
sdk?: CompletionSdk;
|
|
391
412
|
release: () => void;
|
|
392
413
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DriveDir, DriveEntry } from '../tools/fs/drive.ts';
|
|
2
|
+
export type { DriveOpFn, GrantedDrive } from '../tools/fs/remote.ts';
|
|
3
|
+
export type { DriveEntryRequest, DriveGetRequest, DriveListRequest, DriveReadRequest, DriveRequest, DriveResponse, DriveSearchQuery, DriveSearchRequest, DriveWriteRequest } from '../tools/fs/remote-protocol.ts';
|
|
4
|
+
export type { SearchHit } from '../tools/fs/search.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
+
export interface EgressProxyOptions {
|
|
3
|
+
readonly hosts: readonly string[];
|
|
4
|
+
readonly signal?: BareAbortSignal;
|
|
5
|
+
}
|
|
6
|
+
export interface EgressProxySession {
|
|
7
|
+
readonly port: number;
|
|
8
|
+
denied(): readonly string[];
|
|
9
|
+
close(): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface EgressProxyService {
|
|
12
|
+
open(options: EgressProxyOptions): Promise<EgressProxySession>;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
2
|
import type { AskUserFn, AttachFn, FetchAttachmentFn, RunBudget, ToolDecision, ToolEffect, ToolExecuteContext, ToolParameterSchema, ToolSpill } from './index.ts';
|
|
3
|
+
import type { CompiledPolicy, PolicyEnforcement } from './policy.ts';
|
|
3
4
|
export interface ExecAttachment {
|
|
4
5
|
readonly attachmentId: string;
|
|
5
6
|
readonly fileName: string;
|
|
@@ -57,12 +58,10 @@ export interface ExecutionContext {
|
|
|
57
58
|
path: string;
|
|
58
59
|
}[];
|
|
59
60
|
readonly runBudget?: RunBudget;
|
|
60
|
-
readonly
|
|
61
|
+
readonly policy?: CompiledPolicy;
|
|
61
62
|
readonly toolNames?: readonly string[];
|
|
62
63
|
readonly approval?: ToolDecision;
|
|
63
64
|
readonly askUser?: AskUserFn;
|
|
64
|
-
readonly writeRoots?: readonly string[];
|
|
65
|
-
readonly deniedRoots?: readonly string[];
|
|
66
65
|
}
|
|
67
66
|
export interface ExecutionPlan {
|
|
68
67
|
run(options: ExecutionOptions): Promise<ExecResult> | ExecResult;
|
|
@@ -75,6 +74,7 @@ export interface FallbackExecutionAdapter {
|
|
|
75
74
|
}
|
|
76
75
|
export interface ExecShell extends FallbackExecutionAdapter {
|
|
77
76
|
readonly name: string;
|
|
77
|
+
readonly enforces?: PolicyEnforcement;
|
|
78
78
|
}
|
|
79
79
|
export interface ExecError {
|
|
80
80
|
error: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
2
|
import type { ToolDefinition } from './completion.ts';
|
|
3
|
+
import type { NetworkMode } from './policy.ts';
|
|
3
4
|
import type { HookRejection, Message, ResourceDescriptor, ToolEffect, ToolExecutionOutcome } from './run.ts';
|
|
4
5
|
export type HookPhase = 'runStart' | 'preToolCall' | 'postToolCall' | 'runEnd' | 'runPause' | 'runResume' | 'promptSubmit' | 'toolFailure' | 'stop' | 'preFold';
|
|
5
6
|
export interface RunStartPayload {
|
|
@@ -17,8 +18,10 @@ export interface PreToolCallPayload {
|
|
|
17
18
|
readonly signal?: BareAbortSignal | undefined;
|
|
18
19
|
readonly skillNames?: readonly string[];
|
|
19
20
|
readonly parameters?: ToolDefinition['parameters'];
|
|
20
|
-
readonly
|
|
21
|
+
readonly network?: NetworkMode;
|
|
21
22
|
readonly egress?: ToolDefinition['egress'];
|
|
23
|
+
readonly command?: ToolDefinition['command'];
|
|
24
|
+
readonly paths?: (args: Record<string, unknown>) => readonly string[] | null;
|
|
22
25
|
readonly effect: ToolEffect;
|
|
23
26
|
readonly resource: ResourceDescriptor | null;
|
|
24
27
|
args: Record<string, unknown>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export type * from './agent.ts';
|
|
2
2
|
export type * from './completion.ts';
|
|
3
|
+
export type * from './drive.ts';
|
|
3
4
|
export type * from './hooks.ts';
|
|
5
|
+
export type * from './managed-skills.ts';
|
|
6
|
+
export type * from './policy.ts';
|
|
4
7
|
export type * from './run.ts';
|
|
5
8
|
export type * from './skill-readiness.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CopyBaseResult, DeleteOverlayResult, ManagedSkill, SkillFileContent } from '../tools/skills/overlay-crud.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { createVectorIndex, loadVectorIndex } from '@qvac/sdk';
|
|
2
2
|
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
3
3
|
import type { ModelSrc } from '../models/context.ts';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
4
|
+
import type { HoldFn } from '../models/download-gate.ts';
|
|
5
|
+
import type { CancelSdk, ModelState, PendingLoad, TrackedLoad } from '../models/model-pool.ts';
|
|
6
|
+
export type { CancelSdk, HoldFn, ModelState, TrackedLoad };
|
|
6
7
|
export interface ModelHost {
|
|
7
8
|
sdk(): Promise<unknown>;
|
|
8
9
|
track(load: TrackedLoad, sdk?: Partial<CancelSdk>): TrackedLoad;
|
|
9
|
-
makeRoom(signal: BareAbortSignal | undefined,
|
|
10
|
+
makeRoom(signal: BareAbortSignal | undefined, busy: string | Error, srcs?: ReadonlyArray<string>): Promise<void>;
|
|
11
|
+
hold: HoldFn;
|
|
10
12
|
completionModel(model: string, signal?: BareAbortSignal): Promise<BorrowedModel>;
|
|
11
13
|
emit(state: ModelState): void;
|
|
12
14
|
progressState(model: string, progress: Record<string, unknown>): ModelState;
|
|
@@ -21,7 +23,7 @@ export interface BorrowedModel {
|
|
|
21
23
|
}
|
|
22
24
|
export interface ResidentPoolSpec {
|
|
23
25
|
addon: 'tts' | 'parakeet';
|
|
24
|
-
modelType:
|
|
26
|
+
modelType: PendingLoad['modelType'];
|
|
25
27
|
modelConfig?: Record<string, unknown>;
|
|
26
28
|
modelConfigFor?: (modelSrc: ModelSrc) => Readonly<Record<string, unknown>> | undefined;
|
|
27
29
|
openclCache?: boolean;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { DriveRoot } from './completion.ts';
|
|
2
|
+
export type PolicyPreset = 'read-only' | 'workspace-write' | 'full';
|
|
3
|
+
export type NetworkMode = 'off' | 'hosts' | 'on';
|
|
4
|
+
export type PolicyRoot = string;
|
|
5
|
+
export interface FilesPolicy {
|
|
6
|
+
readonly read?: readonly PolicyRoot[] | 'all';
|
|
7
|
+
readonly write?: readonly PolicyRoot[];
|
|
8
|
+
readonly deny?: readonly PolicyRoot[];
|
|
9
|
+
}
|
|
10
|
+
export interface NetworkPolicy {
|
|
11
|
+
readonly mode: NetworkMode;
|
|
12
|
+
readonly hosts?: readonly string[];
|
|
13
|
+
readonly localhost?: boolean;
|
|
14
|
+
readonly bind?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ExecPolicy {
|
|
17
|
+
readonly allow?: readonly string[];
|
|
18
|
+
readonly deny?: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
export interface PolicyRule {
|
|
21
|
+
readonly decision: 'allow' | 'ask' | 'deny';
|
|
22
|
+
readonly tool?: string;
|
|
23
|
+
readonly command?: readonly string[];
|
|
24
|
+
readonly paths?: readonly string[];
|
|
25
|
+
readonly hosts?: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export interface AccessPolicy {
|
|
28
|
+
readonly preset?: PolicyPreset;
|
|
29
|
+
readonly files?: FilesPolicy;
|
|
30
|
+
readonly network?: NetworkPolicy;
|
|
31
|
+
readonly sockets?: readonly PolicyRoot[];
|
|
32
|
+
readonly exec?: ExecPolicy;
|
|
33
|
+
readonly env?: readonly string[];
|
|
34
|
+
readonly rules?: readonly PolicyRule[];
|
|
35
|
+
}
|
|
36
|
+
export interface CompiledPolicy {
|
|
37
|
+
readonly files: {
|
|
38
|
+
readonly read: readonly PolicyRoot[] | 'all';
|
|
39
|
+
readonly write: readonly PolicyRoot[];
|
|
40
|
+
readonly deny: readonly PolicyRoot[];
|
|
41
|
+
};
|
|
42
|
+
readonly network: {
|
|
43
|
+
readonly mode: NetworkMode;
|
|
44
|
+
readonly hosts: readonly string[];
|
|
45
|
+
readonly localhost: boolean;
|
|
46
|
+
readonly bind: boolean;
|
|
47
|
+
};
|
|
48
|
+
readonly sockets: readonly PolicyRoot[] | 'all';
|
|
49
|
+
readonly exec: {
|
|
50
|
+
readonly allow: readonly string[] | 'all';
|
|
51
|
+
readonly deny: readonly string[];
|
|
52
|
+
};
|
|
53
|
+
readonly env: readonly string[] | 'all';
|
|
54
|
+
readonly rules: readonly PolicyRule[];
|
|
55
|
+
}
|
|
56
|
+
export interface PolicyGrants {
|
|
57
|
+
readonly read?: readonly PolicyRoot[];
|
|
58
|
+
readonly write?: readonly PolicyRoot[];
|
|
59
|
+
readonly deny?: readonly PolicyRoot[];
|
|
60
|
+
}
|
|
61
|
+
export interface RunRoots {
|
|
62
|
+
readonly fsRoots?: readonly DriveRoot[] | undefined;
|
|
63
|
+
readonly fsWriteRoots?: readonly DriveRoot[] | undefined;
|
|
64
|
+
readonly deny?: readonly PolicyRoot[];
|
|
65
|
+
}
|
|
66
|
+
export interface PolicyEnforcement {
|
|
67
|
+
readonly files: 'paths' | 'workspace-only' | 'none';
|
|
68
|
+
readonly network: 'hosts' | 'on-off' | 'none';
|
|
69
|
+
readonly env?: boolean;
|
|
70
|
+
readonly exec?: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface PolicyProvider {
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly enforces?: PolicyEnforcement;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -17,8 +17,14 @@ export interface Message {
|
|
|
17
17
|
toolCallId?: string | null;
|
|
18
18
|
name?: string | null;
|
|
19
19
|
id?: string | null;
|
|
20
|
+
context?: TurnContext | null;
|
|
20
21
|
[key: string]: unknown;
|
|
21
22
|
}
|
|
23
|
+
export interface TurnContext {
|
|
24
|
+
time?: string;
|
|
25
|
+
excerpts?: string[];
|
|
26
|
+
notes?: string;
|
|
27
|
+
}
|
|
22
28
|
export interface FailureResultReference {
|
|
23
29
|
type: 'qvac-failure-result-ref';
|
|
24
30
|
ref: string;
|
|
@@ -40,12 +46,13 @@ export interface PlanStep {
|
|
|
40
46
|
step: string;
|
|
41
47
|
status: 'pending' | 'in_progress' | 'done';
|
|
42
48
|
}
|
|
43
|
-
export type GoalStatus = 'open' | 'met' | 'rounds' | 'time' | 'tokens';
|
|
49
|
+
export type GoalStatus = 'open' | 'met' | 'rounds' | 'time' | 'tokens' | 'stalled';
|
|
44
50
|
export interface RunGoal {
|
|
45
51
|
objective: string;
|
|
46
52
|
rounds?: number;
|
|
47
53
|
ms?: number;
|
|
48
54
|
tokens?: number;
|
|
55
|
+
checks?: string[];
|
|
49
56
|
}
|
|
50
57
|
export type ToolEffect = 'read' | 'write';
|
|
51
58
|
export type ToolDecision = 'auto' | 'allowed' | 'denied' | 'skip-all' | 'blocked';
|
|
@@ -53,14 +60,14 @@ export interface ResourceDescriptor {
|
|
|
53
60
|
kind: string;
|
|
54
61
|
label: string;
|
|
55
62
|
}
|
|
56
|
-
export
|
|
63
|
+
export type ToolActivityEvent = {
|
|
57
64
|
type: 'tool-activity';
|
|
58
65
|
name: string;
|
|
59
66
|
args: Record<string, unknown>;
|
|
60
67
|
resource: ResourceDescriptor | null;
|
|
61
68
|
effect: ToolEffect;
|
|
62
69
|
decision: ToolDecision;
|
|
63
|
-
}
|
|
70
|
+
};
|
|
64
71
|
export type RunOutcome = 'answered' | 'mute' | 'exhausted' | 'search-capped' | 'time-capped' | 'tool-ended' | 'delivered';
|
|
65
72
|
export interface ToolCallDisplay {
|
|
66
73
|
readonly label: string;
|
|
@@ -134,6 +141,11 @@ export interface RoundSpeed {
|
|
|
134
141
|
tokensPerSecond?: number;
|
|
135
142
|
timeToFirstToken?: number;
|
|
136
143
|
stopReason?: string;
|
|
144
|
+
overflows?: number;
|
|
145
|
+
contextBoundary?: true;
|
|
146
|
+
reasoningDeltas?: number;
|
|
147
|
+
rawContentChars?: number;
|
|
148
|
+
kind?: 'streaming' | 'wrap-up';
|
|
137
149
|
}
|
|
138
150
|
export interface ToolSpeed {
|
|
139
151
|
round: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
+
import type { CompiledPolicy, PolicyEnforcement } from './policy.ts';
|
|
2
3
|
export interface SandboxExecOptions {
|
|
3
4
|
cwd?: string;
|
|
4
5
|
env?: Record<string, string>;
|
|
@@ -25,5 +26,6 @@ export interface SandboxWorkspace {
|
|
|
25
26
|
export interface SandboxService {
|
|
26
27
|
readonly name: string;
|
|
27
28
|
readonly isolated: boolean;
|
|
28
|
-
|
|
29
|
+
readonly enforces?: PolicyEnforcement;
|
|
30
|
+
open(workspaceDir: string, policy: CompiledPolicy): Promise<SandboxWorkspace>;
|
|
29
31
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
+
export interface TranslationRequest {
|
|
3
|
+
text: string;
|
|
4
|
+
to: string;
|
|
5
|
+
from?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface Translation {
|
|
8
|
+
text: string;
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
engine: 'nmt' | 'slm' | 'none';
|
|
12
|
+
model?: string;
|
|
13
|
+
pivoted?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface TranslationRefused {
|
|
16
|
+
error: string;
|
|
17
|
+
}
|
|
18
|
+
export interface TranslationService {
|
|
19
|
+
translate(request: TranslationRequest, signal?: BareAbortSignal): Promise<Translation | TranslationRefused>;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
1
2
|
import type { HarnessCapabilityProfile } from '../spec/hyperschema/types.d.ts';
|
|
2
|
-
import type { AgentHandoff, ApproveFn, AskUserFn, AttachFn, FetchAttachmentFn, HistoryToolCall, ProgressFn, ResourceDescriptor, ResponseFormat } from './contract/index.ts';
|
|
3
|
+
import type { AccessPolicy, AgentHandoff, ApproveFn, AskUserFn, AttachFn, FetchAttachmentFn, HistoryToolCall, ProgressFn, ResourceDescriptor, ResponseFormat } from './contract/index.ts';
|
|
3
4
|
import type { KvCacheDeletionResult } from './capabilities/kv-cache.ts';
|
|
4
5
|
import type { ModelSourcePreview, PreviewModelSourceContext } from './capabilities/preview-model-source.ts';
|
|
5
6
|
import type { MemoryBudget } from './hardware/memory-budget.ts';
|
|
@@ -13,7 +14,7 @@ import type { ManagedSkill, SkillFileContent } from './tools/skills/overlay-crud
|
|
|
13
14
|
import type { DriveOpFn, GrantedDrive } from './tools/fs/remote.ts';
|
|
14
15
|
import type { SpeakResult } from './contract/speech.ts';
|
|
15
16
|
import type { RunInput } from './contract/completion.ts';
|
|
16
|
-
import type { RunGoal } from './contract/run.ts';
|
|
17
|
+
import type { RunGoal, TurnContext } from './contract/run.ts';
|
|
17
18
|
import type { KnowledgeArtifact, KnowledgeGrant, KnowledgeHit, KnowledgeQuery, KnowledgeRemoved, KnowledgeStatus, KnowledgeUpsertResult } from './contract/knowledge.ts';
|
|
18
19
|
import type { ResolvedSkillCatalogEntry } from './tools/skills/catalog.ts';
|
|
19
20
|
import type { InstallStep, SkillSetup } from './tools/skills/manifest.ts';
|
|
@@ -21,17 +22,18 @@ import type { EngineBoot, EngineStep, HostRunLog, HostRunLogLease, RecoveryResol
|
|
|
21
22
|
export type { InstallStep, ListModelsOptions, ModelInfo, ResolvedSkillCatalogEntry, ResourceDescriptor, RunRecord, SkillSetup, ToolCatalogEntry };
|
|
22
23
|
export type { HostRunLog, HostRunLogLease, SpeakResult };
|
|
23
24
|
export type ApprovalCall = Parameters<ApproveFn>[0];
|
|
24
|
-
export
|
|
25
|
+
export type ChatMessage = {
|
|
25
26
|
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
26
27
|
content: string;
|
|
27
28
|
attachments?: {
|
|
28
29
|
path: string;
|
|
29
|
-
}[]
|
|
30
|
+
}[];
|
|
30
31
|
toolCalls?: HistoryToolCall[] | null;
|
|
31
32
|
toolCallId?: string | null;
|
|
32
33
|
name?: string | null;
|
|
33
34
|
id?: string | null;
|
|
34
|
-
|
|
35
|
+
context?: TurnContext | null;
|
|
36
|
+
};
|
|
35
37
|
export interface AgentKnobs {
|
|
36
38
|
id?: string;
|
|
37
39
|
name?: string;
|
|
@@ -50,7 +52,7 @@ export interface AgentKnobs {
|
|
|
50
52
|
imageHeight?: number | null;
|
|
51
53
|
approvalMode?: 'ask' | 'skip-all' | null;
|
|
52
54
|
disabledToolsets?: string[] | null;
|
|
53
|
-
|
|
55
|
+
policy?: AccessPolicy | null;
|
|
54
56
|
handoffs?: AgentHandoff[] | null;
|
|
55
57
|
plan?: boolean | null;
|
|
56
58
|
model?: string | null;
|
|
@@ -64,7 +66,10 @@ export interface CompletionContext {
|
|
|
64
66
|
agent: AgentKnobs;
|
|
65
67
|
agents?: Record<string, AgentKnobs>;
|
|
66
68
|
messages: ChatMessage[];
|
|
69
|
+
typedText?: string;
|
|
67
70
|
cacheKey?: string;
|
|
71
|
+
replaysContext?: boolean;
|
|
72
|
+
session?: string;
|
|
68
73
|
thinkingDefault?: string;
|
|
69
74
|
toolConfigs?: Record<string, Record<string, unknown>>;
|
|
70
75
|
generationParams?: LlmGenerationParams;
|
|
@@ -73,6 +78,7 @@ export interface CompletionContext {
|
|
|
73
78
|
maxToolRounds?: number;
|
|
74
79
|
knowledge?: KnowledgeGrant;
|
|
75
80
|
planMode?: boolean;
|
|
81
|
+
deferTools?: boolean;
|
|
76
82
|
goal?: RunGoal;
|
|
77
83
|
grantedDirs?: string[];
|
|
78
84
|
grantedDrives?: GrantedDrive[];
|
|
@@ -88,15 +94,19 @@ export interface CompletionContext {
|
|
|
88
94
|
onStep?: (step: EngineStep) => Promise<void>;
|
|
89
95
|
hostAppendTimeoutMs?: number;
|
|
90
96
|
requestDigestKey?: Uint8Array;
|
|
91
|
-
signal?:
|
|
92
|
-
aborted?: boolean;
|
|
93
|
-
addEventListener?: (type: 'abort', fn: () => void, opts?: {
|
|
94
|
-
once?: boolean;
|
|
95
|
-
}) => void;
|
|
96
|
-
removeEventListener?: (type: 'abort', fn: () => void) => void;
|
|
97
|
-
};
|
|
97
|
+
signal?: BareAbortSignal;
|
|
98
98
|
input?: AsyncIterable<RunInput>;
|
|
99
99
|
}
|
|
100
|
+
export interface HostSignal {
|
|
101
|
+
aborted?: boolean;
|
|
102
|
+
addEventListener?: (type: 'abort', fn: () => void, opts?: {
|
|
103
|
+
once?: boolean;
|
|
104
|
+
}) => void;
|
|
105
|
+
removeEventListener?: (type: 'abort', fn: () => void) => void;
|
|
106
|
+
}
|
|
107
|
+
export type HostContext<T> = T extends unknown ? Omit<T, 'signal'> & {
|
|
108
|
+
signal?: HostSignal;
|
|
109
|
+
} : never;
|
|
100
110
|
export type ResumeCompletionContext = Omit<Partial<CompletionContext>, 'runId' | 'resume'> & {
|
|
101
111
|
runId: string;
|
|
102
112
|
resume: true;
|
|
@@ -142,6 +152,9 @@ export interface LoadedModel {
|
|
|
142
152
|
refs: number;
|
|
143
153
|
fit?: LoadFit;
|
|
144
154
|
}
|
|
155
|
+
export interface DownloadsAllowedOptions {
|
|
156
|
+
allowed: boolean;
|
|
157
|
+
}
|
|
145
158
|
export interface ModelState {
|
|
146
159
|
status: string;
|
|
147
160
|
model?: string;
|
|
@@ -151,6 +164,7 @@ export interface ModelState {
|
|
|
151
164
|
message?: string;
|
|
152
165
|
catalogChanged?: boolean;
|
|
153
166
|
loaded?: LoadedModel[];
|
|
167
|
+
addon?: string | null;
|
|
154
168
|
}
|
|
155
169
|
export interface WarmModelContext {
|
|
156
170
|
model: string;
|
|
@@ -162,6 +176,9 @@ export interface LoadModelResult {
|
|
|
162
176
|
loaded: boolean;
|
|
163
177
|
reason?: 'memory';
|
|
164
178
|
}
|
|
179
|
+
export interface MemoryUsage {
|
|
180
|
+
readonly usedBytes: number;
|
|
181
|
+
}
|
|
165
182
|
export interface UnloadModelContext {
|
|
166
183
|
model: string;
|
|
167
184
|
}
|
|
@@ -247,8 +264,8 @@ export interface HarnessContract {
|
|
|
247
264
|
speakStream?(context: SpeakStreamContext): AsyncIterable<SpeakResult>;
|
|
248
265
|
getEmbeddingDevice?(): EmbedDevice | Promise<EmbedDevice>;
|
|
249
266
|
setEmbeddingDevice?(device: EmbedDevice): Promise<void> | void;
|
|
250
|
-
on?(event: 'model'
|
|
251
|
-
off?(event: 'model'
|
|
267
|
+
on?(event: 'model', listener: (state: ModelState) => void): unknown;
|
|
268
|
+
off?(event: 'model', listener: (state: ModelState) => void): unknown;
|
|
252
269
|
presuspend?(): Promise<void> | void;
|
|
253
270
|
suspend?(): Promise<void> | void;
|
|
254
271
|
wakeup?(): Promise<void> | void;
|
|
@@ -263,6 +280,9 @@ export interface HarnessContract {
|
|
|
263
280
|
agentId?: string | null;
|
|
264
281
|
}>): void | Promise<void>;
|
|
265
282
|
setModelIdleTimeout?(ms: number): void | Promise<void>;
|
|
283
|
+
setModelMemoryCap?(percent: number): void | Promise<void>;
|
|
284
|
+
memoryUsage?(): Promise<MemoryUsage>;
|
|
285
|
+
setDownloadsAllowed?(options: DownloadsAllowedOptions): void | Promise<void>;
|
|
266
286
|
listManagedSkills?(): Promise<ManagedSkill[]>;
|
|
267
287
|
readSkillFile?(name: string): Promise<SkillFileContent | null>;
|
|
268
288
|
writeSkillFile?(name: string, content: string): Promise<{
|