@vellumai/cli 0.8.10-dev.202606101903.31e26e6 → 0.8.10-dev.202606102100.3beeffc
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.
|
@@ -10,10 +10,11 @@ describe("parseLockfile", () => {
|
|
|
10
10
|
{
|
|
11
11
|
assistantId: "asst_1",
|
|
12
12
|
name: "Alice",
|
|
13
|
-
cloud: "
|
|
13
|
+
cloud: "vellum",
|
|
14
14
|
runtimeUrl: "http://127.0.0.1:7777",
|
|
15
15
|
species: "vellum",
|
|
16
16
|
hatchedAt: "2026-01-01T00:00:00.000Z",
|
|
17
|
+
organizationId: "org_1",
|
|
17
18
|
resources: { gatewayPort: 7777, daemonPort: 7778 },
|
|
18
19
|
},
|
|
19
20
|
],
|
|
@@ -150,6 +151,24 @@ describe("parseLockfile", () => {
|
|
|
150
151
|
expect(parseLockfile(raw).assistants).toEqual([]);
|
|
151
152
|
});
|
|
152
153
|
|
|
154
|
+
test("keeps organizationId on platform entries and drops it when mistyped", () => {
|
|
155
|
+
// Platform assistants carry their owning org so the host proxy can scope
|
|
156
|
+
// requests without guessing; local entries simply omit it.
|
|
157
|
+
const raw = {
|
|
158
|
+
assistants: [
|
|
159
|
+
{ assistantId: "asst_1", cloud: "vellum", organizationId: "org_1" },
|
|
160
|
+
{ assistantId: "asst_2", cloud: "vellum", organizationId: 7 }, // mistyped
|
|
161
|
+
{ assistantId: "asst_3", cloud: "local" }, // local, no org
|
|
162
|
+
],
|
|
163
|
+
activeAssistant: null,
|
|
164
|
+
};
|
|
165
|
+
expect(parseLockfile(raw).assistants).toEqual([
|
|
166
|
+
{ assistantId: "asst_1", cloud: "vellum", organizationId: "org_1" },
|
|
167
|
+
{ assistantId: "asst_2", cloud: "vellum" },
|
|
168
|
+
{ assistantId: "asst_3", cloud: "local" },
|
|
169
|
+
]);
|
|
170
|
+
});
|
|
171
|
+
|
|
153
172
|
test("drops a resources object missing its numeric ports", () => {
|
|
154
173
|
const raw = {
|
|
155
174
|
assistants: [
|
|
@@ -42,6 +42,8 @@ export interface LockfileAssistant {
|
|
|
42
42
|
runtimeUrl?: string;
|
|
43
43
|
species?: string;
|
|
44
44
|
hatchedAt?: string;
|
|
45
|
+
/** Owning org for platform assistants; absent for local ones. */
|
|
46
|
+
organizationId?: string;
|
|
45
47
|
resources?: LocalAssistantResources;
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -87,6 +89,7 @@ function parseAssistant(value: unknown): LockfileAssistant | null {
|
|
|
87
89
|
if (typeof value.runtimeUrl === "string") assistant.runtimeUrl = value.runtimeUrl;
|
|
88
90
|
if (typeof value.species === "string") assistant.species = value.species;
|
|
89
91
|
if (typeof value.hatchedAt === "string") assistant.hatchedAt = value.hatchedAt;
|
|
92
|
+
if (typeof value.organizationId === "string") assistant.organizationId = value.organizationId;
|
|
90
93
|
const resources = parseResources(value.resources);
|
|
91
94
|
if (resources) assistant.resources = resources;
|
|
92
95
|
return assistant;
|