@kodycodes/cli 3.31.5 → 3.31.6
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/README.md +8 -5
- package/dist/{auth-PVW2LO2U.js → auth-ESYKAKVY.js} +8 -8
- package/dist/bin.js +11 -11
- package/dist/{chunk-GMD3RXXS.js → chunk-2EE4OHBC.js} +4 -4
- package/dist/{chunk-PQRALHYL.js → chunk-6GOJQXOM.js} +63 -49
- package/dist/{chunk-PQRALHYL.js.map → chunk-6GOJQXOM.js.map} +1 -1
- package/dist/{chunk-CQHQFF7B.js → chunk-6L5CRBRF.js} +3 -3
- package/dist/{chunk-HPRHOM5U.js → chunk-7F567S2U.js} +4 -4
- package/dist/{chunk-SQKXY43O.js → chunk-AZRZHC3C.js} +6 -6
- package/dist/{chunk-327OT6ZP.js → chunk-BNXCIPN6.js} +3 -3
- package/dist/{chunk-6KT2QEN3.js → chunk-CMIJZEAV.js} +2 -2
- package/dist/{chunk-H7CJBJFA.js → chunk-EATQUG3Q.js} +2 -2
- package/dist/{chunk-RE7LNPRO.js → chunk-EKO5KFC7.js} +79 -6
- package/dist/chunk-EKO5KFC7.js.map +6 -0
- package/dist/{chunk-6UTLL4CZ.js → chunk-FOETPC2A.js} +4 -4
- package/dist/{chunk-MW3RLRTO.js → chunk-KM5WHDLE.js} +3 -3
- package/dist/{chunk-Z2NJN47S.js → chunk-MBNCASRZ.js} +6 -10
- package/dist/chunk-MBNCASRZ.js.map +6 -0
- package/dist/{chunk-SS2SUBIJ.js → chunk-MVIEFYS4.js} +4 -4
- package/dist/{chunk-VVXXLY65.js → chunk-N2LHIPQO.js} +3 -3
- package/dist/{chunk-YFNQZPEP.js → chunk-OLE7Z5JD.js} +5 -11
- package/dist/chunk-OLE7Z5JD.js.map +6 -0
- package/dist/{chunk-ATZXCAZA.js → chunk-ROCSDHPI.js} +2 -2
- package/dist/cli.d.ts +12 -3
- package/dist/cli.js +13 -13
- package/dist/{commands-I5EWVOJC.js → commands-TVU5R74E.js} +6 -6
- package/dist/{dev-command-TU2ZPP24.js → dev-command-OHD4CKLK.js} +11 -11
- package/dist/{git-credential-FNVWEKWB.js → git-credential-HX44LBWX.js} +9 -9
- package/dist/keyring-entry.d.ts +43 -0
- package/dist/{local-execute-UTLV5UDA.js → local-execute-P4Q6DSYX.js} +9 -9
- package/dist/{local-package-graph-F3AJFSSG.js → local-package-graph-O3IPTPTR.js} +7 -7
- package/dist/{local-package-run-WMGUVB3U.js → local-package-run-OHBODGBB.js} +11 -11
- package/dist/{local-secrets-KZUJ2LE2.js → local-secrets-LNFSPB3M.js} +7 -7
- package/dist/{mock-dep-resolve-IGS3ZKEO.js → mock-dep-resolve-UELE626X.js} +6 -6
- package/dist/{mock-local-deps-HT5NG52P.js → mock-local-deps-WCIKUJLJ.js} +8 -8
- package/dist/{open-api-client-NRPF5SUW.js → open-api-client-GULJJEIG.js} +7 -7
- package/dist/{org-NWSSC7L7.js → org-GLCQE22A.js} +2 -2
- package/dist/{remote-execute-MQLJCXD7.js → remote-execute-JGISJLJU.js} +7 -7
- package/dist/{run-executor-N5CDFAOB.js → run-executor-TMTJTQB2.js} +2 -2
- package/dist/{setup-git-6NZQISC4.js → setup-git-RV7LNKRJ.js} +8 -8
- package/dist/{store-4G2J5DRZ.js → store-APLV3NIH.js} +2 -2
- package/dist/store.d.ts +1 -7
- package/dist/{whoami-D2WGWIBE.js → whoami-CRGPYLWQ.js} +6 -6
- package/package.json +1 -1
- package/dist/chunk-RE7LNPRO.js.map +0 -6
- package/dist/chunk-YFNQZPEP.js.map +0 -6
- package/dist/chunk-Z2NJN47S.js.map +0 -6
- /package/dist/{auth-PVW2LO2U.js.map → auth-ESYKAKVY.js.map} +0 -0
- /package/dist/{chunk-GMD3RXXS.js.map → chunk-2EE4OHBC.js.map} +0 -0
- /package/dist/{chunk-CQHQFF7B.js.map → chunk-6L5CRBRF.js.map} +0 -0
- /package/dist/{chunk-HPRHOM5U.js.map → chunk-7F567S2U.js.map} +0 -0
- /package/dist/{chunk-SQKXY43O.js.map → chunk-AZRZHC3C.js.map} +0 -0
- /package/dist/{chunk-327OT6ZP.js.map → chunk-BNXCIPN6.js.map} +0 -0
- /package/dist/{chunk-6KT2QEN3.js.map → chunk-CMIJZEAV.js.map} +0 -0
- /package/dist/{chunk-H7CJBJFA.js.map → chunk-EATQUG3Q.js.map} +0 -0
- /package/dist/{chunk-6UTLL4CZ.js.map → chunk-FOETPC2A.js.map} +0 -0
- /package/dist/{chunk-MW3RLRTO.js.map → chunk-KM5WHDLE.js.map} +0 -0
- /package/dist/{chunk-SS2SUBIJ.js.map → chunk-MVIEFYS4.js.map} +0 -0
- /package/dist/{chunk-VVXXLY65.js.map → chunk-N2LHIPQO.js.map} +0 -0
- /package/dist/{chunk-ATZXCAZA.js.map → chunk-ROCSDHPI.js.map} +0 -0
- /package/dist/{commands-I5EWVOJC.js.map → commands-TVU5R74E.js.map} +0 -0
- /package/dist/{dev-command-TU2ZPP24.js.map → dev-command-OHD4CKLK.js.map} +0 -0
- /package/dist/{git-credential-FNVWEKWB.js.map → git-credential-HX44LBWX.js.map} +0 -0
- /package/dist/{local-execute-UTLV5UDA.js.map → local-execute-P4Q6DSYX.js.map} +0 -0
- /package/dist/{local-package-graph-F3AJFSSG.js.map → local-package-graph-O3IPTPTR.js.map} +0 -0
- /package/dist/{local-package-run-WMGUVB3U.js.map → local-package-run-OHBODGBB.js.map} +0 -0
- /package/dist/{local-secrets-KZUJ2LE2.js.map → local-secrets-LNFSPB3M.js.map} +0 -0
- /package/dist/{mock-dep-resolve-IGS3ZKEO.js.map → mock-dep-resolve-UELE626X.js.map} +0 -0
- /package/dist/{mock-local-deps-HT5NG52P.js.map → mock-local-deps-WCIKUJLJ.js.map} +0 -0
- /package/dist/{open-api-client-NRPF5SUW.js.map → open-api-client-GULJJEIG.js.map} +0 -0
- /package/dist/{org-NWSSC7L7.js.map → org-GLCQE22A.js.map} +0 -0
- /package/dist/{remote-execute-MQLJCXD7.js.map → remote-execute-JGISJLJU.js.map} +0 -0
- /package/dist/{run-executor-N5CDFAOB.js.map → run-executor-TMTJTQB2.js.map} +0 -0
- /package/dist/{setup-git-6NZQISC4.js.map → setup-git-RV7LNKRJ.js.map} +0 -0
- /package/dist/{store-4G2J5DRZ.js.map → store-APLV3NIH.js.map} +0 -0
- /package/dist/{whoami-D2WGWIBE.js.map → whoami-CRGPYLWQ.js.map} +0 -0
package/README.md
CHANGED
|
@@ -201,10 +201,11 @@ browser login for these commands. There is no API token fallback in this mode,
|
|
|
201
201
|
and saved API tokens remain unchanged. Unset it for normal CLI precedence.
|
|
202
202
|
|
|
203
203
|
- The stored API token comes from `kody auth bootstrap` or
|
|
204
|
-
`kody auth setup-git`. `kody login`
|
|
205
|
-
|
|
206
|
-
first-row commands
|
|
207
|
-
|
|
204
|
+
`kody auth setup-git`. An explicit `kody login` deletes a stored API token for
|
|
205
|
+
that API origin and prints which token it removed, so the fresh login is what
|
|
206
|
+
the first-row commands use. Git pushes mint a new token from the login.
|
|
207
|
+
`--token` and `KODY_API_TOKEN` still outrank the login. Desktop logins
|
|
208
|
+
(`KODY_CREDENTIAL_SOURCE=login`) leave the stored token alone.
|
|
208
209
|
- To change the stored token's scopes, run
|
|
209
210
|
`npx @kodycodes/cli auth bootstrap --lifetime short --scopes <every scope you need>`
|
|
210
211
|
(mints with your login and replaces the stored token). `kody logout` clears
|
|
@@ -571,7 +572,9 @@ paths, including workerd's `/bundle`, `/tmp`, and `/dev`, stay virtual.
|
|
|
571
572
|
|
|
572
573
|
CLI credentials are stored in the OS secret store:
|
|
573
574
|
|
|
574
|
-
- macOS: Keychain
|
|
575
|
+
- macOS: Keychain, read and written through Apple's `/usr/bin/security`, so one
|
|
576
|
+
"Always Allow" covers the terminal, `npx`, the background service, and
|
|
577
|
+
Kody.app instead of each node binary asking separately
|
|
575
578
|
- Windows: Credential Manager
|
|
576
579
|
- Linux: Secret Service / libsecret (not the in-memory kernel keyring)
|
|
577
580
|
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
loginWithDevice,
|
|
10
10
|
refreshStoredCredentials,
|
|
11
11
|
resolvePendingOrgSlug
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MVIEFYS4.js";
|
|
13
13
|
import "./chunk-GVSGNTG6.js";
|
|
14
14
|
import "./chunk-CWWHR4FH.js";
|
|
15
15
|
import "./chunk-CASGRYOF.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-BNXCIPN6.js";
|
|
17
|
+
import "./chunk-EATQUG3Q.js";
|
|
18
|
+
import "./chunk-6L5CRBRF.js";
|
|
19
|
+
import "./chunk-KM5WHDLE.js";
|
|
20
|
+
import "./chunk-OLE7Z5JD.js";
|
|
21
|
+
import "./chunk-EKO5KFC7.js";
|
|
22
22
|
import "./chunk-NKH2L5RA.js";
|
|
23
23
|
import "./chunk-CJUEM2LY.js";
|
|
24
24
|
import "./chunk-YVWOK4LV.js";
|
|
@@ -34,4 +34,4 @@ export {
|
|
|
34
34
|
refreshStoredCredentials,
|
|
35
35
|
resolvePendingOrgSlug
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=auth-
|
|
37
|
+
//# sourceMappingURL=auth-ESYKAKVY.js.map
|
package/dist/bin.js
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
runCli
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6GOJQXOM.js";
|
|
6
6
|
import "./chunk-E4R3Y6MM.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-FOETPC2A.js";
|
|
8
8
|
import "./chunk-46IJPEID.js";
|
|
9
9
|
import "./chunk-NKQRWYSY.js";
|
|
10
10
|
import "./chunk-MIT3TUWB.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-MBNCASRZ.js";
|
|
12
|
+
import "./chunk-ROCSDHPI.js";
|
|
13
|
+
import "./chunk-7F567S2U.js";
|
|
14
14
|
import "./chunk-6ZYUGXVW.js";
|
|
15
15
|
import "./chunk-CWWHR4FH.js";
|
|
16
16
|
import "./chunk-CASGRYOF.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-BNXCIPN6.js";
|
|
18
|
+
import "./chunk-EATQUG3Q.js";
|
|
19
|
+
import "./chunk-6L5CRBRF.js";
|
|
20
|
+
import "./chunk-KM5WHDLE.js";
|
|
21
|
+
import "./chunk-OLE7Z5JD.js";
|
|
22
|
+
import "./chunk-EKO5KFC7.js";
|
|
23
23
|
import "./chunk-NKH2L5RA.js";
|
|
24
24
|
import "./chunk-CJUEM2LY.js";
|
|
25
25
|
import "./chunk-YVWOK4LV.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
assertTokenSafeApiUrl,
|
|
8
8
|
capabilityProxyUrl,
|
|
9
9
|
readPackageVersion
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EATQUG3Q.js";
|
|
11
11
|
import {
|
|
12
12
|
capabilityProxyForbiddenMessage,
|
|
13
13
|
currentStoredTokenLifetimeAlias,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
readInsufficientScopeDetails,
|
|
19
19
|
rejectedApiTokenMessage,
|
|
20
20
|
rejectedOauthBearerMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6L5CRBRF.js";
|
|
22
22
|
import {
|
|
23
23
|
cliName
|
|
24
24
|
} from "./chunk-NKH2L5RA.js";
|
|
@@ -1296,7 +1296,7 @@ async function resolveLocalPackageGraph(input) {
|
|
|
1296
1296
|
mergePackageGraphs,
|
|
1297
1297
|
resolveLocalPackageModules,
|
|
1298
1298
|
tryLoadSelfManifest
|
|
1299
|
-
} = await import("./mock-local-deps-
|
|
1299
|
+
} = await import("./mock-local-deps-WCIKUJLJ.js");
|
|
1300
1300
|
if (imports.length > 0 && input.packageRoot) {
|
|
1301
1301
|
const selfManifest = await tryLoadSelfManifest(input.packageRoot);
|
|
1302
1302
|
const local = await resolveLocalPackageModules({
|
|
@@ -1720,4 +1720,4 @@ export {
|
|
|
1720
1720
|
createPackageBindingsLiteral,
|
|
1721
1721
|
fetchLocalPackageGraph
|
|
1722
1722
|
};
|
|
1723
|
-
//# sourceMappingURL=chunk-
|
|
1723
|
+
//# sourceMappingURL=chunk-2EE4OHBC.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-E4R3Y6MM.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveLocalExecuteBearer
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FOETPC2A.js";
|
|
9
9
|
import {
|
|
10
10
|
formatToolResult
|
|
11
11
|
} from "./chunk-46IJPEID.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-MIT3TUWB.js";
|
|
24
24
|
import {
|
|
25
25
|
isRemoteDaemonCommand
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MBNCASRZ.js";
|
|
27
27
|
import {
|
|
28
28
|
authBootstrap,
|
|
29
29
|
authBootstrapWithScopes,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
parseCliScopesFlag,
|
|
34
34
|
refreshGitCredentialHelperPinIfNeeded,
|
|
35
35
|
resolveCliTokenLifetime
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-7F567S2U.js";
|
|
37
37
|
import {
|
|
38
38
|
orgEnvVar,
|
|
39
39
|
orgSlugFromFlag
|
|
@@ -44,28 +44,28 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
parseCredentialFlags,
|
|
46
46
|
readPackageVersion
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-EATQUG3Q.js";
|
|
48
48
|
import {
|
|
49
49
|
cliBootstrapMintCall,
|
|
50
50
|
expectedPairedApiOrigin
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6L5CRBRF.js";
|
|
52
52
|
import {
|
|
53
53
|
describeCliCredential,
|
|
54
54
|
noteActiveLoginCredential,
|
|
55
55
|
replaceStoredTokenCommand,
|
|
56
56
|
resetActiveCliCredential,
|
|
57
57
|
resolveCliCredential
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-KM5WHDLE.js";
|
|
59
59
|
import {
|
|
60
60
|
deleteStoredApiToken,
|
|
61
61
|
loadStoredApiToken
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-OLE7Z5JD.js";
|
|
63
63
|
import {
|
|
64
64
|
deleteCredentials,
|
|
65
65
|
listStoredOrgs,
|
|
66
66
|
loadCredentialStore,
|
|
67
67
|
loadCredentials
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-EKO5KFC7.js";
|
|
69
69
|
import {
|
|
70
70
|
apiTokenEnvVar,
|
|
71
71
|
defaultApiUrl,
|
|
@@ -2142,7 +2142,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2142
2142
|
case "connect":
|
|
2143
2143
|
case "update": {
|
|
2144
2144
|
const apiUrl = earlyApiUrl;
|
|
2145
|
-
const { runExecutionContextCommand } = await import("./commands-
|
|
2145
|
+
const { runExecutionContextCommand } = await import("./commands-TVU5R74E.js");
|
|
2146
2146
|
return await runExecutionContextCommand({
|
|
2147
2147
|
command: parsed.command,
|
|
2148
2148
|
positionals: parsed.positionals,
|
|
@@ -2176,7 +2176,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
2178
|
case "login": {
|
|
2179
|
-
const { login, loginWithDevice } = await import("./auth-
|
|
2179
|
+
const { login, loginWithDevice } = await import("./auth-ESYKAKVY.js");
|
|
2180
2180
|
const openBrowser = parsed.values["no-browser"] !== true;
|
|
2181
2181
|
const lifetimeOption = typeof parsed.values.lifetime === "string" ? {
|
|
2182
2182
|
lifetime: parsed.values.lifetime === "short" ? "short" : "long"
|
|
@@ -2197,7 +2197,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2197
2197
|
onDeviceCode: (prompt) => write(formatDeviceLoginNotice(prompt))
|
|
2198
2198
|
});
|
|
2199
2199
|
write(formatLoginSuccess(result2));
|
|
2200
|
-
write(
|
|
2200
|
+
write(supersedeStoredApiTokenAfterLogin(loginApiUrl));
|
|
2201
2201
|
return 0;
|
|
2202
2202
|
}
|
|
2203
2203
|
const headlessReason = openBrowser ? detectHeadlessLoginReason() : null;
|
|
@@ -2216,7 +2216,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2216
2216
|
}
|
|
2217
2217
|
});
|
|
2218
2218
|
write(formatLoginSuccess(result));
|
|
2219
|
-
write(
|
|
2219
|
+
write(supersedeStoredApiTokenAfterLogin(loginApiUrl));
|
|
2220
2220
|
return 0;
|
|
2221
2221
|
}
|
|
2222
2222
|
case "logout": {
|
|
@@ -2259,8 +2259,8 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2259
2259
|
formatOrgListHuman,
|
|
2260
2260
|
formatOrgListJson,
|
|
2261
2261
|
useOrg
|
|
2262
|
-
} = await import("./org-
|
|
2263
|
-
const { listStoredOrgs: listStoredOrgs2 } = await import("./store-
|
|
2262
|
+
} = await import("./org-GLCQE22A.js");
|
|
2263
|
+
const { listStoredOrgs: listStoredOrgs2 } = await import("./store-APLV3NIH.js");
|
|
2264
2264
|
const action = parsed.positionals[0];
|
|
2265
2265
|
if (action === "list") {
|
|
2266
2266
|
const orgs = listStoredOrgs2(mcpUrl);
|
|
@@ -2426,7 +2426,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2426
2426
|
parseGitCredentialAction,
|
|
2427
2427
|
parseGitCredentialInput,
|
|
2428
2428
|
readGitCredentialStdin
|
|
2429
|
-
} = await import("./git-credential-
|
|
2429
|
+
} = await import("./git-credential-HX44LBWX.js");
|
|
2430
2430
|
const action = parseGitCredentialAction(parsed.positionals);
|
|
2431
2431
|
const raw = await readGitCredentialStdin(process.stdin);
|
|
2432
2432
|
const output = await handleGitCredential({
|
|
@@ -2486,7 +2486,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2486
2486
|
if (mock.started) await mock.server.close();
|
|
2487
2487
|
}
|
|
2488
2488
|
}
|
|
2489
|
-
const { runWhoami } = await import("./whoami-
|
|
2489
|
+
const { runWhoami } = await import("./whoami-CRGPYLWQ.js");
|
|
2490
2490
|
return await runWhoami({
|
|
2491
2491
|
tokenValues,
|
|
2492
2492
|
mcpUrl,
|
|
@@ -2516,7 +2516,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2516
2516
|
});
|
|
2517
2517
|
apiUrl = mock.apiUrl;
|
|
2518
2518
|
closeMock = mock.started ? () => mock.server.close() : void 0;
|
|
2519
|
-
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-
|
|
2519
|
+
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-GULJJEIG.js");
|
|
2520
2520
|
const result2 = await searchWithApiToken2({
|
|
2521
2521
|
token: mock.token,
|
|
2522
2522
|
apiUrl,
|
|
@@ -2536,7 +2536,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2536
2536
|
...org ? { org } : {}
|
|
2537
2537
|
});
|
|
2538
2538
|
if (searchCredential?.token) {
|
|
2539
|
-
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-
|
|
2539
|
+
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-GULJJEIG.js");
|
|
2540
2540
|
const result2 = await searchWithApiToken2({
|
|
2541
2541
|
token: searchCredential.token,
|
|
2542
2542
|
apiUrl,
|
|
@@ -2549,14 +2549,14 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2549
2549
|
write(formatToolResult(result2, json));
|
|
2550
2550
|
return result2.isError ? 1 : 0;
|
|
2551
2551
|
}
|
|
2552
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
2552
|
+
const { ensureOpenApiCredentials } = await import("./auth-ESYKAKVY.js");
|
|
2553
2553
|
const credentials = await ensureOpenApiCredentials({
|
|
2554
2554
|
mcpUrl,
|
|
2555
2555
|
org,
|
|
2556
2556
|
apiUrl
|
|
2557
2557
|
});
|
|
2558
2558
|
noteActiveLoginCredential({ login: credentials, purpose: "session" });
|
|
2559
|
-
const { searchWithApiToken } = await import("./open-api-client-
|
|
2559
|
+
const { searchWithApiToken } = await import("./open-api-client-GULJJEIG.js");
|
|
2560
2560
|
const result = await searchWithApiToken({
|
|
2561
2561
|
token: credentials.accessToken,
|
|
2562
2562
|
apiUrl,
|
|
@@ -2615,7 +2615,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2615
2615
|
(value) => typeof value === "string"
|
|
2616
2616
|
) : typeof parsed.values.credential === "string" ? [parsed.values.credential] : void 0
|
|
2617
2617
|
);
|
|
2618
|
-
const executeRouting = (await import("./remote-execute-
|
|
2618
|
+
const executeRouting = (await import("./remote-execute-JGISJLJU.js")).executeRoutingFromFlags(parsed.values);
|
|
2619
2619
|
if (executeRouting && local) {
|
|
2620
2620
|
writeErr(
|
|
2621
2621
|
"--context, --fallback, --requires, and --chain route cloud execute; drop --local.\n"
|
|
@@ -2671,7 +2671,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2671
2671
|
apiUrl = mock.apiUrl;
|
|
2672
2672
|
mockToken = mock.token;
|
|
2673
2673
|
closeMock = mock.started ? () => mock.server.close() : void 0;
|
|
2674
|
-
const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-
|
|
2674
|
+
const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-UELE626X.js");
|
|
2675
2675
|
mockDepResolve = await tryResolveMockDepResolve({
|
|
2676
2676
|
tokenValues,
|
|
2677
2677
|
apiUrl: prodApiUrl,
|
|
@@ -2680,7 +2680,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2680
2680
|
});
|
|
2681
2681
|
}
|
|
2682
2682
|
if (localPackageRun) {
|
|
2683
|
-
const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-
|
|
2683
|
+
const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-OHBODGBB.js");
|
|
2684
2684
|
const result2 = await runLocalPackageModule({
|
|
2685
2685
|
modulePath: localPackageRun.modulePath,
|
|
2686
2686
|
params: args.params,
|
|
@@ -2725,7 +2725,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2725
2725
|
packageRootForMocks = void 0;
|
|
2726
2726
|
}
|
|
2727
2727
|
}
|
|
2728
|
-
const result = local ? await (await import("./local-execute-
|
|
2728
|
+
const result = local ? await (await import("./local-execute-P4Q6DSYX.js")).runLocalExecute({
|
|
2729
2729
|
code: args.code,
|
|
2730
2730
|
...modulePath !== void 0 ? { modulePath } : {},
|
|
2731
2731
|
params: args.params,
|
|
@@ -2747,7 +2747,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2747
2747
|
allowPrivateNetwork: parsed.values["allow-private-network"] === true,
|
|
2748
2748
|
onStatus: (message) => writeErr(`${message}
|
|
2749
2749
|
`)
|
|
2750
|
-
}) : cloudToken ? await (await import("./remote-execute-
|
|
2750
|
+
}) : cloudToken ? await (await import("./remote-execute-JGISJLJU.js")).runRemoteExecuteWithToken({
|
|
2751
2751
|
code: typeof args.code === "string" ? args.code : void 0,
|
|
2752
2752
|
params: args.params,
|
|
2753
2753
|
conversationId: args.conversationId,
|
|
@@ -2757,7 +2757,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2757
2757
|
apiUrl,
|
|
2758
2758
|
...org ? { org } : {}
|
|
2759
2759
|
}) : await (async () => {
|
|
2760
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
2760
|
+
const { ensureOpenApiCredentials } = await import("./auth-ESYKAKVY.js");
|
|
2761
2761
|
const session = await ensureOpenApiCredentials({
|
|
2762
2762
|
mcpUrl,
|
|
2763
2763
|
org,
|
|
@@ -2767,7 +2767,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2767
2767
|
login: session,
|
|
2768
2768
|
purpose: "session"
|
|
2769
2769
|
});
|
|
2770
|
-
return (await import("./remote-execute-
|
|
2770
|
+
return (await import("./remote-execute-JGISJLJU.js")).runRemoteExecuteWithToken({
|
|
2771
2771
|
code: typeof args.code === "string" ? args.code : void 0,
|
|
2772
2772
|
params: args.params,
|
|
2773
2773
|
conversationId: args.conversationId,
|
|
@@ -2782,7 +2782,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2782
2782
|
return result.isError ? 1 : 0;
|
|
2783
2783
|
} catch (error) {
|
|
2784
2784
|
if (json && local) {
|
|
2785
|
-
const { LocalPackageGraphError, packageGraphErrorToolResult } = await import("./local-package-graph-
|
|
2785
|
+
const { LocalPackageGraphError, packageGraphErrorToolResult } = await import("./local-package-graph-O3IPTPTR.js");
|
|
2786
2786
|
if (error instanceof LocalPackageGraphError) {
|
|
2787
2787
|
const redacted = redactError(error).message;
|
|
2788
2788
|
const result = packageGraphErrorToolResult(error);
|
|
@@ -2812,7 +2812,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2812
2812
|
runDevServe,
|
|
2813
2813
|
runDevWebhook,
|
|
2814
2814
|
tryAttachedDevFetch
|
|
2815
|
-
} = await import("./dev-command-
|
|
2815
|
+
} = await import("./dev-command-OHD4CKLK.js");
|
|
2816
2816
|
const target = resolveTarget({
|
|
2817
2817
|
command: "dev",
|
|
2818
2818
|
flag: typeof parsed.values.target === "string" ? parsed.values.target : void 0
|
|
@@ -2839,8 +2839,8 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2839
2839
|
{ callOpenApiOperation, formatOpenApiHttpDebugLine },
|
|
2840
2840
|
{ parsePackageCheckResult, PublishChecksAuthError }
|
|
2841
2841
|
] = await Promise.all([
|
|
2842
|
-
import("./open-api-client-
|
|
2843
|
-
import("./dev-command-
|
|
2842
|
+
import("./open-api-client-GULJJEIG.js"),
|
|
2843
|
+
import("./dev-command-OHD4CKLK.js")
|
|
2844
2844
|
]);
|
|
2845
2845
|
let token2;
|
|
2846
2846
|
try {
|
|
@@ -2957,7 +2957,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2957
2957
|
purpose: "kody dev",
|
|
2958
2958
|
...org ? { org } : {}
|
|
2959
2959
|
}) : "mock";
|
|
2960
|
-
const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-
|
|
2960
|
+
const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-UELE626X.js")).tryResolveMockDepResolve({
|
|
2961
2961
|
tokenValues,
|
|
2962
2962
|
apiUrl: prodApiUrl,
|
|
2963
2963
|
mcpUrl,
|
|
@@ -3089,7 +3089,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3089
3089
|
const apiUrl = apiUrlFrom({
|
|
3090
3090
|
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
3091
3091
|
});
|
|
3092
|
-
const local = await import("./local-secrets-
|
|
3092
|
+
const local = await import("./local-secrets-LNFSPB3M.js");
|
|
3093
3093
|
const token = () => accessTokenForOpenApi({
|
|
3094
3094
|
tokenValues: tokenFlagValues(parsed.values),
|
|
3095
3095
|
apiUrl,
|
|
@@ -3164,7 +3164,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3164
3164
|
const params = parseApiParamsJson(
|
|
3165
3165
|
typeof parsed.values.params === "string" ? parsed.values.params : void 0
|
|
3166
3166
|
);
|
|
3167
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3167
|
+
const { callOpenApiOperation } = await import("./open-api-client-GULJJEIG.js");
|
|
3168
3168
|
const result = await callOpenApiOperation({
|
|
3169
3169
|
operationId,
|
|
3170
3170
|
params,
|
|
@@ -3199,7 +3199,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3199
3199
|
mcpUrl,
|
|
3200
3200
|
org
|
|
3201
3201
|
});
|
|
3202
|
-
const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-
|
|
3202
|
+
const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-GULJJEIG.js");
|
|
3203
3203
|
write(
|
|
3204
3204
|
await runPackageCollaboratorPlan({
|
|
3205
3205
|
plan,
|
|
@@ -3225,7 +3225,7 @@ ${packageCollaboratorUsage}`
|
|
|
3225
3225
|
positional: parsed.positionals[1],
|
|
3226
3226
|
paramsJson: typeof parsed.values.params === "string" ? parsed.values.params : void 0
|
|
3227
3227
|
});
|
|
3228
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3228
|
+
const { callOpenApiOperation } = await import("./open-api-client-GULJJEIG.js");
|
|
3229
3229
|
const publishToken = await accessTokenForOpenApi({
|
|
3230
3230
|
tokenValues,
|
|
3231
3231
|
apiUrl,
|
|
@@ -3397,7 +3397,7 @@ function attachExecuteCommonArgs(args, input) {
|
|
|
3397
3397
|
return args;
|
|
3398
3398
|
}
|
|
3399
3399
|
async function runAuthSetupGit(input) {
|
|
3400
|
-
const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-
|
|
3400
|
+
const { authSetupGit, setupGitDefaultScopes } = await import("./setup-git-RV7LNKRJ.js");
|
|
3401
3401
|
const apiUrl = apiUrlFrom({
|
|
3402
3402
|
apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
|
|
3403
3403
|
});
|
|
@@ -3454,7 +3454,7 @@ async function runAuthSetupGit(input) {
|
|
|
3454
3454
|
return 0;
|
|
3455
3455
|
}
|
|
3456
3456
|
async function runAuthRemoveGit(input) {
|
|
3457
|
-
const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-
|
|
3457
|
+
const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-RV7LNKRJ.js");
|
|
3458
3458
|
const apiUrl = apiUrlFrom({
|
|
3459
3459
|
apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
|
|
3460
3460
|
});
|
|
@@ -3476,7 +3476,7 @@ function bootstrapMinter(input) {
|
|
|
3476
3476
|
});
|
|
3477
3477
|
if (minter?.token) {
|
|
3478
3478
|
const token = minter.token;
|
|
3479
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3479
|
+
const { callOpenApiOperation } = await import("./open-api-client-GULJJEIG.js");
|
|
3480
3480
|
try {
|
|
3481
3481
|
return await callOpenApiOperation({
|
|
3482
3482
|
token,
|
|
@@ -3495,13 +3495,13 @@ function bootstrapMinter(input) {
|
|
|
3495
3495
|
}
|
|
3496
3496
|
}
|
|
3497
3497
|
if (minter) {
|
|
3498
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
3498
|
+
const { ensureOpenApiCredentials } = await import("./auth-ESYKAKVY.js");
|
|
3499
3499
|
const session = await ensureOpenApiCredentials({
|
|
3500
3500
|
mcpUrl: input.mcpUrl,
|
|
3501
3501
|
apiUrl: input.apiUrl,
|
|
3502
3502
|
...input.org ? { org: input.org } : {}
|
|
3503
3503
|
});
|
|
3504
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3504
|
+
const { callOpenApiOperation } = await import("./open-api-client-GULJJEIG.js");
|
|
3505
3505
|
return callOpenApiOperation({
|
|
3506
3506
|
operationId: cliCredentialBootstrapOperationId,
|
|
3507
3507
|
params,
|
|
@@ -3528,7 +3528,7 @@ async function accessTokenForOpenApi(input) {
|
|
|
3528
3528
|
...input.org ? { org: input.org } : {}
|
|
3529
3529
|
});
|
|
3530
3530
|
if (credential?.token) return credential.token;
|
|
3531
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
3531
|
+
const { ensureOpenApiCredentials } = await import("./auth-ESYKAKVY.js");
|
|
3532
3532
|
const session = await ensureOpenApiCredentials({
|
|
3533
3533
|
mcpUrl: input.mcpUrl,
|
|
3534
3534
|
apiUrl: input.apiUrl,
|
|
@@ -3582,20 +3582,34 @@ async function resolvePackagePublishTarget(params, call) {
|
|
|
3582
3582
|
const { kody_id: _name, ...rest } = params;
|
|
3583
3583
|
return { ...rest, package_id: matches[0].package_id };
|
|
3584
3584
|
}
|
|
3585
|
-
function
|
|
3585
|
+
function supersedeStoredApiTokenAfterLogin(apiUrl, deps = {}) {
|
|
3586
|
+
const env = deps.env ?? process.env;
|
|
3587
|
+
const envTokenNote = env.KODY_API_TOKEN?.trim() ? "Note: KODY_API_TOKEN is set in this shell and still takes precedence over this login. Unset it to use the login.\n" : "";
|
|
3588
|
+
if (env.KODY_CREDENTIAL_SOURCE?.trim()) return envTokenNote;
|
|
3586
3589
|
let stored;
|
|
3587
3590
|
try {
|
|
3588
|
-
stored = loadApiToken(apiUrl);
|
|
3591
|
+
stored = (deps.loadApiToken ?? loadStoredApiToken)(apiUrl);
|
|
3589
3592
|
} catch {
|
|
3590
|
-
return
|
|
3593
|
+
return envTokenNote;
|
|
3591
3594
|
}
|
|
3592
|
-
if (!stored) return
|
|
3595
|
+
if (!stored) return envTokenNote;
|
|
3593
3596
|
const label = describeCliCredential({
|
|
3594
3597
|
source: "stored-api-token",
|
|
3595
3598
|
token: stored.token,
|
|
3596
3599
|
stored
|
|
3597
3600
|
});
|
|
3598
|
-
|
|
3601
|
+
const scopes = stored.scopes?.join(", ") || "unknown";
|
|
3602
|
+
let deleted = false;
|
|
3603
|
+
try {
|
|
3604
|
+
deleted = (deps.deleteApiToken ?? deleteStoredApiToken)(apiUrl).deleted;
|
|
3605
|
+
} catch {
|
|
3606
|
+
deleted = false;
|
|
3607
|
+
}
|
|
3608
|
+
if (!deleted) {
|
|
3609
|
+
return `${envTokenNote}Warning: could not remove the ${label} (scopes: ${scopes}), so api, package, execute --local, context, daemon, and dev keep using it instead of this login. Run \`kody logout\` and log in again.
|
|
3610
|
+
`;
|
|
3611
|
+
}
|
|
3612
|
+
return `${envTokenNote}Removed the ${label} (scopes: ${scopes}); api, package, execute --local, context, daemon, and dev now use this login. Git pushes mint a new token from this login. To use a scoped token again, run \`${replaceStoredTokenCommand(stored.scopes)}\`.
|
|
3599
3613
|
`;
|
|
3600
3614
|
}
|
|
3601
3615
|
|
|
@@ -3614,6 +3628,6 @@ export {
|
|
|
3614
3628
|
parseApiParamsJson,
|
|
3615
3629
|
packagePublishParams,
|
|
3616
3630
|
resolvePackagePublishTarget,
|
|
3617
|
-
|
|
3631
|
+
supersedeStoredApiTokenAfterLogin
|
|
3618
3632
|
};
|
|
3619
|
-
//# sourceMappingURL=chunk-
|
|
3633
|
+
//# sourceMappingURL=chunk-6GOJQXOM.js.map
|