@nylorun/core 0.33.0-beta → 0.35.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/dist/compatibility.d.ts +25 -1
  3. package/dist/compatibility.js +24 -0
  4. package/dist/contracts.d.ts +749 -17
  5. package/dist/contracts.js +360 -22
  6. package/dist/define.d.ts +1 -1
  7. package/dist/define.js +1 -1
  8. package/dist/definition/assemble.d.ts +2 -1
  9. package/dist/definition/assemble.js +1 -0
  10. package/dist/definition/from.js +1 -0
  11. package/dist/definition/manifest.d.ts +2 -1
  12. package/dist/definition/manifest.js +1 -0
  13. package/dist/definition/sections.d.ts +1 -1
  14. package/dist/definition/sections.js +5 -1
  15. package/dist/definition/variant.d.ts +16 -1
  16. package/dist/definition/variant.js +81 -3
  17. package/dist/engine/blocks.d.ts +54 -0
  18. package/dist/engine/blocks.js +162 -0
  19. package/dist/engine/explain.d.ts +36 -0
  20. package/dist/engine/explain.js +113 -0
  21. package/dist/engine/features.d.ts +28 -0
  22. package/dist/engine/features.js +34 -0
  23. package/dist/engine/index.d.ts +14 -0
  24. package/dist/engine/index.js +14 -0
  25. package/dist/engine/mcp.d.ts +119 -0
  26. package/dist/engine/mcp.js +267 -0
  27. package/dist/engine/names.d.ts +12 -0
  28. package/dist/engine/names.js +26 -0
  29. package/dist/engine/preview.d.ts +93 -0
  30. package/dist/engine/preview.js +120 -0
  31. package/dist/engine/projection.d.ts +63 -0
  32. package/dist/engine/projection.js +109 -0
  33. package/dist/engine/tools.d.ts +118 -0
  34. package/dist/engine/tools.js +508 -0
  35. package/dist/folder/compile.d.ts +11 -4
  36. package/dist/folder/compile.js +126 -13
  37. package/dist/folder/context.d.ts +5 -0
  38. package/dist/folder/decompile.js +22 -1
  39. package/dist/folder/engine.d.ts +73 -0
  40. package/dist/folder/engine.js +224 -0
  41. package/dist/folder/nested.js +6 -0
  42. package/dist/folder/schemas.js +47 -3
  43. package/dist/harness-api/harness-api.schema.json +29 -7
  44. package/dist/harness-api/json-schema.js +6 -2
  45. package/dist/harness-api/messages.d.ts +4 -2
  46. package/dist/harness-api/messages.js +4 -1
  47. package/dist/harness-api/schema.d.ts +15 -4
  48. package/dist/harness-api/schema.js +20 -4
  49. package/dist/manifest-schemas.js +9 -4
  50. package/dist/schemas/agent-folder/agent-md.schema.json +84 -3
  51. package/dist/schemas/agent-folder/runtime.schema.json +34 -1
  52. package/dist/schemas/agent-manifest.schema.json +166 -1
  53. package/dist/schemas/harness-manifest.schema.json +130 -1
  54. package/dist/schemas/runtime-manifest.schema.json +34 -1
  55. package/dist/types/manifest.d.ts +49 -0
  56. package/package.json +5 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.nylorun.com/schemas/agent-manifest/v8.1.json",
3
+ "$id": "https://docs.nylorun.com/schemas/agent-manifest/v8.3.json",
4
4
  "title": "Nylorun agent manifest 8",
5
5
  "type": "object",
6
6
  "properties": {
@@ -277,6 +277,10 @@
277
277
  "description": "What this agent should remember, after the engine's own memory rules",
278
278
  "type": "string",
279
279
  "maxLength": 4096
280
+ },
281
+ "index": {
282
+ "description": "agent-folder/2: false pins no memory index in a session. Default true",
283
+ "type": "boolean"
280
284
  }
281
285
  },
282
286
  "additionalProperties": false
@@ -287,6 +291,9 @@
287
291
  "pattern": "^[A-Za-z0-9._-]+\\/\\S+$",
288
292
  "description": "The model the agent runs on: <provider>/<model>, such as anthropic/claude-sonnet-4-5"
289
293
  },
294
+ "engine": {
295
+ "$ref": "#/$defs/HarnessEngine"
296
+ },
290
297
  "credentials": {
291
298
  "type": "object",
292
299
  "propertyNames": {
@@ -538,6 +545,27 @@
538
545
  }
539
546
  },
540
547
  "additionalProperties": false
548
+ },
549
+ "triggers": {
550
+ "type": "object",
551
+ "properties": {
552
+ "count": {
553
+ "type": "integer",
554
+ "exclusiveMinimum": 0,
555
+ "maximum": 9007199254740991
556
+ },
557
+ "minIntervalMs": {
558
+ "type": "integer",
559
+ "exclusiveMinimum": 0,
560
+ "maximum": 9007199254740991
561
+ },
562
+ "runsPerHour": {
563
+ "type": "integer",
564
+ "exclusiveMinimum": 0,
565
+ "maximum": 9007199254740991
566
+ }
567
+ },
568
+ "additionalProperties": false
541
569
  }
542
570
  },
543
571
  "additionalProperties": false
@@ -640,6 +668,12 @@
640
668
  ],
641
669
  "additionalProperties": false
642
670
  },
671
+ "toolPrefix": {
672
+ "type": "string",
673
+ "minLength": 1,
674
+ "maxLength": 64,
675
+ "pattern": "^[\\x21-\\x7e]+$"
676
+ },
643
677
  "required": {
644
678
  "type": "boolean"
645
679
  },
@@ -680,6 +714,12 @@
680
714
  ],
681
715
  "additionalProperties": false
682
716
  },
717
+ "toolPrefix": {
718
+ "type": "string",
719
+ "minLength": 1,
720
+ "maxLength": 64,
721
+ "pattern": "^[\\x21-\\x7e]+$"
722
+ },
683
723
  "required": {
684
724
  "type": "boolean"
685
725
  },
@@ -1036,6 +1076,9 @@
1036
1076
  },
1037
1077
  "additionalProperties": false
1038
1078
  },
1079
+ "engine": {
1080
+ "$ref": "#/$defs/HarnessEngine"
1081
+ },
1039
1082
  "functions": {
1040
1083
  "description": "Reserved: Functions are not available yet"
1041
1084
  }
@@ -1374,6 +1417,9 @@
1374
1417
  },
1375
1418
  "additionalProperties": false
1376
1419
  },
1420
+ "engine": {
1421
+ "$ref": "#/$defs/HarnessEngine"
1422
+ },
1377
1423
  "functions": {
1378
1424
  "description": "Reserved: Functions are not available yet"
1379
1425
  }
@@ -1715,6 +1761,122 @@
1715
1761
  },
1716
1762
  "additionalProperties": false
1717
1763
  },
1764
+ "HarnessEngine": {
1765
+ "type": "object",
1766
+ "properties": {
1767
+ "sandbox": {
1768
+ "description": "The sandbox tools offered: any of bash, read, write, edit, grep and glob; needs a computer",
1769
+ "type": "array",
1770
+ "items": {
1771
+ "type": "string",
1772
+ "enum": [
1773
+ "bash",
1774
+ "read",
1775
+ "write",
1776
+ "edit",
1777
+ "grep",
1778
+ "glob"
1779
+ ]
1780
+ }
1781
+ },
1782
+ "artifacts": {
1783
+ "description": "read: read_artifact and its text; save: save_artifact and its text (needs a computer)",
1784
+ "type": "object",
1785
+ "properties": {
1786
+ "read": {
1787
+ "type": "boolean"
1788
+ },
1789
+ "save": {
1790
+ "type": "boolean"
1791
+ }
1792
+ },
1793
+ "additionalProperties": false
1794
+ },
1795
+ "outputs": {
1796
+ "description": "Save /workspace/outputs when a turn ends; needs a computer",
1797
+ "type": "boolean"
1798
+ },
1799
+ "toolSearch": {
1800
+ "description": "Defer MCP tools behind tool_search when their schemas pass the threshold",
1801
+ "type": "boolean"
1802
+ },
1803
+ "triggers": {
1804
+ "description": "The triggers tool and its text: the root agent sets up its own triggers; never a subagent's",
1805
+ "type": "boolean"
1806
+ },
1807
+ "instructions": {
1808
+ "description": "A block's wording replaced, by block name",
1809
+ "type": "object",
1810
+ "propertyNames": {
1811
+ "type": "string",
1812
+ "enum": [
1813
+ "skills",
1814
+ "sandbox",
1815
+ "skill_folder",
1816
+ "artifacts_save",
1817
+ "outputs",
1818
+ "artifacts_read",
1819
+ "wake",
1820
+ "triggers",
1821
+ "memory",
1822
+ "plan",
1823
+ "connection",
1824
+ "tool_search"
1825
+ ]
1826
+ },
1827
+ "additionalProperties": {
1828
+ "type": "string",
1829
+ "minLength": 1
1830
+ }
1831
+ },
1832
+ "blocks": {
1833
+ "description": "The engine text blocks the agent gets, with their hashes",
1834
+ "type": "array",
1835
+ "items": {
1836
+ "type": "object",
1837
+ "properties": {
1838
+ "name": {
1839
+ "type": "string",
1840
+ "enum": [
1841
+ "skills",
1842
+ "sandbox",
1843
+ "skill_folder",
1844
+ "artifacts_save",
1845
+ "outputs",
1846
+ "artifacts_read",
1847
+ "wake",
1848
+ "triggers",
1849
+ "memory",
1850
+ "plan",
1851
+ "connection",
1852
+ "tool_search"
1853
+ ]
1854
+ },
1855
+ "version": {
1856
+ "type": "integer",
1857
+ "exclusiveMinimum": 0,
1858
+ "maximum": 9007199254740991
1859
+ },
1860
+ "sha256": {
1861
+ "type": "string",
1862
+ "pattern": "^sha256:[0-9a-f]{64}$"
1863
+ },
1864
+ "source": {
1865
+ "type": "string",
1866
+ "minLength": 1
1867
+ }
1868
+ },
1869
+ "required": [
1870
+ "name",
1871
+ "version",
1872
+ "sha256"
1873
+ ],
1874
+ "additionalProperties": false
1875
+ }
1876
+ }
1877
+ },
1878
+ "additionalProperties": false
1879
+ },
1718
1880
  "WorkflowHarnessSection": {
1719
1881
  "type": "object",
1720
1882
  "properties": {
@@ -1977,6 +2139,9 @@
1977
2139
  },
1978
2140
  "additionalProperties": false
1979
2141
  },
2142
+ "engine": {
2143
+ "$ref": "#/$defs/HarnessEngine"
2144
+ },
1980
2145
  "functions": {
1981
2146
  "description": "Reserved: Functions are not available yet"
1982
2147
  }
@@ -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-manifest/v1.1.json",
3
+ "$id": "https://docs.nylorun.com/schemas/harness-manifest/v1.3.json",
4
4
  "title": "Nylorun harness manifest 1",
5
5
  "type": "object",
6
6
  "properties": {
@@ -246,6 +246,10 @@
246
246
  "description": "What this agent should remember, after the engine's own memory rules",
247
247
  "type": "string",
248
248
  "maxLength": 4096
249
+ },
250
+ "index": {
251
+ "description": "agent-folder/2: false pins no memory index in a session. Default true",
252
+ "type": "boolean"
249
253
  }
250
254
  },
251
255
  "additionalProperties": false
@@ -256,6 +260,9 @@
256
260
  "pattern": "^[A-Za-z0-9._-]+\\/\\S+$",
257
261
  "description": "The model the agent runs on: <provider>/<model>, such as anthropic/claude-sonnet-4-5"
258
262
  },
263
+ "engine": {
264
+ "$ref": "#/$defs/HarnessEngine"
265
+ },
259
266
  "credentials": {
260
267
  "type": "object",
261
268
  "propertyNames": {
@@ -596,6 +603,9 @@
596
603
  },
597
604
  "additionalProperties": false
598
605
  },
606
+ "engine": {
607
+ "$ref": "#/$defs/HarnessEngine"
608
+ },
599
609
  "functions": {
600
610
  "description": "Reserved: Functions are not available yet"
601
611
  }
@@ -934,6 +944,9 @@
934
944
  },
935
945
  "additionalProperties": false
936
946
  },
947
+ "engine": {
948
+ "$ref": "#/$defs/HarnessEngine"
949
+ },
937
950
  "functions": {
938
951
  "description": "Reserved: Functions are not available yet"
939
952
  }
@@ -1274,6 +1287,122 @@
1274
1287
  }
1275
1288
  },
1276
1289
  "additionalProperties": false
1290
+ },
1291
+ "HarnessEngine": {
1292
+ "type": "object",
1293
+ "properties": {
1294
+ "sandbox": {
1295
+ "description": "The sandbox tools offered: any of bash, read, write, edit, grep and glob; needs a computer",
1296
+ "type": "array",
1297
+ "items": {
1298
+ "type": "string",
1299
+ "enum": [
1300
+ "bash",
1301
+ "read",
1302
+ "write",
1303
+ "edit",
1304
+ "grep",
1305
+ "glob"
1306
+ ]
1307
+ }
1308
+ },
1309
+ "artifacts": {
1310
+ "description": "read: read_artifact and its text; save: save_artifact and its text (needs a computer)",
1311
+ "type": "object",
1312
+ "properties": {
1313
+ "read": {
1314
+ "type": "boolean"
1315
+ },
1316
+ "save": {
1317
+ "type": "boolean"
1318
+ }
1319
+ },
1320
+ "additionalProperties": false
1321
+ },
1322
+ "outputs": {
1323
+ "description": "Save /workspace/outputs when a turn ends; needs a computer",
1324
+ "type": "boolean"
1325
+ },
1326
+ "toolSearch": {
1327
+ "description": "Defer MCP tools behind tool_search when their schemas pass the threshold",
1328
+ "type": "boolean"
1329
+ },
1330
+ "triggers": {
1331
+ "description": "The triggers tool and its text: the root agent sets up its own triggers; never a subagent's",
1332
+ "type": "boolean"
1333
+ },
1334
+ "instructions": {
1335
+ "description": "A block's wording replaced, by block name",
1336
+ "type": "object",
1337
+ "propertyNames": {
1338
+ "type": "string",
1339
+ "enum": [
1340
+ "skills",
1341
+ "sandbox",
1342
+ "skill_folder",
1343
+ "artifacts_save",
1344
+ "outputs",
1345
+ "artifacts_read",
1346
+ "wake",
1347
+ "triggers",
1348
+ "memory",
1349
+ "plan",
1350
+ "connection",
1351
+ "tool_search"
1352
+ ]
1353
+ },
1354
+ "additionalProperties": {
1355
+ "type": "string",
1356
+ "minLength": 1
1357
+ }
1358
+ },
1359
+ "blocks": {
1360
+ "description": "The engine text blocks the agent gets, with their hashes",
1361
+ "type": "array",
1362
+ "items": {
1363
+ "type": "object",
1364
+ "properties": {
1365
+ "name": {
1366
+ "type": "string",
1367
+ "enum": [
1368
+ "skills",
1369
+ "sandbox",
1370
+ "skill_folder",
1371
+ "artifacts_save",
1372
+ "outputs",
1373
+ "artifacts_read",
1374
+ "wake",
1375
+ "triggers",
1376
+ "memory",
1377
+ "plan",
1378
+ "connection",
1379
+ "tool_search"
1380
+ ]
1381
+ },
1382
+ "version": {
1383
+ "type": "integer",
1384
+ "exclusiveMinimum": 0,
1385
+ "maximum": 9007199254740991
1386
+ },
1387
+ "sha256": {
1388
+ "type": "string",
1389
+ "pattern": "^sha256:[0-9a-f]{64}$"
1390
+ },
1391
+ "source": {
1392
+ "type": "string",
1393
+ "minLength": 1
1394
+ }
1395
+ },
1396
+ "required": [
1397
+ "name",
1398
+ "version",
1399
+ "sha256"
1400
+ ],
1401
+ "additionalProperties": false
1402
+ }
1403
+ }
1404
+ },
1405
+ "additionalProperties": false
1277
1406
  }
1278
1407
  }
1279
1408
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.nylorun.com/schemas/runtime-manifest/v1.json",
3
+ "$id": "https://docs.nylorun.com/schemas/runtime-manifest/v1.2.json",
4
4
  "title": "Nylorun runtime manifest 1",
5
5
  "type": "object",
6
6
  "properties": {
@@ -208,6 +208,27 @@
208
208
  }
209
209
  },
210
210
  "additionalProperties": false
211
+ },
212
+ "triggers": {
213
+ "type": "object",
214
+ "properties": {
215
+ "count": {
216
+ "type": "integer",
217
+ "exclusiveMinimum": 0,
218
+ "maximum": 9007199254740991
219
+ },
220
+ "minIntervalMs": {
221
+ "type": "integer",
222
+ "exclusiveMinimum": 0,
223
+ "maximum": 9007199254740991
224
+ },
225
+ "runsPerHour": {
226
+ "type": "integer",
227
+ "exclusiveMinimum": 0,
228
+ "maximum": 9007199254740991
229
+ }
230
+ },
231
+ "additionalProperties": false
211
232
  }
212
233
  },
213
234
  "additionalProperties": false
@@ -310,6 +331,12 @@
310
331
  ],
311
332
  "additionalProperties": false
312
333
  },
334
+ "toolPrefix": {
335
+ "type": "string",
336
+ "minLength": 1,
337
+ "maxLength": 64,
338
+ "pattern": "^[\\x21-\\x7e]+$"
339
+ },
313
340
  "required": {
314
341
  "type": "boolean"
315
342
  },
@@ -350,6 +377,12 @@
350
377
  ],
351
378
  "additionalProperties": false
352
379
  },
380
+ "toolPrefix": {
381
+ "type": "string",
382
+ "minLength": 1,
383
+ "maxLength": 64,
384
+ "pattern": "^[\\x21-\\x7e]+$"
385
+ },
353
386
  "required": {
354
387
  "type": "boolean"
355
388
  },
@@ -1,4 +1,5 @@
1
1
  import type { JsonObject } from "./shared.js";
2
+ import type { EngineBlockName } from "../engine/names.js";
2
3
  import type { WorkflowManifest, WorkflowNode } from "./workflow.js";
3
4
  /**
4
5
  * Published manifest schema version (no top-level model — Runtime-owned). Version 7 is flat: the
@@ -157,6 +158,47 @@ export interface AgentManifest {
157
158
  readonly mcpServers?: Readonly<Record<string, McpServerManifest>>;
158
159
  /** What the agent needs of its session's Environment, checked when a session opens. */
159
160
  readonly requires?: AgentRequirements;
161
+ /**
162
+ * The engine features the agent declares (ADR-100, `agent-folder/2`): with it, our engine adds
163
+ * only what it names; without it, every default of `agent-folder/1`.
164
+ */
165
+ readonly engine?: HarnessEngine;
166
+ }
167
+ /** A sandbox tool our engine may offer: `bash`, `read`, `write`, `edit`, `grep` or `glob`. */
168
+ export type EngineSandboxTool = "bash" | "read" | "write" | "edit" | "grep" | "glob";
169
+ /**
170
+ * The engine features an agent declares (ADR-100): `harness.engine` of an agent manifest v8,
171
+ * `engine` of the loop manifest the harness runs. Its presence turns the defaults off: an agent
172
+ * with it gets no engine tool and no engine text it does not name. Memory, skills, `loop` and
173
+ * `runtime.selfWake` stay declared by their own keys.
174
+ */
175
+ export interface HarnessEngine {
176
+ /** The sandbox tools offered, in our engine's order; needs a computer. */
177
+ readonly sandbox?: readonly EngineSandboxTool[];
178
+ /** `read_artifact` and its text; `save_artifact` and its text (needs a computer). */
179
+ readonly artifacts?: {
180
+ readonly read?: boolean;
181
+ readonly save?: boolean;
182
+ };
183
+ /** `/workspace/outputs` saved as the session's outputs folder when a turn ends; needs a computer. */
184
+ readonly outputs?: boolean;
185
+ /** MCP tools deferred behind `tool_search` when their schemas pass the threshold. */
186
+ readonly toolSearch?: boolean;
187
+ /** The `triggers` tool and its text (D83): the root agent sets up its own triggers. */
188
+ readonly triggers?: boolean;
189
+ /** A block's wording replaced by the folder's text, by block name. */
190
+ readonly instructions?: Readonly<Partial<Record<EngineBlockName, string>>>;
191
+ /** The engine text blocks the agent gets, each with its version and the hash of its text. */
192
+ readonly blocks?: readonly EngineBlockRef[];
193
+ }
194
+ /** One engine text block an agent gets: `memory@1`, the SHA-256 of its text, and its source. */
195
+ export interface EngineBlockRef {
196
+ readonly name: EngineBlockName;
197
+ readonly version: number;
198
+ /** `sha256:<hex>` of the block's text (its template, where the text names session facts). */
199
+ readonly sha256: string;
200
+ /** The folder file whose text replaces the engine's wording, when one does. */
201
+ readonly source?: string;
160
202
  }
161
203
  /** What an agent needs of the Environment its session opens on (protocol 14). */
162
204
  export interface AgentRequirements {
@@ -208,6 +250,8 @@ export interface AgentHarnessSection {
208
250
  * is connected and lists it (Host feature `agent-model`).
209
251
  */
210
252
  readonly model?: string;
253
+ /** The engine features the agent declares (ADR-100), for itself; its subagents declare their own. */
254
+ readonly engine?: HarnessEngine;
211
255
  }
212
256
  /**
213
257
  * `harness.memory`: the Agent's memory, the same in every turn whoever starts it.
@@ -217,6 +261,11 @@ export interface AgentHarnessSection {
217
261
  export interface AgentMemorySettings {
218
262
  readonly access?: "read_write" | "read_only";
219
263
  readonly instructions?: string;
264
+ /**
265
+ * `false` (an `agent-folder/2` folder only): no memory index is pinned in a session, and the
266
+ * memory rules do not mention one. Default true.
267
+ */
268
+ readonly index?: boolean;
220
269
  }
221
270
  /**
222
271
  * A flow's `harness` section: workflow manifest v3's flow without its identity, which the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/core",
3
- "version": "0.33.0-beta",
3
+ "version": "0.35.0-beta",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Shared agent definitions and wire contracts",
@@ -76,6 +76,10 @@
76
76
  "types": "./dist/folder/index.d.ts",
77
77
  "import": "./dist/folder/index.js"
78
78
  },
79
+ "./engine": {
80
+ "types": "./dist/engine/index.d.ts",
81
+ "import": "./dist/engine/index.js"
82
+ },
79
83
  "./schemas/agent-manifest.json": "./dist/schemas/agent-manifest.schema.json",
80
84
  "./schemas/harness-manifest.json": "./dist/schemas/harness-manifest.schema.json",
81
85
  "./schemas/runtime-manifest.json": "./dist/schemas/runtime-manifest.schema.json",