@dreamlake/dreamlake-cli 0.111.2 → 0.112.0

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 (129) hide show
  1. package/dist/api/skills.js +1 -1
  2. package/dist/cli/agents/index.js +20 -20
  3. package/dist/cli/agents/manage.js +1 -1
  4. package/dist/cli/artifact/index.js +5 -5
  5. package/dist/cli/artifact/meta.js +1 -1
  6. package/dist/cli/auth/commands.d.ts +2 -2
  7. package/dist/cli/auth/commands.js +9 -9
  8. package/dist/cli/auth/device-flow.js +2 -2
  9. package/dist/cli/auth/materialized.d.ts +1 -1
  10. package/dist/cli/auth/materialized.js +1 -1
  11. package/dist/cli/compat/http.js +2 -2
  12. package/dist/cli/compat/presignedTransfer.js +2 -2
  13. package/dist/cli/config.js +2 -2
  14. package/dist/cli/connection/index.js +8 -8
  15. package/dist/cli/connection/oauth.js +3 -3
  16. package/dist/cli/connection/write.js +6 -6
  17. package/dist/cli/create/index.js +2 -2
  18. package/dist/cli/declare/index.js +14 -14
  19. package/dist/cli/delete/index.js +4 -4
  20. package/dist/cli/download/index.js +3 -3
  21. package/dist/cli/env/compose.js +1 -1
  22. package/dist/cli/env/index.js +9 -9
  23. package/dist/cli/experiments/index.js +2 -2
  24. package/dist/cli/experiments/native-commands.js +1 -1
  25. package/dist/cli/experiments/native-run-data.js +1 -1
  26. package/dist/cli/graphql.js +1 -1
  27. package/dist/cli/help-examples.generated.js +253 -253
  28. package/dist/cli/hosts/bootstrap-source.d.ts +1 -1
  29. package/dist/cli/hosts/bootstrap-source.js +1 -1
  30. package/dist/cli/hosts/inventory.js +2 -2
  31. package/dist/cli/hosts/picker.js +2 -2
  32. package/dist/cli/hosts/ssh.js +1 -1
  33. package/dist/cli/hosts/upgrade.d.ts +2 -2
  34. package/dist/cli/hosts/upgrade.js +3 -3
  35. package/dist/cli/index.js +7 -3
  36. package/dist/cli/lakeshore/connections.js +1 -1
  37. package/dist/cli/lakeshore/index.d.ts +1 -1
  38. package/dist/cli/lakeshore/index.js +4 -4
  39. package/dist/cli/launch/index.js +10 -10
  40. package/dist/cli/library/add.js +4 -4
  41. package/dist/cli/library/cache.js +1 -1
  42. package/dist/cli/library/discover.js +1 -1
  43. package/dist/cli/library/freshness.js +1 -1
  44. package/dist/cli/library/index.js +1 -1
  45. package/dist/cli/library/info.js +1 -1
  46. package/dist/cli/library/manifest.js +1 -1
  47. package/dist/cli/library/pull.js +1 -1
  48. package/dist/cli/library/push.js +2 -2
  49. package/dist/cli/library/rm.js +2 -2
  50. package/dist/cli/library/search.js +2 -2
  51. package/dist/cli/library/stat.js +1 -1
  52. package/dist/cli/library/tools.js +1 -1
  53. package/dist/cli/library/wire.js +1 -1
  54. package/dist/cli/list/index.js +4 -4
  55. package/dist/cli/memos/document.d.ts +1 -1
  56. package/dist/cli/memos/document.js +1 -1
  57. package/dist/cli/memos/edit-commands.d.ts +2 -2
  58. package/dist/cli/memos/edit-commands.js +2 -2
  59. package/dist/cli/memos/files-commands.d.ts +1 -1
  60. package/dist/cli/memos/files-commands.js +2 -2
  61. package/dist/cli/memos/index.js +7 -7
  62. package/dist/cli/memos/media-commands.js +1 -1
  63. package/dist/cli/memos/move-command.js +2 -2
  64. package/dist/cli/memos/rm-command.d.ts +1 -1
  65. package/dist/cli/memos/rm-command.js +2 -2
  66. package/dist/cli/namespace.js +2 -2
  67. package/dist/cli/nymph/index.js +4 -4
  68. package/dist/cli/ownership/index.js +1 -1
  69. package/dist/cli/ownership/metadata-transfer.js +2 -2
  70. package/dist/cli/page/index.js +5 -5
  71. package/dist/cli/pipeline/index.js +5 -5
  72. package/dist/cli/project/attachments.js +1 -1
  73. package/dist/cli/project/grants.js +1 -1
  74. package/dist/cli/project/index.js +1 -1
  75. package/dist/cli/project/move.js +3 -3
  76. package/dist/cli/project/stream.js +2 -2
  77. package/dist/cli/provider/dreamdir.js +2 -2
  78. package/dist/cli/provider/index.js +18 -18
  79. package/dist/cli/provider/lifecycle.js +14 -14
  80. package/dist/cli/python.js +4 -4
  81. package/dist/cli/queues/index.js +4 -4
  82. package/dist/cli/queues/slurm.js +2 -2
  83. package/dist/cli/resources.js +2 -2
  84. package/dist/cli/run/index.js +1 -1
  85. package/dist/cli/runconfig/index.js +3 -3
  86. package/dist/cli/runnable/bound.js +3 -3
  87. package/dist/cli/runnable/index.js +14 -14
  88. package/dist/cli/runnable/path.d.ts +1 -1
  89. package/dist/cli/runnable/path.js +1 -1
  90. package/dist/cli/self-update/alias-migration.d.ts +11 -0
  91. package/dist/cli/self-update/alias-migration.js +56 -0
  92. package/dist/cli/self-update/index.d.ts +1 -1
  93. package/dist/cli/self-update/index.js +5 -5
  94. package/dist/cli/self-update/install.js +2 -2
  95. package/dist/cli/self-update/update.d.ts +1 -1
  96. package/dist/cli/self-update/update.js +7 -7
  97. package/dist/cli/session-affiliation.js +1 -1
  98. package/dist/cli/sessions/control.d.ts +1 -1
  99. package/dist/cli/sessions/control.js +2 -2
  100. package/dist/cli/sessions/index.js +5 -5
  101. package/dist/cli/sessions/live.js +1 -1
  102. package/dist/cli/sessions/runner/serve.js +1 -1
  103. package/dist/cli/sessions/wrap.d.ts +2 -2
  104. package/dist/cli/sessions/wrap.js +8 -8
  105. package/dist/cli/skill/index.js +22 -22
  106. package/dist/cli/skill/prefs.js +1 -1
  107. package/dist/cli/skill/read.js +3 -3
  108. package/dist/cli/skill/registry.js +2 -2
  109. package/dist/cli/snapshot/index.js +9 -9
  110. package/dist/cli/source/access.js +3 -3
  111. package/dist/cli/source/control.js +8 -8
  112. package/dist/cli/source/delete.js +6 -6
  113. package/dist/cli/source/index.js +14 -14
  114. package/dist/cli/source/share.js +8 -8
  115. package/dist/cli/source/upload.d.ts +1 -1
  116. package/dist/cli/source/upload.js +2 -2
  117. package/dist/cli/source/write.js +2 -2
  118. package/dist/cli/spawn.js +1 -1
  119. package/dist/cli/tasks/index.js +1 -1
  120. package/dist/cli/update/index.js +2 -2
  121. package/dist/cli/upload/index.js +3 -3
  122. package/dist/cli/upload/multipart.js +1 -1
  123. package/dist/cli/vault/index.js +1 -1
  124. package/dist/cli/vault/sshSync.js +1 -1
  125. package/dist/cli/version.d.ts +1 -1
  126. package/dist/cli/version.js +1 -1
  127. package/dist/cli/workflow/index.d.ts +1 -1
  128. package/dist/cli/workflow/index.js +6 -6
  129. package/package.json +10 -10
@@ -1,7 +1,7 @@
1
1
  /** Skills registry: the server's pinned dreamlake-skills bundle, read-only.
2
2
  *
3
3
  * One business operation shared by three surfaces — `client.skills.read`,
4
- * `dreamlake skill read` and the built-in agent's `dreamlake_skills_read` —
4
+ * `dl skill read` and the built-in agent's `dreamlake_skills_read` —
5
5
  * with the same inputs, the same output fields and the same error codes.
6
6
  * Every answer carries the bundle's `{ tag, commit }` so a caller can say
7
7
  * which revision it read, and every content hash is verified against the
@@ -1,9 +1,9 @@
1
- // `dreamlake agents create` — author an agent and declare it.
1
+ // `dl agents create` — author an agent and declare it.
2
2
  //
3
3
  // AN AGENT IS A NAME AND A PROMPT. That is the whole minimum, and the command
4
4
  // is built around making that the easy case:
5
5
  //
6
- // dreamlake agents create triage --prompt 'You triage failed runs. …'
6
+ // dl agents create triage --prompt 'You triage failed runs. …'
7
7
  //
8
8
  // Everything else is OPTIONAL and layered on when the agent earns it: Claude's
9
9
  // `tools` / `model` / `permissions` when it should be constrained, a
@@ -18,7 +18,7 @@
18
18
  // in, and the dotted form is an implementation detail printed once and then
19
19
  // left alone. Nothing in this command asks you to think in module paths.
20
20
  //
21
- // WHY IT EXISTS WHEN `dreamlake declare` ALREADY POSTS RUNNABLES. `declare`
21
+ // WHY IT EXISTS WHEN `dl declare` ALREADY POSTS RUNNABLES. `declare`
22
22
  // takes a finished JSON object and posts it verbatim — the right shape for a
23
23
  // payload a tool generated, the wrong shape for a page of prose a human is
24
24
  // writing. This command takes the prose, from a file, a heredoc or $EDITOR,
@@ -75,13 +75,13 @@ Reference an argument with a placeholder: the target is \`{{ target }}\`.
75
75
  async function ctx(nsFlag) {
76
76
  const token = resolveToken();
77
77
  if (!token) {
78
- fail("not authenticated — run 'dreamlake login' first");
78
+ fail("not authenticated — run 'dl login' first");
79
79
  return null;
80
80
  }
81
81
  const remote = resolveRemote();
82
82
  const ns = await resolveNamespace(nsFlag, { token, remote });
83
83
  if (!ns) {
84
- fail("could not resolve namespace — run 'dreamlake login' or pass --namespace");
84
+ fail("could not resolve namespace — run 'dl login' or pass --namespace");
85
85
  return null;
86
86
  }
87
87
  return { token, remote, ns };
@@ -117,7 +117,7 @@ function editInEditor(seed) {
117
117
  }
118
118
  return readFileSync(file, "utf8");
119
119
  }
120
- // ─── dreamlake agents create ─────────────────────────────────────────────────
120
+ // ─── dl agents create ─────────────────────────────────────────────────
121
121
  export async function runAgentsCreate(positional, opts) {
122
122
  try {
123
123
  return await createAgent(positional, opts);
@@ -179,7 +179,7 @@ async function createAgent(positional, opts) {
179
179
  }
180
180
  else if (!process.stdin.isTTY) {
181
181
  // A pipe with no --file is still a pipe. Reading it is what makes
182
- // cat agent.md | dreamlake agents create
182
+ // cat agent.md | dl agents create
183
183
  // behave the way every other CLI has taught people to expect.
184
184
  text = await readStdin();
185
185
  origin = "stdin";
@@ -187,10 +187,10 @@ async function createAgent(positional, opts) {
187
187
  if (text === null || text.trim().length === 0) {
188
188
  fail("no prompt given. The body of an agent IS its system prompt, so there is nothing " +
189
189
  "to declare without one.\n" +
190
- " dreamlake agents create --edit # open $EDITOR on a scaffold\n" +
191
- " dreamlake agents create --file agent.md # a Claude agent file\n" +
192
- " dreamlake agents create --file - <<'AGENT' # a heredoc\n" +
193
- " dreamlake agents create --prompt 'You triage failed runs. …'");
190
+ " dl agents create --edit # open $EDITOR on a scaffold\n" +
191
+ " dl agents create --file agent.md # a Claude agent file\n" +
192
+ " dl agents create --file - <<'AGENT' # a heredoc\n" +
193
+ " dl agents create --prompt 'You triage failed runs. …'");
194
194
  return 1;
195
195
  }
196
196
  const { frontmatter, body } = parseAgentFile(text);
@@ -338,7 +338,7 @@ async function createAgent(positional, opts) {
338
338
  payload.channel = channel;
339
339
  // ── 4 · print the target BEFORE the write ───────────────────────────────
340
340
  //
341
- // Same rule as `dreamlake declare`: if the operator is about to hit the wrong
341
+ // Same rule as `dl declare`: if the operator is about to hit the wrong
342
342
  // server, or is about to store a generated name they did not intend, the line
343
343
  // that tells them has to come first.
344
344
  const c = await ctx(opts.namespace);
@@ -386,7 +386,7 @@ async function createAgent(positional, opts) {
386
386
  ok(`declared agent ${derivedName.name}${created?.id ? ` (id ${created.id})` : ""}`);
387
387
  for (const w of warnings)
388
388
  warn(w);
389
- process.stdout.write(` inspect it: dreamlake runnable show ${created?.name ?? storedAs}\n`);
389
+ process.stdout.write(` inspect it: dl runnable show ${created?.name ?? storedAs}\n`);
390
390
  process.stdout.write(" nothing runs it yet — there is no agent route on the control plane.\n");
391
391
  return 0;
392
392
  }
@@ -574,7 +574,7 @@ export function registerAgentsCommand(program) {
574
574
  " An agent is a prompt with a name. Nothing else is required, and an agent",
575
575
  " with nothing else is the normal case, not a degraded one:",
576
576
  "",
577
- " dreamlake agents create triage --prompt 'You triage failed runs. Read the",
577
+ " dl agents create triage --prompt 'You triage failed runs. Read the",
578
578
  " terminal event first, classify the failure, quote the line that decided it.'",
579
579
  "",
580
580
  " Everything below is optional, added when the agent earns it.",
@@ -585,7 +585,7 @@ export function registerAgentsCommand(program) {
585
585
  " <<'AGENT', not <<AGENT — or the shell expands $VARIABLES and backticks",
586
586
  " inside your prose before the CLI ever sees it:",
587
587
  "",
588
- " dreamlake agents create triage --file - <<'AGENT'",
588
+ " dl agents create triage --file - <<'AGENT'",
589
589
  " # Run triage",
590
590
  "",
591
591
  " You triage failed invocations. Read the terminal event before the logs —",
@@ -598,7 +598,7 @@ export function registerAgentsCommand(program) {
598
598
  " That file has no frontmatter and it does not need any. Add frontmatter when",
599
599
  " you want to constrain the agent or give it a machine:",
600
600
  "",
601
- " dreamlake agents create --file - <<'AGENT'",
601
+ " dl agents create --file - <<'AGENT'",
602
602
  " ---",
603
603
  " name: run-triage",
604
604
  " description: Triages a failed invocation and proposes the smallest fix.",
@@ -617,11 +617,11 @@ export function registerAgentsCommand(program) {
617
617
  "",
618
618
  " Or let $EDITOR open a filled-in scaffold and declare what you save:",
619
619
  "",
620
- " dreamlake agents create run-triage --edit",
620
+ " dl agents create run-triage --edit",
621
621
  "",
622
622
  " Or stay on one line, with each property as a flag:",
623
623
  "",
624
- " dreamlake agents create run-triage \\",
624
+ " dl agents create run-triage \\",
625
625
  " --description 'Triages a failed invocation.' \\",
626
626
  " --tools Read,Grep,Bash --model claude-opus-5 \\",
627
627
  " --allow 'Read(./runs/**)' --deny 'Bash(rm:*)' \\",
@@ -639,7 +639,7 @@ export function registerAgentsCommand(program) {
639
639
  " agent has to run somewhere in particular — a GPU, a specific image, a",
640
640
  " prepared host:",
641
641
  "",
642
- " dreamlake agents create colmap-driver --file agent.md \\",
642
+ " dl agents create colmap-driver --file agent.md \\",
643
643
  " --run-config colmap-docker-gpu --queue colmap-gpu",
644
644
  "",
645
645
  " --run-config names an existing RunConfig by name; it is a reference, not a",
@@ -653,7 +653,7 @@ export function registerAgentsCommand(program) {
653
653
  " asks you to think in packages. The name is scoped to the repository you are",
654
654
  " standing in, so two repos can each hold a `triage` without colliding.",
655
655
  "",
656
- " dreamlake agents create triage # in dreamlake-starter-kit",
656
+ " dl agents create triage # in dreamlake-starter-kit",
657
657
  " → agent `triage`, scope `dreamlake_starter_kit`",
658
658
  "",
659
659
  " With no name at all, one is generated — from the description if there is",
@@ -12,7 +12,7 @@ const base = (c) => `/namespaces/${seg(c.ns)}/runnables`;
12
12
  export async function agentContext(namespace) {
13
13
  const token = resolveToken();
14
14
  if (!token)
15
- throw new Error("not authenticated — run 'dreamlake login' first");
15
+ throw new Error("not authenticated — run 'dl login' first");
16
16
  const remote = resolveRemote();
17
17
  const ns = await resolveNamespace(namespace, { token, remote });
18
18
  if (!ns)
@@ -2,7 +2,7 @@ import { registerArtifactRenameCommand } from "./rename.js";
2
2
  import { readSiteConfiguration } from './siteConfig.js';
3
3
  import { collectionList } from "../collection-list.js";
4
4
  import { registerShareCommands } from "../share.js";
5
- // `dreamlake artifact push|list|delete|restore`.
5
+ // `dl artifact push|list|delete|restore`.
6
6
  //
7
7
  // list / delete / restore are thin dreamlake-server REST calls.
8
8
  // `push` writes the version itself: it brokers short-lived, prefix-scoped
@@ -17,7 +17,7 @@ import { collectSite, uploadSite } from "./site.js";
17
17
  import { metaError, putArtifactCover, readCoverFile, registerArtifactMetaCommand } from "./meta.js";
18
18
  // ../prompt.js, NOT @inquirer/prompts directly. This file used to import the
19
19
  // inquirer prompt straight, which bypassed prompt.ts's `!process.stdin.isTTY`
20
- // guard — so `dreamlake artifact delete <id>` without `-y` could block an agent
20
+ // guard — so `dl artifact delete <id>` without `-y` could block an agent
21
21
  // or a CI job forever, waiting at a question nothing was ever going to answer.
22
22
  // Every other confirmation in this CLI goes through the guarded wrapper.
23
23
  import { confirm } from "../prompt.js";
@@ -312,7 +312,7 @@ export async function runDreamlakeArtifactPush(args, deps = {}) {
312
312
  // same server — never the active login's, which may differ. A token
313
313
  // passed explicitly is the one thing it cannot repeat for you.
314
314
  const conn = `--remote ${shellQuote(ctx.remote)}${ctx.debug ? " --debug" : ""}${args.token ? " --token <the same --token>" : ""}`;
315
- process.stderr.write(` re-run: dreamlake artifact meta set ${shellQuote(artifactId)} --namespace ${shellQuote(namespace)} ${conn} --cover ${shellQuote(args.cover)}\n`);
315
+ process.stderr.write(` re-run: dl artifact meta set ${shellQuote(artifactId)} --namespace ${shellQuote(namespace)} ${conn} --cover ${shellQuote(args.cover)}\n`);
316
316
  return 1;
317
317
  }
318
318
  process.stdout.write(` cover: ${put.summary}\n`);
@@ -386,7 +386,7 @@ export async function runDreamlakeArtifactDelete(args, deps = {}) {
386
386
  ok(`permanently deleted ${args.artifactId}${typeof n === "number" ? ` (${n} objects removed)` : ""}`);
387
387
  }
388
388
  else {
389
- ok(`deleted ${args.artifactId} (restore with \`dreamlake artifact restore ${args.artifactId}\`)`);
389
+ ok(`deleted ${args.artifactId} (restore with \`dl artifact restore ${args.artifactId}\`)`);
390
390
  }
391
391
  return 0;
392
392
  }
@@ -408,7 +408,7 @@ export async function runDreamlakeArtifactRestore(args) {
408
408
  return 0;
409
409
  }
410
410
  // ─── append-local (pointer stub) ──────────────────────────────────────────────
411
- // dreamlake-server's artifact Apply endpoint spawns `dreamlake artifact
411
+ // dreamlake-server's artifact Apply endpoint spawns `dl artifact
412
412
  // append-local` expecting the CANONICAL Python writer (DreamDB has no TS
413
413
  // writer). If PATH resolves to THIS CLI instead, answer on stdout with
414
414
  // the same one-line JSON error contract the server parses, so the
@@ -1,4 +1,4 @@
1
- // `dreamlake artifact meta show|set` — the description and cover image an
1
+ // `dl artifact meta show|set` — the description and cover image an
2
2
  // artifact's link preview is built from (and that the list/gallery card
3
3
  // shows), plus the helpers `artifact push --cover` shares with `set`.
4
4
  //
@@ -8,11 +8,11 @@ export interface LoginArgs {
8
8
  token?: string;
9
9
  noNymph?: boolean;
10
10
  }
11
- /** Fallback env for `dreamlake login` on a machine with nothing logged in yet. */
11
+ /** Fallback env for `dl login` on a machine with nothing logged in yet. */
12
12
  export declare const DEFAULT_LOGIN_ENV = "prod";
13
13
  /**
14
14
  * Which environment `login` targets: explicit --env, else the active one,
15
- * else prod. A first-time user gets prod — someone typing `dreamlake login`
15
+ * else prod. A first-time user gets prod — someone typing `dl login`
16
16
  * means the real deployment, not staging.
17
17
  */
18
18
  export declare function resolveLoginEnvName(explicit?: string, filePath?: string): string;
@@ -1,6 +1,6 @@
1
1
  import { afterLogin } from "../nymph/index.js";
2
2
  import { identityMode, machineRead } from "./machine.js";
3
- // `dreamlake login | logout | profile`.
3
+ // `dl login | logout | profile`.
4
4
  //
5
5
  // login: runs the device-authorization flow (default) or saves a token
6
6
  // passed via --token (lakeshore-style escape hatch). On success the env
@@ -74,11 +74,11 @@ function openBrowser(url) {
74
74
  // best-effort
75
75
  }
76
76
  }
77
- /** Fallback env for `dreamlake login` on a machine with nothing logged in yet. */
77
+ /** Fallback env for `dl login` on a machine with nothing logged in yet. */
78
78
  export const DEFAULT_LOGIN_ENV = "prod";
79
79
  /**
80
80
  * Which environment `login` targets: explicit --env, else the active one,
81
- * else prod. A first-time user gets prod — someone typing `dreamlake login`
81
+ * else prod. A first-time user gets prod — someone typing `dl login`
82
82
  * means the real deployment, not staging.
83
83
  */
84
84
  export function resolveLoginEnvName(explicit, filePath) {
@@ -95,7 +95,7 @@ export async function runLogin(args) {
95
95
  // which meant a custom environment could not be defined without naming a
96
96
  // service this CLI no longer talks to.
97
97
  process.stderr.write(`✗ unknown environment '${envName}'. Either use a built-in (${Object.keys(BUILTIN_ENVS).join(", ")}) ` +
98
- `or define one: dreamlake login --env ${envName} --url <api>\n`);
98
+ `or define one: dl login --env ${envName} --url <api>\n`);
99
99
  return 1;
100
100
  }
101
101
  process.stderr.write(`Logging into environment '${envName}' (${remote})\n`);
@@ -147,7 +147,7 @@ export async function runLogin(args) {
147
147
  if (process.stderr.isTTY)
148
148
  process.stderr.write("\n");
149
149
  if (err instanceof DeviceCodeExpiredError) {
150
- process.stderr.write("✗ Device code expired. Run 'dreamlake login' again.\n");
150
+ process.stderr.write("✗ Device code expired. Run 'dl login' again.\n");
151
151
  }
152
152
  else if (err instanceof AuthorizationDeniedError) {
153
153
  process.stderr.write("✗ Authorization denied.\n");
@@ -236,7 +236,7 @@ export async function runEnvList(opts) {
236
236
  }
237
237
  process.stdout.write("Environments\n\n");
238
238
  if (envs.length === 0) {
239
- process.stdout.write(` (none logged in)\n hint: dreamlake login (defaults to prod; built-in: ${Object.keys(BUILTIN_ENVS).join(", ")})\n`);
239
+ process.stdout.write(` (none logged in)\n hint: dl login (defaults to prod; built-in: ${Object.keys(BUILTIN_ENVS).join(", ")})\n`);
240
240
  return 0;
241
241
  }
242
242
  const rows = envs.map((e) => ({
@@ -253,7 +253,7 @@ export async function runEnvList(opts) {
253
253
  process.stdout.write(`\n ! ${note} → effective server: ${resolveRemote()}\n`);
254
254
  else if (!effective) {
255
255
  process.stdout.write(`\n ! effective connection (${resolveRemote()}) matches no saved env — ` +
256
- `run 'dreamlake auth env use <name>' to re-sync\n`);
256
+ `run 'dl auth env use <name>' to re-sync\n`);
257
257
  }
258
258
  return 0;
259
259
  }
@@ -267,7 +267,7 @@ export async function runEnvUse(name) {
267
267
  const known = listEnvs().map((e) => e.name);
268
268
  process.stderr.write(`✗ environment '${name}' is not logged in.\n` +
269
269
  (known.length ? ` logged in: ${known.join(", ")}\n` : "") +
270
- ` log in with: dreamlake login --env ${name}\n`);
270
+ ` log in with: dl login --env ${name}\n`);
271
271
  return 1;
272
272
  }
273
273
  export async function runEnvRemove(name) {
@@ -303,7 +303,7 @@ export async function runProfile(args) {
303
303
  }
304
304
  const token = resolveToken();
305
305
  if (!token) {
306
- process.stdout.write("Not logged in. Run: dreamlake login\n");
306
+ process.stdout.write("Not logged in. Run: dl login\n");
307
307
  return 1;
308
308
  }
309
309
  const remote = resolveRemote(args.url);
@@ -108,7 +108,7 @@ export class DeviceFlowClient {
108
108
  continue;
109
109
  }
110
110
  if (error === "expired_token") {
111
- throw new DeviceCodeExpiredError("Device code expired. Please run 'dreamlake login' again.");
111
+ throw new DeviceCodeExpiredError("Device code expired. Please run 'dl login' again.");
112
112
  }
113
113
  if (error === "access_denied") {
114
114
  throw new AuthorizationDeniedError("User denied authorization request.");
@@ -126,7 +126,7 @@ export class DeviceFlowClient {
126
126
  await sleep(5000);
127
127
  }
128
128
  }
129
- throw new DeviceFlowError("Authorization timed out after 10 minutes. Please run 'dreamlake login' again.");
129
+ throw new DeviceFlowError("Authorization timed out after 10 minutes. Please run 'dl login' again.");
130
130
  }
131
131
  /** Exchange a vuer-auth token for a permanent dreamlake token. */
132
132
  async exchangeToken(vuerAuthToken) {
@@ -1,4 +1,4 @@
1
- /** The token slot `dreamlake login` (py) writes and `_session.py` reads. */
1
+ /** The token slot `dl login` (py) writes and `_session.py` reads. */
2
2
  export declare const TOKEN_SLOT = "dreamlake-token";
3
3
  /** `~/.dreamlake` — shared with dreamlake-py. Fixed, no XDG (py has none). */
4
4
  export declare function dreamlakeDir(): string;
@@ -25,7 +25,7 @@
25
25
  import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync, } from "node:fs";
26
26
  import { homedir } from "node:os";
27
27
  import path from "node:path";
28
- /** The token slot `dreamlake login` (py) writes and `_session.py` reads. */
28
+ /** The token slot `dl login` (py) writes and `_session.py` reads. */
29
29
  export const TOKEN_SLOT = "dreamlake-token";
30
30
  /** `~/.dreamlake` — shared with dreamlake-py. Fixed, no XDG (py has none). */
31
31
  export function dreamlakeDir() {
@@ -124,7 +124,7 @@ export async function episodeExists(ctx, token, namespace, project, episode) {
124
124
  /** Resolved token or a printed error + null. */
125
125
  export function requireToken(ctx) {
126
126
  if (!ctx.token) {
127
- fail("not authenticated. run `dreamlake login` first");
127
+ fail("not authenticated. run `dl login` first");
128
128
  return null;
129
129
  }
130
130
  return ctx.token;
@@ -136,7 +136,7 @@ export async function requireNamespace(ctx, explicit) {
136
136
  return explicit;
137
137
  const ns = await resolveNamespace(ctx);
138
138
  if (!ns) {
139
- fail("namespace not specified and no authenticated user found. run `dreamlake login`");
139
+ fail("namespace not specified and no authenticated user found. run `dl login`");
140
140
  }
141
141
  return ns;
142
142
  }
@@ -1,5 +1,5 @@
1
- // The presigned-batch transfer executor, shared by `dreamlake source upload`
2
- // and `dreamlake library push`.
1
+ // The presigned-batch transfer executor, shared by `dl source upload`
2
+ // and `dl library push`.
3
3
  //
4
4
  // Both surfaces answer an upload-authorizations call with the same transfer
5
5
  // shape per file — `{kind:'single-put'}` or `{kind:'s3-multipart'}` — and this
@@ -38,7 +38,7 @@ export function resolveRemote(flag, dir) {
38
38
  /** Bearer token, or null if unauthenticated. */
39
39
  export function resolveToken(flag, dir) {
40
40
  if (identityMode() === "machine")
41
- throw new Error("Machine identity does not use human bearer tokens. Use dreamlake machine self|host|project, or --identity user for personal commands");
41
+ throw new Error("Machine identity does not use human bearer tokens. Use dl machine self|host|project, or --identity user for personal commands");
42
42
  return flag || process.env.DREAMLAKE_API_KEY || readToken(dir) || null;
43
43
  }
44
44
  /** Decode a JWT payload without verifying the signature. Returns {} on failure. */
@@ -72,7 +72,7 @@ export async function resolveNamespace(explicit, opts) {
72
72
  if (selected && typeof selected === 'object' && selected.remote === stripTrailingSlash(opts.remote) &&
73
73
  selected.tokenSha256 === createHash('sha256').update(opts.token).digest('hex')) {
74
74
  if (typeof selected.namespace !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/.test(selected.namespace))
75
- throw new Error('Saved CLI namespace is invalid; run dreamlake su <namespace> again');
75
+ throw new Error('Saved CLI namespace is invalid; run dl su <namespace> again');
76
76
  return selected.namespace;
77
77
  }
78
78
  if (cfg.namespace &&
@@ -9,13 +9,13 @@ import { registerConnectionWriteCommands } from "./write.js";
9
9
  export async function ctx(nsFlag) {
10
10
  const token = resolveToken();
11
11
  if (!token) {
12
- fail("not authenticated — run 'dreamlake login' first");
12
+ fail("not authenticated — run 'dl login' first");
13
13
  return null;
14
14
  }
15
15
  const remote = resolveRemote();
16
16
  const ns = await resolveNamespace(nsFlag, { token, remote });
17
17
  if (!ns) {
18
- fail("could not resolve namespace — run 'dreamlake login' or pass --namespace");
18
+ fail("could not resolve namespace — run 'dl login' or pass --namespace");
19
19
  return null;
20
20
  }
21
21
  return { token, remote, ns };
@@ -45,7 +45,7 @@ export function connectionPath(c, id) {
45
45
  export function explain(err) {
46
46
  if (err instanceof HttpError) {
47
47
  if (err.status === 401)
48
- return "not authenticated — run 'dreamlake login' first";
48
+ return "not authenticated — run 'dl login' first";
49
49
  if (err.status === 404) {
50
50
  /*
51
51
  * Two different 404s, and they were being reported as one.
@@ -57,7 +57,7 @@ export function explain(err) {
57
57
  *
58
58
  * A BARE 404 has no code because it is not a Connection envelope at all.
59
59
  * It is the router: with `CONNECTION_V1_ENABLED` unset the whole scope is
60
- * never mounted, so every `dreamlake connection …` command hits nothing.
60
+ * never mounted, so every `dl connection …` command hits nothing.
61
61
  * Reporting that as "you are not a credential manager" sends someone to
62
62
  * ask for a permission that would not help, on a server that has no
63
63
  * Connections to be a manager of.
@@ -153,7 +153,7 @@ function printCounts(counts, ns, opts) {
153
153
  * the next page of what they were reading.
154
154
  */
155
155
  function listCommand(opts) {
156
- const parts = ["dreamlake connection list"];
156
+ const parts = ["dl connection list"];
157
157
  if (opts.labelContains !== undefined)
158
158
  parts.push(`--label-contains ${quote(opts.labelContains)}`);
159
159
  if (opts.lifecycle !== undefined)
@@ -364,7 +364,7 @@ export async function runConnectionAffected(id, opts) {
364
364
  return 0;
365
365
  }
366
366
  if (page.items.length === 0) {
367
- printEmptyPage(c, page.nextCursor, "No sources use this connection.", `dreamlake connection affected-sources ${id}`);
367
+ printEmptyPage(c, page.nextCursor, "No sources use this connection.", `dl connection affected-sources ${id}`);
368
368
  return 0;
369
369
  }
370
370
  process.stdout.write(renderTable(page.items.map((x) => ({
@@ -373,7 +373,7 @@ export async function runConnectionAffected(id, opts) {
373
373
  sourceId: x.sourceId,
374
374
  })), ["name", "lifecycle", "sourceId"]));
375
375
  process.stdout.write(`\n ${page.items.length} source(s) use this connection\n`);
376
- printNextPage(c, page.nextCursor, `dreamlake connection affected-sources ${id}`);
376
+ printNextPage(c, page.nextCursor, `dl connection affected-sources ${id}`);
377
377
  return 0;
378
378
  }
379
379
  catch (err) {
@@ -398,7 +398,7 @@ export function registerConnectionCommand(program) {
398
398
  .action(async (opts) => process.exit(await runConnectionList(opts)));
399
399
  strictArgs(connection.command("show"))
400
400
  .description("show one connection")
401
- .argument("<id>", "connection id (see 'dreamlake connection list')")
401
+ .argument("<id>", "connection id (see 'dl connection list')")
402
402
  .option("--namespace <slug>", "namespace slug (default: active login)")
403
403
  .option("--json", "emit JSON")
404
404
  .action(async (id, opts) => process.exit(await runConnectionShow(id, opts)));
@@ -1,4 +1,4 @@
1
- // The OAuth half of `dreamlake connection …`.
1
+ // The OAuth half of `dl connection …`.
2
2
  //
3
3
  // The division of labour is not negotiable and is worth stating plainly,
4
4
  // because getting it wrong is how a CLI ends up holding secrets it has no
@@ -40,7 +40,7 @@ const RETURN_TO = "/settings/connections";
40
40
  * authorization.
41
41
  */
42
42
  function statusCommand(c, operationId) {
43
- return `dreamlake connection oauth status ${operationId} --namespace ${c.ns}`;
43
+ return `dl connection oauth status ${operationId} --namespace ${c.ns}`;
44
44
  }
45
45
  const POLL_INTERVAL_MS = 2000;
46
46
  const DEFAULT_TIMEOUT_MS = 5 * 60 * 1000;
@@ -92,7 +92,7 @@ async function begin(c, body) {
92
92
  " This endpoint has no idempotency key, so there is nothing to repeat\n" +
93
93
  " safely. Running the command again starts a new authorization; an\n" +
94
94
  " operation nobody completes expires on its own and creates nothing.\n" +
95
- " Check what exists first: dreamlake connection list\n" +
95
+ " Check what exists first: dl connection list\n" +
96
96
  ` (${err.message})`);
97
97
  return null;
98
98
  }
@@ -1,4 +1,4 @@
1
- // The mutating half of `dreamlake connection …`.
1
+ // The mutating half of `dl connection …`.
2
2
  //
3
3
  // Two rules shape almost everything here.
4
4
  //
@@ -352,14 +352,14 @@ export async function runConnectionCheck(id, opts) {
352
352
  " This connector can only be verified against a target, which belongs\n" +
353
353
  " to a Source rather than to the Connection — so this layer cannot ask\n" +
354
354
  " the provider anything. It gets exercised when a Source uses it:\n" +
355
- ` dreamlake source import --connector <kind> --connection ${id} --target <json>\n`);
355
+ ` dl source import --connector <kind> --connection ${id} --target <json>\n`);
356
356
  }
357
357
  else if (result.status === "unavailable") {
358
358
  process.stdout.write(result.reason === "connection-disabled"
359
359
  ? "\n Nothing was changed. This connection is already disabled;\n" +
360
- ` enable it when you want to use it: dreamlake connection enable ${id}\n`
360
+ ` enable it when you want to use it: dl connection enable ${id}\n`
361
361
  : "\n Nothing was changed. This connection is still enabled; disable it\n" +
362
- ` yourself if that is what you want: dreamlake connection disable ${id}\n`);
362
+ ` yourself if that is what you want: dl connection disable ${id}\n`);
363
363
  }
364
364
  return 0;
365
365
  }
@@ -490,7 +490,7 @@ export async function runConnectionDelete(id, opts) {
490
490
  if (err instanceof HttpError && err.code === "CONNECTION_IN_USE") {
491
491
  fail(`${err.message}\n` +
492
492
  ` Nothing was deleted and no source was changed. See what still uses it:\n` +
493
- ` dreamlake connection affected-sources ${id}`);
493
+ ` dl connection affected-sources ${id}`);
494
494
  return 1;
495
495
  }
496
496
  if (isAmbiguous(err))
@@ -536,7 +536,7 @@ export function registerConnectionWriteCommands(connection) {
536
536
  .action(async (opts) => process.exit(await runConnectionCreate(opts)));
537
537
  idempotent(strictArgs(connection.command("rename")))
538
538
  .description("change a connection's label")
539
- .argument("<id>", "connection id (see 'dreamlake connection list')")
539
+ .argument("<id>", "connection id (see 'dl connection list')")
540
540
  .requiredOption("--label <text>", "the new label")
541
541
  .option("--namespace <slug>", "namespace slug (default: active login)")
542
542
  .option("--json", "emit JSON")
@@ -129,12 +129,12 @@ export async function runCreateProject(name, opts) {
129
129
  const remote = resolveRemote();
130
130
  const token = resolveToken();
131
131
  if (!token) {
132
- fail("not authenticated. run 'dreamlake login' first");
132
+ fail("not authenticated. run 'dl login' first");
133
133
  return 1;
134
134
  }
135
135
  const namespace = await resolveNamespace(opts.namespace, { token, remote });
136
136
  if (!namespace) {
137
- fail("namespace not specified and no authenticated user found. run 'dreamlake login'");
137
+ fail("namespace not specified and no authenticated user found. run 'dl login'");
138
138
  return 1;
139
139
  }
140
140
  const body = { name };
@@ -1,4 +1,4 @@
1
- // `dreamlake declare <file>…` — the one writer for the five *head*
1
+ // `dl declare <file>…` — the one writer for the five *head*
2
2
  // declaration collections on dreamlake-server.
3
3
  //
4
4
  // lakeshore-providers how a machine gets launched
@@ -34,7 +34,7 @@
34
34
  //
35
35
  // The sub-resources — `runnables/:id/versions`, `repos/:id/snapshots` — are NOT
36
36
  // reachable from here: they hang off a nested path and are append-only, not
37
- // create-only. `dreamlake runnable version push` owns the one that matters.
37
+ // create-only. `dl runnable version push` owns the one that matters.
38
38
  import { HttpError, requestJson } from "../client.js";
39
39
  import { resolveNamespace, resolveRemote, resolveToken } from "../config.js";
40
40
  import { emitJson, fail, loadStructuredFile, ok, warn } from "../helpers.js";
@@ -100,13 +100,13 @@ export function inferCollection(payload) {
100
100
  async function ctx(nsFlag) {
101
101
  const token = resolveToken();
102
102
  if (!token) {
103
- fail("not authenticated — run 'dreamlake login' first");
103
+ fail("not authenticated — run 'dl login' first");
104
104
  return null;
105
105
  }
106
106
  const remote = resolveRemote();
107
107
  const ns = await resolveNamespace(nsFlag, { token, remote });
108
108
  if (!ns) {
109
- fail("could not resolve namespace — run 'dreamlake login' or pass --namespace");
109
+ fail("could not resolve namespace — run 'dl login' or pass --namespace");
110
110
  return null;
111
111
  }
112
112
  return { token, remote, ns };
@@ -115,18 +115,18 @@ const SOURCE_REFUSAL = "Sources are no longer declared. There are now two separa
115
115
  "this file cannot be mapped onto either one reliably — so it is refused " +
116
116
  "rather than guessed at. Pick the one that matches what the Source is:\n" +
117
117
  " managed-only — DreamLake stores the data, and a name is all it takes:\n" +
118
- " dreamlake source create <name> [--description <text>]\n" +
118
+ " dl source create <name> [--description <text>]\n" +
119
119
  " external — the data already lives somewhere else, so the connector and\n" +
120
120
  " its target have to be named:\n" +
121
- " dreamlake source import --connector <kind> --target <json>\n" +
121
+ " dl source import --connector <kind> --target <json>\n" +
122
122
  "Nothing was sent.";
123
123
  const HOST_KEY_REFUSAL = "hostKey is derived server-side and is never accepted from a client — " +
124
124
  "the server recomputes it on every write, so a value here would be silently " +
125
125
  "ignored rather than honoured. Remove it from the payload.";
126
- // ─── dreamlake declare ───────────────────────────────────────────────────────
126
+ // ─── dl declare ───────────────────────────────────────────────────────
127
127
  export async function runDeclare(files, opts) {
128
128
  if (files.length === 0) {
129
- fail("no files given — usage: dreamlake declare <file>…");
129
+ fail("no files given — usage: dl declare <file>…");
130
130
  return 1;
131
131
  }
132
132
  const ifExists = opts.ifExists ?? "fail";
@@ -284,21 +284,21 @@ export function registerDeclareCommand(program) {
284
284
  "Sources are refused locally too, and for a larger reason: they are no longer",
285
285
  "declared at all. A Source is now one of two things, and the two are made in",
286
286
  "different ways. A managed-only Source — one whose data DreamLake stores —",
287
- "needs nothing but a name: `dreamlake source create <name>`. An external",
287
+ "needs nothing but a name: `dl source create <name>`. An external",
288
288
  "Source points at data that already lives elsewhere, so it needs the connector",
289
- "and the target: `dreamlake source import --connector <kind> --target <json>`.",
289
+ "and the target: `dl source import --connector <kind> --target <json>`.",
290
290
  "A declaration file does not say which of the two it meant, so this command",
291
291
  "will not choose on your behalf. `sources` is still recognised here — by",
292
292
  "inference and via --collection — so that you get that message rather than an",
293
293
  "unhelpful one about an unknown collection.",
294
294
  "",
295
295
  "Registering a version of a runnable is NOT a declare — versions hang off a",
296
- "nested, append-only path. Use `dreamlake runnable version push`.",
296
+ "nested, append-only path. Use `dl runnable version push`.",
297
297
  "",
298
298
  "Examples:",
299
- " dreamlake declare 01_gpu_udf/runnable.json",
300
- " dreamlake declare */*.json --if-exists ok",
301
- " dreamlake declare runconfig.yaml --collection run-configs --dry-run",
299
+ " dl declare 01_gpu_udf/runnable.json",
300
+ " dl declare */*.json --if-exists ok",
301
+ " dl declare runconfig.yaml --collection run-configs --dry-run",
302
302
  ].join("\n"))
303
303
  .action(async (files, opts) => process.exit(await runDeclare(files, opts)));
304
304
  }