@rivetkit/rivetkit-napi 0.0.0-counter-latency-current-actor-metrics.6d50b18 → 0.0.0-feat-dylib-actor-plugin.5d959bc

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.
Files changed (2) hide show
  1. package/index.d.ts +39 -1
  2. package/package.json +9 -9
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,13 @@ export interface JsActorConfig {
78
98
  preloadMaxWorkflowBytes?: number
79
99
  preloadMaxConnectionsBytes?: number
80
100
  actions?: Array<JsActionDefinition>
101
+ inspectorTabs?: Array<JsInspectorTabEntry>
102
+ }
103
+ /** Options for loading a native actor plugin (`cdylib`) by path. */
104
+ export interface NapiNativePluginOptions {
105
+ pluginPath: string
106
+ configJson?: string
107
+ sidecarPath?: string
81
108
  }
82
109
  export interface JsBindParam {
83
110
  kind: string
@@ -155,6 +182,8 @@ export interface JsServeConfig {
155
182
  namespace: string
156
183
  poolName: string
157
184
  engineBinaryPath?: string
185
+ engineHost?: string
186
+ enginePort?: number
158
187
  handleInspectorHttpInRuntime?: boolean
159
188
  serverlessBasePath?: string
160
189
  serverlessPackageVersion: string
@@ -242,12 +271,20 @@ export declare class ActorContext {
242
271
  broadcast(name: string, args: Buffer): void
243
272
  waitUntil(promise: Promise<any>): void
244
273
  waitForTrackedShutdownWork(): Promise<boolean>
274
+ waitForTrackedShutdownWorkUnbounded(): Promise<void>
245
275
  registerTask(promise: Promise<any>): void
246
276
  runtimeState(): object
247
277
  clearRuntimeState(): void
248
278
  }
249
279
  export declare class NapiActorFactory {
250
280
  constructor(callbacks: object, config?: JsActorConfig | undefined | null)
281
+ /**
282
+ * Static constructor that loads a native actor plugin (`cdylib`) by path and
283
+ * adapts it through the generic `rivet-actor-plugin-abi`. RivetKit holds no
284
+ * plugin-specific knowledge: `config_json` is an opaque envelope the plugin
285
+ * parses itself, and `sidecar_path` is forwarded verbatim.
286
+ */
287
+ static fromNativePlugin(options: NapiNativePluginOptions): NapiActorFactory
251
288
  }
252
289
  export declare class CancellationToken {
253
290
  constructor()
@@ -289,7 +326,7 @@ export declare class Queue {
289
326
  next(options?: JsQueueNextOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage | null>
290
327
  nextBatch(options?: JsQueueNextBatchOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Array<QueueMessage>>
291
328
  waitForNames(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage>
292
- waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null): Promise<void>
329
+ waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<void>
293
330
  enqueueAndWait(name: string, body: Buffer, options?: JsQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Buffer | null>
294
331
  tryNext(options?: JsQueueTryNextOptions | undefined | null): QueueMessage | null
295
332
  tryNextBatch(options?: JsQueueTryNextBatchOptions | undefined | null): Array<QueueMessage>
@@ -316,6 +353,7 @@ export declare class CoreRegistry {
316
353
  * separately to avoid re-entrancy.
317
354
  */
318
355
  shutdown(): Promise<void>
356
+ actorStopThresholdMs(): Promise<number | null>
319
357
  health(): Promise<JsRegistryRouteResponse>
320
358
  metadata(): JsRegistryRouteResponse
321
359
  metrics(): JsRegistryRouteResponse
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-napi",
3
- "version": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
3
+ "version": "0.0.0-feat-dylib-actor-plugin.5d959bc",
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",
@@ -43,15 +43,15 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@napi-rs/cli": "^2.18.4",
46
- "@rivetkit/engine-envoy-protocol": "0.0.0-counter-latency-current-actor-metrics.6d50b18"
46
+ "@rivetkit/engine-envoy-protocol": "0.0.0-feat-dylib-actor-plugin.5d959bc"
47
47
  },
48
48
  "optionalDependencies": {
49
- "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
50
- "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
51
- "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
52
- "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
53
- "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
54
- "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-counter-latency-current-actor-metrics.6d50b18",
55
- "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-counter-latency-current-actor-metrics.6d50b18"
49
+ "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-feat-dylib-actor-plugin.5d959bc",
50
+ "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-feat-dylib-actor-plugin.5d959bc",
51
+ "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-feat-dylib-actor-plugin.5d959bc",
52
+ "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-feat-dylib-actor-plugin.5d959bc",
53
+ "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-feat-dylib-actor-plugin.5d959bc",
54
+ "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-feat-dylib-actor-plugin.5d959bc",
55
+ "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-feat-dylib-actor-plugin.5d959bc"
56
56
  }
57
57
  }