@aicopycoders/exodus 2026.9.1800-beta.0 → 2026.9.1900-beta.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.
@@ -1,8 +1,10 @@
1
1
  import { type ApiResponse } from "../lib/client.js";
2
+ import type { FlagOccurrence } from "../lib/args.js";
2
3
  import { type PollOptions, type PollResult } from "../lib/poll.js";
3
4
  import { LEGACY_WORKFLOW_RUN_STATUS_VALUES, type RunStatus } from "../lib/runStatus.js";
4
5
  import { type RunDeliverySummary } from "../lib/runVerdict.js";
5
6
  import { type Channel } from "../lib/channel.js";
7
+ import { type VoiceMap } from "./video.js";
6
8
  export declare const helpText: string;
7
9
  export type WorkflowNodeKind = "brief" | "brief-form" | "asset" | "bot" | "primer" | "image" | "image-rig" | "rig" | "storyboard" | "reference" | "scene-frames" | "video" | "voiceover" | "output" | "call" | "show-set" | "show-cast" | "show-voices" | "product-truth" | "transform" | "formatter" | "splitter" | "collector" | "checkpoint" | "prompt";
8
10
  export type WorkflowSlotState = "locked" | "auto" | "ask" | "inferred";
@@ -407,6 +409,7 @@ interface RunFlowOptions {
407
409
  fill?: string;
408
410
  autoApprove?: boolean;
409
411
  imageRigOverrides?: Record<string, unknown>;
412
+ voices?: VoiceMap;
410
413
  wait: boolean;
411
414
  json: boolean;
412
415
  out?: string;
@@ -414,8 +417,8 @@ interface RunFlowOptions {
414
417
  onWarningLine?: (line: string) => void;
415
418
  }
416
419
  export declare function formatPauseNotice(pauseReason: WorkflowPauseReason | undefined, runId: string, dashboardUrl: string): string[];
417
- export declare function parseRawInputFlags(args: string[]): Record<string, string>;
418
- export declare function parseInputFlags(args: string[], readFile?: (path: string) => string): Record<string, string>;
420
+ export declare function parseRawInputFlags(occurrences: FlagOccurrence[]): Record<string, string>;
421
+ export declare function parseInputFlags(occurrences: FlagOccurrence[], readFile?: (path: string) => string): Record<string, string>;
419
422
  export declare const ASSET_UPLOAD_POLICY: Record<WorkflowMediaType, {
420
423
  mimeByExtension: Record<string, string>;
421
424
  maxBytes: number;
@@ -424,10 +427,11 @@ export declare const ASSET_UPLOAD_POLICY: Record<WorkflowMediaType, {
424
427
  export declare const NO_DELIVERIES_WARNING: string;
425
428
  export declare function noDeliveriesWarning(described: unknown): string | undefined;
426
429
  export declare function serverWarningsToPrint(serverWarnings: unknown, alreadyPrinted: string[]): string[];
427
- export declare function rejectTerminalFlag(args: string[]): void;
430
+ export declare function rejectTerminalFlag(occurrences: FlagOccurrence[]): void;
428
431
  export declare function parseAutoApproveFlag(args: string[]): boolean;
429
- export declare function parseRigOverridesFlag(args: string[], readFile?: (path: string) => string): Record<string, unknown> | undefined;
430
- export declare function parseFillFlag(args: string[]): string | undefined;
432
+ export declare function parseRigOverridesFlag(occurrences: FlagOccurrence[], readFile?: (path: string) => string): Record<string, unknown> | undefined;
433
+ export declare function parseVoicesFlag(occurrences: FlagOccurrence[], readFile?: (path: string) => string): VoiceMap | undefined;
434
+ export declare function parseFillFlag(occurrences: FlagOccurrence[]): string | undefined;
431
435
  export declare function formatWorkflowList(workflows: WorkflowListItem[]): string;
432
436
  export declare function formatRecentRuns(runs: WorkflowRunProjection[]): string;
433
437
  export declare function formatWorkflowVersions(versions: WorkflowVersion[]): string;
@@ -583,9 +587,9 @@ export declare function repairFlow(runId: string, action: "retry" | "skip" | "ki
583
587
  json: boolean;
584
588
  onProgressLine?: (line: string) => void;
585
589
  }, deps: WorkflowRunDeps): Promise<FlowResult>;
586
- export declare function parseSlotFlags(args: string[]): Record<string, string>;
590
+ export declare function parseSlotFlags(occurrences: FlagOccurrence[]): Record<string, string>;
587
591
  export declare function answerFlow(runId: string, values: Record<string, string>, opts: {
588
592
  json: boolean;
589
593
  }, deps: WorkflowRunDeps): Promise<FlowResult>;
590
- export declare function run(flags: Record<string, string | boolean>): Promise<void>;
594
+ export declare function run(flags: Record<string, string | boolean>, occurrences: FlagOccurrence[]): Promise<void>;
591
595
  export {};
@@ -9,7 +9,7 @@ import { runVerdict } from "../lib/runVerdict.js";
9
9
  import { workflowToYaml, parseWorkflowText } from "../lib/workflowText.js";
10
10
  import { missingRouteLine } from "../lib/route-support.js";
11
11
  import { getChannel } from "../lib/channel.js";
12
- import { asVideoRun, classifyRun, stopLines } from "./video.js";
12
+ import { asVideoRun, classifyRun, reviewUrl, stopLines, } from "./video.js";
13
13
  export const helpText = `
14
14
  exodus workflow — List, describe, run, inspect, import, and export saved workflows
15
15
 
@@ -20,7 +20,7 @@ Usage:
20
20
  exodus workflow templates [list] [--json]
21
21
  exodus workflow templates export <key> [--out <file>] [--json]
22
22
  exodus workflow schema [--kind <kind>] [--face <face>] [--json]
23
- exodus workflow run <workflowId|name> [--fill <name>] [--input key=value ...] [--input <fileField>=<path> ...] [--rig-overrides <json|@file>] [--auto-approve] [--wait] [--out <dir>] [--json]
23
+ exodus workflow run <workflowId|name> [--fill <name>] [--input key=value ...] [--input <fileField>=<path> ...] [--rig-overrides <json|@file>] [--voices <json|@voices.json>] [--auto-approve] [--wait] [--out <dir>] [--json]
24
24
  exodus workflow status [--json]
25
25
  exodus workflow status --id <runId> [--out <dir>] [--json]
26
26
  exodus workflow cancel <runId> [--reason "..."] [--json]
@@ -83,6 +83,25 @@ Flags:
83
83
  before anything runs, and the error names it. On
84
84
  "triggers fire" it REPLACES the schedule's own
85
85
  overrides for that one test fire.
86
+ --voices <json> (run) Give the ad's characters their voices at the
87
+ moment the run starts, instead of at the storyboard
88
+ review. Keyed by the names the SCRIPT uses for its
89
+ speakers ("HOST 1") — the planner's character ids
90
+ (C1, C2) do not exist yet when a run starts. Takes a
91
+ JSON object, or @path to a .json file holding one:
92
+ --voices @voices.json
93
+ --voices '{"HOST 1":"<voiceId>"}'
94
+ Same file "exodus video voices <run> --from" reads at
95
+ the review, so a brand keeps ONE voices.json for both.
96
+ A speaker the script does not have, the same speaker
97
+ named twice, or a voice ElevenLabs does not have stops
98
+ the launch before the run is created — nothing is
99
+ spent, and the message says which one. A workflow whose
100
+ script is written by a bot (so nobody knows the speaker
101
+ names at the start) is told to use "exodus video voices
102
+ <run>" at the storyboard review instead. Voice ids
103
+ belong to the brand's own folder — never put them in a
104
+ shared workflow or template.
86
105
  --auto-approve (run) Deliberately unattended launch: every Checkpoint
87
106
  box this run stops at is approved automatically, with
88
107
  whatever it was holding left exactly as it is, and the
@@ -174,6 +193,7 @@ Examples:
174
193
  exodus workflow run "Launch Flow" --auto-approve --wait
175
194
  exodus workflow run "Product Shots" --rig-overrides '{"rig_1":{"lines":{"line_1":{"count":3}}}}'
176
195
  exodus workflow run "Product Shots" --rig-overrides @rig.json --wait
196
+ exodus workflow run "Podcast Ad" --input script=@script.txt --voices @voices.json --wait
177
197
  exodus workflow run "Launch Flow" --wait --out ./deliverables
178
198
  exodus workflow status # recent runs + their ids
179
199
  exodus workflow status --id wr_123
@@ -235,6 +255,19 @@ Notes:
235
255
  message says which key was wrong. A trigger can carry the same payload in its
236
256
  YAML ("imageRigOverrides:" beside its schedule), so a Monday schedule and a
237
257
  Friday one can fire the same workflow at different sizes.
258
+ "workflow run --voices" hands a video run its voices at the start, so a brand
259
+ that always uses the same hosts stops choosing them by hand on every run. The
260
+ file is keyed by the names the script uses for its speakers, because that is
261
+ all that exists before the planner has run — it is the SAME voices.json
262
+ "exodus video voices <run> --from" reads at the storyboard review, so one file
263
+ per brand serves both moments. A speaker the script does not have, the same
264
+ speaker named twice, or a voice ElevenLabs does not have stops the launch
265
+ before the run exists and nothing is spent. When the storyboard is planned,
266
+ each named speaker's character already has their voice, and "exodus video
267
+ voices <run>" shows them set. A workflow whose script is written by a bot has
268
+ no speaker names to key on at the start, so it is refused with a pointer at
269
+ the review-time command. Keep voice ids in the brand's own folder, never in a
270
+ shared workflow or template. (#1846)
238
271
  workflow triggers are addressed by 1-based position — a trigger carries no id,
239
272
  so the CLI reads the live list from the export contract and sends a fingerprint
240
273
  of the trigger's fields as the guard; a concurrent edit fails loud rather than
@@ -320,6 +353,7 @@ const VALUE_FLAGS = new Set([
320
353
  "slot",
321
354
  "reject",
322
355
  "rig-overrides",
356
+ "voices",
323
357
  "note",
324
358
  ]);
325
359
  function defaultMkdirp(dir) {
@@ -518,35 +552,25 @@ function normalizeMultiValue(value) {
518
552
  .filter((p) => p.length > 0)
519
553
  .join(", ");
520
554
  }
521
- export function parseRawInputFlags(args) {
555
+ export function parseRawInputFlags(occurrences) {
522
556
  const inputs = {};
523
- for (let i = 0; i < args.length; i++) {
524
- const arg = args[i];
525
- let raw;
526
- if (arg === "--input") {
527
- raw = args[i + 1];
528
- i++;
529
- }
530
- else if (arg.startsWith("--input=")) {
531
- raw = arg.slice("--input=".length);
532
- }
533
- else {
557
+ for (const { flag, value } of occurrences) {
558
+ if (flag !== "input")
534
559
  continue;
535
- }
536
- if (!raw)
560
+ if (!value)
537
561
  throw new Error("--input requires key=value");
538
- const eq = raw.indexOf("=");
562
+ const eq = value.indexOf("=");
539
563
  if (eq <= 0)
540
- throw new Error(`--input must be key=value (got "${raw}")`);
541
- const key = raw.slice(0, eq).trim();
564
+ throw new Error(`--input must be key=value (got "${value}")`);
565
+ const key = value.slice(0, eq).trim();
542
566
  if (!key)
543
- throw new Error(`--input must include a key (got "${raw}")`);
544
- inputs[key] = raw.slice(eq + 1);
567
+ throw new Error(`--input must include a key (got "${value}")`);
568
+ inputs[key] = value.slice(eq + 1);
545
569
  }
546
570
  return inputs;
547
571
  }
548
- export function parseInputFlags(args, readFile) {
549
- const inputs = parseRawInputFlags(args);
572
+ export function parseInputFlags(occurrences, readFile) {
573
+ const inputs = parseRawInputFlags(occurrences);
550
574
  for (const [key, value] of Object.entries(inputs)) {
551
575
  inputs[key] = expandInputValue(key, value, readFile);
552
576
  }
@@ -842,12 +866,10 @@ async function prepareRunInputs(workflowId, raw, deps, note) {
842
866
  }
843
867
  return { inputs: prepared, warnings };
844
868
  }
845
- export function rejectTerminalFlag(args) {
846
- for (const arg of args) {
847
- if (arg === "--terminal" || arg.startsWith("--terminal=")) {
848
- throw new Error("--terminal is no longer supported: a run now executes the whole " +
849
- "workflow or it doesn't start. Re-run without --terminal.");
850
- }
869
+ export function rejectTerminalFlag(occurrences) {
870
+ if (occurrences.some((o) => o.flag === "terminal")) {
871
+ throw new Error("--terminal is no longer supported: a run now executes the whole " +
872
+ "workflow or it doesn't start. Re-run without --terminal.");
851
873
  }
852
874
  }
853
875
  export function parseAutoApproveFlag(args) {
@@ -860,21 +882,11 @@ export function parseAutoApproveFlag(args) {
860
882
  }
861
883
  return false;
862
884
  }
863
- export function parseRigOverridesFlag(args, readFile) {
885
+ export function parseRigOverridesFlag(occurrences, readFile) {
864
886
  let raw;
865
- for (let i = 0; i < args.length; i++) {
866
- const arg = args[i];
867
- let value;
868
- if (arg === "--rig-overrides") {
869
- value = args[i + 1];
870
- i++;
871
- }
872
- else if (arg.startsWith("--rig-overrides=")) {
873
- value = arg.slice("--rig-overrides=".length);
874
- }
875
- else {
887
+ for (const { flag, value } of occurrences) {
888
+ if (flag !== "rig-overrides")
876
889
  continue;
877
- }
878
890
  if (value === undefined || value.startsWith("--")) {
879
891
  throw new Error("--rig-overrides requires JSON or @path/to/file.json");
880
892
  }
@@ -917,25 +929,62 @@ export function parseRigOverridesFlag(args, readFile) {
917
929
  }
918
930
  return parsed;
919
931
  }
920
- export function parseFillFlag(args) {
921
- let name;
922
- for (let i = 0; i < args.length; i++) {
923
- const arg = args[i];
924
- let raw;
925
- if (arg === "--fill") {
926
- raw = args[i + 1];
927
- i++;
932
+ export function parseVoicesFlag(occurrences, readFile) {
933
+ let raw;
934
+ for (const { flag, value } of occurrences) {
935
+ if (flag !== "voices")
936
+ continue;
937
+ if (value === undefined || value.startsWith("--")) {
938
+ throw new Error("--voices requires JSON or @path/to/voices.json");
928
939
  }
929
- else if (arg.startsWith("--fill=")) {
930
- raw = arg.slice("--fill=".length);
940
+ raw = value;
941
+ }
942
+ if (raw === undefined)
943
+ return undefined;
944
+ let text = raw.trim();
945
+ if (!text)
946
+ throw new Error("--voices requires JSON or @path/to/voices.json");
947
+ if (text.startsWith("@@")) {
948
+ text = text.slice(1);
949
+ }
950
+ else if (text.startsWith("@")) {
951
+ const filePath = text.slice(1);
952
+ if (!filePath) {
953
+ throw new Error("--voices @<file> needs a file path after \"@\"");
931
954
  }
932
- else {
933
- continue;
955
+ if (!readFile) {
956
+ throw new Error(`--voices: cannot load @${filePath} here (no file access)`);
934
957
  }
935
- if (raw === undefined || raw.startsWith("--")) {
958
+ try {
959
+ text = readFile(filePath);
960
+ }
961
+ catch (e) {
962
+ const msg = e instanceof Error ? e.message : String(e);
963
+ throw new Error(`--voices: could not read file "${filePath}": ${msg}`);
964
+ }
965
+ }
966
+ let parsed;
967
+ try {
968
+ parsed = JSON.parse(text);
969
+ }
970
+ catch (e) {
971
+ const msg = e instanceof Error ? e.message : String(e);
972
+ throw new Error(`--voices is not valid JSON: ${msg}`);
973
+ }
974
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
975
+ throw new Error("--voices must be a JSON object keyed by the script's speaker names, e.g. {\"HOST 1\":\"<voiceId>\"}");
976
+ }
977
+ return parsed;
978
+ }
979
+ export function parseFillFlag(occurrences) {
980
+ let name;
981
+ for (const { flag, value } of occurrences) {
982
+ if (flag !== "fill")
983
+ continue;
984
+ if (value === undefined || value.startsWith("--")) {
936
985
  throw new Error("--fill requires a saved fill's name");
937
986
  }
938
- const trimmed = raw.trim();
987
+ const trimmed = value.trim();
939
988
  if (!trimmed)
940
989
  throw new Error("--fill requires a saved fill's name");
941
990
  name = trimmed;
@@ -1723,6 +1772,20 @@ export async function botsFlow(opts, deps) {
1723
1772
  return { code: 0, lines: [JSON.stringify(catalog)] };
1724
1773
  return { code: 0, lines: [formatBotsList(catalog, opts.category)] };
1725
1774
  }
1775
+ function launchVoicesLine(attached) {
1776
+ if (!Array.isArray(attached))
1777
+ return undefined;
1778
+ const said = [];
1779
+ for (const raw of attached) {
1780
+ if (!raw || typeof raw !== "object")
1781
+ continue;
1782
+ const { speaker, voiceId, label } = raw;
1783
+ if (typeof speaker !== "string" || typeof voiceId !== "string")
1784
+ continue;
1785
+ said.push(`${speaker} → ${typeof label === "string" && label !== "" ? label : voiceId}`);
1786
+ }
1787
+ return said.length > 0 ? `Voices: ${said.join(", ")}` : undefined;
1788
+ }
1726
1789
  export async function runFlow(workflowRef, opts, deps) {
1727
1790
  let workflowId;
1728
1791
  try {
@@ -1765,6 +1828,7 @@ export async function runFlow(workflowRef, opts, deps) {
1765
1828
  ...(opts.fill && opts.fill.trim() !== "" ? { fill: opts.fill.trim() } : {}),
1766
1829
  ...(opts.autoApprove === true ? { autoApprove: true } : {}),
1767
1830
  ...(opts.imageRigOverrides ? { imageRigOverrides: opts.imageRigOverrides } : {}),
1831
+ ...(opts.voices ? { voices: opts.voices } : {}),
1768
1832
  launchedVia: "cli",
1769
1833
  };
1770
1834
  const start = await deps.post(RUN_PATH, body);
@@ -1778,6 +1842,7 @@ export async function runFlow(workflowRef, opts, deps) {
1778
1842
  const base = { ...data, workflowId };
1779
1843
  if (opts.json && !opts.wait)
1780
1844
  return { code: 0, lines: [JSON.stringify(base)] };
1845
+ const voicesLine = launchVoicesLine(data?.launchVoices);
1781
1846
  const lines = opts.json
1782
1847
  ? []
1783
1848
  : [
@@ -1785,6 +1850,7 @@ export async function runFlow(workflowRef, opts, deps) {
1785
1850
  "Workflow run started.",
1786
1851
  `runId: ${data.runId}`,
1787
1852
  `triggerRunId: ${data.triggerRunId}`,
1853
+ ...(voicesLine ? [voicesLine] : []),
1788
1854
  `Poll: exodus workflow status --id ${data.runId}`,
1789
1855
  ];
1790
1856
  if (!opts.wait) {
@@ -1903,7 +1969,8 @@ async function waitForRun(runId, opts, deps) {
1903
1969
  lines.push("", landOnPark.headline, ...formatPauseNotice(landOnPark.pauseReason, runId, dashboardUrl).slice(1));
1904
1970
  }
1905
1971
  if (videoStop) {
1906
- lines.push("", ...stopLines(videoStop, runId, deps.dashboardUrl ?? getDashboardUrl()));
1972
+ const review = reviewUrl(deps.dashboardUrl ?? getDashboardUrl(), asVideoRun(pollResult.data));
1973
+ lines.push("", ...stopLines(videoStop, runId, review));
1907
1974
  }
1908
1975
  return { code: pollResult.ok ? 0 : 1, lines };
1909
1976
  }
@@ -2749,30 +2816,20 @@ async function resumeAndMaybeWait(runId, triggerRunId, headline, opts, deps, lan
2749
2816
  const prefix = opts.onProgressLine ? [] : startLines;
2750
2817
  return { code: waited.code, lines: [...prefix, ...waited.lines] };
2751
2818
  }
2752
- export function parseSlotFlags(args) {
2819
+ export function parseSlotFlags(occurrences) {
2753
2820
  const values = {};
2754
- for (let i = 0; i < args.length; i++) {
2755
- const arg = args[i];
2756
- let raw;
2757
- if (arg === "--slot") {
2758
- raw = args[i + 1];
2759
- i++;
2760
- }
2761
- else if (arg.startsWith("--slot=")) {
2762
- raw = arg.slice("--slot=".length);
2763
- }
2764
- else {
2821
+ for (const { flag, value } of occurrences) {
2822
+ if (flag !== "slot")
2765
2823
  continue;
2766
- }
2767
- if (!raw)
2824
+ if (!value)
2768
2825
  throw new Error("--slot requires key=value");
2769
- const eq = raw.indexOf("=");
2826
+ const eq = value.indexOf("=");
2770
2827
  if (eq <= 0)
2771
- throw new Error(`--slot must be key=value (got "${raw}")`);
2772
- const key = raw.slice(0, eq).trim();
2828
+ throw new Error(`--slot must be key=value (got "${value}")`);
2829
+ const key = value.slice(0, eq).trim();
2773
2830
  if (!key)
2774
- throw new Error(`--slot must include a key (got "${raw}")`);
2775
- values[key] = raw.slice(eq + 1);
2831
+ throw new Error(`--slot must include a key (got "${value}")`);
2832
+ values[key] = value.slice(eq + 1);
2776
2833
  }
2777
2834
  return values;
2778
2835
  }
@@ -2844,7 +2901,7 @@ async function maybeReadStdin(flags) {
2844
2901
  return undefined;
2845
2902
  return raw.endsWith("\n") ? raw.slice(0, -1) : raw;
2846
2903
  }
2847
- export async function run(flags) {
2904
+ export async function run(flags, occurrences) {
2848
2905
  const positional = parsePositional();
2849
2906
  const [sub, ...rest] = positional;
2850
2907
  const json = !!flags["json"];
@@ -2900,19 +2957,21 @@ export async function run(flags) {
2900
2957
  const workflowRef = rest[0];
2901
2958
  if (!workflowRef) {
2902
2959
  console.error("Error: workflow run requires <workflowId|name>.");
2903
- console.log("Usage: exodus workflow run <workflowId|name> [--fill <name>] [--input key=value ...] [--input <fileField>=./path/to/file ...] [--auto-approve] [--wait] [--json]");
2960
+ console.log("Usage: exodus workflow run <workflowId|name> [--fill <name>] [--input key=value ...] [--input <fileField>=./path/to/file ...] [--rig-overrides <json|@file>] [--voices <json|@voices.json>] [--auto-approve] [--wait] [--json]");
2904
2961
  process.exit(1);
2905
2962
  }
2906
2963
  let inputs;
2907
2964
  let fill;
2908
2965
  let autoApprove;
2909
2966
  let imageRigOverrides;
2967
+ let voices;
2910
2968
  try {
2911
- inputs = parseRawInputFlags(process.argv.slice(3));
2912
- rejectTerminalFlag(process.argv.slice(3));
2913
- fill = parseFillFlag(process.argv.slice(3));
2969
+ inputs = parseRawInputFlags(occurrences);
2970
+ rejectTerminalFlag(occurrences);
2971
+ fill = parseFillFlag(occurrences);
2914
2972
  autoApprove = parseAutoApproveFlag(process.argv.slice(3));
2915
- imageRigOverrides = parseRigOverridesFlag(process.argv.slice(3), defaultDeps.readFile);
2973
+ imageRigOverrides = parseRigOverridesFlag(occurrences, defaultDeps.readFile);
2974
+ voices = parseVoicesFlag(occurrences, defaultDeps.readFile);
2916
2975
  }
2917
2976
  catch (e) {
2918
2977
  console.error(`Error: ${e instanceof Error ? e.message : String(e)}`);
@@ -2923,6 +2982,7 @@ export async function run(flags) {
2923
2982
  fill,
2924
2983
  autoApprove,
2925
2984
  imageRigOverrides,
2985
+ voices,
2926
2986
  wait: flags["wait"] === true,
2927
2987
  json,
2928
2988
  out: flagString(flags, "out"),
@@ -3055,7 +3115,7 @@ export async function run(flags) {
3055
3115
  }
3056
3116
  let values;
3057
3117
  try {
3058
- values = parseSlotFlags(process.argv.slice(3));
3118
+ values = parseSlotFlags(occurrences);
3059
3119
  }
3060
3120
  catch (e) {
3061
3121
  console.error(`Error: ${e instanceof Error ? e.message : String(e)}`);
@@ -3093,7 +3153,7 @@ export async function run(flags) {
3093
3153
  }
3094
3154
  let fireOverrides;
3095
3155
  try {
3096
- fireOverrides = parseRigOverridesFlag(process.argv.slice(3), defaultDeps.readFile);
3156
+ fireOverrides = parseRigOverridesFlag(occurrences, defaultDeps.readFile);
3097
3157
  }
3098
3158
  catch (e) {
3099
3159
  console.error(`Error: ${e instanceof Error ? e.message : String(e)}`);
@@ -0,0 +1,10 @@
1
+ export interface FlagOccurrence {
2
+ flag: string;
3
+ value: string | undefined;
4
+ }
5
+ export interface ParsedArgs {
6
+ command: string;
7
+ flags: Record<string, string | boolean>;
8
+ occurrences: FlagOccurrence[];
9
+ }
10
+ export declare function parseArgs(argv: string[]): ParsedArgs;
@@ -0,0 +1,39 @@
1
+ export function parseArgs(argv) {
2
+ const [, , rawCommand = "help", ...rest] = argv;
3
+ const command = ["--help", "-h", "-help"].includes(rawCommand) ? "help" : rawCommand;
4
+ const flags = {};
5
+ const occurrences = [];
6
+ let i = 0;
7
+ while (i < rest.length) {
8
+ const arg = rest[i];
9
+ if (arg === "--help" || arg === "-h") {
10
+ flags["help"] = true;
11
+ i++;
12
+ continue;
13
+ }
14
+ if (arg.startsWith("--")) {
15
+ const key = arg.slice(2);
16
+ const next = rest[i + 1];
17
+ const eq = key.indexOf("=");
18
+ occurrences.push(eq === -1
19
+ ? { flag: key, value: next }
20
+ : { flag: key.slice(0, eq), value: key.slice(eq + 1) });
21
+ if (key.startsWith("no-")) {
22
+ flags[key.slice(3)] = false;
23
+ i++;
24
+ }
25
+ else if (next !== undefined && !next.startsWith("--")) {
26
+ flags[key] = next;
27
+ i += 2;
28
+ }
29
+ else {
30
+ flags[key] = true;
31
+ i++;
32
+ }
33
+ }
34
+ else {
35
+ i++;
36
+ }
37
+ }
38
+ return { command, flags, occurrences };
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aicopycoders/exodus",
3
- "version": "2026.9.1800-beta.0",
3
+ "version": "2026.9.1900-beta.1",
4
4
  "description": "CLI + Claude Code skills for the Copycoders Exodus ad pipeline",
5
5
  "repository": {
6
6
  "type": "git",