@nylorun/core 0.47.0-beta → 0.48.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,11 @@
|
|
|
1
1
|
# @nylorun/core
|
|
2
2
|
|
|
3
|
+
## 0.48.0-beta
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 536ff54: A harness reaches a computer's new volume after a restore (ADR-149): a computer restored through `POST /v1/agents/{id}/restore`, reset, or given a new volume by its lifecycle gets a new sandbox name (`…-g0` → `…-g1`), but a harness that had opened it kept sending its sessions' `bash`, `read` and `write` to the last computer until the ticket expired, and a gateway or router that still served it ran them on the old volume. Before each request to a computer the harness now asks core where it is (`computer.current`, Harness API 5.7, `harness-api/v5.7.json`: a store read that never wakes it) and opens it again with `computer.open` when the URL moved. Core's own uses checked this already. A harness on a core older than 5.7 keeps its access until the ticket is renewed, as before.
|
|
8
|
+
|
|
3
9
|
## 0.47.0-beta
|
|
4
10
|
|
|
5
11
|
### 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.
|
|
3
|
+
"$id": "https://docs.nylorun.com/schemas/harness-api/v5.7.json",
|
|
4
4
|
"title": "Nylorun Harness API 5",
|
|
5
5
|
"$defs": {
|
|
6
6
|
"ArtifactMeta": {
|
|
@@ -4676,6 +4676,39 @@
|
|
|
4676
4676
|
],
|
|
4677
4677
|
"additionalProperties": false
|
|
4678
4678
|
},
|
|
4679
|
+
"computer.current.params": {
|
|
4680
|
+
"type": "object",
|
|
4681
|
+
"properties": {
|
|
4682
|
+
"runId": {
|
|
4683
|
+
"type": "string",
|
|
4684
|
+
"minLength": 1,
|
|
4685
|
+
"maxLength": 512
|
|
4686
|
+
},
|
|
4687
|
+
"environmentId": {
|
|
4688
|
+
"type": "string",
|
|
4689
|
+
"minLength": 1,
|
|
4690
|
+
"maxLength": 512
|
|
4691
|
+
}
|
|
4692
|
+
},
|
|
4693
|
+
"required": [
|
|
4694
|
+
"runId",
|
|
4695
|
+
"environmentId"
|
|
4696
|
+
],
|
|
4697
|
+
"additionalProperties": false
|
|
4698
|
+
},
|
|
4699
|
+
"computer.current.result": {
|
|
4700
|
+
"type": "object",
|
|
4701
|
+
"properties": {
|
|
4702
|
+
"url": {
|
|
4703
|
+
"type": "string",
|
|
4704
|
+
"format": "uri"
|
|
4705
|
+
}
|
|
4706
|
+
},
|
|
4707
|
+
"required": [
|
|
4708
|
+
"url"
|
|
4709
|
+
],
|
|
4710
|
+
"additionalProperties": false
|
|
4711
|
+
},
|
|
4679
4712
|
"artifact.read.params": {
|
|
4680
4713
|
"type": "object",
|
|
4681
4714
|
"properties": {
|
|
@@ -60,9 +60,10 @@ export function harnessApiSchemas() {
|
|
|
60
60
|
that never asks for it never sees. Revision 5: `artifact.write` `begin` may carry
|
|
61
61
|
`audience: "model"` (ADR-139), which core accepts and only our own engine sends. Revision 6:
|
|
62
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.
|
|
63
|
+
sees unless the Tenant's pod Agents are computers. Revision 7: the request `computer.current`,
|
|
64
|
+
which only a harness that drives computers sends.
|
|
64
65
|
*/
|
|
65
|
-
const SCHEMA_REVISION =
|
|
66
|
+
const SCHEMA_REVISION = 7;
|
|
66
67
|
/** The JSON Schema document of the Harness API (draft 2020-12). */
|
|
67
68
|
export function harnessApiJsonSchema() {
|
|
68
69
|
const $defs = {};
|
|
@@ -1024,6 +1024,22 @@ export declare const harnessRequests: {
|
|
|
1024
1024
|
expiresAt: z.ZodNumber;
|
|
1025
1025
|
}, z.core.$strict>;
|
|
1026
1026
|
};
|
|
1027
|
+
/**
|
|
1028
|
+
* Where the computer of the run's session is now (Harness API 5.7), without waking it: the
|
|
1029
|
+
* sandbox gateway's URL for its current incarnation. A restore, a reset or a lost volume's
|
|
1030
|
+
* recovery gives the computer a new volume, and with it a new URL: a harness asks before each
|
|
1031
|
+
* request to the computer and, when the URL is not the one its `computer.open` answered, opens
|
|
1032
|
+
* it again rather than reach the last one. Refused as `computer.open` is for another computer.
|
|
1033
|
+
*/
|
|
1034
|
+
"computer.current": {
|
|
1035
|
+
params: z.ZodObject<{
|
|
1036
|
+
runId: z.ZodString;
|
|
1037
|
+
environmentId: z.ZodString;
|
|
1038
|
+
}, z.core.$strict>;
|
|
1039
|
+
result: z.ZodObject<{
|
|
1040
|
+
url: z.ZodString;
|
|
1041
|
+
}, z.core.$strict>;
|
|
1042
|
+
};
|
|
1027
1043
|
/**
|
|
1028
1044
|
* An artifact the run's session may read (the artifact seam, protocol 15): one of the session's
|
|
1029
1045
|
* own, or a Tenant-wide one its messages named; anything else is `not_found`, alike. The answer
|
|
@@ -594,6 +594,17 @@ export const harnessRequests = {
|
|
|
594
594
|
params: runId.extend({ environmentId: id }).strict(),
|
|
595
595
|
result: z.object({ url: z.string().url(), ticket: z.string().min(1), expiresAt: z.number().int() }).strict(),
|
|
596
596
|
},
|
|
597
|
+
/**
|
|
598
|
+
* Where the computer of the run's session is now (Harness API 5.7), without waking it: the
|
|
599
|
+
* sandbox gateway's URL for its current incarnation. A restore, a reset or a lost volume's
|
|
600
|
+
* recovery gives the computer a new volume, and with it a new URL: a harness asks before each
|
|
601
|
+
* request to the computer and, when the URL is not the one its `computer.open` answered, opens
|
|
602
|
+
* it again rather than reach the last one. Refused as `computer.open` is for another computer.
|
|
603
|
+
*/
|
|
604
|
+
"computer.current": {
|
|
605
|
+
params: runId.extend({ environmentId: id }).strict(),
|
|
606
|
+
result: z.object({ url: z.string().url() }).strict(),
|
|
607
|
+
},
|
|
597
608
|
/**
|
|
598
609
|
* An artifact the run's session may read (the artifact seam, protocol 15): one of the session's
|
|
599
610
|
* own, or a Tenant-wide one its messages named; anything else is `not_found`, alike. The answer
|