botmux 2.104.0 → 2.105.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +10 -10
- package/README.md +10 -10
- package/dist/adapters/backend/sandbox.d.ts +5 -1
- package/dist/adapters/backend/sandbox.d.ts.map +1 -1
- package/dist/adapters/backend/sandbox.js +54 -5
- package/dist/adapters/backend/sandbox.js.map +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.d.ts +1 -1
- package/dist/adapters/backend/tmux-pipe-backend.js +1 -1
- package/dist/adapters/backend/zellij-observe-backend.d.ts +1 -1
- package/dist/adapters/backend/zellij-observe-backend.js +1 -1
- package/dist/adapters/cli/claude-code.d.ts +1 -1
- package/dist/adapters/cli/read-isolation.d.ts +2 -1
- package/dist/adapters/cli/read-isolation.d.ts.map +1 -1
- package/dist/adapters/cli/read-isolation.js +51 -4
- package/dist/adapters/cli/read-isolation.js.map +1 -1
- package/dist/adapters/cli/relay.d.ts +2 -2
- package/dist/adapters/cli/relay.js +2 -2
- package/dist/adapters/cli/seed.d.ts +2 -2
- package/dist/adapters/cli/seed.js +2 -2
- package/dist/adapters/cli/shared-hints.d.ts.map +1 -1
- package/dist/adapters/cli/shared-hints.js +1 -0
- package/dist/adapters/cli/shared-hints.js.map +1 -1
- package/dist/bot-registry.d.ts +65 -1
- package/dist/bot-registry.d.ts.map +1 -1
- package/dist/bot-registry.js +145 -0
- package/dist/bot-registry.js.map +1 -1
- package/dist/cli/send-dispatch.d.ts +44 -0
- package/dist/cli/send-dispatch.d.ts.map +1 -1
- package/dist/cli/send-dispatch.js +79 -0
- package/dist/cli/send-dispatch.js.map +1 -1
- package/dist/cli/vc-agent.d.ts +2 -0
- package/dist/cli/vc-agent.d.ts.map +1 -0
- package/dist/cli/vc-agent.js +331 -0
- package/dist/cli/vc-agent.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +125 -24
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +13 -1
- package/dist/config.js.map +1 -1
- package/dist/core/auto-start.d.ts +2 -2
- package/dist/core/auto-start.js +2 -2
- package/dist/core/command-handler.d.ts.map +1 -1
- package/dist/core/command-handler.js +2 -1
- package/dist/core/command-handler.js.map +1 -1
- package/dist/core/dashboard-events.d.ts +5 -0
- package/dist/core/dashboard-events.d.ts.map +1 -1
- package/dist/core/dashboard-events.js.map +1 -1
- package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
- package/dist/core/dashboard-ipc-server.js +47 -2
- package/dist/core/dashboard-ipc-server.js.map +1 -1
- package/dist/core/idle-worker-sweeper.d.ts +1 -1
- package/dist/core/idle-worker-sweeper.js +1 -1
- package/dist/core/passthrough-commands.d.ts.map +1 -1
- package/dist/core/passthrough-commands.js +1 -0
- package/dist/core/passthrough-commands.js.map +1 -1
- package/dist/core/scheduler.d.ts +12 -0
- package/dist/core/scheduler.d.ts.map +1 -1
- package/dist/core/scheduler.js +67 -7
- package/dist/core/scheduler.js.map +1 -1
- package/dist/core/session-discovery.js +1 -1
- package/dist/core/session-discovery.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +55 -10
- 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 +78 -23
- package/dist/core/trigger-session.js.map +1 -1
- package/dist/core/types.d.ts +3 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/worker-pool.d.ts +8 -1
- package/dist/core/worker-pool.d.ts.map +1 -1
- package/dist/core/worker-pool.js +31 -9
- package/dist/core/worker-pool.js.map +1 -1
- package/dist/core/zellij-adopt-discovery.js +1 -1
- package/dist/core/zellij-adopt-discovery.js.map +1 -1
- package/dist/daemon.d.ts +121 -0
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +2644 -2
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/federated-group-core.js +1 -1
- package/dist/dashboard/federated-group-core.js.map +1 -1
- package/dist/dashboard/federation-api.js +1 -1
- package/dist/dashboard/schedule-card-model.d.ts +4 -3
- package/dist/dashboard/schedule-card-model.d.ts.map +1 -1
- package/dist/dashboard/schedule-card-model.js +5 -4
- package/dist/dashboard/schedule-card-model.js.map +1 -1
- package/dist/dashboard/settings-write-applier.d.ts +37 -3
- package/dist/dashboard/settings-write-applier.d.ts.map +1 -1
- package/dist/dashboard/settings-write-applier.js +63 -0
- package/dist/dashboard/settings-write-applier.js.map +1 -1
- package/dist/dashboard/web/i18n.d.ts.map +1 -1
- package/dist/dashboard/web/i18n.js +28 -0
- package/dist/dashboard/web/i18n.js.map +1 -1
- package/dist/dashboard/web/insights.js +19 -19
- package/dist/dashboard/web/insights.js.map +1 -1
- package/dist/dashboard/web/overview-page.d.ts.map +1 -1
- package/dist/dashboard/web/overview-page.js +7 -4
- package/dist/dashboard/web/overview-page.js.map +1 -1
- package/dist/dashboard/web/schedules-page.d.ts +1 -1
- package/dist/dashboard/web/schedules-page.d.ts.map +1 -1
- package/dist/dashboard/web/schedules-page.js +7 -3
- package/dist/dashboard/web/schedules-page.js.map +1 -1
- package/dist/dashboard/web/sessions.js +2 -2
- package/dist/dashboard/web/settings-page.d.ts +9 -0
- package/dist/dashboard/web/settings-page.d.ts.map +1 -1
- package/dist/dashboard/web/settings-page.js +132 -43
- package/dist/dashboard/web/settings-page.js.map +1 -1
- package/dist/dashboard/web/store.d.ts +6 -0
- package/dist/dashboard/web/store.d.ts.map +1 -1
- package/dist/dashboard/web/store.js +18 -1
- package/dist/dashboard/web/store.js.map +1 -1
- package/dist/dashboard/webhook-routes.d.ts.map +1 -1
- package/dist/dashboard/webhook-routes.js +24 -0
- package/dist/dashboard/webhook-routes.js.map +1 -1
- package/dist/dashboard-web/app.js +3 -3
- package/dist/dashboard-web/chunks/{bot-defaults-page-Z36I5CKM.js → bot-defaults-page-3OIY7N76.js} +1 -1
- package/dist/dashboard-web/chunks/{chunk-2BBCKWNO.js → chunk-BNEXMNQD.js} +3 -3
- package/dist/dashboard-web/chunks/{chunk-QDKIUULH.js → chunk-DKKOGZCG.js} +1 -1
- package/dist/dashboard-web/chunks/chunk-LXIK7OUJ.js +1 -0
- package/dist/dashboard-web/chunks/{chunk-BAMNP73K.js → chunk-VFCACTRF.js} +1 -1
- package/dist/dashboard-web/chunks/{connectors-I3MGERCM.js → connectors-VDOAKUW3.js} +1 -1
- package/dist/dashboard-web/chunks/{groups-page-DTP2L4FQ.js → groups-page-CX5AN4XG.js} +1 -1
- package/dist/dashboard-web/chunks/{insights-page-FNI24WYF.js → insights-page-DOMRL4S6.js} +1 -1
- package/dist/dashboard-web/chunks/overview-page-AZBAXVZ7.js +1 -0
- package/dist/dashboard-web/chunks/{roles-page-A5DZ7Q6U.js → roles-page-3FEAH6S4.js} +1 -1
- package/dist/dashboard-web/chunks/schedules-CTQEA7IE.js +1 -0
- package/dist/dashboard-web/chunks/{sessions-YJ735IH4.js → sessions-LVZCXO2Z.js} +1 -1
- package/dist/dashboard-web/chunks/{sessions-page-2REIJ56C.js → sessions-page-NHBJDSBC.js} +1 -1
- package/dist/dashboard-web/chunks/settings-page-CRDIHRNE.js +2 -0
- package/dist/dashboard-web/chunks/{skills-page-ZCCLHWMJ.js → skills-page-VUG3EPWX.js} +1 -1
- package/dist/dashboard-web/chunks/{team-federation-page-4FCGO3WW.js → team-federation-page-ZKL3YMGN.js} +1 -1
- package/dist/dashboard-web/chunks/{workflows-KFJ7O57L.js → workflows-4BYQQBFP.js} +1 -1
- package/dist/dashboard-web/index.html +1 -1
- package/dist/dashboard-web/style.css +111 -16
- package/dist/dashboard.js +196 -2
- package/dist/dashboard.js.map +1 -1
- package/dist/global-config.d.ts +30 -0
- package/dist/global-config.d.ts.map +1 -1
- package/dist/global-config.js +64 -1
- package/dist/global-config.js.map +1 -1
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +10 -7
- package/dist/i18n/en.js.map +1 -1
- package/dist/i18n/zh.d.ts.map +1 -1
- package/dist/i18n/zh.js +10 -7
- package/dist/i18n/zh.js.map +1 -1
- package/dist/im/lark/card-builder.d.ts +1 -1
- package/dist/im/lark/card-builder.js +1 -1
- package/dist/im/lark/card-handler.d.ts +3 -0
- package/dist/im/lark/card-handler.d.ts.map +1 -1
- package/dist/im/lark/card-handler.js +8 -0
- package/dist/im/lark/card-handler.js.map +1 -1
- package/dist/im/lark/client.d.ts +1 -0
- package/dist/im/lark/client.d.ts.map +1 -1
- package/dist/im/lark/client.js +19 -0
- package/dist/im/lark/client.js.map +1 -1
- package/dist/im/lark/event-dispatcher.d.ts +10 -0
- package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
- package/dist/im/lark/event-dispatcher.js +100 -21
- package/dist/im/lark/event-dispatcher.js.map +1 -1
- package/dist/im/lark/grant-command.d.ts +1 -1
- package/dist/im/lark/grant-command.js +1 -1
- package/dist/im/lark/workflow-slash-command.js +4 -0
- package/dist/im/lark/workflow-slash-command.js.map +1 -1
- package/dist/mir-prompt.d.ts +16 -0
- package/dist/mir-prompt.d.ts.map +1 -0
- package/dist/mir-prompt.js +170 -0
- package/dist/mir-prompt.js.map +1 -0
- package/dist/mir-runner.js +1 -149
- package/dist/mir-runner.js.map +1 -1
- package/dist/platform/bind.d.ts.map +1 -1
- package/dist/platform/bind.js +3 -11
- package/dist/platform/bind.js.map +1 -1
- package/dist/platform/binding.d.ts +4 -5
- package/dist/platform/binding.d.ts.map +1 -1
- package/dist/platform/binding.js +0 -11
- package/dist/platform/binding.js.map +1 -1
- package/dist/platform/tunnel-client.d.ts.map +1 -1
- package/dist/platform/tunnel-client.js +37 -28
- package/dist/platform/tunnel-client.js.map +1 -1
- package/dist/services/deployment-identity.d.ts +1 -1
- package/dist/services/deployment-identity.d.ts.map +1 -1
- package/dist/services/deployment-identity.js +1 -1
- package/dist/services/deployment-identity.js.map +1 -1
- package/dist/services/doc-subs-store.js +1 -1
- package/dist/services/team-board-store.js +1 -1
- package/dist/services/team-board-store.js.map +1 -1
- package/dist/services/trigger-types.d.ts +2 -1
- package/dist/services/trigger-types.d.ts.map +1 -1
- package/dist/services/trigger-types.js +11 -2
- package/dist/services/trigger-types.js.map +1 -1
- package/dist/services/vc-meeting-runtime-store.d.ts +55 -0
- package/dist/services/vc-meeting-runtime-store.d.ts.map +1 -0
- package/dist/services/vc-meeting-runtime-store.js +313 -0
- package/dist/services/vc-meeting-runtime-store.js.map +1 -0
- package/dist/services/voice/index.d.ts +6 -1
- package/dist/services/voice/index.d.ts.map +1 -1
- package/dist/services/voice/index.js +12 -5
- package/dist/services/voice/index.js.map +1 -1
- package/dist/services/voice/sami.js +1 -1
- package/dist/setup/lark-scopes.json +5 -0
- package/dist/setup/verify-permissions.d.ts +6 -0
- package/dist/setup/verify-permissions.d.ts.map +1 -1
- package/dist/setup/verify-permissions.js +17 -0
- package/dist/setup/verify-permissions.js.map +1 -1
- package/dist/skills/definitions.d.ts.map +1 -1
- package/dist/skills/definitions.js +10 -0
- package/dist/skills/definitions.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/daemon-discovery.d.ts +2 -0
- package/dist/utils/daemon-discovery.d.ts.map +1 -1
- package/dist/utils/daemon-discovery.js +2 -0
- package/dist/utils/daemon-discovery.js.map +1 -1
- package/dist/utils/timezone.d.ts +51 -0
- package/dist/utils/timezone.d.ts.map +1 -0
- package/dist/utils/timezone.js +110 -0
- package/dist/utils/timezone.js.map +1 -0
- package/dist/vc-agent/cards.d.ts +47 -0
- package/dist/vc-agent/cards.d.ts.map +1 -0
- package/dist/vc-agent/cards.js +489 -0
- package/dist/vc-agent/cards.js.map +1 -0
- package/dist/vc-agent/meeting-state.d.ts +39 -0
- package/dist/vc-agent/meeting-state.d.ts.map +1 -0
- package/dist/vc-agent/meeting-state.js +186 -0
- package/dist/vc-agent/meeting-state.js.map +1 -0
- package/dist/vc-agent/normalizer.d.ts +13 -0
- package/dist/vc-agent/normalizer.d.ts.map +1 -0
- package/dist/vc-agent/normalizer.js +411 -0
- package/dist/vc-agent/normalizer.js.map +1 -0
- package/dist/vc-agent/polling-source.d.ts +36 -0
- package/dist/vc-agent/polling-source.d.ts.map +1 -0
- package/dist/vc-agent/polling-source.js +129 -0
- package/dist/vc-agent/polling-source.js.map +1 -0
- package/dist/vc-agent/push-source.d.ts +13 -0
- package/dist/vc-agent/push-source.d.ts.map +1 -0
- package/dist/vc-agent/push-source.js +109 -0
- package/dist/vc-agent/push-source.js.map +1 -0
- package/dist/vc-agent/realtime/audio-source.d.ts +6 -0
- package/dist/vc-agent/realtime/audio-source.d.ts.map +1 -0
- package/dist/vc-agent/realtime/audio-source.js +17 -0
- package/dist/vc-agent/realtime/audio-source.js.map +1 -0
- package/dist/vc-agent/realtime/endpoint.d.ts +6 -0
- package/dist/vc-agent/realtime/endpoint.d.ts.map +1 -0
- package/dist/vc-agent/realtime/endpoint.js +25 -0
- package/dist/vc-agent/realtime/endpoint.js.map +1 -0
- package/dist/vc-agent/realtime/errors.d.ts +9 -0
- package/dist/vc-agent/realtime/errors.d.ts.map +1 -0
- package/dist/vc-agent/realtime/errors.js +17 -0
- package/dist/vc-agent/realtime/errors.js.map +1 -0
- package/dist/vc-agent/realtime/events.d.ts +24 -0
- package/dist/vc-agent/realtime/events.d.ts.map +1 -0
- package/dist/vc-agent/realtime/events.js +190 -0
- package/dist/vc-agent/realtime/events.js.map +1 -0
- package/dist/vc-agent/realtime/frontier.d.ts +34 -0
- package/dist/vc-agent/realtime/frontier.d.ts.map +1 -0
- package/dist/vc-agent/realtime/frontier.js +40 -0
- package/dist/vc-agent/realtime/frontier.js.map +1 -0
- package/dist/vc-agent/realtime/index.d.ts +11 -0
- package/dist/vc-agent/realtime/index.d.ts.map +1 -0
- package/dist/vc-agent/realtime/index.js +11 -0
- package/dist/vc-agent/realtime/index.js.map +1 -0
- package/dist/vc-agent/realtime/pacer.d.ts +21 -0
- package/dist/vc-agent/realtime/pacer.d.ts.map +1 -0
- package/dist/vc-agent/realtime/pacer.js +80 -0
- package/dist/vc-agent/realtime/pacer.js.map +1 -0
- package/dist/vc-agent/realtime/protobuf.d.ts +33 -0
- package/dist/vc-agent/realtime/protobuf.d.ts.map +1 -0
- package/dist/vc-agent/realtime/protobuf.js +159 -0
- package/dist/vc-agent/realtime/protobuf.js.map +1 -0
- package/dist/vc-agent/realtime/protocol.d.ts +4 -0
- package/dist/vc-agent/realtime/protocol.d.ts.map +1 -0
- package/dist/vc-agent/realtime/protocol.js +59 -0
- package/dist/vc-agent/realtime/protocol.js.map +1 -0
- package/dist/vc-agent/realtime/session.d.ts +39 -0
- package/dist/vc-agent/realtime/session.d.ts.map +1 -0
- package/dist/vc-agent/realtime/session.js +221 -0
- package/dist/vc-agent/realtime/session.js.map +1 -0
- package/dist/vc-agent/realtime/transport.d.ts +23 -0
- package/dist/vc-agent/realtime/transport.d.ts.map +1 -0
- package/dist/vc-agent/realtime/transport.js +112 -0
- package/dist/vc-agent/realtime/transport.js.map +1 -0
- package/dist/vc-agent/realtime/types.d.ts +84 -0
- package/dist/vc-agent/realtime/types.d.ts.map +1 -0
- package/dist/vc-agent/realtime/types.js +5 -0
- package/dist/vc-agent/realtime/types.js.map +1 -0
- package/dist/vc-agent/types.d.ts +142 -0
- package/dist/vc-agent/types.d.ts.map +1 -0
- package/dist/vc-agent/types.js +2 -0
- package/dist/vc-agent/types.js.map +1 -0
- package/dist/worker.js +8 -5
- package/dist/worker.js.map +1 -1
- package/dist/workflows/attempt-resume.d.ts +4 -0
- package/dist/workflows/attempt-resume.d.ts.map +1 -1
- package/dist/workflows/attempt-resume.js +2 -0
- package/dist/workflows/attempt-resume.js.map +1 -1
- package/dist/workflows/attempt-terminal.d.ts +4 -0
- package/dist/workflows/attempt-terminal.d.ts.map +1 -1
- package/dist/workflows/attempt-terminal.js.map +1 -1
- package/dist/workflows/daemon-spawn.d.ts.map +1 -1
- package/dist/workflows/daemon-spawn.js +7 -0
- package/dist/workflows/daemon-spawn.js.map +1 -1
- package/dist/workflows/definition.d.ts +14 -14
- package/dist/workflows/events/payloads.d.ts +40 -8
- package/dist/workflows/events/payloads.d.ts.map +1 -1
- package/dist/workflows/events/payloads.js +4 -0
- package/dist/workflows/events/payloads.js.map +1 -1
- package/dist/workflows/events/schema.d.ts +508 -452
- package/dist/workflows/events/schema.d.ts.map +1 -1
- package/dist/workflows/runtime.d.ts +4 -0
- package/dist/workflows/runtime.d.ts.map +1 -1
- package/dist/workflows/runtime.js.map +1 -1
- package/dist/workflows/spawn-policy.d.ts +14 -0
- package/dist/workflows/spawn-policy.d.ts.map +1 -0
- package/dist/workflows/spawn-policy.js +9 -0
- package/dist/workflows/spawn-policy.js.map +1 -0
- package/dist/workflows/v3/bot-resolve.d.ts.map +1 -1
- package/dist/workflows/v3/bot-resolve.js +4 -0
- package/dist/workflows/v3/bot-resolve.js.map +1 -1
- package/dist/workflows/v3/cli-run.d.ts.map +1 -1
- package/dist/workflows/v3/cli-run.js +4 -0
- package/dist/workflows/v3/cli-run.js.map +1 -1
- package/dist/workflows/v3/contract.d.ts +9 -3
- package/dist/workflows/v3/contract.d.ts.map +1 -1
- package/dist/workflows/v3/contract.js +3 -3
- package/dist/workflows/v3/contract.js.map +1 -1
- package/dist/workflows/v3/ephemeral-pool.d.ts.map +1 -1
- package/dist/workflows/v3/ephemeral-pool.js +2 -0
- package/dist/workflows/v3/ephemeral-pool.js.map +1 -1
- package/dist/workflows/v3/runtime.js +1 -1
- package/dist/workflows/v3/runtime.js.map +1 -1
- package/package.json +1 -1
- package/dist/dashboard-web/chunks/chunk-76J7PNZI.js +0 -1
- package/dist/dashboard-web/chunks/overview-page-EHCZJBWY.js +0 -1
- package/dist/dashboard-web/chunks/schedules-RSXALJU4.js +0 -1
- package/dist/dashboard-web/chunks/settings-page-XKFTXTDE.js +0 -2
package/dist/cli.js
CHANGED
|
@@ -40,9 +40,10 @@ import { buildBotFromAddFlags, editInputFromFlags, isScriptedSetupInvocation, ma
|
|
|
40
40
|
import { interactiveSelect, pickChoice, pickCliSelection } from './setup/interactive-select.js';
|
|
41
41
|
import { buildPreset, serializePreset, presetFilename } from './setup/agent-preset.js';
|
|
42
42
|
import { logger } from './utils/logger.js';
|
|
43
|
+
import { scheduleTimeZone } from './utils/timezone.js';
|
|
43
44
|
import { expandHomePath, invalidWorkingDirs } from './utils/working-dir.js';
|
|
44
45
|
import { firstPositional } from './cli/arg-utils.js';
|
|
45
|
-
import { dispatchPrimaryMessage, findStdinAliasAttachment, sendFileAttachments } from './cli/send-dispatch.js';
|
|
46
|
+
import { dispatchPrimaryMessage, findStdinAliasAttachment, sendFileAttachments, sendVideoAttachments, shouldSendAsPureVideo, validateVideoAttachments } from './cli/send-dispatch.js';
|
|
46
47
|
import { buildPm2SpawnCommand } from './cli/pm2-command.js';
|
|
47
48
|
import { callDashboard } from './cli/dashboard-endpoint.js';
|
|
48
49
|
import { npmGlobalUpdateCwd } from './core/maintenance.js';
|
|
@@ -3458,6 +3459,8 @@ botmux v${getVersion()} — IM ↔ AI 编程 CLI 桥接
|
|
|
3458
3459
|
voice 配置语音总结(高级功能,独立于 setup)— 交互式填 TTS 引擎+凭证
|
|
3459
3460
|
voice status 查看当前语音配置(凭证打码)
|
|
3460
3461
|
voice disable 关闭语音功能(移除配置)
|
|
3462
|
+
vc-agent tat-gate|poll
|
|
3463
|
+
飞书会议智能体 P0:校验 TAT 会中事件读取、轮询会议事件并触发 workflow
|
|
3461
3464
|
whiteboard status|enable|disable
|
|
3462
3465
|
本地项目白板(默认关闭;enable 只打开能力,不创建白板)
|
|
3463
3466
|
current --create / list / read / update / write --yes
|
|
@@ -3474,6 +3477,8 @@ botmux v${getVersion()} — IM ↔ AI 编程 CLI 桥接
|
|
|
3474
3477
|
send [content] 发消息到当前话题(支持 stdin / --content-file)
|
|
3475
3478
|
--images <path> 内联图片(可重复)
|
|
3476
3479
|
--files <path> 附件(可重复)
|
|
3480
|
+
--videos <path> 视频预览 MP4(可重复,需配套 --video-covers)
|
|
3481
|
+
--video-covers <path> 视频封面图片(可重复,按顺序对应 --videos)
|
|
3477
3482
|
--mention <open_id:name> @提及(可重复)
|
|
3478
3483
|
--mention-back @回本轮触发消息的发送者(open_id 自动取自会话)
|
|
3479
3484
|
--no-mention 明确声明本条不@任何人
|
|
@@ -3898,8 +3903,8 @@ async function cmdSchedule(sub, rest) {
|
|
|
3898
3903
|
console.log(`定时任务 (${filtered.length}${filter ? '/' + tasks.length : ''}):\n`);
|
|
3899
3904
|
for (const t of filtered) {
|
|
3900
3905
|
const status = t.enabled ? '✅' : '⏸️';
|
|
3901
|
-
const next = t.nextRunAt ? new Date(t.nextRunAt).toLocaleString('zh-CN', { timeZone:
|
|
3902
|
-
const last = t.lastRunAt ? new Date(t.lastRunAt).toLocaleString('zh-CN', { timeZone:
|
|
3906
|
+
const next = t.nextRunAt ? new Date(t.nextRunAt).toLocaleString('zh-CN', { timeZone: scheduleTimeZone() }) : '—';
|
|
3907
|
+
const last = t.lastRunAt ? new Date(t.lastRunAt).toLocaleString('zh-CN', { timeZone: scheduleTimeZone() }) : '—';
|
|
3903
3908
|
const display = t.parsed?.display ?? t.schedule;
|
|
3904
3909
|
const prompt = t.prompt ?? '';
|
|
3905
3910
|
const chatId = t.chatId ?? '—';
|
|
@@ -3961,7 +3966,7 @@ async function cmdSchedule(sub, rest) {
|
|
|
3961
3966
|
chatType: cur?.chatType === 'p2p' ? 'p2p' : 'topic_group',
|
|
3962
3967
|
deliver,
|
|
3963
3968
|
});
|
|
3964
|
-
const next = task.nextRunAt ? new Date(task.nextRunAt).toLocaleString('zh-CN', { timeZone:
|
|
3969
|
+
const next = task.nextRunAt ? new Date(task.nextRunAt).toLocaleString('zh-CN', { timeZone: scheduleTimeZone() }) : '—';
|
|
3965
3970
|
console.log(`✅ 已创建定时任务 [${task.id}] ${task.name}`);
|
|
3966
3971
|
console.log(` 规则: ${parsed.display}`);
|
|
3967
3972
|
console.log(` 下次执行: ${next}`);
|
|
@@ -4167,6 +4172,11 @@ async function cmdQuoted(rest) {
|
|
|
4167
4172
|
console.error('用法: botmux quoted <message_id> [--session-id <id>]');
|
|
4168
4173
|
process.exit(1);
|
|
4169
4174
|
}
|
|
4175
|
+
// Read isolation: register this bot from its own send-cred file so the Lark
|
|
4176
|
+
// client (getMessageDetail below) is available WITHOUT reading the denied
|
|
4177
|
+
// bots.json — same as cmdHistory / cmdSend. Missing this was why a sandboxed
|
|
4178
|
+
// isolated bot's `botmux quoted` failed "Bot not registered".
|
|
4179
|
+
await registerSelfFromCredFile();
|
|
4170
4180
|
const { larkAppId: appId } = await resolveSessionAppId(sessionIdArg);
|
|
4171
4181
|
const { getMessageDetail } = await import('./im/lark/client.js');
|
|
4172
4182
|
const { expandMergeForward } = await import('./im/lark/merge-forward.js');
|
|
@@ -4190,6 +4200,20 @@ async function cmdQuoted(rest) {
|
|
|
4190
4200
|
if (merged)
|
|
4191
4201
|
rendered.content = merged.text;
|
|
4192
4202
|
}
|
|
4203
|
+
// The referenced message's file/media resources arrive as key+name only. A
|
|
4204
|
+
// read-isolated agent can't call the Lark resource API itself (bots.json
|
|
4205
|
+
// creds are deny-read), so download the bytes HERE — via the bot client
|
|
4206
|
+
// registered above — into this bot's OWN attachment bucket
|
|
4207
|
+
// (attachments/<appId>/<messageId>/, read-allowed by its carve-out; sandbox
|
|
4208
|
+
// denies file *reads*, not writes). Surface the local paths so the agent can
|
|
4209
|
+
// actually open the file instead of only seeing its key.
|
|
4210
|
+
if (rendered.resources?.length) {
|
|
4211
|
+
const { downloadResources } = await import('./core/session-manager.js');
|
|
4212
|
+
const { attachments, needLogin } = await downloadResources(appId, messageId, rendered.resources);
|
|
4213
|
+
rendered.attachments = attachments;
|
|
4214
|
+
if (needLogin)
|
|
4215
|
+
rendered.needLogin = true;
|
|
4216
|
+
}
|
|
4193
4217
|
console.log(JSON.stringify(rendered, null, 2));
|
|
4194
4218
|
}
|
|
4195
4219
|
catch (err) {
|
|
@@ -4275,17 +4299,28 @@ async function relaySend(rest, relayDir) {
|
|
|
4275
4299
|
const contentBase = `${id}.content`;
|
|
4276
4300
|
const cfile = join(relayDir, contentBase);
|
|
4277
4301
|
writeFileSync(cfile, content);
|
|
4278
|
-
// Copy
|
|
4279
|
-
const
|
|
4280
|
-
for (const p of argValues(rest, '--image', '--images', '--file', '--files')) {
|
|
4302
|
+
// Copy attachments into the outbox; carry only basenames.
|
|
4303
|
+
const copyOutboxAttachment = (p, out) => {
|
|
4281
4304
|
if (!p || !existsSync(p))
|
|
4282
|
-
|
|
4305
|
+
return;
|
|
4283
4306
|
const base = `${id}-${randomBytes(4).toString('hex')}-${basename(p)}`;
|
|
4284
4307
|
try {
|
|
4285
4308
|
writeFileSync(join(relayDir, base), readFileSync(p));
|
|
4286
|
-
|
|
4309
|
+
out.push(base);
|
|
4287
4310
|
}
|
|
4288
4311
|
catch { /* skip unreadable */ }
|
|
4312
|
+
};
|
|
4313
|
+
const attachments = [];
|
|
4314
|
+
for (const p of argValues(rest, '--image', '--images', '--file', '--files')) {
|
|
4315
|
+
copyOutboxAttachment(p, attachments);
|
|
4316
|
+
}
|
|
4317
|
+
const videos = [];
|
|
4318
|
+
for (const p of argValues(rest, '--video', '--videos')) {
|
|
4319
|
+
copyOutboxAttachment(p, videos);
|
|
4320
|
+
}
|
|
4321
|
+
const videoCovers = [];
|
|
4322
|
+
for (const p of argValues(rest, '--video-cover', '--video-covers')) {
|
|
4323
|
+
copyOutboxAttachment(p, videoCovers);
|
|
4289
4324
|
}
|
|
4290
4325
|
// Forward only presentation flags (must match the watcher's allowlist); path,
|
|
4291
4326
|
// routing (--chat-id/--into/--top-level) and --session-id flags are dropped —
|
|
@@ -4303,7 +4338,7 @@ async function relaySend(rest, relayDir) {
|
|
|
4303
4338
|
}
|
|
4304
4339
|
// 原子写:req.json 是 host watcher 的触发文件,rename 让它「完整出现」,
|
|
4305
4340
|
// watcher 永远不会读到半截 JSON(tmp 后缀不匹配 .req.json 过滤)。
|
|
4306
|
-
atomicWriteFileSync(join(relayDir, `${id}.req.json`), JSON.stringify({ contentFile: contentBase, attachments, flags }));
|
|
4341
|
+
atomicWriteFileSync(join(relayDir, `${id}.req.json`), JSON.stringify({ contentFile: contentBase, attachments, videos, videoCovers, flags }));
|
|
4307
4342
|
const resPath = join(relayDir, `${id}.res.json`);
|
|
4308
4343
|
const deadlineMs = Date.now() + 120_000;
|
|
4309
4344
|
while (Date.now() < deadlineMs) {
|
|
@@ -4388,15 +4423,29 @@ async function cmdSend(rest) {
|
|
|
4388
4423
|
// from its own worker-written cred file instead (see registerSelfFromCredFile).
|
|
4389
4424
|
await registerSelfFromCredFile();
|
|
4390
4425
|
const sessionIdArg = argValue(rest, '--session-id');
|
|
4426
|
+
for (const flag of ['--video', '--videos', '--video-cover', '--video-covers']) {
|
|
4427
|
+
if (flagPresentButValueMissing(rest, flag, true)) {
|
|
4428
|
+
console.error(`botmux send: ${flag} 需要路径参数`);
|
|
4429
|
+
process.exit(2);
|
|
4430
|
+
}
|
|
4431
|
+
}
|
|
4391
4432
|
const images = argValues(rest, '--image', '--images');
|
|
4392
4433
|
const files = argValues(rest, '--file', '--files');
|
|
4434
|
+
const videos = argValues(rest, '--video', '--videos');
|
|
4435
|
+
const videoCovers = argValues(rest, '--video-cover', '--video-covers');
|
|
4436
|
+
const videoValidation = validateVideoAttachments(videos, videoCovers);
|
|
4437
|
+
if (!videoValidation.ok) {
|
|
4438
|
+
console.error(`botmux send: ${videoValidation.error}`);
|
|
4439
|
+
process.exit(2);
|
|
4440
|
+
}
|
|
4441
|
+
const videoAttachments = videoValidation.videos;
|
|
4393
4442
|
// stdin can't be both the message body (which `botmux send` reads from it) and
|
|
4394
|
-
// a `--file`/`--image` attachment — the second read sees EOF and the upload
|
|
4443
|
+
// a `--file`/`--image`/`--video` attachment — the second read sees EOF and the upload
|
|
4395
4444
|
// fails *after* the message is already sent, leaving the caller to resend.
|
|
4396
4445
|
// Reject up front so exit≠0 reliably means "nothing was sent".
|
|
4397
|
-
const stdinAlias = findStdinAliasAttachment([...images, ...files]);
|
|
4446
|
+
const stdinAlias = findStdinAliasAttachment([...images, ...files, ...videos, ...videoCovers]);
|
|
4398
4447
|
if (stdinAlias) {
|
|
4399
|
-
console.error(`不能把 stdin(${stdinAlias})当作 --file/--image 附件:botmux send 已从 stdin 读取消息正文,\n` +
|
|
4448
|
+
console.error(`不能把 stdin(${stdinAlias})当作 --file/--image/--video 附件:botmux send 已从 stdin 读取消息正文,\n` +
|
|
4400
4449
|
`同一个 stdin 没法既当正文又当附件(第二次读到的是 EOF)。\n` +
|
|
4401
4450
|
`要发送管道内容,先落到临时文件: 数据来源 > /tmp/x && botmux send --files /tmp/x …`);
|
|
4402
4451
|
process.exit(1);
|
|
@@ -4467,8 +4516,8 @@ async function cmdSend(rest) {
|
|
|
4467
4516
|
}
|
|
4468
4517
|
if (!contentFile)
|
|
4469
4518
|
rejectLikelyWindowsStdinMojibake(content);
|
|
4470
|
-
if (!content.trim() && images.length === 0 && files.length === 0) {
|
|
4471
|
-
console.error('没有内容可发送。用法:\n echo "消息" | botmux send\n botmux send "消息"\n botmux send --content-file /tmp/msg.md --images /tmp/chart.png');
|
|
4519
|
+
if (!content.trim() && images.length === 0 && files.length === 0 && videoAttachments.length === 0) {
|
|
4520
|
+
console.error('没有内容可发送。用法:\n echo "消息" | botmux send\n botmux send "消息"\n botmux send --content-file /tmp/msg.md --images /tmp/chart.png\n botmux send --videos /tmp/replay.mp4 --video-covers /tmp/cover.png --no-mention "视频预览"');
|
|
4472
4521
|
process.exit(1);
|
|
4473
4522
|
}
|
|
4474
4523
|
// --attention guard: only valid replying into the current session with a text
|
|
@@ -4637,12 +4686,18 @@ async function cmdSend(rest) {
|
|
|
4637
4686
|
mentions.push({ open_id: s.quoteTargetSenderOpenId, name: '' });
|
|
4638
4687
|
}
|
|
4639
4688
|
// Validate file paths
|
|
4640
|
-
for (const p of [...images, ...files]) {
|
|
4689
|
+
for (const p of [...images, ...files, ...videos, ...videoCovers]) {
|
|
4641
4690
|
if (!existsSync(p)) {
|
|
4642
4691
|
console.error(`文件不存在: ${p}`);
|
|
4643
4692
|
process.exit(1);
|
|
4644
4693
|
}
|
|
4645
4694
|
}
|
|
4695
|
+
for (const p of [...videos, ...videoCovers]) {
|
|
4696
|
+
if (!statSync(p).isFile()) {
|
|
4697
|
+
console.error(`不是普通文件: ${p}`);
|
|
4698
|
+
process.exit(1);
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4646
4701
|
// Register bots so Lark client works
|
|
4647
4702
|
const { registerBot, loadBotConfigs, findOncallChatForAnyBot } = await import('./bot-registry.js');
|
|
4648
4703
|
try {
|
|
@@ -4895,7 +4950,36 @@ async function cmdSend(rest) {
|
|
|
4895
4950
|
// we committed to sending — that's the boundary the gate cares about.
|
|
4896
4951
|
const sentAtMs = Date.now();
|
|
4897
4952
|
let messageId;
|
|
4898
|
-
|
|
4953
|
+
let failedAttachments = [];
|
|
4954
|
+
let failedVideoAttachments = [];
|
|
4955
|
+
// Pure-video fast path: send the preview as a standalone media message.
|
|
4956
|
+
// A send that also carries mentions is deliberately excluded (media messages
|
|
4957
|
+
// can't embed `<at>`), so it falls through to the card branch which renders
|
|
4958
|
+
// the @ on the footer and sends the video as a follow-up attachment — same
|
|
4959
|
+
// shape as an attachment-only `--files … --mention …` send, whose card body
|
|
4960
|
+
// is likewise empty. See shouldSendAsPureVideo.
|
|
4961
|
+
const pureVideoSend = shouldSendAsPureVideo({
|
|
4962
|
+
hasBodyText: !!text.trim(),
|
|
4963
|
+
imageCount: imageKeys.length,
|
|
4964
|
+
fileCount: files.length,
|
|
4965
|
+
videoCount: videoAttachments.length,
|
|
4966
|
+
mentionCount: mentions.length,
|
|
4967
|
+
});
|
|
4968
|
+
if (pureVideoSend) {
|
|
4969
|
+
// No card/text primary here, so the FIRST media message must carry the
|
|
4970
|
+
// quote chain itself (dispatchPrimary applies the chat-scope quoteTargetId
|
|
4971
|
+
// and updates primaryQuotedId). Otherwise a bare `--videos … --no-mention`
|
|
4972
|
+
// reply in a 普通群 lands as a standalone message that doesn't quote the
|
|
4973
|
+
// trigger — unlike file-only/image-only sends whose primary card quotes.
|
|
4974
|
+
const videoResult = await sendVideoAttachments({ uploadFile, uploadImage, dispatch, primaryDispatch: dispatchPrimary }, appId, videoAttachments);
|
|
4975
|
+
failedVideoAttachments = videoResult.failed;
|
|
4976
|
+
if (videoResult.sent.length === 0) {
|
|
4977
|
+
const first = failedVideoAttachments[0]?.error ?? 'unknown error';
|
|
4978
|
+
throw new Error(`视频发送失败: ${first}`);
|
|
4979
|
+
}
|
|
4980
|
+
messageId = videoResult.sent[0];
|
|
4981
|
+
}
|
|
4982
|
+
else {
|
|
4899
4983
|
// 回复一律卡片(纯文本 post 路径已删)。
|
|
4900
4984
|
// Inline `@Name` → `<at id=…>` at the exact spot it's written (CJK-name
|
|
4901
4985
|
// aware, see applyInlineMentions); any --mention not inlined here is
|
|
@@ -4999,15 +5083,24 @@ async function cmdSend(rest) {
|
|
|
4999
5083
|
// closed a pending response card for this turn.
|
|
5000
5084
|
if (shouldRecordBridgeMarker)
|
|
5001
5085
|
recordBridgeSendMarker(sentAtMs, messageId, text);
|
|
5002
|
-
// Send
|
|
5003
|
-
//
|
|
5004
|
-
//
|
|
5005
|
-
//
|
|
5006
|
-
// the
|
|
5007
|
-
|
|
5086
|
+
// Send attachments as separate messages — best-effort. The primary message
|
|
5087
|
+
// is already delivered above; a failing attachment must not throw out to the
|
|
5088
|
+
// catch below (which would report total failure / exit 1 for an already-sent
|
|
5089
|
+
// message and make the caller resend). Warn instead, and list failures in
|
|
5090
|
+
// the success JSON. Pure-video sends have no text/card primary, so the media
|
|
5091
|
+
// message above is the primary and failures before any media is sent still
|
|
5092
|
+
// surface as command failure.
|
|
5093
|
+
if (!pureVideoSend) {
|
|
5094
|
+
({ failed: failedAttachments } = await sendFileAttachments({ uploadFile, dispatch }, appId, files));
|
|
5095
|
+
const videoResult = await sendVideoAttachments({ uploadFile, uploadImage, dispatch }, appId, videoAttachments);
|
|
5096
|
+
failedVideoAttachments = videoResult.failed;
|
|
5097
|
+
}
|
|
5008
5098
|
for (const f of failedAttachments) {
|
|
5009
5099
|
console.error(`⚠️ 附件未发送(主消息已送达 ${messageId},请勿重发): ${f.path} — ${f.error}`);
|
|
5010
5100
|
}
|
|
5101
|
+
for (const f of failedVideoAttachments) {
|
|
5102
|
+
console.error(`⚠️ 视频未发送(主消息已送达 ${messageId},请勿重发): ${f.path} / cover ${f.coverPath} — ${f.error}`);
|
|
5103
|
+
}
|
|
5011
5104
|
// Bot-to-bot 转发依赖飞书"获取群组中其他机器人和用户@当前机器人的消息"权限:
|
|
5012
5105
|
// 目标 bot 的 daemon 现在能从 WSClient 原生收到 sender_type='app' 的事件,
|
|
5013
5106
|
// 不需要 botmux 自己再写本地 signal 文件做转发。outgoing 消息里 @BotName /
|
|
@@ -5055,6 +5148,9 @@ async function cmdSend(rest) {
|
|
|
5055
5148
|
...(failedAttachments.length > 0
|
|
5056
5149
|
? { failedAttachments: failedAttachments.map(f => f.path) }
|
|
5057
5150
|
: {}),
|
|
5151
|
+
...(failedVideoAttachments.length > 0
|
|
5152
|
+
? { failedVideoAttachments: failedVideoAttachments.map(f => f.path) }
|
|
5153
|
+
: {}),
|
|
5058
5154
|
}));
|
|
5059
5155
|
}
|
|
5060
5156
|
catch (err) {
|
|
@@ -5264,7 +5360,7 @@ async function cmdDispatch(rest) {
|
|
|
5264
5360
|
*
|
|
5265
5361
|
* In 多话题协作模式 the sub-bot lives in its own sub-topic, where the orchestrator
|
|
5266
5362
|
* has no session; @-ing the orchestrator there would spawn a fresh, context-less
|
|
5267
|
-
* one (
|
|
5363
|
+
* one (the reported #1 bug). Instead this routes the report INTO the orchestrator's own
|
|
5268
5364
|
* thread (recorded by `botmux dispatch` in orchestrate-dispatch.json) and @-s the
|
|
5269
5365
|
* orchestrator there, so its existing, context-rich session is the one that wakes.
|
|
5270
5366
|
*
|
|
@@ -6558,6 +6654,11 @@ switch (command) {
|
|
|
6558
6654
|
case 'voice':
|
|
6559
6655
|
await cmdVoiceSetup(process.argv.slice(3));
|
|
6560
6656
|
break;
|
|
6657
|
+
case 'vc-agent': {
|
|
6658
|
+
const { cmdVcAgent } = await import('./cli/vc-agent.js');
|
|
6659
|
+
await cmdVcAgent(process.argv[3] ?? '', process.argv.slice(4));
|
|
6660
|
+
break;
|
|
6661
|
+
}
|
|
6561
6662
|
case 'whiteboard':
|
|
6562
6663
|
case 'wb':
|
|
6563
6664
|
await cmdWhiteboard(process.argv[3] ?? 'status', process.argv.slice(4));
|