@oh-my-pi/pi-coding-agent 15.10.10 → 15.10.11
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 +95 -4
- package/dist/cli.js +23087 -0
- package/dist/tokenizers.linux-x64-gnu-xcjh3jwk.node +0 -0
- package/dist/types/async/job-manager.d.ts +18 -0
- package/dist/types/cli/args.d.ts +1 -1
- package/dist/types/cli/dry-balance-cli.d.ts +1 -1
- package/dist/types/cli/gallery-cli.d.ts +1 -1
- package/dist/types/cli/gallery-fixtures/types.d.ts +1 -1
- package/dist/types/cli/usage-cli.d.ts +72 -0
- package/dist/types/commands/launch.d.ts +1 -1
- package/dist/types/commands/read.d.ts +1 -1
- package/dist/types/commands/usage.d.ts +25 -0
- package/dist/types/config/append-only-context-mode.d.ts +2 -1
- package/dist/types/config/model-discovery.d.ts +55 -0
- package/dist/types/config/model-registry.d.ts +7 -219
- package/dist/types/config/model-resolver.d.ts +16 -10
- package/dist/types/config/model-roles.d.ts +28 -0
- package/dist/types/config/models-config-schema.d.ts +523 -42
- package/dist/types/config/models-config.d.ts +385 -0
- package/dist/types/config/settings-schema.d.ts +12 -7
- package/dist/types/config/settings.d.ts +1 -1
- package/dist/types/debug/log-viewer.d.ts +1 -1
- package/dist/types/debug/raw-sse.d.ts +1 -1
- package/dist/types/eval/backend.d.ts +0 -2
- package/dist/types/eval/idle-timeout.d.ts +0 -4
- package/dist/types/eval/js/shared/rewrite-imports.d.ts +6 -6
- package/dist/types/export/html/template.generated.d.ts +1 -1
- package/dist/types/extensibility/extensions/types.d.ts +3 -3
- package/dist/types/hindsight/mental-models.d.ts +17 -8
- package/dist/types/internal-urls/artifact-protocol.d.ts +2 -2
- package/dist/types/internal-urls/types.d.ts +1 -1
- package/dist/types/lsp/edits.d.ts +9 -0
- package/dist/types/lsp/index.d.ts +2 -2
- package/dist/types/lsp/types.d.ts +2 -0
- package/dist/types/lsp/utils.d.ts +3 -0
- package/dist/types/mcp/json-rpc.d.ts +5 -0
- package/dist/types/mnemopi/state.d.ts +11 -1
- package/dist/types/modes/components/agent-dashboard.d.ts +1 -1
- package/dist/types/modes/components/assistant-message.d.ts +3 -1
- package/dist/types/modes/components/bash-execution.d.ts +1 -1
- package/dist/types/modes/components/copy-selector.d.ts +1 -1
- package/dist/types/modes/components/dynamic-border.d.ts +1 -1
- package/dist/types/modes/components/extensions/extension-dashboard.d.ts +1 -1
- package/dist/types/modes/components/extensions/extension-list.d.ts +1 -1
- package/dist/types/modes/components/extensions/inspector-panel.d.ts +1 -1
- package/dist/types/modes/components/footer.d.ts +1 -1
- package/dist/types/modes/components/hook-editor.d.ts +5 -0
- package/dist/types/modes/components/hook-input.d.ts +4 -0
- package/dist/types/modes/components/hook-selector.d.ts +1 -1
- package/dist/types/modes/components/model-selector.d.ts +1 -1
- package/dist/types/modes/components/plan-review-overlay.d.ts +1 -1
- package/dist/types/modes/components/session-observer-overlay.d.ts +1 -1
- package/dist/types/modes/components/session-selector.d.ts +1 -1
- package/dist/types/modes/components/status-line/component.d.ts +1 -1
- package/dist/types/modes/components/tiny-title-download-progress.d.ts +1 -1
- package/dist/types/modes/components/transcript-container.d.ts +25 -6
- package/dist/types/modes/components/tree-selector.d.ts +1 -1
- package/dist/types/modes/components/user-message-selector.d.ts +1 -1
- package/dist/types/modes/components/user-message.d.ts +2 -1
- package/dist/types/modes/components/visual-truncate.d.ts +1 -1
- package/dist/types/modes/components/welcome.d.ts +19 -3
- package/dist/types/modes/controllers/mcp-command-controller.d.ts +1 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +1 -1
- package/dist/types/modes/interactive-mode.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/sign-in.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/types.d.ts +1 -1
- package/dist/types/modes/setup-wizard/scenes/web-search.d.ts +1 -1
- package/dist/types/modes/setup-wizard/wizard-overlay.d.ts +1 -1
- package/dist/types/modes/types.d.ts +2 -1
- package/dist/types/session/agent-session.d.ts +1 -1
- package/dist/types/session/auth-broker-config.d.ts +4 -0
- package/dist/types/session/session-manager.d.ts +1 -1
- package/dist/types/slash-commands/helpers/stats-dashboard.d.ts +13 -0
- package/dist/types/ssh/connection-manager.d.ts +8 -0
- package/dist/types/task/parallel.d.ts +2 -2
- package/dist/types/task/worktree.d.ts +2 -0
- package/dist/types/tools/ask.d.ts +4 -0
- package/dist/types/tools/conflict-detect.d.ts +16 -0
- package/dist/types/tools/github-cache.d.ts +7 -0
- package/dist/types/tools/sqlite-reader.d.ts +3 -0
- package/dist/types/tui/output-block.d.ts +3 -3
- package/dist/types/utils/changelog.d.ts +8 -0
- package/dist/types/web/scrapers/readthedocs.d.ts +3 -0
- package/dist/types/web/scrapers/types.d.ts +12 -0
- package/dist/types/web/search/providers/codex.d.ts +1 -1
- package/dist/types/web/search/providers/gemini.d.ts +1 -1
- package/examples/extensions/tools.ts +5 -4
- package/package.json +14 -11
- package/scripts/build-binary.ts +18 -23
- package/scripts/bundle-dist.ts +81 -0
- package/scripts/{dev-launch → omp} +1 -1
- package/scripts/{dev-launch-preload.ts → omp.ts} +1 -1
- package/src/async/job-manager.ts +57 -3
- package/src/autoresearch/dashboard.ts +1 -1
- package/src/autoresearch/prompt-setup.md +6 -6
- package/src/autoresearch/prompt.md +6 -6
- package/src/capability/fs.ts +10 -0
- package/src/cli/args.ts +1 -1
- package/src/cli/auth-gateway-cli.ts +1 -3
- package/src/cli/dry-balance-cli.ts +1 -1
- package/src/cli/gallery-cli.ts +1 -1
- package/src/cli/gallery-fixtures/fs.ts +1 -1
- package/src/cli/gallery-fixtures/types.ts +5 -1
- package/src/cli/list-models.ts +2 -1
- package/src/cli/usage-cli.ts +603 -0
- package/src/cli-commands.ts +1 -0
- package/src/cli.ts +69 -5
- package/src/commands/complete.ts +1 -1
- package/src/commands/launch.ts +1 -1
- package/src/commands/read.ts +6 -3
- package/src/commands/usage.ts +35 -0
- package/src/commit/agentic/agent.ts +1 -1
- package/src/commit/model-selection.ts +1 -1
- package/src/config/append-only-context-mode.ts +6 -12
- package/src/config/model-discovery.ts +554 -0
- package/src/config/model-registry.ts +231 -1019
- package/src/config/model-resolver.ts +113 -156
- package/src/config/model-roles.ts +74 -0
- package/src/config/models-config-schema.ts +57 -8
- package/src/config/models-config.ts +129 -0
- package/src/config/settings-schema.ts +18 -4
- package/src/config/settings.ts +37 -1
- package/src/dap/client.ts +124 -37
- package/src/dap/session.ts +259 -158
- package/src/debug/log-viewer.ts +1 -1
- package/src/debug/raw-sse.ts +1 -1
- package/src/edit/diff.ts +47 -3
- package/src/edit/hashline/block-resolver.ts +20 -1
- package/src/edit/hashline/diff.ts +36 -1
- package/src/edit/hashline/execute.ts +8 -2
- package/src/edit/index.ts +16 -1
- package/src/edit/modes/patch.ts +52 -0
- package/src/edit/modes/replace.ts +56 -22
- package/src/edit/notebook.ts +22 -2
- package/src/edit/renderer.ts +36 -10
- package/src/eval/__tests__/completion-bridge.test.ts +1 -1
- package/src/eval/backend.ts +0 -2
- package/src/eval/completion-bridge.ts +2 -1
- package/src/eval/idle-timeout.ts +2 -9
- package/src/eval/js/context-manager.ts +6 -8
- package/src/eval/js/executor.ts +6 -2
- package/src/eval/js/index.ts +0 -2
- package/src/eval/js/shared/helpers.ts +5 -6
- package/src/eval/js/shared/local-module-loader.ts +1 -1
- package/src/eval/js/shared/prelude.txt +62 -1
- package/src/eval/js/shared/rewrite-imports.ts +40 -22
- package/src/eval/js/shared/runtime.ts +1 -1
- package/src/eval/py/index.ts +0 -2
- package/src/eval/py/kernel.ts +19 -0
- package/src/eval/py/runner.py +107 -3
- package/src/exec/bash-executor.ts +3 -1
- package/src/export/html/template.generated.ts +1 -1
- package/src/export/html/template.js +3 -1
- package/src/extensibility/extensions/types.ts +3 -2
- package/src/extensibility/plugins/legacy-pi-compat.ts +20 -3
- package/src/hindsight/mental-models.ts +59 -12
- package/src/hindsight/state.ts +6 -1
- package/src/internal-urls/artifact-protocol.ts +11 -2
- package/src/internal-urls/docs-index.generated.ts +8 -8
- package/src/internal-urls/issue-pr-protocol.ts +12 -5
- package/src/internal-urls/router.ts +1 -1
- package/src/internal-urls/types.ts +1 -1
- package/src/lib/xai-http.ts +1 -1
- package/src/lsp/client.ts +118 -38
- package/src/lsp/clients/biome-client.ts +101 -39
- package/src/lsp/edits.ts +143 -95
- package/src/lsp/index.ts +31 -22
- package/src/lsp/render.ts +1 -1
- package/src/lsp/types.ts +2 -0
- package/src/lsp/utils.ts +28 -10
- package/src/main.ts +165 -17
- package/src/mcp/json-rpc.ts +35 -5
- package/src/mcp/transports/stdio.ts +7 -1
- package/src/memories/index.ts +2 -1
- package/src/mnemopi/backend.ts +25 -3
- package/src/mnemopi/state.ts +38 -2
- package/src/modes/components/agent-dashboard.ts +10 -7
- package/src/modes/components/assistant-message.ts +19 -13
- package/src/modes/components/bash-execution.ts +1 -1
- package/src/modes/components/copy-selector.ts +1 -1
- package/src/modes/components/diff.ts +13 -2
- package/src/modes/components/dynamic-border.ts +12 -3
- package/src/modes/components/extensions/extension-dashboard.ts +8 -5
- package/src/modes/components/extensions/extension-list.ts +1 -1
- package/src/modes/components/extensions/inspector-panel.ts +1 -1
- package/src/modes/components/footer.ts +1 -1
- package/src/modes/components/history-search.ts +1 -1
- package/src/modes/components/hook-editor.ts +8 -0
- package/src/modes/components/hook-input.ts +8 -0
- package/src/modes/components/hook-selector.ts +2 -2
- package/src/modes/components/model-selector.ts +4 -2
- package/src/modes/components/plan-review-overlay.ts +1 -1
- package/src/modes/components/session-observer-overlay.ts +2 -2
- package/src/modes/components/session-selector.ts +1 -1
- package/src/modes/components/settings-selector.ts +5 -1
- package/src/modes/components/status-line/component.ts +1 -1
- package/src/modes/components/tiny-title-download-progress.ts +1 -1
- package/src/modes/components/transcript-container.ts +258 -53
- package/src/modes/components/tree-selector.ts +3 -3
- package/src/modes/components/user-message-selector.ts +1 -1
- package/src/modes/components/user-message.ts +17 -5
- package/src/modes/components/visual-truncate.ts +1 -1
- package/src/modes/components/welcome.ts +108 -26
- package/src/modes/controllers/command-controller.ts +10 -3
- package/src/modes/controllers/event-controller.ts +73 -4
- package/src/modes/controllers/input-controller.ts +1 -1
- package/src/modes/controllers/mcp-command-controller.ts +1 -1
- package/src/modes/controllers/selector-controller.ts +1 -1
- package/src/modes/controllers/streaming-reveal.ts +85 -18
- package/src/modes/interactive-mode.ts +3 -9
- package/src/modes/setup-wizard/scenes/glyph.ts +1 -1
- package/src/modes/setup-wizard/scenes/providers.ts +1 -1
- package/src/modes/setup-wizard/scenes/sign-in.ts +1 -1
- package/src/modes/setup-wizard/scenes/theme.ts +1 -1
- package/src/modes/setup-wizard/scenes/types.ts +1 -1
- package/src/modes/setup-wizard/scenes/web-search.ts +1 -1
- package/src/modes/setup-wizard/wizard-overlay.ts +1 -1
- package/src/modes/types.ts +2 -1
- package/src/prompts/agents/explore.md +2 -2
- package/src/prompts/agents/librarian.md +1 -2
- package/src/prompts/agents/oracle.md +1 -1
- package/src/prompts/agents/plan.md +5 -5
- package/src/prompts/agents/task.md +5 -5
- package/src/prompts/ci-green-request.md +5 -7
- package/src/prompts/goals/goal-budget-limit.md +2 -2
- package/src/prompts/goals/goal-continuation.md +4 -4
- package/src/prompts/goals/goal-mode-active.md +1 -1
- package/src/prompts/memories/read-path.md +1 -1
- package/src/prompts/memories/stage_one_system.md +2 -2
- package/src/prompts/review-custom-request.md +1 -1
- package/src/prompts/system/agent-creation-architect.md +2 -2
- package/src/prompts/system/auto-continue.md +1 -1
- package/src/prompts/system/background-tan-dispatch.md +1 -1
- package/src/prompts/system/btw-user.md +2 -2
- package/src/prompts/system/commit-message-system.md +13 -1
- package/src/prompts/system/custom-system-prompt.md +1 -1
- package/src/prompts/system/eager-todo.md +2 -2
- package/src/prompts/system/irc-incoming.md +1 -1
- package/src/prompts/system/manual-continue.md +1 -1
- package/src/prompts/system/omfg-user.md +3 -4
- package/src/prompts/system/orchestrate-notice.md +9 -9
- package/src/prompts/system/plan-mode-active.md +4 -4
- package/src/prompts/system/plan-mode-subagent.md +4 -5
- package/src/prompts/system/plan-mode-tool-decision-reminder.md +1 -1
- package/src/prompts/system/project-prompt.md +2 -2
- package/src/prompts/system/subagent-system-prompt.md +4 -4
- package/src/prompts/system/system-prompt.md +13 -24
- package/src/prompts/system/title-system.md +2 -2
- package/src/prompts/system/ttsr-tool-reminder.md +1 -1
- package/src/prompts/system/workflow-notice.md +1 -1
- package/src/prompts/tools/ast-edit.md +1 -1
- package/src/prompts/tools/ast-grep.md +2 -2
- package/src/prompts/tools/bash.md +5 -7
- package/src/prompts/tools/browser.md +7 -7
- package/src/prompts/tools/debug.md +1 -1
- package/src/prompts/tools/eval.md +3 -3
- package/src/prompts/tools/find.md +0 -1
- package/src/prompts/tools/github.md +8 -7
- package/src/prompts/tools/goal.md +1 -1
- package/src/prompts/tools/image-gen.md +1 -1
- package/src/prompts/tools/inspect-image-system.md +1 -1
- package/src/prompts/tools/irc.md +15 -15
- package/src/prompts/tools/lsp.md +2 -2
- package/src/prompts/tools/patch.md +2 -2
- package/src/prompts/tools/read.md +3 -4
- package/src/prompts/tools/recall.md +1 -1
- package/src/prompts/tools/reflect.md +1 -1
- package/src/prompts/tools/render-mermaid.md +2 -2
- package/src/prompts/tools/replace.md +4 -10
- package/src/prompts/tools/rewind.md +2 -2
- package/src/prompts/tools/search-tool-bm25.md +1 -9
- package/src/prompts/tools/search.md +0 -1
- package/src/prompts/tools/ssh.md +0 -4
- package/src/prompts/tools/task.md +2 -3
- package/src/prompts/tools/todo.md +1 -1
- package/src/sdk.ts +23 -10
- package/src/session/agent-session.ts +44 -10
- package/src/session/auth-broker-config.ts +30 -1
- package/src/session/session-manager.ts +2 -2
- package/src/session/streaming-output.ts +23 -2
- package/src/slash-commands/builtin-registry.ts +20 -0
- package/src/slash-commands/helpers/stats-dashboard.ts +85 -0
- package/src/ssh/connection-manager.ts +27 -0
- package/src/task/commands.ts +2 -1
- package/src/task/executor.ts +61 -53
- package/src/task/index.ts +137 -60
- package/src/task/parallel.ts +3 -3
- package/src/task/render.ts +2 -2
- package/src/task/worktree.ts +64 -56
- package/src/thinking.ts +2 -1
- package/src/tiny/title-client.ts +26 -11
- package/src/tools/archive-reader.ts +30 -2
- package/src/tools/ask.ts +104 -21
- package/src/tools/ast-edit.ts +25 -5
- package/src/tools/auto-generated-guard.ts +20 -3
- package/src/tools/bash-interactive.ts +27 -7
- package/src/tools/bash.ts +54 -13
- package/src/tools/browser/launch.ts +11 -2
- package/src/tools/browser/readable.ts +19 -2
- package/src/tools/browser/registry.ts +4 -1
- package/src/tools/browser/render.ts +2 -2
- package/src/tools/browser/tab-supervisor.ts +55 -16
- package/src/tools/conflict-detect.ts +50 -4
- package/src/tools/debug.ts +1 -1
- package/src/tools/eval-render.ts +5 -5
- package/src/tools/eval.ts +0 -2
- package/src/tools/fetch.ts +33 -10
- package/src/tools/gh-cache-invalidation.ts +63 -8
- package/src/tools/gh-renderer.ts +1 -1
- package/src/tools/gh.ts +172 -29
- package/src/tools/github-cache.ts +70 -6
- package/src/tools/image-gen.ts +3 -9
- package/src/tools/irc.ts +5 -1
- package/src/tools/job.ts +1 -1
- package/src/tools/read.ts +202 -61
- package/src/tools/render-utils.ts +3 -3
- package/src/tools/resolve.ts +1 -1
- package/src/tools/search.ts +92 -29
- package/src/tools/sqlite-reader.ts +17 -5
- package/src/tools/ssh.ts +8 -8
- package/src/tools/todo.ts +38 -8
- package/src/tools/write.ts +118 -18
- package/src/tui/output-block.ts +4 -4
- package/src/utils/changelog.ts +27 -1
- package/src/utils/file-mentions.ts +2 -1
- package/src/web/scrapers/arxiv.ts +1 -1
- package/src/web/scrapers/go-pkg.ts +1 -1
- package/src/web/scrapers/iacr.ts +1 -1
- package/src/web/scrapers/readthedocs.ts +1 -1
- package/src/web/scrapers/twitter.ts +2 -1
- package/src/web/scrapers/types.ts +87 -8
- package/src/web/scrapers/wikipedia.ts +1 -1
- package/src/web/scrapers/youtube.ts +6 -1
- package/src/web/search/index.ts +1 -1
- package/src/web/search/providers/codex.ts +2 -1
- package/src/web/search/providers/gemini.ts +2 -3
- package/src/web/search/render.ts +8 -6
- package/dist/types/config/model-equivalence.d.ts +0 -24
- package/dist/types/config/model-id-affixes.d.ts +0 -12
- package/dist/types/config/model-provider-priority.d.ts +0 -1
- package/dist/types/exec/idle-timeout-watchdog.d.ts +0 -18
- package/src/config/model-equivalence.ts +0 -875
- package/src/config/model-id-affixes.ts +0 -81
- package/src/config/model-provider-priority.ts +0 -56
- package/src/exec/idle-timeout-watchdog.ts +0 -126
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { AgentMessage, AgentToolResult, AgentToolUpdateCallback, ThinkingLevel, ToolApproval } from "@oh-my-pi/pi-agent-core";
|
|
11
11
|
import type { CompactionResult } from "@oh-my-pi/pi-agent-core/compaction";
|
|
12
|
-
import type { Api, AssistantMessageEvent, AssistantMessageEventStream, Context, ImageContent, Model, ProviderResponseMetadata, SimpleStreamOptions, Static, TextContent, TSchema } from "@oh-my-pi/pi-ai";
|
|
12
|
+
import type { Api, AssistantMessageEvent, AssistantMessageEventStream, Context, ImageContent, Model, ModelSpec, ProviderResponseMetadata, SimpleStreamOptions, Static, TextContent, TSchema } from "@oh-my-pi/pi-ai";
|
|
13
13
|
import type { OAuthCredentials, OAuthLoginCallbacks } from "@oh-my-pi/pi-ai/oauth/types";
|
|
14
14
|
import type * as piCodingAgent from "@oh-my-pi/pi-coding-agent";
|
|
15
15
|
import type { AutocompleteItem, Component, EditorTheme, KeyId, TUI } from "@oh-my-pi/pi-tui";
|
|
@@ -680,7 +680,7 @@ export interface ExtensionAPI {
|
|
|
680
680
|
* id: "claude-sonnet-4@20250514",
|
|
681
681
|
* name: "Claude Sonnet 4 (Vertex)",
|
|
682
682
|
* reasoning: true,
|
|
683
|
-
* thinking: { mode: "anthropic-adaptive",
|
|
683
|
+
* thinking: { mode: "anthropic-adaptive", efforts: ["minimal", "low", "medium", "high"] },
|
|
684
684
|
* input: ["text", "image"],
|
|
685
685
|
* cost: { input: 3, output: 15, cacheRead: 0.3, cacheWrite: 3.75 },
|
|
686
686
|
* contextWindow: 200000,
|
|
@@ -765,7 +765,7 @@ export interface ProviderModelConfig {
|
|
|
765
765
|
/** Custom headers for this model. */
|
|
766
766
|
headers?: Record<string, string>;
|
|
767
767
|
/** OpenAI compatibility settings. */
|
|
768
|
-
compat?:
|
|
768
|
+
compat?: ModelSpec<Api>["compat"];
|
|
769
769
|
}
|
|
770
770
|
/** Extension factory function type. Supports both sync and async initialization. */
|
|
771
771
|
export type ExtensionFactory = (pi: ExtensionAPI) => void | Promise<void>;
|
|
@@ -26,8 +26,10 @@
|
|
|
26
26
|
* retain side to emit them.
|
|
27
27
|
*
|
|
28
28
|
* Seed tags are baked from `seeds.json` plus, for `projectTagged: true`
|
|
29
|
-
* entries, the active scope's `retainTags` (i.e. `project:<cwd>`).
|
|
30
|
-
*
|
|
29
|
+
* entries, the active scope's `retainTags` (i.e. `project:<cwd>`). In
|
|
30
|
+
* `per-project-tagged`, those project seeds also get project-suffixed ids so
|
|
31
|
+
* each tag can own its conventions/decisions models in the shared bank.
|
|
32
|
+
* Untagged seeds (e.g. `user-preferences`) read every memory in the bank — the
|
|
31
33
|
* reflect call applies no tag filter when `tags` is empty.
|
|
32
34
|
*
|
|
33
35
|
* Seed lifecycle is **create-only**: changes to `source_query`, `tags`,
|
|
@@ -58,12 +60,16 @@ export interface MentalModelSeed {
|
|
|
58
60
|
sourceQuery: string;
|
|
59
61
|
tags: string[];
|
|
60
62
|
maxTokens?: number;
|
|
63
|
+
/** Legacy unqualified seed ids accepted as already-present when tags match. */
|
|
64
|
+
legacyIds?: string[];
|
|
61
65
|
trigger?: MentalModelTrigger;
|
|
62
66
|
}
|
|
63
67
|
/**
|
|
64
68
|
* Resolve the seed list that applies to the active bank scope. Per-project
|
|
65
69
|
* seeds are skipped in `global` mode (where there is no project axis) and
|
|
66
|
-
* `projectTagged` seeds inherit the scope's `retainTags`.
|
|
70
|
+
* `projectTagged` seeds inherit the scope's `retainTags`. In shared tagged
|
|
71
|
+
* banks, project seeds use project-suffixed ids and accept matching legacy
|
|
72
|
+
* bare ids as already present.
|
|
67
73
|
*/
|
|
68
74
|
export declare function resolveSeedsForScope(scope: BankScope, scoping: HindsightScoping): MentalModelSeed[];
|
|
69
75
|
/**
|
|
@@ -75,6 +81,8 @@ export declare function resolveSeedsForScope(scope: BankScope, scoping: Hindsigh
|
|
|
75
81
|
* Existing models are NEVER modified. See module docstring.
|
|
76
82
|
*/
|
|
77
83
|
export declare function ensureMentalModels(client: HindsightApi, bankId: string, seeds: MentalModelSeed[], debug: boolean): Promise<void>;
|
|
84
|
+
/** Return whether a seed is already represented by current bank metadata. */
|
|
85
|
+
export declare function seedAlreadyExists(seed: MentalModelSeed, models: readonly MentalModelSummary[]): boolean;
|
|
78
86
|
/**
|
|
79
87
|
* Default character budget for the rendered `<mental_models>` block. Mental
|
|
80
88
|
* models are injected on every prompt rebuild; an unbounded block can crowd
|
|
@@ -93,12 +101,13 @@ export declare const MENTAL_MODEL_RENDER_BUDGET_CHARS_DEFAULT = 16000;
|
|
|
93
101
|
* reflect for a freshly-seeded model hasn't completed yet).
|
|
94
102
|
*
|
|
95
103
|
* The rendered block is bounded by `budgetChars` (default
|
|
96
|
-
* MENTAL_MODEL_RENDER_BUDGET_CHARS_DEFAULT).
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
104
|
+
* MENTAL_MODEL_RENDER_BUDGET_CHARS_DEFAULT). When `visibleTags` is supplied,
|
|
105
|
+
* tagged models must match at least one active tag; untagged models remain
|
|
106
|
+
* visible in every scope. Per-model content is truncated before assembly; if
|
|
107
|
+
* assembly still exceeds the budget, trailing models are dropped. A budget
|
|
108
|
+
* overflow leaves a `…` marker so the LLM can tell the snapshot is truncated.
|
|
100
109
|
*/
|
|
101
|
-
export declare function loadMentalModelsBlock(client: HindsightApi, bankId: string, budgetChars?: number): Promise<string | undefined>;
|
|
110
|
+
export declare function loadMentalModelsBlock(client: HindsightApi, bankId: string, budgetChars?: number, visibleTags?: readonly string[]): Promise<string | undefined>;
|
|
102
111
|
export declare function renderMentalModelsBlock(models: MentalModelSummary[], budgetChars: number): string;
|
|
103
112
|
/** Inventory line used by the `/memory mm list` command. */
|
|
104
113
|
export declare function summarizeMentalModel(model: MentalModelSummary): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { InternalResource, InternalUrl, ProtocolHandler, UrlCompletion } from "./types";
|
|
1
|
+
import type { InternalResource, InternalUrl, ProtocolHandler, ResolveContext, UrlCompletion } from "./types";
|
|
2
2
|
export declare class ArtifactProtocolHandler implements ProtocolHandler {
|
|
3
3
|
readonly scheme = "artifact";
|
|
4
4
|
readonly immutable = true;
|
|
5
|
-
resolve(url: InternalUrl): Promise<InternalResource>;
|
|
5
|
+
resolve(url: InternalUrl, context?: ResolveContext): Promise<InternalResource>;
|
|
6
6
|
complete(): Promise<UrlCompletion[]>;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types for the internal URL routing system.
|
|
3
3
|
*
|
|
4
|
-
* Internal URLs (agent
|
|
4
|
+
* Internal URLs (`agent://`, `artifact://`, `issue://`, `local://`, `mcp://`, `memory://`, `omp://`, `pr://`, `rule://`, `skill://`, and `vault://`) are resolved by tools like read,
|
|
5
5
|
* providing access to agent outputs and server resources without exposing filesystem paths.
|
|
6
6
|
*/
|
|
7
7
|
import type { LocalProtocolOptions } from "./local-protocol";
|
|
@@ -6,6 +6,13 @@ import type { Range, TextEdit, WorkspaceEdit } from "./types";
|
|
|
6
6
|
export declare function applyTextEditsToString(content: string, edits: TextEdit[]): string;
|
|
7
7
|
/** True when two ranges overlap (share any position other than a touching boundary). */
|
|
8
8
|
export declare function rangesOverlap(a: Range, b: Range): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Sort edits bottom-to-top for in-place application and reject overlaps.
|
|
11
|
+
* Equal start positions tiebreak by original array index descending so that,
|
|
12
|
+
* applied bottom-up, inserts at the same position land in array order
|
|
13
|
+
* (LSP spec: the order of edits in the array defines the order in the result).
|
|
14
|
+
*/
|
|
15
|
+
export declare function sortAndValidateTextEdits(edits: TextEdit[]): TextEdit[];
|
|
9
16
|
/**
|
|
10
17
|
* Flatten a WorkspaceEdit's text edits into a Map<uri, TextEdit[]>.
|
|
11
18
|
* Resource operations (create/rename/delete) are ignored — callers handle them separately.
|
|
@@ -18,6 +25,8 @@ export declare function flattenWorkspaceTextEdits(edit: WorkspaceEdit): Map<stri
|
|
|
18
25
|
export declare function applyTextEdits(filePath: string, edits: TextEdit[]): Promise<void>;
|
|
19
26
|
/**
|
|
20
27
|
* Apply a workspace edit (collection of file changes).
|
|
28
|
+
* All text-edit batches are overlap-validated before anything is written so a
|
|
29
|
+
* conflict throws without leaving the workspace half-applied.
|
|
21
30
|
* Returns array of applied change descriptions.
|
|
22
31
|
*/
|
|
23
32
|
export declare function applyWorkspaceEdit(edit: WorkspaceEdit, cwd: string): Promise<string[]>;
|
|
@@ -14,7 +14,7 @@ export type { LspToolDetails } from "./types";
|
|
|
14
14
|
export declare const LSP_READONLY_ACTIONS: ReadonlySet<string>;
|
|
15
15
|
export interface LspStartupServerInfo {
|
|
16
16
|
name: string;
|
|
17
|
-
status: "connecting" | "ready" | "error";
|
|
17
|
+
status: "connecting" | "ready" | "error" | "available";
|
|
18
18
|
fileTypes: string[];
|
|
19
19
|
error?: string;
|
|
20
20
|
}
|
|
@@ -29,7 +29,7 @@ export interface LspWarmupOptions {
|
|
|
29
29
|
/** Called when starting to connect to servers */
|
|
30
30
|
onConnecting?: (serverNames: string[]) => void;
|
|
31
31
|
}
|
|
32
|
-
export declare function discoverStartupLspServers(cwd: string): LspStartupServerInfo[];
|
|
32
|
+
export declare function discoverStartupLspServers(cwd: string, status?: LspStartupServerInfo["status"]): LspStartupServerInfo[];
|
|
33
33
|
/**
|
|
34
34
|
* Warm up LSP servers for a directory by connecting to all detected servers.
|
|
35
35
|
* This should be called at startup to avoid cold-start delays.
|
|
@@ -278,6 +278,8 @@ export interface LspClient {
|
|
|
278
278
|
pendingRequests: Map<number, PendingRequest>;
|
|
279
279
|
messageBuffer: Uint8Array;
|
|
280
280
|
isReading: boolean;
|
|
281
|
+
/** Lifecycle state: "connecting" until initialize completes, then "ready"; "error" on init failure or reader death. */
|
|
282
|
+
status: "connecting" | "ready" | "error";
|
|
281
283
|
serverCapabilities?: LspServerCapabilities;
|
|
282
284
|
lastActivity: number;
|
|
283
285
|
/** Serializes outbound JSON-RPC writes to the server process. */
|
|
@@ -3,11 +3,14 @@ import type { CodeAction, Command, Diagnostic, DiagnosticSeverity, DocumentSymbo
|
|
|
3
3
|
export { detectLanguageId } from "../utils/lang-from-path";
|
|
4
4
|
/**
|
|
5
5
|
* Convert a file path to a file:// URI.
|
|
6
|
+
* Uses the URL machinery so special characters (`%`, `#`, `?`, spaces) are
|
|
7
|
+
* percent-encoded; plain concatenation produced URIs that broke round-trips.
|
|
6
8
|
* Handles Windows drive letters correctly.
|
|
7
9
|
*/
|
|
8
10
|
export declare function fileToUri(filePath: string): string;
|
|
9
11
|
/**
|
|
10
12
|
* Convert a file:// URI to a file path.
|
|
13
|
+
* Tolerates both percent-encoded URIs and lax servers that send raw paths.
|
|
11
14
|
* Handles Windows drive letters correctly.
|
|
12
15
|
*/
|
|
13
16
|
export declare function uriToFile(uri: string): string;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redact credential-bearing query params (e.g. `exaApiKey`) so failed
|
|
3
|
+
* requests never write secrets to the persistent log file.
|
|
4
|
+
*/
|
|
5
|
+
export declare function redactUrlForLog(url: string): string;
|
|
1
6
|
/** Parse SSE response format (lines starting with "data: ") */
|
|
2
7
|
export declare function parseSSE(text: string): unknown;
|
|
3
8
|
/** JSON-RPC 2.0 response structure */
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import type { AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
2
|
-
import
|
|
2
|
+
import type * as MnemopiNs from "@oh-my-pi/pi-mnemopi";
|
|
3
|
+
import type { Mnemopi, RecallResult } from "@oh-my-pi/pi-mnemopi";
|
|
4
|
+
import type * as MnemopiCoreNs from "@oh-my-pi/pi-mnemopi/core";
|
|
3
5
|
import type { AgentSession } from "../session/agent-session";
|
|
4
6
|
import type { MnemopiBackendConfig } from "./config";
|
|
7
|
+
/** Lazily load `@oh-my-pi/pi-mnemopi` (memoized). */
|
|
8
|
+
export declare function loadMnemopi(): Promise<typeof MnemopiNs>;
|
|
9
|
+
/** Lazily load `@oh-my-pi/pi-mnemopi/core` (memoized). */
|
|
10
|
+
export declare function loadMnemopiCore(): Promise<typeof MnemopiCoreNs>;
|
|
11
|
+
/** Sync access for code below an async boundary that already awaited {@link loadMnemopi}. */
|
|
12
|
+
export declare function requireMnemopi(): typeof MnemopiNs;
|
|
13
|
+
/** Sync access for code below an async boundary that already awaited {@link loadMnemopiCore}. */
|
|
14
|
+
export declare function requireMnemopiCore(): typeof MnemopiCoreNs;
|
|
5
15
|
interface MnemopiScopedMemory {
|
|
6
16
|
bank: string;
|
|
7
17
|
memory: Mnemopi;
|
|
@@ -16,7 +16,7 @@ export declare class AgentDashboard extends Container {
|
|
|
16
16
|
onRequestRender?: () => void;
|
|
17
17
|
private constructor();
|
|
18
18
|
static create(cwd: string, settings?: Settings | null, terminalHeight?: number, modelContext?: AgentDashboardModelContext): Promise<AgentDashboard>;
|
|
19
|
-
render(width: number): string[];
|
|
19
|
+
render(width: number): readonly string[];
|
|
20
20
|
handleInput(data: string): void;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
@@ -22,5 +22,7 @@ export declare class AssistantMessageComponent extends Container {
|
|
|
22
22
|
markTranscriptBlockFinalized(): void;
|
|
23
23
|
setToolResultImages(toolCallId: string, images: ImageContent[]): void;
|
|
24
24
|
setUsageInfo(usage: Usage): void;
|
|
25
|
-
updateContent(message: AssistantMessage
|
|
25
|
+
updateContent(message: AssistantMessage, opts?: {
|
|
26
|
+
transient?: boolean;
|
|
27
|
+
}): void;
|
|
26
28
|
}
|
|
@@ -17,7 +17,7 @@ export declare class BashExecutionComponent extends Container {
|
|
|
17
17
|
output?: string;
|
|
18
18
|
truncation?: TruncationMeta;
|
|
19
19
|
}): void;
|
|
20
|
-
render(width: number): string[];
|
|
20
|
+
render(width: number): readonly string[];
|
|
21
21
|
/**
|
|
22
22
|
* Get the raw output for creating BashExecutionMessage.
|
|
23
23
|
*/
|
|
@@ -18,5 +18,5 @@ export declare class CopySelectorComponent implements Component {
|
|
|
18
18
|
constructor(roots: CopyTarget[], callbacks: CopySelectorCallbacks);
|
|
19
19
|
invalidate(): void;
|
|
20
20
|
handleInput(keyData: string): void;
|
|
21
|
-
render(width: number): string[];
|
|
21
|
+
render(width: number): readonly string[];
|
|
22
22
|
}
|
|
@@ -22,6 +22,6 @@ export declare class ExtensionDashboard extends Container {
|
|
|
22
22
|
onRequestRender?: () => void;
|
|
23
23
|
private constructor();
|
|
24
24
|
static create(cwd: string, settings?: Settings | null, terminalHeight?: number): Promise<ExtensionDashboard>;
|
|
25
|
-
render(width: number): string[];
|
|
25
|
+
render(width: number): readonly string[];
|
|
26
26
|
handleInput(data: string): void;
|
|
27
27
|
}
|
|
@@ -34,6 +34,6 @@ export declare class ExtensionList implements Component {
|
|
|
34
34
|
setSearchQuery(query: string): void;
|
|
35
35
|
clearSearch(): void;
|
|
36
36
|
invalidate(): void;
|
|
37
|
-
render(width: number): string[];
|
|
37
|
+
render(width: number): readonly string[];
|
|
38
38
|
handleInput(data: string): void;
|
|
39
39
|
}
|
|
@@ -15,4 +15,9 @@ export declare class HookEditorComponent extends Container {
|
|
|
15
15
|
#private;
|
|
16
16
|
constructor(tui: TUI, title: string, prefill: string | undefined, onSubmit: (value: string) => void, onCancel: () => void, options?: HookEditorOptions);
|
|
17
17
|
handleInput(keyData: string): void;
|
|
18
|
+
/** Route non-bracketed paste transports (e.g. kitty's OSC 5522 enhanced clipboard)
|
|
19
|
+
* into the inner editor, mirroring bracketed-paste semantics. Without this hook,
|
|
20
|
+
* enhanced-paste routing falls back to the main prompt editor hidden behind the
|
|
21
|
+
* dialog (#2127 routing contract). */
|
|
22
|
+
pasteText(text: string): void;
|
|
18
23
|
}
|
|
@@ -11,5 +11,9 @@ export declare class HookInputComponent extends Container {
|
|
|
11
11
|
#private;
|
|
12
12
|
constructor(title: string, _placeholder: string | undefined, onSubmit: (value: string) => void, onCancel: () => void, opts?: HookInputOptions);
|
|
13
13
|
handleInput(keyData: string): void;
|
|
14
|
+
/** Route non-bracketed paste transports (e.g. kitty's OSC 5522 enhanced clipboard)
|
|
15
|
+
* into the inner input, mirroring bracketed-paste semantics. Pasting counts as
|
|
16
|
+
* interaction, so the timeout countdown resets like any keystroke. */
|
|
17
|
+
pasteText(text: string): void;
|
|
14
18
|
dispose(): void;
|
|
15
19
|
}
|
|
@@ -65,6 +65,6 @@ export declare class HookSelectorComponent extends Container {
|
|
|
65
65
|
#private;
|
|
66
66
|
constructor(title: string, options: HookSelectorOptionInput[], onSelect: (option: string) => void, onCancel: () => void, opts?: HookSelectorOptions);
|
|
67
67
|
handleInput(keyData: string): void;
|
|
68
|
-
render(width: number): string[];
|
|
68
|
+
render(width: number): readonly string[];
|
|
69
69
|
dispose(): void;
|
|
70
70
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Model } from "@oh-my-pi/pi-ai";
|
|
2
2
|
import { Container, Input, type TUI } from "@oh-my-pi/pi-tui";
|
|
3
3
|
import type { ModelRegistry } from "../../config/model-registry";
|
|
4
4
|
import type { Settings } from "../../config/settings";
|
|
@@ -55,5 +55,5 @@ export declare class PlanReviewOverlay implements Component {
|
|
|
55
55
|
* `onPlanEdited` (the editor round-trip already persisted the file). */
|
|
56
56
|
setPlanContent(planContent: string): void;
|
|
57
57
|
handleInput(keyData: string): void;
|
|
58
|
-
render(width: number): string[];
|
|
58
|
+
render(width: number): readonly string[];
|
|
59
59
|
}
|
|
@@ -4,7 +4,7 @@ import type { SessionObserverRegistry } from "../session-observer-registry";
|
|
|
4
4
|
export declare class SessionObserverOverlayComponent extends Container {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(registry: SessionObserverRegistry, onDone: () => void, observeKeys: KeyId[]);
|
|
7
|
-
render(width: number): string[];
|
|
7
|
+
render(width: number): readonly string[];
|
|
8
8
|
/** Rebuild content from live registry data */
|
|
9
9
|
refreshFromRegistry(): void;
|
|
10
10
|
handleInput(keyData: string): void;
|
|
@@ -40,7 +40,7 @@ declare class SessionList implements Component {
|
|
|
40
40
|
setSessions(sessions: SessionInfo[], showCwd: boolean): void;
|
|
41
41
|
removeSession(sessionPath: string): void;
|
|
42
42
|
invalidate(): void;
|
|
43
|
-
render(width: number): string[];
|
|
43
|
+
render(width: number): readonly string[];
|
|
44
44
|
handleInput(keyData: string): void;
|
|
45
45
|
}
|
|
46
46
|
export interface SessionSelectorOptions {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Container, type NativeScrollbackLiveRegion } from "@oh-my-pi/pi-tui";
|
|
1
|
+
import { type Component, Container, type NativeScrollbackLiveRegion, type RenderStablePrefix } from "@oh-my-pi/pi-tui";
|
|
2
2
|
/**
|
|
3
|
-
* Transcript container that
|
|
4
|
-
* reports the live-region seam (`NativeScrollbackLiveRegion`) that gates
|
|
5
|
-
* engine's append-only scrollback commits.
|
|
3
|
+
* Transcript container that renders every block's current content each frame
|
|
4
|
+
* and reports the live-region seam (`NativeScrollbackLiveRegion`) that gates
|
|
5
|
+
* the engine's append-only scrollback commits.
|
|
6
6
|
*
|
|
7
7
|
* The engine never rewrites committed history: rows above the seam that have
|
|
8
8
|
* entered the tape keep whatever bytes they were committed with ("let the
|
|
@@ -13,14 +13,33 @@ import { Container, type NativeScrollbackLiveRegion } from "@oh-my-pi/pi-tui";
|
|
|
13
13
|
* their rows do not enter history while they can still change; a streaming
|
|
14
14
|
* block whose render grows append-only deepens the seam through its settled
|
|
15
15
|
* head so a long reply's scrolled-off rows still reach scrollback mid-stream.
|
|
16
|
+
*
|
|
17
|
+
* Assembly is incremental: the returned array is persistent and mutated in
|
|
18
|
+
* place. Each block's render is still called every frame, but a block whose
|
|
19
|
+
* render returned the same array reference at an unchanged offset reuses its
|
|
20
|
+
* previously assembled rows; the array is truncated and re-pushed only from
|
|
21
|
+
* the first divergent block. The leading byte-identical row count is reported
|
|
22
|
+
* through {@link RenderStablePrefix} so the engine can skip marker scanning,
|
|
23
|
+
* line preparation, and the committed-prefix audit for those rows.
|
|
16
24
|
*/
|
|
17
|
-
export declare class TranscriptContainer extends Container implements NativeScrollbackLiveRegion {
|
|
25
|
+
export declare class TranscriptContainer extends Container implements NativeScrollbackLiveRegion, RenderStablePrefix {
|
|
18
26
|
#private;
|
|
19
27
|
invalidate(): void;
|
|
20
28
|
clear(): void;
|
|
29
|
+
getRenderStablePrefixRows(): number;
|
|
21
30
|
getNativeScrollbackLiveRegionStart(): number | undefined;
|
|
22
31
|
getNativeScrollbackCommitSafeEnd(): number | undefined;
|
|
23
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Whether `component` sits below a still-mutating block — i.e. inside the
|
|
34
|
+
* live region, where its rows cannot have been committed to native
|
|
35
|
+
* scrollback yet (commits are prefix-only and stop at the first
|
|
36
|
+
* still-live block). Callers that retract ephemeral blocks (IRC cards)
|
|
37
|
+
* must check this: removing a block whose rows may already be in history
|
|
38
|
+
* is an interior deletion of the committed prefix, which the engine can
|
|
39
|
+
* only repair by recommitting everything below it — duplication.
|
|
40
|
+
*/
|
|
41
|
+
isWithinLiveRegion(component: Component): boolean;
|
|
42
|
+
render(width: number): readonly string[];
|
|
24
43
|
}
|
|
25
44
|
/**
|
|
26
45
|
* Groups a run of sibling rows (an IRC card's header + body, a file-mention
|
|
@@ -15,7 +15,7 @@ declare class TreeList implements Component {
|
|
|
15
15
|
getSearchQuery(): string;
|
|
16
16
|
getSelectedNode(): SessionTreeNode | undefined;
|
|
17
17
|
updateNodeLabel(entryId: string, label: string | undefined): void;
|
|
18
|
-
render(width: number): string[];
|
|
18
|
+
render(width: number): readonly string[];
|
|
19
19
|
handleInput(keyData: string): void;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -14,7 +14,7 @@ declare class UserMessageList implements Component {
|
|
|
14
14
|
onCancel?: () => void;
|
|
15
15
|
constructor(messages: UserMessageItem[]);
|
|
16
16
|
invalidate(): void;
|
|
17
|
-
render(width: number): string[];
|
|
17
|
+
render(width: number): readonly string[];
|
|
18
18
|
handleInput(keyData: string): void;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
@@ -3,6 +3,7 @@ import { Container } from "@oh-my-pi/pi-tui";
|
|
|
3
3
|
* Component that renders a user message
|
|
4
4
|
*/
|
|
5
5
|
export declare class UserMessageComponent extends Container {
|
|
6
|
+
#private;
|
|
6
7
|
constructor(text: string, synthetic?: boolean, imageLinks?: readonly (string | undefined)[]);
|
|
7
|
-
render(width: number): string[];
|
|
8
|
+
render(width: number): readonly string[];
|
|
8
9
|
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { type Component } from "@oh-my-pi/pi-tui";
|
|
2
|
+
/**
|
|
3
|
+
* Fixed number of session rows in the welcome box so its height doesn't shift
|
|
4
|
+
* between the pre-TUI splash (loading placeholder) and the loaded state.
|
|
5
|
+
*/
|
|
6
|
+
export declare const WELCOME_SESSION_SLOTS = 4;
|
|
7
|
+
/**
|
|
8
|
+
* Fixed number of LSP-server rows, for the same reason. Overflow is sliced so
|
|
9
|
+
* the box height is constant regardless of how many servers a project has.
|
|
10
|
+
*/
|
|
11
|
+
export declare const WELCOME_LSP_SLOTS = 4;
|
|
2
12
|
export declare function renderWelcomeTip(tip: string, boxWidth: number): string[];
|
|
3
13
|
export interface RecentSession {
|
|
4
14
|
name: string;
|
|
@@ -6,7 +16,7 @@ export interface RecentSession {
|
|
|
6
16
|
}
|
|
7
17
|
export interface LspServerInfo {
|
|
8
18
|
name: string;
|
|
9
|
-
status: "ready" | "error" | "connecting";
|
|
19
|
+
status: "ready" | "error" | "connecting" | "available";
|
|
10
20
|
fileTypes: string[];
|
|
11
21
|
}
|
|
12
22
|
/**
|
|
@@ -19,8 +29,14 @@ export declare class WelcomeComponent implements Component {
|
|
|
19
29
|
private providerName;
|
|
20
30
|
private recentSessions;
|
|
21
31
|
private lspServers;
|
|
22
|
-
constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[], lspServers?: LspServerInfo[]);
|
|
32
|
+
constructor(version: string, modelName: string, providerName: string, recentSessions?: RecentSession[] | null, lspServers?: LspServerInfo[]);
|
|
23
33
|
invalidate(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Freeze the logo on the intro animation's first frame. The pre-TUI startup
|
|
36
|
+
* splash uses this so the in-TUI intro — which starts at that exact frame —
|
|
37
|
+
* picks up seamlessly from the splash's static box.
|
|
38
|
+
*/
|
|
39
|
+
holdIntroFirstFrame(): void;
|
|
24
40
|
/**
|
|
25
41
|
* Play a one-shot intro that sweeps the gradient through every phase
|
|
26
42
|
* before settling on the resting frame. Safe to call multiple times —
|
|
@@ -30,7 +46,7 @@ export declare class WelcomeComponent implements Component {
|
|
|
30
46
|
setModel(modelName: string, providerName: string): void;
|
|
31
47
|
setRecentSessions(sessions: RecentSession[]): void;
|
|
32
48
|
setLspServers(servers: LspServerInfo[]): void;
|
|
33
|
-
render(termWidth: number): string[];
|
|
49
|
+
render(termWidth: number): readonly string[];
|
|
34
50
|
}
|
|
35
51
|
export declare const PI_LOGO: string[];
|
|
36
52
|
export interface ShineConfig {
|
|
@@ -5,7 +5,7 @@ export declare class MCPAuthorizationLinkPrompt implements Component {
|
|
|
5
5
|
#private;
|
|
6
6
|
constructor(url: string);
|
|
7
7
|
invalidate(): void;
|
|
8
|
-
render(_width: number): string[];
|
|
8
|
+
render(_width: number): readonly string[];
|
|
9
9
|
}
|
|
10
10
|
export declare class MCPCommandController {
|
|
11
11
|
#private;
|
|
@@ -10,7 +10,7 @@ type StreamingRevealControllerOptions = {
|
|
|
10
10
|
requestRender(): void;
|
|
11
11
|
};
|
|
12
12
|
export declare function visibleUnits(message: AssistantMessage, hideThinking: boolean): number;
|
|
13
|
-
export declare function buildDisplayMessage(target: AssistantMessage, revealed: number, hideThinking: boolean): AssistantMessage;
|
|
13
|
+
export declare function buildDisplayMessage(target: AssistantMessage, revealed: number, hideThinking: boolean, countOf?: (index: number, text: string) => number): AssistantMessage;
|
|
14
14
|
export declare function nextStep(backlog: number): number;
|
|
15
15
|
export declare class StreamingRevealController {
|
|
16
16
|
#private;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Agent, type AgentMessage } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { CompactionOutcome } from "@oh-my-pi/pi-agent-core/compaction";
|
|
3
|
-
import {
|
|
3
|
+
import type { AssistantMessage, ImageContent, Message, UsageReport } from "@oh-my-pi/pi-ai";
|
|
4
4
|
import type { Component, EditorTheme } from "@oh-my-pi/pi-tui";
|
|
5
5
|
import { Container, Loader, Spacer, Text, TUI } from "@oh-my-pi/pi-tui";
|
|
6
6
|
import { KeybindingsManager } from "../config/keybindings";
|
|
@@ -27,7 +27,7 @@ export interface SetupTab {
|
|
|
27
27
|
* login). The parent scene MUST NOT switch tabs or finish while modal.
|
|
28
28
|
*/
|
|
29
29
|
readonly modal: boolean;
|
|
30
|
-
render(width: number): string[];
|
|
30
|
+
render(width: number): readonly string[];
|
|
31
31
|
handleInput(data: string): void;
|
|
32
32
|
invalidate(): void;
|
|
33
33
|
/** Called when the tab becomes active (including initial mount). */
|
|
@@ -22,6 +22,7 @@ import type { HookInputComponent } from "./components/hook-input";
|
|
|
22
22
|
import type { HookSelectorComponent, HookSelectorOptions } from "./components/hook-selector";
|
|
23
23
|
import type { StatusLineComponent } from "./components/status-line";
|
|
24
24
|
import type { ToolExecutionHandle } from "./components/tool-execution";
|
|
25
|
+
import type { TranscriptContainer } from "./components/transcript-container";
|
|
25
26
|
import type { LoopLimitRuntime } from "./loop-limit";
|
|
26
27
|
import type { OAuthManualInputManager } from "./oauth-manual-input";
|
|
27
28
|
import type { Theme } from "./theme/theme";
|
|
@@ -61,7 +62,7 @@ export interface InteractiveModeInitOptions {
|
|
|
61
62
|
export type InteractiveSelectorDialogOptions = ExtensionUIDialogOptions & Pick<HookSelectorOptions, "disabledIndices">;
|
|
62
63
|
export interface InteractiveModeContext {
|
|
63
64
|
ui: TUI;
|
|
64
|
-
chatContainer:
|
|
65
|
+
chatContainer: TranscriptContainer;
|
|
65
66
|
pendingMessagesContainer: Container;
|
|
66
67
|
statusContainer: Container;
|
|
67
68
|
todoContainer: Container;
|
|
@@ -19,7 +19,7 @@ import type { AssistantMessage, ImageContent, Message, MessageAttribution, Model
|
|
|
19
19
|
import { Effort } from "@oh-my-pi/pi-ai";
|
|
20
20
|
import { type AsyncJob, type AsyncJobDeliveryState, AsyncJobManager } from "../async";
|
|
21
21
|
import type { Rule } from "../capability/rule";
|
|
22
|
-
import {
|
|
22
|
+
import type { ModelRegistry } from "../config/model-registry";
|
|
23
23
|
import { type ResolvedModelRoleValue } from "../config/model-resolver";
|
|
24
24
|
import { type PromptTemplate } from "../config/prompt-templates";
|
|
25
25
|
import type { Settings, SkillsSettings } from "../config/settings";
|
|
@@ -9,5 +9,9 @@ export declare function getAuthBrokerTokenFilePath(): string;
|
|
|
9
9
|
* (broker disabled — local store is used). Throws when URL is set but no
|
|
10
10
|
* token is available — the caller cannot fall back silently because the
|
|
11
11
|
* user explicitly asked to use the broker.
|
|
12
|
+
*
|
|
13
|
+
* Successful resolutions (including "no broker configured") are memoized for
|
|
14
|
+
* the process lifetime; failures are not, so a missing token can be fixed and
|
|
15
|
+
* retried. Concurrent callers share one in-flight resolution.
|
|
12
16
|
*/
|
|
13
17
|
export declare function resolveAuthBrokerConfig(): Promise<AuthBrokerClientConfig | null>;
|
|
@@ -249,7 +249,7 @@ declare class RecentSessionInfo {
|
|
|
249
249
|
export declare function recoverOrphanedBackups(sessionDir: string, storage: SessionStorage): Promise<void>;
|
|
250
250
|
/** Exported for testing */
|
|
251
251
|
export declare function findMostRecentSession(sessionDir: string, storage?: SessionStorage): Promise<string | null>;
|
|
252
|
-
/** Get recent sessions for display in welcome screen */
|
|
252
|
+
/** Get recent sessions for display in welcome screen (which reserves WELCOME_SESSION_SLOTS rows) */
|
|
253
253
|
export declare function getRecentSessions(sessionDir: string, limit?: number, storage?: SessionStorage): Promise<RecentSessionInfo[]>;
|
|
254
254
|
/**
|
|
255
255
|
* Manages conversation sessions as append-only trees stored in JSONL files.
|