@ashx-j/lunr 0.2.20 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -2
- package/README.md +20 -4
- package/dist/builtin-extensions/index.d.ts.map +1 -1
- package/dist/builtin-extensions/index.js +1 -0
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-browser.d.ts +3 -0
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-browser.js +56 -0
- package/dist/builtin-extensions/lunr-browser.js.map +1 -0
- package/dist/builtin-extensions/lunr-todos.d.ts +6 -5
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +24 -7
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/broker/spawn.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/broker/spawn.js +30 -21
- package/dist/builtin-extensions/pi-intercom/broker/spawn.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +15 -3
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js +5 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/control-notices.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/fanout-child.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts +8 -7
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +78 -31
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +6 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts +17 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js +45 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +4 -11
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts +5 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +186 -58
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/result-intercom.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-ask.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/intercom/supervisor-questions.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +4 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-job-tracker.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/auto-drain.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts +6 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js +23 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/notify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/result-watcher.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts +100 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +46 -31
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts +15 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js +14 -4
- package/dist/builtin-extensions/pi-subagents/src/runs/background/top-level-async.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts +0 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +9 -9
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/completion-guard.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +5 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-control.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js +5 -10
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js +3 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/async-guidance.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +6 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/delegation-adapters.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +7 -0
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js +11 -7
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts +4 -0
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js +22 -23
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +18 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +47 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +237 -374
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-web-access/index.js +11 -7
- package/dist/builtin-extensions/pi-web-access/index.js.map +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/install-cli.d.ts.map +1 -1
- package/dist/cli/install-cli.js +15 -45
- package/dist/cli/install-cli.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +9 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +126 -29
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +20 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/browser/network.d.ts +9 -0
- package/dist/core/browser/network.d.ts.map +1 -0
- package/dist/core/browser/network.js +146 -0
- package/dist/core/browser/network.js.map +1 -0
- package/dist/core/browser/runtime.d.ts +24 -0
- package/dist/core/browser/runtime.d.ts.map +1 -0
- package/dist/core/browser/runtime.js +289 -0
- package/dist/core/browser/runtime.js.map +1 -0
- package/dist/core/browser/schema.d.ts +16 -0
- package/dist/core/browser/schema.d.ts.map +1 -0
- package/dist/core/browser/schema.js +36 -0
- package/dist/core/browser/schema.js.map +1 -0
- package/dist/core/browser/settings.d.ts +8 -0
- package/dist/core/browser/settings.d.ts.map +1 -0
- package/dist/core/browser/settings.js +30 -0
- package/dist/core/browser/settings.js.map +1 -0
- package/dist/core/browser/setup.d.ts +2 -0
- package/dist/core/browser/setup.d.ts.map +1 -0
- package/dist/core/browser/setup.js +16 -0
- package/dist/core/browser/setup.js.map +1 -0
- package/dist/core/customize.d.ts +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +17 -13
- package/dist/core/customize.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +1 -1
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +1 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/install-features.d.ts.map +1 -1
- package/dist/core/install-features.js +10 -8
- package/dist/core/install-features.js.map +1 -1
- package/dist/core/memory-cap.d.ts.map +1 -1
- package/dist/core/memory-cap.js +5 -3
- package/dist/core/memory-cap.js.map +1 -1
- package/dist/core/model-tiers.d.ts.map +1 -1
- package/dist/core/model-tiers.js +9 -6
- package/dist/core/model-tiers.js.map +1 -1
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +9 -0
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +3 -0
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/process-registry.d.ts.map +1 -1
- package/dist/core/process-registry.js +6 -4
- package/dist/core/process-registry.js.map +1 -1
- package/dist/core/runtime-scope.d.ts +11 -0
- package/dist/core/runtime-scope.d.ts.map +1 -0
- package/dist/core/runtime-scope.js +3 -0
- package/dist/core/runtime-scope.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-handoff.d.ts +35 -0
- package/dist/core/session-handoff.d.ts.map +1 -0
- package/dist/core/session-handoff.js +214 -0
- package/dist/core/session-handoff.js.map +1 -0
- package/dist/core/session-manager.d.ts +20 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +184 -22
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-ownership.d.ts +28 -0
- package/dist/core/session-ownership.d.ts.map +1 -0
- package/dist/core/session-ownership.js +138 -0
- package/dist/core/session-ownership.js.map +1 -0
- package/dist/core/session-retention.d.ts.map +1 -1
- package/dist/core/session-retention.js +11 -2
- package/dist/core/session-retention.js.map +1 -1
- package/dist/core/settings-manager.d.ts +11 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +29 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +2 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-spinner-setting.d.ts +6 -0
- package/dist/core/subagent-spinner-setting.d.ts.map +1 -0
- package/dist/core/subagent-spinner-setting.js +12 -0
- package/dist/core/subagent-spinner-setting.js.map +1 -0
- package/dist/core/subagent-spinner.d.ts +4 -0
- package/dist/core/subagent-spinner.d.ts.map +1 -0
- package/dist/core/subagent-spinner.js +6 -0
- package/dist/core/subagent-spinner.js.map +1 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/todo-settings.d.ts +5 -0
- package/dist/core/todo-settings.d.ts.map +1 -0
- package/dist/core/todo-settings.js +7 -0
- package/dist/core/todo-settings.js.map +1 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +4 -4
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +5 -3
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +4 -4
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +4 -4
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +4 -4
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +4 -4
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +11 -2
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +31 -4
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +4 -4
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +5 -3
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/adapters/discord.d.ts +12 -1
- package/dist/gateway/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +112 -17
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/adapters/telegram.d.ts +4 -2
- package/dist/gateway/adapters/telegram.d.ts.map +1 -1
- package/dist/gateway/adapters/telegram.js +34 -11
- package/dist/gateway/adapters/telegram.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +14 -3
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +252 -60
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts +1 -0
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +60 -18
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/authz.d.ts +2 -0
- package/dist/gateway/authz.d.ts.map +1 -1
- package/dist/gateway/authz.js +13 -0
- package/dist/gateway/authz.js.map +1 -1
- package/dist/gateway/buttons.d.ts +3 -1
- package/dist/gateway/buttons.d.ts.map +1 -1
- package/dist/gateway/buttons.js +18 -3
- package/dist/gateway/buttons.js.map +1 -1
- package/dist/gateway/command.d.ts.map +1 -1
- package/dist/gateway/command.js +49 -4
- package/dist/gateway/command.js.map +1 -1
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +18 -3
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/config.d.ts +5 -0
- package/dist/gateway/config.d.ts.map +1 -1
- package/dist/gateway/config.js +5 -0
- package/dist/gateway/config.js.map +1 -1
- package/dist/gateway/conversations.d.ts +14 -0
- package/dist/gateway/conversations.d.ts.map +1 -0
- package/dist/gateway/conversations.js +30 -0
- package/dist/gateway/conversations.js.map +1 -0
- package/dist/gateway/download.d.ts +2 -0
- package/dist/gateway/download.d.ts.map +1 -0
- package/dist/gateway/download.js +36 -0
- package/dist/gateway/download.js.map +1 -0
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +85 -26
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts +24 -0
- package/dist/gateway/mobile-commands.d.ts.map +1 -0
- package/dist/gateway/mobile-commands.js +422 -0
- package/dist/gateway/mobile-commands.js.map +1 -0
- package/dist/gateway/presenter.d.ts +16 -0
- package/dist/gateway/presenter.d.ts.map +1 -0
- package/dist/gateway/presenter.js +210 -0
- package/dist/gateway/presenter.js.map +1 -0
- package/dist/gateway/router.d.ts +1 -0
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +32 -3
- package/dist/gateway/router.js.map +1 -1
- package/dist/gateway/service.d.ts +46 -0
- package/dist/gateway/service.d.ts.map +1 -0
- package/dist/gateway/service.js +395 -0
- package/dist/gateway/service.js.map +1 -0
- package/dist/gateway/setup.d.ts +4 -0
- package/dist/gateway/setup.d.ts.map +1 -0
- package/dist/gateway/setup.js +146 -0
- package/dist/gateway/setup.js.map +1 -0
- package/dist/gateway/types.d.ts +4 -2
- package/dist/gateway/types.d.ts.map +1 -1
- package/dist/gateway/types.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +11 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +53 -16
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +31 -0
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/copyable-text.js +165 -0
- package/dist/modes/interactive/components/copyable-text.js.map +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts +1 -0
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +8 -0
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +1 -0
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +8 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +16 -0
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +9 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +111 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/extension-widget-order.d.ts +8 -0
- package/dist/modes/interactive/extension-widget-order.d.ts.map +1 -0
- package/dist/modes/interactive/extension-widget-order.js +37 -0
- package/dist/modes/interactive/extension-widget-order.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts +3 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +166 -29
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/node-runtime/agent-session-services-NQ6GKOIK.js +49 -0
- package/dist/node-runtime/{builtin-extensions-X4JMM4ZS.js → builtin-extensions-GVC6IFDU.js} +6 -4
- package/dist/node-runtime/{chunk-LTYWTR3V.js → chunk-2MI5OPMN.js} +17 -2
- package/dist/node-runtime/{chunk-W3CVH5RX.js → chunk-2TKODGBZ.js} +11 -6
- package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
- package/dist/node-runtime/chunk-5BNJ4JUH.js +672 -0
- package/dist/node-runtime/{chunk-6N22HULO.js → chunk-5D7LC2ZQ.js} +7 -2
- package/dist/node-runtime/chunk-5ZH3ZFIZ.js +308 -0
- package/dist/node-runtime/{chunk-KBKMCJDU.js → chunk-5ZQXRPMC.js} +19 -4
- package/dist/node-runtime/{chunk-6KDIOJL3.js → chunk-6427XAWG.js} +3 -3
- package/dist/node-runtime/{chunk-BOHIDQT4.js → chunk-6B2POMK7.js} +1 -1
- package/dist/node-runtime/{chunk-RNBHABBA.js → chunk-7QWNYZDI.js} +7 -0
- package/dist/node-runtime/chunk-AZJHNQKQ.js +205 -0
- package/dist/node-runtime/chunk-BFNXONG3.js +521 -0
- package/dist/node-runtime/{chunk-IRPJXI6U.js → chunk-BX2RB477.js} +1 -1
- package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
- package/dist/node-runtime/{chunk-25I2BHAA.js → chunk-CSUZVNYE.js} +1 -1
- package/dist/node-runtime/{chunk-QZMODZQ2.js → chunk-E24EO34J.js} +2 -1
- package/dist/node-runtime/{chunk-QKFMBRAL.js → chunk-EQ63ANHL.js} +508 -140
- package/dist/node-runtime/{chunk-ELWEXVO5.js → chunk-GJSAD4AB.js} +216 -201
- package/dist/node-runtime/{chunk-AOFXZQKA.js → chunk-GMHJCCEN.js} +8 -8
- package/dist/node-runtime/{chunk-DDWHZ633.js → chunk-GNN7H3B7.js} +1 -1
- package/dist/node-runtime/chunk-GS66LV4M.js +2830 -0
- package/dist/node-runtime/{chunk-6BEIBLQ3.js → chunk-H3XF4UVQ.js} +1 -1
- package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
- package/dist/node-runtime/{chunk-AROOY4BB.js → chunk-HTFRRDSF.js} +2 -7
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/{chunk-4CSFRBCN.js → chunk-IQIEU7SB.js} +9 -674
- package/dist/node-runtime/{chunk-OPEK5RRY.js → chunk-IVXYUAJE.js} +1 -1
- package/dist/node-runtime/{chunk-AL2FMKKM.js → chunk-IWOWXRWU.js} +58 -48
- package/dist/node-runtime/chunk-KKUTQQV7.js +144 -0
- package/dist/node-runtime/chunk-LISUTZS3.js +19 -0
- package/dist/node-runtime/{chunk-K3646JTM.js → chunk-LMBNLFXQ.js} +25 -314
- package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
- package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
- package/dist/node-runtime/{chunk-STERBGUB.js → chunk-OFKSVRV7.js} +2 -2
- package/dist/node-runtime/{chunk-JZQ7F36T.js → chunk-ORH324EP.js} +19 -3
- package/dist/node-runtime/{chunk-2SJB2AWP.js → chunk-PC2Z5TKZ.js} +3 -3
- package/dist/node-runtime/{chunk-46ECNOLF.js → chunk-QDGKKKUM.js} +97 -162
- package/dist/node-runtime/chunk-R3K2F5GI.js +122 -0
- package/dist/node-runtime/chunk-RMQZU2YU.js +117 -0
- package/dist/node-runtime/{chunk-JYNNB7DU.js → chunk-TDL7UWJ7.js} +283 -2999
- package/dist/node-runtime/{chunk-G6LRAP36.js → chunk-TQGPP4SC.js} +1 -1
- package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
- package/dist/node-runtime/{chunk-4DJ6HEGH.js → chunk-UAFLNHSH.js} +18 -14
- package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
- package/dist/node-runtime/chunk-UP2XBVH5.js +40 -0
- package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
- package/dist/node-runtime/chunk-URD2SLIT.js +1019 -0
- package/dist/node-runtime/chunk-US544NN6.js +13 -0
- package/dist/node-runtime/chunk-UWPJL22I.js +341 -0
- package/dist/node-runtime/chunk-V2A7CEXK.js +355 -0
- package/dist/node-runtime/chunk-VJPTNWAP.js +708 -0
- package/dist/node-runtime/{chunk-WKDK4C5P.js → chunk-VSSXXL36.js} +38 -164
- package/dist/node-runtime/{chunk-4I23VTC4.js → chunk-VWCE2HSZ.js} +21 -124
- package/dist/node-runtime/{chunk-CBGB57XT.js → chunk-WADV2VDS.js} +32 -1014
- package/dist/node-runtime/{chunk-GKLEQ3I4.js → chunk-XLTL257W.js} +126 -27
- package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
- package/dist/node-runtime/cli-runtime.js +2 -2
- package/dist/node-runtime/command-3JHHXOPX.js +45 -0
- package/dist/node-runtime/commands-2JVNFGMQ.js +36 -0
- package/dist/node-runtime/{commands-MV5KOZ64.js → commands-KAMO2T6P.js} +10 -10
- package/dist/node-runtime/config-RORQUQFG.js +20 -0
- package/dist/node-runtime/{customize-XEXL2DGQ.js → customize-VFJV3U6A.js} +2 -1
- package/dist/node-runtime/{direct-tool-executor-BK7CLEBX.js → direct-tool-executor-YAVOLDFY.js} +8 -8
- package/dist/node-runtime/{export-html-TEXVV5RP.js → export-html-KBFVV63J.js} +4 -3
- package/dist/node-runtime/{extension-input-O4HSAEM4.js → extension-input-K24TVKVW.js} +4 -4
- package/dist/node-runtime/{extension-selector-X5FCX43D.js → extension-selector-SPNF7EDR.js} +4 -4
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/{gateway-L4ANRTVE.js → gateway-VFO6SFKK.js} +275 -994
- package/dist/node-runtime/{gemini-search-U7SUMPQA.js → gemini-search-35OCRFLN.js} +1 -1
- package/dist/node-runtime/{gemini-url-context-PXWCBQHK.js → gemini-url-context-UQY3PHHW.js} +2 -2
- package/dist/node-runtime/index.js +105 -64
- package/dist/node-runtime/{init-3C7Z24OI.js → init-X2LIUB2H.js} +3 -3
- package/dist/node-runtime/{install-cli-EXMJQESX.js → install-cli-C3CF7O7N.js} +21 -82
- package/dist/node-runtime/interactive-mode-LOM6AIF6.js +72 -0
- package/dist/node-runtime/{interactive-view-ILS6TAN5.js → interactive-view-IDSCPPK7.js} +8 -8
- package/dist/node-runtime/lunr-browser-YNW7FTYX.js +87 -0
- package/dist/node-runtime/{lunr-cron-NNYTWTGF.js → lunr-cron-BKHGNBKT.js} +19 -5
- package/dist/node-runtime/main.js +45 -30
- package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
- package/dist/node-runtime/mobile-commands-HMP25WBC.js +32 -0
- package/dist/node-runtime/model-runtime-PLQKAG4B.js +16 -0
- package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
- package/dist/node-runtime/{package-manager-cli-7RKSZGEN.js → package-manager-cli-VCK4E2RC.js} +23 -15
- package/dist/node-runtime/{pi-intercom-DDQMRNPJ.js → pi-intercom-HBPK5HSJ.js} +38 -34
- package/dist/node-runtime/{pi-mcp-adapter-GUFZWW54.js → pi-mcp-adapter-E6WULBKF.js} +4 -4
- package/dist/node-runtime/{pi-subagents-T5WMMLBB.js → pi-subagents-FEUDLJOE.js} +476 -412
- package/dist/node-runtime/{pi-web-access-2CQGFLT2.js → pi-web-access-WTGMNZ32.js} +15 -15
- package/dist/node-runtime/process-registry-4FAKZQOL.js +31 -0
- package/dist/node-runtime/{proxy-modes-V6YVFH3C.js → proxy-modes-OSQCWRBI.js} +9 -9
- package/dist/node-runtime/rpc-entry.js +46 -31
- package/dist/node-runtime/{rpc-mode-W5ZTLTMZ.js → rpc-mode-P5ODXPEG.js} +2 -2
- package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
- package/dist/node-runtime/{runtime-bridges-NJQERQ72.js → runtime-bridges-3XUQ46XW.js} +6 -5
- package/dist/node-runtime/service-ISSP6VHE.js +36 -0
- package/dist/node-runtime/session-handoff-HC7R5E24.js +33 -0
- package/dist/node-runtime/{session-manager-E7AREDTV.js → session-manager-CFN4UFM2.js} +2 -1
- package/dist/node-runtime/{session-selector-FJ7M2AIX.js → session-selector-LHRMJOKT.js} +5 -4
- package/dist/node-runtime/{settings-manager-GHPTUN7R.js → settings-manager-UUZ6NUXI.js} +8 -2
- package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
- package/dist/node-runtime/setup-NRXVZBLJ.js +155 -0
- package/dist/node-runtime/{subagent-executor-SRFC26SJ.js → subagent-executor-MLUMBWCP.js} +35 -63
- package/dist/node-runtime/theme-U7IGOA7O.js +68 -0
- package/dist/node-runtime/trust-manager-MMISNCYO.js +17 -0
- package/dist/node-runtime/{update-cli-L3JIBH2U.js → update-cli-4TP25CNW.js} +8 -2
- package/dist/node-runtime/usage-service-LFB2SWYV.js +37 -0
- package/dist/node-runtime/{video-extract-OYT5WKS5.js → video-extract-OOZHR7SU.js} +2 -2
- package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
- package/docs/browser.md +86 -0
- package/docs/extensions.md +2 -0
- package/docs/features.md +99 -17
- package/docs/interactive-startup.md +2 -1
- package/docs/sessions.md +10 -0
- package/docs/settings.md +3 -1
- package/docs/tui.md +2 -0
- package/docs/usage.md +16 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +7 -4
- package/scripts/install-browser.mjs +20 -0
- package/dist/node-runtime/agent-session-services-75JKASCW.js +0 -36
- package/dist/node-runtime/chunk-HQCKFM2O.js +0 -56
- package/dist/node-runtime/command-RBTRL55A.js +0 -13
- package/dist/node-runtime/interactive-mode-HPUNH7SV.js +0 -57
- package/dist/node-runtime/{chunk-UWQYRSYQ.js → chunk-YJMMG7C6.js} +25 -25
- package/dist/node-runtime/{mcp-panel-IIGMXQGP.js → mcp-panel-KTTFXJZ4.js} +3 -3
- package/dist/node-runtime/{src-BPQFJR76.js → src-IVPNZ2BX.js} +9 -9
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
FORWARDED_COMMANDS,
|
|
4
|
+
MOBILE_COMMANDS
|
|
5
|
+
} from "./chunk-V2A7CEXK.js";
|
|
6
|
+
import {
|
|
7
|
+
conversationBinding,
|
|
8
|
+
createPicker
|
|
9
|
+
} from "./chunk-VJPTNWAP.js";
|
|
10
|
+
import {
|
|
11
|
+
computeContextBreakdown
|
|
12
|
+
} from "./chunk-TQGPP4SC.js";
|
|
13
|
+
import {
|
|
14
|
+
findExactModelReferenceMatch
|
|
15
|
+
} from "./chunk-OFKSVRV7.js";
|
|
16
|
+
import {
|
|
17
|
+
SessionManager
|
|
18
|
+
} from "./chunk-XLTL257W.js";
|
|
19
|
+
import {
|
|
20
|
+
runtimeScope
|
|
21
|
+
} from "./chunk-IMLCWLPI.js";
|
|
22
|
+
|
|
23
|
+
// packages/coding-agent/dist/gateway/commands.js
|
|
24
|
+
var MODEL_CACHE_TTL_MS = 300 * 1e3, SESSIONS_CACHE_TTL_MS = 300 * 1e3, MAX_MODEL_LIST_LINES = 15, PROVIDER_PER_PAGE = 10;
|
|
25
|
+
var MAX_MODELS_PER_PROVIDER = 50, MODEL_ID_MAX = 38, MODEL_CACHE_CAP = 100, SESSIONS_CACHE_CAP = 100, modelCache = /* @__PURE__ */ new Map(), sessionsCache = /* @__PURE__ */ new Map();
|
|
26
|
+
function evictLRU(map, cap) {
|
|
27
|
+
for (; map.size > cap; ) {
|
|
28
|
+
let first = map.keys().next().value;
|
|
29
|
+
first !== void 0 && map.delete(first);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function getCachedModels(key) {
|
|
33
|
+
let cached = modelCache.get(key);
|
|
34
|
+
if (cached) {
|
|
35
|
+
if (Date.now() > cached.expires) {
|
|
36
|
+
modelCache.delete(key);
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
return modelCache.delete(key), modelCache.set(key, cached), cached.models;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function setCachedModels(key, models) {
|
|
43
|
+
modelCache.set(key, { models, expires: Date.now() + MODEL_CACHE_TTL_MS }), evictLRU(modelCache, MODEL_CACHE_CAP);
|
|
44
|
+
}
|
|
45
|
+
function getCachedSessions(key) {
|
|
46
|
+
let cached = sessionsCache.get(key);
|
|
47
|
+
if (cached) {
|
|
48
|
+
if (Date.now() > cached.expires) {
|
|
49
|
+
sessionsCache.delete(key);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
return sessionsCache.delete(key), sessionsCache.set(key, cached), cached.sessions;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
function setCachedSessions(key, sessions) {
|
|
56
|
+
sessionsCache.set(key, { sessions, expires: Date.now() + SESSIONS_CACHE_TTL_MS }), evictLRU(sessionsCache, SESSIONS_CACHE_CAP);
|
|
57
|
+
}
|
|
58
|
+
function oneLine(text) {
|
|
59
|
+
return text.replace(/\s+/g, " ").trim().slice(0, 200);
|
|
60
|
+
}
|
|
61
|
+
function prefixLines(text, prefix) {
|
|
62
|
+
return text.split(`
|
|
63
|
+
`).map((line, index) => (index === 0 ? prefix : " ") + line).join(`
|
|
64
|
+
`);
|
|
65
|
+
}
|
|
66
|
+
function truncate(text, max) {
|
|
67
|
+
return text.length <= max ? text : `${text.slice(0, max - 1)}\u2026`;
|
|
68
|
+
}
|
|
69
|
+
function formatRelativeTime(date) {
|
|
70
|
+
let seconds = Math.max(0, Math.floor((Date.now() - date.getTime()) / 1e3));
|
|
71
|
+
if (seconds < 60)
|
|
72
|
+
return `${seconds}s ago`;
|
|
73
|
+
let minutes = Math.floor(seconds / 60);
|
|
74
|
+
if (minutes < 60)
|
|
75
|
+
return `${minutes}m ago`;
|
|
76
|
+
let hours = Math.floor(minutes / 60);
|
|
77
|
+
return hours < 24 ? `${hours}h ago` : `${Math.floor(hours / 24)}d ago`;
|
|
78
|
+
}
|
|
79
|
+
function formatModelList(models, maxLines = MAX_MODEL_LIST_LINES) {
|
|
80
|
+
if (models.length === 0)
|
|
81
|
+
return ["No models available."];
|
|
82
|
+
let byProvider = /* @__PURE__ */ new Map();
|
|
83
|
+
for (let model of models) {
|
|
84
|
+
let list = byProvider.get(model.provider) ?? [];
|
|
85
|
+
list.push(model), byProvider.set(model.provider, list);
|
|
86
|
+
}
|
|
87
|
+
let providers = [...byProvider.keys()].sort(), lines = [], index = 1;
|
|
88
|
+
for (let provider of providers) {
|
|
89
|
+
let list = (byProvider.get(provider) ?? []).sort((a, b) => a.id.localeCompare(b.id));
|
|
90
|
+
for (let model of list)
|
|
91
|
+
lines.push(`${index}) ${provider}/${model.id}`), index++;
|
|
92
|
+
}
|
|
93
|
+
return lines.length <= maxLines ? lines : [
|
|
94
|
+
`${models.length} models across ${providers.length} providers.`,
|
|
95
|
+
"Use /model <provider/id> or /model <query>.",
|
|
96
|
+
...providers.map((p) => `- ${p}`)
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
function groupModelsByProvider(models) {
|
|
100
|
+
let byProvider = /* @__PURE__ */ new Map();
|
|
101
|
+
for (let model of models) {
|
|
102
|
+
let list = byProvider.get(model.provider) ?? [];
|
|
103
|
+
list.push(model), byProvider.set(model.provider, list);
|
|
104
|
+
}
|
|
105
|
+
for (let list of byProvider.values())
|
|
106
|
+
list.sort((a, b) => a.id.localeCompare(b.id));
|
|
107
|
+
return byProvider;
|
|
108
|
+
}
|
|
109
|
+
function truncateModelId(id) {
|
|
110
|
+
let lastSlash = id.lastIndexOf("/"), name = lastSlash >= 0 ? id.slice(lastSlash + 1) : id;
|
|
111
|
+
return truncate(name, MODEL_ID_MAX);
|
|
112
|
+
}
|
|
113
|
+
async function refreshAndCacheModels(session, key) {
|
|
114
|
+
let runtime = session.modelRuntime;
|
|
115
|
+
await runtime.refresh();
|
|
116
|
+
let models = [...await runtime.getAvailable()].sort((a, b) => a.provider.localeCompare(b.provider) || a.id.localeCompare(b.id));
|
|
117
|
+
return setCachedModels(key, models), models;
|
|
118
|
+
}
|
|
119
|
+
async function setModelAndReply(ctx, model) {
|
|
120
|
+
let session = ctx.session;
|
|
121
|
+
try {
|
|
122
|
+
await session.setModel(model);
|
|
123
|
+
} catch (error) {
|
|
124
|
+
if ((error instanceof Error ? error.message : String(error)).includes("No API key")) {
|
|
125
|
+
await ctx.reply(`No API key for ${model.provider}.`);
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
throw error;
|
|
129
|
+
}
|
|
130
|
+
await ctx.reply(`Model \u2192 ${model.provider}/${model.id} (thinking level re-clamped to ${session.thinkingLevel})`);
|
|
131
|
+
}
|
|
132
|
+
var newCommand = {
|
|
133
|
+
name: "new",
|
|
134
|
+
aliases: ["reset"],
|
|
135
|
+
description: "start a fresh session for this chat",
|
|
136
|
+
// lunr: busy-session /new must bypass the guard (same as /stop).
|
|
137
|
+
bypassBusy: !0,
|
|
138
|
+
needsSession: !1,
|
|
139
|
+
async handler(ctx) {
|
|
140
|
+
await ctx.bridge.reset(ctx.key), await ctx.reply("Session reset \u2014 next message starts a fresh session.");
|
|
141
|
+
}
|
|
142
|
+
}, undoCommand = {
|
|
143
|
+
name: "undo",
|
|
144
|
+
description: "rewind the session tree before the last user turn",
|
|
145
|
+
bypassBusy: !1,
|
|
146
|
+
needsSession: !0,
|
|
147
|
+
async handler(ctx) {
|
|
148
|
+
let { userText } = await ctx.bridge.undo(ctx.key), text = userText ? ` "${truncate(userText, 60)}"` : "";
|
|
149
|
+
await ctx.reply(`Undone \u2014 rewound before${text}. /redo to restore.`);
|
|
150
|
+
}
|
|
151
|
+
}, redoCommand = {
|
|
152
|
+
name: "redo",
|
|
153
|
+
description: "restore the last undone turn",
|
|
154
|
+
bypassBusy: !1,
|
|
155
|
+
needsSession: !0,
|
|
156
|
+
async handler(ctx) {
|
|
157
|
+
await ctx.bridge.redo(ctx.key), await ctx.reply("Redone.");
|
|
158
|
+
}
|
|
159
|
+
}, stopCommand = {
|
|
160
|
+
name: "stop",
|
|
161
|
+
description: "abort the running turn",
|
|
162
|
+
bypassBusy: !0,
|
|
163
|
+
needsSession: !1,
|
|
164
|
+
async handler(ctx) {
|
|
165
|
+
await ctx.bridge.abort(ctx.key), await ctx.reply("Stopped.");
|
|
166
|
+
}
|
|
167
|
+
}, statusCommand = {
|
|
168
|
+
name: "status",
|
|
169
|
+
description: "session status",
|
|
170
|
+
bypassBusy: !0,
|
|
171
|
+
needsSession: !1,
|
|
172
|
+
async handler(ctx) {
|
|
173
|
+
let status = ctx.bridge.getStatus(ctx.key), age = status.createdAt ? `${Math.max(0, Math.round((Date.now() - Date.parse(status.createdAt)) / 1e3))}s` : "no session yet";
|
|
174
|
+
await ctx.reply(`${ctx.event.source.platform} \xB7 session age ${age} \xB7 ${status.busy ? "busy" : "idle"} \xB7 queue ${status.queueDepth}
|
|
175
|
+
Project: ${conversationBinding(ctx.key)?.cwd ?? "not selected"}`);
|
|
176
|
+
}
|
|
177
|
+
}, whoamiCommand = {
|
|
178
|
+
name: "whoami",
|
|
179
|
+
description: "your ids and session key",
|
|
180
|
+
bypassBusy: !0,
|
|
181
|
+
needsSession: !1,
|
|
182
|
+
async handler(ctx) {
|
|
183
|
+
let { userId, chatId } = ctx.event.source;
|
|
184
|
+
await ctx.reply(`userId: ${userId}
|
|
185
|
+
chatId: ${chatId}
|
|
186
|
+
key: ${ctx.key}`);
|
|
187
|
+
}
|
|
188
|
+
}, helpCommand = {
|
|
189
|
+
name: "help",
|
|
190
|
+
description: "this message",
|
|
191
|
+
bypassBusy: !0,
|
|
192
|
+
needsSession: !1,
|
|
193
|
+
async handler(ctx) {
|
|
194
|
+
await ctx.reply(formatHelpText());
|
|
195
|
+
}
|
|
196
|
+
}, modelCommand = {
|
|
197
|
+
name: "model",
|
|
198
|
+
description: "list or switch models",
|
|
199
|
+
bypassBusy: !1,
|
|
200
|
+
needsSession: !0,
|
|
201
|
+
async handler(ctx) {
|
|
202
|
+
let session = ctx.session, arg = ctx.args.trim();
|
|
203
|
+
if (!arg) {
|
|
204
|
+
let models2 = getCachedModels(ctx.key) ?? await refreshAndCacheModels(session, ctx.key), byProvider = groupModelsByProvider(models2), current = session.model, currentRef = current ? `${current.provider}/${current.id}` : "", providerItems = [...byProvider.keys()].sort().map((provider) => ({
|
|
205
|
+
label: `${current?.provider === provider ? "\u2713 " : ""}${provider} (${byProvider.get(provider)?.length ?? 0})`,
|
|
206
|
+
value: provider
|
|
207
|
+
})), pickerOpts = {
|
|
208
|
+
replyTo: ctx.event.messageId,
|
|
209
|
+
threadId: ctx.event.source.threadId
|
|
210
|
+
};
|
|
211
|
+
if (!(await createPicker(ctx.adapter, ctx.event.source, {
|
|
212
|
+
kind: "model",
|
|
213
|
+
sessionKey: ctx.key,
|
|
214
|
+
invokerId: ctx.event.source.userId,
|
|
215
|
+
items: providerItems,
|
|
216
|
+
perPage: PROVIDER_PER_PAGE,
|
|
217
|
+
title: "Pick a model provider",
|
|
218
|
+
async resolve(item) {
|
|
219
|
+
if (item.value === "__back__")
|
|
220
|
+
return { done: !1, items: providerItems, title: "Pick a model provider" };
|
|
221
|
+
if (!item.value.includes("/")) {
|
|
222
|
+
let provider = item.value, list = byProvider.get(provider) ?? [], capped = list.slice(0, MAX_MODELS_PER_PROVIDER), note = list.length > MAX_MODELS_PER_PROVIDER ? ` \u2014 ${list.length - MAX_MODELS_PER_PROVIDER} more available` : "", modelItems = [];
|
|
223
|
+
for (let m of capped) {
|
|
224
|
+
let ref = `${provider}/${m.id}`;
|
|
225
|
+
modelItems.push({
|
|
226
|
+
label: `${currentRef === ref ? "\u2713 " : ""}${truncateModelId(m.id)}`,
|
|
227
|
+
value: ref
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
return modelItems.unshift({ label: "\u25C0 Back", value: "__back__" }), {
|
|
231
|
+
done: !1,
|
|
232
|
+
items: modelItems,
|
|
233
|
+
title: `${provider} (${list.length})${note}`,
|
|
234
|
+
breadcrumbs: provider
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
let exact2 = findExactModelReferenceMatch(item.value, models2);
|
|
238
|
+
if (!exact2)
|
|
239
|
+
return { done: !0, text: "That model is no longer available." };
|
|
240
|
+
try {
|
|
241
|
+
await session.setModel(exact2);
|
|
242
|
+
} catch (error) {
|
|
243
|
+
if ((error instanceof Error ? error.message : String(error)).includes("No API key"))
|
|
244
|
+
return { done: !0, text: `No API key for ${exact2.provider}.` };
|
|
245
|
+
throw error;
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
done: !0,
|
|
249
|
+
text: `\u263E Model \u2192 ${exact2.provider}/${exact2.id} (thinking level re-clamped to ${session.thinkingLevel})`
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}, pickerOpts)).success) {
|
|
253
|
+
let currentText = `${current?.provider ?? "none"}/${current?.id ?? "none"}`, lines = formatModelList(models2);
|
|
254
|
+
await ctx.reply([`Current: ${currentText}`, ...lines, "Use /model <n> or /model <provider/id>"].join(`
|
|
255
|
+
`));
|
|
256
|
+
}
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
let numeric = Number.parseInt(arg, 10);
|
|
260
|
+
if (!Number.isNaN(numeric) && /^\d+$/.test(arg)) {
|
|
261
|
+
let cached = getCachedModels(ctx.key);
|
|
262
|
+
if (!cached || numeric < 1 || numeric > cached.length) {
|
|
263
|
+
await ctx.reply("Invalid selection \u2014 run /model to see the current list.");
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
await setModelAndReply(ctx, cached[numeric - 1]);
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
let models = getCachedModels(ctx.key) ?? await refreshAndCacheModels(session, ctx.key), exact = findExactModelReferenceMatch(arg, models);
|
|
270
|
+
if (exact) {
|
|
271
|
+
await setModelAndReply(ctx, exact);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
let query = arg.toLowerCase(), matches = models.filter((m) => m.id.toLowerCase().includes(query) || `${m.provider}/${m.id}`.toLowerCase().includes(query) || (m.name?.toLowerCase().includes(query) ?? !1));
|
|
275
|
+
if (matches.length === 0) {
|
|
276
|
+
await ctx.reply(`No model matches "${arg}".`);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
if (matches.length > 1) {
|
|
280
|
+
await ctx.reply(formatModelList(matches).join(`
|
|
281
|
+
`));
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
await setModelAndReply(ctx, matches[0]);
|
|
285
|
+
}
|
|
286
|
+
}, sessionsCommand = {
|
|
287
|
+
name: "sessions",
|
|
288
|
+
description: "list or switch sessions",
|
|
289
|
+
bypassBusy: !1,
|
|
290
|
+
needsSession: !0,
|
|
291
|
+
async handler(ctx) {
|
|
292
|
+
let session = ctx.session, arg = ctx.args.trim(), currentFile = session.sessionManager?.getSessionFile();
|
|
293
|
+
if (!arg) {
|
|
294
|
+
let all = await SessionManager.list(process.cwd());
|
|
295
|
+
all.sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
296
|
+
let sessions = all.slice(0, 10);
|
|
297
|
+
setCachedSessions(ctx.key, sessions);
|
|
298
|
+
let items = sessions.map((s) => ({
|
|
299
|
+
label: `${s.path === currentFile ? "\u263E " : ""}${s.name ? truncate(s.name, 30) : truncate(s.firstMessage, 30) || "(empty)"}`,
|
|
300
|
+
value: s.path
|
|
301
|
+
}));
|
|
302
|
+
if (!(await createPicker(ctx.adapter, ctx.event.source, {
|
|
303
|
+
kind: "sessions",
|
|
304
|
+
sessionKey: ctx.key,
|
|
305
|
+
invokerId: ctx.event.source.userId,
|
|
306
|
+
items,
|
|
307
|
+
perPage: 8,
|
|
308
|
+
title: "Pick a session",
|
|
309
|
+
async resolve(item) {
|
|
310
|
+
await ctx.bridge.switchSession(ctx.key, item.value);
|
|
311
|
+
let switched2 = await ctx.bridge.getSession(ctx.key), name2 = switched2?.sessionManager?.getSessionName() ?? "unnamed", count2 = switched2?.sessionManager?.getEntries().length ?? 0;
|
|
312
|
+
return { done: !0, text: `\u263E Switched to "${name2}" (${count2} msgs). History continues here.` };
|
|
313
|
+
}
|
|
314
|
+
}, { replyTo: ctx.event.messageId, threadId: ctx.event.source.threadId })).success) {
|
|
315
|
+
let lines = sessions.map((s, i) => {
|
|
316
|
+
let marker = s.path === currentFile ? " \u263E" : "", label = s.name ? truncate(s.name, 40) : truncate(s.firstMessage, 40) || "(empty)";
|
|
317
|
+
return `${i + 1}) ${label}${marker} \xB7 ${formatRelativeTime(s.modified)} \xB7 ${s.messageCount} msgs`;
|
|
318
|
+
});
|
|
319
|
+
await ctx.reply([`Sessions for ${process.cwd()}`, ...lines, "Use /sessions <n> or /sessions <id-prefix>"].join(`
|
|
320
|
+
`));
|
|
321
|
+
}
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
let path, numeric = Number.parseInt(arg, 10), cached = getCachedSessions(ctx.key);
|
|
325
|
+
if (!Number.isNaN(numeric) && /^\d+$/.test(arg)) {
|
|
326
|
+
if (!cached || numeric < 1 || numeric > cached.length) {
|
|
327
|
+
await ctx.reply("Invalid selection \u2014 run /sessions to see the current list.");
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
path = cached[numeric - 1].path;
|
|
331
|
+
} else {
|
|
332
|
+
let matches = (cached ?? await SessionManager.list(process.cwd())).filter((s) => s.id.startsWith(arg) || s.path.startsWith(arg));
|
|
333
|
+
if (matches.length === 0) {
|
|
334
|
+
await ctx.reply(`No session matches "${arg}".`);
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
if (matches.length > 1) {
|
|
338
|
+
await ctx.reply(`Multiple sessions match "${arg}" \u2014 use a longer prefix.`);
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
path = matches[0].path;
|
|
342
|
+
}
|
|
343
|
+
if (!path) {
|
|
344
|
+
await ctx.reply("No session selected.");
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
await ctx.bridge.switchSession(ctx.key, path);
|
|
348
|
+
let switched = await ctx.bridge.getSession(ctx.key), name = switched?.sessionManager?.getSessionName() ?? "unnamed", count = switched?.sessionManager?.getEntries().length ?? 0;
|
|
349
|
+
await ctx.reply(`Switched to "${name}" (${count} msgs). History continues here.`);
|
|
350
|
+
}
|
|
351
|
+
}, titleCommand = {
|
|
352
|
+
name: "title",
|
|
353
|
+
aliases: ["name"],
|
|
354
|
+
description: "name the current session",
|
|
355
|
+
bypassBusy: !0,
|
|
356
|
+
needsSession: !0,
|
|
357
|
+
async handler(ctx) {
|
|
358
|
+
let session = ctx.session, name = ctx.args.trim();
|
|
359
|
+
if (!name) {
|
|
360
|
+
let current = session.sessionManager?.getSessionName();
|
|
361
|
+
await ctx.reply(current ? `Session title: ${current}` : "(unnamed)");
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
session.setSessionName(name);
|
|
365
|
+
let readBack = session.sessionManager?.getSessionName() ?? name;
|
|
366
|
+
await ctx.reply(`Session titled "${readBack}".`);
|
|
367
|
+
}
|
|
368
|
+
}, contextCommand = {
|
|
369
|
+
name: "context",
|
|
370
|
+
description: "estimated context window breakdown",
|
|
371
|
+
bypassBusy: !0,
|
|
372
|
+
needsSession: !0,
|
|
373
|
+
async handler(ctx) {
|
|
374
|
+
let session = ctx.session, model = session.model;
|
|
375
|
+
if (!model) {
|
|
376
|
+
await ctx.reply("No model selected.");
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
let contextWindow = model.contextWindow ?? 0;
|
|
380
|
+
if (contextWindow <= 0) {
|
|
381
|
+
await ctx.reply("Context window unknown for this model.");
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
let tools = session.getActiveToolNames().map((name) => session.getToolDefinition(name)).filter((d) => d !== void 0), breakdown = computeContextBreakdown({
|
|
385
|
+
systemPrompt: session.systemPrompt,
|
|
386
|
+
tools,
|
|
387
|
+
messages: session.messages,
|
|
388
|
+
contextWindow
|
|
389
|
+
}), usage = session.getContextUsage(), tokens = usage?.tokens ?? breakdown.total, percent = usage?.percent ?? (contextWindow > 0 ? tokens / contextWindow * 100 : 0), messageTokens = breakdown.user + breakdown.assistantText + breakdown.thinking + breakdown.toolCalls + breakdown.toolResults + breakdown.summaries, stats = session.getSessionStats();
|
|
390
|
+
await ctx.reply([
|
|
391
|
+
`Context: ${tokens.toLocaleString("en-US")} / ${contextWindow.toLocaleString("en-US")} tokens (${Math.round(percent)}%)`,
|
|
392
|
+
` system ${breakdown.systemPrompt.toLocaleString("en-US")} \xB7 tools ${breakdown.toolDefinitions.toLocaleString("en-US")} \xB7 messages ${messageTokens.toLocaleString("en-US")}`,
|
|
393
|
+
`Session: ${stats.totalMessages} messages \xB7 ${stats.userMessages} turns \xB7 model ${model.provider}/${model.id}`
|
|
394
|
+
].join(`
|
|
395
|
+
`));
|
|
396
|
+
}
|
|
397
|
+
}, compactCommand = {
|
|
398
|
+
name: "compact",
|
|
399
|
+
description: "summarize and compress session context",
|
|
400
|
+
bypassBusy: !0,
|
|
401
|
+
needsSession: !0,
|
|
402
|
+
async handler(ctx) {
|
|
403
|
+
let session = ctx.session, instructions = ctx.args.trim() || void 0;
|
|
404
|
+
try {
|
|
405
|
+
let result = await session.compact(instructions), before = result.tokensBefore.toLocaleString("en-US"), after = result.estimatedTokensAfter !== void 0 ? `~${result.estimatedTokensAfter.toLocaleString("en-US")}` : "~?";
|
|
406
|
+
await ctx.reply(`Compacted: ${before} \u2192 ${after} tokens.`);
|
|
407
|
+
} catch (error) {
|
|
408
|
+
let message = error instanceof Error ? error.message : String(error);
|
|
409
|
+
if (message.includes("Nothing to compact") || message.includes("Already compacted") || message.includes("No model selected")) {
|
|
410
|
+
await ctx.reply(message);
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
throw error;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}, thinkingCommand = {
|
|
417
|
+
name: "thinking",
|
|
418
|
+
aliases: ["effort", "reasoning"],
|
|
419
|
+
description: "get or set the thinking level",
|
|
420
|
+
bypassBusy: !1,
|
|
421
|
+
needsSession: !0,
|
|
422
|
+
async handler(ctx) {
|
|
423
|
+
let session = ctx.session, levels = session.getAvailableThinkingLevels();
|
|
424
|
+
if (!session.supportsThinking()) {
|
|
425
|
+
await ctx.reply(`Model ${session.model?.provider ?? "none"}/${session.model?.id ?? "none"} doesn't support thinking.`);
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
let arg = ctx.args.trim().toLowerCase();
|
|
429
|
+
if (!arg) {
|
|
430
|
+
let current = session.thinkingLevel, items = levels.map((level) => ({
|
|
431
|
+
label: `${level === current ? "\u2713 " : ""}${level}`,
|
|
432
|
+
value: level
|
|
433
|
+
}));
|
|
434
|
+
(await createPicker(ctx.adapter, ctx.event.source, {
|
|
435
|
+
kind: "thinking",
|
|
436
|
+
sessionKey: ctx.key,
|
|
437
|
+
invokerId: ctx.event.source.userId,
|
|
438
|
+
items,
|
|
439
|
+
perPage: levels.length,
|
|
440
|
+
title: "Pick a thinking level",
|
|
441
|
+
async resolve(item) {
|
|
442
|
+
let level = item.value;
|
|
443
|
+
return session.setThinkingLevel(level), { done: !0, text: `\u263E Thinking \u2192 ${level}` };
|
|
444
|
+
}
|
|
445
|
+
}, { replyTo: ctx.event.messageId, threadId: ctx.event.source.threadId })).success || await ctx.reply(`Level: ${current} \u2014 available: ${levels.join(", ")}`);
|
|
446
|
+
return;
|
|
447
|
+
}
|
|
448
|
+
if (!levels.includes(arg)) {
|
|
449
|
+
await ctx.reply(`Invalid level. Available: ${levels.join(", ")}`);
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
session.setThinkingLevel(arg), await ctx.reply(`Thinking \u2192 ${arg}`);
|
|
453
|
+
}
|
|
454
|
+
}, CHAT_COMMANDS = [
|
|
455
|
+
newCommand,
|
|
456
|
+
undoCommand,
|
|
457
|
+
redoCommand,
|
|
458
|
+
stopCommand,
|
|
459
|
+
statusCommand,
|
|
460
|
+
whoamiCommand,
|
|
461
|
+
helpCommand,
|
|
462
|
+
modelCommand,
|
|
463
|
+
sessionsCommand,
|
|
464
|
+
titleCommand,
|
|
465
|
+
contextCommand,
|
|
466
|
+
compactCommand,
|
|
467
|
+
thinkingCommand
|
|
468
|
+
];
|
|
469
|
+
function botCommandSpecs() {
|
|
470
|
+
return [
|
|
471
|
+
...new Map([...CHAT_COMMANDS, ...MOBILE_COMMANDS, ...FORWARDED_COMMANDS].map((c) => [
|
|
472
|
+
c.name,
|
|
473
|
+
{ name: c.name, description: c.description }
|
|
474
|
+
])).values()
|
|
475
|
+
];
|
|
476
|
+
}
|
|
477
|
+
function formatHelpText() {
|
|
478
|
+
let lines = ["lunR gateway commands:"];
|
|
479
|
+
for (let cmd of CHAT_COMMANDS) {
|
|
480
|
+
let names = [cmd.name, ...cmd.aliases ?? []].map((a) => `/${a}`).join(" | ");
|
|
481
|
+
lines.push(`${names} \u2014 ${cmd.description}`);
|
|
482
|
+
}
|
|
483
|
+
for (let cmd of botCommandSpecs())
|
|
484
|
+
CHAT_COMMANDS.some((c) => c.name === cmd.name) || lines.push(`/${cmd.name} \xB7 ${cmd.description}`);
|
|
485
|
+
return lines.push(""), lines.push("Tap to pick: /model, /thinking, /sessions (run without args to see buttons)."), lines.join(`
|
|
486
|
+
`);
|
|
487
|
+
}
|
|
488
|
+
async function runChatCommand(cmd, ctx) {
|
|
489
|
+
if (!cmd.bypassBusy && ctx.bridge.getStatus(ctx.key).busy)
|
|
490
|
+
return await ctx.reply("\u23F3 busy \u2014 /stop first or wait"), !0;
|
|
491
|
+
if (cmd.needsSession) {
|
|
492
|
+
let session = await ctx.bridge.getSession(ctx.key);
|
|
493
|
+
if (!session)
|
|
494
|
+
return await ctx.reply("No session yet \u2014 send a message first."), !0;
|
|
495
|
+
ctx.session = session;
|
|
496
|
+
}
|
|
497
|
+
try {
|
|
498
|
+
let settingsManager = ctx.session?.settingsManager;
|
|
499
|
+
return (settingsManager ? await runtimeScope.run({ settingsManager, modelRuntime: ctx.session?.modelRuntime, thinking: () => ctx.session.thinkingLevel }, () => cmd.handler(ctx)) : await cmd.handler(ctx)) ?? !0;
|
|
500
|
+
} catch (err) {
|
|
501
|
+
let message = err instanceof Error ? err.message : String(err);
|
|
502
|
+
return await ctx.adapter.send(ctx.event.source.chatId, `\u26A0 ${oneLine(message)}`, {
|
|
503
|
+
replyTo: ctx.event.messageId,
|
|
504
|
+
threadId: ctx.event.source.threadId
|
|
505
|
+
}), !0;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
async function sendCommandReply(adapter, event, text) {
|
|
509
|
+
await adapter.send(event.source.chatId, prefixLines(text, "\u263E "), {
|
|
510
|
+
replyTo: event.messageId,
|
|
511
|
+
threadId: event.source.threadId
|
|
512
|
+
});
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
export {
|
|
516
|
+
CHAT_COMMANDS,
|
|
517
|
+
botCommandSpecs,
|
|
518
|
+
formatHelpText,
|
|
519
|
+
runChatCommand,
|
|
520
|
+
sendCommandReply
|
|
521
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/core/todo-settings.js
|
|
4
|
+
var TODO_TOOL_NAMES = /* @__PURE__ */ new Set(["todo"]), TODOS_ENABLED_CHANGED_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/todos-enabled-changed");
|
|
5
|
+
function notifyTodosEnabledChanged(enabled) {
|
|
6
|
+
let handler = globalThis[TODOS_ENABLED_CHANGED_SYMBOL];
|
|
7
|
+
handler?.(enabled);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
TODO_TOOL_NAMES,
|
|
12
|
+
TODOS_ENABLED_CHANGED_SYMBOL,
|
|
13
|
+
notifyTodosEnabledChanged
|
|
14
|
+
};
|
|
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
getPermissionMode,
|
|
4
4
|
resetPermissions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5D7LC2ZQ.js";
|
|
6
6
|
|
|
7
7
|
// packages/coding-agent/dist/core/subagent-permission-inherit.js
|
|
8
8
|
var SUBAGENT_CHILD_ENV = "PI_SUBAGENT_CHILD", SUBAGENT_CHILD_PERMISSION_ENV = "PI_SUBAGENT_CHILD_PERMISSION";
|
|
@@ -133,7 +133,8 @@ ${chalk.bold("Usage:")}
|
|
|
133
133
|
${APP_NAME} [options] [@files...] [messages...]
|
|
134
134
|
|
|
135
135
|
${chalk.bold("Commands:")}
|
|
136
|
-
${APP_NAME} setup
|
|
136
|
+
${APP_NAME} setup Install Chromium and configure optional features
|
|
137
|
+
${APP_NAME} browser install Repair Chromium after offline or ignored-script installs
|
|
137
138
|
${APP_NAME} features [list|enable|disable]
|
|
138
139
|
${APP_NAME} uninstall Remove this ${APP_NAME} install (keeps agent dir unless --purge)
|
|
139
140
|
${APP_NAME} uninstall <source> [-l] Remove an extension package (alias for remove)
|