@kodycodes/cli 3.34.5 → 3.34.7
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 +58 -80
- package/dist/{auth-DWGWWITD.js → auth-I4XH63PZ.js} +8 -8
- package/dist/auth-bootstrap.d.ts +9 -2
- package/dist/bin.js +11 -11
- package/dist/chunk-22AN66MM.js +170 -0
- package/dist/chunk-22AN66MM.js.map +6 -0
- package/dist/{chunk-FKRK4KX2.js → chunk-4QDPGKUS.js} +10 -5
- package/dist/chunk-4QDPGKUS.js.map +6 -0
- package/dist/{chunk-5SC7O2PH.js → chunk-5BNIKSOV.js} +6 -6
- package/dist/{chunk-3Y5ORFHI.js → chunk-7UV4RVJW.js} +2 -2
- package/dist/{chunk-KIE2IYSQ.js → chunk-B4OOCRLZ.js} +4 -4
- package/dist/{chunk-IQT3CSAH.js → chunk-B5DIPCOD.js} +3 -3
- package/dist/{chunk-6JZQOHFG.js → chunk-ENFBLA4M.js} +2 -17
- package/dist/{chunk-6JZQOHFG.js.map → chunk-ENFBLA4M.js.map} +1 -1
- package/dist/{chunk-DJD2F7UG.js → chunk-HBHIQDJI.js} +85 -104
- package/dist/chunk-HBHIQDJI.js.map +6 -0
- package/dist/{chunk-D6UGXUT4.js → chunk-KMEHILCP.js} +4 -4
- package/dist/chunk-KMEHILCP.js.map +6 -0
- package/dist/{chunk-XMSOSYDJ.js → chunk-KXK3O7O2.js} +3 -3
- package/dist/{chunk-PIQVCGBG.js → chunk-LGG77FR7.js} +4 -4
- package/dist/chunk-LGG77FR7.js.map +6 -0
- package/dist/{chunk-XJGR7USP.js → chunk-PGJ22SM7.js} +1 -1
- package/dist/{chunk-XJGR7USP.js.map → chunk-PGJ22SM7.js.map} +1 -1
- package/dist/{chunk-ONR2NQSZ.js → chunk-V3KIBQVH.js} +98 -158
- package/dist/chunk-V3KIBQVH.js.map +6 -0
- package/dist/{chunk-RHMKQBDF.js → chunk-W7JYNGNA.js} +6 -6
- package/dist/{chunk-WAGPHHLE.js → chunk-XQQYWLYQ.js} +4 -4
- package/dist/{chunk-UL7FYAAL.js → chunk-XRIUHO5Q.js} +2 -2
- package/dist/{chunk-GD7ZK2TS.js → chunk-Z7DR5UNN.js} +1 -1
- package/dist/{chunk-GD7ZK2TS.js.map → chunk-Z7DR5UNN.js.map} +1 -1
- package/dist/cli-credential.d.ts +24 -25
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +11 -11
- package/dist/{commands-5SON3UIU.js → commands-CX2FTGEB.js} +6 -6
- package/dist/{commands-5SON3UIU.js.map → commands-CX2FTGEB.js.map} +1 -1
- package/dist/{dev-command-C6KQGDDX.js → dev-command-WOSJFXY7.js} +20 -20
- package/dist/execution-context/host-command-state.d.ts +4 -0
- package/dist/execution-context/keystore.d.ts +6 -3
- package/dist/{git-credential-CJU5XPLS.js → git-credential-JUIVYMJM.js} +39 -52
- package/dist/git-credential-JUIVYMJM.js.map +6 -0
- package/dist/git-credential.d.ts +13 -15
- package/dist/keyring-entry.d.ts +5 -1
- package/dist/{local-execute-NDTHSGUJ.js → local-execute-DY6HZ3KQ.js} +10 -10
- package/dist/{local-package-graph-2O57E4YF.js → local-package-graph-FMCN2OY4.js} +7 -7
- package/dist/{local-package-run-D5D2MBEV.js → local-package-run-BUO3MVML.js} +12 -12
- package/dist/{local-secrets-6WYNC5RH.js → local-secrets-77VJOY4E.js} +7 -7
- package/dist/mock/mock-storage.d.ts +3 -2
- package/dist/{mock-dep-resolve-YOTBQODM.js → mock-dep-resolve-JA6IDQPE.js} +6 -6
- package/dist/{mock-local-deps-AE2JUMC3.js → mock-local-deps-QHMQCI5L.js} +9 -9
- package/dist/{mock-server-IAXWMMFJ.js → mock-server-IUHUKCGP.js} +2 -2
- package/dist/{open-api-client-6L6KSSK6.js → open-api-client-S26DL5MW.js} +7 -7
- package/dist/{org-JE67J3U4.js → org-VKSU4YVE.js} +2 -2
- package/dist/publish-builder.js +14 -2
- package/dist/{remote-execute-Z6NGBM3M.js → remote-execute-WTORQH3E.js} +7 -7
- package/dist/{run-executor-6GE3P4S4.js → run-executor-VFNRNXVE.js} +2 -2
- package/dist/{setup-git-4UECBTVV.js → setup-git-LSHM7DQM.js} +8 -8
- package/dist/setup-git.d.ts +8 -11
- package/dist/{store-XUB5AFUP.js → store-DGAP2AZS.js} +2 -2
- package/dist/store.d.ts +2 -0
- package/dist/{whoami-DVDBA3FV.js → whoami-3HCHZO2F.js} +8 -14
- package/dist/whoami-3HCHZO2F.js.map +6 -0
- package/package.json +1 -1
- package/dist/chunk-D6UGXUT4.js.map +0 -6
- package/dist/chunk-DJD2F7UG.js.map +0 -6
- package/dist/chunk-FKRK4KX2.js.map +0 -6
- package/dist/chunk-LZMFWQGZ.js +0 -175
- package/dist/chunk-LZMFWQGZ.js.map +0 -6
- package/dist/chunk-ONR2NQSZ.js.map +0 -6
- package/dist/chunk-PIQVCGBG.js.map +0 -6
- package/dist/git-credential-CJU5XPLS.js.map +0 -6
- package/dist/whoami-DVDBA3FV.js.map +0 -6
- /package/dist/{auth-DWGWWITD.js.map → auth-I4XH63PZ.js.map} +0 -0
- /package/dist/{chunk-5SC7O2PH.js.map → chunk-5BNIKSOV.js.map} +0 -0
- /package/dist/{chunk-3Y5ORFHI.js.map → chunk-7UV4RVJW.js.map} +0 -0
- /package/dist/{chunk-KIE2IYSQ.js.map → chunk-B4OOCRLZ.js.map} +0 -0
- /package/dist/{chunk-IQT3CSAH.js.map → chunk-B5DIPCOD.js.map} +0 -0
- /package/dist/{chunk-XMSOSYDJ.js.map → chunk-KXK3O7O2.js.map} +0 -0
- /package/dist/{chunk-RHMKQBDF.js.map → chunk-W7JYNGNA.js.map} +0 -0
- /package/dist/{chunk-WAGPHHLE.js.map → chunk-XQQYWLYQ.js.map} +0 -0
- /package/dist/{chunk-UL7FYAAL.js.map → chunk-XRIUHO5Q.js.map} +0 -0
- /package/dist/{dev-command-C6KQGDDX.js.map → dev-command-WOSJFXY7.js.map} +0 -0
- /package/dist/{local-execute-NDTHSGUJ.js.map → local-execute-DY6HZ3KQ.js.map} +0 -0
- /package/dist/{local-package-graph-2O57E4YF.js.map → local-package-graph-FMCN2OY4.js.map} +0 -0
- /package/dist/{local-package-run-D5D2MBEV.js.map → local-package-run-BUO3MVML.js.map} +0 -0
- /package/dist/{local-secrets-6WYNC5RH.js.map → local-secrets-77VJOY4E.js.map} +0 -0
- /package/dist/{mock-dep-resolve-YOTBQODM.js.map → mock-dep-resolve-JA6IDQPE.js.map} +0 -0
- /package/dist/{mock-local-deps-AE2JUMC3.js.map → mock-local-deps-QHMQCI5L.js.map} +0 -0
- /package/dist/{mock-server-IAXWMMFJ.js.map → mock-server-IUHUKCGP.js.map} +0 -0
- /package/dist/{open-api-client-6L6KSSK6.js.map → open-api-client-S26DL5MW.js.map} +0 -0
- /package/dist/{org-JE67J3U4.js.map → org-VKSU4YVE.js.map} +0 -0
- /package/dist/{remote-execute-Z6NGBM3M.js.map → remote-execute-WTORQH3E.js.map} +0 -0
- /package/dist/{run-executor-6GE3P4S4.js.map → run-executor-VFNRNXVE.js.map} +0 -0
- /package/dist/{setup-git-4UECBTVV.js.map → setup-git-LSHM7DQM.js.map} +0 -0
- /package/dist/{store-XUB5AFUP.js.map → store-DGAP2AZS.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-E4R3Y6MM.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveLocalExecuteBearer
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4QDPGKUS.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-LGG77FR7.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-HBHIQDJI.js";
|
|
37
37
|
import {
|
|
38
38
|
orgEnvVar,
|
|
39
39
|
orgSlugFromFlag
|
|
@@ -44,28 +44,27 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
parseCredentialFlags,
|
|
46
46
|
readPackageVersion
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-XRIUHO5Q.js";
|
|
48
48
|
import {
|
|
49
49
|
cliBootstrapMintCall,
|
|
50
50
|
expectedPairedApiOrigin
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-KMEHILCP.js";
|
|
52
52
|
import {
|
|
53
53
|
describeCliCredential,
|
|
54
54
|
noteActiveLoginCredential,
|
|
55
|
-
replaceStoredTokenCommand,
|
|
56
55
|
resetActiveCliCredential,
|
|
57
56
|
resolveCliCredential
|
|
58
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-22AN66MM.js";
|
|
59
58
|
import {
|
|
60
59
|
deleteStoredApiToken,
|
|
61
60
|
loadStoredApiToken
|
|
62
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-ENFBLA4M.js";
|
|
63
62
|
import {
|
|
64
63
|
deleteCredentials,
|
|
65
64
|
listStoredOrgs,
|
|
66
65
|
loadCredentialStore,
|
|
67
66
|
loadCredentials
|
|
68
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-Z7DR5UNN.js";
|
|
69
68
|
import {
|
|
70
69
|
apiTokenEnvVar,
|
|
71
70
|
defaultApiUrl,
|
|
@@ -175,14 +174,14 @@ var commandHelpTree = [
|
|
|
175
174
|
},
|
|
176
175
|
{
|
|
177
176
|
name: "auth",
|
|
178
|
-
summary: "
|
|
177
|
+
summary: "Save the CLI credential and set up Git credentials",
|
|
179
178
|
usage: ["kody auth <command> [flags]"],
|
|
180
179
|
subcommands: [
|
|
181
180
|
{
|
|
182
181
|
name: "bootstrap",
|
|
183
|
-
summary: "Redeem a kody_bc_\u2026 code (or mint one with --scopes)
|
|
182
|
+
summary: "Redeem a kody_bc_\u2026 code (or mint a narrower one with --scopes) into the saved CLI credential",
|
|
184
183
|
usage: [
|
|
185
|
-
"kody auth bootstrap (--code <kody_bc_\u2026> | --scopes <list>)
|
|
184
|
+
"kody auth bootstrap (--code <kody_bc_\u2026> | --scopes <list>) [--lifetime short|long | --idle-ttl-seconds <n> --max-lifetime-seconds <n>]",
|
|
186
185
|
" [--token <token>] [--mcp-url <url>] [--api-url <url>]"
|
|
187
186
|
],
|
|
188
187
|
flags: [
|
|
@@ -192,7 +191,7 @@ var commandHelpTree = [
|
|
|
192
191
|
],
|
|
193
192
|
[
|
|
194
193
|
"--scopes <list>",
|
|
195
|
-
"Mint a code with exactly these scopes (replaces the
|
|
194
|
+
"Mint a narrower code with exactly these scopes (replaces the login-equivalent default)"
|
|
196
195
|
],
|
|
197
196
|
[
|
|
198
197
|
"--lifetime short|long",
|
|
@@ -214,26 +213,12 @@ var commandHelpTree = [
|
|
|
214
213
|
{
|
|
215
214
|
name: "setup-git",
|
|
216
215
|
summary: "Install a Git credential helper for https://kody.codes/@owner/name.git",
|
|
217
|
-
usage: [
|
|
218
|
-
|
|
219
|
-
],
|
|
220
|
-
flags: [
|
|
221
|
-
[
|
|
222
|
-
"--lifetime long|short",
|
|
223
|
-
"Lifetime of the minted token (default long)"
|
|
224
|
-
],
|
|
225
|
-
[
|
|
226
|
-
"--scopes <list>",
|
|
227
|
-
"Extra scopes beyond package:read and package:write"
|
|
228
|
-
],
|
|
229
|
-
tokenFlag,
|
|
230
|
-
mcpUrlFlag,
|
|
231
|
-
apiUrlFlag
|
|
232
|
-
]
|
|
216
|
+
usage: ["kody auth setup-git [--mcp-url <url>] [--api-url <url>]"],
|
|
217
|
+
flags: [mcpUrlFlag, apiUrlFlag]
|
|
233
218
|
},
|
|
234
219
|
{
|
|
235
220
|
name: "remove-git",
|
|
236
|
-
summary: "Remove the Git credential helper and revoke
|
|
221
|
+
summary: "Remove the Git credential helper and revoke any old-slot token",
|
|
237
222
|
usage: ["kody auth remove-git [--mcp-url <url>] [--api-url <url>]"],
|
|
238
223
|
flags: [mcpUrlFlag, apiUrlFlag]
|
|
239
224
|
}
|
|
@@ -1093,9 +1078,9 @@ Usage:
|
|
|
1093
1078
|
kody org list [--json] [--mcp-url <url>]
|
|
1094
1079
|
kody org use [<slug>] [--mcp-url <url>]
|
|
1095
1080
|
kody status [--mcp-url <url>] [--api-url <url>]
|
|
1096
|
-
kody auth bootstrap (--code <kody_bc_\u2026> | --scopes <list>)
|
|
1081
|
+
kody auth bootstrap (--code <kody_bc_\u2026> | --scopes <list>) [--lifetime short|long | --idle-ttl-seconds <n> --max-lifetime-seconds <n>]
|
|
1097
1082
|
[--token <token>] [--mcp-url <url>] [--api-url <url>]
|
|
1098
|
-
kody auth setup-git [--
|
|
1083
|
+
kody auth setup-git [--mcp-url <url>] [--api-url <url>]
|
|
1099
1084
|
kody auth remove-git [--mcp-url <url>] [--api-url <url>]
|
|
1100
1085
|
kody git-credential <get|store|erase>
|
|
1101
1086
|
kody whoami [--org <slug>] [--target prod|mock] [--mcp-url <url>] [--token <token>] [--api-url <url>] [--json]
|
|
@@ -1201,41 +1186,30 @@ ${orgBlock}
|
|
|
1201
1186
|
(never ask a human to paste a token). Humans: \`kody login\`.
|
|
1202
1187
|
This command redeems a one-shot \`kody_bc_\u2026\` (POST
|
|
1203
1188
|
/v1/tokens/bootstrap/redeem, no Authorization header).
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
\`kody api cliCredentialBootstrapRedeem\` (that would print the
|
|
1212
|
-
token).
|
|
1189
|
+
Saves the same credential \`kody login\` saves (every scope
|
|
1190
|
+
your org role grants, 14d idle / 3mo max) in the same slot;
|
|
1191
|
+
every command, including git, uses it. \`--lifetime short|long\`
|
|
1192
|
+
or \`--idle-ttl-seconds\` + \`--max-lifetime-seconds\` are
|
|
1193
|
+
optional and default to the code's lifetime. Never prints the
|
|
1194
|
+
token. Do not call \`kody api cliCredentialBootstrapRedeem\`
|
|
1195
|
+
(that would print the token).
|
|
1213
1196
|
|
|
1214
1197
|
--scopes <list>
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
\`--
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
\`kody login\` session (any scope your org role grants), else
|
|
1223
|
-
${apiTokenEnvVar} / a stored token (only scopes that token
|
|
1224
|
-
already holds). A bootstrap code's scopes are fixed when it is
|
|
1225
|
-
minted, so \`--code\` with \`--scopes\` is an error. Defaults
|
|
1226
|
-
stay least-privilege; \`insufficient_scope\` errors print the
|
|
1227
|
-
exact \`--scopes\` command to run.
|
|
1198
|
+
Save a deliberately narrower credential (comma- or
|
|
1199
|
+
space-separated). The list replaces the login-equivalent
|
|
1200
|
+
default. Instead of \`--code\`, the CLI mints the code itself
|
|
1201
|
+
with \`--token\`, else ${apiTokenEnvVar}, else the saved
|
|
1202
|
+
credential, then redeems and saves it. A child never exceeds
|
|
1203
|
+
its parent's scopes or expiry. \`--code\` with \`--scopes\` is
|
|
1204
|
+
an error.
|
|
1228
1205
|
|
|
1229
1206
|
auth setup-git
|
|
1230
1207
|
Install a Git credential helper for HTTPS clones/fetches/pushes
|
|
1231
1208
|
at \`https://kody.codes/@owner/name.git\` (see guide:auth_setup_git).
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
authorizes every repo you can access across all orgs \u2014 login
|
|
1237
|
-
\`--org\` only scopes the MCP mint session, not git. User-wide:
|
|
1238
|
-
one setup covers every org. Requires a server that advertises
|
|
1209
|
+
Never mints: uses the saved CLI credential (\`kody login\` or
|
|
1210
|
+
\`kody auth bootstrap\`), which must be user-owned and hold
|
|
1211
|
+
\`package:read\` and \`package:write\`. It authorizes every repo
|
|
1212
|
+
you can access across all orgs. Requires a server that advertises
|
|
1239
1213
|
\`org_binding\`. Configures a stable
|
|
1240
1214
|
\`credential.https://<host>.helper\` (global \`kody\` only when
|
|
1241
1215
|
its version supports \`git-credential\`, else
|
|
@@ -1249,18 +1223,16 @@ ${orgBlock}
|
|
|
1249
1223
|
Inverse of \`auth setup-git\`: removes every
|
|
1250
1224
|
\`credential.https://<host>.*\` helper entry setup-git may have
|
|
1251
1225
|
written (global and local; including stale \`~/.npm/_npx\` and
|
|
1252
|
-
major-only \`@1\` pins)
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
set up; prints what it removed. Leaves \`kody login\` sessions
|
|
1256
|
-
alone.
|
|
1226
|
+
major-only \`@1\` pins) and revokes any token an older CLI left
|
|
1227
|
+
in the old API-token slot. Idempotent when nothing is set up;
|
|
1228
|
+
prints what it removed. Leaves the saved credential alone.
|
|
1257
1229
|
|
|
1258
1230
|
git-credential
|
|
1259
1231
|
Git credential helper invoked by git after \`auth setup-git\`
|
|
1260
1232
|
(\`get\` returns username=x / password=kody_at_\u2026 for the Kody
|
|
1261
|
-
host
|
|
1262
|
-
|
|
1263
|
-
|
|
1233
|
+
host: ${apiTokenEnvVar} when set, else the saved CLI credential,
|
|
1234
|
+
refreshed like any command; never mints; \`store\`/\`erase\` are
|
|
1235
|
+
no-ops). Not meant for interactive
|
|
1264
1236
|
use.
|
|
1265
1237
|
|
|
1266
1238
|
api Call one Open API operation by operationId + flat --params
|
|
@@ -1314,16 +1286,10 @@ ${orgBlock}
|
|
|
1314
1286
|
--token / ${apiTokenEnvVar}
|
|
1315
1287
|
Scoped API token (preferred via env). One resolver picks the
|
|
1316
1288
|
credential, and \`kody whoami\` reports that pick:
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
\`kody login\` does not replace a stored API token; replace it
|
|
1322
|
-
with \`kody auth bootstrap --lifetime short --scopes <list>\`
|
|
1323
|
-
or clear it with \`kody logout\`.
|
|
1324
|
-
Prefer \`cliCredentialBootstrap\` then \`auth bootstrap\`
|
|
1325
|
-
(\`--lifetime short|long\`). CI/headless: \`tokenCreate\` with
|
|
1326
|
-
\`org:execute\` plus the capability scopes you need.
|
|
1289
|
+
every command: --token, ${apiTokenEnvVar}, then the saved CLI
|
|
1290
|
+
credential (\`kody login\` / \`kody auth bootstrap\`).
|
|
1291
|
+
CI/headless: \`tokenCreate\` with \`org:execute\` plus the
|
|
1292
|
+
capability scopes you need.
|
|
1327
1293
|
Profiles: \`tokenCreate\` with \`profile_id\`, or
|
|
1328
1294
|
\`profileHandoff\` for a new sub-profile, mints a token
|
|
1329
1295
|
that acts as that profile (not accepted by /mcp).
|
|
@@ -2170,7 +2136,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2170
2136
|
case "connect":
|
|
2171
2137
|
case "update": {
|
|
2172
2138
|
const apiUrl = earlyApiUrl;
|
|
2173
|
-
const { runExecutionContextCommand } = await import("./commands-
|
|
2139
|
+
const { runExecutionContextCommand } = await import("./commands-CX2FTGEB.js");
|
|
2174
2140
|
return await runExecutionContextCommand({
|
|
2175
2141
|
command: parsed.command,
|
|
2176
2142
|
positionals: parsed.positionals,
|
|
@@ -2204,7 +2170,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2204
2170
|
});
|
|
2205
2171
|
}
|
|
2206
2172
|
case "login": {
|
|
2207
|
-
const { login, loginWithDevice } = await import("./auth-
|
|
2173
|
+
const { login, loginWithDevice } = await import("./auth-I4XH63PZ.js");
|
|
2208
2174
|
const openBrowser = parsed.values["no-browser"] !== true;
|
|
2209
2175
|
const lifetimeOption = typeof parsed.values.lifetime === "string" ? {
|
|
2210
2176
|
lifetime: parsed.values.lifetime === "short" ? "short" : "long"
|
|
@@ -2287,8 +2253,8 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2287
2253
|
formatOrgListHuman,
|
|
2288
2254
|
formatOrgListJson,
|
|
2289
2255
|
useOrg
|
|
2290
|
-
} = await import("./org-
|
|
2291
|
-
const { listStoredOrgs: listStoredOrgs2 } = await import("./store-
|
|
2256
|
+
} = await import("./org-VKSU4YVE.js");
|
|
2257
|
+
const { listStoredOrgs: listStoredOrgs2 } = await import("./store-DGAP2AZS.js");
|
|
2292
2258
|
const action = parsed.positionals[0];
|
|
2293
2259
|
if (action === "list") {
|
|
2294
2260
|
const orgs = listStoredOrgs2(mcpUrl);
|
|
@@ -2395,8 +2361,9 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2395
2361
|
"Provide --code <kody_bc_\u2026> from cliCredentialBootstrap (MCP api tool), or --scopes <list> to mint one with the current kody login session or API token."
|
|
2396
2362
|
);
|
|
2397
2363
|
}
|
|
2364
|
+
const lifetimeGiven = typeof parsed.values.lifetime === "string" || typeof parsed.values["idle-ttl-seconds"] === "string" || typeof parsed.values["max-lifetime-seconds"] === "string";
|
|
2398
2365
|
const lifetime = resolveCliTokenLifetime({
|
|
2399
|
-
lifetime: typeof parsed.values.lifetime === "string" ? parsed.values.lifetime : void 0,
|
|
2366
|
+
lifetime: typeof parsed.values.lifetime === "string" ? parsed.values.lifetime : lifetimeGiven ? void 0 : "long",
|
|
2400
2367
|
idleTtlSeconds: parseCliLifetimeSecondsFlag(
|
|
2401
2368
|
typeof parsed.values["idle-ttl-seconds"] === "string" ? parsed.values["idle-ttl-seconds"] : void 0,
|
|
2402
2369
|
"--idle-ttl-seconds"
|
|
@@ -2418,6 +2385,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2418
2385
|
scopes,
|
|
2419
2386
|
lifetime,
|
|
2420
2387
|
apiUrl,
|
|
2388
|
+
mcpUrl,
|
|
2421
2389
|
mint: bootstrapMinter({
|
|
2422
2390
|
scopes,
|
|
2423
2391
|
lifetime,
|
|
@@ -2429,7 +2397,8 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2429
2397
|
}) : await authBootstrap({
|
|
2430
2398
|
code,
|
|
2431
2399
|
apiUrl,
|
|
2432
|
-
|
|
2400
|
+
mcpUrl,
|
|
2401
|
+
...!lifetimeGiven ? {} : lifetime.kind === "alias" ? { lifetime: lifetime.lifetime } : {
|
|
2433
2402
|
idleTtlSeconds: lifetime.idleTtlSeconds,
|
|
2434
2403
|
maxLifetimeSeconds: lifetime.maxLifetimeSeconds
|
|
2435
2404
|
}
|
|
@@ -2437,7 +2406,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2437
2406
|
const storedScopes = result.stored.scopes?.join(", ") || "(none)";
|
|
2438
2407
|
write(
|
|
2439
2408
|
[
|
|
2440
|
-
`
|
|
2409
|
+
`Saved as the CLI credential (the same slot \`kody login\` uses). Every command, including git, uses it.`,
|
|
2441
2410
|
`api: ${result.stored.apiUrl}`,
|
|
2442
2411
|
`token id: ${result.stored.tokenId}`,
|
|
2443
2412
|
`scopes: ${storedScopes}`,
|
|
@@ -2454,7 +2423,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2454
2423
|
parseGitCredentialAction,
|
|
2455
2424
|
parseGitCredentialInput,
|
|
2456
2425
|
readGitCredentialStdin
|
|
2457
|
-
} = await import("./git-credential-
|
|
2426
|
+
} = await import("./git-credential-JUIVYMJM.js");
|
|
2458
2427
|
const action = parseGitCredentialAction(parsed.positionals);
|
|
2459
2428
|
const raw = await readGitCredentialStdin(process.stdin);
|
|
2460
2429
|
const output = await handleGitCredential({
|
|
@@ -2479,7 +2448,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2479
2448
|
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
2480
2449
|
});
|
|
2481
2450
|
if (target === "mock") {
|
|
2482
|
-
const { ensureMockTarget } = await import("./mock-server-
|
|
2451
|
+
const { ensureMockTarget } = await import("./mock-server-IUHUKCGP.js");
|
|
2483
2452
|
const mock = await ensureMockTarget({
|
|
2484
2453
|
resetStorage: parsed.values["reset-storage"] === true,
|
|
2485
2454
|
...org ? { orgSlug: org } : {}
|
|
@@ -2514,7 +2483,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2514
2483
|
if (mock.started) await mock.server.close();
|
|
2515
2484
|
}
|
|
2516
2485
|
}
|
|
2517
|
-
const { runWhoami } = await import("./whoami-
|
|
2486
|
+
const { runWhoami } = await import("./whoami-3HCHZO2F.js");
|
|
2518
2487
|
return await runWhoami({
|
|
2519
2488
|
tokenValues,
|
|
2520
2489
|
mcpUrl,
|
|
@@ -2538,13 +2507,13 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2538
2507
|
let closeMock;
|
|
2539
2508
|
try {
|
|
2540
2509
|
if (target === "mock") {
|
|
2541
|
-
const { ensureMockTarget } = await import("./mock-server-
|
|
2510
|
+
const { ensureMockTarget } = await import("./mock-server-IUHUKCGP.js");
|
|
2542
2511
|
const mock = await ensureMockTarget({
|
|
2543
2512
|
resetStorage: parsed.values["reset-storage"] === true
|
|
2544
2513
|
});
|
|
2545
2514
|
apiUrl = mock.apiUrl;
|
|
2546
2515
|
closeMock = mock.started ? () => mock.server.close() : void 0;
|
|
2547
|
-
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-
|
|
2516
|
+
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-S26DL5MW.js");
|
|
2548
2517
|
const result2 = await searchWithApiToken2({
|
|
2549
2518
|
token: mock.token,
|
|
2550
2519
|
apiUrl,
|
|
@@ -2564,7 +2533,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2564
2533
|
...org ? { org } : {}
|
|
2565
2534
|
});
|
|
2566
2535
|
if (searchCredential?.token) {
|
|
2567
|
-
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-
|
|
2536
|
+
const { searchWithApiToken: searchWithApiToken2 } = await import("./open-api-client-S26DL5MW.js");
|
|
2568
2537
|
const result2 = await searchWithApiToken2({
|
|
2569
2538
|
token: searchCredential.token,
|
|
2570
2539
|
apiUrl,
|
|
@@ -2577,14 +2546,14 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2577
2546
|
write(formatToolResult(result2, json));
|
|
2578
2547
|
return result2.isError ? 1 : 0;
|
|
2579
2548
|
}
|
|
2580
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
2549
|
+
const { ensureOpenApiCredentials } = await import("./auth-I4XH63PZ.js");
|
|
2581
2550
|
const credentials = await ensureOpenApiCredentials({
|
|
2582
2551
|
mcpUrl,
|
|
2583
2552
|
org,
|
|
2584
2553
|
apiUrl
|
|
2585
2554
|
});
|
|
2586
2555
|
noteActiveLoginCredential({ login: credentials, purpose: "session" });
|
|
2587
|
-
const { searchWithApiToken } = await import("./open-api-client-
|
|
2556
|
+
const { searchWithApiToken } = await import("./open-api-client-S26DL5MW.js");
|
|
2588
2557
|
const result = await searchWithApiToken({
|
|
2589
2558
|
token: credentials.accessToken,
|
|
2590
2559
|
apiUrl,
|
|
@@ -2643,7 +2612,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2643
2612
|
(value) => typeof value === "string"
|
|
2644
2613
|
) : typeof parsed.values.credential === "string" ? [parsed.values.credential] : void 0
|
|
2645
2614
|
);
|
|
2646
|
-
const executeRouting = (await import("./remote-execute-
|
|
2615
|
+
const executeRouting = (await import("./remote-execute-WTORQH3E.js")).executeRoutingFromFlags(parsed.values);
|
|
2647
2616
|
if (executeRouting && local) {
|
|
2648
2617
|
writeErr(
|
|
2649
2618
|
"--context, --fallback, --requires, and --chain route cloud execute; drop --local.\n"
|
|
@@ -2690,7 +2659,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2690
2659
|
}
|
|
2691
2660
|
try {
|
|
2692
2661
|
if (target === "mock") {
|
|
2693
|
-
const { ensureMockTarget } = await import("./mock-server-
|
|
2662
|
+
const { ensureMockTarget } = await import("./mock-server-IUHUKCGP.js");
|
|
2694
2663
|
const mock = await ensureMockTarget({
|
|
2695
2664
|
resetStorage: parsed.values["reset-storage"] === true,
|
|
2696
2665
|
packageId: localPackageRun ? `local:${localPackageRun.kodyId}` : void 0,
|
|
@@ -2699,7 +2668,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2699
2668
|
apiUrl = mock.apiUrl;
|
|
2700
2669
|
mockToken = mock.token;
|
|
2701
2670
|
closeMock = mock.started ? () => mock.server.close() : void 0;
|
|
2702
|
-
const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-
|
|
2671
|
+
const { tryResolveMockDepResolve } = await import("./mock-dep-resolve-JA6IDQPE.js");
|
|
2703
2672
|
mockDepResolve = await tryResolveMockDepResolve({
|
|
2704
2673
|
tokenValues,
|
|
2705
2674
|
apiUrl: prodApiUrl,
|
|
@@ -2708,7 +2677,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2708
2677
|
});
|
|
2709
2678
|
}
|
|
2710
2679
|
if (localPackageRun) {
|
|
2711
|
-
const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-
|
|
2680
|
+
const { buildLocalPackageContext, runLocalPackageModule } = await import("./local-package-run-BUO3MVML.js");
|
|
2712
2681
|
const result2 = await runLocalPackageModule({
|
|
2713
2682
|
modulePath: localPackageRun.modulePath,
|
|
2714
2683
|
params: args.params,
|
|
@@ -2753,7 +2722,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2753
2722
|
packageRootForMocks = void 0;
|
|
2754
2723
|
}
|
|
2755
2724
|
}
|
|
2756
|
-
const result = local ? await (await import("./local-execute-
|
|
2725
|
+
const result = local ? await (await import("./local-execute-DY6HZ3KQ.js")).runLocalExecute({
|
|
2757
2726
|
code: args.code,
|
|
2758
2727
|
...modulePath !== void 0 ? { modulePath } : {},
|
|
2759
2728
|
params: args.params,
|
|
@@ -2775,7 +2744,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2775
2744
|
allowPrivateNetwork: parsed.values["allow-private-network"] === true,
|
|
2776
2745
|
onStatus: (message) => writeErr(`${message}
|
|
2777
2746
|
`)
|
|
2778
|
-
}) : cloudToken ? await (await import("./remote-execute-
|
|
2747
|
+
}) : cloudToken ? await (await import("./remote-execute-WTORQH3E.js")).runRemoteExecuteWithToken({
|
|
2779
2748
|
code: typeof args.code === "string" ? args.code : void 0,
|
|
2780
2749
|
params: args.params,
|
|
2781
2750
|
conversationId: args.conversationId,
|
|
@@ -2785,7 +2754,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2785
2754
|
apiUrl,
|
|
2786
2755
|
...org ? { org } : {}
|
|
2787
2756
|
}) : await (async () => {
|
|
2788
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
2757
|
+
const { ensureOpenApiCredentials } = await import("./auth-I4XH63PZ.js");
|
|
2789
2758
|
const session = await ensureOpenApiCredentials({
|
|
2790
2759
|
mcpUrl,
|
|
2791
2760
|
org,
|
|
@@ -2795,7 +2764,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2795
2764
|
login: session,
|
|
2796
2765
|
purpose: "session"
|
|
2797
2766
|
});
|
|
2798
|
-
return (await import("./remote-execute-
|
|
2767
|
+
return (await import("./remote-execute-WTORQH3E.js")).runRemoteExecuteWithToken({
|
|
2799
2768
|
code: typeof args.code === "string" ? args.code : void 0,
|
|
2800
2769
|
params: args.params,
|
|
2801
2770
|
conversationId: args.conversationId,
|
|
@@ -2810,7 +2779,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2810
2779
|
return result.isError ? 1 : 0;
|
|
2811
2780
|
} catch (error) {
|
|
2812
2781
|
if (json && local) {
|
|
2813
|
-
const { LocalPackageGraphError, packageGraphErrorToolResult } = await import("./local-package-graph-
|
|
2782
|
+
const { LocalPackageGraphError, packageGraphErrorToolResult } = await import("./local-package-graph-FMCN2OY4.js");
|
|
2814
2783
|
if (error instanceof LocalPackageGraphError) {
|
|
2815
2784
|
const redacted = redactError(error).message;
|
|
2816
2785
|
const result = packageGraphErrorToolResult(error);
|
|
@@ -2841,7 +2810,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2841
2810
|
runDevServe,
|
|
2842
2811
|
runDevWebhook,
|
|
2843
2812
|
tryAttachedDevFetch
|
|
2844
|
-
} = await import("./dev-command-
|
|
2813
|
+
} = await import("./dev-command-WOSJFXY7.js");
|
|
2845
2814
|
const target = resolveTarget({
|
|
2846
2815
|
command: "dev",
|
|
2847
2816
|
flag: typeof parsed.values.target === "string" ? parsed.values.target : void 0
|
|
@@ -2884,8 +2853,8 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
2884
2853
|
{ callOpenApiOperation, formatOpenApiHttpDebugLine },
|
|
2885
2854
|
{ parsePackageCheckResult, PublishChecksAuthError }
|
|
2886
2855
|
] = await Promise.all([
|
|
2887
|
-
import("./open-api-client-
|
|
2888
|
-
import("./dev-command-
|
|
2856
|
+
import("./open-api-client-S26DL5MW.js"),
|
|
2857
|
+
import("./dev-command-WOSJFXY7.js")
|
|
2889
2858
|
]);
|
|
2890
2859
|
let token2;
|
|
2891
2860
|
try {
|
|
@@ -3002,7 +2971,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3002
2971
|
purpose: "kody dev",
|
|
3003
2972
|
...org ? { org } : {}
|
|
3004
2973
|
}) : "mock";
|
|
3005
|
-
const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-
|
|
2974
|
+
const mockDepResolve = target === "mock" ? await (await import("./mock-dep-resolve-JA6IDQPE.js")).tryResolveMockDepResolve({
|
|
3006
2975
|
tokenValues,
|
|
3007
2976
|
apiUrl: prodApiUrl,
|
|
3008
2977
|
mcpUrl,
|
|
@@ -3135,7 +3104,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3135
3104
|
const apiUrl = apiUrlFrom({
|
|
3136
3105
|
apiUrl: typeof parsed.values["api-url"] === "string" ? parsed.values["api-url"] : void 0
|
|
3137
3106
|
});
|
|
3138
|
-
const local = await import("./local-secrets-
|
|
3107
|
+
const local = await import("./local-secrets-77VJOY4E.js");
|
|
3139
3108
|
const token = () => accessTokenForOpenApi({
|
|
3140
3109
|
tokenValues: tokenFlagValues(parsed.values),
|
|
3141
3110
|
apiUrl,
|
|
@@ -3210,7 +3179,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3210
3179
|
const params = parseApiParamsJson(
|
|
3211
3180
|
typeof parsed.values.params === "string" ? parsed.values.params : void 0
|
|
3212
3181
|
);
|
|
3213
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3182
|
+
const { callOpenApiOperation } = await import("./open-api-client-S26DL5MW.js");
|
|
3214
3183
|
const result = await callOpenApiOperation({
|
|
3215
3184
|
operationId,
|
|
3216
3185
|
params,
|
|
@@ -3245,7 +3214,7 @@ async function dispatch(parsed, write, writeErr, stdoutIsTTY) {
|
|
|
3245
3214
|
mcpUrl,
|
|
3246
3215
|
org
|
|
3247
3216
|
});
|
|
3248
|
-
const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-
|
|
3217
|
+
const { callOpenApiOperation: callOpenApiOperation2 } = await import("./open-api-client-S26DL5MW.js");
|
|
3249
3218
|
write(
|
|
3250
3219
|
await runPackageCollaboratorPlan({
|
|
3251
3220
|
plan,
|
|
@@ -3271,7 +3240,7 @@ ${packageCollaboratorUsage}`
|
|
|
3271
3240
|
positional: parsed.positionals[1],
|
|
3272
3241
|
paramsJson: typeof parsed.values.params === "string" ? parsed.values.params : void 0
|
|
3273
3242
|
});
|
|
3274
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3243
|
+
const { callOpenApiOperation } = await import("./open-api-client-S26DL5MW.js");
|
|
3275
3244
|
const publishToken = await accessTokenForOpenApi({
|
|
3276
3245
|
tokenValues,
|
|
3277
3246
|
apiUrl,
|
|
@@ -3443,55 +3412,30 @@ function attachExecuteCommonArgs(args, input) {
|
|
|
3443
3412
|
return args;
|
|
3444
3413
|
}
|
|
3445
3414
|
async function runAuthSetupGit(input) {
|
|
3446
|
-
const { authSetupGit
|
|
3415
|
+
const { authSetupGit } = await import("./setup-git-LSHM7DQM.js");
|
|
3447
3416
|
const apiUrl = apiUrlFrom({
|
|
3448
3417
|
apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
|
|
3449
3418
|
});
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
idleTtlSeconds: parseCliLifetimeSecondsFlag(
|
|
3456
|
-
typeof input.values["idle-ttl-seconds"] === "string" ? input.values["idle-ttl-seconds"] : void 0,
|
|
3457
|
-
"--idle-ttl-seconds"
|
|
3458
|
-
),
|
|
3459
|
-
maxLifetimeSeconds: parseCliLifetimeSecondsFlag(
|
|
3460
|
-
typeof input.values["max-lifetime-seconds"] === "string" ? input.values["max-lifetime-seconds"] : void 0,
|
|
3461
|
-
"--max-lifetime-seconds"
|
|
3462
|
-
)
|
|
3463
|
-
});
|
|
3419
|
+
if (typeof input.values.scopes === "string" || typeof input.values.lifetime === "string") {
|
|
3420
|
+
throw new Error(
|
|
3421
|
+
"auth setup-git no longer mints a token, so --scopes and --lifetime do not apply. It uses the saved CLI credential from `kody login` or `kody auth bootstrap`."
|
|
3422
|
+
);
|
|
3423
|
+
}
|
|
3464
3424
|
const tokenValues = tokenFlagValues(input.values);
|
|
3465
|
-
const mintScopes = scopes ?? setupGitDefaultScopes;
|
|
3466
|
-
const hasLoginSession = loadCredentials(input.mcpUrl, void 0, void 0, {
|
|
3467
|
-
org: input.org
|
|
3468
|
-
}) != null;
|
|
3469
3425
|
const result = await authSetupGit({
|
|
3470
3426
|
apiUrl,
|
|
3471
3427
|
mcpUrl: input.mcpUrl,
|
|
3472
|
-
token: tokenValues.token
|
|
3473
|
-
hasLoginSession,
|
|
3474
|
-
...scopes ? { scopesOverride: scopes } : {},
|
|
3475
|
-
lifetime,
|
|
3476
|
-
mint: bootstrapMinter({
|
|
3477
|
-
scopes: mintScopes,
|
|
3478
|
-
lifetime,
|
|
3479
|
-
mcpUrl: input.mcpUrl,
|
|
3480
|
-
apiUrl,
|
|
3481
|
-
tokenValues,
|
|
3482
|
-
...input.org ? { org: input.org } : {}
|
|
3483
|
-
})
|
|
3428
|
+
token: tokenValues.token
|
|
3484
3429
|
});
|
|
3485
3430
|
input.write(
|
|
3486
3431
|
[
|
|
3487
3432
|
`Git HTTPS credential helper installed for https://${result.host}/`,
|
|
3488
3433
|
`helper: ${result.helperCommand}`,
|
|
3489
|
-
`
|
|
3434
|
+
`credential: saved CLI credential ${result.tokenId} (org_binding=user)`,
|
|
3490
3435
|
`scopes: ${result.scopes.join(", ") || "(none)"}`,
|
|
3491
3436
|
`expires: ${result.expiresAt ?? "unknown"}`,
|
|
3492
|
-
result.backendKind === "file" && result.backendPath ? `OS keychain was unavailable; token saved at ${result.backendPath} (mode 0600).` : result.minted ? "Token stored in the OS keychain (or existing store)." : "Using the existing stored API token.",
|
|
3493
3437
|
"",
|
|
3494
|
-
"This user-owned
|
|
3438
|
+
"This user-owned credential authorizes every @owner/name.git you can access (all orgs).",
|
|
3495
3439
|
"Try: git clone https://kody.codes/@owner/name.git",
|
|
3496
3440
|
"Undo later: kody auth remove-git",
|
|
3497
3441
|
""
|
|
@@ -3500,7 +3444,7 @@ async function runAuthSetupGit(input) {
|
|
|
3500
3444
|
return 0;
|
|
3501
3445
|
}
|
|
3502
3446
|
async function runAuthRemoveGit(input) {
|
|
3503
|
-
const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-
|
|
3447
|
+
const { authRemoveGit, formatAuthRemoveGitReport } = await import("./setup-git-LSHM7DQM.js");
|
|
3504
3448
|
const apiUrl = apiUrlFrom({
|
|
3505
3449
|
apiUrl: typeof input.values["api-url"] === "string" ? input.values["api-url"] : void 0
|
|
3506
3450
|
});
|
|
@@ -3522,7 +3466,7 @@ function bootstrapMinter(input) {
|
|
|
3522
3466
|
});
|
|
3523
3467
|
if (minter?.token) {
|
|
3524
3468
|
const token = minter.token;
|
|
3525
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3469
|
+
const { callOpenApiOperation } = await import("./open-api-client-S26DL5MW.js");
|
|
3526
3470
|
try {
|
|
3527
3471
|
return await callOpenApiOperation({
|
|
3528
3472
|
token,
|
|
@@ -3541,13 +3485,13 @@ function bootstrapMinter(input) {
|
|
|
3541
3485
|
}
|
|
3542
3486
|
}
|
|
3543
3487
|
if (minter) {
|
|
3544
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
3488
|
+
const { ensureOpenApiCredentials } = await import("./auth-I4XH63PZ.js");
|
|
3545
3489
|
const session = await ensureOpenApiCredentials({
|
|
3546
3490
|
mcpUrl: input.mcpUrl,
|
|
3547
3491
|
apiUrl: input.apiUrl,
|
|
3548
3492
|
...input.org ? { org: input.org } : {}
|
|
3549
3493
|
});
|
|
3550
|
-
const { callOpenApiOperation } = await import("./open-api-client-
|
|
3494
|
+
const { callOpenApiOperation } = await import("./open-api-client-S26DL5MW.js");
|
|
3551
3495
|
return callOpenApiOperation({
|
|
3552
3496
|
operationId: cliCredentialBootstrapOperationId,
|
|
3553
3497
|
params,
|
|
@@ -3574,7 +3518,7 @@ async function accessTokenForOpenApi(input) {
|
|
|
3574
3518
|
...input.org ? { org: input.org } : {}
|
|
3575
3519
|
});
|
|
3576
3520
|
if (credential?.token) return credential.token;
|
|
3577
|
-
const { ensureOpenApiCredentials } = await import("./auth-
|
|
3521
|
+
const { ensureOpenApiCredentials } = await import("./auth-I4XH63PZ.js");
|
|
3578
3522
|
const session = await ensureOpenApiCredentials({
|
|
3579
3523
|
mcpUrl: input.mcpUrl,
|
|
3580
3524
|
apiUrl: input.apiUrl,
|
|
@@ -3639,11 +3583,7 @@ function supersedeStoredApiTokenAfterLogin(apiUrl, deps = {}) {
|
|
|
3639
3583
|
return envTokenNote;
|
|
3640
3584
|
}
|
|
3641
3585
|
if (!stored) return envTokenNote;
|
|
3642
|
-
const label =
|
|
3643
|
-
source: "stored-api-token",
|
|
3644
|
-
token: stored.token,
|
|
3645
|
-
stored
|
|
3646
|
-
});
|
|
3586
|
+
const label = `old stored API token ${stored.tokenId}`;
|
|
3647
3587
|
const scopes = stored.scopes?.join(", ") || "unknown";
|
|
3648
3588
|
let deleted = false;
|
|
3649
3589
|
try {
|
|
@@ -3652,10 +3592,10 @@ function supersedeStoredApiTokenAfterLogin(apiUrl, deps = {}) {
|
|
|
3652
3592
|
deleted = false;
|
|
3653
3593
|
}
|
|
3654
3594
|
if (!deleted) {
|
|
3655
|
-
return `${envTokenNote}
|
|
3595
|
+
return `${envTokenNote}Note: could not remove the ${label} (scopes: ${scopes}). It is ignored: every command, including git, uses this login.
|
|
3656
3596
|
`;
|
|
3657
3597
|
}
|
|
3658
|
-
return `${envTokenNote}Removed the ${label} (scopes: ${scopes});
|
|
3598
|
+
return `${envTokenNote}Removed the ${label} (scopes: ${scopes}); every command, including git, uses this login.
|
|
3659
3599
|
`;
|
|
3660
3600
|
}
|
|
3661
3601
|
|
|
@@ -3676,4 +3616,4 @@ export {
|
|
|
3676
3616
|
resolvePackagePublishTarget,
|
|
3677
3617
|
supersedeStoredApiTokenAfterLogin
|
|
3678
3618
|
};
|
|
3679
|
-
//# sourceMappingURL=chunk-
|
|
3619
|
+
//# sourceMappingURL=chunk-V3KIBQVH.js.map
|