@wowok/agent-mcp 2.7.7 → 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 (441) 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/customer/index.d.ts +3 -4
  5. package/dist/customer/index.js +1 -1
  6. package/dist/customer/info-puzzle.js +1 -1
  7. package/dist/customer/order-monitor.d.ts +0 -9
  8. package/dist/customer/order-monitor.js +1 -1
  9. package/dist/customer/order-strategy.d.ts +0 -19
  10. package/dist/customer/order-strategy.js +1 -1
  11. package/dist/customer/reminder-system.d.ts +0 -5
  12. package/dist/customer/reminder-system.js +1 -1
  13. package/dist/evaluation/game-strategy.js +1 -1
  14. package/dist/evaluation/injection.d.ts +6 -0
  15. package/dist/evaluation/injection.js +1 -0
  16. package/dist/evaluation/node-game.js +1 -1
  17. package/dist/examples/machine-multisig-threshold.json +1 -0
  18. package/dist/examples/rental-ziroom-machine-create.json +1 -2
  19. package/dist/examples/rental-ziroom-permission-create.json +1 -2
  20. package/dist/examples/rental-ziroom-service-create.json +1 -2
  21. package/dist/experience/experience-reuse.js +1 -1
  22. package/dist/experience/index.d.ts +2 -1
  23. package/dist/experience/index.js +1 -1
  24. package/dist/experience/persistence-config.d.ts +6 -0
  25. package/dist/experience/persistence-config.js +1 -0
  26. package/dist/experience/persistence.d.ts +21 -0
  27. package/dist/experience/persistence.js +1 -0
  28. package/dist/experience/realtime-feedback.js +1 -1
  29. package/dist/experience/user-profile.js +1 -1
  30. package/dist/extensions/business-modules.d.ts +1 -1
  31. package/dist/extensions/capability-manifest.d.ts +1 -1
  32. package/dist/extensions/types.d.ts +1 -1
  33. package/dist/goal/GoalClassifier.d.ts +17 -0
  34. package/dist/goal/GoalClassifier.js +1 -0
  35. package/dist/goal/GoalEngine.d.ts +120 -0
  36. package/dist/goal/GoalEngine.js +1 -0
  37. package/dist/goal/GoalStore.d.ts +27 -0
  38. package/dist/goal/GoalStore.js +1 -0
  39. package/dist/goal/plan-approval.d.ts +5 -0
  40. package/dist/goal/plan-approval.js +1 -0
  41. package/dist/goal/types.d.ts +76 -0
  42. package/dist/goal/types.js +1 -0
  43. package/dist/harness/index.d.ts +2 -7
  44. package/dist/harness/index.js +1 -1
  45. package/dist/harness/plan.d.ts +1 -1
  46. package/dist/harness/recover.js +1 -1
  47. package/dist/harness/types.d.ts +1 -36
  48. package/dist/harness/verify.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/intent/enrich.js +1 -1
  51. package/dist/intent/matcher.js +1 -1
  52. package/dist/intent/types.d.ts +1 -1
  53. package/dist/intent/types.js +1 -1
  54. package/dist/knowledge/account-marks.d.ts +35 -0
  55. package/dist/knowledge/account-marks.js +1 -0
  56. package/dist/knowledge/arbitration-ledger.js +1 -1
  57. package/dist/knowledge/audit-rules.d.ts +3 -1
  58. package/dist/knowledge/audit-rules.js +1 -1
  59. package/dist/knowledge/contract-invariants.d.ts +53 -0
  60. package/dist/knowledge/contract-invariants.js +1 -0
  61. package/dist/knowledge/dynamic-pricing.d.ts +0 -2
  62. package/dist/knowledge/dynamic-pricing.js +1 -1
  63. package/dist/knowledge/event-semantics.d.ts +20 -0
  64. package/dist/knowledge/event-semantics.js +1 -0
  65. package/dist/knowledge/examples-scanner-cli.js +1 -1
  66. package/dist/knowledge/examples-scanner.js +1 -1
  67. package/dist/knowledge/glossary.js +1 -1
  68. package/dist/knowledge/goal-completion.d.ts +19 -0
  69. package/dist/knowledge/goal-completion.js +1 -0
  70. package/dist/knowledge/guard-submission-prompt.js +1 -1
  71. package/dist/knowledge/guard-translation.js +1 -1
  72. package/dist/knowledge/immutability.d.ts +11 -0
  73. package/dist/knowledge/immutability.js +1 -0
  74. package/dist/knowledge/index.d.ts +13 -6
  75. package/dist/knowledge/index.js +1 -1
  76. package/dist/knowledge/industry-registry.js +1 -1
  77. package/dist/knowledge/intent-metrics.d.ts +1 -1
  78. package/dist/knowledge/jsonrpc-enum.d.ts +37 -0
  79. package/dist/knowledge/jsonrpc-enum.js +1 -0
  80. package/dist/knowledge/machine-confirm.js +1 -1
  81. package/dist/knowledge/machine-risk.js +1 -1
  82. package/dist/knowledge/machine-topology.d.ts +11 -0
  83. package/dist/knowledge/machine-topology.js +1 -1
  84. package/dist/knowledge/machine-translation.js +1 -1
  85. package/dist/knowledge/market-metrics.d.ts +11 -0
  86. package/dist/knowledge/market-metrics.js +1 -1
  87. package/dist/knowledge/mcp-schema-audit-cli.js +1 -1
  88. package/dist/knowledge/mcp-schema-audit.d.ts +1 -0
  89. package/dist/knowledge/mcp-schema-audit.js +1 -1
  90. package/dist/knowledge/messenger-guard-guidance.d.ts +17 -0
  91. package/dist/knowledge/messenger-guard-guidance.js +1 -0
  92. package/dist/knowledge/operation-dictionary.d.ts +18 -0
  93. package/dist/knowledge/operation-dictionary.js +1 -0
  94. package/dist/knowledge/passport-confirm.js +1 -1
  95. package/dist/knowledge/passport-puzzle.js +1 -1
  96. package/dist/knowledge/passport-translation.js +1 -1
  97. package/dist/knowledge/proof-risk.js +1 -1
  98. package/dist/knowledge/safety-rules.js +1 -1
  99. package/dist/knowledge/service-ledger.js +1 -1
  100. package/dist/knowledge/service-risk.js +1 -1
  101. package/dist/knowledge/service-translation.js +1 -1
  102. package/dist/knowledge/supply-chain.d.ts +24 -0
  103. package/dist/knowledge/supply-chain.js +1 -0
  104. package/dist/knowledge/template-registry.js +1 -1
  105. package/dist/knowledge/tools-reference.js +1 -1
  106. package/dist/knowledge/trust-metrics.d.ts +27 -2
  107. package/dist/knowledge/trust-metrics.js +1 -1
  108. package/dist/knowledge/workflow-guidance.d.ts +22 -0
  109. package/dist/knowledge/workflow-guidance.js +1 -1
  110. package/dist/knowledge/workspace-lists.d.ts +56 -0
  111. package/dist/knowledge/workspace-lists.js +1 -0
  112. package/dist/loop-engineering/context-collect.d.ts +1 -1
  113. package/dist/monitor/EventRouter.d.ts +10 -0
  114. package/dist/monitor/EventRouter.js +1 -0
  115. package/dist/monitor/EventStore.d.ts +98 -0
  116. package/dist/monitor/EventStore.js +1 -0
  117. package/dist/monitor/MonitorLoop.d.ts +79 -0
  118. package/dist/monitor/MonitorLoop.js +1 -0
  119. package/dist/monitor/ProblemBridge.d.ts +32 -0
  120. package/dist/monitor/ProblemBridge.js +1 -0
  121. package/dist/monitor/ScopeResolver.d.ts +59 -0
  122. package/dist/monitor/ScopeResolver.js +1 -0
  123. package/dist/monitor/SubscriptionStore.d.ts +13 -0
  124. package/dist/monitor/SubscriptionStore.js +1 -0
  125. package/dist/monitor/normalize.d.ts +8 -0
  126. package/dist/monitor/normalize.js +1 -0
  127. package/dist/monitor/types.d.ts +89 -0
  128. package/dist/monitor/types.js +1 -0
  129. package/dist/participation/radar-core.d.ts +0 -1
  130. package/dist/participation/radar-core.js +1 -1
  131. package/dist/persona/address-format.d.ts +6 -0
  132. package/dist/persona/address-format.js +1 -0
  133. package/dist/persona/analyzer.js +1 -1
  134. package/dist/persona/distill-goal.d.ts +20 -0
  135. package/dist/persona/distill-goal.js +1 -0
  136. package/dist/persona/index.d.ts +5 -0
  137. package/dist/persona/index.js +1 -1
  138. package/dist/persona/model.js +1 -1
  139. package/dist/persona/types.d.ts +1 -1
  140. package/dist/persona/types.js +1 -1
  141. package/dist/playbooks/service-build/business-puzzle.js +1 -0
  142. package/dist/{project → playbooks/service-build}/context-assembly.d.ts +9 -4
  143. package/dist/playbooks/service-build/context-assembly.js +1 -0
  144. package/dist/{project → playbooks/service-build}/game-theory.d.ts +1 -1
  145. package/dist/playbooks/service-build/index.d.ts +14 -0
  146. package/dist/playbooks/service-build/index.js +1 -0
  147. package/dist/{project → playbooks/service-build}/intent-analyzer.d.ts +1 -1
  148. package/dist/playbooks/service-build/intent-analyzer.js +1 -0
  149. package/dist/playbooks/service-build/machine-nodes.d.ts +25 -0
  150. package/dist/playbooks/service-build/machine-nodes.js +1 -0
  151. package/dist/playbooks/service-build/machine-panorama.d.ts +43 -0
  152. package/dist/playbooks/service-build/machine-panorama.js +1 -0
  153. package/dist/{project → playbooks/service-build}/merchant-guide.d.ts +1 -1
  154. package/dist/playbooks/service-build/merchant-guide.js +1 -0
  155. package/dist/{project → playbooks/service-build}/mode-actions.d.ts +2 -2
  156. package/dist/playbooks/service-build/mode-actions.js +1 -0
  157. package/dist/playbooks/service-build/namespace.d.ts +2 -0
  158. package/dist/playbooks/service-build/namespace.js +1 -0
  159. package/dist/playbooks/service-build/object-panorama.d.ts +178 -0
  160. package/dist/playbooks/service-build/object-panorama.js +1 -0
  161. package/dist/playbooks/service-build/object-type.d.ts +1 -0
  162. package/dist/playbooks/service-build/object-type.js +1 -0
  163. package/dist/{project → playbooks/service-build}/participation-radar.d.ts +4 -5
  164. package/dist/playbooks/service-build/participation-radar.js +1 -0
  165. package/dist/{project → playbooks/service-build}/pipeline-actions.d.ts +9 -9
  166. package/dist/playbooks/service-build/pipeline-actions.js +1 -0
  167. package/dist/playbooks/service-build/process.d.ts +6 -0
  168. package/dist/playbooks/service-build/process.js +1 -0
  169. package/dist/playbooks/service-build/risk-aggregator.js +1 -0
  170. package/dist/{project → playbooks/service-build}/semantic-graph.d.ts +2 -2
  171. package/dist/playbooks/service-build/service-panorama.d.ts +164 -0
  172. package/dist/playbooks/service-build/service-panorama.js +1 -0
  173. package/dist/review/arb.d.ts +6 -0
  174. package/dist/review/arb.js +1 -0
  175. package/dist/review/demand.d.ts +3 -0
  176. package/dist/review/demand.js +1 -0
  177. package/dist/review/index.d.ts +3 -0
  178. package/dist/review/index.js +1 -0
  179. package/dist/review/machine.d.ts +3 -0
  180. package/dist/review/machine.js +1 -0
  181. package/dist/review/order.d.ts +9 -0
  182. package/dist/review/order.js +1 -0
  183. package/dist/review/progress.d.ts +3 -0
  184. package/dist/review/progress.js +1 -0
  185. package/dist/review/repository.d.ts +3 -0
  186. package/dist/review/repository.js +1 -0
  187. package/dist/review/service.d.ts +5 -0
  188. package/dist/review/service.js +1 -0
  189. package/dist/review/types.d.ts +156 -0
  190. package/dist/review/types.js +1 -0
  191. package/dist/role/derivation.d.ts +19 -2
  192. package/dist/role/derivation.js +1 -1
  193. package/dist/role/index.d.ts +2 -2
  194. package/dist/role/index.js +1 -1
  195. package/dist/role/model.js +1 -1
  196. package/dist/role/resolution.d.ts +16 -0
  197. package/dist/role/resolution.js +1 -1
  198. package/dist/role/types.d.ts +1 -1
  199. package/dist/role/types.js +1 -1
  200. package/dist/rules.d.ts +2 -2
  201. package/dist/rules.js +1 -1
  202. package/dist/safety/confirm-gate.js +1 -1
  203. package/dist/safety/index.d.ts +1 -1
  204. package/dist/safety/index.js +1 -1
  205. package/dist/safety/preview.d.ts +1 -0
  206. package/dist/safety/preview.js +1 -1
  207. package/dist/schema/call/allocation.d.ts +2 -1
  208. package/dist/schema/call/arbitration.d.ts +5 -4
  209. package/dist/schema/call/arbitration.js +1 -1
  210. package/dist/schema/call/base.d.ts +17 -1
  211. package/dist/schema/call/base.js +1 -1
  212. package/dist/schema/call/bridge.d.ts +11 -4
  213. package/dist/schema/call/contact.d.ts +2 -1
  214. package/dist/schema/call/contact.js +1 -1
  215. package/dist/schema/call/demand.d.ts +2 -1
  216. package/dist/schema/call/demand.js +1 -1
  217. package/dist/schema/call/guard.d.ts +6 -3
  218. package/dist/schema/call/handler.d.ts +0 -3
  219. package/dist/schema/call/handler.js +1 -1
  220. package/dist/schema/call/machine.d.ts +4 -2
  221. package/dist/schema/call/machine.js +1 -1
  222. package/dist/schema/call/order.d.ts +2 -1
  223. package/dist/schema/call/payment.d.ts +2 -1
  224. package/dist/schema/call/permission.d.ts +2 -1
  225. package/dist/schema/call/personal.d.ts +39 -1
  226. package/dist/schema/call/personal.js +1 -1
  227. package/dist/schema/call/progress.d.ts +2 -1
  228. package/dist/schema/call/proof.d.ts +4 -2
  229. package/dist/schema/call/repository.d.ts +6 -5
  230. package/dist/schema/call/repository.js +1 -1
  231. package/dist/schema/call/reward.d.ts +2 -13
  232. package/dist/schema/call/reward.js +1 -1
  233. package/dist/schema/call/semantic.d.ts +3 -2
  234. package/dist/schema/call/semantic.js +1 -1
  235. package/dist/schema/call/service.d.ts +2 -1
  236. package/dist/schema/call/service.js +1 -1
  237. package/dist/schema/call/treasury.d.ts +2 -1
  238. package/dist/schema/common/index.js +1 -1
  239. package/dist/schema/evaluation/index.d.ts +146 -0
  240. package/dist/schema/evaluation/index.js +1 -1
  241. package/dist/schema/goal/index.d.ts +317 -0
  242. package/dist/schema/goal/index.js +1 -0
  243. package/dist/schema/goal/planning.d.ts +465 -0
  244. package/dist/schema/goal/planning.js +1 -0
  245. package/dist/schema/index.d.ts +2 -2
  246. package/dist/schema/index.js +1 -1
  247. package/dist/schema/industry-pack/index.d.ts +265 -1
  248. package/dist/schema/industry-pack/index.js +1 -1
  249. package/dist/schema/industry-pack/modes.d.ts +268 -0
  250. package/dist/schema/industry-pack/modes.js +1 -0
  251. package/dist/schema/intent-radar/index.d.ts +30 -3
  252. package/dist/schema/intent-radar/index.js +1 -1
  253. package/dist/schema/local/index.d.ts +9 -0
  254. package/dist/schema/local/index.js +1 -1
  255. package/dist/schema/messenger/index.d.ts +54 -0
  256. package/dist/schema/messenger/index.js +1 -1
  257. package/dist/schema/operations.d.ts +1147 -94
  258. package/dist/schema/operations.js +1 -1
  259. package/dist/schema/permission/index.d.ts +18 -0
  260. package/dist/schema/permission/index.js +1 -1
  261. package/dist/schema/persona/index.d.ts +40 -0
  262. package/dist/schema/persona/index.js +1 -1
  263. package/dist/schema/query/bi.d.ts +783 -0
  264. package/dist/schema/query/bi.js +1 -0
  265. package/dist/schema/query/index.d.ts +1471 -208
  266. package/dist/schema/query/index.js +1 -1
  267. package/dist/schema/schema-version.js +1 -1
  268. package/dist/schema/trust/index.d.ts +17 -0
  269. package/dist/schema/trust/index.js +1 -1
  270. package/dist/schema/utils/skills-recommendation.d.ts +0 -1
  271. package/dist/schema/utils/skills-recommendation.js +1 -1
  272. package/dist/schema/watch/index.d.ts +204 -0
  273. package/dist/schema/watch/index.js +1 -0
  274. package/dist/schema/workflow/index.d.ts +301 -0
  275. package/dist/schema/workflow/index.js +1 -1
  276. package/dist/schema-query-impl/index.js +1 -1
  277. package/dist/schemas/account_operation.output.json +8 -5
  278. package/dist/schemas/account_operation.schema.json +2 -2
  279. package/dist/schemas/bridge_operation.output.json +7 -4
  280. package/dist/schemas/bridge_operation.schema.json +37 -21
  281. package/dist/schemas/config_operation.output.json +1 -1
  282. package/dist/schemas/config_operation.schema.json +1 -1
  283. package/dist/schemas/evaluation_operation.output.json +276 -1
  284. package/dist/schemas/evaluation_operation.schema.json +307 -0
  285. package/dist/schemas/goal_operation.schema.json +1016 -0
  286. package/dist/schemas/guard2file.schema.json +9 -5
  287. package/dist/schemas/index.json +22 -11
  288. package/dist/schemas/industry_pack_operation.output.json +898 -0
  289. package/dist/schemas/industry_pack_operation.schema.json +217 -2
  290. package/dist/schemas/intent_radar.output.json +20 -2
  291. package/dist/schemas/intent_radar.schema.json +10 -1
  292. package/dist/schemas/local_info_operation.output.json +7 -4
  293. package/dist/schemas/local_mark_operation.output.json +7 -4
  294. package/dist/schemas/machineNode2file.schema.json +9 -5
  295. package/dist/schemas/messenger_operation.output.json +107 -4
  296. package/dist/schemas/messenger_operation.schema.json +98 -0
  297. package/dist/schemas/monitor_events.output.json +1435 -0
  298. package/dist/schemas/monitor_events.schema.json +85 -0
  299. package/dist/schemas/monitor_subscription.output.json +1462 -0
  300. package/dist/schemas/monitor_subscription.schema.json +327 -0
  301. package/dist/schemas/onchain_events.output.json +241 -18
  302. package/dist/schemas/onchain_events.schema.json +20 -0
  303. package/dist/schemas/onchain_operations.output.json +12 -7
  304. package/dist/schemas/onchain_operations.schema.json +570 -478
  305. package/dist/schemas/onchain_operations_allocation.schema.json +14 -10
  306. package/dist/schemas/onchain_operations_arbitration.schema.json +17 -12
  307. package/dist/schemas/onchain_operations_contact.schema.json +13 -9
  308. package/dist/schemas/onchain_operations_demand.schema.json +13 -9
  309. package/dist/schemas/onchain_operations_gen_passport.schema.json +9 -5
  310. package/dist/schemas/onchain_operations_gen_proof.schema.json +9 -5
  311. package/dist/schemas/onchain_operations_guard.schema.json +9 -5
  312. package/dist/schemas/onchain_operations_machine.schema.json +17 -13
  313. package/dist/schemas/onchain_operations_order.schema.json +12 -8
  314. package/dist/schemas/onchain_operations_payment.schema.json +10 -6
  315. package/dist/schemas/onchain_operations_permission.schema.json +12 -8
  316. package/dist/schemas/onchain_operations_personal.schema.json +47 -5
  317. package/dist/schemas/onchain_operations_progress.schema.json +12 -8
  318. package/dist/schemas/onchain_operations_proof.schema.json +9 -5
  319. package/dist/schemas/onchain_operations_repository.schema.json +295 -310
  320. package/dist/schemas/onchain_operations_reward.schema.json +17 -13
  321. package/dist/schemas/onchain_operations_service.schema.json +21 -17
  322. package/dist/schemas/onchain_operations_treasury.schema.json +17 -13
  323. package/dist/schemas/onchain_table_data.output.json +4125 -239
  324. package/dist/schemas/onchain_table_data.schema.json +326 -15
  325. package/dist/schemas/permission_operation.output.json +32 -0
  326. package/dist/schemas/permission_operation.schema.json +6 -2
  327. package/dist/schemas/persona_operation.output.json +145 -0
  328. package/dist/schemas/persona_operation.schema.json +28 -2
  329. package/dist/schemas/query_toolkit.output.json +3384 -2040
  330. package/dist/schemas/query_toolkit.schema.json +548 -9
  331. package/dist/schemas/trust_score.output.json +38 -0
  332. package/dist/schemas/trust_score.schema.json +32 -0
  333. package/dist/schemas/watch_operation.output.json +827 -0
  334. package/dist/schemas/watch_operation.schema.json +145 -0
  335. package/dist/schemas/workflow_operation.output.json +263 -5
  336. package/dist/schemas/workflow_operation.schema.json +599 -4
  337. package/dist/task/ProcessStore.d.ts +81 -0
  338. package/dist/task/ProcessStore.js +1 -0
  339. package/dist/task/playbook.d.ts +11 -0
  340. package/dist/task/playbook.js +1 -0
  341. package/dist/task/stage-gate.d.ts +22 -0
  342. package/dist/task/stage-gate.js +1 -0
  343. package/dist/{project → task}/substep-trace.d.ts +6 -45
  344. package/dist/task/types.d.ts +120 -0
  345. package/dist/task/types.js +1 -0
  346. package/dist/tools/handlers/config.js +1 -1
  347. package/dist/tools/handlers/evaluation.js +1 -1
  348. package/dist/tools/handlers/goal.d.ts +4 -0
  349. package/dist/tools/handlers/goal.js +1 -0
  350. package/dist/tools/handlers/industry-pack.js +1 -1
  351. package/dist/tools/handlers/intent-radar.js +1 -1
  352. package/dist/tools/handlers/messenger.js +1 -1
  353. package/dist/tools/handlers/monitor.d.ts +26 -0
  354. package/dist/tools/handlers/monitor.js +1 -0
  355. package/dist/tools/handlers/network.d.ts +1 -0
  356. package/dist/tools/handlers/network.js +1 -0
  357. package/dist/tools/handlers/onchain.js +1 -1
  358. package/dist/tools/handlers/permission.js +1 -1
  359. package/dist/tools/handlers/persona.js +1 -1
  360. package/dist/tools/handlers/query.js +1 -1
  361. package/dist/tools/handlers/trust.d.ts +14 -0
  362. package/dist/tools/handlers/trust.js +1 -1
  363. package/dist/tools/handlers/watch.d.ts +2 -0
  364. package/dist/tools/handlers/watch.js +1 -0
  365. package/dist/tools/handlers/workflow.js +1 -1
  366. package/dist/tools/index.d.ts +4 -0
  367. package/dist/tools/index.js +1 -1
  368. package/dist/tools/shared.js +1 -1
  369. package/dist/tools/wrap.js +1 -1
  370. package/package.json +5 -4
  371. package/dist/customer/post-purchase.d.ts +0 -44
  372. package/dist/customer/post-purchase.js +0 -1
  373. package/dist/harness/checkpoint.d.ts +0 -8
  374. package/dist/harness/checkpoint.js +0 -1
  375. package/dist/knowledge/deployment-scanner.d.ts +0 -66
  376. package/dist/knowledge/deployment-scanner.js +0 -1
  377. package/dist/project/business-puzzle.js +0 -1
  378. package/dist/project/context-assembly.js +0 -1
  379. package/dist/project/deployment-bridge.d.ts +0 -5
  380. package/dist/project/deployment-bridge.js +0 -1
  381. package/dist/project/deployment-doc.d.ts +0 -190
  382. package/dist/project/deployment-doc.js +0 -1
  383. package/dist/project/edit-planner.d.ts +0 -123
  384. package/dist/project/edit-planner.js +0 -1
  385. package/dist/project/evaluation-fix.spec.d.ts +0 -1
  386. package/dist/project/evaluation-fix.spec.js +0 -1
  387. package/dist/project/evaluation.d.ts +0 -127
  388. package/dist/project/evaluation.js +0 -1
  389. package/dist/project/graph-builder.d.ts +0 -51
  390. package/dist/project/graph-builder.js +0 -1
  391. package/dist/project/graph.d.ts +0 -70
  392. package/dist/project/graph.js +0 -1
  393. package/dist/project/handlers.d.ts +0 -540
  394. package/dist/project/handlers.js +0 -1
  395. package/dist/project/index.d.ts +0 -91
  396. package/dist/project/index.js +0 -1
  397. package/dist/project/intent-analyzer.js +0 -1
  398. package/dist/project/machine-nodes.d.ts +0 -2
  399. package/dist/project/machine-nodes.js +0 -1
  400. package/dist/project/merchant-guide.js +0 -1
  401. package/dist/project/migration.d.ts +0 -22
  402. package/dist/project/migration.js +0 -1
  403. package/dist/project/mode-actions.js +0 -1
  404. package/dist/project/namespace.d.ts +0 -72
  405. package/dist/project/namespace.js +0 -1
  406. package/dist/project/participation-radar.js +0 -1
  407. package/dist/project/pipeline-actions.js +0 -1
  408. package/dist/project/project-store.d.ts +0 -110
  409. package/dist/project/project-store.js +0 -1
  410. package/dist/project/query.d.ts +0 -43
  411. package/dist/project/query.js +0 -1
  412. package/dist/project/risk-aggregator.js +0 -1
  413. package/dist/project/rollback-policy.d.ts +0 -45
  414. package/dist/project/rollback-policy.js +0 -1
  415. package/dist/project/semantic-assembler.d.ts +0 -93
  416. package/dist/project/semantic-assembler.js +0 -1
  417. package/dist/project/stage-gate.d.ts +0 -53
  418. package/dist/project/stage-gate.js +0 -1
  419. package/dist/project/task-tracker.d.ts +0 -26
  420. package/dist/project/task-tracker.js +0 -1
  421. package/dist/schema/project/index.d.ts +0 -2015
  422. package/dist/schema/project/index.js +0 -1
  423. package/dist/schema/task-status.d.ts +0 -62
  424. package/dist/schema/task-status.js +0 -1
  425. package/dist/schemas/project_operation.output.json +0 -7877
  426. package/dist/schemas/project_operation.schema.json +0 -1133
  427. package/dist/schemas/query_task_status.output.json +0 -211
  428. package/dist/schemas/query_task_status.schema.json +0 -18
  429. package/dist/tools/handlers/project.d.ts +0 -2
  430. package/dist/tools/handlers/project.js +0 -1
  431. package/dist/tools/handlers/task-status.d.ts +0 -2
  432. package/dist/tools/handlers/task-status.js +0 -1
  433. /package/dist/{project → playbooks/service-build}/business-puzzle.d.ts +0 -0
  434. /package/dist/{project → playbooks/service-build}/game-theory.js +0 -0
  435. /package/dist/{project → playbooks/service-build}/reverse-mapping.d.ts +0 -0
  436. /package/dist/{project → playbooks/service-build}/reverse-mapping.js +0 -0
  437. /package/dist/{project → playbooks/service-build}/risk-aggregator.d.ts +0 -0
  438. /package/dist/{project → playbooks/service-build}/semantic-graph.js +0 -0
  439. /package/dist/{project → playbooks/service-build}/workflow-design-assessment.d.ts +0 -0
  440. /package/dist/{project → playbooks/service-build}/workflow-design-assessment.js +0 -0
  441. /package/dist/{project → task}/substep-trace.js +0 -0
@@ -15,6 +15,12 @@ export declare const WorkflowForwardViewSchema: z.ZodObject<{
15
15
  weight: z.ZodNumber;
16
16
  threshold: z.ZodNumber;
17
17
  guard: z.ZodOptional<z.ZodString>;
18
+ guard_submissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
19
+ identifier: z.ZodNumber;
20
+ name: z.ZodString;
21
+ value_type: z.ZodString;
22
+ object_type: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>>>;
18
24
  operator_kind: z.ZodEnum<{
19
25
  order_holder: "order_holder";
20
26
  permission_index: "permission_index";
@@ -29,16 +35,30 @@ export declare const WorkflowForwardViewSchema: z.ZodObject<{
29
35
  }, z.core.$strip>;
30
36
  export declare const WorkflowTaskSchema: z.ZodObject<{
31
37
  progress: z.ZodString;
38
+ progress_name: z.ZodOptional<z.ZodString>;
32
39
  current: z.ZodString;
33
40
  machine: z.ZodString;
41
+ machine_name: z.ZodOptional<z.ZodString>;
34
42
  task: z.ZodNullable<z.ZodString>;
43
+ task_name: z.ZodOptional<z.ZodString>;
35
44
  service: z.ZodOptional<z.ZodString>;
45
+ service_name: z.ZodOptional<z.ZodString>;
46
+ context_repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
+ address: z.ZodString;
48
+ name: z.ZodOptional<z.ZodString>;
49
+ }, z.core.$strip>>>;
36
50
  options: z.ZodArray<z.ZodObject<{
37
51
  next_node: z.ZodString;
38
52
  forward: z.ZodString;
39
53
  weight: z.ZodNumber;
40
54
  threshold: z.ZodNumber;
41
55
  guard: z.ZodOptional<z.ZodString>;
56
+ guard_submissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
+ identifier: z.ZodNumber;
58
+ name: z.ZodString;
59
+ value_type: z.ZodString;
60
+ object_type: z.ZodOptional<z.ZodString>;
61
+ }, z.core.$strip>>>;
42
62
  operator_kind: z.ZodEnum<{
43
63
  order_holder: "order_holder";
44
64
  permission_index: "permission_index";
@@ -52,6 +72,9 @@ export declare const WorkflowTaskSchema: z.ZodObject<{
52
72
  }, z.core.$strip>>;
53
73
  }, z.core.$strip>>;
54
74
  terminal: z.ZodBoolean;
75
+ actionable: z.ZodBoolean;
76
+ history_count: z.ZodOptional<z.ZodNumber>;
77
+ current_time: z.ZodOptional<z.ZodNumber>;
55
78
  }, z.core.$strip>;
56
79
  export declare const WorkflowOperationInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
57
80
  action: z.ZodLiteral<"list">;
@@ -79,6 +102,86 @@ export declare const WorkflowOperationInputSchema: z.ZodDiscriminatedUnion<[z.Zo
79
102
  }>;
80
103
  message: z.ZodOptional<z.ZodString>;
81
104
  }, z.core.$strict>;
105
+ submission: z.ZodOptional<z.ZodObject<{
106
+ type: z.ZodLiteral<"submission">;
107
+ guard: z.ZodArray<z.ZodObject<{
108
+ object: z.ZodString;
109
+ impack: z.ZodBoolean;
110
+ }, z.core.$strict>>;
111
+ submission: z.ZodArray<z.ZodObject<{
112
+ guard: z.ZodString;
113
+ submission: z.ZodArray<z.ZodObject<{
114
+ identifier: z.ZodNumber;
115
+ b_submission: z.ZodBoolean;
116
+ value_type: z.ZodUnion<readonly [z.ZodLiteral<import("@wowok/wowok").ValueType.Bool>, z.ZodLiteral<import("@wowok/wowok").ValueType.Address>, z.ZodLiteral<import("@wowok/wowok").ValueType.String>, z.ZodLiteral<import("@wowok/wowok").ValueType.U8>, z.ZodLiteral<import("@wowok/wowok").ValueType.U16>, z.ZodLiteral<import("@wowok/wowok").ValueType.U32>, z.ZodLiteral<import("@wowok/wowok").ValueType.U64>, z.ZodLiteral<import("@wowok/wowok").ValueType.U128>, z.ZodLiteral<import("@wowok/wowok").ValueType.U256>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecBool>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecAddress>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecString>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecU8>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecU16>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecU32>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecU64>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecU128>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecU256>, z.ZodLiteral<import("@wowok/wowok").ValueType.VecVecU8>, z.ZodLiteral<"Bool">, z.ZodLiteral<"Address">, z.ZodLiteral<"String">, z.ZodLiteral<"U8">, z.ZodLiteral<"U16">, z.ZodLiteral<"U32">, z.ZodLiteral<"U64">, z.ZodLiteral<"U128">, z.ZodLiteral<"U256">, z.ZodLiteral<"VecBool">, z.ZodLiteral<"VecAddress">, z.ZodLiteral<"VecString">, z.ZodLiteral<"VecU8">, z.ZodLiteral<"VecU16">, z.ZodLiteral<"VecU32">, z.ZodLiteral<"VecU64">, z.ZodLiteral<"VecU128">, z.ZodLiteral<"VecU256">, z.ZodLiteral<"VecVecU8">, z.ZodLiteral<"bool">, z.ZodLiteral<"address">, z.ZodLiteral<"string">, z.ZodLiteral<"u8">, z.ZodLiteral<"u16">, z.ZodLiteral<"u32">, z.ZodLiteral<"u64">, z.ZodLiteral<"u128">, z.ZodLiteral<"u256">, z.ZodLiteral<"vecbool">, z.ZodLiteral<"vecaddress">, z.ZodLiteral<"vecstring">, z.ZodLiteral<"vecu8">, z.ZodLiteral<"vecu16">, z.ZodLiteral<"vecu32">, z.ZodLiteral<"vecu64">, z.ZodLiteral<"vecu128">, z.ZodLiteral<"vecu256">, z.ZodLiteral<"vecvecu8">]>;
117
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodUnion<readonly [z.ZodObject<{
118
+ name_or_address: z.ZodOptional<z.ZodString>;
119
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
120
+ }, z.core.$strict>, z.ZodString]>, z.ZodString, z.ZodNumber, z.ZodArray<z.ZodBoolean>, z.ZodUnion<readonly [z.ZodObject<{
121
+ entities: z.ZodArray<z.ZodObject<{
122
+ name_or_address: z.ZodOptional<z.ZodString>;
123
+ local_mark_first: z.ZodOptional<z.ZodBoolean>;
124
+ }, z.core.$strict>>;
125
+ check_all_founded: z.ZodOptional<z.ZodBoolean>;
126
+ }, z.core.$strict>, z.ZodArray<z.ZodString>]>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodArray<z.ZodNumber>>]>>;
127
+ name: z.ZodDefault<z.ZodString>;
128
+ object_type: z.ZodOptional<z.ZodEnum<{
129
+ Permission: import("@wowok/wowok").ObjectType.Permission;
130
+ Repository: import("@wowok/wowok").ObjectType.Repository;
131
+ Arb: import("@wowok/wowok").ObjectType.Arb;
132
+ Arbitration: import("@wowok/wowok").ObjectType.Arbitration;
133
+ Service: import("@wowok/wowok").ObjectType.Service;
134
+ Machine: import("@wowok/wowok").ObjectType.Machine;
135
+ Order: import("@wowok/wowok").ObjectType.Order;
136
+ Progress: import("@wowok/wowok").ObjectType.Progress;
137
+ Payment: import("@wowok/wowok").ObjectType.Payment;
138
+ Treasury: import("@wowok/wowok").ObjectType.Treasury;
139
+ Guard: import("@wowok/wowok").ObjectType.Guard;
140
+ Demand: import("@wowok/wowok").ObjectType.Demand;
141
+ Passport: import("@wowok/wowok").ObjectType.Passport;
142
+ Allocation: import("@wowok/wowok").ObjectType.Allocation;
143
+ Resource: import("@wowok/wowok").ObjectType.Resource;
144
+ Reward: import("@wowok/wowok").ObjectType.Reward;
145
+ Discount: import("@wowok/wowok").ObjectType.Discount;
146
+ EntityRegistrar: import("@wowok/wowok").ObjectType.EntityRegistrar;
147
+ EntityLinker: import("@wowok/wowok").ObjectType.EntityLinker;
148
+ Proof: import("@wowok/wowok").ObjectType.Proof;
149
+ Contact: import("@wowok/wowok").ObjectType.Contact;
150
+ WReceivedObject: import("@wowok/wowok").ObjectType.WReceivedObject;
151
+ TableItem_ProgressHistory: import("@wowok/wowok").ObjectType.TableItem_ProgressHistory;
152
+ TableItem_PermissionPerm: import("@wowok/wowok").ObjectType.TableItem_PermissionPerm;
153
+ TableItem_DemandPresenter: import("@wowok/wowok").ObjectType.TableItem_DemandPresenter;
154
+ TableItem_MachineNode: import("@wowok/wowok").ObjectType.TableItem_MachineNode;
155
+ TableItem_TreasuryHistory: import("@wowok/wowok").ObjectType.TableItem_TreasuryHistory;
156
+ TableItem_RepositoryData: import("@wowok/wowok").ObjectType.TableItem_RepositoryData;
157
+ TableItem_RewardRecord: import("@wowok/wowok").ObjectType.TableItem_RewardRecord;
158
+ TableItem_EntityLinker: import("@wowok/wowok").ObjectType.TableItem_EntityLinker;
159
+ TableItem_AddressMark: import("@wowok/wowok").ObjectType.TableItem_AddressMark;
160
+ TableItem_EntityRegistrar: import("@wowok/wowok").ObjectType.TableItem_EntityRegistrar;
161
+ }>>;
162
+ }, z.core.$strict>>;
163
+ }, z.core.$strict>>;
164
+ }, z.core.$strict>>;
165
+ network: z.ZodOptional<z.ZodEnum<{
166
+ testnet: import("@wowok/wowok").ENTRYPOINT.Testnet;
167
+ localnet: import("@wowok/wowok").ENTRYPOINT.Localnet;
168
+ mainnet: import("@wowok/wowok").ENTRYPOINT.Mainnet;
169
+ }>>;
170
+ no_cache: z.ZodOptional<z.ZodBoolean>;
171
+ }, z.core.$strip>, z.ZodObject<{
172
+ action: z.ZodLiteral<"task">;
173
+ progress: z.ZodString;
174
+ network: z.ZodOptional<z.ZodEnum<{
175
+ testnet: import("@wowok/wowok").ENTRYPOINT.Testnet;
176
+ localnet: import("@wowok/wowok").ENTRYPOINT.Localnet;
177
+ mainnet: import("@wowok/wowok").ENTRYPOINT.Mainnet;
178
+ }>>;
179
+ no_cache: z.ZodOptional<z.ZodBoolean>;
180
+ }, z.core.$strip>, z.ZodObject<{
181
+ action: z.ZodLiteral<"history">;
182
+ progress: z.ZodString;
183
+ limit: z.ZodOptional<z.ZodNumber>;
184
+ prune: z.ZodOptional<z.ZodBoolean>;
82
185
  network: z.ZodOptional<z.ZodEnum<{
83
186
  testnet: import("@wowok/wowok").ENTRYPOINT.Testnet;
84
187
  localnet: import("@wowok/wowok").ENTRYPOINT.Localnet;
@@ -86,23 +189,133 @@ export declare const WorkflowOperationInputSchema: z.ZodDiscriminatedUnion<[z.Zo
86
189
  }>>;
87
190
  no_cache: z.ZodOptional<z.ZodBoolean>;
88
191
  }, z.core.$strip>], "action">;
192
+ export declare const WorkflowHistoryForwardSchema: z.ZodObject<{
193
+ forward: z.ZodString;
194
+ who: z.ZodNullable<z.ZodString>;
195
+ who_name: z.ZodOptional<z.ZodString>;
196
+ msg: z.ZodString;
197
+ accomplished: z.ZodBoolean;
198
+ weight: z.ZodOptional<z.ZodNumber>;
199
+ time: z.ZodNumber;
200
+ retained_submission: z.ZodOptional<z.ZodArray<z.ZodObject<{
201
+ identifier: z.ZodNumber;
202
+ value_type: z.ZodNumber;
203
+ value: z.ZodUnknown;
204
+ display_name: z.ZodOptional<z.ZodString>;
205
+ }, z.core.$strip>>>;
206
+ }, z.core.$strip>;
207
+ export declare const WorkflowHistorySessionSchema: z.ZodObject<{
208
+ next_node: z.ZodString;
209
+ weights: z.ZodNumber;
210
+ threshold: z.ZodNumber;
211
+ forwards: z.ZodArray<z.ZodObject<{
212
+ forward: z.ZodString;
213
+ who: z.ZodNullable<z.ZodString>;
214
+ who_name: z.ZodOptional<z.ZodString>;
215
+ msg: z.ZodString;
216
+ accomplished: z.ZodBoolean;
217
+ weight: z.ZodOptional<z.ZodNumber>;
218
+ time: z.ZodNumber;
219
+ retained_submission: z.ZodOptional<z.ZodArray<z.ZodObject<{
220
+ identifier: z.ZodNumber;
221
+ value_type: z.ZodNumber;
222
+ value: z.ZodUnknown;
223
+ display_name: z.ZodOptional<z.ZodString>;
224
+ }, z.core.$strip>>>;
225
+ }, z.core.$strip>>;
226
+ }, z.core.$strip>;
227
+ export declare const WorkflowHistoryRecordSchema: z.ZodObject<{
228
+ index: z.ZodNumber;
229
+ node: z.ZodString;
230
+ next_node: z.ZodString;
231
+ time: z.ZodNumber;
232
+ session: z.ZodArray<z.ZodObject<{
233
+ next_node: z.ZodString;
234
+ weights: z.ZodNumber;
235
+ threshold: z.ZodNumber;
236
+ forwards: z.ZodArray<z.ZodObject<{
237
+ forward: z.ZodString;
238
+ who: z.ZodNullable<z.ZodString>;
239
+ who_name: z.ZodOptional<z.ZodString>;
240
+ msg: z.ZodString;
241
+ accomplished: z.ZodBoolean;
242
+ weight: z.ZodOptional<z.ZodNumber>;
243
+ time: z.ZodNumber;
244
+ retained_submission: z.ZodOptional<z.ZodArray<z.ZodObject<{
245
+ identifier: z.ZodNumber;
246
+ value_type: z.ZodNumber;
247
+ value: z.ZodUnknown;
248
+ display_name: z.ZodOptional<z.ZodString>;
249
+ }, z.core.$strip>>>;
250
+ }, z.core.$strip>>;
251
+ }, z.core.$strip>>;
252
+ }, z.core.$strip>;
253
+ export declare const WorkflowHistoryViewSchema: z.ZodObject<{
254
+ progress: z.ZodString;
255
+ current: z.ZodOptional<z.ZodString>;
256
+ records: z.ZodArray<z.ZodObject<{
257
+ index: z.ZodNumber;
258
+ node: z.ZodString;
259
+ next_node: z.ZodString;
260
+ time: z.ZodNumber;
261
+ session: z.ZodArray<z.ZodObject<{
262
+ next_node: z.ZodString;
263
+ weights: z.ZodNumber;
264
+ threshold: z.ZodNumber;
265
+ forwards: z.ZodArray<z.ZodObject<{
266
+ forward: z.ZodString;
267
+ who: z.ZodNullable<z.ZodString>;
268
+ who_name: z.ZodOptional<z.ZodString>;
269
+ msg: z.ZodString;
270
+ accomplished: z.ZodBoolean;
271
+ weight: z.ZodOptional<z.ZodNumber>;
272
+ time: z.ZodNumber;
273
+ retained_submission: z.ZodOptional<z.ZodArray<z.ZodObject<{
274
+ identifier: z.ZodNumber;
275
+ value_type: z.ZodNumber;
276
+ value: z.ZodUnknown;
277
+ display_name: z.ZodOptional<z.ZodString>;
278
+ }, z.core.$strip>>>;
279
+ }, z.core.$strip>>;
280
+ }, z.core.$strip>>;
281
+ }, z.core.$strip>>;
282
+ synced: z.ZodNumber;
283
+ cursor: z.ZodNumber;
284
+ pruned: z.ZodNumber;
285
+ }, z.core.$strip>;
89
286
  export declare const WorkflowOperationResultSchema: z.ZodObject<{
90
287
  action: z.ZodEnum<{
91
288
  list: "list";
92
289
  operate: "operate";
290
+ history: "history";
291
+ task: "task";
93
292
  }>;
94
293
  tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
95
294
  progress: z.ZodString;
295
+ progress_name: z.ZodOptional<z.ZodString>;
96
296
  current: z.ZodString;
97
297
  machine: z.ZodString;
298
+ machine_name: z.ZodOptional<z.ZodString>;
98
299
  task: z.ZodNullable<z.ZodString>;
300
+ task_name: z.ZodOptional<z.ZodString>;
99
301
  service: z.ZodOptional<z.ZodString>;
302
+ service_name: z.ZodOptional<z.ZodString>;
303
+ context_repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
304
+ address: z.ZodString;
305
+ name: z.ZodOptional<z.ZodString>;
306
+ }, z.core.$strip>>>;
100
307
  options: z.ZodArray<z.ZodObject<{
101
308
  next_node: z.ZodString;
102
309
  forward: z.ZodString;
103
310
  weight: z.ZodNumber;
104
311
  threshold: z.ZodNumber;
105
312
  guard: z.ZodOptional<z.ZodString>;
313
+ guard_submissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
314
+ identifier: z.ZodNumber;
315
+ name: z.ZodString;
316
+ value_type: z.ZodString;
317
+ object_type: z.ZodOptional<z.ZodString>;
318
+ }, z.core.$strip>>>;
106
319
  operator_kind: z.ZodEnum<{
107
320
  order_holder: "order_holder";
108
321
  permission_index: "permission_index";
@@ -116,8 +329,44 @@ export declare const WorkflowOperationResultSchema: z.ZodObject<{
116
329
  }, z.core.$strip>>;
117
330
  }, z.core.$strip>>;
118
331
  terminal: z.ZodBoolean;
332
+ actionable: z.ZodBoolean;
333
+ history_count: z.ZodOptional<z.ZodNumber>;
334
+ current_time: z.ZodOptional<z.ZodNumber>;
119
335
  }, z.core.$strip>>>;
120
336
  operate: z.ZodOptional<z.ZodUnknown>;
337
+ history: z.ZodOptional<z.ZodObject<{
338
+ progress: z.ZodString;
339
+ current: z.ZodOptional<z.ZodString>;
340
+ records: z.ZodArray<z.ZodObject<{
341
+ index: z.ZodNumber;
342
+ node: z.ZodString;
343
+ next_node: z.ZodString;
344
+ time: z.ZodNumber;
345
+ session: z.ZodArray<z.ZodObject<{
346
+ next_node: z.ZodString;
347
+ weights: z.ZodNumber;
348
+ threshold: z.ZodNumber;
349
+ forwards: z.ZodArray<z.ZodObject<{
350
+ forward: z.ZodString;
351
+ who: z.ZodNullable<z.ZodString>;
352
+ who_name: z.ZodOptional<z.ZodString>;
353
+ msg: z.ZodString;
354
+ accomplished: z.ZodBoolean;
355
+ weight: z.ZodOptional<z.ZodNumber>;
356
+ time: z.ZodNumber;
357
+ retained_submission: z.ZodOptional<z.ZodArray<z.ZodObject<{
358
+ identifier: z.ZodNumber;
359
+ value_type: z.ZodNumber;
360
+ value: z.ZodUnknown;
361
+ display_name: z.ZodOptional<z.ZodString>;
362
+ }, z.core.$strip>>>;
363
+ }, z.core.$strip>>;
364
+ }, z.core.$strip>>;
365
+ }, z.core.$strip>>;
366
+ synced: z.ZodNumber;
367
+ cursor: z.ZodNumber;
368
+ pruned: z.ZodNumber;
369
+ }, z.core.$strip>>;
121
370
  note: z.ZodOptional<z.ZodString>;
122
371
  }, z.core.$strip>;
123
372
  export declare const WorkflowOperationOutputSchema: z.ZodObject<{
@@ -125,19 +374,35 @@ export declare const WorkflowOperationOutputSchema: z.ZodObject<{
125
374
  action: z.ZodEnum<{
126
375
  list: "list";
127
376
  operate: "operate";
377
+ history: "history";
378
+ task: "task";
128
379
  }>;
129
380
  tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
381
  progress: z.ZodString;
382
+ progress_name: z.ZodOptional<z.ZodString>;
131
383
  current: z.ZodString;
132
384
  machine: z.ZodString;
385
+ machine_name: z.ZodOptional<z.ZodString>;
133
386
  task: z.ZodNullable<z.ZodString>;
387
+ task_name: z.ZodOptional<z.ZodString>;
134
388
  service: z.ZodOptional<z.ZodString>;
389
+ service_name: z.ZodOptional<z.ZodString>;
390
+ context_repositories: z.ZodOptional<z.ZodArray<z.ZodObject<{
391
+ address: z.ZodString;
392
+ name: z.ZodOptional<z.ZodString>;
393
+ }, z.core.$strip>>>;
135
394
  options: z.ZodArray<z.ZodObject<{
136
395
  next_node: z.ZodString;
137
396
  forward: z.ZodString;
138
397
  weight: z.ZodNumber;
139
398
  threshold: z.ZodNumber;
140
399
  guard: z.ZodOptional<z.ZodString>;
400
+ guard_submissions: z.ZodOptional<z.ZodArray<z.ZodObject<{
401
+ identifier: z.ZodNumber;
402
+ name: z.ZodString;
403
+ value_type: z.ZodString;
404
+ object_type: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>>>;
141
406
  operator_kind: z.ZodEnum<{
142
407
  order_holder: "order_holder";
143
408
  permission_index: "permission_index";
@@ -151,8 +416,44 @@ export declare const WorkflowOperationOutputSchema: z.ZodObject<{
151
416
  }, z.core.$strip>>;
152
417
  }, z.core.$strip>>;
153
418
  terminal: z.ZodBoolean;
419
+ actionable: z.ZodBoolean;
420
+ history_count: z.ZodOptional<z.ZodNumber>;
421
+ current_time: z.ZodOptional<z.ZodNumber>;
154
422
  }, z.core.$strip>>>;
155
423
  operate: z.ZodOptional<z.ZodUnknown>;
424
+ history: z.ZodOptional<z.ZodObject<{
425
+ progress: z.ZodString;
426
+ current: z.ZodOptional<z.ZodString>;
427
+ records: z.ZodArray<z.ZodObject<{
428
+ index: z.ZodNumber;
429
+ node: z.ZodString;
430
+ next_node: z.ZodString;
431
+ time: z.ZodNumber;
432
+ session: z.ZodArray<z.ZodObject<{
433
+ next_node: z.ZodString;
434
+ weights: z.ZodNumber;
435
+ threshold: z.ZodNumber;
436
+ forwards: z.ZodArray<z.ZodObject<{
437
+ forward: z.ZodString;
438
+ who: z.ZodNullable<z.ZodString>;
439
+ who_name: z.ZodOptional<z.ZodString>;
440
+ msg: z.ZodString;
441
+ accomplished: z.ZodBoolean;
442
+ weight: z.ZodOptional<z.ZodNumber>;
443
+ time: z.ZodNumber;
444
+ retained_submission: z.ZodOptional<z.ZodArray<z.ZodObject<{
445
+ identifier: z.ZodNumber;
446
+ value_type: z.ZodNumber;
447
+ value: z.ZodUnknown;
448
+ display_name: z.ZodOptional<z.ZodString>;
449
+ }, z.core.$strip>>>;
450
+ }, z.core.$strip>>;
451
+ }, z.core.$strip>>;
452
+ }, z.core.$strip>>;
453
+ synced: z.ZodNumber;
454
+ cursor: z.ZodNumber;
455
+ pruned: z.ZodNumber;
456
+ }, z.core.$strip>>;
156
457
  note: z.ZodOptional<z.ZodString>;
157
458
  }, z.core.$strip>;
158
459
  }, z.core.$strip>;
@@ -1 +1 @@
1
- import{z}from'zod';import{EntrypointSchema,NameOrAddressSchema}from'../common/index.js';export const WorkflowOperateOpSchema=z['enum'](['next','hold','unhold','adminUnhold'])['describe']('Forward\x20operation:\x20\x27next\x27\x20=\x20accomplish\x20the\x20forward;\x20\x27hold\x27\x20=\x20block\x20the\x20forward;\x20'+'\x27unhold\x27\x20=\x20release\x20own\x20hold;\x20\x27adminUnhold\x27\x20=\x20force-release\x20via\x20permission\x20224.');export const WorkflowAccountSchema=z['object']({'address':z['string']()['describe']('Local\x20account\x20address'),'name':z['string']()['optional']()['describe']('Local\x20account\x20name\x20(if\x20any)')})['describe']('A\x20local\x20account\x20that\x20can\x20execute\x20a\x20forward');export const WorkflowForwardViewSchema=z['object']({'next_node':z['string']()['describe']('Target\x20node\x20this\x20forward\x20advances\x20INTO'),'forward':z['string']()['describe']('Forward\x20(operation)\x20name'),'weight':z['number']()['describe']('Forward\x20weight\x20contributed\x20toward\x20the\x20pair\x20threshold'),'threshold':z['number']()['describe']('Pair\x20threshold\x20the\x20forward\x20contributes\x20to'),'guard':z['string']()['optional']()['describe']('Guard\x20bound\x20to\x20this\x20forward\x20—\x20must\x20be\x20verified\x20(passport)\x20before\x20the\x20transition'),'operator_kind':z['enum'](['order_holder','named_operator','permission_index'])['describe']('How\x20this\x20forward\x27s\x20operator\x20is\x20resolved'),'permission_index':z['number']()['optional']()['describe']('Permission\x20index\x20when\x20operator_kind\x20is\x20\x27permission_index\x27'),'named_operator':z['string']()['optional']()['describe']('NamedOperator\x20namespace\x20when\x20operator_kind\x20is\x20\x27named_operator\x27'),'executable_accounts':z['array'](WorkflowAccountSchema)['describe']('LOCAL\x20accounts\x20that\x20can\x20execute\x20this\x20forward\x20(may\x20be\x20empty\x20—\x20then\x20no\x20local\x20account\x20is\x20authorized)')})['describe']('A\x20reachable\x20forward\x20with\x20its\x20permission\x20+\x20guard\x20+\x20executable\x20local\x20accounts');export const WorkflowTaskSchema=z['object']({'progress':z['string']()['describe']('Progress\x20object\x20address'),'current':z['string']()['describe']('Current\x20node\x20of\x20the\x20Progress\x20(\x27\x27\x20=\x20initial)'),'machine':z['string']()['describe']('Machine\x20object\x20address'),'task':z['string']()['nullable']()['describe']('Bound\x20task\x20(Order)\x20address,\x20or\x20null'),'service':z['string']()['optional']()['describe']('Service\x20address\x20(resolved\x20via\x20the\x20bound\x20Order,\x20if\x20any)'),'options':z['array'](WorkflowForwardViewSchema)['describe']('ALL\x20reachable\x20next-node\x20forwards\x20with\x20permission\x20+\x20guard\x20+\x20executable\x20accounts'),'terminal':z['boolean']()['describe']('True\x20when\x20the\x20current\x20node\x20has\x20no\x20outgoing\x20forwards\x20(workflow\x20is\x20stuck\x20or\x20finished)')})['describe']('An\x20active\x20progress\x20object\x20that\x20at\x20least\x20one\x20local\x20account\x20can\x20act\x20on');export const WorkflowOperationInputSchema=z['discriminatedUnion']('action',[z['object']({'action':z['literal']('list'),'limit':z['number']()['int']()['min'](0x1)['max'](0x64)['optional']()['describe']('Max\x20number\x20of\x20active\x20progress\x20tasks\x20to\x20return\x20(default\x2050)'),'network':EntrypointSchema['optional'](),'no_cache':z['boolean']()['optional']()}),z['object']({'action':z['literal']('operate'),'progress':NameOrAddressSchema['describe']('Progress\x20object\x20(name\x20or\x20address)\x20to\x20operate\x20on'),'account':z['string']()['optional']()['describe']('Signing\x20account\x20(name\x20or\x20address).\x20Defaults\x20to\x20the\x20first\x20executable\x20local\x20account.'),'operate':z['object']({'operation':z['object']({'next_node_name':z['string']()['describe']('Target\x20node\x20name'),'forward':z['string']()['describe']('Forward\x20name')})['strict'](),'op':WorkflowOperateOpSchema,'message':z['string']()['optional']()['describe']('Optional\x20human-readable\x20message\x20recorded\x20on-chain')})['strict'](),'network':EntrypointSchema['optional'](),'no_cache':z['boolean']()['optional']()})])['describe']('workflow_operation\x20input.\x20action=\x27list\x27\x20enumerates\x20local-account\x20actionable\x20progress;\x20'+'action=\x27operate\x27\x20advances/holds/unholds\x20a\x20forward\x20as\x20a\x20chosen\x20local\x20account.');export const WorkflowOperationResultSchema=z['object']({'action':z['enum'](['list','operate']),'tasks':z['array'](WorkflowTaskSchema)['optional']()['describe']('Present\x20for\x20action=\x27list\x27'),'operate':z['unknown']()['optional']()['describe']('Present\x20for\x20action=\x27operate\x27\x20(the\x20underlying\x20progress\x20operation\x20result)'),'note':z['string']()['optional']()})['describe']('workflow_operation\x20result');export const WorkflowOperationOutputSchema=z['object']({'result':WorkflowOperationResultSchema})['describe']('workflow_operation\x20output\x20envelope');
1
+ import{z}from'zod';import{EntrypointSchema,NameOrAddressSchema}from'../common/index.js';import{SubmissionCallSchema}from'../call/base.js';export const WorkflowOperateOpSchema=z['enum'](['next','hold','unhold','adminUnhold'])['describe']('Forward\x20operation:\x20\x27next\x27\x20=\x20accomplish\x20the\x20forward;\x20\x27hold\x27\x20=\x20block\x20the\x20forward;\x20'+'\x27unhold\x27\x20=\x20release\x20own\x20hold;\x20\x27adminUnhold\x27\x20=\x20force-release\x20via\x20permission\x20224.');export const WorkflowAccountSchema=z['object']({'address':z['string']()['describe']('Local\x20account\x20address'),'name':z['string']()['optional']()['describe']('Local\x20account\x20name\x20(if\x20any)')})['describe']('A\x20local\x20account\x20that\x20can\x20execute\x20a\x20forward');export const WorkflowForwardViewSchema=z['object']({'next_node':z['string']()['describe']('Target\x20node\x20this\x20forward\x20advances\x20INTO'),'forward':z['string']()['describe']('Forward\x20(operation)\x20name'),'weight':z['number']()['describe']('Forward\x20weight\x20contributed\x20toward\x20the\x20pair\x20threshold'),'threshold':z['number']()['describe']('Pair\x20threshold\x20the\x20forward\x20contributes\x20to'),'guard':z['string']()['optional']()['describe']('Guard\x20bound\x20to\x20this\x20forward\x20—\x20must\x20be\x20verified\x20(passport)\x20before\x20the\x20transition'),'guard_submissions':z['array'](z['object']({'identifier':z['number'](),'name':z['string']()['describe']('Human-readable\x20field\x20name'),'value_type':z['string']()['describe']('Expected\x20value\x20type\x20(Address,\x20U64,\x20String,\x20VecAddress,\x20...)'),'object_type':z['string']()['optional']()['describe']('When\x20value_type\x20is\x20an\x20object\x20address\x20—\x20the\x20expected\x20object\x20type\x20(e.g.\x20Order)')}))['optional']()['describe']('Guard\x20submission\x20fields\x20the\x20user\x20must\x20fill\x20to\x20advance\x20this\x20forward\x20(from\x20the\x20guard\x27s\x20b_submission\x20table\x20items)'),'operator_kind':z['enum'](['order_holder','named_operator','permission_index'])['describe']('How\x20this\x20forward\x27s\x20operator\x20is\x20resolved'),'permission_index':z['number']()['optional']()['describe']('Permission\x20index\x20when\x20operator_kind\x20is\x20\x27permission_index\x27'),'named_operator':z['string']()['optional']()['describe']('NamedOperator\x20namespace\x20when\x20operator_kind\x20is\x20\x27named_operator\x27'),'executable_accounts':z['array'](WorkflowAccountSchema)['describe']('LOCAL\x20accounts\x20that\x20can\x20execute\x20this\x20forward\x20(may\x20be\x20empty\x20—\x20then\x20no\x20local\x20account\x20is\x20authorized)')})['describe']('A\x20reachable\x20forward\x20with\x20its\x20permission\x20+\x20guard\x20+\x20executable\x20local\x20accounts');export const WorkflowTaskSchema=z['object']({'progress':z['string']()['describe']('Progress\x20object\x20address'),'progress_name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20progress\x20(local\x20account/mark\x20name,\x20when\x20resolved)'),'current':z['string']()['describe']('Current\x20node\x20of\x20the\x20Progress\x20(\x27\x27\x20=\x20initial)'),'machine':z['string']()['describe']('Machine\x20object\x20address'),'machine_name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20machine\x20object\x20(when\x20resolved)'),'task':z['string']()['nullable']()['describe']('Bound\x20task\x20(Order)\x20address,\x20or\x20null'),'task_name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20bound\x20Order\x20(when\x20resolved)'),'service':z['string']()['optional']()['describe']('Service\x20address\x20(resolved\x20via\x20the\x20bound\x20Order,\x20if\x20any)'),'service_name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20Service\x20object\x20(when\x20resolved)'),'context_repositories':z['array'](z['object']({'address':z['string']()['describe']('Context\x20repository\x20address'),'name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20repository\x20(when\x20resolved)')}))['optional']()['describe']('Context\x20repositories\x20bound\x20to\x20the\x20Progress\x20(zero\x20or\x20more)'),'options':z['array'](WorkflowForwardViewSchema)['describe']('ALL\x20reachable\x20next-node\x20forwards\x20with\x20permission\x20+\x20guard\x20+\x20executable\x20accounts\x20(may\x20be\x20empty\x20for\x20a\x20completed/terminal\x20progress)'),'terminal':z['boolean']()['describe']('True\x20when\x20the\x20current\x20node\x20has\x20no\x20outgoing\x20forwards\x20(workflow\x20is\x20stuck\x20or\x20finished)'),'actionable':z['boolean']()['describe']('True\x20when\x20at\x20least\x20one\x20LOCAL\x20account\x20can\x20execute\x20a\x20forward\x20right\x20now;\x20false\x20for\x20progress\x20that\x20is\x20merely\x20related\x20(e.g.\x20already\x20completed)'),'history_count':z['number']()['optional']()['describe']('On-chain\x20Progress.history\x20length\x20(append-only)\x20—\x200\x20when\x20no\x20migrations\x20yet'),'current_time':z['number']()['optional']()['describe']('Chain\x20clock\x20(ms)\x20when\x20the\x20current\x20node\x20was\x20entered\x20(Progress.current_time)\x20—\x20for\x20elapsed-dwell\x20display')})['describe']('A\x20progress\x20object\x20related\x20to\x20a\x20local\x20account:\x20actionable\x20(a\x20local\x20account\x20can\x20act\x20on\x20it)\x20or\x20related\x20(order\x20holder\x20/\x20named\x20operator\x20/\x20session\x20operator\x20involvement\x20—\x20viewable\x20history)');export const WorkflowOperationInputSchema=z['discriminatedUnion']('action',[z['object']({'action':z['literal']('list'),'limit':z['number']()['int']()['min'](0x1)['max'](0x64)['optional']()['describe']('Max\x20progress\x20entries\x20to\x20return,\x20actionable\x20first\x20(default\x2050)'),'network':EntrypointSchema['optional'](),'no_cache':z['boolean']()['optional']()}),z['object']({'action':z['literal']('operate'),'progress':NameOrAddressSchema['describe']('Progress\x20object\x20(name\x20or\x20address)\x20to\x20operate\x20on'),'account':z['string']()['optional']()['describe']('Signing\x20account\x20(name\x20or\x20address).\x20Defaults\x20to\x20the\x20first\x20executable\x20local\x20account.'),'operate':z['object']({'operation':z['object']({'next_node_name':z['string']()['describe']('Target\x20node\x20name'),'forward':z['string']()['describe']('Forward\x20name')})['strict'](),'op':WorkflowOperateOpSchema,'message':z['string']()['optional']()['describe']('Optional\x20human-readable\x20message\x20recorded\x20on-chain')})['strict']()['describe']('⚠️\x20SINGLE-OPERATOR\x20LOCK:\x20each\x20forward\x20is\x20locked\x20by\x20the\x20FIRST\x20operator\x20that\x20accomplishes\x20it\x20—\x20a\x20different\x20account\x20'+'re-executing\x20the\x20same\x20accomplished\x20forward\x20aborts\x20E_NOT_THE_HOLDER,\x20and\x20the\x20weight\x20is\x20counted\x20only\x20once.\x20'+'Multi-operator\x20cooperation\x20(threshold\x20>\x201)\x20is\x20done\x20via\x20DISTINCT\x20forwards\x20(one\x20per\x20contributor).\x20The\x20workflow\x20'+'\x27list\x27\x20action\x20already\x20hides\x20accomplished\x20forwards\x20and\x20restricts\x20held\x20forwards\x20to\x20their\x20holder.'),'submission':SubmissionCallSchema['optional']()['describe']('Guard\x20submissions\x20for\x20guarded\x20forwards\x20(forward.guard_submissions\x20in\x20the\x20list\x20describes\x20each\x20required\x20field).\x20'+'Fill\x20`submission:\x20[{\x20guard:\x20\x27<guard>\x27,\x20submission:\x20[{\x20identifier,\x20b_submission:\x20true,\x20value_type,\x20value\x20}]\x20}]`\x20'+'with\x20the\x20value\x20the\x20user\x20entered\x20for\x20each\x20b_submission\x20field.'),'network':EntrypointSchema['optional'](),'no_cache':z['boolean']()['optional']()}),z['object']({'action':z['literal']('task'),'progress':NameOrAddressSchema['describe']('Progress\x20object\x20(name\x20or\x20address)\x20to\x20snapshot'),'network':EntrypointSchema['optional'](),'no_cache':z['boolean']()['optional']()}),z['object']({'action':z['literal']('history'),'progress':NameOrAddressSchema['describe']('Progress\x20object\x20(name\x20or\x20address)\x20whose\x20history\x20to\x20sync\x20and\x20view'),'limit':z['number']()['int']()['min'](0x1)['max'](0x1f4)['optional']()['describe']('Max\x20history\x20records\x20to\x20return,\x20newest\x20first\x20(default\x2050)'),'prune':z['boolean']()['optional']()['describe']('Run\x20the\x2090-day\x20retention\x20cleanup\x20of\x20stale\x20progress\x20histories\x20(default\x20true)'),'network':EntrypointSchema['optional'](),'no_cache':z['boolean']()['optional']()})])['describe']('workflow_operation\x20input.\x20action=\x27list\x27\x20enumerates\x20progress\x20related\x20to\x20local\x20accounts\x20(actionable\x20first,\x20'+'plus\x20completed/related\x20progress\x20with\x20viewable\x20history);\x20'+'action=\x27task\x27\x20builds\x20the\x20SAME\x20snapshot\x20for\x20ONE\x20progress\x20(options\x20may\x20carry\x20empty\x20executable_accounts\x20—\x20the\x20client\x20grays\x20the\x20actions);\x20'+'action=\x27operate\x27\x20advances/holds/unholds\x20a\x20forward\x20as\x20a\x20chosen\x20local\x20account;\x20'+'action=\x27history\x27\x20incrementally\x20syncs\x20+\x20returns\x20a\x20progress\x27s\x20on-chain\x20history.');export const WorkflowHistoryForwardSchema=z['object']({'forward':z['string']()['describe']('Forward\x20(operation)\x20name'),'who':z['string']()['nullable']()['describe']('Operator\x20address\x20that\x20performed\x20the\x20forward\x20(null\x20=\x20not\x20yet\x20held)'),'who_name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20operator\x20(account\x20name,\x20else\x20LocalMark)'),'msg':z['string']()['describe']('Message\x20recorded\x20with\x20the\x20forward'),'accomplished':z['boolean']()['describe']('Whether\x20the\x20forward\x20was\x20accomplished'),'weight':z['number']()['optional']()['describe']('Forward\x20weight\x20(from\x20the\x20machine\x20config;\x20the\x20chain\x20Holder\x20snapshot\x20stores\x20no\x20per-forward\x20weight)'),'time':z['number']()['describe']('Last\x20operation\x20time\x20(on-chain\x20clock\x20ms)'),'retained_submission':z['array'](z['object']({'identifier':z['number'](),'value_type':z['number'](),'value':z['unknown'](),'display_name':z['string']()['optional']()['describe']('Display\x20name\x20for\x20the\x20first\x20address-typed\x20value\x20(when\x20resolved)')}))['optional']()['describe']('Retained\x20Guard\x20submission\x20entries')})['describe']('One\x20forward\x20execution\x20inside\x20a\x20session\x20snapshot');export const WorkflowHistorySessionSchema=z['object']({'next_node':z['string']()['describe']('Session\x20target\x20node\x20(the\x20not-yet-migrated\x20direction)'),'weights':z['number']()['describe']('Accumulated\x20forward\x20weight\x20at\x20migration\x20time'),'threshold':z['number']()['describe']('Threshold\x20required\x20to\x20complete\x20the\x20pair'),'forwards':z['array'](WorkflowHistoryForwardSchema)['describe']('Forward\x20executions\x20in\x20this\x20session')})['describe']('Session\x20snapshot\x20captured\x20at\x20migration\x20time');export const WorkflowHistoryRecordSchema=z['object']({'index':z['number']()['describe']('On-chain\x20history\x20index\x20(0-based,\x20append-only)'),'node':z['string']()['describe']('Node\x20migrated\x20FROM'),'next_node':z['string']()['describe']('Node\x20migrated\x20TO'),'time':z['number']()['describe']('Migration\x20time\x20(on-chain\x20clock\x20ms)'),'session':z['array'](WorkflowHistorySessionSchema)['describe']('Full\x20session\x20snapshot\x20at\x20migration')})['describe']('One\x20on-chain\x20Progress\x20history\x20record\x20(a\x20completed\x20migration)');export const WorkflowHistoryViewSchema=z['object']({'progress':z['string']()['describe']('Progress\x20object\x20address'),'current':z['string']()['optional']()['describe']('Current\x20node\x20as\x20of\x20this\x20sync'),'records':z['array'](WorkflowHistoryRecordSchema)['describe']('History\x20records,\x20newest\x20first'),'synced':z['number']()['describe']('Number\x20of\x20records\x20newly\x20synced\x20in\x20this\x20call'),'cursor':z['number']()['describe']('Last\x20synced\x20history\x20index\x20(0-based;\x20-1\x20=\x20none\x20yet)'),'pruned':z['number']()['describe']('Progress\x20entries\x20cleaned\x20by\x20the\x2090-day\x20retention\x20in\x20this\x20call')})['describe']('A\x20progress\x27s\x20synced\x20on-chain\x20history');export const WorkflowOperationResultSchema=z['object']({'action':z['enum'](['list','task','operate','history']),'tasks':z['array'](WorkflowTaskSchema)['optional']()['describe']('Present\x20for\x20action=\x27list\x27\x20and\x20action=\x27task\x27\x20(a\x20one-element\x20array\x20—\x20the\x20same\x20snapshot\x20shape\x20as\x20a\x20list\x20item,\x20built\x20for\x20the\x20requested\x20progress\x20regardless\x20of\x20local-account\x20relation;\x20executable_accounts\x20may\x20be\x20empty\x20when\x20no\x20local\x20account\x20is\x20authorized)'),'operate':z['unknown']()['optional']()['describe']('Present\x20for\x20action=\x27operate\x27\x20(the\x20underlying\x20progress\x20operation\x20result)'),'history':WorkflowHistoryViewSchema['optional']()['describe']('Present\x20for\x20action=\x27history\x27'),'note':z['string']()['optional']()})['describe']('workflow_operation\x20result');export const WorkflowOperationOutputSchema=z['object']({'result':WorkflowOperationResultSchema})['describe']('workflow_operation\x20output\x20envelope');
@@ -1 +1 @@
1
- import{readFileSync,existsSync,writeFileSync,mkdirSync,readdirSync}from'fs';import{resolve,join,dirname}from'path';import{fileURLToPath}from'url';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'../knowledge/tools-reference.js';import{GUARD_DESIGN_PATTERNS,getGuardDesignPattern,GUARD_DESIGN_PATTERNS_VERSION}from'../knowledge/guard-design-patterns.js';import{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,SAFETY_RULES_VERSION}from'../knowledge/safety-rules.js';import{listTemplates as a348a,getTemplateDetail,instantiateTemplate,getTemplateCounts,TEMPLATE_OBJECT_TYPES}from'../knowledge/template-registry.js';const __filename=fileURLToPath(import.meta.url),__dirname=fileURLToPath(new URL('.',import.meta.url)),SCHEMAS_DIR=resolve(__dirname,'../../dist/schemas'),GUARD_TEMPLATES_PATH_SCRIPTS=resolve(__dirname,'../../scripts/guard-templates.json'),GUARD_TEMPLATES_PATH_DIST=resolve(__dirname,'../../dist/schemas/guard-templates.json'),GUARD_TEMPLATES_PATH=existsSync(GUARD_TEMPLATES_PATH_SCRIPTS)?GUARD_TEMPLATES_PATH_SCRIPTS:GUARD_TEMPLATES_PATH_DIST,EXAMPLES_DIR_SCRIPTS=resolve(__dirname,'../../scripts/examples'),EXAMPLES_DIR_DIST=resolve(__dirname,'../examples');export const EXAMPLES_DIR=existsSync(EXAMPLES_DIR_SCRIPTS)?EXAMPLES_DIR_SCRIPTS:EXAMPLES_DIR_DIST;const WORKSPACE_TMP_DIR=resolve(process['cwd'](),'.trae','tmp');export function areSchemasAvailable(){return existsSync(SCHEMAS_DIR)&&existsSync(join(SCHEMAS_DIR,'index.json'));}export function getSchemaIndex(){try{const a=join(SCHEMAS_DIR,'index.json');if(!existsSync(a))return null;const b=readFileSync(a,'utf-8');return JSON['parse'](b);}catch{return null;}}export function listSchemas(){const a=getSchemaIndex();if(!a)return[];return[...a['tools']||[],...a['operations']||[]];}export function getSchema(a){try{let b=join(SCHEMAS_DIR,a+'.schema.json');!existsSync(b)&&(b=join(SCHEMAS_DIR,a+'.json'));if(!existsSync(b))return null;const c=readFileSync(b,'utf-8'),d=JSON['parse'](c);return resolveSchemaRefs(d);}catch{return null;}}export function getOutputSchema(a){try{const b=join(SCHEMAS_DIR,a+'.output.json');if(!existsSync(b))return null;const c=readFileSync(b,'utf-8'),d=JSON['parse'](c);return resolveSchemaRefs(d);}catch{return null;}}export function getGuardTemplates(a){try{if(!existsSync(GUARD_TEMPLATES_PATH))return null;const b=readFileSync(GUARD_TEMPLATES_PATH,'utf-8'),c=JSON['parse'](b);if(!a)return{'version':c['version'],'description':c['description'],'templates':(c['templates']||[])['map'](e=>({'name':e['name'],'title':e['title'],'description':e['description'],'use_case':e['use_case']})),'query_reference':c['query_reference'],'node_return_types':c['node_return_types']};const d=(c['templates']||[])['find'](e=>e['name']===a);if(!d)return null;return d;}catch{return null;}}export function searchExamples(a){if(!existsSync(EXAMPLES_DIR))return[];let b;try{b=readdirSync(EXAMPLES_DIR);}catch{return[];}const c=a['toLowerCase']()['trim']();if(!c)return[];const d=[];for(const e of b){if(!e['endsWith']('.json'))continue;const f=join(EXAMPLES_DIR,e);try{const g=readFileSync(f,'utf-8'),h=JSON['parse'](g),i=String(h['title']??''),j=String(h['description']??''),k=Array['isArray'](h['tags'])?h['tags']['map'](o=>String(o)):[],l=String(h['operation_type']??''),m=String(h['industry']??''),n=[];i['toLowerCase']()['includes'](c)&&n['push']('title'),j['toLowerCase']()['includes'](c)&&n['push']('description'),k['some'](o=>o['toLowerCase']()===c)&&n['push']('tags'),l&&l['toLowerCase']()===c&&n['push']('operation_type'),m&&m['toLowerCase']()===c&&n['push']('industry'),n['length']>0x0&&d['push']({'file':e,'title':i,'description':j,'tags':k,'industry':m,'operation_type':l,'verified':h['verified']===!![],'score':n['length'],'matched_fields':n});}catch{continue;}}return d['sort']((o,p)=>{if(p['score']!==o['score'])return p['score']-o['score'];return o['file']['localeCompare'](p['file']);}),d;}export function getSchemaField(a,b){const c=getSchema(a);if(!c)return null;const d=b['split']('.')['filter'](Boolean);let e=c;for(const f of d){if(!e||typeof e!=='object')return null;if(e['properties']&&f in e['properties']){e=e['properties'][f];continue;}if(e['items']&&typeof e['items']==='object'){if(/^\d+$/['test'](f)){e=e['items'];continue;}if(e['items']['properties']&&f in e['items']['properties']){e=e['items']['properties'][f];continue;}}if(Array['isArray'](e['oneOf'])||Array['isArray'](e['anyOf'])){const g=e['oneOf']??e['anyOf'];for(const h of g){if(h&&typeof h==='object'&&h['properties']&&f in h['properties']){e=h['properties'][f];break;}}continue;}if(f in e){e=e[f];continue;}return null;}return e;}function resolveSchemaRefs(a,b=new Set()){if(!a||typeof a!=='object')return a;if(Array['isArray'](a))return a['map'](d=>resolveSchemaRefs(d,b));const c={};for(const [d,e]of Object['entries'](a)){if(d==='$ref'&&typeof e==='string'){if(e['startsWith']('#'))c[d]=e;else{const f=loadRefSchema(e,b);f&&Object['assign'](c,resolveSchemaRefs(f,b));}}else typeof e==='object'?c[d]=resolveSchemaRefs(e,b):c[d]=e;}return c;}function loadRefSchema(a,b){if(a['startsWith']('#'))return null;if(b['has'](a))return{'description':'Circular\x20reference\x20to\x20'+a};b['add'](a);try{const c=join(SCHEMAS_DIR,a);if(!existsSync(c))return null;const d=readFileSync(c,'utf-8');return JSON['parse'](d);}catch{return null;}}export function searchSchemas(a){const b=listSchemas(),c=a['toLowerCase']();return b['filter'](d=>{const e=d['name']['toLowerCase']()['includes'](c),f=d['title']?.['toLowerCase']()['includes'](c),g=d['description']?.['toLowerCase']()['includes'](c);return e||f||g;});}export function listOperations(){const a=getSchemaIndex();if(!a)return[];return(a['operations']||[])['filter'](b=>b['name']['startsWith']('onchain_operations_'));}function writeResponseToFile(a,b){try{let c;if(b)c=resolve(process['cwd'](),b);else{!existsSync(WORKSPACE_TMP_DIR)&&mkdirSync(WORKSPACE_TMP_DIR,{'recursive':!![]});const g=Date['now']();c=join(WORKSPACE_TMP_DIR,'schema-'+g+'.json');}const d=dirname(c);!existsSync(d)&&mkdirSync(d,{'recursive':!![]});const f=typeof a==='string'?a:JSON['stringify'](a,null,0x2);return writeFileSync(c,f,'utf-8'),c;}catch(h){return null;}}export function processSchemaQuery(a){const {action:b,name:c,query:d,field_path:f,template:g,output_file:h,object_type:i,params:j}=a;if(b==='get_guard_templates'){const k=getGuardTemplates(g);if(!k)return{'success':![],'action':b,'data':null,'message':g?'Guard\x20template\x20\x27'+g+'\x27\x20not\x20found.\x20Omit\x20\x27template\x27\x20to\x20list\x20all\x20available\x20templates.':'Guard\x20templates\x20file\x20not\x20found.\x20Ensure\x20scripts/guard-templates.json\x20exists.','suggestions':['Omit\x20\x27template\x27\x20to\x20list\x20all\x20available\x20templates.','Available\x20template\x20names:\x20signer_verification,\x20progress_node_check,\x20order_owner_verification,\x20service_belonging_check,\x20reward_not_claimed,\x20combined_reward_guard']};if(h){const l=writeResponseToFile(k,h);if(l)return{'success':!![],'action':b,'data':null,'message':'Guard\x20template'+(g?'\x20\x27'+g+'\x27':'s')+'\x20written\x20to\x20file:\x20'+l,'output_file_path':l,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+l]};}return{'success':!![],'action':b,'data':k,'message':g?'Retrieved\x20Guard\x20template:\x20'+g:'Retrieved\x20'+(Array['isArray'](k['templates'])?k['templates']['length']:0x0)+'\x20Guard\x20templates'};}if(b==='get_templates'){if(!g){const p=a348a(i),q=getTemplateCounts(),r={'total':p['length'],'filter':i??null,'counts_by_object_type':q,'templates':p};if(h){const s=writeResponseToFile(r,h);if(s)return{'success':!![],'action':b,'data':null,'message':p['length']+'\x20templates\x20written\x20to\x20file:\x20'+s,'output_file_path':s,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+s]};}return{'success':!![],'action':b,'data':r,'message':p['length']+'\x20template(s)'+(i?'\x20for\x20object_type=\x27'+i+'\x27':'')+'\x20'+('(total\x20registry:\x20'+Object['values'](q)['reduce']((t,u)=>t+u,0x0)+'\x20across\x20'+TEMPLATE_OBJECT_TYPES['length']+'\x20object\x20types).\x20')+'Provide\x20\x27template\x27\x20(id)\x20for\x20full\x20detail;\x20add\x20\x27params\x27\x20(JSON\x20string)\x20to\x20instantiate.'};}if(!j){const t=getTemplateDetail(g);if(!t)return{'success':![],'action':b,'data':null,'message':'Template\x20\x27'+g+'\x27\x20not\x20found\x20in\x20the\x20unified\x20registry.','suggestions':['Omit\x20\x27template\x27\x20to\x20list\x20all\x20template\x20metadata\x20(id\x20+\x20object_type\x20+\x20parameters).','Filter\x20by\x20object_type:\x20'+TEMPLATE_OBJECT_TYPES['join'](',\x20')]};if(h){const u=writeResponseToFile(t,h);if(u)return{'success':!![],'action':b,'data':null,'message':'Template\x20\x27'+g+'\x27\x20detail\x20written\x20to\x20file:\x20'+u,'output_file_path':u,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+u]};}return{'success':!![],'action':b,'data':t,'message':'Template\x20\x27'+g+'\x27\x20('+t['object_type']+',\x20'+(t['instantiable']?'instantiable':'guidance-only')+').\x20'+'To\x20instantiate,\x20call\x20again\x20with\x20\x27params\x27\x20=\x20JSON\x20object\x20of\x20the\x20declared\x20parameters.'};}let m;try{const v=JSON['parse'](j);if(!v||typeof v!=='object'||Array['isArray'](v))return{'success':![],'action':b,'data':null,'message':'\x27params\x27\x20must\x20be\x20a\x20JSON\x20object\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27),\x20got\x20'+(Array['isArray'](v)?'array':typeof v)+'.'};m=v;}catch(w){return{'success':![],'action':b,'data':null,'message':'Failed\x20to\x20parse\x20\x27params\x27\x20as\x20JSON:\x20'+(w instanceof Error?w['message']:String(w)),'suggestions':['Example:\x20params=\x27{\x22whitelist\x22:[\x220xabc...\x22]}\x27']};}const n=instantiateTemplate(g,m);if(!n['ok'])return{'success':![],'action':b,'data':n['guidance']!==undefined?{'guidance':n['guidance']}:null,'message':'Instantiation\x20failed\x20for\x20\x27'+g+'\x27:\x20'+n['error'],'suggestions':n['missing_params']?['Missing\x20required\x20params:\x20'+n['missing_params']['join'](',\x20'),'Call\x20with\x20\x27template\x27\x20only\x20(no\x20\x27params\x27)\x20to\x20see\x20full\x20parameter\x20declarations.']:['Call\x20with\x20\x27template\x27\x20only\x20(no\x20\x27params\x27)\x20to\x20see\x20full\x20parameter\x20declarations.']};const o={'object_type':n['object_type'],'template_id':n['template_id'],'body':n['body'],...n['notes']?{'notes':n['notes']}:{}};if(h){const x=writeResponseToFile(o,h);if(x)return{'success':!![],'action':b,'data':null,'message':'Instantiated\x20template\x20\x27'+g+'\x27\x20written\x20to\x20file:\x20'+x,'output_file_path':x,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+x]};}return{'success':!![],'action':b,'data':o,'message':'Instantiated\x20\x27'+g+'\x27\x20('+n['object_type']+').\x20'+'Review\x20the\x20body\x20against\x20the\x20onchain_operations\x20schema\x20before\x20submitting.'};}if(b==='search_examples'){if(!d)return{'success':![],'action':b,'data':null,'message':'Search\x20query\x20is\x20required\x20for\x20\x27search_examples\x27\x20action','suggestions':['Provide\x20a\x20\x27query\x27\x20string\x20(e.g.\x20\x27rental\x27,\x20\x27guard\x27,\x20\x27service\x27,\x20\x27machine\x27)','Searchable\x20fields:\x20title,\x20description,\x20tags,\x20operation_type,\x20industry']};const y=searchExamples(d);return{'success':!![],'action':b,'data':y,'message':'Found\x20'+y['length']+'\x20example(s)\x20matching\x20\x27'+d+'\x27','suggestions':y['length']===0x0?['Try\x20broader\x20terms\x20like\x20\x27service\x27,\x20\x27machine\x27,\x20\x27guard\x27,\x20\x27permission\x27','Try\x20an\x20industry\x20name:\x20\x27rental\x27,\x20\x27retail\x27,\x20\x27general\x27','Use\x20\x27get\x27\x20action\x20with\x20a\x20schema\x20name\x20to\x20see\x20the\x20full\x20JSON\x20Schema']:undefined};}if(b==='get_tool_reference'){if(c){const A=getToolReference(c);if(!A)return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20not\x20found\x20in\x20the\x20tool\x20reference.','suggestions':['Omit\x20\x27name\x27\x20to\x20list\x20all\x20tools.','Available\x20tools:\x20'+TOOLS_REFERENCE['map'](C=>C['name'])['join'](',\x20')]};const B=getToolSequence(c);return{'success':!![],'action':b,'data':{'tool':A,'call_sequence':B??null},'message':'Retrieved\x20tool\x20reference:\x20'+c};}if(d){const C=searchToolReference(d);return{'success':!![],'action':b,'data':{'tools':C,'count':C['length']},'message':'Found\x20'+C['length']+'\x20tool(s)\x20matching\x20\x27'+d+'\x27','suggestions':C['length']===0x0?['Try\x20a\x20broader\x20keyword\x20(e.g.\x20\x27onchain\x27,\x20\x27guard\x27,\x20\x27schema\x27),\x20or\x20omit\x20\x27query\x27\x20to\x20list\x20all\x20tools.']:undefined};}const z=TOOLS_REFERENCE['map'](D=>({'name':D['name'],'summary':D['summary'],'actions':D['actions']??[],'notes':D['notes']??[]}));return{'success':!![],'action':b,'data':{'tools':z,'count':z['length']},'message':'Retrieved\x20reference\x20for\x20'+z['length']+'\x20MCP\x20tools.\x20Pass\x20name=\x27<tool>\x27\x20for\x20full\x20detail\x20(params,\x20prerequisites,\x20follow-ups).'};}if(b==='get_guard_design_patterns'){if(c){const E=getGuardDesignPattern(c);if(!E)return{'success':![],'action':b,'data':null,'message':'Guard\x20design\x20pattern\x20\x27'+c+'\x27\x20not\x20found.','suggestions':['Omit\x20\x27name\x27\x20to\x20list\x20the\x20full\x20catalog.','Available\x20pattern\x20ids:\x20'+GUARD_DESIGN_PATTERNS['map'](F=>F['id'])['join'](',\x20')]};return{'success':!![],'action':b,'data':{'pattern':E},'message':'Retrieved\x20Guard\x20design\x20pattern:\x20'+c};}if(d){const F=GUARD_DESIGN_PATTERNS['filter'](H=>H['host']===d),G=F['length']>0x0?F:GUARD_DESIGN_PATTERNS['filter'](H=>H['business_requirement']['toLowerCase']()['includes'](d['toLowerCase']())||H['logic_summary']['toLowerCase']()['includes'](d['toLowerCase']()));return{'success':!![],'action':b,'data':{'patterns':G,'count':G['length'],'filtered_by':F['length']>0x0?'host':'keyword'},'message':'Found\x20'+G['length']+'\x20Guard\x20design\x20pattern(s)\x20matching\x20\x27'+d+'\x27','suggestions':G['length']===0x0?['Filter\x20by\x20host:\x20service_buy_guard,\x20service_allocator_guard,\x20machine_forward,\x20progress_submission,\x20reward_claim,\x20repository_write,\x20arbitration_usage,\x20arbitration_voting,\x20gen_passport']:undefined};}const D=GUARD_DESIGN_PATTERNS['map'](H=>({'id':H['id'],'business_requirement':H['business_requirement'],'host':H['host'],'data_source':H['data_source'],'verifier_level':H['verifier_level'],'logic_summary':H['logic_summary'],'key_queries':H['key_queries'],'notes':H['notes']??[]}));return{'success':!![],'action':b,'data':{'patterns':D,'count':D['length'],'version':GUARD_DESIGN_PATTERNS_VERSION},'message':'Retrieved\x20'+D['length']+'\x20Guard\x20design\x20patterns.\x20Pass\x20name=\x27<pattern_id>\x27\x20for\x20full\x20detail\x20(witness\x20types,\x20mitigated\x20risks,\x20industries).'};}if(b==='get_safety_rules')return{'success':!![],'action':b,'data':{'version':SAFETY_RULES_VERSION,'object_reuse_rules':OBJECT_REUSE_RULES,'create_vs_modify_pattern':CREATE_VS_MODIFY_PATTERN,'immutability_rules':IMMUTABILITY_RULES,'operation_type_classification':OPERATION_TYPE_CLASSIFICATION,'operation_class_meta':OPERATION_CLASS_META,'naming_conventions':NAMING_CONVENTIONS},'message':'Retrieved\x20safety\x20rule\x20tables\x20(reuse\x20/\x20immutability\x20/\x20operation\x20classification\x20/\x20naming).\x20'+'Key\x20points:\x20prefer\x20REUSING\x20existing\x20objects\x20(string\x20reference\x20=\x20reuse,\x20object\x20shape\x20=\x20create);\x20'+'Machine\x20publish\x20locks\x20nodes/pairs/forwards,\x20Service\x20publish\x20locks\x20machine/order_allocators/arbitrations\x20(sales\x20stays\x20mutable);\x20'+'Guard\x20is\x20CREATE-only\x20immutable;\x20on-chain\x20writes\x20require\x20explicit\x20user\x20confirmation.'};if(!areSchemasAvailable())return{'success':![],'action':b,'data':null,'message':'Schema\x20files\x20are\x20not\x20available.\x20Please\x20run\x20\x27npm\x20run\x20generate:schemas\x27\x20first.','suggestions':['Run\x20\x27npm\x20run\x20generate:schemas\x27\x20to\x20generate\x20schema\x20files','Ensure\x20the\x20dist/schemas\x20directory\x20exists']};switch(b){case'list':{const H=listSchemas();return{'success':!![],'action':b,'data':H,'message':'Found\x20'+H['length']+'\x20available\x20schemas'};}case'get':{if(!c)return{'success':![],'action':b,'data':null,'message':'Schema\x20name\x20is\x20required\x20for\x20\x27get\x27\x20action','suggestions':['Provide\x20a\x20schema\x20name','Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20schemas']};const I=getSchema(c);if(!I){const J=searchSchemas(c)['slice'](0x0,0x5);return{'success':![],'action':b,'data':null,'message':'Schema\x20\x27'+c+'\x27\x20not\x20found','suggestions':J['length']>0x0?J['map'](K=>'Did\x20you\x20mean:\x20'+K['name']+'?'):['Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20schemas']};}if(h){const K=writeResponseToFile(I,h);if(K)return{'success':!![],'action':b,'data':null,'message':'Schema\x20\x27'+c+'\x27\x20written\x20to\x20file:\x20'+K,'output_file_path':K,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+K]};}return{'success':!![],'action':b,'data':I,'message':'Retrieved\x20schema:\x20'+c};}case'get_field':{if(!c||!f)return{'success':![],'action':b,'data':null,'message':'Both\x20\x27name\x27\x20and\x20\x27field_path\x27\x20are\x20required\x20for\x20\x27get_field\x27\x20action','suggestions':['Example:\x20{action:\x20\x27get_field\x27,\x20name:\x20\x27onchain_operations_machine\x27,\x20field_path:\x20\x27data.node\x27}','Use\x20\x27get\x27\x20action\x20to\x20retrieve\x20the\x20full\x20schema']};const L=getSchemaField(c,f);if(!L)return{'success':![],'action':b,'data':null,'message':'Field\x20path\x20\x27'+f+'\x27\x20not\x20found\x20in\x20schema\x20\x27'+c+'\x27','suggestions':['Check\x20the\x20field\x20path\x20(dot-separated,\x20e.g.\x20\x27data.node\x27)','Use\x20\x27get\x27\x20action\x20to\x20see\x20the\x20full\x20schema\x20structure']};return{'success':!![],'action':b,'data':L,'message':'Retrieved\x20field\x20\x27'+f+'\x27\x20from\x20schema\x20\x27'+c+'\x27'};}case'search':{if(!d)return{'success':![],'action':b,'data':null,'message':'Search\x20query\x20is\x20required\x20for\x20\x27search\x27\x20action'};const M=searchSchemas(d);return{'success':!![],'action':b,'data':M,'message':'Found\x20'+M['length']+'\x20schemas\x20matching\x20\x27'+d+'\x27'};}case'list_operations':{const N=listOperations();return{'success':!![],'action':b,'data':N,'message':'Found\x20'+N['length']+'\x20on-chain\x20operations'};}case'get_output':{if(!c)return{'success':![],'action':b,'data':null,'message':'Tool\x20name\x20is\x20required\x20for\x20\x27get_output\x27\x20action','suggestions':['Provide\x20a\x20tool\x20name','Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20tools\x20and\x20their\x20outputPath']};const O=getOutputSchema(c);if(!O){const P=listSchemas(),Q=P['find'](S=>S['name']===c);if(Q)return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20exists\x20but\x20has\x20no\x20output\x20schema\x20file.\x20The\x20tool\x20may\x20not\x20declare\x20an\x20outputSchema,\x20or\x20the\x20schema\x20file\x20was\x20not\x20generated.','suggestions':['Use\x20\x27get\x27\x20action\x20with\x20name=\x27'+c+'\x27\x20to\x20retrieve\x20its\x20input\x20schema']};const R=searchSchemas(c)['slice'](0x0,0x5);return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20not\x20found','suggestions':R['length']>0x0?R['map'](S=>'Did\x20you\x20mean:\x20'+S['name']+'?'):['Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20tools']};}if(h){const S=writeResponseToFile(O,h);if(S)return{'success':!![],'action':b,'data':null,'message':'Output\x20schema\x20\x27'+c+'\x27\x20written\x20to\x20file:\x20'+S,'output_file_path':S,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+S]};}return{'success':!![],'action':b,'data':O,'message':'Retrieved\x20output\x20schema:\x20'+c};}default:return{'success':![],'action':b,'data':null,'message':'Unknown\x20action:\x20'+b,'suggestions':['Use\x20\x27list\x27,\x20\x27get\x27,\x20\x27get_field\x27,\x20\x27get_output\x27,\x20\x27search\x27,\x20\x27list_operations\x27,\x20\x27get_guard_templates\x27,\x20or\x20\x27search_examples\x27']};}}
1
+ import{readFileSync,existsSync,writeFileSync,mkdirSync,readdirSync}from'fs';import{resolve,join,dirname}from'path';import{fileURLToPath}from'url';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'../knowledge/tools-reference.js';import{GUARD_DESIGN_PATTERNS,getGuardDesignPattern,GUARD_DESIGN_PATTERNS_VERSION}from'../knowledge/guard-design-patterns.js';import{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,SAFETY_RULES_VERSION}from'../knowledge/safety-rules.js';import{listTemplates as a374a,getTemplateDetail,instantiateTemplate,getTemplateCounts,TEMPLATE_OBJECT_TYPES}from'../knowledge/template-registry.js';const __filename=fileURLToPath(import.meta.url),__dirname=fileURLToPath(new URL('.',import.meta.url)),SCHEMAS_DIR=resolve(__dirname,'../../dist/schemas'),GUARD_TEMPLATES_PATH_SCRIPTS=resolve(__dirname,'../../scripts/guard-templates.json'),GUARD_TEMPLATES_PATH_DIST=resolve(__dirname,'../../dist/schemas/guard-templates.json'),GUARD_TEMPLATES_PATH=existsSync(GUARD_TEMPLATES_PATH_SCRIPTS)?GUARD_TEMPLATES_PATH_SCRIPTS:GUARD_TEMPLATES_PATH_DIST,EXAMPLES_DIR_SCRIPTS=resolve(__dirname,'../../scripts/examples'),EXAMPLES_DIR_DIST=resolve(__dirname,'../examples');export const EXAMPLES_DIR=existsSync(EXAMPLES_DIR_SCRIPTS)?EXAMPLES_DIR_SCRIPTS:EXAMPLES_DIR_DIST;const WORKSPACE_TMP_DIR=resolve(process['cwd'](),'.trae','tmp');export function areSchemasAvailable(){return existsSync(SCHEMAS_DIR)&&existsSync(join(SCHEMAS_DIR,'index.json'));}export function getSchemaIndex(){try{const a=join(SCHEMAS_DIR,'index.json');if(!existsSync(a))return null;const b=readFileSync(a,'utf-8');return JSON['parse'](b);}catch{return null;}}export function listSchemas(){const a=getSchemaIndex();if(!a)return[];return[...a['tools']||[],...a['operations']||[]];}export function getSchema(a){try{let b=join(SCHEMAS_DIR,a+'.schema.json');!existsSync(b)&&(b=join(SCHEMAS_DIR,a+'.json'));if(!existsSync(b))return null;const c=readFileSync(b,'utf-8'),d=JSON['parse'](c);return resolveSchemaRefs(d);}catch{return null;}}export function getOutputSchema(a){try{const b=join(SCHEMAS_DIR,a+'.output.json');if(!existsSync(b))return null;const c=readFileSync(b,'utf-8'),d=JSON['parse'](c);return resolveSchemaRefs(d);}catch{return null;}}export function getGuardTemplates(a){try{if(!existsSync(GUARD_TEMPLATES_PATH))return null;const b=readFileSync(GUARD_TEMPLATES_PATH,'utf-8'),c=JSON['parse'](b);if(!a)return{'version':c['version'],'description':c['description'],'templates':(c['templates']||[])['map'](e=>({'name':e['name'],'title':e['title'],'description':e['description'],'use_case':e['use_case']})),'query_reference':c['query_reference'],'node_return_types':c['node_return_types']};const d=(c['templates']||[])['find'](e=>e['name']===a);if(!d)return null;return d;}catch{return null;}}export function searchExamples(a){if(!existsSync(EXAMPLES_DIR))return[];let b;try{b=readdirSync(EXAMPLES_DIR);}catch{return[];}const c=a['toLowerCase']()['trim']();if(!c)return[];const d=[];for(const e of b){if(!e['endsWith']('.json'))continue;const f=join(EXAMPLES_DIR,e);try{const g=readFileSync(f,'utf-8'),h=JSON['parse'](g),i=String(h['title']??''),j=String(h['description']??''),k=Array['isArray'](h['tags'])?h['tags']['map'](o=>String(o)):[],l=String(h['operation_type']??''),m=String(h['industry']??''),n=[];i['toLowerCase']()['includes'](c)&&n['push']('title'),j['toLowerCase']()['includes'](c)&&n['push']('description'),k['some'](o=>o['toLowerCase']()===c)&&n['push']('tags'),l&&l['toLowerCase']()===c&&n['push']('operation_type'),m&&m['toLowerCase']()===c&&n['push']('industry'),n['length']>0x0&&d['push']({'file':e,'title':i,'description':j,'tags':k,'industry':m,'operation_type':l,'verified':h['verified']===!![],'score':n['length'],'matched_fields':n});}catch{continue;}}return d['sort']((o,p)=>{if(p['score']!==o['score'])return p['score']-o['score'];return o['file']['localeCompare'](p['file']);}),d;}export function getSchemaField(a,b){const c=getSchema(a);if(!c)return null;const d=b['split']('.')['filter'](Boolean);let e=c;for(const f of d){if(!e||typeof e!=='object')return null;if(e['properties']&&f in e['properties']){e=e['properties'][f];continue;}if(e['items']&&typeof e['items']==='object'){if(/^\d+$/['test'](f)){e=e['items'];continue;}if(e['items']['properties']&&f in e['items']['properties']){e=e['items']['properties'][f];continue;}}if(Array['isArray'](e['oneOf'])||Array['isArray'](e['anyOf'])){const g=e['oneOf']??e['anyOf'];for(const h of g){if(h&&typeof h==='object'&&h['properties']&&f in h['properties']){e=h['properties'][f];break;}}continue;}if(f in e){e=e[f];continue;}return null;}return e;}function resolveSchemaRefs(a,b=new Set()){if(!a||typeof a!=='object')return a;if(Array['isArray'](a))return a['map'](d=>resolveSchemaRefs(d,b));const c={};for(const [d,e]of Object['entries'](a)){if(d==='$ref'&&typeof e==='string'){if(e['startsWith']('#'))c[d]=e;else{const f=loadRefSchema(e,b);f&&Object['assign'](c,resolveSchemaRefs(f,b));}}else typeof e==='object'?c[d]=resolveSchemaRefs(e,b):c[d]=e;}return c;}function loadRefSchema(a,b){if(a['startsWith']('#'))return null;if(b['has'](a))return{'description':'Circular\x20reference\x20to\x20'+a};b['add'](a);try{const c=join(SCHEMAS_DIR,a);if(!existsSync(c))return null;const d=readFileSync(c,'utf-8');return JSON['parse'](d);}catch{return null;}}export function searchSchemas(a){const b=listSchemas(),c=a['toLowerCase']();return b['filter'](d=>{const e=d['name']['toLowerCase']()['includes'](c),f=d['title']?.['toLowerCase']()['includes'](c),g=d['description']?.['toLowerCase']()['includes'](c);return e||f||g;});}export function listOperations(){const a=getSchemaIndex();if(!a)return[];return(a['operations']||[])['filter'](b=>b['name']['startsWith']('onchain_operations_'));}function writeResponseToFile(a,b){try{let c;if(b)c=resolve(process['cwd'](),b);else{!existsSync(WORKSPACE_TMP_DIR)&&mkdirSync(WORKSPACE_TMP_DIR,{'recursive':!![]});const g=Date['now']();c=join(WORKSPACE_TMP_DIR,'schema-'+g+'.json');}const d=dirname(c);!existsSync(d)&&mkdirSync(d,{'recursive':!![]});const f=typeof a==='string'?a:JSON['stringify'](a,null,0x2);return writeFileSync(c,f,'utf-8'),c;}catch(h){return null;}}export function processSchemaQuery(a){const {action:b,name:c,query:d,field_path:f,template:g,output_file:h,object_type:i,params:j}=a;if(b==='get_guard_templates'){const k=getGuardTemplates(g);if(!k)return{'success':![],'action':b,'data':null,'message':g?'Guard\x20template\x20\x27'+g+'\x27\x20not\x20found.\x20Omit\x20\x27template\x27\x20to\x20list\x20all\x20available\x20templates.':'Guard\x20templates\x20file\x20not\x20found.\x20Ensure\x20scripts/guard-templates.json\x20exists.','suggestions':['Omit\x20\x27template\x27\x20to\x20list\x20all\x20available\x20templates.','Available\x20template\x20names:\x20signer_verification,\x20progress_node_check,\x20order_owner_verification,\x20service_belonging_check,\x20reward_not_claimed,\x20combined_reward_guard']};if(h){const l=writeResponseToFile(k,h);if(l)return{'success':!![],'action':b,'data':null,'message':'Guard\x20template'+(g?'\x20\x27'+g+'\x27':'s')+'\x20written\x20to\x20file:\x20'+l,'output_file_path':l,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+l]};}return{'success':!![],'action':b,'data':k,'message':g?'Retrieved\x20Guard\x20template:\x20'+g:'Retrieved\x20'+(Array['isArray'](k['templates'])?k['templates']['length']:0x0)+'\x20Guard\x20templates'};}if(b==='get_templates'){if(!g){const p=a374a(i),q=getTemplateCounts(),r={'total':p['length'],'filter':i??null,'counts_by_object_type':q,'templates':p};if(h){const s=writeResponseToFile(r,h);if(s)return{'success':!![],'action':b,'data':null,'message':p['length']+'\x20templates\x20written\x20to\x20file:\x20'+s,'output_file_path':s,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+s]};}return{'success':!![],'action':b,'data':r,'message':p['length']+'\x20template(s)'+(i?'\x20for\x20object_type=\x27'+i+'\x27':'')+'\x20'+('(total\x20registry:\x20'+Object['values'](q)['reduce']((t,u)=>t+u,0x0)+'\x20across\x20'+TEMPLATE_OBJECT_TYPES['length']+'\x20object\x20types).\x20')+'Provide\x20\x27template\x27\x20(id)\x20for\x20full\x20detail;\x20add\x20\x27params\x27\x20(JSON\x20string)\x20to\x20instantiate.'};}if(!j){const t=getTemplateDetail(g);if(!t)return{'success':![],'action':b,'data':null,'message':'Template\x20\x27'+g+'\x27\x20not\x20found\x20in\x20the\x20unified\x20registry.','suggestions':['Omit\x20\x27template\x27\x20to\x20list\x20all\x20template\x20metadata\x20(id\x20+\x20object_type\x20+\x20parameters).','Filter\x20by\x20object_type:\x20'+TEMPLATE_OBJECT_TYPES['join'](',\x20')]};if(h){const u=writeResponseToFile(t,h);if(u)return{'success':!![],'action':b,'data':null,'message':'Template\x20\x27'+g+'\x27\x20detail\x20written\x20to\x20file:\x20'+u,'output_file_path':u,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+u]};}return{'success':!![],'action':b,'data':t,'message':'Template\x20\x27'+g+'\x27\x20('+t['object_type']+',\x20'+(t['instantiable']?'instantiable':'guidance-only')+').\x20'+'To\x20instantiate,\x20call\x20again\x20with\x20\x27params\x27\x20=\x20JSON\x20object\x20of\x20the\x20declared\x20parameters.'};}let m;try{const v=JSON['parse'](j);if(!v||typeof v!=='object'||Array['isArray'](v))return{'success':![],'action':b,'data':null,'message':'\x27params\x27\x20must\x20be\x20a\x20JSON\x20object\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27),\x20got\x20'+(Array['isArray'](v)?'array':typeof v)+'.'};m=v;}catch(w){return{'success':![],'action':b,'data':null,'message':'Failed\x20to\x20parse\x20\x27params\x27\x20as\x20JSON:\x20'+(w instanceof Error?w['message']:String(w)),'suggestions':['Example:\x20params=\x27{\x22whitelist\x22:[\x220xabc...\x22]}\x27']};}const n=instantiateTemplate(g,m);if(!n['ok'])return{'success':![],'action':b,'data':n['guidance']!==undefined?{'guidance':n['guidance']}:null,'message':'Instantiation\x20failed\x20for\x20\x27'+g+'\x27:\x20'+n['error'],'suggestions':n['missing_params']?['Missing\x20required\x20params:\x20'+n['missing_params']['join'](',\x20'),'Call\x20with\x20\x27template\x27\x20only\x20(no\x20\x27params\x27)\x20to\x20see\x20full\x20parameter\x20declarations.']:['Call\x20with\x20\x27template\x27\x20only\x20(no\x20\x27params\x27)\x20to\x20see\x20full\x20parameter\x20declarations.']};const o={'object_type':n['object_type'],'template_id':n['template_id'],'body':n['body'],...n['notes']?{'notes':n['notes']}:{}};if(h){const x=writeResponseToFile(o,h);if(x)return{'success':!![],'action':b,'data':null,'message':'Instantiated\x20template\x20\x27'+g+'\x27\x20written\x20to\x20file:\x20'+x,'output_file_path':x,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+x]};}return{'success':!![],'action':b,'data':o,'message':'Instantiated\x20\x27'+g+'\x27\x20('+n['object_type']+').\x20'+'Review\x20the\x20body\x20against\x20the\x20onchain_operations\x20schema\x20before\x20submitting.'};}if(b==='search_examples'){if(!d)return{'success':![],'action':b,'data':null,'message':'Search\x20query\x20is\x20required\x20for\x20\x27search_examples\x27\x20action','suggestions':['Provide\x20a\x20\x27query\x27\x20string\x20(e.g.\x20\x27rental\x27,\x20\x27guard\x27,\x20\x27service\x27,\x20\x27machine\x27)','Searchable\x20fields:\x20title,\x20description,\x20tags,\x20operation_type,\x20industry']};const y=searchExamples(d);return{'success':!![],'action':b,'data':y,'message':'Found\x20'+y['length']+'\x20example(s)\x20matching\x20\x27'+d+'\x27','suggestions':y['length']===0x0?['Try\x20broader\x20terms\x20like\x20\x27service\x27,\x20\x27machine\x27,\x20\x27guard\x27,\x20\x27permission\x27','Try\x20an\x20industry\x20name:\x20\x27rental\x27,\x20\x27retail\x27,\x20\x27general\x27','Use\x20\x27get\x27\x20action\x20with\x20a\x20schema\x20name\x20to\x20see\x20the\x20full\x20JSON\x20Schema']:undefined};}if(b==='get_tool_reference'){if(c){const A=getToolReference(c);if(!A)return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20not\x20found\x20in\x20the\x20tool\x20reference.','suggestions':['Omit\x20\x27name\x27\x20to\x20list\x20all\x20tools.','Available\x20tools:\x20'+TOOLS_REFERENCE['map'](C=>C['name'])['join'](',\x20')]};const B=getToolSequence(c);return{'success':!![],'action':b,'data':{'tool':A,'call_sequence':B??null},'message':'Retrieved\x20tool\x20reference:\x20'+c};}if(d){const C=searchToolReference(d);return{'success':!![],'action':b,'data':{'tools':C,'count':C['length']},'message':'Found\x20'+C['length']+'\x20tool(s)\x20matching\x20\x27'+d+'\x27','suggestions':C['length']===0x0?['Try\x20a\x20broader\x20keyword\x20(e.g.\x20\x27onchain\x27,\x20\x27guard\x27,\x20\x27schema\x27),\x20or\x20omit\x20\x27query\x27\x20to\x20list\x20all\x20tools.']:undefined};}const z=TOOLS_REFERENCE['map'](D=>({'name':D['name'],'summary':D['summary'],'actions':D['actions']??[],'notes':D['notes']??[]}));return{'success':!![],'action':b,'data':{'tools':z,'count':z['length']},'message':'Retrieved\x20reference\x20for\x20'+z['length']+'\x20MCP\x20tools.\x20Pass\x20name=\x27<tool>\x27\x20for\x20full\x20detail\x20(params,\x20prerequisites,\x20follow-ups).'};}if(b==='get_guard_design_patterns'){if(c){const E=getGuardDesignPattern(c);if(!E)return{'success':![],'action':b,'data':null,'message':'Guard\x20design\x20pattern\x20\x27'+c+'\x27\x20not\x20found.','suggestions':['Omit\x20\x27name\x27\x20to\x20list\x20the\x20full\x20catalog.','Available\x20pattern\x20ids:\x20'+GUARD_DESIGN_PATTERNS['map'](F=>F['id'])['join'](',\x20')]};return{'success':!![],'action':b,'data':{'pattern':E},'message':'Retrieved\x20Guard\x20design\x20pattern:\x20'+c};}if(d){const F=GUARD_DESIGN_PATTERNS['filter'](H=>H['host']===d),G=F['length']>0x0?F:GUARD_DESIGN_PATTERNS['filter'](H=>H['business_requirement']['toLowerCase']()['includes'](d['toLowerCase']())||H['logic_summary']['toLowerCase']()['includes'](d['toLowerCase']()));return{'success':!![],'action':b,'data':{'patterns':G,'count':G['length'],'filtered_by':F['length']>0x0?'host':'keyword'},'message':'Found\x20'+G['length']+'\x20Guard\x20design\x20pattern(s)\x20matching\x20\x27'+d+'\x27','suggestions':G['length']===0x0?['Filter\x20by\x20host:\x20service_buy_guard,\x20service_allocator_guard,\x20machine_forward,\x20progress_submission,\x20reward_claim,\x20repository_write,\x20arbitration_usage,\x20arbitration_voting,\x20gen_passport']:undefined};}const D=GUARD_DESIGN_PATTERNS['map'](H=>({'id':H['id'],'business_requirement':H['business_requirement'],'host':H['host'],'data_source':H['data_source'],'verifier_level':H['verifier_level'],'logic_summary':H['logic_summary'],'key_queries':H['key_queries'],'notes':H['notes']??[]}));return{'success':!![],'action':b,'data':{'patterns':D,'count':D['length'],'version':GUARD_DESIGN_PATTERNS_VERSION},'message':'Retrieved\x20'+D['length']+'\x20Guard\x20design\x20patterns.\x20Pass\x20name=\x27<pattern_id>\x27\x20for\x20full\x20detail\x20(witness\x20types,\x20mitigated\x20risks,\x20industries).'};}if(b==='get_safety_rules')return{'success':!![],'action':b,'data':{'version':SAFETY_RULES_VERSION,'object_reuse_rules':OBJECT_REUSE_RULES,'create_vs_modify_pattern':CREATE_VS_MODIFY_PATTERN,'immutability_rules':IMMUTABILITY_RULES,'operation_type_classification':OPERATION_TYPE_CLASSIFICATION,'operation_class_meta':OPERATION_CLASS_META,'naming_conventions':NAMING_CONVENTIONS},'message':'Retrieved\x20safety\x20rule\x20tables\x20(reuse\x20/\x20immutability\x20/\x20operation\x20classification\x20/\x20naming).\x20'+'Key\x20points:\x20prefer\x20REUSING\x20existing\x20objects\x20(string\x20reference\x20=\x20reuse,\x20object\x20shape\x20=\x20create);\x20'+'Machine\x20publish\x20locks\x20nodes/pairs/forwards,\x20Service\x20publish\x20locks\x20machine/order_allocators/arbitrations\x20(sales\x20stays\x20mutable);\x20'+'Guard\x20is\x20CREATE-only\x20immutable;\x20on-chain\x20writes\x20require\x20explicit\x20user\x20confirmation.'};if(!areSchemasAvailable())return{'success':![],'action':b,'data':null,'message':'Schema\x20files\x20are\x20not\x20available.\x20Please\x20run\x20\x27npm\x20run\x20generate:schemas\x27\x20first.','suggestions':['Run\x20\x27npm\x20run\x20generate:schemas\x27\x20to\x20generate\x20schema\x20files','Ensure\x20the\x20dist/schemas\x20directory\x20exists']};switch(b){case'list':{const H=listSchemas();return{'success':!![],'action':b,'data':H,'message':'Found\x20'+H['length']+'\x20available\x20schemas'};}case'get':{if(!c)return{'success':![],'action':b,'data':null,'message':'Schema\x20name\x20is\x20required\x20for\x20\x27get\x27\x20action','suggestions':['Provide\x20a\x20schema\x20name','Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20schemas']};const I=getSchema(c);if(!I){const J=searchSchemas(c)['slice'](0x0,0x5);return{'success':![],'action':b,'data':null,'message':'Schema\x20\x27'+c+'\x27\x20not\x20found','suggestions':J['length']>0x0?J['map'](K=>'Did\x20you\x20mean:\x20'+K['name']+'?'):['Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20schemas']};}if(h){const K=writeResponseToFile(I,h);if(K)return{'success':!![],'action':b,'data':null,'message':'Schema\x20\x27'+c+'\x27\x20written\x20to\x20file:\x20'+K,'output_file_path':K,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+K]};}return{'success':!![],'action':b,'data':I,'message':'Retrieved\x20schema:\x20'+c};}case'get_field':{if(!c||!f)return{'success':![],'action':b,'data':null,'message':'Both\x20\x27name\x27\x20and\x20\x27field_path\x27\x20are\x20required\x20for\x20\x27get_field\x27\x20action','suggestions':['Example:\x20{action:\x20\x27get_field\x27,\x20name:\x20\x27onchain_operations_machine\x27,\x20field_path:\x20\x27data.node\x27}','Use\x20\x27get\x27\x20action\x20to\x20retrieve\x20the\x20full\x20schema']};const L=getSchemaField(c,f);if(!L)return{'success':![],'action':b,'data':null,'message':'Field\x20path\x20\x27'+f+'\x27\x20not\x20found\x20in\x20schema\x20\x27'+c+'\x27','suggestions':['Check\x20the\x20field\x20path\x20(dot-separated,\x20e.g.\x20\x27data.node\x27)','Use\x20\x27get\x27\x20action\x20to\x20see\x20the\x20full\x20schema\x20structure']};return{'success':!![],'action':b,'data':L,'message':'Retrieved\x20field\x20\x27'+f+'\x27\x20from\x20schema\x20\x27'+c+'\x27'};}case'search':{if(!d)return{'success':![],'action':b,'data':null,'message':'Search\x20query\x20is\x20required\x20for\x20\x27search\x27\x20action'};const M=searchSchemas(d);return{'success':!![],'action':b,'data':M,'message':'Found\x20'+M['length']+'\x20schemas\x20matching\x20\x27'+d+'\x27'};}case'list_operations':{const N=listOperations();return{'success':!![],'action':b,'data':N,'message':'Found\x20'+N['length']+'\x20on-chain\x20operations'};}case'get_output':{if(!c)return{'success':![],'action':b,'data':null,'message':'Tool\x20name\x20is\x20required\x20for\x20\x27get_output\x27\x20action','suggestions':['Provide\x20a\x20tool\x20name','Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20tools\x20and\x20their\x20outputPath']};const O=getOutputSchema(c);if(!O){const P=listSchemas(),Q=P['find'](S=>S['name']===c);if(Q)return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20exists\x20but\x20has\x20no\x20output\x20schema\x20file.\x20The\x20tool\x20may\x20not\x20declare\x20an\x20outputSchema,\x20or\x20the\x20schema\x20file\x20was\x20not\x20generated.','suggestions':['Use\x20\x27get\x27\x20action\x20with\x20name=\x27'+c+'\x27\x20to\x20retrieve\x20its\x20input\x20schema']};const R=searchSchemas(c)['slice'](0x0,0x5);return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20not\x20found','suggestions':R['length']>0x0?R['map'](S=>'Did\x20you\x20mean:\x20'+S['name']+'?'):['Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20tools']};}if(h){const S=writeResponseToFile(O,h);if(S)return{'success':!![],'action':b,'data':null,'message':'Output\x20schema\x20\x27'+c+'\x27\x20written\x20to\x20file:\x20'+S,'output_file_path':S,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+S]};}return{'success':!![],'action':b,'data':O,'message':'Retrieved\x20output\x20schema:\x20'+c};}default:return{'success':![],'action':b,'data':null,'message':'Unknown\x20action:\x20'+b,'suggestions':['Use\x20\x27list\x27,\x20\x27get\x27,\x20\x27get_field\x27,\x20\x27get_output\x27,\x20\x27search\x27,\x20\x27list_operations\x27,\x20\x27get_guard_templates\x27,\x20or\x20\x27search_examples\x27']};}}
@@ -2247,7 +2247,7 @@
2247
2247
  "testnet",
2248
2248
  "mainnet"
2249
2249
  ],
2250
- "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Use project_operation action='clone_project_to_network' to clone the project blueprint to the target network, then re-run onchain_operations with env.network=target_network to deploy."
2250
+ "description": "Network entrypoint: Specifies which network the operation occurs on. FIX-010 cross-network note: LocalMark names are scoped per network (testnet marks are invisible on mainnet and vice versa). When migrating from testnet to mainnet, recreate all objects on mainnet and re-register LocalMark names with the SAME names to keep name-based references working across networks. Recreate all objects on the target network via onchain_operations with env.network=target_network, then re-register the LocalMark names."
2251
2251
  }
2252
2252
  },
2253
2253
  "required": [
@@ -2651,11 +2651,13 @@
2651
2651
  "lifecycle",
2652
2652
  "state_change",
2653
2653
  "fund_flow",
2654
+ "market_opportunity",
2655
+ "reputation",
2654
2656
  "permission",
2655
2657
  "guard",
2656
2658
  "other"
2657
2659
  ],
2658
- "description": "Business category. Constraint: enum of 6 values. Example: 'lifecycle'"
2660
+ "description": "Business category. Constraint: enum of 8 values. 'market_opportunity' = supply/demand discovery signal (ServiceEvent/DemandChangedEvent/DemandPresentEvent, K3 13 §6.7); 'reputation' = trust-affecting signal (DemandFeedbackEvent). Example: 'fund_flow'"
2659
2661
  },
2660
2662
  "related_object": {
2661
2663
  "description": "Object ID the event relates to, if extractable. Example: '0x123...'",
@@ -2760,10 +2762,10 @@
2760
2762
  "items": {
2761
2763
  "type": "string"
2762
2764
  },
2763
- "description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','project_service','experience_layer']"
2765
+ "description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','experience_layer']"
2764
2766
  },
2765
2767
  "inactive": {
2766
- "description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness','graph_persist']",
2768
+ "description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness']",
2767
2769
  "type": "array",
2768
2770
  "items": {
2769
2771
  "type": "string"
@@ -2936,7 +2938,7 @@
2936
2938
  ]
2937
2939
  },
2938
2940
  "role_advice": {
2939
- "description": "Phase 4 P4-6.C: Role-targeted advice strings (merchant/customer/prospect/supplier/collaborator/arbitrator). Example: ['Strengthen loyalty flywheel','Optimize first-order conversion']",
2941
+ "description": "Phase 4 P4-6.C: Role-targeted advice strings (merchant/customer/demander/prospect/supplier/collaborator/arbitrator). Example: ['Strengthen loyalty flywheel','Optimize first-order conversion']",
2940
2942
  "type": "array",
2941
2943
  "items": {
2942
2944
  "type": "string"
@@ -2948,6 +2950,7 @@
2948
2950
  "enum": [
2949
2951
  "merchant",
2950
2952
  "customer",
2953
+ "demander",
2951
2954
  "prospect",
2952
2955
  "supplier",
2953
2956
  "collaborator",