replicas-engine 0.1.1396 → 0.1.1399

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.
@@ -8,12 +8,12 @@ import {
8
8
  listRunningCodexModels,
9
9
  restartCodexAspHost,
10
10
  restartCodexAspHostIfRunning
11
- } from "./chunk-5E5VR45A.js";
12
- import "./chunk-SAKMDQVZ.js";
13
- import "./chunk-4Q4SOJUT.js";
14
- import "./chunk-X26DQM4O.js";
11
+ } from "./chunk-CXZYVVVW.js";
12
+ import "./chunk-PT2A7PFQ.js";
13
+ import "./chunk-BR53QBDK.js";
14
+ import "./chunk-F35HDB4V.js";
15
15
  import "./chunk-UZSNFLDQ.js";
16
- import "./chunk-PLWH35VJ.js";
16
+ import "./chunk-FYNT73JM.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
  export {
19
19
  CODEX_ULTRAFAST_SERVICE_TIER,
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  execFileAsync
6
- } from "./chunk-X26DQM4O.js";
6
+ } from "./chunk-F35HDB4V.js";
7
7
  import {
8
8
  isVersionBelow
9
- } from "./chunk-PLWH35VJ.js";
9
+ } from "./chunk-FYNT73JM.js";
10
10
 
11
11
  // src/utils/codex-agent-env.ts
12
12
  function buildCodexAgentEnv(source = process.env) {
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
240
240
  if (method === "foundry") return "azure";
241
241
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
242
242
  }
243
- var ENGINE_PACKAGE_VERSION = "0.1.1396";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1399";
244
244
  var INITIALIZE_METHOD = "initialize";
245
245
  var INITIALIZED_NOTIFICATION = "initialized";
246
246
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -10,15 +10,15 @@ import {
10
10
  resolveDiffBase,
11
11
  runGitCommand,
12
12
  setAgentCredentialSnapshot
13
- } from "./chunk-SAKMDQVZ.js";
13
+ } from "./chunk-PT2A7PFQ.js";
14
14
  import {
15
15
  AppServerProcess,
16
16
  buildCodexAgentEnv
17
- } from "./chunk-4Q4SOJUT.js";
17
+ } from "./chunk-BR53QBDK.js";
18
18
  import {
19
19
  SUBPROCESS_MAX_BUFFER,
20
20
  execFileAsync
21
- } from "./chunk-X26DQM4O.js";
21
+ } from "./chunk-F35HDB4V.js";
22
22
  import {
23
23
  isRecord
24
24
  } from "./chunk-UZSNFLDQ.js";
@@ -56,7 +56,7 @@ import {
56
56
  resolveOpenAICompatibleModelsUrl,
57
57
  splitMothershipInstructions,
58
58
  withTimeout
59
- } from "./chunk-PLWH35VJ.js";
59
+ } from "./chunk-FYNT73JM.js";
60
60
 
61
61
  // src/managers/codex-token-manager.ts
62
62
  import { promises as fs } from "fs";
@@ -319,7 +319,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
319
319
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
320
320
  await this.applyCredentialsResponse(data);
321
321
  setAgentCredentialSnapshot("codex", data);
322
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-XIJLW32T.js");
322
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-K6Y7KM2R.js");
323
323
  await restartCodexAspHostIfRunning2();
324
324
  });
325
325
  await this.start(true);
@@ -341,7 +341,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
341
341
  const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
342
342
  await this.applyCredentialsResponse(data);
343
343
  if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
344
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-XIJLW32T.js");
344
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-K6Y7KM2R.js");
345
345
  await restartCodexAspHostIfRunning2();
346
346
  }
347
347
  setAgentCredentialSnapshot("codex", data);
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES
6
- } from "./chunk-PLWH35VJ.js";
6
+ } from "./chunk-FYNT73JM.js";
7
7
 
8
8
  // src/utils/exec.ts
9
9
  import { exec, execFile } from "child_process";
@@ -11108,7 +11108,8 @@ function chatHistoryPageParamsFromQuery(rawQuery) {
11108
11108
  beforeCursor: query.beforeCursor || void 0,
11109
11109
  afterCursor: query.afterCursor || void 0,
11110
11110
  userTurns: parse(query.userTurns) || void 0,
11111
- compact: query.compact === "1" || void 0
11111
+ compact: query.compact === "1" || void 0,
11112
+ subagents: query.subagents === "1" || void 0
11112
11113
  };
11113
11114
  }
11114
11115
  function getChatHistoryPageWindow(totalItems, limit, before) {
@@ -14800,6 +14801,7 @@ function normalizeBackgroundTaskStatus(status) {
14800
14801
  var USER_MESSAGE_MATCH_GRACE_PERIOD_MS = 3e4;
14801
14802
  var COMPACTION_CONTENT = "Context compacted";
14802
14803
  var GOAL_TOOL_NAME = "goal";
14804
+ var CLAUDE_SUBAGENT_TOOL_NAMES = /* @__PURE__ */ new Set(["Task", "Agent"]);
14803
14805
 
14804
14806
  // ../shared/src/user-message-parser/chat-fork.ts
14805
14807
  var OPEN_MARKER = "<!-- replicas:chat-fork ";
@@ -17797,7 +17799,7 @@ function parseClaudeEvents(events, parentToolUseId) {
17797
17799
  toolName,
17798
17800
  input: toolInput
17799
17801
  });
17800
- if (toolName === "Task" || toolName === "Agent") {
17802
+ if (CLAUDE_SUBAGENT_TOOL_NAMES.has(toolName)) {
17801
17803
  const inputObj = typeof toolInput === "string" ? safeJsonParse(toolInput, {}) : toolInput;
17802
17804
  const nestedEvents = collectNestedEvents(toolUseId);
17803
17805
  messages.push(createSubagentMessage(event.timestamp, {
@@ -18032,6 +18034,7 @@ function parseClaudeEvents(events, parentToolUseId) {
18032
18034
  if (toolMessage?.type === "subagent") {
18033
18035
  message2.prompt ??= toolMessage.prompt;
18034
18036
  message2.subagentType ??= toolMessage.subagentType;
18037
+ toolMessage.status = message2.status === "stopped" ? "failed" : message2.status;
18035
18038
  }
18036
18039
  }
18037
18040
  }
@@ -18364,6 +18367,16 @@ async function readExactRange(readRange, startByte, endByte, error) {
18364
18367
  if (bytes.length !== endByte - startByte) throw new Error(error);
18365
18368
  return bytes;
18366
18369
  }
18370
+ function forEachJsonlRecord(bytes, lineStart, offset, visit) {
18371
+ for (let lineEnd = bytes.indexOf(10, lineStart); lineEnd !== -1; lineEnd = bytes.indexOf(10, lineStart)) {
18372
+ try {
18373
+ visit(JSON.parse(decoder.decode(bytes.subarray(lineStart, lineEnd))), { offset: offset + lineStart, length: lineEnd - lineStart });
18374
+ } catch {
18375
+ }
18376
+ lineStart = lineEnd + 1;
18377
+ }
18378
+ return lineStart;
18379
+ }
18367
18380
  async function readJsonlPage(args) {
18368
18381
  const maxBytes = args.maxBytes ?? Infinity;
18369
18382
  const rangeBytes = Number.isFinite(maxBytes) ? Math.min(maxBytes, MAX_SOURCE_PAGE_BYTES) : SOURCE_RANGE_BYTES;
@@ -18405,23 +18418,16 @@ async function readJsonlPage(args) {
18405
18418
  const firstLineEnd = bytes.indexOf(10);
18406
18419
  const page = [];
18407
18420
  const pageRecordStarts = [];
18408
- let lineStart = startByte > 0 ? firstLineEnd + 1 : 0;
18409
- for (let lineEnd = bytes.indexOf(10, lineStart); lineEnd !== -1; lineEnd = bytes.indexOf(10, lineStart)) {
18410
- try {
18411
- const value = JSON.parse(decoder.decode(bytes.subarray(lineStart, lineEnd)));
18412
- pageRecordStarts.push(startByte + lineStart);
18413
- const item = args.parse(value, { offset: startByte + lineStart, length: lineEnd - lineStart });
18414
- if (item !== void 0) {
18415
- const itemSize = item === value ? lineEnd - lineStart : encoder.encode(JSON.stringify(item)).byteLength;
18416
- page.push({ item, startByte: startByte + lineStart, bytes: itemSize });
18417
- itemBytes += itemSize;
18418
- const turnId = args.turns?.turnId(item);
18419
- if (turnId !== void 0) turnIds.add(turnId);
18420
- }
18421
- } catch {
18422
- }
18423
- lineStart = lineEnd + 1;
18424
- }
18421
+ forEachJsonlRecord(bytes, startByte > 0 ? firstLineEnd + 1 : 0, startByte, (value, record) => {
18422
+ pageRecordStarts.push(record.offset);
18423
+ const item = args.parse(value, record);
18424
+ if (item === void 0) return;
18425
+ const itemSize = item === value ? record.length : encoder.encode(JSON.stringify(item)).byteLength;
18426
+ page.push({ item, startByte: record.offset, bytes: itemSize });
18427
+ itemBytes += itemSize;
18428
+ const turnId = args.turns?.turnId(item);
18429
+ if (turnId !== void 0) turnIds.add(turnId);
18430
+ });
18425
18431
  head = firstLineEnd === -1 ? bytes : bytes.subarray(0, startByte > 0 ? firstLineEnd : 0);
18426
18432
  headTerminated = firstLineEnd !== -1;
18427
18433
  pages.push(page);
@@ -18493,16 +18499,30 @@ async function readJsonlAppended(args) {
18493
18499
  const bytes = await readExactRange(args.readRange, from, args.size, "Incomplete JSONL append read");
18494
18500
  if (start > 0 && bytes[0] !== 10) return null;
18495
18501
  const items = [];
18496
- let lineStart = start - from;
18497
- for (let lineEnd = bytes.indexOf(10, lineStart); lineEnd !== -1; lineEnd = bytes.indexOf(10, lineStart)) {
18498
- try {
18499
- const item = args.parse(JSON.parse(decoder.decode(bytes.subarray(lineStart, lineEnd))), { offset: from + lineStart, length: lineEnd - lineStart });
18502
+ const end = forEachJsonlRecord(bytes, start - from, from, (value, record) => {
18503
+ const item = args.parse(value, record);
18504
+ if (item !== void 0) items.push(item);
18505
+ });
18506
+ return { items, after: String(from + end) };
18507
+ }
18508
+ var FORWARD_RANGE_BYTES = 8 * 1024 * 1024;
18509
+ async function readJsonlForward(args) {
18510
+ const items = [];
18511
+ let carry = new Uint8Array();
18512
+ let carryOffset = 0;
18513
+ for (let start = 0; start < args.size; start += FORWARD_RANGE_BYTES) {
18514
+ const chunk = await readExactRange(args.readRange, start, Math.min(args.size, start + FORWARD_RANGE_BYTES), "Incomplete JSONL read");
18515
+ const bytes = new Uint8Array(carry.length + chunk.length);
18516
+ bytes.set(carry);
18517
+ bytes.set(chunk, carry.length);
18518
+ const end = forEachJsonlRecord(bytes, 0, carryOffset, (value, record) => {
18519
+ const item = args.parse(value, record);
18500
18520
  if (item !== void 0) items.push(item);
18501
- } catch {
18502
- }
18503
- lineStart = lineEnd + 1;
18521
+ });
18522
+ carry = bytes.subarray(end);
18523
+ carryOffset += end;
18504
18524
  }
18505
- return { items, after: String(from + lineStart) };
18525
+ return items;
18506
18526
  }
18507
18527
  var MAX_RECORD_BYTES = 64 * 1024 * 1024;
18508
18528
  async function readJsonlRecord(args) {
@@ -18674,6 +18694,34 @@ function parseCodexHistoryEvents(content, options) {
18674
18694
  for (const event of parseAgentEventJsonl(content, options)) folder.push(event);
18675
18695
  return folder.finish();
18676
18696
  }
18697
+ function createSubagentHistoryFilter() {
18698
+ const spawnIds = /* @__PURE__ */ new Set();
18699
+ return (event) => {
18700
+ const { type, payload } = event;
18701
+ if (typeof payload.parent_tool_use_id === "string" || getUserMessageId(event) !== null || getReplacedMessageId(event) !== null) return true;
18702
+ if (type === CODEX_ITEM_EVENT_TYPE) return codexItemFromEvent(event)?.item.type === "subagent";
18703
+ if (coerceBackgroundTaskPayload(payload)) return true;
18704
+ const blocks = normalizeContentBlocks(isRecord(payload.message) ? payload.message.content : void 0);
18705
+ if (type === "claude-assistant") {
18706
+ const spawns = blocks.filter((block) => block.type === "tool_use" && block.id && CLAUDE_SUBAGENT_TOOL_NAMES.has(block.name ?? ""));
18707
+ for (const block of spawns) if (block.id) spawnIds.add(block.id);
18708
+ return spawns.length > 0;
18709
+ }
18710
+ return type === "claude-user" && blocks.some((block) => block.type === "tool_result" && spawnIds.has(block.tool_use_id ?? ""));
18711
+ };
18712
+ }
18713
+ function readChatSubagentHistory({ size, compact, readRange }) {
18714
+ const keep = createSubagentHistoryFilter();
18715
+ return readJsonlForward({
18716
+ size,
18717
+ readRange,
18718
+ parse: (value, record) => {
18719
+ const event = toChatHistoryPageEvent(value);
18720
+ if (!event || !keep(event)) return void 0;
18721
+ return compact ? compactChatHistoryEvent(event, record) : event;
18722
+ }
18723
+ });
18724
+ }
18677
18725
 
18678
18726
  // ../shared/src/memory-safety.ts
18679
18727
  var SECRET_PATTERNS = [
@@ -20870,6 +20918,7 @@ export {
20870
20918
  readChatHistoryRecord,
20871
20919
  codexHistoryFormatEvent,
20872
20920
  CodexHistoryEventFolder,
20921
+ readChatSubagentHistory,
20873
20922
  canonicalizeChatTranscriptBlocks,
20874
20923
  lastUserBlockText,
20875
20924
  percentage,
@@ -6,7 +6,7 @@ import {
6
6
  getOriginDefaultBranch,
7
7
  monolithRequest,
8
8
  runGitCommand
9
- } from "./chunk-SAKMDQVZ.js";
9
+ } from "./chunk-PT2A7PFQ.js";
10
10
  import {
11
11
  extractCommandProtectionCommandText,
12
12
  findCommandProtectionGitLookups,
@@ -14,7 +14,7 @@ import {
14
14
  findPrMergeSignals,
15
15
  findScoutRepoWriteSignals,
16
16
  parseCommandProtectionRequest
17
- } from "./chunk-PLWH35VJ.js";
17
+ } from "./chunk-FYNT73JM.js";
18
18
 
19
19
  // src/services/command-protection-service.ts
20
20
  import { readFile, stat } from "fs/promises";
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-PLWH35VJ.js";
8
+ } from "./chunk-FYNT73JM.js";
9
9
 
10
10
  // src/services/published-pull-request-urls.ts
11
11
  function publishedPullRequestUrls(result) {
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  SUBPROCESS_MAX_BUFFER,
6
6
  execFileAsync
7
- } from "./chunk-X26DQM4O.js";
7
+ } from "./chunk-F35HDB4V.js";
8
8
  import {
9
9
  isRecord as isRecord2
10
10
  } from "./chunk-UZSNFLDQ.js";
@@ -21,7 +21,7 @@ import {
21
21
  provisionedDeviceSchema,
22
22
  readReplicasRuntimeEnv,
23
23
  serializePosixEnvFile
24
- } from "./chunk-PLWH35VJ.js";
24
+ } from "./chunk-FYNT73JM.js";
25
25
 
26
26
  // src/runtime-env-loader.ts
27
27
  import { readFileSync } 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
  AspClient
6
- } from "./chunk-4Q4SOJUT.js";
6
+ } from "./chunk-BR53QBDK.js";
7
7
  import {
8
8
  ASTER_BASE_URL,
9
9
  ASTER_PROVIDER,
@@ -15,7 +15,7 @@ import {
15
15
  isRecord,
16
16
  readOllamaAuthEnv,
17
17
  readOpenAICompatibleAuthEnv
18
- } from "./chunk-PLWH35VJ.js";
18
+ } from "./chunk-FYNT73JM.js";
19
19
 
20
20
  // src/managers/codex-asp/notification-dispatch.ts
21
21
  var TURN_STARTED_METHOD = "turn/started";
@@ -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-LOSMI7ZJ.js";
7
- import "./chunk-SAKMDQVZ.js";
8
- import "./chunk-X26DQM4O.js";
6
+ } from "./chunk-MMXN6UVW.js";
7
+ import "./chunk-PT2A7PFQ.js";
8
+ import "./chunk-F35HDB4V.js";
9
9
  import {
10
10
  isRecord
11
11
  } from "./chunk-UZSNFLDQ.js";
12
- import "./chunk-PLWH35VJ.js";
12
+ import "./chunk-FYNT73JM.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/command-protection-hook.ts
@@ -14,12 +14,12 @@ import {
14
14
  recoverCompletedTurn,
15
15
  spawnMuseMsp,
16
16
  startMuseSession
17
- } from "./chunk-SO2UIHUL.js";
17
+ } from "./chunk-VRC2OBLV.js";
18
18
  import {
19
19
  AppServerProcess,
20
20
  buildCodexAgentEnv
21
- } from "./chunk-4Q4SOJUT.js";
22
- import "./chunk-X26DQM4O.js";
21
+ } from "./chunk-BR53QBDK.js";
22
+ import "./chunk-F35HDB4V.js";
23
23
  import {
24
24
  AGENT,
25
25
  OPENCODE_GO_PROVIDER,
@@ -29,7 +29,7 @@ import {
29
29
  headlessAgentUsagePath,
30
30
  isRecord,
31
31
  withTimeout
32
- } from "./chunk-PLWH35VJ.js";
32
+ } from "./chunk-FYNT73JM.js";
33
33
  import "./chunk-VEQXQN22.js";
34
34
 
35
35
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -27,7 +27,7 @@ import {
27
27
  evaluateCommandProtection,
28
28
  extractToolCommand,
29
29
  reportCommandProtectionBlock
30
- } from "./chunk-LOSMI7ZJ.js";
30
+ } from "./chunk-MMXN6UVW.js";
31
31
  import {
32
32
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
33
33
  AGENT_MESSAGE_DELTA_METHOD,
@@ -65,10 +65,10 @@ import {
65
65
  spawnMuseMsp,
66
66
  startMuseSession,
67
67
  uuidV7
68
- } from "./chunk-SO2UIHUL.js";
68
+ } from "./chunk-VRC2OBLV.js";
69
69
  import {
70
70
  publishedPullRequestUrls
71
- } from "./chunk-GYXINP6G.js";
71
+ } from "./chunk-NM7LRVLC.js";
72
72
  import {
73
73
  ACCOUNT_RATE_LIMITS_READ_METHOD,
74
74
  AsyncLock,
@@ -143,7 +143,7 @@ import {
143
143
  timestampFromSeconds,
144
144
  upsertCredentialFileLines,
145
145
  writeSecureCredentialFile
146
- } from "./chunk-5E5VR45A.js";
146
+ } from "./chunk-CXZYVVVW.js";
147
147
  import {
148
148
  ENGINE_ENV,
149
149
  monolithRequest,
@@ -153,15 +153,15 @@ import {
153
153
  resolveDiffBase,
154
154
  setAgentCredentialSnapshot,
155
155
  setLinearSessionId
156
- } from "./chunk-SAKMDQVZ.js";
156
+ } from "./chunk-PT2A7PFQ.js";
157
157
  import {
158
158
  getCodexModelProvider
159
- } from "./chunk-4Q4SOJUT.js";
159
+ } from "./chunk-BR53QBDK.js";
160
160
  import {
161
161
  SUBPROCESS_MAX_BUFFER,
162
162
  execAsync,
163
163
  execFileAsync
164
- } from "./chunk-X26DQM4O.js";
164
+ } from "./chunk-F35HDB4V.js";
165
165
  import {
166
166
  isRecord as isRecord2
167
167
  } from "./chunk-UZSNFLDQ.js";
@@ -398,6 +398,7 @@ import {
398
398
  readChatHistoryAppended,
399
399
  readChatHistoryPage,
400
400
  readChatHistoryRecord,
401
+ readChatSubagentHistory,
401
402
  readOllamaAuthEnv,
402
403
  readOpenAICompatibleAuthEnv,
403
404
  readReplicasRuntimeEnv,
@@ -427,7 +428,7 @@ import {
427
428
  workspaceTokenRequestSchema,
428
429
  workspaceTokenResponseSchema,
429
430
  wrapInTag
430
- } from "./chunk-PLWH35VJ.js";
431
+ } from "./chunk-FYNT73JM.js";
431
432
  import {
432
433
  cloneMcpConfig,
433
434
  ensureCompatibilityImports,
@@ -8670,6 +8671,7 @@ import { serve } from "@hono/node-server";
8670
8671
  import { Hono as Hono2 } from "hono";
8671
8672
  import { randomUUID as randomUUID11 } from "crypto";
8672
8673
  import { connect } from "net";
8674
+ import { Agent as Agent2, getGlobalDispatcher, setGlobalDispatcher } from "undici";
8673
8675
  import { WebSocketServer } from "ws";
8674
8676
 
8675
8677
  // src/managers/github-token-manager.ts
@@ -12856,6 +12858,10 @@ var CodexHistoryFile = class {
12856
12858
  return folder.finish();
12857
12859
  }
12858
12860
  async loadEventsPage(page2) {
12861
+ if (page2.subagents) {
12862
+ const events = await this.read((size, readRange) => readChatSubagentHistory({ size, compact: page2.compact, readRange }));
12863
+ return { events: events ?? [], beforeCursor: null };
12864
+ }
12859
12865
  if (page2.limit === void 0) return { events: await this.loadAll() };
12860
12866
  const cursor = parseChatHistoryCursor(page2.beforeCursor);
12861
12867
  if (page2.beforeCursor !== void 0 && cursor?.mode !== "range") throw new RangeError("Invalid chat history cursor");
@@ -65035,6 +65041,9 @@ async function activate(requested) {
65035
65041
  }
65036
65042
  lifecycle.claim(workspaceId);
65037
65043
  await stopWorkspaceServices();
65044
+ const pausedDispatcher = getGlobalDispatcher();
65045
+ setGlobalDispatcher(new Agent2());
65046
+ void pausedDispatcher.close();
65038
65047
  reloadEngineEnv(runtimeEnvFile);
65039
65048
  startupStartedAt = performance.now();
65040
65049
  backgroundController = new AbortController();
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  publishedPullRequestUrls
6
- } from "./chunk-GYXINP6G.js";
6
+ } from "./chunk-NM7LRVLC.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
10
  import {
11
11
  shouldRefreshPullRequests
12
- } from "./chunk-PLWH35VJ.js";
12
+ } from "./chunk-FYNT73JM.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/services/post-tool-pr-notifier.ts
@@ -11,7 +11,7 @@ import {
11
11
  spawnSubagentRequestSchema,
12
12
  subagentResponseSchema,
13
13
  waitSubagentRequestSchema
14
- } from "./chunk-PLWH35VJ.js";
14
+ } from "./chunk-FYNT73JM.js";
15
15
  import "./chunk-VEQXQN22.js";
16
16
 
17
17
  // src/subagent-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.1396",
3
+ "version": "0.1.1399",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",