@wowok/agent-mcp 2.6.0 → 2.6.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 +5 -3
- package/dist/customer/info-puzzle.d.ts +1 -1
- package/dist/customer/info-puzzle.js +4 -2
- package/dist/customer/risk-assessment.js +26 -4
- package/dist/customer/types.d.ts +2 -0
- package/dist/examples/guard-template-balance-check.json +38 -0
- package/dist/examples/guard-template-time-lock.json +39 -0
- package/dist/examples/machine-template-7node-rental.json +114 -0
- package/dist/examples/rental-ziroom-machine-create.json +137 -0
- package/dist/examples/rental-ziroom-permission-create.json +35 -0
- package/dist/examples/rental-ziroom-service-create.json +80 -0
- package/dist/examples/retail-myshop-service-create.json +88 -0
- package/dist/extensions/capability-manifest.d.ts +125 -0
- package/dist/extensions/capability-manifest.js +594 -0
- package/dist/extensions/constraint-registry.d.ts +24 -0
- package/dist/extensions/constraint-registry.js +196 -0
- package/dist/extensions/index.d.ts +12 -0
- package/dist/extensions/index.js +6 -0
- package/dist/extensions/metric-registry.d.ts +26 -0
- package/dist/extensions/metric-registry.js +257 -0
- package/dist/extensions/mode-evaluator.d.ts +15 -0
- package/dist/extensions/mode-evaluator.js +170 -0
- package/dist/extensions/modes.d.ts +2 -0
- package/dist/extensions/modes.js +493 -0
- package/dist/extensions/registry.d.ts +50 -0
- package/dist/extensions/registry.js +662 -0
- package/dist/extensions/types.d.ts +219 -0
- package/dist/extensions/types.js +1 -0
- package/dist/index.js +50 -0
- package/dist/knowledge/deployment-scanner.d.ts +3 -0
- package/dist/knowledge/deployment-scanner.js +64 -3
- package/dist/knowledge/fund-layer.d.ts +72 -0
- package/dist/knowledge/fund-layer.js +420 -0
- package/dist/knowledge/guard-render.d.ts +57 -0
- package/dist/knowledge/guard-render.js +700 -0
- package/dist/knowledge/guard-risk.d.ts +13 -0
- package/dist/knowledge/guard-risk.js +57 -0
- package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
- package/dist/knowledge/guard-submission-prompt.js +171 -0
- package/dist/knowledge/guard-templates.js +278 -0
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-render.d.ts +41 -0
- package/dist/knowledge/machine-render.js +565 -0
- package/dist/knowledge/machine-templates.js +24 -5
- package/dist/knowledge/reward-confirm.js +2 -2
- package/dist/knowledge/reward-puzzle.js +1 -1
- package/dist/knowledge/reward-risk.js +9 -9
- package/dist/knowledge/reward-templates.js +2 -2
- package/dist/knowledge/service-confirm.d.ts +15 -6
- package/dist/knowledge/service-confirm.js +119 -11
- package/dist/knowledge/service-context.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-risk.d.ts +1 -1
- package/dist/knowledge/service-risk.js +3 -3
- package/dist/knowledge/service-templates.js +2 -2
- package/dist/knowledge/service-translation.d.ts +1 -1
- package/dist/knowledge/service-translation.js +7 -7
- package/dist/knowledge/tool-constraints.js +6 -2
- package/dist/project/deployment-bridge.d.ts +1 -1
- package/dist/project/deployment-bridge.js +31 -7
- package/dist/project/deployment-doc.d.ts +3 -0
- package/dist/project/deployment-doc.js +76 -14
- package/dist/project/edit-planner.d.ts +123 -0
- package/dist/project/edit-planner.js +1371 -0
- package/dist/project/evaluation.d.ts +2 -0
- package/dist/project/evaluation.js +873 -88
- package/dist/project/graph-builder.d.ts +4 -1
- package/dist/project/graph-builder.js +132 -62
- package/dist/project/graph.d.ts +1 -0
- package/dist/project/handlers.d.ts +317 -6
- package/dist/project/handlers.js +1171 -19
- package/dist/project/stage-gate.d.ts +4 -0
- package/dist/project/stage-gate.js +64 -5
- package/dist/project/task-tracker.d.ts +26 -0
- package/dist/project/task-tracker.js +78 -0
- package/dist/safety/preview.js +16 -0
- package/dist/schema/call/allocation.d.ts +16 -16
- package/dist/schema/call/allocation.js +2 -2
- package/dist/schema/call/arbitration.js +19 -6
- package/dist/schema/call/base.d.ts +21 -13
- package/dist/schema/call/base.js +27 -6
- package/dist/schema/call/bridge.d.ts +5 -5
- package/dist/schema/call/bridge.js +3 -1
- package/dist/schema/call/contact.js +2 -2
- package/dist/schema/call/demand.d.ts +23 -31
- package/dist/schema/call/demand.js +2 -2
- package/dist/schema/call/guard.js +2 -2
- package/dist/schema/call/machine.d.ts +1976 -752
- package/dist/schema/call/machine.js +50 -4
- package/dist/schema/call/order.d.ts +149 -228
- package/dist/schema/call/order.js +4 -3
- package/dist/schema/call/payment.d.ts +183 -3
- package/dist/schema/call/payment.js +21 -3
- package/dist/schema/call/permission.js +2 -2
- package/dist/schema/call/personal.d.ts +241 -52
- package/dist/schema/call/progress.d.ts +53 -61
- package/dist/schema/call/progress.js +18 -4
- package/dist/schema/call/repository.d.ts +23 -31
- package/dist/schema/call/repository.js +2 -2
- package/dist/schema/call/reward.js +3 -3
- package/dist/schema/call/semantic.d.ts +1 -1
- package/dist/schema/call/semantic.js +37 -2
- package/dist/schema/call/service.d.ts +275 -127
- package/dist/schema/call/service.js +89 -13
- package/dist/schema/call/treasury.js +3 -3
- package/dist/schema/common/index.d.ts +13 -2
- package/dist/schema/common/index.js +80 -15
- package/dist/schema/local/index.d.ts +32 -35
- package/dist/schema/local/index.js +28 -6
- package/dist/schema/messenger/index.d.ts +274 -46
- package/dist/schema/operations.d.ts +1264 -544
- package/dist/schema/operations.js +65 -7
- package/dist/schema/project/index.d.ts +2846 -167
- package/dist/schema/project/index.js +570 -16
- package/dist/schema/query/index.d.ts +922 -349
- package/dist/schema/query/index.js +205 -42
- package/dist/schema/schema-query/index.d.ts +65 -3
- package/dist/schema/schema-query/index.js +38 -5
- package/dist/schema/utils/node-parser.js +20 -4
- package/dist/schema/utils/object-type-utils.d.ts +12 -0
- package/dist/schema/utils/object-type-utils.js +35 -0
- package/dist/schema/utils/permission-machine-check.d.ts +49 -0
- package/dist/schema/utils/permission-machine-check.js +121 -0
- package/dist/schema/utils/skills-recommendation.d.ts +2 -0
- package/dist/schema/utils/skills-recommendation.js +76 -0
- package/dist/schema-query/index.d.ts +20 -1
- package/dist/schema-query/index.js +306 -4
- package/dist/schemas/account_operation.output.json +7 -1
- package/dist/schemas/account_operation.schema.json +3 -3
- package/dist/schemas/bridge_operation.output.json +6 -0
- package/dist/schemas/bridge_operation.schema.json +1 -1
- package/dist/schemas/guard-templates.json +379 -0
- package/dist/schemas/guard2file.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/local_info_operation.output.json +6 -0
- package/dist/schemas/local_mark_operation.output.json +7 -1
- package/dist/schemas/local_mark_operation.schema.json +1 -1
- package/dist/schemas/machineNode2file.schema.json +1 -1
- package/dist/schemas/messenger_operation.schema.json +4 -4
- package/dist/schemas/onchain_events.output.json +1 -1
- package/dist/schemas/onchain_operations.output.json +2820 -0
- package/dist/schemas/onchain_operations.schema.json +444 -330
- package/dist/schemas/onchain_operations_allocation.schema.json +37 -28
- package/dist/schemas/onchain_operations_arbitration.schema.json +16 -14
- package/dist/schemas/onchain_operations_contact.schema.json +10 -10
- package/dist/schemas/onchain_operations_demand.schema.json +10 -10
- package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -16
- package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
- package/dist/schemas/onchain_operations_guard.schema.json +2 -2
- package/dist/schemas/onchain_operations_machine.schema.json +43 -35
- package/dist/schemas/onchain_operations_order.schema.json +72 -78
- package/dist/schemas/onchain_operations_payment.schema.json +141 -111
- package/dist/schemas/onchain_operations_permission.schema.json +3 -3
- package/dist/schemas/onchain_operations_personal.schema.json +7 -7
- package/dist/schemas/onchain_operations_progress.schema.json +9 -9
- package/dist/schemas/onchain_operations_proof.schema.json +8 -8
- package/dist/schemas/onchain_operations_repository.schema.json +10 -10
- package/dist/schemas/onchain_operations_reward.schema.json +14 -14
- package/dist/schemas/onchain_operations_service.schema.json +119 -48
- package/dist/schemas/onchain_operations_treasury.schema.json +11 -11
- package/dist/schemas/onchain_table_data.output.json +33 -25
- package/dist/schemas/onchain_table_data.schema.json +22 -21
- package/dist/schemas/project_operation.output.json +2194 -23
- package/dist/schemas/project_operation.schema.json +84 -6
- package/dist/schemas/query_toolkit.output.json +108 -80
- package/dist/schemas/query_toolkit.schema.json +12 -12
- package/dist/schemas/schema_query.output.json +70 -3
- package/dist/schemas/schema_query.schema.json +18 -3
- package/dist/schemas/wowok_buildin_info.output.json +81 -8
- package/dist/schemas/wowok_buildin_info.schema.json +46 -2
- package/dist/tools/handlers/local.js +20 -5
- package/dist/tools/handlers/onchain.js +594 -6
- package/dist/tools/handlers/project.js +76 -4
- package/dist/tools/handlers/query.js +27 -0
- package/dist/tools/handlers/schema-query.js +43 -1
- package/dist/tools/handlers/task-status.d.ts +170 -0
- package/dist/tools/handlers/task-status.js +55 -0
- package/dist/tools/handlers/wip.js +47 -1
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +387 -12
- package/dist/tools/retry.d.ts +8 -0
- package/dist/tools/retry.js +85 -0
- package/dist/tools/wip-deploy-assist.d.ts +28 -0
- package/dist/tools/wip-deploy-assist.js +278 -0
- package/package.json +2 -2
- package/dist/schemas/guard-node-examples.md +0 -199
|
@@ -9,7 +9,7 @@ export declare const ProgressNextSchema: z.ZodObject<{
|
|
|
9
9
|
forward: string;
|
|
10
10
|
next_node_name: string;
|
|
11
11
|
}>;
|
|
12
|
-
export declare const OperateSchema: z.ZodObject<{
|
|
12
|
+
export declare const OperateSchema: z.ZodEffects<z.ZodObject<{
|
|
13
13
|
operation: z.ZodObject<{
|
|
14
14
|
next_node_name: z.ZodEffects<z.ZodString, string, string>;
|
|
15
15
|
forward: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -36,11 +36,18 @@ export declare const OperateSchema: z.ZodObject<{
|
|
|
36
36
|
next_node_name: string;
|
|
37
37
|
};
|
|
38
38
|
message?: string | undefined;
|
|
39
|
-
}
|
|
39
|
+
}>, {
|
|
40
|
+
op: "next" | "hold" | "unhold" | "adminUnhold";
|
|
41
|
+
operation: {
|
|
42
|
+
forward: string;
|
|
43
|
+
next_node_name: string;
|
|
44
|
+
};
|
|
45
|
+
message?: string | undefined;
|
|
46
|
+
}, unknown>;
|
|
40
47
|
export declare const CallProgress_DataSchema: z.ZodObject<{
|
|
41
48
|
object: z.ZodEffects<z.ZodString, string, string>;
|
|
42
49
|
task: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
43
|
-
repository: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
50
|
+
repository: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
|
|
44
51
|
op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
|
|
45
52
|
objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
46
53
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -64,7 +71,15 @@ export declare const CallProgress_DataSchema: z.ZodObject<{
|
|
|
64
71
|
op: "clear";
|
|
65
72
|
}, {
|
|
66
73
|
op: "clear";
|
|
67
|
-
}>]
|
|
74
|
+
}>]>, {
|
|
75
|
+
op: "set" | "add";
|
|
76
|
+
objects: string[];
|
|
77
|
+
} | {
|
|
78
|
+
op: "remove";
|
|
79
|
+
objects: string[];
|
|
80
|
+
} | {
|
|
81
|
+
op: "clear";
|
|
82
|
+
}, unknown>>;
|
|
68
83
|
progress_namedOperator: z.ZodOptional<z.ZodObject<{
|
|
69
84
|
op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">, z.ZodLiteral<"remove">]>;
|
|
70
85
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -114,7 +129,7 @@ export declare const CallProgress_DataSchema: z.ZodObject<{
|
|
|
114
129
|
check_all_founded?: boolean | undefined;
|
|
115
130
|
};
|
|
116
131
|
}>>;
|
|
117
|
-
operate: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
operate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
118
133
|
operation: z.ZodObject<{
|
|
119
134
|
next_node_name: z.ZodEffects<z.ZodString, string, string>;
|
|
120
135
|
forward: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -141,7 +156,14 @@ export declare const CallProgress_DataSchema: z.ZodObject<{
|
|
|
141
156
|
next_node_name: string;
|
|
142
157
|
};
|
|
143
158
|
message?: string | undefined;
|
|
144
|
-
}
|
|
159
|
+
}>, {
|
|
160
|
+
op: "next" | "hold" | "unhold" | "adminUnhold";
|
|
161
|
+
operation: {
|
|
162
|
+
forward: string;
|
|
163
|
+
next_node_name: string;
|
|
164
|
+
};
|
|
165
|
+
message?: string | undefined;
|
|
166
|
+
}, unknown>>;
|
|
145
167
|
}, "strict", z.ZodTypeAny, {
|
|
146
168
|
object: string;
|
|
147
169
|
repository?: {
|
|
@@ -175,23 +197,8 @@ export declare const CallProgress_DataSchema: z.ZodObject<{
|
|
|
175
197
|
} | undefined;
|
|
176
198
|
}, {
|
|
177
199
|
object: string;
|
|
178
|
-
repository?:
|
|
179
|
-
|
|
180
|
-
objects: string[];
|
|
181
|
-
} | {
|
|
182
|
-
op: "remove";
|
|
183
|
-
objects: string[];
|
|
184
|
-
} | {
|
|
185
|
-
op: "clear";
|
|
186
|
-
} | undefined;
|
|
187
|
-
operate?: {
|
|
188
|
-
op: "next" | "hold" | "unhold" | "adminUnhold";
|
|
189
|
-
operation: {
|
|
190
|
-
forward: string;
|
|
191
|
-
next_node_name: string;
|
|
192
|
-
};
|
|
193
|
-
message?: string | undefined;
|
|
194
|
-
} | undefined;
|
|
200
|
+
repository?: unknown;
|
|
201
|
+
operate?: unknown;
|
|
195
202
|
task?: string | undefined;
|
|
196
203
|
progress_namedOperator?: {
|
|
197
204
|
name: string;
|
|
@@ -209,7 +216,7 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
209
216
|
data: z.ZodObject<{
|
|
210
217
|
object: z.ZodEffects<z.ZodString, string, string>;
|
|
211
218
|
task: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
212
|
-
repository: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
219
|
+
repository: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
|
|
213
220
|
op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
|
|
214
221
|
objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
215
222
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -233,7 +240,15 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
233
240
|
op: "clear";
|
|
234
241
|
}, {
|
|
235
242
|
op: "clear";
|
|
236
|
-
}>]
|
|
243
|
+
}>]>, {
|
|
244
|
+
op: "set" | "add";
|
|
245
|
+
objects: string[];
|
|
246
|
+
} | {
|
|
247
|
+
op: "remove";
|
|
248
|
+
objects: string[];
|
|
249
|
+
} | {
|
|
250
|
+
op: "clear";
|
|
251
|
+
}, unknown>>;
|
|
237
252
|
progress_namedOperator: z.ZodOptional<z.ZodObject<{
|
|
238
253
|
op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">, z.ZodLiteral<"remove">]>;
|
|
239
254
|
name: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -283,7 +298,7 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
283
298
|
check_all_founded?: boolean | undefined;
|
|
284
299
|
};
|
|
285
300
|
}>>;
|
|
286
|
-
operate: z.ZodOptional<z.ZodObject<{
|
|
301
|
+
operate: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
287
302
|
operation: z.ZodObject<{
|
|
288
303
|
next_node_name: z.ZodEffects<z.ZodString, string, string>;
|
|
289
304
|
forward: z.ZodEffects<z.ZodString, string, string>;
|
|
@@ -310,7 +325,14 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
310
325
|
next_node_name: string;
|
|
311
326
|
};
|
|
312
327
|
message?: string | undefined;
|
|
313
|
-
}
|
|
328
|
+
}>, {
|
|
329
|
+
op: "next" | "hold" | "unhold" | "adminUnhold";
|
|
330
|
+
operation: {
|
|
331
|
+
forward: string;
|
|
332
|
+
next_node_name: string;
|
|
333
|
+
};
|
|
334
|
+
message?: string | undefined;
|
|
335
|
+
}, unknown>>;
|
|
314
336
|
}, "strict", z.ZodTypeAny, {
|
|
315
337
|
object: string;
|
|
316
338
|
repository?: {
|
|
@@ -344,23 +366,8 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
344
366
|
} | undefined;
|
|
345
367
|
}, {
|
|
346
368
|
object: string;
|
|
347
|
-
repository?:
|
|
348
|
-
|
|
349
|
-
objects: string[];
|
|
350
|
-
} | {
|
|
351
|
-
op: "remove";
|
|
352
|
-
objects: string[];
|
|
353
|
-
} | {
|
|
354
|
-
op: "clear";
|
|
355
|
-
} | undefined;
|
|
356
|
-
operate?: {
|
|
357
|
-
op: "next" | "hold" | "unhold" | "adminUnhold";
|
|
358
|
-
operation: {
|
|
359
|
-
forward: string;
|
|
360
|
-
next_node_name: string;
|
|
361
|
-
};
|
|
362
|
-
message?: string | undefined;
|
|
363
|
-
} | undefined;
|
|
369
|
+
repository?: unknown;
|
|
370
|
+
operate?: unknown;
|
|
364
371
|
task?: string | undefined;
|
|
365
372
|
progress_namedOperator?: {
|
|
366
373
|
name: string;
|
|
@@ -667,23 +674,8 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
667
674
|
}, {
|
|
668
675
|
data: {
|
|
669
676
|
object: string;
|
|
670
|
-
repository?:
|
|
671
|
-
|
|
672
|
-
objects: string[];
|
|
673
|
-
} | {
|
|
674
|
-
op: "remove";
|
|
675
|
-
objects: string[];
|
|
676
|
-
} | {
|
|
677
|
-
op: "clear";
|
|
678
|
-
} | undefined;
|
|
679
|
-
operate?: {
|
|
680
|
-
op: "next" | "hold" | "unhold" | "adminUnhold";
|
|
681
|
-
operation: {
|
|
682
|
-
forward: string;
|
|
683
|
-
next_node_name: string;
|
|
684
|
-
};
|
|
685
|
-
message?: string | undefined;
|
|
686
|
-
} | undefined;
|
|
677
|
+
repository?: unknown;
|
|
678
|
+
operate?: unknown;
|
|
687
679
|
task?: string | undefined;
|
|
688
680
|
progress_namedOperator?: {
|
|
689
681
|
name: string;
|
|
@@ -6,15 +6,29 @@ export const ProgressNextSchema = z.object({
|
|
|
6
6
|
next_node_name: NameSchema.describe("Next node name."),
|
|
7
7
|
forward: NameSchema.describe("Next forward name."),
|
|
8
8
|
}).strict().describe("Specify a specific operation between current node and next node.");
|
|
9
|
-
export const OperateSchema = z.
|
|
9
|
+
export const OperateSchema = z.preprocess((val) => {
|
|
10
|
+
if (val && typeof val === "object" && !Array.isArray(val)) {
|
|
11
|
+
const obj = val;
|
|
12
|
+
if (obj.op === undefined && "hold" in obj) {
|
|
13
|
+
const holdVal = obj.hold;
|
|
14
|
+
if (typeof holdVal === "boolean") {
|
|
15
|
+
obj.op = holdVal ? "hold" : "next";
|
|
16
|
+
delete obj.hold;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return val;
|
|
21
|
+
}, z.object({
|
|
10
22
|
operation: ProgressNextSchema,
|
|
11
|
-
op: z.enum(["next", "hold", "unhold", "adminUnhold"]).describe("Operation type on the forward: " +
|
|
23
|
+
op: z.enum(["next", "hold", "unhold", "adminUnhold"]).describe("Operation type on the forward (CANONICAL form — prefer this): " +
|
|
12
24
|
"'next' = advance the forward (accomplish); " +
|
|
13
25
|
"'hold' = set hold to block the forward; " +
|
|
14
26
|
"'unhold' = self-unhold, release own hold (no 224 permission needed); " +
|
|
15
|
-
"'adminUnhold' = force-release hold via 224 permission (PROGRESS_UNHOLD)."
|
|
27
|
+
"'adminUnhold' = force-release hold via 224 permission (PROGRESS_UNHOLD). " +
|
|
28
|
+
"LEGACY ALIAS: `hold: boolean` is auto-converted to `op` — `hold:true`→`op:'hold'`, `hold:false`→`op:'next'`. " +
|
|
29
|
+
"New code should use `op` directly."),
|
|
16
30
|
message: z.string().optional().describe("Operation result message."),
|
|
17
|
-
}).strict().describe("Advance Progress object
|
|
31
|
+
}).strict()).describe("Advance Progress object. CANONICAL form: {operation, op: 'next'|'hold'|'unhold'|'adminUnhold', message?}. LEGACY form (auto-converted): {operation, hold: boolean, message?} where hold:true→op:'hold', hold:false→op:'next'.");
|
|
18
32
|
export const CallProgress_DataSchema = z.object({
|
|
19
33
|
object: NameOrAddressSchema.describe("Progress object ID or name."),
|
|
20
34
|
task: NameOrAddressSchema.optional().describe("Task ID. Cannot be changed after setting."),
|
|
@@ -1064,7 +1064,7 @@ export declare const CallRepository_DataSchema: z.ZodObject<{
|
|
|
1064
1064
|
write_guard?: string | undefined;
|
|
1065
1065
|
}[];
|
|
1066
1066
|
}>]>>;
|
|
1067
|
-
rewards: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
1067
|
+
rewards: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
|
|
1068
1068
|
op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
|
|
1069
1069
|
objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
1070
1070
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1088,7 +1088,15 @@ export declare const CallRepository_DataSchema: z.ZodObject<{
|
|
|
1088
1088
|
op: "clear";
|
|
1089
1089
|
}, {
|
|
1090
1090
|
op: "clear";
|
|
1091
|
-
}>]
|
|
1091
|
+
}>]>, {
|
|
1092
|
+
op: "set" | "add";
|
|
1093
|
+
objects: string[];
|
|
1094
|
+
} | {
|
|
1095
|
+
op: "remove";
|
|
1096
|
+
objects: string[];
|
|
1097
|
+
} | {
|
|
1098
|
+
op: "clear";
|
|
1099
|
+
}, unknown>>;
|
|
1092
1100
|
owner_receive: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
1093
1101
|
id: z.ZodString;
|
|
1094
1102
|
type: z.ZodString;
|
|
@@ -1238,15 +1246,7 @@ export declare const CallRepository_DataSchema: z.ZodObject<{
|
|
|
1238
1246
|
onChain?: boolean | undefined;
|
|
1239
1247
|
};
|
|
1240
1248
|
description?: string | undefined;
|
|
1241
|
-
rewards?:
|
|
1242
|
-
op: "set" | "add";
|
|
1243
|
-
objects: string[];
|
|
1244
|
-
} | {
|
|
1245
|
-
op: "remove";
|
|
1246
|
-
objects: string[];
|
|
1247
|
-
} | {
|
|
1248
|
-
op: "clear";
|
|
1249
|
-
} | undefined;
|
|
1249
|
+
rewards?: unknown;
|
|
1250
1250
|
um?: string | null | undefined;
|
|
1251
1251
|
owner_receive?: {
|
|
1252
1252
|
received: {
|
|
@@ -1660,7 +1660,7 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
1660
1660
|
write_guard?: string | undefined;
|
|
1661
1661
|
}[];
|
|
1662
1662
|
}>]>>;
|
|
1663
|
-
rewards: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
1663
|
+
rewards: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodObject<{
|
|
1664
1664
|
op: z.ZodUnion<[z.ZodLiteral<"add">, z.ZodLiteral<"set">]>;
|
|
1665
1665
|
objects: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
1666
1666
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1684,7 +1684,15 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
1684
1684
|
op: "clear";
|
|
1685
1685
|
}, {
|
|
1686
1686
|
op: "clear";
|
|
1687
|
-
}>]
|
|
1687
|
+
}>]>, {
|
|
1688
|
+
op: "set" | "add";
|
|
1689
|
+
objects: string[];
|
|
1690
|
+
} | {
|
|
1691
|
+
op: "remove";
|
|
1692
|
+
objects: string[];
|
|
1693
|
+
} | {
|
|
1694
|
+
op: "clear";
|
|
1695
|
+
}, unknown>>;
|
|
1688
1696
|
owner_receive: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodObject<{
|
|
1689
1697
|
id: z.ZodString;
|
|
1690
1698
|
type: z.ZodString;
|
|
@@ -1834,15 +1842,7 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
1834
1842
|
onChain?: boolean | undefined;
|
|
1835
1843
|
};
|
|
1836
1844
|
description?: string | undefined;
|
|
1837
|
-
rewards?:
|
|
1838
|
-
op: "set" | "add";
|
|
1839
|
-
objects: string[];
|
|
1840
|
-
} | {
|
|
1841
|
-
op: "remove";
|
|
1842
|
-
objects: string[];
|
|
1843
|
-
} | {
|
|
1844
|
-
op: "clear";
|
|
1845
|
-
} | undefined;
|
|
1845
|
+
rewards?: unknown;
|
|
1846
1846
|
um?: string | null | undefined;
|
|
1847
1847
|
owner_receive?: {
|
|
1848
1848
|
received: {
|
|
@@ -2271,15 +2271,7 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
2271
2271
|
onChain?: boolean | undefined;
|
|
2272
2272
|
};
|
|
2273
2273
|
description?: string | undefined;
|
|
2274
|
-
rewards?:
|
|
2275
|
-
op: "set" | "add";
|
|
2276
|
-
objects: string[];
|
|
2277
|
-
} | {
|
|
2278
|
-
op: "remove";
|
|
2279
|
-
objects: string[];
|
|
2280
|
-
} | {
|
|
2281
|
-
op: "clear";
|
|
2282
|
-
} | undefined;
|
|
2274
|
+
rewards?: unknown;
|
|
2283
2275
|
um?: string | null | undefined;
|
|
2284
2276
|
owner_receive?: {
|
|
2285
2277
|
received: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { WithPermissionObjectSchema, ObjectsSchema, CallEnvSchema, SubmissionCallSchema, } from "./base.js";
|
|
3
|
-
import { AccountOrMark_AddressSchema, DescriptionSchema, NameOrAddressSchema, NameSchema, ReceivedObjectsOrRecentlySchema } from "../common/index.js";
|
|
3
|
+
import { AccountOrMark_AddressSchema, DescriptionSchema, NameOrAddressSchema, NameSchema, ReceivedObjectsOrRecentlySchema, RECEIVE_FORMAT_BLOCK_OBJECTS } from "../common/index.js";
|
|
4
4
|
import { PolicyRuleSchema } from "../query/index.js";
|
|
5
5
|
import { SupportedValueSchema } from "../common/index.js";
|
|
6
6
|
export const RepositoryIdSchema = z.union([
|
|
@@ -67,7 +67,7 @@ export const CallRepository_DataSchema = z.object({
|
|
|
67
67
|
data_add: DataAddSchema.optional().describe("Add data items"),
|
|
68
68
|
data_remove: DataRemoveSchema.optional().describe("Delete data items"),
|
|
69
69
|
rewards: ObjectsSchema.optional().describe("Reward object list. Used for data contribution incentives."),
|
|
70
|
-
owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."),
|
|
70
|
+
owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this Repository object and send them to the owner of its Permission object." + RECEIVE_FORMAT_BLOCK_OBJECTS),
|
|
71
71
|
um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID or name."),
|
|
72
72
|
}).strict().describe("On-chain Repository operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Repository. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
|
|
73
73
|
export const CallRepository_InputSchema = z.object({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TypedPermissionObjectSchema, CoinParamSchema, CallEnvSchema, SubmissionCallSchema, } from "./base.js";
|
|
3
3
|
import { RewardGuardSchema } from "../query/index.js";
|
|
4
|
-
import { BalanceTypeSchema, ReceivedObjectsOrRecentlySchema, ReceivedBalanceOrRecentlySchema, NameOrAddressSchema, DescriptionSchema } from "../common/index.js";
|
|
4
|
+
import { BalanceTypeSchema, ReceivedObjectsOrRecentlySchema, ReceivedBalanceOrRecentlySchema, NameOrAddressSchema, DescriptionSchema, RECEIVE_FORMAT_BLOCK_OBJECTS, RECEIVE_FORMAT_BLOCK_BALANCE } from "../common/index.js";
|
|
5
5
|
export const RewardRecordSchema = z.object({
|
|
6
6
|
amount: BalanceTypeSchema,
|
|
7
7
|
time: z.number().int(),
|
|
@@ -16,11 +16,11 @@ export const CallReward_DataSchema = z.object({
|
|
|
16
16
|
claim: NameOrAddressSchema.optional().describe("Guard object ID. Used to verify Guard and start the reward distribution process corresponding to this Guard."),
|
|
17
17
|
description: DescriptionSchema.optional(),
|
|
18
18
|
coin_add: CoinParamSchema.optional().describe("Add amount to Reward object."),
|
|
19
|
-
receive: ReceivedBalanceOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects received by Reward object and store them in pending balance."),
|
|
19
|
+
receive: ReceivedBalanceOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects received by Reward object and store them in pending balance." + RECEIVE_FORMAT_BLOCK_BALANCE),
|
|
20
20
|
guard_add: z.array(RewardGuardSchema).optional().describe("Add Guard to Reward object."),
|
|
21
21
|
guard_remove_expired: z.boolean().optional().describe("Whether to remove expired Guard."),
|
|
22
22
|
guard_expiration_time: z.union([z.number().int().min(1), z.null()]).optional().describe("Add expiration time(ms). Before this time expires, new Guard and fund allocation rules cannot be added."),
|
|
23
|
-
owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."),
|
|
23
|
+
owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this Reward object and send them to the owner of its Permission object." + RECEIVE_FORMAT_BLOCK_OBJECTS),
|
|
24
24
|
um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID or name."),
|
|
25
25
|
}).strict().describe("On-chain Reward operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create a Reward. NOTE: 'name' goes INSIDE 'object', NOT at the data root level.'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
|
|
26
26
|
export const CallReward_InputSchema = z.object({
|
|
@@ -8,7 +8,7 @@ export interface SemanticContext {
|
|
|
8
8
|
pre_warnings?: string[];
|
|
9
9
|
schema_check?: import("../schema-version.js").SchemaCheckResult;
|
|
10
10
|
}
|
|
11
|
-
export type ErrorCode = "invalid_parameter" | "guard_rejected" | "state_conflict" | "insufficient_balance" | "object_not_found" | "permission_denied" | "immutable_violation" | "network_error" | "rate_limit" | "gas_exceeded" | "bcs_error" | "signature_error" | "config_error" | "unknown";
|
|
11
|
+
export type ErrorCode = "invalid_parameter" | "guard_rejected" | "state_conflict" | "insufficient_balance" | "object_not_found" | "permission_denied" | "immutable_violation" | "network_error" | "rate_limit" | "gas_exceeded" | "bcs_error" | "signature_error" | "config_error" | "wip_verification_failed" | "unknown";
|
|
12
12
|
export interface MoveAbortInfo {
|
|
13
13
|
module: string;
|
|
14
14
|
code: number;
|
|
@@ -141,6 +141,32 @@ const ERROR_RULES = [
|
|
|
141
141
|
retryable: false,
|
|
142
142
|
recovery_hint: "Fill the Guard submission data (see the 'submission' field) and resubmit via call_with_submission",
|
|
143
143
|
},
|
|
144
|
+
{
|
|
145
|
+
patterns: [
|
|
146
|
+
/WIP file verification failed/i,
|
|
147
|
+
/Failed to load WIP file/i,
|
|
148
|
+
/WIP.*hash\s*mismatch/i,
|
|
149
|
+
/Invalid WIP file structure/i,
|
|
150
|
+
/wip.*not\s*found/i,
|
|
151
|
+
/wip.*unreachable/i,
|
|
152
|
+
/wip_file.*error/i,
|
|
153
|
+
],
|
|
154
|
+
error_code: "wip_verification_failed",
|
|
155
|
+
retryable: false,
|
|
156
|
+
recovery_hint: [
|
|
157
|
+
"WIP file must be publicly accessible via HTTP(S) URL — local file paths cannot be stored on-chain.",
|
|
158
|
+
"Deployment options (pick one):",
|
|
159
|
+
" 1. GitHub Pages (free, stable): upload .wip file to a repo, enable Pages, use raw URL.",
|
|
160
|
+
" Example: https://<user>.github.io/<repo>/<file>.wip",
|
|
161
|
+
" Or raw URL: https://raw.githubusercontent.com/<user>/<repo>/<branch>/<file>.wip",
|
|
162
|
+
" 2. IPFS (free, decentralized): upload via Pinata (https://pinata.cloud) or nft.storage.",
|
|
163
|
+
" Use the ipfs://<CID> or https://<gateway>/ipfs/<CID> URL form.",
|
|
164
|
+
" Common gateways: https://ipfs.io/ipfs/, https://cloudflare-ipfs.com/ipfs/, https://dweb.link/ipfs/",
|
|
165
|
+
" 3. User's own website: serve the .wip file from your static site.",
|
|
166
|
+
" 4. Generate a fresh WIP file locally first via wip_file (type='generate'), upload it, then re-submit the URL.",
|
|
167
|
+
"After updating the sale's wip URL, re-run the operation."
|
|
168
|
+
].join("\n"),
|
|
169
|
+
},
|
|
144
170
|
{
|
|
145
171
|
patterns: [
|
|
146
172
|
/already\s*publish/i,
|
|
@@ -427,7 +453,8 @@ const INTENT_RULES = [
|
|
|
427
453
|
{ operation_type: "progress", intent: "update_progress", confidence: 0.9 },
|
|
428
454
|
{ operation_type: "order", signals: (d) => !!d?.arb, intent: "apply_arbitration", confidence: 0.9 },
|
|
429
455
|
{ operation_type: "order", intent: "manage_order", confidence: 0.85 },
|
|
430
|
-
{ operation_type: "payment", intent: "
|
|
456
|
+
{ operation_type: "payment", signals: (d) => d?.receive === true, intent: "claim_escrow_payment", confidence: 0.95 },
|
|
457
|
+
{ operation_type: "payment", intent: "send_payment", confidence: 0.9 },
|
|
431
458
|
{ operation_type: "reward", intent: "manage_reward", confidence: 0.9 },
|
|
432
459
|
{ operation_type: "demand", intent: "post_demand", confidence: 0.9 },
|
|
433
460
|
{ operation_type: "treasury", intent: "manage_treasury", confidence: 0.9 },
|
|
@@ -573,6 +600,11 @@ const FUND_ROLE_RULES = [
|
|
|
573
600
|
role: "release",
|
|
574
601
|
confidence: 0.9,
|
|
575
602
|
},
|
|
603
|
+
{
|
|
604
|
+
when: (ctx) => ctx.operation_type === "payment" && ctx.data?.receive === true,
|
|
605
|
+
role: "release",
|
|
606
|
+
confidence: 0.95,
|
|
607
|
+
},
|
|
576
608
|
{
|
|
577
609
|
when: (ctx) => ctx.operation_type === "payment" && isNegative(ctx.amount),
|
|
578
610
|
role: "payment",
|
|
@@ -1495,6 +1527,9 @@ export function buildDataSemantic(data, context, isError, errorMsg) {
|
|
|
1495
1527
|
return undefined;
|
|
1496
1528
|
const intent = inferIntent(context.operation_type, context.data);
|
|
1497
1529
|
const warnings = [];
|
|
1530
|
+
if (context.pre_warnings && context.pre_warnings.length > 0) {
|
|
1531
|
+
warnings.push(...context.pre_warnings);
|
|
1532
|
+
}
|
|
1498
1533
|
let status;
|
|
1499
1534
|
if (isError) {
|
|
1500
1535
|
status = "failed";
|
|
@@ -1530,7 +1565,7 @@ export function buildDataSemantic(data, context, isError, errorMsg) {
|
|
|
1530
1565
|
const intentVerb = intent.replace(/_/g, " ");
|
|
1531
1566
|
let summary;
|
|
1532
1567
|
if (status === "failed") {
|
|
1533
|
-
summary = `Failed to ${intentVerb}`;
|
|
1568
|
+
summary = errorMsg ? `Failed to ${intentVerb}: ${errorMsg}` : `Failed to ${intentVerb}`;
|
|
1534
1569
|
}
|
|
1535
1570
|
else if (status === "partial") {
|
|
1536
1571
|
summary = `${intentVerb} completed with no results`;
|