@nylorun/core 0.34.0-beta → 0.36.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 (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/compatibility.d.ts +9 -1
  3. package/dist/compatibility.js +8 -0
  4. package/dist/contracts.d.ts +352 -6
  5. package/dist/contracts.js +180 -6
  6. package/dist/definition/variant.js +8 -1
  7. package/dist/engine/blocks.d.ts +2 -0
  8. package/dist/engine/blocks.js +7 -0
  9. package/dist/engine/explain.d.ts +1 -1
  10. package/dist/engine/explain.js +27 -5
  11. package/dist/engine/index.d.ts +1 -0
  12. package/dist/engine/index.js +1 -0
  13. package/dist/engine/names.d.ts +1 -1
  14. package/dist/engine/names.js +1 -0
  15. package/dist/engine/preview.d.ts +6 -0
  16. package/dist/engine/preview.js +3 -1
  17. package/dist/engine/projection.d.ts +10 -6
  18. package/dist/engine/projection.js +110 -6
  19. package/dist/engine/tools.d.ts +32 -0
  20. package/dist/engine/tools.js +85 -1
  21. package/dist/folder/compile.d.ts +3 -3
  22. package/dist/folder/compile.js +82 -12
  23. package/dist/folder/engine.d.ts +14 -2
  24. package/dist/folder/engine.js +17 -3
  25. package/dist/folder/index.d.ts +2 -0
  26. package/dist/folder/index.js +2 -0
  27. package/dist/folder/migrate-v3.d.ts +20 -0
  28. package/dist/folder/migrate-v3.js +124 -0
  29. package/dist/folder/nested.js +5 -0
  30. package/dist/folder/schemas.js +19 -6
  31. package/dist/folder/v3.d.ts +66 -0
  32. package/dist/folder/v3.js +139 -0
  33. package/dist/harness-api/harness-api.schema.json +19 -4
  34. package/dist/harness-api/json-schema.js +3 -2
  35. package/dist/harness-api/schema.d.ts +6 -0
  36. package/dist/harness-api/schema.js +9 -2
  37. package/dist/manifest-schemas.js +6 -4
  38. package/dist/plugins/bundle.generated.d.ts +120 -0
  39. package/dist/plugins/bundle.generated.js +143 -0
  40. package/dist/plugins/index.d.ts +65 -0
  41. package/dist/plugins/index.js +62 -0
  42. package/dist/schemas/agent-folder/agent-md.schema.json +26 -4
  43. package/dist/schemas/agent-folder/runtime.schema.json +22 -1
  44. package/dist/schemas/agent-manifest.schema.json +72 -1
  45. package/dist/schemas/harness-manifest.schema.json +51 -1
  46. package/dist/schemas/runtime-manifest.schema.json +22 -1
  47. package/dist/types/manifest.d.ts +14 -0
  48. package/package.json +1 -1
@@ -62,6 +62,7 @@ export declare const HarnessEngineSchema: z.ZodObject<{
62
62
  }, z.core.$strict>>;
63
63
  outputs: z.ZodOptional<z.ZodBoolean>;
64
64
  toolSearch: z.ZodOptional<z.ZodBoolean>;
65
+ triggers: z.ZodOptional<z.ZodBoolean>;
65
66
  instructions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
66
67
  artifacts_read: "artifacts_read";
67
68
  artifacts_save: "artifacts_save";
@@ -73,6 +74,7 @@ export declare const HarnessEngineSchema: z.ZodObject<{
73
74
  skill_folder: "skill_folder";
74
75
  skills: "skills";
75
76
  tool_search: "tool_search";
77
+ triggers: "triggers";
76
78
  wake: "wake";
77
79
  }> & z.core.$partial, z.ZodString>>;
78
80
  blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -87,12 +89,26 @@ export declare const HarnessEngineSchema: z.ZodObject<{
87
89
  skill_folder: "skill_folder";
88
90
  skills: "skills";
89
91
  tool_search: "tool_search";
92
+ triggers: "triggers";
90
93
  wake: "wake";
91
94
  }>;
92
95
  version: z.ZodNumber;
93
96
  sha256: z.ZodString;
94
97
  source: z.ZodOptional<z.ZodString>;
95
98
  }, z.core.$strict>>>;
99
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
+ name: z.ZodEnum<{
101
+ "nylorun-artifacts": "nylorun-artifacts";
102
+ "nylorun-interactions": "nylorun-interactions";
103
+ "nylorun-memory": "nylorun-memory";
104
+ "nylorun-plan": "nylorun-plan";
105
+ "nylorun-sandbox": "nylorun-sandbox";
106
+ "nylorun-triggers": "nylorun-triggers";
107
+ }>;
108
+ tools: z.ZodArray<z.ZodString>;
109
+ sha256: z.ZodString;
110
+ hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
111
+ }, z.core.$strict>>>;
96
112
  }, z.core.$strict>;
97
113
  /**
98
114
  * An agent's manifest (manifest v7). Its output is checked against `AgentManifest` here and below
@@ -219,6 +235,11 @@ export declare const EnvironmentLimitsSchema: z.ZodObject<{
219
235
  versionBytes: z.ZodOptional<z.ZodNumber>;
220
236
  versionEntries: z.ZodOptional<z.ZodNumber>;
221
237
  }, z.core.$strict>>;
238
+ triggers: z.ZodOptional<z.ZodObject<{
239
+ count: z.ZodOptional<z.ZodNumber>;
240
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
241
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
242
+ }, z.core.$strict>>;
222
243
  }, z.core.$strict>;
223
244
  export type EnvironmentLimits = z.infer<typeof EnvironmentLimitsSchema>;
224
245
  /**
@@ -291,6 +312,11 @@ export declare const EnvironmentRecipeSchema: z.ZodObject<{
291
312
  versionBytes: z.ZodOptional<z.ZodNumber>;
292
313
  versionEntries: z.ZodOptional<z.ZodNumber>;
293
314
  }, z.core.$strict>>;
315
+ triggers: z.ZodOptional<z.ZodObject<{
316
+ count: z.ZodOptional<z.ZodNumber>;
317
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
318
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
319
+ }, z.core.$strict>>;
294
320
  }, z.core.$strict>>;
295
321
  secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
296
322
  required: z.ZodOptional<z.ZodBoolean>;
@@ -500,6 +526,11 @@ export declare const AgentViewSchema: z.ZodObject<{
500
526
  versionBytes: z.ZodOptional<z.ZodNumber>;
501
527
  versionEntries: z.ZodOptional<z.ZodNumber>;
502
528
  }, z.core.$strict>>;
529
+ triggers: z.ZodOptional<z.ZodObject<{
530
+ count: z.ZodOptional<z.ZodNumber>;
531
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
532
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
533
+ }, z.core.$strict>>;
503
534
  }, z.core.$strict>>;
504
535
  secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
505
536
  required: z.ZodOptional<z.ZodBoolean>;
@@ -695,7 +726,7 @@ export declare const MemoryUpdatedPayloadSchema: z.ZodObject<{
695
726
  version: z.ZodNumber;
696
727
  }, z.core.$strict>>;
697
728
  }, z.core.$loose>;
698
- export declare const AGENT_EVENT_TYPES: readonly ["agent.created", "agent.attached", "agent.detached", "agent.deleted", "agent.running", "agent.suspended", "agent.relaunched", "agent.lost", "agent.reset", "agent.failed", "agent.forked", "agent.outdated", "agent.version_changed", "agent.start_failed", "agent.egress", "agent.run", "agent.trigger_paused", "agent.trigger_resumed", "agent.trigger_secret_rotated", "agent.memory_updated"];
729
+ export declare const AGENT_EVENT_TYPES: readonly ["agent.created", "agent.attached", "agent.detached", "agent.deleted", "agent.running", "agent.suspended", "agent.relaunched", "agent.lost", "agent.reset", "agent.failed", "agent.forked", "agent.outdated", "agent.version_changed", "agent.start_failed", "agent.egress", "agent.run", "agent.trigger_paused", "agent.trigger_resumed", "agent.trigger_secret_rotated", "agent.trigger_created", "agent.trigger_updated", "agent.trigger_deleted", "agent.memory_updated"];
699
730
  export type AgentEventType = (typeof AGENT_EVENT_TYPES)[number];
700
731
  /** The payload of each Agent lifecycle event. */
701
732
  export declare const AGENT_EVENT_PAYLOADS: {
@@ -848,6 +879,39 @@ export declare const AGENT_EVENT_PAYLOADS: {
848
879
  readonly "agent.trigger_secret_rotated": z.ZodObject<{
849
880
  triggerId: z.ZodString;
850
881
  }, z.core.$loose>;
882
+ /**
883
+ * An agent made a trigger with the `triggers` tool (D83), or replaced one with the same id
884
+ * (`agent.trigger_updated`): the session whose agent made it (`sessionId`), the session it runs
885
+ * in (`session`), its title and its next run.
886
+ */
887
+ readonly "agent.trigger_created": z.ZodObject<{
888
+ triggerId: z.ZodString;
889
+ kind: z.ZodEnum<{
890
+ at: "at";
891
+ schedule: "schedule";
892
+ }>;
893
+ sessionId: z.ZodString;
894
+ session: z.ZodString;
895
+ title: z.ZodOptional<z.ZodString>;
896
+ nextRunAt: z.ZodNullable<z.ZodString>;
897
+ }, z.core.$loose>;
898
+ readonly "agent.trigger_updated": z.ZodObject<{
899
+ triggerId: z.ZodString;
900
+ kind: z.ZodEnum<{
901
+ at: "at";
902
+ schedule: "schedule";
903
+ }>;
904
+ sessionId: z.ZodString;
905
+ session: z.ZodString;
906
+ title: z.ZodOptional<z.ZodString>;
907
+ nextRunAt: z.ZodNullable<z.ZodString>;
908
+ }, z.core.$loose>;
909
+ /** A trigger an agent made was deleted: by an agent of `sessionId`, or over the API (`principal`). */
910
+ readonly "agent.trigger_deleted": z.ZodObject<{
911
+ triggerId: z.ZodString;
912
+ sessionId: z.ZodOptional<z.ZodString>;
913
+ principal: z.ZodOptional<z.ZodString>;
914
+ }, z.core.$loose>;
851
915
  /** A turn changed the Agent's memories (`memory.updated` in its session): which, and how. */
852
916
  readonly "agent.memory_updated": z.ZodObject<{
853
917
  effectId: z.ZodString;
@@ -892,9 +956,12 @@ export declare const AgentEventSchema: z.ZodObject<{
892
956
  "agent.running": "agent.running";
893
957
  "agent.start_failed": "agent.start_failed";
894
958
  "agent.suspended": "agent.suspended";
959
+ "agent.trigger_created": "agent.trigger_created";
960
+ "agent.trigger_deleted": "agent.trigger_deleted";
895
961
  "agent.trigger_paused": "agent.trigger_paused";
896
962
  "agent.trigger_resumed": "agent.trigger_resumed";
897
963
  "agent.trigger_secret_rotated": "agent.trigger_secret_rotated";
964
+ "agent.trigger_updated": "agent.trigger_updated";
898
965
  "agent.version_changed": "agent.version_changed";
899
966
  }>;
900
967
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -925,9 +992,12 @@ export declare const ListAgentEventsResponseSchema: z.ZodObject<{
925
992
  "agent.running": "agent.running";
926
993
  "agent.start_failed": "agent.start_failed";
927
994
  "agent.suspended": "agent.suspended";
995
+ "agent.trigger_created": "agent.trigger_created";
996
+ "agent.trigger_deleted": "agent.trigger_deleted";
928
997
  "agent.trigger_paused": "agent.trigger_paused";
929
998
  "agent.trigger_resumed": "agent.trigger_resumed";
930
999
  "agent.trigger_secret_rotated": "agent.trigger_secret_rotated";
1000
+ "agent.trigger_updated": "agent.trigger_updated";
931
1001
  "agent.version_changed": "agent.version_changed";
932
1002
  }>;
933
1003
  payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -1298,7 +1368,17 @@ export declare function triggerKindOf(trigger: Trigger): Exclude<TriggerKind, "w
1298
1368
  * `manual`, or `new` for one an upgrade added), `completed` is an `at` that ran.
1299
1369
  */
1300
1370
  export declare const TRIGGER_STATUSES: readonly ["active", "paused", "completed"];
1301
- /** `GET /v1/agents/{id}/triggers`: one trigger, from its manifest entry and the Agent's state. */
1371
+ /**
1372
+ * Where a trigger's definition comes from (D83): `manifest` (the version's `runtime.triggers`),
1373
+ * `agent` (made by an agent of the Agent's sessions with the `triggers` tool, kept by the Agent)
1374
+ * or `wake` (a session's booked wake, never listed).
1375
+ */
1376
+ export declare const TRIGGER_ORIGINS: readonly ["manifest", "agent", "wake"];
1377
+ export type TriggerOrigin = (typeof TRIGGER_ORIGINS)[number];
1378
+ /**
1379
+ * `GET /v1/agents/{id}/triggers`: one trigger, from its manifest entry (or, for one an agent made,
1380
+ * its own definition) and the Agent's state.
1381
+ */
1302
1382
  export declare const TriggerViewSchema: z.ZodObject<{
1303
1383
  id: z.ZodString;
1304
1384
  kind: z.ZodEnum<{
@@ -1307,6 +1387,13 @@ export declare const TriggerViewSchema: z.ZodObject<{
1307
1387
  wake: "wake";
1308
1388
  webhook: "webhook";
1309
1389
  }>;
1390
+ origin: z.ZodEnum<{
1391
+ agent: "agent";
1392
+ manifest: "manifest";
1393
+ wake: "wake";
1394
+ }>;
1395
+ title: z.ZodNullable<z.ZodString>;
1396
+ createdSessionId: z.ZodNullable<z.ZodString>;
1310
1397
  status: z.ZodEnum<{
1311
1398
  active: "active";
1312
1399
  completed: "completed";
@@ -1321,6 +1408,7 @@ export declare const TriggerViewSchema: z.ZodObject<{
1321
1408
  lastRunAt: z.ZodNullable<z.ZodString>;
1322
1409
  webhookUrl: z.ZodOptional<z.ZodString>;
1323
1410
  secretSet: z.ZodOptional<z.ZodBoolean>;
1411
+ prompt: z.ZodOptional<z.ZodString>;
1324
1412
  }, z.core.$strict>;
1325
1413
  export type TriggerView = z.infer<typeof TriggerViewSchema>;
1326
1414
  export declare const TriggerListSchema: z.ZodObject<{
@@ -1332,6 +1420,13 @@ export declare const TriggerListSchema: z.ZodObject<{
1332
1420
  wake: "wake";
1333
1421
  webhook: "webhook";
1334
1422
  }>;
1423
+ origin: z.ZodEnum<{
1424
+ agent: "agent";
1425
+ manifest: "manifest";
1426
+ wake: "wake";
1427
+ }>;
1428
+ title: z.ZodNullable<z.ZodString>;
1429
+ createdSessionId: z.ZodNullable<z.ZodString>;
1335
1430
  status: z.ZodEnum<{
1336
1431
  active: "active";
1337
1432
  completed: "completed";
@@ -1346,8 +1441,90 @@ export declare const TriggerListSchema: z.ZodObject<{
1346
1441
  lastRunAt: z.ZodNullable<z.ZodString>;
1347
1442
  webhookUrl: z.ZodOptional<z.ZodString>;
1348
1443
  secretSet: z.ZodOptional<z.ZodBoolean>;
1444
+ prompt: z.ZodOptional<z.ZodString>;
1349
1445
  }, z.core.$strict>>;
1350
1446
  }, z.core.$strict>;
1447
+ /** `in` of the `triggers` tool (D83): a delay in minutes, hours or days, such as `30m`, `2h`, `1d`. */
1448
+ export declare const TRIGGER_DELAY_PATTERN: RegExp;
1449
+ /** The longest title an agent gives a trigger it makes. */
1450
+ export declare const TRIGGER_TITLE_MAX = 80;
1451
+ /** Where an agent-made trigger runs: the calling session (`this`), or a session of its own (`own`). */
1452
+ export declare const TRIGGER_TOOL_SESSIONS: readonly ["this", "own"];
1453
+ /**
1454
+ * A call of the `triggers` tool (D83), which the Runtime serves for an agent whose version
1455
+ * declares `engine.triggers`: `list` the triggers the calling session made; `create` one (or
1456
+ * replace the session's own with the same `id`) with exactly one of `schedule` (with `timezone`),
1457
+ * `at` or `in`, the `session` it runs in and its `prompt`; `delete` one by `id`.
1458
+ */
1459
+ export declare const TriggerToolInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1460
+ command: z.ZodLiteral<"list">;
1461
+ }, z.core.$strict>, z.ZodObject<{
1462
+ command: z.ZodLiteral<"create">;
1463
+ id: z.ZodString;
1464
+ title: z.ZodOptional<z.ZodString>;
1465
+ schedule: z.ZodOptional<z.ZodString>;
1466
+ timezone: z.ZodOptional<z.ZodString>;
1467
+ at: z.ZodOptional<z.ZodISODateTime>;
1468
+ in: z.ZodOptional<z.ZodString>;
1469
+ session: z.ZodEnum<{
1470
+ own: "own";
1471
+ this: "this";
1472
+ }>;
1473
+ prompt: z.ZodString;
1474
+ }, z.core.$strict>, z.ZodObject<{
1475
+ command: z.ZodLiteral<"delete">;
1476
+ id: z.ZodString;
1477
+ }, z.core.$strict>], "command">;
1478
+ export type TriggerToolInput = z.infer<typeof TriggerToolInputSchema>;
1479
+ /** One trigger as the `triggers` tool lists it. */
1480
+ export declare const TriggerToolItemSchema: z.ZodObject<{
1481
+ id: z.ZodString;
1482
+ title: z.ZodNullable<z.ZodString>;
1483
+ status: z.ZodEnum<{
1484
+ active: "active";
1485
+ completed: "completed";
1486
+ paused: "paused";
1487
+ }>;
1488
+ schedule: z.ZodOptional<z.ZodString>;
1489
+ timezone: z.ZodOptional<z.ZodString>;
1490
+ at: z.ZodOptional<z.ZodString>;
1491
+ session: z.ZodString;
1492
+ nextRunAt: z.ZodNullable<z.ZodString>;
1493
+ prompt: z.ZodString;
1494
+ }, z.core.$strict>;
1495
+ /** What a `triggers` call answers: the trigger made, the list, or the one deleted. */
1496
+ export declare const TriggerToolOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
1497
+ id: z.ZodString;
1498
+ status: z.ZodEnum<{
1499
+ active: "active";
1500
+ completed: "completed";
1501
+ paused: "paused";
1502
+ }>;
1503
+ nextRunAt: z.ZodNullable<z.ZodString>;
1504
+ session: z.ZodString;
1505
+ now: z.ZodOptional<z.ZodString>;
1506
+ }, z.core.$strict>, z.ZodObject<{
1507
+ triggers: z.ZodArray<z.ZodObject<{
1508
+ id: z.ZodString;
1509
+ title: z.ZodNullable<z.ZodString>;
1510
+ status: z.ZodEnum<{
1511
+ active: "active";
1512
+ completed: "completed";
1513
+ paused: "paused";
1514
+ }>;
1515
+ schedule: z.ZodOptional<z.ZodString>;
1516
+ timezone: z.ZodOptional<z.ZodString>;
1517
+ at: z.ZodOptional<z.ZodString>;
1518
+ session: z.ZodString;
1519
+ nextRunAt: z.ZodNullable<z.ZodString>;
1520
+ prompt: z.ZodString;
1521
+ }, z.core.$strict>>;
1522
+ now: z.ZodOptional<z.ZodString>;
1523
+ }, z.core.$strict>, z.ZodObject<{
1524
+ id: z.ZodString;
1525
+ deleted: z.ZodLiteral<true>;
1526
+ }, z.core.$strict>]>;
1527
+ export type TriggerToolOutput = z.infer<typeof TriggerToolOutputSchema>;
1351
1528
  /**
1352
1529
  * What a run came to: `started` a turn, `queued` a message behind a running turn,
1353
1530
  * `skipped` (nothing started: `overlap`, `rate_limited`, `paused`) or `failed` (`queue_full`,
@@ -1379,6 +1556,78 @@ export declare const TriggerRunSchema: z.ZodObject<{
1379
1556
  queuedMessageId: z.ZodNullable<z.ZodString>;
1380
1557
  }, z.core.$strict>;
1381
1558
  export type TriggerRun = z.infer<typeof TriggerRunSchema>;
1559
+ /**
1560
+ * One run on the Tenant's runs stream (D83, `GET /v1/runs/stream`): a run of any Agent's
1561
+ * triggers, as `TriggerRunSchema` has it, with its Agent and its trigger's origin and title. A
1562
+ * run may arrive twice (after a crash between append and mark); a reader drops a `runId` it has
1563
+ * seen.
1564
+ */
1565
+ export declare const TenantRunSchema: z.ZodObject<{
1566
+ runId: z.ZodString;
1567
+ agentId: z.ZodString;
1568
+ triggerId: z.ZodString;
1569
+ kind: z.ZodEnum<{
1570
+ at: "at";
1571
+ schedule: "schedule";
1572
+ wake: "wake";
1573
+ webhook: "webhook";
1574
+ }>;
1575
+ status: z.ZodEnum<{
1576
+ failed: "failed";
1577
+ queued: "queued";
1578
+ skipped: "skipped";
1579
+ started: "started";
1580
+ }>;
1581
+ reason: z.ZodNullable<z.ZodString>;
1582
+ sessionId: z.ZodNullable<z.ZodString>;
1583
+ turnId: z.ZodNullable<z.ZodString>;
1584
+ queuedMessageId: z.ZodNullable<z.ZodString>;
1585
+ dueAt: z.ZodString;
1586
+ firedAt: z.ZodString;
1587
+ late: z.ZodBoolean;
1588
+ origin: z.ZodEnum<{
1589
+ agent: "agent";
1590
+ manifest: "manifest";
1591
+ wake: "wake";
1592
+ }>;
1593
+ title: z.ZodNullable<z.ZodString>;
1594
+ }, z.core.$strict>;
1595
+ export type TenantRun = z.infer<typeof TenantRunSchema>;
1596
+ /** One event of `GET /v1/runs/stream` (`event: run`): the run, and the cursor to resume after it. */
1597
+ export declare const TenantRunEventSchema: z.ZodObject<{
1598
+ cursor: z.ZodString;
1599
+ run: z.ZodObject<{
1600
+ runId: z.ZodString;
1601
+ agentId: z.ZodString;
1602
+ triggerId: z.ZodString;
1603
+ kind: z.ZodEnum<{
1604
+ at: "at";
1605
+ schedule: "schedule";
1606
+ wake: "wake";
1607
+ webhook: "webhook";
1608
+ }>;
1609
+ status: z.ZodEnum<{
1610
+ failed: "failed";
1611
+ queued: "queued";
1612
+ skipped: "skipped";
1613
+ started: "started";
1614
+ }>;
1615
+ reason: z.ZodNullable<z.ZodString>;
1616
+ sessionId: z.ZodNullable<z.ZodString>;
1617
+ turnId: z.ZodNullable<z.ZodString>;
1618
+ queuedMessageId: z.ZodNullable<z.ZodString>;
1619
+ dueAt: z.ZodString;
1620
+ firedAt: z.ZodString;
1621
+ late: z.ZodBoolean;
1622
+ origin: z.ZodEnum<{
1623
+ agent: "agent";
1624
+ manifest: "manifest";
1625
+ wake: "wake";
1626
+ }>;
1627
+ title: z.ZodNullable<z.ZodString>;
1628
+ }, z.core.$strict>;
1629
+ }, z.core.$strict>;
1630
+ export type TenantRunEvent = z.infer<typeof TenantRunEventSchema>;
1382
1631
  /** `GET /v1/agents/{id}/runs`: runs, newest first. */
1383
1632
  export declare const TriggerRunPageSchema: z.ZodObject<{
1384
1633
  runs: z.ZodArray<z.ZodObject<{
@@ -1619,6 +1868,11 @@ export declare const RuntimeSectionSchema: z.ZodObject<{
1619
1868
  versionBytes: z.ZodOptional<z.ZodNumber>;
1620
1869
  versionEntries: z.ZodOptional<z.ZodNumber>;
1621
1870
  }, z.core.$strict>>;
1871
+ triggers: z.ZodOptional<z.ZodObject<{
1872
+ count: z.ZodOptional<z.ZodNumber>;
1873
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
1874
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
1875
+ }, z.core.$strict>>;
1622
1876
  }, z.core.$strict>>;
1623
1877
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1624
1878
  required: z.ZodOptional<z.ZodBoolean>;
@@ -1723,6 +1977,11 @@ export declare const AgentManifestV8Schema: z.ZodObject<{
1723
1977
  versionBytes: z.ZodOptional<z.ZodNumber>;
1724
1978
  versionEntries: z.ZodOptional<z.ZodNumber>;
1725
1979
  }, z.core.$strict>>;
1980
+ triggers: z.ZodOptional<z.ZodObject<{
1981
+ count: z.ZodOptional<z.ZodNumber>;
1982
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
1983
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
1984
+ }, z.core.$strict>>;
1726
1985
  }, z.core.$strict>>;
1727
1986
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1728
1987
  required: z.ZodOptional<z.ZodBoolean>;
@@ -1888,6 +2147,7 @@ export declare const HarnessManifestFileSchema: z.ZodObject<{
1888
2147
  }, z.core.$strict>>;
1889
2148
  outputs: z.ZodOptional<z.ZodBoolean>;
1890
2149
  toolSearch: z.ZodOptional<z.ZodBoolean>;
2150
+ triggers: z.ZodOptional<z.ZodBoolean>;
1891
2151
  instructions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
1892
2152
  artifacts_read: "artifacts_read";
1893
2153
  artifacts_save: "artifacts_save";
@@ -1899,6 +2159,7 @@ export declare const HarnessManifestFileSchema: z.ZodObject<{
1899
2159
  skill_folder: "skill_folder";
1900
2160
  skills: "skills";
1901
2161
  tool_search: "tool_search";
2162
+ triggers: "triggers";
1902
2163
  wake: "wake";
1903
2164
  }> & z.core.$partial, z.ZodString>>;
1904
2165
  blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -1913,12 +2174,26 @@ export declare const HarnessManifestFileSchema: z.ZodObject<{
1913
2174
  skill_folder: "skill_folder";
1914
2175
  skills: "skills";
1915
2176
  tool_search: "tool_search";
2177
+ triggers: "triggers";
1916
2178
  wake: "wake";
1917
2179
  }>;
1918
2180
  version: z.ZodNumber;
1919
2181
  sha256: z.ZodString;
1920
2182
  source: z.ZodOptional<z.ZodString>;
1921
2183
  }, z.core.$strict>>>;
2184
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
2185
+ name: z.ZodEnum<{
2186
+ "nylorun-artifacts": "nylorun-artifacts";
2187
+ "nylorun-interactions": "nylorun-interactions";
2188
+ "nylorun-memory": "nylorun-memory";
2189
+ "nylorun-plan": "nylorun-plan";
2190
+ "nylorun-sandbox": "nylorun-sandbox";
2191
+ "nylorun-triggers": "nylorun-triggers";
2192
+ }>;
2193
+ tools: z.ZodArray<z.ZodString>;
2194
+ sha256: z.ZodString;
2195
+ hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2196
+ }, z.core.$strict>>>;
1922
2197
  }, z.core.$strict>>;
1923
2198
  credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1924
2199
  requires: z.ZodOptional<z.ZodObject<{
@@ -1969,6 +2244,11 @@ export declare const RuntimeManifestFileSchema: z.ZodObject<{
1969
2244
  versionBytes: z.ZodOptional<z.ZodNumber>;
1970
2245
  versionEntries: z.ZodOptional<z.ZodNumber>;
1971
2246
  }, z.core.$strict>>;
2247
+ triggers: z.ZodOptional<z.ZodObject<{
2248
+ count: z.ZodOptional<z.ZodNumber>;
2249
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
2250
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
2251
+ }, z.core.$strict>>;
1972
2252
  }, z.core.$strict>>;
1973
2253
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1974
2254
  required: z.ZodOptional<z.ZodBoolean>;
@@ -2147,6 +2427,7 @@ export declare const AgentManifestFileSchema: z.ZodObject<{
2147
2427
  }, z.core.$strict>>;
2148
2428
  outputs: z.ZodOptional<z.ZodBoolean>;
2149
2429
  toolSearch: z.ZodOptional<z.ZodBoolean>;
2430
+ triggers: z.ZodOptional<z.ZodBoolean>;
2150
2431
  instructions: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
2151
2432
  artifacts_read: "artifacts_read";
2152
2433
  artifacts_save: "artifacts_save";
@@ -2158,6 +2439,7 @@ export declare const AgentManifestFileSchema: z.ZodObject<{
2158
2439
  skill_folder: "skill_folder";
2159
2440
  skills: "skills";
2160
2441
  tool_search: "tool_search";
2442
+ triggers: "triggers";
2161
2443
  wake: "wake";
2162
2444
  }> & z.core.$partial, z.ZodString>>;
2163
2445
  blocks: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -2172,12 +2454,26 @@ export declare const AgentManifestFileSchema: z.ZodObject<{
2172
2454
  skill_folder: "skill_folder";
2173
2455
  skills: "skills";
2174
2456
  tool_search: "tool_search";
2457
+ triggers: "triggers";
2175
2458
  wake: "wake";
2176
2459
  }>;
2177
2460
  version: z.ZodNumber;
2178
2461
  sha256: z.ZodString;
2179
2462
  source: z.ZodOptional<z.ZodString>;
2180
2463
  }, z.core.$strict>>>;
2464
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
2465
+ name: z.ZodEnum<{
2466
+ "nylorun-artifacts": "nylorun-artifacts";
2467
+ "nylorun-interactions": "nylorun-interactions";
2468
+ "nylorun-memory": "nylorun-memory";
2469
+ "nylorun-plan": "nylorun-plan";
2470
+ "nylorun-sandbox": "nylorun-sandbox";
2471
+ "nylorun-triggers": "nylorun-triggers";
2472
+ }>;
2473
+ tools: z.ZodArray<z.ZodString>;
2474
+ sha256: z.ZodString;
2475
+ hosts: z.ZodOptional<z.ZodArray<z.ZodString>>;
2476
+ }, z.core.$strict>>>;
2181
2477
  }, z.core.$strict>>;
2182
2478
  credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2183
2479
  requires: z.ZodOptional<z.ZodObject<{
@@ -2225,6 +2521,11 @@ export declare const AgentManifestFileSchema: z.ZodObject<{
2225
2521
  versionBytes: z.ZodOptional<z.ZodNumber>;
2226
2522
  versionEntries: z.ZodOptional<z.ZodNumber>;
2227
2523
  }, z.core.$strict>>;
2524
+ triggers: z.ZodOptional<z.ZodObject<{
2525
+ count: z.ZodOptional<z.ZodNumber>;
2526
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
2527
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
2528
+ }, z.core.$strict>>;
2228
2529
  }, z.core.$strict>>;
2229
2530
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2230
2531
  required: z.ZodOptional<z.ZodBoolean>;
@@ -2337,6 +2638,11 @@ export declare const PutAgentManifestRequestSchema: z.ZodObject<{
2337
2638
  versionBytes: z.ZodOptional<z.ZodNumber>;
2338
2639
  versionEntries: z.ZodOptional<z.ZodNumber>;
2339
2640
  }, z.core.$strict>>;
2641
+ triggers: z.ZodOptional<z.ZodObject<{
2642
+ count: z.ZodOptional<z.ZodNumber>;
2643
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
2644
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
2645
+ }, z.core.$strict>>;
2340
2646
  }, z.core.$strict>>;
2341
2647
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2342
2648
  required: z.ZodOptional<z.ZodBoolean>;
@@ -2512,6 +2818,11 @@ export declare const AgentManifestViewSchema: z.ZodObject<{
2512
2818
  versionBytes: z.ZodOptional<z.ZodNumber>;
2513
2819
  versionEntries: z.ZodOptional<z.ZodNumber>;
2514
2820
  }, z.core.$strict>>;
2821
+ triggers: z.ZodOptional<z.ZodObject<{
2822
+ count: z.ZodOptional<z.ZodNumber>;
2823
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
2824
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
2825
+ }, z.core.$strict>>;
2515
2826
  }, z.core.$strict>>;
2516
2827
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2517
2828
  required: z.ZodOptional<z.ZodBoolean>;
@@ -2702,6 +3013,11 @@ export declare const ListAgentManifestsResponseSchema: z.ZodObject<{
2702
3013
  versionBytes: z.ZodOptional<z.ZodNumber>;
2703
3014
  versionEntries: z.ZodOptional<z.ZodNumber>;
2704
3015
  }, z.core.$strict>>;
3016
+ triggers: z.ZodOptional<z.ZodObject<{
3017
+ count: z.ZodOptional<z.ZodNumber>;
3018
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
3019
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
3020
+ }, z.core.$strict>>;
2705
3021
  }, z.core.$strict>>;
2706
3022
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2707
3023
  required: z.ZodOptional<z.ZodBoolean>;
@@ -2889,6 +3205,11 @@ export declare const AgentManifestPlanSchema: z.ZodObject<{
2889
3205
  versionBytes: z.ZodOptional<z.ZodNumber>;
2890
3206
  versionEntries: z.ZodOptional<z.ZodNumber>;
2891
3207
  }, z.core.$strict>>;
3208
+ triggers: z.ZodOptional<z.ZodObject<{
3209
+ count: z.ZodOptional<z.ZodNumber>;
3210
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
3211
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
3212
+ }, z.core.$strict>>;
2892
3213
  }, z.core.$strict>>;
2893
3214
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2894
3215
  required: z.ZodOptional<z.ZodBoolean>;
@@ -3026,6 +3347,11 @@ export declare const SaveAgentManifestResponseSchema: z.ZodObject<{
3026
3347
  versionBytes: z.ZodOptional<z.ZodNumber>;
3027
3348
  versionEntries: z.ZodOptional<z.ZodNumber>;
3028
3349
  }, z.core.$strict>>;
3350
+ triggers: z.ZodOptional<z.ZodObject<{
3351
+ count: z.ZodOptional<z.ZodNumber>;
3352
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
3353
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
3354
+ }, z.core.$strict>>;
3029
3355
  }, z.core.$strict>>;
3030
3356
  secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
3031
3357
  required: z.ZodOptional<z.ZodBoolean>;
@@ -3313,6 +3639,11 @@ export declare const ForkAgentResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3313
3639
  versionBytes: z.ZodOptional<z.ZodNumber>;
3314
3640
  versionEntries: z.ZodOptional<z.ZodNumber>;
3315
3641
  }, z.core.$strict>>;
3642
+ triggers: z.ZodOptional<z.ZodObject<{
3643
+ count: z.ZodOptional<z.ZodNumber>;
3644
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
3645
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
3646
+ }, z.core.$strict>>;
3316
3647
  }, z.core.$strict>>;
3317
3648
  secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
3318
3649
  required: z.ZodOptional<z.ZodBoolean>;
@@ -6852,6 +7183,11 @@ export declare const ListAgentsResponseSchema: z.ZodObject<{
6852
7183
  versionBytes: z.ZodOptional<z.ZodNumber>;
6853
7184
  versionEntries: z.ZodOptional<z.ZodNumber>;
6854
7185
  }, z.core.$strict>>;
7186
+ triggers: z.ZodOptional<z.ZodObject<{
7187
+ count: z.ZodOptional<z.ZodNumber>;
7188
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
7189
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
7190
+ }, z.core.$strict>>;
6855
7191
  }, z.core.$strict>>;
6856
7192
  secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
6857
7193
  required: z.ZodOptional<z.ZodBoolean>;
@@ -7411,10 +7747,12 @@ export declare const ToolInputConditionSchema: z.ZodObject<{
7411
7747
  export type ToolInputCondition = z.infer<typeof ToolInputConditionSchema>;
7412
7748
  /**
7413
7749
  * One rule of the Tenant's tool policy, applied at the Tool Gate to every MCP and HTTP tool call
7414
- * of every harness. A rule matches a call when every selector it sets matches: `tool` (the tool's
7415
- * identity: an MCP tool's own name on its server, or an HTTP tool's declared name; never the name
7416
- * a harness gave the model; `*` for any run of characters), `server` (an MCP server's name),
7417
- * `kind`, `agent` (the agent that calls it: the agent manifest's name, or the id of an agent used
7750
+ * of every harness, and to the operations the Runtime serves itself (`kind: "runtime"`, D83). A
7751
+ * rule matches a call when every selector it sets matches: `tool` (the tool's identity: an MCP
7752
+ * tool's own name on its server, an HTTP tool's declared name, or a runtime operation:
7753
+ * `triggers`, `memory`, `schedule_wake`; never the name a harness gave the model; `*` for any run
7754
+ * of characters), `server` (an MCP server's name), `kind` (a runtime operation matches only a rule
7755
+ * that names `kind: "runtime"`), `agent` (the agent that calls it: the agent manifest's name, or the id of an agent used
7418
7756
  * as a tool or of a flow's agent; never an Agent's id; the session's root agent's name matches its
7419
7757
  * subagents' calls too, those of the agents it uses as tools) and `when` (fields of the input, by
7420
7758
  * dotted path). The strictest matching rule decides: `deny` refuses the call before it is sent,
@@ -7435,6 +7773,7 @@ export declare const ToolRuleSchema: z.ZodObject<{
7435
7773
  kind: z.ZodOptional<z.ZodEnum<{
7436
7774
  http: "http";
7437
7775
  mcp: "mcp";
7776
+ runtime: "runtime";
7438
7777
  }>>;
7439
7778
  agent: z.ZodOptional<z.ZodString>;
7440
7779
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -7463,6 +7802,7 @@ export declare const PutToolPolicyRequestSchema: z.ZodObject<{
7463
7802
  kind: z.ZodOptional<z.ZodEnum<{
7464
7803
  http: "http";
7465
7804
  mcp: "mcp";
7805
+ runtime: "runtime";
7466
7806
  }>>;
7467
7807
  agent: z.ZodOptional<z.ZodString>;
7468
7808
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -7491,6 +7831,7 @@ export declare const ToolPolicySchema: z.ZodObject<{
7491
7831
  kind: z.ZodOptional<z.ZodEnum<{
7492
7832
  http: "http";
7493
7833
  mcp: "mcp";
7834
+ runtime: "runtime";
7494
7835
  }>>;
7495
7836
  agent: z.ZodOptional<z.ZodString>;
7496
7837
  when: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -8901,6 +9242,11 @@ export declare const AgentPageSchema: z.ZodObject<{
8901
9242
  versionBytes: z.ZodOptional<z.ZodNumber>;
8902
9243
  versionEntries: z.ZodOptional<z.ZodNumber>;
8903
9244
  }, z.core.$strict>>;
9245
+ triggers: z.ZodOptional<z.ZodObject<{
9246
+ count: z.ZodOptional<z.ZodNumber>;
9247
+ minIntervalMs: z.ZodOptional<z.ZodNumber>;
9248
+ runsPerHour: z.ZodOptional<z.ZodNumber>;
9249
+ }, z.core.$strict>>;
8904
9250
  }, z.core.$strict>>;
8905
9251
  secrets: z.ZodOptional<z.ZodLazy<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
8906
9252
  required: z.ZodOptional<z.ZodBoolean>;