replicas-engine 0.1.571 → 0.1.572

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/src/index.js CHANGED
@@ -5139,7 +5139,7 @@ function messageForItem(item) {
5139
5139
  };
5140
5140
  }
5141
5141
  if (item.type === "reasoning") {
5142
- if (!item.text || item.status === "completed") return null;
5142
+ if (!item.text) return null;
5143
5143
  return {
5144
5144
  id: `reasoning-${item.id}`,
5145
5145
  type: "reasoning",
@@ -10780,7 +10780,7 @@ var DEFAULT_CODEX_ARGS = ["app-server", "--listen", "stdio://"];
10780
10780
  var MIN_CODEX_CLI_VERSION = "0.144.6";
10781
10781
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
10782
10782
  var codexCliVersionEnsured = null;
10783
- var ENGINE_PACKAGE_VERSION = "0.1.571";
10783
+ var ENGINE_PACKAGE_VERSION = "0.1.572";
10784
10784
  var INITIALIZE_METHOD = "initialize";
10785
10785
  var INITIALIZED_NOTIFICATION = "initialized";
10786
10786
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -16554,16 +16554,18 @@ var ChatService = class {
16554
16554
  chat.hasActiveTurn = false;
16555
16555
  chat.activeMessageId = null;
16556
16556
  this.analyticsService.noteTurnEnded(chatId);
16557
+ const completedAt = (/* @__PURE__ */ new Date()).toISOString();
16557
16558
  this.publish({
16558
16559
  type: "chat.turn.completed",
16559
16560
  payload: {
16560
16561
  chatId,
16561
16562
  isComplete: true,
16562
- processing: chat.provider.hasActiveBackgroundTasks?.() ?? false
16563
+ processing: chat.provider.hasActiveBackgroundTasks?.() ?? false,
16564
+ completedAt
16563
16565
  }
16564
16566
  }).catch(() => {
16565
16567
  });
16566
- monolithService.sendEvent({ type: "agent_response_complete", payload: {} }).catch(() => {
16568
+ monolithService.sendEvent({ type: "agent_response_complete", payload: { completedAt } }).catch(() => {
16567
16569
  });
16568
16570
  uploadChatTranscript(
16569
16571
  chatId,
@@ -16575,7 +16577,7 @@ var ChatService = class {
16575
16577
  flushAllCanvasItems().catch((err) => {
16576
16578
  console.error("[ChatService] Failed to upload canvas items:", { chatId, err });
16577
16579
  });
16578
- await this.publishAgentTurnCompleteWebhook(chat);
16580
+ await this.publishAgentTurnCompleteWebhook(chat, completedAt);
16579
16581
  }
16580
16582
  getRuntimeChat(chatId) {
16581
16583
  const chat = this.chats.get(chatId) ?? null;
@@ -16657,7 +16659,7 @@ var ChatService = class {
16657
16659
  } catch {
16658
16660
  }
16659
16661
  }
16660
- async publishAgentTurnCompleteWebhook(chat) {
16662
+ async publishAgentTurnCompleteWebhook(chat, completedAt) {
16661
16663
  await Promise.all([
16662
16664
  githubTokenManager.refreshOnce().catch(() => {
16663
16665
  }),
@@ -16689,6 +16691,7 @@ var ChatService = class {
16689
16691
  try {
16690
16692
  const payload = {
16691
16693
  ...linearSessionId ? { linearSessionId } : {},
16694
+ ...completedAt ? { completedAt } : {},
16692
16695
  repoStatuses,
16693
16696
  ...errors?.length ? { errors } : {},
16694
16697
  ...errors?.length && errorNotificationTarget ? { errorNotificationTarget } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.571",
3
+ "version": "0.1.572",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",