flanders 0.8.0 → 0.10.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.
@@ -141,11 +141,16 @@ function formatActiveTime(seconds) {
141
141
  return `${h}h${pad2(m)}m${pad2(s % 60)}s`;
142
142
  }
143
143
  const LIVE_ACTIVITIES = new Set(["implementing", "reviewing", "building", "testing"]);
144
- function formatHeaderLine(indexLabel, iteration, activity, taskNumber, title, cols) {
144
+ function formatHeaderLine(indexLabel, phaseMessage, iteration, activity, taskNumber, title, cols) {
145
145
  const segments = [];
146
146
  if (indexLabel != null) {
147
147
  segments.push({ text: indexLabel, color: exports.CYAN });
148
148
  }
149
+ if (phaseMessage != null) {
150
+ if (segments.length > 0)
151
+ segments.push({ text: " " });
152
+ segments.push({ text: phaseMessage, color: exports.MAGENTA });
153
+ }
149
154
  if (iteration != null) {
150
155
  if (segments.length > 0)
151
156
  segments.push({ text: " " });
@@ -233,7 +238,7 @@ function formatMetricsLine(task, plan, cols) {
233
238
  return renderSegmentsToWidth(compactSegments, cols);
234
239
  }
235
240
  function formatSnapshotHeader(indexLabel, iteration, taskNumber, title) {
236
- return formatHeaderLine(indexLabel, iteration, "done", taskNumber, title, Number.MAX_SAFE_INTEGER);
241
+ return formatHeaderLine(indexLabel, null, iteration, "done", taskNumber, title, Number.MAX_SAFE_INTEGER);
237
242
  }
238
243
  function formatSnapshotMetrics(taskTokens, taskSeconds, planTokens, planSeconds) {
239
244
  const tTok = formatTokens(taskTokens);
@@ -1,8 +1,10 @@
1
1
  import type { FsContext } from "../contexts";
2
+ import type { ToolName } from "../ai/ToolAdapter";
2
3
  export type FlandersRole = Readonly<{
3
- tool: "claude" | "codex";
4
+ tool: ToolName;
4
5
  model: string;
5
6
  effort: string;
7
+ fast: boolean;
6
8
  }>;
7
9
  export type FlandersReviewer = FlandersRole & Readonly<{
8
10
  optional: boolean;
@@ -4,6 +4,7 @@ exports.read = read;
4
4
  exports.readScope = readScope;
5
5
  exports.write = write;
6
6
  const fsUtils_1 = require("../system/fsUtils");
7
+ const toolNames_1 = require("../toolNames");
7
8
  const CONFIG_PATH = ".flanders/config.json";
8
9
  const CONFIG_DIR = ".flanders";
9
10
  const ALLOWED_TOP_LEVEL_KEYS = ["worker", "reviewers", "minimumReviews"];
@@ -55,7 +56,7 @@ function validateRole(role, name, filePath) {
55
56
  if (!("tool" in role) || typeof role["tool"] !== "string") {
56
57
  throw new Error(`Malformed config at ${filePath}: missing or invalid field "${name}.tool"`);
57
58
  }
58
- if (role["tool"] !== "claude" && role["tool"] !== "codex") {
59
+ if (!toolNames_1.TOOL_NAMES.includes(role["tool"])) {
59
60
  throw new Error(`Malformed config at ${filePath}: invalid value for "${name}.tool": "${role["tool"]}"`);
60
61
  }
61
62
  if (!("model" in role) || typeof role["model"] !== "string") {
@@ -64,6 +65,9 @@ function validateRole(role, name, filePath) {
64
65
  if (!("effort" in role) || typeof role["effort"] !== "string") {
65
66
  throw new Error(`Malformed config at ${filePath}: missing or invalid field "${name}.effort"`);
66
67
  }
68
+ if (!("fast" in role) || typeof role["fast"] !== "boolean") {
69
+ throw new Error(`Malformed config at ${filePath}: missing or invalid field "${name}.fast"`);
70
+ }
67
71
  }
68
72
  async function read(fs, args) {
69
73
  const projectPath = configPath(args.projectRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flanders",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Flanders never breaks a rule",
5
5
  "main": "lib/",
6
6
  "types": "lib/types",
@@ -22,7 +22,8 @@
22
22
  "watch": "npm run clean && npx tsc -p tsconfig.json -watch",
23
23
  "build": "npm run clean && npx tsc -p tsconfig.build.json",
24
24
  "build-debug": "npm run clean && npx tsc -p tsconfig.json",
25
- "test": "npm run build-debug && npx aaa --folder lib --include-files \"\\.test\\.js$\" --exclude-files node_modules --coverage-exclude node_modules"
25
+ "test": "npm run build-debug && npx aaa --folder lib --include-files \"\\.test\\.js$\" --exclude-files node_modules --coverage-exclude node_modules",
26
+ "test-with-coverage": "npm test -- --coverage-target 100 --summary"
26
27
  },
27
28
  "author": "Llorx",
28
29
  "license": "MIT",