@oh-my-pi/pi-coding-agent 16.0.3 → 16.0.4

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.
@@ -19,6 +19,7 @@ export interface Args {
19
19
  appendSystemPrompt?: string;
20
20
  thinking?: Effort;
21
21
  hideThinking?: boolean;
22
+ advisor?: boolean;
22
23
  continue?: boolean;
23
24
  resume?: string | true;
24
25
  help?: boolean;
@@ -97,6 +97,9 @@ export default class Index extends Command {
97
97
  "hide-thinking": import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
98
98
  description: string;
99
99
  };
100
+ advisor: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"boolean"> & {
101
+ description: string;
102
+ };
100
103
  hook: import("@oh-my-pi/pi-utils/cli").FlagDescriptor<"string"> & {
101
104
  description: string;
102
105
  multiple: true;
@@ -2846,7 +2846,7 @@ export declare const SETTINGS_SCHEMA: {
2846
2846
  readonly tab: "files";
2847
2847
  readonly group: "Read Summaries";
2848
2848
  readonly label: "Read Summary Unfold Ceiling";
2849
- readonly description: "Hard ceiling on summary size while BFS-unfolding. An unfold that would exceed this is reverted and unfolding stops.";
2849
+ readonly description: "Hard ceiling on summary size while BFS-unfolding. An unfold whose revealed lines would exceed this is skipped (that span stays folded) and unfolding continues with the remaining spans.";
2850
2850
  };
2851
2851
  };
2852
2852
  readonly "read.toolResultPreview": {
@@ -52,6 +52,8 @@ export declare function recordFileSnapshot(session: FileSnapshotStoreOwner, abso
52
52
  * the elided interior was never shown, so editing inside it must be rejected.
53
53
  */
54
54
  export declare function parseSeenLinesFromHashlineBody(body: string): number[];
55
+ /** Merge explicit 1-indexed displayed lines into a recorded hashline snapshot. */
56
+ export declare function recordSeenLines(session: FileSnapshotStoreOwner, absolutePath: string, tag: string, lines: readonly number[]): void;
55
57
  /**
56
58
  * Attach the lines a read displayed to the snapshot it minted, so the patcher
57
59
  * can reject edits anchored on lines the model never saw. Best-effort: a no-op
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": "16.0.3",
4
+ "version": "16.0.4",
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",
@@ -47,17 +47,17 @@
47
47
  "@agentclientprotocol/sdk": "0.25.0",
48
48
  "@babel/parser": "^7.29.7",
49
49
  "@mozilla/readability": "^0.6.0",
50
- "@oh-my-pi/hashline": "16.0.3",
51
- "@oh-my-pi/omp-stats": "16.0.3",
52
- "@oh-my-pi/pi-agent-core": "16.0.3",
53
- "@oh-my-pi/pi-ai": "16.0.3",
54
- "@oh-my-pi/pi-catalog": "16.0.3",
55
- "@oh-my-pi/pi-mnemopi": "16.0.3",
56
- "@oh-my-pi/pi-natives": "16.0.3",
57
- "@oh-my-pi/pi-tui": "16.0.3",
58
- "@oh-my-pi/pi-utils": "16.0.3",
59
- "@oh-my-pi/pi-wire": "16.0.3",
60
- "@oh-my-pi/snapcompact": "16.0.3",
50
+ "@oh-my-pi/hashline": "16.0.4",
51
+ "@oh-my-pi/omp-stats": "16.0.4",
52
+ "@oh-my-pi/pi-agent-core": "16.0.4",
53
+ "@oh-my-pi/pi-ai": "16.0.4",
54
+ "@oh-my-pi/pi-catalog": "16.0.4",
55
+ "@oh-my-pi/pi-mnemopi": "16.0.4",
56
+ "@oh-my-pi/pi-natives": "16.0.4",
57
+ "@oh-my-pi/pi-tui": "16.0.4",
58
+ "@oh-my-pi/pi-utils": "16.0.4",
59
+ "@oh-my-pi/pi-wire": "16.0.4",
60
+ "@oh-my-pi/snapcompact": "16.0.4",
61
61
  "@opentelemetry/api": "^1.9.1",
62
62
  "@opentelemetry/context-async-hooks": "^2.7.1",
63
63
  "@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
package/src/cli/args.ts CHANGED
@@ -33,6 +33,7 @@ export interface Args {
33
33
  appendSystemPrompt?: string;
34
34
  thinking?: Effort;
35
35
  hideThinking?: boolean;
36
+ advisor?: boolean;
36
37
  continue?: boolean;
37
38
  resume?: string | true;
38
39
  help?: boolean;
@@ -194,6 +195,8 @@ export function parseArgs(inputArgs: string[], extensionFlags?: Map<string, { ty
194
195
  result.noPty = true;
195
196
  } else if (arg === "--hide-thinking") {
196
197
  result.hideThinking = true;
198
+ } else if (arg === "--advisor") {
199
+ result.advisor = true;
197
200
  } else if (arg === "--print" || arg === "-p") {
198
201
  result.print = true;
199
202
  } else if (arg === "--no-extensions") {
@@ -260,6 +260,7 @@ export const VALUELESS_FLAGS: ReadonlySet<string> = new Set([
260
260
  "--no-lsp",
261
261
  "--no-pty",
262
262
  "--hide-thinking",
263
+ "--advisor",
263
264
  "--print",
264
265
  "--no-extensions",
265
266
  "--no-skills",
@@ -106,6 +106,9 @@ export default class Index extends Command {
106
106
  "hide-thinking": Flags.boolean({
107
107
  description: "Hide thinking blocks in TUI output (display only, does not disable model thinking)",
108
108
  }),
109
+ advisor: Flags.boolean({
110
+ description: "Enable the advisor runtime (passively reviews each turn and injects notes)",
111
+ }),
109
112
  hook: Flags.string({
110
113
  description: "Load a hook/extension file (can be used multiple times)",
111
114
  multiple: true,
@@ -2658,7 +2658,7 @@ export const SETTINGS_SCHEMA = {
2658
2658
  group: "Read Summaries",
2659
2659
  label: "Read Summary Unfold Ceiling",
2660
2660
  description:
2661
- "Hard ceiling on summary size while BFS-unfolding. An unfold that would exceed this is reverted and unfolding stops.",
2661
+ "Hard ceiling on summary size while BFS-unfolding. An unfold whose revealed lines would exceed this is skipped (that span stays folded) and unfolding continues with the remaining spans.",
2662
2662
  },
2663
2663
  },
2664
2664
 
@@ -116,6 +116,17 @@ export function parseSeenLinesFromHashlineBody(body: string): number[] {
116
116
  return seen;
117
117
  }
118
118
 
119
+ /** Merge explicit 1-indexed displayed lines into a recorded hashline snapshot. */
120
+ export function recordSeenLines(
121
+ session: FileSnapshotStoreOwner,
122
+ absolutePath: string,
123
+ tag: string,
124
+ lines: readonly number[],
125
+ ): void {
126
+ if (lines.length === 0) return;
127
+ getFileSnapshotStore(session).recordSeenLines(canonicalSnapshotKey(absolutePath), tag, lines);
128
+ }
129
+
119
130
  /**
120
131
  * Attach the lines a read displayed to the snapshot it minted, so the patcher
121
132
  * can reject edits anchored on lines the model never saw. Best-effort: a no-op
@@ -128,7 +139,5 @@ export function recordSeenLinesFromBody(
128
139
  tag: string,
129
140
  body: string,
130
141
  ): void {
131
- const seen = parseSeenLinesFromHashlineBody(body);
132
- if (seen.length === 0) return;
133
- getFileSnapshotStore(session).recordSeenLines(canonicalSnapshotKey(absolutePath), tag, seen);
142
+ recordSeenLines(session, absolutePath, tag, parseSeenLinesFromHashlineBody(body));
134
143
  }