@oh-my-pi/pi-coding-agent 15.10.5 → 15.10.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 (42) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/types/exa/index.d.ts +1 -19
  3. package/dist/types/exa/mcp-client.d.ts +10 -3
  4. package/dist/types/exa/types.d.ts +0 -83
  5. package/dist/types/modes/controllers/mcp-command-controller.d.ts +8 -0
  6. package/dist/types/modes/interactive-mode.d.ts +8 -0
  7. package/dist/types/modes/types.d.ts +1 -0
  8. package/dist/types/task/render.d.ts +1 -0
  9. package/dist/types/tools/index.d.ts +0 -2
  10. package/dist/types/utils/git.d.ts +6 -0
  11. package/package.json +9 -9
  12. package/src/cli/auth-gateway-cli.ts +3 -2
  13. package/src/commit/agentic/tools/split-commit.ts +8 -1
  14. package/src/config/model-provider-priority.ts +1 -0
  15. package/src/exa/index.ts +1 -26
  16. package/src/exa/mcp-client.ts +10 -10
  17. package/src/exa/types.ts +0 -97
  18. package/src/internal-urls/docs-index.generated.ts +1 -1
  19. package/src/mcp/manager.ts +17 -16
  20. package/src/modes/components/agent-dashboard.ts +6 -4
  21. package/src/modes/controllers/event-controller.ts +8 -0
  22. package/src/modes/controllers/input-controller.ts +24 -1
  23. package/src/modes/controllers/mcp-command-controller.ts +24 -5
  24. package/src/modes/interactive-mode.ts +33 -1
  25. package/src/modes/types.ts +1 -0
  26. package/src/prompts/tools/read.md +0 -1
  27. package/src/session/agent-session.ts +77 -41
  28. package/src/slash-commands/builtin-registry.ts +8 -0
  29. package/src/task/index.ts +9 -1
  30. package/src/task/render.ts +22 -12
  31. package/src/tools/index.ts +0 -4
  32. package/src/utils/git.ts +41 -0
  33. package/dist/types/exa/factory.d.ts +0 -13
  34. package/dist/types/exa/render.d.ts +0 -19
  35. package/dist/types/exa/researcher.d.ts +0 -9
  36. package/dist/types/exa/search.d.ts +0 -9
  37. package/dist/types/exa/websets.d.ts +0 -9
  38. package/src/exa/factory.ts +0 -60
  39. package/src/exa/render.ts +0 -244
  40. package/src/exa/researcher.ts +0 -36
  41. package/src/exa/search.ts +0 -47
  42. package/src/exa/websets.ts +0 -248
package/src/exa/render.ts DELETED
@@ -1,244 +0,0 @@
1
- /**
2
- * Exa TUI Rendering
3
- *
4
- * Tree-based rendering with collapsed/expanded states for Exa search results.
5
- */
6
- import type { Component } from "@oh-my-pi/pi-tui";
7
- import { Text } from "@oh-my-pi/pi-tui";
8
- import { logger } from "@oh-my-pi/pi-utils";
9
- import type { RenderResultOptions } from "../extensibility/custom-tools/types";
10
- import type { Theme } from "../modes/theme/theme";
11
- import {
12
- formatCount,
13
- formatExpandHint,
14
- formatMoreItems,
15
- formatStatusIcon,
16
- getDomain,
17
- getPreviewLines,
18
- PREVIEW_LIMITS,
19
- TRUNCATE_LENGTHS,
20
- truncateToWidth,
21
- } from "../tools/render-utils";
22
- import type { ExaRenderDetails } from "./types";
23
-
24
- const COLLAPSED_PREVIEW_LINES = PREVIEW_LIMITS.COLLAPSED_LINES;
25
- const COLLAPSED_PREVIEW_LINE_LEN = TRUNCATE_LENGTHS.LONG;
26
- const EXPANDED_TEXT_LINES = 5;
27
- const EXPANDED_TEXT_LINE_LEN = 90;
28
- const MAX_TITLE_LEN = TRUNCATE_LENGTHS.TITLE;
29
- const MAX_HIGHLIGHT_LEN = TRUNCATE_LENGTHS.CONTENT;
30
-
31
- function renderErrorMessage(message: string, theme: Theme): Text {
32
- const clean = message.replace(/^Error:\s*/, "").trim();
33
- return new Text(
34
- `${formatStatusIcon("error", theme)} ${theme.fg("error", `Error: ${clean || "Unknown error"}`)}`,
35
- 0,
36
- 0,
37
- );
38
- }
39
-
40
- function renderEmptyMessage(message: string, theme: Theme): Text {
41
- return new Text(`${formatStatusIcon("warning", theme)} ${theme.fg("muted", message)}`, 0, 0);
42
- }
43
-
44
- /** Render Exa result with tree-based layout */
45
- export function renderExaResult(
46
- result: { content: Array<{ type: string; text?: string }>; details?: ExaRenderDetails },
47
- options: RenderResultOptions,
48
- uiTheme: Theme,
49
- ): Component {
50
- const { expanded } = options;
51
- const details = result.details;
52
-
53
- if (details?.error) {
54
- logger.error("Exa render error", { error: details.error, toolName: details.toolName });
55
- return renderErrorMessage(details.error, uiTheme);
56
- }
57
-
58
- const response = details?.response;
59
- if (!response) {
60
- if (details?.raw) {
61
- const rawText = typeof details.raw === "string" ? details.raw : JSON.stringify(details.raw, null, 2);
62
- const rawLines = rawText.split("\n").filter(l => l.trim());
63
- const maxLines = expanded ? rawLines.length : Math.min(rawLines.length, COLLAPSED_PREVIEW_LINES);
64
- const displayLines = rawLines.slice(0, maxLines);
65
- const remaining = rawLines.length - maxLines;
66
- const expandHint = formatExpandHint(uiTheme, expanded, remaining > 0);
67
-
68
- let text = `${formatStatusIcon("info", uiTheme)} ${uiTheme.fg("dim", "Raw response")}${expandHint}`;
69
-
70
- for (let i = 0; i < displayLines.length; i++) {
71
- const isLast = i === displayLines.length - 1 && remaining === 0;
72
- const branch = isLast ? uiTheme.tree.last : uiTheme.tree.branch;
73
- text += `\n ${uiTheme.fg("dim", branch)} ${uiTheme.fg(
74
- "toolOutput",
75
- truncateToWidth(displayLines[i], COLLAPSED_PREVIEW_LINE_LEN),
76
- )}`;
77
- }
78
-
79
- if (remaining > 0) {
80
- text += `\n ${uiTheme.fg("dim", uiTheme.tree.last)} ${uiTheme.fg(
81
- "muted",
82
- formatMoreItems(remaining, "line"),
83
- )}`;
84
- }
85
-
86
- return new Text(text, 0, 0);
87
- }
88
- return renderEmptyMessage("No response data", uiTheme);
89
- }
90
-
91
- const results = response.results ?? [];
92
- const resultCount = results.length;
93
- const cost = response.costDollars?.total;
94
- const time = response.searchTime;
95
-
96
- const icon = resultCount > 0 ? uiTheme.styledSymbol("tool.exa", "accent") : formatStatusIcon("warning", uiTheme);
97
-
98
- const metaParts = [formatCount("result", resultCount)];
99
- if (cost !== undefined) metaParts.push(`cost:$${cost.toFixed(4)}`);
100
- if (time !== undefined) metaParts.push(`time:${time.toFixed(2)}s`);
101
- const summaryText = metaParts.join(uiTheme.sep.dot);
102
-
103
- let hasMorePreview = false;
104
- if (!expanded && resultCount > 0) {
105
- const previewText = results[0].text ?? results[0].title ?? "";
106
- const totalLines = previewText.split("\n").filter(l => l.trim()).length;
107
- hasMorePreview = totalLines > COLLAPSED_PREVIEW_LINES || resultCount > 1;
108
- }
109
- const expandHint = formatExpandHint(uiTheme, expanded, hasMorePreview);
110
-
111
- let text = `${icon} ${uiTheme.fg("dim", summaryText)}${expandHint}`;
112
-
113
- if (!expanded) {
114
- if (resultCount === 0) {
115
- text += `\n ${uiTheme.fg("dim", uiTheme.tree.last)} ${uiTheme.fg("muted", "No results")}`;
116
- return new Text(text, 0, 0);
117
- }
118
-
119
- const first = results[0];
120
- const previewText = first.text ?? first.title ?? "";
121
- const previewLines = previewText
122
- ? getPreviewLines(previewText, COLLAPSED_PREVIEW_LINES, COLLAPSED_PREVIEW_LINE_LEN)
123
- : [];
124
- const safePreviewLines = previewLines.length > 0 ? previewLines : ["No preview text"];
125
- const totalLines = previewText.split("\n").filter(l => l.trim()).length;
126
- const remainingLines = Math.max(0, totalLines - previewLines.length);
127
- const extraItems: string[] = [];
128
- if (remainingLines > 0) {
129
- extraItems.push(formatMoreItems(remainingLines, "line"));
130
- }
131
- if (resultCount > 1) {
132
- extraItems.push(formatMoreItems(resultCount - 1, "result"));
133
- }
134
-
135
- for (let i = 0; i < safePreviewLines.length; i++) {
136
- const isLast = i === safePreviewLines.length - 1 && extraItems.length === 0;
137
- const branch = isLast ? uiTheme.tree.last : uiTheme.tree.branch;
138
- const line = safePreviewLines[i];
139
- const color = line === "No preview text" ? "muted" : "toolOutput";
140
- text += `\n ${uiTheme.fg("dim", branch)} ${uiTheme.fg(color, line)}`;
141
- }
142
-
143
- for (let i = 0; i < extraItems.length; i++) {
144
- const isLast = i === extraItems.length - 1;
145
- const branch = isLast ? uiTheme.tree.last : uiTheme.tree.branch;
146
- text += `\n ${uiTheme.fg("dim", branch)} ${uiTheme.fg("muted", extraItems[i])}`;
147
- }
148
-
149
- return new Text(text, 0, 0);
150
- }
151
-
152
- if (resultCount === 0) {
153
- text += `\n ${uiTheme.fg("dim", uiTheme.tree.last)} ${uiTheme.fg("muted", "No results")}`;
154
- return new Text(text, 0, 0);
155
- }
156
-
157
- for (let i = 0; i < results.length; i++) {
158
- const res = results[i];
159
- const isLast = i === results.length - 1;
160
- const branch = isLast ? uiTheme.tree.last : uiTheme.tree.branch;
161
- const cont = isLast ? " " : uiTheme.tree.vertical;
162
-
163
- const title = truncateToWidth(res.title ?? "Untitled", MAX_TITLE_LEN);
164
- const domain = res.url ? getDomain(res.url) : "";
165
- const domainPart = domain ? uiTheme.fg("dim", ` (${domain})`) : "";
166
-
167
- text += `\n ${uiTheme.fg("dim", branch)} ${uiTheme.fg("accent", title)}${domainPart}`;
168
-
169
- if (res.url) {
170
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
171
- "mdLinkUrl",
172
- res.url,
173
- )}`;
174
- }
175
-
176
- if (res.author) {
177
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
178
- "muted",
179
- `Author: ${res.author}`,
180
- )}`;
181
- }
182
-
183
- if (res.publishedDate) {
184
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
185
- "muted",
186
- `Published: ${res.publishedDate}`,
187
- )}`;
188
- }
189
-
190
- if (res.text) {
191
- const textLines = res.text.split("\n").filter(l => l.trim());
192
- const displayLines = textLines.slice(0, EXPANDED_TEXT_LINES);
193
- for (const line of displayLines) {
194
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
195
- "toolOutput",
196
- truncateToWidth(line.trim(), EXPANDED_TEXT_LINE_LEN),
197
- )}`;
198
- }
199
- if (textLines.length > EXPANDED_TEXT_LINES) {
200
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
201
- "muted",
202
- formatMoreItems(textLines.length - EXPANDED_TEXT_LINES, "line"),
203
- )}`;
204
- }
205
- }
206
-
207
- if (res.highlights?.length) {
208
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
209
- "accent",
210
- "Highlights",
211
- )}`;
212
- const maxHighlights = Math.min(res.highlights.length, 3);
213
- for (let j = 0; j < maxHighlights; j++) {
214
- const h = res.highlights[j];
215
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
216
- "muted",
217
- `${uiTheme.format.dash} ${truncateToWidth(h, MAX_HIGHLIGHT_LEN)}`,
218
- )}`;
219
- }
220
- if (res.highlights.length > maxHighlights) {
221
- text += `\n ${uiTheme.fg("dim", cont)} ${uiTheme.fg("dim", uiTheme.tree.hook)} ${uiTheme.fg(
222
- "muted",
223
- formatMoreItems(res.highlights.length - maxHighlights, "highlight"),
224
- )}`;
225
- }
226
- }
227
- }
228
-
229
- return new Text(text, 0, 0);
230
- }
231
-
232
- /** Render Exa call (query/args preview) */
233
- export function renderExaCall(args: Record<string, unknown>, toolName: string, uiTheme: Theme): Component {
234
- const toolLabel = toolName || "Exa Search";
235
- const query = typeof args.query === "string" ? truncateToWidth(args.query, 80) : "?";
236
- const numResults = typeof args.num_results === "number" ? args.num_results : undefined;
237
-
238
- let text = `${uiTheme.fg("toolTitle", toolLabel)} ${uiTheme.fg("accent", query)}`;
239
- if (numResults !== undefined) {
240
- text += ` ${uiTheme.fg("muted", `results:${numResults}`)}`;
241
- }
242
-
243
- return new Text(text, 0, 0);
244
- }
@@ -1,36 +0,0 @@
1
- /**
2
- * Exa Researcher Tools
3
- *
4
- * Async research tasks with polling for completion.
5
- */
6
- import type { TSchema } from "@oh-my-pi/pi-ai";
7
- import * as z from "zod/v4";
8
- import type { CustomTool } from "../extensibility/custom-tools/types";
9
- import { createExaTool } from "./factory";
10
- import type { ExaRenderDetails } from "./types";
11
-
12
- const researcherStartTool = createExaTool(
13
- "exa_researcher_start",
14
- "Start Deep Research",
15
- "Start an asynchronous deep research task using Exa's researcher. Returns a task_id for polling completion.",
16
- z.object({
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
- }),
21
- "deep_researcher_start",
22
- { formatResponse: false },
23
- );
24
-
25
- const researcherPollTool = createExaTool(
26
- "exa_researcher_poll",
27
- "Poll Research Status",
28
- "Poll the status of an asynchronous research task. Returns status (pending|running|completed|failed) and result if completed.",
29
- z.object({
30
- task_id: z.string().describe("task id"),
31
- }),
32
- "deep_researcher_check",
33
- { formatResponse: false },
34
- );
35
-
36
- export const researcherTools: CustomTool<TSchema, ExaRenderDetails>[] = [researcherStartTool, researcherPollTool];
package/src/exa/search.ts DELETED
@@ -1,47 +0,0 @@
1
- /**
2
- * Exa Search Tools
3
- *
4
- * Basic neural/keyword search, deep research, code search, and URL crawling.
5
- */
6
- import type { TSchema } from "@oh-my-pi/pi-ai";
7
- import * as z from "zod/v4";
8
- import type { CustomTool } from "../extensibility/custom-tools/types";
9
- import { createExaTool } from "./factory";
10
- import type { ExaRenderDetails } from "./types";
11
-
12
- /** exa_search - Basic neural/keyword search */
13
- const exaSearchTool = createExaTool(
14
- "exa_search",
15
- "Exa Search",
16
- `Search the web using Exa's neural or keyword search.
17
-
18
- Returns structured search results with optional text content and highlights.
19
-
20
- Parameters:
21
- - query: Search query (required)
22
- - type: Search type - "neural" (semantic), "keyword" (exact), or "auto" (default: auto)
23
- - include_domains: Array of domains to include in results
24
- - exclude_domains: Array of domains to exclude from results
25
- - start_published_date: Filter results published after this date (ISO 8601)
26
- - end_published_date: Filter results published before this date (ISO 8601)
27
- - use_autoprompt: Let Exa optimize your query automatically (default: true)
28
- - text: Include page text content in results (default: false, costs more)
29
- - highlights: Include highlighted relevant snippets (default: false)
30
- - num_results: Maximum number of results to return (default: 10, max: 100)`,
31
-
32
- z.object({
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(),
43
- }),
44
- "web_search_exa",
45
- );
46
-
47
- export const searchTools: CustomTool<TSchema, ExaRenderDetails>[] = [exaSearchTool];
@@ -1,248 +0,0 @@
1
- /**
2
- * Exa Websets Tools
3
- *
4
- * CRUD operations for websets, items, searches, enrichments, and monitoring.
5
- */
6
- import type { TSchema } from "@oh-my-pi/pi-ai";
7
- import * as z from "zod/v4";
8
- import type { CustomTool } from "../extensibility/custom-tools/types";
9
- import { callWebsetsTool, findApiKey } from "./mcp-client";
10
- import type { ExaRenderDetails } from "./types";
11
-
12
- /** Helper to create a websets tool with proper execute signature */
13
- function createWebsetTool(
14
- name: string,
15
- label: string,
16
- description: string,
17
- parameters: TSchema,
18
- mcpToolName: string,
19
- ): CustomTool<TSchema, ExaRenderDetails> {
20
- return {
21
- name,
22
- label,
23
- description,
24
- parameters,
25
- async execute(_toolCallId, params, _onUpdate, _ctx, _signal) {
26
- try {
27
- const apiKey = findApiKey();
28
- if (!apiKey) {
29
- return {
30
- content: [{ type: "text" as const, text: "Error: EXA_API_KEY not found" }],
31
- details: { error: "EXA_API_KEY not found", toolName: name },
32
- };
33
- }
34
- const result = await callWebsetsTool(apiKey, mcpToolName, params as Record<string, unknown>);
35
- return {
36
- content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
37
- details: { raw: result, toolName: name },
38
- };
39
- } catch (error) {
40
- const message = error instanceof Error ? error.message : String(error);
41
- return {
42
- content: [{ type: "text" as const, text: `Error: ${message}` }],
43
- details: { error: message, toolName: name },
44
- };
45
- }
46
- },
47
- };
48
- }
49
-
50
- // CRUD Operations
51
- const websetCreateTool = createWebsetTool(
52
- "webset_create",
53
- "Create Webset",
54
- "Create a new webset collection for organizing web content.",
55
- z.object({
56
- name: z.string().describe("webset name"),
57
- description: z.string().describe("description").optional(),
58
- }),
59
- "create_webset",
60
- );
61
-
62
- const websetListTool = createWebsetTool(
63
- "webset_list",
64
- "List Websets",
65
- "List all websets in your account.",
66
- z.object({}),
67
- "list_websets",
68
- );
69
-
70
- const websetGetTool = createWebsetTool(
71
- "webset_get",
72
- "Get Webset",
73
- "Get details of a specific webset by ID.",
74
- z.object({
75
- id: z.string().describe("webset id"),
76
- }),
77
- "get_webset",
78
- );
79
-
80
- const websetUpdateTool = createWebsetTool(
81
- "webset_update",
82
- "Update Webset",
83
- "Update a webset's name or description.",
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(),
88
- }),
89
- "update_webset",
90
- );
91
-
92
- const websetDeleteTool = createWebsetTool(
93
- "webset_delete",
94
- "Delete Webset",
95
- "Delete a webset and all its contents.",
96
- z.object({
97
- id: z.string().describe("webset id"),
98
- }),
99
- "delete_webset",
100
- );
101
-
102
- // Item Management
103
- const websetItemsListTool = createWebsetTool(
104
- "webset_items_list",
105
- "List Webset Items",
106
- "List items in a webset with optional pagination.",
107
- z.object({
108
- webset_id: z.string().describe("webset id"),
109
- limit: z.number().describe("max items").optional(),
110
- offset: z.number().describe("offset").optional(),
111
- }),
112
- "list_webset_items",
113
- );
114
-
115
- const websetItemGetTool = createWebsetTool(
116
- "webset_item_get",
117
- "Get Webset Item",
118
- "Get a specific item from a webset.",
119
- z.object({
120
- webset_id: z.string().describe("webset id"),
121
- item_id: z.string().describe("item id"),
122
- }),
123
- "get_item",
124
- );
125
-
126
- // Search Operations
127
- const websetSearchCreateTool = createWebsetTool(
128
- "webset_search_create",
129
- "Create Webset Search",
130
- "Create a new search within a webset.",
131
- z.object({
132
- webset_id: z.string().describe("webset id"),
133
- query: z.string().describe("search query"),
134
- }),
135
- "create_search",
136
- );
137
-
138
- const websetSearchGetTool = createWebsetTool(
139
- "webset_search_get",
140
- "Get Webset Search",
141
- "Get the status and results of a webset search.",
142
- z.object({
143
- webset_id: z.string().describe("webset id"),
144
- search_id: z.string().describe("search id"),
145
- }),
146
- "get_search",
147
- );
148
-
149
- const websetSearchCancelTool = createWebsetTool(
150
- "webset_search_cancel",
151
- "Cancel Webset Search",
152
- "Cancel a running webset search.",
153
- z.object({
154
- webset_id: z.string().describe("webset id"),
155
- search_id: z.string().describe("search id"),
156
- }),
157
- "cancel_search",
158
- );
159
-
160
- // Enrichment Operations
161
- const websetEnrichmentCreateTool = createWebsetTool(
162
- "webset_enrichment_create",
163
- "Create Enrichment",
164
- "Create a new enrichment task for a webset.",
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"),
169
- }),
170
- "create_enrichment",
171
- );
172
-
173
- const websetEnrichmentGetTool = createWebsetTool(
174
- "webset_enrichment_get",
175
- "Get Enrichment",
176
- "Get the status and results of an enrichment task.",
177
- z.object({
178
- webset_id: z.string().describe("webset id"),
179
- enrichment_id: z.string().describe("enrichment id"),
180
- }),
181
- "get_enrichment",
182
- );
183
-
184
- const websetEnrichmentUpdateTool = createWebsetTool(
185
- "webset_enrichment_update",
186
- "Update Enrichment",
187
- "Update an enrichment's name or prompt.",
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(),
193
- }),
194
- "update_enrichment",
195
- );
196
-
197
- const websetEnrichmentDeleteTool = createWebsetTool(
198
- "webset_enrichment_delete",
199
- "Delete Enrichment",
200
- "Delete an enrichment task.",
201
- z.object({
202
- webset_id: z.string().describe("webset id"),
203
- enrichment_id: z.string().describe("enrichment id"),
204
- }),
205
- "delete_enrichment",
206
- );
207
-
208
- const websetEnrichmentCancelTool = createWebsetTool(
209
- "webset_enrichment_cancel",
210
- "Cancel Enrichment",
211
- "Cancel a running enrichment task.",
212
- z.object({
213
- webset_id: z.string().describe("webset id"),
214
- enrichment_id: z.string().describe("enrichment id"),
215
- }),
216
- "cancel_enrichment",
217
- );
218
-
219
- // Monitoring
220
- const websetMonitorCreateTool = createWebsetTool(
221
- "webset_monitor_create",
222
- "Create Monitor",
223
- "Create a monitoring task for a webset with optional webhook notifications.",
224
- z.object({
225
- webset_id: z.string().describe("webset id"),
226
- webhook_url: z.string().describe("webhook url").optional(),
227
- }),
228
- "create_monitor",
229
- );
230
-
231
- export const websetsTools: CustomTool<TSchema, ExaRenderDetails>[] = [
232
- websetCreateTool,
233
- websetListTool,
234
- websetGetTool,
235
- websetUpdateTool,
236
- websetDeleteTool,
237
- websetItemsListTool,
238
- websetItemGetTool,
239
- websetSearchCreateTool,
240
- websetSearchGetTool,
241
- websetSearchCancelTool,
242
- websetEnrichmentCreateTool,
243
- websetEnrichmentGetTool,
244
- websetEnrichmentUpdateTool,
245
- websetEnrichmentDeleteTool,
246
- websetEnrichmentCancelTool,
247
- websetMonitorCreateTool,
248
- ];