@capybara-hq/plugin-sdk 0.1.0-rc.62 → 0.1.0-rc.63

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "0.1.0-rc.62";
1
+ export declare const SDK_VERSION = "0.1.0-rc.63";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./avatar-presets.js";
4
4
  export * from "./bootstrap.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = "0.1.0-rc.62";
1
+ export const SDK_VERSION = "0.1.0-rc.63";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./avatar-presets.js";
4
4
  export * from "./bootstrap.js";
@@ -37,7 +37,7 @@ export interface SandboxRuntimeFile {
37
37
  *
38
38
  * A runtime change therefore lands in three steps (tools/checks/README.md, "Changing the SDK
39
39
  * runtime sources"): `current` first, then the provider restages, then core promotes `current` to
40
- * `files` with the pin.
40
+ * `files` with the pin. Between changes, as now, `current` is `files`.
41
41
  */
42
42
  export declare const SANDBOX_RUNTIME_SOURCE: {
43
43
  readonly version: number;
@@ -1,25 +1,29 @@
1
1
  import { LINUX_SANDBOX_SOURCE } from "./sandbox-linux-runtime-source.js";
2
- import { LINUX_SANDBOX_STAGED_SOURCE } from "./sandbox-linux-staged-runtime-source.js";
3
2
  import { NATIVE_FILES_SOURCE } from "./sandbox-native-runtime-source.js";
4
3
  const NATIVE_FILES = Object.freeze({
5
4
  name: "native-files.py",
6
5
  source: NATIVE_FILES_SOURCE,
7
6
  sha256: "c1712198af4ffedc0b48f789c28ed4233dc9008521b897300731c4f903168950",
8
7
  });
9
- /** The launcher every released image provider stages (`sandbox-linux-staged-runtime-source.ts`). */
10
- const LINUX_SANDBOX_STAGED = Object.freeze({
11
- name: "linux-sandbox.py",
12
- source: LINUX_SANDBOX_STAGED_SOURCE,
13
- sha256: "4e046df902dc644532ada9f2a3bef30a983daf7d1f238bd46dcd16524d96c66c",
14
- });
15
8
  const LINUX_SANDBOX = Object.freeze({
16
9
  name: "linux-sandbox.py",
17
10
  source: LINUX_SANDBOX_SOURCE,
18
11
  sha256: "ceb5bb0971437978a7695091792bfafcf3dbf2e7c74e8425d8aceb76e442f848",
19
12
  features: Object.freeze(["fileReadRoots"]),
20
13
  });
21
- const STAGED = Object.freeze([NATIVE_FILES, LINUX_SANDBOX_STAGED]);
22
- const CURRENT = Object.freeze([NATIVE_FILES, LINUX_SANDBOX]);
14
+ const STAGED = Object.freeze([NATIVE_FILES, LINUX_SANDBOX]);
15
+ const CURRENT = STAGED;
16
+ /**
17
+ * Digests of earlier revisions a staged copy may still have (one previous revision at most):
18
+ * device containers made from an earlier image keep their staged runtime until recreated. The
19
+ * launcher before exact file read roots (core#742); the next runtime change drops it.
20
+ */
21
+ const PREVIOUS = Object.freeze([
22
+ Object.freeze({
23
+ name: "linux-sandbox.py",
24
+ sha256: "4e046df902dc644532ada9f2a3bef30a983daf7d1f238bd46dcd16524d96c66c",
25
+ }),
26
+ ]);
23
27
  function acceptedDigests(...sets) {
24
28
  const out = {};
25
29
  for (const set of sets)
@@ -59,11 +63,11 @@ function acceptedDigests(...sets) {
59
63
  *
60
64
  * A runtime change therefore lands in three steps (tools/checks/README.md, "Changing the SDK
61
65
  * runtime sources"): `current` first, then the provider restages, then core promotes `current` to
62
- * `files` with the pin.
66
+ * `files` with the pin. Between changes, as now, `current` is `files`.
63
67
  */
64
68
  export const SANDBOX_RUNTIME_SOURCE = Object.freeze({
65
69
  version: 2,
66
70
  files: STAGED,
67
71
  current: CURRENT,
68
- accepted: acceptedDigests(STAGED, CURRENT),
72
+ accepted: acceptedDigests(STAGED, CURRENT, PREVIOUS),
69
73
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-sdk",
3
- "version": "0.1.0-rc.62",
3
+ "version": "0.1.0-rc.63",
4
4
  "description": "Capybara plugin SDK: the types and pure functions plugins are written against",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -1,10 +0,0 @@
1
- /**
2
- * The `linux-sandbox.py` that released image providers stage (device-docker's image), kept
3
- * byte for byte while the SDK's current launcher (`sandbox-linux-runtime-source.ts`) is ahead of
4
- * them: `SANDBOX_RUNTIME_SOURCE.files` lists these bytes, so a provider that checks its staged copy
5
- * against the host SDK keeps working until it restages and core moves its pin (see
6
- * `SANDBOX_RUNTIME_SOURCE` and tools/checks/README.md, "Changing the SDK runtime sources"). The
7
- * text is inlined, not composed, so nothing else in the SDK can change these bytes. Never edit it;
8
- * the promotion that makes the current launcher the staged one deletes this file.
9
- */
10
- export declare const LINUX_SANDBOX_STAGED_SOURCE: string;