@vellumai/cli 0.7.0 → 0.7.2
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/AGENTS.md +3 -11
- package/README.md +49 -0
- package/bun.lock +0 -15
- package/package.json +1 -6
- package/src/__tests__/backup.test.ts +591 -0
- package/src/__tests__/config-utils.test.ts +35 -48
- package/src/__tests__/teleport.test.ts +597 -37
- package/src/commands/backup.ts +149 -70
- package/src/commands/client.ts +56 -14
- package/src/commands/events.ts +3 -0
- package/src/commands/exec.ts +34 -12
- package/src/commands/hatch.ts +3 -7
- package/src/commands/login.ts +15 -33
- package/src/commands/logs.ts +2 -7
- package/src/commands/ps.ts +41 -6
- package/src/commands/restore.ts +32 -47
- package/src/commands/setup.ts +38 -73
- package/src/commands/ssh.ts +2 -5
- package/src/commands/teleport.ts +148 -34
- package/src/commands/tunnel.ts +2 -7
- package/src/commands/upgrade.ts +114 -7
- package/src/commands/wake.ts +5 -16
- package/src/components/DefaultMainScreen.tsx +65 -129
- package/src/index.ts +2 -13
- package/src/lib/__tests__/docker.test.ts +50 -32
- package/src/lib/__tests__/local-runtime-client.test.ts +308 -25
- package/src/lib/__tests__/platform-client-signed-url.test.ts +237 -2
- package/src/lib/__tests__/runtime-url.test.ts +125 -0
- package/src/lib/__tests__/terminal-session.test.ts +202 -0
- package/src/lib/assistant-client.ts +18 -26
- package/src/lib/assistant-config.ts +34 -41
- package/src/lib/backup-ops.ts +43 -17
- package/src/lib/cli-error.ts +1 -0
- package/src/lib/client-identity.ts +1 -1
- package/src/lib/config-utils.ts +1 -97
- package/src/lib/docker-statefulset.ts +381 -0
- package/src/lib/docker.ts +8 -247
- package/src/lib/guardian-token.ts +56 -6
- package/src/lib/hatch-local.ts +3 -26
- package/src/lib/job-polling.ts +1 -1
- package/src/lib/local-runtime-client.ts +162 -28
- package/src/lib/local.ts +35 -64
- package/src/lib/ngrok.ts +36 -26
- package/src/lib/platform-client.ts +97 -221
- package/src/lib/platform-releases.ts +23 -0
- package/src/lib/retire-local.ts +2 -2
- package/src/lib/runtime-url.ts +52 -0
- package/src/lib/sync-cloud-assistants.ts +126 -0
- package/src/lib/terminal-client.ts +6 -1
- package/src/lib/terminal-session.ts +127 -48
- package/src/lib/tui-log.ts +60 -0
- package/src/lib/upgrade-lifecycle.ts +65 -0
- package/src/lib/xdg-log.ts +10 -4
- package/src/commands/pair.ts +0 -212
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { readFileSync, rmSync } from "fs";
|
|
1
2
|
import { describe, expect, test } from "bun:test";
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { buildNestedConfig, writeInitialConfig } from "../lib/config-utils.js";
|
|
5
|
+
|
|
6
|
+
function readInitialConfig(
|
|
7
|
+
configValues: Record<string, string>,
|
|
8
|
+
): Record<string, unknown> {
|
|
9
|
+
const path = writeInitialConfig(configValues);
|
|
10
|
+
expect(path).toBeDefined();
|
|
11
|
+
try {
|
|
12
|
+
return JSON.parse(readFileSync(path!, "utf-8")) as Record<string, unknown>;
|
|
13
|
+
} finally {
|
|
14
|
+
if (path !== undefined) rmSync(path, { force: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
4
17
|
|
|
5
18
|
describe("config-utils", () => {
|
|
6
19
|
test("buildNestedConfig only converts dot-notation values", () => {
|
|
@@ -19,9 +32,9 @@ describe("config-utils", () => {
|
|
|
19
32
|
});
|
|
20
33
|
});
|
|
21
34
|
|
|
22
|
-
test("
|
|
35
|
+
test("writeInitialConfig does not add a mainAgent callSite for Anthropic defaults", () => {
|
|
23
36
|
expect(
|
|
24
|
-
|
|
37
|
+
readInitialConfig({
|
|
25
38
|
"llm.default.provider": "anthropic",
|
|
26
39
|
"llm.default.model": "claude-opus-4-7",
|
|
27
40
|
}),
|
|
@@ -31,41 +44,35 @@ describe("config-utils", () => {
|
|
|
31
44
|
provider: "anthropic",
|
|
32
45
|
model: "claude-opus-4-7",
|
|
33
46
|
},
|
|
34
|
-
callSites: {
|
|
35
|
-
mainAgent: {
|
|
36
|
-
model: "claude-opus-4-7",
|
|
37
|
-
maxTokens: 32000,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
47
|
},
|
|
41
48
|
});
|
|
42
49
|
});
|
|
43
50
|
|
|
44
|
-
test("
|
|
51
|
+
test("writeInitialConfig preserves profile-based Anthropic model selection", () => {
|
|
45
52
|
expect(
|
|
46
|
-
|
|
47
|
-
"
|
|
53
|
+
readInitialConfig({
|
|
54
|
+
"llm.activeProfile": "quality-optimized",
|
|
55
|
+
"llm.profiles.quality-optimized.provider": "anthropic",
|
|
56
|
+
"llm.profiles.quality-optimized.model": "claude-opus-4-7",
|
|
57
|
+
"llm.profiles.quality-optimized.maxTokens": "32000",
|
|
48
58
|
}),
|
|
49
59
|
).toEqual({
|
|
50
|
-
services: {
|
|
51
|
-
inference: {
|
|
52
|
-
mode: "managed",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
60
|
llm: {
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
activeProfile: "quality-optimized",
|
|
62
|
+
profiles: {
|
|
63
|
+
"quality-optimized": {
|
|
64
|
+
provider: "anthropic",
|
|
58
65
|
model: "claude-opus-4-7",
|
|
59
|
-
maxTokens: 32000,
|
|
66
|
+
maxTokens: "32000",
|
|
60
67
|
},
|
|
61
68
|
},
|
|
62
69
|
},
|
|
63
70
|
});
|
|
64
71
|
});
|
|
65
72
|
|
|
66
|
-
test("
|
|
73
|
+
test("writeInitialConfig preserves explicit mainAgent overrides without rewriting them", () => {
|
|
67
74
|
expect(
|
|
68
|
-
|
|
75
|
+
readInitialConfig({
|
|
69
76
|
"llm.default.provider": "anthropic",
|
|
70
77
|
"llm.default.model": "claude-opus-4-7",
|
|
71
78
|
"llm.callSites.mainAgent.model": "claude-haiku-4-5-20251001",
|
|
@@ -85,9 +92,9 @@ describe("config-utils", () => {
|
|
|
85
92
|
});
|
|
86
93
|
});
|
|
87
94
|
|
|
88
|
-
test("
|
|
95
|
+
test("writeInitialConfig respects explicit non-default Anthropic models", () => {
|
|
89
96
|
expect(
|
|
90
|
-
|
|
97
|
+
readInitialConfig({
|
|
91
98
|
"llm.default.provider": "anthropic",
|
|
92
99
|
"llm.default.model": "claude-haiku-4-5-20251001",
|
|
93
100
|
}),
|
|
@@ -101,9 +108,9 @@ describe("config-utils", () => {
|
|
|
101
108
|
});
|
|
102
109
|
});
|
|
103
110
|
|
|
104
|
-
test("
|
|
111
|
+
test("writeInitialConfig leaves active OpenAI profile config unchanged", () => {
|
|
105
112
|
expect(
|
|
106
|
-
|
|
113
|
+
readInitialConfig({
|
|
107
114
|
"llm.activeProfile": "fast",
|
|
108
115
|
"llm.profiles.fast.provider": "openai",
|
|
109
116
|
"llm.profiles.fast.model": "gpt-5.5",
|
|
@@ -121,29 +128,9 @@ describe("config-utils", () => {
|
|
|
121
128
|
});
|
|
122
129
|
});
|
|
123
130
|
|
|
124
|
-
test("
|
|
125
|
-
expect(
|
|
126
|
-
buildInitialConfig({
|
|
127
|
-
"llm.activeProfile": "fast",
|
|
128
|
-
"llm.profiles.fast.provider": "anthropic",
|
|
129
|
-
"llm.profiles.fast.model": "claude-haiku-4-5-20251001",
|
|
130
|
-
}),
|
|
131
|
-
).toEqual({
|
|
132
|
-
llm: {
|
|
133
|
-
activeProfile: "fast",
|
|
134
|
-
profiles: {
|
|
135
|
-
fast: {
|
|
136
|
-
provider: "anthropic",
|
|
137
|
-
model: "claude-haiku-4-5-20251001",
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
test("buildInitialConfig does not seed Opus for non-Anthropic providers", () => {
|
|
131
|
+
test("writeInitialConfig does not add Opus for non-Anthropic providers", () => {
|
|
145
132
|
expect(
|
|
146
|
-
|
|
133
|
+
readInitialConfig({
|
|
147
134
|
"llm.default.provider": "openai",
|
|
148
135
|
"llm.default.model": "gpt-5.5",
|
|
149
136
|
}),
|