@oh-my-pi/pi-coding-agent 16.1.22 → 16.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +99 -1
- package/dist/cli.js +4387 -4164
- package/dist/types/advisor/__tests__/emission-guard.test.d.ts +1 -0
- package/dist/types/advisor/emission-guard.d.ts +73 -0
- package/dist/types/advisor/index.d.ts +1 -0
- package/dist/types/advisor/runtime.d.ts +7 -0
- package/dist/types/advisor/watchdog.d.ts +2 -0
- package/dist/types/cli/flag-tables.d.ts +1 -0
- package/dist/types/cli/gallery-fixtures/search.d.ts +1 -1
- package/dist/types/cli/gc-cli.d.ts +58 -0
- package/dist/types/collab/display-name.d.ts +3 -0
- package/dist/types/collab/host.d.ts +0 -2
- package/dist/types/commands/gc.d.ts +37 -0
- package/dist/types/commands/worktree.d.ts +0 -3
- package/dist/types/config/inline-tool-descriptors-mode.d.ts +13 -0
- package/dist/types/config/model-discovery.d.ts +6 -1
- package/dist/types/config/model-registry.d.ts +6 -2
- package/dist/types/config/model-resolver.d.ts +12 -0
- package/dist/types/config/models-config-schema.d.ts +29 -2
- package/dist/types/config/models-config.d.ts +22 -1
- package/dist/types/config/settings-schema.d.ts +145 -21
- package/dist/types/config/settings.d.ts +13 -0
- package/dist/types/dap/config.d.ts +1 -1
- package/dist/types/edit/hashline/filesystem.d.ts +4 -2
- package/dist/types/edit/renderer.d.ts +4 -0
- package/dist/types/extensibility/extensions/types.d.ts +17 -17
- package/dist/types/extensibility/hooks/types.d.ts +10 -10
- package/dist/types/extensibility/plugins/marketplace/types.d.ts +1 -0
- package/dist/types/internal-urls/__tests__/ssh-protocol.test.d.ts +1 -0
- package/dist/types/internal-urls/index.d.ts +1 -0
- package/dist/types/internal-urls/registry-helpers.d.ts +2 -0
- package/dist/types/internal-urls/router.d.ts +1 -1
- package/dist/types/internal-urls/ssh-protocol.d.ts +10 -0
- package/dist/types/internal-urls/types.d.ts +19 -2
- package/dist/types/irc/bus.d.ts +6 -0
- package/dist/types/mcp/transports/stdio.d.ts +25 -1
- package/dist/types/modes/components/__tests__/move-overlay.test.d.ts +1 -0
- package/dist/types/modes/components/custom-editor.d.ts +7 -0
- package/dist/types/modes/components/move-overlay.d.ts +23 -0
- package/dist/types/modes/components/plugin-selector.d.ts +2 -1
- package/dist/types/modes/components/queue-mode-selector.d.ts +2 -1
- package/dist/types/modes/components/select-list-mouse-routing.d.ts +2 -0
- package/dist/types/modes/components/settings-defs.d.ts +4 -1
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/show-images-selector.d.ts +2 -1
- package/dist/types/modes/components/status-line/component.d.ts +2 -0
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/theme-selector.d.ts +2 -1
- package/dist/types/modes/components/thinking-selector.d.ts +2 -1
- package/dist/types/modes/controllers/command-controller.d.ts +10 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +6 -0
- package/dist/types/modes/interactive-mode.d.ts +10 -1
- package/dist/types/modes/internal-url-autocomplete.d.ts +1 -1
- package/dist/types/modes/running-subagent-badge.d.ts +6 -0
- package/dist/types/modes/theme/mermaid-rendering.test.d.ts +1 -0
- package/dist/types/modes/theme/theme.d.ts +2 -1
- package/dist/types/modes/types.d.ts +9 -1
- package/dist/types/sdk.d.ts +2 -2
- package/dist/types/session/agent-session.d.ts +2 -1
- package/dist/types/session/session-listing.d.ts +10 -1
- package/dist/types/session/session-manager.d.ts +13 -0
- package/dist/types/slash-commands/builtin-registry.d.ts +1 -1
- package/dist/types/ssh/__tests__/connection-manager-args.test.d.ts +1 -0
- package/dist/types/ssh/__tests__/file-transfer-posix-guard.test.d.ts +1 -0
- package/dist/types/ssh/connection-manager.d.ts +2 -0
- package/dist/types/ssh/file-transfer.d.ts +79 -0
- package/dist/types/ssh/utils.d.ts +6 -0
- package/dist/types/system-prompt.d.ts +5 -0
- package/dist/types/task/executor.d.ts +16 -0
- package/dist/types/tiny/text.d.ts +1 -1
- package/dist/types/tools/builtin-names.d.ts +5 -1
- package/dist/types/tools/{find.d.ts → glob.d.ts} +15 -15
- package/dist/types/tools/{search.d.ts → grep.d.ts} +14 -14
- package/dist/types/tools/index.d.ts +3 -3
- package/dist/types/tools/path-utils.d.ts +29 -0
- package/dist/types/tools/plan-mode-guard.d.ts +7 -0
- package/dist/types/tools/read.d.ts +2 -2
- package/dist/types/tools/render-utils.d.ts +8 -0
- package/dist/types/tools/renderers.d.ts +11 -0
- package/dist/types/tools/ssh.d.ts +2 -0
- package/dist/types/tools/todo.d.ts +0 -16
- package/dist/types/tools/write.d.ts +2 -2
- package/dist/types/utils/active-repo-context.d.ts +8 -0
- package/dist/types/utils/image-resize.d.ts +1 -0
- package/dist/types/utils/markit-cache.d.ts +23 -0
- package/dist/types/utils/markit.d.ts +5 -1
- package/dist/types/utils/prompt-path.d.ts +1 -0
- package/dist/types/web/search/providers/duckduckgo.d.ts +14 -0
- package/dist/types/web/search/providers/firecrawl.d.ts +28 -0
- package/dist/types/web/search/providers/tinyfish.d.ts +29 -0
- package/dist/types/web/search/providers/xai.d.ts +13 -0
- package/dist/types/web/search/types.d.ts +18 -2
- package/package.json +30 -15
- package/scripts/bench-guard.ts +1 -1
- package/scripts/build-binary.ts +9 -9
- package/scripts/bundle-dist.ts +2 -2
- package/src/advisor/__tests__/advisor.test.ts +40 -4
- package/src/advisor/__tests__/emission-guard.test.ts +147 -0
- package/src/advisor/advise-tool.ts +1 -1
- package/src/advisor/emission-guard.ts +172 -0
- package/src/advisor/index.ts +1 -0
- package/src/advisor/runtime.ts +11 -0
- package/src/advisor/watchdog.ts +12 -1
- package/src/cli/args.ts +5 -2
- package/src/cli/auth-broker-cli.ts +17 -0
- package/src/cli/config-cli.ts +4 -0
- package/src/cli/flag-tables.ts +7 -4
- package/src/cli/gallery-cli.ts +14 -2
- package/src/cli/gallery-fixtures/edit.ts +60 -0
- package/src/cli/gallery-fixtures/fs.ts +17 -17
- package/src/cli/gallery-fixtures/search.ts +4 -4
- package/src/cli/gc-cli.ts +939 -0
- package/src/cli/usage-cli.ts +20 -1
- package/src/cli/web-search-cli.ts +1 -1
- package/src/cli-commands.ts +1 -0
- package/src/collab/display-name.ts +13 -0
- package/src/collab/guest.ts +5 -1
- package/src/collab/host.ts +2 -13
- package/src/commands/gc.ts +46 -0
- package/src/commands/worktree.ts +6 -0
- package/src/config/inline-tool-descriptors-mode.ts +27 -0
- package/src/config/model-discovery.ts +77 -8
- package/src/config/model-registry.ts +89 -11
- package/src/config/model-resolver.ts +39 -1
- package/src/config/models-config-schema.ts +41 -5
- package/src/config/models-config.ts +4 -1
- package/src/config/settings-schema.ts +130 -27
- package/src/config/settings.ts +216 -7
- package/src/cursor.ts +1 -1
- package/src/dap/config.ts +152 -8
- package/src/dap/session.ts +1 -1
- package/src/discovery/helpers.ts +3 -1
- package/src/edit/hashline/diff.ts +14 -3
- package/src/edit/hashline/execute.ts +42 -6
- package/src/edit/hashline/filesystem.ts +49 -8
- package/src/edit/index.ts +1 -0
- package/src/edit/modes/patch.ts +11 -1
- package/src/edit/renderer.ts +140 -13
- package/src/eval/__tests__/agent-bridge.test.ts +101 -0
- package/src/eval/__tests__/julia-prelude.test.ts +18 -0
- package/src/eval/agent-bridge.ts +26 -3
- package/src/eval/jl/runner.jl +7 -1
- package/src/eval/js/tool-bridge.ts +2 -2
- package/src/export/html/index.ts +1 -1
- package/src/export/html/template.js +3 -1
- package/src/export/html/tool-views.generated.js +20 -20
- package/src/extensibility/extensions/types.ts +22 -22
- package/src/extensibility/hooks/types.ts +11 -11
- package/src/extensibility/plugins/legacy-pi-bundled-keys.ts +10 -3
- package/src/extensibility/plugins/legacy-pi-bundled-registry.ts +31 -10
- package/src/extensibility/plugins/marketplace/manager.ts +22 -0
- package/src/extensibility/plugins/marketplace/types.ts +1 -0
- package/src/internal-urls/__tests__/ssh-protocol.test.ts +331 -0
- package/src/internal-urls/docs-index.generated.txt +2 -2
- package/src/internal-urls/docs-index.ts +2 -3
- package/src/internal-urls/index.ts +1 -0
- package/src/internal-urls/registry-helpers.ts +19 -4
- package/src/internal-urls/router.ts +5 -3
- package/src/internal-urls/ssh-protocol.ts +367 -0
- package/src/internal-urls/types.ts +19 -2
- package/src/irc/bus.ts +11 -3
- package/src/lsp/index.ts +8 -1
- package/src/mcp/oauth-discovery.ts +20 -20
- package/src/mcp/tool-bridge.ts +32 -2
- package/src/mcp/transports/stdio.test.ts +20 -3
- package/src/mcp/transports/stdio.ts +45 -14
- package/src/memories/index.ts +1 -1
- package/src/modes/acp/acp-event-mapper.ts +2 -2
- package/src/modes/components/__tests__/move-overlay.test.ts +166 -0
- package/src/modes/components/agent-hub.ts +3 -0
- package/src/modes/components/agent-transcript-viewer.ts +9 -7
- package/src/modes/components/custom-editor.ts +90 -5
- package/src/modes/components/move-overlay.ts +282 -0
- package/src/modes/components/plan-review-overlay.ts +35 -35
- package/src/modes/components/plugin-selector.ts +6 -1
- package/src/modes/components/queue-mode-selector.ts +6 -1
- package/src/modes/components/select-list-mouse-routing.ts +35 -0
- package/src/modes/components/session-selector.ts +11 -10
- package/src/modes/components/settings-defs.ts +14 -1
- package/src/modes/components/settings-selector.ts +196 -29
- package/src/modes/components/show-images-selector.ts +6 -1
- package/src/modes/components/status-line/component.ts +108 -28
- package/src/modes/components/status-line/segments.ts +5 -1
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/theme-selector.ts +6 -1
- package/src/modes/components/thinking-selector.ts +6 -1
- package/src/modes/components/tool-execution.ts +25 -9
- package/src/modes/components/tree-selector.ts +5 -5
- package/src/modes/controllers/command-controller.ts +140 -47
- package/src/modes/controllers/event-controller.ts +59 -3
- package/src/modes/controllers/input-controller.ts +70 -4
- package/src/modes/controllers/selector-controller.ts +15 -2
- package/src/modes/controllers/streaming-reveal.ts +17 -0
- package/src/modes/controllers/tool-args-reveal.ts +1 -1
- package/src/modes/interactive-mode.ts +142 -59
- package/src/modes/internal-url-autocomplete.ts +17 -2
- package/src/modes/prompt-action-autocomplete.ts +3 -1
- package/src/modes/running-subagent-badge.ts +13 -0
- package/src/modes/setup-wizard/scenes/glyph.ts +2 -13
- package/src/modes/setup-wizard/scenes/providers.ts +2 -1
- package/src/modes/setup-wizard/scenes/theme.ts +6 -12
- package/src/modes/setup-wizard/scenes/web-search.ts +8 -13
- package/src/modes/setup-wizard/wizard-overlay.ts +6 -5
- package/src/modes/theme/mermaid-rendering.test.ts +53 -0
- package/src/modes/theme/theme.ts +42 -15
- package/src/modes/types.ts +9 -1
- package/src/modes/utils/interactive-context-helpers.ts +1 -1
- package/src/priority.json +15 -0
- package/src/prompts/advisor/active-repo-watchdog.md +6 -0
- package/src/prompts/advisor/system.md +21 -7
- package/src/prompts/agents/designer.md +1 -1
- package/src/prompts/agents/explore.md +1 -1
- package/src/prompts/agents/librarian.md +2 -2
- package/src/prompts/agents/plan.md +2 -2
- package/src/prompts/agents/reviewer.md +1 -1
- package/src/prompts/agents/task.md +2 -2
- package/src/prompts/system/active-repo-context.md +4 -0
- package/src/prompts/system/gemini-tool-call-reminder.md +9 -0
- package/src/prompts/system/plan-mode-active.md +12 -3
- package/src/prompts/system/project-prompt.md +2 -2
- package/src/prompts/system/system-prompt.md +8 -6
- package/src/prompts/tools/bash.md +2 -2
- package/src/prompts/tools/checkpoint.md +1 -1
- package/src/prompts/tools/{find.md → glob.md} +1 -1
- package/src/prompts/tools/{search.md → grep.md} +3 -3
- package/src/prompts/tools/read.md +4 -2
- package/src/sdk.ts +98 -29
- package/src/session/agent-session.ts +828 -191
- package/src/session/session-history-format.ts +2 -2
- package/src/session/session-listing.ts +35 -2
- package/src/session/session-manager.ts +46 -0
- package/src/slash-commands/builtin-registry.ts +158 -22
- package/src/slash-commands/helpers/usage-report.ts +23 -2
- package/src/ssh/__tests__/connection-manager-args.test.ts +69 -0
- package/src/ssh/__tests__/file-transfer-posix-guard.test.ts +68 -0
- package/src/ssh/connection-manager.ts +12 -15
- package/src/ssh/file-transfer.ts +209 -0
- package/src/ssh/utils.ts +24 -0
- package/src/system-prompt.ts +60 -28
- package/src/task/executor.ts +96 -36
- package/src/task/index.ts +3 -3
- package/src/task/render.ts +14 -13
- package/src/task/worktree.ts +38 -1
- package/src/tiny/text.ts +49 -4
- package/src/tiny/worker.ts +3 -3
- package/src/tools/acp-bridge.ts +6 -1
- package/src/tools/bash.ts +2 -2
- package/src/tools/builtin-names.ts +26 -2
- package/src/tools/{find.ts → glob.ts} +48 -42
- package/src/tools/{search.ts → grep.ts} +311 -129
- package/src/tools/index.ts +13 -14
- package/src/tools/irc.ts +6 -2
- package/src/tools/path-utils.ts +64 -1
- package/src/tools/plan-mode-guard.ts +26 -13
- package/src/tools/read.ts +35 -6
- package/src/tools/render-utils.ts +14 -0
- package/src/tools/renderers.ts +15 -4
- package/src/tools/ssh.ts +17 -2
- package/src/tools/todo.ts +4 -26
- package/src/tools/write.ts +25 -9
- package/src/utils/active-repo-context.ts +143 -0
- package/src/utils/edit-mode.ts +19 -2
- package/src/utils/image-resize.ts +88 -7
- package/src/utils/lang-from-path.ts +3 -3
- package/src/utils/markit-cache.ts +166 -0
- package/src/utils/markit.ts +86 -18
- package/src/utils/prompt-path.ts +3 -0
- package/src/utils/shell-snapshot.ts +1 -1
- package/src/utils/title-generator.ts +1 -1
- package/src/web/search/provider.ts +54 -34
- package/src/web/search/providers/duckduckgo.ts +140 -0
- package/src/web/search/providers/firecrawl.ts +144 -0
- package/src/web/search/providers/tinyfish.ts +159 -0
- package/src/web/search/providers/xai.ts +292 -0
- package/src/web/search/providers/zai.ts +142 -56
- package/src/web/search/types.ts +6 -2
|
@@ -257,6 +257,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
257
257
|
readonly type: "array";
|
|
258
258
|
readonly default: string[];
|
|
259
259
|
};
|
|
260
|
+
readonly "providers.maxInFlightRequests": {
|
|
261
|
+
readonly type: "record";
|
|
262
|
+
readonly default: Record<string, number>;
|
|
263
|
+
readonly ui: {
|
|
264
|
+
readonly tab: "providers";
|
|
265
|
+
readonly group: "Services";
|
|
266
|
+
readonly label: "Max In-Flight Requests";
|
|
267
|
+
readonly description: 'Maximum concurrent LLM requests per provider id (for example "openai" or "anthropic"), shared across local OMP processes with this config root. Omitted providers are unlimited.';
|
|
268
|
+
};
|
|
269
|
+
};
|
|
260
270
|
readonly disabledExtensions: {
|
|
261
271
|
readonly type: "array";
|
|
262
272
|
readonly default: string[];
|
|
@@ -735,6 +745,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
735
745
|
readonly default: 8;
|
|
736
746
|
readonly description: "Maximum number of inline images kept as live terminal graphics (default 8). Older images fall back to a text placeholder via a full redraw once the limit is exceeded. Set to 0 to keep every image (no limit).";
|
|
737
747
|
};
|
|
748
|
+
readonly "terminal.showProgress": {
|
|
749
|
+
readonly type: "boolean";
|
|
750
|
+
readonly default: false;
|
|
751
|
+
readonly ui: {
|
|
752
|
+
readonly tab: "appearance";
|
|
753
|
+
readonly group: "Display";
|
|
754
|
+
readonly label: "Native Terminal Progress";
|
|
755
|
+
readonly description: "Emit OSC 9;4 indeterminate progress while the agent or context maintenance is running";
|
|
756
|
+
};
|
|
757
|
+
};
|
|
738
758
|
readonly "tui.textSizing": {
|
|
739
759
|
readonly type: "boolean";
|
|
740
760
|
readonly default: false;
|
|
@@ -745,6 +765,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
745
765
|
readonly description: "Render Markdown H1 headings at 2x scale using Kitty's OSC 66 text-sizing protocol. Only takes effect on Kitty terminals; ignored everywhere else. Off by default.";
|
|
746
766
|
};
|
|
747
767
|
};
|
|
768
|
+
readonly "tui.renderMermaid": {
|
|
769
|
+
readonly type: "boolean";
|
|
770
|
+
readonly default: true;
|
|
771
|
+
readonly ui: {
|
|
772
|
+
readonly tab: "appearance";
|
|
773
|
+
readonly group: "Display";
|
|
774
|
+
readonly label: "Render Mermaid Diagrams";
|
|
775
|
+
readonly description: "Render Mermaid fenced code blocks as ASCII diagrams";
|
|
776
|
+
};
|
|
777
|
+
};
|
|
748
778
|
readonly "tui.hyperlinks": {
|
|
749
779
|
readonly type: "enum";
|
|
750
780
|
readonly values: readonly ["off", "auto", "always"];
|
|
@@ -892,14 +922,38 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
892
922
|
readonly description: "Apply loop guard to assistant prose messages in addition to thinking logs";
|
|
893
923
|
};
|
|
894
924
|
};
|
|
895
|
-
readonly
|
|
925
|
+
readonly "model.loopGuard.toolCallReminder": {
|
|
896
926
|
readonly type: "boolean";
|
|
897
|
-
readonly default:
|
|
927
|
+
readonly default: true;
|
|
928
|
+
readonly ui: {
|
|
929
|
+
readonly tab: "model";
|
|
930
|
+
readonly group: "Thinking";
|
|
931
|
+
readonly label: "Loop Guard Tool-Call Reminder";
|
|
932
|
+
readonly description: "When a Gemini reasoning stream emits many consecutive planning headers without calling a tool, interrupt it and inject a reminder to issue a tool call (requires Loop Guard)";
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
readonly inlineToolDescriptors: {
|
|
936
|
+
readonly type: "enum";
|
|
937
|
+
readonly values: readonly ["auto", "on", "off"];
|
|
938
|
+
readonly default: "auto";
|
|
898
939
|
readonly ui: {
|
|
899
940
|
readonly tab: "model";
|
|
900
941
|
readonly group: "Prompt";
|
|
901
942
|
readonly label: "Inline Tool Descriptors";
|
|
902
|
-
readonly description: "Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once";
|
|
943
|
+
readonly description: "Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once. Auto enables this for Gemini models and disables it otherwise";
|
|
944
|
+
readonly options: readonly [{
|
|
945
|
+
readonly value: "auto";
|
|
946
|
+
readonly label: "Auto";
|
|
947
|
+
readonly description: "Inline descriptors for Gemini models; keep them in tool schemas otherwise";
|
|
948
|
+
}, {
|
|
949
|
+
readonly value: "on";
|
|
950
|
+
readonly label: "On";
|
|
951
|
+
readonly description: "Always inline descriptors in the system prompt";
|
|
952
|
+
}, {
|
|
953
|
+
readonly value: "off";
|
|
954
|
+
readonly label: "Off";
|
|
955
|
+
readonly description: "Keep descriptors in provider tool schemas only";
|
|
956
|
+
}];
|
|
903
957
|
};
|
|
904
958
|
};
|
|
905
959
|
readonly includeModelInPrompt: {
|
|
@@ -1709,6 +1763,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
1709
1763
|
readonly description: "Automatically compact context when it gets too large";
|
|
1710
1764
|
};
|
|
1711
1765
|
};
|
|
1766
|
+
readonly "compaction.midTurnEnabled": {
|
|
1767
|
+
readonly type: "boolean";
|
|
1768
|
+
readonly default: true;
|
|
1769
|
+
readonly ui: {
|
|
1770
|
+
readonly tab: "context";
|
|
1771
|
+
readonly group: "Compaction";
|
|
1772
|
+
readonly label: "Mid-Turn Compaction";
|
|
1773
|
+
readonly description: "Check thresholds at safe mid-turn tool-loop boundaries before the next provider request";
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1712
1776
|
readonly "compaction.strategy": {
|
|
1713
1777
|
readonly type: "enum";
|
|
1714
1778
|
readonly values: readonly ["context-full", "handoff", "shake", "snapcompact", "off"];
|
|
@@ -3332,34 +3396,34 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3332
3396
|
}];
|
|
3333
3397
|
};
|
|
3334
3398
|
};
|
|
3335
|
-
readonly "
|
|
3399
|
+
readonly "glob.enabled": {
|
|
3336
3400
|
readonly type: "boolean";
|
|
3337
3401
|
readonly default: true;
|
|
3338
3402
|
readonly ui: {
|
|
3339
3403
|
readonly tab: "tools";
|
|
3340
3404
|
readonly group: "Available Tools";
|
|
3341
|
-
readonly label: "
|
|
3342
|
-
readonly description: "Enable the
|
|
3405
|
+
readonly label: "Glob";
|
|
3406
|
+
readonly description: "Enable the glob tool for glob-based file lookup";
|
|
3343
3407
|
};
|
|
3344
3408
|
};
|
|
3345
|
-
readonly "
|
|
3409
|
+
readonly "grep.enabled": {
|
|
3346
3410
|
readonly type: "boolean";
|
|
3347
3411
|
readonly default: true;
|
|
3348
3412
|
readonly ui: {
|
|
3349
3413
|
readonly tab: "tools";
|
|
3350
3414
|
readonly group: "Available Tools";
|
|
3351
|
-
readonly label: "
|
|
3352
|
-
readonly description: "Enable the
|
|
3415
|
+
readonly label: "Grep";
|
|
3416
|
+
readonly description: "Enable the grep tool for regex content search";
|
|
3353
3417
|
};
|
|
3354
3418
|
};
|
|
3355
|
-
readonly "
|
|
3419
|
+
readonly "grep.contextBefore": {
|
|
3356
3420
|
readonly type: "number";
|
|
3357
3421
|
readonly default: 1;
|
|
3358
3422
|
readonly ui: {
|
|
3359
3423
|
readonly tab: "tools";
|
|
3360
|
-
readonly group: "
|
|
3361
|
-
readonly label: "
|
|
3362
|
-
readonly description: "Lines of context before each
|
|
3424
|
+
readonly group: "Grep & Browser";
|
|
3425
|
+
readonly label: "Grep Context Before";
|
|
3426
|
+
readonly description: "Lines of context before each grep match";
|
|
3363
3427
|
readonly options: readonly [{
|
|
3364
3428
|
readonly value: "0";
|
|
3365
3429
|
readonly label: "0 lines";
|
|
@@ -3378,14 +3442,14 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3378
3442
|
}];
|
|
3379
3443
|
};
|
|
3380
3444
|
};
|
|
3381
|
-
readonly "
|
|
3445
|
+
readonly "grep.contextAfter": {
|
|
3382
3446
|
readonly type: "number";
|
|
3383
3447
|
readonly default: 3;
|
|
3384
3448
|
readonly ui: {
|
|
3385
3449
|
readonly tab: "tools";
|
|
3386
|
-
readonly group: "
|
|
3387
|
-
readonly label: "
|
|
3388
|
-
readonly description: "Lines of context after each
|
|
3450
|
+
readonly group: "Grep & Browser";
|
|
3451
|
+
readonly label: "Grep Context After";
|
|
3452
|
+
readonly description: "Lines of context after each grep match";
|
|
3389
3453
|
readonly options: readonly [{
|
|
3390
3454
|
readonly value: "0";
|
|
3391
3455
|
readonly label: "0 lines";
|
|
@@ -3552,7 +3616,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3552
3616
|
readonly default: true;
|
|
3553
3617
|
readonly ui: {
|
|
3554
3618
|
readonly tab: "tools";
|
|
3555
|
-
readonly group: "
|
|
3619
|
+
readonly group: "Grep & Browser";
|
|
3556
3620
|
readonly label: "Headless Browser";
|
|
3557
3621
|
readonly description: "Launch browser in headless mode (disable to show browser UI)";
|
|
3558
3622
|
};
|
|
@@ -3562,7 +3626,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3562
3626
|
readonly default: true;
|
|
3563
3627
|
readonly ui: {
|
|
3564
3628
|
readonly tab: "tools";
|
|
3565
|
-
readonly group: "
|
|
3629
|
+
readonly group: "Grep & Browser";
|
|
3566
3630
|
readonly label: "cmux Browser";
|
|
3567
3631
|
readonly description: "Use cmux WKWebView surfaces for browser automation when a cmux socket is available. Set PI_BROWSER_CMUX=0 or PI_BROWSER_CMUX=1 to override.";
|
|
3568
3632
|
};
|
|
@@ -3572,7 +3636,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3572
3636
|
readonly default: undefined;
|
|
3573
3637
|
readonly ui: {
|
|
3574
3638
|
readonly tab: "tools";
|
|
3575
|
-
readonly group: "
|
|
3639
|
+
readonly group: "Grep & Browser";
|
|
3576
3640
|
readonly label: "Screenshot Directory";
|
|
3577
3641
|
readonly description: "Directory to save screenshots. If unset, screenshots go to a temp file. Supports ~. Examples: ~/Downloads, ~/Desktop, /sdcard/Download (Android)";
|
|
3578
3642
|
};
|
|
@@ -3719,7 +3783,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3719
3783
|
readonly tab: "tools";
|
|
3720
3784
|
readonly group: "Discovery & MCP";
|
|
3721
3785
|
readonly label: "Essential Tools Override";
|
|
3722
|
-
readonly description: "Override the always-loaded built-in tools (default: read, bash, edit, write,
|
|
3786
|
+
readonly description: "Override the always-loaded built-in tools (default: read, bash, edit, write, glob, eval). Leave empty to use defaults.";
|
|
3723
3787
|
};
|
|
3724
3788
|
};
|
|
3725
3789
|
readonly "mcp.enableProjectConfig": {
|
|
@@ -3915,6 +3979,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3915
3979
|
}];
|
|
3916
3980
|
};
|
|
3917
3981
|
};
|
|
3982
|
+
readonly "worktree.base": {
|
|
3983
|
+
readonly type: "string";
|
|
3984
|
+
readonly default: undefined;
|
|
3985
|
+
readonly ui: {
|
|
3986
|
+
readonly tab: "tasks";
|
|
3987
|
+
readonly group: "Isolation";
|
|
3988
|
+
readonly label: "Worktree Base Directory";
|
|
3989
|
+
readonly description: "Base directory for agent-managed worktrees — task-isolation copies, `github` PR checkouts, and `omp worktree` cleanup all live here. Unset uses ~/.omp/wt. Must be an absolute or ~-relative path; relative paths are ignored. The OMP_WORKTREE_DIR env var overrides this.";
|
|
3990
|
+
};
|
|
3991
|
+
};
|
|
3918
3992
|
readonly "task.eager": {
|
|
3919
3993
|
readonly type: "enum";
|
|
3920
3994
|
readonly values: readonly ["default", "preferred", "always"];
|
|
@@ -4275,6 +4349,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4275
4349
|
readonly value: "codex";
|
|
4276
4350
|
readonly label: "OpenAI";
|
|
4277
4351
|
readonly description: "OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)";
|
|
4352
|
+
}, {
|
|
4353
|
+
readonly value: "xai";
|
|
4354
|
+
readonly label: "xAI";
|
|
4355
|
+
readonly description: "Grok web search via xAI Responses API (requires XAI_API_KEY)";
|
|
4278
4356
|
}, {
|
|
4279
4357
|
readonly value: "zai";
|
|
4280
4358
|
readonly label: "Z.AI";
|
|
@@ -4283,6 +4361,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4283
4361
|
readonly value: "exa";
|
|
4284
4362
|
readonly label: "Exa";
|
|
4285
4363
|
readonly description: "Uses Exa API when EXA_API_KEY is set; falls back to Exa MCP";
|
|
4364
|
+
}, {
|
|
4365
|
+
readonly value: "tinyfish";
|
|
4366
|
+
readonly label: "TinyFish";
|
|
4367
|
+
readonly description: "Requires TINYFISH_API_KEY";
|
|
4286
4368
|
}, {
|
|
4287
4369
|
readonly value: "jina";
|
|
4288
4370
|
readonly label: "Jina";
|
|
@@ -4295,6 +4377,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4295
4377
|
readonly value: "tavily";
|
|
4296
4378
|
readonly label: "Tavily";
|
|
4297
4379
|
readonly description: "Requires TAVILY_API_KEY";
|
|
4380
|
+
}, {
|
|
4381
|
+
readonly value: "firecrawl";
|
|
4382
|
+
readonly label: "Firecrawl";
|
|
4383
|
+
readonly description: "Requires FIRECRAWL_API_KEY";
|
|
4298
4384
|
}, {
|
|
4299
4385
|
readonly value: "brave";
|
|
4300
4386
|
readonly label: "Brave";
|
|
@@ -4315,6 +4401,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4315
4401
|
readonly value: "searxng";
|
|
4316
4402
|
readonly label: "SearXNG";
|
|
4317
4403
|
readonly description: "Requires SEARXNG_ENDPOINT or searxng.endpoint";
|
|
4404
|
+
}, {
|
|
4405
|
+
readonly value: "duckduckgo";
|
|
4406
|
+
readonly label: "DuckDuckGo";
|
|
4407
|
+
readonly description: "Uses DuckDuckGo Instant Answer API (no API key)";
|
|
4318
4408
|
}];
|
|
4319
4409
|
};
|
|
4320
4410
|
};
|
|
@@ -5062,6 +5152,30 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
5062
5152
|
readonly values: readonly ["unset", "granted", "denied"];
|
|
5063
5153
|
readonly default: "unset";
|
|
5064
5154
|
};
|
|
5155
|
+
readonly "gc.blobs": {
|
|
5156
|
+
readonly type: "boolean";
|
|
5157
|
+
readonly default: true;
|
|
5158
|
+
};
|
|
5159
|
+
readonly "gc.archive": {
|
|
5160
|
+
readonly type: "boolean";
|
|
5161
|
+
readonly default: true;
|
|
5162
|
+
};
|
|
5163
|
+
readonly "gc.wal": {
|
|
5164
|
+
readonly type: "boolean";
|
|
5165
|
+
readonly default: true;
|
|
5166
|
+
};
|
|
5167
|
+
readonly "gc.coldArchiveAfterDays": {
|
|
5168
|
+
readonly type: "number";
|
|
5169
|
+
readonly default: 30;
|
|
5170
|
+
};
|
|
5171
|
+
readonly "gc.retainNewestGlobal": {
|
|
5172
|
+
readonly type: "number";
|
|
5173
|
+
readonly default: 20;
|
|
5174
|
+
};
|
|
5175
|
+
readonly "gc.retainNewestPerCwd": {
|
|
5176
|
+
readonly type: "number";
|
|
5177
|
+
readonly default: 10;
|
|
5178
|
+
};
|
|
5065
5179
|
readonly "thinkingBudgets.minimal": {
|
|
5066
5180
|
readonly type: "number";
|
|
5067
5181
|
readonly default: 1024;
|
|
@@ -5133,6 +5247,7 @@ export interface CompactionSettings {
|
|
|
5133
5247
|
thresholdTokens: number;
|
|
5134
5248
|
reserveTokens: number;
|
|
5135
5249
|
keepRecentTokens: number;
|
|
5250
|
+
midTurnEnabled: boolean;
|
|
5136
5251
|
handoffSaveToDisk: boolean;
|
|
5137
5252
|
autoContinue: boolean;
|
|
5138
5253
|
remoteEnabled: boolean;
|
|
@@ -5262,6 +5377,14 @@ export interface CodexResetsSettings {
|
|
|
5262
5377
|
minBlockedMinutes: number;
|
|
5263
5378
|
keepCredits: number;
|
|
5264
5379
|
}
|
|
5380
|
+
export interface GcSettings {
|
|
5381
|
+
blobs: boolean;
|
|
5382
|
+
archive: boolean;
|
|
5383
|
+
wal: boolean;
|
|
5384
|
+
coldArchiveAfterDays: number;
|
|
5385
|
+
retainNewestGlobal: number;
|
|
5386
|
+
retainNewestPerCwd: number;
|
|
5387
|
+
}
|
|
5265
5388
|
/** Map group prefix -> typed settings interface */
|
|
5266
5389
|
export interface GroupTypeMap {
|
|
5267
5390
|
compaction: CompactionSettings;
|
|
@@ -5281,6 +5404,7 @@ export interface GroupTypeMap {
|
|
|
5281
5404
|
cycleOrder: string[];
|
|
5282
5405
|
shellMinimizer: ShellMinimizerSettings;
|
|
5283
5406
|
codexResets: CodexResetsSettings;
|
|
5407
|
+
gc: GcSettings;
|
|
5284
5408
|
}
|
|
5285
5409
|
export type GroupPrefix = keyof GroupTypeMap;
|
|
5286
5410
|
export {};
|
|
@@ -28,11 +28,15 @@ export interface SettingsOptions {
|
|
|
28
28
|
agentDir?: string;
|
|
29
29
|
/** Don't persist to disk (for tests) */
|
|
30
30
|
inMemory?: boolean;
|
|
31
|
+
/** Read config sources without opening storage or writing migrations */
|
|
32
|
+
readOnly?: boolean;
|
|
31
33
|
/** Initial overrides */
|
|
32
34
|
overrides?: Partial<Record<SettingPath, unknown>>;
|
|
33
35
|
/** Extra config.yml-style overlays loaded after global/project settings */
|
|
34
36
|
configFiles?: string[];
|
|
35
37
|
}
|
|
38
|
+
export declare function normalizeProviderMaxInFlightRequests(value: unknown): Record<string, number>;
|
|
39
|
+
export declare function validateProviderMaxInFlightRequests(value: unknown): Record<string, number>;
|
|
36
40
|
export declare class Settings {
|
|
37
41
|
#private;
|
|
38
42
|
private constructor();
|
|
@@ -41,6 +45,15 @@ export declare class Settings {
|
|
|
41
45
|
* Call once at startup before accessing `settings`.
|
|
42
46
|
*/
|
|
43
47
|
static init(options?: SettingsOptions): Promise<Settings>;
|
|
48
|
+
/**
|
|
49
|
+
* Load effective settings from config.yml and project providers without
|
|
50
|
+
* opening agent.db, migrating legacy settings, or writing marker files.
|
|
51
|
+
*/
|
|
52
|
+
static loadReadOnly(options?: SettingsOptions): Promise<Settings>;
|
|
53
|
+
/**
|
|
54
|
+
* Load a persisted settings instance without touching the global singleton.
|
|
55
|
+
*/
|
|
56
|
+
static loadIsolated(options?: SettingsOptions): Promise<Settings>;
|
|
44
57
|
/**
|
|
45
58
|
* Create an isolated instance for testing.
|
|
46
59
|
* Does not affect the global singleton.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DapAdapterConfig, DapResolvedAdapter } from "./types";
|
|
2
|
-
export declare function getAdapterConfigs(): Record<string, DapAdapterConfig>;
|
|
2
|
+
export declare function getAdapterConfigs(cwd?: string): Record<string, DapAdapterConfig>;
|
|
3
3
|
export declare function resolveAdapter(adapterName: string, cwd: string): DapResolvedAdapter | null;
|
|
4
4
|
export declare function getAvailableAdapters(cwd: string): DapResolvedAdapter[];
|
|
5
5
|
export declare function selectLaunchAdapter(program: string, cwd: string, adapterName?: string, programKind?: LaunchProgramKind): DapResolvedAdapter | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filesystem, type WriteResult } from "@oh-my-pi/hashline";
|
|
1
|
+
import { Filesystem, type PreflightWriteOptions, type WriteResult } from "@oh-my-pi/hashline";
|
|
2
2
|
import type { FileDiagnosticsResult, WritethroughCallback, WritethroughDeferredHandle } from "../../lsp";
|
|
3
3
|
import type { ToolSession } from "../../tools";
|
|
4
4
|
import type { LspBatchRequest } from "../renderer";
|
|
@@ -34,7 +34,9 @@ export declare class HashlineFilesystem extends Filesystem {
|
|
|
34
34
|
canonicalPath(relativePath: string): string;
|
|
35
35
|
allowTagPathRecovery(authoredPath: string, resolvedPath: string): boolean;
|
|
36
36
|
readText(relativePath: string): Promise<string>;
|
|
37
|
-
preflightWrite(relativePath: string): Promise<void>;
|
|
37
|
+
preflightWrite(relativePath: string, options?: PreflightWriteOptions): Promise<void>;
|
|
38
|
+
delete(relativePath: string): Promise<void>;
|
|
39
|
+
move(fromRelative: string, toRelative: string, content?: string): Promise<void>;
|
|
38
40
|
writeText(relativePath: string, content: string): Promise<WriteResult>;
|
|
39
41
|
exists(relativePath: string): Promise<boolean>;
|
|
40
42
|
}
|
|
@@ -29,6 +29,8 @@ export interface EditToolPerFileResult {
|
|
|
29
29
|
oldText?: string;
|
|
30
30
|
/** Source-of-truth content after the edit; `undefined` for delete operations. */
|
|
31
31
|
newText?: string;
|
|
32
|
+
/** Pre-move source path; set only when the edit moved/renamed the file. The header renders `sourcePath → path`. */
|
|
33
|
+
sourcePath?: string;
|
|
32
34
|
}
|
|
33
35
|
export interface EditToolDetails {
|
|
34
36
|
/** Unified diff of the changes made */
|
|
@@ -51,6 +53,8 @@ export interface EditToolDetails {
|
|
|
51
53
|
oldText?: string;
|
|
52
54
|
/** Source-of-truth content after the edit; `undefined` for delete operations. */
|
|
53
55
|
newText?: string;
|
|
56
|
+
/** Pre-move source path; set only when the edit moved/renamed the file. The header renders `sourcePath → path`. */
|
|
57
|
+
sourcePath?: string;
|
|
54
58
|
}
|
|
55
59
|
interface EditRenderArgs {
|
|
56
60
|
path?: string;
|
|
@@ -28,7 +28,7 @@ import type { Theme } from "../../modes/theme/theme";
|
|
|
28
28
|
import type { CompactMode } from "../../session/compact-modes";
|
|
29
29
|
import type { CustomMessage } from "../../session/messages";
|
|
30
30
|
import type { ReadonlySessionManager, SessionManager } from "../../session/session-manager";
|
|
31
|
-
import type { BashToolDetails, BashToolInput,
|
|
31
|
+
import type { BashToolDetails, BashToolInput, GlobToolDetails, GlobToolInput, GrepToolDetails, GrepToolInput, ReadToolDetails, ReadToolInput, WriteToolInput } from "../../tools";
|
|
32
32
|
import type { ApprovalMode } from "../../tools/approval";
|
|
33
33
|
import type { EventBus } from "../../utils/event-bus";
|
|
34
34
|
import type { AgentEndEvent, AgentStartEvent, AutoCompactionEndEvent, AutoCompactionStartEvent, AutoRetryEndEvent, AutoRetryStartEvent, ContextEvent, GoalUpdatedEvent, SessionBeforeBranchEvent, SessionBeforeBranchResult, SessionBeforeCompactEvent, SessionBeforeCompactResult, SessionBeforeSwitchEvent, SessionBeforeSwitchResult, SessionBeforeTreeEvent, SessionBeforeTreeResult, SessionBranchEvent, SessionCompactEvent, SessionCompactingEvent, SessionCompactingResult, SessionEvent, SessionShutdownEvent, SessionStartEvent, SessionStopEvent, SessionStopEventResult, SessionSwitchEvent, SessionTreeEvent, TodoReminderEvent, ToolCallEventResult, ToolResultEventResult, TtsrTriggeredEvent, TurnEndEvent, TurnStartEvent } from "../shared-events";
|
|
@@ -468,20 +468,20 @@ export interface WriteToolCallEvent extends ToolCallEventBase {
|
|
|
468
468
|
toolName: "write";
|
|
469
469
|
input: WriteToolInput;
|
|
470
470
|
}
|
|
471
|
-
export interface
|
|
472
|
-
toolName: "
|
|
473
|
-
input:
|
|
471
|
+
export interface GrepToolCallEvent extends ToolCallEventBase {
|
|
472
|
+
toolName: "grep";
|
|
473
|
+
input: GrepToolInput;
|
|
474
474
|
}
|
|
475
|
-
export interface
|
|
476
|
-
toolName: "
|
|
477
|
-
input:
|
|
475
|
+
export interface GlobToolCallEvent extends ToolCallEventBase {
|
|
476
|
+
toolName: "glob";
|
|
477
|
+
input: GlobToolInput;
|
|
478
478
|
}
|
|
479
479
|
export interface CustomToolCallEvent extends ToolCallEventBase {
|
|
480
480
|
toolName: string;
|
|
481
481
|
input: Record<string, unknown>;
|
|
482
482
|
}
|
|
483
483
|
/** Fired before a tool executes. Can block. */
|
|
484
|
-
export type ToolCallEvent = BashToolCallEvent | ReadToolCallEvent | EditToolCallEvent | WriteToolCallEvent |
|
|
484
|
+
export type ToolCallEvent = BashToolCallEvent | ReadToolCallEvent | EditToolCallEvent | WriteToolCallEvent | GrepToolCallEvent | GlobToolCallEvent | CustomToolCallEvent;
|
|
485
485
|
interface ToolResultEventBase {
|
|
486
486
|
type: "tool_result";
|
|
487
487
|
toolCallId: string;
|
|
@@ -505,20 +505,20 @@ export interface WriteToolResultEvent extends ToolResultEventBase {
|
|
|
505
505
|
toolName: "write";
|
|
506
506
|
details: undefined;
|
|
507
507
|
}
|
|
508
|
-
export interface
|
|
509
|
-
toolName: "
|
|
510
|
-
details:
|
|
508
|
+
export interface GrepToolResultEvent extends ToolResultEventBase {
|
|
509
|
+
toolName: "grep";
|
|
510
|
+
details: GrepToolDetails | undefined;
|
|
511
511
|
}
|
|
512
|
-
export interface
|
|
513
|
-
toolName: "
|
|
514
|
-
details:
|
|
512
|
+
export interface GlobToolResultEvent extends ToolResultEventBase {
|
|
513
|
+
toolName: "glob";
|
|
514
|
+
details: GlobToolDetails | undefined;
|
|
515
515
|
}
|
|
516
516
|
export interface CustomToolResultEvent extends ToolResultEventBase {
|
|
517
517
|
toolName: string;
|
|
518
518
|
details: unknown;
|
|
519
519
|
}
|
|
520
520
|
/** Fired after a tool executes. Can modify result. */
|
|
521
|
-
export type ToolResultEvent = BashToolResultEvent | ReadToolResultEvent | EditToolResultEvent | WriteToolResultEvent |
|
|
521
|
+
export type ToolResultEvent = BashToolResultEvent | ReadToolResultEvent | EditToolResultEvent | WriteToolResultEvent | GrepToolResultEvent | GlobToolResultEvent | CustomToolResultEvent;
|
|
522
522
|
/**
|
|
523
523
|
* Type guard for narrowing ToolCallEvent by tool name.
|
|
524
524
|
*
|
|
@@ -543,8 +543,8 @@ export declare function isToolCallEventType(toolName: "bash", event: ToolCallEve
|
|
|
543
543
|
export declare function isToolCallEventType(toolName: "read", event: ToolCallEvent): event is ReadToolCallEvent;
|
|
544
544
|
export declare function isToolCallEventType(toolName: "edit", event: ToolCallEvent): event is EditToolCallEvent;
|
|
545
545
|
export declare function isToolCallEventType(toolName: "write", event: ToolCallEvent): event is WriteToolCallEvent;
|
|
546
|
-
export declare function isToolCallEventType(toolName: "
|
|
547
|
-
export declare function isToolCallEventType(toolName: "
|
|
546
|
+
export declare function isToolCallEventType(toolName: "grep", event: ToolCallEvent): event is GrepToolCallEvent;
|
|
547
|
+
export declare function isToolCallEventType(toolName: "glob", event: ToolCallEvent): event is GlobToolCallEvent;
|
|
548
548
|
export declare function isToolCallEventType<TName extends string, TInput extends Record<string, unknown>>(toolName: TName, event: ToolCallEvent): event is ToolCallEvent & {
|
|
549
549
|
toolName: TName;
|
|
550
550
|
input: TInput;
|
|
@@ -10,7 +10,7 @@ import type * as PiCodingAgent from "../../index";
|
|
|
10
10
|
import type { Theme } from "../../modes/theme/theme";
|
|
11
11
|
import type { HookMessage } from "../../session/messages";
|
|
12
12
|
import type { ReadonlySessionManager, SessionManager } from "../../session/session-manager";
|
|
13
|
-
import type { BashToolDetails,
|
|
13
|
+
import type { BashToolDetails, GlobToolDetails, GrepToolDetails, ReadToolDetails } from "../../tools";
|
|
14
14
|
import type { AgentEndEvent, AgentStartEvent, AutoCompactionEndEvent, AutoCompactionStartEvent, AutoRetryEndEvent, AutoRetryStartEvent, ContextEvent, SessionBeforeBranchEvent, SessionBeforeBranchResult, SessionBeforeCompactEvent, SessionBeforeCompactResult, SessionBeforeSwitchEvent, SessionBeforeSwitchResult, SessionBeforeTreeEvent, SessionBeforeTreeResult, SessionBranchEvent, SessionCompactEvent, SessionCompactingEvent, SessionCompactingResult, SessionEvent, SessionShutdownEvent, SessionStartEvent, SessionSwitchEvent, SessionTreeEvent, TodoReminderEvent, ToolCallEventResult, ToolResultEventResult, TtsrTriggeredEvent, TurnEndEvent, TurnStartEvent } from "../shared-events";
|
|
15
15
|
import type * as TypeBox from "../typebox";
|
|
16
16
|
export type { ExecOptions, ExecResult } from "../../exec/exec";
|
|
@@ -254,15 +254,15 @@ export interface WriteToolResultEvent extends ToolResultEventBase {
|
|
|
254
254
|
toolName: "write";
|
|
255
255
|
details: undefined;
|
|
256
256
|
}
|
|
257
|
-
/** Tool result event for
|
|
258
|
-
export interface
|
|
259
|
-
toolName: "
|
|
260
|
-
details:
|
|
257
|
+
/** Tool result event for grep tool */
|
|
258
|
+
export interface GrepToolResultEvent extends ToolResultEventBase {
|
|
259
|
+
toolName: "grep";
|
|
260
|
+
details: GrepToolDetails | undefined;
|
|
261
261
|
}
|
|
262
|
-
/** Tool result event for
|
|
263
|
-
export interface
|
|
264
|
-
toolName: "
|
|
265
|
-
details:
|
|
262
|
+
/** Tool result event for glob tool */
|
|
263
|
+
export interface GlobToolResultEvent extends ToolResultEventBase {
|
|
264
|
+
toolName: "glob";
|
|
265
|
+
details: GlobToolDetails | undefined;
|
|
266
266
|
}
|
|
267
267
|
/** Tool result event for custom/unknown tools */
|
|
268
268
|
export interface CustomToolResultEvent extends ToolResultEventBase {
|
|
@@ -274,7 +274,7 @@ export interface CustomToolResultEvent extends ToolResultEventBase {
|
|
|
274
274
|
* Fired after a tool is executed. Hooks can modify the result.
|
|
275
275
|
* Use toolName to discriminate and get typed details.
|
|
276
276
|
*/
|
|
277
|
-
export type ToolResultEvent = BashToolResultEvent | ReadToolResultEvent | EditToolResultEvent | WriteToolResultEvent |
|
|
277
|
+
export type ToolResultEvent = BashToolResultEvent | ReadToolResultEvent | EditToolResultEvent | WriteToolResultEvent | GrepToolResultEvent | GlobToolResultEvent | CustomToolResultEvent;
|
|
278
278
|
/**
|
|
279
279
|
* Union of all hook event types.
|
|
280
280
|
*/
|
|
@@ -55,6 +55,7 @@ export interface MarketplacePluginEntry {
|
|
|
55
55
|
hooks?: string | Record<string, unknown>;
|
|
56
56
|
mcpServers?: string | Record<string, unknown>;
|
|
57
57
|
lspServers?: string | Record<string, unknown>;
|
|
58
|
+
dapAdapters?: string | Record<string, unknown>;
|
|
58
59
|
}
|
|
59
60
|
export type PluginSource = string | PluginSourceGitHub | PluginSourceUrl | PluginSourceGitSubdir | PluginSourceNpm;
|
|
60
61
|
export interface PluginSourceGitHub {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -16,6 +16,6 @@ export declare class InternalUrlRouter {
|
|
|
16
16
|
* Candidate completions for the host/path portion of `scheme://<query>`.
|
|
17
17
|
* Returns `null` when the scheme is unknown or does not support completion.
|
|
18
18
|
*/
|
|
19
|
-
complete(scheme: string, query: string): Promise<UrlCompletion[] | null>;
|
|
19
|
+
complete(scheme: string, query: string, context?: ResolveContext): Promise<UrlCompletion[] | null>;
|
|
20
20
|
resolve(input: string, context?: ResolveContext): Promise<InternalResource>;
|
|
21
21
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InternalResource, InternalUrl, ProtocolHandler, ResolveContext, UrlCompletion, WriteContext } from "./types";
|
|
2
|
+
export declare class SshProtocolHandler implements ProtocolHandler {
|
|
3
|
+
#private;
|
|
4
|
+
readonly scheme = "ssh";
|
|
5
|
+
readonly immutable = false;
|
|
6
|
+
resolve(url: InternalUrl, context?: ResolveContext): Promise<InternalResource>;
|
|
7
|
+
/** Autocomplete the host segment of `ssh://` with the configured SSH hosts. */
|
|
8
|
+
complete(_query?: string, context?: ResolveContext): Promise<UrlCompletion[]>;
|
|
9
|
+
write(url: InternalUrl, content: string, context?: WriteContext): Promise<void>;
|
|
10
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types for the internal URL routing system.
|
|
3
3
|
*
|
|
4
|
-
* Internal URLs (`agent://`, `artifact://`, `history://`, `issue://`, `local://`, `mcp://`, `memory://`, `omp://`, `pr://`, `rule://`, `skill://`, and `vault://`) are resolved by tools like read,
|
|
4
|
+
* Internal URLs (`agent://`, `artifact://`, `history://`, `issue://`, `local://`, `mcp://`, `memory://`, `omp://`, `pr://`, `rule://`, `skill://`, `ssh://`, and `vault://`) are resolved by tools like read,
|
|
5
5
|
* providing access to agent outputs and server resources without exposing filesystem paths.
|
|
6
6
|
*/
|
|
7
7
|
import type { Skill } from "../extensibility/skills";
|
|
@@ -31,6 +31,13 @@ export interface InternalResource {
|
|
|
31
31
|
* resources. Mutable resources (e.g. local://) behave like editable files.
|
|
32
32
|
*/
|
|
33
33
|
immutable?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* True when the resource is a directory listing rather than file content.
|
|
36
|
+
* `search` refuses to grep such a resource when it has no `sourcePath` — a
|
|
37
|
+
* remote `ssh://` listing has no local path to recurse, so its listing text
|
|
38
|
+
* must never be mistaken for the directory's contents.
|
|
39
|
+
*/
|
|
40
|
+
isDirectory?: boolean;
|
|
34
41
|
}
|
|
35
42
|
/**
|
|
36
43
|
* A single autocomplete candidate for the host/path portion of a `scheme://`
|
|
@@ -88,6 +95,13 @@ export interface ResolveContext {
|
|
|
88
95
|
localProtocolOptions?: LocalProtocolOptions;
|
|
89
96
|
/** Calling session's loaded skills. Prefer this over process-global skill state. */
|
|
90
97
|
skills?: readonly Skill[];
|
|
98
|
+
/**
|
|
99
|
+
* When set, handlers that would otherwise materialize an expensive directory
|
|
100
|
+
* listing (e.g. the ssh:// handler draining a full remote `ls`) instead return
|
|
101
|
+
* the directory shape (`isDirectory: true`) with empty content. `search`/`find`
|
|
102
|
+
* reject directory resources, so they never need the listing.
|
|
103
|
+
*/
|
|
104
|
+
skipDirectoryListing?: boolean;
|
|
91
105
|
}
|
|
92
106
|
/**
|
|
93
107
|
* Caller context for write operations dispatched to host-owned URI handlers.
|
|
@@ -143,6 +157,9 @@ export interface ProtocolHandler {
|
|
|
143
157
|
* mcp://) omit it. The caller fuzzy-filters the returned set against the
|
|
144
158
|
* partially typed `query`, so handlers return their full (bounded) candidate
|
|
145
159
|
* list; `query` is provided only so handlers can scope expensive enumeration.
|
|
160
|
+
* `context.cwd`/`context.localProtocolOptions` carry the caller's working dir
|
|
161
|
+
* and session, for handlers whose candidates are project- or session-scoped
|
|
162
|
+
* (e.g. ssh:// hosts from a project `ssh.json`, local:// roots per session).
|
|
146
163
|
*/
|
|
147
|
-
complete?(query
|
|
164
|
+
complete?(query?: string, context?: ResolveContext): Promise<UrlCompletion[]>;
|
|
148
165
|
}
|
package/dist/types/irc/bus.d.ts
CHANGED
|
@@ -55,9 +55,15 @@ export declare class IrcBus {
|
|
|
55
55
|
* disabled — e.g. blocked in a synchronous task spawn awaiting the
|
|
56
56
|
* sender's own batch) can generate an ephemeral side-channel auto-reply
|
|
57
57
|
* instead of stranding the sender until timeout.
|
|
58
|
+
*
|
|
59
|
+
* `opts.suppressRelay` skips the display-only main-UI relay for this leg.
|
|
60
|
+
* Set by broadcast fan-out when the same broadcast also targets the main
|
|
61
|
+
* agent directly: the main agent then already sees the body as its own
|
|
62
|
+
* incoming card, so relaying the sibling legs would duplicate it.
|
|
58
63
|
*/
|
|
59
64
|
send(msg: Omit<IrcMessage, "id" | "ts">, opts?: {
|
|
60
65
|
expectsReply?: boolean;
|
|
66
|
+
suppressRelay?: boolean;
|
|
61
67
|
}): Promise<IrcDeliveryReceipt>;
|
|
62
68
|
/**
|
|
63
69
|
* Block until a message for `agentId` (optionally from `filter.from`)
|