@nylorun/core 0.37.0-beta → 0.39.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 +26 -0
- package/dist/compatibility.d.ts +11 -1
- package/dist/compatibility.js +10 -0
- package/dist/contracts.d.ts +50 -3
- package/dist/contracts.js +24 -0
- package/dist/utils/runtime-limits.d.ts +4 -0
- package/dist/utils/runtime-limits.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.39.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0c6634b: `GET /v1/tenant/sandbox`'s `cluster` names its `backend` (`agent-sandbox` or `substrate`) and, on Agent Substrate, its `atespace`. `nylorun doctor sandbox` prints the Tenant's pods line (backend, context, namespace, ready), and Studio's Sandbox section says Agent Substrate with the atespace.
|
|
8
|
+
|
|
9
|
+
## 0.38.0-beta
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 1d3a5c5: Queued messages no longer wait for good (Host feature `queue-recovery`). When a turn ends and its
|
|
14
|
+
Agent refuses to start the next one for the session's queued messages (its disk being copied, its
|
|
15
|
+
pod lost, the Agent deleted), the messages wait with the session's `queueStalled`, and the Tenant
|
|
16
|
+
sweep tries the start again (Host tuning `sweep.queueRetryMs`, 30 seconds), as does the end of the
|
|
17
|
+
Agent's disk copy. A message that has waited longer than the new Runtime limit `queuedStartMs`
|
|
18
|
+
(15 minutes) is removed with the new event `queue.failed` (`queue.start_expired`, with the
|
|
19
|
+
refusal's code as `reason`); a refusal no retry changes (a turn request the version no longer
|
|
20
|
+
resolves, another harness) fails the messages at once (`queue.start_refused`), and the messages
|
|
21
|
+
behind them are tried next. Before, nothing started such a queue until another message arrived.
|
|
22
|
+
|
|
23
|
+
On the A2A endpoint (profile v2), a queued task that fails is `TASK_STATE_FAILED` with a status
|
|
24
|
+
message saying why, in `GetTask`, its pushes and a blocking `SendMessage`. `CancelTask` on a queued
|
|
25
|
+
task now takes it out of the queue, whether a task runs in its context or not, and answers
|
|
26
|
+
`TASK_STATE_CANCELED` (the new event `queue.cancelled`), pushed; before, it was
|
|
27
|
+
`TaskNotCancelableError`.
|
|
28
|
+
|
|
3
29
|
## 0.37.0-beta
|
|
4
30
|
|
|
5
31
|
### Minor Changes
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -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;
|
package/dist/compatibility.js
CHANGED
|
@@ -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
|
package/dist/contracts.d.ts
CHANGED
|
@@ -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 = {
|
|
@@ -7661,6 +7700,11 @@ export declare const TenantSandboxViewSchema: z.ZodObject<{
|
|
|
7661
7700
|
namespace: z.ZodString;
|
|
7662
7701
|
context: z.ZodString;
|
|
7663
7702
|
ready: z.ZodBoolean;
|
|
7703
|
+
backend: z.ZodOptional<z.ZodEnum<{
|
|
7704
|
+
"agent-sandbox": "agent-sandbox";
|
|
7705
|
+
substrate: "substrate";
|
|
7706
|
+
}>>;
|
|
7707
|
+
atespace: z.ZodOptional<z.ZodString>;
|
|
7664
7708
|
controllerVersion: z.ZodOptional<z.ZodString>;
|
|
7665
7709
|
networkPolicy: z.ZodOptional<z.ZodObject<{
|
|
7666
7710
|
enforced: z.ZodBoolean;
|
|
@@ -8560,6 +8604,7 @@ export declare const TenantLimitsConfigSchema: z.ZodObject<{
|
|
|
8560
8604
|
memoryIndexLines: z.ZodOptional<z.ZodNumber>;
|
|
8561
8605
|
memoryIndexBytes: z.ZodOptional<z.ZodNumber>;
|
|
8562
8606
|
sessionQueuedMessages: z.ZodOptional<z.ZodNumber>;
|
|
8607
|
+
queuedStartMs: z.ZodOptional<z.ZodNumber>;
|
|
8563
8608
|
flowConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
8564
8609
|
flowMapItems: z.ZodOptional<z.ZodNumber>;
|
|
8565
8610
|
flowLoopIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -8639,6 +8684,7 @@ export declare const PutTenantLimitsRequestSchema: z.ZodObject<{
|
|
|
8639
8684
|
memoryIndexLines: z.ZodOptional<z.ZodNumber>;
|
|
8640
8685
|
memoryIndexBytes: z.ZodOptional<z.ZodNumber>;
|
|
8641
8686
|
sessionQueuedMessages: z.ZodOptional<z.ZodNumber>;
|
|
8687
|
+
queuedStartMs: z.ZodOptional<z.ZodNumber>;
|
|
8642
8688
|
flowConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
8643
8689
|
flowMapItems: z.ZodOptional<z.ZodNumber>;
|
|
8644
8690
|
flowLoopIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -8719,6 +8765,7 @@ export declare const TenantLimitsViewSchema: z.ZodObject<{
|
|
|
8719
8765
|
memoryIndexLines: z.ZodNumber;
|
|
8720
8766
|
memoryIndexBytes: z.ZodNumber;
|
|
8721
8767
|
sessionQueuedMessages: z.ZodNumber;
|
|
8768
|
+
queuedStartMs: z.ZodNumber;
|
|
8722
8769
|
flowConcurrency: z.ZodNumber;
|
|
8723
8770
|
flowMapItems: z.ZodNumber;
|
|
8724
8771
|
flowLoopIterations: z.ZodNumber;
|
|
@@ -8786,7 +8833,7 @@ export declare const SessionManifestViewSchema: z.ZodObject<{
|
|
|
8786
8833
|
}, z.core.$strict>;
|
|
8787
8834
|
export type SessionManifestView = z.infer<typeof SessionManifestViewSchema>;
|
|
8788
8835
|
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">>;
|
|
8836
|
+
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
8837
|
cursor: z.ZodNullable<z.ZodString>;
|
|
8791
8838
|
tail: z.ZodBoolean;
|
|
8792
8839
|
}, 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 },
|
|
@@ -4609,6 +4629,10 @@ export const TenantSandboxViewSchema = z
|
|
|
4609
4629
|
namespace: z.string(),
|
|
4610
4630
|
context: z.string(),
|
|
4611
4631
|
ready: z.boolean(),
|
|
4632
|
+
/** What runs the pods: `agent-sandbox` Sandboxes, or `substrate` actors (preview, ADR-138). */
|
|
4633
|
+
backend: z.enum(["agent-sandbox", "substrate"]).optional(),
|
|
4634
|
+
/** With backend `substrate`: the Tenant's atespace and Substrate's version. */
|
|
4635
|
+
atespace: z.string().optional(),
|
|
4612
4636
|
controllerVersion: z.string().optional(),
|
|
4613
4637
|
networkPolicy: z.object({ enforced: z.boolean(), probedAt: z.string().optional() }).optional(),
|
|
4614
4638
|
})
|
|
@@ -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,
|