@nylorun/core 0.26.0-beta → 0.28.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 +54 -0
- package/README.md +6 -0
- package/dist/compatibility.d.ts +11 -2
- package/dist/compatibility.js +10 -0
- package/dist/contracts.d.ts +362 -0
- package/dist/contracts.js +131 -5
- package/dist/define.d.ts +2 -1
- package/dist/define.js +2 -1
- package/dist/definition/cron.d.ts +15 -0
- package/dist/definition/cron.js +155 -0
- package/dist/definition/sections.d.ts +11 -0
- package/dist/definition/sections.js +29 -20
- package/dist/folder/compile.d.ts +87 -0
- package/dist/folder/compile.js +1280 -0
- package/dist/folder/context.d.ts +97 -0
- package/dist/folder/context.js +79 -0
- package/dist/folder/decompile.d.ts +18 -0
- package/dist/folder/decompile.js +660 -0
- package/dist/folder/fix.d.ts +22 -0
- package/dist/folder/fix.js +191 -0
- package/dist/folder/flow.d.ts +42 -0
- package/dist/folder/flow.js +215 -0
- package/dist/folder/frontmatter.d.ts +21 -0
- package/dist/folder/frontmatter.js +91 -0
- package/dist/folder/index.d.ts +12 -0
- package/dist/folder/index.js +12 -0
- package/dist/folder/json-schema.d.ts +15 -0
- package/dist/folder/json-schema.js +212 -0
- package/dist/folder/json.d.ts +28 -0
- package/dist/folder/json.js +183 -0
- package/dist/folder/nested.d.ts +24 -0
- package/dist/folder/nested.js +378 -0
- package/dist/folder/plugins.d.ts +23 -0
- package/dist/folder/plugins.js +155 -0
- package/dist/folder/schemas.d.ts +8 -0
- package/dist/folder/schemas.js +238 -0
- package/dist/folder/suggest.d.ts +13 -0
- package/dist/folder/suggest.js +63 -0
- package/dist/schemas/agent-folder/agent-md.schema.json +143 -0
- package/dist/schemas/agent-folder/flow.schema.json +466 -0
- package/dist/schemas/agent-folder/mcp.schema.json +59 -0
- package/dist/schemas/agent-folder/runtime.schema.json +447 -0
- package/dist/schemas/agent-folder/tool.schema.json +77 -0
- package/dist/schemas/agent-folder/trigger-md.schema.json +65 -0
- package/dist/utils/runtime-limits.d.ts +8 -0
- package/dist/utils/runtime-limits.js +19 -0
- package/package.json +14 -3
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://docs.nylorun.com/schemas/agent-folder/v1/runtime.json",
|
|
4
|
+
"title": "Nylorun agent folder: runtime.json",
|
|
5
|
+
"description": "An agent folder's runtime.json: the runtime section of the agent manifest. kind is required unless extends names a file that gives it",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "This file's JSON Schema, for editors; the compiler leaves it out of the manifest"
|
|
12
|
+
},
|
|
13
|
+
"extends": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"description": "The path of a shared runtime file, relative to this one, merged under it (this file's keys win: objects merge, arrays replace) by nylorun apply and packFolder before upload"
|
|
17
|
+
},
|
|
18
|
+
"kind": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": [
|
|
21
|
+
"virtual",
|
|
22
|
+
"pod",
|
|
23
|
+
"none"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"image": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"resources": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"cpus": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"minimum": 1,
|
|
36
|
+
"maximum": 9007199254740991
|
|
37
|
+
},
|
|
38
|
+
"memory": {
|
|
39
|
+
"type": "string"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
},
|
|
44
|
+
"storage": {
|
|
45
|
+
"type": "string"
|
|
46
|
+
},
|
|
47
|
+
"network": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"allowedHosts": {
|
|
51
|
+
"type": "array",
|
|
52
|
+
"items": {
|
|
53
|
+
"type": "string"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
},
|
|
59
|
+
"lifecycle": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"idle": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
},
|
|
65
|
+
"deleteAfter": {
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
},
|
|
71
|
+
"setup": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"items": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"properties": {
|
|
76
|
+
"command": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"minLength": 1
|
|
79
|
+
},
|
|
80
|
+
"cwd": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"minLength": 1,
|
|
83
|
+
"maxLength": 1024
|
|
84
|
+
},
|
|
85
|
+
"timeout": {
|
|
86
|
+
"type": "string"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"required": [
|
|
90
|
+
"command"
|
|
91
|
+
],
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"files": {
|
|
96
|
+
"type": "array",
|
|
97
|
+
"items": {
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{
|
|
100
|
+
"type": "object",
|
|
101
|
+
"properties": {
|
|
102
|
+
"artifactId": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"version": {
|
|
106
|
+
"type": "integer",
|
|
107
|
+
"exclusiveMinimum": 0,
|
|
108
|
+
"maximum": 9007199254740991
|
|
109
|
+
},
|
|
110
|
+
"path": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"maxLength": 1024
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"required": [
|
|
117
|
+
"artifactId",
|
|
118
|
+
"version",
|
|
119
|
+
"path"
|
|
120
|
+
],
|
|
121
|
+
"additionalProperties": false
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"type": "object",
|
|
125
|
+
"properties": {
|
|
126
|
+
"path": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"minLength": 1,
|
|
129
|
+
"maxLength": 1024
|
|
130
|
+
},
|
|
131
|
+
"files": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"propertyNames": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"maxLength": 1024
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": {
|
|
139
|
+
"type": "string"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": [
|
|
144
|
+
"path",
|
|
145
|
+
"files"
|
|
146
|
+
],
|
|
147
|
+
"additionalProperties": false
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"limits": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"artifacts": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"properties": {
|
|
158
|
+
"fileBytes": {
|
|
159
|
+
"type": "integer",
|
|
160
|
+
"exclusiveMinimum": 0,
|
|
161
|
+
"maximum": 9007199254740991
|
|
162
|
+
},
|
|
163
|
+
"totalBytes": {
|
|
164
|
+
"type": "integer",
|
|
165
|
+
"exclusiveMinimum": 0,
|
|
166
|
+
"maximum": 9007199254740991
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"additionalProperties": false
|
|
170
|
+
},
|
|
171
|
+
"skills": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"properties": {
|
|
174
|
+
"totalBytes": {
|
|
175
|
+
"type": "integer",
|
|
176
|
+
"exclusiveMinimum": 0,
|
|
177
|
+
"maximum": 9007199254740991
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"additionalProperties": false
|
|
181
|
+
},
|
|
182
|
+
"disk": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"versionBytes": {
|
|
186
|
+
"type": "integer",
|
|
187
|
+
"exclusiveMinimum": 0,
|
|
188
|
+
"maximum": 9007199254740991
|
|
189
|
+
},
|
|
190
|
+
"versionEntries": {
|
|
191
|
+
"type": "integer",
|
|
192
|
+
"exclusiveMinimum": 0,
|
|
193
|
+
"maximum": 9007199254740991
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"additionalProperties": false
|
|
200
|
+
},
|
|
201
|
+
"secrets": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"propertyNames": {
|
|
204
|
+
"type": "string"
|
|
205
|
+
},
|
|
206
|
+
"additionalProperties": {
|
|
207
|
+
"oneOf": [
|
|
208
|
+
{
|
|
209
|
+
"type": "object",
|
|
210
|
+
"properties": {
|
|
211
|
+
"type": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"const": "environment_secret"
|
|
214
|
+
},
|
|
215
|
+
"allowedHosts": {
|
|
216
|
+
"minItems": 1,
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "string"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"inject": {
|
|
223
|
+
"type": "object",
|
|
224
|
+
"properties": {
|
|
225
|
+
"header": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
|
|
228
|
+
},
|
|
229
|
+
"format": {
|
|
230
|
+
"type": "string",
|
|
231
|
+
"minLength": 1
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"required": [
|
|
235
|
+
"header",
|
|
236
|
+
"format"
|
|
237
|
+
],
|
|
238
|
+
"additionalProperties": false
|
|
239
|
+
},
|
|
240
|
+
"required": {
|
|
241
|
+
"type": "boolean"
|
|
242
|
+
},
|
|
243
|
+
"description": {
|
|
244
|
+
"type": "string"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"required": [
|
|
248
|
+
"type",
|
|
249
|
+
"allowedHosts"
|
|
250
|
+
],
|
|
251
|
+
"additionalProperties": false
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"type": "object",
|
|
255
|
+
"properties": {
|
|
256
|
+
"type": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"const": "environment_variable"
|
|
259
|
+
},
|
|
260
|
+
"required": {
|
|
261
|
+
"type": "boolean"
|
|
262
|
+
},
|
|
263
|
+
"description": {
|
|
264
|
+
"type": "string"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": [
|
|
268
|
+
"type"
|
|
269
|
+
],
|
|
270
|
+
"additionalProperties": false
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "object",
|
|
274
|
+
"properties": {
|
|
275
|
+
"type": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"const": "bearer"
|
|
278
|
+
},
|
|
279
|
+
"url": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"minLength": 1
|
|
282
|
+
},
|
|
283
|
+
"via": {
|
|
284
|
+
"type": "string"
|
|
285
|
+
},
|
|
286
|
+
"identity": {
|
|
287
|
+
"type": "object",
|
|
288
|
+
"properties": {
|
|
289
|
+
"header": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"required": [
|
|
295
|
+
"header"
|
|
296
|
+
],
|
|
297
|
+
"additionalProperties": false
|
|
298
|
+
},
|
|
299
|
+
"required": {
|
|
300
|
+
"type": "boolean"
|
|
301
|
+
},
|
|
302
|
+
"description": {
|
|
303
|
+
"type": "string"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"required": [
|
|
307
|
+
"type",
|
|
308
|
+
"url"
|
|
309
|
+
],
|
|
310
|
+
"additionalProperties": false
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"type": "object",
|
|
314
|
+
"properties": {
|
|
315
|
+
"type": {
|
|
316
|
+
"type": "string",
|
|
317
|
+
"const": "headers"
|
|
318
|
+
},
|
|
319
|
+
"url": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"minLength": 1
|
|
322
|
+
},
|
|
323
|
+
"via": {
|
|
324
|
+
"type": "string"
|
|
325
|
+
},
|
|
326
|
+
"identity": {
|
|
327
|
+
"type": "object",
|
|
328
|
+
"properties": {
|
|
329
|
+
"header": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"pattern": "^[!#$%&'*+.^_`|~0-9A-Za-z-]+$"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"required": [
|
|
335
|
+
"header"
|
|
336
|
+
],
|
|
337
|
+
"additionalProperties": false
|
|
338
|
+
},
|
|
339
|
+
"required": {
|
|
340
|
+
"type": "boolean"
|
|
341
|
+
},
|
|
342
|
+
"description": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"required": [
|
|
347
|
+
"type",
|
|
348
|
+
"url"
|
|
349
|
+
],
|
|
350
|
+
"additionalProperties": false
|
|
351
|
+
}
|
|
352
|
+
]
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"triggers": {
|
|
356
|
+
"description": "What starts the Agent's turns with no client connected, by trigger id",
|
|
357
|
+
"type": "object",
|
|
358
|
+
"propertyNames": {
|
|
359
|
+
"type": "string",
|
|
360
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
|
|
361
|
+
"description": "A trigger's id, such as `hourly-check`"
|
|
362
|
+
},
|
|
363
|
+
"additionalProperties": {
|
|
364
|
+
"$ref": "#/$defs/Trigger"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"selfWake": {
|
|
368
|
+
"description": "Offer the agent schedule_wake: it books its session's next turn itself",
|
|
369
|
+
"type": "boolean"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"anyOf": [
|
|
373
|
+
{
|
|
374
|
+
"required": [
|
|
375
|
+
"kind"
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"required": [
|
|
380
|
+
"extends"
|
|
381
|
+
]
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
"$defs": {
|
|
385
|
+
"Trigger": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"properties": {
|
|
388
|
+
"schedule": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"pattern": "^\\S+(\\s+\\S+){4}$"
|
|
391
|
+
},
|
|
392
|
+
"timezone": {
|
|
393
|
+
"type": "string",
|
|
394
|
+
"minLength": 1
|
|
395
|
+
},
|
|
396
|
+
"at": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"format": "date-time",
|
|
399
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
|
|
400
|
+
},
|
|
401
|
+
"webhook": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"enum": [
|
|
404
|
+
"standard-webhooks"
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
"session": {
|
|
408
|
+
"type": "string",
|
|
409
|
+
"minLength": 1,
|
|
410
|
+
"maxLength": 200
|
|
411
|
+
},
|
|
412
|
+
"prompt": {
|
|
413
|
+
"type": "string",
|
|
414
|
+
"minLength": 1
|
|
415
|
+
}
|
|
416
|
+
},
|
|
417
|
+
"required": [
|
|
418
|
+
"session",
|
|
419
|
+
"prompt"
|
|
420
|
+
],
|
|
421
|
+
"additionalProperties": false,
|
|
422
|
+
"oneOf": [
|
|
423
|
+
{
|
|
424
|
+
"required": [
|
|
425
|
+
"schedule"
|
|
426
|
+
]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"required": [
|
|
430
|
+
"at"
|
|
431
|
+
],
|
|
432
|
+
"properties": {
|
|
433
|
+
"timezone": false
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
"required": [
|
|
438
|
+
"webhook"
|
|
439
|
+
],
|
|
440
|
+
"properties": {
|
|
441
|
+
"timezone": false
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://docs.nylorun.com/schemas/agent-folder/v1/tool.json",
|
|
4
|
+
"title": "Nylorun agent folder: tools/<name>.json",
|
|
5
|
+
"description": "An HTTP tool of an agent folder, tools/<name>.json: its file name is the tool's name",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "This file's JSON Schema, for editors; the compiler leaves it out of the manifest"
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "What the tool does, for the model"
|
|
15
|
+
},
|
|
16
|
+
"inputSchema": {
|
|
17
|
+
"$ref": "#/$defs/JsonSchemaOrPath",
|
|
18
|
+
"description": "The JSON Schema of the tool's input"
|
|
19
|
+
},
|
|
20
|
+
"outputSchema": {
|
|
21
|
+
"$ref": "#/$defs/JsonSchemaOrPath",
|
|
22
|
+
"description": "The JSON Schema of the tool's output"
|
|
23
|
+
},
|
|
24
|
+
"http": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"url": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"method": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"enum": [
|
|
33
|
+
"GET",
|
|
34
|
+
"POST",
|
|
35
|
+
"PUT",
|
|
36
|
+
"PATCH",
|
|
37
|
+
"DELETE"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"credential": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"minLength": 1
|
|
43
|
+
},
|
|
44
|
+
"timeoutMs": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"exclusiveMinimum": 0,
|
|
47
|
+
"maximum": 2147483647
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"url"
|
|
52
|
+
],
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"description": "The request the tool makes; credential names the bearer slot it authenticates with"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"required": [
|
|
58
|
+
"inputSchema",
|
|
59
|
+
"http"
|
|
60
|
+
],
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"$defs": {
|
|
63
|
+
"JsonSchemaOrPath": {
|
|
64
|
+
"anyOf": [
|
|
65
|
+
{
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "\\.json$",
|
|
68
|
+
"description": "The path of a JSON Schema file in the folder (./output.schema.json; /schemas/x.json from the uploaded folder's root), named *.schema.json or kept under schemas/"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "object",
|
|
72
|
+
"description": "A JSON Schema (2020-12), inline"
|
|
73
|
+
}
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://docs.nylorun.com/schemas/agent-folder/v1/trigger-md.json",
|
|
4
|
+
"title": "Nylorun agent folder: trigger frontmatter",
|
|
5
|
+
"description": "The frontmatter of a trigger of an agent folder, triggers/<id>.md: exactly one of schedule, at and webhook, and the session; the body below it is the prompt",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"schedule": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"pattern": "^\\S+(\\s+\\S+){4}$",
|
|
11
|
+
"description": "Five cron fields: minute hour day-of-month month day-of-week, in timezone"
|
|
12
|
+
},
|
|
13
|
+
"timezone": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"description": "The schedule's IANA time zone, such as Asia/Kolkata; UTC without one"
|
|
17
|
+
},
|
|
18
|
+
"at": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "date-time",
|
|
21
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
|
|
22
|
+
"description": "One run, at an RFC 3339 time with an offset"
|
|
23
|
+
},
|
|
24
|
+
"webhook": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": [
|
|
27
|
+
"standard-webhooks"
|
|
28
|
+
],
|
|
29
|
+
"description": "A webhook endpoint, verified with this signature scheme"
|
|
30
|
+
},
|
|
31
|
+
"session": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 1,
|
|
34
|
+
"maxLength": 200,
|
|
35
|
+
"description": "The session each run goes to: a session id, or new for a new one per run"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": [
|
|
39
|
+
"session"
|
|
40
|
+
],
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"oneOf": [
|
|
43
|
+
{
|
|
44
|
+
"required": [
|
|
45
|
+
"schedule"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"required": [
|
|
50
|
+
"at"
|
|
51
|
+
],
|
|
52
|
+
"properties": {
|
|
53
|
+
"timezone": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"required": [
|
|
58
|
+
"webhook"
|
|
59
|
+
],
|
|
60
|
+
"properties": {
|
|
61
|
+
"timezone": false
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
@@ -137,6 +137,11 @@ export declare const LINUX_ARG_MAX_BYTES: number;
|
|
|
137
137
|
* - `flowConcurrency`: the most effects one flow turn runs at once; the rest wait their turn.
|
|
138
138
|
* - `flowMapItems`: the most items one map stage may fan out to (`map.too-many-items` past it).
|
|
139
139
|
* - `flowLoopIterations`: the most iterations one loop stage runs (`loop.too-many-iterations`).
|
|
140
|
+
*
|
|
141
|
+
* Agent folders (track T7, checked when a folder is saved, and by the compiler):
|
|
142
|
+
* - `folderFiles`: the most files one agent folder holds.
|
|
143
|
+
* - `folderBytes`: the most bytes its files hold together.
|
|
144
|
+
* - `folderTextFileBytes`: the largest Markdown or JSON file of a folder the compiler reads.
|
|
140
145
|
*/
|
|
141
146
|
export declare const RuntimeLimitsSchema: z.ZodObject<{
|
|
142
147
|
recordEntryBytes: z.ZodNumber;
|
|
@@ -209,6 +214,9 @@ export declare const RuntimeLimitsSchema: z.ZodObject<{
|
|
|
209
214
|
flowConcurrency: z.ZodNumber;
|
|
210
215
|
flowMapItems: z.ZodNumber;
|
|
211
216
|
flowLoopIterations: z.ZodNumber;
|
|
217
|
+
folderFiles: z.ZodNumber;
|
|
218
|
+
folderBytes: z.ZodNumber;
|
|
219
|
+
folderTextFileBytes: z.ZodNumber;
|
|
212
220
|
}, z.core.$strict>;
|
|
213
221
|
export type RuntimeLimits = z.infer<typeof RuntimeLimitsSchema>;
|
|
214
222
|
export type RuntimeLimit = keyof RuntimeLimits;
|
|
@@ -180,6 +180,11 @@ const harnessLimits = {
|
|
|
180
180
|
* - `flowConcurrency`: the most effects one flow turn runs at once; the rest wait their turn.
|
|
181
181
|
* - `flowMapItems`: the most items one map stage may fan out to (`map.too-many-items` past it).
|
|
182
182
|
* - `flowLoopIterations`: the most iterations one loop stage runs (`loop.too-many-iterations`).
|
|
183
|
+
*
|
|
184
|
+
* Agent folders (track T7, checked when a folder is saved, and by the compiler):
|
|
185
|
+
* - `folderFiles`: the most files one agent folder holds.
|
|
186
|
+
* - `folderBytes`: the most bytes its files hold together.
|
|
187
|
+
* - `folderTextFileBytes`: the largest Markdown or JSON file of a folder the compiler reads.
|
|
183
188
|
*/
|
|
184
189
|
export const RuntimeLimitsSchema = z
|
|
185
190
|
.object({
|
|
@@ -247,6 +252,9 @@ export const RuntimeLimitsSchema = z
|
|
|
247
252
|
flowConcurrency: z.number().int().positive(),
|
|
248
253
|
flowMapItems: z.number().int().positive(),
|
|
249
254
|
flowLoopIterations: z.number().int().positive(),
|
|
255
|
+
folderFiles: z.number().int().positive(),
|
|
256
|
+
folderBytes: z.number().int().positive(),
|
|
257
|
+
folderTextFileBytes: z.number().int().positive(),
|
|
250
258
|
})
|
|
251
259
|
.strict();
|
|
252
260
|
/**
|
|
@@ -449,6 +457,13 @@ export const RUNTIME_LIMIT_CEILINGS = {
|
|
|
449
457
|
flowConcurrency: counted("effects", "running effects are counted"),
|
|
450
458
|
flowMapItems: counted("entries", "items are counted"),
|
|
451
459
|
flowLoopIterations: counted("iterations", "iterations are counted"),
|
|
460
|
+
folderFiles: inRequest("a folder's files", { path: "a", size: 0, sha256: "0".repeat(64) }),
|
|
461
|
+
folderBytes: counted("bytes", "the files' sizes are added up"),
|
|
462
|
+
folderTextFileBytes: {
|
|
463
|
+
value: JS_STRING_MAX_LENGTH,
|
|
464
|
+
unit: "bytes",
|
|
465
|
+
why: `the compiler reads a file as one string, of at most ${JS_STRING_MAX_LENGTH} characters`,
|
|
466
|
+
},
|
|
452
467
|
};
|
|
453
468
|
/**
|
|
454
469
|
* The limits a Tenant that sets none runs with: today's sizes and times. `recordEntryBytes` is
|
|
@@ -527,6 +542,10 @@ export const RUNTIME_LIMIT_DEFAULTS = Object.freeze({
|
|
|
527
542
|
flowConcurrency: 8,
|
|
528
543
|
flowMapItems: 1_000,
|
|
529
544
|
flowLoopIterations: 100,
|
|
545
|
+
// T6's fixed values (`AGENT_FOLDER_LIMITS` in `@nylorun/core/folder`).
|
|
546
|
+
folderFiles: 2_000,
|
|
547
|
+
folderBytes: 50 * 1024 * 1024,
|
|
548
|
+
folderTextFileBytes: 1024 * 1024,
|
|
530
549
|
});
|
|
531
550
|
/** The Runtime limits a harness gets when the Tenant sets none. */
|
|
532
551
|
export const HARNESS_LIMIT_DEFAULTS = Object.freeze(harnessLimitsOf(RUNTIME_LIMIT_DEFAULTS));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nylorun/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0-beta",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"description": "Shared agent definitions and wire contracts",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"prepack": "npm run build"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@noble/hashes": "^2.4.0"
|
|
33
|
+
"@noble/hashes": "^2.4.0",
|
|
34
|
+
"yaml": "^2.9.1"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
36
37
|
"@types/node": "^26.6.5",
|
|
@@ -71,9 +72,19 @@
|
|
|
71
72
|
"types": "./dist/manifest-schemas.d.ts",
|
|
72
73
|
"import": "./dist/manifest-schemas.js"
|
|
73
74
|
},
|
|
75
|
+
"./folder": {
|
|
76
|
+
"types": "./dist/folder/index.d.ts",
|
|
77
|
+
"import": "./dist/folder/index.js"
|
|
78
|
+
},
|
|
74
79
|
"./schemas/agent-manifest.json": "./dist/schemas/agent-manifest.schema.json",
|
|
75
80
|
"./schemas/harness-manifest.json": "./dist/schemas/harness-manifest.schema.json",
|
|
76
|
-
"./schemas/runtime-manifest.json": "./dist/schemas/runtime-manifest.schema.json"
|
|
81
|
+
"./schemas/runtime-manifest.json": "./dist/schemas/runtime-manifest.schema.json",
|
|
82
|
+
"./schemas/agent-folder-agent-md.json": "./dist/schemas/agent-folder/agent-md.schema.json",
|
|
83
|
+
"./schemas/agent-folder-trigger-md.json": "./dist/schemas/agent-folder/trigger-md.schema.json",
|
|
84
|
+
"./schemas/agent-folder-runtime.json": "./dist/schemas/agent-folder/runtime.schema.json",
|
|
85
|
+
"./schemas/agent-folder-tool.json": "./dist/schemas/agent-folder/tool.schema.json",
|
|
86
|
+
"./schemas/agent-folder-mcp.json": "./dist/schemas/agent-folder/mcp.schema.json",
|
|
87
|
+
"./schemas/agent-folder-flow.json": "./dist/schemas/agent-folder/flow.schema.json"
|
|
77
88
|
},
|
|
78
89
|
"peerDependencies": {
|
|
79
90
|
"zod": "^4.6.7"
|