kaijibot 2026.7.17 → 2026.7.18-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/CHANGELOG.md +39 -0
- package/dist/.buildstamp +1 -1
- package/dist/{abort-I0-eDavg.js → abort-DEenN3XO.js} +3 -3
- package/dist/{abort.runtime-M52-no7A.js → abort.runtime-DP1jQByv.js} +1 -1
- package/dist/abort.runtime.js +1 -1
- package/dist/{acp-spawn-D3hMBClG.js → acp-spawn-DjwIYYxP.js} +2 -2
- package/dist/{acp-stateful-target-driver-TYpKC4DW.js → acp-stateful-target-driver-D4wWnofg.js} +2 -2
- package/dist/{action-info-8-F2a_ER.js → action-info-sRvCX3Wa.js} +1 -1
- package/dist/{action-kill-DFedidhC.js → action-kill-OJ9bV6ZW.js} +2 -2
- package/dist/{action-send-Df7A0z5C.js → action-send-Du9HPWE5.js} +2 -2
- package/dist/{action-spawn-C4za22TL.js → action-spawn-BC6GlnSf.js} +1 -1
- package/dist/agent-CIqECtzI.js +2 -0
- package/dist/{agent-command-Bcmr1vsH.js → agent-command-DiWE05u_.js} +5 -5
- package/dist/{agent-runner.runtime-l9Yl39Dh.js → agent-runner.runtime-B5lcw0Em.js} +4 -4
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/{api-JUmLh8ud.js → api-Bmmy1g5_.js} +1 -1
- package/dist/api-DDscfOpx.js +2 -0
- package/dist/{binding-routing-DPeL1haF.js → binding-routing-1zDv5KSC.js} +1 -1
- package/dist/{binding-targets-C5URcWCQ.js → binding-targets-CAWqT0R8.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +26 -9
- package/dist/{capability-cli-BfoTHsjQ.js → capability-cli-LB-Fz57s.js} +3 -3
- package/dist/{channel-core-fyKeJ1Br.js → channel-core-BCrg6ahH.js} +1 -1
- package/dist/{channel.runtime-DNDKawb8.js → channel.runtime-CqPiRqJv.js} +1 -1
- package/dist/channel.runtime.js +1 -1
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-auth-BnzXlAXo.js → command-auth-Bacu6Sno.js} +1 -1
- package/dist/{command-registry-BlcOv8d5.js → command-registry-DUjNcXaK.js} +6 -6
- package/dist/{command-registry-Dd8iHugC.js → command-registry-_DwSrW1y.js} +1 -1
- package/dist/{commands-acp-FPxa_9MN.js → commands-acp-huF9YrGM.js} +3 -3
- package/dist/{commands-compact.runtime-CBJ8UXSt.js → commands-compact.runtime-Ci4d3-cT.js} +2 -2
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/{commands-handlers.runtime-Ca-MZ5vS.js → commands-handlers.runtime-Bhi1pxg8.js} +12 -12
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/{commands-status-DkrzF6TG.js → commands-status-DGgO6OI4.js} +3 -3
- package/dist/{commands-status.runtime-BB5Kd_yA.js → commands-status.runtime-BQi-Tbim.js} +1 -1
- package/dist/commands-status.runtime.js +1 -1
- package/dist/{commands-subagents-control.runtime-C7iPlD7i.js → commands-subagents-control.runtime-CEelL7Ep.js} +2 -2
- package/dist/commands-subagents-control.runtime-CLnT5ZL7.js +2 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/{commands.runtime-DS4ru791.js → commands.runtime-DEJHk75f.js} +3 -3
- package/dist/commands.runtime.js +1 -1
- package/dist/{compact-Cx4sabTd.js → compact-BAb30KLb.js} +4 -4
- package/dist/{compact.runtime-BpNkPMXc.js → compact.runtime-W-zXjTIK.js} +1 -1
- package/dist/compact.runtime.js +1 -1
- package/dist/{completion-cli-B9SuI4eg.js → completion-cli-DcLXDbYL.js} +1 -1
- package/dist/{completion-cli-Dses5g_s.js → completion-cli-cthn8R4_.js} +2 -2
- package/dist/control-ui/assets/{agents-DiQOOUPo.js → agents-Bz0dvWDM.js} +2 -2
- package/dist/control-ui/assets/{anthropic-jqY0_asV.js → anthropic-DxvlKdKL.js} +2 -2
- package/dist/control-ui/assets/{azure-openai-responses-CMSFBDre.js → azure-openai-responses-DquyLqG4.js} +2 -2
- package/dist/control-ui/assets/{cron-UTp-kgvI.js → cron-BpgKjDc9.js} +2 -2
- package/dist/control-ui/assets/{dialogues-kBC5ygCj.js → dialogues-CImsVt84.js} +2 -2
- package/dist/control-ui/assets/{history-CZljqjDR.js → history-B4feNm8p.js} +2 -2
- package/dist/control-ui/assets/{index-DDm0yukl.js → index-BZqdY-T7.js} +94 -39
- package/dist/control-ui/assets/{index-BHEJLbGm.css → index-Ktp1D-Lt.css} +1 -1
- package/dist/control-ui/assets/{mistral-BZJik47K.js → mistral-DSycvo7P.js} +2 -2
- package/dist/control-ui/assets/{openai-codex-responses-DfPrHzZL.js → openai-codex-responses-BPzbKC9r.js} +2 -2
- package/dist/control-ui/assets/{openai-completions-CARnMfYb.js → openai-completions-B95462TV.js} +2 -2
- package/dist/control-ui/assets/{openai-responses-26r7KmMR.js → openai-responses-DZhAsNFq.js} +2 -2
- package/dist/control-ui/assets/{openai-responses-shared-BwLhDJge.js → openai-responses-shared-UQnBXHlZ.js} +2 -2
- package/dist/control-ui/index.html +2 -2
- package/dist/{conversation-runtime-DwLwwMbT.js → conversation-runtime-BIRQxJAQ.js} +2 -2
- package/dist/{core-CG-NtDh0.js → core-dHf1rXCj.js} +2 -2
- package/dist/{delegate-Bkyqycdd.js → delegate-B8GAXDW_.js} +1 -1
- package/dist/{direct-dm-DB2M--Pc.js → direct-dm-DKMUAhk1.js} +1 -1
- package/dist/{dispatch-BDM--eoG.js → dispatch-BdhowhtO.js} +2 -2
- package/dist/{dispatch-acp-BoeuVLTi.js → dispatch-acp-BC2SPF8e.js} +1 -1
- package/dist/{dispatch-acp-manager.runtime-Mz_NPqPo.js → dispatch-acp-manager.runtime-BGisYuKN.js} +1 -1
- package/dist/dispatch-acp-manager.runtime.js +1 -1
- package/dist/{dispatch-acp.runtime-BGUC7a0G.js → dispatch-acp.runtime-DP9sAEqW.js} +1 -1
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/{doctor-completion-Ct5ePYoT.js → doctor-completion-C77mw9dY.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +2 -2
- package/dist/extensions/browser/test-support.js +1 -1
- package/dist/extensions/device-pair/api.js +1 -1
- package/dist/extensions/device-pair/index.js +3 -3
- package/dist/extensions/device-pair/notify.js +1 -1
- package/dist/extensions/device-pair/pair-command-approve.js +1 -1
- package/dist/extensions/diffs/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/feishu/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/feishu/api.js +6 -6
- package/dist/extensions/feishu/contract-api.js +1 -1
- package/dist/extensions/feishu/runtime-api.js +1 -1
- package/dist/extensions/kindle-portal/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/memory-core/cli-metadata.js +1 -1
- package/dist/extensions/memory-core/index.js +52 -12
- package/dist/extensions/memory-lancedb/cli-metadata.js +1 -1
- package/dist/extensions/openshell/index.js +1 -1
- package/dist/extensions/webhooks/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/webhooks/api.js +1 -1
- package/dist/extensions/webhooks/index.js +1 -1
- package/dist/extensions/wechat/api.js +1 -1
- package/dist/{gateway-cli-DomVPxAh.js → gateway-cli-DiCwCvs2.js} +1 -1
- package/dist/get-reply-from-config.runtime-BykYfZTz.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/{heartbeat-runner-DobYeQp3.js → heartbeat-runner-8zmwK3c_.js} +1 -1
- package/dist/{heartbeat-runner-C4g2kyG_.js → heartbeat-runner-DkbwBSmU.js} +2 -2
- package/dist/heartbeat-runner.runtime-lmjFZzMf.js +2 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/{inbound-reply-dispatch-DlXpZ7lA.js → inbound-reply-dispatch-Df1Tjahr.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{kaijibot-tools-TBcwPnU9.js → kaijibot-tools-D6T03IEI.js} +12 -12
- package/dist/kaijibot-tools.runtime-DWabduP3.js +2 -0
- package/dist/kaijibot-tools.runtime.js +1 -1
- package/dist/{library-6kc_aVUW.js → library-Dv6zy_Y3.js} +1 -1
- package/dist/llm-slug-generator.js +2 -2
- package/dist/{manager-CXQpNSi_.js → manager-cfe88Tg5.js} +1 -1
- package/dist/{models-CR0-raM2.js → models-D5CLysjY.js} +1 -1
- package/dist/{models-cli-C-FOj8M4.js → models-cli-DzzawTab.js} +1 -1
- package/dist/{models-BUJi1qvn.js → models-rVmW6ArC.js} +1 -1
- package/dist/{monitor-Bw5LpKUi.js → monitor-B2u1lwaR.js} +1 -1
- package/dist/{monitor-C9JG5liX.js → monitor-BWnQFmxx.js} +4 -4
- package/dist/{notify-l9t1AUjj.js → notify-9LAWdpCU.js} +1 -1
- package/dist/{onboard-XqPZptyZ.js → onboard-ByBOFsMh.js} +1 -1
- package/dist/{pair-command-approve--mMU5JW3.js → pair-command-approve-DeNrFTix.js} +2 -2
- package/dist/{persistent-bindings.lifecycle-s5kIp8jZ.js → persistent-bindings.lifecycle-5lR8hRDU.js} +1 -1
- package/dist/{pi-embedded-cZPMi-6U.js → pi-embedded-B1o5ExvC.js} +3 -3
- package/dist/pi-embedded-B7tiEoV6.js +2 -0
- package/dist/{pi-embedded-runner-CNZ_FQuW.js → pi-embedded-runner-CJ-CaVE0.js} +3 -3
- package/dist/{pi-embedded.runtime-3ZZXr1SE.js → pi-embedded.runtime-zVWm0lMX.js} +2 -2
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/plugin-sdk/acp-binding-runtime.js +1 -1
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-runtime.js +1 -1
- package/dist/plugin-sdk/channel-core.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +1 -1
- package/dist/plugin-sdk/command-auth.js +2 -2
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/conversation-binding-runtime.js +1 -1
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +3 -3
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
- package/dist/plugin-sdk/inbound-reply-dispatch.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/plugin-test-runtime.js +1 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.js +1 -1
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/src/config/types.cognitive.d.ts +5 -0
- package/dist/plugin-sdk/src/hooks/bundled/session-memory/transcript.d.ts +11 -0
- package/dist/plugin-sdk/testing.js +3 -3
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/{program-DGQr_WQf.js → program-DS-8Zwu4.js} +1 -1
- package/dist/{prompt-select-styled-V26bnHFJ.js → prompt-select-styled-C69tDbZE.js} +3 -3
- package/dist/{provider-dispatcher-TTwWYfrD.js → provider-dispatcher-SgJI1G6X.js} +1 -1
- package/dist/{push-apns-B9_EG0TP.js → push-apns-DsZMWR7H.js} +1 -1
- package/dist/{register.agent-CDbJqcF9.js → register.agent-CYIA-3A8.js} +3 -3
- package/dist/{register.maintenance-ij7dRag2.js → register.maintenance-CodkQYH0.js} +1 -1
- package/dist/{register.onboard-Bhf40m-r.js → register.onboard-CjHAd-w1.js} +1 -1
- package/dist/{register.setup-D_w9hS-k.js → register.setup-t2NnQRDZ.js} +1 -1
- package/dist/{register.status-health-sessions-CedCh-VK.js → register.status-health-sessions-Djuev7WE.js} +5 -5
- package/dist/{register.subclis-CHNjr3Q8.js → register.subclis-CMoCeKer.js} +1 -1
- package/dist/{register.subclis-DQEMieUN.js → register.subclis-D7TiVr1J.js} +5 -5
- package/dist/{reply-BOstMPRO.js → reply-0EZX5d77.js} +10 -8
- package/dist/reply.runtime-Cjb-Kq6_.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/{run-main-CeOiCSNm.js → run-main-BfXZlx_z.js} +7 -7
- package/dist/{runtime-DAF7_LB4.js → runtime-CRafyEXt.js} +9 -9
- package/dist/{runtime-api-Bv843RFE.js → runtime-api-Dlu9OuVG.js} +1 -1
- package/dist/runtime-embedded-pi.runtime-kLrbOH8D.js +3 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-internal-B2X4w1A2.js +2 -0
- package/dist/{runtime-plugins-CE8K3oQy.js → runtime-plugins-DZ-d4z5M.js} +1 -1
- package/dist/{runtime-taskflow-CP3C-adE.js → runtime-taskflow-B0iTG80o.js} +2 -2
- package/dist/{server-0SOo4HAR.js → server-DchO-nGk.js} +1 -1
- package/dist/{server-methods-AbNNStkJ.js → server-methods-BvXohqWF.js} +19 -19
- package/dist/{server-node-events-DD9k_YA4.js → server-node-events-CGYCp3It.js} +3 -3
- package/dist/{server.impl-C1MewhVQ.js → server.impl-Bps8QeGH.js} +23 -21
- package/dist/{session-reset-service-CbmzO7ch.js → session-reset-service-DIDz5xmR.js} +4 -4
- package/dist/{session-subagent-reactivation.runtime-5OKh_vCb.js → session-subagent-reactivation.runtime-Bo1lb74O.js} +1 -1
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/{sessions.runtime-ByBIVUeU.js → sessions.runtime-C16V1Uk8.js} +1 -1
- package/dist/sessions.runtime.js +1 -1
- package/dist/{setup-CQ3r8vGY.js → setup-BXGQ-_iq.js} +1 -1
- package/dist/{setup.finalize-D6KIBiYt.js → setup.finalize-he7Py8Ag.js} +2 -2
- package/dist/status-XAZWC0To.js +3 -0
- package/dist/{status-all-Cp-cnwrd.js → status-all-DENgrL4i.js} +1 -1
- package/dist/{status-json-CwDeMD9D.js → status-json-BBqBtVVo.js} +1 -1
- package/dist/{status-Cphx87kP.js → status-suiP67rD.js} +4 -4
- package/dist/{status.scan-Cod6-Xg9.js → status.scan-DDxcJejB.js} +2 -2
- package/dist/{status.scan-overview-BNfUFhPN.js → status.scan-overview-gwtkJZ20.js} +1 -1
- package/dist/{status.scan.fast-json-DNwDMU4x.js → status.scan.fast-json-CBQYyOnJ.js} +1 -1
- package/dist/{status.scan.fast-json-DFiuxHD7.js → status.scan.fast-json-DWvJmBmw.js} +1 -1
- package/dist/{status.summary-D-YiGe8m.js → status.summary-BfUdZLf1.js} +1 -1
- package/dist/{status.summary-DE8mQI2F.js → status.summary-SpGq9pkw.js} +1 -1
- package/dist/{subagent-announce.registry.runtime-xJpvkBxu.js → subagent-announce.registry.runtime-Cpf_M-ak.js} +2 -2
- package/dist/subagent-announce.registry.runtime.js +1 -1
- package/dist/{subagent-control-D4QJl4vX.js → subagent-control-Cjws5kZl.js} +1 -1
- package/dist/{subagent-orphan-recovery-Oje9kIzO.js → subagent-orphan-recovery-D0l5ZuE1.js} +2 -2
- package/dist/{subagent-registry-CqFZy720.js → subagent-registry-CYPgGMC3.js} +4 -4
- package/dist/subagent-registry-runtime-BQYxmBwh.js +2 -0
- package/dist/{subagent-registry.runtime-BOFyP2P1.js → subagent-registry.runtime-B6Hp3Ijg.js} +1 -1
- package/dist/subagent-registry.runtime.js +1 -1
- package/dist/{subagent-spawn-BScUdvqn.js → subagent-spawn-CQvalu-f.js} +1 -1
- package/dist/{task-executor-DRs8LchA.js → task-executor-BGcrSjjA.js} +2 -2
- package/dist/{task-owner-access-DZKQHIKu.js → task-owner-access-DElR2sp5.js} +1 -1
- package/dist/{task-registry-CxCPe3NU.js → task-registry-BYPWgt0Q.js} +1 -1
- package/dist/task-registry-control.runtime-BgGYjOK3.js +3 -0
- package/dist/task-registry-control.runtime.js +1 -1
- package/dist/{task-registry.maintenance-DoZEUnQ4.js → task-registry.maintenance-v9vIMaDI.js} +1 -1
- package/dist/{task-registry.maintenance-3Ia5xCSd.js → task-registry.maintenance-xeM0IC5J.js} +2 -2
- package/dist/{testing-DKQQLL6h.js → testing-CmHL8OGb.js} +2 -2
- package/dist/{thread-bindings-BDidlDRK.js → thread-bindings-CzB0e7JB.js} +1 -1
- package/dist/{tools-effective-inventory-BQznTKgv.js → tools-effective-inventory-BteZ_OU-.js} +1 -1
- package/dist/transcript-Cz0cAXl4.js +2 -0
- package/dist/{transcript-egWcwG11.js → transcript-USC8tXlX.js} +38 -1
- package/dist/{update-cli-CioxqKfZ.js → update-cli-oPs2WQap.js} +3 -3
- package/package.json +1 -1
- package/dist/agent-BfGpMQ7j.js +0 -2
- package/dist/api-4gTk7yvG.js +0 -2
- package/dist/commands-subagents-control.runtime-2uKGHlEJ.js +0 -2
- package/dist/get-reply-from-config.runtime-CNvnbTPV.js +0 -2
- package/dist/heartbeat-runner.runtime-hXvD66xw.js +0 -2
- package/dist/kaijibot-tools.runtime-DQAzFfl1.js +0 -2
- package/dist/pi-embedded-bvHflzDH.js +0 -2
- package/dist/reply.runtime-CMxLw3Ed.js +0 -2
- package/dist/runtime-embedded-pi.runtime-CAZi1ZKT.js +0 -3
- package/dist/runtime-internal-1p0Isfm0.js +0 -2
- package/dist/status-CL-EI4RP.js +0 -3
- package/dist/subagent-registry-runtime-CHAsebWM.js +0 -2
- package/dist/task-registry-control.runtime-CjmYM79f.js +0 -3
- package/dist/transcript-DtXP6-6Z.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -13,8 +13,39 @@ Repo: https://github.com/Kaiji-Z/kaijibot · Backup: https://gitee.com/kaiji1126
|
|
|
13
13
|
|
|
14
14
|
## 2026.7.x — Cognitive identity system & live model discovery
|
|
15
15
|
|
|
16
|
+
### ⚠️ Breaking (2026.7.18-1)
|
|
17
|
+
|
|
18
|
+
- **Memory Flush default flipped from ON to OFF.** The session-memory hook now reads the
|
|
19
|
+
full transcript at `compaction:after` (was capped at 500 messages), giving it complete
|
|
20
|
+
pre-compaction context and making the parallel Memory Flush pipeline largely redundant.
|
|
21
|
+
To re-enable agent-curated pre-compaction memory extraction, set
|
|
22
|
+
`agents.defaults.compaction.memoryFlush.enabled: true` in `~/.kaijibot/kaijiBot.json`
|
|
23
|
+
or toggle it on in **Settings → Quick Settings → 压缩前记忆冲刷**.
|
|
24
|
+
Most users do not need to re-enable it — the hook covers the same ground.
|
|
25
|
+
|
|
16
26
|
### Highlights
|
|
17
27
|
|
|
28
|
+
- **Memory system: unified on session-memory hook as the canonical writer.** Two parallel
|
|
29
|
+
fixes shipped together: (1) hook at `compaction:after` now reads the full session file
|
|
30
|
+
(verified: compaction only appends a summary entry, never removes messages, so pre-compaction
|
|
31
|
+
content is preserved in the file); previously it was capped at 500 messages and missed early
|
|
32
|
+
pre-compaction content in long multi-compaction sessions. (2) Memory Flush now defaults to
|
|
33
|
+
OFF to eliminate overlap with the hook.
|
|
34
|
+
- **Memory artifacts dated by conversation start, not pipeline trigger time.** Both the
|
|
35
|
+
session-memory hook (dialogue archive, daily file, dialogue frontmatter, topic frontmatter)
|
|
36
|
+
and the consolidation pipeline (MEMORY.md inline sections, daily file append, wiki route)
|
|
37
|
+
now derive their date stamps from the first user/assistant message timestamp in the source
|
|
38
|
+
transcript, with fallback to wall-clock time. Fixes the bug where a 22:00→02:00 conversation
|
|
39
|
+
that was `/new`'d at 09:00 next morning got filed under the wrong day.
|
|
40
|
+
- **Dialogues archive browser (new Control UI tab).** New "聊天记录" tab reads
|
|
41
|
+
`memory/dialogues/*.md` per-agent workspace, with Agent → Date → Dialogue hierarchy in the
|
|
42
|
+
sidebar and markdown-rendered detail pane. Two new gateway RPCs: `dialogues.list` and
|
|
43
|
+
`dialogues.get`. Distinct from the existing "Sessions" tab (renamed from "History"), which
|
|
44
|
+
continues to manage active sessions from `sessions.json`.
|
|
45
|
+
- **Quick settings card redesigned** with hierarchical cognitive toggles (master +
|
|
46
|
+
洞察推送 / 技能进化 / 纠错记忆 / 画像建模), and surfaced three previously hidden
|
|
47
|
+
token-consuming features: 记忆整合 (consolidation), 会话记忆归档 (session-memory hook),
|
|
48
|
+
and 压缩前记忆冲刷 (memory flush, now default-off).
|
|
18
49
|
- **Cognitive identity system** (`src/cognitive/identity.ts`): unified, channel-agnostic
|
|
19
50
|
`resolveCognitiveUserId()`. Control UI, TUI, and mobile clients map to a single `operator`
|
|
20
51
|
identity; group sessions are correctly excluded from per-user profiles. The old `ou_`-prefix
|
|
@@ -37,6 +68,14 @@ Repo: https://github.com/Kaiji-Z/kaijibot · Backup: https://gitee.com/kaiji1126
|
|
|
37
68
|
so non-message reset paths still capture summaries and corrections.
|
|
38
69
|
- Memory: chunk dialogue files at turn boundaries and default to Porter stemming for better
|
|
39
70
|
full-text search recall.
|
|
71
|
+
- Memory: `appendToMemoryFile` dep now accepts a `localDateStr` string to avoid UTC/local
|
|
72
|
+
off-by-one when routing consolidated summaries to the correct daily file. Previously the
|
|
73
|
+
route layer computed local date but the dep impl used `toISOString()` (UTC), causing the
|
|
74
|
+
section header and target file to disagree at certain timezones.
|
|
75
|
+
- Cognitive: new `cognitive.correction.enabled` config key (default `true`) gates the
|
|
76
|
+
correction pipeline in three locations: `get-reply-run.ts` (CorrectionStore load),
|
|
77
|
+
`session-memory` hook (post-session extraction), and `kaijibot-tools.ts`
|
|
78
|
+
(`record_correction` agent tool registration). Surfaces as the "纠错记忆" sub-toggle.
|
|
40
79
|
- Branding: replaced inherited OpenClaw lobster icons with the KaijiBot K logo; filter evolution
|
|
41
80
|
signals out of chat history.
|
|
42
81
|
|
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1784361018988,"head":"bbd33c53788c5646646f516f521de421874dc722"}
|
|
@@ -7,12 +7,12 @@ import { a as resolveSessionStoreEntry, c as updateSessionStore } from "./store-
|
|
|
7
7
|
import "./sessions-CtyoqgDA.js";
|
|
8
8
|
import { l as resolveStorePath } from "./paths-DSl3hU-R.js";
|
|
9
9
|
import { t as loadSessionStore } from "./store-load-BxI--Q71.js";
|
|
10
|
-
import { o as getLatestSubagentRunByChildSessionKey, p as markSubagentRunTerminated, u as listSubagentRunsForController } from "./subagent-registry-
|
|
10
|
+
import { o as getLatestSubagentRunByChildSessionKey, p as markSubagentRunTerminated, u as listSubagentRunsForController } from "./subagent-registry-CYPgGMC3.js";
|
|
11
11
|
import { b as resolveMainSessionAlias, y as resolveInternalSessionKey } from "./subagents-format-D7wqUkNu.js";
|
|
12
12
|
import { i as clearSessionQueues } from "./queue-DenPDzwI.js";
|
|
13
13
|
import { h as replyRunRegistry, t as abortEmbeddedPiRun } from "./runs-BaYK6BOV.js";
|
|
14
|
-
import { n as getAcpSessionManager } from "./manager-
|
|
15
|
-
import "./pi-embedded-
|
|
14
|
+
import { n as getAcpSessionManager } from "./manager-cfe88Tg5.js";
|
|
15
|
+
import "./pi-embedded-B7tiEoV6.js";
|
|
16
16
|
import { i as setAbortMemory, n as isAbortRequestText } from "./abort-primitives-DvDwgEzz.js";
|
|
17
17
|
import { o as stripMentions, s as stripStructuralPrefixes } from "./mentions-CmVlRfs6.js";
|
|
18
18
|
import { t as resolveCommandAuthorization } from "./command-auth-BRSJRW_4.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as tryFastAbortFromMessage, t as formatAbortReplyText } from "./abort-
|
|
1
|
+
import { i as tryFastAbortFromMessage, t as formatAbortReplyText } from "./abort-DEenN3XO.js";
|
|
2
2
|
export { formatAbortReplyText, tryFastAbortFromMessage };
|
package/dist/abort.runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./abort.runtime-
|
|
1
|
+
export * from "./abort.runtime-DP1jQByv.js";
|
|
@@ -21,10 +21,10 @@ import { i as enqueueSystemEvent } from "./system-events-DgjMy0YZ.js";
|
|
|
21
21
|
import { r as callGateway } from "./call-Ro4Ehd9q.js";
|
|
22
22
|
import { b as resolveMainSessionAlias, y as resolveInternalSessionKey } from "./subagents-format-D7wqUkNu.js";
|
|
23
23
|
import { l as onAgentEvent } from "./agent-events-2s8fi-gj.js";
|
|
24
|
-
import { i as createRunningTaskRun, s as recordTaskRunProgressByRunId } from "./task-executor-
|
|
24
|
+
import { i as createRunningTaskRun, s as recordTaskRunProgressByRunId } from "./task-executor-BGcrSjjA.js";
|
|
25
25
|
import { i as isSessionBindingError, r as getSessionBindingService } from "./session-binding-service-DT52cisv.js";
|
|
26
26
|
import { t as resolveConversationIdFromTargets } from "./conversation-id-BIG6X6iY.js";
|
|
27
|
-
import { n as getAcpSessionManager } from "./manager-
|
|
27
|
+
import { n as getAcpSessionManager } from "./manager-cfe88Tg5.js";
|
|
28
28
|
import { n as readAcpSessionEntry } from "./session-meta-DMv3di60.js";
|
|
29
29
|
import { n as resolveAcpAgentPolicyError, t as isAcpEnabledByPolicy } from "./policy-BXJH-z1T.js";
|
|
30
30
|
import { r as resolveAcpThreadSessionDetailLines, t as resolveAcpSessionCwd } from "./session-identifiers-DWzOpl8C.js";
|
package/dist/{acp-stateful-target-driver-TYpKC4DW.js → acp-stateful-target-driver-D4wWnofg.js}
RENAMED
|
@@ -2,8 +2,8 @@ import { n as isAcpSessionKey } from "./session-key-utils-Ix5VOQOP.js";
|
|
|
2
2
|
import { u as resolveAgentIdFromSessionKey } from "./session-key-O1KN_Mwi.js";
|
|
3
3
|
import { n as readAcpSessionEntry } from "./session-meta-DMv3di60.js";
|
|
4
4
|
import { c as resolveConfiguredAcpBindingSpecFromRecord } from "./binding-registry-BdCZ4VII.js";
|
|
5
|
-
import { i as resolveConfiguredAcpBindingSpecBySessionKey, n as ensureConfiguredAcpBindingSession, t as ensureConfiguredAcpBindingReady } from "./persistent-bindings.lifecycle-
|
|
6
|
-
import { a as performGatewaySessionReset } from "./session-reset-service-
|
|
5
|
+
import { i as resolveConfiguredAcpBindingSpecBySessionKey, n as ensureConfiguredAcpBindingSession, t as ensureConfiguredAcpBindingReady } from "./persistent-bindings.lifecycle-5lR8hRDU.js";
|
|
6
|
+
import { a as performGatewaySessionReset } from "./session-reset-service-DIDz5xmR.js";
|
|
7
7
|
//#region src/channels/plugins/acp-stateful-target-driver.ts
|
|
8
8
|
function toAcpStatefulBindingTargetDescriptor(params) {
|
|
9
9
|
const sessionKey = params.sessionKey.trim();
|
|
@@ -4,7 +4,7 @@ import { m as subagentRuns, s as countPendingDescendantRunsFromRuns, t as getSub
|
|
|
4
4
|
import { t as formatDurationCompact } from "./format-duration-B0hjKqUJ.js";
|
|
5
5
|
import { i as formatRunLabel } from "./subagents-format-D7wqUkNu.js";
|
|
6
6
|
import { a as sanitizeTaskStatusText } from "./task-status-CaY59zv4.js";
|
|
7
|
-
import { r as findTaskByRunIdForOwner } from "./task-owner-access-
|
|
7
|
+
import { r as findTaskByRunIdForOwner } from "./task-owner-access-DElR2sp5.js";
|
|
8
8
|
import { a as loadSubagentSessionEntry, d as resolveSubagentEntryForToken, i as formatTimestampWithAge, p as stopWithText, s as resolveDisplayStatus } from "./shared-BrerOduZ.js";
|
|
9
9
|
//#region src/auto-reply/reply/commands-subagents/action-info.ts
|
|
10
10
|
function handleSubagentsInfoAction(ctx) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as killControlledSubagentRun, r as killAllControlledSubagentRuns } from "./subagent-control-
|
|
1
|
+
import { i as killControlledSubagentRun, r as killAllControlledSubagentRuns } from "./subagent-control-Cjws5kZl.js";
|
|
2
2
|
import { d as resolveSubagentEntryForToken, o as resolveCommandSubagentController, p as stopWithText } from "./shared-BrerOduZ.js";
|
|
3
|
-
import "./commands-subagents-control.runtime-
|
|
3
|
+
import "./commands-subagents-control.runtime-CLnT5ZL7.js";
|
|
4
4
|
//#region src/auto-reply/reply/commands-subagents/action-kill.ts
|
|
5
5
|
async function handleSubagentsKillAction(ctx) {
|
|
6
6
|
const { params, handledPrefix, requesterKey, runs, restTokens } = ctx;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as formatRunLabel } from "./subagents-format-D7wqUkNu.js";
|
|
2
|
-
import { l as sendControlledSubagentMessage, u as steerControlledSubagentRun } from "./subagent-control-
|
|
2
|
+
import { l as sendControlledSubagentMessage, u as steerControlledSubagentRun } from "./subagent-control-Cjws5kZl.js";
|
|
3
3
|
import { d as resolveSubagentEntryForToken, o as resolveCommandSubagentController, p as stopWithText } from "./shared-BrerOduZ.js";
|
|
4
|
-
import "./commands-subagents-control.runtime-
|
|
4
|
+
import "./commands-subagents-control.runtime-CLnT5ZL7.js";
|
|
5
5
|
//#region src/auto-reply/reply/commands-subagents/action-send.ts
|
|
6
6
|
async function handleSubagentsSendAction(ctx, steerRequested) {
|
|
7
7
|
const { params, handledPrefix, runs, restTokens } = ctx;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as normalizeOptionalString } from "./string-coerce-CIT1-v_a.js";
|
|
2
|
-
import { n as spawnSubagentDirect } from "./subagent-spawn-
|
|
2
|
+
import { n as spawnSubagentDirect } from "./subagent-spawn-CQvalu-f.js";
|
|
3
3
|
import { p as stopWithText } from "./shared-BrerOduZ.js";
|
|
4
4
|
//#region src/auto-reply/reply/commands-subagents/action-spawn.ts
|
|
5
5
|
async function handleSubagentsSpawnAction(ctx) {
|
|
@@ -33,11 +33,11 @@ import { j as hasInternalRuntimeContext } from "./errors-DQxQ_yGC.js";
|
|
|
33
33
|
import { i as supportsXHighThinking, t as formatThinkingLevels } from "./thinking-BMEm31pX.js";
|
|
34
34
|
import { i as normalizeOutboundPayloadsForJson, n as formatOutboundPayloadLog, r as normalizeOutboundPayloads, t as deliverOutboundPayloads } from "./deliver-CkWbzTl_.js";
|
|
35
35
|
import { r as getRemoteSkillEligibility, t as canExecRequestNode } from "./exec-defaults-Coqtk10b.js";
|
|
36
|
-
import { A as AGENT_LANE_NESTED, P as formatAgentInternalEventsForPrompt, j as AGENT_LANE_SUBAGENT } from "./subagent-registry-
|
|
36
|
+
import { A as AGENT_LANE_NESTED, P as formatAgentInternalEventsForPrompt, j as AGENT_LANE_SUBAGENT } from "./subagent-registry-CYPgGMC3.js";
|
|
37
37
|
import { n as resolveMessageChannelSelection } from "./channel-selection-CJ-Pb33v.js";
|
|
38
38
|
import { t as buildOutboundSessionContext } from "./session-context-DANKwvvJ.js";
|
|
39
39
|
import { i as resolveSessionDeliveryTarget, r as resolveOutboundTarget } from "./targets-uJzJ0qgY.js";
|
|
40
|
-
import { f as LiveSessionModelSwitchError, l as runWithModelFallback } from "./kaijibot-tools-
|
|
40
|
+
import { f as LiveSessionModelSwitchError, l as runWithModelFallback } from "./kaijibot-tools-D6T03IEI.js";
|
|
41
41
|
import { t as FailoverError } from "./failover-error-BQ-qYWxm.js";
|
|
42
42
|
import { t as getAgentRuntimeCommandSecretTargetIds } from "./command-secret-targets-VahZEGg7.js";
|
|
43
43
|
import { i as emitAgentEvent, t as clearAgentRunContext, u as registerAgentRunContext } from "./agent-events-2s8fi-gj.js";
|
|
@@ -45,15 +45,15 @@ import { t as normalizeReplyPayload } from "./normalize-reply-D6ryMVdF.js";
|
|
|
45
45
|
import { t as applyModelOverrideToSessionEntry } from "./model-overrides-qWP5yRXA.js";
|
|
46
46
|
import { t as resolveAgentTimeoutMs } from "./timeout-Dkhxn08A.js";
|
|
47
47
|
import { i as toAcpRuntimeError } from "./errors-C759V9iL.js";
|
|
48
|
-
import { n as getAcpSessionManager } from "./manager-
|
|
48
|
+
import { n as getAcpSessionManager } from "./manager-cfe88Tg5.js";
|
|
49
49
|
import { n as resolveAcpAgentPolicyError, r as resolveAcpDispatchPolicyError } from "./policy-BXJH-z1T.js";
|
|
50
50
|
import { t as resolveAcpSessionCwd } from "./session-identifiers-DWzOpl8C.js";
|
|
51
51
|
import { n as normalizeSpawnedRunMetadata } from "./spawned-context-Cu617jLq.js";
|
|
52
52
|
import { a as shouldRefreshSnapshotForVersion, n as getSkillsSnapshotVersion } from "./refresh-state-D_ExEV5O.js";
|
|
53
53
|
import { r as buildWorkspaceSkillSnapshot } from "./skills-UsoW4QEK.js";
|
|
54
|
-
import { i as resolveSession, r as prepareSessionManagerForRun, t as runEmbeddedPiAgent } from "./pi-embedded-runner-
|
|
54
|
+
import { i as resolveSession, r as prepareSessionManagerForRun, t as runEmbeddedPiAgent } from "./pi-embedded-runner-CJ-CaVE0.js";
|
|
55
55
|
import { o as resolveBootstrapWarningSignaturesSeen } from "./bootstrap-budget-C-h_zN2a.js";
|
|
56
|
-
import "./pi-embedded-
|
|
56
|
+
import "./pi-embedded-B7tiEoV6.js";
|
|
57
57
|
import { n as resolveSendPolicy } from "./send-policy-zBxYe-S0.js";
|
|
58
58
|
import { t as clearSessionAuthProfileOverride } from "./session-override-2sFN0HYt.js";
|
|
59
59
|
import { t as createReplyPrefixContext } from "./reply-prefix-DI3DJtpD.js";
|
|
@@ -18,7 +18,7 @@ import "./sessions-CtyoqgDA.js";
|
|
|
18
18
|
import { a as resolveSessionTranscriptPath, i as resolveSessionFilePathOptions, r as resolveSessionFilePath } from "./paths-DSl3hU-R.js";
|
|
19
19
|
import { a as resolveFreshSessionTotalTokens } from "./types-BSS90rPt.js";
|
|
20
20
|
import { t as loadSessionStore } from "./store-load-BxI--Q71.js";
|
|
21
|
-
import { N as readPostCompactionContext, t as compactEmbeddedPiSession } from "./compact-
|
|
21
|
+
import { N as readPostCompactionContext, t as compactEmbeddedPiSession } from "./compact-BAb30KLb.js";
|
|
22
22
|
import { o as resolveContextTokensForModel } from "./context-BO8YsdOX.js";
|
|
23
23
|
import { a as resolveModelCostConfig, i as formatUsd, n as estimateUsageCost, r as formatTokenCount } from "./usage-format-B0XHcVaW.js";
|
|
24
24
|
import { a as normalizeUsage, n as deriveSessionTotalTokens, r as hasNonzeroUsage, t as derivePromptTokens } from "./usage-AvsukxPf.js";
|
|
@@ -43,16 +43,16 @@ import { p as resolveSendableOutboundReplyParts, s as hasOutboundReplyContent }
|
|
|
43
43
|
import { i as isRenderablePayload, n as applyReplyThreading, t as applyReplyTagsToPayload } from "./reply-payloads-DyS7nAuT.js";
|
|
44
44
|
import { i as resolveReplyToMode, t as createReplyToModeFilterForChannel } from "./reply-threading-SloFHs5g.js";
|
|
45
45
|
import { n as filterMessagingToolMediaDuplicates, r as shouldSuppressMessagingToolReplies, t as filterMessagingToolDuplicates } from "./reply-payloads-dedupe-CwElahqd.js";
|
|
46
|
-
import { c as isFallbackSummaryError, f as LiveSessionModelSwitchError, l as runWithModelFallback } from "./kaijibot-tools-
|
|
46
|
+
import { c as isFallbackSummaryError, f as LiveSessionModelSwitchError, l as runWithModelFallback } from "./kaijibot-tools-D6T03IEI.js";
|
|
47
47
|
import { u as saveMediaSource } from "./store-Chyd2ieB.js";
|
|
48
48
|
import { i as emitAgentEvent, u as registerAgentRunContext } from "./agent-events-2s8fi-gj.js";
|
|
49
49
|
import { a as scheduleFollowupDrain, n as enqueueFollowupRun, o as refreshQueuedFollowupSession } from "./queue-DenPDzwI.js";
|
|
50
50
|
import { n as routeReply, t as isRoutableChannel } from "./route-reply-CM2h1LkJ.js";
|
|
51
51
|
import { h as replyRunRegistry, m as createReplyOperation, p as ReplyRunAlreadyActiveError, s as queueEmbeddedPiMessage } from "./runs-BaYK6BOV.js";
|
|
52
52
|
import { a as ensureSandboxWorkspaceForSession } from "./sandbox-DonHZ102.js";
|
|
53
|
-
import { n as isLikelyExecutionAckPrompt, t as runEmbeddedPiAgent } from "./pi-embedded-runner-
|
|
53
|
+
import { n as isLikelyExecutionAckPrompt, t as runEmbeddedPiAgent } from "./pi-embedded-runner-CJ-CaVE0.js";
|
|
54
54
|
import { o as resolveBootstrapWarningSignaturesSeen } from "./bootstrap-budget-C-h_zN2a.js";
|
|
55
|
-
import "./pi-embedded-
|
|
55
|
+
import "./pi-embedded-B7tiEoV6.js";
|
|
56
56
|
import { n as resolveCronStorePath, t as loadCronStore } from "./store-BcJiZuX1.js";
|
|
57
57
|
import { r as resolveEffectiveBlockStreamingConfig } from "./block-streaming-Cc7eE-DG.js";
|
|
58
58
|
import { n as resolveOriginMessageProvider, r as resolveOriginMessageTo, t as resolveOriginAccountId } from "./origin-routing-D2VCP4Qy.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./agent-runner.runtime-
|
|
1
|
+
export * from "./agent-runner.runtime-B5lcw0Em.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u as resolveAgentIdFromSessionKey } from "./session-key-O1KN_Mwi.js";
|
|
2
2
|
import { n as deriveLastRoutePolicy } from "./resolve-route-DAlUCsUs.js";
|
|
3
3
|
import { n as resolveConfiguredBinding } from "./binding-registry-BdCZ4VII.js";
|
|
4
|
-
import { t as ensureConfiguredBindingTargetReady } from "./binding-targets-
|
|
4
|
+
import { t as ensureConfiguredBindingTargetReady } from "./binding-targets-CAWqT0R8.js";
|
|
5
5
|
//#region src/channels/plugins/binding-routing.ts
|
|
6
6
|
function resolveConfiguredBindingConversationRef(params) {
|
|
7
7
|
if ("conversation" in params) return params.conversation;
|
|
@@ -42,7 +42,7 @@ async function ensureStatefulTargetBuiltinsRegistered() {
|
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
44
|
builtinsRegisteredPromise = (async () => {
|
|
45
|
-
const { acpStatefulBindingTargetDriver } = await import("./acp-stateful-target-driver-
|
|
45
|
+
const { acpStatefulBindingTargetDriver } = await import("./acp-stateful-target-driver-D4wWnofg.js");
|
|
46
46
|
registerStatefulBindingTargetDriver(acpStatefulBindingTargetDriver);
|
|
47
47
|
})();
|
|
48
48
|
try {
|
package/dist/build-info.json
CHANGED
|
@@ -10,8 +10,8 @@ import { l as resolveStorePath } from "../../paths-DSl3hU-R.js";
|
|
|
10
10
|
import { t as loadSessionStore } from "../../store-load-BxI--Q71.js";
|
|
11
11
|
import { n as SILENT_REPLY_TOKEN } from "../../tokens-NWTABnqe.js";
|
|
12
12
|
import { t as createDefaultDeps } from "../../deps-DlPyffl1.js";
|
|
13
|
-
import { n as agentCommand } from "../../agent-command-
|
|
14
|
-
import "../../agent-
|
|
13
|
+
import { n as agentCommand } from "../../agent-command-DiWE05u_.js";
|
|
14
|
+
import "../../agent-CIqECtzI.js";
|
|
15
15
|
import path from "node:path";
|
|
16
16
|
import fs from "node:fs/promises";
|
|
17
17
|
import crypto from "node:crypto";
|
|
@@ -7,7 +7,7 @@ import { c as resolveAgentIdByWorkspacePath, p as resolveAgentWorkspaceDir } fro
|
|
|
7
7
|
import { i as writeTextAtomic } from "../../json-files-zeySieCd.js";
|
|
8
8
|
import { r as appendFileWithinRoot } from "../../fs-safe-CsNFTTKb.js";
|
|
9
9
|
import { t as resolveCorrectionUserId } from "../../userid-CK-Z-eJa.js";
|
|
10
|
-
import {
|
|
10
|
+
import { d as updateDialogueStaging, i as getDialogueWithStaging, n as findPreviousSessionFile, o as getRecentSessionContentWithResetFallback, t as extractFirstMessageTimestamp } from "../../transcript-USC8tXlX.js";
|
|
11
11
|
import { t as createBackgroundGenerateText } from "../../standalone-generate-Q_nKQQwH.js";
|
|
12
12
|
import { r as resolveHookConfig } from "../../config-B52611-U.js";
|
|
13
13
|
import path from "node:path";
|
|
@@ -43,6 +43,13 @@ function localDateTimeStr(date = /* @__PURE__ */ new Date()) {
|
|
|
43
43
|
* LLM failure so that no session is lost.
|
|
44
44
|
*/
|
|
45
45
|
const log$1 = createSubsystemLogger("hooks/session-memory/summary");
|
|
46
|
+
/**
|
|
47
|
+
* Hard cap on transcript chars sent to the LLM. ~30K tokens at ~3 chars/token
|
|
48
|
+
* for mixed CJK/English — fits comfortably in 32K+ context models with room
|
|
49
|
+
* for the 4K output budget. Truncation keeps the MOST RECENT chars, which
|
|
50
|
+
* capture the compaction entry (summary of older content) + nearby messages.
|
|
51
|
+
*/
|
|
52
|
+
const SUMMARY_TRANSCRIPT_CHAR_BUDGET = 1e5;
|
|
46
53
|
const SUMMARY_SYSTEM_PROMPT = `You are a structured conversation summarizer. The assistant being summarized is a proactive cognitive AI — it intentionally sends unsolicited messages to the user about their interests, cross-domain connections, behavioral patterns, and knowledge suggestions. These proactive messages are a core feature, NOT errors or hallucinations.
|
|
47
54
|
|
|
48
55
|
Analyze the conversation and produce a JSON object with exactly these fields:
|
|
@@ -169,8 +176,11 @@ async function generateStructuredSummary(params) {
|
|
|
169
176
|
const { transcript, cfg, existingTopics } = params;
|
|
170
177
|
if (!transcript.trim()) return createFallbackSummary(transcript);
|
|
171
178
|
try {
|
|
172
|
-
const transcriptSlice = transcript;
|
|
173
|
-
log$1.debug("Generating structured summary", {
|
|
179
|
+
const transcriptSlice = transcript.length > SUMMARY_TRANSCRIPT_CHAR_BUDGET ? transcript.slice(-SUMMARY_TRANSCRIPT_CHAR_BUDGET) : transcript;
|
|
180
|
+
log$1.debug("Generating structured summary", {
|
|
181
|
+
transcriptLength: transcript.length,
|
|
182
|
+
slicedLength: transcriptSlice.length
|
|
183
|
+
});
|
|
174
184
|
const generateText = await createBackgroundGenerateText(cfg, {
|
|
175
185
|
maxTokens: 4e3,
|
|
176
186
|
timeout: 6e4
|
|
@@ -312,7 +322,6 @@ const saveSessionToMemory = async (event) => {
|
|
|
312
322
|
const memoryDir = path.join(workspaceDir, "memory");
|
|
313
323
|
await fs.mkdir(memoryDir, { recursive: true });
|
|
314
324
|
const now = new Date(event.timestamp);
|
|
315
|
-
const dateStr = localDateStr(now);
|
|
316
325
|
const sessionEntry = context.previousSessionEntry || context.sessionEntry || {};
|
|
317
326
|
const currentSessionId = sessionEntry.sessionId;
|
|
318
327
|
let currentSessionFile = sessionEntry.sessionFile || void 0;
|
|
@@ -339,16 +348,23 @@ const saveSessionToMemory = async (event) => {
|
|
|
339
348
|
hasCfg: Boolean(cfg)
|
|
340
349
|
});
|
|
341
350
|
const sessionFile = currentSessionFile || void 0;
|
|
351
|
+
let referenceTime = now;
|
|
352
|
+
if (sessionFile) {
|
|
353
|
+
const firstMsgTime = await extractFirstMessageTimestamp(sessionFile);
|
|
354
|
+
if (firstMsgTime) referenceTime = firstMsgTime;
|
|
355
|
+
}
|
|
356
|
+
const dateStr = localDateStr(referenceTime);
|
|
342
357
|
const sessionPointer = sessionFile && currentSessionId ? {
|
|
343
358
|
sessionId: currentSessionId,
|
|
344
359
|
sessionsDir: path.dirname(sessionFile)
|
|
345
360
|
} : void 0;
|
|
346
361
|
const hookConfig = resolveHookConfig(cfg, "session-memory");
|
|
347
362
|
const messageCount = typeof hookConfig?.messages === "number" && hookConfig.messages > 0 ? Math.min(hookConfig.messages, MESSAGE_CAP) : MESSAGE_CAP;
|
|
363
|
+
const effectiveMessageCount = isCompaction ? Number.MAX_SAFE_INTEGER : messageCount;
|
|
348
364
|
let sessionContent = null;
|
|
349
365
|
let summary;
|
|
350
366
|
if (sessionFile) {
|
|
351
|
-
sessionContent = await getRecentSessionContentWithResetFallback(sessionFile,
|
|
367
|
+
sessionContent = await getRecentSessionContentWithResetFallback(sessionFile, effectiveMessageCount);
|
|
352
368
|
log.debug("Session content loaded", {
|
|
353
369
|
length: sessionContent?.length ?? 0,
|
|
354
370
|
messageCount
|
|
@@ -385,7 +401,7 @@ const saveSessionToMemory = async (event) => {
|
|
|
385
401
|
topicSlug: "session"
|
|
386
402
|
};
|
|
387
403
|
else {
|
|
388
|
-
const timeStr = localTimeStr(
|
|
404
|
+
const timeStr = localTimeStr(referenceTime);
|
|
389
405
|
summary = {
|
|
390
406
|
summary: `(empty session at ${timeStr})`,
|
|
391
407
|
decisions: [],
|
|
@@ -475,7 +491,8 @@ const saveSessionToMemory = async (event) => {
|
|
|
475
491
|
const msg = topicErr instanceof Error ? topicErr.message : String(topicErr);
|
|
476
492
|
log.error("Failed to update topic files or index", { error: msg });
|
|
477
493
|
}
|
|
478
|
-
|
|
494
|
+
const correctionEnabled = cfg?.cognitive?.correction?.enabled !== false;
|
|
495
|
+
if (sessionContent && cfg && allowLlm && correctionEnabled) try {
|
|
479
496
|
const { hasCorrectionSignals, extractCorrectionsFromTranscript } = await import("../../extractor-BegO8mni.js");
|
|
480
497
|
log.info("correction extraction: path B entry", {
|
|
481
498
|
hasSessionContent: !!sessionContent,
|
|
@@ -521,11 +538,11 @@ const saveSessionToMemory = async (event) => {
|
|
|
521
538
|
if (isResetCommand && sessionFile) try {
|
|
522
539
|
const cleanDialogue = await getDialogueWithStaging(stagingPath, sessionFile);
|
|
523
540
|
if (cleanDialogue && cleanDialogue.trim().length > 0) {
|
|
524
|
-
const dialogueFilename = `${localDateStr(
|
|
541
|
+
const dialogueFilename = `${localDateStr(referenceTime)}-${localTimeStr(referenceTime)}.md`;
|
|
525
542
|
const dialoguePath = path.join(dialogueDir, dialogueFilename);
|
|
526
543
|
await writeTextAtomic(dialoguePath, [
|
|
527
544
|
"---",
|
|
528
|
-
`date: ${localDateTimeStr(
|
|
545
|
+
`date: ${localDateTimeStr(referenceTime)}`,
|
|
529
546
|
`participants:`,
|
|
530
547
|
...(summary.participants ?? ["user"]).map((p) => ` - ${p}`),
|
|
531
548
|
`messageCount: ${cleanDialogue.split("\n").length}`,
|
|
@@ -19,7 +19,7 @@ import { a as getImageMetadata } from "./image-ops-D6pm8sdR.js";
|
|
|
19
19
|
import { c as randomIdempotencyKey, r as callGateway } from "./call-Ro4Ehd9q.js";
|
|
20
20
|
import { t as buildGatewayConnectionDetailsWithResolvers } from "./connection-details-AmFFufOT.js";
|
|
21
21
|
import { c as normalizeMimeType, n as extensionForMime, t as detectMime } from "./mime-DiJGEVqo.js";
|
|
22
|
-
import { i as resolveWebFetchDefinition, n as isWebFetchProviderConfigured, r as listWebFetchProviders } from "./kaijibot-tools-
|
|
22
|
+
import { i as resolveWebFetchDefinition, n as isWebFetchProviderConfigured, r as listWebFetchProviders } from "./kaijibot-tools-D6T03IEI.js";
|
|
23
23
|
import { n as listRuntimeImageGenerationProviders, t as generateImage } from "./runtime-CgBLBaL5.js";
|
|
24
24
|
import { l as saveMediaBuffer } from "./store-Chyd2ieB.js";
|
|
25
25
|
import { r as buildMediaUnderstandingRegistry } from "./entry-capabilities-CeHaItSE.js";
|
|
@@ -27,12 +27,12 @@ import { n as listRuntimeVideoGenerationProviders, t as generateVideo } from "./
|
|
|
27
27
|
import { r as listWebSearchProviders, s as runWebSearch, t as isWebSearchProviderConfigured } from "./runtime-Dx_eLxuc.js";
|
|
28
28
|
import { t as resolveMemorySearchConfig } from "./memory-search-DRAz_q1m.js";
|
|
29
29
|
import { t as createDefaultDeps } from "./deps-DlPyffl1.js";
|
|
30
|
-
import { n as agentCommand } from "./agent-command-
|
|
30
|
+
import { n as agentCommand } from "./agent-command-DiWE05u_.js";
|
|
31
31
|
import { r as listSpeechProviders, t as canonicalizeSpeechProviderId } from "./provider-registry-fb19-vhP.js";
|
|
32
32
|
import { n as runCommandWithRuntime } from "./cli-utils-B8hkzrML.js";
|
|
33
33
|
import { a as transcribeAudioFile, r as describeVideoFile, t as describeImageFile } from "./runtime-Cwj_ZgJT.js";
|
|
34
34
|
import { n as registerBuiltInMemoryEmbeddingProviders, t as createEmbeddingProvider } from "./memory-core-bundled-runtime-_-ZPXgk4.js";
|
|
35
|
-
import { i as modelsStatusCommand, v as modelsAuthLoginCommand } from "./models-
|
|
35
|
+
import { i as modelsStatusCommand, v as modelsAuthLoginCommand } from "./models-rVmW6ArC.js";
|
|
36
36
|
import { t as collectOption } from "./helpers-C2lgPgJa.js";
|
|
37
37
|
import path from "node:path";
|
|
38
38
|
import fs from "node:fs/promises";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createChannelPluginBase$1 } from "./core-
|
|
1
|
+
import { n as createChannelPluginBase$1 } from "./core-dHf1rXCj.js";
|
|
2
2
|
//#region src/plugin-sdk/channel-core.ts
|
|
3
3
|
const createChannelPluginBase = (params) => createChannelPluginBase$1(params);
|
|
4
4
|
//#endregion
|
|
@@ -5,7 +5,7 @@ import { i as createAttachedChannelResultAdapter } from "./channel-send-result-C
|
|
|
5
5
|
import { a as createFeishuClient, d as resolveFeishuAccount, f as resolveFeishuRuntimeAccount, t as probeFeishu } from "./probe-CL5DKugq.js";
|
|
6
6
|
import { o as parseFeishuCommentTarget, r as replyComment } from "./drive-D49KmLoZ.js";
|
|
7
7
|
import { a as listFeishuDirectoryGroups, n as getChatMembers, o as listFeishuDirectoryPeers, r as getFeishuMemberInfo, t as getChatInfo } from "./chat-BSHM95XJ.js";
|
|
8
|
-
import "./runtime-api-
|
|
8
|
+
import "./runtime-api-Dlu9OuVG.js";
|
|
9
9
|
import { a as sendCardFeishu, c as sendStructuredCardFeishu, m as sendMediaFeishu, n as getMessageFeishu, o as sendMarkdownCardFeishu, s as sendMessageFeishu, t as editMessageFeishu } from "./send-Cu0PPqPr.js";
|
|
10
10
|
import fs from "fs";
|
|
11
11
|
import path from "path";
|
package/dist/channel.runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./channel.runtime-
|
|
1
|
+
export * from "./channel.runtime-CqPiRqJv.js";
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
],
|
|
15
15
|
"channelCatalogSignature": "a99b78ac99491ac5c8d64c4a6973088cc21688cb",
|
|
16
16
|
"rootHelpBundleSignature": "93cf97cf2a23c3eb95a2912fb09cdf297eb6ae4b",
|
|
17
|
-
"rootHelpText": "\n👾 KaijiBot 2026.7.
|
|
17
|
+
"rootHelpText": "\n👾 KaijiBot 2026.7.18-2 (bbd33c5) — The highest form of cognition is knowing your own ignorance.\n\nUsage: kaijibot [options] [command]\n\nOptions:\n --container <name> Run the CLI inside a running Podman/Docker container\n named <name> (default: env KAIJIBOT_CONTAINER)\n --dev Dev profile: isolate state under ~/.kaijibot-dev, default\n gateway port 19001, and shift derived ports\n (browser/canvas)\n -h, --help Display help for command\n --log-level <level> Global log level override for file + console\n (silent|fatal|error|warn|info|debug|trace)\n --no-color Disable ANSI colors\n --profile <name> Use a named profile (isolates\n KAIJIBOT_STATE_DIR/KAIJIBOT_CONFIG_PATH under\n ~/.kaijibot-<name>)\n -V, --version output the version number\n\nCommands:\n Hint: commands suffixed with * have subcommands. Run <command> --help for details.\n acp * Agent Control Protocol tools\n agent Run one agent turn via the Gateway\n agents * Manage isolated agents (workspaces, auth, routing)\n android-install Set up KaijiBot on Android/Termux (auto-installs\n packages, boot script, battery settings)\n approvals * Manage exec approvals (gateway or node host)\n backup * Create and verify local backup archives for KaijiBot\n state\n capability * Run provider-backed inference commands (fallback alias:\n infer)\n channels * Manage connected chat channels (Telegram, Discord, etc.)\n clawbot * Legacy clawbot command aliases\n completion Generate shell completion script\n config * Non-interactive config helpers\n (get/set/unset/file/validate). Default: starts guided\n setup.\n configure Interactive configuration for credentials, channels,\n gateway, and agent defaults\n cron * Manage cron jobs via the Gateway scheduler\n daemon * Gateway service (legacy alias)\n dashboard Open the Control UI with your current token\n devices * Device pairing + token management\n directory * Lookup contact and group IDs (self, peers, groups) for\n supported chat channels\n dns * DNS helpers for wide-area discovery (Tailscale + CoreDNS)\n docs Search the live KaijiBot docs\n doctor Health checks + quick fixes for the gateway and channels\n gateway * Run, inspect, and query the WebSocket Gateway\n health Fetch health from the running gateway\n help Display help for command\n hooks * Manage internal agent hooks\n infer * Run provider-backed inference commands\n logs Tail gateway file logs via RPC\n mcp * Manage KaijiBot MCP config and channel bridge\n memory Search, inspect, and reindex memory files\n message * Send, read, and manage messages\n migrate Migrate data from OpenClaw or legacy installations to\n KaijiBot\n models * Discover, scan, and configure models\n node * Run and manage the headless node host service\n nodes * Manage gateway-owned node pairing and node commands\n onboard Interactive onboarding for the gateway, workspace, and\n skills\n pairing * Secure DM pairing (approve inbound requests)\n plugins * Manage KaijiBot plugins and extensions\n qa * Run QA scenarios and launch the private QA debugger UI\n qr Generate mobile pairing QR/setup code\n reset Reset local config/state (keeps the CLI installed)\n sandbox * Manage sandbox containers for agent isolation\n secrets * Secrets runtime reload controls\n security * Security tools and local config audits\n sessions * List stored conversation sessions\n setup Initialize local config and agent workspace\n skills * List and inspect available skills\n soul * Manage soul presets (MBTI-based personality profiles)\n status Show channel health and recent session recipients\n system * System events, heartbeat, and presence\n tasks * Inspect durable background task state\n tui Open a terminal UI connected to the Gateway\n uninstall Uninstall the gateway service + local data (CLI remains)\n update * Update KaijiBot and inspect update channel status\n webhooks * Webhook helpers and integrations\n\nExamples:\n kaijibot models --help\n Show detailed help for the models command.\n kaijibot channels login --verbose\n Link personal WhatsApp Web and show QR + connection logs.\n kaijibot message send --target +15555550123 --message \"Hi\" --json\n Send via your web session and print JSON result.\n kaijibot gateway --port 18789\n Run the WebSocket Gateway locally.\n kaijibot --dev gateway\n Run a dev Gateway (isolated state/config) on ws://127.0.0.1:19001.\n kaijibot gateway --force\n Kill anything bound to the default gateway port, then start it.\n kaijibot gateway ...\n Gateway control via WebSocket.\n kaijibot agent --to +15555550123 --message \"Run summary\" --deliver\n Talk directly to the agent using the Gateway; optionally send the WhatsApp reply.\n kaijibot message send --channel feishu --target ou_xxx --message \"Hi\"\n Send via your Telegram bot.\n\nDocs: https://gitee.com/kaiji1126/kaijibot/blob/main/docs/cli.md\n\n"
|
|
18
18
|
}
|
|
@@ -5,7 +5,7 @@ import "./command-auth-BRSJRW_4.js";
|
|
|
5
5
|
import "./stored-model-override-BrEtvHFJ.js";
|
|
6
6
|
import "./commands-models-B7whhnH5.js";
|
|
7
7
|
import { n as buildCommandsMessagePaginated$1, r as buildHelpMessage$1, t as buildCommandsMessage$1 } from "./command-status-builders-DDui5tw-.js";
|
|
8
|
-
import "./direct-dm-
|
|
8
|
+
import "./direct-dm-DKMUAhk1.js";
|
|
9
9
|
import "./skill-commands-GSh4fWmt.js";
|
|
10
10
|
//#region src/plugin-sdk/command-auth.ts
|
|
11
11
|
/** Fast-path DM command authorization when only policy and sender allowlist state matter. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as resolveCliArgvInvocation } from "./argv-invocation-CagzCjnZ.js";
|
|
2
2
|
import { n as shouldRegisterPrimaryCommandOnly } from "./command-registration-policy-eu4d9XHC.js";
|
|
3
|
-
import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs, r as registerSubCliCommands } from "./register.subclis-
|
|
3
|
+
import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs, r as registerSubCliCommands } from "./register.subclis-D7TiVr1J.js";
|
|
4
4
|
import { i as registerCommandGroups, r as registerCommandGroupByName } from "./register-command-groups-QmbIRaCk.js";
|
|
5
5
|
import { n as getCoreCliCommandNames$1, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-kcRc6iqP.js";
|
|
6
6
|
//#region src/cli/program/command-registry.ts
|
|
@@ -16,12 +16,12 @@ const coreEntrySpecs = [
|
|
|
16
16
|
...withProgramOnlySpecs(defineImportedProgramCommandGroupSpecs([
|
|
17
17
|
{
|
|
18
18
|
commandNames: ["setup"],
|
|
19
|
-
loadModule: () => import("./register.setup-
|
|
19
|
+
loadModule: () => import("./register.setup-t2NnQRDZ.js"),
|
|
20
20
|
exportName: "registerSetupCommand"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
commandNames: ["onboard"],
|
|
24
|
-
loadModule: () => import("./register.onboard-
|
|
24
|
+
loadModule: () => import("./register.onboard-CjHAd-w1.js"),
|
|
25
25
|
exportName: "registerOnboardCommand"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -46,7 +46,7 @@ const coreEntrySpecs = [
|
|
|
46
46
|
"reset",
|
|
47
47
|
"uninstall"
|
|
48
48
|
],
|
|
49
|
-
loadModule: () => import("./register.maintenance-
|
|
49
|
+
loadModule: () => import("./register.maintenance-CodkQYH0.js"),
|
|
50
50
|
exportName: "registerMaintenanceCommands"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -68,7 +68,7 @@ const coreEntrySpecs = [
|
|
|
68
68
|
loadModule: () => import("./mcp-cli-B6B7OUv7.js"),
|
|
69
69
|
exportName: "registerMcpCli"
|
|
70
70
|
}])),
|
|
71
|
-
defineImportedCommandGroupSpec(["agent", "agents"], () => import("./register.agent-
|
|
71
|
+
defineImportedCommandGroupSpec(["agent", "agents"], () => import("./register.agent-CYIA-3A8.js"), (mod, { program, ctx }) => {
|
|
72
72
|
mod.registerAgentCommands(program, { agentChannelOptions: ctx.agentChannelOptions });
|
|
73
73
|
}),
|
|
74
74
|
...withProgramOnlySpecs(defineImportedProgramCommandGroupSpecs([{
|
|
@@ -78,7 +78,7 @@ const coreEntrySpecs = [
|
|
|
78
78
|
"sessions",
|
|
79
79
|
"tasks"
|
|
80
80
|
],
|
|
81
|
-
loadModule: () => import("./register.status-health-sessions-
|
|
81
|
+
loadModule: () => import("./register.status-health-sessions-Djuev7WE.js"),
|
|
82
82
|
exportName: "registerStatusHealthSessionsCommands"
|
|
83
83
|
}]))
|
|
84
84
|
];
|
|
@@ -8,11 +8,11 @@ import "./sessions-CtyoqgDA.js";
|
|
|
8
8
|
import { t as loadSessionStore } from "./store-load-BxI--Q71.js";
|
|
9
9
|
import { a as sanitizeTaskStatusText } from "./task-status-CaY59zv4.js";
|
|
10
10
|
import { r as getSessionBindingService } from "./session-binding-service-DT52cisv.js";
|
|
11
|
-
import { n as findLatestTaskForRelatedSessionKeyForOwner } from "./task-owner-access-
|
|
11
|
+
import { n as findLatestTaskForRelatedSessionKeyForOwner } from "./task-owner-access-DElR2sp5.js";
|
|
12
12
|
import { i as toAcpRuntimeError } from "./errors-C759V9iL.js";
|
|
13
|
-
import { c as parseRuntimeTimeoutSecondsInput, d as validateRuntimeModeInput, f as validateRuntimeModelInput, i as getAcpRuntimeBackend, l as validateRuntimeConfigOptionInput, m as resolveAcpSessionResolutionError, n as getAcpSessionManager, o as requireAcpRuntimeBackend, p as validateRuntimePermissionProfileInput, u as validateRuntimeCwdInput } from "./manager-
|
|
13
|
+
import { c as parseRuntimeTimeoutSecondsInput, d as validateRuntimeModeInput, f as validateRuntimeModelInput, i as getAcpRuntimeBackend, l as validateRuntimeConfigOptionInput, m as resolveAcpSessionResolutionError, n as getAcpSessionManager, o as requireAcpRuntimeBackend, p as validateRuntimePermissionProfileInput, u as validateRuntimeCwdInput } from "./manager-cfe88Tg5.js";
|
|
14
14
|
import { r as resolveSessionStorePathForAcp } from "./session-meta-DMv3di60.js";
|
|
15
|
-
import { i as cleanupFailedAcpSpawn, n as resolveAcpSpawnRuntimePolicyError } from "./acp-spawn-
|
|
15
|
+
import { i as cleanupFailedAcpSpawn, n as resolveAcpSpawnRuntimePolicyError } from "./acp-spawn-DjwIYYxP.js";
|
|
16
16
|
import { i as resolveAcpDispatchPolicyMessage, n as resolveAcpAgentPolicyError, r as resolveAcpDispatchPolicyError, t as isAcpEnabledByPolicy } from "./policy-BXJH-z1T.js";
|
|
17
17
|
import { n as resolveAcpSessionIdentifierLinesFromIdentity, r as resolveAcpThreadSessionDetailLines, t as resolveAcpSessionCwd } from "./session-identifiers-DWzOpl8C.js";
|
|
18
18
|
import { i as resolveThreadBindingThreadName, r as resolveThreadBindingIntroText } from "./thread-bindings-messages-C06Ikc9I.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./sessions-CtyoqgDA.js";
|
|
2
2
|
import { i as resolveSessionFilePathOptions, r as resolveSessionFilePath } from "./paths-DSl3hU-R.js";
|
|
3
3
|
import { a as resolveFreshSessionTotalTokens } from "./types-BSS90rPt.js";
|
|
4
|
-
import { t as compactEmbeddedPiSession } from "./compact-
|
|
4
|
+
import { t as compactEmbeddedPiSession } from "./compact-BAb30KLb.js";
|
|
5
5
|
import { i as enqueueSystemEvent } from "./system-events-DgjMy0YZ.js";
|
|
6
6
|
import { a as isEmbeddedPiRunActive, f as waitForEmbeddedPiRunEnd, t as abortEmbeddedPiRun } from "./runs-BaYK6BOV.js";
|
|
7
|
-
import "./pi-embedded-
|
|
7
|
+
import "./pi-embedded-B7tiEoV6.js";
|
|
8
8
|
import { n as incrementCompactionCount } from "./session-updates-DZ0rtXq2.js";
|
|
9
9
|
import { i as formatTokenCount, r as formatContextUsageShort } from "./status-CXEeL9zg.js";
|
|
10
10
|
export { abortEmbeddedPiRun, compactEmbeddedPiSession, enqueueSystemEvent, formatContextUsageShort, formatTokenCount, incrementCompactionCount, isEmbeddedPiRunActive, resolveFreshSessionTotalTokens, resolveSessionFilePath, resolveSessionFilePathOptions, waitForEmbeddedPiRunEnd };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./commands-compact.runtime-
|
|
1
|
+
export * from "./commands-compact.runtime-Ci4d3-cT.js";
|