@nylorun/core 0.52.0-beta → 0.54.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 (83) hide show
  1. package/CHANGELOG.md +119 -98
  2. package/dist/compatibility.d.ts +39 -12
  3. package/dist/compatibility.js +37 -10
  4. package/dist/contracts.d.ts +126 -44
  5. package/dist/contracts.js +127 -69
  6. package/dist/define.d.ts +2 -2
  7. package/dist/define.js +1 -1
  8. package/dist/definition/bound.d.ts +3 -1
  9. package/dist/definition/declaration.js +1 -0
  10. package/dist/definition/delegate.d.ts +7 -4
  11. package/dist/definition/delegate.js +4 -3
  12. package/dist/definition/from.js +3 -1
  13. package/dist/definition/manifest.js +7 -1
  14. package/dist/definition/sections.d.ts +9 -8
  15. package/dist/definition/sections.js +13 -5
  16. package/dist/definition/variant.d.ts +2 -2
  17. package/dist/definition/variant.js +4 -4
  18. package/dist/definition/workflow/runnable.d.ts +1 -1
  19. package/dist/definition/workflow/runnable.js +1 -1
  20. package/dist/definition/workflow/verdict.d.ts +1 -1
  21. package/dist/definition/workflow/verdict.js +1 -1
  22. package/dist/engine/blocks.d.ts +2 -2
  23. package/dist/engine/blocks.js +3 -3
  24. package/dist/engine/explain.d.ts +1 -1
  25. package/dist/engine/explain.js +3 -3
  26. package/dist/engine/features.d.ts +1 -1
  27. package/dist/engine/features.js +1 -1
  28. package/dist/engine/index.d.ts +1 -1
  29. package/dist/engine/index.js +1 -1
  30. package/dist/engine/mcp.d.ts +4 -4
  31. package/dist/engine/mcp.js +4 -4
  32. package/dist/engine/names.d.ts +1 -1
  33. package/dist/engine/names.js +1 -1
  34. package/dist/engine/preview.d.ts +2 -2
  35. package/dist/engine/preview.js +1 -1
  36. package/dist/engine/projection.d.ts +3 -3
  37. package/dist/engine/projection.js +8 -8
  38. package/dist/engine/tools.d.ts +8 -8
  39. package/dist/engine/tools.js +7 -7
  40. package/dist/errors.d.ts +1 -1
  41. package/dist/folder/compile.d.ts +2 -2
  42. package/dist/folder/compile.js +111 -15
  43. package/dist/folder/decompile.js +7 -7
  44. package/dist/folder/engine.d.ts +8 -2
  45. package/dist/folder/engine.js +3 -3
  46. package/dist/folder/fix.js +1 -1
  47. package/dist/folder/flow.d.ts +1 -1
  48. package/dist/folder/flow.js +1 -1
  49. package/dist/folder/index.d.ts +4 -2
  50. package/dist/folder/index.js +4 -2
  51. package/dist/folder/migrate-v3.js +2 -2
  52. package/dist/folder/migrate-v4.d.ts +33 -0
  53. package/dist/folder/migrate-v4.js +207 -0
  54. package/dist/folder/nested.js +14 -6
  55. package/dist/folder/plugins.d.ts +13 -1
  56. package/dist/folder/plugins.js +49 -12
  57. package/dist/folder/schemas.js +29 -9
  58. package/dist/folder/subagent-files.d.ts +110 -0
  59. package/dist/folder/subagent-files.js +514 -0
  60. package/dist/folder/v3.d.ts +2 -2
  61. package/dist/folder/v3.js +2 -2
  62. package/dist/harness-api/artifacts.d.ts +1 -1
  63. package/dist/harness-api/json-schema.js +6 -6
  64. package/dist/harness-api/messages.d.ts +1 -1
  65. package/dist/harness-api/messages.js +1 -1
  66. package/dist/harness-api/schema.d.ts +2 -2
  67. package/dist/harness-api/schema.js +8 -8
  68. package/dist/manifest-schemas.js +9 -6
  69. package/dist/plugins/index.js +1 -1
  70. package/dist/schemas/agent-folder/agent-md.schema.json +67 -18
  71. package/dist/schemas/agent-manifest.schema.json +65 -2
  72. package/dist/schemas/harness-manifest.schema.json +55 -2
  73. package/dist/types/manifest.d.ts +32 -7
  74. package/dist/types/model.d.ts +3 -3
  75. package/dist/types/observe.d.ts +1 -1
  76. package/dist/types/part.d.ts +5 -3
  77. package/dist/types/transcript.d.ts +1 -1
  78. package/dist/utils/definition-files.d.ts +23 -0
  79. package/dist/utils/definition-files.js +50 -4
  80. package/dist/utils/memory.js +1 -1
  81. package/dist/utils/runtime-limits.d.ts +2 -2
  82. package/dist/utils/runtime-limits.js +3 -3
  83. package/package.json +1 -1
@@ -252,7 +252,7 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
252
252
  */
253
253
  "remove-tools",
254
254
  /**
255
- * A message's `context` (ADR-157): up to 16 items `{type?, value}` for its own turn. Our engine puts
255
+ * A message's `context`: up to 16 items `{type?, value}` for its own turn. Our engine puts
256
256
  * them in the `<runtime-context>` block of every model call of that turn, after the history, and
257
257
  * later turns leave them out; `command.message` keeps them. Our harness also reads
258
258
  * `harness.loop.compaction` (`threshold`, `keepTokens`, per role), with the session's role in
@@ -260,13 +260,13 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
260
260
  */
261
261
  "message-context",
262
262
  /**
263
- * The Tenant's stream (ADR-159): `GET /v1/tenant/audit` (the Management API) pages, newest first,
263
+ * The Tenant's stream: `GET /v1/tenant/audit` (the Management API) pages, newest first,
264
264
  * the keys put and deleted, signing keys rotated and revoked, tool policy and settings changes,
265
265
  * vault credentials written and used, and Studio sign-ins, each with who did it and no secret.
266
266
  */
267
267
  "tenant-audit",
268
268
  /**
269
- * The triggers capability (D83): an agent whose version declares `harness.engine.triggers` sets
269
+ * The triggers capability: an agent whose version declares `harness.engine.triggers` sets
270
270
  * up its own triggers with the `triggers` tool, kept by the Agent (`origin: agent` in
271
271
  * `GET /v1/agents/{id}/triggers`); `DELETE /v1/agents/{id}/triggers/{triggerId}` deletes one;
272
272
  * a tool rule of `kind: "runtime"` decides the operations the Runtime serves; the manifest's
@@ -274,14 +274,14 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
274
274
  */
275
275
  "agent-triggers",
276
276
  /**
277
- * Triggers a client puts on one Agent (D88): `PUT /v1/agents/{id}/triggers/{triggerId}` with a
277
+ * Triggers a client puts on one Agent: `PUT /v1/agents/{id}/triggers/{triggerId}` with a
278
278
  * `Trigger` and an optional `title` creates or replaces the Agent's `api` trigger; `DELETE`
279
279
  * removes it; the list shows `origin: api` and its `principal`; the trigger events carry `origin`,
280
280
  * `principal` and `changed`.
281
281
  */
282
282
  "api-triggers",
283
283
  /**
284
- * A message's `delivery: "steer"` (D85): to a busy agent session it waits in the session queue
284
+ * A message's `delivery: "steer"`: to a busy agent session it waits in the session queue
285
285
  * marked `steer`, and our engine takes it into the running turn before its next step (the
286
286
  * `inputs` effect, Harness API 5.4). The answer and `message.queued` say which delivery applied;
287
287
  * a steer the turn doesn't take starts the next turn, as a queued message does.
@@ -298,15 +298,15 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
298
298
  */
299
299
  "queue-recovery",
300
300
  /**
301
- * The A2A endpoint's `message.metadata.delivery: "steer"` (ADR-140): a session message's steer
302
- * (`steer`, D85). To a busy context the message waits marked `steer` and the running turn takes
301
+ * The A2A endpoint's `message.metadata.delivery: "steer"`: a session message's steer
302
+ * (`steer`). To a busy context the message waits marked `steer` and the running turn takes
303
303
  * it before its next step, its task then that turn's; to an idle context, a workflow's, or a
304
304
  * turn past its last step it is an ordinary queued message. The task `SendMessage` answers
305
305
  * carries `metadata.delivery`: `steered` or `queued`.
306
306
  */
307
307
  "a2a-steer",
308
308
  /**
309
- * An Agent becomes a computer (ADR-154): on a Runtime whose pods are computers, a
309
+ * An Agent becomes a computer: on a Runtime whose pods are computers, a
310
310
  * `PUT /v1/agents/{id}` that moves a `virtual` Agent to a `pod` version changes its kind in place,
311
311
  * keeping its id, sessions, memory, vault and triggers; `from` seeds the new volume from a disk
312
312
  * version of another Agent with the same owner. `agent.version_changed` records `kindFrom` and
@@ -314,13 +314,35 @@ export declare const OPTIONAL_HOST_FEATURES: readonly ["tenant-fixture-model", "
314
314
  */
315
315
  "computer-move",
316
316
  /**
317
- * Model roles (ADR-154): an agent manifest's `harness.roles` (`roles:` in `AGENT.md`) maps a
317
+ * Model roles: an agent manifest's `harness.roles` (`roles:` in `AGENT.md`) maps a
318
318
  * role's name to a model, and a session opened with `role` (`PUT /v1/sessions/{id}`, or an A2A
319
319
  * message's `metadata.role`) runs on that role's model, checked as `harness.model` is; its model
320
320
  * record says `source: "role"` and the role. A role the version does not declare is
321
321
  * `400 unknown_role`.
322
322
  */
323
- "model-roles"];
323
+ "model-roles",
324
+ /**
325
+ * An Agent Plugin's subagents: a `harness.tools` entry that embeds an agent may carry
326
+ * `plugin: { name, version }`, the plugin it came from, as a plugin's skills and MCP servers do.
327
+ * The label changes nothing about the run. A Runtime without this feature refuses the field.
328
+ */
329
+ "plugin-subagents",
330
+ /**
331
+ * An Agent Plugin mounted whole: an agent manifest's `harness.plugins` entry, and the loop
332
+ * manifest's `plugins`, may carry `files` (by path, as `sha256:<hex>`) for a plugin holding files
333
+ * beyond its skills, servers and subagent files. They are definition files, checked at save, and
334
+ * the harness mounts them read-only at `/plugins/<name>@<hash>/`; `load_skill` answers a plugin
335
+ * skill's `pluginPath`. A Runtime without this feature refuses the field.
336
+ */
337
+ "plugin-files",
338
+ /**
339
+ * Skills only a person starts: a skill may carry `disableModelInvocation: true`
340
+ * (`SKILL.md`'s `disable-model-invocation`), which keeps it from the model's catalog and
341
+ * `load_skill`, and from agents used as tools. A message's `skill` (an A2A message's
342
+ * `metadata.skill`) names one of the root agent's skills for its turn: the model is offered it
343
+ * and told the person started it. An unknown name is `400 unknown_skill`.
344
+ */
345
+ "person-started-skills"];
324
346
  export type OptionalHostFeature = (typeof OPTIONAL_HOST_FEATURES)[number];
325
347
  export interface ProtocolRange {
326
348
  min: number;
@@ -474,7 +496,7 @@ export declare const ERROR_CODES: readonly ["not_found",
474
496
  */
475
497
  "manifest_changed",
476
498
  /**
477
- * An agent folder that does not compile (track T6): `422` when it is saved or planned.
499
+ * An agent folder that does not compile: `422` when it is saved or planned.
478
500
  * `details.diagnostics` names every problem, each with its file and, for parse and schema
479
501
  * errors, its line and column.
480
502
  */
@@ -483,7 +505,12 @@ export declare const ERROR_CODES: readonly ["not_found",
483
505
  * A session opened with a `role` its Agent's version does not declare in `harness.roles`
484
506
  * (Host feature `model-roles`): `400`. `details.roles` lists the roles it declares.
485
507
  */
486
- "unknown_role", "internal_error"];
508
+ "unknown_role",
509
+ /**
510
+ * A message whose `skill` names none of its session's agent's skills (Host feature
511
+ * `person-started-skills`): `400`. `details.skills` lists the skills the agent has.
512
+ */
513
+ "unknown_skill", "internal_error"];
487
514
  export type ErrorCode = (typeof ERROR_CODES)[number];
488
515
  export declare const TENANT_ID_PATTERN: RegExp;
489
516
  export declare const PRINCIPAL_ID_PATTERN: RegExp;
@@ -274,7 +274,7 @@ export const OPTIONAL_HOST_FEATURES = [
274
274
  */
275
275
  "remove-tools",
276
276
  /**
277
- * A message's `context` (ADR-157): up to 16 items `{type?, value}` for its own turn. Our engine puts
277
+ * A message's `context`: up to 16 items `{type?, value}` for its own turn. Our engine puts
278
278
  * them in the `<runtime-context>` block of every model call of that turn, after the history, and
279
279
  * later turns leave them out; `command.message` keeps them. Our harness also reads
280
280
  * `harness.loop.compaction` (`threshold`, `keepTokens`, per role), with the session's role in
@@ -282,13 +282,13 @@ export const OPTIONAL_HOST_FEATURES = [
282
282
  */
283
283
  "message-context",
284
284
  /**
285
- * The Tenant's stream (ADR-159): `GET /v1/tenant/audit` (the Management API) pages, newest first,
285
+ * The Tenant's stream: `GET /v1/tenant/audit` (the Management API) pages, newest first,
286
286
  * the keys put and deleted, signing keys rotated and revoked, tool policy and settings changes,
287
287
  * vault credentials written and used, and Studio sign-ins, each with who did it and no secret.
288
288
  */
289
289
  "tenant-audit",
290
290
  /**
291
- * The triggers capability (D83): an agent whose version declares `harness.engine.triggers` sets
291
+ * The triggers capability: an agent whose version declares `harness.engine.triggers` sets
292
292
  * up its own triggers with the `triggers` tool, kept by the Agent (`origin: agent` in
293
293
  * `GET /v1/agents/{id}/triggers`); `DELETE /v1/agents/{id}/triggers/{triggerId}` deletes one;
294
294
  * a tool rule of `kind: "runtime"` decides the operations the Runtime serves; the manifest's
@@ -296,14 +296,14 @@ export const OPTIONAL_HOST_FEATURES = [
296
296
  */
297
297
  "agent-triggers",
298
298
  /**
299
- * Triggers a client puts on one Agent (D88): `PUT /v1/agents/{id}/triggers/{triggerId}` with a
299
+ * Triggers a client puts on one Agent: `PUT /v1/agents/{id}/triggers/{triggerId}` with a
300
300
  * `Trigger` and an optional `title` creates or replaces the Agent's `api` trigger; `DELETE`
301
301
  * removes it; the list shows `origin: api` and its `principal`; the trigger events carry `origin`,
302
302
  * `principal` and `changed`.
303
303
  */
304
304
  "api-triggers",
305
305
  /**
306
- * A message's `delivery: "steer"` (D85): to a busy agent session it waits in the session queue
306
+ * A message's `delivery: "steer"`: to a busy agent session it waits in the session queue
307
307
  * marked `steer`, and our engine takes it into the running turn before its next step (the
308
308
  * `inputs` effect, Harness API 5.4). The answer and `message.queued` say which delivery applied;
309
309
  * a steer the turn doesn't take starts the next turn, as a queued message does.
@@ -320,15 +320,15 @@ export const OPTIONAL_HOST_FEATURES = [
320
320
  */
321
321
  "queue-recovery",
322
322
  /**
323
- * The A2A endpoint's `message.metadata.delivery: "steer"` (ADR-140): a session message's steer
324
- * (`steer`, D85). To a busy context the message waits marked `steer` and the running turn takes
323
+ * The A2A endpoint's `message.metadata.delivery: "steer"`: a session message's steer
324
+ * (`steer`). To a busy context the message waits marked `steer` and the running turn takes
325
325
  * it before its next step, its task then that turn's; to an idle context, a workflow's, or a
326
326
  * turn past its last step it is an ordinary queued message. The task `SendMessage` answers
327
327
  * carries `metadata.delivery`: `steered` or `queued`.
328
328
  */
329
329
  "a2a-steer",
330
330
  /**
331
- * An Agent becomes a computer (ADR-154): on a Runtime whose pods are computers, a
331
+ * An Agent becomes a computer: on a Runtime whose pods are computers, a
332
332
  * `PUT /v1/agents/{id}` that moves a `virtual` Agent to a `pod` version changes its kind in place,
333
333
  * keeping its id, sessions, memory, vault and triggers; `from` seeds the new volume from a disk
334
334
  * version of another Agent with the same owner. `agent.version_changed` records `kindFrom` and
@@ -336,13 +336,35 @@ export const OPTIONAL_HOST_FEATURES = [
336
336
  */
337
337
  "computer-move",
338
338
  /**
339
- * Model roles (ADR-154): an agent manifest's `harness.roles` (`roles:` in `AGENT.md`) maps a
339
+ * Model roles: an agent manifest's `harness.roles` (`roles:` in `AGENT.md`) maps a
340
340
  * role's name to a model, and a session opened with `role` (`PUT /v1/sessions/{id}`, or an A2A
341
341
  * message's `metadata.role`) runs on that role's model, checked as `harness.model` is; its model
342
342
  * record says `source: "role"` and the role. A role the version does not declare is
343
343
  * `400 unknown_role`.
344
344
  */
345
345
  "model-roles",
346
+ /**
347
+ * An Agent Plugin's subagents: a `harness.tools` entry that embeds an agent may carry
348
+ * `plugin: { name, version }`, the plugin it came from, as a plugin's skills and MCP servers do.
349
+ * The label changes nothing about the run. A Runtime without this feature refuses the field.
350
+ */
351
+ "plugin-subagents",
352
+ /**
353
+ * An Agent Plugin mounted whole: an agent manifest's `harness.plugins` entry, and the loop
354
+ * manifest's `plugins`, may carry `files` (by path, as `sha256:<hex>`) for a plugin holding files
355
+ * beyond its skills, servers and subagent files. They are definition files, checked at save, and
356
+ * the harness mounts them read-only at `/plugins/<name>@<hash>/`; `load_skill` answers a plugin
357
+ * skill's `pluginPath`. A Runtime without this feature refuses the field.
358
+ */
359
+ "plugin-files",
360
+ /**
361
+ * Skills only a person starts: a skill may carry `disableModelInvocation: true`
362
+ * (`SKILL.md`'s `disable-model-invocation`), which keeps it from the model's catalog and
363
+ * `load_skill`, and from agents used as tools. A message's `skill` (an A2A message's
364
+ * `metadata.skill`) names one of the root agent's skills for its turn: the model is offered it
365
+ * and told the person started it. An unknown name is `400 unknown_skill`.
366
+ */
367
+ "person-started-skills",
346
368
  ];
347
369
  /**
348
370
  * What this Host serves: protocol 16, 17 and 18. Protocol 16 replaced agent definitions and
@@ -506,7 +528,7 @@ export const ERROR_CODES = [
506
528
  */
507
529
  "manifest_changed",
508
530
  /**
509
- * An agent folder that does not compile (track T6): `422` when it is saved or planned.
531
+ * An agent folder that does not compile: `422` when it is saved or planned.
510
532
  * `details.diagnostics` names every problem, each with its file and, for parse and schema
511
533
  * errors, its line and column.
512
534
  */
@@ -516,6 +538,11 @@ export const ERROR_CODES = [
516
538
  * (Host feature `model-roles`): `400`. `details.roles` lists the roles it declares.
517
539
  */
518
540
  "unknown_role",
541
+ /**
542
+ * A message whose `skill` names none of its session's agent's skills (Host feature
543
+ * `person-started-skills`): `400`. `details.skills` lists the skills the agent has.
544
+ */
545
+ "unknown_skill",
519
546
  "internal_error",
520
547
  ];
521
548
  /** Crockford Base32 alphabet (lowercase); excludes i, l, o, u. */