@rivetkit/rivetkit-napi 0.0.0-pr.4722.75d4644 → 0.0.0-pr.4727.e649173

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 +17 -0
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -44,9 +44,14 @@ export interface JsQueueSendResult {
44
44
  status: string
45
45
  response?: Buffer
46
46
  }
47
+ export interface JsActionDefinition {
48
+ name: string
49
+ }
47
50
  export interface JsActorConfig {
48
51
  name?: string
49
52
  icon?: string
53
+ hasDatabase?: boolean
54
+ hasState?: boolean
50
55
  canHibernateWebsocket?: boolean
51
56
  stateSaveIntervalMs?: number
52
57
  createStateTimeoutMs?: number
@@ -72,6 +77,7 @@ export interface JsActorConfig {
72
77
  maxOutgoingMessageSize?: number
73
78
  preloadMaxWorkflowBytes?: number
74
79
  preloadMaxConnectionsBytes?: number
80
+ actions?: Array<JsActionDefinition>
75
81
  }
76
82
  export interface JsBindParam {
77
83
  kind: string
@@ -122,6 +128,15 @@ export interface JsQueueTryNextBatchOptions {
122
128
  count?: number
123
129
  completable?: boolean
124
130
  }
131
+ export interface JsQueueInspectMessage {
132
+ /**
133
+ * Queue message id. Stored as the raw u64 reinterpreted as i64 so JS
134
+ * sees a plain number; ids are monotonic and fit comfortably in i64.
135
+ */
136
+ id: number
137
+ name: string
138
+ createdAtMs: number
139
+ }
125
140
  export interface JsServeConfig {
126
141
  version: number
127
142
  endpoint: string
@@ -260,6 +275,8 @@ export declare class Queue {
260
275
  enqueueAndWait(name: string, body: Buffer, options?: JsQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Buffer | null>
261
276
  tryNext(options?: JsQueueTryNextOptions | undefined | null): QueueMessage | null
262
277
  tryNextBatch(options?: JsQueueTryNextBatchOptions | undefined | null): Array<QueueMessage>
278
+ maxSize(): number
279
+ inspectMessages(): Promise<Array<JsQueueInspectMessage>>
263
280
  }
264
281
  export declare class QueueMessage {
265
282
  id(): bigint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-napi",
3
- "version": "0.0.0-pr.4722.75d4644",
3
+ "version": "0.0.0-pr.4727.e649173",
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-pr.4722.75d4644"
46
+ "@rivetkit/engine-envoy-protocol": "0.0.0-pr.4727.e649173"
47
47
  },
48
48
  "optionalDependencies": {
49
- "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-pr.4722.75d4644",
50
- "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-pr.4722.75d4644",
51
- "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-pr.4722.75d4644",
52
- "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-pr.4722.75d4644",
53
- "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-pr.4722.75d4644",
54
- "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-pr.4722.75d4644",
55
- "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-pr.4722.75d4644"
49
+ "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-pr.4727.e649173",
50
+ "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-pr.4727.e649173",
51
+ "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-pr.4727.e649173",
52
+ "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-pr.4727.e649173",
53
+ "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-pr.4727.e649173",
54
+ "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-pr.4727.e649173",
55
+ "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-pr.4727.e649173"
56
56
  }
57
57
  }