toolcraft 0.0.232 → 0.0.233
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/composition.json +3 -3
- package/dist/applied-default.d.ts +3 -0
- package/dist/applied-default.js +16 -0
- package/dist/cli.js +508 -204
- package/dist/composition.json +3 -3
- package/dist/discriminator.d.ts +9 -0
- package/dist/discriminator.js +32 -0
- package/dist/error-report.d.ts +2 -18
- package/dist/error-report.js +12 -14
- package/dist/http.js +8 -1
- package/dist/human-in-loop/gate.js +6 -0
- package/dist/index.compile-check.js +22 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +50 -0
- package/dist/json-schema-converter.d.ts +14 -6
- package/dist/json-schema-converter.js +150 -20
- package/dist/mcp-proxy-metadata.d.ts +2 -0
- package/dist/mcp-proxy-metadata.js +13 -0
- package/dist/mcp-proxy.d.ts +1 -0
- package/dist/mcp-proxy.js +65 -47
- package/dist/mcp-result.d.ts +3 -0
- package/dist/mcp-result.js +10 -0
- package/dist/mcp.js +211 -153
- package/dist/redaction.js +26 -17
- package/dist/renderer.js +40 -29
- package/dist/schema-member-names.d.ts +2 -0
- package/dist/schema-member-names.js +39 -0
- package/dist/schema-scope.d.ts +1 -0
- package/dist/schema-scope.js +29 -16
- package/dist/schema.d.ts +1 -1
- package/dist/sdk.d.ts +2 -1
- package/dist/sdk.js +164 -50
- package/dist/stream.js +24 -23
- package/dist/testing/diagnostic-value.d.ts +1 -0
- package/dist/testing/diagnostic-value.js +57 -0
- package/dist/testing/fakes.js +2 -1
- package/dist/testing/harness.js +1 -0
- package/dist/testing/memory-fs.js +42 -1
- package/dist/testing/parity.js +50 -6
- package/dist/union-validation.d.ts +5 -0
- package/dist/union-validation.js +36 -0
- package/node_modules/@poe-code/process-runner/dist/types.d.ts +2 -0
- package/node_modules/mcp-oauth-server/dist/index.js +47 -6
- package/node_modules/tiny-http-mcp-server/dist/cli.js +14 -2
- package/node_modules/tiny-http-mcp-server/dist/composition.json +1 -1
- package/node_modules/tiny-http-mcp-server/dist/http-server.d.ts +7 -5
- package/node_modules/tiny-http-mcp-server/dist/http-server.js +3 -11
- package/node_modules/tiny-http-mcp-server/dist/http-transport.d.ts +6 -1
- package/node_modules/tiny-http-mcp-server/dist/http-transport.js +196 -15
- package/node_modules/tiny-http-mcp-server/dist/index.d.ts +2 -2
- package/node_modules/tiny-http-mcp-server/dist/modern-headers.d.ts +3 -0
- package/node_modules/tiny-http-mcp-server/dist/modern-headers.js +35 -0
- package/node_modules/tiny-http-mcp-server/dist/parse-body.d.ts +1 -0
- package/node_modules/tiny-http-mcp-server/dist/parse-body.js +9 -5
- package/node_modules/tiny-http-mcp-server/dist/test-support.js +17 -0
- package/node_modules/tiny-http-mcp-server/dist/testing.d.ts +1 -1
- package/node_modules/tiny-http-mcp-server/dist/testing.js +3 -2
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/default-oauth-client-provider.js +21 -4
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/token-endpoint.d.ts +1 -1
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/client/token-endpoint.js +14 -6
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/http-fetch.d.ts +1 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/http-fetch.js +8 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/http-response.d.ts +1 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/http-response.js +50 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/index.d.ts +2 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/index.js +2 -0
- package/node_modules/tiny-http-mcp-server/node_modules/mcp-oauth/dist/server/jwks-token-verifier.js +21 -3
- package/node_modules/tiny-http-mcp-server/package.json +1 -1
- package/node_modules/tiny-mcp-client/README.md +1 -0
- package/node_modules/tiny-mcp-client/dist/index.d.ts +178 -101
- package/node_modules/tiny-mcp-client/dist/index.js +4696 -291
- package/node_modules/tiny-mcp-client/package.json +2 -1
- package/node_modules/tiny-stdio-mcp-server/dist/base64.d.ts +1 -0
- package/node_modules/tiny-stdio-mcp-server/dist/base64.js +5 -0
- package/node_modules/tiny-stdio-mcp-server/dist/composition.json +1 -1
- package/node_modules/tiny-stdio-mcp-server/dist/content/audio.d.ts +3 -0
- package/node_modules/tiny-stdio-mcp-server/dist/content/convert.d.ts +5 -1
- package/node_modules/tiny-stdio-mcp-server/dist/content/convert.js +41 -6
- package/node_modules/tiny-stdio-mcp-server/dist/content/file.d.ts +5 -0
- package/node_modules/tiny-stdio-mcp-server/dist/content/image.d.ts +3 -0
- package/node_modules/tiny-stdio-mcp-server/dist/headers.d.ts +10 -0
- package/node_modules/tiny-stdio-mcp-server/dist/headers.js +180 -0
- package/node_modules/tiny-stdio-mcp-server/dist/index.d.ts +5 -5
- package/node_modules/tiny-stdio-mcp-server/dist/index.js +1 -1
- package/node_modules/tiny-stdio-mcp-server/dist/input-request-schema.d.ts +220 -0
- package/node_modules/tiny-stdio-mcp-server/dist/input-request-schema.js +1995 -0
- package/node_modules/tiny-stdio-mcp-server/dist/jsonrpc.d.ts +1 -0
- package/node_modules/tiny-stdio-mcp-server/dist/jsonrpc.js +38 -25
- package/node_modules/tiny-stdio-mcp-server/dist/metadata.d.ts +2 -0
- package/node_modules/tiny-stdio-mcp-server/dist/metadata.js +37 -0
- package/node_modules/tiny-stdio-mcp-server/dist/protocol-validation.d.ts +4 -0
- package/node_modules/tiny-stdio-mcp-server/dist/protocol-validation.js +53 -0
- package/node_modules/tiny-stdio-mcp-server/dist/protocol.d.ts +17 -0
- package/node_modules/tiny-stdio-mcp-server/dist/protocol.js +228 -0
- package/node_modules/tiny-stdio-mcp-server/dist/request-cancellation.d.ts +1 -0
- package/node_modules/tiny-stdio-mcp-server/dist/request-cancellation.js +18 -0
- package/node_modules/tiny-stdio-mcp-server/dist/sampling-messages.d.ts +18 -0
- package/node_modules/tiny-stdio-mcp-server/dist/sampling-messages.js +34 -0
- package/node_modules/tiny-stdio-mcp-server/dist/schema.d.ts +4 -1
- package/node_modules/tiny-stdio-mcp-server/dist/server.d.ts +9 -4
- package/node_modules/tiny-stdio-mcp-server/dist/server.js +334 -135
- package/node_modules/tiny-stdio-mcp-server/dist/stdio-input.d.ts +3 -0
- package/node_modules/tiny-stdio-mcp-server/dist/stdio-input.js +50 -28
- package/node_modules/tiny-stdio-mcp-server/dist/subscriptions.d.ts +11 -0
- package/node_modules/tiny-stdio-mcp-server/dist/subscriptions.js +128 -0
- package/node_modules/tiny-stdio-mcp-server/dist/types.d.ts +58 -18
- package/node_modules/tiny-stdio-mcp-server/dist/types.js +2 -1
- package/node_modules/tiny-stdio-mcp-server/dist/uri.d.ts +1 -0
- package/node_modules/tiny-stdio-mcp-server/dist/uri.js +41 -0
- package/node_modules/tiny-stdio-mcp-server/package.json +8 -0
- package/node_modules/toolcraft-design/dist/command-registry.d.ts +11 -0
- package/node_modules/toolcraft-design/dist/command-registry.js +24 -0
- package/node_modules/toolcraft-design/dist/dashboard/ansi.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/dashboard/ansi.js +81 -27
- package/node_modules/toolcraft-design/dist/dashboard/buffer.js +39 -25
- package/node_modules/toolcraft-design/dist/dashboard/components/border.js +6 -5
- package/node_modules/toolcraft-design/dist/dashboard/components/footer.js +26 -21
- package/node_modules/toolcraft-design/dist/dashboard/components/output-pane.d.ts +1 -1
- package/node_modules/toolcraft-design/dist/dashboard/components/output-pane.js +12 -6
- package/node_modules/toolcraft-design/dist/dashboard/components/stats-pane.d.ts +2 -1
- package/node_modules/toolcraft-design/dist/dashboard/components/stats-pane.js +51 -10
- package/node_modules/toolcraft-design/dist/dashboard/dashboard.d.ts +4 -0
- package/node_modules/toolcraft-design/dist/dashboard/dashboard.js +77 -4
- package/node_modules/toolcraft-design/dist/dashboard/index.d.ts +2 -0
- package/node_modules/toolcraft-design/dist/dashboard/index.js +2 -0
- package/node_modules/toolcraft-design/dist/dashboard/keymap.js +26 -6
- package/node_modules/toolcraft-design/dist/dashboard/layout.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/dashboard/layout.js +19 -3
- package/node_modules/toolcraft-design/dist/dashboard/line-buffer.d.ts +9 -0
- package/node_modules/toolcraft-design/dist/dashboard/line-buffer.js +63 -0
- package/node_modules/toolcraft-design/dist/dashboard/output-preview.d.ts +9 -0
- package/node_modules/toolcraft-design/dist/dashboard/output-preview.js +70 -0
- package/node_modules/toolcraft-design/dist/dashboard/snapshot.js +3 -1
- package/node_modules/toolcraft-design/dist/dashboard/store.js +9 -3
- package/node_modules/toolcraft-design/dist/dashboard/terminal-strings.d.ts +6 -0
- package/node_modules/toolcraft-design/dist/dashboard/terminal-strings.js +108 -0
- package/node_modules/toolcraft-design/dist/dashboard/terminal-width.js +3 -1
- package/node_modules/toolcraft-design/dist/dashboard/terminal.js +11 -1
- package/node_modules/toolcraft-design/dist/dashboard/testing/pipeline-scenario.d.ts +1 -0
- package/node_modules/toolcraft-design/dist/dashboard/testing/pipeline-scenario.js +126 -0
- package/node_modules/toolcraft-design/dist/dashboard/types.d.ts +3 -1
- package/node_modules/toolcraft-design/dist/event-groups.d.ts +19 -0
- package/node_modules/toolcraft-design/dist/event-groups.js +49 -0
- package/node_modules/toolcraft-design/dist/index.d.ts +6 -1
- package/node_modules/toolcraft-design/dist/index.js +5 -1
- package/node_modules/toolcraft-design/dist/inline-notice.d.ts +14 -0
- package/node_modules/toolcraft-design/dist/inline-notice.js +28 -0
- package/node_modules/toolcraft-design/dist/metric.d.ts +8 -0
- package/node_modules/toolcraft-design/dist/metric.js +21 -0
- package/node_modules/toolcraft-design/dist/overlay-manager.d.ts +6 -0
- package/node_modules/toolcraft-design/dist/overlay-manager.js +10 -0
- package/node_modules/toolcraft-design/dist/primitives.d.ts +12 -0
- package/node_modules/toolcraft-design/dist/primitives.js +7 -0
- package/node_modules/toolcraft-design/dist/progress-group.d.ts +7 -0
- package/node_modules/toolcraft-design/dist/progress-group.js +10 -0
- package/node_modules/toolcraft-design/dist/render-performance.d.ts +33 -0
- package/node_modules/toolcraft-design/dist/render-performance.js +71 -0
- package/node_modules/toolcraft-design/dist/task-tree.d.ts +22 -0
- package/node_modules/toolcraft-design/dist/task-tree.js +79 -0
- package/node_modules/toolcraft-design/dist/viewport.d.ts +18 -0
- package/node_modules/toolcraft-design/dist/viewport.js +56 -0
- package/node_modules/toolcraft-schema/dist/clone-default.d.ts +1 -0
- package/node_modules/toolcraft-schema/dist/clone-default.js +26 -0
- package/node_modules/toolcraft-schema/dist/index.compile-check.js +1 -0
- package/node_modules/toolcraft-schema/dist/index.d.ts +18 -9
- package/node_modules/toolcraft-schema/dist/index.js +46 -8
- package/node_modules/toolcraft-schema/dist/json-schema/compiler.d.ts +1 -0
- package/node_modules/toolcraft-schema/dist/json-schema/compiler.js +6 -0
- package/node_modules/toolcraft-schema/dist/json-schema/evaluate.js +6 -3
- package/node_modules/toolcraft-schema/dist/json-schema/normalize-nullability.d.ts +1 -0
- package/node_modules/toolcraft-schema/dist/json-schema/normalize-nullability.js +69 -0
- package/node_modules/toolcraft-schema/dist/json-schema/types.d.ts +1 -0
- package/node_modules/toolcraft-schema/dist/json.d.ts +4 -1
- package/node_modules/toolcraft-schema/dist/json.js +57 -1
- package/node_modules/toolcraft-schema/dist/native-json-schema.d.ts +10 -0
- package/node_modules/toolcraft-schema/dist/native-json-schema.js +11 -0
- package/node_modules/toolcraft-schema/dist/validate.d.ts +5 -1
- package/node_modules/toolcraft-schema/dist/validate.js +61 -47
- package/node_modules/toolcraft-schema/package.json +1 -1
- package/package.json +6 -3
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import { cloneDefaultValue } from "./clone-default.js";
|
|
2
|
+
import { isJsonValue } from "./json.js";
|
|
3
|
+
import { deepEqual, unicodeLength } from "./json-schema/utils.js";
|
|
1
4
|
import { getRequiredKeyFingerprint } from "./union.js";
|
|
5
|
+
import { nativeJsonSchema } from "./native-json-schema.js";
|
|
2
6
|
const missingValue = Symbol("missingValue");
|
|
3
|
-
export function validate(schema, value) {
|
|
4
|
-
const state = { issues: [] };
|
|
7
|
+
export function validate(schema, value, options = {}) {
|
|
8
|
+
const state = { issues: [], defaults: options.defaults ?? "optional" };
|
|
5
9
|
const result = walkSchema(schema, value, [], state);
|
|
6
10
|
if (state.issues.length > 0) {
|
|
7
11
|
return { ok: false, issues: state.issues };
|
|
@@ -12,10 +16,25 @@ function walkSchema(schema, value, path, state) {
|
|
|
12
16
|
if (schema.kind === "optional") {
|
|
13
17
|
return walkOptional(schema, value, path, state);
|
|
14
18
|
}
|
|
19
|
+
if (value === missingValue && state.defaults === "all" && schema.default !== undefined) {
|
|
20
|
+
value = cloneDefaultValue(schema.default);
|
|
21
|
+
}
|
|
15
22
|
if (value === missingValue) {
|
|
16
23
|
addIssue(state, path, expectedFor(schema), "missing", `Expected ${expectedFor(schema)} at ${formatPath(path)}`);
|
|
17
24
|
return { present: false };
|
|
18
25
|
}
|
|
26
|
+
const native = schema[nativeJsonSchema];
|
|
27
|
+
if (native !== undefined) {
|
|
28
|
+
if (!isJsonValue(value)) {
|
|
29
|
+
addExpectedIssue(state, path, "JSON value", value);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const result = native.validator.validate(value);
|
|
33
|
+
if (!result.ok)
|
|
34
|
+
state.issues.push(...result.issues.map((issue) => ({ ...issue, path: [...path, ...issue.path] })));
|
|
35
|
+
}
|
|
36
|
+
return { present: true, value };
|
|
37
|
+
}
|
|
19
38
|
if (value === null && schema.nullable === true) {
|
|
20
39
|
return { present: true, value };
|
|
21
40
|
}
|
|
@@ -39,14 +58,26 @@ function walkSchema(schema, value, path, state) {
|
|
|
39
58
|
case "record":
|
|
40
59
|
return walkRecord(schema, value, path, state);
|
|
41
60
|
case "json":
|
|
42
|
-
return walkJson(value, path, state);
|
|
61
|
+
return walkJson(schema, value, path, state);
|
|
43
62
|
}
|
|
44
63
|
}
|
|
45
64
|
function walkOptional(schema, value, path, state) {
|
|
46
65
|
if (value === missingValue || value === undefined) {
|
|
66
|
+
if (state.defaults === "none") {
|
|
67
|
+
return { present: false };
|
|
68
|
+
}
|
|
47
69
|
const defaultValue = getDefault(schema.inner);
|
|
48
70
|
if (defaultValue.present) {
|
|
49
|
-
|
|
71
|
+
let clonedDefault;
|
|
72
|
+
try {
|
|
73
|
+
clonedDefault = structuredClone(defaultValue.value);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
if (!(error instanceof Error) || error.name !== "DataCloneError")
|
|
77
|
+
throw error;
|
|
78
|
+
clonedDefault = cloneDefaultValue(defaultValue.value);
|
|
79
|
+
}
|
|
80
|
+
return walkSchema(schema.inner, clonedDefault, path, state);
|
|
50
81
|
}
|
|
51
82
|
return { present: false };
|
|
52
83
|
}
|
|
@@ -57,13 +88,14 @@ function walkString(schema, value, path, state) {
|
|
|
57
88
|
addExpectedIssue(state, path, "string", value);
|
|
58
89
|
return { present: true, value };
|
|
59
90
|
}
|
|
60
|
-
|
|
91
|
+
const length = unicodeLength(value);
|
|
92
|
+
if (schema.minLength !== undefined && length < schema.minLength) {
|
|
61
93
|
const expected = `string with length at least ${schema.minLength}`;
|
|
62
|
-
addIssue(state, path, expected, `string with length ${
|
|
94
|
+
addIssue(state, path, expected, `string with length ${length}`, `Expected ${expected} at ${formatPath(path)}`);
|
|
63
95
|
}
|
|
64
|
-
if (schema.maxLength !== undefined &&
|
|
96
|
+
if (schema.maxLength !== undefined && length > schema.maxLength) {
|
|
65
97
|
const expected = `string with length at most ${schema.maxLength}`;
|
|
66
|
-
addIssue(state, path, expected, `string with length ${
|
|
98
|
+
addIssue(state, path, expected, `string with length ${length}`, `Expected ${expected} at ${formatPath(path)}`);
|
|
67
99
|
}
|
|
68
100
|
if (schema.pattern !== undefined) {
|
|
69
101
|
const pattern = compilePattern(schema.pattern);
|
|
@@ -118,7 +150,8 @@ function walkArray(schema, value, path, state) {
|
|
|
118
150
|
const expected = `array with at most ${schema.maxItems} items`;
|
|
119
151
|
addIssue(state, path, expected, `array with ${value.length} items`, `Expected ${expected} at ${formatPath(path)}`);
|
|
120
152
|
}
|
|
121
|
-
const nextValue = value.
|
|
153
|
+
const nextValue = Array.from({ length: value.length }, (_item, index) => {
|
|
154
|
+
const item = value[index];
|
|
122
155
|
const result = walkSchema(schema.item, item, [...path, String(index)], state);
|
|
123
156
|
return result.present ? result.value : item;
|
|
124
157
|
});
|
|
@@ -182,15 +215,17 @@ function walkOneOf(schema, value, path, state) {
|
|
|
182
215
|
});
|
|
183
216
|
}
|
|
184
217
|
function walkUnion(schema, value, path, state) {
|
|
185
|
-
if (isPlainRecord(value)) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
218
|
+
if (!isPlainRecord(value)) {
|
|
219
|
+
addExpectedIssue(state, path, "object", value);
|
|
220
|
+
return { present: true, value };
|
|
221
|
+
}
|
|
222
|
+
const candidateBranches = schema.branches.filter((branch) => hasRequiredKeys(branch, value));
|
|
223
|
+
if (candidateBranches.length === 1 && state.defaults !== "all") {
|
|
224
|
+
return walkObject(candidateBranches[0], value, path, state);
|
|
190
225
|
}
|
|
191
226
|
const matches = [];
|
|
192
227
|
for (const branch of schema.branches) {
|
|
193
|
-
const branchState = { issues: [] };
|
|
228
|
+
const branchState = { ...state, issues: [] };
|
|
194
229
|
const result = walkObject(branch, value, path, branchState);
|
|
195
230
|
if (branchState.issues.length === 0 && result.present) {
|
|
196
231
|
matches.push({ fingerprint: getRequiredKeyFingerprint(branch), value: result.value });
|
|
@@ -229,8 +264,14 @@ function walkRecord(schema, value, path, state) {
|
|
|
229
264
|
}
|
|
230
265
|
return { present: true, value: nextValue };
|
|
231
266
|
}
|
|
232
|
-
function walkJson(value, path, state) {
|
|
267
|
+
function walkJson(schema, value, path, state) {
|
|
233
268
|
if (isJsonValue(value)) {
|
|
269
|
+
if (schema.const !== undefined && !deepEqual(value, schema.const)) {
|
|
270
|
+
addExpectedIssue(state, path, "declared JSON constant", value);
|
|
271
|
+
}
|
|
272
|
+
if (schema.enum !== undefined && !schema.enum.some((candidate) => deepEqual(value, candidate))) {
|
|
273
|
+
addExpectedIssue(state, path, "declared JSON enum value", value);
|
|
274
|
+
}
|
|
234
275
|
return { present: true, value };
|
|
235
276
|
}
|
|
236
277
|
addExpectedIssue(state, path, "JSON value", value);
|
|
@@ -245,43 +286,13 @@ function getDefault(schema) {
|
|
|
245
286
|
}
|
|
246
287
|
return { present: false };
|
|
247
288
|
}
|
|
248
|
-
function isPlainRecord(value) {
|
|
289
|
+
export function isPlainRecord(value) {
|
|
249
290
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
250
291
|
return false;
|
|
251
292
|
}
|
|
252
293
|
const prototype = Object.getPrototypeOf(value);
|
|
253
294
|
return prototype === Object.prototype || prototype === null;
|
|
254
295
|
}
|
|
255
|
-
function isJsonValue(value, ancestors = new Set()) {
|
|
256
|
-
if (value === null ||
|
|
257
|
-
typeof value === "string" ||
|
|
258
|
-
typeof value === "number" ||
|
|
259
|
-
typeof value === "boolean") {
|
|
260
|
-
return typeof value !== "number" || Number.isFinite(value);
|
|
261
|
-
}
|
|
262
|
-
if (Array.isArray(value)) {
|
|
263
|
-
if (ancestors.has(value)) {
|
|
264
|
-
return false;
|
|
265
|
-
}
|
|
266
|
-
ancestors.add(value);
|
|
267
|
-
const result = value.every((item) => isJsonValue(item, ancestors));
|
|
268
|
-
ancestors.delete(value);
|
|
269
|
-
return result;
|
|
270
|
-
}
|
|
271
|
-
if (isPlainRecord(value)) {
|
|
272
|
-
if (ancestors.has(value)) {
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
|
-
ancestors.add(value);
|
|
276
|
-
const result = Object.values(value).every((item) => isJsonValue(item, ancestors));
|
|
277
|
-
ancestors.delete(value);
|
|
278
|
-
return result;
|
|
279
|
-
}
|
|
280
|
-
return false;
|
|
281
|
-
}
|
|
282
|
-
function cloneDefault(value) {
|
|
283
|
-
return structuredClone(value);
|
|
284
|
-
}
|
|
285
296
|
function setOwnValue(target, key, value) {
|
|
286
297
|
Object.defineProperty(target, key, {
|
|
287
298
|
configurable: true,
|
|
@@ -357,6 +368,9 @@ function receivedType(value) {
|
|
|
357
368
|
if (Array.isArray(value)) {
|
|
358
369
|
return "array";
|
|
359
370
|
}
|
|
371
|
+
if (typeof value === "object" && !isPlainRecord(value)) {
|
|
372
|
+
return "non-plain object";
|
|
373
|
+
}
|
|
360
374
|
if (typeof value === "number" && Number.isInteger(value)) {
|
|
361
375
|
return "integer";
|
|
362
376
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolcraft",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.233",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"test": "cd ../.. && vitest run packages/toolcraft/src",
|
|
105
105
|
"test:unit": "cd ../.. && vitest run packages/toolcraft/src",
|
|
106
106
|
"lint": "cd ../.. && eslint packages/toolcraft/src --ext ts && tsc -p packages/toolcraft/tsconfig.json --noEmit",
|
|
107
|
-
"prepack": "node ../../scripts/manage-bundled-workspace-deps.mjs prepare . toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/user-error @poe-code/process-runner mcp-oauth-server tiny-http-mcp-server tiny-mcp-client tiny-stdio-mcp-server auth-store jose fast-string-width fast-wrap-ansi ignore jsonc-parser sisteransi smol-toml yaml",
|
|
107
|
+
"prepack": "\"$npm_node_execpath\" \"$npm_execpath\" --prefix ../.. run build:workspaces -- --workspace=\"$npm_package_name\" >&2 && node ../../scripts/manage-bundled-workspace-deps.mjs prepare . toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/user-error @poe-code/process-runner mcp-oauth-server tiny-http-mcp-server tiny-mcp-client tiny-stdio-mcp-server auth-store jose fast-string-width fast-wrap-ansi ignore jsonc-parser sisteransi smol-toml yaml",
|
|
108
108
|
"postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . toolcraft-schema toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/user-error @poe-code/process-runner mcp-oauth-server tiny-http-mcp-server tiny-mcp-client tiny-stdio-mcp-server auth-store jose fast-string-width fast-wrap-ansi ignore jsonc-parser sisteransi smol-toml yaml"
|
|
109
109
|
},
|
|
110
110
|
"dependencies": {
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"yaml"
|
|
159
159
|
],
|
|
160
160
|
"optionalDependencies": {
|
|
161
|
-
"toolcraft-schema": "0.0.
|
|
161
|
+
"toolcraft-schema": "0.0.233",
|
|
162
162
|
"toolcraft-design": "*",
|
|
163
163
|
"@poe-code/frontmatter": "*",
|
|
164
164
|
"@poe-code/agent-mcp-config": "*",
|
|
@@ -173,5 +173,8 @@
|
|
|
173
173
|
"tiny-mcp-client": "*",
|
|
174
174
|
"tiny-stdio-mcp-server": "*",
|
|
175
175
|
"auth-store": "*"
|
|
176
|
+
},
|
|
177
|
+
"devDependencies": {
|
|
178
|
+
"tiny-stdio-mcp-test-server": "*"
|
|
176
179
|
}
|
|
177
180
|
}
|