@wowok/agent-mcp 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/README.md +8 -0
  2. package/dist/chain-semantics/composition-truth.d.ts +102 -0
  3. package/dist/chain-semantics/composition-truth.js +1 -0
  4. package/dist/chain-semantics/eval-order.js +1 -1
  5. package/dist/chain-semantics/fund-flow.js +1 -1
  6. package/dist/chain-semantics/index.d.ts +1 -0
  7. package/dist/chain-semantics/index.js +1 -1
  8. package/dist/composition/audit.js +1 -1
  9. package/dist/composition/blueprint-view.d.ts +3 -3
  10. package/dist/composition/blueprint-view.js +1 -1
  11. package/dist/composition/compile.d.ts +24 -3
  12. package/dist/composition/compile.js +1 -1
  13. package/dist/composition/emit-phases.d.ts +206 -0
  14. package/dist/composition/emit-phases.js +1 -0
  15. package/dist/composition/generate.d.ts +40 -0
  16. package/dist/composition/generate.js +1 -0
  17. package/dist/composition/guard-fill.d.ts +44 -0
  18. package/dist/composition/guard-fill.js +1 -0
  19. package/dist/composition/inflight.d.ts +20 -2
  20. package/dist/composition/inflight.js +1 -1
  21. package/dist/composition/input-normalize.d.ts +15 -0
  22. package/dist/composition/input-normalize.js +1 -0
  23. package/dist/composition/materialize.d.ts +18 -13
  24. package/dist/composition/materialize.js +1 -1
  25. package/dist/composition/mode-gates.d.ts +35 -0
  26. package/dist/composition/mode-gates.js +1 -0
  27. package/dist/composition/param-disclosure.js +1 -1
  28. package/dist/composition/plan-retry-ledger.d.ts +21 -0
  29. package/dist/composition/plan-retry-ledger.js +1 -0
  30. package/dist/composition/plan.d.ts +7 -2
  31. package/dist/composition/plan.js +1 -1
  32. package/dist/composition/product-card.d.ts +94 -0
  33. package/dist/composition/product-card.js +1 -0
  34. package/dist/composition/supply-chain-emit.d.ts +46 -0
  35. package/dist/composition/supply-chain-emit.js +1 -0
  36. package/dist/config/config-audit.spec.js +1 -1
  37. package/dist/config/config-warnings.d.ts +2 -0
  38. package/dist/config/config-warnings.js +1 -0
  39. package/dist/config/exposure.d.ts +2 -2
  40. package/dist/config/judgment.d.ts +31 -5
  41. package/dist/config/judgment.js +1 -1
  42. package/dist/config/judgment.spec.js +1 -1
  43. package/dist/config/match-policy-file.d.ts +34 -0
  44. package/dist/config/match-policy-file.js +1 -0
  45. package/dist/config/match-policy-file.spec.d.ts +1 -0
  46. package/dist/config/match-policy-file.spec.js +1 -0
  47. package/dist/config/rule-engine.d.ts +5 -5
  48. package/dist/config/rule-engine.js +1 -1
  49. package/dist/config/runtime.d.ts +0 -1
  50. package/dist/config/runtime.js +1 -1
  51. package/dist/config/severity.d.ts +0 -2
  52. package/dist/config/severity.js +1 -1
  53. package/dist/config/store-policy.spec.js +1 -1
  54. package/dist/config/template-params.d.ts +42 -0
  55. package/dist/config/template-params.js +1 -0
  56. package/dist/config/template-params.spec.d.ts +1 -0
  57. package/dist/config/template-params.spec.js +1 -0
  58. package/dist/data/api/api.spec.js +1 -1
  59. package/dist/data/api/server.js +1 -1
  60. package/dist/data/projection/store.d.ts +2 -1
  61. package/dist/data/projection/store.js +1 -1
  62. package/dist/data/projection/types.d.ts +22 -0
  63. package/dist/data/sync/cdc.d.ts +1 -2
  64. package/dist/data/sync/cdc.js +1 -1
  65. package/dist/evaluation/acceptance.d.ts +8 -0
  66. package/dist/evaluation/acceptance.js +1 -1
  67. package/dist/evaluation/builtins/demand-match.js +1 -1
  68. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  69. package/dist/evaluation/capability.d.ts +2 -0
  70. package/dist/evaluation/category-match-rules.d.ts +0 -1
  71. package/dist/evaluation/category-match-rules.js +1 -1
  72. package/dist/evaluation/composer.d.ts +25 -0
  73. package/dist/evaluation/composer.js +1 -1
  74. package/dist/evaluation/engine.js +1 -1
  75. package/dist/evaluation/extract.d.ts +7 -0
  76. package/dist/evaluation/extract.js +1 -1
  77. package/dist/evaluation/game-strategy.d.ts +0 -3
  78. package/dist/evaluation/game-strategy.js +1 -1
  79. package/dist/evaluation/match-operation.d.ts +9 -0
  80. package/dist/evaluation/match-operation.js +1 -1
  81. package/dist/evaluation/match-policy-resolver.d.ts +9 -0
  82. package/dist/evaluation/match-policy-resolver.js +1 -0
  83. package/dist/evaluation/match-policy.d.ts +3 -1
  84. package/dist/evaluation/match-policy.js +1 -1
  85. package/dist/evaluation/region.d.ts +0 -6
  86. package/dist/evaluation/region.js +1 -1
  87. package/dist/evaluation/standards.d.ts +2 -1
  88. package/dist/evaluation/standards.js +1 -1
  89. package/dist/evaluation/structured-lines.d.ts +8 -0
  90. package/dist/evaluation/structured-lines.js +1 -0
  91. package/dist/evaluation/types.d.ts +6 -0
  92. package/dist/experience/realtime-feedback.js +1 -1
  93. package/dist/extensions/capability-manifest.d.ts +1 -0
  94. package/dist/extensions/capability-manifest.js +1 -1
  95. package/dist/extensions/capability.d.ts +91 -0
  96. package/dist/extensions/capability.js +1 -0
  97. package/dist/extensions/industry-audit.spec.js +1 -1
  98. package/dist/extensions/industry-pack.d.ts +13 -0
  99. package/dist/extensions/industry-pack.js +1 -1
  100. package/dist/extensions/modes.js +1 -1
  101. package/dist/extensions/registry.d.ts +0 -2
  102. package/dist/extensions/registry.js +1 -1
  103. package/dist/goal/GoalEngine.js +1 -1
  104. package/dist/graph/onchain/analyze.js +1 -1
  105. package/dist/graph/onchain/expand.js +1 -1
  106. package/dist/graph/onchain/exposure.js +1 -1
  107. package/dist/graph/onchain/facts.js +1 -1
  108. package/dist/graph/onchain/order-status.d.ts +0 -1
  109. package/dist/graph/onchain/order-status.js +1 -1
  110. package/dist/harness/recover.js +1 -1
  111. package/dist/harness/verify.d.ts +0 -3
  112. package/dist/harness/verify.js +1 -1
  113. package/dist/intent/types.d.ts +0 -1
  114. package/dist/intent/types.js +1 -1
  115. package/dist/keeper/detectors.js +1 -1
  116. package/dist/keeper/types.d.ts +0 -1
  117. package/dist/keeper/types.js +1 -1
  118. package/dist/knowledge/allocation-risk.d.ts +1 -0
  119. package/dist/knowledge/allocation-risk.js +1 -1
  120. package/dist/knowledge/allocator-rail-verifier.d.ts +6 -1
  121. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  122. package/dist/knowledge/arbitration-ledger.js +1 -1
  123. package/dist/knowledge/arbitration-puzzle.js +1 -1
  124. package/dist/knowledge/audit-rules.d.ts +2 -2
  125. package/dist/knowledge/audit-rules.js +1 -1
  126. package/dist/knowledge/baselines/judgment-baselines.json +21 -2
  127. package/dist/knowledge/baselines/rules/oracle.json +120 -0
  128. package/dist/knowledge/baselines/rules/plan.json +384 -17
  129. package/dist/knowledge/baselines/rules/progress.json +20 -2
  130. package/dist/knowledge/builtin-templates.d.ts +12 -1
  131. package/dist/knowledge/builtin-templates.js +1 -1
  132. package/dist/knowledge/component-schema.js +1 -1
  133. package/dist/knowledge/contact-templates.d.ts +0 -1
  134. package/dist/knowledge/contact-templates.js +1 -1
  135. package/dist/knowledge/dynamic-pricing.js +1 -1
  136. package/dist/knowledge/fee-param-bindings.js +1 -1
  137. package/dist/knowledge/fund-layer.d.ts +1 -0
  138. package/dist/knowledge/fund-layer.js +1 -1
  139. package/dist/knowledge/game-scenarios.js +1 -1
  140. package/dist/knowledge/getting-started.js +1 -1
  141. package/dist/knowledge/guard-binding-table.d.ts +52 -0
  142. package/dist/knowledge/guard-binding-table.js +1 -0
  143. package/dist/knowledge/guard-binding-verifier.d.ts +30 -0
  144. package/dist/knowledge/guard-binding-verifier.js +1 -0
  145. package/dist/knowledge/guard-bindings.js +1 -1
  146. package/dist/knowledge/guard-blueprint.d.ts +68 -0
  147. package/dist/knowledge/guard-blueprint.js +1 -0
  148. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  149. package/dist/knowledge/guard-design-patterns.js +1 -1
  150. package/dist/knowledge/guard-field-cognition.js +1 -1
  151. package/dist/knowledge/guard-host-context.d.ts +24 -0
  152. package/dist/knowledge/guard-host-context.js +1 -0
  153. package/dist/knowledge/guard-lint.js +1 -1
  154. package/dist/knowledge/guard-node-gates.d.ts +3 -0
  155. package/dist/knowledge/guard-node-gates.js +1 -1
  156. package/dist/knowledge/guard-puzzle.js +1 -1
  157. package/dist/knowledge/guard-render.js +1 -1
  158. package/dist/knowledge/guard-risk.js +1 -1
  159. package/dist/knowledge/guard-submission-prompt.d.ts +11 -0
  160. package/dist/knowledge/guard-submission-prompt.js +1 -1
  161. package/dist/knowledge/guard-templates.d.ts +1 -1
  162. package/dist/knowledge/guard-templates.js +1 -1
  163. package/dist/knowledge/guard-translation.js +1 -1
  164. package/dist/knowledge/index.d.ts +1 -1
  165. package/dist/knowledge/index.js +1 -1
  166. package/dist/knowledge/industry-generalizer.d.ts +6 -1
  167. package/dist/knowledge/industry-generalizer.js +1 -1
  168. package/dist/knowledge/industry-registry.js +1 -1
  169. package/dist/knowledge/jsonrpc-enum.d.ts +38 -0
  170. package/dist/knowledge/jsonrpc-enum.js +1 -1
  171. package/dist/knowledge/machine-topology.js +1 -1
  172. package/dist/knowledge/machine-translation.js +1 -1
  173. package/dist/knowledge/object-dependency.d.ts +31 -0
  174. package/dist/knowledge/object-dependency.js +1 -0
  175. package/dist/knowledge/onchain-constants.d.ts +2 -0
  176. package/dist/knowledge/onchain-constants.js +1 -1
  177. package/dist/knowledge/param-schema.d.ts +23 -0
  178. package/dist/knowledge/param-schema.js +1 -1
  179. package/dist/knowledge/param-tiers.js +1 -1
  180. package/dist/knowledge/passport-ledger.js +1 -1
  181. package/dist/knowledge/path-oracle/coverage.d.ts +16 -0
  182. package/dist/knowledge/path-oracle/coverage.js +1 -0
  183. package/dist/knowledge/path-oracle/index.d.ts +5 -0
  184. package/dist/knowledge/path-oracle/index.js +1 -0
  185. package/dist/knowledge/path-oracle/products/food-delivery.d.ts +2 -0
  186. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -0
  187. package/dist/knowledge/path-oracle/schema.d.ts +188 -0
  188. package/dist/knowledge/path-oracle/schema.js +1 -0
  189. package/dist/knowledge/pattern-resolutions.d.ts +2 -0
  190. package/dist/knowledge/pattern-resolutions.js +1 -1
  191. package/dist/knowledge/progress-ledger.js +1 -1
  192. package/dist/knowledge/progress-risk.js +1 -1
  193. package/dist/knowledge/projection.spec.js +1 -1
  194. package/dist/knowledge/protocol-facts.js +1 -1
  195. package/dist/knowledge/requirement-families.d.ts +13 -0
  196. package/dist/knowledge/requirement-families.js +1 -0
  197. package/dist/knowledge/reward-ledger.js +1 -1
  198. package/dist/knowledge/scenario-modes.d.ts +1 -0
  199. package/dist/knowledge/scenario-modes.js +1 -1
  200. package/dist/knowledge/semantic-ir.d.ts +4 -0
  201. package/dist/knowledge/semantic-ir.js +1 -1
  202. package/dist/knowledge/service-ledger.d.ts +1 -1
  203. package/dist/knowledge/service-ledger.js +1 -1
  204. package/dist/knowledge/sku-name-gate.d.ts +17 -0
  205. package/dist/knowledge/sku-name-gate.js +1 -0
  206. package/dist/knowledge/supply-chain.d.ts +9 -0
  207. package/dist/knowledge/supply-chain.js +1 -1
  208. package/dist/knowledge/template-loader.d.ts +14 -6
  209. package/dist/knowledge/template-loader.js +1 -1
  210. package/dist/knowledge/template-nav.d.ts +3 -1
  211. package/dist/knowledge/template-nav.js +1 -1
  212. package/dist/knowledge/template-prose.d.ts +1 -1
  213. package/dist/knowledge/template-registry.js +1 -1
  214. package/dist/knowledge/template-scanner.d.ts +62 -0
  215. package/dist/knowledge/template-scanner.js +1 -1
  216. package/dist/knowledge/template-test-profiles.js +1 -1
  217. package/dist/knowledge/tools-reference.js +1 -1
  218. package/dist/knowledge/workflow-guidance.d.ts +5 -0
  219. package/dist/knowledge/workflow-guidance.js +1 -1
  220. package/dist/monitor/MonitorLoop.js +1 -1
  221. package/dist/participation/radar-core.js +1 -1
  222. package/dist/participation/time-window.js +1 -1
  223. package/dist/persona/address-format.d.ts +0 -1
  224. package/dist/persona/address-format.js +1 -1
  225. package/dist/persona/bridge.js +1 -1
  226. package/dist/persona/index.d.ts +0 -2
  227. package/dist/persona/index.js +1 -1
  228. package/dist/persona/model.js +1 -1
  229. package/dist/persona/persona-audit.spec.js +1 -1
  230. package/dist/persona/types.d.ts +6 -0
  231. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  232. package/dist/playbooks/service-build/game-theory.d.ts +2 -2
  233. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  234. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  235. package/dist/playbooks/service-build/merchant-guide.d.ts +50 -23
  236. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  237. package/dist/playbooks/service-build/migration-planner.d.ts +2 -0
  238. package/dist/playbooks/service-build/migration-planner.js +1 -1
  239. package/dist/playbooks/service-build/mode-actions.js +1 -1
  240. package/dist/playbooks/service-build/object-panorama.d.ts +8 -0
  241. package/dist/playbooks/service-build/object-panorama.js +1 -1
  242. package/dist/playbooks/service-build/participation-radar.js +1 -1
  243. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  244. package/dist/playbooks/service-build/reverse-mapping.d.ts +6 -0
  245. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  246. package/dist/playbooks/service-build/service-panorama.d.ts +1 -0
  247. package/dist/playbooks/service-build/service-panorama.js +1 -1
  248. package/dist/playbooks/service-build/service-quote.js +1 -1
  249. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  250. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +10 -1
  251. package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
  252. package/dist/review/index.js +1 -1
  253. package/dist/review/repository.js +1 -1
  254. package/dist/safety/confirm-gate.js +1 -1
  255. package/dist/schema/benchmark-migration/index.d.ts +104 -0
  256. package/dist/schema/benchmark-migration/index.js +1 -1
  257. package/dist/schema/call/allocation.d.ts +15 -6
  258. package/dist/schema/call/allocation.js +1 -1
  259. package/dist/schema/call/base.d.ts +256 -0
  260. package/dist/schema/call/base.js +1 -1
  261. package/dist/schema/call/bridge.d.ts +32 -6
  262. package/dist/schema/call/demand.d.ts +15 -6
  263. package/dist/schema/call/demand.js +1 -1
  264. package/dist/schema/call/guard.d.ts +8 -8
  265. package/dist/schema/call/guard.js +1 -1
  266. package/dist/schema/call/handler.d.ts +3 -0
  267. package/dist/schema/call/handler.js +1 -1
  268. package/dist/schema/call/machine.d.ts +32 -8
  269. package/dist/schema/call/machine.js +1 -1
  270. package/dist/schema/call/order.d.ts +26 -8
  271. package/dist/schema/call/order.js +1 -1
  272. package/dist/schema/call/payment.d.ts +20 -8
  273. package/dist/schema/call/payment.js +1 -1
  274. package/dist/schema/call/permission-handler.js +1 -1
  275. package/dist/schema/call/permission.d.ts +330 -114
  276. package/dist/schema/call/permission.js +1 -1
  277. package/dist/schema/call/personal.d.ts +10 -4
  278. package/dist/schema/call/personal.js +1 -1
  279. package/dist/schema/call/progress.d.ts +16 -4
  280. package/dist/schema/call/reward.d.ts +10 -4
  281. package/dist/schema/call/reward.js +1 -1
  282. package/dist/schema/call/semantic.d.ts +1 -0
  283. package/dist/schema/call/semantic.js +1 -1
  284. package/dist/schema/call/service.d.ts +128 -40
  285. package/dist/schema/call/service.js +1 -1
  286. package/dist/schema/call/treasury.d.ts +15 -6
  287. package/dist/schema/call/treasury.js +1 -1
  288. package/dist/schema/common/index.js +1 -1
  289. package/dist/schema/config/index.d.ts +61 -0
  290. package/dist/schema/config/index.js +1 -1
  291. package/dist/schema/envelope-unify.d.ts +4 -0
  292. package/dist/schema/envelope-unify.js +1 -0
  293. package/dist/schema/evaluation/index.d.ts +216 -19
  294. package/dist/schema/evaluation/index.js +1 -1
  295. package/dist/schema/goal/index.d.ts +47 -0
  296. package/dist/schema/goal/planning.d.ts +115 -1
  297. package/dist/schema/goal/planning.js +1 -1
  298. package/dist/schema/industry-pack/index.d.ts +137 -6
  299. package/dist/schema/industry-pack/index.js +1 -1
  300. package/dist/schema/industry-pack/modes.d.ts +6 -6
  301. package/dist/schema/keeper/index.d.ts +26 -0
  302. package/dist/schema/local/index.d.ts +137 -0
  303. package/dist/schema/local/index.js +1 -1
  304. package/dist/schema/local/wip.d.ts +6 -0
  305. package/dist/schema/local/wip.js +1 -1
  306. package/dist/schema/messenger/index.d.ts +26 -0
  307. package/dist/schema/operations.d.ts +342 -83
  308. package/dist/schema/operations.js +1 -1
  309. package/dist/schema/persona/index.d.ts +2907 -640
  310. package/dist/schema/persona/index.js +1 -1
  311. package/dist/schema/query/bi.d.ts +145 -4
  312. package/dist/schema/query/bi.js +1 -1
  313. package/dist/schema/query/index.d.ts +266 -73
  314. package/dist/schema/query/index.js +1 -1
  315. package/dist/schema/schema-query/index.d.ts +1 -1
  316. package/dist/schema/schema-query/index.js +1 -1
  317. package/dist/schema/schema-version.js +1 -1
  318. package/dist/schema/utils/permission-machine-check.d.ts +2 -0
  319. package/dist/schema/utils/permission-machine-check.js +1 -1
  320. package/dist/schema/watch/index.d.ts +16 -0
  321. package/dist/schema/watch/index.js +1 -1
  322. package/dist/schema/workflow/index.d.ts +2 -2
  323. package/dist/schema/workflow/index.js +1 -1
  324. package/dist/schema-query-impl/index.d.ts +1 -1
  325. package/dist/schema-query-impl/index.js +1 -1
  326. package/dist/schemas/account_operation.output.json +94 -0
  327. package/dist/schemas/benchmark_migration_operation.output.json +338 -9
  328. package/dist/schemas/benchmark_migration_operation.schema.json +26 -1
  329. package/dist/schemas/bridge_operation.output.json +94 -0
  330. package/dist/schemas/config_operation.output.json +352 -0
  331. package/dist/schemas/config_operation.schema.json +20 -2
  332. package/dist/schemas/evaluation_operation.output.json +570 -4
  333. package/dist/schemas/evaluation_operation.schema.json +194 -3
  334. package/dist/schemas/goal_operation.schema.json +183 -0
  335. package/dist/schemas/index.json +1 -1
  336. package/dist/schemas/industry_pack_operation.output.json +621 -0
  337. package/dist/schemas/industry_pack_operation.schema.json +20 -2
  338. package/dist/schemas/keeper_operation.output.json +94 -0
  339. package/dist/schemas/local_cache_operation.output.json +94 -0
  340. package/dist/schemas/local_history_operation.output.json +94 -0
  341. package/dist/schemas/local_info_operation.output.json +94 -0
  342. package/dist/schemas/local_mark_operation.output.json +94 -0
  343. package/dist/schemas/messenger_operation.output.json +94 -0
  344. package/dist/schemas/monitor_events.output.json +94 -0
  345. package/dist/schemas/monitor_subscription.output.json +94 -0
  346. package/dist/schemas/onchain_events.output.json +94 -0
  347. package/dist/schemas/onchain_operations.output.json +313 -1
  348. package/dist/schemas/onchain_operations.schema.json +1248 -664
  349. package/dist/schemas/onchain_operations_allocation.schema.json +30 -15
  350. package/dist/schemas/onchain_operations_arbitration.schema.json +9 -2
  351. package/dist/schemas/onchain_operations_contact.schema.json +8 -1
  352. package/dist/schemas/onchain_operations_demand.schema.json +29 -14
  353. package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -1
  354. package/dist/schemas/onchain_operations_guard.schema.json +290 -105
  355. package/dist/schemas/onchain_operations_machine.schema.json +49 -34
  356. package/dist/schemas/onchain_operations_order.schema.json +63 -40
  357. package/dist/schemas/onchain_operations_payment.schema.json +26 -11
  358. package/dist/schemas/onchain_operations_permission.schema.json +362 -235
  359. package/dist/schemas/onchain_operations_personal.schema.json +27 -15
  360. package/dist/schemas/onchain_operations_progress.schema.json +45 -30
  361. package/dist/schemas/onchain_operations_proof.schema.json +8 -1
  362. package/dist/schemas/onchain_operations_repository.schema.json +8 -1
  363. package/dist/schemas/onchain_operations_reward.schema.json +32 -17
  364. package/dist/schemas/onchain_operations_service.schema.json +221 -124
  365. package/dist/schemas/onchain_operations_treasury.schema.json +32 -17
  366. package/dist/schemas/onchain_table_data.output.json +258 -6
  367. package/dist/schemas/onchain_table_data.schema.json +92 -52
  368. package/dist/schemas/persona_operation.output.json +7752 -0
  369. package/dist/schemas/persona_operation.schema.json +1232 -4
  370. package/dist/schemas/query_toolkit.output.json +756 -116
  371. package/dist/schemas/query_toolkit.schema.json +138 -7
  372. package/dist/schemas/schema_query.schema.json +1 -1
  373. package/dist/schemas/watch_operation.output.json +83 -0
  374. package/dist/schemas/wip_file.output.json +8 -0
  375. package/dist/schemas/workflow_operation.schema.json +2 -2
  376. package/dist/tools/handlers/benchmark-migration.d.ts +11 -3
  377. package/dist/tools/handlers/benchmark-migration.js +1 -1
  378. package/dist/tools/handlers/config.js +1 -1
  379. package/dist/tools/handlers/evaluation.js +1 -1
  380. package/dist/tools/handlers/evaluation.spec.js +1 -1
  381. package/dist/tools/handlers/industry-pack.js +1 -1
  382. package/dist/tools/handlers/onchain.d.ts +20 -0
  383. package/dist/tools/handlers/onchain.js +1 -1
  384. package/dist/tools/handlers/persona.js +1 -1
  385. package/dist/tools/handlers/query.d.ts +8 -0
  386. package/dist/tools/handlers/query.js +1 -1
  387. package/dist/tools/handlers/winner-derivation.d.ts +20 -0
  388. package/dist/tools/handlers/winner-derivation.js +1 -0
  389. package/dist/tools/handlers/wip-upload.js +1 -1
  390. package/dist/tools/index.d.ts +1 -0
  391. package/dist/tools/index.js +1 -1
  392. package/dist/tools/registry/business.js +1 -1
  393. package/dist/tools/registry/config.js +1 -1
  394. package/dist/tools/registry/evaluation.js +1 -1
  395. package/dist/tools/registry/identity.js +1 -1
  396. package/dist/tools/registry/query.js +1 -1
  397. package/dist/tools/transport-integrity.d.ts +7 -0
  398. package/dist/tools/transport-integrity.js +1 -0
  399. package/dist/tools/upgrade-check.js +1 -1
  400. package/dist/tools/wrap.d.ts +5 -0
  401. package/dist/tools/wrap.js +1 -1
  402. package/package.json +2 -2
  403. package/dist/extensions/business-modules.d.ts +0 -54
  404. package/dist/extensions/business-modules.js +0 -1
  405. package/dist/schemas/guard-templates.json +0 -379
@@ -513,6 +513,173 @@
513
513
  ],
514
514
  "additionalProperties": false
515
515
  },
516
+ {
517
+ "type": "object",
518
+ "properties": {
519
+ "action": {
520
+ "type": "string",
521
+ "const": "compose_generation"
522
+ },
523
+ "feasibility": {
524
+ "type": "string",
525
+ "enum": [
526
+ "ready",
527
+ "infeasible"
528
+ ],
529
+ "description": "ready = a materializable multi-object Plan was produced; infeasible = NO plan is returned (an unverified plan never leaks) — read `blockers` for the full diagnosis."
530
+ },
531
+ "chain": {
532
+ "description": "The matched pilot scenario chain (e.g. 'chain.data_subscription'). Absent when infeasible.",
533
+ "type": "string"
534
+ },
535
+ "carrier": {
536
+ "description": "The carrier template id the chain mapped onto (a template = module preset). Absent when infeasible.",
537
+ "type": "string"
538
+ },
539
+ "pilot_chains": {
540
+ "type": "array",
541
+ "items": {
542
+ "type": "string"
543
+ },
544
+ "description": "The pilot boundary: the ONLY chains the G-A generator carries today — an adopted set outside them is COMPOSE-CHAIN-UNMAPPED, honestly disclosed."
545
+ },
546
+ "adopted": {
547
+ "type": "array",
548
+ "items": {
549
+ "type": "object",
550
+ "properties": {
551
+ "id": {
552
+ "type": "string",
553
+ "description": "Adopted capability id."
554
+ },
555
+ "via": {
556
+ "type": "string",
557
+ "enum": [
558
+ "selection",
559
+ "intent_signal"
560
+ ],
561
+ "description": "selection = merchant-confirmed; intent_signal = evidence-gated signal match on the intent text."
562
+ },
563
+ "matched_signals": {
564
+ "description": "The intent-signal patterns that matched (present when via='intent_signal' — falsifiable hit evidence).",
565
+ "type": "array",
566
+ "items": {
567
+ "type": "string"
568
+ }
569
+ },
570
+ "signals_tested": {
571
+ "description": "Number of intent-signal patterns tested (present when via='intent_signal').",
572
+ "type": "integer",
573
+ "minimum": 0,
574
+ "maximum": 9007199254740991
575
+ }
576
+ },
577
+ "required": [
578
+ "id",
579
+ "via"
580
+ ],
581
+ "additionalProperties": false
582
+ },
583
+ "description": "The evidence-gated adoption set (industry/pain scores NEVER adopt)."
584
+ },
585
+ "blockers": {
586
+ "type": "array",
587
+ "items": {
588
+ "type": "object",
589
+ "properties": {
590
+ "code": {
591
+ "type": "string"
592
+ },
593
+ "detail": {
594
+ "type": "string"
595
+ }
596
+ },
597
+ "required": [
598
+ "code",
599
+ "detail"
600
+ ],
601
+ "additionalProperties": false
602
+ },
603
+ "description": "Lattice + compile + audit blockers; non-empty = infeasible. Codes: COMPOSE-UNKNOWN-CAPABILITY / COMPOSE-REQUIRES-MISSING / COMPOSE-EXCLUDES-CONFLICT / COMPOSE-NO-CAPABILITY-EVIDENCE / COMPOSE-CHAIN-UNMAPPED / COMPOSE-CARRIER-UNKNOWN / REVIEW-<rule_id> (reflux audit finding)."
604
+ },
605
+ "plan": {
606
+ "description": "ready ONLY: the multi-object Plan (Service+Machine+Guard+... steps). Pass it VERBATIM as `plan` to benchmark_migration_operation action='plan_execute' — never hand-mutate steps. Stamped with catalog_version; plan_execute refuses a plan from a stale catalog.",
607
+ "type": "object",
608
+ "propertyNames": {
609
+ "type": "string"
610
+ },
611
+ "additionalProperties": {}
612
+ },
613
+ "audit": {
614
+ "description": "ready ONLY: the reflux audit summary over the generated plan.",
615
+ "type": "object",
616
+ "properties": {
617
+ "blocking": {
618
+ "type": "boolean",
619
+ "description": "false = the plan passed the reflux audit."
620
+ },
621
+ "findings": {
622
+ "type": "array",
623
+ "items": {
624
+ "type": "object",
625
+ "properties": {
626
+ "level": {
627
+ "type": "string",
628
+ "description": "Finding level (e.g. 'medium' / 'low')."
629
+ },
630
+ "rule_id": {
631
+ "type": "string",
632
+ "description": "Audit rule id."
633
+ },
634
+ "title": {
635
+ "type": "string",
636
+ "description": "One-line finding title."
637
+ }
638
+ },
639
+ "required": [
640
+ "level",
641
+ "rule_id",
642
+ "title"
643
+ ],
644
+ "additionalProperties": false
645
+ },
646
+ "description": "Non-blocking findings worth reading before materializing (blocking ones surfaced as REVIEW-* blockers instead)."
647
+ }
648
+ },
649
+ "required": [
650
+ "blocking",
651
+ "findings"
652
+ ],
653
+ "additionalProperties": false
654
+ },
655
+ "templates_version": {
656
+ "type": "integer",
657
+ "minimum": -9007199254740991,
658
+ "maximum": 9007199254740991,
659
+ "description": "The template catalog sentinel the generation ran against."
660
+ },
661
+ "supply_chain": {
662
+ "description": "Present when procurement promises landed in the plan: the per-promise emission disclosure (steps / inputs / on-chain primitives / merchant-duty notes).",
663
+ "type": "array",
664
+ "items": {
665
+ "type": "object",
666
+ "propertyNames": {
667
+ "type": "string"
668
+ },
669
+ "additionalProperties": {}
670
+ }
671
+ }
672
+ },
673
+ "required": [
674
+ "action",
675
+ "feasibility",
676
+ "pilot_chains",
677
+ "adopted",
678
+ "blockers",
679
+ "templates_version"
680
+ ],
681
+ "additionalProperties": false
682
+ },
516
683
  {
517
684
  "type": "object",
518
685
  "properties": {
@@ -608,6 +775,32 @@
608
775
  },
609
776
  "owner": {
610
777
  "type": "string"
778
+ },
779
+ "order_allocators": {},
780
+ "buyer_feedback": {
781
+ "type": "object",
782
+ "properties": {
783
+ "total": {
784
+ "type": "integer",
785
+ "minimum": 0,
786
+ "maximum": 9007199254740991
787
+ },
788
+ "likes": {
789
+ "type": "integer",
790
+ "minimum": 0,
791
+ "maximum": 9007199254740991
792
+ },
793
+ "completed_orders": {
794
+ "type": "integer",
795
+ "minimum": 0,
796
+ "maximum": 9007199254740991
797
+ }
798
+ },
799
+ "required": [
800
+ "total",
801
+ "likes"
802
+ ],
803
+ "additionalProperties": false
611
804
  }
612
805
  },
613
806
  "required": [
@@ -715,6 +908,35 @@
715
908
  "type": "string"
716
909
  }
717
910
  },
911
+ "red_flag_basis": {
912
+ "description": "Evidence-basis classification of each red flag (same order/length as red_flags when present).",
913
+ "type": "array",
914
+ "items": {
915
+ "type": "object",
916
+ "properties": {
917
+ "flag": {
918
+ "type": "string",
919
+ "description": "The flag text (identical to the corresponding red_flags entry)."
920
+ },
921
+ "basis": {
922
+ "type": "string",
923
+ "enum": [
924
+ "object_defect",
925
+ "requirement_unmet"
926
+ ]
927
+ },
928
+ "rule_id": {
929
+ "description": "The rule that fired (object_defect) or the clause target (requirement_unmet).",
930
+ "type": "string"
931
+ }
932
+ },
933
+ "required": [
934
+ "flag",
935
+ "basis"
936
+ ],
937
+ "additionalProperties": false
938
+ }
939
+ },
718
940
  "blocked": {
719
941
  "type": "boolean"
720
942
  },
@@ -852,7 +1074,7 @@
852
1074
  "properties": {
853
1075
  "operation": {
854
1076
  "type": "string",
855
- "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new."
1077
+ "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new | demand.feedback | demand.await_presenters (the last two are F-RQ-06 live-state derivations)."
856
1078
  },
857
1079
  "operation_type": {
858
1080
  "type": "string",
@@ -872,6 +1094,32 @@
872
1094
  "rationale": {
873
1095
  "type": "string",
874
1096
  "description": "Stable guidance describing the order-formation path."
1097
+ },
1098
+ "state": {
1099
+ "description": "F-RQ-06 (prescription ⑫): present ONLY when `next` was derived from a LIVE on-chain Demand read (demand_match demand_object) — presenters_count is the match-time chain value; null = live read failed (verify-first gate). Absent = static template bridge, no live state consulted.",
1100
+ "type": "object",
1101
+ "properties": {
1102
+ "demand_object": {
1103
+ "type": "string"
1104
+ },
1105
+ "presenters_count": {
1106
+ "anyOf": [
1107
+ {
1108
+ "type": "integer",
1109
+ "minimum": 0,
1110
+ "maximum": 9007199254740991
1111
+ },
1112
+ {
1113
+ "type": "null"
1114
+ }
1115
+ ]
1116
+ }
1117
+ },
1118
+ "required": [
1119
+ "demand_object",
1120
+ "presenters_count"
1121
+ ],
1122
+ "additionalProperties": false
875
1123
  }
876
1124
  },
877
1125
  "required": [
@@ -887,7 +1135,7 @@
887
1135
  "properties": {
888
1136
  "operation": {
889
1137
  "type": "string",
890
- "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new."
1138
+ "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new | demand.feedback | demand.await_presenters (the last two are F-RQ-06 live-state derivations)."
891
1139
  },
892
1140
  "operation_type": {
893
1141
  "type": "string",
@@ -907,6 +1155,32 @@
907
1155
  "rationale": {
908
1156
  "type": "string",
909
1157
  "description": "Stable guidance describing the order-formation path."
1158
+ },
1159
+ "state": {
1160
+ "description": "F-RQ-06 (prescription ⑫): present ONLY when `next` was derived from a LIVE on-chain Demand read (demand_match demand_object) — presenters_count is the match-time chain value; null = live read failed (verify-first gate). Absent = static template bridge, no live state consulted.",
1161
+ "type": "object",
1162
+ "properties": {
1163
+ "demand_object": {
1164
+ "type": "string"
1165
+ },
1166
+ "presenters_count": {
1167
+ "anyOf": [
1168
+ {
1169
+ "type": "integer",
1170
+ "minimum": 0,
1171
+ "maximum": 9007199254740991
1172
+ },
1173
+ {
1174
+ "type": "null"
1175
+ }
1176
+ ]
1177
+ }
1178
+ },
1179
+ "required": [
1180
+ "demand_object",
1181
+ "presenters_count"
1182
+ ],
1183
+ "additionalProperties": false
910
1184
  }
911
1185
  },
912
1186
  "required": [
@@ -1085,6 +1359,35 @@
1085
1359
  "type": "string"
1086
1360
  }
1087
1361
  },
1362
+ "red_flag_basis": {
1363
+ "description": "Evidence-basis classification of each red flag (same order/length as red_flags when present).",
1364
+ "type": "array",
1365
+ "items": {
1366
+ "type": "object",
1367
+ "properties": {
1368
+ "flag": {
1369
+ "type": "string",
1370
+ "description": "The flag text (identical to the corresponding red_flags entry)."
1371
+ },
1372
+ "basis": {
1373
+ "type": "string",
1374
+ "enum": [
1375
+ "object_defect",
1376
+ "requirement_unmet"
1377
+ ]
1378
+ },
1379
+ "rule_id": {
1380
+ "description": "The rule that fired (object_defect) or the clause target (requirement_unmet).",
1381
+ "type": "string"
1382
+ }
1383
+ },
1384
+ "required": [
1385
+ "flag",
1386
+ "basis"
1387
+ ],
1388
+ "additionalProperties": false
1389
+ }
1390
+ },
1088
1391
  "blocked": {
1089
1392
  "type": "boolean"
1090
1393
  },
@@ -1222,7 +1525,7 @@
1222
1525
  "properties": {
1223
1526
  "operation": {
1224
1527
  "type": "string",
1225
- "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new."
1528
+ "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new | demand.feedback | demand.await_presenters (the last two are F-RQ-06 live-state derivations)."
1226
1529
  },
1227
1530
  "operation_type": {
1228
1531
  "type": "string",
@@ -1242,6 +1545,32 @@
1242
1545
  "rationale": {
1243
1546
  "type": "string",
1244
1547
  "description": "Stable guidance describing the order-formation path."
1548
+ },
1549
+ "state": {
1550
+ "description": "F-RQ-06 (prescription ⑫): present ONLY when `next` was derived from a LIVE on-chain Demand read (demand_match demand_object) — presenters_count is the match-time chain value; null = live read failed (verify-first gate). Absent = static template bridge, no live state consulted.",
1551
+ "type": "object",
1552
+ "properties": {
1553
+ "demand_object": {
1554
+ "type": "string"
1555
+ },
1556
+ "presenters_count": {
1557
+ "anyOf": [
1558
+ {
1559
+ "type": "integer",
1560
+ "minimum": 0,
1561
+ "maximum": 9007199254740991
1562
+ },
1563
+ {
1564
+ "type": "null"
1565
+ }
1566
+ ]
1567
+ }
1568
+ },
1569
+ "required": [
1570
+ "demand_object",
1571
+ "presenters_count"
1572
+ ],
1573
+ "additionalProperties": false
1245
1574
  }
1246
1575
  },
1247
1576
  "required": [
@@ -1786,6 +2115,17 @@
1786
2115
  "type": "string",
1787
2116
  "description": "sha256 of the canonical policy JSON — local reproducibility fingerprint, never uploaded."
1788
2117
  },
2118
+ "policy_source": {
2119
+ "type": "string",
2120
+ "enum": [
2121
+ "factory_defaults",
2122
+ "system_persona",
2123
+ "general_file",
2124
+ "account_persona",
2125
+ "request"
2126
+ ],
2127
+ "description": "Which layer supplied the policy (lowest → highest: engine defaults < system persona < match-policy.json < account persona < request/Prompt). factory_defaults never appears here — with no stored policy there is no policy_effect; the standing judgment `match` defaults rule instead."
2128
+ },
1789
2129
  "unknown_policy": {
1790
2130
  "type": "string",
1791
2131
  "enum": [
@@ -1872,6 +2212,7 @@
1872
2212
  "policy_id",
1873
2213
  "direction",
1874
2214
  "policy_hash",
2215
+ "policy_source",
1875
2216
  "unknown_policy",
1876
2217
  "dropped",
1877
2218
  "unknown_kept",
@@ -2043,6 +2384,35 @@
2043
2384
  "type": "string"
2044
2385
  }
2045
2386
  },
2387
+ "red_flag_basis": {
2388
+ "description": "Evidence-basis classification of each red flag (same order/length as red_flags when present).",
2389
+ "type": "array",
2390
+ "items": {
2391
+ "type": "object",
2392
+ "properties": {
2393
+ "flag": {
2394
+ "type": "string",
2395
+ "description": "The flag text (identical to the corresponding red_flags entry)."
2396
+ },
2397
+ "basis": {
2398
+ "type": "string",
2399
+ "enum": [
2400
+ "object_defect",
2401
+ "requirement_unmet"
2402
+ ]
2403
+ },
2404
+ "rule_id": {
2405
+ "description": "The rule that fired (object_defect) or the clause target (requirement_unmet).",
2406
+ "type": "string"
2407
+ }
2408
+ },
2409
+ "required": [
2410
+ "flag",
2411
+ "basis"
2412
+ ],
2413
+ "additionalProperties": false
2414
+ }
2415
+ },
2046
2416
  "blocked": {
2047
2417
  "type": "boolean"
2048
2418
  },
@@ -2180,7 +2550,7 @@
2180
2550
  "properties": {
2181
2551
  "operation": {
2182
2552
  "type": "string",
2183
- "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new."
2553
+ "description": "Next on-chain operation label: demand.present | demand.present_guarded | demand.publish | service.order_new | demand.feedback | demand.await_presenters (the last two are F-RQ-06 live-state derivations)."
2184
2554
  },
2185
2555
  "operation_type": {
2186
2556
  "type": "string",
@@ -2200,6 +2570,32 @@
2200
2570
  "rationale": {
2201
2571
  "type": "string",
2202
2572
  "description": "Stable guidance describing the order-formation path."
2573
+ },
2574
+ "state": {
2575
+ "description": "F-RQ-06 (prescription ⑫): present ONLY when `next` was derived from a LIVE on-chain Demand read (demand_match demand_object) — presenters_count is the match-time chain value; null = live read failed (verify-first gate). Absent = static template bridge, no live state consulted.",
2576
+ "type": "object",
2577
+ "properties": {
2578
+ "demand_object": {
2579
+ "type": "string"
2580
+ },
2581
+ "presenters_count": {
2582
+ "anyOf": [
2583
+ {
2584
+ "type": "integer",
2585
+ "minimum": 0,
2586
+ "maximum": 9007199254740991
2587
+ },
2588
+ {
2589
+ "type": "null"
2590
+ }
2591
+ ]
2592
+ }
2593
+ },
2594
+ "required": [
2595
+ "demand_object",
2596
+ "presenters_count"
2597
+ ],
2598
+ "additionalProperties": false
2203
2599
  }
2204
2600
  },
2205
2601
  "required": [
@@ -2303,6 +2699,17 @@
2303
2699
  "type": "string",
2304
2700
  "description": "sha256 of the canonical policy JSON — local reproducibility fingerprint, never uploaded."
2305
2701
  },
2702
+ "policy_source": {
2703
+ "type": "string",
2704
+ "enum": [
2705
+ "factory_defaults",
2706
+ "system_persona",
2707
+ "general_file",
2708
+ "account_persona",
2709
+ "request"
2710
+ ],
2711
+ "description": "Which layer supplied the policy (lowest → highest: engine defaults < system persona < match-policy.json < account persona < request/Prompt). factory_defaults never appears here — with no stored policy there is no policy_effect; the standing judgment `match` defaults rule instead."
2712
+ },
2306
2713
  "unknown_policy": {
2307
2714
  "type": "string",
2308
2715
  "enum": [
@@ -2389,6 +2796,7 @@
2389
2796
  "policy_id",
2390
2797
  "direction",
2391
2798
  "policy_hash",
2799
+ "policy_source",
2392
2800
  "unknown_policy",
2393
2801
  "dropped",
2394
2802
  "unknown_kept",
@@ -2840,6 +3248,38 @@
2840
3248
  "legacy_enumeration"
2841
3249
  ]
2842
3250
  },
3251
+ "location_gate": {
3252
+ "type": "object",
3253
+ "properties": {
3254
+ "passed": {
3255
+ "type": "integer",
3256
+ "minimum": 0,
3257
+ "maximum": 9007199254740991,
3258
+ "description": "Services that passed the location gate."
3259
+ },
3260
+ "failed": {
3261
+ "type": "integer",
3262
+ "minimum": 0,
3263
+ "maximum": 9007199254740991,
3264
+ "description": "Services the gate excluded."
3265
+ },
3266
+ "fallback_used": {
3267
+ "type": "boolean",
3268
+ "description": "F-RQ-04: true = every service failed the gate and gate-failed services were RETAINED as candidates (presented-supply fallback) so the market is never silently empty."
3269
+ },
3270
+ "note": {
3271
+ "description": "Present when fallback_used: how to read the fallback candidate set.",
3272
+ "type": "string"
3273
+ }
3274
+ },
3275
+ "required": [
3276
+ "passed",
3277
+ "failed",
3278
+ "fallback_used"
3279
+ ],
3280
+ "additionalProperties": false,
3281
+ "description": "F-RQ-04 gate visibility: pass/fail counts and fallback state — a zero-pass market is never silent."
3282
+ },
2843
3283
  "matches": {
2844
3284
  "type": "array",
2845
3285
  "items": {
@@ -2928,6 +3368,32 @@
2928
3368
  },
2929
3369
  "owner": {
2930
3370
  "type": "string"
3371
+ },
3372
+ "order_allocators": {},
3373
+ "buyer_feedback": {
3374
+ "type": "object",
3375
+ "properties": {
3376
+ "total": {
3377
+ "type": "integer",
3378
+ "minimum": 0,
3379
+ "maximum": 9007199254740991
3380
+ },
3381
+ "likes": {
3382
+ "type": "integer",
3383
+ "minimum": 0,
3384
+ "maximum": 9007199254740991
3385
+ },
3386
+ "completed_orders": {
3387
+ "type": "integer",
3388
+ "minimum": 0,
3389
+ "maximum": 9007199254740991
3390
+ }
3391
+ },
3392
+ "required": [
3393
+ "total",
3394
+ "likes"
3395
+ ],
3396
+ "additionalProperties": false
2931
3397
  }
2932
3398
  },
2933
3399
  "required": [
@@ -3069,6 +3535,35 @@
3069
3535
  "type": "string"
3070
3536
  }
3071
3537
  },
3538
+ "red_flag_basis": {
3539
+ "description": "Evidence-basis classification of each red flag (same order/length as red_flags when present).",
3540
+ "type": "array",
3541
+ "items": {
3542
+ "type": "object",
3543
+ "properties": {
3544
+ "flag": {
3545
+ "type": "string",
3546
+ "description": "The flag text (identical to the corresponding red_flags entry)."
3547
+ },
3548
+ "basis": {
3549
+ "type": "string",
3550
+ "enum": [
3551
+ "object_defect",
3552
+ "requirement_unmet"
3553
+ ]
3554
+ },
3555
+ "rule_id": {
3556
+ "description": "The rule that fired (object_defect) or the clause target (requirement_unmet).",
3557
+ "type": "string"
3558
+ }
3559
+ },
3560
+ "required": [
3561
+ "flag",
3562
+ "basis"
3563
+ ],
3564
+ "additionalProperties": false
3565
+ }
3566
+ },
3072
3567
  "blocked": {
3073
3568
  "type": "boolean"
3074
3569
  },
@@ -3387,6 +3882,17 @@
3387
3882
  "type": "string",
3388
3883
  "description": "sha256 of the canonical policy JSON — local reproducibility fingerprint, never uploaded."
3389
3884
  },
3885
+ "policy_source": {
3886
+ "type": "string",
3887
+ "enum": [
3888
+ "factory_defaults",
3889
+ "system_persona",
3890
+ "general_file",
3891
+ "account_persona",
3892
+ "request"
3893
+ ],
3894
+ "description": "Which layer supplied the policy (lowest → highest: engine defaults < system persona < match-policy.json < account persona < request/Prompt). factory_defaults never appears here — with no stored policy there is no policy_effect; the standing judgment `match` defaults rule instead."
3895
+ },
3390
3896
  "unknown_policy": {
3391
3897
  "type": "string",
3392
3898
  "enum": [
@@ -3473,6 +3979,7 @@
3473
3979
  "policy_id",
3474
3980
  "direction",
3475
3981
  "policy_hash",
3982
+ "policy_source",
3476
3983
  "unknown_policy",
3477
3984
  "dropped",
3478
3985
  "unknown_kept",
@@ -3489,6 +3996,7 @@
3489
3996
  "action",
3490
3997
  "sensitivity",
3491
3998
  "inference_signals",
3999
+ "location_gate",
3492
4000
  "matches",
3493
4001
  "total_enumerated",
3494
4002
  "has_more",
@@ -3602,6 +4110,35 @@
3602
4110
  "type": "string"
3603
4111
  }
3604
4112
  },
4113
+ "red_flag_basis": {
4114
+ "description": "Evidence-basis classification of each red flag (same order/length as red_flags when present).",
4115
+ "type": "array",
4116
+ "items": {
4117
+ "type": "object",
4118
+ "properties": {
4119
+ "flag": {
4120
+ "type": "string",
4121
+ "description": "The flag text (identical to the corresponding red_flags entry)."
4122
+ },
4123
+ "basis": {
4124
+ "type": "string",
4125
+ "enum": [
4126
+ "object_defect",
4127
+ "requirement_unmet"
4128
+ ]
4129
+ },
4130
+ "rule_id": {
4131
+ "description": "The rule that fired (object_defect) or the clause target (requirement_unmet).",
4132
+ "type": "string"
4133
+ }
4134
+ },
4135
+ "required": [
4136
+ "flag",
4137
+ "basis"
4138
+ ],
4139
+ "additionalProperties": false
4140
+ }
4141
+ },
3605
4142
  "blocked": {
3606
4143
  "type": "boolean"
3607
4144
  },
@@ -3832,6 +4369,35 @@
3832
4369
  "type": "string"
3833
4370
  }
3834
4371
  },
4372
+ "red_flag_basis": {
4373
+ "description": "Evidence-basis classification of each red flag (same order/length as red_flags when present).",
4374
+ "type": "array",
4375
+ "items": {
4376
+ "type": "object",
4377
+ "properties": {
4378
+ "flag": {
4379
+ "type": "string",
4380
+ "description": "The flag text (identical to the corresponding red_flags entry)."
4381
+ },
4382
+ "basis": {
4383
+ "type": "string",
4384
+ "enum": [
4385
+ "object_defect",
4386
+ "requirement_unmet"
4387
+ ]
4388
+ },
4389
+ "rule_id": {
4390
+ "description": "The rule that fired (object_defect) or the clause target (requirement_unmet).",
4391
+ "type": "string"
4392
+ }
4393
+ },
4394
+ "required": [
4395
+ "flag",
4396
+ "basis"
4397
+ ],
4398
+ "additionalProperties": false
4399
+ }
4400
+ },
3835
4401
  "blocked": {
3836
4402
  "type": "boolean"
3837
4403
  },