@oh-my-pi/pi-coding-agent 17.1.8 → 17.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 +92 -0
- package/dist/{CHANGELOG-vt8ene9g.md → CHANGELOG-be1f2t8h.md} +92 -0
- package/dist/cli.js +9986 -9776
- package/dist/{template-dys3vk5b.js → template-8vdv6xb4.js} +1 -1
- package/dist/types/advisor/runtime.d.ts +8 -2
- package/dist/types/advisor/transcript-recorder.d.ts +15 -0
- package/dist/types/auto-thinking/classifier.d.ts +9 -2
- package/dist/types/cli/args.d.ts +2 -0
- package/dist/types/cli/session-picker.d.ts +14 -7
- package/dist/types/collab/guest.d.ts +21 -2
- package/dist/types/commands/launch.d.ts +6 -0
- package/dist/types/config/settings-schema.d.ts +63 -8
- package/dist/types/cursor-bridge-tools.d.ts +54 -0
- package/dist/types/cursor.d.ts +193 -8
- package/dist/types/edit/edit-clipboard.d.ts +19 -0
- package/dist/types/edit/hashline/diff.d.ts +9 -1
- package/dist/types/edit/index.d.ts +8 -1
- package/dist/types/edit/streaming.d.ts +8 -1
- package/dist/types/extensibility/extensions/runner.d.ts +19 -2
- package/dist/types/extensibility/extensions/types.d.ts +25 -1
- package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +2 -0
- package/dist/types/internal-urls/local-protocol.d.ts +3 -2
- package/dist/types/launch/terminal-output-worker-client.d.ts +5 -0
- package/dist/types/launch/terminal-output-worker-protocol.d.ts +14 -0
- package/dist/types/launch/terminal-output-worker.d.ts +1 -0
- package/dist/types/lsp/client.d.ts +2 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/mcp/manager.d.ts +33 -4
- package/dist/types/modes/components/codex-reset-fireworks.d.ts +51 -0
- package/dist/types/modes/components/read-tool-group.d.ts +12 -0
- package/dist/types/modes/components/session-selector.d.ts +6 -0
- package/dist/types/modes/components/status-line/component.d.ts +23 -0
- package/dist/types/modes/components/tool-execution.d.ts +16 -7
- package/dist/types/modes/components/usage-row.d.ts +2 -0
- package/dist/types/modes/controllers/mcp-command-controller.d.ts +26 -1
- package/dist/types/modes/controllers/selector-controller.d.ts +2 -1
- package/dist/types/modes/interactive-mode.d.ts +4 -2
- package/dist/types/modes/rpc/rpc-client.d.ts +7 -0
- package/dist/types/modes/rpc/rpc-types.d.ts +16 -0
- package/dist/types/modes/theme/theme.d.ts +12 -1
- package/dist/types/modes/types.d.ts +2 -1
- package/dist/types/sdk.d.ts +1 -0
- package/dist/types/session/agent-session-events.d.ts +2 -0
- package/dist/types/session/agent-session-types.d.ts +36 -1
- package/dist/types/session/agent-session.d.ts +4 -2
- package/dist/types/session/claude-session-store.d.ts +13 -0
- package/dist/types/session/codex-session-store.d.ts +14 -0
- package/dist/types/session/credential-pin.d.ts +58 -0
- package/dist/types/session/foreign-session-import.d.ts +15 -0
- package/dist/types/session/foreign-session-jsonl.d.ts +9 -0
- package/dist/types/session/foreign-session-store.d.ts +23 -0
- package/dist/types/session/session-advisors.d.ts +47 -2
- package/dist/types/session/session-entries.d.ts +19 -1
- package/dist/types/session/session-handoff.d.ts +4 -1
- package/dist/types/session/session-loader.d.ts +2 -0
- package/dist/types/session/session-maintenance.d.ts +1 -1
- package/dist/types/session/session-manager.d.ts +21 -0
- package/dist/types/session/session-tools.d.ts +25 -1
- package/dist/types/session/turn-recovery.d.ts +10 -4
- package/dist/types/system-prompt.d.ts +2 -1
- package/dist/types/task/executor.d.ts +11 -2
- package/dist/types/task/render.d.ts +7 -0
- package/dist/types/thinking.d.ts +18 -6
- package/dist/types/tools/acp-bridge.d.ts +28 -5
- package/dist/types/tools/grep.d.ts +17 -1
- package/dist/types/tools/hub/launch.d.ts +5 -1
- package/dist/types/tools/index.d.ts +4 -1
- package/dist/types/tools/path-utils.d.ts +19 -0
- package/dist/types/tools/read.d.ts +2 -0
- package/dist/types/tools/xdev.d.ts +2 -1
- package/dist/types/utils/changelog.d.ts +19 -0
- package/dist/types/utils/git.d.ts +10 -0
- package/dist/types/utils/jj.d.ts +11 -4
- package/dist/types/web/search/types.d.ts +2 -2
- package/package.json +12 -12
- package/src/advisor/runtime.ts +138 -12
- package/src/advisor/transcript-recorder.ts +56 -0
- package/src/auto-thinking/classifier.ts +48 -10
- package/src/cli/args.ts +6 -0
- package/src/cli/flag-tables.ts +2 -0
- package/src/cli/gallery-fixtures/fs.ts +25 -0
- package/src/cli/session-picker.ts +34 -17
- package/src/cli/ttsr-cli.ts +19 -1
- package/src/cli.ts +9 -0
- package/src/collab/guest.ts +37 -4
- package/src/collab/host.ts +1 -0
- package/src/commands/launch.ts +6 -0
- package/src/config/model-registry.ts +103 -25
- package/src/config/settings-schema.ts +65 -6
- package/src/config/settings.ts +25 -0
- package/src/cursor-bridge-tools.ts +81 -0
- package/src/cursor.ts +463 -12
- package/src/edit/edit-clipboard.ts +23 -0
- package/src/edit/hashline/diff.ts +49 -10
- package/src/edit/hashline/execute.ts +38 -6
- package/src/edit/hashline/filesystem.ts +27 -3
- package/src/edit/index.ts +12 -2
- package/src/edit/renderer.ts +4 -4
- package/src/edit/streaming.ts +17 -2
- package/src/export/html/template.js +1 -1
- package/src/extensibility/extensions/runner.ts +70 -0
- package/src/extensibility/extensions/types.ts +30 -0
- package/src/extensibility/legacy-pi-coding-agent-shim.ts +12 -13
- package/src/internal-urls/local-protocol.ts +3 -2
- package/src/internal-urls/mcp-protocol.ts +4 -1
- package/src/launch/terminal-output-worker-client.ts +53 -0
- package/src/launch/terminal-output-worker-protocol.ts +11 -0
- package/src/launch/terminal-output-worker.ts +23 -0
- package/src/lsp/client.ts +18 -3
- package/src/lsp/index.ts +4 -0
- package/src/lsp/render.ts +1 -1
- package/src/main.ts +127 -56
- package/src/mcp/manager.ts +120 -18
- package/src/modes/acp/acp-agent.ts +15 -9
- package/src/modes/components/chat-transcript-builder.ts +30 -11
- package/src/modes/components/codex-reset-fireworks.ts +369 -0
- package/src/modes/components/read-tool-group.ts +159 -17
- package/src/modes/components/session-selector.ts +19 -3
- package/src/modes/components/status-line/component.ts +381 -54
- package/src/modes/components/tool-execution.ts +78 -31
- package/src/modes/components/usage-row.ts +10 -5
- package/src/modes/controllers/event-controller.ts +26 -4
- package/src/modes/controllers/mcp-command-controller.ts +68 -3
- package/src/modes/controllers/selector-controller.ts +94 -36
- package/src/modes/controllers/tan-command-controller.ts +14 -0
- package/src/modes/interactive-mode.ts +31 -17
- package/src/modes/rpc/rpc-client.ts +18 -0
- package/src/modes/rpc/rpc-mode.ts +16 -1
- package/src/modes/rpc/rpc-types.ts +11 -0
- package/src/modes/theme/theme.ts +151 -6
- package/src/modes/types.ts +2 -1
- package/src/modes/utils/ui-helpers.ts +38 -21
- package/src/prompts/system/auto-thinking-difficulty.md +4 -2
- package/src/prompts/system/plan-mode-active.md +2 -2
- package/src/prompts/system/system-prompt.md +3 -0
- package/src/prompts/system/xdev-mount-notice.md +1 -1
- package/src/prompts/tools/bash.md +15 -17
- package/src/prompts/tools/checkpoint.md +1 -1
- package/src/prompts/tools/glob.md +7 -6
- package/src/prompts/tools/grep.md +7 -6
- package/src/sdk.ts +178 -15
- package/src/session/agent-session-events.ts +1 -0
- package/src/session/agent-session-types.ts +40 -1
- package/src/session/agent-session.ts +302 -175
- package/src/session/claude-session-store.ts +426 -0
- package/src/session/codex-session-store.ts +673 -0
- package/src/session/credential-pin.ts +93 -0
- package/src/session/foreign-session-import.ts +52 -0
- package/src/session/foreign-session-jsonl.ts +29 -0
- package/src/session/foreign-session-store.ts +26 -0
- package/src/session/model-controls.ts +11 -3
- package/src/session/session-advisors.ts +140 -16
- package/src/session/session-entries.ts +21 -1
- package/src/session/session-handoff.ts +20 -3
- package/src/session/session-loader.ts +25 -9
- package/src/session/session-maintenance.ts +59 -11
- package/src/session/session-manager.ts +61 -0
- package/src/session/session-tools.ts +107 -5
- package/src/session/settings-stream-fn.ts +1 -0
- package/src/session/turn-recovery.ts +97 -51
- package/src/slash-commands/builtin-registry.ts +131 -3
- package/src/system-prompt.ts +3 -2
- package/src/task/executor.ts +17 -4
- package/src/task/render.ts +20 -4
- package/src/thinking.ts +29 -10
- package/src/tools/acp-bridge.ts +52 -8
- package/src/tools/browser.ts +5 -0
- package/src/tools/checkpoint.ts +0 -13
- package/src/tools/grep.ts +64 -8
- package/src/tools/hub/launch.ts +10 -15
- package/src/tools/index.ts +28 -4
- package/src/tools/path-utils.ts +88 -0
- package/src/tools/read.ts +3 -0
- package/src/tools/write.ts +9 -3
- package/src/tools/xdev.ts +39 -14
- package/src/utils/changelog.ts +144 -4
- package/src/utils/git.ts +61 -14
- package/src/utils/jj.ts +19 -13
- package/src/web/search/providers/codex.ts +34 -0
- package/src/web/search/types.ts +1 -1
package/dist/types/thinking.d.ts
CHANGED
|
@@ -103,6 +103,12 @@ export declare function parseCliThinkingLevel(value: string | null | undefined):
|
|
|
103
103
|
* above Low (falling back to the full supported set only when the model maxes
|
|
104
104
|
* out below Low). Within that pool the request snaps to the highest level not
|
|
105
105
|
* exceeding it, or the pool minimum when the request is below the pool.
|
|
106
|
+
* `ceiling` bounds the pool from above, so a policy ceiling survives the model
|
|
107
|
+
* clamp: a sparse ladder such as `["max"]` must not snap an `xhigh` request up
|
|
108
|
+
* to `max`. The Low floor is resolved against the model's own ladder *before*
|
|
109
|
+
* the ceiling applies — a ceiling that hides every tier at or above Low means
|
|
110
|
+
* there is nothing legal to pick (`undefined`), not a licence to fall through
|
|
111
|
+
* to a sub-Low tier the model happens to expose.
|
|
106
112
|
*
|
|
107
113
|
* Returns `undefined` for reasoning-capable models without a controllable
|
|
108
114
|
* effort surface (`thinking.efforts` empty — e.g. devin-agent models, where
|
|
@@ -111,7 +117,7 @@ export declare function parseCliThinkingLevel(value: string | null | undefined):
|
|
|
111
117
|
* forward a concrete effort that would then trip {@link requireSupportedEffort}
|
|
112
118
|
* downstream.
|
|
113
119
|
*/
|
|
114
|
-
export declare function clampAutoThinkingEffort(model: Model | undefined, effort: Effort): Effort | undefined;
|
|
120
|
+
export declare function clampAutoThinkingEffort(model: Model | undefined, effort: Effort, ceiling?: Effort): Effort | undefined;
|
|
115
121
|
/** Coarse per-spawn effort selectors accepted by the task tool. */
|
|
116
122
|
export declare const TASK_EFFORTS: readonly ["lo", "med", "hi"];
|
|
117
123
|
/** Coarse task-spawn effort: the lowest, middle, or highest thinking level the target model supports. */
|
|
@@ -146,10 +152,16 @@ export declare function clampThinkingLevelToCeiling(model: Model | undefined, le
|
|
|
146
152
|
export declare function modelSupportsEffortCeiling(model: Model, ceiling: Effort): boolean;
|
|
147
153
|
/**
|
|
148
154
|
* The provisional concrete level shown while `auto` is configured but before a
|
|
149
|
-
* turn has been classified
|
|
150
|
-
* clamped into the auto range.
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
155
|
+
* turn has been classified, and the fallback when classification fails. Prefers
|
|
156
|
+
* the model's `defaultLevel`, otherwise High, clamped into the auto range.
|
|
157
|
+
*
|
|
158
|
+
* Deliberately stays below {@link Effort.Max}: the placeholder must not bill the
|
|
159
|
+
* top tier for a turn nobody classified, so XHigh is passed as a hard ceiling
|
|
160
|
+
* rather than only capping the preferred level — otherwise a sparse `["max"]`
|
|
161
|
+
* ladder would snap straight back up. A model whose ladder offers nothing at or
|
|
162
|
+
* below XHigh therefore has no provisional level, and `auto` leaves the current
|
|
163
|
+
* one in place. Classification itself may still resolve Max on models that
|
|
164
|
+
* expose the tier when the user opts in. Returns `undefined` for non-reasoning
|
|
165
|
+
* models.
|
|
154
166
|
*/
|
|
155
167
|
export declare function resolveProvisionalAutoLevel(model: Model | undefined): Effort | undefined;
|
|
@@ -16,14 +16,37 @@ import type { ToolSession } from "./index.js";
|
|
|
16
16
|
* that must stay off the editor's buffer.
|
|
17
17
|
*/
|
|
18
18
|
export declare function shouldRouteWriteThroughBridge(session: ToolSession, requestedPath: string, absolutePath: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Result of a bridge-routed write: the content actually verified on disk
|
|
21
|
+
* after the client processed the write, plus whether that content diverges
|
|
22
|
+
* from what the tool asked to persist.
|
|
23
|
+
*
|
|
24
|
+
* ACP's `fs/write_text_file` has no "verbatim, no side effects" guarantee —
|
|
25
|
+
* a client (e.g. Zed with `format_on_save: on`) may reformat the buffer as
|
|
26
|
+
* part of handling the write before it settles on disk. Silently trusting
|
|
27
|
+
* the requested `content` as "what's now on disk" lets that drift poison
|
|
28
|
+
* every snapshot/tag/hash a caller derives from the write, which then reads
|
|
29
|
+
* back as unrelated whole-file corruption on the *next* edit. Reading the
|
|
30
|
+
* file back and reporting what's actually there keeps callers honest.
|
|
31
|
+
*/
|
|
32
|
+
export interface BridgeWriteResult {
|
|
33
|
+
/** Content actually present on disk immediately after the bridge write. */
|
|
34
|
+
text: string;
|
|
35
|
+
/** `true` when `text` differs from the content the tool asked to write. */
|
|
36
|
+
driftedFromRequest: boolean;
|
|
37
|
+
}
|
|
19
38
|
/**
|
|
20
39
|
* Try to route a file write through the ACP client bridge.
|
|
21
40
|
*
|
|
22
41
|
* Performs the full guard check, bridge call (wrapped in {@link ToolError}),
|
|
23
|
-
*
|
|
42
|
+
* a post-write read-back to detect client-side transformation (e.g.
|
|
43
|
+
* format-on-save), FS-scan cache invalidation, and session mutation-version
|
|
44
|
+
* bump.
|
|
24
45
|
*
|
|
25
|
-
* Returns `
|
|
26
|
-
*
|
|
27
|
-
*
|
|
46
|
+
* Returns `undefined` when the bridge is unavailable or the path should not
|
|
47
|
+
* be routed through it — the caller must fall back to the writethrough path.
|
|
48
|
+
* Returns a {@link BridgeWriteResult} when the bridge was used; callers MUST
|
|
49
|
+
* use `result.text` (not the content they requested) for any snapshot, hash,
|
|
50
|
+
* or tag derived from this write.
|
|
28
51
|
*/
|
|
29
|
-
export declare function routeWriteThroughBridge(session: ToolSession, requestedPath: string, absolutePath: string, content: string, signal?: AbortSignal): Promise<
|
|
52
|
+
export declare function routeWriteThroughBridge(session: ToolSession, requestedPath: string, absolutePath: string, content: string, signal?: AbortSignal): Promise<BridgeWriteResult | undefined>;
|
|
@@ -55,7 +55,23 @@ export interface GrepToolDetails {
|
|
|
55
55
|
missingPaths?: string[];
|
|
56
56
|
}
|
|
57
57
|
type SearchParams = typeof searchSchema.infer;
|
|
58
|
+
/**
|
|
59
|
+
* Construction-time overrides for callers that are not the model.
|
|
60
|
+
*
|
|
61
|
+
* The model-facing schema deliberately does not grow these: they exist for
|
|
62
|
+
* wire bridges (the Cursor `pi_grep` frame) whose protocol carries an explicit
|
|
63
|
+
* context width and total match cap, and which would otherwise have to drop
|
|
64
|
+
* them. Unset means "use the session settings / built-in caps" — the behavior
|
|
65
|
+
* every model-issued call keeps.
|
|
66
|
+
*/
|
|
67
|
+
export interface GrepToolOptions {
|
|
68
|
+
/** Overrides `grep.contextBefore`/`grep.contextAfter` for every call on this instance. */
|
|
69
|
+
context?: number;
|
|
70
|
+
/** Caps total surfaced matches. Applied on top of the built-in per-file and file-window caps, never above them. */
|
|
71
|
+
totalMatchLimit?: number;
|
|
72
|
+
}
|
|
58
73
|
export declare class GrepTool implements AgentTool<typeof searchSchema, GrepToolDetails> {
|
|
74
|
+
#private;
|
|
59
75
|
private readonly session;
|
|
60
76
|
readonly name = "grep";
|
|
61
77
|
readonly approval: (args: unknown) => ToolTier;
|
|
@@ -71,7 +87,7 @@ export declare class GrepTool implements AgentTool<typeof searchSchema, GrepTool
|
|
|
71
87
|
skip?: number | null | undefined;
|
|
72
88
|
}, {}>;
|
|
73
89
|
readonly strict = true;
|
|
74
|
-
constructor(session: ToolSession);
|
|
90
|
+
constructor(session: ToolSession, options?: GrepToolOptions);
|
|
75
91
|
execute(_toolCallId: string, params: SearchParams, signal?: AbortSignal, _onUpdate?: AgentToolUpdateCallback<GrepToolDetails>, _toolContext?: AgentToolContext): Promise<AgentToolResult<GrepToolDetails>>;
|
|
76
92
|
}
|
|
77
93
|
interface GrepRenderArgs {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import type { AgentToolResult } from "@oh-my-pi/pi-agent-core";
|
|
8
8
|
import type { Component } from "@oh-my-pi/pi-tui";
|
|
9
9
|
import type { RenderResultOptions } from "../../extensibility/custom-tools/types.js";
|
|
10
|
-
import type { DaemonSnapshot, DaemonSpec, DaemonState } from "../../launch/protocol.js";
|
|
10
|
+
import type { DaemonRpcResult, DaemonSnapshot, DaemonSpec, DaemonState } from "../../launch/protocol.js";
|
|
11
11
|
import type { Theme } from "../../modes/theme/theme.js";
|
|
12
12
|
import type { ToolSession } from "../index.js";
|
|
13
13
|
/** Broker-facing launch parameters; the hub adapts its `ps` op to `list` before calling in. */
|
|
@@ -57,6 +57,10 @@ export interface LaunchToolDetails {
|
|
|
57
57
|
/** describe: immutable launch spec backing the command/cwd detail lines. */
|
|
58
58
|
spec?: DaemonSpec;
|
|
59
59
|
}
|
|
60
|
+
/** Resolve display rows while keeping legacy raw replay outside the client process. */
|
|
61
|
+
export declare function renderLaunchLogTerminalRows(result: Extract<DaemonRpcResult, {
|
|
62
|
+
op: "logs";
|
|
63
|
+
}>, params: Pick<LaunchParams, "head" | "lines">): Promise<string[] | undefined>;
|
|
60
64
|
/** Run one broker operation for the calling session's project. */
|
|
61
65
|
export declare function executeLaunch(session: ToolSession, params: LaunchParams, signal?: AbortSignal): Promise<AgentToolResult<LaunchToolDetails>>;
|
|
62
66
|
/** Args shape visible to the renderer, possibly mid-stream (every field optional). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InMemorySnapshotStore } from "@oh-my-pi/hashline";
|
|
1
|
+
import type { Clipboard, InMemorySnapshotStore } from "@oh-my-pi/hashline";
|
|
2
2
|
import type { AgentTelemetryConfig, AgentTool } from "@oh-my-pi/pi-agent-core";
|
|
3
3
|
import type { FetchImpl, ImageContent, Model, ServiceTierByFamily, ToolChoice } from "@oh-my-pi/pi-ai";
|
|
4
4
|
import type { AsyncJobManager } from "../async/job-manager.js";
|
|
@@ -321,6 +321,9 @@ export interface ToolSession {
|
|
|
321
321
|
* reconstruct the version the model authored anchors against when the
|
|
322
322
|
* file changed out-of-band. Lazily initialized by `getFileSnapshotStore`. */
|
|
323
323
|
fileSnapshotStore?: InMemorySnapshotStore;
|
|
324
|
+
/** Per-session `CUT`/`PASTE` clipboard register shared across edit
|
|
325
|
+
* calls. Lazily initialized by `getEditClipboard`. */
|
|
326
|
+
editClipboard?: Clipboard;
|
|
324
327
|
/** Per-session log of unresolved git merge conflict regions surfaced by
|
|
325
328
|
* `read`. Each entry gets a stable id N referenced by `write conflict://N`
|
|
326
329
|
* to splice the recorded region with replacement content. Lazily initialized
|
|
@@ -129,6 +129,25 @@ export declare function isReadableUrlPath(value: string): boolean;
|
|
|
129
129
|
* filesystem root is almost never what they intended.
|
|
130
130
|
*/
|
|
131
131
|
export declare function resolveToCwd(filePath: string, cwd: string): string;
|
|
132
|
+
/**
|
|
133
|
+
* Resolve a path that MUST stay inside `cwd`, or `null` when it would escape.
|
|
134
|
+
*
|
|
135
|
+
* {@link resolveToCwd} deliberately honors absolute paths, `~`, and `..` —
|
|
136
|
+
* correct for a path a user typed, wrong for one a remote peer supplied.
|
|
137
|
+
* Callers handling untrusted input (Cursor's `download_path`) use this instead:
|
|
138
|
+
* only a non-empty relative path landing under the live cwd is accepted, so
|
|
139
|
+
* neither `/etc/passwd` nor `../../escape` can be written through.
|
|
140
|
+
*
|
|
141
|
+
* The lexical check alone is not containment: a symlink inside the workspace
|
|
142
|
+
* can point anywhere, so `out/config` under a `ws/out -> /elsewhere` link is
|
|
143
|
+
* relative, `..`-free, and still writes outside. Both the target and its
|
|
144
|
+
* deepest existing ancestor are therefore realpath-resolved — the ancestor
|
|
145
|
+
* because a download names a file that does not exist yet, so the link in its
|
|
146
|
+
* path is the only thing that can be resolved before the write.
|
|
147
|
+
*
|
|
148
|
+
* The cwd itself is rejected: a download names a file, never the directory.
|
|
149
|
+
*/
|
|
150
|
+
export declare function confineToWorkspace(filePath: string, cwd: string): string | null;
|
|
132
151
|
export declare function formatPathRelativeToCwd(filePath: string, cwd: string, options?: {
|
|
133
152
|
trailingSlash?: boolean;
|
|
134
153
|
}): string;
|
|
@@ -24,6 +24,8 @@ export interface ReadToolDetails {
|
|
|
24
24
|
method?: string;
|
|
25
25
|
notes?: string[];
|
|
26
26
|
meta?: OutputMeta;
|
|
27
|
+
/** Full on-disk byte size recorded before applying a file range. */
|
|
28
|
+
fileSize?: number;
|
|
27
29
|
/** Raw text + start line for user-visible TUI rendering, set when content is text-like.
|
|
28
30
|
* Mirrors the same lines the model receives but without hashline/line-number prefixes,
|
|
29
31
|
* so the TUI can render the file content with its own gutter without re-parsing the formatted text. */
|
|
@@ -103,10 +103,11 @@ export declare function resolveMountedXdevTool(state: XdevState, name: string):
|
|
|
103
103
|
export declare function resolveMountedXdevExecutable(state: XdevState, name: string): Tool | undefined;
|
|
104
104
|
/** Mounted tools in presentation order, resolved from the canonical map. */
|
|
105
105
|
export declare function listXdevTools(state: XdevState): Tool[];
|
|
106
|
-
/** `{name, summary}`
|
|
106
|
+
/** `{name, summary, dynamic}` triples for prompt templates and `/tools` display. */
|
|
107
107
|
export declare function xdevEntries(state: XdevState): Array<{
|
|
108
108
|
name: string;
|
|
109
109
|
summary: string;
|
|
110
|
+
dynamic: boolean;
|
|
110
111
|
}>;
|
|
111
112
|
/** `read xd://` listing with one device per line. */
|
|
112
113
|
export declare function xdevListing(state: XdevState): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SettingValue } from "../config/settings.js";
|
|
1
2
|
export interface ChangelogEntry {
|
|
2
3
|
major: number;
|
|
3
4
|
minor: number;
|
|
@@ -21,7 +22,13 @@ export interface StartupChangelogSelection {
|
|
|
21
22
|
persistCurrentVersion: boolean;
|
|
22
23
|
truncated: boolean;
|
|
23
24
|
selectedEntries: number;
|
|
25
|
+
totalUnseenEntries: number;
|
|
26
|
+
latestVersion: string | undefined;
|
|
27
|
+
changeCount: number;
|
|
28
|
+
categoryCounts: Record<string, number>;
|
|
24
29
|
}
|
|
30
|
+
/** Format the compact, deterministic startup update notice. */
|
|
31
|
+
export declare function formatStartupChangelogSummary(selection: StartupChangelogSelection): string;
|
|
25
32
|
/**
|
|
26
33
|
* Parse changelog entries from omp's package asset when available, falling back
|
|
27
34
|
* to the copy embedded in compiled binaries.
|
|
@@ -55,6 +62,18 @@ export declare function renderChangelogEntries(entries: ChangelogEntry[], option
|
|
|
55
62
|
* Select bounded release notes for interactive startup.
|
|
56
63
|
*/
|
|
57
64
|
export declare function selectStartupChangelog(entries: ChangelogEntry[], lastVersion: string | undefined, currentVersion: string): StartupChangelogSelection;
|
|
65
|
+
/**
|
|
66
|
+
* Resolve and persist the automatic startup changelog decision.
|
|
67
|
+
*
|
|
68
|
+
* Hidden mode advances the marker only for an upgrade, so downgrades do not
|
|
69
|
+
* erase knowledge of a newer version the user has already seen.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveStartupChangelogForDisplay(options: {
|
|
72
|
+
mode: SettingValue<"startup.changelogMode">;
|
|
73
|
+
currentVersion: string;
|
|
74
|
+
changelogPath?: string;
|
|
75
|
+
agentDir?: string;
|
|
76
|
+
}): Promise<StartupChangelogSelection | undefined>;
|
|
58
77
|
export { getChangelogPath } from "../config.js";
|
|
59
78
|
/**
|
|
60
79
|
* Last omp version whose changelog the user has seen. Stored as a plain-text
|
|
@@ -147,6 +147,14 @@ export declare const GIT_COMMAND_TIMEOUT_MS: number;
|
|
|
147
147
|
export declare const GIT_NETWORK_TIMEOUT_MS: number;
|
|
148
148
|
/** Maximum captured stdout or stderr bytes retained from git and gh subprocesses. */
|
|
149
149
|
export declare const GIT_COMMAND_OUTPUT_LIMIT_BYTES: number;
|
|
150
|
+
/**
|
|
151
|
+
* Deadline for synchronous git plumbing commands launched via
|
|
152
|
+
* {@link gitSpawnSyncText}. These run on the render path (e.g. reftable HEAD
|
|
153
|
+
* resolution), so the deadline is short: a command that has not exited by then
|
|
154
|
+
* is killed and reported as {@link GIT_COMMAND_TIMEOUT_EXIT_CODE} so the caller
|
|
155
|
+
* degrades instead of freezing the UI indefinitely.
|
|
156
|
+
*/
|
|
157
|
+
export declare const GIT_SPAWN_SYNC_TIMEOUT_MS = 5000;
|
|
150
158
|
interface CommandOptions {
|
|
151
159
|
readonly env?: Record<string, string | undefined>;
|
|
152
160
|
readonly maxOutputBytes?: number;
|
|
@@ -271,6 +279,8 @@ export declare const log: {
|
|
|
271
279
|
export declare const revList: {
|
|
272
280
|
/** Commits in `base..head`, oldest first. */
|
|
273
281
|
range(cwd: string, base: string, head: string, signal?: AbortSignal): Promise<string[]>;
|
|
282
|
+
/** Commits reachable from `ref` that touched `file`, newest first, capped at `limit`. */
|
|
283
|
+
touching(cwd: string, ref: string, file: string, limit: number, signal?: AbortSignal): Promise<string[]>;
|
|
274
284
|
};
|
|
275
285
|
export declare const branch: {
|
|
276
286
|
/** Current branch name, or null if detached/unavailable. */
|
package/dist/types/utils/jj.d.ts
CHANGED
|
@@ -16,14 +16,21 @@ export interface JjRepository {
|
|
|
16
16
|
storeDir: string;
|
|
17
17
|
}
|
|
18
18
|
/** Options for `jj diff` invocations. */
|
|
19
|
-
export interface DiffOptions {
|
|
19
|
+
export interface DiffOptions extends JjCommandOptions {
|
|
20
20
|
/** Optional file paths to restrict the diff with `-- <files>`. */
|
|
21
21
|
readonly files?: readonly string[];
|
|
22
22
|
/** Return only changed file names instead of Git-format diff text. */
|
|
23
23
|
readonly nameOnly?: boolean;
|
|
24
|
-
|
|
24
|
+
}
|
|
25
|
+
/** Options for a bounded `jj` subprocess query. */
|
|
26
|
+
export interface JjCommandOptions {
|
|
27
|
+
/** Optional cancellation signal for the subprocess. */
|
|
25
28
|
readonly signal?: AbortSignal;
|
|
29
|
+
/** Deadline in milliseconds. Defaults to {@link JJ_COMMAND_TIMEOUT_MS}. */
|
|
30
|
+
readonly timeoutMs?: number;
|
|
26
31
|
}
|
|
32
|
+
/** Default finite deadline for local jj subprocesses. */
|
|
33
|
+
export declare const JJ_COMMAND_TIMEOUT_MS = 5000;
|
|
27
34
|
/** Error thrown when a checked `jj` command exits non-zero. */
|
|
28
35
|
export declare class JjCommandError extends Error {
|
|
29
36
|
/** Arguments passed after the common `jj --no-pager --color=never` prefix. */
|
|
@@ -46,7 +53,7 @@ export declare const workingCopy: {
|
|
|
46
53
|
* Label `@` with its nearest bookmark, falling back to its short change ID.
|
|
47
54
|
* Returns `null` when `jj` is unavailable or the query fails.
|
|
48
55
|
*/
|
|
49
|
-
label(cwd: string,
|
|
56
|
+
label(cwd: string, options?: JjCommandOptions): Promise<string | null>;
|
|
50
57
|
/** Parse working-copy label query output. */
|
|
51
58
|
parseLabel: typeof parseWorkingCopyLabel;
|
|
52
59
|
};
|
|
@@ -56,7 +63,7 @@ export declare const status: {
|
|
|
56
63
|
* Count changes in `@` relative to its parent using the Git status shape.
|
|
57
64
|
* Jujutsu has no index, so `staged` is always zero.
|
|
58
65
|
*/
|
|
59
|
-
summary(cwd: string,
|
|
66
|
+
summary(cwd: string, options?: JjCommandOptions): Promise<git.GitStatusSummary | null>;
|
|
60
67
|
/** Parse `jj diff --summary` output into status counts. */
|
|
61
68
|
parse: typeof parseStatusSummary;
|
|
62
69
|
};
|
|
@@ -34,7 +34,7 @@ export declare const SEARCH_PROVIDER_OPTIONS: readonly [{
|
|
|
34
34
|
}, {
|
|
35
35
|
readonly value: "exa";
|
|
36
36
|
readonly label: "Exa";
|
|
37
|
-
readonly description: "
|
|
37
|
+
readonly description: "API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP";
|
|
38
38
|
}, {
|
|
39
39
|
readonly value: "tinyfish";
|
|
40
40
|
readonly label: "TinyFish";
|
|
@@ -136,7 +136,7 @@ export declare const SEARCH_PROVIDER_CHOICES: ({
|
|
|
136
136
|
} | {
|
|
137
137
|
readonly value: "exa";
|
|
138
138
|
readonly label: "Exa";
|
|
139
|
-
readonly description: "
|
|
139
|
+
readonly description: "API via /login exa or EXA_API_KEY; explicit keyless fallback via MCP";
|
|
140
140
|
} | {
|
|
141
141
|
readonly value: "tinyfish";
|
|
142
142
|
readonly label: "TinyFish";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
4
|
-
"version": "17.
|
|
4
|
+
"version": "17.2.0",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"@agentclientprotocol/sdk": "1.2.1",
|
|
53
53
|
"@babel/parser": "^7.29.7",
|
|
54
54
|
"@mozilla/readability": "^0.6.0",
|
|
55
|
-
"@oh-my-pi/hashline": "17.
|
|
56
|
-
"@oh-my-pi/omp-stats": "17.
|
|
57
|
-
"@oh-my-pi/pi-agent-core": "17.
|
|
58
|
-
"@oh-my-pi/pi-ai": "17.
|
|
59
|
-
"@oh-my-pi/pi-catalog": "17.
|
|
60
|
-
"@oh-my-pi/pi-mnemopi": "17.
|
|
61
|
-
"@oh-my-pi/pi-natives": "17.
|
|
62
|
-
"@oh-my-pi/pi-tui": "17.
|
|
63
|
-
"@oh-my-pi/pi-utils": "17.
|
|
64
|
-
"@oh-my-pi/pi-wire": "17.
|
|
65
|
-
"@oh-my-pi/snapcompact": "17.
|
|
55
|
+
"@oh-my-pi/hashline": "17.2.0",
|
|
56
|
+
"@oh-my-pi/omp-stats": "17.2.0",
|
|
57
|
+
"@oh-my-pi/pi-agent-core": "17.2.0",
|
|
58
|
+
"@oh-my-pi/pi-ai": "17.2.0",
|
|
59
|
+
"@oh-my-pi/pi-catalog": "17.2.0",
|
|
60
|
+
"@oh-my-pi/pi-mnemopi": "17.2.0",
|
|
61
|
+
"@oh-my-pi/pi-natives": "17.2.0",
|
|
62
|
+
"@oh-my-pi/pi-tui": "17.2.0",
|
|
63
|
+
"@oh-my-pi/pi-utils": "17.2.0",
|
|
64
|
+
"@oh-my-pi/pi-wire": "17.2.0",
|
|
65
|
+
"@oh-my-pi/snapcompact": "17.2.0",
|
|
66
66
|
"@opentelemetry/api": "^1.9.1",
|
|
67
67
|
"@opentelemetry/api-logs": "^0.220.0",
|
|
68
68
|
"@opentelemetry/context-async-hooks": "^2.9.0",
|