@agntn/tools 0.2.2 → 0.2.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.
- package/README.md +10 -8
- package/dist/_chunks/index.d.mts +48 -4
- package/dist/_chunks/libs/typebox.d.mts +1 -2
- package/dist/_chunks/libs/typebox.mjs +0 -2
- package/dist/_chunks/mcp-answers.d.mts +2 -3
- package/dist/_chunks/mcp-answers.mjs +125 -9
- package/dist/_chunks/questions.mjs +93 -0
- package/dist/_chunks/src.mjs +78 -27
- package/dist/_chunks/updates.mjs +131 -2
- package/dist/ai.d.mts +4 -4
- package/dist/ai.mjs +12 -3
- package/dist/cli.d.mts +1 -2
- package/dist/cli.mjs +60 -17
- package/dist/h3.d.mts +3 -2
- package/dist/h3.mjs +15 -6
- package/dist/index.d.mts +2 -2
- package/dist/mcp.d.mts +5 -3
- package/dist/mcp.mjs +11 -6
- package/dist/omp.d.mts +1 -2
- package/dist/omp.mjs +0 -2
- package/dist/pi.d.mts +1 -2
- package/dist/pi.mjs +1 -3
- package/dist/toolkit.d.mts +78 -0
- package/dist/toolkit.mjs +62 -0
- package/package.json +13 -3
- package/dist/_chunks/index.d.mts.map +0 -1
- package/dist/_chunks/libs/typebox.d.mts.map +0 -1
- package/dist/_chunks/libs/typebox.mjs.map +0 -1
- package/dist/_chunks/mcp-answers.d.mts.map +0 -1
- package/dist/_chunks/mcp-answers.mjs.map +0 -1
- package/dist/_chunks/src.mjs.map +0 -1
- package/dist/_chunks/updates.mjs.map +0 -1
- package/dist/ai.d.mts.map +0 -1
- package/dist/ai.mjs.map +0 -1
- package/dist/cli.d.mts.map +0 -1
- package/dist/cli.mjs.map +0 -1
- package/dist/h3.d.mts.map +0 -1
- package/dist/h3.mjs.map +0 -1
- package/dist/mcp.d.mts.map +0 -1
- package/dist/mcp.mjs.map +0 -1
- package/dist/omp.d.mts.map +0 -1
- package/dist/omp.mjs.map +0 -1
- package/dist/pi.d.mts.map +0 -1
- package/dist/pi.mjs.map +0 -1
package/dist/_chunks/updates.mjs
CHANGED
|
@@ -1,5 +1,136 @@
|
|
|
1
|
+
import { Check, Errors } from "./libs/typebox.mjs";
|
|
2
|
+
import { problemText, sanitizeLine } from "./src.mjs";
|
|
3
|
+
import { hostAsk } from "./questions.mjs";
|
|
4
|
+
const SKIP = Symbol("skip");
|
|
5
|
+
const CLOSED = Symbol("closed");
|
|
6
|
+
const SKIP_LABEL = "(skip)";
|
|
7
|
+
const DONE_LABEL = "Done";
|
|
8
|
+
function dialogAsk(host, signal) {
|
|
9
|
+
const ui = dialogsOf(host);
|
|
10
|
+
return ui ? hostAsk(async (question) => await fillForm(ui, question, signal)) : void 0;
|
|
11
|
+
}
|
|
12
|
+
function dialogsOf(host) {
|
|
13
|
+
if (typeof host !== "object" || host === null) return void 0;
|
|
14
|
+
const { hasUI, ui } = host;
|
|
15
|
+
if (hasUI !== true || typeof ui !== "object" || ui === null) return void 0;
|
|
16
|
+
const { select, input, notify } = ui;
|
|
17
|
+
return [
|
|
18
|
+
select,
|
|
19
|
+
input,
|
|
20
|
+
notify
|
|
21
|
+
].every((dialog) => typeof dialog === "function") ? ui : void 0;
|
|
22
|
+
}
|
|
23
|
+
async function fillForm(ui, question, signal) {
|
|
24
|
+
const keys = Object.keys(question.requested.properties);
|
|
25
|
+
const required = new Set(question.requested.required);
|
|
26
|
+
const content = Object.create(null);
|
|
27
|
+
for (const key of keys) {
|
|
28
|
+
const field = question.requested.properties[key] ?? {};
|
|
29
|
+
const value = await askField({
|
|
30
|
+
ui,
|
|
31
|
+
title: sanitizeLine(keys.length === 1 ? question.message : `${question.message}: ${labelOf(key, field)}`),
|
|
32
|
+
field,
|
|
33
|
+
optional: !required.has(key),
|
|
34
|
+
signal
|
|
35
|
+
}, question.schema.properties[key], labelOf(key, field));
|
|
36
|
+
if (value === CLOSED) return { action: "cancel" };
|
|
37
|
+
if (value !== SKIP) content[key] = value;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
action: "accept",
|
|
41
|
+
content
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
async function askField(prompt, schema, label) {
|
|
45
|
+
for (;;) {
|
|
46
|
+
const value = await promptOnce(prompt);
|
|
47
|
+
prompt.signal?.throwIfAborted();
|
|
48
|
+
if (value === CLOSED || value === SKIP || !schema || Check(schema, value)) return value;
|
|
49
|
+
const [failure] = Errors(schema, value);
|
|
50
|
+
const problem = failure ? problemText(failure.message, failure.params) : "not a value this field takes";
|
|
51
|
+
prompt.ui.notify(sanitizeLine(`${label}: ${problem}`), "warning");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
async function promptOnce(prompt) {
|
|
55
|
+
const { field } = prompt;
|
|
56
|
+
if (field.type === "boolean") return await pick(prompt, [true, false], ["Yes", "No"]);
|
|
57
|
+
if (field.type === "array") return await toggle(prompt);
|
|
58
|
+
const [values, labels] = choicesOf(field);
|
|
59
|
+
return values.length > 0 ? await pick(prompt, values, labels) : await typeIn(prompt);
|
|
60
|
+
}
|
|
61
|
+
function choicesOf(field) {
|
|
62
|
+
if (Array.isArray(field.enum)) return [field.enum, field.enum.map(String)];
|
|
63
|
+
if (!Array.isArray(field.oneOf)) return [[], []];
|
|
64
|
+
const branches = field.oneOf.filter((branch) => typeof branch === "object" && branch !== null && "const" in branch);
|
|
65
|
+
return [branches.map((branch) => branch.const), branches.map((branch) => String(typeof branch.title === "string" ? branch.title : branch.const))];
|
|
66
|
+
}
|
|
67
|
+
async function pick(prompt, values, labels) {
|
|
68
|
+
const lines = labels.map(sanitizeLine);
|
|
69
|
+
const options = distinct(prompt.optional ? [...lines, SKIP_LABEL] : lines);
|
|
70
|
+
const chosen = await prompt.ui.select(prompt.title, options, signalOption(prompt));
|
|
71
|
+
if (chosen === void 0) return CLOSED;
|
|
72
|
+
const index = options.indexOf(chosen);
|
|
73
|
+
if (index >= 0 && index < values.length) return values[index];
|
|
74
|
+
return prompt.optional && index === values.length ? SKIP : chosen;
|
|
75
|
+
}
|
|
76
|
+
async function toggle(prompt) {
|
|
77
|
+
const values = prompt.field.items.enum.map(String);
|
|
78
|
+
const picked = new Set(Array.isArray(prompt.field.default) ? prompt.field.default : []);
|
|
79
|
+
const ends = prompt.optional ? [DONE_LABEL, SKIP_LABEL] : [DONE_LABEL];
|
|
80
|
+
const ticked = () => values.filter((value) => picked.has(value));
|
|
81
|
+
for (;;) {
|
|
82
|
+
const lines = toggleLines(values, (value) => picked.has(value));
|
|
83
|
+
const chosen = await prompt.ui.select(prompt.title, [...lines, ...ends], signalOption(prompt));
|
|
84
|
+
const ending = endOfToggle(chosen, prompt.optional, ticked);
|
|
85
|
+
if (ending !== void 0) return ending;
|
|
86
|
+
const value = values[lines.indexOf(chosen ?? "")];
|
|
87
|
+
if (value !== void 0 && !picked.delete(value)) picked.add(value);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function endOfToggle(chosen, optional, ticked) {
|
|
91
|
+
if (chosen === void 0) return CLOSED;
|
|
92
|
+
if (chosen === DONE_LABEL) return ticked();
|
|
93
|
+
return optional && chosen === SKIP_LABEL ? SKIP : void 0;
|
|
94
|
+
}
|
|
95
|
+
function toggleLines(values, isPicked) {
|
|
96
|
+
return distinct(values.map((value) => `${isPicked(value) ? "[x]" : "[ ]"} ${sanitizeLine(value)}`));
|
|
97
|
+
}
|
|
98
|
+
async function typeIn(prompt) {
|
|
99
|
+
const { field } = prompt;
|
|
100
|
+
const text = await prompt.ui.input(prompt.title, hintOf(field), signalOption(prompt));
|
|
101
|
+
if (text === void 0) return CLOSED;
|
|
102
|
+
if (text === "" && field.default !== void 0) return field.default;
|
|
103
|
+
if (text === "" && prompt.optional) return SKIP;
|
|
104
|
+
return field.type === "number" || field.type === "integer" ? decimal(text) : text;
|
|
105
|
+
}
|
|
106
|
+
function hintOf(field) {
|
|
107
|
+
const hint = typeof field.description === "string" ? field.description : field.default;
|
|
108
|
+
return hint === void 0 ? void 0 : sanitizeLine(hint);
|
|
109
|
+
}
|
|
110
|
+
function distinct(lines) {
|
|
111
|
+
const seen = /* @__PURE__ */ new Set();
|
|
112
|
+
return lines.map((line) => {
|
|
113
|
+
let label = line;
|
|
114
|
+
for (let count = 2; seen.has(label); count++) label = `${line} (${count})`;
|
|
115
|
+
seen.add(label);
|
|
116
|
+
return label;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
const DECIMAL = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i;
|
|
120
|
+
function decimal(text) {
|
|
121
|
+
const trimmed = text.trim();
|
|
122
|
+
return DECIMAL.test(trimmed) ? Number(trimmed) : text;
|
|
123
|
+
}
|
|
124
|
+
function labelOf(key, field) {
|
|
125
|
+
return typeof field.title === "string" ? field.title : key;
|
|
126
|
+
}
|
|
127
|
+
function signalOption(prompt) {
|
|
128
|
+
return prompt.signal ? { signal: prompt.signal } : {};
|
|
129
|
+
}
|
|
1
130
|
function hostContext(signal, onUpdate, host) {
|
|
131
|
+
const ask = dialogAsk(host, signal);
|
|
2
132
|
return {
|
|
133
|
+
...ask ? { ask } : {},
|
|
3
134
|
...signal ? { signal } : {},
|
|
4
135
|
...host === void 0 ? {} : { host },
|
|
5
136
|
...onUpdate ? { progress: (text) => onUpdate({
|
|
@@ -12,5 +143,3 @@ function hostContext(signal, onUpdate, host) {
|
|
|
12
143
|
};
|
|
13
144
|
}
|
|
14
145
|
export { hostContext };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=updates.mjs.map
|
package/dist/ai.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { ToolDefinition } from "./_chunks/index.mjs";
|
|
|
3
3
|
import { Tool } from "ai";
|
|
4
4
|
/**
|
|
5
5
|
* What an AI SDK tool returns: the executor's details with the text MCP
|
|
6
|
-
* clients read.
|
|
6
|
+
* clients read. Your code gets the whole object, the model reads only `text`.
|
|
7
7
|
*/
|
|
8
8
|
export type AiToolOutput<Details> = (Details extends object ? Details : {
|
|
9
9
|
details: Details;
|
|
@@ -14,7 +14,8 @@ export type AiToolOutput<Details> = (Details extends object ? Details : {
|
|
|
14
14
|
* Converts one tool, keeping its input and details types.
|
|
15
15
|
*
|
|
16
16
|
* A result with `isError` throws its text, which the AI SDK reports to the
|
|
17
|
-
* model as a tool error, the same as an executor that throws.
|
|
17
|
+
* model as a tool error, the same as an executor that throws. The model reads
|
|
18
|
+
* `text` alone, as on every other host, not the details spelled out a second time.
|
|
18
19
|
*
|
|
19
20
|
* @param definition - Tool to convert.
|
|
20
21
|
* @returns {Tool} AI SDK tool.
|
|
@@ -27,5 +28,4 @@ export declare function toAiTool<Input extends TObject, Details>(definition: Too
|
|
|
27
28
|
* @returns {Record<string, Tool>} AI SDK tools.
|
|
28
29
|
* @throws {ToolDefinitionError} When two tools share a name.
|
|
29
30
|
*/
|
|
30
|
-
export declare function toAiTools(tools: readonly ToolDefinition[]): Record<string, Tool>;
|
|
31
|
-
//# sourceMappingURL=ai.d.mts.map
|
|
31
|
+
export declare function toAiTools(tools: readonly ToolDefinition[]): Record<string, Tool>;
|
package/dist/ai.mjs
CHANGED
|
@@ -28,13 +28,22 @@ function toAiTool(definition) {
|
|
|
28
28
|
...details,
|
|
29
29
|
text
|
|
30
30
|
};
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
|
+
toModelOutput: ({ output }) => modelOutput(output)
|
|
32
33
|
});
|
|
33
34
|
}
|
|
35
|
+
function modelOutput(output) {
|
|
36
|
+
const text = typeof output === "object" && output !== null ? output.text : void 0;
|
|
37
|
+
return typeof text === "string" && text !== "" ? {
|
|
38
|
+
type: "text",
|
|
39
|
+
value: text
|
|
40
|
+
} : {
|
|
41
|
+
type: "json",
|
|
42
|
+
value: output
|
|
43
|
+
};
|
|
44
|
+
}
|
|
34
45
|
function toAiTools(tools) {
|
|
35
46
|
indexTools(tools);
|
|
36
47
|
return Object.fromEntries(tools.map((definition) => [definition.name, toAiTool(definition)]));
|
|
37
48
|
}
|
|
38
49
|
export { toAiTool, toAiTools };
|
|
39
|
-
|
|
40
|
-
//# sourceMappingURL=ai.mjs.map
|
package/dist/cli.d.mts
CHANGED
|
@@ -71,5 +71,4 @@ export declare function normalizeArgv(options: CliOptions, argv: readonly string
|
|
|
71
71
|
* @param options - CLI options.
|
|
72
72
|
* @param argv - Words after the executable and script.
|
|
73
73
|
*/
|
|
74
|
-
export declare function runCli(options: CliOptions, argv?: readonly string[]): Promise<void>;
|
|
75
|
-
//# sourceMappingURL=cli.d.mts.map
|
|
74
|
+
export declare function runCli(options: CliOptions, argv?: readonly string[]): Promise<void>;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Check } from "./_chunks/libs/typebox.mjs";
|
|
2
|
-
import { ToolDefinitionError, ToolInputError, indexTools, invokeTool, resultText, sanitizeLine, sanitizeText } from "./_chunks/src.mjs";
|
|
2
|
+
import { ToolDefinitionError, ToolInputError, indexTools, invokeTool, resultText, sanitizeLine, sanitizeText, validateInput } from "./_chunks/src.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
const FLAG_WORD = /^[a-z0-9][a-z0-9.-]*$/;
|
|
@@ -51,24 +51,32 @@ function cliHints(tool) {
|
|
|
51
51
|
const rest = cli.rest === void 0 ? [] : [cli.rest];
|
|
52
52
|
const hints = {
|
|
53
53
|
positional: [...cli.positional ?? [], ...rest],
|
|
54
|
+
plain: cli.plain ?? [],
|
|
54
55
|
rest,
|
|
55
56
|
short: cli.short ?? {},
|
|
56
57
|
stdin: cli.stdin ?? []
|
|
57
58
|
};
|
|
58
59
|
const properties = tool.input.properties;
|
|
59
|
-
|
|
60
|
+
const named = [
|
|
60
61
|
...hints.positional,
|
|
62
|
+
...hints.plain,
|
|
61
63
|
...Object.keys(hints.short),
|
|
62
64
|
...hints.stdin
|
|
63
|
-
]
|
|
65
|
+
];
|
|
66
|
+
for (const key of named) if (!Object.hasOwn(properties, key)) throw new ToolDefinitionError(`${tool.name}: cli hint names unknown property ${key}`);
|
|
67
|
+
assertPositionals(tool, hints);
|
|
68
|
+
return hints;
|
|
69
|
+
}
|
|
70
|
+
function assertPositionals(tool, hints) {
|
|
64
71
|
const { positional } = hints;
|
|
65
72
|
const repeated = positional.find((key, index) => positional.indexOf(key) !== index);
|
|
66
73
|
if (repeated !== void 0) throw new ToolDefinitionError(`${tool.name}: cli hint lists positional ${repeated} twice`);
|
|
67
|
-
|
|
74
|
+
const flag = hints.plain.find((key) => !positional.includes(key));
|
|
75
|
+
if (flag !== void 0) throw new ToolDefinitionError(`${tool.name}: plain property ${flag} must be positional`);
|
|
68
76
|
}
|
|
69
77
|
function toolFields(tool) {
|
|
70
78
|
const properties = tool.input.properties;
|
|
71
|
-
const { positional, rest, short, stdin } = cliHints(tool);
|
|
79
|
+
const { positional, plain, rest, short, stdin } = cliHints(tool);
|
|
72
80
|
const keys = [...positional, ...Object.keys(properties).filter((key) => !positional.includes(key))];
|
|
73
81
|
const required = tool.input.required ?? [];
|
|
74
82
|
const flags = /* @__PURE__ */ new Set();
|
|
@@ -80,6 +88,7 @@ function toolFields(tool) {
|
|
|
80
88
|
flag: flagName(key),
|
|
81
89
|
kind: fieldKind(properties[key] ?? {}),
|
|
82
90
|
positional: positional.includes(key),
|
|
91
|
+
plain: plain.includes(key),
|
|
83
92
|
rest: rest.includes(key),
|
|
84
93
|
restItems: rest.includes(key) ? textItems(properties[key] ?? {}) : void 0,
|
|
85
94
|
short: Object.hasOwn(short, key) ? short[key] : void 0,
|
|
@@ -170,8 +179,10 @@ function parseWords(rawArgs, fields, takesJson) {
|
|
|
170
179
|
allowNegative: true,
|
|
171
180
|
tokens: true
|
|
172
181
|
});
|
|
182
|
+
const ordered = inLineOrder(tokens, origins, texts);
|
|
183
|
+
const positionals = ordered.map(([, word]) => word);
|
|
173
184
|
const values = emptyRecord();
|
|
174
|
-
const errors = refused.map((word) => unknownOption(options, word));
|
|
185
|
+
const errors = [...landedInPlain(fields, ordered, texts), ...refused].map((word) => unknownOption(options, word));
|
|
175
186
|
const flags = /* @__PURE__ */ new Set();
|
|
176
187
|
for (const token of tokens) {
|
|
177
188
|
if (token.kind !== "option") continue;
|
|
@@ -180,7 +191,6 @@ function parseWords(rawArgs, fields, takesJson) {
|
|
|
180
191
|
else if ("flag" in read) flags.add(read.flag);
|
|
181
192
|
else values[read.key] = read.value;
|
|
182
193
|
}
|
|
183
|
-
const positionals = inLineOrder(tokens, origins, texts);
|
|
184
194
|
return {
|
|
185
195
|
values: Object.assign(values, positionalValues(fields, positionals)),
|
|
186
196
|
json: flags.has("json"),
|
|
@@ -231,7 +241,15 @@ function wordKind(word, options) {
|
|
|
231
241
|
}
|
|
232
242
|
function inLineOrder(tokens, origins, texts) {
|
|
233
243
|
const read = tokens.flatMap((token) => token.kind === "positional" ? [[origins[token.index] ?? 0, token.value ?? ""]] : []);
|
|
234
|
-
return [...texts, ...read].toSorted(([a], [b]) => a - b)
|
|
244
|
+
return [...texts, ...read].toSorted(([a], [b]) => a - b);
|
|
245
|
+
}
|
|
246
|
+
function landedInPlain(fields, ordered, texts) {
|
|
247
|
+
const takes = fields.filter((field) => field.positional);
|
|
248
|
+
const dashed = new Set(texts.map(([index]) => index));
|
|
249
|
+
return ordered.flatMap(([index, word], slot) => {
|
|
250
|
+
const field = takes[Math.min(slot, takes.length - 1)];
|
|
251
|
+
return dashed.has(index) && field?.plain === true ? [word] : [];
|
|
252
|
+
});
|
|
235
253
|
}
|
|
236
254
|
function longField(spelled, options) {
|
|
237
255
|
const [name = ""] = spelled.split("=", 1);
|
|
@@ -370,18 +388,46 @@ function fieldValue(field, raw) {
|
|
|
370
388
|
function toolInput(fields, values) {
|
|
371
389
|
const input = emptyRecord();
|
|
372
390
|
const fromStdin = fields.filter((field) => field.stdin && values[field.key] === "-");
|
|
373
|
-
if (fromStdin.length > 1) throw new ToolInputError([`Invalid arguments: stdin can feed one argument, not ${fromStdin.map(
|
|
391
|
+
if (fromStdin.length > 1) throw new ToolInputError([`Invalid arguments: stdin can feed one argument, not ${fromStdin.map(fieldWord).join(" and ")}`]);
|
|
374
392
|
const errors = [];
|
|
375
393
|
for (const field of fields) {
|
|
376
394
|
const raw = values[field.key];
|
|
377
395
|
if (raw === void 0) continue;
|
|
378
396
|
const read = typeof raw === "object" ? { value: raw.map((word) => wordValue(field.restItems ?? {}, word)) } : fieldValue(field, raw);
|
|
379
|
-
if ("error" in read) errors.push(`Invalid arguments at
|
|
397
|
+
if ("error" in read) errors.push(`Invalid arguments at ${fieldWord(field)}: ${read.error}`);
|
|
380
398
|
else input[field.key] = read.value;
|
|
381
399
|
}
|
|
382
400
|
if (errors.length > 0) throw new ToolInputError(errors);
|
|
383
401
|
return input;
|
|
384
402
|
}
|
|
403
|
+
function fieldWord(field) {
|
|
404
|
+
if (!field.positional) return `--${field.flag}`;
|
|
405
|
+
const name = `${field.flag.toUpperCase()}${field.rest ? "..." : ""}`;
|
|
406
|
+
return field.required ? `<${name}>` : `[${name}]`;
|
|
407
|
+
}
|
|
408
|
+
function placeIn(field, inner) {
|
|
409
|
+
if (inner.length === 0) return fieldWord(field);
|
|
410
|
+
const [index = ""] = inner;
|
|
411
|
+
if (field.restItems !== void 0 && inner.length === 1 && /^\d+$/.test(index)) return `word ${Number(index) + 1} of ${fieldWord(field)}`;
|
|
412
|
+
return `/${inner.join("/")} of ${fieldWord(field)}`;
|
|
413
|
+
}
|
|
414
|
+
function cliIssueLines(fields, issue) {
|
|
415
|
+
const byKey = (key) => fields.find((field) => field.key === key);
|
|
416
|
+
if (issue.at === "" && issue.missing !== void 0) return issue.missing.map((key) => {
|
|
417
|
+
const field = byKey(key);
|
|
418
|
+
return `Invalid arguments: missing ${field ? fieldWord(field) : JSON.stringify(key)}`;
|
|
419
|
+
});
|
|
420
|
+
const [, first, ...inner] = issue.at.split("/");
|
|
421
|
+
const field = first === void 0 ? void 0 : byKey(first.replaceAll("~1", "/").replaceAll("~0", "~"));
|
|
422
|
+
if (field === void 0) return [issue.line];
|
|
423
|
+
return [`Invalid arguments at ${placeIn(field, inner)}: ${issue.problem}`];
|
|
424
|
+
}
|
|
425
|
+
function checkInput(tool, fields, input) {
|
|
426
|
+
const checked = validateInput(tool, input);
|
|
427
|
+
if (checked.ok) return;
|
|
428
|
+
const lines = checked.issues.flatMap((issue) => cliIssueLines(fields, issue));
|
|
429
|
+
throw new ToolInputError(lines.length > 0 ? [...new Set(lines)] : checked.lines, checked.issues);
|
|
430
|
+
}
|
|
385
431
|
function writeLine(stream, text) {
|
|
386
432
|
process[stream].write(text.endsWith("\n") ? text : `${text}\n`);
|
|
387
433
|
}
|
|
@@ -468,7 +514,9 @@ function toolCommand(tool) {
|
|
|
468
514
|
const line = progressLine();
|
|
469
515
|
let result;
|
|
470
516
|
try {
|
|
471
|
-
|
|
517
|
+
const input = toolInput(fields, words.values);
|
|
518
|
+
checkInput(tool, fields, input);
|
|
519
|
+
result = await invokeTool(tool, input, {
|
|
472
520
|
...line.context,
|
|
473
521
|
host
|
|
474
522
|
});
|
|
@@ -577,10 +625,7 @@ function commandUsage(options, command) {
|
|
|
577
625
|
const positional = command.fields.filter((field) => field.positional);
|
|
578
626
|
const flags = command.fields.filter((field) => !field.positional);
|
|
579
627
|
const takesOptions = flags.length > 0 || command.json;
|
|
580
|
-
const words = positional.map(
|
|
581
|
-
const name = `${field.flag.toUpperCase()}${field.rest ? "..." : ""}`;
|
|
582
|
-
return field.required ? `<${name}>` : `[${name}]`;
|
|
583
|
-
});
|
|
628
|
+
const words = positional.map(fieldWord);
|
|
584
629
|
const rows = [
|
|
585
630
|
...flags.map((field) => [`${field.short === void 0 ? "" : `-${field.short}, `}${optionSpelling(field)}`, fieldDescription(field)]),
|
|
586
631
|
...command.json ? [["--json", "Print the details as JSON instead of the text"]] : [],
|
|
@@ -617,5 +662,3 @@ async function runCli(options, argv = process.argv.slice(2)) {
|
|
|
617
662
|
await createCli(options).run(argv);
|
|
618
663
|
}
|
|
619
664
|
export { commandName, createCli, normalizeArgv, runCli };
|
|
620
|
-
|
|
621
|
-
//# sourceMappingURL=cli.mjs.map
|
package/dist/h3.d.mts
CHANGED
|
@@ -12,6 +12,8 @@ export type H3Tool = ToolDefinition<JsonSchema>;
|
|
|
12
12
|
* instead. An unknown name never reaches a handler: h3-mcp answers it itself
|
|
13
13
|
* with a JSON-RPC error.
|
|
14
14
|
*
|
|
15
|
+
* `ask` reaches a client with `elicitation` on the 2026 revision only: h3-mcp has no 2025 shim.
|
|
16
|
+
*
|
|
15
17
|
* Imports only types from h3-mcp, so the adapter loads neither h3-mcp nor the MCP SDK.
|
|
16
18
|
*
|
|
17
19
|
* @param info - Server info; `name` is the word in the message for an unknown tool.
|
|
@@ -21,5 +23,4 @@ export type H3Tool = ToolDefinition<JsonSchema>;
|
|
|
21
23
|
*/
|
|
22
24
|
export declare function toH3Tools(info: {
|
|
23
25
|
readonly name: string;
|
|
24
|
-
}, tools: readonly ToolDefinition$1[]): H3Tool[];
|
|
25
|
-
//# sourceMappingURL=h3.d.mts.map
|
|
26
|
+
}, tools: readonly ToolDefinition$1[]): H3Tool[];
|
package/dist/h3.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./_chunks/src.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { callAsking, canAsk, listTools, progressSteps, questionRound } from "./_chunks/mcp-answers.mjs";
|
|
3
3
|
function toH3Tools(info, tools) {
|
|
4
4
|
return listTools(tools).map((entry) => ({
|
|
5
5
|
name: entry.name,
|
|
@@ -7,17 +7,26 @@ function toH3Tools(info, tools) {
|
|
|
7
7
|
description: entry.description,
|
|
8
8
|
...entry.icons === void 0 ? {} : { icons: entry.icons },
|
|
9
9
|
inputSchema: entry.inputSchema,
|
|
10
|
+
...entry.outputSchema === void 0 ? {} : { outputSchema: entry.outputSchema },
|
|
10
11
|
annotations: entry.annotations,
|
|
11
|
-
|
|
12
|
+
...entry._meta === void 0 ? {} : { _meta: entry._meta },
|
|
13
|
+
handler: async (args, event) => {
|
|
12
14
|
const mcp = event.context.mcp;
|
|
15
|
+
const round = roundOf(mcp);
|
|
16
|
+
const progress = mcp?.progressToken === void 0 ? void 0 : mcp.progress;
|
|
13
17
|
const context = {
|
|
14
18
|
signal: mcp?.signal,
|
|
15
|
-
...
|
|
19
|
+
...progress === void 0 ? {} : { progress: numbered(progress) }
|
|
16
20
|
};
|
|
17
|
-
return
|
|
21
|
+
return await callAsking(info, tools, entry.name, args, context, round);
|
|
18
22
|
}
|
|
19
23
|
}));
|
|
20
24
|
}
|
|
25
|
+
function roundOf(mcp) {
|
|
26
|
+
if (mcp?.era !== "modern" || !canAsk(mcp.clientCapabilities)) return void 0;
|
|
27
|
+
return questionRound(mcp.inputResponses, mcp.requestState);
|
|
28
|
+
}
|
|
29
|
+
function numbered(send) {
|
|
30
|
+
return progressSteps(({ progress, total, message }) => send(progress, total, message));
|
|
31
|
+
}
|
|
21
32
|
export { toH3Tools };
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=h3.mjs.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AddImmutable, AddImmutableDeferred, AddOptional, AddOptionalDeferred, AddReadonly, AddReadonlyDeferred, Any, ArrayOptions, BigInt, BigIntPattern, Boolean, Broaden, Call, CallConstruct, CanComposite, Capitalize, CapitalizeAction, CapitalizeDeferred, CapitalizeInstantiate, Codec, CollapseToObject, Compare, CompareResultDisjoint, CompareResultEqual, CompareResultLeftInside, CompareResultRightInside, Composite, Conditional, ConditionalAction, ConditionalDeferred, ConditionalInstantiate, Constructor, ConstructorOptions, ConstructorParameters, ConstructorParametersAction, ConstructorParametersDeferred, ConstructorParametersInstantiate, ConvertToIntegerKey, Cyclic, CyclicCandidates, CyclicCheck, CyclicDependencies, CyclicExtends, CyclicOptions, CyclicTarget, Decode, DecodeBuilder, Deferred, Dependent, DependentOptions, Distribute, Encode, EncodeBuilder, Enum, Evaluate, EvaluateAction, EvaluateDeferred, EvaluateDependent, EvaluateEnum, EvaluateInstantiate, EvaluateIntersect, EvaluateTemplateLiteral, EvaluateType, EvaluateUnion, EvaluateUnionFast, Exclude, ExcludeAction, ExcludeDeferred, ExcludeInstantiate, Extends, Extract, ExtractAction, ExtractDeferred, ExtractInstantiate, Flatten, FunctionOptions, Generic, Identifier, Immutable, Index, IndexAction, IndexDeferred, IndexInstantiate, Infer, InstanceType, InstanceTypeAction, InstanceTypeDeferred, InstanceTypeInstantiate, Instantiate, InstantiateCyclic, Integer, IntegerKey, IntegerPattern, Interface, InterfaceAction, InterfaceDeferred, InterfaceInstantiate, Intersect, IntersectOptions, InvalidLiteralValue, IsAny, IsArray, IsBigInt, IsBoolean, IsCall, IsCodec, IsConstructor, IsCyclic, IsDeferred, IsDependent, IsEnum, IsEnumValue, IsFunction, IsGeneric, IsIdentifier, IsImmutable, IsInfer, IsInteger, IsInterfaceDeferred, IsIntersect, IsKind, IsLiteral, IsLiteralBigInt, IsLiteralBoolean, IsLiteralNumber, IsLiteralString, IsLiteralValue, IsNever, IsNull, IsNumber, IsObject, IsOptional, IsParameter, IsReadonly, IsRecord, IsRef, IsRefine, IsRefinement, IsRest, IsSchema, IsString, IsSymbol, IsTemplateLiteral, IsTemplateLiteralDeferred, IsTemplateLiteralFinite, IsTemplateLiteralPattern, IsThis, IsTuple, IsTypeScriptEnumLike, IsUndefined, IsUnion, IsUnknown, IsUnsafe, IsVoid, KeyOf, KeyOfAction, KeyOfDeferred, KeyOfInstantiate, KeysToIndexer, Literal, LiteralTypeName, Lowercase, LowercaseAction, LowercaseDeferred, LowercaseInstantiate, Mapped, MappedAction, MappedDeferred, MappedInstantiate, Module, ModuleDeferred, ModuleInstantiate, Narrow, Never, NeverPattern, NonNullable, NonNullableAction, NonNullableDeferred, NonNullableInstantiate, Null, Number, NumberKey, NumberPattern, ObjectOptions, Omit, OmitAction, OmitDeferred, OmitInstantiate, Optional, Parameter, Parameters, ParametersAction, ParametersDeferred, ParametersInstantiate, ParsePatternIntoTypes, ParseTemplateIntoTypes, Partial, PartialAction, PartialDeferred, PartialInstantiate, Pick, PickAction, PickDeferred, PickInstantiate, Priority, PropertyKeys, PropertyValues, Readonly, ReadonlyObject, ReadonlyObjectAction, ReadonlyObjectDeferred, ReadonlyObjectInstantiate, ReadonlyType, Record, RecordAction, RecordDeferred, RecordFromPattern, RecordInstantiate, RecordKey, RecordOptions, RecordPattern, RecordPatternToType, RecordValue, Ref, RefInstantiate, Refine, RefineAdd, RemoveImmutable, RemoveImmutableDeferred, RemoveOptional, RemoveOptionalDeferred, RemoveReadonly, RemoveReadonlyDeferred, Required, RequiredAction, RequiredArray, RequiredDeferred, RequiredInstantiate, Rest, ReturnType, ReturnTypeAction, ReturnTypeDeferred, ReturnTypeInstantiate, Script, Static, StaticAny, StaticArray, StaticBigInt, StaticBoolean, StaticCodec, StaticConstructor, StaticCyclic, StaticDecode, StaticDependent, StaticDirection, StaticEncode, StaticEnum, StaticEvaluate, StaticFunction, StaticInstantiatedParameters, StaticInteger, StaticIntersect, StaticLiteral, StaticNever, StaticNull, StaticNumber, StaticObject, StaticParse, StaticProperties, StaticRecord, StaticRef, StaticString, StaticSymbol, StaticTemplateLiteral, StaticThis, StaticTuple, StaticType, StaticUndefined, StaticUnion, StaticUnknown, StaticUnsafe, StaticVoid, String, StringKey, StringPattern, Symbol, TAddImmutable, TAddImmutableDeferred, TAddOptional, TAddOptionalDeferred, TAddReadonly, TAddReadonlyDeferred, TAny, TArray, TArrayOptions, TBigInt, TBoolean, TBroaden, TCall, TCallConstruct, TCanComposite, TCapitalize, TCapitalizeAction, TCapitalizeDeferred, TCapitalizeInstantiate, TCodec, TCollapseToObject, TCompare, TCompareResult, TComposite, TConditional, TConditionalAction, TConditionalDeferred, TConditionalInstantiate, TConstructor, TConstructorParameters, TConstructorParametersAction, TConstructorParametersDeferred, TConstructorParametersInstantiate, TConvertToIntegerKey, TCyclic, TCyclicCandidates, TCyclicCheck, TCyclicDependencies, TCyclicExtends, TCyclicTarget, TDecodeCallback, TDeferred, TDependent, TDistribute, TEncodeCallback, TEnum, TEnumValue, TEvaluate, TEvaluateAction, TEvaluateDeferred, TEvaluateDependent, TEvaluateEnum, TEvaluateInstantiate, TEvaluateIntersect, TEvaluateTemplateLiteral, TEvaluateType, TEvaluateUnion, TEvaluateUnionFast, TExclude, TExcludeAction, TExcludeDeferred, TExcludeInstantiate, TExtends, TExtract, TExtractAction, TExtractDeferred, TExtractInstantiate, TFlatten, TFormat, TFunction, TGeneric, TIdentifier, TImmutable, TIndex, TIndexAction, TIndexDeferred, TIndexInstantiate, TInfer, TInstanceType, TInstanceTypeAction, TInstanceTypeDeferred, TInstanceTypeInstantiate, TInstantiate, TInstantiateCyclic, TInteger, TIntegerKey, TInterface, TInterfaceAction, TInterfaceDeferred, TInterfaceInstantiate, TIntersect, TIntersectOptions, TIsTemplateLiteralFinite, TIsTemplateLiteralPattern, TKeyOf, TKeyOfAction, TKeyOfDeferred, TKeyOfInstantiate, TKeysToIndexer, TLiteral, TLiteralTypeName, TLiteralValue, TLowercase, TLowercaseAction, TLowercaseDeferred, TLowercaseInstantiate, TMapped, TMappedAction, TMappedDeferred, TMappedInstantiate, TModule, TModuleDeferred, TModuleInstantiate, TNarrow, TNever, TNonNullable, TNonNullableAction, TNonNullableDeferred, TNonNullableInstantiate, TNull, TNumber, TNumberKey, TNumberOptions, TObject, TObjectOptions, TOmit, TOmitAction, TOmitDeferred, TOmitInstantiate, TOptional, TParameter, TParameters, TParametersAction, TParametersDeferred, TParametersInstantiate, TParsePatternIntoTypes, TParseTemplateIntoTypes, TPartial, TPartialAction, TPartialDeferred, TPartialInstantiate, TPick, TPickAction, TPickDeferred, TPickInstantiate, TPriority, TProperties, TPropertyKeys, TPropertyValues, TReadonly, TReadonlyObject, TReadonlyObjectAction, TReadonlyObjectDeferred, TReadonlyObjectInstantiate, TRecord, TRecordAction, TRecordDeferred, TRecordInstantiate, TRecordKey, TRecordPattern, TRecordPatternToType, TRecordValue, TRef, TRefInstantiate, TRefine, TRefineAdd, TRefineCheckCallback, TRefineErrorCallback, TRefinement, TRemoveImmutable, TRemoveImmutableDeferred, TRemoveOptional, TRemoveOptionalDeferred, TRemoveReadonly, TRemoveReadonlyDeferred, TRequired, TRequiredAction, TRequiredArray, TRequiredDeferred, TRequiredInstantiate, TRest, TReturnType, TReturnTypeAction, TReturnTypeDeferred, TReturnTypeInstantiate, TSchema, TSchemaOptions, TScript, TScriptOptions, TStaticElements, TString, TStringKey, TStringOptions, TSymbol, TTemplateLiteral, TTemplateLiteralDecode, TTemplateLiteralDecodeUnsafe, TTemplateLiteralDeferred, TTemplateLiteralEncode, TTemplateLiteralFromString, TTemplateLiteralFromTypes, TTemplateLiteralStatic, TThis, TTuple, TTupleOptions, TTupleToIntersect, TTupleToUnion, TTypeScriptEnumLike, TTypeScriptEnumToEnumValues, TUncapitalize, TUncapitalizeAction, TUncapitalizeDeferred, TUncapitalizeInstantiate, TUndefined, TUnion, TUnionLast, TUnionToIntersect, TUnionToTuple, TUnknown, TUnsafe, TUppercase, TUppercaseAction, TUppercaseDeferred, TUppercaseInstantiate, TVoid, TWith, TWithAction, TWithDeferred, TWithInstantiate, TemplateLiteral, TemplateLiteralCreate, TemplateLiteralDecode, TemplateLiteralDecodeUnsafe, TemplateLiteralDeferred, TemplateLiteralEncode, TemplateLiteralFromString, TemplateLiteralFromTypes, This, Tuple, TupleOptions, TypeScriptEnumToEnumValues, Uncapitalize, UncapitalizeAction, UncapitalizeDeferred, UncapitalizeInstantiate, Undefined, Union, UnionOptions, Unknown, Unsafe, Uppercase, UppercaseAction, UppercaseDeferred, UppercaseInstantiate, Void, With, WithAction, WithDeferred, WithInstantiate, _Array_, _Function_, _Object_, index_d_exports, result_d_exports } from "./_chunks/libs/typebox.mjs";
|
|
2
|
-
import { Icon, InputCheck, ToolCallContext, ToolCliHints, ToolContent, ToolDefinition, ToolDefinitionError, ToolEffect, ToolInputError, ToolProgress, ToolResult, defineTool, indexTools, invokeTool, resultText, sanitizeLine, sanitizeText, validateInput, wireSchema } from "./_chunks/index.mjs";
|
|
3
|
-
export { type AddImmutable, type AddImmutableDeferred, type AddOptional, type AddOptionalDeferred, type AddReadonly, type AddReadonlyDeferred, type Any, type _Array_ as Array, type _Array_, type ArrayOptions, type BigInt, type BigIntPattern, type Boolean, type Broaden, type Call, type CallConstruct, type CanComposite, type Capitalize, type CapitalizeAction, type CapitalizeDeferred, type CapitalizeInstantiate, type Codec, type CollapseToObject, type Compare, type CompareResultDisjoint, type CompareResultEqual, type CompareResultLeftInside, type CompareResultRightInside, type Composite, type Conditional, type ConditionalAction, type ConditionalDeferred, type ConditionalInstantiate, type Constructor, type ConstructorOptions, type ConstructorParameters, type ConstructorParametersAction, type ConstructorParametersDeferred, type ConstructorParametersInstantiate, type ConvertToIntegerKey, type Cyclic, type CyclicCandidates, type CyclicCheck, type CyclicDependencies, type CyclicExtends, type CyclicOptions, type CyclicTarget, type Decode, type DecodeBuilder, type Deferred, type Dependent, type DependentOptions, type Distribute, type Encode, type EncodeBuilder, type Enum, type Evaluate, type EvaluateAction, type EvaluateDeferred, type EvaluateDependent, type EvaluateEnum, type EvaluateInstantiate, type EvaluateIntersect, type EvaluateTemplateLiteral, type EvaluateType, type EvaluateUnion, type EvaluateUnionFast, type Exclude, type ExcludeAction, type ExcludeDeferred, type ExcludeInstantiate, type Extends, type result_d_exports as ExtendsResult, type Extract, type ExtractAction, type ExtractDeferred, type ExtractInstantiate, type Flatten, type _Function_ as Function, type _Function_, type FunctionOptions, type Generic, Icon, type Identifier, type Immutable, type Index, type IndexAction, type IndexDeferred, type IndexInstantiate, type Infer, InputCheck, type InstanceType, type InstanceTypeAction, type InstanceTypeDeferred, type InstanceTypeInstantiate, type Instantiate, type InstantiateCyclic, type Integer, type IntegerKey, type IntegerPattern, type Interface, type InterfaceAction, type InterfaceDeferred, type InterfaceInstantiate, type Intersect, type IntersectOptions, type InvalidLiteralValue, type IsAny, type IsArray, type IsBigInt, type IsBoolean, type IsCall, type IsCodec, type IsConstructor, type IsCyclic, type IsDeferred, type IsDependent, type IsEnum, type IsEnumValue, type IsFunction, type IsGeneric, type IsIdentifier, type IsImmutable, type IsInfer, type IsInteger, type IsInterfaceDeferred, type IsIntersect, type IsKind, type IsLiteral, type IsLiteralBigInt, type IsLiteralBoolean, type IsLiteralNumber, type IsLiteralString, type IsLiteralValue, type IsNever, type IsNull, type IsNumber, type IsObject, type IsOptional, type IsParameter, type IsReadonly, type IsRecord, type IsRef, type IsRefine, type IsRefinement, type IsRest, type IsSchema, type IsString, type IsSymbol, type IsTemplateLiteral, type IsTemplateLiteralDeferred, type IsTemplateLiteralFinite, type IsTemplateLiteralPattern, type IsThis, type IsTuple, type IsTypeScriptEnumLike, type IsUndefined, type IsUnion, type IsUnknown, type IsUnsafe, type IsVoid, type KeyOf, type KeyOfAction, type KeyOfDeferred, type KeyOfInstantiate, type KeysToIndexer, type Literal, type LiteralTypeName, type Lowercase, type LowercaseAction, type LowercaseDeferred, type LowercaseInstantiate, type Mapped, type MappedAction, type MappedDeferred, type MappedInstantiate, type Module, type ModuleDeferred, type ModuleInstantiate, type Narrow, type Never, type NeverPattern, type NonNullable, type NonNullableAction, type NonNullableDeferred, type NonNullableInstantiate, type Null, type Number, type NumberKey, type NumberPattern, type _Object_ as Object, type _Object_, type ObjectOptions, type Omit, type OmitAction, type OmitDeferred, type OmitInstantiate, type Optional, type Parameter, type Parameters, type ParametersAction, type ParametersDeferred, type ParametersInstantiate, type ParsePatternIntoTypes, type ParseTemplateIntoTypes, type Partial, type PartialAction, type PartialDeferred, type PartialInstantiate, type Pick, type PickAction, type PickDeferred, type PickInstantiate, type Priority, type PropertyKeys, type PropertyValues, type Readonly, type ReadonlyObject, type ReadonlyObjectAction, type ReadonlyObjectDeferred, type ReadonlyObjectInstantiate, type ReadonlyType, type Record, type RecordAction, type RecordDeferred, type RecordFromPattern, type RecordInstantiate, type RecordKey, type RecordOptions, type RecordPattern, type RecordPatternToType, type RecordValue, type Ref, type RefInstantiate, type Refine, type RefineAdd, type RemoveImmutable, type RemoveImmutableDeferred, type RemoveOptional, type RemoveOptionalDeferred, type RemoveReadonly, type RemoveReadonlyDeferred, type Required, type RequiredAction, type RequiredArray, type RequiredDeferred, type RequiredInstantiate, type Rest, type ReturnType, type ReturnTypeAction, type ReturnTypeDeferred, type ReturnTypeInstantiate, type Script, type Static, type StaticAny, type StaticArray, type StaticBigInt, type StaticBoolean, type StaticCodec, type StaticConstructor, type StaticCyclic, type StaticDecode, type StaticDependent, type StaticDirection, type StaticEncode, type StaticEnum, type StaticEvaluate, type StaticFunction, type StaticInstantiatedParameters, type StaticInteger, type StaticIntersect, type StaticLiteral, type StaticNever, type StaticNull, type StaticNumber, type StaticObject, type StaticParse, type StaticProperties, type StaticRecord, type StaticRef, type StaticString, type StaticSymbol, type StaticTemplateLiteral, type StaticThis, type StaticTuple, type StaticType, type StaticUndefined, type StaticUnion, type StaticUnknown, type StaticUnsafe, type StaticVoid, type String, type StringKey, type StringPattern, type Symbol, type TAddImmutable, type TAddImmutableDeferred, type TAddOptional, type TAddOptionalDeferred, type TAddReadonly, type TAddReadonlyDeferred, type TAny, type TArray, type TArrayOptions, type TBigInt, type TBoolean, type TBroaden, type TCall, type TCallConstruct, type TCanComposite, type TCapitalize, type TCapitalizeAction, type TCapitalizeDeferred, type TCapitalizeInstantiate, type TCodec, type TCollapseToObject, type TCompare, type TCompareResult, type TComposite, type TConditional, type TConditionalAction, type TConditionalDeferred, type TConditionalInstantiate, type TConstructor, type TConstructorParameters, type TConstructorParametersAction, type TConstructorParametersDeferred, type TConstructorParametersInstantiate, type TConvertToIntegerKey, type TCyclic, type TCyclicCandidates, type TCyclicCheck, type TCyclicDependencies, type TCyclicExtends, type TCyclicTarget, type TDecodeCallback, type TDeferred, type TDependent, type TDistribute, type TEncodeCallback, type TEnum, type TEnumValue, type TEvaluate, type TEvaluateAction, type TEvaluateDeferred, type TEvaluateDependent, type TEvaluateEnum, type TEvaluateInstantiate, type TEvaluateIntersect, type TEvaluateTemplateLiteral, type TEvaluateType, type TEvaluateUnion, type TEvaluateUnionFast, type TExclude, type TExcludeAction, type TExcludeDeferred, type TExcludeInstantiate, type TExtends, type TExtract, type TExtractAction, type TExtractDeferred, type TExtractInstantiate, type TFlatten, type TFormat, type TFunction, type TGeneric, type TIdentifier, type TImmutable, type TIndex, type TIndexAction, type TIndexDeferred, type TIndexInstantiate, type TInfer, type TInstanceType, type TInstanceTypeAction, type TInstanceTypeDeferred, type TInstanceTypeInstantiate, type TInstantiate, type TInstantiateCyclic, type TInteger, type TIntegerKey, type TInterface, type TInterfaceAction, type TInterfaceDeferred, type TInterfaceInstantiate, type TIntersect, type TIntersectOptions, type TIsTemplateLiteralFinite, type TIsTemplateLiteralPattern, type TKeyOf, type TKeyOfAction, type TKeyOfDeferred, type TKeyOfInstantiate, type TKeysToIndexer, type TLiteral, type TLiteralTypeName, type TLiteralValue, type TLowercase, type TLowercaseAction, type TLowercaseDeferred, type TLowercaseInstantiate, type TMapped, type TMappedAction, type TMappedDeferred, type TMappedInstantiate, type TModule, type TModuleDeferred, type TModuleInstantiate, type TNarrow, type TNever, type TNonNullable, type TNonNullableAction, type TNonNullableDeferred, type TNonNullableInstantiate, type TNull, type TNumber, type TNumberKey, type TNumberOptions, type TObject, type TObjectOptions, type TOmit, type TOmitAction, type TOmitDeferred, type TOmitInstantiate, type TOptional, type TParameter, type TParameters, type TParametersAction, type TParametersDeferred, type TParametersInstantiate, type TParsePatternIntoTypes, type TParseTemplateIntoTypes, type TPartial, type TPartialAction, type TPartialDeferred, type TPartialInstantiate, type TPick, type TPickAction, type TPickDeferred, type TPickInstantiate, type TPriority, type TProperties, type TPropertyKeys, type TPropertyValues, type TReadonly, type TReadonlyObject, type TReadonlyObjectAction, type TReadonlyObjectDeferred, type TReadonlyObjectInstantiate, type TRecord, type TRecordAction, type TRecordDeferred, type TRecordInstantiate, type TRecordKey, type TRecordPattern, type TRecordPatternToType, type TRecordValue, type TRef, type TRefInstantiate, type TRefine, type TRefineAdd, type TRefineCheckCallback, type TRefineErrorCallback, type TRefinement, type TRemoveImmutable, type TRemoveImmutableDeferred, type TRemoveOptional, type TRemoveOptionalDeferred, type TRemoveReadonly, type TRemoveReadonlyDeferred, type TRequired, type TRequiredAction, type TRequiredArray, type TRequiredDeferred, type TRequiredInstantiate, type TRest, type TReturnType, type TReturnTypeAction, type TReturnTypeDeferred, type TReturnTypeInstantiate, type TSchema, type TSchemaOptions, type TScript, type TScriptOptions, type TStaticElements, type TString, type TStringKey, type TStringOptions, type TSymbol, type TTemplateLiteral, type TTemplateLiteralDecode, type TTemplateLiteralDecodeUnsafe, type TTemplateLiteralDeferred, type TTemplateLiteralEncode, type TTemplateLiteralFromString, type TTemplateLiteralFromTypes, type TTemplateLiteralStatic, type TThis, type TTuple, type TTupleOptions, type TTupleToIntersect, type TTupleToUnion, type TTypeScriptEnumLike, type TTypeScriptEnumToEnumValues, type TUncapitalize, type TUncapitalizeAction, type TUncapitalizeDeferred, type TUncapitalizeInstantiate, type TUndefined, type TUnion, type TUnionLast, type TUnionToIntersect, type TUnionToTuple, type TUnknown, type TUnsafe, type TUppercase, type TUppercaseAction, type TUppercaseDeferred, type TUppercaseInstantiate, type TVoid, type TWith, type TWithAction, type TWithDeferred, type TWithInstantiate, type TemplateLiteral, type TemplateLiteralCreate, type TemplateLiteralDecode, type TemplateLiteralDecodeUnsafe, type TemplateLiteralDeferred, type TemplateLiteralEncode, type TemplateLiteralFromString, type TemplateLiteralFromTypes, type This, ToolCallContext, ToolCliHints, ToolContent, ToolDefinition, ToolDefinitionError, ToolEffect, ToolInputError, ToolProgress, ToolResult, type Tuple, type TupleOptions, index_d_exports as Type, type TypeScriptEnumToEnumValues, type Uncapitalize, type UncapitalizeAction, type UncapitalizeDeferred, type UncapitalizeInstantiate, type Undefined, type Union, type UnionOptions, type Unknown, type Unsafe, type Uppercase, type UppercaseAction, type UppercaseDeferred, type UppercaseInstantiate, type Void, type With, type WithAction, type WithDeferred, type WithInstantiate, defineTool, indexTools, invokeTool, resultText, sanitizeLine, sanitizeText, validateInput, wireSchema };
|
|
2
|
+
import { Icon, InputCheck, InputIssue, ToolAnswer, ToolAsk, ToolCallContext, ToolCliHints, ToolContent, ToolDefinition, ToolDefinitionError, ToolEffect, ToolInputError, ToolProgress, ToolQuestion, ToolResult, defineTool, indexTools, invokeTool, resultText, sanitizeLine, sanitizeText, validateInput, wireSchema } from "./_chunks/index.mjs";
|
|
3
|
+
export { type AddImmutable, type AddImmutableDeferred, type AddOptional, type AddOptionalDeferred, type AddReadonly, type AddReadonlyDeferred, type Any, type _Array_ as Array, type _Array_, type ArrayOptions, type BigInt, type BigIntPattern, type Boolean, type Broaden, type Call, type CallConstruct, type CanComposite, type Capitalize, type CapitalizeAction, type CapitalizeDeferred, type CapitalizeInstantiate, type Codec, type CollapseToObject, type Compare, type CompareResultDisjoint, type CompareResultEqual, type CompareResultLeftInside, type CompareResultRightInside, type Composite, type Conditional, type ConditionalAction, type ConditionalDeferred, type ConditionalInstantiate, type Constructor, type ConstructorOptions, type ConstructorParameters, type ConstructorParametersAction, type ConstructorParametersDeferred, type ConstructorParametersInstantiate, type ConvertToIntegerKey, type Cyclic, type CyclicCandidates, type CyclicCheck, type CyclicDependencies, type CyclicExtends, type CyclicOptions, type CyclicTarget, type Decode, type DecodeBuilder, type Deferred, type Dependent, type DependentOptions, type Distribute, type Encode, type EncodeBuilder, type Enum, type Evaluate, type EvaluateAction, type EvaluateDeferred, type EvaluateDependent, type EvaluateEnum, type EvaluateInstantiate, type EvaluateIntersect, type EvaluateTemplateLiteral, type EvaluateType, type EvaluateUnion, type EvaluateUnionFast, type Exclude, type ExcludeAction, type ExcludeDeferred, type ExcludeInstantiate, type Extends, type result_d_exports as ExtendsResult, type Extract, type ExtractAction, type ExtractDeferred, type ExtractInstantiate, type Flatten, type _Function_ as Function, type _Function_, type FunctionOptions, type Generic, Icon, type Identifier, type Immutable, type Index, type IndexAction, type IndexDeferred, type IndexInstantiate, type Infer, InputCheck, InputIssue, type InstanceType, type InstanceTypeAction, type InstanceTypeDeferred, type InstanceTypeInstantiate, type Instantiate, type InstantiateCyclic, type Integer, type IntegerKey, type IntegerPattern, type Interface, type InterfaceAction, type InterfaceDeferred, type InterfaceInstantiate, type Intersect, type IntersectOptions, type InvalidLiteralValue, type IsAny, type IsArray, type IsBigInt, type IsBoolean, type IsCall, type IsCodec, type IsConstructor, type IsCyclic, type IsDeferred, type IsDependent, type IsEnum, type IsEnumValue, type IsFunction, type IsGeneric, type IsIdentifier, type IsImmutable, type IsInfer, type IsInteger, type IsInterfaceDeferred, type IsIntersect, type IsKind, type IsLiteral, type IsLiteralBigInt, type IsLiteralBoolean, type IsLiteralNumber, type IsLiteralString, type IsLiteralValue, type IsNever, type IsNull, type IsNumber, type IsObject, type IsOptional, type IsParameter, type IsReadonly, type IsRecord, type IsRef, type IsRefine, type IsRefinement, type IsRest, type IsSchema, type IsString, type IsSymbol, type IsTemplateLiteral, type IsTemplateLiteralDeferred, type IsTemplateLiteralFinite, type IsTemplateLiteralPattern, type IsThis, type IsTuple, type IsTypeScriptEnumLike, type IsUndefined, type IsUnion, type IsUnknown, type IsUnsafe, type IsVoid, type KeyOf, type KeyOfAction, type KeyOfDeferred, type KeyOfInstantiate, type KeysToIndexer, type Literal, type LiteralTypeName, type Lowercase, type LowercaseAction, type LowercaseDeferred, type LowercaseInstantiate, type Mapped, type MappedAction, type MappedDeferred, type MappedInstantiate, type Module, type ModuleDeferred, type ModuleInstantiate, type Narrow, type Never, type NeverPattern, type NonNullable, type NonNullableAction, type NonNullableDeferred, type NonNullableInstantiate, type Null, type Number, type NumberKey, type NumberPattern, type _Object_ as Object, type _Object_, type ObjectOptions, type Omit, type OmitAction, type OmitDeferred, type OmitInstantiate, type Optional, type Parameter, type Parameters, type ParametersAction, type ParametersDeferred, type ParametersInstantiate, type ParsePatternIntoTypes, type ParseTemplateIntoTypes, type Partial, type PartialAction, type PartialDeferred, type PartialInstantiate, type Pick, type PickAction, type PickDeferred, type PickInstantiate, type Priority, type PropertyKeys, type PropertyValues, type Readonly, type ReadonlyObject, type ReadonlyObjectAction, type ReadonlyObjectDeferred, type ReadonlyObjectInstantiate, type ReadonlyType, type Record, type RecordAction, type RecordDeferred, type RecordFromPattern, type RecordInstantiate, type RecordKey, type RecordOptions, type RecordPattern, type RecordPatternToType, type RecordValue, type Ref, type RefInstantiate, type Refine, type RefineAdd, type RemoveImmutable, type RemoveImmutableDeferred, type RemoveOptional, type RemoveOptionalDeferred, type RemoveReadonly, type RemoveReadonlyDeferred, type Required, type RequiredAction, type RequiredArray, type RequiredDeferred, type RequiredInstantiate, type Rest, type ReturnType, type ReturnTypeAction, type ReturnTypeDeferred, type ReturnTypeInstantiate, type Script, type Static, type StaticAny, type StaticArray, type StaticBigInt, type StaticBoolean, type StaticCodec, type StaticConstructor, type StaticCyclic, type StaticDecode, type StaticDependent, type StaticDirection, type StaticEncode, type StaticEnum, type StaticEvaluate, type StaticFunction, type StaticInstantiatedParameters, type StaticInteger, type StaticIntersect, type StaticLiteral, type StaticNever, type StaticNull, type StaticNumber, type StaticObject, type StaticParse, type StaticProperties, type StaticRecord, type StaticRef, type StaticString, type StaticSymbol, type StaticTemplateLiteral, type StaticThis, type StaticTuple, type StaticType, type StaticUndefined, type StaticUnion, type StaticUnknown, type StaticUnsafe, type StaticVoid, type String, type StringKey, type StringPattern, type Symbol, type TAddImmutable, type TAddImmutableDeferred, type TAddOptional, type TAddOptionalDeferred, type TAddReadonly, type TAddReadonlyDeferred, type TAny, type TArray, type TArrayOptions, type TBigInt, type TBoolean, type TBroaden, type TCall, type TCallConstruct, type TCanComposite, type TCapitalize, type TCapitalizeAction, type TCapitalizeDeferred, type TCapitalizeInstantiate, type TCodec, type TCollapseToObject, type TCompare, type TCompareResult, type TComposite, type TConditional, type TConditionalAction, type TConditionalDeferred, type TConditionalInstantiate, type TConstructor, type TConstructorParameters, type TConstructorParametersAction, type TConstructorParametersDeferred, type TConstructorParametersInstantiate, type TConvertToIntegerKey, type TCyclic, type TCyclicCandidates, type TCyclicCheck, type TCyclicDependencies, type TCyclicExtends, type TCyclicTarget, type TDecodeCallback, type TDeferred, type TDependent, type TDistribute, type TEncodeCallback, type TEnum, type TEnumValue, type TEvaluate, type TEvaluateAction, type TEvaluateDeferred, type TEvaluateDependent, type TEvaluateEnum, type TEvaluateInstantiate, type TEvaluateIntersect, type TEvaluateTemplateLiteral, type TEvaluateType, type TEvaluateUnion, type TEvaluateUnionFast, type TExclude, type TExcludeAction, type TExcludeDeferred, type TExcludeInstantiate, type TExtends, type TExtract, type TExtractAction, type TExtractDeferred, type TExtractInstantiate, type TFlatten, type TFormat, type TFunction, type TGeneric, type TIdentifier, type TImmutable, type TIndex, type TIndexAction, type TIndexDeferred, type TIndexInstantiate, type TInfer, type TInstanceType, type TInstanceTypeAction, type TInstanceTypeDeferred, type TInstanceTypeInstantiate, type TInstantiate, type TInstantiateCyclic, type TInteger, type TIntegerKey, type TInterface, type TInterfaceAction, type TInterfaceDeferred, type TInterfaceInstantiate, type TIntersect, type TIntersectOptions, type TIsTemplateLiteralFinite, type TIsTemplateLiteralPattern, type TKeyOf, type TKeyOfAction, type TKeyOfDeferred, type TKeyOfInstantiate, type TKeysToIndexer, type TLiteral, type TLiteralTypeName, type TLiteralValue, type TLowercase, type TLowercaseAction, type TLowercaseDeferred, type TLowercaseInstantiate, type TMapped, type TMappedAction, type TMappedDeferred, type TMappedInstantiate, type TModule, type TModuleDeferred, type TModuleInstantiate, type TNarrow, type TNever, type TNonNullable, type TNonNullableAction, type TNonNullableDeferred, type TNonNullableInstantiate, type TNull, type TNumber, type TNumberKey, type TNumberOptions, type TObject, type TObjectOptions, type TOmit, type TOmitAction, type TOmitDeferred, type TOmitInstantiate, type TOptional, type TParameter, type TParameters, type TParametersAction, type TParametersDeferred, type TParametersInstantiate, type TParsePatternIntoTypes, type TParseTemplateIntoTypes, type TPartial, type TPartialAction, type TPartialDeferred, type TPartialInstantiate, type TPick, type TPickAction, type TPickDeferred, type TPickInstantiate, type TPriority, type TProperties, type TPropertyKeys, type TPropertyValues, type TReadonly, type TReadonlyObject, type TReadonlyObjectAction, type TReadonlyObjectDeferred, type TReadonlyObjectInstantiate, type TRecord, type TRecordAction, type TRecordDeferred, type TRecordInstantiate, type TRecordKey, type TRecordPattern, type TRecordPatternToType, type TRecordValue, type TRef, type TRefInstantiate, type TRefine, type TRefineAdd, type TRefineCheckCallback, type TRefineErrorCallback, type TRefinement, type TRemoveImmutable, type TRemoveImmutableDeferred, type TRemoveOptional, type TRemoveOptionalDeferred, type TRemoveReadonly, type TRemoveReadonlyDeferred, type TRequired, type TRequiredAction, type TRequiredArray, type TRequiredDeferred, type TRequiredInstantiate, type TRest, type TReturnType, type TReturnTypeAction, type TReturnTypeDeferred, type TReturnTypeInstantiate, type TSchema, type TSchemaOptions, type TScript, type TScriptOptions, type TStaticElements, type TString, type TStringKey, type TStringOptions, type TSymbol, type TTemplateLiteral, type TTemplateLiteralDecode, type TTemplateLiteralDecodeUnsafe, type TTemplateLiteralDeferred, type TTemplateLiteralEncode, type TTemplateLiteralFromString, type TTemplateLiteralFromTypes, type TTemplateLiteralStatic, type TThis, type TTuple, type TTupleOptions, type TTupleToIntersect, type TTupleToUnion, type TTypeScriptEnumLike, type TTypeScriptEnumToEnumValues, type TUncapitalize, type TUncapitalizeAction, type TUncapitalizeDeferred, type TUncapitalizeInstantiate, type TUndefined, type TUnion, type TUnionLast, type TUnionToIntersect, type TUnionToTuple, type TUnknown, type TUnsafe, type TUppercase, type TUppercaseAction, type TUppercaseDeferred, type TUppercaseInstantiate, type TVoid, type TWith, type TWithAction, type TWithDeferred, type TWithInstantiate, type TemplateLiteral, type TemplateLiteralCreate, type TemplateLiteralDecode, type TemplateLiteralDecodeUnsafe, type TemplateLiteralDeferred, type TemplateLiteralEncode, type TemplateLiteralFromString, type TemplateLiteralFromTypes, type This, ToolAnswer, ToolAsk, ToolCallContext, ToolCliHints, ToolContent, ToolDefinition, ToolDefinitionError, ToolEffect, ToolInputError, ToolProgress, ToolQuestion, ToolResult, type Tuple, type TupleOptions, index_d_exports as Type, type TypeScriptEnumToEnumValues, type Uncapitalize, type UncapitalizeAction, type UncapitalizeDeferred, type UncapitalizeInstantiate, type Undefined, type Union, type UnionOptions, type Unknown, type Unsafe, type Uppercase, type UppercaseAction, type UppercaseDeferred, type UppercaseInstantiate, type Void, type With, type WithAction, type WithDeferred, type WithInstantiate, defineTool, indexTools, invokeTool, resultText, sanitizeLine, sanitizeText, validateInput, wireSchema };
|
package/dist/mcp.d.mts
CHANGED
|
@@ -11,17 +11,19 @@ import { Server } from "@modelcontextprotocol/server";
|
|
|
11
11
|
* raw tool name with newlines and escapes into its error, joins validation
|
|
12
12
|
* failures into one line and passes a thrown message through unsanitized.
|
|
13
13
|
*
|
|
14
|
-
* `details`
|
|
14
|
+
* `details` reach the client only from a tool with `output`, as `structuredContent`:
|
|
15
15
|
* clients that see structured output prefer it over `content` and would hide
|
|
16
16
|
* the readable answer. Every fact a follow-up call needs belongs in the text.
|
|
17
17
|
*
|
|
18
18
|
* A progress notification that fails to send goes to `onerror`, never to the tool.
|
|
19
19
|
*
|
|
20
|
+
* A client that declares `elicitation` gets `ask`, through `input_required` on both revisions.
|
|
21
|
+
* A 2026 request carries its capabilities itself, a 2025 one declared them at `initialize`.
|
|
22
|
+
*
|
|
20
23
|
* @param info - Name, version and optional title, description, icons and website, sent as given.
|
|
21
24
|
* @param tools - Tools to serve.
|
|
22
25
|
* @returns {Server} Unconnected MCP server.
|
|
23
26
|
* @throws {ToolDefinitionError} When two tools share a name.
|
|
24
27
|
*/
|
|
25
28
|
export declare function createMcpServer(info: McpServerInfo, tools: readonly ToolDefinition[]): Server;
|
|
26
|
-
export { type McpServerInfo, callTool, errorResult, listTools, toolAnnotations };
|
|
27
|
-
//# sourceMappingURL=mcp.d.mts.map
|
|
29
|
+
export { type McpServerInfo, callTool, errorResult, listTools, toolAnnotations };
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { indexTools } from "./_chunks/src.mjs";
|
|
2
|
-
import { callTool, copyIcons, errorResult, listTools, progressSteps, toolAnnotations } from "./_chunks/mcp-answers.mjs";
|
|
2
|
+
import { callAsking, callTool, canAsk, copyIcons, errorResult, listTools, progressSteps, questionRound, toolAnnotations } from "./_chunks/mcp-answers.mjs";
|
|
3
3
|
import { Server } from "@modelcontextprotocol/server";
|
|
4
4
|
function createMcpServer(info, tools) {
|
|
5
5
|
indexTools(tools);
|
|
@@ -13,7 +13,7 @@ function createMcpServer(info, tools) {
|
|
|
13
13
|
websiteUrl
|
|
14
14
|
}, { capabilities: { tools: {} } });
|
|
15
15
|
server.setRequestHandler("tools/list", () => ({ tools: listTools(tools) }));
|
|
16
|
-
server.setRequestHandler("tools/call", (request, ctx) => {
|
|
16
|
+
server.setRequestHandler("tools/call", async (request, ctx) => {
|
|
17
17
|
const progressToken = ctx.mcpReq._meta?.progressToken;
|
|
18
18
|
const notify = (params) => {
|
|
19
19
|
ctx.mcpReq.notify({
|
|
@@ -26,13 +26,18 @@ function createMcpServer(info, tools) {
|
|
|
26
26
|
server.onerror?.(error instanceof Error ? error : new Error(String(error)));
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
const capabilities = ctx.mcpReq.envelope?.["io.modelcontextprotocol/clientCapabilities"] ?? server.getClientCapabilities();
|
|
30
|
+
const round = canAsk(capabilities) ? questionRound(ctx.mcpReq.inputResponses, stateOf(ctx.mcpReq.requestState())) : void 0;
|
|
31
|
+
const context = {
|
|
30
32
|
signal: ctx.mcpReq.signal,
|
|
31
33
|
...progressToken === void 0 ? {} : { progress: progressSteps(notify) }
|
|
32
|
-
}
|
|
34
|
+
};
|
|
35
|
+
const { name, arguments: args } = request.params;
|
|
36
|
+
return await callAsking(info, tools, name, args, context, round);
|
|
33
37
|
});
|
|
34
38
|
return server;
|
|
35
39
|
}
|
|
40
|
+
function stateOf(state) {
|
|
41
|
+
return typeof state === "string" ? state : void 0;
|
|
42
|
+
}
|
|
36
43
|
export { callTool, createMcpServer, errorResult, listTools, toolAnnotations };
|
|
37
|
-
|
|
38
|
-
//# sourceMappingURL=mcp.mjs.map
|
package/dist/omp.d.mts
CHANGED
|
@@ -41,5 +41,4 @@ export interface OmpToolOptions {
|
|
|
41
41
|
* @param options - Host `Text`, optional load mode and renderers.
|
|
42
42
|
* @throws {ToolDefinitionError} When two tools share a name.
|
|
43
43
|
*/
|
|
44
|
-
export declare function registerOmpTools(pi: ExtensionAPI, tools: readonly ToolDefinition$1[], options: OmpToolOptions): void;
|
|
45
|
-
//# sourceMappingURL=omp.d.mts.map
|
|
44
|
+
export declare function registerOmpTools(pi: ExtensionAPI, tools: readonly ToolDefinition$1[], options: OmpToolOptions): void;
|
package/dist/omp.mjs
CHANGED
package/dist/pi.d.mts
CHANGED
|
@@ -41,5 +41,4 @@ export interface PiRenderers extends Readonly<Pick<ToolDefinition, "renderCall"
|
|
|
41
41
|
* @throws {ToolDefinitionError} When two tools share a name, a tool has `describeCall` but no
|
|
42
42
|
* `Text` came with it, or `confirm` names a tool that isn't in the list.
|
|
43
43
|
*/
|
|
44
|
-
export declare function registerPiTools(pi: ExtensionAPI, tools: readonly ToolDefinition$1[], options?: PiToolOptions): void;
|
|
45
|
-
//# sourceMappingURL=pi.d.mts.map
|
|
44
|
+
export declare function registerPiTools(pi: ExtensionAPI, tools: readonly ToolDefinition$1[], options?: PiToolOptions): void;
|
package/dist/pi.mjs
CHANGED
|
@@ -30,7 +30,7 @@ function byName(entries, name) {
|
|
|
30
30
|
}
|
|
31
31
|
async function approve(tool, ask, params, signal, ctx) {
|
|
32
32
|
const checked = validateInput(tool, params);
|
|
33
|
-
if (!checked.ok) throw new ToolInputError(checked.lines);
|
|
33
|
+
if (!checked.ok) throw new ToolInputError(checked.lines, checked.issues);
|
|
34
34
|
const question = await ask(checked.value);
|
|
35
35
|
if (question === void 0) return;
|
|
36
36
|
if (!ctx.hasUI) throw new Error(`${tool.name} needs interactive approval in Pi TUI or RPC mode`);
|
|
@@ -54,5 +54,3 @@ function hostRenderers(tool, renderers, Text) {
|
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
export { registerPiTools };
|
|
57
|
-
|
|
58
|
-
//# sourceMappingURL=pi.mjs.map
|