@xrkseek/harness-cli 0.0.6 → 0.0.8
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/dist/plugin/classify.js +1 -1
- package/dist/plugin/classify.js.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts +15 -3
- package/node_modules/@xrkseek/core-agent/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent/dist/index.js +8 -2
- package/node_modules/@xrkseek/core-agent/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/cancel-finalize.d.ts +6 -3
- package/node_modules/@xrkseek/core-agent-loop/dist/cancel-finalize.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/cancel-finalize.js +50 -4
- package/node_modules/@xrkseek/core-agent-loop/dist/cancel-finalize.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +23 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js +223 -43
- package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/llm-retry.d.ts +32 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/llm-retry.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/llm-retry.js +92 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/llm-retry.js.map +1 -0
- package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.d.ts +18 -8
- package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.js +187 -29
- package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.js.map +1 -1
- package/node_modules/@xrkseek/core-session/README.md +1 -1
- package/node_modules/@xrkseek/core-session/dist/chunk-pack.d.ts +18 -4
- package/node_modules/@xrkseek/core-session/dist/chunk-pack.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/chunk-pack.js +114 -34
- package/node_modules/@xrkseek/core-session/dist/chunk-pack.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/compaction.js +24 -4
- package/node_modules/@xrkseek/core-session/dist/compaction.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/dangling.d.ts +28 -1
- package/node_modules/@xrkseek/core-session/dist/dangling.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/dangling.js +35 -5
- package/node_modules/@xrkseek/core-session/dist/dangling.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.d.ts +3 -2
- package/node_modules/@xrkseek/core-session/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/index.js +3 -2
- package/node_modules/@xrkseek/core-session/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/latch.d.ts +1 -1
- package/node_modules/@xrkseek/core-session/dist/latch.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/latch.js +2 -2
- package/node_modules/@xrkseek/core-session/dist/latch.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js +44 -4
- package/node_modules/@xrkseek/core-session/dist/repair-open-turn.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts +1 -0
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +10 -5
- package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/surface-fold.d.ts +5 -0
- package/node_modules/@xrkseek/core-session/dist/surface-fold.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/surface-fold.js +29 -3
- package/node_modules/@xrkseek/core-session/dist/surface-fold.js.map +1 -1
- package/node_modules/@xrkseek/core-session/dist/tool-result-prune.d.ts +35 -0
- package/node_modules/@xrkseek/core-session/dist/tool-result-prune.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-session/dist/tool-result-prune.js +99 -0
- package/node_modules/@xrkseek/core-session/dist/tool-result-prune.js.map +1 -0
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.d.ts +15 -2
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.js +38 -4
- package/node_modules/@xrkseek/core-system-prompt/dist/three-layer.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/abort.d.ts +5 -0
- package/node_modules/@xrkseek/core-tools/dist/abort.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/abort.js +14 -0
- package/node_modules/@xrkseek/core-tools/dist/abort.js.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/definition.d.ts +32 -1
- package/node_modules/@xrkseek/core-tools/dist/definition.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/definition.js +1 -0
- package/node_modules/@xrkseek/core-tools/dist/definition.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/execution-mode.d.ts +15 -0
- package/node_modules/@xrkseek/core-tools/dist/execution-mode.d.ts.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/execution-mode.js +17 -0
- package/node_modules/@xrkseek/core-tools/dist/execution-mode.js.map +1 -0
- package/node_modules/@xrkseek/core-tools/dist/index.d.ts +2 -0
- package/node_modules/@xrkseek/core-tools/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/index.js +2 -0
- package/node_modules/@xrkseek/core-tools/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/pipeline.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/pipeline.js +36 -10
- package/node_modules/@xrkseek/core-tools/dist/pipeline.js.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/types.d.ts +7 -0
- package/node_modules/@xrkseek/core-tools/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/core-tools/dist/types.js.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-fs/dist/index.js +3 -0
- package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-lsp/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-lsp/dist/tools.js +1 -0
- package/node_modules/@xrkseek/exec-lsp/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/index.js +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/registry.d.ts +5 -0
- package/node_modules/@xrkseek/exec-pty/dist/registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/registry.js +17 -1
- package/node_modules/@xrkseek/exec-pty/dist/registry.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/render.d.ts +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/render.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/render.js +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/render.js.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-pty/dist/tools.js +15 -4
- package/node_modules/@xrkseek/exec-pty/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/exec-shell/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-shell/dist/index.js +4 -0
- package/node_modules/@xrkseek/exec-shell/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/search-providers.js.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/exec-web/dist/tools.js +2 -0
- package/node_modules/@xrkseek/exec-web/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/llm/dist/failure.d.ts +45 -0
- package/node_modules/@xrkseek/llm/dist/failure.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm/dist/failure.js +115 -0
- package/node_modules/@xrkseek/llm/dist/failure.js.map +1 -0
- package/node_modules/@xrkseek/llm/dist/index.d.ts +80 -1
- package/node_modules/@xrkseek/llm/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm/dist/index.js +167 -2
- package/node_modules/@xrkseek/llm/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm/dist/retry-policy.d.ts +23 -0
- package/node_modules/@xrkseek/llm/dist/retry-policy.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm/dist/retry-policy.js +74 -0
- package/node_modules/@xrkseek/llm/dist/retry-policy.js.map +1 -0
- package/node_modules/@xrkseek/llm-anthropic/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-anthropic/dist/index.js +152 -22
- package/node_modules/@xrkseek/llm-anthropic/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/README.md +3 -3
- package/node_modules/@xrkseek/llm-deepseek/dist/index.d.ts +32 -2
- package/node_modules/@xrkseek/llm-deepseek/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-deepseek/dist/index.js +59 -5
- package/node_modules/@xrkseek/llm-deepseek/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-gemini/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-gemini/dist/index.js +18 -8
- package/node_modules/@xrkseek/llm-gemini/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-openai-compatible/dist/deepseek-thinking.d.ts +16 -0
- package/node_modules/@xrkseek/llm-openai-compatible/dist/deepseek-thinking.d.ts.map +1 -0
- package/node_modules/@xrkseek/llm-openai-compatible/dist/deepseek-thinking.js +40 -0
- package/node_modules/@xrkseek/llm-openai-compatible/dist/deepseek-thinking.js.map +1 -0
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.d.ts +9 -1
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.js +78 -21
- package/node_modules/@xrkseek/llm-openai-compatible/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-openai-responses/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-openai-responses/dist/index.js +18 -8
- package/node_modules/@xrkseek/llm-openai-responses/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/registry.js +6 -4
- package/node_modules/@xrkseek/llm-registry/dist/registry.js.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/routing-adapter.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-registry/dist/routing-adapter.js +15 -3
- package/node_modules/@xrkseek/llm-registry/dist/routing-adapter.js.map +1 -1
- package/node_modules/@xrkseek/llm-replay/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/llm-replay/dist/index.js +4 -1
- package/node_modules/@xrkseek/llm-replay/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/client.d.ts +3 -1
- package/node_modules/@xrkseek/mcp/dist/client.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/client.js +31 -7
- package/node_modules/@xrkseek/mcp/dist/client.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/index.d.ts +2 -2
- package/node_modules/@xrkseek/mcp/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/index.js +1 -1
- package/node_modules/@xrkseek/mcp/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/register.d.ts.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/register.js +3 -0
- package/node_modules/@xrkseek/mcp/dist/register.js.map +1 -1
- package/node_modules/@xrkseek/mcp/dist/types.d.ts +10 -0
- package/node_modules/@xrkseek/mcp/dist/types.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +21 -3
- package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/preset.js +31 -8
- package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts +3 -2
- package/node_modules/@xrkseek/preset-minimal/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js +13 -7
- package/node_modules/@xrkseek/preset-minimal/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js +5 -1
- package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
- package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@xrkseek/protocol/dist/index.d.ts +3 -1
- package/node_modules/@xrkseek/protocol/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/index.js +3 -1
- package/node_modules/@xrkseek/protocol/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts +72 -0
- package/node_modules/@xrkseek/protocol/dist/json-schema.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/json-schema.js +99 -0
- package/node_modules/@xrkseek/protocol/dist/json-schema.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/messages.d.ts +7 -0
- package/node_modules/@xrkseek/protocol/dist/messages.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts +110 -6
- package/node_modules/@xrkseek/protocol/dist/session-events.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/session-events.js +23 -0
- package/node_modules/@xrkseek/protocol/dist/session-events.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/tools.d.ts +15 -0
- package/node_modules/@xrkseek/protocol/dist/tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/tools.js +6 -1
- package/node_modules/@xrkseek/protocol/dist/tools.js.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.d.ts.map +1 -1
- package/node_modules/@xrkseek/protocol/dist/validate.js +234 -1
- package/node_modules/@xrkseek/protocol/dist/validate.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts +2 -0
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js +26 -8
- package/node_modules/@xrkseek/server-face/dist/adapt/wire-event.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.js +1 -1
- package/node_modules/@xrkseek/server-face/dist/goal-store.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js +2 -2
- package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.js +1 -1
- package/node_modules/@xrkseek/server-face/dist/llm-resolve.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/index.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.d.ts +12 -50
- package/node_modules/@xrkseek/server-face/dist/projections/registry.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/registry.js +4 -146
- package/node_modules/@xrkseek/server-face/dist/projections/registry.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-breakdown.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-breakdown.js +13 -11
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-breakdown.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.js +27 -25
- package/node_modules/@xrkseek/server-face/dist/projections/units/context-pressure.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/image-limits.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/image-limits.js +31 -29
- package/node_modules/@xrkseek/server-face/dist/projections/units/image-limits.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/permissions.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/permissions.js +27 -25
- package/node_modules/@xrkseek/server-face/dist/projections/units/permissions.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/plan.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/plan.js +12 -10
- package/node_modules/@xrkseek/server-face/dist/projections/units/plan.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js +20 -14
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-list-metadata.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-stats.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-stats.js +27 -25
- package/node_modules/@xrkseek/server-face/dist/projections/units/session-stats.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/title.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/title.js +9 -7
- package/node_modules/@xrkseek/server-face/dist/projections/units/title.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.js +25 -23
- package/node_modules/@xrkseek/server-face/dist/projections/units/todos.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/token-usage.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/projections/units/token-usage.js +14 -12
- package/node_modules/@xrkseek/server-face/dist/projections/units/token-usage.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/runtime.js +4 -2
- package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts +8 -13
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +29 -1
- package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-list.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-face/dist/skill-list.js +1 -0
- package/node_modules/@xrkseek/server-face/dist/skill-list.js.map +1 -1
- package/node_modules/@xrkseek/server-face/package.json +1 -0
- package/node_modules/@xrkseek/server-host/dist/agent-cache.js +1 -1
- package/node_modules/@xrkseek/server-host/dist/agent-cache.js.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.d.ts +8 -0
- package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/server-host/dist/index.js +39 -1
- package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/session-projection/README.md +22 -0
- package/node_modules/@xrkseek/session-projection/dist/index.d.ts +100 -0
- package/node_modules/@xrkseek/session-projection/dist/index.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-projection/dist/index.js +241 -0
- package/node_modules/@xrkseek/session-projection/dist/index.js.map +1 -0
- package/node_modules/@xrkseek/session-projection/dist/types.d.ts +20 -0
- package/node_modules/@xrkseek/session-projection/dist/types.d.ts.map +1 -0
- package/node_modules/@xrkseek/session-projection/dist/types.js +9 -0
- package/node_modules/@xrkseek/session-projection/dist/types.js.map +1 -0
- package/node_modules/@xrkseek/session-projection/package.json +31 -0
- package/node_modules/@xrkseek/workspace/README.md +3 -23
- package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts +62 -0
- package/node_modules/@xrkseek/workspace/dist/durable-inject.d.ts.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/durable-inject.js +146 -0
- package/node_modules/@xrkseek/workspace/dist/durable-inject.js.map +1 -0
- package/node_modules/@xrkseek/workspace/dist/index.d.ts +25 -13
- package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/index.js +77 -17
- package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-tools.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skill-tools.js +7 -0
- package/node_modules/@xrkseek/workspace/dist/skill-tools.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skills.d.ts +12 -1
- package/node_modules/@xrkseek/workspace/dist/skills.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/skills.js +42 -4
- package/node_modules/@xrkseek/workspace/dist/skills.js.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/slash.d.ts.map +1 -1
- package/node_modules/@xrkseek/workspace/dist/slash.js +2 -0
- package/node_modules/@xrkseek/workspace/dist/slash.js.map +1 -1
- package/node_modules/@xrkseek/workspace/package.json +2 -1
- package/package.json +3 -1
- package/product-web/assets/index-CcF0Sxxg.js +297 -0
- package/product-web/assets/index-CcF0Sxxg.js.map +1 -0
- package/product-web/assets/langs/{php-9bx0az3O.js → php-DY2VakOf.js} +2 -2
- package/product-web/assets/langs/{php-9bx0az3O.js.map → php-DY2VakOf.js.map} +1 -1
- package/product-web/assets/langs/{ruby-HDLHRjSL.js → ruby-hwtoiFmS.js} +2 -2
- package/product-web/assets/langs/{ruby-HDLHRjSL.js.map → ruby-hwtoiFmS.js.map} +1 -1
- package/product-web/assets/{vendor-CeMKrCZm.js → vendor-CldRVjca.js} +35 -36
- package/product-web/assets/vendor-CldRVjca.js.map +1 -0
- package/product-web/boot.json +1 -1
- package/product-web/index.html +2 -2
- package/product-web/plugins/@xrkseek/client-locale/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-runtime/client.js +37 -1
- package/product-web/plugins/@xrkseek/client-ui-agent-preset/client.js +37 -37
- package/product-web/plugins/@xrkseek/client-ui-commands/client.js +8 -8
- package/product-web/plugins/@xrkseek/client-ui-conversation/client.js +172 -186
- package/product-web/plugins/@xrkseek/client-ui-deliverables/client.js +5 -5
- package/product-web/plugins/@xrkseek/client-ui-directory-picker-browse/client.js +30 -30
- package/product-web/plugins/@xrkseek/client-ui-goal/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-input-trigger/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-jobs/client.js +10 -10
- package/product-web/plugins/@xrkseek/client-ui-layout/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-message-feedback/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-model-selection/client.js +16 -16
- package/product-web/plugins/@xrkseek/client-ui-permission-presets/client.js +4 -4
- package/product-web/plugins/@xrkseek/client-ui-plan/client.js +2 -2
- package/product-web/plugins/@xrkseek/client-ui-settings-general/client.js +15 -15
- package/product-web/plugins/@xrkseek/client-ui-settings-models/client.js +55 -55
- package/product-web/plugins/@xrkseek/client-ui-settings-plugin-inventory/client.js +13 -13
- package/product-web/plugins/@xrkseek/client-ui-settings-plugins/client.js +134 -63
- package/product-web/plugins/@xrkseek/client-ui-sidebar/client.js +14 -14
- package/product-web/plugins/@xrkseek/client-ui-skill/client.js +11 -11
- package/product-web/plugins/@xrkseek/client-ui-subagent/client.js +15 -15
- package/product-web/plugins/@xrkseek/client-ui-theme/client.js +3 -3
- package/product-web/plugins/@xrkseek/client-ui-tool/client.js +43 -43
- package/product-web/plugins/@xrkseek/client-ui-trajectory/client.js +166 -145
- package/product-web/plugins/@xrkseek/client-ui-user-questions/client.js +30 -30
- package/product-web/plugins/@xrkseek/client-ui-workflow-run/client.js +16 -16
- package/product-web/plugins/@xrkseek/client-ui-workspace/client.js +56 -56
- package/node_modules/@xrkseek/server-face/dist/dsh-schema.d.ts +0 -35
- package/node_modules/@xrkseek/server-face/dist/dsh-schema.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/dsh-schema.js +0 -116
- package/node_modules/@xrkseek/server-face/dist/dsh-schema.js.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/envelope.d.ts +0 -23
- package/node_modules/@xrkseek/server-face/dist/envelope.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/envelope.js +0 -51
- package/node_modules/@xrkseek/server-face/dist/envelope.js.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/rpc-error.d.ts +0 -15
- package/node_modules/@xrkseek/server-face/dist/rpc-error.d.ts.map +0 -1
- package/node_modules/@xrkseek/server-face/dist/rpc-error.js +0 -247
- package/node_modules/@xrkseek/server-face/dist/rpc-error.js.map +0 -1
- package/product-web/assets/index-BwSJq-Ch.js +0 -112
- package/product-web/assets/index-BwSJq-Ch.js.map +0 -1
- package/product-web/assets/vendor-CeMKrCZm.js.map +0 -1
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Step-local tool settlement: serial or parallel.
|
|
2
|
+
* Step-local tool settlement: serial, or concurrency-aware parallel.
|
|
3
|
+
*
|
|
4
|
+
* When `mode` is `parallel` (default):
|
|
5
|
+
* - only tools whose `isConcurrencySafe(args) === true` may overlap
|
|
6
|
+
* - exclusive calls are barriers (drain pool, run alone)
|
|
7
|
+
* - later calls are reclassified before start (registry hot-reload safe)
|
|
3
8
|
*
|
|
4
9
|
* Innovation vs OpenCode FiberSet (completion-order publish):
|
|
5
|
-
* 1) append every tool/call (barrier)
|
|
6
|
-
* 2) settle bodies
|
|
7
|
-
* 3) append tool/result in **call order**
|
|
10
|
+
* 1) append every tool/call (barrier — caller)
|
|
11
|
+
* 2) settle bodies with exclusive barriers + bounded parallel pools
|
|
12
|
+
* 3) append tool/result in **call order** (caller)
|
|
8
13
|
* so the durable log stays reconstructible and order-stable.
|
|
14
|
+
*
|
|
15
|
+
* Cancel (DSH): already-started calls finish or `ABORTED`; never-started calls
|
|
16
|
+
* receive synthetic `ABORTED_BEFORE_DISPATCH` outcomes — no throw mid-batch.
|
|
9
17
|
*/
|
|
18
|
+
import { type ToolCall } from "@xrkseek/protocol";
|
|
10
19
|
import { type RunToolOutcome, type ToolMaterialization, type ToolPipeline, type ToolRegistry } from "@xrkseek/core-tools";
|
|
11
|
-
import type { ToolCall } from "@xrkseek/protocol";
|
|
12
20
|
export type ToolSettleMode = "serial" | "parallel";
|
|
13
21
|
export interface SettleToolBatchInput {
|
|
14
22
|
readonly calls: readonly ToolCall[];
|
|
@@ -16,17 +24,19 @@ export interface SettleToolBatchInput {
|
|
|
16
24
|
readonly materialization: ToolMaterialization;
|
|
17
25
|
readonly pipeline?: ToolPipeline;
|
|
18
26
|
readonly signal?: AbortSignal;
|
|
19
|
-
/** Default `parallel
|
|
27
|
+
/** Default `parallel` (concurrency-classified). Use `serial` to force exclusive. */
|
|
20
28
|
readonly mode?: ToolSettleMode;
|
|
21
29
|
/**
|
|
22
|
-
* Cap concurrent settles
|
|
23
|
-
* Omit / ≤0 → unbounded
|
|
30
|
+
* Cap concurrent settles within a parallel group.
|
|
31
|
+
* Omit / ≤0 → unbounded within the group. Face `agent-loop.maxParallelToolCalls`.
|
|
24
32
|
*/
|
|
25
33
|
readonly maxParallel?: number;
|
|
26
34
|
}
|
|
27
35
|
export interface SettleToolBatchResult {
|
|
28
36
|
readonly outcomes: readonly RunToolOutcome[];
|
|
29
37
|
readonly mode: ToolSettleMode;
|
|
38
|
+
/** True when cancel filled remaining slots with ABORTED_BEFORE_DISPATCH. */
|
|
39
|
+
readonly aborted: boolean;
|
|
30
40
|
}
|
|
31
41
|
/**
|
|
32
42
|
* Run settles for already-recorded calls. Does **not** touch the session log —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settle-batch.d.ts","sourceRoot":"","sources":["../src/settle-batch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settle-batch.d.ts","sourceRoot":"","sources":["../src/settle-batch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAIL,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAC9C,QAAQ,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC9B,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAoLD;;;GAGG;AACH,wBAAsB,eAAe,CACnC,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,CA0DhC"}
|
|
@@ -1,16 +1,65 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Step-local tool settlement: serial or parallel.
|
|
2
|
+
* Step-local tool settlement: serial, or concurrency-aware parallel.
|
|
3
|
+
*
|
|
4
|
+
* When `mode` is `parallel` (default):
|
|
5
|
+
* - only tools whose `isConcurrencySafe(args) === true` may overlap
|
|
6
|
+
* - exclusive calls are barriers (drain pool, run alone)
|
|
7
|
+
* - later calls are reclassified before start (registry hot-reload safe)
|
|
3
8
|
*
|
|
4
9
|
* Innovation vs OpenCode FiberSet (completion-order publish):
|
|
5
|
-
* 1) append every tool/call (barrier)
|
|
6
|
-
* 2) settle bodies
|
|
7
|
-
* 3) append tool/result in **call order**
|
|
10
|
+
* 1) append every tool/call (barrier — caller)
|
|
11
|
+
* 2) settle bodies with exclusive barriers + bounded parallel pools
|
|
12
|
+
* 3) append tool/result in **call order** (caller)
|
|
8
13
|
* so the durable log stays reconstructible and order-stable.
|
|
14
|
+
*
|
|
15
|
+
* Cancel (DSH): already-started calls finish or `ABORTED`; never-started calls
|
|
16
|
+
* receive synthetic `ABORTED_BEFORE_DISPATCH` outcomes — no throw mid-batch.
|
|
9
17
|
*/
|
|
10
|
-
import {
|
|
18
|
+
import { TOOL_ABORTED, TOOL_ABORTED_BEFORE_DISPATCH, TOOL_ABORTED_BEFORE_DISPATCH_MESSAGE, } from "@xrkseek/protocol";
|
|
19
|
+
import { abortedToolContent, classifyToolExecutionMode, isAbortError, runToolDetailed, } from "@xrkseek/core-tools";
|
|
20
|
+
const EMPTY_SIDE = {
|
|
21
|
+
additionalContexts: [],
|
|
22
|
+
safetyNotices: [],
|
|
23
|
+
toolEvents: [],
|
|
24
|
+
stages: [],
|
|
25
|
+
};
|
|
26
|
+
function abortedBeforeDispatchOutcome(call) {
|
|
27
|
+
return {
|
|
28
|
+
result: {
|
|
29
|
+
toolCallId: call.id,
|
|
30
|
+
name: call.name,
|
|
31
|
+
content: TOOL_ABORTED_BEFORE_DISPATCH_MESSAGE,
|
|
32
|
+
isError: true,
|
|
33
|
+
error: {
|
|
34
|
+
name: "AbortError",
|
|
35
|
+
code: TOOL_ABORTED_BEFORE_DISPATCH,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
...EMPTY_SIDE,
|
|
39
|
+
skippedBody: true,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** Fallback when AbortError escapes runTool (pipeline normally absorbs it). */
|
|
43
|
+
function abortedAfterStartOutcome(call) {
|
|
44
|
+
const body = abortedToolContent();
|
|
45
|
+
return {
|
|
46
|
+
result: {
|
|
47
|
+
toolCallId: call.id,
|
|
48
|
+
name: call.name,
|
|
49
|
+
content: body.content,
|
|
50
|
+
isError: true,
|
|
51
|
+
...(body.error !== undefined ? { error: body.error } : {}),
|
|
52
|
+
},
|
|
53
|
+
...EMPTY_SIDE,
|
|
54
|
+
skippedBody: false,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function isAbortSettlementCode(code) {
|
|
58
|
+
return code === TOOL_ABORTED || code === TOOL_ABORTED_BEFORE_DISPATCH;
|
|
59
|
+
}
|
|
11
60
|
async function settleOne(input, call) {
|
|
12
61
|
if (input.signal?.aborted) {
|
|
13
|
-
|
|
62
|
+
return abortedBeforeDispatchOutcome(call);
|
|
14
63
|
}
|
|
15
64
|
return runToolDetailed({
|
|
16
65
|
registry: input.registry,
|
|
@@ -20,6 +69,98 @@ async function settleOne(input, call) {
|
|
|
20
69
|
...(input.pipeline ? { pipeline: input.pipeline } : {}),
|
|
21
70
|
});
|
|
22
71
|
}
|
|
72
|
+
function parallelCap(input) {
|
|
73
|
+
if (typeof input.maxParallel === "number" &&
|
|
74
|
+
Number.isFinite(input.maxParallel) &&
|
|
75
|
+
input.maxParallel > 0) {
|
|
76
|
+
return Math.floor(input.maxParallel);
|
|
77
|
+
}
|
|
78
|
+
return Number.POSITIVE_INFINITY;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Run a consecutive parallel-classified group with a rolling pool.
|
|
82
|
+
* Stops filling when a later call reclassifies as exclusive (left for next group).
|
|
83
|
+
*/
|
|
84
|
+
async function settleParallelGroup(input, group) {
|
|
85
|
+
const cap = parallelCap(input);
|
|
86
|
+
const outcomes = group.map(() => undefined);
|
|
87
|
+
const inFlight = new Map();
|
|
88
|
+
let nextToStart = 0;
|
|
89
|
+
let started = 0;
|
|
90
|
+
let failure;
|
|
91
|
+
let aborted = false;
|
|
92
|
+
const start = (index) => {
|
|
93
|
+
const call = group[index];
|
|
94
|
+
started += 1;
|
|
95
|
+
const promise = settleOne(input, call).then((outcome) => {
|
|
96
|
+
outcomes[index] = outcome;
|
|
97
|
+
if (isAbortSettlementCode(outcome.result.error?.code)) {
|
|
98
|
+
aborted = true;
|
|
99
|
+
}
|
|
100
|
+
return index;
|
|
101
|
+
}, (err) => {
|
|
102
|
+
if (isAbortError(err)) {
|
|
103
|
+
aborted = true;
|
|
104
|
+
outcomes[index] = abortedAfterStartOutcome(call);
|
|
105
|
+
return index;
|
|
106
|
+
}
|
|
107
|
+
failure ??= err;
|
|
108
|
+
return index;
|
|
109
|
+
});
|
|
110
|
+
inFlight.set(index, promise);
|
|
111
|
+
};
|
|
112
|
+
const fill = () => {
|
|
113
|
+
while (nextToStart < group.length &&
|
|
114
|
+
inFlight.size < cap &&
|
|
115
|
+
!input.signal?.aborted &&
|
|
116
|
+
!aborted) {
|
|
117
|
+
const call = group[nextToStart];
|
|
118
|
+
if (nextToStart > 0 &&
|
|
119
|
+
classifyToolExecutionMode(input.registry, call).kind !== "parallel") {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
start(nextToStart);
|
|
123
|
+
nextToStart += 1;
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
fill();
|
|
127
|
+
while (inFlight.size > 0) {
|
|
128
|
+
const settledIndex = await Promise.race(inFlight.values());
|
|
129
|
+
inFlight.delete(settledIndex);
|
|
130
|
+
if (failure !== undefined) {
|
|
131
|
+
await Promise.allSettled([...inFlight.values()]);
|
|
132
|
+
throw failure instanceof Error ? failure : new Error(String(failure));
|
|
133
|
+
}
|
|
134
|
+
if (input.signal?.aborted) {
|
|
135
|
+
aborted = true;
|
|
136
|
+
await Promise.allSettled([...inFlight.values()]);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
fill();
|
|
140
|
+
}
|
|
141
|
+
if (aborted || input.signal?.aborted) {
|
|
142
|
+
aborted = true;
|
|
143
|
+
for (let i = 0; i < group.length; i++) {
|
|
144
|
+
if (outcomes[i] === undefined) {
|
|
145
|
+
outcomes[i] = abortedBeforeDispatchOutcome(group[i]);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
outcomes: outcomes,
|
|
150
|
+
consumed: group.length,
|
|
151
|
+
aborted: true,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const settled = [];
|
|
155
|
+
for (let i = 0; i < started; i++) {
|
|
156
|
+
const o = outcomes[i];
|
|
157
|
+
if (o === undefined) {
|
|
158
|
+
throw new Error(`settleToolBatch: missing outcome at ${i}`);
|
|
159
|
+
}
|
|
160
|
+
settled.push(o);
|
|
161
|
+
}
|
|
162
|
+
return { outcomes: settled, consumed: started, aborted: false };
|
|
163
|
+
}
|
|
23
164
|
/**
|
|
24
165
|
* Run settles for already-recorded calls. Does **not** touch the session log —
|
|
25
166
|
* caller owns call/result append barriers.
|
|
@@ -27,37 +168,54 @@ async function settleOne(input, call) {
|
|
|
27
168
|
export async function settleToolBatch(input) {
|
|
28
169
|
const mode = input.mode ?? "parallel";
|
|
29
170
|
if (input.calls.length === 0) {
|
|
30
|
-
return { outcomes: [], mode };
|
|
171
|
+
return { outcomes: [], mode, aborted: false };
|
|
31
172
|
}
|
|
32
173
|
if (mode === "serial") {
|
|
33
174
|
const outcomes = [];
|
|
175
|
+
let aborted = false;
|
|
34
176
|
for (const call of input.calls) {
|
|
35
|
-
|
|
177
|
+
if (aborted || input.signal?.aborted) {
|
|
178
|
+
aborted = true;
|
|
179
|
+
outcomes.push(abortedBeforeDispatchOutcome(call));
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
const outcome = await settleOne(input, call);
|
|
183
|
+
if (isAbortSettlementCode(outcome.result.error?.code)) {
|
|
184
|
+
aborted = true;
|
|
185
|
+
}
|
|
186
|
+
outcomes.push(outcome);
|
|
36
187
|
}
|
|
37
|
-
return { outcomes, mode };
|
|
188
|
+
return { outcomes, mode, aborted };
|
|
38
189
|
}
|
|
39
|
-
const
|
|
40
|
-
Number.isFinite(input.maxParallel) &&
|
|
41
|
-
input.maxParallel > 0
|
|
42
|
-
? Math.floor(input.maxParallel)
|
|
43
|
-
: undefined;
|
|
44
|
-
if (cap === undefined || cap >= input.calls.length) {
|
|
45
|
-
const outcomes = await Promise.all(input.calls.map((call) => settleOne(input, call)));
|
|
46
|
-
return { outcomes, mode };
|
|
47
|
-
}
|
|
48
|
-
// Bounded parallel: worker pool; results kept in call order.
|
|
49
|
-
const outcomes = new Array(input.calls.length);
|
|
190
|
+
const outcomes = [];
|
|
50
191
|
let next = 0;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
192
|
+
let aborted = false;
|
|
193
|
+
while (next < input.calls.length) {
|
|
194
|
+
if (aborted || input.signal?.aborted) {
|
|
195
|
+
aborted = true;
|
|
196
|
+
for (let i = next; i < input.calls.length; i++) {
|
|
197
|
+
outcomes.push(abortedBeforeDispatchOutcome(input.calls[i]));
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
const first = input.calls[next];
|
|
202
|
+
const kind = classifyToolExecutionMode(input.registry, first).kind;
|
|
203
|
+
if (kind === "exclusive") {
|
|
204
|
+
const outcome = await settleOne(input, first);
|
|
205
|
+
if (isAbortSettlementCode(outcome.result.error?.code)) {
|
|
206
|
+
aborted = true;
|
|
207
|
+
}
|
|
208
|
+
outcomes.push(outcome);
|
|
209
|
+
next += 1;
|
|
210
|
+
continue;
|
|
57
211
|
}
|
|
212
|
+
const group = input.calls.slice(next);
|
|
213
|
+
const { outcomes: groupOut, consumed, aborted: groupAborted, } = await settleParallelGroup(input, group);
|
|
214
|
+
outcomes.push(...groupOut);
|
|
215
|
+
next += consumed;
|
|
216
|
+
if (groupAborted)
|
|
217
|
+
aborted = true;
|
|
58
218
|
}
|
|
59
|
-
|
|
60
|
-
await Promise.all(workers);
|
|
61
|
-
return { outcomes, mode };
|
|
219
|
+
return { outcomes, mode, aborted };
|
|
62
220
|
}
|
|
63
221
|
//# sourceMappingURL=settle-batch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settle-batch.js","sourceRoot":"","sources":["../src/settle-batch.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settle-batch.js","sourceRoot":"","sources":["../src/settle-batch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,YAAY,EACZ,4BAA4B,EAC5B,oCAAoC,GAErC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,YAAY,EACZ,eAAe,GAKhB,MAAM,qBAAqB,CAAC;AA0B7B,MAAM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,QAAQ,EACR,OAAO,EAAE,YAAY,GACtB,GAAG,MAAM,mBAAmB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC5C,QAAQ,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC;QAC3B,IAAI,IAAI,QAAQ,CAAC;QACjB,IAAI,YAAY;YAAE,OAAO,GAAG,IAAI,CAAC;IACnC,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
|
@@ -27,4 +27,4 @@ See [docs/session-compaction.md](../../../docs/session-compaction.md).
|
|
|
27
27
|
## Store
|
|
28
28
|
|
|
29
29
|
`createMemorySessionStore` — `append` runs `assertSessionEvent` then deep-freeze. `has(id)` 不抛。
|
|
30
|
-
`createPersistentSessionStore(dir)` — 工作区 `{dir}/sessions.db`(WAL · **schema v3** · `node:sqlite` · FTS5 trigram · lazy load · chunk 写批并物理 `text-chunks` · `flush()` · open-turn 崩溃修复);Host 经 `XRK_SESSIONS_DIR` 默认选用;drain idle / `stop` 时 flush/close。ZIP 导出 `toPackedJSONL` + `.jsonl.zst` sidecar;`fromPackedJSONL` 可导入;`searchSessionIds` 供 Face `session.search`。
|
|
30
|
+
`createPersistentSessionStore(dir)` — 工作区 `{dir}/sessions.db`(WAL · **schema v3** · `node:sqlite` · FTS5 trigram · lazy load · chunk 写批并物理 `text-chunks` / `tool-call-chunks` · `flush()` · open-turn 崩溃修复);Host 经 `XRK_SESSIONS_DIR` 默认选用;drain idle / `stop` 时 flush/close。ZIP 导出 `toPackedJSONL` + `.jsonl.zst` sidecar;`fromPackedJSONL` 可导入;`searchSessionIds` 供 Face `session.search`。
|
|
@@ -10,22 +10,36 @@ export interface TextChunkRow {
|
|
|
10
10
|
readonly dts: readonly number[];
|
|
11
11
|
readonly texts: readonly string[];
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
/** Packed tool-call argument deltas (DSH `tool-call-chunks`). */
|
|
14
|
+
export interface ToolCallChunkRow {
|
|
15
|
+
readonly type: "tool-call-chunks";
|
|
16
|
+
readonly turnId: string;
|
|
17
|
+
readonly stepId: string;
|
|
18
|
+
readonly index: number;
|
|
19
|
+
readonly toolCallId: string;
|
|
20
|
+
readonly toolName?: string;
|
|
21
|
+
readonly ts0: number;
|
|
22
|
+
readonly dts: readonly number[];
|
|
23
|
+
readonly args: readonly string[];
|
|
24
|
+
}
|
|
25
|
+
export type PackedStorageRecord = SessionEvent | TextChunkRow | ToolCallChunkRow;
|
|
14
26
|
/**
|
|
15
|
-
* Collapse runs of consecutive same-block `assistant/chunk` deltas for export
|
|
16
|
-
* Live session log stays one event per row
|
|
27
|
+
* Collapse runs of consecutive same-block `assistant/chunk` deltas for export /
|
|
28
|
+
* SQLite flush. Live session log stays one event per row.
|
|
17
29
|
*/
|
|
18
30
|
export declare function packChunkRunsForExport(events: readonly SessionEvent[]): readonly PackedStorageRecord[];
|
|
19
31
|
/** Expand packed export rows back to flat session events (import / round-trip). */
|
|
20
32
|
export declare function expandPackedStorageRecords(records: readonly PackedStorageRecord[]): SessionEvent[];
|
|
21
33
|
export declare function toPackedJSONL(events: readonly SessionEvent[]): string;
|
|
22
34
|
export declare function isTextChunkRow(value: unknown): value is TextChunkRow;
|
|
35
|
+
export declare function isToolCallChunkRow(value: unknown): value is ToolCallChunkRow;
|
|
36
|
+
export declare function isPackedChunkRow(value: unknown): value is TextChunkRow | ToolCallChunkRow;
|
|
23
37
|
export interface ParsePackedJSONLResult {
|
|
24
38
|
readonly records: PackedStorageRecord[];
|
|
25
39
|
/** Last non-empty line was not valid JSON or storage record. */
|
|
26
40
|
readonly droppedTrailingIncomplete: boolean;
|
|
27
41
|
}
|
|
28
|
-
/** Parse export JSONL that may contain
|
|
42
|
+
/** Parse export JSONL that may contain packed chunk storage rows. */
|
|
29
43
|
export declare function parsePackedJSONL(text: string): ParsePackedJSONLResult;
|
|
30
44
|
/** Expand packed export JSONL to flat session events. */
|
|
31
45
|
export declare function fromPackedJSONL(text: string): SessionEvent[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-pack.d.ts","sourceRoot":"","sources":["../src/chunk-pack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"chunk-pack.d.ts","sourceRoot":"","sources":["../src/chunk-pack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGtD,+EAA+E;AAC/E,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED,iEAAiE;AACjE,MAAM,WA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,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAwCrE;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAE5D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAE/D"}
|
|
@@ -2,45 +2,78 @@ import { zstdCompressSync, zstdDecompressSync } from "node:zlib";
|
|
|
2
2
|
import { assertSessionEvent } from "@xrkseek/protocol";
|
|
3
3
|
const MIN_RUN = 3;
|
|
4
4
|
function isTextDelta(ev) {
|
|
5
|
-
return ev.kind !== "usage";
|
|
5
|
+
return ev.kind !== "usage" && ev.kind !== "tool-call";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function isToolCallDelta(ev) {
|
|
8
|
+
return ev.kind === "tool-call" && typeof ev.toolCallId === "string";
|
|
9
|
+
}
|
|
10
|
+
function textKey(ev) {
|
|
8
11
|
const kind = ev.kind ?? "text";
|
|
9
12
|
const index = ev.index ?? 0;
|
|
10
13
|
return `${ev.turnId}\0${ev.stepId}\0${kind}\0${index}`;
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
15
|
+
function toolKey(ev) {
|
|
16
|
+
const index = ev.index ?? 0;
|
|
17
|
+
const name = ev.toolName ?? "";
|
|
18
|
+
return `${ev.turnId}\0${ev.stepId}\0${index}\0${ev.toolCallId}\0${name}`;
|
|
19
|
+
}
|
|
20
|
+
function continuesText(prev, next) {
|
|
21
|
+
return textKey(prev) === textKey(next);
|
|
22
|
+
}
|
|
23
|
+
function continuesTool(prev, next) {
|
|
24
|
+
return toolKey(prev) === toolKey(next);
|
|
14
25
|
}
|
|
15
|
-
function
|
|
26
|
+
function buildTextRow(run) {
|
|
16
27
|
const first = run[0];
|
|
17
28
|
const kind = first.kind ?? "text";
|
|
18
29
|
return {
|
|
19
30
|
type: "text-chunks",
|
|
20
31
|
turnId: first.turnId,
|
|
21
32
|
stepId: first.stepId,
|
|
22
|
-
kind,
|
|
33
|
+
kind: kind === "reasoning" ? "reasoning" : "text",
|
|
23
34
|
index: first.index ?? 0,
|
|
24
35
|
ts0: first.ts,
|
|
25
36
|
dts: run.slice(1).map((ev, i) => ev.ts - run[i].ts),
|
|
26
37
|
texts: run.map((ev) => ev.text),
|
|
27
38
|
};
|
|
28
39
|
}
|
|
40
|
+
function buildToolRow(run) {
|
|
41
|
+
const first = run[0];
|
|
42
|
+
return {
|
|
43
|
+
type: "tool-call-chunks",
|
|
44
|
+
turnId: first.turnId,
|
|
45
|
+
stepId: first.stepId,
|
|
46
|
+
index: first.index ?? 0,
|
|
47
|
+
toolCallId: first.toolCallId,
|
|
48
|
+
...(first.toolName ? { toolName: first.toolName } : {}),
|
|
49
|
+
ts0: first.ts,
|
|
50
|
+
dts: run.slice(1).map((ev, i) => ev.ts - run[i].ts),
|
|
51
|
+
args: run.map((ev) => ev.argumentsDelta ?? ev.text),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
29
54
|
/**
|
|
30
|
-
* Collapse runs of consecutive same-block `assistant/chunk` deltas for export
|
|
31
|
-
* Live session log stays one event per row
|
|
55
|
+
* Collapse runs of consecutive same-block `assistant/chunk` deltas for export /
|
|
56
|
+
* SQLite flush. Live session log stays one event per row.
|
|
32
57
|
*/
|
|
33
58
|
export function packChunkRunsForExport(events) {
|
|
34
59
|
const out = [];
|
|
35
|
-
let run
|
|
60
|
+
let run;
|
|
36
61
|
const flush = () => {
|
|
37
|
-
if (run
|
|
38
|
-
|
|
62
|
+
if (!run)
|
|
63
|
+
return;
|
|
64
|
+
if (run.kind === "text") {
|
|
65
|
+
if (run.events.length >= MIN_RUN)
|
|
66
|
+
out.push(buildTextRow(run.events));
|
|
67
|
+
else
|
|
68
|
+
out.push(...run.events);
|
|
69
|
+
}
|
|
70
|
+
else if (run.events.length >= MIN_RUN) {
|
|
71
|
+
out.push(buildToolRow(run.events));
|
|
39
72
|
}
|
|
40
73
|
else {
|
|
41
|
-
out.push(...run);
|
|
74
|
+
out.push(...run.events);
|
|
42
75
|
}
|
|
43
|
-
run =
|
|
76
|
+
run = undefined;
|
|
44
77
|
};
|
|
45
78
|
for (const event of events) {
|
|
46
79
|
if (event.type !== "assistant/chunk") {
|
|
@@ -48,18 +81,28 @@ export function packChunkRunsForExport(events) {
|
|
|
48
81
|
out.push(event);
|
|
49
82
|
continue;
|
|
50
83
|
}
|
|
84
|
+
if (isToolCallDelta(event)) {
|
|
85
|
+
if (run?.kind === "tool" &&
|
|
86
|
+
continuesTool(run.events[run.events.length - 1], event)) {
|
|
87
|
+
run.events.push(event);
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
flush();
|
|
91
|
+
run = { kind: "tool", events: [event] };
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
51
94
|
if (!isTextDelta(event)) {
|
|
52
95
|
flush();
|
|
53
96
|
out.push(event);
|
|
54
97
|
continue;
|
|
55
98
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
run.push(event);
|
|
99
|
+
if (run?.kind === "text" &&
|
|
100
|
+
continuesText(run.events[run.events.length - 1], event)) {
|
|
101
|
+
run.events.push(event);
|
|
59
102
|
continue;
|
|
60
103
|
}
|
|
61
104
|
flush();
|
|
62
|
-
run = [event];
|
|
105
|
+
run = { kind: "text", events: [event] };
|
|
63
106
|
}
|
|
64
107
|
flush();
|
|
65
108
|
return out;
|
|
@@ -68,24 +111,45 @@ export function packChunkRunsForExport(events) {
|
|
|
68
111
|
export function expandPackedStorageRecords(records) {
|
|
69
112
|
const out = [];
|
|
70
113
|
for (const record of records) {
|
|
71
|
-
if (record.type
|
|
72
|
-
|
|
114
|
+
if (record.type === "text-chunks") {
|
|
115
|
+
let ts = record.ts0;
|
|
116
|
+
for (let i = 0; i < record.texts.length; i++) {
|
|
117
|
+
if (i > 0)
|
|
118
|
+
ts += record.dts[i - 1];
|
|
119
|
+
out.push({
|
|
120
|
+
type: "assistant/chunk",
|
|
121
|
+
ts,
|
|
122
|
+
turnId: record.turnId,
|
|
123
|
+
stepId: record.stepId,
|
|
124
|
+
text: record.texts[i],
|
|
125
|
+
kind: record.kind,
|
|
126
|
+
index: record.index,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
73
129
|
continue;
|
|
74
130
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
131
|
+
if (record.type === "tool-call-chunks") {
|
|
132
|
+
let ts = record.ts0;
|
|
133
|
+
for (let i = 0; i < record.args.length; i++) {
|
|
134
|
+
if (i > 0)
|
|
135
|
+
ts += record.dts[i - 1];
|
|
136
|
+
const delta = record.args[i];
|
|
137
|
+
out.push({
|
|
138
|
+
type: "assistant/chunk",
|
|
139
|
+
ts,
|
|
140
|
+
turnId: record.turnId,
|
|
141
|
+
stepId: record.stepId,
|
|
142
|
+
text: delta,
|
|
143
|
+
kind: "tool-call",
|
|
144
|
+
index: record.index,
|
|
145
|
+
toolCallId: record.toolCallId,
|
|
146
|
+
...(record.toolName ? { toolName: record.toolName } : {}),
|
|
147
|
+
argumentsDelta: delta,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
continue;
|
|
88
151
|
}
|
|
152
|
+
out.push(record);
|
|
89
153
|
}
|
|
90
154
|
return out;
|
|
91
155
|
}
|
|
@@ -106,7 +170,23 @@ export function isTextChunkRow(value) {
|
|
|
106
170
|
Array.isArray(v.dts) &&
|
|
107
171
|
Array.isArray(v.texts));
|
|
108
172
|
}
|
|
109
|
-
|
|
173
|
+
export function isToolCallChunkRow(value) {
|
|
174
|
+
if (!value || typeof value !== "object")
|
|
175
|
+
return false;
|
|
176
|
+
const v = value;
|
|
177
|
+
return (v.type === "tool-call-chunks" &&
|
|
178
|
+
typeof v.turnId === "string" &&
|
|
179
|
+
typeof v.stepId === "string" &&
|
|
180
|
+
typeof v.index === "number" &&
|
|
181
|
+
typeof v.toolCallId === "string" &&
|
|
182
|
+
typeof v.ts0 === "number" &&
|
|
183
|
+
Array.isArray(v.dts) &&
|
|
184
|
+
Array.isArray(v.args));
|
|
185
|
+
}
|
|
186
|
+
export function isPackedChunkRow(value) {
|
|
187
|
+
return isTextChunkRow(value) || isToolCallChunkRow(value);
|
|
188
|
+
}
|
|
189
|
+
/** Parse export JSONL that may contain packed chunk storage rows. */
|
|
110
190
|
export function parsePackedJSONL(text) {
|
|
111
191
|
const rawLines = text.split(/\r?\n/);
|
|
112
192
|
const nonempty = [];
|
|
@@ -133,7 +213,7 @@ export function parsePackedJSONL(text) {
|
|
|
133
213
|
cause: err,
|
|
134
214
|
});
|
|
135
215
|
}
|
|
136
|
-
if (
|
|
216
|
+
if (isPackedChunkRow(raw)) {
|
|
137
217
|
records.push(raw);
|
|
138
218
|
continue;
|
|
139
219
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunk-pack.js","sourceRoot":"","sources":["../src/chunk-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"chunk-pack.js","sourceRoot":"","sources":["../src/chunk-pack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAgCvD,MAAM,OAAO,GAAG,CAAC,CAAC;AAWlB,SAAS,WAAW,CAAC,EAAc;IACjC,OAAO,EAAE,CAAC,IA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