@wowok/agent-mcp 3.3.0 → 3.3.2

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 (167) hide show
  1. package/dist/chain-semantics/field-capability.js +1 -1
  2. package/dist/chain-semantics/freeze-map.js +1 -1
  3. package/dist/chain-semantics/fund-flow.js +1 -1
  4. package/dist/chain-semantics/guard-verbs.js +1 -1
  5. package/dist/chain-semantics/object-graph.js +1 -1
  6. package/dist/composition/audit.d.ts +5 -0
  7. package/dist/composition/audit.js +1 -1
  8. package/dist/composition/blueprint-view.d.ts +0 -1
  9. package/dist/composition/blueprint-view.js +1 -1
  10. package/dist/composition/compile.d.ts +4 -2
  11. package/dist/composition/compile.js +1 -1
  12. package/dist/composition/inflight.d.ts +8 -4
  13. package/dist/composition/inflight.js +1 -1
  14. package/dist/customer/industry-risks.js +1 -1
  15. package/dist/customer/user-preferences.js +1 -1
  16. package/dist/extensions/business-modules.d.ts +7 -2
  17. package/dist/extensions/business-modules.js +1 -1
  18. package/dist/extensions/industry-audit.spec.js +1 -1
  19. package/dist/extensions/industry-pack.d.ts +3 -2
  20. package/dist/extensions/industry-pack.js +1 -1
  21. package/dist/extensions/modes.js +1 -1
  22. package/dist/graph/onchain/project-relationship.js +1 -1
  23. package/dist/knowledge/acquisition-flywheel.js +1 -1
  24. package/dist/knowledge/allocation-ledger.d.ts +4 -1
  25. package/dist/knowledge/allocation-ledger.js +1 -1
  26. package/dist/knowledge/allocation-puzzle.d.ts +1 -0
  27. package/dist/knowledge/allocation-puzzle.js +1 -1
  28. package/dist/knowledge/allocation-risk.d.ts +1 -1
  29. package/dist/knowledge/allocation-risk.js +1 -1
  30. package/dist/knowledge/arb-fund-facts.d.ts +5 -0
  31. package/dist/knowledge/arb-fund-facts.js +1 -1
  32. package/dist/knowledge/audit-rules.d.ts +4 -3
  33. package/dist/knowledge/audit-rules.js +1 -1
  34. package/dist/knowledge/baselines/rules/plan.json +48 -2
  35. package/dist/knowledge/baselines/rules/reward.json +1 -1
  36. package/dist/knowledge/builtin-templates.d.ts +9 -1
  37. package/dist/knowledge/builtin-templates.js +1 -1
  38. package/dist/knowledge/discount-threshold.js +1 -1
  39. package/dist/knowledge/guard-bindings.js +1 -1
  40. package/dist/knowledge/guard-design-patterns.js +1 -1
  41. package/dist/knowledge/guard-field-cognition.js +1 -1
  42. package/dist/knowledge/guard-lint.js +1 -1
  43. package/dist/knowledge/guard-submission-brief.d.ts +5 -0
  44. package/dist/knowledge/guard-submission-brief.js +1 -1
  45. package/dist/knowledge/guard-submission-prompt.d.ts +2 -1
  46. package/dist/knowledge/guard-submission-prompt.js +1 -1
  47. package/dist/knowledge/guard-templates.d.ts +1 -1
  48. package/dist/knowledge/guard-templates.js +1 -1
  49. package/dist/knowledge/industry-generalizer.js +1 -1
  50. package/dist/knowledge/industry-registry.js +1 -1
  51. package/dist/knowledge/industry-strategy.js +1 -1
  52. package/dist/knowledge/reward-ledger.js +1 -1
  53. package/dist/knowledge/reward-puzzle.d.ts +1 -1
  54. package/dist/knowledge/reward-risk.d.ts +1 -1
  55. package/dist/knowledge/scenario-modes.d.ts +2 -2
  56. package/dist/knowledge/scenario-modes.js +1 -1
  57. package/dist/knowledge/scenario-topology.js +1 -1
  58. package/dist/knowledge/strategy-manuals.js +1 -1
  59. package/dist/knowledge/template-index.d.ts +19 -0
  60. package/dist/knowledge/template-index.js +1 -0
  61. package/dist/knowledge/template-loader.d.ts +36 -0
  62. package/dist/knowledge/template-loader.js +1 -1
  63. package/dist/knowledge/template-registry.js +1 -1
  64. package/dist/knowledge/template-scanner.d.ts +7 -0
  65. package/dist/knowledge/template-scanner.js +1 -1
  66. package/dist/knowledge/tool-constraints.js +1 -1
  67. package/dist/knowledge/workflow-guidance.js +1 -1
  68. package/dist/monitor/MonitorLoop.js +1 -1
  69. package/dist/participation/radar-core.d.ts +1 -0
  70. package/dist/participation/radar-core.js +1 -1
  71. package/dist/persona/defaults.js +1 -1
  72. package/dist/persona/topology-focus.js +1 -1
  73. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  74. package/dist/playbooks/service-build/game-theory.d.ts +4 -1
  75. package/dist/playbooks/service-build/game-theory.js +1 -1
  76. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  77. package/dist/playbooks/service-build/merchant-guide.d.ts +25 -1
  78. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  79. package/dist/playbooks/service-build/migration-planner.js +1 -1
  80. package/dist/playbooks/service-build/object-panorama.js +1 -1
  81. package/dist/playbooks/service-build/participation-radar.js +1 -1
  82. package/dist/playbooks/service-build/pipeline-actions.d.ts +4 -1
  83. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  84. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  85. package/dist/playbooks/service-build/service-panorama.d.ts +4 -0
  86. package/dist/playbooks/service-build/service-panorama.js +1 -1
  87. package/dist/playbooks/service-build/service-quote.js +1 -1
  88. package/dist/relationship/derivation.d.ts +1 -1
  89. package/dist/review/index.js +1 -1
  90. package/dist/rules.js +1 -1
  91. package/dist/safety/confirm-gate.js +1 -1
  92. package/dist/schema/benchmark-migration/index.d.ts +35 -0
  93. package/dist/schema/benchmark-migration/index.js +1 -1
  94. package/dist/schema/call/allocation.d.ts +46 -3
  95. package/dist/schema/call/allocation.js +1 -1
  96. package/dist/schema/call/contact.js +1 -1
  97. package/dist/schema/call/guard.js +1 -1
  98. package/dist/schema/call/handler.js +1 -1
  99. package/dist/schema/call/order.js +1 -1
  100. package/dist/schema/call/progress.d.ts +6 -3
  101. package/dist/schema/call/progress.js +1 -1
  102. package/dist/schema/call/repository.js +1 -1
  103. package/dist/schema/call/reward.d.ts +2 -2
  104. package/dist/schema/call/reward.js +1 -1
  105. package/dist/schema/call/semantic.js +1 -1
  106. package/dist/schema/call/service.d.ts +8 -4
  107. package/dist/schema/call/service.js +1 -1
  108. package/dist/schema/common/index.js +1 -1
  109. package/dist/schema/goal/index.d.ts +54 -0
  110. package/dist/schema/goal/planning.d.ts +86 -0
  111. package/dist/schema/goal/planning.js +1 -1
  112. package/dist/schema/local/index.d.ts +39 -0
  113. package/dist/schema/local/index.js +1 -1
  114. package/dist/schema/operations.d.ts +20 -5
  115. package/dist/schema/operations.js +1 -1
  116. package/dist/schema/query/bi.d.ts +2 -0
  117. package/dist/schema/query/bi.js +1 -1
  118. package/dist/schema/query/index.d.ts +24 -12
  119. package/dist/schema/query/index.js +1 -1
  120. package/dist/schema/schema-version.d.ts +1 -1
  121. package/dist/schema/schema-version.js +1 -1
  122. package/dist/schema/workspace/index.d.ts +9 -0
  123. package/dist/schema/workspace/index.js +1 -1
  124. package/dist/schema-query-impl/index.js +1 -1
  125. package/dist/schemas/account_operation.output.json +28 -3
  126. package/dist/schemas/benchmark_migration_operation.schema.json +87 -0
  127. package/dist/schemas/goal_operation.schema.json +94 -0
  128. package/dist/schemas/index.json +1 -1
  129. package/dist/schemas/onchain_operations.output.json +1 -1
  130. package/dist/schemas/onchain_operations.schema.json +409 -119
  131. package/dist/schemas/onchain_operations_allocation.schema.json +290 -6
  132. package/dist/schemas/onchain_operations_arbitration.schema.json +2 -2
  133. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  134. package/dist/schemas/onchain_operations_demand.schema.json +3 -3
  135. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
  136. package/dist/schemas/onchain_operations_guard.schema.json +63 -63
  137. package/dist/schemas/onchain_operations_machine.schema.json +1 -1
  138. package/dist/schemas/onchain_operations_order.schema.json +2 -2
  139. package/dist/schemas/onchain_operations_progress.schema.json +7 -3
  140. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  141. package/dist/schemas/onchain_operations_repository.schema.json +2 -2
  142. package/dist/schemas/onchain_operations_reward.schema.json +8 -8
  143. package/dist/schemas/onchain_operations_service.schema.json +20 -18
  144. package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
  145. package/dist/schemas/query_toolkit.output.json +67 -53
  146. package/dist/schemas/workflow_operation.schema.json +1 -1
  147. package/dist/schemas/workspace_operation.output.json +23 -3
  148. package/dist/schemas/workspace_operation.schema.json +3 -3
  149. package/dist/tools/handlers/benchmark-migration.js +1 -1
  150. package/dist/tools/handlers/config.js +1 -1
  151. package/dist/tools/handlers/file-export.js +1 -1
  152. package/dist/tools/handlers/industry-pack.d.ts +1 -0
  153. package/dist/tools/handlers/industry-pack.js +1 -1
  154. package/dist/tools/handlers/local.js +1 -1
  155. package/dist/tools/handlers/onchain.d.ts +24 -0
  156. package/dist/tools/handlers/onchain.js +1 -1
  157. package/dist/tools/handlers/query.js +1 -1
  158. package/dist/tools/handlers/review-chain.d.ts +1 -1
  159. package/dist/tools/handlers/review-chain.js +1 -1
  160. package/dist/tools/handlers/schema-query.js +1 -1
  161. package/dist/tools/handlers/workflow.js +1 -1
  162. package/dist/tools/handlers/workspace.js +1 -1
  163. package/dist/tools/registry/agent.js +1 -1
  164. package/dist/tools/registry/local.js +1 -1
  165. package/dist/tools/wip-deploy-assist.js +1 -1
  166. package/dist/tools/wrap.js +1 -1
  167. package/package.json +2 -2
@@ -1 +1 @@
1
- import{GUARD_TEMPLATES,fillGuardTemplate}from'./guard-templates.js';import{MACHINE_TEMPLATES,fillTemplate as a268a}from'./machine-templates.js';import{SERVICE_TEMPLATES,fillServiceTemplate}from'./service-templates.js';import{ORDER_TEMPLATES,fillTemplate as a268b}from'./order-templates.js';import{PROGRESS_TEMPLATES,fillProgressTemplate}from'./progress-templates.js';import{ARBITRATION_TEMPLATES,fillTemplate as a268c}from'./arbitration-templates.js';import{TREASURY_TEMPLATES,fillTemplate as a268d}from'./treasury-templates.js';import{PERMISSION_TEMPLATES,fillTemplate as a268e}from'./permission-templates.js';import{PASSPORT_TEMPLATES,fillTemplate as a268f}from'./passport-templates.js';import{ALLOCATION_TEMPLATES,fillTemplate as a268g}from'./allocation-templates.js';import{CONTACT_TEMPLATES,fillTemplate as a268h}from'./contact-templates.js';import{REWARD_TEMPLATES}from'./reward-templates.js';export const TEMPLATE_REGISTRY_VERSION=0x1;export const TEMPLATE_OBJECT_TYPES=['guard','machine','service','order','progress','arbitration','treasury','permission','passport','allocation','reward','contact'];function normalizeParam(a){return{'name':a['name'],'type':a['type'],'description':a['description']??'','required':a['required'],...a['default']!==undefined?{'default':a['default']}:{},...a['constraint']!==undefined?{'constraint':a['constraint']}:{}};}function guardMeta(a){return{'id':a['id'],'object_type':'guard','name':a['name'],'description':a['description'],'scenes':[a['scene_id']],'industries':a['applicable_industries'],'instantiable':!![],'parameters':a['parameters']['map'](b=>normalizeParam(b))};}function machineMeta(a){return{'id':a['id'],'object_type':'machine','name':a['name'],'description':a['description'],'scenes':[a['scene_id']],'industries':a['applicable_industries'],'instantiable':!![],'parameters':a['parameters']['map'](b=>normalizeParam(b))};}function bodyMeta(a,b,c,d){return{'id':a['id'],'object_type':b,'name':a['name'],'description':a['description'],'scenes':c,'industries':d,'instantiable':!![],'parameters':a['params']['map'](e=>normalizeParam(e))};}function rewardMeta(a){return{'id':a['type'],'object_type':'reward','name':a['name'],'description':a['description'],'scenes':[],'industries':[],'instantiable':![],'parameters':a['parameters']['map'](b=>normalizeParam(b))};}let REGISTRY=null,ID_COLLISIONS=[];function buildRegistry(){const a=new Map(),b=[],c=d=>{if(a['has'](d['meta']['id'])){b['push'](d['meta']['id']);return;}a['set'](d['meta']['id'],d);};for(const d of GUARD_TEMPLATES){c({'meta':guardMeta(d),'raw':d,'notes':d['creation_notes']});}for(const e of MACHINE_TEMPLATES){c({'meta':machineMeta(e),'raw':e,'notes':e['creation_notes']});}for(const f of SERVICE_TEMPLATES){c({'meta':bodyMeta(f,'service',f['applicable_scenes'],f['industry_tags']),'raw':f,'notes':f['notes']});}for(const g of ORDER_TEMPLATES){c({'meta':bodyMeta(g,'order',g['applicable_scenes'],g['industry_tags']),'raw':g,'notes':g['notes']});}for(const h of PROGRESS_TEMPLATES){c({'meta':bodyMeta(h,'progress',h['applicable_scenes'],h['industry_tags']),'raw':h,'notes':h['notes']});}for(const i of ARBITRATION_TEMPLATES){c({'meta':bodyMeta(i,'arbitration',i['applicable_scenes'],i['industry_tags']),'raw':i,'notes':i['notes']});}for(const j of TREASURY_TEMPLATES){c({'meta':bodyMeta(j,'treasury',j['applicable_scenes'],j['industry_tags']),'raw':j,'notes':j['notes']});}for(const k of PERMISSION_TEMPLATES){c({'meta':bodyMeta(k,'permission',k['applicable_scenes'],k['industry_tags']),'raw':k,'notes':k['notes']});}for(const l of PASSPORT_TEMPLATES){c({'meta':bodyMeta(l,'passport',l['applicable_scenarios'],l['industry_tags']),'raw':l,'notes':l['notes']});}for(const m of ALLOCATION_TEMPLATES){c({'meta':bodyMeta(m,'allocation',m['applicable_scenes'],m['industry_tags']),'raw':m,'notes':m['notes']});}for(const n of REWARD_TEMPLATES){c({'meta':rewardMeta(n),'raw':n,'guidance':{'guardCondition':n['guardCondition'],'amountRange':n['amountRange'],'allocationStrategy':n['allocationStrategy'],'example':n['example'],'relevantGuardOps':n['relevantGuardOps']}});}for(const o of CONTACT_TEMPLATES){c({'meta':bodyMeta(o,'contact',o['applicable_scenes'],o['industry_tags']),'raw':o,'notes':o['notes']});}return ID_COLLISIONS=b,a;}function registry(){return!REGISTRY&&(REGISTRY=buildRegistry()),REGISTRY;}export function getTemplateIdCollisions(){return registry(),ID_COLLISIONS;}export function getTemplateCounts(){const a=Object['fromEntries'](TEMPLATE_OBJECT_TYPES['map'](b=>[b,0x0]));for(const b of registry()['values']()){a[b['meta']['object_type']]+=0x1;}return a;}export function listTemplates(a){const b=[...registry()['values']()]['map'](c=>c['meta']);return a?b['filter'](c=>c['object_type']===a):b;}export function getTemplateDetail(a){const b=registry()['get'](a);if(!b)return null;return{...b['meta'],'raw':b['raw'],...b['notes']?{'notes':b['notes']}:{},...b['guidance']?{'guidance':b['guidance']}:{}};}export function findTemplateObjectType(a){return registry()['get'](a)?.['meta']['object_type']??null;}export function instantiateTemplate(a,b){const c=registry()['get'](a);if(!c)return{'ok':![],'object_type':null,'template_id':a,'error':'Template\x20not\x20found:\x20'+a+'.\x20Use\x20get_templates\x20without\x20\x27template\x27\x20to\x20list\x20all\x20template\x20ids.'};const d=c['meta']['object_type'];if(!c['meta']['instantiable'])return{'ok':![],'object_type':d,'template_id':a,'error':'Reward\x20templates\x20are\x20guidance-only\x20(prose\x20guard\x20conditions)\x20and\x20cannot\x20be\x20'+'instantiated\x20into\x20executable\x20JSON.\x20Use\x20the\x20guidance\x20payload\x20to\x20design\x20the\x20'+'Reward\x20+\x20Guard\x20manually.','guidance':c['guidance']};switch(d){case'guard':{const e=fillGuardTemplate(a,b);if(!e['ok'])return{'ok':![],'object_type':d,'template_id':a,'error':e['error'],...e['missing']?{'missing_params':e['missing']}:{}};return{'ok':!![],'object_type':d,'template_id':a,'body':{'table':e['table'],'root':e['root']},...c['notes']?{'notes':c['notes']}:{}};}case'machine':{const f=a268a(a,b);if(!f['success'])return{'ok':![],'object_type':d,'template_id':a,'error':f['validation_errors']?.['join'](';\x20')??'Machine\x20template\x20fill\x20failed',...f['missing_params']?{'missing_params':f['missing_params']}:{}};return{'ok':!![],'object_type':d,'template_id':a,'body':{'nodes':f['filled_nodes'],'pairs':f['filled_pairs']},...c['notes']?{'notes':c['notes']}:{}};}case'service':{const g=fillServiceTemplate(a,b);if(!g['ok'])return{'ok':![],'object_type':d,'template_id':a,'error':g['error']??'Service\x20template\x20fill\x20failed',...g['missing_required']?{'missing_params':g['missing_required']}:{}};return{'ok':!![],'object_type':d,'template_id':a,'body':g['body'],...c['notes']?{'notes':c['notes']}:{}};}case'order':case'arbitration':case'treasury':case'permission':case'passport':case'allocation':case'progress':case'contact':{const h=fillBodyTemplate(d,a,b);if(!h['ok'])return{'ok':![],'object_type':d,'template_id':a,'error':h['error']};return{'ok':!![],'object_type':d,'template_id':a,'body':h['body'],...c['notes']?{'notes':c['notes']}:{}};}default:return{'ok':![],'object_type':d,'template_id':a,'error':'Instantiation\x20not\x20supported\x20for\x20object_type\x20\x27'+d+'\x27'};}}function fillBodyTemplate(a,b,c){switch(a){case'order':return a268b(b,c);case'arbitration':return a268c(b,c);case'treasury':return a268d(b,c);case'permission':return a268e(b,c);case'passport':return a268f(b,c);case'allocation':return a268g(b,c);case'progress':return fillProgressTemplate(b,c);case'contact':return a268h(b,c);default:return{'ok':![],'error':'No\x20body-template\x20fill\x20for\x20\x27'+a+'\x27'};}}
1
+ import{GUARD_TEMPLATES,fillGuardTemplate}from'./guard-templates.js';import{MACHINE_TEMPLATES,fillTemplate as a269a}from'./machine-templates.js';import{SERVICE_TEMPLATES,fillServiceTemplate}from'./service-templates.js';import{ORDER_TEMPLATES,fillTemplate as a269b}from'./order-templates.js';import{PROGRESS_TEMPLATES,fillProgressTemplate}from'./progress-templates.js';import{ARBITRATION_TEMPLATES,fillTemplate as a269c}from'./arbitration-templates.js';import{TREASURY_TEMPLATES,fillTemplate as a269d}from'./treasury-templates.js';import{PERMISSION_TEMPLATES,fillTemplate as a269e}from'./permission-templates.js';import{PASSPORT_TEMPLATES,fillTemplate as a269f}from'./passport-templates.js';import{ALLOCATION_TEMPLATES,fillTemplate as a269g}from'./allocation-templates.js';import{CONTACT_TEMPLATES,fillTemplate as a269h}from'./contact-templates.js';import{REWARD_TEMPLATES}from'./reward-templates.js';export const TEMPLATE_REGISTRY_VERSION=0x1;export const TEMPLATE_OBJECT_TYPES=['guard','machine','service','order','progress','arbitration','treasury','permission','passport','allocation','reward','contact'];function normalizeParam(a){return{'name':a['name'],'type':a['type'],'description':a['description']??'','required':a['required'],...a['default']!==undefined?{'default':a['default']}:{},...a['constraint']!==undefined?{'constraint':a['constraint']}:{}};}function guardMeta(a){return{'id':a['id'],'object_type':'guard','name':a['name'],'description':a['description'],'scenes':[a['scene_id']],'industries':a['applicable_industries'],'instantiable':!![],'parameters':a['parameters']['map'](b=>normalizeParam(b))};}function machineMeta(a){return{'id':a['id'],'object_type':'machine','name':a['name'],'description':a['description'],'scenes':[a['scene_id']],'industries':a['applicable_industries'],'instantiable':!![],'parameters':a['parameters']['map'](b=>normalizeParam(b))};}function bodyMeta(a,b,c,d){return{'id':a['id'],'object_type':b,'name':a['name'],'description':a['description'],'scenes':c,'industries':d,'instantiable':!![],'parameters':a['params']['map'](e=>normalizeParam(e))};}function rewardMeta(a){return{'id':a['type'],'object_type':'reward','name':a['name'],'description':a['description'],'scenes':[],'industries':[],'instantiable':![],'parameters':a['parameters']['map'](b=>normalizeParam(b))};}let REGISTRY=null,ID_COLLISIONS=[];function buildRegistry(){const a=new Map(),b=[],c=d=>{if(a['has'](d['meta']['id'])){b['push'](d['meta']['id']);return;}a['set'](d['meta']['id'],d);};for(const d of GUARD_TEMPLATES){c({'meta':guardMeta(d),'raw':d,'notes':d['creation_notes']});}for(const e of MACHINE_TEMPLATES){c({'meta':machineMeta(e),'raw':e,'notes':e['creation_notes']});}for(const f of SERVICE_TEMPLATES){c({'meta':bodyMeta(f,'service',f['applicable_scenes'],f['industry_tags']),'raw':f,'notes':f['notes']});}for(const g of ORDER_TEMPLATES){c({'meta':bodyMeta(g,'order',g['applicable_scenes'],g['industry_tags']),'raw':g,'notes':g['notes']});}for(const h of PROGRESS_TEMPLATES){c({'meta':bodyMeta(h,'progress',h['applicable_scenes'],h['industry_tags']),'raw':h,'notes':h['notes']});}for(const i of ARBITRATION_TEMPLATES){c({'meta':bodyMeta(i,'arbitration',i['applicable_scenes'],i['industry_tags']),'raw':i,'notes':i['notes']});}for(const j of TREASURY_TEMPLATES){c({'meta':bodyMeta(j,'treasury',j['applicable_scenes'],j['industry_tags']),'raw':j,'notes':j['notes']});}for(const k of PERMISSION_TEMPLATES){c({'meta':bodyMeta(k,'permission',k['applicable_scenes'],k['industry_tags']),'raw':k,'notes':k['notes']});}for(const l of PASSPORT_TEMPLATES){c({'meta':bodyMeta(l,'passport',l['applicable_scenarios'],l['industry_tags']),'raw':l,'notes':l['notes']});}for(const m of ALLOCATION_TEMPLATES){c({'meta':bodyMeta(m,'allocation',m['applicable_scenes'],m['industry_tags']),'raw':m,'notes':m['notes']});}for(const n of REWARD_TEMPLATES){c({'meta':rewardMeta(n),'raw':n,'guidance':{'guardCondition':n['guardCondition'],'amountRange':n['amountRange'],'allocationStrategy':n['allocationStrategy'],'example':n['example'],'relevantGuardOps':n['relevantGuardOps']}});}for(const o of CONTACT_TEMPLATES){c({'meta':bodyMeta(o,'contact',o['applicable_scenes'],o['industry_tags']),'raw':o,'notes':o['notes']});}return ID_COLLISIONS=b,a;}function registry(){return!REGISTRY&&(REGISTRY=buildRegistry()),REGISTRY;}export function getTemplateIdCollisions(){return registry(),ID_COLLISIONS;}export function getTemplateCounts(){const a=Object['fromEntries'](TEMPLATE_OBJECT_TYPES['map'](b=>[b,0x0]));for(const b of registry()['values']()){a[b['meta']['object_type']]+=0x1;}return a;}export function listTemplates(a){const b=[...registry()['values']()]['map'](c=>c['meta']);return a?b['filter'](c=>c['object_type']===a):b;}export function getTemplateDetail(a){const b=registry()['get'](a);if(!b)return null;return{...b['meta'],'raw':b['raw'],...b['notes']?{'notes':b['notes']}:{},...b['guidance']?{'guidance':b['guidance']}:{}};}export function findTemplateObjectType(a){return registry()['get'](a)?.['meta']['object_type']??null;}export function instantiateTemplate(a,b){const c=registry()['get'](a);if(!c)return{'ok':![],'object_type':null,'template_id':a,'error':'Template\x20not\x20found:\x20'+a+'.\x20Use\x20get_templates\x20without\x20\x27template\x27\x20to\x20list\x20all\x20template\x20ids.'};const d=c['meta']['object_type'];if(!c['meta']['instantiable'])return{'ok':![],'object_type':d,'template_id':a,'error':'Reward\x20templates\x20are\x20guidance-only\x20(prose\x20guard\x20conditions)\x20and\x20cannot\x20be\x20'+'instantiated\x20into\x20executable\x20JSON.\x20Use\x20the\x20guidance\x20payload\x20to\x20design\x20the\x20'+'Reward\x20+\x20Guard\x20manually.','guidance':c['guidance']};switch(d){case'guard':{const e=fillGuardTemplate(a,b);if(!e['ok'])return{'ok':![],'object_type':d,'template_id':a,'error':e['error'],...e['missing']?{'missing_params':e['missing']}:{}};return{'ok':!![],'object_type':d,'template_id':a,'body':{'table':e['table'],'root':e['root']},...c['notes']?{'notes':c['notes']}:{}};}case'machine':{const f=a269a(a,b);if(!f['success'])return{'ok':![],'object_type':d,'template_id':a,'error':f['validation_errors']?.['join'](';\x20')??'Machine\x20template\x20fill\x20failed',...f['missing_params']?{'missing_params':f['missing_params']}:{}};return{'ok':!![],'object_type':d,'template_id':a,'body':{'nodes':f['filled_nodes'],'pairs':f['filled_pairs']},...c['notes']?{'notes':c['notes']}:{}};}case'service':{const g=fillServiceTemplate(a,b);if(!g['ok'])return{'ok':![],'object_type':d,'template_id':a,'error':g['error']??'Service\x20template\x20fill\x20failed',...g['missing_required']?{'missing_params':g['missing_required']}:{}};return{'ok':!![],'object_type':d,'template_id':a,'body':g['body'],...c['notes']?{'notes':c['notes']}:{}};}case'order':case'arbitration':case'treasury':case'permission':case'passport':case'allocation':case'progress':case'contact':{const h=fillBodyTemplate(d,a,b);if(!h['ok'])return{'ok':![],'object_type':d,'template_id':a,'error':h['error']};return{'ok':!![],'object_type':d,'template_id':a,'body':h['body'],...c['notes']?{'notes':c['notes']}:{}};}default:return{'ok':![],'object_type':d,'template_id':a,'error':'Instantiation\x20not\x20supported\x20for\x20object_type\x20\x27'+d+'\x27'};}}function fillBodyTemplate(a,b,c){switch(a){case'order':return a269b(b,c);case'arbitration':return a269c(b,c);case'treasury':return a269d(b,c);case'permission':return a269e(b,c);case'passport':return a269f(b,c);case'allocation':return a269g(b,c);case'progress':return fillProgressTemplate(b,c);case'contact':return a269h(b,c);default:return{'ok':![],'error':'No\x20body-template\x20fill\x20for\x20\x27'+a+'\x27'};}}
@@ -16,6 +16,12 @@ export interface TemplateScanResult {
16
16
  }
17
17
  export declare function rootHasRewardRecordGate(root: unknown): boolean;
18
18
  export declare function rootHasPositiveAmountLeg(root: unknown): boolean;
19
+ interface RatingKeyRow {
20
+ identifier: number;
21
+ b_submission?: boolean;
22
+ value_type?: string;
23
+ }
24
+ export declare function auditRewardRootRatingKey(root: unknown, table: RatingKeyRow[]): string[];
19
25
  export interface FeeParamLanding {
20
26
  surface: "guard" | "allocator_row" | "time_anchor" | "directive";
21
27
  site: string;
@@ -31,3 +37,4 @@ export declare function buildFeeParamLandingTable(t: IndustryTemplate, fee: Reco
31
37
  landings: FeeParamLanding[];
32
38
  }>;
33
39
  export declare function scanTemplate(t: IndustryTemplate): TemplateScanResult;
40
+ export {};