@wowok/agent-mcp 3.0.4 → 3.0.6

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 (305) hide show
  1. package/README.md +25 -20
  2. package/dist/customer/account-events.js +1 -1
  3. package/dist/evaluation/path-reasoning.d.ts +4 -2
  4. package/dist/evaluation/path-reasoning.js +1 -1
  5. package/dist/extensions/constraint-registry.d.ts +2 -2
  6. package/dist/extensions/constraint-registry.js +1 -1
  7. package/dist/extensions/custom-registry-file.d.ts +22 -0
  8. package/dist/extensions/custom-registry-file.js +1 -0
  9. package/dist/extensions/index.d.ts +2 -1
  10. package/dist/extensions/index.js +1 -1
  11. package/dist/extensions/industry-pack.d.ts +7 -0
  12. package/dist/extensions/industry-pack.js +1 -1
  13. package/dist/extensions/metric-registry.d.ts +2 -2
  14. package/dist/extensions/metric-registry.js +1 -1
  15. package/dist/extensions/modes.js +1 -1
  16. package/dist/extensions/registry.d.ts +2 -2
  17. package/dist/extensions/registry.js +1 -1
  18. package/dist/extensions/types.d.ts +4 -0
  19. package/dist/goal/GoalEngine.d.ts +13 -1
  20. package/dist/goal/GoalEngine.js +1 -1
  21. package/dist/goal/next-steps.d.ts +12 -0
  22. package/dist/goal/next-steps.js +1 -0
  23. package/dist/goal/pursue.d.ts +18 -0
  24. package/dist/goal/pursue.js +1 -0
  25. package/dist/goal/types.d.ts +72 -0
  26. package/dist/goal/types.js +1 -1
  27. package/dist/graph/onchain/analyze.d.ts +44 -0
  28. package/dist/graph/onchain/analyze.js +1 -0
  29. package/dist/graph/onchain/analyze.spec.d.ts +1 -0
  30. package/dist/graph/onchain/analyze.spec.js +1 -0
  31. package/dist/graph/onchain/anti-cheat.d.ts +39 -0
  32. package/dist/graph/onchain/anti-cheat.js +1 -0
  33. package/dist/graph/onchain/anti-cheat.spec.d.ts +1 -0
  34. package/dist/graph/onchain/anti-cheat.spec.js +1 -0
  35. package/dist/graph/onchain/dataplane.d.ts +44 -0
  36. package/dist/graph/onchain/dataplane.js +1 -0
  37. package/dist/graph/onchain/edge-schema.d.ts +60 -0
  38. package/dist/graph/onchain/edge-schema.js +1 -0
  39. package/dist/graph/onchain/expand.d.ts +4 -0
  40. package/dist/graph/onchain/expand.js +1 -0
  41. package/dist/graph/onchain/extract.d.ts +21 -0
  42. package/dist/graph/onchain/extract.js +1 -0
  43. package/dist/graph/onchain/index.d.ts +17 -0
  44. package/dist/graph/onchain/index.js +1 -0
  45. package/dist/graph/onchain/interest.d.ts +10 -0
  46. package/dist/graph/onchain/interest.js +1 -0
  47. package/dist/graph/onchain/interest.spec.d.ts +1 -0
  48. package/dist/graph/onchain/interest.spec.js +1 -0
  49. package/dist/graph/onchain/onchain.spec.d.ts +1 -0
  50. package/dist/graph/onchain/onchain.spec.js +1 -0
  51. package/dist/graph/onchain/order-status.d.ts +53 -0
  52. package/dist/graph/onchain/order-status.js +1 -0
  53. package/dist/graph/onchain/project-relationship.d.ts +3 -0
  54. package/dist/graph/onchain/project-relationship.js +1 -0
  55. package/dist/graph/onchain/sdk-batch.d.ts +123 -0
  56. package/dist/graph/onchain/sdk-batch.js +1 -0
  57. package/dist/graph/onchain/sdk-dataplane.d.ts +43 -0
  58. package/dist/graph/onchain/sdk-dataplane.js +1 -0
  59. package/dist/graph/onchain/strategy.d.ts +54 -0
  60. package/dist/graph/onchain/strategy.js +1 -0
  61. package/dist/graph/onchain/strategy.spec.d.ts +1 -0
  62. package/dist/graph/onchain/strategy.spec.js +1 -0
  63. package/dist/graph/onchain/types.d.ts +238 -0
  64. package/dist/graph/onchain/types.js +1 -0
  65. package/dist/graph/onchain/viewport.d.ts +5 -0
  66. package/dist/graph/onchain/viewport.js +1 -0
  67. package/dist/harness/recover.js +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/intent/enrich.js +1 -1
  70. package/dist/keeper/detectors.d.ts +1 -1
  71. package/dist/keeper/detectors.js +1 -1
  72. package/dist/knowledge/account-marks.js +1 -1
  73. package/dist/knowledge/allocation-risk.js +1 -1
  74. package/dist/knowledge/allocation-templates.js +1 -1
  75. package/dist/knowledge/anti-cheat.d.ts +2 -37
  76. package/dist/knowledge/anti-cheat.js +1 -1
  77. package/dist/knowledge/contract-invariants.js +1 -1
  78. package/dist/knowledge/getting-started.d.ts +37 -0
  79. package/dist/knowledge/getting-started.js +1 -0
  80. package/dist/knowledge/goal-completion.d.ts +12 -0
  81. package/dist/knowledge/goal-completion.js +1 -1
  82. package/dist/knowledge/guard-render.d.ts +1 -0
  83. package/dist/knowledge/guard-render.js +1 -1
  84. package/dist/knowledge/guard-risk.js +1 -1
  85. package/dist/knowledge/guard-submission-brief.d.ts +83 -0
  86. package/dist/knowledge/guard-submission-brief.js +1 -0
  87. package/dist/knowledge/guard-submission-prompt.d.ts +13 -0
  88. package/dist/knowledge/guard-submission-prompt.js +1 -1
  89. package/dist/knowledge/index.d.ts +10 -4
  90. package/dist/knowledge/index.js +1 -1
  91. package/dist/knowledge/industry-registry.js +1 -1
  92. package/dist/knowledge/industry-strategy.d.ts +91 -0
  93. package/dist/knowledge/industry-strategy.js +1 -0
  94. package/dist/knowledge/jsonrpc-enum.js +1 -1
  95. package/dist/knowledge/market-metrics.d.ts +14 -3
  96. package/dist/knowledge/market-metrics.js +1 -1
  97. package/dist/knowledge/migration-preflight.js +1 -1
  98. package/dist/knowledge/operation-dictionary.d.ts +1 -1
  99. package/dist/knowledge/payment-tracker.d.ts +63 -0
  100. package/dist/knowledge/payment-tracker.js +1 -0
  101. package/dist/knowledge/recipient-constraint.d.ts +160 -0
  102. package/dist/knowledge/recipient-constraint.js +1 -0
  103. package/dist/knowledge/safety-rules.d.ts +1 -1
  104. package/dist/knowledge/safety-rules.js +1 -1
  105. package/dist/knowledge/scenario-topology.d.ts +6 -1
  106. package/dist/knowledge/scenario-topology.js +1 -1
  107. package/dist/knowledge/service-risk-node.d.ts +3 -0
  108. package/dist/knowledge/service-risk-node.js +1 -0
  109. package/dist/knowledge/service-risk.d.ts +2 -0
  110. package/dist/knowledge/service-risk.js +1 -1
  111. package/dist/knowledge/service-templates.d.ts +2 -0
  112. package/dist/knowledge/service-templates.js +1 -1
  113. package/dist/knowledge/strategy-manuals.d.ts +17 -0
  114. package/dist/knowledge/strategy-manuals.js +1 -0
  115. package/dist/knowledge/supply-chain.d.ts +3 -1
  116. package/dist/knowledge/supply-chain.js +1 -1
  117. package/dist/knowledge/template-registry.js +1 -1
  118. package/dist/knowledge/tools-reference.js +1 -1
  119. package/dist/knowledge/workflow-guidance.d.ts +3 -118
  120. package/dist/knowledge/workflow-guidance.js +1 -1
  121. package/dist/knowledge/workspace-lists.d.ts +4 -0
  122. package/dist/knowledge/workspace-lists.js +1 -1
  123. package/dist/monitor/MonitorLoop.js +1 -1
  124. package/dist/monitor/ScopeResolver.js +1 -1
  125. package/dist/participation/arbitrator-interest.d.ts +2 -0
  126. package/dist/participation/arbitrator-interest.js +1 -1
  127. package/dist/participation/collaborator-interest.d.ts +2 -0
  128. package/dist/participation/collaborator-interest.js +1 -1
  129. package/dist/participation/customer-interest.d.ts +2 -0
  130. package/dist/participation/customer-interest.js +1 -1
  131. package/dist/participation/merchant-interest.d.ts +2 -0
  132. package/dist/participation/merchant-interest.js +1 -1
  133. package/dist/participation/radar-core.d.ts +15 -15
  134. package/dist/participation/radar-core.js +1 -1
  135. package/dist/participation/supplier-interest.d.ts +2 -0
  136. package/dist/participation/supplier-interest.js +1 -1
  137. package/dist/persona/analyzer.d.ts +2 -1
  138. package/dist/persona/bridge.d.ts +5 -1
  139. package/dist/persona/bridge.js +1 -1
  140. package/dist/persona/defaults.js +1 -1
  141. package/dist/persona/distill-goal.d.ts +7 -1
  142. package/dist/persona/distill-goal.js +1 -1
  143. package/dist/persona/index.d.ts +13 -3
  144. package/dist/persona/index.js +1 -1
  145. package/dist/persona/model.d.ts +12 -2
  146. package/dist/persona/model.js +1 -1
  147. package/dist/persona/overrides.d.ts +1 -0
  148. package/dist/persona/overrides.js +1 -1
  149. package/dist/persona/topology-focus.d.ts +29 -0
  150. package/dist/persona/topology-focus.js +1 -0
  151. package/dist/persona/types.d.ts +81 -0
  152. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  153. package/dist/playbooks/service-build/context-assembly.js +1 -1
  154. package/dist/playbooks/service-build/machine-nodes.js +1 -1
  155. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  156. package/dist/playbooks/service-build/merchant-guide.d.ts +7 -0
  157. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  158. package/dist/playbooks/service-build/object-panorama.js +1 -1
  159. package/dist/playbooks/service-build/participation-radar.js +1 -1
  160. package/dist/playbooks/service-build/pipeline-actions.d.ts +2 -2
  161. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  162. package/dist/playbooks/service-build/relationship-profile.d.ts +1 -0
  163. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  164. package/dist/playbooks/service-build/risk-aggregator.js +1 -1
  165. package/dist/playbooks/service-build/service-panorama.d.ts +4 -0
  166. package/dist/playbooks/service-build/service-panorama.js +1 -1
  167. package/dist/playbooks/service-build/topology-query.d.ts +14 -0
  168. package/dist/playbooks/service-build/topology-query.js +1 -0
  169. package/dist/relationship/derivation.js +1 -1
  170. package/dist/role/index.d.ts +1 -0
  171. package/dist/role/index.js +1 -1
  172. package/dist/role/profiles.d.ts +26 -0
  173. package/dist/role/profiles.js +1 -0
  174. package/dist/safety/confirm-gate.d.ts +4 -1
  175. package/dist/safety/confirm-gate.js +1 -1
  176. package/dist/schema/call/allocation.d.ts +6 -6
  177. package/dist/schema/call/allocation.js +1 -1
  178. package/dist/schema/call/base.js +1 -1
  179. package/dist/schema/call/bridge.d.ts +1 -1
  180. package/dist/schema/call/guard.d.ts +20 -20
  181. package/dist/schema/call/repository.js +1 -1
  182. package/dist/schema/call/semantic.js +1 -1
  183. package/dist/schema/call/service.d.ts +4 -4
  184. package/dist/schema/call/service.js +1 -1
  185. package/dist/schema/common/index.js +1 -1
  186. package/dist/schema/employee/index.d.ts +7 -7
  187. package/dist/schema/evaluation/index.d.ts +26 -13
  188. package/dist/schema/evaluation/index.js +1 -1
  189. package/dist/schema/goal/index.d.ts +53 -17
  190. package/dist/schema/goal/index.js +1 -1
  191. package/dist/schema/goal/planning.d.ts +7 -7
  192. package/dist/schema/index.d.ts +1 -0
  193. package/dist/schema/index.js +1 -1
  194. package/dist/schema/industry-pack/index.d.ts +13 -6
  195. package/dist/schema/industry-pack/index.js +1 -1
  196. package/dist/schema/industry-pack/modes.d.ts +6 -6
  197. package/dist/schema/intent-radar/index.d.ts +16 -16
  198. package/dist/schema/local/index.d.ts +8 -4
  199. package/dist/schema/local/index.js +1 -1
  200. package/dist/schema/messenger/index.d.ts +428 -72
  201. package/dist/schema/messenger/index.js +1 -1
  202. package/dist/schema/operations.d.ts +177 -34
  203. package/dist/schema/operations.js +1 -1
  204. package/dist/schema/persona/index.d.ts +15744 -1
  205. package/dist/schema/persona/index.js +1 -1
  206. package/dist/schema/query/bi.d.ts +891 -24
  207. package/dist/schema/query/bi.js +1 -1
  208. package/dist/schema/query/index.d.ts +168 -43
  209. package/dist/schema/query/index.js +1 -1
  210. package/dist/schema/schema-query/index.d.ts +16 -0
  211. package/dist/schema/schema-query/index.js +1 -1
  212. package/dist/schema/schema-version.js +1 -1
  213. package/dist/schema/strategy-review/index.d.ts +137 -0
  214. package/dist/schema/strategy-review/index.js +1 -0
  215. package/dist/schema/trust/index.d.ts +6 -6
  216. package/dist/schema/workflow/index.d.ts +2 -2
  217. package/dist/schema-query-impl/index.js +1 -1
  218. package/dist/schemas/account_operation.output.json +8 -4
  219. package/dist/schemas/account_operation.schema.json +6 -2
  220. package/dist/schemas/bridge_operation.schema.json +10 -10
  221. package/dist/schemas/evaluation_operation.output.json +24 -0
  222. package/dist/schemas/evaluation_operation.schema.json +7 -7
  223. package/dist/schemas/goal_operation.schema.json +124 -0
  224. package/dist/schemas/guard2file.schema.json +2 -2
  225. package/dist/schemas/index.json +7 -1
  226. package/dist/schemas/industry_pack_operation.output.json +39 -0
  227. package/dist/schemas/local_mark_operation.schema.json +2 -2
  228. package/dist/schemas/machineNode2file.schema.json +2 -2
  229. package/dist/schemas/messenger_operation.output.json +934 -236
  230. package/dist/schemas/messenger_operation.schema.json +93 -242
  231. package/dist/schemas/onchain_events.schema.json +1 -1
  232. package/dist/schemas/onchain_operations.schema.json +54 -54
  233. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  234. package/dist/schemas/onchain_operations_arbitration.schema.json +2 -2
  235. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  236. package/dist/schemas/onchain_operations_demand.schema.json +2 -2
  237. package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -2
  238. package/dist/schemas/onchain_operations_gen_proof.schema.json +2 -2
  239. package/dist/schemas/onchain_operations_guard.schema.json +2 -2
  240. package/dist/schemas/onchain_operations_machine.schema.json +8 -8
  241. package/dist/schemas/onchain_operations_order.schema.json +2 -2
  242. package/dist/schemas/onchain_operations_payment.schema.json +3 -3
  243. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  244. package/dist/schemas/onchain_operations_personal.schema.json +2 -2
  245. package/dist/schemas/onchain_operations_progress.schema.json +2 -2
  246. package/dist/schemas/onchain_operations_proof.schema.json +2 -2
  247. package/dist/schemas/onchain_operations_repository.schema.json +5 -5
  248. package/dist/schemas/onchain_operations_reward.schema.json +2 -2
  249. package/dist/schemas/onchain_operations_service.schema.json +5 -5
  250. package/dist/schemas/onchain_operations_treasury.schema.json +4 -4
  251. package/dist/schemas/onchain_table_data.output.json +197 -13
  252. package/dist/schemas/onchain_table_data.schema.json +43 -43
  253. package/dist/schemas/persona_operation.output.json +37778 -262
  254. package/dist/schemas/persona_operation.schema.json +5960 -1
  255. package/dist/schemas/query_toolkit.output.json +1615 -10
  256. package/dist/schemas/query_toolkit.schema.json +232 -42
  257. package/dist/schemas/schema_query.schema.json +25 -1
  258. package/dist/schemas/strategy_review_operation.output.json +532 -0
  259. package/dist/schemas/strategy_review_operation.schema.json +66 -0
  260. package/dist/schemas/wowok_buildin_info.output.json +188 -6
  261. package/dist/schemas/wowok_buildin_info.schema.json +14 -0
  262. package/dist/strategy/collectors.d.ts +66 -0
  263. package/dist/strategy/collectors.js +1 -0
  264. package/dist/strategy/collectors.spec.d.ts +1 -0
  265. package/dist/strategy/collectors.spec.js +1 -0
  266. package/dist/strategy/index.d.ts +5 -0
  267. package/dist/strategy/index.js +1 -0
  268. package/dist/strategy/metrics.d.ts +20 -0
  269. package/dist/strategy/metrics.js +1 -0
  270. package/dist/strategy/review.d.ts +48 -0
  271. package/dist/strategy/review.js +1 -0
  272. package/dist/strategy/scorecard.d.ts +32 -0
  273. package/dist/strategy/scorecard.js +1 -0
  274. package/dist/strategy/store.d.ts +26 -0
  275. package/dist/strategy/store.js +1 -0
  276. package/dist/tools/handlers/config.js +1 -1
  277. package/dist/tools/handlers/evaluation.js +1 -1
  278. package/dist/tools/handlers/goal.js +1 -1
  279. package/dist/tools/handlers/industry-pack.js +1 -1
  280. package/dist/tools/handlers/local.js +1 -1
  281. package/dist/tools/handlers/messenger.js +1 -1
  282. package/dist/tools/handlers/onchain.js +1 -1
  283. package/dist/tools/handlers/permission.js +1 -1
  284. package/dist/tools/handlers/persona.js +1 -1
  285. package/dist/tools/handlers/query.d.ts +6 -0
  286. package/dist/tools/handlers/query.js +1 -1
  287. package/dist/tools/handlers/schema-query.js +1 -1
  288. package/dist/tools/handlers/strategy-review.d.ts +2 -0
  289. package/dist/tools/handlers/strategy-review.js +1 -0
  290. package/dist/tools/handlers/watch.js +1 -1
  291. package/dist/tools/handlers/workflow.js +1 -1
  292. package/dist/tools/index.d.ts +3 -0
  293. package/dist/tools/index.js +1 -1
  294. package/dist/tools/registry/agent.js +1 -1
  295. package/dist/tools/registry/business.js +1 -1
  296. package/dist/tools/registry/local.js +1 -1
  297. package/dist/tools/registry/messenger.js +1 -1
  298. package/dist/tools/registry/onchain.js +1 -1
  299. package/dist/tools/registry/query.js +1 -1
  300. package/dist/tools/rules-hook.d.ts +2 -0
  301. package/dist/tools/rules-hook.js +1 -1
  302. package/dist/tools/shared.d.ts +2 -1
  303. package/dist/tools/shared.js +1 -1
  304. package/dist/tools/wrap.js +1 -1
  305. package/package.json +2 -2
@@ -0,0 +1,532 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://wowok.net/schemas/strategy_review_operation.output.json",
4
+ "title": "Strategy Review - Posture-Weighted Scorecard & Periodic Review",
5
+ "description": "Evidence-driven operating review for one merchant account in one industry. Actions: collect (gather evidence across 6 sources, persist one append-only local snapshot), review (fresh evidence without persisting; posture-weighted 0-100 score, period deltas, deterministic pricing/posture recommendations, cadence, <=2 current-layer persona proposals that are only applied via explicit persona_operation apply), list_snapshots (stored history).",
6
+ "type": "object",
7
+ "properties": {
8
+ "result": {
9
+ "oneOf": [
10
+ {
11
+ "type": "object",
12
+ "properties": {
13
+ "action": {
14
+ "type": "string",
15
+ "const": "collect"
16
+ },
17
+ "snapshot_id": {
18
+ "type": "string"
19
+ },
20
+ "stored": {
21
+ "type": "boolean",
22
+ "description": "Whether the snapshot was persisted (false = storage failed fail-soft; collection still returned)."
23
+ },
24
+ "storage_error": {
25
+ "type": "string"
26
+ },
27
+ "posture": {
28
+ "type": "string",
29
+ "enum": [
30
+ "volume",
31
+ "balanced",
32
+ "margin"
33
+ ]
34
+ },
35
+ "collection": {
36
+ "type": "object",
37
+ "properties": {
38
+ "account": {
39
+ "type": "string"
40
+ },
41
+ "industry": {
42
+ "type": "string"
43
+ },
44
+ "network": {
45
+ "type": "string"
46
+ },
47
+ "collected_at": {
48
+ "type": "number"
49
+ },
50
+ "metrics": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "object",
54
+ "properties": {
55
+ "id": {
56
+ "type": "string",
57
+ "description": "Catalog metric id, e.g. order_count, repeat_customer_rate."
58
+ },
59
+ "source": {
60
+ "type": "string",
61
+ "description": "Which evidence source produced it."
62
+ },
63
+ "status": {
64
+ "type": "string",
65
+ "enum": [
66
+ "ok",
67
+ "unavailable",
68
+ "error"
69
+ ],
70
+ "description": "ok = value present; unavailable = source returned no evidence; error = source failed (degraded, never zero-filled)."
71
+ },
72
+ "value": {
73
+ "anyOf": [
74
+ {
75
+ "type": "number"
76
+ },
77
+ {
78
+ "type": "null"
79
+ }
80
+ ]
81
+ },
82
+ "reason": {
83
+ "description": "Why status is unavailable/error, when known.",
84
+ "type": "string"
85
+ },
86
+ "collected_at": {
87
+ "type": "number"
88
+ }
89
+ },
90
+ "required": [
91
+ "id",
92
+ "source",
93
+ "status",
94
+ "collected_at"
95
+ ],
96
+ "additionalProperties": false
97
+ }
98
+ },
99
+ "unavailable": {
100
+ "type": "array",
101
+ "items": {
102
+ "type": "string"
103
+ },
104
+ "description": "Metric ids with no evidence this cycle."
105
+ },
106
+ "errors": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "string"
110
+ },
111
+ "description": "Evidence sources that failed this cycle."
112
+ }
113
+ },
114
+ "required": [
115
+ "account",
116
+ "industry",
117
+ "network",
118
+ "collected_at",
119
+ "metrics",
120
+ "unavailable",
121
+ "errors"
122
+ ],
123
+ "additionalProperties": false
124
+ }
125
+ },
126
+ "required": [
127
+ "action",
128
+ "snapshot_id",
129
+ "stored",
130
+ "posture",
131
+ "collection"
132
+ ],
133
+ "additionalProperties": false
134
+ },
135
+ {
136
+ "type": "object",
137
+ "properties": {
138
+ "action": {
139
+ "type": "string",
140
+ "const": "review"
141
+ },
142
+ "review": {
143
+ "type": "object",
144
+ "properties": {
145
+ "account": {
146
+ "type": "string"
147
+ },
148
+ "industry": {
149
+ "type": "string"
150
+ },
151
+ "posture": {
152
+ "type": "string",
153
+ "enum": [
154
+ "volume",
155
+ "balanced",
156
+ "margin"
157
+ ]
158
+ },
159
+ "generated_at": {
160
+ "type": "number"
161
+ },
162
+ "scorecard": {
163
+ "type": "object",
164
+ "properties": {
165
+ "posture": {
166
+ "type": "string",
167
+ "enum": [
168
+ "volume",
169
+ "balanced",
170
+ "margin"
171
+ ]
172
+ },
173
+ "overall": {
174
+ "anyOf": [
175
+ {
176
+ "type": "number"
177
+ },
178
+ {
179
+ "type": "null"
180
+ }
181
+ ],
182
+ "description": "0–100 renormalized over available anchored metrics; null when no SHOP-performance evidence exists (market-environment metrics alone never grade the shop)."
183
+ },
184
+ "scored_metric_count": {
185
+ "type": "number"
186
+ },
187
+ "metric_scores": {
188
+ "type": "array",
189
+ "items": {
190
+ "type": "object",
191
+ "properties": {
192
+ "id": {
193
+ "type": "string"
194
+ },
195
+ "label": {
196
+ "type": "string"
197
+ },
198
+ "status": {
199
+ "type": "string",
200
+ "enum": [
201
+ "ok",
202
+ "unavailable",
203
+ "error"
204
+ ]
205
+ },
206
+ "value": {
207
+ "anyOf": [
208
+ {
209
+ "type": "number"
210
+ },
211
+ {
212
+ "type": "null"
213
+ }
214
+ ]
215
+ },
216
+ "weight": {
217
+ "type": "number",
218
+ "description": "Posture-specific weight actually applied."
219
+ },
220
+ "score": {
221
+ "anyOf": [
222
+ {
223
+ "type": "number"
224
+ },
225
+ {
226
+ "type": "null"
227
+ }
228
+ ],
229
+ "description": "0–100 anchored score; null for contextual/unavailable metrics."
230
+ },
231
+ "delta": {
232
+ "anyOf": [
233
+ {
234
+ "type": "object",
235
+ "properties": {
236
+ "id": {
237
+ "type": "string"
238
+ },
239
+ "from": {
240
+ "type": "number"
241
+ },
242
+ "to": {
243
+ "type": "number"
244
+ },
245
+ "change": {
246
+ "type": "number"
247
+ },
248
+ "direction": {
249
+ "type": "string",
250
+ "enum": [
251
+ "up",
252
+ "down",
253
+ "flat"
254
+ ]
255
+ },
256
+ "improved": {
257
+ "anyOf": [
258
+ {
259
+ "type": "boolean"
260
+ },
261
+ {
262
+ "type": "null"
263
+ }
264
+ ],
265
+ "description": "Whether the change is good for this metric; null when flat/unoriented."
266
+ }
267
+ },
268
+ "required": [
269
+ "id",
270
+ "from",
271
+ "to",
272
+ "change",
273
+ "direction",
274
+ "improved"
275
+ ],
276
+ "additionalProperties": false
277
+ },
278
+ {
279
+ "type": "null"
280
+ }
281
+ ]
282
+ }
283
+ },
284
+ "required": [
285
+ "id",
286
+ "label",
287
+ "status",
288
+ "value",
289
+ "weight",
290
+ "score",
291
+ "delta"
292
+ ],
293
+ "additionalProperties": false
294
+ }
295
+ },
296
+ "unavailable": {
297
+ "type": "array",
298
+ "items": {
299
+ "type": "string"
300
+ }
301
+ }
302
+ },
303
+ "required": [
304
+ "posture",
305
+ "overall",
306
+ "scored_metric_count",
307
+ "metric_scores",
308
+ "unavailable"
309
+ ],
310
+ "additionalProperties": false
311
+ },
312
+ "cadence": {
313
+ "type": "object",
314
+ "properties": {
315
+ "cadence_days": {
316
+ "type": "number"
317
+ },
318
+ "days_since_last": {
319
+ "anyOf": [
320
+ {
321
+ "type": "number"
322
+ },
323
+ {
324
+ "type": "null"
325
+ }
326
+ ]
327
+ },
328
+ "due": {
329
+ "type": "boolean"
330
+ },
331
+ "next_review_after": {
332
+ "anyOf": [
333
+ {
334
+ "type": "number"
335
+ },
336
+ {
337
+ "type": "null"
338
+ }
339
+ ]
340
+ }
341
+ },
342
+ "required": [
343
+ "cadence_days",
344
+ "days_since_last",
345
+ "due",
346
+ "next_review_after"
347
+ ],
348
+ "additionalProperties": false
349
+ },
350
+ "summary": {
351
+ "type": "string",
352
+ "description": "Markdown review card body."
353
+ },
354
+ "findings": {
355
+ "type": "array",
356
+ "items": {
357
+ "type": "string"
358
+ }
359
+ },
360
+ "recommendations": {
361
+ "type": "array",
362
+ "items": {
363
+ "type": "string"
364
+ }
365
+ },
366
+ "proposals": {
367
+ "type": "array",
368
+ "items": {
369
+ "type": "object",
370
+ "properties": {
371
+ "id": {
372
+ "type": "string"
373
+ },
374
+ "rationale": {
375
+ "type": "string"
376
+ },
377
+ "target_layer": {
378
+ "type": "string",
379
+ "const": "current",
380
+ "description": "AI-generated proposals may only touch the CURRENT persona layer."
381
+ },
382
+ "delta": {
383
+ "type": "object",
384
+ "propertyNames": {
385
+ "type": "string"
386
+ },
387
+ "additionalProperties": {},
388
+ "description": "Partial PersonaLayer to merge; applied ONLY via explicit user confirmation."
389
+ },
390
+ "apply_via": {
391
+ "type": "object",
392
+ "properties": {
393
+ "tool": {
394
+ "type": "string",
395
+ "const": "persona_operation"
396
+ },
397
+ "action": {
398
+ "type": "string",
399
+ "const": "apply_delta"
400
+ },
401
+ "note": {
402
+ "type": "string"
403
+ }
404
+ },
405
+ "required": [
406
+ "tool",
407
+ "action",
408
+ "note"
409
+ ],
410
+ "additionalProperties": false
411
+ }
412
+ },
413
+ "required": [
414
+ "id",
415
+ "rationale",
416
+ "target_layer",
417
+ "delta",
418
+ "apply_via"
419
+ ],
420
+ "additionalProperties": false
421
+ },
422
+ "description": "At most two current-layer proposals; NEVER applied automatically."
423
+ },
424
+ "unavailable": {
425
+ "type": "array",
426
+ "items": {
427
+ "type": "string"
428
+ }
429
+ }
430
+ },
431
+ "required": [
432
+ "account",
433
+ "industry",
434
+ "posture",
435
+ "generated_at",
436
+ "scorecard",
437
+ "cadence",
438
+ "summary",
439
+ "findings",
440
+ "recommendations",
441
+ "proposals",
442
+ "unavailable"
443
+ ],
444
+ "additionalProperties": false
445
+ },
446
+ "previous_snapshot_id": {
447
+ "anyOf": [
448
+ {
449
+ "type": "string"
450
+ },
451
+ {
452
+ "type": "null"
453
+ }
454
+ ],
455
+ "description": "Snapshot id the deltas were computed against; null when there is no history."
456
+ }
457
+ },
458
+ "required": [
459
+ "action",
460
+ "review",
461
+ "previous_snapshot_id"
462
+ ],
463
+ "additionalProperties": false
464
+ },
465
+ {
466
+ "type": "object",
467
+ "properties": {
468
+ "action": {
469
+ "type": "string",
470
+ "const": "list_snapshots"
471
+ },
472
+ "snapshots": {
473
+ "type": "array",
474
+ "items": {
475
+ "type": "object",
476
+ "properties": {
477
+ "id": {
478
+ "type": "string"
479
+ },
480
+ "account": {
481
+ "type": "string"
482
+ },
483
+ "industry": {
484
+ "type": "string"
485
+ },
486
+ "posture": {
487
+ "anyOf": [
488
+ {
489
+ "type": "string",
490
+ "enum": [
491
+ "volume",
492
+ "balanced",
493
+ "margin"
494
+ ]
495
+ },
496
+ {
497
+ "type": "null"
498
+ }
499
+ ]
500
+ },
501
+ "collected_at": {
502
+ "type": "number"
503
+ },
504
+ "created_at": {
505
+ "type": "number"
506
+ }
507
+ },
508
+ "required": [
509
+ "id",
510
+ "account",
511
+ "industry",
512
+ "collected_at",
513
+ "created_at"
514
+ ],
515
+ "additionalProperties": false
516
+ }
517
+ }
518
+ },
519
+ "required": [
520
+ "action",
521
+ "snapshots"
522
+ ],
523
+ "additionalProperties": false
524
+ }
525
+ ]
526
+ }
527
+ },
528
+ "required": [
529
+ "result"
530
+ ],
531
+ "additionalProperties": false
532
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://wowok.net/schemas/strategy_review_operation.json",
4
+ "title": "Strategy Review - Posture-Weighted Scorecard & Periodic Review",
5
+ "description": "Evidence-driven operating review for one merchant account in one industry. Actions: collect (gather evidence across 6 sources, persist one append-only local snapshot), review (fresh evidence without persisting; posture-weighted 0-100 score, period deltas, deterministic pricing/posture recommendations, cadence, <=2 current-layer persona proposals that are only applied via explicit persona_operation apply), list_snapshots (stored history).",
6
+ "type": "object",
7
+ "properties": {
8
+ "action": {
9
+ "type": "string",
10
+ "enum": [
11
+ "collect",
12
+ "review",
13
+ "list_snapshots"
14
+ ],
15
+ "description": "collect = gather fresh on-chain/derived evidence, persist ONE local snapshot (append-only SQLite KV), return the raw collection; review = gather fresh evidence WITHOUT persisting, diff against the latest stored snapshot, score under the persona posture and assemble findings/recommendations/current-layer proposals (proposals are never auto-applied); list_snapshots = list stored snapshot summaries for account+industry."
16
+ },
17
+ "account": {
18
+ "type": "string",
19
+ "description": "Chain account address. Required for every action (scope of evidence and snapshots)."
20
+ },
21
+ "industry": {
22
+ "type": "string",
23
+ "description": "Industry id (e.g. education, rental, freelance, subscription, travel, retail, or a pack-registered id). Required for every action."
24
+ },
25
+ "posture": {
26
+ "description": "Override the scoring posture. Defaults to the merchant posture in the effective persona, then 'balanced'.",
27
+ "type": "string",
28
+ "enum": [
29
+ "volume",
30
+ "balanced",
31
+ "margin"
32
+ ]
33
+ },
34
+ "network": {
35
+ "description": "Network for evidence queries (default testnet).",
36
+ "type": "string",
37
+ "enum": [
38
+ "mainnet",
39
+ "testnet"
40
+ ]
41
+ },
42
+ "limit": {
43
+ "description": "Max records per evidence query (default follows the fetchers).",
44
+ "type": "integer",
45
+ "minimum": 1,
46
+ "maximum": 200
47
+ },
48
+ "no_cache": {
49
+ "description": "Bypass caches in evidence fetchers.",
50
+ "type": "boolean"
51
+ },
52
+ "discovery_terms": {
53
+ "description": "Override discovery search terms for service/competitor enumeration (default: built-in bilingual terms for the industry).",
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ "required": [
61
+ "action",
62
+ "account",
63
+ "industry"
64
+ ],
65
+ "additionalProperties": false
66
+ }