@nodii/dev 0.6.107 → 0.6.108

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/dist/cli.js CHANGED
@@ -233,7 +233,11 @@ Usage: nodii-dev <command> [options] [--json]
233
233
  # change sets in dependency order (hub-260): each file's sets are actioned
234
234
  # in order; NEXT marks the ones an operator can act on now
235
235
  figma file add FILE_KEY --name TEXT --kind design-system|surfaces|prototype [--module M]
236
- # register a Figma file in Dev so it can be locked
236
+ # register a Figma file in Dev so it can be locked; on a registered
237
+ # key, staff or the hub's Steward correct its name, kind or module
238
+ figma file retire FILE_KEY --reason TEXT
239
+ # staff or the hub's Steward: not canonical. Closes its sets still editing
240
+ # or awaiting publish, and refuses new locks
237
241
  hook claude-figma-pre|claude-figma-post|safety-pre|safety-post|nudge-pre|nudge-stop|surface-gen-pre|session-start|session-kind|managed-dispatch|claude-managed-dispatch|print-settings
238
242
  # session-start and session-kind (first prompt) print the session's kind:
239
243
  # lane, coordinator, steward or operator assistant, with its contract (MW1-92)
@@ -712,6 +716,12 @@ const REGISTER_REFUSALS = {
712
716
  FIGMA_FILE_NOT_READABLE: (key) => `Dev's Figma account can't read ${key}; share the file with that account.`,
713
717
  };
714
718
 
719
+ const FILE_RETIRE_USAGE = "figma file retire FILE_KEY --reason TEXT";
720
+ export async function figmaFileRetire(value, reason, { request = devRequest } = {}) {
721
+ if (!value || typeof reason !== "string" || !reason.trim()) throw new CliError("USAGE", FILE_RETIRE_USAGE, 2);
722
+ return request("POST", `/api/v1/design/files/${encode(figmaFileKey(value))}/retire`, { reason: reason.trim() });
723
+ }
724
+
715
725
  export async function figmaFileAdd(value, flags, { request = devRequest } = {}) {
716
726
  if (!value) throw new CliError("USAGE", "figma file add FILE_KEY --name TEXT --kind KIND [--module M]", 2);
717
727
  const key = figmaFileKey(value);
@@ -1338,7 +1348,12 @@ export async function main(argv = process.argv.slice(2)) {
1338
1348
  [JSON.stringify(p.data, null, 2), ...conformanceLines({ warnings: p.warnings })].join("\n"));
1339
1349
  }
1340
1350
  if (action === "file") {
1341
- if (rest[0] !== "add") throw new CliError("USAGE", "figma file add FILE_KEY --name TEXT --kind KIND [--module M]", 2);
1351
+ if (rest[0] === "retire") {
1352
+ if (rest.length > 2) throw new CliError("USAGE", FILE_RETIRE_USAGE, 2);
1353
+ return emit(await figmaFileRetire(rest[1], f.reason), json, (p) =>
1354
+ `${p.data.fileKey} is retired: ${p.data.retiredReason}.${p.data.abandoned?.length ? ` Closed as abandoned: ${p.data.abandoned.join(", ")}.` : ""}`);
1355
+ }
1356
+ if (rest[0] !== "add") throw new CliError("USAGE", "figma file add FILE_KEY --name TEXT --kind KIND [--module M] | figma file retire FILE_KEY --reason TEXT", 2);
1342
1357
  return emit(await figmaFileAdd(rest[1], f), json, (p) =>
1343
1358
  `${p.data.fileKey} is registered in Dev: ${p.data.name} (${p.data.kind}${p.data.module ? `, ${p.data.module}` : ""}).`);
1344
1359
  }
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.107";
7
+ export const VERSION = "0.6.108";
8
8
  export const configPath = () =>
9
9
  process.env.NODII_DEV_CONFIG_PATH ??
10
10
  join(homedir(), ".config/nodii-dev/config.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodii/dev",
3
- "version": "0.6.107",
3
+ "version": "0.6.108",
4
4
  "description": "Agent CLI for Nodii Dev, reached through the platform edge",
5
5
  "type": "module",
6
6
  "bin": {