@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 +10 -6
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-HETCZVFB.js → chunk-WJAN5CZ2.js} +10 -7
- package/dist/chunk-WJAN5CZ2.js.map +1 -0
- package/dist/{cli-LGYDXY5R.js → cli-A5R2DMM4.js} +2 -2
- package/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-HETCZVFB.js.map +0 -1
- /package/dist/{cli-LGYDXY5R.js.map → cli-A5R2DMM4.js.map} +0 -0
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
|
|
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 ${
|
|
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.
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
"code connect"
|
|
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
|