@vellumai/cli 0.10.7-dev.202607081734.b8c2c45 → 0.10.7-dev.202607081837.1f469e9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/cli",
3
- "version": "0.10.7-dev.202607081734.b8c2c45",
3
+ "version": "0.10.7-dev.202607081837.1f469e9",
4
4
  "description": "CLI tools for vellum-assistant",
5
5
  "type": "module",
6
6
  "exports": {
@@ -408,11 +408,18 @@ async function exportFromAssistant(
408
408
  // Passing the target's runtime URL here keeps upload and download on
409
409
  // the same platform — otherwise a non-default/stale platform URL would
410
410
  // cause the import to look at an empty object.
411
+ //
412
+ // The PUT is performed by the source daemon, not this CLI. A bare-metal
413
+ // local daemon shares the host's network view, so the client-signed URL
414
+ // is reachable; a docker daemon runs inside a container and reaches the
415
+ // host the same way managed pods do, so its URL must be signed for the
416
+ // runtime-reachable storage endpoint.
411
417
  const { url: uploadUrl, bundleKey } = await platformRequestSignedUrl(
412
418
  {
413
419
  operation: "upload",
414
420
  minRuntimeVersion: sourceRuntimeVersion,
415
421
  maxRuntimeVersion: null,
422
+ ...(cloud === "docker" ? { consumer: "runtime" as const } : {}),
416
423
  },
417
424
  platformToken,
418
425
  bundlePlatformUrl,
@@ -510,6 +517,9 @@ async function exportFromAssistant(
510
517
  operation: "upload",
511
518
  minRuntimeVersion: sourceRuntimeVersion,
512
519
  maxRuntimeVersion: null,
520
+ // The managed pod PUTs the bundle, not this CLI — the URL must be
521
+ // signed against the runtime-reachable storage endpoint.
522
+ consumer: "runtime",
513
523
  },
514
524
  platformToken,
515
525
  bundlePlatformUrl,
package/src/lib/docker.ts CHANGED
@@ -1442,6 +1442,21 @@ export async function hatchDocker(params: HatchDockerParams): Promise<void> {
1442
1442
  }
1443
1443
  const hostDeviceId = getOrCreateHostDeviceId();
1444
1444
  extraAssistantEnv.VELLUM_DEVICE_ID = hostDeviceId;
1445
+ // Forward the migration URL allowlists so a daemon inside the container
1446
+ // can PUT/GET teleport bundles against a local (non-GCS) platform.
1447
+ // Pass-through only: unset in normal use, preserving the strict
1448
+ // GCS-only validator default. A containerized daemon reaches the host
1449
+ // via host.docker.internal, so that is the value to export when
1450
+ // teleporting docker assistants against a local platform.
1451
+ for (const key of [
1452
+ "VELLUM_MIGRATION_EXPORT_ALLOWED_HOSTS",
1453
+ "VELLUM_MIGRATION_IMPORT_ALLOWED_HOSTS",
1454
+ ] as const) {
1455
+ const value = process.env[key];
1456
+ if (value) {
1457
+ extraAssistantEnv[key] = value;
1458
+ }
1459
+ }
1445
1460
  const extraGatewayEnv = {
1446
1461
  ...flagEnvVars,
1447
1462
  VELLUM_DEVICE_ID: hostDeviceId,
package/src/lib/local.ts CHANGED
@@ -1399,6 +1399,8 @@ export async function startLocalDaemon(
1399
1399
  "VELLUM_DEV",
1400
1400
  "VELLUM_DESKTOP_APP",
1401
1401
  "VELLUM_DISABLE_PLATFORM",
1402
+ "VELLUM_MIGRATION_EXPORT_ALLOWED_HOSTS",
1403
+ "VELLUM_MIGRATION_IMPORT_ALLOWED_HOSTS",
1402
1404
  "VELLUM_WORKSPACE_DIR",
1403
1405
  ]) {
1404
1406
  if (process.env[key]) {
@@ -1027,6 +1027,12 @@ export async function platformRequestSignedUrl(
1027
1027
  maxRuntimeVersion?: string | null;
1028
1028
  // Target-side, download only: runtime version that will import.
1029
1029
  targetRuntimeVersion?: string;
1030
+ // Upload only: who will PUT to the URL. "runtime" signs against the
1031
+ // runtime-reachable storage endpoint so a managed assistant pod can
1032
+ // upload its export bundle (platform→local teleport); defaults to
1033
+ // "client" server-side. No effect in production, where both endpoints
1034
+ // are the same.
1035
+ consumer?: "client" | "runtime";
1030
1036
  },
1031
1037
  token: string,
1032
1038
  platformUrl?: string,
@@ -1054,6 +1060,9 @@ export async function platformRequestSignedUrl(
1054
1060
  if (params.targetRuntimeVersion !== undefined) {
1055
1061
  body.target_runtime_version = params.targetRuntimeVersion;
1056
1062
  }
1063
+ if (params.consumer !== undefined) {
1064
+ body.consumer = params.consumer;
1065
+ }
1057
1066
 
1058
1067
  const doRequest = async (): Promise<Response> =>
1059
1068
  loopbackSafeFetch(`${resolvedUrl}/v1/migrations/signed-url/`, {