@feigi/fleet-ctl 3.22.2 → 3.22.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.22.2",
3
+ "version": "3.22.3",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -60,9 +60,12 @@ export function classifyRole(signals) {
60
60
  // #1505: a dispatch that recorded `memory-housekeeper` books memory whatever
61
61
  // it called the member, so the eleven rows that shared one definition across
62
62
  // three buckets collapse to one. The NAME stays a signal beside it because a
63
- // missing definition is a real category here rather than a hole — an
64
- // untyped `task` dispatch records none at all — and the memory members named
65
- // `memory-proxy-session-review-2-3` have nothing else to be classified on;
63
+ // definition that says nothing about the role is a real category here rather
64
+ // than a hole — an untyped dispatch records the generic `task` (the
65
+ // transcript's `session_init` writes it for the default agent; the field is
66
+ // blank only where that line itself is absent), which names no memory agent
67
+ // and matches none of the definition branches below — and the memory members
68
+ // named `memory-proxy-session-review-2-3` have nothing else to be classified on;
66
69
  // drop it and they fall to "other", which is the same defect wearing the
67
70
  // other shoe. `desc` is excluded on purpose: every memory-adjacent fleet
68
71
  // member's own prompt says "memory-proxy" somewhere, so blending the prose
@@ -177,13 +177,26 @@ test("the memory exclusion reads the recorded DEFINITION, so any member name boo
177
177
  assert.equal(classifyRole({ agentDefinition: "memory-proxy", memberName: "review-eval", spawnDepth: 2 }), "memory");
178
178
  });
179
179
 
180
- test("an untyped dispatch that recorded no definition still classifies by its NAME", () => {
181
- // #1505's other half. A dispatch before typed agents existed records no
182
- // definition at all — a closed category, not a hole — so the name is the only
183
- // memory signal those members have. Measured over the sidecars on disk: three
184
- // live members rest on this, and dropping it would put `memory-housekeeper`
185
- // (named for its own definition, at depth 1) in the SPECIALIST bucket, which
186
- // is the very defect #1505 reports.
180
+ test("an untyped dispatch, recorded as the generic `task` or as no definition, still classifies by its NAME", () => {
181
+ // #1505's other half. The default agent records the literal `task` in
182
+ // `session_init`, and a transcript with no `session_init` line records no
183
+ // definition at all; neither names a memory agent or any fleet definition, so
184
+ // the name is the only memory signal those members have. Re-measured
185
+ // 2026-10-04: over the Claude Code `meta.json` sidecars under
186
+ // ~/.claude/projects (the reader #1505 fixed, since dropped from
187
+ // member-record.mjs) three members booked memory on their name alone, each
188
+ // with no definition recorded and none with `task`; over the omp members on
189
+ // disk none did, under `task` or without a definition. Dropping the name
190
+ // would put `memory-housekeeper` (named for its own definition, at depth 1)
191
+ // in the SPECIALIST bucket, which is the very defect #1505 reports.
192
+ assert.equal(foldOmpTranscript(JSON.stringify({ type: "session_init", agent: "task" }), "/fake/omp.jsonl").agent, "task");
193
+ assert.equal(foldOmpTranscript(JSON.stringify({ type: "session" }), "/fake/omp.jsonl").agent, null);
194
+ assert.equal(classifyRole({ agentDefinition: "task", memberName: "memory-proxy-session-review-2-3" }), "memory");
195
+ assert.equal(classifyRole({ agentDefinition: "task", memberName: "memory-housekeeper", spawnDepth: 1 }), "memory");
196
+ // `task` matches no definition branch, so with a name it is the name that
197
+ // decides and without one nothing does.
198
+ assert.equal(classifyRole({ agentDefinition: "task", memberName: "fix-pr-1380" }), "reviewer");
199
+ assert.equal(classifyRole({ agentDefinition: "task" }), "other");
187
200
  assert.equal(classifyRole({ agentDefinition: "", memberName: "memory-proxy-session-review-2-3" }), "memory");
188
201
  assert.equal(classifyRole({ agentDefinition: "", memberName: "memory-housekeeper", spawnDepth: 1 }), "memory");
189
202
  // ...and it is still not a guess: a name carrying no memory agent falls
@@ -19,8 +19,9 @@
19
19
  // alternate-tier pair from two members whose models already happened to
20
20
  // differ, and both readers keep it because it is derived rather than
21
21
  // authored and survives a regeneration. `""` is NOT the hole use; it means
22
- // the dispatch named no agent definition, the ordinary shape of an untyped
23
- // `task` call.
22
+ // the transcript carried no `session_init` agent to read (no such line, or
23
+ // one without a string `agent`). An untyped `task` dispatch is not that
24
+ // shape: the omp reader records the generic `task` for it.
24
25
  import { readdirSync, readFileSync, realpathSync } from "node:fs";
25
26
  import { join, basename, relative, isAbsolute, sep } from "node:path";
26
27