@wowok/agent-mcp 2.6.3 → 2.6.6

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 (193) hide show
  1. package/README.md +13 -9
  2. package/dist/customer/customer-advice.d.ts +31 -0
  3. package/dist/customer/customer-advice.js +129 -0
  4. package/dist/customer/index.d.ts +2 -0
  5. package/dist/customer/index.js +2 -0
  6. package/dist/customer/info-puzzle.d.ts +8 -1
  7. package/dist/customer/info-puzzle.js +30 -5
  8. package/dist/customer/order-monitor.d.ts +2 -0
  9. package/dist/customer/order-monitor.js +3 -2
  10. package/dist/customer/post-purchase.d.ts +2 -0
  11. package/dist/customer/post-purchase.js +6 -5
  12. package/dist/customer/preorder-compare.d.ts +24 -0
  13. package/dist/customer/preorder-compare.js +34 -0
  14. package/dist/customer/reminder-system.d.ts +2 -0
  15. package/dist/customer/reminder-system.js +2 -1
  16. package/dist/customer/risk-assessment.js +4 -3
  17. package/dist/customer/types.d.ts +5 -0
  18. package/dist/examples/arbitration-dispute-create.json +41 -0
  19. package/dist/examples/arbitration-vote-weighted.json +35 -0
  20. package/dist/examples/arbitration-voting-guard-add.json +38 -0
  21. package/dist/examples/demand-present-service.json +33 -0
  22. package/dist/examples/gen-passport-verify-guard.json +48 -0
  23. package/dist/examples/guard-template-balance-check.json +36 -15
  24. package/dist/examples/guard-template-time-lock.json +33 -12
  25. package/dist/examples/insurance-guard-claim-timelock.json +75 -0
  26. package/dist/examples/insurance-guard-withdraw-allocation.json +96 -0
  27. package/dist/examples/insurance-machine-create-publish.json +75 -0
  28. package/dist/examples/insurance-service-allocators-publish.json +56 -0
  29. package/dist/examples/machine-multisig-threshold.json +86 -0
  30. package/dist/examples/machine-template-7node-rental.json +99 -94
  31. package/dist/examples/payment-scenario-bound.json +45 -0
  32. package/dist/examples/rental-ziroom-machine-create.json +126 -114
  33. package/dist/examples/rental-ziroom-permission-create.json +10 -3
  34. package/dist/examples/rental-ziroom-service-create.json +27 -18
  35. package/dist/examples/retail-adv-guard-customer-win-create.json +80 -0
  36. package/dist/examples/retail-adv-guard-messenger-proof-create.json +65 -0
  37. package/dist/examples/retail-adv-guard-reward-timeout-create.json +92 -0
  38. package/dist/examples/retail-adv-reward-guard-add.json +51 -0
  39. package/dist/examples/retail-myshop-allocation-activate.json +55 -0
  40. package/dist/examples/retail-myshop-arbitration-create.json +40 -0
  41. package/dist/examples/retail-myshop-contact-create.json +43 -0
  42. package/dist/examples/retail-myshop-order-create.json +56 -0
  43. package/dist/examples/retail-myshop-progress-operate.json +38 -0
  44. package/dist/examples/retail-myshop-reward-create.json +35 -0
  45. package/dist/examples/service-discount-issue.json +46 -0
  46. package/dist/examples/threebody-guard-create.json +56 -0
  47. package/dist/examples/threebody-machine-create.json +72 -0
  48. package/dist/examples/threebody-permission-create.json +38 -0
  49. package/dist/examples/threebody-service-allocators.json +49 -0
  50. package/dist/examples/travel-guard-time-lock.json +69 -0
  51. package/dist/examples/travel-guard-weather-oracle.json +70 -0
  52. package/dist/examples/travel-machine-create.json +136 -0
  53. package/dist/examples/travel-repository-create.json +47 -0
  54. package/dist/examples/travel-service-create.json +102 -0
  55. package/dist/examples/travel-treasury-create.json +34 -0
  56. package/dist/examples/treasury-deposit.json +37 -0
  57. package/dist/examples/treasury-withdraw.json +38 -0
  58. package/dist/extensions/business-modules.d.ts +49 -0
  59. package/dist/extensions/business-modules.js +287 -0
  60. package/dist/extensions/capability-manifest.js +192 -5
  61. package/dist/extensions/constraint-registry.js +3 -1
  62. package/dist/extensions/modes.js +10 -4
  63. package/dist/extensions/registry.d.ts +14 -9
  64. package/dist/extensions/registry.js +69 -14
  65. package/dist/extensions/types.d.ts +1 -0
  66. package/dist/knowledge/fund-layer.d.ts +67 -1
  67. package/dist/knowledge/fund-layer.js +561 -12
  68. package/dist/knowledge/guard-templates.d.ts +10 -0
  69. package/dist/knowledge/guard-templates.js +50 -0
  70. package/dist/knowledge/index.d.ts +2 -2
  71. package/dist/knowledge/index.js +2 -2
  72. package/dist/knowledge/machine-risk.js +4 -1
  73. package/dist/knowledge/progress-context.js +1 -1
  74. package/dist/knowledge/progress-ledger.js +3 -3
  75. package/dist/knowledge/progress-templates.js +1 -1
  76. package/dist/knowledge/progress-translation.js +1 -1
  77. package/dist/knowledge/safety-rules.d.ts +83 -1
  78. package/dist/knowledge/safety-rules.js +166 -2
  79. package/dist/knowledge/scenario-modes.d.ts +1 -1
  80. package/dist/knowledge/scenario-modes.js +13 -11
  81. package/dist/knowledge/template-registry.d.ts +48 -0
  82. package/dist/knowledge/template-registry.js +341 -0
  83. package/dist/knowledge/tool-constraints.js +6 -6
  84. package/dist/knowledge/tools-reference.js +11 -8
  85. package/dist/participation/merchant-interest.d.ts +32 -0
  86. package/dist/participation/merchant-interest.js +100 -0
  87. package/dist/participation/radar-core.d.ts +104 -0
  88. package/dist/participation/radar-core.js +269 -0
  89. package/dist/project/context-assembly.js +8 -0
  90. package/dist/project/edit-planner.js +27 -56
  91. package/dist/project/evaluation.d.ts +36 -0
  92. package/dist/project/evaluation.js +422 -56
  93. package/dist/project/game-theory.d.ts +43 -0
  94. package/dist/project/game-theory.js +177 -0
  95. package/dist/project/graph-builder.js +1 -0
  96. package/dist/project/handlers.d.ts +38 -0
  97. package/dist/project/handlers.js +65 -35
  98. package/dist/project/intent-analyzer.d.ts +71 -0
  99. package/dist/project/intent-analyzer.js +149 -0
  100. package/dist/project/machine-nodes.d.ts +2 -0
  101. package/dist/project/machine-nodes.js +36 -0
  102. package/dist/project/merchant-guide.d.ts +165 -0
  103. package/dist/project/merchant-guide.js +264 -0
  104. package/dist/project/mode-actions.d.ts +199 -0
  105. package/dist/project/mode-actions.js +309 -0
  106. package/dist/project/participation-radar.d.ts +18 -0
  107. package/dist/project/participation-radar.js +428 -0
  108. package/dist/project/pipeline-actions.d.ts +101 -0
  109. package/dist/project/pipeline-actions.js +109 -0
  110. package/dist/project/semantic-graph.d.ts +95 -0
  111. package/dist/project/semantic-graph.js +245 -0
  112. package/dist/schema/call/allocation.d.ts +11 -11
  113. package/dist/schema/call/allocation.js +11 -1
  114. package/dist/schema/call/arbitration.d.ts +21 -21
  115. package/dist/schema/call/arbitration.js +17 -9
  116. package/dist/schema/call/base.d.ts +2 -2
  117. package/dist/schema/call/base.js +1 -1
  118. package/dist/schema/call/bridge.d.ts +127 -127
  119. package/dist/schema/call/bridge.js +12 -12
  120. package/dist/schema/call/contact.d.ts +3 -3
  121. package/dist/schema/call/demand.d.ts +3 -3
  122. package/dist/schema/call/guard.d.ts +11 -11
  123. package/dist/schema/call/guard.js +1 -1
  124. package/dist/schema/call/machine.d.ts +216 -21
  125. package/dist/schema/call/machine.js +1 -1
  126. package/dist/schema/call/order.d.ts +7 -7
  127. package/dist/schema/call/payment.d.ts +3 -3
  128. package/dist/schema/call/permission.d.ts +3 -3
  129. package/dist/schema/call/personal.d.ts +337 -3
  130. package/dist/schema/call/personal.js +10 -0
  131. package/dist/schema/call/progress.d.ts +177 -9
  132. package/dist/schema/call/progress.js +7 -3
  133. package/dist/schema/call/proof.d.ts +6 -6
  134. package/dist/schema/call/repository.d.ts +3 -3
  135. package/dist/schema/call/reward.d.ts +57 -57
  136. package/dist/schema/call/semantic.js +41 -1
  137. package/dist/schema/call/service.d.ts +114 -114
  138. package/dist/schema/call/service.js +11 -2
  139. package/dist/schema/call/treasury.d.ts +57 -57
  140. package/dist/schema/messenger/index.js +4 -1
  141. package/dist/schema/operations.d.ts +713 -291
  142. package/dist/schema/operations.js +33 -0
  143. package/dist/schema/project/index.d.ts +4635 -100
  144. package/dist/schema/project/index.js +868 -1
  145. package/dist/schema/query/index.d.ts +363 -19
  146. package/dist/schema/query/index.js +25 -3
  147. package/dist/schema/schema-query/index.d.ts +13 -7
  148. package/dist/schema/schema-query/index.js +29 -5
  149. package/dist/schema/trust/index.d.ts +1012 -6
  150. package/dist/schema/trust/index.js +212 -11
  151. package/dist/schema/utils/skills-recommendation.js +1 -0
  152. package/dist/schema-query/index.d.ts +4 -1
  153. package/dist/schema-query/index.js +255 -1
  154. package/dist/schemas/bridge_operation.schema.json +14 -7
  155. package/dist/schemas/guard2file.schema.json +2 -0
  156. package/dist/schemas/index.json +1 -1
  157. package/dist/schemas/machineNode2file.schema.json +2 -0
  158. package/dist/schemas/messenger_operation.schema.json +1 -1
  159. package/dist/schemas/onchain_operations.schema.json +143 -15
  160. package/dist/schemas/onchain_operations_allocation.schema.json +2 -1
  161. package/dist/schemas/onchain_operations_arbitration.schema.json +7 -5
  162. package/dist/schemas/onchain_operations_contact.schema.json +1 -0
  163. package/dist/schemas/onchain_operations_demand.schema.json +1 -0
  164. package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -0
  165. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -0
  166. package/dist/schemas/onchain_operations_guard.schema.json +578 -0
  167. package/dist/schemas/onchain_operations_machine.schema.json +1 -0
  168. package/dist/schemas/onchain_operations_order.schema.json +4 -3
  169. package/dist/schemas/onchain_operations_payment.schema.json +1 -0
  170. package/dist/schemas/onchain_operations_permission.schema.json +1 -0
  171. package/dist/schemas/onchain_operations_personal.schema.json +37 -0
  172. package/dist/schemas/onchain_operations_progress.schema.json +90 -3
  173. package/dist/schemas/onchain_operations_proof.schema.json +1 -0
  174. package/dist/schemas/onchain_operations_repository.schema.json +1 -0
  175. package/dist/schemas/onchain_operations_reward.schema.json +1 -0
  176. package/dist/schemas/onchain_operations_service.schema.json +4 -3
  177. package/dist/schemas/onchain_operations_treasury.schema.json +1 -0
  178. package/dist/schemas/project_operation.output.json +2243 -1
  179. package/dist/schemas/project_operation.schema.json +683 -1
  180. package/dist/schemas/query_toolkit.output.json +1 -1
  181. package/dist/schemas/query_toolkit.schema.json +37 -0
  182. package/dist/schemas/schema_query.output.json +1 -1
  183. package/dist/schemas/schema_query.schema.json +30 -5
  184. package/dist/schemas/trust_score.output.json +392 -1
  185. package/dist/schemas/trust_score.schema.json +275 -1
  186. package/dist/tools/handlers/onchain.js +73 -8
  187. package/dist/tools/handlers/project.js +46 -0
  188. package/dist/tools/handlers/query.js +117 -2
  189. package/dist/tools/handlers/schema-query.js +41 -0
  190. package/dist/tools/handlers/trust.js +192 -6
  191. package/dist/tools/index.js +52 -9
  192. package/dist/tools/wrap.js +194 -15
  193. package/package.json +2 -2
@@ -311,6 +311,60 @@
311
311
  "null"
312
312
  ],
313
313
  "description": "Industry-specific key risk note (or null)."
314
+ },
315
+ "intent_inference": {
316
+ "type": "object",
317
+ "properties": {
318
+ "traits": {
319
+ "type": "object",
320
+ "additionalProperties": {},
321
+ "description": "10-dimension inferred industry traits (unmatched traits use neutral defaults)."
322
+ },
323
+ "confidence": {
324
+ "type": "number",
325
+ "description": "Inference confidence 0-1 (matched trait count / 10)."
326
+ },
327
+ "matched_keywords": {
328
+ "type": "array",
329
+ "items": {
330
+ "type": "string"
331
+ },
332
+ "description": "Keywords that triggered trait inference."
333
+ },
334
+ "top_matches": {
335
+ "type": "array",
336
+ "items": {
337
+ "type": "object",
338
+ "properties": {
339
+ "industry": {
340
+ "type": "string"
341
+ },
342
+ "similarity": {
343
+ "type": "number",
344
+ "description": "Trait similarity 0-1."
345
+ }
346
+ },
347
+ "required": [
348
+ "industry",
349
+ "similarity"
350
+ ],
351
+ "additionalProperties": false
352
+ },
353
+ "description": "Top-3 similar industries by trait similarity."
354
+ }
355
+ },
356
+ "required": [
357
+ "traits",
358
+ "confidence",
359
+ "matched_keywords",
360
+ "top_matches"
361
+ ],
362
+ "additionalProperties": false,
363
+ "description": "Intent inference summary (E.3) — present when industry template applied."
364
+ },
365
+ "industry_mismatch_hint": {
366
+ "type": "string",
367
+ "description": "Advisory hint — present when intent inference suggests a different industry fits the description better (non-blocking)."
314
368
  }
315
369
  },
316
370
  "required": [
@@ -322,7 +376,7 @@
322
376
  "scenarios_count"
323
377
  ],
324
378
  "additionalProperties": false,
325
- "description": "Blueprint summary — present when industry template applied successfully. Objects have status='draft' and address='draft:<name>'."
379
+ "description": "Blueprint summary — present when industry template applied successfully. Objects have status='draft' and address='draft:<name>'. Full steps/scenarios persisted as project document doc_type='blueprint'."
326
380
  },
327
381
  "blueprint_warning": {
328
382
  "type": "string",
@@ -335,6 +389,66 @@
335
389
  "hint": {
336
390
  "type": "string",
337
391
  "description": "User-facing hint — guides to next action (e.g. add_object, generate_deployment_doc)."
392
+ },
393
+ "recommended_industries": {
394
+ "type": "array",
395
+ "items": {
396
+ "type": "object",
397
+ "properties": {
398
+ "industry": {
399
+ "type": "string",
400
+ "description": "Recommended builtin industry mode name."
401
+ },
402
+ "similarity": {
403
+ "type": "number",
404
+ "description": "Trait similarity 0-1 (10-dim industry trait match)."
405
+ },
406
+ "matched_traits": {
407
+ "type": "array",
408
+ "items": {
409
+ "type": "string"
410
+ },
411
+ "description": "Trait dimensions that matched."
412
+ },
413
+ "reference_examples": {
414
+ "type": "array",
415
+ "items": {
416
+ "type": "object",
417
+ "properties": {
418
+ "file": {
419
+ "type": "string",
420
+ "description": "Example file name (fetch via schema_query search_examples)."
421
+ },
422
+ "title": {
423
+ "type": "string"
424
+ },
425
+ "operation_type": {
426
+ "type": "string"
427
+ },
428
+ "verified": {
429
+ "type": "boolean"
430
+ }
431
+ },
432
+ "required": [
433
+ "file",
434
+ "title",
435
+ "operation_type",
436
+ "verified"
437
+ ],
438
+ "additionalProperties": false
439
+ },
440
+ "description": "Verified reference examples for this industry (top 3)."
441
+ }
442
+ },
443
+ "required": [
444
+ "industry",
445
+ "similarity",
446
+ "matched_traits",
447
+ "reference_examples"
448
+ ],
449
+ "additionalProperties": false
450
+ },
451
+ "description": "Top-3 recommended industry modes inferred from the project description (E.7). Present only when no project_industry was given. Each item includes reference examples ('standing on giants' shoulders'). To apply: call update_project is NOT enough — recreate via create_project with project_industry set to get the blueprint."
338
452
  }
339
453
  },
340
454
  "required": [
@@ -3728,6 +3842,2134 @@
3728
3842
  "summary"
3729
3843
  ],
3730
3844
  "additionalProperties": false
3845
+ },
3846
+ {
3847
+ "type": "object",
3848
+ "properties": {
3849
+ "action": {
3850
+ "type": "string",
3851
+ "const": "recommend_industry"
3852
+ },
3853
+ "intent": {
3854
+ "type": "string",
3855
+ "description": "The intent text used for inference."
3856
+ },
3857
+ "inferred_traits": {
3858
+ "type": "object",
3859
+ "additionalProperties": {},
3860
+ "description": "10-dim industry traits inferred from intent."
3861
+ },
3862
+ "inference_confidence": {
3863
+ "type": "number",
3864
+ "description": "Inference confidence 0-1 (matched trait count / 10)."
3865
+ },
3866
+ "matched_keywords": {
3867
+ "type": "array",
3868
+ "items": {
3869
+ "type": "string"
3870
+ },
3871
+ "description": "Keywords that triggered trait inference."
3872
+ },
3873
+ "recommendations": {
3874
+ "type": "array",
3875
+ "items": {
3876
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/1/properties/recommended_industries/items"
3877
+ },
3878
+ "description": "Top-3 similar industries + reference examples."
3879
+ },
3880
+ "hint": {
3881
+ "type": "string",
3882
+ "description": "How to apply the recommendation (create_project with project_industry)."
3883
+ }
3884
+ },
3885
+ "required": [
3886
+ "action",
3887
+ "intent",
3888
+ "inferred_traits",
3889
+ "inference_confidence",
3890
+ "matched_keywords",
3891
+ "recommendations",
3892
+ "hint"
3893
+ ],
3894
+ "additionalProperties": false
3895
+ },
3896
+ {
3897
+ "type": "object",
3898
+ "properties": {
3899
+ "action": {
3900
+ "type": "string",
3901
+ "const": "list_modes"
3902
+ },
3903
+ "builtin_modes": {
3904
+ "type": "array",
3905
+ "items": {
3906
+ "type": "object",
3907
+ "properties": {
3908
+ "name": {
3909
+ "type": "string"
3910
+ },
3911
+ "display_name": {
3912
+ "type": "string"
3913
+ },
3914
+ "version": {
3915
+ "type": "string"
3916
+ },
3917
+ "derived_from": {
3918
+ "type": [
3919
+ "string",
3920
+ "null"
3921
+ ],
3922
+ "description": "Source builtin mode (derive_user_mode) or null."
3923
+ },
3924
+ "owner": {
3925
+ "type": "string",
3926
+ "description": "Mode owner (custom modes only)."
3927
+ },
3928
+ "key_risk": {
3929
+ "type": "string"
3930
+ },
3931
+ "machine_nodes": {
3932
+ "type": "array",
3933
+ "items": {
3934
+ "type": "string"
3935
+ },
3936
+ "description": "Machine shape node names."
3937
+ },
3938
+ "similar_industries": {
3939
+ "type": "array",
3940
+ "items": {
3941
+ "type": "string"
3942
+ }
3943
+ },
3944
+ "evolution_history": {
3945
+ "type": "array",
3946
+ "items": {
3947
+ "type": "object",
3948
+ "properties": {
3949
+ "version": {
3950
+ "type": "string"
3951
+ },
3952
+ "changed_at": {
3953
+ "type": "number"
3954
+ },
3955
+ "changes": {
3956
+ "type": "array",
3957
+ "items": {
3958
+ "type": "string"
3959
+ }
3960
+ }
3961
+ },
3962
+ "required": [
3963
+ "version",
3964
+ "changed_at",
3965
+ "changes"
3966
+ ],
3967
+ "additionalProperties": false
3968
+ }
3969
+ }
3970
+ },
3971
+ "required": [
3972
+ "name",
3973
+ "display_name",
3974
+ "version",
3975
+ "derived_from",
3976
+ "key_risk",
3977
+ "machine_nodes"
3978
+ ],
3979
+ "additionalProperties": false
3980
+ },
3981
+ "description": "Builtin industry modes (use name as project_industry)."
3982
+ },
3983
+ "user_modes": {
3984
+ "type": "array",
3985
+ "items": {
3986
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items"
3987
+ },
3988
+ "description": "Caller's custom modes (derive/evolve/register)."
3989
+ },
3990
+ "owner": {
3991
+ "type": "string",
3992
+ "description": "Owner key for custom modes (local single-user)."
3993
+ },
3994
+ "hint": {
3995
+ "type": "string"
3996
+ }
3997
+ },
3998
+ "required": [
3999
+ "action",
4000
+ "builtin_modes",
4001
+ "user_modes",
4002
+ "owner",
4003
+ "hint"
4004
+ ],
4005
+ "additionalProperties": false
4006
+ },
4007
+ {
4008
+ "type": "object",
4009
+ "properties": {
4010
+ "action": {
4011
+ "type": "string",
4012
+ "const": "derive_user_mode"
4013
+ },
4014
+ "mode": {
4015
+ "type": "object",
4016
+ "properties": {
4017
+ "name": {
4018
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/name"
4019
+ },
4020
+ "display_name": {
4021
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/display_name"
4022
+ },
4023
+ "version": {
4024
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/version"
4025
+ },
4026
+ "derived_from": {
4027
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/derived_from"
4028
+ },
4029
+ "owner": {
4030
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/owner"
4031
+ },
4032
+ "key_risk": {
4033
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/key_risk"
4034
+ },
4035
+ "machine_nodes": {
4036
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/machine_nodes"
4037
+ },
4038
+ "similar_industries": {
4039
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/similar_industries"
4040
+ },
4041
+ "evolution_history": {
4042
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/evolution_history"
4043
+ }
4044
+ },
4045
+ "required": [
4046
+ "name",
4047
+ "display_name",
4048
+ "version",
4049
+ "derived_from",
4050
+ "key_risk",
4051
+ "machine_nodes"
4052
+ ],
4053
+ "additionalProperties": false,
4054
+ "description": "The derived (and registered) custom mode."
4055
+ },
4056
+ "hint": {
4057
+ "type": "string"
4058
+ }
4059
+ },
4060
+ "required": [
4061
+ "action",
4062
+ "mode",
4063
+ "hint"
4064
+ ],
4065
+ "additionalProperties": false
4066
+ },
4067
+ {
4068
+ "type": "object",
4069
+ "properties": {
4070
+ "action": {
4071
+ "type": "string",
4072
+ "const": "evolve_user_mode"
4073
+ },
4074
+ "mode": {
4075
+ "type": "object",
4076
+ "properties": {
4077
+ "name": {
4078
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/name"
4079
+ },
4080
+ "display_name": {
4081
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/display_name"
4082
+ },
4083
+ "version": {
4084
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/version"
4085
+ },
4086
+ "derived_from": {
4087
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/derived_from"
4088
+ },
4089
+ "owner": {
4090
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/owner"
4091
+ },
4092
+ "key_risk": {
4093
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/key_risk"
4094
+ },
4095
+ "machine_nodes": {
4096
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/machine_nodes"
4097
+ },
4098
+ "similar_industries": {
4099
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/similar_industries"
4100
+ },
4101
+ "evolution_history": {
4102
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/evolution_history"
4103
+ }
4104
+ },
4105
+ "required": [
4106
+ "name",
4107
+ "display_name",
4108
+ "version",
4109
+ "derived_from",
4110
+ "key_risk",
4111
+ "machine_nodes"
4112
+ ],
4113
+ "additionalProperties": false,
4114
+ "description": "The evolved custom mode (version bumped)."
4115
+ },
4116
+ "hint": {
4117
+ "type": "string"
4118
+ }
4119
+ },
4120
+ "required": [
4121
+ "action",
4122
+ "mode",
4123
+ "hint"
4124
+ ],
4125
+ "additionalProperties": false
4126
+ },
4127
+ {
4128
+ "type": "object",
4129
+ "properties": {
4130
+ "action": {
4131
+ "type": "string",
4132
+ "const": "register_user_mode"
4133
+ },
4134
+ "mode": {
4135
+ "type": "object",
4136
+ "properties": {
4137
+ "name": {
4138
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/name"
4139
+ },
4140
+ "display_name": {
4141
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/display_name"
4142
+ },
4143
+ "version": {
4144
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/version"
4145
+ },
4146
+ "derived_from": {
4147
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/derived_from"
4148
+ },
4149
+ "owner": {
4150
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/owner"
4151
+ },
4152
+ "key_risk": {
4153
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/key_risk"
4154
+ },
4155
+ "machine_nodes": {
4156
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/machine_nodes"
4157
+ },
4158
+ "similar_industries": {
4159
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/similar_industries"
4160
+ },
4161
+ "evolution_history": {
4162
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/31/properties/builtin_modes/items/properties/evolution_history"
4163
+ }
4164
+ },
4165
+ "required": [
4166
+ "name",
4167
+ "display_name",
4168
+ "version",
4169
+ "derived_from",
4170
+ "key_risk",
4171
+ "machine_nodes"
4172
+ ],
4173
+ "additionalProperties": false,
4174
+ "description": "The registered fully-custom mode."
4175
+ },
4176
+ "hint": {
4177
+ "type": "string"
4178
+ }
4179
+ },
4180
+ "required": [
4181
+ "action",
4182
+ "mode",
4183
+ "hint"
4184
+ ],
4185
+ "additionalProperties": false
4186
+ },
4187
+ {
4188
+ "type": "object",
4189
+ "properties": {
4190
+ "action": {
4191
+ "type": "string",
4192
+ "const": "unregister_user_mode"
4193
+ },
4194
+ "removed": {
4195
+ "type": "boolean",
4196
+ "const": true
4197
+ },
4198
+ "mode_name": {
4199
+ "type": "string"
4200
+ }
4201
+ },
4202
+ "required": [
4203
+ "action",
4204
+ "removed",
4205
+ "mode_name"
4206
+ ],
4207
+ "additionalProperties": false
4208
+ },
4209
+ {
4210
+ "type": "object",
4211
+ "properties": {
4212
+ "action": {
4213
+ "type": "string",
4214
+ "const": "register_custom_metric"
4215
+ },
4216
+ "metric": {
4217
+ "type": "object",
4218
+ "properties": {
4219
+ "metric_id": {
4220
+ "type": "string"
4221
+ },
4222
+ "display_name": {
4223
+ "type": "string"
4224
+ },
4225
+ "description": {
4226
+ "type": "string"
4227
+ },
4228
+ "type": {
4229
+ "type": "string",
4230
+ "enum": [
4231
+ "risk",
4232
+ "benefit"
4233
+ ]
4234
+ },
4235
+ "scale": {
4236
+ "type": "string",
4237
+ "enum": [
4238
+ "level",
4239
+ "numeric",
4240
+ "percentage"
4241
+ ]
4242
+ },
4243
+ "weight": {
4244
+ "type": "number"
4245
+ },
4246
+ "scope": {
4247
+ "type": "string",
4248
+ "enum": [
4249
+ "builtin",
4250
+ "custom"
4251
+ ]
4252
+ },
4253
+ "owner": {
4254
+ "type": "string"
4255
+ }
4256
+ },
4257
+ "required": [
4258
+ "metric_id",
4259
+ "display_name",
4260
+ "description",
4261
+ "type",
4262
+ "scale",
4263
+ "weight",
4264
+ "scope"
4265
+ ],
4266
+ "additionalProperties": false,
4267
+ "description": "The registered custom metric (globally effective)."
4268
+ },
4269
+ "hint": {
4270
+ "type": "string"
4271
+ }
4272
+ },
4273
+ "required": [
4274
+ "action",
4275
+ "metric",
4276
+ "hint"
4277
+ ],
4278
+ "additionalProperties": false
4279
+ },
4280
+ {
4281
+ "type": "object",
4282
+ "properties": {
4283
+ "action": {
4284
+ "type": "string",
4285
+ "const": "register_custom_constraint"
4286
+ },
4287
+ "constraint": {
4288
+ "type": "object",
4289
+ "properties": {
4290
+ "constraint_id": {
4291
+ "type": "string"
4292
+ },
4293
+ "display_name": {
4294
+ "type": "string"
4295
+ },
4296
+ "description": {
4297
+ "type": "string"
4298
+ },
4299
+ "rule": {
4300
+ "type": "object",
4301
+ "additionalProperties": {},
4302
+ "description": "Constraint rule (4 types — see constraint_rule input)."
4303
+ },
4304
+ "severity": {
4305
+ "type": "string",
4306
+ "enum": [
4307
+ "hard",
4308
+ "soft"
4309
+ ]
4310
+ },
4311
+ "on_violation": {
4312
+ "type": "string",
4313
+ "enum": [
4314
+ "block",
4315
+ "warn",
4316
+ "log"
4317
+ ]
4318
+ },
4319
+ "scope": {
4320
+ "type": "string",
4321
+ "enum": [
4322
+ "builtin",
4323
+ "custom"
4324
+ ]
4325
+ },
4326
+ "owner": {
4327
+ "type": "string"
4328
+ }
4329
+ },
4330
+ "required": [
4331
+ "constraint_id",
4332
+ "display_name",
4333
+ "description",
4334
+ "rule",
4335
+ "severity",
4336
+ "on_violation",
4337
+ "scope"
4338
+ ],
4339
+ "additionalProperties": false,
4340
+ "description": "The registered custom constraint."
4341
+ },
4342
+ "hint": {
4343
+ "type": "string"
4344
+ }
4345
+ },
4346
+ "required": [
4347
+ "action",
4348
+ "constraint",
4349
+ "hint"
4350
+ ],
4351
+ "additionalProperties": false
4352
+ },
4353
+ {
4354
+ "type": "object",
4355
+ "properties": {
4356
+ "action": {
4357
+ "type": "string",
4358
+ "const": "list_metrics_constraints"
4359
+ },
4360
+ "metrics": {
4361
+ "type": "array",
4362
+ "items": {
4363
+ "type": "object",
4364
+ "properties": {
4365
+ "metric_id": {
4366
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/metric_id"
4367
+ },
4368
+ "display_name": {
4369
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/display_name"
4370
+ },
4371
+ "description": {
4372
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/description"
4373
+ },
4374
+ "type": {
4375
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/type"
4376
+ },
4377
+ "scale": {
4378
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/scale"
4379
+ },
4380
+ "weight": {
4381
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/weight"
4382
+ },
4383
+ "scope": {
4384
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/scope"
4385
+ },
4386
+ "owner": {
4387
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/36/properties/metric/properties/owner"
4388
+ }
4389
+ },
4390
+ "required": [
4391
+ "metric_id",
4392
+ "display_name",
4393
+ "description",
4394
+ "type",
4395
+ "scale",
4396
+ "weight",
4397
+ "scope"
4398
+ ],
4399
+ "additionalProperties": false
4400
+ }
4401
+ },
4402
+ "constraints": {
4403
+ "type": "array",
4404
+ "items": {
4405
+ "type": "object",
4406
+ "properties": {
4407
+ "constraint_id": {
4408
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/constraint_id"
4409
+ },
4410
+ "display_name": {
4411
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/display_name"
4412
+ },
4413
+ "description": {
4414
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/description"
4415
+ },
4416
+ "rule": {
4417
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/rule"
4418
+ },
4419
+ "severity": {
4420
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/severity"
4421
+ },
4422
+ "on_violation": {
4423
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/on_violation"
4424
+ },
4425
+ "scope": {
4426
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/scope"
4427
+ },
4428
+ "owner": {
4429
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/37/properties/constraint/properties/owner"
4430
+ }
4431
+ },
4432
+ "required": [
4433
+ "constraint_id",
4434
+ "display_name",
4435
+ "description",
4436
+ "rule",
4437
+ "severity",
4438
+ "on_violation",
4439
+ "scope"
4440
+ ],
4441
+ "additionalProperties": false
4442
+ }
4443
+ },
4444
+ "hint": {
4445
+ "type": "string"
4446
+ }
4447
+ },
4448
+ "required": [
4449
+ "action",
4450
+ "metrics",
4451
+ "constraints",
4452
+ "hint"
4453
+ ],
4454
+ "additionalProperties": false
4455
+ },
4456
+ {
4457
+ "type": "object",
4458
+ "properties": {
4459
+ "action": {
4460
+ "type": "string",
4461
+ "const": "analyze_intent"
4462
+ },
4463
+ "intent_parsed": {
4464
+ "type": "object",
4465
+ "properties": {
4466
+ "primary_object": {
4467
+ "type": "string",
4468
+ "description": "Primary object inferred from the intent keywords."
4469
+ },
4470
+ "secondary_objects": {
4471
+ "type": "array",
4472
+ "items": {
4473
+ "type": "string"
4474
+ },
4475
+ "description": "Supporting objects typically required alongside the primary one."
4476
+ },
4477
+ "detected_scenes": {
4478
+ "type": "array",
4479
+ "items": {
4480
+ "type": "object",
4481
+ "properties": {
4482
+ "object": {
4483
+ "type": "string"
4484
+ },
4485
+ "scene_id": {
4486
+ "type": "string",
4487
+ "description": "Free-form scene id, e.g. 'retail', 'rental_return'."
4488
+ }
4489
+ },
4490
+ "required": [
4491
+ "object",
4492
+ "scene_id"
4493
+ ],
4494
+ "additionalProperties": false
4495
+ },
4496
+ "description": "Scenes detected from the intent (used for template selection)."
4497
+ },
4498
+ "industry": {
4499
+ "type": "string",
4500
+ "description": "Industry mode resolved from the intent (defaults to 'general')."
4501
+ },
4502
+ "keyword_matches": {
4503
+ "type": "array",
4504
+ "items": {
4505
+ "type": "object",
4506
+ "properties": {
4507
+ "keyword": {
4508
+ "type": "string"
4509
+ },
4510
+ "category": {
4511
+ "type": "string"
4512
+ },
4513
+ "matched_objects": {
4514
+ "type": "array",
4515
+ "items": {
4516
+ "type": "string"
4517
+ }
4518
+ },
4519
+ "required_level": {
4520
+ "type": "string",
4521
+ "enum": [
4522
+ "R",
4523
+ "C",
4524
+ "OPTIONAL"
4525
+ ]
4526
+ },
4527
+ "match_count": {
4528
+ "type": "number"
4529
+ }
4530
+ },
4531
+ "required": [
4532
+ "keyword",
4533
+ "category",
4534
+ "matched_objects",
4535
+ "required_level",
4536
+ "match_count"
4537
+ ],
4538
+ "additionalProperties": false
4539
+ },
4540
+ "description": "All keyword matches that drove the identification."
4541
+ }
4542
+ },
4543
+ "required": [
4544
+ "primary_object",
4545
+ "secondary_objects",
4546
+ "detected_scenes",
4547
+ "industry",
4548
+ "keyword_matches"
4549
+ ],
4550
+ "additionalProperties": false
4551
+ },
4552
+ "puzzles": {
4553
+ "type": "object",
4554
+ "additionalProperties": {
4555
+ "type": "object",
4556
+ "properties": {
4557
+ "puzzle": {},
4558
+ "completeness": {},
4559
+ "missing_dimensions": {
4560
+ "type": "array",
4561
+ "items": {
4562
+ "type": "string"
4563
+ }
4564
+ }
4565
+ },
4566
+ "required": [
4567
+ "missing_dimensions"
4568
+ ],
4569
+ "additionalProperties": false
4570
+ },
4571
+ "description": "Per-object puzzle snapshot, keyed by object_type. Pass this UNCHANGED to aggregate_risks."
4572
+ },
4573
+ "overall_completeness": {
4574
+ "type": "string",
4575
+ "enum": [
4576
+ "complete",
4577
+ "partial",
4578
+ "empty"
4579
+ ]
4580
+ },
4581
+ "next_step": {
4582
+ "type": "string",
4583
+ "description": "Human-readable suggestion for the next puzzle step."
4584
+ },
4585
+ "recommended_creation_order": {
4586
+ "type": "array",
4587
+ "items": {
4588
+ "type": "string"
4589
+ },
4590
+ "description": "Recommended object creation order (dependency topology)."
4591
+ },
4592
+ "warnings": {
4593
+ "type": "array",
4594
+ "items": {
4595
+ "type": "string"
4596
+ }
4597
+ }
4598
+ },
4599
+ "required": [
4600
+ "action",
4601
+ "intent_parsed",
4602
+ "puzzles",
4603
+ "overall_completeness",
4604
+ "next_step",
4605
+ "recommended_creation_order",
4606
+ "warnings"
4607
+ ],
4608
+ "additionalProperties": false
4609
+ },
4610
+ {
4611
+ "type": "object",
4612
+ "properties": {
4613
+ "action": {
4614
+ "type": "string",
4615
+ "const": "aggregate_risks"
4616
+ },
4617
+ "namespace": {
4618
+ "type": "object",
4619
+ "properties": {
4620
+ "prefix": {
4621
+ "type": "string"
4622
+ },
4623
+ "version": {
4624
+ "type": "string"
4625
+ },
4626
+ "industry": {
4627
+ "type": "string"
4628
+ }
4629
+ },
4630
+ "required": [
4631
+ "prefix",
4632
+ "version"
4633
+ ],
4634
+ "additionalProperties": false
4635
+ },
4636
+ "findings": {
4637
+ "type": "array",
4638
+ "items": {
4639
+ "type": "object",
4640
+ "properties": {
4641
+ "risk_rule_id": {
4642
+ "type": "string",
4643
+ "description": "Unified risk rule id, e.g. 'R-S-01'."
4644
+ },
4645
+ "object_type": {
4646
+ "type": "string"
4647
+ },
4648
+ "entry_id": {
4649
+ "type": "string",
4650
+ "description": "Object entry_id ('*' when cross-object)."
4651
+ },
4652
+ "severity": {
4653
+ "type": "string",
4654
+ "enum": [
4655
+ "CRITICAL",
4656
+ "HIGH",
4657
+ "MEDIUM",
4658
+ "LOW",
4659
+ "INFO"
4660
+ ]
4661
+ },
4662
+ "message": {
4663
+ "type": "string"
4664
+ },
4665
+ "fix_suggestion": {
4666
+ "type": "string"
4667
+ },
4668
+ "details": {
4669
+ "type": "object",
4670
+ "properties": {
4671
+ "field_path": {
4672
+ "type": "string"
4673
+ },
4674
+ "actual_value": {},
4675
+ "expected_value": {},
4676
+ "rule_source": {
4677
+ "type": "string"
4678
+ }
4679
+ },
4680
+ "additionalProperties": false
4681
+ }
4682
+ },
4683
+ "required": [
4684
+ "risk_rule_id",
4685
+ "object_type",
4686
+ "entry_id",
4687
+ "severity",
4688
+ "message",
4689
+ "fix_suggestion"
4690
+ ],
4691
+ "additionalProperties": false
4692
+ },
4693
+ "description": "All risks found, sorted (CRITICAL first)."
4694
+ },
4695
+ "severity_summary": {
4696
+ "type": "object",
4697
+ "additionalProperties": {
4698
+ "type": "number"
4699
+ },
4700
+ "description": "Counts keyed by severity."
4701
+ },
4702
+ "status": {
4703
+ "type": "string",
4704
+ "enum": [
4705
+ "RISK_PASSED",
4706
+ "RISK_BLOCKED",
4707
+ "RISK_PENDING_CONFIRM",
4708
+ "RISK_CANCELLED"
4709
+ ],
4710
+ "description": "Aggregated status (62-spec §3.2). RISK_BLOCKED = CRITICAL or above-threshold risks present."
4711
+ },
4712
+ "pending_confirmations": {
4713
+ "type": "array",
4714
+ "items": {
4715
+ "type": "object",
4716
+ "properties": {
4717
+ "risk_rule_id": {
4718
+ "type": "string"
4719
+ },
4720
+ "description": {
4721
+ "type": "string"
4722
+ },
4723
+ "fix_suggestion": {
4724
+ "type": "string"
4725
+ },
4726
+ "object_type": {
4727
+ "type": "string"
4728
+ },
4729
+ "entry_id": {
4730
+ "type": "string"
4731
+ }
4732
+ },
4733
+ "required": [
4734
+ "risk_rule_id",
4735
+ "description",
4736
+ "fix_suggestion",
4737
+ "object_type",
4738
+ "entry_id"
4739
+ ],
4740
+ "additionalProperties": false
4741
+ },
4742
+ "description": "HIGH risks awaiting user confirmation (only when status='RISK_PENDING_CONFIRM')."
4743
+ },
4744
+ "calibrated_at": {
4745
+ "type": "number",
4746
+ "description": "Calibration timestamp (ms)."
4747
+ },
4748
+ "fix_suggestions_grouped": {
4749
+ "type": "object",
4750
+ "additionalProperties": {
4751
+ "type": "array",
4752
+ "items": {
4753
+ "type": "object",
4754
+ "properties": {
4755
+ "risk_rule_id": {
4756
+ "type": "string"
4757
+ },
4758
+ "severity": {
4759
+ "type": "string",
4760
+ "enum": [
4761
+ "CRITICAL",
4762
+ "HIGH",
4763
+ "MEDIUM",
4764
+ "LOW",
4765
+ "INFO"
4766
+ ]
4767
+ },
4768
+ "message": {
4769
+ "type": "string"
4770
+ },
4771
+ "fix_suggestion": {
4772
+ "type": "string"
4773
+ },
4774
+ "entry_id": {
4775
+ "type": "string"
4776
+ }
4777
+ },
4778
+ "required": [
4779
+ "risk_rule_id",
4780
+ "severity",
4781
+ "message",
4782
+ "fix_suggestion",
4783
+ "entry_id"
4784
+ ],
4785
+ "additionalProperties": false
4786
+ }
4787
+ },
4788
+ "description": "Fix suggestions grouped by object_type."
4789
+ },
4790
+ "safety_findings": {
4791
+ "type": "array",
4792
+ "items": {
4793
+ "type": "object",
4794
+ "properties": {
4795
+ "rule_id": {
4796
+ "type": "string",
4797
+ "description": "Safety rule id (e.g. 'REUSE-SERVICE-01', 'IMMUT-001')."
4798
+ },
4799
+ "severity": {
4800
+ "type": "string",
4801
+ "enum": [
4802
+ "info",
4803
+ "warn"
4804
+ ]
4805
+ },
4806
+ "message": {
4807
+ "type": "string"
4808
+ }
4809
+ },
4810
+ "required": [
4811
+ "rule_id",
4812
+ "severity",
4813
+ "message"
4814
+ ],
4815
+ "additionalProperties": false
4816
+ },
4817
+ "description": "OBJECT_REUSE / IMMUTABILITY findings from safety-rules (only when planned_objects / planned_operations were provided)."
4818
+ },
4819
+ "intent_echo": {
4820
+ "type": "object",
4821
+ "properties": {
4822
+ "primary_object": {
4823
+ "type": "string"
4824
+ },
4825
+ "industry": {
4826
+ "type": "string"
4827
+ },
4828
+ "overall_completeness": {
4829
+ "type": "string",
4830
+ "enum": [
4831
+ "complete",
4832
+ "partial",
4833
+ "empty"
4834
+ ]
4835
+ }
4836
+ },
4837
+ "required": [
4838
+ "primary_object",
4839
+ "industry",
4840
+ "overall_completeness"
4841
+ ],
4842
+ "additionalProperties": false,
4843
+ "description": "Echo of the auto-run analyze_intent (only when 'puzzles' was omitted and 'intent' was used)."
4844
+ },
4845
+ "warnings": {
4846
+ "type": "array",
4847
+ "items": {
4848
+ "type": "string"
4849
+ }
4850
+ }
4851
+ },
4852
+ "required": [
4853
+ "action",
4854
+ "namespace",
4855
+ "findings",
4856
+ "severity_summary",
4857
+ "status",
4858
+ "calibrated_at",
4859
+ "warnings"
4860
+ ],
4861
+ "additionalProperties": false
4862
+ },
4863
+ {
4864
+ "type": "object",
4865
+ "properties": {
4866
+ "action": {
4867
+ "type": "string",
4868
+ "const": "trace_substeps"
4869
+ },
4870
+ "namespace": {
4871
+ "type": "object",
4872
+ "properties": {
4873
+ "prefix": {
4874
+ "type": "string"
4875
+ },
4876
+ "version": {
4877
+ "type": "string"
4878
+ }
4879
+ },
4880
+ "required": [
4881
+ "prefix",
4882
+ "version"
4883
+ ],
4884
+ "additionalProperties": false
4885
+ },
4886
+ "network": {
4887
+ "type": "string",
4888
+ "enum": [
4889
+ "testnet",
4890
+ "mainnet"
4891
+ ]
4892
+ },
4893
+ "coherent": {
4894
+ "type": "boolean",
4895
+ "description": "True when no dangling inputs, no cycles, no missing outputs, no cross-step breaks."
4896
+ },
4897
+ "dangling_inputs": {
4898
+ "type": "array",
4899
+ "items": {
4900
+ "type": "object",
4901
+ "properties": {
4902
+ "substep_id": {
4903
+ "type": "string"
4904
+ },
4905
+ "missing_ref": {
4906
+ "type": "string"
4907
+ },
4908
+ "field_path": {
4909
+ "type": "string"
4910
+ }
4911
+ },
4912
+ "required": [
4913
+ "substep_id",
4914
+ "missing_ref",
4915
+ "field_path"
4916
+ ],
4917
+ "additionalProperties": false
4918
+ },
4919
+ "description": "Input refs pointing to non-existent substeps."
4920
+ },
4921
+ "circular_refs": {
4922
+ "type": "array",
4923
+ "items": {
4924
+ "type": "object",
4925
+ "properties": {
4926
+ "cycle": {
4927
+ "type": "array",
4928
+ "items": {
4929
+ "type": "string"
4930
+ }
4931
+ }
4932
+ },
4933
+ "required": [
4934
+ "cycle"
4935
+ ],
4936
+ "additionalProperties": false
4937
+ },
4938
+ "description": "Substep id cycles (when present, topological_order is empty)."
4939
+ },
4940
+ "missing_outputs": {
4941
+ "type": "array",
4942
+ "items": {
4943
+ "type": "object",
4944
+ "properties": {
4945
+ "substep_id": {
4946
+ "type": "string"
4947
+ },
4948
+ "expected_field": {
4949
+ "type": "string"
4950
+ },
4951
+ "dependent_substeps": {
4952
+ "type": "array",
4953
+ "items": {
4954
+ "type": "string"
4955
+ }
4956
+ }
4957
+ },
4958
+ "required": [
4959
+ "substep_id",
4960
+ "expected_field",
4961
+ "dependent_substeps"
4962
+ ],
4963
+ "additionalProperties": false
4964
+ },
4965
+ "description": "Substeps that should have produced a field but did not."
4966
+ },
4967
+ "cross_step_breaks": {
4968
+ "type": "array",
4969
+ "items": {
4970
+ "type": "object",
4971
+ "properties": {
4972
+ "source_step": {
4973
+ "type": "string"
4974
+ },
4975
+ "target_step": {
4976
+ "type": "string"
4977
+ },
4978
+ "missing_field": {
4979
+ "type": "string"
4980
+ }
4981
+ },
4982
+ "required": [
4983
+ "source_step",
4984
+ "target_step",
4985
+ "missing_field"
4986
+ ],
4987
+ "additionalProperties": false
4988
+ },
4989
+ "description": "Upstream step failed → downstream cannot proceed."
4990
+ },
4991
+ "step_details": {
4992
+ "type": "array",
4993
+ "items": {
4994
+ "type": "object",
4995
+ "properties": {
4996
+ "parent_step": {
4997
+ "type": "string"
4998
+ },
4999
+ "total_substeps": {
5000
+ "type": "number"
5001
+ },
5002
+ "successful": {
5003
+ "type": "number"
5004
+ },
5005
+ "failed": {
5006
+ "type": "number"
5007
+ },
5008
+ "pending": {
5009
+ "type": "number"
5010
+ },
5011
+ "skipped": {
5012
+ "type": "number"
5013
+ },
5014
+ "substep_ids": {
5015
+ "type": "array",
5016
+ "items": {
5017
+ "type": "string"
5018
+ }
5019
+ }
5020
+ },
5021
+ "required": [
5022
+ "parent_step",
5023
+ "total_substeps",
5024
+ "successful",
5025
+ "failed",
5026
+ "pending",
5027
+ "skipped",
5028
+ "substep_ids"
5029
+ ],
5030
+ "additionalProperties": false
5031
+ },
5032
+ "description": "Per-step summary, keyed by parent_step."
5033
+ },
5034
+ "topological_order": {
5035
+ "type": "array",
5036
+ "items": {
5037
+ "type": "string"
5038
+ },
5039
+ "description": "Topological order of substep ids (empty when a cycle exists)."
5040
+ },
5041
+ "d10_check": {
5042
+ "type": "object",
5043
+ "properties": {
5044
+ "check_id": {
5045
+ "type": "string",
5046
+ "const": "D-10"
5047
+ },
5048
+ "description": {
5049
+ "type": "string"
5050
+ },
5051
+ "status": {
5052
+ "type": "string",
5053
+ "enum": [
5054
+ "PASS",
5055
+ "FAIL",
5056
+ "WARN"
5057
+ ]
5058
+ },
5059
+ "notes": {
5060
+ "type": "array",
5061
+ "items": {
5062
+ "type": "string"
5063
+ }
5064
+ }
5065
+ },
5066
+ "required": [
5067
+ "check_id",
5068
+ "description",
5069
+ "status",
5070
+ "notes"
5071
+ ],
5072
+ "additionalProperties": false,
5073
+ "description": "D-10 substep linkage completeness verdict."
5074
+ }
5075
+ },
5076
+ "required": [
5077
+ "action",
5078
+ "namespace",
5079
+ "network",
5080
+ "coherent",
5081
+ "dangling_inputs",
5082
+ "circular_refs",
5083
+ "missing_outputs",
5084
+ "cross_step_breaks",
5085
+ "step_details",
5086
+ "topological_order",
5087
+ "d10_check"
5088
+ ],
5089
+ "additionalProperties": false
5090
+ },
5091
+ {
5092
+ "type": "object",
5093
+ "properties": {
5094
+ "action": {
5095
+ "type": "string",
5096
+ "const": "merchant_guide"
5097
+ },
5098
+ "current_step": {
5099
+ "type": "number",
5100
+ "description": "Furthest wizard step reached (2 = awaiting industry confirmation; 9 = harness issues found; 10 = plan ready)."
5101
+ },
5102
+ "step_name": {
5103
+ "type": "string"
5104
+ },
5105
+ "guide_state": {
5106
+ "type": "object",
5107
+ "properties": {
5108
+ "intent_text": {
5109
+ "type": "string"
5110
+ },
5111
+ "confirmed_industry": {
5112
+ "type": "string"
5113
+ },
5114
+ "currency": {
5115
+ "type": "string"
5116
+ },
5117
+ "deliverables": {
5118
+ "type": "array",
5119
+ "items": {}
5120
+ },
5121
+ "payment_override": {
5122
+ "type": "object",
5123
+ "additionalProperties": {}
5124
+ },
5125
+ "trust_override": {
5126
+ "type": "object",
5127
+ "additionalProperties": {}
5128
+ },
5129
+ "adopted_module_ids": {
5130
+ "type": "array",
5131
+ "items": {
5132
+ "type": "string"
5133
+ }
5134
+ }
5135
+ },
5136
+ "required": [
5137
+ "intent_text"
5138
+ ],
5139
+ "additionalProperties": false,
5140
+ "description": "Wizard state — pass back UNCHANGED on the next merchant_guide call."
5141
+ },
5142
+ "intent_draft": {
5143
+ "description": "Step 1-2 only: BusinessIntent draft inferred from the description."
5144
+ },
5145
+ "industry_options": {
5146
+ "type": "object",
5147
+ "properties": {
5148
+ "inferred": {
5149
+ "type": "string"
5150
+ },
5151
+ "confidence": {
5152
+ "type": "number"
5153
+ },
5154
+ "similar": {
5155
+ "type": "array",
5156
+ "items": {
5157
+ "type": "string"
5158
+ }
5159
+ }
5160
+ },
5161
+ "required": [
5162
+ "inferred",
5163
+ "confidence",
5164
+ "similar"
5165
+ ],
5166
+ "additionalProperties": false,
5167
+ "description": "Step 2 only: industry candidates awaiting merchant confirmation."
5168
+ },
5169
+ "intent": {
5170
+ "description": "Steps 7-10: final BusinessIntent after merchant overrides."
5171
+ },
5172
+ "adopted_modules": {
5173
+ "type": "array",
5174
+ "items": {
5175
+ "type": "object",
5176
+ "properties": {
5177
+ "id": {
5178
+ "type": "string"
5179
+ },
5180
+ "name": {
5181
+ "type": "string"
5182
+ },
5183
+ "description": {
5184
+ "type": "string"
5185
+ },
5186
+ "requires_keeper": {
5187
+ "type": "boolean"
5188
+ },
5189
+ "keeper_hint": {
5190
+ "type": "string"
5191
+ },
5192
+ "user_protections": {
5193
+ "type": "array",
5194
+ "items": {
5195
+ "type": "string"
5196
+ }
5197
+ },
5198
+ "merchant_obligations": {
5199
+ "type": "array",
5200
+ "items": {
5201
+ "type": "string"
5202
+ }
5203
+ }
5204
+ },
5205
+ "required": [
5206
+ "id",
5207
+ "name",
5208
+ "description",
5209
+ "requires_keeper",
5210
+ "user_protections",
5211
+ "merchant_obligations"
5212
+ ],
5213
+ "additionalProperties": false
5214
+ },
5215
+ "description": "Steps 6-10: adopted business modules with protections/obligations."
5216
+ },
5217
+ "blueprint": {
5218
+ "type": "object",
5219
+ "properties": {
5220
+ "nodes": {
5221
+ "type": "array",
5222
+ "items": {
5223
+ "type": "object",
5224
+ "properties": {
5225
+ "id": {
5226
+ "type": "string"
5227
+ },
5228
+ "type": {
5229
+ "type": "string"
5230
+ },
5231
+ "purpose": {
5232
+ "type": "string"
5233
+ }
5234
+ },
5235
+ "required": [
5236
+ "id",
5237
+ "type",
5238
+ "purpose"
5239
+ ],
5240
+ "additionalProperties": false
5241
+ }
5242
+ },
5243
+ "edges": {
5244
+ "type": "array",
5245
+ "items": {
5246
+ "type": "object",
5247
+ "properties": {
5248
+ "from": {
5249
+ "type": "string"
5250
+ },
5251
+ "to": {
5252
+ "type": "string"
5253
+ },
5254
+ "relation": {
5255
+ "type": "string"
5256
+ },
5257
+ "required": {
5258
+ "type": "boolean"
5259
+ }
5260
+ },
5261
+ "required": [
5262
+ "from",
5263
+ "to",
5264
+ "relation",
5265
+ "required"
5266
+ ],
5267
+ "additionalProperties": false
5268
+ }
5269
+ }
5270
+ },
5271
+ "required": [
5272
+ "nodes",
5273
+ "edges"
5274
+ ],
5275
+ "additionalProperties": false,
5276
+ "description": "Step 7: semantic object graph (nodes + edges)."
5277
+ },
5278
+ "evaluation_preview": {
5279
+ "description": "Step 8: estimated risk/trust/completeness scores + key risks + module boosts."
5280
+ },
5281
+ "graph_validation": {
5282
+ "type": "object",
5283
+ "properties": {
5284
+ "valid": {
5285
+ "type": "boolean"
5286
+ },
5287
+ "hard_violations": {
5288
+ "type": "array",
5289
+ "items": {
5290
+ "type": "object",
5291
+ "properties": {
5292
+ "id": {
5293
+ "type": "string"
5294
+ },
5295
+ "description": {
5296
+ "type": "string"
5297
+ },
5298
+ "fix": {
5299
+ "type": "string"
5300
+ }
5301
+ },
5302
+ "required": [
5303
+ "id",
5304
+ "description"
5305
+ ],
5306
+ "additionalProperties": false
5307
+ }
5308
+ },
5309
+ "soft_notes": {
5310
+ "type": "array",
5311
+ "items": {
5312
+ "type": "object",
5313
+ "properties": {
5314
+ "id": {
5315
+ "type": "string"
5316
+ },
5317
+ "description": {
5318
+ "type": "string"
5319
+ }
5320
+ },
5321
+ "required": [
5322
+ "id",
5323
+ "description"
5324
+ ],
5325
+ "additionalProperties": false
5326
+ }
5327
+ }
5328
+ },
5329
+ "required": [
5330
+ "valid",
5331
+ "hard_violations",
5332
+ "soft_notes"
5333
+ ],
5334
+ "additionalProperties": false,
5335
+ "description": "Step 8: structural validation of the semantic graph."
5336
+ },
5337
+ "harness_check": {
5338
+ "type": "object",
5339
+ "properties": {
5340
+ "module_constraints": {
5341
+ "type": "array",
5342
+ "items": {
5343
+ "type": "object",
5344
+ "properties": {
5345
+ "module": {
5346
+ "type": "string"
5347
+ },
5348
+ "plan_satisfied": {
5349
+ "type": "boolean"
5350
+ },
5351
+ "missing": {
5352
+ "type": "array",
5353
+ "items": {
5354
+ "type": "string"
5355
+ }
5356
+ },
5357
+ "reason": {
5358
+ "type": "string"
5359
+ },
5360
+ "estimated_score_boost": {
5361
+ "type": "number"
5362
+ }
5363
+ },
5364
+ "required": [
5365
+ "module",
5366
+ "plan_satisfied",
5367
+ "estimated_score_boost"
5368
+ ],
5369
+ "additionalProperties": false
5370
+ }
5371
+ },
5372
+ "blocking_issues": {
5373
+ "type": "array",
5374
+ "items": {
5375
+ "type": "object",
5376
+ "properties": {
5377
+ "module": {
5378
+ "type": "string"
5379
+ },
5380
+ "missing_constraints": {
5381
+ "type": "array",
5382
+ "items": {
5383
+ "type": "string"
5384
+ }
5385
+ },
5386
+ "fix": {
5387
+ "type": "string"
5388
+ }
5389
+ },
5390
+ "required": [
5391
+ "module"
5392
+ ],
5393
+ "additionalProperties": false
5394
+ }
5395
+ },
5396
+ "deploy_time_checks": {
5397
+ "type": "array",
5398
+ "items": {
5399
+ "type": "string"
5400
+ }
5401
+ }
5402
+ },
5403
+ "required": [
5404
+ "module_constraints",
5405
+ "blocking_issues",
5406
+ "deploy_time_checks"
5407
+ ],
5408
+ "additionalProperties": false,
5409
+ "description": "Step 9: module constraint check at blueprint stage + deploy-time checklist."
5410
+ },
5411
+ "game_theory": {
5412
+ "type": "object",
5413
+ "properties": {
5414
+ "summary": {
5415
+ "type": "string"
5416
+ },
5417
+ "coverage": {
5418
+ "type": "string",
5419
+ "description": "Covered/total scenario count, e.g. '4/5'."
5420
+ },
5421
+ "exposed_scenarios": {
5422
+ "type": "array",
5423
+ "items": {
5424
+ "type": "string"
5425
+ }
5426
+ },
5427
+ "wow_alignments": {
5428
+ "type": "array",
5429
+ "items": {
5430
+ "type": "string"
5431
+ },
5432
+ "description": "Active WOW mechanisms aligning merchant/user incentives."
5433
+ },
5434
+ "scenarios": {
5435
+ "type": "array",
5436
+ "items": {
5437
+ "type": "object",
5438
+ "properties": {
5439
+ "scenario": {
5440
+ "type": "string"
5441
+ },
5442
+ "covered": {
5443
+ "type": "boolean"
5444
+ },
5445
+ "conflict": {
5446
+ "type": "string"
5447
+ },
5448
+ "user_protection": {
5449
+ "type": "string"
5450
+ },
5451
+ "evaluation_metric": {
5452
+ "type": "string"
5453
+ },
5454
+ "recommendation": {
5455
+ "type": "string"
5456
+ }
5457
+ },
5458
+ "required": [
5459
+ "scenario",
5460
+ "covered",
5461
+ "conflict",
5462
+ "user_protection",
5463
+ "evaluation_metric"
5464
+ ],
5465
+ "additionalProperties": false
5466
+ }
5467
+ }
5468
+ },
5469
+ "required": [
5470
+ "summary",
5471
+ "coverage",
5472
+ "exposed_scenarios",
5473
+ "wow_alignments",
5474
+ "scenarios"
5475
+ ],
5476
+ "additionalProperties": false,
5477
+ "description": "Step 9 (GLM6/93 §2.3): merchant-user adversarial scenario coverage. 5 canonical scenarios checked against the blueprint; exposed scenarios include fix recommendations."
5478
+ },
5479
+ "creation_plan": {
5480
+ "type": "array",
5481
+ "items": {
5482
+ "type": "object",
5483
+ "properties": {
5484
+ "order": {
5485
+ "type": "number"
5486
+ },
5487
+ "node_id": {
5488
+ "type": "string"
5489
+ },
5490
+ "object_type": {
5491
+ "type": "string"
5492
+ },
5493
+ "suggested_name": {
5494
+ "type": "string"
5495
+ },
5496
+ "depends_on": {
5497
+ "type": "array",
5498
+ "items": {
5499
+ "type": "string"
5500
+ }
5501
+ },
5502
+ "operation_hint": {
5503
+ "type": "string"
5504
+ }
5505
+ },
5506
+ "required": [
5507
+ "order",
5508
+ "node_id",
5509
+ "object_type",
5510
+ "suggested_name",
5511
+ "depends_on",
5512
+ "operation_hint"
5513
+ ],
5514
+ "additionalProperties": false
5515
+ },
5516
+ "description": "Step 10: topologically ordered creation plan. NOT executed — materialize via create_project + onchain_operations."
5517
+ },
5518
+ "warnings": {
5519
+ "type": "array",
5520
+ "items": {
5521
+ "type": "string"
5522
+ }
5523
+ },
5524
+ "next_action": {
5525
+ "type": "string",
5526
+ "description": "Human-readable guidance for the next call."
5527
+ }
5528
+ },
5529
+ "required": [
5530
+ "action",
5531
+ "current_step",
5532
+ "step_name",
5533
+ "guide_state",
5534
+ "warnings",
5535
+ "next_action"
5536
+ ],
5537
+ "additionalProperties": false
5538
+ },
5539
+ {
5540
+ "type": "object",
5541
+ "properties": {
5542
+ "action": {
5543
+ "type": "string",
5544
+ "const": "participation_radar"
5545
+ },
5546
+ "account": {
5547
+ "type": "string",
5548
+ "description": "Resolved account address."
5549
+ },
5550
+ "orders_analyzed": {
5551
+ "type": "number"
5552
+ },
5553
+ "actionable": {
5554
+ "type": "array",
5555
+ "items": {
5556
+ "type": "object",
5557
+ "properties": {
5558
+ "account": {
5559
+ "type": "string"
5560
+ },
5561
+ "progress": {
5562
+ "type": "string"
5563
+ },
5564
+ "order": {
5565
+ "type": "string"
5566
+ },
5567
+ "current_node": {
5568
+ "type": "string",
5569
+ "description": "Current node name ('' = entry, not yet started)."
5570
+ },
5571
+ "perspective": {
5572
+ "type": "string",
5573
+ "enum": [
5574
+ "customer",
5575
+ "operator",
5576
+ "observer"
5577
+ ],
5578
+ "description": "Derived from on-chain data (Order.builder + PermissionPerm grants), never caller-asserted."
5579
+ },
5580
+ "roles": {
5581
+ "type": "array",
5582
+ "items": {
5583
+ "type": "object",
5584
+ "properties": {
5585
+ "label": {
5586
+ "type": "string"
5587
+ },
5588
+ "can_act_now": {
5589
+ "type": "boolean"
5590
+ }
5591
+ },
5592
+ "required": [
5593
+ "label",
5594
+ "can_act_now"
5595
+ ],
5596
+ "additionalProperties": false
5597
+ },
5598
+ "description": "All roles this account holds on this order's workflow."
5599
+ },
5600
+ "operable": {
5601
+ "type": "array",
5602
+ "items": {
5603
+ "type": "object",
5604
+ "properties": {
5605
+ "name": {
5606
+ "type": "string",
5607
+ "description": "Forward (operation) name."
5608
+ },
5609
+ "to_node": {
5610
+ "type": "string",
5611
+ "description": "Target node after execution."
5612
+ },
5613
+ "execution_path": {
5614
+ "type": "string",
5615
+ "enum": [
5616
+ "order_holder",
5617
+ "permission",
5618
+ "named_operator",
5619
+ "not_available"
5620
+ ],
5621
+ "description": "How this account may execute it (not_available if it can't)."
5622
+ },
5623
+ "permission_index": {
5624
+ "type": "number",
5625
+ "description": "Permission index required (if permission-gated)."
5626
+ },
5627
+ "named_operator": {
5628
+ "type": "string",
5629
+ "description": "Named operator (LocalMark name) required (if named-gated)."
5630
+ },
5631
+ "guard": {
5632
+ "type": "string",
5633
+ "description": "Guard address gating this forward."
5634
+ },
5635
+ "semantics": {
5636
+ "type": "string",
5637
+ "description": "Human explanation of what executing this forward means."
5638
+ },
5639
+ "consequence": {
5640
+ "type": "string",
5641
+ "description": "Consequence hint (completion fund-release / refund path)."
5642
+ }
5643
+ },
5644
+ "required": [
5645
+ "name",
5646
+ "to_node",
5647
+ "execution_path",
5648
+ "semantics"
5649
+ ],
5650
+ "additionalProperties": false
5651
+ },
5652
+ "description": "Forwards THIS account can execute NOW (branch options if >1)."
5653
+ },
5654
+ "branch_choice": {
5655
+ "type": "object",
5656
+ "properties": {
5657
+ "message": {
5658
+ "type": "string"
5659
+ },
5660
+ "options": {
5661
+ "type": "array",
5662
+ "items": {
5663
+ "type": "object",
5664
+ "properties": {
5665
+ "forward": {
5666
+ "type": "string"
5667
+ },
5668
+ "to_node": {
5669
+ "type": "string"
5670
+ },
5671
+ "consequence": {
5672
+ "type": "string"
5673
+ }
5674
+ },
5675
+ "required": [
5676
+ "forward",
5677
+ "to_node"
5678
+ ],
5679
+ "additionalProperties": false
5680
+ }
5681
+ }
5682
+ },
5683
+ "required": [
5684
+ "message",
5685
+ "options"
5686
+ ],
5687
+ "additionalProperties": false,
5688
+ "description": "Present when >1 operable forward. AI MUST present options neutrally; the role decides."
5689
+ },
5690
+ "waiting_on": {
5691
+ "type": "array",
5692
+ "items": {
5693
+ "type": "object",
5694
+ "properties": {
5695
+ "role": {
5696
+ "type": "string"
5697
+ },
5698
+ "forwards": {
5699
+ "type": "array",
5700
+ "items": {
5701
+ "type": "string"
5702
+ }
5703
+ }
5704
+ },
5705
+ "required": [
5706
+ "role",
5707
+ "forwards"
5708
+ ],
5709
+ "additionalProperties": false
5710
+ },
5711
+ "description": "What the workflow is waiting on from OTHER roles."
5712
+ },
5713
+ "pending_claims": {
5714
+ "type": "array",
5715
+ "items": {
5716
+ "type": "object",
5717
+ "properties": {
5718
+ "kind": {
5719
+ "type": "string",
5720
+ "enum": [
5721
+ "reward",
5722
+ "discount",
5723
+ "compensation",
5724
+ "rating"
5725
+ ]
5726
+ },
5727
+ "label": {
5728
+ "type": "string"
5729
+ },
5730
+ "how": {
5731
+ "type": "string",
5732
+ "description": "How to claim (tool + operation hint)."
5733
+ }
5734
+ },
5735
+ "required": [
5736
+ "kind",
5737
+ "label",
5738
+ "how"
5739
+ ],
5740
+ "additionalProperties": false
5741
+ },
5742
+ "description": "Unclaimed benefits / post-purchase actions."
5743
+ },
5744
+ "interest_hints": {
5745
+ "type": "array",
5746
+ "items": {
5747
+ "type": "string"
5748
+ },
5749
+ "description": "Perspective-specific own-interest hints (fund-release trigger, settlement cycle, reputation)."
5750
+ },
5751
+ "workflow_unknown": {
5752
+ "type": "boolean",
5753
+ "description": "True when Machine data was unavailable — operable/waiting_on unknown."
5754
+ },
5755
+ "interest_analysis": {
5756
+ "type": "object",
5757
+ "properties": {
5758
+ "fund_flow": {
5759
+ "type": "array",
5760
+ "items": {
5761
+ "type": "string"
5762
+ },
5763
+ "description": "Where money sits and what releases it (escrow, Allocation waterfall, compensation_fund)."
5764
+ },
5765
+ "responsibility": {
5766
+ "type": "array",
5767
+ "items": {
5768
+ "type": "string"
5769
+ },
5770
+ "description": "What this account is semantically liable for right now (permission-gated forwards, guard obligations)."
5771
+ },
5772
+ "leverage": {
5773
+ "type": "array",
5774
+ "items": {
5775
+ "type": "string"
5776
+ },
5777
+ "description": "Actions serving the merchant's own interest (settlement speed, evidence pre-upload, Messenger nudge). Informational only."
5778
+ },
5779
+ "stakes": {
5780
+ "type": "array",
5781
+ "items": {
5782
+ "type": "string"
5783
+ },
5784
+ "description": "Downside exposure (arbitration indemnity, arb-loss record, stall statistics, refund aftermath)."
5785
+ },
5786
+ "summary": {
5787
+ "type": "string",
5788
+ "description": "One-paragraph merchant-interest summary."
5789
+ }
5790
+ },
5791
+ "required": [
5792
+ "fund_flow",
5793
+ "responsibility",
5794
+ "leverage",
5795
+ "stakes",
5796
+ "summary"
5797
+ ],
5798
+ "additionalProperties": false,
5799
+ "description": "Merchant-side interest analysis (fund_flow/responsibility/leverage/stakes) — present ONLY when perspective='operator' and order data is available. AI MUST surface it as neutral information; the merchant decides."
5800
+ },
5801
+ "summary": {
5802
+ "type": "string",
5803
+ "description": "One-paragraph AI-ready summary."
5804
+ },
5805
+ "attached_alerts": {
5806
+ "type": "array",
5807
+ "items": {
5808
+ "type": "object",
5809
+ "properties": {
5810
+ "id": {
5811
+ "type": "string"
5812
+ },
5813
+ "category": {
5814
+ "type": "string",
5815
+ "enum": [
5816
+ "progress_stall",
5817
+ "compensation_drop",
5818
+ "compensation_insufficient",
5819
+ "messenger_timeout",
5820
+ "user_action_required",
5821
+ "review_window",
5822
+ "arb_window",
5823
+ "refund_received",
5824
+ "anomaly"
5825
+ ]
5826
+ },
5827
+ "severity": {
5828
+ "type": "string",
5829
+ "enum": [
5830
+ "info",
5831
+ "warning",
5832
+ "critical"
5833
+ ]
5834
+ },
5835
+ "title": {
5836
+ "type": "string"
5837
+ },
5838
+ "message": {
5839
+ "type": "string"
5840
+ },
5841
+ "action": {
5842
+ "type": "string",
5843
+ "description": "Suggested next step."
5844
+ },
5845
+ "timestamp": {
5846
+ "type": "number"
5847
+ },
5848
+ "order_id": {
5849
+ "type": "string"
5850
+ },
5851
+ "service_id": {
5852
+ "type": "string"
5853
+ },
5854
+ "node": {
5855
+ "type": "string"
5856
+ },
5857
+ "metric": {
5858
+ "type": "object",
5859
+ "properties": {
5860
+ "label": {
5861
+ "type": "string"
5862
+ },
5863
+ "value": {
5864
+ "type": "number"
5865
+ },
5866
+ "threshold": {
5867
+ "type": "number"
5868
+ },
5869
+ "unit": {
5870
+ "type": "string"
5871
+ }
5872
+ },
5873
+ "required": [
5874
+ "label",
5875
+ "value"
5876
+ ],
5877
+ "additionalProperties": false
5878
+ }
5879
+ },
5880
+ "required": [
5881
+ "id",
5882
+ "category",
5883
+ "severity",
5884
+ "title",
5885
+ "message",
5886
+ "timestamp"
5887
+ ],
5888
+ "additionalProperties": false
5889
+ },
5890
+ "description": "Order-monitor alerts (stall/compensation/review-window) when radar_include_alerts=true."
5891
+ }
5892
+ },
5893
+ "required": [
5894
+ "account",
5895
+ "progress",
5896
+ "current_node",
5897
+ "perspective",
5898
+ "roles",
5899
+ "operable",
5900
+ "waiting_on",
5901
+ "pending_claims",
5902
+ "interest_hints",
5903
+ "workflow_unknown",
5904
+ "summary"
5905
+ ],
5906
+ "additionalProperties": false
5907
+ },
5908
+ "description": "Orders where the account can act NOW or has pending claims (customer perspective first)."
5909
+ },
5910
+ "waiting": {
5911
+ "type": "array",
5912
+ "items": {
5913
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/43/properties/actionable/items"
5914
+ },
5915
+ "description": "Orders where the account is only waiting on other roles."
5916
+ },
5917
+ "all_pending_claims": {
5918
+ "type": "array",
5919
+ "items": {
5920
+ "type": "object",
5921
+ "properties": {
5922
+ "kind": {
5923
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/43/properties/actionable/items/properties/pending_claims/items/properties/kind"
5924
+ },
5925
+ "label": {
5926
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/43/properties/actionable/items/properties/pending_claims/items/properties/label"
5927
+ },
5928
+ "how": {
5929
+ "$ref": "#/definitions/project_operation/properties/result/anyOf/43/properties/actionable/items/properties/pending_claims/items/properties/how"
5930
+ },
5931
+ "progress": {
5932
+ "type": "string"
5933
+ }
5934
+ },
5935
+ "required": [
5936
+ "kind",
5937
+ "label",
5938
+ "how",
5939
+ "progress"
5940
+ ],
5941
+ "additionalProperties": false
5942
+ },
5943
+ "description": "All pending claims across orders, tagged with their Progress address."
5944
+ },
5945
+ "unread_messages_total": {
5946
+ "type": "number",
5947
+ "description": "Unread Messenger messages total across all conversations of the radar account (local encrypted storage, read-only — never marks messages viewed; 0 with a data_gaps note when the account is not a local messenger account)."
5948
+ },
5949
+ "data_gaps": {
5950
+ "type": "array",
5951
+ "items": {
5952
+ "type": "string"
5953
+ },
5954
+ "description": "Graceful degradation notes (e.g. 'Order 0x… not found', 'Machine nodes unavailable')."
5955
+ },
5956
+ "summary": {
5957
+ "type": "string",
5958
+ "description": "Account-level dashboard summary."
5959
+ }
5960
+ },
5961
+ "required": [
5962
+ "action",
5963
+ "account",
5964
+ "orders_analyzed",
5965
+ "actionable",
5966
+ "waiting",
5967
+ "all_pending_claims",
5968
+ "unread_messages_total",
5969
+ "data_gaps",
5970
+ "summary"
5971
+ ],
5972
+ "additionalProperties": false
3731
5973
  }
3732
5974
  ],
3733
5975
  "description": "Query result — shape depends on action"