skydive-cli 0.2.0-beta.587 → 0.2.0-beta.594
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/js/bin.mjs
CHANGED
|
@@ -20,7 +20,7 @@ import semver from "semver";
|
|
|
20
20
|
|
|
21
21
|
//#region package.json
|
|
22
22
|
var name = "skydive-cli";
|
|
23
|
-
var version = "0.2.0-beta.
|
|
23
|
+
var version = "0.2.0-beta.594";
|
|
24
24
|
|
|
25
25
|
//#endregion
|
|
26
26
|
//#region src/types.ts
|
|
@@ -1200,7 +1200,7 @@ const importCommand = {
|
|
|
1200
1200
|
process.exit(1);
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
const { runChat } = await import("./boot-
|
|
1203
|
+
const { runChat } = await import("./boot-C-sSzYb6.mjs");
|
|
1204
1204
|
await runChat({
|
|
1205
1205
|
appUrl,
|
|
1206
1206
|
sessionToken: session.value.sessionToken,
|
|
@@ -1511,7 +1511,7 @@ const chatCommand = {
|
|
|
1511
1511
|
printError(`Unknown theme "${themeId}". Valid themes: ${themes.map((t) => t.id).join(", ")}`);
|
|
1512
1512
|
process.exit(1);
|
|
1513
1513
|
}
|
|
1514
|
-
const { runChat } = await import("./boot-
|
|
1514
|
+
const { runChat } = await import("./boot-C-sSzYb6.mjs");
|
|
1515
1515
|
await runChat({
|
|
1516
1516
|
appUrl,
|
|
1517
1517
|
sessionToken: session.value.sessionToken,
|
|
@@ -1810,7 +1810,7 @@ const switchCommand = {
|
|
|
1810
1810
|
printError("The workspace picker needs the Bun runtime and it could not be set up automatically. Pass a workspace slug instead, or install Bun and retry.");
|
|
1811
1811
|
process.exit(1);
|
|
1812
1812
|
}
|
|
1813
|
-
const { runWorkspacePicker } = await import("./boot-
|
|
1813
|
+
const { runWorkspacePicker } = await import("./boot-C-sSzYb6.mjs");
|
|
1814
1814
|
await runWorkspacePicker(session);
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
@@ -5209,6 +5209,13 @@ const slashCommands = [
|
|
|
5209
5209
|
description: "copy the agent's last message to the clipboard",
|
|
5210
5210
|
action: { kind: "copy" }
|
|
5211
5211
|
},
|
|
5212
|
+
{
|
|
5213
|
+
name: "portal",
|
|
5214
|
+
aliases: ["local"],
|
|
5215
|
+
argsHint: null,
|
|
5216
|
+
description: "allow this agent to access your computer",
|
|
5217
|
+
action: { kind: "portal" }
|
|
5218
|
+
},
|
|
5212
5219
|
{
|
|
5213
5220
|
name: "help",
|
|
5214
5221
|
aliases: [],
|
|
@@ -8268,6 +8275,7 @@ function routeInput(raw) {
|
|
|
8268
8275
|
case "browser":
|
|
8269
8276
|
case "connect":
|
|
8270
8277
|
case "copy":
|
|
8278
|
+
case "portal":
|
|
8271
8279
|
case "help":
|
|
8272
8280
|
case "quit": return { kind: action.kind };
|
|
8273
8281
|
default: {
|
|
@@ -9446,6 +9454,48 @@ function ChatScreen({ agent, conversation }) {
|
|
|
9446
9454
|
setPortalPrompt(null);
|
|
9447
9455
|
useStore.getState().showToast({ message: "kept this machine private" });
|
|
9448
9456
|
}, [agent.id, setPortalPrompt]);
|
|
9457
|
+
const openPortalAccess = useCallback(() => {
|
|
9458
|
+
if (!portalClient) {
|
|
9459
|
+
useStore.getState().showToast({ message: "local access is unavailable in this session" });
|
|
9460
|
+
return;
|
|
9461
|
+
}
|
|
9462
|
+
switch (portal.status) {
|
|
9463
|
+
case "off":
|
|
9464
|
+
declinedRef.current.delete(agent.id);
|
|
9465
|
+
portalClient.enable();
|
|
9466
|
+
useStore.getState().showToast({ message: "enabling local access on this machine…" });
|
|
9467
|
+
break;
|
|
9468
|
+
case "connecting":
|
|
9469
|
+
useStore.getState().showToast({ message: "local access is still connecting…" });
|
|
9470
|
+
break;
|
|
9471
|
+
case "connected":
|
|
9472
|
+
if (portal.grantedAgentIds.includes(agent.id)) {
|
|
9473
|
+
useStore.getState().showToast({ message: `${agent.name} can already run commands on this machine` });
|
|
9474
|
+
break;
|
|
9475
|
+
}
|
|
9476
|
+
declinedRef.current.delete(agent.id);
|
|
9477
|
+
setPortalPrompt({
|
|
9478
|
+
agentId: agent.id,
|
|
9479
|
+
agentName: agent.name
|
|
9480
|
+
});
|
|
9481
|
+
break;
|
|
9482
|
+
case "error":
|
|
9483
|
+
useStore.getState().showToast({ message: portal.error ? `local access error: ${portal.error}` : "local access hit an error" });
|
|
9484
|
+
break;
|
|
9485
|
+
default: {
|
|
9486
|
+
const exhaustive = portal.status;
|
|
9487
|
+
throw new Error(`unhandled portal status: ${String(exhaustive)}`);
|
|
9488
|
+
}
|
|
9489
|
+
}
|
|
9490
|
+
}, [
|
|
9491
|
+
portalClient,
|
|
9492
|
+
portal.status,
|
|
9493
|
+
portal.grantedAgentIds,
|
|
9494
|
+
portal.error,
|
|
9495
|
+
agent.id,
|
|
9496
|
+
agent.name,
|
|
9497
|
+
setPortalPrompt
|
|
9498
|
+
]);
|
|
9449
9499
|
const executeLine = useCallback((content, staged) => {
|
|
9450
9500
|
if (!content && staged.length === 0) return;
|
|
9451
9501
|
const routed = routeInput(content);
|
|
@@ -9531,6 +9581,9 @@ function ChatScreen({ agent, conversation }) {
|
|
|
9531
9581
|
case "copy":
|
|
9532
9582
|
copyLastMessage();
|
|
9533
9583
|
break;
|
|
9584
|
+
case "portal":
|
|
9585
|
+
openPortalAccess();
|
|
9586
|
+
break;
|
|
9534
9587
|
case "connect":
|
|
9535
9588
|
if (!promptForCards()) useStore.getState().showToast({ message: "no connect card waiting for action" });
|
|
9536
9589
|
break;
|
|
@@ -9564,6 +9617,7 @@ function ChatScreen({ agent, conversation }) {
|
|
|
9564
9617
|
toggleShare,
|
|
9565
9618
|
openInBrowser,
|
|
9566
9619
|
copyLastMessage,
|
|
9620
|
+
openPortalAccess,
|
|
9567
9621
|
quit,
|
|
9568
9622
|
sendContent,
|
|
9569
9623
|
goTo,
|