@nodii/dev 0.6.185 → 0.6.186

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
@@ -2099,10 +2099,11 @@ list derived from each lane's own scope rather than fixed.
2099
2099
  - turn off every one the lane doesn't keep, with
2100
2100
  `--settings {"enabledPlugins":{"<name>@synced":false}}`.
2101
2101
 
2102
- What a lane keeps depends on whether its scope reaches Figma. It does when the
2103
- lane has a Figma scope, holds `design-system` or `nodii-frontend`, or its
2104
- objective or notes name Figma, Surfaces, the design system, change sets or Code
2105
- Connect.
2102
+ What a lane keeps depends on whether it has a Figma boundary: a Figma scope,
2103
+ `design-system` or `nodii-frontend` among its repositories, or a `figma` step.
2104
+ Words in its objective or notes never count; coordinators' boilerplate names
2105
+ Surfaces in nearly every objective, so a text match kept everything on (the
2106
+ 0.6.185 live check, 20 Nov).
2106
2107
  - **A lane that reaches Figma** keeps the `figma` and `design` plugins and the
2107
2108
  claude.ai connectors, which include the Figma MCP.
2108
2109
  - **Any other lane** also runs with `ENABLE_CLAUDEAI_MCP_SERVERS=false`.
package/dist/core.js CHANGED
@@ -4,7 +4,7 @@ import { chmod, mkdir, readFile, rm, writeFile } from "node:fs/promises";
4
4
  import { homedir, platform } from "node:os";
5
5
  import { dirname, join } from "node:path";
6
6
 
7
- export const VERSION = "0.6.185";
7
+ export const VERSION = "0.6.186";
8
8
  export const configPath = () =>
9
9
  process.env.NODII_DEV_CONFIG_PATH ??
10
10
  join(homedir(), ".config/nodii-dev/config.json");
@@ -16,15 +16,25 @@ export const PLUGIN_TRIM_VARIABLE = "NODII_DEV_PLUGIN_TRIM";
16
16
 
17
17
  // The design repositories hold Surfaces and Code Connect, read through Figma.
18
18
  const FIGMA_REPOS = new Set(["design-system", "nodii-frontend"]);
19
- const FIGMA_TEXT = /\b(figma|surfaces?|design[- ]system|change[- ]sets?|code connect)\b/i;
20
19
  // What a Figma lane keeps: the Figma plugin, and the design plugin beside it.
21
20
  const FIGMA_PLUGINS = new Set(["figma", "design"]);
22
21
 
23
- /** Whether the lane's scope reaches Figma: a Figma scope, a design repository, or an objective that names it. */
24
- export function laneNeedsFigma({ repos = [], figmaScopes = [], text = "" } = {}) {
22
+ /**
23
+ * Whether the lane has a Figma boundary: a Figma scope, a design repository,
24
+ * or a figma step. Words in its objective never count: the 0.6.185 live check
25
+ * (20 Nov) found coordinator boilerplate ("Surface changes follow MW6 1.5")
26
+ * in nearly every objective, so a text match kept everything on.
27
+ */
28
+ export function laneNeedsFigma({ repos = [], figmaScopes = [], steps = [] } = {}) {
25
29
  if (figmaScopes?.length) return true;
26
30
  if (repos.some((repo) => FIGMA_REPOS.has(repo))) return true;
27
- return FIGMA_TEXT.test(String(text ?? ""));
31
+ return steps.some((step) => /^figma/i.test(String(step ?? "")));
32
+ }
33
+
34
+ /** A lane record's step keys, from its steps and its next steps; any other shape is none. */
35
+ export function laneStepKeys(lane) {
36
+ const list = (value) => (Array.isArray(value) ? value : []);
37
+ return [...list(lane?.steps).map((step) => step?.stepKey), ...list(lane?.next).map((step) => step?.step)].filter((key) => typeof key === "string");
28
38
  }
29
39
 
30
40
  /** The synced plugins in a Claude profile, by their own names (plugins/synced/<org>/<dir>/.claude-plugin/plugin.json). */
@@ -7,7 +7,7 @@ import { configPath } from "./core.js";
7
7
  import { laneConfigName } from "./lane-env.js";
8
8
  import { recordWatchedRun } from "./watchdog.js";
9
9
  import { laneSwitchOn } from "./lane-switches.js";
10
- import { laneTrim } from "./plugin-trim.js";
10
+ import { laneStepKeys, laneTrim } from "./plugin-trim.js";
11
11
  import { continuationInvocation, continueTaskMessage, sessionIdFromLog, subagentBudgetLine } from "./lane-supervisor.js";
12
12
 
13
13
  const RUNTIMES = new Set(["codex", "claude"]);
@@ -275,12 +275,12 @@ export function buildRecoveryInvocation(data, { env = process.env, home = homedi
275
275
  return buildInvocation({ runId, laneKey, runtime, model, cwd, addDirs, profileHome: data.launch.profileHome, devConfigPath, trim }, { env, home });
276
276
  }
277
277
 
278
- /** NODII-DEV-CLI-191 change (8): a recovered lane's scope, from its Freeze and its record. */
278
+ /** NODII-DEV-CLI-191 change (8): a recovered lane's scope, from its Freeze boundaries and its steps. */
279
279
  export function recoveryScope(data) {
280
280
  const freeze = data?.recovery?.freeze ?? {};
281
281
  const repos = (freeze.boundaries?.repos ?? data?.lane?.repositories ?? []).map((r) => (typeof r === "string" ? r : r?.repo)).filter(Boolean);
282
- const text = [freeze.objective?.ask, ...(freeze.objective?.laneNotes ?? []), data?.lane?.title, data?.lane?.objective].filter(Boolean).join("\n");
283
- return { repos, figmaScopes: data?.lane?.figmaScopes ?? freeze.boundaries?.figmaScopes ?? [], text };
282
+ const steps = laneStepKeys(data?.lane);
283
+ return { repos, figmaScopes: data?.lane?.figmaScopes ?? freeze.boundaries?.figmaScopes ?? [], steps };
284
284
  }
285
285
 
286
286
  function buildInvocation(options, { env = process.env, home = homedir() } = {}) {
package/dist/starting.js CHANGED
@@ -15,6 +15,7 @@ import { cachedGet, laneReadCache } from "./read-cache.js";
15
15
  import { clearCoordinatorMarker, coordinatorMarkerPath } from "./coordinator-items.js";
16
16
  import { accountFlags, listAccounts, profilePath, registerAccount, reportUsage, usageLine } from "./accounts.js";
17
17
  import { subagentBudgetLine } from "./lane-supervisor.js";
18
+ import { laneStepKeys } from "./plugin-trim.js";
18
19
 
19
20
  const execFile = promisify(execFileCallback);
20
21
  const via = { via: "nodii-dev" };
@@ -699,7 +700,7 @@ export async function launchLaneCommand(key, flags, {
699
700
  prompt: [payload.data.brief, subagentBudgetLine(payload.data.lane?.subagentQuota ?? body.subagentQuota)].filter(Boolean).join("\n\n"),
700
701
  runId: payload.data.run.id,
701
702
  // NODII-DEV-CLI-191 change (8): the plugins and connectors this lane keeps follow its scope.
702
- scope: { repos: repositories.map(({ repo }) => repo), figmaScopes: body.figmaScopes ?? [], text: [payload.data.brief, body.objective].filter(Boolean).join("\n") },
703
+ scope: { repos: repositories.map(({ repo }) => repo), figmaScopes: body.figmaScopes ?? [], steps: laneStepKeys(payload.data.lane) },
703
704
  });
704
705
  } catch (error) {
705
706
  try {
package/dist/surface.js CHANGED
@@ -34,7 +34,7 @@ import { MIN_FIGMA_INTERVAL_MS, figmaRest } from "./figma-rest.js";
34
34
  import { createRenderer } from "./vendor/render-templates.mjs";
35
35
 
36
36
  /** Bumped whenever the emitted code changes shape for the same inputs. */
37
- export const GENERATOR_FORMAT = 43;
37
+ export const GENERATOR_FORMAT = 44;
38
38
  /**
39
39
  * DS parts that are an item of their parent's own list or grid, so they take no sizing
40
40
  * wrapper: a Detail Section / Row's facts are the section grid's cells, a Right Pane / Row
@@ -3279,6 +3279,17 @@ function tableOf(node, ctx) {
3279
3279
  }
3280
3280
  }
3281
3281
  const headRow = parsed.filter((p) => p.kind === "head").at(-1) ?? null;
3282
+ // A body cell takes its column's alignment from the head (hub-574): a right-aligned
3283
+ // money head over left-aligned amounts reads each amount as the column to its left's.
3284
+ const headAlign = (i) => /^\s*<Table(?:Sort)?Head\b[^>]*?\scolAlign="(\w+)"/.exec(headRow?.cells[i]?.code ?? "")?.[1] ?? null;
3285
+ const withAlign = (code, i) => {
3286
+ const align = headAlign(i);
3287
+ if (!align || !code) return code;
3288
+ const m = /^(\s*<TableCell)(?=[\s>/])/.exec(code);
3289
+ if (!m) return code;
3290
+ const open = code.slice(0, openTagEnd(code.slice(m.index)) + m.index + 1);
3291
+ return /\scolAlign=/.test(open) ? code : code.replace(m[1], `${m[1]} colAlign="${align}"`);
3292
+ };
3282
3293
  const loadingRows = parsed.filter((p) => p.kind === LOADING);
3283
3294
  const bodyRows = parsed.filter((p) => p.kind !== "head" && p.kind !== GROUP);
3284
3295
  // The column count is the real header's: with no header row there is none to take.
@@ -3455,14 +3466,14 @@ function tableOf(node, ctx) {
3455
3466
  const secondaryKeys = new Set(keys);
3456
3467
  const cells = first.cells.map((c, i) => {
3457
3468
  const w = columnWidth(c.cell);
3458
- let open = `<TableCell${wrapperAttrs(w, first.row)}>`;
3469
+ let open = withAlign(`<TableCell${wrapperAttrs(w, first.row)}>`, i);
3459
3470
  let close = "</TableCell>";
3460
3471
  if (c.code && !c.held) {
3461
3472
  const emitted = emitNode(c.cell, { ...ctx, depth: 0, parent: null, path: `${ctx.path} › ${first.row.name}`, root: false, bare: true, inTable: true, scopes: null, note: () => {} });
3462
3473
  const own = withWidth(c.selected ? selectedCell(emitted) : emitted, w).trim();
3463
3474
  const end = openTagEnd(own);
3464
3475
  const tag = /^<([A-Za-z]+)/.exec(own)[1];
3465
- open = own.slice(0, end + 1).replace(/\s*\/>$/, ">");
3476
+ open = withAlign(own.slice(0, end + 1).replace(/\s*\/>$/, ">"), i);
3466
3477
  close = `</${tag}>`;
3467
3478
  }
3468
3479
  // Selection is record data even when the drawing shows every row unchecked.
@@ -3528,7 +3539,7 @@ function tableOf(node, ctx) {
3528
3539
  ? [skeletonRows()]
3529
3540
  : kind === "body" && liftable
3530
3541
  ? liftedRows()
3531
- : list.flatMap((p) => (p.unrecognised ? [indent(comment(p.unrecognised), depth + 2)] : [indent("<TableRow>", depth + 2), ...p.cells.map((c, i) => (p === headRow ? liftHeading(controlSort(cellCode(c, p.row, depth + 3, headKeys[i]), headKeys[i]), headKeys[i]) : p.kind === GROUP && columnCount ? cellCode(c, p.row, depth + 3, null).replace(/^(\s*<\w+)(?:\s+width=(?:\{[^}]*\}|"[^"]*"))?/, `$1 colSpan={${columnCount}} scope="colgroup"`) : cellCode(c, p.row, depth + 3, null))), indent("</TableRow>", depth + 2)]))),
3542
+ : list.flatMap((p) => (p.unrecognised ? [indent(comment(p.unrecognised), depth + 2)] : [indent("<TableRow>", depth + 2), ...p.cells.map((c, i) => (p === headRow ? liftHeading(controlSort(cellCode(c, p.row, depth + 3, headKeys[i]), headKeys[i]), headKeys[i]) : p.kind === GROUP && columnCount ? cellCode(c, p.row, depth + 3, null).replace(/^(\s*<\w+)(?:\s+width=(?:\{[^}]*\}|"[^"]*"))?/, `$1 colSpan={${columnCount}} scope="colgroup"`) : withAlign(cellCode(c, p.row, depth + 3, null), i))), indent("</TableRow>", depth + 2)]))),
3532
3543
  indent(`</${tag}>`, depth + 1),
3533
3544
  ];
3534
3545
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodii/dev",
3
- "version": "0.6.185",
3
+ "version": "0.6.186",
4
4
  "description": "Agent CLI for Nodii Dev, reached through the platform edge",
5
5
  "type": "module",
6
6
  "bin": {