@drisp/protocol 0.8.2 → 0.8.4
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/dist/v2.d.ts +53 -2
- package/dist/v2.js +30 -6
- package/package.json +1 -1
- package/schema/v2/checkpoint.json +4 -0
- package/schema/v2/grant.json +4 -0
- package/schema/v2/run.json +20 -0
- package/schema/v2/runner.json +77 -0
package/dist/v2.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ declare const SIZE_CLASS_CAPS: Readonly<Record<SizeClass, number>>;
|
|
|
15
15
|
declare const SIZE_CLASS_FORECASTS: Readonly<Record<SizeClass, number>>;
|
|
16
16
|
/** The smallest class whose cap is at least the declared one; above the largest cap is `L`. A cap that is no number reads as `S`. */
|
|
17
17
|
declare function classOfCap(declaredCap: number): SizeClass;
|
|
18
|
+
/** What a Run declaring `declaredCap` is expected to use: its class's forecast. */
|
|
19
|
+
declare function forecastOfCap(declaredCap: number): number;
|
|
18
20
|
/**
|
|
19
21
|
* What one attempt holds against the budget: a closed attempt (finished, failed, cancelled) its forecast, never more
|
|
20
22
|
* than its own declared cap (so the rule stays looser than the cap sum it replaces); a running or queued one still its
|
|
@@ -27,7 +29,7 @@ declare function attemptCost(attempt: {
|
|
|
27
29
|
|
|
28
30
|
declare const protocolVersion: {
|
|
29
31
|
readonly major: 2;
|
|
30
|
-
readonly minor:
|
|
32
|
+
readonly minor: 3;
|
|
31
33
|
};
|
|
32
34
|
declare const conversationContinuationCapability = "conversation_continuation";
|
|
33
35
|
declare const abandonedConversationContinuationCapability = "abandoned_conversation_continuation";
|
|
@@ -39,6 +41,12 @@ declare const workflowInstallCapability = "workflow_install_v1";
|
|
|
39
41
|
* token to the agent as `DRISP_RUN_TOKEN`. A start with `delegation` is never sent to a runner without it.
|
|
40
42
|
*/
|
|
41
43
|
declare const runDelegationCapability = "run_delegation_v1";
|
|
44
|
+
/**
|
|
45
|
+
* The runner takes grants marked `reportUsage` (protocol minor 3, root ADR-0011) and, for those only, reports the
|
|
46
|
+
* Run's usage: on `run.attention` and `run.finished`, and as `run.usage` while it executes. A Hub that does not know
|
|
47
|
+
* these fields never marks a grant, so it never receives them.
|
|
48
|
+
*/
|
|
49
|
+
declare const runUsageCapability = "run_usage_v1";
|
|
42
50
|
/** The prefix of every delegation token; the Hub keeps only its digest. */
|
|
43
51
|
declare const delegationTokenPrefix = "drisp_dlg_";
|
|
44
52
|
/** A `run.artifact` history record's `name`, and the most its `json` may take serialized. */
|
|
@@ -166,6 +174,15 @@ declare const runCloseReasonSchema: z.ZodEnum<{
|
|
|
166
174
|
legacy_force_failed: "legacy_force_failed";
|
|
167
175
|
}>;
|
|
168
176
|
type RunCloseReason = z.infer<typeof runCloseReasonSchema>;
|
|
177
|
+
/**
|
|
178
|
+
* A Run's cumulative usage (root ADR-0011): `counted` is its tokens without cache reads (`total − cacheRead`), the unit
|
|
179
|
+
* the Run cap counts on every harness, and `cacheRead` the cache reads left out of it.
|
|
180
|
+
*/
|
|
181
|
+
declare const runUsageSchema: z.ZodObject<{
|
|
182
|
+
counted: z.ZodNumber;
|
|
183
|
+
cacheRead: z.ZodNumber;
|
|
184
|
+
}, z.core.$strict>;
|
|
185
|
+
type RunUsage = z.infer<typeof runUsageSchema>;
|
|
169
186
|
declare const controlRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
170
187
|
kind: z.ZodLiteral<"workflows.changed">;
|
|
171
188
|
workflows: z.ZodArray<z.ZodObject<{
|
|
@@ -225,6 +242,10 @@ declare const controlRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
225
242
|
emittedAt: z.ZodISODateTime;
|
|
226
243
|
kind: z.ZodLiteral<"run.resumed">;
|
|
227
244
|
}, z.core.$strict>, z.ZodObject<{
|
|
245
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
counted: z.ZodNumber;
|
|
247
|
+
cacheRead: z.ZodNumber;
|
|
248
|
+
}, z.core.$strict>>;
|
|
228
249
|
interruption: z.ZodObject<{
|
|
229
250
|
interruptionId: z.ZodString;
|
|
230
251
|
revision: z.ZodNumber;
|
|
@@ -261,6 +282,10 @@ declare const controlRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
261
282
|
emittedAt: z.ZodISODateTime;
|
|
262
283
|
kind: z.ZodLiteral<"run.attention">;
|
|
263
284
|
}, z.core.$strict>, z.ZodObject<{
|
|
285
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
286
|
+
counted: z.ZodNumber;
|
|
287
|
+
cacheRead: z.ZodNumber;
|
|
288
|
+
}, z.core.$strict>>;
|
|
264
289
|
status: z.ZodEnum<{
|
|
265
290
|
completed: "completed";
|
|
266
291
|
failed: "failed";
|
|
@@ -279,6 +304,12 @@ declare const controlRecordSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
279
304
|
executionRevision: z.ZodNumber;
|
|
280
305
|
emittedAt: z.ZodISODateTime;
|
|
281
306
|
kind: z.ZodLiteral<"run.finished">;
|
|
307
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
308
|
+
counted: z.ZodNumber;
|
|
309
|
+
cacheRead: z.ZodNumber;
|
|
310
|
+
kind: z.ZodLiteral<"run.usage">;
|
|
311
|
+
runId: z.ZodString;
|
|
312
|
+
attemptId: z.ZodString;
|
|
282
313
|
}, z.core.$strict>, z.ZodObject<{
|
|
283
314
|
kind: z.ZodLiteral<"command.applied">;
|
|
284
315
|
runId: z.ZodString;
|
|
@@ -529,6 +560,7 @@ declare const grantSchema: z.ZodObject<{
|
|
|
529
560
|
runId: z.ZodString;
|
|
530
561
|
tokenCap: z.ZodNumber;
|
|
531
562
|
}, z.core.$strict>>;
|
|
563
|
+
reportUsage: z.ZodOptional<z.ZodLiteral<true>>;
|
|
532
564
|
}, z.core.$strict>;
|
|
533
565
|
declare const historyRecordSchema: z.ZodObject<{
|
|
534
566
|
eventId: z.ZodString;
|
|
@@ -643,6 +675,10 @@ declare const runnerFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
643
675
|
emittedAt: z.ZodISODateTime;
|
|
644
676
|
kind: z.ZodLiteral<"run.resumed">;
|
|
645
677
|
}, z.core.$strict>, z.ZodObject<{
|
|
678
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
679
|
+
counted: z.ZodNumber;
|
|
680
|
+
cacheRead: z.ZodNumber;
|
|
681
|
+
}, z.core.$strict>>;
|
|
646
682
|
interruption: z.ZodObject<{
|
|
647
683
|
interruptionId: z.ZodString;
|
|
648
684
|
revision: z.ZodNumber;
|
|
@@ -679,6 +715,10 @@ declare const runnerFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
679
715
|
emittedAt: z.ZodISODateTime;
|
|
680
716
|
kind: z.ZodLiteral<"run.attention">;
|
|
681
717
|
}, z.core.$strict>, z.ZodObject<{
|
|
718
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
719
|
+
counted: z.ZodNumber;
|
|
720
|
+
cacheRead: z.ZodNumber;
|
|
721
|
+
}, z.core.$strict>>;
|
|
682
722
|
status: z.ZodEnum<{
|
|
683
723
|
completed: "completed";
|
|
684
724
|
failed: "failed";
|
|
@@ -697,6 +737,12 @@ declare const runnerFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
697
737
|
executionRevision: z.ZodNumber;
|
|
698
738
|
emittedAt: z.ZodISODateTime;
|
|
699
739
|
kind: z.ZodLiteral<"run.finished">;
|
|
740
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
741
|
+
counted: z.ZodNumber;
|
|
742
|
+
cacheRead: z.ZodNumber;
|
|
743
|
+
kind: z.ZodLiteral<"run.usage">;
|
|
744
|
+
runId: z.ZodString;
|
|
745
|
+
attemptId: z.ZodString;
|
|
700
746
|
}, z.core.$strict>, z.ZodObject<{
|
|
701
747
|
kind: z.ZodLiteral<"command.applied">;
|
|
702
748
|
runId: z.ZodString;
|
|
@@ -777,6 +823,10 @@ declare const runViewSchema: z.ZodObject<{
|
|
|
777
823
|
delegation: z.ZodOptional<z.ZodObject<{
|
|
778
824
|
maxChildren: z.ZodNumber;
|
|
779
825
|
tokenBudget: z.ZodNumber;
|
|
826
|
+
}, z.core.$strip>>;
|
|
827
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
828
|
+
counted: z.ZodNumber;
|
|
829
|
+
cacheRead: z.ZodNumber;
|
|
780
830
|
}, z.core.$strict>>;
|
|
781
831
|
workflow: z.ZodOptional<z.ZodObject<{
|
|
782
832
|
name: z.ZodString;
|
|
@@ -1066,6 +1116,7 @@ declare const checkpointSchema: z.ZodObject<{
|
|
|
1066
1116
|
runId: z.ZodString;
|
|
1067
1117
|
tokenCap: z.ZodNumber;
|
|
1068
1118
|
}, z.core.$strict>>;
|
|
1119
|
+
reportUsage: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1069
1120
|
}, z.core.$strict>;
|
|
1070
1121
|
gitHead: z.ZodString;
|
|
1071
1122
|
gitBase: z.ZodOptional<z.ZodString>;
|
|
@@ -1425,4 +1476,4 @@ type ConnectPendingResponse = z.infer<typeof connectPendingResponseSchema>;
|
|
|
1425
1476
|
type TeamDefault = z.infer<typeof teamDefaultSchema>;
|
|
1426
1477
|
type RunsGoTo = z.infer<typeof runsGoToSchema>;
|
|
1427
1478
|
|
|
1428
|
-
export { type Audience, type BuildCloseReason, type Checkpoint, type Command, type ConnectAlreadyConnected, type ConnectPendingResponse, type ConnectRedeemRequest, type ConnectRedeemResponse, type ConnectStartRequest, type ConnectStartResponse, type ControlRecord, type Delegation, type ExecutionFact, type Grant, type Harness, type HarnessReadiness, type HistoryRecord, type InstalledWorkflow, type RepositoryBinding, type RepositorySource, type RunCloseReason, type RunParent, type RunView, type RunnerAdoptRequest, type RunnerDisconnectPreview, type RunnerDisconnectResponse, type RunnerFrame, type RunnerList, type RunnerListEntry, type RunnerReadiness, type RunsGoTo, SIZE_CLASS_CAPS, SIZE_CLASS_FORECASTS, type Scope, type SizeClass, type TeamDefault, type WorkflowIdentity, type WorkflowInstallReference, type WorkflowReference, abandonedConversationContinuationCapability, attemptCost, audienceSchema, buildCloseReasonSchema, canonicalJson, checkpointPathSchema, checkpointSchema, classOfCap, clientFrameSchema, commandSchema, connectAlreadyConnectedSchema, connectApproveRequestSchema, connectCodeAlphabet, connectCodeRequestSchema, connectCodeResponseSchema, connectCodeSchema, connectDenyRequestSchema, connectPendingResponseSchema, connectPollRequestSchema, connectRedeemRequestSchema, connectRedeemResponseSchema, connectStartRequestSchema, connectStartResponseSchema, controlRecordSchema, conversationContinuationCapability, delegationSchema, delegationTokenPrefix, grantSchema, harnessReadinessSchema, harnessSchema, historyRecordSchema, hubEpochRequestSchema, installReference, installedWorkflowsSchema, interruptionSchema, permissionAnswerSchema, protocolVersion, readableHistory, readinessFixCommand, repositoryAccessCapability, repositoryBindingSchema, repositoryRefSchema, repositorySourceSchema, repositoryWorkingDirectorySchema, runArtifactMaxBytes, runArtifactNameSchema, runCloseReasonSchema, runDelegationCapability, runKeySchema, runParentIntentSchema, runParentSchema, runSpecSchema, runViewSchema, runnerAdoptRequestSchema, runnerDisconnectPreviewSchema, runnerDisconnectRequestSchema, runnerDisconnectResponseSchema, runnerFrameSchema, runnerListEntrySchema, runnerListSchema, runnerReadinessSchema, runnerUpdateCommand, runnerUpdateRequestSchema, runsGoToSchema, sameWorkflow, scopeSchema, secretEnvironmentSchema, sequence, teamDefaultRequestSchema, teamDefaultSchema, workflowIdentitySchema, workflowInstallCapability, workflowName, workflowReferenceSchema, workflowSourceSchema };
|
|
1479
|
+
export { type Audience, type BuildCloseReason, type Checkpoint, type Command, type ConnectAlreadyConnected, type ConnectPendingResponse, type ConnectRedeemRequest, type ConnectRedeemResponse, type ConnectStartRequest, type ConnectStartResponse, type ControlRecord, type Delegation, type ExecutionFact, type Grant, type Harness, type HarnessReadiness, type HistoryRecord, type InstalledWorkflow, type RepositoryBinding, type RepositorySource, type RunCloseReason, type RunParent, type RunUsage, type RunView, type RunnerAdoptRequest, type RunnerDisconnectPreview, type RunnerDisconnectResponse, type RunnerFrame, type RunnerList, type RunnerListEntry, type RunnerReadiness, type RunsGoTo, SIZE_CLASS_CAPS, SIZE_CLASS_FORECASTS, type Scope, type SizeClass, type TeamDefault, type WorkflowIdentity, type WorkflowInstallReference, type WorkflowReference, abandonedConversationContinuationCapability, attemptCost, audienceSchema, buildCloseReasonSchema, canonicalJson, checkpointPathSchema, checkpointSchema, classOfCap, clientFrameSchema, commandSchema, connectAlreadyConnectedSchema, connectApproveRequestSchema, connectCodeAlphabet, connectCodeRequestSchema, connectCodeResponseSchema, connectCodeSchema, connectDenyRequestSchema, connectPendingResponseSchema, connectPollRequestSchema, connectRedeemRequestSchema, connectRedeemResponseSchema, connectStartRequestSchema, connectStartResponseSchema, controlRecordSchema, conversationContinuationCapability, delegationSchema, delegationTokenPrefix, forecastOfCap, grantSchema, harnessReadinessSchema, harnessSchema, historyRecordSchema, hubEpochRequestSchema, installReference, installedWorkflowsSchema, interruptionSchema, permissionAnswerSchema, protocolVersion, readableHistory, readinessFixCommand, repositoryAccessCapability, repositoryBindingSchema, repositoryRefSchema, repositorySourceSchema, repositoryWorkingDirectorySchema, runArtifactMaxBytes, runArtifactNameSchema, runCloseReasonSchema, runDelegationCapability, runKeySchema, runParentIntentSchema, runParentSchema, runSpecSchema, runUsageCapability, runUsageSchema, runViewSchema, runnerAdoptRequestSchema, runnerDisconnectPreviewSchema, runnerDisconnectRequestSchema, runnerDisconnectResponseSchema, runnerFrameSchema, runnerListEntrySchema, runnerListSchema, runnerReadinessSchema, runnerUpdateCommand, runnerUpdateRequestSchema, runsGoToSchema, sameWorkflow, scopeSchema, secretEnvironmentSchema, sequence, teamDefaultRequestSchema, teamDefaultSchema, workflowIdentitySchema, workflowInstallCapability, workflowName, workflowReferenceSchema, workflowSourceSchema };
|
package/dist/v2.js
CHANGED
|
@@ -63,19 +63,23 @@ function classOfCap(declaredCap) {
|
|
|
63
63
|
if (declaredCap <= SIZE_CLASS_CAPS.M) return "M";
|
|
64
64
|
return "L";
|
|
65
65
|
}
|
|
66
|
+
function forecastOfCap(declaredCap) {
|
|
67
|
+
return SIZE_CLASS_FORECASTS[classOfCap(declaredCap)];
|
|
68
|
+
}
|
|
66
69
|
function attemptCost(attempt) {
|
|
67
70
|
if (!attempt.closed) return attempt.tokenCap;
|
|
68
|
-
const forecast =
|
|
71
|
+
const forecast = forecastOfCap(attempt.tokenCap);
|
|
69
72
|
return attempt.tokenCap > 0 ? Math.min(attempt.tokenCap, forecast) : forecast;
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
// src/v2.ts
|
|
73
|
-
var protocolVersion = { major: 2, minor:
|
|
76
|
+
var protocolVersion = { major: 2, minor: 3 };
|
|
74
77
|
var conversationContinuationCapability = "conversation_continuation";
|
|
75
78
|
var abandonedConversationContinuationCapability = "abandoned_conversation_continuation";
|
|
76
79
|
var repositoryAccessCapability = "repository_checkout_v1";
|
|
77
80
|
var workflowInstallCapability = "workflow_install_v1";
|
|
78
81
|
var runDelegationCapability = "run_delegation_v1";
|
|
82
|
+
var runUsageCapability = "run_usage_v1";
|
|
79
83
|
var delegationTokenPrefix = "drisp_dlg_";
|
|
80
84
|
var runArtifactNameSchema = z.string().regex(/^[a-z][a-z0-9_]{0,63}$/);
|
|
81
85
|
var runArtifactMaxBytes = 64 * 1024;
|
|
@@ -155,6 +159,8 @@ var factIdentity = {
|
|
|
155
159
|
executionRevision: positive,
|
|
156
160
|
emittedAt: timestamp
|
|
157
161
|
};
|
|
162
|
+
var runUsageSchema = z.strictObject({ counted: sequence, cacheRead: sequence });
|
|
163
|
+
var reportedUsage = { usage: runUsageSchema.optional() };
|
|
158
164
|
var controlRecordSchema = z.discriminatedUnion("kind", [
|
|
159
165
|
/** Instance-scoped, not tied to a Run: the full replacement inventory of installed Workflows. */
|
|
160
166
|
z.strictObject({ kind: z.literal("workflows.changed"), workflows: installedWorkflowsSchema }),
|
|
@@ -185,7 +191,8 @@ var controlRecordSchema = z.discriminatedUnion("kind", [
|
|
|
185
191
|
z.strictObject({ kind: z.literal("local_checkpoint"), checkpointId: id }),
|
|
186
192
|
z.strictObject({ kind: z.literal("portable_checkpoint"), checkpointId: id }),
|
|
187
193
|
z.strictObject({ kind: z.literal("repair_required"), detail: z.string().max(4096) })
|
|
188
|
-
])
|
|
194
|
+
]),
|
|
195
|
+
...reportedUsage
|
|
189
196
|
}),
|
|
190
197
|
z.strictObject({
|
|
191
198
|
kind: z.literal("run.finished"),
|
|
@@ -198,8 +205,14 @@ var controlRecordSchema = z.discriminatedUnion("kind", [
|
|
|
198
205
|
* Why a Build Run failed, as its close reason (docs/specs/build-orchestrator.md). Sent only for a grant with
|
|
199
206
|
* `parent` or `delegationToken`, which only a Hub that knows this field issues.
|
|
200
207
|
*/
|
|
201
|
-
reason: buildCloseReasonSchema.optional()
|
|
208
|
+
reason: buildCloseReasonSchema.optional(),
|
|
209
|
+
...reportedUsage
|
|
202
210
|
}),
|
|
211
|
+
/**
|
|
212
|
+
* The usage of a Run while it executes, for a grant marked `reportUsage`. Not an execution fact: it carries no
|
|
213
|
+
* execution revision, so it never advances, parks or closes the Run, and never wakes its parent.
|
|
214
|
+
*/
|
|
215
|
+
z.strictObject({ kind: z.literal("run.usage"), runId: id, attemptId: id, ...runUsageSchema.shape }),
|
|
203
216
|
z.strictObject({ kind: z.literal("command.applied"), runId: id, attemptId: id, commandId: id }),
|
|
204
217
|
z.strictObject({
|
|
205
218
|
kind: z.literal("command.rejected"),
|
|
@@ -338,7 +351,9 @@ var grantSchema = z.strictObject({
|
|
|
338
351
|
/** This attempt's delegation token: only for a Run started with `delegation`, only to a `run_delegation_v1` Runner. */
|
|
339
352
|
delegationToken: z.string().min(32).max(256).optional(),
|
|
340
353
|
/** Copied from the start intent of a delegated child. */
|
|
341
|
-
parent: runParentSchema.optional()
|
|
354
|
+
parent: runParentSchema.optional(),
|
|
355
|
+
/** The runner reports this attempt's usage: set only for a `run_usage_v1` Runner. */
|
|
356
|
+
reportUsage: z.literal(true).optional()
|
|
342
357
|
});
|
|
343
358
|
var historyRecordSchema = z.strictObject({
|
|
344
359
|
eventId: id,
|
|
@@ -399,7 +414,13 @@ var runViewSchema = z.object({
|
|
|
399
414
|
label: z.string().max(160).optional(),
|
|
400
415
|
key: runKeySchema.optional(),
|
|
401
416
|
parent: runParentSchema.optional(),
|
|
402
|
-
|
|
417
|
+
/**
|
|
418
|
+
* Not strict, unlike the start intent's: a Hub keeps more on the Run's delegation (`initialTokenBudget`) than it
|
|
419
|
+
* shows, and a client never refuses a view for a field it does not read.
|
|
420
|
+
*/
|
|
421
|
+
delegation: z.object(delegationSchema.shape).optional(),
|
|
422
|
+
/** The largest cumulative usage the Run's Runner reported; absent until one does (an older Runner never does). */
|
|
423
|
+
usage: runUsageSchema.optional(),
|
|
403
424
|
/** Resolved by the runner at start; absent until the Run starts and for runners that predate reporting. */
|
|
404
425
|
workflow: workflowIdentitySchema.optional(),
|
|
405
426
|
execution: z.object({
|
|
@@ -650,6 +671,7 @@ export {
|
|
|
650
671
|
conversationContinuationCapability,
|
|
651
672
|
delegationSchema,
|
|
652
673
|
delegationTokenPrefix,
|
|
674
|
+
forecastOfCap,
|
|
653
675
|
grantSchema,
|
|
654
676
|
harnessReadinessSchema,
|
|
655
677
|
harnessSchema,
|
|
@@ -675,6 +697,8 @@ export {
|
|
|
675
697
|
runParentIntentSchema,
|
|
676
698
|
runParentSchema,
|
|
677
699
|
runSpecSchema,
|
|
700
|
+
runUsageCapability,
|
|
701
|
+
runUsageSchema,
|
|
678
702
|
runViewSchema,
|
|
679
703
|
runnerAdoptRequestSchema,
|
|
680
704
|
runnerDisconnectPreviewSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drisp/protocol",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4",
|
|
4
4
|
"description": "Wire contract between a drisp runner and the hub: zod schemas, inferred types, and JSON Schema for the instance-socket frames, Run, Turn, Interruption, and the event stream",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/schema/v2/grant.json
CHANGED
package/schema/v2/run.json
CHANGED
|
@@ -112,6 +112,26 @@
|
|
|
112
112
|
],
|
|
113
113
|
"additionalProperties": false
|
|
114
114
|
},
|
|
115
|
+
"usage": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"properties": {
|
|
118
|
+
"counted": {
|
|
119
|
+
"type": "integer",
|
|
120
|
+
"minimum": 0,
|
|
121
|
+
"maximum": 9007199254740991
|
|
122
|
+
},
|
|
123
|
+
"cacheRead": {
|
|
124
|
+
"type": "integer",
|
|
125
|
+
"minimum": 0,
|
|
126
|
+
"maximum": 9007199254740991
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"counted",
|
|
131
|
+
"cacheRead"
|
|
132
|
+
],
|
|
133
|
+
"additionalProperties": false
|
|
134
|
+
},
|
|
115
135
|
"workflow": {
|
|
116
136
|
"type": "object",
|
|
117
137
|
"properties": {
|
package/schema/v2/runner.json
CHANGED
|
@@ -720,6 +720,26 @@
|
|
|
720
720
|
"additionalProperties": false
|
|
721
721
|
}
|
|
722
722
|
]
|
|
723
|
+
},
|
|
724
|
+
"usage": {
|
|
725
|
+
"type": "object",
|
|
726
|
+
"properties": {
|
|
727
|
+
"counted": {
|
|
728
|
+
"type": "integer",
|
|
729
|
+
"minimum": 0,
|
|
730
|
+
"maximum": 9007199254740991
|
|
731
|
+
},
|
|
732
|
+
"cacheRead": {
|
|
733
|
+
"type": "integer",
|
|
734
|
+
"minimum": 0,
|
|
735
|
+
"maximum": 9007199254740991
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
"required": [
|
|
739
|
+
"counted",
|
|
740
|
+
"cacheRead"
|
|
741
|
+
],
|
|
742
|
+
"additionalProperties": false
|
|
723
743
|
}
|
|
724
744
|
},
|
|
725
745
|
"required": [
|
|
@@ -787,6 +807,26 @@
|
|
|
787
807
|
"build_not_approved",
|
|
788
808
|
"approval_question_missing"
|
|
789
809
|
]
|
|
810
|
+
},
|
|
811
|
+
"usage": {
|
|
812
|
+
"type": "object",
|
|
813
|
+
"properties": {
|
|
814
|
+
"counted": {
|
|
815
|
+
"type": "integer",
|
|
816
|
+
"minimum": 0,
|
|
817
|
+
"maximum": 9007199254740991
|
|
818
|
+
},
|
|
819
|
+
"cacheRead": {
|
|
820
|
+
"type": "integer",
|
|
821
|
+
"minimum": 0,
|
|
822
|
+
"maximum": 9007199254740991
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"required": [
|
|
826
|
+
"counted",
|
|
827
|
+
"cacheRead"
|
|
828
|
+
],
|
|
829
|
+
"additionalProperties": false
|
|
790
830
|
}
|
|
791
831
|
},
|
|
792
832
|
"required": [
|
|
@@ -800,6 +840,43 @@
|
|
|
800
840
|
],
|
|
801
841
|
"additionalProperties": false
|
|
802
842
|
},
|
|
843
|
+
{
|
|
844
|
+
"type": "object",
|
|
845
|
+
"properties": {
|
|
846
|
+
"kind": {
|
|
847
|
+
"type": "string",
|
|
848
|
+
"const": "run.usage"
|
|
849
|
+
},
|
|
850
|
+
"runId": {
|
|
851
|
+
"type": "string",
|
|
852
|
+
"minLength": 1,
|
|
853
|
+
"maxLength": 160
|
|
854
|
+
},
|
|
855
|
+
"attemptId": {
|
|
856
|
+
"type": "string",
|
|
857
|
+
"minLength": 1,
|
|
858
|
+
"maxLength": 160
|
|
859
|
+
},
|
|
860
|
+
"counted": {
|
|
861
|
+
"type": "integer",
|
|
862
|
+
"minimum": 0,
|
|
863
|
+
"maximum": 9007199254740991
|
|
864
|
+
},
|
|
865
|
+
"cacheRead": {
|
|
866
|
+
"type": "integer",
|
|
867
|
+
"minimum": 0,
|
|
868
|
+
"maximum": 9007199254740991
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
"required": [
|
|
872
|
+
"kind",
|
|
873
|
+
"runId",
|
|
874
|
+
"attemptId",
|
|
875
|
+
"counted",
|
|
876
|
+
"cacheRead"
|
|
877
|
+
],
|
|
878
|
+
"additionalProperties": false
|
|
879
|
+
},
|
|
803
880
|
{
|
|
804
881
|
"type": "object",
|
|
805
882
|
"properties": {
|