pi-session-mcp 0.13.0 → 0.14.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/.pi-session-mcp-cli/config.js +40 -3
- package/.pi-session-mcp-cli/doctor.js +13 -4
- package/.pi-session-mcp-cli/skill-library.js +1 -1
- package/CHANGELOG.md +121 -0
- package/CONTRIBUTING.md +8 -1
- package/README.md +4 -2
- package/dist/config.d.ts +13 -1
- package/dist/config.js +40 -3
- package/dist/confined-tools.d.ts +1 -0
- package/dist/confined-tools.js +6 -2
- package/dist/doctor.d.ts +1 -1
- package/dist/doctor.js +13 -4
- package/dist/main.js +6 -2
- package/dist/model-catalog.d.ts +40 -0
- package/dist/model-catalog.js +38 -0
- package/dist/profile-probe.d.ts +28 -0
- package/dist/profile-probe.js +164 -0
- package/dist/sdk-pi-adapter.js +3 -2
- package/dist/setup-cli.d.ts +8 -2
- package/dist/setup-cli.js +36 -3
- package/dist/setup-main.js +10 -3
- package/dist/setup-probe-main.d.ts +14 -0
- package/dist/setup-probe-main.js +76 -0
- package/dist/setup-probe-result.d.ts +39 -0
- package/dist/setup-probe-result.js +62 -0
- package/dist/setup-writers-common.d.ts +78 -0
- package/dist/setup-writers-common.js +177 -0
- package/dist/setup-writers-plan.d.ts +34 -0
- package/dist/setup-writers-plan.js +105 -0
- package/dist/setup-writers-reconcile.d.ts +8 -0
- package/dist/setup-writers-reconcile.js +169 -0
- package/dist/setup-writers.d.ts +6 -30
- package/dist/setup-writers.js +18 -382
- package/dist/skill-library.js +1 -1
- package/dist/wake-hook.d.ts +11 -0
- package/dist/wake-hook.js +51 -8
- package/docs/acceptance.md +254 -1
- package/docs/adr/0009-execution-modes.md +3 -2
- package/docs/adr/0012-leased-writer-pool.md +3 -3
- package/docs/adr/0013-hardened-read-only-profiles.md +6 -4
- package/docs/adr/0014-profile-probe-and-model-catalog.md +89 -0
- package/docs/architecture.md +1 -1
- package/docs/client-setup.md +21 -15
- package/docs/doctor-design.md +2 -1
- package/docs/execution-modes.md +1 -1
- package/docs/installation.md +87 -0
- package/docs/roadmap.md +23 -5
- package/docs/session-mcp.md +5 -3
- package/docs/skills.md +42 -25
- package/docs/threat-model.md +2 -1
- package/docs/tool-contracts.md +4 -2
- package/package.json +1 -1
- package/skills/pi-session-orchestration/SKILL.md +2 -2
- package/skills/pi-session-orchestration/references/start-errors.md +1 -1
- package/skills/pi-session-profiles/SKILL.md +124 -0
package/docs/acceptance.md
CHANGED
|
@@ -112,7 +112,9 @@ env -i HOME="$DISPOSABLE_HOME" PATH="$PATH" PI_SESSION_MCP_CONFIG="$ACCEPTANCE_C
|
|
|
112
112
|
`skill_already_equivalent`, `skill_verified`, `skill_removed`,
|
|
113
113
|
`skill_installed`, `skill_verified`, `skill_removed`); the skill file exists
|
|
114
114
|
after steps 3 and 7 and is gone after steps 6 and 9; a foreign skill placed
|
|
115
|
-
in the same skill directory stays unchanged throughout.
|
|
115
|
+
in the same skill directory stays unchanged throughout. From 0.14.0 on
|
|
116
|
+
(#139), that holds for both controller skills, `pi-session-orchestration`
|
|
117
|
+
and `pi-session-profiles`, each with its own finding in that order.
|
|
116
118
|
- Steps 1 and 2 leave the client state unchanged.
|
|
117
119
|
- After step 9 the `pi-session-mcp` registration is absent, the sentinel is still
|
|
118
120
|
present, and the ownership record set is empty. The ownership directory has
|
|
@@ -2457,6 +2459,257 @@ Not established for `0.11.6`:
|
|
|
2457
2459
|
wrapper's periodic credential copy (#136);
|
|
2458
2460
|
- the VS Code wake; macOS delivery.
|
|
2459
2461
|
|
|
2462
|
+
### v0.13.0 post-release evidence
|
|
2463
|
+
|
|
2464
|
+
Recorded on 2026-10-28 for the published release `0.13.0`.
|
|
2465
|
+
|
|
2466
|
+
Tag binding: a fresh clone of the annotated tag `v0.13.0` (tag object
|
|
2467
|
+
`8c2d513ccac17916fdf7cf3fc36b3ccd454138ed`) peels to the merge commit
|
|
2468
|
+
`d1c63dac3b996952976aab4b5ad11665e7108fa3` of #171, and
|
|
2469
|
+
`git describe --tags --exact-match` reports `v0.13.0`. CI on the merge commit
|
|
2470
|
+
(run 40757781881) and on the tag (run 40759098803) passed on the first attempt.
|
|
2471
|
+
|
|
2472
|
+
- Level 1 on the tag clone after `npm ci`, from 21:01 to 21:03 UTC with
|
|
2473
|
+
Node.js `26.12.1` and npm `12.2.1`: typecheck, `build:cli`, the test run
|
|
2474
|
+
(125 files, 3936 passed, 14 skipped, with
|
|
2475
|
+
`NODE_OPTIONS=--unhandled-rejections=strict`), `build` and
|
|
2476
|
+
`git diff --check` exited with `0`, and the status stayed clean. Doctor
|
|
2477
|
+
reported `packageVersion` `0.13.0` and exited with `2` because no
|
|
2478
|
+
configuration was set (`config_missing`).
|
|
2479
|
+
- `pi-session-mcp@0.13.0` on npm: 916 files, shasum
|
|
2480
|
+
`866d0ecfa3b4e1a71462d291b1776897229f7827`, `gitHead` `4521d39` (the head of
|
|
2481
|
+
#171, whose tree equals the merge commit). `npm pack` of the tag clone gives
|
|
2482
|
+
the same shasum and file count.
|
|
2483
|
+
- Published npm package, Level 2 from a fresh prefix, 21:03 to 21:05 UTC:
|
|
2484
|
+
160 of 160 with delivery off and 228 of 228 with `--events spool`; real
|
|
2485
|
+
registrations and built files unchanged, no process left, leak check passed.
|
|
2486
|
+
Clients: Codex CLI `0.162.1` and Claude Code `2.1.312`. The install smoke on
|
|
2487
|
+
the published package reported `smoke_passed` with version `0.13.0`.
|
|
2488
|
+
- The GitHub release `v0.13.0` was published the same day.
|
|
2489
|
+
|
|
2490
|
+
Operator upgrade of the second machine (Linux) from `0.12.1` to `0.13.0` on
|
|
2491
|
+
2026-10-28 from 20:34 UTC, following
|
|
2492
|
+
[Installation](installation.md#container-writers), with Node.js `24.22.0`:
|
|
2493
|
+
|
|
2494
|
+
- Both client targets were removed with `0.12.1`, then
|
|
2495
|
+
`npm install -g pi-session-mcp@0.13.0`.
|
|
2496
|
+
- Four container repositories with 14 writers were migrated by repeating their
|
|
2497
|
+
provisioning commands with unchanged settings and `--apply`: 2, 4, 4
|
|
2498
|
+
(operator image, `--cache go`) and 4 (operator image) writers. Every writer
|
|
2499
|
+
reported `writer_accepted`.
|
|
2500
|
+
- `--apply` and `--verify` of both client targets passed (`mcp_verified`), the
|
|
2501
|
+
open point of the pre-release record, and `--writer <name> --verify` passed
|
|
2502
|
+
for all 14 writers. Doctor reported no error.
|
|
2503
|
+
|
|
2504
|
+
Operator upgrade of the workstation from `0.12.1` to `0.13.0` on 2026-10-28
|
|
2505
|
+
from 20:47 UTC, with the same steps: no writer container ran at the start;
|
|
2506
|
+
five container repositories with 18 writers (2, 4, 4 with `--cache go`, 4 with
|
|
2507
|
+
base `dev`, 4 with `--cache uv`, three of them with operator images) reported
|
|
2508
|
+
`writer_accepted`; client-target `--apply` and `--verify` passed for
|
|
2509
|
+
`claude-code:user` and `codex:user` (`mcp_verified`, `skill_verified`, and
|
|
2510
|
+
`hook_verified` for the wake hook); `--writer <name> --verify` passed for all
|
|
2511
|
+
18 writers. Doctor reported no error.
|
|
2512
|
+
|
|
2513
|
+
Live check of `shell: "sandboxed"` on both machines, the open point of the
|
|
2514
|
+
pre-release record. Two read-only profiles were added to each configuration,
|
|
2515
|
+
copies of the existing review profiles with `"shell": "sandboxed"`, one per
|
|
2516
|
+
provider family. Doctor reported `sandbox_unavailable` and
|
|
2517
|
+
`workspace_git_unavailable` as `ok`. A stdio driver against the installed
|
|
2518
|
+
server started one session per profile on the pi-session-mcp workspace (a plain
|
|
2519
|
+
checkout, not a linked worktree) and sent one prompt with five steps. All four
|
|
2520
|
+
sessions completed with the same results:
|
|
2521
|
+
|
|
2522
|
+
- `git log -1 --format=%h` through `bash` printed the checkout's head commit.
|
|
2523
|
+
- `touch sandbox-probe.txt && ls sandbox-probe.txt` succeeded in the sandbox;
|
|
2524
|
+
afterwards the file did not exist on the host and `git status` of the host
|
|
2525
|
+
checkout was clean.
|
|
2526
|
+
- `getent hosts example.com || echo NO_NETWORK` printed `NO_NETWORK`.
|
|
2527
|
+
- `echo HOME=$HOME` printed `HOME=/tmp/home`.
|
|
2528
|
+
- `read` of `/etc/hostname` returned `Path is outside the allowed read roots`.
|
|
2529
|
+
|
|
2530
|
+
Finding from these checks: the first workstation edit left out the required
|
|
2531
|
+
profile field `default`. Doctor then reported only `config_invalid` with the
|
|
2532
|
+
generic remediation and did not name the profile or the field; parsing the file
|
|
2533
|
+
with the package's configuration schema named both. With `"default": false`
|
|
2534
|
+
added, Doctor reported no error.
|
|
2535
|
+
|
|
2536
|
+
Not established for `0.13.0`: the sandbox on a host that restricts unprivileged
|
|
2537
|
+
user namespaces; Git inside the sandbox on a linked worktree in live use (the
|
|
2538
|
+
bubblewrap-gated tests cover it); the macOS upgrade; Level 3.
|
|
2539
|
+
|
|
2540
|
+
### v0.13.1 post-release evidence
|
|
2541
|
+
|
|
2542
|
+
Recorded on 2026-10-29 for the published release `0.13.1`.
|
|
2543
|
+
|
|
2544
|
+
Tag binding: a fresh clone of the annotated tag `v0.13.1` (tag object
|
|
2545
|
+
`57c0786f1db3f732db797c8204e338ce17cf7fb2`) peels to the merge commit
|
|
2546
|
+
`c25c7687ecb66043a001c689c64e77be3cd25952` of #185, and
|
|
2547
|
+
`git describe --tags --exact-match` reports `v0.13.1`. CI on the merge commit
|
|
2548
|
+
(run 40832546742) and on the tag (run 40833087074) passed on the first attempt.
|
|
2549
|
+
|
|
2550
|
+
- Level 1 on the tag clone after `npm ci`, from 07:32 to 07:34 UTC with
|
|
2551
|
+
Node.js `26.12.1` and npm `12.2.1`: typecheck, `build:cli`, the test run
|
|
2552
|
+
(136 files, 3948 passed, 14 skipped, with
|
|
2553
|
+
`NODE_OPTIONS=--unhandled-rejections=strict`), `build` and
|
|
2554
|
+
`git diff --check` exited with `0`, and the status stayed clean. Doctor
|
|
2555
|
+
reported `packageVersion` `0.13.1` and exited with `2` because no
|
|
2556
|
+
configuration was set (`config_missing`). The manifests were unchanged
|
|
2557
|
+
afterwards.
|
|
2558
|
+
- `pi-session-mcp@0.13.1` on npm: 922 files, shasum
|
|
2559
|
+
`e2e0e2652a2cab6bf891e61bcfa14754258eb59b`, `gitHead` `c25c768` (the merge
|
|
2560
|
+
commit). It was staged and approved by the maintainer; `npm pack` of the tag
|
|
2561
|
+
clone and the dry run of the publishing clone give the same shasum and file
|
|
2562
|
+
count.
|
|
2563
|
+
- Published npm package, Level 2 from a fresh prefix, 07:34 to 07:36 UTC:
|
|
2564
|
+
160 of 160 with delivery off and 228 of 228 with `--events spool`; real
|
|
2565
|
+
registrations and built files unchanged, no process left, leak check passed.
|
|
2566
|
+
Clients: Codex CLI `0.162.1` and Claude Code `2.1.312`. The install smoke on
|
|
2567
|
+
the published package reported `smoke_passed` with version `0.13.1`.
|
|
2568
|
+
- The GitHub release `v0.13.1` was published the same day.
|
|
2569
|
+
|
|
2570
|
+
Operator upgrade of the workstation from `0.13.0` to `0.13.1` on 2026-10-29
|
|
2571
|
+
from 09:35 UTC, following
|
|
2572
|
+
[Installation](installation.md#container-writers): no writer container ran at
|
|
2573
|
+
the start; controller sessions without a coding session stayed open and need a
|
|
2574
|
+
reconnect. Both client targets were removed with `0.13.0`, then
|
|
2575
|
+
`npm install -g pi-session-mcp@0.13.1`. Doctor reported only
|
|
2576
|
+
`writer_not_ready` for the 18 writers. A dry run of each provisioning command
|
|
2577
|
+
with unchanged settings reported `mode_unchanged` and `writer_planned`; with
|
|
2578
|
+
`--apply`, five container repositories with 18 writers (2 with
|
|
2579
|
+
`--tags reachable`, 4, 4 with `--cache go`, 4 with base `dev`, 4 with
|
|
2580
|
+
`--cache uv`, three of them with operator images) reported `writer_accepted`
|
|
2581
|
+
from 09:36 to 09:39 UTC. Client-target `--apply` and `--verify` passed for
|
|
2582
|
+
`claude-code:user` and `codex:user` (`mcp_verified`, `skill_verified`, and
|
|
2583
|
+
`hook_verified` for the wake hook); `--writer <name> --verify` passed for all
|
|
2584
|
+
18 writers. Doctor reported no error, only the known `workspace_gitfile` and
|
|
2585
|
+
`workspace_mode_unset` warnings of the worktree aliases.
|
|
2586
|
+
|
|
2587
|
+
Operator upgrade of the second machine (Linux) from `0.13.0` to `0.13.1` on
|
|
2588
|
+
2026-10-29 from 09:47 UTC, with Node.js `24.22.0` and the same steps: no
|
|
2589
|
+
writer container and no server process of a client session ran at the start.
|
|
2590
|
+
Both client targets were removed with `0.13.0`, then
|
|
2591
|
+
`npm install -g pi-session-mcp@0.13.1`; Doctor reported only
|
|
2592
|
+
`writer_not_ready` for the 14 writers. The dry runs reported `mode_unchanged`
|
|
2593
|
+
and `writer_planned`; with `--apply`, four container repositories with 14
|
|
2594
|
+
writers (4, 2, 4 with an operator image and `--cache go`, 4 with an operator
|
|
2595
|
+
image) reported `writer_accepted` from 09:48 to 09:51 UTC. Client-target
|
|
2596
|
+
`--apply` and `--verify` passed for `claude-code:user` and `codex:user`
|
|
2597
|
+
(`mcp_verified`, `skill_verified`), and `--writer <name> --verify` passed for
|
|
2598
|
+
all 14 writers. Doctor reported no error, only `workspace_mode_unset` for one
|
|
2599
|
+
workspace without a mode.
|
|
2600
|
+
|
|
2601
|
+
### v0.14.0 pre-release acceptance
|
|
2602
|
+
|
|
2603
|
+
`v0.14.0` was accepted on 2026-10-29 from 17:56 to 18:01 UTC on its release
|
|
2604
|
+
candidate `6e18659`, on Linux (`x64`) with Node.js `26.12.1`, npm `12.2.1`,
|
|
2605
|
+
Codex CLI `0.162.1` and Claude Code `2.1.312`. Level 2 passed in the working
|
|
2606
|
+
tree and for the packed tarball, each with delivery off and with delivery on.
|
|
2607
|
+
Level 1 passed except `npm audit`. Later commits on the release pull request
|
|
2608
|
+
change only this record.
|
|
2609
|
+
|
|
2610
|
+
The minor release ships #139 ([ADR 0014](adr/0014-profile-probe-and-model-catalog.md))
|
|
2611
|
+
and #188. The MCP tool contract is unchanged. Setup gains `--list-models` and
|
|
2612
|
+
`--probe-profile`, installs a second controller skill (`pi-session-profiles`)
|
|
2613
|
+
and so reports one more skill finding per client target; Doctor gains the
|
|
2614
|
+
check `skill_controller_selected`.
|
|
2615
|
+
|
|
2616
|
+
The first working-tree run on the earlier candidate `08fc620` failed 36 of 160
|
|
2617
|
+
checks: the Level 2 harness still expected one controller skill finding, so
|
|
2618
|
+
every step saw one finding too many. Setup itself reported the expected
|
|
2619
|
+
findings. The candidate `6e18659` teaches the harness both controller skills
|
|
2620
|
+
with the same number of checks; every result below is from that candidate.
|
|
2621
|
+
|
|
2622
|
+
- Level 1 in a clean worktree of the candidate after `npm ci`: every command
|
|
2623
|
+
exited with `0`, except `npm audit`; `git status --short` printed nothing.
|
|
2624
|
+
- The test run, with `NODE_OPTIONS=--unhandled-rejections=strict`, reported
|
|
2625
|
+
139 files, 4005 passed and 14 skipped, and no unhandled error.
|
|
2626
|
+
- `npm audit` and `npm audit --omit=dev` exited with `1` and name only the
|
|
2627
|
+
known `undici` 8.10.2 finding through `@earendil-works/pi-coding-agent`
|
|
2628
|
+
1.4.0, the latest SDK release, with eight advisories
|
|
2629
|
+
([#120](https://github.com/plagor44-ux/pi-session-mcp/issues/120)).
|
|
2630
|
+
- `npm pack` listed 932 files (tarball shasum
|
|
2631
|
+
`4eb9b77c9484292a8533c6be0fda44ac18656787`, identical in three packs). A
|
|
2632
|
+
scan of the unpacked files for private names, hosts and the maintainer's
|
|
2633
|
+
home path found none.
|
|
2634
|
+
- Doctor reported `packageVersion` `0.14.0`. It exited with `2` because no
|
|
2635
|
+
configuration was set (`config_missing`).
|
|
2636
|
+
- Level 2 in the working tree: 160 of 160 checks passed with delivery off and
|
|
2637
|
+
228 of 228 with `--events spool`.
|
|
2638
|
+
- Packed-tarball Level 2 from a fresh prefix: 160 of 160 with delivery off and
|
|
2639
|
+
228 of 228 with `--events spool`. The install smoke from another fresh prefix
|
|
2640
|
+
reported `smoke_passed` with version `0.14.0`.
|
|
2641
|
+
- In every Level 2 run the real client registrations were unchanged, no process
|
|
2642
|
+
remained, the leak check passed and the disposable directories were removed.
|
|
2643
|
+
- Podman-gated writer tests on the candidate (Podman `6.1.4`): 7 of 7 passed.
|
|
2644
|
+
- Bubblewrap-gated sandbox tests (`test/sandbox-shell.bwrap.test.ts`, bubblewrap
|
|
2645
|
+
`0.13.1`): 12 of 12 passed, none skipped.
|
|
2646
|
+
- Live checks before the candidate, on the merged #139 code: `--list-models`
|
|
2647
|
+
against a real local Pi installation reported authentication for the
|
|
2648
|
+
configured providers, the probe dry run planned two profiles, and one
|
|
2649
|
+
`--probe-profile <alias> --apply` returned `probe_passed` with one provider
|
|
2650
|
+
turn.
|
|
2651
|
+
- Review: #139 had three cross-family reviews (author family OpenAI and
|
|
2652
|
+
Anthropic, reviewer family GLM) and #188 one, each without blocking findings;
|
|
2653
|
+
their findings were fixed or declined with a reason in #187 and #189. The
|
|
2654
|
+
harness fix in this release was checked by its live run above.
|
|
2655
|
+
|
|
2656
|
+
Not established for `0.14.0`: an agent-driven profile change end to end with
|
|
2657
|
+
the `pi-session-profiles` skill, a container writer acceptance of a newly
|
|
2658
|
+
created profile, client-target `--verify` through the installed package, which
|
|
2659
|
+
follows the upgrade; Level 3.
|
|
2660
|
+
|
|
2661
|
+
### v0.13.1 pre-release acceptance
|
|
2662
|
+
|
|
2663
|
+
`v0.13.1` was accepted on 2026-10-29 from 06:40 to 06:48 UTC on its release
|
|
2664
|
+
candidate `89a366e`, on Linux (`x64`) with Node.js `26.12.1`, npm `12.2.1`,
|
|
2665
|
+
Codex CLI `0.162.1` and Claude Code `2.1.312`. Level 2 passed in the working
|
|
2666
|
+
tree and for the packed tarball, each with delivery off and with delivery on.
|
|
2667
|
+
Level 1 passed except `npm audit`. After the candidate, one lockfile-only
|
|
2668
|
+
commit moved the development-path `@hono/node-server` 2.1.1 → 2.1.5; Level 1
|
|
2669
|
+
was run again on it after `npm ci` (same counts). The packed package and the
|
|
2670
|
+
working-tree build that Level 2 used do not contain that package. Later commits
|
|
2671
|
+
on the release pull request change only this record.
|
|
2672
|
+
|
|
2673
|
+
The patch release ships #173, #176, #177, #179 and #180 under an unchanged MCP
|
|
2674
|
+
contract. The setup report schema is unchanged; a broken kept writer now
|
|
2675
|
+
reports its own code on its target instead of `writer_reconcile_failed`.
|
|
2676
|
+
|
|
2677
|
+
- Level 1 in a clean worktree of the candidate after `npm ci`: every command
|
|
2678
|
+
exited with `0`, except `npm audit`; `git status --short` printed nothing.
|
|
2679
|
+
- The test run, with `NODE_OPTIONS=--unhandled-rejections=strict`, reported
|
|
2680
|
+
136 files, 3948 passed and 14 skipped, and no unhandled error.
|
|
2681
|
+
- `npm audit --omit=dev` exited with `1` and names only the known `undici`
|
|
2682
|
+
finding through `@earendil-works/pi-coding-agent` 1.4.0, now with eight
|
|
2683
|
+
advisories ([#120](https://github.com/plagor44-ux/pi-session-mcp/issues/120)).
|
|
2684
|
+
`npm audit` also named `@hono/node-server` 2.1.1 in the development path
|
|
2685
|
+
(GHSA-rmxm-3fg6-px4f), patched in the lockfile afterwards as above.
|
|
2686
|
+
- `npm pack` listed 922 files (tarball shasum
|
|
2687
|
+
`93f9c5bc9e268af7e0be5e395d97558ec801668a`, identical in two packs). A scan
|
|
2688
|
+
of the packed files for private names, hosts and paths found none; its only
|
|
2689
|
+
matches for `/home/` are the already redacted paths in this file and in the
|
|
2690
|
+
six `docs/evaluation/extension-functions-2026-10-17/cursor/` evidence files
|
|
2691
|
+
that earlier releases shipped unchanged.
|
|
2692
|
+
- Doctor reported `packageVersion` `0.13.1`. It exited with `2` because no
|
|
2693
|
+
configuration was set (`config_missing`).
|
|
2694
|
+
- Level 2 in the working tree: 160 of 160 checks passed with delivery off and
|
|
2695
|
+
228 of 228 with `--events spool`.
|
|
2696
|
+
- Packed-tarball Level 2 from a fresh prefix: 160 of 160 with delivery off and
|
|
2697
|
+
228 of 228 with `--events spool`. The install smoke from another fresh prefix
|
|
2698
|
+
reported `smoke_passed` with version `0.13.1`.
|
|
2699
|
+
- In every Level 2 run the real client registrations were unchanged, no process
|
|
2700
|
+
remained, the leak check passed and the disposable directories were removed.
|
|
2701
|
+
- Podman-gated writer tests on the candidate (Podman `6.1.4`): 7 of 7 passed.
|
|
2702
|
+
- Bubblewrap-gated sandbox tests (`test/sandbox-shell.bwrap.test.ts`, bubblewrap
|
|
2703
|
+
`0.13.1`): 12 of 12 passed, none skipped.
|
|
2704
|
+
- Review: #179, #180 and #181 had an independent review (same model family as
|
|
2705
|
+
the author) with no blocking findings; its follow-ups were fixed before the
|
|
2706
|
+
merge of #184. The final test-file split commit was checked by comparing the
|
|
2707
|
+
sorted test names before and after (464, identical).
|
|
2708
|
+
|
|
2709
|
+
Not established for `0.13.1`: a live wake-hook race, a live reconcile with a
|
|
2710
|
+
broken writer, client-target `--verify` through the installed package, which
|
|
2711
|
+
follows the upgrade; Level 3.
|
|
2712
|
+
|
|
2460
2713
|
### v0.13.0 pre-release acceptance
|
|
2461
2714
|
|
|
2462
2715
|
`v0.13.0` was accepted on 2026-10-28 from 19:30 to 19:36 UTC on its release
|
|
@@ -105,8 +105,9 @@ This decision does not itself bump the package version or authorize publication.
|
|
|
105
105
|
it passes, then require contained provider-free acceptance bound to wrapper,
|
|
106
106
|
package version, image ID, Podman version, network and cache.
|
|
107
107
|
6. **Credential lifetime.** Launcher checks every 60 seconds. Only selected
|
|
108
|
-
OAuth tokens expired or within 2 minutes of expiry
|
|
109
|
-
|
|
108
|
+
OAuth tokens expired or within 2 minutes of expiry (raised to 10 minutes
|
|
109
|
+
in [#142](https://github.com/plagor44-ux/pi-session-mcp/issues/142), see
|
|
110
|
+
[Execution modes](../execution-modes.md)) trigger host login warmup (invalid/missing expiry also triggers it); measured warmup refreshes
|
|
110
111
|
expired/almost expired tokens only. It then re-copies credentials, with
|
|
111
112
|
OAuth refresh tokens emptied. Direct verify disables refresh with
|
|
112
113
|
`PI_WRITER_NO_CREDENTIAL_REFRESH=1`, makes no session/provider request and
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ADR 0012: One registration with a leased writer pool
|
|
2
2
|
|
|
3
|
-
**Status:** Accepted (2026-10-28, maintainer decision)
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
**Status:** Accepted (2026-10-28, maintainer decision); implemented in
|
|
4
|
+
[#157](https://github.com/plagor44-ux/pi-session-mcp/issues/157) and released
|
|
5
|
+
in 0.12.0. Amends
|
|
6
6
|
[ADR 0002](0002-embedded-pi-sdk.md) (container sessions are relayed to a Pi
|
|
7
7
|
session in a writer process; host sessions stay embedded),
|
|
8
8
|
[ADR 0008](0008-coding-profile-isolation.md) (adopts its option 4 in container
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ADR 0013: Hardened read-only profiles
|
|
2
2
|
|
|
3
|
-
**Status:** Accepted (2026-10-28). Amends
|
|
3
|
+
**Status:** Accepted (2026-10-28); released in 0.13.0. Amends
|
|
4
4
|
[ADR 0006](0006-pi-extension-allowlist.md) and
|
|
5
5
|
[ADR 0010](0010-read-only-extension-tools.md). Issue #169.
|
|
6
6
|
|
|
@@ -28,9 +28,11 @@ paths inside the allowed read roots:
|
|
|
28
28
|
- the directory of each selected skill file, because the model loads skills
|
|
29
29
|
with `read` and they live outside the workspace. If that directory equals or
|
|
30
30
|
contains the operator's home directory, the configuration file's directory
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
(and, for a symlinked configuration file, its target's directory), `~/.pi`
|
|
32
|
+
or Pi's agent directory (`~/.pi/agent`, or `PI_CODING_AGENT_DIR`), only the
|
|
33
|
+
skill file itself is a root, so a catalog entry such as `./SKILL.md` next to
|
|
34
|
+
the configuration or Pi's credentials does not expose them. The real file of
|
|
35
|
+
a symlinked skill file is a root as well, so the model can read it.
|
|
34
36
|
|
|
35
37
|
The server replaces the SDK's built-in definitions with definitions built from
|
|
36
38
|
the root exports `createReadToolDefinition`, `createGrepToolDefinition`,
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# ADR 0014: Profile probe and offline model catalog
|
|
2
|
+
|
|
3
|
+
**Status:** Accepted (2026-10-29); unreleased. Issue #139.
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
|
|
7
|
+
The running MCP server reads its configuration once at startup. A controlling
|
|
8
|
+
agent cannot reconnect its own server to prove a changed execution profile.
|
|
9
|
+
Asking for a manual reconnect prevents autonomous profile setup; starting a
|
|
10
|
+
nested controller would add another agent without testing a different boundary.
|
|
11
|
+
The agent also needs an authoritative offline catalog rather than guessing
|
|
12
|
+
provider and model ids or inspecting credential files.
|
|
13
|
+
|
|
14
|
+
## Decision
|
|
15
|
+
|
|
16
|
+
### 1. Offline model catalog
|
|
17
|
+
|
|
18
|
+
`pi-session-mcp-setup --list-models` reports provider ids, model ids and only
|
|
19
|
+
whether authentication is configured. Package-root `ModelRuntime` access sits
|
|
20
|
+
behind injectable `ModelCatalog`. Creation disables model network access and
|
|
21
|
+
refresh (`allowModelNetwork: false`, `refreshOnCreate: false`); the catalog
|
|
22
|
+
uses only `getProviders`, `getModels` and `checkAuth`. `checkAuth` reads the
|
|
23
|
+
local auth configuration offline and returns only its source and kind; the
|
|
24
|
+
catalog reduces that to a boolean and bounds each lookup. `hasConfiguredAuth`
|
|
25
|
+
is not used because it reads a snapshot that only an online availability
|
|
26
|
+
refresh fills, so offline it always reports no authentication. The catalog
|
|
27
|
+
never calls `getAuth` or `getAvailable`. This is a second narrow exception
|
|
28
|
+
next to the writer wrapper's credential refresh (#142), not general permission
|
|
29
|
+
to bypass `PiSessionAdapter`.
|
|
30
|
+
|
|
31
|
+
Providers registered only by extensions are not listed; every catalog report
|
|
32
|
+
states this limitation. Invalid catalog ids are omitted, never echoed.
|
|
33
|
+
|
|
34
|
+
### 2. Opt-in profile probe
|
|
35
|
+
|
|
36
|
+
`--probe-profile review,code` runs Doctor and offline profile, provider, model
|
|
37
|
+
and authentication-presence checks. Only adding `--apply` authorizes one fixed
|
|
38
|
+
PONG turn per passing profile, sequentially, through `PiSessionAdapter`. The
|
|
39
|
+
production dependency is `SdkPiSessionAdapter`, resolving the profile as the
|
|
40
|
+
server does and protecting both the named and canonical configuration
|
|
41
|
+
directories from read-root expansion through skills.
|
|
42
|
+
|
|
43
|
+
Doctor blocks on global configuration/build/version errors and errors about
|
|
44
|
+
the requested profiles. Other errors and warnings are reported by check id
|
|
45
|
+
without blocking this request. Tests inject a fake catalog, adapter and Doctor;
|
|
46
|
+
no provider credentials are needed.
|
|
47
|
+
|
|
48
|
+
The session uses a private empty temporary directory, mode 0700, created
|
|
49
|
+
internally and removed after bounded session cleanup. This is a narrow
|
|
50
|
+
exception to the configured-workspace rule: the directory is not a workspace
|
|
51
|
+
alias and is never supplied as a tool or CLI argument. It avoids exposing a
|
|
52
|
+
real repository as the probe's working directory; it does not sandbox trusted
|
|
53
|
+
extensions or change coding profiles' existing authority.
|
|
54
|
+
|
|
55
|
+
Start, turn and cleanup deadlines are 60, 120 and 10 seconds respectively.
|
|
56
|
+
Interrupts abort and dispose the current session and skip remaining profiles.
|
|
57
|
+
The fixed prompt is not configurable, the reply text is never reported, usage
|
|
58
|
+
is `unknown`, and each finding records whether a provider turn was accepted.
|
|
59
|
+
No event spool is enabled.
|
|
60
|
+
|
|
61
|
+
### 3. Guarded, lazy CLI entry
|
|
62
|
+
|
|
63
|
+
Ordinary setup requests never import the probe entry or install its stdout
|
|
64
|
+
guard. The catalog and probe load it dynamically after the platform gate;
|
|
65
|
+
the catalog needs no configuration. Its first import installs the same stdout
|
|
66
|
+
guard as the server before SDK evaluation. Only the guard's transport writer
|
|
67
|
+
emits reports; foreign stdout, including extension `console.log`, is dropped.
|
|
68
|
+
Adapter diagnostics are structured JSON on stderr without prompts or secrets.
|
|
69
|
+
Operational exceptions produce fixed refusal codes rather than raw errors.
|
|
70
|
+
|
|
71
|
+
## Contract change and versioning
|
|
72
|
+
|
|
73
|
+
The new setup flags and report schemas are additive public CLI contract
|
|
74
|
+
changes under [ADR 0003](0003-post-mvp-maintenance.md#versioning). This decision
|
|
75
|
+
does not itself bump the version or authorize publication.
|
|
76
|
+
|
|
77
|
+
## Consequences
|
|
78
|
+
|
|
79
|
+
- Doctor and `--verify` remain provider-free. Only
|
|
80
|
+
`--probe-profile … --apply` uses a provider among setup operations.
|
|
81
|
+
- Catalog and probe run on Linux and macOS without acquiring the setup lock
|
|
82
|
+
or changing registrations or configuration.
|
|
83
|
+
- The probe proves the profile on the host using the host Pi agent directory.
|
|
84
|
+
Container acceptance remains Doctor's `container_profile_refused` check and
|
|
85
|
+
writer provisioning, not this probe.
|
|
86
|
+
- A successful probe does not reload any running controller's configuration;
|
|
87
|
+
an MCP server restart or reconnect is still required.
|
|
88
|
+
- Reports expose only sanitized findings, durations and provider-turn presence,
|
|
89
|
+
not paths, credential values, environment values, prompts or reply text.
|
package/docs/architecture.md
CHANGED
|
@@ -47,7 +47,7 @@ reconciled only when the registration still matches that binding. A changed
|
|
|
47
47
|
release fails closed and cannot silently inherit or replace another release's
|
|
48
48
|
registration.
|
|
49
49
|
|
|
50
|
-
`pi_capabilities_get` projects the validated workspace and execution-profile maps plus the immutable configuration metadata captured while loading the file. It returns aliases plus the configured permission/provider/model/thinking intent, the configured extension specs and the selected skill aliases, sorted by alias, `configuration: { fingerprint, reloadPolicy: "restart-required" }` and `events: { delivery: "spool" | "off" }`. The fingerprint is SHA-256 over the exact loaded file bytes, including formatting; it is not a current-file freshness check. The projection makes no provider, authentication, filesystem, network, server-reachability, or catalog-state probe, so it cannot assert availability.
|
|
50
|
+
`pi_capabilities_get` projects the validated workspace and execution-profile maps plus the immutable configuration metadata captured while loading the file. It returns workspace aliases with their execution `mode` (plus `writers` and `defaultBase` for container workspaces) and profile aliases with the configured permission/provider/model/thinking intent, the configured extension specs, `grantedExtensionTools`, `shell` (`none` or `sandboxed`) and the selected skill aliases, sorted by alias, `configuration: { fingerprint, reloadPolicy: "restart-required" }` and `events: { delivery: "spool" | "off" }`. The fingerprint is SHA-256 over the exact loaded file bytes, including formatting; it is not a current-file freshness check. The projection makes no provider, authentication, filesystem, network, server-reachability, or catalog-state probe, so it cannot assert availability.
|
|
51
51
|
|
|
52
52
|
## Leased container writers
|
|
53
53
|
|
package/docs/client-setup.md
CHANGED
|
@@ -53,6 +53,9 @@ npm run --silent setup -- --apply --target codex:user:pi-session-mcp
|
|
|
53
53
|
npm run --silent setup -- --verify --target codex:user:pi-session-mcp
|
|
54
54
|
npm run --silent setup -- --rollback --target codex:user:pi-session-mcp
|
|
55
55
|
npm run --silent setup -- --remove --target codex:user:pi-session-mcp
|
|
56
|
+
npm run --silent setup -- --list-models --json
|
|
57
|
+
npm run --silent setup -- --probe-profile review,code --json
|
|
58
|
+
npm run --silent setup -- --probe-profile review,code --apply --json
|
|
56
59
|
```
|
|
57
60
|
|
|
58
61
|
Setup runs the previously built `dist/setup-main.js`. The dry-run operation
|
|
@@ -109,27 +112,30 @@ inspected:
|
|
|
109
112
|
None of the failure rows changes a registration or starts the handshake, and
|
|
110
113
|
each exits with `1`.
|
|
111
114
|
|
|
112
|
-
### Controller
|
|
115
|
+
### Controller skills
|
|
113
116
|
|
|
114
|
-
Besides the registration, `--apply` installs the controller
|
|
115
|
-
`pi-session-orchestration`
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
Besides the registration, `--apply` installs the controller skills
|
|
118
|
+
`pi-session-orchestration` (delegating work to Pi workers) and
|
|
119
|
+
`pi-session-profiles` (creating, changing and retiring execution profiles) for
|
|
120
|
+
each target, each as a real copy of the effective skill: your override in the
|
|
121
|
+
skill library if you have one, else the skill shipped in the package
|
|
122
|
+
([Pi skills](skills.md)). Clients discover them without further steps.
|
|
119
123
|
|
|
120
|
-
| Target | Where the
|
|
124
|
+
| Target | Where the skills go |
|
|
121
125
|
| --- | --- |
|
|
122
|
-
| `codex:user:pi-session-mcp` | `~/.agents/skills
|
|
123
|
-
| `claude-code:user:pi-session-mcp`, `claude-code:local:pi-session-mcp` | `~/.claude/skills
|
|
124
|
-
| `claude-code:project:pi-session-mcp` | `<project>/.claude/skills
|
|
126
|
+
| `codex:user:pi-session-mcp` | `~/.agents/skills/<skill>` |
|
|
127
|
+
| `claude-code:user:pi-session-mcp`, `claude-code:local:pi-session-mcp` | `~/.claude/skills/<skill>` (one shared directory per skill) |
|
|
128
|
+
| `claude-code:project:pi-session-mcp` | `<project>/.claude/skills/<skill>`, where `<project>` is the directory in which setup runs |
|
|
125
129
|
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
`<skill>` is `pi-session-orchestration` or `pi-session-profiles`. Every result
|
|
131
|
+
therefore has one more finding per skill and target, with the same client and
|
|
132
|
+
scope and the skill name as alias:
|
|
128
133
|
|
|
129
134
|
```text
|
|
130
135
|
apply: ok
|
|
131
136
|
claude-code/user/pi-session-mcp: ok (applied)
|
|
132
137
|
claude-code/user/pi-session-orchestration: ok (skill_installed)
|
|
138
|
+
claude-code/user/pi-session-profiles: ok (skill_installed)
|
|
133
139
|
```
|
|
134
140
|
|
|
135
141
|
Skill findings per operation:
|
|
@@ -302,7 +308,7 @@ Create an unversioned JSON configuration file such as `pi-session-mcp.json`:
|
|
|
302
308
|
}
|
|
303
309
|
```
|
|
304
310
|
|
|
305
|
-
Configuration is strict. A profile has exactly `default`, `permissionProfile`, `provider`, `model`, and `thinkingLevel`, plus the optional `mcpServers`, `extensions` and `skills` described in [Installation](installation.md)
|
|
311
|
+
Configuration is strict. A profile has exactly `default`, `permissionProfile`, `provider`, `model`, and `thinkingLevel`, plus the optional `mcpServers`, `extensions`, `grantedExtensionTools`, `shell` and `skills` described in [Installation](installation.md), [Pi skills](skills.md) and [ADR 0013](adr/0013-hardened-read-only-profiles.md); aliases follow the configured alias naming rules. At least one profile and exactly one default are required, and that default must be `read-only`. `thinkingLevel` is one of `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`. An optional top-level `events` field, exactly `{ "delivery": "spool" }` or `{ "delivery": "off" }`, controls turn-event delivery for the Claude Code wake (`spool` enables it; `off`, the default when the field is absent, writes nothing); any other shape fails startup with `invalid_event_delivery`. Workspace paths resolve relative to the configuration file. Clients can select only configured aliases, never an arbitrary working directory.
|
|
306
312
|
|
|
307
313
|
Use placeholders until a locally available provider/model pair is known. Do not put keys, tokens, credential objects, headers, base URLs, or authentication paths in this file.
|
|
308
314
|
|
|
@@ -373,8 +379,8 @@ Claude Code enforces each tool's declared JSON Schema (`additionalProperties: fa
|
|
|
373
379
|
|
|
374
380
|
## Expected flow and lifecycle deadlines
|
|
375
381
|
|
|
376
|
-
1. Call `pi_capabilities_get` with `{}` and select
|
|
377
|
-
2. Call `pi_session_start` with those aliases. The server resolves the configured provider/model through its shared `ModelRuntime` (a profile with extensions gets a fresh runtime for each session), loads and validates the profile's selected skills, checks existing local Pi authentication and availability, creates with explicit model/thinking/tools, and verifies the effective SDK result.
|
|
382
|
+
1. Call `pi_capabilities_get` with `{}` and select a workspace alias and an execution-profile alias from the returned config-derived lists.
|
|
383
|
+
2. Call `pi_session_start` with those aliases (without `executionProfile` the default profile is used; `base` applies only to a coding profile on a container workspace). The server resolves the configured provider/model through its shared `ModelRuntime` (a profile with extensions gets a fresh runtime for each session), loads and validates the profile's selected skills, checks existing local Pi authentication and availability, creates with explicit model/thinking/tools, and verifies the effective SDK result.
|
|
378
384
|
3. Call `pi_session_prompt` with the returned `sessionId` and a read-only prompt. It returns after accepted preflight with a `turnId` in `running` state.
|
|
379
385
|
4. Poll `pi_turn_get` with that `sessionId` and `turnId` until `completed`, `failed`, or `aborted`, with a deadline no longer than three minutes. There is no `pi_turn_wait` tool. With event delivery active (`events.delivery` is `spool` in `pi_capabilities_get`) and the wake hook installed, a Claude Code controller waits for the wake instead and reads the turn once.
|
|
380
386
|
5. Call `pi_session_close` when the session is no longer needed.
|
package/docs/doctor-design.md
CHANGED
|
@@ -27,7 +27,8 @@ and owners are:
|
|
|
27
27
|
| `version_mismatch` | Package and lock versions differ; this is a warning and does not apply to an npm installation, which has no lockfile | `package version` |
|
|
28
28
|
| `config_missing` | `PI_SESSION_MCP_CONFIG` is not set, or the file it names is absent | `configuration` |
|
|
29
29
|
| `config_unreadable` | The supported configuration path cannot be read | `configuration` |
|
|
30
|
-
| `config_invalid` | Production `loadConfig` rejects the configuration | `configuration` |
|
|
30
|
+
| `config_invalid` | Production `loadConfig` rejects the configuration. One check per schema issue location, at most five, sorted | `configuration:<location>`, a dotted path of schema field names, aliases and array indexes such as `configuration:executionProfiles.review.default`; an unknown key that is not a schema field name, and any other key that is not a valid alias, is shown as `<key>`, because it could be a path or a secret. `configuration` when the error has no location |
|
|
31
|
+
| `skill_controller_selected` | Production `loadConfig` rejects the configuration because a `skillCatalog` value names a controller skill (`builtin:pi-session-orchestration` or `builtin:pi-session-profiles`). Reported instead of `config_invalid` for that location and blocks like it | `configuration:skillCatalog.<alias>` |
|
|
31
32
|
| `workspace_missing` | A resolved configured workspace does not exist | validated workspace alias |
|
|
32
33
|
| `workspace_not_directory` | A resolved workspace is not a directory | validated workspace alias |
|
|
33
34
|
| `workspace_unreadable` | A resolved workspace cannot be read | validated workspace alias |
|
package/docs/execution-modes.md
CHANGED
|
@@ -271,7 +271,7 @@ listed below; dynamic planned and MCP verification outcomes are listed explicitl
|
|
|
271
271
|
| `writer_unchanged` | Provisioned settings already match |
|
|
272
272
|
| `writer_settings_changed` | Existing writer settings or its rendered configuration differ from the current ones; no silent replacement, no acceptance and no registration change, and an apply is refused before the mode is written ([Isolation setup](isolation-setup.md)) |
|
|
273
273
|
| `registration_divergent` | Writer registration is foreign or differs from its ownership record; it is retained and the writer stays in legacy launch mode |
|
|
274
|
-
| `writer_reconcile_failed` | Unexpected reconciliation failure |
|
|
274
|
+
| `writer_reconcile_failed` | Unexpected reconciliation failure of shared setup state (configuration, ownership); a failure of one kept writer is reported on that writer's target with its own code, and the other writers are still reconciled |
|
|
275
275
|
| `writer_operation_failed` | Unclassified lifecycle/orchestrator failure |
|
|
276
276
|
| `hook_install_failed` | The wake hook step of a writer failed unexpectedly; other `hook_*` and `settings_*` codes are in [Client setup](client-setup.md#wake-hook) |
|
|
277
277
|
| `container_profile_unsupported` | Profile or selected skills cannot be rendered safely in boundary |
|
package/docs/installation.md
CHANGED
|
@@ -89,6 +89,89 @@ local user's existing Pi authentication and never prints it. Automated writers
|
|
|
89
89
|
keep selected provider credentials in their private boundary agent copy; see
|
|
90
90
|
[Execution modes](execution-modes.md#writer-storage-launch-and-readiness).
|
|
91
91
|
|
|
92
|
+
## Check profiles: model catalog and probe
|
|
93
|
+
|
|
94
|
+
List the providers and model ids Pi knows locally, with authentication presence
|
|
95
|
+
only (never credential values):
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
pi-session-mcp-setup --list-models
|
|
99
|
+
pi-session-mcp-setup --list-models --json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
This is offline and read-only: no provider request, credential refresh, model
|
|
103
|
+
network access or setup lock. It requires no `PI_SESSION_MCP_CONFIG`.
|
|
104
|
+
Providers registered only by Pi extensions are not listed; the report includes
|
|
105
|
+
that note. Invalid catalog ids are omitted and counted in `omittedIds`.
|
|
106
|
+
Catalog creation failures report `catalog_unavailable`.
|
|
107
|
+
|
|
108
|
+
With `PI_SESSION_MCP_CONFIG` already set to the configuration to check:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pi-session-mcp-setup --probe-profile review,code --json
|
|
112
|
+
pi-session-mcp-setup --probe-profile review,code --apply --json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The first command is a dry run: Doctor runs offline, followed by profile,
|
|
116
|
+
provider, model and authentication-presence checks. Only `--apply` sends a
|
|
117
|
+
provider turn: one fixed PONG request per profile that passes the offline
|
|
118
|
+
checks, sequentially. Duplicate aliases are checked once in request order.
|
|
119
|
+
Point the variable at a candidate configuration to check it before going live;
|
|
120
|
+
the commands do not write configuration or registrations. The running MCP
|
|
121
|
+
server still needs a restart or reconnect to read changes.
|
|
122
|
+
|
|
123
|
+
The Doctor gate blocks global configuration/build/version errors and errors
|
|
124
|
+
whose subject is a requested profile. Unrelated errors and all warnings are
|
|
125
|
+
listed by check id in `doctor.other`, without blocking. A blocked request
|
|
126
|
+
reports `doctor_failed`; missing or unusable configuration reports
|
|
127
|
+
`config_required` or `config_unusable`. Unexpected operational failures report
|
|
128
|
+
`operation_failed`, and catalog creation failures report `catalog_unavailable`.
|
|
129
|
+
No raw exception text is printed.
|
|
130
|
+
|
|
131
|
+
Each applied probe starts the normal adapter with the resolved profile in a
|
|
132
|
+
private empty temporary directory (mode 0700), not a real repository. This
|
|
133
|
+
directory is created internally, never supplied as an argument or workspace
|
|
134
|
+
alias, and removed after cleanup. Start and turn deadlines are 60 and 120
|
|
135
|
+
seconds; session cleanup is bounded to 10 seconds. Interrupts abort and dispose
|
|
136
|
+
the current session and skip the remaining profiles. Reports never include
|
|
137
|
+
paths, credential values, environment values, the prompt or reply text.
|
|
138
|
+
Foreign stdout from profiles/extensions is suppressed so JSON remains intact;
|
|
139
|
+
sanitized structured diagnostics go to stderr. No turn event spool is used.
|
|
140
|
+
|
|
141
|
+
| Code | Status | Meaning |
|
|
142
|
+
| --- | --- | --- |
|
|
143
|
+
| `probe_planned` | planned | Dry run: offline checks passed |
|
|
144
|
+
| `probe_profile_unknown` | failed | Alias not in the configuration |
|
|
145
|
+
| `probe_provider_unknown` | failed | Provider not in the catalog (offline) |
|
|
146
|
+
| `probe_model_unknown` | failed | Model not in the provider's catalog (offline) |
|
|
147
|
+
| `probe_auth_missing` | failed | Provider has no configured authentication (offline) |
|
|
148
|
+
| `probe_passed` | ok | Session started, reply was `PONG` |
|
|
149
|
+
| `probe_unexpected_reply` | failed | Turn completed with another reply |
|
|
150
|
+
| `probe_turn_failed` | failed | Turn failed or was aborted |
|
|
151
|
+
| `probe_start_failed` | failed | Session creation refused; carries the existing sanitized `PiSessionCreationErrorCode` |
|
|
152
|
+
| `probe_timeout` | failed | Start or turn deadline passed; the session was aborted and disposed |
|
|
153
|
+
|
|
154
|
+
A profile that fails an offline check is not started; the other profiles are
|
|
155
|
+
still checked. Apply findings include `durationMs`. `providerTurn` records
|
|
156
|
+
whether a provider turn was accepted, including turns that failed or timed out;
|
|
157
|
+
a `false` finding did not spend a provider turn. Provider usage and monetary
|
|
158
|
+
cost remain `unknown`.
|
|
159
|
+
|
|
160
|
+
Exit codes: `0` for a successful catalog, a clean dry run (`planned`) or an
|
|
161
|
+
apply where every profile passed; `1` for a failed check or refusal; `64` for
|
|
162
|
+
invalid usage; `130` for SIGINT and `143` for SIGTERM during a probe (both
|
|
163
|
+
report `operation_interrupted`). Both operations run on Linux and macOS and
|
|
164
|
+
need no setup lock. Probe requests cannot be combined with `--target`,
|
|
165
|
+
`--repo`, `--writer`, `--customize-skill`, `--list-models`, `--verify`,
|
|
166
|
+
`--rollback` or `--remove`. `--list-models` is standalone apart from `--json` and the default `--dry-run`.
|
|
167
|
+
Doctor and `--verify` remain provider-free.
|
|
168
|
+
|
|
169
|
+
**Container repositories:** the probe proves the profile on the host, with
|
|
170
|
+
the host's Pi agent directory. Writer acceptance stays with Doctor's
|
|
171
|
+
`container_profile_refused` check and writer provisioning; a host probe does
|
|
172
|
+
not prove a container writer. See [Execution modes](execution-modes.md) and
|
|
173
|
+
[ADR 0014](adr/0014-profile-probe-and-model-catalog.md).
|
|
174
|
+
|
|
92
175
|
## 1. Install
|
|
93
176
|
|
|
94
177
|
### From npm
|
|
@@ -701,6 +784,10 @@ choose skills.
|
|
|
701
784
|
directory, so concurrent runs cannot lose a recorded base.
|
|
702
785
|
- A `builtin:` name with no override and no shipped skill makes Doctor report
|
|
703
786
|
`skill_missing` and the session start fail with `skill_load_failed`.
|
|
787
|
+
- The controller skills `pi-session-orchestration` and `pi-session-profiles`
|
|
788
|
+
are not worker skills: a `builtin:` catalog entry for either makes the
|
|
789
|
+
configuration invalid, and Doctor reports `skill_controller_selected` for
|
|
790
|
+
`configuration:skillCatalog.<alias>`.
|
|
704
791
|
- An extension allowlist alone makes none of a package's skills available. If a
|
|
705
792
|
profile relied on them, add a catalog entry with the absolute path of the
|
|
706
793
|
package's `SKILL.md` and select it; see the migration section of [Pi
|