@ashx-j/lunr-dev 0.2.21-dev.12.1 → 0.2.25-dev.13.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/CHANGELOG.md +25 -2
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +2 -2
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- 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 +9 -0
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -0
- package/dist/builtin-extensions/lunr-browser.js +169 -0
- package/dist/builtin-extensions/lunr-browser.js.map +1 -0
- package/dist/builtin-extensions/lunr-computer-use.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-computer-use.js +3 -3
- package/dist/builtin-extensions/lunr-computer-use.js.map +1 -1
- package/dist/builtin-extensions/lunr-plan-tools.d.ts +7 -7
- package/dist/builtin-extensions/lunr-plan-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-plan-tools.js +12 -12
- package/dist/builtin-extensions/lunr-plan-tools.js.map +1 -1
- package/dist/builtin-extensions/lunr-todos.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-todos.js +15 -0
- package/dist/builtin-extensions/lunr-todos.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +5 -0
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/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/index.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +18 -5
- 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 +1 -1
- 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 +8 -3
- 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 +2 -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 +10 -14
- 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 +4 -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 +167 -53
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.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 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.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/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +1 -1
- 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 +3 -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 +11 -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/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +41 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +5 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.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 +3 -2
- 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.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +23 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +2 -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 +20 -15
- 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 +4 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +2 -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/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 +48 -0
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -0
- 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 +23 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +255 -109
- 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/catalog-cache-scope.d.ts.map +1 -1
- package/dist/core/catalog-cache-scope.js +3 -1
- package/dist/core/catalog-cache-scope.js.map +1 -1
- package/dist/core/computer-use/image.d.ts +1 -0
- package/dist/core/computer-use/image.d.ts.map +1 -1
- package/dist/core/computer-use/image.js +8 -0
- package/dist/core/computer-use/image.js.map +1 -1
- package/dist/core/computer-use/schemas.d.ts +1 -0
- package/dist/core/computer-use/schemas.d.ts.map +1 -1
- package/dist/core/computer-use/schemas.js +2 -1
- package/dist/core/computer-use/schemas.js.map +1 -1
- package/dist/core/computer-use/workflow.d.ts.map +1 -1
- package/dist/core/computer-use/workflow.js +89 -23
- package/dist/core/computer-use/workflow.js.map +1 -1
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +15 -14
- 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/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +4 -0
- package/dist/core/extensions/loader.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-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +3 -2
- package/dist/core/model-runtime.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 +16 -23
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +71 -142
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts +10 -12
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +20 -19
- 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-bridges.d.ts.map +1 -1
- package/dist/core/runtime-bridges.js +2 -0
- package/dist/core/runtime-bridges.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 +26 -6
- 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 +191 -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 +20 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +67 -1
- 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 +6 -4
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-permission-inherit.d.ts +6 -10
- package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
- package/dist/core/subagent-permission-inherit.js +14 -14
- package/dist/core/subagent-permission-inherit.js.map +1 -1
- package/dist/core/subagent-wait-interruption.d.ts +11 -0
- package/dist/core/subagent-wait-interruption.d.ts.map +1 -0
- package/dist/core/subagent-wait-interruption.js +19 -0
- package/dist/core/subagent-wait-interruption.js.map +1 -0
- package/dist/core/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +14 -4
- 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 +14 -5
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +34 -7
- 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 +114 -24
- 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 +41 -11
- package/dist/gateway/adapters/telegram.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +18 -4
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +305 -73
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/approval.d.ts +3 -6
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +62 -24
- 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 +45 -20
- 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 +2 -0
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +52 -16
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/config.d.ts +6 -0
- package/dist/gateway/config.d.ts.map +1 -1
- package/dist/gateway/config.js +7 -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/cron.d.ts +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +2 -2
- package/dist/gateway/cron.js.map +1 -1
- 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 +106 -47
- 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 +423 -0
- package/dist/gateway/mobile-commands.js.map +1 -0
- package/dist/gateway/presenter.d.ts +27 -0
- package/dist/gateway/presenter.d.ts.map +1 -0
- package/dist/gateway/presenter.js +308 -0
- package/dist/gateway/presenter.js.map +1 -0
- package/dist/gateway/router.d.ts +6 -5
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +126 -43
- 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 +404 -0
- package/dist/gateway/service.js.map +1 -0
- package/dist/gateway/setup.d.ts +9 -0
- package/dist/gateway/setup.d.ts.map +1 -0
- package/dist/gateway/setup.js +202 -0
- package/dist/gateway/setup.js.map +1 -0
- package/dist/gateway/stream.d.ts +6 -5
- package/dist/gateway/stream.d.ts.map +1 -1
- package/dist/gateway/stream.js +24 -11
- package/dist/gateway/stream.js.map +1 -1
- 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 +3 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +19 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +78 -17
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +27 -0
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -0
- package/dist/modes/interactive/components/copyable-text.js +156 -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 +12 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +74 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.d.ts +9 -2
- package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.js +43 -1
- package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +5 -3
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +44 -45
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +10 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +342 -133
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +23 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/node-runtime/agent-session-services-MQUPZSIN.js +51 -0
- package/dist/node-runtime/{builtin-extensions-SRCYQPZ6.js → builtin-extensions-4GNDR6U3.js} +7 -6
- package/dist/node-runtime/{chunk-LTXUQJI4.js → chunk-24C5IAJ4.js} +1 -6
- package/dist/node-runtime/chunk-2BLXLDJR.js +144 -0
- package/dist/node-runtime/{chunk-RQ5DNUNG.js → chunk-2CMV4L24.js} +21 -124
- 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-GT5F3OKM.js → chunk-33SIKK3Y.js} +38 -164
- package/dist/node-runtime/{chunk-GZQHMEWL.js → chunk-3DKIWPKN.js} +19 -4
- package/dist/node-runtime/{chunk-3GHXVUAK.js → chunk-3VEY2IYY.js} +1 -1
- package/dist/node-runtime/chunk-4ER2ZV4Z.js +537 -0
- package/dist/node-runtime/chunk-4EULYYR4.js +62 -0
- package/dist/node-runtime/{chunk-LOYUC2ID.js → chunk-4SBQAI4T.js} +27 -27
- package/dist/node-runtime/{chunk-CZUBYPFP.js → chunk-53ARRUHA.js} +674 -257
- package/dist/node-runtime/{chunk-VTPM5V35.js → chunk-5Q4A37RB.js} +10 -4
- package/dist/node-runtime/{chunk-SWSN6HAB.js → chunk-5UZOPGE3.js} +1 -1
- package/dist/node-runtime/{chunk-XSRCAQK2.js → chunk-5Z5PCXGY.js} +263 -222
- package/dist/node-runtime/chunk-7JIYPIQU.js +356 -0
- package/dist/node-runtime/{chunk-D466UAID.js → chunk-AJ6R5VTV.js} +60 -88
- package/dist/node-runtime/chunk-ATIF3RX5.js +352 -0
- package/dist/node-runtime/{chunk-A3KMVBZV.js → chunk-BBUVIEZB.js} +1 -10
- package/dist/node-runtime/chunk-CCCN2UCX.js +14 -0
- package/dist/node-runtime/chunk-CJS4KQFI.js +3412 -0
- package/dist/node-runtime/chunk-DO6PALE2.js +205 -0
- package/dist/node-runtime/{chunk-N3PNL74S.js → chunk-DRJI7ZSC.js} +63 -163
- package/dist/node-runtime/{chunk-VTGEKB7R.js → chunk-E75WFZ33.js} +1 -1
- package/dist/node-runtime/{chunk-MJQDX3BA.js → chunk-EBB4BJW4.js} +3 -3
- package/dist/node-runtime/{chunk-VQ4UBWSA.js → chunk-EOEAQIJV.js} +63 -6
- package/dist/node-runtime/chunk-EOPL2HMM.js +117 -0
- package/dist/node-runtime/chunk-H4K3JDRB.js +47 -0
- package/dist/node-runtime/{chunk-HRS4HMDX.js → chunk-HT2XEJNP.js} +19 -3
- package/dist/node-runtime/chunk-IMLCWLPI.js +9 -0
- package/dist/node-runtime/{chunk-BJ6H7DPI.js → chunk-JJWZB7S3.js} +62 -50
- package/dist/node-runtime/chunk-KFFOQR4G.js +672 -0
- package/dist/node-runtime/chunk-L5LZUGT7.js +40 -0
- package/dist/node-runtime/chunk-LV6CEFW2.js +97 -0
- package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-LWYIVUGV.js} +2 -1
- package/dist/node-runtime/{chunk-BYQ2MOFI.js → chunk-MFV2LOOX.js} +184 -2192
- package/dist/node-runtime/{chunk-5SQDLSZJ.js → chunk-MNRO3UCV.js} +2 -2
- package/dist/node-runtime/{chunk-JHYKXIMM.js → chunk-MPKSOJBT.js} +1 -1
- package/dist/node-runtime/{chunk-C4O2RSQQ.js → chunk-N4TUWAGA.js} +1 -1
- package/dist/node-runtime/{chunk-7NBZ5P7I.js → chunk-NAY6UUQZ.js} +1 -1
- package/dist/node-runtime/chunk-NKH2QBKF.js +773 -0
- package/dist/node-runtime/chunk-O2AT4MEU.js +124 -0
- package/dist/node-runtime/chunk-OAR4TYZE.js +146 -0
- package/dist/node-runtime/{chunk-DDGMHUOW.js → chunk-OGJN3OZV.js} +2 -1
- package/dist/node-runtime/{chunk-MX3GJNXJ.js → chunk-PLGA743X.js} +23 -0
- package/dist/node-runtime/chunk-Q3FEOEDA.js +1364 -0
- package/dist/node-runtime/{chunk-H2BI7G7T.js → chunk-QFADHUQV.js} +2 -1
- package/dist/node-runtime/{chunk-W3SILANP.js → chunk-RBZQU6TJ.js} +12 -9
- package/dist/node-runtime/{chunk-ZVSORYRM.js → chunk-RVOQBXTA.js} +10 -6
- package/dist/node-runtime/{chunk-HXJS2PJM.js → chunk-RW4PYFNE.js} +14 -94
- package/dist/node-runtime/chunk-TP7K7YWS.js +2830 -0
- package/dist/node-runtime/{chunk-ZOIIMEN6.js → chunk-TVLBDVTR.js} +32 -21
- package/dist/node-runtime/chunk-UAEOTO52.js +119 -0
- package/dist/node-runtime/{chunk-MGWCVY6Y.js → chunk-UDKX3PFN.js} +3 -3
- package/dist/node-runtime/{chunk-AY6CAJSL.js → chunk-UJOCPOMX.js} +6 -3
- package/dist/node-runtime/{chunk-WJVFOIB5.js → chunk-UQUCFAJ3.js} +1 -1
- package/dist/node-runtime/chunk-US544NN6.js +13 -0
- package/dist/node-runtime/{chunk-7AFOFSDY.js → chunk-V3HK3FE7.js} +1 -1
- package/dist/node-runtime/{chunk-6UB6NKA3.js → chunk-VIVYOI7C.js} +130 -27
- package/dist/node-runtime/{chunk-MW2XJZIK.js → chunk-XHIRAZ26.js} +1 -1
- package/dist/node-runtime/chunk-YPHAIRZT.js +10 -0
- package/dist/node-runtime/{chunk-3RCWXWAY.js → chunk-YRUY57IN.js} +1 -1
- package/dist/node-runtime/cli-runtime.js +2 -2
- package/dist/node-runtime/command-PYBNGLPP.js +45 -0
- package/dist/node-runtime/{commands-BZGSLIP7.js → commands-EMBQQVVT.js} +13 -13
- package/dist/node-runtime/commands-Y2OUC2T7.js +37 -0
- package/dist/node-runtime/config-7DYMNJUO.js +20 -0
- package/dist/node-runtime/{customize-LF5VST47.js → customize-VFJV3U6A.js} +2 -1
- package/dist/node-runtime/{direct-tool-executor-BSZDHIYR.js → direct-tool-executor-4D7UXYU4.js} +10 -10
- package/dist/node-runtime/{export-html-E4DT6ZJQ.js → export-html-ETFOKW3M.js} +4 -3
- package/dist/node-runtime/{extension-input-RV5N6APL.js → extension-input-7QODTFAS.js} +4 -4
- package/dist/node-runtime/{extension-selector-CPD5LWDD.js → extension-selector-T65JEDJ5.js} +4 -4
- package/dist/node-runtime/{extract-XLQSJN4V.js → extract-EQJE7FZZ.js} +2 -2
- package/dist/node-runtime/gateway-QENRQA5X.js +1476 -0
- 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 +113 -73
- package/dist/node-runtime/{init-DVJUAOUO.js → init-P5AUV77I.js} +5 -5
- package/dist/node-runtime/{install-cli-TH7IJJQQ.js → install-cli-KHAXYBOO.js} +21 -82
- package/dist/node-runtime/interactive-mode-IN77GQGX.js +74 -0
- package/dist/node-runtime/{interactive-view-N6F4KUIT.js → interactive-view-OMWDFGUQ.js} +10 -10
- package/dist/node-runtime/lunr-browser-VVPRWC3F.js +174 -0
- package/dist/node-runtime/{lunr-computer-use-TJNDAMWM.js → lunr-computer-use-IAUNXSXH.js} +11 -8
- package/dist/node-runtime/{lunr-cron-J64I72C6.js → lunr-cron-P6ZJGVEF.js} +21 -7
- package/dist/node-runtime/main.js +47 -34
- package/dist/node-runtime/{mcp-auth-flow-YL6RWPYG.js → mcp-auth-flow-QVLFVLEO.js} +2 -2
- package/dist/node-runtime/{memory-cap-3S4XRLNP.js → memory-cap-EL3KL4JJ.js} +2 -1
- package/dist/node-runtime/mobile-commands-WKFSFACZ.js +33 -0
- package/dist/node-runtime/model-runtime-YXGJS5OJ.js +16 -0
- package/dist/node-runtime/{model-tiers-NJLHUEGK.js → model-tiers-OU3U5CZG.js} +2 -1
- package/dist/node-runtime/{package-manager-cli-VMYX4Y2S.js → package-manager-cli-J337RKTI.js} +25 -17
- package/dist/node-runtime/{pi-intercom-NV2LW6X7.js → pi-intercom-QM53RLTS.js} +6 -1
- package/dist/node-runtime/{pi-mcp-adapter-JLB5YL2F.js → pi-mcp-adapter-3PHF4KZ4.js} +8 -7
- package/dist/node-runtime/{pi-subagents-WEHV3W7H.js → pi-subagents-RCHPB6UK.js} +255 -88
- package/dist/node-runtime/{pi-web-access-FN5YC5T6.js → pi-web-access-PNG35XW7.js} +15 -15
- package/dist/node-runtime/process-registry-PVJ44F7H.js +31 -0
- package/dist/node-runtime/{proxy-modes-OR7ISBXK.js → proxy-modes-5FAPSZEZ.js} +11 -11
- package/dist/node-runtime/rpc-entry.js +47 -34
- package/dist/node-runtime/{rpc-mode-SJNSOA4G.js → rpc-mode-SH7VB4RH.js} +2 -2
- package/dist/node-runtime/runtime-4VA6JKNF.js +373 -0
- package/dist/node-runtime/runtime-bridges-3CQHWVVY.js +21 -0
- package/dist/node-runtime/service-HGGU3STY.js +36 -0
- package/dist/node-runtime/session-handoff-IAFIK7QP.js +33 -0
- package/dist/node-runtime/{session-manager-QEMZBMTM.js → session-manager-TCEFDKBL.js} +2 -1
- package/dist/node-runtime/{session-selector-URVJLOTK.js → session-selector-HG5J4BDZ.js} +5 -4
- package/dist/node-runtime/{settings-manager-3CCU326G.js → settings-manager-HIBIUNBK.js} +12 -5
- package/dist/node-runtime/setup-JBKOLJ6F.js +18 -0
- package/dist/node-runtime/setup-YU5LKRL3.js +215 -0
- package/dist/node-runtime/{subagent-executor-CXKXQDHH.js → subagent-executor-2BH76MMS.js} +64 -23
- package/dist/node-runtime/theme-WTJWZSGD.js +68 -0
- package/dist/node-runtime/trust-manager-6ZQANSBX.js +17 -0
- package/dist/node-runtime/{update-cli-NM7B4CKL.js → update-cli-TVTPVUNM.js} +6 -3
- 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/{workflow-C26QCUTW.js → workflow-TVJNKKQP.js} +80 -39
- package/dist/node-runtime/{youtube-extract-TQYKGFGS.js → youtube-extract-FNPAUNHU.js} +6 -6
- package/dist/startup/interactive-view.d.ts.map +1 -1
- package/dist/startup/interactive-view.js +5 -1
- package/dist/startup/interactive-view.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts +2 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +10 -0
- package/dist/utils/image-resize-core.js.map +1 -1
- package/docs/browser.md +86 -0
- package/docs/computer-use.md +134 -48
- package/docs/extensions.md +2 -0
- package/docs/features.md +108 -27
- package/docs/index.md +1 -1
- package/docs/interactive-startup.md +2 -1
- package/docs/keybindings.md +1 -1
- package/docs/providers.md +6 -2
- package/docs/quickstart.md +2 -2
- package/docs/sessions.md +10 -0
- package/docs/settings.md +3 -1
- package/docs/tui.md +2 -0
- package/docs/usage.md +20 -4
- 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/plan-mode/README.md +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/install-lock/package-lock.json +39 -25
- package/install-lock/package.json +2 -2
- package/npm-shrinkwrap.json +36 -22
- package/package.json +10 -7
- package/scripts/install-browser.mjs +20 -0
- package/dist/node-runtime/agent-session-services-QANFGM2V.js +0 -40
- package/dist/node-runtime/chunk-LISUTZS3.js +0 -19
- package/dist/node-runtime/chunk-VGYZ3APQ.js +0 -59
- package/dist/node-runtime/chunk-XAUQOKYK.js +0 -6011
- package/dist/node-runtime/command-ZURZJDXF.js +0 -13
- package/dist/node-runtime/gateway-FWHRIBK5.js +0 -2139
- package/dist/node-runtime/interactive-mode-BBASNWHN.js +0 -62
- package/dist/node-runtime/runtime-bridges-2VQTLPOZ.js +0 -12
- package/dist/node-runtime/{chunk-U6C7VTR5.js → chunk-7IQGBKBJ.js} +3 -3
- 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,352 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
getAgentDir
|
|
4
|
+
} from "./chunk-PCIGF2XK.js";
|
|
5
|
+
|
|
6
|
+
// packages/coding-agent/dist/gateway/service.js
|
|
7
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
8
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { homedir, userInfo } from "node:os";
|
|
11
|
+
import { dirname, join, resolve } from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
var servicePrefix = "lunr-gateway", serviceDirectory = () => join(getAgentDir(), "gateway-service"), gatewayLogPath = () => join(serviceDirectory(), "gateway.log"), statusPath = () => join(serviceDirectory(), "status.json"), controlPath = () => join(serviceDirectory(), "control.json"), settingsPath = () => join(serviceDirectory(), "service.json");
|
|
14
|
+
function atomicJson(path, value) {
|
|
15
|
+
mkdirSync(dirname(path), { recursive: !0, mode: 448 });
|
|
16
|
+
let temp = `${path}.${randomUUID()}.tmp`;
|
|
17
|
+
writeFileSync(temp, `${JSON.stringify(value, null, 2)}
|
|
18
|
+
`, { mode: 384 }), renameSync(temp, path);
|
|
19
|
+
}
|
|
20
|
+
function readJson(path) {
|
|
21
|
+
try {
|
|
22
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
23
|
+
} catch {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function loadServiceSettings() {
|
|
28
|
+
let raw = readJson(settingsPath());
|
|
29
|
+
return raw && typeof raw == "object" && "startup" in raw && (raw.startup === "login" || raw.startup === "boot") ? { startup: raw.startup } : { startup: "off" };
|
|
30
|
+
}
|
|
31
|
+
function processExists(pid) {
|
|
32
|
+
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
33
|
+
return !1;
|
|
34
|
+
try {
|
|
35
|
+
return process.kill(pid, 0), !0;
|
|
36
|
+
} catch (error) {
|
|
37
|
+
return !(error && typeof error == "object" && "code" in error && error.code === "ESRCH");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function readGatewayStatus(file = statusPath()) {
|
|
41
|
+
let raw = readJson(file);
|
|
42
|
+
if (!(!raw || typeof raw != "object" || !("version" in raw) || raw.version !== 1 || !("pid" in raw) || typeof raw.pid != "number") && !(!("instance" in raw) || typeof raw.instance != "string" || !("updatedAt" in raw) || typeof raw.updatedAt != "string") && !(!("state" in raw) || !["starting", "ready", "stopping"].includes(String(raw.state))) && !(!("platforms" in raw) || !raw.platforms || typeof raw.platforms != "object" || !("startedAt" in raw) || typeof raw.startedAt != "string"))
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
45
|
+
function gatewayIsRunning() {
|
|
46
|
+
let status = readGatewayStatus();
|
|
47
|
+
return !!status && processExists(status.pid);
|
|
48
|
+
}
|
|
49
|
+
function claimGateway(onStop) {
|
|
50
|
+
let dir = serviceDirectory();
|
|
51
|
+
mkdirSync(dir, { recursive: !0, mode: 448 });
|
|
52
|
+
let lock = join(dir, "lock");
|
|
53
|
+
try {
|
|
54
|
+
mkdirSync(lock);
|
|
55
|
+
} catch (error) {
|
|
56
|
+
if (!error || typeof error != "object" || !("code" in error) || error.code !== "EEXIST")
|
|
57
|
+
throw error;
|
|
58
|
+
let previous = readGatewayStatus(join(lock, "owner.json"));
|
|
59
|
+
if (!previous || processExists(previous.pid))
|
|
60
|
+
throw new Error("Gateway already running or startup lock is unresolved. Run lunr gateway doctor.");
|
|
61
|
+
let recovery = join(dir, "recovery");
|
|
62
|
+
mkdirSync(recovery);
|
|
63
|
+
try {
|
|
64
|
+
let current = readGatewayStatus(join(lock, "owner.json"));
|
|
65
|
+
if (!current || current.instance !== previous.instance || processExists(current.pid))
|
|
66
|
+
throw new Error("Gateway ownership changed. Try again.");
|
|
67
|
+
rmSync(lock, { recursive: !0 }), mkdirSync(lock);
|
|
68
|
+
} finally {
|
|
69
|
+
rmSync(recovery, { recursive: !0, force: !0 });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
let status = {
|
|
73
|
+
version: 1,
|
|
74
|
+
instance: randomUUID(),
|
|
75
|
+
pid: process.pid,
|
|
76
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
77
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
78
|
+
state: "starting",
|
|
79
|
+
platforms: {}
|
|
80
|
+
};
|
|
81
|
+
atomicJson(join(lock, "owner.json"), status);
|
|
82
|
+
let save = () => {
|
|
83
|
+
status.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), atomicJson(statusPath(), status);
|
|
84
|
+
};
|
|
85
|
+
save();
|
|
86
|
+
let stopping = !1, timer = setInterval(() => {
|
|
87
|
+
save();
|
|
88
|
+
let control = readJson(controlPath());
|
|
89
|
+
!stopping && control && typeof control == "object" && "instance" in control && control.instance === status.instance && "action" in control && control.action === "stop" && (stopping = !0, status.state = "stopping", onStop());
|
|
90
|
+
}, 500);
|
|
91
|
+
return {
|
|
92
|
+
update(platforms, state = "ready") {
|
|
93
|
+
if (stopping && state !== "stopping") {
|
|
94
|
+
stopping = !1;
|
|
95
|
+
let control = readJson(controlPath());
|
|
96
|
+
control && typeof control == "object" && "instance" in control && control.instance === status.instance && rmSync(controlPath(), { force: !0 });
|
|
97
|
+
}
|
|
98
|
+
status.platforms = { ...platforms }, status.state = state, save();
|
|
99
|
+
},
|
|
100
|
+
release() {
|
|
101
|
+
clearInterval(timer), readGatewayStatus()?.instance === status.instance && (rmSync(statusPath(), { force: !0 }), rmSync(controlPath(), { force: !0 }), rmSync(lock, { recursive: !0, force: !0 }));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function cliPath() {
|
|
106
|
+
let candidate = process.argv[1];
|
|
107
|
+
return candidate && existsSync(candidate) ? resolve(candidate) : fileURLToPath(new URL("../cli.js", new URL("../gateway/service.js", import.meta.url).href));
|
|
108
|
+
}
|
|
109
|
+
var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
110
|
+
async function startGatewayService() {
|
|
111
|
+
if (gatewayIsRunning()) {
|
|
112
|
+
if (readGatewayStatus()?.state === "ready")
|
|
113
|
+
return "Gateway is already running.";
|
|
114
|
+
throw new Error(`Gateway process is running but no bot is connected. ${serviceStatusText()}
|
|
115
|
+
Inspect ${gatewayLogPath()}`);
|
|
116
|
+
}
|
|
117
|
+
mkdirSync(serviceDirectory(), { recursive: !0, mode: 448 });
|
|
118
|
+
let startup = loadServiceSettings().startup;
|
|
119
|
+
if (startup !== "off") {
|
|
120
|
+
let user = userInfo(), spec = startupSpec(process.platform, startup, {
|
|
121
|
+
home: homedir(),
|
|
122
|
+
agentDir: getAgentDir(),
|
|
123
|
+
node: process.execPath,
|
|
124
|
+
cli: cliPath(),
|
|
125
|
+
username: user.username,
|
|
126
|
+
uid: user.uid
|
|
127
|
+
});
|
|
128
|
+
execute(spec.start);
|
|
129
|
+
for (let i = 0; i < 100; i++) {
|
|
130
|
+
if (readGatewayStatus()?.state === "ready" && gatewayIsRunning())
|
|
131
|
+
return "Gateway started.";
|
|
132
|
+
await sleep(200);
|
|
133
|
+
}
|
|
134
|
+
throw new Error(`Startup service did not connect within 20 seconds. ${serviceStatusText()}
|
|
135
|
+
Run lunr gateway doctor and inspect ${gatewayLogPath()}`);
|
|
136
|
+
}
|
|
137
|
+
let { openSync, closeSync } = await import("node:fs"), log = openSync(gatewayLogPath(), "a", 384), child = spawn(process.execPath, [cliPath(), "gateway", "run"], {
|
|
138
|
+
cwd: homedir(),
|
|
139
|
+
detached: !0,
|
|
140
|
+
windowsHide: !0,
|
|
141
|
+
stdio: ["ignore", log, log],
|
|
142
|
+
env: { ...process.env, PI_CODING_AGENT_DIR: getAgentDir() }
|
|
143
|
+
});
|
|
144
|
+
closeSync(log);
|
|
145
|
+
let spawnError;
|
|
146
|
+
child.on("error", (error) => {
|
|
147
|
+
spawnError = error;
|
|
148
|
+
}), child.unref();
|
|
149
|
+
for (let i = 0; i < 100; i++) {
|
|
150
|
+
if (spawnError)
|
|
151
|
+
throw spawnError;
|
|
152
|
+
let status = readGatewayStatus();
|
|
153
|
+
if (status && status.pid === child.pid && status.state === "ready")
|
|
154
|
+
return "Gateway started.";
|
|
155
|
+
if (child.exitCode !== null)
|
|
156
|
+
throw new Error(`Gateway exited with code ${child.exitCode}. See ${gatewayLogPath()}`);
|
|
157
|
+
await sleep(200);
|
|
158
|
+
}
|
|
159
|
+
throw new Error(`Gateway did not connect within 20 seconds. ${serviceStatusText()}
|
|
160
|
+
Check lunr gateway status and ${gatewayLogPath()}`);
|
|
161
|
+
}
|
|
162
|
+
async function stopGatewayService() {
|
|
163
|
+
let status = readGatewayStatus();
|
|
164
|
+
if (!status || !processExists(status.pid))
|
|
165
|
+
return "Gateway is not running.";
|
|
166
|
+
atomicJson(controlPath(), { instance: status.instance, action: "stop" });
|
|
167
|
+
for (let i = 0; i < 150; i++) {
|
|
168
|
+
if (readGatewayStatus()?.instance !== status.instance || !processExists(status.pid))
|
|
169
|
+
return "Gateway stopped.";
|
|
170
|
+
await sleep(200);
|
|
171
|
+
}
|
|
172
|
+
throw new Error("Gateway is still stopping after 30 seconds. Inspect the log; no unrelated process was terminated.");
|
|
173
|
+
}
|
|
174
|
+
function xml(value) {
|
|
175
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """);
|
|
176
|
+
}
|
|
177
|
+
function systemdArg(value) {
|
|
178
|
+
return `"${value.replaceAll("%", "%%").replaceAll("\\", "\\\\").replaceAll('"', '\\"')}"`;
|
|
179
|
+
}
|
|
180
|
+
function ps(value) {
|
|
181
|
+
return `'${value.replaceAll("'", "''")}'`;
|
|
182
|
+
}
|
|
183
|
+
function startupSpec(platform, mode, options) {
|
|
184
|
+
let { home, agentDir, node, cli, username, uid } = options;
|
|
185
|
+
if ([home, agentDir, node, cli, username].some((value) => /[\r\n\0]/.test(value)))
|
|
186
|
+
throw new Error("Startup paths and account names must not contain control characters.");
|
|
187
|
+
let suffix = createHash("sha256").update(resolve(agentDir)).digest("hex").slice(0, 10), serviceName = `${servicePrefix}-${suffix}`, log = join(agentDir, "gateway-service", "gateway.log");
|
|
188
|
+
if (platform === "linux")
|
|
189
|
+
return {
|
|
190
|
+
path: join(home, ".config", "systemd", "user", `${serviceName}.service`),
|
|
191
|
+
content: `[Unit]
|
|
192
|
+
Description=lunR chat gateway
|
|
193
|
+
After=network-online.target
|
|
194
|
+
|
|
195
|
+
[Service]
|
|
196
|
+
Type=simple
|
|
197
|
+
ExecStart=${systemdArg(node)} ${systemdArg(cli)} gateway run
|
|
198
|
+
WorkingDirectory=${systemdArg(home)}
|
|
199
|
+
Environment=${systemdArg(`PI_CODING_AGENT_DIR=${agentDir}`)}
|
|
200
|
+
Restart=on-failure
|
|
201
|
+
RestartSec=5
|
|
202
|
+
TimeoutStopSec=30
|
|
203
|
+
StandardOutput=append:${log.replaceAll("%", "%%")}
|
|
204
|
+
StandardError=append:${log.replaceAll("%", "%%")}
|
|
205
|
+
UMask=0077
|
|
206
|
+
|
|
207
|
+
[Install]
|
|
208
|
+
WantedBy=default.target
|
|
209
|
+
`,
|
|
210
|
+
install: [
|
|
211
|
+
...mode === "boot" ? [["loginctl", "enable-linger", username]] : [],
|
|
212
|
+
["systemctl", "--user", "daemon-reload"],
|
|
213
|
+
["systemctl", "--user", "enable", `${serviceName}.service`]
|
|
214
|
+
],
|
|
215
|
+
remove: [["systemctl", "--user", "disable", `${serviceName}.service`]],
|
|
216
|
+
verify: ["systemctl", "--user", "is-enabled", `${serviceName}.service`],
|
|
217
|
+
start: ["systemctl", "--user", "start", `${serviceName}.service`]
|
|
218
|
+
};
|
|
219
|
+
if (platform === "darwin") {
|
|
220
|
+
let label = `dev.lunr.gateway.${suffix}`, path = mode === "boot" ? `/Library/LaunchDaemons/${label}.plist` : join(home, "Library", "LaunchAgents", `${label}.plist`), domain = mode === "boot" ? "system" : `gui/${uid}`, command = (args) => mode === "boot" ? ["sudo", "launchctl", ...args] : ["launchctl", ...args];
|
|
221
|
+
return {
|
|
222
|
+
path,
|
|
223
|
+
content: `<?xml version="1.0" encoding="UTF-8"?>
|
|
224
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
225
|
+
<plist version="1.0"><dict><key>Label</key><string>${label}</string><key>ProgramArguments</key><array>${[node, cli, "gateway", "run"].map((v) => `<string>${xml(v)}</string>`).join("")}</array><key>WorkingDirectory</key><string>${xml(home)}</string>${mode === "boot" ? `<key>UserName</key><string>${xml(username)}</string>` : ""}<key>EnvironmentVariables</key><dict><key>PI_CODING_AGENT_DIR</key><string>${xml(agentDir)}</string><key>HOME</key><string>${xml(home)}</string></dict><key>RunAtLoad</key><true/><key>KeepAlive</key><dict><key>SuccessfulExit</key><false/></dict><key>StandardOutPath</key><string>${xml(log)}</string><key>StandardErrorPath</key><string>${xml(log)}</string></dict></plist>
|
|
226
|
+
`,
|
|
227
|
+
install: [command(["bootstrap", domain, path])],
|
|
228
|
+
remove: [command(["bootout", `${domain}/${label}`])],
|
|
229
|
+
verify: command(["print", `${domain}/${label}`]),
|
|
230
|
+
start: command(["kickstart", `${domain}/${label}`])
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
if (platform === "win32") {
|
|
234
|
+
let path = join(agentDir, "gateway-service", "startup.ps1"), content = `$env:PI_CODING_AGENT_DIR = ${ps(agentDir)}
|
|
235
|
+
Set-Location -LiteralPath ${ps(home)}
|
|
236
|
+
& ${ps(node)} ${ps(cli)} gateway run *>> ${ps(log)}
|
|
237
|
+
exit $LASTEXITCODE
|
|
238
|
+
`, action = `New-ScheduledTaskAction -Execute 'powershell.exe' -Argument ${ps(`-NoProfile -NonInteractive -WindowStyle Hidden -ExecutionPolicy Bypass -File "${path}"`)}`, trigger = mode === "boot" ? "New-ScheduledTaskTrigger -AtStartup" : `New-ScheduledTaskTrigger -AtLogOn -User ${ps(username)}`, register = `$ErrorActionPreference='Stop'; $a=${action}; $t=${trigger}; $s=New-ScheduledTaskSettingsSet -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1) -ExecutionTimeLimit ([TimeSpan]::Zero) -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries; ${mode === "boot" ? `$c=Get-Credential -UserName ${ps(username)} -Message 'Windows needs your account credentials to run lunR before login'; if(!$c){throw 'Cancelled'}; Register-ScheduledTask -TaskName '${serviceName}' -Action $a -Trigger $t -Settings $s -User $c.UserName -Password $c.GetNetworkCredential().Password -Force | Out-Null` : `Register-ScheduledTask -TaskName '${serviceName}' -Action $a -Trigger $t -Settings $s -User ${ps(username)} -Force | Out-Null`}`, command = (script) => ["powershell.exe", "-NoProfile", "-Command", script];
|
|
239
|
+
return {
|
|
240
|
+
path,
|
|
241
|
+
content,
|
|
242
|
+
install: [command(register)],
|
|
243
|
+
remove: [
|
|
244
|
+
command(`$ErrorActionPreference='Stop'; Unregister-ScheduledTask -TaskName '${serviceName}' -Confirm:$false`)
|
|
245
|
+
],
|
|
246
|
+
verify: command(`$ErrorActionPreference='Stop'; Get-ScheduledTask -TaskName '${serviceName}' | Out-Null`),
|
|
247
|
+
start: command(`$ErrorActionPreference='Stop'; Start-ScheduledTask -TaskName '${serviceName}'`)
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
throw new Error(`Automatic startup is not supported on ${platform}. Run lunr gateway start manually.`);
|
|
251
|
+
}
|
|
252
|
+
function execute(command) {
|
|
253
|
+
let [file, ...args] = command, result = spawnSync(file, args, { stdio: "inherit", windowsHide: !0, timeout: 12e4 });
|
|
254
|
+
if (result.error)
|
|
255
|
+
throw result.error;
|
|
256
|
+
if (result.status !== 0)
|
|
257
|
+
throw new Error(`${file} failed. Check OS permissions and run lunr gateway doctor.`);
|
|
258
|
+
}
|
|
259
|
+
async function configureStartup(mode) {
|
|
260
|
+
let previous = loadServiceSettings().startup;
|
|
261
|
+
if (process.platform === "linux" && mode === "login" && spawnSync("loginctl", ["show-user", userInfo().username, "--property=Linger", "--value"], {
|
|
262
|
+
encoding: "utf8",
|
|
263
|
+
timeout: 1e4
|
|
264
|
+
}).stdout?.trim() === "yes")
|
|
265
|
+
throw new Error("Linux user services already start at boot because lingering is enabled. Choose boot, or disable lingering yourself before choosing login. lunR will not change other user services.");
|
|
266
|
+
let user = userInfo(), options = {
|
|
267
|
+
home: homedir(),
|
|
268
|
+
agentDir: getAgentDir(),
|
|
269
|
+
node: process.execPath,
|
|
270
|
+
cli: cliPath(),
|
|
271
|
+
username: user.username,
|
|
272
|
+
uid: user.uid
|
|
273
|
+
};
|
|
274
|
+
if (previous !== "off") {
|
|
275
|
+
let old = startupSpec(process.platform, previous, options);
|
|
276
|
+
for (let command of old.remove)
|
|
277
|
+
execute(command);
|
|
278
|
+
process.platform === "darwin" && previous === "boot" ? execute(["sudo", "rm", "-f", old.path]) : rmSync(old.path, { force: !0 }), atomicJson(settingsPath(), { startup: "off" });
|
|
279
|
+
}
|
|
280
|
+
if (mode === "off") {
|
|
281
|
+
atomicJson(settingsPath(), { startup: "off" });
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
let spec = startupSpec(process.platform, mode, options);
|
|
285
|
+
if (mkdirSync(serviceDirectory(), { recursive: !0, mode: 448 }), process.platform === "darwin" && mode === "boot") {
|
|
286
|
+
let temporary = join(serviceDirectory(), "install.plist");
|
|
287
|
+
writeFileSync(temporary, spec.content, { mode: 384 });
|
|
288
|
+
try {
|
|
289
|
+
execute(["sudo", "install", "-o", "root", "-g", "wheel", "-m", "644", temporary, spec.path]);
|
|
290
|
+
} finally {
|
|
291
|
+
rmSync(temporary, { force: !0 });
|
|
292
|
+
}
|
|
293
|
+
} else
|
|
294
|
+
mkdirSync(dirname(spec.path), { recursive: !0, mode: 448 }), writeFileSync(spec.path, spec.content, { mode: 384 });
|
|
295
|
+
for (let command of spec.install)
|
|
296
|
+
execute(command);
|
|
297
|
+
execute(spec.verify), atomicJson(settingsPath(), { startup: mode });
|
|
298
|
+
}
|
|
299
|
+
function startupVerification() {
|
|
300
|
+
let mode = loadServiceSettings().startup;
|
|
301
|
+
if (mode === "off")
|
|
302
|
+
return "";
|
|
303
|
+
try {
|
|
304
|
+
let user = userInfo(), spec = startupSpec(process.platform, mode, {
|
|
305
|
+
home: homedir(),
|
|
306
|
+
agentDir: getAgentDir(),
|
|
307
|
+
node: process.execPath,
|
|
308
|
+
cli: cliPath(),
|
|
309
|
+
username: user.username,
|
|
310
|
+
uid: user.uid
|
|
311
|
+
}), [command, ...args] = spec.verify[0] === "sudo" ? spec.verify.slice(1) : spec.verify;
|
|
312
|
+
return spawnSync(command, args, { encoding: "utf8", windowsHide: !0, timeout: 5e3 }).status === 0 ? " (native service verified)" : " (native service missing or unavailable)";
|
|
313
|
+
} catch {
|
|
314
|
+
return " (native service could not be checked)";
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
function serviceStatusText() {
|
|
318
|
+
let status = readGatewayStatus(), alive = !!status && processExists(status.pid), fresh = !!status && Date.now() - Date.parse(status.updatedAt) < 5e3;
|
|
319
|
+
return [
|
|
320
|
+
`Gateway: ${alive ? `${status.state}${fresh ? "" : " (not responding)"}` : "stopped"}`,
|
|
321
|
+
`Automatic startup: ${loadServiceSettings().startup}${startupVerification()}`,
|
|
322
|
+
...alive ? [`PID: ${status.pid}`, ...Object.entries(status.platforms).map(([name, state]) => `${name}: ${state}`)] : [],
|
|
323
|
+
`Log: ${gatewayLogPath()}`
|
|
324
|
+
].join(`
|
|
325
|
+
`);
|
|
326
|
+
}
|
|
327
|
+
function readGatewayLog() {
|
|
328
|
+
try {
|
|
329
|
+
return readFileSync(gatewayLogPath(), "utf8").split(`
|
|
330
|
+
`).slice(-100).join(`
|
|
331
|
+
`).replace(/bot\d+:[A-Za-z0-9_-]+/g, "bot[redacted]");
|
|
332
|
+
} catch {
|
|
333
|
+
return "No gateway log yet.";
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export {
|
|
338
|
+
serviceDirectory,
|
|
339
|
+
gatewayLogPath,
|
|
340
|
+
atomicJson,
|
|
341
|
+
loadServiceSettings,
|
|
342
|
+
processExists,
|
|
343
|
+
readGatewayStatus,
|
|
344
|
+
gatewayIsRunning,
|
|
345
|
+
claimGateway,
|
|
346
|
+
startGatewayService,
|
|
347
|
+
stopGatewayService,
|
|
348
|
+
startupSpec,
|
|
349
|
+
configureStartup,
|
|
350
|
+
serviceStatusText,
|
|
351
|
+
readGatewayLog
|
|
352
|
+
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
-
import {
|
|
3
|
-
spinners
|
|
4
|
-
} from "./chunk-5ZH3ZFIZ.js";
|
|
5
2
|
|
|
6
3
|
// packages/coding-agent/dist/core/subagent-cancellation.js
|
|
7
4
|
var key = /* @__PURE__ */ Symbol.for("@lunr/subagent-cancellation"), store = globalThis, handlers = store[key] ?? /* @__PURE__ */ new Map();
|
|
@@ -46,15 +43,9 @@ var SubagentEscapeSequence = class {
|
|
|
46
43
|
}
|
|
47
44
|
};
|
|
48
45
|
|
|
49
|
-
// packages/coding-agent/dist/core/subagent-spinner.js
|
|
50
|
-
function getSubagentSpinnerDefinition(name) {
|
|
51
|
-
return spinners[name];
|
|
52
|
-
}
|
|
53
|
-
|
|
54
46
|
export {
|
|
55
47
|
registerSubagentCancellation,
|
|
56
48
|
getSubagentCancellation,
|
|
57
49
|
createSubagentCancellation,
|
|
58
|
-
SubagentEscapeSequence
|
|
59
|
-
getSubagentSpinnerDefinition
|
|
50
|
+
SubagentEscapeSequence
|
|
60
51
|
};
|
|
@@ -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
|
+
};
|