@cloudhal/core-contracts 0.3.3 → 0.3.5
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/package.json +1 -1
- package/schemas/.bundled/analytics-beacon.schema.json +0 -132
- package/schemas/.bundled/analytics-event.schema.json +0 -411
- package/schemas/.bundled/asset.schema.json +0 -519
- package/schemas/.bundled/automation.schema.json +0 -334
- package/schemas/.bundled/comment-submission.schema.json +0 -172
- package/schemas/.bundled/comment.schema.json +0 -425
- package/schemas/.bundled/content-entry.schema.json +0 -514
- package/schemas/.bundled/glossary.schema.json +0 -139
- package/schemas/.bundled/menu.schema.json +0 -371
- package/schemas/.bundled/page.schema.json +0 -738
- package/schemas/.bundled/project.schema.json +0 -97
- package/schemas/.bundled/redirect.schema.json +0 -152
- package/schemas/.bundled/release.schema.json +0 -639
- package/schemas/.bundled/schedule-run.schema.json +0 -310
- package/schemas/.bundled/section.schema.json +0 -434
- package/schemas/.bundled/site.schema.json +0 -1050
- package/schemas/.bundled/skill-manifest.schema.json +0 -51
- package/schemas/.bundled/snapshot.schema.json +0 -192
- package/schemas/.bundled/taxonomy.schema.json +0 -200
- package/schemas/.bundled/term.schema.json +0 -315
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://cloudhal.dev/schemas/v1/schedule-run.schema.json",
|
|
4
|
-
"title": "ScheduleRun",
|
|
5
|
-
"description": "One occurrence of something scheduled (RFC-0008): a release's execution or an automation's run. Its id is derived from the subject and `occurrenceAt`, so a second scheduler tick that reaches the same occurrence finds the same row and the effect happens at most once. `state` says whether the run itself completed; `outcome` says whether it did any work, because a run that ended cleanly may still have done nothing. Runs live in D1 and are kept 90 days; the audit log keeps what each call did.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"additionalProperties": false,
|
|
8
|
-
"required": [
|
|
9
|
-
"schemaVersion",
|
|
10
|
-
"id",
|
|
11
|
-
"siteId",
|
|
12
|
-
"subject",
|
|
13
|
-
"occurrenceAt",
|
|
14
|
-
"state",
|
|
15
|
-
"attempt",
|
|
16
|
-
"createdAt",
|
|
17
|
-
"updatedAt",
|
|
18
|
-
"rev"
|
|
19
|
-
],
|
|
20
|
-
"properties": {
|
|
21
|
-
"schemaVersion": {
|
|
22
|
-
"$ref": "#/$defs/SchemaVersion"
|
|
23
|
-
},
|
|
24
|
-
"id": {
|
|
25
|
-
"$ref": "#/$defs/ScheduleRunId"
|
|
26
|
-
},
|
|
27
|
-
"siteId": {
|
|
28
|
-
"$ref": "#/$defs/Id"
|
|
29
|
-
},
|
|
30
|
-
"subject": {
|
|
31
|
-
"$ref": "#/$defs/ScheduleRunSubject"
|
|
32
|
-
},
|
|
33
|
-
"occurrenceAt": {
|
|
34
|
-
"$ref": "#/$defs/Timestamp"
|
|
35
|
-
},
|
|
36
|
-
"state": {
|
|
37
|
-
"$ref": "#/$defs/ScheduleRunState"
|
|
38
|
-
},
|
|
39
|
-
"outcome": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "What the run achieved, separately from whether it completed: `did-work` changed something or produced findings; `nothing-to-do`; `proposed` left drafts or proposals for people; `waiting-approval` filed requests a person must decide.",
|
|
42
|
-
"enum": [
|
|
43
|
-
"did-work",
|
|
44
|
-
"nothing-to-do",
|
|
45
|
-
"proposed",
|
|
46
|
-
"waiting-approval"
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
"trigger": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"description": "What woke the scheduler: the every-minute cron trigger, the Durable Object clock's alarm, an admin request (backstop), the Node timer, or a person (\"Run now\", \"Publish now\").",
|
|
52
|
-
"enum": [
|
|
53
|
-
"cron",
|
|
54
|
-
"alarm",
|
|
55
|
-
"request",
|
|
56
|
-
"node",
|
|
57
|
-
"manual"
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
"attempt": {
|
|
61
|
-
"type": "integer",
|
|
62
|
-
"minimum": 1
|
|
63
|
-
},
|
|
64
|
-
"startedAt": {
|
|
65
|
-
"$ref": "#/$defs/Timestamp"
|
|
66
|
-
},
|
|
67
|
-
"endedAt": {
|
|
68
|
-
"$ref": "#/$defs/Timestamp"
|
|
69
|
-
},
|
|
70
|
-
"latenessSeconds": {
|
|
71
|
-
"type": "integer",
|
|
72
|
-
"minimum": 0
|
|
73
|
-
},
|
|
74
|
-
"adjusted": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "The occurrence was moved: `dst-gap` (the wall-clock time did not exist that day, so it ran at the next valid minute) or `tzdata` (the zone's rules changed after it was planned).",
|
|
77
|
-
"enum": [
|
|
78
|
-
"dst-gap",
|
|
79
|
-
"tzdata"
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
|
-
"window": {
|
|
83
|
-
"$ref": "#/$defs/ScheduleRunWindow"
|
|
84
|
-
},
|
|
85
|
-
"usage": {
|
|
86
|
-
"$ref": "#/$defs/ScheduleRunUsage"
|
|
87
|
-
},
|
|
88
|
-
"taint": {
|
|
89
|
-
"$ref": "#/$defs/ScheduleRunTaint"
|
|
90
|
-
},
|
|
91
|
-
"summary": {
|
|
92
|
-
"type": "string",
|
|
93
|
-
"description": "The agent's own account of the run (`end_run`) or the built-in job's report line. Plain text written by an agent: Studio renders it as text and never as an instruction.",
|
|
94
|
-
"maxLength": 2000,
|
|
95
|
-
"pattern": "^[^\\x00-\\x08\\x0B-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$"
|
|
96
|
-
},
|
|
97
|
-
"counts": {
|
|
98
|
-
"type": "object",
|
|
99
|
-
"description": "Findings by name (e.g. `broken-links`, `stale-entries`, `proposals`).",
|
|
100
|
-
"propertyNames": {
|
|
101
|
-
"type": "string",
|
|
102
|
-
"pattern": "^[a-z][a-z0-9-]{0,40}$"
|
|
103
|
-
},
|
|
104
|
-
"maxProperties": 20,
|
|
105
|
-
"additionalProperties": {
|
|
106
|
-
"type": "integer",
|
|
107
|
-
"minimum": 0
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"approvalIds": {
|
|
111
|
-
"type": "array",
|
|
112
|
-
"description": "Approval requests the run filed.",
|
|
113
|
-
"items": {
|
|
114
|
-
"$ref": "#/$defs/Id"
|
|
115
|
-
},
|
|
116
|
-
"uniqueItems": true,
|
|
117
|
-
"maxItems": 50
|
|
118
|
-
},
|
|
119
|
-
"error": {
|
|
120
|
-
"$ref": "#/$defs/ScheduleRunError"
|
|
121
|
-
},
|
|
122
|
-
"createdAt": {
|
|
123
|
-
"$ref": "#/$defs/Timestamp"
|
|
124
|
-
},
|
|
125
|
-
"updatedAt": {
|
|
126
|
-
"$ref": "#/$defs/Timestamp"
|
|
127
|
-
},
|
|
128
|
-
"rev": {
|
|
129
|
-
"$ref": "#/$defs/Revision"
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
"$defs": {
|
|
133
|
-
"Id": {
|
|
134
|
-
"type": "string",
|
|
135
|
-
"description": "Prefixed, URL-safe identifier, e.g. site_01HZX8K3Q9. The prefix names the entity kind; agents and the MCP server pass these as opaque handles.",
|
|
136
|
-
"pattern": "^[a-z]+_[A-Za-z0-9]{6,32}$",
|
|
137
|
-
"minLength": 8,
|
|
138
|
-
"maxLength": 48
|
|
139
|
-
},
|
|
140
|
-
"Revision": {
|
|
141
|
-
"type": "integer",
|
|
142
|
-
"description": "Monotonic per-node revision used for optimistic locking (compare-and-swap on write).",
|
|
143
|
-
"minimum": 0
|
|
144
|
-
},
|
|
145
|
-
"ScheduleRunError": {
|
|
146
|
-
"type": "object",
|
|
147
|
-
"additionalProperties": false,
|
|
148
|
-
"required": [
|
|
149
|
-
"code"
|
|
150
|
-
],
|
|
151
|
-
"properties": {
|
|
152
|
-
"code": {
|
|
153
|
-
"type": "string",
|
|
154
|
-
"pattern": "^[a-z][a-z0-9_]{0,63}$"
|
|
155
|
-
},
|
|
156
|
-
"message": {
|
|
157
|
-
"type": "string",
|
|
158
|
-
"maxLength": 500,
|
|
159
|
-
"pattern": "^[^\\x00-\\x1F\\x7F\\u202A-\\u202E\\u2066-\\u2069]*$"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"ScheduleRunId": {
|
|
164
|
-
"type": "string",
|
|
165
|
-
"description": "A run id: `run_` and 6 to 32 letters or digits, derived from the subject id and `occurrenceAt` (the occurrence's idempotency key).",
|
|
166
|
-
"pattern": "^run_[A-Za-z0-9]{6,32}$"
|
|
167
|
-
},
|
|
168
|
-
"ScheduleRunState": {
|
|
169
|
-
"type": "string",
|
|
170
|
-
"description": "`due`: claimed occurrence not started yet; `ready`: an agent task's window is open and waits for `begin_run`; `running`; `succeeded`; `failed`; `missed`: the window closed or the scheduler came too late; `skipped`: a missed occurrence coalesced into a later one; `budget-exceeded`; `killed`: stopped by a pause or a kill switch.",
|
|
171
|
-
"enum": [
|
|
172
|
-
"due",
|
|
173
|
-
"ready",
|
|
174
|
-
"running",
|
|
175
|
-
"succeeded",
|
|
176
|
-
"failed",
|
|
177
|
-
"missed",
|
|
178
|
-
"skipped",
|
|
179
|
-
"budget-exceeded",
|
|
180
|
-
"killed"
|
|
181
|
-
]
|
|
182
|
-
},
|
|
183
|
-
"ScheduleRunSubject": {
|
|
184
|
-
"description": "What ran, discriminated by `kind`.",
|
|
185
|
-
"oneOf": [
|
|
186
|
-
{
|
|
187
|
-
"type": "object",
|
|
188
|
-
"title": "ReleaseRunSubject",
|
|
189
|
-
"additionalProperties": false,
|
|
190
|
-
"required": [
|
|
191
|
-
"kind",
|
|
192
|
-
"releaseId"
|
|
193
|
-
],
|
|
194
|
-
"properties": {
|
|
195
|
-
"kind": {
|
|
196
|
-
"type": "string",
|
|
197
|
-
"enum": [
|
|
198
|
-
"release"
|
|
199
|
-
]
|
|
200
|
-
},
|
|
201
|
-
"releaseId": {
|
|
202
|
-
"type": "string",
|
|
203
|
-
"pattern": "^rel_[A-Za-z0-9]{6,32}$"
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"type": "object",
|
|
209
|
-
"title": "AutomationRunSubject",
|
|
210
|
-
"additionalProperties": false,
|
|
211
|
-
"required": [
|
|
212
|
-
"kind",
|
|
213
|
-
"automationId",
|
|
214
|
-
"job"
|
|
215
|
-
],
|
|
216
|
-
"properties": {
|
|
217
|
-
"kind": {
|
|
218
|
-
"type": "string",
|
|
219
|
-
"enum": [
|
|
220
|
-
"automation"
|
|
221
|
-
]
|
|
222
|
-
},
|
|
223
|
-
"automationId": {
|
|
224
|
-
"type": "string",
|
|
225
|
-
"pattern": "^aut_[A-Za-z0-9]{6,32}$"
|
|
226
|
-
},
|
|
227
|
-
"job": {
|
|
228
|
-
"type": "string",
|
|
229
|
-
"enum": [
|
|
230
|
-
"builtin",
|
|
231
|
-
"agent-task"
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
]
|
|
237
|
-
},
|
|
238
|
-
"ScheduleRunTaint": {
|
|
239
|
-
"type": "object",
|
|
240
|
-
"description": "The run read visitor-supplied text at `at` through `tool`; from then on it may only read, label, hide and pause.",
|
|
241
|
-
"additionalProperties": false,
|
|
242
|
-
"required": [
|
|
243
|
-
"at",
|
|
244
|
-
"tool"
|
|
245
|
-
],
|
|
246
|
-
"properties": {
|
|
247
|
-
"at": {
|
|
248
|
-
"$ref": "#/$defs/Timestamp"
|
|
249
|
-
},
|
|
250
|
-
"tool": {
|
|
251
|
-
"type": "string",
|
|
252
|
-
"pattern": "^[a-z][a-z0-9_]{0,63}$"
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
},
|
|
256
|
-
"ScheduleRunUsage": {
|
|
257
|
-
"type": "object",
|
|
258
|
-
"description": "What the run used against its budget, counted by the server.",
|
|
259
|
-
"additionalProperties": false,
|
|
260
|
-
"required": [
|
|
261
|
-
"toolCalls",
|
|
262
|
-
"writes",
|
|
263
|
-
"approvalRequests"
|
|
264
|
-
],
|
|
265
|
-
"properties": {
|
|
266
|
-
"toolCalls": {
|
|
267
|
-
"type": "integer",
|
|
268
|
-
"minimum": 0
|
|
269
|
-
},
|
|
270
|
-
"writes": {
|
|
271
|
-
"type": "integer",
|
|
272
|
-
"minimum": 0
|
|
273
|
-
},
|
|
274
|
-
"approvalRequests": {
|
|
275
|
-
"type": "integer",
|
|
276
|
-
"minimum": 0
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
|
-
"ScheduleRunWindow": {
|
|
281
|
-
"type": "object",
|
|
282
|
-
"description": "An agent task's run window: the automation's key is valid only between `opensAt` and `closesAt`, and only inside a run it began.",
|
|
283
|
-
"additionalProperties": false,
|
|
284
|
-
"required": [
|
|
285
|
-
"opensAt",
|
|
286
|
-
"closesAt"
|
|
287
|
-
],
|
|
288
|
-
"properties": {
|
|
289
|
-
"opensAt": {
|
|
290
|
-
"$ref": "#/$defs/Timestamp"
|
|
291
|
-
},
|
|
292
|
-
"closesAt": {
|
|
293
|
-
"$ref": "#/$defs/Timestamp"
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
"SchemaVersion": {
|
|
298
|
-
"type": "integer",
|
|
299
|
-
"description": "Version of this contract. Readers reject unknown versions; migrations move documents forward one version at a time.",
|
|
300
|
-
"enum": [
|
|
301
|
-
1
|
|
302
|
-
]
|
|
303
|
-
},
|
|
304
|
-
"Timestamp": {
|
|
305
|
-
"type": "string",
|
|
306
|
-
"description": "RFC 3339 / ISO 8601 instant in UTC.",
|
|
307
|
-
"format": "date-time"
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
}
|