@wowok/agent-mcp 2.7.8 → 2.7.10

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 (334) hide show
  1. package/README.md +2 -2
  2. package/dist/config/runtime.d.ts +1 -1
  3. package/dist/config/runtime.js +1 -1
  4. package/dist/examples/rental-ziroom-machine-create.json +1 -2
  5. package/dist/examples/rental-ziroom-permission-create.json +1 -2
  6. package/dist/examples/rental-ziroom-service-create.json +1 -2
  7. package/dist/experience/experience-reuse.js +1 -1
  8. package/dist/experience/index.d.ts +2 -1
  9. package/dist/experience/index.js +1 -1
  10. package/dist/experience/persistence-config.d.ts +6 -0
  11. package/dist/experience/persistence-config.js +1 -0
  12. package/dist/experience/persistence.d.ts +21 -0
  13. package/dist/experience/persistence.js +1 -0
  14. package/dist/experience/realtime-feedback.js +1 -1
  15. package/dist/experience/user-profile.js +1 -1
  16. package/dist/extensions/business-modules.d.ts +1 -1
  17. package/dist/extensions/capability-manifest.d.ts +1 -1
  18. package/dist/extensions/types.d.ts +1 -1
  19. package/dist/goal/GoalClassifier.d.ts +17 -0
  20. package/dist/goal/GoalClassifier.js +1 -0
  21. package/dist/goal/GoalEngine.d.ts +120 -0
  22. package/dist/goal/GoalEngine.js +1 -0
  23. package/dist/goal/GoalStore.d.ts +27 -0
  24. package/dist/goal/GoalStore.js +1 -0
  25. package/dist/goal/plan-approval.d.ts +5 -0
  26. package/dist/goal/plan-approval.js +1 -0
  27. package/dist/goal/types.d.ts +76 -0
  28. package/dist/goal/types.js +1 -0
  29. package/dist/harness/index.d.ts +2 -7
  30. package/dist/harness/index.js +1 -1
  31. package/dist/harness/plan.d.ts +1 -1
  32. package/dist/harness/types.d.ts +0 -35
  33. package/dist/index.js +1 -1
  34. package/dist/knowledge/account-marks.d.ts +35 -0
  35. package/dist/knowledge/account-marks.js +1 -0
  36. package/dist/knowledge/audit-rules.d.ts +3 -1
  37. package/dist/knowledge/audit-rules.js +1 -1
  38. package/dist/knowledge/examples-scanner-cli.js +1 -1
  39. package/dist/knowledge/examples-scanner.js +1 -1
  40. package/dist/knowledge/goal-completion.d.ts +19 -0
  41. package/dist/knowledge/goal-completion.js +1 -0
  42. package/dist/knowledge/guard-translation.js +1 -1
  43. package/dist/knowledge/index.d.ts +3 -2
  44. package/dist/knowledge/index.js +1 -1
  45. package/dist/knowledge/industry-registry.js +1 -1
  46. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  47. package/dist/knowledge/mcp-schema-audit.js +1 -1
  48. package/dist/knowledge/operation-dictionary.js +1 -1
  49. package/dist/knowledge/passport-confirm.js +1 -1
  50. package/dist/knowledge/passport-puzzle.js +1 -1
  51. package/dist/knowledge/passport-translation.js +1 -1
  52. package/dist/knowledge/proof-risk.js +1 -1
  53. package/dist/knowledge/safety-rules.js +1 -1
  54. package/dist/knowledge/service-translation.js +1 -1
  55. package/dist/knowledge/template-registry.js +1 -1
  56. package/dist/knowledge/tools-reference.js +1 -1
  57. package/dist/knowledge/workflow-guidance.d.ts +1 -0
  58. package/dist/knowledge/workflow-guidance.js +1 -1
  59. package/dist/knowledge/workspace-lists.d.ts +56 -0
  60. package/dist/knowledge/workspace-lists.js +1 -0
  61. package/dist/loop-engineering/context-collect.d.ts +1 -1
  62. package/dist/monitor/EventRouter.d.ts +10 -0
  63. package/dist/monitor/EventRouter.js +1 -0
  64. package/dist/monitor/EventStore.d.ts +32 -12
  65. package/dist/monitor/EventStore.js +1 -1
  66. package/dist/monitor/MonitorLoop.d.ts +79 -0
  67. package/dist/monitor/MonitorLoop.js +1 -0
  68. package/dist/monitor/ProblemBridge.d.ts +32 -0
  69. package/dist/monitor/ProblemBridge.js +1 -0
  70. package/dist/monitor/ScopeResolver.d.ts +59 -0
  71. package/dist/monitor/ScopeResolver.js +1 -0
  72. package/dist/monitor/SubscriptionStore.d.ts +13 -0
  73. package/dist/monitor/SubscriptionStore.js +1 -0
  74. package/dist/monitor/normalize.d.ts +8 -0
  75. package/dist/monitor/normalize.js +1 -0
  76. package/dist/monitor/types.d.ts +89 -0
  77. package/dist/monitor/types.js +1 -0
  78. package/dist/persona/address-format.d.ts +1 -1
  79. package/dist/persona/address-format.js +1 -1
  80. package/dist/persona/distill-goal.d.ts +20 -0
  81. package/dist/persona/distill-goal.js +1 -0
  82. package/dist/persona/index.d.ts +2 -0
  83. package/dist/persona/index.js +1 -1
  84. package/dist/persona/model.js +1 -1
  85. package/dist/playbooks/service-build/business-puzzle.js +1 -0
  86. package/dist/{project → playbooks/service-build}/context-assembly.d.ts +9 -4
  87. package/dist/playbooks/service-build/context-assembly.js +1 -0
  88. package/dist/{project → playbooks/service-build}/game-theory.d.ts +1 -1
  89. package/dist/playbooks/service-build/index.d.ts +14 -0
  90. package/dist/playbooks/service-build/index.js +1 -0
  91. package/dist/{project → playbooks/service-build}/intent-analyzer.d.ts +1 -1
  92. package/dist/playbooks/service-build/intent-analyzer.js +1 -0
  93. package/dist/{project → playbooks/service-build}/machine-panorama.d.ts +5 -3
  94. package/dist/playbooks/service-build/machine-panorama.js +1 -0
  95. package/dist/{project → playbooks/service-build}/merchant-guide.d.ts +1 -1
  96. package/dist/playbooks/service-build/merchant-guide.js +1 -0
  97. package/dist/{project → playbooks/service-build}/mode-actions.d.ts +2 -2
  98. package/dist/playbooks/service-build/mode-actions.js +1 -0
  99. package/dist/playbooks/service-build/namespace.d.ts +2 -0
  100. package/dist/playbooks/service-build/namespace.js +1 -0
  101. package/dist/{project → playbooks/service-build}/object-panorama.d.ts +2 -3
  102. package/dist/playbooks/service-build/object-panorama.js +1 -0
  103. package/dist/{project → playbooks/service-build}/participation-radar.d.ts +4 -5
  104. package/dist/playbooks/service-build/participation-radar.js +1 -0
  105. package/dist/{project → playbooks/service-build}/pipeline-actions.d.ts +9 -9
  106. package/dist/playbooks/service-build/pipeline-actions.js +1 -0
  107. package/dist/playbooks/service-build/process.d.ts +6 -0
  108. package/dist/playbooks/service-build/process.js +1 -0
  109. package/dist/playbooks/service-build/risk-aggregator.js +1 -0
  110. package/dist/{project → playbooks/service-build}/semantic-graph.d.ts +2 -2
  111. package/dist/{project → playbooks/service-build}/service-panorama.d.ts +3 -19
  112. package/dist/playbooks/service-build/service-panorama.js +1 -0
  113. package/dist/review/arb.d.ts +6 -0
  114. package/dist/review/arb.js +1 -0
  115. package/dist/review/demand.d.ts +3 -0
  116. package/dist/review/demand.js +1 -0
  117. package/dist/review/index.d.ts +3 -0
  118. package/dist/review/index.js +1 -0
  119. package/dist/review/machine.d.ts +3 -0
  120. package/dist/review/machine.js +1 -0
  121. package/dist/review/order.d.ts +9 -0
  122. package/dist/review/order.js +1 -0
  123. package/dist/review/progress.d.ts +3 -0
  124. package/dist/review/progress.js +1 -0
  125. package/dist/review/repository.d.ts +3 -0
  126. package/dist/review/repository.js +1 -0
  127. package/dist/review/service.d.ts +5 -0
  128. package/dist/review/service.js +1 -0
  129. package/dist/review/types.d.ts +156 -0
  130. package/dist/review/types.js +1 -0
  131. package/dist/rules.d.ts +2 -2
  132. package/dist/rules.js +1 -1
  133. package/dist/safety/confirm-gate.js +1 -1
  134. package/dist/safety/index.d.ts +1 -1
  135. package/dist/safety/index.js +1 -1
  136. package/dist/safety/preview.d.ts +1 -0
  137. package/dist/safety/preview.js +1 -1
  138. package/dist/schema/call/allocation.d.ts +1 -1
  139. package/dist/schema/call/arbitration.d.ts +1 -1
  140. package/dist/schema/call/base.d.ts +1 -1
  141. package/dist/schema/call/base.js +1 -1
  142. package/dist/schema/call/bridge.d.ts +4 -4
  143. package/dist/schema/call/contact.d.ts +1 -1
  144. package/dist/schema/call/contact.js +1 -1
  145. package/dist/schema/call/demand.d.ts +1 -1
  146. package/dist/schema/call/demand.js +1 -1
  147. package/dist/schema/call/guard.d.ts +3 -3
  148. package/dist/schema/call/handler.d.ts +0 -3
  149. package/dist/schema/call/handler.js +1 -1
  150. package/dist/schema/call/machine.d.ts +2 -2
  151. package/dist/schema/call/order.d.ts +1 -1
  152. package/dist/schema/call/payment.d.ts +1 -1
  153. package/dist/schema/call/permission.d.ts +1 -1
  154. package/dist/schema/call/personal.d.ts +1 -1
  155. package/dist/schema/call/progress.d.ts +1 -1
  156. package/dist/schema/call/proof.d.ts +2 -2
  157. package/dist/schema/call/repository.d.ts +1 -1
  158. package/dist/schema/call/repository.js +1 -1
  159. package/dist/schema/call/reward.d.ts +1 -1
  160. package/dist/schema/call/semantic.js +1 -1
  161. package/dist/schema/call/service.d.ts +1 -1
  162. package/dist/schema/call/service.js +1 -1
  163. package/dist/schema/call/treasury.d.ts +1 -1
  164. package/dist/schema/common/index.js +1 -1
  165. package/dist/schema/goal/index.d.ts +317 -0
  166. package/dist/schema/goal/index.js +1 -0
  167. package/dist/schema/goal/planning.d.ts +465 -0
  168. package/dist/schema/goal/planning.js +1 -0
  169. package/dist/schema/index.d.ts +1 -2
  170. package/dist/schema/index.js +1 -1
  171. package/dist/schema/industry-pack/index.d.ts +265 -1
  172. package/dist/schema/industry-pack/index.js +1 -1
  173. package/dist/schema/industry-pack/modes.d.ts +268 -0
  174. package/dist/schema/industry-pack/modes.js +1 -0
  175. package/dist/schema/local/index.js +1 -1
  176. package/dist/schema/operations.d.ts +216 -19
  177. package/dist/schema/operations.js +1 -1
  178. package/dist/schema/permission/index.d.ts +1 -0
  179. package/dist/schema/permission/index.js +1 -1
  180. package/dist/schema/persona/index.d.ts +40 -0
  181. package/dist/schema/persona/index.js +1 -1
  182. package/dist/schema/query/bi.d.ts +783 -0
  183. package/dist/schema/query/bi.js +1 -0
  184. package/dist/schema/query/index.d.ts +661 -0
  185. package/dist/schema/query/index.js +1 -1
  186. package/dist/schema/schema-version.js +1 -1
  187. package/dist/schema/utils/skills-recommendation.d.ts +0 -1
  188. package/dist/schema/utils/skills-recommendation.js +1 -1
  189. package/dist/schema-query-impl/index.js +1 -1
  190. package/dist/schemas/account_operation.output.json +3 -3
  191. package/dist/schemas/account_operation.schema.json +2 -2
  192. package/dist/schemas/bridge_operation.output.json +2 -2
  193. package/dist/schemas/bridge_operation.schema.json +12 -12
  194. package/dist/schemas/config_operation.output.json +1 -1
  195. package/dist/schemas/config_operation.schema.json +1 -1
  196. package/dist/schemas/goal_operation.schema.json +1016 -0
  197. package/dist/schemas/guard2file.schema.json +3 -3
  198. package/dist/schemas/index.json +12 -13
  199. package/dist/schemas/industry_pack_operation.output.json +898 -0
  200. package/dist/schemas/industry_pack_operation.schema.json +217 -2
  201. package/dist/schemas/local_info_operation.output.json +2 -2
  202. package/dist/schemas/local_mark_operation.output.json +2 -2
  203. package/dist/schemas/machineNode2file.schema.json +3 -3
  204. package/dist/schemas/messenger_operation.output.json +2 -2
  205. package/dist/schemas/monitor_events.output.json +78 -3
  206. package/dist/schemas/monitor_events.schema.json +24 -1
  207. package/dist/schemas/monitor_subscription.output.json +1462 -0
  208. package/dist/schemas/monitor_subscription.schema.json +327 -0
  209. package/dist/schemas/onchain_events.output.json +4 -4
  210. package/dist/schemas/onchain_operations.output.json +2 -2
  211. package/dist/schemas/onchain_operations.schema.json +59 -59
  212. package/dist/schemas/onchain_operations_allocation.schema.json +3 -3
  213. package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
  214. package/dist/schemas/onchain_operations_contact.schema.json +4 -4
  215. package/dist/schemas/onchain_operations_demand.schema.json +4 -4
  216. package/dist/schemas/onchain_operations_gen_passport.schema.json +3 -3
  217. package/dist/schemas/onchain_operations_gen_proof.schema.json +3 -3
  218. package/dist/schemas/onchain_operations_guard.schema.json +3 -3
  219. package/dist/schemas/onchain_operations_machine.schema.json +3 -3
  220. package/dist/schemas/onchain_operations_order.schema.json +3 -3
  221. package/dist/schemas/onchain_operations_payment.schema.json +3 -3
  222. package/dist/schemas/onchain_operations_permission.schema.json +3 -3
  223. package/dist/schemas/onchain_operations_personal.schema.json +3 -3
  224. package/dist/schemas/onchain_operations_progress.schema.json +3 -3
  225. package/dist/schemas/onchain_operations_proof.schema.json +3 -3
  226. package/dist/schemas/onchain_operations_repository.schema.json +5 -5
  227. package/dist/schemas/onchain_operations_reward.schema.json +3 -3
  228. package/dist/schemas/onchain_operations_service.schema.json +4 -4
  229. package/dist/schemas/onchain_operations_treasury.schema.json +3 -3
  230. package/dist/schemas/onchain_table_data.output.json +346 -2
  231. package/dist/schemas/onchain_table_data.schema.json +22 -22
  232. package/dist/schemas/permission_operation.schema.json +6 -2
  233. package/dist/schemas/persona_operation.output.json +145 -0
  234. package/dist/schemas/persona_operation.schema.json +28 -2
  235. package/dist/schemas/query_toolkit.output.json +1274 -15
  236. package/dist/schemas/query_toolkit.schema.json +412 -11
  237. package/dist/schemas/workflow_operation.schema.json +4 -4
  238. package/dist/task/ProcessStore.d.ts +81 -0
  239. package/dist/task/ProcessStore.js +1 -0
  240. package/dist/task/playbook.d.ts +11 -0
  241. package/dist/task/playbook.js +1 -0
  242. package/dist/task/stage-gate.d.ts +22 -0
  243. package/dist/task/stage-gate.js +1 -0
  244. package/dist/{project → task}/substep-trace.d.ts +6 -45
  245. package/dist/task/types.d.ts +120 -0
  246. package/dist/task/types.js +1 -0
  247. package/dist/tools/handlers/config.js +1 -1
  248. package/dist/tools/handlers/goal.d.ts +4 -0
  249. package/dist/tools/handlers/goal.js +1 -0
  250. package/dist/tools/handlers/industry-pack.js +1 -1
  251. package/dist/tools/handlers/monitor.d.ts +24 -0
  252. package/dist/tools/handlers/monitor.js +1 -1
  253. package/dist/tools/handlers/network.d.ts +1 -0
  254. package/dist/tools/handlers/network.js +1 -0
  255. package/dist/tools/handlers/onchain.js +1 -1
  256. package/dist/tools/handlers/permission.js +1 -1
  257. package/dist/tools/handlers/persona.js +1 -1
  258. package/dist/tools/handlers/query.js +1 -1
  259. package/dist/tools/handlers/watch.js +1 -1
  260. package/dist/tools/index.d.ts +2 -0
  261. package/dist/tools/index.js +1 -1
  262. package/dist/tools/shared.js +1 -1
  263. package/dist/tools/wrap.js +1 -1
  264. package/package.json +5 -4
  265. package/dist/harness/checkpoint.d.ts +0 -8
  266. package/dist/harness/checkpoint.js +0 -1
  267. package/dist/knowledge/deployment-scanner.d.ts +0 -66
  268. package/dist/knowledge/deployment-scanner.js +0 -1
  269. package/dist/project/business-puzzle.js +0 -1
  270. package/dist/project/context-assembly.js +0 -1
  271. package/dist/project/deployment-bridge.d.ts +0 -5
  272. package/dist/project/deployment-bridge.js +0 -1
  273. package/dist/project/deployment-doc.d.ts +0 -190
  274. package/dist/project/deployment-doc.js +0 -1
  275. package/dist/project/edit-planner.d.ts +0 -123
  276. package/dist/project/edit-planner.js +0 -1
  277. package/dist/project/evaluation-fix.spec.d.ts +0 -1
  278. package/dist/project/evaluation-fix.spec.js +0 -1
  279. package/dist/project/evaluation.d.ts +0 -127
  280. package/dist/project/evaluation.js +0 -1
  281. package/dist/project/graph-builder.d.ts +0 -51
  282. package/dist/project/graph-builder.js +0 -1
  283. package/dist/project/graph.d.ts +0 -70
  284. package/dist/project/graph.js +0 -1
  285. package/dist/project/handlers.d.ts +0 -524
  286. package/dist/project/handlers.js +0 -1
  287. package/dist/project/index.d.ts +0 -91
  288. package/dist/project/index.js +0 -1
  289. package/dist/project/intent-analyzer.js +0 -1
  290. package/dist/project/machine-panorama.js +0 -1
  291. package/dist/project/merchant-guide.js +0 -1
  292. package/dist/project/mode-actions.js +0 -1
  293. package/dist/project/namespace.d.ts +0 -72
  294. package/dist/project/namespace.js +0 -1
  295. package/dist/project/object-panorama.js +0 -1
  296. package/dist/project/participation-radar.js +0 -1
  297. package/dist/project/pipeline-actions.js +0 -1
  298. package/dist/project/project-store.d.ts +0 -110
  299. package/dist/project/project-store.js +0 -1
  300. package/dist/project/query.d.ts +0 -43
  301. package/dist/project/query.js +0 -1
  302. package/dist/project/risk-aggregator.js +0 -1
  303. package/dist/project/semantic-assembler.d.ts +0 -93
  304. package/dist/project/semantic-assembler.js +0 -1
  305. package/dist/project/service-panorama.js +0 -1
  306. package/dist/project/stage-gate.d.ts +0 -52
  307. package/dist/project/stage-gate.js +0 -1
  308. package/dist/project/task-tracker.d.ts +0 -30
  309. package/dist/project/task-tracker.js +0 -1
  310. package/dist/schema/project/index.d.ts +0 -2021
  311. package/dist/schema/project/index.js +0 -1
  312. package/dist/schema/task-status.d.ts +0 -62
  313. package/dist/schema/task-status.js +0 -1
  314. package/dist/schemas/project_operation.output.json +0 -7877
  315. package/dist/schemas/project_operation.schema.json +0 -1139
  316. package/dist/schemas/query_task_status.output.json +0 -211
  317. package/dist/schemas/query_task_status.schema.json +0 -18
  318. package/dist/tools/handlers/project.d.ts +0 -2
  319. package/dist/tools/handlers/project.js +0 -1
  320. package/dist/tools/handlers/task-status.d.ts +0 -2
  321. package/dist/tools/handlers/task-status.js +0 -1
  322. /package/dist/{project → playbooks/service-build}/business-puzzle.d.ts +0 -0
  323. /package/dist/{project → playbooks/service-build}/game-theory.js +0 -0
  324. /package/dist/{project → playbooks/service-build}/machine-nodes.d.ts +0 -0
  325. /package/dist/{project → playbooks/service-build}/machine-nodes.js +0 -0
  326. /package/dist/{project → playbooks/service-build}/object-type.d.ts +0 -0
  327. /package/dist/{project → playbooks/service-build}/object-type.js +0 -0
  328. /package/dist/{project → playbooks/service-build}/reverse-mapping.d.ts +0 -0
  329. /package/dist/{project → playbooks/service-build}/reverse-mapping.js +0 -0
  330. /package/dist/{project → playbooks/service-build}/risk-aggregator.d.ts +0 -0
  331. /package/dist/{project → playbooks/service-build}/semantic-graph.js +0 -0
  332. /package/dist/{project → playbooks/service-build}/workflow-design-assessment.d.ts +0 -0
  333. /package/dist/{project → playbooks/service-build}/workflow-design-assessment.js +0 -0
  334. /package/dist/{project → task}/substep-trace.js +0 -0
@@ -0,0 +1 @@
1
+ const WOW_DECIMALS=0x9;export function fmtWow(a){if(a===null||a===undefined||a==='')return null;try{const b=BigInt(a['trim']()),c=0xan**BigInt(WOW_DECIMALS),d=b/c,e=(b%c)['toString']()['padStart'](WOW_DECIMALS,'0')['slice'](0x0,0x4);return d['toString']()+'.'+e;}catch{return null;}}export function groupRelated(a){const b=new Map();for(const c of a){const d=c['object_type']||'Unknown',e=b['get'](d);if(e)e['push']({'address':c['address'],'time':c['time']});else b['set'](d,[{'address':c['address'],'time':c['time']}]);}return[...b['entries']()]['map'](([f,g])=>({'label':f,'items':g}))['sort']((f,g)=>(g['items'][0x0]?.['time']??0x0)-(f['items'][0x0]?.['time']??0x0));}export function assembleOrderReview(a){const b=a['fields'],c=fmtWow(b['amount']),d=[{'label':'Required\x20info','tip':'Buyer-submitted\x20private\x20info\x20(order.required_info,\x20set\x20via\x20required_info_update):\x20the\x20buyer\x27s\x20messenger\x20Contact\x20object\x20or\x20a\x20WTS\x20proof\x20id,\x20shared\x20with\x20the\x20merchant\x20to\x20satisfy\x20the\x20Service\x27s\x20customer\x20requirements.','value':b['required_info']?{'t':'addr','v':b['required_info']}:null},{'label':'Owner','tip':'The\x20account\x20that\x20created\x20(bought)\x20this\x20order\x20(order.owner)','value':b['owner']?{'t':'addr','v':b['owner']}:null},{'label':'Created\x20at','tip':'When\x20the\x20buyer\x20created\x20this\x20order\x20(order.time).\x20The\x20top-right\x20stamp\x20is\x20the\x20UPDATED\x20time\x20(last\x20on-chain\x20tx)\x20—\x20two\x20distinct\x20clocks.','value':b['time']!=null?{'t':'time','v':b['time']}:null}],e=[{'label':'Progress','value':{'t':'progress','v':b['progress']??'','node':a['progress_next'],'since':a['progress_since'],'machine':b['machine']??null}},{'label':'Disputes','tip':'Arbitration\x20objects\x20that\x20opened\x20a\x20dispute\x20on\x20this\x20order\x20(order.dispute,\x20max\x2010)','value':{'t':'count','n':a['disputes']['length'],'panel_title':'Disputes','addrs':a['disputes']}},...b['claimed_by']?[{'label':'Claimed\x20by','tip':'Compensation\x20claimant\x20—\x20the\x20Arbitration\x20object\x20that\x20claimed\x20the\x20order\x27s\x20compensation\x20(order.compensate).\x20Once\x20set,\x20the\x20order\x20can\x20no\x20longer\x20be\x20claimed\x20or\x20disputed.','value':{'t':'addr','v':b['claimed_by']}}]:[]],g={'kind':'items','title':'Bought\x20('+a['items']['length']+')','empty':'No\x20purchased\x20items\x20on\x20this\x20order\x20yet.','items':a['items']['map'](k=>({'name':k['name']??'--','meta':[{'label':'price','value':fmtWow(k['price'])??'--'},{'label':'qty','value':k['quantity']??'--'}],'hash':k['wip_hash']??null}))},h={'kind':'fields','columns':0x2,'fields':[{'label':'Service','tip':'The\x20Service\x20this\x20order\x20was\x20placed\x20against.','value':b['service']?{'t':'addr','v':b['service'],'obj_type':'Service'}:null},{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20order\x20runs\x20through.\x20Empty\x20for\x20machine-less\x20orders.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Discount','tip':'The\x20Discount\x20object\x20applied\x20to\x20this\x20order\x20at\x20purchase\x20time.','value':b['discount']?{'t':'addr','v':b['discount'],'obj_type':'Discount'}:null},{'label':'Agents','tip':'Operator\x20accounts\x20besides\x20the\x20owner\x20that\x20can\x20act\x20on\x20this\x20order.','value':{'t':'count','n':a['agents']['length'],'panel_title':'Agents','addrs':a['agents']}},{'label':'Allocation','tip':'The\x20fund-splitting\x20object\x20bound\x20to\x20this\x20order\x20(order.allocation).\x20Green\x20\x27allocated\x27\x20=\x20balance\x20==\x200,\x20fully\x20split\x20to\x20recipients\x20(allocation.alloc);\x20amber\x20\x27pending\x27\x20=\x20balance\x20>\x200.','value':b['allocation']?{'t':'addr','v':b['allocation'],'obj_type':'Allocation','badge':a['allocation_state']==='allocated'?{'v':'allocated','tone':'green'}:a['allocation_state']==='pending'?{'v':'pending','tone':'amber'}:undefined}:null},{'label':'Progress','tip':'The\x20Progress\x20object\x20tracking\x20this\x20order\x20through\x20the\x20machine\x20workflow\x20(order.progress);\x20its\x20latest\x20node\x20and\x20elapsed\x20time\x20show\x20on\x20the\x20header\x20card.','value':b['progress']?{'t':'addr','v':b['progress'],'obj_type':'Progress'}:null}]},i=a['related']?.['items']??[],j={'kind':'related','title':'Related\x20objects'+(a['related']?.['count']?'\x20('+a['related']['count']+')':''),'empty':'No\x20other\x20on-chain\x20objects\x20reference\x20or\x20use\x20this\x20Order\x20yet.','groups':groupRelated(i),'count':a['related']?.['count']??i['length']};return{'action':'review_pack','object_type':'Order','head':{'address':a['object'],'network':a['network'],'name':a['head']['name'],'description':a['head']['description'],'tags':a['head']['tags'],'last_active_ms':a['updated_ms'],'badges':[],...c!=null?{'amount':{'text':c+'\x20WOW','tip':'Order\x20amount\x20(payment\x20token:\x20WOW)'}}:{},'info_rows':[d,e]},'sections':[g,h,j],'data_gaps':a['data_gaps']};}
@@ -0,0 +1,3 @@
1
+ import type { ProgressPanoramaResult } from "../playbooks/service-build/object-panorama.js";
2
+ import type { ReviewPack } from "./types.js";
3
+ export declare function assembleProgressReview(pano: ProgressPanoramaResult): ReviewPack;
@@ -0,0 +1 @@
1
+ import{groupRelated}from'./order.js';export function assembleProgressReview(a){const b=a['fields'],c=[{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20progress\x20runs\x20through\x20(progress.machine).','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Current\x20node','tip':'The\x20workflow\x20node\x20this\x20progress\x20currently\x20sits\x20at\x20(progress.current).','value':b['current']?{'t':'text','v':b['current'],'tone':'strong'}:null},{'label':'Since','tip':'When\x20the\x20current\x20node\x20was\x20entered\x20(progress.current_time)\x20—\x20drives\x20the\x20elapsed\x20readout.','value':b['current_time']!=null?{'t':'time','v':b['current_time']}:null}],d={'kind':'fields','columns':0x2,'fields':[{'label':'Machine','tip':'The\x20Machine\x20workflow\x20template\x20this\x20progress\x20runs\x20through.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Current\x20node','tip':'The\x20workflow\x20node\x20this\x20progress\x20currently\x20sits\x20at.','value':b['current']?{'t':'text','v':b['current']}:null},{'label':'Task','tip':'The\x20Order\x20this\x20progress\x20is\x20working\x20on\x20(progress.task).','value':b['task']?{'t':'addr','v':b['task'],'obj_type':'Order'}:null},{'label':'History','tip':'Node-entry\x20records\x20kept\x20for\x20this\x20progress\x20(the\x20history\x20table\x27s\x20entry\x20count).','value':b['history_count']!=null?{'t':'text','v':String(b['history_count']),'tone':'strong'}:null},{'label':'Node\x20since','tip':'When\x20the\x20current\x20node\x20was\x20entered\x20(progress.current_time).','value':b['current_time']!=null?{'t':'time','v':b['current_time']}:null},{'label':'Context\x20repositories','tip':'Repositories\x20this\x20progress\x20may\x20consult\x20for\x20fulfillment\x20proofs\x20(machine\x20context\x20binding).','value':{'t':'count','n':a['context_repositories']['length'],'panel_title':'Context\x20repositories','addrs':a['context_repositories']}}]},e=a['session']?{'kind':'items','title':'Session\x20—\x20waiting\x20forwards\x20('+a['session']['forwards']['length']+')','empty':'No\x20live\x20session\x20—\x20this\x20progress\x20is\x20not\x20waiting\x20on\x20any\x20forward\x20approvals.','items':a['session']['forwards']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['forward'],...j['who']?{'ref':{'address':j['who'],'obj_type':'Account'}}:{},'meta':[...j['msg']?[{'label':'msg','value':j['msg'],'tip':'The\x20message\x20attached\x20to\x20this\x20forward.'}]:[]],'badge':j['accomplished']?{'v':'accomplished','tone':'green'}:{'v':'waiting','tone':'amber'}}))}:null,g={'kind':'items','title':'Operators\x20('+a['operators']['length']+')','empty':'No\x20named\x20operators\x20—\x20forwards\x20are\x20gated\x20by\x20the\x20machine\x27s\x20rules\x20only.','items':a['operators']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['name'],'meta':[...j['operators']['length']>0x0?[{'label':'accounts','value':String(j['operators']['length']),'tip':'Accounts\x20designated\x20under\x20this\x20operator\x20name\x20(machine.named_operator).'}]:[]]}))},h=a['related']?.['items']??[],i={'kind':'related','title':'Related\x20objects'+(a['related']?.['count']?'\x20('+a['related']['count']+')':''),'empty':'No\x20other\x20on-chain\x20objects\x20are\x20related\x20to\x20this\x20Progress\x20yet.','groups':groupRelated(h),'count':a['related']?.['count']??h['length']};return{'action':'review_pack','object_type':'Progress','head':{'address':a['object'],'network':a['network'],'name':a['head']['name'],'description':a['head']['description'],'tags':a['head']['tags'],'last_active_ms':b['current_time'],'badges':[],'info_rows':[c]},'sections':[d,...e?[e]:[],g,i],'data_gaps':a['data_gaps']};}
@@ -0,0 +1,3 @@
1
+ import type { RepositoryPanoramaResult } from "../playbooks/service-build/object-panorama.js";
2
+ import type { ReviewPack } from "./types.js";
3
+ export declare function assembleRepositoryReview(pano: RepositoryPanoramaResult): ReviewPack;
@@ -0,0 +1 @@
1
+ export function assembleRepositoryReview(a){const b=a['fields'],c=[{'label':'Data','tip':'Records\x20stored\x20in\x20this\x20repository\x27s\x20on-chain\x20table\x20(ParentTable<DataKey,\x20vector<u8>>).','value':b['data_count']!=null?{'t':'text','v':String(b['data_count']),'tone':'strong'}:null}],d={'kind':'core','title':'Permission','rows':b['permission']?[{'label':'Permission','ref':{'address':b['permission'],'obj_type':'Permission'}}]:[]},e={'kind':'items','title':'Policies\x20('+a['policies']['length']+')','empty':'No\x20write\x20policies\x20—\x20the\x20repository\x20accepts\x20no\x20governed\x20data\x20writes.','items':a['policies']['map']((j,k)=>({'name':'#'+(k+0x1)+'\x20'+j['name'],'meta':[...j['id_from']!=null?[{'label':'id\x20from','value':String(j['id_from']),'tip':'The\x20passport\x20submission\x20field\x20the\x20record\x20id\x20is\x20taken\x20from.'}]:[],...j['value_type']!=null?[{'label':'value\x20type','value':String(j['value_type']),'tip':'The\x20BCS\x20value\x20type\x20data\x20writes\x20must\x20match.'}]:[],{'label':'write\x20guards','value':String(j['write_guards']),'tip':'Guards\x20that\x20must\x20pass\x20before\x20a\x20data\x20write\x20under\x20this\x20policy\x20is\x20accepted.'},...j['quote_guard']?[{'label':'quote','value':j['quote_guard'],'tip':'The\x20guard\x20consulted\x20when\x20quoting\x20this\x20policy\x27s\x20data.'}]:[]],'note':j['description']??undefined}))},g={'kind':'items','title':'Rewards\x20('+a['rewards']['length']+')','empty':'No\x20Reward\x20objects\x20back\x20this\x20Repository\x20yet.','items':a['rewards']['map']((j,k)=>({'name':'#'+(k+0x1),'ref':{'address':j,'obj_type':'Reward'},'meta':[]}))},h={'kind':'fields','columns':0x2,'fields':[{'label':'UM','tip':'Update\x20Manager\x20(repository.um)\x20—\x20a\x20Contact\x20designated\x20as\x20this\x20Repository\x27s\x20customer-service\x20/\x20update\x20channel.','value':b['um']?{'t':'addr','v':b['um'],'obj_type':'Contact'}:null},{'label':'Permission','tip':'The\x20Permission\x20list\x20gating\x20administration\x20operations\x20(description\x20/\x20policies\x20/\x20rewards\x20/\x20owner_receive\x20/\x20um).','value':b['permission']?{'t':'addr','v':b['permission'],'obj_type':'Permission'}:null},{'label':'Data','tip':'Records\x20stored\x20in\x20this\x20repository\x27s\x20on-chain\x20table.','value':b['data_count']!=null?{'t':'text','v':String(b['data_count']),'tone':'strong'}:null}]};return{'action':'review_pack','object_type':'Repository','head':{'address':a['object'],'network':a['network'],'name':a['head']['name'],'description':a['head']['description'],'tags':a['head']['tags'],'last_active_ms':null,'badges':[],'info_rows':[c]},'sections':[d,e,g,h],'data_gaps':a['data_gaps']};}
@@ -0,0 +1,5 @@
1
+ import type { ServicePanoramaResult } from "../playbooks/service-build/service-panorama.js";
2
+ import type { ReviewPack } from "./types.js";
3
+ export declare function shortHex(a: string): string;
4
+ export declare function fmtDuration(ms: string | number | null | undefined): string;
5
+ export declare function assembleServiceReview(pano: ServicePanoramaResult): ReviewPack;
@@ -0,0 +1 @@
1
+ export function shortHex(b){return b['length']>0xe?b['slice'](0x0,0x6)+'…'+b['slice'](-0x4):b;}export function fmtDuration(a){if(a===null||a===undefined||a==='')return'--';const b=Number(a);if(!Number['isFinite'](b)||b<=0x0)return'--';const c=[[0x5265c00,'d'],[0x36ee80,'h'],[0xea60,'m'],[0x3e8,'s']],d=[];let e=Math['floor'](b);for(const [f,g]of c){if(d['length']>=0x2)break;const h=Math['floor'](e/f);e-=h*f;if(h>0x0)d['push'](''+h+g);else{if(d['length']>0x0)break;}}return d['length']===0x0?'<1s':d['join']('\x20');}export function assembleServiceReview(a){const b=a['service'],c=[];if(!b['published'])c['push']({'v':'UNPUBLISHED','tone':'amber','tip':'Service\x20is\x20not\x20published\x20—\x20invisible\x20to\x20customers\x20on\x20the\x20WoW\x20market\x20listing;\x20every\x20sale\x20item\x20is\x20unbuyable.'});else b['paused']&&c['push']({'v':'PAUSED','tone':'red','tip':'Service\x20is\x20paused\x20—\x20new\x20orders\x20are\x20rejected\x20(existing\x20orders\x20still\x20progress);\x20every\x20sale\x20item\x20is\x20unbuyable.'});const d=!b['published']||b['paused'],e={'kind':'items','title':'Sales\x20('+b['sales']['length']+')','empty':'No\x20sale\x20items\x20configured\x20—\x20the\x20storefront\x20is\x20empty.','items':b['sales']['map'](o=>({'name':o['name']||'(unnamed)','meta':[{'label':'price','value':o['price_display']||o['price']||'--','tip':o['price_tip']||'On-chain\x20price\x20in\x20the\x20smallest\x20unit.\x20Payment\x20token\x20info\x20unavailable\x20—\x20showing\x20the\x20raw\x20stored\x20value.'},{'label':'stock','value':o['stock']??'--','tip':'Remaining\x20sellable\x20stock\x20for\x20this\x20item.'},{'label':'wip','value':o['wip']||'--','tip':'Work-in-progress\x20product\x20template.\x20Every\x20purchase\x20mints\x20a\x20new\x20item\x20from\x20this\x20WIP\x20blueprint.'}],'badge':o['suspension']?{'v':'SUSPENDED','tone':'red'}:null,'dim':d||!!o['suspension']}))},f={'kind':'core','title':'Permission','rows':[{'label':'Permission','ref':{'address':b['permission'],'obj_type':'Permission'}}]},g={'kind':'fields','columns':0x2,'fields':[{'label':'Location','tip':'The\x20service\x20area\x20and\x20scope\x20as\x20stated\x20by\x20the\x20merchant.','value':b['location']?{'t':'text','v':b['location']}:null},{'label':'Purchase\x20guard','tip':'Guard\x20every\x20customer\x20must\x20pass\x20to\x20place\x20an\x20order\x20(whitelist\x20/\x20KYC\x20/\x20payment\x20proof).\x20Set\x20→\x20buyers\x20must\x20satisfy\x20its\x20conditions;\x20unset\x20→\x20purchase\x20is\x20unconditional.','value':a['buy_guard']?.['address']??b['buy_guard']?{'t':'addr','v':a['buy_guard']?.['address']??b['buy_guard'],'obj_type':'Guard'}:null},{'label':'Compensation\x20fund','tip':'Pre-funded\x20on-chain\x20guarantee.\x20Buyers\x20can\x20claim\x20from\x20this\x20fund\x20BEFORE\x20going\x20to\x20arbitration\x20—\x20the\x20key\x20risk-reduction\x20signal\x20customers\x20look\x20for.\x20Merchant-side\x20withdrawal\x20is\x20gated\x20by\x20the\x20Setting\x20lock:\x20the\x20Service\x20must\x20be\x20paused\x20and\x20the\x20window\x20elapsed\x20(paused_time\x20+\x20setting_lock_duration\x20≤\x20now).','value':b['compensation_fund']?{'t':'text','v':b['compensation_fund']}:null},{'label':'Published','tip':'Service\x20is\x20published\x20→\x20visible\x20to\x20customers\x20on\x20the\x20WoW\x20market\x20listing.\x20Unpublished\x20→\x20merchant-only\x20preview.','value':b['published']?{'t':'badge','v':'YES','tone':'red'}:{'t':'badge','v':'no','tone':'green'}},{'label':'Paused','tip':'When\x20paused,\x20new\x20orders\x20are\x20rejected\x20(existing\x20orders\x20still\x20progress).\x20If\x20paused,\x20shows\x20the\x20time\x20of\x20the\x20most\x20recent\x20pause\x20(the\x20PAUSE\x20tx\x20timestamp);\x20\x27no\x27\x20=\x20not\x20paused.\x20The\x20pause\x20timestamp\x20anchors\x20the\x20Setting-lock\x20window\x20that\x20gates\x20compensation-fund\x20withdrawal\x20and\x20arbitration/reward\x20removal.','value':b['paused']?{'t':'time','v':b['paused_time']??0x0,'tip':'Most\x20recent\x20pause\x20(the\x20PAUSE\x20tx\x20timestamp).'}:{'t':'text','v':'no'}},{'label':'Setting\x20lock','tip':'Lock\x20window\x20(ms)\x20anchored\x20at\x20the\x20pause\x20timestamp.\x20It\x20gates\x20exactly\x20three\x20operations:\x20withdrawing\x20the\x20Compensation\x20fund,\x20and\x20removing/clearing\x20Arbitrations\x20or\x20Rewards\x20while\x20the\x20Service\x20is\x20published\x20—\x20each\x20requires\x20the\x20Service\x20to\x20be\x20paused\x20AND\x20the\x20window\x20elapsed\x20since\x20the\x20pause.\x20Adding\x20arbitrations/rewards\x20and\x20every\x20other\x20setting\x20change\x20are\x20NOT\x20gated;\x20unpublished\x20services\x20may\x20remove\x20rewards/arbitrations\x20freely.','value':{'t':'text','v':fmtDuration(b['setting_lock_duration'])}},{'label':'UM','tip':'Update\x20Manager\x20—\x20a\x20Contact\x20designated\x20as\x20this\x20Service\x27s\x20customer-service\x20/\x20update\x20channel.\x20Buyers\x20and\x20off-chain\x20clients\x20route\x20support\x20requests\x20and\x20update\x20notices\x20through\x20this\x20Contact.','value':b['um']?{'t':'addr','v':b['um'],'obj_type':'Contact'}:null},{'label':'Machine','tip':'Workflow\x20Machine\x20bound\x20to\x20this\x20Service.\x20Orders\x20inherit\x20it\x20at\x20buy\x20time\x20—\x20an\x20order\x27s\x20Machine\x20and\x20its\x20fulfillment\x20Progress\x20nodes\x20are\x20fixed\x20when\x20the\x20order\x20is\x20created.','value':b['machine']?{'t':'addr','v':b['machine'],'obj_type':'Machine'}:null},{'label':'Customer\x20requirements','tip':'Proof\x20types\x20every\x20customer\x20must\x20satisfy\x20before/while\x20ordering\x20(e.g.\x20ID\x20proof,\x20residency,\x20off-chain\x20signature).','value':b['customer_required']['length']?{'t':'text','v':b['customer_required']['join'](',\x20')}:null},{'label':'Arbitrations','tip':'Dispute\x20channels\x20bound\x20to\x20this\x20Service.\x20An\x20arbitration\x20resolves\x20conflicts\x20when\x20the\x20compensation-fund\x20claim-path\x20does\x20not\x20suffice.\x20While\x20published,\x20removing/clearing\x20is\x20gated\x20by\x20the\x20Setting\x20lock\x20(the\x20Service\x20must\x20be\x20paused\x20and\x20the\x20window\x20elapsed);\x20adding\x20is\x20allowed\x20anytime.','value':{'t':'count','n':b['arbitrations']['length'],'panel_title':'Arbitrations','addrs':b['arbitrations']}},{'label':'Rewards','tip':'On-chain\x20reward\x20pools\x20bound\x20to\x20this\x20Service\x20—\x20typically\x20pay\x20out\x20to\x20customers\x20on\x20purchase\x20milestones,\x20or\x20to\x20staff\x20for\x20on-time\x20fulfillment.\x20While\x20published,\x20removing/clearing\x20is\x20gated\x20by\x20the\x20Setting\x20lock\x20(the\x20Service\x20must\x20be\x20paused\x20and\x20the\x20window\x20elapsed);\x20adding\x20is\x20allowed\x20anytime.','value':{'t':'count','n':b['rewards']['length'],'panel_title':'Rewards','addrs':b['rewards']}},{'label':'Repositories','tip':'Evidence\x20/\x20data\x20repositories\x20consulted\x20for\x20fulfillment\x20proofs.\x20The\x20Machine\x20workflow\x20can\x20require\x20repository-gated\x20consensus\x20before\x20advancing\x20a\x20stage.','value':{'t':'count','n':b['repositories']['length'],'panel_title':'Repositories','addrs':b['repositories']}}]},h=a['machine_graph'],i=h?{'kind':'graph','title':'Workflow\x20Graph','empty':'No\x20workflow\x20machine\x20bound\x20to\x20this\x20Service.','graph':{'machineAddress':h['address'],'machineName':h['name'],'published':h['published'],'paused':h['paused'],'nodes':h['nodes'],'edges':h['edges']}}:null,j=a['allocator_guards']['map']((o,p)=>({'name':'Guard\x20'+(p+0x1),'ref':{'address':o['address'],'obj_type':'Guard'},'meta':[{'label':'entries','value':String(o['table_entry_count']),'tip':'Guard\x20table\x20entries\x20=\x20the\x20conditions\x20/\x20proof\x20slots\x20defined\x20in\x20this\x20guard.'},{'label':'submissions','value':String(o['submission_slot_count']),'tip':'Submission\x20slots\x20=\x20dynamic\x20proof\x20fields\x20the\x20operator\x20must\x20fill\x20at\x20execution\x20time.'},...o['rep']!=null?[{'label':'rep','value':o['rep']?'yes':'no','tip':'Reputation-flagged\x20guard\x20—\x20requires\x20a\x20reputation\x20marker\x20to\x20pass.'}]:[],...o['relies_logic_and']!=null?[{'label':'logic','value':o['relies_logic_and']?'AND':'OR','tip':'AND\x20=\x20all\x20relied-guards\x20must\x20pass;\x20OR\x20=\x20any\x20relied-guard\x20passing\x20is\x20enough.'}]:[],...o['relies']['length']>0x0?[{'label':'relies','value':String(o['relies']['length']),'tip':'Upstream\x20guards\x20this\x20guard\x20composes\x20with\x20(evidence\x20verification\x20chaining)\x20—\x20open\x20the\x20Guard\x20detail\x20for\x20the\x20full\x20tree.'}]:[]],'note':o['description']??undefined}));if(b['order_allocators']){const o=b['order_allocators'];j['push']({'name':'Order\x20allocators','meta':[{'label':'threshold','value':o['threshold']??'--','tip':'Escrow\x20amount\x20threshold\x20above\x20which\x20the\x20allocator\x20strategy\x20applies.'}],'note':o['description']||'(no\x20description)'}),o['allocators']['forEach']((p,q)=>{j['push']({'name':'Allocator\x20'+(q+0x1),'ref':{'address':p['guard'],'obj_type':'Guard'},'meta':[{'label':'shares','value':String(p['sharing_count']),'tip':'Number\x20of\x20settlement\x20shares\x20this\x20allocator\x20guard\x20controls.'},...p['max']?[{'label':'max','value':p['max'],'tip':'Per-share\x20cap\x20for\x20this\x20allocator\x20guard.'}]:[]]});});}const k={'kind':'items','title':'Allocation\x20Guards\x20('+a['allocator_guards']['length']+')','empty':'No\x20allocation\x20guards\x20—\x20settlement\x20splits\x20use\x20the\x20default\x20allocator\x20strategy.\x20(A\x20configured\x20purchase\x20guard\x20is\x20listed\x20in\x20the\x20Fields\x20card.)','items':j},l=a['related']['groups']['reduce']((p,q)=>p+q['items']['length'],0x0),m={'kind':'related','title':'Related\x20objects'+(l>0x0?'\x20('+l+')':''),'empty':'No\x20other\x20on-chain\x20objects\x20reference\x20or\x20use\x20this\x20Service\x20yet\x20—\x20orders,\x20progress,\x20allocations,\x20payments\x20and\x20guards\x20targeting\x20this\x20Service\x20will\x20appear\x20here.','groups':a['related']['groups']['map'](p=>({'label':p['type_label'],'items':p['items']['map'](q=>({'address':q['address'],'time':q['time']}))})),'count':l},n=[e,f,g,...i?[i]:[],k,m];return{'action':'review_pack','object_type':'Service','head':{'address':b['address'],'network':a['network'],'name':b['name'],'description':b['description']||null,'tags':b['tags'],'last_active_ms':b['onchain_last_updated']?Number(b['onchain_last_updated']['timestamp_ms'])||null:null,'badges':c,'info_rows':[]},'sections':n,'data_gaps':a['data_gaps']};}
@@ -0,0 +1,156 @@
1
+ export type ReviewTone = "green" | "amber" | "red" | "gray" | "blue" | "yellow";
2
+ export type ReviewValue = {
3
+ t: "text";
4
+ v: string;
5
+ tone?: "dim" | "strong";
6
+ } | {
7
+ t: "time";
8
+ v: number;
9
+ tip?: string;
10
+ } | {
11
+ t: "addr";
12
+ v: string;
13
+ obj_type?: string;
14
+ badge?: {
15
+ v: string;
16
+ tone: ReviewTone;
17
+ };
18
+ } | {
19
+ t: "progress";
20
+ v: string;
21
+ node: string | null;
22
+ since: number | null;
23
+ machine?: string | null;
24
+ } | {
25
+ t: "count";
26
+ n: number;
27
+ panel_title?: string;
28
+ addrs?: string[];
29
+ } | {
30
+ t: "badge";
31
+ v: string;
32
+ tone: ReviewTone;
33
+ } | {
34
+ t: "deadline";
35
+ v: number;
36
+ tip?: string;
37
+ } | {
38
+ t: "longtext";
39
+ v: string;
40
+ } | null;
41
+ export interface ReviewField {
42
+ label: string;
43
+ tip?: string;
44
+ value: ReviewValue;
45
+ }
46
+ export interface ReviewCoreRow {
47
+ label: string;
48
+ ref: {
49
+ address: string;
50
+ obj_type: string;
51
+ };
52
+ meta?: string;
53
+ }
54
+ export interface ReviewItem {
55
+ name: string;
56
+ ref?: {
57
+ address: string;
58
+ obj_type: string;
59
+ };
60
+ meta: {
61
+ label: string;
62
+ value: string;
63
+ tip?: string;
64
+ }[];
65
+ hash?: string | null;
66
+ badge?: {
67
+ v: string;
68
+ tone: ReviewTone;
69
+ } | null;
70
+ dim?: boolean;
71
+ note?: string;
72
+ }
73
+ export interface ReviewRelatedGroup {
74
+ label: string;
75
+ items: {
76
+ address: string;
77
+ time: number | null;
78
+ }[];
79
+ }
80
+ export interface ReviewGraph {
81
+ machineAddress: string;
82
+ machineName: string | null;
83
+ published: boolean | null;
84
+ paused: boolean | null;
85
+ nodes: {
86
+ name: string;
87
+ description: string | null;
88
+ }[];
89
+ edges: {
90
+ from: string;
91
+ to: string;
92
+ threshold: number;
93
+ forwards: {
94
+ name: string;
95
+ weight: number;
96
+ guard: string | null;
97
+ retained_submission: number[] | null;
98
+ named_operator: string | null;
99
+ permission_index: number | null;
100
+ }[];
101
+ }[];
102
+ }
103
+ export type ReviewSection = {
104
+ kind: "fields";
105
+ fields: ReviewField[];
106
+ columns?: 1 | 2;
107
+ } | {
108
+ kind: "items";
109
+ title: string;
110
+ empty: string;
111
+ items: ReviewItem[];
112
+ } | {
113
+ kind: "core";
114
+ title: string;
115
+ rows: ReviewCoreRow[];
116
+ } | {
117
+ kind: "graph";
118
+ title: string;
119
+ empty: string;
120
+ graph: ReviewGraph;
121
+ } | {
122
+ kind: "related";
123
+ title: string;
124
+ empty: string;
125
+ groups: ReviewRelatedGroup[];
126
+ count?: number;
127
+ };
128
+ export interface ReviewHead {
129
+ address: string;
130
+ network: string;
131
+ name: string | null;
132
+ description: string | null;
133
+ tags: string[];
134
+ last_active_ms: number | null;
135
+ badges: {
136
+ v: string;
137
+ tone: ReviewTone;
138
+ tip?: string;
139
+ }[];
140
+ amount?: {
141
+ text: string;
142
+ tip?: string;
143
+ };
144
+ info_rows: {
145
+ label: string;
146
+ tip?: string;
147
+ value: ReviewValue;
148
+ }[][];
149
+ }
150
+ export interface ReviewPack {
151
+ action: "review_pack";
152
+ object_type: string;
153
+ head: ReviewHead;
154
+ sections: ReviewSection[];
155
+ data_gaps: string[];
156
+ }
@@ -0,0 +1 @@
1
+ export{};
package/dist/rules.d.ts CHANGED
@@ -2,12 +2,12 @@ export { validateOperation, hasBlockingViolations, getWarningViolations, type Co
2
2
  export { computeServiceTrustScore, type ServiceTrustMetrics, } from "./knowledge/trust-metrics.js";
3
3
  export { AUDIT_RULES, auditService, hasBlockingErrors, getErrors, getWarnings, summarizeFindings, type AuditFinding, } from "./knowledge/audit-rules.js";
4
4
  export { confirmGate, isConfirmGateEnabled, isExplicitlyConfirmed, getFailMode, type ConfirmResult, type FailMode, } from "./safety/confirm-gate.js";
5
- export { renderPreview } from "./safety/preview.js";
5
+ export { renderPreview, renderPreviewHuman } from "./safety/preview.js";
6
6
  export { CONFIRMATION_RULES, SAFETY_RULES_VERSION, DEFAULT_AMOUNT_THRESHOLD, getAmountThreshold, formatAmount, collectDefaultWarnings, type OperationPreview, type ConfirmLevel, type ConfirmationRule, } from "./knowledge/safety-rules.js";
7
7
  export { distillIntent, extractSignals } from "./experience/intent-distill.js";
8
8
  export type { DistilledIntent } from "./experience/types.js";
9
9
  export { Harness, getHarness, setHarness } from "./harness/index.js";
10
- export type { ODG, ExpectedResult, VerifyReport, RecoveryAction, Checkpoint, } from "./harness/types.js";
10
+ export type { ODG, ExpectedResult, VerifyReport, RecoveryAction, } from "./harness/types.js";
11
11
  export { getDefaultPreferences, inferPreferences, matchServiceToPreferences, mergePreferences, validatePreferences, SUPPORTED_INDUSTRIES, type IndustryTemplate, type Industry, type PreferenceInference, type ServiceForMatching, type PreferenceMatchResult, } from "./customer/user-preferences.js";
12
12
  export type { UserPreferences } from "./customer/types.js";
13
13
  export declare function buildSoftRulesPrompt(): string;
package/dist/rules.js CHANGED
@@ -1 +1 @@
1
- export{validateOperation,hasBlockingViolations,getWarningViolations}from'./knowledge/tool-constraints.js';export{computeServiceTrustScore}from'./knowledge/trust-metrics.js';export{AUDIT_RULES,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./knowledge/audit-rules.js';export{confirmGate,isConfirmGateEnabled,isExplicitlyConfirmed,getFailMode}from'./safety/confirm-gate.js';export{renderPreview}from'./safety/preview.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,DEFAULT_AMOUNT_THRESHOLD,getAmountThreshold,formatAmount,collectDefaultWarnings}from'./knowledge/safety-rules.js';export{distillIntent,extractSignals}from'./experience/intent-distill.js';export{Harness,getHarness,setHarness}from'./harness/index.js';export{getDefaultPreferences,inferPreferences,matchServiceToPreferences,mergePreferences,validatePreferences,SUPPORTED_INDUSTRIES}from'./customer/user-preferences.js';import{CONFIRMATION_RULES,DEFAULT_AMOUNT_THRESHOLD,formatAmount,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_CLASS_META,NAMING_CONVENTIONS}from'./knowledge/safety-rules.js';const PERMISSION_INDEX_RANGE='1000-65535\x20(0-999\x20reserved)';export function buildSoftRulesPrompt(){const a=[];a['push']('##\x20Token\x20amounts'),a['push']('-\x20Token\x20amounts\x20are\x20U64\x20integers\x20in\x20the\x20smallest\x20unit.\x201\x20WOW\x20=\x201_000_000_000\x20(9\x20decimals).'),a['push']('-\x20Amount\x20input\x20accepts\x20\x272WOW\x27\x20/\x20\x2710.5WOW\x27\x20(auto-converted)\x20or\x20a\x20raw\x20integer\x20\x272000000000\x27.'),a['push']('-\x20Always\x20query\x20token\x20precision\x20via\x20query_toolkit\x20before\x20using\x20a\x20non-WOW\x20token.'),a['push'](''),a['push']('##\x20Operation\x20classes');for(const [c,d]of Object['entries'](OPERATION_CLASS_META)){a['push']('-\x20'+c+':\x20'+d['note']);}a['push'](''),a['push']('##\x20Object\x20reuse\x20vs\x20create'),a['push']('-\x20'+CREATE_VS_MODIFY_PATTERN['note']);for(const e of OBJECT_REUSE_RULES){a['push']('\x20\x20-\x20'+e['object_type']+':\x20'+e['recommendation']['replace'](/_/g,'\x20')+'\x20—\x20'+e['reason']);}a['push'](''),a['push']('##\x20Immutability');for(const f of IMMUTABILITY_RULES){const g=f['mutable_after']?.['length']?'\x20(still\x20mutable:\x20'+f['mutable_after']['join'](',\x20')+')':'';a['push']('-\x20'+f['object_type']+'\x20'+f['trigger']+':\x20'+f['message']+g);}a['push'](''),a['push']('##\x20Confirmation\x20levels');const b=[...new Set(CONFIRMATION_RULES['map'](h=>h['level']))];a['push']('-\x20Amount\x20threshold\x20for\x20extra\x20scrutiny:\x20'+formatAmount(DEFAULT_AMOUNT_THRESHOLD)+'\x20WOW.'),a['push']('-\x20Confirm-gate\x20levels:\x20'+b['join'](',\x20')+'.'),a['push'](''),a['push']('##\x20Naming\x20conventions'),a['push']('-\x20Scheme:\x20'+NAMING_CONVENTIONS['scheme']);for(const h of NAMING_CONVENTIONS['recommendations']){a['push']('-\x20'+h);}return a['push']('-\x20Custom\x20permission\x20indices:\x20'+PERMISSION_INDEX_RANGE+'.'),a['push'](''),a['join']('\x0a');}export{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,classifyTool,checkObjectReuseRules,checkImmutabilityRules}from'./knowledge/safety-rules.js';
1
+ export{validateOperation,hasBlockingViolations,getWarningViolations}from'./knowledge/tool-constraints.js';export{computeServiceTrustScore}from'./knowledge/trust-metrics.js';export{AUDIT_RULES,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./knowledge/audit-rules.js';export{confirmGate,isConfirmGateEnabled,isExplicitlyConfirmed,getFailMode}from'./safety/confirm-gate.js';export{renderPreview,renderPreviewHuman}from'./safety/preview.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,DEFAULT_AMOUNT_THRESHOLD,getAmountThreshold,formatAmount,collectDefaultWarnings}from'./knowledge/safety-rules.js';export{distillIntent,extractSignals}from'./experience/intent-distill.js';export{Harness,getHarness,setHarness}from'./harness/index.js';export{getDefaultPreferences,inferPreferences,matchServiceToPreferences,mergePreferences,validatePreferences,SUPPORTED_INDUSTRIES}from'./customer/user-preferences.js';import{CONFIRMATION_RULES,DEFAULT_AMOUNT_THRESHOLD,formatAmount,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_CLASS_META,NAMING_CONVENTIONS}from'./knowledge/safety-rules.js';const PERMISSION_INDEX_RANGE='1000-65535\x20(0-999\x20reserved)';export function buildSoftRulesPrompt(){const a=[];a['push']('##\x20Token\x20amounts'),a['push']('-\x20Token\x20amounts\x20are\x20U64\x20integers\x20in\x20the\x20smallest\x20unit.\x201\x20WOW\x20=\x201_000_000_000\x20(9\x20decimals).'),a['push']('-\x20Amount\x20input\x20accepts\x20\x272WOW\x27\x20/\x20\x2710.5WOW\x27\x20(auto-converted)\x20or\x20a\x20raw\x20integer\x20\x272000000000\x27.'),a['push']('-\x20Always\x20query\x20token\x20precision\x20via\x20query_toolkit\x20before\x20using\x20a\x20non-WOW\x20token.'),a['push'](''),a['push']('##\x20Operation\x20classes');for(const [c,d]of Object['entries'](OPERATION_CLASS_META)){a['push']('-\x20'+c+':\x20'+d['note']);}a['push'](''),a['push']('##\x20Object\x20reuse\x20vs\x20create'),a['push']('-\x20'+CREATE_VS_MODIFY_PATTERN['note']);for(const e of OBJECT_REUSE_RULES){a['push']('\x20\x20-\x20'+e['object_type']+':\x20'+e['recommendation']['replace'](/_/g,'\x20')+'\x20—\x20'+e['reason']);}a['push'](''),a['push']('##\x20Immutability');for(const f of IMMUTABILITY_RULES){const g=f['mutable_after']?.['length']?'\x20(still\x20mutable:\x20'+f['mutable_after']['join'](',\x20')+')':'';a['push']('-\x20'+f['object_type']+'\x20'+f['trigger']+':\x20'+f['message']+g);}a['push'](''),a['push']('##\x20Confirmation\x20levels');const b=[...new Set(CONFIRMATION_RULES['map'](h=>h['level']))];a['push']('-\x20Amount\x20threshold\x20for\x20extra\x20scrutiny:\x20'+formatAmount(DEFAULT_AMOUNT_THRESHOLD)+'\x20WOW.'),a['push']('-\x20Confirm-gate\x20levels:\x20'+b['join'](',\x20')+'.'),a['push'](''),a['push']('##\x20Naming\x20conventions'),a['push']('-\x20Scheme:\x20'+NAMING_CONVENTIONS['scheme']);for(const h of NAMING_CONVENTIONS['recommendations']){a['push']('-\x20'+h);}return a['push']('-\x20Custom\x20permission\x20indices:\x20'+PERMISSION_INDEX_RANGE+'.'),a['push'](''),a['join']('\x0a');}export{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,classifyTool,checkObjectReuseRules,checkImmutabilityRules}from'./knowledge/safety-rules.js';
@@ -1 +1 @@
1
- import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a306a}from'../config/index.js';export function isConfirmGateEnabled(){return a306a('confirm_gate');}const internalErrorCounts={};function logInternalError(a,b){const c=a;internalErrorCounts[c]=(internalErrorCounts[c]??0x0)+0x1;const d=internalErrorCounts[c];console['warn']('[ConfirmGate]\x20internal_error\x20context=\x22'+a+'\x22\x20count='+d+'\x20error='+(b instanceof Error?b['message']:String(b)));}export function getFailMode(a){switch(a){case'irreversible':case'publish':case'amount':return'closed';case'standard':case'none':default:return'open';}}function buildInternalErrorResult(){return{'pass':![],'level':'irreversible','preview':{'level':'irreversible','operation':'unknown','irreversible':!![]},'rule_id':'internal_error'};}export function confirmGate(a,b,c,d,f){if(!isConfirmGateEnabled())return{'pass':!![]};if(c?.['confirmed']===!![])return{'pass':!![]};let g,h=null;try{g=CONFIRMATION_RULES['find'](l=>{try{return l['when'](a,b,c);}catch(m){logInternalError('rule_when:'+l['id'],m);if(getFailMode(l['level'])==='closed')throw m;return![];}});}catch(l){h=l;}if(h)return logInternalError('rule_search',h),buildInternalErrorResult();if(!g)return{'pass':!![]};const i=resolveOverrideId(g['id'],a),j=i?f?.[i]:undefined;if(j==='auto')return{'pass':!![]};if(j!=='block'&&g['bypass_on_explicit_intent']&&d&&d['length']>0x0){const m=d['map'](o=>o['toLowerCase']()),n=g['bypass_on_explicit_intent']['some'](o=>m['some'](q=>q['includes'](o['toLowerCase']())));if(n)return{'pass':!![]};}let k;try{k=g['preview'](a,b,c);}catch(o){logInternalError('rule_preview:'+g['id'],o);if(getFailMode(g['level'])==='closed')return buildInternalErrorResult();return{'pass':!![]};}return{'pass':![],'level':g['level'],'preview':k,'rule_id':g['id']};}export function isExplicitlyConfirmed(a){return a?.['confirmed']===!![];}
1
+ import{CONFIRMATION_RULES,resolveOverrideId}from'../knowledge/safety-rules.js';import{isEnabled as a318a}from'../config/index.js';import{isPlanPreapproved}from'../goal/plan-approval.js';export function isConfirmGateEnabled(){return a318a('confirm_gate');}const internalErrorCounts={};function logInternalError(a,b){const c=a;internalErrorCounts[c]=(internalErrorCounts[c]??0x0)+0x1;const d=internalErrorCounts[c];console['warn']('[ConfirmGate]\x20internal_error\x20context=\x22'+a+'\x22\x20count='+d+'\x20error='+(b instanceof Error?b['message']:String(b)));}export function getFailMode(a){switch(a){case'irreversible':case'publish':case'amount':return'closed';case'standard':case'none':default:return'open';}}function buildInternalErrorResult(){return{'pass':![],'level':'irreversible','preview':{'level':'irreversible','operation':'unknown','irreversible':!![]},'rule_id':'internal_error'};}export function confirmGate(a,b,c,d,f){if(!isConfirmGateEnabled())return{'pass':!![]};if(c?.['confirmed']===!![])return{'pass':!![]};let g,h=null;try{g=CONFIRMATION_RULES['find'](l=>{try{return l['when'](a,b,c);}catch(m){logInternalError('rule_when:'+l['id'],m);if(getFailMode(l['level'])==='closed')throw m;return![];}});}catch(l){h=l;}if(h)return logInternalError('rule_search',h),buildInternalErrorResult();if(!g)return{'pass':!![]};if(getFailMode(g['level'])==='open'&&isPlanPreapproved(c))return{'pass':!![]};const i=resolveOverrideId(g['id'],a),j=i?f?.[i]:undefined;if(j==='auto')return{'pass':!![]};if(j!=='block'&&g['bypass_on_explicit_intent']&&d&&d['length']>0x0){const m=d['map'](o=>o['toLowerCase']()),n=g['bypass_on_explicit_intent']['some'](o=>m['some'](q=>q['includes'](o['toLowerCase']())));if(n)return{'pass':!![]};}let k;try{k=g['preview'](a,b,c);}catch(o){logInternalError('rule_preview:'+g['id'],o);if(getFailMode(g['level'])==='closed')return buildInternalErrorResult();return{'pass':!![]};}return{'pass':![],'level':g['level'],'preview':k,'rule_id':g['id']};}export function isExplicitlyConfirmed(a){return a?.['confirmed']===!![];}
@@ -1,3 +1,3 @@
1
1
  export { confirmGate, isConfirmGateEnabled, isExplicitlyConfirmed, type ConfirmResult, } from "./confirm-gate.js";
2
- export { renderPreview } from "./preview.js";
2
+ export { renderPreview, renderPreviewHuman } from "./preview.js";
3
3
  export { CONFIRMATION_RULES, DEFAULT_VALUE_WARNINGS, DEFAULT_AMOUNT_THRESHOLD, getAmountThreshold, formatAmount, collectDefaultWarnings, type ConfirmLevel, type OperationPreview, type ConfirmationRule, SAFETY_RULES_VERSION, } from "../knowledge/safety-rules.js";
@@ -1 +1 @@
1
- export{confirmGate,isConfirmGateEnabled,isExplicitlyConfirmed}from'./confirm-gate.js';export{renderPreview}from'./preview.js';export{CONFIRMATION_RULES,DEFAULT_VALUE_WARNINGS,DEFAULT_AMOUNT_THRESHOLD,getAmountThreshold,formatAmount,collectDefaultWarnings,SAFETY_RULES_VERSION}from'../knowledge/safety-rules.js';
1
+ export{confirmGate,isConfirmGateEnabled,isExplicitlyConfirmed}from'./confirm-gate.js';export{renderPreview,renderPreviewHuman}from'./preview.js';export{CONFIRMATION_RULES,DEFAULT_VALUE_WARNINGS,DEFAULT_AMOUNT_THRESHOLD,getAmountThreshold,formatAmount,collectDefaultWarnings,SAFETY_RULES_VERSION}from'../knowledge/safety-rules.js';
@@ -1,2 +1,3 @@
1
1
  import type { OperationPreview } from "../knowledge/safety-rules.js";
2
2
  export declare function renderPreview(p: OperationPreview): string;
3
+ export declare function renderPreviewHuman(p: OperationPreview): string;
@@ -1 +1 @@
1
- const LEVEL_LABEL={'none':'none','standard':'Standard\x20confirmation','amount':'Amount\x20confirmation','publish':'Publish\x20confirmation\x20(irreversible\x20lock)','irreversible':'Irreversible\x20operation\x20confirmation'},CONFIRMATION_REQUIRED_OPERATIONS=['guard\x20(CREATE\x20—\x20immutable,\x20cannot\x20be\x20edited\x20or\x20deleted)','service\x20(publish=true\x20—\x20locks\x20machine/order_allocators)','machine\x20(publish=true\x20—\x20locks\x20nodes/pairs/forwards)','arbitration\x20(verdict\x20—\x20irreversible)','payment\x20(send\x20—\x20irreversible)','treasury\x20(withdraw/external_withdraw/external_deposit\x20—\x20irreversible)','reward\x20/\x20treasury\x20/\x20service.compensation_fund_add\x20(amount-sensitive)','gen_passport\x20(gas-consuming\x20test)'];export function renderPreview(a){const b=[];b['push']('⚠️\x20\x20Confirmation\x20required\x20—\x20'+LEVEL_LABEL[a['level']]),b['push']('\x20\x20Operation:\x20'+a['operation']);if(a['object'])b['push']('\x20\x20Object:\x20'+a['object']);if(a['network'])b['push']('\x20\x20Network:\x20'+a['network']);if(a['account']!==undefined)b['push']('\x20\x20Account:\x20'+(a['account']===''?'(default)':a['account']));a['amount']&&b['push']('\x20\x20Amount:\x20'+a['amount']['human_readable']+'\x20('+a['amount']['value']+'\x20smallest\x20unit)'+(a['amount']['recipient']?'\x20→\x20'+a['amount']['recipient']:''));a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20Fields\x20becoming\x20immutable:\x20'+a['immutable_after']['join'](',\x20'));if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Warnings:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}a['irreversible']&&b['push']('\x20\x20⛔\x20This\x20operation\x20is\x20IRREVERSIBLE.\x20It\x20cannot\x20be\x20undone.');b['push'](''),b['push']('Confirm\x20by\x20re-calling\x20with\x20env.confirmed=true,\x20or\x20modify/cancel.'),b['push'](''),b['push']('Operations\x20that\x20require\x20env.confirmed=true:');for(const d of CONFIRMATION_REQUIRED_OPERATIONS){b['push']('\x20\x20-\x20'+d);}return b['push']('Example:\x20{\x22env\x22:\x20{\x22account\x22:\x20\x22...\x22,\x20\x22network\x22:\x20\x22testnet\x22,\x20\x22confirmed\x22:\x20true}}'),b['join']('\x0a');}
1
+ import{formatShortAddress}from'../persona/address-format.js';const LEVEL_LABEL={'none':'none','standard':'Standard\x20confirmation','amount':'Amount\x20confirmation','publish':'Publish\x20confirmation\x20(irreversible\x20lock)','irreversible':'Irreversible\x20operation\x20confirmation'},CONFIRMATION_REQUIRED_OPERATIONS=['guard\x20(CREATE\x20—\x20immutable,\x20cannot\x20be\x20edited\x20or\x20deleted)','service\x20(publish=true\x20—\x20locks\x20machine/order_allocators)','machine\x20(publish=true\x20—\x20locks\x20nodes/pairs/forwards)','arbitration\x20(verdict\x20—\x20irreversible)','payment\x20(send\x20—\x20irreversible)','treasury\x20(withdraw/external_withdraw/external_deposit\x20—\x20irreversible)','reward\x20/\x20treasury\x20/\x20service.compensation_fund_add\x20(amount-sensitive)','gen_passport\x20(gas-consuming\x20test)'];export function renderPreview(a){const b=[];b['push']('⚠️\x20\x20Confirmation\x20required\x20—\x20'+LEVEL_LABEL[a['level']]),b['push']('\x20\x20Operation:\x20'+a['operation']);if(a['object'])b['push']('\x20\x20Object:\x20'+a['object']);if(a['network'])b['push']('\x20\x20Network:\x20'+a['network']);if(a['account']!==undefined)b['push']('\x20\x20Account:\x20'+(a['account']===''?'(default)':a['account']));a['amount']&&b['push']('\x20\x20Amount:\x20'+a['amount']['human_readable']+'\x20('+a['amount']['value']+'\x20smallest\x20unit)'+(a['amount']['recipient']?'\x20→\x20'+a['amount']['recipient']:''));a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20Fields\x20becoming\x20immutable:\x20'+a['immutable_after']['join'](',\x20'));if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Warnings:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}a['irreversible']&&b['push']('\x20\x20⛔\x20This\x20operation\x20is\x20IRREVERSIBLE.\x20It\x20cannot\x20be\x20undone.');b['push'](''),b['push']('Confirm\x20by\x20re-calling\x20with\x20env.confirmed=true,\x20or\x20modify/cancel.'),b['push'](''),b['push']('Operations\x20that\x20require\x20env.confirmed=true:');for(const d of CONFIRMATION_REQUIRED_OPERATIONS){b['push']('\x20\x20-\x20'+d);}return b['push']('Example:\x20{\x22env\x22:\x20{\x22account\x22:\x20\x22...\x22,\x20\x22network\x22:\x20\x22testnet\x22,\x20\x22confirmed\x22:\x20true}}'),b['join']('\x0a');}const OPERATION_MEANINGS={'payment':'Send\x20a\x20payment\x20on-chain.\x20Funds\x20leave\x20your\x20account\x20and\x20are\x20credited\x20to\x20the\x20recipient.','service':'Publish\x20/\x20update\x20this\x20Service.\x20Publishing\x20locks\x20its\x20machine\x20and\x20order-allocator\x20configuration\x20—\x20further\x20changes\x20require\x20a\x20new\x20Service\x20version.','machine':'Publish\x20this\x20Machine\x20workflow.\x20Publishing\x20locks\x20its\x20nodes,\x20pairs\x20and\x20forwards\x20—\x20the\x20flow\x20cannot\x20be\x20redesigned\x20afterwards.','arbitration':'Issue\x20the\x20arbitration\x20verdict.\x20The\x20verdict\x20is\x20final\x20and\x20cannot\x20be\x20changed.','treasury':'Move\x20funds\x20in/out\x20of\x20a\x20Treasury.\x20Withdrawals\x20are\x20on-chain\x20transfers\x20and\x20cannot\x20be\x20undone.','reward':'Distribute\x20rewards\x20from\x20a\x20Service.\x20Funds\x20are\x20transferred\x20on-chain\x20immediately.','guard':'Create\x20a\x20Guard.\x20Guards\x20are\x20CREATE-only\x20and\x20immutable\x20—\x20they\x20can\x20never\x20be\x20edited\x20or\x20deleted;\x20changing\x20one\x20means\x20creating\x20a\x20new\x20Guard\x20and\x20rebinding.','progress':'Advance\x20an\x20order\x20(Progress\x20node).\x20Depending\x20on\x20the\x20node\x20this\x20may\x20release\x20funds\x20to\x20the\x20counterparty.','gen_passport':'Run\x20a\x20Guard\x20test\x20(generate\x20a\x20test\x20Passport).\x20This\x20consumes\x20gas\x20but\x20changes\x20nothing\x20permanent.'};function fallbackMeaning(a){return'Execute\x20the\x20\x22'+a+'\x22\x20operation\x20on-chain.';}function shortish(a){return/^(0x)?[0-9a-fA-F]{8,64}$/['test'](a)?formatShortAddress(a):a;}export function renderPreviewHuman(a){const b=[];b['push']('What\x20this\x20does'),b['push']('\x20\x20'+(OPERATION_MEANINGS[a['operation']]??fallbackMeaning(a['operation']))),b['push'](''),b['push']('How\x20it\x20will\x20run');if(a['object'])b['push']('\x20\x20Object:\x20\x20\x20'+shortish(a['object']));a['account']!==undefined&&b['push']('\x20\x20Account:\x20\x20'+(a['account']===''?'(current\x20account)':shortish(a['account'])));if(a['network'])b['push']('\x20\x20Network:\x20\x20'+a['network']);a['amount']&&b['push']('\x20\x20Amount:\x20\x20\x20'+a['amount']['human_readable']+(a['amount']['recipient']?'\x20\x20→\x20\x20to\x20'+shortish(a['amount']['recipient']):''));b['push'](''),b['push']('What\x20happens\x20after\x20you\x20confirm');a['immutable_after']&&a['immutable_after']['length']>0x0&&b['push']('\x20\x20-\x20These\x20become\x20PERMANENT:\x20'+a['immutable_after']['join'](',\x20'));a['irreversible']&&b['push']('\x20\x20-\x20The\x20operation\x20is\x20IRREVERSIBLE\x20—\x20it\x20cannot\x20be\x20undone\x20or\x20cancelled.');if(a['warnings']&&a['warnings']['length']>0x0){b['push']('\x20\x20Notes:');for(const c of a['warnings'])b['push']('\x20\x20\x20\x20-\x20'+c);}return!(a['immutable_after']&&a['immutable_after']['length']>0x0)&&!a['irreversible']&&!(a['warnings']&&a['warnings']['length']>0x0)&&b['push']('\x20\x20-\x20The\x20operation\x20is\x20submitted\x20to\x20the\x20network\x20immediately.'),b['join']('\x0a');}
@@ -200,7 +200,7 @@ export declare const CallAllocation_InputSchema: z.ZodObject<{
200
200
  no_auto_register: z.ZodOptional<z.ZodBoolean>;
201
201
  confirmed: z.ZodOptional<z.ZodBoolean>;
202
202
  user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
203
- project: z.ZodOptional<z.ZodString>;
203
+ plan_approval: z.ZodOptional<z.ZodString>;
204
204
  client_schema_version: z.ZodOptional<z.ZodString>;
205
205
  schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
206
206
  dry_run: z.ZodOptional<z.ZodBoolean>;
@@ -335,7 +335,7 @@ export declare const CallArbitration_InputSchema: z.ZodObject<{
335
335
  no_auto_register: z.ZodOptional<z.ZodBoolean>;
336
336
  confirmed: z.ZodOptional<z.ZodBoolean>;
337
337
  user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
338
- project: z.ZodOptional<z.ZodString>;
338
+ plan_approval: z.ZodOptional<z.ZodString>;
339
339
  client_schema_version: z.ZodOptional<z.ZodString>;
340
340
  schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
341
341
  dry_run: z.ZodOptional<z.ZodBoolean>;
@@ -79,7 +79,7 @@ export declare const CallEnvSchema: z.ZodObject<{
79
79
  no_auto_register: z.ZodOptional<z.ZodBoolean>;
80
80
  confirmed: z.ZodOptional<z.ZodBoolean>;
81
81
  user_intent_phrases: z.ZodOptional<z.ZodArray<z.ZodString>>;
82
- project: z.ZodOptional<z.ZodString>;
82
+ plan_approval: z.ZodOptional<z.ZodString>;
83
83
  client_schema_version: z.ZodOptional<z.ZodString>;
84
84
  schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
85
85
  dry_run: z.ZodOptional<z.ZodBoolean>;