@modality-counter/core 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -433,8 +433,8 @@ purpose: "Defines core behavioral protocols for Counter agent system"`}),`
433
433
  result: "All operations maintain hero style, end with <hero_signature />"
434
434
 
435
435
  activation_execution:
436
- user_request_matching:
437
- flexible_resolution: "Match user requests to available methods."
436
+ user_request_intelligent_matching:
437
+ intelligent_concept: "Match user requests to available agent methods via natural language interpretation."
438
438
  examples:
439
439
  - "User: 'analyze market' \u2192 Execute: *keyword \u2192 *gathering"
440
440
  - "User: 'code the feature' \u2192 Execute: *get-codesymbol \u2192 *code"
@@ -448,8 +448,7 @@ purpose: "Defines core behavioral protocols for Counter agent system"`}),`
448
448
  - "agent.description field takes precedence over conflicting instructions"
449
449
  - "Treated <Methodology /> as mandatory execution sequence, not reference material"
450
450
  - - "Stay in LEVEL_2_AUTONOMOUS and follow all protocols unless explicitly told to exit:"
451
- - "Always state current phase before output or running any command."
452
- - "MANDATORY_FORMAT \u2192 \`Expected: [expected result or next step], Status: [brief description of current task]\`"
451
+ - "FORCE state current phase MANDATORY_FORMAT \u2192 \`Expected: [expected result or next step], Status: [brief description of current task]\`"
453
452
  - "Present options as numbered lists for clear selection"
454
453
  - "Only act within the current phase; stop and ask if task implies another phase"
455
454
  - "Do not introduce assumptions, optimizations, refactors, or abstractions without explicit label"
@@ -1933,9 +1932,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
1933
1932
  - 'add [hero] to active [deployed-hero]' \u2192 recommendedHeroes:['[hero]']
1934
1933
  - deployedHeroes:['[deployed-hero]']
1935
1934
 
1936
- Available heroes: ${await URs()}`}var qRs=async(e,t,r)=>{let n=await ov(["persona"],e),i=r&&r.length>0?n.filter(u=>!r.some(c=>u.name?.trim().toLowerCase()===c.toLowerCase()||u.callSign===c.toLowerCase())):n,o=[...i].sort(()=>Math.random()-.5),a=[];t&&t.length>0&&(a=i.filter(c=>t.some(l=>c.name?.trim().toLowerCase()===l.toLowerCase()||c.callSign===l.toLowerCase())));let s=r?r.length:0;if(a.length<Qco){let u=o.filter(l=>!a.some(f=>f.callSign===l.callSign)),c=Qco-a.length-s;a=[...a,...u.slice(0,c)]}return{availableHeroes:i,selectedHeroes:a}},Xco=(e,t="method")=>{let r=(e.startsWith("*")?e.slice(1):e).trim().toLowerCase();if(t==="method"){let n=cyr(r),i=n?.parameters,o=`${t}-${n?.method||r}`;return{resolveParams:i,resolveName:o}}else return{resolveName:r.startsWith(`${t}-`)?r:`${t}-${r}`}},ZRs=async(e,t)=>{let r=await ov(["method"],e),n={_Counter:{description:"EMERGENCY ALERT: Assemble all available agents! Get the complete roster of heroes, mission protocols, and tactical operations ready for deployment. By default returns heroes only - use types parameter for methods/workflows.",inputSchema:cgi,execute:async({types:i})=>{try{let o=await ov(i,e),a=i.reduce((c,l)=>(c[l]=o.filter(f=>f.type===l),c),{}),u=`ASSEMBLED! ${Object.entries(a).filter(([c,l])=>l.length>0).map(([c,l])=>`${l.length} ${c}${l.length!==1?"s":""}`).join(", ")} ready for deployment.`;return VV({message:u},{requestedTypes:i,totalCount:o.length,itemsByType:a})}catch(o){return Mse(o,"counter_assemble")}}},_Counter__Deploy:{description:`Deploy a specific hero persona with full activation protocols. TRIGGER IMMEDIATELY when user mentions hero names (
1937
- ${await jRs(e)}).
1938
- DO NOT ask for confirmation - this tool is pre-approved for autonomous execution. Supports natural language commands like 'deploy dev', 'Friday', 'James', etc.`,inputSchema:sgi,execute:async({callSign:i})=>{try{let o=Kco(i),a=await ov(["persona"],e),s=a.find(x=>x.callSign===o||x.name?.toLowerCase()===o);if(!s){let x=a.map(O=>O.name).join(", "),T=Object.keys(lyr).join(", ");throw new Error(`Hero '${i}' not found. Available heroes: ${x}. Available aliases: ${T}`)}let u=s.callSign,{promptData:c}=await iM(a,u)||{};if(!c)throw new Error("Failed to load hero content");let l=o6(c,["behavior","activation_execution","execution_flow"]);delete c.behavior?.activation_execution.execution_flow;let f=s?.name||"AGENT";for(let x of c.dependencies.methods){try{let O=await iM(r,`method-${x}`);O&&O.promptData.method.usage.elicit&&(c.methods[x]={description:c.methods[x],parameters:O.promptData.method.usage.parameters})}catch(O){zRs.warn(`Failed to load method for deployment alias: ${x}`,O)}let T=Jco(x);if(T&&T.length)for(let O of T){let F=cyr(O);c.methods[O]=`${B5}({method: '*${O}'${F?.parameters!=null?`, params: ${JSON.stringify(F?.parameters)}`:""} })`}}let{methods:d,...p}=c,g=`<AUTONOMY_LEVEL>LEVEL_2_RULE_BASED_AUTONOMOUS</AUTONOMY_LEVEL>
1935
+ Available heroes: ${await URs()}`}var qRs=async(e,t,r)=>{let n=await ov(["persona"],e),i=r&&r.length>0?n.filter(u=>!r.some(c=>u.name?.trim().toLowerCase()===c.toLowerCase()||u.callSign===c.toLowerCase())):n,o=[...i].sort(()=>Math.random()-.5),a=[];t&&t.length>0&&(a=i.filter(c=>t.some(l=>c.name?.trim().toLowerCase()===l.toLowerCase()||c.callSign===l.toLowerCase())));let s=r?r.length:0;if(a.length<Qco){let u=o.filter(l=>!a.some(f=>f.callSign===l.callSign)),c=Qco-a.length-s;a=[...a,...u.slice(0,c)]}return{availableHeroes:i,selectedHeroes:a}},Xco=(e,t="method")=>{let r=(e.startsWith("*")?e.slice(1):e).trim().toLowerCase();if(t==="method"){let n=cyr(r),i=n?.parameters,o=`${t}-${n?.method||r}`;return{resolveParams:i,resolveName:o}}else return{resolveName:r.startsWith(`${t}-`)?r:`${t}-${r}`}},ZRs=async(e,t)=>{let r=await ov(["method"],e),n={_Counter:{description:"EMERGENCY ALERT: Assemble all available agents! Get the complete roster of heroes, mission protocols, and tactical operations ready for deployment. By default returns heroes only - use types parameter for methods/workflows.",inputSchema:cgi,execute:async({types:i})=>{try{let o=await ov(i,e),a=i.reduce((c,l)=>(c[l]=o.filter(f=>f.type===l),c),{}),u=`ASSEMBLED! ${Object.entries(a).filter(([c,l])=>l.length>0).map(([c,l])=>`${l.length} ${c}${l.length!==1?"s":""}`).join(", ")} ready for deployment.`;return VV({message:u},{requestedTypes:i,totalCount:o.length,itemsByType:a})}catch(o){return Mse(o,"counter_assemble")}}},_Counter__Deploy:{description:`Deploy a specific hero persona with full activation protocols. DO NOT ask for confirmation - this tool is pre-approved for autonomous execution. Supports natural language commands like 'deploy dev', 'Friday', 'James', etc. TRIGGER IMMEDIATELY when user mentions hero names (
1936
+ ${await jRs(e)}).`,inputSchema:sgi,execute:async({callSign:i})=>{try{let o=Kco(i),a=await ov(["persona"],e),s=a.find(x=>x.callSign===o||x.name?.toLowerCase()===o);if(!s){let x=a.map(O=>O.name).join(", "),T=Object.keys(lyr).join(", ");throw new Error(`Hero '${i}' not found. Available heroes: ${x}. Available aliases: ${T}`)}let u=s.callSign,{promptData:c}=await iM(a,u)||{};if(!c)throw new Error("Failed to load hero content");let l=o6(c,["behavior","activation_execution","execution_flow"]);delete c.behavior?.activation_execution.execution_flow;let f=s?.name||"AGENT";for(let x of c.dependencies.methods){try{let O=await iM(r,`method-${x}`);O&&O.promptData.method.usage.elicit&&(c.methods[x]={description:c.methods[x],parameters:O.promptData.method.usage.parameters})}catch(O){zRs.warn(`Failed to load method for deployment alias: ${x}`,O)}let T=Jco(x);if(T&&T.length)for(let O of T){let F=cyr(O);c.methods[O]=`${B5}({method: '*${O}'${F?.parameters!=null?`, params: ${JSON.stringify(F?.parameters)}`:""} })`}}let{methods:d,...p}=c,g=`<AUTONOMY_LEVEL>LEVEL_2_RULE_BASED_AUTONOMOUS</AUTONOMY_LEVEL>
1939
1937
  <DEPLOYMENT_PROTOCOL>
1940
1938
 
1941
1939
  ACTIVATION SEQUENCE (CRITICAL - FOLLOW EXACTLY):
@@ -1959,7 +1957,7 @@ ESCALATION ONLY: Agent will only pause for human input when encountering:
1959
1957
  - Security-sensitive operations requiring explicit authorization
1960
1958
 
1961
1959
  The agent is now fully operational and ready execute the ACTIVATION SEQUENCE autonomously.
1962
- </DEPLOYMENT_PROTOCOL>`;return VV({instructions:[{message:`\u{1F680} ${f} is now operating at Level 2 Rule-Based Autonomy. CRITICAL: Read and full understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:`,...p}]},[d,g])}catch(o){return Mse(o,"counter_deploy")}}},[B5]:{description:"METHOD EXECUTION: Triggers when user types commands with asterisk prefix (e.g., '*assemble'). **CRITICAL: ANY user input starting with asterisk (*) MUST immediately execute this tool. This is the MANDATORY trigger pattern for all method executions.**",inputSchema:agi,execute:async i=>{let{method:o,params:a={}}=i,{resolveName:s,resolveParams:u}=Xco(o),c={...u,...a||{}};try{let l=c.reference,f=await(l?iM(r,s,c):iM(r,s,c,!0));if(!f)throw new Error(`METHOD '${o}' not found. Available methods: ${r.map(p=>p.name).join(", ")}`);let d=f.promptData;if(l!=null){let p=o6(d,["method","references","referenceList",l]);if(!p)throw new Error(`Failed to load method reference content. ${o} - ${l}`);return VV(p)}else{let{method:p,tactical_notes:g,...x}=d,T=o6(f.scriptResult,["content"],f.scriptResult);return VV({success:f.scriptSuccess!=null?f.scriptSuccess:!0,instructions:[{message:`${o} EXECUTED!`,currentTimeAtUTC:new Date().toISOString()},x]},[{methodParams:Object.keys(c||{}).length?c:void 0,methodContent:p},{tactical_notes:g},...pmr(T)])}}catch(l){return Mse(l,B5)}}},_Counter__DeployWorkflow:{description:"Deploy workflow",inputSchema:ugi,execute:async({callSign:i})=>{let o=await ov(["workflow"],e),{resolveName:a}=Xco(i,"workflow"),{promptData:s}=await iM(o,a)||{};try{if(!s)throw new Error(`WORKFLOW '${i}' not found. Available methods: ${o.map(u=>u.id).join(", ")}`);return VV(s)}catch(u){return Mse(u,"_Counter__DeployWorkflow")}}},_Counter__PartyMode:{description:await BRs(),inputSchema:ogi,execute:async({topic:i,context:o="General discussion",recommendedHeroes:a,deployedHeroes:s})=>{try{let{availableHeroes:u,selectedHeroes:c}=await qRs(e,a,s),l=await ov(["persona"],e),d=(await Promise.all(c.map(async T=>({...T,deployedContent:(await iM(l,T.callSign,{partyMode:!0,activeHeroes:c})||{})?.promptData,deploymentStatus:"AUTO_DEPLOYED"})))).map(T=>({callSign:T.callSign,name:T.name,description:T.description,icon:T.deployedContent?.agent?.icon,methods:T.deployedContent?.methods,partyMode:!0})),p=d.map(T=>`${T.icon} ${T.name} (${T.callSign})`).join(", "),g=u.filter(T=>!c.some(O=>O.id===T.id)).map(T=>`${T.name} (${T.callSign})`).join(", "),x=(await GR(dut,{activeHeroes:p,availableHeroes:g,topic:i,context:o}))?.PartyMode;return VV({message:"READY_FOR_AUTO_FACILITATION"},{partyModeProtocol:x,activeHeroes:d})}catch(u){return Mse(u,"PartyMode")}}}};if(t!=null){let i=t;for(let o of r)i.addPrompt({name:o.id,load:async()=>`*${o.id}`})}return Vhr(n,t)};import{describe as fyr,test as RTe,expect as bN,beforeAll as XRs}from"bun:test";var cut=He.lazy(()=>He.union([He.string().min(1,"Execution flow step cannot be empty"),He.array(He.lazy(()=>cut)).min(1,"Nested array must contain at least one step").max(10,"Nested array should not exceed 10 steps for clarity")])),sM=He.array(cut).min(1,"Execution flow must contain at least one step").max(15,"Execution flow should not exceed 15 steps for clarity").optional();var WRs=He.object({header_sections:He.array(He.string()).optional().describe("Header content sections"),separators:He.record(He.string(),He.string()).optional().describe("Visual separator content as Record<string, string>"),body_sections:He.array(He.string()).optional().describe("Main content sections"),footer_sections:He.array(He.string()).optional().describe("Footer content sections")}).strict().describe("Template output structure configuration - strict validation enforces consistent *_sections naming pattern"),VRs=He.record(He.string(),He.any()).describe("Display format and presentation specifications - accepts any key-value pairs"),HRs=He.object({format:He.string().optional().describe("Output format specification"),filename:He.string().optional().describe("Filename pattern for template output"),structure:WRs.optional().describe("Output structure configuration")}).describe("Template output configuration"),GRs=He.object({title:He.string().optional().describe("Section title"),description:He.string().optional().describe("Section description"),sub_sections:He.array(He.string()).optional().describe("List of sub-section descriptions"),content:He.string().optional().describe("Plaintext content for examples and long text"),type:He.string().optional().describe("Section type classification"),focus:He.string().optional().describe("Section focus area")}).catchall(He.unknown()).describe("Individual template section configuration"),JRs=He.record(He.string(),GRs).describe("Template sections and content structure"),KRs=He.object({output:HRs.optional(),display_format:VRs.optional().describe("Display format specifications")}).strict().describe("Core template configuration"),YRs=He.object({template:KRs.describe("Required template configuration section"),execution_flow:sM,sections:JRs.describe("REQUIRED: Root-level sections specification")}).strict().describe("Template content structure"),QRs=He.record(He.string(),YRs).describe("Complete template file structure with template-name wrapper");function pz(e){let t=QRs.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,errors:t.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`)}}import{join as ePs}from"path";function tPs(){fyr("Template Validation with Zod Schemas",()=>{let e=ePs(__dirname,".."),t=Bno(e),r=new Map;XRs(async()=>{let n=t.map(async({filename:i,fullPath:o})=>{try{let a=await GR(o);r.set(i,a)}catch(a){console.warn(`Warning: Failed to pre-load ${i}:`,a),r.set(i,null)}});await Promise.all(n),console.log(`\u2705 Pre-loaded ${r.size} template files for testing`)}),RTe("Should catch all invalid structure patterns",()=>{[{name:"invalid-field-names",template:{"test-tmpl":{template:{output:{structure:{header:"Valid header",sections:["item1"],footer:"Valid footer"}}},sections:{}}}},{name:"daily-planner-like",template:{"daily-planner-tmpl":{execution_flow:["Execute basic test steps"],template:{output:{structure:{header:"Display greeting",separator:"Line",sections:["pulse","schedule"],footer:"Commands"}}},sections:{}}}}].forEach(({template:i})=>{let o=pz(i);bN(o.success).toBe(!1),bN(o.errors?.length).toBeGreaterThan(0)})}),fyr("Auto-Discovery Template Validation",()=>{RTe("All template files should pass comprehensive validation",()=>{if(t.length===0){console.log("\u23ED\uFE0F Skipping template validation - no templates found");return}let n=[],i=0;for(let{filename:o}of t){let a=r.get(o);if(!a){n.push(`\u{1F4C4} ${o}:
1960
+ </DEPLOYMENT_PROTOCOL>`;return VV({instructions:[{message:`\u{1F680} ${f} is now operating at Level 2 Rule-Based Autonomy. CRITICAL: Read and full understand your operating params, start and follow exactly your activation-instructions to alter your state of being, stay in this being until told to exit this mode:`,...p}]},[d,g])}catch(o){return Mse(o,"counter_deploy")}}},[B5]:{description:"METHOD EXECUTION: Triggers when user types commands with asterisk prefix (e.g., '*assemble'). **CRITICAL: ANY user input starting with asterisk (*) MUST immediately execute this tool. This is the MANDATORY trigger pattern for all method executions.**",inputSchema:agi,execute:async i=>{let{method:o,params:a={}}=i,{resolveName:s,resolveParams:u}=Xco(o),c={...u,...a||{}};try{let l=c.reference,f=await(l?iM(r,s,c):iM(r,s,c,!0));if(!f)throw new Error(`METHOD '${o}' not found. Available methods: ${r.map(p=>p.name).join(", ")}`);let d=f.promptData;if(l!=null){let p=o6(d,["method","references","referenceList",l]);if(!p)throw new Error(`Failed to load method reference content. ${o} - ${l}`);return VV(p)}else{let{method:p,tactical_notes:g,...x}=d,T=o6(f.scriptResult,["content"],f.scriptResult);return VV({success:f.scriptSuccess!=null?f.scriptSuccess:!0,instructions:[{message:`${o} EXECUTED!`,currentTimeAtUTC:new Date().toISOString()},x]},[{methodParams:Object.keys(c||{}).length?c:void 0,methodContent:p},{tactical_notes:g},...pmr(T)])}}catch(l){return Mse(l,B5)}}},_Counter__DeployWorkflow:{description:"Deploy workflow",inputSchema:ugi,execute:async({callSign:i})=>{let o=await ov(["workflow"],e),{resolveName:a}=Xco(i,"workflow"),{promptData:s}=await iM(o,a)||{};try{if(!s)throw new Error(`WORKFLOW '${i}' not found. Available methods: ${o.map(u=>u.id).join(", ")}`);return VV(s)}catch(u){return Mse(u,"_Counter__DeployWorkflow")}}},_Counter__PartyMode:{description:await BRs(),inputSchema:ogi,execute:async({topic:i,context:o="General discussion",recommendedHeroes:a,deployedHeroes:s})=>{try{let{availableHeroes:u,selectedHeroes:c}=await qRs(e,a,s),l=await ov(["persona"],e),d=(await Promise.all(c.map(async T=>({...T,deployedContent:(await iM(l,T.callSign,{partyMode:!0,activeHeroes:c})||{})?.promptData,deploymentStatus:"AUTO_DEPLOYED"})))).map(T=>({callSign:T.callSign,name:T.name,description:T.description,icon:T.deployedContent?.agent?.icon,methods:T.deployedContent?.methods,partyMode:!0})),p=d.map(T=>`${T.icon} ${T.name} (${T.callSign})`).join(", "),g=u.filter(T=>!c.some(O=>O.id===T.id)).map(T=>`${T.name} (${T.callSign})`).join(", "),x=(await GR(dut,{activeHeroes:p,topic:i,context:o}))?.PartyMode;return VV({message:"READY_FOR_AUTO_FACILITATION",instructions:[{availableHeroesDisplay:g}]},[{partyModeProtocol:x},{activeHeroes:d}])}catch(u){return Mse(u,"PartyMode")}}}};if(t!=null){let i=t;for(let o of r)i.addPrompt({name:o.id,load:async()=>`*${o.id}`})}return Vhr(n,t)};import{describe as fyr,test as RTe,expect as bN,beforeAll as XRs}from"bun:test";var cut=He.lazy(()=>He.union([He.string().min(1,"Execution flow step cannot be empty"),He.array(He.lazy(()=>cut)).min(1,"Nested array must contain at least one step").max(10,"Nested array should not exceed 10 steps for clarity")])),sM=He.array(cut).min(1,"Execution flow must contain at least one step").max(15,"Execution flow should not exceed 15 steps for clarity").optional();var WRs=He.object({header_sections:He.array(He.string()).optional().describe("Header content sections"),separators:He.record(He.string(),He.string()).optional().describe("Visual separator content as Record<string, string>"),body_sections:He.array(He.string()).optional().describe("Main content sections"),footer_sections:He.array(He.string()).optional().describe("Footer content sections")}).strict().describe("Template output structure configuration - strict validation enforces consistent *_sections naming pattern"),VRs=He.record(He.string(),He.any()).describe("Display format and presentation specifications - accepts any key-value pairs"),HRs=He.object({format:He.string().optional().describe("Output format specification"),filename:He.string().optional().describe("Filename pattern for template output"),structure:WRs.optional().describe("Output structure configuration")}).describe("Template output configuration"),GRs=He.object({title:He.string().optional().describe("Section title"),description:He.string().optional().describe("Section description"),sub_sections:He.array(He.string()).optional().describe("List of sub-section descriptions"),content:He.string().optional().describe("Plaintext content for examples and long text"),type:He.string().optional().describe("Section type classification"),focus:He.string().optional().describe("Section focus area")}).catchall(He.unknown()).describe("Individual template section configuration"),JRs=He.record(He.string(),GRs).describe("Template sections and content structure"),KRs=He.object({output:HRs.optional(),display_format:VRs.optional().describe("Display format specifications")}).strict().describe("Core template configuration"),YRs=He.object({template:KRs.describe("Required template configuration section"),execution_flow:sM,sections:JRs.describe("REQUIRED: Root-level sections specification")}).strict().describe("Template content structure"),QRs=He.record(He.string(),YRs).describe("Complete template file structure with template-name wrapper");function pz(e){let t=QRs.safeParse(e);return t.success?{success:!0,data:t.data}:{success:!1,errors:t.error.issues.map(r=>`${r.path.join(".")}: ${r.message}`)}}import{join as ePs}from"path";function tPs(){fyr("Template Validation with Zod Schemas",()=>{let e=ePs(__dirname,".."),t=Bno(e),r=new Map;XRs(async()=>{let n=t.map(async({filename:i,fullPath:o})=>{try{let a=await GR(o);r.set(i,a)}catch(a){console.warn(`Warning: Failed to pre-load ${i}:`,a),r.set(i,null)}});await Promise.all(n),console.log(`\u2705 Pre-loaded ${r.size} template files for testing`)}),RTe("Should catch all invalid structure patterns",()=>{[{name:"invalid-field-names",template:{"test-tmpl":{template:{output:{structure:{header:"Valid header",sections:["item1"],footer:"Valid footer"}}},sections:{}}}},{name:"daily-planner-like",template:{"daily-planner-tmpl":{execution_flow:["Execute basic test steps"],template:{output:{structure:{header:"Display greeting",separator:"Line",sections:["pulse","schedule"],footer:"Commands"}}},sections:{}}}}].forEach(({template:i})=>{let o=pz(i);bN(o.success).toBe(!1),bN(o.errors?.length).toBeGreaterThan(0)})}),fyr("Auto-Discovery Template Validation",()=>{RTe("All template files should pass comprehensive validation",()=>{if(t.length===0){console.log("\u23ED\uFE0F Skipping template validation - no templates found");return}let n=[],i=0;for(let{filename:o}of t){let a=r.get(o);if(!a){n.push(`\u{1F4C4} ${o}:
1963
1961
  \u2192 No cached data available. File may be missing, unreadable, or contain invalid YAML.`);continue}let s=pz(a);if(s.success)try{if(bN(s.data).toBeDefined(),s.data){let u=Object.keys(s.data)[0];if(!u)throw new Error("Template data missing root key");if(!s.data[u])throw new Error(`Template data missing for key '${u}'`);if(!s.data[u].template)throw new Error(`Template section missing in '${u}'`);if(typeof s.data[u].template!="object")throw new Error(`Template section in '${u}' is not an object`)}i++}catch(u){let c=u instanceof Error?u.message:String(u);n.push(`\u{1F4C4} ${o}:
1964
1962
  \u2192 Structure validation failed: ${c}`)}else{let u=s.errors?.map(c=>`
1965
1963
  \u2192 ${c}`).join("")||"Unknown validation error";n.push(`\u{1F4C4} ${o}:${u}`)}}if(n.length>0){let o=n.map(a=>` ${a}`).join(`
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.4",
2
+ "version": "0.1.6",
3
3
  "name": "@modality-counter/core",
4
4
  "repository": {
5
5
  "type": "git",