pi-orchestrator-config 4.22.4 → 4.23.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 ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## [4.23.0] - 2026-11-02
4
+
5
+ - Minimum pi version raised to 1.5.0 — the extension floor, the sidecar floor, and every manifest move together.
6
+ - Interactive dialogs (ask_user and the pidash bridge) now report "blocked on user input" while they wait, so terminals that track program status show pi as waiting instead of busy.
7
+ - This changelog ships with the package and pi reads it after `pi update --extensions`, so an update now tells you what changed.
8
+ - The `subagent` tool keeps its `agentScope` values as a real enum after pi 1.5.0 changed how `StringEnum` types itself, so the parameter stays validated and documented.
9
+ - Release workflow keeps this changelog current on every bump, and a changelog-only change now marks the package as affected.
10
+ - Docs: MCP OAuth client registration (`auto` / `dcr` / `cimd`), `PI_SELF_UPDATE_COMMAND` for wrapper installs, and the billed-vs-estimated cost contract.
11
+
12
+ ## [4.22.4] - 2026-11-02
13
+
14
+ - Minimum pi version raised to 1.5.0 (extension and sidecar floors, manifests).
15
+ - Sidecar reports cost billed by the provider instead of only estimated cost.
16
+ - Status reporting for interactive dialogs blocked waiting on user input.
package/README.md CHANGED
@@ -210,6 +210,22 @@ After updating, run `/reload` in pi or restart pi to pick up changes.
210
210
  Refresh the global agent package after acpx-provider / cli-provider / settings
211
211
  changes so `~/.pi` is not a mixed checkout (see issue #651).
212
212
 
213
+ ### Custom update command
214
+
215
+ `pi update` installs a new release with a global npm install. When a wrapper or another
216
+ package manager provides pi — mise, pnpm, nix — point it at that manager's command instead:
217
+
218
+ ```bash
219
+ export PI_SELF_UPDATE_COMMAND="mise use -g npm:{packageName}@{version}"
220
+ ```
221
+
222
+ `pi update` runs the command only when pi.dev reports a newer release, replacing
223
+ `{packageName}`, `{version}`, and `{installSpec}` (`{packageName}@{version}`) with that
224
+ release. The value is split on spaces; for an argument that contains spaces, set the global
225
+ `selfUpdateCommand` setting in `~/.pi/agent/settings.json` as an argv array such as
226
+ `["nix", "profile", "upgrade", "pi"]`. It can only be set in the agent-directory settings,
227
+ and `PI_SELF_UPDATE_COMMAND` takes precedence over it.
228
+
213
229
  ## Usage
214
230
 
215
231
  ### Automatic delegation
@@ -1076,7 +1092,7 @@ it also runs as a pre-commit hook when TypeScript files change.
1076
1092
 
1077
1093
  ## Prerequisites
1078
1094
 
1079
- - [pi](https://github.com/badlogic/pi-mono) (minimum version: **1.4.0**). Pidash uses Pi's `ui_prompt_start` and `ui_prompt_end` events to show prompt wait separately from agent work.
1095
+ - [pi](https://github.com/badlogic/pi-mono) (minimum version: **1.5.0**). Pidash uses Pi's `ui_prompt_start` and `ui_prompt_end` events to show prompt wait separately from agent work.
1080
1096
  - `gh` CLI (for GitHub operations)
1081
1097
  - `uv` (for Python execution)
1082
1098
  - `myk-pi-tools` (optional, for `/pr-review` and `/release`)
@@ -14,6 +14,9 @@ import {
14
14
  } from "@earendil-works/pi-tui";
15
15
  import { DynamicBorder } from "@earendil-works/pi-coding-agent";
16
16
  import { Type } from "typebox";
17
+ import { createLogger } from "../shared/logger.js";
18
+
19
+ const log = createLogger("ask-user");
17
20
 
18
21
  export function registerAskUser(
19
22
  pi: ExtensionAPI,
@@ -78,6 +81,7 @@ export function registerAskUser(
78
81
  }
79
82
  });
80
83
 
84
+ log.debug("ask_user prompt opened with blocked status", { askId, mode: params.options?.length ? "select" : "input" });
81
85
  const result = await ctx.ui.custom<string | null>(
82
86
  (tui, theme, _kb, done) => {
83
87
  // Allow browser to resolve this dialog
@@ -260,7 +264,7 @@ export function registerAskUser(
260
264
  },
261
265
  };
262
266
  },
263
-
267
+ { blocked: { kind: "question", message: params.question } },
264
268
  );
265
269
 
266
270
  unsubscribe();
@@ -14,7 +14,6 @@ const require = createRequire(import.meta.url);
14
14
 
15
15
  import type { AgentToolResult } from "@earendil-works/pi-agent-core";
16
16
  import type { Message } from "@earendil-works/pi-ai";
17
- import { StringEnum } from "@earendil-works/pi-ai";
18
17
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
19
18
  import { createLogger } from "../shared/logger.js";
20
19
  import { createBridgedUi } from "../shared/ui-bridge.js";
@@ -107,7 +106,12 @@ const ChainItem = Type.Object({
107
106
  cwd: Type.String({ description: "Working directory" }),
108
107
  estimatedSeconds: Type.Number({ description: "Estimated step duration in seconds" }),
109
108
  });
110
- const AgentScopeSchema = StringEnum(["user", "project", "both"] as const, {
109
+ // pi 1.5.0's StringEnum returns a pi-schema Schema, which TypeBox's Static cannot
110
+ // read — params.agentScope degraded to `unknown`. Unsafe keeps the JSON-Schema
111
+ // shape providers need while carrying the literal union in the static type.
112
+ const AgentScopeSchema = Type.Unsafe<AgentScope>({
113
+ type: "string",
114
+ enum: ["user", "project", "both"],
111
115
  description: 'Agent directories to use. Default: "both".',
112
116
  default: "both",
113
117
  });
@@ -263,7 +263,7 @@ export function tryGetSystemPromptOptions(ctx: any): { contextFiles?: any[]; ski
263
263
  * read from ~/.pi/agent/mcp.json by pi itself), and the built-in MCP/codemode/
264
264
  * tool-search extensions become the ones we must not collide with.
265
265
  */
266
- export const MIN_PI_VERSION = "1.4.0";
266
+ export const MIN_PI_VERSION = "1.5.0";
267
267
 
268
268
  /** Get the installed pi version from its package.json. */
269
269
  export function getPiVersion(): string | null {
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Prefer this over legacy `pi.registerProvider(name, { streamSimple })` bags so
5
5
  * providers get /login auth, fetchModels refresh, filterModels, and native
6
- * ProviderStreams (requires pi >= 1.4.0).
6
+ * ProviderStreams (requires pi >= 1.5.0).
7
7
  */
8
8
 
9
9
  import { createLogger } from "./logger.js";
@@ -110,6 +110,10 @@ export function createBridgedUi(pi: ExtensionAPI): BridgedUi {
110
110
  externalDone(resp.value);
111
111
  });
112
112
 
113
+ // Report "blocked on user input" (OSC 7501) while the dialog is visible.
114
+ const blocked = { kind: "question" as const, message: message ? `${title} — ${message}` : title };
115
+ log.debug("bridged prompt opened with blocked status", { id, method, kind: blocked.kind });
116
+
113
117
  try {
114
118
  const result = (await ctx.ui.custom((tui: any, theme: any, _kb: any, done: (v: any) => void) => {
115
119
  let resolved = false;
@@ -215,7 +219,7 @@ export function createBridgedUi(pi: ExtensionAPI): BridgedUi {
215
219
  tui.requestRender();
216
220
  },
217
221
  };
218
- })) as T | undefined;
222
+ }, { blocked })) as T | undefined;
219
223
  return result;
220
224
  } finally {
221
225
  unsubscribe?.();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-orchestrator-config",
3
- "version": "4.22.4",
3
+ "version": "4.23.0",
4
4
  "description": "Orchestrator pattern for pi: specialist subagents, enforcement, code review loop, workflow commands",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -15,6 +15,7 @@
15
15
  "extensions/pidiff/pidiff-ui"
16
16
  ],
17
17
  "files": [
18
+ "CHANGELOG.md",
18
19
  "extensions/acpx-provider/",
19
20
  "extensions/cli-provider/",
20
21
  "extensions/providers/",
@@ -76,10 +77,10 @@
76
77
  "ws": "^8.0.0"
77
78
  },
78
79
  "devDependencies": {
79
- "@earendil-works/pi-agent-core": "^1.4.0",
80
- "@earendil-works/pi-ai": "^1.4.0",
81
- "@earendil-works/pi-coding-agent": "^1.4.0",
82
- "@earendil-works/pi-tui": "^1.4.0",
80
+ "@earendil-works/pi-agent-core": "^1.5.0",
81
+ "@earendil-works/pi-ai": "^1.5.0",
82
+ "@earendil-works/pi-coding-agent": "^1.5.0",
83
+ "@earendil-works/pi-tui": "^1.5.0",
83
84
  "@types/node": "^22.20.1",
84
85
  "jsdom": "^30.1.1",
85
86
  "tsx": "^4.0.0"
@@ -100,6 +101,7 @@
100
101
  "protobufjs": "7.6.5"
101
102
  },
102
103
  "pi": {
104
+ "changelogPath": "./CHANGELOG.md",
103
105
  "extensions": [
104
106
  "./extensions"
105
107
  ],
@@ -128,7 +128,12 @@ root only).
128
128
  stage ONLY the files in `updated[]` plus the refreshed lockfile
129
129
  (`lockfile.path` when `lockfile.refreshed` is true — `refreshed: false`
130
130
  is a warning: run `uv lock` yourself before committing); each entry in `packages[]`
131
- carries its per-package `tag` (`<name>@<version>`). Bump PR, merge,
131
+ carries its per-package `tag` (`<name>@<version>`). When
132
+ `pi-orchestrator-config` is among the bumped packages, also prepend its entry
133
+ to `CHANGELOG.md` — `## [<its new version>] - <YYYY-MM-DD>` plus its S3
134
+ changelog entries, newest first — and stage `CHANGELOG.md` with the bump
135
+ files, so the npm tarball carries the notes pi shows under Extension
136
+ Updates. Bump PR, merge,
132
137
  and branch sync follow the standard Phase 5 delegation (git-expert /
133
138
  github-expert), with the bump PR message `chore: bump version to
134
139
  <name1>@<v1>[, <name2>@<v2>...]` (keep the `chore: bump version`
@@ -275,6 +280,14 @@ Parse the JSON output from bump-version. Only stage the files listed in the
275
280
  `updated[]` array. If `skipped[]` is non-empty, inform the user which files were
276
281
  skipped and why before proceeding.
277
282
 
283
+ When `pi-orchestrator-config` (the root `package.json`) was bumped, also write
284
+ its notes into `CHANGELOG.md`: prepend `## [<VERSION>] - <YYYY-MM-DD>` followed
285
+ by that package's changelog entries from Phase 3 (newest first, same bullet
286
+ style as the entries already there), and stage `CHANGELOG.md` with the version
287
+ files. The npm tarball ships the file and pi shows it under Extension Updates on
288
+ the next launch — leave it alone and users keep seeing the previous version's
289
+ notes.
290
+
278
291
  **Delegate git and GitHub operations to specialist agents:**
279
292
 
280
293
  1. **Delegate to `git-expert`:** Create branch, stage files, sync lockfile, commit, push: