You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7e7d4d4
Browse filesBrowse the repository at this point in the historyBrowse files
Kept apart from the feature commit so it can be dropped or re-numbered on its own.
pi-agent-core-lc, pi-agent-harness-lc and pi-agent-cli-lc go from 0.4.0 to 0.5.0, with the
exact pins between them. pi-web-access-py, pi-goal-x-py and pi-dynamic-workflows-py now
require pi-agent-core-lc>=0.5.0 (pi-dynamic-workflows-py also pi-agent-harness-lc>=0.5.0):
they use APIs 0.4.0 does not have (ExtensionAPI.home, pi_agent_core.home,
HarnessBridge.tool_call_gate and trigger_message, ToolAnnotations).
test_extension_packaging.py requires the floor to equal the workspace version, so it
would have failed on the version bump alone.
The three extension packages go from 0.1.0 to 0.2.0 as well: the release workflow
publishes with skip-existing, so an unchanged version would have left whatever 0.1.0 is
already on PyPI in place instead of this code.
CHANGELOG: the Unreleased entries become [0.5.0] - 2026-10-02 (with a fresh empty
Unreleased and the release link). Phase 7 spec and audit tracker updated.
No tag, no publish, no push. Checked: all six packages build with `uv build` (wheel
metadata has the expected versions and pins); the editable install in .venv resolves;
full suites unchanged (Windows 1980 passed / 10 skipped, WSL 1975 / 15); ruff 0.15.20 and
0.16.0 clean.
Not changed: _AGENT_INFO in pi_agent_cli/agent.py still reports version 0.1.0 to ACP
clients, as it has since before 0.4.0.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [0.5.0] - 2026-10-02
11
+
10
12
### Added
11
13
12
14
- **An ACP client is asked before a project's own resources are used, and the answer is tied to the files (Phase 7)**: trust used to be a path in `agent.toml` and nothing else, so a project that shipped extensions, `.pi/SYSTEM.md`, `.pi/APPEND_SYSTEM.md` or project-relative skills was quietly ignored until the user edited a file by hand, and once listed it stayed trusted whatever later arrived in the directory (a `git pull` could add an extension that then ran). Now, when a project ships any of those and nothing the project cannot write has decided already (`trusted_projects`, `default_project_trust = "always"` or the older `trust_project_extensions`, `--trust-project-extensions` / `PI_TRUST_PROJECT_EXTENSIONS`), the ACP agent asks. It first says, in an ordinary agent message, which directory and files are involved and what each does (the TUI shows a permission request's title and options only, not its `content`; the names in the message are the repository's to choose, so control characters are written as escapes and names sit in code spans, and a message that cannot be delivered means nothing is asked), then sends `session/request_permission` with `Don't trust` (`reject_once`, listed first) and `Trust and remember` (`allow_always`). There is deliberately no `allow_once` option: clients may answer tool permissions for the user (ACP allows it; the TUI's YOLO mode picks the first `allow_once`), and whether to run a repository's code is not that decision, so with no such option the question reaches a person. Only the exact id of the trust option, selected, is a yes; a cancel, an unknown id or a failing client leaves the project untrusted, and a refusal is not remembered. It asks whatever the `permission` mode is (asking is not trusting). The request goes out after the `session/new` (`load`, `resume`) response, because clients drop requests for sessions they have not registered; until it is answered nothing of the project loads (extensions stay unimported) and the session's first prompt waits (`session/cancel` ends every prompt waiting at that moment, and closing the session ends them too); sessions opened together in one directory are asked one after the other, and a yes answers them all (a refusal is not remembered, so the next one asks again). The answer is saved in `~/.pi-python/agent/trust.json` (version 1; one record per exact directory with a `sha256:` fingerprint of the gated files' contents, the time and what was trusted; written atomically; read fail-closed; a corrupt file is kept as `trust.json.corrupt` instead of being overwritten; delete a project's entry to take the trust back). The fingerprint covers contents, not mtimes (the extensions directory recursively, the two prompt files, the project-relative skills paths; `__pycache__` and `.git` skipped), so a `git pull` that changes one of them asks again and says the files changed since they were trusted; files edited while the dialog is open are not trusted (the disk is checked again after the answer); and if the answer cannot be saved the session is still trusted and the user is told they will be asked again. A project with more than 2000 entries, more than 64 MiB, or unreadable files cannot be fingerprinted, so it is not asked about: list it under `trusted_projects`. New setting `[extensions] default_project_trust = "ask" | "never" | "always"` (upstream pi's `defaultProjectTrust`; default `ask`): `never` neither asks nor trusts (an allow-list entry, the command line or a saved answer still do); `always` trusts every project; the older `trust_project_extensions = true` means `always` unless `default_project_trust` is set. Headless (`-p`) runs never ask, as in upstream's non-interactive modes, but honour a saved answer whose files still match, and their "skipped" notice now says why (not decided, changed since trusted, `never`, too many files). **Behaviour change**: an ACP session in a project that ships such files used to skip them without a word and now asks; set `default_project_trust = "never"` to keep the old behaviour. **Not covered**: a client may auto-approve the request (nothing in ACP prevents that, and the TUI pre-highlights the kind of answer the user confirmed last, so after an "always" answer `Trust and remember` is the highlighted row); files changed after the session started are not re-checked; there is no `/trust` command. New modules `trust_store`, `trust_fingerprint`, `trust_prompt` and `extension_trust.decide_project_trust` / `ProjectTrust` in `pi_agent_cli`; `AgentHarness.set_trust_project_extensions(bool)` (valid until extensions load); `pi_agent_core.extensions.loader.extension_module_names`. Design: Phase 7 spec, section 4.4.
@@ -48,7 +50,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
48
50
49
51
- **`agent(..., cwd=)` is limited to the project (Phase 7)**: a workflow script could point a sub-agent at any directory; the permission prompt showed it, nothing stopped it. The directory must now be inside the project (`WorkflowRuntime.cwd`): a relative path is read against the project, not the process's current directory; symbolic links and Windows junctions are followed before the comparison; a path outside is a `ValueError` the script can catch, a non-string a `TypeError`, and a NUL character a `ValueError`. The check comes before an agent slot is taken and before the journal is consulted (a resume cannot get around a policy that is tighter than the first run's), the journal hash still holds the `cwd` the script gave, and `HarnessSubagentExecutor` checks again before it creates a worktree, so a caller that uses the executor on its own is covered too. **Migration**: a script that used `cwd` to leave the project has to be rewritten. A worktree-isolated sub-agent (`isolation=True`) still runs at the worktree's root, whatever subdirectory was asked for. Design: `docs/specs/2026-10-01-workflow-sandbox-design.md`, section 8.1.
50
52
-**Bridge and lifecycle API (Phase 7)**: `HarnessBridge` gains `trigger_message`; it is a runtime-checkable protocol, so a custom bridge (a test double, say) must add the method to keep passing `isinstance` checks. `AgentHarness` gains `closed`; `close()` is idempotent. `WorkflowManager` gains `close(timeout=5)`, which the extension registers instead of `shutdown()` (still there, no longer used at session end), and `start_background()` raises `RuntimeError` once it is closed. `Journal.truncate_from` is removed and `Journal.try_replay` no longer changes the journal on a miss; `WorktreeManager.collect_diff()` returns `bytes` (it returned `str`).
51
-
-**Extension packages declare what they use (Phase 7)**: `pi-web-access-py`, `pi-goal-x-py` and `pi-dynamic-workflows-py` required `pi-agent-core-lc>=0.3.0`, which has no `pi_agent_core.extensions`; the floor is now the core version they ship with (`>=0.4.0`), and `pi-dynamic-workflows-py` also declares `pi-agent-harness-lc` (its sub-agents import `pi_agent_harness`; a plain `pip install` used to leave the workflow tool unable to run). `pi_agent_core/tests/test_extension_packaging.py` checks that every workspace distribution an extension imports is declared, that the floor equals the checkout's version, and that `[tool.uv.sources]` points at the workspace. **Release note**: bumping the core version now fails that test until the three extension floors are raised with it, which is intended: this release's extensions use APIs newer than 0.4.0 (`ExtensionAPI.home`, `pi_agent_core.home`, `HarnessBridge.tool_call_gate`, `HarnessBridge.trigger_message`) and must not be installed against an older core.
53
+
- **Extension packages declare what they use (Phase 7)**: `pi-web-access-py`, `pi-goal-x-py` and `pi-dynamic-workflows-py` required `pi-agent-core-lc>=0.3.0`, which has no `pi_agent_core.extensions`; the floor is now the core version they ship with (`>=0.5.0`), and `pi-dynamic-workflows-py` also declares `pi-agent-harness-lc` (its sub-agents import `pi_agent_harness`; a plain `pip install` used to leave the workflow tool unable to run). `pi_agent_core/tests/test_extension_packaging.py` checks that every workspace distribution an extension imports is declared, that the floor equals the checkout's version, and that `[tool.uv.sources]` points at the workspace. **Release note**: this release's extensions use APIs newer than 0.4.0 (`ExtensionAPI.home`, `pi_agent_core.home`, `HarnessBridge.tool_call_gate`, `HarnessBridge.trigger_message`, `ToolAnnotations`) and must not be installed against an older core, so the core, `pi-agent-harness-lc` and `pi-agent-cli-lc` are now 0.5.0 and the three floors `>=0.5.0`; raising the core version fails the packaging test until the floors follow, which is intended. The three extension packages themselves go from 0.1.0 to 0.2.0: the publish step skips versions that already exist on PyPI, so unchanged numbers would have kept any 0.1.0 already published (with the old floor and without these changes) in place.
52
54
-`resolve_tier(tier, tiers=None, *, provider=None)`: built-in tier defaults are now per parent provider (`DEFAULT_MODEL_TIERS_BY_PROVIDER`, currently `anthropic` only; `DEFAULT_MODEL_TIERS` is removed). With any other parent provider a `tier` inherits the parent model. An explicit `tiers` mapping still wins and may name any provider.
53
55
-`make_get_api_key(config)` returns the key only for `config.provider`; other providers get `None`, so their SDK reads its own standard variable (for example `ANTHROPIC_API_KEY`). Export that variable when a workflow routes sub-agents to another provider.
54
56
- Sub-agent models keep the parent's `base_url` only when they stay on the parent's provider.
@@ -136,6 +138,7 @@ Initial public release.
136
138
-**Compaction & tree navigation (H3)**: token-based compaction with branch summaries, `navigate_tree` for branch exploration.
137
139
-**Skills, templates & env (H4)**: skill discovery, prompt templates, system prompt injection, `LocalExecutionEnv` for sandboxed execution.
0 commit comments