pi-daddy 0.59.0 → 0.59.1

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog — pi-daddy
2
2
 
3
+ ## 0.59.1 — 2026-11-17
4
+
5
+ - Startup no longer reports unobserved extension tools as missing packages. It shows that tool availability is still being checked and refreshes the summary after the first native tool inventory, including after `/new`.
6
+ - A tool available to the parent Pi session is not automatically available to a delegated child. The summary now identifies unsupported child delivery and directs that work to the parent; grants, gates and child-provider restrictions are unchanged.
7
+ - Added reproducible narrow/wide terminal fixtures for current work, genuine permission requests, saved open choices, memory topics and partial research. These check the actual renderer without model calls; human usability and live producer health still require their own observation.
8
+
3
9
  ## 0.59.0 — 2026-11-16
4
10
 
5
11
  - Compatible workflow extensions can inspect an exact older operation after an update or `/new` without adopting its owner or repeating work. Saved finals retain their original evidence; a confirmed pre-launch stop remains distinct from missing or interrupted records. Current access and cleanup are checked separately, and absent history never authorizes a retry.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # pi-daddy
2
2
 
3
- Source target: **0.56.3**. Before installation, verify that `npm view pi-daddy version` and Git tag `v0.56.3` both resolve to this release.
3
+ Source target: **0.59.1**. Before installation, verify that `npm view pi-daddy version` and Git tag `v0.59.1` both resolve to this release.
4
4
 
5
5
  **Capability governance and coordination for [pi](https://github.com/badlogic/pi-mono)'s multi-level agent system.**
6
6
  An orchestrator grants each sub-agent a deliberate subset of what it holds and withholds the rest. A sub-agent may
@@ -46,9 +46,11 @@ Open **1 Overview** to see what needs your attention, what Pi is doing and the l
46
46
 
47
47
  Use the arrow keys to select an item and **Enter** to open it. A side-by-side preview appears on Overview, Tasks and Reviews when the pane is at least 92 columns wide. Press **x** for an expanded view from 82 columns. **Esc** returns to your selection. Press **r** for a session recap, **m** for models or **v** for package versions. Standalone ledger views and older owners retain the legacy display.
48
48
 
49
- When a decision is pending, Overview directs you to the main Pi chat or to Reviews. Bookie handoffs show the command and the output to select. The Tools section describes Bookie and Scout using the latest available observations. A package can be installed while its live status is unknown. After a disconnect the dashboard labels the last known state and withdraws current permission requests.
49
+ When a decision is pending, Overview directs you to the main Pi chat or to Reviews. Bookie handoffs show the command and the output to select. **Memory** and **Research** show current availability separately from saved topics, findings and gaps. Select either row and press **Enter** to browse the available content. Older producers retain their status-only display. A package can be installed while its live status is unobserved. After a disconnect the dashboard labels the last known state and withdraws current permission requests.
50
50
 
51
- With Auto on in a trusted interactive project, a compatible Bookie can save and recall routine notes for the current folder. Look for **Bookie memory · Ready in this folder** under Overview → Tools. With a Bookie version that reports saved choices, Overview and Tasks list them under **Open choices**. Select a question and press **Enter** to see its alternatives. A supported recommendation includes the reason and evidence. Pick an option or **Write my own answer**, check the answer, then save it in Bookie. **Decide later** leaves the question open. After `/new` in the same folder, Pi can recall the decision and the other questions stay open. Older Bookie versions can show questions in read-only mode. Turning Auto off withdraws automatic memory access and hides those choices.
51
+ With Auto on in a trusted interactive project, a compatible Bookie can save and recall routine notes for the current folder. Look for **Bookie memory · Ready in this folder** under Overview → Memory. With a Bookie version that reports saved choices, Overview and Tasks list them under **Open choices**. Select a question and press **Enter** to see its alternatives. A supported recommendation includes the reason and evidence. Pick an option or **Write my own answer**, check the answer, then save it in Bookie. **Decide later** leaves the question open. After `/new` in the same folder, Pi can recall the decision and the other questions stay open. Older Bookie versions can show questions in read-only mode. Turning Auto off withdraws automatic memory access and hides those choices.
52
+
53
+ The startup delegation summary may say **checking available tools** until Pi provides its first callable-tool inventory. It refreshes automatically when work starts, including after `/new`. A parent tool such as Scout can be available while a skill using it remains unavailable to children; **use the parent Pi session** identifies that restriction. More permission does not provide a missing child tool.
52
54
 
53
55
  Task descriptions can come from a short public description supplied by the delegating model. When that description is unavailable, the dashboard uses the activity it actually observed. This works without a summarization request or JEV. Open details to inspect a source, and use **x** when offered to see exact references. Saved evidence, process completion and approval are separate facts. Explicit **p** and **f** reads use the existing retention controls.
54
56
 
@@ -384,7 +384,7 @@ export default function (pi: ExtensionAPI, trustedSession?: GrantsSession) {
384
384
  });
385
385
 
386
386
  // Observe the native reachable tool surface, including callable tools whose declarations Codemode hides.
387
- pi.on("before_provider_request", (event, ctx) => {
387
+ pi.on("before_provider_request", async (event, ctx) => {
388
388
  try {
389
389
  if (session.observed) return undefined;
390
390
  const names = observeToolNames(event.payload, pi.getAllTools(), pi.getActiveTools?.());
@@ -393,9 +393,6 @@ export default function (pi: ExtensionAPI, trustedSession?: GrantsSession) {
393
393
  session.observedTools = names;
394
394
  session.ownGrant = deriveOwnGrant(session.inherited, names);
395
395
  session.publishChildEnv();
396
- // The grant can only have narrowed, so what is spawnable can only have shrunk. Refreshed for the NEXT
397
- // request: this hook runs after the current payload's tools were already serialised.
398
- delegation.refreshSpawnable();
399
396
  // Refresh the catalog now that the real tool surface is known — this is the only moment extension
400
397
  // tools become visible, so it is the only moment `ext:`/`tool:` grants can be validated.
401
398
  // Keep the handle: a concurrent `delegate` awaits this rather than reading a half-built catalog.
@@ -410,6 +407,12 @@ export default function (pi: ExtensionAPI, trustedSession?: GrantsSession) {
410
407
  void session.catalogReady.catch((error: unknown) => {
411
408
  if (error instanceof BoundedReadCleanupError) recordDiscoveryCleanupFailure(session, error, lifecycle);
412
409
  });
410
+ await session.catalogReady;
411
+ assertDiscoveryHealthy(session, lifecycle);
412
+ // Refresh and report only after the catalog includes the observed extension tools. Otherwise the
413
+ // settled summary can repeat startup's provisional "unknown capability" diagnosis.
414
+ delegation.refreshSpawnable();
415
+ await reportSelectedDefinitions(session, ctx);
413
416
  } catch {
414
417
  /* never throw into the agent loop */
415
418
  }
@@ -301,13 +301,16 @@ export async function reportSessionStart(session: GrantsSession, ctx: SessionRep
301
301
 
302
302
  /** Public selected resources become available after session start; report their frozen snapshot then. */
303
303
  export async function reportSelectedDefinitions(session: GrantsSession, ctx: SessionReportContext): Promise<void> {
304
+ const lifecycle = session.reloadLifecycle;
304
305
  for (const reason of session.definitionSkips)
305
306
  ctx.ui.notify(`grants: a definition was not loaded — ${reason}`, "warning");
306
307
  if (!session.governed) return;
307
308
  try {
308
309
  const line = await selectedDefinitionsSummary(session);
310
+ if (session.reloadLifecycle !== lifecycle) return;
309
311
  if (line) ctx.ui.notify(line, "info");
310
312
  } catch (error) {
313
+ if (session.reloadLifecycle !== lifecycle) return;
311
314
  ctx.ui.notify(
312
315
  `grants: selected definitions could not be summarized (${String(error)}) — run /grants for detail.`,
313
316
  "warning",
@@ -321,6 +324,11 @@ function selectedDefinitionsSummary(session: GrantsSession): Promise<string | nu
321
324
  // The session facts that make every per-definition verdict identical. `mayDelegate` in
322
325
  // particular: without `tool:delegate` there is no delegate tool at all, and the line used to
323
326
  // report definitions as spawnable in the one session where nothing can ever be spawned.
324
- { mayDelegate: session.mayDelegate, depth: session.depth, maxDepth: session.maxDepth },
327
+ {
328
+ mayDelegate: session.mayDelegate,
329
+ depth: session.depth,
330
+ maxDepth: session.maxDepth,
331
+ toolsObserved: session.observed,
332
+ },
325
333
  ).then((summary) => renderSpawnableSummary(summary, session.definitions.size));
326
334
  }
@@ -20,18 +20,21 @@
20
20
  * grant it classifies against is the one *inherited*; `deriveOwnGrant` narrows it to the observed tool
21
21
  * surface only when a request is made, and a definition counted spawnable here can be refused afterwards if
22
22
  * its ceiling names a tool this session turns out not to have (R-75, measured live). It is an upper bound,
23
- * and `/grants` run after any request is the settled answer.
23
+ * and a first-request refresh reports the settled answer. Unknown extension tools are presented as still
24
+ * being checked until that native observation arrives; this never changes what dispatch permits.
24
25
  */
25
26
 
26
27
  import type { SkillDefinition } from "../src/kernel/definitions.ts";
27
28
  import type { GatedPlan } from "./run-delegation.ts";
28
29
 
29
- /** Why a definition is not spawnable right now. Three causes, three different fixes. */
30
+ /** Why a definition is not spawnable right now; display never changes the planner's refusal. */
30
31
  export type WithheldReason =
31
32
  /** The grant lacks `agent:<name>`, or lacks a tool the ceiling declares. Fix: widen `PI_DADDY_GRANT`. */
32
33
  | "capability"
33
34
  /** Everything is held, but a gated capability needs a human yes first. Fix: spawn it and answer. */
34
35
  | "approval"
36
+ /** A parent's registered tool has no qualified child provider. More permission does not fix it. */
37
+ | "child-provider"
35
38
  /** Anything else the planner refused — the file, an unknown capability, an unresolvable skill. */
36
39
  | "declaration";
37
40
 
@@ -47,6 +50,8 @@ export interface WithheldDefinition {
47
50
  export interface SpawnableSummary {
48
51
  spawnable: string[];
49
52
  withheld: WithheldDefinition[];
53
+ /** Extension capabilities have not been observed yet; this is not an installation failure. */
54
+ awaitingTools?: string[];
50
55
  /**
51
56
  * Set when NOTHING can be spawned for a reason about the SESSION rather than about any definition — no
52
57
  * `tool:delegate`, or a depth bound that forbids spawning. Per-definition work is skipped entirely.
@@ -77,6 +82,8 @@ export interface SessionFacts {
77
82
  mayDelegate: boolean;
78
83
  depth: number;
79
84
  maxDepth: number;
85
+ /** Omitted by callers with an already-settled planner; false only before native tool observation. */
86
+ toolsObserved?: boolean;
80
87
  }
81
88
 
82
89
  /**
@@ -129,6 +136,7 @@ export async function summariseSpawnable(
129
136
 
130
137
  const spawnable: string[] = [];
131
138
  const withheld: WithheldDefinition[] = [];
139
+ const awaitingTools: string[] = [];
132
140
 
133
141
  for (const name of names.slice(0, PREVIEW_LIMIT)) {
134
142
  const { plan } = await preview(name);
@@ -136,6 +144,19 @@ export async function summariseSpawnable(
136
144
  spawnable.push(name);
137
145
  continue;
138
146
  }
147
+ // The initial catalog contains built-ins before Pi exposes its callable extension tools. Preserve
148
+ // the refusal for dispatch, but do not tell the human that an unobserved package is uninstalled.
149
+ // Only the catalog's own unknown-tool diagnosis is provisional; other refusals stay explicit.
150
+ if (
151
+ session.toolsObserved === false &&
152
+ plan.refusal?.code === "UNKNOWN_TOOL" &&
153
+ /^unknown capabilit(?:y|ies): (?:tool|ext):[^\s,]+(?:, (?:tool|ext):[^\s,]+)* — not present in this session's catalog/.test(
154
+ plan.reason ?? "",
155
+ )
156
+ ) {
157
+ awaitingTools.push(name);
158
+ continue;
159
+ }
139
160
  // Read off the plan's own result, in the order `planDelegation` decides them: an escalation is reported
140
161
  // before a gate, because a capability the session does not hold cannot be approved into existence.
141
162
  // `denied` carries the ADR-0017 authorisation refusal too — asking to run a definition this session was
@@ -144,13 +165,25 @@ export async function summariseSpawnable(
144
165
  const gated = plan.result.gatedBlocked;
145
166
  if (denied.length > 0) withheld.push({ name, reason: "capability", missing: [...denied].sort() });
146
167
  else if (gated.length > 0) withheld.push({ name, reason: "approval", missing: [...gated].sort() });
168
+ else if (plan.refusal?.details?.kind === "child-tool-unavailable")
169
+ withheld.push({
170
+ name,
171
+ reason: "child-provider",
172
+ missing: String(plan.refusal.details.tools).split(","),
173
+ reasonText: plan.reason,
174
+ });
147
175
  // Everything else: say what the ENFORCER said. Inventing a category here is what told an operator with
148
176
  // an unknown capability, an unresolvable `skill:`, or a universal capability that their file was
149
177
  // written wrong, in wording that contradicted `/grants` on the same screen.
150
178
  else withheld.push({ name, reason: "declaration", missing: [], reasonText: plan.reason });
151
179
  }
152
180
 
153
- return { spawnable, withheld, notChecked: Math.max(0, names.length - PREVIEW_LIMIT) };
181
+ return {
182
+ spawnable,
183
+ withheld,
184
+ ...(awaitingTools.length ? { awaitingTools } : {}),
185
+ notChecked: Math.max(0, names.length - PREVIEW_LIMIT),
186
+ };
154
187
  }
155
188
 
156
189
  /** `a, b, c` — or the first few and a count, so a large skill root does not become the whole line. */
@@ -198,6 +231,8 @@ export function renderSpawnableSummary(summary: SpawnableSummary, total: number)
198
231
  // ADR-0024: a gated `agent:` id is the PARENT's authority to run the definition now, and is deliberately
199
232
  // kept out of what the child receives. "before a child receives it" was wrong for exactly that case.
200
233
  if (w.reason === "approval") return `${name} (needs your approval for ${list(w.missing)})`;
234
+ if (w.reason === "child-provider")
235
+ return `${name} (use the parent Pi session; child tools unavailable: ${list(w.missing.map(safeName))})`;
201
236
  return `${name} (${w.reasonText ?? "cannot be spawned as its file is written"})`;
202
237
  };
203
238
 
@@ -206,6 +241,9 @@ export function renderSpawnableSummary(summary: SpawnableSummary, total: number)
206
241
  const extra = summary.withheld.length - shown.length;
207
242
  lines.push(` withheld: ${shown.join("; ")}${extra > 0 ? `; … and ${extra} more` : ""}`);
208
243
  }
244
+ if (summary.awaitingTools?.length) {
245
+ lines.push(` checking available tools: ${list(summary.awaitingTools.map(safeName))} — updates when work starts`);
246
+ }
209
247
  if (summary.notChecked > 0) {
210
248
  lines.push(` ${summary.notChecked} more not checked (first ${PREVIEW_LIMIT} only) — /grants lists them`);
211
249
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-daddy",
3
- "version": "0.59.0",
3
+ "version": "0.59.1",
4
4
  "description": "Capability governance for pi sub-agents: spawn Agent Skills (SKILL.md) definitions whose allowed-tools becomes a grant that can only narrow going down a delegation tree, enforced by pi's own --tools allowlist, with an append-only ledger.",
5
5
  "keywords": [
6
6
  "pi-package",