@bubblelab/bubble-core 0.1.56 → 0.1.58

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/bubbles.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": "2.0.0",
3
- "generatedAt": "2026-01-29T02:54:06.386Z",
3
+ "generatedAt": "2026-01-29T08:09:04.459Z",
4
4
  "totalCount": 58,
5
5
  "bubbles": [
6
6
  {
@@ -0,0 +1,68 @@
1
+ import type { BubbleContext } from '../types/bubble.js';
2
+ /**
3
+ * Represents an artifact captured during step execution.
4
+ * Artifacts can be screenshots, HTML snapshots, URLs, or custom data.
5
+ */
6
+ export interface StepArtifact {
7
+ type: 'screenshot' | 'html' | 'url' | 'custom';
8
+ label: string;
9
+ data: string;
10
+ timestamp: Date;
11
+ metadata?: Record<string, unknown>;
12
+ }
13
+ /**
14
+ * Represents a recorded step with timing, status, and artifacts.
15
+ */
16
+ export interface RecordedStep {
17
+ id: string;
18
+ name: string;
19
+ methodName: string;
20
+ args?: unknown[];
21
+ startTime: Date;
22
+ endTime?: Date;
23
+ durationMs?: number;
24
+ status: 'pending' | 'running' | 'success' | 'error';
25
+ error?: string;
26
+ beforeArtifacts: StepArtifact[];
27
+ afterArtifacts: StepArtifact[];
28
+ parentStepId?: string;
29
+ childStepIds: string[];
30
+ metadata?: Record<string, unknown>;
31
+ }
32
+ /**
33
+ * Options for configuring what artifacts to capture for a step.
34
+ */
35
+ export interface RecordStepOptions {
36
+ screenshotBefore?: boolean;
37
+ screenshotAfter?: boolean;
38
+ htmlBefore?: boolean;
39
+ htmlAfter?: boolean;
40
+ urlBefore?: boolean;
41
+ urlAfter?: boolean;
42
+ metadata?: Record<string, unknown>;
43
+ }
44
+ /**
45
+ * Default options for recording steps.
46
+ * By default, captures screenshots and URLs before/after each step.
47
+ */
48
+ export declare const DEFAULT_RECORD_STEP_OPTIONS: RecordStepOptions;
49
+ /**
50
+ * Context interface for recording operations.
51
+ * Implementations handle artifact capture and step storage.
52
+ */
53
+ export interface RecordingContext {
54
+ readonly enabled: boolean;
55
+ captureScreenshot(sessionId: string, label: string): Promise<string | null>;
56
+ captureHtml(sessionId: string, label: string, selector?: string): Promise<string | null>;
57
+ captureUrl(sessionId: string): Promise<string | null>;
58
+ storeStep(step: RecordedStep): void;
59
+ getSteps(): RecordedStep[];
60
+ clearSteps(): void;
61
+ }
62
+ /**
63
+ * Extended BubbleContext that includes an optional recording context.
64
+ */
65
+ export interface RecordableBubbleContext extends BubbleContext {
66
+ recordingContext?: RecordingContext;
67
+ }
68
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/recording/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,YAAY,EAAE,CAAC;IAChC,cAAc,EAAE,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**
2
+ * Default options for recording steps.
3
+ * By default, captures screenshots and URLs before/after each step.
4
+ */
5
+ export const DEFAULT_RECORD_STEP_OPTIONS = {
6
+ screenshotBefore: true,
7
+ screenshotAfter: true,
8
+ htmlBefore: false,
9
+ htmlAfter: false,
10
+ urlBefore: true,
11
+ urlAfter: true,
12
+ };
13
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/recording/types.ts"],"names":[],"mappings":"AA+CA;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;CACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bubblelab/bubble-core",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "puppeteer-core": "^24.10.0",
41
41
  "resend": "^4.8.0",
42
42
  "zod": "^3.24.1",
43
- "@bubblelab/shared-schemas": "0.1.57"
43
+ "@bubblelab/shared-schemas": "0.1.59"
44
44
  },
45
45
  "devDependencies": {
46
46
  "zod-to-json-schema": "^3.24.6",