@nylorun/core 0.20.0-beta → 0.21.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 (88) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/README.md +2 -2
  3. package/dist/compatibility.d.ts +84 -10
  4. package/dist/compatibility.js +84 -10
  5. package/dist/contracts.d.ts +1328 -110
  6. package/dist/contracts.js +544 -157
  7. package/dist/define.d.ts +14 -12
  8. package/dist/define.js +10 -7
  9. package/dist/definition/approval.js +12 -14
  10. package/dist/definition/assemble.d.ts +6 -10
  11. package/dist/definition/assemble.js +48 -105
  12. package/dist/definition/bind-agent.d.ts +3 -4
  13. package/dist/definition/bind-agent.js +12 -30
  14. package/dist/definition/binding.d.ts +2 -2
  15. package/dist/definition/bound.d.ts +10 -10
  16. package/dist/definition/builder.d.ts +16 -20
  17. package/dist/definition/builder.js +29 -81
  18. package/dist/definition/code-tools.d.ts +3 -3
  19. package/dist/definition/code-tools.js +6 -21
  20. package/dist/definition/declaration.d.ts +4 -7
  21. package/dist/definition/declaration.js +29 -99
  22. package/dist/definition/{tools-capability.d.ts → deferred-tools.d.ts} +3 -13
  23. package/dist/definition/{tools-capability.js → deferred-tools.js} +2 -18
  24. package/dist/definition/delegate.d.ts +2 -4
  25. package/dist/definition/delegate.js +8 -10
  26. package/dist/definition/from.d.ts +7 -4
  27. package/dist/definition/from.js +72 -117
  28. package/dist/definition/helpers.d.ts +0 -7
  29. package/dist/definition/helpers.js +0 -5
  30. package/dist/definition/implementations.d.ts +6 -8
  31. package/dist/definition/manifest.d.ts +11 -5
  32. package/dist/definition/manifest.js +26 -26
  33. package/dist/definition/mcp.d.ts +1 -52
  34. package/dist/definition/mcp.js +0 -52
  35. package/dist/definition/media-reference.d.ts +23 -0
  36. package/dist/definition/media-reference.js +26 -0
  37. package/dist/definition/removed.d.ts +3 -10
  38. package/dist/definition/removed.js +10 -17
  39. package/dist/definition/runtime-manifest.d.ts +30 -0
  40. package/dist/definition/runtime-manifest.js +132 -0
  41. package/dist/definition/sandbox-tools.d.ts +1 -1
  42. package/dist/definition/sandbox-tools.js +1 -1
  43. package/dist/definition/skill-tools.d.ts +13 -7
  44. package/dist/definition/skill-tools.js +23 -10
  45. package/dist/definition/trace.d.ts +18 -0
  46. package/dist/definition/trace.js +42 -0
  47. package/dist/definition/variant.d.ts +5 -4
  48. package/dist/definition/variant.js +18 -51
  49. package/dist/definition/workflow/runnable.js +1 -1
  50. package/dist/errors.d.ts +1 -1
  51. package/dist/harness-api/entries.d.ts +1 -0
  52. package/dist/harness-api/entries.js +1 -0
  53. package/dist/harness-api/gates.d.ts +1 -6
  54. package/dist/harness-api/gates.js +1 -3
  55. package/dist/harness-api/harness-api.schema.json +11 -92
  56. package/dist/harness-api/index.d.ts +2 -2
  57. package/dist/harness-api/index.js +2 -2
  58. package/dist/harness-api/mcp.d.ts +0 -4
  59. package/dist/harness-api/mcp.js +0 -2
  60. package/dist/harness-api/messages.d.ts +1 -3
  61. package/dist/harness-api/messages.js +1 -3
  62. package/dist/harness-api/schema.d.ts +5 -17
  63. package/dist/harness-api/schema.js +9 -6
  64. package/dist/index.d.ts +1 -1
  65. package/dist/manifest-schemas.d.ts +6 -0
  66. package/dist/manifest-schemas.js +34 -0
  67. package/dist/schemas/agent-manifest.schema.json +897 -0
  68. package/dist/schemas/environment-manifest.schema.json +329 -0
  69. package/dist/types/agent.d.ts +1 -1
  70. package/dist/types/manifest.d.ts +33 -19
  71. package/dist/types/model.d.ts +2 -2
  72. package/dist/types/observe.d.ts +5 -18
  73. package/dist/types/part.d.ts +25 -0
  74. package/dist/types/tool.d.ts +1 -1
  75. package/dist/types/transcript.d.ts +5 -0
  76. package/dist/utils/definition-files.d.ts +11 -6
  77. package/dist/utils/definition-files.js +19 -9
  78. package/dist/utils/runtime-tools.d.ts +19 -0
  79. package/dist/utils/runtime-tools.js +30 -0
  80. package/dist/utils/sandbox.d.ts +1 -1
  81. package/dist/utils/sandbox.js +1 -1
  82. package/package.json +9 -3
  83. package/dist/definition/capability.d.ts +0 -43
  84. package/dist/definition/capability.js +0 -82
  85. package/dist/definition/sandbox-capability.d.ts +0 -44
  86. package/dist/definition/sandbox-capability.js +0 -139
  87. package/dist/types/middleware.d.ts +0 -94
  88. /package/dist/types/{middleware.js → part.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://docs.nylorun.com/schemas/harness-api/v2.json",
4
- "title": "Nylorun Harness API 2",
3
+ "$id": "https://docs.nylorun.com/schemas/harness-api/v3.json",
4
+ "title": "Nylorun Harness API 3",
5
5
  "$defs": {
6
6
  "EffectIntent": {
7
7
  "type": "object",
@@ -57,9 +57,6 @@
57
57
  ],
58
58
  "additionalProperties": false
59
59
  },
60
- "capabilityId": {
61
- "type": "string"
62
- },
63
60
  "toolName": {
64
61
  "type": "string"
65
62
  },
@@ -530,9 +527,6 @@
530
527
  "agentId": {
531
528
  "type": "string"
532
529
  },
533
- "capabilityId": {
534
- "type": "string"
535
- },
536
530
  "serverName": {
537
531
  "type": "string"
538
532
  },
@@ -576,7 +570,6 @@
576
570
  }
577
571
  },
578
572
  "required": [
579
- "capabilityId",
580
573
  "serverName",
581
574
  "serverToolName",
582
575
  "name",
@@ -593,9 +586,6 @@
593
586
  "agentId": {
594
587
  "type": "string"
595
588
  },
596
- "capabilityId": {
597
- "type": "string"
598
- },
599
589
  "serverName": {
600
590
  "type": "string"
601
591
  },
@@ -604,7 +594,6 @@
604
594
  }
605
595
  },
606
596
  "required": [
607
- "capabilityId",
608
597
  "serverName",
609
598
  "instructions"
610
599
  ]
@@ -926,9 +915,6 @@
926
915
  "agentId": {
927
916
  "type": "string"
928
917
  },
929
- "capabilityId": {
930
- "type": "string"
931
- },
932
918
  "serverName": {
933
919
  "type": "string"
934
920
  },
@@ -972,7 +958,6 @@
972
958
  }
973
959
  },
974
960
  "required": [
975
- "capabilityId",
976
961
  "serverName",
977
962
  "serverToolName",
978
963
  "name",
@@ -989,9 +974,6 @@
989
974
  "agentId": {
990
975
  "type": "string"
991
976
  },
992
- "capabilityId": {
993
- "type": "string"
994
- },
995
977
  "serverName": {
996
978
  "type": "string"
997
979
  },
@@ -1000,7 +982,6 @@
1000
982
  }
1001
983
  },
1002
984
  "required": [
1003
- "capabilityId",
1004
985
  "serverName",
1005
986
  "instructions"
1006
987
  ]
@@ -1128,17 +1109,12 @@
1128
1109
  "type": "string",
1129
1110
  "minLength": 1
1130
1111
  },
1131
- "capabilityId": {
1132
- "type": "string",
1133
- "minLength": 1
1134
- },
1135
1112
  "toolName": {
1136
1113
  "type": "string",
1137
1114
  "minLength": 1
1138
1115
  }
1139
1116
  },
1140
1117
  "required": [
1141
- "capabilityId",
1142
1118
  "toolName"
1143
1119
  ]
1144
1120
  },
@@ -1191,17 +1167,12 @@
1191
1167
  "type": "string",
1192
1168
  "minLength": 1
1193
1169
  },
1194
- "capabilityId": {
1195
- "type": "string",
1196
- "minLength": 1
1197
- },
1198
1170
  "serverName": {
1199
1171
  "type": "string",
1200
1172
  "minLength": 1
1201
1173
  }
1202
1174
  },
1203
1175
  "required": [
1204
- "capabilityId",
1205
1176
  "serverName"
1206
1177
  ]
1207
1178
  },
@@ -1227,17 +1198,12 @@
1227
1198
  "type": "string",
1228
1199
  "minLength": 1
1229
1200
  },
1230
- "capabilityId": {
1231
- "type": "string",
1232
- "minLength": 1
1233
- },
1234
1201
  "serverName": {
1235
1202
  "type": "string",
1236
1203
  "minLength": 1
1237
1204
  }
1238
1205
  },
1239
1206
  "required": [
1240
- "capabilityId",
1241
1207
  "serverName"
1242
1208
  ]
1243
1209
  }
@@ -1257,17 +1223,12 @@
1257
1223
  "type": "string",
1258
1224
  "minLength": 1
1259
1225
  },
1260
- "capabilityId": {
1261
- "type": "string",
1262
- "minLength": 1
1263
- },
1264
1226
  "serverName": {
1265
1227
  "type": "string",
1266
1228
  "minLength": 1
1267
1229
  }
1268
1230
  },
1269
1231
  "required": [
1270
- "capabilityId",
1271
1232
  "serverName"
1272
1233
  ]
1273
1234
  },
@@ -1333,17 +1294,12 @@
1333
1294
  "type": "string",
1334
1295
  "minLength": 1
1335
1296
  },
1336
- "capabilityId": {
1337
- "type": "string",
1338
- "minLength": 1
1339
- },
1340
1297
  "serverName": {
1341
1298
  "type": "string",
1342
1299
  "minLength": 1
1343
1300
  }
1344
1301
  },
1345
1302
  "required": [
1346
- "capabilityId",
1347
1303
  "serverName"
1348
1304
  ]
1349
1305
  },
@@ -1376,9 +1332,6 @@
1376
1332
  "agentId": {
1377
1333
  "type": "string"
1378
1334
  },
1379
- "capabilityId": {
1380
- "type": "string"
1381
- },
1382
1335
  "serverName": {
1383
1336
  "type": "string"
1384
1337
  },
@@ -1387,7 +1340,6 @@
1387
1340
  }
1388
1341
  },
1389
1342
  "required": [
1390
- "capabilityId",
1391
1343
  "serverName",
1392
1344
  "instructions"
1393
1345
  ]
@@ -1411,9 +1363,6 @@
1411
1363
  "agentId": {
1412
1364
  "type": "string"
1413
1365
  },
1414
- "capabilityId": {
1415
- "type": "string"
1416
- },
1417
1366
  "serverName": {
1418
1367
  "type": "string"
1419
1368
  },
@@ -1457,7 +1406,6 @@
1457
1406
  }
1458
1407
  },
1459
1408
  "required": [
1460
- "capabilityId",
1461
1409
  "serverName",
1462
1410
  "serverToolName",
1463
1411
  "name",
@@ -1474,9 +1422,6 @@
1474
1422
  "agentId": {
1475
1423
  "type": "string"
1476
1424
  },
1477
- "capabilityId": {
1478
- "type": "string"
1479
- },
1480
1425
  "serverName": {
1481
1426
  "type": "string"
1482
1427
  },
@@ -1485,7 +1430,6 @@
1485
1430
  }
1486
1431
  },
1487
1432
  "required": [
1488
- "capabilityId",
1489
1433
  "serverName",
1490
1434
  "instructions"
1491
1435
  ]
@@ -1504,9 +1448,6 @@
1504
1448
  "agentId": {
1505
1449
  "type": "string"
1506
1450
  },
1507
- "capabilityId": {
1508
- "type": "string"
1509
- },
1510
1451
  "serverName": {
1511
1452
  "type": "string"
1512
1453
  },
@@ -1550,7 +1491,6 @@
1550
1491
  }
1551
1492
  },
1552
1493
  "required": [
1553
- "capabilityId",
1554
1494
  "serverName",
1555
1495
  "serverToolName",
1556
1496
  "name",
@@ -2447,6 +2387,12 @@
2447
2387
  },
2448
2388
  "tokensAfter": {
2449
2389
  "type": "number"
2390
+ },
2391
+ "files": {
2392
+ "type": "array",
2393
+ "items": {
2394
+ "type": "string"
2395
+ }
2450
2396
  }
2451
2397
  },
2452
2398
  "required": [
@@ -2548,7 +2494,7 @@
2548
2494
  "version": {
2549
2495
  "type": "string"
2550
2496
  },
2551
- "capabilities": {
2497
+ "features": {
2552
2498
  "type": "object",
2553
2499
  "properties": {
2554
2500
  "workspace": {},
@@ -2589,7 +2535,7 @@
2589
2535
  "api",
2590
2536
  "name",
2591
2537
  "version",
2592
- "capabilities"
2538
+ "features"
2593
2539
  ],
2594
2540
  "additionalProperties": false
2595
2541
  },
@@ -2598,7 +2544,7 @@
2598
2544
  "properties": {
2599
2545
  "api": {
2600
2546
  "type": "number",
2601
- "const": 2
2547
+ "const": 3
2602
2548
  },
2603
2549
  "tenantId": {
2604
2550
  "type": "string",
@@ -2830,9 +2776,6 @@
2830
2776
  "agentId": {
2831
2777
  "type": "string"
2832
2778
  },
2833
- "capabilityId": {
2834
- "type": "string"
2835
- },
2836
2779
  "serverName": {
2837
2780
  "type": "string"
2838
2781
  },
@@ -2876,7 +2819,6 @@
2876
2819
  }
2877
2820
  },
2878
2821
  "required": [
2879
- "capabilityId",
2880
2822
  "serverName",
2881
2823
  "serverToolName",
2882
2824
  "name",
@@ -2893,9 +2835,6 @@
2893
2835
  "agentId": {
2894
2836
  "type": "string"
2895
2837
  },
2896
- "capabilityId": {
2897
- "type": "string"
2898
- },
2899
2838
  "serverName": {
2900
2839
  "type": "string"
2901
2840
  },
@@ -2904,7 +2843,6 @@
2904
2843
  }
2905
2844
  },
2906
2845
  "required": [
2907
- "capabilityId",
2908
2846
  "serverName",
2909
2847
  "instructions"
2910
2848
  ]
@@ -3129,9 +3067,6 @@
3129
3067
  ],
3130
3068
  "additionalProperties": false
3131
3069
  },
3132
- "capabilityId": {
3133
- "type": "string"
3134
- },
3135
3070
  "toolName": {
3136
3071
  "type": "string"
3137
3072
  },
@@ -3503,9 +3438,6 @@
3503
3438
  "agentId": {
3504
3439
  "type": "string"
3505
3440
  },
3506
- "capabilityId": {
3507
- "type": "string"
3508
- },
3509
3441
  "serverName": {
3510
3442
  "type": "string"
3511
3443
  },
@@ -3549,7 +3481,6 @@
3549
3481
  }
3550
3482
  },
3551
3483
  "required": [
3552
- "capabilityId",
3553
3484
  "serverName",
3554
3485
  "serverToolName",
3555
3486
  "name",
@@ -3566,9 +3497,6 @@
3566
3497
  "agentId": {
3567
3498
  "type": "string"
3568
3499
  },
3569
- "capabilityId": {
3570
- "type": "string"
3571
- },
3572
3500
  "serverName": {
3573
3501
  "type": "string"
3574
3502
  },
@@ -3577,7 +3505,6 @@
3577
3505
  }
3578
3506
  },
3579
3507
  "required": [
3580
- "capabilityId",
3581
3508
  "serverName",
3582
3509
  "instructions"
3583
3510
  ]
@@ -3623,9 +3550,6 @@
3623
3550
  "agentId": {
3624
3551
  "type": "string"
3625
3552
  },
3626
- "capabilityId": {
3627
- "type": "string"
3628
- },
3629
3553
  "serverName": {
3630
3554
  "type": "string"
3631
3555
  },
@@ -3669,7 +3593,6 @@
3669
3593
  }
3670
3594
  },
3671
3595
  "required": [
3672
- "capabilityId",
3673
3596
  "serverName",
3674
3597
  "serverToolName",
3675
3598
  "name",
@@ -3686,9 +3609,6 @@
3686
3609
  "agentId": {
3687
3610
  "type": "string"
3688
3611
  },
3689
- "capabilityId": {
3690
- "type": "string"
3691
- },
3692
3612
  "serverName": {
3693
3613
  "type": "string"
3694
3614
  },
@@ -3697,7 +3617,6 @@
3697
3617
  }
3698
3618
  },
3699
3619
  "required": [
3700
- "capabilityId",
3701
3620
  "serverName",
3702
3621
  "instructions"
3703
3622
  ]
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `@nylorun/core/harness-api`: the public contract between core and a harness (Harness API 2).
2
+ * `@nylorun/core/harness-api`: the public contract between core and a harness (Harness API 3).
3
3
  * Everything a harness sends or reads has a schema here, and the Runtime validates with the same
4
4
  * schemas, so these types are the enforced ones: the frames and messages (`schema.ts`), the
5
5
  * transport and the pod join (`transport.ts`), the Model and Tool Gate bodies (`gates.ts`), the
@@ -7,7 +7,7 @@
7
7
  * request hash and transcript edits. No engine and no I/O.
8
8
  *
9
9
  * Three version numbers apply: the transport (path and header, 1), the messages
10
- * (`HARNESS_API_VERSION`, 2) and the Runtime protocol, which only the Runtime's own APIs carry.
10
+ * (`HARNESS_API_VERSION`, 3) and the Runtime protocol, which only the Runtime's own APIs carry.
11
11
  */
12
12
  export * from "./messages.js";
13
13
  export { HarnessApiError } from "./errors.js";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `@nylorun/core/harness-api`: the public contract between core and a harness (Harness API 2).
2
+ * `@nylorun/core/harness-api`: the public contract between core and a harness (Harness API 3).
3
3
  * Everything a harness sends or reads has a schema here, and the Runtime validates with the same
4
4
  * schemas, so these types are the enforced ones: the frames and messages (`schema.ts`), the
5
5
  * transport and the pod join (`transport.ts`), the Model and Tool Gate bodies (`gates.ts`), the
@@ -7,7 +7,7 @@
7
7
  * request hash and transcript edits. No engine and no I/O.
8
8
  *
9
9
  * Three version numbers apply: the transport (path and header, 1), the messages
10
- * (`HARNESS_API_VERSION`, 2) and the Runtime protocol, which only the Runtime's own APIs carry.
10
+ * (`HARNESS_API_VERSION`, 3) and the Runtime protocol, which only the Runtime's own APIs carry.
11
11
  */
12
12
  export * from "./messages.js";
13
13
  export { HarnessApiError } from "./errors.js";
@@ -7,7 +7,6 @@
7
7
  import { z } from "zod";
8
8
  export declare const McpToolRecordSchema: z.ZodObject<{
9
9
  agentId: z.ZodOptional<z.ZodString>;
10
- capabilityId: z.ZodString;
11
10
  serverName: z.ZodString;
12
11
  serverToolName: z.ZodString;
13
12
  name: z.ZodString;
@@ -23,7 +22,6 @@ export declare const McpToolRecordSchema: z.ZodObject<{
23
22
  /** A server's own instructions (MCP `initialize`), for the note on its deferred tools. */
24
23
  export declare const McpServerNoteSchema: z.ZodObject<{
25
24
  agentId: z.ZodOptional<z.ZodString>;
26
- capabilityId: z.ZodString;
27
25
  serverName: z.ZodString;
28
26
  instructions: z.ZodString;
29
27
  }, z.core.$strip>;
@@ -32,7 +30,6 @@ export declare const McpSnapshotSchema: z.ZodObject<{
32
30
  manifestHash: z.ZodString;
33
31
  mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
34
32
  agentId: z.ZodOptional<z.ZodString>;
35
- capabilityId: z.ZodString;
36
33
  serverName: z.ZodString;
37
34
  serverToolName: z.ZodString;
38
35
  name: z.ZodString;
@@ -47,7 +44,6 @@ export declare const McpSnapshotSchema: z.ZodObject<{
47
44
  }, z.core.$strip>>>;
48
45
  servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
49
46
  agentId: z.ZodOptional<z.ZodString>;
50
- capabilityId: z.ZodString;
51
47
  serverName: z.ZodString;
52
48
  instructions: z.ZodString;
53
49
  }, z.core.$strip>>>>;
@@ -9,7 +9,6 @@ const jsonObject = z.record(z.string(), z.unknown());
9
9
  export const McpToolRecordSchema = z.object({
10
10
  /** The agent used as a tool that declares the server; absent for the session's root agent. */
11
11
  agentId: z.string().optional(),
12
- capabilityId: z.string(),
13
12
  serverName: z.string(),
14
13
  /** The tool's name on its server, which the call sends. */
15
14
  serverToolName: z.string(),
@@ -28,7 +27,6 @@ export const McpToolRecordSchema = z.object({
28
27
  /** A server's own instructions (MCP `initialize`), for the note on its deferred tools. */
29
28
  export const McpServerNoteSchema = z.object({
30
29
  agentId: z.string().optional(),
31
- capabilityId: z.string(),
32
30
  serverName: z.string(),
33
31
  instructions: z.string(),
34
32
  });
@@ -8,9 +8,7 @@
8
8
  */
9
9
  import type { z } from "zod";
10
10
  import type { EffectIntentSchema, IntentAnswerSchema, OutcomeAnswerSchema, RecordedOutcomeSchema, ReleaseReasonSchema, RequestTypes, RunGrantSchema, RunRoutingSchema, TraceContextSchema, TurnOutputSchema, TurnStartSchema, WorkspaceBytesCallSchema, WorkspaceCallSchema, WorkspaceListCallSchema, WorkspaceDiskCallSchema, WorkspaceRecordSchema, WorkspaceSessionSchema, coreMessages, coreRequests, harnessRequests } from "./schema.js";
11
- export declare const HARNESS_API_VERSION = 2;
12
- /** The capability id of the tools a harness declares and runs itself (`capabilities.tools`, R4.2). */
13
- export declare const HARNESS_TOOLS_CAPABILITY = "harness";
11
+ export declare const HARNESS_API_VERSION = 3;
14
12
  /** The most state a custom harness may keep per session (R4.2): its serialized JSON, in bytes. */
15
13
  export declare const MAX_HARNESS_STATE_BYTES: number;
16
14
  /** Why core stopped a run. Matches the advance's abort kinds. */
@@ -1,6 +1,4 @@
1
- export const HARNESS_API_VERSION = 2;
2
- /** The capability id of the tools a harness declares and runs itself (`capabilities.tools`, R4.2). */
3
- export const HARNESS_TOOLS_CAPABILITY = "harness";
1
+ export const HARNESS_API_VERSION = 3;
4
2
  /** The most state a custom harness may keep per session (R4.2): its serialized JSON, in bytes. */
5
3
  export const MAX_HARNESS_STATE_BYTES = 256 * 1024;
6
4
  /** Why core stopped a run. Matches the advance's abort kinds. */
@@ -75,7 +75,6 @@ export declare const EffectIntentSchema: z.ZodObject<{
75
75
  path: z.ZodString;
76
76
  delegationId: z.ZodOptional<z.ZodString>;
77
77
  }, z.core.$strict>>;
78
- capabilityId: z.ZodOptional<z.ZodString>;
79
78
  toolName: z.ZodOptional<z.ZodString>;
80
79
  path: z.ZodOptional<z.ZodString>;
81
80
  key: z.ZodOptional<z.ZodString>;
@@ -251,7 +250,6 @@ export declare const RunRoutingSchema: z.ZodObject<{
251
250
  manifestHash: z.ZodString;
252
251
  mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
253
252
  agentId: z.ZodOptional<z.ZodString>;
254
- capabilityId: z.ZodString;
255
253
  serverName: z.ZodString;
256
254
  serverToolName: z.ZodString;
257
255
  name: z.ZodString;
@@ -266,7 +264,6 @@ export declare const RunRoutingSchema: z.ZodObject<{
266
264
  }, z.core.$strip>>>;
267
265
  servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
268
266
  agentId: z.ZodOptional<z.ZodString>;
269
- capabilityId: z.ZodString;
270
267
  serverName: z.ZodString;
271
268
  instructions: z.ZodString;
272
269
  }, z.core.$strip>>>>;
@@ -303,8 +300,8 @@ export declare const TraceContextSchema: z.ZodObject<{
303
300
  }, z.core.$strict>;
304
301
  /**
305
302
  * A tool a harness runs itself (R4.2, Q3), declared in `hello`: the model may call it, and the
306
- * harness journals each call as a `tool` effect of capability `harness` (`HARNESS_TOOLS_CAPABILITY`)
307
- * with intent and outcome, like a sandbox tool, so the log records what really ran. It runs in
303
+ * harness journals each call as a `tool` effect with intent and outcome, like a sandbox tool, so
304
+ * the log records what really ran. Its name may not be one the agent or the Runtime already uses. It runs in
308
305
  * the harness's own process or pod: the egress gate is its only control.
309
306
  */
310
307
  export declare const NativeToolSchema: z.ZodObject<{
@@ -351,7 +348,6 @@ export declare const TurnStartSchema: z.ZodObject<{
351
348
  manifestHash: z.ZodString;
352
349
  mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
353
350
  agentId: z.ZodOptional<z.ZodString>;
354
- capabilityId: z.ZodString;
355
351
  serverName: z.ZodString;
356
352
  serverToolName: z.ZodString;
357
353
  name: z.ZodString;
@@ -366,7 +362,6 @@ export declare const TurnStartSchema: z.ZodObject<{
366
362
  }, z.core.$strip>>>;
367
363
  servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
368
364
  agentId: z.ZodOptional<z.ZodString>;
369
- capabilityId: z.ZodString;
370
365
  serverName: z.ZodString;
371
366
  instructions: z.ZodString;
372
367
  }, z.core.$strip>>>>;
@@ -465,7 +460,7 @@ export type RequestTypes<Schemas extends RequestSchemas> = {
465
460
  /** Requests a harness sends to core, with their answers. */
466
461
  export declare const harnessRequests: {
467
462
  /**
468
- * `capabilities.workspace` declares that the harness serves the Tenant's workspaces (F6.2):
463
+ * `features.workspace` declares that the harness serves the Tenant's workspaces (F6.2):
469
464
  * core then sends it the `workspace.*` requests. The answer names the Tenant (its workspace
470
465
  * keys are scoped by it) and the sandbox backend preference the harness selects with.
471
466
  */
@@ -474,7 +469,7 @@ export declare const harnessRequests: {
474
469
  api: z.ZodNumber;
475
470
  name: z.ZodString;
476
471
  version: z.ZodString;
477
- capabilities: z.ZodObject<{
472
+ features: z.ZodObject<{
478
473
  workspace: z.ZodOptional<z.ZodUnknown>;
479
474
  tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
480
475
  name: z.ZodString;
@@ -484,7 +479,7 @@ export declare const harnessRequests: {
484
479
  }, z.core.$strict>;
485
480
  }, z.core.$strict>;
486
481
  result: z.ZodObject<{
487
- api: z.ZodLiteral<2>;
482
+ api: z.ZodLiteral<3>;
488
483
  tenantId: z.ZodString;
489
484
  sandbox: z.ZodObject<{
490
485
  backend: z.ZodNullable<z.ZodString>;
@@ -543,7 +538,6 @@ export declare const harnessRequests: {
543
538
  manifestHash: z.ZodString;
544
539
  mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
545
540
  agentId: z.ZodOptional<z.ZodString>;
546
- capabilityId: z.ZodString;
547
541
  serverName: z.ZodString;
548
542
  serverToolName: z.ZodString;
549
543
  name: z.ZodString;
@@ -558,7 +552,6 @@ export declare const harnessRequests: {
558
552
  }, z.core.$strip>>>;
559
553
  servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
560
554
  agentId: z.ZodOptional<z.ZodString>;
561
- capabilityId: z.ZodString;
562
555
  serverName: z.ZodString;
563
556
  instructions: z.ZodString;
564
557
  }, z.core.$strip>>>>;
@@ -620,7 +613,6 @@ export declare const harnessRequests: {
620
613
  path: z.ZodString;
621
614
  delegationId: z.ZodOptional<z.ZodString>;
622
615
  }, z.core.$strict>>;
623
- capabilityId: z.ZodOptional<z.ZodString>;
624
616
  toolName: z.ZodOptional<z.ZodString>;
625
617
  path: z.ZodOptional<z.ZodString>;
626
618
  key: z.ZodOptional<z.ZodString>;
@@ -711,7 +703,6 @@ export declare const harnessRequests: {
711
703
  manifestHash: z.ZodString;
712
704
  mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
713
705
  agentId: z.ZodOptional<z.ZodString>;
714
- capabilityId: z.ZodString;
715
706
  serverName: z.ZodString;
716
707
  serverToolName: z.ZodString;
717
708
  name: z.ZodString;
@@ -726,7 +717,6 @@ export declare const harnessRequests: {
726
717
  }, z.core.$strip>>>;
727
718
  servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
728
719
  agentId: z.ZodOptional<z.ZodString>;
729
- capabilityId: z.ZodString;
730
720
  serverName: z.ZodString;
731
721
  instructions: z.ZodString;
732
722
  }, z.core.$strip>>>>;
@@ -739,7 +729,6 @@ export declare const harnessRequests: {
739
729
  manifestHash: z.ZodString;
740
730
  mcpTools: z.ZodReadonly<z.ZodArray<z.ZodObject<{
741
731
  agentId: z.ZodOptional<z.ZodString>;
742
- capabilityId: z.ZodString;
743
732
  serverName: z.ZodString;
744
733
  serverToolName: z.ZodString;
745
734
  name: z.ZodString;
@@ -754,7 +743,6 @@ export declare const harnessRequests: {
754
743
  }, z.core.$strip>>>;
755
744
  servers: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
756
745
  agentId: z.ZodOptional<z.ZodString>;
757
- capabilityId: z.ZodString;
758
746
  serverName: z.ZodString;
759
747
  instructions: z.ZodString;
760
748
  }, z.core.$strip>>>>;
@@ -53,7 +53,6 @@ export const EffectIntentSchema = z
53
53
  manifestHash: z.string(),
54
54
  kind: z.enum(["model", "tool", "delegation", "agent"]),
55
55
  agent: z.object({ id: z.string(), path: z.string(), delegationId: z.string().optional() }).strict().optional(),
56
- capabilityId: z.string().optional(),
57
56
  toolName: z.string().optional(),
58
57
  path: z.string().optional(),
59
58
  key: z.string().optional(),
@@ -223,13 +222,17 @@ export const TraceContextSchema = z
223
222
  .strict();
224
223
  /**
225
224
  * A tool a harness runs itself (R4.2, Q3), declared in `hello`: the model may call it, and the
226
- * harness journals each call as a `tool` effect of capability `harness` (`HARNESS_TOOLS_CAPABILITY`)
227
- * with intent and outcome, like a sandbox tool, so the log records what really ran. It runs in
225
+ * harness journals each call as a `tool` effect with intent and outcome, like a sandbox tool, so
226
+ * the log records what really ran. Its name may not be one the agent or the Runtime already uses. It runs in
228
227
  * the harness's own process or pod: the egress gate is its only control.
229
228
  */
230
229
  export const NativeToolSchema = z
231
230
  .object({
232
- name: z.string().regex(/^[A-Za-z_][A-Za-z0-9_-]{0,63}$/),
231
+ // `__` names an MCP server's tools, which are discovered after a turn starts.
232
+ name: z
233
+ .string()
234
+ .regex(/^[A-Za-z_][A-Za-z0-9_-]{0,63}$/)
235
+ .refine((name) => !name.includes("__"), { message: "A harness's tool name must not contain '__'" }),
233
236
  description: z.string().max(4096).optional(),
234
237
  inputSchema: z.record(z.string(), z.unknown()),
235
238
  })
@@ -320,7 +323,7 @@ const outcomeObject = z.record(z.string(), z.unknown());
320
323
  /** Requests a harness sends to core, with their answers. */
321
324
  export const harnessRequests = {
322
325
  /**
323
- * `capabilities.workspace` declares that the harness serves the Tenant's workspaces (F6.2):
326
+ * `features.workspace` declares that the harness serves the Tenant's workspaces (F6.2):
324
327
  * core then sends it the `workspace.*` requests. The answer names the Tenant (its workspace
325
328
  * keys are scoped by it) and the sandbox backend preference the harness selects with.
326
329
  */
@@ -330,7 +333,7 @@ export const harnessRequests = {
330
333
  api: z.number().int(),
331
334
  name: z.string(),
332
335
  version: z.string(),
333
- capabilities: z
336
+ features: z
334
337
  .object({ workspace: z.unknown().optional(), tools: z.array(NativeToolSchema).max(64).optional() })
335
338
  .strict(),
336
339
  })
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "./contracts.js";
2
- export type * from "./types/middleware.js";
2
+ export type * from "./types/part.js";
3
3
  export type * from "./types/tool.js";
4
4
  export type * from "./types/agent.js";
5
5
  export type * from "./types/observe.js";