@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
|
@@ -4,6 +4,12 @@ import {
|
|
|
4
4
|
createCompactionSummaryMessage,
|
|
5
5
|
createCustomMessage
|
|
6
6
|
} from "./chunk-FVDOXRUD.js";
|
|
7
|
+
import {
|
|
8
|
+
SessionOwnership,
|
|
9
|
+
SessionOwnershipError,
|
|
10
|
+
canonicalSessionPath,
|
|
11
|
+
writeSessionJson
|
|
12
|
+
} from "./chunk-UAEOTO52.js";
|
|
7
13
|
import {
|
|
8
14
|
getAgentDir,
|
|
9
15
|
getSessionsDir,
|
|
@@ -13,8 +19,8 @@ import {
|
|
|
13
19
|
|
|
14
20
|
// packages/coding-agent/dist/core/session-manager.js
|
|
15
21
|
import { uuidv7 } from "@ashx-j/lunr-agent";
|
|
16
|
-
import { randomUUID } from "crypto";
|
|
17
|
-
import { appendFileSync, closeSync, createReadStream, existsSync, mkdirSync, openSync, readdirSync, readSync, statSync, writeFileSync } from "fs";
|
|
22
|
+
import { createHash, randomUUID } from "crypto";
|
|
23
|
+
import { appendFileSync, closeSync, createReadStream, existsSync, mkdirSync, openSync, readdirSync, readFileSync, readSync, statSync, writeFileSync } from "fs";
|
|
18
24
|
import { readdir, stat } from "fs/promises";
|
|
19
25
|
import { join, resolve } from "path";
|
|
20
26
|
import { createInterface } from "readline";
|
|
@@ -332,29 +338,107 @@ var SessionManager = class _SessionManager {
|
|
|
332
338
|
labelsById = /* @__PURE__ */ new Map();
|
|
333
339
|
labelTimestampsById = /* @__PURE__ */ new Map();
|
|
334
340
|
leafId = null;
|
|
341
|
+
ownership;
|
|
342
|
+
readOnly = !1;
|
|
343
|
+
disposed = !1;
|
|
344
|
+
permissionMode;
|
|
345
|
+
getPermissionMode() {
|
|
346
|
+
return this.permissionMode;
|
|
347
|
+
}
|
|
348
|
+
setPermissionMode(mode) {
|
|
349
|
+
this.assertWritable(), this.permissionMode = mode, this.saveLeaf();
|
|
350
|
+
}
|
|
351
|
+
assertWritable() {
|
|
352
|
+
if (this.readOnly || this.disposed)
|
|
353
|
+
throw new SessionOwnershipError(this.sessionFile ?? "in-memory", "Session is read-only or released.");
|
|
354
|
+
if (this.persist && (this.ownership?.assert(), this.ownership && this.sessionFile && canonicalSessionPath(this.sessionFile) !== this.ownership.owner.file))
|
|
355
|
+
throw new SessionOwnershipError(this.sessionFile, "Session ownership does not match the write target.");
|
|
356
|
+
}
|
|
357
|
+
getOwnership() {
|
|
358
|
+
return this.ownership;
|
|
359
|
+
}
|
|
360
|
+
copyInMemory() {
|
|
361
|
+
let copy = _SessionManager.inMemory(this.cwd);
|
|
362
|
+
return copy.sessionId = this.sessionId, copy.fileEntries = structuredClone(this.fileEntries), copy._buildIndex(), copy.leafId = this.leafId, copy;
|
|
363
|
+
}
|
|
364
|
+
dispose() {
|
|
365
|
+
this.disposed || (this.readOnly || this.saveLeaf(), this.ownership?.release(), this.disposed = !0);
|
|
366
|
+
}
|
|
367
|
+
flush() {
|
|
368
|
+
this.assertWritable(), this.persist && (this._rewriteFile(), this.flushed = !0, this.saveLeaf());
|
|
369
|
+
}
|
|
370
|
+
claim(file) {
|
|
371
|
+
this.assertWritable();
|
|
372
|
+
let canonical = canonicalSessionPath(file);
|
|
373
|
+
if (this.ownership?.owner.file === canonical)
|
|
374
|
+
return;
|
|
375
|
+
let next = new SessionOwnership(canonical);
|
|
376
|
+
this.saveLeaf(), this.ownership?.release(), this.ownership = next;
|
|
377
|
+
}
|
|
378
|
+
saveLeaf() {
|
|
379
|
+
!this.persist || !this.sessionFile || !this.flushed || (this.assertWritable(), writeSessionJson(`${this.sessionFile}.leaf.json`, {
|
|
380
|
+
id: this.sessionId,
|
|
381
|
+
leafId: this.leafId,
|
|
382
|
+
permissionMode: this.permissionMode,
|
|
383
|
+
revision: createHash("sha256").update(readFileSync(this.sessionFile)).digest("hex")
|
|
384
|
+
}));
|
|
385
|
+
}
|
|
386
|
+
restoreLeaf() {
|
|
387
|
+
if (this.sessionFile)
|
|
388
|
+
try {
|
|
389
|
+
let saved = JSON.parse(readFileSync(`${this.sessionFile}.leaf.json`, "utf8"));
|
|
390
|
+
saved.id === this.sessionId && ["manual", "yolo", "plan", "auto"].includes(saved.permissionMode) && (this.permissionMode = saved.permissionMode), saved.id === this.sessionId && (saved.leafId === null || this.byId.has(saved.leafId)) && saved.revision === createHash("sha256").update(readFileSync(this.sessionFile)).digest("hex") && (this.leafId = saved.leafId);
|
|
391
|
+
} catch {
|
|
392
|
+
}
|
|
393
|
+
}
|
|
335
394
|
constructor(cwd, sessionDir, sessionFile, persist, newSessionOptions) {
|
|
336
|
-
this.cwd = resolvePath(cwd), this.sessionDir = normalizePath(sessionDir), this.persist = persist, persist && this.sessionDir && !existsSync(this.sessionDir) && mkdirSync(this.sessionDir, { recursive: !0 })
|
|
395
|
+
this.cwd = resolvePath(cwd), this.sessionDir = normalizePath(sessionDir), this.persist = persist, persist && this.sessionDir && !existsSync(this.sessionDir) && mkdirSync(this.sessionDir, { recursive: !0 });
|
|
396
|
+
try {
|
|
397
|
+
sessionFile ? this.loadSessionFile(sessionFile) : this.newSession(newSessionOptions), this.ownership?.bindSession(this.sessionId);
|
|
398
|
+
} catch (error) {
|
|
399
|
+
throw this.ownership?.release(), error;
|
|
400
|
+
}
|
|
337
401
|
}
|
|
338
402
|
/** Switch to a different session file (used for resume and branching) */
|
|
339
403
|
setSessionFile(sessionFile) {
|
|
340
|
-
if (this.sessionFile
|
|
404
|
+
if (this.assertWritable(), this.sessionFile && canonicalSessionPath(sessionFile) === canonicalSessionPath(this.sessionFile)) {
|
|
405
|
+
this.loadSessionFile(sessionFile);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
let next = new _SessionManager(this.cwd, this.sessionDir, sessionFile, this.persist);
|
|
409
|
+
try {
|
|
410
|
+
this.dispose();
|
|
411
|
+
} catch (error) {
|
|
412
|
+
throw next.dispose(), error;
|
|
413
|
+
}
|
|
414
|
+
Object.assign(this, next);
|
|
415
|
+
}
|
|
416
|
+
loadSessionFile(sessionFile) {
|
|
417
|
+
if (this.claim(sessionFile), this.sessionFile = resolvePath(sessionFile), existsSync(this.sessionFile)) {
|
|
341
418
|
if (this.fileEntries = loadEntriesFromFile(this.sessionFile), this.fileEntries.length === 0) {
|
|
342
419
|
let explicitPath = this.sessionFile;
|
|
343
420
|
if (statSync(explicitPath).size > 0)
|
|
344
421
|
throw new Error(`Session file is not a valid pi session: ${explicitPath}`);
|
|
345
|
-
this.
|
|
422
|
+
this.initializeSession(), this.sessionFile = explicitPath, this._rewriteFile(), this.flushed = !0;
|
|
346
423
|
return;
|
|
347
424
|
}
|
|
348
425
|
let header = this.fileEntries.find((e) => e.type === "session");
|
|
349
|
-
this.sessionId = header?.id ?? createSessionId(), migrateToCurrentVersion(this.fileEntries) && this._rewriteFile(), this._buildIndex(), this.flushed = !0;
|
|
426
|
+
this.sessionId = header?.id ?? createSessionId(), migrateToCurrentVersion(this.fileEntries) && this._rewriteFile(), this._buildIndex(), this.restoreLeaf(), this.flushed = !0;
|
|
350
427
|
} else {
|
|
351
428
|
let explicitPath = this.sessionFile;
|
|
352
|
-
this.
|
|
429
|
+
this.initializeSession(), this.sessionFile = explicitPath;
|
|
353
430
|
}
|
|
354
431
|
}
|
|
355
432
|
newSession(options) {
|
|
433
|
+
this.assertWritable();
|
|
434
|
+
let id = options?.id ?? createSessionId();
|
|
435
|
+
assertValidSessionId(id);
|
|
436
|
+
let timestamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
437
|
+
return this.persist && this.claim(join(this.getSessionDir(), `${timestamp.replace(/[:.]/g, "-")}_${id}.jsonl`)), this.initializeSession({ ...options, id }, timestamp), this.ownership?.bindSession(this.sessionId), this.sessionFile;
|
|
438
|
+
}
|
|
439
|
+
initializeSession(options, timestamp = (/* @__PURE__ */ new Date()).toISOString()) {
|
|
356
440
|
options?.id !== void 0 && assertValidSessionId(options.id), this.sessionId = options?.id ?? createSessionId();
|
|
357
|
-
let
|
|
441
|
+
let header = {
|
|
358
442
|
type: "session",
|
|
359
443
|
version: CURRENT_SESSION_VERSION,
|
|
360
444
|
id: this.sessionId,
|
|
@@ -362,7 +446,7 @@ var SessionManager = class _SessionManager {
|
|
|
362
446
|
cwd: this.cwd,
|
|
363
447
|
parentSession: options?.parentSession
|
|
364
448
|
};
|
|
365
|
-
if (this.fileEntries = [header], this.byId.clear(), this.labelsById.clear(), this.labelTimestampsById.clear(), this.leafId = null, this.flushed = !1, this.persist) {
|
|
449
|
+
if (this.fileEntries = [header], this.byId.clear(), this.labelsById.clear(), this.labelTimestampsById.clear(), this.leafId = null, this.flushed = !1, this.permissionMode = void 0, this.persist) {
|
|
366
450
|
let fileTimestamp = timestamp.replace(/[:.]/g, "-");
|
|
367
451
|
this.sessionFile = join(this.getSessionDir(), `${fileTimestamp}_${this.sessionId}.jsonl`);
|
|
368
452
|
}
|
|
@@ -374,7 +458,7 @@ var SessionManager = class _SessionManager {
|
|
|
374
458
|
entry.type !== "session" && (this.byId.set(entry.id, entry), this.leafId = entry.id, entry.type === "label" && (entry.label ? (this.labelsById.set(entry.targetId, entry.label), this.labelTimestampsById.set(entry.targetId, entry.timestamp)) : (this.labelsById.delete(entry.targetId), this.labelTimestampsById.delete(entry.targetId))));
|
|
375
459
|
}
|
|
376
460
|
_rewriteFile() {
|
|
377
|
-
if (!this.persist || !this.sessionFile)
|
|
461
|
+
if (this.assertWritable(), !this.persist || !this.sessionFile)
|
|
378
462
|
return;
|
|
379
463
|
let fd = openSync(this.sessionFile, "w");
|
|
380
464
|
try {
|
|
@@ -404,7 +488,7 @@ var SessionManager = class _SessionManager {
|
|
|
404
488
|
return this.sessionFile;
|
|
405
489
|
}
|
|
406
490
|
_persist(entry) {
|
|
407
|
-
if (!this.persist || !this.sessionFile)
|
|
491
|
+
if (this.assertWritable(), !this.persist || !this.sessionFile)
|
|
408
492
|
return;
|
|
409
493
|
if (!this.fileEntries.some((e) => e.type === "message" && e.message.role === "assistant")) {
|
|
410
494
|
this.flushed ? appendFileSync(this.sessionFile, `${JSON.stringify(entry)}
|
|
@@ -427,7 +511,7 @@ var SessionManager = class _SessionManager {
|
|
|
427
511
|
}
|
|
428
512
|
}
|
|
429
513
|
_appendEntry(entry) {
|
|
430
|
-
this.fileEntries.push(entry), this.byId.set(entry.id, entry), this.leafId = entry.id, this._persist(entry);
|
|
514
|
+
this.assertWritable(), this.fileEntries.push(entry), this.byId.set(entry.id, entry), this.leafId = entry.id, this._persist(entry);
|
|
431
515
|
}
|
|
432
516
|
/** Append a message as child of current leaf, then advance leaf. Returns entry id.
|
|
433
517
|
* Does not allow writing CompactionSummaryMessage and BranchSummaryMessage directly.
|
|
@@ -658,9 +742,9 @@ var SessionManager = class _SessionManager {
|
|
|
658
742
|
* are not modified or deleted.
|
|
659
743
|
*/
|
|
660
744
|
branch(branchFromId) {
|
|
661
|
-
if (!this.byId.has(branchFromId))
|
|
745
|
+
if (this.assertWritable(), !this.byId.has(branchFromId))
|
|
662
746
|
throw new Error(`Entry ${branchFromId} not found`);
|
|
663
|
-
this.leafId = branchFromId;
|
|
747
|
+
this.leafId = branchFromId, this.flush();
|
|
664
748
|
}
|
|
665
749
|
/**
|
|
666
750
|
* Reset the leaf pointer to null (before any entries).
|
|
@@ -668,7 +752,7 @@ var SessionManager = class _SessionManager {
|
|
|
668
752
|
* Use this when navigating to re-edit the first user message.
|
|
669
753
|
*/
|
|
670
754
|
resetLeaf() {
|
|
671
|
-
this.leafId = null;
|
|
755
|
+
this.assertWritable(), this.leafId = null, this.flush();
|
|
672
756
|
}
|
|
673
757
|
/**
|
|
674
758
|
* Start a new branch with a summary of the abandoned path.
|
|
@@ -676,7 +760,7 @@ var SessionManager = class _SessionManager {
|
|
|
676
760
|
* context from the abandoned conversation path.
|
|
677
761
|
*/
|
|
678
762
|
branchWithSummary(branchFromId, summary, details, fromHook) {
|
|
679
|
-
if (branchFromId !== null && !this.byId.has(branchFromId))
|
|
763
|
+
if (this.assertWritable(), branchFromId !== null && !this.byId.has(branchFromId))
|
|
680
764
|
throw new Error(`Entry ${branchFromId} not found`);
|
|
681
765
|
this.leafId = branchFromId;
|
|
682
766
|
let entry = {
|
|
@@ -697,6 +781,7 @@ var SessionManager = class _SessionManager {
|
|
|
697
781
|
* Returns the new session file path, or undefined if not persisting.
|
|
698
782
|
*/
|
|
699
783
|
createBranchedSession(leafId) {
|
|
784
|
+
this.assertWritable();
|
|
700
785
|
let previousSessionFile = this.sessionFile, path = this.getBranch(leafId);
|
|
701
786
|
if (path.length === 0)
|
|
702
787
|
throw new Error(`Entry ${leafId} not found`);
|
|
@@ -726,7 +811,7 @@ var SessionManager = class _SessionManager {
|
|
|
726
811
|
};
|
|
727
812
|
pathEntryIds.add(labelEntry.id), labelEntries2.push(labelEntry), parentId2 = labelEntry.id;
|
|
728
813
|
}
|
|
729
|
-
return this.fileEntries = [header, ...pathWithoutLabels, ...labelEntries2], this.sessionId = newSessionId, this.sessionFile = newSessionFile, this._buildIndex(), this.fileEntries.some((e) => e.type === "message" && e.message.role === "assistant") ? (this._rewriteFile(), this.flushed = !0) : this.flushed = !1, newSessionFile;
|
|
814
|
+
return this.claim(newSessionFile), this.fileEntries = [header, ...pathWithoutLabels, ...labelEntries2], this.sessionId = newSessionId, this.ownership?.bindSession(this.sessionId), this.sessionFile = newSessionFile, this._buildIndex(), this.fileEntries.some((e) => e.type === "message" && e.message.role === "assistant") ? (this._rewriteFile(), this.flushed = !0) : this.flushed = !1, newSessionFile;
|
|
730
815
|
}
|
|
731
816
|
let labelEntries = [], parentId = pathWithoutLabels[pathWithoutLabels.length - 1]?.id || null;
|
|
732
817
|
for (let { targetId, label, timestamp: labelTimestamp } of labelsToWrite) {
|
|
@@ -758,8 +843,21 @@ var SessionManager = class _SessionManager {
|
|
|
758
843
|
* @param cwdOverride Optional cwd override instead of the session header cwd.
|
|
759
844
|
*/
|
|
760
845
|
static open(path, sessionDir, cwdOverride) {
|
|
761
|
-
let resolvedPath = resolvePath(path),
|
|
762
|
-
return
|
|
846
|
+
let resolvedPath = resolvePath(path), dir = sessionDir ? normalizePath(sessionDir) : resolve(resolvedPath, ".."), manager = new _SessionManager(cwdOverride ?? process.cwd(), dir, resolvedPath, !0);
|
|
847
|
+
return manager.cwd = resolvePath(cwdOverride ?? manager.getHeader()?.cwd ?? process.cwd()), manager;
|
|
848
|
+
}
|
|
849
|
+
static forkBranch(path, leafId, sessionDir) {
|
|
850
|
+
let manager = _SessionManager.openReadOnly(path);
|
|
851
|
+
return manager.readOnly = !1, manager.persist = !0, sessionDir && (manager.sessionDir = sessionDir), manager.createBranchedSession(leafId), manager;
|
|
852
|
+
}
|
|
853
|
+
static openReadOnly(path) {
|
|
854
|
+
let file = canonicalSessionPath(path), entries = loadEntriesFromFile(file);
|
|
855
|
+
migrateToCurrentVersion(entries);
|
|
856
|
+
let header = entries.find((entry) => entry.type === "session");
|
|
857
|
+
if (!header)
|
|
858
|
+
throw new Error(`Invalid session: ${file}`);
|
|
859
|
+
let manager = _SessionManager.inMemory(header.cwd);
|
|
860
|
+
return manager.sessionFile = file, manager.sessionDir = resolve(file, ".."), manager.sessionId = header.id, manager.fileEntries = entries, manager._buildIndex(), manager.restoreLeaf(), manager.readOnly = !0, manager;
|
|
763
861
|
}
|
|
764
862
|
/**
|
|
765
863
|
* Continue the most recent session, or create new if none.
|
|
@@ -789,20 +887,21 @@ var SessionManager = class _SessionManager {
|
|
|
789
887
|
throw new Error(`Cannot fork: source session has no header: ${resolvedSourcePath}`);
|
|
790
888
|
let dir = sessionDir ? normalizePath(sessionDir) : getDefaultSessionDir(resolvedTargetCwd);
|
|
791
889
|
existsSync(dir) || mkdirSync(dir, { recursive: !0 }), options?.id !== void 0 && assertValidSessionId(options.id);
|
|
792
|
-
let newSessionId = options?.id ?? createSessionId(), timestamp = (/* @__PURE__ */ new Date()).toISOString(), fileTimestamp = timestamp.replace(/[:.]/g, "-"), newSessionFile = join(dir, `${fileTimestamp}_${newSessionId}.jsonl`)
|
|
793
|
-
writeFileSync(newSessionFile, `${JSON.stringify({
|
|
890
|
+
let newSessionId = options?.id ?? createSessionId(), timestamp = (/* @__PURE__ */ new Date()).toISOString(), fileTimestamp = timestamp.replace(/[:.]/g, "-"), newSessionFile = join(dir, `${fileTimestamp}_${newSessionId}.jsonl`), newHeader = {
|
|
794
891
|
type: "session",
|
|
795
892
|
version: CURRENT_SESSION_VERSION,
|
|
796
893
|
id: newSessionId,
|
|
797
894
|
timestamp,
|
|
798
895
|
cwd: resolvedTargetCwd,
|
|
799
896
|
parentSession: resolvedSourcePath
|
|
800
|
-
})
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
897
|
+
}, manager = new _SessionManager(resolvedTargetCwd, dir, newSessionFile, !0);
|
|
898
|
+
try {
|
|
899
|
+
manager.fileEntries = [newHeader, ...sourceEntries.filter((entry) => entry.type !== "session")], manager.sessionId = newSessionId, manager.ownership?.bindSession(newSessionId), manager._buildIndex();
|
|
900
|
+
let snapshot = _SessionManager.openReadOnly(sourcePath);
|
|
901
|
+
return manager.leafId = snapshot.getLeafId(), manager.flush(), manager;
|
|
902
|
+
} catch (error) {
|
|
903
|
+
throw manager.dispose(), error;
|
|
904
|
+
}
|
|
806
905
|
}
|
|
807
906
|
/**
|
|
808
907
|
* List all sessions for a directory.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// packages/coding-agent/dist/core/experimental.js
|
|
4
|
+
function areExperimentalFeaturesEnabled() {
|
|
5
|
+
return process.env.PI_EXPERIMENTAL === "1";
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
areExperimentalFeaturesEnabled
|
|
10
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
parseArgs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E24EO34J.js";
|
|
6
6
|
import {
|
|
7
7
|
markStartupMilestone
|
|
8
8
|
} from "./chunk-CCZJ3PYY.js";
|
|
@@ -57,7 +57,7 @@ var args = process.argv.slice(2), startupBenchmark = process.env.PI_STARTUP_BENC
|
|
|
57
57
|
markStartupMilestone("mode_routed");
|
|
58
58
|
var startupView;
|
|
59
59
|
if (preloadMode === "interactive") {
|
|
60
|
-
let { InteractiveView } = await import("./interactive-view-
|
|
60
|
+
let { InteractiveView } = await import("./interactive-view-IDSCPPK7.js");
|
|
61
61
|
startupView = new InteractiveView(), startupView.start(), await startupView.waitForFirstFrame(), startupView.isExitRequested && process.exit(0);
|
|
62
62
|
}
|
|
63
63
|
var startRuntime = async () => {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import "./chunk-BRJX2PRC.js";
|
|
3
|
+
|
|
4
|
+
// packages/coding-agent/dist/gateway/command.js
|
|
5
|
+
async function handleGatewayCommand(args) {
|
|
6
|
+
if (args[0] !== "gateway")
|
|
7
|
+
return !1;
|
|
8
|
+
try {
|
|
9
|
+
let sub = args[1];
|
|
10
|
+
if (sub === "setup")
|
|
11
|
+
await (await import("./setup-NRXVZBLJ.js")).setupGateway();
|
|
12
|
+
else if (sub === "pair" && args[2] === "approve" && args.includes("--owner"))
|
|
13
|
+
console.log((await import("./setup-NRXVZBLJ.js")).approveGatewayOwner(args[3], args[4]));
|
|
14
|
+
else if (["start", "stop", "restart", "status", "logs", "doctor", "autostart"].includes(sub)) {
|
|
15
|
+
let service = await import("./service-ISSP6VHE.js");
|
|
16
|
+
if (sub === "start" && console.log(await service.startGatewayService()), sub === "stop" && console.log(await service.stopGatewayService()), sub === "restart" && (await service.stopGatewayService(), console.log(await service.startGatewayService())), (sub === "status" || sub === "doctor") && console.log(service.serviceStatusText()), sub === "logs" && console.log(service.readGatewayLog()), sub === "autostart") {
|
|
17
|
+
let mode = args[2];
|
|
18
|
+
if (mode !== "off" && mode !== "login" && mode !== "boot")
|
|
19
|
+
throw new Error("Usage: lunr gateway autostart off|login|boot");
|
|
20
|
+
await service.configureStartup(mode), console.log(`Automatic startup: ${mode}`);
|
|
21
|
+
}
|
|
22
|
+
if (sub === "doctor") {
|
|
23
|
+
let { loadGatewayConfig, resolvePlatformToken } = await import("./config-RORQUQFG.js"), cfg = loadGatewayConfig();
|
|
24
|
+
for (let platform of ["telegram", "discord"])
|
|
25
|
+
console.log(`${platform}: ${cfg[platform].enabled ? "enabled" : "disabled"}, token ${resolvePlatformToken(platform, cfg[platform]) ? "configured" : "missing"}, owners ${cfg.owners?.[platform].length ?? 0}`);
|
|
26
|
+
console.log(`Project roots: ${cfg.projectRoots?.length ?? 0}. Run lunr gateway setup to change these.
|
|
27
|
+
If startup is not responding, inspect lunr gateway logs. Do not delete a lock while its process is alive.`);
|
|
28
|
+
}
|
|
29
|
+
} else if (sub === "--help" || sub === "help" || sub === "-h")
|
|
30
|
+
console.log(`lunr gateway setup|start|stop|restart|status|logs|doctor|run
|
|
31
|
+
lunr gateway autostart off|login|boot
|
|
32
|
+
lunr gateway pair approve <platform> <code> [--owner]
|
|
33
|
+
lunr gateway pair list`);
|
|
34
|
+
else {
|
|
35
|
+
let { runGateway } = await import("./gateway-VFO6SFKK.js");
|
|
36
|
+
process.exitCode = await runGateway(sub === "run" ? args.slice(2) : args.slice(1));
|
|
37
|
+
}
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(error instanceof Error ? error.message : String(error)), process.exitCode = 1;
|
|
40
|
+
}
|
|
41
|
+
return !0;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
handleGatewayCommand
|
|
45
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
CHAT_COMMANDS,
|
|
4
|
+
botCommandSpecs,
|
|
5
|
+
formatHelpText,
|
|
6
|
+
runChatCommand,
|
|
7
|
+
sendCommandReply
|
|
8
|
+
} from "./chunk-BFNXONG3.js";
|
|
9
|
+
import "./chunk-V2A7CEXK.js";
|
|
10
|
+
import "./chunk-VJPTNWAP.js";
|
|
11
|
+
import "./chunk-RMQZU2YU.js";
|
|
12
|
+
import "./chunk-UWPJL22I.js";
|
|
13
|
+
import "./chunk-TQGPP4SC.js";
|
|
14
|
+
import "./chunk-OFKSVRV7.js";
|
|
15
|
+
import "./chunk-5BNJ4JUH.js";
|
|
16
|
+
import "./chunk-CGBXPL3E.js";
|
|
17
|
+
import "./chunk-BBUVIEZB.js";
|
|
18
|
+
import "./chunk-5D7LC2ZQ.js";
|
|
19
|
+
import "./chunk-M3LZLQW2.js";
|
|
20
|
+
import "./chunk-XLTL257W.js";
|
|
21
|
+
import "./chunk-FVDOXRUD.js";
|
|
22
|
+
import "./chunk-IMLCWLPI.js";
|
|
23
|
+
import "./chunk-UAEOTO52.js";
|
|
24
|
+
import "./chunk-R3K2F5GI.js";
|
|
25
|
+
import "./chunk-E24EO34J.js";
|
|
26
|
+
import "./chunk-7QWNYZDI.js";
|
|
27
|
+
import "./chunk-FQMM2EZ2.js";
|
|
28
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
29
|
+
import "./chunk-BRJX2PRC.js";
|
|
30
|
+
export {
|
|
31
|
+
CHAT_COMMANDS,
|
|
32
|
+
botCommandSpecs,
|
|
33
|
+
formatHelpText,
|
|
34
|
+
runChatCommand,
|
|
35
|
+
sendCommandReply
|
|
36
|
+
};
|
|
@@ -5,7 +5,13 @@ import {
|
|
|
5
5
|
lazyConnect,
|
|
6
6
|
updateMetadataCache,
|
|
7
7
|
updateStatusBar
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YJMMG7C6.js";
|
|
9
|
+
import {
|
|
10
|
+
authenticate,
|
|
11
|
+
getAuthForUrl,
|
|
12
|
+
removeAuth,
|
|
13
|
+
supportsOAuth
|
|
14
|
+
} from "./chunk-4TLO4PO2.js";
|
|
9
15
|
import {
|
|
10
16
|
ensureCompatibilityImports,
|
|
11
17
|
getMcpDiscoverySummary,
|
|
@@ -19,17 +25,11 @@ import {
|
|
|
19
25
|
writeSharedServerEntry,
|
|
20
26
|
writeStarterProjectConfig
|
|
21
27
|
} from "./chunk-VSELYKWU.js";
|
|
22
|
-
import {
|
|
23
|
-
authenticate,
|
|
24
|
-
getAuthForUrl,
|
|
25
|
-
removeAuth,
|
|
26
|
-
supportsOAuth
|
|
27
|
-
} from "./chunk-4TLO4PO2.js";
|
|
28
28
|
import {
|
|
29
29
|
getAgentPath
|
|
30
30
|
} from "./chunk-4HXHDDCF.js";
|
|
31
|
-
import "./chunk-BI3DHYCN.js";
|
|
32
31
|
import "./chunk-ARC4KOTI.js";
|
|
32
|
+
import "./chunk-BI3DHYCN.js";
|
|
33
33
|
import "./chunk-Q4Q6D4IY.js";
|
|
34
34
|
import "./chunk-BRJX2PRC.js";
|
|
35
35
|
|
|
@@ -255,7 +255,7 @@ function buildMcpPanelCallbacks(state, config, ctx) {
|
|
|
255
255
|
async function openMcpPanel(state, pi, ctx, configOverridePath) {
|
|
256
256
|
if (Object.keys(state.config.mcpServers).length === 0)
|
|
257
257
|
return openMcpSetup(state, pi, ctx, configOverridePath, "empty");
|
|
258
|
-
let config = state.config, cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), { lines: noticeLines, fingerprint } = buildSharedConfigNoticeLines(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-
|
|
258
|
+
let config = state.config, cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), { lines: noticeLines, fingerprint } = buildSharedConfigNoticeLines(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-KTTFXJZ4.js"), configChanged = !1;
|
|
259
259
|
return await new Promise((resolve) => {
|
|
260
260
|
ctx.ui.custom((tui, _theme, keybindings, done) => createMcpPanel(config, cache, provenanceMap, callbacks, tui, (result) => {
|
|
261
261
|
!result.cancelled && result.changes.size > 0 && (writeDirectToolsConfig(result.changes, provenanceMap, config), configChanged = !0, ctx.ui.notify("Direct tools updated. Pi will reload after this panel closes.", "info")), done(void 0), resolve();
|
|
@@ -268,7 +268,7 @@ async function openMcpAuthPanel(state, pi, ctx, configOverridePath) {
|
|
|
268
268
|
let config = state.config;
|
|
269
269
|
if (Object.entries(config.mcpServers).filter(([, definition]) => supportsOAuth(definition)).length === 0)
|
|
270
270
|
return ctx.ui.notify("No OAuth-capable MCP servers are configured.", "warning"), { configChanged: !1 };
|
|
271
|
-
let cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-
|
|
271
|
+
let cache = loadMetadataCache(), configPath = pi.getFlag("mcp-config") ?? configOverridePath, provenanceMap = getServerProvenance(configPath, ctx.cwd), callbacks = buildMcpPanelCallbacks(state, config, ctx), { createMcpPanel } = await import("./mcp-panel-KTTFXJZ4.js");
|
|
272
272
|
return await new Promise((resolve) => {
|
|
273
273
|
ctx.ui.custom((tui, _theme, keybindings, done) => createMcpPanel(config, cache, provenanceMap, callbacks, tui, () => {
|
|
274
274
|
done(void 0), resolve();
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
defaultGatewayConfig,
|
|
4
|
+
gatewayConfigPath,
|
|
5
|
+
loadGatewayConfig,
|
|
6
|
+
platformConfigFor,
|
|
7
|
+
resolvePlatformToken,
|
|
8
|
+
saveGatewayConfig
|
|
9
|
+
} from "./chunk-R3K2F5GI.js";
|
|
10
|
+
import "./chunk-FQMM2EZ2.js";
|
|
11
|
+
import "./chunk-Q4Q6D4IY.js";
|
|
12
|
+
import "./chunk-BRJX2PRC.js";
|
|
13
|
+
export {
|
|
14
|
+
defaultGatewayConfig,
|
|
15
|
+
gatewayConfigPath,
|
|
16
|
+
loadGatewayConfig,
|
|
17
|
+
platformConfigFor,
|
|
18
|
+
resolvePlatformToken,
|
|
19
|
+
saveGatewayConfig
|
|
20
|
+
};
|
package/dist/node-runtime/{direct-tool-executor-BK7CLEBX.js → direct-tool-executor-YAVOLDFY.js}
RENAMED
|
@@ -6,25 +6,25 @@ import {
|
|
|
6
6
|
resolveMcpOutputGuardOptions,
|
|
7
7
|
resolveMcpResultContent,
|
|
8
8
|
transformMcpContent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BX2RB477.js";
|
|
10
10
|
import {
|
|
11
11
|
formatSchema,
|
|
12
12
|
getFailureAgeSeconds,
|
|
13
13
|
lazyConnect
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
abortable,
|
|
17
|
-
formatAuthRequiredMessage,
|
|
18
|
-
throwIfAborted
|
|
19
|
-
} from "./chunk-VSELYKWU.js";
|
|
14
|
+
} from "./chunk-YJMMG7C6.js";
|
|
20
15
|
import {
|
|
21
16
|
UrlElicitationRequiredError,
|
|
22
17
|
authenticate,
|
|
23
18
|
supportsOAuth
|
|
24
19
|
} from "./chunk-4TLO4PO2.js";
|
|
20
|
+
import {
|
|
21
|
+
abortable,
|
|
22
|
+
formatAuthRequiredMessage,
|
|
23
|
+
throwIfAborted
|
|
24
|
+
} from "./chunk-VSELYKWU.js";
|
|
25
25
|
import "./chunk-4HXHDDCF.js";
|
|
26
|
-
import "./chunk-BI3DHYCN.js";
|
|
27
26
|
import "./chunk-ARC4KOTI.js";
|
|
27
|
+
import "./chunk-BI3DHYCN.js";
|
|
28
28
|
import "./chunk-Q4Q6D4IY.js";
|
|
29
29
|
import "./chunk-BRJX2PRC.js";
|
|
30
30
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
SessionManager
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XLTL257W.js";
|
|
5
5
|
import "./chunk-FVDOXRUD.js";
|
|
6
|
+
import "./chunk-UAEOTO52.js";
|
|
6
7
|
import {
|
|
7
8
|
getResolvedThemeColors,
|
|
8
9
|
getThemeExportColors
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-7QWNYZDI.js";
|
|
10
11
|
import {
|
|
11
12
|
APP_NAME,
|
|
12
13
|
getExportTemplateDir,
|
|
@@ -131,7 +132,7 @@ async function exportFromFile(inputPath, options) {
|
|
|
131
132
|
let opts = typeof options == "string" ? { outputPath: options } : options || {}, resolvedInputPath = resolvePath(inputPath);
|
|
132
133
|
if (!existsSync(resolvedInputPath))
|
|
133
134
|
throw new Error(`File not found: ${resolvedInputPath}`);
|
|
134
|
-
let sm = SessionManager.
|
|
135
|
+
let sm = SessionManager.openReadOnly(resolvedInputPath), sessionData = {
|
|
135
136
|
header: sm.getHeader(),
|
|
136
137
|
entries: sm.getEntries(),
|
|
137
138
|
leafId: sm.getLeafId(),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ExtensionInputComponent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PC2Z5TKZ.js";
|
|
5
5
|
import "./chunk-I6R76AG7.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-6B2POMK7.js";
|
|
7
|
+
import "./chunk-GNN7H3B7.js";
|
|
8
|
+
import "./chunk-7QWNYZDI.js";
|
|
9
9
|
import "./chunk-FQMM2EZ2.js";
|
|
10
10
|
import "./chunk-Q4Q6D4IY.js";
|
|
11
11
|
import "./chunk-BRJX2PRC.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
ExtensionSelectorComponent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6427XAWG.js";
|
|
5
5
|
import "./chunk-I6R76AG7.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-6B2POMK7.js";
|
|
7
|
+
import "./chunk-GNN7H3B7.js";
|
|
8
|
+
import "./chunk-7QWNYZDI.js";
|
|
9
9
|
import "./chunk-FQMM2EZ2.js";
|
|
10
10
|
import "./chunk-Q4Q6D4IY.js";
|
|
11
11
|
import "./chunk-BRJX2PRC.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
extractHeadingTitle,
|
|
5
5
|
fetchAllContent,
|
|
6
6
|
loadSsrfAllowRanges
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-UQUCFAJ3.js";
|
|
8
|
+
import "./chunk-NAY6UUQZ.js";
|
|
9
9
|
import "./chunk-DAPBPCBP.js";
|
|
10
10
|
import "./chunk-VRB2IYGG.js";
|
|
11
11
|
import "./chunk-BRJX2PRC.js";
|