@wowok/agent-mcp 3.3.7 → 3.3.9

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 (173) hide show
  1. package/dist/chain-semantics/fund-flow.js +1 -1
  2. package/dist/chain-semantics/guard-verbs.js +1 -1
  3. package/dist/chain-semantics/object-graph.js +1 -1
  4. package/dist/communication/message-cursors.d.ts +35 -0
  5. package/dist/communication/message-cursors.js +1 -0
  6. package/dist/communication/wts-attestation.d.ts +5 -0
  7. package/dist/communication/wts-attestation.js +1 -1
  8. package/dist/composition/audit.js +1 -1
  9. package/dist/composition/compile.d.ts +2 -2
  10. package/dist/composition/compile.js +1 -1
  11. package/dist/composition/inflight.d.ts +7 -0
  12. package/dist/composition/inflight.js +1 -1
  13. package/dist/composition/materialize.d.ts +4 -1
  14. package/dist/composition/materialize.js +1 -1
  15. package/dist/config/index.d.ts +1 -0
  16. package/dist/config/index.js +1 -1
  17. package/dist/config/store-policy.d.ts +14 -0
  18. package/dist/config/store-policy.js +1 -0
  19. package/dist/config/store-policy.spec.d.ts +1 -0
  20. package/dist/config/store-policy.spec.js +1 -0
  21. package/dist/customer/industry-risks.js +1 -1
  22. package/dist/customer/user-preferences.js +1 -1
  23. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  24. package/dist/evaluation/engine.js +1 -1
  25. package/dist/experience/realtime-feedback.js +1 -1
  26. package/dist/extensions/business-modules.d.ts +1 -1
  27. package/dist/extensions/business-modules.js +1 -1
  28. package/dist/extensions/industry-pack.js +1 -1
  29. package/dist/extensions/modes.js +1 -1
  30. package/dist/graph/onchain/analyze.js +1 -1
  31. package/dist/graph/onchain/expand.js +1 -1
  32. package/dist/graph/onchain/exposure.js +1 -1
  33. package/dist/graph/onchain/facts.d.ts +1 -0
  34. package/dist/graph/onchain/facts.js +1 -1
  35. package/dist/graph/onchain/facts.spec.js +1 -1
  36. package/dist/harness/recover.js +1 -1
  37. package/dist/knowledge/acquisition-flywheel.js +1 -1
  38. package/dist/knowledge/allocation-ledger.d.ts +1 -0
  39. package/dist/knowledge/allocation-ledger.js +1 -1
  40. package/dist/knowledge/allocator-rail-verifier.d.ts +6 -2
  41. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  42. package/dist/knowledge/arbitration-ledger.js +1 -1
  43. package/dist/knowledge/audit-rules.d.ts +37 -0
  44. package/dist/knowledge/audit-rules.js +1 -1
  45. package/dist/knowledge/baselines/rules/plan.json +32 -2
  46. package/dist/knowledge/builtin-templates.d.ts +13 -1
  47. package/dist/knowledge/builtin-templates.js +1 -1
  48. package/dist/knowledge/commission-landing.d.ts +26 -0
  49. package/dist/knowledge/commission-landing.js +1 -0
  50. package/dist/knowledge/discount-threshold.js +1 -1
  51. package/dist/knowledge/fund-layer.d.ts +7 -0
  52. package/dist/knowledge/fund-layer.js +1 -1
  53. package/dist/knowledge/getting-started.js +1 -1
  54. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  55. package/dist/knowledge/guard-design-patterns.js +1 -1
  56. package/dist/knowledge/guard-puzzle.js +1 -1
  57. package/dist/knowledge/guard-render.d.ts +7 -0
  58. package/dist/knowledge/guard-render.js +1 -1
  59. package/dist/knowledge/guard-risk.js +1 -1
  60. package/dist/knowledge/guard-templates.d.ts +1 -1
  61. package/dist/knowledge/guard-templates.js +1 -1
  62. package/dist/knowledge/guard-translation.js +1 -1
  63. package/dist/knowledge/index.js +1 -1
  64. package/dist/knowledge/industry-generalizer.js +1 -1
  65. package/dist/knowledge/industry-registry.d.ts +1 -1
  66. package/dist/knowledge/industry-registry.js +1 -1
  67. package/dist/knowledge/industry-strategy.js +1 -1
  68. package/dist/knowledge/jsonrpc-enum.js +1 -1
  69. package/dist/knowledge/machine-fork-watch.d.ts +9 -0
  70. package/dist/knowledge/machine-fork-watch.js +1 -0
  71. package/dist/knowledge/migration-preflight.js +1 -1
  72. package/dist/knowledge/projection.spec.js +1 -1
  73. package/dist/knowledge/scenario-modes.d.ts +8 -2
  74. package/dist/knowledge/scenario-modes.js +1 -1
  75. package/dist/knowledge/semantic-ir.d.ts +24 -5
  76. package/dist/knowledge/semantic-ir.js +1 -1
  77. package/dist/knowledge/service-ledger.js +1 -1
  78. package/dist/knowledge/strategy-manuals.js +1 -1
  79. package/dist/knowledge/template-index.js +1 -1
  80. package/dist/knowledge/template-loader.d.ts +11 -0
  81. package/dist/knowledge/template-loader.js +1 -1
  82. package/dist/knowledge/template-registry.js +1 -1
  83. package/dist/knowledge/template-scanner.d.ts +4 -2
  84. package/dist/knowledge/template-scanner.js +1 -1
  85. package/dist/knowledge/template-validation.js +1 -1
  86. package/dist/knowledge/tools-reference.js +1 -1
  87. package/dist/monitor/MonitorLoop.js +1 -1
  88. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  89. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  90. package/dist/playbooks/service-build/merchant-guide.d.ts +12 -6
  91. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  92. package/dist/playbooks/service-build/migration-planner.d.ts +10 -2
  93. package/dist/playbooks/service-build/migration-planner.js +1 -1
  94. package/dist/playbooks/service-build/mode-actions.d.ts +1 -0
  95. package/dist/playbooks/service-build/mode-actions.js +1 -1
  96. package/dist/playbooks/service-build/object-panorama.js +1 -1
  97. package/dist/playbooks/service-build/participation-radar.js +1 -1
  98. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  99. package/dist/playbooks/service-build/service-panorama.js +1 -1
  100. package/dist/playbooks/service-build/service-quote.js +1 -1
  101. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  102. package/dist/review/index.js +1 -1
  103. package/dist/safety/confirm-gate.js +1 -1
  104. package/dist/schema/benchmark-migration/index.d.ts +72 -1
  105. package/dist/schema/benchmark-migration/index.js +1 -1
  106. package/dist/schema/call/allocation.d.ts +3 -0
  107. package/dist/schema/call/allocation.js +1 -1
  108. package/dist/schema/call/base.d.ts +24 -0
  109. package/dist/schema/call/bridge.d.ts +6 -0
  110. package/dist/schema/call/error-codes.d.ts +1 -1
  111. package/dist/schema/call/error-codes.js +1 -1
  112. package/dist/schema/call/order.js +1 -1
  113. package/dist/schema/call/semantic.js +1 -1
  114. package/dist/schema/call/service.js +1 -1
  115. package/dist/schema/common/index.js +1 -1
  116. package/dist/schema/config/index.d.ts +24 -0
  117. package/dist/schema/config/index.js +1 -1
  118. package/dist/schema/goal/index.d.ts +14 -0
  119. package/dist/schema/goal/planning.d.ts +26 -0
  120. package/dist/schema/goal/planning.js +1 -1
  121. package/dist/schema/industry-pack/index.d.ts +9 -1
  122. package/dist/schema/industry-pack/modes.d.ts +9 -1
  123. package/dist/schema/industry-pack/modes.js +1 -1
  124. package/dist/schema/local/index.d.ts +60 -0
  125. package/dist/schema/local/index.js +1 -1
  126. package/dist/schema/messenger/index.d.ts +278 -1
  127. package/dist/schema/messenger/index.js +1 -1
  128. package/dist/schema/operations.d.ts +1 -0
  129. package/dist/schema/query/bi.d.ts +38 -0
  130. package/dist/schema/query/bi.js +1 -1
  131. package/dist/schema/query/index.d.ts +3 -0
  132. package/dist/schema/query/index.js +1 -1
  133. package/dist/schema/schema-version.js +1 -1
  134. package/dist/schema/service-clone/index.d.ts +17 -0
  135. package/dist/schema/service-clone/index.js +1 -1
  136. package/dist/schema-query-impl/index.js +1 -1
  137. package/dist/schemas/account_operation.output.json +6 -0
  138. package/dist/schemas/benchmark_migration_operation.output.json +254 -2
  139. package/dist/schemas/benchmark_migration_operation.schema.json +87 -5
  140. package/dist/schemas/bridge_operation.output.json +6 -0
  141. package/dist/schemas/config_operation.output.json +95 -0
  142. package/dist/schemas/config_operation.schema.json +16 -1
  143. package/dist/schemas/goal_operation.schema.json +22 -0
  144. package/dist/schemas/index.json +1 -1
  145. package/dist/schemas/industry_pack_operation.output.json +4 -0
  146. package/dist/schemas/industry_pack_operation.schema.json +40 -3
  147. package/dist/schemas/local_cache_operation.output.json +6 -0
  148. package/dist/schemas/local_history_operation.output.json +6 -0
  149. package/dist/schemas/local_info_operation.output.json +6 -0
  150. package/dist/schemas/local_mark_operation.output.json +6 -0
  151. package/dist/schemas/messenger_operation.output.json +609 -1
  152. package/dist/schemas/messenger_operation.schema.json +96 -1
  153. package/dist/schemas/onchain_operations.output.json +6 -0
  154. package/dist/schemas/onchain_operations.schema.json +334 -7
  155. package/dist/schemas/onchain_operations_allocation.schema.json +10 -1
  156. package/dist/schemas/onchain_operations_guard.schema.json +318 -0
  157. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  158. package/dist/schemas/onchain_operations_service.schema.json +5 -5
  159. package/dist/schemas/query_toolkit.output.json +271 -8
  160. package/dist/schemas/service_clone_operation.output.json +79 -0
  161. package/dist/tools/handlers/benchmark-migration.d.ts +14 -0
  162. package/dist/tools/handlers/benchmark-migration.js +1 -1
  163. package/dist/tools/handlers/config.js +1 -1
  164. package/dist/tools/handlers/messenger.js +1 -1
  165. package/dist/tools/handlers/onchain.d.ts +19 -1
  166. package/dist/tools/handlers/onchain.js +1 -1
  167. package/dist/tools/handlers/query.d.ts +1 -0
  168. package/dist/tools/handlers/query.js +1 -1
  169. package/dist/tools/handlers/service-clone.d.ts +18 -0
  170. package/dist/tools/handlers/service-clone.js +1 -1
  171. package/dist/tools/registry/business.js +1 -1
  172. package/dist/tools/wrap.js +1 -1
  173. package/package.json +2 -2
@@ -1 +1 @@
1
- import{z}from'zod';export const ConfigOperationInputSchema=z['object']({'action':z['enum'](['list','toggle','enable','disable','reset','info','judgment_list','judgment_set','judgment_reset','judgment_doc_read','judgment_doc_patch'])['describe']('Config\x20action\x20to\x20perform'),'service':z['string']()['optional']()['describe']('Service\x20name\x20(required\x20for\x20toggle/enable/disable/reset/info)'),'path':z['string']()['optional']()['describe']('Dotted\x20judgment\x20path\x20(required\x20for\x20judgment_set;\x20optional\x20for\x20judgment_reset),\x20e.g.\x20\x27evaluation.weights.trust_reviews\x27'),'value':z['unknown']()['optional']()['describe']('New\x20JSON\x20value\x20for\x20judgment_set\x20(type\x20must\x20match\x20the\x20existing\x20entry\x20at\x20\x27path\x27)'),'patch':z['record'](z['string'](),z['unknown']())['optional']()['describe']('PARTIAL\x20judgment\x20document\x20to\x20deep-merge\x20into\x20the\x20persistent\x20user\x20judgment\x20document\x20'+'(required\x20for\x20judgment_doc_patch),\x20e.g.\x20{\x22evaluation\x22:\x20{\x22weights\x22:\x20{\x22trust_reviews\x22:\x2045}}}.\x20'+'PERSISTENT\x20write\x20—\x20validated\x20in\x20full\x20before\x20it\x20touches\x20the\x20file;\x20requires\x20user\x20confirmation.')})['strict']();const ServiceReminder=z['string']()['optional']()['describe']('Human-readable\x20note\x20about\x20the\x20service\x27s\x20behavior\x20or\x20side\x20effects.'),ServiceField=z['string']()['describe']('Service\x20name\x20that\x20the\x20action\x20applied\x20to.'),EnabledField=z['boolean']()['describe']('Whether\x20the\x20service\x20is\x20now\x20enabled.');export const ConfigOperationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('list'),'services':z['array'](z['object']({'name':z['string']()['describe']('Service\x20identifier\x20(e.g.\x20\x27harness\x27,\x20\x27project\x27).'),'enabled':z['boolean']()['describe']('Whether\x20the\x20service\x20is\x20currently\x20enabled.'),'reminder':ServiceReminder}))['describe']('List\x20of\x20all\x20runtime\x20services\x20and\x20their\x20current\x20state.')}),z['object']({'action':z['literal']('toggle'),'service':ServiceField,'enabled':EnabledField,'reminder':ServiceReminder}),z['object']({'action':z['literal']('enable'),'service':ServiceField,'enabled':EnabledField,'reminder':ServiceReminder}),z['object']({'action':z['literal']('disable'),'service':ServiceField,'enabled':EnabledField,'reminder':ServiceReminder}),z['object']({'action':z['literal']('reset'),'service':ServiceField,'enabled':z['boolean']()['optional']()['describe']('Post-reset\x20enabled\x20state\x20(reflects\x20default\x20config).'),'reset':z['literal'](!![])['describe']('Always\x20true\x20—\x20confirms\x20a\x20reset\x20was\x20performed.'),'reminder':ServiceReminder}),z['object']({'action':z['literal']('info'),'service':ServiceField,'enabled':z['boolean']()['optional']()['describe']('Whether\x20the\x20service\x20is\x20currently\x20enabled.'),'reminder':ServiceReminder})['catchall'](z['unknown']()),z['object']({'action':z['literal']('judgment_list'),'version':z['number']()['describe']('Judgment\x20document\x20version.'),'factory_path':z['string']()['describe']('Bundled\x20factory\x20defaults\x20document\x20location.'),'user_path':z['string']()['describe']('User-editable\x20document\x20location\x20—\x20edit\x20THIS\x20file\x20to\x20customize\x20long-term.'),'user_doc_loaded':z['boolean']()['describe']('Whether\x20a\x20user\x20document\x20is\x20currently\x20in\x20force.'),'user_mtime':z['string']()['nullable']()['describe']('Last\x20modification\x20time\x20of\x20the\x20user\x20document\x20(ISO\x208601),\x20null\x20when\x20absent.'),'last_reload_error':z['string']()['nullable']()['describe']('Why\x20the\x20last\x20user-document\x20edit\x20was\x20rejected\x20(null\x20=\x20healthy).\x20The\x20last\x20good\x20document\x20stays\x20in\x20force.'),'user_doc':z['unknown']()['describe']('The\x20in-force\x20user\x20document\x20(null\x20when\x20none\x20yet)\x20—\x20what\x20a\x20patch\x20merges\x20into.'),'sections':z['record'](z['string'](),z['number']())['describe']('Per-section\x20entry\x20counts\x20of\x20the\x20effective\x20document.'),'overrides':z['array'](z['object']({'path':z['string'](),'value':z['unknown']()}))['describe']('Session\x20runtime\x20overrides\x20currently\x20applied\x20(judgment_set).')}),z['object']({'action':z['literal']('judgment_set'),'path':z['string']()['describe']('Dotted\x20path\x20that\x20was\x20overridden.'),'value':z['unknown']()['describe']('Value\x20applied\x20for\x20this\x20session.'),'applied':z['literal'](!![])['describe']('Always\x20true\x20—\x20a\x20rejected\x20override\x20throws\x20instead.')}),z['object']({'action':z['literal']('judgment_reset'),'path':z['string']()['optional']()['describe']('Path\x20cleared,\x20omitted\x20when\x20all\x20overrides\x20were\x20cleared.'),'cleared':z['number']()['describe']('How\x20many\x20overrides\x20were\x20cleared.')}),z['object']({'action':z['literal']('judgment_doc_read'),'user_path':z['string']()['describe']('User\x20document\x20location\x20(the\x20file\x20may\x20not\x20exist\x20yet\x20—\x20saving\x20from\x20the\x20editor\x20creates\x20it).'),'exists':z['boolean']()['describe']('Whether\x20a\x20user\x20document\x20file\x20currently\x20exists.\x20False\x20→\x20`doc`\x20is\x20the\x20factory\x20defaults\x20view.'),'version':z['number']()['describe']('Document\x20version\x20of\x20the\x20returned\x20editable\x20view.'),'doc':z['unknown']()['describe']('Editable\x20judgment\x20view:\x20the\x20current\x20user\x20document\x20(partial)\x20when\x20one\x20exists,\x20otherwise\x20the\x20FULL\x20factory\x20defaults\x20document.')}),z['object']({'action':z['literal']('judgment_doc_patch'),'applied':z['literal'](!![])['describe']('Always\x20true\x20—\x20a\x20rejected\x20patch\x20throws\x20instead\x20of\x20writing.'),'user_path':z['string']()['describe']('User\x20document\x20the\x20patch\x20was\x20merged\x20into.'),'backup_path':z['string']()['nullable']()['describe']('Backup\x20of\x20the\x20previous\x20document\x20(null\x20when\x20no\x20file\x20existed\x20before).'),'version':z['number']()['describe']('Document\x20version\x20after\x20the\x20patch.'),'changed':z['array'](z['object']({'path':z['string']()['describe']('Dotted\x20path\x20of\x20the\x20changed\x20value\x20(arrays\x20reported\x20as\x20one\x20leaf).'),'old':z['unknown']()['describe']('Previous\x20value\x20(null\x20when\x20the\x20key\x20is\x20new).'),'new':z['unknown']()['describe']('Value\x20written\x20to\x20the\x20user\x20document.')}))['describe']('Leaf-level\x20changes\x20the\x20patch\x20made\x20to\x20the\x20user\x20document.'),'reload_error':z['string']()['nullable']()['describe']('Post-write\x20reload\x20error\x20(null\x20=\x20the\x20new\x20document\x20is\x20in\x20force).')})])['describe']('Config\x20result\x20—\x20shape\x20depends\x20on\x20action')})['strict']();
1
+ import{z}from'zod';export const ConfigOperationInputSchema=z['object']({'action':z['enum'](['list','toggle','enable','disable','reset','info','judgment_list','judgment_set','judgment_reset','judgment_doc_read','judgment_doc_patch','store_dual_payout_get','store_dual_payout_set','store_dual_payout_clear'])['describe']('Config\x20action\x20to\x20perform'),'service':z['string']()['optional']()['describe']('Service\x20name\x20(required\x20for\x20toggle/enable/disable/reset/info)'),'account':z['string']()['optional']()['describe']('Store\x20signing\x20account\x20address\x20or\x20local\x20mark\x20name\x20(required\x20for\x20store_dual_payout_*\x20actions)\x20—\x20'+'the\x20store\x20whose\x20dual-payout\x20policy\x20is\x20read/written'),'confirm':z['boolean']()['optional']()['describe']('D-1\x20explicit\x20human\x20confirmation\x20(required\x20and\x20MUST\x20be\x20true\x20for\x20store_dual_payout_set).\x20Pass\x20it\x20ONLY\x20'+'after\x20the\x20human\x20merchant\x20reviewed\x20and\x20agreed\x20that\x20this\x20store\x27s\x20rails\x20may\x20net\x20arbitration\x20compensation\x20'+'and\x20escrow\x20release\x20on\x20the\x20same\x20order.\x20An\x20automated\x20agent\x20must\x20NOT\x20set\x20this\x20—\x20escalate\x20to\x20the\x20human.'),'note':z['string']()['optional']()['describe']('Optional\x20merchant\x20note\x20recorded\x20with\x20the\x20store_dual_payout_set\x20confirmation\x20(why\x20netting\x20is\x20this\x20store\x27s\x20standing\x20policy)'),'path':z['string']()['optional']()['describe']('Dotted\x20judgment\x20path\x20(required\x20for\x20judgment_set;\x20optional\x20for\x20judgment_reset),\x20e.g.\x20\x27evaluation.weights.trust_reviews\x27'),'value':z['unknown']()['optional']()['describe']('New\x20JSON\x20value\x20for\x20judgment_set\x20(type\x20must\x20match\x20the\x20existing\x20entry\x20at\x20\x27path\x27)'),'patch':z['record'](z['string'](),z['unknown']())['optional']()['describe']('PARTIAL\x20judgment\x20document\x20to\x20deep-merge\x20into\x20the\x20persistent\x20user\x20judgment\x20document\x20'+'(required\x20for\x20judgment_doc_patch),\x20e.g.\x20{\x22evaluation\x22:\x20{\x22weights\x22:\x20{\x22trust_reviews\x22:\x2045}}}.\x20'+'PERSISTENT\x20write\x20—\x20validated\x20in\x20full\x20before\x20it\x20touches\x20the\x20file;\x20requires\x20user\x20confirmation.')})['strict']();const ServiceReminder=z['string']()['optional']()['describe']('Human-readable\x20note\x20about\x20the\x20service\x27s\x20behavior\x20or\x20side\x20effects.'),ServiceField=z['string']()['describe']('Service\x20name\x20that\x20the\x20action\x20applied\x20to.'),EnabledField=z['boolean']()['describe']('Whether\x20the\x20service\x20is\x20now\x20enabled.');export const ConfigOperationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('list'),'services':z['array'](z['object']({'name':z['string']()['describe']('Service\x20identifier\x20(e.g.\x20\x27harness\x27,\x20\x27project\x27).'),'enabled':z['boolean']()['describe']('Whether\x20the\x20service\x20is\x20currently\x20enabled.'),'reminder':ServiceReminder}))['describe']('List\x20of\x20all\x20runtime\x20services\x20and\x20their\x20current\x20state.')}),z['object']({'action':z['literal']('toggle'),'service':ServiceField,'enabled':EnabledField,'reminder':ServiceReminder}),z['object']({'action':z['literal']('enable'),'service':ServiceField,'enabled':EnabledField,'reminder':ServiceReminder}),z['object']({'action':z['literal']('disable'),'service':ServiceField,'enabled':EnabledField,'reminder':ServiceReminder}),z['object']({'action':z['literal']('reset'),'service':ServiceField,'enabled':z['boolean']()['optional']()['describe']('Post-reset\x20enabled\x20state\x20(reflects\x20default\x20config).'),'reset':z['literal'](!![])['describe']('Always\x20true\x20—\x20confirms\x20a\x20reset\x20was\x20performed.'),'reminder':ServiceReminder}),z['object']({'action':z['literal']('info'),'service':ServiceField,'enabled':z['boolean']()['optional']()['describe']('Whether\x20the\x20service\x20is\x20currently\x20enabled.'),'reminder':ServiceReminder})['catchall'](z['unknown']()),z['object']({'action':z['literal']('judgment_list'),'version':z['number']()['describe']('Judgment\x20document\x20version.'),'factory_path':z['string']()['describe']('Bundled\x20factory\x20defaults\x20document\x20location.'),'user_path':z['string']()['describe']('User-editable\x20document\x20location\x20—\x20edit\x20THIS\x20file\x20to\x20customize\x20long-term.'),'user_doc_loaded':z['boolean']()['describe']('Whether\x20a\x20user\x20document\x20is\x20currently\x20in\x20force.'),'user_mtime':z['string']()['nullable']()['describe']('Last\x20modification\x20time\x20of\x20the\x20user\x20document\x20(ISO\x208601),\x20null\x20when\x20absent.'),'last_reload_error':z['string']()['nullable']()['describe']('Why\x20the\x20last\x20user-document\x20edit\x20was\x20rejected\x20(null\x20=\x20healthy).\x20The\x20last\x20good\x20document\x20stays\x20in\x20force.'),'user_doc':z['unknown']()['describe']('The\x20in-force\x20user\x20document\x20(null\x20when\x20none\x20yet)\x20—\x20what\x20a\x20patch\x20merges\x20into.'),'sections':z['record'](z['string'](),z['number']())['describe']('Per-section\x20entry\x20counts\x20of\x20the\x20effective\x20document.'),'overrides':z['array'](z['object']({'path':z['string'](),'value':z['unknown']()}))['describe']('Session\x20runtime\x20overrides\x20currently\x20applied\x20(judgment_set).')}),z['object']({'action':z['literal']('judgment_set'),'path':z['string']()['describe']('Dotted\x20path\x20that\x20was\x20overridden.'),'value':z['unknown']()['describe']('Value\x20applied\x20for\x20this\x20session.'),'applied':z['literal'](!![])['describe']('Always\x20true\x20—\x20a\x20rejected\x20override\x20throws\x20instead.')}),z['object']({'action':z['literal']('judgment_reset'),'path':z['string']()['optional']()['describe']('Path\x20cleared,\x20omitted\x20when\x20all\x20overrides\x20were\x20cleared.'),'cleared':z['number']()['describe']('How\x20many\x20overrides\x20were\x20cleared.')}),z['object']({'action':z['literal']('judgment_doc_read'),'user_path':z['string']()['describe']('User\x20document\x20location\x20(the\x20file\x20may\x20not\x20exist\x20yet\x20—\x20saving\x20from\x20the\x20editor\x20creates\x20it).'),'exists':z['boolean']()['describe']('Whether\x20a\x20user\x20document\x20file\x20currently\x20exists.\x20False\x20→\x20`doc`\x20is\x20the\x20factory\x20defaults\x20view.'),'version':z['number']()['describe']('Document\x20version\x20of\x20the\x20returned\x20editable\x20view.'),'doc':z['unknown']()['describe']('Editable\x20judgment\x20view:\x20the\x20current\x20user\x20document\x20(partial)\x20when\x20one\x20exists,\x20otherwise\x20the\x20FULL\x20factory\x20defaults\x20document.')}),z['object']({'action':z['literal']('judgment_doc_patch'),'applied':z['literal'](!![])['describe']('Always\x20true\x20—\x20a\x20rejected\x20patch\x20throws\x20instead\x20of\x20writing.'),'user_path':z['string']()['describe']('User\x20document\x20the\x20patch\x20was\x20merged\x20into.'),'backup_path':z['string']()['nullable']()['describe']('Backup\x20of\x20the\x20previous\x20document\x20(null\x20when\x20no\x20file\x20existed\x20before).'),'version':z['number']()['describe']('Document\x20version\x20after\x20the\x20patch.'),'changed':z['array'](z['object']({'path':z['string']()['describe']('Dotted\x20path\x20of\x20the\x20changed\x20value\x20(arrays\x20reported\x20as\x20one\x20leaf).'),'old':z['unknown']()['describe']('Previous\x20value\x20(null\x20when\x20the\x20key\x20is\x20new).'),'new':z['unknown']()['describe']('Value\x20written\x20to\x20the\x20user\x20document.')}))['describe']('Leaf-level\x20changes\x20the\x20patch\x20made\x20to\x20the\x20user\x20document.'),'reload_error':z['string']()['nullable']()['describe']('Post-write\x20reload\x20error\x20(null\x20=\x20the\x20new\x20document\x20is\x20in\x20force).')}),z['object']({'action':z['literal']('store_dual_payout_get'),'account':z['string']()['describe']('Store\x20account\x20the\x20policy\x20was\x20read\x20for.'),'preauthorized':z['boolean']()['describe']('Whether\x20the\x20store\x20carries\x20an\x20EXPLICIT\x20human\x20dual-payout\x20preauthorization.\x20False\x20→\x20the\x20execution\x20gate\x20'+'refuses\x20acknowledge_dual_payout\x20(the\x20per-call\x20flag\x20alone\x20is\x20not\x20sufficient,\x20D-1).'),'authorized_at':z['string']()['optional']()['describe']('ISO\x20timestamp\x20of\x20the\x20human\x20confirmation\x20(present\x20when\x20preauthorized).'),'note':z['string']()['optional']()['describe']('Merchant\x20note\x20recorded\x20with\x20the\x20confirmation.'),'network':z['string']()['optional']()['describe']('Network\x20the\x20confirmation\x20was\x20recorded\x20on.')}),z['object']({'action':z['literal']('store_dual_payout_set'),'account':z['string']()['describe']('Store\x20account\x20the\x20policy\x20was\x20recorded\x20for.'),'preauthorized':z['literal'](!![])['describe']('Always\x20true\x20—\x20a\x20set\x20without\x20confirm=true\x20throws\x20before\x20writing.'),'authorized_at':z['string']()['describe']('ISO\x20timestamp\x20of\x20the\x20human\x20confirmation\x20just\x20recorded.'),'note':z['string']()['optional']()['describe']('Merchant\x20note\x20recorded\x20with\x20the\x20confirmation.'),'reminder':ServiceReminder}),z['object']({'action':z['literal']('store_dual_payout_clear'),'account':z['string']()['describe']('Store\x20account\x20the\x20policy\x20was\x20revoked\x20for.'),'cleared':z['boolean']()['describe']('True\x20when\x20a\x20record\x20existed\x20and\x20was\x20removed;\x20false\x20when\x20none\x20existed.')})])['describe']('Config\x20result\x20—\x20shape\x20depends\x20on\x20action')})['strict']();
@@ -339,6 +339,13 @@ export declare const GoalOperationInputSchema: z.ZodDiscriminatedUnion<[z.ZodObj
339
339
  none: "none";
340
340
  flexible: "flexible";
341
341
  }>>;
342
+ logistics_mode: z.ZodOptional<z.ZodEnum<{
343
+ none: "none";
344
+ courier: "courier";
345
+ carrier: "carrier";
346
+ merchant_managed: "merchant_managed";
347
+ pickup_point: "pickup_point";
348
+ }>>;
342
349
  }, z.core.$strict>>;
343
350
  guide_confirm: z.ZodOptional<z.ZodObject<{
344
351
  industry: z.ZodOptional<z.ZodString>;
@@ -395,6 +402,13 @@ export declare const GoalOperationInputSchema: z.ZodDiscriminatedUnion<[z.ZodObj
395
402
  none: "none";
396
403
  flexible: "flexible";
397
404
  }>>;
405
+ logistics_mode: z.ZodOptional<z.ZodEnum<{
406
+ none: "none";
407
+ courier: "courier";
408
+ carrier: "carrier";
409
+ merchant_managed: "merchant_managed";
410
+ pickup_point: "pickup_point";
411
+ }>>;
398
412
  }, z.core.$strict>>;
399
413
  network: z.ZodOptional<z.ZodEnum<{
400
414
  testnet: "testnet";
@@ -194,6 +194,13 @@ export declare const PlanningActionMembers: [z.ZodObject<{
194
194
  none: "none";
195
195
  flexible: "flexible";
196
196
  }>>;
197
+ logistics_mode: z.ZodOptional<z.ZodEnum<{
198
+ none: "none";
199
+ courier: "courier";
200
+ carrier: "carrier";
201
+ merchant_managed: "merchant_managed";
202
+ pickup_point: "pickup_point";
203
+ }>>;
197
204
  }, z.core.$strict>>;
198
205
  guide_confirm: z.ZodOptional<z.ZodObject<{
199
206
  industry: z.ZodOptional<z.ZodString>;
@@ -250,6 +257,13 @@ export declare const PlanningActionMembers: [z.ZodObject<{
250
257
  none: "none";
251
258
  flexible: "flexible";
252
259
  }>>;
260
+ logistics_mode: z.ZodOptional<z.ZodEnum<{
261
+ none: "none";
262
+ courier: "courier";
263
+ carrier: "carrier";
264
+ merchant_managed: "merchant_managed";
265
+ pickup_point: "pickup_point";
266
+ }>>;
253
267
  }, z.core.$strict>>;
254
268
  network: z.ZodOptional<z.ZodEnum<{
255
269
  testnet: "testnet";
@@ -479,6 +493,13 @@ export declare const MerchantGuideResultSchema: z.ZodObject<{
479
493
  none: "none";
480
494
  flexible: "flexible";
481
495
  }>>;
496
+ logistics_mode: z.ZodOptional<z.ZodEnum<{
497
+ none: "none";
498
+ courier: "courier";
499
+ carrier: "carrier";
500
+ merchant_managed: "merchant_managed";
501
+ pickup_point: "pickup_point";
502
+ }>>;
482
503
  }, z.core.$strict>;
483
504
  intent_draft: z.ZodOptional<z.ZodUnknown>;
484
505
  industry_options: z.ZodOptional<z.ZodObject<{
@@ -531,6 +552,11 @@ export declare const MerchantGuideResultSchema: z.ZodObject<{
531
552
  estimated_score_boost: z.ZodNumber;
532
553
  evidence_matched: z.ZodOptional<z.ZodBoolean>;
533
554
  }, z.core.$strict>>;
555
+ module_gaps: z.ZodArray<z.ZodObject<{
556
+ module: z.ZodString;
557
+ missing_constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
558
+ fix: z.ZodOptional<z.ZodString>;
559
+ }, z.core.$strict>>;
534
560
  blocking_issues: z.ZodArray<z.ZodObject<{
535
561
  module: z.ZodString;
536
562
  missing_constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1 +1 @@
1
- import{z}from'zod';const NetworkEnum=z['enum'](['mainnet','testnet']);export const PlanningIndustryEnum=z['string']()['regex'](/^[a-z][a-z0-9_]*$/,'industry\x20must\x20be\x20lowercase\x20snake_case');export const ProjectObjectTypeEnum=z['enum'](['service','machine','guard','permission','reward','arb','progress','treasury','demand','repository','contact','order','allocation','personal','payment','proof']);const IntentContextFields={'intent':z['string']()['max'](0x7d0)['optional']()['describe']('Business\x20intent\x20text\x20(e.g.\x20\x27I\x20rent\x20cameras\x20to\x20photographers\x20with\x20deposit\x20and\x20damage\x20inspection\x27).\x20'+'Used\x20as\x20the\x20primary\x20input;\x20falls\x20back\x20to\x20project_description\x20/\x20project_name\x20when\x20omitted.'),'project_name':z['string']()['min'](0x1)['max'](0xc8)['optional']()['describe']('Optional\x20business\x20name\x20—\x20used\x20as\x20an\x20intent\x20fallback\x20when\x20\x27intent\x27\x20is\x20omitted.'),'project_description':z['string']()['max'](0x7d0)['optional']()['describe']('Optional\x20business\x20description\x20—\x20used\x20as\x20an\x20intent\x20fallback\x20when\x20\x27intent\x27\x20is\x20omitted.'),'project_industry':PlanningIndustryEnum['optional']()['describe']('Industry\x20tag.\x20Drives\x20industry-specific\x20risk\x20calibration\x20(e.g.\x20\x27freelance\x27\x20does\x20NOT\x20require\x20'+'compensation_fund,\x20while\x20\x27rental\x27/\x27travel\x27\x20do).\x20Any\x20registered\x20industry\x20is\x20accepted\x20—\x20'+'builtin:\x20\x27general\x27,\x20\x27retail\x27,\x20\x27retail_d2c\x27,\x20\x27service\x27,\x20\x27rental\x27,\x20\x27freelance\x27,\x20\x27education\x27,\x20'+'\x27travel\x27,\x20\x27subscription\x27,\x20\x27custom\x27\x20—\x20plus\x20custom\x20industries\x20registered\x20via\x20industry\x20packs.')};export const GuardResolutionInputSchema=z['union']([z['object']({'kind':z['literal']('template'),'template_id':z['string']()['describe']('A\x20\x27tpl_*\x27\x20guard\x20template\x20id\x20to\x20fill\x20(template\x20fee_params\x20+\x20params\x20feed\x20the\x20fill).'),'params':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Extra\x20fill\x20params\x20over\x20the\x20merged\x20fee_params.')})['strict'](),z['object']({'kind':z['literal']('inline'),'description':z['string']()['optional']()['describe']('Guard\x20description\x20(defaults\x20to\x20the\x20pending\x20design\x27s\x20purpose).'),'table':z['array'](z['record'](z['string'](),z['unknown']()))['min'](0x1)['describe']('Guard\x20passport\x20table\x20rows\x20(identifier/b_submission/value_type/...).'),'root':z['object']({'type':z['string']()})['passthrough']()['describe']('Guard\x20logic\x20root\x20node\x20(a\x20typed\x20tree\x20node).')['refine'](a=>a['type']['length']>0x0,{'message':'guard\x20root.type\x20must\x20be\x20a\x20non-empty\x20node\x20type'})})['strict'](),z['object']({'kind':z['literal']('omit')})['strict']()]);export const PlanningActionMembers=[z['object']({'action':z['literal']('analyze_intent'),...IntentContextFields,'target_objects':z['array'](z['string']())['optional']()['describe']('Optional\x20explicit\x20target\x20objects\x20(entry_ids\x20or\x20object_type\x20names).\x20'+'When\x20provided,\x20puzzle\x20snapshots\x20are\x20restricted\x20to\x20these\x20objects.'),'network':NetworkEnum['optional']()})['strict']()['describe']('C1:\x20natural-language\x20business\x20intent\x20→\x20parsed\x20intent\x20(primary/secondary\x20objects,\x20'+'detected\x20scenes,\x20industry)\x20+\x20per-object\x20puzzle\x20snapshots\x20+\x20recommended\x20creation\x20order.'),z['object']({'action':z['literal']('aggregate_risks'),'project':z['string']()['optional']()['describe']('Project\x20prefix\x20(human-readable\x20unique\x20identifier,\x20e.g.\x20\x27myshop\x27).\x20Used\x20to\x20key\x20the\x20service-build\x20stage\x20cache.'),'version':z['string']()['regex'](/^v\d+$/)['optional']()['describe']('Project\x20version\x20(e.g.\x20\x27v1\x27)\x20for\x20the\x20service-build\x20stage\x20cache.\x20Defaults\x20to\x20\x27v1\x27.'),'puzzles':z['record'](z['string'](),z['object']({'puzzle':z['unknown']()['describe']('Puzzle\x20snapshot\x20(opaque\x20—\x20pass\x20through\x20from\x20analyze_intent\x20output\x20unchanged).'),'completeness':z['unknown']()['describe']('Completeness\x20snapshot\x20(opaque\x20—\x20pass\x20through\x20unchanged).'),'missing_dimensions':z['array'](z['string']())['describe']('Dimensions\x20still\x20missing\x20for\x20this\x20object.')})['strict']())['optional']()['describe']('Per-object\x20puzzle\x20snapshots,\x20keyed\x20by\x20object_type.\x20Pass\x20the\x20\x27puzzles\x27\x20field\x20from\x20a\x20prior\x20'+'analyze_intent\x20result\x20UNCHANGED.\x20When\x20omitted\x20but\x20\x27intent\x27\x20is\x20present,\x20the\x20handler\x20runs\x20'+'analyze_intent\x20first\x20(C1→C2\x20in\x20one\x20call).'),...IntentContextFields,'severity_threshold':z['enum'](['critical','high','medium','low','info'])['optional']()['describe']('Severity\x20threshold\x20(default\x20\x27high\x27).\x20Risks\x20at\x20or\x20above\x20this\x20level\x20block\x20deployment\x20(status\x20RISK_BLOCKED).'),'user_confirmed_high_risks':z['array'](z['string']())['optional']()['describe']('IDs\x20of\x20high\x20risks\x20already\x20confirmed\x20in\x20a\x20prior\x20round.\x20Confirmed\x20high\x20risks\x20no\x20longer\x20'+'trigger\x20RISK_PENDING_CONFIRM.'),'planned_objects':z['array'](z['object']({'object_type':z['string']()['describe']('Wowok\x20object\x20type\x20(e.g.\x20\x27service\x27,\x20\x27guard\x27,\x20\x27machine\x27).'),'is_new':z['boolean']()['describe']('true\x20when\x20creating\x20a\x20NEW\x20object;\x20false\x20when\x20reusing\x20an\x20existing\x20one.'),'name':z['string']()['optional']()['describe']('Planned\x20object\x20name\x20(for\x20readable\x20messages).')})['strict']())['optional']()['describe']('Planned\x20objects\x20for\x20the\x20OBJECT_REUSE\x20check\x20(safety-rules).\x20Flags\x20NEW\x20objects\x20whose\x20type\x20'+'carries\x20an\x20always/strongly-recommended\x20reuse\x20rule.'),'planned_operations':z['array'](z['object']({'object_type':z['string']()['describe']('Wowok\x20object\x20type\x20(e.g.\x20\x27service\x27,\x20\x27arbitration\x27).'),'trigger':z['enum'](['create','publish'])['describe']('Lifecycle\x20trigger\x20that\x20locks\x20fields.'),'name':z['string']()['optional']()['describe']('Object\x20name\x20(for\x20readable\x20messages).')})['strict']())['optional']()['describe']('Planned\x20create/publish\x20operations\x20for\x20the\x20IMMUTABILITY\x20check\x20(safety-rules).\x20Warns\x20which\x20'+'fields\x20become\x20permanently\x20locked\x20after\x20each\x20operation.'),'network':NetworkEnum['optional']()})['strict']()['describe']('C2:\x20puzzle\x20snapshots\x20→\x20cross-object\x20risk\x20calibration\x20(critical/high/medium/low/info)\x20with\x20blocking\x20'+'status.\x20DX\x20sugar:\x20when\x20\x27puzzles\x27\x20is\x20omitted\x20but\x20\x27intent\x27\x20is\x20present,\x20the\x20handler\x20runs\x20analyze_intent\x20first.'),z['object']({'action':z['literal']('trace_substeps'),'project':z['string']()['optional']()['describe']('Project\x20prefix\x20(human-readable\x20unique\x20identifier,\x20e.g.\x20\x27myshop\x27).\x20Used\x20to\x20key\x20the\x20service-build\x20stage\x20cache.'),'version':z['string']()['regex'](/^v\d+$/)['optional']()['describe']('Project\x20version\x20(e.g.\x20\x27v1\x27)\x20for\x20the\x20service-build\x20stage\x20cache.\x20Defaults\x20to\x20\x27v1\x27.'),'substeps':z['array'](z['object']({'step_id':z['string']()['describe']('Substep\x20id,\x20format\x20\x27T<step>.<substep>\x27\x20e.g.\x20\x27T1.1\x27.'),'parent_step':z['string']()['describe']('Parent\x20step\x20id,\x20format\x20\x27T<step>\x27\x20e.g.\x20\x27T1\x27.'),'object_type':ProjectObjectTypeEnum['describe']('Wowok\x20object\x20type\x20this\x20substep\x20operates\x20on.'),'entry_id':z['string']()['describe']('Puzzle\x20entry_id\x20this\x20substep\x20corresponds\x20to.'),'operation_type':z['string']()['describe']('operation_type\x20for\x20onchain_operations.'),'network':z['enum'](['testnet','mainnet'])['describe']('Target\x20network.'),'input':z['object']({'data':z['record'](z['string'](),z['unknown']())['describe']('Input\x20data\x20payload.'),'input_refs':z['array'](z['string']())['describe']('Upstream\x20substep_ids\x20this\x20substep\x20consumes.')})['strict'](),'output':z['object']({'object_id':z['string']()['optional'](),'tx_digest':z['string']()['optional']()})['catchall'](z['unknown']())['optional']()['describe']('Output\x20data\x20(filled\x20after\x20execution).'),'timestamp':z['number']()['describe']('Execution\x20timestamp\x20(ms).'),'status':z['enum'](['PENDING','SUCCESS','FAILED','SKIPPED'])['describe']('Execution\x20status.'),'failure_reason':z['string']()['optional']()['describe']('Failure\x20reason\x20(when\x20status=\x27FAILED\x27).'),'dependencies':z['object']({'input_refs':z['array'](z['string']()),'output_refs':z['array'](z['object']({'substep_id':z['string']()['describe']('Downstream\x20substep\x20that\x20consumes\x20this\x20output.'),'field_path':z['string']()['describe']('Field\x20path\x20produced\x20by\x20this\x20substep\x20(e.g.\x20\x27permission_address\x27).')})['strict']())})['strict']()['describe']('Dependencies\x20(input_refs\x20+\x20output_refs).'),'retry_info':z['object']({'original_step_id':z['string'](),'retry_count':z['number'](),'retry_reason':z['string']()})['strict']()['optional']()['describe']('Retry\x20info\x20(when\x20this\x20substep\x20is\x20a\x20retry\x20of\x20an\x20earlier\x20one).')})['strict']())['optional']()['describe']('Substep\x20execution\x20records\x20(63-spec\x20§2.1).\x20Required\x20when\x20action=\x27trace_substeps\x27.\x20'+'Construct\x20from\x20your\x20deployment\x20execution\x20trace.'),'substep_edges':z['array'](z['object']({'source':z['string']()['describe']('Source\x20substep\x20id.'),'target':z['string']()['describe']('Target\x20substep\x20id\x20(depends\x20on\x20source).'),'field_path':z['string']()['describe']('Field\x20path\x20flowing\x20along\x20this\x20edge.')})['strict']())['optional']()['describe']('Explicit\x20DAG\x20edges.\x20When\x20omitted,\x20edges\x20are\x20derived\x20from\x20each\x20substep\x27s\x20input_refs.'),'network':NetworkEnum['optional']()})['strict']()['describe']('C3:\x20substep\x20execution\x20records\x20→\x20DAG\x20coherence\x20analysis\x20(dangling\x20inputs,\x20circular\x20refs,\x20'+'missing\x20outputs,\x20cross-step\x20breaks,\x20topological\x20order,\x20D-10\x20verdict).'),z['object']({'action':z['literal']('merchant_guide'),...IntentContextFields,'guide_state':z['object']({'intent_text':z['string']()['describe']('Step\x201:\x20raw\x20merchant\x20business\x20description.'),'confirmed_industry':z['string']()['optional']()['describe']('Step\x202:\x20merchant-confirmed\x20industry\x20id.'),'currency':z['string']()['optional']()['describe']('Step\x205:\x20payment\x20currency\x20(default\x20WOW).'),'deliverables':z['array'](z['unknown']())['optional']()['describe']('Step\x204:\x20merchant-defined\x20deliverables\x20(opaque\x20passthrough).'),'payment_override':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x205:\x20payment\x20structure\x20overrides\x20(opaque\x20passthrough).'),'trust_override':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x206:\x20trust\x20mechanism\x20overrides\x20(opaque\x20passthrough).'),'adopted_module_ids':z['array'](z['string']())['optional']()['describe']('Step\x206:\x20merchant-confirmed\x20business\x20module\x20ids.'),'guard_resolutions':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Accumulated\x20judgment-layer\x20guard\x20resolutions\x20(C6-DEEP)\x20—\x20pass\x20back\x20UNCHANGED\x20with\x20the\x20rest\x20of\x20the\x20state.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Per-build\x20review-rail\x20mode\x20(v53).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string\x20(required\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward).'),'reward_claim_amount':z['string']()['optional']()['describe']('Per-claim\x20reward\x20bounty\x20mounted\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string\x20(BK15-F09:\x20schema-required\x20on\x20the\x20mount;\x20the\x20kernel\x20never\x20fabricates\x20a\x20real-money\x20parameter).'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.\x20Declaring\x20a\x20mode\x20with\x20no\x20backing\x20rail\x20in\x20machine_shape\x20is\x20a\x20compile\x20blocker\x20(AFTER_SALES_RAIL_MISSING).'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.\x20A\x20judge-decided\x20mode\x20(contest/bounty/agent)\x20without\x20arbitration_mode\x20\x27third_party\x27\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_JUDGE_NOT_INDEPENDENT);\x20a\x20finite\x20revision_rounds_max\x20with\x20no\x20counter\x20Repository\x20guard\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_REVISION_UNBOUNDED).'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.\x20A\x20capture\x20forward\x20with\x20no\x20fund-gate\x20Guard\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_FUNDING_UNGATED);\x20a\x20deposit-held\x20state\x20with\x20no\x20exit\x20rail\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_DEPOSIT_STRANDED).'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.\x20A\x20declared\x20commission\x20overlay\x20with\x20no\x20commission\x20rail\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_RAIL_MISSING);\x20a\x20commission\x20with\x20no\x20post-lock\x20no-clawback\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_CLAWBACK_UNDISCLOSED).'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.\x20A\x20declared\x20threshold/flexible\x20overlay\x20with\x20no\x20two-leg\x20escrow-exit\x20gate\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_THRESHOLD_GATE_MISSING);\x20a\x20threshold\x20gate\x20whose\x20aggregate\x20is\x20NOT\x20a\x20writer-bound\x20sum-where\x20(id_from\x20signer)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_AGGREGATE_UNBOUND);\x20a\x20missing\x20L-04/L-01/L-05\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_DISCLOSURE_MISSING).')})['strict']()['optional']()['describe']('Wizard\x20state\x20from\x20a\x20prior\x20merchant_guide\x20result.\x20Pass\x20back\x20UNCHANGED\x20on\x20every\x20subsequent\x20call.\x20'+'The\x20handler\x20re-runs\x20the\x20pipeline\x20deterministically\x20and\x20advances\x20to\x20the\x20furthest\x20reachable\x20step.'),'guide_confirm':z['object']({'industry':z['string']()['optional']()['describe']('Step\x202\x20confirmation:\x20industry\x20id\x20(e.g.\x20\x27freelance\x27).'),'currency':z['string']()['optional']()['describe']('Step\x205\x20confirmation:\x20payment\x20currency.'),'deliverables':z['array'](z['unknown']())['optional']()['describe']('Step\x204\x20confirmation:\x20deliverable\x20definitions.'),'payment':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x205\x20confirmation:\x20{\x20model,\x20triggers,\x20allocation\x20}\x20overrides.'),'trust':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x206\x20confirmation:\x20{\x20refundPolicy,\x20arbitration,\x20escrow\x20}\x20overrides.'),'adopted_module_ids':z['array'](z['string']())['optional']()['describe']('Step\x206\x20confirmation:\x20business\x20module\x20ids\x20to\x20adopt\x20(overrides\x20recommendation).'),'guard_resolutions':z['record'](z['string'](),GuardResolutionInputSchema)['optional']()['describe']('Judgment-layer\x20resolutions\x20for\x20pending\x20guard\x20designs\x20(keyed\x20by\x20pending_guard_designs[].key;\x20C6-DEEP).\x20'+'A\x20blocked\x20audit\x20lists\x20every\x20unresolved\x20design\x20—\x20resolve\x20each\x20here\x20(kind\x20\x27inline\x27\x20with\x20the\x20resolved\x20Guard\x20table+root,\x20or\x20'+'kind\x20\x27template\x27\x20with\x20a\x20matching\x20tpl_*\x20id)\x20and\x20call\x20merchant_guide\x20again.\x20Advisory\x20designs\x20that\x20do\x20not\x20apply\x20to\x20this\x20'+'shop\x20may\x20be\x20resolved\x20with\x20{kind:\x27omit\x27}\x20instead\x20(honored\x20only\x20for\x20designs\x20with\x20no\x20inbound\x20binding;\x20an\x20omit\x20of\x20a\x20bound\x20'+'design\x20is\x20refused\x20with\x20GUARD_OMIT_UNSUPPORTED).\x20Caller\x20input\x20wins\x20over\x20module-derived\x20resolutions.\x20'+'The\x20publish\x20freeze\x20gate\x20still\x20runs:\x20a\x20resolution\x20only\x20unblocks\x20the\x20plan\x20when\x20the\x20closed\x20audit\x20is\x20clean.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20review-rail\x20mode\x20(v53).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Step\x206\x20confirmation:\x20review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string\x20(required\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward).'),'reward_claim_amount':z['string']()['optional']()['describe']('Step\x206\x20confirmation:\x20per-claim\x20reward\x20bounty\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string\x20(BK15-F09).'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.')})['strict']()['optional']()['describe']('Merchant\x20decisions\x20for\x20the\x20current\x20wizard\x20step.\x20Merged\x20over\x20guide_state.\x20Typical\x20flow:\x20'+'call\x201\x20with\x20intent\x20only\x20→\x20receive\x20step-2\x20industry\x20options\x20→\x20call\x202\x20with\x20guide_state\x20+\x20'+'guide_confirm={industry}\x20→\x20receive\x20full\x20blueprint\x20plan\x20(steps\x207-10).'),'network':NetworkEnum['optional']()})['strict']()['describe']('10-step\x20merchant\x20onboarding\x20wizard:\x20intent\x20text\x20→\x20BusinessIntent\x20→\x20industry\x20confirmation\x20→\x20'+'module\x20adoption\x20→\x20Blueprint\x20(L1\x20plan\x20projection)\x20→\x20evaluation\x20preview\x20→\x20harness\x20check\x20→\x20creation\x20'+'plan.\x20NEVER\x20executes\x20on-chain\x20operations.\x20Stateless:\x20pass\x20guide_state/guide_confirm\x20to\x20advance.')];const KeywordMatchSchema=z['object']({'keyword':z['string'](),'category':z['string'](),'matched_objects':z['array'](z['string']()),'required_level':z['enum'](['R','C','OPTIONAL']),'match_count':z['number']()})['strict']();export const AnalyzeIntentResultSchema=z['object']({'action':z['literal']('analyze_intent'),'intent_parsed':z['object']({'primary_object':z['string']()['describe']('Primary\x20object\x20inferred\x20from\x20the\x20intent\x20keywords.'),'secondary_objects':z['array'](z['string']())['describe']('Supporting\x20objects\x20typically\x20required\x20alongside\x20the\x20primary\x20one.'),'detected_scenes':z['array'](z['object']({'object':z['string'](),'scene_id':z['string']()['describe']('Free-form\x20scene\x20id,\x20e.g.\x20\x27retail\x27,\x20\x27rental_return\x27.')})['strict']())['describe']('Scenes\x20detected\x20from\x20the\x20intent\x20(used\x20for\x20template\x20selection).'),'industry':z['string']()['describe']('Industry\x20mode\x20resolved\x20from\x20the\x20intent\x20(defaults\x20to\x20\x27general\x27).'),'keyword_matches':z['array'](KeywordMatchSchema)['describe']('All\x20keyword\x20matches\x20that\x20drove\x20the\x20identification.')})['strict'](),'puzzles':z['record'](z['string'](),z['object']({'puzzle':z['unknown'](),'completeness':z['unknown'](),'missing_dimensions':z['array'](z['string']())})['strict']())['describe']('Per-object\x20puzzle\x20snapshot,\x20keyed\x20by\x20object_type.\x20Pass\x20this\x20UNCHANGED\x20to\x20aggregate_risks.'),'overall_completeness':z['enum'](['complete','partial','empty']),'next_step':z['string']()['describe']('Human-readable\x20suggestion\x20for\x20the\x20next\x20puzzle\x20step.'),'recommended_creation_order':z['array'](z['string']())['describe']('Recommended\x20object\x20creation\x20order\x20(dependency\x20topology).'),'warnings':z['array'](z['string']())})['strict']();const AggregatedRiskSchema=z['object']({'risk_rule_id':z['string']()['describe']('Unified\x20risk\x20rule\x20id,\x20e.g.\x20\x27R-S-01\x27.'),'object_type':z['string'](),'entry_id':z['string']()['describe']('Object\x20entry_id\x20(\x27*\x27\x20when\x20cross-object).'),'severity':z['enum'](['critical','high','medium','low','info']),'message':z['string'](),'fix_suggestion':z['string'](),'details':z['object']({'field_path':z['string']()['optional'](),'actual_value':z['unknown']()['optional'](),'expected_value':z['unknown']()['optional'](),'rule_source':z['string']()['optional']()})['strict']()['optional']()})['strict'](),SafetyFindingSchema=z['object']({'rule_id':z['string']()['describe']('Safety\x20rule\x20id\x20(e.g.\x20\x27REUSE-SERVICE-01\x27,\x20\x27IMMUT-001\x27).'),'severity':z['enum'](['info','warn']),'message':z['string']()})['strict']();export const AggregateRisksResultSchema=z['object']({'action':z['literal']('aggregate_risks'),'namespace':z['object']({'prefix':z['string'](),'version':z['string'](),'industry':z['string']()['optional']()})['strict'](),'findings':z['array'](AggregatedRiskSchema)['describe']('All\x20risks\x20found,\x20sorted\x20(critical\x20first).'),'severity_summary':z['record'](z['string'](),z['number']())['describe']('Counts\x20keyed\x20by\x20severity.'),'status':z['enum'](['CLEAN_WITHIN_SCOPE','STATIC_ANALYZERS_CLEAN','RISK_BLOCKED','RISK_PENDING_CONFIRM','RISK_CANCELLED'])['describe']('Aggregated\x20status\x20(62-spec\x20§3.2).\x20RISK_BLOCKED\x20=\x20critical\x20or\x20above-threshold\x20risks\x20present.\x20'+'⚠️\x20THIS\x20IS\x20A\x20SEVERITY\x20VERDICT,\x20NOT\x20PUBLISH\x20CLEARANCE:\x20the\x20aggregation\x20is\x20a\x20pure\x20transformation\x20over\x20puzzle\x20'+'snapshots\x20and\x20planned\x20objects/operations\x20and\x20never\x20reads\x20a\x20live\x20object.\x20CLEAN_WITHIN_SCOPE\x20means\x20\x27no\x20finding\x20in\x20the\x20static\x20'+'analyzers\x20AND\x20zero\x20on-chain\x20objects\x20inspected\x27\x20—\x20read\x20`evidence_scope`\x20/\x20`objects_inspected`\x20/\x20`publish_authorized`\x20before\x20'+'treating\x20it\x20as\x20a\x20green\x20light.\x20STATIC_ANALYZERS_CLEAN\x20is\x20reserved\x20for\x20a\x20future\x20object-grounded\x20clean\x20run.'),'status_note':z['string']()['optional']()['describe']('One-line\x20honesty\x20note\x20for\x20the\x20status:\x20it\x20reflects\x20static\x20analyzers\x20over\x20plan\x20snapshots\x20only\x20—\x20zero\x20on-chain\x20objects\x20inspected;\x20not\x20a\x20publish\x20clearance.'),'objects_inspected':z['number']()['optional']()['describe']('How\x20many\x20live\x20on-chain\x20objects\x20this\x20aggregation\x20inspected.\x20Always\x200\x20today\x20(the\x20C1→C4\x20pipeline\x20performs\x20no\x20chain\x20reads)\x20—\x20a\x20clean\x20status\x20over\x20zero\x20objects\x20must\x20never\x20read\x20as\x20clearance.'),'pending_confirmations':z['array'](z['object']({'risk_rule_id':z['string'](),'description':z['string'](),'fix_suggestion':z['string'](),'object_type':z['string'](),'entry_id':z['string']()})['strict']())['optional']()['describe']('high\x20risks\x20awaiting\x20user\x20confirmation\x20(only\x20when\x20status=\x27RISK_PENDING_CONFIRM\x27).'),'evidence_scope':z['enum'](['puzzle_snapshots_only','object_grounded'])['optional']()['describe']('What\x20this\x20aggregation\x20actually\x20inspected.\x20Always\x20\x27puzzle_snapshots_only\x27\x20today:\x20the\x20C1→C4\x20pipeline\x20performs\x20no\x20chain\x20'+'reads.\x20Machine-readable\x20form\x20of\x20the\x20scope\x20warning\x20—\x20a\x20caller\x20must\x20not\x20have\x20to\x20infer\x20it\x20from\x20prose.'),'object_grounded':z['boolean']()['optional']()['describe']('True\x20only\x20if\x20a\x20live\x20on-chain\x20object\x20was\x20inspected.\x20Currently\x20always\x20false\x20(see\x20evidence_scope).'),'publish_authorized':z['boolean']()['optional']()['describe']('Whether\x20this\x20gate\x20alone\x20authorizes\x20publishing.\x20Currently\x20always\x20false:\x20use\x20template_scan\x20before\x20deploying\x20and\x20'+'service_panorama\x20/\x20onchain_objects\x20after,\x20plus\x20the\x20publish-time\x20gates\x20in\x20onchain_operations.'),'publish_authorized_reason':z['string']()['optional']()['describe']('Why\x20publish_authorized\x20is\x20false,\x20and\x20which\x20checks\x20to\x20run\x20instead.'),'calibrated_at':z['number']()['describe']('Calibration\x20timestamp\x20(ms).'),'fix_suggestions_grouped':z['record'](z['string'](),z['array'](z['object']({'risk_rule_id':z['string'](),'severity':z['enum'](['critical','high','medium','low','info']),'message':z['string'](),'fix_suggestion':z['string'](),'entry_id':z['string']()})['strict']()))['optional']()['describe']('Fix\x20suggestions\x20grouped\x20by\x20object_type.'),'safety_findings':z['array'](SafetyFindingSchema)['optional']()['describe']('OBJECT_REUSE\x20/\x20IMMUTABILITY\x20findings\x20from\x20safety-rules\x20(only\x20when\x20planned_objects\x20/\x20planned_operations\x20were\x20provided).'),'intent_echo':z['object']({'primary_object':z['string'](),'industry':z['string'](),'overall_completeness':z['enum'](['complete','partial','empty']),'classification_source':z['string']()['optional']()['describe']('Where\x20the\x20industry\x20guess\x20came\x20from.\x20\x27aggregate_risks_intent_echo\x27\x20=\x20this\x20tool\x27s\x20own\x20classification\x20of\x20the\x20intent\x20text\x20—\x20NOT\x20a\x20reconciled\x20verdict\x20(other\x20subsystems\x20may\x20classify\x20the\x20same\x20intent\x20differently).')})['strict']()['optional']()['describe']('Echo\x20of\x20the\x20auto-run\x20analyze_intent\x20(only\x20when\x20\x27puzzles\x27\x20was\x20omitted\x20and\x20\x27intent\x27\x20was\x20used).'),'warnings':z['array'](z['string']())})['strict']();export const TraceSubstepsResultSchema=z['object']({'action':z['literal']('trace_substeps'),'namespace':z['object']({'prefix':z['string'](),'version':z['string']()})['strict'](),'network':z['enum'](['testnet','mainnet']),'coherent':z['boolean']()['describe']('True\x20when\x20no\x20dangling\x20inputs,\x20no\x20cycles,\x20no\x20missing\x20outputs,\x20no\x20cross-step\x20breaks.'),'dangling_inputs':z['array'](z['object']({'substep_id':z['string'](),'missing_ref':z['string'](),'field_path':z['string']()})['strict']())['describe']('Input\x20refs\x20pointing\x20to\x20non-existent\x20substeps.'),'circular_refs':z['array'](z['object']({'cycle':z['array'](z['string']())})['strict']())['describe']('Substep\x20id\x20cycles\x20(when\x20present,\x20topological_order\x20is\x20empty).'),'missing_outputs':z['array'](z['object']({'substep_id':z['string'](),'expected_field':z['string'](),'dependent_substeps':z['array'](z['string']())})['strict']())['describe']('Substeps\x20that\x20should\x20have\x20produced\x20a\x20field\x20but\x20did\x20not.'),'cross_step_breaks':z['array'](z['object']({'source_step':z['string'](),'target_step':z['string'](),'missing_field':z['string']()})['strict']())['describe']('Upstream\x20step\x20failed\x20→\x20downstream\x20cannot\x20proceed.'),'step_details':z['array'](z['object']({'parent_step':z['string'](),'total_substeps':z['number'](),'successful':z['number'](),'failed':z['number'](),'pending':z['number'](),'skipped':z['number'](),'substep_ids':z['array'](z['string']())})['strict']())['describe']('Per-step\x20summary,\x20keyed\x20by\x20parent_step.'),'topological_order':z['array'](z['string']())['describe']('Topological\x20order\x20of\x20substep\x20ids\x20(empty\x20when\x20a\x20cycle\x20exists).'),'d10_check':z['object']({'check_id':z['literal']('D-10'),'description':z['string'](),'status':z['enum'](['PASS','FAIL','WARN']),'notes':z['array'](z['string']())})['strict']()['describe']('D-10\x20substep\x20linkage\x20completeness\x20verdict.')})['strict']();export const MerchantGuideResultSchema=z['object']({'action':z['literal']('merchant_guide'),'current_step':z['number']()['describe']('Furthest\x20wizard\x20step\x20reached\x20(2\x20=\x20awaiting\x20industry\x20confirmation;\x209\x20=\x20harness\x20issues\x20found;\x2010\x20=\x20plan\x20ready).'),'step_name':z['string'](),'guide_state':z['object']({'intent_text':z['string'](),'confirmed_industry':z['string']()['optional'](),'currency':z['string']()['optional'](),'deliverables':z['array'](z['unknown']())['optional'](),'payment_override':z['record'](z['string'](),z['unknown']())['optional'](),'trust_override':z['record'](z['string'](),z['unknown']())['optional'](),'adopted_module_ids':z['array'](z['string']())['optional'](),'guard_resolutions':z['record'](z['string'](),z['unknown']())['optional'](),'review_mode':z['enum'](['review','review_reward','none'])['optional'](),'reward_funding':z['string']()['optional'](),'reward_claim_amount':z['string']()['optional'](),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional'](),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional'](),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional'](),'affiliate_mode':z['enum'](['commission','none'])['optional'](),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()})['strict']()['describe']('Wizard\x20state\x20—\x20pass\x20back\x20UNCHANGED\x20on\x20the\x20next\x20merchant_guide\x20call.'),'intent_draft':z['unknown']()['optional']()['describe']('Step\x201-2\x20only:\x20BusinessIntent\x20draft\x20inferred\x20from\x20the\x20description.'),'industry_options':z['object']({'inferred':z['string'](),'confidence':z['number'](),'similar':z['array'](z['string']())})['strict']()['optional']()['describe']('Step\x202\x20only:\x20industry\x20candidates\x20awaiting\x20merchant\x20confirmation.'),'intent':z['unknown']()['optional']()['describe']('Steps\x207-10:\x20final\x20BusinessIntent\x20after\x20merchant\x20overrides.'),'adopted_modules':z['array'](z['object']({'id':z['string'](),'name':z['string'](),'description':z['string'](),'requires_keeper':z['boolean'](),'keeper_hint':z['string']()['optional'](),'user_protections':z['array'](z['string']()),'merchant_obligations':z['array'](z['string']())})['strict']())['optional']()['describe']('Steps\x206-10:\x20adopted\x20business\x20modules\x20with\x20protections/obligations.'),'blueprint':z['object']({'nodes':z['array'](z['object']({'id':z['string'](),'type':z['string'](),'purpose':z['string']()})['strict']()),'edges':z['array'](z['object']({'from':z['string'](),'to':z['string'](),'relation':z['string'](),'required':z['boolean']()})['strict']())})['strict']()['optional']()['describe']('Step\x207:\x20semantic\x20object\x20graph\x20(nodes\x20+\x20edges).'),'evaluation_preview':z['unknown']()['optional']()['describe']('Step\x208:\x20estimated\x20risk/completeness\x20scores\x20+\x20key\x20risks\x20+\x20module\x20boosts\x20(G-04:\x20no\x20trust\x20score\x20—\x20none\x20is\x20evaluated\x20at\x20build\x20time).'),'graph_validation':z['object']({'valid':z['boolean'](),'hard_violations':z['array'](z['object']({'id':z['string'](),'description':z['string'](),'fix':z['string']()['optional']()})['strict']()),'soft_notes':z['array'](z['object']({'id':z['string'](),'description':z['string']()})['strict']())})['strict']()['optional']()['describe']('Step\x208:\x20structural\x20validation\x20of\x20the\x20semantic\x20graph.'),'harness_check':z['object']({'module_constraints':z['array'](z['object']({'module':z['string'](),'plan_satisfied':z['boolean'](),'missing':z['array'](z['string']())['optional'](),'reason':z['string']()['optional'](),'estimated_score_boost':z['number'](),'evidence_matched':z['boolean']()['optional']()['describe']('G-03:\x20false\x20=\x20the\x20module\x20was\x20auto-adopted\x20by\x20score\x20with\x20no\x20explicit\x20intent\x20evidence\x20—\x20estimated_score_boost\x20is\x20recorded\x20as\x200.')})['strict']()),'blocking_issues':z['array'](z['object']({'module':z['string'](),'missing_constraints':z['array'](z['string']())['optional'](),'fix':z['string']()['optional']()})['strict']()),'deploy_time_checks':z['array'](z['string']())})['strict']()['optional']()['describe']('Step\x209:\x20module\x20constraint\x20check\x20at\x20blueprint\x20stage\x20+\x20deploy-time\x20checklist.'),'pending_guard_designs':z['array'](z['object']({'key':z['string']()['describe']('Guard\x20design\x20key\x20—\x20the\x20guide_confirm.guard_resolutions\x20lookup\x20key.'),'template_id':z['string']()['describe']('The\x20pattern.*/tpl_*\x20design\x20id.'),'host':z['string']()['describe']('Attachment\x20surface\x20(service\x20buy\x20path,\x20machine\x20forward,\x20allocator\x20row,\x20...).'),'purpose':z['string']()['describe']('What\x20the\x20design\x20gates.'),'logic_summary':z['string']()['optional']()['describe']('Pattern\x20logic\x20sketch\x20(pattern.*\x20catalog)\x20to\x20guide\x20the\x20resolution.'),'key_queries':z['array'](z['string']())['optional']()['describe']('Key\x20queries\x20the\x20pattern\x20reads.'),'how_to_resolve':z['string']()['describe']('Exact\x20guide_confirm.guard_resolutions\x20entry\x20shape\x20for\x20this\x20design.')})['strict']())['optional']()['describe']('Step\x209\x20(blocked):\x20every\x20unresolved\x20guard\x20design\x20with\x20its\x20pattern\x27s\x20logic\x20sketch\x20(C6-DEEP).\x20'+'The\x20judgment\x20layer\x20resolves\x20each\x20via\x20guide_confirm.guard_resolutions;\x20the\x20audit\x20freeze\x20gate\x20still\x20decides.'),'game_theory':z['object']({'summary':z['string'](),'coverage':z['string']()['describe']('Covered/total\x20scenario\x20count,\x20e.g.\x20\x274/5\x27.'),'exposed_scenarios':z['array'](z['string']()),'wow_alignments':z['array'](z['string']())['describe']('Active\x20WOW\x20mechanisms\x20aligning\x20merchant/user\x20incentives.'),'scenarios':z['array'](z['object']({'scenario':z['string'](),'covered':z['boolean'](),'conflict':z['string'](),'user_protection':z['string'](),'evaluation_metric':z['string'](),'recommendation':z['string']()['optional']()})['strict']())})['strict']()['optional']()['describe']('Step\x209:\x20merchant-user\x20adversarial\x20scenario\x20coverage.\x205\x20canonical\x20scenarios\x20checked\x20against\x20the\x20blueprint.'),'creation_plan':z['array'](z['object']({'order':z['number'](),'node_id':z['string'](),'object_type':z['string'](),'suggested_name':z['string'](),'depends_on':z['array'](z['string']()),'operation_hint':z['string']()})['strict']())['optional']()['describe']('Step\x2010:\x20topologically\x20ordered\x20creation\x20plan.\x20NOT\x20executed\x20—\x20materialize\x20via\x20onchain_operations.'),'post_deploy_steps':z['array'](z['object']({'order':z['number'](),'id':z['string'](),'title':z['string'](),'when':z['string'](),'action':z['string'](),'tool_hint':z['string'](),'failure_if_skipped':z['string']()})['strict']())['optional']()['describe']('Step\x2010:\x20ordered\x20executable\x20post-deploy\x20steps\x20(compensation\x20fund\x20top-up\x20R-4,\x20arbitration\x20unpause\x20R-5,\x20settlement\x20alloc_by_guard\x20R-2,\x20panorama\x20verification).\x20Run\x20via\x20onchain_operations\x20AFTER\x20the\x20creation\x20plan\x20materializes.'),'warnings':z['array'](z['string']()),'next_action':z['string']()['describe']('Human-readable\x20guidance\x20for\x20the\x20next\x20call.')})['strict']();
1
+ import{z}from'zod';const NetworkEnum=z['enum'](['mainnet','testnet']);export const PlanningIndustryEnum=z['string']()['regex'](/^[a-z][a-z0-9_]*$/,'industry\x20must\x20be\x20lowercase\x20snake_case');export const ProjectObjectTypeEnum=z['enum'](['service','machine','guard','permission','reward','arb','progress','treasury','demand','repository','contact','order','allocation','personal','payment','proof']);const IntentContextFields={'intent':z['string']()['max'](0x7d0)['optional']()['describe']('Business\x20intent\x20text\x20(e.g.\x20\x27I\x20rent\x20cameras\x20to\x20photographers\x20with\x20deposit\x20and\x20damage\x20inspection\x27).\x20'+'Used\x20as\x20the\x20primary\x20input;\x20falls\x20back\x20to\x20project_description\x20/\x20project_name\x20when\x20omitted.'),'project_name':z['string']()['min'](0x1)['max'](0xc8)['optional']()['describe']('Optional\x20business\x20name\x20—\x20used\x20as\x20an\x20intent\x20fallback\x20when\x20\x27intent\x27\x20is\x20omitted.'),'project_description':z['string']()['max'](0x7d0)['optional']()['describe']('Optional\x20business\x20description\x20—\x20used\x20as\x20an\x20intent\x20fallback\x20when\x20\x27intent\x27\x20is\x20omitted.'),'project_industry':PlanningIndustryEnum['optional']()['describe']('Industry\x20tag.\x20Drives\x20industry-specific\x20risk\x20calibration\x20(e.g.\x20\x27freelance\x27\x20does\x20NOT\x20require\x20'+'compensation_fund,\x20while\x20\x27rental\x27/\x27travel\x27\x20do).\x20Any\x20registered\x20industry\x20is\x20accepted\x20—\x20'+'builtin:\x20\x27general\x27,\x20\x27retail\x27,\x20\x27retail_d2c\x27,\x20\x27service\x27,\x20\x27rental\x27,\x20\x27freelance\x27,\x20\x27education\x27,\x20'+'\x27travel\x27,\x20\x27subscription\x27,\x20\x27custom\x27\x20—\x20plus\x20custom\x20industries\x20registered\x20via\x20industry\x20packs.')};export const GuardResolutionInputSchema=z['union']([z['object']({'kind':z['literal']('template'),'template_id':z['string']()['describe']('A\x20\x27tpl_*\x27\x20guard\x20template\x20id\x20to\x20fill\x20(template\x20fee_params\x20+\x20params\x20feed\x20the\x20fill).'),'params':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Extra\x20fill\x20params\x20over\x20the\x20merged\x20fee_params.')})['strict'](),z['object']({'kind':z['literal']('inline'),'description':z['string']()['optional']()['describe']('Guard\x20description\x20(defaults\x20to\x20the\x20pending\x20design\x27s\x20purpose).'),'table':z['array'](z['record'](z['string'](),z['unknown']()))['min'](0x1)['describe']('Guard\x20passport\x20table\x20rows\x20(identifier/b_submission/value_type/...).'),'root':z['object']({'type':z['string']()})['passthrough']()['describe']('Guard\x20logic\x20root\x20node\x20(a\x20typed\x20tree\x20node).')['refine'](a=>a['type']['length']>0x0,{'message':'guard\x20root.type\x20must\x20be\x20a\x20non-empty\x20node\x20type'})})['strict'](),z['object']({'kind':z['literal']('omit')})['strict']()]);export const PlanningActionMembers=[z['object']({'action':z['literal']('analyze_intent'),...IntentContextFields,'target_objects':z['array'](z['string']())['optional']()['describe']('Optional\x20explicit\x20target\x20objects\x20(entry_ids\x20or\x20object_type\x20names).\x20'+'When\x20provided,\x20puzzle\x20snapshots\x20are\x20restricted\x20to\x20these\x20objects.'),'network':NetworkEnum['optional']()})['strict']()['describe']('C1:\x20natural-language\x20business\x20intent\x20→\x20parsed\x20intent\x20(primary/secondary\x20objects,\x20'+'detected\x20scenes,\x20industry)\x20+\x20per-object\x20puzzle\x20snapshots\x20+\x20recommended\x20creation\x20order.'),z['object']({'action':z['literal']('aggregate_risks'),'project':z['string']()['optional']()['describe']('Project\x20prefix\x20(human-readable\x20unique\x20identifier,\x20e.g.\x20\x27myshop\x27).\x20Used\x20to\x20key\x20the\x20service-build\x20stage\x20cache.'),'version':z['string']()['regex'](/^v\d+$/)['optional']()['describe']('Project\x20version\x20(e.g.\x20\x27v1\x27)\x20for\x20the\x20service-build\x20stage\x20cache.\x20Defaults\x20to\x20\x27v1\x27.'),'puzzles':z['record'](z['string'](),z['object']({'puzzle':z['unknown']()['describe']('Puzzle\x20snapshot\x20(opaque\x20—\x20pass\x20through\x20from\x20analyze_intent\x20output\x20unchanged).'),'completeness':z['unknown']()['describe']('Completeness\x20snapshot\x20(opaque\x20—\x20pass\x20through\x20unchanged).'),'missing_dimensions':z['array'](z['string']())['describe']('Dimensions\x20still\x20missing\x20for\x20this\x20object.')})['strict']())['optional']()['describe']('Per-object\x20puzzle\x20snapshots,\x20keyed\x20by\x20object_type.\x20Pass\x20the\x20\x27puzzles\x27\x20field\x20from\x20a\x20prior\x20'+'analyze_intent\x20result\x20UNCHANGED.\x20When\x20omitted\x20but\x20\x27intent\x27\x20is\x20present,\x20the\x20handler\x20runs\x20'+'analyze_intent\x20first\x20(C1→C2\x20in\x20one\x20call).'),...IntentContextFields,'severity_threshold':z['enum'](['critical','high','medium','low','info'])['optional']()['describe']('Severity\x20threshold\x20(default\x20\x27high\x27).\x20Risks\x20at\x20or\x20above\x20this\x20level\x20block\x20deployment\x20(status\x20RISK_BLOCKED).'),'user_confirmed_high_risks':z['array'](z['string']())['optional']()['describe']('IDs\x20of\x20high\x20risks\x20already\x20confirmed\x20in\x20a\x20prior\x20round.\x20Confirmed\x20high\x20risks\x20no\x20longer\x20'+'trigger\x20RISK_PENDING_CONFIRM.'),'planned_objects':z['array'](z['object']({'object_type':z['string']()['describe']('Wowok\x20object\x20type\x20(e.g.\x20\x27service\x27,\x20\x27guard\x27,\x20\x27machine\x27).'),'is_new':z['boolean']()['describe']('true\x20when\x20creating\x20a\x20NEW\x20object;\x20false\x20when\x20reusing\x20an\x20existing\x20one.'),'name':z['string']()['optional']()['describe']('Planned\x20object\x20name\x20(for\x20readable\x20messages).')})['strict']())['optional']()['describe']('Planned\x20objects\x20for\x20the\x20OBJECT_REUSE\x20check\x20(safety-rules).\x20Flags\x20NEW\x20objects\x20whose\x20type\x20'+'carries\x20an\x20always/strongly-recommended\x20reuse\x20rule.'),'planned_operations':z['array'](z['object']({'object_type':z['string']()['describe']('Wowok\x20object\x20type\x20(e.g.\x20\x27service\x27,\x20\x27arbitration\x27).'),'trigger':z['enum'](['create','publish'])['describe']('Lifecycle\x20trigger\x20that\x20locks\x20fields.'),'name':z['string']()['optional']()['describe']('Object\x20name\x20(for\x20readable\x20messages).')})['strict']())['optional']()['describe']('Planned\x20create/publish\x20operations\x20for\x20the\x20IMMUTABILITY\x20check\x20(safety-rules).\x20Warns\x20which\x20'+'fields\x20become\x20permanently\x20locked\x20after\x20each\x20operation.'),'network':NetworkEnum['optional']()})['strict']()['describe']('C2:\x20puzzle\x20snapshots\x20→\x20cross-object\x20risk\x20calibration\x20(critical/high/medium/low/info)\x20with\x20blocking\x20'+'status.\x20DX\x20sugar:\x20when\x20\x27puzzles\x27\x20is\x20omitted\x20but\x20\x27intent\x27\x20is\x20present,\x20the\x20handler\x20runs\x20analyze_intent\x20first.'),z['object']({'action':z['literal']('trace_substeps'),'project':z['string']()['optional']()['describe']('Project\x20prefix\x20(human-readable\x20unique\x20identifier,\x20e.g.\x20\x27myshop\x27).\x20Used\x20to\x20key\x20the\x20service-build\x20stage\x20cache.'),'version':z['string']()['regex'](/^v\d+$/)['optional']()['describe']('Project\x20version\x20(e.g.\x20\x27v1\x27)\x20for\x20the\x20service-build\x20stage\x20cache.\x20Defaults\x20to\x20\x27v1\x27.'),'substeps':z['array'](z['object']({'step_id':z['string']()['describe']('Substep\x20id,\x20format\x20\x27T<step>.<substep>\x27\x20e.g.\x20\x27T1.1\x27.'),'parent_step':z['string']()['describe']('Parent\x20step\x20id,\x20format\x20\x27T<step>\x27\x20e.g.\x20\x27T1\x27.'),'object_type':ProjectObjectTypeEnum['describe']('Wowok\x20object\x20type\x20this\x20substep\x20operates\x20on.'),'entry_id':z['string']()['describe']('Puzzle\x20entry_id\x20this\x20substep\x20corresponds\x20to.'),'operation_type':z['string']()['describe']('operation_type\x20for\x20onchain_operations.'),'network':z['enum'](['testnet','mainnet'])['describe']('Target\x20network.'),'input':z['object']({'data':z['record'](z['string'](),z['unknown']())['describe']('Input\x20data\x20payload.'),'input_refs':z['array'](z['string']())['describe']('Upstream\x20substep_ids\x20this\x20substep\x20consumes.')})['strict'](),'output':z['object']({'object_id':z['string']()['optional'](),'tx_digest':z['string']()['optional']()})['catchall'](z['unknown']())['optional']()['describe']('Output\x20data\x20(filled\x20after\x20execution).'),'timestamp':z['number']()['describe']('Execution\x20timestamp\x20(ms).'),'status':z['enum'](['PENDING','SUCCESS','FAILED','SKIPPED'])['describe']('Execution\x20status.'),'failure_reason':z['string']()['optional']()['describe']('Failure\x20reason\x20(when\x20status=\x27FAILED\x27).'),'dependencies':z['object']({'input_refs':z['array'](z['string']()),'output_refs':z['array'](z['object']({'substep_id':z['string']()['describe']('Downstream\x20substep\x20that\x20consumes\x20this\x20output.'),'field_path':z['string']()['describe']('Field\x20path\x20produced\x20by\x20this\x20substep\x20(e.g.\x20\x27permission_address\x27).')})['strict']())})['strict']()['describe']('Dependencies\x20(input_refs\x20+\x20output_refs).'),'retry_info':z['object']({'original_step_id':z['string'](),'retry_count':z['number'](),'retry_reason':z['string']()})['strict']()['optional']()['describe']('Retry\x20info\x20(when\x20this\x20substep\x20is\x20a\x20retry\x20of\x20an\x20earlier\x20one).')})['strict']())['optional']()['describe']('Substep\x20execution\x20records\x20(63-spec\x20§2.1).\x20Required\x20when\x20action=\x27trace_substeps\x27.\x20'+'Construct\x20from\x20your\x20deployment\x20execution\x20trace.'),'substep_edges':z['array'](z['object']({'source':z['string']()['describe']('Source\x20substep\x20id.'),'target':z['string']()['describe']('Target\x20substep\x20id\x20(depends\x20on\x20source).'),'field_path':z['string']()['describe']('Field\x20path\x20flowing\x20along\x20this\x20edge.')})['strict']())['optional']()['describe']('Explicit\x20DAG\x20edges.\x20When\x20omitted,\x20edges\x20are\x20derived\x20from\x20each\x20substep\x27s\x20input_refs.'),'network':NetworkEnum['optional']()})['strict']()['describe']('C3:\x20substep\x20execution\x20records\x20→\x20DAG\x20coherence\x20analysis\x20(dangling\x20inputs,\x20circular\x20refs,\x20'+'missing\x20outputs,\x20cross-step\x20breaks,\x20topological\x20order,\x20D-10\x20verdict).'),z['object']({'action':z['literal']('merchant_guide'),...IntentContextFields,'guide_state':z['object']({'intent_text':z['string']()['describe']('Step\x201:\x20raw\x20merchant\x20business\x20description.'),'confirmed_industry':z['string']()['optional']()['describe']('Step\x202:\x20merchant-confirmed\x20industry\x20id.'),'currency':z['string']()['optional']()['describe']('Step\x205:\x20payment\x20currency\x20(default\x20WOW).'),'deliverables':z['array'](z['unknown']())['optional']()['describe']('Step\x204:\x20merchant-defined\x20deliverables\x20(opaque\x20passthrough).'),'payment_override':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x205:\x20payment\x20structure\x20overrides\x20(opaque\x20passthrough).'),'trust_override':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x206:\x20trust\x20mechanism\x20overrides\x20(opaque\x20passthrough).'),'adopted_module_ids':z['array'](z['string']())['optional']()['describe']('Step\x206:\x20merchant-confirmed\x20business\x20module\x20ids.'),'guard_resolutions':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Accumulated\x20judgment-layer\x20guard\x20resolutions\x20(C6-DEEP)\x20—\x20pass\x20back\x20UNCHANGED\x20with\x20the\x20rest\x20of\x20the\x20state.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Per-build\x20review-rail\x20mode\x20(v53).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string\x20(required\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward).'),'reward_claim_amount':z['string']()['optional']()['describe']('Per-claim\x20reward\x20bounty\x20mounted\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string\x20(BK15-F09:\x20schema-required\x20on\x20the\x20mount;\x20the\x20kernel\x20never\x20fabricates\x20a\x20real-money\x20parameter).'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.\x20Declaring\x20a\x20mode\x20with\x20no\x20backing\x20rail\x20in\x20machine_shape\x20is\x20a\x20compile\x20blocker\x20(AFTER_SALES_RAIL_MISSING).'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.\x20A\x20judge-decided\x20mode\x20(contest/bounty/agent)\x20without\x20arbitration_mode\x20\x27third_party\x27\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_JUDGE_NOT_INDEPENDENT);\x20a\x20finite\x20revision_rounds_max\x20with\x20no\x20counter\x20Repository\x20guard\x20is\x20a\x20compile\x20blocker\x20(ACCEPTANCE_REVISION_UNBOUNDED).'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.\x20A\x20capture\x20forward\x20with\x20no\x20fund-gate\x20Guard\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_FUNDING_UNGATED);\x20a\x20deposit-held\x20state\x20with\x20no\x20exit\x20rail\x20is\x20a\x20compile\x20blocker\x20(INSTALLMENT_DEPOSIT_STRANDED).'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.\x20A\x20declared\x20commission\x20overlay\x20with\x20no\x20commission\x20rail\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_RAIL_MISSING);\x20a\x20commission\x20with\x20no\x20post-lock\x20no-clawback\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(AFFILIATE_CLAWBACK_UNDISCLOSED).'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.\x20A\x20declared\x20threshold/flexible\x20overlay\x20with\x20no\x20two-leg\x20escrow-exit\x20gate\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_THRESHOLD_GATE_MISSING);\x20a\x20threshold\x20gate\x20whose\x20aggregate\x20is\x20NOT\x20a\x20writer-bound\x20sum-where\x20(id_from\x20signer)\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_AGGREGATE_UNBOUND);\x20a\x20missing\x20L-04/L-01/L-05\x20disclosure\x20build_note\x20is\x20a\x20compile\x20blocker\x20(CROWDFUNDING_DISCLOSURE_MISSING).'),'logistics_mode':z['enum'](['none','carrier','merchant_managed','courier','pickup_point'])['optional']()['describe']('Per-build\x20fulfillment\x20topology\x20(K3\x20batch\x20C,\x20K-2).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20logistics_mode\x20applies.\x20A\x20declared\x20topology\x20the\x20machine_shape\x20cannot\x20honor\x20is\x20a\x20compile\x20blocker:\x20courier\x20with\x20no\x20named_operator\x20handover\x20rail\x20(LOGISTICS_COURIER_RAIL_MISSING)\x20or\x20a\x20pooled\x20delivery\x20fee\x20(LOGISTICS_COURIER_FEE_POOLED);\x20pickup_point\x20without\x20the\x20absolute\x20batch\x20cutoff\x20or\x20the\x20unclaimed-goods\x20exit\x20window\x20(LOGISTICS_PICKUP_CUTOFF_MISSING);\x20carrier\x20without\x20tracking\x20evidence\x20(LOGISTICS_CARRIER_EVIDENCE_MISSING);\x20any\x20physical\x20mode\x20without\x20a\x20transit-loss\x20story\x20(LOGISTICS_TRANSIT_LOSS_UNCOVERED);\x20courier/pickup_point\x20without\x20the\x20two\x20dispatch\x20disclosures\x20(LOGISTICS_DISPATCH_UNDISCLOSED).')})['strict']()['optional']()['describe']('Wizard\x20state\x20from\x20a\x20prior\x20merchant_guide\x20result.\x20Pass\x20back\x20UNCHANGED\x20on\x20every\x20subsequent\x20call.\x20'+'The\x20handler\x20re-runs\x20the\x20pipeline\x20deterministically\x20and\x20advances\x20to\x20the\x20furthest\x20reachable\x20step.'),'guide_confirm':z['object']({'industry':z['string']()['optional']()['describe']('Step\x202\x20confirmation:\x20industry\x20id\x20(e.g.\x20\x27freelance\x27).'),'currency':z['string']()['optional']()['describe']('Step\x205\x20confirmation:\x20payment\x20currency.'),'deliverables':z['array'](z['unknown']())['optional']()['describe']('Step\x204\x20confirmation:\x20deliverable\x20definitions.'),'payment':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x205\x20confirmation:\x20{\x20model,\x20triggers,\x20allocation\x20}\x20overrides.'),'trust':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Step\x206\x20confirmation:\x20{\x20refundPolicy,\x20arbitration,\x20escrow\x20}\x20overrides.'),'adopted_module_ids':z['array'](z['string']())['optional']()['describe']('Step\x206\x20confirmation:\x20business\x20module\x20ids\x20to\x20adopt\x20(overrides\x20recommendation).'),'guard_resolutions':z['record'](z['string'](),GuardResolutionInputSchema)['optional']()['describe']('Judgment-layer\x20resolutions\x20for\x20pending\x20guard\x20designs\x20(keyed\x20by\x20pending_guard_designs[].key;\x20C6-DEEP).\x20'+'A\x20blocked\x20audit\x20lists\x20every\x20unresolved\x20design\x20—\x20resolve\x20each\x20here\x20(kind\x20\x27inline\x27\x20with\x20the\x20resolved\x20Guard\x20table+root,\x20or\x20'+'kind\x20\x27template\x27\x20with\x20a\x20matching\x20tpl_*\x20id)\x20and\x20call\x20merchant_guide\x20again.\x20Advisory\x20designs\x20that\x20do\x20not\x20apply\x20to\x20this\x20'+'shop\x20may\x20be\x20resolved\x20with\x20{kind:\x27omit\x27}\x20instead\x20(honored\x20only\x20for\x20designs\x20with\x20no\x20inbound\x20binding;\x20an\x20omit\x20of\x20a\x20bound\x20'+'design\x20is\x20refused\x20with\x20GUARD_OMIT_UNSUPPORTED).\x20Caller\x20input\x20wins\x20over\x20module-derived\x20resolutions.\x20'+'The\x20publish\x20freeze\x20gate\x20still\x20runs:\x20a\x20resolution\x20only\x20unblocks\x20the\x20plan\x20when\x20the\x20closed\x20audit\x20is\x20clean.'),'review_mode':z['enum'](['review','review_reward','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20review-rail\x20mode\x20(v53).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20review_mode\x20applies.'),'reward_funding':z['string']()['optional']()['describe']('Step\x206\x20confirmation:\x20review\x20reward\x20pool\x20funding,\x20smallest-unit\x20string\x20(required\x20when\x20the\x20effective\x20review\x20mode\x20is\x20review_reward).'),'reward_claim_amount':z['string']()['optional']()['describe']('Step\x206\x20confirmation:\x20per-claim\x20reward\x20bounty\x20on\x20the\x20claim\x20guard_add,\x20smallest-unit\x20string\x20(BK15-F09).'),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20after-sales\x20mode\x20(D12\x20refactor\x204).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20after_sales_mode\x20applies.'),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20acceptance/judging\x20mode\x20(D12\x20refactor\x202).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20acceptance_mode\x20applies.'),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20installment/deposit\x20mode\x20(D12\x20refactor\x203).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20installment_mode\x20applies.'),'affiliate_mode':z['enum'](['commission','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20affiliate\x20commission\x20overlay\x20(D12\x20batch\x205).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20affiliate_mode\x20applies.'),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20crowdfunding\x20campaign\x20overlay\x20(D12\x20batch\x207).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20crowdfunding_mode\x20applies.'),'logistics_mode':z['enum'](['none','carrier','merchant_managed','courier','pickup_point'])['optional']()['describe']('Step\x206\x20confirmation:\x20per-build\x20fulfillment\x20topology\x20(K3\x20batch\x20C,\x20K-2).\x20Absent\x20=\x20the\x20template\x27s\x20declared\x20logistics_mode\x20applies.')})['strict']()['optional']()['describe']('Merchant\x20decisions\x20for\x20the\x20current\x20wizard\x20step.\x20Merged\x20over\x20guide_state.\x20Typical\x20flow:\x20'+'call\x201\x20with\x20intent\x20only\x20→\x20receive\x20step-2\x20industry\x20options\x20→\x20call\x202\x20with\x20guide_state\x20+\x20'+'guide_confirm={industry}\x20→\x20receive\x20full\x20blueprint\x20plan\x20(steps\x207-10).'),'network':NetworkEnum['optional']()})['strict']()['describe']('10-step\x20merchant\x20onboarding\x20wizard:\x20intent\x20text\x20→\x20BusinessIntent\x20→\x20industry\x20confirmation\x20→\x20'+'module\x20adoption\x20→\x20Blueprint\x20(L1\x20plan\x20projection)\x20→\x20evaluation\x20preview\x20→\x20harness\x20check\x20→\x20creation\x20'+'plan.\x20NEVER\x20executes\x20on-chain\x20operations.\x20Stateless:\x20pass\x20guide_state/guide_confirm\x20to\x20advance.')];const KeywordMatchSchema=z['object']({'keyword':z['string'](),'category':z['string'](),'matched_objects':z['array'](z['string']()),'required_level':z['enum'](['R','C','OPTIONAL']),'match_count':z['number']()})['strict']();export const AnalyzeIntentResultSchema=z['object']({'action':z['literal']('analyze_intent'),'intent_parsed':z['object']({'primary_object':z['string']()['describe']('Primary\x20object\x20inferred\x20from\x20the\x20intent\x20keywords.'),'secondary_objects':z['array'](z['string']())['describe']('Supporting\x20objects\x20typically\x20required\x20alongside\x20the\x20primary\x20one.'),'detected_scenes':z['array'](z['object']({'object':z['string'](),'scene_id':z['string']()['describe']('Free-form\x20scene\x20id,\x20e.g.\x20\x27retail\x27,\x20\x27rental_return\x27.')})['strict']())['describe']('Scenes\x20detected\x20from\x20the\x20intent\x20(used\x20for\x20template\x20selection).'),'industry':z['string']()['describe']('Industry\x20mode\x20resolved\x20from\x20the\x20intent\x20(defaults\x20to\x20\x27general\x27).'),'keyword_matches':z['array'](KeywordMatchSchema)['describe']('All\x20keyword\x20matches\x20that\x20drove\x20the\x20identification.')})['strict'](),'puzzles':z['record'](z['string'](),z['object']({'puzzle':z['unknown'](),'completeness':z['unknown'](),'missing_dimensions':z['array'](z['string']())})['strict']())['describe']('Per-object\x20puzzle\x20snapshot,\x20keyed\x20by\x20object_type.\x20Pass\x20this\x20UNCHANGED\x20to\x20aggregate_risks.'),'overall_completeness':z['enum'](['complete','partial','empty']),'next_step':z['string']()['describe']('Human-readable\x20suggestion\x20for\x20the\x20next\x20puzzle\x20step.'),'recommended_creation_order':z['array'](z['string']())['describe']('Recommended\x20object\x20creation\x20order\x20(dependency\x20topology).'),'warnings':z['array'](z['string']())})['strict']();const AggregatedRiskSchema=z['object']({'risk_rule_id':z['string']()['describe']('Unified\x20risk\x20rule\x20id,\x20e.g.\x20\x27R-S-01\x27.'),'object_type':z['string'](),'entry_id':z['string']()['describe']('Object\x20entry_id\x20(\x27*\x27\x20when\x20cross-object).'),'severity':z['enum'](['critical','high','medium','low','info']),'message':z['string'](),'fix_suggestion':z['string'](),'details':z['object']({'field_path':z['string']()['optional'](),'actual_value':z['unknown']()['optional'](),'expected_value':z['unknown']()['optional'](),'rule_source':z['string']()['optional']()})['strict']()['optional']()})['strict'](),SafetyFindingSchema=z['object']({'rule_id':z['string']()['describe']('Safety\x20rule\x20id\x20(e.g.\x20\x27REUSE-SERVICE-01\x27,\x20\x27IMMUT-001\x27).'),'severity':z['enum'](['info','warn']),'message':z['string']()})['strict']();export const AggregateRisksResultSchema=z['object']({'action':z['literal']('aggregate_risks'),'namespace':z['object']({'prefix':z['string'](),'version':z['string'](),'industry':z['string']()['optional']()})['strict'](),'findings':z['array'](AggregatedRiskSchema)['describe']('All\x20risks\x20found,\x20sorted\x20(critical\x20first).'),'severity_summary':z['record'](z['string'](),z['number']())['describe']('Counts\x20keyed\x20by\x20severity.'),'status':z['enum'](['CLEAN_WITHIN_SCOPE','STATIC_ANALYZERS_CLEAN','RISK_BLOCKED','RISK_PENDING_CONFIRM','RISK_CANCELLED'])['describe']('Aggregated\x20status\x20(62-spec\x20§3.2).\x20RISK_BLOCKED\x20=\x20critical\x20or\x20above-threshold\x20risks\x20present.\x20'+'⚠️\x20THIS\x20IS\x20A\x20SEVERITY\x20VERDICT,\x20NOT\x20PUBLISH\x20CLEARANCE:\x20the\x20aggregation\x20is\x20a\x20pure\x20transformation\x20over\x20puzzle\x20'+'snapshots\x20and\x20planned\x20objects/operations\x20and\x20never\x20reads\x20a\x20live\x20object.\x20CLEAN_WITHIN_SCOPE\x20means\x20\x27no\x20finding\x20in\x20the\x20static\x20'+'analyzers\x20AND\x20zero\x20on-chain\x20objects\x20inspected\x27\x20—\x20read\x20`evidence_scope`\x20/\x20`objects_inspected`\x20/\x20`publish_authorized`\x20before\x20'+'treating\x20it\x20as\x20a\x20green\x20light.\x20STATIC_ANALYZERS_CLEAN\x20is\x20reserved\x20for\x20a\x20future\x20object-grounded\x20clean\x20run.'),'status_note':z['string']()['optional']()['describe']('One-line\x20honesty\x20note\x20for\x20the\x20status:\x20it\x20reflects\x20static\x20analyzers\x20over\x20plan\x20snapshots\x20only\x20—\x20zero\x20on-chain\x20objects\x20inspected;\x20not\x20a\x20publish\x20clearance.'),'objects_inspected':z['number']()['optional']()['describe']('How\x20many\x20live\x20on-chain\x20objects\x20this\x20aggregation\x20inspected.\x20Always\x200\x20today\x20(the\x20C1→C4\x20pipeline\x20performs\x20no\x20chain\x20reads)\x20—\x20a\x20clean\x20status\x20over\x20zero\x20objects\x20must\x20never\x20read\x20as\x20clearance.'),'pending_confirmations':z['array'](z['object']({'risk_rule_id':z['string'](),'description':z['string'](),'fix_suggestion':z['string'](),'object_type':z['string'](),'entry_id':z['string']()})['strict']())['optional']()['describe']('high\x20risks\x20awaiting\x20user\x20confirmation\x20(only\x20when\x20status=\x27RISK_PENDING_CONFIRM\x27).'),'evidence_scope':z['enum'](['puzzle_snapshots_only','object_grounded'])['optional']()['describe']('What\x20this\x20aggregation\x20actually\x20inspected.\x20Always\x20\x27puzzle_snapshots_only\x27\x20today:\x20the\x20C1→C4\x20pipeline\x20performs\x20no\x20chain\x20'+'reads.\x20Machine-readable\x20form\x20of\x20the\x20scope\x20warning\x20—\x20a\x20caller\x20must\x20not\x20have\x20to\x20infer\x20it\x20from\x20prose.'),'object_grounded':z['boolean']()['optional']()['describe']('True\x20only\x20if\x20a\x20live\x20on-chain\x20object\x20was\x20inspected.\x20Currently\x20always\x20false\x20(see\x20evidence_scope).'),'publish_authorized':z['boolean']()['optional']()['describe']('Whether\x20this\x20gate\x20alone\x20authorizes\x20publishing.\x20Currently\x20always\x20false:\x20use\x20template_scan\x20before\x20deploying\x20and\x20'+'service_panorama\x20/\x20onchain_objects\x20after,\x20plus\x20the\x20publish-time\x20gates\x20in\x20onchain_operations.'),'publish_authorized_reason':z['string']()['optional']()['describe']('Why\x20publish_authorized\x20is\x20false,\x20and\x20which\x20checks\x20to\x20run\x20instead.'),'calibrated_at':z['number']()['describe']('Calibration\x20timestamp\x20(ms).'),'fix_suggestions_grouped':z['record'](z['string'](),z['array'](z['object']({'risk_rule_id':z['string'](),'severity':z['enum'](['critical','high','medium','low','info']),'message':z['string'](),'fix_suggestion':z['string'](),'entry_id':z['string']()})['strict']()))['optional']()['describe']('Fix\x20suggestions\x20grouped\x20by\x20object_type.'),'safety_findings':z['array'](SafetyFindingSchema)['optional']()['describe']('OBJECT_REUSE\x20/\x20IMMUTABILITY\x20findings\x20from\x20safety-rules\x20(only\x20when\x20planned_objects\x20/\x20planned_operations\x20were\x20provided).'),'intent_echo':z['object']({'primary_object':z['string'](),'industry':z['string'](),'overall_completeness':z['enum'](['complete','partial','empty']),'classification_source':z['string']()['optional']()['describe']('Where\x20the\x20industry\x20guess\x20came\x20from.\x20\x27aggregate_risks_intent_echo\x27\x20=\x20this\x20tool\x27s\x20own\x20classification\x20of\x20the\x20intent\x20text\x20—\x20NOT\x20a\x20reconciled\x20verdict\x20(other\x20subsystems\x20may\x20classify\x20the\x20same\x20intent\x20differently).')})['strict']()['optional']()['describe']('Echo\x20of\x20the\x20auto-run\x20analyze_intent\x20(only\x20when\x20\x27puzzles\x27\x20was\x20omitted\x20and\x20\x27intent\x27\x20was\x20used).'),'warnings':z['array'](z['string']())})['strict']();export const TraceSubstepsResultSchema=z['object']({'action':z['literal']('trace_substeps'),'namespace':z['object']({'prefix':z['string'](),'version':z['string']()})['strict'](),'network':z['enum'](['testnet','mainnet']),'coherent':z['boolean']()['describe']('True\x20when\x20no\x20dangling\x20inputs,\x20no\x20cycles,\x20no\x20missing\x20outputs,\x20no\x20cross-step\x20breaks.'),'dangling_inputs':z['array'](z['object']({'substep_id':z['string'](),'missing_ref':z['string'](),'field_path':z['string']()})['strict']())['describe']('Input\x20refs\x20pointing\x20to\x20non-existent\x20substeps.'),'circular_refs':z['array'](z['object']({'cycle':z['array'](z['string']())})['strict']())['describe']('Substep\x20id\x20cycles\x20(when\x20present,\x20topological_order\x20is\x20empty).'),'missing_outputs':z['array'](z['object']({'substep_id':z['string'](),'expected_field':z['string'](),'dependent_substeps':z['array'](z['string']())})['strict']())['describe']('Substeps\x20that\x20should\x20have\x20produced\x20a\x20field\x20but\x20did\x20not.'),'cross_step_breaks':z['array'](z['object']({'source_step':z['string'](),'target_step':z['string'](),'missing_field':z['string']()})['strict']())['describe']('Upstream\x20step\x20failed\x20→\x20downstream\x20cannot\x20proceed.'),'step_details':z['array'](z['object']({'parent_step':z['string'](),'total_substeps':z['number'](),'successful':z['number'](),'failed':z['number'](),'pending':z['number'](),'skipped':z['number'](),'substep_ids':z['array'](z['string']())})['strict']())['describe']('Per-step\x20summary,\x20keyed\x20by\x20parent_step.'),'topological_order':z['array'](z['string']())['describe']('Topological\x20order\x20of\x20substep\x20ids\x20(empty\x20when\x20a\x20cycle\x20exists).'),'d10_check':z['object']({'check_id':z['literal']('D-10'),'description':z['string'](),'status':z['enum'](['PASS','FAIL','WARN']),'notes':z['array'](z['string']())})['strict']()['describe']('D-10\x20substep\x20linkage\x20completeness\x20verdict.')})['strict']();export const MerchantGuideResultSchema=z['object']({'action':z['literal']('merchant_guide'),'current_step':z['number']()['describe']('Furthest\x20wizard\x20step\x20reached\x20(2\x20=\x20awaiting\x20industry\x20confirmation;\x209\x20=\x20harness\x20issues\x20found;\x2010\x20=\x20plan\x20ready).'),'step_name':z['string'](),'guide_state':z['object']({'intent_text':z['string'](),'confirmed_industry':z['string']()['optional'](),'currency':z['string']()['optional'](),'deliverables':z['array'](z['unknown']())['optional'](),'payment_override':z['record'](z['string'](),z['unknown']())['optional'](),'trust_override':z['record'](z['string'](),z['unknown']())['optional'](),'adopted_module_ids':z['array'](z['string']())['optional'](),'guard_resolutions':z['record'](z['string'](),z['unknown']())['optional'](),'review_mode':z['enum'](['review','review_reward','none'])['optional'](),'reward_funding':z['string']()['optional'](),'reward_claim_amount':z['string']()['optional'](),'after_sales_mode':z['enum'](['return','exchange','warranty','none'])['optional'](),'acceptance_mode':z['enum'](['milestone','contest','bounty','agent','none'])['optional'](),'installment_mode':z['enum'](['deposit_balance','milestone_n','none'])['optional'](),'affiliate_mode':z['enum'](['commission','none'])['optional'](),'crowdfunding_mode':z['enum'](['threshold','flexible','none'])['optional'](),'logistics_mode':z['enum'](['none','carrier','merchant_managed','courier','pickup_point'])['optional']()})['strict']()['describe']('Wizard\x20state\x20—\x20pass\x20back\x20UNCHANGED\x20on\x20the\x20next\x20merchant_guide\x20call.'),'intent_draft':z['unknown']()['optional']()['describe']('Step\x201-2\x20only:\x20BusinessIntent\x20draft\x20inferred\x20from\x20the\x20description.'),'industry_options':z['object']({'inferred':z['string'](),'confidence':z['number'](),'similar':z['array'](z['string']())})['strict']()['optional']()['describe']('Step\x202\x20only:\x20industry\x20candidates\x20awaiting\x20merchant\x20confirmation.'),'intent':z['unknown']()['optional']()['describe']('Steps\x207-10:\x20final\x20BusinessIntent\x20after\x20merchant\x20overrides.'),'adopted_modules':z['array'](z['object']({'id':z['string'](),'name':z['string'](),'description':z['string'](),'requires_keeper':z['boolean'](),'keeper_hint':z['string']()['optional'](),'user_protections':z['array'](z['string']()),'merchant_obligations':z['array'](z['string']())})['strict']())['optional']()['describe']('Steps\x206-10:\x20adopted\x20business\x20modules\x20with\x20protections/obligations.'),'blueprint':z['object']({'nodes':z['array'](z['object']({'id':z['string'](),'type':z['string'](),'purpose':z['string']()})['strict']()),'edges':z['array'](z['object']({'from':z['string'](),'to':z['string'](),'relation':z['string'](),'required':z['boolean']()})['strict']())})['strict']()['optional']()['describe']('Step\x207:\x20semantic\x20object\x20graph\x20(nodes\x20+\x20edges).'),'evaluation_preview':z['unknown']()['optional']()['describe']('Step\x208:\x20estimated\x20risk/completeness\x20scores\x20+\x20key\x20risks\x20+\x20module\x20boosts\x20(G-04:\x20no\x20trust\x20score\x20—\x20none\x20is\x20evaluated\x20at\x20build\x20time).'),'graph_validation':z['object']({'valid':z['boolean'](),'hard_violations':z['array'](z['object']({'id':z['string'](),'description':z['string'](),'fix':z['string']()['optional']()})['strict']()),'soft_notes':z['array'](z['object']({'id':z['string'](),'description':z['string']()})['strict']())})['strict']()['optional']()['describe']('Step\x208:\x20structural\x20validation\x20of\x20the\x20semantic\x20graph.'),'harness_check':z['object']({'module_constraints':z['array'](z['object']({'module':z['string'](),'plan_satisfied':z['boolean'](),'missing':z['array'](z['string']())['optional'](),'reason':z['string']()['optional'](),'estimated_score_boost':z['number'](),'evidence_matched':z['boolean']()['optional']()['describe']('G-03:\x20false\x20=\x20the\x20module\x20was\x20auto-adopted\x20by\x20score\x20with\x20no\x20explicit\x20intent\x20evidence\x20—\x20estimated_score_boost\x20is\x20recorded\x20as\x200.')})['strict']()),'module_gaps':z['array'](z['object']({'module':z['string'](),'missing_constraints':z['array'](z['string']())['optional'](),'fix':z['string']()['optional']()})['strict']()),'blocking_issues':z['array'](z['object']({'module':z['string'](),'missing_constraints':z['array'](z['string']())['optional'](),'fix':z['string']()['optional']()})['strict']()),'deploy_time_checks':z['array'](z['string']())})['strict']()['optional']()['describe']('Step\x209:\x20module\x20constraint\x20check\x20at\x20blueprint\x20stage\x20+\x20deploy-time\x20checklist.'),'pending_guard_designs':z['array'](z['object']({'key':z['string']()['describe']('Guard\x20design\x20key\x20—\x20the\x20guide_confirm.guard_resolutions\x20lookup\x20key.'),'template_id':z['string']()['describe']('The\x20pattern.*/tpl_*\x20design\x20id.'),'host':z['string']()['describe']('Attachment\x20surface\x20(service\x20buy\x20path,\x20machine\x20forward,\x20allocator\x20row,\x20...).'),'purpose':z['string']()['describe']('What\x20the\x20design\x20gates.'),'logic_summary':z['string']()['optional']()['describe']('Pattern\x20logic\x20sketch\x20(pattern.*\x20catalog)\x20to\x20guide\x20the\x20resolution.'),'key_queries':z['array'](z['string']())['optional']()['describe']('Key\x20queries\x20the\x20pattern\x20reads.'),'how_to_resolve':z['string']()['describe']('Exact\x20guide_confirm.guard_resolutions\x20entry\x20shape\x20for\x20this\x20design.')})['strict']())['optional']()['describe']('Step\x209\x20(blocked):\x20every\x20unresolved\x20guard\x20design\x20with\x20its\x20pattern\x27s\x20logic\x20sketch\x20(C6-DEEP).\x20'+'The\x20judgment\x20layer\x20resolves\x20each\x20via\x20guide_confirm.guard_resolutions;\x20the\x20audit\x20freeze\x20gate\x20still\x20decides.'),'game_theory':z['object']({'summary':z['string'](),'coverage':z['string']()['describe']('Covered/total\x20scenario\x20count,\x20e.g.\x20\x274/5\x27.'),'exposed_scenarios':z['array'](z['string']()),'wow_alignments':z['array'](z['string']())['describe']('Active\x20WOW\x20mechanisms\x20aligning\x20merchant/user\x20incentives.'),'scenarios':z['array'](z['object']({'scenario':z['string'](),'covered':z['boolean'](),'conflict':z['string'](),'user_protection':z['string'](),'evaluation_metric':z['string'](),'recommendation':z['string']()['optional']()})['strict']())})['strict']()['optional']()['describe']('Step\x209:\x20merchant-user\x20adversarial\x20scenario\x20coverage.\x205\x20canonical\x20scenarios\x20checked\x20against\x20the\x20blueprint.'),'creation_plan':z['array'](z['object']({'order':z['number'](),'node_id':z['string'](),'object_type':z['string'](),'suggested_name':z['string'](),'depends_on':z['array'](z['string']()),'operation_hint':z['string']()})['strict']())['optional']()['describe']('Step\x2010:\x20topologically\x20ordered\x20creation\x20plan.\x20NOT\x20executed\x20—\x20materialize\x20via\x20onchain_operations.'),'post_deploy_steps':z['array'](z['object']({'order':z['number'](),'id':z['string'](),'title':z['string'](),'when':z['string'](),'action':z['string'](),'tool_hint':z['string'](),'failure_if_skipped':z['string']()})['strict']())['optional']()['describe']('Step\x2010:\x20ordered\x20executable\x20post-deploy\x20steps\x20(compensation\x20fund\x20top-up\x20R-4,\x20arbitration\x20unpause\x20R-5,\x20settlement\x20alloc_by_guard\x20R-2,\x20panorama\x20verification).\x20Run\x20via\x20onchain_operations\x20AFTER\x20the\x20creation\x20plan\x20materializes.'),'warnings':z['array'](z['string']()),'next_action':z['string']()['describe']('Human-readable\x20guidance\x20for\x20the\x20next\x20call.')})['strict']();
@@ -3,7 +3,7 @@ export declare const IndustryPackOperationInputSchema: z.ZodObject<{
3
3
  intent: z.ZodOptional<z.ZodString>;
4
4
  strategy: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
5
5
  semantic_ir: z.ZodOptional<z.ZodObject<{
6
- schema_version: z.ZodLiteral<1>;
6
+ schema_version: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
7
7
  locale: z.ZodString;
8
8
  traits: z.ZodOptional<z.ZodArray<z.ZodObject<{
9
9
  trait: z.ZodString;
@@ -34,6 +34,13 @@ export declare const IndustryPackOperationInputSchema: z.ZodObject<{
34
34
  }, z.core.$strict>>;
35
35
  quote: z.ZodOptional<z.ZodString>;
36
36
  }, z.core.$strict>>>;
37
+ discovery: z.ZodOptional<z.ZodObject<{
38
+ industry: z.ZodOptional<z.ZodString>;
39
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ product_ref: z.ZodOptional<z.ZodString>;
41
+ english_summary: z.ZodOptional<z.ZodString>;
42
+ confidence: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$strict>>;
37
44
  provenance: z.ZodObject<{
38
45
  source: z.ZodEnum<{
39
46
  human: "human";
@@ -390,6 +397,7 @@ export declare const IndustryPackOperationOutputSchema: z.ZodObject<{
390
397
  contradicted_traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
391
398
  evidenced_traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
392
399
  domain_prior: z.ZodOptional<z.ZodBoolean>;
400
+ ir_industry_match: z.ZodOptional<z.ZodBoolean>;
393
401
  requirement_support: z.ZodOptional<z.ZodNumber>;
394
402
  location_sensitivity: z.ZodEnum<{
395
403
  strict: "strict";
@@ -4,7 +4,7 @@ export declare const ModeRegistryFields: {
4
4
  readonly intent: z.ZodOptional<z.ZodString>;
5
5
  readonly strategy: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
6
6
  readonly semantic_ir: z.ZodOptional<z.ZodObject<{
7
- schema_version: z.ZodLiteral<1>;
7
+ schema_version: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
8
8
  locale: z.ZodString;
9
9
  traits: z.ZodOptional<z.ZodArray<z.ZodObject<{
10
10
  trait: z.ZodString;
@@ -35,6 +35,13 @@ export declare const ModeRegistryFields: {
35
35
  }, z.core.$strict>>;
36
36
  quote: z.ZodOptional<z.ZodString>;
37
37
  }, z.core.$strict>>>;
38
+ discovery: z.ZodOptional<z.ZodObject<{
39
+ industry: z.ZodOptional<z.ZodString>;
40
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ product_ref: z.ZodOptional<z.ZodString>;
42
+ english_summary: z.ZodOptional<z.ZodString>;
43
+ confidence: z.ZodOptional<z.ZodNumber>;
44
+ }, z.core.$strict>>;
38
45
  provenance: z.ZodObject<{
39
46
  source: z.ZodEnum<{
40
47
  human: "human";
@@ -177,6 +184,7 @@ export declare const RecommendIndustryResultSchema: z.ZodObject<{
177
184
  contradicted_traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
178
185
  evidenced_traits: z.ZodOptional<z.ZodArray<z.ZodString>>;
179
186
  domain_prior: z.ZodOptional<z.ZodBoolean>;
187
+ ir_industry_match: z.ZodOptional<z.ZodBoolean>;
180
188
  requirement_support: z.ZodOptional<z.ZodNumber>;
181
189
  location_sensitivity: z.ZodEnum<{
182
190
  strict: "strict";
@@ -1 +1 @@
1
- import{z}from'zod';import{SemanticIRInputSchema}from'../../knowledge/semantic-ir.js';export const MODE_REGISTRY_ACTIONS=['recommend_industry','list_modes','derive_user_mode','evolve_user_mode','register_user_mode','unregister_user_mode','register_custom_metric','unregister_custom_metric','register_custom_constraint','unregister_custom_constraint','list_metrics_constraints'];export const ModeRegistryFields={'intent':z['string']()['max'](0x7d0)['optional']()['describe']('Business\x20intent\x20text\x20for\x20recommend_industry\x20(e.g.\x20\x27I\x20rent\x20cameras\x20to\x20photographers\x20'+'with\x20deposit\x20and\x20damage\x20inspection\x27).\x20Falls\x20back\x20to\x20project_description\x20/\x20project_name\x20when\x20omitted.'),'strategy':z['union']([z['string']()['max'](0x7d0),z['array'](z['string']()['max'](0x7d0))['max'](0xa)])['optional']()['describe']('Persona\x20strategy\x20statement(s)\x20for\x20recommend_industry\x20(e.g.\x20\x27push\x20sales\x20volume\x20first\x27\x20/\x20'+'\x27keep\x20gross\x20margin\x20>=\x2030%\x27).\x20Bridged\x20into\x20mode\x20ranking:\x20objectives\x20resolve\x20to\x20deterministic\x20'+'infrastructure\x20levers\x20(discount\x20/\x20reward\x20/\x20buy_guard\x20/\x20machine_design)\x20and\x20re-rank\x20the\x20'+'industry\x20recommendations\x20by\x20lever\x20alignment.\x20Pass\x20the\x20persona\x27s\x20strategy[]\x20entries\x20here.'),'semantic_ir':SemanticIRInputSchema['optional']()['describe']('Canonical\x20Semantic\x20IR\x20for\x20recommend_industry,\x20produced\x20by\x20the\x20CALLING\x20agent\x20(this\x20server\x20runs\x20no\x20LLM).\x20'+'Use\x20it\x20when\x20the\x20intent\x20is\x20not\x20English,\x20or\x20is\x20phrased\x20outside\x20the\x20English\x20keyword\x20lexicon:\x20translate\x20the\x20'+'business\x20description\x20into\x20this\x20fixed\x20shape\x20and\x20let\x20the\x20server\x20decide.\x20The\x20server\x20validates\x20the\x20IR,\x20merges\x20'+'it\x20with\x20keyword\x20inference\x20(IR\x20evidence\x20wins\x20conflicts,\x20keywords\x20remain\x20the\x20fallback)\x20and\x20echoes\x20the\x20'+'canonical\x20artifact\x20+\x20sha256\x20digest\x20for\x20freeze/replay.\x20'+'Shape:\x20{schema_version:\x201,\x20locale:\x20\x27<BCP-47>\x27,\x20traits:\x20[{trait,\x20value,\x20confidence:\x200..1,\x20span?:\x20{start,end},\x20quote?}],\x20'+'domains:\x20[{domain,\x20confidence?}],\x20claims:\x20[{key,\x20value,\x20confidence?}],\x20'+'provenance:\x20{source:\x20\x27caller_llm\x27,\x20model?,\x20prompt_version?}}.\x20'+'traits\x20vocabulary\x20(10\x20dimensions):\x20has_logistics,\x20communication_heavy,\x20pure_digital,\x20long_cycle,\x20'+'deposit_required,\x20multi_tier_allocation\x20(boolean);\x20regulatory_intensity,\x20trust_sensitivity\x20'+'(low|medium|high);\x20consumption_frequency\x20(one_time|occasional|frequent);\x20avg_ticket_size\x20'+'(micro|small|medium|large).\x20domains\x20vocabulary:\x20travel_accommodation.\x20claims\x20vocabulary:\x20reward_pool_amount.\x20'+'Rules:\x20emit\x20evidence\x20only\x20(no\x20free-form\x20prose),\x20one\x20entry\x20per\x20dimension,\x20confidence\x20below\x200.5\x20is\x20'+'recorded\x20but\x20not\x20applied,\x20unknown\x20traits/domains/values\x20are\x20dropped\x20and\x20reported\x20in\x20semantic_ir_issues.'),'mode_source':z['string']()['optional']()['describe']('Source\x20builtin\x20mode\x20name\x20for\x20derive_user_mode\x20(e.g.\x20\x27freelance\x27).\x20Call\x20list_modes\x20to\x20see\x20available\x20modes.'),'mode_name':z['string']()['max'](0x64)['optional']()['describe']('Mode\x20name\x20for\x20derive_user_mode\x20(new\x20mode\x20name),\x20evolve_user_mode\x20/\x20unregister_user_mode\x20(existing\x20'+'custom\x20mode),\x20register_user_mode\x20(new\x20mode\x20name).\x20Must\x20NOT\x20conflict\x20with\x20builtin\x20mode\x20names.'),'mode_display_name':z['string']()['max'](0xc8)['optional']()['describe']('Display\x20name\x20for\x20derive_user_mode\x20/\x20register_user_mode.\x20Defaults\x20to\x20mode_name.'),'mode_changes':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Mode\x20field\x20overrides\x20for\x20derive_user_mode\x20/\x20evolve_user_mode\x20/\x20register_user_mode.\x20'+'For\x20register_user_mode,\x20REQUIRED\x20fields:\x20machine_shape\x20(non-empty\x20array\x20of\x20{name,\x20role})\x20and\x20key_risk\x20(string).\x20'+'Common\x20overrides:\x20machine_shape\x20(array\x20of\x20{name:string,\x20role:string}),\x20config_overrides\x20(per-object\x20config),\x20'+'allocator,\x20guards,\x20build_notes,\x20risk_appetite.\x20'+'R-M1-11\x20ENFORCED:\x20machine_shape\x20node\x20names\x20must\x20NOT\x20contain\x20dispute/refund/arb\x20terms.'),'mode_change_description':z['string']()['max'](0x1f4)['optional']()['describe']('Change\x20description\x20for\x20evolve_user_mode\x20(recorded\x20in\x20evolution\x20history).'),'mode_bump_version':z['boolean']()['optional']()['describe']('Whether\x20evolve_user_mode\x20bumps\x20the\x20patch\x20version\x20(default\x20true:\x20v1.0\x20→\x20v1.1).'),'metric_id':z['string']()['max'](0x64)['optional']()['describe']('Unique\x20metric\x20ID\x20for\x20register_custom_metric\x20(e.g.\x20\x27seasonality_risk\x27).'),'metric_display_name':z['string']()['max'](0xc8)['optional']()['describe']('Display\x20name\x20for\x20register_custom_metric.'),'metric_description':z['string']()['max'](0x3e8)['optional']()['describe']('Description\x20for\x20register_custom_metric.'),'metric_type':z['enum'](['risk','benefit'])['optional']()['describe']('Metric\x20type\x20for\x20register_custom_metric:\x20\x27risk\x27\x20(negative)\x20or\x20\x27benefit\x27\x20(positive).'),'metric_scale':z['enum'](['level','numeric','percentage'])['optional']()['describe']('Metric\x20scale\x20for\x20register_custom_metric:\x20\x27level\x27\x20(high/medium/low),\x20\x27numeric\x27,\x20or\x20\x27percentage\x27.'),'metric_weight':z['number']()['min'](0x0)['max'](0xa)['optional']()['describe']('Metric\x20weight\x20for\x20register_custom_metric\x20(default\x201.0).'),'constraint_id':z['string']()['max'](0x64)['optional']()['describe']('Unique\x20constraint\x20ID\x20for\x20register_custom_constraint.'),'constraint_display_name':z['string']()['max'](0xc8)['optional']()['describe']('Display\x20name\x20for\x20register_custom_constraint.'),'constraint_description':z['string']()['max'](0x3e8)['optional']()['describe']('Description\x20for\x20register_custom_constraint.'),'constraint_rule':z['discriminatedUnion']('type',[z['object']({'type':z['literal']('capability_required'),'capability_id':z['string']()})['strict'](),z['object']({'type':z['literal']('capability_forbidden'),'capability_id':z['string']()})['strict'](),z['object']({'type':z['literal']('numeric_limit'),'field':z['string'](),'max':z['number']()['optional'](),'min':z['number']()['optional']()})['strict'](),z['object']({'type':z['literal']('condition_required'),'condition':z['string'](),'ai_evaluated':z['literal'](!![])})['strict']()])['optional']()['describe']('Constraint\x20rule\x20for\x20register_custom_constraint.\x204\x20types:\x20'+'capability_required/capability_forbidden\x20(capability_id),\x20numeric_limit\x20(field\x20+\x20max/min),\x20'+'condition_required\x20(natural-language\x20condition,\x20AI-evaluated).'),'constraint_severity':z['enum'](['hard','soft'])['optional']()['describe']('Constraint\x20severity\x20for\x20register_custom_constraint:\x20\x27hard\x27\x20blocks\x20applyTemplate\x20on\x20violation;\x20\x27soft\x27\x20only\x20warns\x20(default\x20\x27soft\x27).'),'constraint_on_violation':z['enum'](['block','warn','log'])['optional']()['describe']('Violation\x20action\x20for\x20register_custom_constraint\x20(default\x20\x27warn\x27).'),'metric_type_filter':z['enum'](['risk','benefit'])['optional']()['describe']('Filter\x20list_metrics_constraints\x20by\x20metric\x20type.'),'scope_filter':z['enum'](['builtin','custom'])['optional']()['describe']('Filter\x20list_metrics_constraints\x20by\x20scope\x20(builtin\x20or\x20custom).')};const RecommendedIndustryItemSchema=z['object']({'industry':z['string']()['describe']('Recommended\x20builtin\x20industry\x20mode\x20name.'),'similarity':z['number']()['describe']('Trait\x20similarity\x200-1\x20(graded\x2010-dim\x20trait\x20distance;\x20dimensions\x20without\x20inference\x20evidence\x20score\x20neutral\x200.5).'),'trait_distance':z['number']()['optional']()['describe']('Graded\x20trait\x20distance\x200-1\x20(1\x20-\x20similarity).'),'matched_traits':z['array'](z['string']())['describe']('Trait\x20dimensions\x20the\x20inference\x20EVIDENCED\x20and\x20that\x20match\x20this\x20industry\x20exactly.'),'contradicted_traits':z['array'](z['string']())['optional']()['describe']('Trait\x20dimensions\x20the\x20inference\x20evidenced\x20and\x20that\x20DIVERGE\x20from\x20this\x20industry\x20(graded).'),'evidenced_traits':z['array'](z['string']())['optional']()['describe']('Trait\x20dimensions\x20the\x20inference\x20actually\x20had\x20keyword\x20evidence\x20for\x20(the\x20ones\x20similarity\x20is\x20graded\x20against).'),'domain_prior':z['boolean']()['optional']()['describe']('True\x20when\x20domain\x20vocabulary\x20(not\x20traits)\x20contributed\x20to\x20this\x20industry\x27s\x20score/rank.'),'requirement_support':z['number']()['optional']()['describe']('0-1\x20support\x20of\x20the\x20industry\x27s\x20required\x20traits\x20by\x20the\x20inference\x20(1\x20=\x20all\x20evidenced\x20and\x20satisfied).'),'location_sensitivity':z['enum'](['strict','near','logistics'])['describe']('How\x20location\x20gates\x20the\x20service\x20(K3\x2010\x20§5\x20D3):\x20\x27strict\x27\x20=\x20in-person/local\x20service,\x20'+'Service.location\x20MUST\x20match\x20the\x20demand\x20area;\x20\x27near\x27\x20=\x20digital/global\x20service,\x20location\x20is\x20'+'a\x20service\x20region;\x20\x27logistics\x27\x20=\x20physical\x20shipping,\x20location\x20is\x20a\x20delivery\x20region.\x20'+'Non-logistics\x20services\x20MUST\x20set\x20a\x20correct\x20Service.location\x20before\x20publish.'),'trust_selling_points':z['array'](z['string']())['describe']('Trust\x20selling\x20points\x20to\x20emphasize\x20in\x20the\x20service\x20description\x20(expert\x20description-guidance).'),'build_notes':z['array'](z['string']())['describe']('Build\x20notes\x20/\x20caveats\x20the\x20description\x20should\x20preempt\x20(expert\x20description-guidance).'),'strategy_alignment':z['object']({'score':z['number']()['describe']('Lever\x20alignment\x200-1\x20(matched\x20/\x20required\x20levers).'),'matched_levers':z['array'](z['enum'](['discount','reward','buy_guard','machine_design']))['describe']('Required\x20levers\x20this\x20mode\x20supports.'),'missing_levers':z['array'](z['enum'](['discount','reward','buy_guard','machine_design']))['describe']('Required\x20levers\x20this\x20mode\x20lacks.')})['optional']()['describe']('Present\x20only\x20when\x20a\x20strategy\x20was\x20provided:\x20lever\x20alignment\x20of\x20the\x20industry\x20mode.')})['strict']();export const RecommendIndustryResultSchema=z['object']({'action':z['literal']('recommend_industry'),'intent':z['string']()['describe']('The\x20intent\x20text\x20used\x20for\x20inference.'),'inferred_traits':z['record'](z['string'](),z['unknown']())['describe']('10-dim\x20industry\x20traits\x20inferred\x20from\x20intent.'),'inference_confidence':z['number']()['describe']('Inference\x20confidence\x200-1\x20(evidenced\x20trait\x20count\x20/\x2010;\x20IR\x20evidence\x20counts\x20when\x20supplied).'),'inference_source':z['enum'](['keywords','semantic_ir','semantic_ir+keywords'])['describe']('Which\x20layer\x20produced\x20the\x20trait\x20evidence:\x20\x27keywords\x27\x20=\x20English\x20lexicon\x20only;\x20\x27semantic_ir\x27\x20=\x20'+'caller-supplied\x20IR\x20only;\x20\x27semantic_ir+keywords\x27\x20=\x20both\x20(IR\x20won\x20any\x20conflict).'),'matched_keywords':z['array'](z['string']())['describe']('Keywords\x20from\x20the\x20intent\x20text\x20that\x20triggered\x20trait\x20inference\x20(English\x20canonical\x20lexicon).'),'semantic_ir':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Canonical\x20IR\x20artifact\x20echoed\x20back\x20for\x20freeze/replay\x20(present\x20only\x20when\x20semantic_ir\x20was\x20supplied).'),'semantic_ir_digest':z['string']()['optional']()['describe']('sha256\x20of\x20the\x20canonical\x20IR\x20artifact;\x20identical\x20claims\x20in\x20any\x20array\x20order\x20yield\x20the\x20same\x20digest.'),'semantic_ir_issues':z['array'](z['string']())['optional']()['describe']('IR\x20claims\x20dropped/clamped/conflicting\x20during\x20validation\x20(unknown\x20vocabulary,\x20inverted\x20span,\x20sub-threshold\x20confidence).'),'semantic_ir_conflicts':z['array'](z['object']({'trait':z['string'](),'keyword_value':z['union']([z['boolean'](),z['string']()]),'keyword_confidence':z['number'](),'ir_value':z['union']([z['boolean'](),z['string']()]),'ir_confidence':z['number']()})['strict']())['optional']()['describe']('Dimensions\x20where\x20the\x20keyword\x20lexicon\x20and\x20the\x20IR\x20disagreed;\x20the\x20IR\x20value\x20was\x20applied.'),'domain_priors':z['array'](z['object']({'domain':z['string'](),'matched_keywords':z['array'](z['string']()),'industries':z['array'](z['string']()),'boost':z['number'](),'source':z['enum'](['keyword','semantic_ir','both'])['optional']()['describe']('Which\x20layer\x20produced\x20the\x20prior;\x20\x27both\x27\x20means\x20keyword\x20and\x20IR\x20agreed.')})['strict']())['optional']()['describe']('Domain\x20vocabulary\x20matches\x20that\x20boosted\x20the\x20named\x20industries\x20(domain\x20evidence,\x20not\x20a\x20trait\x20claim).'),'excluded_by_consistency':z['array'](z['object']({'industry':z['string'](),'contradicted_requirements':z['array'](z['string']())})['strict']())['optional']()['describe']('Industry\x20modes\x20dropped\x20because\x20their\x20REQUIRED\x20traits\x20contradict\x20the\x20inferred\x20traits.'),'strategy_intents':z['array'](z['object']({'objective':z['enum'](['sales_priority','profit_priority','buyer_screening','gross_margin_control']),'metrics':z['array'](z['string']()),'levers':z['array'](z['enum'](['discount','reward','buy_guard','machine_design'])),'target':z['string']()})['strict']())['describe']('Strategy\x20intents\x20resolved\x20from\x20the\x20provided\x20persona\x20strategy\x20statements;\x20when\x20none\x20were\x20provided\x20they\x20are\x20derived\x20from\x20the\x20inferred\x20traits.'),'lever_suggestions':z['array'](z['object']({'lever':z['enum'](['discount','reward','buy_guard','machine_design']),'objective':z['enum'](['sales_priority','profit_priority','buyer_screening','gross_margin_control']),'action':z['string']()['describe']('Deterministic\x20on-chain\x20action\x20that\x20pulls\x20the\x20lever.'),'target':z['string']()})['strict']())['describe']('Concrete\x20lever\x20suggestions\x20for\x20the\x20resolved\x20strategy\x20intents.'),'recommendations':z['array'](RecommendedIndustryItemSchema)['describe']('Top-3\x20similar\x20industries\x20(re-ranked\x20by\x20lever\x20alignment\x20when\x20strategy\x20provided).'),'hint':z['string']()['describe']('How\x20to\x20apply\x20the\x20recommendation\x20(pass\x20the\x20industry\x20to\x20analyze_intent\x20/\x20merchant_guide\x20via\x20project_industry).')})['strict']();const ModeSummarySchema=z['object']({'name':z['string'](),'display_name':z['string'](),'version':z['string'](),'derived_from':z['string']()['nullable']()['describe']('Source\x20builtin\x20mode\x20(derive_user_mode)\x20or\x20null.'),'owner':z['string']()['optional']()['describe']('Mode\x20owner\x20(custom\x20modes\x20only).'),'key_risk':z['string'](),'machine_nodes':z['array'](z['string']())['describe']('Machine\x20shape\x20node\x20names.'),'location_sensitivity':z['enum'](['strict','near','logistics'])['describe']('Location\x20gate\x20for\x20this\x20mode:\x20\x27strict\x27\x20(in-person,\x20must\x20match\x20service\x20area),\x20'+'\x27near\x27\x20(digital/global,\x20service\x20region),\x20\x27logistics\x27\x20(shipping,\x20delivery\x20region).'),'trust_selling_points':z['array'](z['string']())['describe']('Trust\x20selling\x20points\x20to\x20emphasize\x20in\x20the\x20service\x20description\x20(expert\x20description-guidance).'),'build_notes':z['array'](z['string']())['describe']('Build\x20notes\x20/\x20caveats\x20the\x20description\x20should\x20preempt\x20(expert\x20description-guidance).'),'similar_industries':z['array'](z['string']())['optional'](),'evolution_history':z['array'](z['object']({'version':z['string'](),'changed_at':z['number'](),'changes':z['array'](z['string']())})['strict']())['optional']()})['strict']();export const ListModesResultSchema=z['object']({'action':z['literal']('list_modes'),'builtin_modes':z['array'](ModeSummarySchema)['describe']('Builtin\x20industry\x20modes\x20(use\x20name\x20as\x20project_industry).'),'user_modes':z['array'](ModeSummarySchema)['describe']('Caller\x27s\x20custom\x20modes\x20(derive/evolve/register).'),'owner':z['string']()['describe']('Owner\x20key\x20for\x20custom\x20modes\x20(local\x20single-user).'),'hint':z['string']()})['strict']();export const DeriveUserModeResultSchema=z['object']({'action':z['literal']('derive_user_mode'),'mode':ModeSummarySchema['describe']('The\x20derived\x20(and\x20registered)\x20custom\x20mode.'),'hint':z['string']()})['strict']();export const EvolveUserModeResultSchema=z['object']({'action':z['literal']('evolve_user_mode'),'mode':ModeSummarySchema['describe']('The\x20evolved\x20custom\x20mode\x20(version\x20bumped).'),'hint':z['string']()})['strict']();export const RegisterUserModeResultSchema=z['object']({'action':z['literal']('register_user_mode'),'mode':ModeSummarySchema['describe']('The\x20registered\x20fully-custom\x20mode.'),'hint':z['string']()})['strict']();export const UnregisterUserModeResultSchema=z['object']({'action':z['literal']('unregister_user_mode'),'removed':z['literal'](!![]),'mode_name':z['string']()})['strict']();const MetricInfoSchema=z['object']({'metric_id':z['string'](),'display_name':z['string'](),'description':z['string'](),'type':z['enum'](['risk','benefit']),'scale':z['enum'](['level','numeric','percentage']),'weight':z['number'](),'scope':z['enum'](['builtin','custom']),'owner':z['string']()['optional']()})['strict']();export const RegisterCustomMetricResultSchema=z['object']({'action':z['literal']('register_custom_metric'),'metric':MetricInfoSchema['describe']('The\x20registered\x20custom\x20metric\x20(globally\x20effective).'),'hint':z['string']()})['strict']();export const UnregisterCustomMetricResultSchema=z['object']({'action':z['literal']('unregister_custom_metric'),'removed':z['literal'](!![]),'metric_id':z['string']()})['strict']();const ConstraintInfoSchema=z['object']({'constraint_id':z['string'](),'display_name':z['string'](),'description':z['string'](),'rule':z['record'](z['string'](),z['unknown']())['describe']('Constraint\x20rule\x20(4\x20types\x20—\x20see\x20constraint_rule\x20input).'),'severity':z['enum'](['hard','soft']),'on_violation':z['enum'](['block','warn','log']),'scope':z['enum'](['builtin','custom']),'owner':z['string']()['optional']()})['strict']();export const RegisterCustomConstraintResultSchema=z['object']({'action':z['literal']('register_custom_constraint'),'constraint':ConstraintInfoSchema['describe']('The\x20registered\x20custom\x20constraint.'),'hint':z['string']()})['strict']();export const UnregisterCustomConstraintResultSchema=z['object']({'action':z['literal']('unregister_custom_constraint'),'removed':z['literal'](!![]),'constraint_id':z['string']()})['strict']();export const ListMetricsConstraintsResultSchema=z['object']({'action':z['literal']('list_metrics_constraints'),'metrics':z['array'](MetricInfoSchema),'constraints':z['array'](ConstraintInfoSchema),'hint':z['string']()})['strict']();
1
+ import{z}from'zod';import{SemanticIRInputSchema}from'../../knowledge/semantic-ir.js';export const MODE_REGISTRY_ACTIONS=['recommend_industry','list_modes','derive_user_mode','evolve_user_mode','register_user_mode','unregister_user_mode','register_custom_metric','unregister_custom_metric','register_custom_constraint','unregister_custom_constraint','list_metrics_constraints'];export const ModeRegistryFields={'intent':z['string']()['max'](0x7d0)['optional']()['describe']('Business\x20intent\x20text\x20for\x20recommend_industry\x20(e.g.\x20\x27I\x20rent\x20cameras\x20to\x20photographers\x20'+'with\x20deposit\x20and\x20damage\x20inspection\x27).\x20Falls\x20back\x20to\x20project_description\x20/\x20project_name\x20when\x20omitted.'),'strategy':z['union']([z['string']()['max'](0x7d0),z['array'](z['string']()['max'](0x7d0))['max'](0xa)])['optional']()['describe']('Persona\x20strategy\x20statement(s)\x20for\x20recommend_industry\x20(e.g.\x20\x27push\x20sales\x20volume\x20first\x27\x20/\x20'+'\x27keep\x20gross\x20margin\x20>=\x2030%\x27).\x20Bridged\x20into\x20mode\x20ranking:\x20objectives\x20resolve\x20to\x20deterministic\x20'+'infrastructure\x20levers\x20(discount\x20/\x20reward\x20/\x20buy_guard\x20/\x20machine_design)\x20and\x20re-rank\x20the\x20'+'industry\x20recommendations\x20by\x20lever\x20alignment.\x20Pass\x20the\x20persona\x27s\x20strategy[]\x20entries\x20here.'),'semantic_ir':SemanticIRInputSchema['optional']()['describe']('Canonical\x20Semantic\x20IR\x20for\x20recommend_industry,\x20produced\x20by\x20the\x20CALLING\x20agent\x20(this\x20server\x20runs\x20no\x20LLM).\x20'+'Use\x20it\x20when\x20the\x20intent\x20is\x20not\x20English,\x20or\x20is\x20phrased\x20outside\x20the\x20English\x20keyword\x20lexicon:\x20translate\x20the\x20'+'business\x20description\x20into\x20this\x20fixed\x20shape\x20and\x20let\x20the\x20server\x20decide.\x20The\x20server\x20validates\x20the\x20IR,\x20merges\x20'+'it\x20with\x20keyword\x20inference\x20(IR\x20evidence\x20wins\x20conflicts,\x20keywords\x20remain\x20the\x20fallback)\x20and\x20echoes\x20the\x20'+'canonical\x20artifact\x20+\x20sha256\x20digest\x20for\x20freeze/replay.\x20'+'Shape:\x20{schema_version:\x202\x20(1\x20still\x20accepted),\x20locale:\x20\x27<BCP-47>\x27,\x20traits:\x20[{trait,\x20value,\x20confidence:\x200..1,\x20span?:\x20{start,end},\x20quote?}],\x20'+'domains:\x20[{domain,\x20confidence?}],\x20claims:\x20[{key,\x20value,\x20confidence?}],\x20'+'discovery:\x20{industry?,\x20tags?:\x20string[],\x20product_ref?,\x20english_summary?,\x20confidence?},\x20'+'provenance:\x20{source:\x20\x27caller_llm\x27,\x20model?,\x20prompt_version?}}.\x20'+'traits\x20vocabulary\x20(10\x20dimensions):\x20has_logistics,\x20communication_heavy,\x20pure_digital,\x20long_cycle,\x20'+'deposit_required,\x20multi_tier_allocation\x20(boolean);\x20regulatory_intensity,\x20trust_sensitivity\x20'+'(low|medium|high);\x20consumption_frequency\x20(one_time|occasional|frequent);\x20avg_ticket_size\x20'+'(micro|small|medium|large).\x20domains\x20vocabulary:\x20travel_accommodation.\x20claims\x20vocabulary:\x20reward_pool_amount.\x20'+'discovery\x20is\x20the\x20language-neutral\x20business-model\x20layer:\x20tags\x20use\x20the\x20CLOSED\x20vocabulary\x20returned\x20by\x20'+'template_list.discovery_vocabulary\x20(canonical\x20English\x20tokens,\x20never\x20locale\x20words),\x20industry\x20is\x20a\x20registered\x20'+'industry\x20name,\x20product_ref\x20is\x20a\x20benchmark-product\x20slug,\x20and\x20english_summary\x20is\x20a\x20translation\x20aid\x20used\x20only\x20for\x20'+'keyword\x20fallback.\x20An\x20applied\x20discovery.industry\x20ranks\x20that\x20industry\x20with\x20a\x20domain-prior\x20boost.\x20'+'Rules:\x20emit\x20evidence\x20only\x20(no\x20free-form\x20prose),\x20one\x20entry\x20per\x20dimension,\x20copy\x20spans/quotes\x20VERBATIM\x20from\x20the\x20'+'intent\x20(unlocatable\x20evidence\x20is\x20dropped\x20and\x20reported),\x20confidence\x20below\x200.5\x20is\x20recorded\x20but\x20not\x20applied,\x20and\x20'+'unknown\x20traits/domains/tags/industries/product_refs\x20are\x20dropped\x20and\x20reported\x20in\x20semantic_ir_issues.'),'mode_source':z['string']()['optional']()['describe']('Source\x20builtin\x20mode\x20name\x20for\x20derive_user_mode\x20(e.g.\x20\x27freelance\x27).\x20Call\x20list_modes\x20to\x20see\x20available\x20modes.'),'mode_name':z['string']()['max'](0x64)['optional']()['describe']('Mode\x20name\x20for\x20derive_user_mode\x20(new\x20mode\x20name),\x20evolve_user_mode\x20/\x20unregister_user_mode\x20(existing\x20'+'custom\x20mode),\x20register_user_mode\x20(new\x20mode\x20name).\x20Must\x20NOT\x20conflict\x20with\x20builtin\x20mode\x20names.'),'mode_display_name':z['string']()['max'](0xc8)['optional']()['describe']('Display\x20name\x20for\x20derive_user_mode\x20/\x20register_user_mode.\x20Defaults\x20to\x20mode_name.'),'mode_changes':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Mode\x20field\x20overrides\x20for\x20derive_user_mode\x20/\x20evolve_user_mode\x20/\x20register_user_mode.\x20'+'For\x20register_user_mode,\x20REQUIRED\x20fields:\x20machine_shape\x20(non-empty\x20array\x20of\x20{name,\x20role})\x20and\x20key_risk\x20(string).\x20'+'Common\x20overrides:\x20machine_shape\x20(array\x20of\x20{name:string,\x20role:string}),\x20config_overrides\x20(per-object\x20config),\x20'+'allocator,\x20guards,\x20build_notes,\x20risk_appetite.\x20'+'R-M1-11\x20ENFORCED:\x20machine_shape\x20node\x20names\x20must\x20NOT\x20contain\x20dispute/refund/arb\x20terms.'),'mode_change_description':z['string']()['max'](0x1f4)['optional']()['describe']('Change\x20description\x20for\x20evolve_user_mode\x20(recorded\x20in\x20evolution\x20history).'),'mode_bump_version':z['boolean']()['optional']()['describe']('Whether\x20evolve_user_mode\x20bumps\x20the\x20patch\x20version\x20(default\x20true:\x20v1.0\x20→\x20v1.1).'),'metric_id':z['string']()['max'](0x64)['optional']()['describe']('Unique\x20metric\x20ID\x20for\x20register_custom_metric\x20(e.g.\x20\x27seasonality_risk\x27).'),'metric_display_name':z['string']()['max'](0xc8)['optional']()['describe']('Display\x20name\x20for\x20register_custom_metric.'),'metric_description':z['string']()['max'](0x3e8)['optional']()['describe']('Description\x20for\x20register_custom_metric.'),'metric_type':z['enum'](['risk','benefit'])['optional']()['describe']('Metric\x20type\x20for\x20register_custom_metric:\x20\x27risk\x27\x20(negative)\x20or\x20\x27benefit\x27\x20(positive).'),'metric_scale':z['enum'](['level','numeric','percentage'])['optional']()['describe']('Metric\x20scale\x20for\x20register_custom_metric:\x20\x27level\x27\x20(high/medium/low),\x20\x27numeric\x27,\x20or\x20\x27percentage\x27.'),'metric_weight':z['number']()['min'](0x0)['max'](0xa)['optional']()['describe']('Metric\x20weight\x20for\x20register_custom_metric\x20(default\x201.0).'),'constraint_id':z['string']()['max'](0x64)['optional']()['describe']('Unique\x20constraint\x20ID\x20for\x20register_custom_constraint.'),'constraint_display_name':z['string']()['max'](0xc8)['optional']()['describe']('Display\x20name\x20for\x20register_custom_constraint.'),'constraint_description':z['string']()['max'](0x3e8)['optional']()['describe']('Description\x20for\x20register_custom_constraint.'),'constraint_rule':z['discriminatedUnion']('type',[z['object']({'type':z['literal']('capability_required'),'capability_id':z['string']()})['strict'](),z['object']({'type':z['literal']('capability_forbidden'),'capability_id':z['string']()})['strict'](),z['object']({'type':z['literal']('numeric_limit'),'field':z['string'](),'max':z['number']()['optional'](),'min':z['number']()['optional']()})['strict'](),z['object']({'type':z['literal']('condition_required'),'condition':z['string'](),'ai_evaluated':z['literal'](!![])})['strict']()])['optional']()['describe']('Constraint\x20rule\x20for\x20register_custom_constraint.\x204\x20types:\x20'+'capability_required/capability_forbidden\x20(capability_id),\x20numeric_limit\x20(field\x20+\x20max/min),\x20'+'condition_required\x20(natural-language\x20condition,\x20AI-evaluated).'),'constraint_severity':z['enum'](['hard','soft'])['optional']()['describe']('Constraint\x20severity\x20for\x20register_custom_constraint:\x20\x27hard\x27\x20blocks\x20applyTemplate\x20on\x20violation;\x20\x27soft\x27\x20only\x20warns\x20(default\x20\x27soft\x27).'),'constraint_on_violation':z['enum'](['block','warn','log'])['optional']()['describe']('Violation\x20action\x20for\x20register_custom_constraint\x20(default\x20\x27warn\x27).'),'metric_type_filter':z['enum'](['risk','benefit'])['optional']()['describe']('Filter\x20list_metrics_constraints\x20by\x20metric\x20type.'),'scope_filter':z['enum'](['builtin','custom'])['optional']()['describe']('Filter\x20list_metrics_constraints\x20by\x20scope\x20(builtin\x20or\x20custom).')};const RecommendedIndustryItemSchema=z['object']({'industry':z['string']()['describe']('Recommended\x20builtin\x20industry\x20mode\x20name.'),'similarity':z['number']()['describe']('Trait\x20similarity\x200-1\x20(graded\x2010-dim\x20trait\x20distance;\x20dimensions\x20without\x20inference\x20evidence\x20score\x20neutral\x200.5).'),'trait_distance':z['number']()['optional']()['describe']('Graded\x20trait\x20distance\x200-1\x20(1\x20-\x20similarity).'),'matched_traits':z['array'](z['string']())['describe']('Trait\x20dimensions\x20the\x20inference\x20EVIDENCED\x20and\x20that\x20match\x20this\x20industry\x20exactly.'),'contradicted_traits':z['array'](z['string']())['optional']()['describe']('Trait\x20dimensions\x20the\x20inference\x20evidenced\x20and\x20that\x20DIVERGE\x20from\x20this\x20industry\x20(graded).'),'evidenced_traits':z['array'](z['string']())['optional']()['describe']('Trait\x20dimensions\x20the\x20inference\x20actually\x20had\x20keyword\x20evidence\x20for\x20(the\x20ones\x20similarity\x20is\x20graded\x20against).'),'domain_prior':z['boolean']()['optional']()['describe']('True\x20when\x20domain\x20vocabulary\x20(not\x20traits)\x20contributed\x20to\x20this\x20industry\x27s\x20score/rank.'),'ir_industry_match':z['boolean']()['optional']()['describe']('True\x20when\x20the\x20Semantic\x20IR\x27s\x20discovery.industry\x20named\x20this\x20industry\x20(a\x20ranking\x20prior\x20was\x20applied).'),'requirement_support':z['number']()['optional']()['describe']('0-1\x20support\x20of\x20the\x20industry\x27s\x20required\x20traits\x20by\x20the\x20inference\x20(1\x20=\x20all\x20evidenced\x20and\x20satisfied).'),'location_sensitivity':z['enum'](['strict','near','logistics'])['describe']('How\x20location\x20gates\x20the\x20service\x20(K3\x2010\x20§5\x20D3):\x20\x27strict\x27\x20=\x20in-person/local\x20service,\x20'+'Service.location\x20MUST\x20match\x20the\x20demand\x20area;\x20\x27near\x27\x20=\x20digital/global\x20service,\x20location\x20is\x20'+'a\x20service\x20region;\x20\x27logistics\x27\x20=\x20physical\x20shipping,\x20location\x20is\x20a\x20delivery\x20region.\x20'+'Non-logistics\x20services\x20MUST\x20set\x20a\x20correct\x20Service.location\x20before\x20publish.'),'trust_selling_points':z['array'](z['string']())['describe']('Trust\x20selling\x20points\x20to\x20emphasize\x20in\x20the\x20service\x20description\x20(expert\x20description-guidance).'),'build_notes':z['array'](z['string']())['describe']('Build\x20notes\x20/\x20caveats\x20the\x20description\x20should\x20preempt\x20(expert\x20description-guidance).'),'strategy_alignment':z['object']({'score':z['number']()['describe']('Lever\x20alignment\x200-1\x20(matched\x20/\x20required\x20levers).'),'matched_levers':z['array'](z['enum'](['discount','reward','buy_guard','machine_design']))['describe']('Required\x20levers\x20this\x20mode\x20supports.'),'missing_levers':z['array'](z['enum'](['discount','reward','buy_guard','machine_design']))['describe']('Required\x20levers\x20this\x20mode\x20lacks.')})['optional']()['describe']('Present\x20only\x20when\x20a\x20strategy\x20was\x20provided:\x20lever\x20alignment\x20of\x20the\x20industry\x20mode.')})['strict']();export const RecommendIndustryResultSchema=z['object']({'action':z['literal']('recommend_industry'),'intent':z['string']()['describe']('The\x20intent\x20text\x20used\x20for\x20inference.'),'inferred_traits':z['record'](z['string'](),z['unknown']())['describe']('10-dim\x20industry\x20traits\x20inferred\x20from\x20intent.'),'inference_confidence':z['number']()['describe']('Inference\x20confidence\x200-1\x20(evidenced\x20trait\x20count\x20/\x2010;\x20IR\x20evidence\x20counts\x20when\x20supplied).'),'inference_source':z['enum'](['keywords','semantic_ir','semantic_ir+keywords'])['describe']('Which\x20layer\x20produced\x20the\x20trait\x20evidence:\x20\x27keywords\x27\x20=\x20English\x20lexicon\x20only;\x20\x27semantic_ir\x27\x20=\x20'+'caller-supplied\x20IR\x20only;\x20\x27semantic_ir+keywords\x27\x20=\x20both\x20(IR\x20won\x20any\x20conflict).'),'matched_keywords':z['array'](z['string']())['describe']('Keywords\x20from\x20the\x20intent\x20text\x20that\x20triggered\x20trait\x20inference\x20(English\x20canonical\x20lexicon).'),'semantic_ir':z['record'](z['string'](),z['unknown']())['optional']()['describe']('Canonical\x20IR\x20artifact\x20echoed\x20back\x20for\x20freeze/replay\x20(present\x20only\x20when\x20semantic_ir\x20was\x20supplied).'),'semantic_ir_digest':z['string']()['optional']()['describe']('sha256\x20of\x20the\x20canonical\x20IR\x20artifact;\x20identical\x20claims\x20in\x20any\x20array\x20order\x20yield\x20the\x20same\x20digest.'),'semantic_ir_issues':z['array'](z['string']())['optional']()['describe']('IR\x20claims\x20dropped/clamped/conflicting\x20during\x20validation\x20(unknown\x20vocabulary,\x20inverted\x20span,\x20sub-threshold\x20confidence).'),'semantic_ir_conflicts':z['array'](z['object']({'trait':z['string'](),'keyword_value':z['union']([z['boolean'](),z['string']()]),'keyword_confidence':z['number'](),'ir_value':z['union']([z['boolean'](),z['string']()]),'ir_confidence':z['number']()})['strict']())['optional']()['describe']('Dimensions\x20where\x20the\x20keyword\x20lexicon\x20and\x20the\x20IR\x20disagreed;\x20the\x20IR\x20value\x20was\x20applied.'),'domain_priors':z['array'](z['object']({'domain':z['string'](),'matched_keywords':z['array'](z['string']()),'industries':z['array'](z['string']()),'boost':z['number'](),'source':z['enum'](['keyword','semantic_ir','both'])['optional']()['describe']('Which\x20layer\x20produced\x20the\x20prior;\x20\x27both\x27\x20means\x20keyword\x20and\x20IR\x20agreed.')})['strict']())['optional']()['describe']('Domain\x20vocabulary\x20matches\x20that\x20boosted\x20the\x20named\x20industries\x20(domain\x20evidence,\x20not\x20a\x20trait\x20claim).'),'excluded_by_consistency':z['array'](z['object']({'industry':z['string'](),'contradicted_requirements':z['array'](z['string']())})['strict']())['optional']()['describe']('Industry\x20modes\x20dropped\x20because\x20their\x20REQUIRED\x20traits\x20contradict\x20the\x20inferred\x20traits.'),'strategy_intents':z['array'](z['object']({'objective':z['enum'](['sales_priority','profit_priority','buyer_screening','gross_margin_control']),'metrics':z['array'](z['string']()),'levers':z['array'](z['enum'](['discount','reward','buy_guard','machine_design'])),'target':z['string']()})['strict']())['describe']('Strategy\x20intents\x20resolved\x20from\x20the\x20provided\x20persona\x20strategy\x20statements;\x20when\x20none\x20were\x20provided\x20they\x20are\x20derived\x20from\x20the\x20inferred\x20traits.'),'lever_suggestions':z['array'](z['object']({'lever':z['enum'](['discount','reward','buy_guard','machine_design']),'objective':z['enum'](['sales_priority','profit_priority','buyer_screening','gross_margin_control']),'action':z['string']()['describe']('Deterministic\x20on-chain\x20action\x20that\x20pulls\x20the\x20lever.'),'target':z['string']()})['strict']())['describe']('Concrete\x20lever\x20suggestions\x20for\x20the\x20resolved\x20strategy\x20intents.'),'recommendations':z['array'](RecommendedIndustryItemSchema)['describe']('Top-3\x20similar\x20industries\x20(re-ranked\x20by\x20lever\x20alignment\x20when\x20strategy\x20provided).'),'hint':z['string']()['describe']('How\x20to\x20apply\x20the\x20recommendation\x20(pass\x20the\x20industry\x20to\x20analyze_intent\x20/\x20merchant_guide\x20via\x20project_industry).')})['strict']();const ModeSummarySchema=z['object']({'name':z['string'](),'display_name':z['string'](),'version':z['string'](),'derived_from':z['string']()['nullable']()['describe']('Source\x20builtin\x20mode\x20(derive_user_mode)\x20or\x20null.'),'owner':z['string']()['optional']()['describe']('Mode\x20owner\x20(custom\x20modes\x20only).'),'key_risk':z['string'](),'machine_nodes':z['array'](z['string']())['describe']('Machine\x20shape\x20node\x20names.'),'location_sensitivity':z['enum'](['strict','near','logistics'])['describe']('Location\x20gate\x20for\x20this\x20mode:\x20\x27strict\x27\x20(in-person,\x20must\x20match\x20service\x20area),\x20'+'\x27near\x27\x20(digital/global,\x20service\x20region),\x20\x27logistics\x27\x20(shipping,\x20delivery\x20region).'),'trust_selling_points':z['array'](z['string']())['describe']('Trust\x20selling\x20points\x20to\x20emphasize\x20in\x20the\x20service\x20description\x20(expert\x20description-guidance).'),'build_notes':z['array'](z['string']())['describe']('Build\x20notes\x20/\x20caveats\x20the\x20description\x20should\x20preempt\x20(expert\x20description-guidance).'),'similar_industries':z['array'](z['string']())['optional'](),'evolution_history':z['array'](z['object']({'version':z['string'](),'changed_at':z['number'](),'changes':z['array'](z['string']())})['strict']())['optional']()})['strict']();export const ListModesResultSchema=z['object']({'action':z['literal']('list_modes'),'builtin_modes':z['array'](ModeSummarySchema)['describe']('Builtin\x20industry\x20modes\x20(use\x20name\x20as\x20project_industry).'),'user_modes':z['array'](ModeSummarySchema)['describe']('Caller\x27s\x20custom\x20modes\x20(derive/evolve/register).'),'owner':z['string']()['describe']('Owner\x20key\x20for\x20custom\x20modes\x20(local\x20single-user).'),'hint':z['string']()})['strict']();export const DeriveUserModeResultSchema=z['object']({'action':z['literal']('derive_user_mode'),'mode':ModeSummarySchema['describe']('The\x20derived\x20(and\x20registered)\x20custom\x20mode.'),'hint':z['string']()})['strict']();export const EvolveUserModeResultSchema=z['object']({'action':z['literal']('evolve_user_mode'),'mode':ModeSummarySchema['describe']('The\x20evolved\x20custom\x20mode\x20(version\x20bumped).'),'hint':z['string']()})['strict']();export const RegisterUserModeResultSchema=z['object']({'action':z['literal']('register_user_mode'),'mode':ModeSummarySchema['describe']('The\x20registered\x20fully-custom\x20mode.'),'hint':z['string']()})['strict']();export const UnregisterUserModeResultSchema=z['object']({'action':z['literal']('unregister_user_mode'),'removed':z['literal'](!![]),'mode_name':z['string']()})['strict']();const MetricInfoSchema=z['object']({'metric_id':z['string'](),'display_name':z['string'](),'description':z['string'](),'type':z['enum'](['risk','benefit']),'scale':z['enum'](['level','numeric','percentage']),'weight':z['number'](),'scope':z['enum'](['builtin','custom']),'owner':z['string']()['optional']()})['strict']();export const RegisterCustomMetricResultSchema=z['object']({'action':z['literal']('register_custom_metric'),'metric':MetricInfoSchema['describe']('The\x20registered\x20custom\x20metric\x20(globally\x20effective).'),'hint':z['string']()})['strict']();export const UnregisterCustomMetricResultSchema=z['object']({'action':z['literal']('unregister_custom_metric'),'removed':z['literal'](!![]),'metric_id':z['string']()})['strict']();const ConstraintInfoSchema=z['object']({'constraint_id':z['string'](),'display_name':z['string'](),'description':z['string'](),'rule':z['record'](z['string'](),z['unknown']())['describe']('Constraint\x20rule\x20(4\x20types\x20—\x20see\x20constraint_rule\x20input).'),'severity':z['enum'](['hard','soft']),'on_violation':z['enum'](['block','warn','log']),'scope':z['enum'](['builtin','custom']),'owner':z['string']()['optional']()})['strict']();export const RegisterCustomConstraintResultSchema=z['object']({'action':z['literal']('register_custom_constraint'),'constraint':ConstraintInfoSchema['describe']('The\x20registered\x20custom\x20constraint.'),'hint':z['string']()})['strict']();export const UnregisterCustomConstraintResultSchema=z['object']({'action':z['literal']('unregister_custom_constraint'),'removed':z['literal'](!![]),'constraint_id':z['string']()})['strict']();export const ListMetricsConstraintsResultSchema=z['object']({'action':z['literal']('list_metrics_constraints'),'metrics':z['array'](MetricInfoSchema),'constraints':z['array'](ConstraintInfoSchema),'hint':z['string']()})['strict']();