@oh-my-pi/pi-coding-agent 15.10.11 → 15.11.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.
Files changed (217) hide show
  1. package/CHANGELOG.md +103 -2
  2. package/dist/cli.js +5790 -5731
  3. package/dist/types/async/index.d.ts +0 -1
  4. package/dist/types/cli/args.d.ts +1 -0
  5. package/dist/types/cli/gallery-fixtures/types.d.ts +5 -0
  6. package/dist/types/cli-commands.d.ts +12 -0
  7. package/dist/types/commands/launch.d.ts +4 -0
  8. package/dist/types/config/api-key-resolver.d.ts +3 -0
  9. package/dist/types/config/keybindings.d.ts +6 -1
  10. package/dist/types/config/model-registry.d.ts +1 -0
  11. package/dist/types/config/model-resolver.d.ts +18 -0
  12. package/dist/types/config/settings-schema.d.ts +85 -34
  13. package/dist/types/config/settings.d.ts +7 -0
  14. package/dist/types/edit/hashline/noop-loop-guard.d.ts +72 -0
  15. package/dist/types/eval/py/executor.d.ts +5 -0
  16. package/dist/types/eval/py/kernel.d.ts +6 -1
  17. package/dist/types/eval/py/runtime.d.ts +9 -0
  18. package/dist/types/exec/bash-executor.d.ts +2 -0
  19. package/dist/types/export/html/template.generated.d.ts +1 -1
  20. package/dist/types/extensibility/custom-tools/types.d.ts +2 -2
  21. package/dist/types/extensibility/extensions/runner.d.ts +3 -2
  22. package/dist/types/extensibility/extensions/types.d.ts +3 -0
  23. package/dist/types/extensibility/shared-events.d.ts +2 -2
  24. package/dist/types/internal-urls/history-protocol.d.ts +14 -0
  25. package/dist/types/internal-urls/index.d.ts +1 -0
  26. package/dist/types/internal-urls/types.d.ts +1 -1
  27. package/dist/types/irc/bus.d.ts +66 -0
  28. package/dist/types/memory-backend/index.d.ts +1 -0
  29. package/dist/types/memory-backend/runtime.d.ts +4 -0
  30. package/dist/types/memory-backend/types.d.ts +66 -1
  31. package/dist/types/modes/components/agent-hub.d.ts +30 -0
  32. package/dist/types/modes/components/compaction-summary-message.d.ts +10 -4
  33. package/dist/types/modes/components/custom-editor.d.ts +2 -0
  34. package/dist/types/modes/components/tool-execution.d.ts +8 -0
  35. package/dist/types/modes/components/ttsr-notification.d.ts +5 -1
  36. package/dist/types/modes/components/welcome.d.ts +3 -9
  37. package/dist/types/modes/controllers/selector-controller.d.ts +1 -1
  38. package/dist/types/modes/index.d.ts +3 -3
  39. package/dist/types/modes/interactive-mode.d.ts +10 -4
  40. package/dist/types/modes/oauth-manual-input.d.ts +7 -0
  41. package/dist/types/modes/rpc/rpc-client.d.ts +39 -2
  42. package/dist/types/modes/rpc/rpc-mode.d.ts +31 -2
  43. package/dist/types/modes/rpc/rpc-subagents.d.ts +24 -0
  44. package/dist/types/modes/rpc/rpc-types.d.ts +75 -1
  45. package/dist/types/modes/setup-wizard/index.d.ts +5 -1
  46. package/dist/types/modes/setup-wizard/lazy.d.ts +2 -0
  47. package/dist/types/modes/theme/theme.d.ts +2 -1
  48. package/dist/types/modes/types.d.ts +5 -2
  49. package/dist/types/modes/utils/ui-helpers.d.ts +1 -1
  50. package/dist/types/registry/agent-lifecycle.d.ts +51 -0
  51. package/dist/types/registry/agent-registry.d.ts +16 -5
  52. package/dist/types/secrets/index.d.ts +1 -1
  53. package/dist/types/secrets/obfuscator.d.ts +8 -2
  54. package/dist/types/session/agent-session.d.ts +49 -32
  55. package/dist/types/session/messages.d.ts +2 -4
  56. package/dist/types/session/session-history-format.d.ts +12 -0
  57. package/dist/types/session/session-manager.d.ts +21 -3
  58. package/dist/types/session/streaming-output.d.ts +46 -0
  59. package/dist/types/slash-commands/acp-builtins.d.ts +16 -0
  60. package/dist/types/slash-commands/builtin-registry.d.ts +1 -0
  61. package/dist/types/slash-commands/types.d.ts +1 -1
  62. package/dist/types/system-prompt.d.ts +2 -0
  63. package/dist/types/task/executor.d.ts +12 -2
  64. package/dist/types/task/index.d.ts +13 -6
  65. package/dist/types/task/output-manager.d.ts +0 -7
  66. package/dist/types/task/repair-args.d.ts +8 -7
  67. package/dist/types/task/types.d.ts +63 -51
  68. package/dist/types/thinking.d.ts +4 -0
  69. package/dist/types/tiny/title-client.d.ts +11 -0
  70. package/dist/types/tiny/title-protocol.d.ts +1 -0
  71. package/dist/types/tools/browser/tab-worker.d.ts +3 -1
  72. package/dist/types/tools/find.d.ts +0 -11
  73. package/dist/types/tools/grouped-file-output.d.ts +0 -49
  74. package/dist/types/tools/index.d.ts +7 -3
  75. package/dist/types/tools/irc.d.ts +76 -38
  76. package/dist/types/tools/job.d.ts +7 -1
  77. package/dist/types/utils/git.d.ts +15 -2
  78. package/dist/types/utils/title-generator.d.ts +3 -2
  79. package/examples/extensions/with-deps/package.json +1 -0
  80. package/package.json +11 -10
  81. package/scripts/bundle-dist.ts +28 -19
  82. package/src/async/index.ts +0 -1
  83. package/src/auto-thinking/classifier.ts +1 -0
  84. package/src/cli/args.ts +3 -0
  85. package/src/cli/gallery-cli.ts +1 -1
  86. package/src/cli/gallery-fixtures/agentic.ts +230 -115
  87. package/src/cli/gallery-fixtures/types.ts +5 -0
  88. package/src/cli-commands.ts +29 -0
  89. package/src/cli.ts +28 -15
  90. package/src/commands/launch.ts +4 -0
  91. package/src/commit/agentic/tools/analyze-file.ts +38 -19
  92. package/src/commit/model-selection.ts +3 -2
  93. package/src/config/api-key-resolver.ts +8 -6
  94. package/src/config/keybindings.ts +6 -1
  95. package/src/config/model-registry.ts +97 -30
  96. package/src/config/model-resolver.ts +60 -0
  97. package/src/config/settings-schema.ts +99 -55
  98. package/src/config/settings.ts +68 -3
  99. package/src/edit/hashline/execute.ts +39 -2
  100. package/src/edit/hashline/noop-loop-guard.ts +99 -0
  101. package/src/eval/__tests__/agent-bridge.test.ts +5 -3
  102. package/src/eval/agent-bridge.ts +3 -16
  103. package/src/eval/completion-bridge.ts +1 -0
  104. package/src/eval/js/shared/prelude.txt +1 -1
  105. package/src/eval/py/executor.ts +29 -7
  106. package/src/eval/py/index.ts +6 -1
  107. package/src/eval/py/kernel.ts +31 -11
  108. package/src/eval/py/prelude.py +5 -6
  109. package/src/eval/py/runtime.ts +37 -0
  110. package/src/exec/bash-executor.ts +82 -3
  111. package/src/export/html/template.generated.ts +1 -1
  112. package/src/export/html/template.js +38 -13
  113. package/src/extensibility/custom-tools/types.ts +2 -2
  114. package/src/extensibility/extensions/get-commands-handler.ts +2 -1
  115. package/src/extensibility/extensions/runner.ts +6 -1
  116. package/src/extensibility/extensions/types.ts +3 -0
  117. package/src/extensibility/shared-events.ts +2 -2
  118. package/src/hindsight/bank.ts +17 -2
  119. package/src/internal-urls/docs-index.generated.ts +11 -11
  120. package/src/internal-urls/history-protocol.ts +113 -0
  121. package/src/internal-urls/index.ts +1 -0
  122. package/src/internal-urls/router.ts +3 -1
  123. package/src/internal-urls/types.ts +1 -1
  124. package/src/irc/bus.ts +292 -0
  125. package/src/main.ts +26 -66
  126. package/src/memories/index.ts +2 -0
  127. package/src/memory-backend/index.ts +1 -0
  128. package/src/memory-backend/local-backend.ts +9 -0
  129. package/src/memory-backend/off-backend.ts +9 -0
  130. package/src/memory-backend/runtime.ts +66 -0
  131. package/src/memory-backend/types.ts +81 -1
  132. package/src/mnemopi/backend.ts +151 -4
  133. package/src/modes/acp/acp-agent.ts +119 -11
  134. package/src/modes/components/{session-observer-overlay.ts → agent-hub.ts} +586 -367
  135. package/src/modes/components/assistant-message.ts +19 -21
  136. package/src/modes/components/compaction-summary-message.ts +68 -32
  137. package/src/modes/components/custom-editor.ts +10 -0
  138. package/src/modes/components/footer.ts +3 -1
  139. package/src/modes/components/status-line/component.ts +118 -34
  140. package/src/modes/components/tool-execution.ts +31 -1
  141. package/src/modes/components/ttsr-notification.ts +72 -30
  142. package/src/modes/components/welcome.ts +9 -33
  143. package/src/modes/controllers/command-controller.ts +1 -1
  144. package/src/modes/controllers/event-controller.ts +65 -0
  145. package/src/modes/controllers/extension-ui-controller.ts +8 -8
  146. package/src/modes/controllers/input-controller.ts +19 -2
  147. package/src/modes/controllers/mcp-command-controller.ts +38 -3
  148. package/src/modes/controllers/selector-controller.ts +21 -17
  149. package/src/modes/index.ts +3 -21
  150. package/src/modes/interactive-mode.ts +47 -22
  151. package/src/modes/oauth-manual-input.ts +30 -3
  152. package/src/modes/rpc/rpc-client.ts +154 -3
  153. package/src/modes/rpc/rpc-mode.ts +97 -12
  154. package/src/modes/rpc/rpc-subagents.ts +265 -0
  155. package/src/modes/rpc/rpc-types.ts +81 -1
  156. package/src/modes/setup-wizard/index.ts +12 -2
  157. package/src/modes/setup-wizard/lazy.ts +16 -0
  158. package/src/modes/theme/theme.ts +18 -5
  159. package/src/modes/types.ts +5 -5
  160. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  161. package/src/modes/utils/ui-helpers.ts +51 -49
  162. package/src/prompts/system/irc-incoming.md +3 -4
  163. package/src/prompts/system/orchestrate-notice.md +2 -2
  164. package/src/prompts/system/subagent-system-prompt.md +0 -5
  165. package/src/prompts/system/system-prompt.md +1 -0
  166. package/src/prompts/system/workflow-notice.md +2 -2
  167. package/src/prompts/tools/eval.md +3 -3
  168. package/src/prompts/tools/irc.md +29 -19
  169. package/src/prompts/tools/read.md +2 -2
  170. package/src/prompts/tools/task-summary.md +5 -16
  171. package/src/prompts/tools/task.md +38 -29
  172. package/src/registry/agent-lifecycle.ts +218 -0
  173. package/src/registry/agent-registry.ts +16 -5
  174. package/src/sdk.ts +37 -10
  175. package/src/secrets/index.ts +8 -1
  176. package/src/secrets/obfuscator.ts +39 -18
  177. package/src/session/agent-session.ts +422 -291
  178. package/src/session/messages.ts +11 -78
  179. package/src/session/session-history-format.ts +246 -0
  180. package/src/session/session-manager.ts +59 -5
  181. package/src/session/streaming-output.ts +226 -10
  182. package/src/slash-commands/acp-builtins.ts +24 -0
  183. package/src/slash-commands/builtin-registry.ts +20 -0
  184. package/src/slash-commands/types.ts +1 -1
  185. package/src/system-prompt.ts +14 -0
  186. package/src/task/executor.ts +851 -461
  187. package/src/task/index.ts +721 -796
  188. package/src/task/output-manager.ts +0 -11
  189. package/src/task/render.ts +148 -63
  190. package/src/task/repair-args.ts +21 -9
  191. package/src/task/types.ts +82 -66
  192. package/src/thinking.ts +7 -0
  193. package/src/tiny/title-client.ts +34 -5
  194. package/src/tiny/title-protocol.ts +1 -1
  195. package/src/tiny/worker.ts +6 -4
  196. package/src/tools/ask.ts +4 -2
  197. package/src/tools/bash.ts +61 -10
  198. package/src/tools/browser/tab-worker.ts +26 -7
  199. package/src/tools/browser.ts +28 -1
  200. package/src/tools/find.ts +2 -27
  201. package/src/tools/grouped-file-output.ts +1 -118
  202. package/src/tools/image-gen.ts +11 -4
  203. package/src/tools/index.ts +17 -13
  204. package/src/tools/inspect-image.ts +1 -0
  205. package/src/tools/irc.ts +596 -171
  206. package/src/tools/job.ts +41 -7
  207. package/src/tools/read.ts +57 -1
  208. package/src/tools/renderers.ts +2 -0
  209. package/src/tools/resolve.ts +4 -1
  210. package/src/utils/commit-message-generator.ts +1 -0
  211. package/src/utils/git.ts +267 -13
  212. package/src/utils/title-generator.ts +24 -5
  213. package/dist/types/async/support.d.ts +0 -2
  214. package/dist/types/modes/components/session-observer-overlay.d.ts +0 -11
  215. package/dist/types/task/simple-mode.d.ts +0 -8
  216. package/src/async/support.ts +0 -5
  217. package/src/task/simple-mode.ts +0 -27
@@ -1,58 +1,62 @@
1
1
  /**
2
- * IRC tool — agent-to-agent messaging.
2
+ * IRC tool — agent-to-agent messaging over the process-global IrcBus.
3
3
  *
4
- * Lets any live agent send a short prose message to any other live agent in
5
- * this process and (optionally) get a prose reply.
6
- *
7
- * Routing happens via the global AgentRegistry. Replies are produced by an
8
- * ephemeral side-channel call (`AgentSession.respondAsBackground`) that
9
- * mirrors `/btw`: the recipient's current model, system prompt, and message
10
- * history are used to compute a reply without persisting it through the
11
- * normal stream path. After the reply is generated, both the incoming
12
- * message and the auto-reply are queued for injection into the recipient's
13
- * persisted history (deferred until the recipient is idle), so the model
14
- * sees the exchange on its next turn.
15
- *
16
- * This avoids the deadlock that arises when the recipient is blocked on a
17
- * long-running tool call: the side-channel call does not depend on the
18
- * recipient's main agent loop being free.
4
+ * `send` is fire-and-forget: the bus routes the message to the recipient
5
+ * (waking idle agents with a real turn, reviving parked ones via the
6
+ * lifecycle manager, injecting a non-interrupting aside into busy ones) and
7
+ * returns delivery receipts immediately. Replies are real turns by the
8
+ * recipient, observed with `wait` (or the `await: true` send sugar). `inbox`
9
+ * drains pending messages; `list` shows every addressable peer.
19
10
  */
20
11
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
12
+ import { type Component } from "@oh-my-pi/pi-tui";
21
13
  import * as z from "zod/v4";
14
+ import type { Settings } from "../config/settings";
15
+ import type { RenderResultOptions } from "../extensibility/custom-tools/types";
16
+ import { type IrcDeliveryReceipt, type IrcMessage } from "../irc/bus";
17
+ import type { Theme } from "../modes/theme/theme";
22
18
  import type { ToolSession } from ".";
19
+ /**
20
+ * IRC availability: there must be someone to chat with. True for every
21
+ * subagent (it always has a parent, and possibly siblings) and for any
22
+ * session that can still spawn subagents through the task tool. Only a
23
+ * top-level session with task spawning unavailable has no peers — no irc.
24
+ */
25
+ export declare function isIrcEnabled(settings: Settings, taskDepth: number): boolean;
23
26
  declare const ircSchema: z.ZodObject<{
24
27
  op: z.ZodEnum<{
28
+ inbox: "inbox";
25
29
  list: "list";
26
30
  send: "send";
31
+ wait: "wait";
27
32
  }>;
28
33
  to: z.ZodOptional<z.ZodString>;
29
34
  message: z.ZodOptional<z.ZodString>;
30
- awaitReply: z.ZodOptional<z.ZodBoolean>;
35
+ replyTo: z.ZodOptional<z.ZodString>;
36
+ await: z.ZodOptional<z.ZodBoolean>;
37
+ from: z.ZodOptional<z.ZodString>;
38
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
39
+ peek: z.ZodOptional<z.ZodBoolean>;
31
40
  }, z.core.$strip>;
32
41
  type IrcParams = z.infer<typeof ircSchema>;
33
- interface IrcReply {
34
- from: string;
35
- text: string;
42
+ interface IrcPeerInfo {
43
+ id: string;
44
+ displayName: string;
45
+ kind: string;
46
+ status: string;
47
+ parentId?: string;
48
+ unread: number;
49
+ lastActivity: number;
36
50
  }
37
51
  export interface IrcDetails {
38
- op: "send" | "list";
52
+ op: "send" | "wait" | "inbox" | "list";
39
53
  from?: string;
40
54
  to?: string;
41
- delivered?: string[];
42
- replies?: IrcReply[];
43
- failed?: Array<{
44
- id: string;
45
- error: string;
46
- }>;
47
- notFound?: string[];
48
- peers?: Array<{
49
- id: string;
50
- displayName: string;
51
- kind: string;
52
- status: string;
53
- parentId?: string;
54
- }>;
55
- channels?: string[];
55
+ receipts?: IrcDeliveryReceipt[];
56
+ /** Message consumed by `wait` / `send await:true`; null when the wait timed out. */
57
+ waited?: IrcMessage | null;
58
+ inbox?: IrcMessage[];
59
+ peers?: IrcPeerInfo[];
56
60
  }
57
61
  export declare class IrcTool implements AgentTool<typeof ircSchema, IrcDetails> {
58
62
  #private;
@@ -60,16 +64,22 @@ export declare class IrcTool implements AgentTool<typeof ircSchema, IrcDetails>
60
64
  readonly name = "irc";
61
65
  readonly approval: "read";
62
66
  readonly label = "IRC";
63
- readonly summary = "Send and receive messages between agents over IRC-like channels";
67
+ readonly summary = "Send and receive messages between agents";
64
68
  readonly description: string;
65
69
  readonly parameters: z.ZodObject<{
66
70
  op: z.ZodEnum<{
71
+ inbox: "inbox";
67
72
  list: "list";
68
73
  send: "send";
74
+ wait: "wait";
69
75
  }>;
70
76
  to: z.ZodOptional<z.ZodString>;
71
77
  message: z.ZodOptional<z.ZodString>;
72
- awaitReply: z.ZodOptional<z.ZodBoolean>;
78
+ replyTo: z.ZodOptional<z.ZodString>;
79
+ await: z.ZodOptional<z.ZodBoolean>;
80
+ from: z.ZodOptional<z.ZodString>;
81
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
82
+ peek: z.ZodOptional<z.ZodBoolean>;
73
83
  }, z.core.$strip>;
74
84
  readonly strict = true;
75
85
  readonly loadMode = "discoverable";
@@ -77,4 +87,32 @@ export declare class IrcTool implements AgentTool<typeof ircSchema, IrcDetails>
77
87
  static createIf(session: ToolSession): IrcTool | null;
78
88
  execute(_toolCallId: string, params: IrcParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<IrcDetails>, _context?: AgentToolContext): Promise<AgentToolResult<IrcDetails>>;
79
89
  }
90
+ type IrcRenderArgs = Partial<IrcParams>;
91
+ /**
92
+ * Display-only transcript card for live IRC traffic: `irc:incoming` DMs
93
+ * delivered to this session and `irc:relay` observations of agent↔agent
94
+ * traffic. Shares the tool renderer's glyph + quote-border conventions so
95
+ * cards and `irc` tool output look identical in the transcript.
96
+ */
97
+ export declare function createIrcMessageCard(card: {
98
+ kind: "incoming" | "relay";
99
+ from?: string;
100
+ to?: string;
101
+ body?: string;
102
+ replyTo?: string;
103
+ timestamp?: number;
104
+ }, getExpanded: () => boolean, uiTheme: Theme): Component;
105
+ export declare const ircToolRenderer: {
106
+ inline: boolean;
107
+ mergeCallAndResult: boolean;
108
+ renderCall(args: IrcRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component;
109
+ renderResult(result: {
110
+ content: Array<{
111
+ type: string;
112
+ text?: string;
113
+ }>;
114
+ details?: IrcDetails;
115
+ isError?: boolean;
116
+ }, options: RenderResultOptions, uiTheme: Theme, args?: IrcRenderArgs): Component;
117
+ };
80
118
  export {};
@@ -27,6 +27,13 @@ export interface JobToolDetails {
27
27
  status: CancelStatus;
28
28
  }[];
29
29
  }
30
+ /**
31
+ * A poll snapshot where every watched job is still running and nothing was
32
+ * cancelled — pure "still waiting" noise once a newer poll exists. The TUI
33
+ * keeps such a block un-finalized (displaceable) so a follow-up `job` call
34
+ * replaces it instead of stacking another waiting frame in the transcript.
35
+ */
36
+ export declare function isWaitingPollDetails(details: unknown): boolean;
30
37
  export declare class JobTool implements AgentTool<typeof jobSchema, JobToolDetails> {
31
38
  #private;
32
39
  private readonly session;
@@ -43,7 +50,6 @@ export declare class JobTool implements AgentTool<typeof jobSchema, JobToolDetai
43
50
  readonly strict = true;
44
51
  readonly loadMode = "discoverable";
45
52
  constructor(session: ToolSession);
46
- static createIf(session: ToolSession): JobTool | null;
47
53
  execute(_toolCallId: string, params: JobParams, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<JobToolDetails>, _context?: AgentToolContext): Promise<AgentToolResult<JobToolDetails>>;
48
54
  }
49
55
  interface JobRenderArgs {
@@ -10,6 +10,7 @@ export interface GitRepository {
10
10
  gitEntryPath: string;
11
11
  headPath: string;
12
12
  repoRoot: string;
13
+ isReftable?: boolean;
13
14
  }
14
15
  export interface GitStatusSummary {
15
16
  staged: number;
@@ -327,7 +328,7 @@ export declare const ls: {
327
328
  };
328
329
  export declare const head: {
329
330
  /** Full HEAD state (branch, commit, repo info). */
330
- resolve(cwd: string): Promise<GitHeadState | null>;
331
+ resolve(cwd: string, signal?: AbortSignal): Promise<GitHeadState | null>;
331
332
  /** Full HEAD state (synchronous). */
332
333
  resolveSync(cwd: string): GitHeadState | null;
333
334
  /** Current HEAD commit SHA. */
@@ -338,12 +339,24 @@ export declare const head: {
338
339
  export declare const repo: {
339
340
  /** Resolve the repository root (may be a worktree root). */
340
341
  root(cwd: string, signal?: AbortSignal): Promise<string | null>;
341
- /** Resolve the primary repository root (not a worktree the main checkout). */
342
+ /** Resolve the primary checkout root, or the shared common dir for bare-repo worktrees. */
342
343
  primaryRoot(cwd: string, signal?: AbortSignal): Promise<string | null>;
344
+ /**
345
+ * Sync sibling of {@link primaryRoot}. Resolves only via on-disk `.git`/
346
+ * `commondir` walking — no subprocess fallback — so it stays usable from
347
+ * paths where async I/O is impractical (e.g. `computeBankScope`). Returns
348
+ * `null` when `cwd` is outside a repository. Bare-repo worktrees resolve to
349
+ * the shared common dir (`foo.git`) because they have no primary checkout.
350
+ */
351
+ primaryRootSync(cwd: string): string | null;
343
352
  /** Full GitRepository metadata (sync). */
344
353
  resolveSync(cwd: string): GitRepository | null;
345
354
  /** Full GitRepository metadata. */
346
355
  resolve(cwd: string): Promise<GitRepository | null>;
356
+ /** Check if the repository uses the reftable reference storage format (sync). */
357
+ isReftableSync(repository: GitRepository): boolean;
358
+ /** Check if the repository uses the reftable reference storage format. */
359
+ isReftable(repository: GitRepository): Promise<boolean>;
347
360
  };
348
361
  export interface GhCommandResult {
349
362
  exitCode: number;
@@ -15,9 +15,10 @@ export declare function raceFirstNonNull<T>(primary: Promise<T | null>, startFal
15
15
  * to produce request metadata (e.g. user_id for session attribution). Using a
16
16
  * resolver instead of a pre-evaluated value ensures the metadata's account_uuid
17
17
  * reflects the credential actually selected for this request.
18
+ * @param customSystemPrompt Optional title-specific system prompt override
18
19
  */
19
- export declare function generateSessionTitle(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined): Promise<string | null>;
20
- export declare function generateTitleOnline(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, signal?: AbortSignal): Promise<string | null>;
20
+ export declare function generateSessionTitle(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, customSystemPrompt?: string): Promise<string | null>;
21
+ export declare function generateTitleOnline(firstMessage: string, registry: ModelRegistry, settings: Settings, sessionId?: string, currentModel?: Model<Api>, metadataResolver?: (provider: string) => Record<string, unknown> | undefined, signal?: AbortSignal, customSystemPrompt?: string): Promise<string | null>;
21
22
  export declare function formatSessionTerminalTitle(sessionName: string | undefined, cwd?: string): string;
22
23
  /**
23
24
  * Set the terminal title using OSC 0 (sets both tab and window title). Unsupported terminals ignore it.
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "version": "1.0.0",
4
+ "homepage": "https://omp.sh",
4
5
  "type": "module",
5
6
  "omp": {
6
7
  "extensions": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-coding-agent",
4
- "version": "15.10.11",
4
+ "version": "15.11.0",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -47,15 +47,16 @@
47
47
  "@agentclientprotocol/sdk": "0.22.1",
48
48
  "@babel/parser": "^7.29.7",
49
49
  "@mozilla/readability": "^0.6.0",
50
- "@oh-my-pi/hashline": "15.10.11",
51
- "@oh-my-pi/omp-stats": "15.10.11",
52
- "@oh-my-pi/pi-agent-core": "15.10.11",
53
- "@oh-my-pi/pi-ai": "15.10.11",
54
- "@oh-my-pi/pi-catalog": "15.10.11",
55
- "@oh-my-pi/pi-mnemopi": "15.10.11",
56
- "@oh-my-pi/pi-natives": "15.10.11",
57
- "@oh-my-pi/pi-tui": "15.10.11",
58
- "@oh-my-pi/pi-utils": "15.10.11",
50
+ "@oh-my-pi/hashline": "15.11.0",
51
+ "@oh-my-pi/omp-stats": "15.11.0",
52
+ "@oh-my-pi/pi-agent-core": "15.11.0",
53
+ "@oh-my-pi/pi-ai": "15.11.0",
54
+ "@oh-my-pi/pi-catalog": "15.11.0",
55
+ "@oh-my-pi/pi-mnemopi": "15.11.0",
56
+ "@oh-my-pi/pi-natives": "15.11.0",
57
+ "@oh-my-pi/pi-tui": "15.11.0",
58
+ "@oh-my-pi/pi-utils": "15.11.0",
59
+ "@oh-my-pi/snapcompact": "15.11.0",
59
60
  "@opentelemetry/api": "^1.9.1",
60
61
  "@opentelemetry/context-async-hooks": "^2.7.1",
61
62
  "@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
@@ -51,25 +51,34 @@ async function cleanBundleOutputs(): Promise<void> {
51
51
  async function main(): Promise<void> {
52
52
  const start = Bun.nanoseconds();
53
53
  await cleanBundleOutputs();
54
- await runCommand([
55
- "bun",
56
- "build",
57
- "--target=bun",
58
- "--outdir",
59
- "dist",
60
- "--minify-whitespace",
61
- "--minify-syntax",
62
- "--keep-names",
63
- "--external",
64
- "mupdf",
65
- "--external",
66
- "@oh-my-pi/pi-natives",
67
- "--external",
68
- "@huggingface/transformers",
69
- "--define",
70
- 'process.env.PI_BUNDLED="true"',
71
- "./src/cli.ts",
72
- ]);
54
+ // The npm bundle ships no stats dashboard sources or prebuilt dist/client,
55
+ // so embed the dashboard archive the same way compiled binaries do
56
+ // (scripts/build-binary.ts). Reset afterwards to keep the checked-in
57
+ // placeholder empty.
58
+ await runCommand(["bun", "--cwd=../stats", "scripts/generate-client-bundle.ts", "--generate"]);
59
+ try {
60
+ await runCommand([
61
+ "bun",
62
+ "build",
63
+ "--target=bun",
64
+ "--outdir",
65
+ "dist",
66
+ "--minify-whitespace",
67
+ "--minify-syntax",
68
+ "--keep-names",
69
+ "--external",
70
+ "mupdf",
71
+ "--external",
72
+ "@oh-my-pi/pi-natives",
73
+ "--external",
74
+ "@huggingface/transformers",
75
+ "--define",
76
+ 'process.env.PI_BUNDLED="true"',
77
+ "./src/cli.ts",
78
+ ]);
79
+ } finally {
80
+ await runCommand(["bun", "--cwd=../stats", "scripts/generate-client-bundle.ts", "--reset"]);
81
+ }
73
82
  await ensureShebang();
74
83
  const stat = await fs.stat(cliPath);
75
84
  const elapsedMs = (Bun.nanoseconds() - start) / 1_000_000;
@@ -1,2 +1 @@
1
1
  export * from "./job-manager";
2
- export * from "./support";
@@ -86,6 +86,7 @@ async function classifyOnline(input: string, deps: ClassifyDifficultyDeps): Prom
86
86
  apiKey: deps.registry.resolver(model.provider, {
87
87
  sessionId: deps.sessionId,
88
88
  baseUrl: model.baseUrl,
89
+ modelId: model.id,
89
90
  }),
90
91
  maxTokens,
91
92
  disableReasoning: true,
package/src/cli/args.ts CHANGED
@@ -14,6 +14,7 @@ export interface Args {
14
14
  allowHome?: boolean;
15
15
  provider?: string;
16
16
  model?: string;
17
+ config?: string[];
17
18
  smol?: string;
18
19
  slow?: string;
19
20
  plan?: string;
@@ -111,6 +112,8 @@ export function parseArgs(inputArgs: string[], extensionFlags?: Map<string, { ty
111
112
  result.allowHome = true;
112
113
  } else if (arg === "--cwd" && i + 1 < args.length) {
113
114
  result.cwd = args[++i];
115
+ } else if (arg === "--config" && i + 1 < args.length) {
116
+ result.config = [...(result.config ?? []), args[++i]];
114
117
  } else if (arg === "--mode" && i + 1 < args.length) {
115
118
  const mode = args[++i];
116
119
  if (mode === "text" || mode === "json" || mode === "rpc" || mode === "acp" || mode === "rpc-ui") {
@@ -69,7 +69,7 @@ function fakeToolFor(name: string, fixture: GalleryFixture | undefined): AgentTo
69
69
  if (!fixture?.label && !fixture?.editMode && !fixture?.customRendered) return undefined;
70
70
  const tool: Record<string, unknown> = { name, label: fixture.label ?? name, mode: fixture.editMode };
71
71
  if (fixture.customRendered) {
72
- const renderer = toolRenderers[name] as
72
+ const renderer = toolRenderers[fixture.renderer ?? name] as
73
73
  | { renderCall?: unknown; renderResult?: unknown; mergeCallAndResult?: unknown; inline?: unknown }
74
74
  | undefined;
75
75
  if (renderer) {