kaijibot 2026.8.7 → 2026.8.8

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.
Files changed (69) hide show
  1. package/dist/.buildstamp +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-startup-metadata.json +1 -1
  4. package/dist/{cognitive-delivery-CtMEdoKM.js → cognitive-delivery-CwHSK3c0.js} +1 -23
  5. package/dist/{command-auth-4KMh4bqv.js → command-auth-DydNj8Yn.js} +1 -1
  6. package/dist/{command-registry-D6cYwsnR.js → command-registry-A0f_2uRD.js} +1 -1
  7. package/dist/{command-registry-D3ogjr0D.js → command-registry-DWFJJKiz.js} +4 -4
  8. package/dist/{completion-cli-DYnrYYQM.js → completion-cli-BsX0NuzW.js} +2 -2
  9. package/dist/{completion-cli-B2vfqmeB.js → completion-cli-CffaJUO_.js} +1 -1
  10. package/dist/{direct-dm-Dtei89HP.js → direct-dm-1-HwQtv5.js} +1 -1
  11. package/dist/{dispatch-BFZ9SP5_.js → dispatch-C1PQp8ia.js} +99 -0
  12. package/dist/{doctor-completion-74I1VgIr.js → doctor-completion-DJywUq0s.js} +1 -1
  13. package/dist/entry.js +1 -1
  14. package/dist/extensions/diffs/.kaijibot-runtime-deps-stamp.json +1 -1
  15. package/dist/extensions/feishu/.kaijibot-runtime-deps-stamp.json +1 -1
  16. package/dist/extensions/feishu/node_modules/.package-lock.json +3 -3
  17. package/dist/extensions/feishu/node_modules/@types/node/README.md +1 -1
  18. package/dist/extensions/feishu/node_modules/@types/node/child_process.d.ts +0 -1
  19. package/dist/extensions/feishu/node_modules/@types/node/crypto.d.ts +6 -6
  20. package/dist/extensions/feishu/node_modules/@types/node/dns/promises.d.ts +5 -5
  21. package/dist/extensions/feishu/node_modules/@types/node/dns.d.ts +5 -5
  22. package/dist/extensions/feishu/node_modules/@types/node/fs.d.ts +7 -0
  23. package/dist/extensions/feishu/node_modules/@types/node/http.d.ts +30 -0
  24. package/dist/extensions/feishu/node_modules/@types/node/http2.d.ts +4 -4
  25. package/dist/extensions/feishu/node_modules/@types/node/os.d.ts +30 -30
  26. package/dist/extensions/feishu/node_modules/@types/node/package.json +2 -2
  27. package/dist/extensions/feishu/node_modules/@types/node/perf_hooks.d.ts +2 -1
  28. package/dist/extensions/feishu/node_modules/@types/node/process.d.ts +42 -43
  29. package/dist/extensions/feishu/node_modules/@types/node/quic.d.ts +1049 -84
  30. package/dist/extensions/feishu/node_modules/@types/node/sqlite.d.ts +14 -1
  31. package/dist/extensions/feishu/node_modules/@types/node/stream/iter.d.ts +3 -2
  32. package/dist/extensions/feishu/node_modules/@types/node/test.d.ts +61 -0
  33. package/dist/extensions/feishu/node_modules/@types/node/v8.d.ts +20 -23
  34. package/dist/extensions/kindle-portal/.kaijibot-runtime-deps-stamp.json +1 -1
  35. package/dist/extensions/webhooks/.kaijibot-runtime-deps-stamp.json +1 -1
  36. package/dist/extensions/wechat/api.js +1 -1
  37. package/dist/{gateway-cli-Boe4V8mx.js → gateway-cli-B6XgMuOz.js} +1 -1
  38. package/dist/{heartbeat-runner-D-4MeXg7.js → heartbeat-runner-BlntM0AS.js} +18 -1
  39. package/dist/{heartbeat-runner-D5XbjkdG.js → heartbeat-runner-Bnf8xcNt.js} +1 -1
  40. package/dist/{inbound-reply-dispatch-DPL302ks.js → inbound-reply-dispatch-CEbl2yr5.js} +1 -1
  41. package/dist/index.js +1 -1
  42. package/dist/{monitor-xgDcfiBm.js → monitor-Bjf1KNAi.js} +1 -1
  43. package/dist/{onboard-BDoPTUtw.js → onboard-CVbAx20c.js} +1 -1
  44. package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
  45. package/dist/plugin-sdk/channel-inbound.js +1 -1
  46. package/dist/plugin-sdk/command-auth.js +2 -2
  47. package/dist/plugin-sdk/direct-dm.js +1 -1
  48. package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
  49. package/dist/plugin-sdk/inbound-reply-dispatch.js +1 -1
  50. package/dist/plugin-sdk/reply-dispatch-runtime.js +1 -1
  51. package/dist/plugin-sdk/reply-runtime.js +2 -2
  52. package/dist/plugins/runtime/index.js +1 -1
  53. package/dist/{program-BK7ZtztF.js → program-Bk8iztSC.js} +1 -1
  54. package/dist/{prompt-select-styled-7gnkk7cr.js → prompt-select-styled-FfNyc6GQ.js} +1 -1
  55. package/dist/{provider-dispatcher-C6kk1YYL.js → provider-dispatcher-DGc6N0AZ.js} +1 -1
  56. package/dist/{register.maintenance-C7EOb842.js → register.maintenance-Cx7dGP8N.js} +1 -1
  57. package/dist/{register.onboard-Iz6ddtfL.js → register.onboard-AM-1pFbi.js} +1 -1
  58. package/dist/{register.setup-BQ6e9anu.js → register.setup-DD2KzdhV.js} +1 -1
  59. package/dist/{register.subclis-BtqhAtXc.js → register.subclis-BbDrib8b.js} +1 -1
  60. package/dist/{register.subclis-W6zZOM5t.js → register.subclis-DWDRfm9Q.js} +3 -3
  61. package/dist/{run-main-D4HElNcq.js → run-main-BYhJxN80.js} +3 -3
  62. package/dist/{runtime-DzM_uThV.js → runtime-CvasIVwT.js} +3 -3
  63. package/dist/{server-ds78t2DO.js → server-CR-RmrOX.js} +1 -1
  64. package/dist/{server-methods--V-_HHcz.js → server-methods-R9IVu4Nx.js} +2 -2
  65. package/dist/{server.impl-BNZkIWwv.js → server.impl-Dyj_4LQf.js} +20 -35
  66. package/dist/{setup-CInLtb8C.js → setup-BL9KrPLD.js} +1 -1
  67. package/dist/{setup.finalize-BLCsF2wW.js → setup.finalize-Cwo4dSP4.js} +2 -2
  68. package/dist/{update-cli-Cdj2DQ8v.js → update-cli-Dit5ZL-N.js} +3 -3
  69. package/package.json +1 -1
package/dist/.buildstamp CHANGED
@@ -1 +1 @@
1
- {"builtAt":1786117146691,"head":"6dadb6b975cc0d4683727853e3dc34e9ce7e17c7"}
1
+ {"builtAt":1786164229958,"head":"f0c2534f7eb6653877fc845115c7efe896aea539"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2026.8.7",
3
- "commit": "6dadb6b975cc0d4683727853e3dc34e9ce7e17c7",
4
- "builtAt": "2026-08-07T15:39:54.042Z"
2
+ "version": "2026.8.8",
3
+ "commit": "f0c2534f7eb6653877fc845115c7efe896aea539",
4
+ "builtAt": "2026-08-08T04:44:36.110Z"
5
5
  }
@@ -14,5 +14,5 @@
14
14
  ],
15
15
  "channelCatalogSignature": "a99b78ac99491ac5c8d64c4a6973088cc21688cb",
16
16
  "rootHelpBundleSignature": "8520d7aba9638401504ce3128c98e059de7ceb60",
17
- "rootHelpText": "\n👾 KaijiBot 2026.8.7 (6dadb6b)\n Inspiration isn't something you wait for — it's what you bump into while thinking continuously.\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"
17
+ "rootHelpText": "\n👾 KaijiBot 2026.8.8 (f0c2534) — Wisdom isn't the accumulation of knowledge — it's knowing what to ignore.\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
  }
@@ -18,27 +18,5 @@ function findSessionKeyForUserId(cfg, userId, agentId = "main") {
18
18
  if (key.toLowerCase().endsWith(":main")) return key;
19
19
  }
20
20
  }
21
- /**
22
- * Resolve the full delivery target for a cognitive insight: session key,
23
- * channel, and recipient address. Returns undefined if no routable session
24
- * exists or if the session has no channel binding (e.g. lastChannel missing).
25
- */
26
- function resolveCognitiveDeliveryTarget(cfg, userId, agentId = "main") {
27
- if (!cfg) return;
28
- const store = loadSessionStore(resolveStorePath(cfg.session?.store, { agentId }));
29
- const sessionKey = findSessionKeyForUserId(cfg, userId, agentId);
30
- if (!sessionKey) return;
31
- const entry = store[sessionKey];
32
- if (!entry) return;
33
- const channel = entry.lastChannel;
34
- const to = entry.lastTo;
35
- if (!channel || channel === "none" || !to) return;
36
- return {
37
- sessionKey,
38
- channel,
39
- to,
40
- accountId: entry.lastAccountId ?? void 0
41
- };
42
- }
43
21
  //#endregion
44
- export { resolveCognitiveDeliveryTarget };
22
+ export { findSessionKeyForUserId };
@@ -5,7 +5,7 @@ import "./command-auth-XGJw9qMC.js";
5
5
  import "./stored-model-override-B_Pfo0rs.js";
6
6
  import "./commands-models-B7UPtUbJ.js";
7
7
  import { n as buildCommandsMessagePaginated$1, r as buildHelpMessage$1, t as buildCommandsMessage$1 } from "./command-status-builders-C3CnFOP2.js";
8
- import "./direct-dm-Dtei89HP.js";
8
+ import "./direct-dm-1-HwQtv5.js";
9
9
  import "./skill-commands-BRwGzS_r.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,3 +1,3 @@
1
1
  import "./core-command-descriptors-C6sYXgBr.js";
2
- import { n as registerCoreCliByName } from "./command-registry-D3ogjr0D.js";
2
+ import { n as registerCoreCliByName } from "./command-registry-DWFJJKiz.js";
3
3
  export { registerCoreCliByName };
@@ -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-BMA0d51Q.js";
3
- import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs, r as registerSubCliCommands } from "./register.subclis-W6zZOM5t.js";
3
+ import { a as defineImportedCommandGroupSpec, i as buildCommandGroupEntries, o as defineImportedProgramCommandGroupSpecs, r as registerSubCliCommands } from "./register.subclis-DWDRfm9Q.js";
4
4
  import { i as registerCommandGroups, r as registerCommandGroupByName } from "./register-command-groups-EWuTSFO0.js";
5
5
  import { n as getCoreCliCommandNames$1, t as getCoreCliCommandDescriptors } from "./core-command-descriptors-C6sYXgBr.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-BQ6e9anu.js"),
19
+ loadModule: () => import("./register.setup-DD2KzdhV.js"),
20
20
  exportName: "registerSetupCommand"
21
21
  },
22
22
  {
23
23
  commandNames: ["onboard"],
24
- loadModule: () => import("./register.onboard-Iz6ddtfL.js"),
24
+ loadModule: () => import("./register.onboard-AM-1pFbi.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-C7EOb842.js"),
49
+ loadModule: () => import("./register.maintenance-Cx7dGP8N.js"),
50
50
  exportName: "registerMaintenanceCommands"
51
51
  },
52
52
  {
@@ -5,8 +5,8 @@ import { t as formatDocsLink } from "./links-DG6HlfoL.js";
5
5
  import { r as theme } from "./theme-BtqB6Mz_.js";
6
6
  import { _ as resolveStateDir } from "./paths-BzRif4MR.js";
7
7
  import { r as t } from "./translate-CZMssHoF.js";
8
- import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-W6zZOM5t.js";
9
- import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-D3ogjr0D.js";
8
+ import { n as registerSubCliByName, t as getSubCliEntries } from "./register.subclis-DWDRfm9Q.js";
9
+ import { n as registerCoreCliByName, t as getCoreCliCommandNames } from "./command-registry-DWFJJKiz.js";
10
10
  import { t as getProgramContext } from "./program-context-beQs52o_.js";
11
11
  import path from "node:path";
12
12
  import os from "node:os";
@@ -1,2 +1,2 @@
1
- import { a as registerCompletionCli, c as usesSlowDynamicCompletion, i as isCompletionInstalled, n as getCompletionScript, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-DYnrYYQM.js";
1
+ import { a as registerCompletionCli, c as usesSlowDynamicCompletion, i as isCompletionInstalled, n as getCompletionScript, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-BsX0NuzW.js";
2
2
  export { completionCacheExists, getCompletionScript, installCompletion, isCompletionInstalled, registerCompletionCli, resolveCompletionCachePath, resolveShellFromEnv, usesSlowDynamicCompletion };
@@ -1,5 +1,5 @@
1
1
  import { n as readStoreAllowFromForDmPolicy, o as resolveDmGroupAccessWithLists } from "./dm-policy-shared-CCEaN5_W.js";
2
- import { i as recordInboundSessionAndDispatchReply } from "./inbound-reply-dispatch-DPL302ks.js";
2
+ import { i as recordInboundSessionAndDispatchReply } from "./inbound-reply-dispatch-CEbl2yr5.js";
3
3
  import { r as resolveInboundRouteEnvelopeBuilderWithRuntime } from "./inbound-envelope-CA8EoFYk.js";
4
4
  //#region src/plugin-sdk/direct-dm.ts
5
5
  /** Resolve direct-DM policy, effective allowlists, and optional command auth in one place. */
@@ -916,6 +916,52 @@ function createReplyDispatcherWithTyping(options) {
916
916
  //#endregion
917
917
  //#region src/auto-reply/dispatch.ts
918
918
  const log = createSubsystemLogger("auto-reply/dispatch");
919
+ const FOLLOWUP_PATTERNS = [
920
+ "展开",
921
+ "详细",
922
+ "具体",
923
+ "深入",
924
+ "解释",
925
+ "说明",
926
+ "什么意思",
927
+ "举例",
928
+ "例子",
929
+ "比如",
930
+ "怎么理解",
931
+ "怎么看",
932
+ "继续",
933
+ "然后呢",
934
+ "接着说",
935
+ "为什么",
936
+ "你是说",
937
+ "你的意思是",
938
+ "讲讲",
939
+ "多说点",
940
+ "tell me more",
941
+ "elaborate",
942
+ "explain",
943
+ "what do you mean",
944
+ "how so",
945
+ "example",
946
+ "go on",
947
+ "continue",
948
+ "interesting"
949
+ ];
950
+ function textToBigrams(text) {
951
+ const clean = text.toLowerCase().replace(/[^\w\u4e00-\u9fff]/g, "");
952
+ const result = /* @__PURE__ */ new Set();
953
+ for (let i = 0; i < clean.length - 1; i++) result.add(clean.slice(i, i + 2));
954
+ return result;
955
+ }
956
+ function bigramSimilarity(a, b) {
957
+ const setA = textToBigrams(a);
958
+ const setB = textToBigrams(b);
959
+ if (setA.size === 0 || setB.size === 0) return 0;
960
+ let intersection = 0;
961
+ for (const gram of setA) if (setB.has(gram)) intersection++;
962
+ const union = setA.size + setB.size - intersection;
963
+ return union === 0 ? 0 : intersection / union;
964
+ }
919
965
  /**
920
966
  * Extract a userId from a session key + sender context.
921
967
  * Delegates to the unified resolveCognitiveUserId (channel-agnostic).
@@ -970,6 +1016,53 @@ async function detectInsightReplyFeedback(params) {
970
1016
  log.warn(`insight reply feedback detection failed: ${String(err)}`);
971
1017
  }
972
1018
  }
1019
+ async function detectInsightFollowupFeedback(params) {
1020
+ const sessionKey = params.ctx.SessionKey;
1021
+ if (!sessionKey) return;
1022
+ if (params.cfg.cognitive?.enabled === false) return;
1023
+ const userId = extractUserIdFromSessionKey(sessionKey, params.ctx.SenderId);
1024
+ if (!userId) return;
1025
+ const userMessage = params.ctx.BodyForCommands ?? params.ctx.Body ?? "";
1026
+ if (!userMessage.trim()) return;
1027
+ const FOLLOWUP_WINDOW_MS = 1800 * 1e3;
1028
+ const SIMILARITY_THRESHOLD = .12;
1029
+ try {
1030
+ const [{ resolveConfigDir }, { resolveSessionAgentId }] = await Promise.all([import("./utils-DPaRngSQ.js"), import("./agent-scope-B0ikgii_.js")]);
1031
+ const insightStoreMod = await import("./store-CnS9lv_1.js");
1032
+ const personaStoreMod = await import("./store-sbo2sQ7F.js");
1033
+ const collectorMod = await import("./collector-CkAFV2NR.js");
1034
+ const agentId = resolveSessionAgentId({
1035
+ sessionKey,
1036
+ config: params.cfg
1037
+ });
1038
+ const configDir = resolveConfigDir();
1039
+ const personaStore = new personaStoreMod.PersonaStore(configDir);
1040
+ const persona = await personaStore.load(agentId, userId);
1041
+ if (!persona) return;
1042
+ const lastProactive = persona.feedbackProfile.lastProactiveAt;
1043
+ if (lastProactive <= 0) return;
1044
+ if (Date.now() - lastProactive > FOLLOWUP_WINDOW_MS) return;
1045
+ const insightStore = new insightStoreMod.InsightStore(configDir);
1046
+ const recent = await insightStore.listActive(agentId, userId, void 0, 1);
1047
+ if (!recent[0]) return;
1048
+ const insight = recent[0];
1049
+ const isDiscussing = bigramSimilarity(userMessage, insight.content) >= SIMILARITY_THRESHOLD;
1050
+ const isFollowUp = FOLLOWUP_PATTERNS.some((p) => userMessage.toLowerCase().includes(p));
1051
+ if (!isDiscussing && !isFollowUp) return;
1052
+ const sentiment = isDiscussing ? "engaged" : "positive";
1053
+ await personaStore.update(agentId, userId, (p) => collectorMod.processInsightFeedback(p, insight, sentiment));
1054
+ await insightStore.updateFeedback(agentId, userId, insight.id, sentiment, userMessage);
1055
+ log.info("insight followup feedback detected", {
1056
+ userId,
1057
+ insightId: insight.id,
1058
+ sentiment,
1059
+ isDiscussing,
1060
+ isFollowUp
1061
+ });
1062
+ } catch (err) {
1063
+ log.warn(`insight followup feedback detection failed: ${String(err)}`);
1064
+ }
1065
+ }
973
1066
  async function withReplyDispatcher(params) {
974
1067
  try {
975
1068
  return await params.run();
@@ -990,6 +1083,12 @@ async function dispatchInboundMessage(params) {
990
1083
  }).catch((err) => {
991
1084
  log.warn(`detectInsightReplyFeedback unexpected error: ${String(err)}`);
992
1085
  });
1086
+ detectInsightFollowupFeedback({
1087
+ ctx: finalized,
1088
+ cfg: params.cfg
1089
+ }).catch((err) => {
1090
+ log.warn(`detectInsightFollowupFeedback unexpected error: ${String(err)}`);
1091
+ });
993
1092
  return await withReplyDispatcher({
994
1093
  dispatcher: params.dispatcher,
995
1094
  run: () => dispatchReplyFromConfig({
@@ -1,7 +1,7 @@
1
1
  import { t as resolveKaijiBotPackageRoot } from "./kaijibot-root-BjhI7uOk.js";
2
2
  import { n as resolveCliName } from "./cli-name-mbXbS_Xz.js";
3
3
  import { t as note } from "./note-o9JlpIK2.js";
4
- import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-DYnrYYQM.js";
4
+ import { c as usesSlowDynamicCompletion, i as isCompletionInstalled, o as resolveCompletionCachePath, r as installCompletion, s as resolveShellFromEnv, t as completionCacheExists } from "./completion-cli-BsX0NuzW.js";
5
5
  import path from "node:path";
6
6
  import { spawnSync } from "node:child_process";
7
7
  //#region src/commands/doctor-completion.ts
package/dist/entry.js CHANGED
@@ -203,7 +203,7 @@ function tryHandleRootHelpFastPath(argv, deps = {}) {
203
203
  }
204
204
  function runMainOrRootHelp(argv) {
205
205
  if (tryHandleRootHelpFastPath(argv)) return;
206
- import("./run-main-D4HElNcq.js").then(({ runCli }) => runCli(argv)).catch((error) => {
206
+ import("./run-main-BYhJxN80.js").then(({ runCli }) => runCli(argv)).catch((error) => {
207
207
  console.error("[kaijibot] Failed to start CLI:", error instanceof Error ? error.stack ?? error.message : error);
208
208
  process$1.exitCode = 1;
209
209
  });
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "fingerprint": "7f9a14455059d2608f7b54d385279434b5706b102c321092d95562543bbefe89",
3
- "generatedAt": "2026-08-07T15:38:46.595Z"
3
+ "generatedAt": "2026-08-08T04:43:35.021Z"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "fingerprint": "0e863d9e866384b501fe67a8493a59d491638c0b14dbd959b9a842c395597683",
3
- "generatedAt": "2026-08-07T15:38:56.551Z"
3
+ "generatedAt": "2026-08-08T04:43:43.860Z"
4
4
  }
@@ -75,9 +75,9 @@
75
75
  "license": "BSD-3-Clause"
76
76
  },
77
77
  "node_modules/@types/node": {
78
- "version": "26.1.2",
79
- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.2.tgz",
80
- "integrity": "sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==",
78
+ "version": "26.2.0",
79
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.2.0.tgz",
80
+ "integrity": "sha512-5IviulTZeRNp2vAJ514cc/HUlY5nZ9fCbq9DMyC52BrhFZACo3nI0R7qBxhQmo/d27NFe96ur/b7Wwxklda+kg==",
81
81
  "license": "MIT",
82
82
  "dependencies": {
83
83
  "undici-types": "~8.3.0"
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 27 Jul 2026 17:32:10 GMT
11
+ * Last updated: Fri, 07 Aug 2026 17:46:44 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -227,7 +227,6 @@ declare module "node:child_process" {
227
227
  * new process in a shell or with the use of the `shell` option of `ChildProcess`:
228
228
  *
229
229
  * ```js
230
- * 'use strict';
231
230
  * import { spawn } from 'node:child_process';
232
231
  *
233
232
  * const subprocess = spawn(
@@ -2698,12 +2698,12 @@ declare module "node:crypto" {
2698
2698
  */
2699
2699
  function sign(
2700
2700
  algorithm: string | null | undefined,
2701
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2701
+ data: BinaryLike,
2702
2702
  key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
2703
2703
  ): NonSharedBuffer;
2704
2704
  function sign(
2705
2705
  algorithm: string | null | undefined,
2706
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2706
+ data: BinaryLike,
2707
2707
  key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
2708
2708
  callback: (error: Error | null, data: NonSharedBuffer) => void,
2709
2709
  ): void;
@@ -2729,15 +2729,15 @@ declare module "node:crypto" {
2729
2729
  */
2730
2730
  function verify(
2731
2731
  algorithm: string | null | undefined,
2732
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2732
+ data: BinaryLike,
2733
2733
  key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
2734
- signature: ArrayBufferLike | NodeJS.ArrayBufferView,
2734
+ signature: BinaryLike,
2735
2735
  ): boolean;
2736
2736
  function verify(
2737
2737
  algorithm: string | null | undefined,
2738
- data: ArrayBufferLike | NodeJS.ArrayBufferView,
2738
+ data: BinaryLike,
2739
2739
  key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput | VerifyJsonWebKeyInput,
2740
- signature: ArrayBufferLike | NodeJS.ArrayBufferView,
2740
+ signature: BinaryLike,
2741
2741
  callback: (error: Error | null, result: boolean) => void,
2742
2742
  ): void;
2743
2743
  /**
@@ -183,7 +183,7 @@ declare module "node:dns/promises" {
183
183
  * refresh: 900,
184
184
  * retry: 900,
185
185
  * expire: 1800,
186
- * minttl: 60 } ]
186
+ * minttl: 60 } ];
187
187
  * ```
188
188
  * @since v10.6.0
189
189
  */
@@ -226,7 +226,7 @@ declare module "node:dns/promises" {
226
226
  * regexp: '',
227
227
  * replacement: '_sip._udp.example.com',
228
228
  * order: 30,
229
- * preference: 100
229
+ * preference: 100,
230
230
  * }
231
231
  * ```
232
232
  * @since v10.6.0
@@ -265,7 +265,7 @@ declare module "node:dns/promises" {
265
265
  * refresh: 10000,
266
266
  * retry: 2400,
267
267
  * expire: 604800,
268
- * minttl: 3600
268
+ * minttl: 3600,
269
269
  * }
270
270
  * ```
271
271
  * @since v10.6.0
@@ -285,7 +285,7 @@ declare module "node:dns/promises" {
285
285
  * priority: 10,
286
286
  * weight: 5,
287
287
  * port: 21223,
288
- * name: 'service.example.com'
288
+ * name: 'service.example.com',
289
289
  * }
290
290
  * ```
291
291
  * @since v10.6.0
@@ -306,7 +306,7 @@ declare module "node:dns/promises" {
306
306
  * certUsage: 3,
307
307
  * selector: 1,
308
308
  * match: 1,
309
- * data: [ArrayBuffer]
309
+ * data: [ArrayBuffer],
310
310
  * }
311
311
  * ```
312
312
  * @since v23.9.0, v22.15.0
@@ -490,7 +490,7 @@ declare module "node:dns" {
490
490
  * regexp: '',
491
491
  * replacement: '_sip._udp.example.com',
492
492
  * order: 30,
493
- * preference: 100
493
+ * preference: 100,
494
494
  * }
495
495
  * ```
496
496
  * @since v0.9.12
@@ -547,7 +547,7 @@ declare module "node:dns" {
547
547
  * refresh: 10000,
548
548
  * retry: 2400,
549
549
  * expire: 604800,
550
- * minttl: 3600
550
+ * minttl: 3600,
551
551
  * }
552
552
  * ```
553
553
  * @since v0.11.10
@@ -573,7 +573,7 @@ declare module "node:dns" {
573
573
  * priority: 10,
574
574
  * weight: 5,
575
575
  * port: 21223,
576
- * name: 'service.example.com'
576
+ * name: 'service.example.com',
577
577
  * }
578
578
  * ```
579
579
  * @since v0.1.27
@@ -600,7 +600,7 @@ declare module "node:dns" {
600
600
  * certUsage: 3,
601
601
  * selector: 1,
602
602
  * match: 1,
603
- * data: [ArrayBuffer]
603
+ * data: [ArrayBuffer],
604
604
  * }
605
605
  * ```
606
606
  * @since v23.9.0, v22.15.0
@@ -650,7 +650,7 @@ declare module "node:dns" {
650
650
  * refresh: 900,
651
651
  * retry: 900,
652
652
  * expire: 1800,
653
- * minttl: 60 } ]
653
+ * minttl: 60 } ];
654
654
  * ```
655
655
  *
656
656
  * DNS server operators may choose not to respond to `ANY` queries. It may be better to call individual methods like {@link resolve4}, {@link resolveMx}, and so on. For more details, see
@@ -48,6 +48,13 @@ declare module "node:fs" {
48
48
  mtime: Date;
49
49
  ctime: Date;
50
50
  birthtime: Date;
51
+ // Deliberately not defining a type alias here... it'd be exported, and something in the ecosystem would inevitably start using it.
52
+ // TODO: replace with Temporal builtins once @types/node no longer supports TS <6.0.
53
+ atimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown;
54
+ mtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown;
55
+ ctimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T : unknown;
56
+ birthtimeInstant: typeof globalThis extends { Temporal: { Instant: new(...args: any[]) => infer T } } ? T
57
+ : unknown;
51
58
  }
52
59
  interface Stats extends StatsBase<number> {}
53
60
  /**
@@ -922,6 +922,36 @@ declare module "node:http" {
922
922
  headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
923
923
  ): this;
924
924
  writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
925
+ /**
926
+ * Sends an arbitrary HTTP/1.1 1xx informational response to the client. This
927
+ * is a generic equivalent of `response.writeContinue()`,
928
+ * `response.writeProcessing()` and `response.writeEarlyHints()`, and
929
+ * can be called multiple times before the final response. After the final
930
+ * response headers have been sent (via `response.writeHead()` or an
931
+ * implicit header), calling this method throws `ERR_HTTP_HEADERS_SENT`.
932
+ *
933
+ * Clients receive these responses via the [`'information'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-information)
934
+ * event on `http.ClientRequest`.
935
+ *
936
+ * ```js
937
+ * response.writeInformation(110, { 'X-Progress': '50%' });
938
+ * ```
939
+ * @since v26.2.0
940
+ * @param statusCode An HTTP 1xx informational status code, between `100`
941
+ * and `199` inclusive, excluding `101` (Switching Protocols) which is only
942
+ * available through the [`'upgrade'`](https://nodejs.org/docs/latest-v26.x/api/http.html#event-upgrade) event.
943
+ * @param headers An optional set of headers to send with the
944
+ * informational response. Accepts the same shapes as
945
+ * `response.writeHead()`.
946
+ * @param callback Optional, called once the message has been written
947
+ * to the socket.
948
+ */
949
+ writeInformation(
950
+ statusCode: number,
951
+ headers?: OutgoingHttpHeaders | readonly string[],
952
+ callback?: () => void,
953
+ ): void;
954
+ writeInformation(statusCode: number, callback: () => void): void;
925
955
  /**
926
956
  * Sends a HTTP/1.1 102 Processing message to the client, indicating that
927
957
  * the request body should be sent.
@@ -59,7 +59,7 @@ declare module "node:http2" {
59
59
  "ready": [];
60
60
  "streamClosed": [code: number];
61
61
  "timeout": [];
62
- "trailers": [trailers: IncomingHttpHeaders, flags: number];
62
+ "trailers": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]];
63
63
  "wantTrailers": [];
64
64
  }
65
65
  interface Http2Stream extends stream.Duplex {
@@ -245,7 +245,7 @@ declare module "node:http2" {
245
245
  interface ClientHttp2StreamEventMap extends Http2StreamEventMap {
246
246
  "continue": [];
247
247
  "headers": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]];
248
- "push": [headers: IncomingHttpHeaders, flags: number];
248
+ "push": [headers: IncomingHttpHeaders, flags: number, rawHeaders: string[]];
249
249
  "response": [headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number, rawHeaders: string[]];
250
250
  }
251
251
  interface ClientHttp2Stream extends Http2Stream {
@@ -1644,8 +1644,8 @@ declare module "node:http2" {
1644
1644
  *
1645
1645
  * Then `request.url` will be:
1646
1646
  *
1647
- * ```js
1648
- * '/status?name=ryan'
1647
+ * ```json
1648
+ * "/status?name=ryan"
1649
1649
  * ```
1650
1650
  *
1651
1651
  * To parse the url into its parts, `new URL()` can be used:
@@ -122,7 +122,7 @@ declare module "node:os" {
122
122
  * irq: 20,
123
123
  * },
124
124
  * },
125
- * ]
125
+ * ];
126
126
  * ```
127
127
  *
128
128
  * `nice` values are POSIX-only. On Windows, the `nice` values of all processors
@@ -167,44 +167,44 @@ declare module "node:os" {
167
167
  *
168
168
  * The properties available on the assigned network address object include:
169
169
  *
170
- * ```js
170
+ * ```json
171
171
  * {
172
- * lo: [
172
+ * "lo": [
173
173
  * {
174
- * address: '127.0.0.1',
175
- * netmask: '255.0.0.0',
176
- * family: 'IPv4',
177
- * mac: '00:00:00:00:00:00',
178
- * internal: true,
179
- * cidr: '127.0.0.1/8'
174
+ * "address:": "127.0.0.1",
175
+ * "netmask:": "255.0.0.0",
176
+ * "family:": "IPv4",
177
+ * "mac:": "00:00:00:00:00:00",
178
+ * "internal:": true,
179
+ * "cidr:": "127.0.0.1/8"
180
180
  * },
181
181
  * {
182
- * address: '::1',
183
- * netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff',
184
- * family: 'IPv6',
185
- * mac: '00:00:00:00:00:00',
186
- * scopeid: 0,
187
- * internal: true,
188
- * cidr: '::1/128'
182
+ * "address:": "::1",
183
+ * "netmask:": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
184
+ * "family:": "IPv6",
185
+ * "mac:": "00:00:00:00:00:00",
186
+ * "scopeid:": 0,
187
+ * "internal:": true,
188
+ * "cidr:": "::1/128"
189
189
  * }
190
190
  * ],
191
- * eth0: [
191
+ * "eth0": [
192
192
  * {
193
- * address: '192.168.1.108',
194
- * netmask: '255.255.255.0',
195
- * family: 'IPv4',
196
- * mac: '01:02:03:0a:0b:0c',
197
- * internal: false,
198
- * cidr: '192.168.1.108/24'
193
+ * "address:": "192.168.1.108",
194
+ * "netmask:": "255.255.255.0",
195
+ * "family:": "IPv4",
196
+ * "mac:": "01:02:03:0a:0b:0c",
197
+ * "internal:": false,
198
+ * "cidr:": "192.168.1.108/24"
199
199
  * },
200
200
  * {
201
- * address: 'fe80::a00:27ff:fe4e:66a1',
202
- * netmask: 'ffff:ffff:ffff:ffff::',
203
- * family: 'IPv6',
204
- * mac: '01:02:03:0a:0b:0c',
205
- * scopeid: 1,
206
- * internal: false,
207
- * cidr: 'fe80::a00:27ff:fe4e:66a1/64'
201
+ * "address:": "fe80::a00:27ff:fe4e:66a1",
202
+ * "netmask:": "ffff:ffff:ffff:ffff::",
203
+ * "family:": "IPv6",
204
+ * "mac:": "01:02:03:0a:0b:0c",
205
+ * "scopeid:": 1,
206
+ * "internal:": false,
207
+ * "cidr:": "fe80::a00:27ff:fe4e:66a1/64"
208
208
  * }
209
209
  * ]
210
210
  * }