remoteclaw 0.2.0 → 0.2.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/{accounts-Qulj3jS8.js → accounts-B0V43QEN.js} +1 -1
- package/dist/{accounts-PoAEsvXo.js → accounts-DObM4hAF.js} +2 -2
- package/dist/{accounts-C_7Xc5wa.js → accounts-DZ4c6f7x.js} +1 -1
- package/dist/{active-listener-nMUQ-dVt.js → active-listener-DVLYzYd3.js} +1 -1
- package/dist/{agent-O04J-JEw.js → agent-B2leLOo0.js} +377 -355
- package/dist/{agent-scope-wbu0VZoq.js → agent-scope-CYJrXxD6.js} +1 -1
- package/dist/{agents-BbQIzW1N.js → agents-Eg0_nSnn.js} +1 -1
- package/dist/{banner-DONy2WbW.js → banner-B52X-rEb.js} +1 -1
- package/dist/{bindings-0dx8vqz9.js → bindings-AUVd82yI.js} +2 -2
- package/dist/boot/handler.js +46 -46
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-D47P56pj.js → channel-activity-Bydtz0cv.js} +2 -2
- package/dist/{channel-options-DWOSBsjN.js → channel-options-CD6ZBbON.js} +1 -1
- package/dist/{channel-options-JoYluwGr.js → channel-options-h1pCAx0w.js} +1 -1
- package/dist/{channel-web-YLHk99fU.js → channel-web-DbNWyl5A.js} +2 -2
- package/dist/{channel-web-Cvf5FKyf.js → channel-web-FA7MGFJO.js} +2 -2
- package/dist/{channels-cli-Be0_n1L2.js → channels-cli-BIArqz2T.js} +9 -9
- package/dist/{channels-cli-BoDA0aQ1.js → channels-cli-BZ5sRWaP.js} +9 -9
- package/dist/{chunk-C5Oai9vm.js → chunk-0ZB8yVlw.js} +1 -1
- package/dist/{cli-BEOzFl_6.js → cli-C8XFOFxS.js} +5 -5
- package/dist/{cli-D1ORFJ6n.js → cli-ifZiERUK.js} +5 -5
- package/dist/command-logger/handler.js +1 -1
- package/dist/{command-registry-D6LIEhaY.js → command-registry-kxjFHjjE.js} +9 -9
- package/dist/{commands-registry-CB3qR3Ui.js → commands-registry-BQrQnwzJ.js} +3 -3
- package/dist/{completion-cli-ohSjYC4v.js → completion-cli-eH6YXa0H.js} +1 -1
- package/dist/{completion-cli-D93-g9B7.js → completion-cli-wYa36YaL.js} +2 -2
- package/dist/{config-Ca5Dfk8O.js → config-BIrnJuXL.js} +8 -8
- package/dist/{config-cli-CJ1S3_VC.js → config-cli-BfJacpda.js} +1 -1
- package/dist/{config-cli-uJUr7Pe-.js → config-cli-CkJFUL61.js} +1 -1
- package/dist/{configure-CXjIsq-V.js → configure-C9cTz03s.js} +2 -2
- package/dist/{configure-BAlORoYU.js → configure-Dh-yP8hn.js} +2 -2
- package/dist/{deliver-BGpFaGMz.js → deliver-B5eZoNwr.js} +2 -2
- package/dist/{deliver-D3lJfcWr.js → deliver-Cu2kD7-u.js} +2 -2
- package/dist/{deliver-BTjGqSGN.js → deliver-z04wZfnQ.js} +8 -8
- package/dist/{dock-C0qWBS5h.js → dock-BQ3iSblF.js} +5 -5
- package/dist/{doctor-completion-CKGabXFn.js → doctor-completion-Cz3-0qwJ.js} +1 -1
- package/dist/{doctor-completion-Bo9yo8-v.js → doctor-completion-D6DqtWrm.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{env-Bs-DOhs6.js → env-D3fELH5B.js} +1 -1
- package/dist/{errors-bgTXk4n7.js → errors-Bg7BK273.js} +1 -1
- package/dist/extensionAPI.js +23 -1
- package/dist/{fetch-C-q-x9xS.js → fetch--eFpeNac.js} +3 -3
- package/dist/{fetch-B_D1a6ac.js → fetch-C3R1kkzO.js} +1 -1
- package/dist/{gateway-cli-DC1V6Fdf.js → gateway-cli-DuMZZmMm.js} +23 -14
- package/dist/{gateway-cli-CUPV9YIf.js → gateway-cli-ZPbldBb7.js} +23 -14
- package/dist/{health-D5YyZkng.js → health-6NZ23ZCc.js} +5 -5
- package/dist/{health-uTVcqwOx.js → health-D6T18gwU.js} +5 -5
- package/dist/{heartbeat-visibility-Z_3IqRgn.js → heartbeat-visibility-CXLlnSbK.js} +1 -1
- package/dist/{heartbeat-visibility-GeWWsF3e.js → heartbeat-visibility-CksK28e2.js} +1 -1
- package/dist/{hook-runner-global-D8bMcDPD.js → hook-runner-global-DPdZsDAH.js} +1 -1
- package/dist/{hooks-cli-DToXVDBQ.js → hooks-cli-CQAdRG0h.js} +6 -6
- package/dist/{hooks-cli-CpWC6lUu.js → hooks-cli-c8IB_ozo.js} +6 -6
- package/dist/{image-ops-CAVojpnw.js → image-ops-CD4YRYFY.js} +2 -2
- package/dist/index.js +10 -10
- package/dist/{ir-CDjoXuIW.js → ir-BK7K3Bbu.js} +6 -6
- package/dist/{logger-Bp0X6yHd.js → logger-BKFID___.js} +1 -1
- package/dist/{login-DWKSrC5K.js → login-BYHOjw55.js} +6 -6
- package/dist/{login-qr-C7zaGKxz.js → login-qr-ZRBRz2BA.js} +8 -8
- package/dist/{markdown-tables-Bm7xJUcn.js → markdown-tables-CfM1ner1.js} +1 -1
- package/dist/{message-action-names-y0-o46BN.js → message-action-names-AEii-fdA.js} +5 -5
- package/dist/{message-action-names-PbKqmcBa.js → message-action-names-CPJVqkJL.js} +5 -5
- package/dist/{message-channel-BuWy8hEk.js → message-channel-tSSi5C96.js} +1 -1
- package/dist/{npm-resolution-BLL-hroo.js → npm-resolution-C6jVPSqS.js} +1 -1
- package/dist/{npm-resolution-o9lE9iRL.js → npm-resolution-CdEbWlwy.js} +1 -1
- package/dist/{onboard-BohVFYna.js → onboard-CVpITzvB.js} +2 -2
- package/dist/{onboard-channels-DMgpmtQu.js → onboard-channels-D664lpQl.js} +1 -1
- package/dist/{onboard-channels-DzuidyBQ.js → onboard-channels-DReWe-Pi.js} +1 -1
- package/dist/{onboard-BKfLjwEp.js → onboard-zh78fAIB.js} +2 -2
- package/dist/{onboarding-sWcrQljf.js → onboarding-BnS6FhcE.js} +3 -3
- package/dist/{onboarding-BLgEs3xo.js → onboarding-CCahs79c.js} +3 -3
- package/dist/{onboarding.finalize-D5VLM268.js → onboarding.finalize-CmYoFs6n.js} +9 -9
- package/dist/{onboarding.finalize-CLmpb0fB.js → onboarding.finalize-uTFFUZ8O.js} +10 -10
- package/dist/{onboarding.gateway-config-DsTEqzPz.js → onboarding.gateway-config-DQX6SBU8.js} +1 -1
- package/dist/{onboarding.gateway-config-D-ZMefuj.js → onboarding.gateway-config-DYjDeKEw.js} +1 -1
- package/dist/{outbound-CCvRhb_6.js → outbound-BCY7cG5r.js} +6 -6
- package/dist/{outbound-attachment-BXwueqll.js → outbound-attachment-6NNNORlp.js} +3 -3
- package/dist/{plugin-registry-C-OlCiRd.js → plugin-registry-BC1RH6cl.js} +1 -1
- package/dist/{plugin-registry-LBCvRwK8.js → plugin-registry-TC2kC2iG.js} +1 -1
- package/dist/plugin-sdk/agents/session-run-registry.d.ts +36 -0
- package/dist/plugin-sdk/{channel-web-CM3jOFIe.js → channel-web-DSYJDq30.js} +4 -4
- package/dist/plugin-sdk/{deliver-DOBaX9a2.js → deliver-BzPIWEw5.js} +1 -1
- package/dist/plugin-sdk/index.js +5 -5
- package/dist/plugin-sdk/{reply-sVftK2Ge.js → reply-Dzts0EiK.js} +22 -8
- package/dist/plugin-sdk/{reply-payloads-DybMtW8a.js → reply-payloads-DwsjAWzB.js} +7 -1
- package/dist/plugin-sdk/{subagent-registry-BfxxwQv4.js → subagent-registry-DrBYYinw.js} +221 -5
- package/dist/plugin-sdk/web-afnwTWMq.js +7 -0
- package/dist/{plugins-cli-DCkrm_Bp.js → plugins-cli-CModgvwT.js} +6 -6
- package/dist/{plugins-cli-ChGSPhWr.js → plugins-cli-CpdkQdKD.js} +6 -6
- package/dist/{plugins-ODda1fNU.js → plugins-sjrWIkqk.js} +4 -4
- package/dist/{preflight-B9B3VBaW.js → preflight-a80t-iPi.js} +63 -63
- package/dist/{program-DYx2DvMr.js → program-BlZGbNe5.js} +11 -11
- package/dist/{program-context-B_oA8k9e.js → program-context-BVx30291.js} +16 -16
- package/dist/{prompt-select-styled-tATNv5wG.js → prompt-select-styled-Bqov4T-S.js} +4 -4
- package/dist/{prompt-select-styled-CHuBVQoF.js → prompt-select-styled-CtPeDmXo.js} +4 -4
- package/dist/{provider-dispatcher-CaVZ8Nhx.js → provider-dispatcher-BD5K64cR.js} +44 -22
- package/dist/{redact-DUvSdQvv.js → redact-D2_cayCv.js} +1 -1
- package/dist/{register.agent-mJGdqH4r.js → register.agent-B89Ymzwt.js} +8 -8
- package/dist/{register.agent-CAkJcVgr.js → register.agent-CuhMDT3t.js} +7 -7
- package/dist/{register.configure-BhkIDDW5.js → register.configure-C8WcdyT6.js} +9 -9
- package/dist/{register.configure-DvwKyrwL.js → register.configure-b8Ic06Uw.js} +9 -9
- package/dist/{register.maintenance-CKwKHDhS.js → register.maintenance-BlMuoELU.js} +11 -11
- package/dist/{register.maintenance-vpQOTI6u.js → register.maintenance-D5RP4wO6.js} +10 -10
- package/dist/{register.message-h_ydGqf0.js → register.message-CSeNrxdd.js} +7 -7
- package/dist/{register.message-NSrj_UY0.js → register.message-D7jdDTte.js} +7 -7
- package/dist/{register.onboard-C08IBU41.js → register.onboard-CRiXHw0n.js} +3 -3
- package/dist/{register.onboard-CcOONokP.js → register.onboard-Dj8wICC1.js} +3 -3
- package/dist/{register.setup-BHbQcv1_.js → register.setup-8gos4jqr.js} +3 -3
- package/dist/{register.setup-JYGpPbA2.js → register.setup-C_-8vfKv.js} +3 -3
- package/dist/{register.status-health-sessions-CAVFepVm.js → register.status-health-sessions-CrCsnTEq.js} +9 -9
- package/dist/{register.status-health-sessions-CV4R4Fe2.js → register.status-health-sessions-Df9SxgpH.js} +8 -8
- package/dist/{register.subclis-pRE159Cu.js → register.subclis-CxT7d8Bs.js} +8 -8
- package/dist/{replies-Cu8SG6CK.js → replies-Dsu1hdd7.js} +3 -3
- package/dist/{reply-DqJBHDn_.js → reply-Ccq9RRYF.js} +44 -22
- package/dist/{reply-payloads-DbQW7c5s.js → reply-payloads-DwEnDy7C.js} +4 -4
- package/dist/{reply-payloads-C4mbcSP-.js → reply-payloads-KYLwM629.js} +1 -1
- package/dist/{reply-prefix-DwJ8gxoz.js → reply-prefix-DtQ_7Eac.js} +1 -1
- package/dist/{resolve-route-BBztqaX0.js → resolve-route-DFUMTbRD.js} +4 -4
- package/dist/{response-prefix-template-BgDMziqu.js → response-prefix-template-DDQsoC2g.js} +1 -1
- package/dist/{run-main-D4CHxIUS.js → run-main-3RfLQTiu.js} +17 -17
- package/dist/{send-D3Uuw_MA.js → send-4gX7wep2.js} +8 -8
- package/dist/{send-CeBdN3Dp.js → send-CgAV9I1-.js} +15 -15
- package/dist/{send-DgVCmydL.js → send-CkPRLaz-.js} +8 -8
- package/dist/{send-C2J41ICD.js → send-DBeVQI-J.js} +7 -7
- package/dist/{send-Cibl-r-E.js → send-fdOUhBcN.js} +10 -10
- package/dist/{server-node-events-B60wtfXc.js → server-node-events-CRRE92S3.js} +6 -6
- package/dist/{server-node-events-DdwEsXLN.js → server-node-events-wpvPI-kw.js} +6 -6
- package/dist/{session-Bj8e8O8R.js → session-IUmTrU6A.js} +4 -4
- package/dist/{session-utils-CpgeP4rB.js → session-utils-ChEnoQCt.js} +1 -1
- package/dist/{session-utils-BUNcG-B2.js → session-utils-Dq5uiNDE.js} +1 -1
- package/dist/{sessions-3ACDrmHu.js → sessions-C6O5qrbx.js} +7 -1
- package/dist/{sessions-BePPqEtN.js → sessions-D5CiijxL.js} +12 -6
- package/dist/{sessions-n_z2PE4-.js → sessions-DPke45uf.js} +2 -2
- package/dist/{shell-env-DPAvieDD.js → shell-env-CKQ7fvtT.js} +1 -1
- package/dist/{status-BLKhFWFc.js → status-BeGUnsBd.js} +4 -4
- package/dist/{status-Ccfq5H-G.js → status-uyg2yOTM.js} +4 -4
- package/dist/{store-BS8fRU9w.js → store-BfW5-y9S.js} +7 -1
- package/dist/{subagent-registry-DIReZNw1.js → subagent-registry-BTv48FFX.js} +239 -6
- package/dist/{subagent-registry-DvnyYXMs.js → subagent-registry-D2yHvOBr.js} +238 -22
- package/dist/{subagent-registry-DMTgcI99.js → subagent-registry-DljM1oxO.js} +239 -6
- package/dist/{subsystem-DLQY6iY4.js → subsystem-9R2eOxp2.js} +2 -2
- package/dist/{tables-Bk8AXTIS.js → tables-CDsRjvfB.js} +2 -2
- package/dist/{tokens-CgIfCmK3.js → tokens-CFajuiSx.js} +1 -1
- package/dist/{tool-images-BMnWMHwL.js → tool-images-Cmsx31Bo.js} +1 -1
- package/dist/{update-cli-DCK9HF3t.js → update-cli-ChJoLU8L.js} +11 -11
- package/dist/{update-cli-1qesJ1_a.js → update-cli-DaW75dJC.js} +10 -10
- package/dist/{web-DG3SWzn_.js → web-BS0azDPB.js} +6 -6
- package/dist/{web-CCw02lmy.js → web-C_Alo-mS.js} +6 -6
- package/dist/{web-CKces-ap.js → web-DHXIgMOC.js} +50 -50
- package/dist/{whatsapp-actions-BzyFEHw4.js → whatsapp-actions-sR-u0T6U.js} +21 -21
- package/extensions/bluebubbles/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/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/plugin-sdk/web-C24fSRzu.js +0 -7
- /package/dist/{fetch-timeout-DTIN7CGM.js → fetch-timeout-jOIu9Xud.js} +0 -0
- /package/dist/{file-lock-BftAtpBn.js → file-lock-CEhZlbAi.js} +0 -0
- /package/dist/{ip-B27WD9wk.js → ip-N_XHHVsM.js} +0 -0
- /package/dist/{json-file-CRyYLqpu.js → json-file-DYQIVLc1.js} +0 -0
- /package/dist/{render-DSLzcBxk.js → render-TpKSK5RV.js} +0 -0
- /package/dist/{target-errors-owiG6LWY.js → target-errors-D7fLx8zG.js} +0 -0
|
@@ -9,7 +9,7 @@ import "./agent-scope-CXVIfJFJ.js";
|
|
|
9
9
|
import "./zod-schema-Bh8NOhFH.js";
|
|
10
10
|
import "./dock-DO9Vw5CE.js";
|
|
11
11
|
import "./message-channel-tuc9CdEw.js";
|
|
12
|
-
import { g as updateSessionStore } from "./sessions-
|
|
12
|
+
import { g as updateSessionStore } from "./sessions-C6O5qrbx.js";
|
|
13
13
|
import "./accounts-BVh3N1Fk.js";
|
|
14
14
|
import "./accounts-9jdDby1S.js";
|
|
15
15
|
import { r as normalizeChannelId } from "./plugins-xybjDXd6.js";
|
|
@@ -19,7 +19,7 @@ import "./bindings-Dz4Bh_zw.js";
|
|
|
19
19
|
import "./logging-DRwtiLIS.js";
|
|
20
20
|
import "./send-QGiloXFZ.js";
|
|
21
21
|
import "./send-BvObbKlY.js";
|
|
22
|
-
import { M as createOutboundSendDeps, O as agentCommand, _t as enqueueSystemEvent, s as resolveOutboundTarget } from "./provider-dispatcher-
|
|
22
|
+
import { M as createOutboundSendDeps, O as agentCommand, _t as enqueueSystemEvent, s as resolveOutboundTarget } from "./provider-dispatcher-BD5K64cR.js";
|
|
23
23
|
import "./chat-envelope-CT-Ocz9D.js";
|
|
24
24
|
import "./strip-inbound-meta-zmUXypSS.js";
|
|
25
25
|
import "./client-_mml4Fa6.js";
|
|
@@ -28,14 +28,14 @@ import "./net-eJa3DljN.js";
|
|
|
28
28
|
import "./logger-Bg_B5M43.js";
|
|
29
29
|
import "./ip-DK-vcRii.js";
|
|
30
30
|
import "./tailnet-kbXXH7kK.js";
|
|
31
|
-
import {
|
|
31
|
+
import { lt as buildOutboundSessionContext } from "./subagent-registry-BTv48FFX.js";
|
|
32
32
|
import "./response-prefix-template-DKzvekX_.js";
|
|
33
33
|
import "./agent-helpers-Bzz_tiPK.js";
|
|
34
34
|
import "./tool-images-CX2LXum2.js";
|
|
35
35
|
import "./exec-D1tuG1om.js";
|
|
36
36
|
import "./image-ops-BT4VediG.js";
|
|
37
37
|
import "./tokens-D1JVsjbg.js";
|
|
38
|
-
import "./hook-runner-global-
|
|
38
|
+
import "./hook-runner-global-DPdZsDAH.js";
|
|
39
39
|
import "./redact-CuM_QcqM.js";
|
|
40
40
|
import "./tool-display-FTmiDILs.js";
|
|
41
41
|
import "./markdown-tables-BKzJxBq0.js";
|
|
@@ -61,7 +61,7 @@ import "./channel-activity-DgNn51YG.js";
|
|
|
61
61
|
import "./session-cost-usage-B7CLLXW3.js";
|
|
62
62
|
import "./errors-BO7MWwih.js";
|
|
63
63
|
import "./ports-lsof-CwRCSLwc.js";
|
|
64
|
-
import { t as deliverOutboundPayloads } from "./deliver-
|
|
64
|
+
import { t as deliverOutboundPayloads } from "./deliver-B5eZoNwr.js";
|
|
65
65
|
import "./plugin-auto-enable-CExwFUHo.js";
|
|
66
66
|
import "./dm-policy-shared-Bla9d1QG.js";
|
|
67
67
|
import "./send-D8F6oiAI.js";
|
|
@@ -77,7 +77,7 @@ import "./send-CRLJdqoo.js";
|
|
|
77
77
|
import "./prompt-style-BIUEnMtC.js";
|
|
78
78
|
import "./pairing-labels-B7_jbF5v.js";
|
|
79
79
|
import { t as requestHeartbeatNow } from "./heartbeat-wake-Uah8gcOk.js";
|
|
80
|
-
import { c as resolveGatewaySessionStoreTarget, o as loadSessionEntry, s as pruneLegacyStoreKeys } from "./session-utils-
|
|
80
|
+
import { c as resolveGatewaySessionStoreTarget, o as loadSessionEntry, s as pruneLegacyStoreKeys } from "./session-utils-Dq5uiNDE.js";
|
|
81
81
|
import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-BYc01wgM.js";
|
|
82
82
|
import { randomUUID } from "node:crypto";
|
|
83
83
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as resolveUserPath, W as success, Y as toPinoLikeLogger, q as getChildLogger, w as ensureDir, z as danger } from "./subsystem-
|
|
2
|
-
import { n as formatCliCommand } from "./env-
|
|
3
|
-
import { c as maybeRestoreCredsFromBackup, f as resolveDefaultWebAuthDir, m as resolveWebCredsPath, p as resolveWebCredsBackupPath, u as readCredsJsonRaw } from "./accounts-
|
|
4
|
-
import { J as VERSION } from "./config-
|
|
1
|
+
import { M as resolveUserPath, W as success, Y as toPinoLikeLogger, q as getChildLogger, w as ensureDir, z as danger } from "./subsystem-9R2eOxp2.js";
|
|
2
|
+
import { n as formatCliCommand } from "./env-D3fELH5B.js";
|
|
3
|
+
import { c as maybeRestoreCredsFromBackup, f as resolveDefaultWebAuthDir, m as resolveWebCredsPath, p as resolveWebCredsBackupPath, u as readCredsJsonRaw } from "./accounts-DObM4hAF.js";
|
|
4
|
+
import { J as VERSION } from "./config-BIrnJuXL.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
@@ -4,7 +4,7 @@ import { d as resolveDefaultAgentId, l as resolveAgentWorkspaceDir } from "./age
|
|
|
4
4
|
import { o as parseModelRef } from "./provider-utils-C9kBVF1f.js";
|
|
5
5
|
import { J as openVerifiedFileSync, _ as isWorkspaceRelativeAvatarPath, d as AVATAR_MAX_BYTES, f as isAvatarDataUrl, h as isPathWithinRoot, i as loadConfig, p as isAvatarHttpUrl, y as resolveAvatarMime } from "./config-nbO6QgRa.js";
|
|
6
6
|
import { m as resolveStorePath } from "./chat-envelope-DPKIEKwe.js";
|
|
7
|
-
import {
|
|
7
|
+
import { C as readSessionTitleFieldsFromTranscript, J as canonicalizeMainSessionAlias, Y as resolveAgentMainSessionKey, Z as resolveMainSessionKey, h as normalizeSessionDeliveryFields, n as loadSessionStore, q as resolveFreshSessionTotalTokens, rt as buildGroupDisplayName } from "./store-BfW5-y9S.js";
|
|
8
8
|
import fs from "node:fs";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
|
|
@@ -3,7 +3,7 @@ import { J as openVerifiedFileSync, _ as isWorkspaceRelativeAvatarPath, d as AVA
|
|
|
3
3
|
import { C as parseAgentSessionKey, c as normalizeMainKey, s as normalizeAgentId, x as isCronRunSessionKey } from "./session-key-CfvsBObU.js";
|
|
4
4
|
import { o as parseModelRef } from "./provider-utils-DiLhkKQp.js";
|
|
5
5
|
import { d as resolveDefaultAgentId, l as resolveAgentWorkspaceDir } from "./agent-scope-CXVIfJFJ.js";
|
|
6
|
-
import {
|
|
6
|
+
import { C as normalizeSessionDeliveryFields, J as canonicalizeMainSessionAlias, Y as resolveAgentMainSessionKey, Z as resolveMainSessionKey, j as readSessionTitleFieldsFromTranscript, l as loadSessionStore, q as resolveFreshSessionTotalTokens, rt as buildGroupDisplayName } from "./sessions-C6O5qrbx.js";
|
|
7
7
|
import { m as resolveStorePath } from "./chat-envelope-CT-Ocz9D.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import fs from "node:fs";
|
|
@@ -1311,6 +1311,12 @@ function mergeDeliveryContext(primary, fallback) {
|
|
|
1311
1311
|
threadId: normalizedPrimary?.threadId ?? normalizedFallback?.threadId
|
|
1312
1312
|
});
|
|
1313
1313
|
}
|
|
1314
|
+
function deliveryContextKey(context) {
|
|
1315
|
+
const normalized = normalizeDeliveryContext(context);
|
|
1316
|
+
if (!normalized?.channel || !normalized?.to) return;
|
|
1317
|
+
const threadId = normalized.threadId != null && normalized.threadId !== "" ? String(normalized.threadId) : "";
|
|
1318
|
+
return `${normalized.channel}|${normalized.to}|${normalized.accountId ?? ""}|${threadId}`;
|
|
1319
|
+
}
|
|
1314
1320
|
|
|
1315
1321
|
//#endregion
|
|
1316
1322
|
//#region src/config/cache-utils.ts
|
|
@@ -2550,4 +2556,4 @@ var sessions_exports = /* @__PURE__ */ __exportAll({
|
|
|
2550
2556
|
});
|
|
2551
2557
|
|
|
2552
2558
|
//#endregion
|
|
2553
|
-
export {
|
|
2559
|
+
export { deriveSessionMetaPatch as $, readSessionPreviewItemsFromTranscript as A, evaluateSessionFreshness as B, normalizeSessionDeliveryFields as C, capArrayByJsonBytes as D, archiveSessionTranscripts as E, parseInlineDirectives as F, DEFAULT_RESET_TRIGGERS as G, resolveSessionResetPolicy as H, stripInlineDirectiveTagsForDisplay as I, canonicalizeMainSessionAlias as J, mergeSessionEntry as K, stripInlineDirectiveTagsFromMessageForDisplay as L, resolveSessionTranscriptCandidates as M, stripEnvelopeFromMessage as N, cleanupArchivedSessionTranscripts as O, stripEnvelopeFromMessages as P, resolveMainSessionKeyFromConfig as Q, cleanStaleLockFiles as R, normalizeDeliveryContext as S, archiveFileOnDisk as T, resolveSessionResetType as U, resolveChannelResetConfig as V, resolveThreadFlag as W, resolveExplicitAgentSessionKey as X, resolveAgentMainSessionKey as Y, resolveMainSessionKey as Z, updateSessionStoreEntry as _, resolveMirroredTranscriptText as a, deliveryContextKey as b, capEntryCount as c, readSessionUpdatedAt as d, snapshotSessionOrigin as et, recordSessionMetaFromInbound as f, updateSessionStore as g, updateLastRoute as h, appendAssistantMessageToSessionTranscript as i, resolveGroupSessionKey as it, readSessionTitleFieldsFromTranscript as j, readSessionMessages as k, loadSessionStore as l, saveSessionStore as m, extractDeliveryInfo as n, isPrimarySessionTranscriptFileName as nt, resolveAndPersistSessionFile as o, resolveMaintenanceConfig as p, resolveFreshSessionTotalTokens as q, parseSessionThreadInfo as r, buildGroupDisplayName as rt, CURRENT_SESSION_VERSION as s, sessions_exports as t, formatSessionArchiveTimestamp as tt, pruneStaleEntries as u, enforceSessionDiskBudget as v, normalizeAccountId as w, mergeDeliveryContext as x, deliveryContextFromSession as y, resolveSessionKey as z };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { ct as expandHomePrefix, k as normalizeE164, lt as resolveRequiredHomeDir, st as resolveStateDir, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
+
import { ct as expandHomePrefix, k as normalizeE164, lt as resolveRequiredHomeDir, st as resolveStateDir, t as createSubsystemLogger } from "./subsystem-9R2eOxp2.js";
|
|
3
3
|
import { c as resolveAgentIdFromSessionKey, o as normalizeAgentId, p as normalizeOptionalAccountId, r as buildAgentMainSessionKey, s as normalizeMainKey, t as DEFAULT_AGENT_ID } from "./session-key-X7pmdLBX.js";
|
|
4
|
-
import { i as normalizeHyphenSlug, t as getChannelDock } from "./dock-
|
|
5
|
-
import { r as normalizeChannelId } from "./plugins-
|
|
4
|
+
import { i as normalizeHyphenSlug, t as getChannelDock } from "./dock-BQ3iSblF.js";
|
|
5
|
+
import { r as normalizeChannelId } from "./plugins-sjrWIkqk.js";
|
|
6
6
|
import { t as normalizeChatType } from "./chat-type-Coeec2xt.js";
|
|
7
|
-
import { b as parseByteSize, t as loadConfig, y as parseDurationMs } from "./config-
|
|
8
|
-
import { a as listDeliverableMessageChannels, o as normalizeMessageChannel } from "./message-channel-
|
|
7
|
+
import { b as parseByteSize, t as loadConfig, y as parseDurationMs } from "./config-BIrnJuXL.js";
|
|
8
|
+
import { a as listDeliverableMessageChannels, o as normalizeMessageChannel } from "./message-channel-tSSi5C96.js";
|
|
9
9
|
import { n as resolveConversationLabel } from "./conversation-label-Dg3yLt9j.js";
|
|
10
10
|
import { n as isPidAlive, t as resolveProcessScopedMap } from "./process-scoped-map-OJQ3YNYw.js";
|
|
11
11
|
import path from "node:path";
|
|
@@ -1113,6 +1113,12 @@ function mergeDeliveryContext(primary, fallback) {
|
|
|
1113
1113
|
threadId: normalizedPrimary?.threadId ?? normalizedFallback?.threadId
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
|
+
function deliveryContextKey(context) {
|
|
1117
|
+
const normalized = normalizeDeliveryContext(context);
|
|
1118
|
+
if (!normalized?.channel || !normalized?.to) return;
|
|
1119
|
+
const threadId = normalized.threadId != null && normalized.threadId !== "" ? String(normalized.threadId) : "";
|
|
1120
|
+
return `${normalized.channel}|${normalized.to}|${normalized.accountId ?? ""}|${threadId}`;
|
|
1121
|
+
}
|
|
1116
1122
|
|
|
1117
1123
|
//#endregion
|
|
1118
1124
|
//#region src/config/cache-utils.ts
|
|
@@ -2352,4 +2358,4 @@ var sessions_exports = /* @__PURE__ */ __exportAll({
|
|
|
2352
2358
|
});
|
|
2353
2359
|
|
|
2354
2360
|
//#endregion
|
|
2355
|
-
export {
|
|
2361
|
+
export { DEFAULT_RESET_TRIGGERS as A, deriveSessionMetaPatch as B, INPUT_PROVENANCE_KIND_VALUES as C, resolveSessionResetPolicy as D, resolveChannelResetConfig as E, resolveSessionTranscriptsDirForAgent as F, resolveStorePath as I, resolveAgentMainSessionKey as L, resolveSessionFilePath as M, resolveSessionFilePathOptions as N, resolveSessionResetType as O, resolveSessionTranscriptPath as P, resolveExplicitAgentSessionKey as R, parseInlineDirectives as S, evaluateSessionFreshness as T, resolveGroupSessionKey as V, normalizeSessionDeliveryFields as _, resolveAndPersistSessionFile as a, countToolResults as b, readSessionUpdatedAt as c, updateSessionStore as d, updateSessionStoreEntry as f, normalizeDeliveryContext as g, mergeDeliveryContext as h, resolveMirroredTranscriptText as i, resolveDefaultSessionStorePath as j, resolveThreadFlag as k, recordSessionMetaFromInbound as l, deliveryContextKey as m, parseSessionThreadInfo as n, CURRENT_SESSION_VERSION as o, deliveryContextFromSession as p, appendAssistantMessageToSessionTranscript as r, loadSessionStore as s, sessions_exports as t, updateLastRoute as u, normalizeAccountId as v, resolveSessionKey as w, extractToolCallNames as x, archiveSessionTranscripts as y, resolveMainSessionKey as z };
|
|
@@ -3,10 +3,10 @@ import { Ct as isRich, pt as info, wt as theme } from "./entry.js";
|
|
|
3
3
|
import { i as loadConfig } from "./config-DWFrth_R.js";
|
|
4
4
|
import { C as parseAgentSessionKey, s as normalizeAgentId } from "./session-key-CfvsBObU.js";
|
|
5
5
|
import { d as resolveDefaultAgentId, n as listAgentIds } from "./agent-scope-CXVIfJFJ.js";
|
|
6
|
-
import {
|
|
6
|
+
import { l as loadSessionStore, q as resolveFreshSessionTotalTokens } from "./sessions-C6O5qrbx.js";
|
|
7
7
|
import { m as resolveStorePath } from "./chat-envelope-CT-Ocz9D.js";
|
|
8
8
|
import { n as formatTimeAgo } from "./format-relative-CBDSicUs.js";
|
|
9
|
-
import { l as resolveSessionModelRef, n as classifySessionKey } from "./session-utils-
|
|
9
|
+
import { l as resolveSessionModelRef, n as classifySessionKey } from "./session-utils-Dq5uiNDE.js";
|
|
10
10
|
|
|
11
11
|
//#region src/commands/session-store-targets.ts
|
|
12
12
|
function dedupeTargetsByStorePath(targets) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as resolveGatewayPort } from "./paths-DHuXVC00.js";
|
|
2
2
|
import { E as info, I as isRich, L as theme } from "./utils-__cbkDgx.js";
|
|
3
|
-
import { Jt as formatUsageReportLines, bt as peekSystemEvents, nt as buildChannelAccountSnapshot, qt as loadProviderUsageSummary, rt as formatChannelAllowFrom, tt as buildChannelSummary } from "./reply-
|
|
3
|
+
import { Jt as formatUsageReportLines, bt as peekSystemEvents, nt as buildChannelAccountSnapshot, qt as loadProviderUsageSummary, rt as formatChannelAllowFrom, tt as buildChannelSummary } from "./reply-Ccq9RRYF.js";
|
|
4
4
|
import { C as parseAgentSessionKey } from "./session-key-DUewR3Vl.js";
|
|
5
5
|
import { l as resolveAgentWorkspaceDir } from "./agent-scope-CqLq7cFg.js";
|
|
6
6
|
import { h as resolveControlUiLinks, x as normalizeControlUiBasePath } from "./onboard-helpers-D2nzz93W.js";
|
|
@@ -9,7 +9,7 @@ import { t as VERSION } from "./version-CVMnqdzu.js";
|
|
|
9
9
|
import { n as listChannelPlugins } from "./plugins-BzN42FWt.js";
|
|
10
10
|
import { t as formatCliCommand } from "./command-format-Dntg_tnC.js";
|
|
11
11
|
import { m as resolveStorePath } from "./chat-envelope-DPKIEKwe.js";
|
|
12
|
-
import {
|
|
12
|
+
import { Z as resolveMainSessionKey, n as loadSessionStore, q as resolveFreshSessionTotalTokens } from "./store-BfW5-y9S.js";
|
|
13
13
|
import { n as formatTimeAgo } from "./format-relative-Ia92yA8Q.js";
|
|
14
14
|
import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-CzzsQW8Z.js";
|
|
15
15
|
import { n as runExec } from "./exec-DnrbSTSG.js";
|
|
@@ -25,11 +25,11 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-DpZO7Mcv.j
|
|
|
25
25
|
import { t as readLastGatewayErrorLine } from "./diagnostics-6GSgKhwh.js";
|
|
26
26
|
import { t as renderTable } from "./table-D-dtKj8e.js";
|
|
27
27
|
import { _ as resolveGatewayProbeAuth$1, b as probeGateway, t as runSecurityAudit } from "./audit-DI6k-N_P.js";
|
|
28
|
-
import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-
|
|
28
|
+
import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-6NZ23ZCc.js";
|
|
29
29
|
import { t as resolveRemoteClawPackageRoot } from "./remoteclaw-root-BkQA3neE.js";
|
|
30
30
|
import { a as readRestartSentinel, f as normalizeUpdateChannel, m as resolveUpdateChannelDisplay, o as summarizeRestartSentinel, t as resolveDefaultChannelAccountContext } from "./channel-account-context-C8HHNlvT.js";
|
|
31
31
|
import { a as checkUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, r as getUpdateCheckResult, t as formatUpdateAvailableHint } from "./status.update-tjyBpJ__.js";
|
|
32
|
-
import { l as resolveSessionModelRef, n as classifySessionKey, r as listAgentsForGateway } from "./session-utils-
|
|
32
|
+
import { l as resolveSessionModelRef, n as classifySessionKey, r as listAgentsForGateway } from "./session-utils-ChEnoQCt.js";
|
|
33
33
|
import { t as resolveNodeService } from "./node-service-COh4zrhU.js";
|
|
34
34
|
import { t as shortenText } from "./text-format-D4XpqGtx.js";
|
|
35
35
|
import fs from "node:fs";
|
|
@@ -4,10 +4,10 @@ import { i as loadConfig, o as readConfigFileSnapshot } from "./config-DWFrth_R.
|
|
|
4
4
|
import { t as VERSION } from "./version-3QUZW8EP.js";
|
|
5
5
|
import { C as parseAgentSessionKey } from "./session-key-CfvsBObU.js";
|
|
6
6
|
import { l as resolveAgentWorkspaceDir } from "./agent-scope-CXVIfJFJ.js";
|
|
7
|
-
import {
|
|
7
|
+
import { Z as resolveMainSessionKey, l as loadSessionStore, q as resolveFreshSessionTotalTokens } from "./sessions-C6O5qrbx.js";
|
|
8
8
|
import { n as listChannelPlugins } from "./plugins-xybjDXd6.js";
|
|
9
9
|
import { t as formatCliCommand } from "./command-format-CnyOPNyW.js";
|
|
10
|
-
import { Jt as formatUsageReportLines, bt as peekSystemEvents, nt as buildChannelAccountSnapshot, qt as loadProviderUsageSummary, rt as formatChannelAllowFrom, tt as buildChannelSummary } from "./provider-dispatcher-
|
|
10
|
+
import { Jt as formatUsageReportLines, bt as peekSystemEvents, nt as buildChannelAccountSnapshot, qt as loadProviderUsageSummary, rt as formatChannelAllowFrom, tt as buildChannelSummary } from "./provider-dispatcher-BD5K64cR.js";
|
|
11
11
|
import { m as resolveStorePath } from "./chat-envelope-CT-Ocz9D.js";
|
|
12
12
|
import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-CFafK7BB.js";
|
|
13
13
|
import { n as runExec } from "./exec-D1tuG1om.js";
|
|
@@ -25,11 +25,11 @@ import { t as formatRuntimeStatusWithDetails } from "./runtime-status-Bx6LYt1F.j
|
|
|
25
25
|
import { t as readLastGatewayErrorLine } from "./diagnostics-BOxfIjGf.js";
|
|
26
26
|
import { t as renderTable } from "./table-GQ3pJQ0O.js";
|
|
27
27
|
import { _ as resolveGatewayProbeAuth$1, b as probeGateway, t as runSecurityAudit } from "./audit-ir0rWxq8.js";
|
|
28
|
-
import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-
|
|
28
|
+
import { o as resolveHeartbeatSummaryForAgent, t as formatHealthChannelLines } from "./health-D6T18gwU.js";
|
|
29
29
|
import { t as resolveRemoteClawPackageRoot } from "./remoteclaw-root-Dgi-g2QH.js";
|
|
30
30
|
import { a as readRestartSentinel, f as normalizeUpdateChannel, m as resolveUpdateChannelDisplay, o as summarizeRestartSentinel, t as resolveDefaultChannelAccountContext } from "./channel-account-context-l7BEOF8r.js";
|
|
31
31
|
import { a as checkUpdateStatus, i as resolveUpdateAvailability, n as formatUpdateOneLiner, r as getUpdateCheckResult, t as formatUpdateAvailableHint } from "./status.update-BAifUX2r.js";
|
|
32
|
-
import { l as resolveSessionModelRef, n as classifySessionKey, r as listAgentsForGateway } from "./session-utils-
|
|
32
|
+
import { l as resolveSessionModelRef, n as classifySessionKey, r as listAgentsForGateway } from "./session-utils-Dq5uiNDE.js";
|
|
33
33
|
import { t as resolveNodeService } from "./node-service-DgE5vyC_.js";
|
|
34
34
|
import { t as shortenText } from "./text-format-DDhhb1U5.js";
|
|
35
35
|
import { spawnSync } from "node:child_process";
|
|
@@ -1855,6 +1855,12 @@ function mergeDeliveryContext(primary, fallback) {
|
|
|
1855
1855
|
threadId: normalizedPrimary?.threadId ?? normalizedFallback?.threadId
|
|
1856
1856
|
});
|
|
1857
1857
|
}
|
|
1858
|
+
function deliveryContextKey(context) {
|
|
1859
|
+
const normalized = normalizeDeliveryContext(context);
|
|
1860
|
+
if (!normalized?.channel || !normalized?.to) return;
|
|
1861
|
+
const threadId = normalized.threadId != null && normalized.threadId !== "" ? String(normalized.threadId) : "";
|
|
1862
|
+
return `${normalized.channel}|${normalized.to}|${normalized.accountId ?? ""}|${threadId}`;
|
|
1863
|
+
}
|
|
1858
1864
|
|
|
1859
1865
|
//#endregion
|
|
1860
1866
|
//#region src/config/cache-utils.ts
|
|
@@ -2552,4 +2558,4 @@ async function updateLastRoute(params) {
|
|
|
2552
2558
|
}
|
|
2553
2559
|
|
|
2554
2560
|
//#endregion
|
|
2555
|
-
export {
|
|
2561
|
+
export { deriveSessionMetaPatch as $, sessions_exports as A, evaluateSessionFreshness as B, readSessionTitleFieldsFromTranscript as C, parseInlineDirectives as D, stripEnvelopeFromMessages as E, resolveMirroredTranscriptText as F, DEFAULT_RESET_TRIGGERS as G, resolveSessionResetPolicy as H, resolveAndPersistSessionFile as I, canonicalizeMainSessionAlias as J, mergeSessionEntry as K, CURRENT_SESSION_VERSION as L, extractDeliveryInfo as M, parseSessionThreadInfo as N, stripInlineDirectiveTagsForDisplay as O, appendAssistantMessageToSessionTranscript as P, resolveMainSessionKeyFromConfig as Q, deriveSessionKey as R, readSessionPreviewItemsFromTranscript as S, stripEnvelopeFromMessage as T, resolveSessionResetType as U, resolveChannelResetConfig as V, resolveThreadFlag as W, resolveExplicitAgentSessionKey as X, resolveAgentMainSessionKey as Y, resolveMainSessionKey as Z, archiveFileOnDisk as _, recordSessionMetaFromInbound as a, cleanStaleLockFiles as at, cleanupArchivedSessionTranscripts as b, updateLastRoute as c, deliveryContextFromSession as d, snapshotSessionOrigin as et, deliveryContextKey as f, normalizeAccountId as g, normalizeSessionDeliveryFields as h, readSessionUpdatedAt as i, resolveGroupSessionKey as it, enforceSessionDiskBudget as j, stripInlineDirectiveTagsFromMessageForDisplay as k, updateSessionStore as l, normalizeDeliveryContext as m, loadSessionStore as n, isPrimarySessionTranscriptFileName as nt, resolveMaintenanceConfig as o, mergeDeliveryContext as p, resolveFreshSessionTotalTokens as q, pruneStaleEntries as r, buildGroupDisplayName as rt, saveSessionStore as s, capEntryCount as t, formatSessionArchiveTimestamp as tt, updateSessionStoreEntry as u, archiveSessionTranscripts as v, resolveSessionTranscriptCandidates as w, readSessionMessages as x, capArrayByJsonBytes as y, resolveSessionKey as z };
|
|
@@ -5,14 +5,14 @@ import { C as parseAgentSessionKey, S as isSubagentSessionKey, b as isAcpSession
|
|
|
5
5
|
import { d as resolveDefaultAgentId, f as resolveSessionAgentId } from "./agent-scope-CXVIfJFJ.js";
|
|
6
6
|
import { g as parseDurationMs } from "./zod-schema-Bh8NOhFH.js";
|
|
7
7
|
import { a as isInternalMessageChannel, c as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-tuc9CdEw.js";
|
|
8
|
-
import {
|
|
8
|
+
import { S as normalizeDeliveryContext, Z as resolveMainSessionKey, b as deliveryContextKey, l as loadSessionStore, x as mergeDeliveryContext, y as deliveryContextFromSession } from "./sessions-C6O5qrbx.js";
|
|
9
9
|
import { r as normalizeChannelId$1, t as getChannelPlugin } from "./plugins-xybjDXd6.js";
|
|
10
10
|
import { m as resolveStorePath } from "./chat-envelope-CT-Ocz9D.js";
|
|
11
11
|
import { n as callGateway } from "./call-CFafK7BB.js";
|
|
12
12
|
import { a as resolveEffectiveMessagesConfig, n as resolveResponsePrefixTemplate } from "./response-prefix-template-DKzvekX_.js";
|
|
13
13
|
import { s as sanitizeUserFacingText } from "./agent-helpers-Bzz_tiPK.js";
|
|
14
14
|
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-D1JVsjbg.js";
|
|
15
|
-
import { t as getGlobalHookRunner, u as shouldSuppressReasoningPayload } from "./hook-runner-global-
|
|
15
|
+
import { t as getGlobalHookRunner, u as shouldSuppressReasoningPayload } from "./hook-runner-global-DPdZsDAH.js";
|
|
16
16
|
import { n as saveJsonFile, t as loadJsonFile } from "./json-file-BVvmrQG3.js";
|
|
17
17
|
import os from "node:os";
|
|
18
18
|
import path from "node:path";
|
|
@@ -193,6 +193,134 @@ function hasCrossChannelItems(items, resolveKey) {
|
|
|
193
193
|
return keys.size > 1;
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/agents/subagent-announce-queue.ts
|
|
198
|
+
const ANNOUNCE_QUEUES = /* @__PURE__ */ new Map();
|
|
199
|
+
function getAnnounceQueue(key, settings, send) {
|
|
200
|
+
const existing = ANNOUNCE_QUEUES.get(key);
|
|
201
|
+
if (existing) {
|
|
202
|
+
applyQueueRuntimeSettings({
|
|
203
|
+
target: existing,
|
|
204
|
+
settings
|
|
205
|
+
});
|
|
206
|
+
existing.send = send;
|
|
207
|
+
return existing;
|
|
208
|
+
}
|
|
209
|
+
const created = {
|
|
210
|
+
items: [],
|
|
211
|
+
draining: false,
|
|
212
|
+
lastEnqueuedAt: 0,
|
|
213
|
+
mode: settings.mode,
|
|
214
|
+
debounceMs: typeof settings.debounceMs === "number" ? Math.max(0, settings.debounceMs) : 1e3,
|
|
215
|
+
cap: typeof settings.cap === "number" && settings.cap > 0 ? Math.floor(settings.cap) : 20,
|
|
216
|
+
dropPolicy: settings.dropPolicy ?? "summarize",
|
|
217
|
+
droppedCount: 0,
|
|
218
|
+
summaryLines: [],
|
|
219
|
+
send,
|
|
220
|
+
consecutiveFailures: 0
|
|
221
|
+
};
|
|
222
|
+
applyQueueRuntimeSettings({
|
|
223
|
+
target: created,
|
|
224
|
+
settings
|
|
225
|
+
});
|
|
226
|
+
ANNOUNCE_QUEUES.set(key, created);
|
|
227
|
+
return created;
|
|
228
|
+
}
|
|
229
|
+
function hasAnnounceCrossChannelItems(items) {
|
|
230
|
+
return hasCrossChannelItems(items, (item) => {
|
|
231
|
+
if (!item.origin) return {};
|
|
232
|
+
if (!item.originKey) return { cross: true };
|
|
233
|
+
return { key: item.originKey };
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function scheduleAnnounceDrain(key) {
|
|
237
|
+
const queue = beginQueueDrain(ANNOUNCE_QUEUES, key);
|
|
238
|
+
if (!queue) return;
|
|
239
|
+
(async () => {
|
|
240
|
+
try {
|
|
241
|
+
const collectState = { forceIndividualCollect: false };
|
|
242
|
+
for (;;) {
|
|
243
|
+
if (queue.items.length === 0 && queue.droppedCount === 0) break;
|
|
244
|
+
await waitForQueueDebounce(queue);
|
|
245
|
+
if (queue.mode === "collect") {
|
|
246
|
+
const collectDrainResult = await drainCollectQueueStep({
|
|
247
|
+
collectState,
|
|
248
|
+
isCrossChannel: hasAnnounceCrossChannelItems(queue.items),
|
|
249
|
+
items: queue.items,
|
|
250
|
+
run: async (item) => await queue.send(item)
|
|
251
|
+
});
|
|
252
|
+
if (collectDrainResult === "empty") break;
|
|
253
|
+
if (collectDrainResult === "drained") continue;
|
|
254
|
+
const items = queue.items.slice();
|
|
255
|
+
const summary = previewQueueSummaryPrompt({
|
|
256
|
+
state: queue,
|
|
257
|
+
noun: "announce"
|
|
258
|
+
});
|
|
259
|
+
const prompt = buildCollectPrompt({
|
|
260
|
+
title: "[Queued announce messages while agent was busy]",
|
|
261
|
+
items,
|
|
262
|
+
summary,
|
|
263
|
+
renderItem: (item, idx) => `---\nQueued #${idx + 1}\n${item.prompt}`.trim()
|
|
264
|
+
});
|
|
265
|
+
const last = items.at(-1);
|
|
266
|
+
if (!last) break;
|
|
267
|
+
await queue.send({
|
|
268
|
+
...last,
|
|
269
|
+
prompt
|
|
270
|
+
});
|
|
271
|
+
queue.items.splice(0, items.length);
|
|
272
|
+
if (summary) clearQueueSummaryState(queue);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
const summaryPrompt = previewQueueSummaryPrompt({
|
|
276
|
+
state: queue,
|
|
277
|
+
noun: "announce"
|
|
278
|
+
});
|
|
279
|
+
if (summaryPrompt) {
|
|
280
|
+
if (!await drainNextQueueItem(queue.items, async (item) => await queue.send({
|
|
281
|
+
...item,
|
|
282
|
+
prompt: summaryPrompt
|
|
283
|
+
}))) break;
|
|
284
|
+
clearQueueSummaryState(queue);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (!await drainNextQueueItem(queue.items, async (item) => await queue.send(item))) break;
|
|
288
|
+
}
|
|
289
|
+
queue.consecutiveFailures = 0;
|
|
290
|
+
} catch (err) {
|
|
291
|
+
queue.consecutiveFailures++;
|
|
292
|
+
const errorBackoffMs = Math.min(1e3 * Math.pow(2, queue.consecutiveFailures), 6e4);
|
|
293
|
+
const retryDelayMs = Math.max(errorBackoffMs, queue.debounceMs);
|
|
294
|
+
queue.lastEnqueuedAt = Date.now() + retryDelayMs - queue.debounceMs;
|
|
295
|
+
defaultRuntime.error?.(`announce queue drain failed for ${key} (attempt ${queue.consecutiveFailures}, retry in ${Math.round(retryDelayMs / 1e3)}s): ${String(err)}`);
|
|
296
|
+
} finally {
|
|
297
|
+
queue.draining = false;
|
|
298
|
+
if (queue.items.length === 0 && queue.droppedCount === 0) ANNOUNCE_QUEUES.delete(key);
|
|
299
|
+
else scheduleAnnounceDrain(key);
|
|
300
|
+
}
|
|
301
|
+
})();
|
|
302
|
+
}
|
|
303
|
+
function enqueueAnnounce(params) {
|
|
304
|
+
const queue = getAnnounceQueue(params.key, params.settings, params.send);
|
|
305
|
+
queue.lastEnqueuedAt = Math.max(queue.lastEnqueuedAt, Date.now());
|
|
306
|
+
if (!applyQueueDropPolicy({
|
|
307
|
+
queue,
|
|
308
|
+
summarize: (item) => item.summaryLine?.trim() || item.prompt.trim()
|
|
309
|
+
})) {
|
|
310
|
+
if (queue.dropPolicy === "new") scheduleAnnounceDrain(params.key);
|
|
311
|
+
return false;
|
|
312
|
+
}
|
|
313
|
+
const origin = normalizeDeliveryContext(params.item.origin);
|
|
314
|
+
const originKey = deliveryContextKey(origin);
|
|
315
|
+
queue.items.push({
|
|
316
|
+
...params.item,
|
|
317
|
+
origin,
|
|
318
|
+
originKey
|
|
319
|
+
});
|
|
320
|
+
scheduleAnnounceDrain(params.key);
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
|
|
196
324
|
//#endregion
|
|
197
325
|
//#region src/auto-reply/reply/directive-parsing.ts
|
|
198
326
|
function skipDirectiveArgPrefix(raw) {
|
|
@@ -2159,7 +2287,7 @@ async function routeReply(params) {
|
|
|
2159
2287
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
2160
2288
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
2161
2289
|
try {
|
|
2162
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
2290
|
+
const { deliverOutboundPayloads } = await import("./deliver-B5eZoNwr.js").then((n) => n.n);
|
|
2163
2291
|
const outboundSession = buildOutboundSessionContext({
|
|
2164
2292
|
cfg,
|
|
2165
2293
|
agentId: resolvedAgentId,
|
|
@@ -2621,6 +2749,63 @@ function buildAnnounceIdFromChildRun(params) {
|
|
|
2621
2749
|
function buildAnnounceIdempotencyKey(announceId) {
|
|
2622
2750
|
return `announce:${announceId}`;
|
|
2623
2751
|
}
|
|
2752
|
+
function resolveQueueAnnounceId(params) {
|
|
2753
|
+
const announceId = params.announceId?.trim();
|
|
2754
|
+
if (announceId) return announceId;
|
|
2755
|
+
return `legacy:${params.sessionKey}:${params.enqueuedAt}`;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2758
|
+
//#endregion
|
|
2759
|
+
//#region src/agents/session-run-registry.ts
|
|
2760
|
+
const ACTIVE_SESSION_RUNS = /* @__PURE__ */ new Map();
|
|
2761
|
+
/** Check whether a session currently has an active CLI agent turn. */
|
|
2762
|
+
function isSessionRunActive(sessionKey) {
|
|
2763
|
+
return ACTIVE_SESSION_RUNS.has(sessionKey);
|
|
2764
|
+
}
|
|
2765
|
+
/** Return the number of currently active session runs. */
|
|
2766
|
+
function getActiveSessionRunCount() {
|
|
2767
|
+
return ACTIVE_SESSION_RUNS.size;
|
|
2768
|
+
}
|
|
2769
|
+
/** Register an active session run. */
|
|
2770
|
+
function registerSessionRun(sessionKey, handle) {
|
|
2771
|
+
ACTIVE_SESSION_RUNS.set(sessionKey, handle);
|
|
2772
|
+
}
|
|
2773
|
+
/** Unregister a session run (on turn completion or crash). */
|
|
2774
|
+
function unregisterSessionRun(sessionKey) {
|
|
2775
|
+
ACTIVE_SESSION_RUNS.delete(sessionKey);
|
|
2776
|
+
}
|
|
2777
|
+
/**
|
|
2778
|
+
* Kill an active session run by aborting its controller or sending SIGTERM to its PID.
|
|
2779
|
+
* Returns `true` if a kill signal was dispatched.
|
|
2780
|
+
*/
|
|
2781
|
+
function killSessionRun(sessionKey) {
|
|
2782
|
+
const handle = ACTIVE_SESSION_RUNS.get(sessionKey);
|
|
2783
|
+
if (!handle) return false;
|
|
2784
|
+
if (handle.abortController && !handle.abortController.signal.aborted) {
|
|
2785
|
+
handle.abortController.abort();
|
|
2786
|
+
return true;
|
|
2787
|
+
}
|
|
2788
|
+
if (typeof handle.pid === "number") try {
|
|
2789
|
+
process.kill(handle.pid, "SIGTERM");
|
|
2790
|
+
return true;
|
|
2791
|
+
} catch {
|
|
2792
|
+
return false;
|
|
2793
|
+
}
|
|
2794
|
+
return false;
|
|
2795
|
+
}
|
|
2796
|
+
/**
|
|
2797
|
+
* Wait (poll) for a session run to end.
|
|
2798
|
+
* Resolves `true` if the run ended, `false` on timeout.
|
|
2799
|
+
*/
|
|
2800
|
+
async function waitForSessionRunEnd(sessionKey, timeoutMs) {
|
|
2801
|
+
if (!ACTIVE_SESSION_RUNS.has(sessionKey)) return true;
|
|
2802
|
+
const deadline = Date.now() + timeoutMs;
|
|
2803
|
+
while (ACTIVE_SESSION_RUNS.has(sessionKey)) {
|
|
2804
|
+
if (Date.now() >= deadline) return false;
|
|
2805
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
2806
|
+
}
|
|
2807
|
+
return true;
|
|
2808
|
+
}
|
|
2624
2809
|
|
|
2625
2810
|
//#endregion
|
|
2626
2811
|
//#region src/agents/subagent-depth.ts
|
|
@@ -3737,6 +3922,31 @@ async function resolveSubagentCompletionOrigin(params) {
|
|
|
3737
3922
|
};
|
|
3738
3923
|
}
|
|
3739
3924
|
}
|
|
3925
|
+
async function sendAnnounce(item) {
|
|
3926
|
+
const announceTimeoutMs = resolveSubagentAnnounceTimeoutMs(loadConfig());
|
|
3927
|
+
const requesterIsSubagent = getSubagentDepthFromSessionStore(item.sessionKey) >= 1;
|
|
3928
|
+
const origin = item.origin;
|
|
3929
|
+
const threadId = origin?.threadId != null && origin.threadId !== "" ? String(origin.threadId) : void 0;
|
|
3930
|
+
const idempotencyKey = buildAnnounceIdempotencyKey(resolveQueueAnnounceId({
|
|
3931
|
+
announceId: item.announceId,
|
|
3932
|
+
sessionKey: item.sessionKey,
|
|
3933
|
+
enqueuedAt: item.enqueuedAt
|
|
3934
|
+
}));
|
|
3935
|
+
await callGateway({
|
|
3936
|
+
method: "agent",
|
|
3937
|
+
params: {
|
|
3938
|
+
sessionKey: item.sessionKey,
|
|
3939
|
+
message: item.prompt,
|
|
3940
|
+
channel: requesterIsSubagent ? void 0 : origin?.channel,
|
|
3941
|
+
accountId: requesterIsSubagent ? void 0 : origin?.accountId,
|
|
3942
|
+
to: requesterIsSubagent ? void 0 : origin?.to,
|
|
3943
|
+
threadId: requesterIsSubagent ? void 0 : threadId,
|
|
3944
|
+
deliver: !requesterIsSubagent,
|
|
3945
|
+
idempotencyKey
|
|
3946
|
+
},
|
|
3947
|
+
timeoutMs: announceTimeoutMs
|
|
3948
|
+
});
|
|
3949
|
+
}
|
|
3740
3950
|
function resolveRequesterStoreKey(cfg, requesterSessionKey) {
|
|
3741
3951
|
const raw = (requesterSessionKey ?? "").trim();
|
|
3742
3952
|
if (!raw) return raw;
|
|
@@ -3756,17 +3966,40 @@ function loadRequesterSessionEntry(requesterSessionKey) {
|
|
|
3756
3966
|
canonicalKey
|
|
3757
3967
|
};
|
|
3758
3968
|
}
|
|
3969
|
+
function buildAnnounceQueueKey(sessionKey, origin) {
|
|
3970
|
+
const accountId = normalizeAccountId(origin?.accountId);
|
|
3971
|
+
if (!accountId) return sessionKey;
|
|
3972
|
+
return `${sessionKey}:acct:${accountId}`;
|
|
3973
|
+
}
|
|
3759
3974
|
async function maybeQueueSubagentAnnounce(params) {
|
|
3760
3975
|
if (params.signal?.aborted) return "none";
|
|
3761
3976
|
const { cfg, entry } = loadRequesterSessionEntry(params.requesterSessionKey);
|
|
3762
|
-
resolveRequesterStoreKey(cfg, params.requesterSessionKey);
|
|
3977
|
+
const canonicalKey = resolveRequesterStoreKey(cfg, params.requesterSessionKey);
|
|
3763
3978
|
if (!entry?.sessionId) return "none";
|
|
3764
3979
|
const queueSettings = resolveQueueSettings({
|
|
3765
3980
|
cfg,
|
|
3766
3981
|
channel: entry?.channel ?? entry?.lastChannel,
|
|
3767
3982
|
sessionEntry: entry
|
|
3768
3983
|
});
|
|
3769
|
-
|
|
3984
|
+
const isActive = isSessionRunActive(canonicalKey);
|
|
3985
|
+
const shouldFollowup = queueSettings.mode === "followup" || queueSettings.mode === "collect" || queueSettings.mode === "steer-backlog" || queueSettings.mode === "interrupt";
|
|
3986
|
+
if (isActive && (shouldFollowup || queueSettings.mode === "steer")) {
|
|
3987
|
+
const origin = resolveAnnounceOrigin(entry, params.requesterOrigin);
|
|
3988
|
+
enqueueAnnounce({
|
|
3989
|
+
key: buildAnnounceQueueKey(canonicalKey, origin),
|
|
3990
|
+
item: {
|
|
3991
|
+
announceId: params.announceId,
|
|
3992
|
+
prompt: params.triggerMessage,
|
|
3993
|
+
summaryLine: params.summaryLine,
|
|
3994
|
+
enqueuedAt: Date.now(),
|
|
3995
|
+
sessionKey: canonicalKey,
|
|
3996
|
+
origin
|
|
3997
|
+
},
|
|
3998
|
+
settings: queueSettings,
|
|
3999
|
+
send: sendAnnounce
|
|
4000
|
+
});
|
|
4001
|
+
return "queued";
|
|
4002
|
+
}
|
|
3770
4003
|
return "none";
|
|
3771
4004
|
}
|
|
3772
4005
|
function queueOutcomeToDeliveryResult(outcome) {
|
|
@@ -5192,4 +5425,4 @@ function initSubagentRegistry() {
|
|
|
5192
5425
|
}
|
|
5193
5426
|
|
|
5194
5427
|
//#endregion
|
|
5195
|
-
export {
|
|
5428
|
+
export { resolveQueueSettings as $, createAgentToAgentPolicy as A, extractQueueDirective as At, AGENT_LANE_NESTED as B, runAgentStep as C, logWebhookError as Ct, sanitizeTextContent as D, stopDiagnosticHeartbeat as Dt, extractAssistantText as E, startDiagnosticHeartbeat as Et, resolveDisplaySessionKey as F, registerAgentRunContext as Ft, killSessionRun as G, getSubagentDepthFromSessionStore as H, resolveInternalSessionKey as I, waitForSessionRunEnd as J, registerSessionRun as K, resolveMainSessionAlias as L, resolveEffectiveSessionToolsVisibility as M, emitAgentEvent as Mt, resolveSandboxedSessionToolContext as N, getAgentRunContext as Nt, stripToolMessages as O, emitDiagnosticEvent as Ot, isResolvedSessionVisibleToRequester as P, onAgentEvent as Pt, unregisterSessionBindingAdapter as Q, resolveSessionReference as R, readLatestAssistantReply as S, logSessionStateChange as St, deriveChannel as T, logWebhookReceived as Tt, getActiveSessionRunCount as U, AGENT_LANE_SUBAGENT as V, isSessionRunActive as W, getSessionBindingService as X, extractTextFromChatContent as Y, registerSessionBindingAdapter as Z, buildAgentToAgentReplyContext as _, setCommandLaneConcurrency as _t, listDescendantRunsForRequester as a, normalizeReplyPayload as at, resolveAnnounceTargetFromKey as b, logMessageProcessed as bt, markSubagentRunTerminated as c, resolveHeartbeatPrompt as ct, subagent_registry_exports as d, clearCommandLane as dt, enqueueFollowupRun as et, resolveAgentTimeoutMs as f, getActiveTaskCount as ft, buildAgentToAgentMessageContext as g, resetAllLanes as gt, buildAgentToAgentAnnounceContext as h, markGatewayDraining as ht, initSubagentRegistry as i, routeReply as it, createSessionVisibilityGuard as j, clearAgentRunContext as jt, stripReasoningTagsFromText as k, isDiagnosticsEnabled as kt, registerSubagentRun as l, buildOutboundSessionContext as lt, runSubagentAnnounceFlow as m, getTotalQueueSize as mt, countActiveDescendantRuns as n, scheduleFollowupDrain as nt, listSubagentRunsForRequester as o, createReceiptCard as ot, buildSubagentSystemPrompt as p, getQueueSize as pt, unregisterSessionRun as q, countActiveRunsForSession as r, isRoutableChannel as rt, markSubagentRunForSteerRestart as s, DEFAULT_HEARTBEAT_EVERY as st, clearSubagentRunSteerRestart as t, getFollowupQueueDepth as tt, replaceSubagentRunAfterSteer as u, clearSessionQueues as ut, isAnnounceSkip as v, waitForActiveTasks as vt, classifySessionKind as w, logWebhookProcessed as wt, resolvePingPongTurns as x, logMessageQueued as xt, isReplySkip as y, CommandLane as yt, shouldResolveSessionIdInput as z };
|