@nylorun/core 0.43.0-beta → 0.44.0-beta
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 +10 -0
- package/dist/contracts.d.ts +6 -1
- package/dist/contracts.js +6 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.44.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 874cc83: Pods on Agent Substrate (preview): suspend before drain, following Substrate's eviction contract. A worker pod that stops (a drain, a GKE node upgrade or scale-down, a WorkerPool rollout, a deleted pod) sends each of its actors SIGTERM and gives them 30 minutes to be suspended; until now the engine exited on that signal, so the actor crashed and went back to its last suspend, losing everything since.
|
|
8
|
+
|
|
9
|
+
- `@nylorun/runtime`: on Substrate (`NYLORUN_SANDBOX_SUBSTRATE=1`, which the sandboxes service's template sets), the engine logs `harness_worker_stopping` on SIGTERM and keeps running, with its runs. The sandboxes service watches worker pods (label `ate.dev/worker-pool`) and, when one turns Terminating, suspends each of the Tenant's actors on it synchronously (eight at a time, trying again for up to 29 minutes), records `drainedAt`, and resumes a sandbox whose request is `Running` on another worker. While it moves, its status reason is `Moving`, and the pod lifecycle waits instead of failing it at the ready deadline. Each drain is recorded once, as `agent.suspended` with reason `drain` (the pod row's `drained_at`, store migration 0048, nullable, run at start). Not covered: a spot reclaim or a node that dies, which still crash and revert. An actor created by an earlier release keeps its engine (#643) until it is reset.
|
|
10
|
+
- `@nylorun/core`: `agent.suspended`'s `reason` may be `drain`.
|
|
11
|
+
- `nylorun`: `local sandbox enable --backend substrate` lets the sandboxes service read pods cluster-wide (`get`, `list`, `watch`), for the worker pods it watches.
|
|
12
|
+
|
|
3
13
|
## 0.43.0-beta
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
package/dist/contracts.d.ts
CHANGED
|
@@ -770,9 +770,14 @@ export declare const AGENT_EVENT_PAYLOADS: {
|
|
|
770
770
|
readonly "agent.running": z.ZodObject<{
|
|
771
771
|
hostEpoch: z.ZodNumber;
|
|
772
772
|
}, z.core.$loose>;
|
|
773
|
-
/**
|
|
773
|
+
/**
|
|
774
|
+
* Stopped (`POST .../stop`, or idle): the volume is kept; the next turn starts it again.
|
|
775
|
+
* `drain` (Agent Substrate): its worker stopped, so it was suspended with everything it held
|
|
776
|
+
* and resumed on another worker; nothing was lost.
|
|
777
|
+
*/
|
|
774
778
|
readonly "agent.suspended": z.ZodObject<{
|
|
775
779
|
reason: z.ZodEnum<{
|
|
780
|
+
drain: "drain";
|
|
776
781
|
idle: "idle";
|
|
777
782
|
restart: "restart";
|
|
778
783
|
stop: "stop";
|
package/dist/contracts.js
CHANGED
|
@@ -1199,8 +1199,12 @@ export const AGENT_EVENT_PAYLOADS = {
|
|
|
1199
1199
|
.passthrough(),
|
|
1200
1200
|
/** A pod joined and serves the Agent. */
|
|
1201
1201
|
"agent.running": z.object({ hostEpoch: z.number().int() }).passthrough(),
|
|
1202
|
-
/**
|
|
1203
|
-
|
|
1202
|
+
/**
|
|
1203
|
+
* Stopped (`POST .../stop`, or idle): the volume is kept; the next turn starts it again.
|
|
1204
|
+
* `drain` (Agent Substrate): its worker stopped, so it was suspended with everything it held
|
|
1205
|
+
* and resumed on another worker; nothing was lost.
|
|
1206
|
+
*/
|
|
1207
|
+
"agent.suspended": z.object({ reason: z.enum(["stop", "idle", "restart", "drain"]) }).passthrough(),
|
|
1204
1208
|
/** Its pod was replaced (same volume): the old pod's host token no longer works. */
|
|
1205
1209
|
"agent.relaunched": z.object({ hostEpoch: z.number().int() }).passthrough(),
|
|
1206
1210
|
/** Its volume or node is gone: turns are refused until a reset. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylorun/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0-beta",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Shared agent definitions and wire contracts",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"yaml": "^2.9.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^26.6.
|
|
37
|
+
"@types/node": "^26.6.6",
|
|
38
38
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
39
|
-
"vitest": "^5.0
|
|
39
|
+
"vitest": "^5.1.0"
|
|
40
40
|
},
|
|
41
41
|
"exports": {
|
|
42
42
|
".": {
|