@wowok/agent-mcp 3.4.3 → 3.4.4

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 (853) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/build-stamp.js +1 -0
  3. package/dist/chain-semantics/composition-truth.js +1 -1
  4. package/dist/chain-semantics/eval-order.js +1 -1
  5. package/dist/chain-semantics/freeze-map.js +1 -1
  6. package/dist/chain-semantics/fund-flow.js +1 -1
  7. package/dist/chain-semantics/object-graph.js +1 -1
  8. package/dist/composition/audit.js +1 -1
  9. package/dist/composition/compile.js +1 -1
  10. package/dist/composition/emit-phases.js +1 -1
  11. package/dist/composition/generate.js +1 -1
  12. package/dist/composition/guard-fill.js +1 -1
  13. package/dist/composition/input-normalize.js +1 -1
  14. package/dist/composition/materialize.js +1 -1
  15. package/dist/composition/mode-gates.js +1 -1
  16. package/dist/composition/plan.js +1 -1
  17. package/dist/composition/product-card.js +1 -1
  18. package/dist/composition/shape-expand.js +1 -0
  19. package/dist/config/judgment.js +1 -1
  20. package/dist/config/template-params.js +1 -1
  21. package/dist/data/sync/cdc.js +1 -1
  22. package/dist/data/sync/graphql-source.js +1 -1
  23. package/dist/evaluation/engine.js +1 -1
  24. package/dist/experience/realtime-feedback.js +1 -1
  25. package/dist/graph/onchain/expand.js +1 -1
  26. package/dist/graph/onchain/exposure.js +1 -1
  27. package/dist/graph/onchain/sdk-batch.js +1 -1
  28. package/dist/harness/entry-ignite-selfheal.js +1 -0
  29. package/dist/harness/forward-leg-preflight.js +1 -0
  30. package/dist/harness/recover.js +1 -1
  31. package/dist/keeper/detectors.js +1 -1
  32. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  33. package/dist/knowledge/arb-operation-face.js +1 -0
  34. package/dist/knowledge/arbitration-rail-verifier.js +1 -1
  35. package/dist/knowledge/arbitration-templates.js +1 -1
  36. package/dist/knowledge/audit-rules.d.ts +15 -0
  37. package/dist/knowledge/audit-rules.js +1 -1
  38. package/dist/knowledge/baselines/rules/alloc_audit.json.good +310 -0
  39. package/dist/knowledge/baselines/rules/allocation.json.good +568 -0
  40. package/dist/knowledge/baselines/rules/arb.json.good +174 -0
  41. package/dist/knowledge/baselines/rules/arbitration.json.good +393 -0
  42. package/dist/knowledge/baselines/rules/bridge.json.good +197 -0
  43. package/dist/knowledge/baselines/rules/contact.json.good +152 -0
  44. package/dist/knowledge/baselines/rules/demand.json.good +158 -0
  45. package/dist/knowledge/baselines/rules/graph.json.good +534 -0
  46. package/dist/knowledge/baselines/rules/guard.json +18 -5
  47. package/dist/knowledge/baselines/rules/guard.json.good +1192 -0
  48. package/dist/knowledge/baselines/rules/machine.json.good +734 -0
  49. package/dist/knowledge/baselines/rules/oracle.json +1 -1
  50. package/dist/knowledge/baselines/rules/oracle.json.good +120 -0
  51. package/dist/knowledge/baselines/rules/order.json.good +549 -0
  52. package/dist/knowledge/baselines/rules/payment.json.good +205 -0
  53. package/dist/knowledge/baselines/rules/permission.json.good +330 -0
  54. package/dist/knowledge/baselines/rules/personal.json.good +139 -0
  55. package/dist/knowledge/baselines/rules/plan.json +343 -1
  56. package/dist/knowledge/baselines/rules/plan.json.good +1187 -0
  57. package/dist/knowledge/baselines/rules/progress.json.good +364 -0
  58. package/dist/knowledge/baselines/rules/proof.json.good +158 -0
  59. package/dist/knowledge/baselines/rules/registrar.json.good +159 -0
  60. package/dist/knowledge/baselines/rules/repository.json.good +244 -0
  61. package/dist/knowledge/baselines/rules/resource.json.good +117 -0
  62. package/dist/knowledge/baselines/rules/reward.json +10 -10
  63. package/dist/knowledge/baselines/rules/reward.json.good +586 -0
  64. package/dist/knowledge/baselines/rules/service.json.good +595 -0
  65. package/dist/knowledge/baselines/rules/treasury.json.good +440 -0
  66. package/dist/knowledge/baselines/rules/util.json.good +101 -0
  67. package/dist/knowledge/builtin-templates.d.ts +13 -1
  68. package/dist/knowledge/builtin-templates.js +1 -1
  69. package/dist/knowledge/chain-query-registry.js +1 -1
  70. package/dist/knowledge/discount-threshold.js +1 -1
  71. package/dist/knowledge/fee-param-bindings.js +1 -1
  72. package/dist/knowledge/fund-layer.d.ts +2 -0
  73. package/dist/knowledge/fund-layer.js +1 -1
  74. package/dist/knowledge/getting-started.js +1 -1
  75. package/dist/knowledge/guard-binding-table.js +1 -1
  76. package/dist/knowledge/guard-binding-verifier.js +1 -1
  77. package/dist/knowledge/guard-create-preflight.js +1 -0
  78. package/dist/knowledge/guard-field-cognition.js +1 -1
  79. package/dist/knowledge/guard-host-context.js +1 -1
  80. package/dist/knowledge/guard-leg-eval.js +1 -0
  81. package/dist/knowledge/guard-node-gates.js +1 -1
  82. package/dist/knowledge/guard-puzzle.js +1 -1
  83. package/dist/knowledge/guard-quality.js +1 -0
  84. package/dist/knowledge/guard-render.js +1 -1
  85. package/dist/knowledge/guard-risk.js +1 -1
  86. package/dist/knowledge/guard-semantic-walk.js +1 -0
  87. package/dist/knowledge/guard-templates.d.ts +1 -0
  88. package/dist/knowledge/guard-templates.js +1 -1
  89. package/dist/knowledge/guard-translation.js +1 -1
  90. package/dist/knowledge/index.js +1 -1
  91. package/dist/knowledge/industry-registry.js +1 -1
  92. package/dist/knowledge/jsonrpc-enum.js +1 -1
  93. package/dist/knowledge/param-schema.js +1 -1
  94. package/dist/knowledge/param-tiers.js +1 -1
  95. package/dist/knowledge/path-oracle/coverage.js +1 -1
  96. package/dist/knowledge/path-oracle/index.js +1 -1
  97. package/dist/knowledge/path-oracle/products/airbnb.js +1 -0
  98. package/dist/knowledge/path-oracle/products/algora.js +1 -0
  99. package/dist/knowledge/path-oracle/products/alibaba-1688.js +1 -0
  100. package/dist/knowledge/path-oracle/products/amazon.js +1 -0
  101. package/dist/knowledge/path-oracle/products/beatstars.js +1 -0
  102. package/dist/knowledge/path-oracle/products/booking-com.js +1 -0
  103. package/dist/knowledge/path-oracle/products/contra.js +1 -0
  104. package/dist/knowledge/path-oracle/products/costco.js +1 -0
  105. package/dist/knowledge/path-oracle/products/coursera.js +1 -0
  106. package/dist/knowledge/path-oracle/products/duoduo-maicai.js +1 -0
  107. package/dist/knowledge/path-oracle/products/etsy.js +1 -0
  108. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
  109. package/dist/knowledge/path-oracle/products/gamefound.js +1 -0
  110. package/dist/knowledge/path-oracle/products/gofundme.js +1 -0
  111. package/dist/knowledge/path-oracle/products/hackerone.js +1 -0
  112. package/dist/knowledge/path-oracle/products/kickstarter.js +1 -0
  113. package/dist/knowledge/path-oracle/products/klook.js +1 -0
  114. package/dist/knowledge/path-oracle/products/ninety-nine-designs.js +1 -0
  115. package/dist/knowledge/path-oracle/products/onlyfans.js +1 -0
  116. package/dist/knowledge/path-oracle/products/patreon.js +1 -0
  117. package/dist/knowledge/path-oracle/products/pinduoduo-kuaituantuan.js +1 -0
  118. package/dist/knowledge/path-oracle/products/royalty-exchange.js +1 -0
  119. package/dist/knowledge/path-oracle/products/shansong.js +1 -0
  120. package/dist/knowledge/path-oracle/products/taobao-presale.js +1 -0
  121. package/dist/knowledge/path-oracle/products/upwork-catalog.js +1 -0
  122. package/dist/knowledge/path-oracle/products/upwork.js +1 -0
  123. package/dist/knowledge/path-oracle/products/yuanfudao.js +1 -0
  124. package/dist/knowledge/path-oracle/products/ziroom.js +1 -0
  125. package/dist/knowledge/pattern-resolutions.js +1 -1
  126. package/dist/knowledge/product-detail-source.js +1 -1
  127. package/dist/knowledge/product-doc-b5.js +1 -1
  128. package/dist/knowledge/product-doc-facets.js +1 -0
  129. package/dist/knowledge/projection.js +1 -1
  130. package/dist/knowledge/publish-gate.js +1 -1
  131. package/dist/knowledge/publish-surface-contract.js +1 -1
  132. package/dist/knowledge/recipient-constraint.d.ts +20 -0
  133. package/dist/knowledge/recipient-constraint.js +1 -1
  134. package/dist/knowledge/rule-declaration-types.d.ts +13 -0
  135. package/dist/knowledge/rule-declaration-types.js +1 -0
  136. package/dist/knowledge/rule-declarations.js +1 -0
  137. package/dist/knowledge/scenario-modes.d.ts +6 -0
  138. package/dist/knowledge/scenario-topology.js +1 -1
  139. package/dist/knowledge/template-loader.js +1 -1
  140. package/dist/knowledge/template-prose.js +1 -1
  141. package/dist/knowledge/template-registry.js +1 -1
  142. package/dist/knowledge/template-scanner.js +1 -1
  143. package/dist/knowledge/tools-reference.js +1 -1
  144. package/dist/monitor/MonitorLoop.js +1 -1
  145. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  146. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  147. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  148. package/dist/playbooks/service-build/object-panorama.js +1 -1
  149. package/dist/playbooks/service-build/participation-radar.js +1 -1
  150. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  151. package/dist/playbooks/service-build/service-panorama.js +1 -1
  152. package/dist/playbooks/service-build/service-quote.js +1 -1
  153. package/dist/review/index.js +1 -1
  154. package/dist/review/service.js +1 -1
  155. package/dist/safety/confirm-gate.js +1 -1
  156. package/dist/schema/benchmark-migration/index.d.ts +9 -0
  157. package/dist/schema/benchmark-migration/index.js +1 -1
  158. package/dist/schema/call/arbitration.d.ts +8 -0
  159. package/dist/schema/call/arbitration.js +1 -1
  160. package/dist/schema/call/base.d.ts +8 -0
  161. package/dist/schema/call/base.js +1 -1
  162. package/dist/schema/call/bridge.d.ts +2 -0
  163. package/dist/schema/call/error-codes.d.ts +1 -1
  164. package/dist/schema/call/error-codes.js +1 -1
  165. package/dist/schema/call/handler.d.ts +2 -1
  166. package/dist/schema/call/handler.js +1 -1
  167. package/dist/schema/call/order.d.ts +10 -0
  168. package/dist/schema/call/permission-handler.js +1 -1
  169. package/dist/schema/call/permission.js +1 -1
  170. package/dist/schema/call/progress.d.ts +15 -0
  171. package/dist/schema/call/progress.js +1 -1
  172. package/dist/schema/call/receipt.d.ts +1 -0
  173. package/dist/schema/call/receipt.js +1 -1
  174. package/dist/schema/call/repository.d.ts +12 -0
  175. package/dist/schema/call/repository.js +1 -1
  176. package/dist/schema/call/reward.js +1 -1
  177. package/dist/schema/call/semantic.d.ts +1 -0
  178. package/dist/schema/call/semantic.js +1 -1
  179. package/dist/schema/call/service.d.ts +5 -3
  180. package/dist/schema/call/service.js +1 -1
  181. package/dist/schema/common/index.js +1 -1
  182. package/dist/schema/envelope-unify.js +1 -1
  183. package/dist/schema/goal/index.d.ts +23 -0
  184. package/dist/schema/goal/planning.js +1 -1
  185. package/dist/schema/industry-pack/index.d.ts +2 -2
  186. package/dist/schema/local/index.d.ts +20 -0
  187. package/dist/schema/local/index.js +1 -1
  188. package/dist/schema/local/wip.d.ts +4 -0
  189. package/dist/schema/local/wip.js +1 -1
  190. package/dist/schema/messenger/index.d.ts +5 -0
  191. package/dist/schema/messenger/index.js +1 -1
  192. package/dist/schema/operations.d.ts +944 -1
  193. package/dist/schema/operations.js +1 -1
  194. package/dist/schema/query/bi.js +1 -1
  195. package/dist/schema/query/index.d.ts +5 -5
  196. package/dist/schema/query/index.js +1 -1
  197. package/dist/schema/schema-version.js +1 -1
  198. package/dist/schema/workspace/index.d.ts +2 -2
  199. package/dist/schema-query-impl/index.js +1 -1
  200. package/dist/schemas/account_operation.schema.json +1 -257
  201. package/dist/schemas/ask_user.schema.json +1 -78
  202. package/dist/schemas/benchmark_migration_operation.schema.json +1 -626
  203. package/dist/schemas/bridge_operation.schema.json +1 -1069
  204. package/dist/schemas/config_operation.schema.json +1 -82
  205. package/dist/schemas/employee_operation.schema.json +1 -319
  206. package/dist/schemas/evaluation_operation.schema.json +1 -3932
  207. package/dist/schemas/goal_operation.schema.json +1 -1650
  208. package/dist/schemas/guard2file.schema.json +1 -137
  209. package/dist/schemas/index.json +1 -285
  210. package/dist/schemas/industry_pack_operation.schema.json +1 -582
  211. package/dist/schemas/intent_radar.schema.json +1 -155
  212. package/dist/schemas/keeper_operation.schema.json +1 -364
  213. package/dist/schemas/local_cache_operation.schema.json +1 -116
  214. package/dist/schemas/local_history_operation.schema.json +1 -105
  215. package/dist/schemas/local_info_operation.schema.json +1 -140
  216. package/dist/schemas/local_mark_operation.schema.json +1 -124
  217. package/dist/schemas/machineNode2file.schema.json +1 -137
  218. package/dist/schemas/messenger_operation.schema.json +1 -2068
  219. package/dist/schemas/monitor_events.schema.json +1 -87
  220. package/dist/schemas/monitor_subscription.schema.json +1 -327
  221. package/dist/schemas/onchain_events.schema.json +1 -207
  222. package/dist/schemas/onchain_operations.schema.json +1 -28699
  223. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1376
  224. package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1355
  225. package/dist/schemas/onchain_operations_contact.schema.json +1 -988
  226. package/dist/schemas/onchain_operations_demand.schema.json +1 -1146
  227. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -663
  228. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -180
  229. package/dist/schemas/onchain_operations_guard.schema.json +1 -8518
  230. package/dist/schemas/onchain_operations_machine.schema.json +1 -1879
  231. package/dist/schemas/onchain_operations_order.schema.json +1 -1121
  232. package/dist/schemas/onchain_operations_payment.schema.json +1 -316
  233. package/dist/schemas/onchain_operations_permission.schema.json +1 -1036
  234. package/dist/schemas/onchain_operations_personal.schema.json +1 -1463
  235. package/dist/schemas/onchain_operations_progress.schema.json +1 -1041
  236. package/dist/schemas/onchain_operations_proof.schema.json +1 -750
  237. package/dist/schemas/onchain_operations_repository.schema.json +1 -2046
  238. package/dist/schemas/onchain_operations_reward.schema.json +1 -1286
  239. package/dist/schemas/onchain_operations_service.schema.json +1 -2602
  240. package/dist/schemas/onchain_operations_treasury.schema.json +1 -1527
  241. package/dist/schemas/onchain_table_data.schema.json +1 -1146
  242. package/dist/schemas/permission_operation.schema.json +1 -43
  243. package/dist/schemas/persona_operation.schema.json +1 -10424
  244. package/dist/schemas/query_toolkit.schema.json +1 -1867
  245. package/dist/schemas/schema_query.schema.json +1 -116
  246. package/dist/schemas/service_clone_operation.schema.json +1 -49
  247. package/dist/schemas/settle_sweep.schema.json +1 -0
  248. package/dist/schemas/strategy_review_operation.schema.json +1 -66
  249. package/dist/schemas/verify_guard_dry_run.schema.json +1 -0
  250. package/dist/schemas/watch_operation.schema.json +1 -145
  251. package/dist/schemas/wip_file.schema.json +1 -299
  252. package/dist/schemas/workflow_operation.schema.json +1 -722
  253. package/dist/schemas/workspace_operation.schema.json +1 -104
  254. package/dist/schemas/wowok_buildin_info.schema.json +1 -758
  255. package/dist/tools/handlers/benchmark-migration.js +1 -1
  256. package/dist/tools/handlers/config.js +1 -1
  257. package/dist/tools/handlers/entry-edge-recipe.js +1 -1
  258. package/dist/tools/handlers/file-export.js +1 -1
  259. package/dist/tools/handlers/local.js +1 -1
  260. package/dist/tools/handlers/messenger.js +1 -1
  261. package/dist/tools/handlers/onchain.js +1 -1
  262. package/dist/tools/handlers/pending-settlement-recipe.js +1 -0
  263. package/dist/tools/handlers/plan-recovery.js +1 -0
  264. package/dist/tools/handlers/query.js +1 -1
  265. package/dist/tools/handlers/repository-row-id.js +1 -0
  266. package/dist/tools/handlers/review-chain.js +1 -1
  267. package/dist/tools/handlers/settle-sweep.js +1 -0
  268. package/dist/tools/handlers/stale-build-check.js +1 -1
  269. package/dist/tools/handlers/submission-assembly.js +1 -1
  270. package/dist/tools/handlers/verify-guard-dry-run.js +1 -0
  271. package/dist/tools/handlers/wip-upload.js +1 -1
  272. package/dist/tools/index.d.ts +3 -1
  273. package/dist/tools/index.js +1 -1
  274. package/dist/tools/move-fn-index.gen.js +1 -1
  275. package/dist/tools/publish-gate-state.js +1 -1
  276. package/dist/tools/registry/business.js +1 -1
  277. package/dist/tools/registry/onchain.js +1 -1
  278. package/dist/tools/shared.js +1 -1
  279. package/dist/tools/types.d.ts +1 -1
  280. package/dist/tools/wrap.js +1 -1
  281. package/package.json +11 -4
  282. package/dist/chain-semantics/composition-truth.d.ts +0 -102
  283. package/dist/chain-semantics/eval-order.d.ts +0 -17
  284. package/dist/chain-semantics/field-capability.d.ts +0 -11
  285. package/dist/chain-semantics/freeze-map.d.ts +0 -11
  286. package/dist/chain-semantics/fund-flow.d.ts +0 -10
  287. package/dist/chain-semantics/guard-verbs.d.ts +0 -22
  288. package/dist/chain-semantics/index.d.ts +0 -12
  289. package/dist/chain-semantics/object-graph.d.ts +0 -18
  290. package/dist/communication/evidence.d.ts +0 -6
  291. package/dist/communication/message-cursors.d.ts +0 -35
  292. package/dist/communication/proof-reuse.d.ts +0 -9
  293. package/dist/communication/wts-attestation.d.ts +0 -39
  294. package/dist/composition/audit.d.ts +0 -15
  295. package/dist/composition/blueprint-view.d.ts +0 -63
  296. package/dist/composition/compile.d.ts +0 -83
  297. package/dist/composition/emit-phases.d.ts +0 -234
  298. package/dist/composition/generate.d.ts +0 -40
  299. package/dist/composition/guard-fill.d.ts +0 -52
  300. package/dist/composition/inflight.d.ts +0 -86
  301. package/dist/composition/input-normalize.d.ts +0 -15
  302. package/dist/composition/materialize.d.ts +0 -78
  303. package/dist/composition/mode-gates.d.ts +0 -35
  304. package/dist/composition/param-disclosure.d.ts +0 -61
  305. package/dist/composition/plan-retry-ledger.d.ts +0 -37
  306. package/dist/composition/plan.d.ts +0 -121
  307. package/dist/composition/product-card.d.ts +0 -94
  308. package/dist/composition/reflux.d.ts +0 -28
  309. package/dist/composition/supply-chain-emit.d.ts +0 -46
  310. package/dist/config/config-audit.spec.d.ts +0 -1
  311. package/dist/config/config-audit.spec.js +0 -1
  312. package/dist/config/config-warnings.d.ts +0 -2
  313. package/dist/config/index.d.ts +0 -4
  314. package/dist/config/judgment.spec.d.ts +0 -1
  315. package/dist/config/judgment.spec.js +0 -1
  316. package/dist/config/match-policy-file.d.ts +0 -34
  317. package/dist/config/match-policy-file.spec.d.ts +0 -1
  318. package/dist/config/match-policy-file.spec.js +0 -1
  319. package/dist/config/rule-engine.spec.d.ts +0 -1
  320. package/dist/config/rule-engine.spec.js +0 -1
  321. package/dist/config/runtime.d.ts +0 -29
  322. package/dist/config/store-policy.d.ts +0 -14
  323. package/dist/config/store-policy.spec.d.ts +0 -1
  324. package/dist/config/store-policy.spec.js +0 -1
  325. package/dist/config/template-params.d.ts +0 -42
  326. package/dist/config/template-params.spec.d.ts +0 -1
  327. package/dist/config/template-params.spec.js +0 -1
  328. package/dist/customer/account-events.d.ts +0 -32
  329. package/dist/data/api/api.spec.d.ts +0 -1
  330. package/dist/data/api/api.spec.js +0 -1
  331. package/dist/data/api/cli.d.ts +0 -1
  332. package/dist/data/api/head.d.ts +0 -16
  333. package/dist/data/api/head.spec.d.ts +0 -1
  334. package/dist/data/api/head.spec.js +0 -1
  335. package/dist/data/api/index.d.ts +0 -2
  336. package/dist/data/api/match.d.ts +0 -69
  337. package/dist/data/api/match.spec.d.ts +0 -1
  338. package/dist/data/api/match.spec.js +0 -1
  339. package/dist/data/api/server.d.ts +0 -13
  340. package/dist/data/projection/cli.d.ts +0 -1
  341. package/dist/data/projection/edges.d.ts +0 -8
  342. package/dist/data/projection/edges.spec.d.ts +0 -1
  343. package/dist/data/projection/edges.spec.js +0 -1
  344. package/dist/data/projection/facets.d.ts +0 -18
  345. package/dist/data/projection/facets.spec.d.ts +0 -1
  346. package/dist/data/projection/facets.spec.js +0 -1
  347. package/dist/data/projection/facts.d.ts +0 -40
  348. package/dist/data/projection/index.d.ts +0 -6
  349. package/dist/data/projection/project.d.ts +0 -10
  350. package/dist/data/projection/projection.spec.d.ts +0 -1
  351. package/dist/data/projection/projection.spec.js +0 -1
  352. package/dist/data/projection/schema.d.ts +0 -1
  353. package/dist/data/projection/store.d.ts +0 -51
  354. package/dist/data/projection/types.d.ts +0 -169
  355. package/dist/data/sync/cdc.d.ts +0 -33
  356. package/dist/data/sync/cdc.spec.d.ts +0 -1
  357. package/dist/data/sync/cdc.spec.js +0 -1
  358. package/dist/data/sync/graphql-source.d.ts +0 -16
  359. package/dist/data/sync/index.d.ts +0 -5
  360. package/dist/data/sync/reconciler.d.ts +0 -14
  361. package/dist/data/sync/reconciler.spec.d.ts +0 -1
  362. package/dist/data/sync/reconciler.spec.js +0 -1
  363. package/dist/data/sync/schema.d.ts +0 -1
  364. package/dist/data/sync/store.d.ts +0 -24
  365. package/dist/data/sync/sync.spec.d.ts +0 -1
  366. package/dist/data/sync/sync.spec.js +0 -1
  367. package/dist/data/sync/synchronizer.d.ts +0 -10
  368. package/dist/data/sync/types.d.ts +0 -164
  369. package/dist/evaluation/acceptance.d.ts +0 -33
  370. package/dist/evaluation/architecture.spec.d.ts +0 -1
  371. package/dist/evaluation/architecture.spec.js +0 -1
  372. package/dist/evaluation/builtins/arbitration-score.d.ts +0 -42
  373. package/dist/evaluation/builtins/demand-match.d.ts +0 -16
  374. package/dist/evaluation/builtins/graph-service.spec.d.ts +0 -1
  375. package/dist/evaluation/builtins/graph-service.spec.js +0 -1
  376. package/dist/evaluation/builtins/index.d.ts +0 -4
  377. package/dist/evaluation/builtins/purity.spec.d.ts +0 -1
  378. package/dist/evaluation/builtins/purity.spec.js +0 -1
  379. package/dist/evaluation/composer.d.ts +0 -38
  380. package/dist/evaluation/facets/catalog.d.ts +0 -19
  381. package/dist/evaluation/gap.d.ts +0 -2
  382. package/dist/evaluation/guard-scan.d.ts +0 -10
  383. package/dist/evaluation/index.d.ts +0 -14
  384. package/dist/evaluation/injection.d.ts +0 -6
  385. package/dist/evaluation/location-match.d.ts +0 -42
  386. package/dist/evaluation/match-operation.d.ts +0 -23
  387. package/dist/evaluation/match-policy-resolver.d.ts +0 -9
  388. package/dist/evaluation/match-policy.spec.d.ts +0 -1
  389. package/dist/evaluation/match-policy.spec.js +0 -1
  390. package/dist/evaluation/path-reasoning.d.ts +0 -37
  391. package/dist/evaluation/standards.d.ts +0 -11
  392. package/dist/evaluation/standards.spec.d.ts +0 -1
  393. package/dist/evaluation/standards.spec.js +0 -1
  394. package/dist/evaluation/structured-lines.d.ts +0 -8
  395. package/dist/evaluation/user-injection.d.ts +0 -6
  396. package/dist/experience/experience-reuse.d.ts +0 -10
  397. package/dist/experience/index.d.ts +0 -7
  398. package/dist/experience/persistence-config.d.ts +0 -6
  399. package/dist/experience/persistence.d.ts +0 -21
  400. package/dist/experience/realtime-feedback.d.ts +0 -5
  401. package/dist/experience/user-profile.d.ts +0 -25
  402. package/dist/extensions/capability.d.ts +0 -91
  403. package/dist/extensions/industry-audit.spec.d.ts +0 -1
  404. package/dist/extensions/industry-audit.spec.js +0 -1
  405. package/dist/goal/GoalClassifier.d.ts +0 -17
  406. package/dist/goal/GoalEngine.d.ts +0 -175
  407. package/dist/goal/GoalStore.d.ts +0 -27
  408. package/dist/goal/next-steps.d.ts +0 -12
  409. package/dist/goal/plan-approval.d.ts +0 -5
  410. package/dist/goal/pursue.d.ts +0 -18
  411. package/dist/graph/base.d.ts +0 -8
  412. package/dist/graph/onchain/analyze.d.ts +0 -59
  413. package/dist/graph/onchain/analyze.spec.d.ts +0 -1
  414. package/dist/graph/onchain/analyze.spec.js +0 -1
  415. package/dist/graph/onchain/anti-cheat.d.ts +0 -69
  416. package/dist/graph/onchain/anti-cheat.spec.d.ts +0 -1
  417. package/dist/graph/onchain/anti-cheat.spec.js +0 -1
  418. package/dist/graph/onchain/dataplane.d.ts +0 -44
  419. package/dist/graph/onchain/edge-batch.spec.d.ts +0 -1
  420. package/dist/graph/onchain/edge-batch.spec.js +0 -1
  421. package/dist/graph/onchain/edge-schema.d.ts +0 -69
  422. package/dist/graph/onchain/entity-profile.spec.d.ts +0 -1
  423. package/dist/graph/onchain/entity-profile.spec.js +0 -1
  424. package/dist/graph/onchain/event-history.spec.d.ts +0 -1
  425. package/dist/graph/onchain/event-history.spec.js +0 -1
  426. package/dist/graph/onchain/expand.d.ts +0 -4
  427. package/dist/graph/onchain/exploration.d.ts +0 -28
  428. package/dist/graph/onchain/exploration.spec.d.ts +0 -1
  429. package/dist/graph/onchain/exploration.spec.js +0 -1
  430. package/dist/graph/onchain/exposure.d.ts +0 -18
  431. package/dist/graph/onchain/exposure.spec.d.ts +0 -1
  432. package/dist/graph/onchain/exposure.spec.js +0 -1
  433. package/dist/graph/onchain/extract-deep.spec.d.ts +0 -1
  434. package/dist/graph/onchain/extract-deep.spec.js +0 -1
  435. package/dist/graph/onchain/extract.d.ts +0 -29
  436. package/dist/graph/onchain/facet-projection.d.ts +0 -99
  437. package/dist/graph/onchain/facet-projection.spec.d.ts +0 -1
  438. package/dist/graph/onchain/facet-projection.spec.js +0 -1
  439. package/dist/graph/onchain/facts.spec.d.ts +0 -1
  440. package/dist/graph/onchain/facts.spec.js +0 -1
  441. package/dist/graph/onchain/field-manifest.d.ts +0 -29
  442. package/dist/graph/onchain/field-manifest.spec.d.ts +0 -1
  443. package/dist/graph/onchain/field-manifest.spec.js +0 -1
  444. package/dist/graph/onchain/fixtures.d.ts +0 -80
  445. package/dist/graph/onchain/fixtures.spec.d.ts +0 -1
  446. package/dist/graph/onchain/fixtures.spec.js +0 -1
  447. package/dist/graph/onchain/graph-policy.spec.d.ts +0 -1
  448. package/dist/graph/onchain/graph-policy.spec.js +0 -1
  449. package/dist/graph/onchain/index.d.ts +0 -29
  450. package/dist/graph/onchain/interest.d.ts +0 -10
  451. package/dist/graph/onchain/interest.spec.d.ts +0 -1
  452. package/dist/graph/onchain/interest.spec.js +0 -1
  453. package/dist/graph/onchain/label-lint.spec.d.ts +0 -1
  454. package/dist/graph/onchain/label-lint.spec.js +0 -1
  455. package/dist/graph/onchain/names.d.ts +0 -23
  456. package/dist/graph/onchain/names.spec.d.ts +0 -1
  457. package/dist/graph/onchain/names.spec.js +0 -1
  458. package/dist/graph/onchain/object-held-receipts.d.ts +0 -20
  459. package/dist/graph/onchain/object-held-receipts.spec.d.ts +0 -1
  460. package/dist/graph/onchain/object-held-receipts.spec.js +0 -1
  461. package/dist/graph/onchain/onchain.spec.d.ts +0 -1
  462. package/dist/graph/onchain/onchain.spec.js +0 -1
  463. package/dist/graph/onchain/policy.d.ts +0 -8
  464. package/dist/graph/onchain/project-relationship.d.ts +0 -3
  465. package/dist/graph/onchain/proposal-graph.d.ts +0 -11
  466. package/dist/graph/onchain/proposal-graph.spec.d.ts +0 -1
  467. package/dist/graph/onchain/proposal-graph.spec.js +0 -1
  468. package/dist/graph/onchain/sdk-batch.d.ts +0 -129
  469. package/dist/graph/onchain/sdk-dataplane.d.ts +0 -44
  470. package/dist/graph/onchain/strategy.spec.d.ts +0 -1
  471. package/dist/graph/onchain/strategy.spec.js +0 -1
  472. package/dist/graph/onchain/synthesis.d.ts +0 -20
  473. package/dist/graph/onchain/synthesis.spec.d.ts +0 -1
  474. package/dist/graph/onchain/synthesis.spec.js +0 -1
  475. package/dist/graph/onchain/table-ledger.spec.d.ts +0 -1
  476. package/dist/graph/onchain/table-ledger.spec.js +0 -1
  477. package/dist/graph/onchain/viewport.d.ts +0 -6
  478. package/dist/harness/auto-escalation.d.ts +0 -15
  479. package/dist/intent/enrich.d.ts +0 -1
  480. package/dist/intent/index.d.ts +0 -23
  481. package/dist/intent/matcher.d.ts +0 -2
  482. package/dist/intent/store.d.ts +0 -19
  483. package/dist/intent/types.d.ts +0 -32
  484. package/dist/keeper/KeeperScan.d.ts +0 -41
  485. package/dist/keeper/KeeperStore.d.ts +0 -43
  486. package/dist/keeper/detectors.d.ts +0 -42
  487. package/dist/keeper/keeper.spec.d.ts +0 -1
  488. package/dist/keeper/keeper.spec.js +0 -1
  489. package/dist/keeper/types.d.ts +0 -67
  490. package/dist/knowledge/account-marks.d.ts +0 -36
  491. package/dist/knowledge/allocation-ledger.d.ts +0 -75
  492. package/dist/knowledge/allocation-puzzle.d.ts +0 -138
  493. package/dist/knowledge/allocation-risk.d.ts +0 -82
  494. package/dist/knowledge/allocation-templates.d.ts +0 -38
  495. package/dist/knowledge/allocator-rail-verifier.d.ts +0 -59
  496. package/dist/knowledge/anti-cheat.d.ts +0 -2
  497. package/dist/knowledge/arb-fund-facts.d.ts +0 -51
  498. package/dist/knowledge/arb-risk.d.ts +0 -39
  499. package/dist/knowledge/arbitration-puzzle.d.ts +0 -84
  500. package/dist/knowledge/arbitration-rail-verifier.d.ts +0 -35
  501. package/dist/knowledge/arbitration-risk.d.ts +0 -114
  502. package/dist/knowledge/arbitration-templates.d.ts +0 -39
  503. package/dist/knowledge/arbitration-venue-order.d.ts +0 -25
  504. package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +0 -1
  505. package/dist/knowledge/baselines/guard-lint-baseline.spec.js +0 -1
  506. package/dist/knowledge/baselines/risk-baselines.spec.d.ts +0 -1
  507. package/dist/knowledge/baselines/risk-baselines.spec.js +0 -1
  508. package/dist/knowledge/baselines/risk-cases.d.ts +0 -8
  509. package/dist/knowledge/baselines/semantic-facts.d.ts +0 -12
  510. package/dist/knowledge/bridge-risk.d.ts +0 -36
  511. package/dist/knowledge/catalog-facts.d.ts +0 -4
  512. package/dist/knowledge/chain-query-registry.d.ts +0 -14
  513. package/dist/knowledge/commission-landing.d.ts +0 -26
  514. package/dist/knowledge/component-schema.d.ts +0 -64
  515. package/dist/knowledge/contact-risk.d.ts +0 -32
  516. package/dist/knowledge/contact-templates.d.ts +0 -26
  517. package/dist/knowledge/contract-invariants.d.ts +0 -54
  518. package/dist/knowledge/demand-risk.d.ts +0 -30
  519. package/dist/knowledge/discount-threshold.d.ts +0 -26
  520. package/dist/knowledge/dynamic-pricing.d.ts +0 -29
  521. package/dist/knowledge/entity-recipient-guard.d.ts +0 -21
  522. package/dist/knowledge/event-semantics.d.ts +0 -23
  523. package/dist/knowledge/evidence-review.d.ts +0 -35
  524. package/dist/knowledge/fee-param-bindings.d.ts +0 -28
  525. package/dist/knowledge/flywheel-loop.d.ts +0 -41
  526. package/dist/knowledge/game-scenarios.d.ts +0 -21
  527. package/dist/knowledge/getting-started.d.ts +0 -37
  528. package/dist/knowledge/goal-completion.d.ts +0 -31
  529. package/dist/knowledge/guard-anchor-reach.d.ts +0 -19
  530. package/dist/knowledge/guard-binding-table.d.ts +0 -52
  531. package/dist/knowledge/guard-binding-verifier.d.ts +0 -37
  532. package/dist/knowledge/guard-bindings.d.ts +0 -21
  533. package/dist/knowledge/guard-blueprint.d.ts +0 -68
  534. package/dist/knowledge/guard-design-patterns.d.ts +0 -38
  535. package/dist/knowledge/guard-eval.d.ts +0 -15
  536. package/dist/knowledge/guard-field-cognition.d.ts +0 -48
  537. package/dist/knowledge/guard-host-context.d.ts +0 -24
  538. package/dist/knowledge/guard-ledger.d.ts +0 -19
  539. package/dist/knowledge/guard-leg-map.d.ts +0 -5
  540. package/dist/knowledge/guard-lint.d.ts +0 -79
  541. package/dist/knowledge/guard-node-gates.d.ts +0 -9
  542. package/dist/knowledge/guard-puzzle.d.ts +0 -188
  543. package/dist/knowledge/guard-render.d.ts +0 -71
  544. package/dist/knowledge/guard-risk.d.ts +0 -71
  545. package/dist/knowledge/guard-submission-brief.d.ts +0 -94
  546. package/dist/knowledge/guard-submission-prompt.d.ts +0 -63
  547. package/dist/knowledge/guard-translation.d.ts +0 -58
  548. package/dist/knowledge/index.d.ts +0 -299
  549. package/dist/knowledge/industry-evolution.d.ts +0 -82
  550. package/dist/knowledge/industry-generalizer.d.ts +0 -63
  551. package/dist/knowledge/industry-rule-node.d.ts +0 -7
  552. package/dist/knowledge/industry-strategy.d.ts +0 -91
  553. package/dist/knowledge/intent-metrics.d.ts +0 -43
  554. package/dist/knowledge/jsonrpc-enum.d.ts +0 -102
  555. package/dist/knowledge/knob-docs.d.ts +0 -5
  556. package/dist/knowledge/machine-fork-watch.d.ts +0 -9
  557. package/dist/knowledge/machine-ledger.d.ts +0 -42
  558. package/dist/knowledge/machine-puzzle.d.ts +0 -206
  559. package/dist/knowledge/machine-risk.d.ts +0 -72
  560. package/dist/knowledge/machine-templates.d.ts +0 -92
  561. package/dist/knowledge/machine-topology.d.ts +0 -116
  562. package/dist/knowledge/machine-translation.d.ts +0 -96
  563. package/dist/knowledge/market-metrics.d.ts +0 -34
  564. package/dist/knowledge/market-operations.d.ts +0 -46
  565. package/dist/knowledge/migration-preflight.d.ts +0 -27
  566. package/dist/knowledge/object-dependency.d.ts +0 -31
  567. package/dist/knowledge/operation-dictionary.d.ts +0 -18
  568. package/dist/knowledge/order-ledger.d.ts +0 -69
  569. package/dist/knowledge/order-puzzle.d.ts +0 -162
  570. package/dist/knowledge/order-risk.d.ts +0 -62
  571. package/dist/knowledge/order-templates.d.ts +0 -50
  572. package/dist/knowledge/param-schema.d.ts +0 -93
  573. package/dist/knowledge/param-tiers.d.ts +0 -27
  574. package/dist/knowledge/passport-ledger.d.ts +0 -60
  575. package/dist/knowledge/passport-templates.d.ts +0 -40
  576. package/dist/knowledge/path-oracle/coverage.d.ts +0 -16
  577. package/dist/knowledge/path-oracle/index.d.ts +0 -5
  578. package/dist/knowledge/path-oracle/products/food-delivery.d.ts +0 -2
  579. package/dist/knowledge/path-oracle/schema.d.ts +0 -188
  580. package/dist/knowledge/pattern-resolutions.d.ts +0 -110
  581. package/dist/knowledge/payment-risk.d.ts +0 -38
  582. package/dist/knowledge/payment-tracker.d.ts +0 -63
  583. package/dist/knowledge/permission-ledger.d.ts +0 -49
  584. package/dist/knowledge/permission-puzzle.d.ts +0 -122
  585. package/dist/knowledge/permission-risk.d.ts +0 -70
  586. package/dist/knowledge/permission-templates.d.ts +0 -38
  587. package/dist/knowledge/personal-risk.d.ts +0 -36
  588. package/dist/knowledge/product-detail-source.d.ts +0 -37
  589. package/dist/knowledge/product-doc-b5.d.ts +0 -16
  590. package/dist/knowledge/progress-ledger.d.ts +0 -63
  591. package/dist/knowledge/progress-puzzle.d.ts +0 -82
  592. package/dist/knowledge/progress-risk.d.ts +0 -75
  593. package/dist/knowledge/progress-templates.d.ts +0 -38
  594. package/dist/knowledge/projection.d.ts +0 -54
  595. package/dist/knowledge/projection.spec.d.ts +0 -1
  596. package/dist/knowledge/projection.spec.js +0 -1
  597. package/dist/knowledge/proof-risk.d.ts +0 -33
  598. package/dist/knowledge/protocol-facts.d.ts +0 -17
  599. package/dist/knowledge/publish-gate.d.ts +0 -20
  600. package/dist/knowledge/publish-readiness.d.ts +0 -25
  601. package/dist/knowledge/publish-surface-contract.d.ts +0 -16
  602. package/dist/knowledge/puzzle-projections.d.ts +0 -11
  603. package/dist/knowledge/rail-exit-satisfiability.d.ts +0 -25
  604. package/dist/knowledge/registrar-risk.d.ts +0 -34
  605. package/dist/knowledge/release-sentinel.d.ts +0 -12
  606. package/dist/knowledge/repository-risk.d.ts +0 -46
  607. package/dist/knowledge/repository-write-semantics.d.ts +0 -27
  608. package/dist/knowledge/reputation-rules.d.ts +0 -36
  609. package/dist/knowledge/requirement-families.d.ts +0 -13
  610. package/dist/knowledge/resource-risk.d.ts +0 -32
  611. package/dist/knowledge/reward-ledger.d.ts +0 -97
  612. package/dist/knowledge/reward-puzzle.d.ts +0 -98
  613. package/dist/knowledge/reward-risk.d.ts +0 -86
  614. package/dist/knowledge/reward-templates.d.ts +0 -25
  615. package/dist/knowledge/rule-node-analyzers.d.ts +0 -49
  616. package/dist/knowledge/rule-outcome.d.ts +0 -5
  617. package/dist/knowledge/scenario-topology.d.ts +0 -48
  618. package/dist/knowledge/semantic-ir.d.ts +0 -136
  619. package/dist/knowledge/service-allocation-semantics.d.ts +0 -36
  620. package/dist/knowledge/service-allocator-audit-node.d.ts +0 -3
  621. package/dist/knowledge/service-ledger.d.ts +0 -87
  622. package/dist/knowledge/service-puzzle.d.ts +0 -158
  623. package/dist/knowledge/service-risk-node.d.ts +0 -3
  624. package/dist/knowledge/service-risk.d.ts +0 -110
  625. package/dist/knowledge/service-templates.d.ts +0 -41
  626. package/dist/knowledge/settlement-semantics.d.ts +0 -1
  627. package/dist/knowledge/strategy-manuals.d.ts +0 -15
  628. package/dist/knowledge/supply-chain.d.ts +0 -35
  629. package/dist/knowledge/template-index.d.ts +0 -19
  630. package/dist/knowledge/template-loader.d.ts +0 -425
  631. package/dist/knowledge/template-nav.d.ts +0 -9
  632. package/dist/knowledge/template-prose.d.ts +0 -50
  633. package/dist/knowledge/template-registry.d.ts +0 -48
  634. package/dist/knowledge/template-scanner.d.ts +0 -158
  635. package/dist/knowledge/template-test-profiles.d.ts +0 -17
  636. package/dist/knowledge/template-validation.d.ts +0 -3
  637. package/dist/knowledge/tools-reference.d.ts +0 -17
  638. package/dist/knowledge/treasury-ledger.d.ts +0 -42
  639. package/dist/knowledge/treasury-puzzle.d.ts +0 -163
  640. package/dist/knowledge/treasury-risk.d.ts +0 -88
  641. package/dist/knowledge/treasury-templates.d.ts +0 -38
  642. package/dist/knowledge/universal-template.d.ts +0 -22
  643. package/dist/knowledge/util-risk.d.ts +0 -30
  644. package/dist/knowledge/workflow-guidance.d.ts +0 -194
  645. package/dist/knowledge/workspace-lists.d.ts +0 -61
  646. package/dist/monitor/SuggestionBridge.spec.d.ts +0 -1
  647. package/dist/monitor/SuggestionBridge.spec.js +0 -1
  648. package/dist/participation/arbitrator-interest.d.ts +0 -22
  649. package/dist/participation/demander-interest.d.ts +0 -23
  650. package/dist/participation/employee-kpi.d.ts +0 -37
  651. package/dist/participation/employee-kpi.spec.d.ts +0 -1
  652. package/dist/participation/employee-kpi.spec.js +0 -1
  653. package/dist/participation/employee-store.d.ts +0 -16
  654. package/dist/participation/game-context.d.ts +0 -25
  655. package/dist/participation/index.d.ts +0 -2
  656. package/dist/participation/node-action-advisor.d.ts +0 -68
  657. package/dist/participation/time-window.d.ts +0 -48
  658. package/dist/persona/facet-profile.d.ts +0 -33
  659. package/dist/persona/persona-audit.spec.d.ts +0 -1
  660. package/dist/persona/persona-audit.spec.js +0 -1
  661. package/dist/playbooks/service-build/business-puzzle.d.ts +0 -48
  662. package/dist/playbooks/service-build/context-assembly.d.ts +0 -32
  663. package/dist/playbooks/service-build/facet-money.d.ts +0 -33
  664. package/dist/playbooks/service-build/facet-money.spec.d.ts +0 -1
  665. package/dist/playbooks/service-build/facet-money.spec.js +0 -1
  666. package/dist/playbooks/service-build/game-theory.d.ts +0 -47
  667. package/dist/playbooks/service-build/index.d.ts +0 -15
  668. package/dist/playbooks/service-build/intent-analyzer.d.ts +0 -72
  669. package/dist/playbooks/service-build/machine-nodes.d.ts +0 -27
  670. package/dist/playbooks/service-build/machine-panorama.d.ts +0 -71
  671. package/dist/playbooks/service-build/merchant-guide.d.ts +0 -382
  672. package/dist/playbooks/service-build/migration-planner.d.ts +0 -61
  673. package/dist/playbooks/service-build/mode-actions.d.ts +0 -260
  674. package/dist/playbooks/service-build/object-panorama.d.ts +0 -317
  675. package/dist/playbooks/service-build/object-type.d.ts +0 -1
  676. package/dist/playbooks/service-build/participation-radar.d.ts +0 -20
  677. package/dist/playbooks/service-build/pipeline-actions.d.ts +0 -108
  678. package/dist/playbooks/service-build/process.d.ts +0 -6
  679. package/dist/playbooks/service-build/relationship-profile.d.ts +0 -3
  680. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.d.ts +0 -1
  681. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +0 -1
  682. package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.d.ts +0 -1
  683. package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.js +0 -1
  684. package/dist/playbooks/service-build/reverse-mapping.d.ts +0 -66
  685. package/dist/playbooks/service-build/risk-aggregator.d.ts +0 -59
  686. package/dist/playbooks/service-build/service-panorama.d.ts +0 -229
  687. package/dist/playbooks/service-build/service-quote.d.ts +0 -2
  688. package/dist/playbooks/service-build/service-quote.spec.d.ts +0 -1
  689. package/dist/playbooks/service-build/service-quote.spec.js +0 -1
  690. package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +0 -1
  691. package/dist/playbooks/service-build/topology-evaluation.spec.js +0 -1
  692. package/dist/playbooks/service-build/topology-query.d.ts +0 -25
  693. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +0 -33
  694. package/dist/relationship/derivation.d.ts +0 -95
  695. package/dist/relationship/derivation.spec.d.ts +0 -1
  696. package/dist/relationship/derivation.spec.js +0 -1
  697. package/dist/relationship/incentive.d.ts +0 -38
  698. package/dist/relationship/index.d.ts +0 -4
  699. package/dist/relationship/registry.d.ts +0 -13
  700. package/dist/relationship/types.d.ts +0 -45
  701. package/dist/review/arb.d.ts +0 -4
  702. package/dist/review/demand.d.ts +0 -3
  703. package/dist/review/index.d.ts +0 -3
  704. package/dist/review/machine.d.ts +0 -3
  705. package/dist/review/order.d.ts +0 -8
  706. package/dist/review/progress.d.ts +0 -3
  707. package/dist/review/repository.d.ts +0 -3
  708. package/dist/review/service.d.ts +0 -5
  709. package/dist/review/types.d.ts +0 -163
  710. package/dist/role/derivation.d.ts +0 -35
  711. package/dist/role/index.d.ts +0 -6
  712. package/dist/role/intent.d.ts +0 -23
  713. package/dist/role/model.d.ts +0 -9
  714. package/dist/role/profiles.d.ts +0 -26
  715. package/dist/role/resolution.d.ts +0 -27
  716. package/dist/runtime/instance-registry.d.ts +0 -14
  717. package/dist/safety/index.d.ts +0 -3
  718. package/dist/schema/call/permission-handler.d.ts +0 -5
  719. package/dist/schema/call/semantic-customer-advice.spec.d.ts +0 -1
  720. package/dist/schema/call/semantic-customer-advice.spec.js +0 -1
  721. package/dist/schema/common/tokentype-short-probe.spec.d.ts +0 -1
  722. package/dist/schema/common/tokentype-short-probe.spec.js +0 -1
  723. package/dist/schema/envelope-unify.d.ts +0 -5
  724. package/dist/schema/goal/planning.d.ts +0 -742
  725. package/dist/schema/industry-pack/modes.d.ts +0 -447
  726. package/dist/schema/query/bi.d.ts +0 -3369
  727. package/dist/schema/utils/guard-query-utils.d.ts +0 -18
  728. package/dist/schema/utils/permission-index-utils.d.ts +0 -2
  729. package/dist/schema/utils/skills-recommendation.d.ts +0 -2
  730. package/dist/schema-query-impl/index.d.ts +0 -83
  731. package/dist/schemas/account_operation.output.json +0 -3869
  732. package/dist/schemas/ask_user.output.json +0 -54
  733. package/dist/schemas/benchmark_migration_operation.output.json +0 -1669
  734. package/dist/schemas/bridge_operation.output.json +0 -1548
  735. package/dist/schemas/config_operation.output.json +0 -896
  736. package/dist/schemas/employee_operation.output.json +0 -307
  737. package/dist/schemas/evaluation_operation.output.json +0 -4716
  738. package/dist/schemas/guard2file.output.json +0 -83
  739. package/dist/schemas/industry_pack_operation.output.json +0 -2985
  740. package/dist/schemas/intent_radar.output.json +0 -326
  741. package/dist/schemas/keeper_operation.output.json +0 -1441
  742. package/dist/schemas/local_cache_operation.output.json +0 -1718
  743. package/dist/schemas/local_history_operation.output.json +0 -1644
  744. package/dist/schemas/local_info_operation.output.json +0 -1530
  745. package/dist/schemas/local_mark_operation.output.json +0 -1622
  746. package/dist/schemas/machineNode2file.output.json +0 -88
  747. package/dist/schemas/messenger_operation.output.json +0 -4692
  748. package/dist/schemas/monitor_events.output.json +0 -1602
  749. package/dist/schemas/monitor_subscription.output.json +0 -1629
  750. package/dist/schemas/onchain_events.output.json +0 -4053
  751. package/dist/schemas/onchain_operations.output.json +0 -7788
  752. package/dist/schemas/onchain_table_data.output.json +0 -11868
  753. package/dist/schemas/permission_operation.output.json +0 -205
  754. package/dist/schemas/persona_operation.output.json +0 -64612
  755. package/dist/schemas/query_toolkit.output.json +0 -28302
  756. package/dist/schemas/schema_query.output.json +0 -81
  757. package/dist/schemas/service_clone_operation.output.json +0 -247
  758. package/dist/schemas/strategy_review_operation.output.json +0 -532
  759. package/dist/schemas/watch_operation.output.json +0 -930
  760. package/dist/schemas/wip_file.output.json +0 -360
  761. package/dist/schemas/workflow_operation.output.json +0 -422
  762. package/dist/schemas/workspace_operation.output.json +0 -477
  763. package/dist/schemas/wowok_buildin_info.output.json +0 -2477
  764. package/dist/strategy/collectors.d.ts +0 -66
  765. package/dist/strategy/collectors.spec.d.ts +0 -1
  766. package/dist/strategy/collectors.spec.js +0 -1
  767. package/dist/strategy/index.d.ts +0 -5
  768. package/dist/strategy/metrics.d.ts +0 -20
  769. package/dist/strategy/review.d.ts +0 -48
  770. package/dist/strategy/scorecard.d.ts +0 -32
  771. package/dist/strategy/store.d.ts +0 -26
  772. package/dist/task/ProcessStore.d.ts +0 -98
  773. package/dist/task/playbook.d.ts +0 -11
  774. package/dist/task/substep-trace.d.ts +0 -91
  775. package/dist/tools/build-fingerprint.d.ts +0 -28
  776. package/dist/tools/error-catalog.d.ts +0 -17
  777. package/dist/tools/handlers/ask-user.d.ts +0 -3
  778. package/dist/tools/handlers/benchmark-migration.d.ts +0 -121
  779. package/dist/tools/handlers/bridge.d.ts +0 -8
  780. package/dist/tools/handlers/config.d.ts +0 -2
  781. package/dist/tools/handlers/dispatch-expectations.d.ts +0 -2
  782. package/dist/tools/handlers/dispatch-expectations.spec.d.ts +0 -1
  783. package/dist/tools/handlers/dispatch-expectations.spec.js +0 -1
  784. package/dist/tools/handlers/employee.d.ts +0 -8
  785. package/dist/tools/handlers/employee.spec.d.ts +0 -1
  786. package/dist/tools/handlers/employee.spec.js +0 -1
  787. package/dist/tools/handlers/entry-edge-recipe.d.ts +0 -101
  788. package/dist/tools/handlers/escrow-deficit.d.ts +0 -10
  789. package/dist/tools/handlers/evaluation.d.ts +0 -2
  790. package/dist/tools/handlers/evaluation.spec.d.ts +0 -1
  791. package/dist/tools/handlers/evaluation.spec.js +0 -1
  792. package/dist/tools/handlers/file-export.d.ts +0 -3
  793. package/dist/tools/handlers/fund-rail-recipe.d.ts +0 -10
  794. package/dist/tools/handlers/goal.d.ts +0 -4
  795. package/dist/tools/handlers/industry-pack.d.ts +0 -3
  796. package/dist/tools/handlers/intent-radar.d.ts +0 -2
  797. package/dist/tools/handlers/keeper.d.ts +0 -12
  798. package/dist/tools/handlers/local.d.ts +0 -6
  799. package/dist/tools/handlers/mark-namespace.d.ts +0 -30
  800. package/dist/tools/handlers/messenger.d.ts +0 -24
  801. package/dist/tools/handlers/monitor.d.ts +0 -26
  802. package/dist/tools/handlers/name-resolution.d.ts +0 -4
  803. package/dist/tools/handlers/name-resolution.spec.d.ts +0 -1
  804. package/dist/tools/handlers/name-resolution.spec.js +0 -1
  805. package/dist/tools/handlers/network.d.ts +0 -1
  806. package/dist/tools/handlers/onchain-name-registration.d.ts +0 -49
  807. package/dist/tools/handlers/onchain-name-registration.spec.d.ts +0 -1
  808. package/dist/tools/handlers/onchain-name-registration.spec.js +0 -1
  809. package/dist/tools/handlers/onchain.d.ts +0 -132
  810. package/dist/tools/handlers/permission.d.ts +0 -2
  811. package/dist/tools/handlers/persona.d.ts +0 -4
  812. package/dist/tools/handlers/publish-binding-echo.d.ts +0 -22
  813. package/dist/tools/handlers/review-chain.d.ts +0 -19
  814. package/dist/tools/handlers/schema-query.d.ts +0 -2
  815. package/dist/tools/handlers/service-clone.d.ts +0 -20
  816. package/dist/tools/handlers/stale-build-check.d.ts +0 -9
  817. package/dist/tools/handlers/strategy-review.d.ts +0 -2
  818. package/dist/tools/handlers/submission-assembly.d.ts +0 -55
  819. package/dist/tools/handlers/watch.d.ts +0 -2
  820. package/dist/tools/handlers/winner-derivation.d.ts +0 -20
  821. package/dist/tools/handlers/wip-upload.d.ts +0 -22
  822. package/dist/tools/handlers/wip.d.ts +0 -2
  823. package/dist/tools/handlers/workflow.d.ts +0 -2
  824. package/dist/tools/handlers/workspace.d.ts +0 -4
  825. package/dist/tools/move-fn-index.gen.d.ts +0 -3
  826. package/dist/tools/publish-gate-state.d.ts +0 -5
  827. package/dist/tools/registry/agent.d.ts +0 -2
  828. package/dist/tools/registry/bridge.d.ts +0 -2
  829. package/dist/tools/registry/business.d.ts +0 -2
  830. package/dist/tools/registry/config.d.ts +0 -2
  831. package/dist/tools/registry/evaluation.d.ts +0 -2
  832. package/dist/tools/registry/files.d.ts +0 -2
  833. package/dist/tools/registry/identity.d.ts +0 -2
  834. package/dist/tools/registry/interaction.d.ts +0 -2
  835. package/dist/tools/registry/local.d.ts +0 -2
  836. package/dist/tools/registry/messenger.d.ts +0 -2
  837. package/dist/tools/registry/monitor.d.ts +0 -2
  838. package/dist/tools/registry/onchain.d.ts +0 -2
  839. package/dist/tools/registry/query.d.ts +0 -2
  840. package/dist/tools/retry.d.ts +0 -8
  841. package/dist/tools/rules-hook.d.ts +0 -5
  842. package/dist/tools/runtime-health.d.ts +0 -10
  843. package/dist/tools/sanitize-description-roundtrip.spec.d.ts +0 -1
  844. package/dist/tools/sanitize-description-roundtrip.spec.js +0 -1
  845. package/dist/tools/sanitize-output.d.ts +0 -4
  846. package/dist/tools/sanitize-output.spec.d.ts +0 -1
  847. package/dist/tools/sanitize-output.spec.js +0 -1
  848. package/dist/tools/shared.d.ts +0 -20
  849. package/dist/tools/transport-integrity.d.ts +0 -7
  850. package/dist/tools/upgrade-check.d.ts +0 -75
  851. package/dist/tools/wip-deploy-assist.d.ts +0 -34
  852. package/dist/tools/wip-verify-ledger.d.ts +0 -16
  853. package/dist/tools/wrap.d.ts +0 -45
@@ -1 +1 @@
1
- import*as a523a from'@wowok/wowok';const SDK_SCHEMA_VERSION=a523a['SCHEMA_VERSION']??'1.0.0',checkSchemaCompatibility=a523a['checkSchemaCompatibility']??((a,b)=>({'compatible':!![]}));export const MCP_SCHEMA_VERSION='1.2.0';export function getSchemaVersions(){return{'sdk':SDK_SCHEMA_VERSION,'mcp':MCP_SCHEMA_VERSION};}export function checkClientSchemaCompatibility(a,b={}){const c=getSchemaVersions(),d={'compatible':!![],'warnings':[],'errors':[],'versions':c,'client_version':a};if(!a)return d;const e=checkSchemaCompatibility(a,c['sdk']);if(!e['compatible']){d['compatible']=![];const g='SDK\x20schema\x20incompatibility:\x20'+e['reason'];b['mode']==='strict'?d['errors']['push'](g):d['warnings']['push'](g);}const f=checkSchemaCompatibility(a,c['mcp']);if(!f['compatible']){d['compatible']=![];const h='MCP\x20schema\x20incompatibility:\x20'+f['reason'];b['mode']==='strict'?d['errors']['push'](h):d['warnings']['push'](h);}return d;}export function attachSchemaWarning(a,b){if(b['warnings']['length']===0x0&&b['errors']['length']===0x0)return a;const c=[];b['warnings']['length']>0x0&&c['push'](...b['warnings']);b['errors']['length']>0x0&&c['push'](...b['errors']);const d=a['semantic']?{...a['semantic'],'warnings':[...a['semantic']['warnings']||[],...c]}:undefined;return{...a,'semantic':d,'schema_warning':{'compatible':b['compatible'],'warnings':c,'client_version':b['client_version'],'server_versions':b['versions']}};}
1
+ import*as a504a from'@wowok/wowok';const SDK_SCHEMA_VERSION=a504a['SCHEMA_VERSION']??'1.0.0',checkSchemaCompatibility=a504a['checkSchemaCompatibility']??((a,b)=>({'compatible':!![]}));export const MCP_SCHEMA_VERSION='1.2.0';export function getSchemaVersions(){return{'sdk':SDK_SCHEMA_VERSION,'mcp':MCP_SCHEMA_VERSION};}export function checkClientSchemaCompatibility(a,b={}){const c=getSchemaVersions(),d={'compatible':!![],'warnings':[],'errors':[],'versions':c,'client_version':a};if(!a)return d;const e=checkSchemaCompatibility(a,c['sdk']);if(!e['compatible']){d['compatible']=![];const g='SDK\x20schema\x20incompatibility:\x20'+e['reason'];b['mode']==='strict'?d['errors']['push'](g):d['warnings']['push'](g);}const f=checkSchemaCompatibility(a,c['mcp']);if(!f['compatible']){d['compatible']=![];const h='MCP\x20schema\x20incompatibility:\x20'+f['reason'];b['mode']==='strict'?d['errors']['push'](h):d['warnings']['push'](h);}return d;}export function attachSchemaWarning(a,b){if(b['warnings']['length']===0x0&&b['errors']['length']===0x0)return a;const c=[];b['warnings']['length']>0x0&&c['push'](...b['warnings']);b['errors']['length']>0x0&&c['push'](...b['errors']);const d=a['semantic']?{...a['semantic'],'warnings':[...a['semantic']['warnings']||[],...c]}:undefined;return{...a,'semantic':d,'schema_warning':{'compatible':b['compatible'],'warnings':c,'client_version':b['client_version'],'server_versions':b['versions']}};}
@@ -30,8 +30,8 @@ export declare const WorkspaceOperationInputSchema: z.ZodObject<{
30
30
  offset: z.ZodOptional<z.ZodNumber>;
31
31
  limit: z.ZodOptional<z.ZodNumber>;
32
32
  encoding: z.ZodOptional<z.ZodEnum<{
33
- text: "text";
34
33
  base64: "base64";
34
+ text: "text";
35
35
  }>>;
36
36
  }, z.core.$strict>;
37
37
  export declare const WorkspaceOperationOutputSchema: z.ZodObject<{
@@ -52,8 +52,8 @@ export declare const WorkspaceOperationOutputSchema: z.ZodObject<{
52
52
  path: z.ZodString;
53
53
  content: z.ZodString;
54
54
  encoding: z.ZodOptional<z.ZodEnum<{
55
- text: "text";
56
55
  base64: "base64";
56
+ text: "text";
57
57
  }>>;
58
58
  size: z.ZodOptional<z.ZodNumber>;
59
59
  total_lines: z.ZodOptional<z.ZodNumber>;
@@ -1 +1 @@
1
- import{readFileSync,existsSync,writeFileSync,mkdirSync}from'fs';import{resolve,join,dirname}from'path';import{fileURLToPath}from'url';import{GUARDQUERY,ObjectType,ValueType}from'@wowok/wowok';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'../knowledge/tools-reference.js';import{GUARD_DESIGN_PATTERNS,getGuardDesignPattern,GUARD_DESIGN_PATTERNS_VERSION,GUARD_SCHEMA_NOTES}from'../knowledge/guard-design-patterns.js';import{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,PROTOCOL_SLOT_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,SAFETY_RULES_VERSION}from'../knowledge/safety-rules.js';import{listTemplates as a535a,getTemplateDetail,instantiateTemplate,getTemplateCounts,TEMPLATE_OBJECT_TYPES}from'../knowledge/template-registry.js';import{GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT}from'../knowledge/guard-templates.js';import{lintGuard,formatLintResult}from'../knowledge/guard-lint.js';import{renderGuardTreeIndented,renderGuardMermaid,walkGuardTree}from'../knowledge/guard-render.js';import{getGuardQueryByIdOrName}from'../schema/utils/guard-query-utils.js';const __dirname=fileURLToPath(new URL('.',import.meta.url)),SCHEMAS_DIR=resolve(__dirname,'../../dist/schemas'),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;}}function guardParamImportance(a){if(!a['required'])return'optional';return a['type']==='address'||a['type']==='vec_address'?'identity-critical':'required';}const GUARD_PARAM_IMPORTANCE_RANK={'identity-critical':0x0,'required':0x1,'optional':0x2};function projectGuardParam(a){return{'name':a['name'],'type':a['type'],'meaning':a['description'],'importance':guardParamImportance(a),'required':a['required'],'default':a['default']??null,'constraint':a['constraint']??null};}function projectGuardTemplate(a){return{'id':a['id'],'scene_id':a['scene_id'],'name':a['name'],'description':a['description'],'verifier_constraint_level':a['verifier_constraint_level']??null,'recommended_patterns':a['recommended_patterns'],'applicable_industries':a['applicable_industries'],'relevant_risks':a['relevant_risks'],'creation_notes':a['creation_notes'],'example_use_case':a['example_use_case'],'parameters':a['parameters']['map'](projectGuardParam)['sort']((c,d)=>GUARD_PARAM_IMPORTANCE_RANK[c['importance']]-GUARD_PARAM_IMPORTANCE_RANK[d['importance']]),'example_table':a['example_table'],'example_root':a['example_root']};}export function getGuardTemplates(a){if(!a)return{'version':GUARD_TEMPLATES_VERSION,'count':GUARD_TEMPLATES_COUNT,'templates':GUARD_TEMPLATES['map'](c=>({'id':c['id'],'scene_id':c['scene_id'],'name':c['name'],'description':c['description'],'verifier_constraint_level':c['verifier_constraint_level']??null,'parameter_count':c['parameters']['length']}))};const b=GUARD_TEMPLATES['find'](c=>c['id']===a||c['name']===a);return b?projectGuardTemplate(b):null;}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;}}const INLINE_CHAR_LIMIT=0x20*0x400,AUTO_OVERFLOW_DIR='.wowok/tmp';function unionVariantLabel(a){if(!a||typeof a!=='object')return'variant';const b=a['properties']&&typeof a['properties']==='object'?a['properties']:undefined;if(b)for(const [c,d]of Object['entries'](b)){if(d&&typeof d==='object'&&d['const']!==undefined)return c+'='+String(d['const']);}return typeof a['title']==='string'?a['title']:'variant';}export function buildSchemaSummary(a){const b=[];a&&typeof a['title']==='string'&&b['push']('Title:\x20'+a['title']);const c=a&&typeof a==='object'?a['properties']:undefined;if(c&&typeof c==='object'&&!Array['isArray'](c)){const d=Array['isArray'](a['required'])?a['required']:[],e=Object['keys'](c);b['push']('Top-level\x20fields\x20('+e['length']+',\x20*\x20=\x20required):');for(const f of e['slice'](0x0,0x28)){const g=c[f]??{},h=Array['isArray'](g['type'])?g['type']['join']('|'):g['type']??(g['$ref']?'ref':g['anyOf']||g['oneOf']?'union':'any'),i=d['includes'](f)?'*':'',j=typeof g['description']==='string'&&g['description']['length']>0x0?'\x20—\x20'+g['description']['split']('\x0a')[0x0]['slice'](0x0,0x50):'';b['push']('\x20\x20-\x20'+f+i+':\x20'+h+j);}e['length']>0x28&&b['push']('\x20\x20-\x20...and\x20'+(e['length']-0x28)+'\x20more\x20—\x20use\x20action=\x27get_field\x27\x20with\x20field_path\x20to\x20inspect');}else{if(a&&(Array['isArray'](a['oneOf'])||Array['isArray'](a['anyOf']))){const k=a['oneOf']??a['anyOf'];b['push']('Union\x20of\x20'+k['length']+'\x20variants:');for(const m of k['slice'](0x0,0x28)){const o=m&&typeof m['description']==='string'&&m['description']['length']>0x0?'\x20—\x20'+m['description']['split']('\x0a')[0x0]['slice'](0x0,0x50):'';b['push']('\x20\x20-\x20'+unionVariantLabel(m)+o);}k['length']>0x28&&b['push']('\x20\x20-\x20...and\x20'+(k['length']-0x28)+'\x20more');const l=k['filter'](q=>q&&typeof q==='object'&&q['properties']&&typeof q['properties']==='object');if(l['length']===k['length']&&l['length']>0x0){const q=Object['keys'](l[0x0]['properties'])['filter'](r=>l['every'](s=>Object['prototype']['hasOwnProperty']['call'](s['properties'],r)));b['push'](q['length']>0x0?'Common\x20fields\x20(declared\x20by\x20ALL\x20'+l['length']+'\x20variants):\x20'+q['join'](',\x20')+'.':'No\x20field\x20is\x20declared\x20by\x20all\x20'+l['length']+'\x20variants\x20—\x20each\x20variant\x20takes\x20its\x20own\x20parameters.');}else b['push']('Field\x20names\x20differ\x20per\x20variant\x20—\x20read\x20the\x20variant\x27s\x20own\x20list\x20above.\x20'+'The\x20discriminator\x20(\x22operation\x22\x20and\x20friends)\x20is\x20the\x20only\x20shared\x20key.');for(const r of k['slice'](0x0,0x28)){const s=r&&typeof r==='object'&&r['properties']&&typeof r['properties']==='object'?Object['keys'](r['properties']):[];if(s['length']===0x0)continue;b['push']('\x20\x20\x20\x20'+unionVariantLabel(r)+'\x20fields:\x20'+s['join'](',\x20'));}b['push']('Drill\x20into\x20the\x20variant\x20you\x20need\x20with\x20action=\x27get_field\x27\x20(name\x20+\x20field_path)\x20—\x20the\x20lists\x20above\x20are\x20a\x20summary,\x20not\x20the\x20schema.');}else b['push']('No\x20top-level\x20properties\x20map\x20—\x20use\x20action=\x27get_field\x27\x20with\x20a\x20field_path\x20to\x20inspect\x20this\x20schema.');}return b['join']('\x0a');}export function autoOverflowToFile(a,b){try{const c=JSON['stringify'](a)['length'];if(c<=INLINE_CHAR_LIMIT)return null;const d=process['env']['WOWOK_SCHEMA_TMP_DIR'],e=d?resolve(d):resolve(process['cwd'](),AUTO_OVERFLOW_DIR);!existsSync(e)&&mkdirSync(e,{'recursive':!![]});const f=b['replace'](/[^a-zA-Z0-9_-]/g,'_'),g=f+'.schema.json',h=join(e,g);return writeFileSync(h,JSON['stringify'](a,null,0x2),'utf-8'),{'absolute_path':h,'relative_path':d?h:join(AUTO_OVERFLOW_DIR,g),'bytes':c,'summary':buildSchemaSummary(a)};}catch{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':'Guard\x20template\x20\x27'+g+'\x27\x20not\x20found\x20in\x20the\x20unified\x20library\x20(v'+GUARD_TEMPLATES_VERSION+').\x20Omit\x20\x27template\x27\x20to\x20list\x20every\x20id.','suggestions':['Omit\x20\x27template\x27\x20to\x20list\x20all\x20guard\x20template\x20ids.','Ids\x20are\x20scene-namespaced\x20—\x20e.g.\x20tpl_buy_guard_*\x20(purchase\x20gates),\x20tpl_machine_*\x20(forward\x20gates),\x20tpl_reward_*\x20(claim\x20gates).\x20Pass\x20a\x20listed\x20id\x20for\x20the\x20full\x20parameterized\x20disclosure\x20(meaning,\x20default,\x20constraint,\x20importance).']};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=a535a(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==='get_tool_reference'){if(c){const z=getToolReference(c);if(!z)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'](B=>B['name'])['join'](',\x20')]};const A=getToolSequence(c);return{'success':!![],'action':b,'data':{'tool':z,'call_sequence':A??null},'message':'Retrieved\x20tool\x20reference:\x20'+c};}if(d){const B=searchToolReference(d);return{'success':!![],'action':b,'data':{'tools':B,'count':B['length']},'message':'Found\x20'+B['length']+'\x20tool(s)\x20matching\x20\x27'+d+'\x27','suggestions':B['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 y=TOOLS_REFERENCE['map'](C=>({'name':C['name'],'summary':C['summary'],'actions':C['actions']??[],'notes':C['notes']??[]}));return{'success':!![],'action':b,'data':{'tools':y,'count':y['length']},'message':'Retrieved\x20reference\x20for\x20'+y['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 D=getGuardDesignPattern(c);if(!D)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'](E=>E['id'])['join'](',\x20')]};return{'success':!![],'action':b,'data':{'pattern':D},'message':'Retrieved\x20Guard\x20design\x20pattern:\x20'+c};}if(d){const E=GUARD_DESIGN_PATTERNS['filter'](G=>G['host']===d),F=E['length']>0x0?E:GUARD_DESIGN_PATTERNS['filter'](G=>G['business_requirement']['toLowerCase']()['includes'](d['toLowerCase']())||G['logic_summary']['toLowerCase']()['includes'](d['toLowerCase']()));return{'success':!![],'action':b,'data':{'patterns':F,'count':F['length'],'filtered_by':E['length']>0x0?'host':'keyword','schema_notes':GUARD_SCHEMA_NOTES},'message':'Found\x20'+F['length']+'\x20Guard\x20design\x20pattern(s)\x20matching\x20\x27'+d+'\x27','suggestions':F['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 C=GUARD_DESIGN_PATTERNS['map'](G=>({'id':G['id'],'business_requirement':G['business_requirement'],'host':G['host'],'data_source':G['data_source'],'verifier_level':G['verifier_level'],'logic_summary':G['logic_summary'],'key_queries':G['key_queries'],'notes':G['notes']??[]}));return{'success':!![],'action':b,'data':{'patterns':C,'count':C['length'],'version':GUARD_DESIGN_PATTERNS_VERSION,'schema_notes':GUARD_SCHEMA_NOTES},'message':'Retrieved\x20'+C['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,'protocol_slot_rules':PROTOCOL_SLOT_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/\x20protocol\x20slots\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;\x20'+'Guards\x20bound\x20on\x20machine\x20forwards\x20MUST\x20declare\x20protocol\x20slot\x20254\x20(task\x20binding),\x20and\x20every\x20allocator\x20{GuardIdentifier:N}\x20leg\x20MUST\x20name\x20a\x20declared\x20b_submission\x20Address\x20slot.'};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 G=listSchemas();return{'success':!![],'action':b,'data':G,'message':'Found\x20'+G['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 H=getSchema(c);if(!H){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(H,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]};}const I=autoOverflowToFile(H,c);if(I)return{'success':!![],'action':b,'data':null,'message':'Schema\x20\x27'+c+'\x27\x20is\x20large\x20('+Math['round'](I['bytes']/0x400)+'\x20KB)\x20—\x20'+'written\x20to\x20file\x20instead\x20of\x20inlining\x20to\x20protect\x20your\x20context.','output_file_path':I['absolute_path'],'inline_summary':I['summary'],'suggestions':['Read\x20the\x20full\x20file\x20with\x20the\x20Read\x20tool:\x20'+I['absolute_path'],'If\x20the\x20sandbox\x20blocks\x20that\x20path,\x20resolve\x20the\x20relative\x20path\x20\x27'+I['relative_path']+'\x27\x20against\x20the\x20workspace\x20root\x20and\x20read\x20that.','Without\x20file\x20access,\x20query\x20specific\x20fields\x20via\x20action=\x27get_field\x27\x20with\x20name=\x27'+c+'\x27\x20and\x20a\x20field_path\x20from\x20the\x20summary\x20below.']};return{'success':!![],'action':b,'data':H,'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_guard_queries':{const O=d?.['trim']()['toLowerCase'](),P=R=>({'id':R['id'],'name':R['name'],'objectType':ObjectType[R['objectType']]??String(R['objectType']),'returnType':ValueType[R['return']]??String(R['return'])});if(O){const R=GUARDQUERY['filter'](S=>S['name']['toLowerCase']()['includes'](O)||S['description']?.['toLowerCase']()['includes'](O)||String(S['id'])===O)['map'](S=>({...P(S),'description':S['description']}));return{'success':!![],'action':b,'data':R,'message':'Found\x20'+R['length']+'\x20GUARDQUERY\x20entries\x20matching\x20\x27'+d+'\x27\x20'+('(of\x20'+GUARDQUERY['length']+'\x20total).\x20Use\x20names,\x20not\x20numeric\x20ids,\x20in\x20Guard\x20trees\x20—\x20')+'names\x20fail\x20loudly\x20at\x20validation\x20when\x20wrong;\x20a\x20wrong-but-existing\x20id\x20silently\x20checks\x20a\x20different\x20field.'};}if(h){const S=GUARDQUERY['map'](U=>({...P(U),'description':U['description']})),T=writeResponseToFile(S,h);if(T)return{'success':!![],'action':b,'data':null,'message':'Full\x20GUARDQUERY\x20catalog\x20('+S['length']+'\x20entries)\x20written\x20to\x20file:\x20'+T,'output_file_path':T,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+T]};}const Q=GUARDQUERY['map'](P);return{'success':!![],'action':b,'data':Q,'message':'GUARDQUERY\x20catalog:\x20'+Q['length']+'\x20entries\x20(compact\x20form\x20—\x20id,\x20name,\x20objectType,\x20returnType).\x20'+'Add\x20query=\x27<keyword>\x27\x20for\x20full\x20entries\x20with\x20descriptions,\x20or\x20output_file\x20to\x20dump\x20all\x20details\x20to\x20a\x20file.\x20'+'Prefer\x20NAME\x20references\x20in\x20Guard\x20trees;\x20a\x20numeric\x20id\x20is\x20resolved\x20verbatim\x20and\x20a\x20wrong-but-existing\x20id\x20'+'silently\x20checks\x20a\x20different\x20field.'};}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 U=getOutputSchema(c);if(!U){const W=listSchemas(),X=W['find'](Z=>Z['name']===c);if(X)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 Y=searchSchemas(c)['slice'](0x0,0x5);return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20not\x20found','suggestions':Y['length']>0x0?Y['map'](Z=>'Did\x20you\x20mean:\x20'+Z['name']+'?'):['Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20tools']};}if(h){const Z=writeResponseToFile(U,h);if(Z)return{'success':!![],'action':b,'data':null,'message':'Output\x20schema\x20\x27'+c+'\x27\x20written\x20to\x20file:\x20'+Z,'output_file_path':Z,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+Z]};}const V=autoOverflowToFile(U,c);if(V)return{'success':!![],'action':b,'data':null,'message':'Output\x20schema\x20\x27'+c+'\x27\x20is\x20large\x20('+Math['round'](V['bytes']/0x400)+'\x20KB)\x20—\x20'+'written\x20to\x20file\x20instead\x20of\x20inlining\x20to\x20protect\x20your\x20context.','output_file_path':V['absolute_path'],'inline_summary':V['summary'],'suggestions':['Read\x20the\x20full\x20file\x20with\x20the\x20Read\x20tool:\x20'+V['absolute_path'],'If\x20the\x20sandbox\x20blocks\x20that\x20path,\x20resolve\x20the\x20relative\x20path\x20\x27'+V['relative_path']+'\x27\x20against\x20the\x20workspace\x20root\x20and\x20read\x20that.','Without\x20file\x20access,\x20query\x20specific\x20fields\x20via\x20action=\x27get_field\x27\x20with\x20name=\x27'+c+'\x27\x20and\x20a\x20field_path\x20from\x20the\x20summary\x20below.']};return{'success':!![],'action':b,'data':U,'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,\x20\x27get_tool_reference\x27,\x20\x27get_guard_design_patterns\x27,\x20\x27get_safety_rules\x27,\x20\x27get_templates\x27,\x20or\x20\x27analyze_guard_semantics\x27']};}}const GUARD_SEMANTICS_READING_CHECKLIST=['WHO\x20can\x20satisfy\x20this\x20Guard\x20(identity:\x20Signer\x20bindings,\x20Entity\x20membership,\x20allowlists)?','WHEN\x20can\x20it\x20be\x20satisfied\x20(time:\x20Clock\x20comparisons,\x20deadlines,\x20windows)?','WHAT\x20evidence\x20must\x20the\x20caller\x20submit\x20(b_submission\x20table\x20entries\x20—\x20Payment/Order/Proof\x20objects)?','WHICH\x20on-chain\x20data\x20does\x20it\x20read,\x20and\x20can\x20that\x20data\x20change\x20(Repository\x20entries\x20are\x20MUTABLE\x20—\x20who\x20controls\x20the\x20writes)?','WHAT\x20does\x20the\x20counterparty\x20gain/lose\x20in\x20each\x20branch\x20of\x20the\x20logic\x20tree?','ARE\x20there\x20error-level\x20diagnostics\x20or\x20critical\x20risks\x20(they\x20block\x20or\x20endanger\x20execution)?'];export async function analyzeGuardSemantics(a){const b=await lintGuard(a,{'auto_fix':![]}),c={'root':a['root'],'table':(a['table']??[])['map'](l=>({'identifier':l['identifier'],'name':l['name'],'value_type':l['value_type']??'Address','b_submission':l['b_submission']??![],'value':l['value']})),'guardName':a['description']??null,'rely':a['rely']??null},d=renderGuardTreeIndented(c),e=renderGuardMermaid(a['root']),f=new Set(),g=[],h=new Set();let i=![],j=![];walkGuardTree(a['root'],l=>{if(l['type']==='context'){if(l['context']==='Clock')i=!![];if(l['context']==='Signer')j=!![];}l['type']==='identifier'&&typeof l['identifier']==='number'&&h['add'](l['identifier']);if(l['type']==='query'){const m=l['object'];m&&typeof m==='object'&&typeof m['identifier']==='number'&&h['add'](m['identifier']);const n=l['parameters'];if(Array['isArray'](n))for(const o of n){o&&typeof o==='object'&&typeof o['identifier']==='number'&&h['add'](o['identifier']);}}if(l['type']==='query'&&l['query']!==undefined&&l['query']!==null){if(typeof l['query']==='number'){const q=getGuardQueryByIdOrName(l['query']);if(q)f['add'](q['id']);else g['push'](l['query']);}else{const r=getGuardQueryByIdOrName(l['query']);if(r)f['add'](r['id']);else g['push'](l['query']);}}});const k={'submission_requirements':(a['table']??[])['filter'](l=>l['b_submission']===!![])['map'](l=>({'identifier':l['identifier'],'value_type':l['value_type'],'object_type':l['object_type'],'name':l['name']})),'data_sources':(a['table']??[])['filter'](l=>l['b_submission']!==!![])['map'](l=>({'identifier':l['identifier'],'kind':l['is_system_address']?'system_address':l['object_type']?'object':'fixed_value','value_type':l['value_type'],'object_type':l['object_type'],'name':l['name'],'is_mutable_onchain':l['object_type']==='Repository'})),'query_dependencies':[...f]['sort']((l,m)=>l-m),'unresolved_queries':g,'unresolved_identifiers':[...h]['filter'](l=>!(a['table']??[])['some'](m=>m['identifier']===l))['sort']((l,m)=>l-m),'has_time_conditions':i,'has_signer_constraints':j,'has_rely_composition':Array['isArray'](a['rely']?.['guards'])&&a['rely']['guards']['length']>0x0,'reading_checklist':GUARD_SEMANTICS_READING_CHECKLIST};return{'render':{'tree_indented':d,'mermaid':e},'lint':b,'party_evaluation':k};}export{formatLintResult};
1
+ import{readFileSync,existsSync,writeFileSync,mkdirSync}from'fs';import{resolve,join,dirname}from'path';import{fileURLToPath}from'url';import{GUARDQUERY,ObjectType,ValueType}from'@wowok/wowok';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'../knowledge/tools-reference.js';import{GUARD_DESIGN_PATTERNS,getGuardDesignPattern,GUARD_DESIGN_PATTERNS_VERSION,GUARD_SCHEMA_NOTES}from'../knowledge/guard-design-patterns.js';import{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,PROTOCOL_SLOT_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,SAFETY_RULES_VERSION}from'../knowledge/safety-rules.js';import{listTemplates as a516a,getTemplateDetail,instantiateTemplate,getTemplateCounts,TEMPLATE_OBJECT_TYPES}from'../knowledge/template-registry.js';import{GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT}from'../knowledge/guard-templates.js';import{lintGuard,formatLintResult}from'../knowledge/guard-lint.js';import{renderGuardTreeIndented,renderGuardMermaid,walkGuardTree}from'../knowledge/guard-render.js';import{getGuardQueryByIdOrName}from'../schema/utils/guard-query-utils.js';const __dirname=fileURLToPath(new URL('.',import.meta.url)),SCHEMAS_DIR=resolve(__dirname,'../../dist/schemas'),WORKSPACE_TMP_DIR=resolve(process['cwd'](),'.trae','tmp');export function areSchemasAvailable(){return existsSync(SCHEMAS_DIR)&&existsSync(join(SCHEMAS_DIR,'index.json'));}let schemaIndexCache;export function getSchemaIndex(){if(schemaIndexCache!==undefined)return schemaIndexCache;try{const a=join(SCHEMAS_DIR,'index.json');if(!existsSync(a))return null;const b=readFileSync(a,'utf-8');return schemaIndexCache=JSON['parse'](b),schemaIndexCache;}catch{return null;}}export function listSchemas(){const a=getSchemaIndex();if(!a)return[];return[...a['tools']||[],...a['operations']||[]];}const schemaCache=new Map(),outputSchemaCache=new Map();export function getSchema(a){const b=schemaCache['get'](a);if(b!==undefined)return b;try{let c=join(SCHEMAS_DIR,a+'.schema.json');!existsSync(c)&&(c=join(SCHEMAS_DIR,a+'.json'));if(!existsSync(c))return null;const d=readFileSync(c,'utf-8'),e=JSON['parse'](d),f=resolveSchemaRefs(e);return schemaCache['set'](a,f),f;}catch{return null;}}let outputSchemaResolver=null;export function registerOutputSchemaResolver(a){outputSchemaResolver=a;}export function getOutputSchema(a){const b=outputSchemaCache['get'](a);if(b!==undefined)return b;try{const c=join(SCHEMAS_DIR,a+'.output.json');if(existsSync(c)){const d=readFileSync(c,'utf-8'),e=JSON['parse'](d),f=resolveSchemaRefs(e);return outputSchemaCache['set'](a,f),f;}}catch{}if(!outputSchemaResolver)return null;try{const g=outputSchemaResolver(a);if(!g)return null;const h=resolveSchemaRefs(g);return outputSchemaCache['set'](a,h),h;}catch{return null;}}function guardParamImportance(a){if(!a['required'])return'optional';return a['type']==='address'||a['type']==='vec_address'?'identity-critical':'required';}const GUARD_PARAM_IMPORTANCE_RANK={'identity-critical':0x0,'required':0x1,'optional':0x2};function projectGuardParam(a){return{'name':a['name'],'type':a['type'],'meaning':a['description'],'importance':guardParamImportance(a),'required':a['required'],'default':a['default']??null,'constraint':a['constraint']??null};}function projectGuardTemplate(a){return{'id':a['id'],'scene_id':a['scene_id'],'name':a['name'],'description':a['description'],'verifier_constraint_level':a['verifier_constraint_level']??null,'recommended_patterns':a['recommended_patterns'],'applicable_industries':a['applicable_industries'],'relevant_risks':a['relevant_risks'],'creation_notes':a['creation_notes'],'example_use_case':a['example_use_case'],'parameters':a['parameters']['map'](projectGuardParam)['sort']((c,d)=>GUARD_PARAM_IMPORTANCE_RANK[c['importance']]-GUARD_PARAM_IMPORTANCE_RANK[d['importance']]),'example_table':a['example_table'],'example_root':a['example_root']};}export function getGuardTemplates(a){if(!a)return{'version':GUARD_TEMPLATES_VERSION,'count':GUARD_TEMPLATES_COUNT,'templates':GUARD_TEMPLATES['map'](c=>({'id':c['id'],'scene_id':c['scene_id'],'name':c['name'],'description':c['description'],'verifier_constraint_level':c['verifier_constraint_level']??null,'parameter_count':c['parameters']['length']}))};const b=GUARD_TEMPLATES['find'](c=>c['id']===a||c['name']===a);return b?projectGuardTemplate(b):null;}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;}}const INLINE_CHAR_LIMIT=0x20*0x400,AUTO_OVERFLOW_DIR='.wowok/tmp';function unionVariantLabel(a){if(!a||typeof a!=='object')return'variant';const b=a['properties']&&typeof a['properties']==='object'?a['properties']:undefined;if(b)for(const [c,d]of Object['entries'](b)){if(d&&typeof d==='object'&&d['const']!==undefined)return c+'='+String(d['const']);}return typeof a['title']==='string'?a['title']:'variant';}export function buildSchemaSummary(a){const b=[];a&&typeof a['title']==='string'&&b['push']('Title:\x20'+a['title']);const c=a&&typeof a==='object'?a['properties']:undefined;if(c&&typeof c==='object'&&!Array['isArray'](c)){const d=Array['isArray'](a['required'])?a['required']:[],e=Object['keys'](c);b['push']('Top-level\x20fields\x20('+e['length']+',\x20*\x20=\x20required):');for(const f of e['slice'](0x0,0x28)){const g=c[f]??{},h=Array['isArray'](g['type'])?g['type']['join']('|'):g['type']??(g['$ref']?'ref':g['anyOf']||g['oneOf']?'union':'any'),i=d['includes'](f)?'*':'',j=typeof g['description']==='string'&&g['description']['length']>0x0?'\x20—\x20'+g['description']['split']('\x0a')[0x0]['slice'](0x0,0x50):'';b['push']('\x20\x20-\x20'+f+i+':\x20'+h+j);}e['length']>0x28&&b['push']('\x20\x20-\x20...and\x20'+(e['length']-0x28)+'\x20more\x20—\x20use\x20action=\x27get_field\x27\x20with\x20field_path\x20to\x20inspect');}else{if(a&&(Array['isArray'](a['oneOf'])||Array['isArray'](a['anyOf']))){const k=a['oneOf']??a['anyOf'];b['push']('Union\x20of\x20'+k['length']+'\x20variants:');for(const m of k['slice'](0x0,0x28)){const o=m&&typeof m['description']==='string'&&m['description']['length']>0x0?'\x20—\x20'+m['description']['split']('\x0a')[0x0]['slice'](0x0,0x50):'';b['push']('\x20\x20-\x20'+unionVariantLabel(m)+o);}k['length']>0x28&&b['push']('\x20\x20-\x20...and\x20'+(k['length']-0x28)+'\x20more');const l=k['filter'](q=>q&&typeof q==='object'&&q['properties']&&typeof q['properties']==='object');if(l['length']===k['length']&&l['length']>0x0){const q=Object['keys'](l[0x0]['properties'])['filter'](r=>l['every'](s=>Object['prototype']['hasOwnProperty']['call'](s['properties'],r)));b['push'](q['length']>0x0?'Common\x20fields\x20(declared\x20by\x20ALL\x20'+l['length']+'\x20variants):\x20'+q['join'](',\x20')+'.':'No\x20field\x20is\x20declared\x20by\x20all\x20'+l['length']+'\x20variants\x20—\x20each\x20variant\x20takes\x20its\x20own\x20parameters.');}else b['push']('Field\x20names\x20differ\x20per\x20variant\x20—\x20read\x20the\x20variant\x27s\x20own\x20list\x20above.\x20'+'The\x20discriminator\x20(\x22operation\x22\x20and\x20friends)\x20is\x20the\x20only\x20shared\x20key.');for(const r of k['slice'](0x0,0x28)){const s=r&&typeof r==='object'&&r['properties']&&typeof r['properties']==='object'?Object['keys'](r['properties']):[];if(s['length']===0x0)continue;b['push']('\x20\x20\x20\x20'+unionVariantLabel(r)+'\x20fields:\x20'+s['join'](',\x20'));}b['push']('Drill\x20into\x20the\x20variant\x20you\x20need\x20with\x20action=\x27get_field\x27\x20(name\x20+\x20field_path)\x20—\x20the\x20lists\x20above\x20are\x20a\x20summary,\x20not\x20the\x20schema.');}else b['push']('No\x20top-level\x20properties\x20map\x20—\x20use\x20action=\x27get_field\x27\x20with\x20a\x20field_path\x20to\x20inspect\x20this\x20schema.');}return b['join']('\x0a');}export function autoOverflowToFile(a,b){try{const c=JSON['stringify'](a)['length'];if(c<=INLINE_CHAR_LIMIT)return null;const d=process['env']['WOWOK_SCHEMA_TMP_DIR'],e=d?resolve(d):resolve(process['cwd'](),AUTO_OVERFLOW_DIR);!existsSync(e)&&mkdirSync(e,{'recursive':!![]});const f=b['replace'](/[^a-zA-Z0-9_-]/g,'_'),g=f+'.schema.json',h=join(e,g);return writeFileSync(h,JSON['stringify'](a,null,0x2),'utf-8'),{'absolute_path':h,'relative_path':d?h:join(AUTO_OVERFLOW_DIR,g),'bytes':c,'summary':buildSchemaSummary(a)};}catch{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':'Guard\x20template\x20\x27'+g+'\x27\x20not\x20found\x20in\x20the\x20unified\x20library\x20(v'+GUARD_TEMPLATES_VERSION+').\x20Omit\x20\x27template\x27\x20to\x20list\x20every\x20id.','suggestions':['Omit\x20\x27template\x27\x20to\x20list\x20all\x20guard\x20template\x20ids.','Ids\x20are\x20scene-namespaced\x20—\x20e.g.\x20tpl_buy_guard_*\x20(purchase\x20gates),\x20tpl_machine_*\x20(forward\x20gates),\x20tpl_reward_*\x20(claim\x20gates).\x20Pass\x20a\x20listed\x20id\x20for\x20the\x20full\x20parameterized\x20disclosure\x20(meaning,\x20default,\x20constraint,\x20importance).']};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=a516a(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==='get_tool_reference'){if(c){const z=getToolReference(c);if(!z)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'](B=>B['name'])['join'](',\x20')]};const A=getToolSequence(c);return{'success':!![],'action':b,'data':{'tool':z,'call_sequence':A??null},'message':'Retrieved\x20tool\x20reference:\x20'+c};}if(d){const B=searchToolReference(d);return{'success':!![],'action':b,'data':{'tools':B,'count':B['length']},'message':'Found\x20'+B['length']+'\x20tool(s)\x20matching\x20\x27'+d+'\x27','suggestions':B['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 y=TOOLS_REFERENCE['map'](C=>({'name':C['name'],'summary':C['summary'],'actions':C['actions']??[],'notes':C['notes']??[]}));return{'success':!![],'action':b,'data':{'tools':y,'count':y['length']},'message':'Retrieved\x20reference\x20for\x20'+y['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 D=getGuardDesignPattern(c);if(!D)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'](E=>E['id'])['join'](',\x20')]};return{'success':!![],'action':b,'data':{'pattern':D},'message':'Retrieved\x20Guard\x20design\x20pattern:\x20'+c};}if(d){const E=GUARD_DESIGN_PATTERNS['filter'](G=>G['host']===d),F=E['length']>0x0?E:GUARD_DESIGN_PATTERNS['filter'](G=>G['business_requirement']['toLowerCase']()['includes'](d['toLowerCase']())||G['logic_summary']['toLowerCase']()['includes'](d['toLowerCase']()));return{'success':!![],'action':b,'data':{'patterns':F,'count':F['length'],'filtered_by':E['length']>0x0?'host':'keyword','schema_notes':GUARD_SCHEMA_NOTES},'message':'Found\x20'+F['length']+'\x20Guard\x20design\x20pattern(s)\x20matching\x20\x27'+d+'\x27','suggestions':F['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 C=GUARD_DESIGN_PATTERNS['map'](G=>({'id':G['id'],'business_requirement':G['business_requirement'],'host':G['host'],'data_source':G['data_source'],'verifier_level':G['verifier_level'],'logic_summary':G['logic_summary'],'key_queries':G['key_queries'],'notes':G['notes']??[]}));return{'success':!![],'action':b,'data':{'patterns':C,'count':C['length'],'version':GUARD_DESIGN_PATTERNS_VERSION,'schema_notes':GUARD_SCHEMA_NOTES},'message':'Retrieved\x20'+C['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,'protocol_slot_rules':PROTOCOL_SLOT_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/\x20protocol\x20slots\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;\x20'+'Guards\x20bound\x20on\x20machine\x20forwards\x20MUST\x20declare\x20protocol\x20slot\x20254\x20(task\x20binding),\x20and\x20every\x20allocator\x20{GuardIdentifier:N}\x20leg\x20MUST\x20name\x20a\x20declared\x20b_submission\x20Address\x20slot.'};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 G=listSchemas();return{'success':!![],'action':b,'data':G,'message':'Found\x20'+G['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 H=getSchema(c);if(!H){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(H,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]};}const I=autoOverflowToFile(H,c);if(I)return{'success':!![],'action':b,'data':null,'message':'Schema\x20\x27'+c+'\x27\x20is\x20large\x20('+Math['round'](I['bytes']/0x400)+'\x20KB)\x20—\x20'+'written\x20to\x20file\x20instead\x20of\x20inlining\x20to\x20protect\x20your\x20context.','output_file_path':I['absolute_path'],'inline_summary':I['summary'],'suggestions':['Read\x20the\x20full\x20file\x20with\x20the\x20Read\x20tool:\x20'+I['absolute_path'],'If\x20the\x20sandbox\x20blocks\x20that\x20path,\x20resolve\x20the\x20relative\x20path\x20\x27'+I['relative_path']+'\x27\x20against\x20the\x20workspace\x20root\x20and\x20read\x20that.','Without\x20file\x20access,\x20query\x20specific\x20fields\x20via\x20action=\x27get_field\x27\x20with\x20name=\x27'+c+'\x27\x20and\x20a\x20field_path\x20from\x20the\x20summary\x20below.']};return{'success':!![],'action':b,'data':H,'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_guard_queries':{const O=d?.['trim']()['toLowerCase'](),P=R=>({'id':R['id'],'name':R['name'],'objectType':ObjectType[R['objectType']]??String(R['objectType']),'returnType':ValueType[R['return']]??String(R['return'])});if(O){const R=GUARDQUERY['filter'](S=>S['name']['toLowerCase']()['includes'](O)||S['description']?.['toLowerCase']()['includes'](O)||String(S['id'])===O)['map'](S=>({...P(S),'description':S['description']}));return{'success':!![],'action':b,'data':R,'message':'Found\x20'+R['length']+'\x20GUARDQUERY\x20entries\x20matching\x20\x27'+d+'\x27\x20'+('(of\x20'+GUARDQUERY['length']+'\x20total).\x20Use\x20names,\x20not\x20numeric\x20ids,\x20in\x20Guard\x20trees\x20—\x20')+'names\x20fail\x20loudly\x20at\x20validation\x20when\x20wrong;\x20a\x20wrong-but-existing\x20id\x20silently\x20checks\x20a\x20different\x20field.'};}if(h){const S=GUARDQUERY['map'](U=>({...P(U),'description':U['description']})),T=writeResponseToFile(S,h);if(T)return{'success':!![],'action':b,'data':null,'message':'Full\x20GUARDQUERY\x20catalog\x20('+S['length']+'\x20entries)\x20written\x20to\x20file:\x20'+T,'output_file_path':T,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+T]};}const Q=GUARDQUERY['map'](P);return{'success':!![],'action':b,'data':Q,'message':'GUARDQUERY\x20catalog:\x20'+Q['length']+'\x20entries\x20(compact\x20form\x20—\x20id,\x20name,\x20objectType,\x20returnType).\x20'+'Add\x20query=\x27<keyword>\x27\x20for\x20full\x20entries\x20with\x20descriptions,\x20or\x20output_file\x20to\x20dump\x20all\x20details\x20to\x20a\x20file.\x20'+'Prefer\x20NAME\x20references\x20in\x20Guard\x20trees;\x20a\x20numeric\x20id\x20is\x20resolved\x20verbatim\x20and\x20a\x20wrong-but-existing\x20id\x20'+'silently\x20checks\x20a\x20different\x20field.'};}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']};const U=getOutputSchema(c);if(!U){const W=listSchemas(),X=W['find'](Z=>Z['name']===c);if(X)return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20exists\x20but\x20declares\x20no\x20output\x20schema.','suggestions':['Use\x20\x27get\x27\x20action\x20with\x20name=\x27'+c+'\x27\x20to\x20retrieve\x20its\x20input\x20schema']};const Y=searchSchemas(c)['slice'](0x0,0x5);return{'success':![],'action':b,'data':null,'message':'Tool\x20\x27'+c+'\x27\x20not\x20found','suggestions':Y['length']>0x0?Y['map'](Z=>'Did\x20you\x20mean:\x20'+Z['name']+'?'):['Use\x20\x27list\x27\x20action\x20to\x20see\x20available\x20tools']};}if(h){const Z=writeResponseToFile(U,h);if(Z)return{'success':!![],'action':b,'data':null,'message':'Output\x20schema\x20\x27'+c+'\x27\x20written\x20to\x20file:\x20'+Z,'output_file_path':Z,'suggestions':['Use\x20Read\x20tool\x20to\x20open\x20'+Z]};}const V=autoOverflowToFile(U,c);if(V)return{'success':!![],'action':b,'data':null,'message':'Output\x20schema\x20\x27'+c+'\x27\x20is\x20large\x20('+Math['round'](V['bytes']/0x400)+'\x20KB)\x20—\x20'+'written\x20to\x20file\x20instead\x20of\x20inlining\x20to\x20protect\x20your\x20context.','output_file_path':V['absolute_path'],'inline_summary':V['summary'],'suggestions':['Read\x20the\x20full\x20file\x20with\x20the\x20Read\x20tool:\x20'+V['absolute_path'],'If\x20the\x20sandbox\x20blocks\x20that\x20path,\x20resolve\x20the\x20relative\x20path\x20\x27'+V['relative_path']+'\x27\x20against\x20the\x20workspace\x20root\x20and\x20read\x20that.','Without\x20file\x20access,\x20query\x20specific\x20fields\x20via\x20action=\x27get_field\x27\x20with\x20name=\x27'+c+'\x27\x20and\x20a\x20field_path\x20from\x20the\x20summary\x20below.']};return{'success':!![],'action':b,'data':U,'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,\x20\x27get_tool_reference\x27,\x20\x27get_guard_design_patterns\x27,\x20\x27get_safety_rules\x27,\x20\x27get_templates\x27,\x20or\x20\x27analyze_guard_semantics\x27']};}}const GUARD_SEMANTICS_READING_CHECKLIST=['WHO\x20can\x20satisfy\x20this\x20Guard\x20(identity:\x20Signer\x20bindings,\x20Entity\x20membership,\x20allowlists)?','WHEN\x20can\x20it\x20be\x20satisfied\x20(time:\x20Clock\x20comparisons,\x20deadlines,\x20windows)?','WHAT\x20evidence\x20must\x20the\x20caller\x20submit\x20(b_submission\x20table\x20entries\x20—\x20Payment/Order/Proof\x20objects)?','WHICH\x20on-chain\x20data\x20does\x20it\x20read,\x20and\x20can\x20that\x20data\x20change\x20(Repository\x20entries\x20are\x20MUTABLE\x20—\x20who\x20controls\x20the\x20writes)?','WHAT\x20does\x20the\x20counterparty\x20gain/lose\x20in\x20each\x20branch\x20of\x20the\x20logic\x20tree?','ARE\x20there\x20error-level\x20diagnostics\x20or\x20critical\x20risks\x20(they\x20block\x20or\x20endanger\x20execution)?'];export async function analyzeGuardSemantics(a){const b=await lintGuard(a,{'auto_fix':![]}),c={'root':a['root'],'table':(a['table']??[])['map'](l=>({'identifier':l['identifier'],'name':l['name'],'value_type':l['value_type']??'Address','b_submission':l['b_submission']??![],'value':l['value']})),'guardName':a['description']??null,'rely':a['rely']??null},d=renderGuardTreeIndented(c),e=renderGuardMermaid(a['root']),f=new Set(),g=[],h=new Set();let i=![],j=![];walkGuardTree(a['root'],l=>{if(l['type']==='context'){if(l['context']==='Clock')i=!![];if(l['context']==='Signer')j=!![];}l['type']==='identifier'&&typeof l['identifier']==='number'&&h['add'](l['identifier']);if(l['type']==='query'){const m=l['object'];m&&typeof m==='object'&&typeof m['identifier']==='number'&&h['add'](m['identifier']);const n=l['parameters'];if(Array['isArray'](n))for(const o of n){o&&typeof o==='object'&&typeof o['identifier']==='number'&&h['add'](o['identifier']);}}if(l['type']==='query'&&l['query']!==undefined&&l['query']!==null){if(typeof l['query']==='number'){const q=getGuardQueryByIdOrName(l['query']);if(q)f['add'](q['id']);else g['push'](l['query']);}else{const r=getGuardQueryByIdOrName(l['query']);if(r)f['add'](r['id']);else g['push'](l['query']);}}});const k={'submission_requirements':(a['table']??[])['filter'](l=>l['b_submission']===!![])['map'](l=>({'identifier':l['identifier'],'value_type':l['value_type'],'object_type':l['object_type'],'name':l['name']})),'data_sources':(a['table']??[])['filter'](l=>l['b_submission']!==!![])['map'](l=>({'identifier':l['identifier'],'kind':l['is_system_address']?'system_address':l['object_type']?'object':'fixed_value','value_type':l['value_type'],'object_type':l['object_type'],'name':l['name'],'is_mutable_onchain':l['object_type']==='Repository'})),'query_dependencies':[...f]['sort']((l,m)=>l-m),'unresolved_queries':g,'unresolved_identifiers':[...h]['filter'](l=>!(a['table']??[])['some'](m=>m['identifier']===l))['sort']((l,m)=>l-m),'has_time_conditions':i,'has_signer_constraints':j,'has_rely_composition':Array['isArray'](a['rely']?.['guards'])&&a['rely']['guards']['length']>0x0,'reading_checklist':GUARD_SEMANTICS_READING_CHECKLIST};return{'render':{'tree_indented':d,'mermaid':e},'lint':b,'party_evaluation':k};}export{formatLintResult};
@@ -1,257 +1 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://wowok.net/schemas/account_operation.json",
4
- "title": "Account Operations",
5
- "description": "Account operations (mutations only: gen/faucet/suspend/resume/rename/swap_name/transfer/get/signData/messenger). Parameters MUST be wrapped in the operation type property (e.g. {transfer: {...}}, NOT {amount: ...}). Unwrapped parameters are rejected. DEFAULT ACCOUNT: every name/address field (name_or_address, name_or_address_from, name_or_address_to, name1, name2, name_or_account) accepts the EMPTY STRING '' to mean the default account — the literal 'DEFAULT' is NOT a valid name and is rejected. TO LIST ALL ACCOUNTS: use the query_toolkit tool with query_type='account_list' (returns name, address, suspended status, messenger status for all local accounts). This separation follows CQRS: account_operation = mutations, query_toolkit = queries. Common workflow after MCP restart: (1) query_toolkit query_type='account_list' to see all accounts, (2) account_operation with the appropriate mutation.",
6
- "type": "object",
7
- "properties": {
8
- "gen": {
9
- "description": "Generate new account",
10
- "type": "object",
11
- "properties": {
12
- "name": {
13
- "description": "Account name (max 64 characters). Use empty string '' or omit for the default account. Recommended convention: <role>-<number> (e.g. shop-001, user-001, arb-001) for easy filtering and batch operations.",
14
- "type": "string"
15
- },
16
- "replaceExistName": {
17
- "description": "DISCOURAGED. If true, an existing account with the same name will be SUSPENDED (not just renamed) to free the name for the new account. The old account moves to the Suspended tab and cannot sign transactions until resumed with a new name. FORBIDDEN on the default account (name='' or omitted) — the default account is unique and cannot be replaced; use suspend() explicitly instead. Prefer versioned names (e.g. 'shop_v2') over replaceExistName for production. Default: false (throws AccountNameExist on collision).",
18
- "type": "boolean"
19
- },
20
- "messenger": {
21
- "description": "Enable messenger for this account. true=enable, false=disable, omit=unchanged. Account name is used for messenger identity lookup (no separate messenger name).",
22
- "type": "boolean"
23
- }
24
- },
25
- "additionalProperties": false
26
- },
27
- "faucet": {
28
- "description": "Distribute test coins from faucet to the specified account",
29
- "type": "object",
30
- "properties": {
31
- "name_or_address": {
32
- "description": "Account name or address. Use empty string '' for the default account. Defaults to '' if omitted.",
33
- "type": "string"
34
- },
35
- "network": {
36
- "type": "string",
37
- "enum": [
38
- "localnet",
39
- "testnet"
40
- ],
41
- "description": "Network entrypoint for Faucet: Specifies which network the operation occurs on"
42
- }
43
- },
44
- "required": [
45
- "network"
46
- ],
47
- "additionalProperties": false
48
- },
49
- "suspend": {
50
- "description": "Remove account from active account list (cannot sign transactions), and delete its name. NOT allowed on the default account (client-only: ask the user to do it in the client's Wallet tab).",
51
- "type": "object",
52
- "properties": {
53
- "name_or_address": {
54
- "description": "Account name or address. Use empty string '' for the default account. Defaults to '' if omitted.",
55
- "type": "string"
56
- }
57
- },
58
- "additionalProperties": false
59
- },
60
- "resume": {
61
- "description": "Add account back to active account list",
62
- "type": "object",
63
- "properties": {
64
- "address": {
65
- "type": "string",
66
- "description": "Valid ID: 0x prefix + 64 hex characters, or builtin ID (0x5-0x9, 0xa, 0xc, 0xd, 0x403, 0xaaa, 0xaab, 0xacc)"
67
- },
68
- "name": {
69
- "description": "New name for the resumed account. Omit to leave unnamed.",
70
- "type": "string"
71
- }
72
- },
73
- "required": [
74
- "address"
75
- ],
76
- "additionalProperties": false
77
- },
78
- "rename": {
79
- "description": "Rename account. name_or_address can be name or address, new_name must be a name. NOT allowed on the default account (client-only: ask the user to do it in the client's Wallet tab).",
80
- "type": "object",
81
- "properties": {
82
- "name_or_address": {
83
- "description": "Source account name or address. Use empty string '' for the default account. Defaults to '' if omitted. Can be a name or address.",
84
- "type": "string"
85
- },
86
- "new_name": {
87
- "type": "string",
88
- "description": "New account name (max 64 characters). Must be a name (not an address)."
89
- }
90
- },
91
- "required": [
92
- "new_name"
93
- ],
94
- "additionalProperties": false
95
- },
96
- "swap_name": {
97
- "description": "Swap the names of two accounts. NOT allowed when either end is the default account (empty/omitted name) — client-only: ask the user to manage it in the client's Wallet tab. Swap two named (non-default) accounts instead.",
98
- "type": "object",
99
- "properties": {
100
- "name1": {
101
- "description": "First account name. Use empty string '' for the default account.",
102
- "type": "string"
103
- },
104
- "name2": {
105
- "description": "Second account name. Use empty string '' for the default account.",
106
- "type": "string"
107
- }
108
- },
109
- "additionalProperties": false
110
- },
111
- "transfer": {
112
- "description": "💰 FUND MOVEMENT (on-chain, irreversible): transfer tokens from one account to another. Amount parsing: display strings like \"2.5WOW\" are converted to raw smallest units with the token's decimals; bare decimal numbers are rejected. ⚠️ The numeric part of a suffixed string counts WHOLE tokens, never raw units: \"320000000WOW\" = 320 million WOW (raw 320000000000000000 at decimals 9) — to send 0.32 WOW write \"0.32WOW\"; to pass raw smallest units use the bare integer string \"320000000\" (no symbol). Use the EMPTY STRING '' in name_or_address_from/to for the default account — the literal 'DEFAULT' is rejected. Requires confirmation — first call previews, re-call with confirmed=true.",
113
- "type": "object",
114
- "properties": {
115
- "name_or_address_from": {
116
- "description": "Sender account name or address. Use empty string '' for the default account.",
117
- "type": "string"
118
- },
119
- "name_or_address_to": {
120
- "description": "Recipient account name or address. Use empty string '' for the default account.",
121
- "type": "string"
122
- },
123
- "amount": {
124
- "anyOf": [
125
- {
126
- "type": "number"
127
- },
128
- {
129
- "type": "string"
130
- }
131
- ],
132
- "description": "Amount of tokens to transfer. Accepts: raw smallest-unit integer (string/number, e.g. \"2500000000\"), or display format with the token symbol (e.g. \"2.5WOW\") — converted with the token's own decimals. Bare decimals like \"2.5\" or 2.5 are REJECTED (must carry the symbol suffix)."
133
- },
134
- "token_type": {
135
- "description": "Token type; default token type is 0x2::wow::WOW",
136
- "type": "string"
137
- },
138
- "network": {
139
- "type": "string",
140
- "enum": [
141
- "localnet",
142
- "testnet",
143
- "mainnet"
144
- ],
145
- "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."
146
- },
147
- "confirmed": {
148
- "description": "ConfirmGate: set to true to proceed after a 'pending_confirmation' result. Token transfers are irreversible on-chain fund movements — the first call returns a pending_confirmation preview (amount, token, recipient); re-call with confirmed=true after user consent.",
149
- "type": "boolean"
150
- }
151
- },
152
- "required": [
153
- "amount"
154
- ],
155
- "additionalProperties": false
156
- },
157
- "get": {
158
- "description": "💰 FUND MOVEMENT (on-chain, irreversible, spends gas): split/merge the account's coins to produce a coin object carrying AT LEAST the required balance, then self-deliver it to the same account. NOT a balance query — the returned `balance` is the produced coin's amount, never the account's total; to CHECK an account's balance use the balance query surface (query_toolkit) instead. balance_required must be > 0 — a zero request is rejected. The account's total balance does not leave the account (minus gas), but a real on-chain transaction IS executed and its digest is returned. IMPORTANT: balance_required is an AMOUNT string (e.g. \"1WOW\" or raw smallest-unit integer like \"1000000000\"). Amount parsing: display strings like \"2.5WOW\" are converted to raw smallest units with the token's decimals; bare decimal numbers are rejected. Requires confirmation — first call previews, re-call with confirmed=true. RESULT CONTRACT: on success the result carries `coin_address`, `digest` AND `balance` — the coin's ACTUAL final on-chain amount, read back from the chain. Always compare `balance` against the amount you need; a returned digest does NOT by itself mean the coin is large enough. If the requested amount cannot be covered the call FAILS with the required amount, the account's total, and the largest single coin, and NO transaction is sent (no gas spent) — in that case fund the account first, or request at most the largest single coin. Do not retry the same balance_required after such a failure; re-reading the balance will not change the answer.",
159
- "type": "object",
160
- "properties": {
161
- "name_or_address": {
162
- "description": "Account name or address. Use empty string '' for the default account.",
163
- "type": "string"
164
- },
165
- "balance_required": {
166
- "anyOf": [
167
- {
168
- "type": "string"
169
- },
170
- {
171
- "type": "number"
172
- }
173
- ],
174
- "description": "Required coin object balance. Accepts: raw smallest-unit integer (string/number, e.g. \"2500000000\"), or display format with the token symbol (e.g. \"2.5WOW\") — converted with the token's own decimals. Bare decimals like \"2.5\" or 2.5 are REJECTED (must carry the symbol suffix)."
175
- },
176
- "token_type": {
177
- "description": "Token type; default token type is 0x2::wow::WOW",
178
- "type": "string"
179
- },
180
- "network": {
181
- "type": "string",
182
- "enum": [
183
- "localnet",
184
- "testnet",
185
- "mainnet"
186
- ],
187
- "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."
188
- },
189
- "confirmed": {
190
- "description": "ConfirmGate: set to true to proceed after a 'pending_confirmation' result. Producing the coin object is an on-chain transaction (split/merge coins + self-transfer) that is irreversible and spends gas — the first call returns a pending_confirmation preview (amount, token, account); re-call with confirmed=true after user consent.",
191
- "type": "boolean"
192
- }
193
- },
194
- "required": [
195
- "balance_required"
196
- ],
197
- "additionalProperties": false
198
- },
199
- "signData": {
200
- "description": "Sign data with account's private key",
201
- "type": "object",
202
- "properties": {
203
- "name_or_address": {
204
- "description": "Account name or address. Use empty string '' for the default account.",
205
- "type": "string"
206
- },
207
- "data": {
208
- "type": "string",
209
- "description": "Data to sign. If data_encoding is not specified, treated as UTF-8 string."
210
- },
211
- "data_encoding": {
212
- "description": "Encoding format of the data field. If not specified, defaults to utf8.",
213
- "anyOf": [
214
- {
215
- "type": "string",
216
- "const": "utf8",
217
- "description": "Data is UTF-8 encoded string"
218
- },
219
- {
220
- "type": "string",
221
- "const": "base64",
222
- "description": "Data is base64 encoded bytes"
223
- },
224
- {
225
- "type": "string",
226
- "const": "hex",
227
- "description": "Data is hex encoded bytes (with or without 0x prefix)"
228
- }
229
- ]
230
- }
231
- },
232
- "required": [
233
- "data"
234
- ],
235
- "additionalProperties": false
236
- },
237
- "messenger": {
238
- "description": "Enable or disable messenger for an account",
239
- "type": "object",
240
- "properties": {
241
- "name_or_account": {
242
- "description": "Account name or address. Use empty string '' for the default account. Defaults to '' if omitted.",
243
- "type": "string"
244
- },
245
- "enabled": {
246
- "type": "boolean",
247
- "description": "true to enable messenger, false to disable"
248
- }
249
- },
250
- "required": [
251
- "enabled"
252
- ],
253
- "additionalProperties": false
254
- }
255
- },
256
- "additionalProperties": false
257
- }
1
+ {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://wowok.net/schemas/account_operation.json","title":"Account Operations","description":"Account operations (mutations only: gen/faucet/suspend/resume/rename/swap_name/transfer/get/signData/messenger). Parameters MUST be wrapped in the operation type property (e.g. {transfer: {...}}, NOT {amount: ...}). Unwrapped parameters are rejected. DEFAULT ACCOUNT: every name/address field (name_or_address, name_or_address_from, name_or_address_to, name1, name2, name_or_account) accepts the EMPTY STRING '' to mean the default account — the literal 'DEFAULT' is NOT a valid name and is rejected. TO LIST ALL ACCOUNTS: use the query_toolkit tool with query_type='account_list' (returns name, address, suspended status, messenger status for all local accounts). This separation follows CQRS: account_operation = mutations, query_toolkit = queries. Common workflow after MCP restart: (1) query_toolkit query_type='account_list' to see all accounts, (2) account_operation with the appropriate mutation.","type":"object","properties":{"gen":{"description":"Generate new account","type":"object","properties":{"name":{"description":"Account name (max 64 characters). Use empty string '' or omit for the default account. Recommended convention: <role>-<number> (e.g. shop-001, user-001, arb-001) for easy filtering and batch operations.","type":"string"},"replaceExistName":{"description":"DISCOURAGED. If true, an existing account with the same name will be SUSPENDED (not just renamed) to free the name for the new account. The old account moves to the Suspended tab and cannot sign transactions until resumed with a new name. FORBIDDEN on the default account (name='' or omitted) — the default account is unique and cannot be replaced; use suspend() explicitly instead. Prefer versioned names (e.g. 'shop_v2') over replaceExistName for production. Default: false (throws AccountNameExist on collision).","type":"boolean"},"messenger":{"description":"Enable messenger for this account. true=enable, false=disable, omit=unchanged. Account name is used for messenger identity lookup (no separate messenger name).","type":"boolean"}},"additionalProperties":false},"faucet":{"description":"Distribute test coins from faucet to the specified account","type":"object","properties":{"name_or_address":{"description":"Account name or address. Use empty string '' for the default account. Defaults to '' if omitted.","type":"string"},"network":{"type":"string","enum":["localnet","testnet"],"description":"Network entrypoint for Faucet: Specifies which network the operation occurs on"}},"required":["network"],"additionalProperties":false},"suspend":{"description":"Remove account from active account list (cannot sign transactions), and delete its name. NOT allowed on the default account (client-only: ask the user to do it in the client's Wallet tab).","type":"object","properties":{"name_or_address":{"description":"Account name or address. Use empty string '' for the default account. Defaults to '' if omitted.","type":"string"}},"additionalProperties":false},"resume":{"description":"Add account back to active account list","type":"object","properties":{"address":{"type":"string","description":"Valid ID: 0x prefix + 64 hex characters, or builtin ID (0x5-0x9, 0xa, 0xc, 0xd, 0x403, 0xaaa, 0xaab, 0xacc)"},"name":{"description":"New name for the resumed account. Omit to leave unnamed.","type":"string"}},"required":["address"],"additionalProperties":false},"rename":{"description":"Rename account. name_or_address can be name or address, new_name must be a name. NOT allowed on the default account (client-only: ask the user to do it in the client's Wallet tab).","type":"object","properties":{"name_or_address":{"description":"Source account name or address. Use empty string '' for the default account. Defaults to '' if omitted. Can be a name or address.","type":"string"},"new_name":{"type":"string","description":"New account name (max 64 characters). Must be a name (not an address)."}},"required":["new_name"],"additionalProperties":false},"swap_name":{"description":"Swap the names of two accounts. NOT allowed when either end is the default account (empty/omitted name) — client-only: ask the user to manage it in the client's Wallet tab. Swap two named (non-default) accounts instead.","type":"object","properties":{"name1":{"description":"First account name. Use empty string '' for the default account.","type":"string"},"name2":{"description":"Second account name. Use empty string '' for the default account.","type":"string"}},"additionalProperties":false},"transfer":{"description":"💰 FUND MOVEMENT (on-chain, irreversible): transfer tokens from one account to another. Amount parsing: display strings like \"2.5WOW\" are converted to raw smallest units with the token's decimals; bare decimal numbers are rejected. ⚠️ The numeric part of a suffixed string counts WHOLE tokens, never raw units: \"320000000WOW\" = 320 million WOW (raw 320000000000000000 at decimals 9) — to send 0.32 WOW write \"0.32WOW\"; to pass raw smallest units use the bare integer string \"320000000\" (no symbol). Use the EMPTY STRING '' in name_or_address_from/to for the default account — the literal 'DEFAULT' is rejected. Requires confirmation — first call previews, re-call with confirmed=true.","type":"object","properties":{"name_or_address_from":{"description":"Sender account name or address. Use empty string '' for the default account.","type":"string"},"name_or_address_to":{"description":"Recipient account name or address. Use empty string '' for the default account.","type":"string"},"amount":{"anyOf":[{"type":"number"},{"type":"string"}],"description":"Amount of tokens to transfer. Accepts: raw smallest-unit integer (string/number, e.g. \"2500000000\"), or display format with the token symbol (e.g. \"2.5WOW\") — converted with the token's own decimals. Bare decimals like \"2.5\" or 2.5 are REJECTED (must carry the symbol suffix)."},"token_type":{"description":"Token type; default token type is 0x2::wow::WOW","type":"string"},"network":{"type":"string","enum":["localnet","testnet","mainnet"],"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."},"confirmed":{"description":"ConfirmGate: set to true to proceed after a 'pending_confirmation' result. Token transfers are irreversible on-chain fund movements — the first call returns a pending_confirmation preview (amount, token, recipient); re-call with confirmed=true after user consent.","type":"boolean"}},"required":["amount"],"additionalProperties":false},"get":{"description":"💰 FUND MOVEMENT (on-chain, irreversible, spends gas): split/merge the account's coins to produce a coin object carrying AT LEAST the required balance, then self-deliver it to the same account. NOT a balance query — the returned `balance` is the produced coin's amount, never the account's total; to CHECK an account's balance use the balance query surface (query_toolkit) instead. balance_required must be > 0 — a zero request is rejected. The account's total balance does not leave the account (minus gas), but a real on-chain transaction IS executed and its digest is returned. IMPORTANT: balance_required is an AMOUNT string (e.g. \"1WOW\" or raw smallest-unit integer like \"1000000000\"). Amount parsing: display strings like \"2.5WOW\" are converted to raw smallest units with the token's decimals; bare decimal numbers are rejected. Requires confirmation — first call previews, re-call with confirmed=true. RESULT CONTRACT: on success the result carries `coin_address`, `digest` AND `balance` — the coin's ACTUAL final on-chain amount, read back from the chain. Always compare `balance` against the amount you need; a returned digest does NOT by itself mean the coin is large enough. If the requested amount cannot be covered the call FAILS with the required amount, the account's total, and the largest single coin, and NO transaction is sent (no gas spent) — in that case fund the account first, or request at most the largest single coin. Do not retry the same balance_required after such a failure; re-reading the balance will not change the answer.","type":"object","properties":{"name_or_address":{"description":"Account name or address. Use empty string '' for the default account.","type":"string"},"balance_required":{"anyOf":[{"type":"string"},{"type":"number"}],"description":"Required coin object balance. Accepts: raw smallest-unit integer (string/number, e.g. \"2500000000\"), or display format with the token symbol (e.g. \"2.5WOW\") — converted with the token's own decimals. Bare decimals like \"2.5\" or 2.5 are REJECTED (must carry the symbol suffix)."},"token_type":{"description":"Token type; default token type is 0x2::wow::WOW","type":"string"},"network":{"type":"string","enum":["localnet","testnet","mainnet"],"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."},"confirmed":{"description":"ConfirmGate: set to true to proceed after a 'pending_confirmation' result. Producing the coin object is an on-chain transaction (split/merge coins + self-transfer) that is irreversible and spends gas — the first call returns a pending_confirmation preview (amount, token, account); re-call with confirmed=true after user consent.","type":"boolean"}},"required":["balance_required"],"additionalProperties":false},"signData":{"description":"Sign data with account's private key","type":"object","properties":{"name_or_address":{"description":"Account name or address. Use empty string '' for the default account.","type":"string"},"data":{"type":"string","description":"Data to sign. If data_encoding is not specified, treated as UTF-8 string."},"data_encoding":{"description":"Encoding format of the data field. If not specified, defaults to utf8.","anyOf":[{"type":"string","const":"utf8","description":"Data is UTF-8 encoded string"},{"type":"string","const":"base64","description":"Data is base64 encoded bytes"},{"type":"string","const":"hex","description":"Data is hex encoded bytes (with or without 0x prefix)"}]}},"required":["data"],"additionalProperties":false},"messenger":{"description":"Enable or disable messenger for an account","type":"object","properties":{"name_or_account":{"description":"Account name or address. Use empty string '' for the default account. Defaults to '' if omitted.","type":"string"},"enabled":{"type":"boolean","description":"true to enable messenger, false to disable"}},"required":["enabled"],"additionalProperties":false}},"additionalProperties":false}
@@ -1,78 +1 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://wowok.net/schemas/ask_user.json",
4
- "title": "Ask User - Structured Choice Elicitation",
5
- "description": "Ask the user to choose between concrete options before continuing.",
6
- "type": "object",
7
- "properties": {
8
- "question": {
9
- "type": "string",
10
- "minLength": 1,
11
- "maxLength": 1000,
12
- "description": "The single decision you need from the user. Phrase as a complete question; use the user's language. Do NOT stack multiple questions into one call."
13
- },
14
- "options": {
15
- "minItems": 2,
16
- "maxItems": 8,
17
- "type": "array",
18
- "items": {
19
- "type": "object",
20
- "properties": {
21
- "id": {
22
- "type": "string",
23
- "minLength": 1,
24
- "maxLength": 40,
25
- "pattern": "^[a-z0-9][a-z0-9_]{0,39}$",
26
- "description": "Stable machine id returned in the result when chosen (e.g. 'strict_binding')."
27
- },
28
- "label": {
29
- "type": "string",
30
- "minLength": 1,
31
- "maxLength": 120,
32
- "description": "Short user-visible label (a few words)."
33
- },
34
- "description": {
35
- "description": "Optional one-line explanation of what choosing this means.",
36
- "type": "string",
37
- "maxLength": 500
38
- }
39
- },
40
- "required": [
41
- "id",
42
- "label"
43
- ],
44
- "additionalProperties": false
45
- },
46
- "description": "Concrete mutually-exclusive choices (or combinable choices with multi_select=true). Each MUST be self-contained — the user decides from these labels alone."
47
- },
48
- "recommended_id": {
49
- "description": "id of the option you recommend (marked as suggested). Must match one of options[].id. Omit only when you genuinely have no recommendation.",
50
- "type": "string",
51
- "minLength": 1,
52
- "maxLength": 40,
53
- "pattern": "^[a-z0-9][a-z0-9_]{0,39}$"
54
- },
55
- "multi_select": {
56
- "default": false,
57
- "description": "true when several options may be combined (the result returns an id array).",
58
- "type": "boolean"
59
- },
60
- "allow_freeform": {
61
- "default": false,
62
- "description": "true to additionally allow a free-text answer not covered by the options.",
63
- "type": "boolean"
64
- },
65
- "context": {
66
- "description": "Optional short explanation of WHY this decision is needed and what each path changes — shown under the question, never instead of it.",
67
- "type": "string",
68
- "maxLength": 800
69
- }
70
- },
71
- "required": [
72
- "question",
73
- "options",
74
- "multi_select",
75
- "allow_freeform"
76
- ],
77
- "additionalProperties": false
78
- }
1
+ {"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://wowok.net/schemas/ask_user.json","title":"Ask User - Structured Choice Elicitation","description":"Ask the user to choose between concrete options before continuing.","type":"object","properties":{"question":{"type":"string","minLength":1,"maxLength":1000,"description":"The single decision you need from the user. Phrase as a complete question; use the user's language. Do NOT stack multiple questions into one call."},"options":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_]{0,39}$","description":"Stable machine id returned in the result when chosen (e.g. 'strict_binding')."},"label":{"type":"string","minLength":1,"maxLength":120,"description":"Short user-visible label (a few words)."},"description":{"description":"Optional one-line explanation of what choosing this means.","type":"string","maxLength":500}},"required":["id","label"],"additionalProperties":false},"description":"Concrete mutually-exclusive choices (or combinable choices with multi_select=true). Each MUST be self-contained — the user decides from these labels alone."},"recommended_id":{"description":"id of the option you recommend (marked as suggested). Must match one of options[].id. Omit only when you genuinely have no recommendation.","type":"string","minLength":1,"maxLength":40,"pattern":"^[a-z0-9][a-z0-9_]{0,39}$"},"multi_select":{"default":false,"description":"true when several options may be combined (the result returns an id array).","type":"boolean"},"allow_freeform":{"default":false,"description":"true to additionally allow a free-text answer not covered by the options.","type":"boolean"},"context":{"description":"Optional short explanation of WHY this decision is needed and what each path changes — shown under the question, never instead of it.","type":"string","maxLength":800}},"required":["question","options","multi_select","allow_freeform"],"additionalProperties":false}