bitfab 0.54.11 → 0.54.12
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/dist/{chunk-2C7M3Y3H.js → chunk-RDSNJFWY.js} +3 -3
- package/dist/{chunk-RUBVHBIK.js → chunk-VTFBDA3O.js} +2 -2
- package/dist/{chunk-RUBVHBIK.js.map → chunk-VTFBDA3O.js.map} +1 -1
- package/dist/{chunk-FMUJONTQ.js → chunk-WKXLCFLT.js} +2 -2
- package/dist/{chunk-FMUJONTQ.js.map → chunk-WKXLCFLT.js.map} +1 -1
- package/dist/{chunk-MEJOPEKV.js → chunk-YY5BB2YS.js} +60 -16
- package/dist/chunk-YY5BB2YS.js.map +1 -0
- package/dist/{chunk-G4LWALQ7.js → chunk-ZR4HGK6G.js} +2 -2
- package/dist/{http-AXPT27DO.js → http-NWSSB5FA.js} +2 -2
- package/dist/{http-JQN2LHHF.js → http-RJH6VYAM.js} +2 -2
- package/dist/index.cjs +55 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +3 -3
- package/dist/node.cjs +55 -11
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +3 -3
- package/dist/{replay-DOG4KV7I.js → replay-WB5NQNQS.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-MEJOPEKV.js.map +0 -1
- /package/dist/{chunk-2C7M3Y3H.js.map → chunk-RDSNJFWY.js.map} +0 -0
- /package/dist/{chunk-G4LWALQ7.js.map → chunk-ZR4HGK6G.js.map} +0 -0
- /package/dist/{http-AXPT27DO.js.map → http-NWSSB5FA.js.map} +0 -0
- /package/dist/{http-JQN2LHHF.js.map → http-RJH6VYAM.js.map} +0 -0
- /package/dist/{replay-DOG4KV7I.js.map → replay-WB5NQNQS.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -2214,18 +2214,18 @@ declare const RIVET_GROUP_EFFECT_METHODS: {
|
|
|
2214
2214
|
readonly queue: readonly ["send", "next", "nextBatch", "waitForNames", "waitForAvailable", "complete", "enqueueAndWait", "tryNext", "tryNextBatch"];
|
|
2215
2215
|
readonly run: readonly ["setWakeAt"];
|
|
2216
2216
|
};
|
|
2217
|
-
declare const RIVET_TOP_LEVEL_EFFECTS: readonly ["broadcast", "saveState", "sleep", "destroy"];
|
|
2217
|
+
declare const RIVET_TOP_LEVEL_EFFECTS: readonly ["broadcast", "saveState", "sleep", "destroy", "step", "tryStep", "try", "loop", "sleepUntil", "rollbackCheckpoint", "join", "race", "removed", "getVersion"];
|
|
2218
2218
|
type RivetGroup = keyof typeof RIVET_GROUP_EFFECT_METHODS;
|
|
2219
2219
|
type RivetGroupEffectType = {
|
|
2220
2220
|
[TGroup in RivetGroup]: `${TGroup}.${(typeof RIVET_GROUP_EFFECT_METHODS)[TGroup][number]}`;
|
|
2221
2221
|
}[RivetGroup];
|
|
2222
|
-
/**
|
|
2222
|
+
/** Rivet context operations supported as replay effects. */
|
|
2223
2223
|
type RivetEffectType = RivetGroupEffectType | (typeof RIVET_TOP_LEVEL_EFFECTS)[number] | "db.transaction.execute" | "queue.message.complete";
|
|
2224
2224
|
/** Configuration for {@link BitfabRivetIntegration}. */
|
|
2225
2225
|
interface RivetIntegrationOptions {
|
|
2226
2226
|
/**
|
|
2227
2227
|
* Context operations whose recorded outputs replay should serve instead of
|
|
2228
|
-
* executing against a live actor. Nothing is marked by default.
|
|
2228
|
+
* executing against a live actor or workflow. Nothing is marked by default.
|
|
2229
2229
|
*/
|
|
2230
2230
|
mockOnReplay?: readonly RivetEffectType[];
|
|
2231
2231
|
}
|
|
@@ -2246,8 +2246,8 @@ interface RivetIntegrationRuntime {
|
|
|
2246
2246
|
recordRootFixture(context: Record<string, unknown>, recordedRoots: Set<string>): void;
|
|
2247
2247
|
}
|
|
2248
2248
|
/**
|
|
2249
|
-
* Binds a live Rivet actor context to an existing traced function
|
|
2250
|
-
* replay-aware proxies for supported context operations.
|
|
2249
|
+
* Binds a live Rivet actor or workflow context to an existing traced function
|
|
2250
|
+
* and exposes replay-aware proxies for supported context operations.
|
|
2251
2251
|
*
|
|
2252
2252
|
* The integration never creates a trace root. Use it with the same
|
|
2253
2253
|
* `BitfabFunction` handle whose `withTrace()` wrapper is the production and
|
|
@@ -2267,13 +2267,15 @@ declare class BitfabRivetIntegration<TContext extends object = RivetContextLike>
|
|
|
2267
2267
|
withContext<TReturn>(context: TContext, fn: () => TReturn): TReturn;
|
|
2268
2268
|
/**
|
|
2269
2269
|
* Adapt a traced function into a Rivet handler whose first argument is the
|
|
2270
|
-
* live actor context. The context is not added to the traced
|
|
2270
|
+
* live actor or workflow context. The context is not added to the traced
|
|
2271
|
+
* root's inputs.
|
|
2271
2272
|
*/
|
|
2272
2273
|
bind<This, TArgs extends unknown[], TReturn>(fn: (this: This, ...args: TArgs) => TReturn): (this: This, context: TContext, ...args: TArgs) => TReturn;
|
|
2273
2274
|
/**
|
|
2274
2275
|
* Return the current Rivet context proxy. In production it delegates to the
|
|
2275
2276
|
* bound live context. During replay it hydrates recorded actor state and
|
|
2276
|
-
* intercepts supported effects without requiring a live Rivet actor
|
|
2277
|
+
* intercepts supported effects without requiring a live Rivet actor or
|
|
2278
|
+
* workflow.
|
|
2277
2279
|
*/
|
|
2278
2280
|
getContext(): TContext;
|
|
2279
2281
|
private createContextProxy;
|
|
@@ -3123,9 +3125,9 @@ declare class Bitfab {
|
|
|
3123
3125
|
*/
|
|
3124
3126
|
getLangGraphIntegration(traceFunctionKey: string, options?: LangGraphIntegrationOptions): BitfabLangGraphIntegration;
|
|
3125
3127
|
/**
|
|
3126
|
-
* Get the first-class Rivet actor-context integration for an
|
|
3127
|
-
* root. The integration binds context and records effect
|
|
3128
|
-
* creates another root.
|
|
3128
|
+
* Get the first-class Rivet actor/workflow-context integration for an
|
|
3129
|
+
* existing trace root. The integration binds context and records effect
|
|
3130
|
+
* spans; it never creates another root.
|
|
3129
3131
|
*
|
|
3130
3132
|
* @param traceFunctionKey - Key used by the enclosing `withTrace()` root
|
|
3131
3133
|
* @param options - Explicit per-context-path replay mocking policy
|
|
@@ -3602,7 +3604,7 @@ interface CommitRef {
|
|
|
3602
3604
|
/**
|
|
3603
3605
|
* SDK version from package.json (injected at build time)
|
|
3604
3606
|
*/
|
|
3605
|
-
declare const __version__ = "0.54.
|
|
3607
|
+
declare const __version__ = "0.54.12";
|
|
3606
3608
|
|
|
3607
3609
|
/**
|
|
3608
3610
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -2214,18 +2214,18 @@ declare const RIVET_GROUP_EFFECT_METHODS: {
|
|
|
2214
2214
|
readonly queue: readonly ["send", "next", "nextBatch", "waitForNames", "waitForAvailable", "complete", "enqueueAndWait", "tryNext", "tryNextBatch"];
|
|
2215
2215
|
readonly run: readonly ["setWakeAt"];
|
|
2216
2216
|
};
|
|
2217
|
-
declare const RIVET_TOP_LEVEL_EFFECTS: readonly ["broadcast", "saveState", "sleep", "destroy"];
|
|
2217
|
+
declare const RIVET_TOP_LEVEL_EFFECTS: readonly ["broadcast", "saveState", "sleep", "destroy", "step", "tryStep", "try", "loop", "sleepUntil", "rollbackCheckpoint", "join", "race", "removed", "getVersion"];
|
|
2218
2218
|
type RivetGroup = keyof typeof RIVET_GROUP_EFFECT_METHODS;
|
|
2219
2219
|
type RivetGroupEffectType = {
|
|
2220
2220
|
[TGroup in RivetGroup]: `${TGroup}.${(typeof RIVET_GROUP_EFFECT_METHODS)[TGroup][number]}`;
|
|
2221
2221
|
}[RivetGroup];
|
|
2222
|
-
/**
|
|
2222
|
+
/** Rivet context operations supported as replay effects. */
|
|
2223
2223
|
type RivetEffectType = RivetGroupEffectType | (typeof RIVET_TOP_LEVEL_EFFECTS)[number] | "db.transaction.execute" | "queue.message.complete";
|
|
2224
2224
|
/** Configuration for {@link BitfabRivetIntegration}. */
|
|
2225
2225
|
interface RivetIntegrationOptions {
|
|
2226
2226
|
/**
|
|
2227
2227
|
* Context operations whose recorded outputs replay should serve instead of
|
|
2228
|
-
* executing against a live actor. Nothing is marked by default.
|
|
2228
|
+
* executing against a live actor or workflow. Nothing is marked by default.
|
|
2229
2229
|
*/
|
|
2230
2230
|
mockOnReplay?: readonly RivetEffectType[];
|
|
2231
2231
|
}
|
|
@@ -2246,8 +2246,8 @@ interface RivetIntegrationRuntime {
|
|
|
2246
2246
|
recordRootFixture(context: Record<string, unknown>, recordedRoots: Set<string>): void;
|
|
2247
2247
|
}
|
|
2248
2248
|
/**
|
|
2249
|
-
* Binds a live Rivet actor context to an existing traced function
|
|
2250
|
-
* replay-aware proxies for supported context operations.
|
|
2249
|
+
* Binds a live Rivet actor or workflow context to an existing traced function
|
|
2250
|
+
* and exposes replay-aware proxies for supported context operations.
|
|
2251
2251
|
*
|
|
2252
2252
|
* The integration never creates a trace root. Use it with the same
|
|
2253
2253
|
* `BitfabFunction` handle whose `withTrace()` wrapper is the production and
|
|
@@ -2267,13 +2267,15 @@ declare class BitfabRivetIntegration<TContext extends object = RivetContextLike>
|
|
|
2267
2267
|
withContext<TReturn>(context: TContext, fn: () => TReturn): TReturn;
|
|
2268
2268
|
/**
|
|
2269
2269
|
* Adapt a traced function into a Rivet handler whose first argument is the
|
|
2270
|
-
* live actor context. The context is not added to the traced
|
|
2270
|
+
* live actor or workflow context. The context is not added to the traced
|
|
2271
|
+
* root's inputs.
|
|
2271
2272
|
*/
|
|
2272
2273
|
bind<This, TArgs extends unknown[], TReturn>(fn: (this: This, ...args: TArgs) => TReturn): (this: This, context: TContext, ...args: TArgs) => TReturn;
|
|
2273
2274
|
/**
|
|
2274
2275
|
* Return the current Rivet context proxy. In production it delegates to the
|
|
2275
2276
|
* bound live context. During replay it hydrates recorded actor state and
|
|
2276
|
-
* intercepts supported effects without requiring a live Rivet actor
|
|
2277
|
+
* intercepts supported effects without requiring a live Rivet actor or
|
|
2278
|
+
* workflow.
|
|
2277
2279
|
*/
|
|
2278
2280
|
getContext(): TContext;
|
|
2279
2281
|
private createContextProxy;
|
|
@@ -3123,9 +3125,9 @@ declare class Bitfab {
|
|
|
3123
3125
|
*/
|
|
3124
3126
|
getLangGraphIntegration(traceFunctionKey: string, options?: LangGraphIntegrationOptions): BitfabLangGraphIntegration;
|
|
3125
3127
|
/**
|
|
3126
|
-
* Get the first-class Rivet actor-context integration for an
|
|
3127
|
-
* root. The integration binds context and records effect
|
|
3128
|
-
* creates another root.
|
|
3128
|
+
* Get the first-class Rivet actor/workflow-context integration for an
|
|
3129
|
+
* existing trace root. The integration binds context and records effect
|
|
3130
|
+
* spans; it never creates another root.
|
|
3129
3131
|
*
|
|
3130
3132
|
* @param traceFunctionKey - Key used by the enclosing `withTrace()` root
|
|
3131
3133
|
* @param options - Explicit per-context-path replay mocking policy
|
|
@@ -3602,7 +3604,7 @@ interface CommitRef {
|
|
|
3602
3604
|
/**
|
|
3603
3605
|
* SDK version from package.json (injected at build time)
|
|
3604
3606
|
*/
|
|
3605
|
-
declare const __version__ = "0.54.
|
|
3607
|
+
declare const __version__ = "0.54.12";
|
|
3606
3608
|
|
|
3607
3609
|
/**
|
|
3608
3610
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getCurrentTrace,
|
|
31
31
|
reseedFromRegistry,
|
|
32
32
|
seedFromRegistry
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-YY5BB2YS.js";
|
|
34
34
|
import "./chunk-EGWJYCNT.js";
|
|
35
35
|
import {
|
|
36
36
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
ReplayError,
|
|
40
40
|
reportReplayProgress,
|
|
41
41
|
serializeReplayResult
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-ZR4HGK6G.js";
|
|
43
43
|
import {
|
|
44
44
|
BitfabError,
|
|
45
45
|
DEFAULT_SERVICE_URL,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
MixedTracingError,
|
|
48
48
|
__version__,
|
|
49
49
|
flushTraces
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WKXLCFLT.js";
|
|
51
51
|
import "./chunk-VCRFFCLY.js";
|
|
52
52
|
export {
|
|
53
53
|
AssertionCategoriesClient,
|
package/dist/node.cjs
CHANGED
|
@@ -97,7 +97,7 @@ var __version__, __packageName__;
|
|
|
97
97
|
var init_version_generated = __esm({
|
|
98
98
|
"src/version.generated.ts"() {
|
|
99
99
|
"use strict";
|
|
100
|
-
__version__ = "0.54.
|
|
100
|
+
__version__ = "0.54.12";
|
|
101
101
|
__packageName__ = "bitfab";
|
|
102
102
|
}
|
|
103
103
|
});
|
|
@@ -7220,18 +7220,42 @@ var RIVET_TOP_LEVEL_EFFECTS = [
|
|
|
7220
7220
|
"broadcast",
|
|
7221
7221
|
"saveState",
|
|
7222
7222
|
"sleep",
|
|
7223
|
-
"destroy"
|
|
7223
|
+
"destroy",
|
|
7224
|
+
"step",
|
|
7225
|
+
"tryStep",
|
|
7226
|
+
"try",
|
|
7227
|
+
"loop",
|
|
7228
|
+
"sleepUntil",
|
|
7229
|
+
"rollbackCheckpoint",
|
|
7230
|
+
"join",
|
|
7231
|
+
"race",
|
|
7232
|
+
"removed",
|
|
7233
|
+
"getVersion"
|
|
7224
7234
|
];
|
|
7225
7235
|
var TOP_LEVEL_UNAVAILABLE_CAPABILITIES = /* @__PURE__ */ new Set([
|
|
7226
7236
|
"conn",
|
|
7227
7237
|
"conns",
|
|
7228
|
-
"log",
|
|
7229
7238
|
"request",
|
|
7230
7239
|
"actorRuntimeSocket",
|
|
7231
7240
|
"keepAwake",
|
|
7232
7241
|
"waitUntil",
|
|
7233
7242
|
"client"
|
|
7234
7243
|
]);
|
|
7244
|
+
var replayLog = () => void 0;
|
|
7245
|
+
var replayLogger = {
|
|
7246
|
+
level: "silent",
|
|
7247
|
+
msgPrefix: void 0,
|
|
7248
|
+
fatal: replayLog,
|
|
7249
|
+
trace: replayLog,
|
|
7250
|
+
silent: replayLog,
|
|
7251
|
+
debug: replayLog,
|
|
7252
|
+
info: replayLog,
|
|
7253
|
+
warn: replayLog,
|
|
7254
|
+
error: replayLog,
|
|
7255
|
+
child: () => replayLogger,
|
|
7256
|
+
bindings: () => ({}),
|
|
7257
|
+
isLevelEnabled: () => false
|
|
7258
|
+
};
|
|
7235
7259
|
var SYNC_VOID_EFFECTS = /* @__PURE__ */ new Set([
|
|
7236
7260
|
"broadcast",
|
|
7237
7261
|
"sleep",
|
|
@@ -7261,16 +7285,28 @@ function snapshotContext(context) {
|
|
|
7261
7285
|
"state",
|
|
7262
7286
|
"vars",
|
|
7263
7287
|
"actorId",
|
|
7288
|
+
"workflowId",
|
|
7264
7289
|
"name",
|
|
7265
7290
|
"key",
|
|
7266
|
-
"region"
|
|
7267
|
-
"aborted"
|
|
7291
|
+
"region"
|
|
7268
7292
|
]) {
|
|
7269
7293
|
const value = readProperty(source, property);
|
|
7270
7294
|
if (value !== void 0) {
|
|
7271
7295
|
snapshot[property] = value;
|
|
7272
7296
|
}
|
|
7273
7297
|
}
|
|
7298
|
+
const aborted = readProperty(source, "aborted");
|
|
7299
|
+
if (typeof aborted === "boolean") {
|
|
7300
|
+
snapshot.aborted = aborted;
|
|
7301
|
+
} else {
|
|
7302
|
+
const abortSignal = readProperty(source, "abortSignal");
|
|
7303
|
+
if (isRecord5(abortSignal)) {
|
|
7304
|
+
const signalAborted = readProperty(abortSignal, "aborted");
|
|
7305
|
+
if (typeof signalAborted === "boolean") {
|
|
7306
|
+
snapshot.aborted = signalAborted;
|
|
7307
|
+
}
|
|
7308
|
+
}
|
|
7309
|
+
}
|
|
7274
7310
|
return snapshot;
|
|
7275
7311
|
}
|
|
7276
7312
|
function unavailableCapability(path) {
|
|
@@ -7362,7 +7398,8 @@ var BitfabRivetIntegration = class {
|
|
|
7362
7398
|
}
|
|
7363
7399
|
/**
|
|
7364
7400
|
* Adapt a traced function into a Rivet handler whose first argument is the
|
|
7365
|
-
* live actor context. The context is not added to the traced
|
|
7401
|
+
* live actor or workflow context. The context is not added to the traced
|
|
7402
|
+
* root's inputs.
|
|
7366
7403
|
*/
|
|
7367
7404
|
bind(fn) {
|
|
7368
7405
|
const integration = this;
|
|
@@ -7373,7 +7410,8 @@ var BitfabRivetIntegration = class {
|
|
|
7373
7410
|
/**
|
|
7374
7411
|
* Return the current Rivet context proxy. In production it delegates to the
|
|
7375
7412
|
* bound live context. During replay it hydrates recorded actor state and
|
|
7376
|
-
* intercepts supported effects without requiring a live Rivet actor
|
|
7413
|
+
* intercepts supported effects without requiring a live Rivet actor or
|
|
7414
|
+
* workflow.
|
|
7377
7415
|
*/
|
|
7378
7416
|
getContext() {
|
|
7379
7417
|
const replay2 = getReplayContext();
|
|
@@ -7457,6 +7495,12 @@ var BitfabRivetIntegration = class {
|
|
|
7457
7495
|
if (property === "setPreventSleep" && replay2) {
|
|
7458
7496
|
return (_preventSleep) => void 0;
|
|
7459
7497
|
}
|
|
7498
|
+
if (property === "isEvicted" && replay2) {
|
|
7499
|
+
return () => replayTarget.abortSignal?.aborted === true;
|
|
7500
|
+
}
|
|
7501
|
+
if (property === "log" && replay2) {
|
|
7502
|
+
return replayLogger;
|
|
7503
|
+
}
|
|
7460
7504
|
if (replay2 && typeof property === "string" && TOP_LEVEL_UNAVAILABLE_CAPABILITIES.has(property)) {
|
|
7461
7505
|
throw unavailableCapability(property);
|
|
7462
7506
|
}
|
|
@@ -7630,7 +7674,7 @@ var BitfabRivetIntegration = class {
|
|
|
7630
7674
|
return { ...value, complete };
|
|
7631
7675
|
}
|
|
7632
7676
|
queueCallIsCompletable(effect, args) {
|
|
7633
|
-
const options = effect === "queue.waitForNames" ? args[1] : args[0];
|
|
7677
|
+
const options = effect === "queue.waitForNames" || (effect === "queue.next" || effect === "queue.nextBatch") && typeof args[0] === "string" ? args[1] : args[0];
|
|
7634
7678
|
return isRecord5(options) && options.completable === true;
|
|
7635
7679
|
}
|
|
7636
7680
|
createQueueIterator(queue, options) {
|
|
@@ -9371,9 +9415,9 @@ var Bitfab = class {
|
|
|
9371
9415
|
});
|
|
9372
9416
|
}
|
|
9373
9417
|
/**
|
|
9374
|
-
* Get the first-class Rivet actor-context integration for an
|
|
9375
|
-
* root. The integration binds context and records effect
|
|
9376
|
-
* creates another root.
|
|
9418
|
+
* Get the first-class Rivet actor/workflow-context integration for an
|
|
9419
|
+
* existing trace root. The integration binds context and records effect
|
|
9420
|
+
* spans; it never creates another root.
|
|
9377
9421
|
*
|
|
9378
9422
|
* @param traceFunctionKey - Key used by the enclosing `withTrace()` root
|
|
9379
9423
|
* @param options - Explicit per-context-path replay mocking policy
|