@nimbus-sh/worker 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -1,14 +1,18 @@
1
1
  # @nimbus-sh/worker
2
2
 
3
- The Nimbus runtime — Durable Object + router + facet machinery — packaged
4
- for embedding in any Cloudflare Workers project.
3
+ The Nimbus runtime package: Durable Object, router, assets, VFS, runtime
4
+ manager, and facet machinery.
5
+
6
+ Application code should import the deploy-time API through
7
+ `@nimbus-sh/sdk/worker`. This package is still installed because it carries
8
+ the runtime implementation and static assets used by the SDK entrypoint.
5
9
 
6
10
  ## Install
7
11
 
8
12
  ```bash
9
- npm install @nimbus-sh/worker
13
+ npm install @nimbus-sh/sdk @nimbus-sh/worker @nimbus-sh/config
10
14
  # or
11
- bun add @nimbus-sh/worker
15
+ bun add @nimbus-sh/sdk @nimbus-sh/worker @nimbus-sh/config
12
16
  ```
13
17
 
14
18
  ## Quickstart
@@ -27,7 +31,8 @@ import {
27
31
  NimbusDOStub,
28
32
  CirrusHmrRPC,
29
33
  createNimbusHandler,
30
- } from '@nimbus-sh/worker';
34
+ } from '@nimbus-sh/sdk/worker';
35
+ import { defineNimbusConfig } from '@nimbus-sh/config';
31
36
 
32
37
  // Re-export the DO + every RPC class so wrangler's `class_name` lookup +
33
38
  // `enable_ctx_exports` find them in your Worker's main-module exports.
@@ -43,7 +48,22 @@ export {
43
48
  CirrusHmrRPC,
44
49
  };
45
50
 
46
- export default createNimbusHandler();
51
+ const nimbusConfig = defineNimbusConfig({
52
+ sandboxes: {
53
+ default: {
54
+ root: '/home/user',
55
+ runtimes: { preinstall: ['python'], onDemand: true },
56
+ tools: { namespace: 'sandbox', kind: 'sandbox' },
57
+ },
58
+ },
59
+ });
60
+
61
+ export default createNimbusHandler({
62
+ sdk: {
63
+ remote: true,
64
+ config: nimbusConfig,
65
+ },
66
+ });
47
67
  ```
48
68
 
49
69
  `wrangler.jsonc` (use `@nimbus-sh/config` to generate, or adapt
@@ -59,7 +79,7 @@ export default createNimbusHandler();
59
79
  "assets": {
60
80
  "directory": "node_modules/@nimbus-sh/worker/public",
61
81
  "binding": "ASSETS",
62
- "run_worker_first": ["/s/*", "/new"]
82
+ "run_worker_first": ["/api/*", "/s/*", "/new"]
63
83
  },
64
84
  "alias": {
65
85
  "@lifo-sh/ui": "./node_modules/@nimbus-sh/worker/dist/stubs/lifo-ui.js",
@@ -89,10 +109,14 @@ export default createNimbusHandler();
89
109
  Then:
90
110
 
91
111
  ```bash
92
- wrangler secret put JWT_SECRET # 32+ hex chars
93
- wrangler deploy
112
+ CLOUDFLARE_ACCOUNT_ID=<account-id> npx @nimbus-sh/cli setup cloudflare --name my-nimbus
113
+ npx wrangler secret put JWT_SECRET # 32+ hex chars
114
+ npx wrangler deploy
94
115
  ```
95
116
 
117
+ If setup reports Cloudflare R2 error `10042`, enable R2 in the
118
+ Cloudflare Dashboard once for the account, then rerun the setup command.
119
+
96
120
  `JWT_SECRET` is required for token-enforced deployments. Legacy-public
97
121
  single-tenant demos can set `NIMBUS_LEGACY_PUBLIC=1` and rely on URL
98
122
  possession instead.
@@ -109,6 +133,10 @@ possession instead.
109
133
  onSessionEnd?: (ctx) => void | Promise<void>; // reserved v0.2
110
134
  };
111
135
  routes?: (request, env, ctx) => Response | null | Promise<Response | null>;
136
+ sdk?: {
137
+ remote?: boolean | { enabled?: boolean; basePath?: string; allowLegacy?: boolean };
138
+ config?: NimbusConfig;
139
+ };
112
140
  }
113
141
  ```
114
142
 
@@ -136,7 +164,7 @@ export default createNimbusHandler({
136
164
  Programmatic sandbox route:
137
165
 
138
166
  ```ts
139
- import { Nimbus } from '@nimbus-sh/sdk/sandbox';
167
+ import { Nimbus } from '@nimbus-sh/sdk';
140
168
 
141
169
  export default createNimbusHandler({
142
170
  routes: async (req, env) => {
@@ -163,6 +191,21 @@ export default createNimbusHandler({
163
191
  });
164
192
  ```
165
193
 
194
+ Remote SDK API:
195
+
196
+ ```ts
197
+ export default createNimbusHandler({
198
+ sdk: {
199
+ remote: true,
200
+ config: nimbusConfig,
201
+ },
202
+ });
203
+ ```
204
+
205
+ Remote calls use `POST /api/nimbus/v1/sandboxes/<id>/rpc` internally.
206
+ Applications normally call it through `Nimbus.connect({ endpoint, token,
207
+ config })`. The route requires a valid Nimbus JWT and `sandbox:use` scope.
208
+
166
209
  For long-running app servers, start an explicit long-running process and
167
210
  expose the virtual port:
168
211
 
@@ -196,9 +239,10 @@ export default createNimbusHandler({
196
239
 
197
240
  | Subpath | What |
198
241
  |---|---|
199
- | `@nimbus-sh/worker` | `NimbusSession`, `SupervisorRPC` + other RPC classes, `createNimbusHandler`, auth types. |
200
- | `@nimbus-sh/worker/router` | `createNimbusHandler`, hooks types. |
201
- | `@nimbus-sh/worker/auth` | HS256 JWT issue/verify, typed errors. |
242
+ | `@nimbus-sh/sdk/worker` | Public Worker embedder API: `NimbusSession`, RPC classes, `createNimbusHandler`, auth helpers. |
243
+ | `@nimbus-sh/worker` | Runtime implementation package used by the SDK entrypoint. |
244
+ | `@nimbus-sh/worker/router` | Runtime router implementation and hook types. |
245
+ | `@nimbus-sh/worker/auth` | Runtime auth implementation re-exported by `@nimbus-sh/sdk/token`. |
202
246
 
203
247
  ## Required bindings
204
248
 
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * session-id.ts — Friendly human-readable session identifiers.
3
3
  *
4
- * Format: `adjective-noun-NNNN` (e.g. `nimble-otter-4271`).
4
+ * Generated format: `adjective-noun-NNNN` (e.g. `nimble-otter-4271`).
5
+ * Programmatic callers may also use explicit IDs like `job-123`.
5
6
  *
6
7
  * Why friendly IDs rather than opaque crypto strings?
7
8
  * - Shareable over voice/chat without character-by-character dictation.
@@ -16,15 +17,16 @@
16
17
  * sessions ≈ 0.12%. Acceptable for v1. If we ever push past that scale,
17
18
  * widen the suffix to 6 digits (≈ 4 × 10¹⁰).
18
19
  *
19
- * Validation is strict: lowercase ASCII only, exact shape enforced.
20
- * `idFromName` is case-sensitive, so accepting mixed-case would fragment
21
- * sessions. Reject anything non-conforming with 400 before touching a DO.
20
+ * Validation rejects empty, overly long, slash-bearing, or colon-bearing
21
+ * values before touching a DO. Colon remains reserved for tenant/sub/session
22
+ * DO-name composition.
22
23
  */
23
24
  /**
24
- * Validate a session ID before touching a DO. Returns true iff the string
25
- * matches the exact `adjective-noun-NNNN` shape. Length bounds on each part
26
- * are deliberately looser than our own word lists so future list growth
27
- * doesn't invalidate bookmarked URLs.
25
+ * Validate a session ID before touching a DO.
26
+ *
27
+ * Browser-created sessions use the friendly generated shape. SDK-created
28
+ * sandboxes can choose stable job IDs, so this also accepts the same compact
29
+ * identifier class used by Nimbus JWT `sid`.
28
30
  */
29
31
  export declare function isValidSessionId(id: string | null | undefined): boolean;
30
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"session-id.d.ts","sourceRoot":"","sources":["../../src/_shared/session-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAiFH;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIvE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAO1C"}
1
+ {"version":3,"file":"session-id.d.ts","sourceRoot":"","sources":["../../src/_shared/session-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAmFH;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGvE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAO1C"}
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * session-id.ts — Friendly human-readable session identifiers.
3
3
  *
4
- * Format: `adjective-noun-NNNN` (e.g. `nimble-otter-4271`).
4
+ * Generated format: `adjective-noun-NNNN` (e.g. `nimble-otter-4271`).
5
+ * Programmatic callers may also use explicit IDs like `job-123`.
5
6
  *
6
7
  * Why friendly IDs rather than opaque crypto strings?
7
8
  * - Shareable over voice/chat without character-by-character dictation.
@@ -16,10 +17,11 @@
16
17
  * sessions ≈ 0.12%. Acceptable for v1. If we ever push past that scale,
17
18
  * widen the suffix to 6 digits (≈ 4 × 10¹⁰).
18
19
  *
19
- * Validation is strict: lowercase ASCII only, exact shape enforced.
20
- * `idFromName` is case-sensitive, so accepting mixed-case would fragment
21
- * sessions. Reject anything non-conforming with 400 before touching a DO.
20
+ * Validation rejects empty, overly long, slash-bearing, or colon-bearing
21
+ * values before touching a DO. Colon remains reserved for tenant/sub/session
22
+ * DO-name composition.
22
23
  */
24
+ import { isNimbusIdComponent } from '../auth/index.js';
23
25
  // Curated single-word adjectives. Lowercase ASCII, no profanity, no numbers,
24
26
  // no compounds. Sort order doesn't matter — we index randomly.
25
27
  const ADJECTIVES = [
@@ -94,20 +96,19 @@ const NOUNS = [
94
96
  'wheat', 'whippet', 'willow', 'wisp', 'wolf', 'wombat', 'woodland',
95
97
  'woodpecker', 'yak', 'yew', 'zebra', 'zinnia',
96
98
  ];
97
- /** Strict shape check. Rejects empty, uppercase, missing-parts, extra-parts. */
99
+ /** Friendly ID shape emitted by {@link generateSessionId}. */
98
100
  const SESSION_ID_RE = /^[a-z]{3,14}-[a-z]{3,14}-\d{4}$/;
99
101
  /**
100
- * Validate a session ID before touching a DO. Returns true iff the string
101
- * matches the exact `adjective-noun-NNNN` shape. Length bounds on each part
102
- * are deliberately looser than our own word lists so future list growth
103
- * doesn't invalidate bookmarked URLs.
102
+ * Validate a session ID before touching a DO.
103
+ *
104
+ * Browser-created sessions use the friendly generated shape. SDK-created
105
+ * sandboxes can choose stable job IDs, so this also accepts the same compact
106
+ * identifier class used by Nimbus JWT `sid`.
104
107
  */
105
108
  export function isValidSessionId(id) {
106
109
  if (typeof id !== 'string')
107
110
  return false;
108
- if (id.length < 9 || id.length > 40)
109
- return false;
110
- return SESSION_ID_RE.test(id);
111
+ return SESSION_ID_RE.test(id) || isNimbusIdComponent(id);
111
112
  }
112
113
  /**
113
114
  * Generate a fresh session ID. Uses crypto.getRandomValues for uniform
@@ -12,5 +12,5 @@
12
12
  */
13
13
  export { issueNimbusToken, verifyNimbusToken, type NimbusAuthEnv, } from './token.js';
14
14
  export { extractBearerToken, verifyRequestToken, requireScopes, requireSessionPin, setNimbusTokenCookie, authErrorResponse, NIMBUS_TOKEN_COOKIE, NIMBUS_TOKEN_QUERY, } from './middleware.js';
15
- export { NimbusAuthError, NimbusAuthConfigError, NimbusTokenMalformedError, NimbusTokenSignatureError, NimbusTokenClaimsError, NimbusTokenExpiredError, NimbusTokenTtlError, NimbusScopeError, NimbusSessionPinError, DEFAULT_TOKEN_TTL_MS, MAX_TOKEN_TTL_MS, ID_COMPONENT_RE, type NimbusTokenClaims, type VerifiedNimbusToken, type IssueTokenOptions, } from './types.js';
15
+ export { NimbusAuthError, NimbusAuthConfigError, NimbusTokenMalformedError, NimbusTokenSignatureError, NimbusTokenClaimsError, NimbusTokenExpiredError, NimbusTokenTtlError, NimbusScopeError, NimbusSessionPinError, DEFAULT_TOKEN_TTL_MS, MAX_TOKEN_TTL_MS, ID_COMPONENT_RE, isNimbusIdComponent, type NimbusTokenClaims, type VerifiedNimbusToken, type IssueTokenOptions, } from './types.js';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,aAAa,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC"}
@@ -12,4 +12,4 @@
12
12
  */
13
13
  export { issueNimbusToken, verifyNimbusToken, } from './token.js';
14
14
  export { extractBearerToken, verifyRequestToken, requireScopes, requireSessionPin, setNimbusTokenCookie, authErrorResponse, NIMBUS_TOKEN_COOKIE, NIMBUS_TOKEN_QUERY, } from './middleware.js';
15
- export { NimbusAuthError, NimbusAuthConfigError, NimbusTokenMalformedError, NimbusTokenSignatureError, NimbusTokenClaimsError, NimbusTokenExpiredError, NimbusTokenTtlError, NimbusScopeError, NimbusSessionPinError, DEFAULT_TOKEN_TTL_MS, MAX_TOKEN_TTL_MS, ID_COMPONENT_RE, } from './types.js';
15
+ export { NimbusAuthError, NimbusAuthConfigError, NimbusTokenMalformedError, NimbusTokenSignatureError, NimbusTokenClaimsError, NimbusTokenExpiredError, NimbusTokenTtlError, NimbusScopeError, NimbusSessionPinError, DEFAULT_TOKEN_TTL_MS, MAX_TOKEN_TTL_MS, ID_COMPONENT_RE, isNimbusIdComponent, } from './types.js';
@@ -136,6 +136,7 @@ export declare class NimbusSessionPinError extends NimbusAuthError {
136
136
  readonly attempted: string;
137
137
  constructor(pinnedTo: string, attempted: string);
138
138
  }
139
- /** Regex used to validate the `tn` and `sub` shape (per Mossaic §7.1). */
139
+ /** Compact identifier rule for tenants, subjects, session pins, and SDK sandbox IDs. */
140
140
  export declare const ID_COMPONENT_RE: RegExp;
141
+ export declare function isNimbusIdComponent(value: unknown): value is string;
141
142
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,KAAK,EAAE,QAAQ,CAAC;IAChB,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,kFAAkF;IAClF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,mFAAmF;AACnF,eAAO,MAAM,oBAAoB,QAAiB,CAAC;AAEnD,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,QAA2B,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,mBAAmB;IAClC,2DAA2D;IAC3D,MAAM,E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MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,GAAE,MAAY;CAMpE;AAED,sEAAsE;AACtE,qBAAa,qBAAsB,SAAQ,eAAe;gBAC5C,OAAO,GAAE,MAAuC;CAI7D;AAED,kFAAkF;AAClF,qBAAa,yBAA0B,SAAQ,eAAe;gBAChD,MAAM,EAAE,MAAM;CAI3B;AAED,yEAAyE;AACzE,qBAAa,yBAA0B,SAAQ,eAAe;;CAK7D;AAED,8EAA8E;AAC9E,qBAAa,sBAAuB,SAAQ,eAAe;gBAC7C,MAAM,EAAE,MAAM;CAI3B;AAED,gFAAgF;AAChF,qBAAa,uBAAwB,SAAQ,eAAe;IAC1D,kDAAkD;IAClD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;gBACnB,aAAa,EAAE,MAAM;CAKlC;AAED,mEAAmE;AACnE,qBAAa,mBAAoB,SAAQ,eAAe;gBAC1C,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAQzC;AAED,oEAAoE;AACpE,qBAAa,gBAAiB,SAAQ,eAAe;IACnD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;gBACnB,aAAa,EAAE,MAAM;CAKlC;AAED,2EAA2E;AAC3E,qBAAa,qBAAsB,SAAQ,eAAe;IACxD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;gBACf,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;CAUhD;AAED,wFAAwF;AACxF,eAAO,MAAM,eAAe,QAA4B,CAAC;AAEzD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEnE"}
@@ -110,5 +110,8 @@ export class NimbusSessionPinError extends NimbusAuthError {
110
110
  this.attempted = attempted;
111
111
  }
112
112
  }
113
- /** Regex used to validate the `tn` and `sub` shape (per Mossaic §7.1). */
113
+ /** Compact identifier rule for tenants, subjects, session pins, and SDK sandbox IDs. */
114
114
  export const ID_COMPONENT_RE = /^[A-Za-z0-9._-]{1,128}$/;
115
+ export function isNimbusIdComponent(value) {
116
+ return typeof value === 'string' && ID_COMPONENT_RE.test(value);
117
+ }
@@ -8,9 +8,9 @@
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
- * Generated at: 2026-06-02T20:52:06.468Z
12
- * Size: 492.0 KiB
11
+ * Generated at: 2026-06-04T22:29:13.356Z
12
+ * Size: 465.8 KiB
13
13
  */
14
14
  export declare const GIT_BUNDLE_CODE: string;
15
- export declare const GIT_BUNDLE_SIZE = 503839;
15
+ export declare const GIT_BUNDLE_SIZE = 476954;
16
16
  //# 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;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,eAAe,EAAE,MAAi4/f,CAAC;AAEh6/f,eAAO,MAAM,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"git-bundle.generated.d.ts","sourceRoot":"","sources":["../src/git-bundle.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,eAAe,EAAE,MAA8jre,CAAC;AAE7lre,eAAO,MAAM,eAAe,SAAS,CAAC"}