@ship.zone/runner 2.1.0 → 3.0.0

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 (179) hide show
  1. package/.smartconfig.json +99 -2
  2. package/changelog.md +58 -0
  3. package/dist_rust/runnerworkspace_linux_amd64_musl +0 -0
  4. package/dist_rust/runnerworkspace_linux_amd64_musl.third-party-notices.json +679 -0
  5. package/dist_rust/runnerworkspace_linux_amd64_musl.third-party-notices.txt +15719 -0
  6. package/dist_rust/runnerworkspace_linux_amd64_musl.tsrust-build.json +5 -5
  7. package/dist_rust/runnerworkspace_linux_arm64_musl +0 -0
  8. package/dist_rust/runnerworkspace_linux_arm64_musl.third-party-notices.json +679 -0
  9. package/dist_rust/runnerworkspace_linux_arm64_musl.third-party-notices.txt +15719 -0
  10. package/dist_rust/runnerworkspace_linux_arm64_musl.tsrust-build.json +5 -5
  11. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  12. package/dist_ts/00_commitinfo_data.js +9 -0
  13. package/dist_ts/api-client.d.ts +46 -0
  14. package/dist_ts/api-client.js +592 -0
  15. package/dist_ts/artifact-manager.d.ts +11 -0
  16. package/dist_ts/artifact-manager.js +140 -0
  17. package/dist_ts/attempt-state.d.ts +18 -0
  18. package/dist_ts/attempt-state.js +151 -0
  19. package/dist_ts/cache-manager.d.ts +13 -0
  20. package/dist_ts/cache-manager.js +300 -0
  21. package/dist_ts/cli-entry.d.ts +2 -0
  22. package/dist_ts/cli-entry.js +4 -0
  23. package/dist_ts/cli.d.ts +14 -0
  24. package/dist_ts/cli.js +215 -0
  25. package/dist_ts/config.d.ts +8 -0
  26. package/dist_ts/config.js +445 -0
  27. package/dist_ts/errors.d.ts +41 -0
  28. package/dist_ts/errors.js +90 -0
  29. package/dist_ts/filesystem.d.ts +73 -0
  30. package/dist_ts/filesystem.js +207 -0
  31. package/dist_ts/index.d.ts +16 -0
  32. package/dist_ts/index.js +17 -0
  33. package/dist_ts/interfaces.d.ts +614 -0
  34. package/dist_ts/interfaces.js +3 -0
  35. package/dist_ts/log-sender.d.ts +26 -0
  36. package/dist_ts/log-sender.js +124 -0
  37. package/dist_ts/oci-executor.d.ts +155 -0
  38. package/dist_ts/oci-executor.js +2238 -0
  39. package/dist_ts/plugins.d.ts +19 -0
  40. package/dist_ts/plugins.js +23 -0
  41. package/dist_ts/protocol-validator.d.ts +39 -0
  42. package/dist_ts/protocol-validator.js +483 -0
  43. package/dist_ts/redactor.d.ts +78 -0
  44. package/dist_ts/redactor.js +235 -0
  45. package/dist_ts/registration-state.d.ts +16 -0
  46. package/dist_ts/registration-state.js +171 -0
  47. package/dist_ts/runner.d.ts +64 -0
  48. package/dist_ts/runner.js +882 -0
  49. package/dist_ts/source-workspace.d.ts +10 -0
  50. package/dist_ts/source-workspace.js +125 -0
  51. package/dist_ts/spec-version.d.ts +11 -0
  52. package/dist_ts/spec-version.js +41 -0
  53. package/dist_ts/staging-scavenger.d.ts +7 -0
  54. package/dist_ts/staging-scavenger.js +63 -0
  55. package/dist_ts/state-owner.d.ts +74 -0
  56. package/dist_ts/state-owner.js +289 -0
  57. package/dist_ts/transfer-archive.d.ts +78 -0
  58. package/dist_ts/transfer-archive.js +1619 -0
  59. package/dist_ts/validation.d.ts +11 -0
  60. package/dist_ts/validation.js +79 -0
  61. package/dist_ts/wire-schema.d.ts +10 -0
  62. package/dist_ts/wire-schema.js +114 -0
  63. package/native-notices/crates/bitflags-2.13.1/license-apache +201 -0
  64. package/native-notices/crates/bitflags-2.13.1/license-mit +25 -0
  65. package/native-notices/crates/cc-1.8.0/license-apache +201 -0
  66. package/native-notices/crates/cc-1.8.0/license-mit +25 -0
  67. package/native-notices/crates/cfg-if-1.0.4/license-apache +201 -0
  68. package/native-notices/crates/cfg-if-1.0.4/license-mit +25 -0
  69. package/native-notices/crates/cfg_aliases-0.2.2/license +9 -0
  70. package/native-notices/crates/cfg_aliases-0.2.2/notices.md +26 -0
  71. package/native-notices/crates/find-msvc-tools-0.1.14/license-apache +201 -0
  72. package/native-notices/crates/find-msvc-tools-0.1.14/license-mit +25 -0
  73. package/native-notices/crates/itoa-1.0.18/license-apache +176 -0
  74. package/native-notices/crates/itoa-1.0.18/license-mit +23 -0
  75. package/native-notices/crates/libc-0.2.189/license-apache +176 -0
  76. package/native-notices/crates/libc-0.2.189/license-mit +25 -0
  77. package/native-notices/crates/memchr-2.8.3/copying +3 -0
  78. package/native-notices/crates/memchr-2.8.3/license-mit +21 -0
  79. package/native-notices/crates/memchr-2.8.3/unlicense +24 -0
  80. package/native-notices/crates/nix-0.30.1/license +21 -0
  81. package/native-notices/crates/proc-macro2-1.0.107/license-apache +176 -0
  82. package/native-notices/crates/proc-macro2-1.0.107/license-mit +23 -0
  83. package/native-notices/crates/quote-1.0.47/license-apache +176 -0
  84. package/native-notices/crates/quote-1.0.47/license-mit +23 -0
  85. package/native-notices/crates/serde-1.0.229/license-apache +176 -0
  86. package/native-notices/crates/serde-1.0.229/license-mit +23 -0
  87. package/native-notices/crates/serde_core-1.0.229/license-apache +176 -0
  88. package/native-notices/crates/serde_core-1.0.229/license-mit +23 -0
  89. package/native-notices/crates/serde_derive-1.0.229/license-apache +176 -0
  90. package/native-notices/crates/serde_derive-1.0.229/license-mit +23 -0
  91. package/native-notices/crates/serde_json-1.0.151/license-apache +176 -0
  92. package/native-notices/crates/serde_json-1.0.151/license-mit +23 -0
  93. package/native-notices/crates/shlex-2.0.1/license-apache +13 -0
  94. package/native-notices/crates/shlex-2.0.1/license-mit +21 -0
  95. package/native-notices/crates/syn-3.0.3/license-apache +176 -0
  96. package/native-notices/crates/syn-3.0.3/license-mit +23 -0
  97. package/native-notices/crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-apache +201 -0
  98. package/native-notices/crates/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/license-mit +25 -0
  99. package/native-notices/crates/tikv-jemallocator-0.7.0/license-apache +201 -0
  100. package/native-notices/crates/tikv-jemallocator-0.7.0/license-mit +25 -0
  101. package/native-notices/crates/unicode-ident-1.0.24/license-apache +176 -0
  102. package/native-notices/crates/unicode-ident-1.0.24/license-mit +23 -0
  103. package/native-notices/crates/unicode-ident-1.0.24/license-unicode +39 -0
  104. package/native-notices/crates/zmij-1.0.23/license-mit +23 -0
  105. package/native-notices/manifest.json +763 -0
  106. package/native-notices/native/tikv-jemalloc-sys-0.7.1+5.3.1-0-g81034ce1f1373e37dc865038e1bc8eeecf559ce8/jemalloc-5.3.1/jemalloc-copying +27 -0
  107. package/native-notices/readme.md +46 -0
  108. package/native-notices/runtime/gcc/gpl-3.0.txt +674 -0
  109. package/native-notices/runtime/gcc/runtime-library-exception-3.1.txt +73 -0
  110. package/native-notices/runtime/libunwind-22.1.2/license.txt +311 -0
  111. package/native-notices/runtime/musl-1.2.5/copyright +193 -0
  112. package/native-notices/rust/compiler-builtins-license.txt +275 -0
  113. package/native-notices/rust/copyright-library.html +8266 -0
  114. package/native-notices/rust/crates/addr2line-0.25.1/license-apache +201 -0
  115. package/native-notices/rust/crates/addr2line-0.25.1/license-mit +25 -0
  116. package/native-notices/rust/crates/adler2-2.0.1/license-0bsd +12 -0
  117. package/native-notices/rust/crates/adler2-2.0.1/license-apache +201 -0
  118. package/native-notices/rust/crates/adler2-2.0.1/license-mit +23 -0
  119. package/native-notices/rust/crates/memchr-2.7.6/copying +3 -0
  120. package/native-notices/rust/crates/memchr-2.7.6/license-mit +21 -0
  121. package/native-notices/rust/crates/memchr-2.7.6/unlicense +24 -0
  122. package/native-notices/rust/crates/miniz_oxide-0.8.9/license +25 -0
  123. package/native-notices/rust/crates/miniz_oxide-0.8.9/license-apache.md +177 -0
  124. package/native-notices/rust/crates/miniz_oxide-0.8.9/license-mit.md +24 -0
  125. package/native-notices/rust/crates/miniz_oxide-0.8.9/license-zlib.md +14 -0
  126. package/native-notices/rust/crates/object-0.37.3/license-apache +201 -0
  127. package/native-notices/rust/crates/object-0.37.3/license-mit +25 -0
  128. package/native-notices/rust/licenses/apache-2.0.txt +73 -0
  129. package/native-notices/rust/licenses/bsd-2-clause.txt +9 -0
  130. package/native-notices/rust/licenses/cc-by-sa-4.0.txt +427 -0
  131. package/native-notices/rust/licenses/gcc-exception-3.1.txt +30 -0
  132. package/native-notices/rust/licenses/gpl-2.0-only.txt +133 -0
  133. package/native-notices/rust/licenses/gpl-3.0-or-later.txt +202 -0
  134. package/native-notices/rust/licenses/isc.txt +7 -0
  135. package/native-notices/rust/licenses/llvm-exception.txt +15 -0
  136. package/native-notices/rust/licenses/mit.txt +9 -0
  137. package/native-notices/rust/licenses/ncsa.txt +29 -0
  138. package/native-notices/rust/licenses/ofl-1.1.txt +43 -0
  139. package/native-notices/rust/licenses/unicode-3.0.txt +39 -0
  140. package/package.json +24 -22
  141. package/readme.md +91 -40
  142. package/rust/.cargo/config.toml +1 -1
  143. package/rust/Cargo.toml +1 -1
  144. package/rust/src/lib.rs +156 -1
  145. package/rust/src/main.rs +1 -1
  146. package/rust-toolchain.toml +4 -0
  147. package/ts/00_commitinfo_data.ts +1 -1
  148. package/ts/api-client.ts +10 -7
  149. package/ts/artifact-manager.ts +9 -7
  150. package/ts/attempt-state.ts +75 -84
  151. package/ts/cache-manager.ts +22 -28
  152. package/ts/cli-entry.ts +4 -0
  153. package/ts/cli.ts +56 -45
  154. package/ts/config.ts +50 -39
  155. package/ts/errors.ts +19 -0
  156. package/ts/filesystem.ts +316 -0
  157. package/ts/index.ts +16 -15
  158. package/ts/interfaces.ts +2 -2
  159. package/ts/log-sender.ts +4 -4
  160. package/ts/oci-executor.ts +235 -383
  161. package/ts/plugins.ts +21 -3
  162. package/ts/protocol-validator.ts +5 -5
  163. package/ts/redactor.ts +2 -2
  164. package/ts/registration-state.ts +82 -90
  165. package/ts/runner.ts +30 -17
  166. package/ts/source-workspace.ts +11 -8
  167. package/ts/spec-version.ts +2 -2
  168. package/ts/staging-scavenger.ts +37 -26
  169. package/ts/state-owner.ts +346 -0
  170. package/ts/transfer-archive.ts +214 -243
  171. package/ts/validation.ts +1 -1
  172. package/ts/wire-schema.ts +3 -3
  173. package/deno.json +0 -56
  174. package/deno.lock +0 -1495
  175. package/dist_npm/mod.d.ts +0 -967
  176. package/dist_npm/mod.js +0 -10058
  177. package/mod.ts +0 -8
  178. package/musl-copyright.md +0 -81
  179. package/third-party-licenses.md +0 -187
package/.smartconfig.json CHANGED
@@ -40,10 +40,107 @@
40
40
  "patterns": []
41
41
  }
42
42
  }
43
+ },
44
+ "assets": {
45
+ "schemaVersion": 1,
46
+ "kind": "binaryCli",
47
+ "cliName": "ship-zone-runner",
48
+ "displayName": "ship.zone runner",
49
+ "repository": {
50
+ "host": "code.foss.global",
51
+ "path": "ship.zone/runner",
52
+ "branch": "main"
53
+ },
54
+ "installer": {
55
+ "enabled": true,
56
+ "installDir": "/opt/ship-zone-runner",
57
+ "binDir": "/usr/local/bin",
58
+ "modes": {
59
+ "default": "binary"
60
+ },
61
+ "service": {
62
+ "detectNames": [
63
+ "ship-zone-runner"
64
+ ]
65
+ },
66
+ "successHints": [
67
+ "ship-zone-runner --version",
68
+ "ship-zone-runner help"
69
+ ]
70
+ },
71
+ "npmWrapper": {
72
+ "enabled": false
73
+ },
74
+ "releaseWorkflow": {
75
+ "compileCommand": "pnpm run build:binary"
76
+ }
43
77
  }
44
78
  },
45
79
  "@git.zone/tsrust": {
46
- "targets": ["linux_amd64_musl", "linux_arm64_musl"],
47
- "static": true
80
+ "targets": [
81
+ "linux_amd64_musl",
82
+ "linux_arm64_musl"
83
+ ],
84
+ "static": true,
85
+ "notices": {
86
+ "directory": "native-notices"
87
+ }
88
+ },
89
+ "@git.zone/tsbundle": {
90
+ "bundles": [
91
+ {
92
+ "from": "./ts/cli-entry.ts",
93
+ "to": "./dist/sea/ship-zone-runner.mjs",
94
+ "bundler": "esbuild",
95
+ "platform": "node",
96
+ "sea": true,
97
+ "production": true
98
+ }
99
+ ]
100
+ },
101
+ "@git.zone/tssea": {
102
+ "nodeVersion": "26.11.1",
103
+ "bundle": "./dist/sea/ship-zone-runner.mjs",
104
+ "outDir": "./dist/binaries",
105
+ "targets": [
106
+ {
107
+ "target": "linux-x64",
108
+ "name": "ship-zone-runner-linux-x64"
109
+ },
110
+ {
111
+ "target": "linux-arm64",
112
+ "name": "ship-zone-runner-linux-arm64"
113
+ }
114
+ ],
115
+ "execArgv": [
116
+ "--use-system-ca"
117
+ ],
118
+ "trees": {
119
+ "helper": {
120
+ "from": {
121
+ "linux-x64": "./dist_rust/runnerworkspace_linux_amd64_musl",
122
+ "linux-arm64": "./dist_rust/runnerworkspace_linux_arm64_musl"
123
+ },
124
+ "path": "runnerworkspace"
125
+ }
126
+ },
127
+ "sidecars": {
128
+ "runnerworkspace": {
129
+ "tree": "helper",
130
+ "path": "runnerworkspace"
131
+ }
132
+ },
133
+ "smoke": {
134
+ "args": [
135
+ "--version"
136
+ ],
137
+ "expectExitCode": 0,
138
+ "expectStdoutPattern": "^\\d+\\.\\d+\\.\\d+$",
139
+ "cleanEnv": true,
140
+ "emulate": true,
141
+ "env": {
142
+ "QEMU_LD_PREFIX": "/usr/aarch64-linux-gnu"
143
+ }
144
+ }
48
145
  }
49
146
  }
package/changelog.md CHANGED
@@ -1,5 +1,63 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-10-15 - 3.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - run on Node.js 26.1 or later instead of Deno (runtime)
8
+ - The package compiles to `dist_ts/` with `@git.zone/tsbuild`; `deno.json`, `deno.lock`, `mod.ts`
9
+ and the `jsr:@std/*` imports are gone, and every module dependency goes through `ts/plugins.ts`.
10
+ - Subprocesses run through `node:child_process` with an explicit environment and SIGTERM-then-SIGKILL
11
+ termination; staging capacity reads `fs.statfs` with the fragment size `frsize` (Node.js 26.1+)
12
+ instead of running `/usr/bin/stat`.
13
+ - Streamed artifact and cache uploads use the global `fetch` half-duplex (`duplex: 'half'`), as
14
+ Node.js requires for a stream request body.
15
+ - The CLI entry is `ts/cli-entry.ts`; its usage text names the `ship-zone-runner` executable.
16
+ - one runner per state directory (state)
17
+ - The runner takes an exclusive kernel `flock` on `<state>/.runner-owner.lock` through its own helper
18
+ (`runnerworkspace own-state`) before it touches the state directory; a second runner on the same
19
+ directory stops at once with `RunnerStateOwnedElsewhereError` (helper exit code 3), and losing the
20
+ helper stops the runner with `RunnerStateOwnershipLostError`. Many runners per host remain supported.
21
+ - `OciExecutor`, `AttemptStateStore`, `RegistrationStateStore`, `scavengeRunnerStaging` and
22
+ `ShipRunner` (`stateOwner` dependency) take a `RunnerStateOwner`; `registerRunnerDurably` requires
23
+ its `stateStore`.
24
+ - The 2.x advisory `.workspace-helper.lock` file is removed and no longer used.
25
+ - Staging is scavenged first, right after ownership is taken and before runtime verification.
26
+ - `ITransferArchiveFileOperations` uses Node.js shapes: `openRead` returns a `FileHandle`,
27
+ `makeTempFile`/`remove` take `IMakeTempOptions`/`IRemoveOptions` (transfer)
28
+ - the npm `bin` `ship-zone-runner` runs `dist_ts/cli-entry.js` with Node.js instead of the Deno bundle
29
+ `dist_npm/mod.js` (cli)
30
+ - `pnpm build` checks that the entry is built and starts with `#!/usr/bin/env node`
31
+ (`scripts/verify-npm-entrypoint.ts`).
32
+ - the package exports only `.` (`dist_ts/index.js`, types `dist_ts/index.d.ts`); the `./mod.js`
33
+ subpath and the `dist_npm/` bundle are removed (exports)
34
+
35
+ ### Features
36
+
37
+ - ship the runner as Node.js 26.11.1 single executables for Linux x64 and arm64 (release)
38
+ - `pnpm run build:binary` bundles `ts/cli-entry.ts` with `@git.zone/tsbundle` and builds
39
+ `ship-zone-runner-linux-x64` and `ship-zone-runner-linux-arm64` with `@git.zone/tssea`; each
40
+ embeds the static workspace helper of its architecture as the sidecar `runnerworkspace`, which
41
+ the runner reads through `@push.rocks/smartsea`, and comes with its third-party notices.
42
+ - A `v*` tag runs `.gitea/workflows/release.yml`, which uploads the executables, their notices,
43
+ `install.sh` and `SHA256SUMS.txt` as release assets.
44
+ - `curl -fsSL https://code.foss.global/ship.zone/runner/releases/download/latest/install.sh | sudo bash`
45
+ installs the executable to `/opt/ship-zone-runner` and links `/usr/local/bin/ship-zone-runner`;
46
+ it leaves configuration and state where the runner keeps them.
47
+ - `ship-zone-runner --version` prints the version, like `version`.
48
+
49
+ ### Maintenance
50
+
51
+ - tooling: `@git.zone/tsrust` 4.6, pnpm 12.10.1
52
+ - generated native notices replace the hand-kept legal files (legal)
53
+ - `tsrust notices` writes `native-notices/` (Rust crates, jemalloc, the Rust standard library,
54
+ musl, libunwind and the GCC runtime), which the package ships and every build checks;
55
+ `third-party-licenses.md` and `musl-copyright.md` are removed.
56
+ - `rust-toolchain.toml` pins Rust 1.95.0 with `rust-src` and both musl targets, and the aarch64
57
+ musl linker is `aarch64-linux-musl-gcc`.
58
+ - CI builds, type checks and tests on Node.js 26 in `ht-docker-node` (ci)
59
+ - tests run on `@git.zone/tstest` 8 as `test/test.*.node.ts`; the build uses `@git.zone/tsbuild` 6 with `@types/node` 26
60
+
3
61
  ## 2026-10-13 - 2.1.0
4
62
 
5
63
  ### Features