@wowok/agent-mcp 2.4.1 → 2.5.0
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/dist/config/runtime.d.ts +4 -0
- package/dist/config/runtime.js +29 -5
- package/dist/harness/auto-escalation.d.ts +27 -0
- package/dist/harness/auto-escalation.js +68 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -1621
- package/dist/knowledge/allocation-confirm.d.ts +115 -0
- package/dist/knowledge/allocation-confirm.js +534 -0
- package/dist/knowledge/allocation-context.d.ts +58 -0
- package/dist/knowledge/allocation-context.js +249 -0
- package/dist/knowledge/allocation-ledger.d.ts +67 -0
- package/dist/knowledge/allocation-ledger.js +463 -0
- package/dist/knowledge/allocation-puzzle.d.ts +135 -0
- package/dist/knowledge/allocation-puzzle.js +298 -0
- package/dist/knowledge/allocation-risk.d.ts +78 -0
- package/dist/knowledge/allocation-risk.js +568 -0
- package/dist/knowledge/allocation-templates.d.ts +38 -0
- package/dist/knowledge/allocation-templates.js +970 -0
- package/dist/knowledge/allocation-translation.d.ts +72 -0
- package/dist/knowledge/allocation-translation.js +585 -0
- package/dist/knowledge/arb-risk.d.ts +37 -0
- package/dist/knowledge/arb-risk.js +210 -0
- package/dist/knowledge/arbitration-confirm.d.ts +135 -0
- package/dist/knowledge/arbitration-confirm.js +559 -0
- package/dist/knowledge/arbitration-context.d.ts +81 -0
- package/dist/knowledge/arbitration-context.js +505 -0
- package/dist/knowledge/arbitration-ledger.d.ts +62 -0
- package/dist/knowledge/arbitration-ledger.js +521 -0
- package/dist/knowledge/arbitration-puzzle.d.ts +84 -0
- package/dist/knowledge/arbitration-puzzle.js +304 -0
- package/dist/knowledge/arbitration-risk.d.ts +112 -0
- package/dist/knowledge/arbitration-risk.js +433 -0
- package/dist/knowledge/arbitration-templates.d.ts +38 -0
- package/dist/knowledge/arbitration-templates.js +276 -0
- package/dist/knowledge/arbitration-translation.d.ts +91 -0
- package/dist/knowledge/arbitration-translation.js +487 -0
- package/dist/knowledge/bridge-risk.d.ts +36 -0
- package/dist/knowledge/bridge-risk.js +263 -0
- package/dist/knowledge/contact-risk.d.ts +32 -0
- package/dist/knowledge/contact-risk.js +200 -0
- package/dist/knowledge/demand-confirm.d.ts +32 -0
- package/dist/knowledge/demand-confirm.js +206 -0
- package/dist/knowledge/demand-risk.d.ts +30 -0
- package/dist/knowledge/demand-risk.js +240 -0
- package/dist/knowledge/demand-translation.d.ts +55 -0
- package/dist/knowledge/demand-translation.js +354 -0
- package/dist/knowledge/deployment-scanner.d.ts +63 -0
- package/dist/knowledge/deployment-scanner.js +762 -0
- package/dist/knowledge/examples-scanner-cli.d.ts +1 -0
- package/dist/knowledge/examples-scanner-cli.js +26 -0
- package/dist/knowledge/examples-scanner.d.ts +121 -0
- package/dist/knowledge/examples-scanner.js +825 -0
- package/dist/knowledge/flywheel-loop.d.ts +3 -0
- package/dist/knowledge/flywheel-loop.js +32 -3
- package/dist/knowledge/glossary.js +3 -1
- package/dist/knowledge/guard-confirm.d.ts +86 -0
- package/dist/knowledge/guard-confirm.js +406 -0
- package/dist/knowledge/guard-context.d.ts +56 -0
- package/dist/knowledge/guard-context.js +287 -0
- package/dist/knowledge/guard-design-patterns.d.ts +37 -0
- package/dist/knowledge/guard-design-patterns.js +257 -0
- package/dist/knowledge/guard-ledger.js +14 -0
- package/dist/knowledge/guard-lint.d.ts +1 -0
- package/dist/knowledge/guard-lint.js +83 -3
- package/dist/knowledge/guard-migration.d.ts +48 -0
- package/dist/knowledge/guard-migration.js +228 -0
- package/dist/knowledge/guard-puzzle.js +3 -2
- package/dist/knowledge/guard-risk.d.ts +3 -1
- package/dist/knowledge/guard-risk.js +832 -64
- package/dist/knowledge/guard-templates.d.ts +1 -0
- package/dist/knowledge/guard-templates.js +278 -2
- package/dist/knowledge/guard-translation.js +6 -5
- package/dist/knowledge/index.d.ts +342 -0
- package/dist/knowledge/index.js +344 -0
- package/dist/knowledge/machine-confirm.d.ts +102 -0
- package/dist/knowledge/machine-confirm.js +559 -0
- package/dist/knowledge/machine-context.d.ts +160 -0
- package/dist/knowledge/machine-context.js +812 -0
- package/dist/knowledge/machine-ledger.d.ts +41 -0
- package/dist/knowledge/machine-ledger.js +315 -0
- package/dist/knowledge/machine-puzzle.d.ts +206 -0
- package/dist/knowledge/machine-puzzle.js +494 -0
- package/dist/knowledge/machine-risk.d.ts +75 -0
- package/dist/knowledge/machine-risk.js +644 -0
- package/dist/knowledge/machine-templates.d.ts +92 -0
- package/dist/knowledge/machine-templates.js +1592 -0
- package/dist/knowledge/machine-topology.d.ts +57 -0
- package/dist/knowledge/machine-topology.js +234 -0
- package/dist/knowledge/machine-translation.d.ts +96 -0
- package/dist/knowledge/machine-translation.js +513 -0
- package/dist/knowledge/mcp-schema-audit-cli.d.ts +1 -0
- package/dist/knowledge/mcp-schema-audit-cli.js +45 -0
- package/dist/knowledge/mcp-schema-audit.d.ts +90 -0
- package/dist/knowledge/mcp-schema-audit.js +772 -0
- package/dist/knowledge/onchain-constants.d.ts +4 -0
- package/dist/knowledge/onchain-constants.js +35 -0
- package/dist/knowledge/order-confirm.d.ts +115 -0
- package/dist/knowledge/order-confirm.js +573 -0
- package/dist/knowledge/order-context.d.ts +66 -0
- package/dist/knowledge/order-context.js +390 -0
- package/dist/knowledge/order-ledger.d.ts +69 -0
- package/dist/knowledge/order-ledger.js +341 -0
- package/dist/knowledge/order-puzzle.d.ts +159 -0
- package/dist/knowledge/order-puzzle.js +255 -0
- package/dist/knowledge/order-risk.d.ts +66 -0
- package/dist/knowledge/order-risk.js +653 -0
- package/dist/knowledge/order-templates.d.ts +50 -0
- package/dist/knowledge/order-templates.js +368 -0
- package/dist/knowledge/order-translation.d.ts +78 -0
- package/dist/knowledge/order-translation.js +550 -0
- package/dist/knowledge/passport-confirm.d.ts +130 -0
- package/dist/knowledge/passport-confirm.js +531 -0
- package/dist/knowledge/passport-context.d.ts +59 -0
- package/dist/knowledge/passport-context.js +306 -0
- package/dist/knowledge/passport-ledger.d.ts +48 -0
- package/dist/knowledge/passport-ledger.js +282 -0
- package/dist/knowledge/passport-puzzle.d.ts +108 -0
- package/dist/knowledge/passport-puzzle.js +333 -0
- package/dist/knowledge/passport-risk.d.ts +70 -0
- package/dist/knowledge/passport-risk.js +450 -0
- package/dist/knowledge/passport-templates.d.ts +40 -0
- package/dist/knowledge/passport-templates.js +568 -0
- package/dist/knowledge/passport-translation.d.ts +68 -0
- package/dist/knowledge/passport-translation.js +516 -0
- package/dist/knowledge/payment-risk.d.ts +33 -0
- package/dist/knowledge/payment-risk.js +182 -0
- package/dist/knowledge/permission-confirm.d.ts +110 -0
- package/dist/knowledge/permission-confirm.js +426 -0
- package/dist/knowledge/permission-context.d.ts +58 -0
- package/dist/knowledge/permission-context.js +224 -0
- package/dist/knowledge/permission-ledger.d.ts +38 -0
- package/dist/knowledge/permission-ledger.js +403 -0
- package/dist/knowledge/permission-puzzle.d.ts +122 -0
- package/dist/knowledge/permission-puzzle.js +173 -0
- package/dist/knowledge/permission-risk.d.ts +76 -0
- package/dist/knowledge/permission-risk.js +411 -0
- package/dist/knowledge/permission-templates.d.ts +38 -0
- package/dist/knowledge/permission-templates.js +234 -0
- package/dist/knowledge/permission-translation.d.ts +57 -0
- package/dist/knowledge/permission-translation.js +350 -0
- package/dist/knowledge/personal-risk.d.ts +36 -0
- package/dist/knowledge/personal-risk.js +212 -0
- package/dist/knowledge/progress-confirm.d.ts +108 -0
- package/dist/knowledge/progress-confirm.js +456 -0
- package/dist/knowledge/progress-context.d.ts +123 -0
- package/dist/knowledge/progress-context.js +452 -0
- package/dist/knowledge/progress-ledger.d.ts +63 -0
- package/dist/knowledge/progress-ledger.js +327 -0
- package/dist/knowledge/progress-puzzle.d.ts +82 -0
- package/dist/knowledge/progress-puzzle.js +219 -0
- package/dist/knowledge/progress-risk.d.ts +74 -0
- package/dist/knowledge/progress-risk.js +461 -0
- package/dist/knowledge/progress-templates.d.ts +38 -0
- package/dist/knowledge/progress-templates.js +228 -0
- package/dist/knowledge/progress-translation.d.ts +52 -0
- package/dist/knowledge/progress-translation.js +401 -0
- package/dist/knowledge/proof-confirm.d.ts +31 -0
- package/dist/knowledge/proof-confirm.js +187 -0
- package/dist/knowledge/proof-risk.d.ts +33 -0
- package/dist/knowledge/proof-risk.js +207 -0
- package/dist/knowledge/proof-translation.d.ts +52 -0
- package/dist/knowledge/proof-translation.js +283 -0
- package/dist/knowledge/registrar-risk.d.ts +34 -0
- package/dist/knowledge/registrar-risk.js +217 -0
- package/dist/knowledge/repository-confirm.d.ts +36 -0
- package/dist/knowledge/repository-confirm.js +242 -0
- package/dist/knowledge/repository-risk.d.ts +40 -0
- package/dist/knowledge/repository-risk.js +312 -0
- package/dist/knowledge/repository-translation.d.ts +58 -0
- package/dist/knowledge/repository-translation.js +422 -0
- package/dist/knowledge/resource-risk.d.ts +32 -0
- package/dist/knowledge/resource-risk.js +157 -0
- package/dist/knowledge/reward-confirm.d.ts +113 -0
- package/dist/knowledge/reward-confirm.js +496 -0
- package/dist/knowledge/reward-context.d.ts +127 -0
- package/dist/knowledge/reward-context.js +504 -0
- package/dist/knowledge/reward-ledger.d.ts +96 -0
- package/dist/knowledge/reward-ledger.js +502 -0
- package/dist/knowledge/reward-puzzle.d.ts +97 -0
- package/dist/knowledge/reward-puzzle.js +288 -0
- package/dist/knowledge/reward-risk.d.ts +84 -0
- package/dist/knowledge/reward-risk.js +545 -0
- package/dist/knowledge/reward-translation.d.ts +58 -0
- package/dist/knowledge/reward-translation.js +501 -0
- package/dist/knowledge/safety-rules.js +11 -3
- package/dist/knowledge/scenario-modes.d.ts +53 -0
- package/dist/knowledge/scenario-modes.js +302 -0
- package/dist/knowledge/service-confirm.d.ts +152 -0
- package/dist/knowledge/service-confirm.js +699 -0
- package/dist/knowledge/service-context.d.ts +66 -0
- package/dist/knowledge/service-context.js +403 -0
- package/dist/knowledge/service-ledger.d.ts +71 -0
- package/dist/knowledge/service-ledger.js +609 -0
- package/dist/knowledge/service-puzzle.d.ts +158 -0
- package/dist/knowledge/service-puzzle.js +236 -0
- package/dist/knowledge/service-risk.d.ts +108 -0
- package/dist/knowledge/service-risk.js +615 -0
- package/dist/knowledge/service-templates.d.ts +39 -0
- package/dist/knowledge/service-templates.js +418 -0
- package/dist/knowledge/service-translation.d.ts +103 -0
- package/dist/knowledge/service-translation.js +622 -0
- package/dist/knowledge/tools-reference.d.ts +17 -0
- package/dist/knowledge/tools-reference.js +151 -0
- package/dist/knowledge/treasury-confirm.d.ts +133 -0
- package/dist/knowledge/treasury-confirm.js +512 -0
- package/dist/knowledge/treasury-context.d.ts +64 -0
- package/dist/knowledge/treasury-context.js +363 -0
- package/dist/knowledge/treasury-ledger.d.ts +42 -0
- package/dist/knowledge/treasury-ledger.js +300 -0
- package/dist/knowledge/treasury-puzzle.d.ts +163 -0
- package/dist/knowledge/treasury-puzzle.js +216 -0
- package/dist/knowledge/treasury-risk.d.ts +86 -0
- package/dist/knowledge/treasury-risk.js +440 -0
- package/dist/knowledge/treasury-templates.d.ts +38 -0
- package/dist/knowledge/treasury-templates.js +316 -0
- package/dist/knowledge/treasury-translation.d.ts +78 -0
- package/dist/knowledge/treasury-translation.js +498 -0
- package/dist/knowledge/util-risk.d.ts +30 -0
- package/dist/knowledge/util-risk.js +135 -0
- package/dist/project/business-puzzle.d.ts +47 -0
- package/dist/project/business-puzzle.js +372 -0
- package/dist/project/deployment-doc.d.ts +61 -0
- package/dist/project/deployment-doc.js +432 -0
- package/dist/project/graph.d.ts +1 -0
- package/dist/project/graph.js +27 -1
- package/dist/project/index.d.ts +1 -0
- package/dist/project/index.js +39 -2
- package/dist/project/namespace.d.ts +11 -1
- package/dist/project/namespace.js +27 -2
- package/dist/project/query.d.ts +2 -0
- package/dist/project/query.js +56 -15
- package/dist/project/risk-aggregator.d.ts +50 -0
- package/dist/project/risk-aggregator.js +280 -0
- package/dist/project/substep-trace.d.ts +130 -0
- package/dist/project/substep-trace.js +332 -0
- package/dist/rules.d.ts +12 -0
- package/dist/rules.js +9 -0
- package/dist/schema/call/allocation.d.ts +44 -44
- package/dist/schema/call/arbitration.d.ts +141 -141
- package/dist/schema/call/base.d.ts +386 -386
- package/dist/schema/call/base.js +6 -6
- package/dist/schema/call/bridge-handler.d.ts +5 -2
- package/dist/schema/call/bridge.d.ts +159 -159
- package/dist/schema/call/contact.d.ts +110 -110
- package/dist/schema/call/demand.d.ts +76 -76
- package/dist/schema/call/handler.d.ts +2 -3
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +96 -96
- package/dist/schema/call/order.d.ts +98 -110
- package/dist/schema/call/permission-handler.d.ts +5 -0
- package/dist/schema/call/permission-handler.js +54 -0
- package/dist/schema/call/permission.d.ts +108 -108
- package/dist/schema/call/personal.d.ts +14 -14
- package/dist/schema/call/progress.d.ts +57 -72
- package/dist/schema/call/progress.js +7 -4
- package/dist/schema/call/proof.d.ts +18 -18
- package/dist/schema/call/proof.js +12 -7
- package/dist/schema/call/repository.d.ts +154 -154
- package/dist/schema/call/reward.d.ts +55 -55
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +238 -238
- package/dist/schema/call/treasury.d.ts +93 -93
- package/dist/schema/config/index.d.ts +178 -5
- package/dist/schema/config/index.js +52 -1
- package/dist/schema/local/index.d.ts +3554 -836
- package/dist/schema/local/index.js +2 -1
- package/dist/schema/messenger/index.d.ts +162 -162
- package/dist/schema/operations.d.ts +1102 -1118
- package/dist/schema/operations.js +7 -1
- package/dist/schema/project/index.d.ts +1392 -6
- package/dist/schema/project/index.js +426 -2
- package/dist/schema/query/index.d.ts +818 -818
- package/dist/schema/query/index.js +15 -9
- package/dist/schema/schema-query/index.d.ts +23 -3
- package/dist/schema/schema-query/index.js +13 -2
- package/dist/schema/sync-layer4.d.ts +21 -0
- package/dist/schema/sync-layer4.js +261 -0
- package/dist/schema/trust/index.d.ts +26 -26
- package/dist/schema/utils/guard-query-utils.d.ts +7 -0
- package/dist/schema/utils/guard-query-utils.js +14 -1
- package/dist/schemas/account_operation.output.json +718 -0
- package/dist/schemas/bridge_operation.output.json +1 -1
- package/dist/schemas/config_operation.output.json +173 -0
- package/dist/schemas/index.json +9 -1
- package/dist/schemas/local_info_operation.output.json +718 -0
- package/dist/schemas/local_mark_operation.output.json +718 -0
- package/dist/schemas/messenger_operation.output.json +1 -1
- package/dist/schemas/onchain_events.output.json +1 -1
- package/dist/schemas/onchain_operations.output.json +5 -4
- package/dist/schemas/onchain_operations.schema.json +1813 -333
- package/dist/schemas/onchain_operations_allocation.schema.json +9 -11
- package/dist/schemas/onchain_operations_arbitration.schema.json +2 -1
- package/dist/schemas/onchain_operations_contact.schema.json +2 -1
- package/dist/schemas/onchain_operations_demand.schema.json +2 -1
- package/dist/schemas/onchain_operations_gen_passport.schema.json +878 -872
- package/dist/schemas/onchain_operations_gen_proof.schema.json +273 -0
- package/dist/schemas/onchain_operations_guard.schema.json +584 -70
- package/dist/schemas/onchain_operations_machine.schema.json +4 -6
- package/dist/schemas/onchain_operations_order.schema.json +13 -9
- package/dist/schemas/onchain_operations_payment.schema.json +2 -1
- package/dist/schemas/onchain_operations_permission.schema.json +2 -1
- package/dist/schemas/onchain_operations_personal.schema.json +2 -1
- package/dist/schemas/onchain_operations_progress.schema.json +14 -10
- package/dist/schemas/onchain_operations_proof.schema.json +699 -0
- package/dist/schemas/onchain_operations_repository.schema.json +2 -1
- package/dist/schemas/onchain_operations_reward.schema.json +2 -1
- package/dist/schemas/onchain_operations_service.schema.json +4 -6
- package/dist/schemas/onchain_operations_treasury.schema.json +2 -1
- package/dist/schemas/onchain_table_data.output.json +6 -12
- package/dist/schemas/onchain_table_data.schema.json +32 -1
- package/dist/schemas/project_operation.output.json +879 -0
- package/dist/schemas/project_operation.schema.json +473 -2
- package/dist/schemas/query_toolkit.output.json +14906 -6
- package/dist/schemas/schema_query.output.json +38 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/tools/handlers/bridge.d.ts +1 -0
- package/dist/tools/handlers/bridge.js +1 -0
- package/dist/tools/handlers/config.d.ts +2 -0
- package/dist/tools/handlers/config.js +74 -0
- package/dist/tools/handlers/file-export.d.ts +3 -0
- package/dist/tools/handlers/file-export.js +90 -0
- package/dist/tools/handlers/local.d.ts +3 -0
- package/dist/tools/handlers/local.js +38 -0
- package/dist/tools/handlers/messenger.d.ts +16 -0
- package/dist/tools/handlers/messenger.js +188 -0
- package/dist/tools/handlers/onchain.d.ts +2 -0
- package/dist/tools/handlers/onchain.js +248 -0
- package/dist/tools/handlers/project.d.ts +2 -0
- package/dist/tools/handlers/project.js +293 -0
- package/dist/tools/handlers/query.d.ts +5 -0
- package/dist/tools/handlers/query.js +256 -0
- package/dist/tools/handlers/schema-query.d.ts +2 -0
- package/dist/tools/handlers/schema-query.js +93 -0
- package/dist/tools/handlers/trust.d.ts +2 -0
- package/dist/tools/handlers/trust.js +194 -0
- package/dist/tools/handlers/wip.d.ts +2 -0
- package/dist/tools/handlers/wip.js +44 -0
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.js +526 -0
- package/dist/tools/rules-hook.d.ts +2 -0
- package/dist/tools/rules-hook.js +23 -0
- package/dist/tools/shared.d.ts +20 -0
- package/dist/tools/shared.js +130 -0
- package/dist/tools/types.d.ts +35 -0
- package/dist/tools/types.js +1 -0
- package/dist/tools/wrap.d.ts +14 -0
- package/dist/tools/wrap.js +267 -0
- package/package.json +20 -6
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { confirmGate } from "../safety/confirm-gate.js";
|
|
2
|
+
import { renderPreview } from "../safety/preview.js";
|
|
3
|
+
import { validateOperation, hasBlockingViolations, getWarningViolations, } from "../knowledge/index.js";
|
|
4
|
+
import { getHarness } from "../harness/index.js";
|
|
5
|
+
import { isEnabled as isRuntimeEnabled } from "../config/index.js";
|
|
6
|
+
import { classifyError, buildDataSemantic, } from "../schema/call/semantic.js";
|
|
7
|
+
import { strictParse } from "../schema/index.js";
|
|
8
|
+
export function withHarness(base, operation, intent) {
|
|
9
|
+
if (!isRuntimeEnabled("harness"))
|
|
10
|
+
return base;
|
|
11
|
+
try {
|
|
12
|
+
const harness = getHarness();
|
|
13
|
+
const expected = harness.expect(operation, intent, base.operation_type, base.data);
|
|
14
|
+
return {
|
|
15
|
+
...base,
|
|
16
|
+
harness,
|
|
17
|
+
expected,
|
|
18
|
+
operation_id: `${base.operation_type}_${Date.now()}`,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return base;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export function wrapLocalHandler(config) {
|
|
26
|
+
const { schema, operationFn, parseLabel, buildContext } = config;
|
|
27
|
+
return async (args) => {
|
|
28
|
+
let validated;
|
|
29
|
+
try {
|
|
30
|
+
validated = strictParse(schema, args, parseLabel);
|
|
31
|
+
const result = await operationFn(validated);
|
|
32
|
+
const ctx = buildContext(validated);
|
|
33
|
+
return {
|
|
34
|
+
content: [{ type: "text", text: JSON.stringify(result) }],
|
|
35
|
+
structuredContent: {
|
|
36
|
+
result: {
|
|
37
|
+
status: "success",
|
|
38
|
+
data: result,
|
|
39
|
+
},
|
|
40
|
+
semantic: buildDataSemantic(result, ctx),
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
46
|
+
const ctx = validated ? buildContext(validated) : undefined;
|
|
47
|
+
const classified = classifyError(errorMessage);
|
|
48
|
+
const errorResult = {
|
|
49
|
+
status: "error",
|
|
50
|
+
error: errorMessage,
|
|
51
|
+
};
|
|
52
|
+
if (classified.error_code !== undefined)
|
|
53
|
+
errorResult.error_code = classified.error_code;
|
|
54
|
+
if (classified.retryable !== undefined)
|
|
55
|
+
errorResult.retryable = classified.retryable;
|
|
56
|
+
if (classified.recovery_hint !== undefined)
|
|
57
|
+
errorResult.recovery_hint = classified.recovery_hint;
|
|
58
|
+
return {
|
|
59
|
+
content: [{ type: "text", text: `Error: ${errorMessage}` }],
|
|
60
|
+
structuredContent: {
|
|
61
|
+
result: errorResult,
|
|
62
|
+
semantic: buildDataSemantic(undefined, ctx, true, errorMessage),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export function buildPendingConfirmation(operation_type, data, env) {
|
|
69
|
+
const gate = confirmGate(operation_type, data, env, env?.user_intent_phrases);
|
|
70
|
+
if (gate.pass)
|
|
71
|
+
return { content: [], structuredContent: null };
|
|
72
|
+
const preview = gate.preview;
|
|
73
|
+
const rendered = renderPreview(preview);
|
|
74
|
+
const output = {
|
|
75
|
+
message: rendered,
|
|
76
|
+
result: {
|
|
77
|
+
type: "pending_confirmation",
|
|
78
|
+
preview,
|
|
79
|
+
rule_id: gate.rule_id,
|
|
80
|
+
},
|
|
81
|
+
semantic: {
|
|
82
|
+
intent: `${operation_type}_awaiting_confirmation`,
|
|
83
|
+
status: "pending_input",
|
|
84
|
+
summary: `Operation blocked by ConfirmGate (${gate.level}). Review the preview and re-call with env.confirmed=true to proceed.`,
|
|
85
|
+
next_actions: [
|
|
86
|
+
{
|
|
87
|
+
action: "confirm: re-call the SAME operation with env.confirmed=true",
|
|
88
|
+
reason: `ConfirmGate rule '${gate.rule_id}' matched. The operation was NOT executed.`,
|
|
89
|
+
tool: "onchain_operations",
|
|
90
|
+
priority: "required",
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
warnings: preview.warnings ?? [],
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
return {
|
|
97
|
+
content: [{ type: "text", text: rendered }],
|
|
98
|
+
structuredContent: output,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
export function buildConstraintError(operation_type, violations) {
|
|
102
|
+
const errors = violations.filter((v) => v.severity === "error");
|
|
103
|
+
const errorList = errors.map((v) => ` • [${v.field}] ${v.message}`).join("\n");
|
|
104
|
+
const message = `Pre-call constraint violations for '${operation_type}':\n${errorList}\n\nFix the listed field(s) and retry.`;
|
|
105
|
+
const output = {
|
|
106
|
+
message,
|
|
107
|
+
result: {
|
|
108
|
+
type: "error",
|
|
109
|
+
error: message,
|
|
110
|
+
error_code: "invalid_parameter",
|
|
111
|
+
retryable: false,
|
|
112
|
+
recovery_hint: "Review the constraint violations above and correct the corresponding fields.",
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
return {
|
|
116
|
+
content: [{ type: "text", text: message }],
|
|
117
|
+
structuredContent: output,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
export function buildClassifiedErrorResult(base, error, classified) {
|
|
121
|
+
const result = { ...base, error };
|
|
122
|
+
if (classified.error_code !== undefined)
|
|
123
|
+
result.error_code = classified.error_code;
|
|
124
|
+
if (classified.retryable !== undefined)
|
|
125
|
+
result.retryable = classified.retryable;
|
|
126
|
+
if (classified.recovery_hint !== undefined)
|
|
127
|
+
result.recovery_hint = classified.recovery_hint;
|
|
128
|
+
return result;
|
|
129
|
+
}
|
|
130
|
+
export { validateOperation, hasBlockingViolations, getWarningViolations, };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { classifyError } from "../schema/call/semantic.js";
|
|
3
|
+
import type { SemanticContext } from "../schema/call/semantic.js";
|
|
4
|
+
export interface ToolConfig {
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: z.ZodTypeAny;
|
|
8
|
+
outputSchema?: z.ZodTypeAny;
|
|
9
|
+
annotations?: {
|
|
10
|
+
readOnlyHint?: boolean;
|
|
11
|
+
destructiveHint?: boolean;
|
|
12
|
+
idempotentHint?: boolean;
|
|
13
|
+
openWorldHint?: boolean;
|
|
14
|
+
};
|
|
15
|
+
_meta?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export type ErrorShapeBuilder = (error: string, classified: ReturnType<typeof classifyError>, ctx: SemanticContext) => Record<string, unknown>;
|
|
18
|
+
export interface ToolDispatchResult {
|
|
19
|
+
content: {
|
|
20
|
+
type: "text";
|
|
21
|
+
text: string;
|
|
22
|
+
}[];
|
|
23
|
+
structuredContent: Record<string, unknown> | undefined;
|
|
24
|
+
}
|
|
25
|
+
export interface ToolEntry {
|
|
26
|
+
name: string;
|
|
27
|
+
handler: (args: unknown) => Promise<ToolDispatchResult>;
|
|
28
|
+
config: ToolConfig;
|
|
29
|
+
errorShapeBuilder?: ErrorShapeBuilder;
|
|
30
|
+
timeoutMs?: number;
|
|
31
|
+
applyRules?: (args: unknown) => ToolDispatchResult | null;
|
|
32
|
+
}
|
|
33
|
+
export interface DispatchOptions {
|
|
34
|
+
skipRules?: boolean;
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ErrorShapeBuilder, ToolDispatchResult } from "./types.js";
|
|
2
|
+
export declare function withTimeout<T>(promise: Promise<T>, timeoutMs?: number, operationName?: string): Promise<T>;
|
|
3
|
+
export declare function wrapHandlerWithErrorShape(handler: (args: unknown) => Promise<ToolDispatchResult>, timeoutMs: number, toolName: string, errorShapeBuilder?: ErrorShapeBuilder): (args: unknown) => Promise<ToolDispatchResult>;
|
|
4
|
+
export declare const statusErrorShape: ErrorShapeBuilder;
|
|
5
|
+
export declare const operationErrorShape: ErrorShapeBuilder;
|
|
6
|
+
export declare const strictStatusErrorShape: ErrorShapeBuilder;
|
|
7
|
+
export type HarnessHookPhase = "pre_call" | "post_call" | "pre_publish" | "pre_sign";
|
|
8
|
+
export interface HarnessHookContext {
|
|
9
|
+
toolName: string;
|
|
10
|
+
args: unknown;
|
|
11
|
+
result?: ToolDispatchResult;
|
|
12
|
+
error?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare function dispatchWithHarness(handler: (args: unknown) => Promise<ToolDispatchResult>, toolName: string): (args: unknown) => Promise<ToolDispatchResult>;
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { classifyError, buildDataSemantic, } from "../schema/call/semantic.js";
|
|
2
|
+
import { buildClassifiedErrorResult } from "./shared.js";
|
|
3
|
+
import { shouldRunLightHooks, shouldRunHeavyHooks, recordOperationFailure, } from "../harness/auto-escalation.js";
|
|
4
|
+
import { getHarness } from "../harness/index.js";
|
|
5
|
+
import { recordOperationOutcome } from "../experience/index.js";
|
|
6
|
+
import { recordIndustrySignal } from "../knowledge/flywheel-loop.js";
|
|
7
|
+
export function withTimeout(promise, timeoutMs = 30000, operationName = "operation") {
|
|
8
|
+
let timer;
|
|
9
|
+
return Promise.race([
|
|
10
|
+
promise.finally(() => {
|
|
11
|
+
if (timer)
|
|
12
|
+
clearTimeout(timer);
|
|
13
|
+
}),
|
|
14
|
+
new Promise((_, reject) => {
|
|
15
|
+
timer = setTimeout(() => {
|
|
16
|
+
let hint = "";
|
|
17
|
+
if (operationName.includes("messenger")) {
|
|
18
|
+
hint = " This is a messenger network operation. Possible causes: " +
|
|
19
|
+
"(1) messenger server (https://messenger.wowok.net) unreachable, " +
|
|
20
|
+
"(2) no messenger-enabled account configured (use account_operation to set messenger name), " +
|
|
21
|
+
"(3) network connectivity issue. " +
|
|
22
|
+
"Ensure you have a messenger-enabled account and the server is reachable.";
|
|
23
|
+
}
|
|
24
|
+
reject(new Error(`Operation '${operationName}' timed out after ${timeoutMs}ms.${hint}`));
|
|
25
|
+
}, timeoutMs);
|
|
26
|
+
}),
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
export function wrapHandlerWithErrorShape(handler, timeoutMs, toolName, errorShapeBuilder) {
|
|
30
|
+
return async (args) => {
|
|
31
|
+
try {
|
|
32
|
+
return await withTimeout(handler(args), timeoutMs, toolName);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (errorShapeBuilder) {
|
|
36
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
37
|
+
const classified = classifyError(errorMessage);
|
|
38
|
+
const ctx = { operation_type: toolName, data: args };
|
|
39
|
+
const structuredContent = errorShapeBuilder(errorMessage, classified, ctx);
|
|
40
|
+
return {
|
|
41
|
+
content: [{ type: "text", text: `Error: ${errorMessage}` }],
|
|
42
|
+
structuredContent,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export const statusErrorShape = (error, classified, ctx) => ({
|
|
50
|
+
result: buildClassifiedErrorResult({ status: "error" }, error, classified),
|
|
51
|
+
semantic: buildDataSemantic(undefined, ctx, true, error),
|
|
52
|
+
});
|
|
53
|
+
export const operationErrorShape = (error, classified, ctx) => ({
|
|
54
|
+
result: buildClassifiedErrorResult({ operation: "error" }, error, classified),
|
|
55
|
+
semantic: buildDataSemantic(undefined, ctx, true, error),
|
|
56
|
+
});
|
|
57
|
+
export const strictStatusErrorShape = (error, _classified, _ctx) => ({
|
|
58
|
+
result: { status: "error", error },
|
|
59
|
+
});
|
|
60
|
+
export function dispatchWithHarness(handler, toolName) {
|
|
61
|
+
return async (args) => {
|
|
62
|
+
const harnessWarnings = [];
|
|
63
|
+
const harness = getHarness();
|
|
64
|
+
const runLight = shouldRunLightHooks();
|
|
65
|
+
const runHeavy = shouldRunHeavyHooks();
|
|
66
|
+
const isPublishOp = runHeavy && isPublishOperation(toolName, args);
|
|
67
|
+
const isSignOp = runHeavy && isSignOperation(toolName, args);
|
|
68
|
+
let expectedResult;
|
|
69
|
+
if (runLight) {
|
|
70
|
+
try {
|
|
71
|
+
const operationType = extractOperationType(toolName, args);
|
|
72
|
+
const intent = extractIntent(toolName, args);
|
|
73
|
+
if (operationType && intent) {
|
|
74
|
+
expectedResult = harness.expect(toolName, intent, operationType, extractData(args));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
harnessWarnings.push(`pre_call hook failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (isPublishOp) {
|
|
82
|
+
try {
|
|
83
|
+
harnessWarnings.push("pre_publish: full-tier check engaged");
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
harnessWarnings.push(`pre_publish hook failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (isSignOp) {
|
|
90
|
+
try {
|
|
91
|
+
harnessWarnings.push("pre_sign: full-tier check engaged");
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
harnessWarnings.push(`pre_sign hook failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
let result;
|
|
98
|
+
try {
|
|
99
|
+
result = await handler(args);
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
const errorCode = e instanceof Error ? e.message : String(e);
|
|
103
|
+
const escalation = recordOperationFailure(toolName, errorCode);
|
|
104
|
+
if (escalation) {
|
|
105
|
+
harnessWarnings.push(`Harness escalated to full tier: ${escalation.reason}`);
|
|
106
|
+
}
|
|
107
|
+
throw e;
|
|
108
|
+
}
|
|
109
|
+
if (runLight && expectedResult) {
|
|
110
|
+
try {
|
|
111
|
+
if (result?.structuredContent) {
|
|
112
|
+
const verifyInput = buildVerifyInput(expectedResult, result);
|
|
113
|
+
const report = harness.verify(verifyInput);
|
|
114
|
+
if (report.status === "fail") {
|
|
115
|
+
harnessWarnings.push(`Harness verify FAIL: ${report.summary}`);
|
|
116
|
+
}
|
|
117
|
+
else if (report.status === "warn") {
|
|
118
|
+
harnessWarnings.push(`Harness verify WARN: ${report.summary}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
catch (e) {
|
|
123
|
+
harnessWarnings.push(`post_call hook failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (isWriteClassTool(toolName)) {
|
|
127
|
+
try {
|
|
128
|
+
const operationType = extractOperationType(toolName, args) ?? toolName;
|
|
129
|
+
const intent = extractIntent(toolName, args) ?? toolName;
|
|
130
|
+
const data = extractData(args) ?? args;
|
|
131
|
+
const outcome = classifyOutcome(result);
|
|
132
|
+
const errorCode = extractErrorCode(result);
|
|
133
|
+
const industry = extractIndustry(args) ?? "general";
|
|
134
|
+
recordOperationOutcome(operationType, data, intent, outcome, errorCode);
|
|
135
|
+
recordIndustrySignal(industry, { type: operationType }, {
|
|
136
|
+
success: outcome === "success",
|
|
137
|
+
error_code: errorCode,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
catch (e) {
|
|
141
|
+
harnessWarnings.push(`signal collection failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (harnessWarnings.length > 0 && result?.structuredContent) {
|
|
145
|
+
const sc = result.structuredContent;
|
|
146
|
+
const semantic = sc.semantic;
|
|
147
|
+
if (semantic) {
|
|
148
|
+
const existing = Array.isArray(semantic.harness_warnings) ? semantic.harness_warnings : [];
|
|
149
|
+
semantic.harness_warnings = [...existing, ...harnessWarnings];
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
sc.harness_warnings = harnessWarnings;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return result;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function isPublishOperation(toolName, args) {
|
|
159
|
+
if (toolName !== "onchain_operations")
|
|
160
|
+
return false;
|
|
161
|
+
const opType = extractOperationType(toolName, args);
|
|
162
|
+
return opType === "service" || opType === "machine";
|
|
163
|
+
}
|
|
164
|
+
function isSignOperation(toolName, args) {
|
|
165
|
+
if (toolName === "wip_file") {
|
|
166
|
+
const data = args?.operation_type;
|
|
167
|
+
return data === "sign";
|
|
168
|
+
}
|
|
169
|
+
return toolName === "onchain_operations";
|
|
170
|
+
}
|
|
171
|
+
function extractOperationType(toolName, args) {
|
|
172
|
+
if (!args || typeof args !== "object")
|
|
173
|
+
return undefined;
|
|
174
|
+
const obj = args;
|
|
175
|
+
if (toolName === "onchain_operations") {
|
|
176
|
+
return typeof obj.operation_type === "string" ? obj.operation_type : undefined;
|
|
177
|
+
}
|
|
178
|
+
if (toolName === "project_operation") {
|
|
179
|
+
return typeof obj.action === "string" ? obj.action : undefined;
|
|
180
|
+
}
|
|
181
|
+
return typeof obj.operation_type === "string" ? obj.operation_type : undefined;
|
|
182
|
+
}
|
|
183
|
+
function extractIntent(toolName, args) {
|
|
184
|
+
if (!args || typeof args !== "object")
|
|
185
|
+
return undefined;
|
|
186
|
+
const obj = args;
|
|
187
|
+
if (toolName === "project_operation" && typeof obj.action === "string") {
|
|
188
|
+
return `project:${obj.action}`;
|
|
189
|
+
}
|
|
190
|
+
const opType = obj.operation_type;
|
|
191
|
+
if (typeof opType === "string")
|
|
192
|
+
return `${toolName}:${opType}`;
|
|
193
|
+
return toolName;
|
|
194
|
+
}
|
|
195
|
+
function extractData(args) {
|
|
196
|
+
if (!args || typeof args !== "object")
|
|
197
|
+
return undefined;
|
|
198
|
+
const obj = args;
|
|
199
|
+
const data = obj.data;
|
|
200
|
+
return data && typeof data === "object" ? data : undefined;
|
|
201
|
+
}
|
|
202
|
+
function buildVerifyInput(expected, result) {
|
|
203
|
+
const sc = (result.structuredContent ?? {});
|
|
204
|
+
const semantic = sc.semantic;
|
|
205
|
+
return {
|
|
206
|
+
expected,
|
|
207
|
+
actual: {
|
|
208
|
+
result_type: typeof sc.result_type === "string" ? sc.result_type : undefined,
|
|
209
|
+
semantic,
|
|
210
|
+
error_code: typeof sc.error_code === "string" ? sc.error_code : undefined,
|
|
211
|
+
error: typeof sc.error === "string" ? sc.error : undefined,
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
const WRITE_CLASS_TOOLS = new Set([
|
|
216
|
+
"onchain_operations",
|
|
217
|
+
"project_operation",
|
|
218
|
+
"wip_file",
|
|
219
|
+
"messenger_operation",
|
|
220
|
+
"bridge_operation",
|
|
221
|
+
]);
|
|
222
|
+
function isWriteClassTool(toolName) {
|
|
223
|
+
return WRITE_CLASS_TOOLS.has(toolName);
|
|
224
|
+
}
|
|
225
|
+
function classifyOutcome(result) {
|
|
226
|
+
if (!result?.structuredContent)
|
|
227
|
+
return "failed";
|
|
228
|
+
const sc = result.structuredContent;
|
|
229
|
+
const status = typeof sc.status === "string" ? sc.status
|
|
230
|
+
: typeof sc.result_type === "string" ? sc.result_type
|
|
231
|
+
: "";
|
|
232
|
+
if (status === "error" || status === "failed")
|
|
233
|
+
return "failed";
|
|
234
|
+
if (status === "partial")
|
|
235
|
+
return "partial";
|
|
236
|
+
return "success";
|
|
237
|
+
}
|
|
238
|
+
function extractErrorCode(result) {
|
|
239
|
+
if (!result?.structuredContent)
|
|
240
|
+
return undefined;
|
|
241
|
+
const sc = result.structuredContent;
|
|
242
|
+
if (typeof sc.error_code === "string")
|
|
243
|
+
return sc.error_code;
|
|
244
|
+
const err = sc.error;
|
|
245
|
+
if (typeof err === "string")
|
|
246
|
+
return err;
|
|
247
|
+
if (err && typeof err === "object") {
|
|
248
|
+
const code = err.code;
|
|
249
|
+
if (typeof code === "string")
|
|
250
|
+
return code;
|
|
251
|
+
}
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
function extractIndustry(args) {
|
|
255
|
+
if (!args || typeof args !== "object")
|
|
256
|
+
return undefined;
|
|
257
|
+
const obj = args;
|
|
258
|
+
if (typeof obj.industry === "string")
|
|
259
|
+
return obj.industry;
|
|
260
|
+
const data = obj.data;
|
|
261
|
+
if (data && typeof data === "object") {
|
|
262
|
+
const d = data;
|
|
263
|
+
if (typeof d.industry === "string")
|
|
264
|
+
return d.industry;
|
|
265
|
+
}
|
|
266
|
+
return undefined;
|
|
267
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wowok/agent-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"module": "node",
|
|
8
8
|
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./rules": {
|
|
15
|
+
"types": "./dist/rules.d.ts",
|
|
16
|
+
"import": "./dist/rules.js"
|
|
17
|
+
},
|
|
18
|
+
"./tools": {
|
|
19
|
+
"types": "./dist/tools/index.d.ts",
|
|
20
|
+
"import": "./dist/tools/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
9
23
|
"repository": {
|
|
10
24
|
"type": "git",
|
|
11
25
|
"url": "https://github.com/wowok-ai/agent.git"
|
|
@@ -36,23 +50,23 @@
|
|
|
36
50
|
"license": "Apache-2.0",
|
|
37
51
|
"dependencies": {
|
|
38
52
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
39
|
-
"@wowok/wowok": "2.
|
|
53
|
+
"@wowok/wowok": "2.5.0",
|
|
40
54
|
"lodash": "^4.18.1",
|
|
41
|
-
"zod": "^3.25.76"
|
|
55
|
+
"zod": "^3.25.76",
|
|
56
|
+
"zod-to-json-schema": "^3.25.2"
|
|
42
57
|
},
|
|
43
58
|
"devDependencies": {
|
|
44
59
|
"@types/node": "^22.19.19",
|
|
45
60
|
"tsx": "^4.21.0",
|
|
46
61
|
"typescript": "^5.8.2",
|
|
47
|
-
"vitest": "^2.1.0"
|
|
48
|
-
"zod-to-json-schema": "^3.25.2"
|
|
62
|
+
"vitest": "^2.1.0"
|
|
49
63
|
},
|
|
50
64
|
"scripts": {
|
|
51
65
|
"clean": "rm -rf dist",
|
|
52
66
|
"build": "tsc && pnpm generate:schemas",
|
|
53
67
|
"watch": "tsc --watch",
|
|
54
68
|
"start": "tsx src/index.ts",
|
|
55
|
-
"generate:schemas": "tsx scripts/generate-json-schemas.ts",
|
|
69
|
+
"generate:schemas": "node --max-old-space-size=4096 --import tsx/esm scripts/generate-json-schemas.ts",
|
|
56
70
|
"test": "vitest run",
|
|
57
71
|
"test:watch": "vitest"
|
|
58
72
|
}
|