@odla-ai/cli 0.38.1 → 0.38.3

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/dist/bin.cjs CHANGED
@@ -10501,7 +10501,8 @@ async function codeConnect(options) {
10501
10501
  );
10502
10502
  try {
10503
10503
  const descriptor2 = localSource.descriptor;
10504
- const approval = await (options.getToken ?? getScopedPlatformToken)({
10504
+ const device = options.getToken ? null : readDeviceCredential(platform);
10505
+ const authorization = device ? (await mintDeviceSession(platform, device, doFetch)).token : await (options.getToken ?? getScopedPlatformToken)({
10505
10506
  platform,
10506
10507
  scope: "app:code:host:connect",
10507
10508
  email: options.email,
@@ -10515,7 +10516,7 @@ async function codeConnect(options) {
10515
10516
  const target = appId ? { appId } : { repository };
10516
10517
  const response2 = await doFetch(`${platform}/registry/code/hosts/connect`, {
10517
10518
  method: "POST",
10518
- headers: { authorization: `Bearer ${approval}`, "content-type": "application/json" },
10519
+ headers: { authorization: `Bearer ${authorization}`, "content-type": "application/json" },
10519
10520
  body: JSON.stringify({ ...target, env: appEnv, name: hostName, platform: hostPlatform, slots }),
10520
10521
  redirect: "error",
10521
10522
  signal: options.signal
@@ -10637,6 +10638,7 @@ var init_code_connect = __esm({
10637
10638
  init_node();
10638
10639
  init_admin_ai_auth();
10639
10640
  init_config();
10641
+ init_device_session();
10640
10642
  init_version();
10641
10643
  init_security_hosted_github();
10642
10644
  init_code_local_source();
@@ -11501,10 +11503,12 @@ Safety:
11501
11503
  release. A confirmed stale client stops with a safe npx rerun command; a
11502
11504
  workspace-linked client also identifies the worktree that must be updated.
11503
11505
  Run Code from a GitHub checkout already connected to an app in Studio; an
11504
- odla.config.mjs may select the app explicitly but is not required. Code host
11505
- approval and credential hashes live in odla-ai/db. The host
11506
- credential is never written under .odla/; it exists only in the foreground
11507
- "code connect" process and is rotated by the next approved connection.
11506
+ odla.config.mjs may select the app explicitly but is not required. With an
11507
+ enrolled code.session device, the Studio repository selection authorizes the
11508
+ host's first connection and reconnects without another human approval. Without
11509
+ an enrolled device, "code connect" falls back to the reviewed handshake. Host
11510
+ credential hashes live in odla-ai/db; the credential itself is never written
11511
+ under .odla/, exists only in the foreground process, and rotates on reconnect.
11508
11512
  "code repository bind" takes owner/name and resolves the two GitHub integers the
11509
11513
  bind route wants across every installation you have, refusing an ambiguous match
11510
11514
  rather than choosing one \u2014 the same repository name under two organizations is