@buildautomaton/cli 0.1.37 → 0.1.38

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/index.js CHANGED
@@ -24076,7 +24076,7 @@ function installBridgeProcessResilience() {
24076
24076
  }
24077
24077
 
24078
24078
  // src/cli-version.ts
24079
- var CLI_VERSION = "0.1.37".length > 0 ? "0.1.37" : "0.0.0-dev";
24079
+ var CLI_VERSION = "0.1.38".length > 0 ? "0.1.38" : "0.0.0-dev";
24080
24080
 
24081
24081
  // src/connection/heartbeat/constants.ts
24082
24082
  var BRIDGE_APP_HEARTBEAT_INTERVAL_MS = 1e4;
@@ -31639,7 +31639,7 @@ function createBridgeOnFileChange(opts) {
31639
31639
 
31640
31640
  // src/agents/acp/hooks/bridge-on-request.ts
31641
31641
  function createBridgeOnRequest(opts) {
31642
- const { routing, getSendRequest, log: log2, getAutoApproveAcpPermissions, resolveAcpPermissionRequest } = opts;
31642
+ const { routing, getSendRequest, log: log2, getAutoApproveAcpPermissions, resolveAcpPermissionRequest, nextTranscriptStreamSeq } = opts;
31643
31643
  return (request) => {
31644
31644
  const runId = routing.runId;
31645
31645
  const sessionId = routing.sessionId;
@@ -31668,6 +31668,7 @@ function createBridgeOnRequest(opts) {
31668
31668
  );
31669
31669
  }
31670
31670
  try {
31671
+ const transcriptStreamSeq = nextTranscriptStreamSeq?.(runId);
31671
31672
  sendReq({
31672
31673
  type: "session_update",
31673
31674
  ...sessionId ? { sessionId } : {},
@@ -31678,7 +31679,8 @@ function createBridgeOnRequest(opts) {
31678
31679
  requestId: request.requestId,
31679
31680
  method: request.method,
31680
31681
  params: request.params
31681
- }
31682
+ },
31683
+ ...transcriptStreamSeq != null ? { transcriptStreamSeq } : {}
31682
31684
  });
31683
31685
  } catch (err) {
31684
31686
  log2(
@@ -32079,7 +32081,7 @@ function sendSessionInfoTitleUpdate(params) {
32079
32081
 
32080
32082
  // src/agents/acp/hooks/bridge-on-session-update/create-bridge-on-session-update.ts
32081
32083
  function createBridgeOnSessionUpdate(opts) {
32082
- const { routing, getSendSessionUpdate, log: log2, sessionParentPath } = opts;
32084
+ const { routing, getSendSessionUpdate, log: log2, sessionParentPath, nextTranscriptStreamSeq } = opts;
32083
32085
  const pathTracker = new PathSnapshotTracker();
32084
32086
  return (params) => {
32085
32087
  const runId = routing.runId;
@@ -32157,12 +32159,14 @@ function createBridgeOnSessionUpdate(opts) {
32157
32159
  return;
32158
32160
  }
32159
32161
  try {
32162
+ const transcriptStreamSeq = nextTranscriptStreamSeq?.(runId);
32160
32163
  send({
32161
32164
  type: "session_update",
32162
32165
  ...sessionId ? { sessionId } : {},
32163
32166
  runId,
32164
32167
  kind: updateKind,
32165
- payload: params
32168
+ payload: params,
32169
+ ...transcriptStreamSeq != null ? { transcriptStreamSeq } : {}
32166
32170
  });
32167
32171
  } catch (err) {
32168
32172
  log2(
@@ -32175,10 +32179,17 @@ function createBridgeOnSessionUpdate(opts) {
32175
32179
 
32176
32180
  // src/agents/acp/hooks/build-acp-session-bridge-hooks.ts
32177
32181
  function buildAcpSessionBridgeHooks(opts) {
32182
+ const transcriptStreamSeqByRunId = /* @__PURE__ */ new Map();
32183
+ const nextTranscriptStreamSeq = (runId) => {
32184
+ const n = (transcriptStreamSeqByRunId.get(runId) ?? 0) + 1;
32185
+ transcriptStreamSeqByRunId.set(runId, n);
32186
+ return n;
32187
+ };
32188
+ const optsWithSeq = { ...opts, nextTranscriptStreamSeq };
32178
32189
  return {
32179
- onFileChange: createBridgeOnFileChange(opts),
32180
- onSessionUpdate: createBridgeOnSessionUpdate(opts),
32181
- onRequest: createBridgeOnRequest(opts)
32190
+ onFileChange: createBridgeOnFileChange(optsWithSeq),
32191
+ onSessionUpdate: createBridgeOnSessionUpdate(optsWithSeq),
32192
+ onRequest: createBridgeOnRequest(optsWithSeq)
32182
32193
  };
32183
32194
  }
32184
32195