@nimbus-sh/worker 0.1.1 → 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 +38 -3
- package/dist/_shared/session-id.d.ts +10 -8
- package/dist/_shared/session-id.d.ts.map +1 -1
- package/dist/_shared/session-id.js +13 -12
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.ts +2 -1
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js +4 -1
- package/dist/git-bundle.generated.d.ts +3 -3
- package/dist/git-bundle.generated.d.ts.map +1 -1
- package/dist/git-bundle.generated.js +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/loaders/generated-workers.d.ts +3 -3
- package/dist/loaders/generated-workers.d.ts.map +1 -1
- package/dist/loaders/generated-workers.js +7 -7
- package/dist/router/index.d.ts +6 -2
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/index.js +4 -0
- package/dist/router/remote-api.d.ts +44 -0
- package/dist/router/remote-api.d.ts.map +1 -0
- package/dist/router/remote-api.js +333 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
CirrusHmrRPC,
|
|
33
33
|
createNimbusHandler,
|
|
34
34
|
} from '@nimbus-sh/sdk/worker';
|
|
35
|
+
import { defineNimbusConfig } from '@nimbus-sh/config';
|
|
35
36
|
|
|
36
37
|
// Re-export the DO + every RPC class so wrangler's `class_name` lookup +
|
|
37
38
|
// `enable_ctx_exports` find them in your Worker's main-module exports.
|
|
@@ -47,7 +48,22 @@ export {
|
|
|
47
48
|
CirrusHmrRPC,
|
|
48
49
|
};
|
|
49
50
|
|
|
50
|
-
|
|
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
|
+
});
|
|
51
67
|
```
|
|
52
68
|
|
|
53
69
|
`wrangler.jsonc` (use `@nimbus-sh/config` to generate, or adapt
|
|
@@ -63,7 +79,7 @@ export default createNimbusHandler();
|
|
|
63
79
|
"assets": {
|
|
64
80
|
"directory": "node_modules/@nimbus-sh/worker/public",
|
|
65
81
|
"binding": "ASSETS",
|
|
66
|
-
"run_worker_first": ["/s/*", "/new"]
|
|
82
|
+
"run_worker_first": ["/api/*", "/s/*", "/new"]
|
|
67
83
|
},
|
|
68
84
|
"alias": {
|
|
69
85
|
"@lifo-sh/ui": "./node_modules/@nimbus-sh/worker/dist/stubs/lifo-ui.js",
|
|
@@ -117,6 +133,10 @@ possession instead.
|
|
|
117
133
|
onSessionEnd?: (ctx) => void | Promise<void>; // reserved v0.2
|
|
118
134
|
};
|
|
119
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
|
+
};
|
|
120
140
|
}
|
|
121
141
|
```
|
|
122
142
|
|
|
@@ -144,7 +164,7 @@ export default createNimbusHandler({
|
|
|
144
164
|
Programmatic sandbox route:
|
|
145
165
|
|
|
146
166
|
```ts
|
|
147
|
-
import { Nimbus } from '@nimbus-sh/sdk
|
|
167
|
+
import { Nimbus } from '@nimbus-sh/sdk';
|
|
148
168
|
|
|
149
169
|
export default createNimbusHandler({
|
|
150
170
|
routes: async (req, env) => {
|
|
@@ -171,6 +191,21 @@ export default createNimbusHandler({
|
|
|
171
191
|
});
|
|
172
192
|
```
|
|
173
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
|
+
|
|
174
209
|
For long-running app servers, start an explicit long-running process and
|
|
175
210
|
expose the virtual port:
|
|
176
211
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* session-id.ts — Friendly human-readable session identifiers.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
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
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
|
-
/**
|
|
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.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
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
|
-
|
|
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
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -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
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -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"}
|
package/dist/auth/index.js
CHANGED
|
@@ -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';
|
package/dist/auth/types.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
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
|
package/dist/auth/types.d.ts.map
CHANGED
|
@@ -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,EAAE,iBAAiB,CAAC;IAC1B,8EAA8E;IAC9E,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,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I7D;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"}
|
package/dist/auth/types.js
CHANGED
|
@@ -110,5 +110,8 @@ export class NimbusSessionPinError extends NimbusAuthError {
|
|
|
110
110
|
this.attempted = attempted;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
/**
|
|
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-
|
|
12
|
-
* Size:
|
|
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 =
|
|
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,
|
|
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"}
|