@kodycodes/cli 3.27.3 → 3.28.0
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/{auth-4MJQCPHH.js → auth-W7H6R6G5.js} +3 -3
- package/dist/bin.js +4 -4
- package/dist/{chunk-AK7QC5Q6.js → chunk-HJMRMBFW.js} +7 -1
- package/dist/chunk-HJMRMBFW.js.map +6 -0
- package/dist/{chunk-AUY7E5W4.js → chunk-NHX6KT7Q.js} +2 -2
- package/dist/{chunk-6UYRLITC.js → chunk-QFDBRFG5.js} +2 -2
- package/dist/{chunk-JXUNYHCE.js → chunk-QXP526E7.js} +31 -30
- package/dist/chunk-QXP526E7.js.map +6 -0
- package/dist/{chunk-ZVKF65ZW.js → chunk-STHICAUI.js} +2 -2
- package/dist/{chunk-AAPTGBH2.js → chunk-V35GMVDB.js} +2 -2
- package/dist/cli.js +4 -4
- package/dist/{commands-KJ2LKZPN.js → commands-XRZICB4E.js} +57 -2
- package/dist/{commands-KJ2LKZPN.js.map → commands-XRZICB4E.js.map} +1 -1
- package/dist/{dev-command-MPBKGNZW.js → dev-command-7UJGTUZL.js} +3 -3
- package/dist/{git-credential-AYJBXNYA.js → git-credential-JJBJSSFJ.js} +4 -4
- package/dist/{local-package-run-PUB3K7FH.js → local-package-run-G7LQHXMJ.js} +3 -3
- package/dist/{mock-dep-resolve-YLYKZ64B.js → mock-dep-resolve-WD4PG7JB.js} +2 -2
- package/dist/{open-api-client-5BVEGHDF.js → open-api-client-TAWXGPDD.js} +2 -2
- package/dist/{remote-execute-NXD5ASKQ.js → remote-execute-HQRDC57G.js} +2 -2
- package/dist/{setup-git-DHJHWR2L.js → setup-git-L6KMU43V.js} +3 -3
- package/dist/{whoami-JXSVR7Y5.js → whoami-J5V52HIV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-AK7QC5Q6.js.map +0 -6
- package/dist/chunk-JXUNYHCE.js.map +0 -6
- /package/dist/{auth-4MJQCPHH.js.map → auth-W7H6R6G5.js.map} +0 -0
- /package/dist/{chunk-AUY7E5W4.js.map → chunk-NHX6KT7Q.js.map} +0 -0
- /package/dist/{chunk-6UYRLITC.js.map → chunk-QFDBRFG5.js.map} +0 -0
- /package/dist/{chunk-ZVKF65ZW.js.map → chunk-STHICAUI.js.map} +0 -0
- /package/dist/{chunk-AAPTGBH2.js.map → chunk-V35GMVDB.js.map} +0 -0
- /package/dist/{dev-command-MPBKGNZW.js.map → dev-command-7UJGTUZL.js.map} +0 -0
- /package/dist/{git-credential-AYJBXNYA.js.map → git-credential-JJBJSSFJ.js.map} +0 -0
- /package/dist/{local-package-run-PUB3K7FH.js.map → local-package-run-G7LQHXMJ.js.map} +0 -0
- /package/dist/{mock-dep-resolve-YLYKZ64B.js.map → mock-dep-resolve-WD4PG7JB.js.map} +0 -0
- /package/dist/{open-api-client-5BVEGHDF.js.map → open-api-client-TAWXGPDD.js.map} +0 -0
- /package/dist/{remote-execute-NXD5ASKQ.js.map → remote-execute-HQRDC57G.js.map} +0 -0
- /package/dist/{setup-git-DHJHWR2L.js.map → setup-git-L6KMU43V.js.map} +0 -0
- /package/dist/{whoami-JXSVR7Y5.js.map → whoami-J5V52HIV.js.map} +0 -0
|
@@ -4832,6 +4832,61 @@ Run \`kody daemon\` in a terminal, or fix that and run: kody daemon install --co
|
|
|
4832
4832
|
);
|
|
4833
4833
|
return 0;
|
|
4834
4834
|
}
|
|
4835
|
+
if (input.command === "context" && sub === "acknowledge") {
|
|
4836
|
+
const ref = rest[0];
|
|
4837
|
+
if (!ref) throw new Error("Usage: kody context acknowledge <name|ec id>");
|
|
4838
|
+
const token = await input.token();
|
|
4839
|
+
const id = encodeURIComponent(ref);
|
|
4840
|
+
const read = await apiJson({
|
|
4841
|
+
...base,
|
|
4842
|
+
token,
|
|
4843
|
+
method: "GET",
|
|
4844
|
+
path: `/v1/execution-contexts/${id}`
|
|
4845
|
+
});
|
|
4846
|
+
const context = read.context ?? {};
|
|
4847
|
+
const ack = context.acknowledgment;
|
|
4848
|
+
const name = context.name ?? ref;
|
|
4849
|
+
if (!ack?.required || !ack.fingerprint) {
|
|
4850
|
+
out(
|
|
4851
|
+
input,
|
|
4852
|
+
{ acknowledged: true, alreadyCurrent: true },
|
|
4853
|
+
`Nothing to acknowledge on ${name}: you operate it, are its login, or already acknowledged what it runs as.`
|
|
4854
|
+
);
|
|
4855
|
+
return 0;
|
|
4856
|
+
}
|
|
4857
|
+
const login = ack.login;
|
|
4858
|
+
const who = login?.handle ? `@${login.handle}` : "its owner";
|
|
4859
|
+
const runsAs = login?.kind === "profile" ? `the agent profile ${login.profileName ? `"${login.profileName}" ` : ""}of ${who}` : `the account ${who}`;
|
|
4860
|
+
const lines = [
|
|
4861
|
+
`${name} runs as ${runsAs}, on a machine operated by @${context.operator?.handle ?? "unknown"}.`,
|
|
4862
|
+
"Your runs use only your own Kody access, never the machine login's. Anyone with host access on the machine acts with its login.",
|
|
4863
|
+
ack.excessCount ? `Its login can do ${ack.excessCount} thing${ack.excessCount === 1 ? "" : "s"} you can't:` : "Its login has no access you lack.",
|
|
4864
|
+
...(ack.entries ?? []).map(
|
|
4865
|
+
(entry) => ` - ${entry.permission === "owner" ? "everything (an org Owner)" : entry.resource ? `${entry.permission} on ${entry.resource}` : entry.permission}`
|
|
4866
|
+
)
|
|
4867
|
+
];
|
|
4868
|
+
const confirm = input.service?.confirm ?? terminalConfirm();
|
|
4869
|
+
if (!confirm) {
|
|
4870
|
+
throw new Error(
|
|
4871
|
+
`Acknowledging needs you at a terminal: run \`kody context acknowledge ${ref}\` yourself, or choose Acknowledge on ${name}'s page in Kody.`
|
|
4872
|
+
);
|
|
4873
|
+
}
|
|
4874
|
+
input.write(`${lines.join("\n")}
|
|
4875
|
+
`);
|
|
4876
|
+
if (!await confirm(`Acknowledge what ${name} runs as?`, false)) {
|
|
4877
|
+
input.write("Not acknowledged; runs on it stay refused.\n");
|
|
4878
|
+
return 1;
|
|
4879
|
+
}
|
|
4880
|
+
const body = await apiJson({
|
|
4881
|
+
...base,
|
|
4882
|
+
token,
|
|
4883
|
+
method: "POST",
|
|
4884
|
+
path: `/v1/execution-contexts/${id}/acknowledge`,
|
|
4885
|
+
body: { fingerprint: ack.fingerprint }
|
|
4886
|
+
});
|
|
4887
|
+
out(input, body, `Acknowledged ${name}. Your runs can use it now.`);
|
|
4888
|
+
return 0;
|
|
4889
|
+
}
|
|
4835
4890
|
if (input.command === "context" && sub === "cancel-run") {
|
|
4836
4891
|
const [ref, runId] = rest;
|
|
4837
4892
|
if (!ref || !runId) {
|
|
@@ -5236,7 +5291,7 @@ Run \`kody daemon\` in a terminal, or fix that and run: kody daemon install --co
|
|
|
5236
5291
|
return stayStoppedExitCode;
|
|
5237
5292
|
}
|
|
5238
5293
|
throw new Error(
|
|
5239
|
-
"Usage: kody context register --name <name> [--org <slug>] | kody context list | kody context revoke <name> | kody context delete <name> | kody context cancel-run <name> <run id> | kody context policy [show | allow <path> [--mode ro|rw] | remove <path>] | kody context commands [status | on | off] [--context <name>] | kody chain show | add <name> | remove <name> | kody connect --name <name> | kody daemon [--context <ec id>] [--max-concurrent <n>] | kody daemon install | status | logs | restart | start | stop | uninstall | auto-update [on | off | status] | kody update"
|
|
5294
|
+
"Usage: kody context register --name <name> [--org <slug>] | kody context list | kody context revoke <name> | kody context delete <name> | kody context acknowledge <name> | kody context cancel-run <name> <run id> | kody context policy [show | allow <path> [--mode ro|rw] | remove <path>] | kody context commands [status | on | off] [--context <name>] | kody chain show | add <name> | remove <name> | kody connect --name <name> | kody daemon [--context <ec id>] [--max-concurrent <n>] | kody daemon install | status | logs | restart | start | stop | uninstall | auto-update [on | off | status] | kody update"
|
|
5240
5295
|
);
|
|
5241
5296
|
}
|
|
5242
5297
|
async function resolveContextId(input) {
|
|
@@ -5413,4 +5468,4 @@ export {
|
|
|
5413
5468
|
maxConcurrentRuns,
|
|
5414
5469
|
runExecutionContextCommand
|
|
5415
5470
|
};
|
|
5416
|
-
//# sourceMappingURL=commands-
|
|
5471
|
+
//# sourceMappingURL=commands-XRZICB4E.js.map
|