@oh-my-pi/pi-coding-agent 17.2.5 → 17.2.7

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 (201) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/dist/{CHANGELOG-q2w43aw3.md → CHANGELOG-1p8yvde7.md} +35 -1
  3. package/dist/cli.js +3340 -3339
  4. package/dist/types/advisor/advise-tool.d.ts +10 -4
  5. package/dist/types/autoresearch/tools/init-experiment.d.ts +19 -7
  6. package/dist/types/autoresearch/tools/log-experiment.d.ts +19 -11
  7. package/dist/types/autoresearch/tools/run-experiment.d.ts +4 -2
  8. package/dist/types/autoresearch/tools/update-notes.d.ts +5 -2
  9. package/dist/types/cli/gc-cli.d.ts +1 -0
  10. package/dist/types/commit/agentic/tools/analyze-file.d.ts +5 -2
  11. package/dist/types/commit/agentic/tools/git-file-diff.d.ts +5 -2
  12. package/dist/types/commit/agentic/tools/git-hunk.d.ts +6 -2
  13. package/dist/types/commit/agentic/tools/git-overview.d.ts +5 -2
  14. package/dist/types/commit/agentic/tools/propose-changelog.d.ts +29 -7
  15. package/dist/types/commit/agentic/tools/propose-commit.d.ts +14 -4
  16. package/dist/types/commit/agentic/tools/recent-commits.d.ts +4 -2
  17. package/dist/types/commit/agentic/tools/schemas.d.ts +7 -3
  18. package/dist/types/commit/agentic/tools/split-commit.d.ts +37 -10
  19. package/dist/types/commit/changelog/generate.d.ts +13 -3
  20. package/dist/types/commit/shared-llm.d.ts +13 -4
  21. package/dist/types/config/config-file.d.ts +1 -1
  22. package/dist/types/config/models-config-schema-bundle.d.ts +1992 -981
  23. package/dist/types/config/models-config-schema.d.ts +1201 -580
  24. package/dist/types/config/models-config.d.ts +355 -371
  25. package/dist/types/edit/hashline/params.d.ts +4 -2
  26. package/dist/types/edit/modes/apply-patch.d.ts +4 -2
  27. package/dist/types/edit/modes/patch.d.ts +16 -5
  28. package/dist/types/edit/modes/replace.d.ts +8 -3
  29. package/dist/types/eval/bridge-timeout.d.ts +5 -2
  30. package/dist/types/eval/completion-bridge.d.ts +13 -0
  31. package/dist/types/eval/py/tool-bridge.d.ts +12 -0
  32. package/dist/types/extensibility/custom-commands/types.d.ts +4 -4
  33. package/dist/types/extensibility/custom-tools/types.d.ts +4 -4
  34. package/dist/types/extensibility/extensions/types.d.ts +4 -4
  35. package/dist/types/extensibility/hooks/types.d.ts +4 -4
  36. package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +1 -1
  37. package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +1 -1
  38. package/dist/types/extensibility/legacy-typebox.d.ts +8 -0
  39. package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +6 -13
  40. package/dist/types/goals/tools/goal-tool.d.ts +12 -4
  41. package/dist/types/launch/client.d.ts +9 -1
  42. package/dist/types/launch/protocol.d.ts +17 -0
  43. package/dist/types/lsp/index.d.ts +15 -5
  44. package/dist/types/lsp/types.d.ts +15 -5
  45. package/dist/types/modes/components/btw-panel.d.ts +3 -0
  46. package/dist/types/modes/controllers/btw-controller.d.ts +2 -0
  47. package/dist/types/modes/controllers/command-controller.d.ts +1 -0
  48. package/dist/types/modes/interactive-mode.d.ts +4 -1
  49. package/dist/types/modes/types.d.ts +3 -1
  50. package/dist/types/security/contracts/schemas.d.ts +1115 -537
  51. package/dist/types/security/publication.d.ts +92 -34
  52. package/dist/types/session/agent-session-types.d.ts +5 -0
  53. package/dist/types/session/agent-session.d.ts +26 -2
  54. package/dist/types/session/launch-completion.d.ts +10 -0
  55. package/dist/types/session/session-entries.d.ts +15 -1
  56. package/dist/types/session/session-manager.d.ts +7 -0
  57. package/dist/types/session/yield-queue.d.ts +6 -1
  58. package/dist/types/task/types.d.ts +63 -18
  59. package/dist/types/tools/ask.d.ts +34 -8
  60. package/dist/types/tools/ast-edit.d.ts +16 -4
  61. package/dist/types/tools/ast-grep.d.ts +12 -4
  62. package/dist/types/tools/bash.d.ts +20 -11
  63. package/dist/types/tools/browser.d.ts +64 -20
  64. package/dist/types/tools/checkpoint.d.ts +16 -8
  65. package/dist/types/tools/computer.d.ts +1 -1
  66. package/dist/types/tools/debug.d.ts +118 -48
  67. package/dist/types/tools/eval.d.ts +11 -5
  68. package/dist/types/tools/gh.d.ts +74 -26
  69. package/dist/types/tools/glob.d.ts +16 -6
  70. package/dist/types/tools/grep.d.ts +18 -6
  71. package/dist/types/tools/hub/index.d.ts +116 -46
  72. package/dist/types/tools/image-gen.d.ts +25 -8
  73. package/dist/types/tools/index.d.ts +9 -0
  74. package/dist/types/tools/inspect-image.d.ts +10 -4
  75. package/dist/types/tools/learn.d.ts +26 -8
  76. package/dist/types/tools/manage-skill.d.ts +16 -6
  77. package/dist/types/tools/memory-edit.d.ts +18 -6
  78. package/dist/types/tools/memory-recall.d.ts +8 -4
  79. package/dist/types/tools/memory-reflect.d.ts +10 -4
  80. package/dist/types/tools/memory-retain.d.ts +14 -4
  81. package/dist/types/tools/read.d.ts +8 -4
  82. package/dist/types/tools/security-scan.d.ts +82 -30
  83. package/dist/types/tools/todo.d.ts +30 -10
  84. package/dist/types/tools/tts.d.ts +12 -5
  85. package/dist/types/tools/vibe.d.ts +42 -18
  86. package/dist/types/tools/write.d.ts +10 -4
  87. package/dist/types/web/search/index.d.ts +20 -6
  88. package/package.json +13 -13
  89. package/scripts/legacy-pi-virtual-module.ts +2 -2
  90. package/src/advisor/advise-tool.ts +1 -1
  91. package/src/advisor/config.ts +1 -1
  92. package/src/autoresearch/tools/init-experiment.ts +1 -2
  93. package/src/autoresearch/tools/log-experiment.ts +1 -2
  94. package/src/autoresearch/tools/run-experiment.ts +1 -1
  95. package/src/autoresearch/tools/update-notes.ts +1 -1
  96. package/src/cli/gc-cli.ts +641 -21
  97. package/src/commit/agentic/tools/analyze-file.ts +1 -1
  98. package/src/commit/agentic/tools/git-file-diff.ts +1 -1
  99. package/src/commit/agentic/tools/git-hunk.ts +1 -1
  100. package/src/commit/agentic/tools/git-overview.ts +1 -1
  101. package/src/commit/agentic/tools/propose-changelog.ts +1 -1
  102. package/src/commit/agentic/tools/propose-commit.ts +1 -1
  103. package/src/commit/agentic/tools/recent-commits.ts +1 -1
  104. package/src/commit/agentic/tools/schemas.ts +1 -1
  105. package/src/commit/agentic/tools/split-commit.ts +1 -1
  106. package/src/commit/analysis/summary.ts +1 -1
  107. package/src/commit/changelog/generate.ts +1 -1
  108. package/src/config/config-file.ts +2 -2
  109. package/src/config/model-discovery.ts +14 -14
  110. package/src/config/model-registry.ts +10 -8
  111. package/src/config/models-config-schema-bundle.ts +1 -8
  112. package/src/config/settings.ts +1 -1
  113. package/src/discovery/codex.ts +22 -9
  114. package/src/edit/hashline/params.ts +1 -1
  115. package/src/edit/modes/apply-patch.ts +1 -1
  116. package/src/edit/modes/patch.ts +1 -1
  117. package/src/edit/modes/replace.ts +2 -1
  118. package/src/eval/agent-bridge.ts +4 -2
  119. package/src/eval/bridge-timeout.ts +5 -2
  120. package/src/eval/completion-bridge.ts +3 -2
  121. package/src/eval/executor-base.ts +20 -1
  122. package/src/eval/js/context-manager.ts +94 -6
  123. package/src/eval/py/tool-bridge.ts +29 -9
  124. package/src/export/html/index.ts +10 -3
  125. package/src/export/share.ts +4 -0
  126. package/src/extensibility/custom-commands/loader.ts +3 -3
  127. package/src/extensibility/custom-commands/types.ts +4 -4
  128. package/src/extensibility/custom-tools/loader.ts +3 -3
  129. package/src/extensibility/custom-tools/types.ts +5 -4
  130. package/src/extensibility/extensions/loader.ts +3 -3
  131. package/src/extensibility/extensions/types.ts +5 -4
  132. package/src/extensibility/hooks/loader.ts +3 -3
  133. package/src/extensibility/hooks/types.ts +4 -4
  134. package/src/extensibility/legacy-pi-ai-shim.ts +1 -1
  135. package/src/extensibility/legacy-pi-coding-agent-shim.ts +2 -2
  136. package/src/extensibility/legacy-typebox.ts +101 -0
  137. package/src/extensibility/plugins/legacy-pi-compat.ts +13 -22
  138. package/src/goals/tools/goal-tool.ts +1 -1
  139. package/src/launch/broker.ts +222 -6
  140. package/src/launch/client.ts +161 -9
  141. package/src/launch/protocol.ts +52 -0
  142. package/src/lsp/types.ts +1 -1
  143. package/src/main.ts +13 -6
  144. package/src/mcp/config-writer.ts +1 -1
  145. package/src/modes/components/btw-panel.ts +41 -4
  146. package/src/modes/controllers/btw-controller.ts +55 -7
  147. package/src/modes/controllers/command-controller.ts +31 -0
  148. package/src/modes/controllers/input-controller.ts +24 -7
  149. package/src/modes/interactive-mode.ts +16 -2
  150. package/src/modes/theme/theme.ts +3 -3
  151. package/src/modes/types.ts +8 -1
  152. package/src/prompts/session/launch-completion.md +1 -0
  153. package/src/sdk.ts +15 -0
  154. package/src/security/contracts/schemas.ts +202 -184
  155. package/src/security/contracts/validation.ts +6 -2
  156. package/src/security/publication.ts +1 -1
  157. package/src/security/store.ts +2 -2
  158. package/src/session/agent-session-types.ts +6 -0
  159. package/src/session/agent-session.ts +190 -14
  160. package/src/session/launch-completion.ts +37 -0
  161. package/src/session/session-context.ts +26 -0
  162. package/src/session/session-entries.ts +17 -1
  163. package/src/session/session-manager.ts +21 -0
  164. package/src/session/yield-queue.ts +121 -16
  165. package/src/slash-commands/builtin-registry.ts +10 -1
  166. package/src/task/types.ts +1 -1
  167. package/src/tools/ask.ts +1 -1
  168. package/src/tools/ast-edit.ts +1 -1
  169. package/src/tools/ast-grep.ts +1 -1
  170. package/src/tools/bash.ts +61 -3
  171. package/src/tools/browser/cmux/cmux-tab.ts +92 -4
  172. package/src/tools/browser.ts +1 -1
  173. package/src/tools/checkpoint.ts +1 -1
  174. package/src/tools/computer.ts +1 -1
  175. package/src/tools/debug.ts +1 -1
  176. package/src/tools/eval.ts +1 -1
  177. package/src/tools/gh.ts +1 -2
  178. package/src/tools/glob.ts +1 -1
  179. package/src/tools/grep.ts +1 -1
  180. package/src/tools/hub/index.ts +1 -1
  181. package/src/tools/hub/launch.ts +122 -6
  182. package/src/tools/image-gen.ts +1 -1
  183. package/src/tools/index.ts +9 -0
  184. package/src/tools/inspect-image.ts +1 -1
  185. package/src/tools/learn.ts +1 -1
  186. package/src/tools/manage-skill.ts +1 -1
  187. package/src/tools/memory-edit.ts +1 -1
  188. package/src/tools/memory-recall.ts +1 -1
  189. package/src/tools/memory-reflect.ts +1 -1
  190. package/src/tools/memory-retain.ts +1 -1
  191. package/src/tools/read.ts +1 -1
  192. package/src/tools/security-scan.ts +1 -1
  193. package/src/tools/todo.ts +1 -1
  194. package/src/tools/tts.ts +1 -1
  195. package/src/tools/vibe.ts +2 -1
  196. package/src/tools/write.ts +1 -1
  197. package/src/web/search/index.ts +2 -1
  198. package/dist/types/config/file-lock.d.ts +0 -29
  199. package/dist/types/extensibility/typebox.d.ts +0 -181
  200. package/src/config/file-lock.ts +0 -164
  201. package/src/extensibility/typebox.ts +0 -958
@@ -5,13 +5,19 @@ import type { Theme } from "../modes/theme/theme.js";
5
5
  import { type TruncationResult } from "../session/streaming-output.js";
6
6
  import type { ToolSession } from "./index.js";
7
7
  import type { OutputMeta } from "./output-meta.js";
8
- declare const searchSchema: import("arktype/internal/variants/object.ts").ObjectType<{
9
- pattern: string;
8
+ declare const searchSchema: import("@oh-my-pi/omptype").FluentType<{
9
+ case?: boolean | undefined;
10
+ gitignore?: boolean | undefined;
10
11
  path?: string | undefined;
12
+ pattern: string;
13
+ skip?: number | null | undefined;
14
+ }, {
11
15
  case?: boolean | undefined;
12
16
  gitignore?: boolean | undefined;
17
+ path?: string | undefined;
18
+ pattern: string;
13
19
  skip?: number | null | undefined;
14
- }, {}>;
20
+ }>;
15
21
  export type GrepToolInput = typeof searchSchema.infer;
16
22
  /** Maximum number of distinct files surfaced in a single response. The
17
23
  * agent paginates further pages via `skip`. */
@@ -79,13 +85,19 @@ export declare class GrepTool implements AgentTool<typeof searchSchema, GrepTool
79
85
  readonly loadMode = "discoverable";
80
86
  readonly summary = "Grep file contents using ripgrep (fast regex search)";
81
87
  get description(): string;
82
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
83
- pattern: string;
88
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
89
+ case?: boolean | undefined;
90
+ gitignore?: boolean | undefined;
84
91
  path?: string | undefined;
92
+ pattern: string;
93
+ skip?: number | null | undefined;
94
+ }, {
85
95
  case?: boolean | undefined;
86
96
  gitignore?: boolean | undefined;
97
+ path?: string | undefined;
98
+ pattern: string;
87
99
  skip?: number | null | undefined;
88
- }, {}>;
100
+ }>;
89
101
  readonly strict = true;
90
102
  constructor(session: ToolSession, options?: GrepToolOptions);
91
103
  execute(_toolCallId: string, params: SearchParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<GrepToolDetails>, _toolContext?: AgentToolContext): Promise<AgentToolResult<GrepToolDetails>>;
@@ -25,46 +25,81 @@ export { isWaitingPollDetails } from "./jobs.js";
25
25
  export type { LaunchParams, LaunchToolDetails } from "./launch.js";
26
26
  export { createIrcMessageCard, isIrcEnabled } from "./messaging.js";
27
27
  export * from "./types.js";
28
- declare const hubSchema: import("arktype/internal/variants/object.ts").ObjectType<{
29
- op: "cancel" | "describe" | "inbox" | "jobs" | "list" | "logs" | "ps" | "restart" | "send" | "start" | "stop" | "wait";
30
- to?: string | undefined;
31
- message?: string | undefined;
32
- replyTo?: string | undefined;
28
+ declare const hubSchema: import("@oh-my-pi/omptype").FluentType<{
29
+ application?: string | undefined;
30
+ args?: string[] | undefined;
33
31
  await?: boolean | undefined;
32
+ cursor?: number | undefined;
33
+ cwd?: string | undefined;
34
+ detached?: boolean | undefined;
35
+ enter?: boolean | undefined;
36
+ env?: Record<string, string> | undefined;
37
+ follow?: boolean | undefined;
38
+ for?: "exit" | "ready" | undefined;
34
39
  from?: string | undefined;
40
+ grep?: string | undefined;
41
+ head?: boolean | undefined;
35
42
  ids?: string[] | undefined;
36
- timeoutMs?: number | undefined;
37
- peek?: boolean | undefined;
43
+ keys?: string[] | undefined;
44
+ lines?: number | undefined;
45
+ message?: string | undefined;
38
46
  name?: string | undefined;
39
- application?: string | undefined;
40
- args?: string[] | undefined;
41
- env?: {
42
- [x: string]: string;
43
- } | undefined;
44
- cwd?: string | undefined;
47
+ op: "cancel" | "describe" | "inbox" | "jobs" | "list" | "logs" | "ps" | "restart" | "send" | "start" | "stop" | "wait";
48
+ pattern?: string | undefined;
49
+ peek?: boolean | undefined;
50
+ persist?: boolean | undefined;
45
51
  pty?: boolean | undefined;
46
52
  ready?: {
53
+ host?: string | undefined;
47
54
  log?: string | undefined;
48
55
  port?: number | undefined;
49
- host?: string | undefined;
50
56
  timeout?: number | undefined;
51
57
  } | undefined;
58
+ replyTo?: string | undefined;
52
59
  restart?: "always" | "no" | "on-failure" | undefined;
53
- persist?: boolean | undefined;
60
+ signal?: "SIGHUP" | "SIGINT" | "SIGKILL" | "SIGQUIT" | "SIGTERM" | undefined;
61
+ text?: string | undefined;
62
+ timeout?: number | undefined;
63
+ timeoutMs?: number | undefined;
64
+ to?: string | undefined;
65
+ }, {
66
+ application?: string | undefined;
67
+ args?: string[] | undefined;
68
+ await?: boolean | undefined;
69
+ cursor?: number | undefined;
70
+ cwd?: string | undefined;
54
71
  detached?: boolean | undefined;
55
- lines?: number | undefined;
56
- head?: boolean | undefined;
57
- grep?: string | undefined;
72
+ enter?: boolean | undefined;
73
+ env?: Record<string, string> | undefined;
58
74
  follow?: boolean | undefined;
59
- cursor?: number | undefined;
60
75
  for?: "exit" | "ready" | undefined;
61
- pattern?: string | undefined;
62
- text?: string | undefined;
63
- enter?: boolean | undefined;
76
+ from?: string | undefined;
77
+ grep?: string | undefined;
78
+ head?: boolean | undefined;
79
+ ids?: string[] | undefined;
64
80
  keys?: string[] | undefined;
81
+ lines?: number | undefined;
82
+ message?: string | undefined;
83
+ name?: string | undefined;
84
+ op: "cancel" | "describe" | "inbox" | "jobs" | "list" | "logs" | "ps" | "restart" | "send" | "start" | "stop" | "wait";
85
+ pattern?: string | undefined;
86
+ peek?: boolean | undefined;
87
+ persist?: boolean | undefined;
88
+ pty?: boolean | undefined;
89
+ ready?: {
90
+ host?: string | undefined;
91
+ log?: string | undefined;
92
+ port?: number | undefined;
93
+ timeout?: number | undefined;
94
+ } | undefined;
95
+ replyTo?: string | undefined;
96
+ restart?: "always" | "no" | "on-failure" | undefined;
65
97
  signal?: "SIGHUP" | "SIGINT" | "SIGKILL" | "SIGQUIT" | "SIGTERM" | undefined;
98
+ text?: string | undefined;
66
99
  timeout?: number | undefined;
67
- }, {}>;
100
+ timeoutMs?: number | undefined;
101
+ to?: string | undefined;
102
+ }>;
68
103
  type HubParams = typeof hubSchema.infer;
69
104
  /** Mutating process ops require exec approval; messaging, jobs, and inspection are read-only. */
70
105
  declare function hubApproval(params: unknown): ToolApprovalDecision;
@@ -76,46 +111,81 @@ export declare class HubTool implements AgentTool<typeof hubSchema, HubDetails>
76
111
  readonly label = "Hub";
77
112
  readonly summary = "Message peer agents, control background jobs, and supervise long-running processes";
78
113
  readonly description: string;
79
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
80
- op: "cancel" | "describe" | "inbox" | "jobs" | "list" | "logs" | "ps" | "restart" | "send" | "start" | "stop" | "wait";
81
- to?: string | undefined;
82
- message?: string | undefined;
83
- replyTo?: string | undefined;
114
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
115
+ application?: string | undefined;
116
+ args?: string[] | undefined;
84
117
  await?: boolean | undefined;
118
+ cursor?: number | undefined;
119
+ cwd?: string | undefined;
120
+ detached?: boolean | undefined;
121
+ enter?: boolean | undefined;
122
+ env?: Record<string, string> | undefined;
123
+ follow?: boolean | undefined;
124
+ for?: "exit" | "ready" | undefined;
85
125
  from?: string | undefined;
126
+ grep?: string | undefined;
127
+ head?: boolean | undefined;
86
128
  ids?: string[] | undefined;
87
- timeoutMs?: number | undefined;
88
- peek?: boolean | undefined;
129
+ keys?: string[] | undefined;
130
+ lines?: number | undefined;
131
+ message?: string | undefined;
89
132
  name?: string | undefined;
90
- application?: string | undefined;
91
- args?: string[] | undefined;
92
- env?: {
93
- [x: string]: string;
94
- } | undefined;
95
- cwd?: string | undefined;
133
+ op: "cancel" | "describe" | "inbox" | "jobs" | "list" | "logs" | "ps" | "restart" | "send" | "start" | "stop" | "wait";
134
+ pattern?: string | undefined;
135
+ peek?: boolean | undefined;
136
+ persist?: boolean | undefined;
96
137
  pty?: boolean | undefined;
97
138
  ready?: {
139
+ host?: string | undefined;
98
140
  log?: string | undefined;
99
141
  port?: number | undefined;
100
- host?: string | undefined;
101
142
  timeout?: number | undefined;
102
143
  } | undefined;
144
+ replyTo?: string | undefined;
103
145
  restart?: "always" | "no" | "on-failure" | undefined;
104
- persist?: boolean | undefined;
146
+ signal?: "SIGHUP" | "SIGINT" | "SIGKILL" | "SIGQUIT" | "SIGTERM" | undefined;
147
+ text?: string | undefined;
148
+ timeout?: number | undefined;
149
+ timeoutMs?: number | undefined;
150
+ to?: string | undefined;
151
+ }, {
152
+ application?: string | undefined;
153
+ args?: string[] | undefined;
154
+ await?: boolean | undefined;
155
+ cursor?: number | undefined;
156
+ cwd?: string | undefined;
105
157
  detached?: boolean | undefined;
106
- lines?: number | undefined;
107
- head?: boolean | undefined;
108
- grep?: string | undefined;
158
+ enter?: boolean | undefined;
159
+ env?: Record<string, string> | undefined;
109
160
  follow?: boolean | undefined;
110
- cursor?: number | undefined;
111
161
  for?: "exit" | "ready" | undefined;
112
- pattern?: string | undefined;
113
- text?: string | undefined;
114
- enter?: boolean | undefined;
162
+ from?: string | undefined;
163
+ grep?: string | undefined;
164
+ head?: boolean | undefined;
165
+ ids?: string[] | undefined;
115
166
  keys?: string[] | undefined;
167
+ lines?: number | undefined;
168
+ message?: string | undefined;
169
+ name?: string | undefined;
170
+ op: "cancel" | "describe" | "inbox" | "jobs" | "list" | "logs" | "ps" | "restart" | "send" | "start" | "stop" | "wait";
171
+ pattern?: string | undefined;
172
+ peek?: boolean | undefined;
173
+ persist?: boolean | undefined;
174
+ pty?: boolean | undefined;
175
+ ready?: {
176
+ host?: string | undefined;
177
+ log?: string | undefined;
178
+ port?: number | undefined;
179
+ timeout?: number | undefined;
180
+ } | undefined;
181
+ replyTo?: string | undefined;
182
+ restart?: "always" | "no" | "on-failure" | undefined;
116
183
  signal?: "SIGHUP" | "SIGINT" | "SIGKILL" | "SIGQUIT" | "SIGTERM" | undefined;
184
+ text?: string | undefined;
117
185
  timeout?: number | undefined;
118
- }, {}>;
186
+ timeoutMs?: number | undefined;
187
+ to?: string | undefined;
188
+ }>;
119
189
  readonly strict = true;
120
190
  readonly interruptible: (params: Partial<HubParams>) => boolean;
121
191
  readonly loadMode = "essential";
@@ -4,25 +4,42 @@ import type { CustomTool } from "../extensibility/custom-tools/types.js";
4
4
  import { type ImageProvider } from "./image-providers.js";
5
5
  export type { ImageProvider } from "./image-providers.js";
6
6
  export type ImageProviderPreference = ImageProvider | "auto";
7
- declare const responseModalitySchema: import("arktype/internal/variants/string.ts").StringType<"IMAGE" | "TEXT", {}>;
8
- export declare const imageGenSchema: import("arktype/internal/variants/object.ts").ObjectType<{
9
- subject: string;
7
+ declare const responseModalitySchema: import("@oh-my-pi/omptype").FluentType<"IMAGE" | "TEXT", "IMAGE" | "TEXT">;
8
+ export declare const imageGenSchema: import("@oh-my-pi/omptype").FluentType<{
10
9
  action?: string | undefined;
11
- scene?: string | undefined;
10
+ aspect_ratio?: "16:9" | "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "9:16" | undefined;
11
+ changes?: string[] | undefined;
12
12
  composition?: string | undefined;
13
+ image_size?: "1024x1024" | "1024x1536" | "1536x1024" | undefined;
14
+ input?: {
15
+ data?: string | undefined;
16
+ mime_type?: string | undefined;
17
+ path?: string | undefined;
18
+ }[] | undefined;
13
19
  lighting?: string | undefined;
20
+ provider?: "auto" | ImageProvider | undefined;
21
+ scene?: string | undefined;
14
22
  style?: string | undefined;
23
+ subject: string;
15
24
  text?: string | undefined;
16
- changes?: string[] | undefined;
25
+ }, {
26
+ action?: string | undefined;
17
27
  aspect_ratio?: "16:9" | "1:1" | "2:3" | "3:2" | "3:4" | "4:3" | "9:16" | undefined;
28
+ changes?: string[] | undefined;
29
+ composition?: string | undefined;
18
30
  image_size?: "1024x1024" | "1024x1536" | "1536x1024" | undefined;
19
31
  input?: {
20
- path?: string | undefined;
21
32
  data?: string | undefined;
22
33
  mime_type?: string | undefined;
34
+ path?: string | undefined;
23
35
  }[] | undefined;
24
- provider?: "antigravity" | "auto" | "gemini" | "openai" | "openai-codex" | "openrouter" | "xai" | undefined;
25
- }, {}>;
36
+ lighting?: string | undefined;
37
+ provider?: "auto" | ImageProvider | undefined;
38
+ scene?: string | undefined;
39
+ style?: string | undefined;
40
+ subject: string;
41
+ text?: string | undefined;
42
+ }>;
26
43
  export type ImageGenParams = typeof imageGenSchema.infer;
27
44
  export type GeminiResponseModality = typeof responseModalitySchema.infer;
28
45
  interface GeminiSafetyRating {
@@ -10,6 +10,7 @@ import type { Skill } from "../extensibility/skills.js";
10
10
  import type { GoalModeState, GoalRuntime } from "../goals/index.js";
11
11
  import type { HindsightSessionState } from "../hindsight/state.js";
12
12
  import type { LocalProtocolOptions } from "../internal-urls/index.js";
13
+ import type { DaemonCompletionNotification } from "../launch/protocol.js";
13
14
  import type { MCPManager } from "../mcp/index.js";
14
15
  import type { MnemopiSessionState } from "../mnemopi/state.js";
15
16
  import type { PlanModeState } from "../plan-mode/state.js";
@@ -115,6 +116,8 @@ export interface ToolSession {
115
116
  additionalDirectories?: string[];
116
117
  /** Whether UI is available */
117
118
  hasUI: boolean;
119
+ /** Whether this session has begun disposal. */
120
+ isDisposed?: () => boolean;
118
121
  /**
119
122
  * Suppress the spawn specialization/coordination advisory appended to `task`
120
123
  * results. Set by internal/programmatic callers (e.g. the commit agent's
@@ -345,6 +348,12 @@ export interface ToolSession {
345
348
  noopLoopGuard?: import("../edit/hashline/noop-loop-guard.js").NoopLoopGuard;
346
349
  /** Queue a hidden message to be injected at the next agent turn. */
347
350
  queueDeferredMessage?(message: CustomMessage): void;
351
+ /** Queue a broker supervised-process completion for the owning session. */
352
+ queueLaunchCompletion?(notification: DaemonCompletionNotification): Promise<void>;
353
+ /** Register cleanup that runs when this session is disposed; returns a handle that removes the cleanup. */
354
+ registerDisposeCallback?(callback: () => void): (() => void) | void;
355
+ /** Register cleanup that runs when this ToolSession adopts a different session ID. */
356
+ registerSessionChangeCallback?(callback: () => void): (() => void) | void;
348
357
  /** Queue late LSP diagnostics (arrived after an edit/write returned) to be shown
349
358
  * in the transcript and delivered to the model at the next yield, like background
350
359
  * job results. */
@@ -1,10 +1,13 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
2
  import { completeSimple, type ToolExample } from "@oh-my-pi/pi-ai";
3
3
  import type { ToolSession } from "./index.js";
4
- declare const inspectImageSchema: import("arktype/internal/variants/object.ts").ObjectType<{
4
+ declare const inspectImageSchema: import("@oh-my-pi/omptype").FluentType<{
5
5
  path: string;
6
6
  question: string;
7
- }, {}>;
7
+ }, {
8
+ path: string;
9
+ question: string;
10
+ }>;
8
11
  export type InspectImageParams = typeof inspectImageSchema.infer;
9
12
  export interface InspectImageToolDetails {
10
13
  model: string;
@@ -20,10 +23,13 @@ export declare class InspectImageTool implements AgentTool<typeof inspectImageSc
20
23
  readonly loadMode = "discoverable";
21
24
  readonly summary = "Describe or analyze an image file";
22
25
  readonly description: string;
23
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
26
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
27
+ path: string;
28
+ question: string;
29
+ }, {
24
30
  path: string;
25
31
  question: string;
26
- }, {}>;
32
+ }>;
27
33
  readonly strict = false;
28
34
  readonly examples: readonly ToolExample<typeof inspectImageSchema.infer>[];
29
35
  constructor(session: ToolSession, completeImageRequest?: typeof completeSimple);
@@ -1,15 +1,24 @@
1
1
  import type { AgentTool, AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolSession } from "./index.js";
3
- declare const learnSchema: import("arktype/internal/variants/object.ts").ObjectType<{
4
- memory: string;
3
+ declare const learnSchema: import("@oh-my-pi/omptype").FluentType<{
5
4
  context?: string | undefined;
5
+ memory: string;
6
6
  skill?: {
7
7
  action: "create" | "update";
8
- name: string;
8
+ body: string;
9
9
  description: string;
10
+ name: string;
11
+ } | undefined;
12
+ }, {
13
+ context?: string | undefined;
14
+ memory: string;
15
+ skill?: {
16
+ action: "create" | "update";
10
17
  body: string;
18
+ description: string;
19
+ name: string;
11
20
  } | undefined;
12
- }, {}>;
21
+ }>;
13
22
  export type LearnParams = typeof learnSchema.infer;
14
23
  /**
15
24
  * Orchestrating "learn" tool: persists a lesson to long-term memory and,
@@ -24,16 +33,25 @@ export declare class LearnTool implements AgentTool<typeof learnSchema> {
24
33
  readonly approval: (args: unknown) => "read" | "write";
25
34
  readonly label = "Learn";
26
35
  readonly description: string;
27
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
28
- memory: string;
36
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
29
37
  context?: string | undefined;
38
+ memory: string;
30
39
  skill?: {
31
40
  action: "create" | "update";
32
- name: string;
41
+ body: string;
33
42
  description: string;
43
+ name: string;
44
+ } | undefined;
45
+ }, {
46
+ context?: string | undefined;
47
+ memory: string;
48
+ skill?: {
49
+ action: "create" | "update";
34
50
  body: string;
51
+ description: string;
52
+ name: string;
35
53
  } | undefined;
36
- }, {}>;
54
+ }>;
37
55
  readonly strict = true;
38
56
  readonly loadMode: "essential";
39
57
  readonly summary = "Capture a reusable lesson to memory (and optionally a managed skill)";
@@ -1,11 +1,16 @@
1
1
  import type { AgentTool, AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolSession } from "./index.js";
3
- declare const manageSkillSchema: import("arktype/internal/variants/object.ts").ObjectType<{
3
+ declare const manageSkillSchema: import("@oh-my-pi/omptype").FluentType<{
4
4
  action: "create" | "delete" | "update";
5
- name: string;
5
+ body?: string | undefined;
6
6
  description?: string | undefined;
7
+ name: string;
8
+ }, {
9
+ action: "create" | "delete" | "update";
7
10
  body?: string | undefined;
8
- }, {}>;
11
+ description?: string | undefined;
12
+ name: string;
13
+ }>;
9
14
  export type ManageSkillParams = typeof manageSkillSchema.infer;
10
15
  /**
11
16
  * Direct create/update/delete of isolated managed skills. Gated behind
@@ -17,12 +22,17 @@ export declare class ManageSkillTool implements AgentTool<typeof manageSkillSche
17
22
  readonly approval: "write";
18
23
  readonly label = "Manage Skill";
19
24
  readonly description: string;
20
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
25
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
21
26
  action: "create" | "delete" | "update";
22
- name: string;
27
+ body?: string | undefined;
23
28
  description?: string | undefined;
29
+ name: string;
30
+ }, {
31
+ action: "create" | "delete" | "update";
24
32
  body?: string | undefined;
25
- }, {}>;
33
+ description?: string | undefined;
34
+ name: string;
35
+ }>;
26
36
  readonly strict = true;
27
37
  readonly loadMode: "essential";
28
38
  readonly summary = "Create, update, or delete an isolated managed skill";
@@ -1,12 +1,18 @@
1
1
  import type { AgentTool, AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolSession } from "./index.js";
3
- declare const memoryEditSchema: import("arktype/internal/variants/object.ts").ObjectType<{
4
- op: "forget" | "invalidate" | "update";
3
+ declare const memoryEditSchema: import("@oh-my-pi/omptype").FluentType<{
4
+ content?: string | undefined;
5
5
  id: string;
6
+ importance?: number | undefined;
7
+ op: "forget" | "invalidate" | "update";
8
+ replacement_id?: string | undefined;
9
+ }, {
6
10
  content?: string | undefined;
11
+ id: string;
7
12
  importance?: number | undefined;
13
+ op: "forget" | "invalidate" | "update";
8
14
  replacement_id?: string | undefined;
9
- }, {}>;
15
+ }>;
10
16
  export type MemoryEditParams = typeof memoryEditSchema.infer;
11
17
  export declare class MemoryEditTool implements AgentTool<typeof memoryEditSchema> {
12
18
  private readonly session;
@@ -14,13 +20,19 @@ export declare class MemoryEditTool implements AgentTool<typeof memoryEditSchema
14
20
  readonly approval: "read";
15
21
  readonly label = "Memory Edit";
16
22
  readonly description: string;
17
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
18
- op: "forget" | "invalidate" | "update";
23
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
24
+ content?: string | undefined;
19
25
  id: string;
26
+ importance?: number | undefined;
27
+ op: "forget" | "invalidate" | "update";
28
+ replacement_id?: string | undefined;
29
+ }, {
20
30
  content?: string | undefined;
31
+ id: string;
21
32
  importance?: number | undefined;
33
+ op: "forget" | "invalidate" | "update";
22
34
  replacement_id?: string | undefined;
23
- }, {}>;
35
+ }>;
24
36
  readonly strict = true;
25
37
  readonly loadMode = "discoverable";
26
38
  readonly summary = "Update, forget, or invalidate Mnemopi memories";
@@ -1,8 +1,10 @@
1
1
  import type { AgentTool, AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolSession } from "./index.js";
3
- declare const memoryRecallSchema: import("arktype/internal/variants/object.ts").ObjectType<{
3
+ declare const memoryRecallSchema: import("@oh-my-pi/omptype").FluentType<{
4
4
  query: string;
5
- }, {}>;
5
+ }, {
6
+ query: string;
7
+ }>;
6
8
  export type MemoryRecallParams = typeof memoryRecallSchema.infer;
7
9
  export declare class MemoryRecallTool implements AgentTool<typeof memoryRecallSchema> {
8
10
  private readonly session;
@@ -10,9 +12,11 @@ export declare class MemoryRecallTool implements AgentTool<typeof memoryRecallSc
10
12
  readonly approval: "read";
11
13
  readonly label = "Recall";
12
14
  readonly description: string;
13
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
15
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
16
+ query: string;
17
+ }, {
14
18
  query: string;
15
- }, {}>;
19
+ }>;
16
20
  readonly strict = true;
17
21
  readonly loadMode = "discoverable";
18
22
  readonly summary = "Search memory for relevant prior context";
@@ -1,9 +1,12 @@
1
1
  import type { AgentTool, AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolSession } from "./index.js";
3
- declare const memoryReflectSchema: import("arktype/internal/variants/object.ts").ObjectType<{
3
+ declare const memoryReflectSchema: import("@oh-my-pi/omptype").FluentType<{
4
+ context?: string | undefined;
4
5
  query: string;
6
+ }, {
5
7
  context?: string | undefined;
6
- }, {}>;
8
+ query: string;
9
+ }>;
7
10
  export type MemoryReflectParams = typeof memoryReflectSchema.infer;
8
11
  export declare class MemoryReflectTool implements AgentTool<typeof memoryReflectSchema> {
9
12
  private readonly session;
@@ -11,10 +14,13 @@ export declare class MemoryReflectTool implements AgentTool<typeof memoryReflect
11
14
  readonly approval: "read";
12
15
  readonly label = "Reflect";
13
16
  readonly description: string;
14
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
17
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
18
+ context?: string | undefined;
15
19
  query: string;
20
+ }, {
16
21
  context?: string | undefined;
17
- }, {}>;
22
+ query: string;
23
+ }>;
18
24
  readonly strict = true;
19
25
  readonly loadMode = "discoverable";
20
26
  readonly summary = "Synthesize an answer from long-term memory";
@@ -1,11 +1,16 @@
1
1
  import type { AgentTool, AgentToolResult } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolSession } from "./index.js";
3
- declare const memoryRetainSchema: import("arktype/internal/variants/object.ts").ObjectType<{
3
+ declare const memoryRetainSchema: import("@oh-my-pi/omptype").FluentType<{
4
4
  items: {
5
5
  content: string;
6
6
  context?: string | undefined;
7
7
  }[];
8
- }, {}>;
8
+ }, {
9
+ items: {
10
+ content: string;
11
+ context?: string | undefined;
12
+ }[];
13
+ }>;
9
14
  export type MemoryRetainParams = typeof memoryRetainSchema.infer;
10
15
  export declare class MemoryRetainTool implements AgentTool<typeof memoryRetainSchema> {
11
16
  private readonly session;
@@ -13,12 +18,17 @@ export declare class MemoryRetainTool implements AgentTool<typeof memoryRetainSc
13
18
  readonly approval: "read";
14
19
  readonly label = "Retain";
15
20
  readonly description: string;
16
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
21
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
22
+ items: {
23
+ content: string;
24
+ context?: string | undefined;
25
+ }[];
26
+ }, {
17
27
  items: {
18
28
  content: string;
19
29
  context?: string | undefined;
20
30
  }[];
21
- }, {}>;
31
+ }>;
22
32
  readonly strict = true;
23
33
  readonly loadMode = "discoverable";
24
34
  readonly summary = "Store important facts in long-term memory";
@@ -5,9 +5,11 @@ import { type Theme } from "../modes/theme/theme.js";
5
5
  import type { ToolSession } from "../sdk.js";
6
6
  import { type TruncationResult } from "../session/streaming-output.js";
7
7
  import { type OutputMeta } from "./output-meta.js";
8
- declare const readSchema: import("arktype/internal/variants/object.ts").ObjectType<{
8
+ declare const readSchema: import("@oh-my-pi/omptype").FluentType<{
9
9
  path: string;
10
- }, {}>;
10
+ }, {
11
+ path: string;
12
+ }>;
11
13
  export type ReadToolInput = typeof readSchema.infer;
12
14
  export interface ReadToolDetails {
13
15
  kind?: "file" | "url";
@@ -59,9 +61,11 @@ export declare class ReadTool implements AgentTool<typeof readSchema, ReadToolDe
59
61
  readonly label = "Read";
60
62
  readonly loadMode = "essential";
61
63
  description: string;
62
- readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
64
+ readonly parameters: import("@oh-my-pi/omptype").FluentType<{
65
+ path: string;
66
+ }, {
63
67
  path: string;
64
- }, {}>;
68
+ }>;
65
69
  readonly strict = true;
66
70
  constructor(session: ToolSession);
67
71
  /**