@modality-counter/core 0.9.6 → 0.9.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 (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -690,7 +690,7 @@ description: "Behavior Protocol for Multi-Hero Party Mode Collaborative Discussi
690
690
  - 'add [hero] to active [deployed-hero]' \u2192 recommendedHeroes:['[hero]']
691
691
  - deployedHeroes:['[deployed-hero]']
692
692
 
693
- Available heroes: ${await x4s()}`}var w4s=async(e,t,r)=>{let i=await sv(["persona"],e),n=r&&r.length>0?i.filter(u=>!r.some(c=>u.name?.trim().toLowerCase()===c.toLowerCase()||u.callSign===c.toLowerCase())):i,o=[...n].sort(()=>Math.random()-.5),a=[];t&&t.length>0&&(a=n.filter(c=>t.some(l=>c.name?.trim().toLowerCase()===l.toLowerCase()||c.callSign===l.toLowerCase())));let s=r?r.length:0;if(a.length<Yuo){let u=o.filter(l=>!a.some(f=>f.callSign===l.callSign)),c=Yuo-a.length-s;a=[...a,...u.slice(0,c)]}return{availableHeroes:n,selectedHeroes:a}},Xuo=(e,t="method")=>{let r=(e.startsWith("*")?e.slice(1):e).trim().toLowerCase();if(t==="method"){let i=Yvr(r),n=i?.parameters,o=`${t}-`,a=r.indexOf(o)===0?r:`${o}${i?.method||r}`;return{resolveParams:n,resolveName:a}}else return{resolveName:r.startsWith(`${t}-`)?r:`${t}-${r}`}},k4s=async(e,t)=>{let r=await sv(["method"],e),i={_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:whi,execute:async({types:n})=>{try{let o=await sv(n,e),a=n.reduce((c,l)=>(c[l]=o.filter(f=>f.type===l).map(f=>l==="persona"?{id:f.id,name:f.name}:f.id),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 WM({message:u},{requestedTypes:n,totalCount:o.length,itemsByType:a})}catch(o){return fae(o,"counter_assemble")}}},_Counter__Deploy:{description:`Deploy a specific hero persona. Call this tool when the user references a hero by name or alias (e.g. 'deploy James', 'James', 'dev'). Available heroes:
693
+ Available heroes: ${await x4s()}`}var w4s=async(e,t,r)=>{let i=await sv(["persona"],e),n=r&&r.length>0?i.filter(u=>!r.some(c=>u.name?.trim().toLowerCase()===c.toLowerCase()||u.callSign===c.toLowerCase())):i,o=[...n].sort(()=>Math.random()-.5),a=[];t&&t.length>0&&(a=n.filter(c=>t.some(l=>c.name?.trim().toLowerCase()===l.toLowerCase()||c.callSign===l.toLowerCase())));let s=r?r.length:0;if(a.length<Yuo){let u=o.filter(l=>!a.some(f=>f.callSign===l.callSign)),c=Yuo-a.length-s;a=[...a,...u.slice(0,c)]}return{availableHeroes:n,selectedHeroes:a}},Xuo=(e,t="method")=>{let r=(e.startsWith("*")?e.slice(1):e).trim().toLowerCase(),i=`${t}-`;if(t==="method"){let n=Yvr(r),o=n?.parameters,a=`${i}${n?.method||r}`;return{resolveParams:o,resolveName:a}}else return{resolveName:r.startsWith(i)?r:`${t}-${r}`}},k4s=async(e,t)=>{let r=await sv(["method"],e),i={_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:whi,execute:async({types:n})=>{try{let o=await sv(n,e),a=n.reduce((c,l)=>(c[l]=o.filter(f=>f.type===l).map(f=>l==="persona"?{id:f.id,name:f.name}:f.id),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 WM({message:u},{requestedTypes:n,totalCount:o.length,itemsByType:a})}catch(o){return fae(o,"counter_assemble")}}},_Counter__Deploy:{description:`Deploy a specific hero persona. Call this tool when the user references a hero by name or alias (e.g. 'deploy James', 'James', 'dev'). Available heroes:
694
694
  ${await _4s(e)}`,inputSchema:_hi,execute:async({callSign:n})=>{try{let o=Guo(n),a=await sv(["persona"],e),s=a.find(x=>x.callSign===o||x.name?.toLowerCase()===o);if(!s){let x=a.map(C=>C.name).join(", "),k=Object.keys(Xvr).join(", ");throw new Error(`Hero '${n}' not found. Available heroes: ${x}. Available aliases: ${k}`)}let u=s.callSign,{promptData:c}=await d$(a,u)||{};if(!c)throw new Error("Failed to load hero content");let l=$O(c,["behavior-protocol","agent_activation_execution","execution_flow"]);delete c["behavior-protocol"]?.agent_activation_execution?.execution_flow;let f=s?.name||"AGENT",{methods:d,dependencies:p,...m}=c;for(let x of p.methods){try{let C=await d$(r,`method-${x}`,null,!0);C&&C.promptData.method.usage.elicit&&(c.methods[x]={description:c.methods[x],parameters:C.promptData.method.usage.parameters})}catch(C){b4s.warn(`Failed to load method for deployment alias: ${x}`,C)}let k=Juo(x);if(k&&k.length)for(let C of k){let E=Yvr(C);c.methods[C]=`${GU}({method: '*${C}'${E?.parameters!=null?`, params: ${JSON.stringify(E?.parameters)}`:""} })`}}let h=`<AUTONOMY_LEVEL>LEVEL_2_RULE_BASED_AUTONOMOUS</AUTONOMY_LEVEL>
695
695
 
696
696
  ACTIVATION SEQUENCE (CRITICAL - FOLLOW EXACTLY):
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.9.6",
2
+ "version": "0.9.7",
3
3
  "name": "@modality-counter/core",
4
4
  "repository": {
5
5
  "type": "git",