dal-code 1.0.14 → 1.0.17
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 +39 -0
- package/dist/bun/cli.js +1 -4
- package/dist/bun/restore-sandbox-env.js +1 -36
- package/dist/bun/runtime-setup.js +1 -9
- package/dist/bun/sandbox-env-setup.js +1 -4
- package/dist/cli/args.js +50 -299
- package/dist/cli/auth-check.js +1 -50
- package/dist/cli/auth-command.js +2 -99
- package/dist/cli/config-selector.js +1 -32
- package/dist/cli/credential-print.js +1 -76
- package/dist/cli/file-processor.js +8 -71
- package/dist/cli/initial-message.js +1 -22
- package/dist/cli/list-models.js +2 -98
- package/dist/cli/project-trust.js +2 -49
- package/dist/cli/session-picker.js +1 -36
- package/dist/cli/setup.js +1 -12
- package/dist/cli/startup-ui.js +1 -185
- package/dist/cli.js +1 -5
- package/dist/config.js +1 -504
- package/dist/core/agent-session-runtime.js +1 -317
- package/dist/core/agent-session-services.js +1 -134
- package/dist/core/agent-session.js +14 -2894
- package/dist/core/auth-guidance.js +5 -27
- package/dist/core/auth-storage.js +1 -426
- package/dist/core/bash-executor.js +1 -111
- package/dist/core/bug-report-upload.js +1 -0
- package/dist/core/bug-report.js +27 -0
- package/dist/core/cache-stats.js +1 -101
- package/dist/core/cache-warmer.js +1 -0
- package/dist/core/compaction/branch-summarization.js +9 -223
- package/dist/core/compaction/compaction.js +36 -599
- package/dist/core/compaction/index.js +1 -7
- package/dist/core/compaction/utils.js +17 -141
- package/dist/core/crash-log.js +4 -0
- package/dist/core/defaults.js +1 -11
- package/dist/core/diagnostics.js +0 -2
- package/dist/core/empty-assistant.js +1 -27
- package/dist/core/event-bus.js +1 -25
- package/dist/core/exec.js +1 -75
- package/dist/core/experimental.js +1 -8
- package/dist/core/export-html/ansi-to-html.js +1 -249
- package/dist/core/export-html/index.js +2 -226
- package/dist/core/export-html/template.js +50 -1842
- package/dist/core/export-html/tool-renderer.js +1 -108
- package/dist/core/extensions/api-version.js +1 -17
- package/dist/core/extensions/index.js +1 -9
- package/dist/core/extensions/jiti-loader.js +1 -0
- package/dist/core/extensions/jiti-static-loader.js +1 -0
- package/dist/core/extensions/loader.js +1 -665
- package/dist/core/extensions/permission-surface.js +1 -33
- package/dist/core/extensions/runner.js +1 -1013
- package/dist/core/extensions/types.js +1 -60
- package/dist/core/extensions/virtual-modules.js +1 -0
- package/dist/core/extensions/wrapper.js +1 -41
- package/dist/core/footer-data-provider.js +1 -338
- package/dist/core/house-providers.js +1 -96
- package/dist/core/http-dispatcher.js +1 -98
- package/dist/core/index.js +1 -13
- package/dist/core/keybindings.js +1 -339
- package/dist/core/messages.js +13 -119
- package/dist/core/model-config.js +9 -264
- package/dist/core/model-registry.js +1 -107
- package/dist/core/model-resolver.js +1 -613
- package/dist/core/model-runtime.js +3 -614
- package/dist/core/models-store.js +1 -115
- package/dist/core/output-guard.js +1 -89
- package/dist/core/package-manager.js +3 -2241
- package/dist/core/pi-manifest.js +1 -83
- package/dist/core/project-map.js +5 -268
- package/dist/core/project-trust.js +4 -59
- package/dist/core/prompt-templates.js +2 -236
- package/dist/core/provider-attribution.js +1 -72
- package/dist/core/provider-composer.js +1 -409
- package/dist/core/radius.js +1 -2
- package/dist/core/remote-catalog-provider.js +1 -122
- package/dist/core/resolve-config-value.js +1 -247
- package/dist/core/resource-loader.js +1 -885
- package/dist/core/runtime-credentials.js +1 -39
- package/dist/core/sdk.js +1 -290
- package/dist/core/session-cwd.js +7 -38
- package/dist/core/session-export.js +3 -32
- package/dist/core/session-manager.js +13 -1398
- package/dist/core/settings-diagnostics.js +1 -21
- package/dist/core/settings-manager.js +1 -1023
- package/dist/core/skills.js +4 -407
- package/dist/core/slash-commands.js +1 -29
- package/dist/core/source-info.js +1 -19
- package/dist/core/system-prompt.js +16 -116
- package/dist/core/telemetry.js +1 -9
- package/dist/core/timings.js +3 -41
- package/dist/core/tools/bash.js +19 -509
- package/dist/core/tools/edit-diff.js +16 -421
- package/dist/core/tools/edit.js +3 -327
- package/dist/core/tools/file-mutation-queue.js +1 -52
- package/dist/core/tools/find.js +13 -306
- package/dist/core/tools/grep.js +13 -312
- package/dist/core/tools/index.js +1 -129
- package/dist/core/tools/ls.js +9 -175
- package/dist/core/tools/output-accumulator.js +4 -184
- package/dist/core/tools/path-utils.js +1 -99
- package/dist/core/tools/powershell.js +2 -39
- package/dist/core/tools/read.js +22 -279
- package/dist/core/tools/render-utils.js +6 -113
- package/dist/core/tools/renderers/bash.js +9 -167
- package/dist/core/tools/renderers/edit.js +2 -167
- package/dist/core/tools/renderers/find.js +6 -64
- package/dist/core/tools/renderers/grep.js +6 -69
- package/dist/core/tools/renderers/index.js +1 -47
- package/dist/core/tools/renderers/ls.js +6 -58
- package/dist/core/tools/renderers/read.js +8 -129
- package/dist/core/tools/renderers/write.js +13 -153
- package/dist/core/tools/tool-definition-wrapper.js +1 -36
- package/dist/core/tools/truncate.js +5 -215
- package/dist/core/tools/write.js +14 -208
- package/dist/core/trust-manager.js +2 -210
- package/dist/core/usage-totals.js +1 -52
- package/dist/dal/builtins.js +3 -128
- package/dist/dal/cli-npm-hook.js +1 -0
- package/dist/dal/i18n.js +1 -2
- package/dist/extensions/index.js +1 -3
- package/dist/extensions/llama/client.js +9 -313
- package/dist/extensions/llama/huggingface.js +1 -141
- package/dist/extensions/llama/index.js +8 -219
- package/dist/extensions/llama/provider.js +1 -161
- package/dist/extensions/llama/ui.js +5 -416
- package/dist/index.js +1 -48
- package/dist/main.js +4 -811
- package/dist/migrations.js +5 -282
- package/dist/modes/acp/acp-mapping.js +2 -131
- package/dist/modes/acp/acp-mode.js +1 -131
- package/dist/modes/acp/acp-stream.js +1 -21
- package/dist/modes/index.js +1 -9
- package/dist/modes/interactive/bug-report.js +8 -0
- package/dist/modes/interactive/chat-viewport.js +1 -28
- package/dist/modes/interactive/components/armin.js +1 -333
- package/dist/modes/interactive/components/assistant-message.js +3 -204
- package/dist/modes/interactive/components/bash-execution.js +11 -159
- package/dist/modes/interactive/components/bordered-loader.js +1 -55
- package/dist/modes/interactive/components/branch-summary-message.js +3 -39
- package/dist/modes/interactive/components/compaction-summary-message.js +3 -41
- package/dist/modes/interactive/components/config-selector.js +1 -781
- package/dist/modes/interactive/components/countdown-timer.js +1 -33
- package/dist/modes/interactive/components/custom-editor.js +1 -115
- package/dist/modes/interactive/components/custom-entry.js +1 -52
- package/dist/modes/interactive/components/custom-message.js +3 -88
- package/dist/modes/interactive/components/dal-brand.js +3 -202
- package/dist/modes/interactive/components/daxnuts.js +1 -140
- package/dist/modes/interactive/components/diff.js +3 -133
- package/dist/modes/interactive/components/dynamic-border.js +1 -45
- package/dist/modes/interactive/components/earendil-announcement.js +1 -40
- package/dist/modes/interactive/components/extension-editor.js +1 -96
- package/dist/modes/interactive/components/extension-input.js +2 -61
- package/dist/modes/interactive/components/extension-selector.js +2 -83
- package/dist/modes/interactive/components/first-time-setup.js +6 -103
- package/dist/modes/interactive/components/footer.js +1 -208
- package/dist/modes/interactive/components/index.js +1 -35
- package/dist/modes/interactive/components/keybinding-hints.js +1 -36
- package/dist/modes/interactive/components/login-dialog.js +1 -184
- package/dist/modes/interactive/components/markdown-transform.js +1 -19
- package/dist/modes/interactive/components/mermaid.js +5 -75
- package/dist/modes/interactive/components/model-selector.js +2 -359
- package/dist/modes/interactive/components/oauth-selector.js +1 -161
- package/dist/modes/interactive/components/scoped-models-selector.js +1 -325
- package/dist/modes/interactive/components/session-selector-search.js +1 -155
- package/dist/modes/interactive/components/session-selector.js +2 -867
- package/dist/modes/interactive/components/settings-selector.js +1 -717
- package/dist/modes/interactive/components/settings-submenu.js +1 -165
- package/dist/modes/interactive/components/show-images-selector.js +1 -37
- package/dist/modes/interactive/components/skill-invocation-message.js +3 -45
- package/dist/modes/interactive/components/status-indicator.js +1 -121
- package/dist/modes/interactive/components/theme-selector.js +1 -48
- package/dist/modes/interactive/components/thinking-selector.js +1 -102
- package/dist/modes/interactive/components/tool-execution.js +6 -613
- package/dist/modes/interactive/components/tree-selector.js +1 -1245
- package/dist/modes/interactive/components/trust-selector.js +2 -91
- package/dist/modes/interactive/components/user-message-selector.js +1 -114
- package/dist/modes/interactive/components/user-message.js +1 -79
- package/dist/modes/interactive/components/visual-truncate.js +1 -33
- package/dist/modes/interactive/external-editor.js +3 -45
- package/dist/modes/interactive/interactive-mode.js +98 -5876
- package/dist/modes/interactive/model-catalog-refresh.js +1 -34
- package/dist/modes/interactive/model-search.js +1 -15
- package/dist/modes/interactive/session-share.js +2 -185
- package/dist/modes/interactive/theme/theme-controller.js +2 -130
- package/dist/modes/interactive/theme/theme-json.js +12 -130
- package/dist/modes/interactive/theme/theme.js +7 -992
- package/dist/modes/interactive/tui-renderer.js +1 -66
- package/dist/modes/json-event.js +1 -29
- package/dist/modes/print-mode.js +4 -142
- package/dist/modes/rpc/jsonl.js +3 -49
- package/dist/modes/rpc/rpc-client.js +1 -555
- package/dist/modes/rpc/rpc-mode.js +1 -674
- package/dist/modes/rpc/rpc-types.js +0 -8
- package/dist/node_modules/@dalcode/dal-bridge/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-bridge/src/client.js +1 -0
- package/dist/node_modules/@dalcode/dal-bridge/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-gateway/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-gateway/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-guard/package.json +7 -7
- package/dist/node_modules/@dalcode/dal-guard/src/credentials.js +1 -0
- package/dist/node_modules/@dalcode/dal-guard/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-halo/package.json +4 -4
- package/dist/node_modules/@dalcode/dal-halo/src/halo-client.js +1 -0
- package/dist/node_modules/@dalcode/dal-halo/src/index.js +2 -0
- package/dist/node_modules/@dalcode/dal-lang/package.json +6 -6
- package/dist/node_modules/@dalcode/dal-lang/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-lsp/package.json +8 -8
- package/dist/node_modules/@dalcode/dal-lsp/src/client.js +5 -0
- package/dist/node_modules/@dalcode/dal-lsp/src/config.js +1 -0
- package/dist/node_modules/@dalcode/dal-lsp/src/format.js +7 -0
- package/dist/node_modules/@dalcode/dal-lsp/src/index.js +7 -0
- package/dist/node_modules/@dalcode/dal-lsp/src/types.js +0 -0
- package/dist/node_modules/@dalcode/dal-mcp/package.json +17 -14
- package/dist/node_modules/@dalcode/dal-mcp/src/account-layer.js +1 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/add-wizard.js +2 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/command-parser.js +7 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/config-edit.js +2 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/config.js +1 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/http-client.js +1 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/import.js +3 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/index.js +23 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/proxy.js +6 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/report.js +1 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.js +5 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/toml.js +11 -0
- package/dist/node_modules/@dalcode/dal-mcp/src/types.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/package.json +5 -5
- package/dist/node_modules/@dalcode/dal-office/src/extract/csv.js +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/extract/index.js +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/extract/ooxml.js +4 -0
- package/dist/node_modules/@dalcode/dal-office/src/extract/pdf.js +5 -0
- package/dist/node_modules/@dalcode/dal-office/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/paths.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/chart.js +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/docx.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/pptx.js +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/scenes.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/scratchpad.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/themes.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/chart-generate.js +4 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/doc-generate.js +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/drawio-generate.js +4 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/md-generate.js +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-generate.js +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-plan.js +2 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/read-file.js +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/shared.js +1 -0
- package/dist/node_modules/@dalcode/dal-office/src/tools/sheet-generate.js +3 -0
- package/dist/node_modules/@dalcode/dal-office/src/truncate.js +6 -0
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js +1 -596
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/index.js +1 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/package.json +3 -3
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.js +1 -0
- package/dist/node_modules/@dalcode/dal-pi-kit/src/index.js +1 -0
- package/dist/node_modules/@dalcode/dal-plugins/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-plugins/package.json +35 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/brand.js +1 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/cli-hook.js +1 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/compat.js +2 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/index.js +11 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/manage.js +10 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/npm-hook.js +1 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/registry.js +2 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/settings.js +1 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/state.js +2 -0
- package/dist/node_modules/@dalcode/dal-plugins/src/tools.js +1 -0
- package/dist/node_modules/@dalcode/dal-router/package.json +14 -12
- package/dist/node_modules/@dalcode/dal-router/src/assist.js +2 -0
- package/dist/node_modules/@dalcode/dal-router/src/commands.js +8 -0
- package/dist/node_modules/@dalcode/dal-router/src/config.js +2 -0
- package/dist/node_modules/@dalcode/dal-router/src/index.js +3 -0
- package/dist/node_modules/@dalcode/dal-router/src/jev.js +5 -0
- package/dist/node_modules/@dalcode/dal-router/src/pool.js +1 -0
- package/dist/node_modules/@dalcode/dal-router/src/router.js +1 -0
- package/dist/node_modules/@dalcode/dal-router/src/runtime.js +1 -0
- package/dist/node_modules/@dalcode/dal-router/src/subagent.js +1 -0
- package/dist/node_modules/@dalcode/dal-skills/package.json +8 -8
- package/dist/node_modules/@dalcode/dal-skills/src/client.js +1 -0
- package/dist/node_modules/@dalcode/dal-skills/src/discover.js +4 -0
- package/dist/node_modules/@dalcode/dal-skills/src/index.js +13 -0
- package/dist/node_modules/@dalcode/dal-skills/src/install.js +3 -0
- package/dist/node_modules/@dalcode/dal-skills/src/manage.js +26 -0
- package/dist/node_modules/@dalcode/dal-skills/src/packages.js +3 -0
- package/dist/node_modules/@dalcode/dal-skills/src/search.js +1 -0
- package/dist/node_modules/@dalcode/dal-subagent/package.json +8 -8
- package/dist/node_modules/@dalcode/dal-subagent/src/agents.js +2 -0
- package/dist/node_modules/@dalcode/dal-subagent/src/index.js +10 -0
- package/dist/node_modules/@dalcode/dal-telemetry/package.json +8 -8
- package/dist/node_modules/@dalcode/dal-telemetry/src/config.js +2 -0
- package/dist/node_modules/@dalcode/dal-telemetry/src/index.js +3 -0
- package/dist/node_modules/@dalcode/dal-telemetry/src/redact.js +2 -0
- package/dist/node_modules/@dalcode/dal-telemetry/src/reporter.js +1 -0
- package/dist/node_modules/@dalcode/dal-tool-catalog/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-tool-catalog/package.json +32 -0
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/groups.js +1 -0
- package/dist/node_modules/@dalcode/dal-tool-catalog/src/index.js +5 -0
- package/dist/node_modules/@dalcode/dal-web/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-web/package.json +37 -0
- package/dist/node_modules/@dalcode/dal-web/src/bing.js +1 -0
- package/dist/node_modules/@dalcode/dal-web/src/config.js +2 -0
- package/dist/node_modules/@dalcode/dal-web/src/fetch.js +8 -0
- package/dist/node_modules/@dalcode/dal-web/src/html.js +17 -0
- package/dist/node_modules/@dalcode/dal-web/src/index.js +6 -0
- package/dist/node_modules/@dalcode/dal-web/src/providers.js +1 -0
- package/dist/node_modules/@dalcode/dal-web/src/search.js +7 -0
- package/dist/node_modules/@dalcode/dal-web/src/ssrf.js +1 -0
- package/dist/node_modules/@dalcode/dal-web/src/types.js +0 -0
- package/dist/node_modules/@dalcode/dal-workflow/LICENSE +21 -0
- package/dist/node_modules/@dalcode/dal-workflow/package.json +31 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/index.js +5 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/notify.js +1 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/plan-mode.js +20 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/plan-utils.js +3 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/shared.js +2 -0
- package/dist/node_modules/@dalcode/dal-workflow/src/todo.js +2 -0
- package/dist/node_modules/@dalcode/deepailab/package.json +9 -8
- package/dist/node_modules/@dalcode/deepailab/src/cache.js +1 -0
- package/dist/node_modules/@dalcode/deepailab/src/index.js +3 -0
- package/dist/node_modules/@dalcode/deepailab/src/model-defaults.js +1 -0
- package/dist/node_modules/@dalcode/deepailab/src/oidc.js +1 -0
- package/dist/node_modules/@earendil-works/chord/README.md +31 -25
- package/dist/node_modules/@earendil-works/chord/dist/api.js +1 -72
- package/dist/node_modules/@earendil-works/chord/dist/bundler.js +1 -3
- package/dist/node_modules/@earendil-works/chord/dist/context/index.js +1 -97
- package/dist/node_modules/@earendil-works/chord/dist/delta/index.js +1 -1906
- package/dist/node_modules/@earendil-works/chord/dist/facets/host.js +1 -763
- package/dist/node_modules/@earendil-works/chord/dist/facets/loader.js +1 -5
- package/dist/node_modules/@earendil-works/chord/dist/index.js +1 -10
- package/dist/node_modules/@earendil-works/chord/dist/json.js +1 -57
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +2 -377
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle.js +4 -183
- package/dist/node_modules/@earendil-works/chord/dist/node/manifest.js +1 -6
- package/dist/node_modules/@earendil-works/chord/dist/node/package.js +1 -199
- package/dist/node_modules/@earendil-works/chord/dist/node.js +1 -3
- package/dist/node_modules/@earendil-works/chord/dist/services/consumer.js +1 -537
- package/dist/node_modules/@earendil-works/chord/dist/services/errors.js +1 -22
- package/dist/node_modules/@earendil-works/chord/dist/services/handle.js +1 -99
- package/dist/node_modules/@earendil-works/chord/dist/services/instances.js +1 -137
- package/dist/node_modules/@earendil-works/chord/dist/services/loopback.js +1 -15
- package/dist/node_modules/@earendil-works/chord/dist/services/provider.js +1 -472
- package/dist/node_modules/@earendil-works/chord/dist/services/state-codec.js +1 -115
- package/dist/node_modules/@earendil-works/chord/dist/services/state-internals.js +1 -10
- package/dist/node_modules/@earendil-works/chord/dist/services/state.js +1 -124
- package/dist/node_modules/@earendil-works/chord/dist/services/wire.js +1 -173
- package/dist/node_modules/@earendil-works/chord/dist/state/diff.js +1 -0
- package/dist/node_modules/@earendil-works/chord/dist/state/draft.js +1 -0
- package/dist/node_modules/@earendil-works/chord/dist/state/value.js +1 -0
- package/dist/node_modules/@earendil-works/chord/dist/types.js +0 -2
- package/dist/node_modules/@earendil-works/chord/package.json +2 -2
- package/dist/node_modules/@earendil-works/chord/src/delta/README.md +9 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/README.md +83 -32
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/__probe.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +1 -586
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.js +1 -422
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +1 -6
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +9 -148
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +26 -482
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js +16 -120
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js +1 -27
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js +1 -13
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +10 -794
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js +1 -250
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js +1 -82
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js +1 -49
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js +1 -121
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js +1 -406
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js +13 -98
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bash.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/bounded.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/chord.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/context.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/harness.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/hooks.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/index.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/jsonl.js +4 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/collapse.js +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/entries.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/frames.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/generation.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/job.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/plugin.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/post-tools.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/task-api.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/kinds/tool.js +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/membrane.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/memory.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/scheduler.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/session.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/system.js +8 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/types.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/pico3/view.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js +5 -225
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js +1 -81
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js +1 -170
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js +1 -133
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js +1 -179
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js +1 -205
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js +1 -140
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js +1 -85
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js +1 -394
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js +1 -37
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js +1 -929
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js +1 -49
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js +1 -244
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js +1 -449
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js +1 -93
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js +1 -311
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js +1 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js +1 -1575
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js +1 -66
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js +1 -240
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js +1 -117
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js +1 -72
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js +1 -61
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js +1 -57
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js +1 -49
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js +1 -22
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js +1 -127
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js +1 -216
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js +1 -9
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js +1 -45
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/fork.js +1 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js +1 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/io.js +3 -0
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js +1 -383
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js +1 -285
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js +8 -274
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js +1 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js +1 -374
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js +1 -21
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +1 -361
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js +1 -24
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js +1 -127
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js +1 -114
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js +1 -590
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js +1 -600
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js +1 -100
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js +1 -9
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js +1 -16
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js +1 -41
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js +1 -9
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js +1 -81
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +10 -326
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js +2 -30
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js +1 -527
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +12 -105
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js +16 -386
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +1 -108
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +1 -46
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js +1 -106
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js +1 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +1 -26
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +14 -108
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +1 -31
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +1 -75
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js +1 -79
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js +5 -217
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +1 -71
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +5 -296
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js +1 -33
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -26
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.js +1 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +2 -310
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/stream-fn.js +1 -17
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/package.json +11 -6
- package/dist/node_modules/@earendil-works/pi-ai/README.md +49 -7
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +5 -1170
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +1 -249
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +1 -1092
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.js +1 -30
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js +1 -72
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.js +1 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +1 -222
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/github-copilot-headers.js +1 -29
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +1 -364
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +2 -447
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +1 -425
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +1 -70
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -745
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +9 -1305
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +6 -1374
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js +1 -10
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +10 -689
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +1 -298
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +1 -132
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.lazy.js +1 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +7 -313
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.js +1 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +1 -66
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js +1 -187
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/context.js +1 -42
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.js +1 -51
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/helpers.js +1 -53
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +1 -308
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js +1 -69
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +1 -392
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js +1 -248
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +1 -59
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/meta.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.js +7 -38
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +1 -450
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +1 -277
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/pkce.js +1 -31
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js +1 -321
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/xai.js +1 -190
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +1 -153
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +1 -21
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js +15 -112
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat.js +1 -205
- package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -174
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +1 -817
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.js +1 -23
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js +1 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.js +1 -143
- package/dist/node_modules/@earendil-works/pi-ai/dist/images.js +1 -14
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.js +1 -27
- package/dist/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.js +1 -49
- package/dist/node_modules/@earendil-works/pi-ai/dist/model-catalog.js +1 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/models-store.js +1 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.js +1 -83
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.js +1 -595
- package/dist/node_modules/@earendil-works/pi-ai/dist/oauth.js +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.js +1 -131
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +1 -93
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +1 -83
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -14
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js +1 -27
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.js +1 -86
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-stream.js +1 -21
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +1 -6
- 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/amazon-bedrock.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.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/baseten.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.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/opencode.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/qwen-token-plan-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +7 -488
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.js +1 -19
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.js +1 -34
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +1 -94
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js +1 -34
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.js +1 -24
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/meta.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/meta.models.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js +1 -16
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +1 -20
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-headers.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js +1 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +1 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +1 -27
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js +1 -63
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +1 -64
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.models.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.js +1 -19
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +1 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/session-resources.js +1 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js +1 -34
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort.js +1 -49
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js +1 -425
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js +1 -36
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js +1 -25
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/dsml-tool-calls.js +1 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js +1 -133
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +1 -116
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +1 -81
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/hash.js +1 -14
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/headers.js +1 -18
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js +2 -113
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js +1 -133
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +1 -177
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +1 -12
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js +1 -44
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +1 -94
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +1 -178
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js +1 -26
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js +1 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.js +8 -10
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/transcript.js +3 -0
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js +1 -21
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js +1 -42
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.js +6 -309
- package/dist/node_modules/@earendil-works/pi-ai/package.json +9 -9
- package/dist/node_modules/@earendil-works/pi-client/dist/client.js +1 -388
- package/dist/node_modules/@earendil-works/pi-client/dist/connection.js +1 -208
- package/dist/node_modules/@earendil-works/pi-client/dist/errors.js +1 -28
- package/dist/node_modules/@earendil-works/pi-client/dist/index.js +1 -3
- package/dist/node_modules/@earendil-works/pi-client/dist/promise.js +1 -11
- package/dist/node_modules/@earendil-works/pi-client/dist/transport.js +0 -2
- package/dist/node_modules/@earendil-works/pi-client/dist/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-client/dist/unix.js +1 -281
- package/dist/node_modules/@earendil-works/pi-client/package.json +3 -2
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js +1 -165
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js +1 -201
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js +1 -4
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js +1 -29
- package/dist/node_modules/@earendil-works/pi-protocol/dist/codec.js +1 -119
- package/dist/node_modules/@earendil-works/pi-protocol/dist/framing.js +1 -140
- package/dist/node_modules/@earendil-works/pi-protocol/dist/index.js +1 -5
- package/dist/node_modules/@earendil-works/pi-protocol/dist/protocol.js +1 -85
- package/dist/node_modules/@earendil-works/pi-protocol/dist/schemas.js +1 -468
- package/dist/node_modules/@earendil-works/pi-protocol/package.json +3 -3
- package/dist/node_modules/@earendil-works/pi-server/dist/connection.js +1 -4
- package/dist/node_modules/@earendil-works/pi-server/dist/errors.js +1 -41
- package/dist/node_modules/@earendil-works/pi-server/dist/index.js +1 -5
- package/dist/node_modules/@earendil-works/pi-server/dist/listener.js +0 -2
- package/dist/node_modules/@earendil-works/pi-server/dist/server.js +1 -549
- package/dist/node_modules/@earendil-works/pi-server/dist/session-router.js +1 -264
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/client.js +1 -138
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/host.js +1 -189
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/index.js +1 -4
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/server.js +1 -17
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/address.js +1 -9
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/index.js +1 -4
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/listener.js +1 -421
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/preset.js +1 -22
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-server/dist/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-server/package.json +5 -3
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/index.js +1 -103
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/index.js +1 -4
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/migrations.js +1 -7
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/repo.js +2 -408
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/branch-entries.js +30 -199
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/entries.js +5 -125
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-row.js +10 -62
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-sequences.js +1 -13
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-stats.js +1 -39
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/usage-ledger.js +3 -50
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/values.js +20 -91
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session.js +1 -163
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/sql.js +1 -58
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage.js +1 -161
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/types.js +0 -2
- 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.js +1 -18
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.js +1 -154
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.js +1 -18
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/conformance.js +1 -294
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/index.js +1 -2
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/types.js +0 -2
- package/dist/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/dist/node_modules/@earendil-works/pi-tui/README.md +8 -2
- package/dist/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js +1 -282
- package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +2 -667
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js +1 -37
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/box.js +1 -133
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +1 -35
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.js +17 -2088
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js +1 -43
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/image.js +1 -90
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/input.js +2 -419
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/loader.js +1 -97
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +9 -813
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js +1 -21
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js +1 -216
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +1 -206
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +1 -252
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +1 -23
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/stack.js +1 -117
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.js +1 -90
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +2 -51
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js +1 -35
- package/dist/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
- package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +1 -111
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.js +1 -43
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.js +1 -233
- package/dist/node_modules/@earendil-works/pi-tui/dist/keys.js +5 -1174
- package/dist/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +1 -44
- package/dist/node_modules/@earendil-works/pi-tui/dist/latex.js +10 -1285
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout-node.js +1 -6
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout.js +1 -501
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +1 -54
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-module-path.js +1 -19
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-platform.js +1 -0
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +1 -377
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-colors.js +1 -59
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +1 -550
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.js +1 -491
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +4 -1501
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +13 -596
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.js +2 -1125
- package/dist/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +1 -25
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.js +1 -1237
- package/dist/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +1 -96
- package/dist/node_modules/@earendil-works/pi-tui/native/clipboard.h +170 -0
- package/dist/node_modules/@earendil-works/pi-tui/native/darwin/README.md +8 -6
- package/dist/node_modules/@earendil-works/pi-tui/native/darwin/build.sh +12 -5
- package/dist/node_modules/@earendil-works/pi-tui/native/linux/README.md +23 -0
- package/dist/node_modules/@earendil-works/pi-tui/native/linux/build.sh +65 -0
- package/dist/node_modules/@earendil-works/pi-tui/native/napi.h +89 -0
- package/dist/node_modules/@earendil-works/pi-tui/native/win32/README.md +16 -7
- package/dist/node_modules/@earendil-works/pi-tui/native/win32/build.mjs +4 -222
- package/dist/node_modules/@earendil-works/pi-tui/package.json +9 -3
- package/dist/package-manager-cli.js +45 -1010
- package/dist/rpc-entry.js +1 -10
- package/dist/utils/abort.js +1 -48
- package/dist/utils/ansi.js +1 -52
- package/dist/utils/changelog.js +3 -239
- package/dist/utils/child-process.js +1 -106
- package/dist/utils/clipboard-command.js +1 -0
- package/dist/utils/clipboard-image.js +1 -245
- package/dist/utils/clipboard-native.js +1 -20
- package/dist/utils/clipboard.js +1 -196
- package/dist/utils/deprecation.js +1 -13
- package/dist/utils/exif-orientation.js +1 -157
- package/dist/utils/frontmatter.js +4 -27
- package/dist/utils/fs-watch.js +1 -25
- package/dist/utils/git.js +1 -195
- package/dist/utils/html.js +1 -40
- package/dist/utils/image-convert.js +1 -45
- package/dist/utils/image-process.js +1 -83
- package/dist/utils/image-resize-core.js +1 -124
- package/dist/utils/image-resize-worker.js +1 -31
- package/dist/utils/image-resize.js +1 -97
- package/dist/utils/json.js +1 -7
- package/dist/utils/management-http.js +1 -54
- package/dist/utils/mime.js +1 -110
- package/dist/utils/offline.js +1 -19
- package/dist/utils/open-browser.js +1 -22
- package/dist/utils/paths.js +1 -114
- package/dist/utils/photon.js +1 -121
- package/dist/utils/pi-user-agent.js +1 -6
- package/dist/utils/shell.js +8 -224
- package/dist/utils/sleep.js +1 -17
- package/dist/utils/syntax-highlight.js +2 -177
- package/dist/utils/text.js +1 -9
- package/dist/utils/tool-result-images.js +2 -45
- package/dist/utils/tools-manager.js +1 -338
- package/dist/utils/version-check.js +2 -215
- package/dist/utils/windows-self-update.js +1 -77
- package/dist/utils/wsl.js +1 -0
- package/dist/utils/zip.js +1 -0
- package/examples/README.md +13 -2
- package/examples/extensions/README.md +1 -2
- package/examples/extensions/claude-rules.ts +1 -1
- package/examples/extensions/commands.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +18 -12
- 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/index.ts +2 -2
- 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/pirate.ts +1 -1
- package/examples/extensions/preset.ts +2 -2
- package/examples/extensions/project-trust.ts +4 -4
- package/examples/extensions/prompt-customizer.ts +20 -68
- package/examples/extensions/sandbox/index.ts +5 -5
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +11 -11
- package/examples/extensions/tools.ts +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/plugins/pi-example-plugin/src/session.ts +3 -2
- package/examples/rpc-client.ts +35 -0
- package/examples/rpc-extension-ui.ts +25 -5
- package/examples/sdk/01-minimal.ts +1 -1
- package/examples/sdk/03-custom-prompt.ts +1 -1
- package/examples/sdk/04-skills.ts +1 -1
- package/examples/sdk/06-extensions.ts +2 -2
- package/examples/sdk/08-prompt-templates.ts +1 -1
- package/examples/sdk/README.md +2 -2
- package/npm-shrinkwrap.json +534 -825
- package/package.json +18 -25
- package/dist/bun/cli.d.ts +0 -5
- package/dist/bun/cli.d.ts.map +0 -1
- package/dist/bun/cli.js.map +0 -1
- package/dist/bun/register-bedrock.d.ts +0 -2
- package/dist/bun/register-bedrock.d.ts.map +0 -1
- package/dist/bun/register-bedrock.js +0 -4
- package/dist/bun/register-bedrock.js.map +0 -1
- package/dist/bun/restore-sandbox-env.d.ts +0 -17
- package/dist/bun/restore-sandbox-env.d.ts.map +0 -1
- package/dist/bun/restore-sandbox-env.js.map +0 -1
- package/dist/bun/runtime-setup.d.ts +0 -2
- package/dist/bun/runtime-setup.d.ts.map +0 -1
- package/dist/bun/runtime-setup.js.map +0 -1
- package/dist/bun/sandbox-env-setup.d.ts +0 -2
- package/dist/bun/sandbox-env-setup.d.ts.map +0 -1
- package/dist/bun/sandbox-env-setup.js.map +0 -1
- package/dist/cli/args.d.ts +0 -61
- package/dist/cli/args.d.ts.map +0 -1
- package/dist/cli/args.js.map +0 -1
- package/dist/cli/auth-check.d.ts +0 -19
- package/dist/cli/auth-check.d.ts.map +0 -1
- package/dist/cli/auth-check.js.map +0 -1
- package/dist/cli/auth-command.d.ts +0 -24
- package/dist/cli/auth-command.d.ts.map +0 -1
- package/dist/cli/auth-command.js.map +0 -1
- package/dist/cli/config-selector.d.ts +0 -16
- package/dist/cli/config-selector.d.ts.map +0 -1
- package/dist/cli/config-selector.js.map +0 -1
- package/dist/cli/credential-print.d.ts +0 -13
- package/dist/cli/credential-print.d.ts.map +0 -1
- package/dist/cli/credential-print.js.map +0 -1
- package/dist/cli/file-processor.d.ts +0 -15
- package/dist/cli/file-processor.d.ts.map +0 -1
- package/dist/cli/file-processor.js.map +0 -1
- package/dist/cli/initial-message.d.ts +0 -18
- package/dist/cli/initial-message.d.ts.map +0 -1
- package/dist/cli/initial-message.js.map +0 -1
- package/dist/cli/list-models.d.ts +0 -9
- package/dist/cli/list-models.d.ts.map +0 -1
- package/dist/cli/list-models.js.map +0 -1
- package/dist/cli/project-trust.d.ts +0 -10
- package/dist/cli/project-trust.d.ts.map +0 -1
- package/dist/cli/project-trust.js.map +0 -1
- package/dist/cli/session-picker.d.ts +0 -10
- package/dist/cli/session-picker.d.ts.map +0 -1
- package/dist/cli/session-picker.js.map +0 -1
- package/dist/cli/setup.d.ts +0 -2
- package/dist/cli/setup.d.ts.map +0 -1
- package/dist/cli/setup.js.map +0 -1
- package/dist/cli/startup-ui.d.ts +0 -20
- package/dist/cli/startup-ui.d.ts.map +0 -1
- package/dist/cli/startup-ui.js.map +0 -1
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/config.d.ts +0 -107
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/core/agent-session-runtime.d.ts +0 -119
- package/dist/core/agent-session-runtime.d.ts.map +0 -1
- package/dist/core/agent-session-runtime.js.map +0 -1
- package/dist/core/agent-session-services.d.ts +0 -86
- package/dist/core/agent-session-services.d.ts.map +0 -1
- package/dist/core/agent-session-services.js.map +0 -1
- package/dist/core/agent-session.d.ts +0 -692
- package/dist/core/agent-session.d.ts.map +0 -1
- package/dist/core/agent-session.js.map +0 -1
- package/dist/core/auth-guidance.d.ts +0 -6
- package/dist/core/auth-guidance.d.ts.map +0 -1
- package/dist/core/auth-guidance.js.map +0 -1
- package/dist/core/auth-storage.d.ts +0 -72
- package/dist/core/auth-storage.d.ts.map +0 -1
- package/dist/core/auth-storage.js.map +0 -1
- package/dist/core/bash-executor.d.ts +0 -32
- package/dist/core/bash-executor.d.ts.map +0 -1
- package/dist/core/bash-executor.js.map +0 -1
- package/dist/core/cache-stats.d.ts +0 -49
- package/dist/core/cache-stats.d.ts.map +0 -1
- package/dist/core/cache-stats.js.map +0 -1
- package/dist/core/compaction/branch-summarization.d.ts +0 -98
- package/dist/core/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/core/compaction/branch-summarization.js.map +0 -1
- package/dist/core/compaction/compaction.d.ts +0 -143
- package/dist/core/compaction/compaction.d.ts.map +0 -1
- package/dist/core/compaction/compaction.js.map +0 -1
- package/dist/core/compaction/index.d.ts +0 -7
- package/dist/core/compaction/index.d.ts.map +0 -1
- package/dist/core/compaction/index.js.map +0 -1
- package/dist/core/compaction/utils.d.ts +0 -38
- package/dist/core/compaction/utils.d.ts.map +0 -1
- package/dist/core/compaction/utils.js.map +0 -1
- package/dist/core/defaults.d.ts +0 -4
- package/dist/core/defaults.d.ts.map +0 -1
- package/dist/core/defaults.js.map +0 -1
- package/dist/core/diagnostics.d.ts +0 -15
- package/dist/core/diagnostics.d.ts.map +0 -1
- package/dist/core/diagnostics.js.map +0 -1
- package/dist/core/empty-assistant.d.ts +0 -13
- package/dist/core/empty-assistant.d.ts.map +0 -1
- package/dist/core/empty-assistant.js.map +0 -1
- package/dist/core/event-bus.d.ts +0 -9
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/event-bus.js.map +0 -1
- package/dist/core/exec.d.ts +0 -29
- package/dist/core/exec.d.ts.map +0 -1
- package/dist/core/exec.js.map +0 -1
- package/dist/core/experimental.d.ts +0 -6
- package/dist/core/experimental.d.ts.map +0 -1
- package/dist/core/experimental.js.map +0 -1
- package/dist/core/export-html/ansi-to-html.d.ts +0 -22
- package/dist/core/export-html/ansi-to-html.d.ts.map +0 -1
- package/dist/core/export-html/ansi-to-html.js.map +0 -1
- package/dist/core/export-html/index.d.ts +0 -37
- package/dist/core/export-html/index.d.ts.map +0 -1
- package/dist/core/export-html/index.js.map +0 -1
- package/dist/core/export-html/tool-renderer.d.ts +0 -34
- package/dist/core/export-html/tool-renderer.d.ts.map +0 -1
- package/dist/core/export-html/tool-renderer.js.map +0 -1
- package/dist/core/extensions/api-version.d.ts +0 -9
- package/dist/core/extensions/api-version.d.ts.map +0 -1
- package/dist/core/extensions/api-version.js.map +0 -1
- package/dist/core/extensions/index.d.ts +0 -12
- package/dist/core/extensions/index.d.ts.map +0 -1
- package/dist/core/extensions/index.js.map +0 -1
- package/dist/core/extensions/loader.d.ts +0 -23
- package/dist/core/extensions/loader.d.ts.map +0 -1
- package/dist/core/extensions/loader.js.map +0 -1
- package/dist/core/extensions/permission-surface.d.ts +0 -10
- package/dist/core/extensions/permission-surface.d.ts.map +0 -1
- package/dist/core/extensions/permission-surface.js.map +0 -1
- package/dist/core/extensions/runner.d.ts +0 -178
- package/dist/core/extensions/runner.d.ts.map +0 -1
- package/dist/core/extensions/runner.js.map +0 -1
- package/dist/core/extensions/types.d.ts +0 -1410
- package/dist/core/extensions/types.d.ts.map +0 -1
- package/dist/core/extensions/types.js.map +0 -1
- package/dist/core/extensions/wrapper.d.ts +0 -20
- package/dist/core/extensions/wrapper.d.ts.map +0 -1
- package/dist/core/extensions/wrapper.js.map +0 -1
- package/dist/core/footer-data-provider.d.ts +0 -64
- package/dist/core/footer-data-provider.d.ts.map +0 -1
- package/dist/core/footer-data-provider.js.map +0 -1
- package/dist/core/house-providers.d.ts +0 -66
- package/dist/core/house-providers.d.ts.map +0 -1
- package/dist/core/house-providers.js.map +0 -1
- package/dist/core/http-dispatcher.d.ts +0 -22
- package/dist/core/http-dispatcher.d.ts.map +0 -1
- package/dist/core/http-dispatcher.js.map +0 -1
- package/dist/core/index.d.ts +0 -13
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -1
- package/dist/core/keybindings.d.ts +0 -443
- package/dist/core/keybindings.d.ts.map +0 -1
- package/dist/core/keybindings.js.map +0 -1
- package/dist/core/messages.d.ts +0 -77
- package/dist/core/messages.d.ts.map +0 -1
- package/dist/core/messages.js.map +0 -1
- package/dist/core/model-config.d.ts +0 -676
- package/dist/core/model-config.d.ts.map +0 -1
- package/dist/core/model-config.js.map +0 -1
- package/dist/core/model-registry.d.ts +0 -45
- package/dist/core/model-registry.d.ts.map +0 -1
- package/dist/core/model-registry.js.map +0 -1
- package/dist/core/model-resolver.d.ts +0 -130
- package/dist/core/model-resolver.d.ts.map +0 -1
- package/dist/core/model-resolver.js.map +0 -1
- package/dist/core/model-runtime.d.ts +0 -101
- package/dist/core/model-runtime.d.ts.map +0 -1
- package/dist/core/model-runtime.js.map +0 -1
- package/dist/core/models-store.d.ts +0 -22
- package/dist/core/models-store.d.ts.map +0 -1
- package/dist/core/models-store.js.map +0 -1
- package/dist/core/output-guard.d.ts +0 -7
- package/dist/core/output-guard.d.ts.map +0 -1
- package/dist/core/output-guard.js.map +0 -1
- package/dist/core/package-manager.d.ts +0 -224
- package/dist/core/package-manager.d.ts.map +0 -1
- package/dist/core/package-manager.js.map +0 -1
- package/dist/core/pi-manifest.d.ts +0 -25
- package/dist/core/pi-manifest.d.ts.map +0 -1
- package/dist/core/pi-manifest.js.map +0 -1
- package/dist/core/project-map.d.ts +0 -23
- package/dist/core/project-map.d.ts.map +0 -1
- package/dist/core/project-map.js.map +0 -1
- package/dist/core/project-trust.d.ts +0 -15
- package/dist/core/project-trust.d.ts.map +0 -1
- package/dist/core/project-trust.js.map +0 -1
- package/dist/core/prompt-templates.d.ts +0 -54
- package/dist/core/prompt-templates.d.ts.map +0 -1
- package/dist/core/prompt-templates.js.map +0 -1
- package/dist/core/provider-attribution.d.ts +0 -4
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js.map +0 -1
- package/dist/core/provider-composer.d.ts +0 -58
- package/dist/core/provider-composer.d.ts.map +0 -1
- package/dist/core/provider-composer.js.map +0 -1
- package/dist/core/radius.d.ts +0 -2
- package/dist/core/radius.d.ts.map +0 -1
- package/dist/core/radius.js.map +0 -1
- package/dist/core/remote-catalog-provider.d.ts +0 -5
- package/dist/core/remote-catalog-provider.d.ts.map +0 -1
- package/dist/core/remote-catalog-provider.js.map +0 -1
- package/dist/core/resolve-config-value.d.ts +0 -30
- package/dist/core/resolve-config-value.d.ts.map +0 -1
- package/dist/core/resolve-config-value.js.map +0 -1
- package/dist/core/resource-loader.d.ts +0 -221
- package/dist/core/resource-loader.d.ts.map +0 -1
- package/dist/core/resource-loader.js.map +0 -1
- package/dist/core/runtime-credentials.d.ts +0 -15
- package/dist/core/runtime-credentials.d.ts.map +0 -1
- package/dist/core/runtime-credentials.js.map +0 -1
- package/dist/core/sdk.d.ts +0 -108
- package/dist/core/sdk.d.ts.map +0 -1
- package/dist/core/sdk.js.map +0 -1
- package/dist/core/session-cwd.d.ts +0 -19
- package/dist/core/session-cwd.d.ts.map +0 -1
- package/dist/core/session-cwd.js.map +0 -1
- package/dist/core/session-export.d.ts +0 -4
- package/dist/core/session-export.d.ts.map +0 -1
- package/dist/core/session-export.js.map +0 -1
- package/dist/core/session-manager.d.ts +0 -364
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/settings-diagnostics.d.ts +0 -9
- package/dist/core/settings-diagnostics.d.ts.map +0 -1
- package/dist/core/settings-diagnostics.js.map +0 -1
- package/dist/core/settings-manager.d.ts +0 -336
- package/dist/core/settings-manager.d.ts.map +0 -1
- package/dist/core/settings-manager.js.map +0 -1
- package/dist/core/skills.d.ts +0 -60
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/skills.js.map +0 -1
- package/dist/core/slash-commands.d.ts +0 -15
- package/dist/core/slash-commands.d.ts.map +0 -1
- package/dist/core/slash-commands.js.map +0 -1
- package/dist/core/source-info.d.ts +0 -18
- package/dist/core/source-info.d.ts.map +0 -1
- package/dist/core/source-info.js.map +0 -1
- package/dist/core/system-prompt.d.ts +0 -28
- package/dist/core/system-prompt.d.ts.map +0 -1
- package/dist/core/system-prompt.js.map +0 -1
- package/dist/core/telemetry.d.ts +0 -3
- package/dist/core/telemetry.d.ts.map +0 -1
- package/dist/core/telemetry.js.map +0 -1
- package/dist/core/timings.d.ts +0 -10
- package/dist/core/timings.d.ts.map +0 -1
- package/dist/core/timings.js.map +0 -1
- package/dist/core/tools/bash.d.ts +0 -89
- package/dist/core/tools/bash.d.ts.map +0 -1
- package/dist/core/tools/bash.js.map +0 -1
- package/dist/core/tools/edit-diff.d.ts +0 -101
- package/dist/core/tools/edit-diff.d.ts.map +0 -1
- package/dist/core/tools/edit-diff.js.map +0 -1
- package/dist/core/tools/edit.d.ts +0 -55
- package/dist/core/tools/edit.d.ts.map +0 -1
- package/dist/core/tools/edit.js.map +0 -1
- package/dist/core/tools/file-mutation-queue.d.ts +0 -6
- package/dist/core/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/core/tools/file-mutation-queue.js.map +0 -1
- package/dist/core/tools/find.d.ts +0 -42
- package/dist/core/tools/find.d.ts.map +0 -1
- package/dist/core/tools/find.js.map +0 -1
- package/dist/core/tools/grep.d.ts +0 -41
- package/dist/core/tools/grep.d.ts.map +0 -1
- package/dist/core/tools/grep.js.map +0 -1
- package/dist/core/tools/index.d.ts +0 -43
- package/dist/core/tools/index.d.ts.map +0 -1
- package/dist/core/tools/index.js.map +0 -1
- package/dist/core/tools/ls.d.ts +0 -41
- package/dist/core/tools/ls.d.ts.map +0 -1
- package/dist/core/tools/ls.js.map +0 -1
- package/dist/core/tools/output-accumulator.d.ts +0 -52
- package/dist/core/tools/output-accumulator.d.ts.map +0 -1
- package/dist/core/tools/output-accumulator.js.map +0 -1
- package/dist/core/tools/path-utils.d.ts +0 -10
- package/dist/core/tools/path-utils.d.ts.map +0 -1
- package/dist/core/tools/path-utils.js.map +0 -1
- package/dist/core/tools/powershell.d.ts +0 -16
- package/dist/core/tools/powershell.d.ts.map +0 -1
- package/dist/core/tools/powershell.js.map +0 -1
- package/dist/core/tools/read.d.ts +0 -39
- package/dist/core/tools/read.d.ts.map +0 -1
- package/dist/core/tools/read.js.map +0 -1
- package/dist/core/tools/render-utils.d.ts +0 -29
- package/dist/core/tools/render-utils.d.ts.map +0 -1
- package/dist/core/tools/render-utils.js.map +0 -1
- package/dist/core/tools/renderers/bash.d.ts +0 -12
- package/dist/core/tools/renderers/bash.d.ts.map +0 -1
- package/dist/core/tools/renderers/bash.js.map +0 -1
- package/dist/core/tools/renderers/edit.d.ts +0 -23
- package/dist/core/tools/renderers/edit.d.ts.map +0 -1
- package/dist/core/tools/renderers/edit.js.map +0 -1
- package/dist/core/tools/renderers/find.d.ts +0 -10
- package/dist/core/tools/renderers/find.d.ts.map +0 -1
- package/dist/core/tools/renderers/find.js.map +0 -1
- package/dist/core/tools/renderers/grep.d.ts +0 -10
- package/dist/core/tools/renderers/grep.d.ts.map +0 -1
- package/dist/core/tools/renderers/grep.js.map +0 -1
- package/dist/core/tools/renderers/index.d.ts +0 -28
- package/dist/core/tools/renderers/index.d.ts.map +0 -1
- package/dist/core/tools/renderers/index.js.map +0 -1
- package/dist/core/tools/renderers/ls.d.ts +0 -10
- package/dist/core/tools/renderers/ls.d.ts.map +0 -1
- package/dist/core/tools/renderers/ls.js.map +0 -1
- package/dist/core/tools/renderers/read.d.ts +0 -11
- package/dist/core/tools/renderers/read.d.ts.map +0 -1
- package/dist/core/tools/renderers/read.js.map +0 -1
- package/dist/core/tools/renderers/write.d.ts +0 -10
- package/dist/core/tools/renderers/write.d.ts.map +0 -1
- package/dist/core/tools/renderers/write.js.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +0 -14
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +0 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +0 -1
- package/dist/core/tools/truncate.d.ts +0 -70
- package/dist/core/tools/truncate.d.ts.map +0 -1
- package/dist/core/tools/truncate.js.map +0 -1
- package/dist/core/tools/write.d.ts +0 -30
- package/dist/core/tools/write.d.ts.map +0 -1
- package/dist/core/tools/write.js.map +0 -1
- package/dist/core/trust-manager.d.ts +0 -36
- package/dist/core/trust-manager.d.ts.map +0 -1
- package/dist/core/trust-manager.js.map +0 -1
- package/dist/core/usage-totals.d.ts +0 -19
- package/dist/core/usage-totals.d.ts.map +0 -1
- package/dist/core/usage-totals.js.map +0 -1
- package/dist/dal/builtins.d.ts +0 -32
- package/dist/dal/builtins.d.ts.map +0 -1
- package/dist/dal/builtins.js.map +0 -1
- package/dist/dal/i18n.d.ts +0 -12
- package/dist/dal/i18n.d.ts.map +0 -1
- package/dist/dal/i18n.js.map +0 -1
- package/dist/extensions/index.d.ts +0 -3
- package/dist/extensions/index.d.ts.map +0 -1
- package/dist/extensions/index.js.map +0 -1
- package/dist/extensions/llama/client.d.ts +0 -69
- package/dist/extensions/llama/client.d.ts.map +0 -1
- package/dist/extensions/llama/client.js.map +0 -1
- package/dist/extensions/llama/huggingface.d.ts +0 -23
- package/dist/extensions/llama/huggingface.d.ts.map +0 -1
- package/dist/extensions/llama/huggingface.js.map +0 -1
- package/dist/extensions/llama/index.d.ts +0 -3
- package/dist/extensions/llama/index.d.ts.map +0 -1
- package/dist/extensions/llama/index.js.map +0 -1
- package/dist/extensions/llama/provider.d.ts +0 -12
- package/dist/extensions/llama/provider.d.ts.map +0 -1
- package/dist/extensions/llama/provider.js.map +0 -1
- package/dist/extensions/llama/ui.d.ts +0 -42
- package/dist/extensions/llama/ui.d.ts.map +0 -1
- package/dist/extensions/llama/ui.js.map +0 -1
- package/dist/index.d.ts +0 -36
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/main.d.ts +0 -16
- package/dist/main.d.ts.map +0 -1
- package/dist/main.js.map +0 -1
- package/dist/migrations.d.ts +0 -33
- package/dist/migrations.d.ts.map +0 -1
- package/dist/migrations.js.map +0 -1
- package/dist/modes/acp/acp-mapping.d.ts +0 -17
- package/dist/modes/acp/acp-mapping.d.ts.map +0 -1
- package/dist/modes/acp/acp-mapping.js.map +0 -1
- package/dist/modes/acp/acp-mode.d.ts +0 -11
- package/dist/modes/acp/acp-mode.d.ts.map +0 -1
- package/dist/modes/acp/acp-mode.js.map +0 -1
- package/dist/modes/acp/acp-stream.d.ts +0 -9
- package/dist/modes/acp/acp-stream.d.ts.map +0 -1
- package/dist/modes/acp/acp-stream.js.map +0 -1
- package/dist/modes/index.d.ts +0 -11
- package/dist/modes/index.d.ts.map +0 -1
- package/dist/modes/index.js.map +0 -1
- package/dist/modes/interactive/chat-viewport.d.ts +0 -20
- package/dist/modes/interactive/chat-viewport.d.ts.map +0 -1
- package/dist/modes/interactive/chat-viewport.js.map +0 -1
- package/dist/modes/interactive/components/armin.d.ts +0 -34
- package/dist/modes/interactive/components/armin.d.ts.map +0 -1
- package/dist/modes/interactive/components/armin.js.map +0 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +0 -41
- package/dist/modes/interactive/components/assistant-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/assistant-message.js.map +0 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +0 -35
- package/dist/modes/interactive/components/bash-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/bash-execution.js.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.d.ts +0 -16
- package/dist/modes/interactive/components/bordered-loader.d.ts.map +0 -1
- package/dist/modes/interactive/components/bordered-loader.js.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/branch-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +0 -16
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/compaction-summary-message.js.map +0 -1
- package/dist/modes/interactive/components/config-selector.d.ts +0 -103
- package/dist/modes/interactive/components/config-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/config-selector.js.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.d.ts +0 -14
- package/dist/modes/interactive/components/countdown-timer.d.ts.map +0 -1
- package/dist/modes/interactive/components/countdown-timer.js.map +0 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +0 -30
- package/dist/modes/interactive/components/custom-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-editor.js.map +0 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +0 -19
- package/dist/modes/interactive/components/custom-entry.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-entry.js.map +0 -1
- package/dist/modes/interactive/components/custom-message.d.ts +0 -22
- package/dist/modes/interactive/components/custom-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/custom-message.js.map +0 -1
- package/dist/modes/interactive/components/dal-brand.d.ts +0 -46
- package/dist/modes/interactive/components/dal-brand.d.ts.map +0 -1
- package/dist/modes/interactive/components/dal-brand.js.map +0 -1
- package/dist/modes/interactive/components/daxnuts.d.ts +0 -23
- package/dist/modes/interactive/components/daxnuts.d.ts.map +0 -1
- package/dist/modes/interactive/components/daxnuts.js.map +0 -1
- package/dist/modes/interactive/components/diff.d.ts +0 -12
- package/dist/modes/interactive/components/diff.d.ts.map +0 -1
- package/dist/modes/interactive/components/diff.js.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.d.ts +0 -20
- package/dist/modes/interactive/components/dynamic-border.d.ts.map +0 -1
- package/dist/modes/interactive/components/dynamic-border.js.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +0 -21
- package/dist/modes/interactive/components/extension-editor.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-editor.js.map +0 -1
- package/dist/modes/interactive/components/extension-input.d.ts +0 -23
- package/dist/modes/interactive/components/extension-input.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-input.js.map +0 -1
- package/dist/modes/interactive/components/extension-selector.d.ts +0 -26
- package/dist/modes/interactive/components/extension-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/extension-selector.js.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +0 -25
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +0 -1
- package/dist/modes/interactive/components/first-time-setup.js.map +0 -1
- package/dist/modes/interactive/components/footer.d.ts +0 -34
- package/dist/modes/interactive/components/footer.d.ts.map +0 -1
- package/dist/modes/interactive/components/footer.js.map +0 -1
- package/dist/modes/interactive/components/index.d.ts +0 -34
- package/dist/modes/interactive/components/index.d.ts.map +0 -1
- package/dist/modes/interactive/components/index.js.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.d.ts +0 -13
- package/dist/modes/interactive/components/keybinding-hints.d.ts.map +0 -1
- package/dist/modes/interactive/components/keybinding-hints.js.map +0 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +0 -52
- package/dist/modes/interactive/components/login-dialog.d.ts.map +0 -1
- package/dist/modes/interactive/components/login-dialog.js.map +0 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +0 -3
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +0 -1
- package/dist/modes/interactive/components/markdown-transform.js.map +0 -1
- package/dist/modes/interactive/components/mermaid.d.ts +0 -11
- package/dist/modes/interactive/components/mermaid.d.ts.map +0 -1
- package/dist/modes/interactive/components/mermaid.js.map +0 -1
- package/dist/modes/interactive/components/model-selector.d.ts +0 -60
- package/dist/modes/interactive/components/model-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/model-selector.js.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +0 -33
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +0 -46
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +0 -23
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector-search.js.map +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -95
- package/dist/modes/interactive/components/session-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/session-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +0 -94
- package/dist/modes/interactive/components/settings-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-selector.js.map +0 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +0 -72
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +0 -1
- package/dist/modes/interactive/components/settings-submenu.js.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.d.ts +0 -10
- package/dist/modes/interactive/components/show-images-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/show-images-selector.js.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +0 -17
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +0 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +0 -46
- package/dist/modes/interactive/components/status-indicator.d.ts.map +0 -1
- package/dist/modes/interactive/components/status-indicator.js.map +0 -1
- package/dist/modes/interactive/components/theme-selector.d.ts +0 -11
- package/dist/modes/interactive/components/theme-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/theme-selector.js.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts +0 -23
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +0 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +0 -113
- package/dist/modes/interactive/components/tool-execution.d.ts.map +0 -1
- package/dist/modes/interactive/components/tool-execution.js.map +0 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +0 -94
- package/dist/modes/interactive/components/tree-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/tree-selector.js.map +0 -1
- package/dist/modes/interactive/components/trust-selector.d.ts +0 -23
- package/dist/modes/interactive/components/trust-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/trust-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +0 -30
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +0 -1
- package/dist/modes/interactive/components/user-message.d.ts +0 -19
- package/dist/modes/interactive/components/user-message.d.ts.map +0 -1
- package/dist/modes/interactive/components/user-message.js.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +0 -24
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +0 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +0 -1
- package/dist/modes/interactive/external-editor.d.ts +0 -12
- package/dist/modes/interactive/external-editor.d.ts.map +0 -1
- package/dist/modes/interactive/external-editor.js.map +0 -1
- package/dist/modes/interactive/interactive-mode.d.ts +0 -490
- package/dist/modes/interactive/interactive-mode.d.ts.map +0 -1
- package/dist/modes/interactive/interactive-mode.js.map +0 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +0 -7
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +0 -1
- package/dist/modes/interactive/model-catalog-refresh.js.map +0 -1
- package/dist/modes/interactive/model-search.d.ts +0 -12
- package/dist/modes/interactive/model-search.d.ts.map +0 -1
- package/dist/modes/interactive/model-search.js.map +0 -1
- package/dist/modes/interactive/session-share.d.ts +0 -16
- package/dist/modes/interactive/session-share.d.ts.map +0 -1
- package/dist/modes/interactive/session-share.js.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +0 -41
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-controller.js.map +0 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +0 -84
- package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/dist/modes/interactive/theme/theme.d.ts +0 -131
- package/dist/modes/interactive/theme/theme.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme.js.map +0 -1
- package/dist/modes/interactive/tui-renderer.d.ts +0 -21
- package/dist/modes/interactive/tui-renderer.d.ts.map +0 -1
- package/dist/modes/interactive/tui-renderer.js.map +0 -1
- package/dist/modes/json-event.d.ts +0 -34
- package/dist/modes/json-event.d.ts.map +0 -1
- package/dist/modes/json-event.js.map +0 -1
- package/dist/modes/print-mode.d.ts +0 -28
- package/dist/modes/print-mode.d.ts.map +0 -1
- package/dist/modes/print-mode.js.map +0 -1
- package/dist/modes/rpc/jsonl.d.ts +0 -17
- package/dist/modes/rpc/jsonl.d.ts.map +0 -1
- package/dist/modes/rpc/jsonl.js.map +0 -1
- package/dist/modes/rpc/rpc-client.d.ts +0 -269
- package/dist/modes/rpc/rpc-client.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-client.js.map +0 -1
- package/dist/modes/rpc/rpc-mode.d.ts +0 -20
- package/dist/modes/rpc/rpc-mode.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-mode.js.map +0 -1
- package/dist/modes/rpc/rpc-types.d.ts +0 -497
- package/dist/modes/rpc/rpc-types.d.ts.map +0 -1
- package/dist/modes/rpc/rpc-types.js.map +0 -1
- package/dist/node_modules/@dalcode/dal-bridge/src/client.ts +0 -77
- package/dist/node_modules/@dalcode/dal-bridge/src/index.ts +0 -204
- package/dist/node_modules/@dalcode/dal-gateway/src/index.ts +0 -161
- package/dist/node_modules/@dalcode/dal-guard/src/index.ts +0 -262
- package/dist/node_modules/@dalcode/dal-halo/src/halo-client.ts +0 -118
- package/dist/node_modules/@dalcode/dal-halo/src/index.ts +0 -131
- package/dist/node_modules/@dalcode/dal-lang/src/index.ts +0 -74
- package/dist/node_modules/@dalcode/dal-lsp/src/client.ts +0 -260
- package/dist/node_modules/@dalcode/dal-lsp/src/config.ts +0 -188
- package/dist/node_modules/@dalcode/dal-lsp/src/format.ts +0 -88
- package/dist/node_modules/@dalcode/dal-lsp/src/index.ts +0 -199
- package/dist/node_modules/@dalcode/dal-lsp/src/types.ts +0 -21
- package/dist/node_modules/@dalcode/dal-mcp/src/account-layer.ts +0 -85
- package/dist/node_modules/@dalcode/dal-mcp/src/add-wizard.ts +0 -142
- package/dist/node_modules/@dalcode/dal-mcp/src/command-parser.ts +0 -218
- package/dist/node_modules/@dalcode/dal-mcp/src/config-edit.ts +0 -99
- package/dist/node_modules/@dalcode/dal-mcp/src/config.ts +0 -157
- package/dist/node_modules/@dalcode/dal-mcp/src/http-client.ts +0 -134
- package/dist/node_modules/@dalcode/dal-mcp/src/index.ts +0 -480
- package/dist/node_modules/@dalcode/dal-mcp/src/report.ts +0 -33
- package/dist/node_modules/@dalcode/dal-mcp/src/stdio-client.ts +0 -164
- package/dist/node_modules/@dalcode/dal-mcp/src/types.ts +0 -39
- package/dist/node_modules/@dalcode/dal-office/src/extract/csv.ts +0 -84
- package/dist/node_modules/@dalcode/dal-office/src/extract/index.ts +0 -111
- package/dist/node_modules/@dalcode/dal-office/src/extract/ooxml.ts +0 -109
- package/dist/node_modules/@dalcode/dal-office/src/extract/pdf.ts +0 -43
- package/dist/node_modules/@dalcode/dal-office/src/index.ts +0 -43
- package/dist/node_modules/@dalcode/dal-office/src/paths.ts +0 -107
- package/dist/node_modules/@dalcode/dal-office/src/render/chart.ts +0 -111
- package/dist/node_modules/@dalcode/dal-office/src/render/docx.ts +0 -166
- package/dist/node_modules/@dalcode/dal-office/src/render/pptx.ts +0 -386
- package/dist/node_modules/@dalcode/dal-office/src/render/xlsx.ts +0 -128
- package/dist/node_modules/@dalcode/dal-office/src/scenes.ts +0 -197
- package/dist/node_modules/@dalcode/dal-office/src/scratchpad.ts +0 -49
- package/dist/node_modules/@dalcode/dal-office/src/themes.ts +0 -240
- package/dist/node_modules/@dalcode/dal-office/src/tools/chart-generate.ts +0 -131
- package/dist/node_modules/@dalcode/dal-office/src/tools/doc-generate.ts +0 -123
- package/dist/node_modules/@dalcode/dal-office/src/tools/drawio-generate.ts +0 -99
- package/dist/node_modules/@dalcode/dal-office/src/tools/md-generate.ts +0 -76
- package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-generate.ts +0 -110
- package/dist/node_modules/@dalcode/dal-office/src/tools/ppt-plan.ts +0 -91
- package/dist/node_modules/@dalcode/dal-office/src/tools/read-file.ts +0 -71
- package/dist/node_modules/@dalcode/dal-office/src/tools/shared.ts +0 -54
- package/dist/node_modules/@dalcode/dal-office/src/tools/sheet-generate.ts +0 -101
- package/dist/node_modules/@dalcode/dal-office/src/truncate.ts +0 -27
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.d.ts +0 -25
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.d.ts.map +0 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/i18n.js.map +0 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/index.d.ts +0 -2
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/dist/index.js.map +0 -1
- package/dist/node_modules/@dalcode/dal-pi-kit/src/i18n.ts +0 -735
- package/dist/node_modules/@dalcode/dal-pi-kit/src/index.ts +0 -1
- package/dist/node_modules/@dalcode/dal-router/src/classifier.ts +0 -80
- package/dist/node_modules/@dalcode/dal-router/src/commands.ts +0 -104
- package/dist/node_modules/@dalcode/dal-router/src/config.ts +0 -137
- package/dist/node_modules/@dalcode/dal-router/src/features.ts +0 -85
- package/dist/node_modules/@dalcode/dal-router/src/index.ts +0 -236
- package/dist/node_modules/@dalcode/dal-router/src/router.ts +0 -150
- package/dist/node_modules/@dalcode/dal-router/src/runtime.ts +0 -88
- package/dist/node_modules/@dalcode/dal-router/src/small-model.ts +0 -36
- package/dist/node_modules/@dalcode/dal-router/src/subagent.ts +0 -58
- package/dist/node_modules/@dalcode/dal-router/src/tiers.ts +0 -187
- package/dist/node_modules/@dalcode/dal-skills/src/client.ts +0 -96
- package/dist/node_modules/@dalcode/dal-skills/src/discover.ts +0 -101
- package/dist/node_modules/@dalcode/dal-skills/src/index.ts +0 -277
- package/dist/node_modules/@dalcode/dal-skills/src/install.ts +0 -140
- package/dist/node_modules/@dalcode/dal-skills/src/manage.ts +0 -446
- package/dist/node_modules/@dalcode/dal-skills/src/packages.ts +0 -130
- package/dist/node_modules/@dalcode/dal-subagent/src/index.ts +0 -273
- package/dist/node_modules/@dalcode/dal-telemetry/src/config.ts +0 -137
- package/dist/node_modules/@dalcode/dal-telemetry/src/index.ts +0 -176
- package/dist/node_modules/@dalcode/dal-telemetry/src/redact.ts +0 -98
- package/dist/node_modules/@dalcode/dal-telemetry/src/reporter.ts +0 -145
- package/dist/node_modules/@dalcode/deepailab/src/index.ts +0 -420
- package/dist/node_modules/@dalcode/deepailab/src/model-defaults.ts +0 -276
- package/dist/node_modules/@dalcode/deepailab/src/oidc.ts +0 -507
- package/dist/node_modules/@earendil-works/chord/dist/api.d.ts +0 -15
- package/dist/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
- package/dist/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/context/index.d.ts +0 -24
- package/dist/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/context/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/delta/index.d.ts +0 -119
- package/dist/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/delta/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
- package/dist/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
- package/dist/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/index.d.ts +0 -11
- package/dist/node_modules/@earendil-works/chord/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/json.d.ts +0 -4
- package/dist/node_modules/@earendil-works/chord/dist/json.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/json.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
- package/dist/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
- package/dist/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node.d.ts +0 -5
- package/dist/node_modules/@earendil-works/chord/dist/node.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/node.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
- package/dist/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
- package/dist/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
- package/dist/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -25
- package/dist/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
- package/dist/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
- package/dist/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
- package/dist/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -11
- package/dist/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -23
- package/dist/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -60
- package/dist/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/types.d.ts +0 -203
- package/dist/node_modules/@earendil-works/chord/dist/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/chord/dist/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +0 -122
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts +0 -716
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts +0 -68
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +0 -126
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/utils.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/config.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/context.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/events.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/assistant.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/effect-gate.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts +0 -67
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/execution/tools.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts +0 -38
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/hooks.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts +0 -51
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/messages.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts +0 -49
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/prompt-templates.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts +0 -100
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js +0 -415
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/reducer.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts +0 -133
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/result.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/boundary.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/checkpoint.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/deferred.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/generation.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/reconcile.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/recovery.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts +0 -23
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/response.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/retry.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts +0 -32
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/structural.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/terminal.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts +0 -14
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tool-placement.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive/tools.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/drive.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts +0 -59
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/harness.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts +0 -101
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/lane.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/progress.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/reducer.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/restore.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts +0 -21
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/transcript.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts +0 -105
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/runtime/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts +0 -53
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/commit.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/context.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts +0 -13
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork-policy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts +0 -18
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/fork.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts +0 -39
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/in-memory-storage-state.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts +0 -11
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts +0 -21
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/codec.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js +0 -19
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/errors.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts +0 -18
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/legacy-v3.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts +0 -34
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/repo.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts +0 -41
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts +0 -39
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js +0 -103
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js +0 -293
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js +0 -2
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/jsonl.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js +0 -42
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-repo.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts +0 -33
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js +0 -168
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory-storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts +0 -50
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/memory.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/mutation-line.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js +0 -39
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/repo-utils.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts +0 -82
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts +0 -65
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js +0 -319
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/state.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts +0 -12
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/datasets.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/session-repo.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/benchmark/storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts +0 -21
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/session-repo.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance/storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js +0 -762
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/conformance.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/gating-storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts +0 -11
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/instrumented-storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts +0 -20
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/storage-decorator.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts +0 -12
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/testing/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts +0 -511
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts +0 -95
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/session/values.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +0 -46
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/system-prompt.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts +0 -1242
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/telemetry.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts +0 -27
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.d.ts +0 -89
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts +0 -19
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts +0 -35
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts +0 -11
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +0 -291
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/adaptive-publisher.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts +0 -31
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/output-capture.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts +0 -29
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts +0 -71
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/usage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/node.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +0 -72
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts +0 -29
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts +0 -29
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js +0 -103
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/search/scanning.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/stream-fn.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/stream-fn.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/stream-fn.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +0 -416
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +0 -71
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts +0 -38
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts +0 -77
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-ai-binding.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts +0 -69
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js +0 -159
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-gateway-binding.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/cloudflare.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts +0 -20
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/github-copilot-headers.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/github-copilot-headers.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/github-copilot-headers.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts +0 -13
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +0 -93
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts +0 -19
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts +0 -31
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-prompt-cache.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts +0 -14
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts +0 -99
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.lazy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/api/transform-messages.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/context.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/context.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/context.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/credential-store.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/helpers.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/helpers.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/helpers.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/kimi-coding.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts +0 -27
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/oauth-page.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/pkce.d.ts +0 -13
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/pkce.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/pkce.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/radius.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/xai.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/xai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/oauth/xai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +0 -231
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/bedrock-provider.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/bun-oauth.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/bun-oauth.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/cli.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts +0 -39
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat/extension-oauth-types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat.d.ts +0 -67
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/compat.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +0 -815
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/image-models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts +0 -14
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-api-registry.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-api-registry.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.d.ts +0 -95
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images-models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/images.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/images.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts +0 -38
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/legacy-api-aliases.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/model-catalog.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/model-catalog.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/model-catalog.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models-store.d.ts +0 -29
- package/dist/node_modules/@earendil-works/pi-ai/dist/models-store.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models-store.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts +0 -211
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +0 -81
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/oauth.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/oauth.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/baseten.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-auth.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-stream.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-stream.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-stream.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts +0 -102
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/images/register-builtins.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-individual.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius-config.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/radius.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/session-resources.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/session-resources.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts +0 -745
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/abort.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts +0 -77
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/assistant-message-frame.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.d.ts +0 -9
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/deferred-tools.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts +0 -19
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/diagnostics.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/error-body.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/error-body.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/estimate.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/estimate.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +0 -21
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/hash.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/hash.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/headers.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/headers.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts +0 -16
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/json-parse.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/node-http-proxy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +0 -68
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-env.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +0 -16
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts +0 -53
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sanitize-unicode.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sleep.d.ts +0 -2
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sleep.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/sleep.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/text.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/typebox-helpers.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/uuid.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/uuid.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts +0 -18
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-ai/dist/utils/validation.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/client.d.ts +0 -30
- package/dist/node_modules/@earendil-works/pi-client/dist/client.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/client.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/connection.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-client/dist/connection.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/connection.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/errors.d.ts +0 -14
- package/dist/node_modules/@earendil-works/pi-client/dist/errors.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/errors.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/index.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-client/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/promise.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-client/dist/promise.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/promise.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts +0 -58
- package/dist/node_modules/@earendil-works/pi-client/dist/session-handle.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/session-handle.js +0 -57
- package/dist/node_modules/@earendil-works/pi-client/dist/session-handle.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/state.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-client/dist/state.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/state.js +0 -148
- package/dist/node_modules/@earendil-works/pi-client/dist/state.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/transport.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-client/dist/transport.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/transport.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/types.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-client/dist/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/unix.d.ts +0 -21
- package/dist/node_modules/@earendil-works/pi-client/dist/unix.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-client/dist/unix.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/decoder.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/encoder.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/options.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/cbor/options.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts +0 -27
- package/dist/node_modules/@earendil-works/pi-protocol/dist/codec.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/codec.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts +0 -27
- package/dist/node_modules/@earendil-works/pi-protocol/dist/framing.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/framing.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/index.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-protocol/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/protocol.d.ts +0 -167
- package/dist/node_modules/@earendil-works/pi-protocol/dist/protocol.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/protocol.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts +0 -14002
- package/dist/node_modules/@earendil-works/pi-protocol/dist/schemas.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-protocol/dist/schemas.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/cli.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-server/dist/cli.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/cli.js +0 -136
- package/dist/node_modules/@earendil-works/pi-server/dist/cli.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/config.d.ts +0 -12
- package/dist/node_modules/@earendil-works/pi-server/dist/config.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/config.js +0 -55
- package/dist/node_modules/@earendil-works/pi-server/dist/config.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/connection.d.ts +0 -35
- package/dist/node_modules/@earendil-works/pi-server/dist/connection.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/connection.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/errors.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-server/dist/errors.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/errors.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/handler.d.ts +0 -14
- package/dist/node_modules/@earendil-works/pi-server/dist/handler.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/handler.js +0 -105
- package/dist/node_modules/@earendil-works/pi-server/dist/handler.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/index.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-server/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/client.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/client.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/client.js +0 -56
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/client.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/protocol.d.ts +0 -99
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/protocol.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/protocol.js +0 -12
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/protocol.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/server.d.ts +0 -20
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/server.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/server.js +0 -145
- package/dist/node_modules/@earendil-works/pi-server/dist/ipc/server.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/listener.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-server/dist/listener.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/listener.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/protocol.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-server/dist/protocol.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/protocol.js +0 -266
- package/dist/node_modules/@earendil-works/pi-server/dist/protocol.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/radius.d.ts +0 -36
- package/dist/node_modules/@earendil-works/pi-server/dist/radius.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/radius.js +0 -360
- package/dist/node_modules/@earendil-works/pi-server/dist/radius.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/rpc-process.d.ts +0 -31
- package/dist/node_modules/@earendil-works/pi-server/dist/rpc-process.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/rpc-process.js +0 -168
- package/dist/node_modules/@earendil-works/pi-server/dist/rpc-process.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/serve.d.ts +0 -2
- package/dist/node_modules/@earendil-works/pi-server/dist/serve.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/serve.js +0 -70
- package/dist/node_modules/@earendil-works/pi-server/dist/serve.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/server.d.ts +0 -46
- package/dist/node_modules/@earendil-works/pi-server/dist/server.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/server.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/session-router.d.ts +0 -40
- package/dist/node_modules/@earendil-works/pi-server/dist/session-router.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/session-router.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/sessions.d.ts +0 -2195
- package/dist/node_modules/@earendil-works/pi-server/dist/sessions.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/sessions.js +0 -332
- package/dist/node_modules/@earendil-works/pi-server/dist/sessions.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/snapshots.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-server/dist/snapshots.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/snapshots.js +0 -39
- package/dist/node_modules/@earendil-works/pi-server/dist/snapshots.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/storage.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-server/dist/storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/storage.js +0 -58
- package/dist/node_modules/@earendil-works/pi-server/dist/storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/supervisor.d.ts +0 -34
- package/dist/node_modules/@earendil-works/pi-server/dist/supervisor.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/supervisor.js +0 -290
- package/dist/node_modules/@earendil-works/pi-server/dist/supervisor.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/client.d.ts +0 -35
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/client.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/client.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/host.d.ts +0 -57
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/host.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/host.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/index.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/server.d.ts +0 -13
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/server.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/server.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/service.d.ts +0 -66
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/service.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/service.js +0 -254
- package/dist/node_modules/@earendil-works/pi-server/dist/testing/service.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/address.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/address.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/address.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/index.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/listener.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/listener.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/listener.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/preset.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/preset.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/preset.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/types.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/transports/unix/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/types.d.ts +0 -49
- package/dist/node_modules/@earendil-works/pi-server/dist/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-server/dist/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/index.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/branch-cache.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/branch-cache.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/branch-cache.js +0 -70
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/branch-cache.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/index.d.ts +0 -5
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/migrations.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/migrations.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/migrations.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/repo.d.ts +0 -41
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/repo.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/repo.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/search-backend.d.ts +0 -14
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/search-backend.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/search-backend.js +0 -153
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/search-backend.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/branch-entries.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/branch-entries.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/branch-entries.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/entries.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/entries.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/entries.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-row.d.ts +0 -23
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-row.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-row.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-sequences.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-sequences.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-sequences.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-stats.d.ts +0 -6
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-stats.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/session-stats.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/usage-ledger.d.ts +0 -20
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/usage-ledger.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/usage-ledger.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/values.d.ts +0 -23
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/values.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session/values.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/session.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/sql.d.ts +0 -19
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/sql.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/sql.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-entries.d.ts +0 -41
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-entries.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-entries.js +0 -112
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-entries.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-tips.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-tips.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-tips.js +0 -22
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/branch-tips.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/entries.d.ts +0 -34
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/entries.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/entries.js +0 -37
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/entries.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/facts.d.ts +0 -20
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/facts.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/facts.js +0 -38
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/facts.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/lanes.d.ts +0 -35
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/lanes.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/lanes.js +0 -95
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/lanes.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/records.d.ts +0 -38
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/records.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/records.js +0 -49
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/records.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-sequences.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-sequences.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-sequences.js +0 -22
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-sequences.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-stats.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-stats.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-stats.js +0 -40
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/session-stats.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/sessions.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/sessions.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/sessions.js +0 -99
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/sessions.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/writer-leases.d.ts +0 -15
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/writer-leases.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/writer-leases.js +0 -31
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage/writer-leases.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage.d.ts +0 -38
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/storage.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/types.d.ts +0 -29
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-session-backend-sqlite-node/dist/sqlite/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts +0 -194
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts +0 -26
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/memory.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/noop.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/conformance.d.ts +0 -4
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/conformance.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/conformance.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/index.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/types.d.ts +0 -16
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/types.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-telemetry/dist/testing/types.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts +0 -46
- package/dist/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/alt-screen-search.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -57
- package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts +0 -13
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/alt-screen-flash.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -24
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -269
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/h-stack.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/h-stack.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -48
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -46
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -103
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts +0 -12
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/mouse-region.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts +0 -63
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/scroll-view.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -53
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -60
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts +0 -38
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/stack.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/stack.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts +0 -8
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/v-stack.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/components/v-stack.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -41
- package/dist/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
- package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -32
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -273
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
- package/dist/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
- package/dist/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/latex.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-tui/dist/latex.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/latex.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout-node.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout-node.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout.d.ts +0 -42
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/layout.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts +0 -7
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-module-path.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/native-module-path.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -57
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-colors.d.ts +0 -10
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-colors.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-colors.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -118
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -131
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +0 -160
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts +0 -39
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -399
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
- package/dist/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -98
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
- package/dist/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
- package/dist/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
- package/dist/package-manager-cli.d.ts +0 -10
- package/dist/package-manager-cli.d.ts.map +0 -1
- package/dist/package-manager-cli.js.map +0 -1
- package/dist/rpc-entry.d.ts +0 -3
- package/dist/rpc-entry.d.ts.map +0 -1
- package/dist/rpc-entry.js.map +0 -1
- package/dist/server/create-harness.d.ts +0 -26
- package/dist/server/create-harness.d.ts.map +0 -1
- package/dist/server/create-harness.js +0 -106
- package/dist/server/create-harness.js.map +0 -1
- package/dist/utils/abort.d.ts +0 -5
- package/dist/utils/abort.d.ts.map +0 -1
- package/dist/utils/abort.js.map +0 -1
- package/dist/utils/ansi.d.ts +0 -2
- package/dist/utils/ansi.d.ts.map +0 -1
- package/dist/utils/ansi.js.map +0 -1
- package/dist/utils/changelog.d.ts +0 -57
- package/dist/utils/changelog.d.ts.map +0 -1
- package/dist/utils/changelog.js.map +0 -1
- package/dist/utils/child-process.d.ts +0 -18
- package/dist/utils/child-process.d.ts.map +0 -1
- package/dist/utils/child-process.js.map +0 -1
- package/dist/utils/clipboard-image.d.ts +0 -11
- package/dist/utils/clipboard-image.d.ts.map +0 -1
- package/dist/utils/clipboard-image.js.map +0 -1
- package/dist/utils/clipboard-native.d.ts +0 -11
- package/dist/utils/clipboard-native.d.ts.map +0 -1
- package/dist/utils/clipboard-native.js.map +0 -1
- package/dist/utils/clipboard.d.ts +0 -4
- package/dist/utils/clipboard.d.ts.map +0 -1
- package/dist/utils/clipboard.js.map +0 -1
- package/dist/utils/deprecation.d.ts +0 -4
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js.map +0 -1
- package/dist/utils/exif-orientation.d.ts +0 -5
- package/dist/utils/exif-orientation.d.ts.map +0 -1
- package/dist/utils/exif-orientation.js.map +0 -1
- package/dist/utils/frontmatter.d.ts +0 -8
- package/dist/utils/frontmatter.d.ts.map +0 -1
- package/dist/utils/frontmatter.js.map +0 -1
- package/dist/utils/fs-watch.d.ts +0 -5
- package/dist/utils/fs-watch.d.ts.map +0 -1
- package/dist/utils/fs-watch.js.map +0 -1
- package/dist/utils/git.d.ts +0 -26
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/html.d.ts +0 -7
- package/dist/utils/html.d.ts.map +0 -1
- package/dist/utils/html.js.map +0 -1
- package/dist/utils/image-convert.d.ts +0 -10
- package/dist/utils/image-convert.d.ts.map +0 -1
- package/dist/utils/image-convert.js.map +0 -1
- package/dist/utils/image-process.d.ts +0 -18
- package/dist/utils/image-process.d.ts.map +0 -1
- package/dist/utils/image-process.js.map +0 -1
- package/dist/utils/image-resize-core.d.ts +0 -30
- package/dist/utils/image-resize-core.d.ts.map +0 -1
- package/dist/utils/image-resize-core.js.map +0 -1
- package/dist/utils/image-resize-worker.d.ts +0 -2
- package/dist/utils/image-resize-worker.d.ts.map +0 -1
- package/dist/utils/image-resize-worker.js.map +0 -1
- package/dist/utils/image-resize.d.ts +0 -16
- package/dist/utils/image-resize.d.ts.map +0 -1
- package/dist/utils/image-resize.js.map +0 -1
- package/dist/utils/json.d.ts +0 -3
- package/dist/utils/json.d.ts.map +0 -1
- package/dist/utils/json.js.map +0 -1
- package/dist/utils/management-http.d.ts +0 -25
- package/dist/utils/management-http.d.ts.map +0 -1
- package/dist/utils/management-http.js.map +0 -1
- package/dist/utils/mime.d.ts +0 -3
- package/dist/utils/mime.d.ts.map +0 -1
- package/dist/utils/mime.js.map +0 -1
- package/dist/utils/offline.d.ts +0 -12
- package/dist/utils/offline.d.ts.map +0 -1
- package/dist/utils/offline.js.map +0 -1
- package/dist/utils/open-browser.d.ts +0 -9
- package/dist/utils/open-browser.d.ts.map +0 -1
- package/dist/utils/open-browser.js.map +0 -1
- package/dist/utils/paths.d.ts +0 -34
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/dist/utils/photon.d.ts +0 -21
- package/dist/utils/photon.d.ts.map +0 -1
- package/dist/utils/photon.js.map +0 -1
- package/dist/utils/pi-user-agent.d.ts +0 -2
- package/dist/utils/pi-user-agent.d.ts.map +0 -1
- package/dist/utils/pi-user-agent.js.map +0 -1
- package/dist/utils/shell.d.ts +0 -34
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/shell.js.map +0 -1
- package/dist/utils/sleep.d.ts +0 -5
- package/dist/utils/sleep.d.ts.map +0 -1
- package/dist/utils/sleep.js.map +0 -1
- package/dist/utils/syntax-highlight.d.ts +0 -13
- package/dist/utils/syntax-highlight.d.ts.map +0 -1
- package/dist/utils/syntax-highlight.js.map +0 -1
- package/dist/utils/text.d.ts +0 -8
- package/dist/utils/text.d.ts.map +0 -1
- package/dist/utils/text.js.map +0 -1
- package/dist/utils/tool-result-images.d.ts +0 -19
- package/dist/utils/tool-result-images.d.ts.map +0 -1
- package/dist/utils/tool-result-images.js.map +0 -1
- package/dist/utils/tools-manager.d.ts +0 -13
- package/dist/utils/tools-manager.d.ts.map +0 -1
- package/dist/utils/tools-manager.js.map +0 -1
- package/dist/utils/version-check.d.ts +0 -23
- package/dist/utils/version-check.d.ts.map +0 -1
- package/dist/utils/version-check.js.map +0 -1
- package/dist/utils/windows-self-update.d.ts +0 -3
- package/dist/utils/windows-self-update.d.ts.map +0 -1
- package/dist/utils/windows-self-update.js.map +0 -1
- package/examples/extensions/kimi-deferred-tools.ts +0 -61
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../src/core/tools/write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAI/D,OAAO,EAAE,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,wBAAwB,CAAC;AAMtF,QAAA,MAAM,WAAW;;;EAGf,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;CAGpC,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,8BAA8B;IAC9B,SAAS,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpE,mCAAmC;IACnC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAOD,MAAM,WAAW,gBAAgB;IAChC,oEAAoE;IACpE,UAAU,CAAC,EAAE,eAAe,CAAC;CAC7B;AAgJD,wBAAgB,yBAAyB,CACxC,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,gBAAgB,GACxB,cAAc,CAAC,OAAO,WAAW,EAAE,SAAS,CAAC,CAgF/C;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC,OAAO,WAAW,CAAC,CAEtG","sourcesContent":["import type { AgentTool } from \"@earendil-works/pi-agent-core\";\nimport { Container, Text } from \"@earendil-works/pi-tui\";\nimport { mkdir as fsMkdir, writeFile as fsWriteFile } from \"fs/promises\";\nimport { dirname } from \"path\";\nimport { type Static, Type } from \"typebox\";\nimport { keyHint } from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport { getLanguageFromPath, highlightCode, type Theme } from \"../../modes/interactive/theme/theme.ts\";\nimport { getExperimentalToolSampling } from \"../experimental.ts\";\nimport type { ToolDefinition, ToolRenderResultOptions } from \"../extensions/types.ts\";\nimport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nimport { resolveToCwd } from \"./path-utils.ts\";\nimport { normalizeDisplayText, renderToolPath, replaceTabs, str } from \"./render-utils.ts\";\nimport { wrapToolDefinition } from \"./tool-definition-wrapper.ts\";\n\nconst writeSchema = Type.Object({\n\tpath: Type.String({ description: \"Path to the file to write (relative or absolute)\" }),\n\tcontent: Type.String({ description: \"Content to write to the file\" }),\n});\n\nexport const writeToolSystemPromptContribution = {\n\tsnippet: \"Create or overwrite files\",\n\tguidelines: [\"Use write only for new files or complete rewrites.\"],\n} as const;\n\nexport type WriteToolInput = Static<typeof writeSchema>;\n\n/**\n * Pluggable operations for the write tool.\n * Override these to delegate file writing to remote systems (for example SSH).\n */\nexport interface WriteOperations {\n\t/** Write content to a file */\n\twriteFile: (absolutePath: string, content: string) => Promise<void>;\n\t/** Create directory recursively */\n\tmkdir: (dir: string) => Promise<void>;\n}\n\nconst defaultWriteOperations: WriteOperations = {\n\twriteFile: (path, content) => fsWriteFile(path, content, \"utf-8\"),\n\tmkdir: (dir) => fsMkdir(dir, { recursive: true }).then(() => {}),\n};\n\nexport interface WriteToolOptions {\n\t/** Custom operations for file writing. Default: local filesystem */\n\toperations?: WriteOperations;\n}\n\ntype WriteHighlightCache = {\n\trawPath: string | null;\n\tlang: string;\n\trawContent: string;\n\tnormalizedLines: string[];\n\thighlightedLines: string[];\n};\n\nclass WriteCallRenderComponent extends Text {\n\tcache?: WriteHighlightCache;\n\n\tconstructor() {\n\t\tsuper(\"\", 0, 0);\n\t}\n}\n\nconst WRITE_PARTIAL_FULL_HIGHLIGHT_LINES = 50;\n\nfunction highlightSingleLine(line: string, lang: string): string {\n\tconst highlighted = highlightCode(line, lang);\n\treturn highlighted[0] ?? \"\";\n}\n\nfunction refreshWriteHighlightPrefix(cache: WriteHighlightCache): void {\n\tconst prefixCount = Math.min(WRITE_PARTIAL_FULL_HIGHLIGHT_LINES, cache.normalizedLines.length);\n\tif (prefixCount === 0) return;\n\tconst prefixSource = cache.normalizedLines.slice(0, prefixCount).join(\"\\n\");\n\tconst prefixHighlighted = highlightCode(prefixSource, cache.lang);\n\tfor (let i = 0; i < prefixCount; i++) {\n\t\tcache.highlightedLines[i] =\n\t\t\tprefixHighlighted[i] ?? highlightSingleLine(cache.normalizedLines[i] ?? \"\", cache.lang);\n\t}\n}\n\nfunction rebuildWriteHighlightCacheFull(rawPath: string | null, fileContent: string): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tconst displayContent = normalizeDisplayText(fileContent);\n\tconst normalized = replaceTabs(displayContent);\n\treturn {\n\t\trawPath,\n\t\tlang,\n\t\trawContent: fileContent,\n\t\tnormalizedLines: normalized.split(\"\\n\"),\n\t\thighlightedLines: highlightCode(normalized, lang),\n\t};\n}\n\nfunction updateWriteHighlightCacheIncremental(\n\tcache: WriteHighlightCache | undefined,\n\trawPath: string | null,\n\tfileContent: string,\n): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tif (!cache) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (cache.lang !== lang || cache.rawPath !== rawPath) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (!fileContent.startsWith(cache.rawContent)) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (fileContent.length === cache.rawContent.length) return cache;\n\n\tconst deltaRaw = fileContent.slice(cache.rawContent.length);\n\tconst deltaDisplay = normalizeDisplayText(deltaRaw);\n\tconst deltaNormalized = replaceTabs(deltaDisplay);\n\tcache.rawContent = fileContent;\n\tif (cache.normalizedLines.length === 0) {\n\t\tcache.normalizedLines.push(\"\");\n\t\tcache.highlightedLines.push(\"\");\n\t}\n\n\tconst segments = deltaNormalized.split(\"\\n\");\n\tconst lastIndex = cache.normalizedLines.length - 1;\n\tcache.normalizedLines[lastIndex] += segments[0];\n\tcache.highlightedLines[lastIndex] = highlightSingleLine(cache.normalizedLines[lastIndex], cache.lang);\n\tfor (let i = 1; i < segments.length; i++) {\n\t\tcache.normalizedLines.push(segments[i]);\n\t\tcache.highlightedLines.push(highlightSingleLine(segments[i], cache.lang));\n\t}\n\trefreshWriteHighlightPrefix(cache);\n\treturn cache;\n}\n\nfunction trimTrailingEmptyLines(lines: string[]): string[] {\n\tlet end = lines.length;\n\twhile (end > 0 && lines[end - 1] === \"\") {\n\t\tend--;\n\t}\n\treturn lines.slice(0, end);\n}\n\nfunction formatWriteCall(\n\targs: { path?: string; file_path?: string; content?: string } | undefined,\n\toptions: ToolRenderResultOptions,\n\ttheme: Theme,\n\tcache: WriteHighlightCache | undefined,\n\tcwd: string,\n): string {\n\tconst rawPath = str(args?.file_path ?? args?.path);\n\tconst fileContent = str(args?.content);\n\tconst pathDisplay = renderToolPath(rawPath, theme, cwd);\n\tlet text = `${theme.fg(\"toolTitle\", theme.bold(\"write\"))} ${pathDisplay}`;\n\n\tif (fileContent === null) {\n\t\ttext += `\\n\\n${theme.fg(\"error\", \"[invalid content arg - expected string]\")}`;\n\t} else if (fileContent && !options.expanded) {\n\t\tconst n = trimTrailingEmptyLines(normalizeDisplayText(fileContent).split(\"\\n\")).length;\n\t\tif (n > 0) text += theme.fg(\"muted\", ` (${n} lines)`);\n\t} else if (fileContent && options.expanded) {\n\t\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\t\tconst renderedLines = lang\n\t\t\t? (cache?.highlightedLines ?? highlightCode(replaceTabs(normalizeDisplayText(fileContent)), lang))\n\t\t\t: normalizeDisplayText(fileContent).split(\"\\n\");\n\t\tconst lines = trimTrailingEmptyLines(renderedLines);\n\t\tconst totalLines = lines.length;\n\t\tconst maxLines = options.expanded ? lines.length : 10;\n\t\tconst displayLines = lines.slice(0, maxLines);\n\t\tconst remaining = lines.length - maxLines;\n\t\ttext += `\\n\\n${displayLines.map((line) => (lang ? line : theme.fg(\"toolOutput\", replaceTabs(line)))).join(\"\\n\")}`;\n\t\tif (remaining > 0) {\n\t\t\ttext += `${theme.fg(\"muted\", `\\n... (${remaining} more lines, ${totalLines} total,`)} ${keyHint(\"app.tools.expand\", \"to expand\")}${theme.fg(\"muted\", \")\")}`;\n\t\t}\n\t}\n\n\treturn text;\n}\n\nfunction formatWriteResult(\n\tresult: { content: Array<{ type: string; text?: string; data?: string; mimeType?: string }>; isError?: boolean },\n\ttheme: Theme,\n): string | undefined {\n\tif (!result.isError) {\n\t\treturn undefined;\n\t}\n\tconst output = result.content\n\t\t.filter((c) => c.type === \"text\")\n\t\t.map((c) => c.text || \"\")\n\t\t.join(\"\\n\");\n\tif (!output) {\n\t\treturn undefined;\n\t}\n\treturn `\\n${theme.fg(\"error\", output)}`;\n}\n\nexport function createWriteToolDefinition(\n\tcwd: string,\n\toptions?: WriteToolOptions,\n): ToolDefinition<typeof writeSchema, undefined> {\n\tconst ops = options?.operations ?? defaultWriteOperations;\n\treturn {\n\t\tname: \"write\",\n\t\tlabel: \"write\",\n\t\tdescription:\n\t\t\t\"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.\",\n\t\tpromptSnippet: writeToolSystemPromptContribution.snippet,\n\t\tpromptGuidelines: [...writeToolSystemPromptContribution.guidelines],\n\t\tparameters: writeSchema,\n\t\tconstrainedSampling: getExperimentalToolSampling(),\n\t\tasync execute(\n\t\t\t_toolCallId,\n\t\t\t{ path, content }: { path: string; content: string },\n\t\t\tsignal?: AbortSignal,\n\t\t\t_onUpdate?,\n\t\t\tctx?,\n\t\t) {\n\t\t\tconst absolutePath = resolveToCwd(path, ctx?.cwd || cwd);\n\t\t\tconst dir = dirname(absolutePath);\n\t\t\treturn withFileMutationQueue(absolutePath, async () => {\n\t\t\t\t// Do not reject from an abort event listener here: that would release the\n\t\t\t\t// mutation queue while an in-flight filesystem operation may still finish.\n\t\t\t\t// Checking signal.aborted after each await observes the same aborts while\n\t\t\t\t// keeping the queue locked until the current operation has settled.\n\t\t\t\tconst throwIfAborted = (): void => {\n\t\t\t\t\tif (signal?.aborted) throw new Error(\"Operation aborted\");\n\t\t\t\t};\n\n\t\t\t\tthrowIfAborted();\n\t\t\t\t// Create parent directories if needed.\n\t\t\t\tawait ops.mkdir(dir);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\t// Write the file contents.\n\t\t\t\tawait ops.writeFile(absolutePath, content);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Successfully wrote to ${path}` }],\n\t\t\t\t\tdetails: undefined,\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\trenderCall(args, theme, context) {\n\t\t\tconst renderArgs = args as { path?: string; file_path?: string; content?: string } | undefined;\n\t\t\tconst rawPath = str(renderArgs?.file_path ?? renderArgs?.path);\n\t\t\tconst fileContent = str(renderArgs?.content);\n\t\t\tconst component =\n\t\t\t\t(context.lastComponent as WriteCallRenderComponent | undefined) ?? new WriteCallRenderComponent();\n\t\t\tif (fileContent !== null) {\n\t\t\t\tcomponent.cache = context.argsComplete\n\t\t\t\t\t? rebuildWriteHighlightCacheFull(rawPath, fileContent)\n\t\t\t\t\t: updateWriteHighlightCacheIncremental(component.cache, rawPath, fileContent);\n\t\t\t} else {\n\t\t\t\tcomponent.cache = undefined;\n\t\t\t}\n\t\t\tcomponent.setText(\n\t\t\t\tformatWriteCall(\n\t\t\t\t\trenderArgs,\n\t\t\t\t\t{ expanded: context.expanded, isPartial: context.isPartial },\n\t\t\t\t\ttheme,\n\t\t\t\t\tcomponent.cache,\n\t\t\t\t\tcontext.cwd,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn component;\n\t\t},\n\t\trenderResult(result, _options, theme, context) {\n\t\t\tconst output = formatWriteResult({ ...result, isError: context.isError }, theme);\n\t\t\tif (!output) {\n\t\t\t\tconst component = (context.lastComponent as Container | undefined) ?? new Container();\n\t\t\t\tcomponent.clear();\n\t\t\t\treturn component;\n\t\t\t}\n\t\t\tconst text = (context.lastComponent as Text | undefined) ?? new Text(\"\", 0, 0);\n\t\t\ttext.setText(output);\n\t\t\treturn text;\n\t\t},\n\t};\n}\n\nexport function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool<typeof writeSchema> {\n\treturn wrapToolDefinition(createWriteToolDefinition(cwd, options));\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"write.js","sourceRoot":"","sources":["../../../src/core/tools/write.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wDAAwD,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAc,MAAM,wCAAwC,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0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AK,EAAE,CAAC;gBAClB,OAAO,SAAS,CAAC;YAClB,CAAC;YACD,MAAM,IAAI,GAAI,OAAO,CAAC,aAAkC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACrB,OAAO,IAAI,CAAC;QAAA,CACZ;KACD,CAAC;AAAA,CACF;AAED,MAAM,UAAU,eAAe,CAAC,GAAW,EAAE,OAA0B,EAAiC;IACvG,OAAO,kBAAkB,CAAC,yBAAyB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AAAA,CACnE","sourcesContent":["import type { AgentTool } from \"@earendil-works/pi-agent-core\";\nimport { Container, Text } from \"@earendil-works/pi-tui\";\nimport { mkdir as fsMkdir, writeFile as fsWriteFile } from \"fs/promises\";\nimport { dirname } from \"path\";\nimport { type Static, Type } from \"typebox\";\nimport { keyHint } from \"../../modes/interactive/components/keybinding-hints.ts\";\nimport { getLanguageFromPath, highlightCode, type Theme } from \"../../modes/interactive/theme/theme.ts\";\nimport { getExperimentalToolSampling } from \"../experimental.ts\";\nimport type { ToolDefinition, ToolRenderResultOptions } from \"../extensions/types.ts\";\nimport { withFileMutationQueue } from \"./file-mutation-queue.ts\";\nimport { resolveToCwd } from \"./path-utils.ts\";\nimport { normalizeDisplayText, renderToolPath, replaceTabs, str } from \"./render-utils.ts\";\nimport { wrapToolDefinition } from \"./tool-definition-wrapper.ts\";\n\nconst writeSchema = Type.Object({\n\tpath: Type.String({ description: \"Path to the file to write (relative or absolute)\" }),\n\tcontent: Type.String({ description: \"Content to write to the file\" }),\n});\n\nexport const writeToolSystemPromptContribution = {\n\tsnippet: \"Create or overwrite files\",\n\tguidelines: [\"Use write only for new files or complete rewrites.\"],\n} as const;\n\nexport type WriteToolInput = Static<typeof writeSchema>;\n\n/**\n * Pluggable operations for the write tool.\n * Override these to delegate file writing to remote systems (for example SSH).\n */\nexport interface WriteOperations {\n\t/** Write content to a file */\n\twriteFile: (absolutePath: string, content: string) => Promise<void>;\n\t/** Create directory recursively */\n\tmkdir: (dir: string) => Promise<void>;\n}\n\nconst defaultWriteOperations: WriteOperations = {\n\twriteFile: (path, content) => fsWriteFile(path, content, \"utf-8\"),\n\tmkdir: (dir) => fsMkdir(dir, { recursive: true }).then(() => {}),\n};\n\nexport interface WriteToolOptions {\n\t/** Custom operations for file writing. Default: local filesystem */\n\toperations?: WriteOperations;\n}\n\ntype WriteHighlightCache = {\n\trawPath: string | null;\n\tlang: string;\n\trawContent: string;\n\tnormalizedLines: string[];\n\thighlightedLines: string[];\n};\n\nclass WriteCallRenderComponent extends Text {\n\tcache?: WriteHighlightCache;\n\n\tconstructor() {\n\t\tsuper(\"\", 0, 0);\n\t}\n}\n\nconst WRITE_PARTIAL_FULL_HIGHLIGHT_LINES = 50;\n\nfunction highlightSingleLine(line: string, lang: string): string {\n\tconst highlighted = highlightCode(line, lang);\n\treturn highlighted[0] ?? \"\";\n}\n\nfunction refreshWriteHighlightPrefix(cache: WriteHighlightCache): void {\n\tconst prefixCount = Math.min(WRITE_PARTIAL_FULL_HIGHLIGHT_LINES, cache.normalizedLines.length);\n\tif (prefixCount === 0) return;\n\tconst prefixSource = cache.normalizedLines.slice(0, prefixCount).join(\"\\n\");\n\tconst prefixHighlighted = highlightCode(prefixSource, cache.lang);\n\tfor (let i = 0; i < prefixCount; i++) {\n\t\tcache.highlightedLines[i] =\n\t\t\tprefixHighlighted[i] ?? highlightSingleLine(cache.normalizedLines[i] ?? \"\", cache.lang);\n\t}\n}\n\nfunction rebuildWriteHighlightCacheFull(rawPath: string | null, fileContent: string): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tconst displayContent = normalizeDisplayText(fileContent);\n\tconst normalized = replaceTabs(displayContent);\n\treturn {\n\t\trawPath,\n\t\tlang,\n\t\trawContent: fileContent,\n\t\tnormalizedLines: normalized.split(\"\\n\"),\n\t\thighlightedLines: highlightCode(normalized, lang),\n\t};\n}\n\nfunction updateWriteHighlightCacheIncremental(\n\tcache: WriteHighlightCache | undefined,\n\trawPath: string | null,\n\tfileContent: string,\n): WriteHighlightCache | undefined {\n\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\tif (!lang) return undefined;\n\tif (!cache) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (cache.lang !== lang || cache.rawPath !== rawPath) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (!fileContent.startsWith(cache.rawContent)) return rebuildWriteHighlightCacheFull(rawPath, fileContent);\n\tif (fileContent.length === cache.rawContent.length) return cache;\n\n\tconst deltaRaw = fileContent.slice(cache.rawContent.length);\n\tconst deltaDisplay = normalizeDisplayText(deltaRaw);\n\tconst deltaNormalized = replaceTabs(deltaDisplay);\n\tcache.rawContent = fileContent;\n\tif (cache.normalizedLines.length === 0) {\n\t\tcache.normalizedLines.push(\"\");\n\t\tcache.highlightedLines.push(\"\");\n\t}\n\n\tconst segments = deltaNormalized.split(\"\\n\");\n\tconst lastIndex = cache.normalizedLines.length - 1;\n\tcache.normalizedLines[lastIndex] += segments[0];\n\tcache.highlightedLines[lastIndex] = highlightSingleLine(cache.normalizedLines[lastIndex], cache.lang);\n\tfor (let i = 1; i < segments.length; i++) {\n\t\tcache.normalizedLines.push(segments[i]);\n\t\tcache.highlightedLines.push(highlightSingleLine(segments[i], cache.lang));\n\t}\n\trefreshWriteHighlightPrefix(cache);\n\treturn cache;\n}\n\nfunction trimTrailingEmptyLines(lines: string[]): string[] {\n\tlet end = lines.length;\n\twhile (end > 0 && lines[end - 1] === \"\") {\n\t\tend--;\n\t}\n\treturn lines.slice(0, end);\n}\n\nfunction formatWriteCall(\n\targs: { path?: string; file_path?: string; content?: string } | undefined,\n\toptions: ToolRenderResultOptions,\n\ttheme: Theme,\n\tcache: WriteHighlightCache | undefined,\n\tcwd: string,\n): string {\n\tconst rawPath = str(args?.file_path ?? args?.path);\n\tconst fileContent = str(args?.content);\n\tconst pathDisplay = renderToolPath(rawPath, theme, cwd);\n\tlet text = `${theme.fg(\"toolTitle\", theme.bold(\"write\"))} ${pathDisplay}`;\n\n\tif (fileContent === null) {\n\t\ttext += `\\n\\n${theme.fg(\"error\", \"[invalid content arg - expected string]\")}`;\n\t} else if (fileContent && !options.expanded) {\n\t\tconst n = trimTrailingEmptyLines(normalizeDisplayText(fileContent).split(\"\\n\")).length;\n\t\tif (n > 0) text += theme.fg(\"muted\", ` (${n} lines)`);\n\t} else if (fileContent && options.expanded) {\n\t\tconst lang = rawPath ? getLanguageFromPath(rawPath) : undefined;\n\t\tconst renderedLines = lang\n\t\t\t? (cache?.highlightedLines ?? highlightCode(replaceTabs(normalizeDisplayText(fileContent)), lang))\n\t\t\t: normalizeDisplayText(fileContent).split(\"\\n\");\n\t\tconst lines = trimTrailingEmptyLines(renderedLines);\n\t\tconst totalLines = lines.length;\n\t\tconst maxLines = options.expanded ? lines.length : 10;\n\t\tconst displayLines = lines.slice(0, maxLines);\n\t\tconst remaining = lines.length - maxLines;\n\t\ttext += `\\n\\n${displayLines.map((line) => (lang ? line : theme.fg(\"toolOutput\", replaceTabs(line)))).join(\"\\n\")}`;\n\t\tif (remaining > 0) {\n\t\t\ttext += `${theme.fg(\"muted\", `\\n... (${remaining} more lines, ${totalLines} total,`)} ${keyHint(\"app.tools.expand\", \"to expand\")}${theme.fg(\"muted\", \")\")}`;\n\t\t}\n\t}\n\n\treturn text;\n}\n\nfunction formatWriteResult(\n\tresult: { content: Array<{ type: string; text?: string; data?: string; mimeType?: string }>; isError?: boolean },\n\ttheme: Theme,\n): string | undefined {\n\tif (!result.isError) {\n\t\treturn undefined;\n\t}\n\tconst output = result.content\n\t\t.filter((c) => c.type === \"text\")\n\t\t.map((c) => c.text || \"\")\n\t\t.join(\"\\n\");\n\tif (!output) {\n\t\treturn undefined;\n\t}\n\treturn `\\n${theme.fg(\"error\", output)}`;\n}\n\nexport function createWriteToolDefinition(\n\tcwd: string,\n\toptions?: WriteToolOptions,\n): ToolDefinition<typeof writeSchema, undefined> {\n\tconst ops = options?.operations ?? defaultWriteOperations;\n\treturn {\n\t\tname: \"write\",\n\t\tlabel: \"write\",\n\t\tdescription:\n\t\t\t\"Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.\",\n\t\tpromptSnippet: writeToolSystemPromptContribution.snippet,\n\t\tpromptGuidelines: [...writeToolSystemPromptContribution.guidelines],\n\t\tparameters: writeSchema,\n\t\tconstrainedSampling: getExperimentalToolSampling(),\n\t\tasync execute(\n\t\t\t_toolCallId,\n\t\t\t{ path, content }: { path: string; content: string },\n\t\t\tsignal?: AbortSignal,\n\t\t\t_onUpdate?,\n\t\t\tctx?,\n\t\t) {\n\t\t\tconst absolutePath = resolveToCwd(path, ctx?.cwd || cwd);\n\t\t\tconst dir = dirname(absolutePath);\n\t\t\treturn withFileMutationQueue(absolutePath, async () => {\n\t\t\t\t// Do not reject from an abort event listener here: that would release the\n\t\t\t\t// mutation queue while an in-flight filesystem operation may still finish.\n\t\t\t\t// Checking signal.aborted after each await observes the same aborts while\n\t\t\t\t// keeping the queue locked until the current operation has settled.\n\t\t\t\tconst throwIfAborted = (): void => {\n\t\t\t\t\tif (signal?.aborted) throw new Error(\"Operation aborted\");\n\t\t\t\t};\n\n\t\t\t\tthrowIfAborted();\n\t\t\t\t// Create parent directories if needed.\n\t\t\t\tawait ops.mkdir(dir);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\t// Write the file contents.\n\t\t\t\tawait ops.writeFile(absolutePath, content);\n\t\t\t\tthrowIfAborted();\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\", text: `Successfully wrote to ${path}` }],\n\t\t\t\t\tdetails: undefined,\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\t\trenderCall(args, theme, context) {\n\t\t\tconst renderArgs = args as { path?: string; file_path?: string; content?: string } | undefined;\n\t\t\tconst rawPath = str(renderArgs?.file_path ?? renderArgs?.path);\n\t\t\tconst fileContent = str(renderArgs?.content);\n\t\t\tconst component =\n\t\t\t\t(context.lastComponent as WriteCallRenderComponent | undefined) ?? new WriteCallRenderComponent();\n\t\t\tif (fileContent !== null) {\n\t\t\t\tcomponent.cache = context.argsComplete\n\t\t\t\t\t? rebuildWriteHighlightCacheFull(rawPath, fileContent)\n\t\t\t\t\t: updateWriteHighlightCacheIncremental(component.cache, rawPath, fileContent);\n\t\t\t} else {\n\t\t\t\tcomponent.cache = undefined;\n\t\t\t}\n\t\t\tcomponent.setText(\n\t\t\t\tformatWriteCall(\n\t\t\t\t\trenderArgs,\n\t\t\t\t\t{ expanded: context.expanded, isPartial: context.isPartial },\n\t\t\t\t\ttheme,\n\t\t\t\t\tcomponent.cache,\n\t\t\t\t\tcontext.cwd,\n\t\t\t\t),\n\t\t\t);\n\t\t\treturn component;\n\t\t},\n\t\trenderResult(result, _options, theme, context) {\n\t\t\tconst output = formatWriteResult({ ...result, isError: context.isError }, theme);\n\t\t\tif (!output) {\n\t\t\t\tconst component = (context.lastComponent as Container | undefined) ?? new Container();\n\t\t\t\tcomponent.clear();\n\t\t\t\treturn component;\n\t\t\t}\n\t\t\tconst text = (context.lastComponent as Text | undefined) ?? new Text(\"\", 0, 0);\n\t\t\ttext.setText(output);\n\t\t\treturn text;\n\t\t},\n\t};\n}\n\nexport function createWriteTool(cwd: string, options?: WriteToolOptions): AgentTool<typeof writeSchema> {\n\treturn wrapToolDefinition(createWriteToolDefinition(cwd, options));\n}\n"]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export type ProjectTrustDecision = boolean | null;
|
|
2
|
-
export interface ProjectTrustStoreEntry {
|
|
3
|
-
path: string;
|
|
4
|
-
decision: boolean;
|
|
5
|
-
}
|
|
6
|
-
export interface ProjectTrustUpdate {
|
|
7
|
-
path: string;
|
|
8
|
-
decision: ProjectTrustDecision;
|
|
9
|
-
}
|
|
10
|
-
export interface ProjectTrustOption {
|
|
11
|
-
label: string;
|
|
12
|
-
trusted: boolean;
|
|
13
|
-
updates: ProjectTrustUpdate[];
|
|
14
|
-
savedPath?: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function getProjectTrustParentPath(cwd: string): string | undefined;
|
|
17
|
-
export declare function getProjectTrustOptions(cwd: string, options?: {
|
|
18
|
-
includeSessionOnly?: boolean;
|
|
19
|
-
}): ProjectTrustOption[];
|
|
20
|
-
/**
|
|
21
|
-
* Returns true when cwd has project-local resources that must be gated by
|
|
22
|
-
* project trust: trust-requiring entries under cwd/.pi, or .agents/skills in
|
|
23
|
-
* cwd or one of its ancestors. Returns false when no such project resources
|
|
24
|
-
* exist. The user/global ~/.agents/skills directory is always treated as a
|
|
25
|
-
* trusted user resource and is ignored here, even when cwd is $HOME.
|
|
26
|
-
*/
|
|
27
|
-
export declare function hasTrustRequiringProjectResources(cwd: string): boolean;
|
|
28
|
-
export declare class ProjectTrustStore {
|
|
29
|
-
private trustPath;
|
|
30
|
-
constructor(agentDir: string);
|
|
31
|
-
get(cwd: string): ProjectTrustDecision;
|
|
32
|
-
getEntry(cwd: string): ProjectTrustStoreEntry | null;
|
|
33
|
-
set(cwd: string, decision: ProjectTrustDecision): void;
|
|
34
|
-
setMany(decisions: ProjectTrustUpdate[]): void;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=trust-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trust-manager.d.ts","sourceRoot":"","sources":["../../src/core/trust-manager.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,IAAI,CAAC;AAElD,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,WAAW,kBAAkB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAyCD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIzE;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,kBAAkB,EAAE,CA8BpH;AAkFD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAsBtE;AAED,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,SAAS,CAAS;IAE1B,YAAY,QAAQ,EAAE,MAAM,EAE3B;IAED,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,CAErC;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,sBAAsB,GAAG,IAAI,CAKnD;IAED,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAErD;IAED,OAAO,CAAC,SAAS,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAa7C;CACD","sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport lockfile from \"proper-lockfile\";\nimport { CONFIG_DIR_NAME } from \"../config.ts\";\nimport { canonicalizePath, resolvePath } from \"../utils/paths.ts\";\nimport { stripBom } from \"../utils/text.ts\";\n\nexport type ProjectTrustDecision = boolean | null;\n\nexport interface ProjectTrustStoreEntry {\n\tpath: string;\n\tdecision: boolean;\n}\n\nexport interface ProjectTrustUpdate {\n\tpath: string;\n\tdecision: ProjectTrustDecision;\n}\n\nexport interface ProjectTrustOption {\n\tlabel: string;\n\ttrusted: boolean;\n\tupdates: ProjectTrustUpdate[];\n\tsavedPath?: string;\n}\n\ntype TrustFile = Record<string, boolean | null | undefined>;\n\nconst TRUST_REQUIRING_PROJECT_CONFIG_RESOURCES = [\n\t\"settings.json\",\n\t\"extensions\",\n\t// mcp.json names commands the agent spawns on connect (packages/dal-mcp/src/\n\t// config.ts reads cwd/.dal/mcp.json unconditionally). Cloning a repo that\n\t// ships one and starting dal in it is arbitrary code execution, so it has to\n\t// sit behind the same trust prompt as extensions.\n\t\"mcp.json\",\n\t// lsp.json can name a local command that packages/dal-lsp spawns lazily.\n\t\"lsp.json\",\n\t\"skills\",\n\t\"prompts\",\n\t\"themes\",\n\t\"SYSTEM.md\",\n\t\"APPEND_SYSTEM.md\",\n] as const;\n\nfunction normalizeCwd(cwd: string): string {\n\treturn canonicalizePath(resolvePath(cwd));\n}\n\nfunction findNearestTrustEntry(data: TrustFile, cwd: string): ProjectTrustStoreEntry | null {\n\tlet currentDir = normalizeCwd(cwd);\n\twhile (true) {\n\t\tconst value = data[currentDir];\n\t\tif (value === true || value === false) {\n\t\t\treturn { path: currentDir, decision: value };\n\t\t}\n\n\t\tconst parentDir = dirname(currentDir);\n\t\tif (parentDir === currentDir) {\n\t\t\treturn null;\n\t\t}\n\t\tcurrentDir = parentDir;\n\t}\n}\n\nexport function getProjectTrustParentPath(cwd: string): string | undefined {\n\tconst trustPath = normalizeCwd(cwd);\n\tconst parentDir = dirname(trustPath);\n\treturn parentDir === trustPath ? undefined : parentDir;\n}\n\nexport function getProjectTrustOptions(cwd: string, options?: { includeSessionOnly?: boolean }): ProjectTrustOption[] {\n\tconst trustPath = normalizeCwd(cwd);\n\tconst trustOptions: ProjectTrustOption[] = [\n\t\t{ label: \"Trust\", trusted: true, updates: [{ path: trustPath, decision: true }], savedPath: trustPath },\n\t];\n\tconst parentPath = getProjectTrustParentPath(cwd);\n\tif (parentPath !== undefined) {\n\t\ttrustOptions.push({\n\t\t\tlabel: `Trust parent folder (${parentPath})`,\n\t\t\ttrusted: true,\n\t\t\tupdates: [\n\t\t\t\t{ path: parentPath, decision: true },\n\t\t\t\t{ path: trustPath, decision: null },\n\t\t\t],\n\t\t\tsavedPath: parentPath,\n\t\t});\n\t}\n\tif (options?.includeSessionOnly) {\n\t\ttrustOptions.push({ label: \"Trust (this session only)\", trusted: true, updates: [] });\n\t}\n\ttrustOptions.push({\n\t\tlabel: \"Do not trust\",\n\t\ttrusted: false,\n\t\tupdates: [{ path: trustPath, decision: false }],\n\t\tsavedPath: trustPath,\n\t});\n\tif (options?.includeSessionOnly) {\n\t\ttrustOptions.push({ label: \"Do not trust (this session only)\", trusted: false, updates: [] });\n\t}\n\treturn trustOptions;\n}\n\nfunction readTrustFile(path: string): TrustFile {\n\tif (!existsSync(path)) {\n\t\treturn {};\n\t}\n\n\tlet parsed: unknown;\n\ttry {\n\t\tparsed = JSON.parse(stripBom(readFileSync(path, \"utf-8\")));\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthrow new Error(`Failed to read trust store ${path}: ${message}`);\n\t}\n\n\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n\t\tthrow new Error(`Invalid trust store ${path}: expected an object`);\n\t}\n\n\tconst data: TrustFile = {};\n\tfor (const [key, value] of Object.entries(parsed)) {\n\t\tif (value !== true && value !== false && value !== null) {\n\t\t\tthrow new Error(`Invalid trust store ${path}: value for ${JSON.stringify(key)} must be true, false, or null`);\n\t\t}\n\t\tdata[key] = value;\n\t}\n\treturn data;\n}\n\nfunction writeTrustFile(path: string, data: TrustFile): void {\n\tconst sorted: TrustFile = {};\n\tfor (const key of Object.keys(data).sort()) {\n\t\tconst value = data[key];\n\t\tif (value === true || value === false || value === null) {\n\t\t\tsorted[key] = value;\n\t\t}\n\t}\n\tmkdirSync(dirname(path), { recursive: true });\n\twriteFileSync(path, `${JSON.stringify(sorted, null, 2)}\\n`, \"utf-8\");\n}\n\nfunction acquireTrustLockSync(path: string): () => void {\n\tconst trustDir = dirname(path);\n\tmkdirSync(trustDir, { recursive: true });\n\tconst maxAttempts = 10;\n\tconst delayMs = 20;\n\tlet lastError: unknown;\n\n\tfor (let attempt = 1; attempt <= maxAttempts; attempt++) {\n\t\ttry {\n\t\t\treturn lockfile.lockSync(trustDir, { realpath: false, lockfilePath: `${path}.lock` });\n\t\t} catch (error) {\n\t\t\tconst code =\n\t\t\t\ttypeof error === \"object\" && error !== null && \"code\" in error\n\t\t\t\t\t? String((error as { code?: unknown }).code)\n\t\t\t\t\t: undefined;\n\t\t\tif (code !== \"ELOCKED\" || attempt === maxAttempts) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tlastError = error;\n\t\t\tconst start = Date.now();\n\t\t\twhile (Date.now() - start < delayMs) {\n\t\t\t\t// Sleep synchronously to avoid changing trust store callers to async.\n\t\t\t}\n\t\t}\n\t}\n\n\tif (lastError instanceof Error) {\n\t\tthrow lastError;\n\t}\n\tthrow new Error(\"Failed to acquire trust store lock\");\n}\n\nfunction withTrustFileLock<T>(path: string, fn: () => T): T {\n\tconst release = acquireTrustLockSync(path);\n\ttry {\n\t\treturn fn();\n\t} finally {\n\t\trelease();\n\t}\n}\n\n/**\n * Returns true when cwd has project-local resources that must be gated by\n * project trust: trust-requiring entries under cwd/.pi, or .agents/skills in\n * cwd or one of its ancestors. Returns false when no such project resources\n * exist. The user/global ~/.agents/skills directory is always treated as a\n * trusted user resource and is ignored here, even when cwd is $HOME.\n */\nexport function hasTrustRequiringProjectResources(cwd: string): boolean {\n\tconst homeDir = canonicalizePath(resolvePath(process.env.HOME || homedir()));\n\tconst userAgentsSkillsDir = join(homeDir, \".agents\", \"skills\");\n\tlet currentDir = canonicalizePath(resolvePath(cwd));\n\n\tconst configDir = join(currentDir, CONFIG_DIR_NAME);\n\tif (TRUST_REQUIRING_PROJECT_CONFIG_RESOURCES.some((entry) => existsSync(join(configDir, entry)))) {\n\t\treturn true;\n\t}\n\n\twhile (true) {\n\t\tconst agentsSkillsDir = join(currentDir, \".agents\", \"skills\");\n\t\tif (agentsSkillsDir !== userAgentsSkillsDir && existsSync(agentsSkillsDir)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst parentDir = dirname(currentDir);\n\t\tif (parentDir === currentDir) {\n\t\t\treturn false;\n\t\t}\n\t\tcurrentDir = parentDir;\n\t}\n}\n\nexport class ProjectTrustStore {\n\tprivate trustPath: string;\n\n\tconstructor(agentDir: string) {\n\t\tthis.trustPath = join(resolvePath(agentDir), \"trust.json\");\n\t}\n\n\tget(cwd: string): ProjectTrustDecision {\n\t\treturn this.getEntry(cwd)?.decision ?? null;\n\t}\n\n\tgetEntry(cwd: string): ProjectTrustStoreEntry | null {\n\t\treturn withTrustFileLock(this.trustPath, () => {\n\t\t\tconst data = readTrustFile(this.trustPath);\n\t\t\treturn findNearestTrustEntry(data, cwd);\n\t\t});\n\t}\n\n\tset(cwd: string, decision: ProjectTrustDecision): void {\n\t\tthis.setMany([{ path: cwd, decision }]);\n\t}\n\n\tsetMany(decisions: ProjectTrustUpdate[]): void {\n\t\twithTrustFileLock(this.trustPath, () => {\n\t\t\tconst data = readTrustFile(this.trustPath);\n\t\t\tfor (const { path, decision } of decisions) {\n\t\t\t\tconst key = normalizeCwd(path);\n\t\t\t\tif (decision === null) {\n\t\t\t\t\tdelete data[key];\n\t\t\t\t} else {\n\t\t\t\t\tdata[key] = decision;\n\t\t\t\t}\n\t\t\t}\n\t\t\twriteTrustFile(this.trustPath, data);\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trust-manager.js","sourceRoot":"","sources":["../../src/core/trust-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,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AAQ;QACtD,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;IAAA,CACxC;IAED,OAAO,CAAC,SAA+B,EAAQ;QAC9C,iBAAiB,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC;YACvC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YAC3C,KAAK,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,SAAS,EAAE,CAAC;gBAC5C,MAAM,GAAG,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;gBAC/B,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;oBACvB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;gBAClB,CAAC;qBAAM,CAAC;oBACP,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;gBACtB,CAAC;YACF,CAAC;YACD,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAAA,CACrC,CAAC,CAAC;IAAA,CACH;CACD","sourcesContent":["import { existsSync, mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { homedir } from \"node:os\";\nimport { dirname, join } from \"node:path\";\nimport lockfile from \"proper-lockfile\";\nimport { CONFIG_DIR_NAME } from \"../config.ts\";\nimport { canonicalizePath, resolvePath } from \"../utils/paths.ts\";\nimport { stripBom } from \"../utils/text.ts\";\n\nexport type ProjectTrustDecision = boolean | null;\n\nexport interface ProjectTrustStoreEntry {\n\tpath: string;\n\tdecision: boolean;\n}\n\nexport interface ProjectTrustUpdate {\n\tpath: string;\n\tdecision: ProjectTrustDecision;\n}\n\nexport interface ProjectTrustOption {\n\tlabel: string;\n\ttrusted: boolean;\n\tupdates: ProjectTrustUpdate[];\n\tsavedPath?: string;\n}\n\ntype TrustFile = Record<string, boolean | null | undefined>;\n\nconst TRUST_REQUIRING_PROJECT_CONFIG_RESOURCES = [\n\t\"settings.json\",\n\t\"extensions\",\n\t// mcp.json names commands the agent spawns on connect (packages/dal-mcp/src/\n\t// config.ts reads cwd/.dal/mcp.json unconditionally). Cloning a repo that\n\t// ships one and starting dal in it is arbitrary code execution, so it has to\n\t// sit behind the same trust prompt as extensions.\n\t\"mcp.json\",\n\t// lsp.json can name a local command that packages/dal-lsp spawns lazily.\n\t\"lsp.json\",\n\t\"skills\",\n\t\"prompts\",\n\t\"themes\",\n\t\"SYSTEM.md\",\n\t\"APPEND_SYSTEM.md\",\n] as const;\n\nfunction normalizeCwd(cwd: string): string {\n\treturn canonicalizePath(resolvePath(cwd));\n}\n\nfunction findNearestTrustEntry(data: TrustFile, cwd: string): ProjectTrustStoreEntry | null {\n\tlet currentDir = normalizeCwd(cwd);\n\twhile (true) {\n\t\tconst value = data[currentDir];\n\t\tif (value === true || value === false) {\n\t\t\treturn { path: currentDir, decision: value };\n\t\t}\n\n\t\tconst parentDir = dirname(currentDir);\n\t\tif (parentDir === currentDir) {\n\t\t\treturn null;\n\t\t}\n\t\tcurrentDir = parentDir;\n\t}\n}\n\nexport function getProjectTrustParentPath(cwd: string): string | undefined {\n\tconst trustPath = normalizeCwd(cwd);\n\tconst parentDir = dirname(trustPath);\n\treturn parentDir === trustPath ? undefined : parentDir;\n}\n\nexport function getProjectTrustOptions(cwd: string, options?: { includeSessionOnly?: boolean }): ProjectTrustOption[] {\n\tconst trustPath = normalizeCwd(cwd);\n\tconst trustOptions: ProjectTrustOption[] = [\n\t\t{ label: \"Trust\", trusted: true, updates: [{ path: trustPath, decision: true }], savedPath: trustPath },\n\t];\n\tconst parentPath = getProjectTrustParentPath(cwd);\n\tif (parentPath !== undefined) {\n\t\ttrustOptions.push({\n\t\t\tlabel: `Trust parent folder (${parentPath})`,\n\t\t\ttrusted: true,\n\t\t\tupdates: [\n\t\t\t\t{ path: parentPath, decision: true },\n\t\t\t\t{ path: trustPath, decision: null },\n\t\t\t],\n\t\t\tsavedPath: parentPath,\n\t\t});\n\t}\n\tif (options?.includeSessionOnly) {\n\t\ttrustOptions.push({ label: \"Trust (this session only)\", trusted: true, updates: [] });\n\t}\n\ttrustOptions.push({\n\t\tlabel: \"Do not trust\",\n\t\ttrusted: false,\n\t\tupdates: [{ path: trustPath, decision: false }],\n\t\tsavedPath: trustPath,\n\t});\n\tif (options?.includeSessionOnly) {\n\t\ttrustOptions.push({ label: \"Do not trust (this session only)\", trusted: false, updates: [] });\n\t}\n\treturn trustOptions;\n}\n\nfunction readTrustFile(path: string): TrustFile {\n\tif (!existsSync(path)) {\n\t\treturn {};\n\t}\n\n\tlet parsed: unknown;\n\ttry {\n\t\tparsed = JSON.parse(stripBom(readFileSync(path, \"utf-8\")));\n\t} catch (error) {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthrow new Error(`Failed to read trust store ${path}: ${message}`);\n\t}\n\n\tif (typeof parsed !== \"object\" || parsed === null || Array.isArray(parsed)) {\n\t\tthrow new Error(`Invalid trust store ${path}: expected an object`);\n\t}\n\n\tconst data: TrustFile = {};\n\tfor (const [key, value] of Object.entries(parsed)) {\n\t\tif (value !== true && value !== false && value !== null) {\n\t\t\tthrow new Error(`Invalid trust store ${path}: value for ${JSON.stringify(key)} must be true, false, or null`);\n\t\t}\n\t\tdata[key] = value;\n\t}\n\treturn data;\n}\n\nfunction writeTrustFile(path: string, data: TrustFile): void {\n\tconst sorted: TrustFile = {};\n\tfor (const key of Object.keys(data).sort()) {\n\t\tconst value = data[key];\n\t\tif (value === true || value === false || value === null) {\n\t\t\tsorted[key] = value;\n\t\t}\n\t}\n\tmkdirSync(dirname(path), { recursive: true });\n\twriteFileSync(path, `${JSON.stringify(sorted, null, 2)}\\n`, \"utf-8\");\n}\n\nfunction acquireTrustLockSync(path: string): () => void {\n\tconst trustDir = dirname(path);\n\tmkdirSync(trustDir, { recursive: true });\n\tconst maxAttempts = 10;\n\tconst delayMs = 20;\n\tlet lastError: unknown;\n\n\tfor (let attempt = 1; attempt <= maxAttempts; attempt++) {\n\t\ttry {\n\t\t\treturn lockfile.lockSync(trustDir, { realpath: false, lockfilePath: `${path}.lock` });\n\t\t} catch (error) {\n\t\t\tconst code =\n\t\t\t\ttypeof error === \"object\" && error !== null && \"code\" in error\n\t\t\t\t\t? String((error as { code?: unknown }).code)\n\t\t\t\t\t: undefined;\n\t\t\tif (code !== \"ELOCKED\" || attempt === maxAttempts) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t\tlastError = error;\n\t\t\tconst start = Date.now();\n\t\t\twhile (Date.now() - start < delayMs) {\n\t\t\t\t// Sleep synchronously to avoid changing trust store callers to async.\n\t\t\t}\n\t\t}\n\t}\n\n\tif (lastError instanceof Error) {\n\t\tthrow lastError;\n\t}\n\tthrow new Error(\"Failed to acquire trust store lock\");\n}\n\nfunction withTrustFileLock<T>(path: string, fn: () => T): T {\n\tconst release = acquireTrustLockSync(path);\n\ttry {\n\t\treturn fn();\n\t} finally {\n\t\trelease();\n\t}\n}\n\n/**\n * Returns true when cwd has project-local resources that must be gated by\n * project trust: trust-requiring entries under cwd/.pi, or .agents/skills in\n * cwd or one of its ancestors. Returns false when no such project resources\n * exist. The user/global ~/.agents/skills directory is always treated as a\n * trusted user resource and is ignored here, even when cwd is $HOME.\n */\nexport function hasTrustRequiringProjectResources(cwd: string): boolean {\n\tconst homeDir = canonicalizePath(resolvePath(process.env.HOME || homedir()));\n\tconst userAgentsSkillsDir = join(homeDir, \".agents\", \"skills\");\n\tlet currentDir = canonicalizePath(resolvePath(cwd));\n\n\tconst configDir = join(currentDir, CONFIG_DIR_NAME);\n\tif (TRUST_REQUIRING_PROJECT_CONFIG_RESOURCES.some((entry) => existsSync(join(configDir, entry)))) {\n\t\treturn true;\n\t}\n\n\twhile (true) {\n\t\tconst agentsSkillsDir = join(currentDir, \".agents\", \"skills\");\n\t\tif (agentsSkillsDir !== userAgentsSkillsDir && existsSync(agentsSkillsDir)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tconst parentDir = dirname(currentDir);\n\t\tif (parentDir === currentDir) {\n\t\t\treturn false;\n\t\t}\n\t\tcurrentDir = parentDir;\n\t}\n}\n\nexport class ProjectTrustStore {\n\tprivate trustPath: string;\n\n\tconstructor(agentDir: string) {\n\t\tthis.trustPath = join(resolvePath(agentDir), \"trust.json\");\n\t}\n\n\tget(cwd: string): ProjectTrustDecision {\n\t\treturn this.getEntry(cwd)?.decision ?? null;\n\t}\n\n\tgetEntry(cwd: string): ProjectTrustStoreEntry | null {\n\t\treturn withTrustFileLock(this.trustPath, () => {\n\t\t\tconst data = readTrustFile(this.trustPath);\n\t\t\treturn findNearestTrustEntry(data, cwd);\n\t\t});\n\t}\n\n\tset(cwd: string, decision: ProjectTrustDecision): void {\n\t\tthis.setMany([{ path: cwd, decision }]);\n\t}\n\n\tsetMany(decisions: ProjectTrustUpdate[]): void {\n\t\twithTrustFileLock(this.trustPath, () => {\n\t\t\tconst data = readTrustFile(this.trustPath);\n\t\t\tfor (const { path, decision } of decisions) {\n\t\t\t\tconst key = normalizeCwd(path);\n\t\t\t\tif (decision === null) {\n\t\t\t\t\tdelete data[key];\n\t\t\t\t} else {\n\t\t\t\t\tdata[key] = decision;\n\t\t\t\t}\n\t\t\t}\n\t\t\twriteTrustFile(this.trustPath, data);\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Usage } from "@earendil-works/pi-ai/compat";
|
|
2
|
-
import type { SessionEntry } from "./session-manager.ts";
|
|
3
|
-
export interface UsageTotals {
|
|
4
|
-
input: number;
|
|
5
|
-
output: number;
|
|
6
|
-
cacheRead: number;
|
|
7
|
-
cacheWrite: number;
|
|
8
|
-
cost: number;
|
|
9
|
-
}
|
|
10
|
-
export declare function createUsageTotals(): UsageTotals;
|
|
11
|
-
export declare function addUsageToTotals(totals: UsageTotals, usage: Usage): void;
|
|
12
|
-
export interface UsageCostBreakdownEntry {
|
|
13
|
-
key: string;
|
|
14
|
-
cost: number;
|
|
15
|
-
tokens: number;
|
|
16
|
-
}
|
|
17
|
-
/** Group attributable assistant usage by model and all other usage into a separate bucket. */
|
|
18
|
-
export declare function getUsageCostBreakdown(entries: SessionEntry[]): UsageCostBreakdownEntry[];
|
|
19
|
-
//# sourceMappingURL=usage-totals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage-totals.d.ts","sourceRoot":"","sources":["../../src/core/usage-totals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,iBAAiB,IAAI,WAAW,CAQ/C;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAMxE;AAED,MAAM,WAAW,uBAAuB;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CACf;AAED,8FAA8F;AAC9F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,uBAAuB,EAAE,CAiCxF","sourcesContent":["import type { Usage } from \"@earendil-works/pi-ai/compat\";\nimport type { SessionEntry } from \"./session-manager.ts\";\n\nexport interface UsageTotals {\n\tinput: number;\n\toutput: number;\n\tcacheRead: number;\n\tcacheWrite: number;\n\tcost: number;\n}\n\nexport function createUsageTotals(): UsageTotals {\n\treturn {\n\t\tinput: 0,\n\t\toutput: 0,\n\t\tcacheRead: 0,\n\t\tcacheWrite: 0,\n\t\tcost: 0,\n\t};\n}\n\nexport function addUsageToTotals(totals: UsageTotals, usage: Usage): void {\n\ttotals.input += usage.input;\n\ttotals.output += usage.output;\n\ttotals.cacheRead += usage.cacheRead;\n\ttotals.cacheWrite += usage.cacheWrite;\n\ttotals.cost += usage.cost.total;\n}\n\nexport interface UsageCostBreakdownEntry {\n\tkey: string;\n\tcost: number;\n\ttokens: number;\n}\n\n/** Group attributable assistant usage by model and all other usage into a separate bucket. */\nexport function getUsageCostBreakdown(entries: SessionEntry[]): UsageCostBreakdownEntry[] {\n\tconst totalsByKey = new Map<string, UsageTotals>();\n\n\tfor (const entry of entries) {\n\t\tlet key: string | undefined;\n\t\tlet usage: Usage | undefined;\n\t\tif (entry.type === \"message\" && entry.message.role === \"assistant\") {\n\t\t\tkey = `${entry.message.provider}/${entry.message.responseModel ?? entry.message.model}`;\n\t\t\tusage = entry.message.usage;\n\t\t} else if (entry.type === \"message\" && entry.message.role === \"toolResult\" && entry.message.usage) {\n\t\t\tkey = \"Tools/summaries\";\n\t\t\tusage = entry.message.usage;\n\t\t} else if ((entry.type === \"branch_summary\" || entry.type === \"compaction\") && entry.usage) {\n\t\t\tkey = \"Tools/summaries\";\n\t\t\tusage = entry.usage;\n\t\t}\n\t\tif (!key || !usage) continue;\n\n\t\tlet totals = totalsByKey.get(key);\n\t\tif (!totals) {\n\t\t\ttotals = createUsageTotals();\n\t\t\ttotalsByKey.set(key, totals);\n\t\t}\n\t\taddUsageToTotals(totals, usage);\n\t}\n\n\treturn Array.from(totalsByKey, ([key, totals]) => ({\n\t\tkey,\n\t\tcost: totals.cost,\n\t\ttokens: totals.input + totals.output + totals.cacheRead + totals.cacheWrite,\n\t}))\n\t\t.filter((entry) => entry.cost > 0 || entry.tokens > 0)\n\t\t.sort((a, b) => b.cost - a.cost);\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usage-totals.js","sourceRoot":"","sources":["../../src/core/usage-totals.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,iBAAiB,GAAgB;IAChD,OAAO;QACN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CAAC;QAC7B,CAAC;aAAM,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,gBAAgB,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC5F,GAAG,GAAG,iBAAiB,CAAC;YACxB,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACrB,CAAC;QACD,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK;YAAE,SAAS;QAE7B,IAAI,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,GAAG,iBAAiB,EAAE,CAAC;YAC7B,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QAC9B,CAAC;QACD,gBAAgB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAClD,GAAG;QACH,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,MAAM,EAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU;KAC3E,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;SACrD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;AAAA,CAClC","sourcesContent":["import type { Usage } from \"@earendil-works/pi-ai/compat\";\nimport type { SessionEntry } from \"./session-manager.ts\";\n\nexport interface UsageTotals {\n\tinput: number;\n\toutput: number;\n\tcacheRead: number;\n\tcacheWrite: number;\n\tcost: number;\n}\n\nexport function createUsageTotals(): UsageTotals {\n\treturn {\n\t\tinput: 0,\n\t\toutput: 0,\n\t\tcacheRead: 0,\n\t\tcacheWrite: 0,\n\t\tcost: 0,\n\t};\n}\n\nexport function addUsageToTotals(totals: UsageTotals, usage: Usage): void {\n\ttotals.input += usage.input;\n\ttotals.output += usage.output;\n\ttotals.cacheRead += usage.cacheRead;\n\ttotals.cacheWrite += usage.cacheWrite;\n\ttotals.cost += usage.cost.total;\n}\n\nexport interface UsageCostBreakdownEntry {\n\tkey: string;\n\tcost: number;\n\ttokens: number;\n}\n\n/** Group attributable assistant usage by model and all other usage into a separate bucket. */\nexport function getUsageCostBreakdown(entries: SessionEntry[]): UsageCostBreakdownEntry[] {\n\tconst totalsByKey = new Map<string, UsageTotals>();\n\n\tfor (const entry of entries) {\n\t\tlet key: string | undefined;\n\t\tlet usage: Usage | undefined;\n\t\tif (entry.type === \"message\" && entry.message.role === \"assistant\") {\n\t\t\tkey = `${entry.message.provider}/${entry.message.responseModel ?? entry.message.model}`;\n\t\t\tusage = entry.message.usage;\n\t\t} else if (entry.type === \"message\" && entry.message.role === \"toolResult\" && entry.message.usage) {\n\t\t\tkey = \"Tools/summaries\";\n\t\t\tusage = entry.message.usage;\n\t\t} else if ((entry.type === \"branch_summary\" || entry.type === \"compaction\") && entry.usage) {\n\t\t\tkey = \"Tools/summaries\";\n\t\t\tusage = entry.usage;\n\t\t}\n\t\tif (!key || !usage) continue;\n\n\t\tlet totals = totalsByKey.get(key);\n\t\tif (!totals) {\n\t\t\ttotals = createUsageTotals();\n\t\t\ttotalsByKey.set(key, totals);\n\t\t}\n\t\taddUsageToTotals(totals, usage);\n\t}\n\n\treturn Array.from(totalsByKey, ([key, totals]) => ({\n\t\tkey,\n\t\tcost: totals.cost,\n\t\ttokens: totals.input + totals.output + totals.cacheRead + totals.cacheWrite,\n\t}))\n\t\t.filter((entry) => entry.cost > 0 || entry.tokens > 0)\n\t\t.sort((a, b) => b.cost - a.cost);\n}\n"]}
|
package/dist/dal/builtins.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DAL built-in extensions, always loaded regardless of user/project settings.
|
|
3
|
-
*
|
|
4
|
-
* Product extensions live in `engine/packages/dal-*` (the CLI workspace) as
|
|
5
|
-
* independent npm packages and are discovered the same way as cc-safety-net /
|
|
6
|
-
* pi-rewind: package.json `pi.extensions`.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Installs the commercial boundary on environment-derived credentials.
|
|
10
|
-
*
|
|
11
|
-
* pi treats an exported provider key (OPENAI_API_KEY, ANTHROPIC_API_KEY, …) as
|
|
12
|
-
* a configured provider, which is right for the open-source agent and wrong
|
|
13
|
-
* here: DAL is metered, and a developer machine almost always has a few of
|
|
14
|
-
* those exported, which put third-party providers in DAL's model list ready to
|
|
15
|
-
* bill nobody. Restricting the /login menu never touched this path.
|
|
16
|
-
*
|
|
17
|
-
* Narrow on purpose. It gates only credentials picked up implicitly from the
|
|
18
|
-
* environment — an explicit `~/.dal/agent/models.json` entry, an extension, and
|
|
19
|
-
* everything the SDK and test suite compose in process are all untouched. It is
|
|
20
|
-
* a commercial boundary, not a security one; see core/house-providers.ts.
|
|
21
|
-
*/
|
|
22
|
-
export declare function applyDalEnvApiKeyPolicy(): void;
|
|
23
|
-
/** npm packages shipped as product dependencies whose pi extensions always load. */
|
|
24
|
-
export declare const BUNDLED_EXTENSION_PACKAGES: string[];
|
|
25
|
-
export declare function dalBuiltinExtensionPaths(): string[];
|
|
26
|
-
/**
|
|
27
|
-
* macOS: fall back to the system proxy (scutil) when no proxy env vars are set.
|
|
28
|
-
* Node's fetch ignores OS proxy settings, which strands users whose network
|
|
29
|
-
* only works through a local proxy client. EnvHttpProxyAgent picks these up.
|
|
30
|
-
*/
|
|
31
|
-
export declare function applyDalSystemProxyFallback(): void;
|
|
32
|
-
//# sourceMappingURL=builtins.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../src/dal/builtins.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAU9C;AAED,oFAAoF;AACpF,eAAO,MAAM,0BAA0B,UAgBtC,CAAC;AAyCF,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAuBlD","sourcesContent":["/**\n * DAL built-in extensions, always loaded regardless of user/project settings.\n *\n * Product extensions live in `engine/packages/dal-*` (the CLI workspace) as\n * independent npm packages and are discovered the same way as cc-safety-net /\n * pi-rewind: package.json `pi.extensions`.\n */\n\nimport { execFileSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\nimport { setAmbientAuthPolicy, setEnvApiKeyPolicy } from \"@earendil-works/pi-ai\";\nimport { houseProvidersEnforced, isProviderConfigurable } from \"../core/house-providers.ts\";\n\n/**\n * Installs the commercial boundary on environment-derived credentials.\n *\n * pi treats an exported provider key (OPENAI_API_KEY, ANTHROPIC_API_KEY, …) as\n * a configured provider, which is right for the open-source agent and wrong\n * here: DAL is metered, and a developer machine almost always has a few of\n * those exported, which put third-party providers in DAL's model list ready to\n * bill nobody. Restricting the /login menu never touched this path.\n *\n * Narrow on purpose. It gates only credentials picked up implicitly from the\n * environment — an explicit `~/.dal/agent/models.json` entry, an extension, and\n * everything the SDK and test suite compose in process are all untouched. It is\n * a commercial boundary, not a security one; see core/house-providers.ts.\n */\nexport function applyDalEnvApiKeyPolicy(): void {\n\tif (!houseProvidersEnforced()) return;\n\tconst allowed = (provider: string): boolean => isProviderConfigurable(provider);\n\t// Both, because they are different code paths and only the second one was\n\t// carrying the traffic. getEnvApiKey has a single caller (pi's compat shim);\n\t// what actually makes a provider look configured — and what sent our own\n\t// virtual key to platform.openai.com when OPENAI_API_KEY happened to be\n\t// exported — is the ambient branch of resolveProviderAuth.\n\tsetEnvApiKeyPolicy(allowed);\n\tsetAmbientAuthPolicy(allowed);\n}\n\n/** npm packages shipped as product dependencies whose pi extensions always load. */\nexport const BUNDLED_EXTENSION_PACKAGES = [\n\t\"@dalcode/deepailab\",\n\t\"@dalcode/dal-gateway\",\n\t\"@dalcode/dal-guard\",\n\t\"@dalcode/dal-lsp\",\n\t\"@dalcode/dal-subagent\",\n\t\"@dalcode/dal-router\",\n\t\"@dalcode/dal-mcp\",\n\t\"@dalcode/dal-skills\",\n\t\"@dalcode/dal-office\",\n\t\"@dalcode/dal-halo\",\n\t\"@dalcode/dal-lang\",\n\t\"@dalcode/dal-bridge\",\n\t\"@dalcode/dal-telemetry\",\n\t\"cc-safety-net\",\n\t\"pi-rewind\",\n];\n\n/**\n * Packages whose absence must not pass unnoticed.\n *\n * dal-guard and cc-safety-net are the approval gate in front of destructive\n * commands. If one of them fails to resolve, dal still starts and every\n * dangerous command runs unprompted — and the user cannot tell that apart from\n * having enabled yolo mode. The rest are features: missing one degrades the\n * product, it does not remove a safety property, so those stay a quiet skip.\n */\nconst SAFETY_CRITICAL_PACKAGES = new Set([\"@dalcode/dal-guard\", \"cc-safety-net\"]);\n\nfunction bundledPackageExtensionPaths(): string[] {\n\tconst require = createRequire(import.meta.url);\n\tconst paths: string[] = [];\n\tfor (const pkg of BUNDLED_EXTENSION_PACKAGES) {\n\t\ttry {\n\t\t\tconst pkgJsonPath = require.resolve(`${pkg}/package.json`);\n\t\t\tconst pkgJson = JSON.parse(readFileSync(pkgJsonPath, \"utf8\")) as { pi?: { extensions?: string[] } };\n\t\t\tfor (const rel of pkgJson.pi?.extensions ?? []) {\n\t\t\t\tpaths.push(join(dirname(pkgJsonPath), rel));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (SAFETY_CRITICAL_PACKAGES.has(pkg)) {\n\t\t\t\t// Loud, and on stderr so it survives a piped session. Not fatal: a\n\t\t\t\t// user who needs to get work done on a damaged install should be\n\t\t\t\t// able to, as long as they know the gate is gone.\n\t\t\t\tprocess.stderr.write(\n\t\t\t\t\t`dal: 安全扩展 ${pkg} 加载失败,危险命令的审批门已失效 — ${\n\t\t\t\t\t\terror instanceof Error ? error.message : String(error)\n\t\t\t\t\t}\\n重新安装可恢复:npm i -g dal-code@latest\\n`,\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Otherwise: package unavailable in this install — skip rather than\n\t\t\t// fail startup.\n\t\t}\n\t}\n\treturn paths;\n}\n\nexport function dalBuiltinExtensionPaths(): string[] {\n\treturn bundledPackageExtensionPaths();\n}\n\n/**\n * macOS: fall back to the system proxy (scutil) when no proxy env vars are set.\n * Node's fetch ignores OS proxy settings, which strands users whose network\n * only works through a local proxy client. EnvHttpProxyAgent picks these up.\n */\nexport function applyDalSystemProxyFallback(): void {\n\tif (process.platform !== \"darwin\") return;\n\tconst envKeys = [\"HTTPS_PROXY\", \"https_proxy\", \"HTTP_PROXY\", \"http_proxy\", \"ALL_PROXY\", \"all_proxy\"];\n\tif (envKeys.some((k) => process.env[k])) return;\n\n\ttry {\n\t\tconst out = execFileSync(\"scutil\", [\"--proxy\"], { encoding: \"utf8\", timeout: 2000 });\n\t\tconst get = (key: string) => out.match(new RegExp(`${key}\\\\s*:\\\\s*(\\\\S+)`))?.[1];\n\t\tconst enabled = (key: string) => get(`${key}Enable`) === \"1\";\n\t\tconst proxy = enabled(\"HTTPS\")\n\t\t\t? `http://${get(\"HTTPSProxy\")}:${get(\"HTTPSPort\")}`\n\t\t\t: enabled(\"HTTP\")\n\t\t\t\t? `http://${get(\"HTTPProxy\")}:${get(\"HTTPPort\")}`\n\t\t\t\t: undefined;\n\t\tif (!proxy || proxy.includes(\"undefined\")) return;\n\t\tprocess.env.HTTPS_PROXY = proxy;\n\t\tprocess.env.HTTP_PROXY = proxy;\n\t\tconst noProxy = new Set((process.env.NO_PROXY ?? process.env.no_proxy ?? \"\").split(\",\").filter(Boolean));\n\t\tfor (const host of [\"localhost\", \"127.0.0.1\", \"::1\"]) noProxy.add(host);\n\t\tprocess.env.NO_PROXY = [...noProxy].join(\",\");\n\t} catch {\n\t\t// scutil unavailable or timed out — run without a proxy.\n\t}\n}\n"]}
|
package/dist/dal/builtins.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../src/dal/builtins.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAE5F;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,uBAAuB,GAAS;IAC/C,IAAI,CAAC,sBAAsB,EAAE;QAAE,OAAO;IACtC,MAAM,OAAO,GAAG,CAAC,QAAgB,EAAW,EAAE,CAAC,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAChF,0EAA0E;IAC1E,6EAA6E;IAC7E,2EAAyE;IACzE,wEAAwE;IACxE,6DAA2D;IAC3D,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC5B,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAA,CAC9B;AAED,oFAAoF;AACpF,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,oBAAoB;IACpB,sBAAsB;IACtB,oBAAoB;IACpB,kBAAkB;IAClB,uBAAuB;IACvB,qBAAqB;IACrB,kBAAkB;IAClB,qBAAqB;IACrB,qBAAqB;IACrB,mBAAmB;IACnB,mBAAmB;IACnB,qBA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AAG,KAAK,CAAC;QAC/B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;QACzG,KAAK,MAAM,IAAI,IAAI,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACxE,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACR,2DAAyD;IAC1D,CAAC;AAAA,CACD","sourcesContent":["/**\n * DAL built-in extensions, always loaded regardless of user/project settings.\n *\n * Product extensions live in `engine/packages/dal-*` (the CLI workspace) as\n * independent npm packages and are discovered the same way as cc-safety-net /\n * pi-rewind: package.json `pi.extensions`.\n */\n\nimport { execFileSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport { dirname, join } from \"node:path\";\nimport { setAmbientAuthPolicy, setEnvApiKeyPolicy } from \"@earendil-works/pi-ai\";\nimport { houseProvidersEnforced, isProviderConfigurable } from \"../core/house-providers.ts\";\n\n/**\n * Installs the commercial boundary on environment-derived credentials.\n *\n * pi treats an exported provider key (OPENAI_API_KEY, ANTHROPIC_API_KEY, …) as\n * a configured provider, which is right for the open-source agent and wrong\n * here: DAL is metered, and a developer machine almost always has a few of\n * those exported, which put third-party providers in DAL's model list ready to\n * bill nobody. Restricting the /login menu never touched this path.\n *\n * Narrow on purpose. It gates only credentials picked up implicitly from the\n * environment — an explicit `~/.dal/agent/models.json` entry, an extension, and\n * everything the SDK and test suite compose in process are all untouched. It is\n * a commercial boundary, not a security one; see core/house-providers.ts.\n */\nexport function applyDalEnvApiKeyPolicy(): void {\n\tif (!houseProvidersEnforced()) return;\n\tconst allowed = (provider: string): boolean => isProviderConfigurable(provider);\n\t// Both, because they are different code paths and only the second one was\n\t// carrying the traffic. getEnvApiKey has a single caller (pi's compat shim);\n\t// what actually makes a provider look configured — and what sent our own\n\t// virtual key to platform.openai.com when OPENAI_API_KEY happened to be\n\t// exported — is the ambient branch of resolveProviderAuth.\n\tsetEnvApiKeyPolicy(allowed);\n\tsetAmbientAuthPolicy(allowed);\n}\n\n/** npm packages shipped as product dependencies whose pi extensions always load. */\nexport const BUNDLED_EXTENSION_PACKAGES = [\n\t\"@dalcode/deepailab\",\n\t\"@dalcode/dal-gateway\",\n\t\"@dalcode/dal-guard\",\n\t\"@dalcode/dal-lsp\",\n\t\"@dalcode/dal-subagent\",\n\t\"@dalcode/dal-router\",\n\t\"@dalcode/dal-mcp\",\n\t\"@dalcode/dal-skills\",\n\t\"@dalcode/dal-office\",\n\t\"@dalcode/dal-halo\",\n\t\"@dalcode/dal-lang\",\n\t\"@dalcode/dal-bridge\",\n\t\"@dalcode/dal-telemetry\",\n\t\"cc-safety-net\",\n\t\"pi-rewind\",\n];\n\n/**\n * Packages whose absence must not pass unnoticed.\n *\n * dal-guard and cc-safety-net are the approval gate in front of destructive\n * commands. If one of them fails to resolve, dal still starts and every\n * dangerous command runs unprompted — and the user cannot tell that apart from\n * having enabled yolo mode. The rest are features: missing one degrades the\n * product, it does not remove a safety property, so those stay a quiet skip.\n */\nconst SAFETY_CRITICAL_PACKAGES = new Set([\"@dalcode/dal-guard\", \"cc-safety-net\"]);\n\nfunction bundledPackageExtensionPaths(): string[] {\n\tconst require = createRequire(import.meta.url);\n\tconst paths: string[] = [];\n\tfor (const pkg of BUNDLED_EXTENSION_PACKAGES) {\n\t\ttry {\n\t\t\tconst pkgJsonPath = require.resolve(`${pkg}/package.json`);\n\t\t\tconst pkgJson = JSON.parse(readFileSync(pkgJsonPath, \"utf8\")) as { pi?: { extensions?: string[] } };\n\t\t\tfor (const rel of pkgJson.pi?.extensions ?? []) {\n\t\t\t\tpaths.push(join(dirname(pkgJsonPath), rel));\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (SAFETY_CRITICAL_PACKAGES.has(pkg)) {\n\t\t\t\t// Loud, and on stderr so it survives a piped session. Not fatal: a\n\t\t\t\t// user who needs to get work done on a damaged install should be\n\t\t\t\t// able to, as long as they know the gate is gone.\n\t\t\t\tprocess.stderr.write(\n\t\t\t\t\t`dal: 安全扩展 ${pkg} 加载失败,危险命令的审批门已失效 — ${\n\t\t\t\t\t\terror instanceof Error ? error.message : String(error)\n\t\t\t\t\t}\\n重新安装可恢复:npm i -g dal-code@latest\\n`,\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Otherwise: package unavailable in this install — skip rather than\n\t\t\t// fail startup.\n\t\t}\n\t}\n\treturn paths;\n}\n\nexport function dalBuiltinExtensionPaths(): string[] {\n\treturn bundledPackageExtensionPaths();\n}\n\n/**\n * macOS: fall back to the system proxy (scutil) when no proxy env vars are set.\n * Node's fetch ignores OS proxy settings, which strands users whose network\n * only works through a local proxy client. EnvHttpProxyAgent picks these up.\n */\nexport function applyDalSystemProxyFallback(): void {\n\tif (process.platform !== \"darwin\") return;\n\tconst envKeys = [\"HTTPS_PROXY\", \"https_proxy\", \"HTTP_PROXY\", \"http_proxy\", \"ALL_PROXY\", \"all_proxy\"];\n\tif (envKeys.some((k) => process.env[k])) return;\n\n\ttry {\n\t\tconst out = execFileSync(\"scutil\", [\"--proxy\"], { encoding: \"utf8\", timeout: 2000 });\n\t\tconst get = (key: string) => out.match(new RegExp(`${key}\\\\s*:\\\\s*(\\\\S+)`))?.[1];\n\t\tconst enabled = (key: string) => get(`${key}Enable`) === \"1\";\n\t\tconst proxy = enabled(\"HTTPS\")\n\t\t\t? `http://${get(\"HTTPSProxy\")}:${get(\"HTTPSPort\")}`\n\t\t\t: enabled(\"HTTP\")\n\t\t\t\t? `http://${get(\"HTTPProxy\")}:${get(\"HTTPPort\")}`\n\t\t\t\t: undefined;\n\t\tif (!proxy || proxy.includes(\"undefined\")) return;\n\t\tprocess.env.HTTPS_PROXY = proxy;\n\t\tprocess.env.HTTP_PROXY = proxy;\n\t\tconst noProxy = new Set((process.env.NO_PROXY ?? process.env.no_proxy ?? \"\").split(\",\").filter(Boolean));\n\t\tfor (const host of [\"localhost\", \"127.0.0.1\", \"::1\"]) noProxy.add(host);\n\t\tprocess.env.NO_PROXY = [...noProxy].join(\",\");\n\t} catch {\n\t\t// scutil unavailable or timed out — run without a proxy.\n\t}\n}\n"]}
|
package/dist/dal/i18n.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DAL i18n for the coding agent.
|
|
3
|
-
*
|
|
4
|
-
* The implementation lives in `@dalcode/dal-pi-kit` so that the host package and
|
|
5
|
-
* every `@dalcode/dal-*` extension share ONE module-level current-language
|
|
6
|
-
* singleton. This file used to be a byte-identical copy, which meant
|
|
7
|
-
* `setLanguage()` here never reached dal-subagent / dal-guard / dal-gateway:
|
|
8
|
-
* they resolved the language once at import time and then stayed there.
|
|
9
|
-
*/
|
|
10
|
-
export type { DalLanguage } from "@dalcode/dal-pi-kit";
|
|
11
|
-
export { getLanguage, hasChosenLanguage, setLanguage, t } from "@dalcode/dal-pi-kit";
|
|
12
|
-
//# sourceMappingURL=i18n.d.ts.map
|
package/dist/dal/i18n.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/dal/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/**\n * DAL i18n for the coding agent.\n *\n * The implementation lives in `@dalcode/dal-pi-kit` so that the host package and\n * every `@dalcode/dal-*` extension share ONE module-level current-language\n * singleton. This file used to be a byte-identical copy, which meant\n * `setLanguage()` here never reached dal-subagent / dal-guard / dal-gateway:\n * they resolved the language once at import time and then stayed there.\n */\nexport type { DalLanguage } from \"@dalcode/dal-pi-kit\";\nexport { getLanguage, hasChosenLanguage, setLanguage, t } from \"@dalcode/dal-pi-kit\";\n"]}
|
package/dist/dal/i18n.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/dal/i18n.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["/**\n * DAL i18n for the coding agent.\n *\n * The implementation lives in `@dalcode/dal-pi-kit` so that the host package and\n * every `@dalcode/dal-*` extension share ONE module-level current-language\n * singleton. This file used to be a byte-identical copy, which meant\n * `setLanguage()` here never reached dal-subagent / dal-guard / dal-gateway:\n * they resolved the language once at import time and then stayed there.\n */\nexport type { DalLanguage } from \"@dalcode/dal-pi-kit\";\nexport { getLanguage, hasChosenLanguage, setLanguage, t } from \"@dalcode/dal-pi-kit\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAGnE,eAAO,MAAM,iBAAiB,EAAE,eAAe,EAAmE,CAAC","sourcesContent":["import type { InlineExtension } from \"../core/extensions/types.ts\";\nimport llamaExtension from \"./llama/index.ts\";\n\nexport const builtInExtensions: InlineExtension[] = [{ name: \"llama.cpp\", factory: llamaExtension, hidden: true }];\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/extensions/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAE9C,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC","sourcesContent":["import type { InlineExtension } from \"../core/extensions/types.ts\";\nimport llamaExtension from \"./llama/index.ts\";\n\nexport const builtInExtensions: InlineExtension[] = [{ name: \"llama.cpp\", factory: llamaExtension, hidden: true }];\n"]}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
export type LlamaModelStatus = "unloaded" | "loading" | "loaded" | "downloading" | "sleeping";
|
|
2
|
-
export interface LlamaModelInfo {
|
|
3
|
-
id: string;
|
|
4
|
-
aliases?: string[];
|
|
5
|
-
status: {
|
|
6
|
-
value: LlamaModelStatus;
|
|
7
|
-
args?: string[];
|
|
8
|
-
failed?: boolean;
|
|
9
|
-
exit_code?: number;
|
|
10
|
-
progress?: Record<string, {
|
|
11
|
-
done: number;
|
|
12
|
-
total: number;
|
|
13
|
-
}>;
|
|
14
|
-
};
|
|
15
|
-
architecture?: {
|
|
16
|
-
input_modalities?: string[];
|
|
17
|
-
output_modalities?: string[];
|
|
18
|
-
};
|
|
19
|
-
source?: string;
|
|
20
|
-
meta?: {
|
|
21
|
-
n_ctx?: number;
|
|
22
|
-
n_ctx_train?: number;
|
|
23
|
-
size?: number;
|
|
24
|
-
ftype?: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface LlamaModelsResponse {
|
|
28
|
-
data: LlamaModelInfo[];
|
|
29
|
-
object?: string;
|
|
30
|
-
}
|
|
31
|
-
export interface LlamaServerProps {
|
|
32
|
-
models_autoload?: boolean;
|
|
33
|
-
chat_template?: string;
|
|
34
|
-
}
|
|
35
|
-
export interface LlamaModelEvent {
|
|
36
|
-
model: string;
|
|
37
|
-
event: string;
|
|
38
|
-
data?: unknown;
|
|
39
|
-
}
|
|
40
|
-
export interface LlamaProgress {
|
|
41
|
-
message: string;
|
|
42
|
-
ratio?: number;
|
|
43
|
-
detail?: string;
|
|
44
|
-
}
|
|
45
|
-
export declare function formatBytes(bytes: number): string;
|
|
46
|
-
export declare function normalizeLlamaServerUrl(value: string): string;
|
|
47
|
-
export declare function llamaInferenceUrl(serverUrl: string): string;
|
|
48
|
-
export declare class LlamaClient {
|
|
49
|
-
readonly serverUrl: string;
|
|
50
|
-
private readonly apiKey;
|
|
51
|
-
constructor(serverUrl: string, apiKey?: string);
|
|
52
|
-
private request;
|
|
53
|
-
list(options?: {
|
|
54
|
-
reload?: boolean;
|
|
55
|
-
signal?: AbortSignal;
|
|
56
|
-
}): Promise<LlamaModelInfo[]>;
|
|
57
|
-
props(options?: {
|
|
58
|
-
model?: string;
|
|
59
|
-
signal?: AbortSignal;
|
|
60
|
-
}): Promise<LlamaServerProps>;
|
|
61
|
-
load(model: string, signal?: AbortSignal): Promise<void>;
|
|
62
|
-
unload(model: string, signal?: AbortSignal): Promise<void>;
|
|
63
|
-
unloadAndWait(model: string, signal?: AbortSignal): Promise<void>;
|
|
64
|
-
download(model: string, signal?: AbortSignal): Promise<void>;
|
|
65
|
-
watch(onEvent: (event: LlamaModelEvent) => void, signal?: AbortSignal): Promise<void>;
|
|
66
|
-
loadAndWait(model: string, onProgress: (progress: LlamaProgress) => void, signal?: AbortSignal): Promise<LlamaModelInfo>;
|
|
67
|
-
downloadAndWait(model: string, onProgress: (progress: LlamaProgress) => void, signal?: AbortSignal): Promise<LlamaModelInfo[]>;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/extensions/llama/client.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAC;AAE9F,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CA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C,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,CAAC,CAmCzB;IAEK,eAAe,CACpB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,EAC7C,MAAM,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,EAAE,CAAC,CAuC3B;CACD","sourcesContent":["export type LlamaModelStatus = \"unloaded\" | \"loading\" | \"loaded\" | \"downloading\" | \"sleeping\";\n\nexport interface LlamaModelInfo {\n\tid: string;\n\taliases?: string[];\n\tstatus: {\n\t\tvalue: LlamaModelStatus;\n\t\targs?: string[];\n\t\tfailed?: boolean;\n\t\texit_code?: number;\n\t\tprogress?: Record<string, { done: number; total: number }>;\n\t};\n\tarchitecture?: {\n\t\tinput_modalities?: string[];\n\t\toutput_modalities?: string[];\n\t};\n\tsource?: string;\n\tmeta?: {\n\t\tn_ctx?: number;\n\t\tn_ctx_train?: number;\n\t\tsize?: number;\n\t\tftype?: string;\n\t};\n}\n\nexport interface LlamaModelsResponse {\n\tdata: LlamaModelInfo[];\n\tobject?: string;\n}\n\nexport interface LlamaServerProps {\n\tmodels_autoload?: boolean;\n\tchat_template?: string;\n}\n\nexport interface LlamaModelEvent {\n\tmodel: string;\n\tevent: string;\n\tdata?: unknown;\n}\n\nexport interface LlamaProgress {\n\tmessage: string;\n\tratio?: number;\n\tdetail?: string;\n}\n\nfunction errorMessage(payload: unknown, fallback: string): string {\n\tif (typeof payload !== \"object\" || payload === null) return fallback;\n\tconst error = (payload as { error?: unknown }).error;\n\tif (typeof error !== \"object\" || error === null) return fallback;\n\tconst message = (error as { message?: unknown }).message;\n\treturn typeof message === \"string\" && message ? message : fallback;\n}\n\nfunction isModelInfo(value: unknown): value is LlamaModelInfo {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value as { id?: unknown; status?: { value?: unknown } };\n\treturn typeof candidate.id === \"string\" && typeof candidate.status?.value === \"string\";\n}\n\nfunction linkSignal(source: AbortSignal | undefined, target: AbortController): () => void {\n\tif (!source) return () => {};\n\tif (source.aborted) {\n\t\ttarget.abort(source.reason);\n\t\treturn () => {};\n\t}\n\tconst abort = () => target.abort(source.reason);\n\tsource.addEventListener(\"abort\", abort, { once: true });\n\treturn () => source.removeEventListener(\"abort\", abort);\n}\n\nfunction sleep(ms: number, signal?: AbortSignal): Promise<void> {\n\treturn new Promise((resolve, reject) => {\n\t\tif (signal?.aborted) {\n\t\t\treject(signal.reason ?? new Error(\"Cancelled\"));\n\t\t\treturn;\n\t\t}\n\t\tconst abort = () => {\n\t\t\tclearTimeout(timeout);\n\t\t\treject(signal?.reason ?? new Error(\"Cancelled\"));\n\t\t};\n\t\tconst timeout = setTimeout(() => {\n\t\t\tsignal?.removeEventListener(\"abort\", abort);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tsignal?.addEventListener(\"abort\", abort, { once: true });\n\t});\n}\n\nfunction parseLoadProgress(data: unknown): LlamaProgress | undefined {\n\tif (typeof data !== \"object\" || data === null) return undefined;\n\tconst progress = (data as { progress?: unknown }).progress;\n\tif (typeof progress !== \"object\" || progress === null) return undefined;\n\tconst value = progress as { stages?: unknown; current?: unknown; stage?: unknown; value?: unknown };\n\tconst stage =\n\t\ttypeof value.current === \"string\" ? value.current : typeof value.stage === \"string\" ? value.stage : undefined;\n\tconst stages = Array.isArray(value.stages)\n\t\t? value.stages.filter((entry): entry is string => typeof entry === \"string\")\n\t\t: [];\n\tconst stageRatio = typeof value.value === \"number\" ? Math.max(0, Math.min(1, value.value)) : undefined;\n\tlet ratio = stageRatio;\n\tif (stage && stages.length > 0) {\n\t\tconst index = stages.indexOf(stage);\n\t\tif (index >= 0) ratio = (index + (stageRatio ?? 0)) / stages.length;\n\t}\n\treturn {\n\t\tmessage: stage ? `Loading ${stage.replaceAll(\"_\", \" \")}` : \"Loading model\",\n\t\tratio,\n\t};\n}\n\nfunction parseDownloadProgress(data: unknown): LlamaProgress | undefined {\n\tif (typeof data !== \"object\" || data === null) return undefined;\n\tconst nested = (data as { progress?: unknown }).progress;\n\tconst files = typeof nested === \"object\" && nested !== null ? nested : data;\n\tlet done = 0;\n\tlet total = 0;\n\tfor (const value of Object.values(files as Record<string, unknown>)) {\n\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\tconst entry = value as { done?: unknown; total?: unknown };\n\t\tif (typeof entry.done !== \"number\" || typeof entry.total !== \"number\") continue;\n\t\tdone += entry.done;\n\t\ttotal += entry.total;\n\t}\n\tif (total <= 0) return undefined;\n\treturn {\n\t\tmessage: \"Downloading model\",\n\t\tratio: done / total,\n\t\tdetail: `${formatBytes(done)} / ${formatBytes(total)}`,\n\t};\n}\n\nexport function formatBytes(bytes: number): string {\n\tif (bytes < 1024) return `${bytes} B`;\n\tconst units = [\"KiB\", \"MiB\", \"GiB\", \"TiB\"];\n\tlet value = bytes / 1024;\n\tlet unit = units[0]!;\n\tfor (let index = 1; index < units.length && value >= 1024; index++) {\n\t\tvalue /= 1024;\n\t\tunit = units[index]!;\n\t}\n\treturn `${value >= 10 ? value.toFixed(1) : value.toFixed(2)} ${unit}`;\n}\n\nexport function normalizeLlamaServerUrl(value: string): string {\n\tconst url = new URL(value.trim());\n\tif (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n\t\tthrow new Error(\"Server URL must use http or https\");\n\t}\n\turl.hash = \"\";\n\turl.search = \"\";\n\turl.pathname = url.pathname.replace(/\\/+$/u, \"\").replace(/\\/v1$/u, \"\") || \"/\";\n\treturn url.toString().replace(/\\/$/u, \"\");\n}\n\nexport function llamaInferenceUrl(serverUrl: string): string {\n\treturn `${normalizeLlamaServerUrl(serverUrl)}/v1`;\n}\n\nexport class LlamaClient {\n\treadonly serverUrl: string;\n\tprivate readonly apiKey: string | undefined;\n\n\tconstructor(serverUrl: string, apiKey?: string) {\n\t\tthis.serverUrl = normalizeLlamaServerUrl(serverUrl);\n\t\tthis.apiKey = apiKey;\n\t}\n\n\tprivate async request(path: string, init: RequestInit = {}): Promise<unknown> {\n\t\tconst headers = new Headers(init.headers);\n\t\tif (init.body !== undefined) headers.set(\"Content-Type\", \"application/json\");\n\t\tif (this.apiKey) headers.set(\"Authorization\", `Bearer ${this.apiKey}`);\n\t\tconst timeout = AbortSignal.timeout(15_000);\n\t\tconst signal = init.signal ? AbortSignal.any([init.signal, timeout]) : timeout;\n\t\tconst response = await fetch(`${this.serverUrl}${path}`, { ...init, headers, signal });\n\t\tlet payload: unknown;\n\t\ttry {\n\t\t\tpayload = await response.json();\n\t\t} catch {\n\t\t\tpayload = undefined;\n\t\t}\n\t\tif (!response.ok) throw new Error(errorMessage(payload, `llama.cpp returned HTTP ${response.status}`));\n\t\treturn payload;\n\t}\n\n\tasync list(options: { reload?: boolean; signal?: AbortSignal } = {}): Promise<LlamaModelInfo[]> {\n\t\tconst payload = await this.request(`/models${options.reload ? \"?reload=1\" : \"\"}`, { signal: options.signal });\n\t\tif (typeof payload !== \"object\" || payload === null || !Array.isArray((payload as { data?: unknown }).data)) {\n\t\t\tthrow new Error(\"llama.cpp returned an invalid model catalog\");\n\t\t}\n\t\tconst data = (payload as { data: unknown[] }).data;\n\t\tif (!data.every(isModelInfo)) throw new Error(\"Server is not running in llama.cpp router mode\");\n\t\treturn data;\n\t}\n\n\tasync props(options: { model?: string; signal?: AbortSignal } = {}): Promise<LlamaServerProps> {\n\t\tconst query = options.model ? `?${new URLSearchParams({ model: options.model, autoload: \"false\" })}` : \"\";\n\t\tconst payload = await this.request(`/props${query}`, { signal: options.signal });\n\t\tif (typeof payload !== \"object\" || payload === null) return {};\n\t\tconst { models_autoload: modelsAutoload, chat_template: chatTemplate } = payload as Record<string, unknown>;\n\t\treturn {\n\t\t\t...(typeof modelsAutoload === \"boolean\" ? { models_autoload: modelsAutoload } : {}),\n\t\t\t...(typeof chatTemplate === \"string\" ? { chat_template: chatTemplate } : {}),\n\t\t};\n\t}\n\n\tasync load(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.request(\"/models/load\", { method: \"POST\", body: JSON.stringify({ model }), signal });\n\t}\n\n\tasync unload(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.request(\"/models/unload\", { method: \"POST\", body: JSON.stringify({ model }), signal });\n\t}\n\n\tasync unloadAndWait(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.unload(model, signal);\n\t\twhile (true) {\n\t\t\tconst entry = (await this.list({ signal })).find((candidate) => candidate.id === model);\n\t\t\tif (!entry || entry.status.value === \"unloaded\") return;\n\t\t\tawait sleep(100, signal);\n\t\t}\n\t}\n\n\tasync download(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.request(\"/models\", { method: \"POST\", body: JSON.stringify({ model }), signal });\n\t}\n\n\tasync watch(onEvent: (event: LlamaModelEvent) => void, signal?: AbortSignal): Promise<void> {\n\t\tconst headers = new Headers();\n\t\tif (this.apiKey) headers.set(\"Authorization\", `Bearer ${this.apiKey}`);\n\t\tconst response = await fetch(`${this.serverUrl}/models/sse`, { headers, signal });\n\t\tif (!response.ok || !response.body) throw new Error(`llama.cpp SSE returned HTTP ${response.status}`);\n\t\tconst reader = response.body.getReader();\n\t\tconst decoder = new TextDecoder();\n\t\tlet buffer = \"\";\n\t\twhile (true) {\n\t\t\tconst chunk = await reader.read();\n\t\t\tif (chunk.done) break;\n\t\t\tbuffer += decoder.decode(chunk.value, { stream: true }).replaceAll(\"\\r\\n\", \"\\n\");\n\t\t\tlet boundary = buffer.indexOf(\"\\n\\n\");\n\t\t\twhile (boundary >= 0) {\n\t\t\t\tconst frame = buffer.slice(0, boundary);\n\t\t\t\tbuffer = buffer.slice(boundary + 2);\n\t\t\t\tconst data = frame\n\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t.filter((line) => line.startsWith(\"data:\"))\n\t\t\t\t\t.map((line) => line.slice(5).trimStart())\n\t\t\t\t\t.join(\"\\n\");\n\t\t\t\tif (data) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst event = JSON.parse(data) as LlamaModelEvent;\n\t\t\t\t\t\tif (event && typeof event.model === \"string\" && typeof event.event === \"string\") onEvent(event);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Ignore malformed events; catalog polling remains authoritative.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboundary = buffer.indexOf(\"\\n\\n\");\n\t\t\t}\n\t\t}\n\t}\n\n\tasync loadAndWait(\n\t\tmodel: string,\n\t\tonProgress: (progress: LlamaProgress) => void,\n\t\tsignal?: AbortSignal,\n\t): Promise<LlamaModelInfo> {\n\t\tconst watcher = new AbortController();\n\t\tconst unlink = linkSignal(signal, watcher);\n\t\tlet eventLoaded = false;\n\t\tlet eventError: string | undefined;\n\t\tvoid this.watch((event) => {\n\t\t\tif (event.model !== model) return;\n\t\t\tif (event.event !== \"model_status\" && event.event !== \"status_change\") return;\n\t\t\tconst data = event.data as { status?: unknown } | undefined;\n\t\t\tif (data?.status === \"loaded\") eventLoaded = true;\n\t\t\tif (data?.status === \"unloaded\") eventError = \"Model failed to load\";\n\t\t\tconst progress = parseLoadProgress(event.data);\n\t\t\tif (progress) onProgress(progress);\n\t\t}, watcher.signal).catch(() => {});\n\t\ttry {\n\t\t\tawait this.load(model, signal);\n\t\t\tonProgress({ message: \"Loading model\" });\n\t\t\twhile (true) {\n\t\t\t\tif (signal?.aborted) throw signal.reason ?? new Error(\"Cancelled\");\n\t\t\t\tconst entry = (await this.list({ signal })).find((candidate) => candidate.id === model);\n\t\t\t\tif (entry?.status.value === \"loaded\") return entry;\n\t\t\t\tif (eventLoaded && !entry) return { id: model, status: { value: \"loaded\" } };\n\t\t\t\tif (entry?.status.failed || eventError) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\tentry?.status.exit_code === undefined\n\t\t\t\t\t\t\t? (eventError ?? \"Model failed to load\")\n\t\t\t\t\t\t\t: `Model exited with code ${entry.status.exit_code}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tawait sleep(250, signal);\n\t\t\t}\n\t\t} finally {\n\t\t\tunlink();\n\t\t\twatcher.abort();\n\t\t}\n\t}\n\n\tasync downloadAndWait(\n\t\tmodel: string,\n\t\tonProgress: (progress: LlamaProgress) => void,\n\t\tsignal?: AbortSignal,\n\t): Promise<LlamaModelInfo[]> {\n\t\tconst watcher = new AbortController();\n\t\tconst unlink = linkSignal(signal, watcher);\n\t\tlet finished = false;\n\t\tlet failure: string | undefined;\n\t\tlet sawDownloading = false;\n\t\tlet polls = 0;\n\t\tvoid this.watch((event) => {\n\t\t\tif (event.model !== model) return;\n\t\t\tif (event.event === \"download_finished\") finished = true;\n\t\t\tif (event.event === \"download_failed\") failure = errorMessage(event.data, \"Download failed\");\n\t\t\tif (event.event === \"download_progress\") {\n\t\t\t\tsawDownloading = true;\n\t\t\t\tconst progress = parseDownloadProgress(event.data);\n\t\t\t\tif (progress) onProgress(progress);\n\t\t\t}\n\t\t}, watcher.signal).catch(() => {});\n\t\ttry {\n\t\t\tawait this.download(model, signal);\n\t\t\tonProgress({ message: \"Downloading model\" });\n\t\t\twhile (true) {\n\t\t\t\tif (signal?.aborted) throw signal.reason ?? new Error(\"Cancelled\");\n\t\t\t\tif (failure) throw new Error(failure);\n\t\t\t\tconst models = await this.list({ signal });\n\t\t\t\tpolls++;\n\t\t\t\tconst entry = models.find((candidate) => candidate.id === model);\n\t\t\t\tif (entry?.status.value === \"downloading\") {\n\t\t\t\t\tsawDownloading = true;\n\t\t\t\t\tconst progress = parseDownloadProgress(entry.status.progress);\n\t\t\t\t\tif (progress) onProgress(progress);\n\t\t\t\t} else if (finished || (entry && (sawDownloading || polls >= 2))) {\n\t\t\t\t\treturn this.list({ reload: true, signal });\n\t\t\t\t}\n\t\t\t\tawait sleep(500, signal);\n\t\t\t}\n\t\t} finally {\n\t\t\tunlink();\n\t\t\twatcher.abort();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/extensions/llama/client.ts"],"names":[],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CAAC;QACjB,CAAC;IAAA,CACD;CACD","sourcesContent":["export type LlamaModelStatus = \"unloaded\" | \"loading\" | \"loaded\" | \"downloading\" | \"sleeping\";\n\nexport interface LlamaModelInfo {\n\tid: string;\n\taliases?: string[];\n\tstatus: {\n\t\tvalue: LlamaModelStatus;\n\t\targs?: string[];\n\t\tfailed?: boolean;\n\t\texit_code?: number;\n\t\tprogress?: Record<string, { done: number; total: number }>;\n\t};\n\tarchitecture?: {\n\t\tinput_modalities?: string[];\n\t\toutput_modalities?: string[];\n\t};\n\tsource?: string;\n\tmeta?: {\n\t\tn_ctx?: number;\n\t\tn_ctx_train?: number;\n\t\tsize?: number;\n\t\tftype?: string;\n\t};\n}\n\nexport interface LlamaModelsResponse {\n\tdata: LlamaModelInfo[];\n\tobject?: string;\n}\n\nexport interface LlamaServerProps {\n\tmodels_autoload?: boolean;\n\tchat_template?: string;\n}\n\nexport interface LlamaModelEvent {\n\tmodel: string;\n\tevent: string;\n\tdata?: unknown;\n}\n\nexport interface LlamaProgress {\n\tmessage: string;\n\tratio?: number;\n\tdetail?: string;\n}\n\nfunction errorMessage(payload: unknown, fallback: string): string {\n\tif (typeof payload !== \"object\" || payload === null) return fallback;\n\tconst error = (payload as { error?: unknown }).error;\n\tif (typeof error !== \"object\" || error === null) return fallback;\n\tconst message = (error as { message?: unknown }).message;\n\treturn typeof message === \"string\" && message ? message : fallback;\n}\n\nfunction isModelInfo(value: unknown): value is LlamaModelInfo {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value as { id?: unknown; status?: { value?: unknown } };\n\treturn typeof candidate.id === \"string\" && typeof candidate.status?.value === \"string\";\n}\n\nfunction linkSignal(source: AbortSignal | undefined, target: AbortController): () => void {\n\tif (!source) return () => {};\n\tif (source.aborted) {\n\t\ttarget.abort(source.reason);\n\t\treturn () => {};\n\t}\n\tconst abort = () => target.abort(source.reason);\n\tsource.addEventListener(\"abort\", abort, { once: true });\n\treturn () => source.removeEventListener(\"abort\", abort);\n}\n\nfunction sleep(ms: number, signal?: AbortSignal): Promise<void> {\n\treturn new Promise((resolve, reject) => {\n\t\tif (signal?.aborted) {\n\t\t\treject(signal.reason ?? new Error(\"Cancelled\"));\n\t\t\treturn;\n\t\t}\n\t\tconst abort = () => {\n\t\t\tclearTimeout(timeout);\n\t\t\treject(signal?.reason ?? new Error(\"Cancelled\"));\n\t\t};\n\t\tconst timeout = setTimeout(() => {\n\t\t\tsignal?.removeEventListener(\"abort\", abort);\n\t\t\tresolve();\n\t\t}, ms);\n\t\tsignal?.addEventListener(\"abort\", abort, { once: true });\n\t});\n}\n\nfunction parseLoadProgress(data: unknown): LlamaProgress | undefined {\n\tif (typeof data !== \"object\" || data === null) return undefined;\n\tconst progress = (data as { progress?: unknown }).progress;\n\tif (typeof progress !== \"object\" || progress === null) return undefined;\n\tconst value = progress as { stages?: unknown; current?: unknown; stage?: unknown; value?: unknown };\n\tconst stage =\n\t\ttypeof value.current === \"string\" ? value.current : typeof value.stage === \"string\" ? value.stage : undefined;\n\tconst stages = Array.isArray(value.stages)\n\t\t? value.stages.filter((entry): entry is string => typeof entry === \"string\")\n\t\t: [];\n\tconst stageRatio = typeof value.value === \"number\" ? Math.max(0, Math.min(1, value.value)) : undefined;\n\tlet ratio = stageRatio;\n\tif (stage && stages.length > 0) {\n\t\tconst index = stages.indexOf(stage);\n\t\tif (index >= 0) ratio = (index + (stageRatio ?? 0)) / stages.length;\n\t}\n\treturn {\n\t\tmessage: stage ? `Loading ${stage.replaceAll(\"_\", \" \")}` : \"Loading model\",\n\t\tratio,\n\t};\n}\n\nfunction parseDownloadProgress(data: unknown): LlamaProgress | undefined {\n\tif (typeof data !== \"object\" || data === null) return undefined;\n\tconst nested = (data as { progress?: unknown }).progress;\n\tconst files = typeof nested === \"object\" && nested !== null ? nested : data;\n\tlet done = 0;\n\tlet total = 0;\n\tfor (const value of Object.values(files as Record<string, unknown>)) {\n\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\tconst entry = value as { done?: unknown; total?: unknown };\n\t\tif (typeof entry.done !== \"number\" || typeof entry.total !== \"number\") continue;\n\t\tdone += entry.done;\n\t\ttotal += entry.total;\n\t}\n\tif (total <= 0) return undefined;\n\treturn {\n\t\tmessage: \"Downloading model\",\n\t\tratio: done / total,\n\t\tdetail: `${formatBytes(done)} / ${formatBytes(total)}`,\n\t};\n}\n\nexport function formatBytes(bytes: number): string {\n\tif (bytes < 1024) return `${bytes} B`;\n\tconst units = [\"KiB\", \"MiB\", \"GiB\", \"TiB\"];\n\tlet value = bytes / 1024;\n\tlet unit = units[0]!;\n\tfor (let index = 1; index < units.length && value >= 1024; index++) {\n\t\tvalue /= 1024;\n\t\tunit = units[index]!;\n\t}\n\treturn `${value >= 10 ? value.toFixed(1) : value.toFixed(2)} ${unit}`;\n}\n\nexport function normalizeLlamaServerUrl(value: string): string {\n\tconst url = new URL(value.trim());\n\tif (url.protocol !== \"http:\" && url.protocol !== \"https:\") {\n\t\tthrow new Error(\"Server URL must use http or https\");\n\t}\n\turl.hash = \"\";\n\turl.search = \"\";\n\turl.pathname = url.pathname.replace(/\\/+$/u, \"\").replace(/\\/v1$/u, \"\") || \"/\";\n\treturn url.toString().replace(/\\/$/u, \"\");\n}\n\nexport function llamaInferenceUrl(serverUrl: string): string {\n\treturn `${normalizeLlamaServerUrl(serverUrl)}/v1`;\n}\n\nexport class LlamaClient {\n\treadonly serverUrl: string;\n\tprivate readonly apiKey: string | undefined;\n\n\tconstructor(serverUrl: string, apiKey?: string) {\n\t\tthis.serverUrl = normalizeLlamaServerUrl(serverUrl);\n\t\tthis.apiKey = apiKey;\n\t}\n\n\tprivate async request(path: string, init: RequestInit = {}): Promise<unknown> {\n\t\tconst headers = new Headers(init.headers);\n\t\tif (init.body !== undefined) headers.set(\"Content-Type\", \"application/json\");\n\t\tif (this.apiKey) headers.set(\"Authorization\", `Bearer ${this.apiKey}`);\n\t\tconst timeout = AbortSignal.timeout(15_000);\n\t\tconst signal = init.signal ? AbortSignal.any([init.signal, timeout]) : timeout;\n\t\tconst response = await fetch(`${this.serverUrl}${path}`, { ...init, headers, signal });\n\t\tlet payload: unknown;\n\t\ttry {\n\t\t\tpayload = await response.json();\n\t\t} catch {\n\t\t\tpayload = undefined;\n\t\t}\n\t\tif (!response.ok) throw new Error(errorMessage(payload, `llama.cpp returned HTTP ${response.status}`));\n\t\treturn payload;\n\t}\n\n\tasync list(options: { reload?: boolean; signal?: AbortSignal } = {}): Promise<LlamaModelInfo[]> {\n\t\tconst payload = await this.request(`/models${options.reload ? \"?reload=1\" : \"\"}`, { signal: options.signal });\n\t\tif (typeof payload !== \"object\" || payload === null || !Array.isArray((payload as { data?: unknown }).data)) {\n\t\t\tthrow new Error(\"llama.cpp returned an invalid model catalog\");\n\t\t}\n\t\tconst data = (payload as { data: unknown[] }).data;\n\t\tif (!data.every(isModelInfo)) throw new Error(\"Server is not running in llama.cpp router mode\");\n\t\treturn data;\n\t}\n\n\tasync props(options: { model?: string; signal?: AbortSignal } = {}): Promise<LlamaServerProps> {\n\t\tconst query = options.model ? `?${new URLSearchParams({ model: options.model, autoload: \"false\" })}` : \"\";\n\t\tconst payload = await this.request(`/props${query}`, { signal: options.signal });\n\t\tif (typeof payload !== \"object\" || payload === null) return {};\n\t\tconst { models_autoload: modelsAutoload, chat_template: chatTemplate } = payload as Record<string, unknown>;\n\t\treturn {\n\t\t\t...(typeof modelsAutoload === \"boolean\" ? { models_autoload: modelsAutoload } : {}),\n\t\t\t...(typeof chatTemplate === \"string\" ? { chat_template: chatTemplate } : {}),\n\t\t};\n\t}\n\n\tasync load(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.request(\"/models/load\", { method: \"POST\", body: JSON.stringify({ model }), signal });\n\t}\n\n\tasync unload(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.request(\"/models/unload\", { method: \"POST\", body: JSON.stringify({ model }), signal });\n\t}\n\n\tasync unloadAndWait(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.unload(model, signal);\n\t\twhile (true) {\n\t\t\tconst entry = (await this.list({ signal })).find((candidate) => candidate.id === model);\n\t\t\tif (!entry || entry.status.value === \"unloaded\") return;\n\t\t\tawait sleep(100, signal);\n\t\t}\n\t}\n\n\tasync download(model: string, signal?: AbortSignal): Promise<void> {\n\t\tawait this.request(\"/models\", { method: \"POST\", body: JSON.stringify({ model }), signal });\n\t}\n\n\tasync watch(onEvent: (event: LlamaModelEvent) => void, signal?: AbortSignal): Promise<void> {\n\t\tconst headers = new Headers();\n\t\tif (this.apiKey) headers.set(\"Authorization\", `Bearer ${this.apiKey}`);\n\t\tconst response = await fetch(`${this.serverUrl}/models/sse`, { headers, signal });\n\t\tif (!response.ok || !response.body) throw new Error(`llama.cpp SSE returned HTTP ${response.status}`);\n\t\tconst reader = response.body.getReader();\n\t\tconst decoder = new TextDecoder();\n\t\tlet buffer = \"\";\n\t\twhile (true) {\n\t\t\tconst chunk = await reader.read();\n\t\t\tif (chunk.done) break;\n\t\t\tbuffer += decoder.decode(chunk.value, { stream: true }).replaceAll(\"\\r\\n\", \"\\n\");\n\t\t\tlet boundary = buffer.indexOf(\"\\n\\n\");\n\t\t\twhile (boundary >= 0) {\n\t\t\t\tconst frame = buffer.slice(0, boundary);\n\t\t\t\tbuffer = buffer.slice(boundary + 2);\n\t\t\t\tconst data = frame\n\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t.filter((line) => line.startsWith(\"data:\"))\n\t\t\t\t\t.map((line) => line.slice(5).trimStart())\n\t\t\t\t\t.join(\"\\n\");\n\t\t\t\tif (data) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst event = JSON.parse(data) as LlamaModelEvent;\n\t\t\t\t\t\tif (event && typeof event.model === \"string\" && typeof event.event === \"string\") onEvent(event);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Ignore malformed events; catalog polling remains authoritative.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tboundary = buffer.indexOf(\"\\n\\n\");\n\t\t\t}\n\t\t}\n\t}\n\n\tasync loadAndWait(\n\t\tmodel: string,\n\t\tonProgress: (progress: LlamaProgress) => void,\n\t\tsignal?: AbortSignal,\n\t): Promise<LlamaModelInfo> {\n\t\tconst watcher = new AbortController();\n\t\tconst unlink = linkSignal(signal, watcher);\n\t\tlet eventLoaded = false;\n\t\tlet eventError: string | undefined;\n\t\tvoid this.watch((event) => {\n\t\t\tif (event.model !== model) return;\n\t\t\tif (event.event !== \"model_status\" && event.event !== \"status_change\") return;\n\t\t\tconst data = event.data as { status?: unknown } | undefined;\n\t\t\tif (data?.status === \"loaded\") eventLoaded = true;\n\t\t\tif (data?.status === \"unloaded\") eventError = \"Model failed to load\";\n\t\t\tconst progress = parseLoadProgress(event.data);\n\t\t\tif (progress) onProgress(progress);\n\t\t}, watcher.signal).catch(() => {});\n\t\ttry {\n\t\t\tawait this.load(model, signal);\n\t\t\tonProgress({ message: \"Loading model\" });\n\t\t\twhile (true) {\n\t\t\t\tif (signal?.aborted) throw signal.reason ?? new Error(\"Cancelled\");\n\t\t\t\tconst entry = (await this.list({ signal })).find((candidate) => candidate.id === model);\n\t\t\t\tif (entry?.status.value === \"loaded\") return entry;\n\t\t\t\tif (eventLoaded && !entry) return { id: model, status: { value: \"loaded\" } };\n\t\t\t\tif (entry?.status.failed || eventError) {\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\tentry?.status.exit_code === undefined\n\t\t\t\t\t\t\t? (eventError ?? \"Model failed to load\")\n\t\t\t\t\t\t\t: `Model exited with code ${entry.status.exit_code}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tawait sleep(250, signal);\n\t\t\t}\n\t\t} finally {\n\t\t\tunlink();\n\t\t\twatcher.abort();\n\t\t}\n\t}\n\n\tasync downloadAndWait(\n\t\tmodel: string,\n\t\tonProgress: (progress: LlamaProgress) => void,\n\t\tsignal?: AbortSignal,\n\t): Promise<LlamaModelInfo[]> {\n\t\tconst watcher = new AbortController();\n\t\tconst unlink = linkSignal(signal, watcher);\n\t\tlet finished = false;\n\t\tlet failure: string | undefined;\n\t\tlet sawDownloading = false;\n\t\tlet polls = 0;\n\t\tvoid this.watch((event) => {\n\t\t\tif (event.model !== model) return;\n\t\t\tif (event.event === \"download_finished\") finished = true;\n\t\t\tif (event.event === \"download_failed\") failure = errorMessage(event.data, \"Download failed\");\n\t\t\tif (event.event === \"download_progress\") {\n\t\t\t\tsawDownloading = true;\n\t\t\t\tconst progress = parseDownloadProgress(event.data);\n\t\t\t\tif (progress) onProgress(progress);\n\t\t\t}\n\t\t}, watcher.signal).catch(() => {});\n\t\ttry {\n\t\t\tawait this.download(model, signal);\n\t\t\tonProgress({ message: \"Downloading model\" });\n\t\t\twhile (true) {\n\t\t\t\tif (signal?.aborted) throw signal.reason ?? new Error(\"Cancelled\");\n\t\t\t\tif (failure) throw new Error(failure);\n\t\t\t\tconst models = await this.list({ signal });\n\t\t\t\tpolls++;\n\t\t\t\tconst entry = models.find((candidate) => candidate.id === model);\n\t\t\t\tif (entry?.status.value === \"downloading\") {\n\t\t\t\t\tsawDownloading = true;\n\t\t\t\t\tconst progress = parseDownloadProgress(entry.status.progress);\n\t\t\t\t\tif (progress) onProgress(progress);\n\t\t\t\t} else if (finished || (entry && (sawDownloading || polls >= 2))) {\n\t\t\t\t\treturn this.list({ reload: true, signal });\n\t\t\t\t}\n\t\t\t\tawait sleep(500, signal);\n\t\t\t}\n\t\t} finally {\n\t\t\tunlink();\n\t\t\twatcher.abort();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface HuggingFaceModel {
|
|
2
|
-
id: string;
|
|
3
|
-
downloads: number;
|
|
4
|
-
}
|
|
5
|
-
export interface HuggingFaceQuantization {
|
|
6
|
-
name: string;
|
|
7
|
-
size?: number;
|
|
8
|
-
}
|
|
9
|
-
export interface HuggingFaceModelDetails {
|
|
10
|
-
id: string;
|
|
11
|
-
gated: false | "auto" | "manual";
|
|
12
|
-
quantizations: HuggingFaceQuantization[];
|
|
13
|
-
}
|
|
14
|
-
export declare function findHuggingFaceToken(env?: NodeJS.ProcessEnv): Promise<string | undefined>;
|
|
15
|
-
export declare class HuggingFaceClient {
|
|
16
|
-
private readonly token;
|
|
17
|
-
private readonly baseUrl;
|
|
18
|
-
constructor(token?: string, baseUrl?: string);
|
|
19
|
-
private request;
|
|
20
|
-
search(query: string, signal?: AbortSignal): Promise<HuggingFaceModel[]>;
|
|
21
|
-
details(id: string, signal?: AbortSignal): Promise<HuggingFaceModelDetails>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=huggingface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface.d.ts","sourceRoot":"","sources":["../../../src/extensions/llama/huggingface.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,gBAAgB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IACjC,aAAa,EAAE,uBAAuB,EAAE,CAAC;CACzC;AAsBD,wBAAsB,oBAAoB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAe5G;AAED,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;IAC3C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IAEjC,YAAY,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,SAA2B,EAG7D;YAEa,OAAO;IA4Bf,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAgB7E;IAEK,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAuChF;CACD","sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\n\nconst DEFAULT_HUGGING_FACE_URL = \"https://huggingface.co\";\nconst QUANTIZATION_PATTERN =\n\t/(?:^|[-_.])((?:UD-)?(?:IQ\\d(?:_[A-Z0-9]+)+|Q\\d(?:_[A-Z0-9]+)+|BF16|F16|F32|MXFP\\d(?:_[A-Z0-9]+)*))$/iu;\nconst SHARD_SUFFIX_PATTERN = /-\\d{5}-of-\\d{5}$/u;\n\nexport interface HuggingFaceModel {\n\tid: string;\n\tdownloads: number;\n}\n\nexport interface HuggingFaceQuantization {\n\tname: string;\n\tsize?: number;\n}\n\nexport interface HuggingFaceModelDetails {\n\tid: string;\n\tgated: false | \"auto\" | \"manual\";\n\tquantizations: HuggingFaceQuantization[];\n}\n\nfunction payloadError(payload: unknown, fallback: string): string {\n\tif (typeof payload !== \"object\" || payload === null) return fallback;\n\tconst error = (payload as { error?: unknown }).error;\n\treturn typeof error === \"string\" && error ? error : fallback;\n}\n\nfunction parseRateLimitDelay(value: string | null): number | undefined {\n\tconst match = value?.match(/(?:^|;)t=(\\d+)/u);\n\treturn match ? Number(match[1]) : undefined;\n}\n\nasync function readToken(path: string): Promise<string | undefined> {\n\ttry {\n\t\tconst token = (await readFile(path, \"utf8\")).trim();\n\t\treturn token || undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport async function findHuggingFaceToken(env: NodeJS.ProcessEnv = process.env): Promise<string | undefined> {\n\tconst fromEnvironment = env.HF_TOKEN?.trim();\n\tif (fromEnvironment) return fromEnvironment;\n\n\tconst paths = [\n\t\tenv.HF_TOKEN_PATH,\n\t\tenv.HF_HOME ? join(env.HF_HOME, \"token\") : undefined,\n\t\tenv.XDG_CACHE_HOME ? join(env.XDG_CACHE_HOME, \"huggingface\", \"token\") : undefined,\n\t\tjoin(homedir(), \".cache\", \"huggingface\", \"token\"),\n\t].filter((path): path is string => Boolean(path));\n\tfor (const path of new Set(paths)) {\n\t\tconst token = await readToken(path);\n\t\tif (token) return token;\n\t}\n\treturn undefined;\n}\n\nexport class HuggingFaceClient {\n\tprivate readonly token: string | undefined;\n\tprivate readonly baseUrl: string;\n\n\tconstructor(token?: string, baseUrl = DEFAULT_HUGGING_FACE_URL) {\n\t\tthis.token = token;\n\t\tthis.baseUrl = baseUrl.replace(/\\/+$/u, \"\");\n\t}\n\n\tprivate async request(path: string, signal?: AbortSignal): Promise<unknown> {\n\t\tconst headers = new Headers();\n\t\tif (this.token) headers.set(\"Authorization\", `Bearer ${this.token}`);\n\t\tconst timeout = AbortSignal.timeout(15_000);\n\t\tconst response = await fetch(`${this.baseUrl}${path}`, {\n\t\t\theaders,\n\t\t\tsignal: signal ? AbortSignal.any([signal, timeout]) : timeout,\n\t\t});\n\t\tlet payload: unknown;\n\t\ttry {\n\t\t\tpayload = await response.json();\n\t\t} catch {\n\t\t\tpayload = undefined;\n\t\t}\n\t\tif (!response.ok) {\n\t\t\tconst fallback = `Hugging Face returned HTTP ${response.status}`;\n\t\t\tif (response.status === 429) {\n\t\t\t\tconst delay =\n\t\t\t\t\tNumber(response.headers.get(\"retry-after\")) || parseRateLimitDelay(response.headers.get(\"ratelimit\"));\n\t\t\t\tthrow new Error(\n\t\t\t\t\tdelay ? `Hugging Face rate limit reached; retry in ${delay}s` : \"Hugging Face rate limit reached\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(payloadError(payload, fallback));\n\t\t}\n\t\treturn payload;\n\t}\n\n\tasync search(query: string, signal?: AbortSignal): Promise<HuggingFaceModel[]> {\n\t\tconst params = new URLSearchParams({\n\t\t\tsearch: query,\n\t\t\tfilter: \"gguf\",\n\t\t\tsort: \"downloads\",\n\t\t\tdirection: \"-1\",\n\t\t\tlimit: \"20\",\n\t\t});\n\t\tconst payload = await this.request(`/api/models?${params}`, signal);\n\t\tif (!Array.isArray(payload)) throw new Error(\"Hugging Face returned invalid search results\");\n\t\treturn payload.flatMap((value) => {\n\t\t\tif (typeof value !== \"object\" || value === null || typeof (value as { id?: unknown }).id !== \"string\")\n\t\t\t\treturn [];\n\t\t\tconst model = value as { id: string; downloads?: unknown };\n\t\t\treturn [{ id: model.id, downloads: typeof model.downloads === \"number\" ? model.downloads : 0 }];\n\t\t});\n\t}\n\n\tasync details(id: string, signal?: AbortSignal): Promise<HuggingFaceModelDetails> {\n\t\tconst encodedId = id.split(\"/\").map(encodeURIComponent).join(\"/\");\n\t\tconst payload = await this.request(`/api/models/${encodedId}?blobs=true`, signal);\n\t\tif (typeof payload !== \"object\" || payload === null) {\n\t\t\tthrow new Error(\"Hugging Face returned invalid model details\");\n\t\t}\n\t\tconst model = payload as { id?: unknown; gated?: unknown; siblings?: unknown };\n\t\tconst sizes = new Map<string, { total: number; complete: boolean }>();\n\t\tif (Array.isArray(model.siblings)) {\n\t\t\tfor (const value of model.siblings) {\n\t\t\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\t\t\tconst file = value as { rfilename?: unknown; size?: unknown };\n\t\t\t\tif (typeof file.rfilename !== \"string\" || !file.rfilename.toLowerCase().endsWith(\".gguf\")) continue;\n\t\t\t\tconst filename = file.rfilename.split(\"/\").at(-1)!;\n\t\t\t\tif (filename.toLowerCase().startsWith(\"mmproj\")) continue;\n\t\t\t\tconst stem = filename.slice(0, -5).replace(SHARD_SUFFIX_PATTERN, \"\");\n\t\t\t\tconst quantization = stem.match(QUANTIZATION_PATTERN)?.[1]?.toUpperCase();\n\t\t\t\tif (!quantization) continue;\n\t\t\t\tconst current = sizes.get(quantization) ?? { total: 0, complete: true };\n\t\t\t\tif (typeof file.size === \"number\") current.total += file.size;\n\t\t\t\telse current.complete = false;\n\t\t\t\tsizes.set(quantization, current);\n\t\t\t}\n\t\t}\n\t\tconst quantizations = [...sizes]\n\t\t\t.map(([name, size]) => ({ name, size: size.complete ? size.total : undefined }))\n\t\t\t.sort((left, right) => {\n\t\t\t\tif (left.name === \"Q4_K_M\") return -1;\n\t\t\t\tif (right.name === \"Q4_K_M\") return 1;\n\t\t\t\treturn (\n\t\t\t\t\t(left.size ?? Number.MAX_SAFE_INTEGER) - (right.size ?? Number.MAX_SAFE_INTEGER) ||\n\t\t\t\t\tleft.name.localeCompare(right.name)\n\t\t\t\t);\n\t\t\t});\n\t\treturn {\n\t\t\tid: typeof model.id === \"string\" ? model.id : id,\n\t\t\tgated: model.gated === \"auto\" || model.gated === \"manual\" ? model.gated : false,\n\t\t\tquantizations,\n\t\t};\n\t}\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"huggingface.js","sourceRoot":"","sources":["../../../src/extensions/llama/huggingface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,wBAAwB,GAAG,wBAAwB,CAAC;AAC1D,MAAM,oBAAoB,GACzB,uGAAuG,CAAC;AACzG,MAAM,oBAAoB,GAAG,mBAAmB,CAAC;AAkBjD,SAAS,YAAY,CAAC,OAAgB,EAAE,QAAgB,EAAU;IACjE,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,QAAQ,CAAC;IACrE,MAAM,KAAK,GAAI,OAA+B,CAAC,KAAK,CAAC;IACrD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAAA,CAC7D;AAED,SAAS,mBAAmB,CAAC,KAAoB,EAAsB;IACtE,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IA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OAAO;YACN,EAAE,EAAE,OAAO,KAAK,CAAC,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;YAChD,KAAK,EAAE,KAAK,CAAC,KAAK,KAAK,MAAM,IAAI,KAAK,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;YAC/E,aAAa;SACb,CAAC;IAAA,CACF;CACD","sourcesContent":["import { readFile } from \"node:fs/promises\";\nimport { homedir } from \"node:os\";\nimport { join } from \"node:path\";\n\nconst DEFAULT_HUGGING_FACE_URL = \"https://huggingface.co\";\nconst QUANTIZATION_PATTERN =\n\t/(?:^|[-_.])((?:UD-)?(?:IQ\\d(?:_[A-Z0-9]+)+|Q\\d(?:_[A-Z0-9]+)+|BF16|F16|F32|MXFP\\d(?:_[A-Z0-9]+)*))$/iu;\nconst SHARD_SUFFIX_PATTERN = /-\\d{5}-of-\\d{5}$/u;\n\nexport interface HuggingFaceModel {\n\tid: string;\n\tdownloads: number;\n}\n\nexport interface HuggingFaceQuantization {\n\tname: string;\n\tsize?: number;\n}\n\nexport interface HuggingFaceModelDetails {\n\tid: string;\n\tgated: false | \"auto\" | \"manual\";\n\tquantizations: HuggingFaceQuantization[];\n}\n\nfunction payloadError(payload: unknown, fallback: string): string {\n\tif (typeof payload !== \"object\" || payload === null) return fallback;\n\tconst error = (payload as { error?: unknown }).error;\n\treturn typeof error === \"string\" && error ? error : fallback;\n}\n\nfunction parseRateLimitDelay(value: string | null): number | undefined {\n\tconst match = value?.match(/(?:^|;)t=(\\d+)/u);\n\treturn match ? Number(match[1]) : undefined;\n}\n\nasync function readToken(path: string): Promise<string | undefined> {\n\ttry {\n\t\tconst token = (await readFile(path, \"utf8\")).trim();\n\t\treturn token || undefined;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\nexport async function findHuggingFaceToken(env: NodeJS.ProcessEnv = process.env): Promise<string | undefined> {\n\tconst fromEnvironment = env.HF_TOKEN?.trim();\n\tif (fromEnvironment) return fromEnvironment;\n\n\tconst paths = [\n\t\tenv.HF_TOKEN_PATH,\n\t\tenv.HF_HOME ? join(env.HF_HOME, \"token\") : undefined,\n\t\tenv.XDG_CACHE_HOME ? join(env.XDG_CACHE_HOME, \"huggingface\", \"token\") : undefined,\n\t\tjoin(homedir(), \".cache\", \"huggingface\", \"token\"),\n\t].filter((path): path is string => Boolean(path));\n\tfor (const path of new Set(paths)) {\n\t\tconst token = await readToken(path);\n\t\tif (token) return token;\n\t}\n\treturn undefined;\n}\n\nexport class HuggingFaceClient {\n\tprivate readonly token: string | undefined;\n\tprivate readonly baseUrl: string;\n\n\tconstructor(token?: string, baseUrl = DEFAULT_HUGGING_FACE_URL) {\n\t\tthis.token = token;\n\t\tthis.baseUrl = baseUrl.replace(/\\/+$/u, \"\");\n\t}\n\n\tprivate async request(path: string, signal?: AbortSignal): Promise<unknown> {\n\t\tconst headers = new Headers();\n\t\tif (this.token) headers.set(\"Authorization\", `Bearer ${this.token}`);\n\t\tconst timeout = AbortSignal.timeout(15_000);\n\t\tconst response = await fetch(`${this.baseUrl}${path}`, {\n\t\t\theaders,\n\t\t\tsignal: signal ? AbortSignal.any([signal, timeout]) : timeout,\n\t\t});\n\t\tlet payload: unknown;\n\t\ttry {\n\t\t\tpayload = await response.json();\n\t\t} catch {\n\t\t\tpayload = undefined;\n\t\t}\n\t\tif (!response.ok) {\n\t\t\tconst fallback = `Hugging Face returned HTTP ${response.status}`;\n\t\t\tif (response.status === 429) {\n\t\t\t\tconst delay =\n\t\t\t\t\tNumber(response.headers.get(\"retry-after\")) || parseRateLimitDelay(response.headers.get(\"ratelimit\"));\n\t\t\t\tthrow new Error(\n\t\t\t\t\tdelay ? `Hugging Face rate limit reached; retry in ${delay}s` : \"Hugging Face rate limit reached\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tthrow new Error(payloadError(payload, fallback));\n\t\t}\n\t\treturn payload;\n\t}\n\n\tasync search(query: string, signal?: AbortSignal): Promise<HuggingFaceModel[]> {\n\t\tconst params = new URLSearchParams({\n\t\t\tsearch: query,\n\t\t\tfilter: \"gguf\",\n\t\t\tsort: \"downloads\",\n\t\t\tdirection: \"-1\",\n\t\t\tlimit: \"20\",\n\t\t});\n\t\tconst payload = await this.request(`/api/models?${params}`, signal);\n\t\tif (!Array.isArray(payload)) throw new Error(\"Hugging Face returned invalid search results\");\n\t\treturn payload.flatMap((value) => {\n\t\t\tif (typeof value !== \"object\" || value === null || typeof (value as { id?: unknown }).id !== \"string\")\n\t\t\t\treturn [];\n\t\t\tconst model = value as { id: string; downloads?: unknown };\n\t\t\treturn [{ id: model.id, downloads: typeof model.downloads === \"number\" ? model.downloads : 0 }];\n\t\t});\n\t}\n\n\tasync details(id: string, signal?: AbortSignal): Promise<HuggingFaceModelDetails> {\n\t\tconst encodedId = id.split(\"/\").map(encodeURIComponent).join(\"/\");\n\t\tconst payload = await this.request(`/api/models/${encodedId}?blobs=true`, signal);\n\t\tif (typeof payload !== \"object\" || payload === null) {\n\t\t\tthrow new Error(\"Hugging Face returned invalid model details\");\n\t\t}\n\t\tconst model = payload as { id?: unknown; gated?: unknown; siblings?: unknown };\n\t\tconst sizes = new Map<string, { total: number; complete: boolean }>();\n\t\tif (Array.isArray(model.siblings)) {\n\t\t\tfor (const value of model.siblings) {\n\t\t\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\t\t\tconst file = value as { rfilename?: unknown; size?: unknown };\n\t\t\t\tif (typeof file.rfilename !== \"string\" || !file.rfilename.toLowerCase().endsWith(\".gguf\")) continue;\n\t\t\t\tconst filename = file.rfilename.split(\"/\").at(-1)!;\n\t\t\t\tif (filename.toLowerCase().startsWith(\"mmproj\")) continue;\n\t\t\t\tconst stem = filename.slice(0, -5).replace(SHARD_SUFFIX_PATTERN, \"\");\n\t\t\t\tconst quantization = stem.match(QUANTIZATION_PATTERN)?.[1]?.toUpperCase();\n\t\t\t\tif (!quantization) continue;\n\t\t\t\tconst current = sizes.get(quantization) ?? { total: 0, complete: true };\n\t\t\t\tif (typeof file.size === \"number\") current.total += file.size;\n\t\t\t\telse current.complete = false;\n\t\t\t\tsizes.set(quantization, current);\n\t\t\t}\n\t\t}\n\t\tconst quantizations = [...sizes]\n\t\t\t.map(([name, size]) => ({ name, size: size.complete ? size.total : undefined }))\n\t\t\t.sort((left, right) => {\n\t\t\t\tif (left.name === \"Q4_K_M\") return -1;\n\t\t\t\tif (right.name === \"Q4_K_M\") return 1;\n\t\t\t\treturn (\n\t\t\t\t\t(left.size ?? Number.MAX_SAFE_INTEGER) - (right.size ?? Number.MAX_SAFE_INTEGER) ||\n\t\t\t\t\tleft.name.localeCompare(right.name)\n\t\t\t\t);\n\t\t\t});\n\t\treturn {\n\t\t\tid: typeof model.id === \"string\" ? model.id : id,\n\t\t\tgated: model.gated === \"auto\" || model.gated === \"manual\" ? model.gated : false,\n\t\t\tquantizations,\n\t\t};\n\t}\n}\n"]}
|