feat(sessions): allow global-extension providers, require Pi 0.81

Relaxes the provider policy from 'global config only' to 'global sources':
providers registered by agent-dir (global) extensions are learned once at
daemon startup and allowed on the shared runtime; project-extension
registrations are still rejected with a session warning. Global extensions
load identically for every session, so their providers are daemon-consistent
and cannot leak project state (#76).

- Shim now allows allowlisted ids through and also covers Pi 0.81's native
  provider path (registerNativeProvider), closing a bypass.
- Startup learning step loads only global extensions against a scratch cwd
  and diffs the runtime's registered provider ids.
- Bumps @earendil-works/* dev/peer ranges to >=0.81.1 <0.82; adapts to the
  Agent.streamFn -> streamFunction rename.
- Docs, changeset, unit and acceptance tests updated (global-extension allow
  path, late re-registration a la pi-tensorx, native provider rule).
This commit is contained in:
Federico Jaramillo Martinez
2026-07-22 17:13:57 +02:00
parent 242911331a
commit c2bf595999
12 changed files with 360 additions and 197 deletions
+6 -5
View File
@@ -163,11 +163,12 @@
PI WEB browser plugins. A routine session daemon restart is not required.
</p>
<p>
One exception applies to Pi package extensions: PI WEB supports only globally configured providers
(Pi built-ins, environment credentials, and the agent directory's <code>models.json</code>). If an
extension calls <code>pi.registerProvider</code>, PI WEB ignores the registration and warns in the
session; everything else the extension registers keeps working. Configure such providers globally in
the agent directory's <code>models.json</code> instead.
One exception applies to Pi package extensions: PI WEB providers come from global sources only
(Pi built-ins, environment credentials, the agent directory's <code>models.json</code>, and providers
registered by globally installed, agent-dir extensions). If a project extension calls
<code>pi.registerProvider</code>, PI WEB ignores the registration and warns in the session; everything
else the extension registers keeps working. Move such a provider to a global source: declare it in
the agent directory's <code>models.json</code>, or install the extension globally.
</p>
</section>