replicas-engine 0.1.1622 → 0.1.1624

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-JKML4JSY.js";
12
- import "./chunk-LYLGTT5A.js";
13
- import "./chunk-R2P2UU6T.js";
14
- import "./chunk-NNBW4NDI.js";
11
+ } from "./chunk-33YPJUHY.js";
12
+ import "./chunk-P6JEOJYI.js";
13
+ import "./chunk-EJKGU756.js";
14
+ import "./chunk-QWRELB5I.js";
15
15
  import "./chunk-UZSNFLDQ.js";
16
- import "./chunk-5GOBYYQ3.js";
16
+ import "./chunk-JBRMCXE4.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
  export {
19
19
  CODEX_ULTRAFAST_SERVICE_TIER,
@@ -12,15 +12,15 @@ import {
12
12
  resolveDiffBase,
13
13
  runGitCommand,
14
14
  setAgentCredentialSnapshot
15
- } from "./chunk-LYLGTT5A.js";
15
+ } from "./chunk-P6JEOJYI.js";
16
16
  import {
17
17
  AppServerProcess,
18
18
  buildCodexAgentEnv
19
- } from "./chunk-R2P2UU6T.js";
19
+ } from "./chunk-EJKGU756.js";
20
20
  import {
21
21
  SUBPROCESS_MAX_BUFFER,
22
22
  execFileAsync
23
- } from "./chunk-NNBW4NDI.js";
23
+ } from "./chunk-QWRELB5I.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-5GOBYYQ3.js";
64
+ } from "./chunk-JBRMCXE4.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-RVECQCMW.js");
464
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-5BBUUVMM.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-RVECQCMW.js");
486
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-5BBUUVMM.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-R2P2UU6T.js";
6
+ } from "./chunk-EJKGU756.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-5GOBYYQ3.js";
18
+ } from "./chunk-JBRMCXE4.js";
19
19
 
20
20
  // src/managers/codex-asp/notification-dispatch.ts
21
21
  var TURN_STARTED_METHOD = "turn/started";
@@ -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-NNBW4NDI.js";
6
+ } from "./chunk-QWRELB5I.js";
7
7
  import {
8
8
  isVersionBelow
9
- } from "./chunk-5GOBYYQ3.js";
9
+ } from "./chunk-JBRMCXE4.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.1622";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1624";
244
244
  var INITIALIZE_METHOD = "initialize";
245
245
  var INITIALIZED_NOTIFICATION = "initialized";
246
246
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -5,7 +5,7 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  runGitCommand
8
- } from "./chunk-LYLGTT5A.js";
8
+ } from "./chunk-P6JEOJYI.js";
9
9
  import {
10
10
  COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES,
11
11
  COMMAND_PROTECTION_REPO_GIT_ARGS,
@@ -18,7 +18,7 @@ import {
18
18
  parseCommandProtectionRequest,
19
19
  toCommandProtectionRepoState,
20
20
  withE2BRetry
21
- } from "./chunk-5GOBYYQ3.js";
21
+ } from "./chunk-JBRMCXE4.js";
22
22
 
23
23
  // src/services/command-protection-service.ts
24
24
  import { readFile, stat } from "fs/promises";
@@ -13080,6 +13080,7 @@ var REPLICAS_MCP_TOOLS = {
13080
13080
  updateTicket: "update_ticket",
13081
13081
  replyOnTicket: "reply_on_ticket",
13082
13082
  sendToChat: "send_to_chat",
13083
+ setStatus: "set_status",
13083
13084
  getLinearRouting: "get_linear_routing",
13084
13085
  setLinearRouting: "set_linear_routing",
13085
13086
  clearLinearRouting: "clear_linear_routing",
@@ -15989,7 +15990,7 @@ var BOARD_RULES = `- The board in the Ships pane beside this chat is the user's
15989
15990
  - A ship with open pull requests is not done when it sends \`finished\`: Replicas fixes their CI failures and review comments automatically, then sends \`ready\` or \`needs_attention\`. On \`needs_attention\`, direct the ship, or ask the user only if you can't decide.
15990
15991
  - When a pull request should merge once it's approved and CI passes, call \`${REPLICAS_MCP_TOOLS.mergeWhenReady}\`: Replicas merges it and sends \`merged\`, or \`needs_attention\` saying why it can't. Never watch CI or pull requests with \`gh\`, sleep loops or wait scripts, and merge one yourself only when the user wants it merged right away.
15991
15992
  - On every ship event and every answer the user gives on the board, act with tools on the answer or on any work the event unblocks, such as starting the next task once a pull request merges, and update the board if its order, notes or overview changed. The user sees nothing you write in these turns, unless a message they typed is still unanswered because it arrived during the turn: then your final reply answers it, as in any turn they start. Otherwise the only way to reach them is \`${REPLICAS_MCP_TOOLS.sendToChat}\`. Call it only for what they would want right now: a deliverable they asked for, with its media, links or answer (the finished video, the requested numbers); a failure or blocker that needs them, also on the board; or a request of theirs being done. Never for status, such as "PR #12 merged", "deploying", "it's on the board" or "I asked the ship to\u2026": the board and the chat's own rows show those. End the turn with a one-line note of what you did; only the activity log shows it.
15992
- - The chat is like texting an assistant: the user sees only your final reply to each message they type, plus what you send with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, never your tool calls or earlier text. Answer every message they type in chat, even one that arrives during a ship event or board answer, and never only on the board: if they ask something while you handle an event, answer that question, not just the event. Write in a line or two with links, and include any media inline. Never restate the board in chat: no status tables, per-ship lists or summaries of what ships did.
15993
+ - The chat is like texting an assistant. In a turn the user typed, they see the text you write between tool calls as it streams, your final reply, what you send with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, and your \`${REPLICAS_MCP_TOOLS.setStatus}\` line, never your tool calls. Unless you can answer right away, open with one line on what you'll do first and roughly how long it takes. Then call \`${REPLICAS_MCP_TOOLS.setStatus}\` with a few words on your current step, such as "Reading the billing webhook" or "Checking npm for outdated packages", and call it again each time you move to a new step. Before your final reply, write only what they'd want to know now: a finding that changes the answer, a ship you started, or a decision you need. Never narrate tool calls or say you're still working. When they message you mid-turn, reply to it in one line before anything else, then fold it into your work. Answer every message they type in chat, even one that arrives during a ship event or board answer, and never only on the board: if they ask something while you handle an event, answer that question, not just the event. Write in a line or two with links, and include any media inline. Never restate the board in chat: no status tables, per-ship lists or summaries of what ships did.
15993
15994
  `;
15994
15995
  var MOTHERSHIP_INSTRUCTIONS_BLOCK = new RegExp(`\\s*<${MOTHERSHIP_INSTRUCTIONS_TAG}>\\n([\\s\\S]*?)\\n</${MOTHERSHIP_INSTRUCTIONS_TAG}>`);
15995
15996
  function splitMothershipInstructions(customInstructions) {
@@ -17496,6 +17497,7 @@ var REPLICAS_API_STEPS = {
17496
17497
  [REPLICAS_MCP_TOOLS.updateTicket]: { icon: "file-pen", live: "Updating ticket", done: "Updated ticket" },
17497
17498
  [REPLICAS_MCP_TOOLS.replyOnTicket]: { icon: "file-pen", live: "Replying on ticket", done: "Replied on ticket" },
17498
17499
  [REPLICAS_MCP_TOOLS.sendToChat]: { icon: "message", live: "Sending to chat", done: "Sent to chat" },
17500
+ [REPLICAS_MCP_TOOLS.setStatus]: { icon: "message", live: "Setting status", done: "Set status" },
17499
17501
  [REPLICAS_MCP_TOOLS.mergeWhenReady]: { icon: "target", live: "Setting merge when ready", done: "Set merge when ready" }
17500
17502
  };
17501
17503
  function replicasToolName(message2) {
@@ -17549,7 +17551,7 @@ function describeToolCall(message2, base) {
17549
17551
  const command = replicasTool === REPLICAS_MCP_TOOLS.runCommand ? inputString(input, "command") : void 0;
17550
17552
  const name = inputString(input, "name") ?? inputString(replicaFields, "name");
17551
17553
  const workspaceId = inputString(input, "id") ?? inputString(replicaFields, "id");
17552
- const label = command ? commandLabel(command) : inputString(input, "title") ?? (replicasTool === REPLICAS_MCP_TOOLS.createAutomation ? name : void 0);
17554
+ const label = command ? commandLabel(command) : replicasTool === REPLICAS_MCP_TOOLS.setStatus ? inputString(input, "status") : inputString(input, "title") ?? (replicasTool === REPLICAS_MCP_TOOLS.createAutomation ? name : void 0);
17553
17555
  return {
17554
17556
  ...base,
17555
17557
  key,
@@ -21066,7 +21068,7 @@ var VOICE_WAVEFORM = {
21066
21068
  };
21067
21069
 
21068
21070
  // ../shared/src/e2b.ts
21069
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-17-v20";
21071
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-17-v23";
21070
21072
 
21071
21073
  // ../shared/src/e2b-retry.ts
21072
21074
  var DEFAULT_BACKOFFS_MS = [2e3, 5e3];
@@ -21701,7 +21703,11 @@ var harnessEventBodySchema = z32.discriminatedUnion("type", [
21701
21703
  /** Saved before its tool calls run. */
21702
21704
  z32.object({ type: z32.literal("assistant_message"), payload: z32.looseObject({ message: assistantMessageSchema }) }),
21703
21705
  z32.object({ type: z32.literal("tool_result"), payload: z32.looseObject({ message: toolResultMessageSchema }) }),
21704
- z32.object({ type: z32.literal("status"), payload: z32.looseObject({ status: z32.enum(HARNESS_THREAD_STATUSES) }) }),
21706
+ z32.object({
21707
+ type: z32.literal("status"),
21708
+ /** `cost`: what calls since the last status that saved no step of their own cost at API prices, in USD. */
21709
+ payload: z32.looseObject({ status: z32.enum(HARNESS_THREAD_STATUSES), cost: z32.number().optional() })
21710
+ }),
21705
21711
  z32.object({ type: z32.literal("error"), payload: z32.looseObject({ message: z32.string() }) }),
21706
21712
  /** The model's context is this summary followed by the events from `firstKeptSeq` on; nothing before it is deleted. */
21707
21713
  z32.object({
@@ -21711,7 +21717,9 @@ var harnessEventBodySchema = z32.discriminatedUnion("type", [
21711
21717
  firstKeptSeq: z32.number(),
21712
21718
  tokensBefore: z32.number(),
21713
21719
  readFiles: z32.array(z32.string()),
21714
- modifiedFiles: z32.array(z32.string())
21720
+ modifiedFiles: z32.array(z32.string()),
21721
+ /** The summary call's cost at API prices, in USD; absent on compactions saved before it was recorded. */
21722
+ cost: z32.number().optional()
21715
21723
  })
21716
21724
  })
21717
21725
  ]);
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-5GOBYYQ3.js";
8
+ } from "./chunk-JBRMCXE4.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-NNBW4NDI.js";
7
+ } from "./chunk-QWRELB5I.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-5GOBYYQ3.js";
24
+ } from "./chunk-JBRMCXE4.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
  HOOK_EXEC_MAX_BUFFER_BYTES
6
- } from "./chunk-5GOBYYQ3.js";
6
+ } from "./chunk-JBRMCXE4.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-IBPVZ5QG.js";
7
- import "./chunk-LYLGTT5A.js";
8
- import "./chunk-NNBW4NDI.js";
6
+ } from "./chunk-HCW3KUXC.js";
7
+ import "./chunk-P6JEOJYI.js";
8
+ import "./chunk-QWRELB5I.js";
9
9
  import {
10
10
  isRecord
11
11
  } from "./chunk-UZSNFLDQ.js";
12
- import "./chunk-5GOBYYQ3.js";
12
+ import "./chunk-JBRMCXE4.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-AJ2P3ZD7.js";
17
+ } from "./chunk-3PPHFQTX.js";
18
18
  import {
19
19
  AppServerProcess,
20
20
  buildCodexAgentEnv
21
- } from "./chunk-R2P2UU6T.js";
22
- import "./chunk-NNBW4NDI.js";
21
+ } from "./chunk-EJKGU756.js";
22
+ import "./chunk-QWRELB5I.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-5GOBYYQ3.js";
32
+ } from "./chunk-JBRMCXE4.js";
33
33
  import "./chunk-VEQXQN22.js";
34
34
 
35
35
  // 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-IBPVZ5QG.js";
94
+ } from "./chunk-HCW3KUXC.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -129,10 +129,10 @@ import {
129
129
  spawnMuseMsp,
130
130
  startMuseSession,
131
131
  uuidV7
132
- } from "./chunk-AJ2P3ZD7.js";
132
+ } from "./chunk-3PPHFQTX.js";
133
133
  import {
134
134
  publishedPullRequestUrls
135
- } from "./chunk-H4SPDB7T.js";
135
+ } from "./chunk-M3PEV2C2.js";
136
136
  import {
137
137
  ACCOUNT_RATE_LIMITS_READ_METHOD,
138
138
  AsyncLock,
@@ -212,7 +212,7 @@ import {
212
212
  transcriptSecrets,
213
213
  upsertCredentialFileLines,
214
214
  writeSecureCredentialFile
215
- } from "./chunk-JKML4JSY.js";
215
+ } from "./chunk-33YPJUHY.js";
216
216
  import {
217
217
  ENGINE_ENV,
218
218
  UNQUOTED_PATHS_CONFIG,
@@ -223,16 +223,16 @@ import {
223
223
  resolveDiffBase,
224
224
  setAgentCredentialSnapshot,
225
225
  setLinearSessionId
226
- } from "./chunk-LYLGTT5A.js";
226
+ } from "./chunk-P6JEOJYI.js";
227
227
  import {
228
228
  buildCodexAgentEnv,
229
229
  getCodexModelProvider
230
- } from "./chunk-R2P2UU6T.js";
230
+ } from "./chunk-EJKGU756.js";
231
231
  import {
232
232
  SUBPROCESS_MAX_BUFFER,
233
233
  execAsync,
234
234
  execFileAsync
235
- } from "./chunk-NNBW4NDI.js";
235
+ } from "./chunk-QWRELB5I.js";
236
236
  import {
237
237
  isRecord as isRecord2
238
238
  } from "./chunk-UZSNFLDQ.js";
@@ -529,7 +529,7 @@ import {
529
529
  workspaceTokenRequestSchema,
530
530
  workspaceTokenResponseSchema,
531
531
  wrapInTag
532
- } from "./chunk-5GOBYYQ3.js";
532
+ } from "./chunk-JBRMCXE4.js";
533
533
  import {
534
534
  __commonJS,
535
535
  __export,
@@ -11122,7 +11122,7 @@ import { z as z4 } from "zod";
11122
11122
 
11123
11123
  // ../shared/src/persisted-query-hashes.ts
11124
11124
  var PERSISTED_QUERY_HASHES = {
11125
- workspaceChats: "d4421c1c"
11125
+ workspaceChats: "384b2db2"
11126
11126
  };
11127
11127
 
11128
11128
  // ../shared/src/workspace-chat.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
  publishedPullRequestUrls
6
- } from "./chunk-H4SPDB7T.js";
6
+ } from "./chunk-M3PEV2C2.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
10
  import {
11
11
  shouldRefreshPullRequests
12
- } from "./chunk-5GOBYYQ3.js";
12
+ } from "./chunk-JBRMCXE4.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-5GOBYYQ3.js";
14
+ } from "./chunk-JBRMCXE4.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.1622",
3
+ "version": "0.1.1624",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",