@bitfab/sdk 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-GQNLAY72.js → chunk-GZI455WP.js} +2 -2
- package/dist/{chunk-GQNLAY72.js.map → chunk-GZI455WP.js.map} +1 -1
- package/dist/{chunk-MC2NKYDY.js → chunk-I5NJU64I.js} +2 -2
- package/dist/{chunk-MC2NKYDY.js.map → chunk-I5NJU64I.js.map} +1 -1
- package/dist/{chunk-NLJLEF7Q.js → chunk-JEFU6FTD.js} +60 -16
- package/dist/chunk-JEFU6FTD.js.map +1 -0
- package/dist/{chunk-EG2BK73V.js → chunk-Q3X54UPA.js} +3 -3
- package/dist/{chunk-WEUG3N7A.js → chunk-XTUINMAL.js} +2 -2
- package/dist/{http-3NVEDIBT.js → http-FJVBYZES.js} +2 -2
- package/dist/{http-L357FQLN.js → http-X4YOOM54.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-ZXA5AA2M.js → replay-IA5VRWHD.js} +3 -3
- package/dist/replayCli.js +2 -2
- package/dist/seedCli.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-NLJLEF7Q.js.map +0 -1
- /package/dist/{chunk-EG2BK73V.js.map → chunk-Q3X54UPA.js.map} +0 -0
- /package/dist/{chunk-WEUG3N7A.js.map → chunk-XTUINMAL.js.map} +0 -0
- /package/dist/{http-3NVEDIBT.js.map → http-FJVBYZES.js.map} +0 -0
- /package/dist/{http-L357FQLN.js.map → http-X4YOOM54.js.map} +0 -0
- /package/dist/{replay-ZXA5AA2M.js.map → replay-IA5VRWHD.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
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getCurrentTrace,
|
|
22
22
|
reseedFromRegistry,
|
|
23
23
|
seedFromRegistry
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-JEFU6FTD.js";
|
|
25
25
|
import "./chunk-EGWJYCNT.js";
|
|
26
26
|
import {
|
|
27
27
|
BITFAB_PROGRESS_PREFIX,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
ReplayError,
|
|
31
31
|
reportReplayProgress,
|
|
32
32
|
serializeReplayResult
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-XTUINMAL.js";
|
|
34
34
|
import {
|
|
35
35
|
BitfabError,
|
|
36
36
|
DEFAULT_SERVICE_URL,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
MixedTracingError,
|
|
39
39
|
__version__,
|
|
40
40
|
flushTraces
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-I5NJU64I.js";
|
|
42
42
|
import "./chunk-VCRFFCLY.js";
|
|
43
43
|
export {
|
|
44
44
|
AssertionCategoriesClient,
|
package/dist/node.cjs
CHANGED
|
@@ -88,7 +88,7 @@ var __version__, __packageName__;
|
|
|
88
88
|
var init_version_generated = __esm({
|
|
89
89
|
"src/version.generated.ts"() {
|
|
90
90
|
"use strict";
|
|
91
|
-
__version__ = "0.54.
|
|
91
|
+
__version__ = "0.54.12";
|
|
92
92
|
__packageName__ = "@bitfab/sdk";
|
|
93
93
|
}
|
|
94
94
|
});
|
|
@@ -7211,18 +7211,42 @@ var RIVET_TOP_LEVEL_EFFECTS = [
|
|
|
7211
7211
|
"broadcast",
|
|
7212
7212
|
"saveState",
|
|
7213
7213
|
"sleep",
|
|
7214
|
-
"destroy"
|
|
7214
|
+
"destroy",
|
|
7215
|
+
"step",
|
|
7216
|
+
"tryStep",
|
|
7217
|
+
"try",
|
|
7218
|
+
"loop",
|
|
7219
|
+
"sleepUntil",
|
|
7220
|
+
"rollbackCheckpoint",
|
|
7221
|
+
"join",
|
|
7222
|
+
"race",
|
|
7223
|
+
"removed",
|
|
7224
|
+
"getVersion"
|
|
7215
7225
|
];
|
|
7216
7226
|
var TOP_LEVEL_UNAVAILABLE_CAPABILITIES = /* @__PURE__ */ new Set([
|
|
7217
7227
|
"conn",
|
|
7218
7228
|
"conns",
|
|
7219
|
-
"log",
|
|
7220
7229
|
"request",
|
|
7221
7230
|
"actorRuntimeSocket",
|
|
7222
7231
|
"keepAwake",
|
|
7223
7232
|
"waitUntil",
|
|
7224
7233
|
"client"
|
|
7225
7234
|
]);
|
|
7235
|
+
var replayLog = () => void 0;
|
|
7236
|
+
var replayLogger = {
|
|
7237
|
+
level: "silent",
|
|
7238
|
+
msgPrefix: void 0,
|
|
7239
|
+
fatal: replayLog,
|
|
7240
|
+
trace: replayLog,
|
|
7241
|
+
silent: replayLog,
|
|
7242
|
+
debug: replayLog,
|
|
7243
|
+
info: replayLog,
|
|
7244
|
+
warn: replayLog,
|
|
7245
|
+
error: replayLog,
|
|
7246
|
+
child: () => replayLogger,
|
|
7247
|
+
bindings: () => ({}),
|
|
7248
|
+
isLevelEnabled: () => false
|
|
7249
|
+
};
|
|
7226
7250
|
var SYNC_VOID_EFFECTS = /* @__PURE__ */ new Set([
|
|
7227
7251
|
"broadcast",
|
|
7228
7252
|
"sleep",
|
|
@@ -7252,16 +7276,28 @@ function snapshotContext(context) {
|
|
|
7252
7276
|
"state",
|
|
7253
7277
|
"vars",
|
|
7254
7278
|
"actorId",
|
|
7279
|
+
"workflowId",
|
|
7255
7280
|
"name",
|
|
7256
7281
|
"key",
|
|
7257
|
-
"region"
|
|
7258
|
-
"aborted"
|
|
7282
|
+
"region"
|
|
7259
7283
|
]) {
|
|
7260
7284
|
const value = readProperty(source, property);
|
|
7261
7285
|
if (value !== void 0) {
|
|
7262
7286
|
snapshot[property] = value;
|
|
7263
7287
|
}
|
|
7264
7288
|
}
|
|
7289
|
+
const aborted = readProperty(source, "aborted");
|
|
7290
|
+
if (typeof aborted === "boolean") {
|
|
7291
|
+
snapshot.aborted = aborted;
|
|
7292
|
+
} else {
|
|
7293
|
+
const abortSignal = readProperty(source, "abortSignal");
|
|
7294
|
+
if (isRecord5(abortSignal)) {
|
|
7295
|
+
const signalAborted = readProperty(abortSignal, "aborted");
|
|
7296
|
+
if (typeof signalAborted === "boolean") {
|
|
7297
|
+
snapshot.aborted = signalAborted;
|
|
7298
|
+
}
|
|
7299
|
+
}
|
|
7300
|
+
}
|
|
7265
7301
|
return snapshot;
|
|
7266
7302
|
}
|
|
7267
7303
|
function unavailableCapability(path) {
|
|
@@ -7353,7 +7389,8 @@ var BitfabRivetIntegration = class {
|
|
|
7353
7389
|
}
|
|
7354
7390
|
/**
|
|
7355
7391
|
* Adapt a traced function into a Rivet handler whose first argument is the
|
|
7356
|
-
* live actor context. The context is not added to the traced
|
|
7392
|
+
* live actor or workflow context. The context is not added to the traced
|
|
7393
|
+
* root's inputs.
|
|
7357
7394
|
*/
|
|
7358
7395
|
bind(fn) {
|
|
7359
7396
|
const integration = this;
|
|
@@ -7364,7 +7401,8 @@ var BitfabRivetIntegration = class {
|
|
|
7364
7401
|
/**
|
|
7365
7402
|
* Return the current Rivet context proxy. In production it delegates to the
|
|
7366
7403
|
* bound live context. During replay it hydrates recorded actor state and
|
|
7367
|
-
* intercepts supported effects without requiring a live Rivet actor
|
|
7404
|
+
* intercepts supported effects without requiring a live Rivet actor or
|
|
7405
|
+
* workflow.
|
|
7368
7406
|
*/
|
|
7369
7407
|
getContext() {
|
|
7370
7408
|
const replay2 = getReplayContext();
|
|
@@ -7448,6 +7486,12 @@ var BitfabRivetIntegration = class {
|
|
|
7448
7486
|
if (property === "setPreventSleep" && replay2) {
|
|
7449
7487
|
return (_preventSleep) => void 0;
|
|
7450
7488
|
}
|
|
7489
|
+
if (property === "isEvicted" && replay2) {
|
|
7490
|
+
return () => replayTarget.abortSignal?.aborted === true;
|
|
7491
|
+
}
|
|
7492
|
+
if (property === "log" && replay2) {
|
|
7493
|
+
return replayLogger;
|
|
7494
|
+
}
|
|
7451
7495
|
if (replay2 && typeof property === "string" && TOP_LEVEL_UNAVAILABLE_CAPABILITIES.has(property)) {
|
|
7452
7496
|
throw unavailableCapability(property);
|
|
7453
7497
|
}
|
|
@@ -7621,7 +7665,7 @@ var BitfabRivetIntegration = class {
|
|
|
7621
7665
|
return { ...value, complete };
|
|
7622
7666
|
}
|
|
7623
7667
|
queueCallIsCompletable(effect, args) {
|
|
7624
|
-
const options = effect === "queue.waitForNames" ? args[1] : args[0];
|
|
7668
|
+
const options = effect === "queue.waitForNames" || (effect === "queue.next" || effect === "queue.nextBatch") && typeof args[0] === "string" ? args[1] : args[0];
|
|
7625
7669
|
return isRecord5(options) && options.completable === true;
|
|
7626
7670
|
}
|
|
7627
7671
|
createQueueIterator(queue, options) {
|
|
@@ -9362,9 +9406,9 @@ var Bitfab = class {
|
|
|
9362
9406
|
});
|
|
9363
9407
|
}
|
|
9364
9408
|
/**
|
|
9365
|
-
* Get the first-class Rivet actor-context integration for an
|
|
9366
|
-
* root. The integration binds context and records effect
|
|
9367
|
-
* creates another root.
|
|
9409
|
+
* Get the first-class Rivet actor/workflow-context integration for an
|
|
9410
|
+
* existing trace root. The integration binds context and records effect
|
|
9411
|
+
* spans; it never creates another root.
|
|
9368
9412
|
*
|
|
9369
9413
|
* @param traceFunctionKey - Key used by the enclosing `withTrace()` root
|
|
9370
9414
|
* @param options - Explicit per-context-path replay mocking policy
|