@rivetkit/rivetkit-napi 0.0.0-2-3-0-rc-rollback.f0e199e → 0.0.0-claude-edge-bundle-slim.fb63356

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/index.d.ts CHANGED
@@ -47,6 +47,26 @@ export interface JsQueueSendResult {
47
47
  export interface JsActionDefinition {
48
48
  name: string
49
49
  }
50
+ /**
51
+ * One entry in the actor's `inspector.tabs[]` declaration. Either a
52
+ * custom-tab descriptor (id + label + source dir) or a built-in modifier
53
+ * (id + hidden=true). Validation already happened on the TS side; the
54
+ * runtime just splits the discriminator.
55
+ */
56
+ export interface JsInspectorTabEntry {
57
+ id: string
58
+ /** Required for custom entries; omitted for HideBuiltin. */
59
+ label?: string
60
+ /** Required for custom entries — absolute path to the source directory. */
61
+ source?: string
62
+ /**
63
+ * Optional icon id for custom entries. Dashboard maps strings to
64
+ * glyphs; unknown ids fall back to a generic icon.
65
+ */
66
+ icon?: string
67
+ /** Set to true for HideBuiltin entries. */
68
+ hidden?: boolean
69
+ }
50
70
  export interface JsActorConfig {
51
71
  name?: string
52
72
  icon?: string
@@ -78,6 +98,7 @@ export interface JsActorConfig {
78
98
  preloadMaxWorkflowBytes?: number
79
99
  preloadMaxConnectionsBytes?: number
80
100
  actions?: Array<JsActionDefinition>
101
+ inspectorTabs?: Array<JsInspectorTabEntry>
81
102
  }
82
103
  export interface JsBindParam {
83
104
  kind: string
@@ -155,6 +176,8 @@ export interface JsServeConfig {
155
176
  namespace: string
156
177
  poolName: string
157
178
  engineBinaryPath?: string
179
+ engineHost?: string
180
+ enginePort?: number
158
181
  handleInspectorHttpInRuntime?: boolean
159
182
  serverlessBasePath?: string
160
183
  serverlessPackageVersion: string
@@ -164,6 +187,16 @@ export interface JsServeConfig {
164
187
  serverlessValidateEndpoint: boolean
165
188
  serverlessMaxStartPayloadBytes: number
166
189
  }
190
+ export interface JsListenerConfig {
191
+ /** Host to bind. Defaults to `0.0.0.0` when not provided. */
192
+ host?: string
193
+ port: number
194
+ /**
195
+ * Optional static file root mounted as a fallback below the framework
196
+ * routes.
197
+ */
198
+ publicDir?: string
199
+ }
167
200
  export interface JsServerlessRequest {
168
201
  method: string
169
202
  url: string
@@ -174,24 +207,16 @@ export interface JsServerlessResponseHead {
174
207
  status: number
175
208
  headers: Record<string, string>
176
209
  }
177
- export interface JsRegistryDiagnostics {
178
- mode: string
179
- envoyActiveActorCount?: number
210
+ export interface JsRegistryRouteResponse {
211
+ status: number
212
+ headers: Record<string, string>
213
+ body: Buffer
180
214
  }
181
215
  export interface JsServerlessStreamError {
182
216
  group: string
183
217
  code: string
184
218
  message: string
185
219
  }
186
- export declare function jsSetEventloopLagQuantile(quantile: string, seconds: number): void
187
- export declare function jsSetEventloopUtilization(value: number): void
188
- export declare function jsSetEventloopHeartbeatTsMs(epochMs: number): void
189
- export declare function jsAddProcessCpuSeconds(mode: string, seconds: number): void
190
- export declare function jsSetProcessResidentMemoryBytes(bytes: number): void
191
- export declare function jsSetHeapBytes(state: string, bytes: number): void
192
- export declare function jsObserveGcDuration(kind: string, seconds: number): void
193
- export declare function jsSetActiveHandles(count: number): void
194
- export declare function jsSetActiveRequests(count: number): void
195
220
  /** Options for KV list operations. */
196
221
  export interface JsKvListOptions {
197
222
  reverse?: boolean
@@ -250,6 +275,7 @@ export declare class ActorContext {
250
275
  broadcast(name: string, args: Buffer): void
251
276
  waitUntil(promise: Promise<any>): void
252
277
  waitForTrackedShutdownWork(): Promise<boolean>
278
+ waitForTrackedShutdownWorkUnbounded(): Promise<void>
253
279
  registerTask(promise: Promise<any>): void
254
280
  runtimeState(): object
255
281
  clearRuntimeState(): void
@@ -297,7 +323,7 @@ export declare class Queue {
297
323
  next(options?: JsQueueNextOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage | null>
298
324
  nextBatch(options?: JsQueueNextBatchOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Array<QueueMessage>>
299
325
  waitForNames(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage>
300
- waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null): Promise<void>
326
+ waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<void>
301
327
  enqueueAndWait(name: string, body: Buffer, options?: JsQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Buffer | null>
302
328
  tryNext(options?: JsQueueTryNextOptions | undefined | null): QueueMessage | null
303
329
  tryNextBatch(options?: JsQueueTryNextBatchOptions | undefined | null): Array<QueueMessage>
@@ -325,7 +351,10 @@ export declare class CoreRegistry {
325
351
  */
326
352
  shutdown(): Promise<void>
327
353
  actorStopThresholdMs(): Promise<number | null>
328
- diagnostics(): Promise<JsRegistryDiagnostics>
354
+ health(): Promise<JsRegistryRouteResponse>
355
+ metadata(): JsRegistryRouteResponse
356
+ metrics(): JsRegistryRouteResponse
357
+ serveListener(listener: JsListenerConfig, config: JsServeConfig): Promise<void>
329
358
  handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
330
359
  }
331
360
  export declare class Schedule {
package/index.js CHANGED
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { ActorContext, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, Kv, Queue, QueueMessage, CoreRegistry, jsSetEventloopLagQuantile, jsSetEventloopUtilization, jsSetEventloopHeartbeatTsMs, jsAddProcessCpuSeconds, jsSetProcessResidentMemoryBytes, jsSetHeapBytes, jsObserveGcDuration, jsSetActiveHandles, jsSetActiveRequests, Schedule, WebSocket } = nativeBinding
313
+ const { ActorContext, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
314
314
 
315
315
  module.exports.ActorContext = ActorContext
316
316
  module.exports.NapiActorFactory = NapiActorFactory
@@ -321,14 +321,5 @@ module.exports.Kv = Kv
321
321
  module.exports.Queue = Queue
322
322
  module.exports.QueueMessage = QueueMessage
323
323
  module.exports.CoreRegistry = CoreRegistry
324
- module.exports.jsSetEventloopLagQuantile = jsSetEventloopLagQuantile
325
- module.exports.jsSetEventloopUtilization = jsSetEventloopUtilization
326
- module.exports.jsSetEventloopHeartbeatTsMs = jsSetEventloopHeartbeatTsMs
327
- module.exports.jsAddProcessCpuSeconds = jsAddProcessCpuSeconds
328
- module.exports.jsSetProcessResidentMemoryBytes = jsSetProcessResidentMemoryBytes
329
- module.exports.jsSetHeapBytes = jsSetHeapBytes
330
- module.exports.jsObserveGcDuration = jsObserveGcDuration
331
- module.exports.jsSetActiveHandles = jsSetActiveHandles
332
- module.exports.jsSetActiveRequests = jsSetActiveRequests
333
324
  module.exports.Schedule = Schedule
334
325
  module.exports.WebSocket = WebSocket
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-napi",
3
- "version": "0.0.0-2-3-0-rc-rollback.f0e199e",
3
+ "version": "0.0.0-claude-edge-bundle-slim.fb63356",
4
4
  "description": "Native N-API addon for RivetKit providing envoy client and SQLite access",
5
5
  "license": "Apache-2.0",
6
6
  "main": "index.js",
@@ -39,19 +39,19 @@
39
39
  "build": "node scripts/build.mjs",
40
40
  "build:release": "node scripts/build.mjs --release",
41
41
  "build:force": "node scripts/build.mjs --force",
42
- "build:force:release": "node scripts/build.mjs --force --release"
42
+ "build:force:release": "node scripts/build.mjs --force --release",
43
+ "build:embed": "node scripts/build.mjs"
43
44
  },
44
45
  "dependencies": {
45
46
  "@napi-rs/cli": "^2.18.4",
46
- "@rivetkit/engine-envoy-protocol": "0.0.0-2-3-0-rc-rollback.f0e199e"
47
+ "@rivetkit/engine-envoy-protocol": "0.0.0-claude-edge-bundle-slim.fb63356"
47
48
  },
48
49
  "optionalDependencies": {
49
- "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-2-3-0-rc-rollback.f0e199e",
50
- "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-2-3-0-rc-rollback.f0e199e",
51
- "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-2-3-0-rc-rollback.f0e199e",
52
- "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-2-3-0-rc-rollback.f0e199e",
53
- "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-2-3-0-rc-rollback.f0e199e",
54
- "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-2-3-0-rc-rollback.f0e199e",
55
- "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-2-3-0-rc-rollback.f0e199e"
50
+ "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-claude-edge-bundle-slim.fb63356",
51
+ "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-claude-edge-bundle-slim.fb63356",
52
+ "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-claude-edge-bundle-slim.fb63356",
53
+ "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-claude-edge-bundle-slim.fb63356",
54
+ "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-claude-edge-bundle-slim.fb63356",
55
+ "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-claude-edge-bundle-slim.fb63356"
56
56
  }
57
57
  }
package/scripts/build.mjs CHANGED
@@ -16,6 +16,14 @@ if (process.env.SKIP_NAPI_BUILD === "1") {
16
16
  process.exit(0);
17
17
  }
18
18
 
19
+ // The per-actor inspector UI (frontend/dist/inspector-ui, embedded into
20
+ // rivetkit-core by its build.rs) must be built before this napi build runs.
21
+ // It is NOT built here: rivetkit-core's embed needs rivetkit/inspector-tab,
22
+ // which is downstream of this package in the build graph, so building it from
23
+ // the napi build would invert the dependency order. CI builds it via
24
+ // `turbo build:inspector-ui` in docker/build/*.Dockerfile before `napi build`;
25
+ // for local builds run `pnpm -F @rivetkit/engine-frontend build:inspector-ui`
26
+ // (or `turbo build:inspector-ui`) first.
19
27
  const cmd = ["build", "--platform", ...extraFlags];
20
28
  console.log(`[rivetkit-napi/build] running: napi ${cmd.join(" ")}`);
21
29
  execFileSync("napi", cmd, { stdio: "inherit" });