pi-daddy 0.43.0 → 0.43.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
@@ -12,14 +12,23 @@ the record of how the package got here and are worth keeping; they are not worth
12
12
  > the record of how the package arrived at what it does, and because the reasoning behind each one is
13
13
  > usually the clearest statement of why the current behaviour is what it is.
14
14
 
15
+ ## 0.43.1 — Pi-only documentation refresh (2026-09-29)
16
+
17
+ - Refresh `README.md`, `AGENTS.md`, the package README, and the ledger-record contract README against the shipped
18
+ initialization, privacy, model, outcome, workspace, executor, CLI, and compatibility behavior.
19
+ - Remove obsolete Claude-specific formatting policy and describe Pi as this repository's only supported agent
20
+ workflow; retain ignore guards against accidentally committing assistant-specific scratch state.
21
+ - Extend documentation drift checks to verify the published contract's file references and root workspace commands.
22
+ No runtime behavior or default changed.
23
+
15
24
  ## 0.43.0 — episode outcome labeling (2026-09-29)
16
25
 
17
26
  - PR #85 adds `pi-daddy outcomes`, which reads Git history for `Pi-Episode` trailers and appends `episode_outcome`
18
27
  ledger records covering survival on the default branch, reverts by name or inverse diff, CI state via `gh`,
19
28
  amendments, and operator corrections.
20
29
  - `pi-daddy report` now fills its outcome column from those records.
21
- - Ledger readers now validate every known record kind before skipping kinds they do not render, and skip unknown
22
- future kinds instead of throwing. No default changed.
30
+ - The dashboard ledger reader now validates every known record kind before skipping kinds it does not render, and
31
+ skips unknown future kinds instead of throwing. No default changed.
23
32
 
24
33
  ## 0.42.0 — model-attributed usage records (2026-09-29)
25
34
 
package/README.md CHANGED
@@ -3,16 +3,18 @@
3
3
  Capability governance and coordination for [pi](https://github.com/badlogic/pi-mono)'s multi-level agent system. An
4
4
  orchestrator grants each sub-agent a deliberate subset of what it holds and withholds the rest; a sub-agent may delegate
5
5
  further, but only ever a subset of what it holds. Enforcement is pi's own `--tools` allowlist on a separate child
6
- process, with an append-only, hash-chained ledger of every grant and refusal.
6
+ process, with an optional append-only, hash-chained governance ledger.
7
7
 
8
8
  ```bash
9
9
  pi install npm:pi-daddy
10
10
  pi
11
11
  ```
12
12
 
13
- `/grants` shows the session's ceiling and spawnable definitions; `/grants init` writes `.pi/pi-daddy/settings.json`,
14
- the one reviewable file you commit. A definition is an [Agent Skills](https://agentskills.io/specification) `SKILL.md`
15
- whose `allowed-tools` is the ceiling and whose body is the child's system prompt.
13
+ `/grants` shows the session's ceiling and spawnable definitions. `/grants init` writes the review copy at
14
+ `.pi/pi-daddy/settings.json`, stores the enforced grant outside the workspace, enables the project ledger, and applies
15
+ the decisions to the running session; commit the review copy when the project's ignore rules permit it. A definition
16
+ is an [Agent Skills](https://agentskills.io/specification) `SKILL.md` whose `allowed-tools` is the ceiling and whose
17
+ body is the child's system prompt.
16
18
 
17
19
  ```
18
20
  delegate({ agent: "review-security", task: "Review the diff." })
@@ -26,7 +28,12 @@ effective = ( requested ∩ parentGrant ∩ ceiling ) \ (gated \ approved)
26
28
 
27
29
  Escalation is impossible by construction on the tool surface. It does not contain an agent holding an execution
28
30
  primitive: a child granted `bash` can start an ungoverned descendant, so `bash` is gated by default and every gate
29
- answer is recorded.
31
+ answer is recorded when a governance ledger is configured.
32
+
33
+ The package requires Node.js 22.19.0 or newer. `pi-daddy report` joins episode usage and attribution;
34
+ `pi-daddy outcomes` adds Git, CI, amendment, and operator-correction signals for commits carrying a `Pi-Episode`
35
+ trailer. A connected dashboard can change model/thinking defaults for its owning session without changing persistent
36
+ settings or enforcement.
30
37
 
31
38
  The full product description is the repository [README](https://github.com/mojomanyana/pi-daddy#readme); the
32
39
  [CHANGELOG](./CHANGELOG.md) says what each release changed and what to do about breaking changes. The one shipped
@@ -1,44 +1,59 @@
1
- # pi-daddy ledger contract — version 3
1
+ # pi-daddy ledger-record contract — version 1
2
2
 
3
- Canonical machine contract for one `ledgerVersion: 3` JSONL line:
3
+ Canonical machine contract for the append-only governance ledger:
4
4
 
5
- - `ledger-event.schema.json` — closed JSON Schema draft 2020-12 event union.
6
- - `fixtures/*.json` — deterministic examples generated through the production builders by
5
+ - `record.schema.json` — the JSON Schema draft 2020-12 record envelope
6
+ `{v, seq, prev, at, kind, id, body, digest}` written as one JSON object per line.
7
+ - `governance-event.schema.json` — the closed `ledgerVersion: 3` union carried in a governance record's `body`.
8
+ - `fixtures/ledger-record.jsonl` — deterministic envelope examples.
9
+ - `fixtures/*.json` — deterministic governance-body examples generated through the production builders by
7
10
  `scripts/generate-ledger-record-contract.ts`.
8
11
 
9
- ## Dispatch and compatibility
12
+ The current governance events are `capability_decision`, `workspace_lease`, `child_lifecycle`, `cost_gate`,
13
+ `session_config`, and `episode_outcome`.
10
14
 
11
- 1. No `ledgerVersion` and no `event` is a legacy 0.17 grant record.
12
- 2. `ledgerVersion: 2` is validated against the frozen v2 contract.
13
- 3. `ledgerVersion: 3` requires one known event and validation against this schema.
14
- 4. Any unsupported explicit version, missing discriminator, unknown event, or malformed required identity is corrupt. It is never reinterpreted as legacy.
15
+ ## Reading and compatibility
15
16
 
16
- The schema is closed. Adding/removing a field, event or enum member, changing requiredness, or changing meaning requires a new ledger version and versioned path. V3 is still unreleased, so its review repairs are folded into this one initial contract rather than creating a public v4.
17
+ The envelope reader verifies sequence, previous-record hash, digest, and known envelope kind. A torn or tampered tail
18
+ is reported as damage; writers refuse to append until the operator explicitly repairs it. Pre-envelope ledgers are
19
+ imported into envelopes and are never repaired in place.
20
+
21
+ Within a governance body:
22
+
23
+ 1. No `ledgerVersion` and no `event` is a legacy grant record.
24
+ 2. Imported `ledgerVersion: 2` events are retained as historical records using their frozen identity rules.
25
+ 3. Every known `ledgerVersion: 3` event is validated against `governance-event.schema.json`, including known kinds a
26
+ particular reader does not render.
27
+ 4. The dashboard projection skips a non-empty unknown v3 event discriminator so a newer writer does not crash an
28
+ older dashboard. Missing discriminators, unsupported explicit versions, and malformed known events are corrupt.
29
+ `/grants ledger` is currently closed-world and reports valid event kinds it does not render, including future
30
+ discriminators, as corruption; that is a known compatibility gap rather than part of the contract.
31
+
32
+ The governance schema is closed. Adding or removing a field, event, or enum member, changing requiredness, or changing
33
+ meaning requires an explicit compatibility decision and regenerated fixtures. Run `npm run contracts:generate` from
34
+ the repository root and commit the generated contract with the runtime change.
17
35
 
18
36
  ## Execution identity
19
37
 
20
- Every v3 **execution** event carries:
38
+ Every v3 execution event carries:
21
39
 
22
40
  - `executionId`: globally unique identity of one execution occurrence.
23
41
  - `parentExecutionId`: the unique governed execution that delegated it, or explicit `null` at a root.
24
42
  - `childId`: the readable logical tree position, retained for operators and deterministic comparisons.
25
43
 
26
- `workflow_fact` is not an execution event; it carries its own `factId` and explicit provenance instead.
44
+ Consumers join capability, lifecycle, and lease events by `executionId`, never by `childId`. Repeated or concurrent
45
+ calls may reuse a logical position such as `d0.1`; they may never reuse an execution id.
27
46
 
28
- Consumers join lifecycle and lease events by `executionId`, never by `childId`. Repeated or concurrent calls may reuse a logical position such as `d0.1`; they may never reuse an execution id.
47
+ A lifecycle `running` event may include `herdrPaneId` and `herdrAgentName` for navigation. These are runtime
48
+ observations, not enforcement boundaries. `deadlineAt` is immutable within one occurrence and bounds how long a
49
+ non-terminal start can be rendered as live; after it, the truthful state is incomplete.
29
50
 
30
- A lifecycle `running` event may include `herdrPaneId` and `herdrAgentName` for navigation. These are runtime observations, not enforcement boundaries. `deadlineAt` is immutable within one occurrence and bounds how long a non-terminal start can be rendered as live; after it, the truthful state is incomplete.
31
-
32
- All timestamp fields share one schema/runtime profile: JSON Schema `date-time` with seconds restricted to `00`–`59`. Leap-second strings are excluded because JavaScript deadline and duration arithmetic cannot represent them.
51
+ All timestamp fields share one schema/runtime profile: JSON Schema `date-time` with seconds restricted to `00`–`59`.
52
+ Leap-second strings are excluded because JavaScript deadline and duration arithmetic cannot represent them.
33
53
 
34
54
  ## Privacy and provenance
35
55
 
36
- The privacy boundary is unchanged: no task text, prompts, tool arguments, child output, or tool results. Fields displayed as identities and every capability use explicit ASCII identifier grammars in both schema and runtime; public builders assert that their serialized event passes the same exact reader. Correlation display fields use the identifier grammar rather than free-form prose, and a top-level null `assurance_scope` is omitted/rejected consistently. Trusted task/definition digests remain outside `correlation`. Correlation is caller-declared join metadata and never becomes proof that a workflow transition was validated or that an inline skill executed.
37
-
38
- ## Note 2026-09-21 — this directory was `contracts/ledger/v3`
39
-
40
- Since ADR-0076 PR 3d every ledger line is a **record envelope** (`record.schema.json`: format, sequence, previous-line
41
- hash, writer timestamp, kind, id, body, digest). What this README calls a v3 event is now the **body** of a record of
42
- kind `capability`, `lifecycle`, `lease`, `check` or `fact`; the event fields are unchanged and
43
- `governance-event.schema.json` is the same schema under its new name. Ledger v2 is archived under
44
- `docs/archive/contracts/ledger/v2` and no longer read; a pre-format ledger is imported once at session start.
56
+ Governance bodies contain no raw task text, prompts, tool arguments, child output, or tool results. Task and
57
+ definition digests identify content without reproducing it; a digest is an identifier, not anonymisation. Correlation
58
+ metadata is caller-declared join data and never authority. The separate local activity timeline may retain private
59
+ prompt and final content according to `PI_DADDY_ACTIVITY_CONTENT`; it is not part of this governance contract.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-daddy",
3
- "version": "0.43.0",
3
+ "version": "0.43.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",