@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CompletionFinal, Tool as SdkTool, ToolCallWithCall, ToolDialect } from '@qvac/
|
|
1
|
+
import type { CompletionEvent as SdkCompletionEvent, CompletionFinal, Tool as SdkTool, ToolCallWithCall, ToolDialect } from '@qvac/inference';
|
|
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';
|
|
@@ -6,8 +6,11 @@ import type { CapabilityProfile } from '../models/model-catalog-constants.ts';
|
|
|
6
6
|
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
|
-
import type { KnowledgeGrant } from './knowledge.ts';
|
|
10
|
-
import type {
|
|
9
|
+
import type { KnowledgeGrant, KnowledgeSource } from './knowledge.ts';
|
|
10
|
+
import type { MediaRoundPort } from './media.ts';
|
|
11
|
+
import type { OcrService } from './ocr.ts';
|
|
12
|
+
import type { AccessPolicy, CompiledPolicy } from './policy.ts';
|
|
13
|
+
import type { GoalStatus, HistoryToolCall, HookRejection, Message, ResourceDescriptor, RoundSpeed, RunBackendUse, RunBudget, RunLifecycleEvent, RunOutcome, ToolActivityEvent, ToolCallDisplay, ToolDecision, ToolEffect, ToolSpeed, TrustedSource, TrustedSourceFacts, TurnContext } from './run.ts';
|
|
11
14
|
export type { CliValidator, DriveRoot, LlmGenerationParams };
|
|
12
15
|
export interface OutboundGuard {
|
|
13
16
|
facts(origin: TrustedSourceFacts['origin'], text: string): TrustedSourceFacts;
|
|
@@ -39,7 +42,7 @@ export interface AgentConfig {
|
|
|
39
42
|
imageHeight?: number | null;
|
|
40
43
|
approvalMode?: 'ask' | 'skip-all' | null;
|
|
41
44
|
disabledToolsets?: string[] | null;
|
|
42
|
-
|
|
45
|
+
policy?: AccessPolicy | null;
|
|
43
46
|
handoffs?: AgentHandoff[] | null;
|
|
44
47
|
plan?: boolean | null;
|
|
45
48
|
model?: string | null;
|
|
@@ -94,12 +97,25 @@ export type FetchAttachmentFn = (query: {
|
|
|
94
97
|
signal?: BareAbortSignal;
|
|
95
98
|
meta?: boolean;
|
|
96
99
|
}) => Promise<FetchedAttachment | AttachmentMeta | null>;
|
|
100
|
+
export type ShowImageFn = (query: {
|
|
101
|
+
attachmentId: string;
|
|
102
|
+
signal?: BareAbortSignal;
|
|
103
|
+
}) => Promise<string | null>;
|
|
97
104
|
export type ProgressFn = (update: {
|
|
98
105
|
percentage: number;
|
|
99
106
|
} | null) => void;
|
|
107
|
+
export type AskFieldType = 'single' | 'multiple' | 'date' | 'text' | 'note' | 'number';
|
|
108
|
+
export interface AskField {
|
|
109
|
+
id: string;
|
|
110
|
+
label: string;
|
|
111
|
+
type: AskFieldType;
|
|
112
|
+
options?: string[];
|
|
113
|
+
required?: boolean;
|
|
114
|
+
}
|
|
100
115
|
export type AskUserFn = (question: {
|
|
101
116
|
question: string;
|
|
102
117
|
options?: string[];
|
|
118
|
+
form?: AskField[];
|
|
103
119
|
}) => Promise<string | null>;
|
|
104
120
|
export interface ToolFetchInit {
|
|
105
121
|
method?: string;
|
|
@@ -133,12 +149,14 @@ export interface ToolSpill {
|
|
|
133
149
|
sink(stream: string): SpillSink;
|
|
134
150
|
}
|
|
135
151
|
export interface ToolExecuteContext {
|
|
152
|
+
currentTime?: number | undefined;
|
|
136
153
|
agentId?: string | null | undefined;
|
|
137
154
|
skills?: readonly string[] | undefined;
|
|
138
155
|
skillsLoadedThisTurn?: readonly string[] | undefined;
|
|
139
156
|
runId?: string;
|
|
140
157
|
callId?: string;
|
|
141
158
|
ctxSize?: number | undefined;
|
|
159
|
+
session?: string | undefined;
|
|
142
160
|
image?: ImageSettings | undefined;
|
|
143
161
|
settings?: Record<string, unknown> | undefined;
|
|
144
162
|
turnImages?: {
|
|
@@ -148,6 +166,7 @@ export interface ToolExecuteContext {
|
|
|
148
166
|
fetchAttachment?: FetchAttachmentFn | undefined;
|
|
149
167
|
progress?: ProgressFn | undefined;
|
|
150
168
|
askUser?: AskUserFn | undefined;
|
|
169
|
+
mediaRound?: MediaRoundPort | undefined;
|
|
151
170
|
signal?: BareAbortSignal | undefined;
|
|
152
171
|
fsRoots?: readonly DriveRoot[] | undefined;
|
|
153
172
|
fsWriteRoots?: readonly DriveRoot[] | undefined;
|
|
@@ -155,11 +174,13 @@ export interface ToolExecuteContext {
|
|
|
155
174
|
runBudget?: RunBudget | undefined;
|
|
156
175
|
reportBackend?: ((use: RunBackendUse) => void) | undefined;
|
|
157
176
|
uncappedResponse?: boolean | undefined;
|
|
158
|
-
|
|
177
|
+
policy?: CompiledPolicy | undefined;
|
|
159
178
|
toolNames?: readonly string[] | undefined;
|
|
179
|
+
offeredTools?: readonly string[] | undefined;
|
|
160
180
|
approval?: ToolDecision | undefined;
|
|
161
181
|
fetch?: ToolFetch | undefined;
|
|
162
182
|
knowledge?: KnowledgeGrant | undefined;
|
|
183
|
+
ocr?: OcrService | undefined;
|
|
163
184
|
spill?: ToolSpill | undefined;
|
|
164
185
|
planMode?: boolean | undefined;
|
|
165
186
|
callTool?: CallTool | undefined;
|
|
@@ -181,6 +202,7 @@ export interface ToolParameterSchema {
|
|
|
181
202
|
enum?: string[];
|
|
182
203
|
items?: ToolParameterSchema;
|
|
183
204
|
properties?: Record<string, ToolParameterSchema>;
|
|
205
|
+
additionalProperties?: boolean;
|
|
184
206
|
required?: string[];
|
|
185
207
|
default?: unknown;
|
|
186
208
|
}
|
|
@@ -202,6 +224,7 @@ export interface ToolDefinition {
|
|
|
202
224
|
prompt?: ToolPromptDefinition;
|
|
203
225
|
autoApprove?: boolean;
|
|
204
226
|
skillGated?: boolean;
|
|
227
|
+
ungatedFor?: ReadonlyArray<CapabilityProfile>;
|
|
205
228
|
rootsRequired?: boolean;
|
|
206
229
|
writeRootsRequired?: boolean;
|
|
207
230
|
externalWrite?: boolean;
|
|
@@ -212,9 +235,13 @@ export interface ToolDefinition {
|
|
|
212
235
|
resource?: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => ResourceDescriptor | null;
|
|
213
236
|
quote?: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => string | null;
|
|
214
237
|
egress?: (args: Record<string, unknown>) => string | readonly string[] | null;
|
|
238
|
+
command?: (args: Record<string, unknown>) => string | null;
|
|
239
|
+
paths?: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => readonly string[] | null;
|
|
215
240
|
compiled?: true;
|
|
216
241
|
endsRun?: true;
|
|
217
242
|
concurrent?: true;
|
|
243
|
+
stableRead?: boolean;
|
|
244
|
+
deliversMany?: true;
|
|
218
245
|
callsTools?: true;
|
|
219
246
|
defer?: true;
|
|
220
247
|
group?: string;
|
|
@@ -223,20 +250,20 @@ export interface ToolDefinition {
|
|
|
223
250
|
addons?: AddonLoaders;
|
|
224
251
|
execute: (args: Record<string, unknown>, ctx?: ToolExecuteContext) => Promise<unknown>;
|
|
225
252
|
}
|
|
226
|
-
export
|
|
253
|
+
export type ToolCallEvent = {
|
|
227
254
|
type: 'tool-call';
|
|
228
255
|
name: string;
|
|
229
256
|
args: Record<string, unknown>;
|
|
230
257
|
rawCall?: string | undefined;
|
|
231
258
|
effect?: ToolEffect | undefined;
|
|
232
259
|
display?: ToolCallDisplay | undefined;
|
|
233
|
-
}
|
|
234
|
-
export
|
|
260
|
+
};
|
|
261
|
+
export type ToolResultEvent = {
|
|
235
262
|
type: 'tool-result';
|
|
236
263
|
name: string;
|
|
237
264
|
result: unknown;
|
|
238
|
-
}
|
|
239
|
-
export
|
|
265
|
+
};
|
|
266
|
+
export type ErrorEvent = {
|
|
240
267
|
type: 'error';
|
|
241
268
|
message: string;
|
|
242
269
|
name?: string;
|
|
@@ -247,11 +274,11 @@ export interface ErrorEvent {
|
|
|
247
274
|
forkAt?: number | null;
|
|
248
275
|
forkSafe?: boolean;
|
|
249
276
|
recoveryOperationIds?: string[];
|
|
250
|
-
}
|
|
251
|
-
export
|
|
277
|
+
};
|
|
278
|
+
export type AbortedEvent = {
|
|
252
279
|
type: 'aborted';
|
|
253
|
-
}
|
|
254
|
-
export
|
|
280
|
+
};
|
|
281
|
+
export type MetricsEvent = {
|
|
255
282
|
type: 'metrics';
|
|
256
283
|
totalTokens: number;
|
|
257
284
|
durationMs: number;
|
|
@@ -268,25 +295,26 @@ export interface MetricsEvent {
|
|
|
268
295
|
backends?: RunBackendUse[] | undefined;
|
|
269
296
|
usage?: UsageBreakdown | undefined;
|
|
270
297
|
stopReason?: string | undefined;
|
|
298
|
+
outcome?: RunOutcome | undefined;
|
|
271
299
|
route?: 'direct' | 'enhanced' | undefined;
|
|
272
300
|
routeModel?: string | undefined;
|
|
273
|
-
}
|
|
301
|
+
};
|
|
274
302
|
export interface InferenceCall {
|
|
275
303
|
round: number;
|
|
276
304
|
droppedTurns: number;
|
|
277
305
|
modelId: string;
|
|
278
306
|
messages: Message[];
|
|
279
307
|
tools: SdkTool[] | undefined;
|
|
280
|
-
generationParams: LlmGenerationParams | undefined;
|
|
308
|
+
generationParams: Partial<LlmGenerationParams> | undefined;
|
|
281
309
|
responseFormat: ResponseFormat | undefined;
|
|
282
310
|
toolDialect: ToolDialect | undefined;
|
|
283
311
|
cacheKey: string | undefined;
|
|
284
312
|
promptPrefix: string;
|
|
285
313
|
}
|
|
286
|
-
export
|
|
314
|
+
export type InferenceCallEvent = {
|
|
287
315
|
type: 'inference-call';
|
|
288
316
|
call: InferenceCall;
|
|
289
|
-
}
|
|
317
|
+
};
|
|
290
318
|
export type TransferEvent = {
|
|
291
319
|
type: 'transfer';
|
|
292
320
|
from: string;
|
|
@@ -298,23 +326,33 @@ export interface RunInput {
|
|
|
298
326
|
text: string;
|
|
299
327
|
id?: string;
|
|
300
328
|
}
|
|
301
|
-
export
|
|
329
|
+
export type InputEvent = {
|
|
302
330
|
type: 'input';
|
|
303
331
|
id?: string;
|
|
304
332
|
text: string;
|
|
305
333
|
round: number;
|
|
306
|
-
}
|
|
307
|
-
export
|
|
334
|
+
};
|
|
335
|
+
export type ContextEvent = {
|
|
336
|
+
type: 'context';
|
|
337
|
+
id?: string;
|
|
338
|
+
context: TurnContext;
|
|
339
|
+
sources?: KnowledgeSource[];
|
|
340
|
+
round: number;
|
|
341
|
+
};
|
|
342
|
+
export type InputRejectedEvent = {
|
|
308
343
|
type: 'input-rejected';
|
|
309
344
|
reason: string;
|
|
310
|
-
}
|
|
311
|
-
export
|
|
345
|
+
};
|
|
346
|
+
export type GoalEvent = {
|
|
312
347
|
type: 'goal';
|
|
313
348
|
status: GoalStatus;
|
|
314
349
|
turn: number;
|
|
315
350
|
round: number;
|
|
316
351
|
text?: string;
|
|
317
|
-
|
|
352
|
+
checks?: string[];
|
|
353
|
+
proof?: string;
|
|
354
|
+
cases?: true;
|
|
355
|
+
};
|
|
318
356
|
export type FoldEvent = {
|
|
319
357
|
type: 'fold';
|
|
320
358
|
phase: 'start';
|
|
@@ -325,22 +363,21 @@ export type FoldEvent = {
|
|
|
325
363
|
throughId: string;
|
|
326
364
|
foldedTurns: number;
|
|
327
365
|
};
|
|
328
|
-
export
|
|
366
|
+
export type InferenceSentEvent = {
|
|
329
367
|
type: 'inference-sent';
|
|
330
368
|
round: number;
|
|
331
369
|
droppedTurns: number;
|
|
332
|
-
messages: Message[] | undefined;
|
|
333
370
|
tokens: InferenceTokens | undefined;
|
|
334
371
|
outcome: 'completed' | 'overflowed' | 'failed';
|
|
335
372
|
reason: string | undefined;
|
|
336
|
-
}
|
|
373
|
+
};
|
|
337
374
|
export interface InferenceTokens {
|
|
338
375
|
prompt?: number | undefined;
|
|
339
376
|
generated?: number | undefined;
|
|
340
377
|
cached?: number | undefined;
|
|
341
378
|
timeToFirstToken?: number | undefined;
|
|
342
379
|
}
|
|
343
|
-
export type CompletionEvent = (RunLifecycleEvent | TextEvent | ToolCallEvent | ToolResultEvent | ToolActivityEvent | ErrorEvent | AbortedEvent | MetricsEvent | InferenceCallEvent | InferenceSentEvent | TransferEvent | InputEvent | InputRejectedEvent | GoalEvent | FoldEvent) & {
|
|
380
|
+
export type CompletionEvent = (RunLifecycleEvent | TextEvent | ToolCallEvent | ToolResultEvent | ToolActivityEvent | ErrorEvent | AbortedEvent | MetricsEvent | InferenceCallEvent | InferenceSentEvent | TransferEvent | InputEvent | ContextEvent | InputRejectedEvent | GoalEvent | FoldEvent) & {
|
|
344
381
|
runId?: string;
|
|
345
382
|
round?: number;
|
|
346
383
|
callId?: string;
|
|
@@ -348,7 +385,10 @@ export type CompletionEvent = (RunLifecycleEvent | TextEvent | ToolCallEvent | T
|
|
|
348
385
|
};
|
|
349
386
|
export interface CompletionSdkResult {
|
|
350
387
|
requestId?: string;
|
|
351
|
-
|
|
388
|
+
events: AsyncIterable<SdkCompletionEvent>;
|
|
389
|
+
toolCallStream?: AsyncIterable<{
|
|
390
|
+
call: CompletionFinal['toolCalls'][number];
|
|
391
|
+
}>;
|
|
352
392
|
final: Promise<CompletionFinal>;
|
|
353
393
|
}
|
|
354
394
|
export type ResponseFormat = {
|
|
@@ -364,13 +404,17 @@ export type ResponseFormat = {
|
|
|
364
404
|
strict?: boolean;
|
|
365
405
|
};
|
|
366
406
|
};
|
|
407
|
+
export type SdkMessage = Message & {
|
|
408
|
+
toolCalls?: HistoryToolCall[];
|
|
409
|
+
toolCallId?: string;
|
|
410
|
+
};
|
|
367
411
|
export interface CompletionSdk {
|
|
368
412
|
completion(params: {
|
|
369
413
|
modelId: string;
|
|
370
|
-
history:
|
|
414
|
+
history: SdkMessage[];
|
|
371
415
|
stream: true;
|
|
372
416
|
tools?: SdkTool[] | undefined;
|
|
373
|
-
generationParams?: LlmGenerationParams | undefined;
|
|
417
|
+
generationParams?: Partial<LlmGenerationParams> | undefined;
|
|
374
418
|
responseFormat?: ResponseFormat | undefined;
|
|
375
419
|
toolDialect?: ToolDialect | undefined;
|
|
376
420
|
kvCache?: string | boolean;
|
|
@@ -387,6 +431,8 @@ export interface CompletionSdk {
|
|
|
387
431
|
export interface RoundModelLease {
|
|
388
432
|
modelId: string;
|
|
389
433
|
ctxSize?: number | undefined;
|
|
434
|
+
slots?: number | undefined;
|
|
435
|
+
canThink?: boolean | undefined;
|
|
390
436
|
sdk?: CompletionSdk;
|
|
391
437
|
release: () => void;
|
|
392
438
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { DriveDir, DriveEntry } from '../tools/fs/remote-protocol.ts';
|
|
2
|
+
export type { DriveOpFn, GrantedDrive } from '../tools/fs/remote-protocol.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;
|
|
@@ -97,6 +97,7 @@ export interface ExecScope {
|
|
|
97
97
|
export interface ExecValidateScope extends ExecScope {
|
|
98
98
|
readonly trusted: boolean;
|
|
99
99
|
readonly toolNames?: readonly string[] | undefined;
|
|
100
|
+
readonly offeredTools?: readonly string[] | undefined;
|
|
100
101
|
}
|
|
101
102
|
export interface LanguageRun {
|
|
102
103
|
readonly args: Record<string, unknown>;
|
|
@@ -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,9 @@
|
|
|
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 './media.ts';
|
|
7
|
+
export type * from './policy.ts';
|
|
4
8
|
export type * from './run.ts';
|
|
5
9
|
export type * from './skill-readiness.ts';
|
|
@@ -23,6 +23,7 @@ export interface KnowledgeUpsertResult {
|
|
|
23
23
|
export interface KnowledgeQuery {
|
|
24
24
|
text: string;
|
|
25
25
|
scopes: readonly string[];
|
|
26
|
+
focus?: readonly string[];
|
|
26
27
|
k?: number;
|
|
27
28
|
signal?: BareAbortSignal;
|
|
28
29
|
}
|
|
@@ -34,6 +35,12 @@ export interface KnowledgeHit {
|
|
|
34
35
|
score: number;
|
|
35
36
|
metadata?: Record<string, unknown>;
|
|
36
37
|
}
|
|
38
|
+
export interface KnowledgeSource {
|
|
39
|
+
artifactId: string;
|
|
40
|
+
chunkId: string;
|
|
41
|
+
score: number;
|
|
42
|
+
metadata?: Record<string, unknown>;
|
|
43
|
+
}
|
|
37
44
|
export interface KnowledgeArtifactStatus {
|
|
38
45
|
artifactId: string;
|
|
39
46
|
version?: string;
|
|
@@ -44,10 +51,13 @@ export interface KnowledgeStatus {
|
|
|
44
51
|
model: string;
|
|
45
52
|
dimensions: number;
|
|
46
53
|
chunks: number;
|
|
54
|
+
pending: number;
|
|
47
55
|
artifacts: KnowledgeArtifactStatus[];
|
|
48
56
|
}
|
|
49
57
|
export interface KnowledgeGrant {
|
|
50
58
|
scopes: string[];
|
|
59
|
+
focus?: string[];
|
|
60
|
+
k?: number;
|
|
51
61
|
}
|
|
52
62
|
export interface KnowledgeRemoved {
|
|
53
63
|
removed: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { CopyBaseResult, DeleteOverlayResult, ManagedSkill, SkillFileContent } from '../tools/skills/overlay-crud.ts';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
+
export type MediaKind = 'image' | 'music';
|
|
3
|
+
export interface MediaRoundRequest {
|
|
4
|
+
kind: MediaKind;
|
|
5
|
+
runId: string;
|
|
6
|
+
modelChoice?: string | undefined;
|
|
7
|
+
params: Record<string, unknown>;
|
|
8
|
+
images?: Uint8Array[] | undefined;
|
|
9
|
+
sources?: MediaSourceRef[] | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface MediaSourceRef {
|
|
12
|
+
attachmentId?: string | undefined;
|
|
13
|
+
path?: string | undefined;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
export interface MediaTick {
|
|
18
|
+
step: number;
|
|
19
|
+
total: number;
|
|
20
|
+
stage?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface MediaRoundIo {
|
|
23
|
+
signal: BareAbortSignal;
|
|
24
|
+
tick(tick: MediaTick): void;
|
|
25
|
+
}
|
|
26
|
+
export interface ImageRoundOutput {
|
|
27
|
+
kind: 'image';
|
|
28
|
+
bytes: Uint8Array;
|
|
29
|
+
}
|
|
30
|
+
export interface MediaAudioFormat {
|
|
31
|
+
sampleRate: number;
|
|
32
|
+
channels: number;
|
|
33
|
+
bitsPerSample: number;
|
|
34
|
+
}
|
|
35
|
+
export interface MediaMusicStats {
|
|
36
|
+
audioDurationMs?: number | undefined;
|
|
37
|
+
totalTimeMs?: number | undefined;
|
|
38
|
+
realTimeFactor?: number | undefined;
|
|
39
|
+
backendDevice?: number | undefined;
|
|
40
|
+
backendId?: number | undefined;
|
|
41
|
+
}
|
|
42
|
+
export interface MusicRoundOutput {
|
|
43
|
+
kind: 'music';
|
|
44
|
+
bytes: Uint8Array;
|
|
45
|
+
format: MediaAudioFormat;
|
|
46
|
+
gpuRequested: boolean;
|
|
47
|
+
stats?: MediaMusicStats | undefined;
|
|
48
|
+
}
|
|
49
|
+
export type MediaRoundOutput = ImageRoundOutput | MusicRoundOutput;
|
|
50
|
+
export interface MediaRoundRefusal {
|
|
51
|
+
error: string;
|
|
52
|
+
code?: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
export type MediaRoundResult = MediaRoundOutput | MediaRoundRefusal;
|
|
55
|
+
export type MediaRoundPort = (request: MediaRoundRequest, io: MediaRoundIo) => Promise<MediaRoundResult>;
|
|
56
|
+
export interface MediaRoundServer {
|
|
57
|
+
serve: MediaRoundPort;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import type { createVectorIndex, loadVectorIndex } from '@qvac/
|
|
1
|
+
import type { createVectorIndex, loadVectorIndex } from '@qvac/inference';
|
|
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 { ModelAddon } from '../models/model-source.ts';
|
|
6
|
+
import type { LoadRequests } from '../models/load-requests.ts';
|
|
7
|
+
import type { CancelSdk, ModelState, PendingLoad, TrackedLoad } from '../models/model-pool.ts';
|
|
8
|
+
export type { CancelSdk, HoldFn, LoadRequests, ModelState, TrackedLoad };
|
|
6
9
|
export interface ModelHost {
|
|
7
10
|
sdk(): Promise<unknown>;
|
|
8
11
|
track(load: TrackedLoad, sdk?: Partial<CancelSdk>): TrackedLoad;
|
|
9
|
-
makeRoom(signal: BareAbortSignal | undefined,
|
|
12
|
+
makeRoom(signal: BareAbortSignal | undefined, busy: string | Error, srcs?: ReadonlyArray<string>): Promise<void>;
|
|
13
|
+
hold: HoldFn;
|
|
14
|
+
isCached(model: string, addon: ModelAddon): Promise<boolean>;
|
|
15
|
+
readonly requests: LoadRequests;
|
|
10
16
|
completionModel(model: string, signal?: BareAbortSignal): Promise<BorrowedModel>;
|
|
11
17
|
emit(state: ModelState): void;
|
|
12
18
|
progressState(model: string, progress: Record<string, unknown>): ModelState;
|
|
@@ -20,8 +26,8 @@ export interface BorrowedModel {
|
|
|
20
26
|
release(): void;
|
|
21
27
|
}
|
|
22
28
|
export interface ResidentPoolSpec {
|
|
23
|
-
addon: 'tts' | 'parakeet';
|
|
24
|
-
modelType:
|
|
29
|
+
addon: 'tts' | 'parakeet' | 'ocr';
|
|
30
|
+
modelType: PendingLoad['modelType'];
|
|
25
31
|
modelConfig?: Record<string, unknown>;
|
|
26
32
|
modelConfigFor?: (modelSrc: ModelSrc) => Readonly<Record<string, unknown>> | undefined;
|
|
27
33
|
openclCache?: boolean;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
+
export interface OcrImage {
|
|
3
|
+
readonly width: number;
|
|
4
|
+
readonly height: number;
|
|
5
|
+
readonly data: Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
export interface OcrService {
|
|
8
|
+
read(image: OcrImage, signal?: BareAbortSignal): Promise<string>;
|
|
9
|
+
}
|
|
10
|
+
export interface OcrReadContext {
|
|
11
|
+
readonly image: OcrImage;
|
|
12
|
+
readonly signal?: BareAbortSignal | undefined;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 {};
|