@nylorun/core 0.36.0-beta → 0.37.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 +13 -0
- package/dist/compatibility.d.ts +8 -1
- package/dist/compatibility.js +7 -0
- package/dist/contracts.d.ts +41 -4
- package/dist/contracts.js +24 -7
- package/dist/harness-api/harness-api.schema.json +5 -3
- package/dist/harness-api/json-schema.js +4 -2
- package/dist/harness-api/schema.d.ts +7 -0
- package/dist/harness-api/schema.js +6 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.37.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c649f33: A message can steer a running turn (D85). `delivery: "steer"` on a `message` command, behind the
|
|
8
|
+
optional Host feature `steer`: to a busy agent session it waits in the session queue marked
|
|
9
|
+
`steer`, and our engine takes it into the running turn before its next step, after the tool
|
|
10
|
+
results, through a new effect kind, `inputs`, which core answers in the transaction that journals
|
|
11
|
+
it (Harness API 5, `harness-api/v5.4.json`). Each taken message's `command.message` is written
|
|
12
|
+
under the running turn, then `queue.taken` with the `step`. The queued answer and
|
|
13
|
+
`message.queued` say which delivery applied; a workflow session queues. A steer the turn doesn't
|
|
14
|
+
take starts the next turn like any queued message, and D76's defaults never choose steer.
|
|
15
|
+
|
|
3
16
|
## 0.36.0-beta
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -258,7 +258,14 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
|
|
|
258
258
|
* a tool rule of `kind: "runtime"` decides the operations the Runtime serves; the manifest's
|
|
259
259
|
* `runtime.limits.triggers`; and `GET /v1/runs/stream`, the Tenant's runs as server-sent events.
|
|
260
260
|
*/
|
|
261
|
-
"agent-triggers"
|
|
261
|
+
"agent-triggers",
|
|
262
|
+
/**
|
|
263
|
+
* A message's `delivery: "steer"` (D85): to a busy agent session it waits in the session queue
|
|
264
|
+
* marked `steer`, and our engine takes it into the running turn before its next step (the
|
|
265
|
+
* `inputs` effect, Harness API 5.4). The answer and `message.queued` say which delivery applied;
|
|
266
|
+
* a steer the turn doesn't take starts the next turn, as a queued message does.
|
|
267
|
+
*/
|
|
268
|
+
"steer"];
|
|
262
269
|
export type OptionalHostFeature = (typeof OPTIONAL_HOST_FEATURES)[number];
|
|
263
270
|
export interface ProtocolRange {
|
|
264
271
|
min: number;
|
package/dist/compatibility.js
CHANGED
|
@@ -281,6 +281,13 @@ export const OPTIONAL_HOST_FEATURES = [
|
|
|
281
281
|
* `runtime.limits.triggers`; and `GET /v1/runs/stream`, the Tenant's runs as server-sent events.
|
|
282
282
|
*/
|
|
283
283
|
"agent-triggers",
|
|
284
|
+
/**
|
|
285
|
+
* A message's `delivery: "steer"` (D85): to a busy agent session it waits in the session queue
|
|
286
|
+
* marked `steer`, and our engine takes it into the running turn before its next step (the
|
|
287
|
+
* `inputs` effect, Harness API 5.4). The answer and `message.queued` say which delivery applied;
|
|
288
|
+
* a steer the turn doesn't take starts the next turn, as a queued message does.
|
|
289
|
+
*/
|
|
290
|
+
"steer",
|
|
284
291
|
];
|
|
285
292
|
/**
|
|
286
293
|
* What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
|
package/dist/contracts.d.ts
CHANGED
|
@@ -4201,11 +4201,14 @@ export type CredentialCoverage = z.infer<typeof CredentialCoverageSchema>;
|
|
|
4201
4201
|
/**
|
|
4202
4202
|
* What a message to a busy session does (protocol 17): `queue` waits for the running turn to
|
|
4203
4203
|
* end and starts the next one; `reject` is refused with `409 session_busy`. A protocol 17 client's
|
|
4204
|
-
* default is `queue`, a protocol 16 client's `reject`.
|
|
4204
|
+
* default is `queue`, a protocol 16 client's `reject`. `steer` (Host feature `steer`, D85) joins
|
|
4205
|
+
* the running turn before its next step, when our engine runs it; a workflow session queues it,
|
|
4206
|
+
* and one the turn doesn't take starts the next turn like a queued message.
|
|
4205
4207
|
*/
|
|
4206
4208
|
export declare const MessageDeliverySchema: z.ZodEnum<{
|
|
4207
4209
|
queue: "queue";
|
|
4208
4210
|
reject: "reject";
|
|
4211
|
+
steer: "steer";
|
|
4209
4212
|
}>;
|
|
4210
4213
|
export type MessageDelivery = z.infer<typeof MessageDeliverySchema>;
|
|
4211
4214
|
/**
|
|
@@ -4245,6 +4248,7 @@ export declare const MessageEventBodySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4245
4248
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4246
4249
|
queue: "queue";
|
|
4247
4250
|
reject: "reject";
|
|
4251
|
+
steer: "steer";
|
|
4248
4252
|
}>>;
|
|
4249
4253
|
content: z.ZodString;
|
|
4250
4254
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -4256,6 +4260,7 @@ export declare const MessageEventBodySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4256
4260
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4257
4261
|
queue: "queue";
|
|
4258
4262
|
reject: "reject";
|
|
4263
|
+
steer: "steer";
|
|
4259
4264
|
}>>;
|
|
4260
4265
|
data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
4261
4266
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -4267,6 +4272,7 @@ export declare const MessageEventBodySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4267
4272
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4268
4273
|
queue: "queue";
|
|
4269
4274
|
reject: "reject";
|
|
4275
|
+
steer: "steer";
|
|
4270
4276
|
}>>;
|
|
4271
4277
|
parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4272
4278
|
type: z.ZodLiteral<"text">;
|
|
@@ -4292,6 +4298,7 @@ export declare const SessionCommandSchema: z.ZodUnion<readonly [z.ZodUnion<reado
|
|
|
4292
4298
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4293
4299
|
queue: "queue";
|
|
4294
4300
|
reject: "reject";
|
|
4301
|
+
steer: "steer";
|
|
4295
4302
|
}>>;
|
|
4296
4303
|
content: z.ZodString;
|
|
4297
4304
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -4303,6 +4310,7 @@ export declare const SessionCommandSchema: z.ZodUnion<readonly [z.ZodUnion<reado
|
|
|
4303
4310
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4304
4311
|
queue: "queue";
|
|
4305
4312
|
reject: "reject";
|
|
4313
|
+
steer: "steer";
|
|
4306
4314
|
}>>;
|
|
4307
4315
|
data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
4308
4316
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -4314,6 +4322,7 @@ export declare const SessionCommandSchema: z.ZodUnion<readonly [z.ZodUnion<reado
|
|
|
4314
4322
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4315
4323
|
queue: "queue";
|
|
4316
4324
|
reject: "reject";
|
|
4325
|
+
steer: "steer";
|
|
4317
4326
|
}>>;
|
|
4318
4327
|
parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4319
4328
|
type: z.ZodLiteral<"text">;
|
|
@@ -4350,6 +4359,7 @@ export declare const SessionEventBodySchema: z.ZodUnion<readonly [z.ZodUnion<rea
|
|
|
4350
4359
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4351
4360
|
queue: "queue";
|
|
4352
4361
|
reject: "reject";
|
|
4362
|
+
steer: "steer";
|
|
4353
4363
|
}>>;
|
|
4354
4364
|
content: z.ZodString;
|
|
4355
4365
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -4361,6 +4371,7 @@ export declare const SessionEventBodySchema: z.ZodUnion<readonly [z.ZodUnion<rea
|
|
|
4361
4371
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4362
4372
|
queue: "queue";
|
|
4363
4373
|
reject: "reject";
|
|
4374
|
+
steer: "steer";
|
|
4364
4375
|
}>>;
|
|
4365
4376
|
data: z.ZodType<JsonValue, unknown, z.core.$ZodTypeInternals<JsonValue, unknown>>;
|
|
4366
4377
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -4372,6 +4383,7 @@ export declare const SessionEventBodySchema: z.ZodUnion<readonly [z.ZodUnion<rea
|
|
|
4372
4383
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4373
4384
|
queue: "queue";
|
|
4374
4385
|
reject: "reject";
|
|
4386
|
+
steer: "steer";
|
|
4375
4387
|
}>>;
|
|
4376
4388
|
parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4377
4389
|
type: z.ZodLiteral<"text">;
|
|
@@ -4631,12 +4643,18 @@ export declare const AcceptedResponseSchema: z.ZodObject<{
|
|
|
4631
4643
|
export type AcceptedResponse = z.infer<typeof AcceptedResponseSchema>;
|
|
4632
4644
|
/**
|
|
4633
4645
|
* A message the session queued because a turn runs or waits (protocol 17): it starts the next
|
|
4634
|
-
* turn when this one ends. `position` counts from 1, the first to go.
|
|
4646
|
+
* turn when this one ends. `position` counts from 1, the first to go. `delivery` is what applied
|
|
4647
|
+
* (D85): `steer` when the running turn takes it before a step, `queue` otherwise; a Host without
|
|
4648
|
+
* the feature `steer` leaves it out.
|
|
4635
4649
|
*/
|
|
4636
4650
|
export declare const QueuedResponseSchema: z.ZodObject<{
|
|
4637
4651
|
status: z.ZodLiteral<"queued">;
|
|
4638
4652
|
queuedMessageId: z.ZodString;
|
|
4639
4653
|
position: z.ZodNumber;
|
|
4654
|
+
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4655
|
+
queue: "queue";
|
|
4656
|
+
steer: "steer";
|
|
4657
|
+
}>>;
|
|
4640
4658
|
cursor: z.ZodNullable<z.ZodString>;
|
|
4641
4659
|
requestId: z.ZodString;
|
|
4642
4660
|
}, z.core.$strip>;
|
|
@@ -4651,6 +4669,10 @@ export declare const CommandResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4651
4669
|
status: z.ZodLiteral<"queued">;
|
|
4652
4670
|
queuedMessageId: z.ZodString;
|
|
4653
4671
|
position: z.ZodNumber;
|
|
4672
|
+
delivery: z.ZodOptional<z.ZodEnum<{
|
|
4673
|
+
queue: "queue";
|
|
4674
|
+
steer: "steer";
|
|
4675
|
+
}>>;
|
|
4654
4676
|
cursor: z.ZodNullable<z.ZodString>;
|
|
4655
4677
|
requestId: z.ZodString;
|
|
4656
4678
|
}, z.core.$strip>]>;
|
|
@@ -4994,12 +5016,16 @@ export declare const TurnCancelledPayloadSchema: z.ZodObject<{
|
|
|
4994
5016
|
/**
|
|
4995
5017
|
* `message.queued` (protocol 17): a message arrived while the session's turn ran or waited, and
|
|
4996
5018
|
* waits in its queue. `position` counts from 1; the message's `command.message` is written when
|
|
4997
|
-
* a turn takes it.
|
|
5019
|
+
* a turn takes it. `delivery` (D85) says whether the running turn may take it before a step.
|
|
4998
5020
|
*/
|
|
4999
5021
|
export declare const MessageQueuedPayloadSchema: z.ZodObject<{
|
|
5000
5022
|
queuedMessageId: z.ZodString;
|
|
5001
5023
|
position: z.ZodNumber;
|
|
5002
5024
|
requestId: z.ZodString;
|
|
5025
|
+
delivery: z.ZodOptional<z.ZodEnum<{
|
|
5026
|
+
queue: "queue";
|
|
5027
|
+
steer: "steer";
|
|
5028
|
+
}>>;
|
|
5003
5029
|
}, z.core.$loose>;
|
|
5004
5030
|
/**
|
|
5005
5031
|
* `wake.booked`: the session's agent booked its next turn with `schedule_wake`,
|
|
@@ -5055,10 +5081,14 @@ export declare const PlanUpdatedPayloadSchema: z.ZodObject<{
|
|
|
5055
5081
|
note: z.ZodOptional<z.ZodString>;
|
|
5056
5082
|
}, z.core.$loose>>;
|
|
5057
5083
|
}, z.core.$loose>;
|
|
5058
|
-
/**
|
|
5084
|
+
/**
|
|
5085
|
+
* `queue.taken` (protocol 17): the turn that started with the queued messages, in order. With
|
|
5086
|
+
* `step` (D85), the running turn took steered messages before that step instead.
|
|
5087
|
+
*/
|
|
5059
5088
|
export declare const QueueTakenPayloadSchema: z.ZodObject<{
|
|
5060
5089
|
turnId: z.ZodString;
|
|
5061
5090
|
queuedMessageIds: z.ZodArray<z.ZodString>;
|
|
5091
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
5062
5092
|
}, z.core.$loose>;
|
|
5063
5093
|
/** Lifecycle of an agent used as a tool. `agent.delegationId` is the parent call's invocation. */
|
|
5064
5094
|
export declare const DelegationPayloadSchema: z.ZodObject<{
|
|
@@ -5313,6 +5343,7 @@ export declare const CommandMessagePayloadSchema: z.ZodObject<{
|
|
|
5313
5343
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
5314
5344
|
queue: "queue";
|
|
5315
5345
|
reject: "reject";
|
|
5346
|
+
steer: "steer";
|
|
5316
5347
|
}>>;
|
|
5317
5348
|
queuedMessageId: z.ZodOptional<z.ZodString>;
|
|
5318
5349
|
cause: z.ZodOptional<z.ZodObject<{
|
|
@@ -5731,6 +5762,7 @@ export declare const EVENT_CATALOG: {
|
|
|
5731
5762
|
delivery: z.ZodOptional<z.ZodEnum<{
|
|
5732
5763
|
queue: "queue";
|
|
5733
5764
|
reject: "reject";
|
|
5765
|
+
steer: "steer";
|
|
5734
5766
|
}>>;
|
|
5735
5767
|
queuedMessageId: z.ZodOptional<z.ZodString>;
|
|
5736
5768
|
cause: z.ZodOptional<z.ZodObject<{
|
|
@@ -5918,6 +5950,10 @@ export declare const EVENT_CATALOG: {
|
|
|
5918
5950
|
queuedMessageId: z.ZodString;
|
|
5919
5951
|
position: z.ZodNumber;
|
|
5920
5952
|
requestId: z.ZodString;
|
|
5953
|
+
delivery: z.ZodOptional<z.ZodEnum<{
|
|
5954
|
+
queue: "queue";
|
|
5955
|
+
steer: "steer";
|
|
5956
|
+
}>>;
|
|
5921
5957
|
}, z.core.$loose>;
|
|
5922
5958
|
readonly source: "api";
|
|
5923
5959
|
readonly version: 1;
|
|
@@ -5926,6 +5962,7 @@ export declare const EVENT_CATALOG: {
|
|
|
5926
5962
|
readonly payload: z.ZodObject<{
|
|
5927
5963
|
turnId: z.ZodString;
|
|
5928
5964
|
queuedMessageIds: z.ZodArray<z.ZodString>;
|
|
5965
|
+
step: z.ZodOptional<z.ZodNumber>;
|
|
5929
5966
|
}, z.core.$loose>;
|
|
5930
5967
|
readonly source: "api";
|
|
5931
5968
|
readonly version: 1;
|
package/dist/contracts.js
CHANGED
|
@@ -2889,9 +2889,11 @@ const commandBase = {
|
|
|
2889
2889
|
/**
|
|
2890
2890
|
* What a message to a busy session does (protocol 17): `queue` waits for the running turn to
|
|
2891
2891
|
* end and starts the next one; `reject` is refused with `409 session_busy`. A protocol 17 client's
|
|
2892
|
-
* default is `queue`, a protocol 16 client's `reject`.
|
|
2892
|
+
* default is `queue`, a protocol 16 client's `reject`. `steer` (Host feature `steer`, D85) joins
|
|
2893
|
+
* the running turn before its next step, when our engine runs it; a workflow session queues it,
|
|
2894
|
+
* and one the turn doesn't take starts the next turn like a queued message.
|
|
2893
2895
|
*/
|
|
2894
|
-
export const MessageDeliverySchema = z.enum(["queue", "reject"]);
|
|
2896
|
+
export const MessageDeliverySchema = z.enum(["queue", "reject", "steer"]);
|
|
2895
2897
|
/**
|
|
2896
2898
|
* A message's `removeTools` (Host feature `remove-tools`): the tools its turn may not use, by
|
|
2897
2899
|
* name. In the root agent and each agent it uses as a tool, a name removes the declared tool of
|
|
@@ -3092,12 +3094,15 @@ export const AcceptedResponseSchema = z.object({
|
|
|
3092
3094
|
});
|
|
3093
3095
|
/**
|
|
3094
3096
|
* A message the session queued because a turn runs or waits (protocol 17): it starts the next
|
|
3095
|
-
* turn when this one ends. `position` counts from 1, the first to go.
|
|
3097
|
+
* turn when this one ends. `position` counts from 1, the first to go. `delivery` is what applied
|
|
3098
|
+
* (D85): `steer` when the running turn takes it before a step, `queue` otherwise; a Host without
|
|
3099
|
+
* the feature `steer` leaves it out.
|
|
3096
3100
|
*/
|
|
3097
3101
|
export const QueuedResponseSchema = z.object({
|
|
3098
3102
|
status: z.literal("queued"),
|
|
3099
3103
|
queuedMessageId: z.string(),
|
|
3100
3104
|
position: z.number().int().positive(),
|
|
3105
|
+
delivery: z.enum(["queue", "steer"]).optional(),
|
|
3101
3106
|
cursor: z.string().nullable(),
|
|
3102
3107
|
requestId: z.string(),
|
|
3103
3108
|
});
|
|
@@ -3384,10 +3389,15 @@ export const TurnCancelledPayloadSchema = z
|
|
|
3384
3389
|
/**
|
|
3385
3390
|
* `message.queued` (protocol 17): a message arrived while the session's turn ran or waited, and
|
|
3386
3391
|
* waits in its queue. `position` counts from 1; the message's `command.message` is written when
|
|
3387
|
-
* a turn takes it.
|
|
3392
|
+
* a turn takes it. `delivery` (D85) says whether the running turn may take it before a step.
|
|
3388
3393
|
*/
|
|
3389
3394
|
export const MessageQueuedPayloadSchema = z
|
|
3390
|
-
.object({
|
|
3395
|
+
.object({
|
|
3396
|
+
queuedMessageId: z.string(),
|
|
3397
|
+
position: z.number().int().positive(),
|
|
3398
|
+
requestId: z.string(),
|
|
3399
|
+
delivery: z.enum(["queue", "steer"]).optional(),
|
|
3400
|
+
})
|
|
3391
3401
|
.passthrough();
|
|
3392
3402
|
/**
|
|
3393
3403
|
* `wake.booked`: the session's agent booked its next turn with `schedule_wake`,
|
|
@@ -3418,9 +3428,16 @@ export const PlanStepSchema = z
|
|
|
3418
3428
|
export const PlanUpdatedPayloadSchema = z
|
|
3419
3429
|
.object({ steps: z.array(PlanStepSchema).max(PLAN_LIMITS.steps) })
|
|
3420
3430
|
.passthrough();
|
|
3421
|
-
/**
|
|
3431
|
+
/**
|
|
3432
|
+
* `queue.taken` (protocol 17): the turn that started with the queued messages, in order. With
|
|
3433
|
+
* `step` (D85), the running turn took steered messages before that step instead.
|
|
3434
|
+
*/
|
|
3422
3435
|
export const QueueTakenPayloadSchema = z
|
|
3423
|
-
.object({
|
|
3436
|
+
.object({
|
|
3437
|
+
turnId: z.string(),
|
|
3438
|
+
queuedMessageIds: z.array(z.string()).min(1),
|
|
3439
|
+
step: z.number().int().positive().optional(),
|
|
3440
|
+
})
|
|
3424
3441
|
.passthrough();
|
|
3425
3442
|
/** Lifecycle of an agent used as a tool. `agent.delegationId` is the parent call's invocation. */
|
|
3426
3443
|
export const DelegationPayloadSchema = z
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://docs.nylorun.com/schemas/harness-api/v5.
|
|
3
|
+
"$id": "https://docs.nylorun.com/schemas/harness-api/v5.4.json",
|
|
4
4
|
"title": "Nylorun Harness API 5",
|
|
5
5
|
"$defs": {
|
|
6
6
|
"ArtifactMeta": {
|
|
@@ -86,7 +86,8 @@
|
|
|
86
86
|
"model",
|
|
87
87
|
"tool",
|
|
88
88
|
"delegation",
|
|
89
|
-
"agent"
|
|
89
|
+
"agent",
|
|
90
|
+
"inputs"
|
|
90
91
|
]
|
|
91
92
|
},
|
|
92
93
|
"agent": {
|
|
@@ -3921,7 +3922,8 @@
|
|
|
3921
3922
|
"model",
|
|
3922
3923
|
"tool",
|
|
3923
3924
|
"delegation",
|
|
3924
|
-
"agent"
|
|
3925
|
+
"agent",
|
|
3926
|
+
"inputs"
|
|
3925
3927
|
]
|
|
3926
3928
|
},
|
|
3927
3929
|
"agent": {
|
|
@@ -55,9 +55,11 @@ export function harnessApiSchemas() {
|
|
|
55
55
|
* `turn.start.memory.index` absent for a version that pins none (ADR-100), and
|
|
56
56
|
* `turn.start.memory.refresh` (an optional field a v5 harness may ignore, keeping the index it
|
|
57
57
|
* pinned). Revision 3: `turn.start.agent.triggers` and the `runtime` operation `triggers` (D83),
|
|
58
|
-
* which a v5 harness that offers no `triggers` tool never sees.
|
|
58
|
+
* which a v5 harness that offers no `triggers` tool never sees. Revision 4: the effect kind `inputs`
|
|
59
|
+
(D85): the messages steered into the running turn, which core answers at once and a v5 harness
|
|
60
|
+
that never asks for it never sees.
|
|
59
61
|
*/
|
|
60
|
-
const SCHEMA_REVISION =
|
|
62
|
+
const SCHEMA_REVISION = 4;
|
|
61
63
|
/** The JSON Schema document of the Harness API (draft 2020-12). */
|
|
62
64
|
export function harnessApiJsonSchema() {
|
|
63
65
|
const $defs = {};
|
|
@@ -131,6 +131,11 @@ export declare const EffectTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
131
131
|
* A model effect that writes a compaction's summary says so (`purpose: "summary"`): it is no
|
|
132
132
|
* assistant message, and the compaction edit that follows names it (`CompactionFactsSchema`).
|
|
133
133
|
*
|
|
134
|
+
* An `inputs` effect (D85, revision 4) asks core for the messages steered into the running turn
|
|
135
|
+
* (`delivery: "steer"`), before a step: core takes them in the transaction that journals the
|
|
136
|
+
* effect and answers `{value: {events}}` at once, the messages' input events in order (none when
|
|
137
|
+
* nothing waits). The journal keeps the answer, so a replay takes the same messages at that step.
|
|
138
|
+
*
|
|
134
139
|
* An agent's tool effect names its `target` (what runs it: for an MCP or HTTP tool, its
|
|
135
140
|
* identity) beside the name the model used (`toolName`, for display), and may name the `skill` it
|
|
136
141
|
* ran (a skill tool's skill, or a sandbox call in a skill's folder): the record keeps the skill,
|
|
@@ -154,6 +159,7 @@ export declare const EffectIntentSchema: z.ZodObject<{
|
|
|
154
159
|
kind: z.ZodEnum<{
|
|
155
160
|
agent: "agent";
|
|
156
161
|
delegation: "delegation";
|
|
162
|
+
inputs: "inputs";
|
|
157
163
|
model: "model";
|
|
158
164
|
tool: "tool";
|
|
159
165
|
}>;
|
|
@@ -823,6 +829,7 @@ export declare const harnessRequests: {
|
|
|
823
829
|
kind: z.ZodEnum<{
|
|
824
830
|
agent: "agent";
|
|
825
831
|
delegation: "delegation";
|
|
832
|
+
inputs: "inputs";
|
|
826
833
|
model: "model";
|
|
827
834
|
tool: "tool";
|
|
828
835
|
}>;
|
|
@@ -101,6 +101,11 @@ export const EffectTargetSchema = z.discriminatedUnion("kind", [
|
|
|
101
101
|
* A model effect that writes a compaction's summary says so (`purpose: "summary"`): it is no
|
|
102
102
|
* assistant message, and the compaction edit that follows names it (`CompactionFactsSchema`).
|
|
103
103
|
*
|
|
104
|
+
* An `inputs` effect (D85, revision 4) asks core for the messages steered into the running turn
|
|
105
|
+
* (`delivery: "steer"`), before a step: core takes them in the transaction that journals the
|
|
106
|
+
* effect and answers `{value: {events}}` at once, the messages' input events in order (none when
|
|
107
|
+
* nothing waits). The journal keeps the answer, so a replay takes the same messages at that step.
|
|
108
|
+
*
|
|
104
109
|
* An agent's tool effect names its `target` (what runs it: for an MCP or HTTP tool, its
|
|
105
110
|
* identity) beside the name the model used (`toolName`, for display), and may name the `skill` it
|
|
106
111
|
* ran (a skill tool's skill, or a sandbox call in a skill's folder): the record keeps the skill,
|
|
@@ -122,7 +127,7 @@ export const EffectIntentSchema = z
|
|
|
122
127
|
turnId: id,
|
|
123
128
|
agentId: id,
|
|
124
129
|
manifestHash: z.string(),
|
|
125
|
-
kind: z.enum(["model", "tool", "delegation", "agent"]),
|
|
130
|
+
kind: z.enum(["model", "tool", "delegation", "agent", "inputs"]),
|
|
126
131
|
agent: z.object({ id: z.string(), path: z.string(), delegationId: z.string().optional() }).strict().optional(),
|
|
127
132
|
toolName: z.string().optional(),
|
|
128
133
|
target: EffectTargetSchema.optional(),
|