botmux 3.13.0 → 3.14.0
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/README.en.md +1 -1
- package/README.md +25 -1
- package/dist/.runtime-build-id +1 -1
- package/dist/adapters/adopt-route.d.ts +58 -0
- package/dist/adapters/adopt-route.d.ts.map +1 -1
- package/dist/adapters/adopt-route.js +136 -0
- package/dist/adapters/adopt-route.js.map +1 -1
- package/dist/adapters/backend/capabilities.js +1 -1
- package/dist/adapters/backend/capabilities.js.map +1 -1
- package/dist/adapters/backend/herdr-backend.d.ts +1 -1
- package/dist/adapters/backend/herdr-backend.d.ts.map +1 -1
- package/dist/adapters/backend/herdr-backend.js +2 -1
- package/dist/adapters/backend/herdr-backend.js.map +1 -1
- package/dist/adapters/backend/riff-backend.d.ts +97 -0
- package/dist/adapters/backend/riff-backend.d.ts.map +1 -1
- package/dist/adapters/backend/riff-backend.js +380 -66
- package/dist/adapters/backend/riff-backend.js.map +1 -1
- package/dist/adapters/backend/sandbox.d.ts +8 -0
- package/dist/adapters/backend/sandbox.d.ts.map +1 -1
- package/dist/adapters/backend/sandbox.js +16 -2
- package/dist/adapters/backend/sandbox.js.map +1 -1
- package/dist/adapters/backend/tmux-backend.d.ts +12 -13
- package/dist/adapters/backend/tmux-backend.d.ts.map +1 -1
- package/dist/adapters/backend/tmux-backend.js +113 -53
- package/dist/adapters/backend/tmux-backend.js.map +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.d.ts +4 -3
- package/dist/adapters/backend/tmux-pipe-backend.d.ts.map +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.js +12 -9
- package/dist/adapters/backend/tmux-pipe-backend.js.map +1 -1
- package/dist/adapters/backend/zellij-backend.d.ts +2 -3
- package/dist/adapters/backend/zellij-backend.d.ts.map +1 -1
- package/dist/adapters/backend/zellij-backend.js +6 -13
- package/dist/adapters/backend/zellij-backend.js.map +1 -1
- package/dist/adapters/backend/zellij-observe-backend.d.ts +2 -1
- package/dist/adapters/backend/zellij-observe-backend.d.ts.map +1 -1
- package/dist/adapters/backend/zellij-observe-backend.js +6 -3
- package/dist/adapters/backend/zellij-observe-backend.js.map +1 -1
- package/dist/adapters/backend/zmx-backend.d.ts.map +1 -1
- package/dist/adapters/backend/zmx-backend.js +40 -18
- package/dist/adapters/backend/zmx-backend.js.map +1 -1
- package/dist/adapters/cli/claude-code.d.ts.map +1 -1
- package/dist/adapters/cli/claude-code.js +12 -1
- package/dist/adapters/cli/claude-code.js.map +1 -1
- package/dist/adapters/cli/codex.d.ts.map +1 -1
- package/dist/adapters/cli/codex.js +3 -2
- package/dist/adapters/cli/codex.js.map +1 -1
- package/dist/adapters/cli/dsh.d.ts +4 -0
- package/dist/adapters/cli/dsh.d.ts.map +1 -0
- package/dist/adapters/cli/dsh.js +96 -0
- package/dist/adapters/cli/dsh.js.map +1 -0
- package/dist/adapters/cli/fs-policy.d.ts.map +1 -1
- package/dist/adapters/cli/fs-policy.js +5 -0
- package/dist/adapters/cli/fs-policy.js.map +1 -1
- package/dist/adapters/cli/opencode.d.ts +52 -1
- package/dist/adapters/cli/opencode.d.ts.map +1 -1
- package/dist/adapters/cli/opencode.js +117 -76
- package/dist/adapters/cli/opencode.js.map +1 -1
- package/dist/adapters/cli/opencode2.d.ts +4 -0
- package/dist/adapters/cli/opencode2.d.ts.map +1 -0
- package/dist/adapters/cli/opencode2.js +137 -0
- package/dist/adapters/cli/opencode2.js.map +1 -0
- package/dist/adapters/cli/read-isolation.d.ts +1 -1
- package/dist/adapters/cli/read-isolation.d.ts.map +1 -1
- package/dist/adapters/cli/read-isolation.js +5 -2
- package/dist/adapters/cli/read-isolation.js.map +1 -1
- package/dist/adapters/cli/registry.d.ts +7 -1
- package/dist/adapters/cli/registry.d.ts.map +1 -1
- package/dist/adapters/cli/registry.js +19 -6
- package/dist/adapters/cli/registry.js.map +1 -1
- package/dist/adapters/cli/shared-hints.d.ts.map +1 -1
- package/dist/adapters/cli/shared-hints.js +13 -0
- package/dist/adapters/cli/shared-hints.js.map +1 -1
- package/dist/adapters/cli/types.d.ts +24 -3
- package/dist/adapters/cli/types.d.ts.map +1 -1
- package/dist/adapters/hook-command.d.ts +8 -0
- package/dist/adapters/hook-command.d.ts.map +1 -1
- package/dist/adapters/hook-command.js +11 -0
- package/dist/adapters/hook-command.js.map +1 -1
- package/dist/adapters/hook-installer.d.ts +16 -1
- package/dist/adapters/hook-installer.d.ts.map +1 -1
- package/dist/adapters/hook-installer.js +232 -2
- package/dist/adapters/hook-installer.js.map +1 -1
- package/dist/bot-registry.d.ts +116 -8
- package/dist/bot-registry.d.ts.map +1 -1
- package/dist/bot-registry.js +52 -4
- package/dist/bot-registry.js.map +1 -1
- package/dist/cli/pm2-start-transaction.d.ts +14 -0
- package/dist/cli/pm2-start-transaction.d.ts.map +1 -1
- package/dist/cli/pm2-start-transaction.js +25 -9
- package/dist/cli/pm2-start-transaction.js.map +1 -1
- package/dist/cli/restart-failure-notification.d.ts +54 -0
- package/dist/cli/restart-failure-notification.d.ts.map +1 -0
- package/dist/cli/restart-failure-notification.js +142 -0
- package/dist/cli/restart-failure-notification.js.map +1 -0
- package/dist/cli/restart-failure-owner.d.ts +20 -0
- package/dist/cli/restart-failure-owner.d.ts.map +1 -0
- package/dist/cli/restart-failure-owner.js +27 -0
- package/dist/cli/restart-failure-owner.js.map +1 -0
- package/dist/cli/restart-shutdown-preflight.d.ts +24 -0
- package/dist/cli/restart-shutdown-preflight.d.ts.map +1 -0
- package/dist/cli/restart-shutdown-preflight.js +105 -0
- package/dist/cli/restart-shutdown-preflight.js.map +1 -0
- package/dist/cli/send-dispatch.d.ts +26 -0
- package/dist/cli/send-dispatch.d.ts.map +1 -1
- package/dist/cli/send-dispatch.js +30 -0
- package/dist/cli/send-dispatch.js.map +1 -1
- package/dist/cli.d.ts +4 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +665 -399
- package/dist/cli.js.map +1 -1
- package/dist/codex-app-runner.js +38 -15
- package/dist/codex-app-runner.js.map +1 -1
- package/dist/codex-rpc-lifecycle.d.ts +14 -2
- package/dist/codex-rpc-lifecycle.d.ts.map +1 -1
- package/dist/codex-rpc-lifecycle.js +13 -3
- package/dist/codex-rpc-lifecycle.js.map +1 -1
- package/dist/core/ask-broker.d.ts +3 -0
- package/dist/core/ask-broker.d.ts.map +1 -1
- package/dist/core/ask-broker.js +29 -7
- package/dist/core/ask-broker.js.map +1 -1
- package/dist/core/ask-hook/registry.d.ts.map +1 -1
- package/dist/core/ask-hook/registry.js +4 -0
- package/dist/core/ask-hook/registry.js.map +1 -1
- package/dist/core/ask-types.d.ts +5 -1
- package/dist/core/ask-types.d.ts.map +1 -1
- package/dist/core/ask-types.js.map +1 -1
- package/dist/core/browser-restart.d.ts +112 -0
- package/dist/core/browser-restart.d.ts.map +1 -0
- package/dist/core/browser-restart.js +233 -0
- package/dist/core/browser-restart.js.map +1 -0
- package/dist/core/command-handler.d.ts +19 -11
- package/dist/core/command-handler.d.ts.map +1 -1
- package/dist/core/command-handler.js +237 -43
- package/dist/core/command-handler.js.map +1 -1
- package/dist/core/current-turn-provenance.d.ts.map +1 -1
- package/dist/core/current-turn-provenance.js +7 -27
- package/dist/core/current-turn-provenance.js.map +1 -1
- package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
- package/dist/core/dashboard-ipc-server.js +317 -10
- package/dist/core/dashboard-ipc-server.js.map +1 -1
- package/dist/core/dispatch-registry.d.ts.map +1 -1
- package/dist/core/dispatch-registry.js +6 -0
- package/dist/core/dispatch-registry.js.map +1 -1
- package/dist/core/dispatch-report-binding.d.ts +31 -0
- package/dist/core/dispatch-report-binding.d.ts.map +1 -0
- package/dist/core/dispatch-report-binding.js +88 -0
- package/dist/core/dispatch-report-binding.js.map +1 -0
- package/dist/core/doc-comment-prompt.d.ts +2 -0
- package/dist/core/doc-comment-prompt.d.ts.map +1 -1
- package/dist/core/doc-comment-prompt.js +6 -0
- package/dist/core/doc-comment-prompt.js.map +1 -1
- package/dist/core/host-overload-alert.d.ts +25 -1
- package/dist/core/host-overload-alert.d.ts.map +1 -1
- package/dist/core/host-overload-alert.js +69 -8
- package/dist/core/host-overload-alert.js.map +1 -1
- package/dist/core/local-terminal-opener.js +1 -1
- package/dist/core/local-terminal-opener.js.map +1 -1
- package/dist/core/managed-origin-capability.d.ts +7 -6
- package/dist/core/managed-origin-capability.d.ts.map +1 -1
- package/dist/core/managed-origin-capability.js +32 -1
- package/dist/core/managed-origin-capability.js.map +1 -1
- package/dist/core/passthrough-commands.d.ts.map +1 -1
- package/dist/core/passthrough-commands.js +3 -2
- package/dist/core/passthrough-commands.js.map +1 -1
- package/dist/core/plugins/materializer.d.ts.map +1 -1
- package/dist/core/plugins/materializer.js +1 -0
- package/dist/core/plugins/materializer.js.map +1 -1
- package/dist/core/producer-quiescence.d.ts +70 -0
- package/dist/core/producer-quiescence.d.ts.map +1 -0
- package/dist/core/producer-quiescence.js +90 -0
- package/dist/core/producer-quiescence.js.map +1 -0
- package/dist/core/raw-command-write-options.d.ts +10 -0
- package/dist/core/raw-command-write-options.d.ts.map +1 -0
- package/dist/core/raw-command-write-options.js +23 -0
- package/dist/core/raw-command-write-options.js.map +1 -0
- package/dist/core/raw-command-writer.d.ts +4 -0
- package/dist/core/raw-command-writer.d.ts.map +1 -1
- package/dist/core/raw-command-writer.js +15 -6
- package/dist/core/raw-command-writer.js.map +1 -1
- package/dist/core/reply-target.d.ts +11 -0
- package/dist/core/reply-target.d.ts.map +1 -1
- package/dist/core/reply-target.js +22 -7
- package/dist/core/reply-target.js.map +1 -1
- package/dist/core/report-session-relay.d.ts +53 -0
- package/dist/core/report-session-relay.d.ts.map +1 -0
- package/dist/core/report-session-relay.js +116 -0
- package/dist/core/report-session-relay.js.map +1 -0
- package/dist/core/session-discovery.d.ts +5 -0
- package/dist/core/session-discovery.d.ts.map +1 -1
- package/dist/core/session-discovery.js +13 -0
- package/dist/core/session-discovery.js.map +1 -1
- package/dist/core/session-group-birth.d.ts +7 -0
- package/dist/core/session-group-birth.d.ts.map +1 -0
- package/dist/core/session-group-birth.js +145 -0
- package/dist/core/session-group-birth.js.map +1 -0
- package/dist/core/session-manager.d.ts +16 -21
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +140 -21
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/trigger-session.d.ts.map +1 -1
- package/dist/core/trigger-session.js +18 -3
- package/dist/core/trigger-session.js.map +1 -1
- package/dist/core/types.d.ts +18 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/worker-pool.d.ts +63 -11
- package/dist/core/worker-pool.d.ts.map +1 -1
- package/dist/core/worker-pool.js +241 -13
- package/dist/core/worker-pool.js.map +1 -1
- package/dist/daemon.d.ts +33 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +900 -137
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/auth.d.ts +20 -0
- package/dist/dashboard/auth.d.ts.map +1 -1
- package/dist/dashboard/auth.js +86 -1
- package/dist/dashboard/auth.js.map +1 -1
- package/dist/dashboard/bot-payload.d.ts +5 -0
- package/dist/dashboard/bot-payload.d.ts.map +1 -1
- package/dist/dashboard/bot-payload.js +4 -1
- package/dist/dashboard/bot-payload.js.map +1 -1
- package/dist/dashboard/federation-spoke-api.d.ts.map +1 -1
- package/dist/dashboard/federation-spoke-api.js +27 -3
- package/dist/dashboard/federation-spoke-api.js.map +1 -1
- package/dist/dashboard/feedback-analytics-api.d.ts +6 -0
- package/dist/dashboard/feedback-analytics-api.d.ts.map +1 -0
- package/dist/dashboard/feedback-analytics-api.js +39 -0
- package/dist/dashboard/feedback-analytics-api.js.map +1 -0
- package/dist/dashboard/session-action-timeout.d.ts +3 -0
- package/dist/dashboard/session-action-timeout.d.ts.map +1 -0
- package/dist/dashboard/session-action-timeout.js +12 -0
- package/dist/dashboard/session-action-timeout.js.map +1 -0
- package/dist/dashboard/vc-consumer-profiles-api.d.ts +9 -3
- package/dist/dashboard/vc-consumer-profiles-api.d.ts.map +1 -1
- package/dist/dashboard/vc-consumer-profiles-api.js +2 -1
- package/dist/dashboard/vc-consumer-profiles-api.js.map +1 -1
- package/dist/dashboard/web/app.d.ts.map +1 -1
- package/dist/dashboard/web/app.js +48 -5
- package/dist/dashboard/web/app.js.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.d.ts +4 -0
- package/dist/dashboard/web/bot-defaults-page.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults-page.js +273 -36
- package/dist/dashboard/web/bot-defaults-page.js.map +1 -1
- package/dist/dashboard/web/bot-defaults.d.ts +6 -0
- package/dist/dashboard/web/bot-defaults.d.ts.map +1 -1
- package/dist/dashboard/web/bot-defaults.js.map +1 -1
- package/dist/dashboard/web/dashboard-routes.d.ts.map +1 -1
- package/dist/dashboard/web/dashboard-routes.js +1 -0
- package/dist/dashboard/web/dashboard-routes.js.map +1 -1
- package/dist/dashboard/web/feedback-page.d.ts +3 -0
- package/dist/dashboard/web/feedback-page.d.ts.map +1 -0
- package/dist/dashboard/web/feedback-page.js +34 -0
- package/dist/dashboard/web/feedback-page.js.map +1 -0
- package/dist/dashboard/web/groups-page.d.ts.map +1 -1
- package/dist/dashboard/web/groups-page.js +7 -2
- package/dist/dashboard/web/groups-page.js.map +1 -1
- package/dist/dashboard/web/i18n.d.ts.map +1 -1
- package/dist/dashboard/web/i18n.js +114 -22
- package/dist/dashboard/web/i18n.js.map +1 -1
- package/dist/dashboard/web/team-federation-page.d.ts.map +1 -1
- package/dist/dashboard/web/team-federation-page.js +26 -2
- package/dist/dashboard/web/team-federation-page.js.map +1 -1
- package/dist/dashboard/web/team-federation.d.ts +19 -0
- package/dist/dashboard/web/team-federation.d.ts.map +1 -1
- package/dist/dashboard/web/team-federation.js +3 -0
- package/dist/dashboard/web/team-federation.js.map +1 -1
- package/dist/dashboard/web/update-action.d.ts +8 -0
- package/dist/dashboard/web/update-action.d.ts.map +1 -1
- package/dist/dashboard/web/update-action.js +10 -0
- package/dist/dashboard/web/update-action.js.map +1 -1
- package/dist/dashboard/web/vc-consumer-profiles-section.d.ts.map +1 -1
- package/dist/dashboard/web/vc-consumer-profiles-section.js +58 -9
- package/dist/dashboard/web/vc-consumer-profiles-section.js.map +1 -1
- package/dist/dashboard-web/app.js +1 -1
- package/dist/dashboard-web/chunks/bot-defaults-page-4RENHE7J.js +10 -0
- package/dist/dashboard-web/chunks/chunk-2WQDS65D.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-CU4SUKK3.js → chunk-6O7KXFD2.js} +1 -1
- package/dist/dashboard-web/chunks/chunk-G5XGBCM6.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-6JTZJRQJ.js → chunk-Q2MT4VWH.js} +15 -15
- package/dist/dashboard-web/chunks/{chunk-5QJB24I2.js → chunk-U3ZFSO7E.js} +1 -1
- package/dist/dashboard-web/chunks/connectors-page-2KZO5KSJ.js +1 -0
- package/dist/dashboard-web/chunks/feedback-page-CLVTOLLO.js +1 -0
- package/dist/dashboard-web/chunks/groups-page-HLASRTSY.js +8 -0
- package/dist/dashboard-web/chunks/{insights-page-EVGGJI5L.js → insights-page-4RPU2CRU.js} +1 -1
- package/dist/dashboard-web/chunks/{monitor-room-HRGR2ENP.js → monitor-room-OTKQ2CXK.js} +1 -1
- package/dist/dashboard-web/chunks/monitoring-page-IJPUB6JT.js +2 -0
- package/dist/dashboard-web/chunks/office-page-QSR3J44Y.js +1 -0
- package/dist/dashboard-web/chunks/overview-page-6OK63V4V.js +1 -0
- package/dist/dashboard-web/chunks/roles-page-6NWJMOB5.js +1 -0
- package/dist/dashboard-web/chunks/schedules-page-6I3LNXD4.js +1 -0
- package/dist/dashboard-web/chunks/{sessions-page-DXBCDWCS.js → sessions-page-B2TXGJDO.js} +1 -1
- package/dist/dashboard-web/chunks/settings-page-6KJADSC6.js +2 -0
- package/dist/dashboard-web/chunks/{skills-page-2QAVB2SA.js → skills-page-M2Q6L5CB.js} +1 -1
- package/dist/dashboard-web/chunks/team-federation-page-7I7FDE3B.js +1 -0
- package/dist/dashboard-web/chunks/{v3-page-AY35LKCX.js → v3-page-HQXRL65L.js} +1 -1
- package/dist/dashboard-web/chunks/whiteboards-page-LQKC4TAZ.js +1 -0
- package/dist/dashboard-web/style.css +35 -0
- package/dist/dashboard.js +199 -12
- package/dist/dashboard.js.map +1 -1
- package/dist/desktop/shared/shell-path-probes.d.ts +1 -1
- package/dist/desktop/shared/shell-path-probes.js +2 -2
- package/dist/desktop/shared/shell-path-probes.js.map +1 -1
- package/dist/dsh-runner.d.ts +3 -0
- package/dist/dsh-runner.d.ts.map +1 -0
- package/dist/dsh-runner.js +666 -0
- package/dist/dsh-runner.js.map +1 -0
- package/dist/global-config.d.ts +24 -0
- package/dist/global-config.d.ts.map +1 -1
- package/dist/global-config.js +35 -0
- package/dist/global-config.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +25 -6
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +25 -6
- package/dist/i18n/zh.js.map +1 -1
- package/dist/im/lark/ask-card.d.ts +3 -1
- package/dist/im/lark/ask-card.d.ts.map +1 -1
- package/dist/im/lark/ask-card.js +61 -5
- package/dist/im/lark/ask-card.js.map +1 -1
- package/dist/im/lark/card-builder.d.ts.map +1 -1
- package/dist/im/lark/card-builder.js +13 -6
- package/dist/im/lark/card-builder.js.map +1 -1
- package/dist/im/lark/card-handler.d.ts +2 -1
- package/dist/im/lark/card-handler.d.ts.map +1 -1
- package/dist/im/lark/card-handler.js +145 -5
- package/dist/im/lark/card-handler.js.map +1 -1
- package/dist/im/lark/event-dispatcher.d.ts +18 -0
- package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
- package/dist/im/lark/event-dispatcher.js +36 -9
- package/dist/im/lark/event-dispatcher.js.map +1 -1
- package/dist/im/lark/md-card.d.ts +18 -0
- package/dist/im/lark/md-card.d.ts.map +1 -1
- package/dist/im/lark/md-card.js +21 -0
- package/dist/im/lark/md-card.js.map +1 -1
- package/dist/im/lark/relay-target-routing.d.ts.map +1 -1
- package/dist/im/lark/relay-target-routing.js +3 -2
- package/dist/im/lark/relay-target-routing.js.map +1 -1
- package/dist/im/lark/reply-mode-command.d.ts.map +1 -1
- package/dist/im/lark/reply-mode-command.js +19 -8
- package/dist/im/lark/reply-mode-command.js.map +1 -1
- package/dist/im/lark/skill-feedback-card.d.ts +15 -0
- package/dist/im/lark/skill-feedback-card.d.ts.map +1 -0
- package/dist/im/lark/skill-feedback-card.js +149 -0
- package/dist/im/lark/skill-feedback-card.js.map +1 -0
- package/dist/services/bot-config-store.d.ts +10 -1
- package/dist/services/bot-config-store.d.ts.map +1 -1
- package/dist/services/bot-config-store.js +103 -3
- package/dist/services/bot-config-store.js.map +1 -1
- package/dist/services/bridge-fallback-gate.d.ts +14 -0
- package/dist/services/bridge-fallback-gate.d.ts.map +1 -1
- package/dist/services/bridge-fallback-gate.js +15 -0
- package/dist/services/bridge-fallback-gate.js.map +1 -1
- package/dist/services/codex-reasoning-effort.d.ts +9 -0
- package/dist/services/codex-reasoning-effort.d.ts.map +1 -0
- package/dist/services/codex-reasoning-effort.js +23 -0
- package/dist/services/codex-reasoning-effort.js.map +1 -0
- package/dist/services/codex-service-tier.d.ts +1 -1
- package/dist/services/codex-service-tier.d.ts.map +1 -1
- package/dist/services/codex-transcript.d.ts +9 -0
- package/dist/services/codex-transcript.d.ts.map +1 -1
- package/dist/services/codex-transcript.js +13 -6
- package/dist/services/codex-transcript.js.map +1 -1
- package/dist/services/feed-group-tagger.d.ts +15 -0
- package/dist/services/feed-group-tagger.d.ts.map +1 -0
- package/dist/services/feed-group-tagger.js +348 -0
- package/dist/services/feed-group-tagger.js.map +1 -0
- package/dist/services/feedback-analytics.d.ts +82 -0
- package/dist/services/feedback-analytics.d.ts.map +1 -0
- package/dist/services/feedback-analytics.js +95 -0
- package/dist/services/feedback-analytics.js.map +1 -0
- package/dist/services/feedback-outbox.d.ts +24 -0
- package/dist/services/feedback-outbox.d.ts.map +1 -0
- package/dist/services/feedback-outbox.js +12 -0
- package/dist/services/feedback-outbox.js.map +1 -0
- package/dist/services/feedback-policy-resolver.d.ts +56 -0
- package/dist/services/feedback-policy-resolver.d.ts.map +1 -0
- package/dist/services/feedback-policy-resolver.js +156 -0
- package/dist/services/feedback-policy-resolver.js.map +1 -0
- package/dist/services/feedback-policy.d.ts +41 -0
- package/dist/services/feedback-policy.d.ts.map +1 -0
- package/dist/services/feedback-policy.js +102 -0
- package/dist/services/feedback-policy.js.map +1 -0
- package/dist/services/feedback-webhook-dispatcher.d.ts +76 -0
- package/dist/services/feedback-webhook-dispatcher.d.ts.map +1 -0
- package/dist/services/feedback-webhook-dispatcher.js +237 -0
- package/dist/services/feedback-webhook-dispatcher.js.map +1 -0
- package/dist/services/grant-prefs-store.d.ts +3 -0
- package/dist/services/grant-prefs-store.d.ts.map +1 -1
- package/dist/services/grant-prefs-store.js +30 -1
- package/dist/services/grant-prefs-store.js.map +1 -1
- package/dist/services/groups-store.d.ts +14 -0
- package/dist/services/groups-store.d.ts.map +1 -1
- package/dist/services/groups-store.js +23 -0
- package/dist/services/groups-store.js.map +1 -1
- package/dist/services/local-cli-opener.d.ts +1 -1
- package/dist/services/local-cli-opener.d.ts.map +1 -1
- package/dist/services/local-cli-opener.js +2 -0
- package/dist/services/local-cli-opener.js.map +1 -1
- package/dist/services/prompt-context-store.d.ts +29 -0
- package/dist/services/prompt-context-store.d.ts.map +1 -0
- package/dist/services/prompt-context-store.js +205 -0
- package/dist/services/prompt-context-store.js.map +1 -0
- package/dist/services/session-group-avatar.d.ts +6 -0
- package/dist/services/session-group-avatar.d.ts.map +1 -0
- package/dist/services/session-group-avatar.js +96 -0
- package/dist/services/session-group-avatar.js.map +1 -0
- package/dist/services/session-group-title.d.ts +47 -0
- package/dist/services/session-group-title.d.ts.map +1 -0
- package/dist/services/session-group-title.js +226 -0
- package/dist/services/session-group-title.js.map +1 -0
- package/dist/services/session-groups-store.d.ts +30 -0
- package/dist/services/session-groups-store.d.ts.map +1 -0
- package/dist/services/session-groups-store.js +132 -0
- package/dist/services/session-groups-store.js.map +1 -0
- package/dist/services/session-store.d.ts +58 -0
- package/dist/services/session-store.d.ts.map +1 -1
- package/dist/services/session-store.js +174 -0
- package/dist/services/session-store.js.map +1 -1
- package/dist/services/skill-feedback-store.d.ts +252 -0
- package/dist/services/skill-feedback-store.d.ts.map +1 -0
- package/dist/services/skill-feedback-store.js +795 -0
- package/dist/services/skill-feedback-store.js.map +1 -0
- package/dist/services/skill-registry-store.d.ts +23 -0
- package/dist/services/skill-registry-store.d.ts.map +1 -1
- package/dist/services/skill-registry-store.js +93 -7
- package/dist/services/skill-registry-store.js.map +1 -1
- package/dist/services/team-store.d.ts +4 -0
- package/dist/services/team-store.d.ts.map +1 -1
- package/dist/services/team-store.js +16 -0
- package/dist/services/team-store.js.map +1 -1
- package/dist/services/traex-transcript.d.ts +32 -4
- package/dist/services/traex-transcript.d.ts.map +1 -1
- package/dist/services/traex-transcript.js +116 -8
- package/dist/services/traex-transcript.js.map +1 -1
- package/dist/services/trigger-types.d.ts +1 -1
- package/dist/services/trigger-types.d.ts.map +1 -1
- package/dist/services/trigger-types.js +2 -2
- package/dist/services/trigger-types.js.map +1 -1
- package/dist/services/turn-completion-events.d.ts +57 -0
- package/dist/services/turn-completion-events.d.ts.map +1 -0
- package/dist/services/turn-completion-events.js +179 -0
- package/dist/services/turn-completion-events.js.map +1 -0
- package/dist/services/vc-meeting-consumer-isolation.d.ts +21 -12
- package/dist/services/vc-meeting-consumer-isolation.d.ts.map +1 -1
- package/dist/services/vc-meeting-consumer-isolation.js +25 -19
- package/dist/services/vc-meeting-consumer-isolation.js.map +1 -1
- package/dist/services/vc-meeting-consumer-profile-bootstrap.d.ts +8 -2
- package/dist/services/vc-meeting-consumer-profile-bootstrap.d.ts.map +1 -1
- package/dist/services/vc-meeting-consumer-profile-bootstrap.js +18 -10
- package/dist/services/vc-meeting-consumer-profile-bootstrap.js.map +1 -1
- package/dist/setup/bot-config-editor.d.ts.map +1 -1
- package/dist/setup/bot-config-editor.js +6 -0
- package/dist/setup/bot-config-editor.js.map +1 -1
- package/dist/setup/cli-availability.d.ts +2 -1
- package/dist/setup/cli-availability.d.ts.map +1 -1
- package/dist/setup/cli-availability.js +2 -1
- package/dist/setup/cli-availability.js.map +1 -1
- package/dist/setup/cli-selection.d.ts +8 -0
- package/dist/setup/cli-selection.d.ts.map +1 -1
- package/dist/setup/cli-selection.js +31 -0
- package/dist/setup/cli-selection.js.map +1 -1
- package/dist/setup/ensure-fonts.d.ts +5 -0
- package/dist/setup/ensure-fonts.d.ts.map +1 -1
- package/dist/setup/ensure-fonts.js +26 -1
- package/dist/setup/ensure-fonts.js.map +1 -1
- package/dist/setup/lark-scopes.json +3 -1
- package/dist/setup/open-platform-automation.d.ts +1 -1
- package/dist/setup/open-platform-automation.d.ts.map +1 -1
- package/dist/setup/open-platform-automation.js +15 -3
- package/dist/setup/open-platform-automation.js.map +1 -1
- package/dist/skills/definitions.d.ts +1 -1
- package/dist/skills/definitions.d.ts.map +1 -1
- package/dist/skills/definitions.js +9 -2
- package/dist/skills/definitions.js.map +1 -1
- package/dist/types.d.ts +10 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/user-token.d.ts +38 -0
- package/dist/utils/user-token.d.ts.map +1 -1
- package/dist/utils/user-token.js +76 -1
- package/dist/utils/user-token.js.map +1 -1
- package/dist/utils/web-terminal-scroll.d.ts +27 -0
- package/dist/utils/web-terminal-scroll.d.ts.map +1 -0
- package/dist/utils/web-terminal-scroll.js +60 -0
- package/dist/utils/web-terminal-scroll.js.map +1 -0
- package/dist/vc-agent/polling-source.d.ts +70 -0
- package/dist/vc-agent/polling-source.d.ts.map +1 -1
- package/dist/vc-agent/polling-source.js +115 -0
- package/dist/vc-agent/polling-source.js.map +1 -1
- package/dist/worker.js +237 -76
- package/dist/worker.js.map +1 -1
- package/dist/workflows/definition.d.ts +22 -22
- package/dist/workflows/events/payloads.d.ts +8 -8
- package/dist/workflows/events/schema.d.ts +20 -20
- package/dist/workflows/migration/v2-run-archive-schema.d.ts +20 -20
- package/package.json +1 -1
- package/dist/dashboard-web/chunks/bot-defaults-page-NQJFJ45Z.js +0 -10
- package/dist/dashboard-web/chunks/chunk-KEEYQ3WF.js +0 -1
- package/dist/dashboard-web/chunks/connectors-page-HADHZXXZ.js +0 -1
- package/dist/dashboard-web/chunks/groups-page-5TYF46RS.js +0 -8
- package/dist/dashboard-web/chunks/monitoring-page-LBU7TTTW.js +0 -2
- package/dist/dashboard-web/chunks/office-page-DF6RRBMN.js +0 -1
- package/dist/dashboard-web/chunks/overview-page-ZB6QH2EX.js +0 -1
- package/dist/dashboard-web/chunks/roles-page-ZBZGHIIF.js +0 -1
- package/dist/dashboard-web/chunks/schedules-page-NQVQC3QY.js +0 -1
- package/dist/dashboard-web/chunks/settings-page-E7NN4NVQ.js +0 -2
- package/dist/dashboard-web/chunks/team-federation-page-VGWL53AE.js +0 -1
- package/dist/dashboard-web/chunks/whiteboards-page-BNWUU4KG.js +0 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { CliId, ResumableSession } from '../adapters/cli/types.js';
|
|
2
|
+
import { type WorkerSessionReplyOptions } from './worker-pool.js';
|
|
2
3
|
import { validateWorkingDir } from './working-dir.js';
|
|
3
4
|
import { type AdoptableSession } from './session-discovery.js';
|
|
4
5
|
import { type ZellijAdoptableSession } from './zellij-adopt-discovery.js';
|
|
5
6
|
import { type CodexAppThreadSummary } from '../services/codex-app-threads.js';
|
|
6
7
|
import { type DocSubscription } from '../services/doc-subs-store.js';
|
|
7
|
-
import type { LarkMessage } from '../types.js';
|
|
8
|
+
import type { LarkMessage, FrozenSessionReplyTarget } from '../types.js';
|
|
8
9
|
import type { DaemonSession } from './types.js';
|
|
9
10
|
import { DAEMON_COMMANDS, PASSTHROUGH_COMMANDS } from './passthrough-commands.js';
|
|
10
11
|
export { DAEMON_COMMANDS, PASSTHROUGH_COMMANDS };
|
|
@@ -32,17 +33,21 @@ export declare function formatSlashGroupName(name: string, prefix?: string): str
|
|
|
32
33
|
* of fix as the `/card` / `/term` special cases in daemon.ts.)
|
|
33
34
|
*/
|
|
34
35
|
export declare const EXISTING_SESSION_ONLY_DAEMON_COMMANDS: Set<string>;
|
|
35
|
-
export declare function resolveAdapterDefaultPassthroughCommands(larkAppId?: string): string[];
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
37
|
+
* Adapter-scoped default passthrough commands (e.g. Codex's `/goal`).
|
|
38
|
+
*
|
|
39
|
+
* `cliIdOverride` lets a caller resolve against a session's FROZEN CLI instead
|
|
40
|
+
* of the bot's current config — an existing session keeps the runtime it was
|
|
41
|
+
* created with, so changing `/botconfig cli` must not silently strip an old
|
|
42
|
+
* interactive Codex session's adapter-scoped `/goal` (nor grant one to a Codex
|
|
43
|
+
* App session). `defaultPassthroughCommands` is a static per-adapter list and
|
|
44
|
+
* does not depend on the resolved binary, so when the override diverges from
|
|
45
|
+
* the bot's current CLI we intentionally drop `cliPathOverride` (it belongs to
|
|
46
|
+
* the other CLI) and let the adapter resolve with no path hint.
|
|
44
47
|
*/
|
|
45
|
-
export declare function
|
|
48
|
+
export declare function resolveAdapterDefaultPassthroughCommands(larkAppId?: string, cliIdOverride?: string): string[];
|
|
49
|
+
export declare function cliHasNoRawPassthroughSurface(cliId: string | undefined): boolean;
|
|
50
|
+
export declare function resolvePassthroughCommands(larkAppId?: string, cliIdOverride?: string): Set<string>;
|
|
46
51
|
export interface SlashCommandInvocation {
|
|
47
52
|
cmd: string;
|
|
48
53
|
content: string;
|
|
@@ -99,9 +104,12 @@ export declare function parseForceTopicInvocation(content: string): {
|
|
|
99
104
|
export declare function parseSlashCommandInvocation(content: string): SlashCommandInvocation | null;
|
|
100
105
|
export interface CommandHandlerDeps {
|
|
101
106
|
activeSessions: Map<string, DaemonSession>;
|
|
102
|
-
sessionReply: (rootId: string, content: string, msgType?: string, larkAppId?: string, turnId?: string) => Promise<string>;
|
|
107
|
+
sessionReply: (rootId: string, content: string, msgType?: string, larkAppId?: string, turnId?: string, opts?: WorkerSessionReplyOptions) => Promise<string>;
|
|
103
108
|
getActiveCount: () => number;
|
|
104
109
|
lastRepoScan: Map<string, import('../services/project-scanner.js').ProjectInfo[]>;
|
|
110
|
+
/** Immutable Lark placement captured by the daemon for this slash-command
|
|
111
|
+
* invocation. Unlike session state, it remains valid after close/replace. */
|
|
112
|
+
invocationReplyTarget?: FrozenSessionReplyTarget;
|
|
105
113
|
/** 会前预热文档评论会话:立即启动 CLI、读取文档并进入待命。 */
|
|
106
114
|
prewarmDocCommentSession?: (ds: DaemonSession, sub: DocSubscription) => Promise<void>;
|
|
107
115
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../src/core/command-handler.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"command-handler.d.ts","sourceRoot":"","sources":["../../src/core/command-handler.ts"],"names":[],"mappings":"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"}
|
|
@@ -33,7 +33,7 @@ import { repinSessionWorkingDir } from './session-cwd.js';
|
|
|
33
33
|
import { validateAdoptTarget, adoptTargetKey, adoptTargetLabel } from './session-discovery.js';
|
|
34
34
|
import { validateZellijAdoptTarget } from './zellij-adopt-discovery.js';
|
|
35
35
|
import { listCodexAppThreads } from '../services/codex-app-threads.js';
|
|
36
|
-
import { generateAuthUrl, getTokenStatus, resolveUserToken, DOC_COMMENT_OAUTH_SCOPES } from '../utils/user-token.js';
|
|
36
|
+
import { generateAuthUrl, getTokenStatus, resolveUserToken, DOC_COMMENT_OAUTH_SCOPES, FEED_GROUP_OAUTH_SCOPES } from '../utils/user-token.js';
|
|
37
37
|
import { DocSubscriptionPermissionError, listDocComments, resolveDocFile, subscribeDocFile, unsubscribeDocFile } from '../im/lark/doc-comment.js';
|
|
38
38
|
import { parseDocWatchCommand } from './doc-watch-command.js';
|
|
39
39
|
import { parseVcMeetingPrepareCommand } from './vc-meeting-prepare-command.js';
|
|
@@ -62,6 +62,7 @@ import { requestAgentSessionRename } from './session-rename.js';
|
|
|
62
62
|
import { hasProtectedSessionMutationOwnership } from './session-mutation-guard.js';
|
|
63
63
|
import { withBotTurnMutation } from './bot-turn-mutation-gate.js';
|
|
64
64
|
import { configuredRuntimeDisplayName, sessionConfiguredRuntimeDisplayName, } from './cli-runtime-display.js';
|
|
65
|
+
import { isSessionGroup } from '../services/session-groups-store.js';
|
|
65
66
|
// ─── Exported constants ──────────────────────────────────────────────────────
|
|
66
67
|
// DAEMON_COMMANDS / PASSTHROUGH_COMMANDS / normalizePassthroughCommand now live
|
|
67
68
|
// in the leaf ./passthrough-commands.js so the config store can share the
|
|
@@ -106,12 +107,26 @@ export function formatSlashGroupName(name, prefix = '') {
|
|
|
106
107
|
* of fix as the `/card` / `/term` special cases in daemon.ts.)
|
|
107
108
|
*/
|
|
108
109
|
export const EXISTING_SESSION_ONLY_DAEMON_COMMANDS = new Set(['/rename', '/fork', '/forklist']);
|
|
109
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Adapter-scoped default passthrough commands (e.g. Codex's `/goal`).
|
|
112
|
+
*
|
|
113
|
+
* `cliIdOverride` lets a caller resolve against a session's FROZEN CLI instead
|
|
114
|
+
* of the bot's current config — an existing session keeps the runtime it was
|
|
115
|
+
* created with, so changing `/botconfig cli` must not silently strip an old
|
|
116
|
+
* interactive Codex session's adapter-scoped `/goal` (nor grant one to a Codex
|
|
117
|
+
* App session). `defaultPassthroughCommands` is a static per-adapter list and
|
|
118
|
+
* does not depend on the resolved binary, so when the override diverges from
|
|
119
|
+
* the bot's current CLI we intentionally drop `cliPathOverride` (it belongs to
|
|
120
|
+
* the other CLI) and let the adapter resolve with no path hint.
|
|
121
|
+
*/
|
|
122
|
+
export function resolveAdapterDefaultPassthroughCommands(larkAppId, cliIdOverride) {
|
|
110
123
|
if (!larkAppId)
|
|
111
124
|
return [];
|
|
112
125
|
try {
|
|
113
126
|
const bot = getBot(larkAppId);
|
|
114
|
-
const
|
|
127
|
+
const cliId = (cliIdOverride ?? bot.config.cliId);
|
|
128
|
+
const cliPathOverride = cliId === bot.config.cliId ? bot.config.cliPathOverride : undefined;
|
|
129
|
+
const adapter = createCliAdapterSync(cliId, cliPathOverride);
|
|
115
130
|
const normalized = (adapter.defaultPassthroughCommands ?? [])
|
|
116
131
|
.map(normalizePassthroughCommand)
|
|
117
132
|
.filter((c) => !!c);
|
|
@@ -128,13 +143,48 @@ export function resolveAdapterDefaultPassthroughCommands(larkAppId) {
|
|
|
128
143
|
* daemon commands must keep their daemon semantics, and passthrough is checked
|
|
129
144
|
* BEFORE DAEMON_COMMANDS in the router, so an un-filtered custom `/status`
|
|
130
145
|
* would hijack the daemon's own.
|
|
131
|
-
*
|
|
146
|
+
* Codex App deliberately resolves to an empty set because its runner speaks
|
|
147
|
+
* App Server rather than an interactive TUI; slash-looking text must use the
|
|
148
|
+
* structured turn lane. Unknown / no bot → falls back to the builtin set.
|
|
132
149
|
*/
|
|
133
|
-
|
|
150
|
+
/** Runner adapters speak a framed stdin protocol, not an interactive TUI:
|
|
151
|
+
* raw slash passthrough would bypass the turn ledger and the runner rejects
|
|
152
|
+
* non-frame input. Both the routing and the /list-slash-command display must
|
|
153
|
+
* agree on this set. */
|
|
154
|
+
const NO_RAW_PASSTHROUGH_CLI_IDS = new Set(['codex-app', 'mira', 'mir', 'dsh']);
|
|
155
|
+
export function cliHasNoRawPassthroughSurface(cliId) {
|
|
156
|
+
return !!cliId && NO_RAW_PASSTHROUGH_CLI_IDS.has(cliId);
|
|
157
|
+
}
|
|
158
|
+
export function resolvePassthroughCommands(larkAppId, cliIdOverride) {
|
|
134
159
|
const effective = new Set(PASSTHROUGH_COMMANDS);
|
|
135
160
|
if (!larkAppId)
|
|
136
161
|
return effective;
|
|
137
|
-
|
|
162
|
+
// Resolve the EFFECTIVE CLI once and thread it through every layer below
|
|
163
|
+
// (early return, adapter defaults). An existing session freezes its CLI, so
|
|
164
|
+
// the override must reach the adapter-scoped defaults too — otherwise a bot
|
|
165
|
+
// switched to Codex App would still read the current config there and drop a
|
|
166
|
+
// frozen interactive Codex session's `/goal` (or vice versa). undefined when
|
|
167
|
+
// the bot is unknown → builtin set only.
|
|
168
|
+
let effectiveCliId;
|
|
169
|
+
try {
|
|
170
|
+
effectiveCliId = cliIdOverride ?? getBot(larkAppId).config.cliId;
|
|
171
|
+
}
|
|
172
|
+
catch {
|
|
173
|
+
/* unknown bot — builtin set only */
|
|
174
|
+
}
|
|
175
|
+
// Codex App speaks the structured app-server protocol: its PTY only hosts
|
|
176
|
+
// botmux's runner/viewer and is not an interactive Codex TUI. Sending a
|
|
177
|
+
// slash command through raw_input therefore bypasses the App Server turn
|
|
178
|
+
// ledger; the model still completes the text as an ordinary turn, but the
|
|
179
|
+
// worker has no pending dispatch to attribute that final to and the session
|
|
180
|
+
// remains stuck. Keep these messages on the normal structured turn path.
|
|
181
|
+
// Runner adapters (codex-app/mira/mir/dsh) speak a framed stdin protocol,
|
|
182
|
+
// not an interactive TUI: a slash command through raw_input bypasses the
|
|
183
|
+
// turn ledger and the runner rejects non-frame input, wedging the session.
|
|
184
|
+
// Keep these messages on the normal structured turn path.
|
|
185
|
+
if (cliHasNoRawPassthroughSurface(effectiveCliId))
|
|
186
|
+
return new Set();
|
|
187
|
+
for (const c of resolveAdapterDefaultPassthroughCommands(larkAppId, effectiveCliId)) {
|
|
138
188
|
effective.add(c);
|
|
139
189
|
}
|
|
140
190
|
try {
|
|
@@ -1254,10 +1304,10 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
1254
1304
|
await sessionReply(rootId, `⚠️ 会话关闭失败,已保留 active 记录以便重试:${closed.err instanceof Error ? closed.err.message : String(closed.err)}`);
|
|
1255
1305
|
break;
|
|
1256
1306
|
}
|
|
1257
|
-
//
|
|
1258
|
-
// /close
|
|
1259
|
-
//
|
|
1260
|
-
await deliverEphemeralOrReply(closed.current, message.senderId, closed.card, 'interactive', () => sessionReply(rootId, closed.card, 'interactive'));
|
|
1307
|
+
// 「会话已关闭」卡片优先「仅自己可见」:普通群顶层走 ephemeral 只发给
|
|
1308
|
+
// 执行 /close 的本人;若本命令从折叠到 chat-scope 的真实话题触发,则
|
|
1309
|
+
// invocationReplyTarget 让 helper 跳过无 thread 锚点的 ephemeral,回原话题。
|
|
1310
|
+
await deliverEphemeralOrReply(closed.current, message.senderId, closed.card, 'interactive', () => sessionReply(rootId, closed.card, 'interactive'), deps.invocationReplyTarget);
|
|
1261
1311
|
logger.info(`[${logTag}] Session closed by /close command`);
|
|
1262
1312
|
}
|
|
1263
1313
|
else {
|
|
@@ -1721,7 +1771,7 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
1721
1771
|
}
|
|
1722
1772
|
return false;
|
|
1723
1773
|
}
|
|
1724
|
-
await deliverEphemeralOrReply(switched.current, message.senderId, switched.closedCard, 'interactive', () => sessionReply(rootId, switched.closedCard, 'interactive'));
|
|
1774
|
+
await deliverEphemeralOrReply(switched.current, message.senderId, switched.closedCard, 'interactive', () => sessionReply(rootId, switched.closedCard, 'interactive'), deps.invocationReplyTarget);
|
|
1725
1775
|
await sessionReply(rootId, t('cmd.repo.switched_to', { name: displayName }, loc));
|
|
1726
1776
|
if (switched.cardToWithdraw) {
|
|
1727
1777
|
try {
|
|
@@ -2147,6 +2197,24 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
2147
2197
|
await sessionReply(rootId, getTokenStatus(botCfg2.larkAppId, normalizeBrand(botCfg2.brand)));
|
|
2148
2198
|
break;
|
|
2149
2199
|
}
|
|
2200
|
+
// `/login tags` — 会话群侧边栏分组(feed group)专项授权:追加
|
|
2201
|
+
// im:feed_group_v1 scope(与 /subscribe-lark-doc 的专项 scope 同款模式,
|
|
2202
|
+
// 不污染通用 /login)。授权完成后 feed-group 标签模式全自动挂载。
|
|
2203
|
+
if (subCmd === 'tags' || subCmd === 'tag' || subCmd === '标签') {
|
|
2204
|
+
const { authUrl: tagAuthUrl } = generateAuthUrl(botCfg2.larkAppId, botCfg2.larkAppSecret, normalizeBrand(botCfg2.brand), FEED_GROUP_OAUTH_SCOPES);
|
|
2205
|
+
await sessionReply(rootId, [
|
|
2206
|
+
t('cmd.login.tags_title', undefined, loc),
|
|
2207
|
+
'',
|
|
2208
|
+
t('cmd.login.step1', undefined, loc),
|
|
2209
|
+
tagAuthUrl,
|
|
2210
|
+
'',
|
|
2211
|
+
t('cmd.login.step2', undefined, loc),
|
|
2212
|
+
t('cmd.login.step3', undefined, loc),
|
|
2213
|
+
'',
|
|
2214
|
+
t('cmd.login.tags_footer', undefined, loc),
|
|
2215
|
+
].join('\n'));
|
|
2216
|
+
break;
|
|
2217
|
+
}
|
|
2150
2218
|
const { authUrl } = generateAuthUrl(botCfg2.larkAppId, botCfg2.larkAppSecret, normalizeBrand(botCfg2.brand));
|
|
2151
2219
|
await sessionReply(rootId, [
|
|
2152
2220
|
t('cmd.login.title', undefined, loc),
|
|
@@ -2609,6 +2677,11 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
2609
2677
|
await sessionReply(rootId, t('cmd.oncall.need_group', undefined, loc));
|
|
2610
2678
|
break;
|
|
2611
2679
|
}
|
|
2680
|
+
// 会话群的 oncall 绑定在出生时由 bot 自动写入,禁止手改(冲突隔离)。
|
|
2681
|
+
if (isSessionGroup(chatId)) {
|
|
2682
|
+
await sessionReply(rootId, t('sg.cmd_unsupported', { cmd: '/oncall' }, loc));
|
|
2683
|
+
break;
|
|
2684
|
+
}
|
|
2612
2685
|
if (!sub || sub === 'status' || sub === '状态') {
|
|
2613
2686
|
const entry = getOncallStatus(appId, chatId);
|
|
2614
2687
|
if (!entry) {
|
|
@@ -3017,12 +3090,14 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3017
3090
|
const { buildRelayPickerCard } = await import('../im/lark/card-builder.js');
|
|
3018
3091
|
// ── Ephemeral (仅邀请者可见) picker ────────────────────────────────
|
|
3019
3092
|
// The picker exposes session metadata — title + source-chat name — to
|
|
3020
|
-
// everyone who can see the message.
|
|
3021
|
-
//
|
|
3022
|
-
// the
|
|
3093
|
+
// everyone who can see the message. There is NO benefit to showing it
|
|
3094
|
+
// publicly: the invoker is always the owner (每张菜单 owner-only,别人点
|
|
3095
|
+
// 会被拒), so a public picker only leaks his session list to the whole
|
|
3096
|
+
// group. We therefore default it to private — decoupled from the
|
|
3097
|
+
// `privateCard` config, which continues to gate ONLY /card & /close.
|
|
3023
3098
|
//
|
|
3024
|
-
// Gate on group +
|
|
3025
|
-
//
|
|
3099
|
+
// Gate on group + **chat-scope**. The chat-scope clause is
|
|
3100
|
+
// load-bearing: the ephemeral API (`ephemeral/v1/send`) takes a
|
|
3026
3101
|
// `chat_id` only — it has NO thread/root anchor — so a thread-scope
|
|
3027
3102
|
// target (话题群 / 话题 inside a 普通群 / new-topic·shared) can't keep the
|
|
3028
3103
|
// card in its 话题. A 话题群 rejects with 18053 (→ fall back below), but
|
|
@@ -3031,12 +3106,11 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3031
3106
|
// guards against with a REGRESSION test; PR #164 was the original live
|
|
3032
3107
|
// fix. Per 申晗 (2026-07-29): 话题内公开可接受 — so thread-scope pickers
|
|
3033
3108
|
// stay on the visible in-thread reply (public card in the 话题), and
|
|
3034
|
-
// ephemeral is scoped to flat 普通群 only
|
|
3035
|
-
//
|
|
3036
|
-
//
|
|
3109
|
+
// ephemeral is scoped to flat 普通群 only. p2p has no ephemeral option;
|
|
3110
|
+
// an unexpected reject (18053 etc.) still falls back to the visible
|
|
3111
|
+
// reply below.
|
|
3037
3112
|
const privatePicker = targetChatType === 'group'
|
|
3038
|
-
&& targetScope === 'chat'
|
|
3039
|
-
&& getBot(myAppId).config.privateCard === true;
|
|
3113
|
+
&& targetScope === 'chat';
|
|
3040
3114
|
const card = buildRelayPickerCard(entries, targetChatId, targetAnchor, operatorOpenId, loc, undefined, targetScope, targetChatType, privatePicker ? 'private' : 'public');
|
|
3041
3115
|
if (privatePicker) {
|
|
3042
3116
|
const { sendEphemeralCard } = await import('../im/lark/client.js');
|
|
@@ -3595,7 +3669,12 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3595
3669
|
// is empty by construction, so no target-anchor conflict. Source is
|
|
3596
3670
|
// never touched.
|
|
3597
3671
|
const { forkSession } = await import('./worker-pool.js');
|
|
3598
|
-
|
|
3672
|
+
// forkTaskText = the group name (the human-readable intent for this
|
|
3673
|
+
// fork), so /forklist can label the child row instead of falling back to
|
|
3674
|
+
// the raw session title.
|
|
3675
|
+
const forkResult = await forkSession(ds.session.sessionId, forkChatId, forkChatId, 'group', 'chat', {
|
|
3676
|
+
forkTaskText: forkGroupName,
|
|
3677
|
+
});
|
|
3599
3678
|
if (!forkResult.ok) {
|
|
3600
3679
|
// Residual-orphan cleanup: the front guards already ran before
|
|
3601
3680
|
// createGroupWithBots, so this only fires on a narrow TOCTOU race
|
|
@@ -3635,8 +3714,52 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3635
3714
|
logger.warn(`[${logTag}] /fork --create: forkSession failed (${forkResult.error}); new chat ${forkChatId} ${orphanCleaned ? 'disbanded' : 'LEFT (disband failed)'}`);
|
|
3636
3715
|
break;
|
|
3637
3716
|
}
|
|
3638
|
-
|
|
3717
|
+
// Persist the child on the SOURCE session's lineage BEFORE any
|
|
3718
|
+
// user-visible send. The sub-topic fork path also records lineage; the
|
|
3719
|
+
// --create (new-group) path historically skipped it entirely, leaving
|
|
3720
|
+
// forkChildSessionIds permanently empty and /forklist always reporting
|
|
3721
|
+
// "no forks".
|
|
3722
|
+
//
|
|
3723
|
+
// Ordering is load-bearing: the "created" notice below is a reply to the
|
|
3724
|
+
// parent session's root message, i.e. the SAME message whose expiry
|
|
3725
|
+
// (HTTP 400) this PR's other fix addresses. If that reply threw while it
|
|
3726
|
+
// still ran first, control would unwind to handleCommand's outer catch
|
|
3727
|
+
// (log-only) and the lineage write would be skipped — so in the very
|
|
3728
|
+
// "root expired" scenario this change targets, /forklist would stay
|
|
3729
|
+
// empty. Writing lineage first makes it independent of the notify path;
|
|
3730
|
+
// the notice and panel refresh are best-effort afterwards.
|
|
3731
|
+
if (!ds.session.forkChildSessionIds?.includes(forkResult.childSessionId)) {
|
|
3732
|
+
ds.session.forkChildSessionIds = [
|
|
3733
|
+
...(ds.session.forkChildSessionIds ?? []),
|
|
3734
|
+
forkResult.childSessionId,
|
|
3735
|
+
];
|
|
3736
|
+
try {
|
|
3737
|
+
sessionStore.updateSession(ds.session);
|
|
3738
|
+
}
|
|
3739
|
+
catch (err) {
|
|
3740
|
+
logger.warn(`[${logTag}] /fork --create parent lineage update failed: `
|
|
3741
|
+
+ `${err instanceof Error ? err.message : String(err)}`);
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3639
3744
|
logger.info(`[${logTag}] /fork --create completed: chat=${forkChatId} child=${forkResult.childSessionId.substring(0, 8)} bot=${targetBotAppId} (source ${ds.session.sessionId.substring(0, 8)} untouched)`);
|
|
3745
|
+
// User-visible notice + panel refresh: best-effort, AFTER lineage is
|
|
3746
|
+
// durable. A failure here (e.g. the root-message 400) must not undo the
|
|
3747
|
+
// lineage write, so swallow locally instead of letting it reach the
|
|
3748
|
+
// outer catch.
|
|
3749
|
+
try {
|
|
3750
|
+
await sessionReply(rootId, t('cmd.fork.created', { name: forkGroupName, link: forkInviteLink }, loc));
|
|
3751
|
+
}
|
|
3752
|
+
catch (err) {
|
|
3753
|
+
logger.warn(`[${logTag}] /fork --create created-notice send failed: `
|
|
3754
|
+
+ `${err instanceof Error ? err.message : String(err)}`);
|
|
3755
|
+
}
|
|
3756
|
+
try {
|
|
3757
|
+
await upsertForkPanelCard(ds, loc, { preferredReplyToMessageId: message.messageId });
|
|
3758
|
+
}
|
|
3759
|
+
catch (err) {
|
|
3760
|
+
logger.warn(`[${logTag}] /fork --create panel refresh failed: `
|
|
3761
|
+
+ `${err instanceof Error ? err.message : String(err)}`);
|
|
3762
|
+
}
|
|
3640
3763
|
break;
|
|
3641
3764
|
}
|
|
3642
3765
|
case '/forklist': {
|
|
@@ -3644,7 +3767,7 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3644
3767
|
await sessionReply(rootId, t('cmd.fork.no_session', undefined, loc));
|
|
3645
3768
|
break;
|
|
3646
3769
|
}
|
|
3647
|
-
await upsertForkPanelCard(ds, loc, { allowEmpty: true });
|
|
3770
|
+
await upsertForkPanelCard(ds, loc, { allowEmpty: true, preferredReplyToMessageId: message.messageId });
|
|
3648
3771
|
break;
|
|
3649
3772
|
}
|
|
3650
3773
|
case '/card': {
|
|
@@ -3679,28 +3802,44 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3679
3802
|
// ③ 用户在 bots.json 自定义配置的额外透传命令(customPassthroughCommands)
|
|
3680
3803
|
// ④ 文件系统自动发现的 CLI 自定义命令 / skill / 插件
|
|
3681
3804
|
// MCP 的 /mcp__<server>__<prompt> 需运行时握手才能枚举,这里仅按 .mcp.json 提示 server 名。
|
|
3805
|
+
// 展示口径必须与 resolvePassthroughCommands 的实际路由一致:既有会话按其
|
|
3806
|
+
// 冻结的 CLI(session.cliId)解析,不偷读当前 bot 配置——否则切换默认 CLI 后
|
|
3807
|
+
// 清单会与真正生效的透传集合漂移(Codex App 会话展示伪 passthrough,或旧交互
|
|
3808
|
+
// 式会话丢掉 adapter-scoped 命令)。
|
|
3682
3809
|
const botCfg = ds
|
|
3683
3810
|
? getBot(ds.larkAppId).config
|
|
3684
3811
|
: (larkAppId ? getBot(larkAppId).config : getAllBots()[0]?.config);
|
|
3685
|
-
const
|
|
3812
|
+
const effectiveCliId = (ds?.session.cliId ?? botCfg?.cliId ?? 'claude-code');
|
|
3686
3813
|
const cliName = ds
|
|
3687
3814
|
? sessionCliDisplayName(ds)
|
|
3688
|
-
: configuredRuntimeDisplayName(botCfg?.cliRuntime) ?? getCliDisplayName(
|
|
3815
|
+
: configuredRuntimeDisplayName(botCfg?.cliRuntime) ?? getCliDisplayName(effectiveCliId);
|
|
3689
3816
|
const workingDir = getSessionWorkingDir(ds);
|
|
3690
|
-
|
|
3691
|
-
|
|
3817
|
+
// Runner adapters route everything through the structured turn lane,
|
|
3818
|
+
// so they have NO passthrough surface at all — mirror
|
|
3819
|
+
// resolvePassthroughCommands's early empty return here and skip
|
|
3820
|
+
// filesystem discovery (their PTY is the runner, not an interactive
|
|
3821
|
+
// TUI that would honor those).
|
|
3822
|
+
const noPassthrough = cliHasNoRawPassthroughSurface(effectiveCliId);
|
|
3823
|
+
const builtin = noPassthrough ? [] : [...PASSTHROUGH_COMMANDS];
|
|
3824
|
+
const adapterDefaults = noPassthrough ? [] : resolveAdapterDefaultPassthroughCommands(larkAppId, effectiveCliId);
|
|
3692
3825
|
// 只展示「实际生效」的 custom 命令:用与 resolvePassthroughCommands 同一套
|
|
3693
3826
|
// normalize 过滤掉手写 bots.json 里遮蔽 daemon 命令 / 非法的项(parser 出于
|
|
3694
3827
|
// 兼容会保留它们,但路由会丢弃),避免 `/status` 之类被展示成可用却走 daemon。
|
|
3695
|
-
|
|
3828
|
+
// Codex App 无透传面,custom 也不生效 → 与路由一致清空。
|
|
3829
|
+
const custom = noPassthrough ? [] : [...new Set((botCfg?.customPassthroughCommands ?? [])
|
|
3696
3830
|
.map(normalizePassthroughCommand)
|
|
3697
3831
|
.filter((c) => !!c))];
|
|
3832
|
+
// 文件发现按有效会话 CLI 解析;跨 CLI(冻结 ≠ 当前配置)时不套用当前配置的
|
|
3833
|
+
// cliPathOverride(它属于另一个 CLI)。Codex App 直接跳过发现。
|
|
3834
|
+
const adapterPathOverride = effectiveCliId === botCfg?.cliId ? botCfg?.cliPathOverride : undefined;
|
|
3698
3835
|
let cliAdapter;
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3836
|
+
if (!noPassthrough) {
|
|
3837
|
+
try {
|
|
3838
|
+
cliAdapter = createCliAdapterSync(effectiveCliId, adapterPathOverride);
|
|
3839
|
+
}
|
|
3840
|
+
catch (err) {
|
|
3841
|
+
logger.warn(`[${logTag}] /list-slash-command could not create adapter for ${effectiveCliId}: ${err instanceof Error ? err.message : String(err)}`);
|
|
3842
|
+
}
|
|
3704
3843
|
}
|
|
3705
3844
|
const discoverySupported = supportsFilesystemCommandDiscovery(cliAdapter);
|
|
3706
3845
|
const discovered = cliAdapter && discoverySupported
|
|
@@ -3719,7 +3858,7 @@ export async function handleCommand(cmd, rootId, message, deps, larkAppId) {
|
|
|
3719
3858
|
? sessionCliDisplayName(ds)
|
|
3720
3859
|
: configuredRuntimeDisplayName(botCfg?.cliRuntime)
|
|
3721
3860
|
?? getCliDisplayName(botCfg?.cliId ?? 'claude-code');
|
|
3722
|
-
const passthroughCommands = [...resolvePassthroughCommands(helpAppId)];
|
|
3861
|
+
const passthroughCommands = [...resolvePassthroughCommands(helpAppId, ds?.session.cliId)];
|
|
3723
3862
|
const help = [
|
|
3724
3863
|
t('help.heading_session', undefined, loc),
|
|
3725
3864
|
t('help.close', { cliName }, loc),
|
|
@@ -4267,9 +4406,13 @@ async function upsertForkPanelCard(parentDs, loc, opts) {
|
|
|
4267
4406
|
.map(session => ({
|
|
4268
4407
|
instruction: session.forkTaskText ?? session.title,
|
|
4269
4408
|
status: (session.status === 'active' ? 'active' : 'closed'),
|
|
4409
|
+
// Link to the child's OWN chat: a sub-topic fork shares the parent chat and
|
|
4410
|
+
// carries a larkThreadId (deep-link into that topic); a --create fork lives
|
|
4411
|
+
// in its own new group (different chatId, no thread) so the link must use
|
|
4412
|
+
// the child's chatId, not the parent's, or it would point back here.
|
|
4270
4413
|
link: session.larkThreadId
|
|
4271
|
-
? threadAppLink(chatId, session.larkThreadId, brand)
|
|
4272
|
-
: chatAppLink(chatId, brand),
|
|
4414
|
+
? threadAppLink(session.chatId ?? chatId, session.larkThreadId, brand)
|
|
4415
|
+
: chatAppLink(session.chatId ?? chatId, brand),
|
|
4273
4416
|
}));
|
|
4274
4417
|
if (children.length === 0 && !opts?.allowEmpty)
|
|
4275
4418
|
return;
|
|
@@ -4283,13 +4426,64 @@ async function upsertForkPanelCard(parentDs, loc, opts) {
|
|
|
4283
4426
|
// fresh panel is still more useful than keeping the command silent.
|
|
4284
4427
|
}
|
|
4285
4428
|
}
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4429
|
+
// Post the panel. Primary: reply-in-thread to the session's root message so
|
|
4430
|
+
// the panel anchors to this conversation. Fallback: if that reply fails (the
|
|
4431
|
+
// most common cause is the root message aging past Lark's reply window —
|
|
4432
|
+
// surfaces as HTTP 400 — but also covers a withdrawn root), post the card flat
|
|
4433
|
+
// to the chat instead. The panel IS the user-visible output of /forklist, so a
|
|
4434
|
+
// swallowed failure looks like the command silently did nothing; the flat send
|
|
4435
|
+
// keeps it visible. Only if BOTH transports fail do we give up (and warn).
|
|
4436
|
+
const cardBody = buildForkPanelCard(children, loc);
|
|
4437
|
+
// Reply targets are tried in order, then a flat send as the last resort:
|
|
4438
|
+
// 1) the FRESH triggering command message (when /forklist or /fork passes
|
|
4439
|
+
// it) — a just-arrived message is never past Lark's reply window, and in
|
|
4440
|
+
// a 话题群 it keeps the panel inside the current topic;
|
|
4441
|
+
// 2) the session root message — the historical target, but it can age past
|
|
4442
|
+
// the reply window (HTTP 400) or be withdrawn;
|
|
4443
|
+
// 3) a flat chat sendMessage — always delivers, though in a 话题群 it starts
|
|
4444
|
+
// a new sibling topic rather than threading. The panel is the user-visible
|
|
4445
|
+
// output of /forklist, so a visible-but-flat panel beats silent nothing.
|
|
4446
|
+
const replyTargets = [];
|
|
4447
|
+
if (opts?.preferredReplyToMessageId)
|
|
4448
|
+
replyTargets.push(opts.preferredReplyToMessageId);
|
|
4449
|
+
if (parentDs.session.rootMessageId
|
|
4450
|
+
&& parentDs.session.rootMessageId !== opts?.preferredReplyToMessageId) {
|
|
4451
|
+
replyTargets.push(parentDs.session.rootMessageId);
|
|
4290
4452
|
}
|
|
4291
|
-
|
|
4292
|
-
|
|
4453
|
+
let cardId;
|
|
4454
|
+
for (const target of replyTargets) {
|
|
4455
|
+
try {
|
|
4456
|
+
cardId = await replyMessage(appId, target, cardBody, 'interactive', true);
|
|
4457
|
+
break;
|
|
4458
|
+
}
|
|
4459
|
+
catch (replyErr) {
|
|
4460
|
+
logger.warn(`[fork-panel] reply to ${target} failed `
|
|
4461
|
+
+ `(${replyErr instanceof Error ? replyErr.message : replyErr})`);
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4464
|
+
if (!cardId) {
|
|
4465
|
+
logger.warn('[fork-panel] all reply targets failed; falling back to a flat chat message');
|
|
4466
|
+
try {
|
|
4467
|
+
cardId = await sendMessage(appId, chatId, cardBody, 'interactive');
|
|
4468
|
+
}
|
|
4469
|
+
catch (sendErr) {
|
|
4470
|
+
logger.warn(`[fork-panel] failed to post panel card via both reply and flat send: `
|
|
4471
|
+
+ `${sendErr instanceof Error ? sendErr.message : sendErr}`);
|
|
4472
|
+
}
|
|
4473
|
+
}
|
|
4474
|
+
if (cardId) {
|
|
4475
|
+
// Local guard: a write-store failure here must not bubble to /forklist's
|
|
4476
|
+
// outer catch (which would look like the command errored even though the
|
|
4477
|
+
// panel already posted). Losing only the stale-card id just means the next
|
|
4478
|
+
// /forklist can't delete the previous panel — a benign duplicate at worst.
|
|
4479
|
+
parentDs.session.forkPanelCardId = cardId;
|
|
4480
|
+
try {
|
|
4481
|
+
sessionStore.updateSession(parentDs.session);
|
|
4482
|
+
}
|
|
4483
|
+
catch (err) {
|
|
4484
|
+
logger.warn(`[fork-panel] persist forkPanelCardId failed: `
|
|
4485
|
+
+ `${err instanceof Error ? err.message : String(err)}`);
|
|
4486
|
+
}
|
|
4293
4487
|
}
|
|
4294
4488
|
}
|
|
4295
4489
|
//# sourceMappingURL=command-handler.js.map
|