codecartographer-pi 0.6.0 → 0.8.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.
@@ -1,19 +1,32 @@
1
- // Flag parser for /codecarto-next. The user invokes the slash command with
2
- // an optional "--llm-steer" or "--no-llm-steer" override. We parse and
3
- // validate; index.ts decides how to merge the override with workspace
4
- // config to compute the effective "should we run the LLM rewriter?" bit.
5
- const KNOWN = new Set(["--llm-steer", "--no-llm-steer"]);
1
+ // Flag parser for /codecarto-next. Recognized flags:
2
+ // --llm-steer / --no-llm-steer override the workspace config's
3
+ // llm_steer_next_phase per invocation.
4
+ // --auto — run the entire pipeline end-to-end.
5
+ // --strict — only with --auto; stop on PASS WITH GAPS
6
+ // instead of auto-advancing.
7
+ //
8
+ // The parser returns a populated NextFlags shape and never throws. index.ts
9
+ // decides how to surface errors (unknown flags + invalid combinations) and
10
+ // how to compose --llm-steer with workspace config.
11
+ const KNOWN = new Set(["--llm-steer", "--no-llm-steer", "--auto", "--strict"]);
6
12
  export function parseNextFlags(args) {
7
13
  const tokens = args.trim().split(/\s+/).filter((t) => t.length > 0);
8
- const result = { unknown: [] };
14
+ const result = { auto: false, strict: false, unknown: [] };
9
15
  for (const t of tokens) {
10
16
  if (t === "--llm-steer")
11
17
  result.llmSteerOverride = true;
12
18
  else if (t === "--no-llm-steer")
13
19
  result.llmSteerOverride = false;
20
+ else if (t === "--auto")
21
+ result.auto = true;
22
+ else if (t === "--strict")
23
+ result.strict = true;
14
24
  else
15
25
  result.unknown.push(t);
16
26
  }
27
+ if (result.strict && !result.auto) {
28
+ result.error = "Flag --strict requires --auto.";
29
+ }
17
30
  return result;
18
31
  }
19
32
  export const KNOWN_NEXT_FLAGS = [...KNOWN];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codecartographer-pi",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "CodeCartographer packaged for Pi as an extension-driven workflow wrapper.",
5
5
  "type": "module",
6
6
  "keywords": [