@qvac/harness 1.0.0-rc.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +696 -7
- package/NOTICE.md +0 -16
- package/README.md +46 -5
- package/dist-lib/index.d.ts +23 -16
- package/dist-lib/index.js +127 -23
- package/dist-lib/lib/agent/delegate.d.ts +1 -0
- package/dist-lib/lib/agent/delegate.js +10 -9
- package/dist-lib/lib/agent/follow.d.ts +1 -0
- package/dist-lib/lib/agent/follow.js +12 -2
- package/dist-lib/lib/agent/resolve.js +11 -3
- package/dist-lib/lib/agent/tools.d.ts +1 -0
- package/dist-lib/lib/agent/tools.js +1 -1
- package/dist-lib/lib/capabilities/agent-ports.d.ts +1 -1
- package/dist-lib/lib/capabilities/agent-ports.js +8 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/answering.js +2 -2
- package/dist-lib/lib/capabilities/completion-engine/actors/direct-search.js +1 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/execute.d.ts +1 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/executing.d.ts +2 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/executing.js +79 -9
- package/dist-lib/lib/capabilities/completion-engine/actors/execution-plan.js +12 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/inspect-prepare.js +1 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/inspecting.d.ts +1 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/inspecting.js +13 -8
- package/dist-lib/lib/capabilities/completion-engine/actors/loading-skill.js +3 -2
- package/dist-lib/lib/capabilities/completion-engine/actors/preparing.js +47 -22
- package/dist-lib/lib/capabilities/completion-engine/actors/rejecting.js +5 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/resolving.js +10 -4
- package/dist-lib/lib/capabilities/completion-engine/actors/retrieving.d.ts +2 -1
- package/dist-lib/lib/capabilities/completion-engine/actors/retrieving.js +19 -11
- package/dist-lib/lib/capabilities/completion-engine/actors/run-prepare.js +38 -23
- package/dist-lib/lib/capabilities/completion-engine/actors/skill-step.js +31 -10
- package/dist-lib/lib/capabilities/completion-engine/actors/stream.d.ts +5 -3
- package/dist-lib/lib/capabilities/completion-engine/actors/stream.js +61 -7
- package/dist-lib/lib/capabilities/completion-engine/actors/streaming.js +41 -16
- package/dist-lib/lib/capabilities/completion-engine/actors/wrap-up.js +26 -10
- package/dist-lib/lib/capabilities/completion-engine/actors.d.ts +1 -0
- package/dist-lib/lib/capabilities/completion-engine/actors.js +8 -8
- package/dist-lib/lib/capabilities/completion-engine/driver.d.ts +0 -1
- package/dist-lib/lib/capabilities/completion-engine/driver.js +30 -6
- package/dist-lib/lib/capabilities/completion-engine/durable.d.ts +2 -1
- package/dist-lib/lib/capabilities/completion-engine/durable.js +7 -1
- package/dist-lib/lib/capabilities/completion-engine/engine.d.ts +2 -0
- package/dist-lib/lib/capabilities/completion-engine/engine.js +35 -15
- package/dist-lib/lib/capabilities/completion-engine/index.d.ts +0 -1
- package/dist-lib/lib/capabilities/completion-engine/loop.d.ts +13 -3
- package/dist-lib/lib/capabilities/completion-engine/loop.js +7 -2
- package/dist-lib/lib/capabilities/completion-engine/model-round.d.ts +4 -1
- package/dist-lib/lib/capabilities/completion-engine/model-round.js +2 -0
- package/dist-lib/lib/capabilities/completion-engine/operations.js +29 -9
- package/dist-lib/lib/capabilities/completion-engine/ports.d.ts +1 -0
- package/dist-lib/lib/capabilities/completion-engine/ports.js +6 -4
- package/dist-lib/lib/capabilities/completion-engine/prepare-step.d.ts +4 -1
- package/dist-lib/lib/capabilities/completion-engine/round.d.ts +14 -0
- package/dist-lib/lib/capabilities/completion-engine/round.js +102 -47
- package/dist-lib/lib/capabilities/completion-engine/session.d.ts +5 -3
- package/dist-lib/lib/capabilities/completion-engine/session.js +1 -0
- package/dist-lib/lib/capabilities/completion-engine/tool-caller.js +3 -1
- package/dist-lib/lib/capabilities/completion-engine/tool-execution.d.ts +5 -41
- package/dist-lib/lib/capabilities/completion-engine/tool-execution.js +21 -135
- package/dist-lib/lib/capabilities/completion-engine/tool-outcome.d.ts +4 -0
- package/dist-lib/lib/capabilities/completion-engine/tool-outcome.js +40 -0
- package/dist-lib/lib/capabilities/completion-engine/tool-preflight.d.ts +43 -0
- package/dist-lib/lib/capabilities/completion-engine/tool-preflight.js +91 -0
- package/dist-lib/lib/capabilities/completion-engine/transition-log.d.ts +14 -0
- package/dist-lib/lib/capabilities/completion-engine/transition-log.js +44 -0
- package/dist-lib/lib/capabilities/completion-engine/turns.d.ts +4 -0
- package/dist-lib/lib/capabilities/completion-engine/turns.js +36 -8
- package/dist-lib/lib/capabilities/enhance.js +3 -3
- package/dist-lib/lib/capabilities/kv-cache.js +11 -3
- package/dist-lib/lib/capabilities/prefix-template.d.ts +34 -0
- package/dist-lib/lib/capabilities/prefix-template.js +175 -0
- package/dist-lib/lib/capabilities/prompt-prefix.d.ts +2 -0
- package/dist-lib/lib/capabilities/prompt-prefix.js +8 -0
- package/dist-lib/lib/capabilities/sdk-tool.d.ts +4 -4
- package/dist-lib/lib/capabilities/sdk-tool.js +22 -6
- 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-turns/answered.d.ts +15 -0
- package/dist-lib/lib/capabilities/tool-turns/answered.js +16 -0
- package/dist-lib/lib/capabilities/tool-turns/attachments.d.ts +7 -0
- package/dist-lib/lib/capabilities/tool-turns/attachments.js +39 -0
- package/dist-lib/lib/capabilities/tool-turns/copy.d.ts +13 -0
- package/dist-lib/lib/capabilities/tool-turns/copy.js +29 -0
- package/dist-lib/lib/capabilities/tool-turns/result-turn.d.ts +22 -0
- package/dist-lib/lib/capabilities/tool-turns/result-turn.js +120 -0
- package/dist-lib/lib/capabilities/tool-turns/run-limits.d.ts +6 -0
- package/dist-lib/lib/capabilities/tool-turns/run-limits.js +32 -0
- package/dist-lib/lib/capabilities/tool-turns/skill-loads.d.ts +9 -0
- package/dist-lib/lib/capabilities/tool-turns/skill-loads.js +71 -0
- package/dist-lib/lib/capabilities/tool-turns.d.ts +10 -43
- package/dist-lib/lib/capabilities/tool-turns.js +7 -262
- 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.js +6 -5
- package/dist-lib/lib/connect/abort.d.ts +6 -0
- package/dist-lib/lib/connect/abort.js +52 -0
- package/dist-lib/lib/connect/bridges.d.ts +21 -0
- package/dist-lib/lib/connect/bridges.js +185 -0
- package/dist-lib/lib/connect/decode.d.ts +31 -0
- package/dist-lib/lib/connect/decode.js +114 -0
- package/dist-lib/lib/connect/host-run-log.d.ts +20 -0
- package/dist-lib/lib/connect/host-run-log.js +89 -0
- package/dist-lib/lib/connect/round-log.d.ts +8 -0
- package/dist-lib/lib/connect/round-log.js +33 -0
- package/dist-lib/lib/connect/served.d.ts +7 -0
- package/dist-lib/lib/connect/served.js +45 -0
- package/dist-lib/lib/connect.d.ts +5 -1
- package/dist-lib/lib/connect.js +102 -444
- package/dist-lib/lib/context-window.d.ts +13 -6
- package/dist-lib/lib/context-window.js +18 -5
- package/dist-lib/lib/contract/agent.d.ts +18 -1
- package/dist-lib/lib/contract/completion.d.ts +35 -3
- package/dist-lib/lib/contract/drive.d.ts +154 -4
- package/dist-lib/lib/contract/exec.d.ts +1 -0
- package/dist-lib/lib/contract/index.d.ts +1 -0
- package/dist-lib/lib/contract/knowledge.d.ts +10 -0
- package/dist-lib/lib/contract/media.d.ts +58 -0
- package/dist-lib/lib/contract/models.d.ts +6 -2
- package/dist-lib/lib/contract/ocr.d.ts +17 -0
- package/dist-lib/lib/contract/ocr.js +1 -0
- package/dist-lib/lib/contract/root-search.d.ts +34 -0
- package/dist-lib/lib/contract/root-search.js +1 -0
- package/dist-lib/lib/contract/run.d.ts +13 -0
- package/dist-lib/lib/contract-types.d.ts +10 -2
- package/dist-lib/lib/docx/index.js +1 -1
- package/dist-lib/lib/errors.d.ts +8 -4
- package/dist-lib/lib/errors.js +12 -8
- package/dist-lib/lib/fold/index.d.ts +4 -2
- package/dist-lib/lib/fold/index.js +15 -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/gpu-probe-addon.js +26 -11
- package/dist-lib/lib/hardware/gpu-stats.native.cjs +17 -1
- package/dist-lib/lib/helpers/completion-params.d.ts +2 -1
- package/dist-lib/lib/helpers/completion-params.js +18 -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/drain.d.ts +1 -1
- package/dist-lib/lib/helpers/drain.js +1 -1
- package/dist-lib/lib/helpers/goal-check/asks.d.ts +25 -0
- package/dist-lib/lib/helpers/goal-check/asks.js +52 -0
- package/dist-lib/lib/helpers/goal-check/checks.d.ts +8 -0
- package/dist-lib/lib/helpers/goal-check/checks.js +92 -0
- package/dist-lib/lib/helpers/goal-check/commands.d.ts +7 -0
- package/dist-lib/lib/helpers/goal-check/commands.js +130 -0
- package/dist-lib/lib/helpers/goal-check/paths.d.ts +5 -0
- package/dist-lib/lib/helpers/goal-check/paths.js +44 -0
- package/dist-lib/lib/helpers/goal-check/shell.d.ts +9 -0
- package/dist-lib/lib/helpers/goal-check/shell.js +96 -0
- package/dist-lib/lib/helpers/goal-check.d.ts +36 -6
- package/dist-lib/lib/helpers/goal-check.js +34 -98
- package/dist-lib/lib/helpers/html-helpers.js +9 -6
- package/dist-lib/lib/helpers/recent-map.d.ts +7 -0
- package/dist-lib/lib/helpers/recent-map.js +23 -0
- package/dist-lib/lib/helpers/repeated-reply.js +9 -2
- package/dist-lib/lib/helpers/root-search.d.ts +3 -0
- package/dist-lib/lib/helpers/root-search.js +74 -0
- package/dist-lib/lib/helpers/run-latency.d.ts +14 -0
- package/dist-lib/lib/helpers/run-latency.js +63 -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/stable-stringify.js +10 -2
- package/dist-lib/lib/helpers/text-coalescer.d.ts +6 -0
- package/dist-lib/lib/helpers/text-coalescer.js +44 -4
- package/dist-lib/lib/helpers/tool-call-markup/emit.d.ts +6 -0
- package/dist-lib/lib/helpers/tool-call-markup/emit.js +15 -0
- package/dist-lib/lib/helpers/tool-call-markup/recover.d.ts +22 -0
- package/dist-lib/lib/helpers/tool-call-markup/recover.js +130 -0
- package/dist-lib/lib/helpers/tool-call-markup/skill-recovery.d.ts +3 -0
- package/dist-lib/lib/helpers/tool-call-markup/skill-recovery.js +56 -0
- package/dist-lib/lib/helpers/tool-call-markup/strip.d.ts +4 -0
- package/dist-lib/lib/helpers/tool-call-markup/strip.js +157 -0
- package/dist-lib/lib/helpers/tool-call-markup.d.ts +19 -24
- package/dist-lib/lib/helpers/tool-call-markup.js +17 -343
- package/dist-lib/lib/lifecycle/completion-run.js +2 -2
- package/dist-lib/lib/log.d.ts +3 -0
- package/dist-lib/lib/log.js +17 -1
- package/dist-lib/lib/machine/completion/actions/completion.d.ts +13 -16
- package/dist-lib/lib/machine/completion/actions/completion.js +110 -138
- package/dist-lib/lib/machine/completion/actions/goal.d.ts +10 -0
- package/dist-lib/lib/machine/completion/actions/goal.js +93 -0
- package/dist-lib/lib/machine/completion/actions/prepare.js +2 -1
- package/dist-lib/lib/machine/completion/actions/reject-tool.d.ts +16 -0
- package/dist-lib/lib/machine/completion/actions/reject-tool.js +147 -0
- package/dist-lib/lib/machine/completion/actions/retry-round.d.ts +6 -0
- package/dist-lib/lib/machine/completion/actions/retry-round.js +50 -0
- package/dist-lib/lib/machine/completion/actions/rounds.d.ts +5 -0
- package/dist-lib/lib/machine/completion/actions/rounds.js +31 -0
- package/dist-lib/lib/machine/completion/actions/tools.d.ts +1 -16
- package/dist-lib/lib/machine/completion/actions/tools.js +73 -151
- package/dist-lib/lib/machine/completion/context.js +6 -1
- package/dist-lib/lib/machine/completion/guards/retry.d.ts +2 -1
- package/dist-lib/lib/machine/completion/guards/retry.js +4 -3
- package/dist-lib/lib/machine/completion/implementations.d.ts +8 -5
- package/dist-lib/lib/machine/completion/implementations.js +22 -7
- package/dist-lib/lib/machine/completion/machine.d.ts +15 -6
- package/dist-lib/lib/machine/completion/machine.js +25 -5
- package/dist-lib/lib/machine/completion/metrics.d.ts +25 -0
- package/dist-lib/lib/machine/completion/metrics.js +70 -0
- package/dist-lib/lib/machine/completion/nudges.d.ts +5 -0
- package/dist-lib/lib/machine/completion/nudges.js +33 -0
- package/dist-lib/lib/machine/completion/rules.d.ts +10 -33
- package/dist-lib/lib/machine/completion/rules.js +27 -103
- package/dist-lib/lib/machine/completion/splice.d.ts +9 -0
- package/dist-lib/lib/machine/completion/splice.js +19 -0
- package/dist-lib/lib/machine/completion/types.d.ts +37 -13
- package/dist-lib/lib/machine/index.d.ts +21 -7
- package/dist-lib/lib/machine/index.js +7 -2
- 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.js +8 -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/gguf-header.d.ts +6 -0
- package/dist-lib/lib/models/gguf-header.js +38 -1
- 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.js +27 -1
- 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/model-catalog-constants.d.ts +3 -2
- package/dist-lib/lib/models/model-catalog-constants.js +8 -5
- package/dist-lib/lib/models/model-catalog.d.ts +12 -3
- package/dist-lib/lib/models/model-catalog.js +40 -16
- package/dist-lib/lib/models/model-delete.js +3 -0
- package/dist-lib/lib/models/model-handle.d.ts +1 -0
- package/dist-lib/lib/models/model-list.d.ts +2 -1
- package/dist-lib/lib/models/model-list.js +5 -1
- package/dist-lib/lib/models/model-pool.d.ts +7 -1
- package/dist-lib/lib/models/model-pool.js +34 -13
- 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-impl.d.ts +2 -1
- package/dist-lib/lib/no-redirect-fetch-impl.js +45 -8
- package/dist-lib/lib/office/index.js +1 -1
- package/dist-lib/lib/plugins/registry.d.ts +12 -0
- package/dist-lib/lib/plugins/registry.js +71 -15
- 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/prompt.d.ts +7 -4
- package/dist-lib/lib/prompt.js +81 -24
- package/dist-lib/lib/residency/completion-runtime.d.ts +8 -6
- package/dist-lib/lib/residency/completion-runtime.js +53 -9
- package/dist-lib/lib/residency/index.d.ts +12 -3
- package/dist-lib/lib/residency/index.js +52 -16
- package/dist-lib/lib/round-host.js +3 -3
- package/dist-lib/lib/round-port.js +3 -3
- package/dist-lib/lib/run-log/boundary.d.ts +1 -4
- package/dist-lib/lib/run-log/boundary.js +4 -21
- package/dist-lib/lib/run-log/history-codec.d.ts +1 -1
- package/dist-lib/lib/run-log/history-codec.js +3 -3
- package/dist-lib/lib/run-log/protocol.js +17 -16
- package/dist-lib/lib/run-log/redact.d.ts +10 -1
- package/dist-lib/lib/run-log/redact.js +99 -9
- package/dist-lib/lib/run-log/request-codec.d.ts +3 -0
- package/dist-lib/lib/run-log/request-codec.js +19 -4
- package/dist-lib/lib/run-log/run-journal.js +1 -1
- package/dist-lib/lib/sdk-loader.d.ts +1 -0
- package/dist-lib/lib/sdk-loader.js +14 -0
- package/dist-lib/lib/serve/completion.d.ts +7 -0
- package/dist-lib/lib/serve/completion.js +571 -0
- package/dist-lib/lib/serve/downloads.d.ts +4 -0
- package/dist-lib/lib/serve/downloads.js +79 -0
- package/dist-lib/lib/serve/models.d.ts +5 -0
- package/dist-lib/lib/serve/models.js +120 -0
- package/dist-lib/lib/serve/noop.d.ts +1 -0
- package/dist-lib/lib/serve/noop.js +1 -0
- package/dist-lib/lib/serve/requests.d.ts +148 -0
- package/dist-lib/lib/serve/requests.js +1 -0
- package/dist-lib/lib/serve/rounds.d.ts +11 -0
- package/dist-lib/lib/serve/rounds.js +67 -0
- package/dist-lib/lib/serve/run-log-start.d.ts +37 -0
- package/dist-lib/lib/serve/run-log-start.js +253 -0
- package/dist-lib/lib/serve/skills.d.ts +32 -0
- package/dist-lib/lib/serve/skills.js +46 -0
- package/dist-lib/lib/serve.d.ts +5 -1
- package/dist-lib/lib/serve.js +23 -995
- package/dist-lib/lib/sidecar/index.d.ts +1 -1
- package/dist-lib/lib/sidecar/index.js +11 -19
- package/dist-lib/lib/sidecar/user-plugins.js +6 -4
- package/dist-lib/lib/skills-host/index.d.ts +6 -3
- package/dist-lib/lib/skills-host/index.js +39 -18
- package/dist-lib/lib/spawn.d.ts +14 -0
- package/dist-lib/lib/spawn.js +9 -5
- 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 +18 -22
- package/dist-lib/lib/tools/exec/runner.d.ts +4 -0
- package/dist-lib/lib/tools/exec/runner.js +20 -3
- package/dist-lib/lib/tools/exec.js +2 -1
- package/dist-lib/lib/tools/files/edit-file.d.ts +4 -1
- package/dist-lib/lib/tools/files/edit-file.js +220 -28
- package/dist-lib/lib/tools/files/glob.js +72 -11
- package/dist-lib/lib/tools/files/grep.js +65 -22
- package/dist-lib/lib/tools/files/index.js +3 -1
- package/dist-lib/lib/tools/files/read-file.js +199 -36
- package/dist-lib/lib/tools/fs/document-text.d.ts +7 -1
- package/dist-lib/lib/tools/fs/document-text.js +5 -21
- package/dist-lib/lib/tools/fs/drive.d.ts +1 -17
- package/dist-lib/lib/tools/fs/edit-match.d.ts +22 -0
- package/dist-lib/lib/tools/fs/edit-match.js +337 -45
- package/dist-lib/lib/tools/fs/engine.d.ts +9 -0
- package/dist-lib/lib/tools/fs/engine.js +28 -0
- package/dist-lib/lib/tools/fs/remote-protocol.d.ts +1 -81
- package/dist-lib/lib/tools/fs/scope.d.ts +2 -17
- package/dist-lib/lib/tools/fs/search.d.ts +2 -18
- package/dist-lib/lib/tools/fs/suggest.d.ts +8 -0
- package/dist-lib/lib/tools/fs/suggest.js +110 -0
- package/dist-lib/lib/tools/fs/tool-path.d.ts +3 -0
- package/dist-lib/lib/tools/fs/tool-path.js +13 -0
- package/dist-lib/lib/tools/fs/walk.d.ts +5 -5
- package/dist-lib/lib/tools/fs/walk.js +22 -21
- 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 +88 -14
- package/dist-lib/lib/tools/index.d.ts +3 -1
- package/dist-lib/lib/tools/index.js +6 -2
- 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 +3 -2
- package/dist-lib/lib/tools/office.js +200 -39
- 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 +13 -3
- package/dist-lib/lib/tools/pdf/build.js +52 -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 +55 -0
- package/dist-lib/lib/tools/pdf/request.d.ts +3 -8
- package/dist-lib/lib/tools/pdf/request.js +4 -4
- package/dist-lib/lib/tools/pdf.d.ts +0 -1
- package/dist-lib/lib/tools/pdf.js +42 -14
- package/dist-lib/lib/tools/skill.js +13 -4
- package/dist-lib/lib/tools/skills/bundled-dir.d.ts +8 -1
- package/dist-lib/lib/tools/skills/bundled-dir.js +38 -32
- package/dist-lib/lib/tools/skills/bundled-hash.d.ts +1 -0
- package/dist-lib/lib/tools/skills/bundled-hash.js +4 -1
- package/dist-lib/lib/tools/skills/catalog-loader.d.ts +12 -0
- package/dist-lib/lib/tools/skills/catalog-loader.js +173 -0
- package/dist-lib/lib/tools/skills/catalog.d.ts +5 -8
- package/dist-lib/lib/tools/skills/catalog.js +1 -162
- 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/index.d.ts +1 -0
- package/dist-lib/lib/tools/skills/index.js +1 -0
- package/dist-lib/lib/tools/skills/manifest-parse.js +27 -3
- package/dist-lib/lib/tools/skills/manifest.d.ts +1 -0
- package/dist-lib/lib/tools/skills/overlay-crud.d.ts +3 -3
- package/dist-lib/lib/tools/skills/overlay-crud.js +4 -4
- 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-tree.d.ts +5 -0
- package/dist-lib/lib/tools/skills/skill-tree.js +54 -0
- package/dist-lib/lib/tools/toolsets.d.ts +1 -1
- package/dist-lib/lib/tools/toolsets.js +2 -0
- package/dist-lib/lib/tools/web-fetch.js +41 -130
- package/dist-lib/lib/wire/download.d.ts +10 -0
- package/dist-lib/lib/wire/download.js +35 -0
- package/dist-lib/lib/wire/event.d.ts +41 -0
- package/dist-lib/lib/wire/event.js +306 -0
- package/dist-lib/lib/wire/fields.d.ts +3 -0
- package/dist-lib/lib/wire/fields.js +12 -0
- package/dist-lib/lib/wire/knowledge.d.ts +9 -0
- package/dist-lib/lib/wire/knowledge.js +68 -0
- package/dist-lib/lib/wire/round.d.ts +14 -0
- package/dist-lib/lib/wire/round.js +45 -0
- package/dist-lib/lib/wire/vectors.d.ts +6 -0
- package/dist-lib/lib/wire/vectors.js +33 -0
- package/dist-lib/lib/wire.d.ts +28 -77
- package/dist-lib/lib/wire.js +24 -463
- package/dist-lib/plugins/charts/chart-tool.d.ts +8 -0
- package/dist-lib/plugins/charts/chart-tool.js +175 -0
- package/dist-lib/plugins/charts/index.d.ts +16 -0
- package/dist-lib/plugins/charts/index.js +21 -0
- 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/diagrams/draw.d.ts +10 -0
- package/dist-lib/plugins/diagrams/draw.js +90 -0
- package/dist-lib/plugins/diagrams/index.d.ts +13 -0
- package/dist-lib/plugins/diagrams/index.js +15 -0
- package/dist-lib/plugins/diagrams/render.d.ts +16 -0
- package/dist-lib/plugins/diagrams/render.js +285 -0
- package/dist-lib/plugins/image/edit-image.d.ts +3 -22
- package/dist-lib/plugins/image/edit-image.js +20 -44
- 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 +24 -4
- package/dist-lib/plugins/image/generate-image.js +198 -72
- package/dist-lib/plugins/image/index.d.ts +2 -1
- package/dist-lib/plugins/image/index.js +17 -8
- 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/mcp/call.js +15 -4
- package/dist-lib/plugins/mcp/protocol.d.ts +10 -2
- package/dist-lib/plugins/mcp/protocol.js +13 -12
- 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 +21 -4
- package/dist-lib/plugins/music/generate-music.js +168 -65
- package/dist-lib/plugins/music/index.d.ts +2 -1
- package/dist-lib/plugins/music/index.js +11 -6
- package/dist-lib/plugins/obsidian/index.js +14 -4
- package/dist-lib/plugins/ocr/bmp.d.ts +2 -0
- package/dist-lib/plugins/ocr/bmp.js +27 -0
- package/dist-lib/plugins/ocr/coverage.d.ts +3 -0
- package/dist-lib/plugins/ocr/coverage.js +67 -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 +25 -0
- package/dist-lib/plugins/ocr/ocr-runtime.js +103 -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/index.d.ts +4 -1
- package/dist-lib/plugins/python/index.js +5 -1
- package/dist-lib/plugins/python/language.js +11 -10
- package/dist-lib/plugins/python/python-adapter.d.ts +6 -1
- package/dist-lib/plugins/python/python-adapter.js +34 -1
- package/dist-lib/plugins/python/worker/client.js +1 -1
- 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/spawn.js +1 -1
- package/dist-lib/plugins/ripgrep/index.d.ts +15 -0
- package/dist-lib/plugins/ripgrep/index.js +28 -0
- package/dist-lib/plugins/run-report/story.js +4 -1
- package/dist-lib/plugins/sandbox-linux/index.js +2 -2
- package/dist-lib/plugins/sandbox-macos/index.js +2 -2
- package/dist-lib/plugins/sandbox-vm/index.d.ts +2 -1
- package/dist-lib/plugins/sandbox-vm/index.js +2 -2
- package/dist-lib/plugins/sandbox-vm/vm-shell.d.ts +3 -1
- package/dist-lib/plugins/sandbox-vm/vm-shell.js +45 -16
- package/dist-lib/plugins/sandbox-windows/index.js +2 -2
- 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/speech-engine.d.ts +1 -1
- package/dist-lib/plugins/speech/speech-engine.js +10 -5
- 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.js +7 -2
- package/dist-lib/plugins/walkie-talkie/index.d.ts +2 -0
- package/dist-lib/plugins/walkie-talkie/index.js +6 -1
- package/dist-lib/plugins/weather/lookup.js +1 -0
- package/dist-lib/schema/baseline.d.ts +2 -1
- package/dist-lib/schema/baseline.js +2 -2
- package/dist-lib/schema/generate.js +8 -1
- package/dist-lib/schema/harness.js +34 -5
- package/dist-lib/schema/release-tags.d.ts +2 -1
- package/dist-lib/schema/release-tags.js +9 -10
- package/dist-lib/spec/bind.js +3 -0
- package/dist-lib/spec/calls.js +1 -0
- package/dist-lib/spec/hrpc/hrpc.json +13 -0
- package/dist-lib/spec/hrpc/index.js +15 -3
- package/dist-lib/spec/hrpc/messages.js +126 -13
- package/dist-lib/spec/hyperschema/index.js +126 -13
- package/dist-lib/spec/hyperschema/schema.json +86 -2
- package/dist-lib/spec/hyperschema/types.d.ts +18 -3
- package/package.json +96 -36
- package/scripts/addon-externals.cjs +7 -1
- package/worker/harness-sidecar.mjs +10 -0
- package/dist-lib/lib/helpers/buffer-burst.d.ts +0 -1
- package/dist-lib/lib/helpers/buffer-burst.js +0 -22
- package/dist-lib/lib/office/engine/codes.d.ts +0 -62
- package/dist-lib/lib/office/engine/codes.js +0 -61
- package/dist-lib/lib/office/engine/docx/document.d.ts +0 -216
- package/dist-lib/lib/office/engine/docx/document.js +0 -1152
- package/dist-lib/lib/office/engine/docx/index.d.ts +0 -7
- package/dist-lib/lib/office/engine/docx/index.js +0 -8
- package/dist-lib/lib/office/engine/docx/styles.d.ts +0 -31
- package/dist-lib/lib/office/engine/docx/styles.js +0 -173
- package/dist-lib/lib/office/engine/docx/template.d.ts +0 -18
- package/dist-lib/lib/office/engine/docx/template.js +0 -133
- package/dist-lib/lib/office/engine/docx/text.d.ts +0 -55
- package/dist-lib/lib/office/engine/docx/text.js +0 -538
- package/dist-lib/lib/office/engine/drawingml/chart.d.ts +0 -63
- package/dist-lib/lib/office/engine/drawingml/chart.js +0 -539
- package/dist-lib/lib/office/engine/drawingml/text.d.ts +0 -35
- package/dist-lib/lib/office/engine/drawingml/text.js +0 -352
- package/dist-lib/lib/office/engine/errors.d.ts +0 -6
- package/dist-lib/lib/office/engine/errors.js +0 -12
- package/dist-lib/lib/office/engine/image.d.ts +0 -8
- package/dist-lib/lib/office/engine/image.js +0 -48
- package/dist-lib/lib/office/engine/index.d.ts +0 -12
- package/dist-lib/lib/office/engine/index.js +0 -7
- package/dist-lib/lib/office/engine/opc/content-types.d.ts +0 -17
- package/dist-lib/lib/office/engine/opc/content-types.js +0 -74
- package/dist-lib/lib/office/engine/opc/media.d.ts +0 -13
- package/dist-lib/lib/office/engine/opc/media.js +0 -11
- package/dist-lib/lib/office/engine/opc/package.d.ts +0 -51
- package/dist-lib/lib/office/engine/opc/package.js +0 -324
- package/dist-lib/lib/office/engine/opc/paths.d.ts +0 -7
- package/dist-lib/lib/office/engine/opc/paths.js +0 -46
- package/dist-lib/lib/office/engine/opc/properties.d.ts +0 -7
- package/dist-lib/lib/office/engine/opc/properties.js +0 -75
- package/dist-lib/lib/office/engine/opc/relationships.d.ts +0 -23
- package/dist-lib/lib/office/engine/opc/relationships.js +0 -65
- package/dist-lib/lib/office/engine/opc/zip.d.ts +0 -15
- package/dist-lib/lib/office/engine/opc/zip.js +0 -264
- package/dist-lib/lib/office/engine/pptx/fit.d.ts +0 -12
- package/dist-lib/lib/office/engine/pptx/fit.js +0 -37
- package/dist-lib/lib/office/engine/pptx/index.d.ts +0 -8
- package/dist-lib/lib/office/engine/pptx/index.js +0 -8
- package/dist-lib/lib/office/engine/pptx/inherit.d.ts +0 -29
- package/dist-lib/lib/office/engine/pptx/inherit.js +0 -155
- package/dist-lib/lib/office/engine/pptx/notes.d.ts +0 -5
- package/dist-lib/lib/office/engine/pptx/notes.js +0 -85
- package/dist-lib/lib/office/engine/pptx/picture-area.d.ts +0 -23
- package/dist-lib/lib/office/engine/pptx/picture-area.js +0 -84
- package/dist-lib/lib/office/engine/pptx/presentation.d.ts +0 -56
- package/dist-lib/lib/office/engine/pptx/presentation.js +0 -787
- package/dist-lib/lib/office/engine/pptx/read.d.ts +0 -9
- package/dist-lib/lib/office/engine/pptx/read.js +0 -66
- package/dist-lib/lib/office/engine/pptx/shapes.d.ts +0 -52
- package/dist-lib/lib/office/engine/pptx/shapes.js +0 -276
- package/dist-lib/lib/office/engine/pptx/slides.d.ts +0 -27
- package/dist-lib/lib/office/engine/pptx/slides.js +0 -123
- package/dist-lib/lib/office/engine/pptx/template.d.ts +0 -20
- package/dist-lib/lib/office/engine/pptx/template.js +0 -391
- package/dist-lib/lib/office/engine/pptx/types.d.ts +0 -121
- package/dist-lib/lib/office/engine/units.d.ts +0 -3
- package/dist-lib/lib/office/engine/units.js +0 -12
- package/dist-lib/lib/office/engine/utf8.d.ts +0 -2
- package/dist-lib/lib/office/engine/utf8.js +0 -103
- package/dist-lib/lib/office/engine/xlsx/formula.d.ts +0 -49
- package/dist-lib/lib/office/engine/xlsx/formula.js +0 -381
- package/dist-lib/lib/office/engine/xlsx/index.d.ts +0 -8
- package/dist-lib/lib/office/engine/xlsx/index.js +0 -8
- package/dist-lib/lib/office/engine/xlsx/refs.d.ts +0 -22
- package/dist-lib/lib/office/engine/xlsx/refs.js +0 -82
- package/dist-lib/lib/office/engine/xlsx/reshape.d.ts +0 -21
- package/dist-lib/lib/office/engine/xlsx/reshape.js +0 -424
- package/dist-lib/lib/office/engine/xlsx/sheet.d.ts +0 -108
- package/dist-lib/lib/office/engine/xlsx/sheet.js +0 -662
- package/dist-lib/lib/office/engine/xlsx/strings.d.ts +0 -15
- package/dist-lib/lib/office/engine/xlsx/strings.js +0 -93
- package/dist-lib/lib/office/engine/xlsx/styles.d.ts +0 -38
- package/dist-lib/lib/office/engine/xlsx/styles.js +0 -369
- package/dist-lib/lib/office/engine/xlsx/template.d.ts +0 -7
- package/dist-lib/lib/office/engine/xlsx/template.js +0 -54
- package/dist-lib/lib/office/engine/xlsx/workbook.d.ts +0 -162
- package/dist-lib/lib/office/engine/xlsx/workbook.js +0 -881
- package/dist-lib/lib/office/engine/xlsx/write.d.ts +0 -2
- package/dist-lib/lib/office/engine/xlsx/write.js +0 -42
- package/dist-lib/lib/office/engine/xml.d.ts +0 -45
- package/dist-lib/lib/office/engine/xml.js +0 -258
- package/patches/localwatch@1.4.3.patch +0 -13
- /package/dist-lib/lib/{office/engine/pptx/types.js → contract/media.js} +0 -0
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import type { Message } from './contract/index.ts';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export interface ContextCandidate {
|
|
2
|
+
declare function responseRoomChars(ctxSize: number | undefined, cacheTokens: number | undefined): number | undefined;
|
|
3
|
+
declare function compactedFrom(message: Message): Message | undefined;
|
|
4
|
+
interface ContextCandidate {
|
|
6
5
|
history: Message[];
|
|
7
6
|
droppedTurns: number;
|
|
8
7
|
}
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
declare function contextCandidates(history: Message[], ...nudges: string[]): ContextCandidate[];
|
|
9
|
+
declare function compactContent(content: string, target: number): string;
|
|
10
|
+
export type { ContextCandidate };
|
|
11
|
+
export declare class ContextWindow {
|
|
12
|
+
static TOOL_SEARCH_RESULT: string;
|
|
13
|
+
static compactContent: typeof compactContent;
|
|
14
|
+
static compactedFrom: typeof compactedFrom;
|
|
15
|
+
static contextCandidates: typeof contextCandidates;
|
|
16
|
+
static responseRoomChars: typeof responseRoomChars;
|
|
17
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Fold } from './fold/index.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const TOOL_RESULT_TRUNCATION_MARKER = '\n[tool result truncated for context]\n';
|
|
3
|
+
function responseRoomChars(ctxSize, cacheTokens) {
|
|
4
|
+
if (!ctxSize || !cacheTokens) {
|
|
5
|
+
return undefined;
|
|
6
|
+
}
|
|
7
|
+
return Math.floor(Math.max(0, ctxSize - cacheTokens) / 2);
|
|
8
|
+
}
|
|
9
|
+
const TOOL_SEARCH_RESULT = '{"tool_search":';
|
|
4
10
|
const compactedSources = new WeakMap();
|
|
5
|
-
|
|
11
|
+
function compactedFrom(message) {
|
|
6
12
|
return compactedSources.get(message);
|
|
7
13
|
}
|
|
8
|
-
|
|
14
|
+
function contextCandidates(history, ...nudges) {
|
|
9
15
|
const isBoundary = (message) => Fold.isTurn(message, nudges);
|
|
10
16
|
const { prefix, turns } = splitTurns(history, isBoundary);
|
|
11
17
|
if (!turns.length) {
|
|
@@ -87,7 +93,7 @@ function longestTool(tools) {
|
|
|
87
93
|
.filter((tool) => tool.target > TOOL_RESULT_TRUNCATION_MARKER.length)
|
|
88
94
|
.sort((a, b) => b.target - a.target)[0];
|
|
89
95
|
}
|
|
90
|
-
|
|
96
|
+
function compactContent(content, target) {
|
|
91
97
|
const retained = target - TOOL_RESULT_TRUNCATION_MARKER.length;
|
|
92
98
|
const head = Math.ceil(retained / 2);
|
|
93
99
|
const tail = Math.floor(retained / 2);
|
|
@@ -103,3 +109,10 @@ function compactTool(selected, message, index) {
|
|
|
103
109
|
compactedSources.set(compacted, selected.source);
|
|
104
110
|
return compacted;
|
|
105
111
|
}
|
|
112
|
+
export class ContextWindow {
|
|
113
|
+
static TOOL_SEARCH_RESULT = TOOL_SEARCH_RESULT;
|
|
114
|
+
static compactContent = compactContent;
|
|
115
|
+
static compactedFrom = compactedFrom;
|
|
116
|
+
static contextCandidates = contextCandidates;
|
|
117
|
+
static responseRoomChars = responseRoomChars;
|
|
118
|
+
}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import type { LlmGenerationParams } from '../models/llm-presets.ts';
|
|
2
|
-
import type { DriveRoot } from '
|
|
2
|
+
import type { DriveRoot } from './drive.ts';
|
|
3
3
|
import type { CliValidator } from '../tools/skills/cli-schema-types.ts';
|
|
4
4
|
import type { AgentConfig, ResponseFormat, ToolDefinition } from './completion.ts';
|
|
5
5
|
import type { CompiledPolicy } from './policy.ts';
|
|
6
6
|
import type { Message } from './run.ts';
|
|
7
7
|
export type { LlmGenerationParams };
|
|
8
|
+
export interface SkillFile {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
readonly content: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ProjectSkill {
|
|
13
|
+
readonly name: string;
|
|
14
|
+
readonly hash: string;
|
|
15
|
+
readonly files?: readonly SkillFile[];
|
|
16
|
+
}
|
|
17
|
+
export type WorkspaceSkill = ProjectSkill;
|
|
8
18
|
export interface AgentSkill {
|
|
9
19
|
readonly name: string;
|
|
20
|
+
readonly layered?: boolean;
|
|
10
21
|
readonly description: string;
|
|
11
22
|
readonly tools: readonly string[];
|
|
12
23
|
readonly cliValidator?: CliValidator;
|
|
13
24
|
}
|
|
25
|
+
export type GuidelineWording = Readonly<Record<string, string | false>>;
|
|
14
26
|
export interface SystemPromptParts {
|
|
15
27
|
text: string;
|
|
16
28
|
bioChars: number;
|
|
@@ -31,6 +43,8 @@ export interface AgentPorts<Skill extends AgentSkill = AgentSkill> {
|
|
|
31
43
|
bio: string | null | undefined;
|
|
32
44
|
toolNames: readonly string[];
|
|
33
45
|
skills: readonly Skill[];
|
|
46
|
+
platform?: string | undefined;
|
|
47
|
+
guidelines?: GuidelineWording | undefined;
|
|
34
48
|
}): SystemPromptParts;
|
|
35
49
|
mention(text: string, skills: readonly Skill[]): Skill | null;
|
|
36
50
|
implicitSkill(text: string, skills: readonly Skill[]): Skill | null;
|
|
@@ -46,6 +60,8 @@ export interface AgentRequest<Skill extends AgentSkill = AgentSkill> {
|
|
|
46
60
|
readonly userText: string;
|
|
47
61
|
readonly tools: readonly ToolDefinition[];
|
|
48
62
|
readonly skills: readonly Skill[];
|
|
63
|
+
readonly unreadySkills?: readonly Skill[] | undefined;
|
|
64
|
+
readonly platform?: string | undefined;
|
|
49
65
|
readonly loadedSkills: ReadonlySet<string>;
|
|
50
66
|
readonly fsRoots: readonly DriveRoot[];
|
|
51
67
|
readonly fsWriteRoots: readonly DriveRoot[];
|
|
@@ -58,6 +74,7 @@ export interface ResolvedAgent<Skill extends AgentSkill = AgentSkill> {
|
|
|
58
74
|
readonly system: SystemPromptParts;
|
|
59
75
|
readonly activation: SkillActivation;
|
|
60
76
|
readonly activeSkills: Skill[];
|
|
77
|
+
readonly listedSkills: Skill[];
|
|
61
78
|
readonly mention: Skill | null;
|
|
62
79
|
readonly preload: Skill | null;
|
|
63
80
|
readonly grantedOps: Map<string, CliValidator[]>;
|
|
@@ -3,10 +3,12 @@ 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';
|
|
5
5
|
import type { CapabilityProfile } from '../models/model-catalog-constants.ts';
|
|
6
|
-
import type { DriveRoot } from '
|
|
6
|
+
import type { DriveRoot } from './drive.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';
|
|
9
|
+
import type { KnowledgeGrant, KnowledgeSource } from './knowledge.ts';
|
|
10
|
+
import type { MediaRoundPort } from './media.ts';
|
|
11
|
+
import type { OcrService } from './ocr.ts';
|
|
10
12
|
import type { AccessPolicy, CompiledPolicy } from './policy.ts';
|
|
11
13
|
import type { GoalStatus, HistoryToolCall, HookRejection, Message, ResourceDescriptor, RoundSpeed, RunBackendUse, RunBudget, RunLifecycleEvent, RunOutcome, ToolActivityEvent, ToolCallDisplay, ToolDecision, ToolEffect, ToolSpeed, TrustedSource, TrustedSourceFacts, TurnContext } from './run.ts';
|
|
12
14
|
export type { CliValidator, DriveRoot, LlmGenerationParams };
|
|
@@ -95,12 +97,25 @@ export type FetchAttachmentFn = (query: {
|
|
|
95
97
|
signal?: BareAbortSignal;
|
|
96
98
|
meta?: boolean;
|
|
97
99
|
}) => Promise<FetchedAttachment | AttachmentMeta | null>;
|
|
100
|
+
export type ShowImageFn = (query: {
|
|
101
|
+
attachmentId: string;
|
|
102
|
+
signal?: BareAbortSignal;
|
|
103
|
+
}) => Promise<string | null>;
|
|
98
104
|
export type ProgressFn = (update: {
|
|
99
105
|
percentage: number;
|
|
100
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
|
+
}
|
|
101
115
|
export type AskUserFn = (question: {
|
|
102
116
|
question: string;
|
|
103
117
|
options?: string[];
|
|
118
|
+
form?: AskField[];
|
|
104
119
|
}) => Promise<string | null>;
|
|
105
120
|
export interface ToolFetchInit {
|
|
106
121
|
method?: string;
|
|
@@ -133,8 +148,14 @@ export interface ToolSpill {
|
|
|
133
148
|
readonly dir: string;
|
|
134
149
|
sink(stream: string): SpillSink;
|
|
135
150
|
}
|
|
151
|
+
export interface SkillTree {
|
|
152
|
+
readonly root: string;
|
|
153
|
+
}
|
|
136
154
|
export interface ToolExecuteContext {
|
|
155
|
+
currentTime?: number | undefined;
|
|
156
|
+
userTurns?: readonly string[] | undefined;
|
|
137
157
|
agentId?: string | null | undefined;
|
|
158
|
+
skillTrees?: ReadonlyMap<string, SkillTree> | undefined;
|
|
138
159
|
skills?: readonly string[] | undefined;
|
|
139
160
|
skillsLoadedThisTurn?: readonly string[] | undefined;
|
|
140
161
|
runId?: string;
|
|
@@ -150,6 +171,7 @@ export interface ToolExecuteContext {
|
|
|
150
171
|
fetchAttachment?: FetchAttachmentFn | undefined;
|
|
151
172
|
progress?: ProgressFn | undefined;
|
|
152
173
|
askUser?: AskUserFn | undefined;
|
|
174
|
+
mediaRound?: MediaRoundPort | undefined;
|
|
153
175
|
signal?: BareAbortSignal | undefined;
|
|
154
176
|
fsRoots?: readonly DriveRoot[] | undefined;
|
|
155
177
|
fsWriteRoots?: readonly DriveRoot[] | undefined;
|
|
@@ -159,9 +181,11 @@ export interface ToolExecuteContext {
|
|
|
159
181
|
uncappedResponse?: boolean | undefined;
|
|
160
182
|
policy?: CompiledPolicy | undefined;
|
|
161
183
|
toolNames?: readonly string[] | undefined;
|
|
184
|
+
offeredTools?: readonly string[] | undefined;
|
|
162
185
|
approval?: ToolDecision | undefined;
|
|
163
186
|
fetch?: ToolFetch | undefined;
|
|
164
187
|
knowledge?: KnowledgeGrant | undefined;
|
|
188
|
+
ocr?: OcrService | undefined;
|
|
165
189
|
spill?: ToolSpill | undefined;
|
|
166
190
|
planMode?: boolean | undefined;
|
|
167
191
|
callTool?: CallTool | undefined;
|
|
@@ -171,7 +195,7 @@ export interface CallTool {
|
|
|
171
195
|
(name: string, args: unknown): Promise<unknown>;
|
|
172
196
|
readonly names: readonly string[];
|
|
173
197
|
}
|
|
174
|
-
export type Toolset = 'web-search' | 'knowledge' | 'files' | 'exec' | 'http-request' | 'mcp-call' | 'image' | 'music' | 'coding' | 'team';
|
|
198
|
+
export type Toolset = 'web-search' | 'knowledge' | 'files' | 'exec' | 'http-request' | 'mcp-call' | 'image' | 'diagrams' | 'charts' | 'music' | 'coding' | 'team';
|
|
175
199
|
export interface ToolsetScoped {
|
|
176
200
|
toolset?: string | null;
|
|
177
201
|
}
|
|
@@ -183,6 +207,7 @@ export interface ToolParameterSchema {
|
|
|
183
207
|
enum?: string[];
|
|
184
208
|
items?: ToolParameterSchema;
|
|
185
209
|
properties?: Record<string, ToolParameterSchema>;
|
|
210
|
+
additionalProperties?: boolean;
|
|
186
211
|
required?: string[];
|
|
187
212
|
default?: unknown;
|
|
188
213
|
}
|
|
@@ -221,6 +246,7 @@ export interface ToolDefinition {
|
|
|
221
246
|
endsRun?: true;
|
|
222
247
|
concurrent?: true;
|
|
223
248
|
stableRead?: boolean;
|
|
249
|
+
deliversMany?: true;
|
|
224
250
|
callsTools?: true;
|
|
225
251
|
defer?: true;
|
|
226
252
|
group?: string;
|
|
@@ -315,6 +341,7 @@ export type ContextEvent = {
|
|
|
315
341
|
type: 'context';
|
|
316
342
|
id?: string;
|
|
317
343
|
context: TurnContext;
|
|
344
|
+
sources?: KnowledgeSource[];
|
|
318
345
|
round: number;
|
|
319
346
|
};
|
|
320
347
|
export type InputRejectedEvent = {
|
|
@@ -328,6 +355,8 @@ export type GoalEvent = {
|
|
|
328
355
|
round: number;
|
|
329
356
|
text?: string;
|
|
330
357
|
checks?: string[];
|
|
358
|
+
proof?: string;
|
|
359
|
+
cases?: true;
|
|
331
360
|
};
|
|
332
361
|
export type FoldEvent = {
|
|
333
362
|
type: 'fold';
|
|
@@ -394,6 +423,7 @@ export interface CompletionSdk {
|
|
|
394
423
|
responseFormat?: ResponseFormat | undefined;
|
|
395
424
|
toolDialect?: ToolDialect | undefined;
|
|
396
425
|
kvCache?: string | boolean;
|
|
426
|
+
prefill?: boolean | undefined;
|
|
397
427
|
}): CompletionSdkResult;
|
|
398
428
|
cancel?(params: {
|
|
399
429
|
requestId: string;
|
|
@@ -408,7 +438,9 @@ export interface RoundModelLease {
|
|
|
408
438
|
modelId: string;
|
|
409
439
|
ctxSize?: number | undefined;
|
|
410
440
|
slots?: number | undefined;
|
|
441
|
+
canThink?: boolean | undefined;
|
|
411
442
|
sdk?: CompletionSdk;
|
|
443
|
+
seed?: ((cacheKey: string, prime: Parameters<CompletionSdk['completion']>[0]) => Promise<unknown>) | undefined;
|
|
412
444
|
release: () => void;
|
|
413
445
|
}
|
|
414
446
|
export interface ResolvedCall {
|
|
@@ -1,4 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
1
|
+
import type { AbortSignal as BareAbortSignal } from 'bare-abort-controller';
|
|
2
|
+
import type { Writable } from 'streamx';
|
|
3
|
+
export interface DriveEntry {
|
|
4
|
+
key: string;
|
|
5
|
+
value: {
|
|
6
|
+
executable: boolean;
|
|
7
|
+
linkname: string | null;
|
|
8
|
+
blob: {
|
|
9
|
+
byteLength: number;
|
|
10
|
+
} | null;
|
|
11
|
+
metadata: unknown;
|
|
12
|
+
};
|
|
13
|
+
mtime?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface DriveDir {
|
|
16
|
+
key: string;
|
|
17
|
+
dir: true;
|
|
18
|
+
}
|
|
19
|
+
export interface GrantedDrive {
|
|
20
|
+
readonly key: string;
|
|
21
|
+
readonly writable: boolean;
|
|
22
|
+
readonly search?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface DriveEntryRequest {
|
|
25
|
+
op: 'entry';
|
|
26
|
+
driveKey: string;
|
|
27
|
+
key: string;
|
|
28
|
+
}
|
|
29
|
+
export interface DriveGetRequest {
|
|
30
|
+
op: 'get';
|
|
31
|
+
driveKey: string;
|
|
32
|
+
key: string;
|
|
33
|
+
}
|
|
34
|
+
export interface DriveReadRequest {
|
|
35
|
+
op: 'read';
|
|
36
|
+
driveKey: string;
|
|
37
|
+
key: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DriveListRequest {
|
|
40
|
+
op: 'list';
|
|
41
|
+
driveKey: string;
|
|
42
|
+
folder: string;
|
|
43
|
+
skip: string[];
|
|
44
|
+
recursive: boolean;
|
|
45
|
+
limit: number;
|
|
46
|
+
cursor: string | null;
|
|
47
|
+
}
|
|
48
|
+
export interface DriveWriteRequest {
|
|
49
|
+
op: 'write';
|
|
50
|
+
driveKey: string;
|
|
51
|
+
key: string;
|
|
52
|
+
path: string;
|
|
53
|
+
executable?: boolean;
|
|
54
|
+
}
|
|
55
|
+
export interface DriveSearchQuery {
|
|
56
|
+
folder: string;
|
|
57
|
+
queries: string[];
|
|
58
|
+
regex: boolean;
|
|
59
|
+
caseSensitive: boolean;
|
|
60
|
+
includeIgnored: boolean;
|
|
61
|
+
maxMatches: number;
|
|
62
|
+
maxEntries: number;
|
|
63
|
+
maxMs: number;
|
|
64
|
+
}
|
|
65
|
+
export interface DriveSearchRequest extends DriveSearchQuery {
|
|
66
|
+
op: 'search';
|
|
67
|
+
driveKey: string;
|
|
68
|
+
}
|
|
69
|
+
export type DriveRequest = DriveEntryRequest | DriveGetRequest | DriveReadRequest | DriveListRequest | DriveWriteRequest | DriveSearchRequest;
|
|
70
|
+
export interface DriveResponse {
|
|
71
|
+
error?: string;
|
|
72
|
+
entry?: DriveEntry | null;
|
|
73
|
+
path?: string | null;
|
|
74
|
+
truncated?: boolean;
|
|
75
|
+
entries?: Array<DriveEntry | DriveDir>;
|
|
76
|
+
cursor?: string | null;
|
|
77
|
+
hits?: SearchHit[];
|
|
78
|
+
capped?: boolean;
|
|
79
|
+
cut?: boolean;
|
|
80
|
+
skippedLinks?: number;
|
|
81
|
+
}
|
|
82
|
+
export type DriveOpFn = (request: DriveRequest) => Promise<DriveResponse>;
|
|
83
|
+
export interface DriveListOptions {
|
|
84
|
+
skip?: ReadonlySet<string>;
|
|
85
|
+
recursive?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface Drive {
|
|
88
|
+
entry(key: string, opts?: {
|
|
89
|
+
follow?: boolean;
|
|
90
|
+
}): Promise<DriveEntry | null>;
|
|
91
|
+
get(key: string): Promise<Uint8Array | null>;
|
|
92
|
+
list(folder?: string, opts?: DriveListOptions): AsyncIterable<DriveEntry | DriveDir>;
|
|
93
|
+
createReadStream(key: string): AsyncIterable<Uint8Array>;
|
|
94
|
+
createWriteStream(key: string, opts?: {
|
|
95
|
+
executable?: boolean;
|
|
96
|
+
}): Writable;
|
|
97
|
+
}
|
|
98
|
+
export interface SearchHit {
|
|
99
|
+
file: string;
|
|
100
|
+
line: number;
|
|
101
|
+
text: string;
|
|
102
|
+
}
|
|
103
|
+
export interface SearchFile {
|
|
104
|
+
path: string;
|
|
105
|
+
key: string;
|
|
106
|
+
}
|
|
107
|
+
export interface SearchResult {
|
|
108
|
+
hits: SearchHit[];
|
|
109
|
+
capped: boolean;
|
|
110
|
+
cut: boolean;
|
|
111
|
+
}
|
|
112
|
+
export interface WalkSummary {
|
|
113
|
+
truncated: boolean;
|
|
114
|
+
skippedLinks: number;
|
|
115
|
+
}
|
|
116
|
+
export interface FolderSearchResult extends SearchResult, WalkSummary {
|
|
117
|
+
}
|
|
118
|
+
export interface LocalSearchQuery extends DriveSearchQuery {
|
|
119
|
+
include?: string;
|
|
120
|
+
deny: readonly string[];
|
|
121
|
+
signal?: BareAbortSignal | undefined;
|
|
122
|
+
}
|
|
123
|
+
export interface LocalWalkQuery {
|
|
124
|
+
folder: string;
|
|
125
|
+
include?: string;
|
|
126
|
+
includeIgnored: boolean;
|
|
127
|
+
deny: readonly string[];
|
|
128
|
+
maxMs: number;
|
|
129
|
+
signal?: BareAbortSignal | undefined;
|
|
130
|
+
}
|
|
131
|
+
export interface LocalWalkResult {
|
|
132
|
+
files: Array<{
|
|
133
|
+
path: string;
|
|
134
|
+
key: string;
|
|
135
|
+
mtime: number;
|
|
136
|
+
}>;
|
|
137
|
+
truncated: boolean;
|
|
138
|
+
}
|
|
139
|
+
export interface LocalRoot {
|
|
140
|
+
readonly kind: 'local';
|
|
141
|
+
readonly root: string;
|
|
142
|
+
readonly drive: Drive;
|
|
143
|
+
readonly search?: (query: LocalSearchQuery) => Promise<FolderSearchResult>;
|
|
144
|
+
readonly walk?: (query: LocalWalkQuery) => Promise<LocalWalkResult>;
|
|
145
|
+
}
|
|
146
|
+
export interface HyperRoot {
|
|
147
|
+
readonly kind: 'hyper';
|
|
148
|
+
readonly key: string;
|
|
149
|
+
readonly writable: boolean;
|
|
150
|
+
readonly prefix: string;
|
|
151
|
+
readonly drive: Drive;
|
|
152
|
+
readonly search?: (query: DriveSearchQuery) => Promise<FolderSearchResult>;
|
|
153
|
+
}
|
|
154
|
+
export type DriveRoot = LocalRoot | HyperRoot;
|
|
@@ -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>;
|
|
@@ -3,6 +3,7 @@ export type * from './completion.ts';
|
|
|
3
3
|
export type * from './drive.ts';
|
|
4
4
|
export type * from './hooks.ts';
|
|
5
5
|
export type * from './managed-skills.ts';
|
|
6
|
+
export type * from './media.ts';
|
|
6
7
|
export type * from './policy.ts';
|
|
7
8
|
export type * from './run.ts';
|
|
8
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,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
|
+
}
|
|
@@ -2,13 +2,17 @@ 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
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';
|
|
5
7
|
import type { CancelSdk, ModelState, PendingLoad, TrackedLoad } from '../models/model-pool.ts';
|
|
6
|
-
export type { CancelSdk, HoldFn, ModelState, TrackedLoad };
|
|
8
|
+
export type { CancelSdk, HoldFn, LoadRequests, ModelState, TrackedLoad };
|
|
7
9
|
export interface ModelHost {
|
|
8
10
|
sdk(): Promise<unknown>;
|
|
9
11
|
track(load: TrackedLoad, sdk?: Partial<CancelSdk>): TrackedLoad;
|
|
10
12
|
makeRoom(signal: BareAbortSignal | undefined, busy: string | Error, srcs?: ReadonlyArray<string>): Promise<void>;
|
|
11
13
|
hold: HoldFn;
|
|
14
|
+
isCached(model: string, addon: ModelAddon): Promise<boolean>;
|
|
15
|
+
readonly requests: LoadRequests;
|
|
12
16
|
completionModel(model: string, signal?: BareAbortSignal): Promise<BorrowedModel>;
|
|
13
17
|
emit(state: ModelState): void;
|
|
14
18
|
progressState(model: string, progress: Record<string, unknown>): ModelState;
|
|
@@ -22,7 +26,7 @@ export interface BorrowedModel {
|
|
|
22
26
|
release(): void;
|
|
23
27
|
}
|
|
24
28
|
export interface ResidentPoolSpec {
|
|
25
|
-
addon: 'tts' | 'parakeet';
|
|
29
|
+
addon: 'tts' | 'parakeet' | 'ocr';
|
|
26
30
|
modelType: PendingLoad['modelType'];
|
|
27
31
|
modelConfig?: Record<string, unknown>;
|
|
28
32
|
modelConfigFor?: (modelSrc: ModelSrc) => Readonly<Record<string, unknown>> | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
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 OcrPage {
|
|
8
|
+
readonly text: string;
|
|
9
|
+
readonly coverage: number;
|
|
10
|
+
}
|
|
11
|
+
export interface OcrService {
|
|
12
|
+
read(image: OcrImage, signal?: BareAbortSignal): Promise<OcrPage>;
|
|
13
|
+
}
|
|
14
|
+
export interface OcrReadContext {
|
|
15
|
+
readonly image: OcrImage;
|
|
16
|
+
readonly signal?: BareAbortSignal | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface RootSearchScope {
|
|
2
|
+
root: string;
|
|
3
|
+
folder: string;
|
|
4
|
+
include?: string;
|
|
5
|
+
deny: readonly string[];
|
|
6
|
+
includeIgnored: boolean;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
}
|
|
9
|
+
export interface RootSearchQuery extends RootSearchScope {
|
|
10
|
+
queries: string[];
|
|
11
|
+
regex: boolean;
|
|
12
|
+
caseSensitive: boolean;
|
|
13
|
+
maxMatches: number;
|
|
14
|
+
}
|
|
15
|
+
export interface RootSearchResult {
|
|
16
|
+
hits: Array<{
|
|
17
|
+
path: string;
|
|
18
|
+
line: number;
|
|
19
|
+
text: string;
|
|
20
|
+
}>;
|
|
21
|
+
truncated: boolean;
|
|
22
|
+
cut: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface RootWalkResult {
|
|
25
|
+
files: Array<{
|
|
26
|
+
path: string;
|
|
27
|
+
mtime: number;
|
|
28
|
+
}>;
|
|
29
|
+
truncated: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface RootSearch {
|
|
32
|
+
search(query: RootSearchQuery): Promise<RootSearchResult>;
|
|
33
|
+
walk(scope: RootSearchScope): Promise<RootWalkResult>;
|
|
34
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
export interface RunBudget {
|
|
2
2
|
readonly deadlineMs: number;
|
|
3
|
+
readonly totalMs?: number | undefined;
|
|
3
4
|
outputBytesUsed: number;
|
|
5
|
+
responseRoomChars?: number | undefined;
|
|
6
|
+
delivered?: readonly DeliveredFile[] | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface DeliveredFile {
|
|
9
|
+
readonly name: string;
|
|
10
|
+
readonly sha256: string;
|
|
11
|
+
readonly attachmentId: string;
|
|
12
|
+
readonly fileName: string;
|
|
13
|
+
readonly byteLength: number;
|
|
4
14
|
}
|
|
5
15
|
export interface HistoryToolCall {
|
|
6
16
|
id: string;
|
|
@@ -142,6 +152,9 @@ export interface RoundSpeed {
|
|
|
142
152
|
promptTokensPerSecond?: number;
|
|
143
153
|
tokensPerSecond?: number;
|
|
144
154
|
timeToFirstToken?: number;
|
|
155
|
+
avgConcurrentSeq?: number;
|
|
156
|
+
draftTokens?: number;
|
|
157
|
+
draftAcceptedTokens?: number;
|
|
145
158
|
stopReason?: string;
|
|
146
159
|
overflows?: number;
|
|
147
160
|
contextBoundary?: true;
|