@modality-counter/core 1.4.0 → 1.4.2
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { type CounterItem, type CounterTuple } from "./util_counter_data";
|
|
2
|
+
import type { ReferenceOptions } from "./get_counter_reference";
|
|
2
3
|
import type { HeroMethodType } from "./schemas/counter_schemas";
|
|
3
|
-
export declare function executeMethod(props: HeroMethodType, allMethodItems: CounterItem[]): Promise<CounterTuple>;
|
|
4
|
+
export declare function executeMethod(props: HeroMethodType, allMethodItems: CounterItem[], options?: ReferenceOptions): Promise<CounterTuple>;
|
|
@@ -8,7 +8,24 @@ export type MethodReference = Record<string, {
|
|
|
8
8
|
content: string;
|
|
9
9
|
}>;
|
|
10
10
|
export declare function getReferenceData(referencesDir?: string): Promise<MethodReference>;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Build the two-part reference instruction block from a reference list:
|
|
13
|
+
* [0] the MANDATORY loading directive, [1] the bulleted reference guide.
|
|
14
|
+
* Pure — no filesystem access — so it can be reused wherever a referenceList
|
|
15
|
+
* is already in hand (e.g. CLI --refs output).
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildReferenceInstructions(referenceList: MethodReference, methodId: string, invocation?: string): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Options controlling how reference instructions are rendered. Threaded from
|
|
20
|
+
* the call site (e.g. CLI) down to `buildReferences`. When omitted, the default
|
|
21
|
+
* MCP tool-call invocation form is used.
|
|
22
|
+
*/
|
|
23
|
+
export interface ReferenceOptions {
|
|
24
|
+
/** Build the call-syntax shown in the directive for a given method id. */
|
|
25
|
+
buildInvocation?: (methodId: string) => string;
|
|
26
|
+
}
|
|
27
|
+
export declare function buildReferences(folderPath: string | undefined, methodId: string, options?: ReferenceOptions): Promise<{
|
|
28
|
+
referenceInstruction: string;
|
|
29
|
+
referenceItems: string[];
|
|
13
30
|
referenceList: MethodReference;
|
|
14
31
|
} | undefined>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ResourceType } from "./schemas/counter_schemas";
|
|
2
2
|
import { type ScannedFile } from "modality-kit";
|
|
3
|
+
import { type ReferenceOptions } from "./get_counter_reference";
|
|
3
4
|
export declare const COUNTER_FILE_EXTENSIONS: string[];
|
|
4
5
|
/**
|
|
5
6
|
* Method execution response types
|
|
@@ -11,7 +12,10 @@ export interface MethodMetadata {
|
|
|
11
12
|
}
|
|
12
13
|
/** Reference and tactical notes metadata */
|
|
13
14
|
export interface ReferenceMetadata {
|
|
14
|
-
references?:
|
|
15
|
+
references?: {
|
|
16
|
+
"reference-instruction": string;
|
|
17
|
+
"reference-items": string[];
|
|
18
|
+
};
|
|
15
19
|
tactical_notes?: Record<string, any>;
|
|
16
20
|
}
|
|
17
21
|
/** Instructions object containing execution messages */
|
|
@@ -48,7 +52,7 @@ export interface CounterContent {
|
|
|
48
52
|
counterScript?(props: any, willReturn?: CounterTuple): any;
|
|
49
53
|
partyMode?: string;
|
|
50
54
|
}
|
|
51
|
-
export declare function getCounterContent(items: CounterItem[], callSign: string, params?: any, executeScript?: boolean): Promise<CounterContent | false>;
|
|
55
|
+
export declare function getCounterContent(items: CounterItem[], callSign: string, params?: any, executeScript?: boolean, options?: ReferenceOptions): Promise<CounterContent | false>;
|
|
52
56
|
export declare function getAllCounterItems(types?: ResourceType[], baseDir?: string): Promise<CounterItem[]>;
|
|
53
57
|
/**
|
|
54
58
|
* Find all template files - convenience wrapper around recursiveScanForFiles
|
package/package.json
CHANGED