@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/cli.js CHANGED
@@ -25064,7 +25064,7 @@ var {
25064
25064
  } = import_index.default;
25065
25065
 
25066
25066
  // src/cli-version.ts
25067
- var CLI_VERSION = "0.1.37".length > 0 ? "0.1.37" : "0.0.0-dev";
25067
+ var CLI_VERSION = "0.1.38".length > 0 ? "0.1.38" : "0.0.0-dev";
25068
25068
 
25069
25069
  // src/cli/defaults.ts
25070
25070
  var DEFAULT_API_URL = process.env.BUILDAUTOMATON_API_URL ?? "https://api.buildautomaton.com";
@@ -34599,7 +34599,7 @@ function createBridgeOnFileChange(opts) {
34599
34599
 
34600
34600
  // src/agents/acp/hooks/bridge-on-request.ts
34601
34601
  function createBridgeOnRequest(opts) {
34602
- const { routing, getSendRequest, log: log2, getAutoApproveAcpPermissions, resolveAcpPermissionRequest } = opts;
34602
+ const { routing, getSendRequest, log: log2, getAutoApproveAcpPermissions, resolveAcpPermissionRequest, nextTranscriptStreamSeq } = opts;
34603
34603
  return (request) => {
34604
34604
  const runId = routing.runId;
34605
34605
  const sessionId = routing.sessionId;
@@ -34628,6 +34628,7 @@ function createBridgeOnRequest(opts) {
34628
34628
  );
34629
34629
  }
34630
34630
  try {
34631
+ const transcriptStreamSeq = nextTranscriptStreamSeq?.(runId);
34631
34632
  sendReq({
34632
34633
  type: "session_update",
34633
34634
  ...sessionId ? { sessionId } : {},
@@ -34638,7 +34639,8 @@ function createBridgeOnRequest(opts) {
34638
34639
  requestId: request.requestId,
34639
34640
  method: request.method,
34640
34641
  params: request.params
34641
- }
34642
+ },
34643
+ ...transcriptStreamSeq != null ? { transcriptStreamSeq } : {}
34642
34644
  });
34643
34645
  } catch (err) {
34644
34646
  log2(
@@ -35039,7 +35041,7 @@ function sendSessionInfoTitleUpdate(params) {
35039
35041
 
35040
35042
  // src/agents/acp/hooks/bridge-on-session-update/create-bridge-on-session-update.ts
35041
35043
  function createBridgeOnSessionUpdate(opts) {
35042
- const { routing, getSendSessionUpdate, log: log2, sessionParentPath } = opts;
35044
+ const { routing, getSendSessionUpdate, log: log2, sessionParentPath, nextTranscriptStreamSeq } = opts;
35043
35045
  const pathTracker = new PathSnapshotTracker();
35044
35046
  return (params) => {
35045
35047
  const runId = routing.runId;
@@ -35117,12 +35119,14 @@ function createBridgeOnSessionUpdate(opts) {
35117
35119
  return;
35118
35120
  }
35119
35121
  try {
35122
+ const transcriptStreamSeq = nextTranscriptStreamSeq?.(runId);
35120
35123
  send({
35121
35124
  type: "session_update",
35122
35125
  ...sessionId ? { sessionId } : {},
35123
35126
  runId,
35124
35127
  kind: updateKind,
35125
- payload: params
35128
+ payload: params,
35129
+ ...transcriptStreamSeq != null ? { transcriptStreamSeq } : {}
35126
35130
  });
35127
35131
  } catch (err) {
35128
35132
  log2(
@@ -35135,10 +35139,17 @@ function createBridgeOnSessionUpdate(opts) {
35135
35139
 
35136
35140
  // src/agents/acp/hooks/build-acp-session-bridge-hooks.ts
35137
35141
  function buildAcpSessionBridgeHooks(opts) {
35142
+ const transcriptStreamSeqByRunId = /* @__PURE__ */ new Map();
35143
+ const nextTranscriptStreamSeq = (runId) => {
35144
+ const n = (transcriptStreamSeqByRunId.get(runId) ?? 0) + 1;
35145
+ transcriptStreamSeqByRunId.set(runId, n);
35146
+ return n;
35147
+ };
35148
+ const optsWithSeq = { ...opts, nextTranscriptStreamSeq };
35138
35149
  return {
35139
- onFileChange: createBridgeOnFileChange(opts),
35140
- onSessionUpdate: createBridgeOnSessionUpdate(opts),
35141
- onRequest: createBridgeOnRequest(opts)
35150
+ onFileChange: createBridgeOnFileChange(optsWithSeq),
35151
+ onSessionUpdate: createBridgeOnSessionUpdate(optsWithSeq),
35152
+ onRequest: createBridgeOnRequest(optsWithSeq)
35142
35153
  };
35143
35154
  }
35144
35155