@qvac/harness 1.0.0-rc.8 → 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 +722 -20
- 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 +89 -10
- 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 -20
- 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 +31 -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 +14 -3
- package/dist-lib/lib/capabilities/completion-engine/loop.js +7 -2
- package/dist-lib/lib/capabilities/completion-engine/model-round.d.ts +5 -2
- 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 +15 -1
- package/dist-lib/lib/capabilities/completion-engine/round.js +124 -53
- package/dist-lib/lib/capabilities/completion-engine/session.d.ts +6 -4
- 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 +6 -42
- 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/tool-sets.d.ts +1 -1
- 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/download.d.ts +1 -1
- package/dist-lib/lib/capabilities/enhance.js +3 -3
- package/dist-lib/lib/capabilities/kv-cache.d.ts +1 -1
- 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 +3 -1
- package/dist-lib/lib/capabilities/prompt-prefix.js +8 -0
- package/dist-lib/lib/capabilities/sdk-tool.d.ts +5 -5
- 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-prompt-log.d.ts +1 -1
- 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 -41
- package/dist-lib/lib/capabilities/tool-turns.js +7 -258
- 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 +36 -4
- 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 +7 -3
- 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/speech.d.ts +1 -1
- 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 +84 -150
- 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 +39 -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/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/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 +13 -4
- package/dist-lib/lib/models/model-catalog.js +40 -16
- package/dist-lib/lib/models/model-delete.d.ts +1 -1
- package/dist-lib/lib/models/model-delete.js +3 -0
- package/dist-lib/lib/models/model-fit.d.ts +1 -1
- package/dist-lib/lib/models/model-handle.d.ts +1 -0
- package/dist-lib/lib/models/model-list.d.ts +3 -2
- package/dist-lib/lib/models/model-list.js +5 -1
- package/dist-lib/lib/models/model-pool.d.ts +10 -4
- package/dist-lib/lib/models/model-pool.js +34 -13
- package/dist-lib/lib/models/model-source.d.ts +2 -2
- 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-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/policy/index.d.ts +2 -1
- package/dist-lib/lib/policy/index.js +6 -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.d.ts +3 -1
- package/dist-lib/plugins/sandbox-linux/index.js +12 -5
- package/dist-lib/plugins/sandbox-macos/index.d.ts +3 -1
- package/dist-lib/plugins/sandbox-macos/index.js +12 -7
- 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 +98 -40
- 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/@qvac%2Finference@0.22.0.patch +0 -59
- package/patches/localwatch@1.4.3.patch +0 -13
- /package/dist-lib/lib/{office/engine/pptx/types.js → contract/media.js} +0 -0
|
@@ -23,10 +23,31 @@ const QWEN_THINKING_GENERAL_SAMPLER = {
|
|
|
23
23
|
repeat_penalty: 1.0,
|
|
24
24
|
frequency_penalty: 0
|
|
25
25
|
};
|
|
26
|
+
const KAT_CODER_SAMPLER = {
|
|
27
|
+
temp: 1.0,
|
|
28
|
+
top_p: 0.95,
|
|
29
|
+
top_k: 20,
|
|
30
|
+
presence_penalty: 0,
|
|
31
|
+
repeat_penalty: 1.0,
|
|
32
|
+
frequency_penalty: 0
|
|
33
|
+
};
|
|
34
|
+
const GPT_OSS_SAMPLER = {
|
|
35
|
+
temp: 1.0,
|
|
36
|
+
top_p: 1.0,
|
|
37
|
+
top_k: 0,
|
|
38
|
+
presence_penalty: 0,
|
|
39
|
+
repeat_penalty: 1.0,
|
|
40
|
+
frequency_penalty: 0
|
|
41
|
+
};
|
|
26
42
|
const PRESET_RESOLVERS = [
|
|
27
43
|
{ prefix: 'Qwen3.5-0.8B-', resolve: qwen08BPreset },
|
|
28
44
|
{ prefix: 'Qwen3.5-2B-', resolve: qwen2BPreset },
|
|
29
|
-
{ prefix: 'Qwen3.5-4B-', resolve: qwen4BPreset }
|
|
45
|
+
{ prefix: 'Qwen3.5-4B-', resolve: qwen4BPreset },
|
|
46
|
+
{
|
|
47
|
+
prefix: 'Kwaipilot_KAT-Coder-',
|
|
48
|
+
resolve: (reasoning) => withBudget(KAT_CODER_SAMPLER, reasoning)
|
|
49
|
+
},
|
|
50
|
+
{ prefix: 'gpt-oss-', resolve: (reasoning) => withBudget(GPT_OSS_SAMPLER, reasoning) }
|
|
30
51
|
];
|
|
31
52
|
export function resolveLlmGenerationParams(modelName, reasoningEnabled, deviceDefault) {
|
|
32
53
|
const effective = reasoningEnabled ?? deviceDefault;
|
|
@@ -59,3 +80,8 @@ function thinkingVlPreset() {
|
|
|
59
80
|
function thinkingGeneralPreset() {
|
|
60
81
|
return { ...QWEN_THINKING_GENERAL_SAMPLER, reasoning_budget: DEFAULT_REASONING_BUDGET };
|
|
61
82
|
}
|
|
83
|
+
function withBudget(sampler, reasoningEnabled) {
|
|
84
|
+
return reasoningEnabled === undefined
|
|
85
|
+
? { ...sampler }
|
|
86
|
+
: { ...sampler, reasoning_budget: reasoningEnabled ? DEFAULT_REASONING_BUDGET : 0 };
|
|
87
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotifyFn } from './model-pool.ts';
|
|
2
|
+
export interface LoadRequests {
|
|
3
|
+
models(): string[];
|
|
4
|
+
around<T>(model: string, run: () => Promise<T>): Promise<T>;
|
|
5
|
+
start(model: string): void;
|
|
6
|
+
ready(model: string): void;
|
|
7
|
+
failed(model: string, err: unknown): void;
|
|
8
|
+
}
|
|
9
|
+
export declare function createLoadRequests(notify: NotifyFn): LoadRequests;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { errorMessage } from '../guards.js';
|
|
2
|
+
export function createLoadRequests(notify) {
|
|
3
|
+
const counts = new Map();
|
|
4
|
+
const start = (model) => {
|
|
5
|
+
counts.set(model, (counts.get(model) ?? 0) + 1);
|
|
6
|
+
notify({ status: 'loading', model, catalogChanged: true });
|
|
7
|
+
};
|
|
8
|
+
const end = (model) => {
|
|
9
|
+
const left = (counts.get(model) ?? 0) - 1;
|
|
10
|
+
if (left > 0) {
|
|
11
|
+
counts.set(model, left);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
counts.delete(model);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const failed = (model, err) => {
|
|
18
|
+
end(model);
|
|
19
|
+
notify({ status: 'error', model, message: errorMessage(err), catalogChanged: true });
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
models: () => [...counts.keys()],
|
|
23
|
+
around: async (model, run) => {
|
|
24
|
+
start(model);
|
|
25
|
+
try {
|
|
26
|
+
const handedOff = await run();
|
|
27
|
+
end(model);
|
|
28
|
+
return handedOff;
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
failed(model, err);
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
start,
|
|
36
|
+
ready: (model) => {
|
|
37
|
+
end(model);
|
|
38
|
+
notify({ status: 'ready', model, catalogChanged: true });
|
|
39
|
+
},
|
|
40
|
+
failed
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -3,9 +3,9 @@ export declare const CAPABILITY_PROFILE_ORDER: readonly CapabilityProfile[];
|
|
|
3
3
|
export declare const QWEN_35_2B = "Qwen3.5-2B-Q4_K_M";
|
|
4
4
|
export declare const QWEN_35_4B = "Qwen3.5-4B-Q4_K_M";
|
|
5
5
|
export declare const QWEN_35_9B = "Qwen3.5-9B-Q4_K_M";
|
|
6
|
-
export declare const QWEN_36_27B = "Qwen3.6-27B-UD-Q4_K_XL";
|
|
7
6
|
export declare const QWEN_36_35B_A3B = "Qwen3.6-35B-A3B-UD-Q4_K_M";
|
|
8
7
|
export declare const QWEN_38_27B = "Qwen3.8-27B-UD-Q4_K_XL";
|
|
8
|
+
export declare const KAT_CODER_25_35B = "Kwaipilot_KAT-Coder-V2.5-Dev-Q4_K_M";
|
|
9
9
|
export declare const BONSAI_2_27B_PQ2 = "Ternary-Bonsai-2-27B-PQ2_0";
|
|
10
10
|
export declare const BONSAI_2_27B_PTQ1 = "Ternary-Bonsai-2-27B-PTQ1_0";
|
|
11
11
|
export declare const MEDPSY_1_7B = "medpsy-1.7b-q4_k_m-imat";
|
|
@@ -21,12 +21,13 @@ export interface HostCapability {
|
|
|
21
21
|
export declare function isMobilePlatform(platform: string): boolean;
|
|
22
22
|
export declare function runnableModelName(requested: string, host: HostCapability | null): string;
|
|
23
23
|
export declare function capabilityProfileToModelName(profile: CapabilityProfile): string;
|
|
24
|
-
export declare const AGENT_MODEL_NAMES: readonly ["Qwen3.5-2B-Q4_K_M", "Qwen3.5-4B-Q4_K_M", "Qwen3.5-9B-Q4_K_M", "Qwen3.6-
|
|
24
|
+
export declare const AGENT_MODEL_NAMES: readonly ["Qwen3.5-2B-Q4_K_M", "Qwen3.5-4B-Q4_K_M", "Qwen3.5-9B-Q4_K_M", "Qwen3.6-35B-A3B-UD-Q4_K_M", "Qwen3.8-27B-UD-Q4_K_XL", "Kwaipilot_KAT-Coder-V2.5-Dev-Q4_K_M", "Ternary-Bonsai-2-27B-PQ2_0", "Ternary-Bonsai-2-27B-PTQ1_0", "medpsy-1.7b-q4_k_m-imat", "medpsy-4b-q4_k_m-imat"];
|
|
25
25
|
export declare function modelDisplayName(modelName: string): string;
|
|
26
26
|
export declare function capabilityProfileModelLabel(profile: CapabilityProfile): string;
|
|
27
27
|
export declare function isMultimodalLlm(modelName: string): boolean;
|
|
28
28
|
export type ImageModelChoice = 'sd2' | 'sdxl' | 'flux2-klein';
|
|
29
29
|
export declare const DEFAULT_IMAGE_MODEL_CHOICE: ImageModelChoice;
|
|
30
|
+
export declare function defaultImageModelChoice(host: HostCapability | null): ImageModelChoice;
|
|
30
31
|
export interface ImageChoiceEntry {
|
|
31
32
|
readonly choice: ImageModelChoice;
|
|
32
33
|
readonly label: string;
|
|
@@ -8,9 +8,9 @@ export const CAPABILITY_PROFILE_ORDER = [
|
|
|
8
8
|
export const QWEN_35_2B = 'Qwen3.5-2B-Q4_K_M';
|
|
9
9
|
export const QWEN_35_4B = 'Qwen3.5-4B-Q4_K_M';
|
|
10
10
|
export const QWEN_35_9B = 'Qwen3.5-9B-Q4_K_M';
|
|
11
|
-
export const QWEN_36_27B = 'Qwen3.6-27B-UD-Q4_K_XL';
|
|
12
11
|
export const QWEN_36_35B_A3B = 'Qwen3.6-35B-A3B-UD-Q4_K_M';
|
|
13
12
|
export const QWEN_38_27B = 'Qwen3.8-27B-UD-Q4_K_XL';
|
|
13
|
+
export const KAT_CODER_25_35B = 'Kwaipilot_KAT-Coder-V2.5-Dev-Q4_K_M';
|
|
14
14
|
export const BONSAI_2_27B_PQ2 = 'Ternary-Bonsai-2-27B-PQ2_0';
|
|
15
15
|
export const BONSAI_2_27B_PTQ1 = 'Ternary-Bonsai-2-27B-PTQ1_0';
|
|
16
16
|
export const MEDPSY_1_7B = 'medpsy-1.7b-q4_k_m-imat';
|
|
@@ -25,9 +25,9 @@ const MODEL_NAME_TO_PROFILE = new Map([
|
|
|
25
25
|
[QWEN_35_2B, 'low'],
|
|
26
26
|
[QWEN_35_4B, 'mid'],
|
|
27
27
|
[QWEN_35_9B, 'high'],
|
|
28
|
-
[QWEN_36_27B, 'xhigh'],
|
|
29
28
|
[QWEN_36_35B_A3B, 'xhigh'],
|
|
30
29
|
[QWEN_38_27B, 'xhigh'],
|
|
30
|
+
[KAT_CODER_25_35B, 'xhigh'],
|
|
31
31
|
[BONSAI_2_27B_PQ2, 'high'],
|
|
32
32
|
[BONSAI_2_27B_PTQ1, 'high'],
|
|
33
33
|
[MEDPSY_1_7B, 'low'],
|
|
@@ -71,9 +71,9 @@ export const AGENT_MODEL_NAMES = [
|
|
|
71
71
|
QWEN_35_2B,
|
|
72
72
|
QWEN_35_4B,
|
|
73
73
|
QWEN_35_9B,
|
|
74
|
-
QWEN_36_27B,
|
|
75
74
|
QWEN_36_35B_A3B,
|
|
76
75
|
QWEN_38_27B,
|
|
76
|
+
KAT_CODER_25_35B,
|
|
77
77
|
BONSAI_2_27B_PQ2,
|
|
78
78
|
BONSAI_2_27B_PTQ1,
|
|
79
79
|
MEDPSY_1_7B,
|
|
@@ -91,7 +91,6 @@ const MULTIMODAL_LLMS = new Set([
|
|
|
91
91
|
QWEN_35_2B,
|
|
92
92
|
QWEN_35_4B,
|
|
93
93
|
QWEN_35_9B,
|
|
94
|
-
QWEN_36_27B,
|
|
95
94
|
QWEN_36_35B_A3B,
|
|
96
95
|
QWEN_38_27B,
|
|
97
96
|
BONSAI_2_27B_PQ2,
|
|
@@ -100,7 +99,11 @@ const MULTIMODAL_LLMS = new Set([
|
|
|
100
99
|
export function isMultimodalLlm(modelName) {
|
|
101
100
|
return MULTIMODAL_LLMS.has(modelName);
|
|
102
101
|
}
|
|
103
|
-
export const DEFAULT_IMAGE_MODEL_CHOICE = '
|
|
102
|
+
export const DEFAULT_IMAGE_MODEL_CHOICE = 'flux2-klein';
|
|
103
|
+
const MOBILE_IMAGE_MODEL_CHOICE = 'sd2';
|
|
104
|
+
export function defaultImageModelChoice(host) {
|
|
105
|
+
return host?.mobile ? MOBILE_IMAGE_MODEL_CHOICE : DEFAULT_IMAGE_MODEL_CHOICE;
|
|
106
|
+
}
|
|
104
107
|
export const IMAGE_CHOICE_CATALOG = [
|
|
105
108
|
{
|
|
106
109
|
choice: 'sd2',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ModelRegistryEntry, ToolDialect } from '@qvac/
|
|
1
|
+
import type { ModelRegistryEntry, ToolDialect } from '@qvac/inference';
|
|
2
2
|
import type { ModelSrc } from './context.ts';
|
|
3
3
|
import type { ModelAddon } from './model-source.ts';
|
|
4
4
|
export interface SdkModelAsset extends ModelRegistryEntry {
|
|
5
5
|
readonly src: string;
|
|
6
6
|
}
|
|
7
|
-
import { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B,
|
|
8
|
-
export { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B,
|
|
7
|
+
import { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B, QWEN_36_35B_A3B, QWEN_38_27B, KAT_CODER_25_35B, BONSAI_2_27B_PQ2, BONSAI_2_27B_PTQ1, MEDPSY_1_7B, MEDPSY_4B, isCapabilityProfile, meetsMinCapabilityProfile, modelNameToCapabilityProfile, capabilityProfileToModelName, isMultimodalLlm, AGENT_MODEL_NAMES, modelDisplayName, capabilityProfileModelLabel, DEFAULT_IMAGE_MODEL_CHOICE, defaultImageModelChoice, IMAGE_CHOICE_CATALOG, isMobilePlatform, runnableModelName, type CapabilityProfile, type HostCapability, type ImageModelChoice, type ImageChoiceEntry } from './model-catalog-constants.ts';
|
|
8
|
+
export { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B, QWEN_36_35B_A3B, QWEN_38_27B, KAT_CODER_25_35B, BONSAI_2_27B_PQ2, BONSAI_2_27B_PTQ1, MEDPSY_1_7B, MEDPSY_4B, isCapabilityProfile, meetsMinCapabilityProfile, modelNameToCapabilityProfile, capabilityProfileToModelName, isMultimodalLlm, AGENT_MODEL_NAMES, modelDisplayName, capabilityProfileModelLabel, DEFAULT_IMAGE_MODEL_CHOICE, defaultImageModelChoice, IMAGE_CHOICE_CATALOG, isMobilePlatform, runnableModelName };
|
|
9
9
|
export type { CapabilityProfile, HostCapability, ImageModelChoice, ImageChoiceEntry };
|
|
10
10
|
export interface LlmCatalogEntry {
|
|
11
11
|
readonly name: string;
|
|
@@ -14,8 +14,14 @@ export interface LlmCatalogEntry {
|
|
|
14
14
|
readonly projection?: SdkModelAsset;
|
|
15
15
|
readonly textOnly?: true;
|
|
16
16
|
readonly toolDialect?: ToolDialect;
|
|
17
|
+
readonly draft?: SpeculativeDraft;
|
|
18
|
+
}
|
|
19
|
+
export interface SpeculativeDraft {
|
|
20
|
+
readonly specType: 'draft-dflash' | 'draft-mtp';
|
|
21
|
+
readonly model?: SdkModelAsset;
|
|
17
22
|
}
|
|
18
23
|
export declare const LLM_CATALOG: ReadonlyArray<LlmCatalogEntry>;
|
|
24
|
+
export declare function speculativeDraft(model: string): SpeculativeDraft | undefined;
|
|
19
25
|
export declare function defaultProjectionMap(): Record<string, string>;
|
|
20
26
|
export type ModelCategory = 'tts' | 'transcription' | 'embedding';
|
|
21
27
|
export interface CategoryDefault {
|
|
@@ -25,6 +31,7 @@ export interface CategoryDefault {
|
|
|
25
31
|
readonly modelConfig?: Readonly<Record<string, unknown>>;
|
|
26
32
|
readonly companions?: ReadonlyArray<SdkModelAsset>;
|
|
27
33
|
}
|
|
34
|
+
export declare const AUDIO8_TTS: CategoryDefault;
|
|
28
35
|
export declare const MOSS_TTS: CategoryDefault;
|
|
29
36
|
export declare const MOSS_CODEC_ENCODER_SRC: "registry://s3/qvac_models_compiled/ggml/openmoss/2026-09-25/moss-codec-encoder-f16.gguf";
|
|
30
37
|
export declare const CATEGORY_DEFAULTS: ReadonlyArray<CategoryDefault>;
|
|
@@ -36,6 +43,7 @@ export interface CategoryDownloadMetadata {
|
|
|
36
43
|
export declare function categoryDownloadMetadata(model: string, addon: ModelAddon | undefined): CategoryDownloadMetadata | undefined;
|
|
37
44
|
export declare function defaultVoiceModel(category: ModelCategory): string;
|
|
38
45
|
export declare function defaultTtsFor(profile: CapabilityProfile): CategoryDefault;
|
|
46
|
+
export declare function supertonicFor(profile: CapabilityProfile | null): CategoryDefault;
|
|
39
47
|
export interface CatalogModel {
|
|
40
48
|
readonly name: string;
|
|
41
49
|
readonly addon: ModelAddon;
|
|
@@ -96,7 +104,7 @@ export interface AgentModel extends CatalogModel {
|
|
|
96
104
|
export interface AgentModelInput extends AgentSkillModelInput {
|
|
97
105
|
readonly modelName?: string | null;
|
|
98
106
|
}
|
|
99
|
-
export declare function skillModelsForAgent(agent: AgentSkillModelInput): ReadonlyArray<AgentModel>;
|
|
107
|
+
export declare function skillModelsForAgent(agent: AgentSkillModelInput, host: HostCapability | null): ReadonlyArray<AgentModel>;
|
|
100
108
|
export declare function modelsForAgent(agent: AgentModelInput, host: HostCapability | null): ReadonlyArray<AgentModel>;
|
|
101
109
|
export declare function diffusionSizeBytes(entry: DiffusionCatalogEntry): number;
|
|
102
110
|
export declare function imageModelFor(choice: string | undefined): ImageModelSet | null;
|
|
@@ -127,6 +135,7 @@ export interface CuratedListable {
|
|
|
127
135
|
readonly asset: SdkModelAsset;
|
|
128
136
|
readonly companions: SdkModelAsset[];
|
|
129
137
|
readonly projection?: SdkModelAsset;
|
|
138
|
+
readonly draft?: SdkModelAsset;
|
|
130
139
|
}
|
|
131
140
|
export declare function curatedListables(): CuratedListable[];
|
|
132
141
|
export declare function curatedModelAsset(name: string, addon: ModelRegistryEntry['addon']): SdkModelAsset | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AUDIOGEN_ACESTEP_5HZ_LM_0_6B_Q8_0, AUDIOGEN_ACESTEP_V15_BASE_Q4_K_M, AUDIOGEN_ACESTEP_V15_SFT_Q8_0, AUDIOGEN_ACESTEP_V15_TURBO_Q4_K_M, AUDIOGEN_ACESTEP_V15_TURBO_Q8_0, AUDIOGEN_QWEN3_EMBEDDING_0_6B_Q8_0, AUDIOGEN_VAE_BF16, EMBEDDINGGEMMA_300M_Q4_0, FLUX_2_KLEIN_4B_Q4_0, FLUX_2_KLEIN_4B_VAE, HEALTHCARE_1_7B_MEDICAL_Q4_K_M, HEALTHCARE_4B_MEDICAL_Q4_K_M, MMPROJ_QWEN3_5_2B_MULTIMODAL_Q8_0, MMPROJ_QWEN3_5_4B_MULTIMODAL_Q8_0, MMPROJ_QWEN3_5_9B_MULTIMODAL_F16,
|
|
1
|
+
import { AUDIOGEN_ACESTEP_5HZ_LM_0_6B_Q8_0, AUDIOGEN_ACESTEP_V15_BASE_Q4_K_M, AUDIOGEN_ACESTEP_V15_SFT_Q8_0, AUDIOGEN_ACESTEP_V15_TURBO_Q4_K_M, AUDIOGEN_ACESTEP_V15_TURBO_Q8_0, AUDIOGEN_QWEN3_EMBEDDING_0_6B_Q8_0, AUDIOGEN_VAE_BF16, EMBEDDINGGEMMA_300M_Q4_0, FLUX_2_KLEIN_4B_Q4_0, FLUX_2_KLEIN_4B_VAE, HEALTHCARE_1_7B_MEDICAL_Q4_K_M, HEALTHCARE_4B_MEDICAL_Q4_K_M, MOE_35B_INST_Q4_K_M, MMPROJ_QWEN3_5_2B_MULTIMODAL_Q8_0, MMPROJ_QWEN3_5_4B_MULTIMODAL_Q8_0, MMPROJ_QWEN3_5_9B_MULTIMODAL_F16, MMPROJ_QWEN3_6_35B_A3B_MULTIMODAL_F16, MMPROJ_QWEN3_8_27B_MULTIMODAL_F16, MMPROJ_TERNARY_BONSAI_2_27B_MULTIMODAL_Q8_0, QWEN3_5_2B_MULTIMODAL_Q4_K_M, QWEN3_5_4B_MULTIMODAL_Q4_K_M, QWEN3_5_9B_MULTIMODAL_Q4_K_M, PARAKEET_TDT_0_6B_V3_Q8_0, PARAKEET_TDT_1_1B_Q8_0, QWEN3_4B_Q4_K_M, QWEN3_6_35B_A3B_MULTIMODAL_Q4_K_M, QWEN3_8_27B_DFLASH2_Q8_0, QWEN3_8_27B_MULTIMODAL_UD_Q4_K_XL, SD_V2_1_1B_Q8_0, SDXL_BASE_1_0_3B_Q4_0, TERNARY_BONSAI_2_27B_MULTIMODAL_PQ2_0, TERNARY_BONSAI_2_27B_MULTIMODAL_PTQ1_0, TTS_CODEC_DECODER_AUDIO8_Q8_0, TTS_CODEC_DECODER_MOSS_TTS_F16, TTS_CODEC_ENCODER_MOSS_TTS_F16, TTS_DELAY_LLM_MOSS_TTS_F16, TTS_LM_MULTILINGUAL_AUDIO8_Q8_0, TTS_MULTILINGUAL_SUPERTONIC3_FP16, TTS_MULTILINGUAL_SUPERTONIC3_Q4_0, TTS_MULTILINGUAL_SUPERTONIC3_Q8_0 } from '@qvac/inference/models';
|
|
2
2
|
import { detectToolDialect } from './tool-dialect.js';
|
|
3
|
-
import { defaultTtsModelName } from './tts-model-default.js';
|
|
4
|
-
import { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B,
|
|
5
|
-
export { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B,
|
|
3
|
+
import { defaultTtsModelName, supertonicModelName } from './tts-model-default.js';
|
|
4
|
+
import { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B, QWEN_36_35B_A3B, QWEN_38_27B, KAT_CODER_25_35B, BONSAI_2_27B_PQ2, BONSAI_2_27B_PTQ1, MEDPSY_1_7B, MEDPSY_4B, isCapabilityProfile, meetsMinCapabilityProfile, modelNameToCapabilityProfile, capabilityProfileToModelName, isMultimodalLlm, AGENT_MODEL_NAMES, modelDisplayName, capabilityProfileModelLabel, DEFAULT_IMAGE_MODEL_CHOICE, defaultImageModelChoice, IMAGE_CHOICE_CATALOG, isMobilePlatform, runnableModelName } from './model-catalog-constants.js';
|
|
5
|
+
export { CAPABILITY_PROFILE_ORDER, QWEN_35_2B, QWEN_35_4B, QWEN_35_9B, QWEN_36_35B_A3B, QWEN_38_27B, KAT_CODER_25_35B, BONSAI_2_27B_PQ2, BONSAI_2_27B_PTQ1, MEDPSY_1_7B, MEDPSY_4B, isCapabilityProfile, meetsMinCapabilityProfile, modelNameToCapabilityProfile, capabilityProfileToModelName, isMultimodalLlm, AGENT_MODEL_NAMES, modelDisplayName, capabilityProfileModelLabel, DEFAULT_IMAGE_MODEL_CHOICE, defaultImageModelChoice, IMAGE_CHOICE_CATALOG, isMobilePlatform, runnableModelName };
|
|
6
6
|
export const LLM_CATALOG = [
|
|
7
7
|
{
|
|
8
8
|
name: QWEN_35_2B,
|
|
@@ -22,12 +22,6 @@ export const LLM_CATALOG = [
|
|
|
22
22
|
capabilityProfile: 'high',
|
|
23
23
|
projection: MMPROJ_QWEN3_5_9B_MULTIMODAL_F16
|
|
24
24
|
},
|
|
25
|
-
{
|
|
26
|
-
name: QWEN_36_27B,
|
|
27
|
-
weight: QWEN3_6_27B_MULTIMODAL_Q4_K_XL,
|
|
28
|
-
capabilityProfile: 'xhigh',
|
|
29
|
-
projection: MMPROJ_QWEN3_6_27B_MULTIMODAL_F16
|
|
30
|
-
},
|
|
31
25
|
{
|
|
32
26
|
name: QWEN_36_35B_A3B,
|
|
33
27
|
weight: QWEN3_6_35B_A3B_MULTIMODAL_Q4_K_M,
|
|
@@ -50,7 +44,15 @@ export const LLM_CATALOG = [
|
|
|
50
44
|
name: QWEN_38_27B,
|
|
51
45
|
weight: QWEN3_8_27B_MULTIMODAL_UD_Q4_K_XL,
|
|
52
46
|
capabilityProfile: 'xhigh',
|
|
53
|
-
projection: MMPROJ_QWEN3_8_27B_MULTIMODAL_F16
|
|
47
|
+
projection: MMPROJ_QWEN3_8_27B_MULTIMODAL_F16,
|
|
48
|
+
draft: { specType: 'draft-dflash', model: QWEN3_8_27B_DFLASH2_Q8_0 }
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: KAT_CODER_25_35B,
|
|
52
|
+
weight: MOE_35B_INST_Q4_K_M,
|
|
53
|
+
capabilityProfile: 'xhigh',
|
|
54
|
+
textOnly: true,
|
|
55
|
+
toolDialect: 'qwen35'
|
|
54
56
|
},
|
|
55
57
|
{
|
|
56
58
|
name: BONSAI_2_27B_PQ2,
|
|
@@ -67,6 +69,9 @@ export const LLM_CATALOG = [
|
|
|
67
69
|
toolDialect: 'qwen35'
|
|
68
70
|
}
|
|
69
71
|
];
|
|
72
|
+
export function speculativeDraft(model) {
|
|
73
|
+
return LLM_CATALOG.find((entry) => entry.name === model)?.draft;
|
|
74
|
+
}
|
|
70
75
|
export function defaultProjectionMap() {
|
|
71
76
|
const map = {};
|
|
72
77
|
for (const entry of LLM_CATALOG) {
|
|
@@ -77,6 +82,17 @@ export function defaultProjectionMap() {
|
|
|
77
82
|
return map;
|
|
78
83
|
}
|
|
79
84
|
const TTS_FULL_STEPS = { ttsNumInferenceSteps: 16 };
|
|
85
|
+
export const AUDIO8_TTS = {
|
|
86
|
+
name: 'Audio8-Q8_0',
|
|
87
|
+
category: 'tts',
|
|
88
|
+
asset: TTS_LM_MULTILINGUAL_AUDIO8_Q8_0,
|
|
89
|
+
companions: [TTS_CODEC_DECODER_AUDIO8_Q8_0],
|
|
90
|
+
modelConfig: {
|
|
91
|
+
ttsEngine: 'audio8',
|
|
92
|
+
audio8CodecDecoderModelSrc: TTS_CODEC_DECODER_AUDIO8_Q8_0.src,
|
|
93
|
+
useGPU: true
|
|
94
|
+
}
|
|
95
|
+
};
|
|
80
96
|
export const MOSS_TTS = {
|
|
81
97
|
name: 'MOSS-TTS-8B-F16',
|
|
82
98
|
category: 'tts',
|
|
@@ -92,6 +108,7 @@ export const MOSS_TTS = {
|
|
|
92
108
|
};
|
|
93
109
|
export const MOSS_CODEC_ENCODER_SRC = TTS_CODEC_ENCODER_MOSS_TTS_F16.src;
|
|
94
110
|
export const CATEGORY_DEFAULTS = [
|
|
111
|
+
AUDIO8_TTS,
|
|
95
112
|
{ name: 'Supertonic3-Q4_0', category: 'tts', asset: TTS_MULTILINGUAL_SUPERTONIC3_Q4_0 },
|
|
96
113
|
{
|
|
97
114
|
name: 'Supertonic3-Q8_0',
|
|
@@ -141,7 +158,12 @@ export function defaultVoiceModel(category) {
|
|
|
141
158
|
return entry.asset.src;
|
|
142
159
|
}
|
|
143
160
|
export function defaultTtsFor(profile) {
|
|
144
|
-
|
|
161
|
+
return ttsNamed(defaultTtsModelName(profile));
|
|
162
|
+
}
|
|
163
|
+
export function supertonicFor(profile) {
|
|
164
|
+
return ttsNamed(supertonicModelName(profile ?? 'low'));
|
|
165
|
+
}
|
|
166
|
+
function ttsNamed(name) {
|
|
145
167
|
const entry = CATEGORY_DEFAULTS.find((candidate) => candidate.name === name);
|
|
146
168
|
if (!entry) {
|
|
147
169
|
throw new Error(`no default tts model named ${name}`);
|
|
@@ -228,6 +250,7 @@ export function assetBytes(src) {
|
|
|
228
250
|
const assets = [
|
|
229
251
|
...curatedListables().map((entry) => entry.asset),
|
|
230
252
|
...LLM_CATALOG.flatMap((entry) => (entry.projection ? [entry.projection] : [])),
|
|
253
|
+
...LLM_CATALOG.flatMap((entry) => (entry.draft?.model ? [entry.draft.model] : [])),
|
|
231
254
|
...DIFFUSION_CATALOG.flatMap(diffusionAssets),
|
|
232
255
|
...AUDIOGEN_CATALOG.flatMap((entry) => [entry.dit, entry.textEnc, entry.lm, entry.vae])
|
|
233
256
|
];
|
|
@@ -324,10 +347,10 @@ function agentHasSkill(agent, skill) {
|
|
|
324
347
|
const installed = agent.installedSkills?.includes(skill) === true;
|
|
325
348
|
return installed && (agent.skillsScope === 'all' || agent.enabledSkills?.includes(skill) === true);
|
|
326
349
|
}
|
|
327
|
-
export function skillModelsForAgent(agent) {
|
|
350
|
+
export function skillModelsForAgent(agent, host) {
|
|
328
351
|
const models = [];
|
|
329
352
|
if (agentHasSkill(agent, IMAGE_GENERATION_SKILL)) {
|
|
330
|
-
const choice = agent.imageModelChoice ??
|
|
353
|
+
const choice = agent.imageModelChoice ?? defaultImageModelChoice(host);
|
|
331
354
|
const entry = DIFFUSION_CATALOG.find((candidate) => candidate.choice === choice);
|
|
332
355
|
if (entry) {
|
|
333
356
|
models.push({ name: entry.name, addon: entry.model.addon, use: 'image' });
|
|
@@ -343,7 +366,7 @@ export function skillModelsForAgent(agent) {
|
|
|
343
366
|
return models;
|
|
344
367
|
}
|
|
345
368
|
export function modelsForAgent(agent, host) {
|
|
346
|
-
const skills = skillModelsForAgent(agent);
|
|
369
|
+
const skills = skillModelsForAgent(agent, host);
|
|
347
370
|
if (!agent.modelName) {
|
|
348
371
|
return skills;
|
|
349
372
|
}
|
|
@@ -406,7 +429,8 @@ export function curatedListables() {
|
|
|
406
429
|
name: entry.name,
|
|
407
430
|
asset: entry.weight,
|
|
408
431
|
companions: [],
|
|
409
|
-
projection: entry.projection
|
|
432
|
+
projection: entry.projection,
|
|
433
|
+
draft: entry.draft?.model
|
|
410
434
|
})),
|
|
411
435
|
...CATEGORY_DEFAULTS.map((entry) => ({
|
|
412
436
|
name: entry.name,
|
|
@@ -52,6 +52,9 @@ function namesToPurge(name) {
|
|
|
52
52
|
if (curated.projection) {
|
|
53
53
|
names.push(curated.projection.name);
|
|
54
54
|
}
|
|
55
|
+
if (curated.draft) {
|
|
56
|
+
names.push(curated.draft.name);
|
|
57
|
+
}
|
|
55
58
|
return names;
|
|
56
59
|
}
|
|
57
60
|
const music = musicListables().find((entry) => entry.name === name || entry.asset.name === name);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AssessModelFitInput, AssessModelFitResult } from '@qvac/
|
|
1
|
+
import type { AssessModelFitInput, AssessModelFitResult } from '@qvac/inference';
|
|
2
2
|
export type ModelFitVerdict = AssessModelFitResult['verdict'];
|
|
3
3
|
export type ModelFitBasis = AssessModelFitResult['basis'];
|
|
4
4
|
export type ModelFitEvidence = NonNullable<AssessModelFitResult['evidence']>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type * as QvacSdk from '@qvac/
|
|
1
|
+
import type * as QvacSdk from '@qvac/inference';
|
|
2
2
|
import { type ModelAddon, type ModelRegistrySdk } from './model-source.ts';
|
|
3
3
|
import { type ModelTaskType } from './model-task.ts';
|
|
4
4
|
import type { ModelFitBasis, ModelFitEvidence, ModelFitVerdict } from './model-fit.ts';
|
|
@@ -51,8 +51,9 @@ export declare function invalidateModelStatusCache(cache: ModelStatusCache): voi
|
|
|
51
51
|
export interface ListModelsRuntime {
|
|
52
52
|
cache?: ModelStatusCache | undefined;
|
|
53
53
|
projectionFor?: ((name: string) => string | undefined) | undefined;
|
|
54
|
+
draftFor?: ((name: string) => string | undefined) | undefined;
|
|
54
55
|
}
|
|
55
|
-
export declare function listModels(sdk: ModelListSdk, { type, cachedOnly, fullRegistry }?: ListModelsOptions, { cache, projectionFor }?: ListModelsRuntime): Promise<CatalogRow[]>;
|
|
56
|
+
export declare function listModels(sdk: ModelListSdk, { type, cachedOnly, fullRegistry }?: ListModelsOptions, { cache, projectionFor, draftFor }?: ListModelsRuntime): Promise<CatalogRow[]>;
|
|
56
57
|
export interface CustomModelRowsContext {
|
|
57
58
|
readonly modelsDir?: string;
|
|
58
59
|
readonly loaded: ReadonlySet<string>;
|
|
@@ -50,7 +50,7 @@ async function musicRows(hydrate) {
|
|
|
50
50
|
}
|
|
51
51
|
return rows;
|
|
52
52
|
}
|
|
53
|
-
export async function listModels(sdk, { type, cachedOnly, fullRegistry } = {}, { cache, projectionFor } = {}) {
|
|
53
|
+
export async function listModels(sdk, { type, cachedOnly, fullRegistry } = {}, { cache, projectionFor, draftFor } = {}) {
|
|
54
54
|
const now = Date.now();
|
|
55
55
|
const seesImages = (name, addon) => addon === 'llm' && Boolean(projectionFor?.(name));
|
|
56
56
|
const hydrate = async (registryPath, catalogName) => {
|
|
@@ -87,6 +87,10 @@ export async function listModels(sdk, { type, cachedOnly, fullRegistry } = {}, {
|
|
|
87
87
|
const projection = await hydrate(listable.projection.registryPath, listable.projection.name);
|
|
88
88
|
companionsCached = projection.isCached && companionsCached;
|
|
89
89
|
}
|
|
90
|
+
if (listable.draft && draftFor?.(listable.name) === listable.draft.src) {
|
|
91
|
+
const draft = await hydrate(listable.draft.registryPath, listable.draft.name);
|
|
92
|
+
companionsCached = draft.isCached && companionsCached;
|
|
93
|
+
}
|
|
90
94
|
return {
|
|
91
95
|
name: listable.name,
|
|
92
96
|
type: listable.asset.addon,
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import ResourcePuddle from 'resource-puddle';
|
|
2
2
|
import { ModelHandle } from './model-handle.ts';
|
|
3
3
|
import { type ModelSrc } from './context.ts';
|
|
4
|
+
import { type SpeculativeDraft } from './model-catalog.ts';
|
|
4
5
|
import type { CpuPlacement } from '../hardware/cpu-placement.ts';
|
|
5
6
|
import { type ModelAddon } from './model-source.ts';
|
|
6
7
|
import type { GpuFaultState } from './sdk-faults.ts';
|
|
7
|
-
import type { LoadedModelInfo } from '@qvac/
|
|
8
|
+
import type { LoadedModelInfo } from '@qvac/inference';
|
|
8
9
|
import type { LoadedModel } from '../contract-types.ts';
|
|
9
10
|
import type { HoldFn } from './download-gate.ts';
|
|
10
|
-
type SdkModule = typeof import('@qvac/
|
|
11
|
-
type FitModelType = NonNullable<import('@qvac/
|
|
11
|
+
type SdkModule = typeof import('@qvac/inference');
|
|
12
|
+
type FitModelType = NonNullable<import('@qvac/inference').AssessModelFitInput['models'][number]['modelType']>;
|
|
12
13
|
export interface FitProbeSdk {
|
|
13
14
|
getLoadedModelInfo?(params: {
|
|
14
15
|
modelId: string;
|
|
@@ -30,6 +31,8 @@ export interface LlamaLoadKnobs {
|
|
|
30
31
|
'ubatch-size'?: number;
|
|
31
32
|
'kv-offload'?: false;
|
|
32
33
|
'n-cpu-moe'?: number;
|
|
34
|
+
speculative?: boolean;
|
|
35
|
+
spec_draft_n_max?: number;
|
|
33
36
|
}
|
|
34
37
|
export interface PendingLoad {
|
|
35
38
|
readonly key: string;
|
|
@@ -87,6 +90,8 @@ export type ModelLifecycleSdk = Pick<SdkModule, 'unloadModel' | 'modelRegistrySe
|
|
|
87
90
|
'cache-type-k'?: string;
|
|
88
91
|
'cache-type-v'?: string;
|
|
89
92
|
projectionModelSrc?: ModelSrc;
|
|
93
|
+
spec_type?: SpeculativeDraft['specType'];
|
|
94
|
+
draftModelSrc?: ModelSrc;
|
|
90
95
|
device?: 'cpu' | 'gpu';
|
|
91
96
|
gpu_layers?: number;
|
|
92
97
|
'main-gpu'?: string;
|
|
@@ -194,8 +199,9 @@ export interface ModelPoolOptions {
|
|
|
194
199
|
beforeLoad?: BeforeLoad;
|
|
195
200
|
chooseContext?: ChooseContext;
|
|
196
201
|
hold?: HoldFn;
|
|
202
|
+
modelsDir?: string | undefined;
|
|
197
203
|
}
|
|
198
|
-
export declare function createModelPool(loadSdk: LoadSdk, notify: NotifyFn, { deviceConfig, loads, onUnloadFailure, beforeLoad, chooseContext, hold }?: ModelPoolOptions): ModelPuddle;
|
|
204
|
+
export declare function createModelPool(loadSdk: LoadSdk, notify: NotifyFn, { deviceConfig, loads, onUnloadFailure, beforeLoad, chooseContext, hold, modelsDir }?: ModelPoolOptions): ModelPuddle;
|
|
199
205
|
export interface EmbedPoolOptions {
|
|
200
206
|
faults: GpuFaultState;
|
|
201
207
|
batchSize?: number;
|
|
@@ -4,8 +4,10 @@ import { transferProgress } from '../model-download-progress.js';
|
|
|
4
4
|
import ResourcePuddle from 'resource-puddle';
|
|
5
5
|
import { ModelHandle } from './model-handle.js';
|
|
6
6
|
import { defaultContextSize } from './context.js';
|
|
7
|
-
import { customContextLength } from './model-catalog.js';
|
|
8
|
-
import {
|
|
7
|
+
import { customContextLength, speculativeDraft } from './model-catalog.js';
|
|
8
|
+
import { localWeightFile } from './custom-model-cache.js';
|
|
9
|
+
import { GGUF_STUB_MAX_BYTES, parseGgufHeader, readGgufHeaderBytes } from './gguf-header.js';
|
|
10
|
+
import { adrenoSafeKvCache, headSafeKvCache } from './kv-cache.js';
|
|
9
11
|
import { DEFAULT_EMBED_BATCH_SIZE } from './embed-config.js';
|
|
10
12
|
import { errorMessage } from '../guards.js';
|
|
11
13
|
import { HarnessLog } from '../log.js';
|
|
@@ -92,6 +94,8 @@ export function modelKey(model, opts = {}) {
|
|
|
92
94
|
opts.llama?.['ubatch-size'] ?? '',
|
|
93
95
|
opts.llama?.['kv-offload'] ?? '',
|
|
94
96
|
opts.llama?.['n-cpu-moe'] ?? '',
|
|
97
|
+
opts.llama?.speculative ? 'spec' : '',
|
|
98
|
+
opts.llama?.spec_draft_n_max ?? '',
|
|
95
99
|
opts.slots && opts.slots > 1 ? opts.slots : ''
|
|
96
100
|
].join('\0');
|
|
97
101
|
}
|
|
@@ -404,28 +408,31 @@ export async function resolveCtxSize(loadSdk, model, load) {
|
|
|
404
408
|
const sdk = await loadSdk();
|
|
405
409
|
return contextSize(model, await resolveModelSrc(sdk, model), load);
|
|
406
410
|
}
|
|
407
|
-
export function createModelPool(loadSdk, notify, { deviceConfig = {}, loads = createLoadTracker(), onUnloadFailure, beforeLoad, chooseContext, hold } = {}) {
|
|
411
|
+
export function createModelPool(loadSdk, notify, { deviceConfig = {}, loads = createLoadTracker(), onUnloadFailure, beforeLoad, chooseContext, hold, modelsDir } = {}) {
|
|
408
412
|
const load = async (key, model, opts) => {
|
|
409
413
|
const sdk = await loadSdk();
|
|
410
414
|
const modelSrc = await resolveModelSrc(sdk, model);
|
|
411
415
|
const resolved = resolveLoadOptions(opts, deviceConfig);
|
|
412
416
|
const slots = slotCount(model, { opts: resolved, deviceConfig });
|
|
417
|
+
const header = await weightHeader(modelSrc, modelsDir);
|
|
413
418
|
const projectionModelSrc = resolved.projectionModel
|
|
414
419
|
? await resolveProjectionSrc(sdk, resolved.projectionModel)
|
|
415
420
|
: undefined;
|
|
416
421
|
const mainGpu = deviceConfig.device !== 'cpu' && deviceConfig.mainGpu
|
|
417
422
|
? await deviceConfig.mainGpu()
|
|
418
423
|
: undefined;
|
|
419
|
-
const kvCache = adrenoSafeKvCache(deviceConfig.device, {
|
|
420
|
-
k: resolved.kvCacheK,
|
|
421
|
-
v: resolved.kvCacheV
|
|
422
|
-
});
|
|
424
|
+
const kvCache = headSafeKvCache(adrenoSafeKvCache(deviceConfig.device, { k: resolved.kvCacheK, v: resolved.kvCacheV }), header?.headDims);
|
|
423
425
|
const openclCache = deviceConfig.device !== 'cpu' && deviceConfig.openclCacheDir
|
|
424
426
|
? deviceConfig.openclCacheDir()
|
|
425
427
|
: undefined;
|
|
426
428
|
const placement = deviceConfig.device === 'cpu' ? deviceConfig.cpuPlacement?.() : undefined;
|
|
429
|
+
const { speculative, ...llama } = resolved.llama ?? {};
|
|
430
|
+
const draft = speculative ? speculativeDraft(model) : undefined;
|
|
427
431
|
const config = definedFields({
|
|
428
|
-
...
|
|
432
|
+
...llama,
|
|
433
|
+
spec_type: draft?.specType,
|
|
434
|
+
spec_draft_n_max: draft ? llama.spec_draft_n_max : undefined,
|
|
435
|
+
draftModelSrc: draft?.model?.src,
|
|
429
436
|
verbosity: llmVerbosity(),
|
|
430
437
|
system_prompt: '',
|
|
431
438
|
tools: true,
|
|
@@ -438,8 +445,7 @@ export function createModelPool(loadSdk, notify, { deviceConfig = {}, loads = cr
|
|
|
438
445
|
gpu_layers: deviceConfig.gpuLayers,
|
|
439
446
|
'main-gpu': mainGpu,
|
|
440
447
|
openclCacheDir: openclCache || undefined,
|
|
441
|
-
threads: resolved.llama?.threads ?? placement?.threads
|
|
442
|
-
'cpu-mask': placement?.mask
|
|
448
|
+
threads: resolved.llama?.threads ?? placement?.threads
|
|
443
449
|
});
|
|
444
450
|
const pending = { key, model, modelSrc, modelType: 'llamacpp-completion' };
|
|
445
451
|
const chosen = contextSize(model, modelSrc, { opts: resolved, deviceConfig });
|
|
@@ -447,8 +453,13 @@ export function createModelPool(loadSdk, notify, { deviceConfig = {}, loads = cr
|
|
|
447
453
|
? chosen
|
|
448
454
|
: await chooseContext({ ...pending, modelConfig: { ...config } }, chosen);
|
|
449
455
|
const modelConfig = { ...config, ctx_size: ctxSize * slots };
|
|
450
|
-
const { projectionModelSrc: projection, ...loggedConfig } = modelConfig;
|
|
451
|
-
HarnessLog.debug('llm load config', {
|
|
456
|
+
const { projectionModelSrc: projection, draftModelSrc, ...loggedConfig } = modelConfig;
|
|
457
|
+
HarnessLog.debug('llm load config', {
|
|
458
|
+
model,
|
|
459
|
+
projection: Boolean(projection),
|
|
460
|
+
draft: Boolean(draftModelSrc),
|
|
461
|
+
...loggedConfig
|
|
462
|
+
});
|
|
452
463
|
const admission = await beforeLoad?.({ ...pending, modelConfig });
|
|
453
464
|
const loadStarted = Date.now();
|
|
454
465
|
const modelId = await loadClockGuard(model, sdk)
|
|
@@ -466,7 +477,8 @@ export function createModelPool(loadSdk, notify, { deviceConfig = {}, loads = cr
|
|
|
466
477
|
ctxSize,
|
|
467
478
|
slots,
|
|
468
479
|
bytes: admission?.bytes,
|
|
469
|
-
fit: await loadFit(sdk, model, modelId)
|
|
480
|
+
fit: await loadFit(sdk, model, modelId),
|
|
481
|
+
canThink: canThink(header)
|
|
470
482
|
};
|
|
471
483
|
};
|
|
472
484
|
return new ModelPuddle({
|
|
@@ -475,6 +487,15 @@ export function createModelPool(loadSdk, notify, { deviceConfig = {}, loads = cr
|
|
|
475
487
|
...NO_IDLE_GC
|
|
476
488
|
});
|
|
477
489
|
}
|
|
490
|
+
async function weightHeader(modelSrc, modelsDir) {
|
|
491
|
+
const file = typeof modelSrc === 'string' ? localWeightFile(modelSrc, modelsDir) : null;
|
|
492
|
+
const bytes = file ? await readGgufHeaderBytes(file, { maxBytes: GGUF_STUB_MAX_BYTES }) : null;
|
|
493
|
+
return bytes && parseGgufHeader(bytes);
|
|
494
|
+
}
|
|
495
|
+
function canThink(header) {
|
|
496
|
+
const template = header?.chatTemplate;
|
|
497
|
+
return template === undefined ? undefined : /<think(?:ing)?>/.test(template);
|
|
498
|
+
}
|
|
478
499
|
export function createEmbedPool(loadSdk, notify, { faults, batchSize = DEFAULT_EMBED_BATCH_SIZE, openclCacheDir, loads = createLoadTracker(), onUnloadFailure, beforeLoad, hold }) {
|
|
479
500
|
const load = async (key, model) => {
|
|
480
501
|
const sdk = await loadSdk();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type * as QvacSdk from '@qvac/
|
|
2
|
-
import type { ModelRegistryEntryAddon } from '@qvac/
|
|
1
|
+
import type * as QvacSdk from '@qvac/inference';
|
|
2
|
+
import type { ModelRegistryEntryAddon } from '@qvac/inference';
|
|
3
3
|
import type { ModelSrc } from './context.ts';
|
|
4
4
|
export type ModelRegistrySdk = Pick<typeof QvacSdk, 'modelRegistrySearch'>;
|
|
5
5
|
export type ModelAddon = ModelRegistryEntryAddon;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ToolDialect } from '@qvac/
|
|
1
|
+
import type { ToolDialect } from '@qvac/inference';
|
|
2
2
|
export declare function detectToolDialect(src: string, name?: string): ToolDialect | undefined;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type TtsCapabilityProfile = 'tiny' | 'low' | 'mid' | 'high' | 'xhigh';
|
|
2
2
|
export declare const TTS_MODEL_NAMES: ReadonlyArray<string>;
|
|
3
|
-
export declare function defaultTtsModelName(
|
|
3
|
+
export declare function defaultTtsModelName(_profile: TtsCapabilityProfile): string;
|
|
4
|
+
export declare function supertonicModelName(profile: TtsCapabilityProfile): string;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
const
|
|
1
|
+
const AUDIO8_MODEL_NAME = 'Audio8-Q8_0';
|
|
2
|
+
const SUPERTONIC_MODEL_BY_PROFILE = {
|
|
2
3
|
tiny: 'Supertonic3-Q4_0',
|
|
3
4
|
low: 'Supertonic3-Q4_0',
|
|
4
5
|
mid: 'Supertonic3-FP16',
|
|
5
6
|
high: 'Supertonic3-FP16',
|
|
6
7
|
xhigh: 'Supertonic3-FP16'
|
|
7
8
|
};
|
|
8
|
-
export const TTS_MODEL_NAMES = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export const TTS_MODEL_NAMES = [AUDIO8_MODEL_NAME];
|
|
10
|
+
export function defaultTtsModelName(_profile) {
|
|
11
|
+
return AUDIO8_MODEL_NAME;
|
|
12
|
+
}
|
|
13
|
+
export function supertonicModelName(profile) {
|
|
14
|
+
return SUPERTONIC_MODEL_BY_PROFILE[profile];
|
|
13
15
|
}
|