@nylorun/core 0.37.0-beta → 0.38.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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @nylorun/core
2
2
 
3
+ ## 0.38.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - 1d3a5c5: Queued messages no longer wait for good (Host feature `queue-recovery`). When a turn ends and its
8
+ Agent refuses to start the next one for the session's queued messages (its disk being copied, its
9
+ pod lost, the Agent deleted), the messages wait with the session's `queueStalled`, and the Tenant
10
+ sweep tries the start again (Host tuning `sweep.queueRetryMs`, 30 seconds), as does the end of the
11
+ Agent's disk copy. A message that has waited longer than the new Runtime limit `queuedStartMs`
12
+ (15 minutes) is removed with the new event `queue.failed` (`queue.start_expired`, with the
13
+ refusal's code as `reason`); a refusal no retry changes (a turn request the version no longer
14
+ resolves, another harness) fails the messages at once (`queue.start_refused`), and the messages
15
+ behind them are tried next. Before, nothing started such a queue until another message arrived.
16
+
17
+ On the A2A endpoint (profile v2), a queued task that fails is `TASK_STATE_FAILED` with a status
18
+ message saying why, in `GetTask`, its pushes and a blocking `SendMessage`. `CancelTask` on a queued
19
+ task now takes it out of the queue, whether a task runs in its context or not, and answers
20
+ `TASK_STATE_CANCELED` (the new event `queue.cancelled`), pushed; before, it was
21
+ `TaskNotCancelableError`.
22
+
3
23
  ## 0.37.0-beta
4
24
 
5
25
  ### Minor Changes
@@ -265,7 +265,17 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
265
265
  * `inputs` effect, Harness API 5.4). The answer and `message.queued` say which delivery applied;
266
266
  * a steer the turn doesn't take starts the next turn, as a queued message does.
267
267
  */
268
- "steer"];
268
+ "steer",
269
+ /**
270
+ * Queued messages never wait for good: when the Agent refuses their turn's start (its disk being
271
+ * copied, its pod lost, the Agent deleted) the start is tried again, at every Tenant sweep and
272
+ * when a disk copy ends, and past the Runtime limit `queuedStartMs` they fail (`queue.failed`);
273
+ * a start no retry can make (a turn request the version no longer resolves, another harness)
274
+ * fails at once. The A2A endpoint's `CancelTask` removes a queued task from its context's
275
+ * queue (`queue.cancelled`), and a failed or cancelled queued task answers, and pushes,
276
+ * `FAILED` or `CANCELED`.
277
+ */
278
+ "queue-recovery"];
269
279
  export type OptionalHostFeature = (typeof OPTIONAL_HOST_FEATURES)[number];
270
280
  export interface ProtocolRange {
271
281
  min: number;
@@ -288,6 +288,16 @@ export const OPTIONAL_HOST_FEATURES = [
288
288
  * a steer the turn doesn't take starts the next turn, as a queued message does.
289
289
  */
290
290
  "steer",
291
+ /**
292
+ * Queued messages never wait for good: when the Agent refuses their turn's start (its disk being
293
+ * copied, its pod lost, the Agent deleted) the start is tried again, at every Tenant sweep and
294
+ * when a disk copy ends, and past the Runtime limit `queuedStartMs` they fail (`queue.failed`);
295
+ * a start no retry can make (a turn request the version no longer resolves, another harness)
296
+ * fails at once. The A2A endpoint's `CancelTask` removes a queued task from its context's
297
+ * queue (`queue.cancelled`), and a failed or cancelled queued task answers, and pushes,
298
+ * `FAILED` or `CANCELED`.
299
+ */
300
+ "queue-recovery",
291
301
  ];
292
302
  /**
293
303
  * What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
@@ -5090,6 +5090,25 @@ export declare const QueueTakenPayloadSchema: z.ZodObject<{
5090
5090
  queuedMessageIds: z.ZodArray<z.ZodString>;
5091
5091
  step: z.ZodOptional<z.ZodNumber>;
5092
5092
  }, z.core.$loose>;
5093
+ /**
5094
+ * `queue.failed` (Host feature `queue-recovery`): queued messages no turn will take. The Agent
5095
+ * refused their turn's start for longer than the Runtime limit `queuedStartMs`, or in a way no
5096
+ * retry changes; `error.code` says which (`queue.start_expired`, `queue.start_refused`) and
5097
+ * `error.reason` is the refusal's own code. `queue.cancelled`: a client removed them (A2A
5098
+ * `CancelTask`). Neither has a turn.
5099
+ */
5100
+ export declare const QueueFailedPayloadSchema: z.ZodObject<{
5101
+ queuedMessageIds: z.ZodArray<z.ZodString>;
5102
+ error: z.ZodObject<{
5103
+ code: z.ZodString;
5104
+ message: z.ZodString;
5105
+ reason: z.ZodOptional<z.ZodString>;
5106
+ }, z.core.$loose>;
5107
+ }, z.core.$loose>;
5108
+ export declare const QueueCancelledPayloadSchema: z.ZodObject<{
5109
+ queuedMessageIds: z.ZodArray<z.ZodString>;
5110
+ reason: z.ZodOptional<z.ZodString>;
5111
+ }, z.core.$loose>;
5093
5112
  /** Lifecycle of an agent used as a tool. `agent.delegationId` is the parent call's invocation. */
5094
5113
  export declare const DelegationPayloadSchema: z.ZodObject<{
5095
5114
  agent: z.ZodObject<{
@@ -5967,6 +5986,26 @@ export declare const EVENT_CATALOG: {
5967
5986
  readonly source: "api";
5968
5987
  readonly version: 1;
5969
5988
  };
5989
+ readonly "queue.failed": {
5990
+ readonly payload: z.ZodObject<{
5991
+ queuedMessageIds: z.ZodArray<z.ZodString>;
5992
+ error: z.ZodObject<{
5993
+ code: z.ZodString;
5994
+ message: z.ZodString;
5995
+ reason: z.ZodOptional<z.ZodString>;
5996
+ }, z.core.$loose>;
5997
+ }, z.core.$loose>;
5998
+ readonly source: "api";
5999
+ readonly version: 1;
6000
+ };
6001
+ readonly "queue.cancelled": {
6002
+ readonly payload: z.ZodObject<{
6003
+ queuedMessageIds: z.ZodArray<z.ZodString>;
6004
+ reason: z.ZodOptional<z.ZodString>;
6005
+ }, z.core.$loose>;
6006
+ readonly source: "api";
6007
+ readonly version: 1;
6008
+ };
5970
6009
  readonly "wake.booked": {
5971
6010
  readonly payload: z.ZodObject<{
5972
6011
  at: z.ZodString;
@@ -6454,7 +6493,7 @@ type EventSchemaOf<T extends EventType> = z.ZodObject<typeof eventEnvelope & {
6454
6493
  /** One schema per event type, keyed by type (the OpenAPI components). */
6455
6494
  export declare const EVENT_SCHEMAS: { [T in EventType]: EventSchemaOf<T>; };
6456
6495
  /** A session event of a known type, discriminated on `type`. */
6457
- export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">[]], "type">;
6496
+ export declare const SessionEventSchema: z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.cancelled" | "queue.failed" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.cancelled" | "queue.failed" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">[]], "type">;
6458
6497
  export type SessionEvent = {
6459
6498
  [T in EventType]: z.infer<EventSchemaOf<T>>;
6460
6499
  }[EventType];
@@ -6469,7 +6508,7 @@ export type SessionEventOf<T extends EventType> = Extract<SessionEvent, {
6469
6508
  */
6470
6509
  export declare function parseSessionEvent(value: unknown): SessionEvent | LiveEvent;
6471
6510
  export declare const SessionItemsResponseSchema: z.ZodObject<{
6472
- items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">[]], "type">>;
6511
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.cancelled" | "queue.failed" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.cancelled" | "queue.failed" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">[]], "type">>;
6473
6512
  cursor: z.ZodNullable<z.ZodString>;
6474
6513
  }, z.core.$strip>;
6475
6514
  export type SessionItemsResponse = {
@@ -8560,6 +8599,7 @@ export declare const TenantLimitsConfigSchema: z.ZodObject<{
8560
8599
  memoryIndexLines: z.ZodOptional<z.ZodNumber>;
8561
8600
  memoryIndexBytes: z.ZodOptional<z.ZodNumber>;
8562
8601
  sessionQueuedMessages: z.ZodOptional<z.ZodNumber>;
8602
+ queuedStartMs: z.ZodOptional<z.ZodNumber>;
8563
8603
  flowConcurrency: z.ZodOptional<z.ZodNumber>;
8564
8604
  flowMapItems: z.ZodOptional<z.ZodNumber>;
8565
8605
  flowLoopIterations: z.ZodOptional<z.ZodNumber>;
@@ -8639,6 +8679,7 @@ export declare const PutTenantLimitsRequestSchema: z.ZodObject<{
8639
8679
  memoryIndexLines: z.ZodOptional<z.ZodNumber>;
8640
8680
  memoryIndexBytes: z.ZodOptional<z.ZodNumber>;
8641
8681
  sessionQueuedMessages: z.ZodOptional<z.ZodNumber>;
8682
+ queuedStartMs: z.ZodOptional<z.ZodNumber>;
8642
8683
  flowConcurrency: z.ZodOptional<z.ZodNumber>;
8643
8684
  flowMapItems: z.ZodOptional<z.ZodNumber>;
8644
8685
  flowLoopIterations: z.ZodOptional<z.ZodNumber>;
@@ -8719,6 +8760,7 @@ export declare const TenantLimitsViewSchema: z.ZodObject<{
8719
8760
  memoryIndexLines: z.ZodNumber;
8720
8761
  memoryIndexBytes: z.ZodNumber;
8721
8762
  sessionQueuedMessages: z.ZodNumber;
8763
+ queuedStartMs: z.ZodNumber;
8722
8764
  flowConcurrency: z.ZodNumber;
8723
8765
  flowMapItems: z.ZodNumber;
8724
8766
  flowLoopIterations: z.ZodNumber;
@@ -8786,7 +8828,7 @@ export declare const SessionManifestViewSchema: z.ZodObject<{
8786
8828
  }, z.core.$strict>;
8787
8829
  export type SessionManifestView = z.infer<typeof SessionManifestViewSchema>;
8788
8830
  export declare const HistoryPageSchema: z.ZodObject<{
8789
- items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">[]], "type">>;
8831
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.cancelled" | "queue.failed" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">, ...EventSchemaOf<"agent.attached" | "artifact.created" | "artifact.deleted" | "artifact.export.failed" | "artifact.export.skipped" | "artifact.version.created" | "command.approve" | "command.message" | "command.respond" | "context.compacted" | "delegation.completed" | "delegation.started" | "effect.uncertain" | "engine.diagnostic" | "environment.exec" | "environment.state" | "loop.iteration" | "loop.verified" | "mcp.discovered" | "memory.updated" | "message.assistant" | "message.queued" | "model.failed" | "node.agent" | "node.completed" | "node.started" | "plan.updated" | "queue.cancelled" | "queue.failed" | "queue.taken" | "session.model" | "tool.completed" | "transcript.updated" | "turn.cancelled" | "turn.completed" | "turn.failed" | "turn.paused" | "turn.version_kept" | "wake.booked" | "wake.cancelled">[]], "type">>;
8790
8832
  cursor: z.ZodNullable<z.ZodString>;
8791
8833
  tail: z.ZodBoolean;
8792
8834
  }, z.core.$strip>;
package/dist/contracts.js CHANGED
@@ -3439,6 +3439,24 @@ export const QueueTakenPayloadSchema = z
3439
3439
  step: z.number().int().positive().optional(),
3440
3440
  })
3441
3441
  .passthrough();
3442
+ /**
3443
+ * `queue.failed` (Host feature `queue-recovery`): queued messages no turn will take. The Agent
3444
+ * refused their turn's start for longer than the Runtime limit `queuedStartMs`, or in a way no
3445
+ * retry changes; `error.code` says which (`queue.start_expired`, `queue.start_refused`) and
3446
+ * `error.reason` is the refusal's own code. `queue.cancelled`: a client removed them (A2A
3447
+ * `CancelTask`). Neither has a turn.
3448
+ */
3449
+ export const QueueFailedPayloadSchema = z
3450
+ .object({
3451
+ queuedMessageIds: z.array(z.string()).min(1),
3452
+ error: z
3453
+ .object({ code: z.string(), message: z.string(), reason: z.string().optional() })
3454
+ .passthrough(),
3455
+ })
3456
+ .passthrough();
3457
+ export const QueueCancelledPayloadSchema = z
3458
+ .object({ queuedMessageIds: z.array(z.string()).min(1), reason: z.string().optional() })
3459
+ .passthrough();
3442
3460
  /** Lifecycle of an agent used as a tool. `agent.delegationId` is the parent call's invocation. */
3443
3461
  export const DelegationPayloadSchema = z
3444
3462
  .object({
@@ -3818,6 +3836,8 @@ export const EVENT_CATALOG = {
3818
3836
  "session.model": { payload: SessionModelPayloadSchema, source: "api", version: 1 },
3819
3837
  "message.queued": { payload: MessageQueuedPayloadSchema, source: "api", version: 1 },
3820
3838
  "queue.taken": { payload: QueueTakenPayloadSchema, source: "api", version: 1 },
3839
+ "queue.failed": { payload: QueueFailedPayloadSchema, source: "api", version: 1 },
3840
+ "queue.cancelled": { payload: QueueCancelledPayloadSchema, source: "api", version: 1 },
3821
3841
  "wake.booked": { payload: WakeBookedPayloadSchema, source: "api", version: 1 },
3822
3842
  "wake.cancelled": { payload: WakeCancelledPayloadSchema, source: "api", version: 1 },
3823
3843
  "memory.updated": { payload: MemoryUpdatedPayloadSchema, source: "api", version: 1 },
@@ -132,6 +132,9 @@ export declare const LINUX_ARG_MAX_BYTES: number;
132
132
  * Sessions:
133
133
  * - `sessionQueuedMessages`: the most messages one session's queue holds while its turn runs or
134
134
  * waits (protocol 17); one more is `429 queue_full`.
135
+ * - `queuedStartMs`: how long queued messages wait for their Agent once no turn holds them and the
136
+ * Agent refused their turn's start (its disk being copied, its pod lost, the Agent deleted); the
137
+ * start is tried again meanwhile, and after it they fail (`queue.failed`).
135
138
  *
136
139
  * Flows (`workflows.md` §13):
137
140
  * - `flowConcurrency`: the most effects one flow turn runs at once; the rest wait their turn.
@@ -211,6 +214,7 @@ export declare const RuntimeLimitsSchema: z.ZodObject<{
211
214
  memoryIndexLines: z.ZodNumber;
212
215
  memoryIndexBytes: z.ZodNumber;
213
216
  sessionQueuedMessages: z.ZodNumber;
217
+ queuedStartMs: z.ZodNumber;
214
218
  flowConcurrency: z.ZodNumber;
215
219
  flowMapItems: z.ZodNumber;
216
220
  flowLoopIterations: z.ZodNumber;
@@ -175,6 +175,9 @@ const harnessLimits = {
175
175
  * Sessions:
176
176
  * - `sessionQueuedMessages`: the most messages one session's queue holds while its turn runs or
177
177
  * waits (protocol 17); one more is `429 queue_full`.
178
+ * - `queuedStartMs`: how long queued messages wait for their Agent once no turn holds them and the
179
+ * Agent refused their turn's start (its disk being copied, its pod lost, the Agent deleted); the
180
+ * start is tried again meanwhile, and after it they fail (`queue.failed`).
178
181
  *
179
182
  * Flows (`workflows.md` §13):
180
183
  * - `flowConcurrency`: the most effects one flow turn runs at once; the rest wait their turn.
@@ -249,6 +252,7 @@ export const RuntimeLimitsSchema = z
249
252
  memoryIndexLines: z.number().int().positive(),
250
253
  memoryIndexBytes: z.number().int().positive(),
251
254
  sessionQueuedMessages: z.number().int().positive(),
255
+ queuedStartMs: z.number().int().positive(),
252
256
  flowConcurrency: z.number().int().positive(),
253
257
  flowMapItems: z.number().int().positive(),
254
258
  flowLoopIterations: z.number().int().positive(),
@@ -454,6 +458,7 @@ export const RUNTIME_LIMIT_CEILINGS = {
454
458
  why: `the payload goes into one record entry, which holds at most ${recordEntryCeiling} bytes`,
455
459
  },
456
460
  sessionQueuedMessages: counted("entries", "queued messages are counted"),
461
+ queuedStartMs: counted("milliseconds", "the deadline is reckoned from the clock"),
457
462
  flowConcurrency: counted("effects", "running effects are counted"),
458
463
  flowMapItems: counted("entries", "items are counted"),
459
464
  flowLoopIterations: counted("iterations", "iterations are counted"),
@@ -539,6 +544,7 @@ export const RUNTIME_LIMIT_DEFAULTS = Object.freeze({
539
544
  memoryIndexLines: 200,
540
545
  memoryIndexBytes: 25 * 1024,
541
546
  sessionQueuedMessages: 100,
547
+ queuedStartMs: 15 * 60_000,
542
548
  flowConcurrency: 8,
543
549
  flowMapItems: 1_000,
544
550
  flowLoopIterations: 100,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/core",
3
- "version": "0.37.0-beta",
3
+ "version": "0.38.0-beta",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Shared agent definitions and wire contracts",