@oh-my-pi/pi-coding-agent 15.1.2 → 15.1.3

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 (141) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/types/cli/auth-broker-cli.d.ts +25 -0
  3. package/dist/types/cli/auth-gateway-cli.d.ts +18 -0
  4. package/dist/types/cli/grievances-cli.d.ts +12 -0
  5. package/dist/types/commands/auth-broker.d.ts +54 -0
  6. package/dist/types/commands/auth-gateway.d.ts +32 -0
  7. package/dist/types/commands/grievances.d.ts +1 -1
  8. package/dist/types/commit/agentic/tools/propose-commit.d.ts +9 -1
  9. package/dist/types/commit/agentic/tools/schemas.d.ts +9 -1
  10. package/dist/types/commit/agentic/tools/split-commit.d.ts +9 -1
  11. package/dist/types/config/model-registry.d.ts +3 -0
  12. package/dist/types/config/models-config-schema.d.ts +1 -0
  13. package/dist/types/config/settings-schema.d.ts +46 -0
  14. package/dist/types/discovery/agents.d.ts +12 -1
  15. package/dist/types/edit/renderer.d.ts +3 -0
  16. package/dist/types/eval/index.d.ts +0 -2
  17. package/dist/types/goals/tools/goal-tool.d.ts +10 -2
  18. package/dist/types/index.d.ts +0 -1
  19. package/dist/types/internal-urls/index.d.ts +1 -1
  20. package/dist/types/internal-urls/{pi-protocol.d.ts → omp-protocol.d.ts} +3 -3
  21. package/dist/types/internal-urls/types.d.ts +1 -1
  22. package/dist/types/modes/acp/acp-agent.d.ts +1 -0
  23. package/dist/types/modes/emoji-autocomplete.d.ts +16 -0
  24. package/dist/types/modes/interactive-mode.d.ts +1 -1
  25. package/dist/types/modes/prompt-action-autocomplete.d.ts +4 -0
  26. package/dist/types/plan-mode/approved-plan.d.ts +4 -0
  27. package/dist/types/sdk.d.ts +10 -3
  28. package/dist/types/session/agent-session.d.ts +1 -1
  29. package/dist/types/session/auth-broker-config.d.ts +13 -0
  30. package/dist/types/session/auth-storage.d.ts +1 -1
  31. package/dist/types/tools/eval.d.ts +41 -7
  32. package/dist/types/tools/irc.d.ts +8 -2
  33. package/dist/types/tools/report-tool-issue.d.ts +118 -1
  34. package/dist/types/tools/resolve.d.ts +8 -2
  35. package/examples/custom-tools/README.md +3 -12
  36. package/examples/extensions/README.md +2 -15
  37. package/examples/extensions/api-demo.ts +1 -7
  38. package/package.json +7 -7
  39. package/src/autoresearch/tools/init-experiment.ts +11 -33
  40. package/src/autoresearch/tools/log-experiment.ts +10 -24
  41. package/src/autoresearch/tools/run-experiment.ts +1 -1
  42. package/src/autoresearch/tools/update-notes.ts +2 -9
  43. package/src/cli/auth-broker-cli.ts +746 -0
  44. package/src/cli/auth-gateway-cli.ts +342 -0
  45. package/src/cli/grievances-cli.ts +109 -16
  46. package/src/cli.ts +4 -2
  47. package/src/commands/auth-broker.ts +96 -0
  48. package/src/commands/auth-gateway.ts +61 -0
  49. package/src/commands/grievances.ts +13 -8
  50. package/src/commands/launch.ts +1 -1
  51. package/src/commit/agentic/agent.ts +2 -0
  52. package/src/commit/agentic/tools/analyze-file.ts +2 -2
  53. package/src/commit/agentic/tools/git-file-diff.ts +2 -2
  54. package/src/commit/agentic/tools/git-hunk.ts +3 -3
  55. package/src/commit/agentic/tools/git-overview.ts +2 -2
  56. package/src/commit/agentic/tools/propose-changelog.ts +1 -3
  57. package/src/commit/agentic/tools/recent-commits.ts +1 -1
  58. package/src/commit/agentic/tools/schemas.ts +1 -9
  59. package/src/config/model-equivalence.ts +279 -174
  60. package/src/config/model-registry.ts +37 -6
  61. package/src/config/model-resolver.ts +13 -8
  62. package/src/config/models-config-schema.ts +8 -0
  63. package/src/config/settings-schema.ts +52 -0
  64. package/src/cursor.ts +1 -1
  65. package/src/debug/log-formatting.ts +1 -1
  66. package/src/debug/log-viewer.ts +1 -1
  67. package/src/debug/profiler.ts +4 -0
  68. package/src/debug/raw-sse-buffer.ts +100 -59
  69. package/src/debug/raw-sse.ts +1 -1
  70. package/src/discovery/agents.ts +15 -4
  71. package/src/edit/modes/apply-patch.ts +1 -5
  72. package/src/edit/modes/patch.ts +5 -5
  73. package/src/edit/modes/replace.ts +5 -5
  74. package/src/edit/renderer.ts +2 -1
  75. package/src/edit/streaming.ts +1 -1
  76. package/src/eval/index.ts +0 -2
  77. package/src/eval/js/shared/runtime.ts +25 -0
  78. package/src/eval/py/kernel.ts +1 -1
  79. package/src/exa/researcher.ts +4 -4
  80. package/src/exa/search.ts +10 -22
  81. package/src/exa/websets.ts +33 -33
  82. package/src/goals/tools/goal-tool.ts +3 -3
  83. package/src/index.ts +0 -3
  84. package/src/internal-urls/docs-index.generated.ts +21 -18
  85. package/src/internal-urls/index.ts +1 -1
  86. package/src/internal-urls/{pi-protocol.ts → omp-protocol.ts} +10 -10
  87. package/src/internal-urls/router.ts +3 -3
  88. package/src/internal-urls/types.ts +1 -1
  89. package/src/lsp/types.ts +8 -11
  90. package/src/main.ts +3 -0
  91. package/src/mcp/tool-bridge.ts +3 -3
  92. package/src/modes/acp/acp-agent.ts +88 -25
  93. package/src/modes/components/bash-execution.ts +1 -1
  94. package/src/modes/components/diff.ts +1 -2
  95. package/src/modes/components/eval-execution.ts +1 -1
  96. package/src/modes/components/oauth-selector.ts +38 -2
  97. package/src/modes/components/tool-execution.ts +1 -2
  98. package/src/modes/controllers/command-controller.ts +95 -34
  99. package/src/modes/controllers/input-controller.ts +4 -3
  100. package/src/modes/data/emojis.json +1 -0
  101. package/src/modes/emoji-autocomplete.ts +285 -0
  102. package/src/modes/interactive-mode.ts +92 -19
  103. package/src/modes/print-mode.ts +3 -3
  104. package/src/modes/prompt-action-autocomplete.ts +14 -0
  105. package/src/plan-mode/approved-plan.ts +9 -0
  106. package/src/prompts/system/system-prompt.md +1 -1
  107. package/src/prompts/system/ttsr-tool-reminder.md +5 -0
  108. package/src/prompts/tools/eval.md +25 -26
  109. package/src/prompts/tools/read.md +1 -1
  110. package/src/prompts/tools/resolve.md +1 -1
  111. package/src/prompts/tools/search.md +1 -1
  112. package/src/prompts/tools/web-search.md +1 -1
  113. package/src/sdk.ts +78 -7
  114. package/src/session/agent-session.ts +176 -77
  115. package/src/session/agent-storage.ts +7 -2
  116. package/src/session/auth-broker-config.ts +102 -0
  117. package/src/session/auth-storage.ts +7 -1
  118. package/src/session/streaming-output.ts +1 -1
  119. package/src/task/types.ts +10 -35
  120. package/src/tools/bash-interactive.ts +4 -1
  121. package/src/tools/bash-pty-selection.ts +2 -2
  122. package/src/tools/browser.ts +12 -20
  123. package/src/tools/eval.ts +77 -100
  124. package/src/tools/gh.ts +21 -45
  125. package/src/tools/hindsight-recall.ts +1 -1
  126. package/src/tools/hindsight-reflect.ts +2 -2
  127. package/src/tools/hindsight-retain.ts +3 -7
  128. package/src/tools/index.ts +8 -1
  129. package/src/tools/inspect-image.ts +4 -1
  130. package/src/tools/irc.ts +4 -12
  131. package/src/tools/job.ts +3 -11
  132. package/src/tools/report-tool-issue.ts +462 -17
  133. package/src/tools/resolve.ts +2 -7
  134. package/src/tools/todo-write.ts +8 -15
  135. package/src/utils/title-generator.ts +3 -0
  136. package/src/web/search/index.ts +6 -6
  137. package/dist/types/eval/parse.d.ts +0 -28
  138. package/dist/types/eval/sniff.d.ts +0 -11
  139. package/src/eval/eval.lark +0 -36
  140. package/src/eval/parse.ts +0 -407
  141. package/src/eval/sniff.ts +0 -28
@@ -1578,16 +1578,16 @@ export async function computePatchDiff(
1578
1578
 
1579
1579
  export const patchEditEntrySchema = z
1580
1580
  .object({
1581
- op: z.enum(["create", "delete", "update"]).optional().describe("Operation (default: update)"),
1582
- rename: z.string().describe("New path for move").optional(),
1583
- diff: z.string().describe("Diff hunks (update) or full content (create)").optional(),
1581
+ op: z.enum(["create", "delete", "update"]).optional().describe("operation (default update)"),
1582
+ rename: z.string().describe("new path for move").optional(),
1583
+ diff: z.string().describe("diff hunks or full content for create").optional(),
1584
1584
  })
1585
1585
  .strict();
1586
1586
 
1587
1587
  export const patchEditSchema = z
1588
1588
  .object({
1589
- path: z.string().describe("file path for edits"),
1590
- edits: z.array(patchEditEntrySchema).min(1).describe("Patch operations"),
1589
+ path: z.string().describe("file path"),
1590
+ edits: z.array(patchEditEntrySchema).min(1).describe("patch operations"),
1591
1591
  })
1592
1592
  .strict();
1593
1593
 
@@ -978,16 +978,16 @@ export function findContextLine(
978
978
 
979
979
  export const replaceEditEntrySchema = z
980
980
  .object({
981
- old_text: z.string().describe("Text to find (fuzzy whitespace matching enabled)"),
982
- new_text: z.string().describe("Replacement text"),
983
- all: z.boolean().describe("Replace all occurrences (default: unique match required)").optional(),
981
+ old_text: z.string().describe("text to find"),
982
+ new_text: z.string().describe("replacement text"),
983
+ all: z.boolean().describe("replace all occurrences").optional(),
984
984
  })
985
985
  .strict();
986
986
 
987
987
  export const replaceEditSchema = z
988
988
  .object({
989
- path: z.string().describe("file path for edits"),
990
- edits: z.array(replaceEditEntrySchema).min(1).describe("Replacements"),
989
+ path: z.string().describe("file path"),
990
+ edits: z.array(replaceEditEntrySchema).min(1).describe("replacements"),
991
991
  })
992
992
  .strict();
993
993
 
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * Edit tool renderer and LSP batching helpers.
3
3
  */
4
- import { sanitizeText } from "@oh-my-pi/pi-natives";
4
+
5
5
  import type { Component } from "@oh-my-pi/pi-tui";
6
6
  import { Text, visibleWidth, wrapTextWithAnsi } from "@oh-my-pi/pi-tui";
7
+ import { sanitizeText } from "@oh-my-pi/pi-utils";
7
8
  import type { RenderResultOptions } from "../extensibility/custom-tools/types";
8
9
  import type { FileDiagnosticsResult } from "../lsp";
9
10
  import { renderDiff as renderDiffColored } from "../modes/components/diff";
@@ -13,7 +13,7 @@
13
13
  * the injected `editMode` rather than probing argument shape.
14
14
  */
15
15
 
16
- import { sanitizeText } from "@oh-my-pi/pi-natives";
16
+ import { sanitizeText } from "@oh-my-pi/pi-utils";
17
17
  import {
18
18
  ABORT_MARKER,
19
19
  BEGIN_PATCH_MARKER,
package/src/eval/index.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  export * from "./backend";
2
2
  export { default as jsBackend } from "./js";
3
- export * from "./parse";
4
3
  export { default as pythonBackend } from "./py";
5
- export * from "./sniff";
6
4
  export * from "./types";
@@ -137,6 +137,13 @@ export class JsRuntime {
137
137
  },
138
138
  __omp_import__: async (source: string, options?: ImportCallOptions) => {
139
139
  const target = resolveImportSpecifier(this.#cwd, source);
140
+ // Always invalidate cached module records for user-owned source files so edits
141
+ // between cells are picked up. Bun ignores query-string busting on `file:` URLs
142
+ // but honors `delete require.cache[absPath]`; bare specifiers and URL schemes are
143
+ // left alone to keep package identity stable across cells.
144
+ if (isLocalPathSpecifier(source) && path.isAbsolute(target)) {
145
+ delete require.cache[target];
146
+ }
140
147
  return options !== undefined ? await import(target, options) : await import(target);
141
148
  },
142
149
  __omp_emit_status__: (op: string, data: Record<string, unknown> = {}) => {
@@ -193,3 +200,21 @@ function resolveImportSpecifier(cwd: string, source: string): string {
193
200
  return source;
194
201
  }
195
202
  }
203
+
204
+ /**
205
+ * Returns true when the original specifier is a relative or absolute filesystem path
206
+ * (i.e. user-owned source the agent is iterating on). Bare specifiers and URL schemes
207
+ * are excluded — `node:` built-ins cannot be reloaded, and busting bare packages would
208
+ * defeat module identity for every cell while bringing no editing benefit.
209
+ */
210
+ function isLocalPathSpecifier(source: string): boolean {
211
+ return (
212
+ source.startsWith("./") ||
213
+ source.startsWith("../") ||
214
+ source === "." ||
215
+ source === ".." ||
216
+ source.startsWith("/") ||
217
+ source.startsWith("~/") ||
218
+ /^[a-zA-Z]:[\\/]/.test(source)
219
+ );
220
+ }
@@ -626,7 +626,7 @@ export class PythonKernel {
626
626
  const exitedPromise = this.#exitedPromise;
627
627
  const timeout = new Promise<null>(resolve => {
628
628
  const timer = setTimeout(() => resolve(null), Math.max(0, timeoutMs));
629
- (timer as { unref?: () => void }).unref?.();
629
+ timer.unref?.();
630
630
  });
631
631
  return Promise.race([exitedPromise.then(code => code as number | null), timeout]);
632
632
  }
@@ -14,9 +14,9 @@ const researcherStartTool = createExaTool(
14
14
  "Start Deep Research",
15
15
  "Start an asynchronous deep research task using Exa's researcher. Returns a task_id for polling completion.",
16
16
  z.object({
17
- query: z.string().describe("Research query to investigate"),
18
- depth: z.number().int().min(1).max(5).describe("Research depth (1-5, default: 3)").optional(),
19
- breadth: z.number().int().min(1).max(5).describe("Research breadth (1-5, default: 3)").optional(),
17
+ query: z.string().describe("research query"),
18
+ depth: z.number().int().min(1).max(5).describe("research depth (1-5)").optional(),
19
+ breadth: z.number().int().min(1).max(5).describe("research breadth (1-5)").optional(),
20
20
  }),
21
21
  "deep_researcher_start",
22
22
  { formatResponse: false },
@@ -27,7 +27,7 @@ const researcherPollTool = createExaTool(
27
27
  "Poll Research Status",
28
28
  "Poll the status of an asynchronous research task. Returns status (pending|running|completed|failed) and result if completed.",
29
29
  z.object({
30
- task_id: z.string().describe("Task ID returned from exa_researcher_start"),
30
+ task_id: z.string().describe("task id"),
31
31
  }),
32
32
  "deep_researcher_check",
33
33
  { formatResponse: false },
package/src/exa/search.ts CHANGED
@@ -30,28 +30,16 @@ Parameters:
30
30
  - num_results: Maximum number of results to return (default: 10, max: 100)`,
31
31
 
32
32
  z.object({
33
- query: z.string().describe("Search query"),
34
- type: z
35
- .enum(["keyword", "neural", "auto"])
36
- .describe("Search type - neural (semantic), keyword (exact), or auto")
37
- .optional(),
38
- include_domains: z.array(z.string()).describe("Only include results from these domains").optional(),
39
- exclude_domains: z.array(z.string()).describe("Exclude results from these domains").optional(),
40
- start_published_date: z
41
- .string()
42
- .describe("Filter results published after this date (ISO 8601 format)")
43
- .optional(),
44
- end_published_date: z.string().describe("Filter results published before this date (ISO 8601 format)").optional(),
45
- use_autoprompt: z.boolean().describe("Let Exa optimize your query automatically (default: true)").optional(),
46
- text: z.boolean().describe("Include page text content in results (costs more, default: false)").optional(),
47
- highlights: z.boolean().describe("Include highlighted relevant snippets (default: false)").optional(),
48
- num_results: z
49
- .number()
50
- .int()
51
- .min(1)
52
- .max(100)
53
- .describe("Maximum number of results to return (default: 10, max: 100)")
54
- .optional(),
33
+ query: z.string().describe("search query"),
34
+ type: z.enum(["keyword", "neural", "auto"]).describe("search type").optional(),
35
+ include_domains: z.array(z.string()).describe("include domains").optional(),
36
+ exclude_domains: z.array(z.string()).describe("exclude domains").optional(),
37
+ start_published_date: z.string().describe("published after (iso 8601)").optional(),
38
+ end_published_date: z.string().describe("published before (iso 8601)").optional(),
39
+ use_autoprompt: z.boolean().describe("autoprompt").optional(),
40
+ text: z.boolean().describe("include page text").optional(),
41
+ highlights: z.boolean().describe("include highlights").optional(),
42
+ num_results: z.number().int().min(1).max(100).describe("max results (1-100)").optional(),
55
43
  }),
56
44
  "web_search_exa",
57
45
  );
@@ -53,8 +53,8 @@ const websetCreateTool = createWebsetTool(
53
53
  "Create Webset",
54
54
  "Create a new webset collection for organizing web content.",
55
55
  z.object({
56
- name: z.string().describe("Name of the webset"),
57
- description: z.string().describe("Optional description").optional(),
56
+ name: z.string().describe("webset name"),
57
+ description: z.string().describe("description").optional(),
58
58
  }),
59
59
  "create_webset",
60
60
  );
@@ -72,7 +72,7 @@ const websetGetTool = createWebsetTool(
72
72
  "Get Webset",
73
73
  "Get details of a specific webset by ID.",
74
74
  z.object({
75
- id: z.string().describe("Webset ID"),
75
+ id: z.string().describe("webset id"),
76
76
  }),
77
77
  "get_webset",
78
78
  );
@@ -82,9 +82,9 @@ const websetUpdateTool = createWebsetTool(
82
82
  "Update Webset",
83
83
  "Update a webset's name or description.",
84
84
  z.object({
85
- id: z.string().describe("Webset ID"),
86
- name: z.string().describe("New name").optional(),
87
- description: z.string().describe("New description").optional(),
85
+ id: z.string().describe("webset id"),
86
+ name: z.string().describe("new name").optional(),
87
+ description: z.string().describe("new description").optional(),
88
88
  }),
89
89
  "update_webset",
90
90
  );
@@ -94,7 +94,7 @@ const websetDeleteTool = createWebsetTool(
94
94
  "Delete Webset",
95
95
  "Delete a webset and all its contents.",
96
96
  z.object({
97
- id: z.string().describe("Webset ID"),
97
+ id: z.string().describe("webset id"),
98
98
  }),
99
99
  "delete_webset",
100
100
  );
@@ -105,9 +105,9 @@ const websetItemsListTool = createWebsetTool(
105
105
  "List Webset Items",
106
106
  "List items in a webset with optional pagination.",
107
107
  z.object({
108
- webset_id: z.string().describe("Webset ID"),
109
- limit: z.number().describe("Number of items to return").optional(),
110
- offset: z.number().describe("Pagination offset").optional(),
108
+ webset_id: z.string().describe("webset id"),
109
+ limit: z.number().describe("max items").optional(),
110
+ offset: z.number().describe("offset").optional(),
111
111
  }),
112
112
  "list_webset_items",
113
113
  );
@@ -117,8 +117,8 @@ const websetItemGetTool = createWebsetTool(
117
117
  "Get Webset Item",
118
118
  "Get a specific item from a webset.",
119
119
  z.object({
120
- webset_id: z.string().describe("Webset ID"),
121
- item_id: z.string().describe("Item ID"),
120
+ webset_id: z.string().describe("webset id"),
121
+ item_id: z.string().describe("item id"),
122
122
  }),
123
123
  "get_item",
124
124
  );
@@ -129,8 +129,8 @@ const websetSearchCreateTool = createWebsetTool(
129
129
  "Create Webset Search",
130
130
  "Create a new search within a webset.",
131
131
  z.object({
132
- webset_id: z.string().describe("Webset ID"),
133
- query: z.string().describe("Search query"),
132
+ webset_id: z.string().describe("webset id"),
133
+ query: z.string().describe("search query"),
134
134
  }),
135
135
  "create_search",
136
136
  );
@@ -140,8 +140,8 @@ const websetSearchGetTool = createWebsetTool(
140
140
  "Get Webset Search",
141
141
  "Get the status and results of a webset search.",
142
142
  z.object({
143
- webset_id: z.string().describe("Webset ID"),
144
- search_id: z.string().describe("Search ID"),
143
+ webset_id: z.string().describe("webset id"),
144
+ search_id: z.string().describe("search id"),
145
145
  }),
146
146
  "get_search",
147
147
  );
@@ -151,8 +151,8 @@ const websetSearchCancelTool = createWebsetTool(
151
151
  "Cancel Webset Search",
152
152
  "Cancel a running webset search.",
153
153
  z.object({
154
- webset_id: z.string().describe("Webset ID"),
155
- search_id: z.string().describe("Search ID"),
154
+ webset_id: z.string().describe("webset id"),
155
+ search_id: z.string().describe("search id"),
156
156
  }),
157
157
  "cancel_search",
158
158
  );
@@ -163,9 +163,9 @@ const websetEnrichmentCreateTool = createWebsetTool(
163
163
  "Create Enrichment",
164
164
  "Create a new enrichment task for a webset.",
165
165
  z.object({
166
- webset_id: z.string().describe("Webset ID"),
167
- name: z.string().describe("Enrichment name"),
168
- prompt: z.string().describe("Enrichment prompt"),
166
+ webset_id: z.string().describe("webset id"),
167
+ name: z.string().describe("enrichment name"),
168
+ prompt: z.string().describe("enrichment prompt"),
169
169
  }),
170
170
  "create_enrichment",
171
171
  );
@@ -175,8 +175,8 @@ const websetEnrichmentGetTool = createWebsetTool(
175
175
  "Get Enrichment",
176
176
  "Get the status and results of an enrichment task.",
177
177
  z.object({
178
- webset_id: z.string().describe("Webset ID"),
179
- enrichment_id: z.string().describe("Enrichment ID"),
178
+ webset_id: z.string().describe("webset id"),
179
+ enrichment_id: z.string().describe("enrichment id"),
180
180
  }),
181
181
  "get_enrichment",
182
182
  );
@@ -186,10 +186,10 @@ const websetEnrichmentUpdateTool = createWebsetTool(
186
186
  "Update Enrichment",
187
187
  "Update an enrichment's name or prompt.",
188
188
  z.object({
189
- webset_id: z.string().describe("Webset ID"),
190
- enrichment_id: z.string().describe("Enrichment ID"),
191
- name: z.string().describe("New name").optional(),
192
- prompt: z.string().describe("New prompt").optional(),
189
+ webset_id: z.string().describe("webset id"),
190
+ enrichment_id: z.string().describe("enrichment id"),
191
+ name: z.string().describe("new name").optional(),
192
+ prompt: z.string().describe("new prompt").optional(),
193
193
  }),
194
194
  "update_enrichment",
195
195
  );
@@ -199,8 +199,8 @@ const websetEnrichmentDeleteTool = createWebsetTool(
199
199
  "Delete Enrichment",
200
200
  "Delete an enrichment task.",
201
201
  z.object({
202
- webset_id: z.string().describe("Webset ID"),
203
- enrichment_id: z.string().describe("Enrichment ID"),
202
+ webset_id: z.string().describe("webset id"),
203
+ enrichment_id: z.string().describe("enrichment id"),
204
204
  }),
205
205
  "delete_enrichment",
206
206
  );
@@ -210,8 +210,8 @@ const websetEnrichmentCancelTool = createWebsetTool(
210
210
  "Cancel Enrichment",
211
211
  "Cancel a running enrichment task.",
212
212
  z.object({
213
- webset_id: z.string().describe("Webset ID"),
214
- enrichment_id: z.string().describe("Enrichment ID"),
213
+ webset_id: z.string().describe("webset id"),
214
+ enrichment_id: z.string().describe("enrichment id"),
215
215
  }),
216
216
  "cancel_enrichment",
217
217
  );
@@ -222,8 +222,8 @@ const websetMonitorCreateTool = createWebsetTool(
222
222
  "Create Monitor",
223
223
  "Create a monitoring task for a webset with optional webhook notifications.",
224
224
  z.object({
225
- webset_id: z.string().describe("Webset ID"),
226
- webhook_url: z.string().describe("Webhook URL for notifications").optional(),
225
+ webset_id: z.string().describe("webset id"),
226
+ webhook_url: z.string().describe("webhook url").optional(),
227
227
  }),
228
228
  "create_monitor",
229
229
  );
@@ -15,9 +15,9 @@ import { completionBudgetReport, remainingTokens } from "../runtime";
15
15
  import type { Goal, GoalStatus, GoalToolDetails } from "../state";
16
16
 
17
17
  const goalSchema = z.object({
18
- op: z.union([z.literal("create"), z.literal("get"), z.literal("complete")]).describe("Goal operation."),
19
- objective: z.string().describe("Goal objective. Required when op=create.").optional(),
20
- token_budget: z.number().int().describe("Optional positive token budget. Only honored when op=create.").optional(),
18
+ op: z.enum(["create", "get", "complete"]).describe("goal operation"),
19
+ objective: z.string().describe("goal objective").optional(),
20
+ token_budget: z.number().int().describe("token budget").optional(),
21
21
  });
22
22
 
23
23
  export type GoalToolInput = z.infer<typeof goalSchema>;
package/src/index.ts CHANGED
@@ -2,9 +2,6 @@ import { HookEditorComponent, HookInputComponent, HookSelectorComponent } from "
2
2
 
3
3
  // Core session management
4
4
 
5
- // TypeBox helper for string enums (convenience for custom tools)
6
- // Re-export from pi-ai which uses the correct enum-based schema format
7
- export { StringEnum } from "@oh-my-pi/pi-ai";
8
5
  // Re-export TUI components for custom tool rendering
9
6
  export { Container, Markdown, Spacer, Text } from "@oh-my-pi/pi-tui";
10
7
  // Logging