agents-pod 0.3.4 → 0.3.5
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/CHANGELOG.md +13 -1
- package/package.json +1 -1
- package/src/extension/index.ts +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,19 @@ All notable changes to agents-pod. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [
|
|
7
|
+
## [0.3.5] — 2026-11-04
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **A reload no longer leaves the extension inert** (issue #28). `/reload`,
|
|
12
|
+
`/new`, `/resume` and `/fork` replace the whole extension runtime: Pi
|
|
13
|
+
re-imports the module in the same process and rebuilds every command and tool
|
|
14
|
+
registry from scratch, while `globalThis` — and with it the `Symbol.for` guard
|
|
15
|
+
that keeps a second installed copy inert — survives. The reloaded copy saw a
|
|
16
|
+
claimed process, returned early, and `/pod`, `spawn_pod` and `pod_handoff`
|
|
17
|
+
vanished until Pi restarted. The guard is now released on `session_shutdown`,
|
|
18
|
+
so it claims a runtime instead of a process; a second copy in one runtime is
|
|
19
|
+
still kept out (ADR 0010).
|
|
8
20
|
|
|
9
21
|
## [0.3.4] — 2026-11-04
|
|
10
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agents-pod",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Supervision for long-running coding agents: detached pods, heartbeat liveness, cron-ticked reconcile, and a Pi extension for spawning and handoff",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"type": "module",
|
package/src/extension/index.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { registerSelf } from "./self.ts";
|
|
|
12
12
|
export const POD_ID_ENV = "AGENTS_POD_POD_ID";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Set by whichever copy of this extension loads first in a
|
|
15
|
+
* Set by whichever copy of this extension loads first in a runtime. `pi
|
|
16
16
|
* install` and a project-local install can both resolve here, and pi would
|
|
17
17
|
* then load two copies that fight over the same tool and command names;
|
|
18
18
|
* `Symbol.for` is shared across module instances, so the second copy sees the
|
|
@@ -22,6 +22,20 @@ const LOADED_FLAG = Symbol.for("agents-pod.extension.loaded");
|
|
|
22
22
|
|
|
23
23
|
export default function (pi: ExtensionAPI): void {
|
|
24
24
|
const scope = globalThis as Record<symbol, boolean>;
|
|
25
|
+
|
|
26
|
+
// `/reload`, `/new`, `/resume` and `/fork` replace the whole extension
|
|
27
|
+
// runtime: pi re-imports this module in the same process (jiti runs with
|
|
28
|
+
// `moduleCache: false`) and rebuilds every extension's command and tool
|
|
29
|
+
// registry from scratch. globalThis survives that re-import while the
|
|
30
|
+
// registrations do not, so a flag left set would make the replacement copy
|
|
31
|
+
// load inert and /pod, spawn_pod and pod_handoff would vanish until the
|
|
32
|
+
// process restarts. Every runtime replacement is preceded by a
|
|
33
|
+
// `session_shutdown`, so clearing there keeps the flag meaning "claimed by
|
|
34
|
+
// this runtime" instead of "claimed by this process".
|
|
35
|
+
pi.on("session_shutdown", () => {
|
|
36
|
+
delete scope[LOADED_FLAG];
|
|
37
|
+
});
|
|
38
|
+
|
|
25
39
|
if (scope[LOADED_FLAG]) return;
|
|
26
40
|
scope[LOADED_FLAG] = true;
|
|
27
41
|
|