skydive-cli 0.2.0-beta.421 → 0.2.0-beta.423
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/{api-CDTKq_5Q.mjs → api-DcGNxnLr.mjs} +1 -1
- package/dist/js/bin.mjs +15 -15
- package/dist/js/{boot-CQLDUeZ9.mjs → boot-BJeHUB6U.mjs} +81 -23
- package/dist/js/client-Blf9mdM0.mjs +6 -0
- package/dist/js/{client-B3ZhhF7e.mjs → client-CxOKgU7M.mjs} +1 -1
- package/dist/js/{print-B6AO13SA.mjs → print-CKEKn9wS.mjs} +2 -2
- package/dist/js/{print-DausK_KZ.mjs → print-CouegX9S.mjs} +1 -1
- package/dist/js/{print-share-D7OSxvE2.mjs → print-share-BS60u1H2.mjs} +1 -1
- package/dist/js/{rest-CamHVOce.mjs → rest-04eiQEA9.mjs} +6 -1
- package/dist/js/{rest-COkLEZOB.mjs → rest-CHW9mvHI.mjs} +1 -1
- package/package.json +1 -1
- package/dist/js/client-D6NAkL9e.mjs +0 -6
package/dist/js/bin.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { A as getShareMachineDefault, B as saveSession, C as DEFAULT_WEB_URL, D as getPromptHistoryPath, E as getLastSeenVersion, F as resolveConfig, H as setLastSeenVersion, I as resolveManagementAuth, L as resolveSession, M as getStoredApiKeyWorkspaceName, N as getUpdateCheckDisabled, P as resolveAppUrl, T as getConfigPath, _ as setActiveWorkspace, b as API_KEY_PREFIX, d as themes, g as listWorkspaces, h as getSessionIdentity, j as getStoredApiKeyId, m as getActiveWorkspaceId, p as ensureActiveOrganization, v as API_KEYS_URL, w as deleteConfig, x as DEFAULT_API_URL, y as API_KEY_FAMILY_PREFIX, z as saveConfig } from "./theme-CuQhvqzN.mjs";
|
|
3
3
|
import { n as printError, r as printTable, t as output } from "./output-B4cW10Ph.mjs";
|
|
4
|
-
import { n as createRestClient } from "./rest-
|
|
5
|
-
import { i as resolveAgent } from "./print-
|
|
6
|
-
import { a as registerPortalDevice, c as machineIdentity, n as findThisDevice, o as revokePortalAccess, r as grantPortalAccess, t as fetchPortalDevices } from "./api-
|
|
4
|
+
import { n as createRestClient } from "./rest-04eiQEA9.mjs";
|
|
5
|
+
import { i as resolveAgent } from "./print-CouegX9S.mjs";
|
|
6
|
+
import { a as registerPortalDevice, c as machineIdentity, n as findThisDevice, o as revokePortalAccess, r as grantPortalAccess, t as fetchPortalDevices } from "./api-DcGNxnLr.mjs";
|
|
7
7
|
import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
|
|
8
8
|
import { hideBin } from "yargs/helpers";
|
|
9
9
|
import yargs from "yargs";
|
|
@@ -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.423";
|
|
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-BJeHUB6U.mjs");
|
|
1204
1204
|
await runChat({
|
|
1205
1205
|
appUrl,
|
|
1206
1206
|
sessionToken: session.value.sessionToken,
|
|
@@ -1226,7 +1226,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1226
1226
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login --web\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1227
1227
|
process.exit(1);
|
|
1228
1228
|
}
|
|
1229
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1229
|
+
const { connectMachineShare } = await import("./print-share-BS60u1H2.mjs");
|
|
1230
1230
|
const machineShare = await connectMachineShare({
|
|
1231
1231
|
appUrl,
|
|
1232
1232
|
sessionToken: session.value.sessionToken,
|
|
@@ -1234,7 +1234,7 @@ async function runImportPrintMode({ argv, appUrl }) {
|
|
|
1234
1234
|
});
|
|
1235
1235
|
const extra = (argv.print ?? "").trim();
|
|
1236
1236
|
const prompt = buildImportSeedPrompt(process.cwd()) + (extra ? `\n\nAdditional instructions: ${extra}` : "");
|
|
1237
|
-
const { runPrint } = await import("./print-
|
|
1237
|
+
const { runPrint } = await import("./print-CKEKn9wS.mjs");
|
|
1238
1238
|
try {
|
|
1239
1239
|
const result = await runPrint({
|
|
1240
1240
|
appUrl,
|
|
@@ -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-BJeHUB6U.mjs");
|
|
1515
1515
|
await runChat({
|
|
1516
1516
|
appUrl,
|
|
1517
1517
|
sessionToken: session.value.sessionToken,
|
|
@@ -1539,7 +1539,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1539
1539
|
printError(`${session.error.message} For non-interactive use, run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1540
1540
|
process.exit(1);
|
|
1541
1541
|
}
|
|
1542
|
-
const { runPrint, readStdin } = await import("./print-
|
|
1542
|
+
const { runPrint, readStdin } = await import("./print-CKEKn9wS.mjs");
|
|
1543
1543
|
let prompt = (argv.print ?? "").trim();
|
|
1544
1544
|
if (!prompt) {
|
|
1545
1545
|
if (process.stdin.isTTY) {
|
|
@@ -1554,7 +1554,7 @@ async function runPrintMode({ argv, appUrl }) {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
let machineShare = null;
|
|
1556
1556
|
if (resolveShareMachine(argv)) {
|
|
1557
|
-
const { connectMachineShare } = await import("./print-share-
|
|
1557
|
+
const { connectMachineShare } = await import("./print-share-BS60u1H2.mjs");
|
|
1558
1558
|
machineShare = await connectMachineShare({
|
|
1559
1559
|
appUrl,
|
|
1560
1560
|
sessionToken: session.value.sessionToken,
|
|
@@ -1613,7 +1613,7 @@ const getCommand = {
|
|
|
1613
1613
|
printError(`${session.error.message} Run \`skydive auth login\` first, or set SKYDIVE_SESSION_TOKEN.`);
|
|
1614
1614
|
process.exit(1);
|
|
1615
1615
|
}
|
|
1616
|
-
const { messageGet } = await import("./print-
|
|
1616
|
+
const { messageGet } = await import("./print-CKEKn9wS.mjs");
|
|
1617
1617
|
try {
|
|
1618
1618
|
const result = await messageGet({
|
|
1619
1619
|
appUrl,
|
|
@@ -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-BJeHUB6U.mjs");
|
|
1814
1814
|
await runWorkspacePicker(session);
|
|
1815
1815
|
return;
|
|
1816
1816
|
}
|
|
@@ -1888,7 +1888,7 @@ const openCommand = {
|
|
|
1888
1888
|
const agent = argv.agent ? resolveAgent((await fetchPortalDevices(session)).agents, argv.agent) : null;
|
|
1889
1889
|
const cwd = argv.cwd ? path.resolve(argv.cwd) : process.cwd();
|
|
1890
1890
|
const { machineName } = machineIdentity();
|
|
1891
|
-
const { PortalClient } = await import("./client-
|
|
1891
|
+
const { PortalClient } = await import("./client-Blf9mdM0.mjs");
|
|
1892
1892
|
let lastLine = "";
|
|
1893
1893
|
let signalConnected;
|
|
1894
1894
|
const connected = new Promise((resolve) => {
|
|
@@ -2060,8 +2060,8 @@ const sandboxCommand = {
|
|
|
2060
2060
|
}).example("skydive sandbox --agent grace", "Live terminal (Ctrl-] detaches)").example("skydive sandbox --agent grace -- tail -n 50 /tmp/harness.log", "One-shot command (use `--` so its flags reach the sandbox)").example("skydive sandbox --agent grace -- sh -c 'ls /tmp | wc -l'", "Shell features go through an explicit `sh -c`"),
|
|
2061
2061
|
handler: async (argv) => {
|
|
2062
2062
|
const session = requireSession(argv);
|
|
2063
|
-
const { createRestClient } = await import("./rest-
|
|
2064
|
-
const { resolveAgent } = await import("./print-
|
|
2063
|
+
const { createRestClient } = await import("./rest-CHW9mvHI.mjs");
|
|
2064
|
+
const { resolveAgent } = await import("./print-CKEKn9wS.mjs");
|
|
2065
2065
|
const client = createRestClient({
|
|
2066
2066
|
appUrl: session.appUrl,
|
|
2067
2067
|
sessionToken: session.sessionToken
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { O as getReviewStateDir, R as resolveWebUrl, S as DEFAULT_APP_URL, T as getConfigPath, V as saveTheme, _ as setActiveWorkspace, a as noColorRequested, c as themeMode, f as themesForMode, g as listWorkspaces, i as monoTheme, k as getSavedTheme, l as themeModeFromColorFgBg, m as getActiveWorkspaceId, n as applyTheme, o as theme, r as findTheme, s as themeForMode, t as DEFAULT_THEME_ID, u as themeVersion, x as DEFAULT_API_URL } from "./theme-CuQhvqzN.mjs";
|
|
3
|
-
import { n as createRestClient, r as errorDetail, t as HttpError } from "./rest-
|
|
3
|
+
import { n as createRestClient, r as errorDetail, t as HttpError } from "./rest-04eiQEA9.mjs";
|
|
4
4
|
import { n as isRecord, t as errorMessage } from "./util-CeisaZVY.mjs";
|
|
5
|
-
import { c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams } from "./print-
|
|
6
|
-
import "./api-
|
|
5
|
+
import { c as cardActionErrorMessage, d as reconcileMaskedInput, f as resolveConnectUrl, i as resolveAgent, l as parseExternalOauthConnectParams, m as specKeyFor, p as parseConnectCard, s as MASK_CHAR, u as parseOauthConnectParams } from "./print-CouegX9S.mjs";
|
|
6
|
+
import "./api-DcGNxnLr.mjs";
|
|
7
7
|
import { t as SandboxStream } from "./client-CpEvH2Pq.mjs";
|
|
8
|
-
import { t as PortalClient } from "./client-
|
|
8
|
+
import { t as PortalClient } from "./client-CxOKgU7M.mjs";
|
|
9
9
|
import { t as runRawPtyPassthrough } from "./raw-pty-GAvxm2ol.mjs";
|
|
10
10
|
import * as os$1 from "node:os";
|
|
11
11
|
import { homedir, platform, release, tmpdir } from "node:os";
|
|
@@ -1564,9 +1564,10 @@ function ConversationPickerScreen({ agent }) {
|
|
|
1564
1564
|
const rest = useStore((s) => s.rest);
|
|
1565
1565
|
const goTo = useStore((s) => s.goTo);
|
|
1566
1566
|
const [showAutomated, setShowAutomated] = useState(false);
|
|
1567
|
+
const [showArchived, setShowArchived] = useState(false);
|
|
1567
1568
|
const [cache, setCache] = useState({});
|
|
1568
1569
|
const [state, setState] = useState({ kind: "loading" });
|
|
1569
|
-
const cacheKey = showAutomated ? "all" : "human"
|
|
1570
|
+
const cacheKey = `${showAutomated ? "all" : "human"}:${showArchived ? "with-archived" : "active"}`;
|
|
1570
1571
|
useEffect(() => {
|
|
1571
1572
|
if (!rest) return;
|
|
1572
1573
|
const cached = cache[cacheKey];
|
|
@@ -1585,6 +1586,7 @@ function ConversationPickerScreen({ agent }) {
|
|
|
1585
1586
|
const conversations = await rest.listConversations({
|
|
1586
1587
|
agentId: agent.id,
|
|
1587
1588
|
channels: showAutomated ? void 0 : humanChannels,
|
|
1589
|
+
archived: showArchived ? "include" : "exclude",
|
|
1588
1590
|
onPage: (partial) => {
|
|
1589
1591
|
if (!cancelled) setState({
|
|
1590
1592
|
kind: "ready",
|
|
@@ -1618,6 +1620,7 @@ function ConversationPickerScreen({ agent }) {
|
|
|
1618
1620
|
rest,
|
|
1619
1621
|
agent.id,
|
|
1620
1622
|
showAutomated,
|
|
1623
|
+
showArchived,
|
|
1621
1624
|
cacheKey,
|
|
1622
1625
|
cache
|
|
1623
1626
|
]);
|
|
@@ -1635,21 +1638,25 @@ function ConversationPickerScreen({ agent }) {
|
|
|
1635
1638
|
complete: state.complete,
|
|
1636
1639
|
showAutomated,
|
|
1637
1640
|
onToggleAutomated: () => setShowAutomated((shown) => !shown),
|
|
1641
|
+
showArchived,
|
|
1642
|
+
onToggleArchived: () => setShowArchived((shown) => !shown),
|
|
1638
1643
|
onPick: goTo
|
|
1639
1644
|
});
|
|
1640
1645
|
}
|
|
1641
|
-
function ConversationList({ agent, conversations, complete, showAutomated, onToggleAutomated, onPick }) {
|
|
1646
|
+
function ConversationList({ agent, conversations, complete, showAutomated, onToggleAutomated, showArchived, onToggleArchived, onPick }) {
|
|
1642
1647
|
const { width, height } = useTerminalDimensions();
|
|
1643
1648
|
const rest = useStore((s) => s.rest);
|
|
1644
1649
|
const [query, setQuery] = useState("");
|
|
1645
1650
|
const [highlight, setHighlight] = useState(0);
|
|
1646
1651
|
const [removedIds, setRemovedIds] = useState(/* @__PURE__ */ new Set());
|
|
1652
|
+
const [archiveOverrides, setArchiveOverrides] = useState(/* @__PURE__ */ new Map());
|
|
1647
1653
|
const [confirmId, setConfirmId] = useState(null);
|
|
1648
1654
|
const [error, setError] = useState(null);
|
|
1649
|
-
const
|
|
1655
|
+
const isArchived = (c) => archiveOverrides.get(c.id) ?? c.viewerArchivedAt != null;
|
|
1656
|
+
const list = conversations.filter((c) => !removedIds.has(c.id) && (showArchived || !isArchived(c)));
|
|
1650
1657
|
useEffect(() => {
|
|
1651
1658
|
setHighlight(0);
|
|
1652
|
-
}, [showAutomated]);
|
|
1659
|
+
}, [showAutomated, showArchived]);
|
|
1653
1660
|
const hits = fuzzyFilter(query, list, conversationKeys);
|
|
1654
1661
|
const rows = [{ kind: "new" }, ...hits.map((hit) => ({
|
|
1655
1662
|
kind: "conv",
|
|
@@ -1657,26 +1664,29 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
|
|
|
1657
1664
|
}))];
|
|
1658
1665
|
const innerWidth = Math.max(1, width - 2);
|
|
1659
1666
|
const rowWidth = Math.max(1, innerWidth - 2);
|
|
1667
|
+
const clamped = Math.min(highlight, Math.max(0, rows.length - 1));
|
|
1668
|
+
const highlightRow = rows[clamped];
|
|
1669
|
+
const highlightArchived = highlightRow?.kind === "conv" && isArchived(highlightRow.hit.item);
|
|
1660
1670
|
const confirmConv = confirmId !== null ? list.find((c) => c.id === confirmId) : void 0;
|
|
1661
1671
|
const status = confirmConv ? {
|
|
1662
1672
|
fg: theme.error,
|
|
1663
1673
|
text: truncate(`delete “${confirmConv.title ?? "(untitled)"}”? y/n`, innerWidth)
|
|
1664
1674
|
} : error ? {
|
|
1665
1675
|
fg: theme.error,
|
|
1666
|
-
text: truncate(
|
|
1676
|
+
text: truncate(error, innerWidth)
|
|
1667
1677
|
} : {
|
|
1668
1678
|
fg: theme.dim,
|
|
1669
1679
|
text: fitHintLine([
|
|
1670
1680
|
`${hits.length}/${list.length}${complete ? "" : " (loading…)"}`,
|
|
1671
|
-
|
|
1681
|
+
`ctrl+a ${highlightArchived ? "unarchive" : "archive"}`,
|
|
1682
|
+
"ctrl+d delete",
|
|
1672
1683
|
`tab ${showAutomated ? "hide" : "show"} agent runs`,
|
|
1684
|
+
`shift+tab ${showArchived ? "hide" : "show"} archived`,
|
|
1685
|
+
"esc back",
|
|
1673
1686
|
"↑/↓ move",
|
|
1674
|
-
"↵ open"
|
|
1675
|
-
"ctrl+d delete",
|
|
1676
|
-
"esc back"
|
|
1687
|
+
"↵ open"
|
|
1677
1688
|
], innerWidth)
|
|
1678
1689
|
};
|
|
1679
|
-
const clamped = Math.min(highlight, Math.max(0, rows.length - 1));
|
|
1680
1690
|
const visibleRows = Math.max(3, height - 6);
|
|
1681
1691
|
const start = windowStart(clamped, rows.length, visibleRows);
|
|
1682
1692
|
const windowed = rows.slice(start, start + visibleRows);
|
|
@@ -1696,18 +1706,50 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
|
|
|
1696
1706
|
conversation: row.hit.item
|
|
1697
1707
|
});
|
|
1698
1708
|
};
|
|
1699
|
-
|
|
1700
|
-
|
|
1709
|
+
/**
|
|
1710
|
+
* Optimistically drop a row, run `mutate`, and put the row back if it fails.
|
|
1711
|
+
* Delete only — archive keeps the row and flips its mark instead.
|
|
1712
|
+
*/
|
|
1713
|
+
const removeRow = (id, mutate, failure) => {
|
|
1701
1714
|
if (!list.some((c) => c.id === id)) return;
|
|
1702
|
-
setConfirmId(null);
|
|
1703
1715
|
setRemovedIds((prev) => new Set([...prev, id]));
|
|
1704
|
-
|
|
1716
|
+
mutate().catch((err) => {
|
|
1705
1717
|
setRemovedIds((prev) => {
|
|
1706
1718
|
const next = new Set(prev);
|
|
1707
1719
|
next.delete(id);
|
|
1708
1720
|
return next;
|
|
1709
1721
|
});
|
|
1710
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
1722
|
+
setError(`${failure}: ${err instanceof Error ? err.message : String(err)}`);
|
|
1723
|
+
});
|
|
1724
|
+
};
|
|
1725
|
+
const deleteConversation = (id) => {
|
|
1726
|
+
if (!rest) return;
|
|
1727
|
+
setConfirmId(null);
|
|
1728
|
+
removeRow(id, () => rest.deleteConversation({ conversationId: id }), "delete failed");
|
|
1729
|
+
};
|
|
1730
|
+
/**
|
|
1731
|
+
* Archive is per-user, private and reversible, so unlike delete it needs no
|
|
1732
|
+
* y/n confirm. `ctrl+a` toggles: on a row you already archived (only
|
|
1733
|
+
* reachable with archived rows shown) it restores instead — which is the
|
|
1734
|
+
* only in-TUI way back.
|
|
1735
|
+
*/
|
|
1736
|
+
const toggleArchived = (conversation) => {
|
|
1737
|
+
if (!rest) return;
|
|
1738
|
+
const id = conversation.id;
|
|
1739
|
+
const archived = !isArchived(conversation);
|
|
1740
|
+
const revert = archiveOverrides.get(id);
|
|
1741
|
+
setArchiveOverrides((prev) => new Map(prev).set(id, archived));
|
|
1742
|
+
rest.setConversationArchived({
|
|
1743
|
+
conversationId: id,
|
|
1744
|
+
archived
|
|
1745
|
+
}).catch((err) => {
|
|
1746
|
+
setArchiveOverrides((prev) => {
|
|
1747
|
+
const next = new Map(prev);
|
|
1748
|
+
if (revert === void 0) next.delete(id);
|
|
1749
|
+
else next.set(id, revert);
|
|
1750
|
+
return next;
|
|
1751
|
+
});
|
|
1752
|
+
setError(`${archived ? "archive" : "unarchive"} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1711
1753
|
});
|
|
1712
1754
|
};
|
|
1713
1755
|
useKeyboard((key) => {
|
|
@@ -1725,7 +1767,14 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
|
|
|
1725
1767
|
setError(null);
|
|
1726
1768
|
setConfirmId(row.hit.item.id);
|
|
1727
1769
|
}
|
|
1728
|
-
} else if (key.name === "
|
|
1770
|
+
} else if (key.name === "a" && key.ctrl) {
|
|
1771
|
+
const row = rows[clamped];
|
|
1772
|
+
if (row?.kind === "conv") {
|
|
1773
|
+
setError(null);
|
|
1774
|
+
toggleArchived(row.hit.item);
|
|
1775
|
+
}
|
|
1776
|
+
} else if (key.name === "tab" && key.shift) onToggleArchived();
|
|
1777
|
+
else if (key.name === "tab") onToggleAutomated();
|
|
1729
1778
|
else if (key.name === "return") {
|
|
1730
1779
|
const row = rows[clamped];
|
|
1731
1780
|
if (row) open(row);
|
|
@@ -1772,9 +1821,10 @@ function ConversationList({ agent, conversations, complete, showAutomated, onTog
|
|
|
1772
1821
|
fg,
|
|
1773
1822
|
children: [marker, truncate("+ new conversation", rowWidth)]
|
|
1774
1823
|
}, "new");
|
|
1775
|
-
const
|
|
1824
|
+
const archived = isArchived(row.hit.item);
|
|
1825
|
+
const { title, detail } = fitRowText(singleLine(row.hit.item.title ?? "(untitled)"), `${archived ? "archived · " : ""}${previewLine(row.hit.item)}`, rowWidth);
|
|
1776
1826
|
return /* @__PURE__ */ jsxs("text", {
|
|
1777
|
-
fg,
|
|
1827
|
+
fg: archived && !selected ? theme.dim : fg,
|
|
1778
1828
|
children: [
|
|
1779
1829
|
marker,
|
|
1780
1830
|
/* @__PURE__ */ jsx(FuzzyText, {
|
|
@@ -4382,14 +4432,22 @@ const keybindGroups = [
|
|
|
4382
4432
|
keys: "↵",
|
|
4383
4433
|
action: "open conversation"
|
|
4384
4434
|
},
|
|
4435
|
+
{
|
|
4436
|
+
keys: "ctrl+a",
|
|
4437
|
+
action: "archive conversation (hides it for you only; again to restore)"
|
|
4438
|
+
},
|
|
4385
4439
|
{
|
|
4386
4440
|
keys: "ctrl+d",
|
|
4387
|
-
action: "delete conversation (y/↵ confirm, n/esc keep)"
|
|
4441
|
+
action: "delete conversation for everyone (y/↵ confirm, n/esc keep)"
|
|
4388
4442
|
},
|
|
4389
4443
|
{
|
|
4390
4444
|
keys: "tab",
|
|
4391
4445
|
action: "show / hide the agent's own runs (schedules, webhooks, subagents)"
|
|
4392
4446
|
},
|
|
4447
|
+
{
|
|
4448
|
+
keys: "shift+tab",
|
|
4449
|
+
action: "show / hide the conversations you archived"
|
|
4450
|
+
},
|
|
4393
4451
|
{
|
|
4394
4452
|
keys: "esc",
|
|
4395
4453
|
action: "back to agent picker"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { t as errorMessage } from "./util-CeisaZVY.mjs";
|
|
3
|
-
import { c as machineIdentity, i as mintPortalDeviceToken, l as portalWsUrl, n as findThisDevice, r as grantPortalAccess, s as buildEnv, t as fetchPortalDevices } from "./api-
|
|
3
|
+
import { c as machineIdentity, i as mintPortalDeviceToken, l as portalWsUrl, n as findThisDevice, r as grantPortalAccess, s as buildEnv, t as fetchPortalDevices } from "./api-DcGNxnLr.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { spawn } from "node:child_process";
|
|
6
6
|
import { WebSocket } from "ws";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./rest-
|
|
3
|
-
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-
|
|
2
|
+
import "./rest-04eiQEA9.mjs";
|
|
3
|
+
import { a as runPrint, i as resolveAgent, n as messageGet, o as toPrintError, r as readStdin, t as collectRunText } from "./print-CouegX9S.mjs";
|
|
4
4
|
|
|
5
5
|
export { messageGet, readStdin, resolveAgent, runPrint };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as createRestClient, t as HttpError } from "./rest-
|
|
2
|
+
import { n as createRestClient, t as HttpError } from "./rest-04eiQEA9.mjs";
|
|
3
3
|
import { n as isRecord, t as errorMessage } from "./util-CeisaZVY.mjs";
|
|
4
4
|
import stableStringify from "safe-stable-stringify";
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ import { n as printError } from "./output-B4cW10Ph.mjs";
|
|
|
14
14
|
* the reply (and to --json).
|
|
15
15
|
*/
|
|
16
16
|
async function connectMachineShare({ appUrl, sessionToken, timeoutHint }) {
|
|
17
|
-
const { PortalClient } = await import("./client-
|
|
17
|
+
const { PortalClient } = await import("./client-Blf9mdM0.mjs");
|
|
18
18
|
let signalConnected;
|
|
19
19
|
const connected = new Promise((resolve) => {
|
|
20
20
|
signalConnected = resolve;
|
|
@@ -150,7 +150,7 @@ function createRestClient({ appUrl, sessionToken }) {
|
|
|
150
150
|
const { agent } = await post(`/api/v1/agents/${encodeURIComponent(agentId)}`, { model }, updateAgentResponseSchema, "PATCH");
|
|
151
151
|
return { model: agent.model ?? null };
|
|
152
152
|
},
|
|
153
|
-
listConversations: async ({ agentId, limit, channels, onPage }) => {
|
|
153
|
+
listConversations: async ({ agentId, limit, channels, archived, onPage }) => {
|
|
154
154
|
const all = [];
|
|
155
155
|
const maxConversations = limit ?? 5e3;
|
|
156
156
|
let cursor;
|
|
@@ -162,6 +162,7 @@ function createRestClient({ appUrl, sessionToken }) {
|
|
|
162
162
|
});
|
|
163
163
|
params.set("limit", String(Math.min(remaining, 100)));
|
|
164
164
|
if (cursor) params.set("cursor", cursor);
|
|
165
|
+
if (archived) params.set("archived", archived);
|
|
165
166
|
for (const channel of channels ?? []) params.append("channels", channel);
|
|
166
167
|
const page = await get(`/api/v1/conversations?${params.toString()}`, listConversationsResponseSchema);
|
|
167
168
|
all.push(...page.conversations);
|
|
@@ -225,6 +226,9 @@ function createRestClient({ appUrl, sessionToken }) {
|
|
|
225
226
|
deleteConversation: async ({ conversationId }) => {
|
|
226
227
|
await del(`/api/v1/conversations/${encodeURIComponent(conversationId)}`);
|
|
227
228
|
},
|
|
229
|
+
setConversationArchived: async ({ conversationId, archived }) => {
|
|
230
|
+
await post(`/api/v1/conversations/${encodeURIComponent(conversationId)}/archive`, { archived }, z.object({ archived: z.boolean() }));
|
|
231
|
+
},
|
|
228
232
|
sendMessage: async ({ clientSurface, ...input }) => post("/api/v1/chat/send", {
|
|
229
233
|
...input,
|
|
230
234
|
clientSurface
|
|
@@ -351,6 +355,7 @@ const conversationSummarySchema = z.object({
|
|
|
351
355
|
preview: z.string().nullable(),
|
|
352
356
|
channel: z.string().nullable(),
|
|
353
357
|
channelLabel: z.string().nullable(),
|
|
358
|
+
viewerArchivedAt: z.string().nullable().optional(),
|
|
354
359
|
agent: z.object({
|
|
355
360
|
id: z.string().uuid(),
|
|
356
361
|
name: z.string(),
|
package/package.json
CHANGED