@keystrokehq/cli 0.0.3 → 0.0.6

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.
Files changed (92) hide show
  1. package/README.md +10 -0
  2. package/dist/{accept.handler-DFtM0IuO.mjs → accept.handler-CudtwdDV.mjs} +1 -1
  3. package/dist/{admin-D_7tenRC.mjs → admin-ByNq50FH.mjs} +9 -9
  4. package/dist/{agents-DMEo-6QB.mjs → agents-DbekD_Vx.mjs} +2 -2
  5. package/dist/{api-keys-BThGvtdn.mjs → api-keys-kvwq9Jb4.mjs} +5 -5
  6. package/dist/{auth-CY0Gg9sN.mjs → auth-DS3C07ib.mjs} +3 -3
  7. package/dist/{build-agents-DfbiMZ_e-CRnzruSu.mjs → build-agents-DfbiMZ_e-in-if4_C.mjs} +2 -2
  8. package/dist/{build-tasks-O1jYtlv1-Y65uGWuz.mjs → build-tasks-O1jYtlv1-B2Dm4hFj.mjs} +2 -2
  9. package/dist/{build-workflows-3fdvdHHf-DJ_lH1NH.mjs → build-workflows-3fdvdHHf-Bg5XV7hM.mjs} +2 -2
  10. package/dist/{build.handler-Tb3IpABI.mjs → build.handler-BzQRnkC3.mjs} +1 -1
  11. package/dist/{clear.handler-YS8gPriq.mjs → clear.handler-U9n_V1IM.mjs} +1 -1
  12. package/dist/{commander-DZ3F3CVq.mjs → commander-pxSPDCZ4.mjs} +1 -1
  13. package/dist/{connect-DpQgYg8z.mjs → connect-B_uc0wqI.mjs} +2 -2
  14. package/dist/{connect.handler-DuRr_yyN.mjs → connect.handler-VJgm2ZQG.mjs} +1 -1
  15. package/dist/{context-Y1f1hGYy.mjs → context-D-YKFNxL.mjs} +1 -1
  16. package/dist/{create.handler-uNG3I4wS.mjs → create.handler-d9nfcKfp.mjs} +1 -1
  17. package/dist/{credentials-UpgEcaub.mjs → credentials-CL_PCuhM.mjs} +4 -4
  18. package/dist/{current-deployment-workflow-M8GEIHxv.mjs → current-deployment-workflow-BRYuEubW.mjs} +1 -1
  19. package/dist/{current.handler-BqPUKCvn.mjs → current.handler-vJG2Dohx.mjs} +1 -1
  20. package/dist/{delete.handler-CJTHVZaz.mjs → delete.handler-RsYTkJLV.mjs} +1 -1
  21. package/dist/{deploy-Gw0KPrkf.mjs → deploy-BE3F62Mz.mjs} +2 -2
  22. package/dist/{deploy.handler-zzFAt7pp.mjs → deploy.handler-Dlyd8Zqs.mjs} +8 -8
  23. package/dist/{diff.handler--zdSkUnK.mjs → diff.handler-CH0xP8pk.mjs} +2 -2
  24. package/dist/{env.handler-d4sJ706C.mjs → env.handler-BkCO2vjR.mjs} +2 -2
  25. package/dist/{init-C0sps8R7.mjs → init-BXwx0QA4.mjs} +3 -8
  26. package/dist/{init.handler-DSW6XFZn.mjs → init.handler-Cs5YXM5Z.mjs} +18 -129
  27. package/dist/{inspect.handler-DbN0ZVTh.mjs → inspect.handler-DRMKUJsh.mjs} +2 -2
  28. package/dist/{integration-catalog-DFlytKJS.mjs → integration-catalog-ClP7YGqM.mjs} +1 -1
  29. package/dist/{integrations-Dcadds2b.mjs → integrations-CoBzLNEe.mjs} +3 -3
  30. package/dist/{invites-DvsxTRAb.mjs → invites-BmNy1RHp.mjs} +4 -4
  31. package/dist/{invites.list.handler-B5quln3m.mjs → invites.list.handler-ICP2V3p4.mjs} +1 -1
  32. package/dist/{invites.resend.handler-CSpj7bQ5.mjs → invites.resend.handler-BGaTTMka.mjs} +1 -1
  33. package/dist/{invites.revoke.handler-_hdEkBdO.mjs → invites.revoke.handler-DBwF5Lxc.mjs} +1 -1
  34. package/dist/keystroke.mjs +27 -19
  35. package/dist/{list.handler-08GY-wnx.mjs → list.handler-B2bN8NsQ.mjs} +1 -1
  36. package/dist/{list.handler-BRq-nScx.mjs → list.handler-BXTGPazY.mjs} +1 -1
  37. package/dist/{list.handler-DSPr0OxS.mjs → list.handler-BjihvxHn.mjs} +1 -1
  38. package/dist/{list.handler-CWO6DExh.mjs → list.handler-Vv9KmhB9.mjs} +2 -2
  39. package/dist/{list.handler-DLl8ca6F.mjs → list.handler-b4qYQtwn.mjs} +1 -1
  40. package/dist/{list.handler-20v4uRMk.mjs → list.handler-rnyzLJDy.mjs} +1 -1
  41. package/dist/listen-DVV1fp5c.mjs +25 -0
  42. package/dist/listen.handler-CyFpUSOu.mjs +212 -0
  43. package/dist/{logs-D_48skmi.mjs → logs-BRticZ00.mjs} +3 -3
  44. package/dist/{logs.handler-4ctMVYMj.mjs → logs.handler-CsnG7Bb0.mjs} +2 -2
  45. package/dist/{members.add.handler-Dq_giQ8g.mjs → members.add.handler-CH0RhbgE.mjs} +1 -1
  46. package/dist/{members.invite.handler-v404bUsq.mjs → members.invite.handler-CYB7RQ9A.mjs} +1 -1
  47. package/dist/{members.list.handler-D6TE0yp8.mjs → members.list.handler-DrDtmMei.mjs} +1 -1
  48. package/dist/{members.remove.handler-BhQ3cyeR.mjs → members.remove.handler-uGoZt2Me.mjs} +1 -1
  49. package/dist/{members.update.handler-BVy2cv1K.mjs → members.update.handler-DXCWkzOc.mjs} +1 -1
  50. package/dist/{org-CkRr-f3S.mjs → org-GdHhuSNk.mjs} +15 -15
  51. package/dist/{orgs.create.handler-swGnT2ce.mjs → orgs.create.handler-5AaPgTZV.mjs} +1 -1
  52. package/dist/{orgs.get.handler-ClAqYTH0.mjs → orgs.get.handler-BTfopRVm.mjs} +1 -1
  53. package/dist/{orgs.list.handler-D-ptz8It.mjs → orgs.list.handler-DKJgs6x0.mjs} +1 -1
  54. package/dist/{paused.handler-B3aVqw-m.mjs → paused.handler-BUifVTyQ.mjs} +1 -1
  55. package/dist/{projects-yA9AAaDM.mjs → projects-BjnCG-pc.mjs} +4 -4
  56. package/dist/{runs-B8mW4PqP.mjs → runs-2BdRfql3.mjs} +2 -2
  57. package/dist/{skills-sync.handler-C2faeat-.mjs → skills-sync.handler-CwwnzDiO.mjs} +3 -3
  58. package/dist/{skills.command-DWxcc3Ui.mjs → skills.command-C2NXqc5h.mjs} +5 -5
  59. package/dist/{skills.handler-8KCSF7wp.mjs → skills.handler-BTUhxO37.mjs} +1 -1
  60. package/dist/{src-J09NGJ6Z.mjs → src-CBL7AJ0H.mjs} +11 -0
  61. package/dist/{switch.handler-C4hgbhcH.mjs → switch.handler-DV0wiJP8.mjs} +1 -1
  62. package/dist/{sync-CL6zXiiA.mjs → sync-D098Vbv2.mjs} +2 -2
  63. package/dist/{sync-keystroke-agent-skills-CY9h25_5.mjs → sync-keystroke-agent-skills-CBMQ4fh_.mjs} +8 -12
  64. package/dist/{sync.handler-D1uF8E8I.mjs → sync.handler-BocldSG_.mjs} +2 -2
  65. package/dist/{task-target-build-DTzz4fpG.mjs → task-target-build-Di8gflnj.mjs} +3 -3
  66. package/dist/task-target-deploy-runner.mjs +4 -4
  67. package/dist/{test-BsTLXIPB.mjs → test-BZt0Duhs.mjs} +6 -6
  68. package/dist/{test.handler-D25kziPi.mjs → test.handler-iCUotLes.mjs} +1 -1
  69. package/dist/{trigger-artifacts-B3OCTX9K-DG-FGGJT.mjs → trigger-artifacts-B3OCTX9K-Cgt51KLh.mjs} +2 -2
  70. package/dist/{try-deploy.handler-2aX5TmLk.mjs → try-deploy.handler-YDOirkk1.mjs} +3 -3
  71. package/dist/upgrade-Bdez-X6_.mjs +41 -0
  72. package/dist/upgrade.handler-DhH_Cuza.mjs +80 -0
  73. package/dist/{upload.handler-CqProKVJ.mjs → upload.handler-BmqZAPxZ.mjs} +2 -2
  74. package/dist/{users.get.handler-C_d2GWKX.mjs → users.get.handler-uoEgEwI-.mjs} +1 -1
  75. package/dist/{users.list.handler-DXAsO8Yk.mjs → users.list.handler-DLWPOIHD.mjs} +1 -1
  76. package/dist/{users.set-role.handler-Bn_yV4RI.mjs → users.set-role.handler-BCJhTsyb.mjs} +1 -1
  77. package/dist/{validate.handler-CGD6GttR.mjs → validate.handler-ROzzUI85.mjs} +1 -1
  78. package/dist/{workflow-build-BcaIdRR6.mjs → workflow-build-DD8TLlPu.mjs} +5 -5
  79. package/dist/{workflow-bundler-BzHk73PM-Cde7cKiU.mjs → workflow-bundler-BzHk73PM-Bt-poFqX.mjs} +1 -1
  80. package/dist/{workflows-S-gbfw8f.mjs → workflows-DypSJM0t.mjs} +12 -12
  81. package/package.json +9 -9
  82. /package/dist/{build-metadata-zidV9Cai-RgG4ndIH.mjs → build-metadata-zidV9Cai-BAS0FMxT.mjs} +0 -0
  83. /package/dist/{clear-cache.handler-BEbPz5Ej.mjs → clear-cache.handler-BDV-a3ku.mjs} +0 -0
  84. /package/dist/{clear.handler-CtOZ4aRn.mjs → clear.handler-Dh6QoVO1.mjs} +0 -0
  85. /package/dist/{deploy-CdnaZY3s.mjs → deploy-B_bkUlIL.mjs} +0 -0
  86. /package/dist/{detect-env-access-CwkOYeYM-h2W05D_Q.mjs → detect-env-access-CwkOYeYM-CsrSOCcj.mjs} +0 -0
  87. /package/dist/{list.handler-DAiJtW20.mjs → list.handler-DO0PnyWP.mjs} +0 -0
  88. /package/dist/{logs.handler-C3QnSCaH.mjs → logs.handler-ddQu_MXN.mjs} +0 -0
  89. /package/dist/{options-Dn9t3K4a.mjs → options-BhB9qA5P.mjs} +0 -0
  90. /package/dist/{read-credential-keys-77a91T8M-CAJLnMRi.mjs → read-credential-keys-77a91T8M-aLuQvlIq.mjs} +0 -0
  91. /package/dist/{run-polling-CTzhTgyN.mjs → run-polling-CF9OeLWl.mjs} +0 -0
  92. /package/dist/{task-target-deploy-BPLlP__P.mjs → task-target-deploy-BzGRNDiv.mjs} +0 -0
@@ -3,37 +3,21 @@
3
3
  import { C as CliExitError, t as ui } from "./keystroke.mjs";
4
4
  import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
5
  import { a as writeProjectConfig, i as readProjectConfig, r as getProjectConfigPath } from "./project-config-opj6DsPF.mjs";
6
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
7
- import { t as syncKeystrokeAgentSkills } from "./sync-keystroke-agent-skills-CY9h25_5.mjs";
6
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
7
+ import { t as syncKeystrokeAgentSkills } from "./sync-keystroke-agent-skills-CBMQ4fh_.mjs";
8
8
  import { createRequire } from "node:module";
9
- import { accessSync, readFileSync } from "node:fs";
9
+ import { readFileSync } from "node:fs";
10
10
  import { access, mkdir, readFile, writeFile } from "node:fs/promises";
11
11
  import * as path$1 from "node:path";
12
12
  import path from "node:path";
13
13
  import { cancel, isCancel, text } from "@clack/prompts";
14
14
  import { fileURLToPath } from "node:url";
15
- import { spawn } from "node:child_process";
16
- //#region src/lib/keystroke-local-registry-npmrc.ts
17
- /**
18
- * Default local registry for consumer projects (Verdaccio default port).
19
- * Override with `KEYSTROKE_LOCAL_NPM_REGISTRY` when publishing or documenting for authors.
20
- */
21
- function getKeystrokeLocalNpmRegistryUrl() {
22
- const raw = process.env.KEYSTROKE_LOCAL_NPM_REGISTRY?.trim();
23
- if (!raw) return "http://localhost:4873/";
24
- return `${raw.replace(/\/+$/, "")}/`;
25
- }
26
- /**
27
- * `.npmrc` line so installs resolve `@keystroke/*` from the local registry (Verdaccio).
28
- */
29
- function createKeystrokeLocalRegistryNpmrcContent() {
30
- return `@keystroke:registry=${getKeystrokeLocalNpmRegistryUrl()}\n`;
31
- }
32
- /** When the CLI cannot resolve `@keystrokehq/core` on disk (e.g. unusual installs). */
15
+ //#region src/lib/keystroke-scaffold-version-ranges.ts
16
+ /** When the CLI cannot resolve `@keystrokehq/core` on disk (e.g. bundled installs). */
33
17
  const FALLBACK_WORKFLOW_CORE_VERSION_RANGE = "^0.0.1";
34
18
  /**
35
19
  * Semver range for scaffold `package.json` — uses the version of `@keystrokehq/core`
36
- * installed next to this CLI (same as the Keystroke toolchain the author runs).
20
+ * installed next to this CLI when available.
37
21
  */
38
22
  function workflowCoreScaffoldVersionRange() {
39
23
  try {
@@ -43,19 +27,6 @@ function workflowCoreScaffoldVersionRange() {
43
27
  } catch {}
44
28
  return FALLBACK_WORKFLOW_CORE_VERSION_RANGE;
45
29
  }
46
- /** When the CLI cannot resolve `@keystroke/skills` on disk. */
47
- const FALLBACK_SKILLS_VERSION_RANGE = "^0.0.1";
48
- /**
49
- * Semver range for scaffold `package.json` devDependency `@keystroke/skills` (published to local Verdaccio).
50
- */
51
- function keystrokeSkillsScaffoldVersionRange() {
52
- try {
53
- const raw = readFileSync(createRequire(import.meta.url).resolve("@keystroke/skills/package.json"), "utf-8");
54
- const version = JSON.parse(raw).version?.trim();
55
- if (version) return `^${version}`;
56
- } catch {}
57
- return FALLBACK_SKILLS_VERSION_RANGE;
58
- }
59
30
  //#endregion
60
31
  //#region src/commands/init/agents-md.ts
61
32
  const AGENTS_FILENAME = "AGENTS.md";
@@ -76,7 +47,7 @@ function resolveCliPackageSkillsBlurbPath() {
76
47
  function resolveBundledKeystrokeAgentsBlurbPath() {
77
48
  const require = createRequire(import.meta.url);
78
49
  try {
79
- const skillsPackageJsonPath = require.resolve("@keystroke/skills/package.json");
50
+ const skillsPackageJsonPath = require.resolve("@keystrokehq/skills/package.json");
80
51
  return path$1.join(path$1.dirname(skillsPackageJsonPath), AGENTS_BLURB_PACKAGE_PATH);
81
52
  } catch {}
82
53
  try {
@@ -237,9 +208,6 @@ describe('hello workflow', () => {
237
208
  //#region src/commands/init/templates/package-json.ts
238
209
  /**
239
210
  * Template for generating a package.json for a new Keystroke project.
240
- *
241
- * `@keystrokehq/core` uses a semver range; installs resolve via `.npmrc` → local Verdaccio
242
- * (see `pnpm publish:local` from the Keystroke monorepo).
243
211
  */
244
212
  function createPackageJsonContent(projectName, options) {
245
213
  return JSON.stringify({
@@ -256,7 +224,6 @@ function createPackageJsonContent(projectName, options) {
256
224
  zod: "^4.3.6"
257
225
  },
258
226
  devDependencies: {
259
- "@keystroke/skills": options.skillsVersionRange,
260
227
  "@biomejs/biome": "2.4.13",
261
228
  vitest: "^4.0.18",
262
229
  typescript: "^5.9.3"
@@ -359,40 +326,22 @@ async function promptProjectDescription(options) {
359
326
  const t = typeof answer === "string" ? answer.trim() : "";
360
327
  return t.length > 0 ? t : void 0;
361
328
  }
362
- async function ensureScaffoldPackageJson(targetDir, projectName, ranges) {
329
+ async function ensureScaffoldPackageJson(targetDir, projectName, workflowCoreRange) {
363
330
  const pkgPath = path.join(targetDir, "package.json");
364
331
  try {
365
332
  const raw = await readFile(pkgPath, "utf-8");
366
333
  const pkg = JSON.parse(raw);
367
334
  pkg.dependencies = pkg.dependencies ?? {};
368
- pkg.dependencies["@keystrokehq/core"] = ranges.workflowCore;
335
+ pkg.dependencies["@keystrokehq/core"] = workflowCoreRange;
369
336
  pkg.dependencies.zod = pkg.dependencies.zod ?? "^4.3.6";
370
337
  pkg.devDependencies = pkg.devDependencies ?? {};
371
- pkg.devDependencies["@keystroke/skills"] = ranges.skills;
372
338
  pkg.devDependencies.vitest = pkg.devDependencies.vitest ?? "^4.0.18";
373
339
  pkg.devDependencies.typescript = pkg.devDependencies.typescript ?? "^5.9.3";
374
340
  if (!pkg.name) pkg.name = projectName;
375
341
  await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, "utf-8");
376
342
  return "updated";
377
343
  } catch {
378
- await writeFile(pkgPath, `${createPackageJsonContent(projectName, {
379
- workflowCoreVersionRange: ranges.workflowCore,
380
- skillsVersionRange: ranges.skills
381
- })}\n`, "utf-8");
382
- return "created";
383
- }
384
- }
385
- /** Ensure `.npmrc` sends `@keystroke/*` to the local Verdaccio registry. */
386
- async function ensureKeystrokeLocalRegistryNpmrc(targetDir) {
387
- const npmrcPath = path.join(targetDir, ".npmrc");
388
- const line = createKeystrokeLocalRegistryNpmrcContent().trimEnd();
389
- try {
390
- const existing = await readFile(npmrcPath, "utf-8");
391
- if (existing.split(/\r?\n/).some((l) => l.trim().startsWith("@keystroke:registry="))) return "skipped";
392
- await writeFile(npmrcPath, existing.trimEnd().length > 0 ? `${existing.trimEnd()}\n${line}\n` : `${line}\n`, "utf-8");
393
- return "updated";
394
- } catch {
395
- await writeFile(npmrcPath, createKeystrokeLocalRegistryNpmrcContent(), "utf-8");
344
+ await writeFile(pkgPath, `${createPackageJsonContent(projectName, { workflowCoreVersionRange: workflowCoreRange })}\n`, "utf-8");
396
345
  return "created";
397
346
  }
398
347
  }
@@ -447,7 +396,7 @@ async function handleInit(options, ctx) {
447
396
  const agentsAction = await ensureAgentsMarkdown(targetDir, await loadKeystrokeAgentsBlurb());
448
397
  if (agentsAction === "created") ui.success("Created AGENTS.md with Keystroke project guidance.");
449
398
  else if (agentsAction === "updated") ui.success("Updated AGENTS.md with Keystroke project guidance.");
450
- if (options.scaffold) await scaffoldProject(targetDir, projectName, workflowCoreScaffoldVersionRange(), keystrokeSkillsScaffoldVersionRange(), options.install);
399
+ if (options.scaffold) await scaffoldProject(targetDir, projectName, workflowCoreScaffoldVersionRange());
451
400
  }
452
401
  /** Write a file only if it does not already exist. Returns true if written. */
453
402
  async function writeIfMissing(filePath, content) {
@@ -459,54 +408,15 @@ async function writeIfMissing(filePath, content) {
459
408
  return true;
460
409
  }
461
410
  }
462
- /**
463
- * Detect package manager from lockfiles. New projects (no lockfile) default to **pnpm** so `keystroke init`
464
- * matches the Keystroke monorepo toolchain.
465
- */
466
- function detectPackageManager(targetDir) {
467
- try {
468
- accessSync(path.join(targetDir, "pnpm-lock.yaml"));
469
- return "pnpm";
470
- } catch {}
471
- try {
472
- accessSync(path.join(targetDir, "yarn.lock"));
473
- return "yarn";
474
- } catch {}
475
- try {
476
- accessSync(path.join(targetDir, "package-lock.json"));
477
- return "npm";
478
- } catch {}
479
- return "pnpm";
480
- }
481
- /** Run install in targetDir. Returns true if succeeded. */
482
- function runInstall(targetDir) {
483
- const pm = detectPackageManager(targetDir);
484
- const [cmd, ...args] = pm === "pnpm" ? ["pnpm", "install"] : pm === "yarn" ? ["yarn", "install"] : ["npm", "install"];
485
- return new Promise((resolve) => {
486
- spawn(cmd, args, {
487
- cwd: targetDir,
488
- stdio: "inherit",
489
- shell: true
490
- }).on("close", (code) => resolve(code === 0));
491
- });
492
- }
493
411
  async function trySyncAgentSkillsAfterScaffold(targetDir) {
494
412
  const syncResult = await syncKeystrokeAgentSkills(targetDir);
495
413
  if (syncResult.ok) ui.success(`Synced ${syncResult.copied.length} skill(s) to .cursor/skills and .claude/skills: ${syncResult.copied.join(", ")}`);
496
- else if (syncResult.reason === "not_installed") ui.hint("After install completes, run `keystroke skills sync` to copy @keystroke/skills for Cursor / Claude Code.");
497
- else ui.warn(`@keystroke/skills is installed at ${syncResult.packageRoot} but no skill directories with SKILL.md were found.`);
414
+ else if (syncResult.reason === "not_installed") ui.hint("After install completes, run `keystroke skills sync` to copy @keystrokehq/skills for Cursor / Claude Code.");
415
+ else ui.warn(`@keystrokehq/skills is installed at ${syncResult.packageRoot} but no skill directories with SKILL.md were found.`);
498
416
  }
499
- async function scaffoldProject(targetDir, projectName, workflowCoreVersionRange, skillsVersionRange, runInstallAfterScaffold) {
500
- const pkgAction = await ensureScaffoldPackageJson(targetDir, projectName, {
501
- workflowCore: workflowCoreVersionRange,
502
- skills: skillsVersionRange
503
- });
504
- ui.success(pkgAction === "created" ? `Created package.json (@keystrokehq/core ${workflowCoreVersionRange}, @keystroke/skills ${skillsVersionRange})` : `Updated package.json (Keystroke deps → core ${workflowCoreVersionRange}, skills ${skillsVersionRange})`);
505
- const registryUrl = getKeystrokeLocalNpmRegistryUrl();
506
- const npmrcAction = await ensureKeystrokeLocalRegistryNpmrc(targetDir);
507
- if (npmrcAction === "created") ui.success(`Created .npmrc (@keystroke → local registry ${registryUrl.trim()})`);
508
- else if (npmrcAction === "updated") ui.success("Updated .npmrc with @keystroke registry line");
509
- ui.hint("Before install: run Verdaccio (e.g. pnpm dlx verdaccio), then from the Keystroke repo: pnpm publish:local");
417
+ async function scaffoldProject(targetDir, projectName, workflowCoreVersionRange) {
418
+ const pkgAction = await ensureScaffoldPackageJson(targetDir, projectName, workflowCoreVersionRange);
419
+ ui.success(pkgAction === "created" ? `Created package.json (@keystrokehq/core ${workflowCoreVersionRange})` : `Updated package.json (Keystroke deps -> core ${workflowCoreVersionRange})`);
510
420
  const files = [
511
421
  {
512
422
  rel: "vitest.config.ts",
@@ -557,29 +467,8 @@ async function scaffoldProject(targetDir, projectName, workflowCoreVersionRange,
557
467
  }
558
468
  if (created.length > 0) ui.success(`Scaffolded ${created.length} file(s): ${created.join(", ")}`);
559
469
  else ui.hint("Scaffold files already exist — skipped (package.json was still updated).");
560
- if (runInstallAfterScaffold) {
561
- const pkgJsonPath = path.join(targetDir, "package.json");
562
- try {
563
- await access(pkgJsonPath);
564
- } catch {
565
- return;
566
- }
567
- ui.hint("Running install...");
568
- const ok = await runInstall(targetDir);
569
- const pm = detectPackageManager(targetDir);
570
- const testCmd = pm === "pnpm" ? "pnpm test" : pm === "yarn" ? "yarn test" : "npm test";
571
- if (ok) {
572
- ui.success("Dependencies installed.");
573
- await trySyncAgentSkillsAfterScaffold(targetDir);
574
- ui.hint(`Run \`${testCmd}\` to run tests.`);
575
- } else {
576
- ui.warn("Install failed. Run your package manager install manually.");
577
- await trySyncAgentSkillsAfterScaffold(targetDir);
578
- }
579
- } else {
580
- ui.hint("Run `pnpm install`, then `pnpm test` to run tests (or use your lockfile’s package manager).");
581
- await trySyncAgentSkillsAfterScaffold(targetDir);
582
- }
470
+ ui.hint("Run `pnpm install` to install dependencies, then `pnpm test` to run tests (or use your lockfile's package manager).");
471
+ await trySyncAgentSkillsAfterScaffold(targetDir);
583
472
  }
584
473
  //#endregion
585
474
  export { handleInit };
@@ -3,9 +3,9 @@
3
3
  import { D as throwReportedCliExit, h as toErrorMessage, o as ANSI, s as style, t as ui } from "./keystroke.mjs";
4
4
  import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
5
  import { i as writeJson } from "./output-q4KljAhu.mjs";
6
- import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-Y1f1hGYy.mjs";
6
+ import { i as requireClient, t as assertProjectConfigMatchesAuthenticatedOrg } from "./context-D-YKFNxL.mjs";
7
7
  import { i as resolveTypeHint } from "./schema-display-D4A1gQEM.mjs";
8
- import { n as resolveLocalWorkflowManifest, r as resolveProjectContext, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-M8GEIHxv.mjs";
8
+ import { n as resolveLocalWorkflowManifest, r as resolveProjectContext, t as lookupCurrentDeploymentWorkflow } from "./current-deployment-workflow-BRYuEubW.mjs";
9
9
  import dayjs from "dayjs";
10
10
  //#region src/commands/workflows/inspect/inspect-display.ts
11
11
  function formatBuildTimestamp(iso) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { C as CliExitError, D as throwReportedCliExit, h as toErrorMessage, m as isNetworkError, p as isAuthError, t as ui, u as REAUTH_HINT } from "./keystroke.mjs";
4
4
  import { a as writeJsonError } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
6
  //#region src/lib/integration-catalog.ts
7
7
  const catalogCache = /* @__PURE__ */ new WeakMap();
8
8
  function buildView(entries) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-q4KljAhu.mjs";
4
- import { t as createTypedCommand } from "./commander-DZ3F3CVq.mjs";
4
+ import { t as createTypedCommand } from "./commander-pxSPDCZ4.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/integrations/integrations.command.ts
7
7
  const IntegrationsListOptionsSchema = JsonOptionSchema.extend({
@@ -46,13 +46,13 @@ function createIntegrationsCommand() {
46
46
  description: "List Keystroke integrations available to your organization",
47
47
  schema: IntegrationsListOptionsSchema,
48
48
  optionsConfig: INTEGRATIONS_LIST_OPTIONS_CONFIG,
49
- loadHandler: async () => (await import("./list.handler-CWO6DExh.mjs")).handleIntegrationsList,
49
+ loadHandler: async () => (await import("./list.handler-Vv9KmhB9.mjs")).handleIntegrationsList,
50
50
  subcommands: [createTypedCommand({
51
51
  name: "list",
52
52
  description: "List Keystroke integrations available to your organization",
53
53
  schema: IntegrationsListOptionsSchema,
54
54
  optionsConfig: INTEGRATIONS_LIST_OPTIONS_CONFIG,
55
- loadHandler: async () => (await import("./list.handler-CWO6DExh.mjs")).handleIntegrationsList
55
+ loadHandler: async () => (await import("./list.handler-Vv9KmhB9.mjs")).handleIntegrationsList
56
56
  }), createTypedCommand({
57
57
  name: "register",
58
58
  description: "Register a workspace provider app for future workspace-authored OAuth support",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-q4KljAhu.mjs";
4
- import { t as createTypedCommand } from "./commander-DZ3F3CVq.mjs";
4
+ import { t as createTypedCommand } from "./commander-pxSPDCZ4.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/commands/invites/invites.command.ts
7
7
  const InvitesListOptionsSchema = JsonOptionSchema;
@@ -19,13 +19,13 @@ function createInvitesCommand() {
19
19
  description: "Manage invitations for the current user",
20
20
  schema: InvitesListOptionsSchema,
21
21
  optionsConfig: { ...JSON_OPTION_CONFIG },
22
- loadHandler: async () => (await import("./list.handler-DLl8ca6F.mjs")).handleInvitesList,
22
+ loadHandler: async () => (await import("./list.handler-b4qYQtwn.mjs")).handleInvitesList,
23
23
  subcommands: [createTypedCommand({
24
24
  name: "list",
25
25
  description: "List pending invites for the current user",
26
26
  schema: InvitesListOptionsSchema,
27
27
  optionsConfig: { ...JSON_OPTION_CONFIG },
28
- loadHandler: async () => (await import("./list.handler-DLl8ca6F.mjs")).handleInvitesList
28
+ loadHandler: async () => (await import("./list.handler-b4qYQtwn.mjs")).handleInvitesList
29
29
  }), createTypedCommand({
30
30
  name: "accept",
31
31
  description: "Accept a pending invite",
@@ -36,7 +36,7 @@ function createInvitesCommand() {
36
36
  description: "Invite ID to accept",
37
37
  key: "inviteId"
38
38
  },
39
- loadHandler: async () => (await import("./accept.handler-DFtM0IuO.mjs")).handleInvitesAccept
39
+ loadHandler: async () => (await import("./accept.handler-CudtwdDV.mjs")).handleInvitesAccept
40
40
  })]
41
41
  });
42
42
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/org/invites.list.handler.ts
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
7
  //#region src/commands/org/invites.resend.handler.ts
8
8
  async function handleOrgInvitesResend(options, ctx) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
6
  import { i as requireOrganizationId, n as isIamJsonMode, r as requireConfirmation, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
7
  //#region src/commands/org/invites.revoke.handler.ts
8
8
  async function handleOrgInvitesRevoke(options, ctx) {
@@ -9,7 +9,7 @@ import * as path$1 from "node:path";
9
9
  import { z } from "zod";
10
10
  import { log } from "@clack/prompts";
11
11
  //#region package.json
12
- var version = "0.0.3";
12
+ var version = "0.0.6";
13
13
  //#endregion
14
14
  //#region src/command-registry.ts
15
15
  const ROOT_OPTIONS_WITH_VALUES = new Set([
@@ -21,76 +21,84 @@ const ROOT_VERSION_FLAGS = new Set(["-V", "--version"]);
21
21
  const lazyCommandDefinitions = [
22
22
  {
23
23
  name: "agents",
24
- loadCommand: async () => (await import("./agents-DMEo-6QB.mjs")).createAgentsCommand()
24
+ loadCommand: async () => (await import("./agents-DbekD_Vx.mjs")).createAgentsCommand()
25
25
  },
26
26
  {
27
27
  name: "admin",
28
- loadCommand: async () => (await import("./admin-D_7tenRC.mjs")).createAdminCommand()
28
+ loadCommand: async () => (await import("./admin-ByNq50FH.mjs")).createAdminCommand()
29
29
  },
30
30
  {
31
31
  name: "api-keys",
32
- loadCommand: async () => (await import("./api-keys-BThGvtdn.mjs")).createApiKeysCommand()
32
+ loadCommand: async () => (await import("./api-keys-kvwq9Jb4.mjs")).createApiKeysCommand()
33
33
  },
34
34
  {
35
35
  name: "auth",
36
- loadCommand: async () => (await import("./auth-CY0Gg9sN.mjs")).createAuthCommand()
36
+ loadCommand: async () => (await import("./auth-DS3C07ib.mjs")).createAuthCommand()
37
37
  },
38
38
  {
39
39
  name: "connect",
40
- loadCommand: async () => (await import("./connect-DpQgYg8z.mjs")).createConnectCommand()
40
+ loadCommand: async () => (await import("./connect-B_uc0wqI.mjs")).createConnectCommand()
41
41
  },
42
42
  {
43
43
  name: "credentials",
44
- loadCommand: async () => (await import("./credentials-UpgEcaub.mjs")).createCredentialsCommand(),
44
+ loadCommand: async () => (await import("./credentials-CL_PCuhM.mjs")).createCredentialsCommand(),
45
45
  copyInheritedSettings: true
46
46
  },
47
47
  {
48
48
  name: "org",
49
- loadCommand: async () => (await import("./org-CkRr-f3S.mjs")).createOrgCommand()
49
+ loadCommand: async () => (await import("./org-GdHhuSNk.mjs")).createOrgCommand()
50
50
  },
51
51
  {
52
52
  name: "deploy",
53
- loadCommand: async () => (await import("./deploy-Gw0KPrkf.mjs")).createDeployCommand()
53
+ loadCommand: async () => (await import("./deploy-BE3F62Mz.mjs")).createDeployCommand()
54
54
  },
55
55
  {
56
56
  name: "init",
57
- loadCommand: async () => (await import("./init-C0sps8R7.mjs")).createInitCommand()
57
+ loadCommand: async () => (await import("./init-BXwx0QA4.mjs")).createInitCommand()
58
58
  },
59
59
  {
60
60
  name: "integrations",
61
- loadCommand: async () => (await import("./integrations-Dcadds2b.mjs")).createIntegrationsCommand()
61
+ loadCommand: async () => (await import("./integrations-CoBzLNEe.mjs")).createIntegrationsCommand()
62
62
  },
63
63
  {
64
64
  name: "invites",
65
- loadCommand: async () => (await import("./invites-DvsxTRAb.mjs")).createInvitesCommand()
65
+ loadCommand: async () => (await import("./invites-BmNy1RHp.mjs")).createInvitesCommand()
66
66
  },
67
67
  {
68
68
  name: "logs",
69
- loadCommand: async () => (await import("./logs-D_48skmi.mjs")).createLogsCommand()
69
+ loadCommand: async () => (await import("./logs-BRticZ00.mjs")).createLogsCommand()
70
+ },
71
+ {
72
+ name: "listen",
73
+ loadCommand: async () => (await import("./listen-DVV1fp5c.mjs")).createListenCommand()
70
74
  },
71
75
  {
72
76
  name: "projects",
73
- loadCommand: async () => (await import("./projects-yA9AAaDM.mjs")).createProjectsCommand()
77
+ loadCommand: async () => (await import("./projects-BjnCG-pc.mjs")).createProjectsCommand()
74
78
  },
75
79
  {
76
80
  name: "runs",
77
- loadCommand: async () => (await import("./runs-B8mW4PqP.mjs")).createRunsCommand()
81
+ loadCommand: async () => (await import("./runs-2BdRfql3.mjs")).createRunsCommand()
78
82
  },
79
83
  {
80
84
  name: "skills",
81
- loadCommand: async () => (await import("./skills.command-DWxcc3Ui.mjs")).createSkillsCommand()
85
+ loadCommand: async () => (await import("./skills.command-C2NXqc5h.mjs")).createSkillsCommand()
82
86
  },
83
87
  {
84
88
  name: "sync",
85
- loadCommand: async () => (await import("./sync-CL6zXiiA.mjs")).createSyncCommand()
89
+ loadCommand: async () => (await import("./sync-D098Vbv2.mjs")).createSyncCommand()
86
90
  },
87
91
  {
88
92
  name: "test",
89
- loadCommand: async () => (await import("./test-BsTLXIPB.mjs")).createTestCommand()
93
+ loadCommand: async () => (await import("./test-BZt0Duhs.mjs")).createTestCommand()
94
+ },
95
+ {
96
+ name: "upgrade",
97
+ loadCommand: async () => (await import("./upgrade-Bdez-X6_.mjs")).createUpgradeCommand()
90
98
  },
91
99
  {
92
100
  name: "workflows",
93
- loadCommand: async () => (await import("./workflows-S-gbfw8f.mjs")).createWorkflowsCommand()
101
+ loadCommand: async () => (await import("./workflows-DypSJM0t.mjs")).createWorkflowsCommand()
94
102
  }
95
103
  ];
96
104
  function selectCommandRegistration(argv, commandNames = new Set(lazyCommandDefinitions.map((definition) => definition.name))) {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { t as ui } from "./keystroke.mjs";
4
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
4
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
5
5
  //#region src/commands/org/list.handler.ts
6
6
  async function handleOrgList(_options, ctx) {
7
7
  const { user } = await requireClient(ctx).users.getMe();
@@ -5,7 +5,7 @@ import { d as trackProject } from "./dist-BF6r1hfv.mjs";
5
5
  import { i as writeJson } from "./output-q4KljAhu.mjs";
6
6
  import { t as requireWorkflowsDir } from "./resolve-project-DgfftdPm.mjs";
7
7
  import { t as createSpinnerProgress } from "./spinner-progress-bvKd1jXc.mjs";
8
- import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-BcaIdRR6.mjs";
8
+ import { a as runWorkflowBuild, n as renderBuildFailure } from "./workflow-build-DD8TLlPu.mjs";
9
9
  //#region src/commands/workflows/list.handler.ts
10
10
  function formatWorkflow(artifact) {
11
11
  const name = style(artifact.manifest.name, `${ANSI.bold}${ANSI.cyan}`);
@@ -3,7 +3,7 @@
3
3
  import { D as throwReportedCliExit, t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
5
  import { n as getProcessEnv } from "./env-YTZGKGIu.mjs";
6
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
6
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
7
7
  import { a as readManifestsFromOutDir } from "./dist-C2Dq_nx3.mjs";
8
8
  import { n as resolveWorkflowsDir } from "./resolve-project-DgfftdPm.mjs";
9
9
  import { t as readCredentialEnvMap } from "./credential-env-map-C8P7uTD-.mjs";
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { h as toErrorMessage, m as isNetworkError, o as ANSI, s as style, t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
6
- import { t as getIntegrationCatalog } from "./integration-catalog-DFlytKJS.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
+ import { t as getIntegrationCatalog } from "./integration-catalog-ClP7YGqM.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/integrations/list.handler.ts
9
9
  function summarizeConnections(entry, connections) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
6
  import { n as isIamJsonMode, t as handleIamError } from "./iam-command-utils-CNC8JfZ5.mjs";
7
7
  import Table from "cli-table3";
8
8
  //#region src/commands/invites/list.handler.ts
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { D as throwReportedCliExit, h as toErrorMessage, o as ANSI, s as style, t as ui } from "./keystroke.mjs";
4
4
  import { i as writeJson } from "./output-q4KljAhu.mjs";
5
- import { i as requireClient } from "./context-Y1f1hGYy.mjs";
5
+ import { i as requireClient } from "./context-D-YKFNxL.mjs";
6
6
  import Table from "cli-table3";
7
7
  //#region src/commands/api-keys/list.handler.ts
8
8
  async function handleApiKeysList(_options, ctx) {
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { n as JsonOptionSchema, t as JSON_OPTION_CONFIG } from "./output-q4KljAhu.mjs";
4
+ import { t as createTypedCommand } from "./commander-pxSPDCZ4.mjs";
5
+ import { z } from "zod";
6
+ //#region src/commands/listen/listen.command.ts
7
+ const ListenOptionsSchema = JsonOptionSchema.extend({ timeout: z.coerce.number().int().min(1).default(300) });
8
+ const LISTEN_OPTIONS_CONFIG = {
9
+ ...JSON_OPTION_CONFIG,
10
+ timeout: {
11
+ flag: "--timeout <seconds>",
12
+ description: "Maximum time to wait before cancelling the listen session (default: 300)"
13
+ }
14
+ };
15
+ function createListenCommand() {
16
+ return createTypedCommand({
17
+ name: "listen",
18
+ description: "Listen for one incoming request and print its body",
19
+ schema: ListenOptionsSchema,
20
+ optionsConfig: LISTEN_OPTIONS_CONFIG,
21
+ loadHandler: async () => (await import("./listen.handler-CyFpUSOu.mjs")).handleListen
22
+ });
23
+ }
24
+ //#endregion
25
+ export { createListenCommand };