@serviceme/devtools-cli 0.2.0 → 0.2.1

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.
@@ -212,7 +212,7 @@ function normalizeServicemeError(error, fallbackCode = "internal_error") {
212
212
  }
213
213
 
214
214
  // src/version.ts
215
- var SERVICEME_CLI_VERSION = "0.2.0";
215
+ var SERVICEME_CLI_VERSION = "0.2.1";
216
216
 
217
217
  // src/bridge/handlers/AuthBridgeHandlers.ts
218
218
  var import_auth2 = require("@serviceme/devtools-core/auth");
package/dist/cli.js CHANGED
@@ -776,7 +776,7 @@ var readline = __toESM(require("readline"));
776
776
 
777
777
  // src/version.ts
778
778
  var SERVICEME_CLI_NAME = "serviceme";
779
- var SERVICEME_CLI_VERSION = "0.2.0";
779
+ var SERVICEME_CLI_VERSION = "0.2.1";
780
780
 
781
781
  // src/bridge/handlers/AuthBridgeHandlers.ts
782
782
  var import_auth3 = require("@serviceme/devtools-core/auth");
@@ -1335,10 +1335,7 @@ var SkillRepoBridgeHandler = class {
1335
1335
  detail = await store.get(params.repoId, params.name);
1336
1336
  } catch (err) {
1337
1337
  if (err instanceof import_skill_store.SkillNotFoundError) {
1338
- throw createServicemeError(
1339
- "not_found",
1340
- `Skill ${params.repoId}/${params.name} not found`
1341
- );
1338
+ throw createServicemeError("not_found", `Skill ${params.repoId}/${params.name} not found`);
1342
1339
  }
1343
1340
  throw err;
1344
1341
  }
@@ -1360,11 +1357,7 @@ var SkillRepoBridgeHandler = class {
1360
1357
  */
1361
1358
  async install(params) {
1362
1359
  const kind = params.kind ?? "skill";
1363
- const source = await this.resolveEntrySource(
1364
- params.repoId,
1365
- params.name,
1366
- kind
1367
- );
1360
+ const source = await this.resolveEntrySource(params.repoId, params.name, kind);
1368
1361
  try {
1369
1362
  const result = await (0, import_skill_linker.installSkillToWorkspace)({
1370
1363
  repoId: params.repoId,
@@ -1399,11 +1392,7 @@ var SkillRepoBridgeHandler = class {
1399
1392
  */
1400
1393
  async convertToSymlink(params) {
1401
1394
  const kind = params.kind ?? "skill";
1402
- const source = await this.resolveEntrySource(
1403
- params.repoId,
1404
- params.name,
1405
- kind
1406
- );
1395
+ const source = await this.resolveEntrySource(params.repoId, params.name, kind);
1407
1396
  try {
1408
1397
  const result = await (0, import_skill_linker.convertToSymlink)({
1409
1398
  repoId: params.repoId,
@@ -1464,9 +1453,7 @@ var SkillRepoBridgeHandler = class {
1464
1453
  const kind = params.kind ?? "skill";
1465
1454
  const scope = params.scope ?? "workspace";
1466
1455
  const scopesToScan = scope === "all" ? ["workspace", "user"] : [scope];
1467
- const linked = (await Promise.all(
1468
- scopesToScan.map((s) => (0, import_skill_linker.listLinkedSkills)(params.workspaceDir, kind, s))
1469
- )).flat();
1456
+ const linked = (await Promise.all(scopesToScan.map((s) => (0, import_skill_linker.listLinkedSkills)(params.workspaceDir, kind, s)))).flat();
1470
1457
  return {
1471
1458
  links: linked.map((l) => ({
1472
1459
  repoId: l.repoId,
@@ -1557,15 +1544,9 @@ var SkillRepoBridgeHandler = class {
1557
1544
  * literal, so we can't carry the "wasn't there" case in the result.
1558
1545
  */
1559
1546
  async draftDelete(params) {
1560
- const existing = await this.draftsStore.tryReadSummary(
1561
- params.kind,
1562
- params.id
1563
- );
1547
+ const existing = await this.draftsStore.tryReadSummary(params.kind, params.id);
1564
1548
  if (!existing) {
1565
- throw createServicemeError(
1566
- "not_found",
1567
- `Draft ${params.kind}/${params.id} not found`
1568
- );
1549
+ throw createServicemeError("not_found", `Draft ${params.kind}/${params.id} not found`);
1569
1550
  }
1570
1551
  await this.draftsStore.delete(params.kind, params.id);
1571
1552
  return { deleted: true };
@@ -1679,18 +1660,12 @@ var SkillRepoBridgeHandler = class {
1679
1660
  entry = await store.get(repoId, name);
1680
1661
  } catch (err) {
1681
1662
  if (err instanceof import_skill_store.SkillNotFoundError) {
1682
- throw createServicemeError(
1683
- "not_found",
1684
- `Skill ${repoId}/${name} not present on disk`
1685
- );
1663
+ throw createServicemeError("not_found", `Skill ${repoId}/${name} not present on disk`);
1686
1664
  }
1687
1665
  throw err;
1688
1666
  }
1689
1667
  if (entry.kind !== kind) {
1690
- throw createServicemeError(
1691
- "not_found",
1692
- `Skill ${repoId}/${name} not present on disk`
1693
- );
1668
+ throw createServicemeError("not_found", `Skill ${repoId}/${name} not present on disk`);
1694
1669
  }
1695
1670
  const sourceIsFile = entry.dir === entry.manifestPath;
1696
1671
  return { sourcePath: entry.dir, sourceIsFile };
@@ -1857,7 +1832,7 @@ async function handleEnroll(parsed) {
1857
1832
  async function handleRotateSecret(parsed) {
1858
1833
  const gracePeriodDaysArg = getStringFlag(parsed, "gracePeriodDays");
1859
1834
  const gracePeriodDays = gracePeriodDaysArg ? parseInt(gracePeriodDaysArg, 10) : 7;
1860
- if (isNaN(gracePeriodDays) || gracePeriodDays < 0 || gracePeriodDays > 365) {
1835
+ if (Number.isNaN(gracePeriodDays) || gracePeriodDays < 0 || gracePeriodDays > 365) {
1861
1836
  throw createServicemeError("invalid_params", "Expected --gracePeriodDays <0-365>.");
1862
1837
  }
1863
1838
  const core = makeDeviceCore();
@@ -2439,7 +2414,7 @@ async function handleCreate(parsed) {
2439
2414
  writeSuccess({ task });
2440
2415
  }
2441
2416
  function handleList3(parsed) {
2442
- const wp = requireWorkspace(parsed);
2417
+ const _wp = requireWorkspace(parsed);
2443
2418
  const mgr = new import_devtools_core11.TaskConfigManager();
2444
2419
  const tasks = mgr.listTasks();
2445
2420
  const fields = getStringFlag(parsed, "fields");
@@ -2454,7 +2429,7 @@ function handleList3(parsed) {
2454
2429
  writeSuccess({ tasks: result, total: tasks.length });
2455
2430
  }
2456
2431
  function handleGet(parsed) {
2457
- const wp = requireWorkspace(parsed);
2432
+ const _wp = requireWorkspace(parsed);
2458
2433
  const id = requireId(parsed);
2459
2434
  const mgr = new import_devtools_core11.TaskConfigManager();
2460
2435
  const task = mgr.getTask(id);
@@ -2466,7 +2441,7 @@ function handleGet(parsed) {
2466
2441
  writeSuccess({ task: result });
2467
2442
  }
2468
2443
  async function handleEdit(parsed) {
2469
- const wp = requireWorkspace(parsed);
2444
+ const _wp = requireWorkspace(parsed);
2470
2445
  const id = requireId(parsed);
2471
2446
  const mgr = new import_devtools_core11.TaskConfigManager();
2472
2447
  const existing = mgr.getTask(id);
@@ -2510,7 +2485,7 @@ async function handleEdit(parsed) {
2510
2485
  writeSuccess({ task });
2511
2486
  }
2512
2487
  function handleDelete(parsed) {
2513
- const wp = requireWorkspace(parsed);
2488
+ const _wp = requireWorkspace(parsed);
2514
2489
  const id = requireId(parsed);
2515
2490
  requireConfirmation(parsed);
2516
2491
  const mgr = new import_devtools_core11.TaskConfigManager();
@@ -2526,7 +2501,7 @@ function handleDelete(parsed) {
2526
2501
  writeSuccess({ id, name: existing.name });
2527
2502
  }
2528
2503
  function handleToggle(parsed) {
2529
- const wp = requireWorkspace(parsed);
2504
+ const _wp = requireWorkspace(parsed);
2530
2505
  const id = requireId(parsed);
2531
2506
  const enabledStr = getStringFlag(parsed, "enabled");
2532
2507
  if (enabledStr === void 0) {
@@ -2568,7 +2543,7 @@ async function handleTrigger(parsed) {
2568
2543
  writeSuccess({ log });
2569
2544
  }
2570
2545
  function handleLogs(parsed) {
2571
- const wp = requireWorkspace(parsed);
2546
+ const _wp = requireWorkspace(parsed);
2572
2547
  const taskId = getStringFlag(parsed, "task-id");
2573
2548
  const limitStr = getStringFlag(parsed, "limit");
2574
2549
  const limit = limitStr ? Math.min(Number(limitStr), 200) : 20;
@@ -2819,7 +2794,7 @@ function getSchedulerStatus() {
2819
2794
  pidFile: pidMgr.getPidPath()
2820
2795
  };
2821
2796
  }
2822
- function handleStart(parsed) {
2797
+ function handleStart(_parsed) {
2823
2798
  const pidMgr = new import_devtools_core12.PidManager("", { pidPath: (0, import_devtools_core12.getSchedulerPidPath)() });
2824
2799
  const existingPid = pidMgr.getRunningPid();
2825
2800
  if (existingPid !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serviceme/devtools-cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Unified SERVICEME CLI for automation, project scaffolding, and bridge-based tooling.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -43,12 +43,13 @@
43
43
  "tsup": "^8.5.1",
44
44
  "tsx": "^4.22.0",
45
45
  "typescript": "^5.9.3",
46
- "@serviceme/devtools-core": "0.2.0",
47
- "@serviceme/devtools-protocol": "0.2.0"
46
+ "@serviceme/devtools-core": "0.2.1",
47
+ "@serviceme/devtools-protocol": "0.2.1"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsup --config tsup.config.ts",
51
51
  "lint": "biome check src test",
52
+ "format": "biome format --write src test",
52
53
  "release:check": "pnpm run test && npm pack --dry-run",
53
54
  "test": "pnpm run build && node --test test/*.test.js && node --import tsx --test 'src/**/__tests__/**/*.test.ts'",
54
55
  "pack": "npm pack",