pi-fabric 0.103.0 → 0.103.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/README.md CHANGED
@@ -76,13 +76,15 @@ Pi's native MCP can optionally supply selected servers beneath the same Fabric A
76
76
 
77
77
  ## Install
78
78
 
79
- Requires Node.js 24+ and Pi 0.99.0+. Monty's optional native package installs on supported platforms; only the explicit CPython escape hatch requires CPython 3.10+. Fabric warns when a detectable host is older than the required native loadout and nested-execution contracts.
79
+ Requires Node.js 24+ and Pi 1.0.0+. Monty's optional native package installs on supported platforms; only the explicit CPython escape hatch requires CPython 3.10+. Fabric warns when a detectable host is older than the required native loadout and nested-execution contracts.
80
+
81
+ **0.103.1: Pi 1.0 compatibility.** Full-code and Schema enforce loadouts own declarations through native `prepareLoadout`, including built-in codemode, tool search, MCP, late activation, and reload. Captured dispatch and core overrides retain native middleware; capture patches restore on the final shutdown lease without recursive wrapping. Run `bun run test:pi1` for public-contract, compiled SDK, and bundled-CLI regressions. Optional/audit mode retains the host loadout.
80
82
 
81
83
  **0.103.0: daemon primitives.** Headless, restart-safe sessions get small composable building blocks: a [runner contract](docs/agents.md#custom-runners) with hosted runs that persist a locator before start and never relaunch (`pi-fabric/runners`); durable [decisions](docs/decisions.md) with escalation chains, headless approvals, and routed child dialogs; mesh timers, scoped external grants, and the `pi-fabric` CLI; [saved programs](docs/programs.md) with host-invoked runs; host-issued principal and scope (`pi-fabric/scope`) that children only narrow; write confinement, context-inheriting spawn, and worktree results; provider participants, a foreground-tool policy, compaction pressure and carry-forward focus, [thinking control](docs/thinking.md), heartbeat liveness across PID namespaces, and incarnation-fenced control commands. New behavior is opt-in or additive. A configured `agents.runner` id that no extension registers is kept and warned about once per session, without falling back to `pi`.
82
84
 
83
85
  **0.102.0: opt-in Pi-owned MCP.** Select native servers with `mcp.nativeServers` while keeping Fabric's API, policy pipeline, names/descriptions, and result normalization. Existing defaults remain unchanged. Native identities are indexed by registration snapshot, with live exposure and schema checks; SDK reload and settings-save guards are included.
84
86
 
85
- **0.101.1: Pi 0.99 compatibility.** Full-code and Schema enforce modes declare only `fabric_exec`, including with native codemode, tool search, MCP, late registrations, and active-tool changes. Captured tools remain available as `extensions.<name>(...)` inside Fabric, with host middleware applied. Pi packages and TypeBox are host-supplied peers, never bundled. Run `bun run test:pi99` for the offline compiled-extension SDK and bundled-CLI regression. The same compiled package also passes an isolated Pi 0.99.1 SDK/CLI gate; development pins remain 0.99.0.
87
+ **0.101.1: Pi 0.99 compatibility.** Full-code and Schema enforce modes declare only `fabric_exec`, including with native codemode, tool search, MCP, late registrations, and active-tool changes. Captured tools remain available as `extensions.<name>(...)` inside Fabric, with host middleware applied. Pi packages and TypeBox are host-supplied peers, never bundled. The same compiled package also passes an isolated Pi 0.99.1 SDK/CLI gate; development pins at that release were 0.99.0.
86
88
 
87
89
  ```bash
88
90
  pi install npm:pi-fabric
@@ -1 +1 @@
1
- {"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../../src/capture/interceptor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAQnD,MAAM,WAAW,+BAA+B;IAC9C,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACjD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IAUxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAyBD,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AAaF,eAAO,MAAM,iCAAiC,GAC5C,WAAW,MAAM,KAChB,OAAO,CAAC,0BAA0B,EAAE,CAuBtC,CAAC;AAyHF,eAAO,MAAM,4BAA4B,GACvC,SAAS,4BAA4B,KACpC,OAAO,CAAC,+BAA+B,CAuCzC,CAAC"}
1
+ {"version":3,"file":"interceptor.d.ts","sourceRoot":"","sources":["../../src/capture/interceptor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAyB,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AASnD,MAAM,WAAW,+BAA+B;IAC9C,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACjD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,gBAAgB,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;IAChD,OAAO,EAAE,mBAAmB,CAAC;IAC7B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IAUxC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAyBD,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,eAAe,CAAC;CAC5B,CAAC;AAaF,eAAO,MAAM,iCAAiC,GAC5C,WAAW,MAAM,KAChB,OAAO,CAAC,0BAA0B,EAAE,CAuBtC,CAAC;AAiIF,eAAO,MAAM,4BAA4B,GACvC,SAAS,4BAA4B,KACpC,OAAO,CAAC,+BAA+B,CA0CzC,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare const MINIMUM_PI_HOST_VERSION = "0.99.0";
1
+ export declare const MINIMUM_PI_HOST_VERSION = "1.0.0";
2
2
  export declare const compareVersions: (left: string, right: string) => number | undefined;
3
3
  export declare const detectPiHostVersion: (cliPath?: string | undefined) => string | undefined;
4
4
  export declare const piHostCompatibilityWarning: (version?: string | undefined) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"host-compatibility.d.ts","sourceRoot":"","sources":["../src/host-compatibility.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAqBhD,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAAM,GAAG,SAYtE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,UAAS,MAAM,GAAG,SAA2B,KAC5C,MAAM,GAAG,SA+BX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,UAAS,MAAM,GAAG,SAAiC,KAClD,MAAM,GAAG,SAKX,CAAC"}
1
+ {"version":3,"file":"host-compatibility.d.ts","sourceRoot":"","sources":["../src/host-compatibility.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,UAAU,CAAC;AAqB/C,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,MAAM,GAAG,SAYtE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,UAAS,MAAM,GAAG,SAA2B,KAC5C,MAAM,GAAG,SA+BX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACrC,UAAS,MAAM,GAAG,SAAiC,KAClD,MAAM,GAAG,SAKX,CAAC"}
package/dist/index.js CHANGED
@@ -643,15 +643,21 @@ var captureHub = (Runner) => {
643
643
  const hub = { listeners: /* @__PURE__ */ new Set() };
644
644
  Object.defineProperty(prototype, HUB_SYMBOL, {
645
645
  value: hub,
646
- configurable: false,
646
+ configurable: true,
647
647
  enumerable: false,
648
648
  writable: false
649
649
  });
650
- prototype.getAllRegisteredTools = function getFabricVisibleTools() {
650
+ const wrapped = function getFabricRegisteredTools() {
651
651
  let tools = original.call(this);
652
652
  for (const listener of [...hub.listeners]) tools = listener(tools, this);
653
653
  return tools;
654
654
  };
655
+ prototype.getAllRegisteredTools = wrapped;
656
+ hub.restore = () => {
657
+ if (hub.listeners.size > 0 || prototype.getAllRegisteredTools !== wrapped) return;
658
+ prototype.getAllRegisteredTools = original;
659
+ delete prototype[HUB_SYMBOL];
660
+ };
655
661
  return hub;
656
662
  };
657
663
  var PI_PACKAGE_NAME = "@earendil-works/pi-coding-agent";
@@ -759,7 +765,10 @@ var installRegisteredToolCapture = async (options) => {
759
765
  dispose() {
760
766
  if (disposed) return;
761
767
  disposed = true;
762
- for (const hub of hubs) hub.listeners.delete(listener);
768
+ for (const hub of hubs) {
769
+ hub.listeners.delete(listener);
770
+ hub.restore?.();
771
+ }
763
772
  options.catalog.clear();
764
773
  }
765
774
  };
@@ -4313,7 +4322,7 @@ var classifyToolResult = (input) => {
4313
4322
  // src/host-compatibility.ts
4314
4323
  import { existsSync as existsSync3, readFileSync as readFileSync3, realpathSync as realpathSync2 } from "node:fs";
4315
4324
  import path8 from "node:path";
4316
- var MINIMUM_PI_HOST_VERSION = "0.99.0";
4325
+ var MINIMUM_PI_HOST_VERSION = "1.0.0";
4317
4326
  var PI_HOST_PACKAGE_NAMES = /* @__PURE__ */ new Set([
4318
4327
  "@earendil-works/pi-coding-agent",
4319
4328
  "@mariozechner/pi-coding-agent"
@@ -4367,7 +4376,7 @@ var piHostCompatibilityWarning = (version = detectPiHostVersion()) => {
4367
4376
  if (!version) return void 0;
4368
4377
  const comparison = compareVersions(version, MINIMUM_PI_HOST_VERSION);
4369
4378
  if (comparison === void 0 || comparison >= 0) return void 0;
4370
- return "Pi Fabric requires Pi >= " + MINIMUM_PI_HOST_VERSION + "; detected " + version + ". Native tool loadouts and nested execution require Pi 0.99. Upgrade Pi before using Fabric.";
4379
+ return "Pi Fabric requires Pi >= " + MINIMUM_PI_HOST_VERSION + "; detected " + version + ". Native tool loadouts and nested execution require Pi 1.0. Upgrade Pi before using Fabric.";
4371
4380
  };
4372
4381
 
4373
4382
  // src/ui/controller.ts