@wowok/agent-mcp 3.1.6 → 3.2.0

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 (235) hide show
  1. package/dist/config/exposure.d.ts +10 -10
  2. package/dist/config/judgment.d.ts +25 -25
  3. package/dist/config/rule-engine.d.ts +25 -25
  4. package/dist/customer/user-preferences.d.ts +2 -2
  5. package/dist/evaluation/arbitration-game.js +1 -1
  6. package/dist/evaluation/capability.d.ts +1 -1
  7. package/dist/evaluation/extract.js +1 -1
  8. package/dist/evaluation/match-operation.js +1 -1
  9. package/dist/extensions/industry-pack.d.ts +3 -2
  10. package/dist/extensions/industry-pack.js +1 -1
  11. package/dist/extensions/modes.js +1 -1
  12. package/dist/extensions/registry.js +1 -1
  13. package/dist/extensions/types.d.ts +1 -0
  14. package/dist/graph/onchain/analyze.js +1 -1
  15. package/dist/graph/onchain/analyze.spec.js +1 -1
  16. package/dist/graph/onchain/edge-schema.js +1 -1
  17. package/dist/graph/onchain/extract.js +1 -1
  18. package/dist/graph/onchain/field-manifest.js +1 -1
  19. package/dist/graph/onchain/project-relationship.js +1 -1
  20. package/dist/graph/onchain/types.d.ts +1 -1
  21. package/dist/harness/recover.js +1 -1
  22. package/dist/keeper/KeeperScan.d.ts +2 -1
  23. package/dist/keeper/KeeperScan.js +1 -1
  24. package/dist/keeper/detectors.d.ts +9 -0
  25. package/dist/keeper/detectors.js +1 -1
  26. package/dist/keeper/keeper.spec.js +1 -1
  27. package/dist/keeper/types.d.ts +1 -1
  28. package/dist/keeper/types.js +1 -1
  29. package/dist/knowledge/allocation-ledger.d.ts +4 -1
  30. package/dist/knowledge/allocation-ledger.js +1 -1
  31. package/dist/knowledge/allocation-puzzle.d.ts +2 -0
  32. package/dist/knowledge/allocation-puzzle.js +1 -1
  33. package/dist/knowledge/allocation-risk.d.ts +1 -1
  34. package/dist/knowledge/allocation-risk.js +1 -1
  35. package/dist/knowledge/arb-risk.d.ts +3 -1
  36. package/dist/knowledge/arb-risk.js +1 -1
  37. package/dist/knowledge/arbitration-ledger.js +1 -1
  38. package/dist/knowledge/arbitration-risk.js +1 -1
  39. package/dist/knowledge/arbitration-templates.d.ts +1 -0
  40. package/dist/knowledge/arbitration-templates.js +1 -1
  41. package/dist/knowledge/audit-rules.d.ts +13 -2
  42. package/dist/knowledge/audit-rules.js +1 -1
  43. package/dist/knowledge/baselines/rules/allocation.json +50 -1
  44. package/dist/knowledge/baselines/rules/arb.json +20 -1
  45. package/dist/knowledge/baselines/rules/arbitration.json +27 -0
  46. package/dist/knowledge/baselines/rules/guard.json +75 -2
  47. package/dist/knowledge/baselines/rules/machine.json +38 -13
  48. package/dist/knowledge/baselines/rules/order.json +2 -2
  49. package/dist/knowledge/builtin-templates.d.ts +3 -1
  50. package/dist/knowledge/builtin-templates.js +1 -1
  51. package/dist/knowledge/event-semantics.js +1 -1
  52. package/dist/knowledge/fund-layer.js +1 -1
  53. package/dist/knowledge/getting-started.js +1 -1
  54. package/dist/knowledge/guard-anchor-reach.d.ts +19 -0
  55. package/dist/knowledge/guard-anchor-reach.js +1 -0
  56. package/dist/knowledge/guard-bindings.js +1 -1
  57. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  58. package/dist/knowledge/guard-design-patterns.js +1 -1
  59. package/dist/knowledge/guard-ledger.js +1 -1
  60. package/dist/knowledge/guard-lint.js +1 -1
  61. package/dist/knowledge/guard-render.d.ts +6 -0
  62. package/dist/knowledge/guard-render.js +1 -1
  63. package/dist/knowledge/guard-risk.js +1 -1
  64. package/dist/knowledge/guard-submission-prompt.d.ts +6 -0
  65. package/dist/knowledge/guard-submission-prompt.js +1 -1
  66. package/dist/knowledge/guard-templates.d.ts +1 -1
  67. package/dist/knowledge/guard-templates.js +1 -1
  68. package/dist/knowledge/index.d.ts +4 -4
  69. package/dist/knowledge/index.js +1 -1
  70. package/dist/knowledge/industry-generalizer.js +1 -1
  71. package/dist/knowledge/industry-registry.d.ts +1 -1
  72. package/dist/knowledge/industry-registry.js +1 -1
  73. package/dist/knowledge/jsonrpc-enum.js +1 -1
  74. package/dist/knowledge/machine-ledger.js +1 -1
  75. package/dist/knowledge/machine-risk.js +1 -1
  76. package/dist/knowledge/machine-templates.js +1 -1
  77. package/dist/knowledge/order-ledger.js +1 -1
  78. package/dist/knowledge/order-templates.js +1 -1
  79. package/dist/knowledge/permission-ledger.js +1 -1
  80. package/dist/knowledge/release-sentinel.d.ts +12 -0
  81. package/dist/knowledge/release-sentinel.js +1 -0
  82. package/dist/knowledge/repository-write-semantics.d.ts +27 -0
  83. package/dist/knowledge/repository-write-semantics.js +1 -0
  84. package/dist/knowledge/rule-node-analyzers.d.ts +6 -0
  85. package/dist/knowledge/rule-node-analyzers.js +1 -1
  86. package/dist/knowledge/safety-rules.d.ts +5 -1
  87. package/dist/knowledge/safety-rules.js +1 -1
  88. package/dist/knowledge/scenario-modes.d.ts +10 -1
  89. package/dist/knowledge/scenario-modes.js +1 -1
  90. package/dist/knowledge/service-allocation-semantics.d.ts +36 -0
  91. package/dist/knowledge/service-allocation-semantics.js +1 -0
  92. package/dist/knowledge/strategy-manuals.d.ts +3 -5
  93. package/dist/knowledge/strategy-manuals.js +1 -1
  94. package/dist/knowledge/template-loader.d.ts +28 -12
  95. package/dist/knowledge/template-loader.js +1 -1
  96. package/dist/knowledge/template-registry.js +1 -1
  97. package/dist/knowledge/template-scanner.js +1 -1
  98. package/dist/knowledge/tools-reference.js +1 -1
  99. package/dist/knowledge/workflow-guidance.d.ts +26 -0
  100. package/dist/knowledge/workflow-guidance.js +1 -1
  101. package/dist/monitor/MonitorLoop.js +1 -1
  102. package/dist/participation/allocation-advice.d.ts +38 -0
  103. package/dist/participation/allocation-advice.js +1 -0
  104. package/dist/participation/radar-core.d.ts +2 -0
  105. package/dist/persona/types.d.ts +3 -2
  106. package/dist/persona/types.js +1 -1
  107. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  108. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  109. package/dist/playbooks/service-build/merchant-guide.d.ts +70 -63
  110. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  111. package/dist/playbooks/service-build/migration-planner.js +1 -1
  112. package/dist/playbooks/service-build/mode-actions.d.ts +5 -0
  113. package/dist/playbooks/service-build/mode-actions.js +1 -1
  114. package/dist/playbooks/service-build/participation-radar.js +1 -1
  115. package/dist/playbooks/service-build/semantic-graph.d.ts +1 -0
  116. package/dist/playbooks/service-build/semantic-graph.js +1 -1
  117. package/dist/playbooks/service-build/service-quote.d.ts +2 -0
  118. package/dist/playbooks/service-build/service-quote.js +1 -0
  119. package/dist/relationship/derivation.d.ts +1 -1
  120. package/dist/safety/confirm-gate.js +1 -1
  121. package/dist/schema/benchmark-migration/index.d.ts +30 -8
  122. package/dist/schema/benchmark-migration/index.js +1 -1
  123. package/dist/schema/call/allocation.d.ts +6 -3
  124. package/dist/schema/call/arbitration.js +1 -1
  125. package/dist/schema/call/base.d.ts +4 -0
  126. package/dist/schema/call/base.js +1 -1
  127. package/dist/schema/call/bridge.d.ts +1 -0
  128. package/dist/schema/call/error-codes.d.ts +1 -1
  129. package/dist/schema/call/error-codes.js +1 -1
  130. package/dist/schema/call/guard.d.ts +8 -8
  131. package/dist/schema/call/machine.d.ts +56 -0
  132. package/dist/schema/call/machine.js +1 -1
  133. package/dist/schema/call/order.js +1 -1
  134. package/dist/schema/call/payment.js +1 -1
  135. package/dist/schema/call/semantic.js +1 -1
  136. package/dist/schema/call/service.d.ts +84 -22
  137. package/dist/schema/call/service.js +1 -1
  138. package/dist/schema/common/index.js +1 -1
  139. package/dist/schema/common/tokentype-short-probe.spec.js +1 -0
  140. package/dist/schema/evaluation/index.d.ts +8 -80
  141. package/dist/schema/evaluation/index.js +1 -1
  142. package/dist/schema/goal/index.d.ts +9 -42
  143. package/dist/schema/goal/planning.d.ts +25 -60
  144. package/dist/schema/goal/planning.js +1 -1
  145. package/dist/schema/intent-radar/index.d.ts +2 -20
  146. package/dist/schema/intent-radar/index.js +1 -1
  147. package/dist/schema/interaction/index.d.ts +1 -1
  148. package/dist/schema/keeper/index.d.ts +3 -0
  149. package/dist/schema/keeper/index.js +1 -1
  150. package/dist/schema/local/index.d.ts +8 -0
  151. package/dist/schema/local/index.js +1 -1
  152. package/dist/schema/local/wip.d.ts +73 -0
  153. package/dist/schema/local/wip.js +1 -1
  154. package/dist/schema/operations.d.ts +92 -14
  155. package/dist/schema/operations.js +1 -1
  156. package/dist/schema/persona/index.d.ts +279 -384
  157. package/dist/schema/persona/index.js +1 -1
  158. package/dist/schema/query/bi.d.ts +149 -10
  159. package/dist/schema/query/bi.js +1 -1
  160. package/dist/schema/query/index.d.ts +38 -19
  161. package/dist/schema/query/index.js +1 -1
  162. package/dist/schema/schema-query/index.d.ts +4 -4
  163. package/dist/schema/schema-version.js +1 -1
  164. package/dist/schema/watch/index.d.ts +2 -2
  165. package/dist/schema-query-impl/index.d.ts +1 -0
  166. package/dist/schema-query-impl/index.js +1 -1
  167. package/dist/schemas/account_operation.output.json +3 -2
  168. package/dist/schemas/benchmark_migration_operation.output.json +116 -2
  169. package/dist/schemas/benchmark_migration_operation.schema.json +2 -10
  170. package/dist/schemas/bridge_operation.output.json +3 -2
  171. package/dist/schemas/evaluation_operation.schema.json +7 -70
  172. package/dist/schemas/goal_operation.schema.json +6 -39
  173. package/dist/schemas/index.json +1 -1
  174. package/dist/schemas/intent_radar.output.json +4 -20
  175. package/dist/schemas/keeper_operation.output.json +2 -2
  176. package/dist/schemas/keeper_operation.schema.json +9 -4
  177. package/dist/schemas/local_history_operation.output.json +3 -2
  178. package/dist/schemas/local_info_operation.output.json +3 -2
  179. package/dist/schemas/local_mark_operation.output.json +3 -2
  180. package/dist/schemas/messenger_operation.output.json +2 -2
  181. package/dist/schemas/monitor_events.output.json +2 -2
  182. package/dist/schemas/monitor_subscription.output.json +2 -2
  183. package/dist/schemas/onchain_events.output.json +2 -2
  184. package/dist/schemas/onchain_operations.output.json +7 -6
  185. package/dist/schemas/onchain_operations.schema.json +227 -54
  186. package/dist/schemas/onchain_operations_allocation.schema.json +11 -10
  187. package/dist/schemas/onchain_operations_arbitration.schema.json +13 -13
  188. package/dist/schemas/onchain_operations_machine.schema.json +27 -5
  189. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  190. package/dist/schemas/onchain_operations_payment.schema.json +2 -2
  191. package/dist/schemas/onchain_operations_reward.schema.json +1 -1
  192. package/dist/schemas/onchain_operations_service.schema.json +171 -21
  193. package/dist/schemas/onchain_operations_treasury.schema.json +1 -1
  194. package/dist/schemas/onchain_table_data.output.json +57 -4
  195. package/dist/schemas/persona_operation.output.json +11 -88
  196. package/dist/schemas/persona_operation.schema.json +4 -32
  197. package/dist/schemas/query_toolkit.output.json +320 -22
  198. package/dist/schemas/query_toolkit.schema.json +53 -0
  199. package/dist/schemas/wip_file.output.json +221 -0
  200. package/dist/schemas/wip_file.schema.json +125 -0
  201. package/dist/tools/handlers/benchmark-migration.js +1 -1
  202. package/dist/tools/handlers/config.js +1 -1
  203. package/dist/tools/handlers/dispatch-expectations.spec.js +1 -1
  204. package/dist/tools/handlers/keeper.d.ts +1 -1
  205. package/dist/tools/handlers/onchain.js +1 -1
  206. package/dist/tools/handlers/query.js +1 -1
  207. package/dist/tools/handlers/schema-query.js +1 -1
  208. package/dist/tools/handlers/wip-upload.d.ts +22 -0
  209. package/dist/tools/handlers/wip-upload.js +1 -0
  210. package/dist/tools/handlers/wip.js +1 -1
  211. package/dist/tools/index.js +1 -1
  212. package/dist/tools/move-fn-index.gen.js +1 -1
  213. package/dist/tools/registry/business.js +1 -1
  214. package/dist/tools/registry/files.js +1 -1
  215. package/dist/tools/wip-deploy-assist.js +1 -1
  216. package/dist/tools/wrap.js +1 -1
  217. package/package.json +2 -2
  218. package/dist/knowledge/alloc-audit-policy.spec.js +0 -1
  219. package/dist/knowledge/event-semantics.spec.d.ts +0 -1
  220. package/dist/knowledge/event-semantics.spec.js +0 -1
  221. package/dist/knowledge/facts-sync.spec.d.ts +0 -1
  222. package/dist/knowledge/facts-sync.spec.js +0 -1
  223. package/dist/knowledge/guard-design-patterns.spec.d.ts +0 -1
  224. package/dist/knowledge/guard-design-patterns.spec.js +0 -1
  225. package/dist/knowledge/guard-eval.spec.d.ts +0 -1
  226. package/dist/knowledge/guard-eval.spec.js +0 -1
  227. package/dist/knowledge/rule-node-analyzers.spec.d.ts +0 -1
  228. package/dist/knowledge/rule-node-analyzers.spec.js +0 -1
  229. package/dist/knowledge/safety-rules.extract-amount.spec.d.ts +0 -1
  230. package/dist/knowledge/safety-rules.extract-amount.spec.js +0 -1
  231. package/dist/knowledge/template-loader.spec.d.ts +0 -1
  232. package/dist/knowledge/template-loader.spec.js +0 -1
  233. package/dist/knowledge/template-scanner.spec.d.ts +0 -1
  234. package/dist/knowledge/template-scanner.spec.js +0 -1
  235. /package/dist/{knowledge/alloc-audit-policy.spec.d.ts → schema/common/tokentype-short-probe.spec.d.ts} +0 -0
@@ -13,9 +13,9 @@ export declare const ExposurePartyDataSchema: z.ZodObject<{
13
13
  supplier: "supplier";
14
14
  collaborator: "collaborator";
15
15
  arbitrator: "arbitrator";
16
- neutral: "neutral";
17
- system: "system";
18
16
  buyer: "buyer";
17
+ system: "system";
18
+ neutral: "neutral";
19
19
  }>;
20
20
  basis: z.ZodString;
21
21
  }, z.core.$strict>;
@@ -25,14 +25,14 @@ export declare const GainPathDataSchema: z.ZodObject<{
25
25
  supplier: "supplier";
26
26
  collaborator: "collaborator";
27
27
  arbitrator: "arbitrator";
28
- neutral: "neutral";
29
- system: "system";
30
28
  buyer: "buyer";
29
+ system: "system";
30
+ neutral: "neutral";
31
31
  }>;
32
32
  path: z.ZodString;
33
33
  viability: z.ZodUnion<readonly [z.ZodEnum<{
34
- conditional: "conditional";
35
34
  viable: "viable";
35
+ conditional: "conditional";
36
36
  blocked: "blocked";
37
37
  unverifiable: "unverifiable";
38
38
  }>, z.ZodString]>;
@@ -45,9 +45,9 @@ export declare const ExposureFragmentSchema: z.ZodObject<{
45
45
  supplier: "supplier";
46
46
  collaborator: "collaborator";
47
47
  arbitrator: "arbitrator";
48
- neutral: "neutral";
49
- system: "system";
50
48
  buyer: "buyer";
49
+ system: "system";
50
+ neutral: "neutral";
51
51
  }>;
52
52
  basis: z.ZodString;
53
53
  }, z.core.$strict>>;
@@ -57,14 +57,14 @@ export declare const ExposureFragmentSchema: z.ZodObject<{
57
57
  supplier: "supplier";
58
58
  collaborator: "collaborator";
59
59
  arbitrator: "arbitrator";
60
- neutral: "neutral";
61
- system: "system";
62
60
  buyer: "buyer";
61
+ system: "system";
62
+ neutral: "neutral";
63
63
  }>;
64
64
  path: z.ZodString;
65
65
  viability: z.ZodUnion<readonly [z.ZodEnum<{
66
- conditional: "conditional";
67
66
  viable: "viable";
67
+ conditional: "conditional";
68
68
  blocked: "blocked";
69
69
  unverifiable: "unverifiable";
70
70
  }>, z.ZodString]>;
@@ -394,9 +394,9 @@ export declare const RulesSectionSchema: z.ZodObject<{
394
394
  supplier: "supplier";
395
395
  collaborator: "collaborator";
396
396
  arbitrator: "arbitrator";
397
- neutral: "neutral";
398
- system: "system";
399
397
  buyer: "buyer";
398
+ system: "system";
399
+ neutral: "neutral";
400
400
  }>;
401
401
  basis: z.ZodString;
402
402
  }, z.core.$strict>>;
@@ -406,14 +406,14 @@ export declare const RulesSectionSchema: z.ZodObject<{
406
406
  supplier: "supplier";
407
407
  collaborator: "collaborator";
408
408
  arbitrator: "arbitrator";
409
- neutral: "neutral";
410
- system: "system";
411
409
  buyer: "buyer";
410
+ system: "system";
411
+ neutral: "neutral";
412
412
  }>;
413
413
  path: z.ZodString;
414
414
  viability: z.ZodUnion<readonly [z.ZodEnum<{
415
- conditional: "conditional";
416
415
  viable: "viable";
416
+ conditional: "conditional";
417
417
  blocked: "blocked";
418
418
  unverifiable: "unverifiable";
419
419
  }>, z.ZodString]>;
@@ -451,9 +451,9 @@ export declare const RulesSectionInputSchema: z.ZodObject<{
451
451
  supplier: "supplier";
452
452
  collaborator: "collaborator";
453
453
  arbitrator: "arbitrator";
454
- neutral: "neutral";
455
- system: "system";
456
454
  buyer: "buyer";
455
+ system: "system";
456
+ neutral: "neutral";
457
457
  }>;
458
458
  basis: z.ZodString;
459
459
  }, z.core.$strict>>;
@@ -463,14 +463,14 @@ export declare const RulesSectionInputSchema: z.ZodObject<{
463
463
  supplier: "supplier";
464
464
  collaborator: "collaborator";
465
465
  arbitrator: "arbitrator";
466
- neutral: "neutral";
467
- system: "system";
468
466
  buyer: "buyer";
467
+ system: "system";
468
+ neutral: "neutral";
469
469
  }>;
470
470
  path: z.ZodString;
471
471
  viability: z.ZodUnion<readonly [z.ZodEnum<{
472
- conditional: "conditional";
473
472
  viable: "viable";
473
+ conditional: "conditional";
474
474
  blocked: "blocked";
475
475
  unverifiable: "unverifiable";
476
476
  }>, z.ZodString]>;
@@ -670,9 +670,9 @@ export declare const JudgmentDocSchema: z.ZodObject<{
670
670
  supplier: "supplier";
671
671
  collaborator: "collaborator";
672
672
  arbitrator: "arbitrator";
673
- neutral: "neutral";
674
- system: "system";
675
673
  buyer: "buyer";
674
+ system: "system";
675
+ neutral: "neutral";
676
676
  }>;
677
677
  basis: z.ZodString;
678
678
  }, z.core.$strict>>;
@@ -682,14 +682,14 @@ export declare const JudgmentDocSchema: z.ZodObject<{
682
682
  supplier: "supplier";
683
683
  collaborator: "collaborator";
684
684
  arbitrator: "arbitrator";
685
- neutral: "neutral";
686
- system: "system";
687
685
  buyer: "buyer";
686
+ system: "system";
687
+ neutral: "neutral";
688
688
  }>;
689
689
  path: z.ZodString;
690
690
  viability: z.ZodUnion<readonly [z.ZodEnum<{
691
- conditional: "conditional";
692
691
  viable: "viable";
692
+ conditional: "conditional";
693
693
  blocked: "blocked";
694
694
  unverifiable: "unverifiable";
695
695
  }>, z.ZodString]>;
@@ -884,9 +884,9 @@ export declare const JudgmentDocInputSchema: z.ZodObject<{
884
884
  supplier: "supplier";
885
885
  collaborator: "collaborator";
886
886
  arbitrator: "arbitrator";
887
- neutral: "neutral";
888
- system: "system";
889
887
  buyer: "buyer";
888
+ system: "system";
889
+ neutral: "neutral";
890
890
  }>;
891
891
  basis: z.ZodString;
892
892
  }, z.core.$strict>>;
@@ -896,14 +896,14 @@ export declare const JudgmentDocInputSchema: z.ZodObject<{
896
896
  supplier: "supplier";
897
897
  collaborator: "collaborator";
898
898
  arbitrator: "arbitrator";
899
- neutral: "neutral";
900
- system: "system";
901
899
  buyer: "buyer";
900
+ system: "system";
901
+ neutral: "neutral";
902
902
  }>;
903
903
  path: z.ZodString;
904
904
  viability: z.ZodUnion<readonly [z.ZodEnum<{
905
- conditional: "conditional";
906
905
  viable: "viable";
906
+ conditional: "conditional";
907
907
  blocked: "blocked";
908
908
  unverifiable: "unverifiable";
909
909
  }>, z.ZodString]>;
@@ -980,9 +980,9 @@ export declare const JudgmentFragmentSchema: z.ZodObject<{
980
980
  supplier: "supplier";
981
981
  collaborator: "collaborator";
982
982
  arbitrator: "arbitrator";
983
- neutral: "neutral";
984
- system: "system";
985
983
  buyer: "buyer";
984
+ system: "system";
985
+ neutral: "neutral";
986
986
  }>;
987
987
  basis: z.ZodString;
988
988
  }, z.core.$strict>>;
@@ -992,14 +992,14 @@ export declare const JudgmentFragmentSchema: z.ZodObject<{
992
992
  supplier: "supplier";
993
993
  collaborator: "collaborator";
994
994
  arbitrator: "arbitrator";
995
- neutral: "neutral";
996
- system: "system";
997
995
  buyer: "buyer";
996
+ system: "system";
997
+ neutral: "neutral";
998
998
  }>;
999
999
  path: z.ZodString;
1000
1000
  viability: z.ZodUnion<readonly [z.ZodEnum<{
1001
- conditional: "conditional";
1002
1001
  viable: "viable";
1002
+ conditional: "conditional";
1003
1003
  blocked: "blocked";
1004
1004
  unverifiable: "unverifiable";
1005
1005
  }>, z.ZodString]>;
@@ -36,9 +36,9 @@ export declare const RuleCaseSchema: z.ZodObject<{
36
36
  supplier: "supplier";
37
37
  collaborator: "collaborator";
38
38
  arbitrator: "arbitrator";
39
- neutral: "neutral";
40
- system: "system";
41
39
  buyer: "buyer";
40
+ system: "system";
41
+ neutral: "neutral";
42
42
  }>;
43
43
  basis: z.ZodString;
44
44
  }, z.core.$strict>>;
@@ -48,14 +48,14 @@ export declare const RuleCaseSchema: z.ZodObject<{
48
48
  supplier: "supplier";
49
49
  collaborator: "collaborator";
50
50
  arbitrator: "arbitrator";
51
- neutral: "neutral";
52
- system: "system";
53
51
  buyer: "buyer";
52
+ system: "system";
53
+ neutral: "neutral";
54
54
  }>;
55
55
  path: z.ZodString;
56
56
  viability: z.ZodUnion<readonly [z.ZodEnum<{
57
- conditional: "conditional";
58
57
  viable: "viable";
58
+ conditional: "conditional";
59
59
  blocked: "blocked";
60
60
  unverifiable: "unverifiable";
61
61
  }>, z.ZodString]>;
@@ -84,9 +84,9 @@ export declare const RuleEntrySchema: z.ZodObject<{
84
84
  supplier: "supplier";
85
85
  collaborator: "collaborator";
86
86
  arbitrator: "arbitrator";
87
- neutral: "neutral";
88
- system: "system";
89
87
  buyer: "buyer";
88
+ system: "system";
89
+ neutral: "neutral";
90
90
  }>;
91
91
  basis: z.ZodString;
92
92
  }, z.core.$strict>>;
@@ -96,14 +96,14 @@ export declare const RuleEntrySchema: z.ZodObject<{
96
96
  supplier: "supplier";
97
97
  collaborator: "collaborator";
98
98
  arbitrator: "arbitrator";
99
- neutral: "neutral";
100
- system: "system";
101
99
  buyer: "buyer";
100
+ system: "system";
101
+ neutral: "neutral";
102
102
  }>;
103
103
  path: z.ZodString;
104
104
  viability: z.ZodUnion<readonly [z.ZodEnum<{
105
- conditional: "conditional";
106
105
  viable: "viable";
106
+ conditional: "conditional";
107
107
  blocked: "blocked";
108
108
  unverifiable: "unverifiable";
109
109
  }>, z.ZodString]>;
@@ -137,9 +137,9 @@ export declare const RuleDomainPackSchema: z.ZodObject<{
137
137
  supplier: "supplier";
138
138
  collaborator: "collaborator";
139
139
  arbitrator: "arbitrator";
140
- neutral: "neutral";
141
- system: "system";
142
140
  buyer: "buyer";
141
+ system: "system";
142
+ neutral: "neutral";
143
143
  }>;
144
144
  basis: z.ZodString;
145
145
  }, z.core.$strict>>;
@@ -149,14 +149,14 @@ export declare const RuleDomainPackSchema: z.ZodObject<{
149
149
  supplier: "supplier";
150
150
  collaborator: "collaborator";
151
151
  arbitrator: "arbitrator";
152
- neutral: "neutral";
153
- system: "system";
154
152
  buyer: "buyer";
153
+ system: "system";
154
+ neutral: "neutral";
155
155
  }>;
156
156
  path: z.ZodString;
157
157
  viability: z.ZodUnion<readonly [z.ZodEnum<{
158
- conditional: "conditional";
159
158
  viable: "viable";
159
+ conditional: "conditional";
160
160
  blocked: "blocked";
161
161
  unverifiable: "unverifiable";
162
162
  }>, z.ZodString]>;
@@ -191,9 +191,9 @@ export declare const RuleEntryInputSchema: z.ZodObject<{
191
191
  supplier: "supplier";
192
192
  collaborator: "collaborator";
193
193
  arbitrator: "arbitrator";
194
- neutral: "neutral";
195
- system: "system";
196
194
  buyer: "buyer";
195
+ system: "system";
196
+ neutral: "neutral";
197
197
  }>;
198
198
  basis: z.ZodString;
199
199
  }, z.core.$strict>>;
@@ -203,14 +203,14 @@ export declare const RuleEntryInputSchema: z.ZodObject<{
203
203
  supplier: "supplier";
204
204
  collaborator: "collaborator";
205
205
  arbitrator: "arbitrator";
206
- neutral: "neutral";
207
- system: "system";
208
206
  buyer: "buyer";
207
+ system: "system";
208
+ neutral: "neutral";
209
209
  }>;
210
210
  path: z.ZodString;
211
211
  viability: z.ZodUnion<readonly [z.ZodEnum<{
212
- conditional: "conditional";
213
212
  viable: "viable";
213
+ conditional: "conditional";
214
214
  blocked: "blocked";
215
215
  unverifiable: "unverifiable";
216
216
  }>, z.ZodString]>;
@@ -244,9 +244,9 @@ export declare const RuleDomainPackInputSchema: z.ZodObject<{
244
244
  supplier: "supplier";
245
245
  collaborator: "collaborator";
246
246
  arbitrator: "arbitrator";
247
- neutral: "neutral";
248
- system: "system";
249
247
  buyer: "buyer";
248
+ system: "system";
249
+ neutral: "neutral";
250
250
  }>;
251
251
  basis: z.ZodString;
252
252
  }, z.core.$strict>>;
@@ -256,14 +256,14 @@ export declare const RuleDomainPackInputSchema: z.ZodObject<{
256
256
  supplier: "supplier";
257
257
  collaborator: "collaborator";
258
258
  arbitrator: "arbitrator";
259
- neutral: "neutral";
260
- system: "system";
261
259
  buyer: "buyer";
260
+ system: "system";
261
+ neutral: "neutral";
262
262
  }>;
263
263
  path: z.ZodString;
264
264
  viability: z.ZodUnion<readonly [z.ZodEnum<{
265
- conditional: "conditional";
266
265
  viable: "viable";
266
+ conditional: "conditional";
267
267
  blocked: "blocked";
268
268
  unverifiable: "unverifiable";
269
269
  }>, z.ZodString]>;
@@ -1,7 +1,7 @@
1
1
  import type { UserPreferences } from "./types.js";
2
2
  import { CUSTOMER_INTELLIGENCE_VERSION } from "./types.js";
3
- export type Industry = "freelance" | "rental" | "education" | "travel" | "subscription" | "retail";
4
- export declare const SUPPORTED_INDUSTRIES: Industry[];
3
+ export type Industry = string;
4
+ export declare const SUPPORTED_INDUSTRIES: readonly Industry[];
5
5
  export interface IndustryTemplate {
6
6
  max_acceptable_cycle: number;
7
7
  response_time_expectation: number;
@@ -1 +1 @@
1
- import{getJudgmentDoc}from'../config/judgment.js';import{appetiteMultiplier}from'./game-strategy.js';function arbParams(){return getJudgmentDoc()['game']['arb'];}const ARB_MOVE_SEMANTICS={'Principal_confirming':[{'action':'principal\x20confirm','perspective':'customer','gain':['case_advanced'],'risk':[],'payoff':'confirm\x20the\x20proposition\x20to\x20move\x20to\x20arbitrator\x20confirmation','base_risk':'low'},{'action':'proposition\x20update','perspective':'customer','gain':[],'risk':['case_extended'],'payoff':'modify\x20the\x20proposition\x20before\x20confirming\x20(extends\x20the\x20case)','base_risk':'medium'}],'Arbitrator_confirming':[{'action':'confirm','perspective':'arbitrator','gain':['case_advanced'],'risk':[],'payoff':'confirm\x20to\x20open\x20voting','base_risk':'low'},{'action':'reset','perspective':'arbitrator','gain':[],'risk':['case_extended'],'payoff':'reset\x20back\x20to\x20principal\x20confirmation\x20(extends\x20the\x20case)','base_risk':'high'}],'Voting':[{'action':'vote','perspective':'arbitrator','gain':['case_advanced'],'risk':[],'payoff':'vote\x20before\x20the\x20deadline','base_risk':'low'},{'action':'deadline\x20change','perspective':'arbitrator','gain':[],'risk':['case_extended'],'payoff':'adjust\x20or\x20clear\x20the\x20voting\x20window\x20(prolongs\x20or\x20reopens\x20the\x20case)','base_risk':'medium'}],'Arbitrated':[{'action':'objection','perspective':'customer','gain':['reversal_chance'],'risk':[],'payoff':'object\x20the\x20ruling\x20(only\x20window\x20to\x20overturn)','base_risk':'medium'},{'action':'accept','perspective':'customer','gain':['case_closed'],'risk':['adverse_ruling'],'payoff':'accept\x20and\x20await\x20compensation','base_risk':'low'},{'action':'arb_withdraw','perspective':'all','gain':['fees_received','case_closed'],'risk':[],'payoff':'withdraw\x20the\x20fee\x20balance\x2030\x20days\x20after\x20an\x20uncontested\x20ruling\x20(closes\x20the\x20case)','base_risk':'low'}],'Objectionable':[{'action':'reset','perspective':'arbitrator','gain':['case_advanced'],'risk':['case_extended'],'payoff':'reset\x20to\x20re-review;\x20the\x20ONLY\x20exit\x20—\x20the\x20fee\x20stays\x20escrowed\x20until\x20the\x20principal\x20re-confirms\x20and\x20a\x20new\x20ruling\x20goes\x20unchallenged\x20(protocol\x20141)','base_risk':'medium'}],'Finished':[{'action':'arb_withdraw','perspective':'all','gain':['fees_received','case_closed'],'risk':[],'payoff':'withdraw\x20fees\x20/\x20compensation','base_risk':'low'}],'Withdrawn':[{'action':'done','perspective':'all','gain':['case_closed'],'risk':[],'payoff':'case\x20closed','base_risk':'low'}]};function dedupe(a){return Array['from'](new Set(a));}function resolveArbInterests(a,b){const c=arbParams(),d=c['role_interests'][a]??{'prefer':[],'avoid':[],'sensitivity':0x1},e=d['sensitivity']*appetiteMultiplier(b?.['risk_appetite']),f=[...d['prefer']],g=[...d['avoid']];for(const h of b?.['requirements']??[]){const i=h['toLowerCase'](),j=new RegExp(c['forbid_pattern'],'i')['test'](i);for(const k of c['keyword_rules']){if(k['when_forbidden']!==j)continue;k['keywords']['some'](l=>i['includes'](l['toLowerCase']()))&&(k['anchor']==='prefer'?f:g)['push'](k['effect']);}}return{'prefer':dedupe(f),'avoid':dedupe(g),'sensitivity':e};}function scoreMove(a,b,c){const {scoring:d}=arbParams(),e=resolveArbInterests(b,c),f=a['gain']['filter'](k=>e['prefer']['includes'](k)),g=a['risk']['filter'](k=>e['avoid']['includes'](k)),h=f['length']*d['per_gain'],i=Math['round'](g['length']*d['per_risk']*e['sensitivity']),j=Math['max'](0x0,Math['min'](0x64,d['base']+h-i));return{'favorability':j,'gain_score':h,'risk_score':i};}export function evaluateArbGame(a,b,c){const d=ARB_MOVE_SEMANTICS[a]??[],e=d['filter'](g=>g['perspective']==='all'||g['perspective']===b),f=e['map'](g=>{const h=scoreMove(g,b,c);return{'action':g['action'],'favorability':h['favorability'],'gain_score':h['gain_score'],'risk_score':h['risk_score'],'is_optimal':![],'payoff_note':g['payoff'],'risk':g['base_risk']};})['sort']((g,h)=>h['favorability']-g['favorability']);return f['length']>0x0&&(f[0x0]['is_optimal']=!![]),{'status':a,'perspective':b,'actions':f,'summary':f['length']===0x0?'No\x20recommended\x20moves\x20for\x20'+b+'\x20in\x20status\x20\x27'+a+'\x27':'Optimal\x20for\x20'+b+'\x20in\x20\x27'+a+'\x27:\x20\x27'+f[0x0]['action']+'\x27\x20('+f[0x0]['payoff_note']+')'};}
1
+ import{getJudgmentDoc}from'../config/judgment.js';import{appetiteMultiplier}from'./game-strategy.js';function arbParams(){return getJudgmentDoc()['game']['arb'];}const ARB_MOVE_SEMANTICS={'Principal_confirming':[{'action':'principal\x20confirm','perspective':'customer','gain':['case_advanced'],'risk':[],'payoff':'confirm\x20the\x20proposition\x20to\x20move\x20to\x20arbitrator\x20confirmation','base_risk':'low'},{'action':'proposition\x20update','perspective':'customer','gain':[],'risk':['case_extended'],'payoff':'modify\x20the\x20proposition\x20while\x20in\x20principal-confirming\x20status\x20(reachable\x20only\x20after\x20an\x20arbitrator\x20reset\x20—\x20filing\x20itself\x20lands\x20directly\x20in\x20arbitrator-confirming\x20with\x20the\x20proposition\x20final)','base_risk':'medium'}],'Arbitrator_confirming':[{'action':'confirm','perspective':'arbitrator','gain':['case_advanced'],'risk':[],'payoff':'confirm\x20to\x20open\x20voting','base_risk':'low'},{'action':'reset','perspective':'arbitrator','gain':[],'risk':['case_extended'],'payoff':'reset\x20back\x20to\x20principal\x20confirmation\x20(extends\x20the\x20case)','base_risk':'high'}],'Voting':[{'action':'vote','perspective':'arbitrator','gain':['case_advanced'],'risk':[],'payoff':'vote\x20before\x20the\x20deadline','base_risk':'low'},{'action':'deadline\x20change','perspective':'arbitrator','gain':[],'risk':['case_extended'],'payoff':'adjust\x20or\x20clear\x20the\x20voting\x20window\x20(prolongs\x20or\x20reopens\x20the\x20case)','base_risk':'medium'}],'Arbitrated':[{'action':'objection','perspective':'customer','gain':['reversal_chance'],'risk':[],'payoff':'object\x20the\x20ruling\x20(only\x20window\x20to\x20overturn)','base_risk':'medium'},{'action':'accept','perspective':'customer','gain':['case_closed'],'risk':['adverse_ruling'],'payoff':'accept\x20and\x20await\x20compensation','base_risk':'low'},{'action':'arb_withdraw','perspective':'all','gain':['fees_received','case_closed'],'risk':[],'payoff':'withdraw\x20the\x20fee\x20balance\x2030\x20days\x20after\x20an\x20uncontested\x20ruling\x20(closes\x20the\x20case)','base_risk':'low'}],'Objectionable':[{'action':'reset','perspective':'arbitrator','gain':['case_advanced'],'risk':['case_extended'],'payoff':'reset\x20to\x20re-review;\x20the\x20ONLY\x20exit\x20—\x20the\x20fee\x20stays\x20escrowed\x20until\x20the\x20principal\x20re-confirms\x20and\x20a\x20new\x20ruling\x20goes\x20unchallenged\x20(protocol\x20141)','base_risk':'medium'}],'Finished':[{'action':'arb_withdraw','perspective':'all','gain':['fees_received','case_closed'],'risk':[],'payoff':'withdraw\x20fees\x20/\x20compensation','base_risk':'low'}],'Withdrawn':[{'action':'done','perspective':'all','gain':['case_closed'],'risk':[],'payoff':'case\x20closed','base_risk':'low'}]};function dedupe(a){return Array['from'](new Set(a));}function resolveArbInterests(a,b){const c=arbParams(),d=c['role_interests'][a]??{'prefer':[],'avoid':[],'sensitivity':0x1},e=d['sensitivity']*appetiteMultiplier(b?.['risk_appetite']),f=[...d['prefer']],g=[...d['avoid']];for(const h of b?.['requirements']??[]){const i=h['toLowerCase'](),j=new RegExp(c['forbid_pattern'],'i')['test'](i);for(const k of c['keyword_rules']){if(k['when_forbidden']!==j)continue;k['keywords']['some'](l=>i['includes'](l['toLowerCase']()))&&(k['anchor']==='prefer'?f:g)['push'](k['effect']);}}return{'prefer':dedupe(f),'avoid':dedupe(g),'sensitivity':e};}function scoreMove(a,b,c){const {scoring:d}=arbParams(),e=resolveArbInterests(b,c),f=a['gain']['filter'](k=>e['prefer']['includes'](k)),g=a['risk']['filter'](k=>e['avoid']['includes'](k)),h=f['length']*d['per_gain'],i=Math['round'](g['length']*d['per_risk']*e['sensitivity']),j=Math['max'](0x0,Math['min'](0x64,d['base']+h-i));return{'favorability':j,'gain_score':h,'risk_score':i};}export function evaluateArbGame(a,b,c){const d=ARB_MOVE_SEMANTICS[a]??[],e=d['filter'](g=>g['perspective']==='all'||g['perspective']===b),f=e['map'](g=>{const h=scoreMove(g,b,c);return{'action':g['action'],'favorability':h['favorability'],'gain_score':h['gain_score'],'risk_score':h['risk_score'],'is_optimal':![],'payoff_note':g['payoff'],'risk':g['base_risk']};})['sort']((g,h)=>h['favorability']-g['favorability']);return f['length']>0x0&&(f[0x0]['is_optimal']=!![]),{'status':a,'perspective':b,'actions':f,'summary':f['length']===0x0?'No\x20recommended\x20moves\x20for\x20'+b+'\x20in\x20status\x20\x27'+a+'\x27':'Optimal\x20for\x20'+b+'\x20in\x20\x27'+a+'\x27:\x20\x27'+f[0x0]['action']+'\x27\x20('+f[0x0]['payoff_note']+')'};}
@@ -1,5 +1,5 @@
1
1
  import type { Region } from "./region.js";
2
- export type IndustryScenario = "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general" | "custom";
2
+ export type IndustryScenario = string;
3
3
  export interface WorkflowCapabilities {
4
4
  has_arbitration: boolean;
5
5
  has_refund_path: boolean;
@@ -1 +1 @@
1
- import{parseRegion}from'./region.js';import{findSimilarIndustries,inferTraitsFromDescription}from'../knowledge/industry-generalizer.js';const BUILTIN_SCENARIOS=['freelance','rental','education','travel','subscription','retail'];function enrichFromDescription(a){const b=a?.['trim']();if(!b)return{'industry':'general','industry_confidence':0x0,'tags':[],'keywords':[]};const {traits:c,confidence:d,matched_keywords:e}=inferTraitsFromDescription(b),f=findSimilarIndustries(c,0x3),g=f[0x0],h=g&&BUILTIN_SCENARIOS['includes'](g['industry'])?g['industry']:'general',i=e['length']>0x0||(g?.['similarity']??0x0)>0.2;return{'industry':i?h:'general','industry_confidence':i?Math['max'](d,g?.['similarity']??0x0):0x0,'tags':i?f['slice'](0x0,0x3)['map'](j=>j['industry']):[],'keywords':e};}export function extractServiceCapability(a,b){const c=a['sales']??[],d=c['map'](j=>toBigInt(j['price']))['filter'](j=>j!==undefined),e=a['arbitrations']??[],f=toBigInt(a['compensation_fund'])??0x0n,g=enrichFromDescription(a['description']),h={'has_arbitration':e['length']>0x0,'has_refund_path':e['length']>0x0&&f>0x0n,'has_milestone_nodes':a['machine']!=null,'has_compensation_fund':f>0x0n,'has_wip_verification':c['some'](j=>!!j['wip_hash']),'has_messenger':a['um']!=null,'has_buy_guard':a['buy_guard']!=null,'has_dynamic_pricing':![],'is_published':a['bPublished']===!![],'is_paused':a['bPaused']===!![]},i={'id':a['object'],'kind':'service','owner':a['owner']??'','industry':g['industry'],'industry_confidence':g['industry_confidence'],'region':parseRegion(a['location']),'price_min':d['length']>0x0?minBigInt(d):undefined,'price_max':d['length']>0x0?maxBigInt(d):undefined,'token_type':'','ticket_size':'medium','trust_score':0x32,'reputation_like_ratio':0x1,'arbitration_independent':![],'merchant_history_count':0x0,'capabilities':h,'tags':g['tags'],'keywords':g['keywords']};return{...i,...b};}export function extractDemandCapability(a,b){const c=enrichFromDescription(a['description']),d={'id':a['object'],'kind':'demand','owner':a['owner']??'','industry':c['industry'],'industry_confidence':c['industry_confidence'],'region':parseRegion(a['location']),'price_min':undefined,'price_max':undefined,'token_type':'','ticket_size':'medium','trust_score':0x32,'reputation_like_ratio':0x1,'arbitration_independent':![],'merchant_history_count':0x0,'capabilities':{'has_arbitration':![],'has_refund_path':![],'has_milestone_nodes':![],'has_compensation_fund':![],'has_wip_verification':![],'has_messenger':a['um']!=null,'has_buy_guard':![],'has_dynamic_pricing':![],'is_published':!![],'is_paused':![]},'tags':c['tags'],'keywords':c['keywords']};return{...d,...b};}function toBigInt(a){if(a===undefined||a===null)return undefined;try{return BigInt(a);}catch{return undefined;}}function minBigInt(a){return a['reduce']((c,d)=>c<d?c:d);}function maxBigInt(a){return a['reduce']((c,d)=>c>d?c:d);}
1
+ import{parseRegion}from'./region.js';import{findSimilarIndustries,inferTraitsFromDescription}from'../knowledge/industry-generalizer.js';import{isRegisteredIndustry}from'../knowledge/industry-registry.js';function enrichFromDescription(a){const b=a?.['trim']();if(!b)return{'industry':'general','industry_confidence':0x0,'tags':[],'keywords':[]};const {traits:c,confidence:d,matched_keywords:e}=inferTraitsFromDescription(b),f=findSimilarIndustries(c,0x3),g=f[0x0],h=g&&isRegisteredIndustry(g['industry'])?g['industry']:'general',i=e['length']>0x0||(g?.['similarity']??0x0)>0.2;return{'industry':i?h:'general','industry_confidence':i?Math['max'](d,g?.['similarity']??0x0):0x0,'tags':i?f['slice'](0x0,0x3)['map'](j=>j['industry']):[],'keywords':e};}export function extractServiceCapability(a,b){const c=a['sales']??[],d=c['map'](j=>toBigInt(j['price']))['filter'](j=>j!==undefined),e=a['arbitrations']??[],f=toBigInt(a['compensation_fund'])??0x0n,g=enrichFromDescription(a['description']),h={'has_arbitration':e['length']>0x0,'has_refund_path':e['length']>0x0&&f>0x0n,'has_milestone_nodes':a['machine']!=null,'has_compensation_fund':f>0x0n,'has_wip_verification':c['some'](j=>!!j['wip_hash']),'has_messenger':a['um']!=null,'has_buy_guard':a['buy_guard']!=null,'has_dynamic_pricing':![],'is_published':a['bPublished']===!![],'is_paused':a['bPaused']===!![]},i={'id':a['object'],'kind':'service','owner':a['owner']??'','industry':g['industry'],'industry_confidence':g['industry_confidence'],'region':parseRegion(a['location']),'price_min':d['length']>0x0?minBigInt(d):undefined,'price_max':d['length']>0x0?maxBigInt(d):undefined,'token_type':'','ticket_size':'medium','trust_score':0x32,'reputation_like_ratio':0x1,'arbitration_independent':![],'merchant_history_count':0x0,'capabilities':h,'tags':g['tags'],'keywords':g['keywords']};return{...i,...b};}export function extractDemandCapability(a,b){const c=enrichFromDescription(a['description']),d={'id':a['object'],'kind':'demand','owner':a['owner']??'','industry':c['industry'],'industry_confidence':c['industry_confidence'],'region':parseRegion(a['location']),'price_min':undefined,'price_max':undefined,'token_type':'','ticket_size':'medium','trust_score':0x32,'reputation_like_ratio':0x1,'arbitration_independent':![],'merchant_history_count':0x0,'capabilities':{'has_arbitration':![],'has_refund_path':![],'has_milestone_nodes':![],'has_compensation_fund':![],'has_wip_verification':![],'has_messenger':a['um']!=null,'has_buy_guard':![],'has_dynamic_pricing':![],'is_published':!![],'is_paused':![]},'tags':c['tags'],'keywords':c['keywords']};return{...d,...b};}function toBigInt(a){if(a===undefined||a===null)return undefined;try{return BigInt(a);}catch{return undefined;}}function minBigInt(a){return a['reduce']((c,d)=>c<d?c:d);}function maxBigInt(a){return a['reduce']((c,d)=>c>d?c:d);}
@@ -1 +1 @@
1
- export const OP_DEMAND_PRESENT_SERVICE='demand.present';export const OP_DEMAND_PRESENT_SERVICE_WITH_PASSPORT='demand.present_guarded';export const OP_DEMAND_PUBLISH='demand.publish';export const OP_SERVICE_ORDER_NEW='service.order_new';export function nextOperationForServiceMatch(a,b){return{'operation':b===!![]?OP_DEMAND_PRESENT_SERVICE_WITH_PASSPORT:OP_DEMAND_PRESENT_SERVICE,'operation_type':'demand','preconditions':['Demand\x20is\x20still\x20open\x20(not\x20expired)\x20and\x20this\x20supplier\x20has\x20not\x20already\x20presented.','Service\x20is\x20published\x20and\x20not\x20paused.',b===null?'Verify\x20Demand.guards:\x20if\x20non-empty\x20present\x20through\x20one\x20of\x20them\x20(by_guard\x20from\x20Demand.guards);\x20if\x20empty\x20use\x20plain\x20present.':b?'Select\x20a\x20by_guard\x20present\x20in\x20Demand.guards\x20for\x20the\x20guarded\x20present\x20(guard\x20verification\x20runs\x20at\x20present\x20time).':'Demand.guards\x20is\x20empty\x20→\x20plain\x20present\x20is\x20valid.'],'rationale':'Present\x20this\x20service\x20to\x20demand\x20'+a['object']+';\x20the\x20demander\x20then\x20gives\x20feedback\x20(acceptance_score)\x20and\x20selects\x20→\x20Order\x20via\x20'+OP_SERVICE_ORDER_NEW+'\x20(see\x20nextOperationForServiceOrder).'};}export function nextOperationForDemandMatch(a){return{'operation':OP_DEMAND_PUBLISH,'operation_type':'demand','preconditions':['Service\x20is\x20published\x20and\x20not\x20paused\x20(eligible\x20to\x20be\x20presented\x20into\x20the\x20Demand).','This\x20account\x20holds\x20the\x20Demand\x27s\x20Permission\x20(owner)\x20to\x20publish\x20and\x20later\x20score/select\x20presenters.'],'rationale':'Publish\x20a\x20Demand\x20encoding\x20the\x20requirement\x20so\x20'+a['object']+'\x20(and\x20peers)\x20can\x20present\x20(demand.present*);\x20then\x20feedback\x20(acceptance_score)\x20+\x20select\x20forms\x20the\x20Order\x20via\x20'+OP_SERVICE_ORDER_NEW+'\x20(see\x20nextOperationForServiceOrder).'};}export function nextOperationForServiceOrder(a){return{'operation':OP_SERVICE_ORDER_NEW,'operation_type':'service','preconditions':['Service\x20is\x20published\x20and\x20not\x20paused\x20(E1\x20gate\x20of\x20pre-purchase\x20due\x20diligence).','Pin\x20each\x20sale\x20item\x27s\x20wip_hash\x20in\x20the\x20buy\x20items\x20—\x20prevents\x20WIP\x20swap\x20between\x20viewing\x20and\x20ordering.','If\x20Service.buy_guard\x20is\x20non-empty,\x20obtain\x20a\x20valid\x20passport\x20first\x20(buy\x20requires\x20guard\x20validation).','If\x20Service.customer_required\x20is\x20non-empty,\x20deliver\x20the\x20required\x20info\x20to\x20the\x20Service\x27s\x20Contact\x20via\x20Messenger\x20and\x20attach\x20the\x20Contact\x20/\x20WTS\x20Proof\x20as\x20order_required_info.','If\x20this\x20selection\x20follows\x20a\x20Demand\x20you\x20published\x20with\x20presenters:\x20score\x20the\x20presenters\x20first\x20(demand\x20feedback\x20→\x20acceptance_score)\x20—\x20skipping\x20feedback\x20damages\x20your\x20acceptance_score\x20reputation.','Sufficient\x20balance\x20for\x20the\x20total\x20price\x20plus\x20gas;\x20payment\x20is\x20escrowed\x20in\x20the\x20Order\x20until\x20Allocation\x20settlement.'],'rationale':'Create\x20the\x20Order\x20on\x20the\x20chosen\x20service\x20'+a['object']+'\x20('+OP_SERVICE_ORDER_NEW+')\x20—\x20the\x20transaction-formation\x20step:\x20Order\x20+\x20Progress\x20+\x20Allocation\x20are\x20created\x20atomically,\x20then\x20Progress\x20advances\x20through\x20the\x20Machine\x20and\x20Allocation\x20settles\x20the\x20payment.'};}
1
+ export const OP_DEMAND_PRESENT_SERVICE='demand.present';export const OP_DEMAND_PRESENT_SERVICE_WITH_PASSPORT='demand.present_guarded';export const OP_DEMAND_PUBLISH='demand.publish';export const OP_SERVICE_ORDER_NEW='service.order_new';export function nextOperationForServiceMatch(a,b){return{'operation':b===!![]?OP_DEMAND_PRESENT_SERVICE_WITH_PASSPORT:OP_DEMAND_PRESENT_SERVICE,'operation_type':'demand','preconditions':['Demand\x20is\x20still\x20open\x20(not\x20expired)\x20and\x20this\x20supplier\x20has\x20not\x20already\x20presented.','Service\x20is\x20published\x20and\x20not\x20paused.',b===null?'Verify\x20Demand.guards:\x20if\x20non-empty\x20present\x20through\x20one\x20of\x20them\x20(by_guard\x20from\x20Demand.guards);\x20if\x20empty\x20use\x20plain\x20present.':b?'Select\x20a\x20by_guard\x20present\x20in\x20Demand.guards\x20for\x20the\x20guarded\x20present\x20(guard\x20verification\x20runs\x20at\x20present\x20time).':'Demand.guards\x20is\x20empty\x20→\x20plain\x20present\x20is\x20valid.'],'rationale':'Present\x20this\x20service\x20to\x20demand\x20'+a['object']+';\x20the\x20demander\x20then\x20gives\x20feedback\x20(acceptance_score)\x20and\x20selects\x20→\x20Order\x20via\x20'+OP_SERVICE_ORDER_NEW+'\x20(see\x20nextOperationForServiceOrder).'};}export function nextOperationForDemandMatch(a){return{'operation':OP_DEMAND_PUBLISH,'operation_type':'demand','preconditions':['Service\x20is\x20published\x20and\x20not\x20paused\x20(eligible\x20to\x20be\x20presented\x20into\x20the\x20Demand).','This\x20account\x20holds\x20the\x20Demand\x27s\x20Permission\x20(owner)\x20to\x20publish\x20and\x20later\x20score/select\x20presenters.'],'rationale':'Publish\x20a\x20Demand\x20encoding\x20the\x20requirement\x20so\x20'+a['object']+'\x20(and\x20peers)\x20can\x20present\x20(demand.present*);\x20then\x20feedback\x20(acceptance_score)\x20+\x20select\x20forms\x20the\x20Order\x20via\x20'+OP_SERVICE_ORDER_NEW+'\x20(see\x20nextOperationForServiceOrder).'};}export function nextOperationForServiceOrder(a){return{'operation':OP_SERVICE_ORDER_NEW,'operation_type':'service','preconditions':['Service\x20is\x20published\x20and\x20not\x20paused\x20(E1\x20gate\x20of\x20pre-purchase\x20due\x20diligence).','Pin\x20each\x20sale\x20item\x27s\x20wip_hash\x20in\x20the\x20buy\x20items\x20—\x20prevents\x20WIP\x20swap\x20between\x20viewing\x20and\x20ordering.','If\x20Service.buy_guard\x20is\x20non-empty,\x20obtain\x20a\x20valid\x20passport\x20first\x20(buy\x20requires\x20guard\x20validation).','If\x20Service.customer_required\x20is\x20non-empty,\x20deliver\x20the\x20required\x20info\x20to\x20the\x20merchant\x27s\x20IM\x20user\x20address\x20(resolved\x20from\x20the\x20Service\x27s\x20Contact)\x20via\x20Messenger,\x20then\x20record\x20as\x20order_required_info\x20either\x20that\x20IM\x20address\x20or\x20an\x20on-chain\x20WTS\x20Proof\x20address\x20(embeds\x20the\x20IM\x20address\x20+\x20last-message\x20timestamp;\x20costs\x20gas).','If\x20this\x20selection\x20follows\x20a\x20Demand\x20you\x20published\x20with\x20presenters:\x20score\x20the\x20presenters\x20first\x20(demand\x20feedback\x20→\x20acceptance_score)\x20—\x20skipping\x20feedback\x20damages\x20your\x20acceptance_score\x20reputation.','Sufficient\x20balance\x20for\x20the\x20total\x20price\x20plus\x20gas;\x20payment\x20is\x20escrowed\x20in\x20the\x20Order\x20until\x20Allocation\x20settlement.'],'rationale':'Create\x20the\x20Order\x20on\x20the\x20chosen\x20service\x20'+a['object']+'\x20('+OP_SERVICE_ORDER_NEW+')\x20—\x20the\x20transaction-formation\x20step:\x20Order\x20+\x20Progress\x20+\x20Allocation\x20are\x20created\x20atomically,\x20then\x20Progress\x20advances\x20through\x20the\x20Machine\x20and\x20Allocation\x20settles\x20the\x20payment.'};}
@@ -52,6 +52,7 @@ export interface PackRecord {
52
52
  registered_at: number;
53
53
  }
54
54
  export declare function validatePackManifest(manifest: IndustryPackManifest): PackValidation;
55
+ export declare function ensureIndustryProfile(pack: IndustryPack, errors: string[]): void;
55
56
  export declare function registerIndustryPack(pack: IndustryPack, force?: boolean): PackRegistrationResult;
56
57
  export declare function listRegisteredPacks(): Array<PackRecord & {
57
58
  name: string;
@@ -79,14 +80,14 @@ export declare function scanPacks(dir: string): PackRegistrationResult[];
79
80
  export declare function rescanPack(name: string): PackRegistrationResult;
80
81
  export declare function resolveIndustryPackDir(): string;
81
82
  export declare function scanDefaultIndustryPacks(): PackRegistrationResult[];
82
- export declare function seedBuiltinIndustryTemplates(names?: string[]): string[];
83
+ export declare function seedBuiltinIndustryTemplates(names?: readonly string[]): string[];
83
84
  export interface StrategyManualSeedResult {
84
85
  industry: string;
85
86
  status: "written" | "updated" | "current" | "skipped_user_file" | "skipped_user_modified" | "error";
86
87
  path: string;
87
88
  detail?: string;
88
89
  }
89
- export declare function seedBuiltinStrategyManuals(names?: string[]): StrategyManualSeedResult[];
90
+ export declare function seedBuiltinStrategyManuals(names?: readonly string[]): StrategyManualSeedResult[];
90
91
  export interface ScaffoldResult {
91
92
  ok: boolean;
92
93
  dir: string;