replicas-engine 0.1.1581 → 0.1.1582

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
  listCodexModelsForDetails,
9
9
  restartCodexAspHost,
10
10
  restartCodexAspHostIfRunning
11
- } from "./chunk-JXAVTXFQ.js";
12
- import "./chunk-ZO7ASWWU.js";
13
- import "./chunk-4DWEAKTO.js";
14
- import "./chunk-JWX5Y2P5.js";
11
+ } from "./chunk-BZFUTV2V.js";
12
+ import "./chunk-GCYNUHRN.js";
13
+ import "./chunk-K62FBANU.js";
14
+ import "./chunk-XOFTV2KD.js";
15
15
  import "./chunk-UZSNFLDQ.js";
16
- import "./chunk-LZGOIVY5.js";
16
+ import "./chunk-EIU3AU5A.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
  export {
19
19
  CODEX_ULTRAFAST_SERVICE_TIER,
@@ -6,7 +6,7 @@ import {
6
6
  getOriginDefaultBranch,
7
7
  monolithRequest,
8
8
  runGitCommand
9
- } from "./chunk-ZO7ASWWU.js";
9
+ } from "./chunk-GCYNUHRN.js";
10
10
  import {
11
11
  extractCommandProtectionCommandText,
12
12
  findCommandProtectionGitLookups,
@@ -15,7 +15,7 @@ import {
15
15
  findScoutRepoWriteSignals,
16
16
  parseCommandProtectionRequest,
17
17
  withE2BRetry
18
- } from "./chunk-LZGOIVY5.js";
18
+ } from "./chunk-EIU3AU5A.js";
19
19
 
20
20
  // src/services/command-protection-service.ts
21
21
  import { readFile, stat } from "fs/promises";
@@ -12,15 +12,15 @@ import {
12
12
  resolveDiffBase,
13
13
  runGitCommand,
14
14
  setAgentCredentialSnapshot
15
- } from "./chunk-ZO7ASWWU.js";
15
+ } from "./chunk-GCYNUHRN.js";
16
16
  import {
17
17
  AppServerProcess,
18
18
  buildCodexAgentEnv
19
- } from "./chunk-4DWEAKTO.js";
19
+ } from "./chunk-K62FBANU.js";
20
20
  import {
21
21
  SUBPROCESS_MAX_BUFFER,
22
22
  execFileAsync
23
- } from "./chunk-JWX5Y2P5.js";
23
+ } from "./chunk-XOFTV2KD.js";
24
24
  import {
25
25
  isRecord
26
26
  } from "./chunk-UZSNFLDQ.js";
@@ -61,7 +61,7 @@ import {
61
61
  shrunkImageSize,
62
62
  splitMothershipInstructions,
63
63
  withTimeout
64
- } from "./chunk-LZGOIVY5.js";
64
+ } from "./chunk-EIU3AU5A.js";
65
65
 
66
66
  // src/managers/codex-token-manager.ts
67
67
  import { promises as fs } from "fs";
@@ -461,7 +461,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
461
461
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
462
462
  await this.applyCredentialsResponse(data);
463
463
  setAgentCredentialSnapshot("codex", data);
464
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-KHGA2DU7.js");
464
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-D3CGQHLH.js");
465
465
  await restartCodexAspHostIfRunning2();
466
466
  });
467
467
  await this.start(true);
@@ -483,7 +483,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
483
483
  const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
484
484
  await this.applyCredentialsResponse(data);
485
485
  if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
486
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-KHGA2DU7.js");
486
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-D3CGQHLH.js");
487
487
  await restartCodexAspHostIfRunning2();
488
488
  }
489
489
  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
  AspClient
6
- } from "./chunk-4DWEAKTO.js";
6
+ } from "./chunk-K62FBANU.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-LZGOIVY5.js";
18
+ } from "./chunk-EIU3AU5A.js";
19
19
 
20
20
  // src/managers/codex-asp/notification-dispatch.ts
21
21
  var TURN_STARTED_METHOD = "turn/started";
@@ -12205,6 +12205,7 @@ var REPLICAS_MCP_TOOLS = {
12205
12205
  getBoard: "get_board",
12206
12206
  updateBoard: "update_board",
12207
12207
  updateTicket: "update_ticket",
12208
+ replyOnTicket: "reply_on_ticket",
12208
12209
  sendToChat: "send_to_chat",
12209
12210
  getLinearRouting: "get_linear_routing",
12210
12211
  setLinearRouting: "set_linear_routing",
@@ -15243,6 +15244,8 @@ function splitMothershipInstructions(customInstructions) {
15243
15244
  mothershipInstructions: match?.[1]
15244
15245
  };
15245
15246
  }
15247
+ var MOTHERSHIP_TICKET_MESSAGE_NOTE = `The user sent this from your ticket on the Mothership's board and reads your answer there, not in this chat. Answer them with \`${REPLICAS_MCP_TOOLS.replyOnTicket}\`: briefly, with a link or screenshot if it helps, and a follow-up question only if you need one. Keep longer work and detail in this chat.`;
15248
+ var MOTHERSHIP_TICKET_REPLY_NUDGE = `The user is still waiting for your answer on your ticket, and they only read the ticket. Answer them now with \`${REPLICAS_MCP_TOOLS.replyOnTicket}\`, briefly.`;
15246
15249
  var T = REPLICAS_MCP_TOOLS;
15247
15250
  var SCOUT_LINEAR_RULES = `Linear issue triage: team instructions define what is actionable. Use \`replicas.linear.graphql\` from \`@replicas/sdk\` for every Linear read and mutation, never a Replicas CLI command. Choose exactly one:
15248
15251
  1. **Ignore** issues the team instructions leave to humans or that should not start work: do nothing and write nothing to Linear. If \`agent_session_id\` is set because you asked a question earlier, create a \`response\` Agent Activity on it with one short closing response.
@@ -15296,7 +15299,7 @@ function parseMessageOrigin(raw) {
15296
15299
  }
15297
15300
 
15298
15301
  // ../shared/src/mothership-events.ts
15299
- var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "approved", "merged", "closed", "archived"];
15302
+ var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "approved", "merged", "closed", "archived", "replied"];
15300
15303
  var UNKNOWN_EVENT_KIND = "update";
15301
15304
  var MOTHERSHIP_TURN_ERROR_SUMMARY = "Turn ended with an error.";
15302
15305
  var MOTHERSHIP_EVENT_TYPE = "multitask-event";
@@ -15311,6 +15314,7 @@ var mothershipEventSchema = z25.object({
15311
15314
  detail: z25.string().optional(),
15312
15315
  // Set when the subagent is a chat in this workspace rather than a ship; agentId is then that chat's id.
15313
15316
  chatId: z25.string().optional(),
15317
+ ticket: z25.object({ id: z25.string(), title: z25.string() }).optional(),
15314
15318
  // Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
15315
15319
  noticed: z25.boolean().optional()
15316
15320
  });
@@ -15327,7 +15331,7 @@ function truncateMothershipEventResponse(response, readTool) {
15327
15331
  }
15328
15332
  function formatMothershipEvents(events) {
15329
15333
  return events.map((event) => {
15330
- const attributes = { id: event.id, at: event.at, kind: event.kind, agent: event.agentName, agent_id: event.agentId, ...event.chatId ? { chat_id: event.chatId } : {}, ...event.noticed ? { noticed: "true" } : {} };
15334
+ const attributes = { id: event.id, at: event.at, kind: event.kind, agent: event.agentName, agent_id: event.agentId, ...event.chatId ? { chat_id: event.chatId } : {}, ...event.ticket ? { ticket_id: event.ticket.id, ticket: event.ticket.title } : {}, ...event.noticed ? { noticed: "true" } : {} };
15331
15335
  const body = [event.summary, event.detail].filter(Boolean).join("\n\n").replaceAll(`</${TAG}`, `<\\/${TAG}`);
15332
15336
  return `<${TAG}${Object.entries(attributes).map(([key, value]) => ` ${key}="${escapeAttribute(value)}"`).join("")}>
15333
15337
  ${body}
@@ -15350,6 +15354,7 @@ function extractMothershipEvents(text4) {
15350
15354
  summary: summary.trim(),
15351
15355
  ...detail ? { detail } : {},
15352
15356
  ...attributes.chat_id ? { chatId: attributes.chat_id } : {},
15357
+ ...attributes.ticket_id ? { ticket: { id: attributes.ticket_id, title: attributes.ticket ?? "" } } : {},
15353
15358
  ...attributes.noticed === "true" ? { noticed: true } : {}
15354
15359
  }];
15355
15360
  });
@@ -16438,7 +16443,8 @@ var MOTHERSHIP_TICKET_LIMITS = {
16438
16443
  blocked: 200,
16439
16444
  media: 6,
16440
16445
  caption: 80,
16441
- answer: 2e3
16446
+ answer: 2e3,
16447
+ reply: 600
16442
16448
  };
16443
16449
  var L = MOTHERSHIP_TICKET_LIMITS;
16444
16450
  var tooLong = (max) => `At most ${max} characters. Keep it short; the user should take it in at a glance`;
@@ -16497,6 +16503,21 @@ var answerMothershipTicketRequestSchema = z27.object({
16497
16503
  answer: text3(L.answer)
16498
16504
  });
16499
16505
  var mothershipTicketAnswerRefSchema = z27.object({ mothershipId: z27.uuid(), ticketId: z27.uuid(), questionId: z27.string().min(1) });
16506
+ var replyOnMothershipTicketRequestSchema = z27.object({
16507
+ reply: text3(L.reply).describe(`Your answer to the user's latest message on the ticket, in a few sentences. ${markdown} Link a screenshot or recording uploaded with \`replicas media upload\` if it helps. At most ${L.reply} characters; keep longer detail in your chat.`),
16508
+ question: questionSchema.optional().describe("A follow-up question only if you need the user to decide something. It shows on the ticket with its options, and their answer comes back to you.")
16509
+ });
16510
+ var mothershipTicketReplyRefSchema = z27.object({ ticketId: z27.uuid(), text: text3(L.answer) });
16511
+ var mothershipTicketThreadSchema = z27.array(z27.object({
16512
+ id: z27.string(),
16513
+ from: z27.enum(["user", "ship"]),
16514
+ name: z27.string(),
16515
+ ship_id: z27.string(),
16516
+ chat_id: z27.string(),
16517
+ text: z27.string(),
16518
+ at: z27.string(),
16519
+ nudge: z27.enum(["sent", "missed"]).optional()
16520
+ }));
16500
16521
  var LINEAR_ISSUE_SUMMARIES_MAX = 50;
16501
16522
  var linearIssueSummariesRequestSchema = z27.object({ identifiers: z27.array(linearIdentifier).min(1).max(LINEAR_ISSUE_SUMMARIES_MAX) });
16502
16523
 
@@ -16718,6 +16739,7 @@ var REPLICAS_API_STEPS = {
16718
16739
  [REPLICAS_MCP_TOOLS.getBoard]: { icon: "book", live: "Reading board", done: "Read board" },
16719
16740
  [REPLICAS_MCP_TOOLS.updateBoard]: { icon: "file-pen", live: "Updating board", done: "Updated board" },
16720
16741
  [REPLICAS_MCP_TOOLS.updateTicket]: { icon: "file-pen", live: "Updating ticket", done: "Updated ticket" },
16742
+ [REPLICAS_MCP_TOOLS.replyOnTicket]: { icon: "file-pen", live: "Replying on ticket", done: "Replied on ticket" },
16721
16743
  [REPLICAS_MCP_TOOLS.sendToChat]: { icon: "message", live: "Sending to chat", done: "Sent to chat" },
16722
16744
  [REPLICAS_MCP_TOOLS.mergeWhenReady]: { icon: "target", live: "Setting merge when ready", done: "Set merge when ready" }
16723
16745
  };
@@ -20167,7 +20189,7 @@ var VOICE_WAVEFORM = {
20167
20189
  };
20168
20190
 
20169
20191
  // ../shared/src/e2b.ts
20170
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-15-v6";
20192
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-15-v7";
20171
20193
 
20172
20194
  // ../shared/src/e2b-retry.ts
20173
20195
  var DEFAULT_BACKOFFS_MS = [2e3, 5e3];
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-LZGOIVY5.js";
8
+ } from "./chunk-EIU3AU5A.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-JWX5Y2P5.js";
7
+ } from "./chunk-XOFTV2KD.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-LZGOIVY5.js";
24
+ } from "./chunk-EIU3AU5A.js";
25
25
 
26
26
  // src/runtime-env-loader.ts
27
27
  import { readFileSync } from "fs";
@@ -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-JWX5Y2P5.js";
6
+ } from "./chunk-XOFTV2KD.js";
7
7
  import {
8
8
  isVersionBelow
9
- } from "./chunk-LZGOIVY5.js";
9
+ } from "./chunk-EIU3AU5A.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.1581";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1582";
244
244
  var INITIALIZE_METHOD = "initialize";
245
245
  var INITIALIZED_NOTIFICATION = "initialized";
246
246
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -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-LZGOIVY5.js";
6
+ } from "./chunk-EIU3AU5A.js";
7
7
 
8
8
  // src/utils/exec.ts
9
9
  import { exec, execFile } from "child_process";
@@ -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-S4QZXGMI.js";
7
- import "./chunk-ZO7ASWWU.js";
8
- import "./chunk-JWX5Y2P5.js";
6
+ } from "./chunk-45LHO3LT.js";
7
+ import "./chunk-GCYNUHRN.js";
8
+ import "./chunk-XOFTV2KD.js";
9
9
  import {
10
10
  isRecord
11
11
  } from "./chunk-UZSNFLDQ.js";
12
- import "./chunk-LZGOIVY5.js";
12
+ import "./chunk-EIU3AU5A.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-EBVSUG4C.js";
17
+ } from "./chunk-DQ6PC55W.js";
18
18
  import {
19
19
  AppServerProcess,
20
20
  buildCodexAgentEnv
21
- } from "./chunk-4DWEAKTO.js";
22
- import "./chunk-JWX5Y2P5.js";
21
+ } from "./chunk-K62FBANU.js";
22
+ import "./chunk-XOFTV2KD.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-LZGOIVY5.js";
32
+ } from "./chunk-EIU3AU5A.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-S4QZXGMI.js";
30
+ } from "./chunk-45LHO3LT.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-EBVSUG4C.js";
68
+ } from "./chunk-DQ6PC55W.js";
69
69
  import {
70
70
  publishedPullRequestUrls
71
- } from "./chunk-5QFT72XM.js";
71
+ } from "./chunk-ESEOGNA3.js";
72
72
  import {
73
73
  ACCOUNT_RATE_LIMITS_READ_METHOD,
74
74
  AsyncLock,
@@ -147,7 +147,7 @@ import {
147
147
  transcriptSecrets,
148
148
  upsertCredentialFileLines,
149
149
  writeSecureCredentialFile
150
- } from "./chunk-JXAVTXFQ.js";
150
+ } from "./chunk-BZFUTV2V.js";
151
151
  import {
152
152
  ENGINE_ENV,
153
153
  UNQUOTED_PATHS_CONFIG,
@@ -158,15 +158,15 @@ import {
158
158
  resolveDiffBase,
159
159
  setAgentCredentialSnapshot,
160
160
  setLinearSessionId
161
- } from "./chunk-ZO7ASWWU.js";
161
+ } from "./chunk-GCYNUHRN.js";
162
162
  import {
163
163
  getCodexModelProvider
164
- } from "./chunk-4DWEAKTO.js";
164
+ } from "./chunk-K62FBANU.js";
165
165
  import {
166
166
  SUBPROCESS_MAX_BUFFER,
167
167
  execAsync,
168
168
  execFileAsync
169
- } from "./chunk-JWX5Y2P5.js";
169
+ } from "./chunk-XOFTV2KD.js";
170
170
  import {
171
171
  isRecord as isRecord2
172
172
  } from "./chunk-UZSNFLDQ.js";
@@ -449,7 +449,7 @@ import {
449
449
  workspaceTokenRequestSchema,
450
450
  workspaceTokenResponseSchema,
451
451
  wrapInTag
452
- } from "./chunk-LZGOIVY5.js";
452
+ } from "./chunk-EIU3AU5A.js";
453
453
  import {
454
454
  cloneMcpConfig,
455
455
  ensureCompatibilityImports,
@@ -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-5QFT72XM.js";
6
+ } from "./chunk-ESEOGNA3.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
10
  import {
11
11
  shouldRefreshPullRequests
12
- } from "./chunk-LZGOIVY5.js";
12
+ } from "./chunk-EIU3AU5A.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-LZGOIVY5.js";
14
+ } from "./chunk-EIU3AU5A.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.1581",
3
+ "version": "0.1.1582",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",