@kuralle-syrinx/cli 4.4.1 → 4.5.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.
@@ -0,0 +1,14 @@
1
+ import type { SessionFactory } from "./turn-runner.js";
2
+ export interface ResolvedAgent {
3
+ readonly factory: SessionFactory;
4
+ readonly label: string;
5
+ }
6
+ /**
7
+ * `spec` is `<module>[#namedExport]`, resolved relative to `baseDir` (the
8
+ * invoking project's cwd) when not absolute. The export must be a zero-arg
9
+ * factory returning a VoiceAgentSession (or a Promise of one) — the same
10
+ * shape `--agent` expects in dev-server.ts. Omit `#export` for a default
11
+ * export (or a `createSession` export, checked in that order).
12
+ */
13
+ export declare function resolveAgentFactory(spec: string, baseDir: string): Promise<ResolvedAgent>;
14
+ //# sourceMappingURL=agent-resolve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-resolve.d.ts","sourceRoot":"","sources":["../src/agent-resolve.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CA6C/F"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { type ExitCode } from "./exit-codes.js";
2
+ export interface CliIO {
3
+ readonly stdout: (line: string) => void;
4
+ readonly stderr: (line: string) => void;
5
+ }
6
+ export declare const defaultIO: CliIO;
7
+ export declare function main(argv: readonly string[], io?: CliIO): Promise<ExitCode>;
8
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AASA,OAAO,EAAyC,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAMvF,MAAM,WAAW,KAAK;IACpB,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AA2JF,wBAAsB,IAAI,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,KAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA0C5F"}
@@ -0,0 +1,38 @@
1
+ /** Commonly used in the Syrinx ecosystem — shown for convenience only. The CLI itself does not require any of these; whatever --agent resolves to owns its own provider requirements. */
2
+ export declare const WELL_KNOWN_PROVIDER_KEYS: readonly ["DEEPGRAM_API_KEY", "OPENAI_API_KEY", "CARTESIA_API_KEY", "GEMINI_API_KEY", "ELEVENLABS_API_KEY", "GROK_API_KEY"];
3
+ export type WellKnownProviderKey = (typeof WELL_KNOWN_PROVIDER_KEYS)[number];
4
+ export interface DoctorAgentReport {
5
+ readonly spec: string;
6
+ readonly resolved: boolean;
7
+ readonly label?: string;
8
+ readonly error?: string;
9
+ }
10
+ export interface DoctorReport {
11
+ readonly cliVersion: string;
12
+ readonly node: {
13
+ readonly version: string;
14
+ readonly platform: string;
15
+ };
16
+ readonly core: {
17
+ readonly package: string;
18
+ readonly resolved: boolean;
19
+ readonly version: string | undefined;
20
+ readonly cliMajor: string;
21
+ readonly coreMajor: string | undefined;
22
+ readonly majorMismatch: boolean;
23
+ };
24
+ /** Informational only — presence, never the value. This CLI does not require any specific set; see `agent`. */
25
+ readonly wellKnownProviderKeys: Readonly<Record<WellKnownProviderKey, boolean>>;
26
+ readonly agent: DoctorAgentReport | null;
27
+ readonly summary: string;
28
+ }
29
+ export interface RunDoctorOptions {
30
+ readonly cwd?: string;
31
+ readonly env?: Readonly<Record<string, string | undefined>>;
32
+ readonly nodeVersion?: string;
33
+ readonly platform?: string;
34
+ /** `--agent <module>#<export>` — when given, doctor resolves (imports + finds the callable export) but does not invoke it, so checking doesn't require live provider access. */
35
+ readonly agentSpec?: string;
36
+ }
37
+ export declare function runDoctor(opts?: RunDoctorOptions): Promise<DoctorReport>;
38
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../src/doctor.ts"],"names":[],"mappings":"AAgBA,yLAAyL;AACzL,eAAO,MAAM,wBAAwB,6HAA8H,CAAC;AAEpK,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE,QAAQ,CAAC,IAAI,EAAE;QACb,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;QACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;QACvC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;KACjC,CAAC;IACF,+GAA+G;IAC/G,QAAQ,CAAC,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,CAAC;IAChF,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;IAC5D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,gLAAgL;IAChL,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,SAAS,CAAC,IAAI,GAAE,gBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC,CA8ClF"}
@@ -0,0 +1,21 @@
1
+ export declare const EXIT_CODES: {
2
+ readonly SUCCESS: 0;
3
+ readonly INTERNAL: 1;
4
+ readonly USAGE: 2;
5
+ readonly CONFIG: 3;
6
+ readonly BACKEND: 4;
7
+ readonly ASSERTION: 5;
8
+ };
9
+ export type ExitCode = (typeof EXIT_CODES)[keyof typeof EXIT_CODES];
10
+ export declare const EXIT_CODE_TABLE: ReadonlyArray<{
11
+ readonly code: ExitCode;
12
+ readonly name: string;
13
+ readonly meaning: string;
14
+ }>;
15
+ /** A typed error carrying the exit code it should terminate the process with. */
16
+ export declare class CliError extends Error {
17
+ readonly exitCode: ExitCode;
18
+ readonly details: Record<string, unknown> | undefined;
19
+ constructor(exitCode: ExitCode, message: string, details?: Record<string, unknown>);
20
+ }
21
+ //# sourceMappingURL=exit-codes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU;;;;;;;CAOb,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAEpE,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAOvH,CAAC;AAEF,iFAAiF;AACjF,qBAAa,QAAS,SAAQ,KAAK;IACjC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;gBAE1C,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMnF"}
@@ -0,0 +1,38 @@
1
+ export declare const FIXTURE_FORMAT = "syrinx.fixture.v1";
2
+ export interface FixtureSidecar {
3
+ readonly format: string;
4
+ readonly turnId?: string;
5
+ readonly expectedTranscript?: string;
6
+ readonly agentText?: string;
7
+ readonly audioFile: string;
8
+ readonly audio: {
9
+ readonly sampleRateHz: number;
10
+ readonly channels: number;
11
+ readonly encoding: string;
12
+ };
13
+ readonly capture?: {
14
+ readonly inputSampleRateHz?: number;
15
+ };
16
+ }
17
+ export interface LoadedFixture {
18
+ readonly sidecarPath: string;
19
+ readonly sidecar: FixtureSidecar;
20
+ /** The paired WAV file this fixture replays — prefers the sibling "captured.wav" the Studio actually wrote. */
21
+ readonly wavPath: string;
22
+ }
23
+ /**
24
+ * Parse and validate a fixture sidecar JSON file, refusing (CliError, USAGE) on
25
+ * anything this CLI cannot honestly replay: an unrecognised format, or capture
26
+ * conditions (sample rate / channel count) that would silently change the
27
+ * transcript if replayed as-is.
28
+ */
29
+ export declare function loadFixture(sidecarPath: string): LoadedFixture;
30
+ /** Compare on words, not punctuation — STT capitalises and punctuates inconsistently. */
31
+ export declare function normalizeTranscript(text: string): string;
32
+ export interface TranscriptAssertion {
33
+ readonly expectedTranscript: string;
34
+ readonly actualTranscript: string;
35
+ readonly match: boolean;
36
+ }
37
+ export declare function assertTranscript(expectedTranscript: string, actualTranscript: string): TranscriptAssertion;
38
+ //# sourceMappingURL=fixture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixture.d.ts","sourceRoot":"","sources":["../src/fixture.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IACxG,QAAQ,CAAC,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5D;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,+GAA+G;IAC/G,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAsC9D;AAED,yFAAyF;AACzF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,gBAAgB,CAAC,kBAAkB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,mBAAmB,CAM1G"}
package/dist/help.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const HELP_TEXT: string;
2
+ //# sourceMappingURL=help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,QA+DrB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ import { dirname, join, resolve as resolvePath } from "node:path";
82
82
  // package.json
83
83
  var package_default = {
84
84
  name: "@kuralle-syrinx/cli",
85
- version: "4.3.0",
85
+ version: "4.5.0",
86
86
  private: false,
87
87
  description: "Agent-facing CLI for Syrinx \u2014 run a turn or a text exchange with deterministic, machine-readable (--json) output and exit codes. Not a console: no REPL, no chat loop, no microphone.",
88
88
  keywords: [
@@ -117,9 +117,10 @@ var package_default = {
117
117
  "./turn-runner": "./src/turn-runner.ts"
118
118
  },
119
119
  scripts: {
120
- build: "node scripts/build.mjs",
120
+ build: "node scripts/build.mjs && tsc -p tsconfig.build.json --emitDeclarationOnly",
121
121
  typecheck: "tsc --noEmit",
122
- test: "vitest run"
122
+ test: "vitest run",
123
+ prepublishOnly: "node scripts/build.mjs && tsc -p tsconfig.build.json --emitDeclarationOnly"
123
124
  },
124
125
  dependencies: {
125
126
  "@kuralle-syrinx/core": "workspace:*",
@@ -131,6 +132,14 @@ var package_default = {
131
132
  esbuild: "^0.28.1",
132
133
  typescript: "^5.7.0",
133
134
  vitest: "^3.2.6"
135
+ },
136
+ publishConfig: {
137
+ exports: {
138
+ "./turn-runner": {
139
+ types: "./dist/turn-runner.d.ts",
140
+ default: "./dist/turn-runner.js"
141
+ }
142
+ }
134
143
  }
135
144
  };
136
145