@mycadet/cli 0.12.7 → 0.12.9-dev.202610131452.9acab64

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 (185) hide show
  1. package/README.md +2 -2
  2. package/knip.json +1 -1
  3. package/node_modules/@mycadet/assistant-api/events/cloud-disconnected.ts +21 -0
  4. package/node_modules/@mycadet/assistant-api/events/host-bash.ts +1 -1
  5. package/node_modules/@mycadet/assistant-api/events/host-cu.ts +1 -1
  6. package/node_modules/@mycadet/assistant-api/events/host-file.ts +1 -1
  7. package/node_modules/@mycadet/assistant-api/events/notification-intent.ts +1 -1
  8. package/node_modules/@mycadet/assistant-api/events/show-cloud-login.ts +18 -0
  9. package/node_modules/@mycadet/assistant-api/index.ts +11 -11
  10. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/package.json +2 -2
  11. package/node_modules/@mycadet/{service-contracts/src/platform-credential.ts → assistant-api/node_modules/@mycadet/service-contracts/src/cloud-credential.ts} +9 -9
  12. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
  13. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
  14. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/ingress.ts +11 -5
  15. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
  16. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
  17. package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
  18. package/node_modules/@mycadet/assistant-api/responses/home.ts +1 -1
  19. package/node_modules/@mycadet/assistant-api/surfaces.ts +4 -4
  20. package/node_modules/@mycadet/avatar-manifest/src/__tests__/notification-avatar.test.ts +1 -1
  21. package/node_modules/@mycadet/avatar-manifest/src/notification-avatar.ts +2 -2
  22. package/node_modules/@mycadet/environments/src/seeds.ts +6 -6
  23. package/node_modules/@mycadet/environments/src/shell.test.ts +1 -1
  24. package/node_modules/@mycadet/environments/src/types.ts +6 -6
  25. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/src/__tests__/notification-avatar.test.ts +1 -1
  26. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/src/notification-avatar.ts +2 -2
  27. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/seeds.ts +6 -6
  28. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/shell.test.ts +1 -1
  29. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/types.ts +6 -6
  30. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/package.json +2 -2
  31. package/node_modules/@mycadet/{assistant-api/node_modules/@mycadet/service-contracts/src/platform-credential.ts → local-mode/node_modules/@mycadet/service-contracts/src/cloud-credential.ts} +9 -9
  32. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
  33. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
  34. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/ingress.ts +11 -5
  35. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
  36. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
  37. package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
  38. package/node_modules/@mycadet/local-mode/src/__tests__/pair.test.ts +5 -5
  39. package/node_modules/@mycadet/local-mode/src/__tests__/retire.test.ts +1 -1
  40. package/node_modules/@mycadet/local-mode/src/config.ts +2 -2
  41. package/node_modules/@mycadet/local-mode/src/index.ts +1 -1
  42. package/node_modules/@mycadet/local-mode/src/lockfile-contract.test.ts +3 -3
  43. package/node_modules/@mycadet/local-mode/src/lockfile-contract.ts +10 -5
  44. package/node_modules/@mycadet/local-mode/src/lockfile.test.ts +15 -15
  45. package/node_modules/@mycadet/local-mode/src/lockfile.ts +9 -9
  46. package/node_modules/@mycadet/local-mode/src/pair.ts +2 -2
  47. package/node_modules/@mycadet/local-mode/src/retire.ts +3 -3
  48. package/node_modules/@mycadet/local-mode/src/teleport-backup-policy.ts +2 -2
  49. package/node_modules/@mycadet/local-mode/src/unpair.ts +2 -2
  50. package/node_modules/@mycadet/service-contracts/package.json +2 -2
  51. package/node_modules/@mycadet/{local-mode/node_modules/@mycadet/service-contracts/src/platform-credential.ts → service-contracts/src/cloud-credential.ts} +9 -9
  52. package/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
  53. package/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
  54. package/node_modules/@mycadet/service-contracts/src/ingress.ts +11 -5
  55. package/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
  56. package/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
  57. package/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
  58. package/package.json +6 -4
  59. package/src/__tests__/assistant-api-key-resolution.test.ts +6 -6
  60. package/src/__tests__/{assistant-client-platform-auth.test.ts → assistant-client-cloud-auth.test.ts} +10 -10
  61. package/src/__tests__/assistant-client-refresh.test.ts +2 -2
  62. package/src/__tests__/backup.test.ts +86 -91
  63. package/src/__tests__/client-token.test.ts +1 -1
  64. package/src/__tests__/client-tui-refresh.test.ts +1 -1
  65. package/src/__tests__/client-web-config.test.ts +1 -2
  66. package/src/__tests__/{platform-client.test.ts → cloud-client.test.ts} +59 -59
  67. package/src/__tests__/{platform-releases.test.ts → cloud-releases.test.ts} +28 -18
  68. package/src/__tests__/{cloudflare-tunnel.test.ts → cloudflare.test.ts} +1 -1
  69. package/src/__tests__/connect-import.test.ts +55 -39
  70. package/src/__tests__/debug.test.ts +38 -38
  71. package/src/__tests__/ensure-binary.test.ts +182 -0
  72. package/src/__tests__/guardian-token.test.ts +149 -56
  73. package/src/__tests__/hatch-provider-secrets.test.ts +2 -2
  74. package/src/__tests__/helpers/guardian-token.ts +22 -0
  75. package/src/__tests__/helpers/http.ts +10 -0
  76. package/src/__tests__/nginx-ingress.test.ts +15 -20
  77. package/src/__tests__/ngrok-spawn.test.ts +49 -0
  78. package/src/__tests__/orphan-detection.test.ts +1 -1
  79. package/src/__tests__/pair.test.ts +149 -85
  80. package/src/__tests__/{ps-platform-status.test.ts → ps-cloud-status.test.ts} +80 -26
  81. package/src/__tests__/ps-table.test.ts +79 -0
  82. package/src/__tests__/{recover.test.ts → restore.test.ts} +29 -28
  83. package/src/__tests__/retire.test.ts +58 -199
  84. package/src/__tests__/root-process-lockfile.test.ts +99 -0
  85. package/src/__tests__/sleep.test.ts +19 -19
  86. package/src/__tests__/statefulset.test.ts +8 -8
  87. package/src/__tests__/{tailscale-tunnel.test.ts → tailscale.test.ts} +2 -2
  88. package/src/__tests__/teleport-backup.test.ts +3 -3
  89. package/src/__tests__/teleport.test.ts +180 -211
  90. package/src/__tests__/tunnel.test.ts +490 -270
  91. package/src/__tests__/uninstall.test.ts +150 -9
  92. package/src/__tests__/upgrade-local.test.ts +3 -3
  93. package/src/__tests__/upgrade-replay-env.test.ts +12 -12
  94. package/src/__tests__/wake.test.ts +260 -43
  95. package/src/__tests__/workos-pkce.test.ts +2 -2
  96. package/src/commands/backup.ts +24 -24
  97. package/src/commands/client.ts +76 -78
  98. package/src/commands/completions.test.ts +104 -0
  99. package/src/commands/completions.ts +87 -0
  100. package/src/commands/debug.ts +20 -20
  101. package/src/commands/exec.ts +12 -12
  102. package/src/commands/flags.ts +2 -2
  103. package/src/commands/hatch.ts +27 -24
  104. package/src/commands/login.ts +22 -22
  105. package/src/commands/logs.ts +8 -8
  106. package/src/commands/pair.ts +140 -37
  107. package/src/commands/ps.ts +232 -86
  108. package/src/commands/restart.ts +30 -0
  109. package/src/commands/restore.ts +140 -22
  110. package/src/commands/retire.ts +48 -150
  111. package/src/commands/rollback.ts +20 -26
  112. package/src/commands/setup.ts +2 -2
  113. package/src/commands/sleep.ts +2 -2
  114. package/src/commands/teleport.ts +110 -129
  115. package/src/commands/terminal.ts +158 -18
  116. package/src/commands/tunnel.ts +156 -175
  117. package/src/commands/uninstall.ts +137 -54
  118. package/src/commands/unpair.ts +3 -3
  119. package/src/commands/upgrade.ts +30 -54
  120. package/src/commands/use.ts +1 -1
  121. package/src/commands/wake.ts +166 -50
  122. package/src/index.ts +18 -9
  123. package/src/lib/__tests__/{platform-client-signed-url.test.ts → cloud-client-signed-url.test.ts} +16 -16
  124. package/src/lib/__tests__/docker.test.ts +168 -20
  125. package/src/lib/__tests__/job-polling.test.ts +2 -2
  126. package/src/lib/__tests__/local-gateway-cli.test.ts +42 -0
  127. package/src/lib/__tests__/local-runtime-client.test.ts +4 -4
  128. package/src/lib/__tests__/runtime-url.test.ts +1 -1
  129. package/src/lib/assistant-api-key-resolution.ts +5 -5
  130. package/src/lib/assistant-client.ts +8 -8
  131. package/src/lib/assistant-config.ts +58 -12
  132. package/src/lib/{platform-client.ts → cloud-client.ts} +105 -99
  133. package/src/lib/cloud-login.ts +23 -24
  134. package/src/lib/{platform-releases.ts → cloud-releases.ts} +11 -9
  135. package/src/lib/cloud-values.ts +3 -0
  136. package/src/lib/color.ts +4 -0
  137. package/src/lib/config-utils.ts +1 -1
  138. package/src/lib/detached-process.ts +1 -1
  139. package/src/lib/docker.ts +300 -111
  140. package/src/lib/ensure-binary.ts +171 -0
  141. package/src/lib/environments/__tests__/paths.test.ts +29 -3
  142. package/src/lib/environments/__tests__/resolve.test.ts +26 -26
  143. package/src/lib/environments/paths.ts +16 -8
  144. package/src/lib/environments/resolve.ts +10 -12
  145. package/src/lib/flag-args.test.ts +1 -1
  146. package/src/lib/flag-args.ts +1 -1
  147. package/src/lib/guardian-token.ts +37 -5
  148. package/src/lib/hatch-local.ts +32 -29
  149. package/src/lib/hatch-next-steps.ts +5 -9
  150. package/src/lib/health-check.ts +6 -6
  151. package/src/lib/ingress-config.ts +8 -35
  152. package/src/lib/job-polling.ts +2 -2
  153. package/src/lib/live-voice/connection.ts +12 -12
  154. package/src/lib/live-voice/tunnel.test.ts +11 -11
  155. package/src/lib/live-voice/tunnel.ts +15 -15
  156. package/src/lib/local-runtime-client.ts +20 -20
  157. package/src/lib/local.ts +46 -34
  158. package/src/lib/nginx-ingress.ts +40 -15
  159. package/src/lib/pair.ts +1 -1
  160. package/src/lib/process.ts +1 -1
  161. package/src/lib/provider-secrets.ts +3 -3
  162. package/src/lib/retire-apple-container.ts +1 -1
  163. package/src/lib/runtime-url.ts +8 -8
  164. package/src/lib/statefulset.ts +2 -2
  165. package/src/lib/step-runner.ts +6 -1
  166. package/src/lib/sync-cloud-assistants.ts +19 -19
  167. package/src/lib/teleport-backup.ts +4 -4
  168. package/src/lib/terminal-client.ts +17 -17
  169. package/src/lib/terminal-session.ts +24 -24
  170. package/src/lib/{tunnel-edge.ts → tunnel.ts} +199 -11
  171. package/src/lib/tunnels/cadet.ts +29 -0
  172. package/src/lib/{cloudflare-tunnel.ts → tunnels/cloudflare.ts} +36 -15
  173. package/src/lib/tunnels/gateway-notify.ts +61 -0
  174. package/src/lib/{ngrok.ts → tunnels/ngrok.ts} +350 -89
  175. package/src/lib/{tailscale-tunnel.ts → tunnels/tailscale.ts} +53 -9
  176. package/src/lib/upgrade-lifecycle.ts +8 -21
  177. package/src/lib/upgrade-preflight.ts +2 -2
  178. package/src/lib/workos-pkce.ts +5 -5
  179. package/node_modules/@mycadet/assistant-api/events/platform-disconnected.ts +0 -21
  180. package/node_modules/@mycadet/assistant-api/events/show-platform-login.ts +0 -20
  181. package/src/commands/recover.ts +0 -131
  182. package/src/commands/roadmap.ts +0 -459
  183. package/src/commands/ssh.ts +0 -144
  184. package/src/commands/workflows.ts +0 -305
  185. package/src/lib/managed-cloud.ts +0 -3
@@ -10,7 +10,7 @@ import { randomBytes } from "crypto";
10
10
  import { createServer } from "http";
11
11
  import type { AddressInfo } from "net";
12
12
 
13
- import { isManagedCloud } from "./managed-cloud.js";
13
+ import { isCloudHome } from "./cloud-values.js";
14
14
  import {
15
15
  resolveAssistant,
16
16
  saveAssistantEntry,
@@ -22,11 +22,11 @@ import {
22
22
  fetchCurrentUser,
23
23
  fetchOrganizationId,
24
24
  ensureSelfHostedLocalRegistration,
25
- getPlatformUrl,
25
+ getCloudUrl,
26
26
  injectCredentialsIntoAssistant,
27
- readPlatformToken,
28
- savePlatformToken,
29
- } from "./platform-client.js";
27
+ readCloudToken,
28
+ saveCloudToken,
29
+ } from "./cloud-client.js";
30
30
  import { fetchAssistantIngressUrl, fetchCurrentVersion } from "./upgrade-lifecycle.js";
31
31
  import {
32
32
  CALLBACK_PATH,
@@ -257,8 +257,8 @@ export function startLoopbackListener(
257
257
  }
258
258
 
259
259
  /** App-held WorkOS PKCE login */
260
- export async function workosPkceLogin(platformUrl: string): Promise<string> {
261
- const clientId = await fetchWorkosClientId(platformUrl);
260
+ export async function workosPkceLogin(cloudUrl: string): Promise<string> {
261
+ const clientId = await fetchWorkosClientId(cloudUrl);
262
262
  const { verifier, challenge } = generatePkcePair();
263
263
  const state = randomBytes(32).toString("hex");
264
264
 
@@ -286,7 +286,7 @@ export async function workosPkceLogin(platformUrl: string): Promise<string> {
286
286
  verifier,
287
287
  });
288
288
  return await exchangeAccessTokenForSession(
289
- platformUrl,
289
+ cloudUrl,
290
290
  clientId,
291
291
  accessToken,
292
292
  );
@@ -307,7 +307,7 @@ export interface CloudLoginSession {
307
307
  * validates the resulting token, and persists it.
308
308
  */
309
309
  export async function ensureCloudLoginInteractive(): Promise<CloudLoginSession> {
310
- const existingToken = readPlatformToken();
310
+ const existingToken = readCloudToken();
311
311
  if (existingToken) {
312
312
  try {
313
313
  const user = await fetchCurrentUser(existingToken);
@@ -317,16 +317,16 @@ export async function ensureCloudLoginInteractive(): Promise<CloudLoginSession>
317
317
  }
318
318
  }
319
319
 
320
- const token = await workosPkceLogin(getPlatformUrl());
320
+ const token = await workosPkceLogin(getCloudUrl());
321
321
  const user = await fetchCurrentUser(token);
322
- savePlatformToken(token);
322
+ saveCloudToken(token);
323
323
  return { token, user };
324
324
  }
325
325
 
326
326
  /**
327
327
  * TLS failures surface as opaque messages like "unknown certificate
328
328
  * verification error" from Bun's fetch. Translate the recognizable ones into
329
- * something actionable — most commonly the platform host's managed
329
+ * something actionable — most commonly the cloud host's managed
330
330
  * certificate is still provisioning.
331
331
  */
332
332
  export function describeLoginError(error: unknown): string {
@@ -335,13 +335,13 @@ export function describeLoginError(error: unknown): string {
335
335
  if (!tlsish) return raw;
336
336
  return (
337
337
  `Cadet Cloud is unreachable (${raw}). This usually means ` +
338
- `${getPlatformUrl()}'s TLS certificate is missing or still provisioning. ` +
339
- "Retry in a few minutes, or point CADET_PLATFORM_URL at a reachable host."
338
+ `${getCloudUrl()}'s TLS certificate is missing or still provisioning. ` +
339
+ "Retry in a few minutes, or point CADET_CLOUD_URL at a reachable host."
340
340
  );
341
341
  }
342
342
 
343
343
  /**
344
- * Register the active self-hosted assistant with the platform and inject
344
+ * Register the active self-hosted assistant with the cloud and inject
345
345
  * cloud credentials into its runtime — the post-login half of the desktop
346
346
  * app's LocalAssistantBootstrapService flow. Extracted so `cadet hatch` can
347
347
  * complete the same flow right after an interactive login on the Cadet Cloud
@@ -355,8 +355,8 @@ export async function registerLocalAssistantWithPlatform(
355
355
  const log = options.log ?? console.log;
356
356
  const entry = resolveAssistant();
357
357
 
358
- // Skip managed ("cadet") assistants — they are handled by the platform.
359
- if (!entry || isManagedCloud(entry.cloud)) return;
358
+ // Skip managed ("cadet") assistants — they are handled by the cloud.
359
+ if (!entry || isCloudHome(entry.cloud)) return;
360
360
 
361
361
  const orgId = await fetchOrganizationId(token);
362
362
  const clientInstallationId = computeDeviceId();
@@ -364,7 +364,7 @@ export async function registerLocalAssistantWithPlatform(
364
364
  fetchCurrentVersion(entry.runtimeUrl),
365
365
  fetchAssistantIngressUrl(entry.runtimeUrl, options.bearerToken ?? entry.bearerToken),
366
366
  ]);
367
- const platformUrl = getPlatformUrl();
367
+ const cloudUrl = getCloudUrl();
368
368
  const registration = await ensureSelfHostedLocalRegistration(
369
369
  token,
370
370
  orgId,
@@ -372,14 +372,14 @@ export async function registerLocalAssistantWithPlatform(
372
372
  entry.assistantId,
373
373
  "cli",
374
374
  assistantVersion,
375
- platformUrl,
375
+ cloudUrl,
376
376
  ingressUrl,
377
377
  );
378
378
  saveAssistantEntry({
379
379
  ...entry,
380
- platformAssistantId: registration.assistant.id,
381
- platformBaseUrl: platformUrl,
382
- platformOrganizationId: orgId,
380
+ cloudAssistantId: registration.assistant.id,
381
+ cloudBaseUrl: cloudUrl,
382
+ cloudOrganizationId: orgId,
383
383
  });
384
384
  log(
385
385
  `Registered assistant: ${registration.assistant.name} (${registration.assistant.id})`,
@@ -408,8 +408,7 @@ export async function registerLocalAssistantWithPlatform(
408
408
  gatewayUrl: entry.runtimeUrl,
409
409
  bearerToken: options.bearerToken ?? entry.bearerToken,
410
410
  assistantApiKey,
411
- platformAssistantId: registration.assistant.id,
412
- platformBaseUrl: platformUrl,
411
+ cloudAssistantId: registration.assistant.id,
413
412
  organizationId: orgId,
414
413
  userId: user.id,
415
414
  webhookSecret: registration.webhook_secret,
@@ -1,4 +1,4 @@
1
- import { getPlatformUrl } from "./platform-client.js";
1
+ import { getCloudUrl } from "./cloud-client.js";
2
2
  import { dockerhubImages } from "./docker.js";
3
3
  import type { ServiceName } from "./docker.js";
4
4
  import { loopbackSafeFetch } from "./loopback-fetch.js";
@@ -40,20 +40,20 @@ const RELEASES_FETCH_LIMIT = 100;
40
40
  /**
41
41
  * Fetch the releases list from Cadet Cloud, optionally filtered by channel
42
42
  * (the `channel` param takes precedence over `stable` server-side).
43
- * `platformUrl` overrides the lockfile/env-resolved default — pass the
43
+ * `cloudUrl` overrides the lockfile/env-resolved default — pass the
44
44
  * target assistant's platform URL when it may differ from the active one.
45
45
  * Returns `null` when Cadet Cloud is unreachable or responds non-OK —
46
46
  * distinct from `[]` (it answered, no releases).
47
47
  */
48
48
  export async function fetchReleases(opts?: {
49
49
  channel?: "stable" | "preview";
50
- platformUrl?: string;
50
+ cloudUrl?: string;
51
51
  }): Promise<ReleaseListItem[] | null> {
52
52
  try {
53
- const platformUrl = opts?.platformUrl || getPlatformUrl();
53
+ const cloudUrl = opts?.cloudUrl || getCloudUrl();
54
54
  const filter = opts?.channel ? `channel=${opts.channel}` : "stable=true";
55
55
  const response = await loopbackSafeFetch(
56
- `${platformUrl}/v1/releases/?${filter}&limit=${RELEASES_FETCH_LIMIT}`,
56
+ `${cloudUrl}/v1/releases/?${filter}&limit=${RELEASES_FETCH_LIMIT}`,
57
57
  { signal: AbortSignal.timeout(10_000) },
58
58
  );
59
59
  if (!response.ok) return null;
@@ -85,7 +85,9 @@ export async function fetchLatestStableVersion(): Promise<string | null> {
85
85
  }
86
86
 
87
87
  /**
88
- * Image refs for a target version: the tag is the target version, the repo
88
+ * Image refs for a target version: the tag is the target version exactly as
89
+ * the release workflows push it — bare ("0.12.8", "0.12.8-dev…"); a
90
+ * git-tag-style "v" prefix on the input is tolerated and stripped. The repo
89
91
  * follows the CLI's own version shape (dev CLI → `-dev` repos).
90
92
  */
91
93
  export function resolveImageRefs(
@@ -93,8 +95,8 @@ export function resolveImageRefs(
93
95
  cliVersion: string,
94
96
  ): Record<ServiceName, string> {
95
97
  const versionTag = targetVersion.startsWith("v")
96
- ? targetVersion
97
- : `v${targetVersion}`;
98
+ ? targetVersion.slice(1)
99
+ : targetVersion;
98
100
  const images = dockerhubImages(cliVersion);
99
101
  return {
100
102
  assistant: `${images.assistant}:${versionTag}`,
@@ -107,5 +109,5 @@ export function resolveImageRefs(
107
109
  export function resolveOwnImageRefs(
108
110
  cliVersion: string,
109
111
  ): Record<ServiceName, string> {
110
- return resolveImageRefs(cliVersion ? `v${cliVersion}` : "latest", cliVersion);
112
+ return resolveImageRefs(cliVersion || "latest", cliVersion);
111
113
  }
@@ -0,0 +1,3 @@
1
+ export function isCloudHome(cloud: unknown): boolean {
2
+ return cloud === "cloud" || cloud === "cadet";
3
+ }
package/src/lib/color.ts CHANGED
@@ -14,3 +14,7 @@ export function red(text: string, stream?: NodeJS.WriteStream): string {
14
14
  export function yellow(text: string, stream?: NodeJS.WriteStream): string {
15
15
  return colorize("\x1b[33m", text, stream);
16
16
  }
17
+
18
+ export function green(text: string, stream?: NodeJS.WriteStream): string {
19
+ return colorize("\x1b[32m", text, stream);
20
+ }
@@ -34,7 +34,7 @@ export function buildNestedConfig(
34
34
 
35
35
  /**
36
36
  * Ensure hatch always provides enough initial LLM config for the assistant to
37
- * detect a fresh off-platform hatch and seed BYOK profiles.
37
+ * detect a fresh off-cloud hatch and seed BYOK profiles.
38
38
  *
39
39
  * @deprecated Part of the workspace-config overlay path — a CLI→Assistant
40
40
  * side channel that bypasses the Assistant's public APIs and has no
@@ -6,7 +6,7 @@ import { isCompiledCli } from "./local.js";
6
6
  import { getLogDir, openLogFile, resetLogFile } from "./xdg-log.js";
7
7
 
8
8
  export interface RelaunchDetachedOptions {
9
- /** argv for the re-invoked CLI command, e.g. ["tunnel", "--provider", "ngrok"]. */
9
+ /** argv for the re-invoked CLI command, e.g. ["tunnel", "--provider", "cloudflare"]. */
10
10
  args: string[];
11
11
  /** Log file basename under the XDG log dir; truncated before spawn. */
12
12
  logFile: string;