opencode-courier 0.13.3 → 0.13.4

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/README.md CHANGED
@@ -78,7 +78,7 @@ name, without a version: OpenCode offers updates only for an entry without an ex
78
78
  <!-- compat-table:start rows=3: generated by script/compat-table.ts from the release tags -->
79
79
  | opencode-courier | OpenCode V2 (`opencode` and `@opencode/plugin`) |
80
80
  |---|---|
81
- | 0.13.2, 0.13.3 | 2.2.2 |
81
+ | 0.13.2, 0.13.3, 0.13.4 | 2.2.2 |
82
82
  | 0.13.1 | 2.2.1 |
83
83
  | 0.13.0 | 2.2.0 |
84
84
  <!-- compat-table:end -->
@@ -152,8 +152,9 @@ More: [in the terminal](docs/reference.md#in-the-terminal).
152
152
 
153
153
  ## Contributing
154
154
 
155
- Questions and bugs: [issues](https://github.com/ivopogace/opencode-courier/issues). Pull requests
156
- are welcome; start with [development.md](docs/maintainers/development.md).
155
+ Questions go to [Discussions](https://github.com/ivopogace/opencode-courier/discussions), bugs to
156
+ [issues](https://github.com/ivopogace/opencode-courier/issues). Pull requests are welcome; start with
157
+ [CONTRIBUTING.md](CONTRIBUTING.md).
157
158
 
158
159
  ## License
159
160
 
@@ -57,10 +57,14 @@ export declare function createBarFill(motion: Motion, counts: Accessor<{
57
57
  }>): () => number;
58
58
  /** True for `FLASH_MS` after a read of the tree finds a session the one before it did not have; not on the first read. */
59
59
  export declare function createSpawns(motion: Motion, rows: Accessor<ReadonlyArray<Row> | undefined>): () => boolean;
60
- /** Digby's state for the tree's rows, by `summaryLine`'s priority, unless a report or a spawn just arrived. */
61
- export declare function mascotState(rows: ReadonlyArray<Row>, { reported, spawned }?: {
62
- reported?: boolean | undefined;
63
- spawned?: boolean | undefined;
60
+ /**
61
+ * Digby's state for the tree's rows and its `top`, by `summaryLine`'s priority, unless a report or a spawn just arrived;
62
+ * gone when every row under the top is.
63
+ */
64
+ export declare function mascotState(rows: ReadonlyArray<Row>, { top, reported, spawned }?: {
65
+ top?: Row;
66
+ reported?: boolean;
67
+ spawned?: boolean;
64
68
  }): MascotState;
65
69
  /** What the tree's sessions do, as the header's second line says it: "1 waiting on you · 2 running"; empty with none live. */
66
70
  export declare function countsLine(rows: ReadonlyArray<Row>): string;
package/dist/tui.js CHANGED
@@ -1667,6 +1667,7 @@ function createSpawns(motion, rows) {
1667
1667
  };
1668
1668
  }
1669
1669
  function mascotState(rows, {
1670
+ top,
1670
1671
  reported = false,
1671
1672
  spawned = false
1672
1673
  } = {}) {
@@ -1674,11 +1675,12 @@ function mascotState(rows, {
1674
1675
  return "report";
1675
1676
  if (spawned)
1676
1677
  return "spawn";
1677
- if (rows.some((row) => row.state === "waiting"))
1678
+ const live = top ? [top, ...rows] : rows;
1679
+ if (live.some((row) => row.state === "waiting"))
1678
1680
  return "waiting";
1679
- if (rows.some((row) => row.state === "stalled"))
1681
+ if (live.some((row) => row.state === "stalled"))
1680
1682
  return "stalled";
1681
- if (rows.some((row) => row.state === "running"))
1683
+ if (live.some((row) => row.state === "running"))
1682
1684
  return "running";
1683
1685
  return rows.length && rows.every((row) => row.state === "gone") ? "gone" : "idle";
1684
1686
  }
@@ -2300,7 +2302,7 @@ function TreePanel(props) {
2300
2302
  }));
2301
2303
  const root = () => parts(rows(), view.root);
2302
2304
  const motion = createMotion(props.animations);
2303
- motion.animates(() => rows().some((row) => row.state === "running"));
2305
+ motion.animates(() => listed().some((row) => row.state === "running"));
2304
2306
  const flashes = createFlashes(motion, rows);
2305
2307
  const filled = createBarFill(motion, root);
2306
2308
  const frame = () => motion.enabled ? motion.frame() : undefined;
@@ -2320,6 +2322,7 @@ function TreePanel(props) {
2320
2322
  const belowShown = () => rows().length > 0 && listHeight() - treeLines() >= BELOW_ROWS;
2321
2323
  const headerGlyph = () => glyphShown() && !artShown() && !belowShown();
2322
2324
  const mascot = createMemo(() => mascotState(rows(), {
2325
+ top: top(),
2323
2326
  reported: flashes.reported(),
2324
2327
  spawned: spawned()
2325
2328
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-courier",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "Multi-session orchestration for OpenCode V2: spawn child sessions, be woken by them. No polling.",
5
5
  "license": "MIT",
6
6
  "author": "Ivo Pogace <71701666+ivopogace@users.noreply.github.com>",