botmux 3.10.0 → 3.23.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 +57 -4
- package/README.md +89 -4
- package/package.json +47 -31
- package/scripts/install-path-entry.mjs +263 -0
- package/scripts/postinstall-bin.mjs +388 -0
- package/dist/.runtime-build-id +0 -1
- package/dist/adapters/adopt-route.d.ts +0 -63
- package/dist/adapters/adopt-route.d.ts.map +0 -1
- package/dist/adapters/adopt-route.js +0 -196
- package/dist/adapters/adopt-route.js.map +0 -1
- package/dist/adapters/backend/capabilities.d.ts +0 -17
- package/dist/adapters/backend/capabilities.d.ts.map +0 -1
- package/dist/adapters/backend/capabilities.js +0 -22
- package/dist/adapters/backend/capabilities.js.map +0 -1
- package/dist/adapters/backend/critical-control-key.d.ts +0 -19
- package/dist/adapters/backend/critical-control-key.d.ts.map +0 -1
- package/dist/adapters/backend/critical-control-key.js +0 -34
- package/dist/adapters/backend/critical-control-key.js.map +0 -1
- package/dist/adapters/backend/herdr-backend.d.ts +0 -164
- package/dist/adapters/backend/herdr-backend.d.ts.map +0 -1
- package/dist/adapters/backend/herdr-backend.js +0 -1073
- package/dist/adapters/backend/herdr-backend.js.map +0 -1
- package/dist/adapters/backend/liveness-gate.d.ts +0 -38
- package/dist/adapters/backend/liveness-gate.d.ts.map +0 -1
- package/dist/adapters/backend/liveness-gate.js +0 -53
- package/dist/adapters/backend/liveness-gate.js.map +0 -1
- package/dist/adapters/backend/pty-backend.d.ts +0 -23
- package/dist/adapters/backend/pty-backend.d.ts.map +0 -1
- package/dist/adapters/backend/pty-backend.js +0 -70
- package/dist/adapters/backend/pty-backend.js.map +0 -1
- package/dist/adapters/backend/reproduce-command.d.ts +0 -39
- package/dist/adapters/backend/reproduce-command.d.ts.map +0 -1
- package/dist/adapters/backend/reproduce-command.js +0 -63
- package/dist/adapters/backend/reproduce-command.js.map +0 -1
- package/dist/adapters/backend/riff-backend.d.ts +0 -272
- package/dist/adapters/backend/riff-backend.d.ts.map +0 -1
- package/dist/adapters/backend/riff-backend.js +0 -1017
- package/dist/adapters/backend/riff-backend.js.map +0 -1
- package/dist/adapters/backend/sandbox.d.ts +0 -298
- package/dist/adapters/backend/sandbox.d.ts.map +0 -1
- package/dist/adapters/backend/sandbox.js +0 -1196
- package/dist/adapters/backend/sandbox.js.map +0 -1
- package/dist/adapters/backend/session-backend-selector.d.ts +0 -113
- package/dist/adapters/backend/session-backend-selector.d.ts.map +0 -1
- package/dist/adapters/backend/session-backend-selector.js +0 -344
- package/dist/adapters/backend/session-backend-selector.js.map +0 -1
- package/dist/adapters/backend/tmux-backend.d.ts +0 -292
- package/dist/adapters/backend/tmux-backend.d.ts.map +0 -1
- package/dist/adapters/backend/tmux-backend.js +0 -821
- package/dist/adapters/backend/tmux-backend.js.map +0 -1
- package/dist/adapters/backend/tmux-pipe-backend.d.ts +0 -237
- package/dist/adapters/backend/tmux-pipe-backend.d.ts.map +0 -1
- package/dist/adapters/backend/tmux-pipe-backend.js +0 -786
- package/dist/adapters/backend/tmux-pipe-backend.js.map +0 -1
- package/dist/adapters/backend/types.d.ts +0 -183
- package/dist/adapters/backend/types.d.ts.map +0 -1
- package/dist/adapters/backend/types.js +0 -19
- package/dist/adapters/backend/types.js.map +0 -1
- package/dist/adapters/backend/zellij-backend.d.ts +0 -173
- package/dist/adapters/backend/zellij-backend.d.ts.map +0 -1
- package/dist/adapters/backend/zellij-backend.js +0 -466
- package/dist/adapters/backend/zellij-backend.js.map +0 -1
- package/dist/adapters/backend/zellij-observe-backend.d.ts +0 -95
- package/dist/adapters/backend/zellij-observe-backend.d.ts.map +0 -1
- package/dist/adapters/backend/zellij-observe-backend.js +0 -301
- package/dist/adapters/backend/zellij-observe-backend.js.map +0 -1
- package/dist/adapters/backend/zellij-socket-probe.d.ts +0 -18
- package/dist/adapters/backend/zellij-socket-probe.d.ts.map +0 -1
- package/dist/adapters/backend/zellij-socket-probe.js +0 -146
- package/dist/adapters/backend/zellij-socket-probe.js.map +0 -1
- package/dist/adapters/backend/zmx-backend.d.ts +0 -284
- package/dist/adapters/backend/zmx-backend.d.ts.map +0 -1
- package/dist/adapters/backend/zmx-backend.js +0 -2387
- package/dist/adapters/backend/zmx-backend.js.map +0 -1
- package/dist/adapters/cli/aiden.d.ts +0 -4
- package/dist/adapters/cli/aiden.d.ts.map +0 -1
- package/dist/adapters/cli/aiden.js +0 -46
- package/dist/adapters/cli/aiden.js.map +0 -1
- package/dist/adapters/cli/antigravity.d.ts +0 -4
- package/dist/adapters/cli/antigravity.d.ts.map +0 -1
- package/dist/adapters/cli/antigravity.js +0 -274
- package/dist/adapters/cli/antigravity.js.map +0 -1
- package/dist/adapters/cli/claude-code.d.ts +0 -121
- package/dist/adapters/cli/claude-code.d.ts.map +0 -1
- package/dist/adapters/cli/claude-code.js +0 -1128
- package/dist/adapters/cli/claude-code.js.map +0 -1
- package/dist/adapters/cli/coco.d.ts +0 -4
- package/dist/adapters/cli/coco.d.ts.map +0 -1
- package/dist/adapters/cli/coco.js +0 -315
- package/dist/adapters/cli/coco.js.map +0 -1
- package/dist/adapters/cli/codex-app-turn.d.ts +0 -59
- package/dist/adapters/cli/codex-app-turn.d.ts.map +0 -1
- package/dist/adapters/cli/codex-app-turn.js +0 -136
- package/dist/adapters/cli/codex-app-turn.js.map +0 -1
- package/dist/adapters/cli/codex-app.d.ts +0 -4
- package/dist/adapters/cli/codex-app.d.ts.map +0 -1
- package/dist/adapters/cli/codex-app.js +0 -88
- package/dist/adapters/cli/codex-app.js.map +0 -1
- package/dist/adapters/cli/codex.d.ts +0 -4
- package/dist/adapters/cli/codex.d.ts.map +0 -1
- package/dist/adapters/cli/codex.js +0 -439
- package/dist/adapters/cli/codex.js.map +0 -1
- package/dist/adapters/cli/copilot.d.ts +0 -10
- package/dist/adapters/cli/copilot.d.ts.map +0 -1
- package/dist/adapters/cli/copilot.js +0 -73
- package/dist/adapters/cli/copilot.js.map +0 -1
- package/dist/adapters/cli/cursor.d.ts +0 -4
- package/dist/adapters/cli/cursor.d.ts.map +0 -1
- package/dist/adapters/cli/cursor.js +0 -104
- package/dist/adapters/cli/cursor.js.map +0 -1
- package/dist/adapters/cli/fs-policy.d.ts +0 -385
- package/dist/adapters/cli/fs-policy.d.ts.map +0 -1
- package/dist/adapters/cli/fs-policy.js +0 -889
- package/dist/adapters/cli/fs-policy.js.map +0 -1
- package/dist/adapters/cli/gemini.d.ts +0 -4
- package/dist/adapters/cli/gemini.d.ts.map +0 -1
- package/dist/adapters/cli/gemini.js +0 -53
- package/dist/adapters/cli/gemini.js.map +0 -1
- package/dist/adapters/cli/genius.d.ts +0 -4
- package/dist/adapters/cli/genius.d.ts.map +0 -1
- package/dist/adapters/cli/genius.js +0 -230
- package/dist/adapters/cli/genius.js.map +0 -1
- package/dist/adapters/cli/grok.d.ts +0 -76
- package/dist/adapters/cli/grok.d.ts.map +0 -1
- package/dist/adapters/cli/grok.js +0 -310
- package/dist/adapters/cli/grok.js.map +0 -1
- package/dist/adapters/cli/hermes.d.ts +0 -4
- package/dist/adapters/cli/hermes.d.ts.map +0 -1
- package/dist/adapters/cli/hermes.js +0 -83
- package/dist/adapters/cli/hermes.js.map +0 -1
- package/dist/adapters/cli/kimi.d.ts +0 -4
- package/dist/adapters/cli/kimi.d.ts.map +0 -1
- package/dist/adapters/cli/kimi.js +0 -54
- package/dist/adapters/cli/kimi.js.map +0 -1
- package/dist/adapters/cli/kiro-cli.d.ts +0 -4
- package/dist/adapters/cli/kiro-cli.d.ts.map +0 -1
- package/dist/adapters/cli/kiro-cli.js +0 -73
- package/dist/adapters/cli/kiro-cli.js.map +0 -1
- package/dist/adapters/cli/mir.d.ts +0 -4
- package/dist/adapters/cli/mir.d.ts.map +0 -1
- package/dist/adapters/cli/mir.js +0 -81
- package/dist/adapters/cli/mir.js.map +0 -1
- package/dist/adapters/cli/mira.d.ts +0 -4
- package/dist/adapters/cli/mira.d.ts.map +0 -1
- package/dist/adapters/cli/mira.js +0 -54
- package/dist/adapters/cli/mira.js.map +0 -1
- package/dist/adapters/cli/mtr.d.ts +0 -5
- package/dist/adapters/cli/mtr.d.ts.map +0 -1
- package/dist/adapters/cli/mtr.js +0 -69
- package/dist/adapters/cli/mtr.js.map +0 -1
- package/dist/adapters/cli/oh-my-pi.d.ts +0 -5
- package/dist/adapters/cli/oh-my-pi.d.ts.map +0 -1
- package/dist/adapters/cli/oh-my-pi.js +0 -186
- package/dist/adapters/cli/oh-my-pi.js.map +0 -1
- package/dist/adapters/cli/opencode.d.ts +0 -4
- package/dist/adapters/cli/opencode.d.ts.map +0 -1
- package/dist/adapters/cli/opencode.js +0 -305
- package/dist/adapters/cli/opencode.js.map +0 -1
- package/dist/adapters/cli/pi-initial-prompt-extension.d.ts +0 -27
- package/dist/adapters/cli/pi-initial-prompt-extension.d.ts.map +0 -1
- package/dist/adapters/cli/pi-initial-prompt-extension.js +0 -38
- package/dist/adapters/cli/pi-initial-prompt-extension.js.map +0 -1
- package/dist/adapters/cli/pi-initial-prompt.d.ts +0 -21
- package/dist/adapters/cli/pi-initial-prompt.d.ts.map +0 -1
- package/dist/adapters/cli/pi-initial-prompt.js +0 -59
- package/dist/adapters/cli/pi-initial-prompt.js.map +0 -1
- package/dist/adapters/cli/pi.d.ts +0 -58
- package/dist/adapters/cli/pi.d.ts.map +0 -1
- package/dist/adapters/cli/pi.js +0 -121
- package/dist/adapters/cli/pi.js.map +0 -1
- package/dist/adapters/cli/read-isolation.d.ts +0 -198
- package/dist/adapters/cli/read-isolation.d.ts.map +0 -1
- package/dist/adapters/cli/read-isolation.js +0 -335
- package/dist/adapters/cli/read-isolation.js.map +0 -1
- package/dist/adapters/cli/reasonix.d.ts +0 -35
- package/dist/adapters/cli/reasonix.d.ts.map +0 -1
- package/dist/adapters/cli/reasonix.js +0 -236
- package/dist/adapters/cli/reasonix.js.map +0 -1
- package/dist/adapters/cli/registry.d.ts +0 -51
- package/dist/adapters/cli/registry.d.ts.map +0 -1
- package/dist/adapters/cli/registry.js +0 -192
- package/dist/adapters/cli/registry.js.map +0 -1
- package/dist/adapters/cli/relay.d.ts +0 -26
- package/dist/adapters/cli/relay.d.ts.map +0 -1
- package/dist/adapters/cli/relay.js +0 -55
- package/dist/adapters/cli/relay.js.map +0 -1
- package/dist/adapters/cli/riff.d.ts +0 -14
- package/dist/adapters/cli/riff.d.ts.map +0 -1
- package/dist/adapters/cli/riff.js +0 -35
- package/dist/adapters/cli/riff.js.map +0 -1
- package/dist/adapters/cli/runner-control-channel.d.ts +0 -32
- package/dist/adapters/cli/runner-control-channel.d.ts.map +0 -1
- package/dist/adapters/cli/runner-control-channel.js +0 -104
- package/dist/adapters/cli/runner-control-channel.js.map +0 -1
- package/dist/adapters/cli/runner-input.d.ts +0 -67
- package/dist/adapters/cli/runner-input.d.ts.map +0 -1
- package/dist/adapters/cli/runner-input.js +0 -131
- package/dist/adapters/cli/runner-input.js.map +0 -1
- package/dist/adapters/cli/runtime.d.ts +0 -81
- package/dist/adapters/cli/runtime.d.ts.map +0 -1
- package/dist/adapters/cli/runtime.js +0 -243
- package/dist/adapters/cli/runtime.js.map +0 -1
- package/dist/adapters/cli/seed.d.ts +0 -29
- package/dist/adapters/cli/seed.d.ts.map +0 -1
- package/dist/adapters/cli/seed.js +0 -68
- package/dist/adapters/cli/seed.js.map +0 -1
- package/dist/adapters/cli/shared-hints.d.ts +0 -45
- package/dist/adapters/cli/shared-hints.d.ts.map +0 -1
- package/dist/adapters/cli/shared-hints.js +0 -144
- package/dist/adapters/cli/shared-hints.js.map +0 -1
- package/dist/adapters/cli/strict-input-handle.d.ts +0 -13
- package/dist/adapters/cli/strict-input-handle.d.ts.map +0 -1
- package/dist/adapters/cli/strict-input-handle.js +0 -39
- package/dist/adapters/cli/strict-input-handle.js.map +0 -1
- package/dist/adapters/cli/traex.d.ts +0 -28
- package/dist/adapters/cli/traex.d.ts.map +0 -1
- package/dist/adapters/cli/traex.js +0 -343
- package/dist/adapters/cli/traex.js.map +0 -1
- package/dist/adapters/cli/types.d.ts +0 -460
- package/dist/adapters/cli/types.d.ts.map +0 -1
- package/dist/adapters/cli/types.js +0 -2
- package/dist/adapters/cli/types.js.map +0 -1
- package/dist/adapters/coco-ask-plugin.d.ts +0 -25
- package/dist/adapters/coco-ask-plugin.d.ts.map +0 -1
- package/dist/adapters/coco-ask-plugin.js +0 -73
- package/dist/adapters/coco-ask-plugin.js.map +0 -1
- package/dist/adapters/hook-command.d.ts +0 -27
- package/dist/adapters/hook-command.d.ts.map +0 -1
- package/dist/adapters/hook-command.js +0 -50
- package/dist/adapters/hook-command.js.map +0 -1
- package/dist/adapters/hook-installer.d.ts +0 -37
- package/dist/adapters/hook-installer.d.ts.map +0 -1
- package/dist/adapters/hook-installer.js +0 -494
- package/dist/adapters/hook-installer.js.map +0 -1
- package/dist/autostart.d.ts +0 -14
- package/dist/autostart.d.ts.map +0 -1
- package/dist/autostart.js +0 -516
- package/dist/autostart.js.map +0 -1
- package/dist/bot-registry.d.ts +0 -942
- package/dist/bot-registry.d.ts.map +0 -1
- package/dist/bot-registry.js +0 -1909
- package/dist/bot-registry.js.map +0 -1
- package/dist/cli/arg-utils.d.ts +0 -11
- package/dist/cli/arg-utils.d.ts.map +0 -1
- package/dist/cli/arg-utils.js +0 -25
- package/dist/cli/arg-utils.js.map +0 -1
- package/dist/cli/bots-list-output.d.ts +0 -29
- package/dist/cli/bots-list-output.d.ts.map +0 -1
- package/dist/cli/bots-list-output.js +0 -32
- package/dist/cli/bots-list-output.js.map +0 -1
- package/dist/cli/capabilities.d.ts +0 -24
- package/dist/cli/capabilities.d.ts.map +0 -1
- package/dist/cli/capabilities.js +0 -25
- package/dist/cli/capabilities.js.map +0 -1
- package/dist/cli/create-group-resolver.d.ts +0 -75
- package/dist/cli/create-group-resolver.d.ts.map +0 -1
- package/dist/cli/create-group-resolver.js +0 -123
- package/dist/cli/create-group-resolver.js.map +0 -1
- package/dist/cli/daemon-lifecycle-env.d.ts +0 -9
- package/dist/cli/daemon-lifecycle-env.d.ts.map +0 -1
- package/dist/cli/daemon-lifecycle-env.js +0 -43
- package/dist/cli/daemon-lifecycle-env.js.map +0 -1
- package/dist/cli/dashboard-endpoint.d.ts +0 -76
- package/dist/cli/dashboard-endpoint.d.ts.map +0 -1
- package/dist/cli/dashboard-endpoint.js +0 -161
- package/dist/cli/dashboard-endpoint.js.map +0 -1
- package/dist/cli/deferred-topic-send.d.ts +0 -48
- package/dist/cli/deferred-topic-send.d.ts.map +0 -1
- package/dist/cli/deferred-topic-send.js +0 -86
- package/dist/cli/deferred-topic-send.js.map +0 -1
- package/dist/cli/exact-chat-grant-client.d.ts +0 -48
- package/dist/cli/exact-chat-grant-client.d.ts.map +0 -1
- package/dist/cli/exact-chat-grant-client.js +0 -108
- package/dist/cli/exact-chat-grant-client.js.map +0 -1
- package/dist/cli/exact-chat-grant.d.ts +0 -18
- package/dist/cli/exact-chat-grant.d.ts.map +0 -1
- package/dist/cli/exact-chat-grant.js +0 -97
- package/dist/cli/exact-chat-grant.js.map +0 -1
- package/dist/cli/pm2-command.d.ts +0 -7
- package/dist/cli/pm2-command.d.ts.map +0 -1
- package/dist/cli/pm2-command.js +0 -25
- package/dist/cli/pm2-command.js.map +0 -1
- package/dist/cli/quoted-render.d.ts +0 -41
- package/dist/cli/quoted-render.d.ts.map +0 -1
- package/dist/cli/quoted-render.js +0 -44
- package/dist/cli/quoted-render.js.map +0 -1
- package/dist/cli/saved-workflow.d.ts +0 -25
- package/dist/cli/saved-workflow.d.ts.map +0 -1
- package/dist/cli/saved-workflow.js +0 -338
- package/dist/cli/saved-workflow.js.map +0 -1
- package/dist/cli/send-dispatch.d.ts +0 -125
- package/dist/cli/send-dispatch.d.ts.map +0 -1
- package/dist/cli/send-dispatch.js +0 -320
- package/dist/cli/send-dispatch.js.map +0 -1
- package/dist/cli/session-list-liveness.d.ts +0 -41
- package/dist/cli/session-list-liveness.d.ts.map +0 -1
- package/dist/cli/session-list-liveness.js +0 -48
- package/dist/cli/session-list-liveness.js.map +0 -1
- package/dist/cli/stdin-encoding.d.ts +0 -24
- package/dist/cli/stdin-encoding.d.ts.map +0 -1
- package/dist/cli/stdin-encoding.js +0 -56
- package/dist/cli/stdin-encoding.js.map +0 -1
- package/dist/cli/v3-run-cancel.d.ts +0 -47
- package/dist/cli/v3-run-cancel.d.ts.map +0 -1
- package/dist/cli/v3-run-cancel.js +0 -96
- package/dist/cli/v3-run-cancel.js.map +0 -1
- package/dist/cli/vc-agent.d.ts +0 -2
- package/dist/cli/vc-agent.d.ts.map +0 -1
- package/dist/cli/vc-agent.js +0 -384
- package/dist/cli/vc-agent.js.map +0 -1
- package/dist/cli/workflow-migration.d.ts +0 -39
- package/dist/cli/workflow-migration.d.ts.map +0 -1
- package/dist/cli/workflow-migration.js +0 -302
- package/dist/cli/workflow-migration.js.map +0 -1
- package/dist/cli/workflow-run-archive.d.ts +0 -29
- package/dist/cli/workflow-run-archive.d.ts.map +0 -1
- package/dist/cli/workflow-run-archive.js +0 -183
- package/dist/cli/workflow-run-archive.js.map +0 -1
- package/dist/cli/workflow.d.ts +0 -8
- package/dist/cli/workflow.d.ts.map +0 -1
- package/dist/cli/workflow.js +0 -109
- package/dist/cli/workflow.js.map +0 -1
- package/dist/cli/zmx-managed-attach.d.ts +0 -41
- package/dist/cli/zmx-managed-attach.d.ts.map +0 -1
- package/dist/cli/zmx-managed-attach.js +0 -72
- package/dist/cli/zmx-managed-attach.js.map +0 -1
- package/dist/cli.d.ts +0 -35
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -10769
- package/dist/cli.js.map +0 -1
- package/dist/codex-app-runner.d.ts +0 -3
- package/dist/codex-app-runner.d.ts.map +0 -1
- package/dist/codex-app-runner.js +0 -565
- package/dist/codex-app-runner.js.map +0 -1
- package/dist/codex-rpc-engine.d.ts +0 -136
- package/dist/codex-rpc-engine.d.ts.map +0 -1
- package/dist/codex-rpc-engine.js +0 -640
- package/dist/codex-rpc-engine.js.map +0 -1
- package/dist/codex-rpc-lifecycle.d.ts +0 -157
- package/dist/codex-rpc-lifecycle.d.ts.map +0 -1
- package/dist/codex-rpc-lifecycle.js +0 -238
- package/dist/codex-rpc-lifecycle.js.map +0 -1
- package/dist/config.d.ts +0 -146
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -293
- package/dist/config.js.map +0 -1
- package/dist/core/ask-api.d.ts +0 -29
- package/dist/core/ask-api.d.ts.map +0 -1
- package/dist/core/ask-api.js +0 -116
- package/dist/core/ask-api.js.map +0 -1
- package/dist/core/ask-args.d.ts +0 -53
- package/dist/core/ask-args.d.ts.map +0 -1
- package/dist/core/ask-args.js +0 -122
- package/dist/core/ask-args.js.map +0 -1
- package/dist/core/ask-broker.d.ts +0 -166
- package/dist/core/ask-broker.d.ts.map +0 -1
- package/dist/core/ask-broker.js +0 -451
- package/dist/core/ask-broker.js.map +0 -1
- package/dist/core/ask-hook/claude-code.d.ts +0 -50
- package/dist/core/ask-hook/claude-code.d.ts.map +0 -1
- package/dist/core/ask-hook/claude-code.js +0 -151
- package/dist/core/ask-hook/claude-code.js.map +0 -1
- package/dist/core/ask-hook/coco.d.ts +0 -22
- package/dist/core/ask-hook/coco.d.ts.map +0 -1
- package/dist/core/ask-hook/coco.js +0 -35
- package/dist/core/ask-hook/coco.js.map +0 -1
- package/dist/core/ask-hook/codex.d.ts +0 -43
- package/dist/core/ask-hook/codex.d.ts.map +0 -1
- package/dist/core/ask-hook/codex.js +0 -70
- package/dist/core/ask-hook/codex.js.map +0 -1
- package/dist/core/ask-hook/opencode.d.ts +0 -39
- package/dist/core/ask-hook/opencode.d.ts.map +0 -1
- package/dist/core/ask-hook/opencode.js +0 -109
- package/dist/core/ask-hook/opencode.js.map +0 -1
- package/dist/core/ask-hook/registry.d.ts +0 -3
- package/dist/core/ask-hook/registry.d.ts.map +0 -1
- package/dist/core/ask-hook/registry.js +0 -25
- package/dist/core/ask-hook/registry.js.map +0 -1
- package/dist/core/ask-hook/types.d.ts +0 -28
- package/dist/core/ask-hook/types.d.ts.map +0 -1
- package/dist/core/ask-hook/types.js +0 -2
- package/dist/core/ask-hook/types.js.map +0 -1
- package/dist/core/ask-types.d.ts +0 -157
- package/dist/core/ask-types.d.ts.map +0 -1
- package/dist/core/ask-types.js +0 -28
- package/dist/core/ask-types.js.map +0 -1
- package/dist/core/attachment-path.d.ts +0 -3
- package/dist/core/attachment-path.d.ts.map +0 -1
- package/dist/core/attachment-path.js +0 -8
- package/dist/core/attachment-path.js.map +0 -1
- package/dist/core/auto-start.d.ts +0 -84
- package/dist/core/auto-start.d.ts.map +0 -1
- package/dist/core/auto-start.js +0 -92
- package/dist/core/auto-start.js.map +0 -1
- package/dist/core/bot-live-control.d.ts +0 -41
- package/dist/core/bot-live-control.d.ts.map +0 -1
- package/dist/core/bot-live-control.js +0 -135
- package/dist/core/bot-live-control.js.map +0 -1
- package/dist/core/bot-turn-mutation-gate.d.ts +0 -24
- package/dist/core/bot-turn-mutation-gate.d.ts.map +0 -1
- package/dist/core/bot-turn-mutation-gate.js +0 -369
- package/dist/core/bot-turn-mutation-gate.js.map +0 -1
- package/dist/core/botmux-wrapper.d.ts +0 -41
- package/dist/core/botmux-wrapper.d.ts.map +0 -1
- package/dist/core/botmux-wrapper.js +0 -63
- package/dist/core/botmux-wrapper.js.map +0 -1
- package/dist/core/chat-rename.d.ts +0 -27
- package/dist/core/chat-rename.d.ts.map +0 -1
- package/dist/core/chat-rename.js +0 -53
- package/dist/core/chat-rename.js.map +0 -1
- package/dist/core/cli-runtime-display.d.ts +0 -19
- package/dist/core/cli-runtime-display.d.ts.map +0 -1
- package/dist/core/cli-runtime-display.js +0 -28
- package/dist/core/cli-runtime-display.js.map +0 -1
- package/dist/core/cli-runtime-update.d.ts +0 -129
- package/dist/core/cli-runtime-update.d.ts.map +0 -1
- package/dist/core/cli-runtime-update.js +0 -737
- package/dist/core/cli-runtime-update.js.map +0 -1
- package/dist/core/closed-session-card.d.ts +0 -16
- package/dist/core/closed-session-card.d.ts.map +0 -1
- package/dist/core/closed-session-card.js +0 -80
- package/dist/core/closed-session-card.js.map +0 -1
- package/dist/core/coco-picker-keys.d.ts +0 -31
- package/dist/core/coco-picker-keys.d.ts.map +0 -1
- package/dist/core/coco-picker-keys.js +0 -60
- package/dist/core/coco-picker-keys.js.map +0 -1
- package/dist/core/command-discovery.d.ts +0 -33
- package/dist/core/command-discovery.d.ts.map +0 -1
- package/dist/core/command-discovery.js +0 -261
- package/dist/core/command-discovery.js.map +0 -1
- package/dist/core/command-handler.d.ts +0 -163
- package/dist/core/command-handler.d.ts.map +0 -1
- package/dist/core/command-handler.js +0 -4108
- package/dist/core/command-handler.js.map +0 -1
- package/dist/core/cost-calculator.d.ts +0 -69
- package/dist/core/cost-calculator.d.ts.map +0 -1
- package/dist/core/cost-calculator.js +0 -603
- package/dist/core/cost-calculator.js.map +0 -1
- package/dist/core/current-turn-provenance.d.ts +0 -39
- package/dist/core/current-turn-provenance.d.ts.map +0 -1
- package/dist/core/current-turn-provenance.js +0 -122
- package/dist/core/current-turn-provenance.js.map +0 -1
- package/dist/core/daemon-config-fence.d.ts +0 -8
- package/dist/core/daemon-config-fence.d.ts.map +0 -1
- package/dist/core/daemon-config-fence.js +0 -13
- package/dist/core/daemon-config-fence.js.map +0 -1
- package/dist/core/daemon-heartbeat.d.ts +0 -15
- package/dist/core/daemon-heartbeat.d.ts.map +0 -1
- package/dist/core/daemon-heartbeat.js +0 -83
- package/dist/core/daemon-heartbeat.js.map +0 -1
- package/dist/core/daemon-ipc-auth.d.ts +0 -20
- package/dist/core/daemon-ipc-auth.d.ts.map +0 -1
- package/dist/core/daemon-ipc-auth.js +0 -44
- package/dist/core/daemon-ipc-auth.js.map +0 -1
- package/dist/core/daemon-ipc-session-auth.d.ts +0 -37
- package/dist/core/daemon-ipc-session-auth.d.ts.map +0 -1
- package/dist/core/daemon-ipc-session-auth.js +0 -35
- package/dist/core/daemon-ipc-session-auth.js.map +0 -1
- package/dist/core/dashboard-command/groups.d.ts +0 -20
- package/dist/core/dashboard-command/groups.d.ts.map +0 -1
- package/dist/core/dashboard-command/groups.js +0 -52
- package/dist/core/dashboard-command/groups.js.map +0 -1
- package/dist/core/dashboard-command/index.d.ts +0 -28
- package/dist/core/dashboard-command/index.d.ts.map +0 -1
- package/dist/core/dashboard-command/index.js +0 -81
- package/dist/core/dashboard-command/index.js.map +0 -1
- package/dist/core/dashboard-command/overview.d.ts +0 -29
- package/dist/core/dashboard-command/overview.d.ts.map +0 -1
- package/dist/core/dashboard-command/overview.js +0 -61
- package/dist/core/dashboard-command/overview.js.map +0 -1
- package/dist/core/dashboard-command/owner-gate.d.ts +0 -41
- package/dist/core/dashboard-command/owner-gate.d.ts.map +0 -1
- package/dist/core/dashboard-command/owner-gate.js +0 -40
- package/dist/core/dashboard-command/owner-gate.js.map +0 -1
- package/dist/core/dashboard-command/schedules.d.ts +0 -20
- package/dist/core/dashboard-command/schedules.d.ts.map +0 -1
- package/dist/core/dashboard-command/schedules.js +0 -47
- package/dist/core/dashboard-command/schedules.js.map +0 -1
- package/dist/core/dashboard-command/sessions.d.ts +0 -22
- package/dist/core/dashboard-command/sessions.d.ts.map +0 -1
- package/dist/core/dashboard-command/sessions.js +0 -43
- package/dist/core/dashboard-command/sessions.js.map +0 -1
- package/dist/core/dashboard-command/settings.d.ts +0 -21
- package/dist/core/dashboard-command/settings.d.ts.map +0 -1
- package/dist/core/dashboard-command/settings.js +0 -55
- package/dist/core/dashboard-command/settings.js.map +0 -1
- package/dist/core/dashboard-command/stub.d.ts +0 -16
- package/dist/core/dashboard-command/stub.d.ts.map +0 -1
- package/dist/core/dashboard-command/stub.js +0 -27
- package/dist/core/dashboard-command/stub.js.map +0 -1
- package/dist/core/dashboard-events.d.ts +0 -67
- package/dist/core/dashboard-events.d.ts.map +0 -1
- package/dist/core/dashboard-events.js +0 -23
- package/dist/core/dashboard-events.js.map +0 -1
- package/dist/core/dashboard-images.d.ts +0 -29
- package/dist/core/dashboard-images.d.ts.map +0 -1
- package/dist/core/dashboard-images.js +0 -113
- package/dist/core/dashboard-images.js.map +0 -1
- package/dist/core/dashboard-ipc-server.d.ts +0 -114
- package/dist/core/dashboard-ipc-server.d.ts.map +0 -1
- package/dist/core/dashboard-ipc-server.js +0 -4398
- package/dist/core/dashboard-ipc-server.js.map +0 -1
- package/dist/core/dashboard-locate.d.ts +0 -20
- package/dist/core/dashboard-locate.d.ts.map +0 -1
- package/dist/core/dashboard-locate.js +0 -26
- package/dist/core/dashboard-locate.js.map +0 -1
- package/dist/core/dashboard-rows.d.ts +0 -117
- package/dist/core/dashboard-rows.d.ts.map +0 -1
- package/dist/core/dashboard-rows.js +0 -206
- package/dist/core/dashboard-rows.js.map +0 -1
- package/dist/core/dashboard-secret.d.ts +0 -3
- package/dist/core/dashboard-secret.d.ts.map +0 -1
- package/dist/core/dashboard-secret.js +0 -7
- package/dist/core/dashboard-secret.js.map +0 -1
- package/dist/core/dashboard-url.d.ts +0 -79
- package/dist/core/dashboard-url.d.ts.map +0 -1
- package/dist/core/dashboard-url.js +0 -107
- package/dist/core/dashboard-url.js.map +0 -1
- package/dist/core/data-dir.d.ts +0 -24
- package/dist/core/data-dir.d.ts.map +0 -1
- package/dist/core/data-dir.js +0 -48
- package/dist/core/data-dir.js.map +0 -1
- package/dist/core/deferred-schedule-settlement.d.ts +0 -20
- package/dist/core/deferred-schedule-settlement.d.ts.map +0 -1
- package/dist/core/deferred-schedule-settlement.js +0 -18
- package/dist/core/deferred-schedule-settlement.js.map +0 -1
- package/dist/core/deferred-topic-binding.d.ts +0 -19
- package/dist/core/deferred-topic-binding.d.ts.map +0 -1
- package/dist/core/deferred-topic-binding.js +0 -55
- package/dist/core/deferred-topic-binding.js.map +0 -1
- package/dist/core/device-isolation-activation.d.ts +0 -56
- package/dist/core/device-isolation-activation.d.ts.map +0 -1
- package/dist/core/device-isolation-activation.js +0 -110
- package/dist/core/device-isolation-activation.js.map +0 -1
- package/dist/core/device-isolation-daemon.d.ts +0 -106
- package/dist/core/device-isolation-daemon.d.ts.map +0 -1
- package/dist/core/device-isolation-daemon.js +0 -674
- package/dist/core/device-isolation-daemon.js.map +0 -1
- package/dist/core/dispatch-registry.d.ts +0 -12
- package/dist/core/dispatch-registry.d.ts.map +0 -1
- package/dist/core/dispatch-registry.js +0 -33
- package/dist/core/dispatch-registry.js.map +0 -1
- package/dist/core/dispatch.d.ts +0 -364
- package/dist/core/dispatch.d.ts.map +0 -1
- package/dist/core/dispatch.js +0 -527
- package/dist/core/dispatch.js.map +0 -1
- package/dist/core/doc-comment-poller.d.ts +0 -36
- package/dist/core/doc-comment-poller.d.ts.map +0 -1
- package/dist/core/doc-comment-poller.js +0 -60
- package/dist/core/doc-comment-poller.js.map +0 -1
- package/dist/core/doc-comment-prompt.d.ts +0 -90
- package/dist/core/doc-comment-prompt.d.ts.map +0 -1
- package/dist/core/doc-comment-prompt.js +0 -252
- package/dist/core/doc-comment-prompt.js.map +0 -1
- package/dist/core/doc-watch-command.d.ts +0 -22
- package/dist/core/doc-watch-command.d.ts.map +0 -1
- package/dist/core/doc-watch-command.js +0 -41
- package/dist/core/doc-watch-command.js.map +0 -1
- package/dist/core/github-auth.d.ts +0 -13
- package/dist/core/github-auth.d.ts.map +0 -1
- package/dist/core/github-auth.js +0 -82
- package/dist/core/github-auth.js.map +0 -1
- package/dist/core/host-overload-alert.d.ts +0 -232
- package/dist/core/host-overload-alert.d.ts.map +0 -1
- package/dist/core/host-overload-alert.js +0 -354
- package/dist/core/host-overload-alert.js.map +0 -1
- package/dist/core/idle-worker-sweeper.d.ts +0 -39
- package/dist/core/idle-worker-sweeper.d.ts.map +0 -1
- package/dist/core/idle-worker-sweeper.js +0 -63
- package/dist/core/idle-worker-sweeper.js.map +0 -1
- package/dist/core/inflight-input-tracker.d.ts +0 -54
- package/dist/core/inflight-input-tracker.d.ts.map +0 -1
- package/dist/core/inflight-input-tracker.js +0 -64
- package/dist/core/inflight-input-tracker.js.map +0 -1
- package/dist/core/inherit-peer.d.ts +0 -19
- package/dist/core/inherit-peer.d.ts.map +0 -1
- package/dist/core/inherit-peer.js +0 -55
- package/dist/core/inherit-peer.js.map +0 -1
- package/dist/core/initial-user-turn.d.ts +0 -14
- package/dist/core/initial-user-turn.d.ts.map +0 -1
- package/dist/core/initial-user-turn.js +0 -65
- package/dist/core/initial-user-turn.js.map +0 -1
- package/dist/core/inject-queue-policy.d.ts +0 -70
- package/dist/core/inject-queue-policy.d.ts.map +0 -1
- package/dist/core/inject-queue-policy.js +0 -30
- package/dist/core/inject-queue-policy.js.map +0 -1
- package/dist/core/input-turn-dedupe.d.ts +0 -20
- package/dist/core/input-turn-dedupe.d.ts.map +0 -1
- package/dist/core/input-turn-dedupe.js +0 -57
- package/dist/core/input-turn-dedupe.js.map +0 -1
- package/dist/core/local-terminal-opener.d.ts +0 -43
- package/dist/core/local-terminal-opener.d.ts.map +0 -1
- package/dist/core/local-terminal-opener.js +0 -230
- package/dist/core/local-terminal-opener.js.map +0 -1
- package/dist/core/maintenance-schedule.d.ts +0 -34
- package/dist/core/maintenance-schedule.d.ts.map +0 -1
- package/dist/core/maintenance-schedule.js +0 -72
- package/dist/core/maintenance-schedule.js.map +0 -1
- package/dist/core/maintenance.d.ts +0 -114
- package/dist/core/maintenance.d.ts.map +0 -1
- package/dist/core/maintenance.js +0 -340
- package/dist/core/maintenance.js.map +0 -1
- package/dist/core/managed-origin-capability.d.ts +0 -37
- package/dist/core/managed-origin-capability.d.ts.map +0 -1
- package/dist/core/managed-origin-capability.js +0 -100
- package/dist/core/managed-origin-capability.js.map +0 -1
- package/dist/core/passthrough-commands.d.ts +0 -56
- package/dist/core/passthrough-commands.d.ts.map +0 -1
- package/dist/core/passthrough-commands.js +0 -120
- package/dist/core/passthrough-commands.js.map +0 -1
- package/dist/core/pending-response.d.ts +0 -4
- package/dist/core/pending-response.d.ts.map +0 -1
- package/dist/core/pending-response.js +0 -11
- package/dist/core/pending-response.js.map +0 -1
- package/dist/core/per-bot-env.d.ts +0 -38
- package/dist/core/per-bot-env.d.ts.map +0 -1
- package/dist/core/per-bot-env.js +0 -94
- package/dist/core/per-bot-env.js.map +0 -1
- package/dist/core/persistent-backend.d.ts +0 -107
- package/dist/core/persistent-backend.d.ts.map +0 -1
- package/dist/core/persistent-backend.js +0 -235
- package/dist/core/persistent-backend.js.map +0 -1
- package/dist/core/plugins/cli-generation.d.ts +0 -30
- package/dist/core/plugins/cli-generation.d.ts.map +0 -1
- package/dist/core/plugins/cli-generation.js +0 -62
- package/dist/core/plugins/cli-generation.js.map +0 -1
- package/dist/core/plugins/convention-scanner.d.ts +0 -4
- package/dist/core/plugins/convention-scanner.d.ts.map +0 -1
- package/dist/core/plugins/convention-scanner.js +0 -202
- package/dist/core/plugins/convention-scanner.js.map +0 -1
- package/dist/core/plugins/dependencies.d.ts +0 -5
- package/dist/core/plugins/dependencies.d.ts.map +0 -1
- package/dist/core/plugins/dependencies.js +0 -50
- package/dist/core/plugins/dependencies.js.map +0 -1
- package/dist/core/plugins/effective.d.ts +0 -5
- package/dist/core/plugins/effective.d.ts.map +0 -1
- package/dist/core/plugins/effective.js +0 -16
- package/dist/core/plugins/effective.js.map +0 -1
- package/dist/core/plugins/ids.d.ts +0 -4
- package/dist/core/plugins/ids.d.ts.map +0 -1
- package/dist/core/plugins/ids.js +0 -30
- package/dist/core/plugins/ids.js.map +0 -1
- package/dist/core/plugins/init.d.ts +0 -23
- package/dist/core/plugins/init.d.ts.map +0 -1
- package/dist/core/plugins/init.js +0 -332
- package/dist/core/plugins/init.js.map +0 -1
- package/dist/core/plugins/install.d.ts +0 -14
- package/dist/core/plugins/install.d.ts.map +0 -1
- package/dist/core/plugins/install.js +0 -234
- package/dist/core/plugins/install.js.map +0 -1
- package/dist/core/plugins/manifest.d.ts +0 -4
- package/dist/core/plugins/manifest.d.ts.map +0 -1
- package/dist/core/plugins/manifest.js +0 -78
- package/dist/core/plugins/manifest.js.map +0 -1
- package/dist/core/plugins/materializer.d.ts +0 -16
- package/dist/core/plugins/materializer.d.ts.map +0 -1
- package/dist/core/plugins/materializer.js +0 -73
- package/dist/core/plugins/materializer.js.map +0 -1
- package/dist/core/plugins/mcp/environment.d.ts +0 -12
- package/dist/core/plugins/mcp/environment.d.ts.map +0 -1
- package/dist/core/plugins/mcp/environment.js +0 -17
- package/dist/core/plugins/mcp/environment.js.map +0 -1
- package/dist/core/plugins/mcp/gateway-installer.d.ts +0 -16
- package/dist/core/plugins/mcp/gateway-installer.d.ts.map +0 -1
- package/dist/core/plugins/mcp/gateway-installer.js +0 -273
- package/dist/core/plugins/mcp/gateway-installer.js.map +0 -1
- package/dist/core/plugins/mcp/gateway.d.ts +0 -63
- package/dist/core/plugins/mcp/gateway.d.ts.map +0 -1
- package/dist/core/plugins/mcp/gateway.js +0 -620
- package/dist/core/plugins/mcp/gateway.js.map +0 -1
- package/dist/core/plugins/mcp/host.d.ts +0 -18
- package/dist/core/plugins/mcp/host.d.ts.map +0 -1
- package/dist/core/plugins/mcp/host.js +0 -126
- package/dist/core/plugins/mcp/host.js.map +0 -1
- package/dist/core/plugins/mcp/private-store.d.ts +0 -15
- package/dist/core/plugins/mcp/private-store.d.ts.map +0 -1
- package/dist/core/plugins/mcp/private-store.js +0 -162
- package/dist/core/plugins/mcp/private-store.js.map +0 -1
- package/dist/core/plugins/mcp/session-runtime.d.ts +0 -25
- package/dist/core/plugins/mcp/session-runtime.d.ts.map +0 -1
- package/dist/core/plugins/mcp/session-runtime.js +0 -76
- package/dist/core/plugins/mcp/session-runtime.js.map +0 -1
- package/dist/core/plugins/mcp/socket-auth.d.ts +0 -9
- package/dist/core/plugins/mcp/socket-auth.d.ts.map +0 -1
- package/dist/core/plugins/mcp/socket-auth.js +0 -94
- package/dist/core/plugins/mcp/socket-auth.js.map +0 -1
- package/dist/core/plugins/paths.d.ts +0 -17
- package/dist/core/plugins/paths.d.ts.map +0 -1
- package/dist/core/plugins/paths.js +0 -71
- package/dist/core/plugins/paths.js.map +0 -1
- package/dist/core/plugins/pm2.d.ts +0 -13
- package/dist/core/plugins/pm2.d.ts.map +0 -1
- package/dist/core/plugins/pm2.js +0 -73
- package/dist/core/plugins/pm2.js.map +0 -1
- package/dist/core/plugins/runtime.d.ts +0 -54
- package/dist/core/plugins/runtime.d.ts.map +0 -1
- package/dist/core/plugins/runtime.js +0 -158
- package/dist/core/plugins/runtime.js.map +0 -1
- package/dist/core/plugins/service-manager.d.ts +0 -46
- package/dist/core/plugins/service-manager.d.ts.map +0 -1
- package/dist/core/plugins/service-manager.js +0 -403
- package/dist/core/plugins/service-manager.js.map +0 -1
- package/dist/core/plugins/session-manifest.d.ts +0 -25
- package/dist/core/plugins/session-manifest.d.ts.map +0 -1
- package/dist/core/plugins/session-manifest.js +0 -58
- package/dist/core/plugins/session-manifest.js.map +0 -1
- package/dist/core/plugins/skills.d.ts +0 -7
- package/dist/core/plugins/skills.d.ts.map +0 -1
- package/dist/core/plugins/skills.js +0 -36
- package/dist/core/plugins/skills.js.map +0 -1
- package/dist/core/plugins/types.d.ts +0 -139
- package/dist/core/plugins/types.d.ts.map +0 -1
- package/dist/core/plugins/types.js +0 -2
- package/dist/core/plugins/types.js.map +0 -1
- package/dist/core/reply-target.d.ts +0 -62
- package/dist/core/reply-target.d.ts.map +0 -1
- package/dist/core/reply-target.js +0 -122
- package/dist/core/reply-target.js.map +0 -1
- package/dist/core/resource-monitor/attribution.d.ts +0 -70
- package/dist/core/resource-monitor/attribution.d.ts.map +0 -1
- package/dist/core/resource-monitor/attribution.js +0 -238
- package/dist/core/resource-monitor/attribution.js.map +0 -1
- package/dist/core/resource-monitor/darwin.d.ts +0 -145
- package/dist/core/resource-monitor/darwin.d.ts.map +0 -1
- package/dist/core/resource-monitor/darwin.js +0 -360
- package/dist/core/resource-monitor/darwin.js.map +0 -1
- package/dist/core/resource-monitor/procfs.d.ts +0 -22
- package/dist/core/resource-monitor/procfs.d.ts.map +0 -1
- package/dist/core/resource-monitor/procfs.js +0 -140
- package/dist/core/resource-monitor/procfs.js.map +0 -1
- package/dist/core/resource-monitor/ring-buffer.d.ts +0 -15
- package/dist/core/resource-monitor/ring-buffer.d.ts.map +0 -1
- package/dist/core/resource-monitor/ring-buffer.js +0 -61
- package/dist/core/resource-monitor/ring-buffer.js.map +0 -1
- package/dist/core/resource-monitor/runtime.d.ts +0 -31
- package/dist/core/resource-monitor/runtime.d.ts.map +0 -1
- package/dist/core/resource-monitor/runtime.js +0 -92
- package/dist/core/resource-monitor/runtime.js.map +0 -1
- package/dist/core/resource-monitor/top-selector.d.ts +0 -18
- package/dist/core/resource-monitor/top-selector.d.ts.map +0 -1
- package/dist/core/resource-monitor/top-selector.js +0 -57
- package/dist/core/resource-monitor/top-selector.js.map +0 -1
- package/dist/core/resource-monitor/types.d.ts +0 -181
- package/dist/core/resource-monitor/types.d.ts.map +0 -1
- package/dist/core/resource-monitor/types.js +0 -2
- package/dist/core/resource-monitor/types.js.map +0 -1
- package/dist/core/restart-coordinator.d.ts +0 -28
- package/dist/core/restart-coordinator.d.ts.map +0 -1
- package/dist/core/restart-coordinator.js +0 -82
- package/dist/core/restart-coordinator.js.map +0 -1
- package/dist/core/restart-followup-policy.d.ts +0 -112
- package/dist/core/restart-followup-policy.d.ts.map +0 -1
- package/dist/core/restart-followup-policy.js +0 -49
- package/dist/core/restart-followup-policy.js.map +0 -1
- package/dist/core/restart-report.d.ts +0 -63
- package/dist/core/restart-report.d.ts.map +0 -1
- package/dist/core/restart-report.js +0 -122
- package/dist/core/restart-report.js.map +0 -1
- package/dist/core/role-library.d.ts +0 -62
- package/dist/core/role-library.d.ts.map +0 -1
- package/dist/core/role-library.js +0 -183
- package/dist/core/role-library.js.map +0 -1
- package/dist/core/role-resolver.d.ts +0 -81
- package/dist/core/role-resolver.d.ts.map +0 -1
- package/dist/core/role-resolver.js +0 -306
- package/dist/core/role-resolver.js.map +0 -1
- package/dist/core/scheduler.d.ts +0 -173
- package/dist/core/scheduler.d.ts.map +0 -1
- package/dist/core/scheduler.js +0 -799
- package/dist/core/scheduler.js.map +0 -1
- package/dist/core/session-activity.d.ts +0 -43
- package/dist/core/session-activity.d.ts.map +0 -1
- package/dist/core/session-activity.js +0 -131
- package/dist/core/session-activity.js.map +0 -1
- package/dist/core/session-board.d.ts +0 -13
- package/dist/core/session-board.d.ts.map +0 -1
- package/dist/core/session-board.js +0 -28
- package/dist/core/session-board.js.map +0 -1
- package/dist/core/session-create.d.ts +0 -109
- package/dist/core/session-create.d.ts.map +0 -1
- package/dist/core/session-create.js +0 -183
- package/dist/core/session-create.js.map +0 -1
- package/dist/core/session-cwd.d.ts +0 -14
- package/dist/core/session-cwd.d.ts.map +0 -1
- package/dist/core/session-cwd.js +0 -25
- package/dist/core/session-cwd.js.map +0 -1
- package/dist/core/session-discovery.d.ts +0 -241
- package/dist/core/session-discovery.d.ts.map +0 -1
- package/dist/core/session-discovery.js +0 -1127
- package/dist/core/session-discovery.js.map +0 -1
- package/dist/core/session-liveness.d.ts +0 -41
- package/dist/core/session-liveness.d.ts.map +0 -1
- package/dist/core/session-liveness.js +0 -50
- package/dist/core/session-liveness.js.map +0 -1
- package/dist/core/session-manager.d.ts +0 -383
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-manager.js +0 -2545
- package/dist/core/session-manager.js.map +0 -1
- package/dist/core/session-marker.d.ts +0 -56
- package/dist/core/session-marker.d.ts.map +0 -1
- package/dist/core/session-marker.js +0 -240
- package/dist/core/session-marker.js.map +0 -1
- package/dist/core/session-message-preview.d.ts +0 -20
- package/dist/core/session-message-preview.d.ts.map +0 -1
- package/dist/core/session-message-preview.js +0 -188
- package/dist/core/session-message-preview.js.map +0 -1
- package/dist/core/session-ready-handshake.d.ts +0 -11
- package/dist/core/session-ready-handshake.d.ts.map +0 -1
- package/dist/core/session-ready-handshake.js +0 -41
- package/dist/core/session-ready-handshake.js.map +0 -1
- package/dist/core/session-rename.d.ts +0 -25
- package/dist/core/session-rename.d.ts.map +0 -1
- package/dist/core/session-rename.js +0 -43
- package/dist/core/session-rename.js.map +0 -1
- package/dist/core/session-row-enrichment.d.ts +0 -15
- package/dist/core/session-row-enrichment.d.ts.map +0 -1
- package/dist/core/session-row-enrichment.js +0 -93
- package/dist/core/session-row-enrichment.js.map +0 -1
- package/dist/core/session-title.d.ts +0 -23
- package/dist/core/session-title.d.ts.map +0 -1
- package/dist/core/session-title.js +0 -88
- package/dist/core/session-title.js.map +0 -1
- package/dist/core/silent-schedule-turns.d.ts +0 -5
- package/dist/core/silent-schedule-turns.d.ts.map +0 -1
- package/dist/core/silent-schedule-turns.js +0 -47
- package/dist/core/silent-schedule-turns.js.map +0 -1
- package/dist/core/skills/claude-plugin-delivery.d.ts +0 -6
- package/dist/core/skills/claude-plugin-delivery.d.ts.map +0 -1
- package/dist/core/skills/claude-plugin-delivery.js +0 -21
- package/dist/core/skills/claude-plugin-delivery.js.map +0 -1
- package/dist/core/skills/cli-admin-command.d.ts +0 -7
- package/dist/core/skills/cli-admin-command.d.ts.map +0 -1
- package/dist/core/skills/cli-admin-command.js +0 -359
- package/dist/core/skills/cli-admin-command.js.map +0 -1
- package/dist/core/skills/cli-session-command.d.ts +0 -7
- package/dist/core/skills/cli-session-command.d.ts.map +0 -1
- package/dist/core/skills/cli-session-command.js +0 -72
- package/dist/core/skills/cli-session-command.js.map +0 -1
- package/dist/core/skills/delivery.d.ts +0 -11
- package/dist/core/skills/delivery.d.ts.map +0 -1
- package/dist/core/skills/delivery.js +0 -22
- package/dist/core/skills/delivery.js.map +0 -1
- package/dist/core/skills/discovery.d.ts +0 -26
- package/dist/core/skills/discovery.d.ts.map +0 -1
- package/dist/core/skills/discovery.js +0 -131
- package/dist/core/skills/discovery.js.map +0 -1
- package/dist/core/skills/frontmatter.d.ts +0 -9
- package/dist/core/skills/frontmatter.d.ts.map +0 -1
- package/dist/core/skills/frontmatter.js +0 -42
- package/dist/core/skills/frontmatter.js.map +0 -1
- package/dist/core/skills/im-command.d.ts +0 -9
- package/dist/core/skills/im-command.d.ts.map +0 -1
- package/dist/core/skills/im-command.js +0 -109
- package/dist/core/skills/im-command.js.map +0 -1
- package/dist/core/skills/manifest-store.d.ts +0 -5
- package/dist/core/skills/manifest-store.d.ts.map +0 -1
- package/dist/core/skills/manifest-store.js +0 -29
- package/dist/core/skills/manifest-store.js.map +0 -1
- package/dist/core/skills/package.d.ts +0 -13
- package/dist/core/skills/package.d.ts.map +0 -1
- package/dist/core/skills/package.js +0 -35
- package/dist/core/skills/package.js.map +0 -1
- package/dist/core/skills/policy.d.ts +0 -19
- package/dist/core/skills/policy.d.ts.map +0 -1
- package/dist/core/skills/policy.js +0 -73
- package/dist/core/skills/policy.js.map +0 -1
- package/dist/core/skills/prompt.d.ts +0 -3
- package/dist/core/skills/prompt.d.ts.map +0 -1
- package/dist/core/skills/prompt.js +0 -25
- package/dist/core/skills/prompt.js.map +0 -1
- package/dist/core/skills/references.d.ts +0 -21
- package/dist/core/skills/references.d.ts.map +0 -1
- package/dist/core/skills/references.js +0 -27
- package/dist/core/skills/references.js.map +0 -1
- package/dist/core/skills/registry-paths.d.ts +0 -5
- package/dist/core/skills/registry-paths.d.ts.map +0 -1
- package/dist/core/skills/registry-paths.js +0 -15
- package/dist/core/skills/registry-paths.js.map +0 -1
- package/dist/core/skills/resource-reader.d.ts +0 -9
- package/dist/core/skills/resource-reader.d.ts.map +0 -1
- package/dist/core/skills/resource-reader.js +0 -97
- package/dist/core/skills/resource-reader.js.map +0 -1
- package/dist/core/skills/session-resolver.d.ts +0 -15
- package/dist/core/skills/session-resolver.d.ts.map +0 -1
- package/dist/core/skills/session-resolver.js +0 -25
- package/dist/core/skills/session-resolver.js.map +0 -1
- package/dist/core/skills/session-runtime.d.ts +0 -15
- package/dist/core/skills/session-runtime.d.ts.map +0 -1
- package/dist/core/skills/session-runtime.js +0 -37
- package/dist/core/skills/session-runtime.js.map +0 -1
- package/dist/core/skills/sources.d.ts +0 -53
- package/dist/core/skills/sources.d.ts.map +0 -1
- package/dist/core/skills/sources.js +0 -257
- package/dist/core/skills/sources.js.map +0 -1
- package/dist/core/skills/types.d.ts +0 -83
- package/dist/core/skills/types.d.ts.map +0 -1
- package/dist/core/skills/types.js +0 -2
- package/dist/core/skills/types.js.map +0 -1
- package/dist/core/slash-inject.d.ts +0 -15
- package/dist/core/slash-inject.d.ts.map +0 -1
- package/dist/core/slash-inject.js +0 -25
- package/dist/core/slash-inject.js.map +0 -1
- package/dist/core/startup-commands.d.ts +0 -57
- package/dist/core/startup-commands.d.ts.map +0 -1
- package/dist/core/startup-commands.js +0 -85
- package/dist/core/startup-commands.js.map +0 -1
- package/dist/core/terminal-proxy.d.ts +0 -39
- package/dist/core/terminal-proxy.d.ts.map +0 -1
- package/dist/core/terminal-proxy.js +0 -160
- package/dist/core/terminal-proxy.js.map +0 -1
- package/dist/core/terminal-url.d.ts +0 -47
- package/dist/core/terminal-url.d.ts.map +0 -1
- package/dist/core/terminal-url.js +0 -87
- package/dist/core/terminal-url.js.map +0 -1
- package/dist/core/terminal-write-auth.d.ts +0 -75
- package/dist/core/terminal-write-auth.d.ts.map +0 -1
- package/dist/core/terminal-write-auth.js +0 -149
- package/dist/core/terminal-write-auth.js.map +0 -1
- package/dist/core/tmux-recovery.d.ts +0 -11
- package/dist/core/tmux-recovery.d.ts.map +0 -1
- package/dist/core/tmux-recovery.js +0 -19
- package/dist/core/tmux-recovery.js.map +0 -1
- package/dist/core/trigger-final-suppression.d.ts +0 -24
- package/dist/core/trigger-final-suppression.d.ts.map +0 -1
- package/dist/core/trigger-final-suppression.js +0 -97
- package/dist/core/trigger-final-suppression.js.map +0 -1
- package/dist/core/trigger-session.d.ts +0 -56
- package/dist/core/trigger-session.d.ts.map +0 -1
- package/dist/core/trigger-session.js +0 -637
- package/dist/core/trigger-session.js.map +0 -1
- package/dist/core/types.d.ts +0 -441
- package/dist/core/types.d.ts.map +0 -1
- package/dist/core/types.js +0 -128
- package/dist/core/types.js.map +0 -1
- package/dist/core/update-check.d.ts +0 -94
- package/dist/core/update-check.d.ts.map +0 -1
- package/dist/core/update-check.js +0 -216
- package/dist/core/update-check.js.map +0 -1
- package/dist/core/vc-meeting-prepare-command.d.ts +0 -22
- package/dist/core/vc-meeting-prepare-command.d.ts.map +0 -1
- package/dist/core/vc-meeting-prepare-command.js +0 -50
- package/dist/core/vc-meeting-prepare-command.js.map +0 -1
- package/dist/core/worker-ipc.d.ts +0 -11
- package/dist/core/worker-ipc.d.ts.map +0 -1
- package/dist/core/worker-ipc.js +0 -26
- package/dist/core/worker-ipc.js.map +0 -1
- package/dist/core/worker-pool.d.ts +0 -788
- package/dist/core/worker-pool.d.ts.map +0 -1
- package/dist/core/worker-pool.js +0 -6914
- package/dist/core/worker-pool.js.map +0 -1
- package/dist/core/working-dir.d.ts +0 -27
- package/dist/core/working-dir.d.ts.map +0 -1
- package/dist/core/working-dir.js +0 -52
- package/dist/core/working-dir.js.map +0 -1
- package/dist/core/zellij-adopt-discovery.d.ts +0 -42
- package/dist/core/zellij-adopt-discovery.d.ts.map +0 -1
- package/dist/core/zellij-adopt-discovery.js +0 -259
- package/dist/core/zellij-adopt-discovery.js.map +0 -1
- package/dist/core/zellij-session-discovery.d.ts +0 -76
- package/dist/core/zellij-session-discovery.d.ts.map +0 -1
- package/dist/core/zellij-session-discovery.js +0 -260
- package/dist/core/zellij-session-discovery.js.map +0 -1
- package/dist/daemon-internal-client-wrapper.d.ts +0 -41
- package/dist/daemon-internal-client-wrapper.d.ts.map +0 -1
- package/dist/daemon-internal-client-wrapper.js +0 -65
- package/dist/daemon-internal-client-wrapper.js.map +0 -1
- package/dist/daemon.d.ts +0 -610
- package/dist/daemon.d.ts.map +0 -1
- package/dist/daemon.js +0 -16756
- package/dist/daemon.js.map +0 -1
- package/dist/dashboard/aggregator.d.ts +0 -59
- package/dist/dashboard/aggregator.d.ts.map +0 -1
- package/dist/dashboard/aggregator.js +0 -176
- package/dist/dashboard/aggregator.js.map +0 -1
- package/dist/dashboard/auth.d.ts +0 -106
- package/dist/dashboard/auth.d.ts.map +0 -1
- package/dist/dashboard/auth.js +0 -253
- package/dist/dashboard/auth.js.map +0 -1
- package/dist/dashboard/bot-onboarding.d.ts +0 -320
- package/dist/dashboard/bot-onboarding.d.ts.map +0 -1
- package/dist/dashboard/bot-onboarding.js +0 -1666
- package/dist/dashboard/bot-onboarding.js.map +0 -1
- package/dist/dashboard/bot-payload.d.ts +0 -94
- package/dist/dashboard/bot-payload.d.ts.map +0 -1
- package/dist/dashboard/bot-payload.js +0 -96
- package/dist/dashboard/bot-payload.js.map +0 -1
- package/dist/dashboard/card-model-types.d.ts +0 -50
- package/dist/dashboard/card-model-types.d.ts.map +0 -1
- package/dist/dashboard/card-model-types.js +0 -9
- package/dist/dashboard/card-model-types.js.map +0 -1
- package/dist/dashboard/compat.d.ts +0 -119
- package/dist/dashboard/compat.d.ts.map +0 -1
- package/dist/dashboard/compat.js +0 -102
- package/dist/dashboard/compat.js.map +0 -1
- package/dist/dashboard/connector-api.d.ts +0 -3
- package/dist/dashboard/connector-api.d.ts.map +0 -1
- package/dist/dashboard/connector-api.js +0 -453
- package/dist/dashboard/connector-api.js.map +0 -1
- package/dist/dashboard/daemon-internal-api.d.ts +0 -88
- package/dist/dashboard/daemon-internal-api.d.ts.map +0 -1
- package/dist/dashboard/daemon-internal-api.js +0 -476
- package/dist/dashboard/daemon-internal-api.js.map +0 -1
- package/dist/dashboard/daemon-internal-auth.d.ts +0 -124
- package/dist/dashboard/daemon-internal-auth.d.ts.map +0 -1
- package/dist/dashboard/daemon-internal-auth.js +0 -188
- package/dist/dashboard/daemon-internal-auth.js.map +0 -1
- package/dist/dashboard/daemon-internal-client.d.ts +0 -67
- package/dist/dashboard/daemon-internal-client.d.ts.map +0 -1
- package/dist/dashboard/daemon-internal-client.js +0 -156
- package/dist/dashboard/daemon-internal-client.js.map +0 -1
- package/dist/dashboard/dashboard-admins.d.ts +0 -8
- package/dist/dashboard/dashboard-admins.d.ts.map +0 -1
- package/dist/dashboard/dashboard-admins.js +0 -15
- package/dist/dashboard/dashboard-admins.js.map +0 -1
- package/dist/dashboard/debug-terminal.d.ts +0 -18
- package/dist/dashboard/debug-terminal.d.ts.map +0 -1
- package/dist/dashboard/debug-terminal.js +0 -338
- package/dist/dashboard/debug-terminal.js.map +0 -1
- package/dist/dashboard/desktop-asks.d.ts +0 -21
- package/dist/dashboard/desktop-asks.d.ts.map +0 -1
- package/dist/dashboard/desktop-asks.js +0 -49
- package/dist/dashboard/desktop-asks.js.map +0 -1
- package/dist/dashboard/federated-group-core.d.ts +0 -75
- package/dist/dashboard/federated-group-core.d.ts.map +0 -1
- package/dist/dashboard/federated-group-core.js +0 -236
- package/dist/dashboard/federated-group-core.js.map +0 -1
- package/dist/dashboard/federation-api.d.ts +0 -43
- package/dist/dashboard/federation-api.d.ts.map +0 -1
- package/dist/dashboard/federation-api.js +0 -580
- package/dist/dashboard/federation-api.js.map +0 -1
- package/dist/dashboard/federation-spoke-api.d.ts +0 -129
- package/dist/dashboard/federation-spoke-api.d.ts.map +0 -1
- package/dist/dashboard/federation-spoke-api.js +0 -809
- package/dist/dashboard/federation-spoke-api.js.map +0 -1
- package/dist/dashboard/feishu-login.d.ts +0 -64
- package/dist/dashboard/feishu-login.d.ts.map +0 -1
- package/dist/dashboard/feishu-login.js +0 -99
- package/dist/dashboard/feishu-login.js.map +0 -1
- package/dist/dashboard/groups-action-helpers.d.ts +0 -71
- package/dist/dashboard/groups-action-helpers.d.ts.map +0 -1
- package/dist/dashboard/groups-action-helpers.js +0 -150
- package/dist/dashboard/groups-action-helpers.js.map +0 -1
- package/dist/dashboard/groups-card-model.d.ts +0 -120
- package/dist/dashboard/groups-card-model.d.ts.map +0 -1
- package/dist/dashboard/groups-card-model.js +0 -175
- package/dist/dashboard/groups-card-model.js.map +0 -1
- package/dist/dashboard/groups-matrix-snapshot.d.ts +0 -56
- package/dist/dashboard/groups-matrix-snapshot.d.ts.map +0 -1
- package/dist/dashboard/groups-matrix-snapshot.js +0 -127
- package/dist/dashboard/groups-matrix-snapshot.js.map +0 -1
- package/dist/dashboard/hd2d-assets.d.ts +0 -20
- package/dist/dashboard/hd2d-assets.d.ts.map +0 -1
- package/dist/dashboard/hd2d-assets.js +0 -216
- package/dist/dashboard/hd2d-assets.js.map +0 -1
- package/dist/dashboard/history-senders.d.ts +0 -40
- package/dist/dashboard/history-senders.d.ts.map +0 -1
- package/dist/dashboard/history-senders.js +0 -60
- package/dist/dashboard/history-senders.js.map +0 -1
- package/dist/dashboard/http.d.ts +0 -4
- package/dist/dashboard/http.d.ts.map +0 -1
- package/dist/dashboard/http.js +0 -6
- package/dist/dashboard/http.js.map +0 -1
- package/dist/dashboard/operator-selector.d.ts +0 -20
- package/dist/dashboard/operator-selector.d.ts.map +0 -1
- package/dist/dashboard/operator-selector.js +0 -39
- package/dist/dashboard/operator-selector.js.map +0 -1
- package/dist/dashboard/public-redact.d.ts +0 -32
- package/dist/dashboard/public-redact.d.ts.map +0 -1
- package/dist/dashboard/public-redact.js +0 -137
- package/dist/dashboard/public-redact.js.map +0 -1
- package/dist/dashboard/registry.d.ts +0 -56
- package/dist/dashboard/registry.d.ts.map +0 -1
- package/dist/dashboard/registry.js +0 -99
- package/dist/dashboard/registry.js.map +0 -1
- package/dist/dashboard/resource-monitor-service.d.ts +0 -56
- package/dist/dashboard/resource-monitor-service.d.ts.map +0 -1
- package/dist/dashboard/resource-monitor-service.js +0 -462
- package/dist/dashboard/resource-monitor-service.js.map +0 -1
- package/dist/dashboard/roles-batch.d.ts +0 -31
- package/dist/dashboard/roles-batch.d.ts.map +0 -1
- package/dist/dashboard/roles-batch.js +0 -87
- package/dist/dashboard/roles-batch.js.map +0 -1
- package/dist/dashboard/schedule-card-model.d.ts +0 -185
- package/dist/dashboard/schedule-card-model.d.ts.map +0 -1
- package/dist/dashboard/schedule-card-model.js +0 -320
- package/dist/dashboard/schedule-card-model.js.map +0 -1
- package/dist/dashboard/session-card-model.d.ts +0 -83
- package/dist/dashboard/session-card-model.d.ts.map +0 -1
- package/dist/dashboard/session-card-model.js +0 -207
- package/dist/dashboard/session-card-model.js.map +0 -1
- package/dist/dashboard/session-cleanup.d.ts +0 -31
- package/dist/dashboard/session-cleanup.d.ts.map +0 -1
- package/dist/dashboard/session-cleanup.js +0 -49
- package/dist/dashboard/session-cleanup.js.map +0 -1
- package/dist/dashboard/session-presentation.d.ts +0 -16
- package/dist/dashboard/session-presentation.d.ts.map +0 -1
- package/dist/dashboard/session-presentation.js +0 -62
- package/dist/dashboard/session-presentation.js.map +0 -1
- package/dist/dashboard/settings-card-model.d.ts +0 -76
- package/dist/dashboard/settings-card-model.d.ts.map +0 -1
- package/dist/dashboard/settings-card-model.js +0 -109
- package/dist/dashboard/settings-card-model.js.map +0 -1
- package/dist/dashboard/settings-owner-resolver.d.ts +0 -32
- package/dist/dashboard/settings-owner-resolver.d.ts.map +0 -1
- package/dist/dashboard/settings-owner-resolver.js +0 -43
- package/dist/dashboard/settings-owner-resolver.js.map +0 -1
- package/dist/dashboard/settings-write-applier.d.ts +0 -219
- package/dist/dashboard/settings-write-applier.d.ts.map +0 -1
- package/dist/dashboard/settings-write-applier.js +0 -467
- package/dist/dashboard/settings-write-applier.js.map +0 -1
- package/dist/dashboard/skill-install-request.d.ts +0 -46
- package/dist/dashboard/skill-install-request.d.ts.map +0 -1
- package/dist/dashboard/skill-install-request.js +0 -150
- package/dist/dashboard/skill-install-request.js.map +0 -1
- package/dist/dashboard/stale-chunk-module.d.ts +0 -3
- package/dist/dashboard/stale-chunk-module.d.ts.map +0 -1
- package/dist/dashboard/stale-chunk-module.js +0 -55
- package/dist/dashboard/stale-chunk-module.js.map +0 -1
- package/dist/dashboard/team-group.d.ts +0 -39
- package/dist/dashboard/team-group.d.ts.map +0 -1
- package/dist/dashboard/team-group.js +0 -23
- package/dist/dashboard/team-group.js.map +0 -1
- package/dist/dashboard/trigger-api.d.ts +0 -25
- package/dist/dashboard/trigger-api.d.ts.map +0 -1
- package/dist/dashboard/trigger-api.js +0 -153
- package/dist/dashboard/trigger-api.js.map +0 -1
- package/dist/dashboard/v3-runs-api.d.ts +0 -29
- package/dist/dashboard/v3-runs-api.d.ts.map +0 -1
- package/dist/dashboard/v3-runs-api.js +0 -184
- package/dist/dashboard/v3-runs-api.js.map +0 -1
- package/dist/dashboard/vc-consumer-profiles-api.d.ts +0 -110
- package/dist/dashboard/vc-consumer-profiles-api.d.ts.map +0 -1
- package/dist/dashboard/vc-consumer-profiles-api.js +0 -325
- package/dist/dashboard/vc-consumer-profiles-api.js.map +0 -1
- package/dist/dashboard/web/app.d.ts +0 -3
- package/dist/dashboard/web/app.d.ts.map +0 -1
- package/dist/dashboard/web/app.js +0 -962
- package/dist/dashboard/web/app.js.map +0 -1
- package/dist/dashboard/web/auth-login.d.ts +0 -3
- package/dist/dashboard/web/auth-login.d.ts.map +0 -1
- package/dist/dashboard/web/auth-login.js +0 -19
- package/dist/dashboard/web/auth-login.js.map +0 -1
- package/dist/dashboard/web/bot-defaults-page.d.ts +0 -78
- package/dist/dashboard/web/bot-defaults-page.d.ts.map +0 -1
- package/dist/dashboard/web/bot-defaults-page.js +0 -2486
- package/dist/dashboard/web/bot-defaults-page.js.map +0 -1
- package/dist/dashboard/web/bot-defaults.d.ts +0 -163
- package/dist/dashboard/web/bot-defaults.d.ts.map +0 -1
- package/dist/dashboard/web/bot-defaults.js +0 -127
- package/dist/dashboard/web/bot-defaults.js.map +0 -1
- package/dist/dashboard/web/bot-onboarding.d.ts +0 -9
- package/dist/dashboard/web/bot-onboarding.d.ts.map +0 -1
- package/dist/dashboard/web/bot-onboarding.js +0 -421
- package/dist/dashboard/web/bot-onboarding.js.map +0 -1
- package/dist/dashboard/web/client-shell.d.ts +0 -29
- package/dist/dashboard/web/client-shell.d.ts.map +0 -1
- package/dist/dashboard/web/client-shell.js +0 -89
- package/dist/dashboard/web/client-shell.js.map +0 -1
- package/dist/dashboard/web/clipboard.d.ts +0 -2
- package/dist/dashboard/web/clipboard.d.ts.map +0 -1
- package/dist/dashboard/web/clipboard.js +0 -42
- package/dist/dashboard/web/clipboard.js.map +0 -1
- package/dist/dashboard/web/connectors-page.d.ts +0 -23
- package/dist/dashboard/web/connectors-page.d.ts.map +0 -1
- package/dist/dashboard/web/connectors-page.js +0 -516
- package/dist/dashboard/web/connectors-page.js.map +0 -1
- package/dist/dashboard/web/create-session-composer.d.ts +0 -35
- package/dist/dashboard/web/create-session-composer.d.ts.map +0 -1
- package/dist/dashboard/web/create-session-composer.js +0 -70
- package/dist/dashboard/web/create-session-composer.js.map +0 -1
- package/dist/dashboard/web/create-session-entry.d.ts +0 -4
- package/dist/dashboard/web/create-session-entry.d.ts.map +0 -1
- package/dist/dashboard/web/create-session-entry.js +0 -17
- package/dist/dashboard/web/create-session-entry.js.map +0 -1
- package/dist/dashboard/web/cyber-fx.d.ts +0 -6
- package/dist/dashboard/web/cyber-fx.d.ts.map +0 -1
- package/dist/dashboard/web/cyber-fx.js +0 -289
- package/dist/dashboard/web/cyber-fx.js.map +0 -1
- package/dist/dashboard/web/dashboard-api.d.ts +0 -9
- package/dist/dashboard/web/dashboard-api.d.ts.map +0 -1
- package/dist/dashboard/web/dashboard-api.js +0 -18
- package/dist/dashboard/web/dashboard-api.js.map +0 -1
- package/dist/dashboard/web/dashboard-components.d.ts +0 -105
- package/dist/dashboard/web/dashboard-components.d.ts.map +0 -1
- package/dist/dashboard/web/dashboard-components.js +0 -284
- package/dist/dashboard/web/dashboard-components.js.map +0 -1
- package/dist/dashboard/web/dashboard-routes.d.ts +0 -14
- package/dist/dashboard/web/dashboard-routes.d.ts.map +0 -1
- package/dist/dashboard/web/dashboard-routes.js +0 -49
- package/dist/dashboard/web/dashboard-routes.js.map +0 -1
- package/dist/dashboard/web/floating-scrollbars.d.ts +0 -2
- package/dist/dashboard/web/floating-scrollbars.d.ts.map +0 -1
- package/dist/dashboard/web/floating-scrollbars.js +0 -264
- package/dist/dashboard/web/floating-scrollbars.js.map +0 -1
- package/dist/dashboard/web/groups-api.d.ts +0 -36
- package/dist/dashboard/web/groups-api.d.ts.map +0 -1
- package/dist/dashboard/web/groups-api.js +0 -44
- package/dist/dashboard/web/groups-api.js.map +0 -1
- package/dist/dashboard/web/groups-page.d.ts +0 -3
- package/dist/dashboard/web/groups-page.d.ts.map +0 -1
- package/dist/dashboard/web/groups-page.js +0 -761
- package/dist/dashboard/web/groups-page.js.map +0 -1
- package/dist/dashboard/web/groups.d.ts +0 -58
- package/dist/dashboard/web/groups.d.ts.map +0 -1
- package/dist/dashboard/web/groups.js +0 -203
- package/dist/dashboard/web/groups.js.map +0 -1
- package/dist/dashboard/web/i18n.d.ts +0 -7
- package/dist/dashboard/web/i18n.d.ts.map +0 -1
- package/dist/dashboard/web/i18n.js +0 -4295
- package/dist/dashboard/web/i18n.js.map +0 -1
- package/dist/dashboard/web/icon-tooltip.d.ts +0 -3
- package/dist/dashboard/web/icon-tooltip.d.ts.map +0 -1
- package/dist/dashboard/web/icon-tooltip.js +0 -123
- package/dist/dashboard/web/icon-tooltip.js.map +0 -1
- package/dist/dashboard/web/insights-page.d.ts +0 -3
- package/dist/dashboard/web/insights-page.d.ts.map +0 -1
- package/dist/dashboard/web/insights-page.js +0 -1059
- package/dist/dashboard/web/insights-page.js.map +0 -1
- package/dist/dashboard/web/insights.d.ts +0 -189
- package/dist/dashboard/web/insights.d.ts.map +0 -1
- package/dist/dashboard/web/insights.js +0 -519
- package/dist/dashboard/web/insights.js.map +0 -1
- package/dist/dashboard/web/kanban-model.d.ts +0 -19
- package/dist/dashboard/web/kanban-model.d.ts.map +0 -1
- package/dist/dashboard/web/kanban-model.js +0 -40
- package/dist/dashboard/web/kanban-model.js.map +0 -1
- package/dist/dashboard/web/listener-filters.d.ts +0 -54
- package/dist/dashboard/web/listener-filters.d.ts.map +0 -1
- package/dist/dashboard/web/listener-filters.js +0 -94
- package/dist/dashboard/web/listener-filters.js.map +0 -1
- package/dist/dashboard/web/monitor-room-store.d.ts +0 -20
- package/dist/dashboard/web/monitor-room-store.d.ts.map +0 -1
- package/dist/dashboard/web/monitor-room-store.js +0 -80
- package/dist/dashboard/web/monitor-room-store.js.map +0 -1
- package/dist/dashboard/web/monitor-room.d.ts +0 -31
- package/dist/dashboard/web/monitor-room.d.ts.map +0 -1
- package/dist/dashboard/web/monitor-room.js +0 -395
- package/dist/dashboard/web/monitor-room.js.map +0 -1
- package/dist/dashboard/web/monitoring-page.d.ts +0 -155
- package/dist/dashboard/web/monitoring-page.d.ts.map +0 -1
- package/dist/dashboard/web/monitoring-page.js +0 -363
- package/dist/dashboard/web/monitoring-page.js.map +0 -1
- package/dist/dashboard/web/office-page.d.ts +0 -3
- package/dist/dashboard/web/office-page.d.ts.map +0 -1
- package/dist/dashboard/web/office-page.js +0 -137
- package/dist/dashboard/web/office-page.js.map +0 -1
- package/dist/dashboard/web/overview-page.d.ts +0 -3
- package/dist/dashboard/web/overview-page.d.ts.map +0 -1
- package/dist/dashboard/web/overview-page.js +0 -253
- package/dist/dashboard/web/overview-page.js.map +0 -1
- package/dist/dashboard/web/overview.d.ts +0 -23
- package/dist/dashboard/web/overview.d.ts.map +0 -1
- package/dist/dashboard/web/overview.js +0 -81
- package/dist/dashboard/web/overview.js.map +0 -1
- package/dist/dashboard/web/plugin-events.d.ts +0 -2
- package/dist/dashboard/web/plugin-events.d.ts.map +0 -1
- package/dist/dashboard/web/plugin-events.js +0 -2
- package/dist/dashboard/web/plugin-events.js.map +0 -1
- package/dist/dashboard/web/plugin-page.d.ts +0 -3
- package/dist/dashboard/web/plugin-page.d.ts.map +0 -1
- package/dist/dashboard/web/plugin-page.js +0 -467
- package/dist/dashboard/web/plugin-page.js.map +0 -1
- package/dist/dashboard/web/preferences.d.ts +0 -42
- package/dist/dashboard/web/preferences.d.ts.map +0 -1
- package/dist/dashboard/web/preferences.js +0 -162
- package/dist/dashboard/web/preferences.js.map +0 -1
- package/dist/dashboard/web/preview-markdown.d.ts +0 -5
- package/dist/dashboard/web/preview-markdown.d.ts.map +0 -1
- package/dist/dashboard/web/preview-markdown.js +0 -52
- package/dist/dashboard/web/preview-markdown.js.map +0 -1
- package/dist/dashboard/web/react-hooks.d.ts +0 -8
- package/dist/dashboard/web/react-hooks.d.ts.map +0 -1
- package/dist/dashboard/web/react-hooks.js +0 -43
- package/dist/dashboard/web/react-hooks.js.map +0 -1
- package/dist/dashboard/web/react-mount.d.ts +0 -4
- package/dist/dashboard/web/react-mount.d.ts.map +0 -1
- package/dist/dashboard/web/react-mount.js +0 -7
- package/dist/dashboard/web/react-mount.js.map +0 -1
- package/dist/dashboard/web/role-batch.d.ts +0 -9
- package/dist/dashboard/web/role-batch.d.ts.map +0 -1
- package/dist/dashboard/web/role-batch.js +0 -42
- package/dist/dashboard/web/role-batch.js.map +0 -1
- package/dist/dashboard/web/role-profile-match.d.ts +0 -31
- package/dist/dashboard/web/role-profile-match.d.ts.map +0 -1
- package/dist/dashboard/web/role-profile-match.js +0 -58
- package/dist/dashboard/web/role-profile-match.js.map +0 -1
- package/dist/dashboard/web/roles-page.d.ts +0 -4
- package/dist/dashboard/web/roles-page.d.ts.map +0 -1
- package/dist/dashboard/web/roles-page.js +0 -1120
- package/dist/dashboard/web/roles-page.js.map +0 -1
- package/dist/dashboard/web/roles.d.ts +0 -177
- package/dist/dashboard/web/roles.d.ts.map +0 -1
- package/dist/dashboard/web/roles.js +0 -272
- package/dist/dashboard/web/roles.js.map +0 -1
- package/dist/dashboard/web/route-lifecycle.d.ts +0 -14
- package/dist/dashboard/web/route-lifecycle.d.ts.map +0 -1
- package/dist/dashboard/web/route-lifecycle.js +0 -29
- package/dist/dashboard/web/route-lifecycle.js.map +0 -1
- package/dist/dashboard/web/schedules-page.d.ts +0 -16
- package/dist/dashboard/web/schedules-page.d.ts.map +0 -1
- package/dist/dashboard/web/schedules-page.js +0 -303
- package/dist/dashboard/web/schedules-page.js.map +0 -1
- package/dist/dashboard/web/session-terminal.d.ts +0 -7
- package/dist/dashboard/web/session-terminal.d.ts.map +0 -1
- package/dist/dashboard/web/session-terminal.js +0 -23
- package/dist/dashboard/web/session-terminal.js.map +0 -1
- package/dist/dashboard/web/sessions-kanban.d.ts +0 -70
- package/dist/dashboard/web/sessions-kanban.d.ts.map +0 -1
- package/dist/dashboard/web/sessions-kanban.js +0 -481
- package/dist/dashboard/web/sessions-kanban.js.map +0 -1
- package/dist/dashboard/web/sessions-page.d.ts +0 -27
- package/dist/dashboard/web/sessions-page.d.ts.map +0 -1
- package/dist/dashboard/web/sessions-page.js +0 -2085
- package/dist/dashboard/web/sessions-page.js.map +0 -1
- package/dist/dashboard/web/sessions.d.ts +0 -116
- package/dist/dashboard/web/sessions.d.ts.map +0 -1
- package/dist/dashboard/web/sessions.js +0 -390
- package/dist/dashboard/web/sessions.js.map +0 -1
- package/dist/dashboard/web/settings-page.d.ts +0 -119
- package/dist/dashboard/web/settings-page.d.ts.map +0 -1
- package/dist/dashboard/web/settings-page.js +0 -772
- package/dist/dashboard/web/settings-page.js.map +0 -1
- package/dist/dashboard/web/skills-page.d.ts +0 -90
- package/dist/dashboard/web/skills-page.d.ts.map +0 -1
- package/dist/dashboard/web/skills-page.js +0 -1004
- package/dist/dashboard/web/skills-page.js.map +0 -1
- package/dist/dashboard/web/stale-chunk-reload.d.ts +0 -16
- package/dist/dashboard/web/stale-chunk-reload.d.ts.map +0 -1
- package/dist/dashboard/web/stale-chunk-reload.js +0 -51
- package/dist/dashboard/web/stale-chunk-reload.js.map +0 -1
- package/dist/dashboard/web/store.d.ts +0 -39
- package/dist/dashboard/web/store.d.ts.map +0 -1
- package/dist/dashboard/web/store.js +0 -177
- package/dist/dashboard/web/store.js.map +0 -1
- package/dist/dashboard/web/substitute-targets.d.ts +0 -30
- package/dist/dashboard/web/substitute-targets.d.ts.map +0 -1
- package/dist/dashboard/web/substitute-targets.js +0 -99
- package/dist/dashboard/web/substitute-targets.js.map +0 -1
- package/dist/dashboard/web/team-federation-page.d.ts +0 -4
- package/dist/dashboard/web/team-federation-page.d.ts.map +0 -1
- package/dist/dashboard/web/team-federation-page.js +0 -465
- package/dist/dashboard/web/team-federation-page.js.map +0 -1
- package/dist/dashboard/web/team-federation.d.ts +0 -92
- package/dist/dashboard/web/team-federation.d.ts.map +0 -1
- package/dist/dashboard/web/team-federation.js +0 -106
- package/dist/dashboard/web/team-federation.js.map +0 -1
- package/dist/dashboard/web/theme-menu.d.ts +0 -4
- package/dist/dashboard/web/theme-menu.d.ts.map +0 -1
- package/dist/dashboard/web/theme-menu.js +0 -173
- package/dist/dashboard/web/theme-menu.js.map +0 -1
- package/dist/dashboard/web/ui.d.ts +0 -81
- package/dist/dashboard/web/ui.d.ts.map +0 -1
- package/dist/dashboard/web/ui.js +0 -330
- package/dist/dashboard/web/ui.js.map +0 -1
- package/dist/dashboard/web/update-action.d.ts +0 -16
- package/dist/dashboard/web/update-action.d.ts.map +0 -1
- package/dist/dashboard/web/update-action.js +0 -64
- package/dist/dashboard/web/update-action.js.map +0 -1
- package/dist/dashboard/web/v3-api.d.ts +0 -26
- package/dist/dashboard/web/v3-api.d.ts.map +0 -1
- package/dist/dashboard/web/v3-api.js +0 -49
- package/dist/dashboard/web/v3-api.js.map +0 -1
- package/dist/dashboard/web/v3-components.d.ts +0 -9
- package/dist/dashboard/web/v3-components.d.ts.map +0 -1
- package/dist/dashboard/web/v3-components.js +0 -333
- package/dist/dashboard/web/v3-components.js.map +0 -1
- package/dist/dashboard/web/v3-model.d.ts +0 -80
- package/dist/dashboard/web/v3-model.d.ts.map +0 -1
- package/dist/dashboard/web/v3-model.js +0 -240
- package/dist/dashboard/web/v3-model.js.map +0 -1
- package/dist/dashboard/web/v3-page.d.ts +0 -3
- package/dist/dashboard/web/v3-page.d.ts.map +0 -1
- package/dist/dashboard/web/v3-page.js +0 -7
- package/dist/dashboard/web/v3-page.js.map +0 -1
- package/dist/dashboard/web/v3-terminal.d.ts +0 -25
- package/dist/dashboard/web/v3-terminal.d.ts.map +0 -1
- package/dist/dashboard/web/v3-terminal.js +0 -155
- package/dist/dashboard/web/v3-terminal.js.map +0 -1
- package/dist/dashboard/web/vc-consumer-profiles-section.d.ts +0 -29
- package/dist/dashboard/web/vc-consumer-profiles-section.d.ts.map +0 -1
- package/dist/dashboard/web/vc-consumer-profiles-section.js +0 -459
- package/dist/dashboard/web/vc-consumer-profiles-section.js.map +0 -1
- package/dist/dashboard/web/webhook-logs-page.d.ts +0 -17
- package/dist/dashboard/web/webhook-logs-page.d.ts.map +0 -1
- package/dist/dashboard/web/webhook-logs-page.js +0 -198
- package/dist/dashboard/web/webhook-logs-page.js.map +0 -1
- package/dist/dashboard/web/whiteboards-page.d.ts +0 -3
- package/dist/dashboard/web/whiteboards-page.d.ts.map +0 -1
- package/dist/dashboard/web/whiteboards-page.js +0 -198
- package/dist/dashboard/web/whiteboards-page.js.map +0 -1
- package/dist/dashboard/webhook-routes.d.ts +0 -19
- package/dist/dashboard/webhook-routes.d.ts.map +0 -1
- package/dist/dashboard/webhook-routes.js +0 -618
- package/dist/dashboard/webhook-routes.js.map +0 -1
- package/dist/dashboard-web/app.js +0 -1
- package/dist/dashboard-web/apple-touch-icon.png +0 -0
- package/dist/dashboard-web/brand-logo.png +0 -0
- package/dist/dashboard-web/chunks/bot-defaults-page-LTVOUDIS.js +0 -10
- package/dist/dashboard-web/chunks/chunk-3UE7S77S.js +0 -1
- package/dist/dashboard-web/chunks/chunk-5CJMHTT4.js +0 -1
- package/dist/dashboard-web/chunks/chunk-5THX4DI2.js +0 -66
- package/dist/dashboard-web/chunks/chunk-7SZRL6FY.js +0 -1
- package/dist/dashboard-web/chunks/chunk-AGCPF6MT.js +0 -1
- package/dist/dashboard-web/chunks/chunk-BD3PZGH2.js +0 -1
- package/dist/dashboard-web/chunks/chunk-DCS35UMD.js +0 -1
- package/dist/dashboard-web/chunks/chunk-EVK77ASG.js +0 -1
- package/dist/dashboard-web/chunks/chunk-FDZ7WOBW.js +0 -16
- package/dist/dashboard-web/chunks/chunk-MFQPCVHY.js +0 -51
- package/dist/dashboard-web/chunks/chunk-R3FXBFQH.js +0 -1
- package/dist/dashboard-web/chunks/chunk-SYC6D5XU.js +0 -1
- package/dist/dashboard-web/chunks/chunk-XJ7BGPJH.js +0 -1
- package/dist/dashboard-web/chunks/chunk-ZJVTGU5X.js +0 -1
- package/dist/dashboard-web/chunks/chunk-ZU3UUKAR.js +0 -1
- package/dist/dashboard-web/chunks/connectors-page-5KWDIMKC.js +0 -1
- package/dist/dashboard-web/chunks/groups-page-FHOKYXMW.js +0 -8
- package/dist/dashboard-web/chunks/insights-page-T2ZX2RWL.js +0 -7
- package/dist/dashboard-web/chunks/monitor-room-YNVBAGR6.js +0 -53
- package/dist/dashboard-web/chunks/monitoring-page-LHM55YWN.js +0 -2
- package/dist/dashboard-web/chunks/office-page-ATXVP7PW.js +0 -1
- package/dist/dashboard-web/chunks/overview-page-QYI3KBDD.js +0 -1
- package/dist/dashboard-web/chunks/plugin-page-VEGTCEAS.js +0 -1
- package/dist/dashboard-web/chunks/roles-page-56VWM6CD.js +0 -1
- package/dist/dashboard-web/chunks/schedules-page-S5K6U4EO.js +0 -1
- package/dist/dashboard-web/chunks/sessions-page-WBP4N7D2.js +0 -6
- package/dist/dashboard-web/chunks/settings-page-QUZDQARR.js +0 -2
- package/dist/dashboard-web/chunks/skills-page-IFY7AEND.js +0 -4
- package/dist/dashboard-web/chunks/team-federation-page-C7FJQPFZ.js +0 -1
- package/dist/dashboard-web/chunks/v3-page-2LMF3WWR.js +0 -94
- package/dist/dashboard-web/chunks/whiteboards-page-3XC6QRMY.js +0 -1
- package/dist/dashboard-web/favicon.png +0 -0
- package/dist/dashboard-web/game/index.apple-touch-icon.png +0 -0
- package/dist/dashboard-web/game/index.audio.position.worklet.js +0 -66
- package/dist/dashboard-web/game/index.audio.worklet.js +0 -213
- package/dist/dashboard-web/game/index.html +0 -224
- package/dist/dashboard-web/game/index.icon.png +0 -0
- package/dist/dashboard-web/game/index.js +0 -909
- package/dist/dashboard-web/game/index.png +0 -0
- package/dist/dashboard-web/index.html +0 -17
- package/dist/dashboard-web/skins/fallout-vaultboy.webp +0 -0
- package/dist/dashboard-web/style.css +0 -25771
- package/dist/dashboard.d.ts +0 -2
- package/dist/dashboard.d.ts.map +0 -1
- package/dist/dashboard.js +0 -5487
- package/dist/dashboard.js.map +0 -1
- package/dist/desktop/main/auto-start.d.ts +0 -19
- package/dist/desktop/main/auto-start.d.ts.map +0 -1
- package/dist/desktop/main/auto-start.js +0 -41
- package/dist/desktop/main/auto-start.js.map +0 -1
- package/dist/desktop/main/bundled-runtime.d.ts +0 -12
- package/dist/desktop/main/bundled-runtime.d.ts.map +0 -1
- package/dist/desktop/main/bundled-runtime.js +0 -30
- package/dist/desktop/main/bundled-runtime.js.map +0 -1
- package/dist/desktop/main/dashboard-compat.d.ts +0 -25
- package/dist/desktop/main/dashboard-compat.d.ts.map +0 -1
- package/dist/desktop/main/dashboard-compat.js +0 -117
- package/dist/desktop/main/dashboard-compat.js.map +0 -1
- package/dist/desktop/main/device-status.d.ts +0 -15
- package/dist/desktop/main/device-status.d.ts.map +0 -1
- package/dist/desktop/main/device-status.js +0 -94
- package/dist/desktop/main/device-status.js.map +0 -1
- package/dist/desktop/main/external-runtime.d.ts +0 -38
- package/dist/desktop/main/external-runtime.d.ts.map +0 -1
- package/dist/desktop/main/external-runtime.js +0 -272
- package/dist/desktop/main/external-runtime.js.map +0 -1
- package/dist/desktop/main/ipc.d.ts +0 -20
- package/dist/desktop/main/ipc.d.ts.map +0 -1
- package/dist/desktop/main/ipc.js +0 -242
- package/dist/desktop/main/ipc.js.map +0 -1
- package/dist/desktop/main/log-service.d.ts +0 -4
- package/dist/desktop/main/log-service.d.ts.map +0 -1
- package/dist/desktop/main/log-service.js +0 -53
- package/dist/desktop/main/log-service.js.map +0 -1
- package/dist/desktop/main/login-item.d.ts +0 -10
- package/dist/desktop/main/login-item.d.ts.map +0 -1
- package/dist/desktop/main/login-item.js +0 -11
- package/dist/desktop/main/login-item.js.map +0 -1
- package/dist/desktop/main/node-command.d.ts +0 -43
- package/dist/desktop/main/node-command.d.ts.map +0 -1
- package/dist/desktop/main/node-command.js +0 -97
- package/dist/desktop/main/node-command.js.map +0 -1
- package/dist/desktop/main/paths.d.ts +0 -11
- package/dist/desktop/main/paths.d.ts.map +0 -1
- package/dist/desktop/main/paths.js +0 -13
- package/dist/desktop/main/paths.js.map +0 -1
- package/dist/desktop/main/pm2-apps.d.ts +0 -17
- package/dist/desktop/main/pm2-apps.d.ts.map +0 -1
- package/dist/desktop/main/pm2-apps.js +0 -105
- package/dist/desktop/main/pm2-apps.js.map +0 -1
- package/dist/desktop/main/runtime-service.d.ts +0 -65
- package/dist/desktop/main/runtime-service.d.ts.map +0 -1
- package/dist/desktop/main/runtime-service.js +0 -381
- package/dist/desktop/main/runtime-service.js.map +0 -1
- package/dist/desktop/main/runtime-source.d.ts +0 -19
- package/dist/desktop/main/runtime-source.d.ts.map +0 -1
- package/dist/desktop/main/runtime-source.js +0 -67
- package/dist/desktop/main/runtime-source.js.map +0 -1
- package/dist/desktop/main/tray.d.ts +0 -11
- package/dist/desktop/main/tray.d.ts.map +0 -1
- package/dist/desktop/main/tray.js +0 -27
- package/dist/desktop/main/tray.js.map +0 -1
- package/dist/desktop/main/window.d.ts +0 -16
- package/dist/desktop/main/window.d.ts.map +0 -1
- package/dist/desktop/main/window.js +0 -113
- package/dist/desktop/main/window.js.map +0 -1
- package/dist/desktop/main.d.ts +0 -2
- package/dist/desktop/main.d.ts.map +0 -1
- package/dist/desktop/main.js +0 -195
- package/dist/desktop/main.js.map +0 -1
- package/dist/desktop/preload.d.ts +0 -2
- package/dist/desktop/preload.d.ts.map +0 -1
- package/dist/desktop/preload.js +0 -27
- package/dist/desktop/preload.js.map +0 -1
- package/dist/desktop/renderer/app.d.ts +0 -36
- package/dist/desktop/renderer/app.d.ts.map +0 -1
- package/dist/desktop/renderer/app.js +0 -950
- package/dist/desktop/renderer/app.js.map +0 -1
- package/dist/desktop/renderer/dashboard-url.d.ts +0 -13
- package/dist/desktop/renderer/dashboard-url.d.ts.map +0 -1
- package/dist/desktop/renderer/dashboard-url.js +0 -98
- package/dist/desktop/renderer/dashboard-url.js.map +0 -1
- package/dist/desktop/renderer/runtime-state.d.ts +0 -8
- package/dist/desktop/renderer/runtime-state.d.ts.map +0 -1
- package/dist/desktop/renderer/runtime-state.js +0 -69
- package/dist/desktop/renderer/runtime-state.js.map +0 -1
- package/dist/desktop/shared/shell-path-probes.d.ts +0 -24
- package/dist/desktop/shared/shell-path-probes.d.ts.map +0 -1
- package/dist/desktop/shared/shell-path-probes.js +0 -38
- package/dist/desktop/shared/shell-path-probes.js.map +0 -1
- package/dist/desktop/shared/types.d.ts +0 -68
- package/dist/desktop/shared/types.d.ts.map +0 -1
- package/dist/desktop/shared/types.js +0 -2
- package/dist/desktop/shared/types.js.map +0 -1
- package/dist/desktop/smoke.d.ts +0 -29
- package/dist/desktop/smoke.d.ts.map +0 -1
- package/dist/desktop/smoke.js +0 -273
- package/dist/desktop/smoke.js.map +0 -1
- package/dist/features/codex-notifier/adoption.d.ts +0 -11
- package/dist/features/codex-notifier/adoption.d.ts.map +0 -1
- package/dist/features/codex-notifier/adoption.js +0 -11
- package/dist/features/codex-notifier/adoption.js.map +0 -1
- package/dist/features/codex-notifier/app-opener.d.ts +0 -21
- package/dist/features/codex-notifier/app-opener.d.ts.map +0 -1
- package/dist/features/codex-notifier/app-opener.js +0 -33
- package/dist/features/codex-notifier/app-opener.js.map +0 -1
- package/dist/features/codex-notifier/card-action.d.ts +0 -27
- package/dist/features/codex-notifier/card-action.d.ts.map +0 -1
- package/dist/features/codex-notifier/card-action.js +0 -84
- package/dist/features/codex-notifier/card-action.js.map +0 -1
- package/dist/features/codex-notifier/card.d.ts +0 -12
- package/dist/features/codex-notifier/card.d.ts.map +0 -1
- package/dist/features/codex-notifier/card.js +0 -150
- package/dist/features/codex-notifier/card.js.map +0 -1
- package/dist/features/codex-notifier/codex-context.d.ts +0 -12
- package/dist/features/codex-notifier/codex-context.d.ts.map +0 -1
- package/dist/features/codex-notifier/codex-context.js +0 -161
- package/dist/features/codex-notifier/codex-context.js.map +0 -1
- package/dist/features/codex-notifier/config.d.ts +0 -9
- package/dist/features/codex-notifier/config.d.ts.map +0 -1
- package/dist/features/codex-notifier/config.js +0 -11
- package/dist/features/codex-notifier/config.js.map +0 -1
- package/dist/features/codex-notifier/confirmed-turn.d.ts +0 -20
- package/dist/features/codex-notifier/confirmed-turn.d.ts.map +0 -1
- package/dist/features/codex-notifier/confirmed-turn.js +0 -130
- package/dist/features/codex-notifier/confirmed-turn.js.map +0 -1
- package/dist/features/codex-notifier/emitter.d.ts +0 -13
- package/dist/features/codex-notifier/emitter.d.ts.map +0 -1
- package/dist/features/codex-notifier/emitter.js +0 -33
- package/dist/features/codex-notifier/emitter.js.map +0 -1
- package/dist/features/codex-notifier/event-store.d.ts +0 -29
- package/dist/features/codex-notifier/event-store.d.ts.map +0 -1
- package/dist/features/codex-notifier/event-store.js +0 -217
- package/dist/features/codex-notifier/event-store.js.map +0 -1
- package/dist/features/codex-notifier/event.d.ts +0 -46
- package/dist/features/codex-notifier/event.d.ts.map +0 -1
- package/dist/features/codex-notifier/event.js +0 -188
- package/dist/features/codex-notifier/event.js.map +0 -1
- package/dist/features/codex-notifier/hook-cli.d.ts +0 -23
- package/dist/features/codex-notifier/hook-cli.d.ts.map +0 -1
- package/dist/features/codex-notifier/hook-cli.js +0 -130
- package/dist/features/codex-notifier/hook-cli.js.map +0 -1
- package/dist/features/codex-notifier/hook-installer.d.ts +0 -19
- package/dist/features/codex-notifier/hook-installer.d.ts.map +0 -1
- package/dist/features/codex-notifier/hook-installer.js +0 -158
- package/dist/features/codex-notifier/hook-installer.js.map +0 -1
- package/dist/features/codex-notifier/index.d.ts +0 -21
- package/dist/features/codex-notifier/index.d.ts.map +0 -1
- package/dist/features/codex-notifier/index.js +0 -19
- package/dist/features/codex-notifier/index.js.map +0 -1
- package/dist/features/codex-notifier/internal-turn.d.ts +0 -5
- package/dist/features/codex-notifier/internal-turn.d.ts.map +0 -1
- package/dist/features/codex-notifier/internal-turn.js +0 -43
- package/dist/features/codex-notifier/internal-turn.js.map +0 -1
- package/dist/features/codex-notifier/outbox-worker.d.ts +0 -71
- package/dist/features/codex-notifier/outbox-worker.d.ts.map +0 -1
- package/dist/features/codex-notifier/outbox-worker.js +0 -290
- package/dist/features/codex-notifier/outbox-worker.js.map +0 -1
- package/dist/features/codex-notifier/outbox.d.ts +0 -25
- package/dist/features/codex-notifier/outbox.d.ts.map +0 -1
- package/dist/features/codex-notifier/outbox.js +0 -225
- package/dist/features/codex-notifier/outbox.js.map +0 -1
- package/dist/features/codex-notifier/paths.d.ts +0 -7
- package/dist/features/codex-notifier/paths.d.ts.map +0 -1
- package/dist/features/codex-notifier/paths.js +0 -20
- package/dist/features/codex-notifier/paths.js.map +0 -1
- package/dist/features/codex-notifier/screen-lock.d.ts +0 -12
- package/dist/features/codex-notifier/screen-lock.d.ts.map +0 -1
- package/dist/features/codex-notifier/screen-lock.js +0 -47
- package/dist/features/codex-notifier/screen-lock.js.map +0 -1
- package/dist/features/codex-notifier/side-conversation-monitor.d.ts +0 -102
- package/dist/features/codex-notifier/side-conversation-monitor.d.ts.map +0 -1
- package/dist/features/codex-notifier/side-conversation-monitor.js +0 -774
- package/dist/features/codex-notifier/side-conversation-monitor.js.map +0 -1
- package/dist/features/codex-notifier/types.d.ts +0 -42
- package/dist/features/codex-notifier/types.d.ts.map +0 -1
- package/dist/features/codex-notifier/types.js +0 -2
- package/dist/features/codex-notifier/types.js.map +0 -1
- package/dist/features/codex-notifier/worker-lock.d.ts +0 -8
- package/dist/features/codex-notifier/worker-lock.d.ts.map +0 -1
- package/dist/features/codex-notifier/worker-lock.js +0 -108
- package/dist/features/codex-notifier/worker-lock.js.map +0 -1
- package/dist/global-config.d.ts +0 -264
- package/dist/global-config.d.ts.map +0 -1
- package/dist/global-config.js +0 -504
- package/dist/global-config.js.map +0 -1
- package/dist/i18n/en.d.ts +0 -3
- package/dist/i18n/en.d.ts.map +0 -1
- package/dist/i18n/en.js +0 -1211
- package/dist/i18n/en.js.map +0 -1
- package/dist/i18n/index.d.ts +0 -33
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js +0 -74
- package/dist/i18n/index.js.map +0 -1
- package/dist/i18n/types.d.ts +0 -4
- package/dist/i18n/types.d.ts.map +0 -1
- package/dist/i18n/types.js +0 -5
- package/dist/i18n/types.js.map +0 -1
- package/dist/i18n/zh.d.ts +0 -6
- package/dist/i18n/zh.d.ts.map +0 -1
- package/dist/i18n/zh.js +0 -1212
- package/dist/i18n/zh.js.map +0 -1
- package/dist/im/lark/ask-card.d.ts +0 -55
- package/dist/im/lark/ask-card.d.ts.map +0 -1
- package/dist/im/lark/ask-card.js +0 -392
- package/dist/im/lark/ask-card.js.map +0 -1
- package/dist/im/lark/brand-template.d.ts +0 -15
- package/dist/im/lark/brand-template.d.ts.map +0 -1
- package/dist/im/lark/brand-template.js +0 -114
- package/dist/im/lark/brand-template.js.map +0 -1
- package/dist/im/lark/callback-button-marker.d.ts +0 -34
- package/dist/im/lark/callback-button-marker.d.ts.map +0 -1
- package/dist/im/lark/callback-button-marker.js +0 -99
- package/dist/im/lark/callback-button-marker.js.map +0 -1
- package/dist/im/lark/card-builder.d.ts +0 -367
- package/dist/im/lark/card-builder.d.ts.map +0 -1
- package/dist/im/lark/card-builder.js +0 -2238
- package/dist/im/lark/card-builder.js.map +0 -1
- package/dist/im/lark/card-handler.d.ts +0 -158
- package/dist/im/lark/card-handler.d.ts.map +0 -1
- package/dist/im/lark/card-handler.js +0 -2923
- package/dist/im/lark/card-handler.js.map +0 -1
- package/dist/im/lark/client.d.ts +0 -471
- package/dist/im/lark/client.d.ts.map +0 -1
- package/dist/im/lark/client.js +0 -1943
- package/dist/im/lark/client.js.map +0 -1
- package/dist/im/lark/doc-comment.d.ts +0 -164
- package/dist/im/lark/doc-comment.d.ts.map +0 -1
- package/dist/im/lark/doc-comment.js +0 -611
- package/dist/im/lark/doc-comment.js.map +0 -1
- package/dist/im/lark/event-dispatcher.d.ts +0 -420
- package/dist/im/lark/event-dispatcher.d.ts.map +0 -1
- package/dist/im/lark/event-dispatcher.js +0 -3274
- package/dist/im/lark/event-dispatcher.js.map +0 -1
- package/dist/im/lark/forward-followup-buffer.d.ts +0 -26
- package/dist/im/lark/forward-followup-buffer.d.ts.map +0 -1
- package/dist/im/lark/forward-followup-buffer.js +0 -48
- package/dist/im/lark/forward-followup-buffer.js.map +0 -1
- package/dist/im/lark/forward-followup-content.d.ts +0 -6
- package/dist/im/lark/forward-followup-content.d.ts.map +0 -1
- package/dist/im/lark/forward-followup-content.js +0 -46
- package/dist/im/lark/forward-followup-content.js.map +0 -1
- package/dist/im/lark/forward-followup-store.d.ts +0 -9
- package/dist/im/lark/forward-followup-store.d.ts.map +0 -1
- package/dist/im/lark/forward-followup-store.js +0 -48
- package/dist/im/lark/forward-followup-store.js.map +0 -1
- package/dist/im/lark/forwarded-renderer.d.ts +0 -23
- package/dist/im/lark/forwarded-renderer.d.ts.map +0 -1
- package/dist/im/lark/forwarded-renderer.js +0 -112
- package/dist/im/lark/forwarded-renderer.js.map +0 -1
- package/dist/im/lark/grant-command.d.ts +0 -51
- package/dist/im/lark/grant-command.d.ts.map +0 -1
- package/dist/im/lark/grant-command.js +0 -215
- package/dist/im/lark/grant-command.js.map +0 -1
- package/dist/im/lark/grant-pending.d.ts +0 -31
- package/dist/im/lark/grant-pending.d.ts.map +0 -1
- package/dist/im/lark/grant-pending.js +0 -122
- package/dist/im/lark/grant-pending.js.map +0 -1
- package/dist/im/lark/groups-card.d.ts +0 -90
- package/dist/im/lark/groups-card.d.ts.map +0 -1
- package/dist/im/lark/groups-card.js +0 -832
- package/dist/im/lark/groups-card.js.map +0 -1
- package/dist/im/lark/identity-cache.d.ts +0 -88
- package/dist/im/lark/identity-cache.d.ts.map +0 -1
- package/dist/im/lark/identity-cache.js +0 -310
- package/dist/im/lark/identity-cache.js.map +0 -1
- package/dist/im/lark/inline-mentions.d.ts +0 -42
- package/dist/im/lark/inline-mentions.d.ts.map +0 -1
- package/dist/im/lark/inline-mentions.js +0 -27
- package/dist/im/lark/inline-mentions.js.map +0 -1
- package/dist/im/lark/invite-command.d.ts +0 -20
- package/dist/im/lark/invite-command.d.ts.map +0 -1
- package/dist/im/lark/invite-command.js +0 -292
- package/dist/im/lark/invite-command.js.map +0 -1
- package/dist/im/lark/issue-card.d.ts +0 -223
- package/dist/im/lark/issue-card.d.ts.map +0 -1
- package/dist/im/lark/issue-card.js +0 -542
- package/dist/im/lark/issue-card.js.map +0 -1
- package/dist/im/lark/issue-command-deps.d.ts +0 -41
- package/dist/im/lark/issue-command-deps.d.ts.map +0 -1
- package/dist/im/lark/issue-command-deps.js +0 -195
- package/dist/im/lark/issue-command-deps.js.map +0 -1
- package/dist/im/lark/issue-command.d.ts +0 -137
- package/dist/im/lark/issue-command.d.ts.map +0 -1
- package/dist/im/lark/issue-command.js +0 -335
- package/dist/im/lark/issue-command.js.map +0 -1
- package/dist/im/lark/lark-hosts.d.ts +0 -49
- package/dist/im/lark/lark-hosts.d.ts.map +0 -1
- package/dist/im/lark/lark-hosts.js +0 -59
- package/dist/im/lark/lark-hosts.js.map +0 -1
- package/dist/im/lark/md-card.d.ts +0 -192
- package/dist/im/lark/md-card.d.ts.map +0 -1
- package/dist/im/lark/md-card.js +0 -872
- package/dist/im/lark/md-card.js.map +0 -1
- package/dist/im/lark/mention-targets.d.ts +0 -43
- package/dist/im/lark/mention-targets.d.ts.map +0 -1
- package/dist/im/lark/mention-targets.js +0 -190
- package/dist/im/lark/mention-targets.js.map +0 -1
- package/dist/im/lark/merge-forward.d.ts +0 -32
- package/dist/im/lark/merge-forward.d.ts.map +0 -1
- package/dist/im/lark/merge-forward.js +0 -140
- package/dist/im/lark/merge-forward.js.map +0 -1
- package/dist/im/lark/message-parser.d.ts +0 -272
- package/dist/im/lark/message-parser.d.ts.map +0 -1
- package/dist/im/lark/message-parser.js +0 -1261
- package/dist/im/lark/message-parser.js.map +0 -1
- package/dist/im/lark/overload-nonce.d.ts +0 -19
- package/dist/im/lark/overload-nonce.d.ts.map +0 -1
- package/dist/im/lark/overload-nonce.js +0 -72
- package/dist/im/lark/overload-nonce.js.map +0 -1
- package/dist/im/lark/overview-card.d.ts +0 -100
- package/dist/im/lark/overview-card.d.ts.map +0 -1
- package/dist/im/lark/overview-card.js +0 -428
- package/dist/im/lark/overview-card.js.map +0 -1
- package/dist/im/lark/quote-hint.d.ts +0 -19
- package/dist/im/lark/quote-hint.d.ts.map +0 -1
- package/dist/im/lark/quote-hint.js +0 -24
- package/dist/im/lark/quote-hint.js.map +0 -1
- package/dist/im/lark/relay-target-routing.d.ts +0 -17
- package/dist/im/lark/relay-target-routing.d.ts.map +0 -1
- package/dist/im/lark/relay-target-routing.js +0 -74
- package/dist/im/lark/relay-target-routing.js.map +0 -1
- package/dist/im/lark/reply-card-footer-signature.d.ts +0 -7
- package/dist/im/lark/reply-card-footer-signature.d.ts.map +0 -1
- package/dist/im/lark/reply-card-footer-signature.js +0 -7
- package/dist/im/lark/reply-card-footer-signature.js.map +0 -1
- package/dist/im/lark/reply-mode-command.d.ts +0 -2
- package/dist/im/lark/reply-mode-command.d.ts.map +0 -1
- package/dist/im/lark/reply-mode-command.js +0 -108
- package/dist/im/lark/reply-mode-command.js.map +0 -1
- package/dist/im/lark/schedules-card.d.ts +0 -96
- package/dist/im/lark/schedules-card.d.ts.map +0 -1
- package/dist/im/lark/schedules-card.js +0 -910
- package/dist/im/lark/schedules-card.js.map +0 -1
- package/dist/im/lark/sessions-card.d.ts +0 -117
- package/dist/im/lark/sessions-card.d.ts.map +0 -1
- package/dist/im/lark/sessions-card.js +0 -876
- package/dist/im/lark/sessions-card.js.map +0 -1
- package/dist/im/lark/settings-card.d.ts +0 -125
- package/dist/im/lark/settings-card.d.ts.map +0 -1
- package/dist/im/lark/settings-card.js +0 -434
- package/dist/im/lark/settings-card.js.map +0 -1
- package/dist/im/lark/substitute-command.d.ts +0 -2
- package/dist/im/lark/substitute-command.d.ts.map +0 -1
- package/dist/im/lark/substitute-command.js +0 -68
- package/dist/im/lark/substitute-command.js.map +0 -1
- package/dist/im/lark/summary-command.d.ts +0 -21
- package/dist/im/lark/summary-command.d.ts.map +0 -1
- package/dist/im/lark/summary-command.js +0 -335
- package/dist/im/lark/summary-command.js.map +0 -1
- package/dist/im/lark/topic-root-context.d.ts +0 -35
- package/dist/im/lark/topic-root-context.d.ts.map +0 -1
- package/dist/im/lark/topic-root-context.js +0 -37
- package/dist/im/lark/topic-root-context.js.map +0 -1
- package/dist/im/lark/v3-blocked-card-handler.d.ts +0 -28
- package/dist/im/lark/v3-blocked-card-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-blocked-card-handler.js +0 -134
- package/dist/im/lark/v3-blocked-card-handler.js.map +0 -1
- package/dist/im/lark/v3-blocked-card.d.ts +0 -76
- package/dist/im/lark/v3-blocked-card.d.ts.map +0 -1
- package/dist/im/lark/v3-blocked-card.js +0 -224
- package/dist/im/lark/v3-blocked-card.js.map +0 -1
- package/dist/im/lark/v3-distillation-card-handler.d.ts +0 -12
- package/dist/im/lark/v3-distillation-card-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-distillation-card-handler.js +0 -107
- package/dist/im/lark/v3-distillation-card-handler.js.map +0 -1
- package/dist/im/lark/v3-distillation-card.d.ts +0 -42
- package/dist/im/lark/v3-distillation-card.d.ts.map +0 -1
- package/dist/im/lark/v3-distillation-card.js +0 -206
- package/dist/im/lark/v3-distillation-card.js.map +0 -1
- package/dist/im/lark/v3-gate-card-handler.d.ts +0 -31
- package/dist/im/lark/v3-gate-card-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-gate-card-handler.js +0 -111
- package/dist/im/lark/v3-gate-card-handler.js.map +0 -1
- package/dist/im/lark/v3-gate-card.d.ts +0 -56
- package/dist/im/lark/v3-gate-card.d.ts.map +0 -1
- package/dist/im/lark/v3-gate-card.js +0 -153
- package/dist/im/lark/v3-gate-card.js.map +0 -1
- package/dist/im/lark/v3-loop-grant-card-handler.d.ts +0 -28
- package/dist/im/lark/v3-loop-grant-card-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-loop-grant-card-handler.js +0 -89
- package/dist/im/lark/v3-loop-grant-card-handler.js.map +0 -1
- package/dist/im/lark/v3-loop-grant-card.d.ts +0 -46
- package/dist/im/lark/v3-loop-grant-card.d.ts.map +0 -1
- package/dist/im/lark/v3-loop-grant-card.js +0 -120
- package/dist/im/lark/v3-loop-grant-card.js.map +0 -1
- package/dist/im/lark/v3-progress-card-manager.d.ts +0 -79
- package/dist/im/lark/v3-progress-card-manager.d.ts.map +0 -1
- package/dist/im/lark/v3-progress-card-manager.js +0 -444
- package/dist/im/lark/v3-progress-card-manager.js.map +0 -1
- package/dist/im/lark/v3-progress-card.d.ts +0 -26
- package/dist/im/lark/v3-progress-card.d.ts.map +0 -1
- package/dist/im/lark/v3-progress-card.js +0 -217
- package/dist/im/lark/v3-progress-card.js.map +0 -1
- package/dist/im/lark/v3-revisit-grant-card-handler.d.ts +0 -29
- package/dist/im/lark/v3-revisit-grant-card-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-revisit-grant-card-handler.js +0 -95
- package/dist/im/lark/v3-revisit-grant-card-handler.js.map +0 -1
- package/dist/im/lark/v3-revisit-grant-card.d.ts +0 -52
- package/dist/im/lark/v3-revisit-grant-card.d.ts.map +0 -1
- package/dist/im/lark/v3-revisit-grant-card.js +0 -124
- package/dist/im/lark/v3-revisit-grant-card.js.map +0 -1
- package/dist/im/lark/v3-run-save-card-handler.d.ts +0 -12
- package/dist/im/lark/v3-run-save-card-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-run-save-card-handler.js +0 -160
- package/dist/im/lark/v3-run-save-card-handler.js.map +0 -1
- package/dist/im/lark/v3-run-save-card.d.ts +0 -38
- package/dist/im/lark/v3-run-save-card.d.ts.map +0 -1
- package/dist/im/lark/v3-run-save-card.js +0 -125
- package/dist/im/lark/v3-run-save-card.js.map +0 -1
- package/dist/im/lark/v3-saved-workflow-command.d.ts +0 -36
- package/dist/im/lark/v3-saved-workflow-command.d.ts.map +0 -1
- package/dist/im/lark/v3-saved-workflow-command.js +0 -186
- package/dist/im/lark/v3-saved-workflow-command.js.map +0 -1
- package/dist/im/lark/v3-saved-workflow-handler.d.ts +0 -89
- package/dist/im/lark/v3-saved-workflow-handler.d.ts.map +0 -1
- package/dist/im/lark/v3-saved-workflow-handler.js +0 -212
- package/dist/im/lark/v3-saved-workflow-handler.js.map +0 -1
- package/dist/im/lark/workflow-slash-command.d.ts +0 -18
- package/dist/im/lark/workflow-slash-command.d.ts.map +0 -1
- package/dist/im/lark/workflow-slash-command.js +0 -36
- package/dist/im/lark/workflow-slash-command.js.map +0 -1
- package/dist/im/types.d.ts +0 -79
- package/dist/im/types.d.ts.map +0 -1
- package/dist/im/types.js +0 -2
- package/dist/im/types.js.map +0 -1
- package/dist/index-core-only.d.ts +0 -3
- package/dist/index-core-only.d.ts.map +0 -1
- package/dist/index-core-only.js +0 -118
- package/dist/index-core-only.js.map +0 -1
- package/dist/index-daemon.d.ts +0 -3
- package/dist/index-daemon.d.ts.map +0 -1
- package/dist/index-daemon.js +0 -64
- package/dist/index-daemon.js.map +0 -1
- package/dist/mir-local-runtime.d.ts +0 -60
- package/dist/mir-local-runtime.d.ts.map +0 -1
- package/dist/mir-local-runtime.js +0 -362
- package/dist/mir-local-runtime.js.map +0 -1
- package/dist/mir-prompt.d.ts +0 -16
- package/dist/mir-prompt.d.ts.map +0 -1
- package/dist/mir-prompt.js +0 -170
- package/dist/mir-prompt.js.map +0 -1
- package/dist/mir-runner.d.ts +0 -3
- package/dist/mir-runner.d.ts.map +0 -1
- package/dist/mir-runner.js +0 -369
- package/dist/mir-runner.js.map +0 -1
- package/dist/mira-output.d.ts +0 -3
- package/dist/mira-output.d.ts.map +0 -1
- package/dist/mira-output.js +0 -136
- package/dist/mira-output.js.map +0 -1
- package/dist/mira-runner.d.ts +0 -3
- package/dist/mira-runner.d.ts.map +0 -1
- package/dist/mira-runner.js +0 -530
- package/dist/mira-runner.js.map +0 -1
- package/dist/platform/bind.d.ts +0 -5
- package/dist/platform/bind.d.ts.map +0 -1
- package/dist/platform/bind.js +0 -157
- package/dist/platform/bind.js.map +0 -1
- package/dist/platform/binding.d.ts +0 -47
- package/dist/platform/binding.d.ts.map +0 -1
- package/dist/platform/binding.js +0 -84
- package/dist/platform/binding.js.map +0 -1
- package/dist/platform/device-command.d.ts +0 -35
- package/dist/platform/device-command.d.ts.map +0 -1
- package/dist/platform/device-command.js +0 -187
- package/dist/platform/device-command.js.map +0 -1
- package/dist/platform/device-enroll.d.ts +0 -156
- package/dist/platform/device-enroll.d.ts.map +0 -1
- package/dist/platform/device-enroll.js +0 -781
- package/dist/platform/device-enroll.js.map +0 -1
- package/dist/platform/device-isolation-activation-client.d.ts +0 -28
- package/dist/platform/device-isolation-activation-client.d.ts.map +0 -1
- package/dist/platform/device-isolation-activation-client.js +0 -279
- package/dist/platform/device-isolation-activation-client.js.map +0 -1
- package/dist/platform/device-isolation.d.ts +0 -35
- package/dist/platform/device-isolation.d.ts.map +0 -1
- package/dist/platform/device-isolation.js +0 -90
- package/dist/platform/device-isolation.js.map +0 -1
- package/dist/platform/device-paths.d.ts +0 -9
- package/dist/platform/device-paths.d.ts.map +0 -1
- package/dist/platform/device-paths.js +0 -14
- package/dist/platform/device-paths.js.map +0 -1
- package/dist/platform/device.d.ts +0 -77
- package/dist/platform/device.d.ts.map +0 -1
- package/dist/platform/device.js +0 -212
- package/dist/platform/device.js.map +0 -1
- package/dist/platform/host-command-context.d.ts +0 -15
- package/dist/platform/host-command-context.d.ts.map +0 -1
- package/dist/platform/host-command-context.js +0 -26
- package/dist/platform/host-command-context.js.map +0 -1
- package/dist/platform/issue-client.d.ts +0 -201
- package/dist/platform/issue-client.d.ts.map +0 -1
- package/dist/platform/issue-client.js +0 -142
- package/dist/platform/issue-client.js.map +0 -1
- package/dist/platform/platform-http.d.ts +0 -15
- package/dist/platform/platform-http.d.ts.map +0 -1
- package/dist/platform/platform-http.js +0 -77
- package/dist/platform/platform-http.js.map +0 -1
- package/dist/platform/secure-host-file.d.ts +0 -12
- package/dist/platform/secure-host-file.d.ts.map +0 -1
- package/dist/platform/secure-host-file.js +0 -301
- package/dist/platform/secure-host-file.js.map +0 -1
- package/dist/platform/tunnel-client.d.ts +0 -41
- package/dist/platform/tunnel-client.d.ts.map +0 -1
- package/dist/platform/tunnel-client.js +0 -493
- package/dist/platform/tunnel-client.js.map +0 -1
- package/dist/pm2-graceful-exit.d.ts +0 -28
- package/dist/pm2-graceful-exit.d.ts.map +0 -1
- package/dist/pm2-graceful-exit.js +0 -39
- package/dist/pm2-graceful-exit.js.map +0 -1
- package/dist/services/adopt-picker.d.ts +0 -41
- package/dist/services/adopt-picker.d.ts.map +0 -1
- package/dist/services/adopt-picker.js +0 -70
- package/dist/services/adopt-picker.js.map +0 -1
- package/dist/services/aiden-checkpoints.d.ts +0 -5
- package/dist/services/aiden-checkpoints.d.ts.map +0 -1
- package/dist/services/aiden-checkpoints.js +0 -91
- package/dist/services/aiden-checkpoints.js.map +0 -1
- package/dist/services/allowed-chat-groups.d.ts +0 -11
- package/dist/services/allowed-chat-groups.d.ts.map +0 -1
- package/dist/services/allowed-chat-groups.js +0 -20
- package/dist/services/allowed-chat-groups.js.map +0 -1
- package/dist/services/async-trigger-state.d.ts +0 -90
- package/dist/services/async-trigger-state.d.ts.map +0 -1
- package/dist/services/async-trigger-state.js +0 -96
- package/dist/services/async-trigger-state.js.map +0 -1
- package/dist/services/async-trigger-store.d.ts +0 -36
- package/dist/services/async-trigger-store.d.ts.map +0 -1
- package/dist/services/async-trigger-store.js +0 -121
- package/dist/services/async-trigger-store.js.map +0 -1
- package/dist/services/backend-availability.d.ts +0 -29
- package/dist/services/backend-availability.d.ts.map +0 -1
- package/dist/services/backend-availability.js +0 -55
- package/dist/services/backend-availability.js.map +0 -1
- package/dist/services/backend-type-store.d.ts +0 -33
- package/dist/services/backend-type-store.d.ts.map +0 -1
- package/dist/services/backend-type-store.js +0 -43
- package/dist/services/backend-type-store.js.map +0 -1
- package/dist/services/bot-config-store.d.ts +0 -155
- package/dist/services/bot-config-store.d.ts.map +0 -1
- package/dist/services/bot-config-store.js +0 -384
- package/dist/services/bot-config-store.js.map +0 -1
- package/dist/services/bot-owner-store.d.ts +0 -28
- package/dist/services/bot-owner-store.d.ts.map +0 -1
- package/dist/services/bot-owner-store.js +0 -82
- package/dist/services/bot-owner-store.js.map +0 -1
- package/dist/services/bot-profile-store.d.ts +0 -16
- package/dist/services/bot-profile-store.d.ts.map +0 -1
- package/dist/services/bot-profile-store.js +0 -98
- package/dist/services/bot-profile-store.js.map +0 -1
- package/dist/services/bot-union-ids-store.d.ts +0 -24
- package/dist/services/bot-union-ids-store.d.ts.map +0 -1
- package/dist/services/bot-union-ids-store.js +0 -79
- package/dist/services/bot-union-ids-store.js.map +0 -1
- package/dist/services/brand-store.d.ts +0 -15
- package/dist/services/brand-store.d.ts.map +0 -1
- package/dist/services/brand-store.js +0 -47
- package/dist/services/brand-store.js.map +0 -1
- package/dist/services/bridge-fallback-gate.d.ts +0 -72
- package/dist/services/bridge-fallback-gate.d.ts.map +0 -1
- package/dist/services/bridge-fallback-gate.js +0 -190
- package/dist/services/bridge-fallback-gate.js.map +0 -1
- package/dist/services/bridge-rotation-policy.d.ts +0 -179
- package/dist/services/bridge-rotation-policy.d.ts.map +0 -1
- package/dist/services/bridge-rotation-policy.js +0 -163
- package/dist/services/bridge-rotation-policy.js.map +0 -1
- package/dist/services/bridge-turn-queue.d.ts +0 -198
- package/dist/services/bridge-turn-queue.d.ts.map +0 -1
- package/dist/services/bridge-turn-queue.js +0 -430
- package/dist/services/bridge-turn-queue.js.map +0 -1
- package/dist/services/card-mode-store.d.ts +0 -13
- package/dist/services/card-mode-store.d.ts.map +0 -1
- package/dist/services/card-mode-store.js +0 -52
- package/dist/services/card-mode-store.js.map +0 -1
- package/dist/services/card-prefs-store.d.ts +0 -55
- package/dist/services/card-prefs-store.d.ts.map +0 -1
- package/dist/services/card-prefs-store.js +0 -269
- package/dist/services/card-prefs-store.js.map +0 -1
- package/dist/services/chat-first-seen-store.d.ts +0 -27
- package/dist/services/chat-first-seen-store.d.ts.map +0 -1
- package/dist/services/chat-first-seen-store.js +0 -114
- package/dist/services/chat-first-seen-store.js.map +0 -1
- package/dist/services/chat-reply-mode-store.d.ts +0 -30
- package/dist/services/chat-reply-mode-store.d.ts.map +0 -1
- package/dist/services/chat-reply-mode-store.js +0 -135
- package/dist/services/chat-reply-mode-store.js.map +0 -1
- package/dist/services/claude-transcript.d.ts +0 -323
- package/dist/services/claude-transcript.d.ts.map +0 -1
- package/dist/services/claude-transcript.js +0 -930
- package/dist/services/claude-transcript.js.map +0 -1
- package/dist/services/coco-paths.d.ts +0 -10
- package/dist/services/coco-paths.d.ts.map +0 -1
- package/dist/services/coco-paths.js +0 -16
- package/dist/services/coco-paths.js.map +0 -1
- package/dist/services/coco-transcript.d.ts +0 -35
- package/dist/services/coco-transcript.d.ts.map +0 -1
- package/dist/services/coco-transcript.js +0 -183
- package/dist/services/coco-transcript.js.map +0 -1
- package/dist/services/codex-app-runner-protocol.d.ts +0 -70
- package/dist/services/codex-app-runner-protocol.d.ts.map +0 -1
- package/dist/services/codex-app-runner-protocol.js +0 -187
- package/dist/services/codex-app-runner-protocol.js.map +0 -1
- package/dist/services/codex-app-threads.d.ts +0 -67
- package/dist/services/codex-app-threads.d.ts.map +0 -1
- package/dist/services/codex-app-threads.js +0 -657
- package/dist/services/codex-app-threads.js.map +0 -1
- package/dist/services/codex-app-token-usage.d.ts +0 -93
- package/dist/services/codex-app-token-usage.d.ts.map +0 -1
- package/dist/services/codex-app-token-usage.js +0 -190
- package/dist/services/codex-app-token-usage.js.map +0 -1
- package/dist/services/codex-app-turn-controller.d.ts +0 -72
- package/dist/services/codex-app-turn-controller.d.ts.map +0 -1
- package/dist/services/codex-app-turn-controller.js +0 -524
- package/dist/services/codex-app-turn-controller.js.map +0 -1
- package/dist/services/codex-bridge-queue.d.ts +0 -73
- package/dist/services/codex-bridge-queue.d.ts.map +0 -1
- package/dist/services/codex-bridge-queue.js +0 -273
- package/dist/services/codex-bridge-queue.js.map +0 -1
- package/dist/services/codex-composer-state.d.ts +0 -27
- package/dist/services/codex-composer-state.d.ts.map +0 -1
- package/dist/services/codex-composer-state.js +0 -53
- package/dist/services/codex-composer-state.js.map +0 -1
- package/dist/services/codex-paths.d.ts +0 -7
- package/dist/services/codex-paths.d.ts.map +0 -1
- package/dist/services/codex-paths.js +0 -19
- package/dist/services/codex-paths.js.map +0 -1
- package/dist/services/codex-runner-freshness.d.ts +0 -39
- package/dist/services/codex-runner-freshness.d.ts.map +0 -1
- package/dist/services/codex-runner-freshness.js +0 -78
- package/dist/services/codex-runner-freshness.js.map +0 -1
- package/dist/services/codex-service-tier.d.ts +0 -44
- package/dist/services/codex-service-tier.d.ts.map +0 -1
- package/dist/services/codex-service-tier.js +0 -63
- package/dist/services/codex-service-tier.js.map +0 -1
- package/dist/services/codex-transcript.d.ts +0 -140
- package/dist/services/codex-transcript.d.ts.map +0 -1
- package/dist/services/codex-transcript.js +0 -631
- package/dist/services/codex-transcript.js.map +0 -1
- package/dist/services/config-store.d.ts +0 -19
- package/dist/services/config-store.d.ts.map +0 -1
- package/dist/services/config-store.js +0 -52
- package/dist/services/config-store.js.map +0 -1
- package/dist/services/connector-store.d.ts +0 -71
- package/dist/services/connector-store.d.ts.map +0 -1
- package/dist/services/connector-store.js +0 -79
- package/dist/services/connector-store.js.map +0 -1
- package/dist/services/cursor-resume-policy.d.ts +0 -12
- package/dist/services/cursor-resume-policy.d.ts.map +0 -1
- package/dist/services/cursor-resume-policy.js +0 -15
- package/dist/services/cursor-resume-policy.js.map +0 -1
- package/dist/services/cursor-transcript.d.ts +0 -47
- package/dist/services/cursor-transcript.d.ts.map +0 -1
- package/dist/services/cursor-transcript.js +0 -324
- package/dist/services/cursor-transcript.js.map +0 -1
- package/dist/services/default-worktree.d.ts +0 -28
- package/dist/services/default-worktree.d.ts.map +0 -1
- package/dist/services/default-worktree.js +0 -102
- package/dist/services/default-worktree.js.map +0 -1
- package/dist/services/deployment-identity.d.ts +0 -22
- package/dist/services/deployment-identity.d.ts.map +0 -1
- package/dist/services/deployment-identity.js +0 -67
- package/dist/services/deployment-identity.js.map +0 -1
- package/dist/services/doc-subs-store.d.ts +0 -63
- package/dist/services/doc-subs-store.d.ts.map +0 -1
- package/dist/services/doc-subs-store.js +0 -95
- package/dist/services/doc-subs-store.js.map +0 -1
- package/dist/services/exact-chat-grant.d.ts +0 -83
- package/dist/services/exact-chat-grant.d.ts.map +0 -1
- package/dist/services/exact-chat-grant.js +0 -249
- package/dist/services/exact-chat-grant.js.map +0 -1
- package/dist/services/federation-membership-store.d.ts +0 -23
- package/dist/services/federation-membership-store.d.ts.map +0 -1
- package/dist/services/federation-membership-store.js +0 -66
- package/dist/services/federation-membership-store.js.map +0 -1
- package/dist/services/federation-roster.d.ts +0 -58
- package/dist/services/federation-roster.d.ts.map +0 -1
- package/dist/services/federation-roster.js +0 -59
- package/dist/services/federation-roster.js.map +0 -1
- package/dist/services/federation-store.d.ts +0 -87
- package/dist/services/federation-store.d.ts.map +0 -1
- package/dist/services/federation-store.js +0 -143
- package/dist/services/federation-store.js.map +0 -1
- package/dist/services/file-bridge-path.d.ts +0 -8
- package/dist/services/file-bridge-path.d.ts.map +0 -1
- package/dist/services/file-bridge-path.js +0 -75
- package/dist/services/file-bridge-path.js.map +0 -1
- package/dist/services/frozen-card-store.d.ts +0 -8
- package/dist/services/frozen-card-store.d.ts.map +0 -1
- package/dist/services/frozen-card-store.js +0 -66
- package/dist/services/frozen-card-store.js.map +0 -1
- package/dist/services/git-worktree.d.ts +0 -63
- package/dist/services/git-worktree.d.ts.map +0 -1
- package/dist/services/git-worktree.js +0 -246
- package/dist/services/git-worktree.js.map +0 -1
- package/dist/services/grant-policy.d.ts +0 -13
- package/dist/services/grant-policy.d.ts.map +0 -1
- package/dist/services/grant-policy.js +0 -40
- package/dist/services/grant-policy.js.map +0 -1
- package/dist/services/grant-prefs-store.d.ts +0 -26
- package/dist/services/grant-prefs-store.d.ts.map +0 -1
- package/dist/services/grant-prefs-store.js +0 -109
- package/dist/services/grant-prefs-store.js.map +0 -1
- package/dist/services/grant-store.d.ts +0 -103
- package/dist/services/grant-store.d.ts.map +0 -1
- package/dist/services/grant-store.js +0 -580
- package/dist/services/grant-store.js.map +0 -1
- package/dist/services/grok-paths.d.ts +0 -27
- package/dist/services/grok-paths.d.ts.map +0 -1
- package/dist/services/grok-paths.js +0 -106
- package/dist/services/grok-paths.js.map +0 -1
- package/dist/services/grok-transcript.d.ts +0 -68
- package/dist/services/grok-transcript.d.ts.map +0 -1
- package/dist/services/grok-transcript.js +0 -681
- package/dist/services/grok-transcript.js.map +0 -1
- package/dist/services/group-creator.d.ts +0 -87
- package/dist/services/group-creator.d.ts.map +0 -1
- package/dist/services/group-creator.js +0 -288
- package/dist/services/group-creator.js.map +0 -1
- package/dist/services/groups-store.d.ts +0 -194
- package/dist/services/groups-store.d.ts.map +0 -1
- package/dist/services/groups-store.js +0 -493
- package/dist/services/groups-store.js.map +0 -1
- package/dist/services/hermes-session-filter.d.ts +0 -28
- package/dist/services/hermes-session-filter.d.ts.map +0 -1
- package/dist/services/hermes-session-filter.js +0 -53
- package/dist/services/hermes-session-filter.js.map +0 -1
- package/dist/services/hermes-transcript.d.ts +0 -11
- package/dist/services/hermes-transcript.d.ts.map +0 -1
- package/dist/services/hermes-transcript.js +0 -184
- package/dist/services/hermes-transcript.js.map +0 -1
- package/dist/services/hook-runner.d.ts +0 -53
- package/dist/services/hook-runner.d.ts.map +0 -1
- package/dist/services/hook-runner.js +0 -451
- package/dist/services/hook-runner.js.map +0 -1
- package/dist/services/insight/antigravity-span-reader.d.ts +0 -3
- package/dist/services/insight/antigravity-span-reader.d.ts.map +0 -1
- package/dist/services/insight/antigravity-span-reader.js +0 -249
- package/dist/services/insight/antigravity-span-reader.js.map +0 -1
- package/dist/services/insight/classify.d.ts +0 -9
- package/dist/services/insight/classify.d.ts.map +0 -1
- package/dist/services/insight/classify.js +0 -71
- package/dist/services/insight/classify.js.map +0 -1
- package/dist/services/insight/claude-span-reader.d.ts +0 -3
- package/dist/services/insight/claude-span-reader.d.ts.map +0 -1
- package/dist/services/insight/claude-span-reader.js +0 -276
- package/dist/services/insight/claude-span-reader.js.map +0 -1
- package/dist/services/insight/codex-span-reader.d.ts +0 -3
- package/dist/services/insight/codex-span-reader.d.ts.map +0 -1
- package/dist/services/insight/codex-span-reader.js +0 -306
- package/dist/services/insight/codex-span-reader.js.map +0 -1
- package/dist/services/insight/intent.d.ts +0 -5
- package/dist/services/insight/intent.d.ts.map +0 -1
- package/dist/services/insight/intent.js +0 -145
- package/dist/services/insight/intent.js.map +0 -1
- package/dist/services/insight/jsonl.d.ts +0 -10
- package/dist/services/insight/jsonl.d.ts.map +0 -1
- package/dist/services/insight/jsonl.js +0 -36
- package/dist/services/insight/jsonl.js.map +0 -1
- package/dist/services/insight/prompt.d.ts +0 -3
- package/dist/services/insight/prompt.d.ts.map +0 -1
- package/dist/services/insight/prompt.js +0 -99
- package/dist/services/insight/prompt.js.map +0 -1
- package/dist/services/insight/redact.d.ts +0 -4
- package/dist/services/insight/redact.d.ts.map +0 -1
- package/dist/services/insight/redact.js +0 -67
- package/dist/services/insight/redact.js.map +0 -1
- package/dist/services/insight/report.d.ts +0 -29
- package/dist/services/insight/report.d.ts.map +0 -1
- package/dist/services/insight/report.js +0 -1247
- package/dist/services/insight/report.js.map +0 -1
- package/dist/services/insight/safe-detail.d.ts +0 -5
- package/dist/services/insight/safe-detail.d.ts.map +0 -1
- package/dist/services/insight/safe-detail.js +0 -59
- package/dist/services/insight/safe-detail.js.map +0 -1
- package/dist/services/insight/scrub.d.ts +0 -22
- package/dist/services/insight/scrub.d.ts.map +0 -1
- package/dist/services/insight/scrub.js +0 -70
- package/dist/services/insight/scrub.js.map +0 -1
- package/dist/services/insight/subagent-reader.d.ts +0 -19
- package/dist/services/insight/subagent-reader.d.ts.map +0 -1
- package/dist/services/insight/subagent-reader.js +0 -111
- package/dist/services/insight/subagent-reader.js.map +0 -1
- package/dist/services/insight/types.d.ts +0 -448
- package/dist/services/insight/types.d.ts.map +0 -1
- package/dist/services/insight/types.js +0 -2
- package/dist/services/insight/types.js.map +0 -1
- package/dist/services/invite-store.d.ts +0 -28
- package/dist/services/invite-store.d.ts.map +0 -1
- package/dist/services/invite-store.js +0 -85
- package/dist/services/invite-store.js.map +0 -1
- package/dist/services/issue-board-store.d.ts +0 -214
- package/dist/services/issue-board-store.d.ts.map +0 -1
- package/dist/services/issue-board-store.js +0 -472
- package/dist/services/issue-board-store.js.map +0 -1
- package/dist/services/issue-claim-flow.d.ts +0 -160
- package/dist/services/issue-claim-flow.d.ts.map +0 -1
- package/dist/services/issue-claim-flow.js +0 -222
- package/dist/services/issue-claim-flow.js.map +0 -1
- package/dist/services/issue-outbox-pump.d.ts +0 -25
- package/dist/services/issue-outbox-pump.d.ts.map +0 -1
- package/dist/services/issue-outbox-pump.js +0 -102
- package/dist/services/issue-outbox-pump.js.map +0 -1
- package/dist/services/issue-release.d.ts +0 -78
- package/dist/services/issue-release.d.ts.map +0 -1
- package/dist/services/issue-release.js +0 -89
- package/dist/services/issue-release.js.map +0 -1
- package/dist/services/issue-report.d.ts +0 -72
- package/dist/services/issue-report.d.ts.map +0 -1
- package/dist/services/issue-report.js +0 -84
- package/dist/services/issue-report.js.map +0 -1
- package/dist/services/issue-status-view.d.ts +0 -52
- package/dist/services/issue-status-view.d.ts.map +0 -1
- package/dist/services/issue-status-view.js +0 -42
- package/dist/services/issue-status-view.js.map +0 -1
- package/dist/services/issue-status-writer.d.ts +0 -98
- package/dist/services/issue-status-writer.d.ts.map +0 -1
- package/dist/services/issue-status-writer.js +0 -123
- package/dist/services/issue-status-writer.js.map +0 -1
- package/dist/services/jsonl-cursor.d.ts +0 -24
- package/dist/services/jsonl-cursor.d.ts.map +0 -1
- package/dist/services/jsonl-cursor.js +0 -110
- package/dist/services/jsonl-cursor.js.map +0 -1
- package/dist/services/kiro-session.d.ts +0 -2
- package/dist/services/kiro-session.d.ts.map +0 -1
- package/dist/services/kiro-session.js +0 -19
- package/dist/services/kiro-session.js.map +0 -1
- package/dist/services/local-cli-opener.d.ts +0 -65
- package/dist/services/local-cli-opener.d.ts.map +0 -1
- package/dist/services/local-cli-opener.js +0 -426
- package/dist/services/local-cli-opener.js.map +0 -1
- package/dist/services/message-listener-run-preview-store.d.ts +0 -43
- package/dist/services/message-listener-run-preview-store.d.ts.map +0 -1
- package/dist/services/message-listener-run-preview-store.js +0 -152
- package/dist/services/message-listener-run-preview-store.js.map +0 -1
- package/dist/services/message-listener-store.d.ts +0 -44
- package/dist/services/message-listener-store.d.ts.map +0 -1
- package/dist/services/message-listener-store.js +0 -179
- package/dist/services/message-listener-store.js.map +0 -1
- package/dist/services/message-listener.d.ts +0 -129
- package/dist/services/message-listener.d.ts.map +0 -1
- package/dist/services/message-listener.js +0 -441
- package/dist/services/message-listener.js.map +0 -1
- package/dist/services/message-queue.d.ts +0 -9
- package/dist/services/message-queue.d.ts.map +0 -1
- package/dist/services/message-queue.js +0 -79
- package/dist/services/message-queue.js.map +0 -1
- package/dist/services/mtr-transcript.d.ts +0 -14
- package/dist/services/mtr-transcript.d.ts.map +0 -1
- package/dist/services/mtr-transcript.js +0 -291
- package/dist/services/mtr-transcript.js.map +0 -1
- package/dist/services/observed-bots-store.d.ts +0 -33
- package/dist/services/observed-bots-store.d.ts.map +0 -1
- package/dist/services/observed-bots-store.js +0 -103
- package/dist/services/observed-bots-store.js.map +0 -1
- package/dist/services/oncall-store.d.ts +0 -140
- package/dist/services/oncall-store.d.ts.map +0 -1
- package/dist/services/oncall-store.js +0 -403
- package/dist/services/oncall-store.js.map +0 -1
- package/dist/services/open-platform-rename.d.ts +0 -73
- package/dist/services/open-platform-rename.d.ts.map +0 -1
- package/dist/services/open-platform-rename.js +0 -396
- package/dist/services/open-platform-rename.js.map +0 -1
- package/dist/services/opencode-paths.d.ts +0 -7
- package/dist/services/opencode-paths.d.ts.map +0 -1
- package/dist/services/opencode-paths.js +0 -18
- package/dist/services/opencode-paths.js.map +0 -1
- package/dist/services/overload-alert-migration.d.ts +0 -15
- package/dist/services/overload-alert-migration.d.ts.map +0 -1
- package/dist/services/overload-alert-migration.js +0 -115
- package/dist/services/overload-alert-migration.js.map +0 -1
- package/dist/services/pairing-store.d.ts +0 -47
- package/dist/services/pairing-store.d.ts.map +0 -1
- package/dist/services/pairing-store.js +0 -132
- package/dist/services/pairing-store.js.map +0 -1
- package/dist/services/pi-transcript.d.ts +0 -26
- package/dist/services/pi-transcript.d.ts.map +0 -1
- package/dist/services/pi-transcript.js +0 -327
- package/dist/services/pi-transcript.js.map +0 -1
- package/dist/services/platform-team-store.d.ts +0 -52
- package/dist/services/platform-team-store.d.ts.map +0 -1
- package/dist/services/platform-team-store.js +0 -159
- package/dist/services/platform-team-store.js.map +0 -1
- package/dist/services/plugin-registry-store.d.ts +0 -8
- package/dist/services/plugin-registry-store.d.ts.map +0 -1
- package/dist/services/plugin-registry-store.js +0 -153
- package/dist/services/plugin-registry-store.js.map +0 -1
- package/dist/services/project-scanner.d.ts +0 -28
- package/dist/services/project-scanner.d.ts.map +0 -1
- package/dist/services/project-scanner.js +0 -203
- package/dist/services/project-scanner.js.map +0 -1
- package/dist/services/quota-dedup.d.ts +0 -33
- package/dist/services/quota-dedup.d.ts.map +0 -1
- package/dist/services/quota-dedup.js +0 -67
- package/dist/services/quota-dedup.js.map +0 -1
- package/dist/services/relay-picker.d.ts +0 -27
- package/dist/services/relay-picker.d.ts.map +0 -1
- package/dist/services/relay-picker.js +0 -88
- package/dist/services/relay-picker.js.map +0 -1
- package/dist/services/restart-intent-store.d.ts +0 -41
- package/dist/services/restart-intent-store.d.ts.map +0 -1
- package/dist/services/restart-intent-store.js +0 -194
- package/dist/services/restart-intent-store.js.map +0 -1
- package/dist/services/resumable-session-discovery.d.ts +0 -15
- package/dist/services/resumable-session-discovery.d.ts.map +0 -1
- package/dist/services/resumable-session-discovery.js +0 -357
- package/dist/services/resumable-session-discovery.js.map +0 -1
- package/dist/services/role-profile-store.d.ts +0 -25
- package/dist/services/role-profile-store.d.ts.map +0 -1
- package/dist/services/role-profile-store.js +0 -176
- package/dist/services/role-profile-store.js.map +0 -1
- package/dist/services/sandbox-migration.d.ts +0 -14
- package/dist/services/sandbox-migration.d.ts.map +0 -1
- package/dist/services/sandbox-migration.js +0 -85
- package/dist/services/sandbox-migration.js.map +0 -1
- package/dist/services/sandbox-store.d.ts +0 -50
- package/dist/services/sandbox-store.d.ts.map +0 -1
- package/dist/services/sandbox-store.js +0 -155
- package/dist/services/sandbox-store.js.map +0 -1
- package/dist/services/schedule-split-migration.d.ts +0 -2
- package/dist/services/schedule-split-migration.d.ts.map +0 -1
- package/dist/services/schedule-split-migration.js +0 -159
- package/dist/services/schedule-split-migration.js.map +0 -1
- package/dist/services/schedule-store.d.ts +0 -138
- package/dist/services/schedule-store.d.ts.map +0 -1
- package/dist/services/schedule-store.js +0 -619
- package/dist/services/schedule-store.js.map +0 -1
- package/dist/services/seen-message-store.d.ts +0 -12
- package/dist/services/seen-message-store.d.ts.map +0 -1
- package/dist/services/seen-message-store.js +0 -119
- package/dist/services/seen-message-store.js.map +0 -1
- package/dist/services/send-policy.d.ts +0 -182
- package/dist/services/send-policy.d.ts.map +0 -1
- package/dist/services/send-policy.js +0 -189
- package/dist/services/send-policy.js.map +0 -1
- package/dist/services/session-lifecycle-hooks.d.ts +0 -10
- package/dist/services/session-lifecycle-hooks.d.ts.map +0 -1
- package/dist/services/session-lifecycle-hooks.js +0 -78
- package/dist/services/session-lifecycle-hooks.js.map +0 -1
- package/dist/services/session-store.d.ts +0 -68
- package/dist/services/session-store.d.ts.map +0 -1
- package/dist/services/session-store.js +0 -419
- package/dist/services/session-store.js.map +0 -1
- package/dist/services/skill-registry-store.d.ts +0 -121
- package/dist/services/skill-registry-store.d.ts.map +0 -1
- package/dist/services/skill-registry-store.js +0 -1240
- package/dist/services/skill-registry-store.js.map +0 -1
- package/dist/services/structured-bridge-clis.d.ts +0 -29
- package/dist/services/structured-bridge-clis.d.ts.map +0 -1
- package/dist/services/structured-bridge-clis.js +0 -76
- package/dist/services/structured-bridge-clis.js.map +0 -1
- package/dist/services/submit-confirmation.d.ts +0 -22
- package/dist/services/submit-confirmation.d.ts.map +0 -1
- package/dist/services/submit-confirmation.js +0 -12
- package/dist/services/submit-confirmation.js.map +0 -1
- package/dist/services/substitute-chat-toggle-store.d.ts +0 -3
- package/dist/services/substitute-chat-toggle-store.d.ts.map +0 -1
- package/dist/services/substitute-chat-toggle-store.js +0 -58
- package/dist/services/substitute-chat-toggle-store.js.map +0 -1
- package/dist/services/substitute-mode-normalize.d.ts +0 -25
- package/dist/services/substitute-mode-normalize.d.ts.map +0 -1
- package/dist/services/substitute-mode-normalize.js +0 -80
- package/dist/services/substitute-mode-normalize.js.map +0 -1
- package/dist/services/substitute-mode-store.d.ts +0 -69
- package/dist/services/substitute-mode-store.d.ts.map +0 -1
- package/dist/services/substitute-mode-store.js +0 -142
- package/dist/services/substitute-mode-store.js.map +0 -1
- package/dist/services/summary-range-store.d.ts +0 -21
- package/dist/services/summary-range-store.d.ts.map +0 -1
- package/dist/services/summary-range-store.js +0 -89
- package/dist/services/summary-range-store.js.map +0 -1
- package/dist/services/team-board-store.d.ts +0 -33
- package/dist/services/team-board-store.d.ts.map +0 -1
- package/dist/services/team-board-store.js +0 -88
- package/dist/services/team-board-store.js.map +0 -1
- package/dist/services/team-bot-directory.d.ts +0 -29
- package/dist/services/team-bot-directory.d.ts.map +0 -1
- package/dist/services/team-bot-directory.js +0 -118
- package/dist/services/team-bot-directory.js.map +0 -1
- package/dist/services/team-bots-store.d.ts +0 -34
- package/dist/services/team-bots-store.d.ts.map +0 -1
- package/dist/services/team-bots-store.js +0 -111
- package/dist/services/team-bots-store.js.map +0 -1
- package/dist/services/team-groups-store.d.ts +0 -29
- package/dist/services/team-groups-store.d.ts.map +0 -1
- package/dist/services/team-groups-store.js +0 -70
- package/dist/services/team-groups-store.js.map +0 -1
- package/dist/services/team-roster.d.ts +0 -64
- package/dist/services/team-roster.d.ts.map +0 -1
- package/dist/services/team-roster.js +0 -108
- package/dist/services/team-roster.js.map +0 -1
- package/dist/services/team-store.d.ts +0 -54
- package/dist/services/team-store.d.ts.map +0 -1
- package/dist/services/team-store.js +0 -156
- package/dist/services/team-store.js.map +0 -1
- package/dist/services/traex-paths.d.ts +0 -26
- package/dist/services/traex-paths.d.ts.map +0 -1
- package/dist/services/traex-paths.js +0 -40
- package/dist/services/traex-paths.js.map +0 -1
- package/dist/services/traex-transcript.d.ts +0 -59
- package/dist/services/traex-transcript.d.ts.map +0 -1
- package/dist/services/traex-transcript.js +0 -370
- package/dist/services/traex-transcript.js.map +0 -1
- package/dist/services/traex-user-input.d.ts +0 -19
- package/dist/services/traex-user-input.d.ts.map +0 -1
- package/dist/services/traex-user-input.js +0 -57
- package/dist/services/traex-user-input.js.map +0 -1
- package/dist/services/transcript-resolver.d.ts +0 -35
- package/dist/services/transcript-resolver.d.ts.map +0 -1
- package/dist/services/transcript-resolver.js +0 -297
- package/dist/services/transcript-resolver.js.map +0 -1
- package/dist/services/trigger-log-store.d.ts +0 -105
- package/dist/services/trigger-log-store.d.ts.map +0 -1
- package/dist/services/trigger-log-store.js +0 -203
- package/dist/services/trigger-log-store.js.map +0 -1
- package/dist/services/trigger-types.d.ts +0 -124
- package/dist/services/trigger-types.d.ts.map +0 -1
- package/dist/services/trigger-types.js +0 -72
- package/dist/services/trigger-types.js.map +0 -1
- package/dist/services/turn-terminal-deduper.d.ts +0 -14
- package/dist/services/turn-terminal-deduper.d.ts.map +0 -1
- package/dist/services/turn-terminal-deduper.js +0 -34
- package/dist/services/turn-terminal-deduper.js.map +0 -1
- package/dist/services/usage-ledger.d.ts +0 -112
- package/dist/services/usage-ledger.d.ts.map +0 -1
- package/dist/services/usage-ledger.js +0 -485
- package/dist/services/usage-ledger.js.map +0 -1
- package/dist/services/vc-meeting-action-gate.d.ts +0 -246
- package/dist/services/vc-meeting-action-gate.d.ts.map +0 -1
- package/dist/services/vc-meeting-action-gate.js +0 -756
- package/dist/services/vc-meeting-action-gate.js.map +0 -1
- package/dist/services/vc-meeting-action-store.d.ts +0 -222
- package/dist/services/vc-meeting-action-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-action-store.js +0 -806
- package/dist/services/vc-meeting-action-store.js.map +0 -1
- package/dist/services/vc-meeting-consumer-isolation.d.ts +0 -29
- package/dist/services/vc-meeting-consumer-isolation.d.ts.map +0 -1
- package/dist/services/vc-meeting-consumer-isolation.js +0 -39
- package/dist/services/vc-meeting-consumer-isolation.js.map +0 -1
- package/dist/services/vc-meeting-consumer-profile-bootstrap.d.ts +0 -72
- package/dist/services/vc-meeting-consumer-profile-bootstrap.d.ts.map +0 -1
- package/dist/services/vc-meeting-consumer-profile-bootstrap.js +0 -343
- package/dist/services/vc-meeting-consumer-profile-bootstrap.js.map +0 -1
- package/dist/services/vc-meeting-consumer-profile-store.d.ts +0 -39
- package/dist/services/vc-meeting-consumer-profile-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-consumer-profile-store.js +0 -191
- package/dist/services/vc-meeting-consumer-profile-store.js.map +0 -1
- package/dist/services/vc-meeting-consumer-profile-templates.d.ts +0 -32
- package/dist/services/vc-meeting-consumer-profile-templates.d.ts.map +0 -1
- package/dist/services/vc-meeting-consumer-profile-templates.js +0 -106
- package/dist/services/vc-meeting-consumer-profile-templates.js.map +0 -1
- package/dist/services/vc-meeting-daemon-auth.d.ts +0 -29
- package/dist/services/vc-meeting-daemon-auth.d.ts.map +0 -1
- package/dist/services/vc-meeting-daemon-auth.js +0 -117
- package/dist/services/vc-meeting-daemon-auth.js.map +0 -1
- package/dist/services/vc-meeting-delivery-feed.d.ts +0 -52
- package/dist/services/vc-meeting-delivery-feed.d.ts.map +0 -1
- package/dist/services/vc-meeting-delivery-feed.js +0 -232
- package/dist/services/vc-meeting-delivery-feed.js.map +0 -1
- package/dist/services/vc-meeting-delivery-hub-store.d.ts +0 -215
- package/dist/services/vc-meeting-delivery-hub-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-delivery-hub-store.js +0 -1241
- package/dist/services/vc-meeting-delivery-hub-store.js.map +0 -1
- package/dist/services/vc-meeting-delivery-protocol.d.ts +0 -166
- package/dist/services/vc-meeting-delivery-protocol.d.ts.map +0 -1
- package/dist/services/vc-meeting-delivery-protocol.js +0 -452
- package/dist/services/vc-meeting-delivery-protocol.js.map +0 -1
- package/dist/services/vc-meeting-delivery-receiver.d.ts +0 -80
- package/dist/services/vc-meeting-delivery-receiver.d.ts.map +0 -1
- package/dist/services/vc-meeting-delivery-receiver.js +0 -552
- package/dist/services/vc-meeting-delivery-receiver.js.map +0 -1
- package/dist/services/vc-meeting-delivery-store.d.ts +0 -349
- package/dist/services/vc-meeting-delivery-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-delivery-store.js +0 -1036
- package/dist/services/vc-meeting-delivery-store.js.map +0 -1
- package/dist/services/vc-meeting-feed-metadata-store.d.ts +0 -58
- package/dist/services/vc-meeting-feed-metadata-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-feed-metadata-store.js +0 -356
- package/dist/services/vc-meeting-feed-metadata-store.js.map +0 -1
- package/dist/services/vc-meeting-im-reply.d.ts +0 -56
- package/dist/services/vc-meeting-im-reply.d.ts.map +0 -1
- package/dist/services/vc-meeting-im-reply.js +0 -295
- package/dist/services/vc-meeting-im-reply.js.map +0 -1
- package/dist/services/vc-meeting-im-routing.d.ts +0 -131
- package/dist/services/vc-meeting-im-routing.d.ts.map +0 -1
- package/dist/services/vc-meeting-im-routing.js +0 -449
- package/dist/services/vc-meeting-im-routing.js.map +0 -1
- package/dist/services/vc-meeting-listener-message-store.d.ts +0 -23
- package/dist/services/vc-meeting-listener-message-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-listener-message-store.js +0 -142
- package/dist/services/vc-meeting-listener-message-store.js.map +0 -1
- package/dist/services/vc-meeting-listener-output-protocol.d.ts +0 -27
- package/dist/services/vc-meeting-listener-output-protocol.d.ts.map +0 -1
- package/dist/services/vc-meeting-listener-output-protocol.js +0 -58
- package/dist/services/vc-meeting-listener-output-protocol.js.map +0 -1
- package/dist/services/vc-meeting-listener-topic-store.d.ts +0 -31
- package/dist/services/vc-meeting-listener-topic-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-listener-topic-store.js +0 -120
- package/dist/services/vc-meeting-listener-topic-store.js.map +0 -1
- package/dist/services/vc-meeting-member-policy.d.ts +0 -37
- package/dist/services/vc-meeting-member-policy.d.ts.map +0 -1
- package/dist/services/vc-meeting-member-policy.js +0 -102
- package/dist/services/vc-meeting-member-policy.js.map +0 -1
- package/dist/services/vc-meeting-preparations-store.d.ts +0 -22
- package/dist/services/vc-meeting-preparations-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-preparations-store.js +0 -131
- package/dist/services/vc-meeting-preparations-store.js.map +0 -1
- package/dist/services/vc-meeting-profile-instructions.d.ts +0 -22
- package/dist/services/vc-meeting-profile-instructions.d.ts.map +0 -1
- package/dist/services/vc-meeting-profile-instructions.js +0 -64
- package/dist/services/vc-meeting-profile-instructions.js.map +0 -1
- package/dist/services/vc-meeting-runtime-store.d.ts +0 -132
- package/dist/services/vc-meeting-runtime-store.d.ts.map +0 -1
- package/dist/services/vc-meeting-runtime-store.js +0 -852
- package/dist/services/vc-meeting-runtime-store.js.map +0 -1
- package/dist/services/vc-meeting-send-policy.d.ts +0 -96
- package/dist/services/vc-meeting-send-policy.d.ts.map +0 -1
- package/dist/services/vc-meeting-send-policy.js +0 -158
- package/dist/services/vc-meeting-send-policy.js.map +0 -1
- package/dist/services/vc-meeting-terminal-reconciler.d.ts +0 -93
- package/dist/services/vc-meeting-terminal-reconciler.d.ts.map +0 -1
- package/dist/services/vc-meeting-terminal-reconciler.js +0 -198
- package/dist/services/vc-meeting-terminal-reconciler.js.map +0 -1
- package/dist/services/voice/audio.d.ts +0 -32
- package/dist/services/voice/audio.d.ts.map +0 -1
- package/dist/services/voice/audio.js +0 -114
- package/dist/services/voice/audio.js.map +0 -1
- package/dist/services/voice/index.d.ts +0 -37
- package/dist/services/voice/index.d.ts.map +0 -1
- package/dist/services/voice/index.js +0 -105
- package/dist/services/voice/index.js.map +0 -1
- package/dist/services/voice/openai.d.ts +0 -24
- package/dist/services/voice/openai.d.ts.map +0 -1
- package/dist/services/voice/openai.js +0 -47
- package/dist/services/voice/openai.js.map +0 -1
- package/dist/services/voice/sami.d.ts +0 -22
- package/dist/services/voice/sami.d.ts.map +0 -1
- package/dist/services/voice/sami.js +0 -128
- package/dist/services/voice/sami.js.map +0 -1
- package/dist/services/voice/types.d.ts +0 -32
- package/dist/services/voice/types.d.ts.map +0 -1
- package/dist/services/voice/types.js +0 -2
- package/dist/services/voice/types.js.map +0 -1
- package/dist/services/webhook-audit.d.ts +0 -10
- package/dist/services/webhook-audit.d.ts.map +0 -1
- package/dist/services/webhook-audit.js +0 -116
- package/dist/services/webhook-audit.js.map +0 -1
- package/dist/services/webhook-key.d.ts +0 -16
- package/dist/services/webhook-key.d.ts.map +0 -1
- package/dist/services/webhook-key.js +0 -123
- package/dist/services/webhook-key.js.map +0 -1
- package/dist/services/webhook-lifecycle-extractors.d.ts +0 -6
- package/dist/services/webhook-lifecycle-extractors.d.ts.map +0 -1
- package/dist/services/webhook-lifecycle-extractors.js +0 -44
- package/dist/services/webhook-lifecycle-extractors.js.map +0 -1
- package/dist/services/webhook-lifecycle-store.d.ts +0 -45
- package/dist/services/webhook-lifecycle-store.d.ts.map +0 -1
- package/dist/services/webhook-lifecycle-store.js +0 -159
- package/dist/services/webhook-lifecycle-store.js.map +0 -1
- package/dist/services/whiteboard-store.d.ts +0 -67
- package/dist/services/whiteboard-store.d.ts.map +0 -1
- package/dist/services/whiteboard-store.js +0 -450
- package/dist/services/whiteboard-store.js.map +0 -1
- package/dist/services/worktree-slug-ai.d.ts +0 -3
- package/dist/services/worktree-slug-ai.d.ts.map +0 -1
- package/dist/services/worktree-slug-ai.js +0 -82
- package/dist/services/worktree-slug-ai.js.map +0 -1
- package/dist/setup/agent-preset.d.ts +0 -78
- package/dist/setup/agent-preset.d.ts.map +0 -1
- package/dist/setup/agent-preset.js +0 -127
- package/dist/setup/agent-preset.js.map +0 -1
- package/dist/setup/app-name.d.ts +0 -7
- package/dist/setup/app-name.d.ts.map +0 -1
- package/dist/setup/app-name.js +0 -10
- package/dist/setup/app-name.js.map +0 -1
- package/dist/setup/bot-config-editor.d.ts +0 -160
- package/dist/setup/bot-config-editor.d.ts.map +0 -1
- package/dist/setup/bot-config-editor.js +0 -459
- package/dist/setup/bot-config-editor.js.map +0 -1
- package/dist/setup/bots-store.d.ts +0 -3
- package/dist/setup/bots-store.d.ts.map +0 -1
- package/dist/setup/bots-store.js +0 -24
- package/dist/setup/bots-store.js.map +0 -1
- package/dist/setup/cli-availability.d.ts +0 -26
- package/dist/setup/cli-availability.d.ts.map +0 -1
- package/dist/setup/cli-availability.js +0 -77
- package/dist/setup/cli-availability.js.map +0 -1
- package/dist/setup/cli-selection.d.ts +0 -145
- package/dist/setup/cli-selection.d.ts.map +0 -1
- package/dist/setup/cli-selection.js +0 -402
- package/dist/setup/cli-selection.js.map +0 -1
- package/dist/setup/detect-platform.d.ts +0 -14
- package/dist/setup/detect-platform.d.ts.map +0 -1
- package/dist/setup/detect-platform.js +0 -139
- package/dist/setup/detect-platform.js.map +0 -1
- package/dist/setup/ensure-fonts.d.ts +0 -13
- package/dist/setup/ensure-fonts.d.ts.map +0 -1
- package/dist/setup/ensure-fonts.js +0 -225
- package/dist/setup/ensure-fonts.js.map +0 -1
- package/dist/setup/ensure-herdr-integrations.d.ts +0 -102
- package/dist/setup/ensure-herdr-integrations.d.ts.map +0 -1
- package/dist/setup/ensure-herdr-integrations.js +0 -432
- package/dist/setup/ensure-herdr-integrations.js.map +0 -1
- package/dist/setup/ensure-herdr.d.ts +0 -12
- package/dist/setup/ensure-herdr.d.ts.map +0 -1
- package/dist/setup/ensure-herdr.js +0 -70
- package/dist/setup/ensure-herdr.js.map +0 -1
- package/dist/setup/ensure-opus.d.ts +0 -13
- package/dist/setup/ensure-opus.d.ts.map +0 -1
- package/dist/setup/ensure-opus.js +0 -64
- package/dist/setup/ensure-opus.js.map +0 -1
- package/dist/setup/ensure-tmux.d.ts +0 -91
- package/dist/setup/ensure-tmux.d.ts.map +0 -1
- package/dist/setup/ensure-tmux.js +0 -418
- package/dist/setup/ensure-tmux.js.map +0 -1
- package/dist/setup/ensure-zellij.d.ts +0 -48
- package/dist/setup/ensure-zellij.d.ts.map +0 -1
- package/dist/setup/ensure-zellij.js +0 -94
- package/dist/setup/ensure-zellij.js.map +0 -1
- package/dist/setup/ensure-zmx.d.ts +0 -31
- package/dist/setup/ensure-zmx.d.ts.map +0 -1
- package/dist/setup/ensure-zmx.js +0 -161
- package/dist/setup/ensure-zmx.js.map +0 -1
- package/dist/setup/index.d.ts +0 -38
- package/dist/setup/index.d.ts.map +0 -1
- package/dist/setup/index.js +0 -194
- package/dist/setup/index.js.map +0 -1
- package/dist/setup/interactive-select.d.ts +0 -52
- package/dist/setup/interactive-select.d.ts.map +0 -1
- package/dist/setup/interactive-select.js +0 -271
- package/dist/setup/interactive-select.js.map +0 -1
- package/dist/setup/lark-scopes.json +0 -305
- package/dist/setup/open-platform-automation.d.ts +0 -417
- package/dist/setup/open-platform-automation.d.ts.map +0 -1
- package/dist/setup/open-platform-automation.js +0 -1610
- package/dist/setup/open-platform-automation.js.map +0 -1
- package/dist/setup/open-platform-outcome.d.ts +0 -50
- package/dist/setup/open-platform-outcome.d.ts.map +0 -1
- package/dist/setup/open-platform-outcome.js +0 -56
- package/dist/setup/open-platform-outcome.js.map +0 -1
- package/dist/setup/register-app.d.ts +0 -52
- package/dist/setup/register-app.d.ts.map +0 -1
- package/dist/setup/register-app.js +0 -91
- package/dist/setup/register-app.js.map +0 -1
- package/dist/setup/setup-args.d.ts +0 -89
- package/dist/setup/setup-args.d.ts.map +0 -1
- package/dist/setup/setup-args.js +0 -387
- package/dist/setup/setup-args.js.map +0 -1
- package/dist/setup/verify-permissions.d.ts +0 -150
- package/dist/setup/verify-permissions.d.ts.map +0 -1
- package/dist/setup/verify-permissions.js +0 -353
- package/dist/setup/verify-permissions.js.map +0 -1
- package/dist/skills/definitions.d.ts +0 -31
- package/dist/skills/definitions.d.ts.map +0 -1
- package/dist/skills/definitions.js +0 -1510
- package/dist/skills/definitions.js.map +0 -1
- package/dist/skills/injection-mode.d.ts +0 -93
- package/dist/skills/injection-mode.d.ts.map +0 -1
- package/dist/skills/injection-mode.js +0 -204
- package/dist/skills/injection-mode.js.map +0 -1
- package/dist/skills/installer.d.ts +0 -60
- package/dist/skills/installer.d.ts.map +0 -1
- package/dist/skills/installer.js +0 -217
- package/dist/skills/installer.js.map +0 -1
- package/dist/types.d.ts +0 -1131
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/utils/allowed-users-apply.d.ts +0 -76
- package/dist/utils/allowed-users-apply.d.ts.map +0 -1
- package/dist/utils/allowed-users-apply.js +0 -124
- package/dist/utils/allowed-users-apply.js.map +0 -1
- package/dist/utils/allowed-users-cache.d.ts +0 -29
- package/dist/utils/allowed-users-cache.d.ts.map +0 -1
- package/dist/utils/allowed-users-cache.js +0 -82
- package/dist/utils/allowed-users-cache.js.map +0 -1
- package/dist/utils/anchor-serializer.d.ts +0 -12
- package/dist/utils/anchor-serializer.d.ts.map +0 -1
- package/dist/utils/anchor-serializer.js +0 -64
- package/dist/utils/anchor-serializer.js.map +0 -1
- package/dist/utils/atomic-write.d.ts +0 -34
- package/dist/utils/atomic-write.d.ts.map +0 -1
- package/dist/utils/atomic-write.js +0 -183
- package/dist/utils/atomic-write.js.map +0 -1
- package/dist/utils/bot-routing.d.ts +0 -80
- package/dist/utils/bot-routing.d.ts.map +0 -1
- package/dist/utils/bot-routing.js +0 -167
- package/dist/utils/bot-routing.js.map +0 -1
- package/dist/utils/bounded-map.d.ts +0 -15
- package/dist/utils/bounded-map.d.ts.map +0 -1
- package/dist/utils/bounded-map.js +0 -29
- package/dist/utils/bounded-map.js.map +0 -1
- package/dist/utils/canonical-input-hash.d.ts +0 -5
- package/dist/utils/canonical-input-hash.d.ts.map +0 -1
- package/dist/utils/canonical-input-hash.js +0 -43
- package/dist/utils/canonical-input-hash.js.map +0 -1
- package/dist/utils/canonical-json.d.ts +0 -10
- package/dist/utils/canonical-json.d.ts.map +0 -1
- package/dist/utils/canonical-json.js +0 -23
- package/dist/utils/canonical-json.js.map +0 -1
- package/dist/utils/child-env.d.ts +0 -147
- package/dist/utils/child-env.d.ts.map +0 -1
- package/dist/utils/child-env.js +0 -299
- package/dist/utils/child-env.js.map +0 -1
- package/dist/utils/cli-usage-limit.d.ts +0 -62
- package/dist/utils/cli-usage-limit.d.ts.map +0 -1
- package/dist/utils/cli-usage-limit.js +0 -169
- package/dist/utils/cli-usage-limit.js.map +0 -1
- package/dist/utils/codex-app-context.d.ts +0 -9
- package/dist/utils/codex-app-context.d.ts.map +0 -1
- package/dist/utils/codex-app-context.js +0 -47
- package/dist/utils/codex-app-context.js.map +0 -1
- package/dist/utils/codex-update-dialog.d.ts +0 -17
- package/dist/utils/codex-update-dialog.d.ts.map +0 -1
- package/dist/utils/codex-update-dialog.js +0 -33
- package/dist/utils/codex-update-dialog.js.map +0 -1
- package/dist/utils/crash-log.d.ts +0 -22
- package/dist/utils/crash-log.d.ts.map +0 -1
- package/dist/utils/crash-log.js +0 -37
- package/dist/utils/crash-log.js.map +0 -1
- package/dist/utils/daemon-discovery.d.ts +0 -25
- package/dist/utils/daemon-discovery.d.ts.map +0 -1
- package/dist/utils/daemon-discovery.js +0 -86
- package/dist/utils/daemon-discovery.js.map +0 -1
- package/dist/utils/effort-confirm-dialog.d.ts +0 -40
- package/dist/utils/effort-confirm-dialog.d.ts.map +0 -1
- package/dist/utils/effort-confirm-dialog.js +0 -74
- package/dist/utils/effort-confirm-dialog.js.map +0 -1
- package/dist/utils/executable.d.ts +0 -3
- package/dist/utils/executable.d.ts.map +0 -1
- package/dist/utils/executable.js +0 -24
- package/dist/utils/executable.js.map +0 -1
- package/dist/utils/file-lock.d.ts +0 -19
- package/dist/utils/file-lock.d.ts.map +0 -1
- package/dist/utils/file-lock.js +0 -1038
- package/dist/utils/file-lock.js.map +0 -1
- package/dist/utils/font-installer.d.ts +0 -2
- package/dist/utils/font-installer.d.ts.map +0 -1
- package/dist/utils/font-installer.js +0 -60
- package/dist/utils/font-installer.js.map +0 -1
- package/dist/utils/fs-durability.d.ts +0 -20
- package/dist/utils/fs-durability.d.ts.map +0 -1
- package/dist/utils/fs-durability.js +0 -84
- package/dist/utils/fs-durability.js.map +0 -1
- package/dist/utils/global-install.d.ts +0 -27
- package/dist/utils/global-install.d.ts.map +0 -1
- package/dist/utils/global-install.js +0 -184
- package/dist/utils/global-install.js.map +0 -1
- package/dist/utils/herdr-web-history.d.ts +0 -12
- package/dist/utils/herdr-web-history.d.ts.map +0 -1
- package/dist/utils/herdr-web-history.js +0 -74
- package/dist/utils/herdr-web-history.js.map +0 -1
- package/dist/utils/herdr-web-terminal-binding.d.ts +0 -39
- package/dist/utils/herdr-web-terminal-binding.d.ts.map +0 -1
- package/dist/utils/herdr-web-terminal-binding.js +0 -56
- package/dist/utils/herdr-web-terminal-binding.js.map +0 -1
- package/dist/utils/idle-detector.d.ts +0 -39
- package/dist/utils/idle-detector.d.ts.map +0 -1
- package/dist/utils/idle-detector.js +0 -159
- package/dist/utils/idle-detector.js.map +0 -1
- package/dist/utils/input-gate.d.ts +0 -103
- package/dist/utils/input-gate.d.ts.map +0 -1
- package/dist/utils/input-gate.js +0 -96
- package/dist/utils/input-gate.js.map +0 -1
- package/dist/utils/install-diagnostics.d.ts +0 -52
- package/dist/utils/install-diagnostics.d.ts.map +0 -1
- package/dist/utils/install-diagnostics.js +0 -157
- package/dist/utils/install-diagnostics.js.map +0 -1
- package/dist/utils/install-info.d.ts +0 -19
- package/dist/utils/install-info.d.ts.map +0 -1
- package/dist/utils/install-info.js +0 -68
- package/dist/utils/install-info.js.map +0 -1
- package/dist/utils/lark-upload.d.ts +0 -3
- package/dist/utils/lark-upload.d.ts.map +0 -1
- package/dist/utils/lark-upload.js +0 -31
- package/dist/utils/lark-upload.js.map +0 -1
- package/dist/utils/listen-with-probe.d.ts +0 -47
- package/dist/utils/listen-with-probe.d.ts.map +0 -1
- package/dist/utils/listen-with-probe.js +0 -142
- package/dist/utils/listen-with-probe.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -17
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -80
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/pending-input-queue.d.ts +0 -122
- package/dist/utils/pending-input-queue.d.ts.map +0 -1
- package/dist/utils/pending-input-queue.js +0 -170
- package/dist/utils/pending-input-queue.js.map +0 -1
- package/dist/utils/process-identity.d.ts +0 -7
- package/dist/utils/process-identity.d.ts.map +0 -1
- package/dist/utils/process-identity.js +0 -62
- package/dist/utils/process-identity.js.map +0 -1
- package/dist/utils/ready-gate.d.ts +0 -90
- package/dist/utils/ready-gate.d.ts.map +0 -1
- package/dist/utils/ready-gate.js +0 -104
- package/dist/utils/ready-gate.js.map +0 -1
- package/dist/utils/render-dimensions.d.ts +0 -56
- package/dist/utils/render-dimensions.d.ts.map +0 -1
- package/dist/utils/render-dimensions.js +0 -65
- package/dist/utils/render-dimensions.js.map +0 -1
- package/dist/utils/runtime-build-id.d.ts +0 -21
- package/dist/utils/runtime-build-id.d.ts.map +0 -1
- package/dist/utils/runtime-build-id.js +0 -83
- package/dist/utils/runtime-build-id.js.map +0 -1
- package/dist/utils/screenshot-renderer.d.ts +0 -11
- package/dist/utils/screenshot-renderer.d.ts.map +0 -1
- package/dist/utils/screenshot-renderer.js +0 -267
- package/dist/utils/screenshot-renderer.js.map +0 -1
- package/dist/utils/stdio-epipe-guard.d.ts +0 -39
- package/dist/utils/stdio-epipe-guard.d.ts.map +0 -1
- package/dist/utils/stdio-epipe-guard.js +0 -67
- package/dist/utils/stdio-epipe-guard.js.map +0 -1
- package/dist/utils/stuck-detector.d.ts +0 -45
- package/dist/utils/stuck-detector.d.ts.map +0 -1
- package/dist/utils/stuck-detector.js +0 -188
- package/dist/utils/stuck-detector.js.map +0 -1
- package/dist/utils/stuck-key-guard.d.ts +0 -76
- package/dist/utils/stuck-key-guard.d.ts.map +0 -1
- package/dist/utils/stuck-key-guard.js +0 -77
- package/dist/utils/stuck-key-guard.js.map +0 -1
- package/dist/utils/terminal-favicon.d.ts +0 -2
- package/dist/utils/terminal-favicon.d.ts.map +0 -1
- package/dist/utils/terminal-favicon.js +0 -5
- package/dist/utils/terminal-favicon.js.map +0 -1
- package/dist/utils/terminal-renderer.d.ts +0 -59
- package/dist/utils/terminal-renderer.d.ts.map +0 -1
- package/dist/utils/terminal-renderer.js +0 -121
- package/dist/utils/terminal-renderer.js.map +0 -1
- package/dist/utils/timezone.d.ts +0 -51
- package/dist/utils/timezone.d.ts.map +0 -1
- package/dist/utils/timezone.js +0 -110
- package/dist/utils/timezone.js.map +0 -1
- package/dist/utils/timing.d.ts +0 -30
- package/dist/utils/timing.d.ts.map +0 -1
- package/dist/utils/timing.js +0 -41
- package/dist/utils/timing.js.map +0 -1
- package/dist/utils/transient-snapshot.d.ts +0 -53
- package/dist/utils/transient-snapshot.d.ts.map +0 -1
- package/dist/utils/transient-snapshot.js +0 -123
- package/dist/utils/transient-snapshot.js.map +0 -1
- package/dist/utils/tui-input-delivery.d.ts +0 -32
- package/dist/utils/tui-input-delivery.d.ts.map +0 -1
- package/dist/utils/tui-input-delivery.js +0 -53
- package/dist/utils/tui-input-delivery.js.map +0 -1
- package/dist/utils/user-token.d.ts +0 -53
- package/dist/utils/user-token.d.ts.map +0 -1
- package/dist/utils/user-token.js +0 -296
- package/dist/utils/user-token.js.map +0 -1
- package/dist/utils/version-info.d.ts +0 -25
- package/dist/utils/version-info.d.ts.map +0 -1
- package/dist/utils/version-info.js +0 -48
- package/dist/utils/version-info.js.map +0 -1
- package/dist/utils/web-terminal-listen.d.ts +0 -30
- package/dist/utils/web-terminal-listen.d.ts.map +0 -1
- package/dist/utils/web-terminal-listen.js +0 -81
- package/dist/utils/web-terminal-listen.js.map +0 -1
- package/dist/utils/web-terminal-seed.d.ts +0 -40
- package/dist/utils/web-terminal-seed.d.ts.map +0 -1
- package/dist/utils/web-terminal-seed.js +0 -46
- package/dist/utils/web-terminal-seed.js.map +0 -1
- package/dist/utils/worker-http.d.ts +0 -7
- package/dist/utils/worker-http.d.ts.map +0 -1
- package/dist/utils/worker-http.js +0 -27
- package/dist/utils/worker-http.js.map +0 -1
- package/dist/utils/working-dir.d.ts +0 -11
- package/dist/utils/working-dir.d.ts.map +0 -1
- package/dist/utils/working-dir.js +0 -45
- package/dist/utils/working-dir.js.map +0 -1
- package/dist/utils/xml.d.ts +0 -19
- package/dist/utils/xml.d.ts.map +0 -1
- package/dist/utils/xml.js +0 -26
- package/dist/utils/xml.js.map +0 -1
- package/dist/vc-agent/cards.d.ts +0 -94
- package/dist/vc-agent/cards.d.ts.map +0 -1
- package/dist/vc-agent/cards.js +0 -927
- package/dist/vc-agent/cards.js.map +0 -1
- package/dist/vc-agent/meeting-state.d.ts +0 -39
- package/dist/vc-agent/meeting-state.d.ts.map +0 -1
- package/dist/vc-agent/meeting-state.js +0 -186
- package/dist/vc-agent/meeting-state.js.map +0 -1
- package/dist/vc-agent/normalizer.d.ts +0 -13
- package/dist/vc-agent/normalizer.d.ts.map +0 -1
- package/dist/vc-agent/normalizer.js +0 -470
- package/dist/vc-agent/normalizer.js.map +0 -1
- package/dist/vc-agent/polling-source.d.ts +0 -69
- package/dist/vc-agent/polling-source.d.ts.map +0 -1
- package/dist/vc-agent/polling-source.js +0 -194
- package/dist/vc-agent/polling-source.js.map +0 -1
- package/dist/vc-agent/push-source.d.ts +0 -13
- package/dist/vc-agent/push-source.d.ts.map +0 -1
- package/dist/vc-agent/push-source.js +0 -109
- package/dist/vc-agent/push-source.js.map +0 -1
- package/dist/vc-agent/realtime/audio-source.d.ts +0 -6
- package/dist/vc-agent/realtime/audio-source.d.ts.map +0 -1
- package/dist/vc-agent/realtime/audio-source.js +0 -17
- package/dist/vc-agent/realtime/audio-source.js.map +0 -1
- package/dist/vc-agent/realtime/endpoint.d.ts +0 -6
- package/dist/vc-agent/realtime/endpoint.d.ts.map +0 -1
- package/dist/vc-agent/realtime/endpoint.js +0 -25
- package/dist/vc-agent/realtime/endpoint.js.map +0 -1
- package/dist/vc-agent/realtime/errors.d.ts +0 -9
- package/dist/vc-agent/realtime/errors.d.ts.map +0 -1
- package/dist/vc-agent/realtime/errors.js +0 -17
- package/dist/vc-agent/realtime/errors.js.map +0 -1
- package/dist/vc-agent/realtime/events.d.ts +0 -24
- package/dist/vc-agent/realtime/events.d.ts.map +0 -1
- package/dist/vc-agent/realtime/events.js +0 -190
- package/dist/vc-agent/realtime/events.js.map +0 -1
- package/dist/vc-agent/realtime/frontier.d.ts +0 -34
- package/dist/vc-agent/realtime/frontier.d.ts.map +0 -1
- package/dist/vc-agent/realtime/frontier.js +0 -40
- package/dist/vc-agent/realtime/frontier.js.map +0 -1
- package/dist/vc-agent/realtime/index.d.ts +0 -11
- package/dist/vc-agent/realtime/index.d.ts.map +0 -1
- package/dist/vc-agent/realtime/index.js +0 -11
- package/dist/vc-agent/realtime/index.js.map +0 -1
- package/dist/vc-agent/realtime/pacer.d.ts +0 -21
- package/dist/vc-agent/realtime/pacer.d.ts.map +0 -1
- package/dist/vc-agent/realtime/pacer.js +0 -80
- package/dist/vc-agent/realtime/pacer.js.map +0 -1
- package/dist/vc-agent/realtime/protobuf.d.ts +0 -33
- package/dist/vc-agent/realtime/protobuf.d.ts.map +0 -1
- package/dist/vc-agent/realtime/protobuf.js +0 -159
- package/dist/vc-agent/realtime/protobuf.js.map +0 -1
- package/dist/vc-agent/realtime/protocol.d.ts +0 -4
- package/dist/vc-agent/realtime/protocol.d.ts.map +0 -1
- package/dist/vc-agent/realtime/protocol.js +0 -59
- package/dist/vc-agent/realtime/protocol.js.map +0 -1
- package/dist/vc-agent/realtime/session.d.ts +0 -39
- package/dist/vc-agent/realtime/session.d.ts.map +0 -1
- package/dist/vc-agent/realtime/session.js +0 -221
- package/dist/vc-agent/realtime/session.js.map +0 -1
- package/dist/vc-agent/realtime/transport.d.ts +0 -23
- package/dist/vc-agent/realtime/transport.d.ts.map +0 -1
- package/dist/vc-agent/realtime/transport.js +0 -112
- package/dist/vc-agent/realtime/transport.js.map +0 -1
- package/dist/vc-agent/realtime/types.d.ts +0 -84
- package/dist/vc-agent/realtime/types.d.ts.map +0 -1
- package/dist/vc-agent/realtime/types.js +0 -5
- package/dist/vc-agent/realtime/types.js.map +0 -1
- package/dist/vc-agent/types.d.ts +0 -143
- package/dist/vc-agent/types.d.ts.map +0 -1
- package/dist/vc-agent/types.js +0 -2
- package/dist/vc-agent/types.js.map +0 -1
- package/dist/worker.d.ts +0 -3
- package/dist/worker.d.ts.map +0 -1
- package/dist/worker.js +0 -12831
- package/dist/worker.js.map +0 -1
- package/dist/workflows/attempt-terminal.d.ts +0 -25
- package/dist/workflows/attempt-terminal.d.ts.map +0 -1
- package/dist/workflows/attempt-terminal.js +0 -7
- package/dist/workflows/attempt-terminal.js.map +0 -1
- package/dist/workflows/definition.d.ts +0 -1705
- package/dist/workflows/definition.d.ts.map +0 -1
- package/dist/workflows/definition.js +0 -552
- package/dist/workflows/definition.js.map +0 -1
- package/dist/workflows/events/payloads.d.ts +0 -1116
- package/dist/workflows/events/payloads.d.ts.map +0 -1
- package/dist/workflows/events/payloads.js +0 -397
- package/dist/workflows/events/payloads.js.map +0 -1
- package/dist/workflows/events/replay.d.ts +0 -265
- package/dist/workflows/events/replay.d.ts.map +0 -1
- package/dist/workflows/events/replay.js +0 -716
- package/dist/workflows/events/replay.js.map +0 -1
- package/dist/workflows/events/schema.d.ts +0 -6093
- package/dist/workflows/events/schema.d.ts.map +0 -1
- package/dist/workflows/events/schema.js +0 -328
- package/dist/workflows/events/schema.js.map +0 -1
- package/dist/workflows/events/types.d.ts +0 -38
- package/dist/workflows/events/types.d.ts.map +0 -1
- package/dist/workflows/events/types.js +0 -2
- package/dist/workflows/events/types.js.map +0 -1
- package/dist/workflows/hostExecutors/botmux-schedule.d.ts +0 -47
- package/dist/workflows/hostExecutors/botmux-schedule.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/botmux-schedule.js +0 -198
- package/dist/workflows/hostExecutors/botmux-schedule.js.map +0 -1
- package/dist/workflows/hostExecutors/feishu-im.d.ts +0 -12
- package/dist/workflows/hostExecutors/feishu-im.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/feishu-im.js +0 -49
- package/dist/workflows/hostExecutors/feishu-im.js.map +0 -1
- package/dist/workflows/hostExecutors/feishu-reply.d.ts +0 -24
- package/dist/workflows/hostExecutors/feishu-reply.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/feishu-reply.js +0 -88
- package/dist/workflows/hostExecutors/feishu-reply.js.map +0 -1
- package/dist/workflows/hostExecutors/feishu-send.d.ts +0 -23
- package/dist/workflows/hostExecutors/feishu-send.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/feishu-send.js +0 -124
- package/dist/workflows/hostExecutors/feishu-send.js.map +0 -1
- package/dist/workflows/hostExecutors/index.d.ts +0 -7
- package/dist/workflows/hostExecutors/index.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/index.js +0 -7
- package/dist/workflows/hostExecutors/index.js.map +0 -1
- package/dist/workflows/hostExecutors/registry.d.ts +0 -5
- package/dist/workflows/hostExecutors/registry.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/registry.js +0 -36
- package/dist/workflows/hostExecutors/registry.js.map +0 -1
- package/dist/workflows/hostExecutors/types.d.ts +0 -70
- package/dist/workflows/hostExecutors/types.d.ts.map +0 -1
- package/dist/workflows/hostExecutors/types.js +0 -2
- package/dist/workflows/hostExecutors/types.js.map +0 -1
- package/dist/workflows/migration/v2-definition-paths.d.ts +0 -3
- package/dist/workflows/migration/v2-definition-paths.d.ts.map +0 -1
- package/dist/workflows/migration/v2-definition-paths.js +0 -10
- package/dist/workflows/migration/v2-definition-paths.js.map +0 -1
- package/dist/workflows/migration/v2-ledger.d.ts +0 -138
- package/dist/workflows/migration/v2-ledger.d.ts.map +0 -1
- package/dist/workflows/migration/v2-ledger.js +0 -599
- package/dist/workflows/migration/v2-ledger.js.map +0 -1
- package/dist/workflows/migration/v2-migration-service.d.ts +0 -40
- package/dist/workflows/migration/v2-migration-service.d.ts.map +0 -1
- package/dist/workflows/migration/v2-migration-service.js +0 -454
- package/dist/workflows/migration/v2-migration-service.js.map +0 -1
- package/dist/workflows/migration/v2-read-only-ids.d.ts +0 -7
- package/dist/workflows/migration/v2-read-only-ids.d.ts.map +0 -1
- package/dist/workflows/migration/v2-read-only-ids.js +0 -9
- package/dist/workflows/migration/v2-read-only-ids.js.map +0 -1
- package/dist/workflows/migration/v2-run-archive-schema.d.ts +0 -976
- package/dist/workflows/migration/v2-run-archive-schema.d.ts.map +0 -1
- package/dist/workflows/migration/v2-run-archive-schema.js +0 -113
- package/dist/workflows/migration/v2-run-archive-schema.js.map +0 -1
- package/dist/workflows/migration/v2-run-archive.d.ts +0 -92
- package/dist/workflows/migration/v2-run-archive.d.ts.map +0 -1
- package/dist/workflows/migration/v2-run-archive.js +0 -1220
- package/dist/workflows/migration/v2-run-archive.js.map +0 -1
- package/dist/workflows/migration/v2-scanner.d.ts +0 -22
- package/dist/workflows/migration/v2-scanner.d.ts.map +0 -1
- package/dist/workflows/migration/v2-scanner.js +0 -114
- package/dist/workflows/migration/v2-scanner.js.map +0 -1
- package/dist/workflows/migration/v2-to-v3.d.ts +0 -32
- package/dist/workflows/migration/v2-to-v3.d.ts.map +0 -1
- package/dist/workflows/migration/v2-to-v3.js +0 -498
- package/dist/workflows/migration/v2-to-v3.js.map +0 -1
- package/dist/workflows/ops-projection.d.ts +0 -226
- package/dist/workflows/ops-projection.d.ts.map +0 -1
- package/dist/workflows/ops-projection.js +0 -804
- package/dist/workflows/ops-projection.js.map +0 -1
- package/dist/workflows/shared/idempotency-key.d.ts +0 -19
- package/dist/workflows/shared/idempotency-key.d.ts.map +0 -1
- package/dist/workflows/shared/idempotency-key.js +0 -23
- package/dist/workflows/shared/idempotency-key.js.map +0 -1
- package/dist/workflows/shared/params.d.ts +0 -97
- package/dist/workflows/shared/params.d.ts.map +0 -1
- package/dist/workflows/shared/params.js +0 -282
- package/dist/workflows/shared/params.js.map +0 -1
- package/dist/workflows/shared/provider-reconciler.d.ts +0 -18
- package/dist/workflows/shared/provider-reconciler.d.ts.map +0 -1
- package/dist/workflows/shared/provider-reconciler.js +0 -17
- package/dist/workflows/shared/provider-reconciler.js.map +0 -1
- package/dist/workflows/shared/sandbox-policy.d.ts +0 -23
- package/dist/workflows/shared/sandbox-policy.d.ts.map +0 -1
- package/dist/workflows/shared/sandbox-policy.js +0 -21
- package/dist/workflows/shared/sandbox-policy.js.map +0 -1
- package/dist/workflows/shared/worker-process.d.ts +0 -29
- package/dist/workflows/shared/worker-process.d.ts.map +0 -1
- package/dist/workflows/shared/worker-process.js +0 -56
- package/dist/workflows/shared/worker-process.js.map +0 -1
- package/dist/workflows/v3/architect.d.ts +0 -37
- package/dist/workflows/v3/architect.d.ts.map +0 -1
- package/dist/workflows/v3/architect.js +0 -239
- package/dist/workflows/v3/architect.js.map +0 -1
- package/dist/workflows/v3/artifact-contract.d.ts +0 -41
- package/dist/workflows/v3/artifact-contract.d.ts.map +0 -1
- package/dist/workflows/v3/artifact-contract.js +0 -20
- package/dist/workflows/v3/artifact-contract.js.map +0 -1
- package/dist/workflows/v3/attempt-ledger.d.ts +0 -23
- package/dist/workflows/v3/attempt-ledger.d.ts.map +0 -1
- package/dist/workflows/v3/attempt-ledger.js +0 -74
- package/dist/workflows/v3/attempt-ledger.js.map +0 -1
- package/dist/workflows/v3/bot-resolve.d.ts +0 -39
- package/dist/workflows/v3/bot-resolve.d.ts.map +0 -1
- package/dist/workflows/v3/bot-resolve.js +0 -214
- package/dist/workflows/v3/bot-resolve.js.map +0 -1
- package/dist/workflows/v3/botmux-attempt-lease.d.ts +0 -7
- package/dist/workflows/v3/botmux-attempt-lease.d.ts.map +0 -1
- package/dist/workflows/v3/botmux-attempt-lease.js +0 -189
- package/dist/workflows/v3/botmux-attempt-lease.js.map +0 -1
- package/dist/workflows/v3/botmux-host-policy.d.ts +0 -7
- package/dist/workflows/v3/botmux-host-policy.d.ts.map +0 -1
- package/dist/workflows/v3/botmux-host-policy.js +0 -34
- package/dist/workflows/v3/botmux-host-policy.js.map +0 -1
- package/dist/workflows/v3/cli-daemon-command-authority.d.ts +0 -59
- package/dist/workflows/v3/cli-daemon-command-authority.d.ts.map +0 -1
- package/dist/workflows/v3/cli-daemon-command-authority.js +0 -175
- package/dist/workflows/v3/cli-daemon-command-authority.js.map +0 -1
- package/dist/workflows/v3/cli-run.d.ts +0 -60
- package/dist/workflows/v3/cli-run.d.ts.map +0 -1
- package/dist/workflows/v3/cli-run.js +0 -368
- package/dist/workflows/v3/cli-run.js.map +0 -1
- package/dist/workflows/v3/contract.d.ts +0 -243
- package/dist/workflows/v3/contract.d.ts.map +0 -1
- package/dist/workflows/v3/contract.js +0 -89
- package/dist/workflows/v3/contract.js.map +0 -1
- package/dist/workflows/v3/core-control.d.ts +0 -16
- package/dist/workflows/v3/core-control.d.ts.map +0 -1
- package/dist/workflows/v3/core-control.js +0 -60
- package/dist/workflows/v3/core-control.js.map +0 -1
- package/dist/workflows/v3/daemon-ipc-auth.d.ts +0 -113
- package/dist/workflows/v3/daemon-ipc-auth.d.ts.map +0 -1
- package/dist/workflows/v3/daemon-ipc-auth.js +0 -294
- package/dist/workflows/v3/daemon-ipc-auth.js.map +0 -1
- package/dist/workflows/v3/daemon-ipc-body.d.ts +0 -30
- package/dist/workflows/v3/daemon-ipc-body.d.ts.map +0 -1
- package/dist/workflows/v3/daemon-ipc-body.js +0 -65
- package/dist/workflows/v3/daemon-ipc-body.js.map +0 -1
- package/dist/workflows/v3/daemon-ipc-client.d.ts +0 -32
- package/dist/workflows/v3/daemon-ipc-client.d.ts.map +0 -1
- package/dist/workflows/v3/daemon-ipc-client.js +0 -74
- package/dist/workflows/v3/daemon-ipc-client.js.map +0 -1
- package/dist/workflows/v3/daemon-run.d.ts +0 -396
- package/dist/workflows/v3/daemon-run.d.ts.map +0 -1
- package/dist/workflows/v3/daemon-run.js +0 -1573
- package/dist/workflows/v3/daemon-run.js.map +0 -1
- package/dist/workflows/v3/dag-loader.d.ts +0 -5
- package/dist/workflows/v3/dag-loader.d.ts.map +0 -1
- package/dist/workflows/v3/dag-loader.js +0 -22
- package/dist/workflows/v3/dag-loader.js.map +0 -1
- package/dist/workflows/v3/dag.d.ts +0 -342
- package/dist/workflows/v3/dag.d.ts.map +0 -1
- package/dist/workflows/v3/dag.js +0 -1210
- package/dist/workflows/v3/dag.js.map +0 -1
- package/dist/workflows/v3/distillation-compiler.d.ts +0 -36
- package/dist/workflows/v3/distillation-compiler.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-compiler.js +0 -704
- package/dist/workflows/v3/distillation-compiler.js.map +0 -1
- package/dist/workflows/v3/distillation-private-root.d.ts +0 -10
- package/dist/workflows/v3/distillation-private-root.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-private-root.js +0 -34
- package/dist/workflows/v3/distillation-private-root.js.map +0 -1
- package/dist/workflows/v3/distillation-runner.d.ts +0 -68
- package/dist/workflows/v3/distillation-runner.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-runner.js +0 -1030
- package/dist/workflows/v3/distillation-runner.js.map +0 -1
- package/dist/workflows/v3/distillation-schema.d.ts +0 -63
- package/dist/workflows/v3/distillation-schema.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-schema.js +0 -184
- package/dist/workflows/v3/distillation-schema.js.map +0 -1
- package/dist/workflows/v3/distillation-service.d.ts +0 -78
- package/dist/workflows/v3/distillation-service.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-service.js +0 -416
- package/dist/workflows/v3/distillation-service.js.map +0 -1
- package/dist/workflows/v3/distillation-source.d.ts +0 -35
- package/dist/workflows/v3/distillation-source.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-source.js +0 -118
- package/dist/workflows/v3/distillation-source.js.map +0 -1
- package/dist/workflows/v3/distillation-store.d.ts +0 -185
- package/dist/workflows/v3/distillation-store.d.ts.map +0 -1
- package/dist/workflows/v3/distillation-store.js +0 -1127
- package/dist/workflows/v3/distillation-store.js.map +0 -1
- package/dist/workflows/v3/drive-lease.d.ts +0 -7
- package/dist/workflows/v3/drive-lease.d.ts.map +0 -1
- package/dist/workflows/v3/drive-lease.js +0 -10
- package/dist/workflows/v3/drive-lease.js.map +0 -1
- package/dist/workflows/v3/ephemeral-pool.d.ts +0 -29
- package/dist/workflows/v3/ephemeral-pool.d.ts.map +0 -1
- package/dist/workflows/v3/ephemeral-pool.js +0 -536
- package/dist/workflows/v3/ephemeral-pool.js.map +0 -1
- package/dist/workflows/v3/event-contract.d.ts +0 -273
- package/dist/workflows/v3/event-contract.d.ts.map +0 -1
- package/dist/workflows/v3/event-contract.js +0 -8
- package/dist/workflows/v3/event-contract.js.map +0 -1
- package/dist/workflows/v3/gate-policy.d.ts +0 -12
- package/dist/workflows/v3/gate-policy.d.ts.map +0 -1
- package/dist/workflows/v3/gate-policy.js +0 -20
- package/dist/workflows/v3/gate-policy.js.map +0 -1
- package/dist/workflows/v3/gate-wait-store.d.ts +0 -99
- package/dist/workflows/v3/gate-wait-store.d.ts.map +0 -1
- package/dist/workflows/v3/gate-wait-store.js +0 -263
- package/dist/workflows/v3/gate-wait-store.js.map +0 -1
- package/dist/workflows/v3/goal-cli.d.ts +0 -58
- package/dist/workflows/v3/goal-cli.d.ts.map +0 -1
- package/dist/workflows/v3/goal-cli.js +0 -430
- package/dist/workflows/v3/goal-cli.js.map +0 -1
- package/dist/workflows/v3/grill-state.d.ts +0 -107
- package/dist/workflows/v3/grill-state.d.ts.map +0 -1
- package/dist/workflows/v3/grill-state.js +0 -168
- package/dist/workflows/v3/grill-state.js.map +0 -1
- package/dist/workflows/v3/host-bindings.d.ts +0 -40
- package/dist/workflows/v3/host-bindings.d.ts.map +0 -1
- package/dist/workflows/v3/host-bindings.js +0 -272
- package/dist/workflows/v3/host-bindings.js.map +0 -1
- package/dist/workflows/v3/host-effect-ledger.d.ts +0 -22
- package/dist/workflows/v3/host-effect-ledger.d.ts.map +0 -1
- package/dist/workflows/v3/host-effect-ledger.js +0 -110
- package/dist/workflows/v3/host-effect-ledger.js.map +0 -1
- package/dist/workflows/v3/host-execution.d.ts +0 -142
- package/dist/workflows/v3/host-execution.d.ts.map +0 -1
- package/dist/workflows/v3/host-execution.js +0 -424
- package/dist/workflows/v3/host-execution.js.map +0 -1
- package/dist/workflows/v3/host.d.ts +0 -124
- package/dist/workflows/v3/host.d.ts.map +0 -1
- package/dist/workflows/v3/host.js +0 -628
- package/dist/workflows/v3/host.js.map +0 -1
- package/dist/workflows/v3/human-gate.d.ts +0 -8
- package/dist/workflows/v3/human-gate.d.ts.map +0 -1
- package/dist/workflows/v3/human-gate.js +0 -8
- package/dist/workflows/v3/human-gate.js.map +0 -1
- package/dist/workflows/v3/in-process-attempt-lease.d.ts +0 -10
- package/dist/workflows/v3/in-process-attempt-lease.d.ts.map +0 -1
- package/dist/workflows/v3/in-process-attempt-lease.js +0 -47
- package/dist/workflows/v3/in-process-attempt-lease.js.map +0 -1
- package/dist/workflows/v3/journal.d.ts +0 -52
- package/dist/workflows/v3/journal.d.ts.map +0 -1
- package/dist/workflows/v3/journal.js +0 -190
- package/dist/workflows/v3/journal.js.map +0 -1
- package/dist/workflows/v3/library-materialize.d.ts +0 -88
- package/dist/workflows/v3/library-materialize.d.ts.map +0 -1
- package/dist/workflows/v3/library-materialize.js +0 -298
- package/dist/workflows/v3/library-materialize.js.map +0 -1
- package/dist/workflows/v3/library-schema.d.ts +0 -159
- package/dist/workflows/v3/library-schema.d.ts.map +0 -1
- package/dist/workflows/v3/library-schema.js +0 -667
- package/dist/workflows/v3/library-schema.js.map +0 -1
- package/dist/workflows/v3/library-service.d.ts +0 -126
- package/dist/workflows/v3/library-service.d.ts.map +0 -1
- package/dist/workflows/v3/library-service.js +0 -542
- package/dist/workflows/v3/library-service.js.map +0 -1
- package/dist/workflows/v3/library-store.d.ts +0 -124
- package/dist/workflows/v3/library-store.d.ts.map +0 -1
- package/dist/workflows/v3/library-store.js +0 -665
- package/dist/workflows/v3/library-store.js.map +0 -1
- package/dist/workflows/v3/manifest.d.ts +0 -17
- package/dist/workflows/v3/manifest.d.ts.map +0 -1
- package/dist/workflows/v3/manifest.js +0 -266
- package/dist/workflows/v3/manifest.js.map +0 -1
- package/dist/workflows/v3/ops-projection.d.ts +0 -110
- package/dist/workflows/v3/ops-projection.d.ts.map +0 -1
- package/dist/workflows/v3/ops-projection.js +0 -0
- package/dist/workflows/v3/ops-projection.js.map +0 -1
- package/dist/workflows/v3/orchestrator.d.ts +0 -175
- package/dist/workflows/v3/orchestrator.d.ts.map +0 -1
- package/dist/workflows/v3/orchestrator.js +0 -418
- package/dist/workflows/v3/orchestrator.js.map +0 -1
- package/dist/workflows/v3/portable-artifact-snapshot.d.ts +0 -15
- package/dist/workflows/v3/portable-artifact-snapshot.d.ts.map +0 -1
- package/dist/workflows/v3/portable-artifact-snapshot.js +0 -76
- package/dist/workflows/v3/portable-artifact-snapshot.js.map +0 -1
- package/dist/workflows/v3/portable-final-outputs.d.ts +0 -37
- package/dist/workflows/v3/portable-final-outputs.d.ts.map +0 -1
- package/dist/workflows/v3/portable-final-outputs.js +0 -137
- package/dist/workflows/v3/portable-final-outputs.js.map +0 -1
- package/dist/workflows/v3/portable-run-snapshot.d.ts +0 -14
- package/dist/workflows/v3/portable-run-snapshot.d.ts.map +0 -1
- package/dist/workflows/v3/portable-run-snapshot.js +0 -176
- package/dist/workflows/v3/portable-run-snapshot.js.map +0 -1
- package/dist/workflows/v3/portable-runtime.d.ts +0 -83
- package/dist/workflows/v3/portable-runtime.d.ts.map +0 -1
- package/dist/workflows/v3/portable-runtime.js +0 -135
- package/dist/workflows/v3/portable-runtime.js.map +0 -1
- package/dist/workflows/v3/progress-projection.d.ts +0 -102
- package/dist/workflows/v3/progress-projection.d.ts.map +0 -1
- package/dist/workflows/v3/progress-projection.js +0 -219
- package/dist/workflows/v3/progress-projection.js.map +0 -1
- package/dist/workflows/v3/run-envelope.d.ts +0 -1324
- package/dist/workflows/v3/run-envelope.d.ts.map +0 -1
- package/dist/workflows/v3/run-envelope.js +0 -712
- package/dist/workflows/v3/run-envelope.js.map +0 -1
- package/dist/workflows/v3/runtime-host-contract.d.ts +0 -182
- package/dist/workflows/v3/runtime-host-contract.d.ts.map +0 -1
- package/dist/workflows/v3/runtime-host-contract.js +0 -9
- package/dist/workflows/v3/runtime-host-contract.js.map +0 -1
- package/dist/workflows/v3/runtime.d.ts +0 -16
- package/dist/workflows/v3/runtime.d.ts.map +0 -1
- package/dist/workflows/v3/runtime.js +0 -18
- package/dist/workflows/v3/runtime.js.map +0 -1
- package/dist/workflows/v3/session-relay-client.d.ts +0 -61
- package/dist/workflows/v3/session-relay-client.d.ts.map +0 -1
- package/dist/workflows/v3/session-relay-client.js +0 -92
- package/dist/workflows/v3/session-relay-client.js.map +0 -1
- package/dist/workflows/v3/session-relay.d.ts +0 -66
- package/dist/workflows/v3/session-relay.d.ts.map +0 -1
- package/dist/workflows/v3/session-relay.js +0 -157
- package/dist/workflows/v3/session-relay.js.map +0 -1
- package/dist/workflows/v3/shared-node-runtime.d.ts +0 -203
- package/dist/workflows/v3/shared-node-runtime.d.ts.map +0 -1
- package/dist/workflows/v3/shared-node-runtime.js +0 -2978
- package/dist/workflows/v3/shared-node-runtime.js.map +0 -1
- package/dist/workflows/v3/shared-runtime.d.ts +0 -17
- package/dist/workflows/v3/shared-runtime.d.ts.map +0 -1
- package/dist/workflows/v3/shared-runtime.js +0 -12
- package/dist/workflows/v3/shared-runtime.js.map +0 -1
- package/dist/workflows/v3/spec.d.ts +0 -32
- package/dist/workflows/v3/spec.d.ts.map +0 -1
- package/dist/workflows/v3/spec.js +0 -173
- package/dist/workflows/v3/spec.js.map +0 -1
- package/dist/workflows/v3/start-intent.d.ts +0 -8
- package/dist/workflows/v3/start-intent.d.ts.map +0 -1
- package/dist/workflows/v3/start-intent.js +0 -34
- package/dist/workflows/v3/start-intent.js.map +0 -1
- package/dist/workflows/v3/state.d.ts +0 -83
- package/dist/workflows/v3/state.d.ts.map +0 -1
- package/dist/workflows/v3/state.js +0 -525
- package/dist/workflows/v3/state.js.map +0 -1
- package/dist/workflows/v3/template-bindings.d.ts +0 -22
- package/dist/workflows/v3/template-bindings.d.ts.map +0 -1
- package/dist/workflows/v3/template-bindings.js +0 -204
- package/dist/workflows/v3/template-bindings.js.map +0 -1
- package/dist/workflows/v3/worker-fence.d.ts +0 -158
- package/dist/workflows/v3/worker-fence.d.ts.map +0 -1
- package/dist/workflows/v3/worker-fence.js +0 -690
- package/dist/workflows/v3/worker-fence.js.map +0 -1
- package/ecosystem.config.cjs +0 -15
|
@@ -1,2923 +0,0 @@
|
|
|
1
|
-
import { basename as pathBasename, dirname, join } from 'node:path';
|
|
2
|
-
import { config } from '../../config.js';
|
|
3
|
-
import { getBot, getAllBots, getOwnerOpenId } from '../../bot-registry.js';
|
|
4
|
-
import { canOperate, canTalk } from './event-dispatcher.js';
|
|
5
|
-
import { updateMessage, deleteMessage, replyMessage, sendMessage, sendUserMessage, sendEphemeralCard, getMessageDetail, isHumanOpenId, resolveUserUnionId as defaultResolveUserUnionId } from './client.js';
|
|
6
|
-
import { buildSessionCard, buildStreamingCard, buildTuiPromptCard, buildTuiPromptProcessingCard, buildGrantResultCard, getCliDisplayName, truncateContent, buildConfigCard, buildConfigTextCard, CONFIG_UNSET, buildRepoSelectCard } from './card-builder.js';
|
|
7
|
-
import { codexServiceTierBadge } from '../../services/codex-service-tier.js';
|
|
8
|
-
import { findConfigField, applyConfigField, coerceConfigValue, getConfigCardData, } from '../../services/bot-config-store.js';
|
|
9
|
-
import { updateBotGrantPrefs } from '../../services/grant-prefs-store.js';
|
|
10
|
-
import { writeTeamRoleFile, deleteTeamRoleFile } from '../../core/role-resolver.js';
|
|
11
|
-
import { addChatGrant, addGlobalGrant } from '../../services/grant-store.js';
|
|
12
|
-
import { checkNonce, clearPending, getPendingGrantLimits, getPendingMessage, markDenied, updatePendingGrantLimits, } from './grant-pending.js';
|
|
13
|
-
import { normalizeGrantDurationOption, normalizeGrantQuotaOption } from '../../services/grant-policy.js';
|
|
14
|
-
import { claimOverloadNonce, releaseOverloadNonce } from './overload-nonce.js';
|
|
15
|
-
import { buildOverloadAlertCard, buildOverloadExpiredCard, OVERLOAD_ACTION_CLEAN_STOPPED, OVERLOAD_ACTION_SUSPEND_IDLE, OVERLOAD_ACTION_NOOP, } from '../../core/host-overload-alert.js';
|
|
16
|
-
import { listOnlineDaemons } from '../../utils/daemon-discovery.js';
|
|
17
|
-
import { fetchDaemonIpc } from '../../core/daemon-ipc-auth.js';
|
|
18
|
-
import { recordObservedBots } from '../../services/observed-bots-store.js';
|
|
19
|
-
import { handleV3GateAction, isV3GateAction, } from './v3-gate-card-handler.js';
|
|
20
|
-
import { handleV3BlockedAction, isV3BlockedAction, } from './v3-blocked-card-handler.js';
|
|
21
|
-
import { handleV3LoopGrantAction, isV3LoopGrantAction, } from './v3-loop-grant-card-handler.js';
|
|
22
|
-
import { handleV3RevisitGrantAction, isV3RevisitGrantAction, } from './v3-revisit-grant-card-handler.js';
|
|
23
|
-
import { handleV3RunSaveAction, isV3RunSaveAction, } from './v3-run-save-card-handler.js';
|
|
24
|
-
import { handleV3DistillationAction, isV3DistillationAction, } from './v3-distillation-card-handler.js';
|
|
25
|
-
import { handleAskCardAction, isAskCardAction } from './ask-card.js';
|
|
26
|
-
import { createCliAdapterSync } from '../../adapters/cli/registry.js';
|
|
27
|
-
import { buildClosedSessionCard } from '../../core/closed-session-card.js';
|
|
28
|
-
import { ttadkConfigModelChoices } from '../../setup/cli-selection.js';
|
|
29
|
-
import { logger } from '../../utils/logger.js';
|
|
30
|
-
import * as sessionStore from '../../services/session-store.js';
|
|
31
|
-
import { loadFrozenCards, saveFrozenCards } from '../../services/frozen-card-store.js';
|
|
32
|
-
import { forkWorker, sendWorkerInput, sendWorkerSessionInput, killWorker, closeSession, teardownAuthoritativePersistentBackingBeforeClose, scheduleCardPatch, parkStreamCard, clearUsageLimitState, cardUsageLimit, writableTerminalLinkFor, workerHasInitialized, sessionSupportsWebTerminal, readableTerminalUrlFor, resolvePrivateCardAudience, deliverWriteLinkCard, deliverEphemeralOrReply, CARD_POSTING_SENTINEL, requestSessionRestart, isSessionTransferring, getDaemonStreamingCardUsageSnapshot } from '../../core/worker-pool.js';
|
|
33
|
-
import { getSessionWorkingDir, buildNewTopicCliInput, getAvailableBots, persistStreamCardState, resumeSession, rememberLastCliInput, ensureSessionWhiteboard } from '../../core/session-manager.js';
|
|
34
|
-
import { markInitialUserTurnPending } from '../../core/initial-user-turn.js';
|
|
35
|
-
import { publishAttentionPatch, publishClosedSessionPatch, announcePendingRepoSession } from '../../core/session-activity.js';
|
|
36
|
-
import { fallbackTurnId } from '../../core/reply-target.js';
|
|
37
|
-
import { sendWorkerIpc } from '../../core/worker-ipc.js';
|
|
38
|
-
import { validateWorkingDir } from '../../core/working-dir.js';
|
|
39
|
-
import { sessionKey, sessionAnchorId, frozenDisplayMode, markRepoCardConsumed, isActiveRepoCard, claimCurrentRepoCard } from '../../core/types.js';
|
|
40
|
-
import { buildTerminalUrl } from '../../core/terminal-url.js';
|
|
41
|
-
import { createRepoWorktree, removeRepoWorktree, dirSuffixForBranch, pushWorktreeBranch } from '../../services/git-worktree.js';
|
|
42
|
-
import { withCodexAppContext } from '../../utils/codex-app-context.js';
|
|
43
|
-
import { resolvePairedSpawnBackendType } from '../../core/persistent-backend.js';
|
|
44
|
-
import { sessionConfiguredRuntimeDisplayName } from '../../core/cli-runtime-display.js';
|
|
45
|
-
import { worktreeSlugFromContextAI } from '../../services/worktree-slug-ai.js';
|
|
46
|
-
import { t, localeForBot, isLocale } from '../../i18n/index.js';
|
|
47
|
-
import { isLocalCliOpenCapable, isLocalCliOpenConfigured, isLocalCliOpenReady, localCliOpenMode, openLocalCliInIterm, preflightLocalCliOpen, } from '../../services/local-cli-opener.js';
|
|
48
|
-
/**
|
|
49
|
-
* Resolve the verified `union_id` of the operator who clicked a card button.
|
|
50
|
-
*
|
|
51
|
-
* Three-state semantics:
|
|
52
|
-
* 1. `operator.union_id` starts with `on_` → trust it directly.
|
|
53
|
-
* 2. `operator.union_id` is present but does NOT start with `on_` (e.g.
|
|
54
|
-
* `ou_xxx`, malformed) → reject; do NOT fallback. Trusting `open_id`
|
|
55
|
-
* after a malformed verified field would be a bypass.
|
|
56
|
-
* 3. `operator.union_id` is absent → fall back to
|
|
57
|
-
* `resolveUserUnionId(larkAppId, openId)`, accepting only `on_`-prefixed
|
|
58
|
-
* results.
|
|
59
|
-
*
|
|
60
|
-
* In every failure mode (missing open_id, fallback returns no unionId,
|
|
61
|
-
* fallback throws) the function returns `{ openId }` with `unionId` left
|
|
62
|
-
* undefined, so callers fail closed.
|
|
63
|
-
*
|
|
64
|
-
* `action.value` is NEVER read here — see the unit tests that pin that
|
|
65
|
-
* contract.
|
|
66
|
-
*/
|
|
67
|
-
export async function resolveCardOperatorUnionId(data, larkAppId, deps = {}) {
|
|
68
|
-
const openId = data.operator?.open_id;
|
|
69
|
-
if (!openId)
|
|
70
|
-
return {};
|
|
71
|
-
const verified = data.operator?.union_id;
|
|
72
|
-
if (typeof verified === 'string') {
|
|
73
|
-
// Verified field present — must be on_ prefix or we reject. Fallback is
|
|
74
|
-
// deliberately skipped: a malformed verified identity is a stronger
|
|
75
|
-
// negative signal than its absence.
|
|
76
|
-
if (verified.startsWith('on_'))
|
|
77
|
-
return { unionId: verified, openId };
|
|
78
|
-
return { openId };
|
|
79
|
-
}
|
|
80
|
-
// Verified field absent — fallback to the contact API. Wrapped in try/catch
|
|
81
|
-
// so resolver errors don't bubble up and surprise card-callback paths.
|
|
82
|
-
const resolver = deps.resolveUserUnionId ?? defaultResolveUserUnionId;
|
|
83
|
-
try {
|
|
84
|
-
const { unionId } = await resolver(larkAppId, openId);
|
|
85
|
-
if (typeof unionId === 'string' && unionId.startsWith('on_')) {
|
|
86
|
-
return { unionId, openId };
|
|
87
|
-
}
|
|
88
|
-
return { openId };
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
return { openId };
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
// ─── Helpers ──────────────────────────────────────────────────────────────
|
|
95
|
-
function tag(ds) {
|
|
96
|
-
return ds.session.sessionId.substring(0, 8);
|
|
97
|
-
}
|
|
98
|
-
const LEGACY_SELF_HEAL_ACTIONS = new Set(['toggle_display', 'toggle_stream', 'refresh_screenshot']);
|
|
99
|
-
// 🔊 语音总结 once-only guard: card message ids that already triggered a voice
|
|
100
|
-
// summary. Keyed by the clicked card's message id so any number of users
|
|
101
|
-
// clicking the same reply only ever generates ONE voice bubble (防刷屏).
|
|
102
|
-
// In-memory (per daemon lifetime) — a restart resets it, which at worst allows
|
|
103
|
-
// one re-trigger on an old card; acceptable. Capped to avoid unbounded growth.
|
|
104
|
-
const voicedCardIds = new Set();
|
|
105
|
-
// Instruction injected into the session when the voice button is clicked. The
|
|
106
|
-
// model (which still has its just-sent reply in context) condenses it into
|
|
107
|
-
// spoken prose and emits it via `botmux send --voice`. Kept terse and explicit
|
|
108
|
-
// so the model produces ONE voice bubble and no stray text card. Resolved per
|
|
109
|
-
// the bot's locale so an English-mode bot gets the English instruction.
|
|
110
|
-
function voiceSummaryInstruction(locale) {
|
|
111
|
-
return t('card.voice.summary_instruction', undefined, locale);
|
|
112
|
-
}
|
|
113
|
-
function isLiveWorkerIdleOrLimited(ds) {
|
|
114
|
-
if (!ds.worker || ds.worker.killed)
|
|
115
|
-
return true;
|
|
116
|
-
return ds.lastScreenStatus === 'idle' || ds.lastScreenStatus === 'limited';
|
|
117
|
-
}
|
|
118
|
-
function isLegacySelfHealAction(actionType) {
|
|
119
|
-
return !!actionType && LEGACY_SELF_HEAL_ACTIONS.has(actionType);
|
|
120
|
-
}
|
|
121
|
-
function getSessionByActionValue(activeSessions, rootId, larkAppId, sessionId, actionType) {
|
|
122
|
-
const primary = rootId && larkAppId ? activeSessions.get(sessionKey(rootId, larkAppId)) : undefined;
|
|
123
|
-
if (primary && (!sessionId || primary.session.sessionId === sessionId))
|
|
124
|
-
return primary;
|
|
125
|
-
if (sessionId) {
|
|
126
|
-
for (const ds of activeSessions.values()) {
|
|
127
|
-
if (ds.larkAppId === larkAppId && ds.session.sessionId === sessionId)
|
|
128
|
-
return ds;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
// Legacy visible cards may carry a stale/closed session_id. Only redirect
|
|
132
|
-
// self-healing display actions to the current root session; sensitive actions
|
|
133
|
-
// (close/restart/disconnect/get_write_link/term_action/...) must not operate
|
|
134
|
-
// on a different current session just because an old card shared the root.
|
|
135
|
-
if (primary && isLegacySelfHealAction(actionType))
|
|
136
|
-
return primary;
|
|
137
|
-
return undefined;
|
|
138
|
-
}
|
|
139
|
-
function sessionCliId(ds) {
|
|
140
|
-
return ds.session.cliId ?? getBot(ds.larkAppId).config.cliId;
|
|
141
|
-
}
|
|
142
|
-
/** A session's configured distribution name is frozen with its launch config.
|
|
143
|
-
* Never borrow today's bot runtime for an already-frozen legacy/official
|
|
144
|
-
* session: a hot switch must not relabel old cards or action feedback. */
|
|
145
|
-
function sessionRuntimeDisplayName(ds) {
|
|
146
|
-
return sessionConfiguredRuntimeDisplayName(ds.session, getBot(ds.larkAppId).config.cliRuntime);
|
|
147
|
-
}
|
|
148
|
-
function sessionCliDisplayName(ds) {
|
|
149
|
-
return sessionRuntimeDisplayName(ds) ?? getCliDisplayName(sessionCliId(ds));
|
|
150
|
-
}
|
|
151
|
-
/** Worktree selection always creates or starts a fresh session. Decide whether
|
|
152
|
-
* that next session will use Riff from the live bot pairing after applying the
|
|
153
|
-
* same invalid-pair reconciliation as forkWorker, rather than from the old
|
|
154
|
-
* session stamp or the raw backendType alone. */
|
|
155
|
-
function nextSessionUsesRiffBackend(ds) {
|
|
156
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
157
|
-
const pendingSession = ds.pendingRepo === true;
|
|
158
|
-
return resolvePairedSpawnBackendType(pendingSession ? sessionCliId(ds) : botCfg.cliId, pendingSession ? ds.session.backendType : undefined, botCfg.backendType, config.daemon.backendType) === 'riff';
|
|
159
|
-
}
|
|
160
|
-
function validateCardCliBinding(ds, value) {
|
|
161
|
-
const expected = value?.cli_id;
|
|
162
|
-
if (!expected)
|
|
163
|
-
return true;
|
|
164
|
-
const actual = sessionCliId(ds);
|
|
165
|
-
if (actual === expected)
|
|
166
|
-
return true;
|
|
167
|
-
// Backward-compat migration path: some already-visible Worker(CoCo) cards
|
|
168
|
-
// were rendered with cli_id=claude-code before the binding fix. Let only
|
|
169
|
-
// display self-healing actions through so the handler can PATCH the clicked
|
|
170
|
-
// card into the current session/CLI. Never allow stale mismatched cards to
|
|
171
|
-
// trigger sensitive/session-mutating actions.
|
|
172
|
-
if (expected === 'claude-code' && actual !== 'claude-code' && isLegacySelfHealAction(value?.action)) {
|
|
173
|
-
logger.warn(`[${tag(ds)}] Accepting legacy mismatched CLI card for self-heal: ` +
|
|
174
|
-
`action=${value?.action ?? '?'} expected=${expected} actual=${actual}`);
|
|
175
|
-
return true;
|
|
176
|
-
}
|
|
177
|
-
logger.warn(`[${tag(ds)}] Ignoring card action from mismatched CLI card: ` +
|
|
178
|
-
`action=${value?.action ?? '?'} expected=${expected} actual=${actual}`);
|
|
179
|
-
return false;
|
|
180
|
-
}
|
|
181
|
-
function stringListFromLarkMultiSelect(raw) {
|
|
182
|
-
const tokens = Array.isArray(raw)
|
|
183
|
-
? raw.filter((item) => typeof item === 'string' && item.trim().length > 0)
|
|
184
|
-
: [];
|
|
185
|
-
const seen = new Set();
|
|
186
|
-
const result = [];
|
|
187
|
-
for (const token of tokens) {
|
|
188
|
-
if (seen.has(token))
|
|
189
|
-
continue;
|
|
190
|
-
seen.add(token);
|
|
191
|
-
result.push(token);
|
|
192
|
-
}
|
|
193
|
-
return result;
|
|
194
|
-
}
|
|
195
|
-
function multiWorktreeParentPath(repoPaths, name) {
|
|
196
|
-
const first = repoPaths[0];
|
|
197
|
-
const parentRoot = first ? dirname(first) : process.cwd();
|
|
198
|
-
return join(parentRoot, dirSuffixForBranch(name));
|
|
199
|
-
}
|
|
200
|
-
function worktreeChildNameForRepo(repoPath, projects) {
|
|
201
|
-
return projects?.find(p => p.path === repoPath)?.name ?? pathBasename(repoPath);
|
|
202
|
-
}
|
|
203
|
-
function duplicateMultiWorktreeChildNames(repoPaths, projects) {
|
|
204
|
-
const seen = new Set();
|
|
205
|
-
const dupes = new Set();
|
|
206
|
-
for (const repoPath of repoPaths) {
|
|
207
|
-
const childName = worktreeChildNameForRepo(repoPath, projects);
|
|
208
|
-
if (seen.has(childName))
|
|
209
|
-
dupes.add(childName);
|
|
210
|
-
else
|
|
211
|
-
seen.add(childName);
|
|
212
|
-
}
|
|
213
|
-
return [...dupes];
|
|
214
|
-
}
|
|
215
|
-
function deferRepoCardWithdraw(larkAppId, messageId) {
|
|
216
|
-
if (!larkAppId || !messageId)
|
|
217
|
-
return;
|
|
218
|
-
// Let the card-action promise resolve so the SDK can send its callback ACK
|
|
219
|
-
// before the original card disappears. A microtask is too early here: it may
|
|
220
|
-
// run before the SDK continuation that serializes and writes the ACK frame.
|
|
221
|
-
setImmediate(() => {
|
|
222
|
-
void deleteMessage(larkAppId, messageId)
|
|
223
|
-
.catch(err => logger.debug(`Repo card withdraw (post-callback) failed: ${err}`));
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Commit a resolved working directory onto a repo-select session: pin it, then
|
|
228
|
-
* either fork the pending CLI (first selection) or close + recreate the session
|
|
229
|
-
* (mid-session switch). Shared by the dropdown flow, the worktree flow (which
|
|
230
|
-
* funnels back in with the freshly created worktree path) and the manual
|
|
231
|
-
* directory-entry form. Extracted to module scope so the form-submit branch can
|
|
232
|
-
* reuse the exact same spawn/switch path instead of duplicating it.
|
|
233
|
-
*/
|
|
234
|
-
export async function commitRepoSelection(ctx, dirPath, dirLabel,
|
|
235
|
-
// The worktree flow already posted a precise "worktree 已创建:path 分支 …"
|
|
236
|
-
// line before funnelling in here — suppress the redundant "已选择/已切换"
|
|
237
|
-
// confirmation so the user sees a single message, not two.
|
|
238
|
-
// pinWorkingDir=false: "直接开始"/skip keeps the default cwd for this launch
|
|
239
|
-
// without persisting it (esp. $HOME) onto session.workingDir — sibling bots
|
|
240
|
-
// must still get their own repo card instead of inheriting HOME.
|
|
241
|
-
// confirmReplyText: optional confirmation to send under the same claim
|
|
242
|
-
// (used by skip_repo so the post-fork reply window cannot race a second click).
|
|
243
|
-
opts) {
|
|
244
|
-
const { ds, rootId, cardMessageId, larkAppId, operatorOpenId, activeSessions, sessionReply } = ctx;
|
|
245
|
-
const locTarget = localeForBot(ds.larkAppId);
|
|
246
|
-
// `/close` deletes the active-map entry without touching sessionId or
|
|
247
|
-
// pendingRepo — identity against the map is the only tell that the session
|
|
248
|
-
// this flow captured is gone. Checked alongside the generation snapshots.
|
|
249
|
-
const repoSessionKey = larkAppId ? sessionKey(rootId, larkAppId) : rootId;
|
|
250
|
-
const sessionStillActive = () => activeSessions.get(repoSessionKey) === ds;
|
|
251
|
-
const commitGenSessionId = ds.session.sessionId;
|
|
252
|
-
const pinWorkingDir = opts?.pinWorkingDir !== false;
|
|
253
|
-
if (ds.pendingRepo) {
|
|
254
|
-
// Card select/skip and auto-worktree converge here; the text /repo path
|
|
255
|
-
// mirrors this transaction through the same in-memory claim. Only one may
|
|
256
|
-
// own the pending -> worker transition, including prompt preparation.
|
|
257
|
-
if (ds.pendingRepoCommitInFlight) {
|
|
258
|
-
logger.info(`[${tag(ds)}] Pending repo commit already in flight — ignoring duplicate selection`);
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
ds.pendingRepoCommitInFlight = true;
|
|
262
|
-
let committed = false;
|
|
263
|
-
try {
|
|
264
|
-
// Claim before mutating the selected directory so two different card
|
|
265
|
-
// choices cannot overwrite each other while one prompt is being built.
|
|
266
|
-
// Skip/bare-start may intentionally leave workingDir unpinned so the
|
|
267
|
-
// launch uses the bot default without persisting $HOME for siblings.
|
|
268
|
-
if (pinWorkingDir) {
|
|
269
|
-
ds.workingDir = dirPath;
|
|
270
|
-
ds.session.workingDir = dirPath;
|
|
271
|
-
}
|
|
272
|
-
ds.session.riffRepoDirs = opts?.riffRepoDirs;
|
|
273
|
-
sessionStore.updateSession(ds.session);
|
|
274
|
-
const selfBot = getBot(ds.larkAppId);
|
|
275
|
-
const botCfg = selfBot.config;
|
|
276
|
-
const effectiveCliId = sessionCliId(ds);
|
|
277
|
-
// Keep pendingRepo=true across this await. New topic messages therefore
|
|
278
|
-
// remain buffered on this same session instead of racing a worker-null
|
|
279
|
-
// safety-net fork. Snapshot every pending field only after it settles.
|
|
280
|
-
const needsPromptContext = !ds.pendingRawInput ||
|
|
281
|
-
(ds.pendingPrompt?.trim().length ?? 0) > 0 ||
|
|
282
|
-
(ds.pendingAttachments?.length ?? 0) > 0 ||
|
|
283
|
-
(ds.pendingFollowUps?.length ?? 0) > 0 ||
|
|
284
|
-
ds.pendingChatContext !== undefined;
|
|
285
|
-
const availableBots = needsPromptContext
|
|
286
|
-
? await getAvailableBots(ds.larkAppId, ds.chatId)
|
|
287
|
-
: [];
|
|
288
|
-
if (!sessionStillActive() || ds.session.sessionId !== commitGenSessionId ||
|
|
289
|
-
!ds.pendingRepo || (ds.worker && !ds.worker.killed)) {
|
|
290
|
-
logger.warn(`[${tag(ds)}] Session changed while preparing the pending-CLI prompt (${commitGenSessionId} → ${ds.session.sessionId}, active=${sessionStillActive()}, pending=${!!ds.pendingRepo}, worker=${!!ds.worker}) — aborting this fork`);
|
|
291
|
-
return;
|
|
292
|
-
}
|
|
293
|
-
const pendingPrompt = ds.pendingPrompt ?? '';
|
|
294
|
-
const pendingRawInput = ds.pendingRawInput;
|
|
295
|
-
const hasBufferedInput = pendingPrompt.trim().length > 0 ||
|
|
296
|
-
(ds.pendingAttachments?.length ?? 0) > 0 ||
|
|
297
|
-
(ds.pendingFollowUps?.length ?? 0) > 0 ||
|
|
298
|
-
ds.pendingChatContext !== undefined;
|
|
299
|
-
// Nothing to submit at all (session created by a bare `/repo`, i.e. the
|
|
300
|
-
// message IS the command). Boot the CLI idle instead of burning an empty
|
|
301
|
-
// `<user_message>` opening on it, and mark the session so the user's NEXT
|
|
302
|
-
// real message becomes the new-topic first turn. Mirrors the text
|
|
303
|
-
// `/repo` path in command-handler's forkPendingCli.
|
|
304
|
-
const emptyStart = !pendingRawInput && !hasBufferedInput;
|
|
305
|
-
if (!pendingRawInput || hasBufferedInput)
|
|
306
|
-
ensureSessionWhiteboard(ds);
|
|
307
|
-
const wrappedInput = hasBufferedInput
|
|
308
|
-
? buildNewTopicCliInput(pendingPrompt, ds.session.sessionId, effectiveCliId, botCfg.cliPathOverride, ds.pendingAttachments, ds.pendingMentions, availableBots, ds.pendingFollowUps, { name: selfBot.botName, openId: selfBot.botOpenId }, locTarget, ds.pendingSender, {
|
|
309
|
-
larkAppId: ds.larkAppId,
|
|
310
|
-
chatId: ds.chatId,
|
|
311
|
-
whiteboardId: ds.session.whiteboardId,
|
|
312
|
-
substituteTrigger: ds.pendingSubstituteTrigger,
|
|
313
|
-
codexAppText: ds.pendingCodexAppText,
|
|
314
|
-
codexAppApplicationContext: ds.pendingCodexAppApplicationContext,
|
|
315
|
-
codexAppMessageContext: ds.pendingCodexAppMessageContext,
|
|
316
|
-
codexAppFollowUps: ds.pendingCodexAppFollowUps,
|
|
317
|
-
codexAppFollowUpContexts: ds.pendingCodexAppFollowUpContexts,
|
|
318
|
-
chatContext: ds.pendingChatContext,
|
|
319
|
-
})
|
|
320
|
-
: { content: '' };
|
|
321
|
-
const prompt = pendingRawInput ? '' : wrappedInput;
|
|
322
|
-
const pendingTurnId = ds.pendingTurnId;
|
|
323
|
-
const previousPendingFollowUpInput = ds.pendingFollowUpInput;
|
|
324
|
-
if (pendingRawInput && hasBufferedInput) {
|
|
325
|
-
ds.pendingFollowUpInput = {
|
|
326
|
-
userPrompt: ds.pendingCodexAppText !== undefined || ds.pendingCodexAppFollowUps
|
|
327
|
-
? [ds.pendingCodexAppText ?? '', ...(ds.pendingCodexAppFollowUps ?? [])].filter(Boolean).join('\n\n')
|
|
328
|
-
: pendingPrompt || ds.pendingFollowUps?.join('\n\n') || '',
|
|
329
|
-
cliInput: wrappedInput.content,
|
|
330
|
-
...(ds.pendingFollowUpTurnId ? { turnId: ds.pendingFollowUpTurnId } : {}),
|
|
331
|
-
...(effectiveCliId === 'codex-app' && botCfg.codexAppCleanInput === true && wrappedInput.codexAppInput
|
|
332
|
-
? { codexAppInput: wrappedInput.codexAppInput }
|
|
333
|
-
: {}),
|
|
334
|
-
codexAppInputGateFrozen: true,
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
// From here through forkWorker there is no await: publish the state
|
|
338
|
-
// transition atomically from the router's point of view.
|
|
339
|
-
ds.pendingRepo = false;
|
|
340
|
-
publishAttentionPatch(ds);
|
|
341
|
-
try {
|
|
342
|
-
if (pendingRawInput) {
|
|
343
|
-
// pendingRawTurnId is applied at the literal PTY write boundary.
|
|
344
|
-
forkWorker(ds, '', false);
|
|
345
|
-
}
|
|
346
|
-
else if (pendingTurnId && hasBufferedInput) {
|
|
347
|
-
forkWorker(ds, prompt, { turnId: pendingTurnId });
|
|
348
|
-
}
|
|
349
|
-
else if (hasBufferedInput) {
|
|
350
|
-
forkWorker(ds, prompt);
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
// Empty start — idle boot, no turn submitted.
|
|
354
|
-
forkWorker(ds, '', false);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
catch (e) {
|
|
358
|
-
ds.pendingRepo = true;
|
|
359
|
-
ds.pendingFollowUpInput = previousPendingFollowUpInput;
|
|
360
|
-
publishAttentionPatch(ds);
|
|
361
|
-
throw e;
|
|
362
|
-
}
|
|
363
|
-
if (pendingRawInput || hasBufferedInput) {
|
|
364
|
-
rememberLastCliInput(ds, pendingRawInput ?? pendingPrompt, pendingRawInput ?? wrappedInput);
|
|
365
|
-
}
|
|
366
|
-
// Durable, one-shot: the CLI is up but has never received a real user turn.
|
|
367
|
-
// Set after the fork so a throwing fork leaves the session untouched.
|
|
368
|
-
if (emptyStart)
|
|
369
|
-
markInitialUserTurnPending(ds);
|
|
370
|
-
ds.pendingPrompt = undefined;
|
|
371
|
-
ds.pendingCodexAppText = undefined;
|
|
372
|
-
ds.pendingCodexAppApplicationContext = undefined;
|
|
373
|
-
ds.pendingCodexAppMessageContext = undefined;
|
|
374
|
-
ds.pendingChatContext = undefined;
|
|
375
|
-
ds.pendingAttachments = undefined;
|
|
376
|
-
ds.pendingMentions = undefined;
|
|
377
|
-
ds.pendingSubstituteTrigger = undefined;
|
|
378
|
-
ds.pendingSender = undefined;
|
|
379
|
-
ds.pendingFollowUps = undefined;
|
|
380
|
-
ds.pendingCodexAppFollowUps = undefined;
|
|
381
|
-
ds.pendingCodexAppFollowUpContexts = undefined;
|
|
382
|
-
ds.pendingFollowUpTurnId = undefined;
|
|
383
|
-
ds.pendingTurnId = undefined;
|
|
384
|
-
committed = true;
|
|
385
|
-
// Local one-shot consume BEFORE any network await. Feishu withdraw is
|
|
386
|
-
// best-effort and may lag/fail; correctness for stale card clicks depends
|
|
387
|
-
// on this mark so a second callback cannot mid-session-switch after claim
|
|
388
|
-
// release (and so a sessionReply throw that jumps to finally still leaves
|
|
389
|
-
// the card locally invalid).
|
|
390
|
-
const cardToWithdraw = cardMessageId ?? ds.repoCardMessageId;
|
|
391
|
-
markRepoCardConsumed(ds, cardToWithdraw);
|
|
392
|
-
ds.repoCardMessageId = undefined;
|
|
393
|
-
// Hold the claim through confirmation. Card withdrawal is deferred until
|
|
394
|
-
// after the callback can ACK; stale clicks are blocked by the local
|
|
395
|
-
// consume mark above rather than by the network request's lifetime.
|
|
396
|
-
try {
|
|
397
|
-
if (!opts?.suppressConfirmReply) {
|
|
398
|
-
// A card click has no turn of its own — anchor the confirmation to the
|
|
399
|
-
// session's current reply-target turn so a shared fold-back topic keeps
|
|
400
|
-
// it in-thread (same leak as the /repo command path).
|
|
401
|
-
await sessionReply(rootId, t('cmd.repo.selected_in_pending', { name: dirLabel }, locTarget), undefined, fallbackTurnId(ds, undefined));
|
|
402
|
-
}
|
|
403
|
-
else if (opts.confirmReplyText) {
|
|
404
|
-
await sessionReply(rootId, opts.confirmReplyText, undefined, fallbackTurnId(ds, undefined));
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
catch (e) {
|
|
408
|
-
logger.warn(`[${tag(ds)}] Confirm reply after pending repo commit failed: ${e instanceof Error ? e.message : e}`);
|
|
409
|
-
}
|
|
410
|
-
deferRepoCardWithdraw(larkAppId, cardToWithdraw);
|
|
411
|
-
}
|
|
412
|
-
finally {
|
|
413
|
-
ds.pendingRepoCommitInFlight = false;
|
|
414
|
-
}
|
|
415
|
-
if (!committed)
|
|
416
|
-
return;
|
|
417
|
-
logger.info(`[${tag(ds)}] Repo selected: ${dirPath}, spawning CLI`);
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
else {
|
|
421
|
-
// Mid-session repo switch — close old session, start fresh.
|
|
422
|
-
// ZMX close is identity/generation verified and may refuse. Prove teardown
|
|
423
|
-
// before claiming the card or mutating any old-session state; on refusal
|
|
424
|
-
// the current session and card remain fully retryable.
|
|
425
|
-
try {
|
|
426
|
-
teardownAuthoritativePersistentBackingBeforeClose(ds);
|
|
427
|
-
}
|
|
428
|
-
catch (err) {
|
|
429
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
430
|
-
logger.warn(`[${tag(ds)}] Repo switch refused because backing teardown was not proven: ${reason}`);
|
|
431
|
-
try {
|
|
432
|
-
await sessionReply(rootId, t('cmd.repo.switch_close_failed', { error: reason }, locTarget));
|
|
433
|
-
}
|
|
434
|
-
catch (replyErr) {
|
|
435
|
-
logger.warn(`[${tag(ds)}] Repo-switch teardown failure reply failed: ${replyErr instanceof Error ? replyErr.message : replyErr}`);
|
|
436
|
-
}
|
|
437
|
-
return;
|
|
438
|
-
}
|
|
439
|
-
// Claim the current card BEFORE killWorker / any await. A concurrent click
|
|
440
|
-
// on the same Feishu card must not pass a second kill+fork while the first
|
|
441
|
-
// switch is still awaiting confirm replies. Correctness does not depend on
|
|
442
|
-
// deleteMessage succeeding.
|
|
443
|
-
const claimedCard = claimCurrentRepoCard(ds, cardMessageId);
|
|
444
|
-
if (cardMessageId && !claimedCard) {
|
|
445
|
-
// Stale / already-claimed card (entry check races can still reach here).
|
|
446
|
-
logger.info(`[${tag(ds)}] Ignoring stale mid-session repo card ${cardMessageId}`);
|
|
447
|
-
return;
|
|
448
|
-
}
|
|
449
|
-
// Safety net (mirrors the `/repo` text-command path): build the same
|
|
450
|
-
// "session closed" card `/close` emits BEFORE displacing the old session
|
|
451
|
-
// (it reads the live session's identity off `ds`). The new session reuses
|
|
452
|
-
// this anchor, so the old context would otherwise vanish without a trace
|
|
453
|
-
// (relay/adopt/resume all hit `anchor_occupied`). The card keeps it
|
|
454
|
-
// visible and carries the terminal `claude --resume` command.
|
|
455
|
-
//
|
|
456
|
-
// The new cwd is NOT written onto the old session here — it would pollute
|
|
457
|
-
// the displaced session's stored workingDir (and the closed card), so
|
|
458
|
-
// `claude --resume` later would reopen the old context in the new repo's
|
|
459
|
-
// cwd. The new repo is pinned onto the fresh session below instead.
|
|
460
|
-
const oldSession = ds.session;
|
|
461
|
-
const closedCard = buildClosedSessionCard(ds, locTarget);
|
|
462
|
-
killWorker(ds);
|
|
463
|
-
// Park the current card in `frozenCards` so the next POST under the new
|
|
464
|
-
// session sweeps it via recall. closeSession() wipes the on-disk
|
|
465
|
-
// frozen-cards file under the OLD sessionId, but the in-memory Map
|
|
466
|
-
// travels with `ds` into the new session and still carries the
|
|
467
|
-
// old messageId for deletion. If fork or POST fails, the parked card
|
|
468
|
-
// stays in the thread instead of vanishing prematurely.
|
|
469
|
-
parkStreamCard(ds);
|
|
470
|
-
sessionStore.closeSession(ds.session.sessionId);
|
|
471
|
-
publishClosedSessionPatch(ds.session.sessionId, ds.session.closedAt ? Date.parse(ds.session.closedAt) : undefined);
|
|
472
|
-
await deliverEphemeralOrReply(ds, operatorOpenId, closedCard, 'interactive', () => sessionReply(rootId, closedCard, 'interactive'));
|
|
473
|
-
// The close card delivery yields to inbound routing and dashboard IPC. If
|
|
474
|
-
// the user closed/replaced this generation during that await, do not mint a
|
|
475
|
-
// fresh active row from the stale continuation.
|
|
476
|
-
if (!sessionStillActive() || ds.session !== oldSession) {
|
|
477
|
-
logger.warn(`[${tag(ds)}] Repo switch cancelled after old-session close; routing generation changed during card delivery`);
|
|
478
|
-
return;
|
|
479
|
-
}
|
|
480
|
-
// `rootId` is the routing anchor. For chat-scope sessions it is the
|
|
481
|
-
// `oc_...` chat id, not the traceable `om_...` message root stored on
|
|
482
|
-
// Session. Preserve the old identity and explicitly persist scope so card
|
|
483
|
-
// switches cannot recreate the session as a legacy scope-less thread.
|
|
484
|
-
const session = sessionStore.createSession(ds.chatId, ds.scope === 'chat' ? oldSession.rootMessageId : rootId, dirLabel, ds.chatType, ds.scope);
|
|
485
|
-
ds.session = session;
|
|
486
|
-
ds.lastUserPrompt = undefined;
|
|
487
|
-
ds.lastCliInput = undefined;
|
|
488
|
-
// Pin workingDir + larkAppId onto the new session before forkWorker.
|
|
489
|
-
// Without this, a daemon restart restores the session with an empty
|
|
490
|
-
// workingDir and the worker spawns in the bot's default cwd, so
|
|
491
|
-
// `claude --resume` looks in the wrong .claude/projects/<hash>/ dir and
|
|
492
|
-
// exits code 0 immediately, crash-looping until the rate-limiter trips.
|
|
493
|
-
ds.workingDir = dirPath;
|
|
494
|
-
ds.session.workingDir = dirPath;
|
|
495
|
-
ds.session.larkAppId = ds.larkAppId;
|
|
496
|
-
ds.session.chatDisplayName = oldSession.chatDisplayName;
|
|
497
|
-
ds.session.ownerOpenId = oldSession.ownerOpenId;
|
|
498
|
-
ds.session.creatorOpenId = oldSession.creatorOpenId;
|
|
499
|
-
ds.session.lastCallerOpenId = oldSession.lastCallerOpenId;
|
|
500
|
-
// Stamp the newly-created session, not the displaced session that was just
|
|
501
|
-
// closed. Plain/single-repo switches pass undefined and clear stale state.
|
|
502
|
-
ds.session.riffRepoDirs = opts?.riffRepoDirs;
|
|
503
|
-
sessionStore.updateSession(ds.session);
|
|
504
|
-
ds.hasHistory = false;
|
|
505
|
-
// Re-persist the parked card under the NEW sessionId so a daemon crash
|
|
506
|
-
// before the next POST doesn't strand it. closeSession() above wiped
|
|
507
|
-
// the on-disk file under the OLD sessionId; without this re-save, the
|
|
508
|
-
// in-memory Map only survives in process memory.
|
|
509
|
-
if (ds.frozenCards && ds.frozenCards.size > 0) {
|
|
510
|
-
saveFrozenCards(ds.session.sessionId, ds.frozenCards);
|
|
511
|
-
}
|
|
512
|
-
// Drop the old turn's streaming-card reference so worker_ready POSTs a
|
|
513
|
-
// fresh card for the new session instead of PATCHing the previous one.
|
|
514
|
-
ds.streamCardId = undefined;
|
|
515
|
-
ds.streamCardNonce = undefined;
|
|
516
|
-
ds.streamCardPending = undefined;
|
|
517
|
-
ds.lastScreenContent = undefined;
|
|
518
|
-
ds.lastScreenStatus = undefined;
|
|
519
|
-
forkWorker(ds, '', false);
|
|
520
|
-
// Brand-new CLI in a brand-new session record: the next real business
|
|
521
|
-
// message is its new-topic first turn (same invariant as the pending path).
|
|
522
|
-
markInitialUserTurnPending(ds);
|
|
523
|
-
if (!opts?.suppressConfirmReply) {
|
|
524
|
-
try {
|
|
525
|
-
await sessionReply(rootId, t('cmd.repo.switched_to', { name: dirLabel }, locTarget));
|
|
526
|
-
}
|
|
527
|
-
catch (e) {
|
|
528
|
-
logger.warn(`[${tag(ds)}] Confirm reply after mid-session repo switch failed: ${e instanceof Error ? e.message : e}`);
|
|
529
|
-
}
|
|
530
|
-
}
|
|
531
|
-
logger.info(`[${tag(ds)}] Repo switched to ${dirPath}, new session created`);
|
|
532
|
-
// The card was claimed locally above; withdraw it only after this callback
|
|
533
|
-
// can return its ACK so the delete request cannot race the callback frame.
|
|
534
|
-
deferRepoCardWithdraw(larkAppId, claimedCard);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* 仅默认目录 + auto-worktree 的**异步**提交:`ds` 必须已注册进 activeSessions 且处于
|
|
539
|
-
* `pendingRepo` 挂起态(prompt 已 buffer,入站路由不会去抢 fork——见 daemon.ts pendingRepo
|
|
540
|
-
* 分支),本函数在**关键路径之外**(调用方 `void` 掉、立即返回)跑:
|
|
541
|
-
* 1) 在 `baseDir` 建独立 worktree(非 git / 失败 → 回退 baseDir,均经 `notify` 发提示)
|
|
542
|
-
* 2) 用与「选仓库卡」完全相同的 {@link commitRepoSelection} 提交该目录并 fork——复用其
|
|
543
|
-
* prompt 重建(会 fold 进等待期间 buffer 的后续消息)、代际守卫、僵尸防护。
|
|
544
|
-
*
|
|
545
|
-
* 这样避免了把 git fetch(可长达 30s)同步塞进 spawn/fork 链路的三宗罪:放大重复 spawn
|
|
546
|
-
* 竞态、worker=null 期间被路由在**基目录**抢 fork、阻塞 dashboard/webhook 响应。
|
|
547
|
-
*
|
|
548
|
-
* 永不抛出:worktree 失败已在内部回退;commitRepoSelection 异常被兜底 log(会话仍留在
|
|
549
|
-
* pendingRepo,用户可 /repo 自救),绝不让 unhandled rejection 掀掉 daemon。
|
|
550
|
-
*/
|
|
551
|
-
export async function runAutoWorktreeCommit(deps) {
|
|
552
|
-
const { ds, anchor, larkAppId, baseDir, title, prompt, operatorOpenId, activeSessions, notify } = deps;
|
|
553
|
-
ds.worktreeCreating = true;
|
|
554
|
-
// Surface the pending row NOW (all three callers funnel through here, so this is
|
|
555
|
-
// the single place that guarantees the session is visible on SSE-only dashboards
|
|
556
|
-
// during the up-to-30s build) — commitRepoSelection's forkWorker is what would
|
|
557
|
-
// otherwise emit session.spawned, far too late.
|
|
558
|
-
announcePendingRepoSession(ds);
|
|
559
|
-
try {
|
|
560
|
-
const { maybeCreateDefaultWorktree } = await import('../../services/default-worktree.js');
|
|
561
|
-
const wt = await maybeCreateDefaultWorktree(larkAppId, baseDir, {
|
|
562
|
-
isBotDefaultDir: true, title, prompt, locale: localeForBot(larkAppId), notify,
|
|
563
|
-
});
|
|
564
|
-
// The pendingRepo placeholder can legitimately be consumed WHILE this
|
|
565
|
-
// up-to-30s build runs — e.g. the Codex-notifier「继续处理」callback adopts
|
|
566
|
-
// the same DM session and clears pendingRepo before we get here. If we now
|
|
567
|
-
// funneled into commitRepoSelection, its mid-session branch would kill the
|
|
568
|
-
// freshly-adopted worker and replace it with a botmux-owned worktree
|
|
569
|
-
// session. Bail on the late result instead: the takeover already owns the
|
|
570
|
-
// session. (commitRepoSelection also re-checks pendingRepo under its claim,
|
|
571
|
-
// but that check runs after an await — fence here before any mutation.)
|
|
572
|
-
if (!ds.pendingRepo) {
|
|
573
|
-
logger.info(`[${tag(ds)}] auto-worktree completion ignored — pendingRepo already consumed (session taken over)`);
|
|
574
|
-
return;
|
|
575
|
-
}
|
|
576
|
-
// Commit even on fallback (wt.dir === baseDir) — the session must still start.
|
|
577
|
-
// commitRepoSelection has its own /close + generation guards and, for a
|
|
578
|
-
// pendingRepo session, folds any messages buffered during creation (pendingPrompt
|
|
579
|
-
// + pendingFollowUps) into the first turn. suppressConfirmReply: the worktree
|
|
580
|
-
// helper already posted the '已创建/回退' line, so skip the '已选择' confirmation.
|
|
581
|
-
await commitRepoSelection({
|
|
582
|
-
ds, rootId: anchor, larkAppId, operatorOpenId, activeSessions,
|
|
583
|
-
// Never reached under suppressConfirmReply for a pendingRepo session.
|
|
584
|
-
sessionReply: async () => '',
|
|
585
|
-
}, wt.dir, pathBasename(wt.dir), { suppressConfirmReply: true });
|
|
586
|
-
}
|
|
587
|
-
catch (e) {
|
|
588
|
-
// No recovery fork here: forking with an empty prompt would DROP the buffered
|
|
589
|
-
// first turn (pendingPrompt lives only in-memory, not the message queue). Leave
|
|
590
|
-
// the session as commitRepoSelection left it — the inbound router's worker=null
|
|
591
|
-
// branch re-forks (with the pinned dir) on the user's next message, and a still-
|
|
592
|
-
// pending session keeps buffering. Loud log so the rare mid-commit throw is seen.
|
|
593
|
-
logger.error(`[${tag(ds)}] auto-worktree commit failed (session recoverable on next message): ${e instanceof Error ? e.message : e}`);
|
|
594
|
-
}
|
|
595
|
-
finally {
|
|
596
|
-
ds.worktreeCreating = false;
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
// ─── Main handler ─────────────────────────────────────────────────────────
|
|
600
|
-
/**
|
|
601
|
-
* Drive a host-overload降压 sweep across daemons.
|
|
602
|
-
*
|
|
603
|
-
* Both modes fan out to EVERY online daemon and sum the affected counts. Each
|
|
604
|
-
* daemon owns one bot-scoped session store and its own live workers, so neither
|
|
605
|
-
* stopped sessions nor idle workers can be swept through a sibling daemon.
|
|
606
|
-
*
|
|
607
|
-
* Fail-closed on partial failure: if ANY discovered daemon doesn't ACK, throw —
|
|
608
|
-
* the caller then rolls back the nonce (releaseOverloadNonce) so the owner can
|
|
609
|
-
* retry, instead of burning the button on a card that reports「已清理 0」while
|
|
610
|
-
* the daemon that actually held the zombies never ran. Both sweeps are
|
|
611
|
-
* idempotent (an already-closed session leaves the stopped set; an already-
|
|
612
|
-
* suspended worker leaves the idle set), so a retry only re-hits whatever
|
|
613
|
-
* failed. Reporting a partial count as a completed action would resurrect the
|
|
614
|
-
* exact "显示 0、实际没清" symptom this fix exists to kill — just triggered by
|
|
615
|
-
* "the daemon holding the zombies failed" instead of "the first daemon had none".
|
|
616
|
-
*/
|
|
617
|
-
async function sweepHostOverload(mode) {
|
|
618
|
-
const daemons = listOnlineDaemons();
|
|
619
|
-
if (daemons.length === 0)
|
|
620
|
-
throw new Error(`sweep ${mode}: no online daemon`);
|
|
621
|
-
const postSweep = async (d) => {
|
|
622
|
-
try {
|
|
623
|
-
const res = await fetchDaemonIpc(d.ipcPort, '/api/host-overload/sweep', {
|
|
624
|
-
method: 'POST',
|
|
625
|
-
headers: { 'content-type': 'application/json' },
|
|
626
|
-
body: JSON.stringify({ mode }),
|
|
627
|
-
});
|
|
628
|
-
const body = await res.json().catch(() => ({}));
|
|
629
|
-
if (res.ok && body?.ok && typeof body.affected === 'number')
|
|
630
|
-
return body.affected;
|
|
631
|
-
logger.warn(`[overload-sweep] daemon ${d.larkAppId} returned ${res.status} ${JSON.stringify(body)}`);
|
|
632
|
-
return null;
|
|
633
|
-
}
|
|
634
|
-
catch (err) {
|
|
635
|
-
logger.warn(`[overload-sweep] daemon ${d.larkAppId} unreachable: ${err instanceof Error ? err.message : String(err)}`);
|
|
636
|
-
return null;
|
|
637
|
-
}
|
|
638
|
-
};
|
|
639
|
-
// Fan out to all daemons and sum. Fail the whole action if ANY didn't ACK, so
|
|
640
|
-
// the caller keeps the button retriable rather than reporting a partial sweep
|
|
641
|
-
// as complete.
|
|
642
|
-
const results = await Promise.all(daemons.map(postSweep));
|
|
643
|
-
const failed = results.filter(n => n === null).length;
|
|
644
|
-
if (failed > 0) {
|
|
645
|
-
throw new Error(`sweep ${mode}: ${failed}/${daemons.length} daemon(s) did not ack — retriable`);
|
|
646
|
-
}
|
|
647
|
-
return results.reduce((sum, n) => sum + (n ?? 0), 0);
|
|
648
|
-
}
|
|
649
|
-
/**
|
|
650
|
-
* Machine-wide counts for the overload alert preview. Each daemon reports its
|
|
651
|
-
* bot-scoped stopped sessions and its own live workers, so both fields must be
|
|
652
|
-
* summed. Best-effort: an unreachable daemon just contributes 0.
|
|
653
|
-
*/
|
|
654
|
-
export async function countHostOverload() {
|
|
655
|
-
const daemons = listOnlineDaemons();
|
|
656
|
-
let stopped = 0;
|
|
657
|
-
let idle = 0;
|
|
658
|
-
await Promise.all(daemons.map(async (d) => {
|
|
659
|
-
try {
|
|
660
|
-
const res = await fetchDaemonIpc(d.ipcPort, '/api/host-overload/counts', { method: 'GET' });
|
|
661
|
-
const body = await res.json().catch(() => ({}));
|
|
662
|
-
if (res.ok && body?.ok) {
|
|
663
|
-
if (typeof body.stopped === 'number')
|
|
664
|
-
stopped += body.stopped;
|
|
665
|
-
if (typeof body.idle === 'number')
|
|
666
|
-
idle += body.idle;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
catch { /* unreachable daemon contributes 0 */ }
|
|
670
|
-
}));
|
|
671
|
-
return { stopped, idle };
|
|
672
|
-
}
|
|
673
|
-
export async function handleCardAction(data, deps, larkAppId) {
|
|
674
|
-
const { activeSessions, lastRepoScan } = deps;
|
|
675
|
-
// turnId is forwarded only when the caller actually has a turn anchor
|
|
676
|
-
// (e.g. the pendingRepo confirmation) — most card actions have none.
|
|
677
|
-
const sessionReply = (rid, content, msgType, turnId) => turnId !== undefined
|
|
678
|
-
? deps.sessionReply(rid, content, msgType, larkAppId, turnId)
|
|
679
|
-
: deps.sessionReply(rid, content, msgType, larkAppId);
|
|
680
|
-
const action = data?.action;
|
|
681
|
-
const value = action?.value;
|
|
682
|
-
const cardMessageId = data?.context?.open_message_id ?? data?.open_message_id;
|
|
683
|
-
if (logger.isDebug()) {
|
|
684
|
-
logger.debug(`[card] app=${larkAppId ?? '?'} op=${data?.operator?.open_id ?? '?'} ` +
|
|
685
|
-
`action=${value?.action ?? action?.option ?? '?'} root=${value?.root_id ?? '?'}`);
|
|
686
|
-
}
|
|
687
|
-
// Check ALLOWED_USERS for sensitive actions.
|
|
688
|
-
// Use the receiving bot's allowedUsers — the operator open_id in card actions
|
|
689
|
-
// is scoped to the app that received the callback.
|
|
690
|
-
const operatorOpenId = data?.operator?.open_id;
|
|
691
|
-
// ─── 机器过载告警卡动作(overload_clean_stopped / overload_suspend_idle / noop)──
|
|
692
|
-
// 不绑 session。owner 强闸门 + nonce 一次性核销(每按钮各一次,防重复点/超时重投/旧卡)。
|
|
693
|
-
// 点完不替换成死卡:重建同一张卡,把点过的按钮标 done+数量并 disabled,另一个仍可点。
|
|
694
|
-
if (value?.action === OVERLOAD_ACTION_NOOP) {
|
|
695
|
-
// 已完成的按钮(disabled 兜底)——个别客户端仍会回调,给个 toast 不做任何事。
|
|
696
|
-
return { toast: { type: 'info', content: '该操作已执行过' } };
|
|
697
|
-
}
|
|
698
|
-
if (value?.action && (value.action === OVERLOAD_ACTION_CLEAN_STOPPED || value.action === OVERLOAD_ACTION_SUSPEND_IDLE) && larkAppId) {
|
|
699
|
-
const owner = getOwnerOpenId(larkAppId);
|
|
700
|
-
if (!operatorOpenId || operatorOpenId !== owner) {
|
|
701
|
-
logger.info(`Overload action "${value.action}" blocked for non-owner: ${operatorOpenId}`);
|
|
702
|
-
return { toast: { type: 'error', content: '仅管理员可操作' } };
|
|
703
|
-
}
|
|
704
|
-
// Parse the card state carried on the button. Missing/corrupt → treat as a
|
|
705
|
-
// stale card (daemon restart drops the nonce too).
|
|
706
|
-
let st;
|
|
707
|
-
try {
|
|
708
|
-
st = JSON.parse(value.st ?? '');
|
|
709
|
-
}
|
|
710
|
-
catch {
|
|
711
|
-
return JSON.parse(buildOverloadExpiredCard());
|
|
712
|
-
}
|
|
713
|
-
if (!st?.nonce)
|
|
714
|
-
return JSON.parse(buildOverloadExpiredCard());
|
|
715
|
-
// One-shot per (nonce, action): the OTHER button on the same card stays
|
|
716
|
-
// clickable (different action), but this button can't re-fire.
|
|
717
|
-
if (!claimOverloadNonce(st.nonce, value.action)) {
|
|
718
|
-
return JSON.parse(buildOverloadExpiredCard('这个按钮已点过,或该告警卡已过期。'));
|
|
719
|
-
}
|
|
720
|
-
const mode = value.action === OVERLOAD_ACTION_CLEAN_STOPPED ? 'clean_stopped' : 'suspend_idle';
|
|
721
|
-
let affected;
|
|
722
|
-
try {
|
|
723
|
-
affected = await sweepHostOverload(mode);
|
|
724
|
-
}
|
|
725
|
-
catch (err) {
|
|
726
|
-
logger.warn(`[overload] ${value.action} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
727
|
-
// Only the destructive sweep is guarded here: roll back the claim so a
|
|
728
|
-
// transient sweep failure doesn't permanently burn the button — the owner
|
|
729
|
-
// can click it again to retry. (The post-sweep count refresh below is
|
|
730
|
-
// deliberately outside this try: once the sweep has run, its failure must
|
|
731
|
-
// not re-open the button for a second destructive run.)
|
|
732
|
-
releaseOverloadNonce(st.nonce, value.action);
|
|
733
|
-
return { toast: { type: 'error', content: '执行失败,请稍后重试或用 CLI 手动处理' } };
|
|
734
|
-
}
|
|
735
|
-
if (mode === 'clean_stopped')
|
|
736
|
-
st.cleanedN = affected;
|
|
737
|
-
else
|
|
738
|
-
st.suspendedN = affected;
|
|
739
|
-
// Refresh the machine-wide candidate counts so the still-live button and
|
|
740
|
-
// the header reflect what's left after this sweep. Best-effort: the sweep
|
|
741
|
-
// already succeeded, so a count failure must not roll back the nonce.
|
|
742
|
-
try {
|
|
743
|
-
const counts = await countHostOverload();
|
|
744
|
-
st.stopped = counts.stopped;
|
|
745
|
-
st.idle = counts.idle;
|
|
746
|
-
}
|
|
747
|
-
catch (err) {
|
|
748
|
-
logger.warn(`[overload] post-sweep count refresh failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
749
|
-
}
|
|
750
|
-
logger.info(`[overload] ${value.action} by owner ${operatorOpenId}: affected=${affected}, remaining stopped=${st.stopped} idle=${st.idle}`);
|
|
751
|
-
// Rebuild the SAME card: clicked button → ✓done+disabled, other → still live.
|
|
752
|
-
return JSON.parse(buildOverloadAlertCard(st));
|
|
753
|
-
}
|
|
754
|
-
// ─── 群内授权卡片动作(限制提交 + grant/revoke,talk-only)──────────────────
|
|
755
|
-
// 不绑定 session,必须在 session 解析之前处理。owner 强闸门 + nonce 校验。
|
|
756
|
-
if (value?.action && (value.action === 'grant_chat'
|
|
757
|
-
|| value.action === 'grant_global'
|
|
758
|
-
|| value.action === 'grant_deny'
|
|
759
|
-
|| value.action === 'grant_set_duration'
|
|
760
|
-
|| value.action === 'grant_set_quota') && larkAppId) {
|
|
761
|
-
const loc = localeForBot(larkAppId);
|
|
762
|
-
const owner = getOwnerOpenId(larkAppId);
|
|
763
|
-
// owner 强闸门:必须是当前 app 的 owner 本人(比 canOperate 更严)
|
|
764
|
-
if (!operatorOpenId || operatorOpenId !== owner) {
|
|
765
|
-
logger.info(`Grant action "${value.action}" blocked for non-owner: ${operatorOpenId}`);
|
|
766
|
-
return { toast: { type: 'error', content: t('card.grant.toast_owner_only', undefined, loc) } };
|
|
767
|
-
}
|
|
768
|
-
// 一次 /grant 可带多个目标(多人/多 bot),共用一张卡 + 同一 nonce。
|
|
769
|
-
// 兼容旧卡(重启前发出的单目标卡只带 target_open_id):归一成数组。
|
|
770
|
-
const targets = Array.isArray(value.target_open_ids)
|
|
771
|
-
? value.target_open_ids
|
|
772
|
-
: (value.target_open_id ? [value.target_open_id] : []);
|
|
773
|
-
const grantChatId = value.chat_id;
|
|
774
|
-
const nonce = value.nonce;
|
|
775
|
-
// 全部 target 都得仍 pending 且 nonce 匹配,否则视为整卡失效。
|
|
776
|
-
if (!targets.length || !grantChatId || !nonce || !targets.every(tt => checkNonce(larkAppId, grantChatId, tt, nonce))) {
|
|
777
|
-
return { toast: { type: 'error', content: t('card.grant.toast_expired', undefined, loc) } };
|
|
778
|
-
}
|
|
779
|
-
// 兼容已发出的旧卡:旧卡用下拉 callback 暂存限制,新卡在授权按钮的 form_submit
|
|
780
|
-
// 中一次提交有效期和额度。两条路径都必须走服务端校验,不能信任卡片输入。
|
|
781
|
-
if (value.action === 'grant_set_duration' || value.action === 'grant_set_quota') {
|
|
782
|
-
const selected = action?.option;
|
|
783
|
-
const parsed = value.action === 'grant_set_duration'
|
|
784
|
-
? normalizeGrantDurationOption(selected)
|
|
785
|
-
: normalizeGrantQuotaOption(selected);
|
|
786
|
-
if (parsed === null) {
|
|
787
|
-
return { toast: { type: 'error', content: t('card.grant.toast_bad_limit', undefined, loc) } };
|
|
788
|
-
}
|
|
789
|
-
const updated = updatePendingGrantLimits(larkAppId, grantChatId, targets, nonce, value.action === 'grant_set_duration'
|
|
790
|
-
? { durationMs: parsed ?? null }
|
|
791
|
-
: { quota: parsed ?? null });
|
|
792
|
-
return updated
|
|
793
|
-
? { toast: { type: 'success', content: t('card.grant.toast_limit_staged', undefined, loc) } }
|
|
794
|
-
: { toast: { type: 'error', content: t('card.grant.toast_expired', undefined, loc) } };
|
|
795
|
-
}
|
|
796
|
-
// 拒绝:只把卡更新成「已拒绝」+ 全部目标进 deny 冷却,绝不触碰 grant-store。
|
|
797
|
-
// 返回原始卡 body,由 dispatcher 包成 in-place patch(不再走 updateMessage 双写)。
|
|
798
|
-
if (value.action === 'grant_deny') {
|
|
799
|
-
for (const tt of targets)
|
|
800
|
-
markDenied(larkAppId, grantChatId, tt);
|
|
801
|
-
return JSON.parse(buildGrantResultCard('deny', loc));
|
|
802
|
-
}
|
|
803
|
-
const formValue = action?.form_value;
|
|
804
|
-
if (formValue) {
|
|
805
|
-
const duration = normalizeGrantDurationOption(formValue.grant_duration);
|
|
806
|
-
const quota = normalizeGrantQuotaOption(typeof formValue.grant_quota === 'string' ? formValue.grant_quota.trim() : formValue.grant_quota);
|
|
807
|
-
if (quota === null) {
|
|
808
|
-
return { toast: { type: 'error', content: t('card.grant.toast_bad_quota', undefined, loc) } };
|
|
809
|
-
}
|
|
810
|
-
if (duration === null) {
|
|
811
|
-
return { toast: { type: 'error', content: t('card.grant.toast_bad_limit', undefined, loc) } };
|
|
812
|
-
}
|
|
813
|
-
if (!updatePendingGrantLimits(larkAppId, grantChatId, targets, nonce, {
|
|
814
|
-
durationMs: duration ?? null,
|
|
815
|
-
quota: quota ?? null,
|
|
816
|
-
})) {
|
|
817
|
-
return { toast: { type: 'error', content: t('card.grant.toast_expired', undefined, loc) } };
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
// 授权(talk-only):grant_chat 写本群 chatGrants,grant_global 写全局 globalGrants,
|
|
821
|
-
// 两者都绝不碰 allowedUsers(operate 只由 bots.json 配)。逐个落库,统计成功/失败。
|
|
822
|
-
const kind = value.action === 'grant_global' ? 'global' : 'chat';
|
|
823
|
-
const names = Array.isArray(value.target_names) ? value.target_names : [];
|
|
824
|
-
const idToName = new Map();
|
|
825
|
-
targets.forEach((tt, i) => idToName.set(tt, names[i] ?? ''));
|
|
826
|
-
// 限制挂在 pending 上;确认时生成绝对 expiresAt,多目标共享同一组限制。
|
|
827
|
-
const limits = getPendingGrantLimits(larkAppId, grantChatId, targets[0]);
|
|
828
|
-
if (!limits) {
|
|
829
|
-
return { toast: { type: 'error', content: t('card.grant.toast_expired', undefined, loc) } };
|
|
830
|
-
}
|
|
831
|
-
const quota = limits.quota;
|
|
832
|
-
const expiresAt = limits.durationMs === undefined ? undefined : Date.now() + limits.durationMs;
|
|
833
|
-
// 触发本次授权申请的原始消息事件:授权成功后重放,用户无需再 @ 一遍。
|
|
834
|
-
// 自助申请卡每次只对应一个 target,取第一个即可。
|
|
835
|
-
const pendingMessage = getPendingMessage(larkAppId, grantChatId, targets[0]);
|
|
836
|
-
const granted = [];
|
|
837
|
-
const failed = [];
|
|
838
|
-
for (const tt of targets) {
|
|
839
|
-
const res = kind === 'global'
|
|
840
|
-
? await addGlobalGrant(larkAppId, tt, quota, expiresAt)
|
|
841
|
-
: await addChatGrant(larkAppId, grantChatId, tt, quota, expiresAt);
|
|
842
|
-
if (res.ok) {
|
|
843
|
-
clearPending(larkAppId, grantChatId, tt);
|
|
844
|
-
granted.push(tt);
|
|
845
|
-
}
|
|
846
|
-
else {
|
|
847
|
-
failed.push({ openId: tt, reason: res.reason });
|
|
848
|
-
logger.warn(`Grant action "${value.action}" store failed for ${tt}: ${res.reason}`);
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
// 全部失败:保留 pending + 不撤卡(owner 可点原卡重试),toast 报错。
|
|
852
|
-
if (granted.length === 0) {
|
|
853
|
-
return { toast: { type: 'error', content: t('card.grant.toast_failed', { reason: failed[0]?.reason ?? 'unknown' }, loc) } };
|
|
854
|
-
}
|
|
855
|
-
// 部分成功:失败 target 的 pending 必须立刻清掉——卡马上要撤回(owner 无法再点原卡重试),
|
|
856
|
-
// 而 pending 无 TTL,isThrottled 会永久挡住失败 target 后续的自助申请直到 daemon 重启。
|
|
857
|
-
// 清掉后失败 target 可重新走 /grant 或自助申请;失败清单下面在原线程明确告知 owner,
|
|
858
|
-
// 不做「撤卡 + 静默失败 + pending 永久卡住」。
|
|
859
|
-
for (const f of failed)
|
|
860
|
-
clearPending(larkAppId, grantChatId, f.openId);
|
|
861
|
-
// 一次查通讯录判定哪些 grantee 是真人(vs bot),结果同时供下面两处复用:
|
|
862
|
-
// 1. observed 花名册自动登记(只收 bot,剔真人);
|
|
863
|
-
// 2. 通知卡 @ 渲染(只 @ 真人,bot 用纯文本名字 —— 见下方注释)。
|
|
864
|
-
// 缺 contact 读权限/查询瞬时失败 → 一律按 bot 处理(false):登记侧沿用历史「全部登记」回退,
|
|
865
|
-
// 通知侧则把对方当 bot 不 @(宁可少 @ 一次真人,也不误唤醒 bot 拉空会话)。
|
|
866
|
-
const humanFlags = await Promise.all(granted.map(id => isHumanOpenId(larkAppId, id).catch(() => false)));
|
|
867
|
-
// /grant @bot 成功后顺带把「bot」目标登记进 observed 花名册(等价内部跑一次 /introduce),
|
|
868
|
-
// 授权 + 可点名一步到位。写的是 observed-bots-store(让本 daemon 能 @ 回对方),不影响
|
|
869
|
-
// isKnownPeerBot 接收闸(那查的是 cross-ref,两套独立存储),零额外路由权。best-effort。
|
|
870
|
-
// 真人**不**登记:查通讯录确认是真人就剔除,避免污染 <available_bots> 误导模型。
|
|
871
|
-
try {
|
|
872
|
-
const botEntries = granted
|
|
873
|
-
.map((id, i) => ({ id, human: humanFlags[i] }))
|
|
874
|
-
.filter(x => !x.human)
|
|
875
|
-
.map(x => ({ openId: x.id, name: idToName.get(x.id) ?? '' }));
|
|
876
|
-
const skipped = granted.length - botEntries.length;
|
|
877
|
-
if (skipped > 0)
|
|
878
|
-
logger.debug(`grant auto-introduce: skipped ${skipped} confirmed human target(s)`);
|
|
879
|
-
if (botEntries.length > 0) {
|
|
880
|
-
recordObservedBots(config.session.dataDir, larkAppId, grantChatId, botEntries, 'introduce');
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
catch (err) {
|
|
884
|
-
logger.warn(`grant auto-introduce (observed) failed (grant still applied): ${err}`);
|
|
885
|
-
}
|
|
886
|
-
// 通知卡的 grantee 渲染参数:bot 只用纯文本名字(不 <at>,否则唤醒对方 bot 误拉空会话),真人 @ 点名。
|
|
887
|
-
const notifyTargets = granted.map((id, i) => ({ openId: id, name: idToName.get(id) || undefined, isBot: !humanFlags[i] }));
|
|
888
|
-
// 授权成功后:**就地 patch 原卡**为终态(正文直接 @ 被授权人 + 额度/有效期),这一张卡既是
|
|
889
|
-
// 「已授权」结果态、又 ping 到被授权人——无需再单独发通知卡、也无需撤回原卡(申晗 2026-07-31
|
|
890
|
-
// 反馈:直接在原卡更新即可)。同步返回该 body 即完成 in-place patch,避免 deleteMessage 与
|
|
891
|
-
// callback 响应竞态导致客户端 300000。仅「部分失败」仍走后台补一条文字告知。
|
|
892
|
-
const resultCardBody = JSON.parse(buildGrantResultCard(kind, loc, quota, expiresAt, notifyTargets));
|
|
893
|
-
if (cardMessageId && failed.length > 0) {
|
|
894
|
-
let replyInThread = true;
|
|
895
|
-
try {
|
|
896
|
-
const detail = await getMessageDetail(larkAppId, cardMessageId);
|
|
897
|
-
const item = detail?.items?.[0];
|
|
898
|
-
if (!item)
|
|
899
|
-
throw new Error('no message item in getMessageDetail response');
|
|
900
|
-
replyInThread = Boolean(item.thread_id);
|
|
901
|
-
}
|
|
902
|
-
catch (err) {
|
|
903
|
-
logger.debug(`grant partial-failure thread-mode probe failed, defaulting to thread reply: ${err}`);
|
|
904
|
-
}
|
|
905
|
-
// fire-and-forget: 仅在有部分目标失败时补一条文字告知(不阻塞 callback)。
|
|
906
|
-
Promise.resolve()
|
|
907
|
-
.then(async () => {
|
|
908
|
-
const failNames = failed.map(f => idToName.get(f.openId) || f.openId).join('、');
|
|
909
|
-
try {
|
|
910
|
-
await replyMessage(larkAppId, cardMessageId, t('card.grant.partial_failed', { names: failNames }, loc), 'text', replyInThread);
|
|
911
|
-
}
|
|
912
|
-
catch (err) {
|
|
913
|
-
logger.warn(`grant partial-failure notice failed: ${err}`);
|
|
914
|
-
}
|
|
915
|
-
})
|
|
916
|
-
.catch(err => logger.error(`grant post-callback background tasks failed: ${err}`));
|
|
917
|
-
}
|
|
918
|
-
// 授权成功后重放触发本次申请的原始消息,用户无需再 @ 一遍。
|
|
919
|
-
// replayGrantedMessage 内部异步执行(setImmediate),不阻塞 callback 响应。
|
|
920
|
-
if (pendingMessage && deps.replayGrantedMessage) {
|
|
921
|
-
try {
|
|
922
|
-
deps.replayGrantedMessage(pendingMessage, larkAppId);
|
|
923
|
-
}
|
|
924
|
-
catch (err) {
|
|
925
|
-
logger.warn(`replay granted message failed (grant still applied): ${err}`);
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
return resultCardBody;
|
|
929
|
-
}
|
|
930
|
-
if (isAskCardAction(value?.action)) {
|
|
931
|
-
return handleAskCardAction(data);
|
|
932
|
-
}
|
|
933
|
-
if ((value?.action === 'codex_notifier_continue' || value?.action === 'codex_notifier_open_app')
|
|
934
|
-
&& larkAppId) {
|
|
935
|
-
if (!operatorOpenId) {
|
|
936
|
-
logger.info(`${value.action} blocked because operator identity is missing`);
|
|
937
|
-
return { toast: { type: 'error', content: '只有机器人管理员可以操作此 Codex 任务' } };
|
|
938
|
-
}
|
|
939
|
-
if (!deps.codexNotifierCardAction) {
|
|
940
|
-
return { toast: { type: 'error', content: 'Codex 完成通知处理器未启用' } };
|
|
941
|
-
}
|
|
942
|
-
return deps.codexNotifierCardAction(data, larkAppId);
|
|
943
|
-
}
|
|
944
|
-
if (typeof value?.action === 'string' &&
|
|
945
|
-
value.action.startsWith('vc_meeting_') &&
|
|
946
|
-
larkAppId) {
|
|
947
|
-
if (!deps.vcMeetingCardAction) {
|
|
948
|
-
return { toast: { type: 'error', content: '会议监听处理器未启用' } };
|
|
949
|
-
}
|
|
950
|
-
return deps.vcMeetingCardAction(data, larkAppId);
|
|
951
|
-
}
|
|
952
|
-
// Dashboard callbacks dispatch before session lookup. They do not require an
|
|
953
|
-
// active DaemonSession and use dashboard-internal Route B endpoints.
|
|
954
|
-
if (typeof value?.action === 'string' &&
|
|
955
|
-
value.action.startsWith('dash_settings_') &&
|
|
956
|
-
larkAppId) {
|
|
957
|
-
const { handleSettingsCardAction } = await import('./settings-card.js');
|
|
958
|
-
const { createDaemonClientFor } = await import('../../daemon-internal-client-wrapper.js');
|
|
959
|
-
const settingsLocale = localeForBot(larkAppId);
|
|
960
|
-
// Success returns `{ card }` only so Lark replaces the card in the same
|
|
961
|
-
// callback response. Slow fallback is handled by the event dispatcher.
|
|
962
|
-
return handleSettingsCardAction(data, larkAppId, {
|
|
963
|
-
createClient: (appId) => createDaemonClientFor(appId),
|
|
964
|
-
locale: settingsLocale,
|
|
965
|
-
});
|
|
966
|
-
}
|
|
967
|
-
// ─── `/dashboard sessions` callbacks ─────────────────────────────────
|
|
968
|
-
// Same response shape as dash_settings_*: success returns `{ card }` only,
|
|
969
|
-
// no toast, so Lark renders the new list in a single pass.
|
|
970
|
-
if (typeof value?.action === 'string' &&
|
|
971
|
-
value.action.startsWith('dash_sessions_') &&
|
|
972
|
-
larkAppId) {
|
|
973
|
-
const { handleSessionsCardAction } = await import('./sessions-card.js');
|
|
974
|
-
const { createDaemonClientFor } = await import('../../daemon-internal-client-wrapper.js');
|
|
975
|
-
const sessionsLocale = localeForBot(larkAppId);
|
|
976
|
-
return handleSessionsCardAction(data, larkAppId, {
|
|
977
|
-
createClient: (appId) => createDaemonClientFor(appId),
|
|
978
|
-
locale: sessionsLocale,
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
// ─── `/dashboard schedules` callbacks ────────────────────────────────
|
|
982
|
-
if (typeof value?.action === 'string' &&
|
|
983
|
-
value.action.startsWith('dash_schedules_') &&
|
|
984
|
-
larkAppId) {
|
|
985
|
-
const { handleSchedulesCardAction } = await import('./schedules-card.js');
|
|
986
|
-
const { createDaemonClientFor } = await import('../../daemon-internal-client-wrapper.js');
|
|
987
|
-
const schedulesLocale = localeForBot(larkAppId);
|
|
988
|
-
return handleSchedulesCardAction(data, larkAppId, {
|
|
989
|
-
createClient: (appId) => createDaemonClientFor(appId),
|
|
990
|
-
locale: schedulesLocale,
|
|
991
|
-
});
|
|
992
|
-
}
|
|
993
|
-
// ─── `/dashboard groups` callbacks ───────────────────────────────────
|
|
994
|
-
if (typeof value?.action === 'string' &&
|
|
995
|
-
value.action.startsWith('dash_groups_') &&
|
|
996
|
-
larkAppId) {
|
|
997
|
-
const { handleGroupsCardAction } = await import('./groups-card.js');
|
|
998
|
-
const { createDaemonClientFor } = await import('../../daemon-internal-client-wrapper.js');
|
|
999
|
-
const groupsLocale = localeForBot(larkAppId);
|
|
1000
|
-
return handleGroupsCardAction(data, larkAppId, {
|
|
1001
|
-
createClient: (appId) => createDaemonClientFor(appId),
|
|
1002
|
-
locale: groupsLocale,
|
|
1003
|
-
});
|
|
1004
|
-
}
|
|
1005
|
-
// ─── `/issue` Issue Board callbacks ──────────────────────────────────
|
|
1006
|
-
// 权限门(allowedUsers + invoker lock)在 handleIssueCardAction 里,每次回调都重跑。
|
|
1007
|
-
if (typeof value?.action === 'string' &&
|
|
1008
|
-
value.action.startsWith('issue_') &&
|
|
1009
|
-
larkAppId) {
|
|
1010
|
-
const { handleIssueCardAction } = await import('./issue-command.js');
|
|
1011
|
-
const { buildIssueCommandDeps } = await import('./issue-command-deps.js');
|
|
1012
|
-
return handleIssueCardAction(data, larkAppId, buildIssueCommandDeps());
|
|
1013
|
-
}
|
|
1014
|
-
// ─── `/dashboard overview` callbacks ─────────────────────────────────
|
|
1015
|
-
// Goto buttons rebuild the TARGET card by re-fetching the corresponding
|
|
1016
|
-
// dedicated Route B endpoint (sessions-list / schedules-list /
|
|
1017
|
-
// settings-snapshot). No new endpoints, no multi_url cross-card jumps.
|
|
1018
|
-
if (typeof value?.action === 'string' &&
|
|
1019
|
-
value.action.startsWith('dash_overview_') &&
|
|
1020
|
-
larkAppId) {
|
|
1021
|
-
const { handleOverviewCardAction } = await import('./overview-card.js');
|
|
1022
|
-
const { createDaemonClientFor } = await import('../../daemon-internal-client-wrapper.js');
|
|
1023
|
-
const overviewLocale = localeForBot(larkAppId);
|
|
1024
|
-
return handleOverviewCardAction(data, larkAppId, {
|
|
1025
|
-
createClient: (appId) => createDaemonClientFor(appId),
|
|
1026
|
-
locale: overviewLocale,
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
// ─── /relay picker: state-changing actions (select / page / search) ────
|
|
1030
|
-
// These three actions all re-render the picker card with updated state:
|
|
1031
|
-
// • relay_select — user clicked a session card → set as selectedSessionId
|
|
1032
|
-
// • relay_page — user clicked prev/next page → bump page index
|
|
1033
|
-
// • relay_search — user submitted the search form → apply new query (reset page)
|
|
1034
|
-
//
|
|
1035
|
-
// The card is stateless on the Lark side, so each callback value carries
|
|
1036
|
-
// the FULL state (search / page / selected / target_chat_id / root_id);
|
|
1037
|
-
// we just compute the new state from the action and re-render.
|
|
1038
|
-
if (value?.action && larkAppId && ['relay_select', 'relay_page', 'relay_search'].includes(value.action)) {
|
|
1039
|
-
const loc = localeForBot(larkAppId);
|
|
1040
|
-
const targetChatId = value.target_chat_id;
|
|
1041
|
-
const targetRootId = value.root_id;
|
|
1042
|
-
// root_id IS the relay target anchor (chatId for chat-scope, 话题 root for
|
|
1043
|
-
// thread-scope). target_scope tells the confirm/re-render which it is;
|
|
1044
|
-
// target_chat_type (group | p2p) rides along so confirm can flip the
|
|
1045
|
-
// session's chatType for DM targets. Default 'group' covers legacy cards.
|
|
1046
|
-
const targetScope = value.target_scope ?? 'chat';
|
|
1047
|
-
const targetChatType = value.target_chat_type ?? 'group';
|
|
1048
|
-
const cardVisibility = value.visibility ?? 'public';
|
|
1049
|
-
const invokerOpenId = value.invoker_open_id;
|
|
1050
|
-
if (!targetChatId || !targetRootId || !operatorOpenId) {
|
|
1051
|
-
return { toast: { type: 'error', content: t('card.relay.toast_failed', { error: 'missing_value' }, loc) } };
|
|
1052
|
-
}
|
|
1053
|
-
// Picker is owner-only: only the user who summoned it may flip pages,
|
|
1054
|
-
// search, or select. Otherwise A's invocation in a shared chat could be
|
|
1055
|
-
// silently swapped to C's session list when C clicks a button. Cards
|
|
1056
|
-
// built before this guard was deployed lack invoker_open_id — we let
|
|
1057
|
-
// them through (legacy) rather than break in-flight pickers; new cards
|
|
1058
|
-
// are protected from the moment they're rendered.
|
|
1059
|
-
if (invokerOpenId && invokerOpenId !== operatorOpenId) {
|
|
1060
|
-
return { toast: { type: 'error', content: t('card.relay.toast_not_invoker', undefined, loc) } };
|
|
1061
|
-
}
|
|
1062
|
-
// Reconstruct the next state from the action.
|
|
1063
|
-
const carriedSearch = value.search ?? '';
|
|
1064
|
-
const carriedPage = Number(value.page ?? 0) || 0;
|
|
1065
|
-
const carriedSelected = value.selected ?? '';
|
|
1066
|
-
let nextSearch = carriedSearch;
|
|
1067
|
-
let nextPage = carriedPage;
|
|
1068
|
-
let nextSelected = carriedSelected || undefined;
|
|
1069
|
-
if (value.action === 'relay_search') {
|
|
1070
|
-
// v2 input fires `behaviors[].callback` directly — the typed text
|
|
1071
|
-
// arrives as action.input_value (NOT form_value), since we're no
|
|
1072
|
-
// longer wrapping the input in a form. Reset page on new search.
|
|
1073
|
-
nextSearch = String(action?.input_value ?? '').trim();
|
|
1074
|
-
nextPage = 0;
|
|
1075
|
-
// Don't carry over the selection on a new search — the selected entry
|
|
1076
|
-
// may not match the new filter, and even if it does, "I just searched
|
|
1077
|
-
// for something else" implies the user is changing what they want.
|
|
1078
|
-
nextSelected = undefined;
|
|
1079
|
-
}
|
|
1080
|
-
else if (value.action === 'relay_page') {
|
|
1081
|
-
nextPage = Number(value.page ?? 0) || 0;
|
|
1082
|
-
}
|
|
1083
|
-
else if (value.action === 'relay_select') {
|
|
1084
|
-
nextSelected = value.session_id;
|
|
1085
|
-
}
|
|
1086
|
-
// Exclude by the target ANCHOR (root_id), not chatId — keeps 同群 other-
|
|
1087
|
-
// topic sessions in the candidate list on re-render, matching初次渲染.
|
|
1088
|
-
const { collectRelayPickerEntries } = await import('../../services/relay-picker.js');
|
|
1089
|
-
const entries = await collectRelayPickerEntries(activeSessions, larkAppId, targetRootId, operatorOpenId);
|
|
1090
|
-
const { buildRelayPickerCard } = await import('./card-builder.js');
|
|
1091
|
-
const cardJson = buildRelayPickerCard(entries, targetChatId, targetRootId,
|
|
1092
|
-
// Preserve the original invoker so the re-rendered card stays bound
|
|
1093
|
-
// to them. Fall back to operatorOpenId for legacy cards rendered
|
|
1094
|
-
// before invoker_open_id was added (shouldn't normally happen since
|
|
1095
|
-
// the check above already lets legacy through, but a render needs a
|
|
1096
|
-
// string regardless).
|
|
1097
|
-
invokerOpenId ?? operatorOpenId, loc, {
|
|
1098
|
-
selectedSessionId: nextSelected,
|
|
1099
|
-
searchQuery: nextSearch,
|
|
1100
|
-
page: nextPage,
|
|
1101
|
-
}, targetScope, targetChatType, cardVisibility);
|
|
1102
|
-
// ── Private (ephemeral) picker: delete-then-resend ────────────────────
|
|
1103
|
-
// Ephemeral cards CANNOT be PATCH-updated (Feishu legacy interface), so we
|
|
1104
|
-
// can't return a body for the dispatcher to patch in place. Instead delete
|
|
1105
|
-
// the clicked card and resend a fresh ephemeral one carrying the new state
|
|
1106
|
-
// — the same send→interact→delete→resend pattern Feishu documents for
|
|
1107
|
-
// ephemeral flows. Resend FIRST, then delete the old one, so a resend
|
|
1108
|
-
// failure doesn't leave the user with no card at all. The toast keeps the
|
|
1109
|
-
// callback response non-empty (returning {} would make Lark show nothing).
|
|
1110
|
-
if (cardVisibility === 'private') {
|
|
1111
|
-
const { sendEphemeralCard, deleteEphemeralCard } = await import('./client.js');
|
|
1112
|
-
try {
|
|
1113
|
-
await sendEphemeralCard(larkAppId, targetChatId, invokerOpenId ?? operatorOpenId, cardJson);
|
|
1114
|
-
if (cardMessageId) {
|
|
1115
|
-
await deleteEphemeralCard(larkAppId, cardMessageId).catch(() => { });
|
|
1116
|
-
}
|
|
1117
|
-
// No card body returned — the replacement is already sent. An empty
|
|
1118
|
-
// response is fine here (the new ephemeral card is the user-visible
|
|
1119
|
-
// result); a toast would double up with the freshly-rendered card.
|
|
1120
|
-
return;
|
|
1121
|
-
}
|
|
1122
|
-
catch (err) {
|
|
1123
|
-
logger.warn(`[card-action] relay private picker re-render failed (${err instanceof Error ? err.message : err}); leaving old card in place`);
|
|
1124
|
-
return { toast: { type: 'error', content: t('card.relay.toast_failed', { error: 'ephemeral_refresh_failed' }, loc) } };
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
// Return an updated card body — event-dispatcher wraps this as
|
|
1128
|
-
// { card: { type: 'raw', data: <body> } } so Lark patches the picker
|
|
1129
|
-
// in place rather than appending a new message.
|
|
1130
|
-
return JSON.parse(cardJson);
|
|
1131
|
-
}
|
|
1132
|
-
// ─── /botconfig 交互卡片:切换布尔开关 / 选择 cli·model·lang / 消息额度,就地刷新 ──
|
|
1133
|
-
const CONFIG_CARD_ACTIONS = ['config_toggle', 'config_set', 'config_quota', 'config_text_open', 'config_text_save'];
|
|
1134
|
-
if (value?.action && larkAppId && CONFIG_CARD_ACTIONS.includes(value.action)) {
|
|
1135
|
-
// 卡片携带的渲染语言(`/botconfig en` 的覆盖)优先;缺省回落 bot 默认。
|
|
1136
|
-
const vLoc = value?.loc;
|
|
1137
|
-
const loc = isLocale(vLoc) ? vLoc : localeForBot(larkAppId);
|
|
1138
|
-
let cbot;
|
|
1139
|
-
try {
|
|
1140
|
-
cbot = getBot(larkAppId);
|
|
1141
|
-
}
|
|
1142
|
-
catch {
|
|
1143
|
-
return { toast: { type: 'error', content: t('cmd.config.no_bot', undefined, loc) } };
|
|
1144
|
-
}
|
|
1145
|
-
// 严格 owner/allowlist 闸(与文字版 /botconfig 同口径):拒开放模式 + 非 admin。
|
|
1146
|
-
const admins = cbot.resolvedAllowedUsers;
|
|
1147
|
-
if (admins.length === 0 || !operatorOpenId || !admins.includes(operatorOpenId)) {
|
|
1148
|
-
return { toast: { type: 'error', content: t('cmd.config.not_admin', undefined, loc) } };
|
|
1149
|
-
}
|
|
1150
|
-
// ttadk 网关 bot 用 ttadk 网关模型候选(glm-5.1…),非底层适配器的 opus/gpt-5
|
|
1151
|
-
// (否则被 worker 注入成 `ttadk -m opus` 用错模型启动失败);CoCo 无候选。
|
|
1152
|
-
const modelChoices = (() => {
|
|
1153
|
-
const ttadkChoices = ttadkConfigModelChoices(cbot.config.wrapperCli);
|
|
1154
|
-
if (ttadkChoices !== null)
|
|
1155
|
-
return ttadkChoices;
|
|
1156
|
-
try {
|
|
1157
|
-
return createCliAdapterSync(cbot.config.cliId, cbot.config.cliPathOverride).modelChoices ?? [];
|
|
1158
|
-
}
|
|
1159
|
-
catch {
|
|
1160
|
-
return [];
|
|
1161
|
-
}
|
|
1162
|
-
})();
|
|
1163
|
-
const reRender = () => {
|
|
1164
|
-
const d = getConfigCardData(larkAppId, modelChoices);
|
|
1165
|
-
return d ? { card: { type: 'raw', data: JSON.parse(buildConfigCard(d, loc)) } } : {};
|
|
1166
|
-
};
|
|
1167
|
-
// 「文本设置」子卡:点主卡按钮 → **私信新发**一张含输入框的子卡(v1 form 须新发、
|
|
1168
|
-
// 不能 patch,否则空卡)。子卡每个字段一个 form,保存即写、回 toast、卡片保持
|
|
1169
|
-
// (不回 card → 不 patch,避免 form 重渲染异常)。
|
|
1170
|
-
if (value.action === 'config_text_open') {
|
|
1171
|
-
const d = getConfigCardData(larkAppId, modelChoices);
|
|
1172
|
-
if (!d)
|
|
1173
|
-
return { toast: { type: 'error', content: t('cmd.config.no_bot', undefined, loc) } };
|
|
1174
|
-
try {
|
|
1175
|
-
await sendUserMessage(larkAppId, operatorOpenId, buildConfigTextCard(d, loc), 'interactive');
|
|
1176
|
-
return { toast: { type: 'success', content: t('card.config.text_sent', undefined, loc) } };
|
|
1177
|
-
}
|
|
1178
|
-
catch {
|
|
1179
|
-
return { toast: { type: 'error', content: t('card.config.text_send_fail', undefined, loc) } };
|
|
1180
|
-
}
|
|
1181
|
-
}
|
|
1182
|
-
if (value.action === 'config_text_save') {
|
|
1183
|
-
const fk = value?.field;
|
|
1184
|
-
const fv = action?.form_value ?? {};
|
|
1185
|
-
const raw = String((fk ? fv[fk] : '') ?? '').trim();
|
|
1186
|
-
if (fk === 'teamRole') {
|
|
1187
|
-
// writeTeamRoleFile truncates by UTF-8 byte length (MAX_ROLE_BYTES); do
|
|
1188
|
-
// not pre-slice by JS char count here (would mis-cut CJK).
|
|
1189
|
-
if (raw)
|
|
1190
|
-
writeTeamRoleFile(larkAppId, raw);
|
|
1191
|
-
else
|
|
1192
|
-
deleteTeamRoleFile(larkAppId);
|
|
1193
|
-
logger.info(`[config:${larkAppId}] team role ${raw ? 'set' : 'cleared'} via card`);
|
|
1194
|
-
return { toast: { type: 'success', content: t('card.config.text_saved', undefined, loc) } };
|
|
1195
|
-
}
|
|
1196
|
-
const spec = fk ? findConfigField(fk) : undefined;
|
|
1197
|
-
if (!spec)
|
|
1198
|
-
return { toast: { type: 'error', content: t('cmd.config.unknown_field', { field: fk ?? '?', fields: '' }, loc) } };
|
|
1199
|
-
// 留空 = 清除;非空一律过 coerceConfigValue 按 kind 归一化/校验(stringList
|
|
1200
|
-
// 拆数组、string 执行 maxLen 等 spec 约束),与 /config 文字入口、dashboard
|
|
1201
|
-
// PUT 同一校验点,避免卡片入口绕过。
|
|
1202
|
-
let valueToApply;
|
|
1203
|
-
if (!raw) {
|
|
1204
|
-
valueToApply = null;
|
|
1205
|
-
}
|
|
1206
|
-
else {
|
|
1207
|
-
const coerced = coerceConfigValue(spec, raw);
|
|
1208
|
-
if (!coerced.ok)
|
|
1209
|
-
return { toast: { type: 'error', content: t('cmd.config.write_failed', { reason: coerced.reason }, loc) } };
|
|
1210
|
-
// 文本子卡只承载 string / stringList 字段;narrow 给 applyConfigField。
|
|
1211
|
-
valueToApply = coerced.value;
|
|
1212
|
-
}
|
|
1213
|
-
const r = await applyConfigField(larkAppId, spec, valueToApply);
|
|
1214
|
-
if (!r.ok)
|
|
1215
|
-
return { toast: { type: 'error', content: t('cmd.config.write_failed', { reason: r.reason }, loc) } };
|
|
1216
|
-
logger.info(`[config:${larkAppId}] text field ${spec.key} saved via card`);
|
|
1217
|
-
return { toast: { type: 'success', content: `✓ ${spec.key} = ${r.newText}` } };
|
|
1218
|
-
}
|
|
1219
|
-
// 消息额度(grant-prefs,非 CONFIG_FIELDS 字段):'off' = 关闭,正整数 = 设定。
|
|
1220
|
-
if (value.action === 'config_quota') {
|
|
1221
|
-
const raw = action?.option ?? '';
|
|
1222
|
-
const n = raw === 'off' ? null : Number(raw);
|
|
1223
|
-
const limit = n && Number.isInteger(n) && n > 0 ? n : null;
|
|
1224
|
-
const qr = await updateBotGrantPrefs(larkAppId, { messageQuotaDefaultLimit: limit });
|
|
1225
|
-
if (!qr.ok)
|
|
1226
|
-
return { toast: { type: 'error', content: t('cmd.config.write_failed', { reason: qr.reason }, loc) } };
|
|
1227
|
-
return { toast: { type: 'success', content: `✓ quota = ${limit ?? 'off'}` }, ...reRender() };
|
|
1228
|
-
}
|
|
1229
|
-
const field = value.field;
|
|
1230
|
-
const spec = field ? findConfigField(field) : undefined;
|
|
1231
|
-
if (!spec || spec.kind === 'allowedUsers') {
|
|
1232
|
-
return { toast: { type: 'error', content: t('cmd.config.unknown_field', { field: field ?? '?', fields: '' }, loc) } };
|
|
1233
|
-
}
|
|
1234
|
-
let r;
|
|
1235
|
-
if (value.action === 'config_toggle') {
|
|
1236
|
-
if (spec.kind !== 'boolean')
|
|
1237
|
-
return { toast: { type: 'error', content: t('cmd.config.invalid_bool', { field: spec.key, value: '' }, loc) } };
|
|
1238
|
-
const cur = cbot.config[spec.configKey] === true;
|
|
1239
|
-
r = await applyConfigField(larkAppId, spec, !cur);
|
|
1240
|
-
}
|
|
1241
|
-
else {
|
|
1242
|
-
const raw = action?.option ?? action?.input_value ?? '';
|
|
1243
|
-
if (raw === CONFIG_UNSET) {
|
|
1244
|
-
if (!spec.clearable)
|
|
1245
|
-
return { toast: { type: 'error', content: t('cmd.config.not_clearable', { field: spec.key }, loc) }, ...reRender() };
|
|
1246
|
-
r = await applyConfigField(larkAppId, spec, null);
|
|
1247
|
-
}
|
|
1248
|
-
else {
|
|
1249
|
-
const coerced = coerceConfigValue(spec, raw);
|
|
1250
|
-
if (!coerced.ok)
|
|
1251
|
-
return { toast: { type: 'error', content: t('cmd.config.write_failed', { reason: coerced.reason }, loc) }, ...reRender() };
|
|
1252
|
-
r = await applyConfigField(larkAppId, spec, coerced.value);
|
|
1253
|
-
}
|
|
1254
|
-
}
|
|
1255
|
-
if (!r.ok)
|
|
1256
|
-
return { toast: { type: 'error', content: t('cmd.config.write_failed', { reason: r.reason }, loc) } };
|
|
1257
|
-
return { toast: { type: 'success', content: `✓ ${spec.key} = ${r.newText}` }, ...reRender() };
|
|
1258
|
-
}
|
|
1259
|
-
// ─── /relay picker: confirm transfer (stage 2 → done) ──────────────────
|
|
1260
|
-
// The confirm button on the picker card fires this. Same logic as the
|
|
1261
|
-
// original (pre-two-stage) relay_pickup action: owner-check, pre-flight
|
|
1262
|
-
// conflict check, send M1, transferSession, delete picker card.
|
|
1263
|
-
if (value?.action === 'relay_confirm' && larkAppId) {
|
|
1264
|
-
const loc = localeForBot(larkAppId);
|
|
1265
|
-
const sourceSessionId = value.session_id;
|
|
1266
|
-
const targetChatId = value.target_chat_id;
|
|
1267
|
-
const targetRootId = value.root_id;
|
|
1268
|
-
// root_id IS the target anchor for thread-scope (the 话题 root); for chat-
|
|
1269
|
-
// scope the anchor is chatId and root_id is unused for routing.
|
|
1270
|
-
// target_chat_type tells transferSession whether the destination is a DM
|
|
1271
|
-
// (p2p) so the session's chatType flips with it; legacy cards lack the
|
|
1272
|
-
// field and default to 'group' (their pickers never offered DM targets).
|
|
1273
|
-
const targetScope = value.target_scope ?? 'chat';
|
|
1274
|
-
const targetChatType = value.target_chat_type ?? 'group';
|
|
1275
|
-
const cardVisibility = value.visibility ?? 'public';
|
|
1276
|
-
const targetAnchor = targetScope === 'chat' ? targetChatId : targetRootId;
|
|
1277
|
-
const invokerOpenId = value.invoker_open_id;
|
|
1278
|
-
if (!sourceSessionId || !targetChatId || !targetRootId) {
|
|
1279
|
-
return { toast: { type: 'error', content: t('card.relay.toast_failed', { error: 'missing_value' }, loc) } };
|
|
1280
|
-
}
|
|
1281
|
-
// Invoker-only confirm: redundant with the ownerOpenId check below in
|
|
1282
|
-
// normal flow (invoker = session owner = picker invoker), but defends
|
|
1283
|
-
// against the edge case where the source session changed owners after
|
|
1284
|
-
// the picker was rendered, OR where the picker was shared/forwarded.
|
|
1285
|
-
// Legacy cards (no invoker_open_id) fall through to ownerOpenId only.
|
|
1286
|
-
if (invokerOpenId && operatorOpenId && invokerOpenId !== operatorOpenId) {
|
|
1287
|
-
return { toast: { type: 'error', content: t('card.relay.toast_not_invoker', undefined, loc) } };
|
|
1288
|
-
}
|
|
1289
|
-
// Locate the source session in the in-process registry. Since picker only
|
|
1290
|
-
// lists sessions of THIS bot in OTHER chats, the source must live in our
|
|
1291
|
-
// activeSessions — if it's gone, treat as not found rather than reaching
|
|
1292
|
-
// across daemons (cross-daemon pull is out of v1 scope).
|
|
1293
|
-
let sourceDs;
|
|
1294
|
-
for (const cand of activeSessions.values()) {
|
|
1295
|
-
if (cand.larkAppId === larkAppId && cand.session.sessionId === sourceSessionId) {
|
|
1296
|
-
sourceDs = cand;
|
|
1297
|
-
break;
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
if (!sourceDs) {
|
|
1301
|
-
return { toast: { type: 'error', content: t('card.relay.toast_not_found', undefined, loc) } };
|
|
1302
|
-
}
|
|
1303
|
-
if (sourceDs.session.ownerOpenId && sourceDs.session.ownerOpenId !== operatorOpenId) {
|
|
1304
|
-
return { toast: { type: 'error', content: t('card.relay.toast_not_owner', undefined, loc) } };
|
|
1305
|
-
}
|
|
1306
|
-
// Anchor-based self-relay guard: a thread-scope source in the SAME chat
|
|
1307
|
-
// (different 话题) is a legitimate cross-topic move, so refuse only when the
|
|
1308
|
-
// source and target anchors are identical.
|
|
1309
|
-
if (sessionAnchorId(sourceDs) === targetAnchor) {
|
|
1310
|
-
return { toast: { type: 'error', content: t('card.relay.toast_same_chat', undefined, loc) } };
|
|
1311
|
-
}
|
|
1312
|
-
// Real-session preflight — done BEFORE M1 send so a refusal doesn't
|
|
1313
|
-
// leave a misleading "已接力" announcement in the target chat.
|
|
1314
|
-
// collectRelayPickerEntries already filters scratches at render time,
|
|
1315
|
-
// but a stale picker (rendered before a scratch was created) could
|
|
1316
|
-
// still produce a confirm click; this is the depth defense.
|
|
1317
|
-
const { isDisposableCommandScratch, isRelayableRealSession } = await import('../../core/worker-pool.js');
|
|
1318
|
-
if (!isRelayableRealSession(sourceDs)) {
|
|
1319
|
-
return { toast: { type: 'error', content: t('card.relay.toast_not_started_yet', undefined, loc) } };
|
|
1320
|
-
}
|
|
1321
|
-
// Pre-flight target-chat conflict check — done BEFORE sendMessage M1 so
|
|
1322
|
-
// a refusal doesn't leave a misleading "已接力" announcement in the
|
|
1323
|
-
// target chat (王皓 caught this in testing). Mirror the same predicate
|
|
1324
|
-
// transferSession uses. Only a narrowly classified daemon-command scratch
|
|
1325
|
-
// may be ignored; worker-less queued/adopt/deferred/real sessions still own
|
|
1326
|
-
// the anchor and must block before a misleading M1 is sent.
|
|
1327
|
-
const targetConflict = [...activeSessions.values()].find(c => c !== sourceDs
|
|
1328
|
-
&& c.larkAppId === larkAppId
|
|
1329
|
-
&& sessionAnchorId(c) === targetAnchor
|
|
1330
|
-
&& !isDisposableCommandScratch(c));
|
|
1331
|
-
if (targetConflict) {
|
|
1332
|
-
const conflictTitle = targetConflict.session.title || targetConflict.session.sessionId.substring(0, 8);
|
|
1333
|
-
// Send as a regular text message in the target chat instead of a
|
|
1334
|
-
// popup toast — per王皓's preference for visible/persistent error
|
|
1335
|
-
// ("不要用弹窗,就用消息形式"). No toast returned so the operator
|
|
1336
|
-
// sees the chat message land where the error actually applies.
|
|
1337
|
-
// Pass raw text — sendMessage wraps text-msgType bodies itself; the
|
|
1338
|
-
// earlier `JSON.stringify({text: ...})` caused double-wrapping and
|
|
1339
|
-
// Lark rendered the JSON literally (王皓 caught this in the M1).
|
|
1340
|
-
const errText = t('cmd.relay.target_has_session_msg', { title: conflictTitle }, loc);
|
|
1341
|
-
sendMessage(larkAppId, targetChatId, errText, 'text').catch(() => undefined);
|
|
1342
|
-
return;
|
|
1343
|
-
}
|
|
1344
|
-
// Resolve a friendly source chat label for the M1 announcement — falls
|
|
1345
|
-
// back to the raw chatId if Lark can't return a name. A p2p source has no
|
|
1346
|
-
// chat name (chat.get often fails or returns empty for DMs) — use the
|
|
1347
|
-
// locale-aware 单聊 label instead of leaking a raw oc_ id into the M1.
|
|
1348
|
-
const { getChatName } = await import('./client.js');
|
|
1349
|
-
const sourceLabel = sourceDs.chatType === 'p2p'
|
|
1350
|
-
? t('card.relay.type_p2p', undefined, loc)
|
|
1351
|
-
: (await getChatName(larkAppId, sourceDs.chatId)) ?? sourceDs.chatId;
|
|
1352
|
-
// Send the M1 announcement.
|
|
1353
|
-
// chat-scope: a plain top-level message; its id becomes the (audit-only)
|
|
1354
|
-
// rootMessageId after the transfer (mirrors /relay --create).
|
|
1355
|
-
// thread-scope: reply_in_thread INTO the target 话题 (anchor) so the
|
|
1356
|
-
// announcement lands in the 话题; the session anchors on the
|
|
1357
|
-
// 话题 root (targetAnchor), NOT the M1 id.
|
|
1358
|
-
let m1MessageId;
|
|
1359
|
-
try {
|
|
1360
|
-
const m1Text = t(targetChatType === 'p2p' ? 'cmd.relay.m1_announce_dm' : 'cmd.relay.m1_announce', { sourceChat: sourceLabel, groupName: targetChatId }, loc);
|
|
1361
|
-
m1MessageId = targetScope === 'thread'
|
|
1362
|
-
? await replyMessage(larkAppId, targetAnchor, m1Text, 'text', /*replyInThread*/ true)
|
|
1363
|
-
: await sendMessage(larkAppId, targetChatId, m1Text, 'text');
|
|
1364
|
-
}
|
|
1365
|
-
catch (err) {
|
|
1366
|
-
return { toast: { type: 'error', content: t('card.relay.toast_failed', { error: err?.message ?? 'send_m1_failed' }, loc) } };
|
|
1367
|
-
}
|
|
1368
|
-
const { transferSession, TRANSFER_DETACH_FENCE_PICKER_MS } = await import('../../core/worker-pool.js');
|
|
1369
|
-
// chat-scope → anchor on the M1 id (audit-only); thread-scope → anchor on
|
|
1370
|
-
// the 话题 root (targetAnchor) so future replies in the 话题 route here.
|
|
1371
|
-
// In-process picker relay has no HTTP abort above it (unlike the cross-daemon
|
|
1372
|
-
// /relay --create peer path), so give the observer-detach fence generous
|
|
1373
|
-
// headroom — a clean-but-slightly-slow worker teardown (~3.5s observed) must
|
|
1374
|
-
// not be misclassified as worker_detach_timeout.
|
|
1375
|
-
const r = targetScope === 'thread'
|
|
1376
|
-
? await transferSession(sourceDs.session.sessionId, targetChatId, targetAnchor, targetChatType, 'thread', { detachTimeoutMs: TRANSFER_DETACH_FENCE_PICKER_MS })
|
|
1377
|
-
: await transferSession(sourceDs.session.sessionId, targetChatId, m1MessageId, targetChatType, 'chat', { detachTimeoutMs: TRANSFER_DETACH_FENCE_PICKER_MS });
|
|
1378
|
-
if (!r.ok) {
|
|
1379
|
-
// Best-effort: orphan M1 cleanup so a failed transfer doesn't leave a
|
|
1380
|
-
// misleading "已接力" message in the target chat (王皓's "明明失败了
|
|
1381
|
-
// 却返回成功了" complaint). Race-condition fallback only — the
|
|
1382
|
-
// pre-flight checks above should catch the common cases first.
|
|
1383
|
-
deleteMessage(larkAppId, m1MessageId).catch(() => { });
|
|
1384
|
-
// Deliver the failure as a VISIBLE message, never a toast. The confirm
|
|
1385
|
-
// handler awaits the detach fence (up to TRANSFER_DETACH_FENCE_PICKER_MS
|
|
1386
|
-
// = 8s), which always exceeds the 2.5s card-ACK window — once the generic
|
|
1387
|
-
// "后台处理中" ACK has gone out, a toast can no longer be surfaced and is
|
|
1388
|
-
// silently dropped (only a `not shown to user` log line remained; this is
|
|
1389
|
-
// exactly the failure 申晗 hit — a false-timeout relay whose error the
|
|
1390
|
-
// user never saw). transferSession never commits the routing rewrite on
|
|
1391
|
-
// ANY !ok path, so the source session is always still intact; the copy
|
|
1392
|
-
// reassures the user it was not lost and points at a concrete retry (the
|
|
1393
|
-
// picker card + its 确认 button survive — we only delete them on success
|
|
1394
|
-
// below). Land the notice where the user is looking, mirroring the M1
|
|
1395
|
-
// delivery target: thread-scope → reply_in_thread into the 话题;
|
|
1396
|
-
// chat-scope → a top-level message in the target chat.
|
|
1397
|
-
const failText = r.error === 'worker_detach_timeout' ? t('card.relay.fail_timeout', undefined, loc)
|
|
1398
|
-
: r.error === 'worker_busy' ? t('card.relay.fail_worker_busy', undefined, loc)
|
|
1399
|
-
: r.error === 'target_chat_has_session' ? t('cmd.relay.target_has_session_msg', { title: '' }, loc)
|
|
1400
|
-
: r.error === 'adopt_not_relayable' ? t('card.relay.toast_adopt_not_relayable', undefined, loc)
|
|
1401
|
-
: r.error === 'not_started_yet' ? t('card.relay.toast_not_started_yet', undefined, loc)
|
|
1402
|
-
: t('card.relay.fail_generic', { error: r.error }, loc);
|
|
1403
|
-
try {
|
|
1404
|
-
if (targetScope === 'thread') {
|
|
1405
|
-
await replyMessage(larkAppId, targetAnchor, failText, 'text', /*replyInThread*/ true);
|
|
1406
|
-
}
|
|
1407
|
-
else {
|
|
1408
|
-
await sendMessage(larkAppId, targetChatId, failText, 'text');
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
catch (e) {
|
|
1412
|
-
logger.warn(`[card-action] relay failure notice send failed (${e instanceof Error ? e.message : e}); relay error was: ${r.error}`);
|
|
1413
|
-
}
|
|
1414
|
-
return;
|
|
1415
|
-
}
|
|
1416
|
-
// Best-effort: remove the picker card now that the selection resolved.
|
|
1417
|
-
// Ephemeral (private) pickers need the ephemeral-delete endpoint —
|
|
1418
|
-
// deleteMessage (im/v1/messages) doesn't apply to ephemeral message ids.
|
|
1419
|
-
if (cardMessageId && larkAppId) {
|
|
1420
|
-
if (cardVisibility === 'private') {
|
|
1421
|
-
const { deleteEphemeralCard } = await import('./client.js');
|
|
1422
|
-
deleteEphemeralCard(larkAppId, cardMessageId).catch(() => { });
|
|
1423
|
-
}
|
|
1424
|
-
else {
|
|
1425
|
-
deleteMessage(larkAppId, cardMessageId).catch(() => { });
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
return { toast: { type: 'success', content: t('card.relay.toast_success', undefined, loc) } };
|
|
1429
|
-
}
|
|
1430
|
-
// v3 humanGate 审批卡(独立 namespace,不混 v0.2 wait path)。**在通用 sensitive
|
|
1431
|
-
// 权限门之前**处理(codex medium):v3 卡 value 没有 root_id/session_id,通用门只能
|
|
1432
|
-
// 用 chatId=undefined 做粗判,可能误拦;v3 自己的 `canResolve(binding, operator)`
|
|
1433
|
-
// 才有 run binding 的 chatId,是权威权限门。
|
|
1434
|
-
if (isV3GateAction(value?.action)) {
|
|
1435
|
-
if (!deps.v3GateDeps)
|
|
1436
|
-
return;
|
|
1437
|
-
return await handleV3GateAction(value, operatorOpenId, deps.v3GateDeps);
|
|
1438
|
-
}
|
|
1439
|
-
if (isV3BlockedAction(value?.action)) {
|
|
1440
|
-
if (!deps.v3BlockedDeps)
|
|
1441
|
-
return;
|
|
1442
|
-
return await handleV3BlockedAction(value, operatorOpenId, deps.v3BlockedDeps, action?.form_value);
|
|
1443
|
-
}
|
|
1444
|
-
if (isV3RevisitGrantAction(value?.action)) {
|
|
1445
|
-
if (!deps.v3RevisitGrantDeps)
|
|
1446
|
-
return;
|
|
1447
|
-
return await handleV3RevisitGrantAction(value, operatorOpenId, deps.v3RevisitGrantDeps);
|
|
1448
|
-
}
|
|
1449
|
-
if (isV3LoopGrantAction(value?.action)) {
|
|
1450
|
-
if (!deps.v3LoopGrantDeps)
|
|
1451
|
-
return;
|
|
1452
|
-
return await handleV3LoopGrantAction(value, operatorOpenId, deps.v3LoopGrantDeps);
|
|
1453
|
-
}
|
|
1454
|
-
if (isV3RunSaveAction(value?.action)) {
|
|
1455
|
-
if (!deps.v3RunSaveDeps)
|
|
1456
|
-
return;
|
|
1457
|
-
return await handleV3RunSaveAction(value, operatorOpenId, larkAppId, deps.v3RunSaveDeps);
|
|
1458
|
-
}
|
|
1459
|
-
if (isV3DistillationAction(value?.action)) {
|
|
1460
|
-
if (!deps.v3DistillationDeps)
|
|
1461
|
-
return;
|
|
1462
|
-
return await handleV3DistillationAction(value, operatorOpenId, larkAppId, cardMessageId, deps.v3DistillationDeps);
|
|
1463
|
-
}
|
|
1464
|
-
const isSensitive = value?.action && ['restart', 'close', 'resume', 'skip_repo', 'repo_manual_submit', 'repo_worktree_submit', 'worktree_toggle_mode', 'retry_last_task', 'get_write_link', 'open_local_terminal', 'open_local_cli', 'toggle_stream', 'toggle_display', 'export_text', 'term_action', 'refresh_screenshot', 'takeover', 'disconnect', 'tui_keys', 'tui_text_input', 'wf_approve', 'wf_reject', 'wf_cancel'].includes(value.action);
|
|
1465
|
-
if (isSensitive) {
|
|
1466
|
-
const rootId = value?.root_id;
|
|
1467
|
-
// activeSessions is keyed by sessionKey(anchor, larkAppId) — `${anchor}::${larkAppId}`
|
|
1468
|
-
// (double colon). Earlier this was hand-spliced with a single colon and
|
|
1469
|
-
// always missed, falling through to the bare-rootId legacy lookup; that
|
|
1470
|
-
// worked for permission gating only because chatId came from elsewhere
|
|
1471
|
-
// most of the time. Use sessionKey() so the bot-scoped lookup actually
|
|
1472
|
-
// hits, and keep the bare-rootId fallback for legacy single-bot cards.
|
|
1473
|
-
const ds = rootId
|
|
1474
|
-
? (larkAppId
|
|
1475
|
-
? getSessionByActionValue(activeSessions, rootId, larkAppId, value?.session_id, value?.action)
|
|
1476
|
-
: activeSessions.get(rootId))
|
|
1477
|
-
: undefined;
|
|
1478
|
-
// Resume targets a closed session — fall back to the persistent store so
|
|
1479
|
-
// we can still pin chatId/larkAppId for the canOperate gate.
|
|
1480
|
-
const closedForCtx = !ds && value?.action === 'resume' && value?.session_id
|
|
1481
|
-
? sessionStore.getSession(value.session_id)
|
|
1482
|
-
: undefined;
|
|
1483
|
-
const effectiveAppId = larkAppId ?? ds?.larkAppId ?? closedForCtx?.larkAppId;
|
|
1484
|
-
const chatId = ds?.chatId ?? closedForCtx?.chatId;
|
|
1485
|
-
// pendingRepo 阶段,会话发起人(含 chat-granted 用户)可以 skip_repo / 手动填目录
|
|
1486
|
-
// 起会话——与 repo 下拉选择同款例外,否则被授权人连自己的首次会话都启动不了。
|
|
1487
|
-
// 注意:worktree_toggle_mode 故意不在此列——它持久写 bot 级 worktreeMultiPicker
|
|
1488
|
-
// (影响该 bot 所有后续会话),属管理动作,必须走 canOperate,不能让 talk-only/
|
|
1489
|
-
// chat-granted 用户借「开自己的 pending 卡」绕过去改 bot 配置。
|
|
1490
|
-
const pendingRepoOwnerException = (value.action === 'skip_repo' || value.action === 'repo_manual_submit' || value.action === 'repo_worktree_submit') && !!ds?.pendingRepo &&
|
|
1491
|
-
!!operatorOpenId && operatorOpenId === ds.session.ownerOpenId;
|
|
1492
|
-
if (effectiveAppId) {
|
|
1493
|
-
if (!pendingRepoOwnerException && !canOperate(effectiveAppId, chatId, operatorOpenId)) {
|
|
1494
|
-
logger.info(`Card action "${value.action}" blocked for non-operator user: ${operatorOpenId} (chat=${chatId})`);
|
|
1495
|
-
// get_write_link 显式破例:其余敏感动作沿用「静默 block(仅日志)」的既有设计
|
|
1496
|
-
// (test/card-handler-repo-select.test.ts 把这点 pin 住了),但「获取操作链接」是
|
|
1497
|
-
// 用户主动点的取权动作,静默会让人以为按钮坏了——给一条明确的「无操作权限」toast。
|
|
1498
|
-
if (value.action === 'get_write_link' || value.action === 'open_local_terminal' || value.action === 'open_local_cli') {
|
|
1499
|
-
const key = value.action === 'open_local_terminal'
|
|
1500
|
-
? 'card.action.local_terminal_no_permission'
|
|
1501
|
-
: value.action === 'open_local_cli'
|
|
1502
|
-
? 'card.action.local_cli_no_permission'
|
|
1503
|
-
: 'card.action.write_link_no_permission';
|
|
1504
|
-
return { toast: { type: 'warning', content: t(key, undefined, localeForBot(effectiveAppId)) } };
|
|
1505
|
-
}
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
else {
|
|
1510
|
-
const bots = getAllBots();
|
|
1511
|
-
const allowedUsers = bots.flatMap(b => b.resolvedAllowedUsers);
|
|
1512
|
-
// globalGrants 与 allowedChatGroups 同理计入 hasAllowlist:只配 globalGrants(talk-only)
|
|
1513
|
-
// 也算限制态,否则这条手写 fallback 会算成 false → 敏感动作 fall through 成全开放。
|
|
1514
|
-
// 注意只进 hasAllowlist 判定,命中仍只认 allowedUsers(与 canOperate 一致,不授 operate)。
|
|
1515
|
-
const hasAllowlist = allowedUsers.length > 0
|
|
1516
|
-
|| bots.some(b => (b.config.allowedChatGroups?.length ?? 0) > 0)
|
|
1517
|
-
|| bots.some(b => (b.config.globalGrants?.length ?? 0) > 0)
|
|
1518
|
-
// p2pOpen 同理(与 evaluateTalk 的 hasConfiguredAllowlist 保持一致):它是一次显式的
|
|
1519
|
-
// 权限边界声明,不能让这条 fallback 把「只配 p2pOpen」的部署算成无白名单 → 敏感卡片
|
|
1520
|
-
// 动作 fall through 成全开放。
|
|
1521
|
-
|| bots.some(b => b.config.p2pOpen === true);
|
|
1522
|
-
if (hasAllowlist && (!operatorOpenId || !allowedUsers.includes(operatorOpenId))) {
|
|
1523
|
-
logger.info(`Card action "${value.action}" blocked for non-allowed user: ${operatorOpenId}`);
|
|
1524
|
-
// 与上面 non-operator 分支同理:仅 get_write_link 破例给 toast,其余保持静默。
|
|
1525
|
-
if (value.action === 'get_write_link' || value.action === 'open_local_terminal' || value.action === 'open_local_cli') {
|
|
1526
|
-
const key = value.action === 'open_local_terminal'
|
|
1527
|
-
? 'card.action.local_terminal_no_permission'
|
|
1528
|
-
: value.action === 'open_local_cli'
|
|
1529
|
-
? 'card.action.local_cli_no_permission'
|
|
1530
|
-
: 'card.action.write_link_no_permission';
|
|
1531
|
-
return { toast: { type: 'warning', content: t(key, undefined, localeForBot(larkAppId)) } };
|
|
1532
|
-
}
|
|
1533
|
-
return;
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
// Historical v2 workflow cards remain in chat history after the runtime is
|
|
1538
|
-
// removed. Treat every legacy callback as a tombstone instead of allowing it
|
|
1539
|
-
// to fall through to an unrelated generic card action.
|
|
1540
|
-
if (typeof value?.action === 'string' &&
|
|
1541
|
-
(value.action.startsWith('wf_') || value.action.startsWith('dash_workflows_'))) {
|
|
1542
|
-
return {
|
|
1543
|
-
toast: {
|
|
1544
|
-
type: 'warning',
|
|
1545
|
-
content: 'v2 workflow 已下线;旧卡片不再可操作,请迁移定义后使用 /workflow。',
|
|
1546
|
-
},
|
|
1547
|
-
};
|
|
1548
|
-
}
|
|
1549
|
-
// Handle session card button actions (restart/close)
|
|
1550
|
-
// ─── /adopt V2 picker: state-changing re-renders (pick / page / search) ─
|
|
1551
|
-
// Mirrors the /relay picker. Lark cards are stateless server-side, so every
|
|
1552
|
-
// callback value carries the full state (search / page / selected / root_id /
|
|
1553
|
-
// invoker). We reuse the candidates snapshot cached at first render so a page
|
|
1554
|
-
// flip or search doesn't re-shell-out to tmux; on a cache miss (TTL expiry /
|
|
1555
|
-
// daemon restart) we re-discover and re-cache.
|
|
1556
|
-
if (value?.action && larkAppId && ['adopt_pick', 'adopt_page', 'adopt_search'].includes(value.action)) {
|
|
1557
|
-
const rootId = value.root_id;
|
|
1558
|
-
if (!rootId)
|
|
1559
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_missing_value', undefined, localeForBot(larkAppId)) } };
|
|
1560
|
-
const loc = localeForBot(larkAppId);
|
|
1561
|
-
const sKey = sessionKey(rootId, larkAppId);
|
|
1562
|
-
const ds = activeSessions.get(sKey);
|
|
1563
|
-
if (!ds)
|
|
1564
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_no_session', undefined, loc) } };
|
|
1565
|
-
// Owner-only, same gate as the command path.
|
|
1566
|
-
if (!canOperate(ds.larkAppId, ds.chatId, operatorOpenId)) {
|
|
1567
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_no_perm', undefined, loc) } };
|
|
1568
|
-
}
|
|
1569
|
-
// Pin the card to its summoner (legacy cards without the field pass through).
|
|
1570
|
-
const invokerOpenId = value.invoker_open_id;
|
|
1571
|
-
if (invokerOpenId && operatorOpenId && invokerOpenId !== operatorOpenId) {
|
|
1572
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_not_invoker', undefined, loc) } };
|
|
1573
|
-
}
|
|
1574
|
-
// Reconstruct next state from the action.
|
|
1575
|
-
let nextSearch = value.search ?? '';
|
|
1576
|
-
let nextPage = Number(value.page ?? 0) || 0;
|
|
1577
|
-
let nextSelected = value.selected || undefined;
|
|
1578
|
-
if (value.action === 'adopt_search') {
|
|
1579
|
-
nextSearch = String(action?.input_value ?? '').trim();
|
|
1580
|
-
nextPage = 0;
|
|
1581
|
-
nextSelected = undefined; // new filter → drop selection
|
|
1582
|
-
}
|
|
1583
|
-
else if (value.action === 'adopt_page') {
|
|
1584
|
-
nextPage = Number(value.page ?? 0) || 0;
|
|
1585
|
-
}
|
|
1586
|
-
else if (value.action === 'adopt_pick') {
|
|
1587
|
-
nextSelected = value.entry_key;
|
|
1588
|
-
}
|
|
1589
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
1590
|
-
const { collectAdoptCandidates, cacheAdoptCandidates, getCachedAdoptCandidates, } = await import('../../services/adopt-picker.js');
|
|
1591
|
-
let candidates = getCachedAdoptCandidates(rootId, Date.now());
|
|
1592
|
-
if (!candidates) {
|
|
1593
|
-
const { discoverResumableSessionsForBot, ADOPT_RESUME_LIMIT } = await import('../../core/command-handler.js');
|
|
1594
|
-
candidates = await collectAdoptCandidates(botCfg.cliId, botCfg.cliPathOverride, activeSessions, discoverResumableSessionsForBot, ADOPT_RESUME_LIMIT, botCfg.cliRuntime?.executable);
|
|
1595
|
-
cacheAdoptCandidates(rootId, candidates, Date.now());
|
|
1596
|
-
}
|
|
1597
|
-
const { buildAdoptSelectCard } = await import('./card-builder.js');
|
|
1598
|
-
const cardJson = buildAdoptSelectCard(candidates.sessions, rootId, loc, candidates.resumable, { selectedKey: nextSelected, searchQuery: nextSearch, page: nextPage }, invokerOpenId ?? operatorOpenId, candidates.resumeLimit, botCfg.cliId, sessionRuntimeDisplayName(ds));
|
|
1599
|
-
// event-dispatcher wraps this as { card: { type: 'raw', data } } → in-place patch.
|
|
1600
|
-
return JSON.parse(cardJson);
|
|
1601
|
-
}
|
|
1602
|
-
// ─── /adopt V2 picker: confirm (dispatch to adopt or resume-import) ─────
|
|
1603
|
-
// Confirm does NOT trust the cached snapshot for liveness — a live pane may
|
|
1604
|
-
// have exited since render. Live targets re-discover (fast-path by tmux
|
|
1605
|
-
// target to stay inside Lark's 3s callback budget); resume targets re-scan
|
|
1606
|
-
// disk. The cached entry only tells us WHICH target the key refers to.
|
|
1607
|
-
if (value?.action === 'adopt_confirm' && larkAppId) {
|
|
1608
|
-
const rootId = value.root_id;
|
|
1609
|
-
const entryKey = value.entry_key;
|
|
1610
|
-
if (!rootId || !entryKey)
|
|
1611
|
-
return;
|
|
1612
|
-
const loc = localeForBot(larkAppId);
|
|
1613
|
-
const sKey = sessionKey(rootId, larkAppId);
|
|
1614
|
-
const ds = activeSessions.get(sKey);
|
|
1615
|
-
if (!ds)
|
|
1616
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_no_session', undefined, loc) } };
|
|
1617
|
-
const sourceSession = ds.session;
|
|
1618
|
-
if (isSessionTransferring(ds)) {
|
|
1619
|
-
return { toast: { type: 'warning', content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)) } };
|
|
1620
|
-
}
|
|
1621
|
-
if (!canOperate(ds.larkAppId, ds.chatId, operatorOpenId)) {
|
|
1622
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_no_perm', undefined, loc) } };
|
|
1623
|
-
}
|
|
1624
|
-
const invokerOpenId = value.invoker_open_id;
|
|
1625
|
-
if (invokerOpenId && operatorOpenId && invokerOpenId !== operatorOpenId) {
|
|
1626
|
-
return { toast: { type: 'error', content: t('card.adopt.toast_not_invoker', undefined, loc) } };
|
|
1627
|
-
}
|
|
1628
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
1629
|
-
const { clearAdoptCandidates } = await import('../../services/adopt-picker.js');
|
|
1630
|
-
// ── Resume-import path (key = "resume:<cliSessionId>") ──────────────
|
|
1631
|
-
if (entryKey.startsWith('resume:')) {
|
|
1632
|
-
const cliSessionId = entryKey.slice('resume:'.length);
|
|
1633
|
-
const { discoverResumableSessionsForBot, startResumeImportSession, ADOPT_RESUME_LIMIT } = await import('../../core/command-handler.js');
|
|
1634
|
-
const resumable = await discoverResumableSessionsForBot(botCfg.cliId, botCfg.cliPathOverride, activeSessions, ADOPT_RESUME_LIMIT);
|
|
1635
|
-
if (ds.session !== sourceSession || ds.session.status !== 'active'
|
|
1636
|
-
|| activeSessions.get(sKey) !== ds || isSessionTransferring(ds)) {
|
|
1637
|
-
return { toast: { type: 'warning', content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)) } };
|
|
1638
|
-
}
|
|
1639
|
-
const target = resumable.find(r => r.cliSessionId === cliSessionId);
|
|
1640
|
-
if (!target) {
|
|
1641
|
-
await sessionReply(rootId, t('cmd.adopt.resume_not_found', { id: cliSessionId }, localeForBot(ds.larkAppId)));
|
|
1642
|
-
clearAdoptCandidates(rootId);
|
|
1643
|
-
if (cardMessageId && larkAppId)
|
|
1644
|
-
deleteMessage(larkAppId, cardMessageId);
|
|
1645
|
-
return;
|
|
1646
|
-
}
|
|
1647
|
-
await startResumeImportSession(target, ds, { activeSessions, sessionReply: deps.sessionReply, getActiveCount: () => 0, lastRepoScan }, larkAppId);
|
|
1648
|
-
clearAdoptCandidates(rootId);
|
|
1649
|
-
if (cardMessageId && larkAppId)
|
|
1650
|
-
deleteMessage(larkAppId, cardMessageId);
|
|
1651
|
-
return;
|
|
1652
|
-
}
|
|
1653
|
-
// ── Live-adopt path (key = "live:...") ──────────────────────────────
|
|
1654
|
-
// The cached snapshot only tells us WHICH pane the key referred to; we
|
|
1655
|
-
// re-discover fresh so startAdoptSession gets a live pid (a pane may have
|
|
1656
|
-
// exited since render). adoptLiveKey mirrors the builder's key format so
|
|
1657
|
-
// a freshly-discovered session maps back to the clicked entry_key.
|
|
1658
|
-
const { adoptLiveKey } = await import('./card-builder.js');
|
|
1659
|
-
const { discoverAdoptableSessions, discoverAdoptableSessionByTarget, excludeOwnedHerdrAdoptTargets } = await import('../../core/session-discovery.js');
|
|
1660
|
-
const { discoverAdoptableZellijSessions } = await import('../../core/zellij-adopt-discovery.js');
|
|
1661
|
-
async function resolveLive() {
|
|
1662
|
-
// Zellij keys carry "live:zellij:" — resolve from the zellij backend.
|
|
1663
|
-
if (entryKey.startsWith('live:zellij:')) {
|
|
1664
|
-
return discoverAdoptableZellijSessions(botCfg.cliId, botCfg.cliRuntime?.executable)
|
|
1665
|
-
.find(s => adoptLiveKey(s) === entryKey);
|
|
1666
|
-
}
|
|
1667
|
-
// Fast path: the key IS "live:<adoptTargetKey>" = "live:tmux:<target>:<pid>".
|
|
1668
|
-
// Parse the tmux target for a cheap single-pane resolve, staying under
|
|
1669
|
-
// Lark's 3s callback budget (a full scan can take seconds on many panes).
|
|
1670
|
-
const inner = entryKey.slice('live:'.length); // e.g. "tmux:0:2.0:12345"
|
|
1671
|
-
const parts = inner.split(':');
|
|
1672
|
-
if (parts[0] === 'tmux' && parts.length >= 3) {
|
|
1673
|
-
const tmuxTarget = parts.slice(1, -1).join(':'); // drop "tmux" + trailing pid
|
|
1674
|
-
const fast = discoverAdoptableSessionByTarget(tmuxTarget, botCfg.cliId, botCfg.cliRuntime?.executable);
|
|
1675
|
-
if (fast && adoptLiveKey(fast) === entryKey)
|
|
1676
|
-
return fast;
|
|
1677
|
-
}
|
|
1678
|
-
const ownedHerdrTargets = [...activeSessions.values()].flatMap(active => {
|
|
1679
|
-
const t2 = active.session.persistentBackendTarget;
|
|
1680
|
-
return active.session.status === 'active' && !active.adoptedFrom && t2?.backendType === 'herdr' && !!t2.agentName
|
|
1681
|
-
? [{ sessionName: t2.sessionName, agentName: t2.agentName }] : [];
|
|
1682
|
-
});
|
|
1683
|
-
return excludeOwnedHerdrAdoptTargets(discoverAdoptableSessions(botCfg.cliId, botCfg.cliRuntime?.executable), ownedHerdrTargets)
|
|
1684
|
-
.find(s => adoptLiveKey(s) === entryKey);
|
|
1685
|
-
}
|
|
1686
|
-
let target = await resolveLive();
|
|
1687
|
-
for (let attempt = 0; !target && attempt < 3; attempt++) {
|
|
1688
|
-
await new Promise(r => setTimeout(r, 150));
|
|
1689
|
-
target = await resolveLive();
|
|
1690
|
-
}
|
|
1691
|
-
if (ds.session !== sourceSession || ds.session.status !== 'active'
|
|
1692
|
-
|| activeSessions.get(sKey) !== ds || isSessionTransferring(ds)) {
|
|
1693
|
-
return { toast: { type: 'warning', content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)) } };
|
|
1694
|
-
}
|
|
1695
|
-
if (!target) {
|
|
1696
|
-
await sessionReply(rootId, t('cmd.adopt.target_exited', undefined, localeForBot(ds.larkAppId)));
|
|
1697
|
-
clearAdoptCandidates(rootId);
|
|
1698
|
-
if (cardMessageId && larkAppId)
|
|
1699
|
-
deleteMessage(larkAppId, cardMessageId);
|
|
1700
|
-
return;
|
|
1701
|
-
}
|
|
1702
|
-
const { startAdoptSession } = await import('../../core/command-handler.js');
|
|
1703
|
-
await startAdoptSession(target, ds, { activeSessions, sessionReply: deps.sessionReply, getActiveCount: () => 0, lastRepoScan }, larkAppId);
|
|
1704
|
-
clearAdoptCandidates(rootId);
|
|
1705
|
-
if (cardMessageId && larkAppId)
|
|
1706
|
-
deleteMessage(larkAppId, cardMessageId);
|
|
1707
|
-
return;
|
|
1708
|
-
}
|
|
1709
|
-
if (value?.action) {
|
|
1710
|
-
const { action: actionType, root_id: rootId } = value;
|
|
1711
|
-
const sKey = larkAppId ? sessionKey(rootId, larkAppId) : rootId;
|
|
1712
|
-
const ds = larkAppId
|
|
1713
|
-
? getSessionByActionValue(activeSessions, rootId, larkAppId, value.session_id, actionType)
|
|
1714
|
-
: activeSessions.get(rootId);
|
|
1715
|
-
const launchLocalCli = (target, locDs) => {
|
|
1716
|
-
const cliId = sessionCliId(target);
|
|
1717
|
-
const mode = localCliOpenMode();
|
|
1718
|
-
const preflight = preflightLocalCliOpen(target, { cliId, mode });
|
|
1719
|
-
if (!preflight.ok) {
|
|
1720
|
-
logger.warn(`[${tag(target)}] Rejected ${actionType} preflight: ${preflight.error}: ${preflight.message}`);
|
|
1721
|
-
if (preflight.error === 'missing_resume_id') {
|
|
1722
|
-
return { toast: { type: 'warning', content: t('card.action.local_cli_not_ready', undefined, locDs) } };
|
|
1723
|
-
}
|
|
1724
|
-
if (preflight.error === 'unsupported_cli' || preflight.error === 'unsupported_backend' || preflight.error === 'missing_attach_target') {
|
|
1725
|
-
return { toast: { type: 'warning', content: t('card.action.local_terminal_unsupported', { cliName: sessionCliDisplayName(target) }, locDs) } };
|
|
1726
|
-
}
|
|
1727
|
-
return { toast: { type: 'error', content: t('card.action.local_cli_failed', { reason: preflight.message }, locDs) } };
|
|
1728
|
-
}
|
|
1729
|
-
const reportFailure = (reason) => {
|
|
1730
|
-
if (value.visibility === 'private') {
|
|
1731
|
-
logger.warn(`[${tag(target)}] ${actionType} failed for private card; suppressing public fallback: ${reason}`);
|
|
1732
|
-
return;
|
|
1733
|
-
}
|
|
1734
|
-
void sessionReply(rootId, t('card.action.local_cli_failed', { reason }, locDs))
|
|
1735
|
-
.catch((err) => logger.warn(`[${tag(target)}] ${actionType} failure reply failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
1736
|
-
};
|
|
1737
|
-
void openLocalCliInIterm(target, { cliId, mode })
|
|
1738
|
-
.then((result) => {
|
|
1739
|
-
if (!result.ok) {
|
|
1740
|
-
logger.warn(`[${tag(target)}] ${actionType} failed: ${result.error}: ${result.message}`);
|
|
1741
|
-
reportFailure(result.message);
|
|
1742
|
-
return;
|
|
1743
|
-
}
|
|
1744
|
-
logger.info(`[${tag(target)}] ${actionType} launched local terminal for ${cliId} (${mode})`);
|
|
1745
|
-
})
|
|
1746
|
-
.catch((err) => {
|
|
1747
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
1748
|
-
logger.warn(`[${tag(target)}] ${actionType} crashed: ${reason}`);
|
|
1749
|
-
reportFailure(reason);
|
|
1750
|
-
});
|
|
1751
|
-
return {
|
|
1752
|
-
toast: {
|
|
1753
|
-
type: 'success',
|
|
1754
|
-
content: t('card.action.local_cli_opened', { cliName: sessionCliDisplayName(target) }, locDs),
|
|
1755
|
-
},
|
|
1756
|
-
};
|
|
1757
|
-
};
|
|
1758
|
-
const guardLocalCliOpen = (target, locDs) => {
|
|
1759
|
-
if (!isLocalCliOpenConfigured()) {
|
|
1760
|
-
logger.info(`[${tag(target)}] Rejected ${actionType}: native CLI opening is disabled`);
|
|
1761
|
-
return { toast: { type: 'warning', content: t('card.action.local_cli_disabled', undefined, locDs) } };
|
|
1762
|
-
}
|
|
1763
|
-
if (!isLocalCliOpenCapable()) {
|
|
1764
|
-
logger.info(`[${tag(target)}] Rejected ${actionType}: daemon host cannot open the native CLI`);
|
|
1765
|
-
return {
|
|
1766
|
-
toast: {
|
|
1767
|
-
type: 'warning',
|
|
1768
|
-
content: t('card.action.local_terminal_unsupported', { cliName: sessionCliDisplayName(target) }, locDs),
|
|
1769
|
-
},
|
|
1770
|
-
};
|
|
1771
|
-
}
|
|
1772
|
-
};
|
|
1773
|
-
if (ds && actionType === 'open_local_cli') {
|
|
1774
|
-
const actualCliId = sessionCliId(ds);
|
|
1775
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
1776
|
-
if (!value?.cli_id) {
|
|
1777
|
-
return { toast: { type: 'error', content: t('card.action.local_cli_missing_cli_id', undefined, locDs) } };
|
|
1778
|
-
}
|
|
1779
|
-
if (value.cli_id !== actualCliId) {
|
|
1780
|
-
logger.warn(`[${tag(ds)}] Rejected open_local_cli from mismatched CLI card: expected=${value.cli_id} actual=${actualCliId}`);
|
|
1781
|
-
return { toast: { type: 'error', content: t('card.action.local_cli_cli_mismatch', undefined, locDs) } };
|
|
1782
|
-
}
|
|
1783
|
-
}
|
|
1784
|
-
else if (ds && !validateCardCliBinding(ds, value))
|
|
1785
|
-
return;
|
|
1786
|
-
if (actionType === 'open_local_cli') {
|
|
1787
|
-
const locDs = localeForBot(ds?.larkAppId ?? larkAppId);
|
|
1788
|
-
if (!ds) {
|
|
1789
|
-
return { toast: { type: 'warning', content: t('card.action.session_gone', undefined, locDs) } };
|
|
1790
|
-
}
|
|
1791
|
-
const blocked = guardLocalCliOpen(ds, locDs);
|
|
1792
|
-
if (blocked)
|
|
1793
|
-
return blocked;
|
|
1794
|
-
return launchLocalCli(ds, locDs);
|
|
1795
|
-
}
|
|
1796
|
-
// 🔊 语音总结 — no permission gate (任意人可点). Inject a condense-and-speak
|
|
1797
|
-
// instruction into the session; the model emits the voice via
|
|
1798
|
-
// `botmux send --voice`. Dedup per card so only one voice is generated.
|
|
1799
|
-
if (actionType === 'voice_summary') {
|
|
1800
|
-
const locDs = localeForBot(ds?.larkAppId ?? larkAppId);
|
|
1801
|
-
if (!ds) {
|
|
1802
|
-
return { toast: { type: 'warning', content: t('card.voice.toast_session_gone', undefined, locDs) } };
|
|
1803
|
-
}
|
|
1804
|
-
// 权限:仅 canTalk / canOperate 用户可点;其他人提示需授权(无声门会让人以为按钮坏了)。
|
|
1805
|
-
// 传 ds.chatType:p2pOpen 的 bot 在私聊里,对方点自己会话的卡片按钮应与其 talk 权一致
|
|
1806
|
-
// (仍不给 canOperate —— 管理类按钮另有 canOperate 闸)。
|
|
1807
|
-
if (!canTalk(ds.larkAppId, ds.chatId, operatorOpenId, undefined, undefined, ds.chatType)
|
|
1808
|
-
&& !canOperate(ds.larkAppId, ds.chatId, operatorOpenId)) {
|
|
1809
|
-
logger.info(`[${tag(ds)}] voice_summary blocked for unauthorized user: ${operatorOpenId ?? '?'}`);
|
|
1810
|
-
return { toast: { type: 'warning', content: t('card.voice.toast_need_auth', undefined, locDs) } };
|
|
1811
|
-
}
|
|
1812
|
-
// Dedupe read BEFORE the busy guard: a card whose voice is already being
|
|
1813
|
-
// generated will have its worker back in `working`, so the busy guard would
|
|
1814
|
-
// otherwise shadow the "already on the way" hint with a misleading
|
|
1815
|
-
// "wait for idle" toast. Read first (correct message), guard second, and
|
|
1816
|
-
// only `add` after the guard so a genuinely-busy first click still doesn't
|
|
1817
|
-
// burn the dedupe key.
|
|
1818
|
-
const dedupeKey = cardMessageId ?? `${sessionAnchorId(ds)}::voice`;
|
|
1819
|
-
if (voicedCardIds.has(dedupeKey)) {
|
|
1820
|
-
return { toast: { type: 'info', content: t('card.voice.toast_already', undefined, locDs) } };
|
|
1821
|
-
}
|
|
1822
|
-
if (!isLiveWorkerIdleOrLimited(ds)) {
|
|
1823
|
-
logger.info(`[${tag(ds)}] voice_summary blocked because worker is busy: ${ds.lastScreenStatus ?? 'unknown'}`);
|
|
1824
|
-
return { toast: { type: 'warning', content: t('card.voice.toast_worker_busy', undefined, locDs) } };
|
|
1825
|
-
}
|
|
1826
|
-
voicedCardIds.add(dedupeKey);
|
|
1827
|
-
if (voicedCardIds.size > 5000) {
|
|
1828
|
-
voicedCardIds.clear();
|
|
1829
|
-
voicedCardIds.add(dedupeKey);
|
|
1830
|
-
}
|
|
1831
|
-
const instruction = voiceSummaryInstruction(locDs);
|
|
1832
|
-
const voiceInput = {
|
|
1833
|
-
content: instruction,
|
|
1834
|
-
codexAppInput: withCodexAppContext({ text: t('card.voice.user_message', undefined, locDs) }, 'botmux_voice_summary_instruction', instruction, 'application'),
|
|
1835
|
-
};
|
|
1836
|
-
if (ds.worker && !ds.worker.killed)
|
|
1837
|
-
sendWorkerInput(ds, voiceInput);
|
|
1838
|
-
else
|
|
1839
|
-
forkWorker(ds, voiceInput, ds.hasHistory);
|
|
1840
|
-
logger.info(`[${tag(ds)}] voice_summary triggered by ${operatorOpenId ?? '?'}`);
|
|
1841
|
-
return { toast: { type: 'success', content: t('card.voice.toast_wait', undefined, locDs) } };
|
|
1842
|
-
}
|
|
1843
|
-
if (actionType === 'restart' && ds) {
|
|
1844
|
-
// Adopt sessions: hard-reject. botmux never owned the user's CLI;
|
|
1845
|
-
// restarting would mean killing their tmux pane / Claude process,
|
|
1846
|
-
// which violates the bridge invariant. Defense in depth — buildSessionCard
|
|
1847
|
-
// already omits the restart button when adoptMode=true, but a stale
|
|
1848
|
-
// pre-fix card or a malformed action payload could still arrive.
|
|
1849
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
1850
|
-
if (ds.adoptedFrom) {
|
|
1851
|
-
logger.warn(`[${tag(ds)}] Rejected restart on adopt session — would kill user's pane`);
|
|
1852
|
-
await sessionReply(rootId, t('card.action.adopt_no_restart', undefined, locDs));
|
|
1853
|
-
return;
|
|
1854
|
-
}
|
|
1855
|
-
if (isSessionTransferring(ds)) {
|
|
1856
|
-
return {
|
|
1857
|
-
toast: {
|
|
1858
|
-
type: 'warning',
|
|
1859
|
-
content: t('cmd.session.transfer_in_progress', undefined, locDs),
|
|
1860
|
-
},
|
|
1861
|
-
};
|
|
1862
|
-
}
|
|
1863
|
-
const effectiveCliId = sessionCliId(ds);
|
|
1864
|
-
const cliName = sessionCliDisplayName(ds);
|
|
1865
|
-
logger.info(`[${tag(ds)}] Correlated restart via card button`);
|
|
1866
|
-
requestSessionRestart(ds, {
|
|
1867
|
-
source: 'card',
|
|
1868
|
-
notify: status => {
|
|
1869
|
-
const content = t(`cmd.restart.${status}`, { cliName }, locDs);
|
|
1870
|
-
return deliverEphemeralOrReply(ds, operatorOpenId, content, 'text', () => sessionReply(rootId, content));
|
|
1871
|
-
},
|
|
1872
|
-
});
|
|
1873
|
-
}
|
|
1874
|
-
if (actionType === 'close') {
|
|
1875
|
-
if (!ds) {
|
|
1876
|
-
// 会话已不在 activeSessions(已关过 / 卡片过期 / daemon 重启丢失)——点「关闭
|
|
1877
|
-
// 会话」却静默无反应会让人以为按钮坏了,给一条失败 toast(成功路径不弹,已关卡即反馈)。
|
|
1878
|
-
return { toast: { type: 'warning', content: t('card.action.session_gone', undefined, localeForBot(larkAppId)) } };
|
|
1879
|
-
}
|
|
1880
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
1881
|
-
// Build the closed card BEFORE killWorker/closeSession — it reads the
|
|
1882
|
-
// live session's identity off `ds`.
|
|
1883
|
-
const card = buildClosedSessionCard(ds, localeForBot(ds.larkAppId));
|
|
1884
|
-
try {
|
|
1885
|
-
await closeSession(ds.session.sessionId);
|
|
1886
|
-
}
|
|
1887
|
-
catch (err) {
|
|
1888
|
-
logger.error(`[${tag(ds)}] Refused close because backing teardown was not verified: ${err}`);
|
|
1889
|
-
return {
|
|
1890
|
-
toast: {
|
|
1891
|
-
type: 'warning',
|
|
1892
|
-
content: `会话关闭失败:${err instanceof Error ? err.message : String(err)}`,
|
|
1893
|
-
},
|
|
1894
|
-
};
|
|
1895
|
-
}
|
|
1896
|
-
// closeSession removes the captured ds before awaiting best-effort remote
|
|
1897
|
-
// cleanup. A new session may claim the same route during that await; only
|
|
1898
|
-
// delete here if this handler still owns the exact object it closed.
|
|
1899
|
-
if (activeSessions.get(sKey) === ds)
|
|
1900
|
-
activeSessions.delete(sKey);
|
|
1901
|
-
// The closed card carries session title / CLI name / workingDir / resume
|
|
1902
|
-
// command. In private-card mode those must not leak to the group — send the
|
|
1903
|
-
// closed card ephemeral to the same owner audience instead. No group
|
|
1904
|
-
// fallback on failure (privacy wins; the session is already closed).
|
|
1905
|
-
// `value.visibility === 'private'` pins the decision to the card that was
|
|
1906
|
-
// clicked, so a card built in private mode stays ephemeral even if the
|
|
1907
|
-
// bot's `privateCard` config was turned off in the meantime.
|
|
1908
|
-
if (value?.visibility === 'private' || botCfg.privateCard) {
|
|
1909
|
-
const audience = resolvePrivateCardAudience(ds);
|
|
1910
|
-
for (const openId of audience) {
|
|
1911
|
-
await sendEphemeralCard(ds.larkAppId, ds.chatId, openId, card).catch(err => logger.warn(`[${tag(ds)}] private close card ephemeral send to ${openId.substring(0, 8)}… failed: ${err}`));
|
|
1912
|
-
}
|
|
1913
|
-
logger.info(`[${tag(ds)}] Closed via card button (private close card → ${audience.length} owner(s))`);
|
|
1914
|
-
}
|
|
1915
|
-
else {
|
|
1916
|
-
await deliverEphemeralOrReply(ds, operatorOpenId, card, 'interactive', () => sessionReply(rootId, card, 'interactive'));
|
|
1917
|
-
logger.info(`[${tag(ds)}] Closed via card button`);
|
|
1918
|
-
}
|
|
1919
|
-
}
|
|
1920
|
-
if (actionType === 'resume') {
|
|
1921
|
-
const targetSessionId = value?.session_id;
|
|
1922
|
-
const locDsResume = localeForBot(ds?.larkAppId ?? larkAppId);
|
|
1923
|
-
if (!targetSessionId) {
|
|
1924
|
-
await sessionReply(rootId, t('card.action.resume_missing_session_id', undefined, locDsResume));
|
|
1925
|
-
}
|
|
1926
|
-
else {
|
|
1927
|
-
const result = await resumeSession(targetSessionId, activeSessions);
|
|
1928
|
-
if (result.ok) {
|
|
1929
|
-
const cliName = sessionCliDisplayName(result.ds);
|
|
1930
|
-
const resumeMsg = t('card.action.resume_success', { cliName }, localeForBot(result.ds.larkAppId));
|
|
1931
|
-
await deliverEphemeralOrReply(result.ds, operatorOpenId, resumeMsg, 'text', () => sessionReply(rootId, resumeMsg));
|
|
1932
|
-
logger.info(`[${targetSessionId.substring(0, 8)}] Resumed via card button`);
|
|
1933
|
-
}
|
|
1934
|
-
else if (result.error === 'not_found') {
|
|
1935
|
-
await sessionReply(rootId, t('card.action.resume_not_found', { short: targetSessionId.substring(0, 8) }, locDsResume));
|
|
1936
|
-
}
|
|
1937
|
-
else if (result.error === 'not_closed') {
|
|
1938
|
-
await sessionReply(rootId, t('card.action.resume_not_closed', undefined, locDsResume));
|
|
1939
|
-
}
|
|
1940
|
-
else if (result.error === 'anchor_occupied') {
|
|
1941
|
-
const detail = result.activeSessionId
|
|
1942
|
-
? t('card.action.resume_anchor_holder', { short: result.activeSessionId.substring(0, 8) }, locDsResume)
|
|
1943
|
-
: '';
|
|
1944
|
-
await sessionReply(rootId, t('card.action.resume_anchor_occupied', { detail }, locDsResume));
|
|
1945
|
-
}
|
|
1946
|
-
else if (result.error === 'adopt_unsupported') {
|
|
1947
|
-
await sessionReply(rootId, t('card.action.resume_adopt_unsupported', undefined, locDsResume));
|
|
1948
|
-
}
|
|
1949
|
-
else if (result.error === 'deferred_unmaterialized') {
|
|
1950
|
-
await sessionReply(rootId, t('card.action.resume_deferred_unmaterialized', undefined, locDsResume));
|
|
1951
|
-
}
|
|
1952
|
-
else if (result.error === 'resume_cancelled') {
|
|
1953
|
-
await sessionReply(rootId, t('card.action.resume_cancelled', undefined, locDsResume));
|
|
1954
|
-
}
|
|
1955
|
-
}
|
|
1956
|
-
}
|
|
1957
|
-
if (actionType === 'disconnect' && ds) {
|
|
1958
|
-
killWorker(ds);
|
|
1959
|
-
sessionStore.closeSession(ds.session.sessionId);
|
|
1960
|
-
publishClosedSessionPatch(ds.session.sessionId, ds.session.closedAt ? Date.parse(ds.session.closedAt) : undefined);
|
|
1961
|
-
activeSessions.delete(sKey);
|
|
1962
|
-
await sessionReply(rootId, t('card.action.disconnected', undefined, localeForBot(ds.larkAppId)));
|
|
1963
|
-
logger.info(`[${tag(ds)}] Disconnected (adopt) via card button`);
|
|
1964
|
-
}
|
|
1965
|
-
if (actionType === 'takeover' && ds && ds.adoptedFrom) {
|
|
1966
|
-
await sessionReply(rootId, t('card.action.takeover_retired', undefined, localeForBot(ds.larkAppId)));
|
|
1967
|
-
logger.info(`[${tag(ds)}] Legacy takeover action ignored (bridge era; historical card)`);
|
|
1968
|
-
}
|
|
1969
|
-
if (actionType === 'retry_last_task' && ds) {
|
|
1970
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
1971
|
-
const cliInput = ds.lastCliInput;
|
|
1972
|
-
if (!cliInput) {
|
|
1973
|
-
await sessionReply(rootId, t('card.action.retry_last_task_missing', undefined, locDs));
|
|
1974
|
-
return;
|
|
1975
|
-
}
|
|
1976
|
-
if (!ds.usageLimit) {
|
|
1977
|
-
await sessionReply(rootId, t('card.action.retry_last_task_unavailable', undefined, locDs));
|
|
1978
|
-
return;
|
|
1979
|
-
}
|
|
1980
|
-
if (!ds.usageLimit.retryReady && ds.usageLimit.retryAtMs > Date.now()) {
|
|
1981
|
-
await sessionReply(rootId, t('card.action.retry_last_task_not_ready', { retryLabel: ds.usageLimit.retryLabel }, locDs));
|
|
1982
|
-
return;
|
|
1983
|
-
}
|
|
1984
|
-
clearUsageLimitState(ds);
|
|
1985
|
-
ds.lastScreenStatus = 'working';
|
|
1986
|
-
ds.streamCardPending = true;
|
|
1987
|
-
ds.currentTurnTitle = (ds.lastUserPrompt || ds.currentTurnTitle || ds.session.title || getCliDisplayName(sessionCliId(ds))).substring(0, 50);
|
|
1988
|
-
ds.currentImageKey = undefined;
|
|
1989
|
-
persistStreamCardState(ds);
|
|
1990
|
-
let cardJson;
|
|
1991
|
-
if (ds.streamCardId && ds.streamCardId !== CARD_POSTING_SENTINEL && workerHasInitialized(ds)) {
|
|
1992
|
-
const readUrl = readableTerminalUrlFor(ds);
|
|
1993
|
-
cardJson = buildStreamingCard(ds.session.sessionId, sessionAnchorId(ds), readUrl, ds.currentTurnTitle, '', 'working', sessionCliId(ds), ds.displayMode ?? 'hidden', ds.streamCardNonce, ds.currentImageKey, !!ds.adoptedFrom, false, locDs, undefined, writableTerminalLinkFor(ds), isLocalCliOpenReady(ds, { cliId: sessionCliId(ds) }), getDaemonStreamingCardUsageSnapshot(ds, sessionCliId(ds)), sessionRuntimeDisplayName(ds), codexServiceTierBadge(sessionCliId(ds), ds.codexServiceTier));
|
|
1994
|
-
scheduleCardPatch(ds, cardJson);
|
|
1995
|
-
}
|
|
1996
|
-
const retryCodexAppInput = ds.lastCodexAppInput
|
|
1997
|
-
? (({ clientUserMessageId: _priorMessageId, ...input }) => input)(ds.lastCodexAppInput)
|
|
1998
|
-
: undefined;
|
|
1999
|
-
const retryInput = {
|
|
2000
|
-
content: cliInput,
|
|
2001
|
-
...(retryCodexAppInput ? { codexAppInput: retryCodexAppInput } : {}),
|
|
2002
|
-
};
|
|
2003
|
-
if (ds.worker && !ds.worker.killed)
|
|
2004
|
-
sendWorkerInput(ds, retryInput);
|
|
2005
|
-
else
|
|
2006
|
-
forkWorker(ds, retryInput, ds.hasHistory);
|
|
2007
|
-
logger.info(`[${tag(ds)}] Retrying last task after usage limit`);
|
|
2008
|
-
if (cardJson) {
|
|
2009
|
-
try {
|
|
2010
|
-
return JSON.parse(cardJson);
|
|
2011
|
-
}
|
|
2012
|
-
catch { /* fall through */ }
|
|
2013
|
-
}
|
|
2014
|
-
return;
|
|
2015
|
-
}
|
|
2016
|
-
if (actionType === 'tui_keys' && ds) {
|
|
2017
|
-
if (isSessionTransferring(ds)) {
|
|
2018
|
-
return {
|
|
2019
|
-
toast: {
|
|
2020
|
-
type: 'warning',
|
|
2021
|
-
content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)),
|
|
2022
|
-
},
|
|
2023
|
-
};
|
|
2024
|
-
}
|
|
2025
|
-
// Fail-closed: only act on a currently-active card (either the
|
|
2026
|
-
// ScreenAnalyzer TUI prompt card or our stuck-warning card). A stale
|
|
2027
|
-
// click from a resolved/replaced card must NOT send any IPC to the
|
|
2028
|
-
// worker — the CLI may have moved on or recovered. PATCH is UI only,
|
|
2029
|
-
// not an authorization check.
|
|
2030
|
-
const isActiveTuiCard = !!ds.tuiPromptCardId && cardMessageId === ds.tuiPromptCardId;
|
|
2031
|
-
const isActiveStuckCard = !!ds.stuckWarningCardId && cardMessageId === ds.stuckWarningCardId;
|
|
2032
|
-
if (!isActiveTuiCard && !isActiveStuckCard) {
|
|
2033
|
-
logger.info(`[${tag(ds)}] tui_keys from stale card ${cardMessageId} — ignored (active tui=${ds.tuiPromptCardId ?? 'none'} stuck=${ds.stuckWarningCardId ?? 'none'})`);
|
|
2034
|
-
return;
|
|
2035
|
-
}
|
|
2036
|
-
let keys = [];
|
|
2037
|
-
try {
|
|
2038
|
-
keys = JSON.parse(value?.keys ?? '[]');
|
|
2039
|
-
}
|
|
2040
|
-
catch { /* bad json */ }
|
|
2041
|
-
const isFinal = value?.is_final === '1';
|
|
2042
|
-
const optionType = value?.option_type ?? 'select';
|
|
2043
|
-
const selectedIndex = Number(value?.selected_index ?? 0);
|
|
2044
|
-
const selectedText = value?.selected_text ?? `Option ${selectedIndex + 1}`;
|
|
2045
|
-
if (isActiveTuiCard && ds.tuiPromptProcessing) {
|
|
2046
|
-
logger.info(`[${tag(ds)}] Duplicate TUI prompt card click — dropped (processing already in flight)`);
|
|
2047
|
-
return;
|
|
2048
|
-
}
|
|
2049
|
-
if (optionType === 'toggle') {
|
|
2050
|
-
// Only a ScreenAnalyzer TUI card may own toggle state. A stuck-warning
|
|
2051
|
-
// card must never read or mutate the other card's global selections.
|
|
2052
|
-
if (!isActiveTuiCard) {
|
|
2053
|
-
logger.info(`[${tag(ds)}] Ignored toggle from non-TUI card ${cardMessageId}`);
|
|
2054
|
-
return;
|
|
2055
|
-
}
|
|
2056
|
-
// Toggle: only update card UI, do NOT send keys to terminal yet.
|
|
2057
|
-
// Keys will be sent in batch when confirm is clicked.
|
|
2058
|
-
if (!ds.tuiToggledIndices)
|
|
2059
|
-
ds.tuiToggledIndices = [];
|
|
2060
|
-
const idx = ds.tuiToggledIndices.indexOf(selectedIndex);
|
|
2061
|
-
if (idx >= 0)
|
|
2062
|
-
ds.tuiToggledIndices.splice(idx, 1);
|
|
2063
|
-
else
|
|
2064
|
-
ds.tuiToggledIndices.push(selectedIndex);
|
|
2065
|
-
logger.info(`[${tag(ds)}] TUI toggle (card only): option ${selectedIndex}, toggled: [${ds.tuiToggledIndices}]`);
|
|
2066
|
-
// PATCH card to update ☐/☑ state
|
|
2067
|
-
if (cardMessageId && ds.tuiPromptOptions) {
|
|
2068
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2069
|
-
const updatedCard = buildTuiPromptCard(sessionAnchorId(ds), ds.session.sessionId, ds.currentTurnTitle || t('card.action.tui_select_title', undefined, locDs), ds.tuiPromptOptions, true, ds.tuiToggledIndices, locDs);
|
|
2070
|
-
updateMessage(ds.larkAppId, cardMessageId, updatedCard).catch(err => logger.debug(`[${tag(ds)}] Failed to update TUI toggle card: ${err}`));
|
|
2071
|
-
try {
|
|
2072
|
-
return JSON.parse(updatedCard);
|
|
2073
|
-
}
|
|
2074
|
-
catch { /* fall through */ }
|
|
2075
|
-
}
|
|
2076
|
-
return;
|
|
2077
|
-
}
|
|
2078
|
-
// For a normal TUI confirm: batch all toggled options' keys first.
|
|
2079
|
-
// For a stuck-warning card: derive the single allowed key from the
|
|
2080
|
-
// page type + selected index — NEVER trust value.keys from the card,
|
|
2081
|
-
// which could be tampered to inject arbitrary keys. The allowlist is
|
|
2082
|
-
// exactly the documented controls for each Codex hook-review screen.
|
|
2083
|
-
if (ds.worker) {
|
|
2084
|
-
let allKeys = [];
|
|
2085
|
-
let isFinalStuck = false;
|
|
2086
|
-
let dispatchedKeys = false;
|
|
2087
|
-
if (isActiveTuiCard && ds.tuiToggledIndices?.length && ds.tuiPromptOptions) {
|
|
2088
|
-
// Send each toggled option's keys in sequence
|
|
2089
|
-
for (const ti of ds.tuiToggledIndices.sort((a, b) => a - b)) {
|
|
2090
|
-
const opt = ds.tuiPromptOptions[ti];
|
|
2091
|
-
if (opt?.keys?.length) {
|
|
2092
|
-
allKeys.push(...opt.keys);
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
// Then the action's own keys (confirm/select)
|
|
2096
|
-
allKeys.push(...keys);
|
|
2097
|
-
}
|
|
2098
|
-
else if (isActiveStuckCard) {
|
|
2099
|
-
// P1-4: do NOT trust the callback's selected_index. Require it to be
|
|
2100
|
-
// present and a safe integer, then range-check against the page type's
|
|
2101
|
-
// option count. A missing/malformed index must NOT default to 0 (trust),
|
|
2102
|
-
// which is the highest-risk action.
|
|
2103
|
-
const rawIdx = value?.selected_index;
|
|
2104
|
-
if (rawIdx === undefined || rawIdx === null || rawIdx === '') {
|
|
2105
|
-
logger.info(`[${tag(ds)}] Stuck-warning card click missing selected_index — dropped`);
|
|
2106
|
-
return;
|
|
2107
|
-
}
|
|
2108
|
-
const idx = Number(rawIdx);
|
|
2109
|
-
if (!Number.isSafeInteger(idx)) {
|
|
2110
|
-
logger.info(`[${tag(ds)}] Stuck-warning card click with non-integer selected_index=${rawIdx} — dropped`);
|
|
2111
|
-
return;
|
|
2112
|
-
}
|
|
2113
|
-
// Allowlist: map (pageType, idx) → the one safe key.
|
|
2114
|
-
// Level 1: 0=t, 1=Enter, 2=Esc ; Level 2: 0=t, 1=Esc
|
|
2115
|
-
const pt = ds.stuckWarningPageType;
|
|
2116
|
-
const allowlist = pt === 'hook review level 1'
|
|
2117
|
-
? ['t', 'Enter', 'Escape']
|
|
2118
|
-
: pt === 'hook review level 2'
|
|
2119
|
-
? ['t', 'Escape']
|
|
2120
|
-
: null;
|
|
2121
|
-
if (!allowlist || idx < 0 || idx >= allowlist.length) {
|
|
2122
|
-
logger.info(`[${tag(ds)}] Stuck-warning card click with out-of-range index ${idx} for pageType=${pt ?? 'none'} — dropped`);
|
|
2123
|
-
return;
|
|
2124
|
-
}
|
|
2125
|
-
allKeys = [allowlist[idx]];
|
|
2126
|
-
// Stuck-card actions are always final (they resolve the current
|
|
2127
|
-
// hook-review screen). Define this server-side — do NOT trust
|
|
2128
|
-
// value.is_final from the callback.
|
|
2129
|
-
isFinalStuck = true;
|
|
2130
|
-
}
|
|
2131
|
-
else {
|
|
2132
|
-
// Non-stuck, non-TUI card (shouldn't happen given the active-card
|
|
2133
|
-
// guard above, but fail-closed).
|
|
2134
|
-
allKeys.push(...keys);
|
|
2135
|
-
}
|
|
2136
|
-
if (allKeys.length > 0) {
|
|
2137
|
-
const effectiveFinal = isFinal || isFinalStuck;
|
|
2138
|
-
// Atomic processing claim: if a previous click is already in flight
|
|
2139
|
-
// (waiting for tui_keys_delivered / stuck_warning_expired ACK), drop
|
|
2140
|
-
// this duplicate. Without this, two rapid clicks could both pass the
|
|
2141
|
-
// fresh-capture guard and inject keys twice.
|
|
2142
|
-
if (isActiveStuckCard) {
|
|
2143
|
-
if (ds.stuckWarningProcessing) {
|
|
2144
|
-
logger.info(`[${tag(ds)}] Duplicate stuck-warning card click — dropped (processing already in flight)`);
|
|
2145
|
-
return;
|
|
2146
|
-
}
|
|
2147
|
-
ds.stuckWarningProcessing = true;
|
|
2148
|
-
}
|
|
2149
|
-
if (isActiveTuiCard && effectiveFinal) {
|
|
2150
|
-
ds.tuiPromptProcessing = true;
|
|
2151
|
-
}
|
|
2152
|
-
// Only the stuck-warning card's Enter action re-arms the detector
|
|
2153
|
-
// (Enter advances from the hook list to a per-hook review). Match by
|
|
2154
|
-
// the actual keys sent — NOT by optionType, since t is typed 'confirm'
|
|
2155
|
-
// in the card definition. t/Esc and all ScreenAnalyzer cards never
|
|
2156
|
-
// set this flag. Also require the source card to be our own.
|
|
2157
|
-
const isStuckWarningEnter = isActiveStuckCard
|
|
2158
|
-
&& allKeys.length === 1
|
|
2159
|
-
&& allKeys[0] === 'Enter';
|
|
2160
|
-
// If this click is from a stuck-warning card, forward the nonce,
|
|
2161
|
-
// cliLifetime, and page type so the worker can re-verify the current
|
|
2162
|
-
// screen still matches before injecting keys. A stale click (CLI
|
|
2163
|
-
// recovered) will be dropped at the worker boundary.
|
|
2164
|
-
const stuckNonce = isActiveStuckCard ? ds.stuckWarningNonce : undefined;
|
|
2165
|
-
const stuckCliLifetime = isActiveStuckCard ? ds.stuckWarningCliLifetime : undefined;
|
|
2166
|
-
const stuckPage = isActiveStuckCard ? ds.stuckWarningPageType : undefined;
|
|
2167
|
-
const resolveText = isActiveTuiCard && ds.tuiToggledIndices?.length
|
|
2168
|
-
? ds.tuiToggledIndices.map(i => ds.tuiPromptOptions?.[i]?.text).filter(Boolean).join(', ')
|
|
2169
|
-
: selectedText;
|
|
2170
|
-
try {
|
|
2171
|
-
await sendWorkerIpc(ds.worker, {
|
|
2172
|
-
type: 'tui_keys',
|
|
2173
|
-
keys: allKeys,
|
|
2174
|
-
isFinal: effectiveFinal,
|
|
2175
|
-
rearmStuckDetector: isStuckWarningEnter,
|
|
2176
|
-
stuckNonce,
|
|
2177
|
-
stuckCliLifetime,
|
|
2178
|
-
stuckPageType: stuckPage,
|
|
2179
|
-
cardMessageId: isActiveTuiCard ? cardMessageId : undefined,
|
|
2180
|
-
selectedText: resolveText || selectedText,
|
|
2181
|
-
});
|
|
2182
|
-
dispatchedKeys = true;
|
|
2183
|
-
}
|
|
2184
|
-
catch (err) {
|
|
2185
|
-
if (isActiveStuckCard)
|
|
2186
|
-
ds.stuckWarningProcessing = false;
|
|
2187
|
-
if (isActiveTuiCard && effectiveFinal)
|
|
2188
|
-
ds.tuiPromptProcessing = false;
|
|
2189
|
-
logger.warn(`[${tag(ds)}] TUI key IPC delivery failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2190
|
-
return {
|
|
2191
|
-
toast: {
|
|
2192
|
-
type: 'warning',
|
|
2193
|
-
content: t('card.action.tui_ipc_failed', undefined, localeForBot(ds.larkAppId)),
|
|
2194
|
-
},
|
|
2195
|
-
};
|
|
2196
|
-
}
|
|
2197
|
-
logger.info(`[${tag(ds)}] TUI keys: [${allKeys.join(',')}] final=${effectiveFinal} rearmStuck=${isStuckWarningEnter} stuckNonce=${stuckNonce ?? 'none'} — "${selectedText}"`);
|
|
2198
|
-
}
|
|
2199
|
-
if ((isFinal || isFinalStuck) && dispatchedKeys) {
|
|
2200
|
-
const resolveText = isActiveTuiCard && ds.tuiToggledIndices?.length
|
|
2201
|
-
? ds.tuiToggledIndices.map(i => ds.tuiPromptOptions?.[i]?.text).filter(Boolean).join(', ')
|
|
2202
|
-
: selectedText;
|
|
2203
|
-
const finalText = resolveText || selectedText;
|
|
2204
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2205
|
-
// For a stuck-warning card, do NOT clear authority or render success
|
|
2206
|
-
// here. The worker may still reject the keys (stale screen). We show a
|
|
2207
|
-
// "processing" state to block duplicate clicks, and wait for the
|
|
2208
|
-
// worker's tui_keys_delivered (success), stuck_warning_expired
|
|
2209
|
-
// ("page changed, not sent"), or tui_prompt_submit_failed ACK before
|
|
2210
|
-
// resolving the card.
|
|
2211
|
-
if (isActiveStuckCard) {
|
|
2212
|
-
if (cardMessageId) {
|
|
2213
|
-
const processingCard = buildTuiPromptProcessingCard('处理中…', locDs);
|
|
2214
|
-
updateMessage(ds.larkAppId, cardMessageId, processingCard).catch(err => logger.debug(`[${tag(ds)}] Failed to set stuck-warning card to processing: ${err}`));
|
|
2215
|
-
}
|
|
2216
|
-
publishAttentionPatch(ds);
|
|
2217
|
-
try {
|
|
2218
|
-
return JSON.parse(buildTuiPromptProcessingCard('处理中…', locDs));
|
|
2219
|
-
}
|
|
2220
|
-
catch { /* fall through */ }
|
|
2221
|
-
}
|
|
2222
|
-
// Normal TUI prompt cards also remain in processing until the worker
|
|
2223
|
-
// confirms backend delivery via tui_prompt_resolved. A worker/backend
|
|
2224
|
-
// rejection produces tui_prompt_submit_failed instead.
|
|
2225
|
-
publishAttentionPatch(ds);
|
|
2226
|
-
try {
|
|
2227
|
-
return JSON.parse(buildTuiPromptProcessingCard(finalText, locDs));
|
|
2228
|
-
}
|
|
2229
|
-
catch { /* fall through */ }
|
|
2230
|
-
}
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
if (actionType === 'tui_text_input' && ds) {
|
|
2234
|
-
if (isSessionTransferring(ds)) {
|
|
2235
|
-
return {
|
|
2236
|
-
toast: {
|
|
2237
|
-
type: 'warning',
|
|
2238
|
-
content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)),
|
|
2239
|
-
},
|
|
2240
|
-
};
|
|
2241
|
-
}
|
|
2242
|
-
const inputTextRaw = action?.form_value?.tui_custom_input;
|
|
2243
|
-
const inputText = typeof inputTextRaw === 'string' ? inputTextRaw : '';
|
|
2244
|
-
let inputKeys = [];
|
|
2245
|
-
try {
|
|
2246
|
-
inputKeys = JSON.parse(value?.input_keys ?? '[]');
|
|
2247
|
-
}
|
|
2248
|
-
catch { /* bad json */ }
|
|
2249
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2250
|
-
const isActiveTuiCard = !!ds.tuiPromptCardId && cardMessageId === ds.tuiPromptCardId;
|
|
2251
|
-
if (!isActiveTuiCard) {
|
|
2252
|
-
logger.info(`[${tag(ds)}] tui_text_input from stale card ${cardMessageId} — ignored`);
|
|
2253
|
-
return;
|
|
2254
|
-
}
|
|
2255
|
-
if (ds.tuiPromptProcessing) {
|
|
2256
|
-
logger.info(`[${tag(ds)}] Duplicate TUI text input — dropped (processing already in flight)`);
|
|
2257
|
-
return;
|
|
2258
|
-
}
|
|
2259
|
-
if (!ds.worker || !inputText || inputKeys.length === 0) {
|
|
2260
|
-
logger.info(`[${tag(ds)}] TUI text input not dispatched ` +
|
|
2261
|
-
`(worker=${!!ds.worker}, text=${!!inputText}, keys=${inputKeys.length})`);
|
|
2262
|
-
return {
|
|
2263
|
-
toast: {
|
|
2264
|
-
type: 'warning',
|
|
2265
|
-
content: t('card.action.tui_ipc_failed', undefined, locDs),
|
|
2266
|
-
},
|
|
2267
|
-
};
|
|
2268
|
-
}
|
|
2269
|
-
// Atomic IPC — worker handles keys + text in one flow to avoid race
|
|
2270
|
-
ds.tuiPromptProcessing = true;
|
|
2271
|
-
try {
|
|
2272
|
-
await sendWorkerIpc(ds.worker, {
|
|
2273
|
-
type: 'tui_text_input',
|
|
2274
|
-
keys: inputKeys,
|
|
2275
|
-
text: inputText,
|
|
2276
|
-
cardMessageId,
|
|
2277
|
-
});
|
|
2278
|
-
}
|
|
2279
|
-
catch (err) {
|
|
2280
|
-
ds.tuiPromptProcessing = false;
|
|
2281
|
-
logger.warn(`[${tag(ds)}] TUI text IPC delivery failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
2282
|
-
return {
|
|
2283
|
-
toast: {
|
|
2284
|
-
type: 'warning',
|
|
2285
|
-
content: t('card.action.tui_ipc_failed', undefined, locDs),
|
|
2286
|
-
},
|
|
2287
|
-
};
|
|
2288
|
-
}
|
|
2289
|
-
logger.info(`[${tag(ds)}] TUI text input: "${inputText}" (keys: ${JSON.stringify(inputKeys)})`);
|
|
2290
|
-
publishAttentionPatch(ds);
|
|
2291
|
-
try {
|
|
2292
|
-
return JSON.parse(buildTuiPromptProcessingCard(inputText, locDs));
|
|
2293
|
-
}
|
|
2294
|
-
catch { /* fall through */ }
|
|
2295
|
-
}
|
|
2296
|
-
// Compatibility path for cards emitted before open_local_cli was introduced.
|
|
2297
|
-
// The opt-in/capability guard still applies so old cards cannot bypass the
|
|
2298
|
-
// default-off continuity protection. Clicks read the current mode: attach
|
|
2299
|
-
// mode uses exact backend attach with no fallback; resume mode uses the same
|
|
2300
|
-
// precise resume preflight and also fails closed when unsupported.
|
|
2301
|
-
if (actionType === 'open_local_terminal') {
|
|
2302
|
-
const locDs = localeForBot(ds?.larkAppId ?? larkAppId);
|
|
2303
|
-
if (!ds) {
|
|
2304
|
-
return { toast: { type: 'warning', content: t('card.action.session_gone', undefined, locDs) } };
|
|
2305
|
-
}
|
|
2306
|
-
const blocked = guardLocalCliOpen(ds, locDs);
|
|
2307
|
-
if (blocked)
|
|
2308
|
-
return blocked;
|
|
2309
|
-
return launchLocalCli(ds, locDs);
|
|
2310
|
-
}
|
|
2311
|
-
if (actionType === 'get_write_link' && ds && operatorOpenId) {
|
|
2312
|
-
const effectiveCliId = sessionCliId(ds);
|
|
2313
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2314
|
-
if (!sessionSupportsWebTerminal(ds)) {
|
|
2315
|
-
// Old cards can retain a get_write_link callback and stale port/token
|
|
2316
|
-
// fields after the session is restored onto ZMX. This is a permanent
|
|
2317
|
-
// backend capability boundary, not a transient startup delay.
|
|
2318
|
-
const unsupportedCard = JSON.stringify({
|
|
2319
|
-
config: { wide_screen_mode: true },
|
|
2320
|
-
elements: [{ tag: 'markdown', content: t('card.action.terminal_unsupported', undefined, locDs) }],
|
|
2321
|
-
});
|
|
2322
|
-
await deliverEphemeralOrReply(ds, operatorOpenId, unsupportedCard, 'interactive', () => sessionReply(rootId, unsupportedCard, 'interactive'));
|
|
2323
|
-
return;
|
|
2324
|
-
}
|
|
2325
|
-
if (sessionSupportsWebTerminal(ds) && (ds.riffAccessUrl || (ds.workerPort && ds.workerToken))) {
|
|
2326
|
-
const writeUrl = buildTerminalUrl(ds, { write: true });
|
|
2327
|
-
const cardJson = buildSessionCard(ds.session.sessionId, sessionAnchorId(ds), writeUrl, ds.session.title || getCliDisplayName(effectiveCliId), effectiveCliId, true, // showManageButtons — write-link card includes restart & close
|
|
2328
|
-
!!ds.adoptedFrom, // adoptMode — disconnect, never close-the-CLI
|
|
2329
|
-
locDs, isLocalCliOpenReady(ds, { cliId: effectiveCliId }), sessionRuntimeDisplayName(ds));
|
|
2330
|
-
// 普通群发「仅自己可见」私密卡,话题群 / 单聊自动回退私聊 DM(两条通道都私密,
|
|
2331
|
-
// 不泄露写入 token)。fire-and-forget,保持卡片回调快速返回。
|
|
2332
|
-
void deliverWriteLinkCard(ds, operatorOpenId, cardJson);
|
|
2333
|
-
// 乐观回执:投递是异步的(话题群要先 ephemeral 失败再 DM,两次往返 await 容易
|
|
2334
|
-
// 超过 2500ms 的 ACK 窗口而被丢弃),点完立即弹 toast,让用户知道链接已私密发出。
|
|
2335
|
-
return { toast: { type: 'success', content: t('card.action.write_link_sent', undefined, locDs) } };
|
|
2336
|
-
}
|
|
2337
|
-
else {
|
|
2338
|
-
// 普通群发「仅自己可见」私密卡;话题群 / 单聊不支持 ephemeral,回退为同样内容的
|
|
2339
|
-
// 卡片回复(而非纯文本),三种场景都渲染成卡片,行为不变。
|
|
2340
|
-
const notReadyCard = JSON.stringify({
|
|
2341
|
-
config: { wide_screen_mode: true },
|
|
2342
|
-
elements: [{ tag: 'markdown', content: t('card.action.terminal_not_ready', undefined, locDs) }],
|
|
2343
|
-
});
|
|
2344
|
-
await deliverEphemeralOrReply(ds, operatorOpenId, notReadyCard, 'interactive', () => sessionReply(rootId, notReadyCard, 'interactive'));
|
|
2345
|
-
}
|
|
2346
|
-
}
|
|
2347
|
-
// Display toggle: hidden ↔ screenshot. 'toggle_stream' is the legacy alias
|
|
2348
|
-
// from pre-screenshot cards and is mapped to toggle_display semantics.
|
|
2349
|
-
if (actionType === 'toggle_display' || actionType === 'toggle_stream') {
|
|
2350
|
-
if (!ds) {
|
|
2351
|
-
// 同 close:会话已不在线时「显示 / 隐藏输出」静默无反应 → 给失败 toast(成功不弹)。
|
|
2352
|
-
return { toast: { type: 'warning', content: t('card.action.session_gone', undefined, localeForBot(larkAppId)) } };
|
|
2353
|
-
}
|
|
2354
|
-
const clickedNonce = value?.card_nonce;
|
|
2355
|
-
const isFrozenClick = clickedNonce && ds.streamCardNonce && clickedNonce !== ds.streamCardNonce;
|
|
2356
|
-
const nextMode = (current) => current === 'hidden' ? 'screenshot' : 'hidden';
|
|
2357
|
-
if (isFrozenClick) {
|
|
2358
|
-
// Historical card — toggle using cached state
|
|
2359
|
-
if (!ds.frozenCards)
|
|
2360
|
-
ds.frozenCards = loadFrozenCards(ds.session.sessionId);
|
|
2361
|
-
const frozen = ds.frozenCards.get(clickedNonce);
|
|
2362
|
-
if (!frozen) {
|
|
2363
|
-
// The clicked card can predate the frozen-card cache for the current
|
|
2364
|
-
// active session (e.g. a stale Worker card whose session_id/card_nonce
|
|
2365
|
-
// came from a now-closed session). Migrate the visible card to the
|
|
2366
|
-
// current root session/CLI instead of leaving stale terminal URL/chrome.
|
|
2367
|
-
const effectiveCliId = sessionCliId(ds);
|
|
2368
|
-
const cur = ds.displayMode ?? 'hidden';
|
|
2369
|
-
const next = nextMode(cur);
|
|
2370
|
-
ds.displayMode = next;
|
|
2371
|
-
persistStreamCardState(ds);
|
|
2372
|
-
if (ds.worker || isSessionTransferring(ds)) {
|
|
2373
|
-
sendWorkerSessionInput(ds, { type: 'set_display_mode', mode: next });
|
|
2374
|
-
}
|
|
2375
|
-
if (cardMessageId && workerHasInitialized(ds)) {
|
|
2376
|
-
const readUrl = readableTerminalUrlFor(ds);
|
|
2377
|
-
const turnTitle = ds.currentTurnTitle || ds.session.title || getCliDisplayName(effectiveCliId);
|
|
2378
|
-
const cardJson = buildStreamingCard(ds.session.sessionId, sessionAnchorId(ds), readUrl, turnTitle, ds.lastScreenContent || '', ds.lastScreenStatus || 'working', effectiveCliId, next, ds.streamCardNonce, ds.currentImageKey, !!ds.adoptedFrom, false, localeForBot(ds.larkAppId), cardUsageLimit(ds), writableTerminalLinkFor(ds), isLocalCliOpenReady(ds, { cliId: effectiveCliId }), getDaemonStreamingCardUsageSnapshot(ds, effectiveCliId), sessionRuntimeDisplayName(ds), codexServiceTierBadge(effectiveCliId, ds.codexServiceTier));
|
|
2379
|
-
updateMessage(ds.larkAppId, cardMessageId, cardJson).catch(err => logger.debug(`[${tag(ds)}] Failed to migrate unknown frozen card: ${err}`));
|
|
2380
|
-
logger.info(`[${tag(ds)}] Migrated unknown frozen card to ${next} (legacy nonce=${clickedNonce})`);
|
|
2381
|
-
try {
|
|
2382
|
-
return JSON.parse(cardJson);
|
|
2383
|
-
}
|
|
2384
|
-
catch { /* fall through */ }
|
|
2385
|
-
}
|
|
2386
|
-
logger.debug(`[${tag(ds)}] Toggle on unknown frozen card could not migrate: nonce=${clickedNonce}`);
|
|
2387
|
-
return;
|
|
2388
|
-
}
|
|
2389
|
-
// Self-heal known historical cards by migrating the clicked card to the
|
|
2390
|
-
// current live session/CLI instead of rebuilding from cached frozen
|
|
2391
|
-
// title/content/imageKey. The cache may have been persisted while this
|
|
2392
|
-
// thread was bound to a different CLI (or before cli_id existed), and
|
|
2393
|
-
// reusing its imageKey is exactly what makes a second click snap back to
|
|
2394
|
-
// an old Claude Code screenshot.
|
|
2395
|
-
const cur = ds.displayMode ?? frozenDisplayMode(frozen);
|
|
2396
|
-
const next = nextMode(cur);
|
|
2397
|
-
ds.displayMode = next;
|
|
2398
|
-
persistStreamCardState(ds);
|
|
2399
|
-
if (ds.worker || isSessionTransferring(ds)) {
|
|
2400
|
-
sendWorkerSessionInput(ds, { type: 'set_display_mode', mode: next });
|
|
2401
|
-
}
|
|
2402
|
-
const effectiveCliId = sessionCliId(ds);
|
|
2403
|
-
const readUrl = readableTerminalUrlFor(ds);
|
|
2404
|
-
const turnTitle = ds.currentTurnTitle || ds.session.title || getCliDisplayName(effectiveCliId);
|
|
2405
|
-
const cardJson = buildStreamingCard(ds.session.sessionId, sessionAnchorId(ds), readUrl, turnTitle, ds.lastScreenContent || '', ds.lastScreenStatus || 'working', effectiveCliId, next, ds.streamCardNonce, ds.currentImageKey, !!ds.adoptedFrom, false, localeForBot(ds.larkAppId), cardUsageLimit(ds), writableTerminalLinkFor(ds), isLocalCliOpenReady(ds, { cliId: effectiveCliId }), getDaemonStreamingCardUsageSnapshot(ds, effectiveCliId), sessionRuntimeDisplayName(ds), effectiveCliId === 'codex' ? frozen.codexServiceTierBadge : undefined);
|
|
2406
|
-
updateMessage(ds.larkAppId, frozen.messageId, cardJson).catch(err => logger.debug(`[${tag(ds)}] Failed to migrate frozen card: ${err}`));
|
|
2407
|
-
ds.frozenCards.delete(clickedNonce);
|
|
2408
|
-
saveFrozenCards(ds.session.sessionId, ds.frozenCards);
|
|
2409
|
-
logger.info(`[${tag(ds)}] Migrated frozen card to current ${next} (legacy nonce=${clickedNonce})`);
|
|
2410
|
-
try {
|
|
2411
|
-
return JSON.parse(cardJson);
|
|
2412
|
-
}
|
|
2413
|
-
catch { /* fall through */ }
|
|
2414
|
-
return;
|
|
2415
|
-
}
|
|
2416
|
-
// Current (latest) card — change displayMode + tell worker
|
|
2417
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
2418
|
-
const effectiveCliId = sessionCliId(ds);
|
|
2419
|
-
const cur = ds.displayMode ?? 'hidden';
|
|
2420
|
-
const next = nextMode(cur);
|
|
2421
|
-
ds.displayMode = next;
|
|
2422
|
-
persistStreamCardState(ds);
|
|
2423
|
-
if (ds.worker || isSessionTransferring(ds)) {
|
|
2424
|
-
sendWorkerSessionInput(ds, { type: 'set_display_mode', mode: next });
|
|
2425
|
-
}
|
|
2426
|
-
if (ds.streamCardId && workerHasInitialized(ds)) {
|
|
2427
|
-
const readUrl = readableTerminalUrlFor(ds);
|
|
2428
|
-
const turnTitle = ds.currentTurnTitle || ds.session.title || getCliDisplayName(effectiveCliId);
|
|
2429
|
-
const cardJson = buildStreamingCard(ds.session.sessionId, sessionAnchorId(ds), readUrl, turnTitle, ds.lastScreenContent || '', ds.lastScreenStatus || 'working', effectiveCliId, next, ds.streamCardNonce, ds.currentImageKey, !!ds.adoptedFrom, false, localeForBot(ds.larkAppId), cardUsageLimit(ds), writableTerminalLinkFor(ds), isLocalCliOpenReady(ds, { cliId: effectiveCliId }), getDaemonStreamingCardUsageSnapshot(ds, effectiveCliId), sessionRuntimeDisplayName(ds), codexServiceTierBadge(effectiveCliId, ds.codexServiceTier));
|
|
2430
|
-
if (cardMessageId && cardMessageId !== ds.streamCardId) {
|
|
2431
|
-
updateMessage(ds.larkAppId, cardMessageId, cardJson).catch(err => logger.debug(`[${tag(ds)}] Failed to migrate clicked legacy card: ${err}`));
|
|
2432
|
-
}
|
|
2433
|
-
else {
|
|
2434
|
-
scheduleCardPatch(ds, cardJson);
|
|
2435
|
-
}
|
|
2436
|
-
logger.info(`[${tag(ds)}] Display mode → ${next}`);
|
|
2437
|
-
try {
|
|
2438
|
-
return JSON.parse(cardJson);
|
|
2439
|
-
}
|
|
2440
|
-
catch { /* fall through */ }
|
|
2441
|
-
}
|
|
2442
|
-
logger.info(`[${tag(ds)}] Display mode → ${next}`);
|
|
2443
|
-
return;
|
|
2444
|
-
}
|
|
2445
|
-
// Export current terminal text as a thread reply. One-shot action — the
|
|
2446
|
-
// card body itself stays in screenshot mode. For frozen cards, export
|
|
2447
|
-
// from the cached frozen content; for the live card, use ds.lastScreenContent.
|
|
2448
|
-
if (actionType === 'export_text' && ds) {
|
|
2449
|
-
const clickedNonce = value?.card_nonce;
|
|
2450
|
-
const isFrozenClick = clickedNonce && ds.streamCardNonce && clickedNonce !== ds.streamCardNonce;
|
|
2451
|
-
let content = '';
|
|
2452
|
-
if (isFrozenClick) {
|
|
2453
|
-
if (!ds.frozenCards)
|
|
2454
|
-
ds.frozenCards = loadFrozenCards(ds.session.sessionId);
|
|
2455
|
-
content = ds.frozenCards.get(clickedNonce)?.content ?? '';
|
|
2456
|
-
}
|
|
2457
|
-
else {
|
|
2458
|
-
content = ds.lastScreenContent ?? '';
|
|
2459
|
-
}
|
|
2460
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2461
|
-
const body = content.trim() ? truncateContent(content, locDs) : t('card.action.no_output', undefined, locDs);
|
|
2462
|
-
await sessionReply(sessionAnchorId(ds), body);
|
|
2463
|
-
logger.info(`[${tag(ds)}] Exported terminal text (${body.length} chars)`);
|
|
2464
|
-
return;
|
|
2465
|
-
}
|
|
2466
|
-
// Manual screenshot refresh — force immediate capture bypassing 10s interval + hash dedup.
|
|
2467
|
-
if (actionType === 'refresh_screenshot' && ds) {
|
|
2468
|
-
if (ds.worker || isSessionTransferring(ds)) {
|
|
2469
|
-
sendWorkerSessionInput(ds, { type: 'refresh_screen' });
|
|
2470
|
-
logger.info(`[${tag(ds)}] Manual screenshot refresh`);
|
|
2471
|
-
}
|
|
2472
|
-
// Return the current card JSON so Feishu doesn't revert the displayed
|
|
2473
|
-
// image to the originally-POSTed initial frame while waiting for the
|
|
2474
|
-
// fresh screenshot PATCH (~1s).
|
|
2475
|
-
if (ds.streamCardId && ds.streamCardId !== CARD_POSTING_SENTINEL && workerHasInitialized(ds)) {
|
|
2476
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
2477
|
-
const effectiveCliId = sessionCliId(ds);
|
|
2478
|
-
const readUrl = readableTerminalUrlFor(ds);
|
|
2479
|
-
const turnTitle = ds.currentTurnTitle || ds.session.title || getCliDisplayName(effectiveCliId);
|
|
2480
|
-
const cardJson = buildStreamingCard(ds.session.sessionId, sessionAnchorId(ds), readUrl, turnTitle, ds.lastScreenContent || '', ds.lastScreenStatus || 'working', effectiveCliId, ds.displayMode ?? 'screenshot', ds.streamCardNonce, ds.currentImageKey, !!ds.adoptedFrom, false, localeForBot(ds.larkAppId), cardUsageLimit(ds), writableTerminalLinkFor(ds), isLocalCliOpenReady(ds, { cliId: effectiveCliId }), getDaemonStreamingCardUsageSnapshot(ds, effectiveCliId), sessionRuntimeDisplayName(ds), codexServiceTierBadge(effectiveCliId, ds.codexServiceTier));
|
|
2481
|
-
if (cardMessageId && cardMessageId !== ds.streamCardId) {
|
|
2482
|
-
updateMessage(ds.larkAppId, cardMessageId, cardJson).catch(err => logger.debug(`[${tag(ds)}] Failed to migrate clicked legacy card: ${err}`));
|
|
2483
|
-
}
|
|
2484
|
-
try {
|
|
2485
|
-
return JSON.parse(cardJson);
|
|
2486
|
-
}
|
|
2487
|
-
catch { /* fall through */ }
|
|
2488
|
-
}
|
|
2489
|
-
return;
|
|
2490
|
-
}
|
|
2491
|
-
// Quick-action keys (Esc, ^C, Tab, Space, Enter, ←↑↓→, ½ page) — forward to worker.
|
|
2492
|
-
if (actionType === 'term_action' && ds) {
|
|
2493
|
-
if (isSessionTransferring(ds)) {
|
|
2494
|
-
return {
|
|
2495
|
-
toast: {
|
|
2496
|
-
type: 'warning',
|
|
2497
|
-
content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)),
|
|
2498
|
-
},
|
|
2499
|
-
};
|
|
2500
|
-
}
|
|
2501
|
-
const key = value?.key;
|
|
2502
|
-
if (!key)
|
|
2503
|
-
return;
|
|
2504
|
-
if (ds.worker) {
|
|
2505
|
-
sendWorkerSessionInput(ds, { type: 'term_action', key });
|
|
2506
|
-
logger.info(`[${tag(ds)}] term_action: ${key}`);
|
|
2507
|
-
}
|
|
2508
|
-
if (ds.streamCardId && ds.streamCardId !== CARD_POSTING_SENTINEL && workerHasInitialized(ds)) {
|
|
2509
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
2510
|
-
const effectiveCliId = sessionCliId(ds);
|
|
2511
|
-
const readUrl = readableTerminalUrlFor(ds);
|
|
2512
|
-
const turnTitle = ds.currentTurnTitle || ds.session.title || getCliDisplayName(effectiveCliId);
|
|
2513
|
-
const cardJson = buildStreamingCard(ds.session.sessionId, sessionAnchorId(ds), readUrl, turnTitle, ds.lastScreenContent || '', ds.lastScreenStatus || 'working', effectiveCliId, ds.displayMode ?? 'screenshot', ds.streamCardNonce, ds.currentImageKey, !!ds.adoptedFrom, false, localeForBot(ds.larkAppId), cardUsageLimit(ds), writableTerminalLinkFor(ds), isLocalCliOpenReady(ds, { cliId: effectiveCliId }), getDaemonStreamingCardUsageSnapshot(ds, effectiveCliId), sessionRuntimeDisplayName(ds), codexServiceTierBadge(effectiveCliId, ds.codexServiceTier));
|
|
2514
|
-
try {
|
|
2515
|
-
return JSON.parse(cardJson);
|
|
2516
|
-
}
|
|
2517
|
-
catch { /* fall through */ }
|
|
2518
|
-
}
|
|
2519
|
-
return;
|
|
2520
|
-
}
|
|
2521
|
-
if (actionType === 'skip_repo' && ds) {
|
|
2522
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2523
|
-
// Only the live posted card may act — covers consumed, wrong card, and
|
|
2524
|
-
// post-restart (repoCardMessageId is in-memory and empty after reboot).
|
|
2525
|
-
if (cardMessageId && !isActiveRepoCard(ds, cardMessageId)) {
|
|
2526
|
-
return { toast: { type: 'info', content: t('cmd.repo.card_already_consumed', undefined, locDs) } };
|
|
2527
|
-
}
|
|
2528
|
-
if (ds.pendingRepo) {
|
|
2529
|
-
if (ds.worktreeCreating || ds.pendingRepoCommitInFlight) {
|
|
2530
|
-
return { toast: { type: 'info', content: t('cmd.repo.worktree_in_progress', undefined, locDs) } };
|
|
2531
|
-
}
|
|
2532
|
-
const cwd = getSessionWorkingDir(ds);
|
|
2533
|
-
// Reuse the same claimed pending->worker transition as a normal repo
|
|
2534
|
-
// selection. This keeps buffering active across prompt preparation and
|
|
2535
|
-
// makes skip/select races single-winner. Do NOT pin the resolved default
|
|
2536
|
-
// cwd (often $HOME) onto session.workingDir — that would let sibling
|
|
2537
|
-
// bots inherit HOME instead of getting their own repo card. Confirmation
|
|
2538
|
-
// + card withdraw run under the claim inside commitRepoSelection.
|
|
2539
|
-
await commitRepoSelection({ ds, rootId, cardMessageId, larkAppId, operatorOpenId, activeSessions, sessionReply }, cwd, pathBasename(cwd) || cwd, {
|
|
2540
|
-
suppressConfirmReply: true,
|
|
2541
|
-
confirmReplyText: t('cmd.skip.opened', { cwd }, locDs),
|
|
2542
|
-
pinWorkingDir: false,
|
|
2543
|
-
});
|
|
2544
|
-
if (!ds.pendingRepo) {
|
|
2545
|
-
logger.info(`[${tag(ds)}] Skip repo, spawning CLI in ${cwd}`);
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
else {
|
|
2549
|
-
await sessionReply(rootId, t('card.action.continue_using_current_repo', { cwd: getSessionWorkingDir(ds) }, locDs));
|
|
2550
|
-
deferRepoCardWithdraw(larkAppId, cardMessageId);
|
|
2551
|
-
ds.repoCardMessageId = undefined;
|
|
2552
|
-
}
|
|
2553
|
-
}
|
|
2554
|
-
// Manual working-directory entry from the repo card form. The project scan
|
|
2555
|
-
// may not surface every useful directory; this mirrors `/repo <path>` from
|
|
2556
|
-
// the card. Permission is gated at the top (isSensitive + pendingRepoOwner
|
|
2557
|
-
// exception), same as skip_repo. Always a plain commit — worktree creation
|
|
2558
|
-
// needs a scanned git repo root, not an arbitrary path.
|
|
2559
|
-
if (actionType === 'repo_manual_submit' && ds) {
|
|
2560
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2561
|
-
if (cardMessageId && !isActiveRepoCard(ds, cardMessageId)) {
|
|
2562
|
-
return { toast: { type: 'info', content: t('cmd.repo.card_already_consumed', undefined, locDs) } };
|
|
2563
|
-
}
|
|
2564
|
-
const rawPath = String(action?.form_value?.repo_manual_path ?? '').trim();
|
|
2565
|
-
if (!rawPath) {
|
|
2566
|
-
return { toast: { type: 'error', content: t('card.repo.manual_empty', undefined, locDs) } };
|
|
2567
|
-
}
|
|
2568
|
-
const validation = validateWorkingDir(rawPath, locDs);
|
|
2569
|
-
if (!validation.ok) {
|
|
2570
|
-
return { toast: { type: 'error', content: validation.error } };
|
|
2571
|
-
}
|
|
2572
|
-
// A worktree creation in flight holds the commit lock — a manual switch
|
|
2573
|
-
// interleaving there would double-fork (same guard as the plain switch).
|
|
2574
|
-
if (ds.worktreeCreating || ds.pendingRepoCommitInFlight) {
|
|
2575
|
-
return { toast: { type: 'info', content: t('cmd.repo.worktree_in_progress', undefined, locDs) } };
|
|
2576
|
-
}
|
|
2577
|
-
const selectedPath = validation.resolvedPath;
|
|
2578
|
-
const displayName = pathBasename(selectedPath) || selectedPath;
|
|
2579
|
-
await commitRepoSelection({ ds, rootId, cardMessageId, larkAppId, operatorOpenId, activeSessions, sessionReply }, selectedPath, displayName);
|
|
2580
|
-
}
|
|
2581
|
-
if (actionType === 'worktree_toggle_mode' && ds) {
|
|
2582
|
-
// Flip the persisted per-bot worktree picker mode (single ⇄ multi), then
|
|
2583
|
-
// re-send a fresh repo card in the new mode — a form can't ride an
|
|
2584
|
-
// in-place patch, so the old card is withdrawn and a new one posted.
|
|
2585
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2586
|
-
// Same active-card gate as skip/manual/worktree: a stale card must not
|
|
2587
|
-
// flip bot config or replace the live repo card after claim/restart.
|
|
2588
|
-
if (cardMessageId && !isActiveRepoCard(ds, cardMessageId)) {
|
|
2589
|
-
return { toast: { type: 'info', content: t('cmd.repo.card_already_consumed', undefined, locDs) } };
|
|
2590
|
-
}
|
|
2591
|
-
const spec = findConfigField('worktreeMultiPicker');
|
|
2592
|
-
if (!spec)
|
|
2593
|
-
return;
|
|
2594
|
-
const next = getBot(ds.larkAppId).config.worktreeMultiPicker !== true;
|
|
2595
|
-
const r = await applyConfigField(ds.larkAppId, spec, next);
|
|
2596
|
-
if (!r.ok)
|
|
2597
|
-
return { toast: { type: 'error', content: t('cmd.config.write_failed', { reason: r.reason }, locDs) } };
|
|
2598
|
-
const projects = lastRepoScan.get(ds.chatId) ?? [];
|
|
2599
|
-
// await so a rejected delete is caught here (not an unhandled rejection);
|
|
2600
|
-
// a missing/already-gone card is fine — we post the fresh one regardless.
|
|
2601
|
-
if (ds.repoCardMessageId && ds.larkAppId) {
|
|
2602
|
-
try {
|
|
2603
|
-
await deleteMessage(ds.larkAppId, ds.repoCardMessageId);
|
|
2604
|
-
}
|
|
2605
|
-
catch { /* card already gone */ }
|
|
2606
|
-
}
|
|
2607
|
-
const newCard = buildRepoSelectCard(projects, getSessionWorkingDir(ds), rootId, locDs, next);
|
|
2608
|
-
ds.repoCardMessageId = await sessionReply(rootId, newCard, 'interactive');
|
|
2609
|
-
return { toast: { type: 'info', content: t(next ? 'card.repo.toast_worktree_mode_switched' : 'card.repo.toast_worktree_mode_switched_back', undefined, locDs) } };
|
|
2610
|
-
}
|
|
2611
|
-
if (actionType === 'repo_worktree_submit' && ds) {
|
|
2612
|
-
const locDs = localeForBot(ds.larkAppId);
|
|
2613
|
-
if (cardMessageId && !isActiveRepoCard(ds, cardMessageId)) {
|
|
2614
|
-
return { toast: { type: 'info', content: t('cmd.repo.card_already_consumed', undefined, locDs) } };
|
|
2615
|
-
}
|
|
2616
|
-
const selectedPaths = stringListFromLarkMultiSelect(action?.form_value?.repo_worktree_paths);
|
|
2617
|
-
if (selectedPaths.length === 0) {
|
|
2618
|
-
return { toast: { type: 'error', content: t('card.repo.worktree_empty', undefined, locDs) } };
|
|
2619
|
-
}
|
|
2620
|
-
if (ds.worktreeCreating || ds.pendingRepoCommitInFlight) {
|
|
2621
|
-
return { toast: { type: 'info', content: t('cmd.repo.worktree_in_progress', undefined, locDs) } };
|
|
2622
|
-
}
|
|
2623
|
-
const branch = String(action?.form_value?.repo_worktree_branch ?? '').trim() || undefined;
|
|
2624
|
-
const multiParent = selectedPaths.length > 1
|
|
2625
|
-
? multiWorktreeParentPath(selectedPaths, branch ?? await worktreeSlugFromContextAI(ds.session.title, ds.pendingPrompt) ?? 'worktree')
|
|
2626
|
-
: undefined;
|
|
2627
|
-
if (multiParent) {
|
|
2628
|
-
const duplicateNames = duplicateMultiWorktreeChildNames(selectedPaths, lastRepoScan.get(ds.chatId));
|
|
2629
|
-
if (duplicateNames.length > 0) {
|
|
2630
|
-
return { toast: { type: 'error', content: t('card.repo.worktree_child_conflict', { names: duplicateNames.join(', ') }, locDs) } };
|
|
2631
|
-
}
|
|
2632
|
-
}
|
|
2633
|
-
const rootIdForAction = rootId;
|
|
2634
|
-
void handleCardAction({
|
|
2635
|
-
...data,
|
|
2636
|
-
action: {
|
|
2637
|
-
value: { key: 'repo_worktree', root_id: rootIdForAction, repo_worktree_paths_json: JSON.stringify(selectedPaths), ...(branch ? { branch } : {}), ...(multiParent ? { parent_path: multiParent } : {}) },
|
|
2638
|
-
option: selectedPaths[0],
|
|
2639
|
-
},
|
|
2640
|
-
}, deps, larkAppId);
|
|
2641
|
-
return { toast: { type: 'info', content: t('card.repo.toast_worktree_creating', undefined, locDs) } };
|
|
2642
|
-
}
|
|
2643
|
-
return;
|
|
2644
|
-
}
|
|
2645
|
-
// Handle dropdown selections (option-based)
|
|
2646
|
-
const option = action?.option;
|
|
2647
|
-
if (!option) {
|
|
2648
|
-
logger.warn('Card action received but no option or action value');
|
|
2649
|
-
return;
|
|
2650
|
-
}
|
|
2651
|
-
if (Array.isArray(option)) {
|
|
2652
|
-
logger.warn('Card action received multi options for a single-select handler');
|
|
2653
|
-
return;
|
|
2654
|
-
}
|
|
2655
|
-
if (typeof option !== 'string') {
|
|
2656
|
-
logger.warn('Card action received non-string option for a single-select handler');
|
|
2657
|
-
return;
|
|
2658
|
-
}
|
|
2659
|
-
// Handle adopt session selection
|
|
2660
|
-
if (action?.value?.key === 'codex_app_thread_select' && option) {
|
|
2661
|
-
const rootId = action?.value?.root_id;
|
|
2662
|
-
if (!rootId)
|
|
2663
|
-
return;
|
|
2664
|
-
const sKey = larkAppId ? sessionKey(rootId, larkAppId) : rootId;
|
|
2665
|
-
const ds = activeSessions.get(sKey);
|
|
2666
|
-
if (!ds)
|
|
2667
|
-
return;
|
|
2668
|
-
const sourceSession = ds.session;
|
|
2669
|
-
if (isSessionTransferring(ds)) {
|
|
2670
|
-
return { toast: { type: 'warning', content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)) } };
|
|
2671
|
-
}
|
|
2672
|
-
if (!canOperate(ds.larkAppId, ds.chatId, operatorOpenId)) {
|
|
2673
|
-
logger.info(`codex_app_thread_select blocked for non-operator user: ${operatorOpenId} (chat=${ds.chatId})`);
|
|
2674
|
-
return { toast: { type: 'error', content: t('card.grant.toast_no_repo_perm', undefined, localeForBot(ds.larkAppId)) } };
|
|
2675
|
-
}
|
|
2676
|
-
let selected;
|
|
2677
|
-
try {
|
|
2678
|
-
selected = JSON.parse(option);
|
|
2679
|
-
}
|
|
2680
|
-
catch {
|
|
2681
|
-
return;
|
|
2682
|
-
}
|
|
2683
|
-
if (!selected.threadId)
|
|
2684
|
-
return;
|
|
2685
|
-
const botCfg = getBot(ds.larkAppId).config;
|
|
2686
|
-
if (botCfg.cliId !== 'codex-app')
|
|
2687
|
-
return;
|
|
2688
|
-
const { listCodexAppThreads } = await import('../../services/codex-app-threads.js');
|
|
2689
|
-
let threads;
|
|
2690
|
-
try {
|
|
2691
|
-
threads = await listCodexAppThreads({
|
|
2692
|
-
codexBin: botCfg.cliPathOverride,
|
|
2693
|
-
cwd: getSessionWorkingDir(ds),
|
|
2694
|
-
limit: 80,
|
|
2695
|
-
});
|
|
2696
|
-
}
|
|
2697
|
-
catch (err) {
|
|
2698
|
-
await sessionReply(rootId, t('cmd.codex_app_adopt.list_failed', { error: err?.message ?? String(err) }, localeForBot(ds.larkAppId)));
|
|
2699
|
-
return;
|
|
2700
|
-
}
|
|
2701
|
-
if (ds.session !== sourceSession
|
|
2702
|
-
|| ds.session.status !== 'active'
|
|
2703
|
-
|| activeSessions.get(sKey) !== ds
|
|
2704
|
-
|| isSessionTransferring(ds)) {
|
|
2705
|
-
return { toast: { type: 'warning', content: t('cmd.session.transfer_in_progress', undefined, localeForBot(ds.larkAppId)) } };
|
|
2706
|
-
}
|
|
2707
|
-
const target = threads.find(t => t.threadId === selected.threadId);
|
|
2708
|
-
if (!target) {
|
|
2709
|
-
await sessionReply(rootId, t('cmd.codex_app_adopt.thread_not_found', { threadId: selected.threadId }, localeForBot(ds.larkAppId)));
|
|
2710
|
-
if (cardMessageId && larkAppId)
|
|
2711
|
-
deleteMessage(larkAppId, cardMessageId);
|
|
2712
|
-
return;
|
|
2713
|
-
}
|
|
2714
|
-
const { startCodexAppThreadSession } = await import('../../core/command-handler.js');
|
|
2715
|
-
await startCodexAppThreadSession(target, ds, { activeSessions, sessionReply: deps.sessionReply, getActiveCount: () => 0, lastRepoScan }, larkAppId);
|
|
2716
|
-
if (cardMessageId && larkAppId)
|
|
2717
|
-
deleteMessage(larkAppId, cardMessageId);
|
|
2718
|
-
return;
|
|
2719
|
-
}
|
|
2720
|
-
// Handle repo select card (option-based dropdowns: plain switch, or
|
|
2721
|
-
// `repo_worktree` = create a worktree from the picked repo and open that).
|
|
2722
|
-
// Require an explicit, recognized key: botmux's own dropdowns always set
|
|
2723
|
-
// `repo_switch` / `repo_worktree` (card-builder.ts). Treating a keyless
|
|
2724
|
-
// `option + root_id` as a plain switch let a hand-crafted card drive the
|
|
2725
|
-
// session's working dir to an arbitrary path — reject anything unrecognized.
|
|
2726
|
-
const repoKey = action?.value?.key;
|
|
2727
|
-
if (repoKey !== 'repo_switch' && repoKey !== 'repo_worktree') {
|
|
2728
|
-
logger.warn(`Card action: unrecognized repo dropdown key ${repoKey ?? '(none)'} — ignoring`);
|
|
2729
|
-
return;
|
|
2730
|
-
}
|
|
2731
|
-
const isWorktreeOpen = repoKey === 'repo_worktree';
|
|
2732
|
-
const selectedPath = option;
|
|
2733
|
-
const rootId = action?.value?.root_id;
|
|
2734
|
-
logger.info(`Card action: repo ${isWorktreeOpen ? 'worktree-open' : 'switch'} to ${selectedPath} (root_id: ${rootId})`);
|
|
2735
|
-
if (!rootId) {
|
|
2736
|
-
logger.warn('Card action: no root_id in action value');
|
|
2737
|
-
return;
|
|
2738
|
-
}
|
|
2739
|
-
const targetDs = larkAppId ? activeSessions.get(sessionKey(rootId, larkAppId)) : undefined;
|
|
2740
|
-
if (!targetDs) {
|
|
2741
|
-
logger.warn(`Card action: no active session found for root ${rootId}`);
|
|
2742
|
-
return;
|
|
2743
|
-
}
|
|
2744
|
-
// Only the live posted card may drive selection. Covers: already-consumed,
|
|
2745
|
-
// wrong/old card, and post-restart (repoCardMessageId is in-memory). Must
|
|
2746
|
-
// reject before mid-session switch can killWorker.
|
|
2747
|
-
if (cardMessageId && !isActiveRepoCard(targetDs, cardMessageId)) {
|
|
2748
|
-
return { toast: { type: 'info', content: t('cmd.repo.card_already_consumed', undefined, localeForBot(targetDs.larkAppId)) } };
|
|
2749
|
-
}
|
|
2750
|
-
// 权限边界:pendingRepo(首次选 repo 才能 spawn)放行「会话发起人 或 canOperate」,
|
|
2751
|
-
// 让本群授权用户能完成自己的首次使用;非 pending 的 mid-session 切换是管理动作,要 canOperate。
|
|
2752
|
-
const isSessionOwnerOp = !!operatorOpenId && operatorOpenId === targetDs.session.ownerOpenId;
|
|
2753
|
-
const allowRepo = targetDs.pendingRepo
|
|
2754
|
-
? (isSessionOwnerOp || canOperate(targetDs.larkAppId, targetDs.chatId, operatorOpenId))
|
|
2755
|
-
: canOperate(targetDs.larkAppId, targetDs.chatId, operatorOpenId);
|
|
2756
|
-
if (!allowRepo) {
|
|
2757
|
-
logger.info(`Repo card action blocked for ${operatorOpenId} (pending=${targetDs.pendingRepo})`);
|
|
2758
|
-
return { toast: { type: 'error', content: t('card.grant.toast_no_repo_perm', undefined, localeForBot(targetDs.larkAppId)) } };
|
|
2759
|
-
}
|
|
2760
|
-
// Resolve the project name from cached scan
|
|
2761
|
-
const cached = lastRepoScan.get(targetDs.chatId);
|
|
2762
|
-
const project = cached?.find(p => p.path === selectedPath);
|
|
2763
|
-
const displayName = project ? `${project.name} (${project.branch})` : selectedPath;
|
|
2764
|
-
let selectedWorktreePaths = [selectedPath];
|
|
2765
|
-
if (isWorktreeOpen && typeof action?.value?.repo_worktree_paths_json === 'string') {
|
|
2766
|
-
try {
|
|
2767
|
-
selectedWorktreePaths = stringListFromLarkMultiSelect(JSON.parse(action.value.repo_worktree_paths_json));
|
|
2768
|
-
}
|
|
2769
|
-
catch {
|
|
2770
|
-
selectedWorktreePaths = [];
|
|
2771
|
-
}
|
|
2772
|
-
if (selectedWorktreePaths.length === 0) {
|
|
2773
|
-
return { toast: { type: 'error', content: t('card.repo.worktree_empty', undefined, localeForBot(targetDs.larkAppId)) } };
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
const locTarget = localeForBot(targetDs.larkAppId);
|
|
2777
|
-
// `/close` deletes the active-map entry without touching sessionId or
|
|
2778
|
-
// pendingRepo — identity against the map is the only tell that the session
|
|
2779
|
-
// this flow captured is gone. Checked alongside the generation snapshots.
|
|
2780
|
-
const repoSessionKey = sessionKey(rootId, larkAppId);
|
|
2781
|
-
const sessionStillActive = () => activeSessions.get(repoSessionKey) === targetDs;
|
|
2782
|
-
// Shared commit context for a resolved directory — funnels the dropdown,
|
|
2783
|
-
// worktree and manual-entry flows through the same module-level
|
|
2784
|
-
// commitRepoSelection (pin dir, then fork pending CLI or close+recreate).
|
|
2785
|
-
const commitCtx = { ds: targetDs, rootId, cardMessageId, larkAppId, operatorOpenId, activeSessions, sessionReply };
|
|
2786
|
-
if (isWorktreeOpen) {
|
|
2787
|
-
// Worktree creation involves a `git fetch` that can take many seconds —
|
|
2788
|
-
// ack the card action immediately with a toast and finish asynchronously.
|
|
2789
|
-
// On failure the card (and pendingRepo state) stays put so the user can
|
|
2790
|
-
// pick again or fall back to a plain switch.
|
|
2791
|
-
if (targetDs.worktreeCreating || targetDs.pendingRepoCommitInFlight) {
|
|
2792
|
-
// The async path escapes the card-action in-flight dedup — gate repeats
|
|
2793
|
-
// here, or two creations would race and the loser's commitSelection
|
|
2794
|
-
// would yank the session the winner just spawned.
|
|
2795
|
-
return { toast: { type: 'info', content: t('cmd.repo.worktree_in_progress', undefined, locTarget) } };
|
|
2796
|
-
}
|
|
2797
|
-
const parentPath = action?.value?.parent_path;
|
|
2798
|
-
if (selectedWorktreePaths.length > 1 && parentPath) {
|
|
2799
|
-
const duplicateNames = duplicateMultiWorktreeChildNames(selectedWorktreePaths, cached);
|
|
2800
|
-
if (duplicateNames.length > 0) {
|
|
2801
|
-
return { toast: { type: 'error', content: t('card.repo.worktree_child_conflict', { names: duplicateNames.join(', ') }, locTarget) } };
|
|
2802
|
-
}
|
|
2803
|
-
}
|
|
2804
|
-
targetDs.worktreeCreating = true;
|
|
2805
|
-
// Session generation snapshot: if another selection lands while git runs
|
|
2806
|
-
// (pendingRepo consumed, or the session swapped), committing this worktree
|
|
2807
|
-
// afterwards would kill that fresh session — notify instead of switching.
|
|
2808
|
-
const startSessionId = targetDs.session.sessionId;
|
|
2809
|
-
const wasPending = !!targetDs.pendingRepo;
|
|
2810
|
-
const sessionChanged = () => !sessionStillActive() ||
|
|
2811
|
-
targetDs.session.sessionId !== startSessionId ||
|
|
2812
|
-
!!targetDs.pendingRepo !== wasPending;
|
|
2813
|
-
const notSwitched = async (creation, when) => {
|
|
2814
|
-
logger.info(`[${tag(targetDs)}] Worktree ${creation.path} created but session changed ${when} — not switching`);
|
|
2815
|
-
await sessionReply(rootId, t('cmd.repo.worktree_created_not_switched', { path: creation.path, branch: creation.branch }, locTarget));
|
|
2816
|
-
};
|
|
2817
|
-
void (async () => {
|
|
2818
|
-
try {
|
|
2819
|
-
let creation;
|
|
2820
|
-
// Track each successful (sourceRepo → created worktree) so a later repo's
|
|
2821
|
-
// failure in a multi-repo batch can roll the earlier ones back instead of
|
|
2822
|
-
// leaking orphaned worktree dirs/branches.
|
|
2823
|
-
const created = [];
|
|
2824
|
-
try {
|
|
2825
|
-
const branch = action?.value?.branch?.trim() || undefined;
|
|
2826
|
-
const slug = branch ? undefined : await worktreeSlugFromContextAI(targetDs.session.title, targetDs.pendingPrompt);
|
|
2827
|
-
for (const repoPath of selectedWorktreePaths) {
|
|
2828
|
-
const result = await createRepoWorktree(repoPath, {
|
|
2829
|
-
branch,
|
|
2830
|
-
slug,
|
|
2831
|
-
worktreePath: selectedWorktreePaths.length > 1 && parentPath
|
|
2832
|
-
? join(parentPath, worktreeChildNameForRepo(repoPath, cached))
|
|
2833
|
-
: undefined,
|
|
2834
|
-
});
|
|
2835
|
-
created.push({ repo: repoPath, result });
|
|
2836
|
-
}
|
|
2837
|
-
creation = selectedWorktreePaths.length > 1 && parentPath
|
|
2838
|
-
? {
|
|
2839
|
-
path: parentPath,
|
|
2840
|
-
branch: branch ?? created.map(c => c.result.branch).join(', '),
|
|
2841
|
-
baseRef: Array.from(new Set(created.map(c => c.result.baseRef))).join(', '),
|
|
2842
|
-
}
|
|
2843
|
-
: created[0].result;
|
|
2844
|
-
}
|
|
2845
|
-
catch (e) {
|
|
2846
|
-
// The repo that threw is the one right after the last success.
|
|
2847
|
-
const failedRepo = selectedWorktreePaths[created.length] ?? selectedPath;
|
|
2848
|
-
const errMsg = e instanceof Error ? e.message : String(e);
|
|
2849
|
-
logger.warn(`[${tag(targetDs)}] Worktree creation failed for ${failedRepo}: ${errMsg}`);
|
|
2850
|
-
let rolledBack = 0;
|
|
2851
|
-
for (const c of created) {
|
|
2852
|
-
try {
|
|
2853
|
-
await removeRepoWorktree(c.repo, c.result.path);
|
|
2854
|
-
rolledBack++;
|
|
2855
|
-
}
|
|
2856
|
-
catch (re) {
|
|
2857
|
-
logger.warn(`[${tag(targetDs)}] rollback of ${c.result.path} failed: ${re instanceof Error ? re.message : re}`);
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
await sessionReply(rootId, rolledBack > 0
|
|
2861
|
-
? t('card.repo.worktree_rolled_back', { repo: pathBasename(failedRepo), error: errMsg, count: rolledBack }, locTarget)
|
|
2862
|
-
: t('cmd.repo.worktree_failed', { error: errMsg }, locTarget));
|
|
2863
|
-
return;
|
|
2864
|
-
}
|
|
2865
|
-
if (sessionChanged())
|
|
2866
|
-
return notSwitched(creation, 'mid-flight');
|
|
2867
|
-
// riff:新建的 worktree 分支只存在于本地,远程沙箱克隆不到 → 先推送
|
|
2868
|
-
// 分支指针到远端,riff 任务才能钉住这个新分支。推送失败不阻塞(worker
|
|
2869
|
-
// 推导会按现状回退默认分支并在卡片注入告警),只提示用户。
|
|
2870
|
-
if (nextSessionUsesRiffBackend(targetDs)) {
|
|
2871
|
-
for (const c of created) {
|
|
2872
|
-
try {
|
|
2873
|
-
await pushWorktreeBranch(c.result.path, c.result.branch);
|
|
2874
|
-
}
|
|
2875
|
-
catch (e) {
|
|
2876
|
-
const errMsg = e instanceof Error ? e.message : String(e);
|
|
2877
|
-
logger.warn(`[${tag(targetDs)}] riff worktree branch push failed (${c.result.branch}): ${errMsg}`);
|
|
2878
|
-
await sessionReply(rootId, t('card.repo.riff_worktree_push_failed', { branch: c.result.branch, error: errMsg }, locTarget));
|
|
2879
|
-
}
|
|
2880
|
-
}
|
|
2881
|
-
}
|
|
2882
|
-
await sessionReply(rootId, t('cmd.repo.worktree_created', {
|
|
2883
|
-
path: creation.path, branch: creation.branch, base: creation.baseRef,
|
|
2884
|
-
}, locTarget));
|
|
2885
|
-
// The reply above awaited a Lark round-trip — a plain switch (which is
|
|
2886
|
-
// NOT gated by worktreeCreating) can land in that window. Re-check
|
|
2887
|
-
// right before committing, or we'd kill the session it just spawned.
|
|
2888
|
-
if (sessionChanged())
|
|
2889
|
-
return notSwitched(creation, 'during reply');
|
|
2890
|
-
try {
|
|
2891
|
-
// The "worktree 已创建:…" notice above already confirms the switch —
|
|
2892
|
-
// suppress commitRepoSelection's own "已选择/已切换" to avoid a dup.
|
|
2893
|
-
await commitRepoSelection(commitCtx, creation.path, `${pathBasename(creation.path)} (${creation.branch})`, {
|
|
2894
|
-
suppressConfirmReply: true,
|
|
2895
|
-
// 多仓:把按用户选择顺序创建的 worktree 目录 stamp 到 session,
|
|
2896
|
-
// riff 按此显式列表(而非目录扫描)推导 repos,首仓为 primary。
|
|
2897
|
-
riffRepoDirs: created.length > 1 ? created.map(c => c.result.path) : undefined,
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
|
-
catch (e) {
|
|
2901
|
-
// The worktree DOES exist at this point — only the switch failed.
|
|
2902
|
-
// Don't report it as a creation failure, or the user retries and
|
|
2903
|
-
// trips over "worktree target already exists".
|
|
2904
|
-
logger.warn(`[${tag(targetDs)}] Worktree ${creation.path} created but switching failed: ${e instanceof Error ? e.message : e}`);
|
|
2905
|
-
await sessionReply(rootId, t('cmd.repo.worktree_switch_failed', { path: creation.path, error: e instanceof Error ? e.message : String(e) }, locTarget));
|
|
2906
|
-
}
|
|
2907
|
-
}
|
|
2908
|
-
finally {
|
|
2909
|
-
targetDs.worktreeCreating = false;
|
|
2910
|
-
}
|
|
2911
|
-
})();
|
|
2912
|
-
return { toast: { type: 'info', content: t('card.repo.toast_worktree_creating', undefined, locTarget) } };
|
|
2913
|
-
}
|
|
2914
|
-
// Plain switch — blocked while a worktree creation/commit is in flight. The
|
|
2915
|
-
// worktree commit awaits (Lark replies, prompt prep) after its generation
|
|
2916
|
-
// checks; a plain selection interleaving there would double-fork. One lock
|
|
2917
|
-
// gates both kinds until the commit settles.
|
|
2918
|
-
if (targetDs.worktreeCreating || targetDs.pendingRepoCommitInFlight) {
|
|
2919
|
-
return { toast: { type: 'info', content: t('cmd.repo.worktree_in_progress', undefined, locTarget) } };
|
|
2920
|
-
}
|
|
2921
|
-
await commitRepoSelection(commitCtx, selectedPath, displayName);
|
|
2922
|
-
}
|
|
2923
|
-
//# sourceMappingURL=card-handler.js.map
|