@oh-my-pi/pi-coding-agent 16.1.23 → 16.2.0
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 +70 -0
- package/dist/cli.js +3817 -3735
- package/dist/types/advisor/__tests__/emission-guard.test.d.ts +1 -0
- package/dist/types/advisor/emission-guard.d.ts +73 -0
- package/dist/types/advisor/index.d.ts +1 -0
- package/dist/types/advisor/runtime.d.ts +7 -0
- package/dist/types/advisor/watchdog.d.ts +2 -0
- package/dist/types/cli/flag-tables.d.ts +1 -0
- package/dist/types/cli/gallery-fixtures/search.d.ts +1 -1
- package/dist/types/collab/display-name.d.ts +3 -0
- package/dist/types/collab/host.d.ts +0 -2
- package/dist/types/commands/worktree.d.ts +0 -3
- package/dist/types/config/inline-tool-descriptors-mode.d.ts +13 -0
- package/dist/types/config/model-discovery.d.ts +6 -1
- package/dist/types/config/model-registry.d.ts +6 -2
- package/dist/types/config/model-resolver.d.ts +12 -0
- package/dist/types/config/models-config-schema.d.ts +29 -2
- package/dist/types/config/models-config.d.ts +22 -1
- package/dist/types/config/settings-schema.d.ts +91 -21
- package/dist/types/config/settings.d.ts +2 -0
- package/dist/types/dap/config.d.ts +1 -1
- package/dist/types/edit/hashline/filesystem.d.ts +4 -2
- package/dist/types/edit/renderer.d.ts +4 -0
- package/dist/types/extensibility/extensions/types.d.ts +17 -17
- package/dist/types/extensibility/hooks/types.d.ts +10 -10
- package/dist/types/extensibility/plugins/marketplace/types.d.ts +1 -0
- package/dist/types/internal-urls/__tests__/ssh-protocol.test.d.ts +1 -0
- package/dist/types/internal-urls/index.d.ts +1 -0
- package/dist/types/internal-urls/registry-helpers.d.ts +2 -0
- package/dist/types/internal-urls/router.d.ts +1 -1
- package/dist/types/internal-urls/ssh-protocol.d.ts +10 -0
- package/dist/types/internal-urls/types.d.ts +19 -2
- package/dist/types/irc/bus.d.ts +6 -0
- package/dist/types/modes/components/__tests__/move-overlay.test.d.ts +1 -0
- package/dist/types/modes/components/custom-editor.d.ts +7 -0
- package/dist/types/modes/components/move-overlay.d.ts +23 -0
- package/dist/types/modes/components/plugin-selector.d.ts +2 -1
- package/dist/types/modes/components/queue-mode-selector.d.ts +2 -1
- package/dist/types/modes/components/select-list-mouse-routing.d.ts +2 -0
- package/dist/types/modes/components/settings-defs.d.ts +4 -1
- package/dist/types/modes/components/settings-selector.d.ts +2 -0
- package/dist/types/modes/components/show-images-selector.d.ts +2 -1
- package/dist/types/modes/components/status-line/component.d.ts +2 -0
- package/dist/types/modes/components/status-line/types.d.ts +2 -0
- package/dist/types/modes/components/theme-selector.d.ts +2 -1
- package/dist/types/modes/components/thinking-selector.d.ts +2 -1
- package/dist/types/modes/controllers/command-controller.d.ts +10 -1
- package/dist/types/modes/controllers/streaming-reveal.d.ts +6 -0
- package/dist/types/modes/interactive-mode.d.ts +10 -1
- package/dist/types/modes/internal-url-autocomplete.d.ts +1 -1
- package/dist/types/modes/running-subagent-badge.d.ts +6 -0
- package/dist/types/modes/theme/theme.d.ts +1 -1
- package/dist/types/modes/types.d.ts +9 -1
- package/dist/types/sdk.d.ts +2 -2
- package/dist/types/session/agent-session.d.ts +2 -1
- package/dist/types/session/session-manager.d.ts +13 -0
- package/dist/types/slash-commands/builtin-registry.d.ts +1 -1
- package/dist/types/ssh/__tests__/connection-manager-args.test.d.ts +1 -0
- package/dist/types/ssh/__tests__/file-transfer-posix-guard.test.d.ts +1 -0
- package/dist/types/ssh/connection-manager.d.ts +2 -0
- package/dist/types/ssh/file-transfer.d.ts +79 -0
- package/dist/types/ssh/utils.d.ts +6 -0
- package/dist/types/system-prompt.d.ts +3 -0
- package/dist/types/task/executor.d.ts +16 -0
- package/dist/types/tiny/text.d.ts +1 -1
- package/dist/types/tools/builtin-names.d.ts +5 -1
- package/dist/types/tools/{find.d.ts → glob.d.ts} +15 -15
- package/dist/types/tools/{search.d.ts → grep.d.ts} +14 -14
- package/dist/types/tools/index.d.ts +3 -3
- package/dist/types/tools/path-utils.d.ts +29 -0
- package/dist/types/tools/read.d.ts +2 -2
- package/dist/types/tools/render-utils.d.ts +8 -0
- package/dist/types/tools/renderers.d.ts +11 -0
- package/dist/types/tools/ssh.d.ts +2 -0
- package/dist/types/tools/todo.d.ts +0 -16
- package/dist/types/tools/write.d.ts +2 -2
- package/dist/types/utils/active-repo-context.d.ts +8 -0
- package/dist/types/utils/image-resize.d.ts +1 -0
- package/dist/types/utils/markit-cache.d.ts +23 -0
- package/dist/types/utils/markit.d.ts +5 -1
- package/dist/types/utils/prompt-path.d.ts +1 -0
- package/dist/types/web/search/providers/duckduckgo.d.ts +14 -0
- package/dist/types/web/search/providers/firecrawl.d.ts +28 -0
- package/dist/types/web/search/providers/tinyfish.d.ts +29 -0
- package/dist/types/web/search/providers/xai.d.ts +13 -0
- package/dist/types/web/search/types.d.ts +18 -2
- package/package.json +30 -15
- package/scripts/build-binary.ts +9 -9
- package/scripts/bundle-dist.ts +2 -2
- package/src/advisor/__tests__/advisor.test.ts +40 -4
- package/src/advisor/__tests__/emission-guard.test.ts +147 -0
- package/src/advisor/advise-tool.ts +1 -1
- package/src/advisor/emission-guard.ts +172 -0
- package/src/advisor/index.ts +1 -0
- package/src/advisor/runtime.ts +11 -0
- package/src/advisor/watchdog.ts +12 -1
- package/src/cli/args.ts +5 -2
- package/src/cli/auth-broker-cli.ts +17 -0
- package/src/cli/config-cli.ts +4 -0
- package/src/cli/flag-tables.ts +7 -4
- package/src/cli/gallery-cli.ts +14 -2
- package/src/cli/gallery-fixtures/edit.ts +60 -0
- package/src/cli/gallery-fixtures/fs.ts +17 -17
- package/src/cli/gallery-fixtures/search.ts +4 -4
- package/src/cli/usage-cli.ts +20 -1
- package/src/cli/web-search-cli.ts +1 -1
- package/src/collab/display-name.ts +13 -0
- package/src/collab/guest.ts +5 -1
- package/src/collab/host.ts +2 -13
- package/src/commands/worktree.ts +6 -0
- package/src/config/inline-tool-descriptors-mode.ts +27 -0
- package/src/config/model-discovery.ts +77 -8
- package/src/config/model-registry.ts +89 -11
- package/src/config/model-resolver.ts +39 -1
- package/src/config/models-config-schema.ts +41 -5
- package/src/config/models-config.ts +4 -1
- package/src/config/settings-schema.ts +85 -27
- package/src/config/settings.ts +172 -1
- package/src/cursor.ts +1 -1
- package/src/dap/config.ts +152 -8
- package/src/dap/session.ts +1 -1
- package/src/discovery/helpers.ts +3 -1
- package/src/edit/hashline/diff.ts +14 -3
- package/src/edit/hashline/execute.ts +42 -6
- package/src/edit/hashline/filesystem.ts +38 -2
- package/src/edit/index.ts +1 -0
- package/src/edit/modes/patch.ts +11 -1
- package/src/edit/renderer.ts +140 -13
- package/src/eval/__tests__/agent-bridge.test.ts +101 -0
- package/src/eval/agent-bridge.ts +26 -3
- package/src/eval/js/tool-bridge.ts +2 -2
- package/src/export/html/index.ts +1 -1
- package/src/export/html/template.js +3 -1
- package/src/export/html/tool-views.generated.js +20 -20
- package/src/extensibility/extensions/types.ts +22 -22
- package/src/extensibility/hooks/types.ts +11 -11
- package/src/extensibility/plugins/legacy-pi-bundled-keys.ts +8 -3
- package/src/extensibility/plugins/legacy-pi-bundled-registry.ts +25 -10
- package/src/extensibility/plugins/marketplace/manager.ts +22 -0
- package/src/extensibility/plugins/marketplace/types.ts +1 -0
- package/src/internal-urls/__tests__/ssh-protocol.test.ts +331 -0
- package/src/internal-urls/docs-index.generated.txt +2 -2
- package/src/internal-urls/docs-index.ts +2 -3
- package/src/internal-urls/index.ts +1 -0
- package/src/internal-urls/registry-helpers.ts +19 -4
- package/src/internal-urls/router.ts +5 -3
- package/src/internal-urls/ssh-protocol.ts +367 -0
- package/src/internal-urls/types.ts +19 -2
- package/src/irc/bus.ts +11 -3
- package/src/mcp/tool-bridge.ts +32 -2
- package/src/memories/index.ts +1 -1
- package/src/modes/acp/acp-event-mapper.ts +2 -2
- package/src/modes/components/__tests__/move-overlay.test.ts +166 -0
- package/src/modes/components/agent-hub.ts +3 -0
- package/src/modes/components/agent-transcript-viewer.ts +9 -7
- package/src/modes/components/custom-editor.ts +90 -5
- package/src/modes/components/move-overlay.ts +282 -0
- package/src/modes/components/plan-review-overlay.ts +35 -35
- package/src/modes/components/plugin-selector.ts +6 -1
- package/src/modes/components/queue-mode-selector.ts +6 -1
- package/src/modes/components/select-list-mouse-routing.ts +35 -0
- package/src/modes/components/session-selector.ts +11 -10
- package/src/modes/components/settings-defs.ts +14 -1
- package/src/modes/components/settings-selector.ts +196 -29
- package/src/modes/components/show-images-selector.ts +6 -1
- package/src/modes/components/status-line/component.ts +108 -28
- package/src/modes/components/status-line/segments.ts +5 -1
- package/src/modes/components/status-line/types.ts +2 -0
- package/src/modes/components/theme-selector.ts +6 -1
- package/src/modes/components/thinking-selector.ts +6 -1
- package/src/modes/components/tool-execution.ts +25 -9
- package/src/modes/components/tree-selector.ts +5 -5
- package/src/modes/controllers/command-controller.ts +140 -47
- package/src/modes/controllers/event-controller.ts +59 -3
- package/src/modes/controllers/input-controller.ts +68 -2
- package/src/modes/controllers/selector-controller.ts +5 -2
- package/src/modes/controllers/streaming-reveal.ts +17 -0
- package/src/modes/controllers/tool-args-reveal.ts +1 -1
- package/src/modes/interactive-mode.ts +116 -50
- package/src/modes/internal-url-autocomplete.ts +17 -2
- package/src/modes/prompt-action-autocomplete.ts +3 -1
- package/src/modes/running-subagent-badge.ts +13 -0
- package/src/modes/setup-wizard/scenes/glyph.ts +2 -13
- package/src/modes/setup-wizard/scenes/providers.ts +2 -1
- package/src/modes/setup-wizard/scenes/theme.ts +6 -12
- package/src/modes/setup-wizard/scenes/web-search.ts +8 -13
- package/src/modes/setup-wizard/wizard-overlay.ts +6 -5
- package/src/modes/theme/theme.ts +9 -1
- package/src/modes/types.ts +9 -1
- package/src/modes/utils/interactive-context-helpers.ts +1 -1
- package/src/priority.json +15 -0
- package/src/prompts/advisor/active-repo-watchdog.md +6 -0
- package/src/prompts/advisor/system.md +21 -7
- package/src/prompts/agents/designer.md +1 -1
- package/src/prompts/agents/explore.md +1 -1
- package/src/prompts/agents/librarian.md +2 -2
- package/src/prompts/agents/plan.md +2 -2
- package/src/prompts/agents/reviewer.md +1 -1
- package/src/prompts/agents/task.md +2 -2
- package/src/prompts/system/active-repo-context.md +4 -0
- package/src/prompts/system/gemini-tool-call-reminder.md +9 -0
- package/src/prompts/system/plan-mode-active.md +3 -3
- package/src/prompts/system/project-prompt.md +2 -2
- package/src/prompts/system/system-prompt.md +6 -6
- package/src/prompts/tools/bash.md +2 -2
- package/src/prompts/tools/checkpoint.md +1 -1
- package/src/prompts/tools/{find.md → glob.md} +1 -1
- package/src/prompts/tools/{search.md → grep.md} +3 -3
- package/src/prompts/tools/read.md +4 -2
- package/src/sdk.ts +55 -25
- package/src/session/agent-session.ts +508 -132
- package/src/session/session-history-format.ts +2 -2
- package/src/session/session-manager.ts +46 -0
- package/src/slash-commands/builtin-registry.ts +138 -20
- package/src/slash-commands/helpers/usage-report.ts +23 -2
- package/src/ssh/__tests__/connection-manager-args.test.ts +69 -0
- package/src/ssh/__tests__/file-transfer-posix-guard.test.ts +68 -0
- package/src/ssh/connection-manager.ts +12 -15
- package/src/ssh/file-transfer.ts +209 -0
- package/src/ssh/utils.ts +24 -0
- package/src/system-prompt.ts +56 -28
- package/src/task/executor.ts +96 -36
- package/src/task/index.ts +3 -3
- package/src/task/render.ts +14 -13
- package/src/task/worktree.ts +38 -1
- package/src/tiny/text.ts +49 -4
- package/src/tiny/worker.ts +3 -3
- package/src/tools/bash.ts +2 -2
- package/src/tools/builtin-names.ts +26 -2
- package/src/tools/{find.ts → glob.ts} +48 -42
- package/src/tools/{search.ts → grep.ts} +311 -129
- package/src/tools/index.ts +13 -14
- package/src/tools/irc.ts +6 -2
- package/src/tools/path-utils.ts +64 -1
- package/src/tools/read.ts +35 -6
- package/src/tools/render-utils.ts +14 -0
- package/src/tools/renderers.ts +15 -4
- package/src/tools/ssh.ts +17 -2
- package/src/tools/todo.ts +4 -26
- package/src/tools/write.ts +25 -9
- package/src/utils/active-repo-context.ts +143 -0
- package/src/utils/image-resize.ts +88 -7
- package/src/utils/lang-from-path.ts +3 -3
- package/src/utils/markit-cache.ts +166 -0
- package/src/utils/markit.ts +86 -18
- package/src/utils/prompt-path.ts +3 -0
- package/src/utils/title-generator.ts +1 -1
- package/src/web/search/provider.ts +54 -34
- package/src/web/search/providers/duckduckgo.ts +140 -0
- package/src/web/search/providers/firecrawl.ts +144 -0
- package/src/web/search/providers/tinyfish.ts +159 -0
- package/src/web/search/providers/xai.ts +292 -0
- package/src/web/search/providers/zai.ts +142 -56
- package/src/web/search/types.ts +6 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-session policy gate for advisor `advise()` calls.
|
|
3
|
+
*
|
|
4
|
+
* The advisor system prompt tells the watcher model:
|
|
5
|
+
*
|
|
6
|
+
* > at most one `advise` per update
|
|
7
|
+
* > NEVER repeat advice you already gave, and NEVER send the same advice twice
|
|
8
|
+
*
|
|
9
|
+
* Real advisor models violate this. Issue #3520 captured a session where
|
|
10
|
+
* `__advisor.jsonl` recorded 309 `advise` calls covering 92 unique notes —
|
|
11
|
+
* 114× `Stop.`, 52× `No issue; continue.`, 41× `Done.` — flooding the primary
|
|
12
|
+
* transcript with `<advisory severity="blocker">Stop.</advisory>` after the
|
|
13
|
+
* task was already complete. The fix is to make the rules load-bearing in code
|
|
14
|
+
* instead of prose: silently drop duplicates, content-free self-talk, and
|
|
15
|
+
* over-budget calls at the `enqueueAdvice` boundary so the primary stays
|
|
16
|
+
* clean even when the advisor misbehaves.
|
|
17
|
+
*
|
|
18
|
+
* The gate is intentionally invisible to the advisor model — `AdviseTool`
|
|
19
|
+
* still returns `Recorded.` for a suppressed call. Surfacing "suppressed"
|
|
20
|
+
* back into advisor context risks the model rephrasing the same useless note
|
|
21
|
+
* to bypass the dedupe ("Stop.", then "Halt." then "Stop now.").
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Case-insensitive, punctuation-folded normalization. Collapses every run of
|
|
25
|
+
* non-letter / non-digit characters into a single space and trims, so
|
|
26
|
+
* `"Stop."`, `"*Stop*"`, and `" stop "` all key to `stop`, while
|
|
27
|
+
* `"No issue; continue."` keys to `no issue continue`.
|
|
28
|
+
*
|
|
29
|
+
* Exported for tests.
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizeAdvisorNote(note: string): string;
|
|
32
|
+
/**
|
|
33
|
+
* Decides whether an advisor `advise()` call should reach the primary agent.
|
|
34
|
+
*
|
|
35
|
+
* Enforces — in this order — the noise filter, session-scoped exact-text
|
|
36
|
+
* dedupe (FIFO-evicted at {@link DEFAULT_HISTORY_CAPACITY}), and a per-update
|
|
37
|
+
* rate limit of one accepted note per advisor model prompt. Suppressed calls
|
|
38
|
+
* never consume the per-update budget — a noise call doesn't burn the slot
|
|
39
|
+
* for a real concern that follows in the same update.
|
|
40
|
+
*
|
|
41
|
+
* Reset on advisor reset (compaction, session switch, `/new`) via
|
|
42
|
+
* {@link reset}. Per-update gate is cleared at the start of every advisor
|
|
43
|
+
* `agent.prompt()` cycle via {@link beginUpdate}.
|
|
44
|
+
*/
|
|
45
|
+
export declare class AdvisorEmissionGuard {
|
|
46
|
+
#private;
|
|
47
|
+
constructor(opts?: {
|
|
48
|
+
capacity?: number;
|
|
49
|
+
});
|
|
50
|
+
/**
|
|
51
|
+
* Drop all dedupe and per-update state. Called from
|
|
52
|
+
* `AgentSession#resetAdvisorSessionState()` whenever the advisor runtime is
|
|
53
|
+
* reset — same boundary as `yieldQueue.clear("advisor")`, so a re-primed
|
|
54
|
+
* advisor can re-raise old issues (the primary transcript was rewritten).
|
|
55
|
+
*/
|
|
56
|
+
reset(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Clear the per-update rate-limit gate. Called by `AdvisorRuntime` right
|
|
59
|
+
* before each `agent.prompt(batch)` invocation so the next advisor model
|
|
60
|
+
* cycle starts with a fresh budget of one advise.
|
|
61
|
+
*/
|
|
62
|
+
beginUpdate(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Whether the proposed note should reach the primary. On `true` the gate
|
|
65
|
+
* has already recorded the note (consumed the per-update budget and added
|
|
66
|
+
* it to the dedupe history) — caller delivers the note. On `false` the
|
|
67
|
+
* caller drops it.
|
|
68
|
+
*
|
|
69
|
+
* Empty / whitespace-only notes are suppressed; the model's
|
|
70
|
+
* tool-args contract still requires a non-empty string but defense-in-depth.
|
|
71
|
+
*/
|
|
72
|
+
accept(note: string): boolean;
|
|
73
|
+
}
|
|
@@ -26,6 +26,13 @@ export interface AdvisorRuntimeHost {
|
|
|
26
26
|
* the primary's next compaction triggers {@link AdvisorRuntime.reset}).
|
|
27
27
|
*/
|
|
28
28
|
maintainContext?(incomingTokens: number): Promise<boolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Called immediately before each `agent.prompt(batch)` cycle. Lets the host
|
|
31
|
+
* clear per-update advisor state — currently the one-advise-per-update gate
|
|
32
|
+
* in {@link AdvisorEmissionGuard}, which the host owns because it is the
|
|
33
|
+
* one that routes `advise()` results back to the primary.
|
|
34
|
+
*/
|
|
35
|
+
beginAdvisorUpdate?(): void;
|
|
29
36
|
}
|
|
30
37
|
export declare class AdvisorRuntime {
|
|
31
38
|
#private;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { ActiveRepoContext } from "../utils/active-repo-context";
|
|
2
|
+
export declare function formatActiveRepoWatchdogPrompt(activeRepoContext: ActiveRepoContext): string;
|
|
1
3
|
/**
|
|
2
4
|
* Discover and load WATCHDOG.md files walking up from cwd, project .omp folder, and user agent dir.
|
|
3
5
|
* Returns formatted watchdog file blocks ready to be appended to the advisor system prompt.
|
|
@@ -46,6 +46,7 @@ export interface ParseDeps {
|
|
|
46
46
|
};
|
|
47
47
|
parseThinking: (value: string | null | undefined) => ConfiguredThinkingLevel | undefined;
|
|
48
48
|
builtinToolNames: readonly string[];
|
|
49
|
+
normalizeToolNames: (values: Iterable<string>) => string[];
|
|
49
50
|
thinkingEfforts: readonly string[];
|
|
50
51
|
}
|
|
51
52
|
export type StringSetter = (result: Args, value: string, deps: ParseDeps) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** Gallery fixtures for the search tools (
|
|
1
|
+
/** Gallery fixtures for the search tools (grep, search_tool_bm25, ast_grep). */
|
|
2
2
|
import type { GalleryFixture } from "./types";
|
|
3
3
|
export declare const searchFixtures: Record<string, GalleryFixture>;
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { InteractiveModeContext } from "../modes/types";
|
|
12
12
|
import { type CollabParticipant } from "./protocol";
|
|
13
|
-
/** Display name for this process's user in collab sessions. */
|
|
14
|
-
export declare function collabDisplayName(ctx: InteractiveModeContext): string;
|
|
15
13
|
export declare class CollabHost {
|
|
16
14
|
#private;
|
|
17
15
|
constructor(ctx: InteractiveModeContext);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves whether full tool descriptors should be inlined into the system
|
|
3
|
+
* prompt (and stripped from provider tool schemas) for a given model and
|
|
4
|
+
* setting.
|
|
5
|
+
*
|
|
6
|
+
* `auto` enforces a per-model policy: inline for Gemini models, off otherwise.
|
|
7
|
+
* Gemini benefits from descriptors in-prompt; other providers keep them in the
|
|
8
|
+
* tool schemas. `on`/`off` are explicit user overrides.
|
|
9
|
+
*
|
|
10
|
+
* @param modelId Canonical model id (e.g. `gemini-3-pro`); resolve aliases via
|
|
11
|
+
* `ModelRegistry.getCanonicalId` before calling so `auto` classifies correctly.
|
|
12
|
+
*/
|
|
13
|
+
export declare function shouldInlineToolDescriptors(setting: "auto" | "on" | "off" | undefined, modelId: string | undefined): boolean;
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
* discovery lives in pi-catalog's provider-models.
|
|
7
7
|
*/
|
|
8
8
|
import { type ApiKey, type FetchImpl } from "@oh-my-pi/pi-ai";
|
|
9
|
-
import type { Api, Model } from "@oh-my-pi/pi-ai/types";
|
|
9
|
+
import type { Api, Model, RemoteCompactionConfig } from "@oh-my-pi/pi-ai/types";
|
|
10
10
|
import type { ModelSpec } from "@oh-my-pi/pi-catalog/types";
|
|
11
11
|
import type { ProviderDiscovery } from "./models-config-schema";
|
|
12
|
+
export declare const DISCOVERY_DEFAULT_CONTEXT_WINDOW = 128000;
|
|
12
13
|
export declare const DISCOVERY_DEFAULT_MAX_TOKENS = 32768;
|
|
13
14
|
export declare function getImplicitOllamaBaseUrl(): string;
|
|
14
15
|
export declare function getOllamaContextLengthOverride(): number | undefined;
|
|
@@ -20,6 +21,7 @@ export interface DiscoveryProviderConfig {
|
|
|
20
21
|
baseUrl?: string;
|
|
21
22
|
headers?: Record<string, string>;
|
|
22
23
|
compat?: ModelSpec<Api>["compat"];
|
|
24
|
+
remoteCompaction?: RemoteCompactionConfig<Api>;
|
|
23
25
|
discovery: ProviderDiscovery;
|
|
24
26
|
optional?: boolean;
|
|
25
27
|
}
|
|
@@ -40,6 +42,7 @@ export declare function discoverOllamaModels(providerConfig: DiscoveryProviderCo
|
|
|
40
42
|
export declare function discoverLlamaCppModels(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
|
|
41
43
|
export declare function discoverLlamaCppModelContextWindow(model: Pick<Model<Api>, "provider" | "id" | "baseUrl" | "headers">, ctx: DiscoveryContext): Promise<number | undefined>;
|
|
42
44
|
export declare function discoverOpenAIModelsList(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
|
|
45
|
+
export declare function discoverLiteLLMModels(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
|
|
43
46
|
/**
|
|
44
47
|
* Discover models from an Anthropic+OpenAI-compatible reseller proxy that
|
|
45
48
|
* exposes both `/v1/messages` and `/v1/chat/completions`, advertising each
|
|
@@ -56,3 +59,5 @@ export declare function discoverOpenAIModelsList(providerConfig: DiscoveryProvid
|
|
|
56
59
|
* URL (which ends in `/v1`) round-trips correctly.
|
|
57
60
|
*/
|
|
58
61
|
export declare function discoverProxyModels(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
|
|
62
|
+
export declare function normalizeLiteLLMDiscoveryBaseUrl(baseUrl?: string): string;
|
|
63
|
+
export declare function normalizeOpenAIModelsListBaseUrl(baseUrl?: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Api, Context, Model, ModelSpec, SimpleStreamOptions, ThinkingConfig } from "@oh-my-pi/pi-ai/types";
|
|
1
|
+
import type { Api, Context, Model, ModelSpec, RemoteCompactionConfig, SimpleStreamOptions, ThinkingConfig } from "@oh-my-pi/pi-ai/types";
|
|
2
2
|
import type { AssistantMessageEventStream } from "@oh-my-pi/pi-ai/utils/event-stream";
|
|
3
3
|
import { type ModelRefreshStrategy } from "@oh-my-pi/pi-catalog/model-manager";
|
|
4
4
|
import type { ApiKeyResolver, FetchImpl } from "@oh-my-pi/pi-ai";
|
|
@@ -17,6 +17,7 @@ interface ProviderOverride {
|
|
|
17
17
|
apiKey?: string;
|
|
18
18
|
authHeader?: boolean;
|
|
19
19
|
compat?: ModelSpec<Api>["compat"];
|
|
20
|
+
remoteCompaction?: RemoteCompactionConfig<Api>;
|
|
20
21
|
transport?: Model<Api>["transport"];
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
@@ -45,7 +46,7 @@ interface ProviderOverride {
|
|
|
45
46
|
* See `xiaomi-tp-discovery-merge.test.ts` and the `refresh()` baseUrl-override
|
|
46
47
|
* regression in `model-registry.test.ts`.
|
|
47
48
|
*/
|
|
48
|
-
export declare function mergeDiscoveredModel<TApi extends Api>(model: Model<TApi>, existing: Model<Api> | undefined, providerOverride?: Pick<ProviderOverride, "baseUrl" | "headers" | "transport">): Model<TApi>;
|
|
49
|
+
export declare function mergeDiscoveredModel<TApi extends Api>(model: Model<TApi>, existing: Model<Api> | undefined, providerOverride?: Pick<ProviderOverride, "baseUrl" | "headers" | "remoteCompaction" | "transport">): Model<TApi>;
|
|
49
50
|
export type ProviderDiscoveryStatus = "idle" | "ok" | "empty" | "cached" | "unavailable" | "unauthenticated";
|
|
50
51
|
export interface ProviderDiscoveryState {
|
|
51
52
|
provider: string;
|
|
@@ -227,6 +228,7 @@ export interface ProviderConfigInput {
|
|
|
227
228
|
streamSimple?: (model: Model<Api>, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStream;
|
|
228
229
|
headers?: Record<string, string>;
|
|
229
230
|
compat?: ModelSpec<Api>["compat"];
|
|
231
|
+
remoteCompaction?: RemoteCompactionConfig<Api>;
|
|
230
232
|
authHeader?: boolean;
|
|
231
233
|
/** Streaming transport override — see {@link Model.transport}. */
|
|
232
234
|
transport?: Model<Api>["transport"];
|
|
@@ -264,6 +266,8 @@ export interface ProviderConfigInput {
|
|
|
264
266
|
headers?: Record<string, string>;
|
|
265
267
|
compat?: ModelSpec<Api>["compat"];
|
|
266
268
|
contextPromotionTarget?: string;
|
|
269
|
+
compactionModel?: string;
|
|
270
|
+
remoteCompaction?: RemoteCompactionConfig<Api>;
|
|
267
271
|
premiumMultiplier?: number;
|
|
268
272
|
}>;
|
|
269
273
|
}
|
|
@@ -181,6 +181,18 @@ export declare function resolveRoleSelection(roles: readonly string[], settings:
|
|
|
181
181
|
model: Model<Api>;
|
|
182
182
|
thinkingLevel?: ThinkingLevel;
|
|
183
183
|
} | undefined;
|
|
184
|
+
/**
|
|
185
|
+
* Resolve the model for the `advisor` role. A configured `modelRoles.advisor`
|
|
186
|
+
* wins outright (a bad override surfaces as no model rather than silently
|
|
187
|
+
* running something else); when unset it falls back to the `slow` priority
|
|
188
|
+
* chain via {@link ROLE_PRIORITY_ALIAS} — a strong reasoning model that, unlike
|
|
189
|
+
* the `slow` role itself, never inherits the primary's model. Returns undefined
|
|
190
|
+
* only when no candidate in the resolved chain is available.
|
|
191
|
+
*/
|
|
192
|
+
export declare function resolveAdvisorRoleSelection(settings: Settings, availableModels: Model<Api>[], modelRegistry?: CanonicalModelRegistry): {
|
|
193
|
+
model: Model<Api>;
|
|
194
|
+
thinkingLevel?: ThinkingLevel;
|
|
195
|
+
} | undefined;
|
|
184
196
|
/**
|
|
185
197
|
* Resolve model patterns to actual Model objects with optional thinking levels
|
|
186
198
|
* Format: "pattern:level" where :level is optional
|
|
@@ -239,10 +239,17 @@ export declare const ModelOverrideSchema: import("arktype/internal/variants/obje
|
|
|
239
239
|
} | undefined;
|
|
240
240
|
} | undefined;
|
|
241
241
|
contextPromotionTarget?: string | undefined;
|
|
242
|
+
compactionModel?: string | undefined;
|
|
243
|
+
remoteCompaction?: {
|
|
244
|
+
enabled?: boolean | undefined;
|
|
245
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
246
|
+
endpoint?: string | undefined;
|
|
247
|
+
model?: string | undefined;
|
|
248
|
+
} | undefined;
|
|
242
249
|
}, {}>;
|
|
243
250
|
export type ModelOverride = typeof ModelOverrideSchema.infer;
|
|
244
251
|
export declare const ProviderDiscoverySchema: import("arktype/internal/variants/object.ts").ObjectType<{
|
|
245
|
-
type: "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
|
|
252
|
+
type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
|
|
246
253
|
}, {}>;
|
|
247
254
|
export declare const ProviderAuthSchema: import("arktype/internal/variants/string.ts").StringType<"apiKey" | "none" | "oauth", {}>;
|
|
248
255
|
export type ProviderAuthMode = typeof ProviderAuthSchema.infer;
|
|
@@ -356,10 +363,16 @@ export declare const ModelsConfigSchema: import("arktype/internal/variants/objec
|
|
|
356
363
|
replayUnsignedThinking?: boolean | undefined;
|
|
357
364
|
} | undefined;
|
|
358
365
|
} | undefined;
|
|
366
|
+
remoteCompaction?: {
|
|
367
|
+
enabled?: boolean | undefined;
|
|
368
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
369
|
+
endpoint?: string | undefined;
|
|
370
|
+
model?: string | undefined;
|
|
371
|
+
} | undefined;
|
|
359
372
|
authHeader?: boolean | undefined;
|
|
360
373
|
auth?: "apiKey" | "none" | "oauth" | undefined;
|
|
361
374
|
discovery?: {
|
|
362
|
-
type: "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
|
|
375
|
+
type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
|
|
363
376
|
} | undefined;
|
|
364
377
|
models?: {
|
|
365
378
|
id: string;
|
|
@@ -505,6 +518,13 @@ export declare const ModelsConfigSchema: import("arktype/internal/variants/objec
|
|
|
505
518
|
} | undefined;
|
|
506
519
|
} | undefined;
|
|
507
520
|
contextPromotionTarget?: string | undefined;
|
|
521
|
+
compactionModel?: string | undefined;
|
|
522
|
+
remoteCompaction?: {
|
|
523
|
+
enabled?: boolean | undefined;
|
|
524
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
525
|
+
endpoint?: string | undefined;
|
|
526
|
+
model?: string | undefined;
|
|
527
|
+
} | undefined;
|
|
508
528
|
}[] | undefined;
|
|
509
529
|
modelOverrides?: {
|
|
510
530
|
[x: string]: {
|
|
@@ -648,6 +668,13 @@ export declare const ModelsConfigSchema: import("arktype/internal/variants/objec
|
|
|
648
668
|
} | undefined;
|
|
649
669
|
} | undefined;
|
|
650
670
|
contextPromotionTarget?: string | undefined;
|
|
671
|
+
compactionModel?: string | undefined;
|
|
672
|
+
remoteCompaction?: {
|
|
673
|
+
enabled?: boolean | undefined;
|
|
674
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
675
|
+
endpoint?: string | undefined;
|
|
676
|
+
model?: string | undefined;
|
|
677
|
+
} | undefined;
|
|
651
678
|
};
|
|
652
679
|
} | undefined;
|
|
653
680
|
disableStrictTools?: boolean | undefined;
|
|
@@ -21,6 +21,7 @@ export interface ProviderValidationConfig {
|
|
|
21
21
|
oauthConfigured?: boolean;
|
|
22
22
|
discovery?: ProviderDiscovery;
|
|
23
23
|
compat?: ModelSpec<Api>["compat"];
|
|
24
|
+
remoteCompaction?: unknown;
|
|
24
25
|
disableStrictTools?: boolean;
|
|
25
26
|
modelOverrides?: Record<string, unknown>;
|
|
26
27
|
models: ProviderValidationModel[];
|
|
@@ -135,10 +136,16 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
135
136
|
replayUnsignedThinking?: boolean | undefined;
|
|
136
137
|
} | undefined;
|
|
137
138
|
} | undefined;
|
|
139
|
+
remoteCompaction?: {
|
|
140
|
+
enabled?: boolean | undefined;
|
|
141
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
142
|
+
endpoint?: string | undefined;
|
|
143
|
+
model?: string | undefined;
|
|
144
|
+
} | undefined;
|
|
138
145
|
authHeader?: boolean | undefined;
|
|
139
146
|
auth?: "apiKey" | "none" | "oauth" | undefined;
|
|
140
147
|
discovery?: {
|
|
141
|
-
type: "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
|
|
148
|
+
type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
|
|
142
149
|
} | undefined;
|
|
143
150
|
models?: {
|
|
144
151
|
id: string;
|
|
@@ -269,6 +276,13 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
269
276
|
} | undefined;
|
|
270
277
|
} | undefined;
|
|
271
278
|
contextPromotionTarget?: string | undefined;
|
|
279
|
+
compactionModel?: string | undefined;
|
|
280
|
+
remoteCompaction?: {
|
|
281
|
+
enabled?: boolean | undefined;
|
|
282
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
283
|
+
endpoint?: string | undefined;
|
|
284
|
+
model?: string | undefined;
|
|
285
|
+
} | undefined;
|
|
272
286
|
}[] | undefined;
|
|
273
287
|
modelOverrides?: {
|
|
274
288
|
[x: string]: {
|
|
@@ -397,6 +411,13 @@ export declare const ModelsConfigFile: ConfigFile<{
|
|
|
397
411
|
} | undefined;
|
|
398
412
|
} | undefined;
|
|
399
413
|
contextPromotionTarget?: string | undefined;
|
|
414
|
+
compactionModel?: string | undefined;
|
|
415
|
+
remoteCompaction?: {
|
|
416
|
+
enabled?: boolean | undefined;
|
|
417
|
+
api?: "anthropic-messages" | "azure-openai-responses" | "google-gemini-cli" | "google-generative-ai" | "google-vertex" | "openai-codex-responses" | "openai-completions" | "openai-responses" | undefined;
|
|
418
|
+
endpoint?: string | undefined;
|
|
419
|
+
model?: string | undefined;
|
|
420
|
+
} | undefined;
|
|
400
421
|
};
|
|
401
422
|
} | undefined;
|
|
402
423
|
disableStrictTools?: boolean | undefined;
|
|
@@ -257,6 +257,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
257
257
|
readonly type: "array";
|
|
258
258
|
readonly default: string[];
|
|
259
259
|
};
|
|
260
|
+
readonly "providers.maxInFlightRequests": {
|
|
261
|
+
readonly type: "record";
|
|
262
|
+
readonly default: Record<string, number>;
|
|
263
|
+
readonly ui: {
|
|
264
|
+
readonly tab: "providers";
|
|
265
|
+
readonly group: "Services";
|
|
266
|
+
readonly label: "Max In-Flight Requests";
|
|
267
|
+
readonly description: 'Maximum concurrent LLM requests per provider id (for example "openai" or "anthropic"), shared across local OMP processes with this config root. Omitted providers are unlimited.';
|
|
268
|
+
};
|
|
269
|
+
};
|
|
260
270
|
readonly disabledExtensions: {
|
|
261
271
|
readonly type: "array";
|
|
262
272
|
readonly default: string[];
|
|
@@ -735,6 +745,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
735
745
|
readonly default: 8;
|
|
736
746
|
readonly description: "Maximum number of inline images kept as live terminal graphics (default 8). Older images fall back to a text placeholder via a full redraw once the limit is exceeded. Set to 0 to keep every image (no limit).";
|
|
737
747
|
};
|
|
748
|
+
readonly "terminal.showProgress": {
|
|
749
|
+
readonly type: "boolean";
|
|
750
|
+
readonly default: false;
|
|
751
|
+
readonly ui: {
|
|
752
|
+
readonly tab: "appearance";
|
|
753
|
+
readonly group: "Display";
|
|
754
|
+
readonly label: "Native Terminal Progress";
|
|
755
|
+
readonly description: "Emit OSC 9;4 indeterminate progress while the agent or context maintenance is running";
|
|
756
|
+
};
|
|
757
|
+
};
|
|
738
758
|
readonly "tui.textSizing": {
|
|
739
759
|
readonly type: "boolean";
|
|
740
760
|
readonly default: false;
|
|
@@ -902,14 +922,38 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
902
922
|
readonly description: "Apply loop guard to assistant prose messages in addition to thinking logs";
|
|
903
923
|
};
|
|
904
924
|
};
|
|
905
|
-
readonly
|
|
925
|
+
readonly "model.loopGuard.toolCallReminder": {
|
|
906
926
|
readonly type: "boolean";
|
|
907
|
-
readonly default:
|
|
927
|
+
readonly default: true;
|
|
928
|
+
readonly ui: {
|
|
929
|
+
readonly tab: "model";
|
|
930
|
+
readonly group: "Thinking";
|
|
931
|
+
readonly label: "Loop Guard Tool-Call Reminder";
|
|
932
|
+
readonly description: "When a Gemini reasoning stream emits many consecutive planning headers without calling a tool, interrupt it and inject a reminder to issue a tool call (requires Loop Guard)";
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
readonly inlineToolDescriptors: {
|
|
936
|
+
readonly type: "enum";
|
|
937
|
+
readonly values: readonly ["auto", "on", "off"];
|
|
938
|
+
readonly default: "auto";
|
|
908
939
|
readonly ui: {
|
|
909
940
|
readonly tab: "model";
|
|
910
941
|
readonly group: "Prompt";
|
|
911
942
|
readonly label: "Inline Tool Descriptors";
|
|
912
|
-
readonly description: "Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once";
|
|
943
|
+
readonly description: "Render full tool descriptors in the system prompt and strip top-level/nested descriptions from provider tool schemas so descriptor text is sent once. Auto enables this for Gemini models and disables it otherwise";
|
|
944
|
+
readonly options: readonly [{
|
|
945
|
+
readonly value: "auto";
|
|
946
|
+
readonly label: "Auto";
|
|
947
|
+
readonly description: "Inline descriptors for Gemini models; keep them in tool schemas otherwise";
|
|
948
|
+
}, {
|
|
949
|
+
readonly value: "on";
|
|
950
|
+
readonly label: "On";
|
|
951
|
+
readonly description: "Always inline descriptors in the system prompt";
|
|
952
|
+
}, {
|
|
953
|
+
readonly value: "off";
|
|
954
|
+
readonly label: "Off";
|
|
955
|
+
readonly description: "Keep descriptors in provider tool schemas only";
|
|
956
|
+
}];
|
|
913
957
|
};
|
|
914
958
|
};
|
|
915
959
|
readonly includeModelInPrompt: {
|
|
@@ -3352,34 +3396,34 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3352
3396
|
}];
|
|
3353
3397
|
};
|
|
3354
3398
|
};
|
|
3355
|
-
readonly "
|
|
3399
|
+
readonly "glob.enabled": {
|
|
3356
3400
|
readonly type: "boolean";
|
|
3357
3401
|
readonly default: true;
|
|
3358
3402
|
readonly ui: {
|
|
3359
3403
|
readonly tab: "tools";
|
|
3360
3404
|
readonly group: "Available Tools";
|
|
3361
|
-
readonly label: "
|
|
3362
|
-
readonly description: "Enable the
|
|
3405
|
+
readonly label: "Glob";
|
|
3406
|
+
readonly description: "Enable the glob tool for glob-based file lookup";
|
|
3363
3407
|
};
|
|
3364
3408
|
};
|
|
3365
|
-
readonly "
|
|
3409
|
+
readonly "grep.enabled": {
|
|
3366
3410
|
readonly type: "boolean";
|
|
3367
3411
|
readonly default: true;
|
|
3368
3412
|
readonly ui: {
|
|
3369
3413
|
readonly tab: "tools";
|
|
3370
3414
|
readonly group: "Available Tools";
|
|
3371
|
-
readonly label: "
|
|
3372
|
-
readonly description: "Enable the
|
|
3415
|
+
readonly label: "Grep";
|
|
3416
|
+
readonly description: "Enable the grep tool for regex content search";
|
|
3373
3417
|
};
|
|
3374
3418
|
};
|
|
3375
|
-
readonly "
|
|
3419
|
+
readonly "grep.contextBefore": {
|
|
3376
3420
|
readonly type: "number";
|
|
3377
3421
|
readonly default: 1;
|
|
3378
3422
|
readonly ui: {
|
|
3379
3423
|
readonly tab: "tools";
|
|
3380
|
-
readonly group: "
|
|
3381
|
-
readonly label: "
|
|
3382
|
-
readonly description: "Lines of context before each
|
|
3424
|
+
readonly group: "Grep & Browser";
|
|
3425
|
+
readonly label: "Grep Context Before";
|
|
3426
|
+
readonly description: "Lines of context before each grep match";
|
|
3383
3427
|
readonly options: readonly [{
|
|
3384
3428
|
readonly value: "0";
|
|
3385
3429
|
readonly label: "0 lines";
|
|
@@ -3398,14 +3442,14 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3398
3442
|
}];
|
|
3399
3443
|
};
|
|
3400
3444
|
};
|
|
3401
|
-
readonly "
|
|
3445
|
+
readonly "grep.contextAfter": {
|
|
3402
3446
|
readonly type: "number";
|
|
3403
3447
|
readonly default: 3;
|
|
3404
3448
|
readonly ui: {
|
|
3405
3449
|
readonly tab: "tools";
|
|
3406
|
-
readonly group: "
|
|
3407
|
-
readonly label: "
|
|
3408
|
-
readonly description: "Lines of context after each
|
|
3450
|
+
readonly group: "Grep & Browser";
|
|
3451
|
+
readonly label: "Grep Context After";
|
|
3452
|
+
readonly description: "Lines of context after each grep match";
|
|
3409
3453
|
readonly options: readonly [{
|
|
3410
3454
|
readonly value: "0";
|
|
3411
3455
|
readonly label: "0 lines";
|
|
@@ -3572,7 +3616,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3572
3616
|
readonly default: true;
|
|
3573
3617
|
readonly ui: {
|
|
3574
3618
|
readonly tab: "tools";
|
|
3575
|
-
readonly group: "
|
|
3619
|
+
readonly group: "Grep & Browser";
|
|
3576
3620
|
readonly label: "Headless Browser";
|
|
3577
3621
|
readonly description: "Launch browser in headless mode (disable to show browser UI)";
|
|
3578
3622
|
};
|
|
@@ -3582,7 +3626,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3582
3626
|
readonly default: true;
|
|
3583
3627
|
readonly ui: {
|
|
3584
3628
|
readonly tab: "tools";
|
|
3585
|
-
readonly group: "
|
|
3629
|
+
readonly group: "Grep & Browser";
|
|
3586
3630
|
readonly label: "cmux Browser";
|
|
3587
3631
|
readonly description: "Use cmux WKWebView surfaces for browser automation when a cmux socket is available. Set PI_BROWSER_CMUX=0 or PI_BROWSER_CMUX=1 to override.";
|
|
3588
3632
|
};
|
|
@@ -3592,7 +3636,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3592
3636
|
readonly default: undefined;
|
|
3593
3637
|
readonly ui: {
|
|
3594
3638
|
readonly tab: "tools";
|
|
3595
|
-
readonly group: "
|
|
3639
|
+
readonly group: "Grep & Browser";
|
|
3596
3640
|
readonly label: "Screenshot Directory";
|
|
3597
3641
|
readonly description: "Directory to save screenshots. If unset, screenshots go to a temp file. Supports ~. Examples: ~/Downloads, ~/Desktop, /sdcard/Download (Android)";
|
|
3598
3642
|
};
|
|
@@ -3739,7 +3783,7 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3739
3783
|
readonly tab: "tools";
|
|
3740
3784
|
readonly group: "Discovery & MCP";
|
|
3741
3785
|
readonly label: "Essential Tools Override";
|
|
3742
|
-
readonly description: "Override the always-loaded built-in tools (default: read, bash, edit, write,
|
|
3786
|
+
readonly description: "Override the always-loaded built-in tools (default: read, bash, edit, write, glob, eval). Leave empty to use defaults.";
|
|
3743
3787
|
};
|
|
3744
3788
|
};
|
|
3745
3789
|
readonly "mcp.enableProjectConfig": {
|
|
@@ -3935,6 +3979,16 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
3935
3979
|
}];
|
|
3936
3980
|
};
|
|
3937
3981
|
};
|
|
3982
|
+
readonly "worktree.base": {
|
|
3983
|
+
readonly type: "string";
|
|
3984
|
+
readonly default: undefined;
|
|
3985
|
+
readonly ui: {
|
|
3986
|
+
readonly tab: "tasks";
|
|
3987
|
+
readonly group: "Isolation";
|
|
3988
|
+
readonly label: "Worktree Base Directory";
|
|
3989
|
+
readonly description: "Base directory for agent-managed worktrees — task-isolation copies, `github` PR checkouts, and `omp worktree` cleanup all live here. Unset uses ~/.omp/wt. Must be an absolute or ~-relative path; relative paths are ignored. The OMP_WORKTREE_DIR env var overrides this.";
|
|
3990
|
+
};
|
|
3991
|
+
};
|
|
3938
3992
|
readonly "task.eager": {
|
|
3939
3993
|
readonly type: "enum";
|
|
3940
3994
|
readonly values: readonly ["default", "preferred", "always"];
|
|
@@ -4295,6 +4349,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4295
4349
|
readonly value: "codex";
|
|
4296
4350
|
readonly label: "OpenAI";
|
|
4297
4351
|
readonly description: "OpenAI's native web_search (uses ChatGPT OAuth via /login openai-codex)";
|
|
4352
|
+
}, {
|
|
4353
|
+
readonly value: "xai";
|
|
4354
|
+
readonly label: "xAI";
|
|
4355
|
+
readonly description: "Grok web search via xAI Responses API (requires XAI_API_KEY)";
|
|
4298
4356
|
}, {
|
|
4299
4357
|
readonly value: "zai";
|
|
4300
4358
|
readonly label: "Z.AI";
|
|
@@ -4303,6 +4361,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4303
4361
|
readonly value: "exa";
|
|
4304
4362
|
readonly label: "Exa";
|
|
4305
4363
|
readonly description: "Uses Exa API when EXA_API_KEY is set; falls back to Exa MCP";
|
|
4364
|
+
}, {
|
|
4365
|
+
readonly value: "tinyfish";
|
|
4366
|
+
readonly label: "TinyFish";
|
|
4367
|
+
readonly description: "Requires TINYFISH_API_KEY";
|
|
4306
4368
|
}, {
|
|
4307
4369
|
readonly value: "jina";
|
|
4308
4370
|
readonly label: "Jina";
|
|
@@ -4315,6 +4377,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4315
4377
|
readonly value: "tavily";
|
|
4316
4378
|
readonly label: "Tavily";
|
|
4317
4379
|
readonly description: "Requires TAVILY_API_KEY";
|
|
4380
|
+
}, {
|
|
4381
|
+
readonly value: "firecrawl";
|
|
4382
|
+
readonly label: "Firecrawl";
|
|
4383
|
+
readonly description: "Requires FIRECRAWL_API_KEY";
|
|
4318
4384
|
}, {
|
|
4319
4385
|
readonly value: "brave";
|
|
4320
4386
|
readonly label: "Brave";
|
|
@@ -4335,6 +4401,10 @@ export declare const SETTINGS_SCHEMA: {
|
|
|
4335
4401
|
readonly value: "searxng";
|
|
4336
4402
|
readonly label: "SearXNG";
|
|
4337
4403
|
readonly description: "Requires SEARXNG_ENDPOINT or searxng.endpoint";
|
|
4404
|
+
}, {
|
|
4405
|
+
readonly value: "duckduckgo";
|
|
4406
|
+
readonly label: "DuckDuckGo";
|
|
4407
|
+
readonly description: "Uses DuckDuckGo Instant Answer API (no API key)";
|
|
4338
4408
|
}];
|
|
4339
4409
|
};
|
|
4340
4410
|
};
|
|
@@ -35,6 +35,8 @@ export interface SettingsOptions {
|
|
|
35
35
|
/** Extra config.yml-style overlays loaded after global/project settings */
|
|
36
36
|
configFiles?: string[];
|
|
37
37
|
}
|
|
38
|
+
export declare function normalizeProviderMaxInFlightRequests(value: unknown): Record<string, number>;
|
|
39
|
+
export declare function validateProviderMaxInFlightRequests(value: unknown): Record<string, number>;
|
|
38
40
|
export declare class Settings {
|
|
39
41
|
#private;
|
|
40
42
|
private constructor();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DapAdapterConfig, DapResolvedAdapter } from "./types";
|
|
2
|
-
export declare function getAdapterConfigs(): Record<string, DapAdapterConfig>;
|
|
2
|
+
export declare function getAdapterConfigs(cwd?: string): Record<string, DapAdapterConfig>;
|
|
3
3
|
export declare function resolveAdapter(adapterName: string, cwd: string): DapResolvedAdapter | null;
|
|
4
4
|
export declare function getAvailableAdapters(cwd: string): DapResolvedAdapter[];
|
|
5
5
|
export declare function selectLaunchAdapter(program: string, cwd: string, adapterName?: string, programKind?: LaunchProgramKind): DapResolvedAdapter | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filesystem, type WriteResult } from "@oh-my-pi/hashline";
|
|
1
|
+
import { Filesystem, type PreflightWriteOptions, type WriteResult } from "@oh-my-pi/hashline";
|
|
2
2
|
import type { FileDiagnosticsResult, WritethroughCallback, WritethroughDeferredHandle } from "../../lsp";
|
|
3
3
|
import type { ToolSession } from "../../tools";
|
|
4
4
|
import type { LspBatchRequest } from "../renderer";
|
|
@@ -34,7 +34,9 @@ export declare class HashlineFilesystem extends Filesystem {
|
|
|
34
34
|
canonicalPath(relativePath: string): string;
|
|
35
35
|
allowTagPathRecovery(authoredPath: string, resolvedPath: string): boolean;
|
|
36
36
|
readText(relativePath: string): Promise<string>;
|
|
37
|
-
preflightWrite(relativePath: string): Promise<void>;
|
|
37
|
+
preflightWrite(relativePath: string, options?: PreflightWriteOptions): Promise<void>;
|
|
38
|
+
delete(relativePath: string): Promise<void>;
|
|
39
|
+
move(fromRelative: string, toRelative: string, content?: string): Promise<void>;
|
|
38
40
|
writeText(relativePath: string, content: string): Promise<WriteResult>;
|
|
39
41
|
exists(relativePath: string): Promise<boolean>;
|
|
40
42
|
}
|