@oh-my-pi/pi-coding-agent 15.11.0 → 15.11.2

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.
Files changed (102) hide show
  1. package/CHANGELOG.md +57 -2
  2. package/dist/cli.js +678 -657
  3. package/dist/types/capability/mcp.d.ts +1 -0
  4. package/dist/types/config/settings-schema.d.ts +49 -4
  5. package/dist/types/export/html/template.generated.d.ts +1 -1
  6. package/dist/types/extensibility/custom-commands/types.d.ts +6 -3
  7. package/dist/types/extensibility/custom-tools/loader.d.ts +2 -1
  8. package/dist/types/extensibility/custom-tools/types.d.ts +8 -4
  9. package/dist/types/extensibility/extensions/types.d.ts +2 -2
  10. package/dist/types/extensibility/hooks/types.d.ts +8 -4
  11. package/dist/types/irc/bus.d.ts +15 -2
  12. package/dist/types/mcp/oauth-discovery.d.ts +2 -0
  13. package/dist/types/mcp/oauth-flow.d.ts +6 -1
  14. package/dist/types/mcp/transports/stdio.d.ts +1 -0
  15. package/dist/types/mcp/types.d.ts +2 -0
  16. package/dist/types/modes/components/assistant-message.d.ts +1 -0
  17. package/dist/types/modes/components/mcp-add-wizard.d.ts +2 -1
  18. package/dist/types/modes/components/plan-review-overlay.d.ts +2 -0
  19. package/dist/types/modes/components/settings-selector.d.ts +1 -0
  20. package/dist/types/modes/components/status-line/types.d.ts +3 -0
  21. package/dist/types/modes/components/transcript-container.d.ts +3 -2
  22. package/dist/types/modes/controllers/tool-args-reveal.d.ts +43 -0
  23. package/dist/types/modes/rpc/rpc-client.d.ts +10 -1
  24. package/dist/types/modes/rpc/rpc-mode.d.ts +2 -0
  25. package/dist/types/modes/rpc/rpc-types.d.ts +30 -0
  26. package/dist/types/modes/theme/theme.d.ts +3 -2
  27. package/dist/types/session/agent-session.d.ts +17 -3
  28. package/dist/types/slash-commands/available-commands.d.ts +34 -0
  29. package/dist/types/task/index.d.ts +3 -3
  30. package/dist/types/tools/bash.d.ts +1 -1
  31. package/dist/types/tools/browser/attach.d.ts +4 -4
  32. package/dist/types/tools/browser/registry.d.ts +1 -0
  33. package/dist/types/tools/irc.d.ts +3 -2
  34. package/dist/types/tools/path-utils.d.ts +0 -4
  35. package/dist/types/tools/render-utils.d.ts +22 -0
  36. package/package.json +11 -11
  37. package/src/capability/mcp.ts +1 -0
  38. package/src/cli/gallery-cli.ts +5 -4
  39. package/src/config/mcp-schema.json +4 -0
  40. package/src/config/settings-schema.ts +55 -4
  41. package/src/edit/renderer.ts +96 -46
  42. package/src/exec/bash-executor.ts +21 -6
  43. package/src/export/html/template.generated.ts +1 -1
  44. package/src/export/html/template.js +6 -1
  45. package/src/extensibility/custom-commands/loader.ts +3 -1
  46. package/src/extensibility/custom-commands/types.ts +6 -3
  47. package/src/extensibility/custom-tools/loader.ts +4 -7
  48. package/src/extensibility/custom-tools/types.ts +8 -4
  49. package/src/extensibility/extensions/loader.ts +2 -1
  50. package/src/extensibility/extensions/types.ts +2 -2
  51. package/src/extensibility/hooks/loader.ts +3 -1
  52. package/src/extensibility/hooks/types.ts +8 -4
  53. package/src/internal-urls/docs-index.generated.ts +8 -8
  54. package/src/irc/bus.ts +14 -3
  55. package/src/lsp/defaults.json +6 -0
  56. package/src/lsp/render.ts +2 -28
  57. package/src/mcp/manager.ts +3 -0
  58. package/src/mcp/oauth-discovery.ts +27 -2
  59. package/src/mcp/oauth-flow.ts +47 -1
  60. package/src/mcp/transports/stdio.ts +3 -0
  61. package/src/mcp/types.ts +2 -0
  62. package/src/memories/index.ts +2 -0
  63. package/src/modes/acp/acp-agent.ts +4 -67
  64. package/src/modes/components/assistant-message.ts +15 -0
  65. package/src/modes/components/btw-panel.ts +5 -1
  66. package/src/modes/components/mcp-add-wizard.ts +13 -0
  67. package/src/modes/components/plan-review-overlay.ts +32 -3
  68. package/src/modes/components/settings-selector.ts +2 -0
  69. package/src/modes/components/status-line/component.ts +22 -12
  70. package/src/modes/components/status-line/types.ts +3 -0
  71. package/src/modes/components/transcript-container.ts +99 -18
  72. package/src/modes/components/tree-selector.ts +6 -1
  73. package/src/modes/controllers/event-controller.ts +28 -4
  74. package/src/modes/controllers/mcp-command-controller.ts +34 -2
  75. package/src/modes/controllers/selector-controller.ts +4 -0
  76. package/src/modes/controllers/streaming-reveal.ts +16 -8
  77. package/src/modes/controllers/tool-args-reveal.ts +174 -0
  78. package/src/modes/interactive-mode.ts +41 -2
  79. package/src/modes/rpc/rpc-client.ts +32 -0
  80. package/src/modes/rpc/rpc-mode.ts +82 -7
  81. package/src/modes/rpc/rpc-types.ts +23 -0
  82. package/src/modes/theme/theme.ts +13 -7
  83. package/src/modes/utils/ui-helpers.ts +13 -4
  84. package/src/prompts/memories/consolidation_system.md +4 -0
  85. package/src/prompts/system/irc-autoreply.md +6 -0
  86. package/src/prompts/system/irc-incoming.md +1 -1
  87. package/src/prompts/tools/bash.md +1 -0
  88. package/src/prompts/tools/irc.md +1 -1
  89. package/src/prompts/tools/task.md +7 -2
  90. package/src/session/agent-session.ts +120 -10
  91. package/src/slash-commands/available-commands.ts +105 -0
  92. package/src/task/index.ts +15 -10
  93. package/src/task/render.ts +10 -4
  94. package/src/tools/bash.ts +5 -1
  95. package/src/tools/browser/attach.ts +26 -7
  96. package/src/tools/browser/registry.ts +11 -1
  97. package/src/tools/irc.ts +16 -4
  98. package/src/tools/job.ts +7 -3
  99. package/src/tools/path-utils.ts +22 -15
  100. package/src/tools/render-utils.ts +56 -0
  101. package/src/tools/write.ts +65 -47
  102. package/src/web/search/providers/anthropic.ts +29 -4
@@ -5,7 +5,10 @@
5
5
  * Unlike markdown commands which expand to prompts, custom commands can execute
6
6
  * arbitrary logic with full access to the hook context.
7
7
  */
8
+ import type * as Zod from "zod/v4";
8
9
  import type { ExecOptions, ExecResult, HookCommandContext } from "../../extensibility/hooks/types";
10
+ import type * as PiCodingAgent from "../../index";
11
+ import type * as TypeBox from "../typebox";
9
12
  export type { ExecOptions, ExecResult, HookCommandContext };
10
13
  /**
11
14
  * API passed to custom command factory.
@@ -17,11 +20,11 @@ export interface CustomCommandAPI {
17
20
  /** Execute a shell command */
18
21
  exec(command: string, args: string[], options?: ExecOptions): Promise<ExecResult>;
19
22
  /** Injected zod-backed typebox shim (legacy/compat). */
20
- typebox: typeof import("../typebox");
23
+ typebox: typeof TypeBox;
21
24
  /** Injected zod module for Zod-authored custom commands. */
22
- zod: typeof import("zod/v4");
25
+ zod: typeof Zod;
23
26
  /** Injected pi-coding-agent exports */
24
- pi: typeof import("../..");
27
+ pi: typeof PiCodingAgent;
25
28
  }
26
29
  /**
27
30
  * Custom command definition.
@@ -1,5 +1,6 @@
1
1
  import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { HookUIContext } from "../../extensibility/hooks/types";
3
+ import * as PiCodingAgent from "../../index";
3
4
  import type { LoadedCustomTool, ToolLoadError } from "./types";
4
5
  /** Tool path with optional source metadata, suitable for forwarding from a
5
6
  * parent session to a subagent so the subagent can re-bind tools to its own
@@ -23,7 +24,7 @@ export declare class CustomToolLoader {
23
24
  #private;
24
25
  tools: LoadedCustomTool[];
25
26
  errors: ToolLoadError[];
26
- constructor(pi: typeof import("@oh-my-pi/pi-coding-agent"), cwd: string, builtInToolNames: string[], pushPendingAction?: (action: {
27
+ constructor(pi: typeof PiCodingAgent, cwd: string, builtInToolNames: string[], pushPendingAction?: (action: {
27
28
  label: string;
28
29
  sourceToolName: string;
29
30
  apply(reason: string): Promise<AgentToolResult<unknown>>;
@@ -8,14 +8,18 @@ import type { AgentToolResult, AgentToolUpdateCallback, ToolApproval, ToolApprov
8
8
  import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
9
9
  import type { FetchImpl, Model, Static, TSchema } from "@oh-my-pi/pi-ai";
10
10
  import type { Component } from "@oh-my-pi/pi-tui";
11
+ import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
12
+ import type * as Zod from "zod/v4";
11
13
  import type { Rule } from "../../capability/rule";
12
14
  import type { ModelRegistry } from "../../config/model-registry";
13
15
  import type { Settings } from "../../config/settings";
14
16
  import type { ExecOptions, ExecResult } from "../../exec/exec";
15
17
  import type { HookUIContext } from "../../extensibility/hooks/types";
18
+ import type * as PiCodingAgent from "../../index";
16
19
  import type { Theme } from "../../modes/theme/theme";
17
20
  import type { ReadonlySessionManager } from "../../session/session-manager";
18
21
  import type { TodoItem } from "../../tools/todo";
22
+ import type * as TypeBox from "../typebox";
19
23
  /** Alias for clarity */
20
24
  export type CustomToolUIContext = HookUIContext;
21
25
  export type { ExecOptions, ExecResult } from "../../exec/exec";
@@ -45,13 +49,13 @@ export interface CustomToolAPI {
45
49
  /** Whether UI is available (false in print/RPC mode) */
46
50
  hasUI: boolean;
47
51
  /** File logger for error/warning/debug messages */
48
- logger: typeof import("@oh-my-pi/pi-utils").logger;
52
+ logger: typeof PiLogger;
49
53
  /** Injected zod-backed typebox shim (legacy/compat — Zod-authored tools are preferred). */
50
- typebox: typeof import("../typebox");
54
+ typebox: typeof TypeBox;
51
55
  /** Injected zod module for Zod-authored custom tools. */
52
- zod: typeof import("zod/v4");
56
+ zod: typeof Zod;
53
57
  /** Injected pi-coding-agent exports */
54
- pi: typeof import("../..");
58
+ pi: typeof PiCodingAgent;
55
59
  /** Push a preview action that can later be resolved with the hidden resolve tool */
56
60
  pushPendingAction(action: CustomToolPendingAction): void;
57
61
  }
@@ -11,7 +11,6 @@ import type { AgentMessage, AgentToolResult, AgentToolUpdateCallback, ThinkingLe
11
11
  import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
12
12
  import type { Api, AssistantMessageEvent, AssistantMessageEventStream, Context, ImageContent, Model, ModelSpec, ProviderResponseMetadata, SimpleStreamOptions, Static, TextContent, TSchema } from "@oh-my-pi/pi-ai";
13
13
  import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
14
- import type * as piCodingAgent from "@oh-my-pi/pi-coding-agent";
15
14
  import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from "@oh-my-pi/pi-tui";
16
15
  import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
17
16
  import type * as Zod from "zod/v4";
@@ -21,6 +20,7 @@ import type { EditToolDetails } from "../../edit";
21
20
  import type { PythonResult } from "../../eval/py/executor";
22
21
  import type { BashResult } from "../../exec/bash-executor";
23
22
  import type { ExecOptions, ExecResult } from "../../exec/exec";
23
+ import type * as PiCodingAgent from "../../index";
24
24
  import type { MemoryRuntimeContext } from "../../memory-backend";
25
25
  import type { CustomEditor } from "../../modes/components/custom-editor";
26
26
  import type { Theme } from "../../modes/theme/theme";
@@ -560,7 +560,7 @@ export interface ExtensionAPI {
560
560
  /** Injected zod module for Zod-authored extension tools (canonical going forward). */
561
561
  zod: typeof Zod;
562
562
  /** Injected pi-coding-agent exports for accessing SDK utilities */
563
- pi: typeof piCodingAgent;
563
+ pi: typeof PiCodingAgent;
564
564
  on(event: "resources_discover", handler: ExtensionHandler<ResourcesDiscoverEvent, ResourcesDiscoverResult>): void;
565
565
  on(event: "session_start", handler: ExtensionHandler<SessionStartEvent>): void;
566
566
  on(event: "session_before_switch", handler: ExtensionHandler<SessionBeforeSwitchEvent, SessionBeforeSwitchResult>): void;
@@ -1,13 +1,17 @@
1
1
  import type { ImageContent, Message, Model, TextContent } from "@oh-my-pi/pi-ai";
2
2
  import type { Component, TUI } from "@oh-my-pi/pi-tui";
3
+ import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
4
+ import type * as Zod from "zod/v4";
3
5
  import type { ModelRegistry } from "../../config/model-registry";
4
6
  import type { EditToolDetails } from "../../edit";
5
7
  import type { ExecOptions, ExecResult } from "../../exec/exec";
8
+ import type * as PiCodingAgent from "../../index";
6
9
  import type { Theme } from "../../modes/theme/theme";
7
10
  import type { HookMessage } from "../../session/messages";
8
11
  import type { ReadonlySessionManager, SessionManager } from "../../session/session-manager";
9
12
  import type { BashToolDetails, FindToolDetails, ReadToolDetails, SearchToolDetails } from "../../tools";
10
13
  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";
14
+ import type * as TypeBox from "../typebox";
11
15
  export type { ExecOptions, ExecResult } from "../../exec/exec";
12
16
  /**
13
17
  * UI context for hooks to request interactive UI from the harness.
@@ -412,13 +416,13 @@ export interface HookAPI {
412
416
  */
413
417
  exec(command: string, args: string[], options?: ExecOptions): Promise<ExecResult>;
414
418
  /** File logger for error/warning/debug messages */
415
- logger: typeof import("@oh-my-pi/pi-utils").logger;
419
+ logger: typeof PiLogger;
416
420
  /** Injected zod-backed typebox shim (legacy/compat — prefer `zod`). */
417
- typebox: typeof import("../typebox");
421
+ typebox: typeof TypeBox;
418
422
  /** Injected zod module for Zod-authored hooks. */
419
- zod: typeof import("zod/v4");
423
+ zod: typeof Zod;
420
424
  /** Injected pi-coding-agent exports */
421
- pi: typeof import("../..");
425
+ pi: typeof PiCodingAgent;
422
426
  }
423
427
  /**
424
428
  * Hook factory function type.
@@ -7,7 +7,11 @@
7
7
  * AgentLifecycleManager, idle agents are woken with a real turn, and busy
8
8
  * agents receive the message as a non-interrupting aside at the next step
9
9
  * boundary (see AgentSession.deliverIrcMessage). Replies are real turns by
10
- * the recipient, observed via `wait`.
10
+ * the recipient, observed via `wait` — with one exception: when the sender
11
+ * awaits a reply and the recipient is mid-turn with async execution
12
+ * disabled, the recipient session generates an ephemeral side-channel
13
+ * auto-reply (it may be blocked in a synchronous task spawn whose batch
14
+ * includes the sender, so a real turn could never happen in time).
11
15
  */
12
16
  import { AgentLifecycleManager } from "../registry/agent-lifecycle";
13
17
  import { AgentRegistry } from "../registry/agent-registry";
@@ -44,8 +48,17 @@ export declare class IrcBus {
44
48
  * context, so buffering it too would double-deliver via a later
45
49
  * `wait`/`inbox` and inflate unread counts. Only a failed live hand-off
46
50
  * is buffered for the recipient to drain later.
51
+ *
52
+ * `opts.expectsReply` marks sends whose caller is blocked on an answer
53
+ * (`send await:true`). It is forwarded to the recipient session so a
54
+ * mid-turn recipient that cannot reach a step boundary (async execution
55
+ * disabled — e.g. blocked in a synchronous task spawn awaiting the
56
+ * sender's own batch) can generate an ephemeral side-channel auto-reply
57
+ * instead of stranding the sender until timeout.
47
58
  */
48
- send(msg: Omit<IrcMessage, "id" | "ts">): Promise<IrcDeliveryReceipt>;
59
+ send(msg: Omit<IrcMessage, "id" | "ts">, opts?: {
60
+ expectsReply?: boolean;
61
+ }): Promise<IrcDeliveryReceipt>;
49
62
  /**
50
63
  * Block until a message for `agentId` (optionally from `filter.from`)
51
64
  * arrives; consume + return it. Null on timeout (`timeoutMs <= 0` waits
@@ -10,6 +10,7 @@ export interface OAuthEndpoints {
10
10
  tokenUrl: string;
11
11
  clientId?: string;
12
12
  scopes?: string;
13
+ resource?: string;
13
14
  }
14
15
  export interface AuthDetectionResult {
15
16
  requiresAuth: boolean;
@@ -41,4 +42,5 @@ export declare function analyzeAuthError(error: Error, serverUrl?: string): Auth
41
42
  */
42
43
  export declare function discoverOAuthEndpoints(serverUrl: string, authServerUrl?: string, resourceMetadataUrl?: string, opts?: {
43
44
  fetch?: FetchImpl;
45
+ protectedResource?: string;
44
46
  }): Promise<OAuthEndpoints | null>;
@@ -24,6 +24,8 @@ export interface MCPOAuthConfig {
24
24
  callbackPort?: number;
25
25
  /** Custom callback path (default: /callback or redirectUri pathname) */
26
26
  callbackPath?: string;
27
+ /** MCP resource URI for RFC 8707 resource indicators */
28
+ resource?: string;
27
29
  /** Fetch implementation for token exchange and discovery requests. */
28
30
  fetch?: FetchImpl;
29
31
  }
@@ -49,6 +51,7 @@ export declare class MCPOAuthFlow extends OAuthCallbackFlow {
49
51
  * client id via config.
50
52
  */
51
53
  get registeredClientSecret(): string | undefined;
54
+ get resource(): string | undefined;
52
55
  generateAuthUrl(state: string, redirectUri: string): Promise<{
53
56
  url: string;
54
57
  instructions?: string;
@@ -59,6 +62,8 @@ export declare class MCPOAuthFlow extends OAuthCallbackFlow {
59
62
  * Refresh an MCP OAuth token using the standard refresh_token grant.
60
63
  * Returns updated credentials; preserves the old refresh token if the server doesn't rotate it.
61
64
  */
62
- export declare function refreshMCPOAuthToken(tokenUrl: string, refreshToken: string, clientId?: string, clientSecret?: string, opts?: {
65
+ export declare function refreshMCPOAuthToken(tokenUrl: string, refreshToken: string, clientId?: string, clientSecret?: string, resourceOrOpts?: string | {
66
+ fetch?: FetchImpl;
67
+ }, opts?: {
63
68
  fetch?: FetchImpl;
64
69
  }): Promise<OAuthCredentials>;
@@ -8,6 +8,7 @@ import type { MCPRequestOptions, MCPStdioServerConfig, MCPTransport } from "../.
8
8
  /** Subprocess argv for launching an MCP stdio server. */
9
9
  export interface StdioSpawnCommand {
10
10
  cmd: string[];
11
+ windowsHide?: boolean;
11
12
  }
12
13
  /** Inputs used to resolve platform-specific stdio spawn behavior. */
13
14
  export interface ResolveStdioSpawnOptions {
@@ -40,6 +40,8 @@ export interface MCPAuthConfig {
40
40
  clientId?: string;
41
41
  /** Client secret — persisted for token refresh */
42
42
  clientSecret?: string;
43
+ /** MCP resource URI — persisted for OAuth resource indicators during refresh */
44
+ resource?: string;
43
45
  }
44
46
  /** Base server config with shared options */
45
47
  interface MCPServerConfigBase {
@@ -19,6 +19,7 @@ export declare class AssistantMessageComponent extends Container {
19
19
  */
20
20
  setErrorPinned(pinned: boolean): void;
21
21
  isTranscriptBlockFinalized(): boolean;
22
+ getTranscriptBlockVersion(): number;
22
23
  markTranscriptBlockFinalized(): void;
23
24
  setToolResultImages(toolCallId: string, images: ImageContent[]): void;
24
25
  setUsageInfo(usage: Usage): void;
@@ -16,10 +16,11 @@ export interface MCPAddWizardOAuthResult {
16
16
  credentialId: string;
17
17
  clientId?: string;
18
18
  clientSecret?: string;
19
+ resource?: string;
19
20
  }
20
21
  export declare class MCPAddWizard extends Container {
21
22
  #private;
22
- constructor(onComplete: (name: string, config: MCPServerConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPServerConfig) => Promise<void>, onRender?: () => void, initialName?: string);
23
+ constructor(onComplete: (name: string, config: MCPServerConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string, resource?: string) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPServerConfig) => Promise<void>, onRender?: () => void, initialName?: string);
23
24
  handleInput(keyData: string): void;
24
25
  }
25
26
  export {};
@@ -25,6 +25,8 @@ export interface PlanReviewOverlayCallbacks {
25
25
  onCancel: () => void;
26
26
  /** Invoked when the external-editor key is pressed (overlay stays open). */
27
27
  onExternalEditor?: () => void;
28
+ /** Invoked when the external-editor key edits the active annotation draft. */
29
+ onAnnotationExternalEditor?: (draft: string, commit: (text: string | null) => void) => void;
28
30
  /** Invoked with the new full plan text after an in-overlay delete/undo. */
29
31
  onPlanEdited?: (content: string) => void;
30
32
  /** Invoked with the Refine feedback markdown whenever annotations change. */
@@ -25,6 +25,7 @@ export interface StatusLinePreviewSettings {
25
25
  rightSegments?: StatusLineSegmentId[];
26
26
  separator?: StatusLineSeparatorStyle;
27
27
  sessionAccent?: boolean;
28
+ transparent?: boolean;
28
29
  }
29
30
  export interface SettingsCallbacks {
30
31
  /** Called when any setting value changes */
@@ -29,6 +29,9 @@ export interface StatusLineSettings {
29
29
  segmentOptions?: StatusLineSegmentOptions;
30
30
  showHookStatus?: boolean;
31
31
  sessionAccent?: boolean;
32
+ /** Drop the theme's `statusLineBg` fill and powerline caps so the bar
33
+ * inherits the terminal's default background. */
34
+ transparent?: boolean;
32
35
  }
33
36
  export type EffectiveStatusLineSettings = Required<Pick<StatusLineSettings, "leftSegments" | "rightSegments" | "separator" | "segmentOptions">> & StatusLineSettings;
34
37
  export type RGB = readonly [number, number, number];
@@ -1,4 +1,4 @@
1
- import { type Component, Container, type NativeScrollbackLiveRegion, type RenderStablePrefix } from "@oh-my-pi/pi-tui";
1
+ import { type Component, Container, type NativeScrollbackCommittedRows, type NativeScrollbackLiveRegion, type RenderStablePrefix } from "@oh-my-pi/pi-tui";
2
2
  /**
3
3
  * Transcript container that renders every block's current content each frame
4
4
  * and reports the live-region seam (`NativeScrollbackLiveRegion`) that gates
@@ -22,10 +22,11 @@ import { type Component, Container, type NativeScrollbackLiveRegion, type Render
22
22
  * through {@link RenderStablePrefix} so the engine can skip marker scanning,
23
23
  * line preparation, and the committed-prefix audit for those rows.
24
24
  */
25
- export declare class TranscriptContainer extends Container implements NativeScrollbackLiveRegion, RenderStablePrefix {
25
+ export declare class TranscriptContainer extends Container implements NativeScrollbackLiveRegion, NativeScrollbackCommittedRows, RenderStablePrefix {
26
26
  #private;
27
27
  invalidate(): void;
28
28
  clear(): void;
29
+ setNativeScrollbackCommittedRows(rows: number): void;
29
30
  getRenderStablePrefixRows(): number;
30
31
  getNativeScrollbackLiveRegionStart(): number | undefined;
31
32
  getNativeScrollbackCommitSafeEnd(): number | undefined;
@@ -0,0 +1,43 @@
1
+ /** Minimal component surface the reveal pushes frames into. */
2
+ type ToolArgsRevealComponent = {
3
+ updateArgs(args: unknown, toolCallId?: string): void;
4
+ };
5
+ type ToolArgsRevealControllerOptions = {
6
+ getSmoothStreaming(): boolean;
7
+ requestRender(): void;
8
+ };
9
+ /**
10
+ * Paces streamed tool-call arguments the same way StreamingRevealController
11
+ * paces assistant text: providers that deliver `partialJson` in large batches
12
+ * (or throttle their partial parses) would otherwise make write/edit/bash
13
+ * streaming previews jump in chunks. Each pending tool call reveals its raw
14
+ * argument stream at the shared 30fps cadence with the same adaptive
15
+ * catch-up step, re-parsing the revealed prefix per frame.
16
+ *
17
+ * Reveal units are UTF-16 code units of the raw stream, not graphemes —
18
+ * the prefix goes through a JSON parser rather than straight to the screen,
19
+ * so only surrogate-pair integrity matters (see {@link clampSliceEnd}).
20
+ */
21
+ export declare class ToolArgsRevealController {
22
+ #private;
23
+ constructor(options: ToolArgsRevealControllerOptions);
24
+ /**
25
+ * Record the latest streamed argument text for a tool call and return the
26
+ * args to render right now. With smoothing disabled the full target passes
27
+ * through in the caller's legacy shape (`{ ...args, __partialJson }`).
28
+ */
29
+ setTarget(id: string, partialJson: string, rawInput: boolean, fullArgs: Record<string, unknown>): Record<string, unknown>;
30
+ /** Attach the component future ticks push frames into. */
31
+ bind(id: string, component: ToolArgsRevealComponent): void;
32
+ /** Final arguments arrived (the JSON closed): drop the reveal so the
33
+ * caller's final-args render wins immediately, mirroring how assistant
34
+ * text snaps to the full message at message_end. */
35
+ finish(id: string): void;
36
+ /** Snap every live entry to its full received stream and clear. Used at
37
+ * message_end (abort/error mid-stream) so sealed components freeze showing
38
+ * everything that arrived rather than a mid-reveal prefix. */
39
+ flushAll(): void;
40
+ /** Clear without pushing (teardown). */
41
+ stop(): void;
42
+ }
43
+ export {};
@@ -8,7 +8,7 @@ import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
8
8
  import type { ImageContent, Model } from "@oh-my-pi/pi-ai";
9
9
  import type { BashResult } from "../../exec/bash-executor";
10
10
  import type { AgentSessionEvent, SessionStats } from "../../session/agent-session";
11
- import type { RpcHandoffResult, RpcHostToolDefinition, RpcSessionState, RpcSubagentEventFrame, RpcSubagentLifecycleFrame, RpcSubagentMessagesResult, RpcSubagentProgressFrame, RpcSubagentSnapshot, RpcSubagentSubscriptionLevel } from "./rpc-types";
11
+ import type { RpcAvailableSlashCommand, RpcHandoffResult, RpcHostToolDefinition, RpcSessionState, RpcSubagentEventFrame, RpcSubagentLifecycleFrame, RpcSubagentMessagesResult, RpcSubagentProgressFrame, RpcSubagentSnapshot, RpcSubagentSubscriptionLevel } from "./rpc-types";
12
12
  export interface RpcClientOptions {
13
13
  /** Path to the CLI entry point (default: searches for dist/cli.js) */
14
14
  cliPath?: string;
@@ -33,6 +33,7 @@ export type RpcSessionEventListener = (event: AgentSessionEvent) => void;
33
33
  export type RpcSubagentLifecycleListener = (payload: RpcSubagentLifecycleFrame["payload"]) => void;
34
34
  export type RpcSubagentProgressListener = (payload: RpcSubagentProgressFrame["payload"]) => void;
35
35
  export type RpcSubagentEventListener = (payload: RpcSubagentEventFrame["payload"]) => void;
36
+ export type RpcAvailableCommandsUpdateListener = (commands: RpcAvailableSlashCommand[]) => void;
36
37
  export interface RpcClientToolContext<TDetails = unknown> {
37
38
  toolCallId: string;
38
39
  signal: AbortSignal;
@@ -80,6 +81,10 @@ export declare class RpcClient {
80
81
  * Subscribe to raw subagent session events. Call setSubagentSubscription(\"events\") to enable them server-side.
81
82
  */
82
83
  onSubagentEvent(listener: RpcSubagentEventListener): () => void;
84
+ /**
85
+ * Subscribe to slash-command availability updates emitted by the RPC server.
86
+ */
87
+ onAvailableCommandsUpdate(listener: RpcAvailableCommandsUpdateListener): () => void;
83
88
  /**
84
89
  * Get collected stderr output (useful for debugging).
85
90
  */
@@ -157,6 +162,10 @@ export declare class RpcClient {
157
162
  * Get list of available models.
158
163
  */
159
164
  getAvailableModels(): Promise<ModelInfo[]>;
165
+ /**
166
+ * Get list of available slash commands.
167
+ */
168
+ getAvailableCommands(): Promise<RpcAvailableSlashCommand[]>;
160
169
  /**
161
170
  * Set thinking level.
162
171
  */
@@ -34,6 +34,8 @@ export type RpcSessionChangeResult = {
34
34
  };
35
35
  };
36
36
  export type RpcSessionChangeSession = Pick<AgentSession, "newSession" | "switchSession" | "branch">;
37
+ export type RpcSkillCommandSession = Pick<AgentSession, "promptCustomMessage" | "skills" | "skillsSettings">;
38
+ export declare function tryRunRpcSkillCommand(session: RpcSkillCommandSession, text: string): Promise<boolean>;
37
39
  export type RpcSubagentResetRegistry = Pick<RpcSubagentRegistry, "clear">;
38
40
  export declare function handleRpcSessionChange(session: RpcSessionChangeSession, command: RpcSessionChangeCommand, subagentRegistry?: RpcSubagentResetRegistry): Promise<RpcSessionChangeResult>;
39
41
  export declare function requestRpcEditor(pendingRequests: Map<string, PendingExtensionRequest>, output: RpcOutput, title: string, prefill?: string, dialogOptions?: ExtensionUIDialogOptions, editorOptions?: {
@@ -11,6 +11,7 @@ import type { BashResult } from "../../exec/bash-executor";
11
11
  import type { ContextUsage } from "../../extensibility/extensions/types";
12
12
  import type { AgentSessionEvent, SessionStats } from "../../session/agent-session";
13
13
  import type { FileEntry } from "../../session/session-manager";
14
+ import type { AvailableSlashCommandSource } from "../../slash-commands/available-commands";
14
15
  import type { AgentProgress, SubagentEventPayload, SubagentLifecyclePayload, SubagentProgressPayload } from "../../task";
15
16
  import type { TodoPhase } from "../../tools/todo";
16
17
  export type RpcCommand = {
@@ -44,6 +45,9 @@ export type RpcCommand = {
44
45
  } | {
45
46
  id?: string;
46
47
  type: "get_state";
48
+ } | {
49
+ id?: string;
50
+ type: "get_available_commands";
47
51
  } | {
48
52
  id?: string;
49
53
  type: "set_todos";
@@ -186,6 +190,24 @@ export interface RpcSessionState {
186
190
  /** Current context window usage. Null tokens/percent when unknown (e.g. right after compaction). */
187
191
  contextUsage?: ContextUsage;
188
192
  }
193
+ export interface RpcAvailableSlashCommand {
194
+ name: string;
195
+ aliases?: string[];
196
+ description?: string;
197
+ input?: {
198
+ hint?: string;
199
+ };
200
+ subcommands?: Array<{
201
+ name: string;
202
+ description?: string;
203
+ usage?: string;
204
+ }>;
205
+ source: AvailableSlashCommandSource;
206
+ }
207
+ export interface RpcAvailableCommandsUpdateFrame {
208
+ type: "available_commands_update";
209
+ commands: RpcAvailableSlashCommand[];
210
+ }
189
211
  export interface RpcHandoffResult {
190
212
  savedPath?: string;
191
213
  }
@@ -251,6 +273,14 @@ export type RpcResponse = {
251
273
  command: "get_state";
252
274
  success: true;
253
275
  data: RpcSessionState;
276
+ } | {
277
+ id?: string;
278
+ type: "response";
279
+ command: "get_available_commands";
280
+ success: true;
281
+ data: {
282
+ commands: RpcAvailableSlashCommand[];
283
+ };
254
284
  } | {
255
285
  id?: string;
256
286
  type: "response";
@@ -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.agents" | "icon.cache" | "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.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.editing" | "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.agents" | "icon.job" | "icon.cache" | "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.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.editing" | "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";
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 */
@@ -150,6 +150,7 @@ export declare class Theme {
150
150
  time: string;
151
151
  pi: string;
152
152
  agents: string;
153
+ job: string;
153
154
  cache: string;
154
155
  input: string;
155
156
  output: string;
@@ -299,7 +300,7 @@ export declare function getThemeExportColors(themeName?: string): Promise<{
299
300
  * Highlight code with syntax coloring based on file extension or language.
300
301
  * Returns array of highlighted lines.
301
302
  */
302
- export declare function highlightCode(code: string, lang?: string): string[];
303
+ export declare function highlightCode(code: string, lang?: string, highlightTheme?: Theme): string[];
303
304
  export declare function getSymbolTheme(): SymbolTheme;
304
305
  export declare function getMarkdownTheme(): MarkdownTheme;
305
306
  export declare function getSelectListTheme(): SelectListTheme;
@@ -36,7 +36,7 @@ import { type FileSlashCommand } from "../extensibility/slash-commands";
36
36
  import { GoalRuntime } from "../goals/runtime";
37
37
  import type { Goal, GoalModeState } from "../goals/state";
38
38
  import type { HindsightSessionState } from "../hindsight/state";
39
- import type { IrcMessage } from "../irc/bus";
39
+ import { type IrcMessage } from "../irc/bus";
40
40
  import { type MnemopiSessionState } from "../mnemopi/state";
41
41
  import type { PlanModeState } from "../plan-mode/state";
42
42
  import { type SecretObfuscator } from "../secrets/obfuscator";
@@ -116,6 +116,7 @@ export type AgentSessionEvent = AgentEvent | {
116
116
  };
117
117
  /** Listener function for agent session events */
118
118
  export type AgentSessionEventListener = (event: AgentSessionEvent) => void;
119
+ export type CommandMetadataChangedListener = () => void | Promise<void>;
119
120
  export type AsyncJobSnapshotItem = Pick<AsyncJob, "id" | "type" | "status" | "label" | "startTime">;
120
121
  export interface AsyncJobSnapshot {
121
122
  running: AsyncJobSnapshotItem[];
@@ -378,6 +379,7 @@ export declare class AgentSession {
378
379
  * Multiple listeners can be added. Returns unsubscribe function for this listener.
379
380
  */
380
381
  subscribe(listener: AgentSessionEventListener): () => void;
382
+ subscribeCommandMetadataChanged(listener: CommandMetadataChangedListener): () => void;
381
383
  /**
382
384
  * Synchronously mark the session as disposing so new work is rejected
383
385
  * immediately: Python/eval starts throw, queued asides are dropped, and the
@@ -554,6 +556,8 @@ export declare class AgentSession {
554
556
  setSlashCommands(slashCommands: FileSlashCommand[]): void;
555
557
  /** Custom commands (TypeScript slash commands and MCP prompts) */
556
558
  get customCommands(): ReadonlyArray<LoadedCustomCommand>;
559
+ /** MCP prompt commands only, for command-list metadata. */
560
+ get mcpPromptCommands(): ReadonlyArray<LoadedCustomCommand>;
557
561
  /** Update the MCP prompt commands list. Called when server prompts are (re)loaded. */
558
562
  setMCPPromptCommands(commands: LoadedCustomCommand[]): void;
559
563
  /**
@@ -936,8 +940,18 @@ export declare class AgentSession {
936
940
  * → "woken".
937
941
  *
938
942
  * Never blocks on the recipient's turn: the wake turn is fire-and-forget.
939
- */
940
- deliverIrcMessage(msg: IrcMessage): Promise<"injected" | "woken">;
943
+ *
944
+ * When the sender expects a reply (`send await:true`) and this session is
945
+ * mid-turn with async execution disabled, the next step boundary may be
946
+ * gated on the sender's own batch finishing (blocking task spawns), so a
947
+ * real reply turn can never happen in time. In that case an ephemeral
948
+ * side-channel auto-reply is generated from the current context (the old
949
+ * `respondAsBackground` path) and sent back over the bus on this agent's
950
+ * behalf.
951
+ */
952
+ deliverIrcMessage(msg: IrcMessage, opts?: {
953
+ expectsReply?: boolean;
954
+ }): Promise<"injected" | "woken">;
941
955
  /**
942
956
  * Emit an IRC relay observation event on this session for UI rendering only.
943
957
  * Does not persist the record to history. Called by the IrcBus to surface
@@ -0,0 +1,34 @@
1
+ import type { AvailableCommand } from "@agentclientprotocol/sdk";
2
+ import type { SkillsSettings } from "../config/settings";
3
+ import type { LoadedCustomCommand } from "../extensibility/custom-commands";
4
+ import type { ExtensionRunner } from "../extensibility/extensions";
5
+ import { type Skill } from "../extensibility/skills";
6
+ import { type FileSlashCommand } from "../extensibility/slash-commands";
7
+ export type AvailableSlashCommandSource = "builtin" | "skill" | "extension" | "custom" | "mcp_prompt" | "file";
8
+ export interface InternalAvailableSlashCommand {
9
+ name: string;
10
+ aliases?: string[];
11
+ description?: string;
12
+ input?: {
13
+ hint: string;
14
+ };
15
+ subcommands?: Array<{
16
+ name: string;
17
+ description?: string;
18
+ usage?: string;
19
+ }>;
20
+ source: AvailableSlashCommandSource;
21
+ }
22
+ export interface AvailableCommandsSession {
23
+ readonly extensionRunner?: ExtensionRunner;
24
+ readonly customCommands: ReadonlyArray<LoadedCustomCommand>;
25
+ readonly mcpPromptCommands?: ReadonlyArray<LoadedCustomCommand>;
26
+ readonly skills: ReadonlyArray<Skill>;
27
+ readonly skillsSettings?: SkillsSettings;
28
+ setSlashCommands(slashCommands: FileSlashCommand[]): void;
29
+ sessionManager: {
30
+ getCwd(): string;
31
+ };
32
+ }
33
+ export declare function buildAvailableSlashCommands(session: AvailableCommandsSession, loadFileCommands?: (cwd: string) => Promise<FileSlashCommand[]>): Promise<InternalAvailableSlashCommand[]>;
34
+ export declare function toAcpAvailableCommands(commands: readonly InternalAvailableSlashCommand[]): AvailableCommand[];
@@ -22,8 +22,8 @@ export declare function formatResultOutputFallback(result: Pick<SingleResult, "o
22
22
  * Task tool - Delegate tasks to specialized agents.
23
23
  *
24
24
  * Each call spawns one subagent — or, with `task.batch`, one per `tasks[]`
25
- * item. Spawning is non-blocking: the call registers AsyncJobManager jobs and
26
- * returns immediately; each result is delivered when that agent yields.
25
+ * item. When `async.enabled` is on, spawns run as AsyncJobManager jobs; when
26
+ * disabled, the tool blocks until every spawn finishes.
27
27
  */
28
28
  export declare class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskToolDetails, Theme> {
29
29
  #private;
@@ -32,7 +32,7 @@ export declare class TaskTool implements AgentTool<TaskToolSchemaInstance, TaskT
32
32
  readonly approval: "exec";
33
33
  readonly formatApprovalDetails: (args: unknown) => string[];
34
34
  readonly label = "Task";
35
- readonly summary = "Spawn a subagent to complete a task in the background";
35
+ readonly summary = "Spawn subagents to complete delegated tasks";
36
36
  readonly strict = true;
37
37
  readonly loadMode = "discoverable";
38
38
  readonly renderResult: typeof renderResult;
@@ -69,7 +69,7 @@ export declare class BashTool implements AgentTool<BashToolSchema, BashToolDetai
69
69
  readonly loadMode = "essential";
70
70
  readonly description: string;
71
71
  readonly parameters: BashToolSchema;
72
- readonly concurrency = "exclusive";
72
+ readonly concurrency: (args: Partial<BashToolInput>) => "shared" | "exclusive";
73
73
  readonly strict = true;
74
74
  constructor(session: ToolSession);
75
75
  execute(_toolCallId: string, { command: rawCommand, env: rawEnv, timeout: rawTimeout, cwd, async: asyncRequested, pty, }: BashToolInput, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<BashToolDetails>, ctx?: AgentToolContext): Promise<AgentToolResult<BashToolDetails>>;