@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.
- package/README.md +2 -2
- package/knip.json +1 -1
- package/node_modules/@mycadet/assistant-api/events/cloud-disconnected.ts +21 -0
- package/node_modules/@mycadet/assistant-api/events/host-bash.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/host-cu.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/host-file.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/notification-intent.ts +1 -1
- package/node_modules/@mycadet/assistant-api/events/show-cloud-login.ts +18 -0
- package/node_modules/@mycadet/assistant-api/index.ts +11 -11
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/package.json +2 -2
- package/node_modules/@mycadet/{service-contracts/src/platform-credential.ts → assistant-api/node_modules/@mycadet/service-contracts/src/cloud-credential.ts} +9 -9
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/ingress.ts +11 -5
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
- package/node_modules/@mycadet/assistant-api/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
- package/node_modules/@mycadet/assistant-api/responses/home.ts +1 -1
- package/node_modules/@mycadet/assistant-api/surfaces.ts +4 -4
- package/node_modules/@mycadet/avatar-manifest/src/__tests__/notification-avatar.test.ts +1 -1
- package/node_modules/@mycadet/avatar-manifest/src/notification-avatar.ts +2 -2
- package/node_modules/@mycadet/environments/src/seeds.ts +6 -6
- package/node_modules/@mycadet/environments/src/shell.test.ts +1 -1
- package/node_modules/@mycadet/environments/src/types.ts +6 -6
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/src/__tests__/notification-avatar.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/avatar-manifest/src/notification-avatar.ts +2 -2
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/seeds.ts +6 -6
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/shell.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/environments/src/types.ts +6 -6
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/package.json +2 -2
- 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
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/ingress.ts +11 -5
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
- package/node_modules/@mycadet/local-mode/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
- package/node_modules/@mycadet/local-mode/src/__tests__/pair.test.ts +5 -5
- package/node_modules/@mycadet/local-mode/src/__tests__/retire.test.ts +1 -1
- package/node_modules/@mycadet/local-mode/src/config.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/index.ts +1 -1
- package/node_modules/@mycadet/local-mode/src/lockfile-contract.test.ts +3 -3
- package/node_modules/@mycadet/local-mode/src/lockfile-contract.ts +10 -5
- package/node_modules/@mycadet/local-mode/src/lockfile.test.ts +15 -15
- package/node_modules/@mycadet/local-mode/src/lockfile.ts +9 -9
- package/node_modules/@mycadet/local-mode/src/pair.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/retire.ts +3 -3
- package/node_modules/@mycadet/local-mode/src/teleport-backup-policy.ts +2 -2
- package/node_modules/@mycadet/local-mode/src/unpair.ts +2 -2
- package/node_modules/@mycadet/service-contracts/package.json +2 -2
- package/node_modules/@mycadet/{local-mode/node_modules/@mycadet/service-contracts/src/platform-credential.ts → service-contracts/src/cloud-credential.ts} +9 -9
- package/node_modules/@mycadet/service-contracts/src/handles.ts +3 -3
- package/node_modules/@mycadet/service-contracts/src/index.ts +1 -1
- package/node_modules/@mycadet/service-contracts/src/ingress.ts +11 -5
- package/node_modules/@mycadet/service-contracts/src/remote-web-pairing.ts +1 -1
- package/node_modules/@mycadet/service-contracts/src/rpc.ts +14 -14
- package/node_modules/@mycadet/service-contracts/src/trust-rules.ts +5 -5
- package/package.json +6 -4
- package/src/__tests__/assistant-api-key-resolution.test.ts +6 -6
- package/src/__tests__/{assistant-client-platform-auth.test.ts → assistant-client-cloud-auth.test.ts} +10 -10
- package/src/__tests__/assistant-client-refresh.test.ts +2 -2
- package/src/__tests__/backup.test.ts +86 -91
- package/src/__tests__/client-token.test.ts +1 -1
- package/src/__tests__/client-tui-refresh.test.ts +1 -1
- package/src/__tests__/client-web-config.test.ts +1 -2
- package/src/__tests__/{platform-client.test.ts → cloud-client.test.ts} +59 -59
- package/src/__tests__/{platform-releases.test.ts → cloud-releases.test.ts} +28 -18
- package/src/__tests__/{cloudflare-tunnel.test.ts → cloudflare.test.ts} +1 -1
- package/src/__tests__/connect-import.test.ts +55 -39
- package/src/__tests__/debug.test.ts +38 -38
- package/src/__tests__/ensure-binary.test.ts +182 -0
- package/src/__tests__/guardian-token.test.ts +149 -56
- package/src/__tests__/hatch-provider-secrets.test.ts +2 -2
- package/src/__tests__/helpers/guardian-token.ts +22 -0
- package/src/__tests__/helpers/http.ts +10 -0
- package/src/__tests__/nginx-ingress.test.ts +15 -20
- package/src/__tests__/ngrok-spawn.test.ts +49 -0
- package/src/__tests__/orphan-detection.test.ts +1 -1
- package/src/__tests__/pair.test.ts +149 -85
- package/src/__tests__/{ps-platform-status.test.ts → ps-cloud-status.test.ts} +80 -26
- package/src/__tests__/ps-table.test.ts +79 -0
- package/src/__tests__/{recover.test.ts → restore.test.ts} +29 -28
- package/src/__tests__/retire.test.ts +58 -199
- package/src/__tests__/root-process-lockfile.test.ts +99 -0
- package/src/__tests__/sleep.test.ts +19 -19
- package/src/__tests__/statefulset.test.ts +8 -8
- package/src/__tests__/{tailscale-tunnel.test.ts → tailscale.test.ts} +2 -2
- package/src/__tests__/teleport-backup.test.ts +3 -3
- package/src/__tests__/teleport.test.ts +180 -211
- package/src/__tests__/tunnel.test.ts +490 -270
- package/src/__tests__/uninstall.test.ts +150 -9
- package/src/__tests__/upgrade-local.test.ts +3 -3
- package/src/__tests__/upgrade-replay-env.test.ts +12 -12
- package/src/__tests__/wake.test.ts +260 -43
- package/src/__tests__/workos-pkce.test.ts +2 -2
- package/src/commands/backup.ts +24 -24
- package/src/commands/client.ts +76 -78
- package/src/commands/completions.test.ts +104 -0
- package/src/commands/completions.ts +87 -0
- package/src/commands/debug.ts +20 -20
- package/src/commands/exec.ts +12 -12
- package/src/commands/flags.ts +2 -2
- package/src/commands/hatch.ts +27 -24
- package/src/commands/login.ts +22 -22
- package/src/commands/logs.ts +8 -8
- package/src/commands/pair.ts +140 -37
- package/src/commands/ps.ts +232 -86
- package/src/commands/restart.ts +30 -0
- package/src/commands/restore.ts +140 -22
- package/src/commands/retire.ts +48 -150
- package/src/commands/rollback.ts +20 -26
- package/src/commands/setup.ts +2 -2
- package/src/commands/sleep.ts +2 -2
- package/src/commands/teleport.ts +110 -129
- package/src/commands/terminal.ts +158 -18
- package/src/commands/tunnel.ts +156 -175
- package/src/commands/uninstall.ts +137 -54
- package/src/commands/unpair.ts +3 -3
- package/src/commands/upgrade.ts +30 -54
- package/src/commands/use.ts +1 -1
- package/src/commands/wake.ts +166 -50
- package/src/index.ts +18 -9
- package/src/lib/__tests__/{platform-client-signed-url.test.ts → cloud-client-signed-url.test.ts} +16 -16
- package/src/lib/__tests__/docker.test.ts +168 -20
- package/src/lib/__tests__/job-polling.test.ts +2 -2
- package/src/lib/__tests__/local-gateway-cli.test.ts +42 -0
- package/src/lib/__tests__/local-runtime-client.test.ts +4 -4
- package/src/lib/__tests__/runtime-url.test.ts +1 -1
- package/src/lib/assistant-api-key-resolution.ts +5 -5
- package/src/lib/assistant-client.ts +8 -8
- package/src/lib/assistant-config.ts +58 -12
- package/src/lib/{platform-client.ts → cloud-client.ts} +105 -99
- package/src/lib/cloud-login.ts +23 -24
- package/src/lib/{platform-releases.ts → cloud-releases.ts} +11 -9
- package/src/lib/cloud-values.ts +3 -0
- package/src/lib/color.ts +4 -0
- package/src/lib/config-utils.ts +1 -1
- package/src/lib/detached-process.ts +1 -1
- package/src/lib/docker.ts +300 -111
- package/src/lib/ensure-binary.ts +171 -0
- package/src/lib/environments/__tests__/paths.test.ts +29 -3
- package/src/lib/environments/__tests__/resolve.test.ts +26 -26
- package/src/lib/environments/paths.ts +16 -8
- package/src/lib/environments/resolve.ts +10 -12
- package/src/lib/flag-args.test.ts +1 -1
- package/src/lib/flag-args.ts +1 -1
- package/src/lib/guardian-token.ts +37 -5
- package/src/lib/hatch-local.ts +32 -29
- package/src/lib/hatch-next-steps.ts +5 -9
- package/src/lib/health-check.ts +6 -6
- package/src/lib/ingress-config.ts +8 -35
- package/src/lib/job-polling.ts +2 -2
- package/src/lib/live-voice/connection.ts +12 -12
- package/src/lib/live-voice/tunnel.test.ts +11 -11
- package/src/lib/live-voice/tunnel.ts +15 -15
- package/src/lib/local-runtime-client.ts +20 -20
- package/src/lib/local.ts +46 -34
- package/src/lib/nginx-ingress.ts +40 -15
- package/src/lib/pair.ts +1 -1
- package/src/lib/process.ts +1 -1
- package/src/lib/provider-secrets.ts +3 -3
- package/src/lib/retire-apple-container.ts +1 -1
- package/src/lib/runtime-url.ts +8 -8
- package/src/lib/statefulset.ts +2 -2
- package/src/lib/step-runner.ts +6 -1
- package/src/lib/sync-cloud-assistants.ts +19 -19
- package/src/lib/teleport-backup.ts +4 -4
- package/src/lib/terminal-client.ts +17 -17
- package/src/lib/terminal-session.ts +24 -24
- package/src/lib/{tunnel-edge.ts → tunnel.ts} +199 -11
- package/src/lib/tunnels/cadet.ts +29 -0
- package/src/lib/{cloudflare-tunnel.ts → tunnels/cloudflare.ts} +36 -15
- package/src/lib/tunnels/gateway-notify.ts +61 -0
- package/src/lib/{ngrok.ts → tunnels/ngrok.ts} +350 -89
- package/src/lib/{tailscale-tunnel.ts → tunnels/tailscale.ts} +53 -9
- package/src/lib/upgrade-lifecycle.ts +8 -21
- package/src/lib/upgrade-preflight.ts +2 -2
- package/src/lib/workos-pkce.ts +5 -5
- package/node_modules/@mycadet/assistant-api/events/platform-disconnected.ts +0 -21
- package/node_modules/@mycadet/assistant-api/events/show-platform-login.ts +0 -20
- package/src/commands/recover.ts +0 -131
- package/src/commands/roadmap.ts +0 -459
- package/src/commands/ssh.ts +0 -144
- package/src/commands/workflows.ts +0 -305
- package/src/lib/managed-cloud.ts +0 -3
package/src/lib/cloud-login.ts
CHANGED
|
@@ -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 {
|
|
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
|
-
|
|
25
|
+
getCloudUrl,
|
|
26
26
|
injectCredentialsIntoAssistant,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from "./
|
|
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(
|
|
261
|
-
const clientId = await fetchWorkosClientId(
|
|
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
|
-
|
|
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 =
|
|
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(
|
|
320
|
+
const token = await workosPkceLogin(getCloudUrl());
|
|
321
321
|
const user = await fetchCurrentUser(token);
|
|
322
|
-
|
|
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
|
|
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
|
-
`${
|
|
339
|
-
"Retry in a few minutes, or point
|
|
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
|
|
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
|
|
359
|
-
if (!entry ||
|
|
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
|
|
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
|
-
|
|
375
|
+
cloudUrl,
|
|
376
376
|
ingressUrl,
|
|
377
377
|
);
|
|
378
378
|
saveAssistantEntry({
|
|
379
379
|
...entry,
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
-
* `
|
|
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
|
-
|
|
50
|
+
cloudUrl?: string;
|
|
51
51
|
}): Promise<ReleaseListItem[] | null> {
|
|
52
52
|
try {
|
|
53
|
-
const
|
|
53
|
+
const cloudUrl = opts?.cloudUrl || getCloudUrl();
|
|
54
54
|
const filter = opts?.channel ? `channel=${opts.channel}` : "stable=true";
|
|
55
55
|
const response = await loopbackSafeFetch(
|
|
56
|
-
`${
|
|
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
|
|
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
|
-
:
|
|
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
|
|
112
|
+
return resolveImageRefs(cliVersion || "latest", cliVersion);
|
|
111
113
|
}
|
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
|
+
}
|
package/src/lib/config-utils.ts
CHANGED
|
@@ -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-
|
|
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", "
|
|
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;
|