@nimbus-sh/worker 0.1.2 → 0.1.3
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/LICENSE +21 -0
- package/NOTICE.md +6 -0
- package/dist/_shared/cache-stats.d.ts +1 -1
- package/dist/_shared/cache-stats.js +1 -1
- package/dist/_shared/exports-resolver.d.ts +0 -2
- package/dist/_shared/exports-resolver.d.ts.map +1 -1
- package/dist/_shared/exports-resolver.js +0 -2
- package/dist/_shared/session-router.d.ts +0 -1
- package/dist/_shared/session-router.d.ts.map +1 -1
- package/dist/_shared/session-router.js +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -1
- package/dist/facets/cirrus-real.d.ts +1 -1
- package/dist/facets/cirrus-real.js +1 -1
- package/dist/facets/manager.d.ts +0 -1
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +3 -15
- package/dist/facets/process.d.ts +2 -2
- package/dist/facets/process.js +2 -2
- package/dist/facets/vite-dev-server.d.ts +3 -3
- package/dist/facets/vite-dev-server.d.ts.map +1 -1
- package/dist/facets/vite-dev-server.js +6 -8
- package/dist/facets/wasm-swap-registry.d.ts +15 -21
- package/dist/facets/wasm-swap-registry.d.ts.map +1 -1
- package/dist/facets/wasm-swap-registry.js +41 -54
- package/dist/facets/ws-terminal.d.ts +4 -5
- package/dist/facets/ws-terminal.d.ts.map +1 -1
- package/dist/facets/ws-terminal.js +7 -8
- package/dist/git/commands.d.ts.map +1 -1
- package/dist/git/commands.js +0 -1
- package/dist/git/network-facet.d.ts.map +1 -1
- package/dist/git/network-facet.js +0 -2
- package/dist/git-bundle.generated.d.ts +2 -3
- package/dist/git-bundle.generated.d.ts.map +1 -1
- package/dist/git-bundle.generated.js +3 -4
- package/dist/loaders/child-process/spawn-facet.d.ts +7 -52
- package/dist/loaders/child-process/spawn-facet.d.ts.map +1 -1
- package/dist/loaders/child-process/spawn-facet.js +7 -49
- package/dist/loaders/child-process/spawn-pool.d.ts +5 -44
- package/dist/loaders/child-process/spawn-pool.d.ts.map +1 -1
- package/dist/loaders/child-process/spawn-pool.js +5 -44
- package/dist/loaders/fanout-pool.d.ts +18 -65
- package/dist/loaders/fanout-pool.d.ts.map +1 -1
- package/dist/loaders/fanout-pool.js +25 -87
- package/dist/loaders/generated-workers.d.ts +1 -2
- package/dist/loaders/generated-workers.d.ts.map +1 -1
- package/dist/loaders/generated-workers.js +5 -6
- package/dist/loaders/loader-pool.d.ts +1 -2
- package/dist/loaders/loader-pool.d.ts.map +1 -1
- package/dist/loaders/loader-pool.js +1 -1
- package/dist/loaders/npm-resolve-preamble.d.ts +4 -5
- package/dist/loaders/npm-resolve-preamble.d.ts.map +1 -1
- package/dist/loaders/npm-resolve-preamble.js +14 -21
- package/dist/loaders/pre-bundle-preamble.d.ts.map +1 -1
- package/dist/loaders/pre-bundle-preamble.js +0 -1
- package/dist/npm/cache.js +1 -1
- package/dist/npm/install-batch-facet.d.ts.map +1 -1
- package/dist/npm/install-batch-facet.js +7 -12
- package/dist/npm/installer.d.ts +5 -7
- package/dist/npm/installer.d.ts.map +1 -1
- package/dist/npm/installer.js +20 -101
- package/dist/npm/r2-cache.d.ts +17 -29
- package/dist/npm/r2-cache.d.ts.map +1 -1
- package/dist/npm/r2-cache.js +16 -27
- package/dist/npm/resolve-facet.d.ts +11 -17
- package/dist/npm/resolve-facet.d.ts.map +1 -1
- package/dist/npm/resolve-facet.js +14 -28
- package/dist/npm/resolve-one-facet.d.ts +10 -13
- package/dist/npm/resolve-one-facet.d.ts.map +1 -1
- package/dist/npm/resolve-one-facet.js +8 -10
- package/dist/npm/resolver.d.ts +0 -2
- package/dist/npm/resolver.d.ts.map +1 -1
- package/dist/npm/resolver.js +0 -12
- package/dist/observability/oom-discriminator.d.ts +0 -2
- package/dist/observability/oom-discriminator.d.ts.map +1 -1
- package/dist/observability/oom-discriminator.js +0 -2
- package/dist/replica/routing.js +1 -1
- package/dist/runtime/barrel-synthesizer.js +1 -1
- package/dist/runtime/clang-runner.d.ts +5 -6
- package/dist/runtime/clang-runner.d.ts.map +1 -1
- package/dist/runtime/clang-runner.js +5 -6
- package/dist/runtime/esbuild-service.d.ts.map +1 -1
- package/dist/runtime/esbuild-service.js +0 -3
- package/dist/runtime/framework-detect.d.ts +0 -1
- package/dist/runtime/framework-detect.d.ts.map +1 -1
- package/dist/runtime/framework-detect.js +0 -1
- package/dist/runtime/node-runner.d.ts +1 -1
- package/dist/runtime/node-runner.js +1 -1
- package/dist/runtime/node-shims.d.ts.map +1 -1
- package/dist/runtime/node-shims.js +0 -22
- package/dist/runtime/package-manager.d.ts +2 -7
- package/dist/runtime/package-manager.d.ts.map +1 -1
- package/dist/runtime/package-manager.js +2 -7
- package/dist/runtime/process-logs-api.js +1 -1
- package/dist/runtime/process-logs.d.ts +0 -1
- package/dist/runtime/process-logs.d.ts.map +1 -1
- package/dist/runtime/process-table.d.ts +2 -2
- package/dist/runtime/process-table.d.ts.map +1 -1
- package/dist/runtime/process-table.js +1 -1
- package/dist/runtime/python-repl.d.ts +0 -1
- package/dist/runtime/python-repl.d.ts.map +1 -1
- package/dist/runtime/python-repl.js +0 -1
- package/dist/runtime/python-runner.d.ts +1 -2
- package/dist/runtime/python-runner.d.ts.map +1 -1
- package/dist/runtime/python-runner.js +1 -3
- package/dist/runtime/repl-session.d.ts +0 -1
- package/dist/runtime/repl-session.d.ts.map +1 -1
- package/dist/runtime/repl-session.js +1 -2
- package/dist/runtime/require-resolver.d.ts.map +1 -1
- package/dist/runtime/require-resolver.js +1 -4
- package/dist/runtime/ruby-runner.d.ts +0 -1
- package/dist/runtime/ruby-runner.d.ts.map +1 -1
- package/dist/runtime/ruby-runner.js +0 -1
- package/dist/runtime/runtime-catalog.d.ts +2 -4
- package/dist/runtime/runtime-catalog.d.ts.map +1 -1
- package/dist/runtime/runtime-catalog.js +2 -4
- package/dist/runtime/runtime-registry.d.ts +1 -1
- package/dist/runtime/runtime-registry.js +1 -1
- package/dist/runtime/streams.d.ts.map +1 -1
- package/dist/runtime/streams.js +0 -1
- package/dist/runtime/wasi-instance.d.ts +35 -45
- package/dist/runtime/wasi-instance.d.ts.map +1 -1
- package/dist/runtime/wasi-instance.js +87 -103
- package/dist/runtime/wasm-runner.d.ts +9 -15
- package/dist/runtime/wasm-runner.d.ts.map +1 -1
- package/dist/runtime/wasm-runner.js +23 -29
- package/dist/session/bindings.d.ts +2 -7
- package/dist/session/bindings.d.ts.map +1 -1
- package/dist/session/bindings.js +3 -8
- package/dist/session/helpers.d.ts +2 -9
- package/dist/session/helpers.d.ts.map +1 -1
- package/dist/session/helpers.js +2 -10
- package/dist/session/init.d.ts +3 -6
- package/dist/session/init.d.ts.map +1 -1
- package/dist/session/init.js +25 -30
- package/dist/session/nimbus-session.d.ts +1 -1
- package/dist/session/nimbus-session.js +5 -5
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +9 -16
- package/dist/session/rpc.d.ts +2 -2
- package/dist/session/rpc.js +6 -6
- package/dist/session/supervisor-rpc.d.ts +1 -2
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +1 -5
- package/dist/shell/features.d.ts +5 -5
- package/dist/shell/features.js +6 -6
- package/dist/shell/unix-commands.js +15 -15
- package/dist/vfs/dev-provider.d.ts +1 -1
- package/dist/vfs/dev-provider.js +1 -1
- package/dist/vfs/sqlite-vfs.d.ts +3 -3
- package/dist/vfs/sqlite-vfs.d.ts.map +1 -1
- package/dist/vfs/sqlite-vfs.js +10 -11
- package/package.json +12 -2
- package/public/s/index.html +44 -75
- package/scripts/bundle-facet-workers.mjs +1 -1
- package/scripts/bundle-git.mjs +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* WASM swap and rejected-package registry.
|
|
3
3
|
*
|
|
4
4
|
* The contract:
|
|
5
5
|
* - WASM_SWAPS : name→name rewrite at the resolver/installer boundary.
|
|
@@ -19,12 +19,9 @@
|
|
|
19
19
|
*
|
|
20
20
|
* IMPORTANT: This module is the single source of truth in the supervisor
|
|
21
21
|
* isolate. The same data is *duplicated* into
|
|
22
|
-
* `src/
|
|
22
|
+
* `src/loaders/npm-resolve-preamble.ts` because that preamble is shipped
|
|
23
23
|
* into NimbusLoaderPool isolates as a string (cannot `import`). The
|
|
24
|
-
*
|
|
25
|
-
* the duplication.
|
|
26
|
-
*
|
|
27
|
-
* See `audit/sections/W6-plan.md` §3.
|
|
24
|
+
* preamble parity test gates the duplication.
|
|
28
25
|
*/
|
|
29
26
|
// ─────────────────────────────────────────────────────────────────────────
|
|
30
27
|
// Registries
|
|
@@ -35,8 +32,7 @@ export const WASM_SWAPS = [
|
|
|
35
32
|
// @swc/wasm-web) are intentionally NOT here. Without npm-alias
|
|
36
33
|
// support, swapping them would silently break the user's
|
|
37
34
|
// `require(originalName)` call site. They are in REJECT_INSTALL
|
|
38
|
-
// with a code-change suggestion
|
|
39
|
-
// support. See plan §2 + §10.
|
|
35
|
+
// with a code-change suggestion until npm-alias support exists.
|
|
40
36
|
{
|
|
41
37
|
from: 'esbuild',
|
|
42
38
|
to: 'esbuild-wasm',
|
|
@@ -73,20 +69,20 @@ export const REJECT_INSTALL = [
|
|
|
73
69
|
{
|
|
74
70
|
from: 'sqlite3',
|
|
75
71
|
reason: 'Native sqlite3 .node binding.',
|
|
76
|
-
suggest: 'better-sqlite3-wasm (untested by Nimbus) or sql.js
|
|
72
|
+
suggest: 'better-sqlite3-wasm (untested by Nimbus) or sql.js once wasm asset loading is available.',
|
|
77
73
|
transitive: 'fail',
|
|
78
74
|
},
|
|
79
75
|
{
|
|
80
76
|
from: 'better-sqlite3',
|
|
81
77
|
reason: 'Native sqlite .node binding.',
|
|
82
|
-
suggest: 'better-sqlite3-wasm (untested by Nimbus) or @libsql/client
|
|
78
|
+
suggest: 'better-sqlite3-wasm (untested by Nimbus) or @libsql/client if its subpath exports resolve in your project.',
|
|
83
79
|
transitive: 'fail',
|
|
84
80
|
},
|
|
85
81
|
{
|
|
86
82
|
from: 'canvas',
|
|
87
83
|
reason: 'Native Cairo bindings.',
|
|
88
|
-
suggest: 'canvaskit-wasm (Skia
|
|
89
|
-
'or @resvg/resvg-wasm for SVG
|
|
84
|
+
suggest: 'canvaskit-wasm (Skia -> WASM, canvas-API-compatible, ~7MB; untested by Nimbus) ' +
|
|
85
|
+
'or @resvg/resvg-wasm for SVG.',
|
|
90
86
|
transitive: 'fail',
|
|
91
87
|
},
|
|
92
88
|
{
|
|
@@ -136,32 +132,32 @@ export const REJECT_INSTALL = [
|
|
|
136
132
|
// ── Different-require-name natives (would be swaps with alias support) ─
|
|
137
133
|
{
|
|
138
134
|
from: 'bcrypt',
|
|
139
|
-
reason: 'Native bcrypt; pure-JS bcryptjs has
|
|
140
|
-
suggest: 'change `require("bcrypt")` to `require("bcryptjs")`, then `npm install bcryptjs
|
|
135
|
+
reason: 'Native bcrypt; pure-JS bcryptjs has an equivalent sync API but the require() name differs and Nimbus does not yet support npm aliases.',
|
|
136
|
+
suggest: 'change `require("bcrypt")` to `require("bcryptjs")`, then `npm install bcryptjs`. APIs are sync-compatible.',
|
|
141
137
|
transitive: 'fail',
|
|
142
138
|
},
|
|
143
139
|
{
|
|
144
140
|
from: 'argon2',
|
|
145
141
|
reason: 'Native Argon2 C bindings.',
|
|
146
|
-
suggest: 'hash-wasm
|
|
142
|
+
suggest: 'hash-wasm for argon2d, argon2i, and argon2id.',
|
|
147
143
|
transitive: 'fail',
|
|
148
144
|
},
|
|
149
145
|
{
|
|
150
146
|
from: 'node-sass',
|
|
151
147
|
reason: 'Native libsass; deprecated upstream.',
|
|
152
|
-
suggest: 'sass (dart-sass, pure JS
|
|
148
|
+
suggest: 'sass (dart-sass, pure JS).',
|
|
153
149
|
transitive: 'fail',
|
|
154
150
|
},
|
|
155
151
|
{
|
|
156
152
|
from: 'grpc',
|
|
157
153
|
reason: 'Deprecated native gRPC.',
|
|
158
|
-
suggest: '@grpc/grpc-js (pure JS
|
|
154
|
+
suggest: '@grpc/grpc-js (pure JS, untested end-to-end in Nimbus).',
|
|
159
155
|
transitive: 'fail',
|
|
160
156
|
},
|
|
161
157
|
{
|
|
162
158
|
from: '@swc/core',
|
|
163
159
|
reason: 'Native Rust SWC.',
|
|
164
|
-
suggest: '@swc/wasm-web
|
|
160
|
+
suggest: '@swc/wasm-web for transform/parse only; it does not provide the native Plugin API.',
|
|
165
161
|
transitive: 'fail',
|
|
166
162
|
},
|
|
167
163
|
// ── ORM natives ──────────────────────────────────────────────────────
|
|
@@ -169,7 +165,7 @@ export const REJECT_INSTALL = [
|
|
|
169
165
|
from: 'prisma',
|
|
170
166
|
reason: 'Native query engine; not portable to Workers in this configuration.',
|
|
171
167
|
suggest: '@prisma/adapter-d1 (Prisma official Workers adapter, untested by Nimbus), ' +
|
|
172
|
-
'or migrate to drizzle-orm + @libsql/client (untested
|
|
168
|
+
'or migrate to drizzle-orm + @libsql/client (untested by Nimbus).',
|
|
173
169
|
transitive: 'fail',
|
|
174
170
|
},
|
|
175
171
|
{
|
|
@@ -204,62 +200,56 @@ export const REJECT_INSTALL = [
|
|
|
204
200
|
suggest: 'no Workers-compatible target for bundled browsers — use @playwright/test against a remote browser endpoint (untested by Nimbus).',
|
|
205
201
|
transitive: 'fail',
|
|
206
202
|
},
|
|
207
|
-
// ──
|
|
208
|
-
// These come out of REJECT once the loader work lands. Spike verdicts
|
|
209
|
-
// (audit/probes/w6.5/spike/) confirmed both gaps span >1 src/ file.
|
|
203
|
+
// ── Packages that install but do not run correctly in the current loader ─
|
|
210
204
|
{
|
|
211
205
|
from: 'sql.js',
|
|
212
|
-
reason: 'Installs but fails at runtime
|
|
213
|
-
suggest: '
|
|
206
|
+
reason: 'Installs but fails at runtime because dist/sql-wasm.wasm is not available to the runtime loader.',
|
|
207
|
+
suggest: 'For SQL in Workers, consider Cloudflare D1 or @libsql/client.',
|
|
214
208
|
transitive: 'fail',
|
|
215
209
|
},
|
|
216
210
|
{
|
|
217
211
|
from: '@swc/wasm-web',
|
|
218
|
-
reason: 'Installs but fails at runtime
|
|
219
|
-
suggest: '
|
|
212
|
+
reason: 'Installs but fails at runtime because its generated code path depends on workerd-blocked dynamic code generation.',
|
|
213
|
+
suggest: 'For ESM transforms consider esbuild-wasm.',
|
|
220
214
|
transitive: 'fail',
|
|
221
215
|
},
|
|
222
|
-
// ──
|
|
216
|
+
// ── WASM/WASI-flavoured packages that still do not load ─────────────
|
|
223
217
|
{
|
|
224
218
|
from: '@img/sharp-wasm32',
|
|
225
|
-
reason: 'WASM build of sharp; package is wasm32-cpu-only
|
|
226
|
-
suggest: 'wasm-vips
|
|
219
|
+
reason: 'WASM build of sharp; package is wasm32-cpu-only and libvips initThreads() requires pthread support unavailable in Workers.',
|
|
220
|
+
suggest: 'wasm-vips may work for simple pipelines; for complex pipelines, render server-side and ship pixels.',
|
|
227
221
|
transitive: 'fail',
|
|
228
222
|
},
|
|
229
223
|
{
|
|
230
224
|
from: '@napi-rs/canvas',
|
|
231
225
|
reason: 'Native bindings only (linux-x64-gnu/musl, darwin-arm64/x64, android-arm64, linux-arm64-gnu/musl, win32-x64-msvc, linux-arm-gnueabihf). No WASM build published.',
|
|
232
|
-
suggest: 'canvaskit-wasm (Skia
|
|
233
|
-
'or @resvg/resvg-wasm for SVG
|
|
226
|
+
suggest: 'canvaskit-wasm (Skia -> WASM, canvas-API-compatible, ~7MB; untested by Nimbus) ' +
|
|
227
|
+
'or @resvg/resvg-wasm for SVG.',
|
|
234
228
|
transitive: 'fail',
|
|
235
229
|
},
|
|
236
230
|
{
|
|
237
231
|
from: '@napi-rs/canvas-wasm32-wasi',
|
|
238
232
|
reason: '@napi-rs/canvas does not publish a wasm32-wasi variant on npm (404). The @napi-rs/canvas project ships only native bindings. No WASM/WASI build exists.',
|
|
239
|
-
suggest: 'canvaskit-wasm (Skia
|
|
240
|
-
'or @resvg/resvg-wasm
|
|
233
|
+
suggest: 'canvaskit-wasm (Skia -> WASM, canvas-API-compatible; untested by Nimbus) ' +
|
|
234
|
+
'or @resvg/resvg-wasm for SVG.',
|
|
241
235
|
transitive: 'fail',
|
|
242
236
|
},
|
|
243
|
-
// ──
|
|
237
|
+
// ── Tailwind v4 oxide + lightningcss native parents ────────────────
|
|
244
238
|
// Both ship only platform-native .node bindings + a wasm32-wasi shard.
|
|
245
|
-
// workerd has no node:wasi
|
|
239
|
+
// workerd has no node:wasi, so neither path loads.
|
|
246
240
|
// Without these REJECT entries, both parents install fine and surface
|
|
247
241
|
// a misleading runtime error (npm-4828 fallthrough for oxide, detect-
|
|
248
242
|
// libc execSync gap for lightningcss). With transitive='fail', the
|
|
249
|
-
// install is
|
|
250
|
-
// Investigation: audit/probes/x526b/investigation/{tailwindcss-oxide,lightningcss}.out.txt
|
|
251
|
-
// Plan: audit/sections/X526b-plan.md §3.1
|
|
252
|
-
// Functional probes: audit/probes/x526b/functional/{oxide,lightningcss}-rejected.mjs
|
|
253
|
-
// E2E probes: audit/probes/x526b/e2e/{oxide,lightningcss,tailwindcss-vite-transitive}-e2e.mjs
|
|
243
|
+
// install is loudly rejected at resolve time.
|
|
254
244
|
{
|
|
255
245
|
from: '@tailwindcss/oxide',
|
|
256
|
-
reason: 'Native Rust Tailwind v4 oxide engine; ships only platform-specific .node bindings
|
|
246
|
+
reason: 'Native Rust Tailwind v4 oxide engine; ships only platform-specific .node bindings plus a wasm32-wasi shard. workerd has no node:wasi, and bare native bindings cannot dlopen.',
|
|
257
247
|
suggest: 'no Workers-compatible target — Tailwind v3 (`tailwindcss@^3`) is pure JS and works in Workers (untested by Nimbus). Tailwind v4 inherently requires the Rust oxide engine.',
|
|
258
248
|
transitive: 'fail',
|
|
259
249
|
},
|
|
260
250
|
{
|
|
261
251
|
from: 'lightningcss',
|
|
262
|
-
reason: 'Native Rust CSS parser; ships platform-specific .node bindings
|
|
252
|
+
reason: 'Native Rust CSS parser; ships platform-specific .node bindings plus a wasm32-wasi-only `lightningcss-wasm` package. workerd has no node:wasi, and the package probes libc through child_process.execSync.',
|
|
263
253
|
suggest: 'no Workers-compatible target today — postcss + cssnano (pure JS, untested by Nimbus) cover most lightningcss use cases. For CSS minification only: clean-css (pure JS, untested by Nimbus).',
|
|
264
254
|
transitive: 'fail',
|
|
265
255
|
},
|
|
@@ -282,8 +272,8 @@ export function lookupReject(name) {
|
|
|
282
272
|
* Idempotent: running on already-swapped specs is a no-op.
|
|
283
273
|
*
|
|
284
274
|
* Range carry-over: the original spec range is preserved on the new key.
|
|
285
|
-
*
|
|
286
|
-
*
|
|
275
|
+
* Future alias support may force pulling the current swap target version,
|
|
276
|
+
* but for now we honour the user's requested range.
|
|
287
277
|
*/
|
|
288
278
|
export function applySwaps(specs) {
|
|
289
279
|
const out = {};
|
|
@@ -376,22 +366,20 @@ export function formatTransitiveSkip(r) {
|
|
|
376
366
|
// ─────────────────────────────────────────────────────────────────────────
|
|
377
367
|
/**
|
|
378
368
|
* Tag class for registry-driven rejects. Both the supervisor-side path
|
|
379
|
-
* (npm-installer.ts
|
|
369
|
+
* (npm-installer.ts and npm-resolver.ts) and the
|
|
380
370
|
* facet-side path (npm-resolve-facet.ts:resolveTreeInFacet) throw errors
|
|
381
371
|
* tagged for this case.
|
|
382
372
|
*
|
|
383
373
|
* Supervisor-side: throw `new RegistryRejectError(rejects)` directly.
|
|
384
374
|
* Facet-side: cannot import this class (preamble has no import surface),
|
|
385
|
-
* so the facet throws `new Error(...)` with `err.
|
|
375
|
+
* so the facet throws `new Error(...)` with `err.__nimbus_registry_reject = true`.
|
|
386
376
|
* Both are detected via `isRegistryReject()`.
|
|
387
377
|
*
|
|
388
|
-
* The own-property
|
|
389
|
-
* preserves error own-properties (NimbusLoaderPool's loadable contract
|
|
390
|
-
* is checked in audit/probes/w6/ ...).
|
|
378
|
+
* The own-property survives worker boundary serialization.
|
|
391
379
|
*/
|
|
392
380
|
export class RegistryRejectError extends Error {
|
|
393
381
|
rejects;
|
|
394
|
-
|
|
382
|
+
__nimbus_registry_reject = true;
|
|
395
383
|
constructor(rejects) {
|
|
396
384
|
super(formatRejectError(rejects));
|
|
397
385
|
this.name = 'RegistryRejectError';
|
|
@@ -403,7 +391,7 @@ export class RegistryRejectError extends Error {
|
|
|
403
391
|
* are lost across that boundary, so we tag via an own-property.
|
|
404
392
|
*/
|
|
405
393
|
export function isRegistryReject(e) {
|
|
406
|
-
return !!(e && typeof e === 'object' && e.
|
|
394
|
+
return !!(e && typeof e === 'object' && e.__nimbus_registry_reject === true);
|
|
407
395
|
}
|
|
408
396
|
let _sink = null;
|
|
409
397
|
let _sinkThrowCount = 0;
|
|
@@ -413,8 +401,7 @@ let _sinkThrowCount = 0;
|
|
|
413
401
|
* The sink is a per-isolate singleton. The supervisor isolate's sink does
|
|
414
402
|
* NOT propagate to facet isolates — facet emits travel through
|
|
415
403
|
* `ResolveFacetResult.registryEvents` and are flushed by the supervisor
|
|
416
|
-
* after the facet returns.
|
|
417
|
-
* invariant.
|
|
404
|
+
* after the facet returns.
|
|
418
405
|
*/
|
|
419
406
|
export function setRegistryEventSink(s) {
|
|
420
407
|
_sink = s;
|
|
@@ -544,7 +531,7 @@ export function classifyInstallError(e, ctx = {}) {
|
|
|
544
531
|
(() => {
|
|
545
532
|
for (const s of WASM_SWAPS) {
|
|
546
533
|
if (_rejectByFrom.has(s.from)) {
|
|
547
|
-
throw new Error(`
|
|
534
|
+
throw new Error(`Registry conflict: '${s.from}' is in both WASM_SWAPS and REJECT_INSTALL. ` +
|
|
548
535
|
`A name must own one role.`);
|
|
549
536
|
}
|
|
550
537
|
}
|
|
@@ -18,14 +18,13 @@ export declare class WebSocketTerminal {
|
|
|
18
18
|
* by the disposer the attach call returns. Supports nesting (the
|
|
19
19
|
* disposer restores the prior callback).
|
|
20
20
|
*
|
|
21
|
-
* Reasoning per /workspace/.seal-internal/2026-05-11-repl-plan/plan.md
|
|
22
21
|
* §3 (Layer 2): the explicit handoff mirrors how `vim`/`less` swap
|
|
23
22
|
* the parent shell's terminal handler. Auto-detect was rejected as
|
|
24
23
|
* fragile. Additive only — when null, behavior is identical to pre-W1.
|
|
25
24
|
*/
|
|
26
25
|
private replCallback;
|
|
27
26
|
/**
|
|
28
|
-
* monaco
|
|
27
|
+
* editor/monaco (2026-05-13): Editor-pane file-system bridge.
|
|
29
28
|
*
|
|
30
29
|
* When non-null, fs-* messages (fs-read / fs-write / fs-list) are
|
|
31
30
|
* routed to this callback INSTEAD of the shell. The callback is
|
|
@@ -34,7 +33,7 @@ export declare class WebSocketTerminal {
|
|
|
34
33
|
* frames over the live WS.
|
|
35
34
|
*
|
|
36
35
|
* Additive — when null, fs-* messages are silently dropped (same
|
|
37
|
-
* pre-
|
|
36
|
+
* pre-editor behavior, since handleMessage's switch had no case
|
|
38
37
|
* for them).
|
|
39
38
|
*/
|
|
40
39
|
private fsCallback;
|
|
@@ -67,7 +66,7 @@ export declare class WebSocketTerminal {
|
|
|
67
66
|
* stderr, and the next-prompt as three discrete frames in deterministic
|
|
68
67
|
* order. Without this, all three coalesce into one `{type:'output'}`
|
|
69
68
|
* frame and probes asserting frame-order (stderr-before-stdout or
|
|
70
|
-
* prompt-after-output) see false-
|
|
69
|
+
* prompt-after-output) see false-failing.
|
|
71
70
|
*
|
|
72
71
|
* Idempotent: cancels the pending timer + sends current buffer (if any).
|
|
73
72
|
* Safe to call on an empty buffer (no-op).
|
|
@@ -86,7 +85,7 @@ export declare class WebSocketTerminal {
|
|
|
86
85
|
recursive?: boolean;
|
|
87
86
|
}): void;
|
|
88
87
|
/**
|
|
89
|
-
* monaco
|
|
88
|
+
* editor/monaco (2026-05-13): install the fs-* message handler.
|
|
90
89
|
* The callback receives the raw message + a reply lambda that
|
|
91
90
|
* accepts a JSON-serializable frame and pushes it over this WS.
|
|
92
91
|
* Single-slot (last call wins) — init.ts is the only caller and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-terminal.d.ts","sourceRoot":"","sources":["../../src/facets/ws-terminal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,qB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QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IA+C3J;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,GAAG,IAAI;IAI/D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAWlD,KAAK,IAAI,IAAI;IACb,KAAK,IAAI,IAAI;CACd"}
|
|
@@ -18,14 +18,13 @@ export class WebSocketTerminal {
|
|
|
18
18
|
* by the disposer the attach call returns. Supports nesting (the
|
|
19
19
|
* disposer restores the prior callback).
|
|
20
20
|
*
|
|
21
|
-
* Reasoning per /workspace/.seal-internal/2026-05-11-repl-plan/plan.md
|
|
22
21
|
* §3 (Layer 2): the explicit handoff mirrors how `vim`/`less` swap
|
|
23
22
|
* the parent shell's terminal handler. Auto-detect was rejected as
|
|
24
23
|
* fragile. Additive only — when null, behavior is identical to pre-W1.
|
|
25
24
|
*/
|
|
26
25
|
replCallback = null;
|
|
27
26
|
/**
|
|
28
|
-
* monaco
|
|
27
|
+
* editor/monaco (2026-05-13): Editor-pane file-system bridge.
|
|
29
28
|
*
|
|
30
29
|
* When non-null, fs-* messages (fs-read / fs-write / fs-list) are
|
|
31
30
|
* routed to this callback INSTEAD of the shell. The callback is
|
|
@@ -34,7 +33,7 @@ export class WebSocketTerminal {
|
|
|
34
33
|
* frames over the live WS.
|
|
35
34
|
*
|
|
36
35
|
* Additive — when null, fs-* messages are silently dropped (same
|
|
37
|
-
* pre-
|
|
36
|
+
* pre-editor behavior, since handleMessage's switch had no case
|
|
38
37
|
* for them).
|
|
39
38
|
*/
|
|
40
39
|
fsCallback = null;
|
|
@@ -79,7 +78,7 @@ export class WebSocketTerminal {
|
|
|
79
78
|
* stderr, and the next-prompt as three discrete frames in deterministic
|
|
80
79
|
* order. Without this, all three coalesce into one `{type:'output'}`
|
|
81
80
|
* frame and probes asserting frame-order (stderr-before-stdout or
|
|
82
|
-
* prompt-after-output) see false-
|
|
81
|
+
* prompt-after-output) see false-failing.
|
|
83
82
|
*
|
|
84
83
|
* Idempotent: cancels the pending timer + sends current buffer (if any).
|
|
85
84
|
* Safe to call on an empty buffer (no-op).
|
|
@@ -125,16 +124,16 @@ export class WebSocketTerminal {
|
|
|
125
124
|
if (msg.rows)
|
|
126
125
|
this._rows = msg.rows;
|
|
127
126
|
break;
|
|
128
|
-
// monaco
|
|
127
|
+
// editor/monaco (2026-05-13): editor-pane fs bridge. Route to
|
|
129
128
|
// the registered fsCallback (set by init.ts which holds the
|
|
130
129
|
// SqliteVFS). Callback uses the reply lambda to push fs-*-result
|
|
131
130
|
// frames over this WS. Untouched messages (no callback) are
|
|
132
|
-
// silently dropped — same pre-
|
|
131
|
+
// silently dropped — same pre-editor behavior.
|
|
133
132
|
case 'fs-read':
|
|
134
133
|
case 'fs-write':
|
|
135
134
|
case 'fs-list':
|
|
136
135
|
if (this.fsCallback) {
|
|
137
|
-
// monaco
|
|
136
|
+
// editor/monaco hotfix (2026-05-13): auto-echo reqId from
|
|
138
137
|
// the inbound msg into every reply frame. The client side
|
|
139
138
|
// (public/s/index.html Editor.fsRequest) keys its pending-
|
|
140
139
|
// request Map on reqId; without echo, every request hangs
|
|
@@ -167,7 +166,7 @@ export class WebSocketTerminal {
|
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
168
|
/**
|
|
170
|
-
* monaco
|
|
169
|
+
* editor/monaco (2026-05-13): install the fs-* message handler.
|
|
171
170
|
* The callback receives the raw message + a reply lambda that
|
|
172
171
|
* accepts a JSON-serializable frame and pushes it over this WS.
|
|
173
172
|
* Single-slot (last call wins) — init.ts is the only caller and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/git/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAwKtD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,GAAG,EACb,GAAG,EAAE,SAAS,EACd,KAAK,CAAC,EAAE,kBAAkB,EAC1B,KAAK,CAAC,EAAE,GAAG,GACV,IAAI,
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/git/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAwKtD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,GAAG,EACb,GAAG,EAAE,SAAS,EACd,KAAK,CAAC,EAAE,kBAAkB,EAC1B,KAAK,CAAC,EAAE,GAAG,GACV,IAAI,CAuaN"}
|
package/dist/git/commands.js
CHANGED
|
@@ -229,7 +229,6 @@ export function registerGitCommands(registry, vfs, doCtx, doEnv) {
|
|
|
229
229
|
// unconditionally prepended getDir(ctx). The clone "succeeded" into
|
|
230
230
|
// <cwd>//tmp/x (note double slash) and the user's later `cd /tmp/x`
|
|
231
231
|
// hit ENOENT. Real-world git treats absolute targets as absolute.
|
|
232
|
-
// See /workspace/.seal-internal/2026-05-12-hardening-r5/repro-git.mjs.
|
|
233
232
|
let dest;
|
|
234
233
|
if (subArgs[1]) {
|
|
235
234
|
dest = subArgs[1].startsWith('/')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-facet.d.ts","sourceRoot":"","sources":["../../src/git/network-facet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAOH,MAA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AC;IACjB,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,IAAI,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,+BAA+B;IAC/B,MAAM,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,kBAAkB,EACvB,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,gBAAgB,CAAC,CA2H3B"}
|
|
@@ -68,7 +68,6 @@ export async function execGitNetwork(ctx, env, opts) {
|
|
|
68
68
|
// SupervisorRPC wrapper isolate, which OOMs after ~5 waves
|
|
69
69
|
// on real repos. writeBatchStream uses a 256 KiB-highwater
|
|
70
70
|
// ReadableStream, keeping wrapper-isolate residency
|
|
71
|
-
// bounded. See audit/sections/GIT-FREEZE-retro.md.
|
|
72
71
|
// - the pre-bundled isomorphic-git (git-bundle.js)
|
|
73
72
|
modules: {
|
|
74
73
|
'git-network-worker.js': W7_FRAME_PREAMBLE + '\n' + generateGitNetworkFacetCode(),
|
|
@@ -403,7 +402,6 @@ function createBufferedFs(supervisor, stats) {
|
|
|
403
402
|
// detached buffer throws
|
|
404
403
|
// "Cannot perform Construct on a detached ArrayBuffer"
|
|
405
404
|
// inside the byte-stream RPC machinery — the prod-only failure
|
|
406
|
-
// mode in audit/probes/git-freeze/detached-buffer-tail-2026-05-09T14-35-39Z.jsonl
|
|
407
405
|
// (pre-fix prod d185e0d1).
|
|
408
406
|
//
|
|
409
407
|
// Aliasing sources observed (Q4-A first-deploy verification at
|
|
@@ -8,9 +8,8 @@
|
|
|
8
8
|
* Consumed by git-network-facet.ts: passed to LOADER.load()'s
|
|
9
9
|
* `modules` record so the facet can `import` isomorphic-git.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
* Size: 465.8 KiB
|
|
11
|
+
* Size: 466.1 KiB
|
|
13
12
|
*/
|
|
14
13
|
export declare const GIT_BUNDLE_CODE: string;
|
|
15
|
-
export declare const GIT_BUNDLE_SIZE =
|
|
14
|
+
export declare const GIT_BUNDLE_SIZE = 477254;
|
|
16
15
|
//# sourceMappingURL=git-bundle.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-bundle.generated.d.ts","sourceRoot":"","sources":["../src/git-bundle.generated.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"git-bundle.generated.d.ts","sourceRoot":"","sources":["../src/git-bundle.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,eAAe,EAAE,MAA02re,CAAC;AAEz4re,eAAO,MAAM,eAAe,SAAS,CAAC"}
|