blazen 0.6.2 → 0.6.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/blazen.workers.js +5 -0
- package/index.d.ts +14 -0
- package/package.json +8 -8
package/blazen.workers.js
CHANGED
|
@@ -55,6 +55,11 @@ const __wasi = new __WASI({ version: 'preview1' })
|
|
|
55
55
|
const __emnapiContext = __emnapiGetDefaultContext()
|
|
56
56
|
|
|
57
57
|
const __sharedMemory = new WebAssembly.Memory({
|
|
58
|
+
// 256 pages * 64 KiB = 16 MiB initial (grows on demand up to `maximum`).
|
|
59
|
+
// napi-rs's default is 4000 pages (~250 MiB), which exceeds a Cloudflare
|
|
60
|
+
// Workers isolate's 128 MiB cap and fails to instantiate (RangeError CF
|
|
61
|
+
// 10021). Keep this in lockstep with napi.wasm.initialMemory in package.json
|
|
62
|
+
// (which controls the napi-generated blazen.wasi*.{cjs,js}).
|
|
58
63
|
initial: 256,
|
|
59
64
|
maximum: 65536,
|
|
60
65
|
shared: true,
|
package/index.d.ts
CHANGED
|
@@ -110,6 +110,14 @@ export declare class AssignmentContext {
|
|
|
110
110
|
* string, number, boolean, null).
|
|
111
111
|
*/
|
|
112
112
|
emitEvent(eventType: string, data: any): Promise<void>
|
|
113
|
+
/**
|
|
114
|
+
* Request input from the orchestrator and await the response.
|
|
115
|
+
*
|
|
116
|
+
* `prompt` is shown to the responder; `metadata` is an arbitrary
|
|
117
|
+
* JSON-serializable payload. `timeoutMs`, when set, bounds the wait.
|
|
118
|
+
* Resolves with the JSON response value.
|
|
119
|
+
*/
|
|
120
|
+
requestInput(prompt: string, metadata: any, timeoutMs?: bigint | undefined | null): Promise<any>
|
|
113
121
|
}
|
|
114
122
|
export type JsAssignmentContext = AssignmentContext
|
|
115
123
|
|
|
@@ -1129,6 +1137,8 @@ export declare class ControlPlaneClient {
|
|
|
1129
1137
|
* away; otherwise let in-flight runs finish first.
|
|
1130
1138
|
*/
|
|
1131
1139
|
drainWorker(nodeId: string, immediate: boolean): Promise<void>
|
|
1140
|
+
/** Respond to a pending input request raised by a worker for a run. */
|
|
1141
|
+
respondToInput(runId: string, requestId: string, response: any): Promise<void>
|
|
1132
1142
|
/**
|
|
1133
1143
|
* Subscribe to events for a specific run. The returned stream is
|
|
1134
1144
|
* a JS `AsyncIterableIterator<RunEvent>` (object with both `next`
|
|
@@ -1210,6 +1220,8 @@ export declare class ControlPlaneWorkerConfig {
|
|
|
1210
1220
|
* predicates.
|
|
1211
1221
|
*/
|
|
1212
1222
|
withTag(key: string, value: string): this
|
|
1223
|
+
/** Attach a bearer token sent on the worker handshake. */
|
|
1224
|
+
withBearerToken(token: string): this
|
|
1213
1225
|
/** Override the admission mode declared at handshake. */
|
|
1214
1226
|
withAdmission(mode: JsAdmissionMode): this
|
|
1215
1227
|
/** Override the heartbeat cadence (milliseconds). */
|
|
@@ -8246,6 +8258,8 @@ export interface JsCitation {
|
|
|
8246
8258
|
export interface JsClientConnectOptions {
|
|
8247
8259
|
/** mTLS configuration. `None` = plaintext. */
|
|
8248
8260
|
mtls?: JsMtlsOptions
|
|
8261
|
+
/** Bearer token attached to control-plane requests. `None` = anonymous. */
|
|
8262
|
+
bearerToken?: string
|
|
8249
8263
|
}
|
|
8250
8264
|
|
|
8251
8265
|
export interface JsComputeRequest {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blazen",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
4
4
|
"description": "Blazen - Event-driven AI workflow framework for Node.js/TypeScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
"verbose": true
|
|
91
91
|
},
|
|
92
92
|
"optionalDependencies": {
|
|
93
|
-
"@blazen-dev/blazen-linux-x64-gnu": "0.6.
|
|
94
|
-
"@blazen-dev/blazen-linux-x64-musl": "0.6.
|
|
95
|
-
"@blazen-dev/blazen-linux-arm64-gnu": "0.6.
|
|
96
|
-
"@blazen-dev/blazen-linux-arm64-musl": "0.6.
|
|
97
|
-
"@blazen-dev/blazen-darwin-arm64": "0.6.
|
|
98
|
-
"@blazen-dev/blazen-win32-x64-msvc": "0.6.
|
|
99
|
-
"@blazen-dev/blazen-wasm32-wasi": "0.6.
|
|
93
|
+
"@blazen-dev/blazen-linux-x64-gnu": "0.6.3",
|
|
94
|
+
"@blazen-dev/blazen-linux-x64-musl": "0.6.3",
|
|
95
|
+
"@blazen-dev/blazen-linux-arm64-gnu": "0.6.3",
|
|
96
|
+
"@blazen-dev/blazen-linux-arm64-musl": "0.6.3",
|
|
97
|
+
"@blazen-dev/blazen-darwin-arm64": "0.6.3",
|
|
98
|
+
"@blazen-dev/blazen-win32-x64-msvc": "0.6.3",
|
|
99
|
+
"@blazen-dev/blazen-wasm32-wasi": "0.6.3"
|
|
100
100
|
},
|
|
101
101
|
"scripts": {
|
|
102
102
|
"build": "napi build --release --platform --features local-all,langfuse --js index.js && node scripts/post-build.mjs",
|