@wowok/agent-mcp 3.3.5 → 3.3.7

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 (243) hide show
  1. package/dist/chain-semantics/eval-order.d.ts +17 -0
  2. package/dist/chain-semantics/eval-order.js +1 -0
  3. package/dist/chain-semantics/field-capability.js +1 -1
  4. package/dist/chain-semantics/freeze-map.js +1 -1
  5. package/dist/chain-semantics/fund-flow.js +1 -1
  6. package/dist/chain-semantics/guard-verbs.js +1 -1
  7. package/dist/chain-semantics/index.d.ts +1 -0
  8. package/dist/chain-semantics/index.js +1 -1
  9. package/dist/chain-semantics/object-graph.js +1 -1
  10. package/dist/composition/audit.js +1 -1
  11. package/dist/composition/compile.d.ts +2 -1
  12. package/dist/composition/compile.js +1 -1
  13. package/dist/composition/materialize.js +1 -1
  14. package/dist/data/api/api.spec.d.ts +1 -0
  15. package/dist/data/api/api.spec.js +1 -0
  16. package/dist/data/api/cli.d.ts +1 -0
  17. package/dist/data/api/cli.js +1 -0
  18. package/dist/data/api/head.d.ts +16 -0
  19. package/dist/data/api/head.js +1 -0
  20. package/dist/data/api/head.spec.d.ts +1 -0
  21. package/dist/data/api/head.spec.js +1 -0
  22. package/dist/data/api/index.d.ts +2 -0
  23. package/dist/data/api/index.js +1 -0
  24. package/dist/data/api/match.d.ts +69 -0
  25. package/dist/data/api/match.js +1 -0
  26. package/dist/data/api/match.spec.d.ts +1 -0
  27. package/dist/data/api/match.spec.js +1 -0
  28. package/dist/data/api/server.d.ts +12 -0
  29. package/dist/data/api/server.js +1 -0
  30. package/dist/data/projection/cli.d.ts +1 -0
  31. package/dist/data/projection/cli.js +1 -0
  32. package/dist/data/projection/edges.d.ts +8 -0
  33. package/dist/data/projection/edges.js +1 -0
  34. package/dist/data/projection/edges.spec.d.ts +1 -0
  35. package/dist/data/projection/edges.spec.js +1 -0
  36. package/dist/data/projection/facets.d.ts +18 -0
  37. package/dist/data/projection/facets.js +1 -0
  38. package/dist/data/projection/facets.spec.d.ts +1 -0
  39. package/dist/data/projection/facets.spec.js +1 -0
  40. package/dist/data/projection/facts.d.ts +40 -0
  41. package/dist/data/projection/facts.js +1 -0
  42. package/dist/data/projection/index.d.ts +6 -0
  43. package/dist/data/projection/index.js +1 -0
  44. package/dist/data/projection/project.d.ts +10 -0
  45. package/dist/data/projection/project.js +1 -0
  46. package/dist/data/projection/projection.spec.d.ts +1 -0
  47. package/dist/data/projection/projection.spec.js +1 -0
  48. package/dist/data/projection/schema.d.ts +1 -0
  49. package/dist/data/projection/schema.js +1 -0
  50. package/dist/data/projection/store.d.ts +49 -0
  51. package/dist/data/projection/store.js +1 -0
  52. package/dist/data/projection/types.d.ts +137 -0
  53. package/dist/data/projection/types.js +1 -0
  54. package/dist/data/sync/cdc.d.ts +34 -0
  55. package/dist/data/sync/cdc.js +1 -0
  56. package/dist/data/sync/cdc.spec.d.ts +1 -0
  57. package/dist/data/sync/cdc.spec.js +1 -0
  58. package/dist/data/sync/graphql-source.d.ts +16 -0
  59. package/dist/data/sync/graphql-source.js +1 -0
  60. package/dist/data/sync/index.d.ts +5 -0
  61. package/dist/data/sync/index.js +1 -0
  62. package/dist/data/sync/reconciler.d.ts +14 -0
  63. package/dist/data/sync/reconciler.js +1 -0
  64. package/dist/data/sync/reconciler.spec.d.ts +1 -0
  65. package/dist/data/sync/reconciler.spec.js +1 -0
  66. package/dist/data/sync/schema.d.ts +1 -0
  67. package/dist/data/sync/schema.js +1 -0
  68. package/dist/data/sync/store.d.ts +19 -0
  69. package/dist/data/sync/store.js +1 -0
  70. package/dist/data/sync/sync.spec.d.ts +1 -0
  71. package/dist/data/sync/sync.spec.js +1 -0
  72. package/dist/data/sync/synchronizer.d.ts +10 -0
  73. package/dist/data/sync/synchronizer.js +1 -0
  74. package/dist/data/sync/types.d.ts +162 -0
  75. package/dist/data/sync/types.js +1 -0
  76. package/dist/evaluation/builtins/demand-match.js +1 -1
  77. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  78. package/dist/evaluation/capability.d.ts +1 -0
  79. package/dist/evaluation/engine.js +1 -1
  80. package/dist/evaluation/extract.d.ts +7 -1
  81. package/dist/evaluation/extract.js +1 -1
  82. package/dist/evaluation/match-policy.d.ts +142 -0
  83. package/dist/evaluation/match-policy.js +1 -0
  84. package/dist/evaluation/match-policy.spec.d.ts +1 -0
  85. package/dist/evaluation/match-policy.spec.js +1 -0
  86. package/dist/experience/realtime-feedback.js +1 -1
  87. package/dist/extensions/business-modules.js +1 -1
  88. package/dist/graph/onchain/expand.js +1 -1
  89. package/dist/graph/onchain/exposure.js +1 -1
  90. package/dist/harness/recover.js +1 -1
  91. package/dist/intent/types.d.ts +1 -1
  92. package/dist/intent/types.js +1 -1
  93. package/dist/keeper/detectors.d.ts +3 -0
  94. package/dist/keeper/detectors.js +1 -1
  95. package/dist/keeper/keeper.spec.js +1 -1
  96. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  97. package/dist/knowledge/arbitration-ledger.js +1 -1
  98. package/dist/knowledge/audit-rules.js +1 -1
  99. package/dist/knowledge/baselines/rules/plan.json +113 -3
  100. package/dist/knowledge/builtin-templates.d.ts +6 -1
  101. package/dist/knowledge/builtin-templates.js +1 -1
  102. package/dist/knowledge/event-semantics.js +1 -1
  103. package/dist/knowledge/getting-started.js +1 -1
  104. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  105. package/dist/knowledge/guard-design-patterns.js +1 -1
  106. package/dist/knowledge/guard-ledger.js +1 -1
  107. package/dist/knowledge/guard-puzzle.js +1 -1
  108. package/dist/knowledge/guard-render.js +1 -1
  109. package/dist/knowledge/guard-risk.js +1 -1
  110. package/dist/knowledge/guard-templates.d.ts +1 -1
  111. package/dist/knowledge/guard-templates.js +1 -1
  112. package/dist/knowledge/guard-translation.js +1 -1
  113. package/dist/knowledge/index.js +1 -1
  114. package/dist/knowledge/industry-generalizer.d.ts +4 -0
  115. package/dist/knowledge/industry-generalizer.js +1 -1
  116. package/dist/knowledge/industry-registry.js +1 -1
  117. package/dist/knowledge/jsonrpc-enum.d.ts +26 -10
  118. package/dist/knowledge/jsonrpc-enum.js +1 -1
  119. package/dist/knowledge/projection.d.ts +54 -0
  120. package/dist/knowledge/projection.js +1 -0
  121. package/dist/knowledge/projection.spec.d.ts +1 -0
  122. package/dist/knowledge/projection.spec.js +1 -0
  123. package/dist/knowledge/recipient-constraint.d.ts +1 -1
  124. package/dist/knowledge/recipient-constraint.js +1 -1
  125. package/dist/knowledge/semantic-ir.d.ts +113 -0
  126. package/dist/knowledge/semantic-ir.js +1 -0
  127. package/dist/knowledge/service-ledger.d.ts +1 -1
  128. package/dist/knowledge/service-ledger.js +1 -1
  129. package/dist/knowledge/strategy-manuals.js +1 -1
  130. package/dist/knowledge/template-loader.d.ts +34 -0
  131. package/dist/knowledge/template-loader.js +1 -1
  132. package/dist/knowledge/template-prose.d.ts +50 -0
  133. package/dist/knowledge/template-prose.js +1 -0
  134. package/dist/knowledge/template-registry.js +1 -1
  135. package/dist/knowledge/template-scanner.d.ts +1 -1
  136. package/dist/knowledge/template-scanner.js +1 -1
  137. package/dist/knowledge/tools-reference.js +1 -1
  138. package/dist/monitor/MonitorLoop.js +1 -1
  139. package/dist/monitor/normalize.d.ts +1 -1
  140. package/dist/monitor/normalize.js +1 -1
  141. package/dist/monitor/types.js +1 -1
  142. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  143. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  144. package/dist/playbooks/service-build/merchant-guide.d.ts +4 -0
  145. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  146. package/dist/playbooks/service-build/migration-planner.d.ts +2 -1
  147. package/dist/playbooks/service-build/migration-planner.js +1 -1
  148. package/dist/playbooks/service-build/mode-actions.d.ts +7 -0
  149. package/dist/playbooks/service-build/mode-actions.js +1 -1
  150. package/dist/playbooks/service-build/object-panorama.d.ts +22 -1
  151. package/dist/playbooks/service-build/object-panorama.js +1 -1
  152. package/dist/playbooks/service-build/participation-radar.js +1 -1
  153. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  154. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +1 -1
  155. package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
  156. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  157. package/dist/playbooks/service-build/service-panorama.js +1 -1
  158. package/dist/playbooks/service-build/service-quote.js +1 -1
  159. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  160. package/dist/review/index.js +1 -1
  161. package/dist/role/profiles.js +1 -1
  162. package/dist/safety/confirm-gate.js +1 -1
  163. package/dist/schema/benchmark-migration/index.d.ts +64 -10
  164. package/dist/schema/benchmark-migration/index.js +1 -1
  165. package/dist/schema/call/allocation.js +1 -1
  166. package/dist/schema/call/arbitration.js +1 -1
  167. package/dist/schema/call/base.d.ts +8 -0
  168. package/dist/schema/call/bridge.d.ts +2 -0
  169. package/dist/schema/call/error-codes.d.ts +1 -1
  170. package/dist/schema/call/error-codes.js +1 -1
  171. package/dist/schema/call/proof.js +1 -1
  172. package/dist/schema/call/reward.d.ts +10 -0
  173. package/dist/schema/call/reward.js +1 -1
  174. package/dist/schema/call/semantic.js +1 -1
  175. package/dist/schema/call/service.js +1 -1
  176. package/dist/schema/common/index.js +1 -1
  177. package/dist/schema/evaluation/index.d.ts +341 -0
  178. package/dist/schema/evaluation/index.js +1 -1
  179. package/dist/schema/goal/index.d.ts +2 -0
  180. package/dist/schema/goal/planning.d.ts +3 -0
  181. package/dist/schema/goal/planning.js +1 -1
  182. package/dist/schema/industry-pack/index.d.ts +62 -0
  183. package/dist/schema/industry-pack/modes.d.ts +62 -0
  184. package/dist/schema/industry-pack/modes.js +1 -1
  185. package/dist/schema/intent-radar/index.d.ts +3 -0
  186. package/dist/schema/intent-radar/index.js +1 -1
  187. package/dist/schema/local/index.d.ts +20 -0
  188. package/dist/schema/local/index.js +1 -1
  189. package/dist/schema/operations.d.ts +5 -0
  190. package/dist/schema/query/bi.d.ts +4 -0
  191. package/dist/schema/query/bi.js +1 -1
  192. package/dist/schema/query/index.d.ts +145 -47
  193. package/dist/schema/query/index.js +1 -1
  194. package/dist/schema/schema-version.js +1 -1
  195. package/dist/schema-query-impl/index.js +1 -1
  196. package/dist/schemas/account_operation.output.json +2 -0
  197. package/dist/schemas/benchmark_migration_operation.output.json +42 -0
  198. package/dist/schemas/benchmark_migration_operation.schema.json +208 -5
  199. package/dist/schemas/bridge_operation.output.json +2 -0
  200. package/dist/schemas/evaluation_operation.output.json +624 -2
  201. package/dist/schemas/evaluation_operation.schema.json +598 -4
  202. package/dist/schemas/goal_operation.schema.json +18 -10
  203. package/dist/schemas/index.json +1 -1
  204. package/dist/schemas/industry_pack_operation.output.json +86 -2
  205. package/dist/schemas/industry_pack_operation.schema.json +199 -0
  206. package/dist/schemas/intent_radar.output.json +2 -0
  207. package/dist/schemas/intent_radar.schema.json +1 -0
  208. package/dist/schemas/local_cache_operation.output.json +2 -0
  209. package/dist/schemas/local_history_operation.output.json +2 -0
  210. package/dist/schemas/local_info_operation.output.json +2 -0
  211. package/dist/schemas/local_mark_operation.output.json +2 -0
  212. package/dist/schemas/onchain_events.output.json +281 -11
  213. package/dist/schemas/onchain_events.schema.json +5 -1
  214. package/dist/schemas/onchain_operations.output.json +2 -0
  215. package/dist/schemas/onchain_operations.schema.json +914 -314
  216. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  217. package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
  218. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  219. package/dist/schemas/onchain_operations_guard.schema.json +660 -94
  220. package/dist/schemas/onchain_operations_reward.schema.json +35 -1
  221. package/dist/schemas/onchain_operations_service.schema.json +4 -4
  222. package/dist/schemas/query_toolkit.output.json +333 -0
  223. package/dist/tools/handlers/benchmark-migration.d.ts +5 -2
  224. package/dist/tools/handlers/benchmark-migration.js +1 -1
  225. package/dist/tools/handlers/config.js +1 -1
  226. package/dist/tools/handlers/evaluation.js +1 -1
  227. package/dist/tools/handlers/evaluation.spec.js +1 -1
  228. package/dist/tools/handlers/intent-radar.js +1 -1
  229. package/dist/tools/handlers/messenger.d.ts +1 -0
  230. package/dist/tools/handlers/messenger.js +1 -1
  231. package/dist/tools/handlers/onchain.d.ts +2 -0
  232. package/dist/tools/handlers/onchain.js +1 -1
  233. package/dist/tools/handlers/query.js +1 -1
  234. package/dist/tools/handlers/wip.js +1 -1
  235. package/dist/tools/index.js +1 -1
  236. package/dist/tools/registry/agent.js +1 -1
  237. package/dist/tools/registry/business.js +1 -1
  238. package/dist/tools/registry/query.js +1 -1
  239. package/dist/tools/wip-verify-ledger.d.ts +14 -0
  240. package/dist/tools/wip-verify-ledger.js +1 -0
  241. package/dist/tools/wrap.d.ts +4 -0
  242. package/dist/tools/wrap.js +1 -1
  243. package/package.json +7 -2
@@ -0,0 +1,50 @@
1
+ import { z } from "zod";
2
+ import type { IndustryTemplate } from "./template-loader.js";
3
+ export declare const PROSE_LANGUAGES: readonly ["en", "other"];
4
+ export type ProseLanguage = (typeof PROSE_LANGUAGES)[number];
5
+ export declare const PROSE_CLAIM_KEYS: readonly ["review_mode", "refund_rail", "reward_pool", "escrow_release", "independent_arbitration"];
6
+ export type ProseClaimKey = (typeof PROSE_CLAIM_KEYS)[number];
7
+ export declare const REVIEW_MODE_VALUES: readonly ["none", "review", "review_reward"];
8
+ export declare const MachineProseEnvelopeSchema: z.ZodObject<{
9
+ text_en: z.ZodString;
10
+ source_sha256: z.ZodString;
11
+ method: z.ZodEnum<{
12
+ human: "human";
13
+ llm: "llm";
14
+ }>;
15
+ model: z.ZodOptional<z.ZodString>;
16
+ prompt_version: z.ZodOptional<z.ZodString>;
17
+ claims: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
+ key: z.ZodEnum<{
19
+ review_mode: "review_mode";
20
+ refund_rail: "refund_rail";
21
+ reward_pool: "reward_pool";
22
+ escrow_release: "escrow_release";
23
+ independent_arbitration: "independent_arbitration";
24
+ }>;
25
+ value: z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
26
+ review: "review";
27
+ none: "none";
28
+ review_reward: "review_reward";
29
+ }>]>;
30
+ evidence: z.ZodOptional<z.ZodString>;
31
+ }, z.core.$strict>>>;
32
+ }, z.core.$strict>;
33
+ export type MachineProseEnvelope = z.infer<typeof MachineProseEnvelopeSchema>;
34
+ export interface MachineProseField {
35
+ address: string;
36
+ text: string;
37
+ }
38
+ export interface MachineProseFinding {
39
+ rule_id: "R-PROSE-VERIFIABLE-01" | "R-PROSE-CANONICAL-01";
40
+ severity: "high";
41
+ title: string;
42
+ detail: string;
43
+ suggestion: string;
44
+ }
45
+ export declare function proseSourceDigest(text: string): string;
46
+ export declare function machineProseFields(t: IndustryTemplate): MachineProseField[];
47
+ export declare function trustedEnvelopes(t: IndustryTemplate): Map<string, MachineProseEnvelope>;
48
+ export declare function proseClaim(t: IndustryTemplate, address: string, key: ProseClaimKey): boolean | string | undefined;
49
+ export declare function canonicalizeMachineProse(t: IndustryTemplate): IndustryTemplate;
50
+ export declare function machineProseFindings(t: IndustryTemplate): MachineProseFinding[];
@@ -0,0 +1 @@
1
+ import{createHash}from'node:crypto';import{z}from'zod';export const PROSE_LANGUAGES=['en','other'];export const PROSE_CLAIM_KEYS=['review_mode','refund_rail','reward_pool','escrow_release','independent_arbitration'];export const REVIEW_MODE_VALUES=['none','review','review_reward'];const ProseClaimSchema=z['object']({'key':z['enum'](PROSE_CLAIM_KEYS),'value':z['union']([z['boolean'](),z['enum'](REVIEW_MODE_VALUES)]),'evidence':z['string']()['max'](0x190)['optional']()})['strict']();export const MachineProseEnvelopeSchema=z['object']({'text_en':z['string']()['min'](0x1),'source_sha256':z['string']()['regex'](/^[0-9a-f]{64}$/,'source_sha256\x20must\x20be\x20lowercase\x20hex\x20sha256'),'method':z['enum'](['human','llm']),'model':z['string']()['max'](0x78)['optional'](),'prompt_version':z['string']()['max'](0x3c)['optional'](),'claims':z['array'](ProseClaimSchema)['max'](0x8)['optional']()})['strict']();function normalizeText(a){return a['replace'](/\s+/g,'\x20')['trim']();}export function proseSourceDigest(a){return createHash('sha256')['update'](normalizeText(a))['digest']('hex');}export function machineProseFields(a){const b=[];return a['build_notes']['forEach']((c,d)=>b['push']({'address':'build_notes['+d+']','text':c})),b['push']({'address':'allocator.description','text':a['allocator']['description']}),a['trust_mechanisms']['forEach']((c,d)=>b['push']({'address':'trust_mechanisms['+d+']','text':c})),a['guards']['forEach']((c,d)=>b['push']({'address':'guards['+d+'].purpose','text':c['purpose']})),a['machine_shape']['forEach']((c,d)=>b['push']({'address':'machine_shape['+d+'].role','text':c['role']})),b['filter'](c=>typeof c['text']==='string'&&normalizeText(c['text'])['length']>0x0);}const NON_LATIN_SCRIPT_PROBES=[['Han',/\p{Script=Han}/u],['Hiragana',/\p{Script=Hiragana}/u],['Katakana',/\p{Script=Katakana}/u],['Hangul',/\p{Script=Hangul}/u],['Cyrillic',/\p{Script=Cyrillic}/u],['Arabic',/\p{Script=Arabic}/u],['Hebrew',/\p{Script=Hebrew}/u],['Thai',/\p{Script=Thai}/u],['Devanagari',/\p{Script=Devanagari}/u]],ACCENTED_LATIN=/[\u00c0-\u024f\u1e00-\u1e0f\u1e20-\u1e7f]/g,NON_ENGLISH_FUNCTION_WORDS=new Set(['le','les','des','du','une','et','est','pour','avec','sur','dans','par','aux','peut','doit','sont','être','sera','cette','ces','nous','vous','mais','plus','der','die','das','und','ist','nicht','wird','mit','für','von','auf','dem','den','ein','eine','einen','auch','oder','bei','nach','zum','zur','keine','kann','muss']);function nonLatinScripts(a){const b=[];for(const [c,d]of NON_LATIN_SCRIPT_PROBES){if(d['test'](a))b['push'](c);}return b;}function nonEnglishSignals(a){const b=[],c=a['match'](ACCENTED_LATIN)??[];if(c['length']>=0x2)b['push'](c['length']+'\x20accented\x20Latin\x20letters');const d=a['toLowerCase']()['match'](/[a-zà-öø-ÿß]+/g)??[],e=new Set(d['filter'](f=>NON_ENGLISH_FUNCTION_WORDS['has'](f)));return e['size']>=0x2&&b['push']('non-English\x20function\x20words:\x20'+[...e]['slice'](0x0,0x4)['join'](',\x20')),b;}export function trustedEnvelopes(a){const b=new Map(machineProseFields(a)['map'](d=>[d['address'],d['text']])),c=new Map();for(const [d,e]of Object['entries'](a['machine_prose']??{})){const f=MachineProseEnvelopeSchema['safeParse'](e);if(!f['success'])continue;const g=b['get'](d);if(g===undefined)continue;if(proseSourceDigest(g)!==f['data']['source_sha256'])continue;c['set'](d,f['data']);}return c;}export function proseClaim(a,b,c){const d=trustedEnvelopes(a)['get'](b);if(!d)return undefined;const e=(d['claims']??[])['find'](f=>f['key']===c);return e?.['value'];}export function canonicalizeMachineProse(a){const b=trustedEnvelopes(a);if(b['size']===0x0)return a;const c=(d,e)=>b['get'](d)?.['text_en']??e;return{...a,'allocator':{...a['allocator'],'description':c('allocator.description',a['allocator']['description'])},'build_notes':a['build_notes']['map']((d,e)=>c('build_notes['+e+']',d)),'trust_mechanisms':a['trust_mechanisms']['map']((d,e)=>c('trust_mechanisms['+e+']',d)),'guards':a['guards']['map']((d,e)=>({...d,'purpose':c('guards['+e+'].purpose',d['purpose'])})),'machine_shape':a['machine_shape']['map']((d,e)=>({...d,'role':c('machine_shape['+e+'].role',d['role'])}))};}const CLAIM_KEYWORDS={'refund_rail':['refund','money-back','money\x20back'],'reward_pool':['reward','bonus'],'escrow_release':['escrow'],'independent_arbitration':['arbitration','third-party','third\x20party']};function affirmativeClauses(a){return a['split'](/[.;]/)['filter'](b=>!/\b(?:never|no|not|don'?t|cannot|must not|avoid|prohibit\w*|forbid\w*|instead of|rather than|previously|without)\b/i['test'](b))['join']('\x20.\x20');}function mentions(a,b){return b['some'](c=>{const d=c['replace'](/[-/\\^$*+?.()|[\]{}]/g,'\x5c$&')['replace'](/ /g,'\x5cs+');return new RegExp('\x5cb'+d+'(?:s|es|ed|ing)?\x5cb','i')['test'](a);});}const NUMERIC_TOKEN=/-?\d+(?:[.,]\d+)?%?/g,IDENTIFIER_TOKEN=/[a-z][a-z0-9]*(?:[._][a-z0-9]+)+/g;function numericTokens(a){return new Set((a['match'](NUMERIC_TOKEN)??[])['map'](b=>b['replace'](/[,_]/g,'')));}function identifierTokens(a){return new Set((a['match'](IDENTIFIER_TOKEN)??[])['map'](b=>b['toLowerCase']()));}function envelopeIntegrityIssues(a,b){const c=[],d=normalizeText(a['text']),e=normalizeText(b['text_en']),f=d['toLowerCase'](),g=affirmativeClauses(e),h=nonLatinScripts(e);if(h['length']>0x0)c['push'](a['address']+':\x20text_en\x20is\x20not\x20English\x20(non-Latin\x20script:\x20'+h['join'](',\x20')+')');else{const m=nonEnglishSignals(e);m['length']>0x0&&c['push'](a['address']+':\x20text_en\x20is\x20not\x20English\x20('+m['join'](';\x20')+')');}for(const o of b['claims']??[]){const p=o['value']===!![]||o['key']==='review_mode'&&o['value']!=='none';if(!p)continue;const q=o['evidence']?normalizeText(o['evidence']):'';(q['length']===0x0||!f['includes'](q['toLowerCase']()))&&c['push'](a['address']+':\x20claim\x20\x27'+o['key']+'\x27\x20asserts\x20a\x20capability\x20without\x20a\x20verbatim\x20source\x20quote');}const i=numericTokens(d),j=numericTokens(e);for(const r of i){!j['has'](r)&&c['push'](a['address']+':\x20numeric\x20token\x20\x27'+r+'\x27\x20from\x20the\x20source\x20is\x20missing\x20in\x20text_en');}const k=identifierTokens(d),l=identifierTokens(e);for(const s of k){!l['has'](s)&&c['push'](a['address']+':\x20identifier\x20\x27'+s+'\x27\x20from\x20the\x20source\x20is\x20missing\x20in\x20text_en');}for(const [t,u]of Object['entries'](CLAIM_KEYWORDS)){if(!mentions(g,u))continue;const v=(b['claims']??[])['find'](w=>w['key']===t);if(v?.['value']===!![])continue;c['push'](a['address']+':\x20text_en\x20names\x20a\x20\x27'+t+'\x27\x20capability\x20that\x20no\x20claim\x20asserts\x20(over-claim)');}return c;}export function machineProseFindings(a){const b=[],c=machineProseFields(a),d=a['prose_language']??'en',e=a['machine_prose']??{},f=[];for(const i of c){const j=e[i['address']],k=j?'present\x20but\x20not\x20trusted\x20(stale\x20or\x20malformed)':'missing';if(j){const n=MachineProseEnvelopeSchema['safeParse'](j);if(n['success']&&proseSourceDigest(i['text'])===n['data']['source_sha256'])continue;}if(d==='other'){f['push'](i['address']+'\x20(declared\x20non-English;\x20canonical\x20envelope\x20'+k+';\x20'+('expected\x20source_sha256='+proseSourceDigest(i['text'])+')'));continue;}const l=nonLatinScripts(i['text']);if(l['length']>0x0){f['push'](i['address']+'\x20(non-Latin\x20script:\x20'+l['join'](',\x20')+';\x20'+('expected\x20source_sha256='+proseSourceDigest(i['text'])+')'));continue;}const m=nonEnglishSignals(i['text']);m['length']>0x0&&f['push'](i['address']+'\x20('+m['join'](';\x20')+';\x20expected\x20source_sha256='+proseSourceDigest(i['text'])+')');}f['length']>0x0&&b['push']({'rule_id':'R-PROSE-VERIFIABLE-01','severity':'high','title':'Machine-read\x20prose\x20is\x20not\x20verifiable\x20('+f['length']+'\x20field'+(f['length']===0x1?'':'s')+')','detail':'The\x20pre-deploy\x20prose\x20rules\x20are\x20an\x20English\x20lexical\x20canon.\x20These\x20machine-read\x20fields\x20are\x20'+'neither\x20verifiably\x20English\x20nor\x20backed\x20by\x20a\x20frozen\x20canonical\x20English\x20envelope:\x20'+(f['join'](';\x20')+'.\x20Prose\x20the\x20scanner\x20cannot\x20read\x20matches\x20no\x20pattern\x20and\x20would\x20pass\x20')+'as\x20compliant\x20purely\x20by\x20silence.','suggestion':'Either\x20write\x20the\x20machine-read\x20prose\x20in\x20English,\x20or\x20author\x20it\x20in\x20any\x20language\x20and\x20declare\x20'+'prose_language:\x20\x27other\x27\x20with\x20one\x20machine_prose\x20envelope\x20per\x20field\x20'+'({text_en,\x20source_sha256,\x20method,\x20claims})\x20so\x20the\x20scanner\x20reads\x20a\x20frozen\x20English\x20rendering.\x20'+'Each\x20listed\x20field\x20prints\x20its\x20expected\x20source_sha256\x20(sha256\x20of\x20the\x20whitespace-collapsed\x20'+'source)\x20—\x20copy\x20it\x20verbatim\x20into\x20the\x20envelope.\x20'+'This\x20finding\x20blocks\x20template_generate\x20(fail-closed)\x20until\x20the\x20prose\x20is\x20verifiable.'});const g=[],h=new Set(c['map'](o=>o['address']));for(const [o,p]of Object['entries'](e)){const q=MachineProseEnvelopeSchema['safeParse'](p);if(!q['success']){g['push'](o+':\x20envelope\x20does\x20not\x20match\x20the\x20contract\x20('+(q['error']['issues'][0x0]?.['message']??'invalid')+')');continue;}if(!h['has'](o)){g['push'](o+':\x20envelope\x20targets\x20a\x20prose\x20field\x20that\x20does\x20not\x20exist');continue;}const r=c['find'](s=>s['address']===o);if(proseSourceDigest(r['text'])!==q['data']['source_sha256']){g['push'](o+':\x20envelope\x20is\x20stale\x20(source_sha256\x20does\x20not\x20match\x20the\x20current\x20prose;\x20'+('expected\x20source_sha256='+proseSourceDigest(r['text'])+')'));continue;}q['data']['method']==='llm'&&!q['data']['model']&&!q['data']['prompt_version']&&g['push'](o+':\x20llm-normalized\x20envelope\x20carries\x20no\x20model\x20/\x20prompt_version\x20provenance'),g['push'](...envelopeIntegrityIssues(r,q['data']));}if(d==='other')for(const s of c){!e[s['address']]&&g['push'](s['address']+':\x20missing\x20envelope\x20(prose_language=\x27other\x27\x20requires\x20one\x20per\x20non-empty\x20'+('machine-read\x20field;\x20expected\x20source_sha256='+proseSourceDigest(s['text'])+')'));}return g['length']>0x0&&b['push']({'rule_id':'R-PROSE-CANONICAL-01','severity':'high','title':'Canonical\x20prose\x20envelope\x20integrity\x20failure\x20('+g['length']+')','detail':'A\x20canonical\x20envelope\x20must\x20be\x20FROZEN\x20(source_sha256\x20binds\x20the\x20exact\x20prose),\x20must\x20not\x20invent\x20'+'capabilities\x20(asserted\x20claims\x20need\x20a\x20verbatim\x20source\x20quote),\x20must\x20carry\x20numbers\x20and\x20code\x20'+('identifiers\x20verbatim,\x20and\x20must\x20not\x20name\x20a\x20capability\x20its\x20claims\x20deny:\x20'+g['join'](';\x20')+'.'),'suggestion':'Re-normalize\x20the\x20affected\x20field\x20from\x20the\x20CURRENT\x20prose,\x20copy\x20the\x20source\x20quote\x20verbatim\x20into\x20'+'the\x20claim\x20evidence,\x20keep\x20numbers\x20and\x20fee/param\x20identifiers\x20untranslated,\x20and\x20either\x20assert\x20the\x20'+'capability\x20in\x20a\x20claim\x20or\x20remove\x20it\x20from\x20text_en.\x20A\x20stale\x20binding\x20prints\x20the\x20expected\x20'+'source_sha256\x20—\x20copy\x20it\x20verbatim.\x20This\x20finding\x20blocks\x20template_generate\x20(fail-closed).'}),b;}
@@ -1 +1 @@
1
- import{GUARD_TEMPLATES,fillGuardTemplate}from'./guard-templates.js';import{MACHINE_TEMPLATES,fillTemplate as a274a}from'./machine-templates.js';import{SERVICE_TEMPLATES,fillServiceTemplate}from'./service-templates.js';import{ORDER_TEMPLATES,fillTemplate as a274b}from'./order-templates.js';import{PROGRESS_TEMPLATES,fillProgressTemplate}from'./progress-templates.js';import{ARBITRATION_TEMPLATES,fillTemplate as a274c}from'./arbitration-templates.js';import{TREASURY_TEMPLATES,fillTemplate as a274d}from'./treasury-templates.js';import{PERMISSION_TEMPLATES,fillTemplate as a274e}from'./permission-templates.js';import{PASSPORT_TEMPLATES,fillTemplate as a274f}from'./passport-templates.js';import{ALLOCATION_TEMPLATES,fillTemplate as a274g}from'./allocation-templates.js';import{CONTACT_TEMPLATES,fillTemplate as a274h}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=a274a(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 a274b(b,c);case'arbitration':return a274c(b,c);case'treasury':return a274d(b,c);case'permission':return a274e(b,c);case'passport':return a274f(b,c);case'allocation':return a274g(b,c);case'progress':return fillProgressTemplate(b,c);case'contact':return a274h(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 a312a}from'./machine-templates.js';import{SERVICE_TEMPLATES,fillServiceTemplate}from'./service-templates.js';import{ORDER_TEMPLATES,fillTemplate as a312b}from'./order-templates.js';import{PROGRESS_TEMPLATES,fillProgressTemplate}from'./progress-templates.js';import{ARBITRATION_TEMPLATES,fillTemplate as a312c}from'./arbitration-templates.js';import{TREASURY_TEMPLATES,fillTemplate as a312d}from'./treasury-templates.js';import{PERMISSION_TEMPLATES,fillTemplate as a312e}from'./permission-templates.js';import{PASSPORT_TEMPLATES,fillTemplate as a312f}from'./passport-templates.js';import{ALLOCATION_TEMPLATES,fillTemplate as a312g}from'./allocation-templates.js';import{CONTACT_TEMPLATES,fillTemplate as a312h}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=a312a(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 a312b(b,c);case'arbitration':return a312c(b,c);case'treasury':return a312d(b,c);case'permission':return a312e(b,c);case'passport':return a312f(b,c);case'allocation':return a312g(b,c);case'progress':return fillProgressTemplate(b,c);case'contact':return a312h(b,c);default:return{'ok':![],'error':'No\x20body-template\x20fill\x20for\x20\x27'+a+'\x27'};}}
@@ -40,5 +40,5 @@ export declare function buildFeeParamLandingTable(t: IndustryTemplate, fee: Reco
40
40
  split_family: boolean;
41
41
  landings: FeeParamLanding[];
42
42
  }>;
43
- export declare function scanTemplate(t: IndustryTemplate): TemplateScanResult;
43
+ export declare function scanTemplate(raw: IndustryTemplate): TemplateScanResult;
44
44
  export {};