@oh-my-pi/pi-coding-agent 16.0.5 → 16.0.6

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 +53 -0
  2. package/dist/cli.js +1927 -1376
  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 +160 -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 +4 -11
  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
@@ -7,12 +7,11 @@
7
7
  * LSP writethrough, fs-cache invalidation, diagnostics) is shared with
8
8
  * the `patch` mode.
9
9
  */
10
- import { z } from "zod/v4";
11
10
  import type { PatchEditEntry } from "./patch";
12
- export declare const applyPatchSchema: z.ZodObject<{
13
- input: z.ZodString;
14
- }, z.core.$strip>;
15
- export type ApplyPatchParams = z.infer<typeof applyPatchSchema>;
11
+ export declare const applyPatchSchema: import("arktype/internal/variants/object.ts").ObjectType<{
12
+ input: string;
13
+ }, {}>;
14
+ export type ApplyPatchParams = typeof applyPatchSchema.infer;
16
15
  export type ApplyPatchEntry = PatchEditEntry & {
17
16
  path: string;
18
17
  };
@@ -5,7 +5,6 @@
5
5
  * for robust handling of whitespace and formatting differences.
6
6
  */
7
7
  import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
8
- import { z } from "zod/v4";
9
8
  import { type WritethroughCallback, type WritethroughDeferredHandle } from "../../lsp";
10
9
  import type { ToolSession } from "../../tools";
11
10
  import type { EditToolDetails, LspBatchRequest } from "../renderer";
@@ -61,29 +60,21 @@ export declare function computePatchDiff(input: PatchInput, cwd: string, options
61
60
  } | {
62
61
  error: string;
63
62
  }>;
64
- export declare const patchEditEntrySchema: z.ZodObject<{
65
- op: z.ZodOptional<z.ZodEnum<{
66
- create: "create";
67
- delete: "delete";
68
- update: "update";
69
- }>>;
70
- rename: z.ZodOptional<z.ZodString>;
71
- diff: z.ZodOptional<z.ZodString>;
72
- }, z.core.$strict>;
73
- export declare const patchEditSchema: z.ZodObject<{
74
- path: z.ZodString;
75
- edits: z.ZodArray<z.ZodObject<{
76
- op: z.ZodOptional<z.ZodEnum<{
77
- create: "create";
78
- delete: "delete";
79
- update: "update";
80
- }>>;
81
- rename: z.ZodOptional<z.ZodString>;
82
- diff: z.ZodOptional<z.ZodString>;
83
- }, z.core.$strict>>;
84
- }, z.core.$strict>;
85
- export type PatchEditEntry = z.infer<typeof patchEditEntrySchema>;
86
- export type PatchParams = z.infer<typeof patchEditSchema>;
63
+ export declare const patchEditEntrySchema: import("arktype/internal/variants/object.ts").ObjectType<{
64
+ op?: "create" | "delete" | "update" | undefined;
65
+ rename?: string | undefined;
66
+ diff?: string | undefined;
67
+ }, {}>;
68
+ export type PatchEditEntry = typeof patchEditEntrySchema.infer;
69
+ export declare const patchEditSchema: import("arktype/internal/variants/object.ts").ObjectType<{
70
+ path: string;
71
+ edits: {
72
+ op?: "create" | "delete" | "update" | undefined;
73
+ rename?: string | undefined;
74
+ diff?: string | undefined;
75
+ }[];
76
+ }, {}>;
77
+ export type PatchParams = typeof patchEditSchema.infer;
87
78
  export interface ExecutePatchSingleOptions {
88
79
  session: ToolSession;
89
80
  path: string;
@@ -5,7 +5,6 @@
5
5
  * fallback strategies for finding text in files.
6
6
  */
7
7
  import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
8
- import { z } from "zod/v4";
9
8
  import type { WritethroughCallback, WritethroughDeferredHandle } from "../../lsp";
10
9
  import type { ToolSession } from "../../tools";
11
10
  import type { EditToolDetails, LspBatchRequest } from "../renderer";
@@ -113,21 +112,21 @@ export declare function findContextLine(lines: string[], context: string, startF
113
112
  allowFuzzy?: boolean;
114
113
  skipFunctionFallback?: boolean;
115
114
  }): ContextLineResult;
116
- export declare const replaceEditEntrySchema: z.ZodObject<{
117
- old_text: z.ZodString;
118
- new_text: z.ZodString;
119
- all: z.ZodOptional<z.ZodBoolean>;
120
- }, z.core.$strict>;
121
- export declare const replaceEditSchema: z.ZodObject<{
122
- path: z.ZodString;
123
- edits: z.ZodArray<z.ZodObject<{
124
- old_text: z.ZodString;
125
- new_text: z.ZodString;
126
- all: z.ZodOptional<z.ZodBoolean>;
127
- }, z.core.$strict>>;
128
- }, z.core.$strict>;
129
- export type ReplaceEditEntry = z.infer<typeof replaceEditEntrySchema>;
130
- export type ReplaceParams = z.infer<typeof replaceEditSchema>;
115
+ export declare const replaceEditEntrySchema: import("arktype/internal/variants/object.ts").ObjectType<{
116
+ old_text: string;
117
+ new_text: string;
118
+ all?: boolean | undefined;
119
+ }, {}>;
120
+ export declare const replaceEditSchema: import("arktype/internal/variants/object.ts").ObjectType<{
121
+ path: string;
122
+ edits: {
123
+ old_text: string;
124
+ new_text: string;
125
+ all?: boolean | undefined;
126
+ }[];
127
+ }, {}>;
128
+ export type ReplaceEditEntry = typeof replaceEditEntrySchema.infer;
129
+ export type ReplaceParams = typeof replaceEditSchema.infer;
131
130
  export interface ExecuteReplaceSingleOptions {
132
131
  session: ToolSession;
133
132
  path: string;
@@ -139,4 +138,4 @@ export interface ExecuteReplaceSingleOptions {
139
138
  writethrough: WritethroughCallback;
140
139
  beginDeferredDiagnosticsForPath: (path: string) => WritethroughDeferredHandle;
141
140
  }
142
- export declare function executeReplaceSingle(options: ExecuteReplaceSingleOptions): Promise<AgentToolResult<EditToolDetails, typeof replaceEditEntrySchema>>;
141
+ export declare function executeReplaceSingle(options: ExecuteReplaceSingleOptions): Promise<AgentToolResult<EditToolDetails, ReplaceEditEntry>>;
@@ -1,5 +1,6 @@
1
1
  import type { ToolSession } from "../../tools";
2
2
  import { type ExecutorBackendExecOptions, type ExecutorBackendResult } from "../backend";
3
+ export declare function namespaceSessionId(sessionId: string): string;
3
4
  declare const _default: {
4
5
  id: "js";
5
6
  label: string;
@@ -5,7 +5,8 @@
5
5
  * Unlike markdown commands which expand to prompts, custom commands can execute
6
6
  * arbitrary logic with full access to the hook context.
7
7
  */
8
- import type { z } from "zod/v4";
8
+ import type * as arktype from "arktype";
9
+ import type * as zod from "zod/v4";
9
10
  import type { ExecOptions, ExecResult, HookCommandContext } from "../../extensibility/hooks/types";
10
11
  import type * as PiCodingAgent from "../../index";
11
12
  import type * as TypeBox from "../typebox";
@@ -21,8 +22,10 @@ export interface CustomCommandAPI {
21
22
  exec(command: string, args: string[], options?: ExecOptions): Promise<ExecResult>;
22
23
  /** Injected zod-backed typebox shim (legacy/compat). */
23
24
  typebox: typeof TypeBox;
24
- /** Injected zod module for Zod-authored custom commands. */
25
- zod: typeof z;
25
+ /** Injected arktype module for validation in custom commands. */
26
+ arktype: typeof arktype;
27
+ /** Injected zod/v4 module for canonical command validation. */
28
+ zod: typeof zod;
26
29
  /** Injected pi-coding-agent exports */
27
30
  pi: typeof PiCodingAgent;
28
31
  }
@@ -9,7 +9,8 @@ import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
9
9
  import type { FetchImpl, Model, Static, TSchema } from "@oh-my-pi/pi-ai";
10
10
  import type { Component } from "@oh-my-pi/pi-tui";
11
11
  import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
12
- import type { z } from "zod/v4";
12
+ import type { type as ArkType } from "arktype";
13
+ import type * as zod from "zod/v4";
13
14
  import type { Rule } from "../../capability/rule";
14
15
  import type { ModelRegistry } from "../../config/model-registry";
15
16
  import type { Settings } from "../../config/settings";
@@ -50,10 +51,12 @@ export interface CustomToolAPI {
50
51
  hasUI: boolean;
51
52
  /** File logger for error/warning/debug messages */
52
53
  logger: typeof PiLogger;
53
- /** Injected zod-backed typebox shim (legacy/compat — Zod-authored tools are preferred). */
54
+ /** Injected typebox shim (legacy/compat — arktype-authored tools are preferred). */
54
55
  typebox: typeof TypeBox;
55
- /** Injected zod module for Zod-authored custom tools. */
56
- zod: typeof z;
56
+ /** Injected arktype module for arktype-authored custom tools. */
57
+ arktype: typeof ArkType;
58
+ /** Injected zod/v4 module for canonical parameter schemas. */
59
+ zod: typeof zod;
57
60
  /** Injected pi-coding-agent exports */
58
61
  pi: typeof PiCodingAgent;
59
62
  /** Push a preview action that can later be resolved with the hidden resolve tool */
@@ -172,7 +175,7 @@ export interface CustomTool<TParams extends TSchema = TSchema, TDetails = any> {
172
175
  strict?: boolean;
173
176
  /** Description for LLM */
174
177
  description: string;
175
- /** Parameter schema (Zod or TypeBox; TypeBox is auto-lifted to Zod at registration). */
178
+ /** Parameter schema (arktype, TypeBox, or legacy formats). */
176
179
  parameters: TParams;
177
180
  /** If true, tool is excluded unless explicitly listed in --tools or agent's tools field */
178
181
  hidden?: boolean;
@@ -13,7 +13,8 @@ import type { Api, AssistantMessageEvent, AssistantMessageEventStream, Context,
13
13
  import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
14
14
  import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from "@oh-my-pi/pi-tui";
15
15
  import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
16
- import type { z } from "zod/v4";
16
+ import type { Type as arktype } from "arktype";
17
+ import type * as zod from "zod/v4";
17
18
  import type { KeybindingsManager } from "../../config/keybindings";
18
19
  import type { ModelRegistry } from "../../config/model-registry";
19
20
  import type { EditToolDetails } from "../../edit";
@@ -601,8 +602,10 @@ export interface ExtensionAPI {
601
602
  logger: typeof PiLogger;
602
603
  /** Injected zod-backed typebox shim for legacy `Type.Object(...)` parameter authoring. */
603
604
  typebox: typeof TypeBox;
604
- /** Injected zod module for Zod-authored extension tools (canonical going forward). */
605
- zod: typeof z;
605
+ /** Injected arktype module for arktype-authored extension tools (canonical going forward). */
606
+ arktype: typeof arktype;
607
+ /** Injected zod/v4 module for canonical extension tool parameter schemas. */
608
+ zod: typeof zod;
606
609
  /** Injected pi-coding-agent exports for accessing SDK utilities */
607
610
  pi: typeof PiCodingAgent;
608
611
  on(event: "resources_discover", handler: ExtensionHandler<ResourcesDiscoverEvent, ResourcesDiscoverResult>): void;
@@ -1,7 +1,8 @@
1
1
  import type { ImageContent, Message, Model, TextContent } from "@oh-my-pi/pi-ai";
2
2
  import type { Component, TUI } from "@oh-my-pi/pi-tui";
3
3
  import type { logger as PiLogger } from "@oh-my-pi/pi-utils";
4
- import type { z } from "zod/v4";
4
+ import type { Type } from "arktype";
5
+ import type * as zod from "zod/v4";
5
6
  import type { ModelRegistry } from "../../config/model-registry";
6
7
  import type { EditToolDetails } from "../../edit";
7
8
  import type { ExecOptions, ExecResult } from "../../exec/exec";
@@ -417,10 +418,12 @@ export interface HookAPI {
417
418
  exec(command: string, args: string[], options?: ExecOptions): Promise<ExecResult>;
418
419
  /** File logger for error/warning/debug messages */
419
420
  logger: typeof PiLogger;
420
- /** Injected zod-backed typebox shim (legacy/compat — prefer `zod`). */
421
+ /** Injected zod-backed typebox shim (legacy/compat — prefer `arktype`). */
421
422
  typebox: typeof TypeBox;
422
- /** Injected zod module for Zod-authored hooks. */
423
- zod: typeof z;
423
+ /** Injected arktype module for arktype-authored hooks. */
424
+ arktype: typeof Type;
425
+ /** Injected zod/v4 module for canonical hook validation. */
426
+ zod: typeof zod;
424
427
  /** Injected pi-coding-agent exports */
425
428
  pi: typeof PiCodingAgent;
426
429
  }
@@ -11,13 +11,21 @@
11
11
  * bare package root. Subpath imports (`@oh-my-pi/pi-ai/oauth`, etc.)
12
12
  * continue to resolve directly against the bundled pi-ai package.
13
13
  *
14
- * The `Type` runtime is borrowed from the Zod-backed TypeBox shim that
15
- * already serves bare `@sinclair/typebox` imports for the same extension
16
- * class, keeping the legacy-compat surface internally consistent.
14
+ * The `Type` runtime and legacy `StringEnum()` helper are borrowed from the
15
+ * Zod-backed TypeBox shim that already serves TypeBox imports for the same
16
+ * extension class, keeping the legacy-compat surface internally consistent.
17
17
  *
18
18
  * Type-level `Static` and `TSchema` continue to come from pi-ai's own
19
19
  * `types.ts` via the `export *` below — pi-ai still exports both as types,
20
- * only the runtime `Type` builder was removed.
20
+ * only the runtime `Type` builder and `StringEnum()` helper were removed.
21
21
  */
22
+ import { type TSchema, Type } from "./typebox";
23
+ export interface StringEnumOptions<T extends string> {
24
+ description?: string;
25
+ default?: T;
26
+ examples?: T[];
27
+ [key: string]: unknown;
28
+ }
29
+ export declare function StringEnum<T extends string>(values: readonly T[], options?: StringEnumOptions<T>): TSchema;
22
30
  export * from "@oh-my-pi/pi-ai";
23
- export { Type } from "./typebox";
31
+ export { Type };
@@ -11,4 +11,21 @@
11
11
  * entry, while still re-exporting the canonical surface so plugins observe
12
12
  * the same module identity as a direct `@oh-my-pi/pi-coding-agent` import.
13
13
  */
14
+ import type { TSchema } from "@oh-my-pi/pi-ai";
15
+ import { Settings } from "../config/settings";
16
+ import type { ToolDefinition } from "./extensions/types";
17
+ import { Type } from "./typebox";
18
+ export interface ParsedFrontmatter<T extends Record<string, unknown> = Record<string, unknown>> {
19
+ frontmatter: T;
20
+ body: string;
21
+ }
22
+ export declare function parseFrontmatter<T extends Record<string, unknown> = Record<string, unknown>>(content: string): ParsedFrontmatter<T>;
23
+ export declare function stripFrontmatter(content: string): string;
24
+ export declare function defineTool<TParams extends TSchema = TSchema, TDetails = unknown>(tool: ToolDefinition<TParams, TDetails>): ToolDefinition<TParams, TDetails>;
25
+ export declare function createCodingTools(cwd: string): ToolDefinition[];
26
+ export declare const SettingsManager: {
27
+ readonly create: (cwd: string, agentDir?: string) => Promise<Settings>;
28
+ readonly inMemory: () => Settings;
29
+ };
14
30
  export * from "../index";
31
+ export { Type };
@@ -1,45 +1,67 @@
1
1
  /**
2
- * Minimal `@sinclair/typebox` runtime compatibility shim, backed by Zod.
2
+ * Minimal `@sinclair/typebox` runtime compatibility shim.
3
3
  *
4
4
  * Historically the coding agent injected the real `@sinclair/typebox` (~5MB
5
5
  * dependency) into extensions, hooks, custom tools, and custom commands so
6
6
  * they could author parameter schemas as `Type.Object({ name: Type.String() })`.
7
- * Internally everything already runs through Zod (`wire.ts`, `validation.ts`);
8
- * the only reason TypeBox remained was extension-author compat.
9
7
  *
10
- * This module replaces that injection with a tiny façade whose `Type` builders
11
- * return Zod schemas. Output is indistinguishable from hand-written Zod inside
12
- * the agent pipeline:
8
+ * This module provides the subset those integrations depend on:
13
9
  *
14
- * - `isZodSchema()` keys off the Zod `_zod` marker that every schema carries.
15
- * - `zodToWireSchema()` emits the same draft 2020-12 JSON Schema providers expect
16
- * from TypeBox-authored tools (defaulted fields treated as optional, etc.).
10
+ * - TypeBox-style `Type.*` builders.
11
+ * - Runtime validation through `schema.safeParse(input)` and `schema.__validator(input)`.
12
+ * - Enumerable JSON Schema keywords so `{ ...schema }`, `JSON.stringify(schema)`,
13
+ * and `toolWireSchema({ parameters: schema })` all see the same schema.
17
14
  *
18
- * The surface intentionally covers only the common TypeBox builders. Plugins
19
- * that reached for niche TypeBox-only APIs (`TypeCompiler`, the global
20
- * `TypeRegistry`, custom `Symbol(TypeBox.Kind)` introspection) must vendor
21
- * `@sinclair/typebox` directly in their own package.
15
+ * Internal validator fields and methods are intentionally non-enumerable. The
16
+ * object should look like JSON Schema at every serialization/wire boundary and
17
+ * like a small validator at runtime.
22
18
  */
23
- import { type ZodArray, type ZodEnum, type ZodObject, type ZodOptional, type ZodRawShape, type ZodType, z } from "zod/v4";
24
- export type TSchema = ZodType;
25
- export type Static<T extends ZodType> = z.infer<T>;
26
- export type TAny = ZodType;
27
- export type TUnknown = ZodType;
28
- export type TNever = ZodType;
29
- export type TNull = ZodType;
30
- export type TString = z.ZodString;
31
- export type TNumber = z.ZodNumber;
32
- export type TInteger = z.ZodNumber;
33
- export type TBoolean = z.ZodBoolean;
34
- export type TLiteral<V extends string | number | boolean> = z.ZodLiteral<V>;
35
- export type TArray<E extends ZodType> = ZodArray<E>;
36
- export type TObject<P extends ZodRawShape = ZodRawShape> = ZodObject<P>;
37
- export type TOptional<E extends ZodType> = ZodOptional<E>;
38
- export type TUnion<_T extends readonly ZodType[] = readonly ZodType[]> = ZodType;
39
- export type TEnum<T extends readonly (string | number)[] = readonly (string | number)[]> = ZodEnum<{
40
- [K in T[number] as `${K}`]: K;
41
- }>;
42
- export type TRecord<_K extends ZodType, _V extends ZodType> = ZodType;
19
+ export type TSchema = ArkSchema;
20
+ export type Static<T extends ArkSchema> = T["__infer"];
21
+ export type TAny = ArkSchema;
22
+ export type TUnknown = ArkSchema;
23
+ export type TNever = ArkSchema;
24
+ export type TNull = ArkSchema;
25
+ export type TString = ArkSchema;
26
+ export type TNumber = ArkSchema;
27
+ export type TInteger = ArkSchema;
28
+ export type TBoolean = ArkSchema;
29
+ export type TLiteral<_V extends string | number | boolean> = ArkSchema;
30
+ export type TArray<_E extends ArkSchema> = ArkSchema;
31
+ export type TObject<_P extends Record<string, ArkSchema> = Record<string, ArkSchema>> = ArkSchema;
32
+ export type TOptional<_E extends ArkSchema> = ArkSchema;
33
+ export type TUnion<_T extends readonly ArkSchema[] = readonly ArkSchema[]> = ArkSchema;
34
+ export type TEnum<_T extends readonly (string | number)[] = readonly (string | number)[]> = ArkSchema;
35
+ export type TRecord<_K extends ArkSchema, _V extends ArkSchema> = ArkSchema;
36
+ declare const VALIDATION_FAILURE: unique symbol;
37
+ interface ValidationFailure {
38
+ message: string;
39
+ readonly [VALIDATION_FAILURE]: true;
40
+ }
41
+ interface SafeParseSuccess {
42
+ success: true;
43
+ data: unknown;
44
+ }
45
+ interface SafeParseFailure {
46
+ success: false;
47
+ error: ValidationFailure;
48
+ }
49
+ /**
50
+ * JSON-Schema-shaped object with non-enumerable runtime helpers.
51
+ * Validators return the validated data or a marked `{ message }` failure.
52
+ */
53
+ interface ArkSchema {
54
+ __validator: (data: unknown) => unknown;
55
+ __metadata?: Record<string, unknown>;
56
+ __optional?: true;
57
+ __properties?: Record<string, ArkSchema>;
58
+ __additionalProperties?: boolean | ArkSchema;
59
+ __infer?: unknown;
60
+ __inner?: ArkSchema;
61
+ safeParse(input: unknown): SafeParseSuccess | SafeParseFailure;
62
+ toJSON(): Record<string, unknown>;
63
+ [key: string]: unknown;
64
+ }
43
65
  interface Meta {
44
66
  title?: string;
45
67
  description?: string;
@@ -70,32 +92,32 @@ interface ObjectOpts extends Meta {
70
92
  * TypeBox default: extra keys are preserved. Set `false` to reject unknowns,
71
93
  * `true` to allow any, or a schema to validate them.
72
94
  */
73
- additionalProperties?: boolean | ZodType;
95
+ additionalProperties?: boolean | ArkSchema;
74
96
  }
75
- declare function tString(opts?: StringOpts): ZodType;
76
- declare function tNumber(opts?: NumberOpts): ZodType;
77
- declare function tInteger(opts?: NumberOpts): ZodType;
78
- declare function tBoolean(opts?: Meta): ZodType;
79
- declare function tNull(opts?: Meta): ZodType;
80
- declare function tAny(opts?: Meta): ZodType;
81
- declare function tUnknown(opts?: Meta): ZodType;
82
- declare function tNever(opts?: Meta): ZodType;
83
- declare function tLiteral<V extends string | number | boolean>(value: V, opts?: Meta): ZodType;
84
- declare function tUnion<T extends readonly ZodType[]>(schemas: T, opts?: Meta): ZodType;
85
- declare function tIntersect(schemas: readonly ZodType[], opts?: Meta): ZodType;
86
- declare function tEnum<T extends Record<string, string | number> | readonly (string | number)[]>(values: T, opts?: Meta): ZodType;
87
- declare function tArray<E extends ZodType>(item: E, opts?: ArrayOpts): ZodType;
88
- declare function tTuple(items: readonly ZodType[], opts?: Meta): ZodType;
89
- declare function tObject<P extends ZodRawShape>(properties: P, opts?: ObjectOpts): ZodObject<P>;
90
- declare function tRecord<V extends ZodType>(key: ZodType, value: V, opts?: Meta): ZodType;
91
- declare function tOptional<E extends ZodType>(schema: E, _opts?: Meta): ZodOptional<E>;
92
- declare function tNullable<E extends ZodType>(schema: E, opts?: Meta): ZodType;
93
- declare function tReadonly<E extends ZodType>(schema: E): E;
94
- declare function tPartial<P extends ZodRawShape>(obj: ZodObject<P>): ZodObject<P>;
95
- declare function tRequired<P extends ZodRawShape>(obj: ZodObject<P>): ZodObject<P>;
96
- declare function tPick<P extends ZodRawShape, K extends keyof P>(obj: ZodObject<P>, keys: readonly K[]): ZodObject<Pick<P, K>>;
97
- declare function tOmit<P extends ZodRawShape, K extends keyof P>(obj: ZodObject<P>, keys: readonly K[]): ZodObject<Omit<P, K>>;
98
- declare function tComposite(objects: readonly ZodObject<ZodRawShape>[], opts?: Meta): ZodObject<ZodRawShape>;
97
+ declare function tString(opts?: StringOpts): ArkSchema;
98
+ declare function tNumber(opts?: NumberOpts): ArkSchema;
99
+ declare function tInteger(opts?: NumberOpts): ArkSchema;
100
+ declare function tBoolean(opts?: Meta): ArkSchema;
101
+ declare function tNull(opts?: Meta): ArkSchema;
102
+ declare function tAny(opts?: Meta): ArkSchema;
103
+ declare function tUnknown(opts?: Meta): ArkSchema;
104
+ declare function tNever(opts?: Meta): ArkSchema;
105
+ declare function tLiteral<V extends string | number | boolean>(value: V, opts?: Meta): ArkSchema;
106
+ declare function tUnion<T extends readonly ArkSchema[]>(schemas: T, opts?: Meta): ArkSchema;
107
+ declare function tIntersect(schemas: readonly ArkSchema[], opts?: Meta): ArkSchema;
108
+ declare function tEnum<T extends Record<string, string | number> | readonly (string | number)[]>(values: T, opts?: Meta): ArkSchema;
109
+ declare function tArray<E extends ArkSchema>(item: E, opts?: ArrayOpts): ArkSchema;
110
+ declare function tTuple(items: readonly ArkSchema[], opts?: Meta): ArkSchema;
111
+ declare function tObject<P extends Record<string, ArkSchema>>(properties: P, opts?: ObjectOpts): ArkSchema;
112
+ declare function tRecord<K extends ArkSchema, V extends ArkSchema>(key: K, value: V, opts?: Meta): ArkSchema;
113
+ declare function tOptional<E extends ArkSchema>(schema: E, opts?: Meta): ArkSchema;
114
+ declare function tNullable<E extends ArkSchema>(schema: E, opts?: Meta): ArkSchema;
115
+ declare function tReadonly<E extends ArkSchema>(schema: E): ArkSchema;
116
+ declare function tPartial<_P extends Record<string, ArkSchema>>(obj: ArkSchema): ArkSchema;
117
+ declare function tRequired<_P extends Record<string, ArkSchema>>(obj: ArkSchema): ArkSchema;
118
+ declare function tPick<P extends Record<string, ArkSchema>, K extends keyof P>(obj: ArkSchema, keys: readonly K[]): ArkSchema;
119
+ declare function tOmit<P extends Record<string, ArkSchema>, K extends keyof P>(obj: ArkSchema, keys: readonly K[]): ArkSchema;
120
+ declare function tComposite(objects: readonly ArkSchema[], opts?: Meta): ArkSchema;
99
121
  export declare const Type: {
100
122
  readonly String: typeof tString;
101
123
  readonly Number: typeof tNumber;
@@ -1,22 +1,15 @@
1
1
  import type { AgentTool, AgentToolContext, AgentToolResult, AgentToolUpdateCallback } from "@oh-my-pi/pi-agent-core";
2
2
  import type { Component } from "@oh-my-pi/pi-tui";
3
- import { z } from "zod/v4";
4
3
  import type { RenderResultOptions } from "../../extensibility/custom-tools/types";
5
4
  import type { Theme } from "../../modes/theme/theme";
6
5
  import type { ToolSession } from "../../tools";
7
6
  import type { Goal, GoalToolDetails } from "../state";
8
- declare const goalSchema: z.ZodObject<{
9
- op: z.ZodEnum<{
10
- complete: "complete";
11
- create: "create";
12
- drop: "drop";
13
- get: "get";
14
- resume: "resume";
15
- }>;
16
- objective: z.ZodOptional<z.ZodString>;
17
- token_budget: z.ZodOptional<z.ZodNumber>;
18
- }, z.core.$strip>;
19
- export type GoalToolInput = z.infer<typeof goalSchema>;
7
+ declare const goalSchema: import("arktype/internal/variants/object.ts").ObjectType<{
8
+ op: "complete" | "create" | "drop" | "get" | "resume";
9
+ objective?: string | undefined;
10
+ token_budget?: number | undefined;
11
+ }, {}>;
12
+ export type GoalToolInput = typeof goalSchema.infer;
20
13
  export interface GoalToolResponse {
21
14
  goal: Goal | null;
22
15
  remainingTokens: number | null;
@@ -30,17 +23,11 @@ export declare class GoalTool implements AgentTool<typeof goalSchema, GoalToolDe
30
23
  readonly name = "goal";
31
24
  readonly label = "Goal";
32
25
  readonly description: string;
33
- readonly parameters: z.ZodObject<{
34
- op: z.ZodEnum<{
35
- complete: "complete";
36
- create: "create";
37
- drop: "drop";
38
- get: "get";
39
- resume: "resume";
40
- }>;
41
- objective: z.ZodOptional<z.ZodString>;
42
- token_budget: z.ZodOptional<z.ZodNumber>;
43
- }, z.core.$strip>;
26
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
27
+ op: "complete" | "create" | "drop" | "get" | "resume";
28
+ objective?: string | undefined;
29
+ token_budget?: number | undefined;
30
+ }, {}>;
44
31
  readonly strict = true;
45
32
  readonly intent: "omit";
46
33
  constructor(session: ToolSession);
@@ -1,6 +1,8 @@
1
1
  import { HookEditorComponent, HookInputComponent, HookSelectorComponent } from "./modes/components";
2
2
  export { Container, Markdown, Spacer, Text } from "@oh-my-pi/pi-tui";
3
3
  export { getAgentDir, logger, VERSION } from "@oh-my-pi/pi-utils";
4
+ export * as zod from "zod/v4";
5
+ export { z } from "zod/v4";
4
6
  export * from "./config/keybindings";
5
7
  export * from "./config/model-registry";
6
8
  export type * from "./config/prompt-templates";
@@ -102,32 +102,17 @@ export declare class LspTool implements AgentTool<typeof lspSchema, LspToolDetai
102
102
  readonly loadMode = "discoverable";
103
103
  readonly summary = "Query LSP (language server) for diagnostics, hover info, and references";
104
104
  readonly description: string;
105
- readonly parameters: import("zod/v4").ZodObject<{
106
- action: import("zod/v4").ZodEnum<{
107
- capabilities: "capabilities";
108
- code_actions: "code_actions";
109
- definition: "definition";
110
- diagnostics: "diagnostics";
111
- hover: "hover";
112
- implementation: "implementation";
113
- references: "references";
114
- reload: "reload";
115
- rename: "rename";
116
- rename_file: "rename_file";
117
- request: "request";
118
- status: "status";
119
- symbols: "symbols";
120
- type_definition: "type_definition";
121
- }>;
122
- file: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
123
- line: import("zod/v4").ZodOptional<import("zod/v4").ZodNumber>;
124
- symbol: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
125
- query: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
126
- new_name: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
127
- apply: import("zod/v4").ZodOptional<import("zod/v4").ZodBoolean>;
128
- timeout: import("zod/v4").ZodOptional<import("zod/v4").ZodNumber>;
129
- payload: import("zod/v4").ZodOptional<import("zod/v4").ZodString>;
130
- }, import("zod/v4/core").$strip>;
105
+ readonly parameters: import("arktype/internal/variants/object.ts").ObjectType<{
106
+ action: "capabilities" | "code_actions" | "definition" | "diagnostics" | "hover" | "implementation" | "references" | "reload" | "rename" | "rename_file" | "request" | "status" | "symbols" | "type_definition";
107
+ file?: string | undefined;
108
+ line?: number | undefined;
109
+ symbol?: string | undefined;
110
+ query?: string | undefined;
111
+ new_name?: string | undefined;
112
+ apply?: boolean | undefined;
113
+ timeout?: number | undefined;
114
+ payload?: string | undefined;
115
+ }, {}>;
131
116
  readonly strict = true;
132
117
  constructor(session: ToolSession);
133
118
  static createIf(session: ToolSession): LspTool | null;
@@ -1,32 +1,16 @@
1
1
  import type { ptree } from "@oh-my-pi/pi-utils";
2
- import { z } from "zod/v4";
3
- export declare const lspSchema: z.ZodObject<{
4
- action: z.ZodEnum<{
5
- capabilities: "capabilities";
6
- code_actions: "code_actions";
7
- definition: "definition";
8
- diagnostics: "diagnostics";
9
- hover: "hover";
10
- implementation: "implementation";
11
- references: "references";
12
- reload: "reload";
13
- rename: "rename";
14
- rename_file: "rename_file";
15
- request: "request";
16
- status: "status";
17
- symbols: "symbols";
18
- type_definition: "type_definition";
19
- }>;
20
- file: z.ZodOptional<z.ZodString>;
21
- line: z.ZodOptional<z.ZodNumber>;
22
- symbol: z.ZodOptional<z.ZodString>;
23
- query: z.ZodOptional<z.ZodString>;
24
- new_name: z.ZodOptional<z.ZodString>;
25
- apply: z.ZodOptional<z.ZodBoolean>;
26
- timeout: z.ZodOptional<z.ZodNumber>;
27
- payload: z.ZodOptional<z.ZodString>;
28
- }, z.core.$strip>;
29
- export type LspParams = z.infer<typeof lspSchema>;
2
+ export declare const lspSchema: import("arktype/internal/variants/object.ts").ObjectType<{
3
+ action: "capabilities" | "code_actions" | "definition" | "diagnostics" | "hover" | "implementation" | "references" | "reload" | "rename" | "rename_file" | "request" | "status" | "symbols" | "type_definition";
4
+ file?: string | undefined;
5
+ line?: number | undefined;
6
+ symbol?: string | undefined;
7
+ query?: string | undefined;
8
+ new_name?: string | undefined;
9
+ apply?: boolean | undefined;
10
+ timeout?: number | undefined;
11
+ payload?: string | undefined;
12
+ }, {}>;
13
+ export type LspParams = typeof lspSchema.infer;
30
14
  export interface LspToolDetails {
31
15
  serverName?: string;
32
16
  action: string;
@@ -35,6 +35,14 @@ export declare function listResources(connection: MCPServerConnection, options?:
35
35
  }): Promise<MCPResource[]>;
36
36
  /**
37
37
  * List resource templates from a connected server.
38
+ *
39
+ * A server MAY advertise the `resources` capability without implementing the
40
+ * optional `resources/templates/list` method (it is optional in the MCP spec).
41
+ * Such servers reject the request with JSON-RPC -32601 ("Method not found").
42
+ * Treat that as "no templates" and return `[]` rather than throwing — otherwise
43
+ * a caller that loads resources and templates together (see `MCPManager`'s
44
+ * `Promise.all([listResources, listResourceTemplates])`) would discard the
45
+ * server's concrete resources too. Any other error still propagates.
38
46
  */
39
47
  export declare function listResourceTemplates(connection: MCPServerConnection, options?: {
40
48
  signal?: AbortSignal;