@oh-my-pi/pi-coding-agent 16.0.5 → 16.0.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 (223) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/cli.js +1945 -1386
  3. package/dist/types/advisor/advise-tool.d.ts +22 -19
  4. package/dist/types/autoresearch/tools/init-experiment.d.ts +13 -17
  5. package/dist/types/autoresearch/tools/log-experiment.d.ts +17 -19
  6. package/dist/types/autoresearch/tools/run-experiment.d.ts +3 -4
  7. package/dist/types/autoresearch/tools/update-notes.d.ts +4 -5
  8. package/dist/types/cli/ttsr-cli.d.ts +39 -0
  9. package/dist/types/commands/ttsr.d.ts +57 -0
  10. package/dist/types/commit/agentic/tools/analyze-file.d.ts +4 -5
  11. package/dist/types/commit/agentic/tools/git-file-diff.d.ts +4 -5
  12. package/dist/types/commit/agentic/tools/git-hunk.d.ts +5 -6
  13. package/dist/types/commit/agentic/tools/git-overview.d.ts +4 -5
  14. package/dist/types/commit/agentic/tools/propose-changelog.d.ts +23 -24
  15. package/dist/types/commit/agentic/tools/propose-commit.d.ts +11 -32
  16. package/dist/types/commit/agentic/tools/recent-commits.d.ts +3 -4
  17. package/dist/types/commit/agentic/tools/schemas.d.ts +6 -27
  18. package/dist/types/commit/agentic/tools/split-commit.d.ts +28 -49
  19. package/dist/types/commit/changelog/generate.d.ts +12 -13
  20. package/dist/types/commit/shared-llm.d.ts +10 -37
  21. package/dist/types/config/config-file.d.ts +4 -4
  22. package/dist/types/config/keybindings.d.ts +5 -0
  23. package/dist/types/config/models-config-schema.d.ts +625 -990
  24. package/dist/types/config/models-config.d.ts +229 -217
  25. package/dist/types/config/settings-schema.d.ts +53 -23
  26. package/dist/types/edit/hashline/params.d.ts +7 -11
  27. package/dist/types/edit/index.d.ts +2 -1
  28. package/dist/types/edit/modes/apply-patch.d.ts +4 -5
  29. package/dist/types/edit/modes/patch.d.ts +15 -24
  30. package/dist/types/edit/modes/replace.d.ts +16 -17
  31. package/dist/types/eval/js/index.d.ts +1 -0
  32. package/dist/types/extensibility/custom-commands/types.d.ts +6 -3
  33. package/dist/types/extensibility/custom-tools/types.d.ts +8 -5
  34. package/dist/types/extensibility/extensions/types.d.ts +6 -3
  35. package/dist/types/extensibility/hooks/types.d.ts +7 -4
  36. package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +13 -5
  37. package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +17 -0
  38. package/dist/types/extensibility/typebox.d.ts +80 -58
  39. package/dist/types/goals/tools/goal-tool.d.ts +11 -24
  40. package/dist/types/index.d.ts +2 -0
  41. package/dist/types/lsp/index.d.ts +11 -26
  42. package/dist/types/lsp/types.d.ts +12 -28
  43. package/dist/types/mcp/client.d.ts +8 -0
  44. package/dist/types/modes/components/btw-panel.d.ts +1 -0
  45. package/dist/types/modes/components/custom-editor.d.ts +3 -1
  46. package/dist/types/modes/controllers/btw-controller.d.ts +2 -0
  47. package/dist/types/modes/controllers/input-controller.d.ts +1 -0
  48. package/dist/types/modes/interactive-mode.d.ts +3 -0
  49. package/dist/types/modes/setup-wizard/index.d.ts +1 -0
  50. package/dist/types/modes/setup-wizard/startup-splash.d.ts +7 -0
  51. package/dist/types/modes/theme/theme.d.ts +1 -1
  52. package/dist/types/modes/types.d.ts +3 -0
  53. package/dist/types/sdk.d.ts +5 -0
  54. package/dist/types/session/agent-session.d.ts +4 -0
  55. package/dist/types/startup-splash.d.ts +12 -0
  56. package/dist/types/task/types.d.ts +47 -48
  57. package/dist/types/tools/ask.d.ts +26 -27
  58. package/dist/types/tools/ast-edit.d.ts +17 -17
  59. package/dist/types/tools/ast-grep.d.ts +12 -13
  60. package/dist/types/tools/bash.d.ts +20 -17
  61. package/dist/types/tools/browser.d.ts +46 -71
  62. package/dist/types/tools/checkpoint.d.ts +14 -15
  63. package/dist/types/tools/debug.d.ts +82 -145
  64. package/dist/types/tools/eval.d.ts +30 -40
  65. package/dist/types/tools/find.d.ts +17 -18
  66. package/dist/types/tools/gh.d.ts +49 -78
  67. package/dist/types/tools/image-gen.d.ts +20 -36
  68. package/dist/types/tools/inspect-image.d.ts +10 -11
  69. package/dist/types/tools/irc.d.ts +22 -33
  70. package/dist/types/tools/job.d.ts +11 -12
  71. package/dist/types/tools/learn.d.ts +21 -28
  72. package/dist/types/tools/manage-skill.d.ts +13 -22
  73. package/dist/types/tools/memory-edit.d.ts +15 -24
  74. package/dist/types/tools/memory-recall.d.ts +7 -8
  75. package/dist/types/tools/memory-reflect.d.ts +9 -10
  76. package/dist/types/tools/memory-retain.d.ts +13 -14
  77. package/dist/types/tools/read.d.ts +7 -8
  78. package/dist/types/tools/resolve.d.ts +11 -18
  79. package/dist/types/tools/review.d.ts +9 -15
  80. package/dist/types/tools/search-tool-bm25.d.ts +9 -10
  81. package/dist/types/tools/search.d.ts +16 -17
  82. package/dist/types/tools/ssh.d.ts +14 -15
  83. package/dist/types/tools/todo.d.ts +27 -43
  84. package/dist/types/tools/tts.d.ts +8 -9
  85. package/dist/types/tools/write.d.ts +9 -10
  86. package/dist/types/tui/index.d.ts +1 -0
  87. package/dist/types/tui/width-aware-text.d.ts +23 -0
  88. package/dist/types/utils/markit.d.ts +10 -1
  89. package/dist/types/web/search/index.d.ts +17 -28
  90. package/dist/types/web/search/providers/perplexity.d.ts +0 -2
  91. package/dist/types/web/search/types.d.ts +32 -26
  92. package/package.json +14 -13
  93. package/scripts/omp +1 -1
  94. package/src/advisor/__tests__/advisor.test.ts +44 -1
  95. package/src/advisor/advise-tool.ts +34 -11
  96. package/src/autoresearch/tools/init-experiment.ts +13 -16
  97. package/src/autoresearch/tools/log-experiment.ts +15 -18
  98. package/src/autoresearch/tools/run-experiment.ts +3 -3
  99. package/src/autoresearch/tools/update-notes.ts +4 -4
  100. package/src/cli/ttsr-cli.ts +995 -0
  101. package/src/cli-commands.ts +1 -0
  102. package/src/cli.ts +7 -1
  103. package/src/commands/ttsr.ts +125 -0
  104. package/src/commit/agentic/tools/analyze-file.ts +4 -4
  105. package/src/commit/agentic/tools/git-file-diff.ts +4 -4
  106. package/src/commit/agentic/tools/git-hunk.ts +7 -5
  107. package/src/commit/agentic/tools/git-overview.ts +4 -4
  108. package/src/commit/agentic/tools/propose-changelog.ts +18 -15
  109. package/src/commit/agentic/tools/propose-commit.ts +6 -6
  110. package/src/commit/agentic/tools/recent-commits.ts +3 -3
  111. package/src/commit/agentic/tools/schemas.ts +8 -20
  112. package/src/commit/agentic/tools/split-commit.ts +19 -23
  113. package/src/commit/analysis/summary.ts +7 -5
  114. package/src/commit/changelog/generate.ts +15 -11
  115. package/src/commit/shared-llm.ts +17 -24
  116. package/src/config/config-file.ts +13 -15
  117. package/src/config/keybindings.ts +6 -0
  118. package/src/config/models-config-schema.ts +206 -179
  119. package/src/config/settings-schema.ts +34 -0
  120. package/src/discovery/builtin-rules/index.ts +2 -0
  121. package/src/discovery/builtin-rules/ts-import-type.md +2 -2
  122. package/src/discovery/builtin-rules/ts-no-any.md +11 -2
  123. package/src/discovery/builtin-rules/ts-no-inline-cast-access.md +55 -0
  124. package/src/edit/hashline/params.ts +12 -11
  125. package/src/edit/index.ts +5 -4
  126. package/src/edit/modes/apply-patch.ts +4 -4
  127. package/src/edit/modes/patch.ts +15 -18
  128. package/src/edit/modes/replace.ts +13 -17
  129. package/src/edit/renderer.ts +0 -1
  130. package/src/eval/agent-bridge.ts +11 -13
  131. package/src/eval/completion-bridge.ts +25 -17
  132. package/src/eval/js/context-manager.ts +17 -2
  133. package/src/eval/js/index.ts +1 -1
  134. package/src/eval/py/executor.ts +2 -2
  135. package/src/extensibility/custom-commands/loader.ts +5 -3
  136. package/src/extensibility/custom-commands/types.ts +6 -3
  137. package/src/extensibility/custom-tools/loader.ts +4 -2
  138. package/src/extensibility/custom-tools/types.ts +8 -5
  139. package/src/extensibility/extensions/loader.ts +4 -2
  140. package/src/extensibility/extensions/types.ts +6 -3
  141. package/src/extensibility/hooks/loader.ts +5 -2
  142. package/src/extensibility/hooks/types.ts +7 -4
  143. package/src/extensibility/legacy-pi-ai-shim.ts +42 -5
  144. package/src/extensibility/legacy-pi-coding-agent-shim.ts +113 -0
  145. package/src/extensibility/plugins/legacy-pi-compat.ts +13 -13
  146. package/src/extensibility/tool-proxy.ts +4 -1
  147. package/src/extensibility/typebox.ts +778 -251
  148. package/src/goals/guided-setup.ts +12 -3
  149. package/src/goals/tools/goal-tool.ts +6 -6
  150. package/src/index.ts +2 -0
  151. package/src/internal-urls/docs-index.generated.ts +11 -9
  152. package/src/lsp/types.ts +13 -27
  153. package/src/main.ts +19 -18
  154. package/src/mcp/client.ts +38 -13
  155. package/src/mcp/render.ts +102 -89
  156. package/src/modes/components/agent-hub.ts +11 -4
  157. package/src/modes/components/btw-panel.ts +5 -1
  158. package/src/modes/components/custom-editor.ts +18 -0
  159. package/src/modes/components/status-line/component.ts +8 -1
  160. package/src/modes/components/tool-execution.ts +17 -10
  161. package/src/modes/controllers/btw-controller.ts +69 -1
  162. package/src/modes/controllers/input-controller.ts +29 -0
  163. package/src/modes/interactive-mode.ts +38 -8
  164. package/src/modes/setup-wizard/index.ts +1 -0
  165. package/src/modes/setup-wizard/scenes/sign-in.ts +77 -5
  166. package/src/modes/setup-wizard/startup-splash.ts +107 -0
  167. package/src/modes/theme/theme.ts +133 -143
  168. package/src/modes/types.ts +3 -0
  169. package/src/modes/utils/context-usage.ts +9 -5
  170. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  171. package/src/prompts/system/system-prompt.md +1 -0
  172. package/src/sdk.ts +21 -4
  173. package/src/session/agent-session.ts +173 -33
  174. package/src/session/session-history-format.ts +11 -2
  175. package/src/session/snapcompact-inline.ts +1 -1
  176. package/src/slash-commands/builtin-registry.ts +3 -10
  177. package/src/startup-splash.ts +19 -0
  178. package/src/task/executor.ts +11 -6
  179. package/src/task/types.ts +44 -41
  180. package/src/tool-discovery/tool-index.ts +17 -4
  181. package/src/tools/ask.ts +14 -14
  182. package/src/tools/ast-edit.ts +17 -14
  183. package/src/tools/ast-grep.ts +10 -9
  184. package/src/tools/bash.ts +15 -10
  185. package/src/tools/browser/launch.ts +13 -0
  186. package/src/tools/browser.ts +26 -32
  187. package/src/tools/checkpoint.ts +7 -7
  188. package/src/tools/debug.ts +72 -69
  189. package/src/tools/eval.ts +18 -19
  190. package/src/tools/find.ts +20 -13
  191. package/src/tools/gh.ts +29 -49
  192. package/src/tools/image-gen.ts +27 -32
  193. package/src/tools/inspect-image.ts +8 -9
  194. package/src/tools/irc.ts +12 -12
  195. package/src/tools/job.ts +6 -6
  196. package/src/tools/learn.ts +11 -14
  197. package/src/tools/manage-skill.ts +19 -23
  198. package/src/tools/memory-edit.ts +8 -8
  199. package/src/tools/memory-recall.ts +4 -4
  200. package/src/tools/memory-reflect.ts +5 -5
  201. package/src/tools/memory-retain.ts +9 -11
  202. package/src/tools/puppeteer/02_stealth_hairline.txt +1 -1
  203. package/src/tools/puppeteer/04_stealth_iframe.txt +4 -4
  204. package/src/tools/puppeteer/05_stealth_webgl.txt +1 -1
  205. package/src/tools/puppeteer/10_stealth_plugins.txt +6 -4
  206. package/src/tools/puppeteer/12_stealth_codecs.txt +2 -2
  207. package/src/tools/puppeteer/13_stealth_worker.txt +1 -1
  208. package/src/tools/read.ts +169 -13
  209. package/src/tools/report-tool-issue.ts +6 -6
  210. package/src/tools/resolve.ts +6 -6
  211. package/src/tools/review.ts +10 -12
  212. package/src/tools/search-tool-bm25.ts +5 -5
  213. package/src/tools/search.ts +20 -29
  214. package/src/tools/ssh.ts +8 -8
  215. package/src/tools/todo.ts +16 -19
  216. package/src/tools/tts.ts +16 -15
  217. package/src/tools/write.ts +5 -5
  218. package/src/tui/index.ts +1 -0
  219. package/src/tui/width-aware-text.ts +58 -0
  220. package/src/utils/markit.ts +17 -2
  221. package/src/web/search/index.ts +9 -9
  222. package/src/web/search/providers/perplexity.ts +373 -126
  223. package/src/web/search/types.ts +28 -48
@@ -1,5 +1,4 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
- import { z } from "zod/v4";
3
2
  import type { ToolSession } from ".";
4
3
  import type { OutputMeta } from "./output-meta";
5
4
  export interface CheckpointState {
@@ -10,14 +9,14 @@ export interface CheckpointState {
10
9
  /** Timestamp */
11
10
  startedAt: string;
12
11
  }
13
- declare const checkpointSchema: z.ZodObject<{
14
- goal: z.ZodString;
15
- }, z.core.$strip>;
16
- type CheckpointParams = z.infer<typeof checkpointSchema>;
17
- declare const rewindSchema: z.ZodObject<{
18
- report: z.ZodString;
19
- }, z.core.$strip>;
20
- type RewindParams = z.infer<typeof rewindSchema>;
12
+ declare const checkpointSchema: import("arktype/internal/variants/object.ts").ObjectType<{
13
+ goal: string;
14
+ }, {}>;
15
+ type CheckpointParams = typeof checkpointSchema.infer;
16
+ declare const rewindSchema: import("arktype/internal/variants/object.ts").ObjectType<{
17
+ report: string;
18
+ }, {}>;
19
+ type RewindParams = typeof rewindSchema.infer;
21
20
  export interface CheckpointToolDetails {
22
21
  goal: string;
23
22
  startedAt: string;
@@ -35,9 +34,9 @@ export declare class CheckpointTool implements AgentTool<typeof checkpointSchema
35
34
  readonly label = "Checkpoint";
36
35
  readonly summary = "Create a git-based checkpoint to save and restore session state";
37
36
  readonly description: string;
38
- readonly parameters: z.ZodObject<{
39
- goal: z.ZodString;
40
- }, z.core.$strip>;
37
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
38
+ goal: string;
39
+ }, {}>;
41
40
  readonly strict = true;
42
41
  readonly loadMode = "discoverable";
43
42
  readonly intent: (args: Partial<CheckpointParams>) => string;
@@ -52,9 +51,9 @@ export declare class RewindTool implements AgentTool<typeof rewindSchema, Rewind
52
51
  readonly label = "Rewind";
53
52
  readonly summary = "Rewind to a previously created checkpoint";
54
53
  readonly description: string;
55
- readonly parameters: z.ZodObject<{
56
- report: z.ZodString;
57
- }, z.core.$strip>;
54
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
55
+ report: string;
56
+ }, {}>;
58
57
  readonly strict = true;
59
58
  readonly loadMode = "discoverable";
60
59
  readonly intent: () => string;
@@ -1,7 +1,6 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback, RenderResultOptions, ToolApprovalDecision } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolExample } from "@oh-my-pi/pi-ai";
3
3
  import { type Component } from "@oh-my-pi/pi-tui";
4
- import { z } from "zod/v4";
5
4
  import { type DapBreakpointRecord, type DapContinueOutcome, type DapDataBreakpointInfoResponse, type DapDataBreakpointRecord, type DapDisassembledInstruction, type DapEvaluateResponse, type DapFunctionBreakpointRecord, type DapInstructionBreakpointRecord, type DapModule, type DapScope, type DapSessionSummary, type DapSource, type DapStackFrame, type DapThread, type DapVariable } from "../dap";
6
5
  import type { Theme } from "../modes/theme/theme";
7
6
  import type { ToolSession } from ".";
@@ -12,78 +11,47 @@ import type { OutputMeta } from "./output-meta";
12
11
  * `evaluate`, breakpoint mutations, memory writes) are exec-tier.
13
12
  */
14
13
  export declare const DEBUG_READONLY_ACTIONS: ReadonlySet<string>;
15
- declare const debugSchema: z.ZodObject<{
16
- action: z.ZodEnum<{
17
- attach: "attach";
18
- continue: "continue";
19
- custom_request: "custom_request";
20
- data_breakpoint_info: "data_breakpoint_info";
21
- disassemble: "disassemble";
22
- evaluate: "evaluate";
23
- launch: "launch";
24
- loaded_sources: "loaded_sources";
25
- modules: "modules";
26
- output: "output";
27
- pause: "pause";
28
- read_memory: "read_memory";
29
- remove_breakpoint: "remove_breakpoint";
30
- remove_data_breakpoint: "remove_data_breakpoint";
31
- remove_instruction_breakpoint: "remove_instruction_breakpoint";
32
- scopes: "scopes";
33
- sessions: "sessions";
34
- set_breakpoint: "set_breakpoint";
35
- set_data_breakpoint: "set_data_breakpoint";
36
- set_instruction_breakpoint: "set_instruction_breakpoint";
37
- stack_trace: "stack_trace";
38
- step_in: "step_in";
39
- step_out: "step_out";
40
- step_over: "step_over";
41
- terminate: "terminate";
42
- threads: "threads";
43
- variables: "variables";
44
- write_memory: "write_memory";
45
- }>;
46
- program: z.ZodOptional<z.ZodString>;
47
- args: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
- adapter: z.ZodOptional<z.ZodString>;
49
- cwd: z.ZodOptional<z.ZodString>;
50
- file: z.ZodOptional<z.ZodString>;
51
- line: z.ZodOptional<z.ZodNumber>;
52
- function: z.ZodOptional<z.ZodString>;
53
- name: z.ZodOptional<z.ZodString>;
54
- condition: z.ZodOptional<z.ZodString>;
55
- hit_condition: z.ZodOptional<z.ZodString>;
56
- expression: z.ZodOptional<z.ZodString>;
57
- context: z.ZodOptional<z.ZodString>;
58
- frame_id: z.ZodOptional<z.ZodNumber>;
59
- scope_id: z.ZodOptional<z.ZodNumber>;
60
- variable_ref: z.ZodOptional<z.ZodNumber>;
61
- pid: z.ZodOptional<z.ZodNumber>;
62
- port: z.ZodOptional<z.ZodNumber>;
63
- host: z.ZodOptional<z.ZodString>;
64
- levels: z.ZodOptional<z.ZodNumber>;
65
- memory_reference: z.ZodOptional<z.ZodString>;
66
- instruction_reference: z.ZodOptional<z.ZodString>;
67
- instruction_count: z.ZodOptional<z.ZodNumber>;
68
- instruction_offset: z.ZodOptional<z.ZodNumber>;
69
- count: z.ZodOptional<z.ZodNumber>;
70
- data: z.ZodOptional<z.ZodString>;
71
- data_id: z.ZodOptional<z.ZodString>;
72
- access_type: z.ZodOptional<z.ZodEnum<{
73
- read: "read";
74
- readWrite: "readWrite";
75
- write: "write";
76
- }>>;
77
- command: z.ZodOptional<z.ZodString>;
78
- arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
79
- offset: z.ZodOptional<z.ZodNumber>;
80
- resolve_symbols: z.ZodOptional<z.ZodBoolean>;
81
- allow_partial: z.ZodOptional<z.ZodBoolean>;
82
- start_module: z.ZodOptional<z.ZodNumber>;
83
- module_count: z.ZodOptional<z.ZodNumber>;
84
- timeout: z.ZodOptional<z.ZodNumber>;
85
- }, z.core.$strip>;
86
- export type DebugParams = z.infer<typeof debugSchema>;
14
+ declare const debugSchema: import("arktype/internal/variants/object.ts").ObjectType<{
15
+ action: "attach" | "continue" | "custom_request" | "data_breakpoint_info" | "disassemble" | "evaluate" | "launch" | "loaded_sources" | "modules" | "output" | "pause" | "read_memory" | "remove_breakpoint" | "remove_data_breakpoint" | "remove_instruction_breakpoint" | "scopes" | "sessions" | "set_breakpoint" | "set_data_breakpoint" | "set_instruction_breakpoint" | "stack_trace" | "step_in" | "step_out" | "step_over" | "terminate" | "threads" | "variables" | "write_memory";
16
+ program?: string | undefined;
17
+ args?: string[] | undefined;
18
+ adapter?: string | undefined;
19
+ cwd?: string | undefined;
20
+ file?: string | undefined;
21
+ line?: number | undefined;
22
+ function?: string | undefined;
23
+ name?: string | undefined;
24
+ condition?: string | undefined;
25
+ hit_condition?: string | undefined;
26
+ expression?: string | undefined;
27
+ context?: string | undefined;
28
+ frame_id?: number | undefined;
29
+ scope_id?: number | undefined;
30
+ variable_ref?: number | undefined;
31
+ pid?: number | undefined;
32
+ port?: number | undefined;
33
+ host?: string | undefined;
34
+ levels?: number | undefined;
35
+ memory_reference?: string | undefined;
36
+ instruction_reference?: string | undefined;
37
+ instruction_count?: number | undefined;
38
+ instruction_offset?: number | undefined;
39
+ count?: number | undefined;
40
+ data?: string | undefined;
41
+ data_id?: string | undefined;
42
+ access_type?: "read" | "readWrite" | "write" | undefined;
43
+ command?: string | undefined;
44
+ arguments?: {
45
+ [x: string]: unknown;
46
+ } | undefined;
47
+ offset?: number | undefined;
48
+ resolve_symbols?: boolean | undefined;
49
+ allow_partial?: boolean | undefined;
50
+ start_module?: number | undefined;
51
+ module_count?: number | undefined;
52
+ timeout?: number | undefined;
53
+ }, {}>;
54
+ export type DebugParams = typeof debugSchema.infer;
87
55
  export type DebugAction = DebugParams["action"];
88
56
  interface DebugToolDetails {
89
57
  action: DebugAction;
@@ -137,79 +105,48 @@ export declare class DebugTool implements AgentTool<typeof debugSchema, DebugToo
137
105
  readonly label = "Debug";
138
106
  readonly summary = "Debug a running process with DAP (debugger adapter protocol)";
139
107
  readonly description: string;
140
- readonly parameters: z.ZodObject<{
141
- action: z.ZodEnum<{
142
- attach: "attach";
143
- continue: "continue";
144
- custom_request: "custom_request";
145
- data_breakpoint_info: "data_breakpoint_info";
146
- disassemble: "disassemble";
147
- evaluate: "evaluate";
148
- launch: "launch";
149
- loaded_sources: "loaded_sources";
150
- modules: "modules";
151
- output: "output";
152
- pause: "pause";
153
- read_memory: "read_memory";
154
- remove_breakpoint: "remove_breakpoint";
155
- remove_data_breakpoint: "remove_data_breakpoint";
156
- remove_instruction_breakpoint: "remove_instruction_breakpoint";
157
- scopes: "scopes";
158
- sessions: "sessions";
159
- set_breakpoint: "set_breakpoint";
160
- set_data_breakpoint: "set_data_breakpoint";
161
- set_instruction_breakpoint: "set_instruction_breakpoint";
162
- stack_trace: "stack_trace";
163
- step_in: "step_in";
164
- step_out: "step_out";
165
- step_over: "step_over";
166
- terminate: "terminate";
167
- threads: "threads";
168
- variables: "variables";
169
- write_memory: "write_memory";
170
- }>;
171
- program: z.ZodOptional<z.ZodString>;
172
- args: z.ZodOptional<z.ZodArray<z.ZodString>>;
173
- adapter: z.ZodOptional<z.ZodString>;
174
- cwd: z.ZodOptional<z.ZodString>;
175
- file: z.ZodOptional<z.ZodString>;
176
- line: z.ZodOptional<z.ZodNumber>;
177
- function: z.ZodOptional<z.ZodString>;
178
- name: z.ZodOptional<z.ZodString>;
179
- condition: z.ZodOptional<z.ZodString>;
180
- hit_condition: z.ZodOptional<z.ZodString>;
181
- expression: z.ZodOptional<z.ZodString>;
182
- context: z.ZodOptional<z.ZodString>;
183
- frame_id: z.ZodOptional<z.ZodNumber>;
184
- scope_id: z.ZodOptional<z.ZodNumber>;
185
- variable_ref: z.ZodOptional<z.ZodNumber>;
186
- pid: z.ZodOptional<z.ZodNumber>;
187
- port: z.ZodOptional<z.ZodNumber>;
188
- host: z.ZodOptional<z.ZodString>;
189
- levels: z.ZodOptional<z.ZodNumber>;
190
- memory_reference: z.ZodOptional<z.ZodString>;
191
- instruction_reference: z.ZodOptional<z.ZodString>;
192
- instruction_count: z.ZodOptional<z.ZodNumber>;
193
- instruction_offset: z.ZodOptional<z.ZodNumber>;
194
- count: z.ZodOptional<z.ZodNumber>;
195
- data: z.ZodOptional<z.ZodString>;
196
- data_id: z.ZodOptional<z.ZodString>;
197
- access_type: z.ZodOptional<z.ZodEnum<{
198
- read: "read";
199
- readWrite: "readWrite";
200
- write: "write";
201
- }>>;
202
- command: z.ZodOptional<z.ZodString>;
203
- arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
204
- offset: z.ZodOptional<z.ZodNumber>;
205
- resolve_symbols: z.ZodOptional<z.ZodBoolean>;
206
- allow_partial: z.ZodOptional<z.ZodBoolean>;
207
- start_module: z.ZodOptional<z.ZodNumber>;
208
- module_count: z.ZodOptional<z.ZodNumber>;
209
- timeout: z.ZodOptional<z.ZodNumber>;
210
- }, z.core.$strip>;
108
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
109
+ action: "attach" | "continue" | "custom_request" | "data_breakpoint_info" | "disassemble" | "evaluate" | "launch" | "loaded_sources" | "modules" | "output" | "pause" | "read_memory" | "remove_breakpoint" | "remove_data_breakpoint" | "remove_instruction_breakpoint" | "scopes" | "sessions" | "set_breakpoint" | "set_data_breakpoint" | "set_instruction_breakpoint" | "stack_trace" | "step_in" | "step_out" | "step_over" | "terminate" | "threads" | "variables" | "write_memory";
110
+ program?: string | undefined;
111
+ args?: string[] | undefined;
112
+ adapter?: string | undefined;
113
+ cwd?: string | undefined;
114
+ file?: string | undefined;
115
+ line?: number | undefined;
116
+ function?: string | undefined;
117
+ name?: string | undefined;
118
+ condition?: string | undefined;
119
+ hit_condition?: string | undefined;
120
+ expression?: string | undefined;
121
+ context?: string | undefined;
122
+ frame_id?: number | undefined;
123
+ scope_id?: number | undefined;
124
+ variable_ref?: number | undefined;
125
+ pid?: number | undefined;
126
+ port?: number | undefined;
127
+ host?: string | undefined;
128
+ levels?: number | undefined;
129
+ memory_reference?: string | undefined;
130
+ instruction_reference?: string | undefined;
131
+ instruction_count?: number | undefined;
132
+ instruction_offset?: number | undefined;
133
+ count?: number | undefined;
134
+ data?: string | undefined;
135
+ data_id?: string | undefined;
136
+ access_type?: "read" | "readWrite" | "write" | undefined;
137
+ command?: string | undefined;
138
+ arguments?: {
139
+ [x: string]: unknown;
140
+ } | undefined;
141
+ offset?: number | undefined;
142
+ resolve_symbols?: boolean | undefined;
143
+ allow_partial?: boolean | undefined;
144
+ start_module?: number | undefined;
145
+ module_count?: number | undefined;
146
+ timeout?: number | undefined;
147
+ }, {}>;
211
148
  readonly strict = true;
212
- readonly examples: readonly ToolExample<z.input<typeof debugSchema>>[];
149
+ readonly examples: readonly ToolExample<typeof debugSchema.infer>[];
213
150
  readonly concurrency = "exclusive";
214
151
  readonly loadMode = "discoverable";
215
152
  constructor(session: ToolSession);
@@ -1,6 +1,5 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolExample } from "@oh-my-pi/pi-ai";
3
- import { z } from "zod/v4";
4
3
  import type { EvalToolDetails } from "../eval/types";
5
4
  import type { ToolSession } from ".";
6
5
  export { EVAL_DEFAULT_PREVIEW_LINES, evalToolRenderer } from "./eval-render";
@@ -8,30 +7,24 @@ export { EVAL_DEFAULT_PREVIEW_LINES, evalToolRenderer } from "./eval-render";
8
7
  * Per-cell input. Each cell runs in order; state persists within a language
9
8
  * across cells and across tool calls.
10
9
  */
11
- declare const evalCellSchema: z.ZodObject<{
12
- language: z.ZodEnum<{
13
- js: "js";
14
- py: "py";
15
- }>;
16
- code: z.ZodString;
17
- title: z.ZodOptional<z.ZodString>;
18
- timeout: z.ZodOptional<z.ZodNumber>;
19
- reset: z.ZodOptional<z.ZodBoolean>;
20
- }, z.core.$strip>;
21
- export type EvalCellInput = z.infer<typeof evalCellSchema>;
22
- export declare const evalSchema: z.ZodObject<{
23
- cells: z.ZodArray<z.ZodObject<{
24
- language: z.ZodEnum<{
25
- js: "js";
26
- py: "py";
27
- }>;
28
- code: z.ZodString;
29
- title: z.ZodOptional<z.ZodString>;
30
- timeout: z.ZodOptional<z.ZodNumber>;
31
- reset: z.ZodOptional<z.ZodBoolean>;
32
- }, z.core.$strip>>;
33
- }, z.core.$strip>;
34
- export type EvalToolParams = z.infer<typeof evalSchema>;
10
+ declare const evalCellSchema: import("arktype/internal/variants/object.ts").ObjectType<{
11
+ language: "js" | "py";
12
+ code: string;
13
+ title?: string | undefined;
14
+ timeout?: number | undefined;
15
+ reset?: boolean | undefined;
16
+ }, {}>;
17
+ export type EvalCellInput = typeof evalCellSchema.infer;
18
+ export declare const evalSchema: import("arktype/internal/variants/object.ts").ObjectType<{
19
+ cells: {
20
+ language: "js" | "py";
21
+ code: string;
22
+ title?: string | undefined;
23
+ timeout?: number | undefined;
24
+ reset?: boolean | undefined;
25
+ }[];
26
+ }, {}>;
27
+ export type EvalToolParams = typeof evalSchema.infer;
35
28
  export type EvalToolResult = {
36
29
  content: Array<{
37
30
  type: "text";
@@ -66,22 +59,19 @@ export declare class EvalTool implements AgentTool<typeof evalSchema> {
66
59
  readonly loadMode = "discoverable";
67
60
  readonly label = "Eval";
68
61
  get description(): string;
69
- readonly examples: readonly ToolExample<z.input<typeof evalSchema>>[];
70
- readonly parameters: z.ZodObject<{
71
- cells: z.ZodArray<z.ZodObject<{
72
- language: z.ZodEnum<{
73
- js: "js";
74
- py: "py";
75
- }>;
76
- code: z.ZodString;
77
- title: z.ZodOptional<z.ZodString>;
78
- timeout: z.ZodOptional<z.ZodNumber>;
79
- reset: z.ZodOptional<z.ZodBoolean>;
80
- }, z.core.$strip>>;
81
- }, z.core.$strip>;
62
+ readonly examples: readonly ToolExample<typeof evalSchema.infer>[];
63
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
64
+ cells: {
65
+ language: "js" | "py";
66
+ code: string;
67
+ title?: string | undefined;
68
+ timeout?: number | undefined;
69
+ reset?: boolean | undefined;
70
+ }[];
71
+ }, {}>;
82
72
  readonly concurrency = "exclusive";
83
73
  readonly strict = true;
84
- readonly intent: (args: Partial<z.infer<typeof evalSchema>>) => string | undefined;
74
+ readonly intent: (args: Partial<typeof evalSchema.infer>) => string | undefined;
85
75
  constructor(session: ToolSession | null, options?: EvalToolOptions);
86
- execute(_toolCallId: string, params: z.infer<typeof evalSchema>, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback, _ctx?: AgentToolContext): Promise<AgentToolResult<EvalToolDetails | undefined>>;
76
+ execute(_toolCallId: string, params: typeof evalSchema.infer, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback, _ctx?: AgentToolContext): Promise<AgentToolResult<EvalToolDetails | undefined>>;
87
77
  }
@@ -1,20 +1,19 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
2
  import type { ToolExample } from "@oh-my-pi/pi-ai";
3
3
  import type { Component } from "@oh-my-pi/pi-tui";
4
- import { z } from "zod/v4";
5
4
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
6
5
  import type { Theme } from "../modes/theme/theme";
7
6
  import { type TruncationResult } from "../session/streaming-output";
8
7
  import type { ToolSession } from ".";
9
8
  import { type OutputMeta } from "./output-meta";
10
- declare const findSchema: z.ZodObject<{
11
- paths: z.ZodArray<z.ZodString>;
12
- hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
13
- gitignore: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
14
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
15
- timeout: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
16
- }, z.core.$strict>;
17
- export type FindToolInput = z.infer<typeof findSchema>;
9
+ declare const findSchema: import("arktype/internal/variants/object.ts").ObjectType<{
10
+ paths: string[];
11
+ hidden?: boolean | undefined;
12
+ gitignore?: boolean | undefined;
13
+ limit?: number | undefined;
14
+ timeout?: number | undefined;
15
+ }, {}>;
16
+ export type FindToolInput = typeof findSchema.infer;
18
17
  export interface FindToolDetails {
19
18
  truncation?: TruncationResult;
20
19
  resultLimitReached?: number;
@@ -66,17 +65,17 @@ export declare class FindTool implements AgentTool<typeof findSchema, FindToolDe
66
65
  readonly loadMode = "discoverable";
67
66
  readonly label = "Find";
68
67
  readonly description: string;
69
- readonly parameters: z.ZodObject<{
70
- paths: z.ZodArray<z.ZodString>;
71
- hidden: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
72
- gitignore: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
73
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
74
- timeout: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
75
- }, z.core.$strict>;
76
- readonly examples: readonly ToolExample<z.input<typeof findSchema>>[];
68
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
69
+ paths: string[];
70
+ hidden?: boolean | undefined;
71
+ gitignore?: boolean | undefined;
72
+ limit?: number | undefined;
73
+ timeout?: number | undefined;
74
+ }, {}>;
75
+ readonly examples: readonly ToolExample<typeof findSchema.infer>[];
77
76
  readonly strict = true;
78
77
  constructor(session: ToolSession, options?: FindToolOptions);
79
- execute(_toolCallId: string, params: z.infer<typeof findSchema>, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<FindToolDetails>, _context?: AgentToolContext): Promise<AgentToolResult<FindToolDetails>>;
78
+ execute(_toolCallId: string, params: typeof findSchema.infer, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback<FindToolDetails>, _context?: AgentToolContext): Promise<AgentToolResult<FindToolDetails>>;
80
79
  }
81
80
  interface FindRenderArgs {
82
81
  paths?: string | string[];
@@ -1,5 +1,4 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback, ToolApprovalDecision } from "@oh-my-pi/pi-agent-core";
2
- import { z } from "zod/v4";
3
2
  import type { Settings } from "../config/settings";
4
3
  import * as git from "../utils/git";
5
4
  import type { ToolSession } from ".";
@@ -7,45 +6,31 @@ import { type CacheStatus } from "./github-cache";
7
6
  import type { OutputMeta } from "./output-meta";
8
7
  /** Runs `gh --json` for issue data, retrying without optional stateReason on older gh releases. */
9
8
  export declare function githubIssueJsonWithStateReasonFallback<T>(cwd: string, args: readonly string[], signal: AbortSignal | undefined, options?: git.GhCommandOptions): Promise<T>;
10
- declare const githubSchema: z.ZodObject<{
11
- op: z.ZodEnum<{
12
- pr_checkout: "pr_checkout";
13
- pr_create: "pr_create";
14
- pr_push: "pr_push";
15
- repo_view: "repo_view";
16
- run_watch: "run_watch";
17
- search_code: "search_code";
18
- search_commits: "search_commits";
19
- search_issues: "search_issues";
20
- search_prs: "search_prs";
21
- search_repos: "search_repos";
22
- }>;
23
- repo: z.ZodOptional<z.ZodString>;
24
- branch: z.ZodOptional<z.ZodString>;
25
- pr: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
26
- force: z.ZodOptional<z.ZodBoolean>;
27
- forceWithLease: z.ZodOptional<z.ZodBoolean>;
28
- title: z.ZodOptional<z.ZodString>;
29
- body: z.ZodOptional<z.ZodString>;
30
- base: z.ZodOptional<z.ZodString>;
31
- head: z.ZodOptional<z.ZodString>;
32
- draft: z.ZodOptional<z.ZodBoolean>;
33
- fill: z.ZodOptional<z.ZodBoolean>;
34
- reviewer: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
- assignee: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
- label: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
- query: z.ZodOptional<z.ZodString>;
38
- since: z.ZodOptional<z.ZodString>;
39
- until: z.ZodOptional<z.ZodString>;
40
- dateField: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
41
- created: "created";
42
- updated: "updated";
43
- }>>>;
44
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
45
- run: z.ZodOptional<z.ZodString>;
46
- tail: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
47
- }, z.core.$strict>;
48
- type GithubInput = z.infer<typeof githubSchema>;
9
+ declare const githubSchema: import("arktype/internal/variants/object.ts").ObjectType<{
10
+ op: "pr_checkout" | "pr_create" | "pr_push" | "repo_view" | "run_watch" | "search_code" | "search_commits" | "search_issues" | "search_prs" | "search_repos";
11
+ repo?: string | undefined;
12
+ branch?: string | undefined;
13
+ pr?: string | string[] | undefined;
14
+ force?: boolean | undefined;
15
+ forceWithLease?: boolean | undefined;
16
+ title?: string | undefined;
17
+ body?: string | undefined;
18
+ base?: string | undefined;
19
+ head?: string | undefined;
20
+ draft?: boolean | undefined;
21
+ fill?: boolean | undefined;
22
+ reviewer?: string[] | undefined;
23
+ assignee?: string[] | undefined;
24
+ label?: string[] | undefined;
25
+ query?: string | undefined;
26
+ since?: string | undefined;
27
+ until?: string | undefined;
28
+ dateField?: "created" | "updated" | undefined;
29
+ limit?: number | undefined;
30
+ run?: string | undefined;
31
+ tail?: number | undefined;
32
+ }, {}>;
33
+ type GithubInput = typeof githubSchema.infer;
49
34
  export interface GhToolDetails {
50
35
  meta?: OutputMeta;
51
36
  artifactId?: string;
@@ -238,44 +223,30 @@ export declare class GithubTool implements AgentTool<typeof githubSchema, GhTool
238
223
  readonly loadMode = "discoverable";
239
224
  readonly label = "GitHub";
240
225
  readonly description: string;
241
- readonly parameters: z.ZodObject<{
242
- op: z.ZodEnum<{
243
- pr_checkout: "pr_checkout";
244
- pr_create: "pr_create";
245
- pr_push: "pr_push";
246
- repo_view: "repo_view";
247
- run_watch: "run_watch";
248
- search_code: "search_code";
249
- search_commits: "search_commits";
250
- search_issues: "search_issues";
251
- search_prs: "search_prs";
252
- search_repos: "search_repos";
253
- }>;
254
- repo: z.ZodOptional<z.ZodString>;
255
- branch: z.ZodOptional<z.ZodString>;
256
- pr: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
257
- force: z.ZodOptional<z.ZodBoolean>;
258
- forceWithLease: z.ZodOptional<z.ZodBoolean>;
259
- title: z.ZodOptional<z.ZodString>;
260
- body: z.ZodOptional<z.ZodString>;
261
- base: z.ZodOptional<z.ZodString>;
262
- head: z.ZodOptional<z.ZodString>;
263
- draft: z.ZodOptional<z.ZodBoolean>;
264
- fill: z.ZodOptional<z.ZodBoolean>;
265
- reviewer: z.ZodOptional<z.ZodArray<z.ZodString>>;
266
- assignee: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
- label: z.ZodOptional<z.ZodArray<z.ZodString>>;
268
- query: z.ZodOptional<z.ZodString>;
269
- since: z.ZodOptional<z.ZodString>;
270
- until: z.ZodOptional<z.ZodString>;
271
- dateField: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
272
- created: "created";
273
- updated: "updated";
274
- }>>>;
275
- limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
276
- run: z.ZodOptional<z.ZodString>;
277
- tail: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
278
- }, z.core.$strict>;
226
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
227
+ op: "pr_checkout" | "pr_create" | "pr_push" | "repo_view" | "run_watch" | "search_code" | "search_commits" | "search_issues" | "search_prs" | "search_repos";
228
+ repo?: string | undefined;
229
+ branch?: string | undefined;
230
+ pr?: string | string[] | undefined;
231
+ force?: boolean | undefined;
232
+ forceWithLease?: boolean | undefined;
233
+ title?: string | undefined;
234
+ body?: string | undefined;
235
+ base?: string | undefined;
236
+ head?: string | undefined;
237
+ draft?: boolean | undefined;
238
+ fill?: boolean | undefined;
239
+ reviewer?: string[] | undefined;
240
+ assignee?: string[] | undefined;
241
+ label?: string[] | undefined;
242
+ query?: string | undefined;
243
+ since?: string | undefined;
244
+ until?: string | undefined;
245
+ dateField?: "created" | "updated" | undefined;
246
+ limit?: number | undefined;
247
+ run?: string | undefined;
248
+ tail?: number | undefined;
249
+ }, {}>;
279
250
  readonly strict = true;
280
251
  constructor(session: ToolSession);
281
252
  static createIf(session: ToolSession): GithubTool | null;