@cotal-ai/delivery 0.49.0 → 0.50.0
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/dist/delivery.d.ts +24 -0
- package/dist/delivery.d.ts.map +1 -1
- package/dist/delivery.js +655 -29
- package/dist/delivery.js.map +1 -1
- package/dist/watchdog.d.ts +313 -0
- package/dist/watchdog.d.ts.map +1 -0
- package/dist/watchdog.js +374 -0
- package/dist/watchdog.js.map +1 -0
- package/package.json +3 -3
package/dist/delivery.d.ts
CHANGED
|
@@ -68,6 +68,30 @@ export declare function assertUninjectedCredsSharesCwdRoot(opts: {
|
|
|
68
68
|
credsPath: string;
|
|
69
69
|
cwdRoot?: string;
|
|
70
70
|
}): void;
|
|
71
|
+
/**
|
|
72
|
+
* RECORD THIS PROCESS as the space's delivery daemon, and un-record it on a clean exit (#1528).
|
|
73
|
+
*
|
|
74
|
+
* The daemon writes its OWN record because it is the only participant that always knows it is
|
|
75
|
+
* running. Until now `delivery.<space>.pid` was written ONLY by the CLI launcher
|
|
76
|
+
* (`startDeliveryDetached`), so every other route to a live daemon — a container entrypoint,
|
|
77
|
+
* systemd, an operator typing `cotal deliver --space …`, a hosted composition calling
|
|
78
|
+
* {@link runDelivery} — left whatever was on disk untouched and readers believed it. A record naming
|
|
79
|
+
* a pid that died days ago does not merely under-report: `down`'s `mayBeRunning` guard exists to
|
|
80
|
+
* fail CLOSED so `cotal down nats` cannot pull the broker out from under a live dependant, and a
|
|
81
|
+
* stale record supplies exactly the proof-of-death that guard requires.
|
|
82
|
+
*
|
|
83
|
+
* The launcher's shape is followed rather than re-invented: the CANONICAL path (never a pre-upgrade
|
|
84
|
+
* name), a provably dead pre-upgrade record reclaimed first so an upgraded root never holds both
|
|
85
|
+
* spellings, then the #969 identity pin beside it. The pin goes with the record on the way out.
|
|
86
|
+
*
|
|
87
|
+
* The removal is pid-CHECKED, like the manager's: a daemon that exits must not delete a record that
|
|
88
|
+
* already belongs to its successor (a fast restart writes the new pid before the old process has
|
|
89
|
+
* finished unwinding), so the record goes only while it still names this process.
|
|
90
|
+
*
|
|
91
|
+
* A root with no `.cotal/` is not a workstation and gets no record — a hosted composition has none,
|
|
92
|
+
* and creating one here would plant a stray workspace root wherever the daemon happened to run.
|
|
93
|
+
*/
|
|
94
|
+
export declare function recordDeliveryPid(root: string, space: string): () => void;
|
|
71
95
|
/**
|
|
72
96
|
* Run the delivery daemon: the server-side Plane-3 durable backstop. A thin composition root that
|
|
73
97
|
* builds a scoped `delivery` endpoint, acquires the single-flight lease, and runs the existing
|
package/dist/delivery.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"delivery.d.ts","sourceRoot":"","sources":["../src/delivery.ts"],"names":[],"mappings":"AAEA,OAAO,EAkBL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,mBAAmB,EAEzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAuE,gBAAgB,EAAiK,MAAM,qBAAqB,CAAC;AAOhT;;;;wFAIwF;AACxF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;AAEjD,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAE,CAAC;AAExH;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,WAAW,CAAA;CAAE,GACxE,mBAAmB,CAWrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gCAAgC,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