@oh-my-pi/pi-coding-agent 16.1.23 → 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 +70 -0
- package/dist/cli.js +3817 -3735
- 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/collab/display-name.d.ts +3 -0
- package/dist/types/collab/host.d.ts +0 -2
- 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 +91 -21
- package/dist/types/config/settings.d.ts +2 -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/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/theme.d.ts +1 -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-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 +3 -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/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/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/usage-cli.ts +20 -1
- package/src/cli/web-search-cli.ts +1 -1
- 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/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 +85 -27
- package/src/config/settings.ts +172 -1
- 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 +38 -2
- 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/agent-bridge.ts +26 -3
- 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 +8 -3
- package/src/extensibility/plugins/legacy-pi-bundled-registry.ts +25 -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/mcp/tool-bridge.ts +32 -2
- 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 +68 -2
- package/src/modes/controllers/selector-controller.ts +5 -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 +116 -50
- 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/theme.ts +9 -1
- 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 +3 -3
- package/src/prompts/system/project-prompt.md +2 -2
- package/src/prompts/system/system-prompt.md +6 -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 +55 -25
- package/src/session/agent-session.ts +508 -132
- package/src/session/session-history-format.ts +2 -2
- package/src/session/session-manager.ts +46 -0
- package/src/slash-commands/builtin-registry.ts +138 -20
- 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 +56 -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/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/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/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/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
|
@@ -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`)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -28,6 +28,13 @@ export declare const SPACE_HOLD_RELEASE_MS = 250;
|
|
|
28
28
|
export declare function extractPastePathsFromText(text: string): string[] | undefined;
|
|
29
29
|
export declare function extractBracketedPastePaths(data: string): string[] | undefined;
|
|
30
30
|
export declare function extractBracketedImagePastePaths(data: string): string[] | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Same shape as {@link extractBracketedImagePastePaths} but operates on a
|
|
33
|
+
* payload that has already been stripped of the `\x1b[200~` / `\x1b[201~`
|
|
34
|
+
* markers — used by the assembled-paste router in {@link CustomEditor.handleInput}
|
|
35
|
+
* so split bracketed pastes get the same image-path detection as single-chunk ones.
|
|
36
|
+
*/
|
|
37
|
+
export declare function extractImagePastePathsFromText(text: string): string[] | undefined;
|
|
31
38
|
export declare function extractBracketedImagePastePath(data: string): string | undefined;
|
|
32
39
|
/**
|
|
33
40
|
* Return a single image file path when `text` is exactly one explicit path
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type Component, type Focusable } from "@oh-my-pi/pi-tui";
|
|
2
|
+
export interface MoveOverlayResult {
|
|
3
|
+
directory: string;
|
|
4
|
+
}
|
|
5
|
+
/** Resolve a user-typed path (`~`, absolute, or relative to `cwd`) to an absolute path. */
|
|
6
|
+
export declare function resolveMovePath(input: string, cwd: string): string;
|
|
7
|
+
/** If `input` resolves to an existing directory, return it; otherwise `null`. */
|
|
8
|
+
export declare function resolveExistingDirectory(input: string, cwd: string): string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Overlay component for `/move`: a single-line path input with a live-filtered
|
|
11
|
+
* list of matching directories. Tab accepts the highlighted suggestion; Enter
|
|
12
|
+
* confirms the current input (or the highlighted suggestion if the input is
|
|
13
|
+
* empty); Escape cancels.
|
|
14
|
+
*/
|
|
15
|
+
export declare class MoveOverlay implements Component, Focusable {
|
|
16
|
+
#private;
|
|
17
|
+
constructor(cwd: string, done: (result: MoveOverlayResult | undefined) => void);
|
|
18
|
+
get focused(): boolean;
|
|
19
|
+
set focused(value: boolean);
|
|
20
|
+
handleInput(data: string): void;
|
|
21
|
+
render(_width: number): readonly string[];
|
|
22
|
+
invalidate(): void;
|
|
23
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Shows available plugins from all configured marketplaces in a SelectList.
|
|
5
5
|
* Selecting a plugin triggers installation. Esc cancels.
|
|
6
6
|
*/
|
|
7
|
-
import { Container, SelectList } from "@oh-my-pi/pi-tui";
|
|
7
|
+
import { Container, SelectList, type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
8
8
|
export interface PluginSelectorCallbacks {
|
|
9
9
|
onSelect: (pluginName: string, marketplace: string, scope?: "user" | "project") => void;
|
|
10
10
|
onCancel: () => void;
|
|
@@ -23,4 +23,5 @@ export declare class PluginSelectorComponent extends Container {
|
|
|
23
23
|
#private;
|
|
24
24
|
constructor(marketplaceCount: number, plugins: PluginItem[], installedIds: Set<string>, callbacks: PluginSelectorCallbacks);
|
|
25
25
|
getSelectList(): SelectList;
|
|
26
|
+
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
26
27
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, SelectList } from "@oh-my-pi/pi-tui";
|
|
1
|
+
import { Container, SelectList, type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
2
2
|
/**
|
|
3
3
|
* Component that renders a queue mode selector with borders
|
|
4
4
|
*/
|
|
@@ -6,4 +6,5 @@ export declare class QueueModeSelectorComponent extends Container {
|
|
|
6
6
|
#private;
|
|
7
7
|
constructor(currentMode: "all" | "one-at-a-time", onSelect: (mode: "all" | "one-at-a-time") => void, onCancel: () => void);
|
|
8
8
|
getSelectList(): SelectList;
|
|
9
|
+
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
9
10
|
}
|
|
@@ -41,7 +41,10 @@ export interface SubmenuSettingDef extends BaseSettingDef {
|
|
|
41
41
|
export interface TextInputSettingDef extends BaseSettingDef {
|
|
42
42
|
type: "text";
|
|
43
43
|
}
|
|
44
|
-
export
|
|
44
|
+
export interface ProviderLimitsSettingDef extends BaseSettingDef {
|
|
45
|
+
type: "providerLimits";
|
|
46
|
+
}
|
|
47
|
+
export type SettingDef = BooleanSettingDef | EnumSettingDef | SubmenuSettingDef | TextInputSettingDef | ProviderLimitsSettingDef;
|
|
45
48
|
/** Get all setting definitions with UI */
|
|
46
49
|
export declare function getAllSettingDefs(): SettingDef[];
|
|
47
50
|
/**
|
|
@@ -15,6 +15,8 @@ export interface SettingsRuntimeContext {
|
|
|
15
15
|
thinkingLevel: ThinkingLevel | undefined;
|
|
16
16
|
/** Available themes */
|
|
17
17
|
availableThemes: string[];
|
|
18
|
+
/** Provider/source ids shown in /model. */
|
|
19
|
+
providers: string[];
|
|
18
20
|
/** Working directory for plugins tab */
|
|
19
21
|
cwd: string;
|
|
20
22
|
/** Active model (api + id); resolves what the snapcompact `auto` shape maps to. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, SelectList } from "@oh-my-pi/pi-tui";
|
|
1
|
+
import { Container, SelectList, type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
2
2
|
/**
|
|
3
3
|
* Component that renders a show images selector with borders
|
|
4
4
|
*/
|
|
@@ -6,4 +6,5 @@ export declare class ShowImagesSelectorComponent extends Container {
|
|
|
6
6
|
#private;
|
|
7
7
|
constructor(currentValue: boolean, onSelect: (show: boolean) => void, onCancel: () => void);
|
|
8
8
|
getSelectList(): SelectList;
|
|
9
|
+
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
9
10
|
}
|
|
@@ -14,6 +14,8 @@ export declare class StatusLineComponent implements Component {
|
|
|
14
14
|
getEffectiveSettingsForTest(): EffectiveStatusLineSettings;
|
|
15
15
|
setAutoCompactEnabled(enabled: boolean): void;
|
|
16
16
|
setSubagentCount(count: number): void;
|
|
17
|
+
/** Hub key label shown in the forced running-subagents badge. */
|
|
18
|
+
setSubagentHubHint(hint: string | undefined): void;
|
|
17
19
|
/** Active subagent count as currently displayed (collab state mirroring). */
|
|
18
20
|
get subagentCount(): number;
|
|
19
21
|
setSessionStartTime(time: number): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CollabSessionState } from "../../../collab/protocol";
|
|
2
2
|
import type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle } from "../../../config/settings-schema";
|
|
3
3
|
import type { AgentSession } from "../../../session/agent-session";
|
|
4
|
+
import type { ActiveRepoContext } from "../../../utils/active-repo-context";
|
|
4
5
|
export type { StatusLinePreset, StatusLineSegmentId, StatusLineSeparatorStyle };
|
|
5
6
|
/** Collab session indicator + (guest-only) host-state override for segments. */
|
|
6
7
|
export interface CollabStatus {
|
|
@@ -47,6 +48,7 @@ export interface SegmentContext {
|
|
|
47
48
|
session: AgentSession;
|
|
48
49
|
/** Focused subagent id while the view is proxied at its session, undefined otherwise. */
|
|
49
50
|
focusedAgentId?: string | undefined;
|
|
51
|
+
activeRepo: ActiveRepoContext | null;
|
|
50
52
|
width: number;
|
|
51
53
|
options: StatusLineSegmentOptions;
|
|
52
54
|
planMode: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Container, SelectList } from "@oh-my-pi/pi-tui";
|
|
1
|
+
import { Container, SelectList, type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
2
2
|
/**
|
|
3
3
|
* Component that renders a theme selector.
|
|
4
4
|
* Themes must be pre-loaded and passed to the constructor.
|
|
@@ -7,4 +7,5 @@ export declare class ThemeSelectorComponent extends Container {
|
|
|
7
7
|
#private;
|
|
8
8
|
constructor(currentTheme: string, themes: string[], onSelect: (themeName: string) => void, onCancel: () => void, onPreview: (themeName: string) => void);
|
|
9
9
|
getSelectList(): SelectList;
|
|
10
|
+
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
10
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Effort } from "@oh-my-pi/pi-ai";
|
|
2
|
-
import { Container, SelectList } from "@oh-my-pi/pi-tui";
|
|
2
|
+
import { Container, SelectList, type SgrMouseEvent } from "@oh-my-pi/pi-tui";
|
|
3
3
|
/**
|
|
4
4
|
* Component that renders a thinking level selector with borders
|
|
5
5
|
*/
|
|
@@ -7,4 +7,5 @@ export declare class ThinkingSelectorComponent extends Container {
|
|
|
7
7
|
#private;
|
|
8
8
|
constructor(currentLevel: Effort, availableLevels: Effort[], onSelect: (level: Effort) => void, onCancel: () => void);
|
|
9
9
|
getSelectList(): SelectList;
|
|
10
|
+
routeMouse(event: SgrMouseEvent, line: number, col: number): void;
|
|
10
11
|
}
|
|
@@ -29,7 +29,16 @@ export declare class CommandController {
|
|
|
29
29
|
handleFreshCommand(): Promise<void>;
|
|
30
30
|
handleDropCommand(): Promise<void>;
|
|
31
31
|
handleForkCommand(): Promise<void>;
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* `/move` — switch to a fresh empty session in a different directory.
|
|
34
|
+
*
|
|
35
|
+
* With no `targetPath` (TUI only), opens an autocomplete overlay so the user
|
|
36
|
+
* can pick or type a directory. With a `targetPath`, resolves it directly.
|
|
37
|
+
* If the target directory does not exist, the user is asked whether to create
|
|
38
|
+
* it. A brand-new empty session is then started in the target directory and
|
|
39
|
+
* the current session is left behind (resumable via `/resume`).
|
|
40
|
+
*/
|
|
41
|
+
handleMoveCommand(targetPath?: string): Promise<void>;
|
|
33
42
|
handleRenameCommand(title: string): Promise<void>;
|
|
34
43
|
handleBashCommand(command: string, excludeFromContext?: boolean): Promise<void>;
|
|
35
44
|
handlePythonCommand(code: string, excludeFromContext?: boolean): Promise<void>;
|
|
@@ -19,5 +19,11 @@ export declare class StreamingRevealController {
|
|
|
19
19
|
begin(component: StreamingRevealComponent, message: AssistantMessage): void;
|
|
20
20
|
setTarget(message: AssistantMessage): void;
|
|
21
21
|
stop(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Re-read cached visibility flags (hideThinkingBlock, proseOnlyThinking)
|
|
24
|
+
* and re-render the current target. Called when the thinking level changes
|
|
25
|
+
* mid-stream so the reveal controller doesn't keep rendering with stale values.
|
|
26
|
+
*/
|
|
27
|
+
resyncVisibility(): void;
|
|
22
28
|
}
|
|
23
29
|
export {};
|
|
@@ -109,6 +109,13 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
109
109
|
loopLimit: LoopLimitRuntime | undefined;
|
|
110
110
|
todoPhases: TodoPhase[];
|
|
111
111
|
hideThinkingBlock: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Effective thinking-block visibility: hidden when the user's setting is on
|
|
114
|
+
* OR the session thinking level is "off". Some providers (MiniMax, GLM,
|
|
115
|
+
* DeepSeek) return thinking blocks even with reasoning disabled; this
|
|
116
|
+
* respects the user's intent when they set thinking to "off" (#626).
|
|
117
|
+
*/
|
|
118
|
+
get effectiveHideThinkingBlock(): boolean;
|
|
112
119
|
proseOnlyThinking: boolean;
|
|
113
120
|
compactionQueuedMessages: CompactionQueuedMessage[];
|
|
114
121
|
pendingTools: Map<string, ToolExecutionHandle>;
|
|
@@ -198,6 +205,8 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
198
205
|
markPendingSubmissionStarted(input: SubmittedUserInput): boolean;
|
|
199
206
|
finishPendingSubmission(input: SubmittedUserInput): void;
|
|
200
207
|
updateEditorBorderColor(): void;
|
|
208
|
+
/** Refresh the running-subagents status badge from the active local or collab registry. */
|
|
209
|
+
syncRunningSubagentBadge(): void;
|
|
201
210
|
updateEditorTopBorder(): void;
|
|
202
211
|
rebuildChatFromMessages(): void;
|
|
203
212
|
/**
|
|
@@ -291,7 +300,7 @@ export declare class InteractiveMode implements InteractiveModeContext {
|
|
|
291
300
|
handleFreshCommand(): Promise<void>;
|
|
292
301
|
handleDropCommand(): Promise<void>;
|
|
293
302
|
handleForkCommand(): Promise<void>;
|
|
294
|
-
handleMoveCommand(targetPath
|
|
303
|
+
handleMoveCommand(targetPath?: string): Promise<void>;
|
|
295
304
|
handleRenameCommand(title: string): Promise<void>;
|
|
296
305
|
handleMemoryCommand(text: string): Promise<void>;
|
|
297
306
|
handleSTTToggle(): Promise<void>;
|
|
@@ -25,7 +25,7 @@ export declare function extractInternalUrlContext(textBeforeCursor: string): Int
|
|
|
25
25
|
* Suggestions for the internal-url token ending at the cursor, or `null` when
|
|
26
26
|
* the text is not such a token or no candidate matches the typed query.
|
|
27
27
|
*/
|
|
28
|
-
export declare function getInternalUrlSuggestions(textBeforeCursor: string): Promise<{
|
|
28
|
+
export declare function getInternalUrlSuggestions(textBeforeCursor: string, cwd?: string): Promise<{
|
|
29
29
|
items: AutocompleteItem[];
|
|
30
30
|
prefix: string;
|
|
31
31
|
} | null>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AgentRegistry } from "../registry/agent-registry";
|
|
2
|
+
export interface RunningSubagentRegistrySource {
|
|
3
|
+
agentRegistry: AgentRegistry;
|
|
4
|
+
}
|
|
5
|
+
export declare function getRunningSubagentBadgeRegistry(collabGuest: RunningSubagentRegistrySource | undefined): AgentRegistry;
|
|
6
|
+
export declare function countRunningSubagentBadgeAgents(registry: AgentRegistry): number;
|
|
@@ -6,7 +6,7 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
|
|
|
6
6
|
/**
|
|
7
7
|
* All available symbol keys organized by category.
|
|
8
8
|
*/
|
|
9
|
-
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.time" | "icon.pi" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.inspectImage" | "tool.goal" | "tool.irc";
|
|
9
|
+
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.time" | "icon.pi" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.inspectImage" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move";
|
|
10
10
|
export type SpinnerType = "status" | "activity";
|
|
11
11
|
export type ThemeColor = "accent" | "border" | "borderAccent" | "borderMuted" | "success" | "error" | "warning" | "muted" | "dim" | "text" | "thinkingText" | "userMessageText" | "customMessageText" | "customMessageLabel" | "toolTitle" | "toolOutput" | "mdHeading" | "mdLink" | "mdLinkUrl" | "mdCode" | "mdCodeBlock" | "mdCodeBlockBorder" | "mdQuote" | "mdQuoteBorder" | "mdHr" | "mdListBullet" | "toolDiffAdded" | "toolDiffRemoved" | "toolDiffContext" | "syntaxComment" | "syntaxKeyword" | "syntaxFunction" | "syntaxVariable" | "syntaxString" | "syntaxNumber" | "syntaxType" | "syntaxOperator" | "syntaxPunctuation" | "thinkingOff" | "thinkingMinimal" | "thinkingLow" | "thinkingMedium" | "thinkingHigh" | "thinkingXhigh" | "bashMode" | "pythonMode" | "statusLineSep" | "statusLineModel" | "statusLinePath" | "statusLineGitClean" | "statusLineGitDirty" | "statusLineContext" | "statusLineSpend" | "statusLineStaged" | "statusLineDirty" | "statusLineUntracked" | "statusLineOutput" | "statusLineCost" | "statusLineSubagents";
|
|
12
12
|
/** Check if a string is a valid ThemeColor value */
|
|
@@ -140,6 +140,12 @@ export interface InteractiveModeContext {
|
|
|
140
140
|
loopLimit?: LoopLimitRuntime;
|
|
141
141
|
planModePlanFilePath?: string;
|
|
142
142
|
hideThinkingBlock: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Effective thinking-block visibility: true when hidden by user setting OR
|
|
145
|
+
* thinking level is "off". Read this in render paths instead of
|
|
146
|
+
* {@link hideThinkingBlock} so blocks are auto-hidden when thinking is off.
|
|
147
|
+
*/
|
|
148
|
+
readonly effectiveHideThinkingBlock: boolean;
|
|
143
149
|
proseOnlyThinking: boolean;
|
|
144
150
|
compactionQueuedMessages: CompactionQueuedMessage[];
|
|
145
151
|
pendingTools: Map<string, ToolExecutionHandle>;
|
|
@@ -269,6 +275,8 @@ export interface InteractiveModeContext {
|
|
|
269
275
|
findLastAssistantMessage(): AssistantMessage | undefined;
|
|
270
276
|
extractAssistantText(message: AssistantMessage): string;
|
|
271
277
|
updateEditorTopBorder(): void;
|
|
278
|
+
/** Refresh the running-subagents status badge from the active local or collab registry. */
|
|
279
|
+
syncRunningSubagentBadge(): void;
|
|
272
280
|
updateEditorBorderColor(): void;
|
|
273
281
|
rebuildChatFromMessages(): void;
|
|
274
282
|
setTodos(todos: TodoItem[] | TodoPhase[]): void;
|
|
@@ -299,7 +307,7 @@ export interface InteractiveModeContext {
|
|
|
299
307
|
handleCompactCommand(customInstructions?: string, mode?: CompactMode): Promise<CompactionOutcome>;
|
|
300
308
|
handleHandoffCommand(customInstructions?: string): Promise<void>;
|
|
301
309
|
handleShakeCommand(mode: ShakeMode): Promise<void>;
|
|
302
|
-
handleMoveCommand(targetPath
|
|
310
|
+
handleMoveCommand(targetPath?: string): Promise<void>;
|
|
303
311
|
handleRenameCommand(title: string): Promise<void>;
|
|
304
312
|
handleMemoryCommand(text: string): Promise<void>;
|
|
305
313
|
handleSTTToggle(): Promise<void>;
|
package/dist/types/sdk.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import type { AuthStorage } from "./session/auth-storage";
|
|
|
22
22
|
import { SessionManager } from "./session/session-manager";
|
|
23
23
|
import { type BuildSystemPromptResult } from "./system-prompt";
|
|
24
24
|
import { type ConfiguredThinkingLevel } from "./thinking";
|
|
25
|
-
import { BashTool, BUILTIN_TOOLS, createTools, EditTool, EvalTool,
|
|
25
|
+
import { BashTool, BUILTIN_TOOLS, createTools, EditTool, EvalTool, GlobTool, GrepTool, HIDDEN_TOOLS, type LspStartupServerInfo, loadSshTool, ReadTool, ResolveTool, type Tool, type ToolSession, WebSearchTool, WriteTool } from "./tools";
|
|
26
26
|
import { EventBus } from "./utils/event-bus";
|
|
27
27
|
import { type WorkspaceTree } from "./workspace-tree";
|
|
28
28
|
export interface CreateAgentSessionOptions {
|
|
@@ -224,7 +224,7 @@ export type { FileSlashCommand } from "./extensibility/slash-commands";
|
|
|
224
224
|
export type { MCPManager, MCPServerConfig, MCPServerConnection, MCPToolsLoadResult } from "./mcp";
|
|
225
225
|
export type { Tool } from "./tools";
|
|
226
226
|
export { buildDirectoryTree, buildWorkspaceTree, type DirectoryTree, type WorkspaceTree } from "./workspace-tree";
|
|
227
|
-
export { BashTool, BUILTIN_TOOLS, createTools, EditTool, EvalTool,
|
|
227
|
+
export { BashTool, BUILTIN_TOOLS, createTools, EditTool, EvalTool, GlobTool, GrepTool, HIDDEN_TOOLS, loadSshTool, ReadTool, ResolveTool, type ToolSession, WebSearchTool, WriteTool, };
|
|
228
228
|
/**
|
|
229
229
|
* Create an AuthStorage instance.
|
|
230
230
|
*
|
|
@@ -48,7 +48,7 @@ import type { ClientBridge } from "./client-bridge";
|
|
|
48
48
|
import { type CustomMessage } from "./messages";
|
|
49
49
|
import type { BuildSessionContextOptions, SessionContext } from "./session-context";
|
|
50
50
|
import type { BranchSummaryEntry, NewSessionOptions } from "./session-entries";
|
|
51
|
-
import type
|
|
51
|
+
import { type SessionManager } from "./session-manager";
|
|
52
52
|
import type { ShakeMode, ShakeResult } from "./shake-types";
|
|
53
53
|
import { ToolChoiceQueue } from "./tool-choice-queue";
|
|
54
54
|
import { YieldQueue } from "./yield-queue";
|
|
@@ -459,6 +459,7 @@ export declare class AgentSession {
|
|
|
459
459
|
/** True once dispose() has begun; deferred background work (e.g. the deferred
|
|
460
460
|
* MCP discovery task in sdk.ts) must not touch the session past this point. */
|
|
461
461
|
get isDisposed(): boolean;
|
|
462
|
+
markMovedFromEmptySessionFile(sessionFile: string): void;
|
|
462
463
|
/**
|
|
463
464
|
* Synchronously mark the session as disposing so new work is rejected
|
|
464
465
|
* immediately: eval starts throw, queued asides are dropped, and the
|