@builder.io/dev-tools 1.46.0-dev.202604210746.f5e7329b1 → 1.46.0-dev.202604210823.f5e7329b1

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.
@@ -4,23 +4,23 @@ import { type Credentials } from "../credentials";
4
4
  * `packages/service/codegen/replay/types.ts` — kept inline here to keep
5
5
  * the published `@builder.io/dev-tools` package free of cross-package
6
6
  * type imports.
7
+ *
8
+ * Only the user-visible content is captured: assistant `text` blocks
9
+ * and `thinking` blocks. Tool calls and chapter markers are
10
+ * deliberately excluded.
7
11
  */
8
12
  export interface ReplayActionRecord {
13
+ /** Wall-clock timestamp in ms epoch. */
9
14
  ts: number;
10
- type: "tool_result" | "reasoning" | "chapter";
11
- tool?: string;
12
- argsSummary?: string;
13
- resultSummary?: string;
14
- isError?: boolean;
15
- title?: string;
15
+ type: "text" | "thinking";
16
+ content: string;
16
17
  }
17
18
  /**
18
- * Buffers AI agent actions during a `browser-testing` run and uploads
19
- * them as NDJSON chunks to `/codegen/replay/:uuid/actions`.
20
- *
21
- * The main service composes each chunk into the canonical
22
- * `actions.ndjson.gz` on every append, so order is preserved purely by
23
- * the inflight chain below — no `seq` query parameter is needed.
19
+ * Buffers user-visible agent blocks (`text`, `thinking`) during a
20
+ * `browser-testing` run and POSTs them as JSON to
21
+ * `/codegen/replay/:uuid/actions`. The main service appends them to
22
+ * `replay.actionsStr` on the Firestore doc inside a transaction, so
23
+ * concurrent uploads can't drop entries.
24
24
  *
25
25
  * Failures are intentionally swallowed: replay is a nice-to-have and
26
26
  * must never affect the agent run.
@@ -32,20 +32,13 @@ export declare class ReplayActionUploader {
32
32
  replayId: string;
33
33
  debug?: boolean;
34
34
  });
35
- recordToolResult(result: {
36
- tool_name?: string;
37
- tool_input?: string;
38
- content?: unknown;
39
- is_error?: boolean;
40
- }, ts?: number): void;
41
35
  /**
42
36
  * `ts` should be the moment the assistant *began* streaming this
43
- * thinking block, not when it finished. Defaults to `Date.now()` for
44
- * back-compat but callers are expected to pass an earlier timestamp
45
- * (e.g. when the previous step ended).
37
+ * block, not when it finished. Defaults to `Date.now()` for
38
+ * back-compat but callers are expected to pass an earlier timestamp.
46
39
  */
47
- recordReasoning(text: string, ts?: number): void;
48
- recordChapterMarker(title: string, ts?: number): void;
40
+ recordText(content: string, ts?: number): void;
41
+ recordReasoning(content: string, ts?: number): void;
49
42
  flush(): Promise<void>;
50
43
  close(): Promise<void>;
51
44
  }