@nylorun/core 0.45.0-beta → 0.46.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @nylorun/core
2
2
 
3
+ ## 0.46.0-beta
4
+
5
+ ### Minor Changes
6
+
7
+ - 5b49361: A pod Agent on an Agent Substrate cluster can be a computer (ADR-149, ADR-150): with `NYLORUN_SANDBOX_GATEWAY_URL` and `NYLORUN_COMPUTER_TICKET_KEY_FILE` set (the Runtime's Helm chart sets both), its sessions' runs go to the harness container, and their sandbox tools, file reads and writes, skill folders and disk versions reach the Agent's actor through the sandbox gateway and `atenet-router`, with a ticket core signs (Ed25519). The engine's `--service computer` runs no loop: it serves commands (a start and attaches, each under 50 s) and files on port 8080, checks each ticket against the key its template carries, and answers the wake-up probe on `/ready`. A harness opens a computer with `computer.open`; core wakes it, waits until it is ready, writes a seed onto a new disk, runs the disk's setup through it and passes a version's start check. The tools, `runtime.json` and every other backend are unchanged.
8
+
9
+ - `@nylorun/core`: Harness API 5.6 (`harness-api/v5.6.json`): `routing.sandbox.computer` and the request `computer.open`.
10
+ - `@nylorun/runtime`: `--service computer`; the `computer` sandbox backend; `NYLORUN_SANDBOX_GATEWAY_URL` and `NYLORUN_COMPUTER_TICKET_KEY_FILE`.
11
+
3
12
  ## 0.45.0-beta
4
13
 
5
14
  ### Minor Changes
@@ -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-api/v5.5.json",
3
+ "$id": "https://docs.nylorun.com/schemas/harness-api/v5.6.json",
4
4
  "title": "Nylorun Harness API 5",
5
5
  "$defs": {
6
6
  "ArtifactMeta": {
@@ -845,6 +845,10 @@
845
845
  "additionalProperties": {
846
846
  "type": "string"
847
847
  }
848
+ },
849
+ "computer": {
850
+ "type": "boolean",
851
+ "const": true
848
852
  }
849
853
  },
850
854
  "required": [
@@ -1410,6 +1414,10 @@
1410
1414
  "additionalProperties": {
1411
1415
  "type": "string"
1412
1416
  }
1417
+ },
1418
+ "computer": {
1419
+ "type": "boolean",
1420
+ "const": true
1413
1421
  }
1414
1422
  },
1415
1423
  "required": [
@@ -3612,6 +3620,10 @@
3612
3620
  "additionalProperties": {
3613
3621
  "type": "string"
3614
3622
  }
3623
+ },
3624
+ "computer": {
3625
+ "type": "boolean",
3626
+ "const": true
3615
3627
  }
3616
3628
  },
3617
3629
  "required": [
@@ -4620,6 +4632,50 @@
4620
4632
  ],
4621
4633
  "additionalProperties": false
4622
4634
  },
4635
+ "computer.open.params": {
4636
+ "type": "object",
4637
+ "properties": {
4638
+ "runId": {
4639
+ "type": "string",
4640
+ "minLength": 1,
4641
+ "maxLength": 512
4642
+ },
4643
+ "environmentId": {
4644
+ "type": "string",
4645
+ "minLength": 1,
4646
+ "maxLength": 512
4647
+ }
4648
+ },
4649
+ "required": [
4650
+ "runId",
4651
+ "environmentId"
4652
+ ],
4653
+ "additionalProperties": false
4654
+ },
4655
+ "computer.open.result": {
4656
+ "type": "object",
4657
+ "properties": {
4658
+ "url": {
4659
+ "type": "string",
4660
+ "format": "uri"
4661
+ },
4662
+ "ticket": {
4663
+ "type": "string",
4664
+ "minLength": 1
4665
+ },
4666
+ "expiresAt": {
4667
+ "type": "integer",
4668
+ "minimum": -9007199254740991,
4669
+ "maximum": 9007199254740991
4670
+ }
4671
+ },
4672
+ "required": [
4673
+ "url",
4674
+ "ticket",
4675
+ "expiresAt"
4676
+ ],
4677
+ "additionalProperties": false
4678
+ },
4623
4679
  "artifact.read.params": {
4624
4680
  "type": "object",
4625
4681
  "properties": {
@@ -58,9 +58,11 @@ export function harnessApiSchemas() {
58
58
  * which a v5 harness that offers no `triggers` tool never sees. Revision 4: the effect kind `inputs`
59
59
  (D85): the messages steered into the running turn, which core answers at once and a v5 harness
60
60
  that never asks for it never sees. Revision 5: `artifact.write` `begin` may carry
61
- `audience: "model"` (ADR-139), which core accepts and only our own engine sends.
61
+ `audience: "model"` (ADR-139), which core accepts and only our own engine sends. Revision 6:
62
+ `routing.sandbox.computer` and the request `computer.open` (ADR-149), which a v5 harness never
63
+ sees unless the Tenant's pod Agents are computers.
62
64
  */
63
- const SCHEMA_REVISION = 5;
65
+ const SCHEMA_REVISION = 6;
64
66
  /** The JSON Schema document of the Harness API (draft 2020-12). */
65
67
  export function harnessApiJsonSchema() {
66
68
  const $defs = {};
@@ -348,6 +348,7 @@ export declare const RunRoutingSchema: z.ZodObject<{
348
348
  environmentId: z.ZodOptional<z.ZodString>;
349
349
  spec: z.ZodOptional<z.ZodUnknown>;
350
350
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
351
+ computer: z.ZodOptional<z.ZodLiteral<true>>;
351
352
  }, z.core.$strict>>;
352
353
  }, z.core.$strict>;
353
354
  /**
@@ -505,6 +506,7 @@ export declare const TurnStartSchema: z.ZodObject<{
505
506
  environmentId: z.ZodOptional<z.ZodString>;
506
507
  spec: z.ZodOptional<z.ZodUnknown>;
507
508
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
509
+ computer: z.ZodOptional<z.ZodLiteral<true>>;
508
510
  }, z.core.$strict>>;
509
511
  }, z.core.$strict>;
510
512
  trace: z.ZodOptional<z.ZodObject<{
@@ -748,6 +750,7 @@ export declare const harnessRequests: {
748
750
  environmentId: z.ZodOptional<z.ZodString>;
749
751
  spec: z.ZodOptional<z.ZodUnknown>;
750
752
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
753
+ computer: z.ZodOptional<z.ZodLiteral<true>>;
751
754
  }, z.core.$strict>>;
752
755
  }, z.core.$strict>;
753
756
  trace: z.ZodOptional<z.ZodObject<{
@@ -1003,6 +1006,24 @@ export declare const harnessRequests: {
1003
1006
  base64: z.ZodString;
1004
1007
  }, z.core.$strict>;
1005
1008
  };
1009
+ /**
1010
+ * Opens the computer of the run's session (ADR-149, Harness API 5.6): `environmentId` must be
1011
+ * the run's `routing.sandbox.environmentId` with `computer: true`. Core wakes it, waits until it
1012
+ * is ready, writes a seed onto a new disk and runs the disk's setup when needed, and answers the
1013
+ * sandbox gateway's URL for it, a ticket the gateway and the computer check, and when the ticket
1014
+ * expires (ms since the epoch). A harness opens it again before then.
1015
+ */
1016
+ "computer.open": {
1017
+ params: z.ZodObject<{
1018
+ runId: z.ZodString;
1019
+ environmentId: z.ZodString;
1020
+ }, z.core.$strict>;
1021
+ result: z.ZodObject<{
1022
+ url: z.ZodString;
1023
+ ticket: z.ZodString;
1024
+ expiresAt: z.ZodNumber;
1025
+ }, z.core.$strict>;
1026
+ };
1006
1027
  /**
1007
1028
  * An artifact the run's session may read (the artifact seam, protocol 15): one of the session's
1008
1029
  * own, or a Tenant-wide one its messages named; anything else is `not_found`, alike. The answer
@@ -265,6 +265,12 @@ export const RunRoutingSchema = z
265
265
  * the sentinel `nylorun_managed`, and each `environment_variable`'s value. Never a secret.
266
266
  */
267
267
  environment: z.record(z.string(), z.string()).optional(),
268
+ /**
269
+ * The sandbox is a computer (ADR-149, Harness API 5.6): an Agent Substrate actor whose
270
+ * engine runs no loop. A harness opens it with `computer.open` and sends its sandbox
271
+ * calls to it through the sandbox gateway.
272
+ */
273
+ computer: z.literal(true).optional(),
268
274
  })
269
275
  .strict()
270
276
  .optional(),
@@ -577,6 +583,17 @@ export const harnessRequests = {
577
583
  .strict(),
578
584
  result: z.object({ base64: z.string() }).strict(),
579
585
  },
586
+ /**
587
+ * Opens the computer of the run's session (ADR-149, Harness API 5.6): `environmentId` must be
588
+ * the run's `routing.sandbox.environmentId` with `computer: true`. Core wakes it, waits until it
589
+ * is ready, writes a seed onto a new disk and runs the disk's setup when needed, and answers the
590
+ * sandbox gateway's URL for it, a ticket the gateway and the computer check, and when the ticket
591
+ * expires (ms since the epoch). A harness opens it again before then.
592
+ */
593
+ "computer.open": {
594
+ params: runId.extend({ environmentId: id }).strict(),
595
+ result: z.object({ url: z.string().url(), ticket: z.string().min(1), expiresAt: z.number().int() }).strict(),
596
+ },
580
597
  /**
581
598
  * An artifact the run's session may read (the artifact seam, protocol 15): one of the session's
582
599
  * own, or a Tenant-wide one its messages named; anything else is `not_found`, alike. The answer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/core",
3
- "version": "0.45.0-beta",
3
+ "version": "0.46.0-beta",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "Shared agent definitions and wire contracts",