pi-fabric-resume 0.1.0 → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Qianhui Xu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -52,6 +52,11 @@ export default function fabricResume(_pi: ExtensionAPI): void {
52
52
  log("overlay disabled by PI_FABRIC_RESUME_PATCH");
53
53
  return;
54
54
  }
55
+ // A Fabric child process loads this extension too; it inherits the dist its parent
56
+ // already verified. Skipping keeps dispatch cheap and avoids writing dist from a
57
+ // short-lived worker (PI_FABRIC_DEPTH is set for every child of a Fabric run).
58
+ const depth = Number(process.env.PI_FABRIC_DEPTH ?? "");
59
+ if (Number.isFinite(depth) && depth >= 1) return;
55
60
  let result: ReturnType<typeof applyResumeOverlay>;
56
61
  try {
57
62
  result = applyResumeOverlay({ packageRoot: packageRoot(), npmDir: piNpmDir() });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-fabric-resume",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Resumable Fabric children without forking pi-fabric: re-installs a tested runtime overlay that gives every child its own session, so agents.resume({ id }) continues an interrupted, crashed or post-reboot run from its own transcript.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -38,5 +38,11 @@
38
38
  ],
39
39
  "peerDependencies": {
40
40
  "@earendil-works/pi-coding-agent": "*"
41
+ },
42
+ "engines": {
43
+ "node": ">=22"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
41
47
  }
42
48
  }