@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
@@ -29,9 +29,14 @@
29
29
  "get_object_diff",
30
30
  "delete_project",
31
31
  "assemble_context",
32
- "generate_deployment_doc"
32
+ "get_machine_graph",
33
+ "generate_deployment_doc",
34
+ "pre_evaluate_check",
35
+ "verify_deployment",
36
+ "clone_project_to_network",
37
+ "migrate_network"
33
38
  ],
34
- "description": "Action to perform. Two categories:\n1. Project Entity + Evaluation (15, GLM6): list_projects, create_project, create_project_from_onchain, update_project, get_project_detail, add_object, remove_object, create_version, build_graph, get_graph, evaluate_project, save_evaluation, compare_projects, refresh_objects, get_object_diff. Projects are first-class entities with SQLite persistence, rigid project-object relationships, three-pathway graph construction, and a dual rule-based + LLM-assisted evaluation engine.\n2. Context Assembly (1): assemble_context (query on-chain object states + extract embedded history + optional events, and assemble a structured semantic context for LLM consumption). Required input: context_objects (array of object IDs/names). Optional: include_events (query recent state-transition events)."
39
+ "description": "Action to perform. Two categories:\n1. Project Entity + Evaluation (15, GLM6): list_projects, create_project, create_project_from_onchain, update_project, get_project_detail, add_object, remove_object, create_version, build_graph, get_graph, evaluate_project, save_evaluation, compare_projects, refresh_objects, get_object_diff. Projects are first-class entities with SQLite persistence, rigid project-object relationships, three-pathway graph construction, and a dual rule-based + LLM-assisted evaluation engine.\n2. Context Assembly (1): assemble_context (query on-chain object states + extract embedded history + optional events, and assemble a structured semantic context for LLM consumption). Required input: context_objects (array of object IDs/names). Optional: include_events (query recent state-transition events).\n3. Cross-Network Migration (FIX-012): clone_project_to_network (or its alias migrate_network) copies a source project's object metadata to a new project bound to target_network. The 5-step migration workflow: 1) call clone_project_to_network (or migrate_network) with target_network to copy metadata, 2) re-run onchain_operations with env.network=target_network to deploy objects on-chain, 3) re-register LocalMark names with the SAME names on the target network (FIX-011 cross-network consistency), 4) update_project to set service_address on the new project, 5) build_graph to construct the new project's relationship graph."
35
40
  },
36
41
  "project": {
37
42
  "type": "string",
@@ -112,7 +117,7 @@
112
117
  "subscription",
113
118
  "custom"
114
119
  ],
115
- "description": "Industry tag for create_project. Drives template defaults."
120
+ "description": "Industry tag for create_project. Drives template defaults — when set (and not 'general'), the system auto-applies an industry blueprint with ~10 draft objects (Permission, Service, Machine, Guard, Treasury, Allocation, etc.) + graph edges, ready for deployment. Supported industries: 'general' (no template), 'retail', 'service', 'rental', 'freelance', 'education', 'travel', 'subscription', 'custom'. Each industry preset embeds risk constraints (e.g., 'freelance' does NOT require compensation_fund, while 'rental'/'travel' do). Example: project_industry='freelance' creates a freelance-style blueprint with setting_locked_time ≥ 7d. Set skip_templates=true to bypass template application."
116
121
  },
117
122
  "project_perspective": {
118
123
  "type": "string",
@@ -142,6 +147,10 @@
142
147
  ],
143
148
  "description": "Network the project is bound to. A Service deployed to different networks are different projects. Defaults to 'testnet'."
144
149
  },
150
+ "skip_templates": {
151
+ "type": "boolean",
152
+ "description": "When true, create_project skips applying the industry template (no draft:* blueprint objects). Use this when you want a clean project with no pre-filled blueprint objects — useful for custom architectures that do not match any industry mode, or to avoid draft objects appearing in build_graph / evaluate_project before deployment. Defaults to false (templates applied)."
153
+ },
145
154
  "project_id": {
146
155
  "type": "string",
147
156
  "description": "Project UUID for update_project / get_project_detail / add_object / remove_object / create_version / build_graph / evaluate_project / refresh_objects. Takes precedence over 'project' (prefix) when both are given."
@@ -156,9 +165,17 @@
156
165
  ],
157
166
  "description": "New status for update_project. 'active' projects are live, 'archived' are read-only."
158
167
  },
168
+ "target_network": {
169
+ "type": "string",
170
+ "enum": [
171
+ "testnet",
172
+ "mainnet"
173
+ ],
174
+ "description": "Target network for clone_project_to_network (or its alias migrate_network). The source project's objects are copied to a new project bound to this network. The new project's prefix is '<source_prefix>_<target_network>' to avoid collision. See the action description for the full 5-step migration workflow (FIX-012)."
175
+ },
159
176
  "object_address": {
160
177
  "type": "string",
161
- "description": "On-chain object address (0x...) for add_object / remove_object. For add_object, alternatively use object_name to resolve via LocalMark."
178
+ "description": "On-chain object address (0x followed by 32-64 hex chars) for add_object / remove_object. Also accepts the internal 'draft:<name>' sentinel used by create_project for blueprint objects not yet on-chain. For add_object, alternatively use object_name_add to resolve via LocalMark. H-06 fix: invalid formats are rejected at the handler level with a descriptive error."
162
179
  },
163
180
  "object_name_add": {
164
181
  "type": "string",
@@ -249,6 +266,12 @@
249
266
  "maximum": 5,
250
267
  "description": "Max recursion depth for Pathway 1 (internal reference derivation) in build_graph. Default 3."
251
268
  },
269
+ "depth": {
270
+ "type": "integer",
271
+ "minimum": 1,
272
+ "maximum": 5,
273
+ "description": "Alias for max_depth (build_graph). When both are set, max_depth takes precedence. Default 3."
274
+ },
252
275
  "enable_registrar": {
253
276
  "type": "boolean",
254
277
  "description": "Enable Pathway 2 (Registrar inbound query) in build_graph. Default true."
@@ -257,6 +280,10 @@
257
280
  "type": "boolean",
258
281
  "description": "Enable Pathway 3 (potential relationship detection) in build_graph. Default false."
259
282
  },
283
+ "async_mode": {
284
+ "type": "boolean",
285
+ "description": "When true, build_graph / evaluate_project runs in the background and returns { task_id } immediately. Poll query_task_status(task_id) to check progress and retrieve the result. Default false (synchronous). Use async_mode=true for large projects with enable_potential=true where build may take >10s."
286
+ },
260
287
  "evaluation_type": {
261
288
  "type": "string",
262
289
  "enum": [
@@ -319,6 +346,15 @@
319
346
  "save": {
320
347
  "type": "boolean",
321
348
  "description": "When true (default), persist the generated MD to SQLite project_documents table for generate_deployment_doc."
349
+ },
350
+ "detail_level": {
351
+ "type": "string",
352
+ "enum": [
353
+ "summary",
354
+ "detailed",
355
+ "full"
356
+ ],
357
+ "description": "P2-03: Deployment document detail level (only for generate_deployment_doc). 'summary' (default): object name + type + key bindings (machine, permission, buy_guard, order_allocators). 'detailed': adds sale list, arbitration list, reward list. 'full': complete fields including stock, price, wip_hash, all config. Use 'summary' for quick review; request 'detailed' or 'full' only when deeper inspection is needed."
322
358
  }
323
359
  },
324
360
  "required": [
@@ -535,7 +535,7 @@
535
535
  "address"
536
536
  ],
537
537
  "additionalProperties": false,
538
- "description": "LOCAL PRIVATE: Local mark data structure for storing address names and tags privately on your device. This data is NEVER published to the blockchain."
538
+ "description": "LOCAL PRIVATE: Local mark data structure for storing address names and tags privately on your device. This data is NEVER published to the blockchain. CROSS-NETWORK ISOLATION (DOC-02): LocalMark names are scoped per network — the same name 'my-service' can map to different addresses on testnet vs mainnet. When switching networks (e.g., testnet→mainnet deployment), re-create marks with the same names pointing to the new mainnet addresses. This enables name-based object references that work identically across networks without code changes."
539
539
  },
540
540
  "description": "Local mark list"
541
541
  },
@@ -2648,11 +2648,11 @@
2648
2648
  },
2649
2649
  "wip": {
2650
2650
  "type": "string",
2651
- "description": "HTTP URL of wip file"
2651
+ "description": "WIP file URL. EMPTY string \"\" skips verification (TESTING ONLY). Production MUST use a real HTTP URL pointing to a .wip file generated by the wip_file tool. Example: \"https://cdn.example.com/products/phone_v1.wip\""
2652
2652
  },
2653
2653
  "wip_hash": {
2654
2654
  "type": "string",
2655
- "description": "Hash of WIP. If EMPTY string, the hash within wip will be automatically used; else, the consistency of the hash within wip will be verified with the provided hash."
2655
+ "description": "WIP file hash (hex string). EMPTY string \"\" skips hash comparison (TESTING ONLY). Production: fill with the hash you saw when viewing the product, to prevent merchant replacing the WIP file before order."
2656
2656
  }
2657
2657
  },
2658
2658
  "required": [
@@ -2716,7 +2716,7 @@
2716
2716
  "number",
2717
2717
  "string"
2718
2718
  ],
2719
- "description": "Compensation fund pool for arbitration results. Order users can receive compensation from this fund based on arbitration results."
2719
+ "description": "Compensation fund BALANCE (NOT a Treasury address). This field reports the total amount of funds currently held in the Service's compensation pool. To ADD funds, use `service.compensation_fund_add`. To RECEIVE funds (as order owner after arbitration), use `service.compensation_fund_receive`. P2-03 clarification: this is a balance value (e.g. {balance: '1000000000', token_type: '0x2::wow::WOW'}), NOT the Treasury object address. The Treasury address (if bound) is queried separately via the Service's `repositories` or `order_allocators` configuration."
2720
2720
  },
2721
2721
  "paused_time": {
2722
2722
  "type": [
@@ -2747,7 +2747,7 @@
2747
2747
  "number",
2748
2748
  "string"
2749
2749
  ],
2750
- "description": "Threshold. If defined, fund allocation will be triggered when amount in Allocation object reaches this threshold.",
2750
+ "description": "Minimum balance required for allocation to fire. When the Allocation object's balance < threshold, allocation aborts with EINSUFFICIENT_BALANCE=7. Also: when an Allocator has only Amount items (no Rate, no Surplus), the sum of Amount items must be >= threshold (EAMOUNT_BELOW_THRESHOLD=12). Set to 0 (default) to allow any balance.",
2751
2751
  "default": 0
2752
2752
  },
2753
2753
  "allocators": {
@@ -2757,7 +2757,7 @@
2757
2757
  "properties": {
2758
2758
  "guard": {
2759
2759
  "type": "string",
2760
- "description": "Guard object ID. If Guard verification passes, fund allocation will start automatically."
2760
+ "description": "Guard object ID or name. If Guard verification passes (via Passport), fund allocation for THIS Allocator fires. Each Allocator in an Allocators list can have a different Guard — the first Allocator whose Guard returns true wins. This enables mutually exclusive allocation paths (e.g., refund Guard on 'return_approved' node vs damage Guard on 'damage_confirmed' node)."
2761
2761
  },
2762
2762
  "sharing": {
2763
2763
  "type": "array",
@@ -2805,7 +2805,7 @@
2805
2805
  "Entity"
2806
2806
  ],
2807
2807
  "additionalProperties": false,
2808
- "description": "Determined ID"
2808
+ "description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
2809
2809
  },
2810
2810
  {
2811
2811
  "type": "object",
@@ -2822,23 +2822,32 @@
2822
2822
  "description": "Current transaction signer ID"
2823
2823
  }
2824
2824
  ],
2825
- "description": "Recipient ID"
2825
+ "description": "Recipient of this allocation. Three forms:\n• { GuardIdentifier: u8 } — resolved from Passport at allocation time. Use 0 for Order owner in Service-integrated mode (Customer who created the Order). The identifier must match a Guard table entry with b_submission=true. If Passport has no matching submission, contract aborts with E_VERIFY_FAILED.\n• { Entity: { name_or_address: '...' } } — static address resolved via LocalMark. Use for known recipients (e.g., 'turo_host', or a Treasury object address).\n• 'Signer' — the transaction sender (tx_context::sender). Use when the recipient is the current signer (e.g., self-refund scenarios)."
2826
2826
  },
2827
2827
  "sharing": {
2828
2828
  "type": [
2829
2829
  "number",
2830
2830
  "string"
2831
2831
  ],
2832
- "description": "Reward allocation value"
2832
+ "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations."
2833
2833
  },
2834
2834
  "mode": {
2835
- "type": "string",
2836
- "enum": [
2837
- "Amount",
2838
- "Rate",
2839
- "Surplus"
2835
+ "anyOf": [
2836
+ {
2837
+ "type": "string",
2838
+ "enum": [
2839
+ "Amount",
2840
+ "Rate",
2841
+ "Surplus"
2842
+ ]
2843
+ },
2844
+ {
2845
+ "type": "integer",
2846
+ "minimum": 0,
2847
+ "maximum": 2
2848
+ }
2840
2849
  ],
2841
- "description": "Reward allocation mode"
2850
+ "description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
2842
2851
  }
2843
2852
  },
2844
2853
  "required": [
@@ -2847,13 +2856,13 @@
2847
2856
  "mode"
2848
2857
  ],
2849
2858
  "additionalProperties": false,
2850
- "description": "Fund allocation item"
2859
+ "description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
2851
2860
  },
2852
- "description": "Fund allocation item list. Each item represents a recipient and their corresponding reward allocation value."
2861
+ "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
2853
2862
  },
2854
2863
  "fix": {
2855
2864
  "$ref": "#/definitions/object_service/properties/order_allocators/anyOf/0/properties/threshold",
2856
- "description": "Fixed allocation amount. If specified, all recipients will receive the fixed allocation amount."
2865
+ "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation."
2857
2866
  },
2858
2867
  "max": {
2859
2868
  "anyOf": [
@@ -2864,7 +2873,7 @@
2864
2873
  "type": "null"
2865
2874
  }
2866
2875
  ],
2867
- "description": "Maximum allocation amount. If specified, allocation amount cannot exceed maximum allocation amount."
2876
+ "description": "Maximum allocation cap (optional). Has THREE effects:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount)."
2868
2877
  }
2869
2878
  },
2870
2879
  "required": [
@@ -2872,9 +2881,9 @@
2872
2881
  "sharing"
2873
2882
  ],
2874
2883
  "additionalProperties": false,
2875
- "description": "Fund allocator"
2884
+ "description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
2876
2885
  },
2877
- "description": "Fund allocator list. Each fund allocator represents a fund allocation strategy."
2886
+ "description": "Fund allocator list. Each allocator is evaluated in order; the FIRST allocator whose Guard passes wins. This enables mutually exclusive allocation paths (e.g., 3 allocators for 3 forward paths: refund / damage-deduct / arbitrate)."
2878
2887
  }
2879
2888
  },
2880
2889
  "required": [
@@ -2882,7 +2891,7 @@
2882
2891
  "allocators"
2883
2892
  ],
2884
2893
  "additionalProperties": false,
2885
- "description": "Fund allocator list"
2894
+ "description": "Fund allocator list — the top-level allocation configuration attached to an Order. Contains a threshold and a list of Allocators. When funds arrive at the Order, the first Allocator whose Guard passes executes its sharing[] in strict order: Amount → Rate → Surplus. MULTI-TIER ALLOCATION (DOC-04): Each Order binds ONE Allocators template (set on Service.order_allocators before publish). For multi-tier distribution (e.g., customer→agency→suppliers), use a two-phase approach: (1) Tier-1 Allocators on the customer's Order (allocates to agency + refund fund); (2) Tier-2 Allocators on a NEW Order created by the agency (allocates agency's received funds to suppliers). Each tier's Rate-mode sharing[] must independently sum to 10000 (or <= 10000 with Surplus)."
2886
2895
  },
2887
2896
  {
2888
2897
  "type": "null"
@@ -4879,7 +4888,7 @@
4879
4888
  "properties": {
4880
4889
  "guard": {
4881
4890
  "type": "string",
4882
- "description": "Guard object ID. If Guard verification passes, fund allocation will start automatically."
4891
+ "description": "Guard object ID or name. If Guard verification passes (via Passport), fund allocation for THIS Allocator fires. Each Allocator in an Allocators list can have a different Guard — the first Allocator whose Guard returns true wins. This enables mutually exclusive allocation paths (e.g., refund Guard on 'return_approved' node vs damage Guard on 'damage_confirmed' node)."
4883
4892
  },
4884
4893
  "sharing": {
4885
4894
  "type": "array",
@@ -4927,7 +4936,7 @@
4927
4936
  "Entity"
4928
4937
  ],
4929
4938
  "additionalProperties": false,
4930
- "description": "Determined ID"
4939
+ "description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
4931
4940
  },
4932
4941
  {
4933
4942
  "type": "object",
@@ -4944,23 +4953,32 @@
4944
4953
  "description": "Current transaction signer ID"
4945
4954
  }
4946
4955
  ],
4947
- "description": "Recipient ID"
4956
+ "description": "Recipient of this allocation. Three forms:\n• { GuardIdentifier: u8 } — resolved from Passport at allocation time. Use 0 for Order owner in Service-integrated mode (Customer who created the Order). The identifier must match a Guard table entry with b_submission=true. If Passport has no matching submission, contract aborts with E_VERIFY_FAILED.\n• { Entity: { name_or_address: '...' } } — static address resolved via LocalMark. Use for known recipients (e.g., 'turo_host', or a Treasury object address).\n• 'Signer' — the transaction sender (tx_context::sender). Use when the recipient is the current signer (e.g., self-refund scenarios)."
4948
4957
  },
4949
4958
  "sharing": {
4950
4959
  "type": [
4951
4960
  "number",
4952
4961
  "string"
4953
4962
  ],
4954
- "description": "Reward allocation value"
4963
+ "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations."
4955
4964
  },
4956
4965
  "mode": {
4957
- "type": "string",
4958
- "enum": [
4959
- "Amount",
4960
- "Rate",
4961
- "Surplus"
4966
+ "anyOf": [
4967
+ {
4968
+ "type": "string",
4969
+ "enum": [
4970
+ "Amount",
4971
+ "Rate",
4972
+ "Surplus"
4973
+ ]
4974
+ },
4975
+ {
4976
+ "type": "integer",
4977
+ "minimum": 0,
4978
+ "maximum": 2
4979
+ }
4962
4980
  ],
4963
- "description": "Reward allocation mode"
4981
+ "description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
4964
4982
  }
4965
4983
  },
4966
4984
  "required": [
@@ -4969,16 +4987,16 @@
4969
4987
  "mode"
4970
4988
  ],
4971
4989
  "additionalProperties": false,
4972
- "description": "Fund allocation item"
4990
+ "description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
4973
4991
  },
4974
- "description": "Fund allocation item list. Each item represents a recipient and their corresponding reward allocation value."
4992
+ "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
4975
4993
  },
4976
4994
  "fix": {
4977
4995
  "type": [
4978
4996
  "number",
4979
4997
  "string"
4980
4998
  ],
4981
- "description": "Fixed allocation amount. If specified, all recipients will receive the fixed allocation amount."
4999
+ "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract during `allocator_add` — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation."
4982
5000
  },
4983
5001
  "max": {
4984
5002
  "anyOf": [
@@ -4989,7 +5007,7 @@
4989
5007
  "type": "null"
4990
5008
  }
4991
5009
  ],
4992
- "description": "Maximum allocation amount. If specified, allocation amount cannot exceed maximum allocation amount."
5010
+ "description": "Maximum allocation cap (optional). Has THREE effects:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount)."
4993
5011
  }
4994
5012
  },
4995
5013
  "required": [
@@ -4997,7 +5015,7 @@
4997
5015
  "sharing"
4998
5016
  ],
4999
5017
  "additionalProperties": false,
5000
- "description": "Fund allocator"
5018
+ "description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
5001
5019
  },
5002
5020
  "description": "Fund allocation object allocator list"
5003
5021
  },
@@ -5315,7 +5333,7 @@
5315
5333
  "Entity"
5316
5334
  ],
5317
5335
  "additionalProperties": false,
5318
- "description": "Determined ID"
5336
+ "description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
5319
5337
  },
5320
5338
  {
5321
5339
  "type": "object",
@@ -5332,7 +5350,7 @@
5332
5350
  "description": "Current transaction signer ID"
5333
5351
  }
5334
5352
  ],
5335
- "description": "Recipient ID"
5353
+ "description": "Recipient ID. Three forms:\n - {GuardIdentifier: u8} — resolved from Passport at allocation time\n - {Entity: {name_or_address: 'mark_name'}} — static address via LocalMark (recommended)\n - {Signer: 'signer'} — transaction sender (e.g. self-refund)"
5336
5354
  },
5337
5355
  "amount": {
5338
5356
  "anyOf": [
@@ -5366,7 +5384,7 @@
5366
5384
  "number",
5367
5385
  "string"
5368
5386
  ],
5369
- "description": "Balance type"
5387
+ "description": "A coin/balance amount in the smallest on-chain unit (u64). Accepts a JS number OR a numeric string. PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — JS numbers lose precision above 2^53. UNIT: this is the smallest unit, NOT the display unit. For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. For custom tokens: use the token's native smallest unit (decimals from coin metadata). Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
5370
5388
  }
5371
5389
  },
5372
5390
  "required": [
@@ -6352,7 +6370,7 @@
6352
6370
  "Entity"
6353
6371
  ],
6354
6372
  "additionalProperties": false,
6355
- "description": "Determined ID"
6373
+ "description": "Static address resolved via LocalMark. Format: {Entity: {name_or_address: 'mark_name'}} — NOTE: Entity is an OBJECT with name_or_address field, NOT a bare string."
6356
6374
  },
6357
6375
  {
6358
6376
  "type": "object",
@@ -6369,14 +6387,14 @@
6369
6387
  "description": "Current transaction signer ID"
6370
6388
  }
6371
6389
  ],
6372
- "description": "Recipient ID"
6390
+ "description": "Recipient ID. Three forms:\n - {GuardIdentifier: u8} — resolved from Passport at allocation time\n - {Entity: {name_or_address: 'mark_name'}} — static address via LocalMark (recommended)\n - {Signer: 'signer'} — transaction sender (e.g. self-refund)"
6373
6391
  },
6374
6392
  "amount": {
6375
6393
  "type": [
6376
6394
  "number",
6377
6395
  "string"
6378
6396
  ],
6379
- "description": "Balance type"
6397
+ "description": "A coin/balance amount in the smallest on-chain unit (u64). Accepts a JS number OR a numeric string. PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — JS numbers lose precision above 2^53. UNIT: this is the smallest unit, NOT the display unit. For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. For custom tokens: use the token's native smallest unit (decimals from coin metadata). Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
6380
6398
  }
6381
6399
  },
6382
6400
  "required": [
@@ -8406,14 +8424,16 @@
8406
8424
  "discount_type": {
8407
8425
  "anyOf": [
8408
8426
  {
8409
- "type": "number",
8410
- "const": 0,
8411
- "description": "Rate discount type"
8427
+ "type": "string",
8428
+ "enum": [
8429
+ "RATES",
8430
+ "FIXED"
8431
+ ]
8412
8432
  },
8413
8433
  {
8414
- "type": "number",
8415
- "const": 1,
8416
- "description": "Fixed discount type"
8434
+ "type": "integer",
8435
+ "minimum": 0,
8436
+ "maximum": 1
8417
8437
  }
8418
8438
  ],
8419
8439
  "description": "Discount type. If rate(0), discount is based on proportion of product amount (e.g., 1000 means 10% discount); if fixed(1), discount is based on fixed value of product amount (e.g., 100 means 100 yuan discount)."
@@ -8425,7 +8445,7 @@
8425
8445
  "number",
8426
8446
  "string"
8427
8447
  ],
8428
- "description": "Balance type"
8448
+ "description": "A coin/balance amount in the smallest on-chain unit (u64). Accepts a JS number OR a numeric string. PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — JS numbers lose precision above 2^53. UNIT: this is the smallest unit, NOT the display unit. For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. For custom tokens: use the token's native smallest unit (decimals from coin metadata). Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
8429
8449
  },
8430
8450
  {
8431
8451
  "type": "null"
@@ -13013,7 +13033,7 @@
13013
13033
  "properties": {
13014
13034
  "prev_node": {
13015
13035
  "type": "string",
13016
- "description": "Previous node name"
13036
+ "description": "Previous node name. Empty string '' means initial entry node (the first node in the workflow)."
13017
13037
  },
13018
13038
  "threshold": {
13019
13039
  "type": [
@@ -13073,38 +13093,46 @@
13073
13093
  "guard": {
13074
13094
  "anyOf": [
13075
13095
  {
13076
- "type": "object",
13077
- "properties": {
13078
- "guard": {
13079
- "type": "string",
13080
- "description": "Guard object ID"
13081
- },
13082
- "retained_submission": {
13083
- "anyOf": [
13084
- {
13085
- "type": "array",
13086
- "items": {
13087
- "$ref": "#/definitions/query_result_onchain_table_item_machine_node/anyOf/0/properties/value/items/properties/threshold"
13088
- }
13096
+ "anyOf": [
13097
+ {
13098
+ "type": "object",
13099
+ "properties": {
13100
+ "guard": {
13101
+ "type": "string",
13102
+ "description": "Guard object name or address (string). Example: 'my_attendance_guard' or '0x1234...'"
13089
13103
  },
13090
- {
13091
- "type": "null"
13104
+ "retained_submission": {
13105
+ "anyOf": [
13106
+ {
13107
+ "type": "array",
13108
+ "items": {
13109
+ "$ref": "#/definitions/query_result_onchain_table_item_machine_node/anyOf/0/properties/value/items/properties/threshold"
13110
+ }
13111
+ },
13112
+ {
13113
+ "type": "null"
13114
+ }
13115
+ ],
13116
+ "description": "Data submitted by user during Guard object verification"
13092
13117
  }
13118
+ },
13119
+ "required": [
13120
+ "guard"
13093
13121
  ],
13094
- "description": "Data submitted by user during Guard object verification"
13122
+ "additionalProperties": false,
13123
+ "description": "OBJECT form: {guard: '<guard_name_or_address>', retained_submission?: number[]}. Use this form when you need to pass retained_submission data alongside the Guard reference."
13124
+ },
13125
+ {
13126
+ "type": "string",
13127
+ "description": "STRING form (shorthand): the Guard object's name or address as a plain string. Auto-wrapped to {guard: <string>} at runtime. Use this when you only need to reference a Guard without retained_submission."
13095
13128
  }
13096
- },
13097
- "required": [
13098
- "guard"
13099
- ],
13100
- "additionalProperties": false,
13101
- "description": "Record of Guard object in MachineForwardGuard object"
13129
+ ]
13102
13130
  },
13103
13131
  {
13104
13132
  "type": "null"
13105
13133
  }
13106
13134
  ],
13107
- "description": "Guard object ID, if defined, Guard verification must also pass to complete Forward (e.g., completed promised supply chain sub-order)."
13135
+ "description": "Guard reference for this forward. Accepts TWO formats:\n• STRING (preferred): \"my_guard_name\" — the Guard's name or address as a plain string.\n• OBJECT (only when retained_submission is needed): {guard: \"my_guard_name\", retained_submission: [1,2,3]}.\nFOLLOW THE SCHEMA FIELD STRUCTURE: A Guard reference is fundamentally a STRING (the Guard object's name or address). Provide a string when you only need to reference a Guard — do NOT wrap a bare string in an object structure. The OBJECT form {guard: \"...\", retained_submission: [...]} exists ONLY to carry additional `retained_submission` data alongside the string reference; inside the object, the `guard` field is STILL a string. In short: string-in for a string reference, object-in only when you need to pass extra data.\nCOGNITIVE PRINCIPLE: Guard validation ALWAYS occurs BEFORE the forward operation. A Guard that queries state of the SAME Progress object this forward operates on (e.g. progress.current) will see the PRE-transition value (source node), NOT the target node. If the Guard checks progress.current == target_node, it will ALWAYS FAIL. Querying a DIFFERENT Progress object (cross-machine) is safe and reasonable — that progress is not modified by this forward. For target-node verification after transition, bind the Guard to the Allocator instead (allocation.alloc runs AFTER the state transition completes)."
13108
13136
  }
13109
13137
  },
13110
13138
  "required": [
@@ -13114,7 +13142,7 @@
13114
13142
  "additionalProperties": false,
13115
13143
  "description": "Forward in Machine object"
13116
13144
  },
13117
- "description": "Forward list"
13145
+ "description": "Forward list — operations to ENTER THIS NODE from prev_node. Example: pair {prev_node:'A', forwards:[{name:'Go'}]} means 'use Go to advance FROM A TO THIS NODE'. For initial node (prev_node=''), forwards are operations to enter this node from the start state. WARNING: forwards belong to the DESTINATION node's pair, NOT the source node. Placing a forward on the wrong pair will cause Progress to get stuck."
13118
13146
  }
13119
13147
  },
13120
13148
  "required": [
@@ -14173,7 +14201,7 @@
14173
14201
  "number",
14174
14202
  "string"
14175
14203
  ],
14176
- "description": "Balance type"
14204
+ "description": "A coin/balance amount in the smallest on-chain unit (u64). Accepts a JS number OR a numeric string. PRECISION RULE: for values exceeding 2^53 (e.g. token amounts with 18 decimals), ALWAYS pass a numeric STRING (e.g. \"1000000000000000000\") to preserve precision — JS numbers lose precision above 2^53. UNIT: this is the smallest unit, NOT the display unit. For SUI: 1 SUI = 10^9 MIST, so 10 SUI = 10000000000. For custom tokens: use the token's native smallest unit (decimals from coin metadata). Examples: 10000000000 (10 SUI), \"1000000000000000000\" (1 token with 18 decimals), 500 (500 units of a token with 0 decimals). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
14177
14205
  },
14178
14206
  "token_type": {
14179
14207
  "type": "string",
@@ -290,7 +290,7 @@
290
290
  "testnet",
291
291
  "mainnet"
292
292
  ],
293
- "description": "Network entrypoint: Specifies which network the operation occurs on"
293
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
294
294
  }
295
295
  },
296
296
  "required": [
@@ -338,7 +338,7 @@
338
338
  },
339
339
  "network": {
340
340
  "$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
341
- "description": "Network entrypoint: Specifies which network the operation occurs on"
341
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
342
342
  }
343
343
  },
344
344
  "required": [
@@ -367,7 +367,7 @@
367
367
  },
368
368
  "network": {
369
369
  "$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
370
- "description": "Network entrypoint: Specifies which network the operation occurs on"
370
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
371
371
  }
372
372
  },
373
373
  "required": [
@@ -387,8 +387,8 @@
387
387
  "name_or_address": {
388
388
  "anyOf": [
389
389
  {
390
- "type": "string",
391
- "description": "Account name, address (0x...), or mark name. When using string format, local marks are searched first. EXAMPLE: 'alice' - searches local marks first, then global; EXAMPLE: '0x1234...' - uses address directly"
390
+ "$ref": "#/definitions/query_toolkit/anyOf/4/properties/name_or_address",
391
+ "description": "Account name, address (0x...), or mark name. When using string format, local marks are searched first. EXAMPLE: 'alice' - searches local marks first, then global; EXAMPLE: '0x2...' (64 hex chars) - uses address directly; EXAMPLE: '' - uses the default local account"
392
392
  },
393
393
  {
394
394
  "type": "object",
@@ -443,7 +443,7 @@
443
443
  },
444
444
  "network": {
445
445
  "$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
446
- "description": "Network entrypoint: Specifies which network the operation occurs on"
446
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
447
447
  }
448
448
  },
449
449
  "required": [
@@ -470,7 +470,7 @@
470
470
  },
471
471
  "network": {
472
472
  "$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
473
- "description": "Network entrypoint: Specifies which network the operation occurs on"
473
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
474
474
  }
475
475
  },
476
476
  "required": [
@@ -519,7 +519,7 @@
519
519
  },
520
520
  "network": {
521
521
  "$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
522
- "description": "Network entrypoint: Specifies which network the operation occurs on"
522
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
523
523
  }
524
524
  },
525
525
  "required": [
@@ -575,7 +575,7 @@
575
575
  },
576
576
  "network": {
577
577
  "$ref": "#/definitions/query_toolkit/anyOf/4/properties/network",
578
- "description": "Network entrypoint: Specifies which network the operation occurs on"
578
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
579
579
  }
580
580
  },
581
581
  "required": [