@modality-counter/core 2.6.0 → 2.7.0
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.
|
@@ -23,6 +23,8 @@ export declare function buildReferenceInstructions(referenceList: MethodReferenc
|
|
|
23
23
|
export interface ReferenceOptions {
|
|
24
24
|
/** Build the call-syntax shown in the directive for a given method id. */
|
|
25
25
|
buildInvocation?: (methodId: string) => string;
|
|
26
|
+
/** Bare CLI command name (e.g. `skill`), handed to the method's script as `context.command`. */
|
|
27
|
+
command?: string;
|
|
26
28
|
}
|
|
27
29
|
export declare function buildReferences(folderPath: string | undefined, methodId: string, options?: ReferenceOptions): Promise<{
|
|
28
30
|
referenceInstruction: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ export { DEPLOY_METHOD_TOOL } from "./confs/const.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export { DeepWiki } from "./util_scripts/DeepWiki";
|
|
8
8
|
export { getPagination, needsChunking, getChunk, } from "./util_scripts/pagination";
|
|
9
|
-
export { getCounterContent, getAllCounterItems, type CounterContent, type CounterTuple, } from "./util_counter_data";
|
|
9
|
+
export { getCounterContent, getAllCounterItems, type CounterContent, type CounterScriptContext, type CounterTuple, } from "./util_counter_data";
|
|
10
10
|
export { setupMcpCounter } from "./mcp_counter";
|
|
11
11
|
export { executeMethod } from "./execute_method";
|
|
12
|
-
export { toCounterCLI } from "./toCounterCLI";
|
|
12
|
+
export { toCounterCLI, type CliOptions } from "./toCounterCLI";
|
|
13
13
|
export { toCounterCLIHelp, toCounterMethodHelp, type HelpFormat } from "./toCounterCLIHelp";
|
|
14
14
|
export { validateMethodFile, MethodFileSchema } from "./schemas/methodology-validation.js";
|
|
15
15
|
export { validateTemplateFile, TemplateFileSchema } from "./schemas/template-validation.js";
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface CliOptions {
|
|
2
|
+
cliName?: string;
|
|
3
|
+
command?: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Pass an options object — `toCounterCLI(baseDir, { cliName, command })`.
|
|
7
|
+
* The pre-2.7 positional form is kept for existing callers and delegates to the
|
|
8
|
+
* object path; it will be removed once downstream callers have migrated.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toCounterCLI(baseDir: string, legacyName: string): (args: string[]) => Promise<void>;
|
|
11
|
+
export declare function toCounterCLI(baseDir: string, options?: CliOptions): (args: string[]) => Promise<void>;
|
|
@@ -44,10 +44,26 @@ export declare const getNormalizedName: (name: string, counterType?: string, sta
|
|
|
44
44
|
resolveParams?: undefined;
|
|
45
45
|
resolveName: string;
|
|
46
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Execution context Counter hands to a method script as the THIRD argument of
|
|
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.
|
|
56
|
+
*/
|
|
57
|
+
export interface CounterScriptContext {
|
|
58
|
+
/** Method name exactly as the caller passed it (raw: keeps a leading `*` and original casing). */
|
|
59
|
+
method: string;
|
|
60
|
+
/** Bare CLI command name (e.g. `skill`). Undefined for MCP tool-call execution. */
|
|
61
|
+
command?: string;
|
|
62
|
+
}
|
|
47
63
|
/** Resolved Counter content: prompt data, optional script, and party mode flag */
|
|
48
64
|
export interface CounterContent {
|
|
49
65
|
promptData: Record<string, any>;
|
|
50
|
-
counterScript?(props: any, willReturn?: CounterTuple): any;
|
|
66
|
+
counterScript?(props: any, willReturn?: CounterTuple, context?: CounterScriptContext): any;
|
|
51
67
|
partyMode?: string;
|
|
52
68
|
}
|
|
53
69
|
export declare function getCounterContent(items: CounterItem[], callSign: string, params?: any, executeScript?: boolean, options?: ReferenceOptions): Promise<CounterContent | false>;
|
package/package.json
CHANGED