@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.
Files changed (186) hide show
  1. package/README.md +5 -3
  2. package/dist/customer/info-puzzle.d.ts +1 -1
  3. package/dist/customer/info-puzzle.js +4 -2
  4. package/dist/customer/risk-assessment.js +26 -4
  5. package/dist/customer/types.d.ts +2 -0
  6. package/dist/examples/guard-template-balance-check.json +38 -0
  7. package/dist/examples/guard-template-time-lock.json +39 -0
  8. package/dist/examples/machine-template-7node-rental.json +114 -0
  9. package/dist/examples/rental-ziroom-machine-create.json +137 -0
  10. package/dist/examples/rental-ziroom-permission-create.json +35 -0
  11. package/dist/examples/rental-ziroom-service-create.json +80 -0
  12. package/dist/examples/retail-myshop-service-create.json +88 -0
  13. package/dist/extensions/capability-manifest.d.ts +125 -0
  14. package/dist/extensions/capability-manifest.js +594 -0
  15. package/dist/extensions/constraint-registry.d.ts +24 -0
  16. package/dist/extensions/constraint-registry.js +196 -0
  17. package/dist/extensions/index.d.ts +12 -0
  18. package/dist/extensions/index.js +6 -0
  19. package/dist/extensions/metric-registry.d.ts +26 -0
  20. package/dist/extensions/metric-registry.js +257 -0
  21. package/dist/extensions/mode-evaluator.d.ts +15 -0
  22. package/dist/extensions/mode-evaluator.js +170 -0
  23. package/dist/extensions/modes.d.ts +2 -0
  24. package/dist/extensions/modes.js +493 -0
  25. package/dist/extensions/registry.d.ts +50 -0
  26. package/dist/extensions/registry.js +662 -0
  27. package/dist/extensions/types.d.ts +219 -0
  28. package/dist/extensions/types.js +1 -0
  29. package/dist/index.js +50 -0
  30. package/dist/knowledge/deployment-scanner.d.ts +3 -0
  31. package/dist/knowledge/deployment-scanner.js +64 -3
  32. package/dist/knowledge/fund-layer.d.ts +72 -0
  33. package/dist/knowledge/fund-layer.js +420 -0
  34. package/dist/knowledge/guard-render.d.ts +57 -0
  35. package/dist/knowledge/guard-render.js +700 -0
  36. package/dist/knowledge/guard-risk.d.ts +13 -0
  37. package/dist/knowledge/guard-risk.js +57 -0
  38. package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
  39. package/dist/knowledge/guard-submission-prompt.js +171 -0
  40. package/dist/knowledge/guard-templates.js +278 -0
  41. package/dist/knowledge/machine-ledger.js +1 -1
  42. package/dist/knowledge/machine-render.d.ts +41 -0
  43. package/dist/knowledge/machine-render.js +565 -0
  44. package/dist/knowledge/machine-templates.js +24 -5
  45. package/dist/knowledge/reward-confirm.js +2 -2
  46. package/dist/knowledge/reward-puzzle.js +1 -1
  47. package/dist/knowledge/reward-risk.js +9 -9
  48. package/dist/knowledge/reward-templates.js +2 -2
  49. package/dist/knowledge/service-confirm.d.ts +15 -6
  50. package/dist/knowledge/service-confirm.js +119 -11
  51. package/dist/knowledge/service-context.js +1 -1
  52. package/dist/knowledge/service-ledger.js +1 -1
  53. package/dist/knowledge/service-risk.d.ts +1 -1
  54. package/dist/knowledge/service-risk.js +3 -3
  55. package/dist/knowledge/service-templates.js +2 -2
  56. package/dist/knowledge/service-translation.d.ts +1 -1
  57. package/dist/knowledge/service-translation.js +7 -7
  58. package/dist/knowledge/tool-constraints.js +6 -2
  59. package/dist/project/deployment-bridge.d.ts +1 -1
  60. package/dist/project/deployment-bridge.js +31 -7
  61. package/dist/project/deployment-doc.d.ts +3 -0
  62. package/dist/project/deployment-doc.js +76 -14
  63. package/dist/project/edit-planner.d.ts +123 -0
  64. package/dist/project/edit-planner.js +1371 -0
  65. package/dist/project/evaluation.d.ts +2 -0
  66. package/dist/project/evaluation.js +873 -88
  67. package/dist/project/graph-builder.d.ts +4 -1
  68. package/dist/project/graph-builder.js +132 -62
  69. package/dist/project/graph.d.ts +1 -0
  70. package/dist/project/handlers.d.ts +317 -6
  71. package/dist/project/handlers.js +1171 -19
  72. package/dist/project/stage-gate.d.ts +4 -0
  73. package/dist/project/stage-gate.js +64 -5
  74. package/dist/project/task-tracker.d.ts +26 -0
  75. package/dist/project/task-tracker.js +78 -0
  76. package/dist/safety/preview.js +16 -0
  77. package/dist/schema/call/allocation.d.ts +16 -16
  78. package/dist/schema/call/allocation.js +2 -2
  79. package/dist/schema/call/arbitration.js +19 -6
  80. package/dist/schema/call/base.d.ts +21 -13
  81. package/dist/schema/call/base.js +27 -6
  82. package/dist/schema/call/bridge.d.ts +5 -5
  83. package/dist/schema/call/bridge.js +3 -1
  84. package/dist/schema/call/contact.js +2 -2
  85. package/dist/schema/call/demand.d.ts +23 -31
  86. package/dist/schema/call/demand.js +2 -2
  87. package/dist/schema/call/guard.js +2 -2
  88. package/dist/schema/call/machine.d.ts +1976 -752
  89. package/dist/schema/call/machine.js +50 -4
  90. package/dist/schema/call/order.d.ts +149 -228
  91. package/dist/schema/call/order.js +4 -3
  92. package/dist/schema/call/payment.d.ts +183 -3
  93. package/dist/schema/call/payment.js +21 -3
  94. package/dist/schema/call/permission.js +2 -2
  95. package/dist/schema/call/personal.d.ts +241 -52
  96. package/dist/schema/call/progress.d.ts +53 -61
  97. package/dist/schema/call/progress.js +18 -4
  98. package/dist/schema/call/repository.d.ts +23 -31
  99. package/dist/schema/call/repository.js +2 -2
  100. package/dist/schema/call/reward.js +3 -3
  101. package/dist/schema/call/semantic.d.ts +1 -1
  102. package/dist/schema/call/semantic.js +37 -2
  103. package/dist/schema/call/service.d.ts +275 -127
  104. package/dist/schema/call/service.js +89 -13
  105. package/dist/schema/call/treasury.js +3 -3
  106. package/dist/schema/common/index.d.ts +13 -2
  107. package/dist/schema/common/index.js +80 -15
  108. package/dist/schema/local/index.d.ts +32 -35
  109. package/dist/schema/local/index.js +28 -6
  110. package/dist/schema/messenger/index.d.ts +274 -46
  111. package/dist/schema/operations.d.ts +1264 -544
  112. package/dist/schema/operations.js +65 -7
  113. package/dist/schema/project/index.d.ts +2846 -167
  114. package/dist/schema/project/index.js +570 -16
  115. package/dist/schema/query/index.d.ts +922 -349
  116. package/dist/schema/query/index.js +205 -42
  117. package/dist/schema/schema-query/index.d.ts +65 -3
  118. package/dist/schema/schema-query/index.js +38 -5
  119. package/dist/schema/utils/node-parser.js +20 -4
  120. package/dist/schema/utils/object-type-utils.d.ts +12 -0
  121. package/dist/schema/utils/object-type-utils.js +35 -0
  122. package/dist/schema/utils/permission-machine-check.d.ts +49 -0
  123. package/dist/schema/utils/permission-machine-check.js +121 -0
  124. package/dist/schema/utils/skills-recommendation.d.ts +2 -0
  125. package/dist/schema/utils/skills-recommendation.js +76 -0
  126. package/dist/schema-query/index.d.ts +20 -1
  127. package/dist/schema-query/index.js +306 -4
  128. package/dist/schemas/account_operation.output.json +7 -1
  129. package/dist/schemas/account_operation.schema.json +3 -3
  130. package/dist/schemas/bridge_operation.output.json +6 -0
  131. package/dist/schemas/bridge_operation.schema.json +1 -1
  132. package/dist/schemas/guard-templates.json +379 -0
  133. package/dist/schemas/guard2file.schema.json +1 -1
  134. package/dist/schemas/index.json +1 -1
  135. package/dist/schemas/local_info_operation.output.json +6 -0
  136. package/dist/schemas/local_mark_operation.output.json +7 -1
  137. package/dist/schemas/local_mark_operation.schema.json +1 -1
  138. package/dist/schemas/machineNode2file.schema.json +1 -1
  139. package/dist/schemas/messenger_operation.schema.json +4 -4
  140. package/dist/schemas/onchain_events.output.json +1 -1
  141. package/dist/schemas/onchain_operations.output.json +2820 -0
  142. package/dist/schemas/onchain_operations.schema.json +444 -330
  143. package/dist/schemas/onchain_operations_allocation.schema.json +37 -28
  144. package/dist/schemas/onchain_operations_arbitration.schema.json +16 -14
  145. package/dist/schemas/onchain_operations_contact.schema.json +10 -10
  146. package/dist/schemas/onchain_operations_demand.schema.json +10 -10
  147. package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -16
  148. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  149. package/dist/schemas/onchain_operations_guard.schema.json +2 -2
  150. package/dist/schemas/onchain_operations_machine.schema.json +43 -35
  151. package/dist/schemas/onchain_operations_order.schema.json +72 -78
  152. package/dist/schemas/onchain_operations_payment.schema.json +141 -111
  153. package/dist/schemas/onchain_operations_permission.schema.json +3 -3
  154. package/dist/schemas/onchain_operations_personal.schema.json +7 -7
  155. package/dist/schemas/onchain_operations_progress.schema.json +9 -9
  156. package/dist/schemas/onchain_operations_proof.schema.json +8 -8
  157. package/dist/schemas/onchain_operations_repository.schema.json +10 -10
  158. package/dist/schemas/onchain_operations_reward.schema.json +14 -14
  159. package/dist/schemas/onchain_operations_service.schema.json +119 -48
  160. package/dist/schemas/onchain_operations_treasury.schema.json +11 -11
  161. package/dist/schemas/onchain_table_data.output.json +33 -25
  162. package/dist/schemas/onchain_table_data.schema.json +22 -21
  163. package/dist/schemas/project_operation.output.json +2194 -23
  164. package/dist/schemas/project_operation.schema.json +84 -6
  165. package/dist/schemas/query_toolkit.output.json +108 -80
  166. package/dist/schemas/query_toolkit.schema.json +12 -12
  167. package/dist/schemas/schema_query.output.json +70 -3
  168. package/dist/schemas/schema_query.schema.json +18 -3
  169. package/dist/schemas/wowok_buildin_info.output.json +81 -8
  170. package/dist/schemas/wowok_buildin_info.schema.json +46 -2
  171. package/dist/tools/handlers/local.js +20 -5
  172. package/dist/tools/handlers/onchain.js +594 -6
  173. package/dist/tools/handlers/project.js +76 -4
  174. package/dist/tools/handlers/query.js +27 -0
  175. package/dist/tools/handlers/schema-query.js +43 -1
  176. package/dist/tools/handlers/task-status.d.ts +170 -0
  177. package/dist/tools/handlers/task-status.js +55 -0
  178. package/dist/tools/handlers/wip.js +47 -1
  179. package/dist/tools/index.d.ts +8 -0
  180. package/dist/tools/index.js +387 -12
  181. package/dist/tools/retry.d.ts +8 -0
  182. package/dist/tools/retry.js +85 -0
  183. package/dist/tools/wip-deploy-assist.d.ts +28 -0
  184. package/dist/tools/wip-deploy-assist.js +278 -0
  185. package/package.json +2 -2
  186. package/dist/schemas/guard-node-examples.md +0 -199
@@ -1,5 +1,5 @@
1
1
  import type { z } from "zod";
2
- import { type Project, type ProjectObject, type EvaluationType } from "@wowok/wowok";
2
+ import { type ProjectObject, type ObjectRole, type EvaluationType } from "@wowok/wowok";
3
3
  import type { ProjectOperationInputSchema } from "../schema/project/index.js";
4
4
  type ProjectInput = z.infer<typeof ProjectOperationInputSchema>;
5
5
  export declare function handleListProjects(v: ProjectInput): Promise<{
@@ -28,23 +28,115 @@ export declare function handleListProjects(v: ProjectInput): Promise<{
28
28
  }>;
29
29
  export declare function handleCreateProject(v: ProjectInput): Promise<{
30
30
  action: "create_project";
31
- project: Project;
31
+ project: import("@wowok/wowok").Project;
32
+ blueprint: {
33
+ objects_count: number;
34
+ edges_count: number;
35
+ industry_source: string;
36
+ applied_template: string;
37
+ steps_count: number;
38
+ scenarios_count: number;
39
+ key_risk: string | undefined;
40
+ };
41
+ recommended_creation_order: {
42
+ step: number;
43
+ object: string;
44
+ reason: string;
45
+ required: boolean;
46
+ }[];
47
+ blueprint_warning?: undefined;
48
+ blueprint_skipped?: undefined;
49
+ hint?: undefined;
50
+ } | {
51
+ action: "create_project";
52
+ project: import("@wowok/wowok").Project;
53
+ blueprint_warning: string;
54
+ recommended_creation_order: {
55
+ step: number;
56
+ object: string;
57
+ reason: string;
58
+ required: boolean;
59
+ }[];
60
+ blueprint?: undefined;
61
+ blueprint_skipped?: undefined;
62
+ hint?: undefined;
63
+ } | {
64
+ action: "create_project";
65
+ project: import("@wowok/wowok").Project;
66
+ blueprint_skipped: boolean;
67
+ hint: string;
68
+ recommended_creation_order: {
69
+ step: number;
70
+ object: string;
71
+ reason: string;
72
+ required: boolean;
73
+ }[];
74
+ blueprint?: undefined;
75
+ blueprint_warning?: undefined;
76
+ } | {
77
+ action: "create_project";
78
+ project: import("@wowok/wowok").Project;
79
+ recommended_creation_order: {
80
+ step: number;
81
+ object: string;
82
+ reason: string;
83
+ required: boolean;
84
+ }[];
85
+ blueprint?: undefined;
86
+ blueprint_warning?: undefined;
87
+ blueprint_skipped?: undefined;
88
+ hint?: undefined;
32
89
  }>;
33
90
  export declare function handleCreateProjectFromOnchain(v: ProjectInput): Promise<{
34
91
  action: "create_project_from_onchain";
35
- project: Project;
92
+ project: import("@wowok/wowok").Project;
36
93
  objects: ProjectObject[];
37
94
  graphEdgeCount: number;
38
95
  }>;
39
96
  export declare function handleUpdateProject(v: ProjectInput): Promise<{
40
97
  action: "update_project";
41
- project: Project;
98
+ project: import("@wowok/wowok").Project;
42
99
  }>;
43
100
  export declare function handleGetProjectDetail(v: ProjectInput): Promise<{
44
101
  action: "get_project_detail";
45
- project: Project;
46
- objects: ProjectObject[];
102
+ project: import("@wowok/wowok").Project;
103
+ objects: {
104
+ isDraft: boolean;
105
+ id: string;
106
+ projectId: string;
107
+ objectAddress: string;
108
+ objectType: string | null;
109
+ objectName: string | null;
110
+ role: ObjectRole;
111
+ tags: string[] | null;
112
+ addedAt: number;
113
+ metadata: Record<string, unknown> | null;
114
+ }[];
115
+ objectCount: number;
116
+ onchainCount: number;
117
+ draftCount: number;
118
+ objectGroups: {
119
+ core: ProjectObject[];
120
+ dependency: ProjectObject[];
121
+ reference: ProjectObject[];
122
+ other: ProjectObject[];
123
+ draft: ProjectObject[];
124
+ stats: {
125
+ total: number;
126
+ onchain_count: number;
127
+ draft_count: number;
128
+ core_count: number;
129
+ dependency_count: number;
130
+ reference_count: number;
131
+ other_count: number;
132
+ by_type: Record<string, number>;
133
+ };
134
+ };
47
135
  graphEdgeCount: number;
136
+ serviceStatus: {
137
+ published: boolean | null;
138
+ paused: boolean | null;
139
+ } | null;
48
140
  evaluations: {
49
141
  id: string;
50
142
  evalType: EvaluationType;
@@ -86,6 +178,31 @@ export declare function handleBuildGraph(v: ProjectInput): Promise<{
86
178
  edgesBySource: Record<string, number>;
87
179
  reputationCount: number;
88
180
  builtAt: number;
181
+ topEdges: {
182
+ source: string;
183
+ target: string;
184
+ fieldName: string | null;
185
+ relationshipType: import("@wowok/wowok").RelationshipType;
186
+ weight: number;
187
+ verified: boolean;
188
+ }[];
189
+ visualization: string;
190
+ hint: string;
191
+ binding_verification: {
192
+ service: string;
193
+ bindings: Record<string, {
194
+ expected: string;
195
+ actual: string | null;
196
+ count?: number;
197
+ verified: boolean;
198
+ }>;
199
+ all_verified: boolean;
200
+ } | null;
201
+ } | {
202
+ action: "build_graph";
203
+ async_mode: true;
204
+ task_id: string;
205
+ hint: string;
89
206
  }>;
90
207
  export declare function handleGetGraph(v: ProjectInput): Promise<{
91
208
  action: "get_graph";
@@ -112,6 +229,8 @@ export declare function handleEvaluateProject(v: ProjectInput): Promise<{
112
229
  needsLlm: boolean;
113
230
  llmPrompt: string | undefined;
114
231
  evaluationId: string;
232
+ refreshWarning: string | undefined;
233
+ graphFallbackWarning: string | undefined;
115
234
  }>;
116
235
  export declare function handleSaveEvaluation(v: ProjectInput): Promise<{
117
236
  action: "save_evaluation";
@@ -139,6 +258,76 @@ export declare function handleDeleteProject(v: ProjectInput): Promise<{
139
258
  action: "delete_project";
140
259
  deleted: true;
141
260
  }>;
261
+ export declare function handleCloneProjectToNetwork(v: ProjectInput): Promise<{
262
+ action: "clone_project_to_network" | "migrate_network";
263
+ new_project_id: string;
264
+ new_prefix: string;
265
+ target_network: "testnet" | "mainnet";
266
+ cloned_objects_count: number;
267
+ message: string;
268
+ next_steps: string;
269
+ }>;
270
+ export declare function handleMigrateToMainnet(v: ProjectInput): Promise<{
271
+ action: "migrate_to_mainnet";
272
+ migration_status: string;
273
+ source_project: {
274
+ prefix: string;
275
+ network: string;
276
+ preserved: boolean;
277
+ };
278
+ target_project: {
279
+ prefix: string;
280
+ project_id: string;
281
+ network: string;
282
+ cloned_objects_count: number;
283
+ };
284
+ key_principle: string;
285
+ migration_plan: ({
286
+ step: number;
287
+ status: string;
288
+ action: string;
289
+ description: string;
290
+ result: string;
291
+ deployment_plan?: undefined;
292
+ critical_note?: undefined;
293
+ names_to_register?: undefined;
294
+ } | {
295
+ step: number;
296
+ status: string;
297
+ action: string;
298
+ description: string;
299
+ deployment_plan: {
300
+ order: number;
301
+ object_type: string;
302
+ object_name: string;
303
+ operation_type: string;
304
+ localmark_name: string;
305
+ note: string;
306
+ }[];
307
+ critical_note: string;
308
+ result?: undefined;
309
+ names_to_register?: undefined;
310
+ } | {
311
+ step: number;
312
+ status: string;
313
+ action: string;
314
+ description: string;
315
+ names_to_register: string[];
316
+ result?: undefined;
317
+ deployment_plan?: undefined;
318
+ critical_note?: undefined;
319
+ } | {
320
+ step: number;
321
+ status: string;
322
+ action: string;
323
+ description: string;
324
+ result?: undefined;
325
+ deployment_plan?: undefined;
326
+ critical_note?: undefined;
327
+ names_to_register?: undefined;
328
+ })[];
329
+ summary: string;
330
+ }>;
142
331
  export declare function handleGetObjectDiff(v: ProjectInput): Promise<{
143
332
  action: "get_object_diff";
144
333
  address: string;
@@ -151,4 +340,126 @@ export declare function handleGetObjectDiff(v: ProjectInput): Promise<{
151
340
  changeType: "modified" | "removed" | "added";
152
341
  }[];
153
342
  }>;
343
+ declare function normalizeForwards(raw: unknown): {
344
+ name: string;
345
+ weight: number;
346
+ guard: string | null;
347
+ retained_submission: number[] | null;
348
+ named_operator: string | null;
349
+ permission_index: number | null;
350
+ }[];
351
+ export declare function handleGetMachineGraph(v: ProjectInput): Promise<{
352
+ action: "get_machine_graph";
353
+ machineAddress: string;
354
+ machineName: string | null;
355
+ nodes: {
356
+ name: string;
357
+ description: string | null;
358
+ }[];
359
+ edges: {
360
+ from: string;
361
+ to: string;
362
+ threshold: number;
363
+ forwards: ReturnType<typeof normalizeForwards>;
364
+ }[];
365
+ published: boolean | null;
366
+ paused: boolean | null;
367
+ mermaid: string;
368
+ tree_outline: string;
369
+ ascii_art: string;
370
+ markmap: string;
371
+ }>;
372
+ export declare function handleGetGuardGraph(v: ProjectInput): Promise<{
373
+ action: "get_guard_graph";
374
+ guardAddress: string;
375
+ guardName: string | null;
376
+ root: any;
377
+ table: any[];
378
+ rely: any;
379
+ immutable: any;
380
+ mermaid: string;
381
+ tree_outline: string;
382
+ ascii_art: string;
383
+ markmap: string;
384
+ }>;
385
+ export declare function handlePreEvaluateCheck(v: ProjectInput): Promise<{
386
+ action: "pre_evaluate_check";
387
+ ready: boolean;
388
+ missing: {
389
+ id: string;
390
+ description: string;
391
+ impact: string;
392
+ }[];
393
+ warnings: {
394
+ id: string;
395
+ description: string;
396
+ impact: string;
397
+ }[];
398
+ summary: string;
399
+ counts?: undefined;
400
+ } | {
401
+ action: "pre_evaluate_check";
402
+ ready: boolean;
403
+ missing: {
404
+ id: string;
405
+ description: string;
406
+ impact: string;
407
+ }[];
408
+ warnings: {
409
+ id: string;
410
+ description: string;
411
+ impact: string;
412
+ }[];
413
+ summary: string;
414
+ counts: {
415
+ objects: number;
416
+ edges: number;
417
+ uncached: number;
418
+ stale: number;
419
+ dangling_edges: number;
420
+ drafts: number;
421
+ };
422
+ }>;
423
+ export declare function handleVerifyDeployment(v: ProjectInput): Promise<{
424
+ action: "verify_deployment";
425
+ verifiedCount: number;
426
+ matched: number;
427
+ mismatched: number;
428
+ missing: number;
429
+ unreachable: number;
430
+ results: {
431
+ objectAddress: string;
432
+ objectName: string | null;
433
+ objectType: string | null;
434
+ status: "unreachable";
435
+ error: string;
436
+ }[];
437
+ summary: string;
438
+ } | {
439
+ action: "verify_deployment";
440
+ verifiedCount: number;
441
+ matched: number;
442
+ mismatched: number;
443
+ missing: number;
444
+ unreachable: number;
445
+ results: {
446
+ objectAddress: string;
447
+ objectName: string | null;
448
+ objectType: string | null;
449
+ status: "matched" | "mismatched" | "missing" | "unreachable";
450
+ error?: string;
451
+ differences?: Array<{
452
+ field: string;
453
+ sqlite: unknown;
454
+ onchain: unknown;
455
+ }>;
456
+ bindings?: {
457
+ machine: boolean;
458
+ permission: boolean;
459
+ buy_guard: boolean;
460
+ order_allocators: boolean;
461
+ };
462
+ }[];
463
+ summary: string;
464
+ }>;
154
465
  export {};