@symerian/symi 2.6.42 → 2.7.1
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/{acp-cli-CrEIx-c7.js → acp-cli-B2f0qBiM.js} +2 -2
- package/dist/{acp-cli-BLUeUUA5.js → acp-cli-D-9rzaOI.js} +2 -2
- package/dist/{agents-DDRDszOI.js → agents-Z8ruJPz2.js} +5 -5
- package/dist/{agents.config-BEVb1Pyx.js → agents.config-B9BZoM2m.js} +1 -1
- package/dist/{agents.config-BKCY6F2A.js → agents.config-C951ocyh.js} +1 -1
- package/dist/{audio-preflight-DD18zIZd.js → audio-preflight-HILy3i0m.js} +4 -4
- package/dist/{audit-DB9YkTVX.js → audit-BgdM9XZl.js} +2 -2
- package/dist/{audit-BjI_Yyr5.js → audit-xSagQWH8.js} +2 -2
- package/dist/{auth-choice-D2xXwBeN.js → auth-choice-BmYi6pBy.js} +2 -2
- package/dist/{auth-choice-BbzReh6k.js → auth-choice-D_VfXxhG.js} +2 -2
- package/dist/{banner-DqqRwplt.js → banner-Bucr6qZ5.js} +1 -1
- package/dist/{browser-cli-kDUw45Y0.js → browser-cli-Bc_JVdTj.js} +3 -3
- package/dist/{browser-cli-Ctn9do4z.js → browser-cli-Dr0yx7-7.js} +3 -3
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/{call-DwpGquzW.js → call-CX0cs106.js} +1 -1
- package/dist/{call-DKi-hnaF.js → call-DeCQ2DhS.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DQcpDVCx.js → channel-options-BMDryXHq.js} +1 -1
- package/dist/{channel-options-DcazVJQf.js → channel-options-z8-WeZyO.js} +1 -1
- package/dist/{channel-web-u5yMYO4j.js → channel-web-D_YxZAHT.js} +1 -1
- package/dist/{channels-cli-C3iJE8eg.js → channels-cli-397NgC51.js} +7 -7
- package/dist/{channels-cli-Bog4Kn3X.js → channels-cli-CV7_JUru.js} +7 -7
- package/dist/{chrome-BxwUEWrH.js → chrome-CiOKaTN-.js} +7 -7
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-eBtEEHLK.js → cli-4XU7pNlM.js} +4 -4
- package/dist/{cli-QybdZdE7.js → cli-Dq95udFO.js} +4 -4
- package/dist/{client-jI1oE0_k.js → client-B8xmq-Pw.js} +13 -1
- package/dist/{client-T3qcxXru.js → client-qUlxXXVJ.js} +13 -1
- package/dist/{command-registry-BWnZSpbL.js → command-registry-Cx9T7GYx.js} +10 -10
- package/dist/{completion-cli-BhJFXaVU.js → completion-cli-WlSuySPZ.js} +1 -1
- package/dist/{completion-cli-CUKm7Hb6.js → completion-cli-cyVjlhls.js} +2 -2
- package/dist/{config-cli-B796xZBe.js → config-cli-CMymzmrI.js} +1 -1
- package/dist/{config-cli-CjnQyv45.js → config-cli-EdmbBExA.js} +1 -1
- package/dist/{configure-D3wIQ0yI.js → configure-DRMAIBBf.js} +6 -6
- package/dist/{configure-DUqT7Dyn.js → configure-DkFujfiY.js} +6 -6
- package/dist/control-ui/css/style.css +165 -0
- package/dist/control-ui/js/app.js +39 -0
- package/dist/control-ui/js/gateway.js +2 -0
- package/dist/control-ui/js/history.js +220 -85
- package/dist/control-ui/js/settings.js +71 -8
- package/dist/{cron-cli-DCpsXkrw.js → cron-cli-BHxfvWeT.js} +3 -3
- package/dist/{cron-cli-QCTdVZuP.js → cron-cli-DacyI1Pw.js} +3 -3
- package/dist/{daemon-cli-DSDcmWOi.js → daemon-cli-BLhFbih0.js} +2 -2
- package/dist/{daemon-cli-DhJYEAoL.js → daemon-cli-BxKtiouf.js} +2 -2
- package/dist/daemon-cli.js +12 -0
- package/dist/{deliver-DtuY4Wgl.js → deliver-D6IcPfbt.js} +1 -1
- package/dist/{devices-cli-BNG-fvdl.js → devices-cli-1kiO08aL.js} +2 -2
- package/dist/{devices-cli-x3jIP4Ih.js → devices-cli-B8Q8AzbX.js} +2 -2
- package/dist/{doctor-completion-DBE1IVKj.js → doctor-completion-BDzhB9pE.js} +1 -1
- package/dist/{doctor-completion-D3oUNFQM.js → doctor-completion-CfeROjIz.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-CmndFjEA.js → exec-approvals-cli-BRx2oxs5.js} +4 -4
- package/dist/{exec-approvals-cli-BSgxsdMt.js → exec-approvals-cli-Cj6Z-vxL.js} +4 -4
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-BguO9yV4.js → gateway-cli-C-G0QrTd.js} +185 -81
- package/dist/{gateway-cli-Dc1RT_b9.js → gateway-cli-Cpn7JyAw.js} +185 -81
- package/dist/{gateway-rpc-BMdVa3QV.js → gateway-rpc-BWTK7g8B.js} +1 -1
- package/dist/{gateway-rpc-5fREQe9Q.js → gateway-rpc-WM-HXUbl.js} +1 -1
- package/dist/{glass-ui-ws-DoIZyE9O.js → glass-ui-ws-BI81Lh6Z.js} +32 -13
- package/dist/{glass-ui-ws-D0UYleBF.js → glass-ui-ws-jAbqZVc9.js} +32 -13
- package/dist/{health-D3w4YMlC.js → health-B1nih5LD.js} +2 -2
- package/dist/{health-cVvZdeDu.js → health-CsTxt66a.js} +2 -2
- package/dist/{hooks-cli-te5hzOAB.js → hooks-cli-BhxMFkKe.js} +5 -5
- package/dist/{hooks-cli-DZIbjfOA.js → hooks-cli-CIlvtt2M.js} +5 -5
- package/dist/{image-lp19FlzF.js → image-D7Fl08gG.js} +1 -1
- package/dist/index.js +9 -9
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{logs-cli-DtlrLf7u.js → logs-cli-BZV7dq_U.js} +3 -3
- package/dist/{logs-cli-CfGj-dOg.js → logs-cli-DyCcDkRs.js} +3 -3
- package/dist/{models-BCfPhQ4m.js → models-DhMe2rzL.js} +3 -3
- package/dist/{models-cli-BFAtjNIF.js → models-cli-DKM5sCQM.js} +5 -5
- package/dist/{models-cli-Cj2CwbPw.js → models-cli-Dewg24W2.js} +6 -6
- package/dist/{node-cli-DnfDOh1d.js → node-cli-4eMRkmrw.js} +1 -1
- package/dist/{node-cli-eHn9-YfJ.js → node-cli-Dfs0UmnJ.js} +1 -1
- package/dist/{nodes-cli-Ct4M7JOe.js → nodes-cli-BKb61OjH.js} +3 -3
- package/dist/{nodes-cli-Ci3oxw8k.js → nodes-cli-DxfP9DIz.js} +3 -3
- package/dist/{onboard-BMq8qc1m.js → onboard-Dw_nX2RD.js} +3 -3
- package/dist/{onboard-channels-B5wgcffj.js → onboard-channels-8ynJSZL6.js} +1 -1
- package/dist/{onboard-channels-CiOun4k1.js → onboard-channels-ChxtmhFY.js} +1 -1
- package/dist/{onboard-helpers-DFvWPFhU.js → onboard-helpers-CueJ7O_B.js} +1 -1
- package/dist/{onboard-helpers-BBtPmJEe.js → onboard-helpers-PpGrZIGw.js} +1 -1
- package/dist/{onboard-remote-BURDxwoE.js → onboard-remote-Cd9kIiSG.js} +1 -1
- package/dist/{onboard-remote-D-B4EiOE.js → onboard-remote-DCdpB2HH.js} +1 -1
- package/dist/{onboard-skills-BDCzVjxb.js → onboard-skills-CC2CV5Er.js} +1 -1
- package/dist/{onboard-skills-CbzgBT1W.js → onboard-skills-DRICcBwa.js} +1 -1
- package/dist/{onboard-VcdBF5TB.js → onboard-yrgbC1mu.js} +3 -3
- package/dist/{onboarding-Dp7p6zKa.js → onboarding-BJcYsOFw.js} +7 -7
- package/dist/{onboarding-CGNpTyg2.js → onboarding-e-RSXpUi.js} +7 -7
- package/dist/{onboarding.finalize-B6DOu8vp.js → onboarding.finalize-CKNdiZEZ.js} +9 -9
- package/dist/{onboarding.finalize-CrsE5P43.js → onboarding.finalize-DenYTWUu.js} +10 -10
- package/dist/{onboarding.gateway-config-DKwJ5bWd.js → onboarding.gateway-config-DTWQ-Bqq.js} +3 -3
- package/dist/{onboarding.gateway-config-B9zGPfCl.js → onboarding.gateway-config-Dj68bVBt.js} +3 -3
- package/dist/{pi-embedded-DQe8vBwU.js → pi-embedded-BzS693I1.js} +72 -21
- package/dist/{pi-embedded-helpers-Dij3O6ox.js → pi-embedded-helpers-DXAoe1Bx.js} +4 -4
- package/dist/{plugin-registry-BzIbwU3K.js → plugin-registry-Bzz7mUyl.js} +1 -1
- package/dist/{plugin-registry-D3TUplW8.js → plugin-registry-SUa2FFIj.js} +1 -1
- package/dist/plugin-sdk/{channel-web-B6m8UOCl.js → channel-web-DRabhx1e.js} +1 -1
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +13 -2
- package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +11 -0
- package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +4 -1
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{reply-CGoJQT_s.js → reply-Cw3shPk2.js} +58 -7
- package/dist/plugin-sdk/{web-CJjSOTnI.js → web-CH43nBP0.js} +2 -2
- package/dist/{plugins-cli-BD1Jb2Ml.js → plugins-cli-DwtoU3xk.js} +5 -5
- package/dist/{plugins-cli-DFyRjAtJ.js → plugins-cli-qG50__1A.js} +5 -5
- package/dist/{program-context-45vPEw2G.js → program-context-CZwy-bh6.js} +29 -29
- package/dist/{program-qGm2M9PG.js → program-mZOVTSdQ.js} +10 -10
- package/dist/{prompt-select-styled-DRIS9jSv.js → prompt-select-styled-BZnuv8jI.js} +6 -6
- package/dist/{prompt-select-styled-DRraJGwA.js → prompt-select-styled-CtNg5KGU.js} +6 -6
- package/dist/{provider-auth-helpers-BNOWsjW5.js → provider-auth-helpers-CEYCb2mJ.js} +1 -1
- package/dist/{provider-auth-helpers-BREVjR7R.js → provider-auth-helpers-D60nbSLq.js} +1 -1
- package/dist/{push-apns-CYC70eKy.js → push-apns-B5txhDVi.js} +1 -1
- package/dist/{push-apns-CObVeJLC.js → push-apns-CoG1P_P0.js} +1 -1
- package/dist/{pw-ai-BO5cSmwD.js → pw-ai-CANiWpMA.js} +1 -1
- package/dist/{register.agent-DzzY8jON.js → register.agent-BY_Df_Me.js} +9 -9
- package/dist/{register.agent-DRrHvYcz.js → register.agent-CopGIf9e.js} +8 -8
- package/dist/{register.configure-DlXkwkNR.js → register.configure-Bu_XKu7Z.js} +11 -11
- package/dist/{register.configure-BxtTIFTa.js → register.configure-CoYQhQBT.js} +11 -11
- package/dist/{register.maintenance-LEf8Q_5p.js → register.maintenance-BtqQ3hDN.js} +11 -11
- package/dist/{register.maintenance-CXLXouZV.js → register.maintenance-VqCqhB7y.js} +10 -10
- package/dist/{register.message-DsPa-xHV.js → register.message-DZCCEK01.js} +5 -5
- package/dist/{register.message-C4ifV9vG.js → register.message-dd1xYBZT.js} +5 -5
- package/dist/{register.onboard-CrY4PxLP.js → register.onboard-B6EL1d-C.js} +7 -7
- package/dist/{register.onboard-DLRPa_4B.js → register.onboard-lzwHKufI.js} +7 -7
- package/dist/{register.setup-fBG_dJfi.js → register.setup-BJsr5_qp.js} +7 -7
- package/dist/{register.setup-By37g1vN.js → register.setup-D_b_HW5D.js} +7 -7
- package/dist/{register.status-health-sessions-DG7KGnD0.js → register.status-health-sessions-Dvj4mlom.js} +7 -7
- package/dist/{register.status-health-sessions-Ckw86-gn.js → register.status-health-sessions-jeiqtgl7.js} +7 -7
- package/dist/{register.subclis-C_xKLugM.js → register.subclis-DdPRkz29.js} +20 -20
- package/dist/{reply-DyjXROKp.js → reply-XaXqDK9F.js} +49 -10
- package/dist/{rpc-Co5PQ3IJ.js → rpc-N1nf_c1A.js} +1 -1
- package/dist/{rpc-D0FiEinj.js → rpc-QHo-8pCM.js} +1 -1
- package/dist/{run-main-Cg3ecTbO.js → run-main-MhL-xG3_.js} +17 -17
- package/dist/{runner-Ct0suQrd.js → runner-BS9gGL5i.js} +1 -1
- package/dist/{security-cli-D5BWzqEJ.js → security-cli-B-4J6enu.js} +3 -3
- package/dist/{security-cli-CG1uSlRK.js → security-cli-CSMUEGPK.js} +3 -3
- package/dist/{server-methods-CWcLut3F.js → server-methods-0ksPFnev.js} +471 -88
- package/dist/{server-methods-CW8eFTGD.js → server-methods-Bu1RjLe6.js} +471 -88
- package/dist/{server-node-events-C2h9OPo7.js → server-node-events-DCbzFyQF.js} +5 -5
- package/dist/{server-node-events-CDB0u8PP.js → server-node-events-DZAN3hWE.js} +5 -5
- package/dist/{status-B2Qt-5kL.js → status-CiHkFbIh.js} +1 -1
- package/dist/{status-ZPW5EACm.js → status-DOTlXdcN.js} +5 -5
- package/dist/{status-CMx3GAax.js → status-IWqSLXLR.js} +1 -1
- package/dist/{status-DfPfMVNZ.js → status-qkmUAeWo.js} +5 -5
- package/dist/{subagent-registry-DQHg3jUV.js → subagent-registry-DCoU9xIE.js} +49 -10
- package/dist/{system-cli-DFZNGx0i.js → system-cli-DY7ov1OT.js} +3 -3
- package/dist/{system-cli-Z7uzO8qd.js → system-cli-LFURKpwS.js} +3 -3
- package/dist/{tui-DjPsMdL6.js → tui-BH7JwqvB.js} +2 -2
- package/dist/{tui-DrATGNms.js → tui-C_5HG495.js} +2 -2
- package/dist/{tui-cli-D19-MCXt.js → tui-cli-B65PKZMj.js} +3 -3
- package/dist/{tui-cli-pWD_NrUR.js → tui-cli-CJnfmuxq.js} +3 -3
- package/dist/{unified-runner-DvOFqcrw.js → unified-runner-CApgXtVC.js} +58 -7
- package/dist/{update-cli-Df9rh_aN.js → update-cli-Bi6iMCXr.js} +11 -11
- package/dist/{update-cli-DBasZeVl.js → update-cli-BjQ3o9gQ.js} +12 -12
- package/dist/{update-runner-DVa6cMqp.js → update-runner-BhVsdpxm.js} +1 -1
- package/dist/{update-runner-BRKFzAwV.js → update-runner-FhW6n-Nv.js} +1 -1
- package/dist/{web-Dd05xbUr.js → web-ConlA_Ch.js} +4 -4
- package/dist/{web-Cw3bFAiP.js → web-CthDLVSz.js} +1 -1
- package/dist/{web-CGh5tw__.js → web-Db_-ahjX.js} +6 -6
- package/dist/{web-KiuDkd0x.js → web-Dpb_tv_j.js} +5 -5
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/learning-loop/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/outlook/package.json +1 -1
- package/extensions/pipeline/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/skills/long-task/scripts/detach-task.sh +91 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
2
2
|
import { r as resolveCliName } from "./command-format-COaS-S7B.js";
|
|
3
3
|
import { t as note } from "./note-DQ9BvHF2.js";
|
|
4
|
-
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-
|
|
4
|
+
import { a as resolveCompletionCachePath, i as isCompletionInstalled, o as resolveShellFromEnv, r as installCompletion, s as usesSlowDynamicCompletion, t as completionCacheExists } from "./completion-cli-WlSuySPZ.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { spawnSync } from "node:child_process";
|
|
7
7
|
|
package/dist/entry.js
CHANGED
|
@@ -2500,7 +2500,7 @@ if (!ensureExperimentalWarningSuppressed()) {
|
|
|
2500
2500
|
applyCliProfileEnv({ profile: parsed.profile });
|
|
2501
2501
|
process$1.argv = parsed.argv;
|
|
2502
2502
|
}
|
|
2503
|
-
import("./run-main-
|
|
2503
|
+
import("./run-main-MhL-xG3_.js").then(({ runCli }) => runCli(process$1.argv)).catch((error) => {
|
|
2504
2504
|
console.error("[symi] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
|
|
2505
2505
|
process$1.exitCode = 1;
|
|
2506
2506
|
});
|
|
@@ -5,20 +5,20 @@ import "./agent-scope-D-jRCY0d.js";
|
|
|
5
5
|
import "./github-copilot-token-DuFIqfeC.js";
|
|
6
6
|
import "./manifest-registry-Czr39pxG.js";
|
|
7
7
|
import "./config-BNTB6qj8.js";
|
|
8
|
-
import "./client-
|
|
9
|
-
import "./call-
|
|
8
|
+
import "./client-qUlxXXVJ.js";
|
|
9
|
+
import "./call-DeCQ2DhS.js";
|
|
10
10
|
import "./message-channel-C9dERklz.js";
|
|
11
11
|
import "./pairing-token-Byh6drgn.js";
|
|
12
12
|
import { n as formatTimeAgo } from "./format-relative-DX-rh76l.js";
|
|
13
13
|
import { c as readExecApprovalsSnapshot, p as saveExecApprovals } from "./exec-approvals-BhFq_Iv9.js";
|
|
14
14
|
import { t as formatDocsLink } from "./links-DlWpl9Yv.js";
|
|
15
15
|
import "./progress-BAHiAaDW.js";
|
|
16
|
-
import { n as callGatewayFromCli } from "./gateway-rpc-
|
|
16
|
+
import { n as callGatewayFromCli } from "./gateway-rpc-BWTK7g8B.js";
|
|
17
17
|
import "./systemd-DlMdyFDY.js";
|
|
18
18
|
import "./service-Cm9j9WzQ.js";
|
|
19
19
|
import { t as renderTable } from "./table-D01d2GuY.js";
|
|
20
20
|
import { t as describeUnknownError } from "./shared-BtG9rny3.js";
|
|
21
|
-
import { i as resolveNodeId, r as nodesCallOpts } from "./rpc-
|
|
21
|
+
import { i as resolveNodeId, r as nodesCallOpts } from "./rpc-QHo-8pCM.js";
|
|
22
22
|
import JSON5 from "json5";
|
|
23
23
|
import fs from "node:fs/promises";
|
|
24
24
|
|
|
@@ -11,19 +11,19 @@ import "./env-DPCHYPeH.js";
|
|
|
11
11
|
import "./message-channel-aT-I_DTX.js";
|
|
12
12
|
import "./config-Dz95lSBW.js";
|
|
13
13
|
import "./manifest-registry-C4BxOMWX.js";
|
|
14
|
-
import "./client-
|
|
15
|
-
import "./call-
|
|
14
|
+
import "./client-B8xmq-Pw.js";
|
|
15
|
+
import "./call-CX0cs106.js";
|
|
16
16
|
import "./pairing-token-CX3NN_qj.js";
|
|
17
17
|
import { n as formatTimeAgo } from "./format-relative-BXoxEQVN.js";
|
|
18
18
|
import { t as formatDocsLink } from "./links-3i1eUga4.js";
|
|
19
19
|
import "./progress-jIePzvGA.js";
|
|
20
20
|
import { c as readExecApprovalsSnapshot, p as saveExecApprovals } from "./exec-approvals-DXM2pQYL.js";
|
|
21
|
-
import { n as callGatewayFromCli } from "./gateway-rpc-
|
|
21
|
+
import { n as callGatewayFromCli } from "./gateway-rpc-WM-HXUbl.js";
|
|
22
22
|
import "./systemd-DT6SbCim.js";
|
|
23
23
|
import "./service-osK70kTZ.js";
|
|
24
24
|
import { t as renderTable } from "./table-BKlH0YlA.js";
|
|
25
25
|
import { t as describeUnknownError } from "./shared-DnmJ0ABB.js";
|
|
26
|
-
import { i as resolveNodeId, r as nodesCallOpts } from "./rpc-
|
|
26
|
+
import { i as resolveNodeId, r as nodesCallOpts } from "./rpc-N1nf_c1A.js";
|
|
27
27
|
import JSON5 from "json5";
|
|
28
28
|
import fs from "node:fs/promises";
|
|
29
29
|
|
package/dist/extensionAPI.js
CHANGED
|
@@ -7,13 +7,13 @@ import { a as resolveAgentIdentity } from "./reply-prefix-K_J_nfgx.js";
|
|
|
7
7
|
import "./github-copilot-token-BbsJ0Qbo.js";
|
|
8
8
|
import "./env-CQ_DQOwT.js";
|
|
9
9
|
import "./tokens-Cn6drXx2.js";
|
|
10
|
-
import { D as resolveAgentTimeoutMs, p as runEmbeddedPiAgent } from "./pi-embedded-
|
|
10
|
+
import { D as resolveAgentTimeoutMs, p as runEmbeddedPiAgent } from "./pi-embedded-BzS693I1.js";
|
|
11
11
|
import "./plugins-71oIavrF.js";
|
|
12
12
|
import "./accounts-DDEyGwby.js";
|
|
13
13
|
import "./bindings-DYVakimr.js";
|
|
14
14
|
import "./send-BzKHnf3b.js";
|
|
15
15
|
import "./send-RfIXG6-I.js";
|
|
16
|
-
import "./deliver-
|
|
16
|
+
import "./deliver-D6IcPfbt.js";
|
|
17
17
|
import "./diagnostic-D0xmLpej.js";
|
|
18
18
|
import "./diagnostic-session-state-C1vRJs5w.js";
|
|
19
19
|
import "./accounts-8zZqL37v.js";
|
|
@@ -21,10 +21,10 @@ import "./send-B986asZ7.js";
|
|
|
21
21
|
import "./image-ops-ByaQt43P.js";
|
|
22
22
|
import "./pi-model-discovery-j5tVLINv.js";
|
|
23
23
|
import "./message-channel-BQINJQIT.js";
|
|
24
|
-
import { G as saveSessionStore, H as loadSessionStore } from "./pi-embedded-helpers-
|
|
24
|
+
import { G as saveSessionStore, H as loadSessionStore } from "./pi-embedded-helpers-DXAoe1Bx.js";
|
|
25
25
|
import "./config-BUTI-mUZ.js";
|
|
26
26
|
import "./manifest-registry-D-mTF1cj.js";
|
|
27
|
-
import "./chrome-
|
|
27
|
+
import "./chrome-CiOKaTN-.js";
|
|
28
28
|
import "./skills-BNpGMnp-.js";
|
|
29
29
|
import "./redact-1NGYV_8p.js";
|
|
30
30
|
import "./errors-CPfngF0S.js";
|
|
@@ -34,7 +34,7 @@ import "./thinking-W85Rb32m.js";
|
|
|
34
34
|
import "./accounts-DImOt9jX.js";
|
|
35
35
|
import { n as resolveSessionFilePath, s as resolveStorePath } from "./paths-DkMamAQ-.js";
|
|
36
36
|
import "./tool-images-ChC2CXaN.js";
|
|
37
|
-
import "./image-
|
|
37
|
+
import "./image-D7Fl08gG.js";
|
|
38
38
|
import "./manager-CgLdpXXM.js";
|
|
39
39
|
import "./gemini-auth-ClVyOv9p.js";
|
|
40
40
|
import "./sqlite-BNh23mUR.js";
|
|
@@ -47,7 +47,7 @@ import "./ir-F0moAwIl.js";
|
|
|
47
47
|
import "./render-B1VqYyvo.js";
|
|
48
48
|
import "./commands-registry-DYoNKo_h.js";
|
|
49
49
|
import "./skill-commands-D8RiKDh0.js";
|
|
50
|
-
import "./runner-
|
|
50
|
+
import "./runner-BS9gGL5i.js";
|
|
51
51
|
import "./fetch-DtLn7YU3.js";
|
|
52
52
|
import "./channel-activity-D9q-fIPB.js";
|
|
53
53
|
import "./tables-COnZ169v.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as expandHomePrefix, g as resolveStateDir, i as isNixMode, l as resolveGatewayLockDir, o as resolveConfigPath, r as STATE_DIR, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-Cqn-zk3M.js";
|
|
2
2
|
import { B as theme, E as truncateUtf16Safe, H as getLogger, P as setVerbose, R as colorize, S as shortenHomePath, U as getResolvedLoggerSettings, V as getChildLogger, c as ensureDir, t as CONFIG_DIR, y as resolveUserPath, z as isRich } from "./utils-B-0b9bGM.js";
|
|
3
3
|
import { d as supportsXHighThinking, l as normalizeVerboseLevel, s as normalizeThinkLevel } from "./thinking-EAliFiVK.js";
|
|
4
|
-
import { $ as buildDeliveryFromLegacyPayload, A as emitGatewayRestart, An as initSubagentRegistry, Ar as extractImageContentFromSource, B as summarizeRestartSentinel, Bn as registerAgentRunContext, Ct as requestBodyErrorToText, Dr as DEFAULT_INPUT_MAX_REDIRECTS, E as resetDirectoryCache, Er as DEFAULT_INPUT_IMAGE_MIMES, Et as agentCommand, F as setPreRestartDeferralCheck, Fn as readLatestAssistantReply, Gt as getCliSessionId, I as consumeRestartSentinel, In as clearAgentRunContext, J as normalizeOptionalSessionKey, K as inferLegacyName, Kt as setCliSessionId, Ln as emitAgentEvent, Lt as createDefaultDeps, M as markGatewaySigusr1RestartHandled, Mr as resolveInputFileLimits, Mt as resolveOutboundTarget, Nt as resolveSessionDeliveryTarget, O as consumeGatewaySigusr1RestartAuthorization, On as countActiveDescendantRuns, Or as DEFAULT_INPUT_TIMEOUT_MS, P as setGatewaySigusr1RestartPolicy, Pn as runSubagentAnnounceFlow, Pr as resolveAgentTimeoutMs, Pt as createOutboundSendDeps, Q as migrateLegacyCronPayload, R as formatRestartSentinelMessage, Rn as getAgentRunContext, St as readJsonBodyWithLimit, Tr as DEFAULT_INPUT_IMAGE_MAX_BYTES, Tt as sleepWithAbort, U as normalizeHttpWebhookUrl, Ut as resolveModelProfile, Vt as getActiveEmbeddedRunCount, Wt as runWithModelFallback, X as normalizePayloadToSystemText, Xt as resolveAgentAvatar, Y as normalizeOptionalText, Z as normalizeRequiredName, _ as loadCombinedSessionStoreForGateway, ar as setCommandLaneConcurrency, cn as buildHistoryContextFromEntries, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, d as createSymiTools, en as buildSafeExternalPrompt, et as hasLegacyDeliveryHints, f as resolveAnnounceTargetFromKey, fr as stripHeartbeatToken, ft as loadSymiPlugins, g as listSessionsFromStore, hn as getTotalPendingReplies, i as resolveCronStyleNow, ir as resetAllLanes, j as isGatewaySigusr1RestartExternallyAllowed, jn as listDescendantRunsForRequester, jr as normalizeMimeList, k as deferGatewayRestartUntilIdle, kn as countActiveRunsForSession, kr as extractFileContentFromSource, l as applyToolPolicyPipeline, nn as getHookType, or as waitForActiveTasks, pr as lookupContextTokens, q as normalizeOptionalAgentId, qt as runCliAgent, rn as isExternalHookSession, rr as getTotalQueueSize, sr as CommandLane, st as requestHeartbeatNow, tn as detectSuspiciousPatterns, tr as getActiveTaskCount, tt as stripLegacyDeliveryFields, u as buildDefaultToolPolicyPipelineSteps, ut as getPluginToolMeta, v as loadSessionEntry, w as resolveOutboundSessionRoute, wt as computeBackoff, xr as enqueueSystemEvent, xt as handleSlackHttpRequest, zn as onAgentEvent, zt as runAgentTurn } from "./reply-
|
|
4
|
+
import { $ as buildDeliveryFromLegacyPayload, A as emitGatewayRestart, An as initSubagentRegistry, Ar as extractImageContentFromSource, B as summarizeRestartSentinel, Bn as registerAgentRunContext, Ct as requestBodyErrorToText, Dr as DEFAULT_INPUT_MAX_REDIRECTS, E as resetDirectoryCache, Er as DEFAULT_INPUT_IMAGE_MIMES, Et as agentCommand, F as setPreRestartDeferralCheck, Fn as readLatestAssistantReply, Gt as getCliSessionId, I as consumeRestartSentinel, In as clearAgentRunContext, J as normalizeOptionalSessionKey, K as inferLegacyName, Kt as setCliSessionId, Ln as emitAgentEvent, Lt as createDefaultDeps, M as markGatewaySigusr1RestartHandled, Mr as resolveInputFileLimits, Mt as resolveOutboundTarget, Nt as resolveSessionDeliveryTarget, O as consumeGatewaySigusr1RestartAuthorization, On as countActiveDescendantRuns, Or as DEFAULT_INPUT_TIMEOUT_MS, P as setGatewaySigusr1RestartPolicy, Pn as runSubagentAnnounceFlow, Pr as resolveAgentTimeoutMs, Pt as createOutboundSendDeps, Q as migrateLegacyCronPayload, R as formatRestartSentinelMessage, Rn as getAgentRunContext, St as readJsonBodyWithLimit, Tr as DEFAULT_INPUT_IMAGE_MAX_BYTES, Tt as sleepWithAbort, U as normalizeHttpWebhookUrl, Ut as resolveModelProfile, Vt as getActiveEmbeddedRunCount, Wt as runWithModelFallback, X as normalizePayloadToSystemText, Xt as resolveAgentAvatar, Y as normalizeOptionalText, Z as normalizeRequiredName, _ as loadCombinedSessionStoreForGateway, ar as setCommandLaneConcurrency, cn as buildHistoryContextFromEntries, cr as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, d as createSymiTools, en as buildSafeExternalPrompt, et as hasLegacyDeliveryHints, f as resolveAnnounceTargetFromKey, fr as stripHeartbeatToken, ft as loadSymiPlugins, g as listSessionsFromStore, hn as getTotalPendingReplies, i as resolveCronStyleNow, ir as resetAllLanes, j as isGatewaySigusr1RestartExternallyAllowed, jn as listDescendantRunsForRequester, jr as normalizeMimeList, k as deferGatewayRestartUntilIdle, kn as countActiveRunsForSession, kr as extractFileContentFromSource, l as applyToolPolicyPipeline, nn as getHookType, or as waitForActiveTasks, pr as lookupContextTokens, q as normalizeOptionalAgentId, qt as runCliAgent, rn as isExternalHookSession, rr as getTotalQueueSize, sr as CommandLane, st as requestHeartbeatNow, tn as detectSuspiciousPatterns, tr as getActiveTaskCount, tt as stripLegacyDeliveryFields, u as buildDefaultToolPolicyPipelineSteps, ut as getPluginToolMeta, v as loadSessionEntry, w as resolveOutboundSessionRoute, wt as computeBackoff, xr as enqueueSystemEvent, xt as handleSlackHttpRequest, zn as onAgentEvent, zt as runAgentTurn } from "./reply-XaXqDK9F.js";
|
|
5
5
|
import { S as parseAgentSessionKey, c as normalizeMainKey, f as toAgentRequestSessionKey, l as resolveAgentIdFromSessionKey, m as DEFAULT_ACCOUNT_ID, p as toAgentStoreSessionKey, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, x as isSubagentSessionKey, y as isCronRunSessionKey } from "./session-key-DCt45XZa.js";
|
|
6
6
|
import { r as matchesSkillFilter, t as resolveSymiPackageRoot } from "./symi-root-CrGJbkzf.js";
|
|
7
7
|
import { C as createInternalHookEvent, S as clearInternalHooks, T as triggerInternalHook, m as createEmptyPluginRegistry, r as DEFAULT_CHAT_CHANNEL, w as registerInternalHook } from "./registry-Cja8eT7G.js";
|
|
@@ -78,8 +78,8 @@ import "./ir-DZam9q5M.js";
|
|
|
78
78
|
import "./render-CXDO_kgw.js";
|
|
79
79
|
import { r as isRestartEnabled } from "./commands-BNLCWX6e.js";
|
|
80
80
|
import "./commands-registry-BT0-zzs3.js";
|
|
81
|
-
import { $t as
|
|
82
|
-
import { f as loadGatewayTlsRuntime$1, n as callGateway } from "./call-
|
|
81
|
+
import { $t as deriveDeviceIdFromPublicKey, Bt as ensureDeviceToken, Ft as errorShape, Gt as requestDevicePairing, Nt as PROTOCOL_VERSION, Pt as ErrorCodes, R as validateExecApprovalRequestParams, Rt as buildDeviceAuthPayload, Vt as getPairedDevice, Xt as verifyDeviceToken, Yt as updatePairedDeviceMetadata, Zt as roleScopesAllow, at as validateRequestFrame, n as formatValidationErrors, nn as verifyDeviceSignature, tn as normalizeDevicePublicKeyBase64Url, w as validateConnectParams, z as validateExecApprovalResolveParams, zt as approveDevicePairing } from "./client-B8xmq-Pw.js";
|
|
82
|
+
import { f as loadGatewayTlsRuntime$1, n as callGateway } from "./call-CX0cs106.js";
|
|
83
83
|
import "./pairing-token-CX3NN_qj.js";
|
|
84
84
|
import "./channel-activity-BOiuJS3t.js";
|
|
85
85
|
import "./fetch-DTNGXEzX.js";
|
|
@@ -100,7 +100,7 @@ import { c as hasNonzeroUsage, s as deriveSessionTotalTokens } from "./session-c
|
|
|
100
100
|
import "./outbound-attachment-Bw-c5Cdp.js";
|
|
101
101
|
import "./delivery-queue-CAxX6nGq.js";
|
|
102
102
|
import "./send-9SapUCg7.js";
|
|
103
|
-
import { C as normalizeControlUiBasePath, S as buildControlUiAvatarUrl, c as handleReset, w as resolveAssistantAvatarUrl, x as CONTROL_UI_AVATAR_PREFIX } from "./onboard-helpers-
|
|
103
|
+
import { C as normalizeControlUiBasePath, S as buildControlUiAvatarUrl, c as handleReset, w as resolveAssistantAvatarUrl, x as CONTROL_UI_AVATAR_PREFIX } from "./onboard-helpers-CueJ7O_B.js";
|
|
104
104
|
import "./prompt-style-CnkMpSXt.js";
|
|
105
105
|
import "./pairing-labels-DyXoD1DS.js";
|
|
106
106
|
import { n as formatTokenCount, r as formatUsd } from "./usage-format-BgUx3Bm4.js";
|
|
@@ -129,27 +129,27 @@ import "./service-osK70kTZ.js";
|
|
|
129
129
|
import "./lifecycle-core-C4HzGXA1.js";
|
|
130
130
|
import "./systemd-hints-xYZbFny_.js";
|
|
131
131
|
import { t as parsePort$1 } from "./parse-port-DnJYkByg.js";
|
|
132
|
-
import { n as addGatewayServiceCommands } from "./daemon-cli-
|
|
132
|
+
import { n as addGatewayServiceCommands } from "./daemon-cli-BLhFbih0.js";
|
|
133
133
|
import "./diagnostics-BRwihzJG.js";
|
|
134
134
|
import "./table-BKlH0YlA.js";
|
|
135
135
|
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-CyVOLgNE.js";
|
|
136
136
|
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-DnmJ0ABB.js";
|
|
137
|
-
import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-
|
|
137
|
+
import { c as probeGateway, s as resolveNodeCommandAllowlist } from "./audit-BgdM9XZl.js";
|
|
138
138
|
import { t as discoverGatewayBeacons } from "./bonjour-discovery-DUQ6tE92.js";
|
|
139
|
-
import { r as pickGatewaySelfPresence } from "./status-
|
|
140
|
-
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-
|
|
139
|
+
import { r as pickGatewaySelfPresence } from "./status-DOTlXdcN.js";
|
|
140
|
+
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, t as formatHealthChannelLines } from "./health-B1nih5LD.js";
|
|
141
141
|
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-B7moDVHX.js";
|
|
142
142
|
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-7EzEjSzb.js";
|
|
143
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
144
|
-
import { _ as
|
|
145
|
-
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-
|
|
143
|
+
import { t as runOnboardingWizard } from "./onboarding-e-RSXpUi.js";
|
|
144
|
+
import { C as startGatewayConfigReloader, S as resolveCronRunLogPath, _ as MAX_PAYLOAD_BYTES, a as loadFavoritesSet, b as abortChatRunById, c as resolveAssistantIdentity, d as formatError, f as loadVoiceWakeConfig, g as MAX_BUFFERED_BYTES, h as HEALTH_REFRESH_INTERVAL_MS, i as safeParseJson, l as listSystemPresence, m as DEDUPE_TTL_MS, n as handleGatewayRequest, o as reconcileFavorites, p as DEDUPE_MAX, r as broadcastPresenceSnapshot, s as DEFAULT_ASSISTANT_IDENTITY, t as coreGatewayHandlers, u as upsertPresence, v as TICK_INTERVAL_MS, x as appendCronRunLog, y as getHandshakeTimeoutMs } from "./server-methods-Bu1RjLe6.js";
|
|
145
|
+
import { d as shouldLogWs, f as summarizeAgentEventForWsLog, l as formatForLog, p as setGatewayWsLogStyle, u as logWs } from "./push-apns-CoG1P_P0.js";
|
|
146
146
|
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-Dq6vwkWW.js";
|
|
147
|
-
import "./agents.config-
|
|
147
|
+
import "./agents.config-B9BZoM2m.js";
|
|
148
148
|
import "./dm-policy-shared-DlDAGtZL.js";
|
|
149
149
|
import "./node-service-CD47Qpf1.js";
|
|
150
150
|
import "./status.update-CG0ciGaf.js";
|
|
151
151
|
import "./skills-install-CWVdJkLn.js";
|
|
152
|
-
import "./update-runner-
|
|
152
|
+
import "./update-runner-FhW6n-Nv.js";
|
|
153
153
|
import { t as resolveAgentSessionDirs } from "./session-dirs-Dgz7kkUM.js";
|
|
154
154
|
import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-B4H-2N8y.js";
|
|
155
155
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -5598,6 +5598,9 @@ const BASE_METHODS = [
|
|
|
5598
5598
|
"sessions.patch",
|
|
5599
5599
|
"sessions.reset",
|
|
5600
5600
|
"sessions.restore",
|
|
5601
|
+
"sessions.adoptFile",
|
|
5602
|
+
"sessions.favoriteFile",
|
|
5603
|
+
"sessions.deleteFile",
|
|
5601
5604
|
"sessions.delete",
|
|
5602
5605
|
"sessions.compact",
|
|
5603
5606
|
"last-heartbeat",
|
|
@@ -7385,15 +7388,30 @@ function serveFile(res, filePath) {
|
|
|
7385
7388
|
res.end(fs.readFileSync(filePath));
|
|
7386
7389
|
}
|
|
7387
7390
|
/** Cache-bust token: changes every time the gateway process starts. */
|
|
7388
|
-
const
|
|
7391
|
+
const CACHE_BUST_VERSION = `${Date.now()}`;
|
|
7392
|
+
/**
|
|
7393
|
+
* Matches `<script src="..."` or `<link ... href="..."` (or single-quoted),
|
|
7394
|
+
* capturing: (1) the tag + attr lead-in, (2) the opening quote, (3) the URL,
|
|
7395
|
+
* (4) the closing quote (back-reference to ensure quotes match). The URL
|
|
7396
|
+
* capture is non-greedy and restricted to `.js`, `.mjs`, or `.css` so unrelated
|
|
7397
|
+
* links (fonts, favicons, `type="module"` without src, etc.) are left alone.
|
|
7398
|
+
*
|
|
7399
|
+
* Tag matching is loose (`[^>]*`) so attribute order and optional attributes
|
|
7400
|
+
* like `type="module"` or `rel="stylesheet preload"` don't break the match.
|
|
7401
|
+
*/
|
|
7402
|
+
const CACHE_BUST_TAG_RE = /(<(?:script|link)\b[^>]*?\b(?:src|href)\s*=\s*)(["'])([^"'>]+?\.(?:mjs|js|css)(?:\?[^"'>]*)?)(\2)/gi;
|
|
7403
|
+
function injectCacheBust(html, version = CACHE_BUST_VERSION) {
|
|
7404
|
+
return html.replace(CACHE_BUST_TAG_RE, (match, lead, open, url, close) => {
|
|
7405
|
+
if (/^(https?:)?\/\//i.test(url)) return match;
|
|
7406
|
+
if (/[?&]v=/.test(url)) return match;
|
|
7407
|
+
return `${lead}${open}${url}${url.includes("?") ? "&" : "?"}v=${version}${close}`;
|
|
7408
|
+
});
|
|
7409
|
+
}
|
|
7389
7410
|
function serveIndexHtml(res, indexPath) {
|
|
7390
7411
|
res.setHeader("Content-Type", "text/html; charset=utf-8");
|
|
7391
7412
|
res.setHeader("Cache-Control", "no-cache");
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
return `${before}${url}${url.includes("?") ? "&" : "?"}${CACHE_BUST}${after}`;
|
|
7395
|
-
});
|
|
7396
|
-
res.end(html);
|
|
7413
|
+
const html = fs.readFileSync(indexPath, "utf8");
|
|
7414
|
+
res.end(injectCacheBust(html));
|
|
7397
7415
|
}
|
|
7398
7416
|
function isSafeRelativePath(relPath) {
|
|
7399
7417
|
if (!relPath) return false;
|
|
@@ -8847,22 +8865,25 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
8847
8865
|
/**
|
|
8848
8866
|
* HTTP API for session history — serves the Glass UI History drawer.
|
|
8849
8867
|
*
|
|
8850
|
-
* GET /api/sessions
|
|
8851
|
-
*
|
|
8868
|
+
* GET /api/sessions?currentKey=<sessionKey>
|
|
8869
|
+
* List all sessions (live + archived) with metadata. Passing `currentKey`
|
|
8870
|
+
* lets the server mark exactly one row as `kind: "current"`. Response shape:
|
|
8871
|
+
* { sessions: SessionHistoryRow[] }
|
|
8872
|
+
*
|
|
8873
|
+
* GET /api/transcript?file=<basename>
|
|
8874
|
+
* Read a session transcript (active or archived). Returns:
|
|
8875
|
+
* { messages: AgentMessage[] }
|
|
8852
8876
|
*
|
|
8853
|
-
* Both endpoints are read-only
|
|
8854
|
-
*
|
|
8877
|
+
* Both endpoints are read-only. Mutations (adopt, favorite, delete) go
|
|
8878
|
+
* through the gateway RPC (`sessions.adoptFile`, `sessions.favoriteFile`,
|
|
8879
|
+
* `sessions.deleteFile`).
|
|
8855
8880
|
*
|
|
8856
8881
|
* @module
|
|
8857
8882
|
*/
|
|
8858
|
-
/**
|
|
8859
|
-
* Handle /api/sessions and /api/transcript HTTP requests.
|
|
8860
|
-
* Returns true if the request was handled, false otherwise.
|
|
8861
|
-
*/
|
|
8862
8883
|
function handleSessionsApiRequest(req, res, cfg) {
|
|
8863
8884
|
const url = new URL(req.url ?? "/", "http://localhost");
|
|
8864
8885
|
if (url.pathname === "/api/sessions" && req.method === "GET") {
|
|
8865
|
-
handleListSessions(res, cfg);
|
|
8886
|
+
handleListSessions(res, cfg, url.searchParams.get("currentKey") ?? void 0);
|
|
8866
8887
|
return true;
|
|
8867
8888
|
}
|
|
8868
8889
|
if (url.pathname === "/api/transcript" && req.method === "GET") {
|
|
@@ -8875,11 +8896,62 @@ function sendJson$1(res, data, status = 200) {
|
|
|
8875
8896
|
res.writeHead(status, { "Content-Type": "application/json" });
|
|
8876
8897
|
res.end(JSON.stringify(data));
|
|
8877
8898
|
}
|
|
8878
|
-
|
|
8899
|
+
/**
|
|
8900
|
+
* Convert an archive-suffix timestamp (e.g. `2026-03-31T03-26-10.444Z`) back
|
|
8901
|
+
* to a valid ISO-8601 string. The timestamp is created by
|
|
8902
|
+
* `archiveFileOnDisk()` as `new Date().toISOString().replaceAll(":", "-")`,
|
|
8903
|
+
* so we only need to restore the colons in the time portion (after "T").
|
|
8904
|
+
*
|
|
8905
|
+
* Returns `undefined` if the input cannot be parsed as a valid date.
|
|
8906
|
+
*/
|
|
8907
|
+
function parseArchivedAt(suffix) {
|
|
8908
|
+
const dotIdx = suffix.indexOf(".");
|
|
8909
|
+
if (dotIdx < 0) return;
|
|
8910
|
+
const raw = suffix.slice(dotIdx + 1);
|
|
8911
|
+
const tIdx = raw.indexOf("T");
|
|
8912
|
+
if (tIdx < 0) return;
|
|
8913
|
+
const iso = raw.slice(0, tIdx) + "T" + raw.slice(tIdx + 1).replace(/-/g, ":");
|
|
8914
|
+
const d = new Date(iso);
|
|
8915
|
+
if (Number.isNaN(d.getTime())) return;
|
|
8916
|
+
return d.toISOString();
|
|
8917
|
+
}
|
|
8918
|
+
/**
|
|
8919
|
+
* Count user + assistant messages in a JSONL transcript and extract the
|
|
8920
|
+
* first user message as an 80-char preview. Silent on malformed lines —
|
|
8921
|
+
* we never fail the whole list request because one transcript is corrupt.
|
|
8922
|
+
*/
|
|
8923
|
+
function scanTranscript(filePath) {
|
|
8924
|
+
let msgCount = 0;
|
|
8925
|
+
let preview = null;
|
|
8879
8926
|
try {
|
|
8880
|
-
const
|
|
8927
|
+
const lines = fs.readFileSync(filePath, "utf-8").split(/\r?\n/);
|
|
8928
|
+
for (const line of lines) {
|
|
8929
|
+
const trimmed = line.trim();
|
|
8930
|
+
if (!trimmed) continue;
|
|
8931
|
+
try {
|
|
8932
|
+
const parsed = JSON.parse(trimmed);
|
|
8933
|
+
const role = parsed?.message?.role;
|
|
8934
|
+
if (role === "user" || role === "assistant") msgCount++;
|
|
8935
|
+
if (!preview && role === "user") {
|
|
8936
|
+
const content = parsed.message?.content;
|
|
8937
|
+
const snipped = (typeof content === "string" ? content : Array.isArray(content) ? content.filter((b) => typeof b === "object" && b !== null && b.type === "text").map((b) => b.text ?? "").join(" ") : "").trim().slice(0, 80);
|
|
8938
|
+
if (snipped) preview = snipped;
|
|
8939
|
+
}
|
|
8940
|
+
} catch {}
|
|
8941
|
+
}
|
|
8942
|
+
} catch {}
|
|
8943
|
+
return {
|
|
8944
|
+
msgCount,
|
|
8945
|
+
preview
|
|
8946
|
+
};
|
|
8947
|
+
}
|
|
8948
|
+
function handleListSessions(res, cfg, currentKey) {
|
|
8949
|
+
try {
|
|
8950
|
+
const agentId = resolveDefaultAgentId(cfg);
|
|
8951
|
+
const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId);
|
|
8952
|
+
const existingFiles = /* @__PURE__ */ new Set();
|
|
8881
8953
|
const { storePath, store } = loadCombinedSessionStoreForGateway(cfg);
|
|
8882
|
-
const
|
|
8954
|
+
const storeResult = listSessionsFromStore({
|
|
8883
8955
|
cfg,
|
|
8884
8956
|
storePath,
|
|
8885
8957
|
store,
|
|
@@ -8887,62 +8959,94 @@ function handleListSessions(res, cfg) {
|
|
|
8887
8959
|
includeDerivedTitles: true,
|
|
8888
8960
|
includeLastMessage: true
|
|
8889
8961
|
}
|
|
8890
|
-
})
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
|
|
8900
|
-
|
|
8901
|
-
|
|
8902
|
-
|
|
8962
|
+
});
|
|
8963
|
+
const liveRows = [];
|
|
8964
|
+
const liveSessionIds = /* @__PURE__ */ new Set();
|
|
8965
|
+
for (const s of storeResult.sessions) {
|
|
8966
|
+
if (!s.sessionId) continue;
|
|
8967
|
+
const fileName = `${s.sessionId}.jsonl`;
|
|
8968
|
+
const filePath = path.join(sessionsDir, fileName);
|
|
8969
|
+
if (!fs.existsSync(filePath)) continue;
|
|
8970
|
+
existingFiles.add(fileName);
|
|
8971
|
+
liveSessionIds.add(s.sessionId);
|
|
8972
|
+
const stat = fs.statSync(filePath);
|
|
8973
|
+
const { msgCount, preview: scanPreview } = scanTranscript(filePath);
|
|
8974
|
+
const preview = s.lastMessagePreview ?? s.derivedTitle ?? s.displayName ?? s.label ?? scanPreview ?? null;
|
|
8975
|
+
const mtime = stat.mtime.toISOString();
|
|
8976
|
+
const updatedAtMs = typeof s.updatedAt === "number" ? s.updatedAt : 0;
|
|
8977
|
+
const updatedAtIso = updatedAtMs > 0 ? new Date(updatedAtMs).toISOString() : mtime;
|
|
8978
|
+
const lastActivity = mtime > updatedAtIso ? mtime : updatedAtIso;
|
|
8979
|
+
const isCurrent = currentKey !== void 0 && s.key === currentKey;
|
|
8980
|
+
liveRows.push({
|
|
8981
|
+
file: fileName,
|
|
8982
|
+
sessionId: s.sessionId,
|
|
8983
|
+
sessionKey: s.key,
|
|
8984
|
+
kind: isCurrent ? "current" : "past",
|
|
8985
|
+
mtime,
|
|
8986
|
+
lastActivity,
|
|
8987
|
+
msgCount,
|
|
8988
|
+
size: stat.size,
|
|
8989
|
+
preview,
|
|
8990
|
+
model: s.model,
|
|
8991
|
+
modelProvider: s.modelProvider,
|
|
8992
|
+
favorited: false,
|
|
8993
|
+
canLoad: !isCurrent,
|
|
8994
|
+
canDelete: !isCurrent
|
|
8995
|
+
});
|
|
8996
|
+
}
|
|
8997
|
+
const archivedRows = [];
|
|
8903
8998
|
if (fs.existsSync(sessionsDir)) {
|
|
8904
|
-
const
|
|
8905
|
-
for (const file of
|
|
8999
|
+
const entries = fs.readdirSync(sessionsDir);
|
|
9000
|
+
for (const file of entries) {
|
|
8906
9001
|
if (!file.includes(".jsonl.")) continue;
|
|
8907
9002
|
const parts = file.split(".jsonl.");
|
|
8908
|
-
if (parts.length < 2 || !parts[1]) continue;
|
|
9003
|
+
if (parts.length < 2 || !parts[0] || !parts[1]) continue;
|
|
9004
|
+
const sessionId = parts[0];
|
|
9005
|
+
const suffix = parts[1];
|
|
9006
|
+
const reason = suffix.match(/^(reset|deleted)\./)?.[1];
|
|
9007
|
+
if (!reason) continue;
|
|
8909
9008
|
const filePath = path.join(sessionsDir, file);
|
|
9009
|
+
let stat;
|
|
8910
9010
|
try {
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
9011
|
+
stat = fs.statSync(filePath);
|
|
9012
|
+
} catch {
|
|
9013
|
+
continue;
|
|
9014
|
+
}
|
|
9015
|
+
existingFiles.add(file);
|
|
9016
|
+
const archivedAt = parseArchivedAt(suffix);
|
|
9017
|
+
const mtime = stat.mtime.toISOString();
|
|
9018
|
+
const { msgCount, preview } = scanTranscript(filePath);
|
|
9019
|
+
const lastActivity = archivedAt ?? mtime;
|
|
9020
|
+
archivedRows.push({
|
|
9021
|
+
file,
|
|
9022
|
+
sessionId,
|
|
9023
|
+
sessionKey: void 0,
|
|
9024
|
+
kind: "archived",
|
|
9025
|
+
archivedReason: reason,
|
|
9026
|
+
mtime,
|
|
9027
|
+
archivedAt,
|
|
9028
|
+
lastActivity,
|
|
9029
|
+
msgCount,
|
|
9030
|
+
size: stat.size,
|
|
9031
|
+
preview,
|
|
9032
|
+
favorited: false,
|
|
9033
|
+
canLoad: reason !== "deleted",
|
|
9034
|
+
canDelete: true
|
|
9035
|
+
});
|
|
8934
9036
|
}
|
|
8935
9037
|
}
|
|
8936
|
-
|
|
8937
|
-
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
9038
|
+
const favorites = reconcileFavorites(existingFiles, agentId);
|
|
9039
|
+
const favSet = favorites.size > 0 ? favorites : loadFavoritesSet(agentId);
|
|
9040
|
+
for (const row of liveRows) row.favorited = favSet.has(row.file);
|
|
9041
|
+
for (const row of archivedRows) row.favorited = favSet.has(row.file);
|
|
9042
|
+
sendJson$1(res, { sessions: [...liveRows, ...archivedRows].toSorted((a, b) => {
|
|
9043
|
+
if (a.kind === "current" && b.kind !== "current") return -1;
|
|
9044
|
+
if (b.kind === "current" && a.kind !== "current") return 1;
|
|
9045
|
+
if (a.favorited !== b.favorited) return a.favorited ? -1 : 1;
|
|
9046
|
+
return b.lastActivity.localeCompare(a.lastActivity);
|
|
9047
|
+
}) });
|
|
8944
9048
|
} catch (err) {
|
|
8945
|
-
sendJson$1(res, { error: String(err) }, 500);
|
|
9049
|
+
sendJson$1(res, { error: err instanceof Error ? err.message : String(err) }, 500);
|
|
8946
9050
|
}
|
|
8947
9051
|
}
|
|
8948
9052
|
function handleTranscript(res, cfg, file) {
|
|
@@ -8970,7 +9074,7 @@ function handleTranscript(res, cfg, file) {
|
|
|
8970
9074
|
} catch {}
|
|
8971
9075
|
sendJson$1(res, { messages });
|
|
8972
9076
|
} catch (err) {
|
|
8973
|
-
sendJson$1(res, { error: String(err) }, 500);
|
|
9077
|
+
sendJson$1(res, { error: err instanceof Error ? err.message : String(err) }, 500);
|
|
8974
9078
|
}
|
|
8975
9079
|
}
|
|
8976
9080
|
|
|
@@ -11848,7 +11952,7 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
11848
11952
|
});
|
|
11849
11953
|
let glassUiBridgeCleanup = null;
|
|
11850
11954
|
if (!minimalTestGateway) {
|
|
11851
|
-
const { createGlassUiBridge } = await import("./glass-ui-ws-
|
|
11955
|
+
const { createGlassUiBridge } = await import("./glass-ui-ws-BI81Lh6Z.js");
|
|
11852
11956
|
glassUiBridgeCleanup = createGlassUiBridge({
|
|
11853
11957
|
wss: glassUiWss,
|
|
11854
11958
|
context: gatewayRequestContext,
|