@oh-my-pi/pi-coding-agent 17.0.9 → 17.1.1
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 +78 -0
- package/README.md +1 -1
- package/dist/cli.js +4685 -4614
- package/dist/types/async/job-manager.d.ts +37 -1
- package/dist/types/cli/args.d.ts +2 -0
- package/dist/types/cli/bench-cli.d.ts +41 -0
- package/dist/types/commands/bench.d.ts +15 -3
- package/dist/types/commands/launch.d.ts +4 -0
- package/dist/types/config/model-registry.d.ts +3 -1
- package/dist/types/config/models-config-schema.d.ts +18 -6
- package/dist/types/config/models-config.d.ts +14 -5
- package/dist/types/config/provider-globals.d.ts +2 -2
- package/dist/types/config/service-tier.d.ts +5 -1
- package/dist/types/config/settings-schema.d.ts +374 -47
- package/dist/types/config/settings.d.ts +7 -0
- package/dist/types/dap/client.d.ts +20 -0
- package/dist/types/exec/bash-executor.d.ts +38 -0
- package/dist/types/exec/direnv.d.ts +33 -0
- package/dist/types/export/html/args.d.ts +15 -0
- package/dist/types/export/html/index.d.ts +11 -26
- package/dist/types/export/html/web-palette.d.ts +55 -116
- package/dist/types/extensibility/extensions/loader.d.ts +3 -0
- package/dist/types/extensibility/extensions/types.d.ts +17 -2
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +3 -0
- package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +13 -0
- package/dist/types/live/attestation.d.ts +2 -0
- package/dist/types/live/controller.d.ts +48 -0
- package/dist/types/live/protocol.d.ts +85 -0
- package/dist/types/live/protocol.test.d.ts +1 -0
- package/dist/types/live/transport.d.ts +35 -0
- package/dist/types/live/visualizer.d.ts +30 -0
- package/dist/types/lsp/client.d.ts +16 -1
- package/dist/types/mcp/config-writer.test.d.ts +1 -0
- package/dist/types/mcp/oauth-discovery.d.ts +2 -0
- package/dist/types/mcp/smithery-auth.d.ts +1 -1
- package/dist/types/mcp/smithery-auth.test.d.ts +1 -0
- package/dist/types/memory-backend/tool-names.d.ts +2 -0
- package/dist/types/modes/components/assistant-message.d.ts +1 -0
- package/dist/types/modes/components/custom-message.d.ts +1 -1
- package/dist/types/modes/components/login-dialog.d.ts +2 -2
- package/dist/types/modes/components/message-frame.d.ts +8 -4
- package/dist/types/modes/components/plan-review-overlay.d.ts +26 -0
- package/dist/types/modes/components/session-account-selector.d.ts +11 -0
- package/dist/types/modes/components/settings-defs.d.ts +7 -1
- package/dist/types/modes/components/status-line/component.jj-cache.test.d.ts +1 -0
- package/dist/types/modes/components/tool-execution.d.ts +9 -1
- package/dist/types/modes/controllers/command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/event-controller.d.ts +6 -1
- package/dist/types/modes/controllers/live-command-controller.d.ts +14 -0
- package/dist/types/modes/controllers/selector-controller.d.ts +1 -0
- package/dist/types/modes/interactive-mode.d.ts +6 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/types.d.ts +4 -1
- package/dist/types/modes/utils/context-usage.d.ts +12 -2
- package/dist/types/plan-mode/plan-files.d.ts +10 -0
- package/dist/types/registry/agent-lifecycle.d.ts +21 -9
- package/dist/types/registry/agent-registry.d.ts +11 -4
- package/dist/types/sdk.d.ts +15 -1
- package/dist/types/secrets/index.d.ts +15 -2
- package/dist/types/secrets/obfuscator.d.ts +113 -15
- package/dist/types/session/acp-permission-gate.d.ts +19 -0
- package/dist/types/session/agent-session-events.d.ts +84 -0
- package/dist/types/session/agent-session-types.d.ts +321 -0
- package/dist/types/session/agent-session.d.ts +135 -753
- package/dist/types/session/async-job-delivery.d.ts +28 -0
- package/dist/types/session/auth-storage.d.ts +1 -1
- package/dist/types/session/bash-runner.d.ts +75 -0
- package/dist/types/session/blob-store.d.ts +11 -1
- package/dist/types/session/blob-store.test.d.ts +1 -0
- package/dist/types/session/checkpoint-entries.d.ts +28 -0
- package/dist/types/session/eval-runner.d.ts +51 -0
- package/dist/types/session/irc-bridge.d.ts +46 -0
- package/dist/types/session/messages.d.ts +24 -0
- package/dist/types/session/model-controls.d.ts +180 -0
- package/dist/types/session/prewalk.d.ts +46 -0
- package/dist/types/session/queued-messages.d.ts +22 -0
- package/dist/types/session/redis-session-storage.d.ts +1 -0
- package/dist/types/session/retry-fallback-chains.d.ts +74 -0
- package/dist/types/session/role-models.d.ts +15 -0
- package/dist/types/session/session-advisors.d.ts +228 -0
- package/dist/types/session/session-entries.d.ts +8 -0
- package/dist/types/session/session-handoff.d.ts +70 -0
- package/dist/types/session/session-history-format.d.ts +6 -1
- package/dist/types/session/session-maintenance.d.ts +246 -0
- package/dist/types/session/session-manager.d.ts +41 -0
- package/dist/types/session/session-memory.d.ts +56 -0
- package/dist/types/session/session-provider-boundary.d.ts +62 -0
- package/dist/types/session/session-stats.d.ts +48 -0
- package/dist/types/session/session-tools.d.ts +158 -0
- package/dist/types/session/session-workspace.d.ts +32 -0
- package/dist/types/session/stream-guards.d.ts +44 -0
- package/dist/types/session/streaming-output.d.ts +8 -0
- package/dist/types/session/todo-tracker.d.ts +56 -0
- package/dist/types/session/ttsr-coordinator.d.ts +51 -0
- package/dist/types/session/turn-recovery.d.ts +225 -0
- package/dist/types/slash-commands/helpers/session-pin.d.ts +9 -0
- package/dist/types/stt/index.d.ts +0 -2
- package/dist/types/stt/stt-controller.d.ts +7 -0
- package/dist/types/system-prompt.d.ts +2 -0
- package/dist/types/task/executor.d.ts +4 -1
- package/dist/types/task/output-manager.d.ts +3 -1
- package/dist/types/tiny/title-client.d.ts +10 -0
- package/dist/types/tools/approval.d.ts +1 -0
- package/dist/types/tools/browser/launch.d.ts +5 -0
- package/dist/types/tools/builtin-names.d.ts +1 -1
- package/dist/types/tools/computer/protocol.d.ts +43 -0
- package/dist/types/tools/computer/supervisor.d.ts +32 -0
- package/dist/types/tools/computer/worker-entry.d.ts +1 -0
- package/dist/types/tools/computer/worker.d.ts +15 -0
- package/dist/types/tools/computer-renderer.d.ts +22 -0
- package/dist/types/tools/computer.d.ts +71 -0
- package/dist/types/tools/context.d.ts +2 -0
- package/dist/types/tools/default-renderer.d.ts +21 -0
- package/dist/types/tools/image-gen.d.ts +4 -4
- package/dist/types/tools/image-providers.d.ts +38 -0
- package/dist/types/tools/index.d.ts +7 -0
- package/dist/types/tools/path-utils.d.ts +8 -0
- package/dist/types/tools/todo.d.ts +10 -4
- package/dist/types/tools/xdev.d.ts +5 -1
- package/dist/types/tts/streaming-player.d.ts +10 -29
- package/dist/types/tts/vocalizer.d.ts +5 -0
- package/dist/types/utils/jj.d.ts +29 -0
- package/dist/types/utils/lang-from-path.d.ts +1 -0
- package/dist/types/utils/title-generator.d.ts +30 -0
- package/dist/types/utils/tools-manager.d.ts +1 -2
- package/dist/types/vibe/runtime.d.ts +36 -8
- package/dist/types/web/search/index.d.ts +1 -1
- package/dist/types/web/search/provider.d.ts +15 -5
- package/dist/types/web/search/types.d.ts +94 -0
- package/package.json +12 -12
- package/scripts/generate-share-viewer.ts +4 -6
- package/src/advisor/__tests__/advisor.test.ts +643 -0
- package/src/advisor/runtime.ts +144 -43
- package/src/async/job-manager.ts +90 -2
- package/src/cli/args.ts +3 -0
- package/src/cli/auth-gateway-cli.ts +18 -3
- package/src/cli/bench-cli.ts +395 -29
- package/src/cli/flag-tables.ts +3 -0
- package/src/cli/gc-cli.ts +2 -2
- package/src/cli/setup-cli.ts +2 -14
- package/src/cli/usage-cli.ts +10 -1
- package/src/cli.ts +8 -0
- package/src/collab/host.ts +3 -2
- package/src/commands/bench.ts +18 -4
- package/src/commands/launch.ts +4 -0
- package/src/config/model-registry.ts +16 -2
- package/src/config/models-config-schema.ts +15 -4
- package/src/config/provider-globals.ts +9 -9
- package/src/config/service-tier.ts +26 -1
- package/src/config/settings-schema.ts +270 -51
- package/src/config/settings.ts +81 -2
- package/src/dap/client.ts +37 -4
- package/src/edit/index.ts +49 -12
- package/src/eval/executor-base.ts +1 -0
- package/src/eval/js/executor.ts +2 -0
- package/src/eval/py/executor.ts +103 -33
- package/src/exec/bash-executor.ts +90 -6
- package/src/exec/direnv.ts +145 -0
- package/src/export/html/args.ts +20 -0
- package/src/export/html/index.ts +45 -47
- package/src/export/html/template.css +19 -1
- package/src/export/html/template.html +6 -0
- package/src/export/html/template.js +21 -0
- package/src/export/html/tool-views.generated.js +31 -31
- package/src/export/html/web-palette.ts +116 -132
- package/src/export/share.ts +249 -49
- package/src/extensibility/extensions/loader.ts +29 -1
- package/src/extensibility/extensions/runner.ts +6 -0
- package/src/extensibility/extensions/types.ts +33 -2
- package/src/extensibility/extensions/wrapper.ts +68 -12
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +7 -1
- package/src/extensibility/plugins/legacy-pi-compat.ts +19 -1
- package/src/hindsight/state.ts +64 -6
- package/src/internal-urls/local-protocol.ts +2 -1
- package/src/internal-urls/memory-protocol.ts +2 -2
- package/src/internal-urls/skill-protocol.ts +2 -2
- package/src/internal-urls/ssh-protocol.ts +2 -1
- package/src/internal-urls/vault-protocol.ts +2 -1
- package/src/live/attestation.ts +91 -0
- package/src/live/controller.ts +517 -0
- package/src/live/prompts/agent-final-message.md +3 -0
- package/src/live/prompts/live-instructions.md +23 -0
- package/src/live/protocol.test.ts +140 -0
- package/src/live/protocol.ts +233 -0
- package/src/live/transport.ts +422 -0
- package/src/live/visualizer.ts +214 -0
- package/src/lsp/client.ts +29 -9
- package/src/lsp/index.ts +19 -4
- package/src/main.ts +8 -1
- package/src/mcp/config-writer.test.ts +43 -0
- package/src/mcp/config-writer.ts +109 -82
- package/src/mcp/oauth-discovery.ts +10 -2
- package/src/mcp/smithery-auth.test.ts +29 -0
- package/src/mcp/smithery-auth.ts +3 -2
- package/src/memories/index.ts +40 -20
- package/src/memory-backend/tool-names.ts +2 -0
- package/src/mnemopi/backend.ts +24 -7
- package/src/modes/acp/acp-agent.ts +56 -10
- package/src/modes/acp/acp-event-mapper.ts +8 -1
- package/src/modes/components/agent-hub.ts +1 -1
- package/src/modes/components/assistant-message.ts +7 -2
- package/src/modes/components/custom-message.ts +4 -1
- package/src/modes/components/login-dialog.ts +14 -4
- package/src/modes/components/message-frame.ts +14 -8
- package/src/modes/components/plan-review-overlay.ts +350 -35
- package/src/modes/components/session-account-selector.ts +62 -0
- package/src/modes/components/settings-defs.ts +23 -1
- package/src/modes/components/settings-selector.ts +169 -1
- package/src/modes/components/status-line/component.jj-cache.test.ts +229 -0
- package/src/modes/components/status-line/component.ts +123 -2
- package/src/modes/components/tool-execution.ts +28 -112
- package/src/modes/controllers/command-controller.ts +56 -15
- package/src/modes/controllers/event-controller.ts +111 -16
- package/src/modes/controllers/extension-ui-controller.test.ts +1 -0
- package/src/modes/controllers/extension-ui-controller.ts +20 -4
- package/src/modes/controllers/input-controller.ts +47 -39
- package/src/modes/controllers/live-command-controller.ts +255 -0
- package/src/modes/controllers/mcp-command-controller.ts +10 -1
- package/src/modes/controllers/omfg-controller.ts +44 -40
- package/src/modes/controllers/selector-controller.ts +80 -10
- package/src/modes/controllers/session-focus-controller.ts +6 -1
- package/src/modes/interactive-mode.ts +176 -38
- package/src/modes/runtime-init.ts +2 -0
- package/src/modes/setup-wizard/scenes/web-search.ts +17 -9
- package/src/modes/theme/theme.ts +1 -1
- package/src/modes/types.ts +4 -1
- package/src/modes/utils/context-usage.ts +23 -7
- package/src/modes/utils/ui-helpers.ts +10 -5
- package/src/plan-mode/plan-files.ts +40 -0
- package/src/prompts/bench/cache-prefix-chunk.md +1 -0
- package/src/prompts/bench/cache-prefix.md +3 -0
- package/src/prompts/bench/cache-suffix.md +1 -0
- package/src/prompts/system/computer-safety.md +14 -0
- package/src/prompts/system/custom-system-prompt.md +1 -1
- package/src/prompts/system/project-prompt.md +8 -1
- package/src/prompts/system/subagent-async-pending.md +6 -0
- package/src/prompts/system/system-prompt.md +1 -1
- package/src/prompts/system/workflow-notice.md +48 -40
- package/src/prompts/system/xdev-mount-notice.md +4 -0
- package/src/prompts/tools/computer.md +26 -0
- package/src/prompts/tools/todo.md +3 -1
- package/src/registry/agent-lifecycle.ts +116 -46
- package/src/registry/agent-registry.ts +35 -8
- package/src/registry/persisted-agents.ts +26 -2
- package/src/sdk.ts +215 -136
- package/src/secrets/index.ts +127 -4
- package/src/secrets/obfuscator.ts +2328 -105
- package/src/session/acp-permission-gate.ts +165 -0
- package/src/session/agent-session-error-log.test.ts +1 -1
- package/src/session/agent-session-events.ts +66 -0
- package/src/session/agent-session-types.ts +343 -0
- package/src/session/agent-session.ts +1940 -12218
- package/src/session/artifacts.ts +6 -5
- package/src/session/async-job-delivery.ts +74 -0
- package/src/session/auth-storage.ts +1 -0
- package/src/session/bash-runner.ts +326 -0
- package/src/session/blob-store.test.ts +56 -0
- package/src/session/blob-store.ts +18 -2
- package/src/session/checkpoint-entries.ts +81 -0
- package/src/session/eval-runner.ts +217 -0
- package/src/session/indexed-session-storage.ts +9 -2
- package/src/session/irc-bridge.ts +203 -0
- package/src/session/messages.ts +266 -1
- package/src/session/model-controls.ts +714 -0
- package/src/session/prewalk.ts +252 -0
- package/src/session/queued-messages.ts +93 -0
- package/src/session/redis-session-storage.ts +51 -11
- package/src/session/retry-fallback-chains.ts +455 -0
- package/src/session/role-models.ts +85 -0
- package/src/session/session-advisors.ts +1679 -0
- package/src/session/session-context.ts +6 -3
- package/src/session/session-entries.ts +8 -0
- package/src/session/session-handoff.ts +308 -0
- package/src/session/session-history-format.ts +20 -9
- package/src/session/session-loader.ts +0 -46
- package/src/session/session-maintenance.ts +2983 -0
- package/src/session/session-manager.ts +390 -30
- package/src/session/session-memory.ts +222 -0
- package/src/session/session-provider-boundary.ts +307 -0
- package/src/session/session-stats.ts +293 -0
- package/src/session/session-tools.ts +980 -0
- package/src/session/session-workspace.ts +53 -0
- package/src/session/stream-guards.ts +417 -0
- package/src/session/streaming-output.ts +52 -5
- package/src/session/todo-tracker.ts +380 -0
- package/src/session/ttsr-coordinator.ts +496 -0
- package/src/session/turn-recovery.ts +1629 -0
- package/src/slash-commands/builtin-registry.ts +257 -20
- package/src/slash-commands/helpers/session-pin.ts +44 -0
- package/src/slash-commands/helpers/usage-report.ts +22 -3
- package/src/stt/downloader.ts +0 -2
- package/src/stt/index.ts +0 -2
- package/src/stt/stt-controller.ts +57 -146
- package/src/system-prompt.ts +45 -17
- package/src/task/executor.ts +285 -70
- package/src/task/index.ts +98 -105
- package/src/task/output-manager.ts +25 -3
- package/src/task/persisted-revive.ts +4 -3
- package/src/task/structured-subagent.ts +1 -0
- package/src/tiny/title-client.ts +22 -0
- package/src/tools/approval.ts +55 -10
- package/src/tools/bash-interactive.ts +116 -86
- package/src/tools/bash-skill-urls.ts +28 -2
- package/src/tools/bash.ts +339 -123
- package/src/tools/browser/launch.ts +9 -1
- package/src/tools/browser/tab-supervisor.ts +8 -5
- package/src/tools/browser.ts +94 -47
- package/src/tools/builtin-names.ts +1 -0
- package/src/tools/computer/protocol.ts +28 -0
- package/src/tools/computer/supervisor.ts +258 -0
- package/src/tools/computer/worker-entry.ts +25 -0
- package/src/tools/computer/worker.ts +135 -0
- package/src/tools/computer-renderer.ts +108 -0
- package/src/tools/computer.ts +433 -0
- package/src/tools/context.ts +2 -0
- package/src/tools/default-renderer.ts +139 -0
- package/src/tools/essential-tools.ts +1 -0
- package/src/tools/image-gen.ts +20 -28
- package/src/tools/image-providers.ts +50 -0
- package/src/tools/index.ts +14 -0
- package/src/tools/path-utils.ts +49 -2
- package/src/tools/read.ts +156 -88
- package/src/tools/renderers.ts +9 -1
- package/src/tools/todo.ts +101 -11
- package/src/tools/vibe.ts +1 -2
- package/src/tools/write.ts +51 -1
- package/src/tools/xdev.ts +121 -29
- package/src/tts/streaming-player.ts +82 -283
- package/src/tts/vocalizer.ts +18 -1
- package/src/utils/clipboard.ts +1 -30
- package/src/utils/jj.ts +125 -4
- package/src/utils/lang-from-path.ts +7 -0
- package/src/utils/mac-file-urls.applescript +37 -0
- package/src/utils/title-generator.ts +137 -1
- package/src/utils/tool-choice.ts +14 -0
- package/src/utils/tools-manager.ts +1 -19
- package/src/vibe/runtime.ts +852 -72
- package/src/web/search/index.ts +3 -6
- package/src/web/search/provider.ts +31 -16
- package/src/web/search/providers/xai.ts +7 -1
- package/src/web/search/types.ts +3 -0
- package/dist/types/stt/recorder.d.ts +0 -30
- package/dist/types/stt/transcriber.d.ts +0 -14
- package/dist/types/stt/wav.d.ts +0 -29
- package/dist/types/tts/player.d.ts +0 -32
- package/src/stt/recorder.ts +0 -551
- package/src/stt/transcriber.ts +0 -60
- package/src/stt/wav.ts +0 -173
- package/src/tts/player.ts +0 -137
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Generation Providers
|
|
3
|
+
*
|
|
4
|
+
* Leaf module (no runtime deps) shared by the image_gen tool, the settings
|
|
5
|
+
* schema, and settings migrations — mirrors `web/search/types.ts` so the
|
|
6
|
+
* provider list, auto order, and settings choices never drift apart.
|
|
7
|
+
*/
|
|
8
|
+
/** Image generation backends, in settings/tool vocabulary. */
|
|
9
|
+
export type ImageProvider = "antigravity" | "gemini" | "openai" | "openai-codex" | "openrouter" | "xai";
|
|
10
|
+
/** Auto-resolution fallback order when no configured entry or session provider matches. */
|
|
11
|
+
export declare const AUTO_IMAGE_PROVIDER_ORDER: readonly ImageProvider[];
|
|
12
|
+
/** Settings choices for `providers.imageOrder` (labels shared with the retired single-preference enum). */
|
|
13
|
+
export declare const IMAGE_PROVIDER_CHOICES: readonly [{
|
|
14
|
+
readonly value: "openai";
|
|
15
|
+
readonly label: "OpenAI";
|
|
16
|
+
readonly description: "OPENAI_API_KEY (gpt-image-2) or active GPT model; falls back to a connected Codex subscription";
|
|
17
|
+
}, {
|
|
18
|
+
readonly value: "openai-codex";
|
|
19
|
+
readonly label: "OpenAI Codex (ChatGPT)";
|
|
20
|
+
readonly description: "Uses a connected Codex / ChatGPT subscription — no OPENAI_API_KEY needed";
|
|
21
|
+
}, {
|
|
22
|
+
readonly value: "antigravity";
|
|
23
|
+
readonly label: "Antigravity";
|
|
24
|
+
readonly description: "Requires google-antigravity OAuth";
|
|
25
|
+
}, {
|
|
26
|
+
readonly value: "xai";
|
|
27
|
+
readonly label: "xAI Grok Imagine";
|
|
28
|
+
readonly description: "Requires xAI Grok OAuth or XAI_API_KEY";
|
|
29
|
+
}, {
|
|
30
|
+
readonly value: "gemini";
|
|
31
|
+
readonly label: "Gemini";
|
|
32
|
+
readonly description: "Requires GEMINI_API_KEY";
|
|
33
|
+
}, {
|
|
34
|
+
readonly value: "openrouter";
|
|
35
|
+
readonly label: "OpenRouter";
|
|
36
|
+
readonly description: "Requires OPENROUTER_API_KEY";
|
|
37
|
+
}];
|
|
38
|
+
export declare function isImageProviderId(value: unknown): value is ImageProvider;
|
|
@@ -19,6 +19,7 @@ import type { ArtifactManager } from "../session/artifacts.js";
|
|
|
19
19
|
import type { ClientBridge } from "../session/client-bridge.js";
|
|
20
20
|
import type { CustomMessage } from "../session/messages.js";
|
|
21
21
|
import type { UsageStatistics } from "../session/session-entries.js";
|
|
22
|
+
import type { SessionManager } from "../session/session-manager.js";
|
|
22
23
|
import type { ToolChoiceQueue } from "../session/tool-choice-queue.js";
|
|
23
24
|
import type { AgentOutputManager } from "../task/output-manager.js";
|
|
24
25
|
import { type StructuredSubagentSchemaMode } from "../task/types.js";
|
|
@@ -41,6 +42,8 @@ export * from "./ast-grep.js";
|
|
|
41
42
|
export * from "./bash.js";
|
|
42
43
|
export * from "./browser.js";
|
|
43
44
|
export * from "./checkpoint.js";
|
|
45
|
+
export * from "./computer.js";
|
|
46
|
+
export * from "./computer/supervisor.js";
|
|
44
47
|
export * from "./debug.js";
|
|
45
48
|
export * from "./essential-tools.js";
|
|
46
49
|
export * from "./eval.js";
|
|
@@ -106,6 +109,8 @@ export interface DeferredDiagnosticsEntry {
|
|
|
106
109
|
export interface ToolSession {
|
|
107
110
|
/** Current working directory */
|
|
108
111
|
cwd: string;
|
|
112
|
+
/** Additional workspace directories beyond cwd (multi-root), forwarded to subagents. */
|
|
113
|
+
additionalDirectories?: string[];
|
|
109
114
|
/** Whether UI is available */
|
|
110
115
|
hasUI: boolean;
|
|
111
116
|
/**
|
|
@@ -177,6 +182,8 @@ export interface ToolSession {
|
|
|
177
182
|
getEvalSessionId?: () => string | null;
|
|
178
183
|
/** Get session file */
|
|
179
184
|
getSessionFile: () => string | null;
|
|
185
|
+
/** Parent session journal used by tools that persist runtime lifecycle state. */
|
|
186
|
+
sessionManager?: Pick<SessionManager, "appendCustomEntry" | "ensureOnDisk" | "flush" | "getBranch" | "getEntries">;
|
|
180
187
|
/** Get eval kernel owner ID for session-scoped retained-kernel cleanup. */
|
|
181
188
|
getEvalKernelOwnerId?: () => string | null;
|
|
182
189
|
/** Reject new eval work once session disposal has started. */
|
|
@@ -236,6 +236,14 @@ export declare function partitionExistingPaths(items: string[], cwd: string, spl
|
|
|
236
236
|
basePath: string;
|
|
237
237
|
}): Promise<PartitionedPaths>;
|
|
238
238
|
export declare function resolveReadPath(filePath: string, cwd: string): string;
|
|
239
|
+
/**
|
|
240
|
+
* Find a unique workspace entry whose trailing path matches a missing authored path.
|
|
241
|
+
* Returns `null` for no match, ambiguity, timeout, or scan failure.
|
|
242
|
+
*/
|
|
243
|
+
export declare function findUniqueWorkspaceSuffix(rawPath: string, cwd: string, signal?: AbortSignal): Promise<{
|
|
244
|
+
absolutePath: string;
|
|
245
|
+
displayPath: string;
|
|
246
|
+
} | null>;
|
|
239
247
|
/** Local file materialized from a readable external URL for shared tool-scope resolution. */
|
|
240
248
|
export interface ResolvedExternalSearchUrl {
|
|
241
249
|
/** Absolute or cwd-relative file path to search. */
|
|
@@ -5,17 +5,21 @@ import type { RenderResultOptions } from "../extensibility/custom-tools/types.js
|
|
|
5
5
|
import type { Theme } from "../modes/theme/theme.js";
|
|
6
6
|
import type { ToolSession } from "../sdk.js";
|
|
7
7
|
import type { SessionEntry } from "../session/session-entries.js";
|
|
8
|
-
export type TodoStatus = "pending" | "in_progress" | "completed" | "abandoned";
|
|
8
|
+
export type TodoStatus = "pending" | "in_progress" | "completed" | "abandoned" | "blocked";
|
|
9
9
|
/** Operation names accepted by the todo tool and echoed in successful result details. */
|
|
10
|
-
export type TodoOperation = "init" | "start" | "done" | "rm" | "drop" | "append" | "view";
|
|
10
|
+
export type TodoOperation = "init" | "start" | "done" | "rm" | "drop" | "block" | "unblock" | "append" | "view";
|
|
11
11
|
export interface TodoItem {
|
|
12
12
|
content: string;
|
|
13
13
|
status: TodoStatus;
|
|
14
|
+
/** When `status === "blocked"`, an optional note on what the task is waiting for. */
|
|
15
|
+
blocker?: string;
|
|
14
16
|
}
|
|
15
17
|
export interface TodoPhase {
|
|
16
18
|
name: string;
|
|
17
19
|
tasks: TodoItem[];
|
|
18
20
|
}
|
|
21
|
+
/** Whether an unknown value is a persisted todo phase. */
|
|
22
|
+
export declare function isTodoPhase(value: unknown): value is TodoPhase;
|
|
19
23
|
export interface TodoCompletionTransition {
|
|
20
24
|
phase: string;
|
|
21
25
|
content: string;
|
|
@@ -28,7 +32,7 @@ export interface TodoToolDetails {
|
|
|
28
32
|
completedTasks?: TodoCompletionTransition[];
|
|
29
33
|
}
|
|
30
34
|
declare const todoSchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
31
|
-
op: "append" | "done" | "drop" | "init" | "rm" | "start" | "view";
|
|
35
|
+
op: "append" | "block" | "done" | "drop" | "init" | "rm" | "start" | "unblock" | "view";
|
|
32
36
|
list?: {
|
|
33
37
|
phase: string;
|
|
34
38
|
items: string[];
|
|
@@ -36,6 +40,7 @@ declare const todoSchema: import("arktype/internal/variants/object.ts").ObjectTy
|
|
|
36
40
|
task?: string | undefined;
|
|
37
41
|
phase?: string | undefined;
|
|
38
42
|
items?: string[] | undefined;
|
|
43
|
+
reason?: string | undefined;
|
|
39
44
|
}, {}>;
|
|
40
45
|
type TodoParams = TodoSchema;
|
|
41
46
|
type TodoSchema = typeof todoSchema.infer;
|
|
@@ -107,7 +112,7 @@ export declare class TodoTool implements AgentTool<typeof todoSchema, TodoToolDe
|
|
|
107
112
|
readonly summary = "Write a structured todo list to track progress within a session";
|
|
108
113
|
readonly description: string;
|
|
109
114
|
readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
110
|
-
op: "append" | "done" | "drop" | "init" | "rm" | "start" | "view";
|
|
115
|
+
op: "append" | "block" | "done" | "drop" | "init" | "rm" | "start" | "unblock" | "view";
|
|
111
116
|
list?: {
|
|
112
117
|
phase: string;
|
|
113
118
|
items: string[];
|
|
@@ -115,6 +120,7 @@ export declare class TodoTool implements AgentTool<typeof todoSchema, TodoToolDe
|
|
|
115
120
|
task?: string | undefined;
|
|
116
121
|
phase?: string | undefined;
|
|
117
122
|
items?: string[] | undefined;
|
|
123
|
+
reason?: string | undefined;
|
|
118
124
|
}, {}>;
|
|
119
125
|
readonly concurrency = "exclusive";
|
|
120
126
|
readonly strict = true;
|
|
@@ -47,6 +47,8 @@ export declare const XDEV_KEEP_TOP_LEVEL: Record<string, true>;
|
|
|
47
47
|
* declared `loadMode`.
|
|
48
48
|
*/
|
|
49
49
|
export declare const XDEV_TRANSPORT_TOOLS: Record<string, true>;
|
|
50
|
+
/** Controls which mounted-device docs are inlined into the system prompt. */
|
|
51
|
+
export type XdevDocsMode = "inline" | "builtins" | "catalog";
|
|
50
52
|
/**
|
|
51
53
|
* Whether an enabled tool is presented under `xd://` (rather than top-level)
|
|
52
54
|
* while the `xd://` transport is active. Discoverable tools mount unless they
|
|
@@ -120,7 +122,9 @@ export declare class XdevRegistry {
|
|
|
120
122
|
* Dynamic mounts embed at most {@link EXTERNAL_DESCRIPTION_CAP} description
|
|
121
123
|
* chars (schema always intact); `read xd://<tool>` returns the full text.
|
|
122
124
|
*/
|
|
123
|
-
docsAll(): string;
|
|
125
|
+
docsAll(mode?: XdevDocsMode, inlinePatterns?: readonly string[]): string;
|
|
126
|
+
/** Docs for selected mounted devices under the configured prompt-doc policy. */
|
|
127
|
+
docsFor(names: Iterable<string>, mode: XdevDocsMode, inlinePatterns?: readonly string[]): string;
|
|
124
128
|
/**
|
|
125
129
|
* Execute a device write: `content` is the JSON args object (empty, `?`, or
|
|
126
130
|
* `help` returns docs). Args validate against the wrapped tool's schema —
|
|
@@ -1,40 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
/** Output gain applied while ducked (the user is speaking over the assistant). */
|
|
1
|
+
/** Output gain applied while the user speaks over assistant audio. */
|
|
3
2
|
export declare const DUCK_GAIN = 0.25;
|
|
4
|
-
/** Injection seam for {@link streamingPlayerCommandsFor} — defaults to real PATH/tools lookups. */
|
|
5
|
-
export interface StreamingPlayerLookup {
|
|
6
|
-
which?: (bin: string) => string | null;
|
|
7
|
-
ffmpeg?: () => string | null;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Ordered candidate commands for a persistent raw-PCM player on `platform`: each
|
|
11
|
-
* reads 32-bit-float little-endian mono PCM at `sampleRate` from stdin (`pipe:0`)
|
|
12
|
-
* and plays it to the default output device. An empty list means no streaming
|
|
13
|
-
* backend is available and the caller should fall back to per-file playback.
|
|
14
|
-
*
|
|
15
|
-
* - darwin: `ffmpeg` (AudioToolbox output device) → sox's `play` (coreaudio).
|
|
16
|
-
* - linux/other POSIX: `ffmpeg` (`-f pulse` then `-f alsa`) → `paplay`/`aplay`
|
|
17
|
-
* raw fallbacks.
|
|
18
|
-
* - win32: none (PowerShell `SoundPlayer` is file-only).
|
|
19
|
-
*/
|
|
20
|
-
export declare function streamingPlayerCommandsFor(platform: NodeJS.Platform, sampleRate: number, lookup?: StreamingPlayerLookup): PlayerCommand[];
|
|
21
3
|
/**
|
|
22
|
-
*
|
|
23
|
-
* chunks
|
|
24
|
-
* reusable after stop/end — create a new instance per utterance.
|
|
4
|
+
* One native gapless playback session. Call {@link start}, enqueue mono `f32`
|
|
5
|
+
* chunks with {@link write}, then {@link end} to drain or {@link stop} to abort.
|
|
25
6
|
*/
|
|
26
7
|
export declare class StreamingAudioPlayer {
|
|
27
8
|
#private;
|
|
28
|
-
/**
|
|
29
|
-
start(sampleRate
|
|
30
|
-
/**
|
|
9
|
+
/** Opens the default speaker at the stream's logical sample rate. */
|
|
10
|
+
start(sampleRate?: number): void;
|
|
11
|
+
/** Queues one mono `f32` PCM chunk without copying it in TypeScript. */
|
|
31
12
|
write(pcm: Float32Array): void;
|
|
32
|
-
/**
|
|
13
|
+
/** Applies gain at render time, including to samples already queued natively. */
|
|
33
14
|
setGain(gain: number): void;
|
|
34
|
-
/**
|
|
15
|
+
/** Closes input and resolves after every queued sample reaches the speaker. */
|
|
35
16
|
end(): Promise<void>;
|
|
36
|
-
/**
|
|
17
|
+
/** Stops immediately and discards queued audio. Safe to call repeatedly. */
|
|
37
18
|
stop(): void;
|
|
38
19
|
}
|
|
39
|
-
/**
|
|
20
|
+
/** Creates the single-use player used by the speech vocalizer. */
|
|
40
21
|
export declare function createStreamingPlayer(): StreamingAudioPlayer;
|
|
@@ -11,6 +11,11 @@ export declare class Vocalizer {
|
|
|
11
11
|
constructor(createPlayer?: () => VocalizerPlayer);
|
|
12
12
|
/** Wire (or drop) the per-session enhanced-rewrite service. */
|
|
13
13
|
setEnhancer(enhancer: SpeechEnhancer | null): void;
|
|
14
|
+
/**
|
|
15
|
+
* Suppress new vocalization until the returned idempotent release function runs.
|
|
16
|
+
* Existing synthesis and playback stop immediately; nested scopes release independently.
|
|
17
|
+
*/
|
|
18
|
+
suspend(): () => void;
|
|
14
19
|
/**
|
|
15
20
|
* Stream a delta of assistant text into the pipeline. No-op when
|
|
16
21
|
* vocalization is disabled. The synthesis session (worker, player) is only
|
package/dist/types/utils/jj.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as git from "./git.js";
|
|
1
2
|
/** Result from a completed `jj` subprocess invocation. */
|
|
2
3
|
export interface JjCommandResult {
|
|
3
4
|
/** Process exit code reported by `jj`. */
|
|
@@ -32,14 +33,41 @@ export declare class JjCommandError extends Error {
|
|
|
32
33
|
/** Create an error for a failed checked `jj` command. */
|
|
33
34
|
constructor(args: readonly string[], result: JjCommandResult);
|
|
34
35
|
}
|
|
36
|
+
declare function parseWorkingCopyLabel(raw: string): string | null;
|
|
37
|
+
declare function parseStatusSummary(raw: string): git.GitStatusSummary;
|
|
35
38
|
/** Run `jj diff --git` for the current workspace commit and return the raw Git-format diff text. */
|
|
36
39
|
export declare const diff: ((cwd: string, options?: DiffOptions) => Promise<string>) & {
|
|
37
40
|
/** List changed file paths. */
|
|
38
41
|
changedFiles(cwd: string, options?: Pick<DiffOptions, "files" | "signal">): Promise<string[]>;
|
|
39
42
|
};
|
|
43
|
+
/** Jujutsu working-copy metadata used by status displays. */
|
|
44
|
+
export declare const workingCopy: {
|
|
45
|
+
/**
|
|
46
|
+
* Label `@` with its nearest bookmark, falling back to its short change ID.
|
|
47
|
+
* Returns `null` when `jj` is unavailable or the query fails.
|
|
48
|
+
*/
|
|
49
|
+
label(cwd: string, signal?: AbortSignal): Promise<string | null>;
|
|
50
|
+
/** Parse working-copy label query output. */
|
|
51
|
+
parseLabel: typeof parseWorkingCopyLabel;
|
|
52
|
+
};
|
|
53
|
+
/** Jujutsu working-copy status derived from the changes in `@`. */
|
|
54
|
+
export declare const status: {
|
|
55
|
+
/**
|
|
56
|
+
* Count changes in `@` relative to its parent using the Git status shape.
|
|
57
|
+
* Jujutsu has no index, so `staged` is always zero.
|
|
58
|
+
*/
|
|
59
|
+
summary(cwd: string, signal?: AbortSignal): Promise<git.GitStatusSummary | null>;
|
|
60
|
+
/** Parse `jj diff --summary` output into status counts. */
|
|
61
|
+
parse: typeof parseStatusSummary;
|
|
62
|
+
};
|
|
40
63
|
export declare const repo: {
|
|
41
64
|
/** Clear cached workspace roots. Intended for tests that mutate JJ metadata under an existing path. */
|
|
42
65
|
clearRootCache(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Resolve the current workspace root synchronously from on-disk metadata.
|
|
68
|
+
* Intended for render paths that cannot await filesystem I/O.
|
|
69
|
+
*/
|
|
70
|
+
rootSync(cwd: string): string | null;
|
|
43
71
|
/** Resolve the current Jujutsu workspace root, or `null` when `cwd` is not in a JJ repository. */
|
|
44
72
|
root(cwd: string): Promise<string | null>;
|
|
45
73
|
/** Full Jujutsu workspace metadata. */
|
|
@@ -72,3 +100,4 @@ export declare const repo: {
|
|
|
72
100
|
* - `false` for directories backed by neither tool.
|
|
73
101
|
*/
|
|
74
102
|
export declare function isPureJjRepo(cwd: string): Promise<boolean>;
|
|
103
|
+
export {};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Language id for syntax highlighting and UI (icons, read tool), or undefined if unknown.
|
|
3
3
|
*/
|
|
4
4
|
export declare function getLanguageFromPath(filePath: string): string | undefined;
|
|
5
|
+
export declare function isMarkdownPath(filePath: string): boolean;
|
|
5
6
|
/**
|
|
6
7
|
* LSP language identifier; falls back to `plaintext`.
|
|
7
8
|
*/
|
|
@@ -24,6 +24,36 @@ export declare function formatSessionTerminalTitle(sessionName: string | undefin
|
|
|
24
24
|
*/
|
|
25
25
|
export declare function setTerminalTitle(title: string): void;
|
|
26
26
|
export declare function setSessionTerminalTitle(sessionName: string | undefined, cwd?: string): void;
|
|
27
|
+
/**
|
|
28
|
+
* Set a terminal title from an extension's `setTitle()`. Unlike the session base
|
|
29
|
+
* title, this owns the terminal verbatim: the run-state separator will not rewrite
|
|
30
|
+
* it on the next spinner tick or state change. Cleared when the app next sets an
|
|
31
|
+
* authoritative session title via {@link setSessionTerminalTitle}.
|
|
32
|
+
*/
|
|
33
|
+
export declare function setExtensionTerminalTitle(title: string): void;
|
|
34
|
+
export type TerminalTitleState = "idle" | "working" | "attention";
|
|
35
|
+
/**
|
|
36
|
+
* Compose the terminal title from the `π` brand, a state-carrying SEPARATOR, and
|
|
37
|
+
* the session label. The brand never gains a prefix glyph — the separator slot
|
|
38
|
+
* expresses the run state instead. Pure (no I/O) so the state→separator contract
|
|
39
|
+
* is unit-testable:
|
|
40
|
+
* - `idle` (user's turn): `π > label` — reads like a prompt awaiting input;
|
|
41
|
+
* - `working`: `π ⠋ label` — spinner frames animate the separator;
|
|
42
|
+
* - `attention`: `π ! label` — agent blocked on the user;
|
|
43
|
+
* - disabled: `π: label` — the pre-state layout.
|
|
44
|
+
* Without a label the separator trails the brand (`π >`) so the state stays visible.
|
|
45
|
+
*/
|
|
46
|
+
export declare function buildTerminalTitleWithState(label: string | undefined, state: TerminalTitleState, frame: number, enabled: boolean): string;
|
|
47
|
+
/**
|
|
48
|
+
* Reflect the agent run state in the terminal title's separator: `working`
|
|
49
|
+
* animates spinner frames in the separator slot, `idle` shows `>` (your turn),
|
|
50
|
+
* `attention` shows `!` (agent blocked on you). Gated off by `tui.titleState`.
|
|
51
|
+
*/
|
|
52
|
+
export declare function setTerminalTitleState(state: TerminalTitleState): void;
|
|
53
|
+
/** Enable/disable the run-state separator (driven by the `tui.titleState` setting). */
|
|
54
|
+
export declare function setTerminalTitleStateEnabled(enabled: boolean): void;
|
|
55
|
+
/** Stop the spinner timer; call on session/UI teardown. */
|
|
56
|
+
export declare function disposeTerminalTitleState(): void;
|
|
27
57
|
/**
|
|
28
58
|
* Save the current terminal title on terminals that support xterm window ops.
|
|
29
59
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export type ToolName = "sd" | "sg" | "yt-dlp" | "trafilatura" | "ffmpeg";
|
|
1
|
+
export type ToolName = "sd" | "sg" | "yt-dlp" | "trafilatura";
|
|
3
2
|
export declare function getToolPath(tool: ToolName): string | null;
|
|
4
3
|
/** Download a tool asset without handing the streaming Response to Bun.write. */
|
|
5
4
|
export declare function downloadFile(url: string, dest: string, signal?: AbortSignal): Promise<void>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { AsyncJobManager } from "../async/job-manager.js";
|
|
2
|
+
import type { SessionEntry } from "../session/session-entries.js";
|
|
3
|
+
import { SessionManager } from "../session/session-manager.js";
|
|
2
4
|
import type { ToolSession } from "../tools/index.js";
|
|
3
5
|
/** The two worker CLI flavors the director drives. */
|
|
4
6
|
export type VibeCli = "fast" | "good";
|
|
@@ -12,6 +14,21 @@ export type VibeCli = "fast" | "good";
|
|
|
12
14
|
export declare const VIBE_CLI_AGENT: Record<VibeCli, string>;
|
|
13
15
|
/** Worker session lifecycle as shown to the director. */
|
|
14
16
|
export type VibeSessionState = "starting" | "running" | "idle" | "dead";
|
|
17
|
+
export interface VibeOwnerScope {
|
|
18
|
+
ownerId: string;
|
|
19
|
+
parentSessionId: string;
|
|
20
|
+
parentSessionFile: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface VibeParentSession {
|
|
23
|
+
getAgentId?: () => string | null;
|
|
24
|
+
getSessionId?: () => string | null;
|
|
25
|
+
getSessionFile: () => string | null;
|
|
26
|
+
sessionManager?: ToolSession["sessionManager"] & Partial<Pick<SessionManager, "appendModeChange" | "appendEntriesAtomically" | "recoverPersistenceFromCurrentState">>;
|
|
27
|
+
asyncJobManager?: AsyncJobManager;
|
|
28
|
+
settings: ToolSession["settings"];
|
|
29
|
+
getActiveModelString?: () => string | undefined;
|
|
30
|
+
getModelString?: () => string | undefined;
|
|
31
|
+
}
|
|
15
32
|
/**
|
|
16
33
|
* Live per-session "screen" for rich rendering: what the worker is doing right
|
|
17
34
|
* now (tool trace, current tool, streamed text tail) plus roster metadata.
|
|
@@ -70,13 +87,15 @@ export interface VibeWaitOutcome {
|
|
|
70
87
|
stillRunning: string[];
|
|
71
88
|
timedOut: boolean;
|
|
72
89
|
}
|
|
90
|
+
/** Child ids claimed by any valid Vibe spawn event, independent of current parent scope. */
|
|
91
|
+
export declare function persistedVibeChildIds(entries: Iterable<SessionEntry>): Set<string>;
|
|
73
92
|
/** Thrown from a turn job body so the job manager marks the job failed while carrying the formatted result. */
|
|
74
93
|
export declare class VibeTurnError extends Error {
|
|
75
94
|
}
|
|
76
95
|
/**
|
|
77
|
-
* Process-global registry of vibe worker sessions, scoped
|
|
78
|
-
*
|
|
79
|
-
*
|
|
96
|
+
* Process-global registry of vibe worker sessions, scoped by both owner agent
|
|
97
|
+
* id and stable parent session id. Persisted lifecycle events rebuild idle
|
|
98
|
+
* records after a process restart; live turn jobs remain process-local.
|
|
80
99
|
*/
|
|
81
100
|
export declare class VibeSessionRegistry {
|
|
82
101
|
#private;
|
|
@@ -94,14 +113,21 @@ export declare class VibeSessionRegistry {
|
|
|
94
113
|
ownerId: string;
|
|
95
114
|
state?: VibeSessionState;
|
|
96
115
|
}): void;
|
|
97
|
-
|
|
116
|
+
ownerScope(session: VibeParentSession): VibeOwnerScope;
|
|
117
|
+
/** Re-open spawn admission after an explicit Vibe-mode entry. */
|
|
118
|
+
activateScope(scope: VibeOwnerScope): void;
|
|
119
|
+
listIds(session: ToolSession): string[];
|
|
120
|
+
/** Ids of every live worker owned by `ownerId`, across all parent scopes (status-line tok/s aggregation). */
|
|
121
|
+
listIdsByOwner(ownerId: string): string[];
|
|
98
122
|
/**
|
|
99
123
|
* Live screen snapshots for rich rendering (the "TV wall"): one entry per
|
|
100
124
|
* session in creation order, carrying the in-flight turn's trace, current
|
|
101
125
|
* tool, and streamed text tail. All strings are one-line sanitized here so
|
|
102
126
|
* renderers can print them verbatim.
|
|
103
127
|
*/
|
|
104
|
-
screens(
|
|
128
|
+
screens(session: ToolSession, ids?: string[]): VibeScreenSnapshot[];
|
|
129
|
+
/** Reconcile resumable and terminal workers from the persisted parent journal. */
|
|
130
|
+
rehydrate(session: VibeParentSession): Promise<number>;
|
|
105
131
|
/** Spawn a persistent worker session and start its first turn in the background. */
|
|
106
132
|
spawn(session: ToolSession, args: {
|
|
107
133
|
cli: VibeCli;
|
|
@@ -128,10 +154,12 @@ export declare class VibeSessionRegistry {
|
|
|
128
154
|
timeoutMs?: number;
|
|
129
155
|
signal?: AbortSignal;
|
|
130
156
|
}): Promise<VibeWaitOutcome>;
|
|
131
|
-
/**
|
|
157
|
+
/** Detach one parent's process-local workers without tombstoning their persisted conversations. */
|
|
158
|
+
suspendScope(scope: VibeOwnerScope, manager?: AsyncJobManager): Promise<number>;
|
|
159
|
+
/** Terminate one worker; a tombstone failure still tears it down before reconciliation and error delivery. */
|
|
132
160
|
kill(session: ToolSession, id: string): Promise<VibeKillOutcome>;
|
|
133
|
-
/** Kill every session
|
|
134
|
-
killAll(
|
|
161
|
+
/** Kill every live session in one parent scope after durably recording the complete mode-exit intent. */
|
|
162
|
+
killAll(session: VibeParentSession, ownerScope?: VibeOwnerScope): Promise<number>;
|
|
135
163
|
}
|
|
136
164
|
/**
|
|
137
165
|
* Aggregate tok/s across every live vibe worker session owned by `ownerId`.
|
|
@@ -71,6 +71,6 @@ export declare class WebSearchTool implements AgentTool<typeof webSearchSchema,
|
|
|
71
71
|
/** Web search tool as CustomTool (for TUI rendering support) */
|
|
72
72
|
export declare const webSearchCustomTool: CustomTool<typeof webSearchSchema, SearchRenderDetails>;
|
|
73
73
|
export declare function getSearchTools(): CustomTool<any, any>[];
|
|
74
|
-
export { getSearchProvider, setExcludedSearchProviders,
|
|
74
|
+
export { getSearchProvider, setExcludedSearchProviders, setSearchProviderOrder } from "./provider.js";
|
|
75
75
|
export type { SearchProviderId as SearchProvider, SearchResponse } from "./types.js";
|
|
76
76
|
export { isSearchProviderId, isSearchProviderPreference } from "./types.js";
|
|
@@ -18,8 +18,14 @@ export declare function formatSearchProviderFailures(failures: readonly {
|
|
|
18
18
|
* underlying module; subsequent calls return the cached singleton.
|
|
19
19
|
*/
|
|
20
20
|
export declare function getSearchProvider(id: SearchProviderId): Promise<SearchProvider>;
|
|
21
|
-
/**
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Prioritize configured providers while retaining every unlisted provider in
|
|
23
|
+
* its built-in relative order. Invalid IDs are ignored defensively. Listed
|
|
24
|
+
* providers are treated as explicit selections: they resolve through
|
|
25
|
+
* `isExplicitlyAvailable`, so e.g. a hand-listed Perplexity may fall back to
|
|
26
|
+
* anonymous search exactly like the retired single-preference setting did.
|
|
27
|
+
*/
|
|
28
|
+
export declare function setSearchProviderOrder(providers: readonly SearchProviderId[]): void;
|
|
23
29
|
/** Set providers that web search should never use, including fallbacks. */
|
|
24
30
|
export declare function setExcludedSearchProviders(providers: readonly SearchProviderId[]): void;
|
|
25
31
|
/** `true` when settings exclude `id` from web search (auto chain and the Public Web fan-out). */
|
|
@@ -28,12 +34,16 @@ export interface SearchProviderCandidate {
|
|
|
28
34
|
id: SearchProviderId;
|
|
29
35
|
explicit: boolean;
|
|
30
36
|
}
|
|
31
|
-
/**
|
|
32
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Return provider candidates in fallback order without loading their modules.
|
|
39
|
+
* `forcedProvider` (a per-request `provider` argument) is terminal-first and
|
|
40
|
+
* bypasses exclusion; configured-order entries carry `explicit: true`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function resolveProviderCandidates(forcedProvider?: SearchProviderId): SearchProviderCandidate[];
|
|
33
43
|
/**
|
|
34
44
|
* Resolve the complete available provider chain.
|
|
35
45
|
*
|
|
36
46
|
* This compatibility helper loads every candidate. Search execution should use
|
|
37
47
|
* {@link resolveProviderCandidates} so fallback modules load only when reached.
|
|
38
48
|
*/
|
|
39
|
-
export declare function resolveProviderChain(authStorage: AuthStorage,
|
|
49
|
+
export declare function resolveProviderChain(authStorage: AuthStorage, forcedProvider?: SearchProviderId): Promise<SearchProvider[]>;
|
|
@@ -108,6 +108,100 @@ export type SearchProviderId = Exclude<(typeof SEARCH_PROVIDER_OPTIONS)[number][
|
|
|
108
108
|
* share one source of truth and never drift apart.
|
|
109
109
|
*/
|
|
110
110
|
export declare const SEARCH_PROVIDER_ORDER: readonly SearchProviderId[];
|
|
111
|
+
/** Concrete provider choices (no `auto` sentinel) — for list-valued settings like order/exclude. */
|
|
112
|
+
export declare const SEARCH_PROVIDER_CHOICES: ({
|
|
113
|
+
readonly value: "perplexity";
|
|
114
|
+
readonly label: "Perplexity";
|
|
115
|
+
readonly description: "Uses auth when configured; explicit selection falls back to anonymous search";
|
|
116
|
+
} | {
|
|
117
|
+
readonly value: "gemini";
|
|
118
|
+
readonly label: "Gemini";
|
|
119
|
+
readonly description: "Google Search grounding via Gemini (uses google-gemini-cli or google-antigravity OAuth)";
|
|
120
|
+
} | {
|
|
121
|
+
readonly value: "anthropic";
|
|
122
|
+
readonly label: "Anthropic";
|
|
123
|
+
readonly description: "Claude's native web_search tool (uses Anthropic OAuth or ANTHROPIC_API_KEY)";
|
|
124
|
+
} | {
|
|
125
|
+
readonly value: "codex";
|
|
126
|
+
readonly label: "OpenAI";
|
|
127
|
+
readonly description: "OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)";
|
|
128
|
+
} | {
|
|
129
|
+
readonly value: "xai";
|
|
130
|
+
readonly label: "xAI";
|
|
131
|
+
readonly description: "Grok web search via xAI Responses API (requires XAI_API_KEY)";
|
|
132
|
+
} | {
|
|
133
|
+
readonly value: "zai";
|
|
134
|
+
readonly label: "Z.AI";
|
|
135
|
+
readonly description: "Calls Z.AI webSearchPrime MCP";
|
|
136
|
+
} | {
|
|
137
|
+
readonly value: "exa";
|
|
138
|
+
readonly label: "Exa";
|
|
139
|
+
readonly description: "Uses Exa API when EXA_API_KEY is set; falls back to Exa MCP";
|
|
140
|
+
} | {
|
|
141
|
+
readonly value: "tinyfish";
|
|
142
|
+
readonly label: "TinyFish";
|
|
143
|
+
readonly description: "Requires TINYFISH_API_KEY";
|
|
144
|
+
} | {
|
|
145
|
+
readonly value: "jina";
|
|
146
|
+
readonly label: "Jina";
|
|
147
|
+
readonly description: "Requires JINA_API_KEY";
|
|
148
|
+
} | {
|
|
149
|
+
readonly value: "kagi";
|
|
150
|
+
readonly label: "Kagi";
|
|
151
|
+
readonly description: "Requires KAGI_API_KEY and Kagi Search API beta access";
|
|
152
|
+
} | {
|
|
153
|
+
readonly value: "tavily";
|
|
154
|
+
readonly label: "Tavily";
|
|
155
|
+
readonly description: "Requires TAVILY_API_KEY";
|
|
156
|
+
} | {
|
|
157
|
+
readonly value: "firecrawl";
|
|
158
|
+
readonly label: "Firecrawl";
|
|
159
|
+
readonly description: "Uses Firecrawl API when FIRECRAWL_API_KEY is set; falls back to keyless mode";
|
|
160
|
+
} | {
|
|
161
|
+
readonly value: "brave";
|
|
162
|
+
readonly label: "Brave";
|
|
163
|
+
readonly description: "Requires BRAVE_API_KEY";
|
|
164
|
+
} | {
|
|
165
|
+
readonly value: "kimi";
|
|
166
|
+
readonly label: "Kimi";
|
|
167
|
+
readonly description: "Kimi Code search (requires a Kimi Code Console key via KIMI_SEARCH_API_KEY/MOONSHOT_SEARCH_API_KEY or /login kimi-code; not MOONSHOT_API_KEY)";
|
|
168
|
+
} | {
|
|
169
|
+
readonly value: "parallel";
|
|
170
|
+
readonly label: "Parallel";
|
|
171
|
+
readonly description: "Requires PARALLEL_API_KEY";
|
|
172
|
+
} | {
|
|
173
|
+
readonly value: "synthetic";
|
|
174
|
+
readonly label: "Synthetic";
|
|
175
|
+
readonly description: "Requires SYNTHETIC_API_KEY";
|
|
176
|
+
} | {
|
|
177
|
+
readonly value: "searxng";
|
|
178
|
+
readonly label: "SearXNG";
|
|
179
|
+
readonly description: "Requires SEARXNG_ENDPOINT or searxng.endpoint";
|
|
180
|
+
} | {
|
|
181
|
+
readonly value: "startpage";
|
|
182
|
+
readonly label: "Startpage";
|
|
183
|
+
readonly description: "Credential-free scrape of Startpage (Google-backed) results; may be bot-challenged";
|
|
184
|
+
} | {
|
|
185
|
+
readonly value: "duckduckgo";
|
|
186
|
+
readonly label: "DuckDuckGo";
|
|
187
|
+
readonly description: "Credential-free best-effort fallback; may be bot-challenged on datacenter/shared-egress IPs";
|
|
188
|
+
} | {
|
|
189
|
+
readonly value: "ecosia";
|
|
190
|
+
readonly label: "Ecosia";
|
|
191
|
+
readonly description: "Credential-free browser-backed scrape of Ecosia (Google-backed) results";
|
|
192
|
+
} | {
|
|
193
|
+
readonly value: "google";
|
|
194
|
+
readonly label: "Google";
|
|
195
|
+
readonly description: "Credential-free browser-backed fallback; slower and may be bot-challenged";
|
|
196
|
+
} | {
|
|
197
|
+
readonly value: "mojeek";
|
|
198
|
+
readonly label: "Mojeek";
|
|
199
|
+
readonly description: "Credential-free browser-backed scrape of Mojeek's independent index";
|
|
200
|
+
} | {
|
|
201
|
+
readonly value: "public";
|
|
202
|
+
readonly label: "Public Web";
|
|
203
|
+
readonly description: "Queries every credential-free engine in parallel and consolidates deduplicated results";
|
|
204
|
+
})[];
|
|
111
205
|
export declare const SEARCH_PROVIDER_PREFERENCES: readonly ["auto", ...SearchProviderId[]];
|
|
112
206
|
/** Display labels, derived from {@link SEARCH_PROVIDER_OPTIONS}. */
|
|
113
207
|
export declare const SEARCH_PROVIDER_LABELS: Record<SearchProviderId, string>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "17.
|
|
4
|
+
"version": "17.1.1",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"@babel/parser": "^7.29.7",
|
|
54
54
|
"@babel/traverse": "^7.29.7",
|
|
55
55
|
"@mozilla/readability": "^0.6.0",
|
|
56
|
-
"@oh-my-pi/hashline": "17.
|
|
57
|
-
"@oh-my-pi/omp-stats": "17.
|
|
58
|
-
"@oh-my-pi/pi-agent-core": "17.
|
|
59
|
-
"@oh-my-pi/pi-ai": "17.
|
|
60
|
-
"@oh-my-pi/pi-catalog": "17.
|
|
61
|
-
"@oh-my-pi/pi-mnemopi": "17.
|
|
62
|
-
"@oh-my-pi/pi-natives": "17.
|
|
63
|
-
"@oh-my-pi/pi-tui": "17.
|
|
64
|
-
"@oh-my-pi/pi-utils": "17.
|
|
65
|
-
"@oh-my-pi/pi-wire": "17.
|
|
66
|
-
"@oh-my-pi/snapcompact": "17.
|
|
56
|
+
"@oh-my-pi/hashline": "17.1.1",
|
|
57
|
+
"@oh-my-pi/omp-stats": "17.1.1",
|
|
58
|
+
"@oh-my-pi/pi-agent-core": "17.1.1",
|
|
59
|
+
"@oh-my-pi/pi-ai": "17.1.1",
|
|
60
|
+
"@oh-my-pi/pi-catalog": "17.1.1",
|
|
61
|
+
"@oh-my-pi/pi-mnemopi": "17.1.1",
|
|
62
|
+
"@oh-my-pi/pi-natives": "17.1.1",
|
|
63
|
+
"@oh-my-pi/pi-tui": "17.1.1",
|
|
64
|
+
"@oh-my-pi/pi-utils": "17.1.1",
|
|
65
|
+
"@oh-my-pi/pi-wire": "17.1.1",
|
|
66
|
+
"@oh-my-pi/snapcompact": "17.1.1",
|
|
67
67
|
"@opentelemetry/api": "^1.9.1",
|
|
68
68
|
"@opentelemetry/api-logs": "^0.220.0",
|
|
69
69
|
"@opentelemetry/context-async-hooks": "^2.9.0",
|