replicas-engine 0.1.858 → 0.1.860

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.
@@ -5,11 +5,11 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-SKZCZTT6.js";
9
- import "./chunk-PU553XRF.js";
10
- import "./chunk-BSU4NUZ6.js";
8
+ } from "./chunk-DO6D3YZK.js";
9
+ import "./chunk-66QA65ND.js";
10
+ import "./chunk-EMSHUUZX.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-DWAYLUYH.js";
12
+ import "./chunk-4AQH6PWH.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -1022,35 +1022,6 @@ var CONTEXT_USAGE_EVENT_TYPE = "context-usage";
1022
1022
  // ../shared/src/engine/v1.ts
1023
1023
  import { z as z3 } from "zod";
1024
1024
  var MERGED_MESSAGE_SEPARATOR = "\n\n<!-- replicas:merged -->\n\n";
1025
- function isChatScopedEngineEvent(event) {
1026
- return event.type.startsWith("chat.");
1027
- }
1028
- function getChatScopedEngineEventChatId(event) {
1029
- return event.type === "chat.created" || event.type === "chat.updated" ? event.payload.chat.id : event.payload.chatId;
1030
- }
1031
- var CHAT_STREAM_RESYNC_EVENT_TYPE = "chat.stream.resync";
1032
- var CHAT_STREAM_READY_EVENT_TYPE = "chat.stream.ready";
1033
- var chatEventSubscriptionsSchema = z3.object({
1034
- chats: z3.array(z3.object({
1035
- workspaceId: z3.string().uuid(),
1036
- chatId: z3.string().min(1).max(256),
1037
- after: z3.string().regex(/^\d+-\d+$/)
1038
- })).min(1).max(256)
1039
- });
1040
- function isChatStreamEvent(value) {
1041
- return isRecord(value) && typeof value.id === "string" && typeof value.ts === "string" && typeof value.type === "string" && value.type.startsWith("chat.") && isRecord(value.payload);
1042
- }
1043
- var ENGINE_CHAT_EVENTS_PUSH_MAX_EVENTS = 500;
1044
- var chatScopedEngineEventSchema = z3.custom(
1045
- (value) => isChatStreamEvent(value) && value.type !== CHAT_STREAM_RESYNC_EVENT_TYPE && value.type !== CHAT_STREAM_READY_EVENT_TYPE
1046
- );
1047
- var engineChatEventsPushRequestSchema = z3.object({
1048
- epoch: z3.string().min(1).max(64),
1049
- events: z3.array(z3.object({
1050
- seq: z3.number().int().positive(),
1051
- event: chatScopedEngineEventSchema
1052
- })).max(ENGINE_CHAT_EVENTS_PUSH_MAX_EVENTS)
1053
- });
1054
1025
  var ENGINE_HEALTH_WAIT_HEADER = "X-Replicas-Health-Wait";
1055
1026
  var ENGINE_HEALTH_WAIT_QUERY_PARAM = "wait_ms";
1056
1027
  var ENGINE_HEALTH_MAX_WAIT_MS = 2e3;
@@ -1651,17 +1622,14 @@ var DESKTOP_STREAM_PORT = 6080;
1651
1622
  // ../shared/src/sse.ts
1652
1623
  function parseSseChunk(chunk) {
1653
1624
  let data = "";
1654
- let id = null;
1655
1625
  for (const line of chunk.split("\n")) {
1656
1626
  if (line.startsWith("data: ")) {
1657
1627
  data += line.slice(6);
1658
- } else if (line.startsWith("id: ")) {
1659
- id = line.slice(4);
1660
1628
  }
1661
1629
  }
1662
1630
  if (!data) return null;
1663
1631
  try {
1664
- return { event: JSON.parse(data), id };
1632
+ return JSON.parse(data);
1665
1633
  } catch {
1666
1634
  return null;
1667
1635
  }
@@ -1670,22 +1638,18 @@ async function readSseStream(body, onEvent, shouldContinue = () => true) {
1670
1638
  const reader = body.getReader();
1671
1639
  const decoder2 = new TextDecoder();
1672
1640
  let buffer = "";
1673
- try {
1674
- while (shouldContinue()) {
1675
- const { done, value } = await reader.read();
1676
- if (done) break;
1677
- buffer += decoder2.decode(value, { stream: true });
1678
- const chunks = buffer.split("\n\n");
1679
- buffer = chunks.pop() ?? "";
1680
- for (const chunk of chunks) {
1681
- if (!shouldContinue()) break;
1682
- const parsed = parseSseChunk(chunk);
1683
- if (!parsed) continue;
1684
- await onEvent(parsed.event, parsed.id);
1685
- }
1641
+ while (shouldContinue()) {
1642
+ const { done, value } = await reader.read();
1643
+ if (done) break;
1644
+ buffer += decoder2.decode(value, { stream: true });
1645
+ const chunks = buffer.split("\n\n");
1646
+ buffer = chunks.pop() ?? "";
1647
+ for (const chunk of chunks) {
1648
+ if (!shouldContinue()) break;
1649
+ const event = parseSseChunk(chunk);
1650
+ if (!event) continue;
1651
+ await onEvent(event);
1686
1652
  }
1687
- } finally {
1688
- await reader.cancel().catch(() => void 0);
1689
1653
  }
1690
1654
  }
1691
1655
 
@@ -3700,7 +3664,7 @@ var SENTRY_ABILITY = {
3700
3664
  };
3701
3665
 
3702
3666
  // ../shared/src/slack-response-style.ts
3703
- var SLACK_CONCISE_REPLY_SHAPE = "short and easy to read. Use common, everyday words, simple sentences, and contractions where they sound natural. Avoid jargon, corporate language, and formal words when a plain word works. Start with what happened or what works now, then add only the context, limits, or next step people need. Cut repetition and play-by-play, but keep anything important. Put long logs and file-by-file recaps in the pull request or workspace unless the user asks for them";
3667
+ var SLACK_CONCISE_REPLY_SHAPE = "short and easy to read. Lead with a concise, easy-to-skim answer; add depth when asked. Each send is a deliberate message, not an automatic split of a long answer. Simple requests need only a short answer or, where the surrounding instructions allow it, a fitting reaction. Use common, everyday words, simple sentences, and contractions where they sound natural. Avoid jargon, corporate language, and formal words when a plain word works. Start with what happened or what works now, then add only the context, limits, or next step people need. Cut repetition and play-by-play, but keep anything important. Put long logs and file-by-file recaps in the pull request or workspace unless the user asks for them";
3704
3668
  var SLACK_QUOTE_REPLY_GUIDANCE = "Use a short Slack blockquote (`> quoted text`) only when answering a specific earlier message or when the reply would otherwise have an unclear referent. Quote only the relevant line; do not quote the latest message by default, repeat the full request, or add a blockquote when the reply is already unambiguous. Escape the leading `<` in raw Slack mention and control markup such as `<@U\u2026>` and `<!channel>` as `&lt;` before quoting so it cannot notify anyone.";
3705
3669
  var SLACK_BLOCK_KIT_GUIDANCE = "Use Block Kit whenever structure or a link would make the message faster to scan or use. Before composing a structured message, read Slack's live [block catalog](https://docs.slack.dev/reference/block-kit/blocks) and the linked schema for each block you plan to use; do not rely on memory for which blocks exist or their fields. You have broad leeway to use display-only blocks and `actions` with URL buttons, but do not add controls that require an interaction callback. Keep simple replies as plain text, do not add decorative UI or repeat content across blocks, and always keep `text` as a concise, complete fallback for notifications and accessibility.";
3706
3670
  var SLACK_PR_BUTTON_GUIDANCE = 'The first time you share a given pull request or merge request link in a thread \u2014 the message announcing you opened it \u2014 attach a button for it: send `blocks` alongside `text` \u2014 a `section` block holding your message as `mrkdwn`, then an `actions` block with one element per newly shared link, `{"type": "button", "style": "primary", "text": {"type": "plain_text", "text": "View PR"}, "url": "<pr url>", "action_id": "view_pr"}`. Later messages about a pull request you already linked in this thread keep the link in the sentence and get no button, and never re-post a button for a link someone already has. Label it "View MR" for GitLab, and if there are several give each button a unique `action_id` and name its repository in the label ("View PR \xB7 web"). Always keep `text` populated with the same message \u2014 Slack uses it for notifications and fallback \u2014 and keep the link in the sentence too.';
@@ -8019,9 +7983,6 @@ export {
8019
7983
  coerceChatGoalPayload,
8020
7984
  CONTEXT_USAGE_EVENT_TYPE,
8021
7985
  MERGED_MESSAGE_SEPARATOR,
8022
- isChatScopedEngineEvent,
8023
- getChatScopedEngineEventChatId,
8024
- ENGINE_CHAT_EVENTS_PUSH_MAX_EVENTS,
8025
7986
  ENGINE_HEALTH_WAIT_HEADER,
8026
7987
  ENGINE_HEALTH_WAIT_QUERY_PARAM,
8027
7988
  ENGINE_HEALTH_MAX_WAIT_MS,
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-DWAYLUYH.js";
18
+ } from "./chunk-4AQH6PWH.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  shouldRefreshPullRequests
6
- } from "./chunk-DWAYLUYH.js";
6
+ } from "./chunk-4AQH6PWH.js";
7
7
 
8
8
  // src/services/post-tool-pr-notifier.ts
9
9
  async function notifyPostToolUse(toolName, toolInput) {
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  monolithRequest
6
- } from "./chunk-PU553XRF.js";
6
+ } from "./chunk-66QA65ND.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-DWAYLUYH.js";
11
+ } from "./chunk-4AQH6PWH.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -5,13 +5,13 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-PU553XRF.js";
8
+ } from "./chunk-66QA65ND.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  SUBPROCESS_MAX_BUFFER,
12
12
  buildCodexAgentEnv,
13
13
  execFileAsync
14
- } from "./chunk-BSU4NUZ6.js";
14
+ } from "./chunk-EMSHUUZX.js";
15
15
  import {
16
16
  isRecord
17
17
  } from "./chunk-UZSNFLDQ.js";
@@ -23,7 +23,7 @@ import {
23
23
  createSuccessResult,
24
24
  listOpenAICompatibleModels,
25
25
  resolveOpenAICompatibleModelsUrl
26
- } from "./chunk-DWAYLUYH.js";
26
+ } from "./chunk-4AQH6PWH.js";
27
27
 
28
28
  // src/managers/codex-token-manager.ts
29
29
  import { promises as fs } from "fs";
@@ -244,7 +244,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
244
244
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
245
245
  await this.applyCredentialsResponse(data);
246
246
  if (data.scope) setAgentCredentialSnapshot("codex", { method: data.type, scope: data.scope, revision: data.revision });
247
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-5YQXTWFE.js");
247
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-REU55HP6.js");
248
248
  await restartCodexAspHostIfRunning2();
249
249
  });
250
250
  await this.start(true);
@@ -264,7 +264,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
264
264
  await this.applyCredentialUpdate(generation, async () => {
265
265
  await this.applyCredentialsResponse(data);
266
266
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
267
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-5YQXTWFE.js");
267
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-REU55HP6.js");
268
268
  await restartCodexAspHostIfRunning2();
269
269
  }
270
270
  if (data.scope) {
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES,
6
6
  isVersionBelow
7
- } from "./chunk-DWAYLUYH.js";
7
+ } from "./chunk-4AQH6PWH.js";
8
8
 
9
9
  // src/utils/codex-agent-env.ts
10
10
  function buildCodexAgentEnv(source = process.env) {
@@ -241,7 +241,7 @@ var DEFAULT_CODEX_ARGS = [
241
241
  var MIN_CODEX_CLI_VERSION = "0.153.3";
242
242
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
243
243
  var codexCliVersionEnsured = null;
244
- var ENGINE_PACKAGE_VERSION = "0.1.858";
244
+ var ENGINE_PACKAGE_VERSION = "0.1.860";
245
245
  var INITIALIZE_METHOD = "initialize";
246
246
  var INITIALIZED_NOTIFICATION = "initialized";
247
247
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-U2ZVUWBP.js";
7
- import "./chunk-PU553XRF.js";
6
+ } from "./chunk-AN25X54K.js";
7
+ import "./chunk-66QA65ND.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-DWAYLUYH.js";
11
+ import "./chunk-4AQH6PWH.js";
12
12
  import "./chunk-VEQXQN22.js";
13
13
 
14
14
  // src/command-protection-hook.ts
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-U2ZVUWBP.js";
6
+ } from "./chunk-AN25X54K.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-CIIKJSMK.js";
10
- import "./chunk-PU553XRF.js";
9
+ } from "./chunk-6W3WWFMF.js";
10
+ import "./chunk-66QA65ND.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-DWAYLUYH.js";
12
+ import "./chunk-4AQH6PWH.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/deepseek-command-protection-plugin.ts
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  AppServerProcess,
10
10
  buildCodexAgentEnv
11
- } from "./chunk-BSU4NUZ6.js";
11
+ } from "./chunk-EMSHUUZX.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-DWAYLUYH.js";
16
+ } from "./chunk-4AQH6PWH.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
 
19
19
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  evaluateCommandProtection,
92
92
  extractToolCommand,
93
93
  reportCommandProtectionBlock
94
- } from "./chunk-U2ZVUWBP.js";
94
+ } from "./chunk-AN25X54K.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -132,20 +132,20 @@ import {
132
132
  recordCredentialFallback,
133
133
  recordExhaustedCredential,
134
134
  restartCodexAspHost
135
- } from "./chunk-SKZCZTT6.js";
135
+ } from "./chunk-DO6D3YZK.js";
136
136
  import {
137
137
  ENGINE_ENV,
138
138
  IS_WARMING_MODE,
139
139
  monolithRequest,
140
140
  monolithService,
141
141
  setAgentCredentialSnapshot
142
- } from "./chunk-PU553XRF.js";
142
+ } from "./chunk-66QA65ND.js";
143
143
  import {
144
144
  AspClient,
145
145
  SUBPROCESS_MAX_BUFFER,
146
146
  execAsync,
147
147
  execFileAsync
148
- } from "./chunk-BSU4NUZ6.js";
148
+ } from "./chunk-EMSHUUZX.js";
149
149
  import {
150
150
  isRecord as isRecord2
151
151
  } from "./chunk-UZSNFLDQ.js";
@@ -202,7 +202,6 @@ import {
202
202
  DEFAULT_RELAY_BASE_PROVIDER,
203
203
  DEFAULT_START_HOOK_TIMEOUT_MS,
204
204
  DESKTOP_STREAM_PORT,
205
- ENGINE_CHAT_EVENTS_PUSH_MAX_EVENTS,
206
205
  ENGINE_HEALTH_MAX_WAIT_MS,
207
206
  ENGINE_HEALTH_WAIT_HEADER,
208
207
  ENGINE_HEALTH_WAIT_QUERY_PARAM,
@@ -277,7 +276,6 @@ import {
277
276
  getChatExecutionProvider,
278
277
  getChatHistoryPageSenders,
279
278
  getChatHistoryPageWindow,
280
- getChatScopedEngineEventChatId,
281
279
  getChatTranscriptHistorySize,
282
280
  getClaudeModelContextWindow,
283
281
  getClaudePartialMessageStreamId,
@@ -303,7 +301,6 @@ import {
303
301
  isAuthenticationErrorText,
304
302
  isCanvasTextKind,
305
303
  isChatMessageSender,
306
- isChatScopedEngineEvent,
307
304
  isClaudeAuthErrorText,
308
305
  isClaudeResultError,
309
306
  isCodexAspTranscript,
@@ -359,7 +356,7 @@ import {
359
356
  waitRelaySubagentRequestSchema,
360
357
  withTimeout,
361
358
  workspaceCredentialProviderSchema
362
- } from "./chunk-DWAYLUYH.js";
359
+ } from "./chunk-4AQH6PWH.js";
363
360
  import {
364
361
  __commonJS,
365
362
  __export,
@@ -8552,7 +8549,7 @@ var require_dist2 = __commonJS({
8552
8549
  import { serve } from "@hono/node-server";
8553
8550
  import { Hono as Hono2 } from "hono";
8554
8551
  import { existsSync as existsSync20 } from "fs";
8555
- import { randomUUID as randomUUID16 } from "crypto";
8552
+ import { randomUUID as randomUUID15 } from "crypto";
8556
8553
  import { connect } from "net";
8557
8554
 
8558
8555
  // src/managers/github-token-manager.ts
@@ -64981,72 +64978,6 @@ var HeartbeatService = class _HeartbeatService {
64981
64978
  };
64982
64979
  var heartbeatService = new HeartbeatService();
64983
64980
 
64984
- // src/services/chat-event-publisher.ts
64985
- import { randomUUID as randomUUID15 } from "crypto";
64986
- var FLUSH_DELAY_MS = 100;
64987
- var REQUEST_TIMEOUT_MS = 1e4;
64988
- var MAX_QUEUE = 1e4;
64989
- var INITIAL_BACKOFF_MS = 1e3;
64990
- var MAX_BACKOFF_MS = 3e4;
64991
- var ChatEventPublisher = class {
64992
- epoch = randomUUID15();
64993
- seqByChat = /* @__PURE__ */ new Map();
64994
- queue = [];
64995
- timer = null;
64996
- flushing = false;
64997
- backoffMs = INITIAL_BACKOFF_MS;
64998
- unsupported = false;
64999
- start() {
65000
- if (IS_WARMING_MODE || !ENGINE_ENV.REPLICAS_WORKSPACE_ID) return;
65001
- eventService.subscribe((event) => this.enqueue(event));
65002
- }
65003
- enqueue(event) {
65004
- if (this.unsupported || !isChatScopedEngineEvent(event)) return;
65005
- const chatId = getChatScopedEngineEventChatId(event);
65006
- const seq = (this.seqByChat.get(chatId) ?? 0) + 1;
65007
- this.seqByChat.set(chatId, seq);
65008
- this.queue.push({ seq, event });
65009
- if (this.queue.length > MAX_QUEUE) this.queue.splice(0, this.queue.length - MAX_QUEUE);
65010
- this.schedule(FLUSH_DELAY_MS);
65011
- }
65012
- schedule(delayMs) {
65013
- if (this.timer || this.flushing) return;
65014
- this.timer = setTimeout(() => {
65015
- this.timer = null;
65016
- void this.flush();
65017
- }, delayMs);
65018
- this.timer.unref?.();
65019
- }
65020
- async flush() {
65021
- if (this.flushing || this.queue.length === 0) return;
65022
- this.flushing = true;
65023
- const batch = this.queue.slice(0, ENGINE_CHAT_EVENTS_PUSH_MAX_EVENTS);
65024
- try {
65025
- const body = { epoch: this.epoch, events: batch };
65026
- const response = await monolithRequest("/v1/engine/chat-events", { body, signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS) });
65027
- if (response.status === 404) {
65028
- this.unsupported = true;
65029
- this.queue = [];
65030
- return;
65031
- }
65032
- if (!response.ok) throw new Error(`chat events push returned ${response.status}`);
65033
- const lastSentIndex = this.queue.indexOf(batch[batch.length - 1]);
65034
- this.queue.splice(0, lastSentIndex + 1);
65035
- this.backoffMs = INITIAL_BACKOFF_MS;
65036
- } catch (error) {
65037
- console.warn("[ChatEventPublisher] Push failed:", error instanceof Error ? error.message : error);
65038
- this.flushing = false;
65039
- this.schedule(this.backoffMs);
65040
- this.backoffMs = Math.min(this.backoffMs * 2, MAX_BACKOFF_MS);
65041
- return;
65042
- } finally {
65043
- this.flushing = false;
65044
- }
65045
- if (this.queue.length > 0) this.schedule(0);
65046
- }
65047
- };
65048
- var chatEventPublisher = new ChatEventPublisher();
65049
-
65050
64981
  // src/services/workspace-sdk-service.ts
65051
64982
  import { cp, mkdir as mkdir23 } from "fs/promises";
65052
64983
  import { dirname as dirname20, resolve as resolve6 } from "path";
@@ -65258,7 +65189,7 @@ function startStatusBroadcaster() {
65258
65189
  if (serialized !== previousRepoStatus) {
65259
65190
  previousRepoStatus = serialized;
65260
65191
  eventService.publish({
65261
- id: randomUUID16(),
65192
+ id: randomUUID15(),
65262
65193
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65263
65194
  type: "repo.status.changed",
65264
65195
  payload: { repos }
@@ -65279,7 +65210,7 @@ function startStatusBroadcaster() {
65279
65210
  if (engineStatusJson !== previousEngineStatus) {
65280
65211
  previousEngineStatus = engineStatusJson;
65281
65212
  eventService.publish({
65282
- id: randomUUID16(),
65213
+ id: randomUUID15(),
65283
65214
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65284
65215
  type: "engine.status.changed",
65285
65216
  payload: { status: engineStatus }
@@ -65298,7 +65229,7 @@ function startStatusBroadcaster() {
65298
65229
  previousHookStatus = hookSnapshot;
65299
65230
  if (!lastHooksRunning && hooksRunning) {
65300
65231
  eventService.publish({
65301
- id: randomUUID16(),
65232
+ id: randomUUID15(),
65302
65233
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65303
65234
  type: "hooks.started",
65304
65235
  payload: { running: true, completed: false }
@@ -65307,7 +65238,7 @@ function startStatusBroadcaster() {
65307
65238
  }
65308
65239
  if (hooksRunning) {
65309
65240
  eventService.publish({
65310
- id: randomUUID16(),
65241
+ id: randomUUID15(),
65311
65242
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65312
65243
  type: "hooks.progress",
65313
65244
  payload: { running: true, completed: false }
@@ -65316,7 +65247,7 @@ function startStatusBroadcaster() {
65316
65247
  }
65317
65248
  if (lastHooksRunning && !hooksRunning && hooksCompleted && !hooksFailed) {
65318
65249
  eventService.publish({
65319
- id: randomUUID16(),
65250
+ id: randomUUID15(),
65320
65251
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65321
65252
  type: "hooks.completed",
65322
65253
  payload: { running: false, completed: true }
@@ -65325,7 +65256,7 @@ function startStatusBroadcaster() {
65325
65256
  }
65326
65257
  if (lastHooksRunning && !hooksRunning && hooksFailed) {
65327
65258
  eventService.publish({
65328
- id: randomUUID16(),
65259
+ id: randomUUID15(),
65329
65260
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65330
65261
  type: "hooks.failed",
65331
65262
  payload: { running: false, completed: hooksCompleted }
@@ -65333,7 +65264,7 @@ function startStatusBroadcaster() {
65333
65264
  });
65334
65265
  }
65335
65266
  eventService.publish({
65336
- id: randomUUID16(),
65267
+ id: randomUUID15(),
65337
65268
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65338
65269
  type: "hooks.status",
65339
65270
  payload: {
@@ -65380,7 +65311,6 @@ serve(
65380
65311
  resolveEngineReady();
65381
65312
  void registerDesktopPreview();
65382
65313
  heartbeatService.start(bootTimeMs);
65383
- chatEventPublisher.start();
65384
65314
  if (!IS_WARMING_MODE) {
65385
65315
  await gitlabTokenManager.start();
65386
65316
  await claudeTokenManager.start();
@@ -65389,20 +65319,20 @@ serve(
65389
65319
  }
65390
65320
  const repos = await gitService.listRepos();
65391
65321
  await eventService.publish({
65392
- id: randomUUID16(),
65322
+ id: randomUUID15(),
65393
65323
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65394
65324
  type: "repo.discovered",
65395
65325
  payload: { repos }
65396
65326
  });
65397
65327
  const repoStatuses = await gitService.listRepos();
65398
65328
  await eventService.publish({
65399
- id: randomUUID16(),
65329
+ id: randomUUID15(),
65400
65330
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65401
65331
  type: "repo.status.changed",
65402
65332
  payload: { repos: repoStatuses }
65403
65333
  });
65404
65334
  await eventService.publish({
65405
- id: randomUUID16(),
65335
+ id: randomUUID15(),
65406
65336
  ts: (/* @__PURE__ */ new Date()).toISOString(),
65407
65337
  type: "engine.ready",
65408
65338
  payload: { version: "v1" }
@@ -3,11 +3,11 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  notifyPostToolUse
6
- } from "./chunk-CIIKJSMK.js";
6
+ } from "./chunk-6W3WWFMF.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
- import "./chunk-DWAYLUYH.js";
10
+ import "./chunk-4AQH6PWH.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/post-tool-pr-hook.ts
@@ -11,7 +11,7 @@ import {
11
11
  relaySubagentResponseSchema,
12
12
  spawnRelaySubagentRequestSchema,
13
13
  waitRelaySubagentRequestSchema
14
- } from "./chunk-DWAYLUYH.js";
14
+ } from "./chunk-4AQH6PWH.js";
15
15
  import "./chunk-VEQXQN22.js";
16
16
 
17
17
  // src/relay-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.858",
3
+ "version": "0.1.860",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",