@nylorun/runtime 0.44.0-beta → 0.44.1-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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.44.1-beta
4
+
5
+ ### Patch Changes
6
+
7
+ - c9de8a2: A turn that waits for its pod to start on a new Agent version runs as soon as the new pod's engine connects. The start check's pass now wakes the Agent's sessions with a turn waiting, instead of leaving them to the advance's next retry, up to `tenant.unavailableRetryMs` (1 s) later. It saves up to 1 s on each person's first wake after their Agent moves to a new version.
8
+
3
9
  ## 0.44.0-beta
4
10
 
5
11
  ### Minor Changes
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Management API",
5
- "version": "0.44.0-beta",
5
+ "version": "0.44.1-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
package/dist/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.2.0",
3
3
  "info": {
4
4
  "title": "Nylorun Runtime API",
5
- "version": "0.44.0-beta",
5
+ "version": "0.44.1-beta",
6
6
  "x-nylorun-protocol": {
7
7
  "min": 16,
8
8
  "max": 18,
@@ -117,7 +117,11 @@ export declare function waitingFor(agent: Pick<Environment, "targetVersion" | "a
117
117
  export declare function idleMsOf(config: TenantSandboxConfig, agent: Environment): number;
118
118
  /**
119
119
  * The harness of pod Agent `id` joined at host epoch `epoch` (its `hello`): a start on a new
120
- * version succeeded, setup included. Clears the start check and the failed version.
120
+ * version succeeded, setup included. Clears the start check and the failed version, and wakes
121
+ * every session on the Agent with a turn waiting: an advance refuses a segment while its pod
122
+ * starts on a new version (`segment.pod.starting`) and tries again only after
123
+ * `tenant.unavailableRetryMs`, so without the wake the turn waits up to that long after its
124
+ * engine is there. The wake's dedupe key is the epoch's: one wake per session per start.
121
125
  */
122
126
  export declare function passStartCheck(ctx: TenantContext, id: string, epoch: number): Promise<void>;
123
127
  /**
@@ -334,7 +334,11 @@ export function idleMsOf(config, agent) {
334
334
  }
335
335
  /**
336
336
  * The harness of pod Agent `id` joined at host epoch `epoch` (its `hello`): a start on a new
337
- * version succeeded, setup included. Clears the start check and the failed version.
337
+ * version succeeded, setup included. Clears the start check and the failed version, and wakes
338
+ * every session on the Agent with a turn waiting: an advance refuses a segment while its pod
339
+ * starts on a new version (`segment.pod.starting`) and tries again only after
340
+ * `tenant.unavailableRetryMs`, so without the wake the turn waits up to that long after its
341
+ * engine is there. The wake's dedupe key is the epoch's: one wake per session per start.
338
342
  */
339
343
  export async function passStartCheck(ctx, id, epoch) {
340
344
  await ctx.store.tx(async (t) => {
@@ -342,6 +346,9 @@ export async function passStartCheck(ctx, id, epoch) {
342
346
  if (!agent?.startCheck || agent.pod?.hostEpoch !== epoch)
343
347
  return;
344
348
  await t.updateEnvironment(id, { startCheck: null, failedVersion: null }, new Date().toISOString());
349
+ for (const session of await t.sessionsOnEnvironment(id))
350
+ if (session.activeTurnId !== null)
351
+ await t.wake(session.id, { reason: "recover", dedupeKey: `start:${id}:${epoch}` });
345
352
  });
346
353
  }
347
354
  /**
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const RUNTIME_VERSION = "0.44.0-beta";
1
+ export declare const RUNTIME_VERSION = "0.44.1-beta";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Kept in step with package.json by runtime/server/scripts/check-package.mjs, which runs in npm run check.
2
2
  // release:prepare also rewrites this when it bumps @nylorun/runtime.
3
- export const RUNTIME_VERSION = "0.44.0-beta";
3
+ export const RUNTIME_VERSION = "0.44.1-beta";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/runtime",
3
- "version": "0.44.0-beta",
3
+ "version": "0.44.1-beta",
4
4
  "description": "Nylorun Runtime: the agent execution Host on Postgres, Restate and S2, and model providers.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",