@ashx-j/lunr 0.2.11 → 0.2.13
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 +13 -0
- package/README.md +211 -236
- package/dist/builtin-extensions/ashxj-tui.d.ts +3 -0
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +28 -11
- 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 +0 -2
- package/dist/builtin-extensions/index.js.map +1 -1
- package/dist/builtin-extensions/lunr-cron.d.ts +1 -1
- package/dist/builtin-extensions/lunr-cron.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-cron.js +1 -1
- package/dist/builtin-extensions/lunr-cron.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.js +3 -3
- package/dist/builtin-extensions/pi-subagents/src/extension/chain-validation.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.d.ts +0 -2
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.js +1 -23
- package/dist/builtin-extensions/pi-subagents/src/extension/doctor.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 +6 -7
- 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 +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +7 -14
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts +12 -9
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +38 -34
- 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 +3 -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 +32 -47
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -2
- 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.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +7 -10
- 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 +90 -109
- 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-resume.d.ts +3 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js +37 -50
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-resume.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/run-status.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.d.ts +4 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.js +5 -5
- package/dist/builtin-extensions/pi-subagents/src/runs/background/scheduled-runs.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 +31 -13
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts +2 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-clarify.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +4 -3
- 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 +48 -20
- 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 +2 -2
- 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 +90 -64
- 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 +6 -8
- 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 +262 -161
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js +24 -33
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/acceptance.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +25 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +51 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js +20 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/dynamic-fanout.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/parallel-utils.d.ts +4 -1
- 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 +5 -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 +9 -3
- 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-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +2 -2
- 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 +20 -17
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/task-intent.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts +70 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +153 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.d.ts +13 -8
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.js +20 -51
- package/dist/builtin-extensions/pi-subagents/src/shared/settings.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +80 -20
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js +10 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/slash/prompt-workflows.d.ts +2 -2
- 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 +20 -32
- 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 +2 -1
- 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 +23 -449
- package/dist/builtin-extensions/pi-subagents/src/slash/slash-commands.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js +13 -11
- package/dist/builtin-extensions/pi-subagents/src/tui/render.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.d.ts +2 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.js +18 -17
- package/dist/builtin-extensions/pi-subagents/src/watchdog/runtime.js.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.d.ts +2 -2
- package/dist/builtin-extensions/simple-pi-memory.d.ts.map +1 -1
- package/dist/builtin-extensions/simple-pi-memory.js +41 -17
- package/dist/builtin-extensions/simple-pi-memory.js.map +1 -1
- package/dist/catalog/models.json +1 -1
- package/dist/catalog/providers/amazon-bedrock.json +1 -1
- package/dist/catalog/providers/azure-openai-responses.json +1 -1
- package/dist/catalog/providers/cloudflare-ai-gateway.json +1 -1
- package/dist/catalog/providers/cloudflare-workers-ai.json +1 -1
- package/dist/catalog/providers/fireworks.json +1 -1
- package/dist/catalog/providers/github-copilot.json +1 -1
- package/dist/catalog/providers/huggingface.json +1 -1
- package/dist/catalog/providers/minimax-cn.json +1 -1
- package/dist/catalog/providers/minimax.json +1 -1
- package/dist/catalog/providers/mistral.json +1 -1
- package/dist/catalog/providers/nvidia.json +1 -1
- package/dist/catalog/providers/openai.json +1 -1
- package/dist/catalog/providers/opencode-go.json +1 -1
- package/dist/catalog/providers/opencode.json +1 -1
- package/dist/catalog/providers/openrouter.json +1 -1
- package/dist/catalog/providers/qwen-cloud-cn.json +1 -1
- package/dist/catalog/providers/qwen-cloud.json +1 -1
- package/dist/catalog/providers/qwen-token-plan-cn.json +1 -1
- package/dist/catalog/providers/qwen-token-plan.json +1 -1
- package/dist/catalog/providers/together.json +1 -1
- package/dist/catalog/providers/vercel-ai-gateway.json +1 -1
- package/dist/catalog/providers/zai-coding-cn.json +1 -1
- package/dist/catalog/providers/zai.json +1 -1
- package/dist/catalog/publication.json +3 -3
- package/dist/core/agent-session.d.ts +7 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +34 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/context-breakdown.d.ts +3 -1
- package/dist/core/context-breakdown.d.ts.map +1 -1
- package/dist/core/context-breakdown.js +5 -2
- package/dist/core/context-breakdown.js.map +1 -1
- package/dist/core/customize.d.ts +2 -0
- package/dist/core/customize.d.ts.map +1 -1
- package/dist/core/customize.js +6 -0
- package/dist/core/customize.js.map +1 -1
- package/dist/core/memory-cap.d.ts +4 -8
- package/dist/core/memory-cap.d.ts.map +1 -1
- package/dist/core/memory-cap.js +8 -8
- package/dist/core/memory-cap.js.map +1 -1
- package/dist/core/permissions.d.ts +2 -0
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +30 -14
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +1 -9
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/rollback.d.ts.map +1 -1
- package/dist/core/rollback.js +1 -1
- package/dist/core/rollback.js.map +1 -1
- package/dist/core/settings-manager.d.ts +16 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +37 -10
- 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 +1 -5
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-permission-inherit.d.ts +34 -22
- package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
- package/dist/core/subagent-permission-inherit.js +37 -80
- package/dist/core/subagent-permission-inherit.js.map +1 -1
- package/dist/core/swarm.d.ts.map +1 -1
- package/dist/core/swarm.js +13 -7
- package/dist/core/swarm.js.map +1 -1
- package/dist/core/system-prompt.d.ts +6 -4
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +38 -48
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/usage-adapters/openai-codex.d.ts +1 -1
- package/dist/core/usage-adapters/openai-codex.d.ts.map +1 -1
- package/dist/core/usage-adapters/openai-codex.js +22 -17
- package/dist/core/usage-adapters/openai-codex.js.map +1 -1
- package/dist/core/usage-service.d.ts +10 -1
- package/dist/core/usage-service.d.ts.map +1 -1
- package/dist/core/usage-service.js +17 -6
- package/dist/core/usage-service.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +1 -4
- package/dist/gateway/agent-bridge.js.map +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +1 -4
- package/dist/gateway/cron.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +0 -5
- package/dist/main.js.map +1 -1
- package/dist/migrations.d.ts +2 -0
- package/dist/migrations.d.ts.map +1 -1
- package/dist/migrations.js +21 -0
- package/dist/migrations.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +7 -4
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +122 -162
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/usage-view.d.ts +1 -1
- package/dist/modes/interactive/components/usage-view.d.ts.map +1 -1
- package/dist/modes/interactive/components/usage-view.js +7 -4
- package/dist/modes/interactive/components/usage-view.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +55 -96
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/skill-tag-autocomplete.d.ts +13 -0
- package/dist/modes/interactive/skill-tag-autocomplete.d.ts.map +1 -0
- package/dist/modes/interactive/skill-tag-autocomplete.js +72 -0
- package/dist/modes/interactive/skill-tag-autocomplete.js.map +1 -0
- package/docs/compaction.md +23 -23
- package/docs/containerization.md +24 -24
- package/docs/custom-provider.md +18 -18
- package/docs/development.md +16 -15
- package/docs/docs.json +6 -2
- package/docs/extensions.md +82 -80
- package/docs/features.md +102 -0
- package/docs/index.md +25 -19
- package/docs/json.md +7 -7
- package/docs/keybindings.md +4 -4
- package/docs/models.md +2 -2
- package/docs/packages.md +38 -42
- package/docs/prompt-templates.md +4 -4
- package/docs/providers.md +22 -10
- package/docs/quickstart.md +81 -46
- package/docs/rpc.md +7 -13
- package/docs/sdk.md +43 -41
- package/docs/security.md +18 -18
- package/docs/session-format.md +9 -9
- package/docs/sessions.md +13 -12
- package/docs/settings.md +63 -24
- package/docs/shell-aliases.md +2 -2
- package/docs/skills.md +21 -11
- package/docs/terminal-setup.md +5 -5
- package/docs/termux.md +7 -7
- package/docs/themes.md +12 -14
- package/docs/tmux.md +4 -4
- package/docs/tui.md +23 -23
- package/docs/usage.md +112 -87
- package/docs/windows.md +10 -2
- package/examples/README.md +3 -1
- package/examples/extensions/README.md +6 -6
- 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/doom-overlay/README.md +2 -2
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/README.md +3 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +13 -11
- package/examples/extensions/todo.ts +2 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/README.md +9 -5
- package/package.json +6 -7
- package/dist/builtin-extensions/lunr-behavior.d.ts +0 -44
- package/dist/builtin-extensions/lunr-behavior.d.ts.map +0 -1
- package/dist/builtin-extensions/lunr-behavior.js +0 -213
- package/dist/builtin-extensions/lunr-behavior.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/agents/context-builder.md +0 -46
- package/dist/builtin-extensions/pi-subagents/agents/deep-researcher.md +0 -36
- package/dist/builtin-extensions/pi-subagents/agents/delegate.md +0 -12
- package/dist/builtin-extensions/pi-subagents/agents/oracle.md +0 -73
- package/dist/builtin-extensions/pi-subagents/agents/planner.md +0 -55
- package/dist/builtin-extensions/pi-subagents/agents/research-writer.md +0 -37
- package/dist/builtin-extensions/pi-subagents/agents/researcher.md +0 -52
- package/dist/builtin-extensions/pi-subagents/agents/reviewer.md +0 -79
- package/dist/builtin-extensions/pi-subagents/agents/scout.md +0 -50
- package/dist/builtin-extensions/pi-subagents/agents/worker.md +0 -55
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.d.ts +0 -20
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.js +0 -1273
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-management.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.d.ts +0 -49
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.js +0 -252
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-memory.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.d.ts +0 -3
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.js +0 -6
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-scope.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.d.ts +0 -3
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.js +0 -23
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-selection.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.d.ts +0 -8
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.js +0 -143
- package/dist/builtin-extensions/pi-subagents/src/agents/agent-serializer.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.d.ts +0 -176
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.js +0 -1326
- package/dist/builtin-extensions/pi-subagents/src/agents/agents.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.d.ts +0 -7
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.js +0 -307
- package/dist/builtin-extensions/pi-subagents/src/agents/chain-serializer.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.d.ts +0 -8
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.js +0 -30
- package/dist/builtin-extensions/pi-subagents/src/agents/identity.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.d.ts +0 -35
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.js +0 -151
- package/dist/builtin-extensions/pi-subagents/src/agents/proactive-skills.js.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.d.ts +0 -131
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.d.ts.map +0 -1
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.js +0 -491
- package/dist/builtin-extensions/pi-subagents/src/profiles/profiles.js.map +0 -1
- package/dist/core/behavior-preset.d.ts +0 -60
- package/dist/core/behavior-preset.d.ts.map +0 -1
- package/dist/core/behavior-preset.js +0 -257
- package/dist/core/behavior-preset.js.map +0 -1
package/docs/quickstart.md
CHANGED
|
@@ -1,91 +1,115 @@
|
|
|
1
1
|
# Quickstart
|
|
2
2
|
|
|
3
|
-
This page gets you from install to a useful first
|
|
3
|
+
This page gets you from install to a useful first lunR session.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Requires **Node.js ≥ 22.19**. lunR is distributed as `@ashx-j/lunr`:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm
|
|
10
|
+
npm i -g @ashx-j/lunr
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
`--ignore-scripts`
|
|
13
|
+
`--ignore-scripts` is optional; lunR does not require install scripts for a normal npm install. There is no pi.dev `install.sh`.
|
|
14
14
|
|
|
15
15
|
### Uninstall
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Product uninstall vs package uninstall:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
#
|
|
21
|
-
|
|
20
|
+
# Remove this lunR install; keeps ~/.lunr/agent
|
|
21
|
+
lunr uninstall
|
|
22
22
|
|
|
23
|
-
#
|
|
24
|
-
|
|
23
|
+
# Also wipe ~/.lunr/agent (settings, credentials, sessions, packages)
|
|
24
|
+
lunr uninstall --purge
|
|
25
25
|
|
|
26
|
-
#
|
|
27
|
-
|
|
26
|
+
# Remove an extension package (alias for lunr remove)
|
|
27
|
+
lunr uninstall npm:@foo/bar
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
You can also uninstall the npm package itself:
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
```bash
|
|
33
|
+
npm uninstall -g @ashx-j/lunr
|
|
34
|
+
pnpm remove -g @ashx-j/lunr
|
|
35
|
+
yarn global remove @ashx-j/lunr
|
|
36
|
+
bun uninstall -g @ashx-j/lunr
|
|
31
37
|
```
|
|
32
38
|
|
|
33
|
-
|
|
39
|
+
`npm uninstall -g` leaves settings, credentials, sessions, and installed packages in `~/.lunr/agent/`. Use `lunr uninstall --purge` to wipe that directory.
|
|
34
40
|
|
|
35
|
-
|
|
41
|
+
Optional first-run features (Telegram/Discord gateway):
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
lunr setup
|
|
45
|
+
lunr features list
|
|
46
|
+
lunr features enable chat-platforms
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Then start lunR in the project directory you want it to work on:
|
|
36
50
|
|
|
37
51
|
```bash
|
|
38
52
|
cd /path/to/project
|
|
39
|
-
|
|
53
|
+
lunr
|
|
40
54
|
```
|
|
41
55
|
|
|
56
|
+
Config lives in `~/.lunr/agent` (global) and project `.lunr/`. Override with `PI_CODING_AGENT_DIR`. Never use `~/.pi/` as the lunR home.
|
|
57
|
+
|
|
42
58
|
## Authenticate
|
|
43
59
|
|
|
44
|
-
|
|
60
|
+
lunR can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
|
|
45
61
|
|
|
46
62
|
### Option 1: subscription login
|
|
47
63
|
|
|
48
|
-
Start
|
|
64
|
+
Start lunR and run:
|
|
49
65
|
|
|
50
66
|
```text
|
|
51
67
|
/login
|
|
52
68
|
```
|
|
53
69
|
|
|
54
|
-
Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and
|
|
70
|
+
Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), GitHub Copilot, and xAI SuperGrok.
|
|
71
|
+
|
|
72
|
+
`/login xai` can import the Grok CLI session from `~/.grok/auth.json`. `/logout xai` does not delete that file.
|
|
73
|
+
|
|
74
|
+
Local Ollama and LM Studio: `/login` and select the local provider (lunR probes localhost). OpenCode Zen: `/login opencode` then `/refresh`.
|
|
55
75
|
|
|
56
76
|
### Option 2: API key
|
|
57
77
|
|
|
58
|
-
Set an API key before launching
|
|
78
|
+
Set an API key before launching lunR:
|
|
59
79
|
|
|
60
80
|
```bash
|
|
61
81
|
export ANTHROPIC_API_KEY=sk-ant-...
|
|
62
|
-
|
|
82
|
+
lunr
|
|
63
83
|
```
|
|
64
84
|
|
|
65
|
-
You can also run `/login` and select an API-key provider to store the key in `~/.
|
|
85
|
+
You can also run `/login` and select an API-key provider to store the key in `~/.lunr/agent/auth.json`.
|
|
66
86
|
|
|
67
87
|
See [Providers](providers.md) for all supported providers, environment variables, and cloud-provider setup.
|
|
68
88
|
|
|
89
|
+
`/model` lists **stored-credential** providers only. An environment variable such as `OPENROUTER_API_KEY` does not list that provider until you store a credential or pass `--api-key`. First paint is cache-only; run `/refresh` to pull newer catalogs.
|
|
90
|
+
|
|
69
91
|
## First session
|
|
70
92
|
|
|
71
|
-
Once
|
|
93
|
+
Once lunR starts, type a request and press Enter:
|
|
72
94
|
|
|
73
95
|
```text
|
|
74
96
|
Summarize this repository and tell me how to run its checks.
|
|
75
97
|
```
|
|
76
98
|
|
|
77
|
-
By default,
|
|
99
|
+
By default, lunR gives the model four tools:
|
|
78
100
|
|
|
79
101
|
- `read` - read files
|
|
80
102
|
- `write` - create or overwrite files
|
|
81
103
|
- `edit` - patch files
|
|
82
104
|
- `bash` - run shell commands
|
|
83
105
|
|
|
84
|
-
Additional built-in read-only tools (`grep`, `find`, `ls`)
|
|
106
|
+
Additional built-in read-only tools (`grep`, `find`, `ls`) exist but start off. lunR runs in your current working directory and can modify files there. Use git or `/rollback` if you want easy undo.
|
|
85
107
|
|
|
86
|
-
|
|
108
|
+
Permission modes are `manual | yolo | plan | auto`. Shift+Tab cycles that order. In plan mode the model uses `present_plan` for approval.
|
|
87
109
|
|
|
88
|
-
|
|
110
|
+
## Give lunR project instructions
|
|
111
|
+
|
|
112
|
+
lunR loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
|
|
89
113
|
|
|
90
114
|
```markdown
|
|
91
115
|
# Project Instructions
|
|
@@ -95,12 +119,12 @@ Pi loads context files at startup. Add an `AGENTS.md` file to tell it how to wor
|
|
|
95
119
|
- Keep responses concise.
|
|
96
120
|
```
|
|
97
121
|
|
|
98
|
-
|
|
122
|
+
lunR loads:
|
|
99
123
|
|
|
100
|
-
- `~/.
|
|
124
|
+
- `~/.lunr/agent/AGENTS.md` for global instructions
|
|
101
125
|
- `AGENTS.md` or `CLAUDE.md` from parent directories and the current directory
|
|
102
126
|
|
|
103
|
-
Restart
|
|
127
|
+
Restart lunR, or run `/reload`, after changing context files.
|
|
104
128
|
|
|
105
129
|
## Common things to try
|
|
106
130
|
|
|
@@ -109,11 +133,11 @@ Restart pi, or run `/reload`, after changing context files.
|
|
|
109
133
|
Type `@` in the editor to fuzzy-search files, or pass files on the command line:
|
|
110
134
|
|
|
111
135
|
```bash
|
|
112
|
-
|
|
113
|
-
|
|
136
|
+
lunr @README.md "Summarize this"
|
|
137
|
+
lunr @src/app.ts @src/app.test.ts "Review these together"
|
|
114
138
|
```
|
|
115
139
|
|
|
116
|
-
|
|
140
|
+
Paste images with Ctrl+V (Alt+V on Windows). The editor inserts `[image_1]`, `[image_2]`, … chips instead of a temp path. Dragging images into supported terminals also works.
|
|
117
141
|
|
|
118
142
|
### Run shell commands
|
|
119
143
|
|
|
@@ -123,43 +147,54 @@ In interactive mode:
|
|
|
123
147
|
!npm run lint
|
|
124
148
|
```
|
|
125
149
|
|
|
126
|
-
The command output is sent to the model. Use `!!command` to run a command without adding its output to the model context.
|
|
150
|
+
The command output is sent to the model. Use `!!command` to run a command without adding its output to the model context. `/processes` lists background processes started this session.
|
|
127
151
|
|
|
128
152
|
### Switch models
|
|
129
153
|
|
|
130
|
-
Use `/model` or Ctrl+L to choose a model. Use Shift+Tab to cycle permission mode (manual → yolo → plan → auto). Use `/thinking`, `/effort`, `/reasoning`, or `/settings` to change thinking level. Use Ctrl+P / Shift+Ctrl+P to cycle through scoped models.
|
|
154
|
+
Use `/model` or Ctrl+L to choose a model. Use Shift+Tab to cycle permission mode (manual → yolo → plan → auto). Use `/thinking`, `/effort`, `/reasoning`, or `/settings` to change thinking level. `xhigh` and `max` are opt-in when the model supports them. Use Ctrl+P / Shift+Ctrl+P to cycle through scoped models. Catalog refresh is `/refresh`, not `lunr update`.
|
|
131
155
|
|
|
132
156
|
### Continue later
|
|
133
157
|
|
|
134
158
|
Sessions are saved automatically:
|
|
135
159
|
|
|
136
160
|
```bash
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
161
|
+
lunr -c # Continue most recent session
|
|
162
|
+
lunr -r # Browse previous sessions
|
|
163
|
+
lunr --name "my task" # Set session display name at startup
|
|
164
|
+
lunr --session <path|id> # Open a specific session
|
|
165
|
+
lunr --session-id <id> # Exact project session ID (created if missing)
|
|
141
166
|
```
|
|
142
167
|
|
|
143
|
-
Inside
|
|
168
|
+
Inside lunR, use `/resume`, `/new`, `/tree`, `/fork`, and `/clone` to manage sessions. `/undo` rewinds the same session; `/edit` rewinds and pastes; `/rollback` forks and restores files.
|
|
144
169
|
|
|
145
170
|
### Non-interactive mode
|
|
146
171
|
|
|
147
172
|
For one-shot prompts:
|
|
148
173
|
|
|
149
174
|
```bash
|
|
150
|
-
|
|
151
|
-
cat README.md |
|
|
152
|
-
|
|
175
|
+
lunr -p "Summarize this codebase"
|
|
176
|
+
cat README.md | lunr -p "Summarize this text"
|
|
177
|
+
lunr -p @screenshot.png "What's in this image?"
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Use `--mode json` for JSON event output or `--mode rpc` for process integration. `--offline` (or `PI_OFFLINE=1`) skips startup network operations.
|
|
181
|
+
|
|
182
|
+
### Update
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
lunr update # reinstall global @ashx-j/lunr from npm
|
|
186
|
+
lunr update --self # same
|
|
153
187
|
```
|
|
154
188
|
|
|
155
|
-
|
|
189
|
+
Workspace `npx lunr` from this repo is not a published install and will not self-update. Catalog refresh is `/refresh`. Extra flags such as `--models`, `--all`, and `--force` are invalid.
|
|
156
190
|
|
|
157
191
|
## Next steps
|
|
158
192
|
|
|
159
|
-
- [Using
|
|
193
|
+
- [Using lunR](usage.md) - interactive mode, slash commands, sessions, context files, and CLI reference.
|
|
194
|
+
- [Built-in features](features.md) - gateway, cron, MCP, subagents, plan, todos, and more.
|
|
160
195
|
- [Providers](providers.md) - authentication and model setup.
|
|
161
196
|
- [Settings](settings.md) - global and project configuration.
|
|
162
197
|
- [Keybindings](keybindings.md) - shortcuts and customization.
|
|
163
|
-
- [
|
|
198
|
+
- [Packages](packages.md) - install shared extensions, skills, prompts, and themes.
|
|
164
199
|
|
|
165
200
|
Platform notes: [Windows](windows.md), [Termux](termux.md), [tmux](tmux.md), [Terminal setup](terminal-setup.md), [Shell aliases](shell-aliases.md).
|
package/docs/rpc.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs.
|
|
4
4
|
|
|
5
|
-
**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@
|
|
5
|
+
**Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@ashx-j/lunr` instead of spawning a subprocess. See the SDK (`docs/sdk.md`) and types in the published package (`node_modules/@ashx-j/lunr`). A subprocess TypeScript client ships in the repo as `packages/coding-agent/src/modes/rpc/rpc-client.ts`.
|
|
6
6
|
|
|
7
7
|
## Starting RPC Mode
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
lunr --mode rpc [options]
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Common options:
|
|
@@ -756,7 +756,7 @@ Response:
|
|
|
756
756
|
}
|
|
757
757
|
```
|
|
758
758
|
|
|
759
|
-
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `
|
|
759
|
+
The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `lunr --mode rpc` process.
|
|
760
760
|
|
|
761
761
|
### Commands
|
|
762
762
|
|
|
@@ -792,7 +792,7 @@ Each command has:
|
|
|
792
792
|
- `"prompt"`: Loaded from a prompt template `.md` file
|
|
793
793
|
- `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
|
|
794
794
|
- `location`: Where it was loaded from (optional, not present for extensions):
|
|
795
|
-
- `"user"`: User-level (`~/.
|
|
795
|
+
- `"user"`: User-level (`~/.lunr/agent/`)
|
|
796
796
|
- `"project"`: Project-level (`./.pi/agent/`)
|
|
797
797
|
- `"path"`: Explicit path via CLI or settings
|
|
798
798
|
- `path`: Absolute file path to the command source (optional)
|
|
@@ -847,7 +847,7 @@ Emitted when one low-level agent run completes. Contains all messages generated
|
|
|
847
847
|
|
|
848
848
|
### agent_settled
|
|
849
849
|
|
|
850
|
-
Emitted after the full session-level run settles. At this point
|
|
850
|
+
Emitted after the full session-level run settles. At this point lunR will not continue automatically through retry, compaction retry, or queued follow-up messages.
|
|
851
851
|
|
|
852
852
|
```json
|
|
853
853
|
{"type": "agent_settled"}
|
|
@@ -1272,11 +1272,7 @@ Parse errors:
|
|
|
1272
1272
|
|
|
1273
1273
|
## Types
|
|
1274
1274
|
|
|
1275
|
-
|
|
1276
|
-
- [`packages/ai/src/types.ts`](../../ai/src/types.ts) - `Model`, `UserMessage`, `AssistantMessage`, `ToolResultMessage`
|
|
1277
|
-
- [`packages/agent/src/types.ts`](../../agent/src/types.ts) - `AgentMessage`, `AgentEvent`
|
|
1278
|
-
- [`src/core/messages.ts`](../src/core/messages.ts) - `BashExecutionMessage`
|
|
1279
|
-
- [`src/modes/rpc/rpc-types.ts`](../src/modes/rpc/rpc-types.ts) - RPC command/response types, extension UI request/response types
|
|
1275
|
+
Types ship in the published package (`node_modules/@ashx-j/lunr`). In this repo they live under `packages/ai`, `packages/agent`, and `packages/coding-agent/src`.
|
|
1280
1276
|
|
|
1281
1277
|
### Model
|
|
1282
1278
|
|
|
@@ -1423,9 +1419,7 @@ for event in read_events():
|
|
|
1423
1419
|
|
|
1424
1420
|
## Example: Interactive Client (Node.js)
|
|
1425
1421
|
|
|
1426
|
-
See [`
|
|
1427
|
-
|
|
1428
|
-
For a complete example of handling the extension UI protocol, see [`examples/rpc-extension-ui.ts`](../examples/rpc-extension-ui.ts) which pairs with the [`examples/extensions/rpc-demo.ts`](../examples/extensions/rpc-demo.ts) extension.
|
|
1422
|
+
See [`examples/rpc-extension-ui.ts`](../examples/rpc-extension-ui.ts) for a complete example of handling the extension UI protocol; it pairs with [`examples/extensions/rpc-demo.ts`](../examples/extensions/rpc-demo.ts). After a global install, examples live under `node_modules/@ashx-j/lunr/examples` (or `npm root -g` then `@ashx-j/lunr/examples`). From this repo they are `packages/coding-agent/examples/`.
|
|
1429
1423
|
|
|
1430
1424
|
```javascript
|
|
1431
1425
|
const { spawn } = require("child_process");
|
package/docs/sdk.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
>
|
|
1
|
+
> lunR can help you use the SDK. Ask it to build an integration for your use case.
|
|
2
2
|
|
|
3
3
|
# SDK
|
|
4
4
|
|
|
5
|
-
The SDK provides programmatic access to
|
|
5
|
+
The SDK provides programmatic access to lunR's agent capabilities. Use it to embed lunR in other applications, build custom interfaces, or integrate with automated workflows.
|
|
6
|
+
|
|
7
|
+
Standalone consumers install and import `@ashx-j/lunr`. The jiti extension loader also aliases `@earendil-works/pi-coding-agent` (and the companion `@ashx-j/lunr-*` / `@earendil-works/pi-*` names). Default `agentDir` is `~/.lunr/agent`.
|
|
6
8
|
|
|
7
9
|
**Example use cases:**
|
|
8
10
|
- Build a custom UI (web, desktop, mobile)
|
|
@@ -16,7 +18,7 @@ See [examples/sdk/](../examples/sdk/) for working examples from minimal to full
|
|
|
16
18
|
## Quick Start
|
|
17
19
|
|
|
18
20
|
```typescript
|
|
19
|
-
import { createAgentSession, ModelRuntime, SessionManager } from "@
|
|
21
|
+
import { createAgentSession, ModelRuntime, SessionManager } from "@ashx-j/lunr";
|
|
20
22
|
|
|
21
23
|
const modelRuntime = await ModelRuntime.create();
|
|
22
24
|
const { session } = await createAgentSession({
|
|
@@ -36,7 +38,7 @@ await session.prompt("What files are in the current directory?");
|
|
|
36
38
|
## Installation
|
|
37
39
|
|
|
38
40
|
```bash
|
|
39
|
-
npm install @
|
|
41
|
+
npm install @ashx-j/lunr
|
|
40
42
|
```
|
|
41
43
|
|
|
42
44
|
The SDK is included in the main package. No separate installation needed.
|
|
@@ -50,7 +52,7 @@ The main factory function for a single `AgentSession`.
|
|
|
50
52
|
`createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with standard discovery.
|
|
51
53
|
|
|
52
54
|
```typescript
|
|
53
|
-
import { createAgentSession, SessionManager } from "@
|
|
55
|
+
import { createAgentSession, SessionManager } from "@ashx-j/lunr";
|
|
54
56
|
|
|
55
57
|
// Minimal: defaults with DefaultResourceLoader
|
|
56
58
|
const { session } = await createAgentSession();
|
|
@@ -128,7 +130,7 @@ import {
|
|
|
128
130
|
createAgentSessionServices,
|
|
129
131
|
getAgentDir,
|
|
130
132
|
SessionManager,
|
|
131
|
-
} from "@
|
|
133
|
+
} from "@ashx-j/lunr";
|
|
132
134
|
|
|
133
135
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
134
136
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -235,7 +237,7 @@ Both `steer()` and `followUp()` expand file-based prompt templates but error on
|
|
|
235
237
|
|
|
236
238
|
### Agent and AgentState
|
|
237
239
|
|
|
238
|
-
The `Agent` class (from `@
|
|
240
|
+
The `Agent` class (from `@ashx-j/lunr-agent`) handles the core LLM interaction. Access it via `session.agent`.
|
|
239
241
|
|
|
240
242
|
```typescript
|
|
241
243
|
// Access current state
|
|
@@ -334,23 +336,23 @@ const { session } = await createAgentSession({
|
|
|
334
336
|
cwd: process.cwd(), // default
|
|
335
337
|
|
|
336
338
|
// Global config directory
|
|
337
|
-
agentDir: "~/.
|
|
339
|
+
agentDir: "~/.lunr/agent", // default (expands ~)
|
|
338
340
|
});
|
|
339
341
|
```
|
|
340
342
|
|
|
341
343
|
`cwd` is used by `DefaultResourceLoader` for:
|
|
342
|
-
- Project extensions (`.
|
|
344
|
+
- Project extensions (`.lunr/extensions/`)
|
|
343
345
|
- Project skills:
|
|
344
|
-
- `.
|
|
346
|
+
- `.lunr/skills/`
|
|
345
347
|
- `.agents/skills/` in `cwd` and ancestor directories (up to git repo root, or filesystem root when not in a repo)
|
|
346
|
-
- Project prompts (`.
|
|
348
|
+
- Project prompts (`.lunr/prompts/`)
|
|
347
349
|
- Context files (`AGENTS.md` walking up from cwd)
|
|
348
350
|
- Session directory naming
|
|
349
351
|
|
|
350
352
|
`agentDir` is used by `DefaultResourceLoader` for:
|
|
351
353
|
- Global extensions (`extensions/`)
|
|
352
354
|
- Global skills:
|
|
353
|
-
- `skills/` under `agentDir` (for example `~/.
|
|
355
|
+
- `skills/` under `agentDir` (for example `~/.lunr/agent/skills/`)
|
|
354
356
|
- `~/.agents/skills/`
|
|
355
357
|
- Global prompts (`prompts/`)
|
|
356
358
|
- Global context file (`AGENTS.md`)
|
|
@@ -364,8 +366,8 @@ When you pass a custom `ResourceLoader`, `cwd` and `agentDir` no longer control
|
|
|
364
366
|
### Model
|
|
365
367
|
|
|
366
368
|
```typescript
|
|
367
|
-
import { getModel } from "@
|
|
368
|
-
import { ModelRuntime } from "@
|
|
369
|
+
import { getModel } from "@ashx-j/lunr-ai";
|
|
370
|
+
import { ModelRuntime } from "@ashx-j/lunr";
|
|
369
371
|
|
|
370
372
|
const modelRuntime = await ModelRuntime.create();
|
|
371
373
|
|
|
@@ -405,7 +407,7 @@ To match CLI model parsing, use the exported resolver helpers:
|
|
|
405
407
|
import {
|
|
406
408
|
resolveCliModel,
|
|
407
409
|
resolveModelScopeWithDiagnostics,
|
|
408
|
-
} from "@
|
|
410
|
+
} from "@ashx-j/lunr";
|
|
409
411
|
|
|
410
412
|
const cliModel = resolveCliModel({
|
|
411
413
|
cliModel: "anthropic/claude-opus-4-5:high",
|
|
@@ -436,10 +438,10 @@ Authentication resolution priority (handled by `ModelRuntime`):
|
|
|
436
438
|
4. Fallback resolver (for custom provider keys from `models.json`)
|
|
437
439
|
|
|
438
440
|
```typescript
|
|
439
|
-
import { InMemoryCredentialStore } from "@
|
|
440
|
-
import { createAgentSession, ModelRuntime } from "@
|
|
441
|
+
import { InMemoryCredentialStore } from "@ashx-j/lunr-ai";
|
|
442
|
+
import { createAgentSession, ModelRuntime } from "@ashx-j/lunr";
|
|
441
443
|
|
|
442
|
-
// Default: uses ~/.
|
|
444
|
+
// Default: uses ~/.lunr/agent/auth.json and ~/.lunr/agent/models.json
|
|
443
445
|
const modelRuntime = await ModelRuntime.create();
|
|
444
446
|
|
|
445
447
|
// Provider-owned auth methods and current status
|
|
@@ -473,7 +475,7 @@ const { session } = await createAgentSession({
|
|
|
473
475
|
Use a `ResourceLoader` to override the system prompt:
|
|
474
476
|
|
|
475
477
|
```typescript
|
|
476
|
-
import { createAgentSession, DefaultResourceLoader } from "@
|
|
478
|
+
import { createAgentSession, DefaultResourceLoader } from "@ashx-j/lunr";
|
|
477
479
|
|
|
478
480
|
const loader = new DefaultResourceLoader({
|
|
479
481
|
systemPromptOverride: () => "You are a helpful assistant.",
|
|
@@ -495,10 +497,10 @@ Specify which built-in tools to enable:
|
|
|
495
497
|
- `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
|
|
496
498
|
- `excludeTools` disables specific built-in, extension, or custom tool names after any `tools` allowlist is applied
|
|
497
499
|
|
|
498
|
-
The `edit` tool returns `details.diff` for
|
|
500
|
+
The `edit` tool returns `details.diff` for lunR's TUI display and `details.patch` as a standard unified patch for SDK consumers.
|
|
499
501
|
|
|
500
502
|
```typescript
|
|
501
|
-
import { createAgentSession } from "@
|
|
503
|
+
import { createAgentSession } from "@ashx-j/lunr";
|
|
502
504
|
|
|
503
505
|
// Read-only mode
|
|
504
506
|
const { session } = await createAgentSession({
|
|
@@ -521,7 +523,7 @@ const { session } = await createAgentSession({
|
|
|
521
523
|
When you pass a custom `cwd`, `createAgentSession()` builds selected built-in tools for that cwd.
|
|
522
524
|
|
|
523
525
|
```typescript
|
|
524
|
-
import { createAgentSession, SessionManager } from "@
|
|
526
|
+
import { createAgentSession, SessionManager } from "@ashx-j/lunr";
|
|
525
527
|
|
|
526
528
|
const cwd = "/path/to/project";
|
|
527
529
|
|
|
@@ -545,7 +547,7 @@ const { session } = await createAgentSession({
|
|
|
545
547
|
|
|
546
548
|
```typescript
|
|
547
549
|
import { Type } from "typebox";
|
|
548
|
-
import { createAgentSession, defineTool } from "@
|
|
550
|
+
import { createAgentSession, defineTool } from "@ashx-j/lunr";
|
|
549
551
|
|
|
550
552
|
// Inline custom tool
|
|
551
553
|
const myTool = defineTool({
|
|
@@ -577,10 +579,10 @@ If you pass `tools`, include each custom or extension tool name you want enabled
|
|
|
577
579
|
|
|
578
580
|
### Extensions
|
|
579
581
|
|
|
580
|
-
Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.
|
|
582
|
+
Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.lunr/agent/extensions/`, `.lunr/extensions/`, and settings.json extension sources.
|
|
581
583
|
|
|
582
584
|
```typescript
|
|
583
|
-
import { createAgentSession, DefaultResourceLoader } from "@
|
|
585
|
+
import { createAgentSession, DefaultResourceLoader } from "@ashx-j/lunr";
|
|
584
586
|
|
|
585
587
|
const loader = new DefaultResourceLoader({
|
|
586
588
|
additionalExtensionPaths: ["/path/to/my-extension.ts"],
|
|
@@ -602,7 +604,7 @@ Extensions can register tools, subscribe to events, add commands, and more. See
|
|
|
602
604
|
**Named inline extensions:** By default, inline factories display as `<inline:1>`, `<inline:2>`, etc. in the startup Extensions list. To show a descriptive name instead, wrap the factory:
|
|
603
605
|
|
|
604
606
|
```typescript
|
|
605
|
-
import type { InlineExtension } from "@
|
|
607
|
+
import type { InlineExtension } from "@ashx-j/lunr";
|
|
606
608
|
|
|
607
609
|
const myProvider: InlineExtension = {
|
|
608
610
|
name: "my-provider",
|
|
@@ -623,7 +625,7 @@ This displays as `<inline:my-provider>` instead of `<inline:1>`. Bare factory fu
|
|
|
623
625
|
**Event Bus:** Extensions can communicate via `pi.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside:
|
|
624
626
|
|
|
625
627
|
```typescript
|
|
626
|
-
import { createEventBus, DefaultResourceLoader } from "@
|
|
628
|
+
import { createEventBus, DefaultResourceLoader } from "@ashx-j/lunr";
|
|
627
629
|
|
|
628
630
|
const eventBus = createEventBus();
|
|
629
631
|
const loader = new DefaultResourceLoader({
|
|
@@ -643,7 +645,7 @@ import {
|
|
|
643
645
|
createAgentSession,
|
|
644
646
|
DefaultResourceLoader,
|
|
645
647
|
type Skill,
|
|
646
|
-
} from "@
|
|
648
|
+
} from "@ashx-j/lunr";
|
|
647
649
|
|
|
648
650
|
const customSkill: Skill = {
|
|
649
651
|
name: "my-skill",
|
|
@@ -669,7 +671,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
|
|
|
669
671
|
### Context Files
|
|
670
672
|
|
|
671
673
|
```typescript
|
|
672
|
-
import { createAgentSession, DefaultResourceLoader } from "@
|
|
674
|
+
import { createAgentSession, DefaultResourceLoader } from "@ashx-j/lunr";
|
|
673
675
|
|
|
674
676
|
const loader = new DefaultResourceLoader({
|
|
675
677
|
agentsFilesOverride: (current) => ({
|
|
@@ -693,7 +695,7 @@ import {
|
|
|
693
695
|
createAgentSession,
|
|
694
696
|
DefaultResourceLoader,
|
|
695
697
|
type PromptTemplate,
|
|
696
|
-
} from "@
|
|
698
|
+
} from "@ashx-j/lunr";
|
|
697
699
|
|
|
698
700
|
const customCommand: PromptTemplate = {
|
|
699
701
|
name: "deploy",
|
|
@@ -728,7 +730,7 @@ import {
|
|
|
728
730
|
createAgentSessionServices,
|
|
729
731
|
getAgentDir,
|
|
730
732
|
SessionManager,
|
|
731
|
-
} from "@
|
|
733
|
+
} from "@ashx-j/lunr";
|
|
732
734
|
|
|
733
735
|
// In-memory (no persistence)
|
|
734
736
|
const { session } = await createAgentSession({
|
|
@@ -822,7 +824,7 @@ sm.createBranchedSession(leafId); // Extract path to new file
|
|
|
822
824
|
### Settings Management
|
|
823
825
|
|
|
824
826
|
```typescript
|
|
825
|
-
import { createAgentSession, SettingsManager, SessionManager } from "@
|
|
827
|
+
import { createAgentSession, SettingsManager, SessionManager } from "@ashx-j/lunr";
|
|
826
828
|
|
|
827
829
|
// Default: loads from files (global + project merged)
|
|
828
830
|
const { session } = await createAgentSession({
|
|
@@ -856,8 +858,8 @@ const { session } = await createAgentSession({
|
|
|
856
858
|
**Project-specific settings:**
|
|
857
859
|
|
|
858
860
|
Settings load from two locations and merge:
|
|
859
|
-
1. Global: `~/.
|
|
860
|
-
2. Project: `<cwd>/.
|
|
861
|
+
1. Global: `~/.lunr/agent/settings.json`
|
|
862
|
+
2. Project: `<cwd>/.lunr/settings.json`
|
|
861
863
|
|
|
862
864
|
Project overrides global. Nested objects merge keys. Setters modify global settings by default.
|
|
863
865
|
|
|
@@ -878,7 +880,7 @@ Use `DefaultResourceLoader` to discover extensions, skills, prompts, themes, and
|
|
|
878
880
|
import {
|
|
879
881
|
DefaultResourceLoader,
|
|
880
882
|
getAgentDir,
|
|
881
|
-
} from "@
|
|
883
|
+
} from "@ashx-j/lunr";
|
|
882
884
|
|
|
883
885
|
const loader = new DefaultResourceLoader({
|
|
884
886
|
cwd,
|
|
@@ -919,7 +921,7 @@ interface LoadExtensionsResult {
|
|
|
919
921
|
## Complete Example
|
|
920
922
|
|
|
921
923
|
```typescript
|
|
922
|
-
import { getModel } from "@
|
|
924
|
+
import { getModel } from "@ashx-j/lunr-ai";
|
|
923
925
|
import { Type } from "typebox";
|
|
924
926
|
import {
|
|
925
927
|
createAgentSession,
|
|
@@ -928,7 +930,7 @@ import {
|
|
|
928
930
|
ModelRuntime,
|
|
929
931
|
SessionManager,
|
|
930
932
|
SettingsManager,
|
|
931
|
-
} from "@
|
|
933
|
+
} from "@ashx-j/lunr";
|
|
932
934
|
|
|
933
935
|
const modelRuntime = await ModelRuntime.create({
|
|
934
936
|
authPath: "/custom/agent/auth.json",
|
|
@@ -1009,7 +1011,7 @@ import {
|
|
|
1009
1011
|
getAgentDir,
|
|
1010
1012
|
InteractiveMode,
|
|
1011
1013
|
SessionManager,
|
|
1012
|
-
} from "@
|
|
1014
|
+
} from "@ashx-j/lunr";
|
|
1013
1015
|
|
|
1014
1016
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
1015
1017
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -1049,7 +1051,7 @@ import {
|
|
|
1049
1051
|
getAgentDir,
|
|
1050
1052
|
runPrintMode,
|
|
1051
1053
|
SessionManager,
|
|
1052
|
-
} from "@
|
|
1054
|
+
} from "@ashx-j/lunr";
|
|
1053
1055
|
|
|
1054
1056
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
1055
1057
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -1086,7 +1088,7 @@ import {
|
|
|
1086
1088
|
getAgentDir,
|
|
1087
1089
|
runRpcMode,
|
|
1088
1090
|
SessionManager,
|
|
1089
|
-
} from "@
|
|
1091
|
+
} from "@ashx-j/lunr";
|
|
1090
1092
|
|
|
1091
1093
|
const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
|
|
1092
1094
|
const services = await createAgentSessionServices({ cwd });
|
|
@@ -1112,7 +1114,7 @@ See [RPC documentation](rpc.md) for the JSON protocol.
|
|
|
1112
1114
|
For subprocess-based integration without building with the SDK, use the CLI directly:
|
|
1113
1115
|
|
|
1114
1116
|
```bash
|
|
1115
|
-
|
|
1117
|
+
lunr --mode rpc --no-session
|
|
1116
1118
|
```
|
|
1117
1119
|
|
|
1118
1120
|
See [RPC documentation](rpc.md) for the JSON protocol.
|