dal-code 1.0.24 → 1.0.26
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 +42 -0
- package/NOTICE +7 -0
- package/dal-docs/README.md +109 -0
- package/dal-docs/extensions.md +98 -0
- package/dal-docs/keybindings.md +40 -0
- package/dal-docs/packages.md +62 -0
- package/dal-docs/prompt-templates.md +42 -0
- package/dal-docs/settings.md +86 -0
- package/dal-docs/skills.md +65 -0
- package/dal-docs/themes.md +44 -0
- package/dist/cli/args.d.ts +59 -0
- package/dist/cli/args.js +14 -14
- package/dist/config.d.ts +63 -0
- package/dist/config.js +1 -1
- package/dist/core/agent-session-runtime.d.ts +74 -0
- package/dist/core/agent-session-services.d.ts +50 -0
- package/dist/core/agent-session-services.js +1 -1
- package/dist/core/agent-session.d.ts +422 -0
- package/dist/core/agent-session.js +8 -7
- package/dist/core/auth-storage.d.ts +56 -0
- package/dist/core/background-processes.d.ts +73 -0
- package/dist/core/background-processes.js +7 -0
- package/dist/core/bash-executor.d.ts +13 -0
- package/dist/core/cache-warmer.d.ts +60 -0
- package/dist/core/compaction/branch-summarization.d.ts +43 -0
- package/dist/core/compaction/compaction.d.ts +62 -0
- package/dist/core/compaction/index.d.ts +3 -0
- package/dist/core/compaction/utils.d.ts +16 -0
- package/dist/core/diagnostics.d.ts +14 -0
- package/dist/core/event-bus.d.ts +8 -0
- package/dist/core/exec.d.ts +12 -0
- package/dist/core/extensions/index.d.ts +8 -0
- package/dist/core/extensions/loader.d.ts +13 -0
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/permission-surface.js +1 -1
- package/dist/core/extensions/runner.d.ts +165 -0
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/types.d.ts +1003 -0
- package/dist/core/extensions/wrapper.d.ts +5 -0
- package/dist/core/footer-data-provider.d.ts +46 -0
- package/dist/core/host-capabilities.d.ts +50 -0
- package/dist/core/host-capabilities.js +2 -0
- package/dist/core/keybindings.d.ts +525 -0
- package/dist/core/messages.d.ts +50 -0
- package/dist/core/model-config.d.ts +1212 -0
- package/dist/core/model-registry.d.ts +41 -0
- package/dist/core/model-resolver.d.ts +67 -0
- package/dist/core/model-resolver.js +1 -1
- package/dist/core/model-runtime.d.ts +101 -0
- package/dist/core/model-runtime.js +2 -2
- package/dist/core/package-manager.d.ts +213 -0
- package/dist/core/package-manager.js +2 -2
- package/dist/core/permissions/rules.d.ts +45 -0
- package/dist/core/permissions/rules.js +1 -0
- package/dist/core/permissions/shell-words.js +2 -0
- package/dist/core/permissions/tool-policy.d.ts +46 -0
- package/dist/core/permissions/tool-policy.js +1 -0
- package/dist/core/project-map.d.ts +18 -0
- package/dist/core/prompt-templates.d.ts +24 -0
- package/dist/core/provider-composer.d.ts +55 -0
- package/dist/core/remote-catalog-provider.js +1 -1
- package/dist/core/resolve-config-value.d.ts +11 -0
- package/dist/core/resource-loader.d.ts +220 -0
- package/dist/core/resource-loader.js +1 -1
- package/dist/core/sandbox/availability.d.ts +9 -0
- package/dist/core/sandbox/availability.js +1 -0
- package/dist/core/sandbox/denial.d.ts +25 -0
- package/dist/core/sandbox/denial.js +3 -0
- package/dist/core/sandbox/index.d.ts +5 -0
- package/dist/core/sandbox/index.js +1 -0
- package/dist/core/sandbox/policy.d.ts +66 -0
- package/dist/core/sandbox/policy.js +1 -0
- package/dist/core/sandbox/runtime.d.ts +31 -0
- package/dist/core/sandbox/runtime.js +1 -0
- package/dist/core/sandbox/shell-sandbox.d.ts +119 -0
- package/dist/core/sandbox/shell-sandbox.js +5 -0
- package/dist/core/sdk.d.ts +43 -0
- package/dist/core/sdk.js +1 -1
- package/dist/core/session-manager.d.ts +208 -0
- package/dist/core/settings-manager.d.ts +368 -0
- package/dist/core/settings-manager.js +1 -1
- package/dist/core/skills.d.ts +33 -0
- package/dist/core/slash-commands.d.ts +14 -0
- package/dist/core/source-info.d.ts +17 -0
- package/dist/core/system-prompt.d.ts +39 -0
- package/dist/core/system-prompt.js +15 -11
- package/dist/core/tools/bash.d.ts +89 -0
- package/dist/core/tools/bash.js +16 -14
- package/dist/core/tools/edit-diff.d.ts +44 -0
- package/dist/core/tools/edit.d.ts +48 -0
- package/dist/core/tools/file-mutation-queue.d.ts +1 -0
- package/dist/core/tools/find.d.ts +34 -0
- package/dist/core/tools/find.js +11 -11
- package/dist/core/tools/grep.d.ts +34 -0
- package/dist/core/tools/grep.js +10 -10
- package/dist/core/tools/index.d.ts +43 -0
- package/dist/core/tools/index.js +1 -1
- package/dist/core/tools/ls.d.ts +33 -0
- package/dist/core/tools/ls.js +6 -6
- package/dist/core/tools/powershell.d.ts +17 -0
- package/dist/core/tools/powershell.js +2 -2
- package/dist/core/tools/process.d.ts +26 -0
- package/dist/core/tools/process.js +22 -0
- package/dist/core/tools/read.d.ts +33 -0
- package/dist/core/tools/read.js +15 -15
- package/dist/core/tools/renderers/bash.d.ts +3 -0
- package/dist/core/tools/renderers/edit.d.ts +15 -0
- package/dist/core/tools/renderers/find.d.ts +2 -0
- package/dist/core/tools/renderers/grep.d.ts +2 -0
- package/dist/core/tools/renderers/index.d.ts +13 -0
- package/dist/core/tools/renderers/ls.d.ts +2 -0
- package/dist/core/tools/renderers/read.d.ts +3 -0
- package/dist/core/tools/renderers/read.js +8 -8
- package/dist/core/tools/renderers/write.d.ts +2 -0
- package/dist/core/tools/truncate.d.ts +27 -0
- package/dist/core/tools/write.d.ts +24 -0
- package/dist/core/trust-manager.d.ts +28 -0
- package/dist/core/trust-manager.js +2 -2
- package/dist/dal/builtins.js +2 -2
- package/dist/dal/child-env.d.ts +12 -0
- package/dist/dal/child-env.js +1 -0
- package/dist/dal/hooks/activity.d.ts +17 -0
- package/dist/dal/hooks/activity.js +1 -0
- package/dist/dal/hooks/config.d.ts +47 -0
- package/dist/dal/hooks/config.js +1 -0
- package/dist/dal/hooks/events.d.ts +43 -0
- package/dist/dal/hooks/events.js +4 -0
- package/dist/dal/hooks/extension.d.ts +3 -0
- package/dist/dal/hooks/extension.js +4 -0
- package/dist/dal/hooks/index.d.ts +5 -0
- package/dist/dal/hooks/index.js +1 -0
- package/dist/dal/hooks/runner.d.ts +57 -0
- package/dist/dal/hooks/runner.js +1 -0
- package/dist/dal/manifest.d.ts +32 -0
- package/dist/dal/manifest.js +1 -0
- package/dist/dal/safety-net.js +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +1 -1
- package/dist/main.d.ts +9 -0
- package/dist/main.js +4 -4
- package/dist/modes/acp/acp-mode.d.ts +2 -0
- package/dist/modes/index.d.ts +7 -0
- package/dist/modes/interactive/components/armin.d.ts +30 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +26 -0
- package/dist/modes/interactive/components/bash-execution.d.ts +22 -0
- package/dist/modes/interactive/components/bordered-loader.d.ts +14 -0
- package/dist/modes/interactive/components/branch-summary-message.d.ts +11 -0
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +11 -0
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +21 -0
- package/dist/modes/interactive/components/custom-message.d.ts +17 -0
- package/dist/modes/interactive/components/daxnuts.d.ts +17 -0
- package/dist/modes/interactive/components/diff.d.ts +4 -0
- package/dist/modes/interactive/components/dynamic-border.d.ts +12 -0
- package/dist/modes/interactive/components/extension-editor.d.ts +19 -0
- package/dist/modes/interactive/components/extension-input.d.ts +21 -0
- package/dist/modes/interactive/components/extension-selector.d.ts +22 -0
- package/dist/modes/interactive/components/first-time-setup.d.ts +23 -0
- package/dist/modes/interactive/components/footer.d.ts +18 -0
- package/dist/modes/interactive/components/footer.js +1 -1
- package/dist/modes/interactive/components/index.d.ts +33 -0
- package/dist/modes/interactive/components/keybinding-hints.d.ts +9 -0
- package/dist/modes/interactive/components/login-dialog.d.ts +27 -0
- package/dist/modes/interactive/components/model-selector.d.ts +81 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts +29 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +39 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +20 -0
- package/dist/modes/interactive/components/session-selector.d.ts +88 -0
- package/dist/modes/interactive/components/settings-selector.d.ts +92 -0
- package/dist/modes/interactive/components/show-images-selector.d.ts +6 -0
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +11 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +44 -0
- package/dist/modes/interactive/components/theme-selector.d.ts +7 -0
- package/dist/modes/interactive/components/thinking-selector.d.ts +19 -0
- package/dist/modes/interactive/components/tool-execution.d.ts +76 -0
- package/dist/modes/interactive/components/tree-selector.d.ts +65 -0
- package/dist/modes/interactive/components/trust-selector.d.ts +22 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts +23 -0
- package/dist/modes/interactive/components/user-message.d.ts +14 -0
- package/dist/modes/interactive/components/visual-truncate.d.ts +5 -0
- package/dist/modes/interactive/interactive-mode.d.ts +326 -0
- package/dist/modes/interactive/theme/theme-json.d.ts +257 -0
- package/dist/modes/interactive/theme/theme.d.ts +106 -0
- package/dist/modes/interactive/tui-renderer.d.ts +18 -0
- package/dist/modes/json-event.d.ts +26 -0
- package/dist/modes/print-mode.d.ts +9 -0
- package/dist/modes/print-mode.js +6 -4
- package/dist/modes/rpc/rpc-client.d.ts +142 -0
- package/dist/modes/rpc/rpc-client.js +4 -1
- package/dist/modes/rpc/rpc-mode.d.ts +3 -0
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +565 -0
- package/dist/node_modules/@dalcode/dal-bridge/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-bridge/src/ask-user.js +12 -0
- package/dist/node_modules/@dalcode/dal-bridge/src/client.js +1 -1
- package/dist/node_modules/@dalcode/dal-bridge/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-gateway/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-gateway/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-guard/package.json +5 -4
- package/dist/node_modules/@dalcode/dal-guard/src/hooks.js +1 -0
- package/dist/node_modules/@dalcode/dal-guard/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-halo/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-interactive/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-interactive/package.json +33 -0
- package/dist/node_modules/@dalcode/dal-interactive/src/handoff.js +28 -0
- package/dist/node_modules/@dalcode/dal-interactive/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-interactive/src/interactive-shell.js +1 -0
- package/dist/node_modules/@dalcode/dal-interactive/src/questionnaire.js +3 -0
- package/dist/node_modules/@dalcode/dal-lang/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-lsp/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-lsp/src/client.js +3 -3
- package/dist/node_modules/@dalcode/dal-mcp/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-mcp/src/command-parser.d.ts +19 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/config-edit.d.ts +19 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/config.d.ts +9 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/http-client.d.ts +16 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.d.ts +22 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.js +2 -2
- package/dist/node_modules/@dalcode/dal-mcp/src/types.d.ts +30 -0
- package/dist/node_modules/@dalcode/dal-office/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-office/src/extract/csv.d.ts +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/extract/csv.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/extract/ooxml.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/index.d.ts +11 -0
- package/dist/node_modules/@dalcode/dal-office/src/index.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/paths.d.ts +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/chart.js +1 -1
- package/dist/node_modules/@dalcode/dal-office/src/render/docx.d.ts +19 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/pptx.d.ts +40 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/pptx.js +2 -2
- package/dist/node_modules/@dalcode/dal-office/src/render/thumbnails.d.ts +19 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/thumbnails.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.d.ts +14 -0
- package/dist/node_modules/@dalcode/dal-office/src/scratchpad.d.ts +16 -0
- package/dist/node_modules/@dalcode/dal-office/src/themes.d.ts +13 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/docx-edit.js +10 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/edit-shared.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/pptx-edit.js +9 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/read-file.js +4 -2
- package/dist/node_modules/@dalcode/dal-office/src/tools/xlsx-edit.js +5 -0
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +2 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +1 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +2 -2
- package/dist/node_modules/@dalcode/dal-plugins/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-review/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-review/package.json +34 -0
- package/dist/node_modules/@dalcode/dal-review/src/args.d.ts +13 -0
- package/dist/node_modules/@dalcode/dal-review/src/args.js +1 -0
- package/dist/node_modules/@dalcode/dal-review/src/core.d.ts +6 -0
- package/dist/node_modules/@dalcode/dal-review/src/core.js +1 -0
- package/dist/node_modules/@dalcode/dal-review/src/findings.d.ts +23 -0
- package/dist/node_modules/@dalcode/dal-review/src/findings.js +4 -0
- package/dist/node_modules/@dalcode/dal-review/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-review/src/prompt.d.ts +3 -0
- package/dist/node_modules/@dalcode/dal-review/src/prompt.js +29 -0
- package/dist/node_modules/@dalcode/dal-review/src/runner.d.ts +91 -0
- package/dist/node_modules/@dalcode/dal-review/src/runner.js +2 -0
- package/dist/node_modules/@dalcode/dal-review/src/targets.d.ts +33 -0
- package/dist/node_modules/@dalcode/dal-review/src/targets.js +17 -0
- package/dist/node_modules/@dalcode/dal-review/src/types.d.ts +94 -0
- package/dist/node_modules/@dalcode/dal-review/src/types.js +1 -0
- package/dist/node_modules/@dalcode/dal-rewind/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-rewind/src/core.d.ts +61 -0
- package/dist/node_modules/@dalcode/dal-router/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-router/src/config.d.ts +50 -0
- package/dist/node_modules/@dalcode/dal-router/src/jev.d.ts +51 -0
- package/dist/node_modules/@dalcode/dal-router/src/pool.d.ts +6 -0
- package/dist/node_modules/@dalcode/dal-router/src/router.d.ts +32 -0
- package/dist/node_modules/@dalcode/dal-router/src/runtime.d.ts +37 -0
- package/dist/node_modules/@dalcode/dal-skills/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-skills/src/discover.js +4 -4
- package/dist/node_modules/@dalcode/dal-skills/src/index.js +9 -9
- package/dist/node_modules/@dalcode/dal-subagent/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-subagent/src/agents.js +2 -2
- package/dist/node_modules/@dalcode/dal-subagent/src/index.js +12 -12
- package/dist/node_modules/@dalcode/dal-subagent/src/process-runner.js +3 -3
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-terminal/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-terminal/package.json +33 -0
- package/dist/node_modules/@dalcode/dal-terminal/src/contract.d.ts +60 -0
- package/dist/node_modules/@dalcode/dal-terminal/src/contract.js +7 -0
- package/dist/node_modules/@dalcode/dal-terminal/src/index.js +6 -0
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/groups.js +1 -1
- package/dist/node_modules/@dalcode/dal-web/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-web/src/config.js +2 -2
- package/dist/node_modules/@dalcode/dal-web/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-web/src/search.js +4 -4
- package/dist/node_modules/@dalcode/dal-workflow/package.json +2 -2
- package/dist/node_modules/@dalcode/dal-workflow/src/index.js +4 -4
- package/dist/node_modules/@dalcode/dal-workflow/src/plan-mode.js +13 -13
- package/dist/node_modules/@dalcode/deepailab/package.json +3 -3
- package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -3
- package/dist/node_modules/@dalcode/deepailab/src/model-defaults.js +1 -1
- package/dist/node_modules/@earendil-works/chord/dist/api.d.ts +21 -0
- package/dist/node_modules/@earendil-works/chord/dist/context/index.d.ts +12 -0
- package/dist/node_modules/@earendil-works/chord/dist/delta/index.d.ts +127 -0
- package/dist/node_modules/@earendil-works/chord/dist/index.d.ts +8 -0
- package/dist/node_modules/@earendil-works/chord/dist/json.d.ts +2 -0
- package/dist/node_modules/@earendil-works/chord/dist/services/errors.d.ts +16 -0
- package/dist/node_modules/@earendil-works/chord/dist/services/provider.d.ts +32 -0
- package/dist/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +12 -0
- package/dist/node_modules/@earendil-works/chord/dist/services/wire.d.ts +59 -0
- package/dist/node_modules/@earendil-works/chord/dist/state/draft.d.ts +13 -0
- package/dist/node_modules/@earendil-works/chord/dist/types.d.ts +188 -0
- package/dist/node_modules/@earendil-works/chord/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts +11 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +80 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +711 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +44 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +80 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts +15 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +6 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +22 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +17 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +34 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +50 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +28 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +132 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +56 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +94 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +99 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +52 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +19 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +13 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +10 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +33 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +37 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +36 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +46 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +6 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +75 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +473 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +94 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +26 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +1495 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +26 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts +18 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.d.ts +5 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +32 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts +10 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +185 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +22 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +22 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +28 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +27 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +61 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +28 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/stream-fn.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +150 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +4 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +18 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +13 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts +18 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts +12 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +24 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts +14 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts +8 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts +15 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +30 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +24 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts +10 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts +85 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/context.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.d.ts +10 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/helpers.d.ts +8 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +20 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +127 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +0 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts +34 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +47 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts +9 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts +9 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +829 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts +13 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.d.ts +37 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/images.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts +38 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.d.ts +25 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/model-catalog.d.ts +16 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models-store.d.ts +21 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts +97 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +84 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts +18 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts +100 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts +7 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +502 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +63 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts +19 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +19 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +16 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.d.ts +6 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/transcript.d.ts +29 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts +5 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-client/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-coding-agent/LICENSE +21 -0
- package/dist/node_modules/@earendil-works/pi-coding-agent/index.d.ts +1 -0
- package/dist/node_modules/@earendil-works/pi-coding-agent/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-coding-agent/package.json +15 -0
- package/dist/node_modules/@earendil-works/pi-protocol/package.json +2 -2
- package/dist/node_modules/@earendil-works/pi-server/package.json +5 -5
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts +200 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts +20 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.d.ts +2 -0
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +55 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +20 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +9 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +151 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +6 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +25 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +43 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +28 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +61 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +10 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +61 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +52 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +50 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +8 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +35 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +15 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +9 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +7 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +17 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +6 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.d.ts +32 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +329 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +101 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/latex.d.ts +4 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +41 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-platform.d.ts +13 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +30 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-colors.d.ts +9 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +82 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +76 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +138 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts +32 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +252 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +38 -0
- package/dist/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/dist/package-manager-cli.js +32 -32
- package/dist/sdk/index.d.ts +18 -0
- package/dist/sdk/index.js +1 -0
- package/dist/sdk/mcp.d.ts +8 -0
- package/dist/sdk/mcp.js +1 -0
- package/dist/sdk/office.d.ts +1 -0
- package/dist/sdk/office.js +1 -0
- package/dist/sdk/review.d.ts +1 -0
- package/dist/sdk/review.js +1 -0
- package/dist/sdk/rewind.d.ts +1 -0
- package/dist/sdk/rewind.js +1 -0
- package/dist/sdk/router.d.ts +6 -0
- package/dist/sdk/router.js +1 -0
- package/dist/sdk/subagents.d.ts +8 -0
- package/dist/sdk/subagents.js +1 -0
- package/dist/utils/clipboard.d.ts +2 -0
- package/dist/utils/frontmatter.d.ts +7 -0
- package/dist/utils/image-convert.d.ts +5 -0
- package/dist/utils/image-resize-core.d.ts +16 -0
- package/dist/utils/image-resize.d.ts +4 -0
- package/dist/utils/mime.d.ts +2 -0
- package/dist/utils/shell.d.ts +20 -0
- package/dist/utils/shell.js +3 -3
- package/dist/utils/version-check.d.ts +20 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/index.ts +6 -0
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +75 -5
- package/package.json +27 -1
- package/dist/bun/register-bedrock.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/session-handle.js +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/state.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/cli.js +0 -16
- package/dist/node_modules/@earendil-works/pi-server/dist/config.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/handler.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/client.js +0 -2
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/protocol.js +0 -2
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/server.js +0 -3
- package/dist/node_modules/@earendil-works/pi-server/dist/protocol.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/radius.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/rpc-process.js +0 -4
- package/dist/node_modules/@earendil-works/pi-server/dist/serve.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/sessions.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/snapshots.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/storage.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/supervisor.js +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/service.js +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/branch-cache.js +0 -7
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/search-backend.js +0 -36
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-entries.js +0 -25
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-tips.js +0 -2
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/entries.js +0 -7
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/facts.js +0 -20
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/lanes.js +0 -26
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/records.js +0 -9
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-sequences.js +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-stats.js +0 -10
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/sessions.js +0 -29
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/writer-leases.js +0 -14
- package/dist/server/create-harness.js +0 -1
- package/dist/utils/clipboard-native.js +0 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Static, Type } from "typebox";
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import type { AgentHarnessTool, ShellOutputTruncation } from "../types.ts";
|
|
4
|
+
import type { ExecutionToolContext } from "./tool-context.ts";
|
|
5
|
+
declare const bashSchema: Type.TObject<{
|
|
6
|
+
command: Type.TString;
|
|
7
|
+
timeout: Type.TOptional<Type.TNumber>;
|
|
8
|
+
}>;
|
|
9
|
+
export type BashToolInput = Static<typeof bashSchema>;
|
|
10
|
+
export interface BashToolDetails {
|
|
11
|
+
truncation?: ShellOutputTruncation;
|
|
12
|
+
fullOutputPath?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BashExecution {
|
|
15
|
+
command: string;
|
|
16
|
+
cwd: string;
|
|
17
|
+
env: Record<string, string>;
|
|
18
|
+
inheritEnv: boolean;
|
|
19
|
+
}
|
|
20
|
+
export type BashPrepare<TContext extends ExecutionToolContext = ExecutionToolContext> = (execution: BashExecution, toolContext: TContext, context: Context) => void | Promise<void>;
|
|
21
|
+
export interface BashToolOptions<TContext extends ExecutionToolContext = ExecutionToolContext> {
|
|
22
|
+
commandPrefix?: string;
|
|
23
|
+
prepare?: BashPrepare<TContext>;
|
|
24
|
+
}
|
|
25
|
+
export declare function createBashTool<TContext extends ExecutionToolContext = ExecutionToolContext>(options?: BashToolOptions<TContext>): AgentHarnessTool<TContext, typeof bashSchema, BashToolDetails | undefined>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Static, Type } from "typebox";
|
|
2
|
+
import type { AgentHarnessTool } from "../types.ts";
|
|
3
|
+
import type { ExecutionToolContext } from "./tool-context.ts";
|
|
4
|
+
declare const editSchema: Type.TObject<{
|
|
5
|
+
path: Type.TString;
|
|
6
|
+
edits: Type.TArray<Type.TObject<{
|
|
7
|
+
oldText: Type.TString;
|
|
8
|
+
newText: Type.TString;
|
|
9
|
+
}>>;
|
|
10
|
+
}>;
|
|
11
|
+
export type EditToolInput = Static<typeof editSchema>;
|
|
12
|
+
export interface EditToolDetails {
|
|
13
|
+
diff: string;
|
|
14
|
+
patch: string;
|
|
15
|
+
firstChangedLine?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function createEditTool<TContext extends ExecutionToolContext = ExecutionToolContext>(): AgentHarnessTool<TContext, typeof editSchema, EditToolDetails | undefined>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { type BashExecution, type BashPrepare, type BashToolDetails, type BashToolInput, type BashToolOptions, createBashTool, } from "./bash.ts";
|
|
2
|
+
export { createEditTool, type EditToolDetails, type EditToolInput, } from "./edit.ts";
|
|
3
|
+
export { createReadTool, type ReadImageProcessor, type ReadImageProcessorResult, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, } from "./read.ts";
|
|
4
|
+
export type { ExecutionToolContext } from "./tool-context.ts";
|
|
5
|
+
export { createWriteTool, type WriteToolInput } from "./write.ts";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type Static, Type } from "typebox";
|
|
2
|
+
import type { Context } from "../context.ts";
|
|
3
|
+
import type { AgentHarnessTool } from "../types.ts";
|
|
4
|
+
import { type TruncationResult } from "../utils/truncate.ts";
|
|
5
|
+
import type { ExecutionToolContext } from "./tool-context.ts";
|
|
6
|
+
declare const readSchema: Type.TObject<{
|
|
7
|
+
path: Type.TString;
|
|
8
|
+
offset: Type.TOptional<Type.TNumber>;
|
|
9
|
+
limit: Type.TOptional<Type.TNumber>;
|
|
10
|
+
}>;
|
|
11
|
+
export type ReadToolInput = Static<typeof readSchema>;
|
|
12
|
+
export interface ReadToolDetails {
|
|
13
|
+
truncation?: TruncationResult;
|
|
14
|
+
}
|
|
15
|
+
export type ReadImageProcessorResult = {
|
|
16
|
+
ok: true;
|
|
17
|
+
data: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
hints: string[];
|
|
20
|
+
} | {
|
|
21
|
+
ok: false;
|
|
22
|
+
message: string;
|
|
23
|
+
};
|
|
24
|
+
export type ReadImageProcessor = (bytes: Uint8Array, mimeType: string, options: {
|
|
25
|
+
autoResizeImages: boolean;
|
|
26
|
+
}, context: Context) => Promise<ReadImageProcessorResult>;
|
|
27
|
+
export interface ReadToolOptions {
|
|
28
|
+
autoResizeImages?: boolean;
|
|
29
|
+
imageProcessor?: ReadImageProcessor;
|
|
30
|
+
}
|
|
31
|
+
export declare function createReadTool<TContext extends ExecutionToolContext = ExecutionToolContext>(options?: ReadToolOptions): AgentHarnessTool<TContext, typeof readSchema, ReadToolDetails | undefined>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Static, Type } from "typebox";
|
|
2
|
+
import type { AgentHarnessTool } from "../types.ts";
|
|
3
|
+
import type { ExecutionToolContext } from "./tool-context.ts";
|
|
4
|
+
declare const writeSchema: Type.TObject<{
|
|
5
|
+
path: Type.TString;
|
|
6
|
+
content: Type.TString;
|
|
7
|
+
}>;
|
|
8
|
+
export type WriteToolInput = Static<typeof writeSchema>;
|
|
9
|
+
export declare function createWriteTool<TContext extends ExecutionToolContext = ExecutionToolContext>(): AgentHarnessTool<TContext, typeof writeSchema, undefined>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { SimpleStreamOptions, Transport } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { Static, TSchema } from "typebox";
|
|
3
|
+
import type { AgentTool, AgentToolResult } from "../types.ts";
|
|
4
|
+
import type { Context } from "./context.ts";
|
|
5
|
+
import type { JsonValue } from "./session/types.ts";
|
|
6
|
+
import type { TruncationResult } from "./utils/truncate.ts";
|
|
7
|
+
export type Result<TValue, TError> = {
|
|
8
|
+
ok: true;
|
|
9
|
+
value: TValue;
|
|
10
|
+
} | {
|
|
11
|
+
ok: false;
|
|
12
|
+
error: TError;
|
|
13
|
+
};
|
|
14
|
+
export declare function ok<TValue, TError>(value: TValue): Result<TValue, TError>;
|
|
15
|
+
export declare function err<TValue, TError>(error: TError): Result<TValue, TError>;
|
|
16
|
+
export declare function getOrThrow<TValue, TError>(result: Result<TValue, TError>): TValue;
|
|
17
|
+
export declare function getOrUndefined<TValue extends object, TError>(result: Result<TValue, TError>): TValue | undefined;
|
|
18
|
+
export declare function toError(error: unknown): Error;
|
|
19
|
+
export interface Skill {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
content: string;
|
|
23
|
+
filePath: string;
|
|
24
|
+
disableModelInvocation?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface PromptTemplate {
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
content: string;
|
|
30
|
+
}
|
|
31
|
+
export interface AgentHarnessResources<TSkill extends Skill = Skill, TPromptTemplate extends PromptTemplate = PromptTemplate> {
|
|
32
|
+
promptTemplates?: TPromptTemplate[];
|
|
33
|
+
skills?: TSkill[];
|
|
34
|
+
}
|
|
35
|
+
export interface AgentHarnessToolUpdateOptions {
|
|
36
|
+
checkpoint?: true;
|
|
37
|
+
}
|
|
38
|
+
export type AgentHarnessToolUpdateCallback<TDetails> = (partialResult: AgentToolResult<TDetails>, options?: AgentHarnessToolUpdateOptions) => void;
|
|
39
|
+
export interface AgentHarnessToolInvocation {
|
|
40
|
+
readonly invocationId: string;
|
|
41
|
+
readonly operationId: string;
|
|
42
|
+
readonly turnId: string;
|
|
43
|
+
getMemo(name: string): Promise<JsonValue | undefined>;
|
|
44
|
+
setMemo(name: string, value: JsonValue | undefined): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
export type AgentHarnessTool<TContext extends object | undefined, TParameters extends TSchema = TSchema, TDetails = unknown> = Omit<AgentTool<TParameters, TDetails>, "execute"> & {
|
|
47
|
+
execute(toolCallId: string, params: Static<TParameters>, onUpdate: AgentHarnessToolUpdateCallback<TDetails>, toolContext: TContext, invocation: AgentHarnessToolInvocation, context: Context): Promise<AgentToolResult<TDetails>>;
|
|
48
|
+
};
|
|
49
|
+
export type AgentHarnessToolContextSource<TContext extends object | undefined> = TContext | ((context: Context) => TContext | Promise<TContext>);
|
|
50
|
+
export interface AgentHarnessStreamOptions {
|
|
51
|
+
transport?: Transport;
|
|
52
|
+
timeoutMs?: number;
|
|
53
|
+
maxRetries?: number;
|
|
54
|
+
maxRetryDelayMs?: number;
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
metadata?: SimpleStreamOptions["metadata"];
|
|
57
|
+
cacheRetention?: SimpleStreamOptions["cacheRetention"];
|
|
58
|
+
deferred?: boolean | {
|
|
59
|
+
window?: "15m" | "1h" | "24h";
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export interface AgentHarnessStreamOptionsPatch extends Omit<Partial<AgentHarnessStreamOptions>, "headers" | "metadata"> {
|
|
63
|
+
headers?: Record<string, string | undefined>;
|
|
64
|
+
metadata?: Record<string, unknown | undefined>;
|
|
65
|
+
}
|
|
66
|
+
export type FileKind = "file" | "directory" | "symlink";
|
|
67
|
+
export type FileErrorCode = "aborted" | "not_found" | "permission_denied" | "not_directory" | "is_directory" | "invalid" | "not_supported" | "unknown";
|
|
68
|
+
export declare class FileError extends Error {
|
|
69
|
+
code: FileErrorCode;
|
|
70
|
+
path?: string;
|
|
71
|
+
constructor(code: FileErrorCode, message: string, path?: string, cause?: Error);
|
|
72
|
+
}
|
|
73
|
+
export type ExecutionErrorCode = "aborted" | "timeout" | "shell_unavailable" | "spawn_error" | "callback_error" | "unknown";
|
|
74
|
+
export declare class ExecutionError extends Error {
|
|
75
|
+
code: ExecutionErrorCode;
|
|
76
|
+
constructor(code: ExecutionErrorCode, message: string, cause?: Error);
|
|
77
|
+
}
|
|
78
|
+
export type CompactionErrorCode = "aborted" | "summarization_failed";
|
|
79
|
+
export declare class CompactionError extends Error {
|
|
80
|
+
code: CompactionErrorCode;
|
|
81
|
+
constructor(code: CompactionErrorCode, message: string, cause?: Error);
|
|
82
|
+
}
|
|
83
|
+
export type BranchSummaryErrorCode = "aborted" | "summarization_failed";
|
|
84
|
+
export declare class BranchSummaryError extends Error {
|
|
85
|
+
code: BranchSummaryErrorCode;
|
|
86
|
+
constructor(code: BranchSummaryErrorCode, message: string, cause?: Error);
|
|
87
|
+
}
|
|
88
|
+
export interface FileInfo {
|
|
89
|
+
name: string;
|
|
90
|
+
path: string;
|
|
91
|
+
kind: FileKind;
|
|
92
|
+
size: number;
|
|
93
|
+
mtimeMs: number;
|
|
94
|
+
}
|
|
95
|
+
export interface TextLine {
|
|
96
|
+
text: string;
|
|
97
|
+
terminated: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface TextLineReader {
|
|
100
|
+
readLine(context: Context): Promise<Result<TextLine | undefined, FileError>>;
|
|
101
|
+
close(context: Context): Promise<void>;
|
|
102
|
+
}
|
|
103
|
+
export interface FileSystem {
|
|
104
|
+
cwd: string;
|
|
105
|
+
absolutePath(path: string, context: Context): Promise<Result<string, FileError>>;
|
|
106
|
+
joinPath(parts: string[], context: Context): Promise<Result<string, FileError>>;
|
|
107
|
+
readTextFile(path: string, context: Context): Promise<Result<string, FileError>>;
|
|
108
|
+
openTextLineReader(path: string, context: Context): Promise<Result<TextLineReader, FileError>>;
|
|
109
|
+
readTextLines(path: string, options: {
|
|
110
|
+
maxLines?: number;
|
|
111
|
+
} | undefined, context: Context): Promise<Result<string[], FileError>>;
|
|
112
|
+
readBinaryFile(path: string, context: Context): Promise<Result<Uint8Array, FileError>>;
|
|
113
|
+
writeFile(path: string, content: string | Uint8Array, context: Context): Promise<Result<void, FileError>>;
|
|
114
|
+
appendFile(path: string, content: string | Uint8Array, context: Context): Promise<Result<void, FileError>>;
|
|
115
|
+
renameFile(sourcePath: string, destinationPath: string, context: Context): Promise<Result<void, FileError>>;
|
|
116
|
+
fileInfo(path: string, context: Context): Promise<Result<FileInfo, FileError>>;
|
|
117
|
+
listDir(path: string, context: Context): Promise<Result<FileInfo[], FileError>>;
|
|
118
|
+
canonicalPath(path: string, context: Context): Promise<Result<string, FileError>>;
|
|
119
|
+
exists(path: string, context: Context): Promise<Result<boolean, FileError>>;
|
|
120
|
+
createDir(path: string, options: {
|
|
121
|
+
recursive?: boolean;
|
|
122
|
+
} | undefined, context: Context): Promise<Result<void, FileError>>;
|
|
123
|
+
remove(path: string, options: {
|
|
124
|
+
recursive?: boolean;
|
|
125
|
+
force?: boolean;
|
|
126
|
+
} | undefined, context: Context): Promise<Result<void, FileError>>;
|
|
127
|
+
createTempDir(prefix: string | undefined, context: Context): Promise<Result<string, FileError>>;
|
|
128
|
+
createTempFile(options: {
|
|
129
|
+
prefix?: string;
|
|
130
|
+
suffix?: string;
|
|
131
|
+
} | undefined, context: Context): Promise<Result<string, FileError>>;
|
|
132
|
+
cleanup(context: Context): Promise<void>;
|
|
133
|
+
}
|
|
134
|
+
export type ShellOutputRetention = "head" | "tail";
|
|
135
|
+
export interface ShellOutputLimits {
|
|
136
|
+
maxBytes: number;
|
|
137
|
+
maxLines: number;
|
|
138
|
+
retain?: ShellOutputRetention;
|
|
139
|
+
}
|
|
140
|
+
export interface ShellOutputCaptureOptions {
|
|
141
|
+
limits: ShellOutputLimits;
|
|
142
|
+
spill?: boolean;
|
|
143
|
+
}
|
|
144
|
+
export type ShellOutputTruncation = Omit<TruncationResult, "content">;
|
|
145
|
+
export interface ShellOutputMetadata {
|
|
146
|
+
truncation: ShellOutputTruncation;
|
|
147
|
+
spillPath?: string;
|
|
148
|
+
lastLineBytes?: number;
|
|
149
|
+
}
|
|
150
|
+
export interface ShellOutputView extends ShellOutputMetadata {
|
|
151
|
+
text: string;
|
|
152
|
+
}
|
|
153
|
+
export type ShellOutputUpdate = {
|
|
154
|
+
kind: "replace";
|
|
155
|
+
output: ShellOutputView;
|
|
156
|
+
} | {
|
|
157
|
+
kind: "append";
|
|
158
|
+
text: string;
|
|
159
|
+
metadata: ShellOutputMetadata;
|
|
160
|
+
} | {
|
|
161
|
+
kind: "slide";
|
|
162
|
+
drop: number;
|
|
163
|
+
text: string;
|
|
164
|
+
metadata: ShellOutputMetadata;
|
|
165
|
+
} | {
|
|
166
|
+
kind: "metadata";
|
|
167
|
+
metadata: ShellOutputMetadata;
|
|
168
|
+
};
|
|
169
|
+
export interface ShellExecResult extends ShellOutputMetadata {
|
|
170
|
+
exitCode: number;
|
|
171
|
+
}
|
|
172
|
+
export interface ShellExecOptions {
|
|
173
|
+
cwd?: string;
|
|
174
|
+
env?: Record<string, string>;
|
|
175
|
+
inheritEnv?: boolean;
|
|
176
|
+
timeout?: number;
|
|
177
|
+
capture?: ShellOutputCaptureOptions;
|
|
178
|
+
onUpdate?: (update: ShellOutputUpdate, context: Context) => void;
|
|
179
|
+
}
|
|
180
|
+
export interface Shell {
|
|
181
|
+
exec(command: string, options: ShellExecOptions | undefined, context: Context): Promise<Result<ShellExecResult, ExecutionError>>;
|
|
182
|
+
cleanup(context: Context): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
export interface ExecutionEnv extends FileSystem, Shell {
|
|
185
|
+
}
|
package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import type { ShellOutputCaptureOptions, ShellOutputUpdate, ShellOutputView } from "../types.ts";
|
|
3
|
+
export declare const OUTPUT_MIN_EMIT_INTERVAL_MS = 100;
|
|
4
|
+
export declare const OUTPUT_TARGET_BYTES_PER_SECOND: number;
|
|
5
|
+
interface OutputCaptureHandlers {
|
|
6
|
+
onUpdate?: (update: ShellOutputUpdate, context: Context) => void;
|
|
7
|
+
onError(error: unknown): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class OutputCapture {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(options: ShellOutputCaptureOptions | undefined, context: Context, handlers: OutputCaptureHandlers);
|
|
12
|
+
get truncated(): boolean;
|
|
13
|
+
push(chunk: string | Uint8Array): void;
|
|
14
|
+
finish(): void;
|
|
15
|
+
setSpillPath(path: string): void;
|
|
16
|
+
snapshot(): ShellOutputView;
|
|
17
|
+
flush(): void;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
}
|
|
20
|
+
export declare function applyShellOutputUpdate(current: ShellOutputView | undefined, update: ShellOutputUpdate): ShellOutputView;
|
|
21
|
+
export declare function sanitizeShellOutput(text: string): string;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Context } from "../context.ts";
|
|
2
|
+
import { type ExecutionEnv, type ExecutionError, type Result, type ShellExecOptions } from "../types.ts";
|
|
3
|
+
import { sanitizeShellOutput } from "./output-capture.ts";
|
|
4
|
+
import { type TruncationResult } from "./truncate.ts";
|
|
5
|
+
export interface ShellCaptureProgress {
|
|
6
|
+
output: string;
|
|
7
|
+
truncation: TruncationResult;
|
|
8
|
+
fullOutputPath?: string;
|
|
9
|
+
lastLineBytes: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ShellCaptureOptions extends Omit<ShellExecOptions, "capture" | "onUpdate"> {
|
|
12
|
+
onChunk?: (chunk: string, getProgress: () => ShellCaptureProgress, context: Context) => void;
|
|
13
|
+
returnExecutionErrors?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface ShellCaptureResult extends ShellCaptureProgress {
|
|
16
|
+
exitCode: number | undefined;
|
|
17
|
+
cancelled: boolean;
|
|
18
|
+
truncated: boolean;
|
|
19
|
+
executionError?: ExecutionError;
|
|
20
|
+
}
|
|
21
|
+
export declare function executeShellWithCapture(env: ExecutionEnv, command: string, options: ShellCaptureOptions | undefined, context: Context): Promise<Result<ShellCaptureResult, ExecutionError>>;
|
|
22
|
+
export { sanitizeShellOutput as sanitizeBinaryOutput };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const DEFAULT_MAX_LINES = 2000;
|
|
2
|
+
export declare const DEFAULT_MAX_BYTES: number;
|
|
3
|
+
export declare const GREP_MAX_LINE_LENGTH = 500;
|
|
4
|
+
export interface TruncationResult {
|
|
5
|
+
content: string;
|
|
6
|
+
truncated: boolean;
|
|
7
|
+
truncatedBy: "lines" | "bytes" | null;
|
|
8
|
+
totalLines: number;
|
|
9
|
+
totalBytes: number;
|
|
10
|
+
outputLines: number;
|
|
11
|
+
outputBytes: number;
|
|
12
|
+
lastLinePartial: boolean;
|
|
13
|
+
firstLineExceedsLimit: boolean;
|
|
14
|
+
maxLines: number;
|
|
15
|
+
maxBytes: number;
|
|
16
|
+
}
|
|
17
|
+
export interface TruncationOptions {
|
|
18
|
+
maxLines?: number;
|
|
19
|
+
maxBytes?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function utf8ByteLength(content: string): number;
|
|
22
|
+
export declare function formatSize(bytes: number): string;
|
|
23
|
+
export declare function truncateHead(content: string, options?: TruncationOptions): TruncationResult;
|
|
24
|
+
export declare function truncateTail(content: string, options?: TruncationOptions): TruncationResult;
|
|
25
|
+
export declare function truncateLine(line: string, maxChars?: number): {
|
|
26
|
+
text: string;
|
|
27
|
+
wasTruncated: boolean;
|
|
28
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { uuidv7 } from "@earendil-works/pi-ai";
|
|
2
|
+
export type { AttributeValue, ExactTelemetryAttributes, InferEventAttributes, InferOptionalAttributes, InferRequiredAndOptionalAttributes, InferStartAttributes, RecordedTelemetryEvent, RecordedTelemetrySpan, SchemaTelemetrySpan, SpanAttributes, SpanAttributes as TelemetrySpanAttributes, SpanOptions, SpanStatus, TelemetryAttributeDefinition, TelemetryAttributeMetadata, TelemetryAttributeType, TelemetryContext, TelemetryEventAttributeDefinition, TelemetryEventDefinition, TelemetryParentDefinition, TelemetrySchemaDefinition, TelemetrySchemaSpanEndAttributes, TelemetrySchemaSpanEventAttributes, TelemetrySchemaSpanEventName, TelemetrySchemaSpanName, TelemetrySchemaSpanStartAttributes, TelemetrySchemaSpanUnion, TelemetrySpan, TelemetrySpanDefinition, TelemetryStartAttributeDefinition, TypedSpanStarter, } from "@earendil-works/pi-telemetry";
|
|
3
|
+
export { createTypedSpanStarter, defineTelemetrySchema, InMemoryTelemetryContext, NOOP_TELEMETRY_CONTEXT, } from "@earendil-works/pi-telemetry";
|
|
4
|
+
export * from "./agent.ts";
|
|
5
|
+
export * from "./agent-loop.ts";
|
|
6
|
+
export * from "./harness/agent-harness.ts";
|
|
7
|
+
export { type BranchPreparation, type BranchSummaryDetails, type BranchSummaryResult, type CollectEntriesResult, collectEntriesForBranchSummary, type FileOperations, type GenerateBranchSummaryOptions, generateBranchSummary, prepareBranchEntries, } from "./harness/compaction/branch-summarization.ts";
|
|
8
|
+
export { type CompactionPreparation, type CompactionSettings, type CompactResult, calculateContextTokens, compact, DEFAULT_COMPACTION_SETTINGS, estimateContextTokens, estimateTokens, findCutPoint, findTurnStartIndex, generateSummary, generateSummaryWithUsage, getLastAssistantUsage, prepareCompaction, serializeConversation, shouldCompact, } from "./harness/compaction/compaction.ts";
|
|
9
|
+
export * from "./harness/context.ts";
|
|
10
|
+
export * from "./harness/messages.ts";
|
|
11
|
+
export * from "./harness/prompt-templates.ts";
|
|
12
|
+
export * from "./harness/result.ts";
|
|
13
|
+
export { type LaneSnapshotReduction, reduceLaneSnapshot } from "./harness/runtime/reducer.ts";
|
|
14
|
+
export * from "./harness/session/index.ts";
|
|
15
|
+
export * from "./harness/skills.ts";
|
|
16
|
+
export * from "./harness/system-prompt.ts";
|
|
17
|
+
export type { AiSpan, AiSpanAttributes, AiSpanEndAttributes, AiSpanEventAttributes, AiSpanEventName, AiSpanName, AiSpanStartAttributes, AiTelemetrySpan, HarnessSpan, HarnessSpanAttributes, HarnessSpanEndAttributes, HarnessSpanEventAttributes, HarnessSpanEventName, HarnessSpanName, HarnessSpanStartAttributes, HarnessTelemetrySpan, } from "./harness/telemetry.ts";
|
|
18
|
+
export { AGENT_TELEMETRY_SCHEMAS, AI_TELEMETRY_SCHEMA, HARNESS_TELEMETRY_SCHEMA, startAiSpan, startHarnessSpan, } from "./harness/telemetry.ts";
|
|
19
|
+
export * from "./harness/tools/index.ts";
|
|
20
|
+
export { type AgentHarnessResources, type AgentHarnessStreamOptions, type AgentHarnessStreamOptionsPatch, type AgentHarnessTool, type AgentHarnessToolContextSource, type AgentHarnessToolInvocation, type AgentHarnessToolUpdateCallback, type AgentHarnessToolUpdateOptions, BranchSummaryError, type BranchSummaryErrorCode, CompactionError, type CompactionErrorCode, type ExecutionEnv, ExecutionError, type ExecutionErrorCode, err, FileError, type FileErrorCode, type FileInfo, type FileKind, type FileSystem, getOrThrow, getOrUndefined, ok, type PromptTemplate, type Shell, type ShellExecOptions, type ShellExecResult, type ShellOutputCaptureOptions, type ShellOutputLimits, type ShellOutputMetadata, type ShellOutputRetention, type ShellOutputTruncation, type ShellOutputUpdate, type ShellOutputView, type Skill, toError, } from "./harness/types.ts";
|
|
21
|
+
export { applyShellOutputUpdate } from "./harness/utils/output-capture.ts";
|
|
22
|
+
export * from "./harness/utils/shell-output.ts";
|
|
23
|
+
export * from "./harness/utils/truncate.ts";
|
|
24
|
+
export * from "./proxy.ts";
|
|
25
|
+
export * from "./search/index.ts";
|
|
26
|
+
export { setDefaultStreamFn } from "./stream-fn.ts";
|
|
27
|
+
export * from "./types.ts";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type AssistantMessage, type AssistantMessageEvent, EventStream, type Model, type SimpleStreamOptions, type StopReason, type ToolCall, type TranscriptContext } from "@earendil-works/pi-ai";
|
|
2
|
+
declare class ProxyMessageEventStream extends EventStream<AssistantMessageEvent, AssistantMessage> {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
export type ProxyAssistantMessageEvent = {
|
|
6
|
+
type: "start";
|
|
7
|
+
} | {
|
|
8
|
+
type: "text_start";
|
|
9
|
+
contentIndex: number;
|
|
10
|
+
} | {
|
|
11
|
+
type: "text_delta";
|
|
12
|
+
contentIndex: number;
|
|
13
|
+
delta: string;
|
|
14
|
+
} | {
|
|
15
|
+
type: "text_end";
|
|
16
|
+
contentIndex: number;
|
|
17
|
+
contentSignature?: string;
|
|
18
|
+
} | {
|
|
19
|
+
type: "thinking_start";
|
|
20
|
+
contentIndex: number;
|
|
21
|
+
} | {
|
|
22
|
+
type: "thinking_delta";
|
|
23
|
+
contentIndex: number;
|
|
24
|
+
delta: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: "thinking_end";
|
|
27
|
+
contentIndex: number;
|
|
28
|
+
contentSignature?: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: "toolcall_start";
|
|
31
|
+
contentIndex: number;
|
|
32
|
+
id: string;
|
|
33
|
+
toolName: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: "toolcall_delta";
|
|
36
|
+
contentIndex: number;
|
|
37
|
+
delta: string;
|
|
38
|
+
} | {
|
|
39
|
+
type: "toolcall_end";
|
|
40
|
+
contentIndex: number;
|
|
41
|
+
toolCall: ToolCall;
|
|
42
|
+
} | {
|
|
43
|
+
type: "done";
|
|
44
|
+
reason: Extract<StopReason, "stop" | "length" | "toolUse">;
|
|
45
|
+
usage: AssistantMessage["usage"];
|
|
46
|
+
providerThinkingLevel?: string;
|
|
47
|
+
} | {
|
|
48
|
+
type: "error";
|
|
49
|
+
reason: Extract<StopReason, "aborted" | "error">;
|
|
50
|
+
errorMessage?: string;
|
|
51
|
+
usage: AssistantMessage["usage"];
|
|
52
|
+
providerThinkingLevel?: string;
|
|
53
|
+
};
|
|
54
|
+
type ProxySerializableStreamOptions = Pick<SimpleStreamOptions, "temperature" | "samplingParams" | "maxTokens" | "reasoning" | "cacheRetention" | "sessionId" | "headers" | "metadata" | "transport" | "thinkingBudgets" | "maxRetryDelayMs">;
|
|
55
|
+
export interface ProxyStreamOptions extends ProxySerializableStreamOptions {
|
|
56
|
+
signal?: AbortSignal;
|
|
57
|
+
authToken: string;
|
|
58
|
+
proxyUrl: string;
|
|
59
|
+
}
|
|
60
|
+
export declare function streamProxy(model: Model<any>, context: TranscriptContext, options: ProxyStreamOptions): ProxyMessageEventStream;
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface SearchQuery {
|
|
2
|
+
text: string;
|
|
3
|
+
limit?: number;
|
|
4
|
+
}
|
|
5
|
+
export interface SessionSearchHit {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
score?: number;
|
|
8
|
+
top?: {
|
|
9
|
+
entryId: string;
|
|
10
|
+
snippet?: string;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface EntrySearchHit {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
entryId: string;
|
|
17
|
+
timestamp: number;
|
|
18
|
+
snippet?: string;
|
|
19
|
+
score?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface SessionSearchService {
|
|
22
|
+
searchSessions(query: SearchQuery): Promise<SessionSearchHit[]>;
|
|
23
|
+
searchEntries?(query: SearchQuery): Promise<EntrySearchHit[]>;
|
|
24
|
+
sync(): Promise<void>;
|
|
25
|
+
notify(sessionId: string): void;
|
|
26
|
+
remove(sessionId: string): Promise<void>;
|
|
27
|
+
close(): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { Api, AssistantMessage, AssistantMessageEvent, AssistantMessageEventStream, ImageContent, JsonValue, Message, Model, SimpleStreamOptions, TextContent, Tool, ToolResultMessage, TranscriptContext, Usage } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { Static, TSchema } from "typebox";
|
|
3
|
+
export type StreamFn = (model: Model<Api>, context: TranscriptContext, options?: SimpleStreamOptions) => AssistantMessageEventStream | Promise<AssistantMessageEventStream>;
|
|
4
|
+
export type ToolExecutionMode = "sequential" | "parallel";
|
|
5
|
+
export type QueueMode = "all" | "one-at-a-time";
|
|
6
|
+
export type AgentToolCall = Extract<AssistantMessage["content"][number], {
|
|
7
|
+
type: "toolCall";
|
|
8
|
+
}>;
|
|
9
|
+
export interface BeforeToolCallResult {
|
|
10
|
+
block?: boolean;
|
|
11
|
+
reason?: string;
|
|
12
|
+
terminate?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AfterToolCallResult {
|
|
15
|
+
content?: (TextContent | ImageContent)[];
|
|
16
|
+
details?: unknown;
|
|
17
|
+
isError?: boolean;
|
|
18
|
+
usage?: Usage;
|
|
19
|
+
terminate?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface BeforeToolCallContext {
|
|
22
|
+
assistantMessage: AssistantMessage;
|
|
23
|
+
toolCall: AgentToolCall;
|
|
24
|
+
args: unknown;
|
|
25
|
+
context: AgentContext;
|
|
26
|
+
}
|
|
27
|
+
export interface AfterToolCallContext {
|
|
28
|
+
assistantMessage: AssistantMessage;
|
|
29
|
+
toolCall: AgentToolCall;
|
|
30
|
+
args: unknown;
|
|
31
|
+
result: AgentToolResult<any>;
|
|
32
|
+
isError: boolean;
|
|
33
|
+
context: AgentContext;
|
|
34
|
+
}
|
|
35
|
+
export interface AgentTurnContext {
|
|
36
|
+
message: AssistantMessage;
|
|
37
|
+
toolResults: ToolResultMessage[];
|
|
38
|
+
context: AgentContext;
|
|
39
|
+
newMessages: AgentMessage[];
|
|
40
|
+
}
|
|
41
|
+
export type AgentTurnDecision = {
|
|
42
|
+
action: "continue";
|
|
43
|
+
} | {
|
|
44
|
+
action: "end";
|
|
45
|
+
};
|
|
46
|
+
export type FinishTurn = (turn: AgentTurnContext, signal?: AbortSignal) => AgentTurnDecision | void | Promise<AgentTurnDecision | undefined> | Promise<void>;
|
|
47
|
+
export interface AgentLoopTurnUpdate {
|
|
48
|
+
context?: AgentContext;
|
|
49
|
+
messages?: AgentMessage[];
|
|
50
|
+
model?: Model<any>;
|
|
51
|
+
thinkingLevel?: ThinkingLevel;
|
|
52
|
+
}
|
|
53
|
+
export interface PrepareRequestContext {
|
|
54
|
+
context: AgentContext;
|
|
55
|
+
model: Model<any>;
|
|
56
|
+
thinkingLevel: ThinkingLevel;
|
|
57
|
+
}
|
|
58
|
+
export type AgentRequestUpdate = Omit<AgentLoopTurnUpdate, "messages">;
|
|
59
|
+
export type PrepareRequest = (request: PrepareRequestContext, signal?: AbortSignal) => AgentRequestUpdate | void | Promise<AgentRequestUpdate | undefined> | Promise<void>;
|
|
60
|
+
export interface PrepareNextTurnContext extends AgentTurnContext {
|
|
61
|
+
}
|
|
62
|
+
export interface AgentLoopConfig extends SimpleStreamOptions {
|
|
63
|
+
model: Model<any>;
|
|
64
|
+
convertToLlm: (messages: AgentMessage[]) => Message[] | Promise<Message[]>;
|
|
65
|
+
transformContext?: (messages: AgentMessage[], signal?: AbortSignal) => Promise<AgentMessage[]>;
|
|
66
|
+
getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
|
|
67
|
+
finishTurn?: FinishTurn;
|
|
68
|
+
prepareRequest?: PrepareRequest;
|
|
69
|
+
prepareNextTurn?: (context: PrepareNextTurnContext) => AgentLoopTurnUpdate | undefined | Promise<AgentLoopTurnUpdate | undefined>;
|
|
70
|
+
getSteeringMessages?: () => Promise<AgentMessage[]>;
|
|
71
|
+
getFollowUpMessages?: () => Promise<AgentMessage[]>;
|
|
72
|
+
toolExecution?: ToolExecutionMode;
|
|
73
|
+
beforeToolCall?: (context: BeforeToolCallContext, signal?: AbortSignal) => Promise<BeforeToolCallResult | undefined>;
|
|
74
|
+
afterToolCall?: (context: AfterToolCallContext, signal?: AbortSignal) => Promise<AfterToolCallResult | undefined>;
|
|
75
|
+
}
|
|
76
|
+
export type ThinkingLevel = "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
77
|
+
export interface CustomAgentMessages {
|
|
78
|
+
}
|
|
79
|
+
export type AgentMessage = Message | CustomAgentMessages[keyof CustomAgentMessages];
|
|
80
|
+
export interface AgentState {
|
|
81
|
+
readonly systemPrompt: string;
|
|
82
|
+
model: Model<any>;
|
|
83
|
+
thinkingLevel: ThinkingLevel;
|
|
84
|
+
set tools(tools: AgentTool<any>[]);
|
|
85
|
+
get tools(): AgentTool<any>[];
|
|
86
|
+
set messages(messages: AgentMessage[]);
|
|
87
|
+
get messages(): AgentMessage[];
|
|
88
|
+
readonly isStreaming: boolean;
|
|
89
|
+
readonly streamingMessage?: AgentMessage;
|
|
90
|
+
readonly pendingToolCalls: ReadonlySet<string>;
|
|
91
|
+
readonly errorMessage?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface AgentToolResult<T = JsonValue | undefined> {
|
|
94
|
+
content: (TextContent | ImageContent)[];
|
|
95
|
+
details: T;
|
|
96
|
+
usage?: Usage;
|
|
97
|
+
terminate?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export type AgentToolUpdateCallback<T = any> = (partialResult: AgentToolResult<T>) => void;
|
|
100
|
+
export interface AgentTool<TParameters extends TSchema = TSchema, TDetails = any> extends Tool<TParameters> {
|
|
101
|
+
label: string;
|
|
102
|
+
prepareArguments?: (args: unknown) => Static<TParameters>;
|
|
103
|
+
execute: (toolCallId: string, params: Static<TParameters>, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<TDetails>) => Promise<AgentToolResult<TDetails>>;
|
|
104
|
+
replay?: "never" | "safe";
|
|
105
|
+
executionMode?: ToolExecutionMode;
|
|
106
|
+
executionModeFor?: (args: unknown) => ToolExecutionMode | undefined;
|
|
107
|
+
}
|
|
108
|
+
export interface AgentContext {
|
|
109
|
+
messages: AgentMessage[];
|
|
110
|
+
tools?: AgentTool<any>[];
|
|
111
|
+
}
|
|
112
|
+
export type AgentEvent = {
|
|
113
|
+
type: "agent_start";
|
|
114
|
+
} | {
|
|
115
|
+
type: "agent_end";
|
|
116
|
+
messages: AgentMessage[];
|
|
117
|
+
} | {
|
|
118
|
+
type: "turn_start";
|
|
119
|
+
} | {
|
|
120
|
+
type: "turn_end";
|
|
121
|
+
message: AgentMessage;
|
|
122
|
+
toolResults: ToolResultMessage[];
|
|
123
|
+
} | {
|
|
124
|
+
type: "message_start";
|
|
125
|
+
message: AgentMessage;
|
|
126
|
+
} | {
|
|
127
|
+
type: "message_update";
|
|
128
|
+
message: AgentMessage;
|
|
129
|
+
assistantMessageEvent: AssistantMessageEvent;
|
|
130
|
+
} | {
|
|
131
|
+
type: "message_end";
|
|
132
|
+
message: AgentMessage;
|
|
133
|
+
} | {
|
|
134
|
+
type: "tool_execution_start";
|
|
135
|
+
toolCallId: string;
|
|
136
|
+
toolName: string;
|
|
137
|
+
args: any;
|
|
138
|
+
} | {
|
|
139
|
+
type: "tool_execution_update";
|
|
140
|
+
toolCallId: string;
|
|
141
|
+
toolName: string;
|
|
142
|
+
args: any;
|
|
143
|
+
partialResult: any;
|
|
144
|
+
} | {
|
|
145
|
+
type: "tool_execution_end";
|
|
146
|
+
toolCallId: string;
|
|
147
|
+
toolName: string;
|
|
148
|
+
result: any;
|
|
149
|
+
isError: boolean;
|
|
150
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-agent-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.26",
|
|
4
4
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"README.md"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@earendil-works/chord": "^1.0.
|
|
49
|
-
"@earendil-works/pi-ai": "^1.0.
|
|
50
|
-
"@earendil-works/pi-telemetry": "^1.0.
|
|
48
|
+
"@earendil-works/chord": "^1.0.26",
|
|
49
|
+
"@earendil-works/pi-ai": "^1.0.26",
|
|
50
|
+
"@earendil-works/pi-telemetry": "^1.0.26",
|
|
51
51
|
"diff": "8.0.4",
|
|
52
52
|
"ignore": "7.0.8",
|
|
53
53
|
"typebox": "1.3.27",
|