@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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "./chunk-HETCZVFB.js";
4
+ } from "./chunk-WJAN5CZ2.js";
5
5
  import {
6
6
  exitCodeFor
7
7
  } from "./chunk-UKLSRQ5J.js";
@@ -9,4 +9,4 @@ export {
9
9
  exitCodeFor,
10
10
  runCli
11
11
  };
12
- //# sourceMappingURL=cli-LGYDXY5R.js.map
12
+ //# sourceMappingURL=cli-A5R2DMM4.js.map
package/dist/index.cjs CHANGED
@@ -9804,7 +9804,8 @@ async function codeConnect(options) {
9804
9804
  );
9805
9805
  try {
9806
9806
  const descriptor2 = localSource.descriptor;
9807
- const approval = await (options.getToken ?? getScopedPlatformToken)({
9807
+ const device = options.getToken ? null : readDeviceCredential(platform);
9808
+ const authorization = device ? (await mintDeviceSession(platform, device, doFetch)).token : await (options.getToken ?? getScopedPlatformToken)({
9808
9809
  platform,
9809
9810
  scope: "app:code:host:connect",
9810
9811
  email: options.email,
@@ -9818,7 +9819,7 @@ async function codeConnect(options) {
9818
9819
  const target = appId ? { appId } : { repository };
9819
9820
  const response2 = await doFetch(`${platform}/registry/code/hosts/connect`, {
9820
9821
  method: "POST",
9821
- headers: { authorization: `Bearer ${approval}`, "content-type": "application/json" },
9822
+ headers: { authorization: `Bearer ${authorization}`, "content-type": "application/json" },
9822
9823
  body: JSON.stringify({ ...target, env: appEnv, name: hostName, platform: hostPlatform, slots }),
9823
9824
  redirect: "error",
9824
9825
  signal: options.signal
@@ -10719,10 +10720,12 @@ Safety:
10719
10720
  release. A confirmed stale client stops with a safe npx rerun command; a
10720
10721
  workspace-linked client also identifies the worktree that must be updated.
10721
10722
  Run Code from a GitHub checkout already connected to an app in Studio; an
10722
- odla.config.mjs may select the app explicitly but is not required. Code host
10723
- approval and credential hashes live in odla-ai/db. The host
10724
- credential is never written under .odla/; it exists only in the foreground
10725
- "code connect" process and is rotated by the next approved connection.
10723
+ odla.config.mjs may select the app explicitly but is not required. With an
10724
+ enrolled code.session device, the Studio repository selection authorizes the
10725
+ host's first connection and reconnects without another human approval. Without
10726
+ an enrolled device, "code connect" falls back to the reviewed handshake. Host
10727
+ credential hashes live in odla-ai/db; the credential itself is never written
10728
+ under .odla/, exists only in the foreground process, and rotates on reconnect.
10726
10729
  "code repository bind" takes owner/name and resolves the two GitHub integers the
10727
10730
  bind route wants across every installation you have, refusing an ambiguous match
10728
10731
  rather than choosing one \u2014 the same repository name under two organizations is