repoburg 1.3.289 → 1.3.291

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 (40) hide show
  1. package/agent-pane/backend/dist/index.js +59 -9
  2. package/agent-pane/backend/dist/server.js +59 -9
  3. package/agent-pane/frontend/dist/assets/{TerminalView-BIN1AVRE.js → TerminalView-8SYwvwRI.js} +1 -1
  4. package/agent-pane/frontend/dist/assets/index-Dp-5bP4E.js +667 -0
  5. package/agent-pane/frontend/dist/assets/index-lBXohPJP.css +1 -0
  6. package/agent-pane/frontend/dist/index.html +2 -2
  7. package/daemon/dist/index.js +1 -0
  8. package/daemon/dist/tabtape/api/router.js +36 -1
  9. package/daemon/dist/tabtape/api/router.spec.js +47 -0
  10. package/daemon/dist/tabtape/e2e-server.js +1 -0
  11. package/daemon/dist/tabtape/index.js +10 -0
  12. package/daemon/dist/tabtape/index.spec.js +35 -2
  13. package/daemon/dist/tabtape/mcp/definitions.js +14 -3
  14. package/daemon/dist/tabtape/mcp/server.js +2 -1
  15. package/daemon/dist/tabtape/mcp/server.spec.js +50 -2
  16. package/daemon/dist/tabtape/mcp/tools.js +19 -0
  17. package/daemon/dist/tabtape/proxy/proxy.js +361 -0
  18. package/daemon/dist/tabtape/proxy/proxy.spec.js +497 -0
  19. package/daemon/dist/tabtape/proxy/rewrite.js +176 -0
  20. package/daemon/dist/tabtape/proxy/rewrite.spec.js +140 -0
  21. package/package.json +1 -1
  22. package/tabtape/extension/dist/background.js +4 -4
  23. package/tabtape/extension/dist/background.js.map +4 -4
  24. package/tabtape/extension/dist/bridge.js +2 -2
  25. package/tabtape/extension/dist/bridge.js.map +2 -2
  26. package/tabtape/extension/dist/build-info.json +4 -4
  27. package/tabtape/extension/dist/manifest.json +1 -1
  28. package/tabtape/extension/dist/popup.js +1 -1
  29. package/tabtape/extension/dist/popup.js.map +2 -2
  30. package/tabtape/extension/dist/proxy-bridge.js +3 -0
  31. package/tabtape/extension/dist/proxy-bridge.js.map +1 -0
  32. package/tabtape/extension/dist/recorder.js +20 -20
  33. package/tabtape/extension/dist/recorder.js.map +1 -1
  34. package/tabtape/extension/dist/state.js +1 -1
  35. package/tabtape/extension/dist/state.js.map +1 -1
  36. package/tabtape/playwright/tabtape.d.mts +17 -0
  37. package/tabtape/playwright/tabtape.mjs +40 -2
  38. package/tabtape/ui/dist/build-info.json +4 -4
  39. package/agent-pane/frontend/dist/assets/index-DumuprBy.js +0 -667
  40. package/agent-pane/frontend/dist/assets/index-sz14_w3J.css +0 -1
@@ -24,6 +24,17 @@ export interface Recording {
24
24
  warning?: string;
25
25
  }
26
26
 
27
+ export interface ProxyRecording {
28
+ /** Session id, for the tabtape MCP tools. */
29
+ id: string;
30
+ /** The page on the proxy: open this one. */
31
+ url: string;
32
+ /** The replay, e.g. http://127.0.0.1:9998/tabtape/#/s/<id>. */
33
+ replay: string;
34
+ /** Closes the proxy; null when no page was opened through it. */
35
+ stop(): Promise<Recording | null>;
36
+ }
37
+
27
38
  /** Launches Playwright's Chromium (headless by default) in a persistent context with the tabtape extension. */
28
39
  export declare function launch(chromium: BrowserType, options?: LaunchOptions): Promise<BrowserContext>;
29
40
 
@@ -33,5 +44,11 @@ export declare function start(page: Page, options?: { name?: string; deep?: bool
33
44
  /** Stops the recording; null when nothing was recorded. */
34
45
  export declare function stop(target: Page | BrowserContext): Promise<Recording | null>;
35
46
 
47
+ /**
48
+ * Starts recording `url` through a recording proxy: no extension, any browser
49
+ * and context. Open the returned `url`. Throws when tabtape is not reachable.
50
+ */
51
+ export declare function proxy(url: string, options?: { name?: string; serverUrl?: string }): Promise<ProxyRecording>;
52
+
36
53
  /** Writes a test step ("test: <name>") into the recording; first waits (up to 5 s) for the recorder to start on the page. */
37
54
  export declare function step(page: Page, name: string, props?: Record<string, unknown>): Promise<void>;
@@ -17,6 +17,13 @@
17
17
  // context: browser.newContext() contexts have no extensions, and Google
18
18
  // Chrome ignores --load-extension since Chrome 137. launch() sees to both.
19
19
  // No dependencies: pass in the chromium of the Playwright you use.
20
+ //
21
+ // Any other browser or context goes through a recording proxy, no extension:
22
+ //
23
+ // const recording = await tabtape.proxy('http://localhost:3000/cart', { name: 'checkout: coupon' });
24
+ // await page.goto(recording.url);
25
+ // await tabtape.step(page, 'apply the coupon');
26
+ // await recording.stop(); // { id, url }
20
27
 
21
28
  import { existsSync } from 'node:fs';
22
29
  import path from 'node:path';
@@ -25,6 +32,9 @@ import { fileURLToPath } from 'node:url';
25
32
  /** The unpacked extension, built by `npm run build` in tabtape/. */
26
33
  export const extensionPath = fileURLToPath(new URL('../extension/dist', import.meta.url));
27
34
 
35
+ /** tabtape in the Repoburg daemon. */
36
+ const DEFAULT_SERVER_URL = 'http://127.0.0.1:9998/tabtape';
37
+
28
38
  /** Extension ids by context, to wake the extension's service worker when Chrome stopped it. */
29
39
  const extensionIds = new WeakMap();
30
40
 
@@ -91,13 +101,41 @@ export async function stop(target) {
91
101
  return res ? { id: res.sessionId, url: replayUrl(res.serverUrl, res.sessionId) } : null;
92
102
  }
93
103
 
104
+ /**
105
+ * Starts recording `url` through a recording proxy, which needs no extension
106
+ * and works in any browser and context: open the returned `url` instead of
107
+ * yours. Resolves to { id, url, replay, stop() }; stop() closes the proxy and
108
+ * resolves to { id, url } (url: the replay), or null when no page was opened.
109
+ * `serverUrl`: where tabtape is served, with its path. Throws when tabtape is
110
+ * not reachable (the Repoburg daemon is not running).
111
+ */
112
+ export async function proxy(url, { name, serverUrl = DEFAULT_SERVER_URL } = {}) {
113
+ const server = String(serverUrl).trim().replace(/\/+$/, '');
114
+ const rec = await post(`${server}/api/proxy`, { url, name });
115
+ return {
116
+ id: rec.id,
117
+ url: rec.url,
118
+ replay: rec.replay,
119
+ stop: async () => {
120
+ const res = await post(`${server}/api/proxy/${rec.id}/stop`, {});
121
+ return res.recorded ? { id: res.id, url: res.replay } : null;
122
+ },
123
+ };
124
+ }
125
+
126
+ async function post(url, body) {
127
+ const res = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-Tabtape-Client': 'playwright' }, body: JSON.stringify(body) });
128
+ if (!res.ok) throw new Error(`tabtape: ${(await res.text()).trim()} (HTTP ${res.status})`);
129
+ return res.json();
130
+ }
131
+
94
132
  /**
95
133
  * Writes a test step into the recording, next to what the page did: a
96
134
  * custom event named "test: <name>", with optional properties.
97
135
  */
98
136
  export async function step(page, name, props) {
99
- // The recorder starts once the extension answers the page, which can be
100
- // after the load event: a step right after goto() would be lost.
137
+ // With the extension the recorder starts once it answers the page, which
138
+ // can be after the load event: a step right after goto() would be lost.
101
139
  await page
102
140
  .waitForFunction(() => window[Symbol.for('tabtape.recorder')]?.active === true, undefined, { timeout: 5000, polling: 20 })
103
141
  .catch(() => {}); // not recorded: the event goes nowhere, as before
@@ -1,7 +1,7 @@
1
1
  {
2
- "tree": "95469df6b5ca1e62f2cc992eb397d17efba89f66",
3
- "commit": "d4a52bc19e9cb6977694889c210bfd20baa64aa5",
2
+ "tree": "6672feaab7bc34eb652d636db3f6bb40bafe0d86",
3
+ "commit": "b050c5e196a1eac173c47ec29b59385951c60fc4",
4
4
  "dirty": false,
5
- "repoburgVersion": "1.3.289",
6
- "builtAt": "2026-11-01T21:35:01.273Z"
5
+ "repoburgVersion": "1.3.291",
6
+ "builtAt": "2026-11-01T23:34:20.372Z"
7
7
  }