@bubblegum-ai/node 0.0.6-alpha.0 → 0.0.6-alpha.10

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 (67) hide show
  1. package/README.md +92 -1
  2. package/dist/cjs/client.d.ts.map +1 -0
  3. package/dist/cjs/client.js +118 -0
  4. package/dist/cjs/client.js.map +1 -0
  5. package/dist/cjs/errors.d.ts.map +1 -0
  6. package/dist/cjs/errors.js +16 -0
  7. package/dist/cjs/errors.js.map +1 -0
  8. package/dist/{index.d.ts → cjs/index.d.ts} +1 -1
  9. package/dist/cjs/index.d.ts.map +1 -0
  10. package/dist/cjs/index.js +23 -0
  11. package/dist/cjs/index.js.map +1 -0
  12. package/dist/cjs/package.json +3 -0
  13. package/dist/cjs/protocol.d.ts.map +1 -0
  14. package/dist/cjs/protocol.js +31 -0
  15. package/dist/cjs/protocol.js.map +1 -0
  16. package/dist/cjs/session.d.ts +191 -0
  17. package/dist/cjs/session.d.ts.map +1 -0
  18. package/dist/cjs/session.js +275 -0
  19. package/dist/cjs/session.js.map +1 -0
  20. package/dist/cjs/types.d.ts +76 -0
  21. package/dist/cjs/types.d.ts.map +1 -0
  22. package/dist/cjs/types.js +10 -0
  23. package/dist/cjs/types.js.map +1 -0
  24. package/dist/esm/client.d.ts +56 -0
  25. package/dist/esm/client.d.ts.map +1 -0
  26. package/dist/esm/client.js.map +1 -0
  27. package/dist/esm/errors.d.ts +7 -0
  28. package/dist/esm/errors.d.ts.map +1 -0
  29. package/dist/esm/errors.js.map +1 -0
  30. package/dist/esm/index.d.ts +17 -0
  31. package/dist/esm/index.d.ts.map +1 -0
  32. package/dist/esm/index.js.map +1 -0
  33. package/dist/esm/package.json +3 -0
  34. package/dist/esm/protocol.d.ts +53 -0
  35. package/dist/esm/protocol.d.ts.map +1 -0
  36. package/dist/esm/protocol.js.map +1 -0
  37. package/dist/esm/session.d.ts +191 -0
  38. package/dist/esm/session.d.ts.map +1 -0
  39. package/dist/esm/session.js +271 -0
  40. package/dist/esm/session.js.map +1 -0
  41. package/dist/esm/types.d.ts +76 -0
  42. package/dist/esm/types.d.ts.map +1 -0
  43. package/dist/esm/types.js.map +1 -0
  44. package/package.json +16 -6
  45. package/dist/client.d.ts.map +0 -1
  46. package/dist/client.js.map +0 -1
  47. package/dist/errors.d.ts.map +0 -1
  48. package/dist/errors.js.map +0 -1
  49. package/dist/index.d.ts.map +0 -1
  50. package/dist/index.js.map +0 -1
  51. package/dist/protocol.d.ts.map +0 -1
  52. package/dist/protocol.js.map +0 -1
  53. package/dist/session.d.ts +0 -85
  54. package/dist/session.d.ts.map +0 -1
  55. package/dist/session.js +0 -141
  56. package/dist/session.js.map +0 -1
  57. package/dist/types.d.ts +0 -40
  58. package/dist/types.d.ts.map +0 -1
  59. package/dist/types.js.map +0 -1
  60. /package/dist/{client.d.ts → cjs/client.d.ts} +0 -0
  61. /package/dist/{errors.d.ts → cjs/errors.d.ts} +0 -0
  62. /package/dist/{protocol.d.ts → cjs/protocol.d.ts} +0 -0
  63. /package/dist/{client.js → esm/client.js} +0 -0
  64. /package/dist/{errors.js → esm/errors.js} +0 -0
  65. /package/dist/{index.js → esm/index.js} +0 -0
  66. /package/dist/{protocol.js → esm/protocol.js} +0 -0
  67. /package/dist/{types.js → esm/types.js} +0 -0
@@ -0,0 +1,191 @@
1
+ import { BridgeClient, BridgeClientOptions } from "./client.js";
2
+ import { ReportOptions, ReportResult, SessionSummary, StepOptions, StepResult } from "./types.js";
3
+ export type Channel = "web" | "mobile";
4
+ export interface LaunchOptions extends BridgeClientOptions {
5
+ /** "web" (default) or "mobile". */
6
+ channel?: Channel;
7
+ /** Web: start URL to open. */
8
+ url?: string;
9
+ /** Web: run headless (default true). */
10
+ headless?: boolean;
11
+ /** Resolve-only — never execute. */
12
+ dryRun?: boolean;
13
+ /** Mobile: Appium server URL (required for the mobile channel). */
14
+ appiumUrl?: string;
15
+ /** Mobile: Appium capabilities. */
16
+ capabilities?: Record<string, unknown>;
17
+ /**
18
+ * Web client-owned mode: attach the engine to an existing Chromium over CDP
19
+ * (e.g. `http://localhost:9222`) instead of launching one, so the engine
20
+ * drives the same browser your test already controls. Requires the engine to
21
+ * advertise the `channel.web.cdp` capability.
22
+ */
23
+ cdpEndpoint?: string;
24
+ /** Which existing page to attach to when using `cdpEndpoint` (default 0). */
25
+ pageIndex?: number;
26
+ }
27
+ /** Options for {@link Bubblegum.attach} — `cdpEndpoint` is required. */
28
+ export interface AttachOptions extends Omit<LaunchOptions, "channel"> {
29
+ cdpEndpoint: string;
30
+ }
31
+ /** One step's outcome from {@link Bubblegum.preflight}. */
32
+ export interface PreflightResult {
33
+ instruction: string;
34
+ /** Engine status: "dry_run" when it resolved, "failed" when it didn't. */
35
+ status: StepResult["status"];
36
+ /** True when the step resolved to a target (dry_run / passed / recovered). */
37
+ ok: boolean;
38
+ confidence: number;
39
+ resolver: string | null;
40
+ ref: string | null;
41
+ error: string | null;
42
+ }
43
+ /** Arguments for {@link Bubblegum.clickInTable}. */
44
+ export interface TableCellTarget {
45
+ /** Column header that identifies the cell. */
46
+ column: string;
47
+ /** Row selector: 1-based index, -1 = last, or a word like "first" / "last". */
48
+ row?: number | string;
49
+ /** Locate the row by another column's value instead of an index (e.g. a DB key). */
50
+ rowMatch?: Record<string, string>;
51
+ /** Per-call timeout. */
52
+ timeoutMs?: number;
53
+ }
54
+ /** Arguments for {@link Bubblegum.verifyTable}. */
55
+ export interface TableAssertion {
56
+ /** Column headers that must all be present. */
57
+ columns?: string[];
58
+ /** Column -> value used to locate the row(s) (e.g. a key sourced from a DB). */
59
+ row?: Record<string, string>;
60
+ /** Column -> expected value asserted in the matched row(s). */
61
+ cell?: Record<string, string>;
62
+ /** Optional human-readable step label for the report. */
63
+ description?: string;
64
+ /** Per-call timeout; the assertion polls the table until it holds or this elapses. */
65
+ timeoutMs?: number;
66
+ }
67
+ export interface RecoverArgs {
68
+ failedSelector: string;
69
+ intent: string;
70
+ options?: StepOptions;
71
+ }
72
+ /**
73
+ * The ergonomic, engine-owned session. `launch()` spawns the bridge, negotiates
74
+ * the protocol, and opens a session whose Playwright/Appium handle lives inside
75
+ * the Python engine; every call here is a thin proxy to the same four primitives
76
+ * the Python SDK exposes, returning the identical `StepResult` shape.
77
+ *
78
+ * ```ts
79
+ * const bg = await Bubblegum.launch({ url: "https://example.com/login" });
80
+ * try {
81
+ * await bg.act('Enter "tom" into Username');
82
+ * await bg.act("Click Login");
83
+ * await bg.verify("Dashboard is visible");
84
+ * } finally {
85
+ * await bg.close();
86
+ * }
87
+ * ```
88
+ */
89
+ export declare class Bubblegum {
90
+ private readonly client;
91
+ private readonly sessionId;
92
+ private constructor();
93
+ /** Spawn the bridge, handshake, and open a session (engine-owned by default). */
94
+ static launch(opts?: LaunchOptions): Promise<Bubblegum>;
95
+ /**
96
+ * Attach the engine to a browser your test already controls, over CDP
97
+ * (client-owned mode). Launch your Chromium with a remote-debugging port and
98
+ * pass its endpoint:
99
+ *
100
+ * ```ts
101
+ * const browser = await chromium.launch({ args: ["--remote-debugging-port=9222"] });
102
+ * const bg = await Bubblegum.attach({ cdpEndpoint: "http://localhost:9222" });
103
+ * await bg.act("Click Login"); // drives the page your test opened
104
+ * ```
105
+ */
106
+ static attach(opts: AttachOptions): Promise<Bubblegum>;
107
+ /** The bridge client (for advanced use / capability checks). */
108
+ get bridge(): BridgeClient;
109
+ act(instruction: string, options?: StepOptions): Promise<StepResult>;
110
+ /**
111
+ * Dry-run a list of steps against the *current* page and report whether each
112
+ * one resolves — without executing anything. Lets you validate a script (or a
113
+ * page's worth of steps) in one batch instead of discovering failures one run
114
+ * at a time.
115
+ *
116
+ * Because nothing executes, steps are all checked against the page as it is
117
+ * now (no navigation between them) — so call it once per page (e.g. after
118
+ * landing on each screen) with that screen's steps.
119
+ *
120
+ * @example
121
+ * const report = await bg.preflight([
122
+ * 'Select "Active" from the Participant status dropdown',
123
+ * 'Select "Change of mind" from the Reason dropdown',
124
+ * 'Click the Submit button',
125
+ * ]);
126
+ * console.table(report); // see status / confidence / resolver per step
127
+ * if (report.some(r => !r.ok)) throw new Error("preflight found unresolved steps");
128
+ */
129
+ preflight(steps: Array<string | {
130
+ instruction: string;
131
+ options?: StepOptions;
132
+ }>, options?: StepOptions): Promise<PreflightResult[]>;
133
+ verify(instruction: string, options?: StepOptions): Promise<StepResult>;
134
+ extract(instruction: string, options?: StepOptions): Promise<StepResult>;
135
+ /**
136
+ * Click an element inside a table cell, addressed by column + row.
137
+ *
138
+ * The cell's clickable child (a link / button) is clicked when present — ideal
139
+ * when the visible text is dynamic (a UUID, a DB id) and so can't be named.
140
+ *
141
+ * @example
142
+ * await bg.clickInTable({ column: "PPHID", row: "first" });
143
+ * await bg.clickInTable({ column: "PPHID", rowMatch: { Name: dbName } });
144
+ */
145
+ clickInTable(spec: TableCellTarget): Promise<StepResult>;
146
+ /**
147
+ * Click a link by its text (exact, then case-insensitive, then substring).
148
+ * Handy when the link label is a dynamic value pulled from a DB.
149
+ */
150
+ clickLink(text: string, options?: {
151
+ exact?: boolean;
152
+ timeoutMs?: number;
153
+ }): Promise<StepResult>;
154
+ /**
155
+ * Assert columns / cell values in a data table (Ant Design / native / ARIA).
156
+ *
157
+ * - `columns`: header names that must all be present.
158
+ * - `row`: column -> value used to locate the row(s) (e.g. a key from your DB).
159
+ * - `cell`: column -> expected value asserted in the matched row(s).
160
+ *
161
+ * At least one of `columns` / `cell` should be provided. Matching is
162
+ * whitespace-normalised, case-insensitive, and tolerates a value rendered
163
+ * inside a badge (expected is matched as a substring of the cell).
164
+ *
165
+ * @example
166
+ * await bg.verifyTable({ columns: ["PPHID", "Account Status", "Profile Status"] });
167
+ * await bg.verifyTable({ row: { Name: dbName }, cell: { "Account Status": dbStatus } });
168
+ */
169
+ verifyTable(spec: TableAssertion): Promise<StepResult>;
170
+ recover(args: RecoverArgs): Promise<StepResult>;
171
+ isVisible(target: string): Promise<boolean>;
172
+ isChecked(target: string): Promise<boolean>;
173
+ selectedValue(target: string): Promise<string>;
174
+ explain(instruction: string): Promise<string>;
175
+ summary(): Promise<SessionSummary>;
176
+ /**
177
+ * Write reports (Allure / HTML / JSON / JUnit) from every step this session
178
+ * ran, using the engine's own reporters — the same output the Python/pytest
179
+ * path produces. Call it once near the end of your run (e.g. in `finally`,
180
+ * before `close()`):
181
+ *
182
+ * ```ts
183
+ * await bg.report({ html: "reports/run.html", allure: "allure-results" });
184
+ * // -> { written: { html: "/abs/...", allure: "/abs/..." }, steps: 12 }
185
+ * ```
186
+ */
187
+ report(opts: ReportOptions): Promise<ReportResult>;
188
+ /** Close the engine session and tear down the bridge process. */
189
+ close(): Promise<void>;
190
+ }
191
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAElG,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEvC,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACxD,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8BAA8B;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oCAAoC;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wEAAwE;A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CAAC,UAAU,CAAC;IAOtD,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IASzC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ3C,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAQ3C,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ9C,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAQnD,OAAO,IAAI,OAAO,CAAC,cAAc,CAAC;IAIlC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IA2BlD,iEAAiE;IAC3D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
@@ -0,0 +1,271 @@
1
+ import { BridgeClient } from "./client.js";
2
+ import { BridgeError } from "./errors.js";
3
+ import { ErrorCodes } from "./protocol.js";
4
+ /**
5
+ * The ergonomic, engine-owned session. `launch()` spawns the bridge, negotiates
6
+ * the protocol, and opens a session whose Playwright/Appium handle lives inside
7
+ * the Python engine; every call here is a thin proxy to the same four primitives
8
+ * the Python SDK exposes, returning the identical `StepResult` shape.
9
+ *
10
+ * ```ts
11
+ * const bg = await Bubblegum.launch({ url: "https://example.com/login" });
12
+ * try {
13
+ * await bg.act('Enter "tom" into Username');
14
+ * await bg.act("Click Login");
15
+ * await bg.verify("Dashboard is visible");
16
+ * } finally {
17
+ * await bg.close();
18
+ * }
19
+ * ```
20
+ */
21
+ export class Bubblegum {
22
+ client;
23
+ sessionId;
24
+ constructor(client, sessionId) {
25
+ this.client = client;
26
+ this.sessionId = sessionId;
27
+ }
28
+ /** Spawn the bridge, handshake, and open a session (engine-owned by default). */
29
+ static async launch(opts = {}) {
30
+ const client = new BridgeClient(opts);
31
+ try {
32
+ await client.handshake();
33
+ if (opts.cdpEndpoint && !client.hasCapability("channel.web.cdp")) {
34
+ throw new BridgeError(ErrorCodes.Unsupported, "this engine does not support CDP attach (channel.web.cdp); upgrade bubblegum-ai");
35
+ }
36
+ const { session_id } = await client.request("session.open", {
37
+ channel: opts.channel ?? "web",
38
+ url: opts.url,
39
+ headless: opts.headless ?? true,
40
+ dry_run: opts.dryRun ?? false,
41
+ appium_url: opts.appiumUrl,
42
+ capabilities: opts.capabilities,
43
+ cdp_endpoint: opts.cdpEndpoint,
44
+ page_index: opts.pageIndex,
45
+ });
46
+ return new Bubblegum(client, session_id);
47
+ }
48
+ catch (err) {
49
+ await client.close();
50
+ throw err;
51
+ }
52
+ }
53
+ /**
54
+ * Attach the engine to a browser your test already controls, over CDP
55
+ * (client-owned mode). Launch your Chromium with a remote-debugging port and
56
+ * pass its endpoint:
57
+ *
58
+ * ```ts
59
+ * const browser = await chromium.launch({ args: ["--remote-debugging-port=9222"] });
60
+ * const bg = await Bubblegum.attach({ cdpEndpoint: "http://localhost:9222" });
61
+ * await bg.act("Click Login"); // drives the page your test opened
62
+ * ```
63
+ */
64
+ static attach(opts) {
65
+ return Bubblegum.launch({ ...opts, channel: "web" });
66
+ }
67
+ /** The bridge client (for advanced use / capability checks). */
68
+ get bridge() {
69
+ return this.client;
70
+ }
71
+ act(instruction, options) {
72
+ return this.client.request("act", {
73
+ session_id: this.sessionId,
74
+ instruction,
75
+ options,
76
+ });
77
+ }
78
+ /**
79
+ * Dry-run a list of steps against the *current* page and report whether each
80
+ * one resolves — without executing anything. Lets you validate a script (or a
81
+ * page's worth of steps) in one batch instead of discovering failures one run
82
+ * at a time.
83
+ *
84
+ * Because nothing executes, steps are all checked against the page as it is
85
+ * now (no navigation between them) — so call it once per page (e.g. after
86
+ * landing on each screen) with that screen's steps.
87
+ *
88
+ * @example
89
+ * const report = await bg.preflight([
90
+ * 'Select "Active" from the Participant status dropdown',
91
+ * 'Select "Change of mind" from the Reason dropdown',
92
+ * 'Click the Submit button',
93
+ * ]);
94
+ * console.table(report); // see status / confidence / resolver per step
95
+ * if (report.some(r => !r.ok)) throw new Error("preflight found unresolved steps");
96
+ */
97
+ async preflight(steps, options) {
98
+ const out = [];
99
+ for (const step of steps) {
100
+ const instruction = typeof step === "string" ? step : step.instruction;
101
+ const perStep = typeof step === "string" ? undefined : step.options;
102
+ const r = await this.act(instruction, { ...options, ...perStep, dry_run: true });
103
+ out.push({
104
+ instruction,
105
+ status: r.status,
106
+ ok: r.status === "dry_run" || r.status === "passed" || r.status === "recovered",
107
+ confidence: r.confidence,
108
+ resolver: r.target?.resolver_name ?? null,
109
+ ref: r.target?.ref ?? null,
110
+ error: r.error?.message ?? null,
111
+ });
112
+ }
113
+ return out;
114
+ }
115
+ verify(instruction, options) {
116
+ return this.client.request("verify", {
117
+ session_id: this.sessionId,
118
+ instruction,
119
+ options,
120
+ });
121
+ }
122
+ extract(instruction, options) {
123
+ return this.client.request("extract", {
124
+ session_id: this.sessionId,
125
+ instruction,
126
+ options,
127
+ });
128
+ }
129
+ /**
130
+ * Click an element inside a table cell, addressed by column + row.
131
+ *
132
+ * The cell's clickable child (a link / button) is clicked when present — ideal
133
+ * when the visible text is dynamic (a UUID, a DB id) and so can't be named.
134
+ *
135
+ * @example
136
+ * await bg.clickInTable({ column: "PPHID", row: "first" });
137
+ * await bg.clickInTable({ column: "PPHID", rowMatch: { Name: dbName } });
138
+ */
139
+ clickInTable(spec) {
140
+ const { column, row, rowMatch, timeoutMs } = spec;
141
+ const options = { action_type: "click", column };
142
+ if (rowMatch)
143
+ options.row_match = rowMatch;
144
+ else if (row !== undefined)
145
+ options.row = row;
146
+ if (timeoutMs !== undefined)
147
+ options.timeout_ms = timeoutMs;
148
+ return this.act(`click the ${column} cell`, options);
149
+ }
150
+ /**
151
+ * Click a link by its text (exact, then case-insensitive, then substring).
152
+ * Handy when the link label is a dynamic value pulled from a DB.
153
+ */
154
+ clickLink(text, options) {
155
+ const opts = { action_type: "click", link_text: text };
156
+ if (options?.exact !== undefined)
157
+ opts.exact = options.exact;
158
+ if (options?.timeoutMs !== undefined)
159
+ opts.timeout_ms = options.timeoutMs;
160
+ return this.act(`click the link "${text}"`, opts);
161
+ }
162
+ /**
163
+ * Assert columns / cell values in a data table (Ant Design / native / ARIA).
164
+ *
165
+ * - `columns`: header names that must all be present.
166
+ * - `row`: column -> value used to locate the row(s) (e.g. a key from your DB).
167
+ * - `cell`: column -> expected value asserted in the matched row(s).
168
+ *
169
+ * At least one of `columns` / `cell` should be provided. Matching is
170
+ * whitespace-normalised, case-insensitive, and tolerates a value rendered
171
+ * inside a badge (expected is matched as a substring of the cell).
172
+ *
173
+ * @example
174
+ * await bg.verifyTable({ columns: ["PPHID", "Account Status", "Profile Status"] });
175
+ * await bg.verifyTable({ row: { Name: dbName }, cell: { "Account Status": dbStatus } });
176
+ */
177
+ verifyTable(spec) {
178
+ const { description, timeoutMs, ...rest } = spec;
179
+ const options = { assertion_type: "table", ...rest };
180
+ if (timeoutMs !== undefined)
181
+ options.timeout_ms = timeoutMs;
182
+ return this.verify(description ?? "table assertion", options);
183
+ }
184
+ recover(args) {
185
+ return this.client.request("recover", {
186
+ session_id: this.sessionId,
187
+ failed_selector: args.failedSelector,
188
+ intent: args.intent,
189
+ options: args.options,
190
+ });
191
+ }
192
+ async isVisible(target) {
193
+ const r = await this.client.request("is_visible", {
194
+ session_id: this.sessionId,
195
+ target,
196
+ });
197
+ return r.value;
198
+ }
199
+ async isChecked(target) {
200
+ const r = await this.client.request("is_checked", {
201
+ session_id: this.sessionId,
202
+ target,
203
+ });
204
+ return r.value;
205
+ }
206
+ async selectedValue(target) {
207
+ const r = await this.client.request("selected_value", {
208
+ session_id: this.sessionId,
209
+ target,
210
+ });
211
+ return r.value;
212
+ }
213
+ async explain(instruction) {
214
+ const r = await this.client.request("explain", {
215
+ session_id: this.sessionId,
216
+ instruction,
217
+ });
218
+ return r.explanation;
219
+ }
220
+ summary() {
221
+ return this.client.request("summary", { session_id: this.sessionId });
222
+ }
223
+ /**
224
+ * Write reports (Allure / HTML / JSON / JUnit) from every step this session
225
+ * ran, using the engine's own reporters — the same output the Python/pytest
226
+ * path produces. Call it once near the end of your run (e.g. in `finally`,
227
+ * before `close()`):
228
+ *
229
+ * ```ts
230
+ * await bg.report({ html: "reports/run.html", allure: "allure-results" });
231
+ * // -> { written: { html: "/abs/...", allure: "/abs/..." }, steps: 12 }
232
+ * ```
233
+ */
234
+ report(opts) {
235
+ if (!this.client.hasCapability("report.write")) {
236
+ throw new BridgeError(ErrorCodes.Unsupported, "this engine does not support report generation (report.write); upgrade bubblegum-ai");
237
+ }
238
+ const resolve = (v, fallback) => v === true ? fallback : v || undefined;
239
+ const params = { session_id: this.sessionId };
240
+ const html = resolve(opts.html, "bubblegum_report.html");
241
+ const json = resolve(opts.json, "bubblegum_report.json");
242
+ const junit = resolve(opts.junit, "bubblegum_report.xml");
243
+ const allure = resolve(opts.allure, "allure-results");
244
+ const summary = resolve(opts.summary, "bubblegum-summary.html");
245
+ if (html)
246
+ params.html = html;
247
+ if (json)
248
+ params.json = json;
249
+ if (junit)
250
+ params.junit = junit;
251
+ if (allure)
252
+ params.allure = allure;
253
+ if (summary)
254
+ params.summary = summary;
255
+ if (opts.title)
256
+ params.title = opts.title;
257
+ if (opts.suiteName)
258
+ params.suite_name = opts.suiteName;
259
+ return this.client.request("report.write", params);
260
+ }
261
+ /** Close the engine session and tear down the bridge process. */
262
+ async close() {
263
+ try {
264
+ await this.client.request("session.close", { session_id: this.sessionId });
265
+ }
266
+ finally {
267
+ await this.client.close();
268
+ }
269
+ }
270
+ }
271
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AA+E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4
+ * Kept intentionally close to the Pydantic models. `[key: string]: unknown`
5
+ * index signatures let newer engine fields flow through without breaking the
6
+ * client (additive-first), while the named fields stay strongly typed.
7
+ */
8
+ export type StepStatus = "passed" | "failed" | "recovered" | "dry_run" | "skipped";
9
+ export interface ResolvedTarget {
10
+ ref: string;
11
+ confidence: number;
12
+ resolver_name: string;
13
+ metadata?: Record<string, unknown>;
14
+ [key: string]: unknown;
15
+ }
16
+ export interface ErrorInfo {
17
+ error_type: string;
18
+ message: string;
19
+ resolver_name?: string | null;
20
+ [key: string]: unknown;
21
+ }
22
+ export interface StepResult {
23
+ status: StepStatus;
24
+ action: string;
25
+ target: ResolvedTarget | null;
26
+ confidence: number;
27
+ duration_ms: number;
28
+ error?: ErrorInfo | null;
29
+ traces?: unknown[];
30
+ [key: string]: unknown;
31
+ }
32
+ export interface SessionSummary {
33
+ total: number;
34
+ passed: number;
35
+ failed: number;
36
+ [key: string]: unknown;
37
+ }
38
+ /** Per-call options forwarded verbatim to the engine SDK (timeout_ms, selector, …). */
39
+ export type StepOptions = Record<string, unknown>;
40
+ /**
41
+ * Which reports to write from the session's accumulated step results.
42
+ *
43
+ * Each field is either an output path, or `true` to use the default name
44
+ * (`bubblegum_report.html` / `.json` / `.xml`, and `allure-results/` for
45
+ * Allure). Omit a field to skip that format. Paths are resolved relative to the
46
+ * engine process's working directory.
47
+ */
48
+ export interface ReportOptions {
49
+ /** Single-file HTML report. */
50
+ html?: string | boolean;
51
+ /** Machine-readable JSON report. */
52
+ json?: string | boolean;
53
+ /** JUnit XML (for CI test-report ingestion). */
54
+ junit?: string | boolean;
55
+ /** Allure 2 results *directory* (view with `allure serve <dir>`). */
56
+ allure?: string | boolean;
57
+ /**
58
+ * Cross-run suite summary HTML. Each test run upserts itself (keyed by
59
+ * `suiteName`) into a sibling `*.json` manifest, so several independently-run
60
+ * tests aggregate into one overview (per-test pass/fail + grand totals)
61
+ * instead of overwriting each other. Pass a distinct `suiteName` per test.
62
+ */
63
+ summary?: string | boolean;
64
+ /** Report title (HTML/JSON). */
65
+ title?: string;
66
+ /** Suite / test name (Allure/JUnit, and the summary manifest key). */
67
+ suiteName?: string;
68
+ }
69
+ /** Result of {@link Bubblegum.report}: resolved paths written, and step count. */
70
+ export interface ReportResult {
71
+ /** Format → resolved absolute path (or directory, for Allure). */
72
+ written: Record<string, string>;
73
+ /** Number of steps included in the report. */
74
+ steps: number;
75
+ }
76
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAEnF,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,UAAU,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,uFAAuF;AACvF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kFAAkF;AAClF,MAAM,WAAW,YAAY;IAC3B,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
package/package.json CHANGED
@@ -1,15 +1,23 @@
1
1
  {
2
2
  "name": "@bubblegum-ai/node",
3
- "version": "0.0.6-alpha.0",
3
+ "version": "0.0.6-alpha.10",
4
4
  "description": "Node/TypeScript client for the Bubblegum engine — drive AI-powered, natural-language Playwright/Appium test steps from JS/TS via the Bubblegum JSON-RPC bridge.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js"
8
+ "import": {
9
+ "types": "./dist/esm/index.d.ts",
10
+ "default": "./dist/esm/index.js"
11
+ },
12
+ "require": {
13
+ "types": "./dist/cjs/index.d.ts",
14
+ "default": "./dist/cjs/index.js"
15
+ }
10
16
  }
11
17
  },
12
- "types": "./dist/index.d.ts",
18
+ "main": "./dist/cjs/index.js",
19
+ "module": "./dist/esm/index.js",
20
+ "types": "./dist/esm/index.d.ts",
13
21
  "files": [
14
22
  "dist",
15
23
  "README.md"
@@ -18,9 +26,11 @@
18
26
  "node": ">=18"
19
27
  },
20
28
  "scripts": {
21
- "build": "tsc -p tsconfig.json",
29
+ "build": "npm run build:esm && npm run build:cjs && node scripts/postbuild.mjs",
30
+ "build:esm": "tsc -p tsconfig.json",
31
+ "build:cjs": "tsc -p tsconfig.cjs.json",
22
32
  "typecheck": "tsc -p tsconfig.json --noEmit",
23
- "test": "npm run build && node --test test/*.test.mjs",
33
+ "test": "npm run build && node --test test/*.test.mjs test/*.test.cjs",
24
34
  "prepublishOnly": "npm run build"
25
35
  },
26
36
  "keywords": [
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,SAAS,EAIV,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,oDAAoD;IACpD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kDAAkD;IAClD,MAAM,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACzC,oFAAoF;IACpF,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,IAAI,CAAC;IACzC,0BAA0B;IAC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,Y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I,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;IAED,gFAAgF;IAChF,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAY,WAAW,CAAC,CAAC;QACxD,IAAI,CAAE,2BAAiD,CAAC,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACxF,MAAM,IAAI,WAAW,CACnB,UAAU,CAAC,WAAW,EACtB,oBAAoB,IAAI,CAAC,gBAAgB,mCAAmC;gBAC1E,cAAc,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,gCAAgC,CACvF,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2EAA2E;IAC3E,aAAa,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;gBAEZ,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO;CAM1D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,OAAO,WAAY,SAAQ,KAAK;IAC3B,IAAI,CAAS;IACb,IAAI,CAAW;IAExB,YAAY,IAAY,EAAE,OAAe,EAAE,IAAc;QACvD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACjE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhE,YAAY,EACV,UAAU,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACT,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAC"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,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