@modality-counter/core 2.7.0 → 2.7.1
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.
package/dist/index.js
CHANGED
|
@@ -832,7 +832,7 @@ Available references:
|
|
|
832
832
|
${M}
|
|
833
833
|
|
|
834
834
|
To retrieve a specific reference, call the method with the reference parameter:
|
|
835
|
-
${B}`)}let{method:{references:f={},...m},tactical_notes:y,..._}=l,E=f.referenceInstruction?{"reference-instruction":f.referenceInstruction,"reference-items":f.referenceItems}:void 0,T=[{instructions:[{message:`${i} EXECUTED!`,currentTimeAtUTC:new Date().toISOString()},_]},[{methodParams:Object.keys(s||{}).length?s:void 0,methodContent:m},{references:E,tactical_notes:y}]];if(!u.counterScript)return T;let I,w=!0;try{let P={method:i,command:r?.command};I=await u.counterScript(s,
|
|
835
|
+
${B}`)}let{method:{references:f={},...m},tactical_notes:y,..._}=l,E=f.referenceInstruction?{"reference-instruction":f.referenceInstruction,"reference-items":f.referenceItems}:void 0,T=[{instructions:[{message:`${i} EXECUTED!`,currentTimeAtUTC:new Date().toISOString()},_]},[{methodParams:Object.keys(s||{}).length?s:void 0,methodContent:m},{references:E,tactical_notes:y}]];if(!u.counterScript)return T;let I,w=!0;try{let P={method:i,command:r?.command,returnContext:T};I=await u.counterScript({...s,_ctx:P}),I=I?.content??I}catch(P){I={error:P.message},w=!1}if(T[0]==null&&T[1]==null)return[{success:w,...I}];let O=((P,M)=>P?YEr(M):[M])(w,I);return[{success:w,...T[0]},T[1]==null?O:[...T[1],...O]]}import{Fragment as Ucc,jsx as J5,jsxs as jcc}from"react/jsx-runtime";import{jsx as Fft}from"react/jsx-runtime";import{YAML as zcc}from"bun";var Fcc=e=>Fft("pre",{style:{whiteSpace:"pre-wrap"},children:`\`\`\`yaml
|
|
836
836
|
${zcc.stringify(e)}\`\`\``});function Lcc(e={}){let{wrapper:t}=e.components||{};return t?Fft(t,Object.assign({},e,{children:Fft(r,{})})):r();function r(){return Fft(Fcc,e)}}var Lft=Lcc;var qcc=e=>{let t={active_heroes:e.activeHeroes,available_heroes:e.availableHeroes,topic:e.topic,context:e.context,meeting_type:"AI_ORCHESTRATED_ROUNDTABLE",description:"This party mode session brings together multiple AI heroes for collaborative discussion and problem-solving. Each hero contributes their unique expertise and perspective to create comprehensive solutions."};return J5(Lft,{"party-mode-protocol":{sessionDetails:t}})};function Bcc(e={}){let{wrapper:t}=e.components||{};return t?J5(t,Object.assign({},e,{children:J5(r,{})})):r();function r(){let i=Object.assign({hr:"hr",h2:"h2",pre:"pre",code:"code"},e.components);return jcc(Ucc,{children:[J5(i.hr,{}),`
|
|
837
837
|
`,J5(i.h2,{children:`name: party-mode-protocol
|
|
838
838
|
description: "Behavior Protocol for Multi-Hero Party Mode Collaborative Discussions"`}),`
|
|
@@ -45,25 +45,23 @@ export declare const getNormalizedName: (name: string, counterType?: string, sta
|
|
|
45
45
|
resolveName: string;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
* Execution context Counter
|
|
49
|
-
* `counterScript`.
|
|
50
|
-
*
|
|
51
|
-
* NOTE ON ARG POSITION: `modality-mcp-kit` types `AITool.execute(args, context?)`
|
|
52
|
-
* — context is the SECOND parameter there. Counter's `counterScript` contract
|
|
53
|
-
* puts the result tuple second and this context third. Scripts must follow
|
|
54
|
-
* Counter's order; one typed against the mcp-kit signature reads the result
|
|
55
|
-
* tuple as its context.
|
|
48
|
+
* Execution context Counter merges into the single props argument of
|
|
49
|
+
* `counterScript` as `props._ctx`.
|
|
56
50
|
*/
|
|
57
51
|
export interface CounterScriptContext {
|
|
58
52
|
/** Method name exactly as the caller passed it (raw: keeps a leading `*` and original casing). */
|
|
59
53
|
method: string;
|
|
60
54
|
/** Bare CLI command name (e.g. `skill`). Undefined for MCP tool-call execution. */
|
|
61
55
|
command?: string;
|
|
56
|
+
/** Prompt-side result tuple Counter built before the script runs (the `returnContext` in executeMethod). */
|
|
57
|
+
returnContext?: CounterTuple;
|
|
62
58
|
}
|
|
63
59
|
/** Resolved Counter content: prompt data, optional script, and party mode flag */
|
|
64
60
|
export interface CounterContent {
|
|
65
61
|
promptData: Record<string, any>;
|
|
66
|
-
counterScript?(props: any
|
|
62
|
+
counterScript?(props: any & {
|
|
63
|
+
_ctx?: CounterScriptContext;
|
|
64
|
+
}): any;
|
|
67
65
|
partyMode?: string;
|
|
68
66
|
}
|
|
69
67
|
export declare function getCounterContent(items: CounterItem[], callSign: string, params?: any, executeScript?: boolean, options?: ReferenceOptions): Promise<CounterContent | false>;
|
package/package.json
CHANGED