@modality-counter/core 1.2.2 → 1.2.4

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -9,7 +9,7 @@ export type MethodReference = Record<string, {
9
9
  content?: string;
10
10
  }>;
11
11
  export declare function getReferenceData(referencesDir?: string): Promise<MethodReference>;
12
- export declare function buildReferences(folderPath: string | undefined, callSign: string): Promise<{
12
+ export declare function buildReferences(folderPath: string | undefined, methodId: string): Promise<{
13
13
  referenceInstructions: string[];
14
14
  referenceList: MethodReference;
15
15
  } | undefined>;
@@ -10,6 +10,7 @@ export { getCounterContent, getAllCounterItems, type CounterContent, type Counte
10
10
  export { setupMcpCounter } from "./mcp_counter";
11
11
  export { executeMethod } from "./execute_method";
12
12
  export { toCounterCLI } from "./toCounterCLI";
13
+ export { toCounterCLIHelp, toCounterMethodHelp, type HelpFormat } from "./toCounterCLIHelp";
13
14
  export { validateMethodFile } from "./schemas/methodology-validation.js";
14
15
  export { validateTemplateFile } from "./schemas/template-validation.js";
15
16
  export { validateProtocolFile } from "./schemas/protocol-validation.js";
@@ -0,0 +1,25 @@
1
+ export interface HelpFormat {
2
+ bold: (s: string) => string;
3
+ dim: (s: string) => string;
4
+ header: (s: string) => string;
5
+ example: (s: string) => string;
6
+ }
7
+ /**
8
+ * Sharable help metadata for the `prompt` subcommand entry in a host CLI's
9
+ * help generator. Usage lines describe argument shape; examples are derived
10
+ * from the methods actually present in `methodsDir` so they stay accurate.
11
+ */
12
+ export declare function toCounterMethodHelp(cliName: string, methodsDir: string): {
13
+ usage: string[];
14
+ examples: string[];
15
+ };
16
+ /**
17
+ * Mirror of `toCounterCLI(baseDir)(args)` for the `--help` path: returns a
18
+ * handler that prints per-method help for `<method-name> --help` and reports
19
+ * whether the args were consumed. When the method name is unknown the handler
20
+ * prints an error and exits.
21
+ *
22
+ * Pass `format` to render with ANSI colors (bold, dim, etc.); defaults to
23
+ * identity formatting (plain text) so the library has no terminal dependency.
24
+ */
25
+ export declare function toCounterCLIHelp(cliName: string, methodsDir: string, format?: HelpFormat): (args: string[]) => boolean;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.2.2",
2
+ "version": "1.2.4",
3
3
  "name": "@modality-counter/core",
4
4
  "repository": {
5
5
  "type": "git",