@wowok/agent-mcp 2.6.0 → 2.6.1

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 (133) hide show
  1. package/README.md +5 -3
  2. package/dist/extensions/capability-manifest.d.ts +125 -0
  3. package/dist/extensions/capability-manifest.js +594 -0
  4. package/dist/extensions/constraint-registry.d.ts +24 -0
  5. package/dist/extensions/constraint-registry.js +196 -0
  6. package/dist/extensions/index.d.ts +12 -0
  7. package/dist/extensions/index.js +6 -0
  8. package/dist/extensions/metric-registry.d.ts +26 -0
  9. package/dist/extensions/metric-registry.js +257 -0
  10. package/dist/extensions/mode-evaluator.d.ts +15 -0
  11. package/dist/extensions/mode-evaluator.js +170 -0
  12. package/dist/extensions/modes.d.ts +2 -0
  13. package/dist/extensions/modes.js +407 -0
  14. package/dist/extensions/registry.d.ts +48 -0
  15. package/dist/extensions/registry.js +629 -0
  16. package/dist/extensions/types.d.ts +218 -0
  17. package/dist/extensions/types.js +1 -0
  18. package/dist/knowledge/deployment-scanner.d.ts +3 -0
  19. package/dist/knowledge/deployment-scanner.js +64 -3
  20. package/dist/knowledge/guard-risk.d.ts +13 -0
  21. package/dist/knowledge/guard-risk.js +57 -0
  22. package/dist/knowledge/guard-templates.js +278 -0
  23. package/dist/knowledge/machine-templates.js +20 -1
  24. package/dist/knowledge/service-confirm.d.ts +14 -5
  25. package/dist/knowledge/service-confirm.js +116 -8
  26. package/dist/knowledge/tool-constraints.js +6 -2
  27. package/dist/project/deployment-bridge.d.ts +1 -1
  28. package/dist/project/deployment-bridge.js +27 -4
  29. package/dist/project/deployment-doc.d.ts +3 -0
  30. package/dist/project/deployment-doc.js +72 -10
  31. package/dist/project/evaluation.d.ts +2 -0
  32. package/dist/project/evaluation.js +569 -84
  33. package/dist/project/graph-builder.d.ts +4 -1
  34. package/dist/project/graph-builder.js +126 -61
  35. package/dist/project/graph.d.ts +1 -0
  36. package/dist/project/handlers.d.ts +219 -5
  37. package/dist/project/handlers.js +819 -9
  38. package/dist/project/stage-gate.d.ts +4 -0
  39. package/dist/project/stage-gate.js +64 -5
  40. package/dist/project/task-tracker.d.ts +26 -0
  41. package/dist/project/task-tracker.js +78 -0
  42. package/dist/safety/preview.js +16 -0
  43. package/dist/schema/call/allocation.d.ts +16 -16
  44. package/dist/schema/call/base.d.ts +21 -13
  45. package/dist/schema/call/base.js +27 -6
  46. package/dist/schema/call/bridge.d.ts +5 -5
  47. package/dist/schema/call/bridge.js +3 -1
  48. package/dist/schema/call/demand.d.ts +23 -31
  49. package/dist/schema/call/guard.js +1 -1
  50. package/dist/schema/call/machine.d.ts +402 -376
  51. package/dist/schema/call/order.d.ts +149 -228
  52. package/dist/schema/call/order.js +7 -3
  53. package/dist/schema/call/payment.d.ts +183 -3
  54. package/dist/schema/call/payment.js +21 -3
  55. package/dist/schema/call/personal.d.ts +241 -52
  56. package/dist/schema/call/progress.d.ts +53 -61
  57. package/dist/schema/call/progress.js +18 -4
  58. package/dist/schema/call/repository.d.ts +23 -31
  59. package/dist/schema/call/semantic.d.ts +1 -1
  60. package/dist/schema/call/semantic.js +30 -1
  61. package/dist/schema/call/service.d.ts +95 -119
  62. package/dist/schema/call/service.js +22 -1
  63. package/dist/schema/common/index.d.ts +11 -2
  64. package/dist/schema/common/index.js +43 -14
  65. package/dist/schema/local/index.d.ts +32 -35
  66. package/dist/schema/local/index.js +23 -5
  67. package/dist/schema/messenger/index.d.ts +274 -46
  68. package/dist/schema/operations.d.ts +680 -539
  69. package/dist/schema/operations.js +22 -0
  70. package/dist/schema/project/index.d.ts +1796 -80
  71. package/dist/schema/project/index.js +304 -14
  72. package/dist/schema/query/index.d.ts +705 -349
  73. package/dist/schema/query/index.js +164 -31
  74. package/dist/schema/schema-query/index.d.ts +15 -3
  75. package/dist/schema/schema-query/index.js +23 -5
  76. package/dist/schema/utils/node-parser.js +7 -4
  77. package/dist/schema-query/index.d.ts +7 -1
  78. package/dist/schema-query/index.js +204 -4
  79. package/dist/schemas/account_operation.output.json +7 -1
  80. package/dist/schemas/account_operation.schema.json +2 -2
  81. package/dist/schemas/bridge_operation.output.json +6 -0
  82. package/dist/schemas/bridge_operation.schema.json +1 -1
  83. package/dist/schemas/guard-templates.json +379 -0
  84. package/dist/schemas/guard2file.schema.json +1 -1
  85. package/dist/schemas/index.json +1 -1
  86. package/dist/schemas/local_info_operation.output.json +6 -0
  87. package/dist/schemas/local_mark_operation.output.json +7 -1
  88. package/dist/schemas/local_mark_operation.schema.json +1 -1
  89. package/dist/schemas/machineNode2file.schema.json +1 -1
  90. package/dist/schemas/messenger_operation.schema.json +4 -4
  91. package/dist/schemas/onchain_events.output.json +1 -1
  92. package/dist/schemas/onchain_operations.schema.json +348 -296
  93. package/dist/schemas/onchain_operations_allocation.schema.json +34 -25
  94. package/dist/schemas/onchain_operations_arbitration.schema.json +8 -8
  95. package/dist/schemas/onchain_operations_contact.schema.json +8 -8
  96. package/dist/schemas/onchain_operations_demand.schema.json +8 -8
  97. package/dist/schemas/onchain_operations_gen_passport.schema.json +14 -14
  98. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  99. package/dist/schemas/onchain_operations_guard.schema.json +1 -1
  100. package/dist/schemas/onchain_operations_machine.schema.json +41 -33
  101. package/dist/schemas/onchain_operations_order.schema.json +71 -77
  102. package/dist/schemas/onchain_operations_payment.schema.json +141 -111
  103. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  104. package/dist/schemas/onchain_operations_personal.schema.json +7 -7
  105. package/dist/schemas/onchain_operations_progress.schema.json +8 -8
  106. package/dist/schemas/onchain_operations_proof.schema.json +7 -7
  107. package/dist/schemas/onchain_operations_repository.schema.json +8 -8
  108. package/dist/schemas/onchain_operations_reward.schema.json +10 -10
  109. package/dist/schemas/onchain_operations_service.schema.json +46 -35
  110. package/dist/schemas/onchain_operations_treasury.schema.json +8 -8
  111. package/dist/schemas/onchain_table_data.output.json +33 -25
  112. package/dist/schemas/onchain_table_data.schema.json +12 -12
  113. package/dist/schemas/project_operation.output.json +1175 -23
  114. package/dist/schemas/project_operation.schema.json +40 -4
  115. package/dist/schemas/query_toolkit.output.json +104 -76
  116. package/dist/schemas/query_toolkit.schema.json +9 -9
  117. package/dist/schemas/schema_query.output.json +7 -3
  118. package/dist/schemas/schema_query.schema.json +17 -3
  119. package/dist/tools/handlers/local.js +20 -5
  120. package/dist/tools/handlers/onchain.js +23 -0
  121. package/dist/tools/handlers/project.js +52 -3
  122. package/dist/tools/handlers/query.js +27 -0
  123. package/dist/tools/handlers/schema-query.js +19 -0
  124. package/dist/tools/handlers/task-status.d.ts +170 -0
  125. package/dist/tools/handlers/task-status.js +55 -0
  126. package/dist/tools/handlers/wip.js +47 -1
  127. package/dist/tools/index.js +211 -7
  128. package/dist/tools/retry.d.ts +8 -0
  129. package/dist/tools/retry.js +85 -0
  130. package/dist/tools/wip-deploy-assist.d.ts +28 -0
  131. package/dist/tools/wip-deploy-assist.js +278 -0
  132. package/package.json +2 -2
  133. package/dist/schemas/guard-node-examples.md +0 -199
@@ -245,11 +245,102 @@
245
245
  ],
246
246
  "additionalProperties": false,
247
247
  "description": "The created project."
248
+ },
249
+ "recommended_creation_order": {
250
+ "type": "array",
251
+ "items": {
252
+ "type": "object",
253
+ "properties": {
254
+ "step": {
255
+ "type": "number",
256
+ "description": "Step number (1-based)."
257
+ },
258
+ "object": {
259
+ "type": "string",
260
+ "description": "Object type to create (e.g. 'Permission', 'Service (unpublished)')."
261
+ },
262
+ "reason": {
263
+ "type": "string",
264
+ "description": "Why this step is here, including dependencies and irreversibility notes."
265
+ },
266
+ "required": {
267
+ "type": "boolean",
268
+ "description": "Whether this step is mandatory for a working deployment."
269
+ }
270
+ },
271
+ "required": [
272
+ "step",
273
+ "object",
274
+ "reason",
275
+ "required"
276
+ ],
277
+ "additionalProperties": false
278
+ },
279
+ "description": "Canonical deployment sequence satisfying dependency constraints. All industries share this base order; see IndustryMode.build_notes for industry-specific deviations."
280
+ },
281
+ "blueprint": {
282
+ "type": "object",
283
+ "properties": {
284
+ "objects_count": {
285
+ "type": "number",
286
+ "description": "Number of draft objects created from the template."
287
+ },
288
+ "edges_count": {
289
+ "type": "number",
290
+ "description": "Number of graph edges from the template."
291
+ },
292
+ "industry_source": {
293
+ "type": "string",
294
+ "description": "Industry mode name that sourced the template."
295
+ },
296
+ "applied_template": {
297
+ "type": "string",
298
+ "description": "Template identifier applied."
299
+ },
300
+ "steps_count": {
301
+ "type": "number",
302
+ "description": "Number of deployment steps in the template."
303
+ },
304
+ "scenarios_count": {
305
+ "type": "number",
306
+ "description": "Number of scenarios in the template."
307
+ },
308
+ "key_risk": {
309
+ "type": [
310
+ "string",
311
+ "null"
312
+ ],
313
+ "description": "Industry-specific key risk note (or null)."
314
+ }
315
+ },
316
+ "required": [
317
+ "objects_count",
318
+ "edges_count",
319
+ "industry_source",
320
+ "applied_template",
321
+ "steps_count",
322
+ "scenarios_count"
323
+ ],
324
+ "additionalProperties": false,
325
+ "description": "Blueprint summary — present when industry template applied successfully. Objects have status='draft' and address='draft:<name>'."
326
+ },
327
+ "blueprint_warning": {
328
+ "type": "string",
329
+ "description": "Warning message — present when industry template application failed. Project is created without blueprint; use add_object to manually add objects."
330
+ },
331
+ "blueprint_skipped": {
332
+ "type": "boolean",
333
+ "description": "True when skip_templates=true was passed — no industry blueprint objects were created."
334
+ },
335
+ "hint": {
336
+ "type": "string",
337
+ "description": "User-facing hint — guides to next action (e.g. add_object, generate_deployment_doc)."
248
338
  }
249
339
  },
250
340
  "required": [
251
341
  "action",
252
- "project"
342
+ "project",
343
+ "recommended_creation_order"
253
344
  ],
254
345
  "additionalProperties": false
255
346
  },
@@ -344,7 +435,7 @@
344
435
  },
345
436
  "objectAddress": {
346
437
  "type": "string",
347
- "description": "On-chain object address (0x...)."
438
+ "description": "On-chain object address (0x...) or 'draft:<name>' sentinel for blueprint objects."
348
439
  },
349
440
  "objectType": {
350
441
  "type": [
@@ -362,12 +453,7 @@
362
453
  },
363
454
  "role": {
364
455
  "type": "string",
365
- "enum": [
366
- "core",
367
- "dependency",
368
- "reference"
369
- ],
370
- "description": "Object role in project."
456
+ "description": "Object role in project. Valid values: 'core' (the Service), 'dependency' (required binding), 'reference' (optional/auxiliary). Other values indicate data corruption — see objectGroups.other bucket."
371
457
  },
372
458
  "tags": {
373
459
  "anyOf": [
@@ -591,12 +677,128 @@
591
677
  "items": {
592
678
  "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items"
593
679
  },
594
- "description": "Project objects (rigid relationships)."
680
+ "description": "Project objects (rigid relationships). Flat list — use objectGroups for role-based navigation."
681
+ },
682
+ "objectGroups": {
683
+ "type": "object",
684
+ "properties": {
685
+ "core": {
686
+ "type": "array",
687
+ "items": {
688
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items"
689
+ },
690
+ "description": "Core objects (the Service) — the primary deliverable of the project."
691
+ },
692
+ "dependency": {
693
+ "type": "array",
694
+ "items": {
695
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items"
696
+ },
697
+ "description": "Dependency objects (Permission, Machine, Guard, Allocation, Treasury, etc.) — required for the Service to function."
698
+ },
699
+ "reference": {
700
+ "type": "array",
701
+ "items": {
702
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items"
703
+ },
704
+ "description": "Reference objects (read-only or external) — tracked but not owned by this project."
705
+ },
706
+ "other": {
707
+ "type": "array",
708
+ "items": {
709
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/2/properties/objects/items"
710
+ },
711
+ "description": "Objects with invalid or missing role (data corruption, legacy data). Grouped here for visibility — should normally be empty. Check server logs for warnings."
712
+ },
713
+ "stats": {
714
+ "type": "object",
715
+ "properties": {
716
+ "total": {
717
+ "type": "number",
718
+ "description": "Total object count."
719
+ },
720
+ "core_count": {
721
+ "type": "number",
722
+ "description": "Number of core objects."
723
+ },
724
+ "dependency_count": {
725
+ "type": "number",
726
+ "description": "Number of dependency objects."
727
+ },
728
+ "reference_count": {
729
+ "type": "number",
730
+ "description": "Number of reference objects."
731
+ },
732
+ "other_count": {
733
+ "type": "number",
734
+ "description": "Number of objects with invalid/missing role (in 'other' bucket). Normally 0."
735
+ },
736
+ "by_type": {
737
+ "type": "object",
738
+ "additionalProperties": {
739
+ "type": "number"
740
+ },
741
+ "description": "Object count grouped by objectType prefix (e.g. {'service': 1, 'permission': 1, 'guard': 5})."
742
+ }
743
+ },
744
+ "required": [
745
+ "total",
746
+ "core_count",
747
+ "dependency_count",
748
+ "reference_count",
749
+ "other_count",
750
+ "by_type"
751
+ ],
752
+ "additionalProperties": false,
753
+ "description": "Aggregate counts for quick project sizing."
754
+ }
755
+ },
756
+ "required": [
757
+ "core",
758
+ "dependency",
759
+ "reference",
760
+ "other",
761
+ "stats"
762
+ ],
763
+ "additionalProperties": false,
764
+ "description": "Objects grouped by role (core/dependency/reference/other) for easier navigation. The 'other' bucket captures objects with invalid roles (H-05 fix). The flat `objects` array is preserved for backward compatibility."
595
765
  },
596
766
  "graphEdgeCount": {
597
767
  "type": "number",
598
768
  "description": "Number of persisted graph edges."
599
769
  },
770
+ "serviceStatus": {
771
+ "anyOf": [
772
+ {
773
+ "type": "object",
774
+ "properties": {
775
+ "published": {
776
+ "type": [
777
+ "boolean",
778
+ "null"
779
+ ],
780
+ "description": "Whether the on-chain Service is published (live). null = unknown / query failed."
781
+ },
782
+ "paused": {
783
+ "type": [
784
+ "boolean",
785
+ "null"
786
+ ],
787
+ "description": "Whether the on-chain Service is paused (not accepting orders). null = unknown."
788
+ }
789
+ },
790
+ "required": [
791
+ "published",
792
+ "paused"
793
+ ],
794
+ "additionalProperties": false
795
+ },
796
+ {
797
+ "type": "null"
798
+ }
799
+ ],
800
+ "description": "On-chain Service status (published / paused). Separate from the project's local lifecycle status. null if the project has no serviceAddress or the on-chain query failed."
801
+ },
600
802
  "evaluations": {
601
803
  "type": "array",
602
804
  "items": {
@@ -770,7 +972,9 @@
770
972
  "action",
771
973
  "project",
772
974
  "objects",
975
+ "objectGroups",
773
976
  "graphEdgeCount",
977
+ "serviceStatus",
774
978
  "evaluations",
775
979
  "versions"
776
980
  ],
@@ -958,37 +1162,157 @@
958
1162
  "type": "string",
959
1163
  "const": "build_graph"
960
1164
  },
1165
+ "async_mode": {
1166
+ "type": "boolean",
1167
+ "description": "True when graph is building asynchronously (background task). When true, call query_task_status with task_id to retrieve the result."
1168
+ },
1169
+ "task_id": {
1170
+ "type": "string",
1171
+ "description": "Async task id — present only when async_mode=true. Use with query_task_status."
1172
+ },
961
1173
  "nodeCount": {
962
1174
  "type": "number",
963
- "description": "Total nodes in the constructed graph."
1175
+ "description": "Total nodes in the constructed graph (sync mode only)."
964
1176
  },
965
1177
  "edgeCount": {
966
1178
  "type": "number",
967
- "description": "Total edges (after conflict resolution + dedup)."
1179
+ "description": "Total edges (after conflict resolution + dedup) (sync mode only)."
968
1180
  },
969
1181
  "edgesBySource": {
970
1182
  "type": "object",
971
1183
  "additionalProperties": {
972
1184
  "type": "number"
973
1185
  },
974
- "description": "Edge counts by source: { internal: N, registrar: N, potential: N }."
1186
+ "description": "Edge counts by source: { internal: N, registrar: N, potential: N } (sync mode only)."
975
1187
  },
976
1188
  "reputationCount": {
977
1189
  "type": "number",
978
- "description": "Number of objects with Registrar reputation data."
1190
+ "description": "Number of objects with Registrar reputation data (sync mode only)."
979
1191
  },
980
1192
  "builtAt": {
981
1193
  "type": "number",
982
- "description": "Build timestamp (ms)."
1194
+ "description": "Build timestamp in ms (sync mode only)."
1195
+ },
1196
+ "binding_verification": {
1197
+ "anyOf": [
1198
+ {
1199
+ "type": "object",
1200
+ "properties": {
1201
+ "service": {
1202
+ "type": "string",
1203
+ "description": "Service object address that was verified."
1204
+ },
1205
+ "bindings": {
1206
+ "type": "object",
1207
+ "additionalProperties": {
1208
+ "type": "object",
1209
+ "properties": {
1210
+ "expected": {
1211
+ "type": "string",
1212
+ "description": "Expected target object type."
1213
+ },
1214
+ "actual": {
1215
+ "type": [
1216
+ "string",
1217
+ "null"
1218
+ ],
1219
+ "description": "Actual on-chain value (address or null)."
1220
+ },
1221
+ "count": {
1222
+ "type": "number",
1223
+ "description": "Item count for array fields (order_allocators, arbitrations)."
1224
+ },
1225
+ "verified": {
1226
+ "type": "boolean",
1227
+ "description": "Whether the binding exists on-chain."
1228
+ }
1229
+ },
1230
+ "required": [
1231
+ "expected",
1232
+ "actual",
1233
+ "verified"
1234
+ ],
1235
+ "additionalProperties": false
1236
+ },
1237
+ "description": "Per-field binding verification result."
1238
+ },
1239
+ "all_verified": {
1240
+ "type": "boolean",
1241
+ "description": "True when all critical bindings exist on-chain."
1242
+ }
1243
+ },
1244
+ "required": [
1245
+ "service",
1246
+ "bindings",
1247
+ "all_verified"
1248
+ ],
1249
+ "additionalProperties": false
1250
+ },
1251
+ {
1252
+ "type": "null"
1253
+ }
1254
+ ],
1255
+ "description": "On-chain verification of Service bindings (F-15). Null when no Service address or query failed. Sync mode only."
1256
+ },
1257
+ "topEdges": {
1258
+ "type": "array",
1259
+ "items": {
1260
+ "type": "object",
1261
+ "properties": {
1262
+ "source": {
1263
+ "type": "string",
1264
+ "description": "Source object address."
1265
+ },
1266
+ "target": {
1267
+ "type": "string",
1268
+ "description": "Target object address."
1269
+ },
1270
+ "fieldName": {
1271
+ "type": [
1272
+ "string",
1273
+ "null"
1274
+ ],
1275
+ "description": "Field name on the source object (or null)."
1276
+ },
1277
+ "relationshipType": {
1278
+ "type": "string",
1279
+ "description": "Relationship type (bind, create, trigger, etc.)."
1280
+ },
1281
+ "weight": {
1282
+ "type": [
1283
+ "number",
1284
+ "null"
1285
+ ],
1286
+ "description": "Edge weight (0-1, higher = more important)."
1287
+ },
1288
+ "verified": {
1289
+ "type": "boolean",
1290
+ "description": "Whether the edge has been verified on-chain."
1291
+ }
1292
+ },
1293
+ "required": [
1294
+ "source",
1295
+ "target",
1296
+ "fieldName",
1297
+ "relationshipType",
1298
+ "weight",
1299
+ "verified"
1300
+ ],
1301
+ "additionalProperties": false
1302
+ },
1303
+ "description": "Top 5 critical edges by weight (sync mode only). Preview of the most important relationships — call get_graph for the full list."
1304
+ },
1305
+ "visualization": {
1306
+ "type": "string",
1307
+ "description": "Mermaid-style ASCII visualization of top edges (sync mode only). Compact format: 'source --field--> target'."
1308
+ },
1309
+ "hint": {
1310
+ "type": "string",
1311
+ "description": "User-facing hint — guides to next action (e.g. call get_graph for full list, or query_task_status for async result)."
983
1312
  }
984
1313
  },
985
1314
  "required": [
986
- "action",
987
- "nodeCount",
988
- "edgeCount",
989
- "edgesBySource",
990
- "reputationCount",
991
- "builtAt"
1315
+ "action"
992
1316
  ],
993
1317
  "additionalProperties": false
994
1318
  },
@@ -1531,7 +1855,7 @@
1531
1855
  ],
1532
1856
  "additionalProperties": false
1533
1857
  },
1534
- "description": "D-01..D-18 check results."
1858
+ "description": "D-01..D-20 check results (20 deployment checks including D-19 Machine entry-node forward and D-20 Service compensation_fund)."
1535
1859
  },
1536
1860
  "errors": {
1537
1861
  "type": "array",
@@ -1547,18 +1871,846 @@
1547
1871
  "errors"
1548
1872
  ],
1549
1873
  "additionalProperties": false,
1550
- "description": "Deployment doc validation result against D-01..D-18."
1874
+ "description": "Deployment doc validation result against D-01..D-20."
1551
1875
  },
1552
1876
  "saved": {
1553
1877
  "type": "boolean",
1554
1878
  "description": "Whether the markdown was persisted to SQLite project_documents table."
1879
+ },
1880
+ "detail_level": {
1881
+ "type": "string",
1882
+ "enum": [
1883
+ "summary",
1884
+ "detailed",
1885
+ "full"
1886
+ ],
1887
+ "description": "Effective detail level used to render the deployment doc. 'summary' (default) shows only key bindings; 'detailed' adds sale/arbitration lists; 'full' shows complete config."
1888
+ },
1889
+ "stage_gate": {
1890
+ "type": "object",
1891
+ "properties": {
1892
+ "stage": {
1893
+ "type": "number",
1894
+ "description": "The stage that was validated (4 = deployment doc generation gate)."
1895
+ },
1896
+ "passed": {
1897
+ "type": "boolean",
1898
+ "description": "True iff no FAIL checks exist — gate allows advancing to Stage 5."
1899
+ },
1900
+ "can_proceed": {
1901
+ "type": "boolean",
1902
+ "description": "Alias for `passed` — whether the stage gate allows advancement."
1903
+ },
1904
+ "blocking_issues": {
1905
+ "type": "array",
1906
+ "items": {
1907
+ "type": "string"
1908
+ },
1909
+ "description": "FAIL status messages — must be resolved before deploying."
1910
+ },
1911
+ "warnings": {
1912
+ "type": "array",
1913
+ "items": {
1914
+ "type": "string"
1915
+ },
1916
+ "description": "WARN status messages — non-blocking, user may proceed at own risk."
1917
+ },
1918
+ "checks": {
1919
+ "type": "array",
1920
+ "items": {
1921
+ "type": "object",
1922
+ "properties": {
1923
+ "dimension": {
1924
+ "type": "string",
1925
+ "enum": [
1926
+ "semantic",
1927
+ "tools",
1928
+ "reversibility",
1929
+ "risk",
1930
+ "isolation",
1931
+ "gas_budget"
1932
+ ],
1933
+ "description": "The validation dimension."
1934
+ },
1935
+ "status": {
1936
+ "type": "string",
1937
+ "enum": [
1938
+ "PASS",
1939
+ "WARN",
1940
+ "FAIL"
1941
+ ],
1942
+ "description": "Check result status."
1943
+ },
1944
+ "message": {
1945
+ "type": "string",
1946
+ "description": "Human-readable check result message."
1947
+ }
1948
+ },
1949
+ "required": [
1950
+ "dimension",
1951
+ "status",
1952
+ "message"
1953
+ ],
1954
+ "additionalProperties": false
1955
+ },
1956
+ "description": "Per-dimension check results."
1957
+ }
1958
+ },
1959
+ "required": [
1960
+ "stage",
1961
+ "passed",
1962
+ "can_proceed",
1963
+ "blocking_issues",
1964
+ "warnings",
1965
+ "checks"
1966
+ ],
1967
+ "additionalProperties": false,
1968
+ "description": "Stage gate validation (GLM6 5-stage lifecycle 衔接). Validates Stage 3 risk score threshold (>=80 PASS, >=50 WARN, <50 FAIL) and Stage 4 deployment doc generation prerequisite."
1969
+ },
1970
+ "deployment_scan": {
1971
+ "type": "object",
1972
+ "properties": {
1973
+ "overall_readiness": {
1974
+ "type": "string",
1975
+ "enum": [
1976
+ "ready",
1977
+ "blocked",
1978
+ "warnings"
1979
+ ],
1980
+ "description": "'ready' = all 20 checks pass; 'blocked' = any critical fail; 'warnings' = only warning fails."
1981
+ },
1982
+ "critical_count": {
1983
+ "type": "number",
1984
+ "description": "Number of critical findings (blocks deployment)."
1985
+ },
1986
+ "warning_count": {
1987
+ "type": "number",
1988
+ "description": "Number of warning findings (non-blocking)."
1989
+ },
1990
+ "findings": {
1991
+ "type": "array",
1992
+ "items": {
1993
+ "type": "object",
1994
+ "properties": {
1995
+ "check_id": {
1996
+ "type": "string",
1997
+ "description": "D-XX check id (e.g. 'D-19') or sub-id (e.g. 'D-10a')."
1998
+ },
1999
+ "severity": {
2000
+ "type": "string",
2001
+ "enum": [
2002
+ "critical",
2003
+ "warning",
2004
+ "info"
2005
+ ],
2006
+ "description": "Finding severity."
2007
+ },
2008
+ "message": {
2009
+ "type": "string",
2010
+ "description": "Human-readable finding message."
2011
+ },
2012
+ "location": {
2013
+ "type": "string",
2014
+ "description": "Document location (section, line, or step id)."
2015
+ },
2016
+ "suggestion": {
2017
+ "type": "string",
2018
+ "description": "Suggested fix."
2019
+ }
2020
+ },
2021
+ "required": [
2022
+ "check_id",
2023
+ "severity",
2024
+ "message"
2025
+ ],
2026
+ "additionalProperties": false
2027
+ },
2028
+ "description": "All findings from the 20 D-XX deployment checks."
2029
+ },
2030
+ "checks": {
2031
+ "type": "object",
2032
+ "properties": {
2033
+ "D01_object_defined": {
2034
+ "type": "string",
2035
+ "enum": [
2036
+ "pass",
2037
+ "fail"
2038
+ ]
2039
+ },
2040
+ "D02_dependency_complete": {
2041
+ "type": "string",
2042
+ "enum": [
2043
+ "pass",
2044
+ "fail"
2045
+ ]
2046
+ },
2047
+ "D03_scenario_covered": {
2048
+ "type": "string",
2049
+ "enum": [
2050
+ "pass",
2051
+ "fail"
2052
+ ]
2053
+ },
2054
+ "D04_testnet_topo_order": {
2055
+ "type": "string",
2056
+ "enum": [
2057
+ "pass",
2058
+ "fail"
2059
+ ]
2060
+ },
2061
+ "D05_testnet_network": {
2062
+ "type": "string",
2063
+ "enum": [
2064
+ "pass",
2065
+ "fail"
2066
+ ]
2067
+ },
2068
+ "D06_testnet_replace": {
2069
+ "type": "string",
2070
+ "enum": [
2071
+ "pass",
2072
+ "fail"
2073
+ ]
2074
+ },
2075
+ "D07_permission_index": {
2076
+ "type": "string",
2077
+ "enum": [
2078
+ "pass",
2079
+ "fail"
2080
+ ]
2081
+ },
2082
+ "D08_guard_gen_passport": {
2083
+ "type": "string",
2084
+ "enum": [
2085
+ "pass",
2086
+ "fail"
2087
+ ]
2088
+ },
2089
+ "D09_machine_node_count": {
2090
+ "type": "string",
2091
+ "enum": [
2092
+ "pass",
2093
+ "fail"
2094
+ ]
2095
+ },
2096
+ "D10_substep_coherence": {
2097
+ "type": "string",
2098
+ "enum": [
2099
+ "pass",
2100
+ "fail"
2101
+ ]
2102
+ },
2103
+ "D11_mainnet_testnet_match": {
2104
+ "type": "string",
2105
+ "enum": [
2106
+ "pass",
2107
+ "fail"
2108
+ ]
2109
+ },
2110
+ "D12_mainnet_network": {
2111
+ "type": "string",
2112
+ "enum": [
2113
+ "pass",
2114
+ "fail"
2115
+ ]
2116
+ },
2117
+ "D13_mainnet_replace": {
2118
+ "type": "string",
2119
+ "enum": [
2120
+ "pass",
2121
+ "fail"
2122
+ ]
2123
+ },
2124
+ "D14_testnet_verification": {
2125
+ "type": "string",
2126
+ "enum": [
2127
+ "pass",
2128
+ "fail"
2129
+ ]
2130
+ },
2131
+ "D15_mainnet_verification": {
2132
+ "type": "string",
2133
+ "enum": [
2134
+ "pass",
2135
+ "fail"
2136
+ ]
2137
+ },
2138
+ "D16_no_critical_risk": {
2139
+ "type": "string",
2140
+ "enum": [
2141
+ "pass",
2142
+ "fail"
2143
+ ]
2144
+ },
2145
+ "D17_no_high_risk": {
2146
+ "type": "string",
2147
+ "enum": [
2148
+ "pass",
2149
+ "fail"
2150
+ ]
2151
+ },
2152
+ "D18_completeness_checklist": {
2153
+ "type": "string",
2154
+ "enum": [
2155
+ "pass",
2156
+ "fail"
2157
+ ]
2158
+ },
2159
+ "D19_machine_entry_forward": {
2160
+ "type": "string",
2161
+ "enum": [
2162
+ "pass",
2163
+ "fail"
2164
+ ],
2165
+ "description": "Machine entry node (prev_node='') forwards non-empty — avoids Progress stuck at current=''."
2166
+ },
2167
+ "D20_service_compensation_fund": {
2168
+ "type": "string",
2169
+ "enum": [
2170
+ "pass",
2171
+ "fail"
2172
+ ],
2173
+ "description": "Service compensation_fund (Balance<T>) present or industry-exempt — ensures arbitration refund capability."
2174
+ }
2175
+ },
2176
+ "required": [
2177
+ "D01_object_defined",
2178
+ "D02_dependency_complete",
2179
+ "D03_scenario_covered",
2180
+ "D04_testnet_topo_order",
2181
+ "D05_testnet_network",
2182
+ "D06_testnet_replace",
2183
+ "D07_permission_index",
2184
+ "D08_guard_gen_passport",
2185
+ "D09_machine_node_count",
2186
+ "D10_substep_coherence",
2187
+ "D11_mainnet_testnet_match",
2188
+ "D12_mainnet_network",
2189
+ "D13_mainnet_replace",
2190
+ "D14_testnet_verification",
2191
+ "D15_mainnet_verification",
2192
+ "D16_no_critical_risk",
2193
+ "D17_no_high_risk",
2194
+ "D18_completeness_checklist",
2195
+ "D19_machine_entry_forward",
2196
+ "D20_service_compensation_fund"
2197
+ ],
2198
+ "additionalProperties": false,
2199
+ "description": "Per-check pass/fail status for all 20 D-XX checks."
2200
+ }
2201
+ },
2202
+ "required": [
2203
+ "overall_readiness",
2204
+ "critical_count",
2205
+ "warning_count",
2206
+ "findings",
2207
+ "checks"
2208
+ ],
2209
+ "additionalProperties": false,
2210
+ "description": "Deployment scanner result — 20 D-XX checks including D-19 (Machine entry forward) and D-20 (Service compensation_fund)."
1555
2211
  }
1556
2212
  },
1557
2213
  "required": [
1558
2214
  "action",
1559
2215
  "markdown",
1560
2216
  "validation",
1561
- "saved"
2217
+ "saved",
2218
+ "detail_level",
2219
+ "stage_gate",
2220
+ "deployment_scan"
2221
+ ],
2222
+ "additionalProperties": false
2223
+ },
2224
+ {
2225
+ "type": "object",
2226
+ "properties": {
2227
+ "action": {
2228
+ "type": "string",
2229
+ "const": "pre_evaluate_check"
2230
+ },
2231
+ "ready": {
2232
+ "type": "boolean",
2233
+ "description": "True if evaluate_project will produce meaningful results (no hard blockers). If false, address the items in `missing` first."
2234
+ },
2235
+ "missing": {
2236
+ "type": "array",
2237
+ "items": {
2238
+ "type": "object",
2239
+ "properties": {
2240
+ "id": {
2241
+ "type": "string",
2242
+ "description": "Check ID (e.g. PE-01, PE-06)."
2243
+ },
2244
+ "description": {
2245
+ "type": "string",
2246
+ "description": "What is missing."
2247
+ },
2248
+ "impact": {
2249
+ "type": "string",
2250
+ "description": "How it affects the evaluation, and how to fix it."
2251
+ }
2252
+ },
2253
+ "required": [
2254
+ "id",
2255
+ "description",
2256
+ "impact"
2257
+ ],
2258
+ "additionalProperties": false
2259
+ },
2260
+ "description": "Hard blockers — must be resolved before evaluation."
2261
+ },
2262
+ "warnings": {
2263
+ "type": "array",
2264
+ "items": {
2265
+ "type": "object",
2266
+ "properties": {
2267
+ "id": {
2268
+ "type": "string",
2269
+ "description": "Check ID (e.g. PE-02, PE-03)."
2270
+ },
2271
+ "description": {
2272
+ "type": "string",
2273
+ "description": "What is suboptimal."
2274
+ },
2275
+ "impact": {
2276
+ "type": "string",
2277
+ "description": "How it affects the evaluation, and how to improve it."
2278
+ }
2279
+ },
2280
+ "required": [
2281
+ "id",
2282
+ "description",
2283
+ "impact"
2284
+ ],
2285
+ "additionalProperties": false
2286
+ },
2287
+ "description": "Soft issues — evaluation runs but quality may be reduced."
2288
+ },
2289
+ "summary": {
2290
+ "type": "string",
2291
+ "description": "One-line human-readable status."
2292
+ },
2293
+ "counts": {
2294
+ "type": "object",
2295
+ "properties": {
2296
+ "objects": {
2297
+ "type": "number",
2298
+ "description": "Total project_objects count."
2299
+ },
2300
+ "edges": {
2301
+ "type": "number",
2302
+ "description": "Total graph_edges count."
2303
+ },
2304
+ "uncached": {
2305
+ "type": "number",
2306
+ "description": "Objects with no cached on-chain data."
2307
+ },
2308
+ "stale": {
2309
+ "type": "number",
2310
+ "description": "Objects with cache older than 24 hours."
2311
+ },
2312
+ "dangling_edges": {
2313
+ "type": "number",
2314
+ "description": "Edges referencing objects not in project_objects."
2315
+ },
2316
+ "drafts": {
2317
+ "type": "number",
2318
+ "description": "Objects still in draft (not yet on-chain)."
2319
+ }
2320
+ },
2321
+ "required": [
2322
+ "objects",
2323
+ "edges",
2324
+ "uncached",
2325
+ "stale",
2326
+ "dangling_edges",
2327
+ "drafts"
2328
+ ],
2329
+ "additionalProperties": false,
2330
+ "description": "Quick-scan counts for triage."
2331
+ }
2332
+ },
2333
+ "required": [
2334
+ "action",
2335
+ "ready",
2336
+ "missing",
2337
+ "warnings",
2338
+ "summary",
2339
+ "counts"
2340
+ ],
2341
+ "additionalProperties": false
2342
+ },
2343
+ {
2344
+ "type": "object",
2345
+ "properties": {
2346
+ "action": {
2347
+ "type": "string",
2348
+ "const": "verify_deployment"
2349
+ },
2350
+ "verifiedCount": {
2351
+ "type": "number",
2352
+ "description": "Number of objects actually verified (excludes drafts and unreachable)."
2353
+ },
2354
+ "matched": {
2355
+ "type": "number",
2356
+ "description": "Objects whose on-chain state matches SQLite."
2357
+ },
2358
+ "mismatched": {
2359
+ "type": "number",
2360
+ "description": "Objects whose on-chain state differs from SQLite (see `results[].differences`)."
2361
+ },
2362
+ "missing": {
2363
+ "type": "number",
2364
+ "description": "Objects that no longer exist on-chain (deleted or never deployed)."
2365
+ },
2366
+ "unreachable": {
2367
+ "type": "number",
2368
+ "description": "Objects that could not be queried (network error)."
2369
+ },
2370
+ "results": {
2371
+ "type": "array",
2372
+ "items": {
2373
+ "type": "object",
2374
+ "properties": {
2375
+ "objectAddress": {
2376
+ "type": "string"
2377
+ },
2378
+ "objectName": {
2379
+ "type": [
2380
+ "string",
2381
+ "null"
2382
+ ]
2383
+ },
2384
+ "objectType": {
2385
+ "type": [
2386
+ "string",
2387
+ "null"
2388
+ ]
2389
+ },
2390
+ "status": {
2391
+ "type": "string",
2392
+ "enum": [
2393
+ "matched",
2394
+ "mismatched",
2395
+ "missing",
2396
+ "unreachable"
2397
+ ],
2398
+ "description": "Verification status: 'matched' = on-chain matches SQLite; 'mismatched' = on-chain differs (see differences); 'missing' = object no longer exists on-chain; 'unreachable' = query failed (network error or rate limit)."
2399
+ },
2400
+ "differences": {
2401
+ "type": "array",
2402
+ "items": {
2403
+ "type": "object",
2404
+ "properties": {
2405
+ "field": {
2406
+ "type": "string",
2407
+ "description": "Field path that differs."
2408
+ },
2409
+ "sqlite": {
2410
+ "description": "Value recorded in SQLite."
2411
+ },
2412
+ "onchain": {
2413
+ "description": "Value observed on-chain."
2414
+ }
2415
+ },
2416
+ "required": [
2417
+ "field"
2418
+ ],
2419
+ "additionalProperties": false
2420
+ },
2421
+ "description": "Per-field differences (only for status='mismatched')."
2422
+ },
2423
+ "bindings": {
2424
+ "type": "object",
2425
+ "properties": {
2426
+ "machine": {
2427
+ "type": "boolean"
2428
+ },
2429
+ "permission": {
2430
+ "type": "boolean"
2431
+ },
2432
+ "buy_guard": {
2433
+ "type": "boolean"
2434
+ },
2435
+ "order_allocators": {
2436
+ "type": "boolean"
2437
+ }
2438
+ },
2439
+ "required": [
2440
+ "machine",
2441
+ "permission",
2442
+ "buy_guard",
2443
+ "order_allocators"
2444
+ ],
2445
+ "additionalProperties": false,
2446
+ "description": "Critical binding status (only for Service objects). Each boolean indicates whether the binding is set to a non-null value on-chain."
2447
+ },
2448
+ "error": {
2449
+ "type": "string",
2450
+ "description": "Error message (only for status='unreachable')."
2451
+ }
2452
+ },
2453
+ "required": [
2454
+ "objectAddress",
2455
+ "objectName",
2456
+ "objectType",
2457
+ "status"
2458
+ ],
2459
+ "additionalProperties": false
2460
+ },
2461
+ "description": "Per-object verification results."
2462
+ },
2463
+ "summary": {
2464
+ "type": "string",
2465
+ "description": "One-line human-readable summary."
2466
+ }
2467
+ },
2468
+ "required": [
2469
+ "action",
2470
+ "verifiedCount",
2471
+ "matched",
2472
+ "mismatched",
2473
+ "missing",
2474
+ "unreachable",
2475
+ "results",
2476
+ "summary"
2477
+ ],
2478
+ "additionalProperties": false
2479
+ },
2480
+ {
2481
+ "type": "object",
2482
+ "properties": {
2483
+ "action": {
2484
+ "type": "string",
2485
+ "const": "get_machine_graph"
2486
+ },
2487
+ "machineAddress": {
2488
+ "type": "string",
2489
+ "description": "The Machine object address."
2490
+ },
2491
+ "machineName": {
2492
+ "type": [
2493
+ "string",
2494
+ "null"
2495
+ ],
2496
+ "description": "The Machine's local name (from LocalMark) if available."
2497
+ },
2498
+ "nodes": {
2499
+ "type": "array",
2500
+ "items": {
2501
+ "type": "object",
2502
+ "properties": {
2503
+ "name": {
2504
+ "type": "string",
2505
+ "description": "Node name."
2506
+ },
2507
+ "description": {
2508
+ "type": [
2509
+ "string",
2510
+ "null"
2511
+ ],
2512
+ "description": "Node description if set, else null."
2513
+ }
2514
+ },
2515
+ "required": [
2516
+ "name",
2517
+ "description"
2518
+ ],
2519
+ "additionalProperties": false
2520
+ },
2521
+ "description": "Workflow nodes (states)."
2522
+ },
2523
+ "edges": {
2524
+ "type": "array",
2525
+ "items": {
2526
+ "type": "object",
2527
+ "properties": {
2528
+ "from": {
2529
+ "type": "string",
2530
+ "description": "Source node name (prev_node)."
2531
+ },
2532
+ "to": {
2533
+ "type": "string",
2534
+ "description": "Target node name (next_node)."
2535
+ },
2536
+ "threshold": {
2537
+ "type": "number",
2538
+ "description": "Minimum weighted forward count required to advance."
2539
+ },
2540
+ "forwards": {
2541
+ "type": "array",
2542
+ "items": {
2543
+ "type": "object",
2544
+ "properties": {
2545
+ "name": {
2546
+ "type": "string",
2547
+ "description": "Forward name."
2548
+ },
2549
+ "weight": {
2550
+ "type": "number",
2551
+ "description": "Forward weight (for weighted threshold)."
2552
+ },
2553
+ "guard": {
2554
+ "type": [
2555
+ "string",
2556
+ "null"
2557
+ ],
2558
+ "description": "Guard object address if the forward is guard-gated, else null."
2559
+ },
2560
+ "named_operator": {
2561
+ "type": [
2562
+ "string",
2563
+ "null"
2564
+ ],
2565
+ "description": "Named operator if set, else null."
2566
+ },
2567
+ "permission_index": {
2568
+ "type": [
2569
+ "number",
2570
+ "null"
2571
+ ],
2572
+ "description": "Permission index if set, else null."
2573
+ }
2574
+ },
2575
+ "required": [
2576
+ "name",
2577
+ "weight",
2578
+ "guard",
2579
+ "named_operator",
2580
+ "permission_index"
2581
+ ],
2582
+ "additionalProperties": false
2583
+ },
2584
+ "description": "Forwards within this pair — each is an advance operation."
2585
+ }
2586
+ },
2587
+ "required": [
2588
+ "from",
2589
+ "to",
2590
+ "threshold",
2591
+ "forwards"
2592
+ ],
2593
+ "additionalProperties": false
2594
+ },
2595
+ "description": "Directed edges (pairs) connecting nodes. Each edge has a threshold and forwards."
2596
+ },
2597
+ "published": {
2598
+ "type": [
2599
+ "boolean",
2600
+ "null"
2601
+ ],
2602
+ "description": "Whether the Machine is published (locked for production). null = unknown."
2603
+ },
2604
+ "paused": {
2605
+ "type": [
2606
+ "boolean",
2607
+ "null"
2608
+ ],
2609
+ "description": "Whether the Machine is paused (not generating new Progress). null = unknown."
2610
+ }
2611
+ },
2612
+ "required": [
2613
+ "action",
2614
+ "machineAddress",
2615
+ "machineName",
2616
+ "nodes",
2617
+ "edges",
2618
+ "published",
2619
+ "paused"
2620
+ ],
2621
+ "additionalProperties": false
2622
+ },
2623
+ {
2624
+ "type": "object",
2625
+ "properties": {
2626
+ "action": {
2627
+ "type": "string",
2628
+ "const": "clone_project_to_network"
2629
+ },
2630
+ "new_project_id": {
2631
+ "type": "string",
2632
+ "description": "The newly created project's UUID."
2633
+ },
2634
+ "new_prefix": {
2635
+ "type": "string",
2636
+ "description": "New project prefix ('<source_prefix>_<target_network>')."
2637
+ },
2638
+ "target_network": {
2639
+ "type": "string",
2640
+ "enum": [
2641
+ "testnet",
2642
+ "mainnet"
2643
+ ],
2644
+ "description": "The target network the new project is bound to."
2645
+ },
2646
+ "cloned_objects_count": {
2647
+ "type": "number",
2648
+ "description": "Number of object metadata entries copied (objectAddress is empty — await on-chain deployment)."
2649
+ },
2650
+ "message": {
2651
+ "type": "string",
2652
+ "description": "Human-readable summary of the clone operation."
2653
+ },
2654
+ "next_steps": {
2655
+ "type": "string",
2656
+ "description": "Instructions for deploying the cloned objects on the target network."
2657
+ }
2658
+ },
2659
+ "required": [
2660
+ "action",
2661
+ "new_project_id",
2662
+ "new_prefix",
2663
+ "target_network",
2664
+ "cloned_objects_count",
2665
+ "message",
2666
+ "next_steps"
2667
+ ],
2668
+ "additionalProperties": false
2669
+ },
2670
+ {
2671
+ "type": "object",
2672
+ "properties": {
2673
+ "action": {
2674
+ "type": "string",
2675
+ "const": "migrate_network"
2676
+ },
2677
+ "new_project_id": {
2678
+ "type": "string",
2679
+ "description": "The newly created project's UUID."
2680
+ },
2681
+ "new_prefix": {
2682
+ "type": "string",
2683
+ "description": "New project prefix ('<source_prefix>_<target_network>')."
2684
+ },
2685
+ "target_network": {
2686
+ "type": "string",
2687
+ "enum": [
2688
+ "testnet",
2689
+ "mainnet"
2690
+ ],
2691
+ "description": "The target network the new project is bound to."
2692
+ },
2693
+ "cloned_objects_count": {
2694
+ "type": "number",
2695
+ "description": "Number of object metadata entries copied (objectAddress is empty — await on-chain deployment)."
2696
+ },
2697
+ "message": {
2698
+ "type": "string",
2699
+ "description": "Human-readable summary of the migration operation."
2700
+ },
2701
+ "next_steps": {
2702
+ "type": "string",
2703
+ "description": "Instructions for deploying the migrated objects on the target network."
2704
+ }
2705
+ },
2706
+ "required": [
2707
+ "action",
2708
+ "new_project_id",
2709
+ "new_prefix",
2710
+ "target_network",
2711
+ "cloned_objects_count",
2712
+ "message",
2713
+ "next_steps"
1562
2714
  ],
1563
2715
  "additionalProperties": false
1564
2716
  }