@symerian/symi 2.7.0 → 2.7.2
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/{accounts-Cd816n6l.js → accounts-DDuIpcln.js} +7 -7
- package/dist/{accounts-mN_EcgxC.js → accounts-DyJN4_vR.js} +1 -1
- package/dist/{accounts-CokRskCl.js → accounts-bK-Yqdwx.js} +1 -1
- package/dist/{acp-cli-COzlJi3B.js → acp-cli-B2f0qBiM.js} +6 -6
- package/dist/{acp-cli-BLUeUUA5.js → acp-cli-D-9rzaOI.js} +2 -2
- package/dist/{agent-scope-BRwEc2pG.js → agent-scope-CgUHAtCo.js} +18 -18
- package/dist/{agents-Cu2bthAX.js → agents-Z8ruJPz2.js} +5 -5
- package/dist/{agents.config-Dib8Uo2P.js → agents.config-B9BZoM2m.js} +2 -2
- package/dist/{agents.config-5PTwsijs.js → agents.config-C951ocyh.js} +1 -1
- package/dist/{api-key-rotation-CEr3lKih.js → api-key-rotation-CzuPlV2t.js} +1 -1
- package/dist/{audio-preflight-mj-z_vQ6.js → audio-preflight-CIiS5cfP.js} +28 -28
- package/dist/{audio-preflight-DD18zIZd.js → audio-preflight-HILy3i0m.js} +4 -4
- package/dist/{audit-Djfdh06o.js → audit-BgdM9XZl.js} +23 -23
- package/dist/{audit-BjI_Yyr5.js → audit-xSagQWH8.js} +2 -2
- package/dist/{auth-choice-CmSUU3t8.js → auth-choice-BmYi6pBy.js} +8 -8
- package/dist/{auth-choice-5gul6jy2.js → auth-choice-D_VfXxhG.js} +2 -2
- package/dist/{auth-token-83A2btbE.js → auth-token-Cay2jwzn.js} +1 -1
- package/dist/{banner-B4vQpMIJ.js → banner-Bucr6qZ5.js} +1 -1
- package/dist/{bindings-ChzePa8q.js → bindings-DFaVVCsf.js} +1 -1
- package/dist/{browser-cli-kDUw45Y0.js → browser-cli-Bc_JVdTj.js} +3 -3
- package/dist/{browser-cli-BTD0NlrA.js → browser-cli-Dr0yx7-7.js} +9 -9
- 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-tmHtVCkn.js → call-CX0cs106.js} +9 -9
- package/dist/{call-DKi-hnaF.js → call-DeCQ2DhS.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DVf4CJIu.js → channel-options-BMDryXHq.js} +1 -1
- package/dist/{channel-options-DsWGc55A.js → channel-options-z8-WeZyO.js} +2 -2
- package/dist/{channel-selection-DaJDux-Q.js → channel-selection-V2xDgw16.js} +1 -1
- package/dist/{channel-web-vGC-WJXi.js → channel-web-D_YxZAHT.js} +17 -17
- package/dist/{channels-cli-CSv05N3q.js → channels-cli-397NgC51.js} +7 -7
- package/dist/{channels-cli-COayA28A.js → channels-cli-CV7_JUru.js} +76 -76
- package/dist/{channels-status-issues-B_PI3nEE.js → channels-status-issues-CJ0Vb_9z.js} +1 -1
- package/dist/{chrome-BxwUEWrH.js → chrome-CiOKaTN-.js} +7 -7
- package/dist/{chrome-CSJzpT9Z.js → chrome-DU2ZysN3.js} +2 -2
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-B-g79xPe.js → cli-4XU7pNlM.js} +4 -4
- package/dist/{cli-DJjOxip6.js → cli-Dq95udFO.js} +63 -63
- package/dist/{client-Bj_vTpri.js → client-B8xmq-Pw.js} +14 -2
- package/dist/{client-T3qcxXru.js → client-qUlxXXVJ.js} +13 -1
- package/dist/{command-registry-BvpLfzl7.js → command-registry-yRiaU4-n.js} +10 -10
- package/dist/{commands-CtocZ4Lg.js → commands-BNLCWX6e.js} +1 -1
- package/dist/{commands-registry-BZ0ZSQpM.js → commands-registry-BT0-zzs3.js} +3 -3
- package/dist/{completion-cli-CfRZ-7QF.js → completion-cli-DrQai9KM.js} +2 -2
- package/dist/{completion-cli-DtQcXg1N.js → completion-cli-_aqxDQoz.js} +12 -12
- package/dist/{config-tNauHpdq.js → config-Dz95lSBW.js} +2 -2
- package/dist/{config-cli-DL2RdfLM.js → config-cli-CMymzmrI.js} +1 -1
- package/dist/{config-cli-D9Z78raJ.js → config-cli-EdmbBExA.js} +4 -4
- package/dist/{config-guard-4oRmpR0a.js → config-guard-CEkSg4hl.js} +12 -12
- package/dist/{config-validation-BoDWiwe3.js → config-validation-HDVDlMSV.js} +1 -1
- package/dist/{configure-jDpF8lmx.js → configure-DRMAIBBf.js} +15 -15
- package/dist/{configure-Dq4f8WPa.js → configure-DkFujfiY.js} +6 -6
- package/dist/{control-service-BBnhN7aZ.js → control-service-BYKXzY4f.js} +4 -4
- package/dist/control-ui/css/style.css +128 -0
- package/dist/control-ui/js/history.js +233 -85
- package/dist/{control-ui-assets-6n-YayeS.js → control-ui-assets-B7moDVHX.js} +1 -1
- package/dist/{cron-cli-D165ecaj.js → cron-cli-BHxfvWeT.js} +10 -10
- package/dist/{cron-cli-QCTdVZuP.js → cron-cli-DacyI1Pw.js} +3 -3
- package/dist/{daemon-cli-BccZzUb0.js → daemon-cli-BLhFbih0.js} +11 -11
- package/dist/{daemon-cli-DhJYEAoL.js → daemon-cli-BxKtiouf.js} +2 -2
- package/dist/daemon-cli.js +12 -0
- package/dist/{daemon-runtime-u01h46bE.js → daemon-runtime-mE1b-Q48.js} +10 -10
- package/dist/{deliver-BYdNAEqj.js → deliver-B4KZ6-oZ.js} +7 -7
- 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-D0N71nqX.js → devices-cli-B8Q8AzbX.js} +6 -6
- package/dist/{diagnostics-BrUo0gqs.js → diagnostics-BRwihzJG.js} +5 -5
- package/dist/{directory-cli-aj7aXIBM.js → directory-cli-KgsAVTA0.js} +7 -7
- package/dist/{dm-policy-shared-epgkayyq.js → dm-policy-shared-DlDAGtZL.js} +2 -2
- package/dist/{dns-cli-Dit09wbu.js → dns-cli-Cwr92Aiq.js} +3 -3
- package/dist/{dock-BYiRZSgZ.js → dock-BhS32F6E.js} +4 -4
- package/dist/{docs-cli-CyWGMA-e.js → docs-cli-qE-blOLC.js} +1 -1
- package/dist/{doctor-completion-Ccb83Wl5.js → doctor-completion-BbrsQOW-.js} +2 -2
- package/dist/{doctor-completion-oQemZItC.js → doctor-completion-Cx-AR_dB.js} +1 -1
- package/dist/{doctor-config-flow-BXmHd2bb.js → doctor-config-flow-iIzSEQxb.js} +10 -10
- 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-CZ-iTtNO.js → exec-approvals-cli-Cj6Z-vxL.js} +13 -13
- package/dist/extensionAPI.js +6 -6
- package/dist/{fs-safe-CTDvb1DF.js → fs-safe-CUjO1ca2.js} +6 -6
- package/dist/{gateway-cli-C1zPKZ7B.js → gateway-cli-C7JTXqby.js} +269 -175
- package/dist/{gateway-cli-zbVm1MBQ.js → gateway-cli-CaaX65eF.js} +169 -75
- package/dist/{gateway-rpc-BMdVa3QV.js → gateway-rpc-BWTK7g8B.js} +1 -1
- package/dist/{gateway-rpc-B1Wzoj99.js → gateway-rpc-WM-HXUbl.js} +1 -1
- package/dist/{glass-ui-ws-D3tAmqKX.js → glass-ui-ws-BI81Lh6Z.js} +83 -83
- package/dist/{glass-ui-ws-CvUFd4C6.js → glass-ui-ws-jAbqZVc9.js} +11 -11
- package/dist/{health-o847FIt1.js → health-B1nih5LD.js} +13 -13
- package/dist/{health-DQEqLYg1.js → health-CsTxt66a.js} +2 -2
- package/dist/{hooks-cli-sYjbF4I6.js → hooks-cli-BhxMFkKe.js} +77 -77
- package/dist/{hooks-cli-D_UW9fc8.js → hooks-cli-CIlvtt2M.js} +5 -5
- package/dist/{image-lCS3o9xj.js → image-BWmcNF8N.js} +3 -3
- package/dist/{image-lp19FlzF.js → image-D7Fl08gG.js} +1 -1
- package/dist/{image-ops-DYbDWaIA.js → image-ops-1OJMSAUX.js} +10 -10
- package/dist/index.js +73 -73
- package/dist/{inspect-CNYyHVfH.js → inspect-CvbbCuoa.js} +4 -4
- package/dist/{install-safe-path-D3mg1DMG.js → install-safe-path-D3Uz77u7.js} +11 -11
- package/dist/{installs-CYTVYWH_.js → installs-DQcRVF1U.js} +10 -10
- package/dist/{ir-Dt4hOzxG.js → ir-DZam9q5M.js} +6 -6
- package/dist/{lifecycle-core-DxmxQdhS.js → lifecycle-core-C4HzGXA1.js} +5 -5
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{local-roots-BBeKX7PX.js → local-roots-aAFLQGkY.js} +2 -2
- package/dist/{login-CnjdNmGD.js → login-DODfJ3Dn.js} +3 -3
- package/dist/{login-qr-DUf6CM0M.js → login-qr-CBRxijIg.js} +5 -5
- package/dist/{logs-cli-DtlrLf7u.js → logs-cli-BZV7dq_U.js} +3 -3
- package/dist/{logs-cli-BVd6h2-Q.js → logs-cli-DyCcDkRs.js} +7 -7
- package/dist/{manager-C1CfGzZ2.js → manager-D4LJSRyZ.js} +13 -13
- package/dist/{markdown-tables-ZwP14ydw.js → markdown-tables-CEbN0fEm.js} +1 -1
- package/dist/{memory-cli-DhkRAIdT.js → memory-cli-DDumUksr.js} +14 -14
- package/dist/{model-catalog-CvbwxWuC.js → model-catalog-8Son0J4O.js} +4 -4
- package/dist/{model-picker-C2MqloOs.js → model-picker-CAm2Bftd.js} +3 -3
- package/dist/{model-selection-X1oLh3CE.js → model-selection-CyFvYcRt.js} +9 -9
- package/dist/{model-CeeOcylL.js → model-tWhwnFf8.js} +1 -1
- package/dist/{models-Zol34e73.js → models-DhMe2rzL.js} +3 -3
- package/dist/{models-cli-DnMUzr15.js → models-cli-DKM5sCQM.js} +72 -72
- package/dist/{models-cli-BzcEA9oa.js → models-cli-Dewg24W2.js} +6 -6
- package/dist/{models-config-CEMioDUi.js → models-config-CFFjJPe7.js} +7 -7
- package/dist/{node-cli-BVJid4L_.js → node-cli-4eMRkmrw.js} +28 -28
- package/dist/{node-cli-eHn9-YfJ.js → node-cli-Dfs0UmnJ.js} +1 -1
- package/dist/{node-service-CXzMs782.js → node-service-CD47Qpf1.js} +1 -1
- package/dist/{nodes-cli-Ct4M7JOe.js → nodes-cli-BKb61OjH.js} +3 -3
- package/dist/{nodes-cli-BN2Nslim.js → nodes-cli-DxfP9DIz.js} +10 -10
- package/dist/{nodes-screen-Cd49cSPb.js → nodes-screen-8Bq7DiSa.js} +4 -4
- package/dist/{npm-registry-spec-DchndI6P.js → npm-registry-spec-C0CPT3vr.js} +9 -9
- package/dist/{onboard-CSseK0Co.js → onboard-C6XtdirM.js} +13 -13
- package/dist/{onboard-CxOT_xD4.js → onboard-CVfE-Bjj.js} +3 -3
- package/dist/{onboard-channels-D-lh_Vh1.js → onboard-channels-8ynJSZL6.js} +1 -1
- package/dist/{onboard-channels-CUlITipG.js → onboard-channels-ChxtmhFY.js} +5 -5
- package/dist/{onboard-custom-DTcLdtA9.js → onboard-custom-XiomtQr7.js} +3 -3
- package/dist/{onboard-helpers-CdPNw25E.js → onboard-helpers-CueJ7O_B.js} +8 -8
- package/dist/{onboard-helpers-BBtPmJEe.js → onboard-helpers-PpGrZIGw.js} +1 -1
- package/dist/{onboard-hooks-C_2_jpWg.js → onboard-hooks-C3ok8kqB.js} +1 -1
- package/dist/{onboard-remote-v6QMnyJD.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-CQtkRP20.js → onboard-skills-DRICcBwa.js} +4 -4
- package/dist/{onboarding-Dn5agNG_.js → onboarding-Dg6nx_ph.js} +13 -13
- package/dist/{onboarding-DktESmTv.js → onboarding-fN3GGyiv.js} +7 -7
- package/dist/{onboarding.finalize-Bm-1Kdnh.js → onboarding.finalize--MZAe4B0.js} +10 -10
- package/dist/{onboarding.finalize-CTIZ1zvV.js → onboarding.finalize-CBE2mBQQ.js} +75 -75
- package/dist/{onboarding.gateway-config-CwnQkyO0.js → onboarding.gateway-config-DTWQ-Bqq.js} +14 -14
- package/dist/{onboarding.gateway-config-B9zGPfCl.js → onboarding.gateway-config-Dj68bVBt.js} +3 -3
- package/dist/{openai-model-default-4kBA1_78.js → openai-model-default-WqcGxyFM.js} +2 -2
- package/dist/{outbound-attachment-Qfh5dlsg.js → outbound-attachment-Bw-c5Cdp.js} +2 -2
- package/dist/{outbound-_Ir3M05f.js → outbound-wnv03tb3.js} +4 -4
- package/dist/{pairing-cli-C8UXBJ_A.js → pairing-cli-DSM82gJG.js} +8 -8
- package/dist/{pairing-labels-Dxb898X5.js → pairing-labels-DyXoD1DS.js} +1 -1
- package/dist/{pairing-store-B8ktu-6j.js → pairing-store-CK726Dzq.js} +2 -2
- package/dist/{pairing-token-AV-MMfVE.js → pairing-token-CX3NN_qj.js} +7 -7
- package/dist/{paths-CT6jsi4E.js → paths-BBm9fwuG.js} +1 -1
- package/dist/{pi-auth-json-FpfHyEcu.js → pi-auth-json-zHckislA.js} +5 -5
- package/dist/{pi-embedded-CYDMb5q0.js → pi-embedded-BzS693I1.js} +28 -16
- package/dist/{pi-embedded-helpers-Bs4eMaNo.js → pi-embedded-helpers-BgdB5kvy.js} +6 -6
- package/dist/{pi-embedded-helpers-Dij3O6ox.js → pi-embedded-helpers-DXAoe1Bx.js} +4 -4
- package/dist/{pi-tools.policy-BBxnqCay.js → pi-tools.policy-DRWb_Cax.js} +4 -4
- package/dist/{plugin-auto-enable-DwIrzVOA.js → plugin-auto-enable-CP0nONRL.js} +2 -2
- package/dist/{plugin-registry-CJGPW1-k.js → plugin-registry-Bzz7mUyl.js} +1 -1
- package/dist/{plugin-registry-d0oZLl6y.js → plugin-registry-SUa2FFIj.js} +3 -3
- package/dist/plugin-sdk/{channel-web-Dm-CzA1O.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-4HEU7aDS.js → reply-Cw3shPk2.js} +14 -2
- package/dist/plugin-sdk/{web-Cclb7FTq.js → web-CH43nBP0.js} +2 -2
- package/dist/{plugins-BAyxWQSz.js → plugins-DKDeQZF0.js} +2 -2
- package/dist/{plugins-cli-CL0tzkMo.js → plugins-cli-DwtoU3xk.js} +5 -5
- package/dist/{plugins-cli-BWgjIJQL.js → plugins-cli-qG50__1A.js} +72 -72
- package/dist/{ports-OZQlocB7.js → ports-BOmtxoTv.js} +2 -2
- package/dist/{ports-u9lWy2Jt.js → ports-DtW62rqS.js} +1 -1
- package/dist/{program-BHjH97Q_.js → program-BDspObZY.js} +10 -10
- package/dist/{program-context-CXZHSZ4D.js → program-context-BqUFQnhR.js} +39 -39
- package/dist/{prompt-select-styled-BUFEoSlM.js → prompt-select-styled-C7DydfxH.js} +38 -38
- package/dist/{prompt-select-styled-D8LXSUR7.js → prompt-select-styled-CRUuzDrg.js} +6 -6
- package/dist/{provider-auth-helpers-BFHctF2f.js → provider-auth-helpers-CEYCb2mJ.js} +1 -1
- package/dist/{provider-auth-helpers-CeAbh3lv.js → provider-auth-helpers-D60nbSLq.js} +5 -5
- package/dist/{push-apns-BylbQyP9.js → push-apns-B5txhDVi.js} +1 -1
- package/dist/{push-apns-DqFdzIkc.js → push-apns-CoG1P_P0.js} +4 -4
- package/dist/{pw-ai-BO5cSmwD.js → pw-ai-CANiWpMA.js} +1 -1
- package/dist/{pw-ai-CfrnAHwA.js → pw-ai-DQohWnzT.js} +7 -7
- package/dist/{qmd-manager-DUNbG4Qr.js → qmd-manager-CCUK1xoc.js} +18 -18
- package/dist/{qr-cli-BZYa2gvF.js → qr-cli-CejYwqsj.js} +3 -3
- package/dist/{register.agent-DxAqRAt3.js → register.agent-BY_Df_Me.js} +9 -9
- package/dist/{register.agent-bzSGKS-l.js → register.agent-CopGIf9e.js} +82 -82
- package/dist/{register.configure-WS1nlSp8.js → register.configure-Bu_XKu7Z.js} +11 -11
- package/dist/register.configure-CoYQhQBT.js +148 -0
- package/dist/{register.maintenance-B1QcUr38.js → register.maintenance-4Q3E_gqv.js} +85 -85
- package/dist/{register.maintenance-D_qMTrgD.js → register.maintenance-DhnICgeT.js} +11 -11
- package/dist/{register.message-zu3HGGff.js → register.message-DZCCEK01.js} +5 -5
- package/dist/{register.message-CJF8gLAN.js → register.message-dd1xYBZT.js} +64 -64
- package/dist/{register.onboard-CswoaT7q.js → register.onboard-Bfz-EJGb.js} +75 -75
- package/dist/{register.onboard-9dwNqCe6.js → register.onboard-e8L_UxR4.js} +7 -7
- package/dist/{register.setup-CvomtGGu.js → register.setup-C5CZKKAB.js} +78 -78
- package/dist/{register.setup-TcjUu6HC.js → register.setup-DuU3Ywi-.js} +7 -7
- package/dist/{register.status-health-sessions-CM1SX81r.js → register.status-health-sessions-Dvj4mlom.js} +7 -7
- package/dist/{register.status-health-sessions-CQMvbwr6.js → register.status-health-sessions-jeiqtgl7.js} +76 -76
- package/dist/{register.subclis-CVQASXaL.js → register.subclis-DD6G0dov.js} +20 -20
- package/dist/{replies-Dy92jzrz.js → replies-BMqtgBhh.js} +1 -1
- package/dist/{reply-CpNWtuU4.js → reply-XaXqDK9F.js} +139 -139
- package/dist/{reply-prefix-BLOOs1aW.js → reply-prefix-CE2YmmsD.js} +1 -1
- package/dist/{resolve-route-BcnaXYvh.js → resolve-route-BMoTaVAH.js} +2 -2
- package/dist/{routes-CVwRcA9D.js → routes-BAZTZNuQ.js} +8 -8
- package/dist/{rpc-CZFfee1J.js → rpc-N1nf_c1A.js} +1 -1
- package/dist/{rpc-D0FiEinj.js → rpc-QHo-8pCM.js} +1 -1
- package/dist/{run-main-Dq6tfDry.js → run-main-BrUOBCsG.js} +17 -17
- package/dist/{runner-Ct0suQrd.js → runner-BS9gGL5i.js} +1 -1
- package/dist/{runner-BAVs-p6Z.js → runner-DRv0uCK_.js} +20 -20
- package/dist/{sandbox-HZ_uilsn.js → sandbox-B6N8cV4d.js} +18 -18
- package/dist/{sandbox-cli-wZtiyo8g.js → sandbox-cli-DwzaNjIJ.js} +20 -20
- package/dist/{security-cli-BESmRIrl.js → security-cli-B-4J6enu.js} +36 -36
- package/dist/{security-cli-CG1uSlRK.js → security-cli-CSMUEGPK.js} +3 -3
- package/dist/{send-DsSI8z3F.js → send-9SapUCg7.js} +6 -6
- package/dist/{send-DT-5buW5.js → send-B3RdXvjC.js} +6 -6
- package/dist/{send-JWV62VbW.js → send-Bm4ULEzh.js} +6 -6
- package/dist/{send-BVBCh27_.js → send-CQVnyJyF.js} +13 -13
- package/dist/{send-CXFTeD_J.js → send-DVm0du0_.js} +4 -4
- package/dist/{server-context-VlF1_hYj.js → server-context-CCBZN8a0.js} +5 -5
- package/dist/{server-methods-B0pdetGJ.js → server-methods-0ksPFnev.js} +441 -124
- package/dist/{server-methods-IBEaQXPX.js → server-methods-Bu1RjLe6.js} +484 -167
- package/dist/{server-node-events-CyDj7Txd.js → server-node-events-DCbzFyQF.js} +5 -5
- package/dist/{server-node-events-BACmfyjo.js → server-node-events-DZAN3hWE.js} +64 -64
- package/dist/{service-D80PyJxB.js → service-osK70kTZ.js} +15 -15
- package/dist/{session-6Qyc4cBQ.js → session-DsJGtM7g.js} +2 -2
- package/dist/{session-dirs-DPzjjra2.js → session-dirs-Dgz7kkUM.js} +2 -2
- package/dist/{sessions-jTAGYjWl.js → sessions-Cpgnq0pA.js} +13 -13
- package/dist/{shared-BfhtOZAz.js → shared-73T9fyuK.js} +3 -3
- package/dist/{shared-BV7WhIkY.js → shared-DnmJ0ABB.js} +1 -1
- package/dist/{skill-commands-ZXbEITKi.js → skill-commands-Cxw-jNxU.js} +5 -5
- package/dist/{skill-scanner-w3DJvw1Q.js → skill-scanner-hMtQbWPV.js} +5 -5
- package/dist/{skills-DqQUtOph.js → skills-6jdJQ5ZL.js} +4 -4
- package/dist/{skills-cli-D3lePXkf.js → skills-cli-DXkx4vNV.js} +7 -7
- package/dist/{skills-install-HGYidhrv.js → skills-install-CWVdJkLn.js} +3 -3
- package/dist/{skills-status-Cjsh8we0.js → skills-status-C3ptXwnh.js} +1 -1
- package/dist/{sqlite-BV5ILFtC.js → sqlite-Dx3J_aSE.js} +12 -12
- package/dist/{status-DzHL-eVu.js → status-CiHkFbIh.js} +3 -3
- package/dist/{status-nzJEZmNT.js → status-DOTlXdcN.js} +25 -25
- package/dist/{status-DUeTrQSz.js → status-IWqSLXLR.js} +1 -1
- package/dist/{status-BJtbD-cG.js → status-qkmUAeWo.js} +5 -5
- package/dist/{status.update-TlYwuzTa.js → status.update-CG0ciGaf.js} +3 -3
- package/dist/{store-DvtcmOKj.js → store-r1DJSDq-.js} +5 -5
- package/dist/{subagent-registry-CzS4CfnV.js → subagent-registry-DCoU9xIE.js} +5 -5
- package/dist/{symi-root-MF6_6SCS.js → symi-root-CrGJbkzf.js} +2 -2
- package/dist/{system-cli-C2yhGP4C.js → system-cli-DY7ov1OT.js} +7 -7
- package/dist/{system-cli-Z7uzO8qd.js → system-cli-LFURKpwS.js} +3 -3
- package/dist/{systemd-CevHlgD4.js → systemd-DT6SbCim.js} +5 -5
- package/dist/{systemd-hints-DmgRnw1L.js → systemd-hints-xYZbFny_.js} +6 -6
- package/dist/{systemd-linger-ScxQ1_H4.js → systemd-linger-DCskIKcx.js} +1 -1
- package/dist/{tables-C38rzF6E.js → tables-BEzT0Da4.js} +1 -1
- package/dist/{target-errors-CCz79CmV.js → target-errors-7AvoVa10.js} +4 -4
- package/dist/{tool-images-B-pqX3nX.js → tool-images-DvUBlqjX.js} +1 -1
- package/dist/{tui-D2MOx3Kx.js → tui-BH7JwqvB.js} +7 -7
- 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-B2ii7u23.js → tui-cli-CJnfmuxq.js} +28 -28
- package/dist/{unified-runner-BtO3UQSd.js → unified-runner-CApgXtVC.js} +14 -2
- package/dist/{update-Don6XTH9.js → update-Ya0e-JnM.js} +3 -3
- package/dist/{update-check-DCo5RtKp.js → update-check-7EzEjSzb.js} +5 -5
- package/dist/{update-cli-gKtjyXlD.js → update-cli-D5_jTEJv.js} +95 -95
- package/dist/{update-cli-DRODEMSI.js → update-cli-Dxb3pUyu.js} +12 -12
- package/dist/{update-runner-JcdOHr71.js → update-runner-BhVsdpxm.js} +1 -1
- package/dist/{update-runner-AsKAxe31.js → update-runner-FhW6n-Nv.js} +15 -15
- package/dist/{web-BIzWZFiN.js → web-ConlA_Ch.js} +4 -4
- package/dist/{web-DGo16lWn.js → web-CthDLVSz.js} +1 -1
- package/dist/{web-DKwOxo8E.js → web-Db_-ahjX.js} +6 -6
- package/dist/web-Dpb_tv_j.js +110 -0
- package/dist/{webhooks-cli-DbnQ2BVE.js → webhooks-cli-BRxe4uCg.js} +4 -4
- package/dist/{whatsapp-actions-CqXxtCoj.js → whatsapp-actions-ChO_shrk.js} +15 -15
- package/dist/{with-timeout-Cm5EhxG_.js → with-timeout-CtVdu_1U.js} +1 -1
- package/dist/{workspace-dirs-DKu48umx.js → workspace-dirs-GpkFi6Kw.js} +1 -1
- package/dist/{wsl-xNOi_Ch8.js → wsl-q8spwrME.js} +2 -2
- 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/dist/register.configure-Boyfir72.js +0 -148
- package/dist/web-sefqR11J.js +0 -110
|
@@ -6,13 +6,13 @@ import { C as ensureAgentWorkspace, S as DEFAULT_USER_FILENAME, T as isWorkspace
|
|
|
6
6
|
import { i as loadWorkspaceSkillEntries } from "./skills-hAdgFdrv.js";
|
|
7
7
|
import { t as buildWorkspaceSkillStatus } from "./skills-status-DKXJ-tbi.js";
|
|
8
8
|
import { H as VERSION, N as applyMergePatch, P as applyLegacyMigrations, S as sensitive, U as resolveRuntimeServiceVersion, a as parseConfigJson5, c as resolveConfigSnapshotHash, d as SymiSchema, i as loadConfig, l as writeConfigFile, o as readConfigFileSnapshot, s as readConfigFileSnapshotForWrite, u as validateConfigObjectWithPlugins } from "./config-BNTB6qj8.js";
|
|
9
|
-
import { $ as validateNodePairRejectParams, A as validateCronStatusParams,
|
|
10
|
-
import { l as authorizeOperatorScopesForMethod, s as ADMIN_SCOPE$2, u as isNodeRoleMethod } from "./call-
|
|
9
|
+
import { $ as validateNodePairRejectParams, A as validateCronStatusParams, At as validateWizardNextParams, B as validateExecApprovalsGetParams, C as validateConfigSetParams, Ct as validateTalkConfigParams, D as validateCronRemoveParams, Dt as validateWebLoginStartParams, E as validateCronListParams, Et as validateWakeParams, F as validateDevicePairRemoveParams, Ft as errorShape, G as validateModelsListParams, H as validateExecApprovalsNodeSetParams, Ht as listDevicePairing, I as validateDeviceTokenRevokeParams, J as validateNodeInvokeParams, Jt as summarizeDeviceTokens, K as validateNodeDescribeParams, Kt as revokeDeviceToken, L as validateDeviceTokenRotateParams, Lt as parseSessionLabel, M as validateDevicePairApproveParams, Mt as validateWizardStatusParams, N as validateDevicePairListParams, O as validateCronRunParams, Ot as validateWebLoginWaitParams, P as validateDevicePairRejectParams, Pt as ErrorCodes, Q as validateNodePairListParams, S as validateConfigSchemaParams, St as validateSkillsUpdateParams, T as validateCronAddParams, Tt as validateUpdateRunParams, U as validateExecApprovalsSetParams, Ut as rejectDevicePairing, V as validateExecApprovalsNodeGetParams, W as validateLogsTailParams, Wt as removePairedDevice, X as validateNodeListParams, Y as validateNodeInvokeResultParams, Z as validateNodePairApproveParams, _ as validateChatInjectParams, _t as validateSessionsRestoreParams, a as validateAgentWaitParams, b as validateConfigGetParams, bt as validateSkillsInstallParams, c as validateAgentsFilesGetParams, ct as validateSessionsCompactParams, d as validateAgentsListParams, dt as validateSessionsFavoriteFileParams, et as validateNodePairRequestParams, f as validateAgentsUpdateParams, ft as validateSessionsListParams, g as validateChatHistoryParams, gt as validateSessionsResolveParams, h as validateChatAbortParams, ht as validateSessionsResetParams, i as validateAgentParams, it as validatePushTestParams, j as validateCronUpdateParams, jt as validateWizardStartParams, k as validateCronRunsParams, kt as validateWizardCancelParams, l as validateAgentsFilesListParams, lt as validateSessionsDeleteFileParams, m as validateChannelsStatusParams, mt as validateSessionsPreviewParams, n as formatValidationErrors, nt as validateNodeRenameParams, o as validateAgentsCreateParams, ot as validateSendParams, p as validateChannelsLogoutParams, pt as validateSessionsPatchParams, q as validateNodeEventParams, qt as rotateDeviceToken, r as validateAgentIdentityParams, rt as validatePollParams, s as validateAgentsDeleteParams, st as validateSessionsAdoptFileParams, tt as validateNodePairVerifyParams, u as validateAgentsFilesSetParams, ut as validateSessionsDeleteParams, v as validateChatSendParams, vt as validateSessionsUsageParams, wt as validateTalkModeParams, x as validateConfigPatchParams, xt as validateSkillsStatusParams, y as validateConfigApplyParams, yt as validateSkillsBinsParams, zt as approveDevicePairing } from "./client-qUlxXXVJ.js";
|
|
10
|
+
import { l as authorizeOperatorScopesForMethod, s as ADMIN_SCOPE$2, u as isNodeRoleMethod } from "./call-DeCQ2DhS.js";
|
|
11
11
|
import { f as GATEWAY_CLIENT_CAPS, g as hasGatewayClientCap, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-C9dERklz.js";
|
|
12
12
|
import { c as writeJsonAtomic, o as createAsyncLock, s as readJsonFile } from "./pairing-token-Byh6drgn.js";
|
|
13
13
|
import { s as pickPrimaryLanIPv4 } from "./net-DZ5Ayk-W.js";
|
|
14
14
|
import { i as normalizeInputProvenance } from "./input-provenance-D0lNkCf6.js";
|
|
15
|
-
import { $n as resolveTtsAutoMode, B as dispatchInboundMessage, C as resolveAgentDeliveryPlan, Cn as enqueueSystemEvent, Cr as onAgentEvent, D as createOutboundSendDeps, Dt as normalizeCronJobPatch, Et as normalizeCronJobCreate, G as BARE_SESSION_RESET_PROMPT, Gn as stopSubagentsForRequester, Gt as persistBrowserProxyFiles, In as resolveAgentTimeoutMs, Jn as resolveUserTimezone, Qn as resolveTtsApiKey, Sn as parseVerboseOverride, V as createReplyDispatcher, Vn as formatZonedTimestamp, Wn as isAbortTrigger, Wt as applyBrowserProxyPaths, Xn as isTtsEnabled, Y as abortEmbeddedPiRun, Yn as getTtsProvider, Z as waitForEmbeddedPiRunEnd, Zn as isTtsProviderConfigured, Zt as scheduleGatewaySigusr1Restart, a as listSubagentRunsForRequester, ar as textToSpeech, bn as applyModelOverrideToSessionEntry, c as clearSessionQueues, ct as resolveOutboundSessionRoute, dt as resolveOutboundTarget, en as unbindThreadBindingsBySessionKey, er as resolveTtsConfig, hn as resolveSendPolicy, i as listDescendantRunsForRequester, ir as setTtsProvider, m as loadSymiPlugins, mn as normalizeSendPolicy, nr as resolveTtsProviderOrder, or as OPENAI_TTS_MODELS, rn as loadProviderUsageSummary, rr as setTtsEnabled, sr as OPENAI_TTS_VOICES, st as ensureOutboundSessionEntry, tn as normalizeGroupActivation, tr as resolveTtsPrefsPath, w as resolveAgentOutboundTarget, wn as isSystemEventContextChanged, wr as registerAgentRunContext, wt as writeRestartSentinel, x as agentCommand, xn as applyVerboseOverride, yt as formatDoctorNonInteractiveHint } from "./subagent-registry-
|
|
15
|
+
import { $n as resolveTtsAutoMode, B as dispatchInboundMessage, C as resolveAgentDeliveryPlan, Cn as enqueueSystemEvent, Cr as onAgentEvent, D as createOutboundSendDeps, Dt as normalizeCronJobPatch, Et as normalizeCronJobCreate, G as BARE_SESSION_RESET_PROMPT, Gn as stopSubagentsForRequester, Gt as persistBrowserProxyFiles, In as resolveAgentTimeoutMs, Jn as resolveUserTimezone, Qn as resolveTtsApiKey, Sn as parseVerboseOverride, V as createReplyDispatcher, Vn as formatZonedTimestamp, Wn as isAbortTrigger, Wt as applyBrowserProxyPaths, Xn as isTtsEnabled, Y as abortEmbeddedPiRun, Yn as getTtsProvider, Z as waitForEmbeddedPiRunEnd, Zn as isTtsProviderConfigured, Zt as scheduleGatewaySigusr1Restart, a as listSubagentRunsForRequester, ar as textToSpeech, bn as applyModelOverrideToSessionEntry, c as clearSessionQueues, ct as resolveOutboundSessionRoute, dt as resolveOutboundTarget, en as unbindThreadBindingsBySessionKey, er as resolveTtsConfig, hn as resolveSendPolicy, i as listDescendantRunsForRequester, ir as setTtsProvider, m as loadSymiPlugins, mn as normalizeSendPolicy, nr as resolveTtsProviderOrder, or as OPENAI_TTS_MODELS, rn as loadProviderUsageSummary, rr as setTtsEnabled, sr as OPENAI_TTS_VOICES, st as ensureOutboundSessionEntry, tn as normalizeGroupActivation, tr as resolveTtsPrefsPath, w as resolveAgentOutboundTarget, wn as isSystemEventContextChanged, wr as registerAgentRunContext, wt as writeRestartSentinel, x as agentCommand, xn as applyVerboseOverride, yt as formatDoctorNonInteractiveHint } from "./subagent-registry-DCoU9xIE.js";
|
|
16
16
|
import { F as resolveMainSessionKey, I as resolveMainSessionKeyFromConfig, J as normalizeSessionDeliveryFields, N as resolveAgentMainSessionKey, P as resolveExplicitAgentSessionKey, R as snapshotSessionOrigin, S as stripEnvelopeFromMessages, _ as capArrayByJsonBytes, d as updateSessionStore, g as archiveSessionTranscripts, h as archiveFileOnDisk, o as loadSessionStore, t as extractDeliveryInfo, v as readSessionMessages, x as resolveSessionTranscriptCandidates, y as readSessionPreviewItemsFromTranscript } from "./sessions-Cfa6JEB3.js";
|
|
17
17
|
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-CwSlLxM8.js";
|
|
18
18
|
import { n as createBrowserRouteDispatcher } from "./with-timeout-Cgi3TwWN.js";
|
|
@@ -30,21 +30,21 @@ import { t as getChannelActivity } from "./channel-activity-myOnmDZi.js";
|
|
|
30
30
|
import { n as normalizePollInput } from "./polls-DXeUmcgz.js";
|
|
31
31
|
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-rbSHSlcd.js";
|
|
32
32
|
import { i as parseAbsoluteTimeMs } from "./stagger-CQar2eKe.js";
|
|
33
|
-
import { w as resolveAssistantAvatarUrl } from "./onboard-helpers-
|
|
33
|
+
import { w as resolveAssistantAvatarUrl } from "./onboard-helpers-PpGrZIGw.js";
|
|
34
34
|
import { r as getLastHeartbeatEvent } from "./heartbeat-visibility-B8TDjqpW.js";
|
|
35
35
|
import { t as buildChannelUiCatalog } from "./catalog-DLQFKucJ.js";
|
|
36
36
|
import { t as WizardCancelledError } from "./prompts-m1IJwIAx.js";
|
|
37
37
|
import { t as resolveChannelDefaultAccountId } from "./helpers-cLP5YLeQ.js";
|
|
38
38
|
import { t as buildChannelAccountSnapshot } from "./status-BUedPCLb.js";
|
|
39
|
-
import { o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-
|
|
40
|
-
import { r as getStatusSummary } from "./status-
|
|
41
|
-
import { c as setHeartbeatsEnabled } from "./health-
|
|
39
|
+
import { o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-xSagQWH8.js";
|
|
40
|
+
import { r as getStatusSummary } from "./status-qkmUAeWo.js";
|
|
41
|
+
import { c as setHeartbeatsEnabled } from "./health-CsTxt66a.js";
|
|
42
42
|
import { m as normalizeUpdateChannel } from "./update-check-ZdimP1aU.js";
|
|
43
|
-
import { a as sendApnsAlert, c as parseMessageWithAttachments, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration } from "./push-apns-
|
|
44
|
-
import { a as pruneAgentConfig, i as loadAgentIdentity, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-
|
|
43
|
+
import { a as sendApnsAlert, c as parseMessageWithAttachments, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration } from "./push-apns-B5txhDVi.js";
|
|
44
|
+
import { a as pruneAgentConfig, i as loadAgentIdentity, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-C951ocyh.js";
|
|
45
45
|
import { t as resolveSystemRunCommand } from "./system-run-command-ByVa3txU.js";
|
|
46
46
|
import { t as installSkill } from "./skills-install-1ZdwGTnh.js";
|
|
47
|
-
import { t as runGatewayUpdate } from "./update-runner-
|
|
47
|
+
import { t as runGatewayUpdate } from "./update-runner-BhVsdpxm.js";
|
|
48
48
|
import { spawnSync } from "node:child_process";
|
|
49
49
|
import * as os$1 from "node:os";
|
|
50
50
|
import os from "node:os";
|
|
@@ -1176,6 +1176,144 @@ function timestampOptsFromConfig(cfg) {
|
|
|
1176
1176
|
return { timezone: resolveUserTimezone(cfg.agents?.defaults?.userTimezone) };
|
|
1177
1177
|
}
|
|
1178
1178
|
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region src/config/sessions/favorites.ts
|
|
1181
|
+
/**
|
|
1182
|
+
* Session favourites sidecar.
|
|
1183
|
+
*
|
|
1184
|
+
* Stores a set of "favourited" session files at
|
|
1185
|
+
* `<sessionsDir>/favorites.json`. Keyed by **filename** (basename), not
|
|
1186
|
+
* sessionId, because archived files (`.reset.<ts>` / `.deleted.<ts>`) can
|
|
1187
|
+
* share a UUID with an active `<uuid>.jsonl`. Filename is the unique
|
|
1188
|
+
* reference that survives restore/adopt/rename operations — we explicitly
|
|
1189
|
+
* rename the entry in the sidecar when the underlying file is renamed.
|
|
1190
|
+
*
|
|
1191
|
+
* Writes go through a tmp-file + rename cycle to preserve the old contents
|
|
1192
|
+
* if a write fails mid-flight. Reads are synchronous and cheap (the file
|
|
1193
|
+
* is small); no in-memory cache is maintained because the list endpoint
|
|
1194
|
+
* re-reads on every HTTP request anyway.
|
|
1195
|
+
*
|
|
1196
|
+
* @module
|
|
1197
|
+
*/
|
|
1198
|
+
const FAVORITES_FILE_NAME = "favorites.json";
|
|
1199
|
+
const EMPTY_FILE = {
|
|
1200
|
+
version: 1,
|
|
1201
|
+
files: []
|
|
1202
|
+
};
|
|
1203
|
+
function resolveFavoritesPath(agentId) {
|
|
1204
|
+
return path.join(resolveSessionTranscriptsDirForAgent(agentId), FAVORITES_FILE_NAME);
|
|
1205
|
+
}
|
|
1206
|
+
function readFavoritesFile(favPath) {
|
|
1207
|
+
if (!fs.existsSync(favPath)) return { ...EMPTY_FILE };
|
|
1208
|
+
try {
|
|
1209
|
+
const raw = fs.readFileSync(favPath, "utf-8");
|
|
1210
|
+
const parsed = JSON.parse(raw);
|
|
1211
|
+
return {
|
|
1212
|
+
version: 1,
|
|
1213
|
+
files: Array.isArray(parsed?.files) ? parsed.files.filter((f) => typeof f === "string" && f.length > 0) : []
|
|
1214
|
+
};
|
|
1215
|
+
} catch {
|
|
1216
|
+
return { ...EMPTY_FILE };
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
function writeFavoritesFileAtomic(favPath, file) {
|
|
1220
|
+
fs.mkdirSync(path.dirname(favPath), { recursive: true });
|
|
1221
|
+
const tmp = `${favPath}.${process.pid}.${randomUUID()}.tmp`;
|
|
1222
|
+
try {
|
|
1223
|
+
fs.writeFileSync(tmp, JSON.stringify(file, null, 2), {
|
|
1224
|
+
mode: 384,
|
|
1225
|
+
encoding: "utf-8"
|
|
1226
|
+
});
|
|
1227
|
+
fs.renameSync(tmp, favPath);
|
|
1228
|
+
} catch (err) {
|
|
1229
|
+
try {
|
|
1230
|
+
fs.rmSync(tmp, { force: true });
|
|
1231
|
+
} catch {}
|
|
1232
|
+
throw err;
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Load the set of favourited filenames for an agent. Returns an empty set if
|
|
1237
|
+
* the sidecar file is missing or corrupt. Never throws.
|
|
1238
|
+
*/
|
|
1239
|
+
function loadFavoritesSet(agentId) {
|
|
1240
|
+
try {
|
|
1241
|
+
const file = readFavoritesFile(resolveFavoritesPath(agentId));
|
|
1242
|
+
return new Set(file.files);
|
|
1243
|
+
} catch {
|
|
1244
|
+
return /* @__PURE__ */ new Set();
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
/**
|
|
1248
|
+
* Set the favourited flag for a file. If `favorited` is true and the file is
|
|
1249
|
+
* already present, or false and already absent, this is a no-op. Returns the
|
|
1250
|
+
* new favourited state (so callers can echo it back in an RPC response).
|
|
1251
|
+
*/
|
|
1252
|
+
function setFavorite(file, favorited, agentId) {
|
|
1253
|
+
const favPath = resolveFavoritesPath(agentId);
|
|
1254
|
+
const current = readFavoritesFile(favPath);
|
|
1255
|
+
const set = new Set(current.files);
|
|
1256
|
+
const had = set.has(file);
|
|
1257
|
+
if (favorited && !had) set.add(file);
|
|
1258
|
+
else if (!favorited && had) set.delete(file);
|
|
1259
|
+
else return favorited;
|
|
1260
|
+
writeFavoritesFileAtomic(favPath, {
|
|
1261
|
+
version: 1,
|
|
1262
|
+
files: [...set].toSorted()
|
|
1263
|
+
});
|
|
1264
|
+
return favorited;
|
|
1265
|
+
}
|
|
1266
|
+
/**
|
|
1267
|
+
* Rename a favourites entry. Called by adoptFile/restore when a file on disk
|
|
1268
|
+
* is renamed (e.g. `<uuid>.jsonl.reset.<ts>` → `<uuid>.jsonl`). If `oldFile`
|
|
1269
|
+
* wasn't favourited, this is a no-op. If both `oldFile` and `newFile` are
|
|
1270
|
+
* favourited (unlikely but possible), the `oldFile` entry is simply dropped.
|
|
1271
|
+
*/
|
|
1272
|
+
function renameFavoriteEntry(oldFile, newFile, agentId) {
|
|
1273
|
+
const favPath = resolveFavoritesPath(agentId);
|
|
1274
|
+
const current = readFavoritesFile(favPath);
|
|
1275
|
+
const set = new Set(current.files);
|
|
1276
|
+
if (!set.has(oldFile)) return;
|
|
1277
|
+
set.delete(oldFile);
|
|
1278
|
+
set.add(newFile);
|
|
1279
|
+
writeFavoritesFileAtomic(favPath, {
|
|
1280
|
+
version: 1,
|
|
1281
|
+
files: [...set].toSorted()
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Drop an entry from the sidecar regardless of current state. Used when a
|
|
1286
|
+
* file is permanently deleted so we don't keep a stale favourite pointing at
|
|
1287
|
+
* something that no longer exists. No-op if absent.
|
|
1288
|
+
*/
|
|
1289
|
+
function dropFavoriteEntry(file, agentId) {
|
|
1290
|
+
const favPath = resolveFavoritesPath(agentId);
|
|
1291
|
+
const current = readFavoritesFile(favPath);
|
|
1292
|
+
if (!current.files.includes(file)) return;
|
|
1293
|
+
writeFavoritesFileAtomic(favPath, {
|
|
1294
|
+
version: 1,
|
|
1295
|
+
files: current.files.filter((f) => f !== file).toSorted()
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
/**
|
|
1299
|
+
* Reconcile the sidecar against an authoritative set of filenames that still
|
|
1300
|
+
* exist on disk. Drops any favourites whose files are missing. Safe to call
|
|
1301
|
+
* on every list operation — the write only happens when something changes.
|
|
1302
|
+
* Returns the reconciled set.
|
|
1303
|
+
*/
|
|
1304
|
+
function reconcileFavorites(existingFiles, agentId) {
|
|
1305
|
+
const existingSet = new Set(existingFiles);
|
|
1306
|
+
const favPath = resolveFavoritesPath(agentId);
|
|
1307
|
+
const current = readFavoritesFile(favPath);
|
|
1308
|
+
const keep = current.files.filter((f) => existingSet.has(f));
|
|
1309
|
+
if (keep.length === current.files.length) return new Set(current.files);
|
|
1310
|
+
writeFavoritesFileAtomic(favPath, {
|
|
1311
|
+
version: 1,
|
|
1312
|
+
files: keep.toSorted()
|
|
1313
|
+
});
|
|
1314
|
+
return new Set(keep);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1179
1317
|
//#endregion
|
|
1180
1318
|
//#region src/gateway/sessions-patch.ts
|
|
1181
1319
|
function invalid(message) {
|
|
@@ -1610,12 +1748,216 @@ async function emitSessionUnboundLifecycleEvent(params) {
|
|
|
1610
1748
|
}, { childSessionKey: params.targetSessionKey });
|
|
1611
1749
|
}
|
|
1612
1750
|
/**
|
|
1613
|
-
* Per-session in-flight lock
|
|
1614
|
-
*
|
|
1615
|
-
*
|
|
1751
|
+
* Per-session in-flight lock shared by `sessions.restore` and
|
|
1752
|
+
* `sessions.adoptFile`. Prevents two concurrent adoption calls for the same
|
|
1753
|
+
* session key from corrupting each other (e.g. one archives the active
|
|
1754
|
+
* transcript while the other is mid-rename). Keyed by canonical session key.
|
|
1616
1755
|
*/
|
|
1617
1756
|
const restoreInFlight = /* @__PURE__ */ new Set();
|
|
1618
1757
|
/**
|
|
1758
|
+
* Classify a target file basename into the adoption mode we need to take.
|
|
1759
|
+
* - `archived`: a `.reset.<ts>` / `.deleted.<ts>` transcript that must be
|
|
1760
|
+
* renamed back to `<sessionId>.jsonl`.
|
|
1761
|
+
* - `active`: a plain `<sessionId>.jsonl` that may already be owned by
|
|
1762
|
+
* another session key in the registry; we adopt it by dropping the other
|
|
1763
|
+
* key's entry (if any) and pointing ours at it. No filesystem rename.
|
|
1764
|
+
*/
|
|
1765
|
+
function classifyTargetFile(basename) {
|
|
1766
|
+
if (/\.jsonl\.reset\./.test(basename)) return {
|
|
1767
|
+
kind: "archived",
|
|
1768
|
+
reason: "reset"
|
|
1769
|
+
};
|
|
1770
|
+
if (/\.jsonl\.deleted\./.test(basename)) return {
|
|
1771
|
+
kind: "archived",
|
|
1772
|
+
reason: "deleted"
|
|
1773
|
+
};
|
|
1774
|
+
if (/^[A-Za-z0-9][\w.-]*\.jsonl$/.test(basename)) return { kind: "active" };
|
|
1775
|
+
return null;
|
|
1776
|
+
}
|
|
1777
|
+
async function performAdoptFile(params) {
|
|
1778
|
+
const { key } = params;
|
|
1779
|
+
const targetBasename = path.basename(params.targetFile);
|
|
1780
|
+
if (targetBasename !== params.targetFile || targetBasename.includes("..") || targetBasename.length === 0) return {
|
|
1781
|
+
ok: false,
|
|
1782
|
+
errorCode: "INVALID_REQUEST",
|
|
1783
|
+
errorMessage: "Invalid target file name."
|
|
1784
|
+
};
|
|
1785
|
+
const classification = classifyTargetFile(targetBasename);
|
|
1786
|
+
if (!classification) return {
|
|
1787
|
+
ok: false,
|
|
1788
|
+
errorCode: "INVALID_REQUEST",
|
|
1789
|
+
errorMessage: "Target file is not a recognised session transcript."
|
|
1790
|
+
};
|
|
1791
|
+
const { cfg, target, storePath } = resolveGatewaySessionTargetFromKey(key);
|
|
1792
|
+
const sessionsDir = path.dirname(storePath);
|
|
1793
|
+
const targetPath = path.join(sessionsDir, targetBasename);
|
|
1794
|
+
if (!fs.existsSync(targetPath)) return {
|
|
1795
|
+
ok: false,
|
|
1796
|
+
errorCode: "INVALID_REQUEST",
|
|
1797
|
+
errorMessage: `Target file not found: ${targetBasename}`
|
|
1798
|
+
};
|
|
1799
|
+
let restoredSessionId;
|
|
1800
|
+
try {
|
|
1801
|
+
const firstLine = fs.readFileSync(targetPath, "utf8").split("\n")[0] ?? "";
|
|
1802
|
+
const header = JSON.parse(firstLine);
|
|
1803
|
+
if (!header.id || header.type !== "session") throw new Error("invalid session header");
|
|
1804
|
+
restoredSessionId = header.id;
|
|
1805
|
+
} catch {
|
|
1806
|
+
return {
|
|
1807
|
+
ok: false,
|
|
1808
|
+
errorCode: "INVALID_REQUEST",
|
|
1809
|
+
errorMessage: "Target file is not a valid session transcript."
|
|
1810
|
+
};
|
|
1811
|
+
}
|
|
1812
|
+
const lockKey = target.canonicalKey ?? key;
|
|
1813
|
+
if (restoreInFlight.has(lockKey)) return {
|
|
1814
|
+
ok: false,
|
|
1815
|
+
errorCode: "UNAVAILABLE",
|
|
1816
|
+
errorMessage: `Adopt already in progress for session ${lockKey}; try again in a moment.`
|
|
1817
|
+
};
|
|
1818
|
+
restoreInFlight.add(lockKey);
|
|
1819
|
+
const rollback = [];
|
|
1820
|
+
try {
|
|
1821
|
+
const { entry: currentEntry } = loadSessionEntry(key);
|
|
1822
|
+
const cleanupError = await ensureSessionRuntimeCleanup({
|
|
1823
|
+
cfg,
|
|
1824
|
+
key,
|
|
1825
|
+
target,
|
|
1826
|
+
sessionId: currentEntry?.sessionId
|
|
1827
|
+
});
|
|
1828
|
+
if (cleanupError) return {
|
|
1829
|
+
ok: false,
|
|
1830
|
+
errorCode: "UNAVAILABLE",
|
|
1831
|
+
errorMessage: cleanupError.message ?? "runtime cleanup failed"
|
|
1832
|
+
};
|
|
1833
|
+
if (currentEntry?.sessionId === restoredSessionId && classification.kind === "active") return {
|
|
1834
|
+
ok: true,
|
|
1835
|
+
sessionId: restoredSessionId,
|
|
1836
|
+
canonicalKey: target.canonicalKey,
|
|
1837
|
+
entry: currentEntry,
|
|
1838
|
+
restoredFileName: targetBasename,
|
|
1839
|
+
droppedSourceKeys: []
|
|
1840
|
+
};
|
|
1841
|
+
const archivedPaths = archiveSessionTranscriptsForSession({
|
|
1842
|
+
sessionId: currentEntry?.sessionId,
|
|
1843
|
+
storePath,
|
|
1844
|
+
sessionFile: currentEntry?.sessionFile,
|
|
1845
|
+
agentId: target.agentId,
|
|
1846
|
+
reason: "reset"
|
|
1847
|
+
});
|
|
1848
|
+
for (const archived of archivedPaths) {
|
|
1849
|
+
const archivedBasename = path.basename(archived);
|
|
1850
|
+
const originalBasename = archivedBasename.replace(/\.reset\.[^/]+$/, "");
|
|
1851
|
+
rollback.push({
|
|
1852
|
+
desc: `un-archive ${archivedBasename}`,
|
|
1853
|
+
fn: () => {
|
|
1854
|
+
renameArchivedBackToOriginal(archived, "reset");
|
|
1855
|
+
if (originalBasename && originalBasename !== archivedBasename) renameFavoriteEntry(archivedBasename, originalBasename, target.agentId);
|
|
1856
|
+
}
|
|
1857
|
+
});
|
|
1858
|
+
if (originalBasename && originalBasename !== archivedBasename) renameFavoriteEntry(originalBasename, archivedBasename, target.agentId);
|
|
1859
|
+
}
|
|
1860
|
+
const restoredFileName = `${restoredSessionId}.jsonl`;
|
|
1861
|
+
const restoredPath = path.join(sessionsDir, restoredFileName);
|
|
1862
|
+
if (classification.kind === "archived" && targetPath !== restoredPath) {
|
|
1863
|
+
fs.renameSync(targetPath, restoredPath);
|
|
1864
|
+
rollback.push({
|
|
1865
|
+
desc: `re-archive ${restoredPath} to ${targetPath}`,
|
|
1866
|
+
fn: () => {
|
|
1867
|
+
try {
|
|
1868
|
+
fs.renameSync(restoredPath, targetPath);
|
|
1869
|
+
} catch (err) {
|
|
1870
|
+
console.warn(`[sessions.adoptFile] rollback: rename ${restoredPath} → ${targetPath} failed: ${String(err)}`);
|
|
1871
|
+
}
|
|
1872
|
+
renameFavoriteEntry(restoredFileName, targetBasename, target.agentId);
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1875
|
+
renameFavoriteEntry(targetBasename, restoredFileName, target.agentId);
|
|
1876
|
+
}
|
|
1877
|
+
const droppedSourceKeys = [];
|
|
1878
|
+
let droppedSourceEntries = [];
|
|
1879
|
+
const next = await updateSessionStore(storePath, (store) => {
|
|
1880
|
+
const { primaryKey } = migrateAndPruneSessionStoreKey({
|
|
1881
|
+
cfg,
|
|
1882
|
+
key,
|
|
1883
|
+
store
|
|
1884
|
+
});
|
|
1885
|
+
if (classification.kind === "active") for (const [otherKey, otherEntry] of Object.entries(store)) {
|
|
1886
|
+
if (otherKey === primaryKey) continue;
|
|
1887
|
+
if (otherEntry?.sessionId === restoredSessionId) {
|
|
1888
|
+
droppedSourceEntries.push({
|
|
1889
|
+
key: otherKey,
|
|
1890
|
+
entry: otherEntry
|
|
1891
|
+
});
|
|
1892
|
+
droppedSourceKeys.push(otherKey);
|
|
1893
|
+
delete store[otherKey];
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
const existingEntry = store[primaryKey];
|
|
1897
|
+
const nextEntry = {
|
|
1898
|
+
sessionId: restoredSessionId,
|
|
1899
|
+
sessionFile: restoredPath,
|
|
1900
|
+
updatedAt: Date.now(),
|
|
1901
|
+
systemSent: false,
|
|
1902
|
+
abortedLastRun: false,
|
|
1903
|
+
thinkingLevel: existingEntry?.thinkingLevel,
|
|
1904
|
+
verboseLevel: existingEntry?.verboseLevel,
|
|
1905
|
+
reasoningLevel: existingEntry?.reasoningLevel,
|
|
1906
|
+
responseUsage: existingEntry?.responseUsage,
|
|
1907
|
+
model: existingEntry?.model,
|
|
1908
|
+
contextTokens: existingEntry?.contextTokens,
|
|
1909
|
+
sendPolicy: existingEntry?.sendPolicy,
|
|
1910
|
+
label: existingEntry?.label,
|
|
1911
|
+
origin: snapshotSessionOrigin(existingEntry),
|
|
1912
|
+
lastChannel: existingEntry?.lastChannel,
|
|
1913
|
+
lastTo: existingEntry?.lastTo,
|
|
1914
|
+
skillsSnapshot: existingEntry?.skillsSnapshot,
|
|
1915
|
+
inputTokens: 0,
|
|
1916
|
+
outputTokens: 0,
|
|
1917
|
+
totalTokens: 0,
|
|
1918
|
+
totalTokensFresh: true
|
|
1919
|
+
};
|
|
1920
|
+
store[primaryKey] = nextEntry;
|
|
1921
|
+
return nextEntry;
|
|
1922
|
+
});
|
|
1923
|
+
if (droppedSourceEntries.length > 0) {
|
|
1924
|
+
const restoreEntries = droppedSourceEntries.slice();
|
|
1925
|
+
rollback.push({
|
|
1926
|
+
desc: `restore ${restoreEntries.length} source registry entry/entries`,
|
|
1927
|
+
fn: () => {
|
|
1928
|
+
updateSessionStore(storePath, (store) => {
|
|
1929
|
+
for (const { key: k, entry: e } of restoreEntries) store[k] = e;
|
|
1930
|
+
}).catch((err) => {
|
|
1931
|
+
console.warn(`[sessions.adoptFile] rollback: could not restore source entries: ${String(err)}`);
|
|
1932
|
+
});
|
|
1933
|
+
}
|
|
1934
|
+
});
|
|
1935
|
+
}
|
|
1936
|
+
rollback.length = 0;
|
|
1937
|
+
return {
|
|
1938
|
+
ok: true,
|
|
1939
|
+
sessionId: restoredSessionId,
|
|
1940
|
+
canonicalKey: target.canonicalKey,
|
|
1941
|
+
entry: next,
|
|
1942
|
+
restoredFileName,
|
|
1943
|
+
droppedSourceKeys
|
|
1944
|
+
};
|
|
1945
|
+
} catch (err) {
|
|
1946
|
+
console.warn(`[sessions.adoptFile] failed for ${lockKey}; running ${rollback.length} rollback step(s): ${String(err)}`);
|
|
1947
|
+
for (let i = rollback.length - 1; i >= 0; i--) {
|
|
1948
|
+
const step = rollback[i];
|
|
1949
|
+
if (step) step.fn();
|
|
1950
|
+
}
|
|
1951
|
+
return {
|
|
1952
|
+
ok: false,
|
|
1953
|
+
errorCode: "UNAVAILABLE",
|
|
1954
|
+
errorMessage: `Adopt failed: ${err instanceof Error ? err.message : String(err)}`
|
|
1955
|
+
};
|
|
1956
|
+
} finally {
|
|
1957
|
+
restoreInFlight.delete(lockKey);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
/**
|
|
1619
1961
|
* Best-effort inverse of `archiveFileOnDisk(file, "reset")` — renames
|
|
1620
1962
|
* `<file>.reset.<timestamp>` back to `<file>`. Used by the sessions.restore
|
|
1621
1963
|
* rollback path when a later step fails after the current transcript was
|
|
@@ -1862,129 +2204,104 @@ const sessionsHandlers = {
|
|
|
1862
2204
|
const p = params;
|
|
1863
2205
|
const key = requireSessionKey(p.key, respond);
|
|
1864
2206
|
if (!key) return;
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1867
|
-
|
|
2207
|
+
const outcome = await performAdoptFile({
|
|
2208
|
+
key,
|
|
2209
|
+
targetFile: p.targetFile
|
|
2210
|
+
});
|
|
2211
|
+
if (!outcome.ok) {
|
|
2212
|
+
respond(false, void 0, errorShape(ErrorCodes[outcome.errorCode], outcome.errorMessage));
|
|
1868
2213
|
return;
|
|
1869
2214
|
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
2215
|
+
respond(true, {
|
|
2216
|
+
ok: true,
|
|
2217
|
+
key: outcome.canonicalKey,
|
|
2218
|
+
sessionId: outcome.sessionId,
|
|
2219
|
+
entry: outcome.entry
|
|
2220
|
+
}, void 0);
|
|
2221
|
+
},
|
|
2222
|
+
"sessions.adoptFile": async ({ params, respond }) => {
|
|
2223
|
+
if (!assertValidParams(params, validateSessionsAdoptFileParams, "sessions.adoptFile", respond)) return;
|
|
2224
|
+
const p = params;
|
|
2225
|
+
const key = requireSessionKey(p.key, respond);
|
|
2226
|
+
if (!key) return;
|
|
2227
|
+
const outcome = await performAdoptFile({
|
|
2228
|
+
key,
|
|
2229
|
+
targetFile: p.targetFile
|
|
2230
|
+
});
|
|
2231
|
+
if (!outcome.ok) {
|
|
2232
|
+
respond(false, void 0, errorShape(ErrorCodes[outcome.errorCode], outcome.errorMessage));
|
|
1875
2233
|
return;
|
|
1876
2234
|
}
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
2235
|
+
respond(true, {
|
|
2236
|
+
ok: true,
|
|
2237
|
+
key: outcome.canonicalKey,
|
|
2238
|
+
sessionId: outcome.sessionId,
|
|
2239
|
+
entry: outcome.entry,
|
|
2240
|
+
file: outcome.restoredFileName,
|
|
2241
|
+
droppedSourceKeys: outcome.droppedSourceKeys
|
|
2242
|
+
}, void 0);
|
|
2243
|
+
},
|
|
2244
|
+
"sessions.favoriteFile": ({ params, respond }) => {
|
|
2245
|
+
if (!assertValidParams(params, validateSessionsFavoriteFileParams, "sessions.favoriteFile", respond)) return;
|
|
2246
|
+
const p = params;
|
|
2247
|
+
const file = path.basename(p.file);
|
|
2248
|
+
if (file !== p.file || file.includes("..") || file.length === 0) {
|
|
2249
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Invalid file name."));
|
|
1885
2250
|
return;
|
|
1886
2251
|
}
|
|
1887
|
-
const
|
|
1888
|
-
|
|
1889
|
-
|
|
2252
|
+
const agentId = resolveDefaultAgentId(loadConfig());
|
|
2253
|
+
const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId);
|
|
2254
|
+
const abs = path.join(sessionsDir, file);
|
|
2255
|
+
if (!fs.existsSync(abs)) {
|
|
2256
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Session file not found: ${file}`));
|
|
1890
2257
|
return;
|
|
1891
2258
|
}
|
|
1892
|
-
restoreInFlight.add(lockKey);
|
|
1893
|
-
const rollback = [];
|
|
1894
|
-
let responded = false;
|
|
1895
2259
|
try {
|
|
1896
|
-
const { entry } = loadSessionEntry(key);
|
|
1897
|
-
const sessionId = entry?.sessionId;
|
|
1898
|
-
const cleanupError = await ensureSessionRuntimeCleanup({
|
|
1899
|
-
cfg,
|
|
1900
|
-
key,
|
|
1901
|
-
target,
|
|
1902
|
-
sessionId
|
|
1903
|
-
});
|
|
1904
|
-
if (cleanupError) {
|
|
1905
|
-
respond(false, void 0, cleanupError);
|
|
1906
|
-
responded = true;
|
|
1907
|
-
return;
|
|
1908
|
-
}
|
|
1909
|
-
const archivedPaths = archiveSessionTranscriptsForSession({
|
|
1910
|
-
sessionId: entry?.sessionId,
|
|
1911
|
-
storePath,
|
|
1912
|
-
sessionFile: entry?.sessionFile,
|
|
1913
|
-
agentId: target.agentId,
|
|
1914
|
-
reason: "reset"
|
|
1915
|
-
});
|
|
1916
|
-
for (const archived of archivedPaths) rollback.push({
|
|
1917
|
-
desc: `un-archive ${archived}`,
|
|
1918
|
-
fn: () => renameArchivedBackToOriginal(archived, "reset")
|
|
1919
|
-
});
|
|
1920
|
-
const restoredFileName = `${restoredSessionId}.jsonl`;
|
|
1921
|
-
const restoredPath = path.join(sessionsDir, restoredFileName);
|
|
1922
|
-
if (targetPath !== restoredPath) {
|
|
1923
|
-
fs.renameSync(targetPath, restoredPath);
|
|
1924
|
-
rollback.push({
|
|
1925
|
-
desc: `re-archive ${restoredPath} to ${targetPath}`,
|
|
1926
|
-
fn: () => {
|
|
1927
|
-
try {
|
|
1928
|
-
fs.renameSync(restoredPath, targetPath);
|
|
1929
|
-
} catch (err) {
|
|
1930
|
-
console.warn(`[sessions.restore] rollback failed: could not rename ${restoredPath} back to ${targetPath}: ${String(err)}`);
|
|
1931
|
-
}
|
|
1932
|
-
}
|
|
1933
|
-
});
|
|
1934
|
-
}
|
|
1935
|
-
const next = await updateSessionStore(storePath, (store) => {
|
|
1936
|
-
const { primaryKey } = migrateAndPruneSessionStoreKey({
|
|
1937
|
-
cfg,
|
|
1938
|
-
key,
|
|
1939
|
-
store
|
|
1940
|
-
});
|
|
1941
|
-
const existingEntry = store[primaryKey];
|
|
1942
|
-
const nextEntry = {
|
|
1943
|
-
sessionId: restoredSessionId,
|
|
1944
|
-
sessionFile: restoredPath,
|
|
1945
|
-
updatedAt: Date.now(),
|
|
1946
|
-
systemSent: false,
|
|
1947
|
-
abortedLastRun: false,
|
|
1948
|
-
thinkingLevel: existingEntry?.thinkingLevel,
|
|
1949
|
-
verboseLevel: existingEntry?.verboseLevel,
|
|
1950
|
-
reasoningLevel: existingEntry?.reasoningLevel,
|
|
1951
|
-
responseUsage: existingEntry?.responseUsage,
|
|
1952
|
-
model: existingEntry?.model,
|
|
1953
|
-
contextTokens: existingEntry?.contextTokens,
|
|
1954
|
-
sendPolicy: existingEntry?.sendPolicy,
|
|
1955
|
-
label: existingEntry?.label,
|
|
1956
|
-
origin: snapshotSessionOrigin(existingEntry),
|
|
1957
|
-
lastChannel: existingEntry?.lastChannel,
|
|
1958
|
-
lastTo: existingEntry?.lastTo,
|
|
1959
|
-
skillsSnapshot: existingEntry?.skillsSnapshot,
|
|
1960
|
-
inputTokens: 0,
|
|
1961
|
-
outputTokens: 0,
|
|
1962
|
-
totalTokens: 0,
|
|
1963
|
-
totalTokensFresh: true
|
|
1964
|
-
};
|
|
1965
|
-
store[primaryKey] = nextEntry;
|
|
1966
|
-
return nextEntry;
|
|
1967
|
-
});
|
|
1968
|
-
rollback.length = 0;
|
|
1969
2260
|
respond(true, {
|
|
1970
2261
|
ok: true,
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
entry: next
|
|
2262
|
+
file,
|
|
2263
|
+
favorited: setFavorite(file, p.favorited, agentId)
|
|
1974
2264
|
}, void 0);
|
|
1975
|
-
responded = true;
|
|
1976
2265
|
} catch (err) {
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
2266
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `Favorite write failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
2267
|
+
}
|
|
2268
|
+
},
|
|
2269
|
+
"sessions.deleteFile": async ({ params, respond }) => {
|
|
2270
|
+
if (!assertValidParams(params, validateSessionsDeleteFileParams, "sessions.deleteFile", respond)) return;
|
|
2271
|
+
const p = params;
|
|
2272
|
+
const file = path.basename(p.file);
|
|
2273
|
+
if (file !== p.file || file.includes("..") || file.length === 0) {
|
|
2274
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "Invalid file name."));
|
|
2275
|
+
return;
|
|
2276
|
+
}
|
|
2277
|
+
const cfg = loadConfig();
|
|
2278
|
+
const agentId = resolveDefaultAgentId(cfg);
|
|
2279
|
+
const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId);
|
|
2280
|
+
const abs = path.join(sessionsDir, file);
|
|
2281
|
+
if (!fs.existsSync(abs)) {
|
|
2282
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Session file not found: ${file}`));
|
|
2283
|
+
return;
|
|
2284
|
+
}
|
|
2285
|
+
const { store } = loadCombinedSessionStoreForGateway(cfg);
|
|
2286
|
+
if (classifyTargetFile(file)?.kind === "active") {
|
|
2287
|
+
const sessionId = file.match(/^(.+)\.jsonl$/)?.[1];
|
|
2288
|
+
if (sessionId) {
|
|
2289
|
+
const referrer = Object.entries(store).find(([, entry]) => entry?.sessionId === sessionId)?.[0];
|
|
2290
|
+
if (referrer) {
|
|
2291
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `File is still bound to session key ${referrer}; use sessions.delete on that key to archive it first.`));
|
|
2292
|
+
return;
|
|
2293
|
+
}
|
|
1985
2294
|
}
|
|
1986
|
-
}
|
|
1987
|
-
|
|
2295
|
+
}
|
|
2296
|
+
try {
|
|
2297
|
+
fs.unlinkSync(abs);
|
|
2298
|
+
dropFavoriteEntry(file, agentId);
|
|
2299
|
+
respond(true, {
|
|
2300
|
+
ok: true,
|
|
2301
|
+
file
|
|
2302
|
+
}, void 0);
|
|
2303
|
+
} catch (err) {
|
|
2304
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `Delete failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
1988
2305
|
}
|
|
1989
2306
|
},
|
|
1990
2307
|
"sessions.delete": async ({ params, respond, client, isWebchatConnect }) => {
|
|
@@ -7008,7 +7325,7 @@ const nodeHandlers = {
|
|
|
7008
7325
|
const p = params;
|
|
7009
7326
|
const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
|
|
7010
7327
|
await respondUnavailableOnThrow(respond, async () => {
|
|
7011
|
-
const { handleNodeEvent } = await import("./server-node-events-
|
|
7328
|
+
const { handleNodeEvent } = await import("./server-node-events-DCbzFyQF.js");
|
|
7012
7329
|
const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
|
|
7013
7330
|
await handleNodeEvent({
|
|
7014
7331
|
deps: context.deps,
|
|
@@ -9073,4 +9390,4 @@ async function handleGatewayRequest(opts) {
|
|
|
9073
9390
|
}
|
|
9074
9391
|
|
|
9075
9392
|
//#endregion
|
|
9076
|
-
export {
|
|
9393
|
+
export { startGatewayConfigReloader as C, resolveCronRunLogPath as S, MAX_PAYLOAD_BYTES as _, loadFavoritesSet as a, abortChatRunById as b, resolveAssistantIdentity as c, formatError as d, loadVoiceWakeConfig as f, MAX_BUFFERED_BYTES as g, HEALTH_REFRESH_INTERVAL_MS as h, safeParseJson as i, listSystemPresence as l, DEDUPE_TTL_MS as m, handleGatewayRequest as n, reconcileFavorites as o, DEDUPE_MAX as p, broadcastPresenceSnapshot as r, DEFAULT_ASSISTANT_IDENTITY as s, coreGatewayHandlers as t, upsertPresence as u, TICK_INTERVAL_MS as v, appendCronRunLog as x, getHandshakeTimeoutMs as y };
|