replicas-engine 0.1.729 → 0.1.731

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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  mayCreatePullRequest
4
- } from "./chunk-2UL5LXFV.js";
4
+ } from "./chunk-6P3FBKKS.js";
5
5
 
6
6
  // src/services/post-tool-pr-notifier.ts
7
7
  async function notifyPostToolUse(toolName, toolInput) {
@@ -8,6 +8,7 @@ var AGENT = {
8
8
  DEEPSEEK: "deepseek",
9
9
  FX: "fx",
10
10
  KIMI: "kimi",
11
+ MUSE: "muse",
11
12
  OPENCODE: "opencode",
12
13
  PI: "pi",
13
14
  RELAY: "relay"
@@ -32,6 +33,7 @@ var THINKING_LEVELS_BY_AGENT = {
32
33
  deepseek: STANDARD_THINKING_LEVELS,
33
34
  fx: STANDARD_THINKING_LEVELS,
34
35
  kimi: STANDARD_THINKING_LEVELS,
36
+ muse: VALID_THINKING_LEVELS.filter((level) => level !== "max" && level !== "ultracode"),
35
37
  opencode: STANDARD_THINKING_LEVELS,
36
38
  pi: STANDARD_THINKING_LEVELS,
37
39
  relay: [...STANDARD_THINKING_LEVELS, "ultracode"]
@@ -309,6 +311,7 @@ var DEFAULT_CHAT_TITLES = {
309
311
  deepseek: "DeepSeek Harness",
310
312
  fx: "fx",
311
313
  kimi: "Kimi Code",
314
+ muse: "Muse Code",
312
315
  opencode: "Opencode",
313
316
  pi: "Pi",
314
317
  relay: "Relay"
@@ -344,6 +347,7 @@ var DEEPSEEK_V4_FLASH_MODEL = "deepseek/deepseek-v4-flash-0731";
344
347
  var DEFAULT_DEEPSEEK_MODEL = DEEPSEEK_V4_PRO_MODEL;
345
348
  var DEFAULT_FX_MODEL = "zai/glm-5.2";
346
349
  var DEFAULT_KIMI_MODEL = "moonshotai/kimi-k2.6";
350
+ var DEFAULT_MUSE_MODEL = "muse-spark-1.2";
347
351
  var DEFAULT_PI_MODEL = DEFAULT_OPENCODE_MODEL;
348
352
  var OPENROUTER_MODELS = [
349
353
  DEFAULT_OPENCODE_MODEL,
@@ -369,6 +373,7 @@ var FALLBACK_AGENT_MODEL = {
369
373
  deepseek: DEFAULT_DEEPSEEK_MODEL,
370
374
  fx: DEFAULT_FX_MODEL,
371
375
  kimi: DEFAULT_KIMI_MODEL,
376
+ muse: DEFAULT_MUSE_MODEL,
372
377
  opencode: DEFAULT_OPENCODE_MODEL,
373
378
  pi: DEFAULT_PI_MODEL,
374
379
  relay: DEFAULT_CLAUDE_MODEL
@@ -465,6 +470,7 @@ var AGENT_MODELS = {
465
470
  deepseek: prioritizeDeepseekModels(OPENROUTER_MODELS),
466
471
  fx: [DEFAULT_FX_MODEL],
467
472
  kimi: [DEFAULT_KIMI_MODEL],
473
+ muse: [DEFAULT_MUSE_MODEL],
468
474
  opencode: [...OPENROUTER_MODELS, ...ASTER_MODELS],
469
475
  pi: [...OPENROUTER_MODELS, ...ASTER_MODELS],
470
476
  relay: [CLAUDE_FABLE_5_1_MODEL, CLAUDE_FABLE_5_MODEL, CLAUDE_OPUS_5_MODEL, CLAUDE_OPUS_4_8_MODEL, CLAUDE_SONNET_5_MODEL]
@@ -505,6 +511,7 @@ var MODEL_LABELS = {
505
511
  "minimax/minimax-m3": "MiniMax M3 via OpenRouter",
506
512
  "xiaomi/mimo-v2.5-pro": "MiMo V2.5 Pro via OpenRouter",
507
513
  "moonshotai/kimi-k2.6": "Kimi K2.6 via OpenRouter",
514
+ [DEFAULT_MUSE_MODEL]: "Muse Spark 1.2",
508
515
  "google/gemini-3.8-flash": "Gemini 3.8 Flash via OpenRouter",
509
516
  ...ASTER_MODEL_LABELS,
510
517
  "gpt-5.4": "GPT-5.4",
@@ -646,7 +653,8 @@ var CREDENTIAL_METHOD = {
646
653
  OPENCODE_GO: "opencode-go",
647
654
  ASTER: "aster",
648
655
  OPENROUTER: "openrouter",
649
- AI_GATEWAY: "ai-gateway"
656
+ AI_GATEWAY: "ai-gateway",
657
+ MUSE_OAUTH: "muse-oauth"
650
658
  };
651
659
  var CREDENTIAL_TYPE = {
652
660
  CLAUDE_OAUTH: "claude",
@@ -660,7 +668,8 @@ var CREDENTIAL_TYPE = {
660
668
  OPENCODE_GO_API_KEY: "opencode_go_api_key",
661
669
  ASTER_API_KEY: "aster_api_key",
662
670
  OPENROUTER_API_KEY: "openrouter_api_key",
663
- AI_GATEWAY_API_KEY: "ai_gateway_api_key"
671
+ AI_GATEWAY_API_KEY: "ai_gateway_api_key",
672
+ MUSE_OAUTH: "muse_oauth"
664
673
  };
665
674
  var INFERENCE_PROVIDER_LABELS = {
666
675
  [CREDENTIAL_METHOD.OPENCODE_GO]: "OpenCode Go",
@@ -691,6 +700,9 @@ var AGENT_CREDENTIAL_METHODS_IN_ORDER = {
691
700
  [AGENT.KIMI]: [
692
701
  { method: CREDENTIAL_METHOD.AI_GATEWAY, credentialType: CREDENTIAL_TYPE.AI_GATEWAY_API_KEY }
693
702
  ],
703
+ [AGENT.MUSE]: [
704
+ { method: CREDENTIAL_METHOD.MUSE_OAUTH, credentialType: CREDENTIAL_TYPE.MUSE_OAUTH }
705
+ ],
694
706
  [AGENT.OPENCODE]: [
695
707
  { method: CREDENTIAL_METHOD.OPENCODE_GO, credentialType: CREDENTIAL_TYPE.OPENCODE_GO_API_KEY },
696
708
  { method: CREDENTIAL_METHOD.ASTER, credentialType: CREDENTIAL_TYPE.ASTER_API_KEY },
@@ -1643,7 +1655,7 @@ var SLASH_COMMANDS = [
1643
1655
  command: "/plan",
1644
1656
  description: "Switch to plan mode and optionally send a prompt.",
1645
1657
  argumentHint: "[prompt]",
1646
- providers: ["claude", "codex", "cursor", "deepseek", "fx", "kimi", "opencode", "pi", "relay"]
1658
+ providers: ["claude", "codex", "cursor", "deepseek", "fx", "kimi", "muse", "opencode", "pi", "relay"]
1647
1659
  },
1648
1660
  {
1649
1661
  command: "/fast",
@@ -1659,7 +1671,7 @@ var SLASH_COMMANDS = [
1659
1671
  {
1660
1672
  command: "/compact",
1661
1673
  description: "Compact the conversation context.",
1662
- providers: ["codex"]
1674
+ providers: ["codex", "muse"]
1663
1675
  }
1664
1676
  ];
1665
1677
  function mergeSlashCommands(...commandGroups) {
@@ -3521,6 +3533,18 @@ function isCodexAuthError(error) {
3521
3533
  return isAuthenticationErrorText(msg) || lower.includes("authentication") || lower.includes("incorrect api key") || lower.includes("api key") && lower.includes("invalid") || lower.includes("401") || lower.includes('codexerrorinfo="unauthorized"') || lower.includes("codexerrorinfo=unauthorized") || lower.includes("failed to refresh token") || lower.includes("your session has ended");
3522
3534
  }
3523
3535
 
3536
+ // ../shared/src/muse-auth.ts
3537
+ function serializeMuseAuthFile(credentials) {
3538
+ return JSON.stringify({
3539
+ schema_version: 1,
3540
+ providers: {
3541
+ meta: {
3542
+ api_key: credentials.accessToken
3543
+ }
3544
+ }
3545
+ }, null, 2);
3546
+ }
3547
+
3524
3548
  // ../shared/src/version.ts
3525
3549
  function compareVersions(v1, v2) {
3526
3550
  const parts1 = v1.split(".").map(Number);
@@ -4319,6 +4343,38 @@ function upsertDisplayMessage(messages, message) {
4319
4343
  if (index === -1) messages.push(message);
4320
4344
  else messages[index] = message;
4321
4345
  }
4346
+ function applyToolInputEvent(event, messages, provider, state, questionFilter) {
4347
+ if (event.type === "replicas-tool-input-request" && typeof event.payload.toolUseId === "string" && typeof event.payload.requestId === "string" && (Array.isArray(event.payload.options) || Array.isArray(event.payload.questions))) {
4348
+ const resolved = state.resolutions.get(event.payload.toolUseId);
4349
+ const inputRequest = {
4350
+ requestId: event.payload.requestId,
4351
+ status: resolved?.selectionId === "aborted" || resolved?.selectionId === "declined" ? "aborted" : resolved ? "resolved" : "pending",
4352
+ ...Array.isArray(event.payload.options) ? { options: event.payload.options } : {},
4353
+ ...Array.isArray(event.payload.questions) ? { questions: questionFilter ? event.payload.questions.filter(questionFilter) : event.payload.questions } : {},
4354
+ ...resolved ? { selectionId: resolved.selectionId } : {},
4355
+ ...resolved?.selectionSummary ? { selectionSummary: resolved.selectionSummary } : {}
4356
+ };
4357
+ state.requests.set(event.payload.toolUseId, inputRequest);
4358
+ const message = messages.find((candidate) => candidate.type === "tool_call" && candidate.id === `${provider}-tool-${event.payload.toolUseId}`);
4359
+ if (message) message.inputRequest = inputRequest;
4360
+ return true;
4361
+ }
4362
+ if (event.type === "replicas-tool-input-resolved" && typeof event.payload.toolUseId === "string" && typeof event.payload.selectionId === "string") {
4363
+ const resolved = {
4364
+ selectionId: event.payload.selectionId,
4365
+ ...typeof event.payload.selectionSummary === "string" ? { selectionSummary: event.payload.selectionSummary } : {}
4366
+ };
4367
+ state.resolutions.set(event.payload.toolUseId, resolved);
4368
+ const inputRequest = state.requests.get(event.payload.toolUseId);
4369
+ if (inputRequest) {
4370
+ inputRequest.status = resolved.selectionId === "aborted" || resolved.selectionId === "declined" ? "aborted" : "resolved";
4371
+ inputRequest.selectionId = resolved.selectionId;
4372
+ if (resolved.selectionSummary) inputRequest.selectionSummary = resolved.selectionSummary;
4373
+ }
4374
+ return true;
4375
+ }
4376
+ return false;
4377
+ }
4322
4378
  function parseSkillName(tool, input) {
4323
4379
  if (typeof tool !== "string") return null;
4324
4380
  const normalizedTool = tool.toLowerCase();
@@ -5038,7 +5094,7 @@ function isProviderEvent(event, provider, suffix) {
5038
5094
  function parseAcpEvents(events, provider) {
5039
5095
  const messages = [];
5040
5096
  const activeChunks = {};
5041
- const resolvedInputs = /* @__PURE__ */ new Map();
5097
+ const inputState = { requests: /* @__PURE__ */ new Map(), resolutions: /* @__PURE__ */ new Map() };
5042
5098
  let chunkSequence = 0;
5043
5099
  for (const event of events) {
5044
5100
  const userContent = getUserMessage(event);
@@ -5072,37 +5128,7 @@ function parseAcpEvents(events, provider) {
5072
5128
  activeChunks.agent_thought_chunk = void 0;
5073
5129
  continue;
5074
5130
  }
5075
- if (event.type === "replicas-tool-input-request" && typeof event.payload.toolUseId === "string" && typeof event.payload.requestId === "string") {
5076
- const message = messages.find((candidate) => candidate.type === "tool_call" && candidate.id === `${provider}-tool-${event.payload.toolUseId}`);
5077
- if (message && (Array.isArray(event.payload.options) || Array.isArray(event.payload.questions))) {
5078
- const resolved = resolvedInputs.get(event.payload.toolUseId);
5079
- message.inputRequest = {
5080
- requestId: event.payload.requestId,
5081
- status: resolved?.selectionId === "aborted" ? "aborted" : resolved ? "resolved" : "pending",
5082
- ...Array.isArray(event.payload.options) ? { options: event.payload.options } : {},
5083
- ...Array.isArray(event.payload.questions) ? { questions: event.payload.questions } : {},
5084
- ...resolved ? { selectionId: resolved.selectionId } : {},
5085
- ...resolved?.selectionSummary ? { selectionSummary: resolved.selectionSummary } : {}
5086
- };
5087
- }
5088
- continue;
5089
- }
5090
- if (event.type === "replicas-tool-input-resolved" && typeof event.payload.toolUseId === "string" && typeof event.payload.selectionId === "string") {
5091
- const resolved = {
5092
- selectionId: event.payload.selectionId,
5093
- ...typeof event.payload.selectionSummary === "string" ? { selectionSummary: event.payload.selectionSummary } : {}
5094
- };
5095
- resolvedInputs.set(event.payload.toolUseId, resolved);
5096
- const message = messages.find((candidate) => candidate.type === "tool_call" && candidate.id === `${provider}-tool-${event.payload.toolUseId}`);
5097
- if (message?.inputRequest) {
5098
- message.inputRequest = {
5099
- ...message.inputRequest,
5100
- status: resolved.selectionId === "aborted" ? "aborted" : "resolved",
5101
- ...resolved
5102
- };
5103
- }
5104
- continue;
5105
- }
5131
+ if (applyToolInputEvent(event, messages, provider, inputState)) continue;
5106
5132
  if (!isProviderEvent(event, provider, "session-update") || !isRecord(event.payload.update)) continue;
5107
5133
  const update = event.payload.update;
5108
5134
  const kind = update.sessionUpdate;
@@ -5331,6 +5357,108 @@ function parseOpencodeEvents(events) {
5331
5357
  return messages;
5332
5358
  }
5333
5359
 
5360
+ // ../shared/src/display-message/parsers/muse-parser.ts
5361
+ function isToolInputQuestion(value) {
5362
+ return isRecord(value) && typeof value.id === "string" && typeof value.prompt === "string" && typeof value.multiSelect === "boolean" && Array.isArray(value.options) && value.options.every((option) => isRecord(option) && typeof option.id === "string" && typeof option.label === "string");
5363
+ }
5364
+ function parseMuseEvents(events) {
5365
+ const messages = [];
5366
+ const deltas = /* @__PURE__ */ new Map();
5367
+ const inputState = { requests: /* @__PURE__ */ new Map(), resolutions: /* @__PURE__ */ new Map() };
5368
+ for (const event of events) {
5369
+ const userContent = getUserMessage(event);
5370
+ if (userContent !== null) {
5371
+ if (userContent.trim()) messages.push({
5372
+ id: getUserMessageId(event) ?? `muse-user-${event.timestamp}`,
5373
+ type: "user",
5374
+ content: userContent,
5375
+ timestamp: event.timestamp
5376
+ });
5377
+ continue;
5378
+ }
5379
+ if (event.type === "muse-error") {
5380
+ messages.push({
5381
+ id: `muse-error-${event.timestamp}`,
5382
+ type: "error",
5383
+ message: typeof event.payload.message === "string" ? event.payload.message : "Muse failed",
5384
+ timestamp: event.timestamp
5385
+ });
5386
+ continue;
5387
+ }
5388
+ if (event.type === "muse-turn-completed" && isRecord(event.payload.error)) {
5389
+ messages.push({
5390
+ id: `muse-turn-error-${typeof event.payload.turnId === "string" ? event.payload.turnId : event.timestamp}`,
5391
+ type: "error",
5392
+ message: typeof event.payload.error.message === "string" ? event.payload.error.message : "Muse turn failed",
5393
+ timestamp: event.timestamp
5394
+ });
5395
+ continue;
5396
+ }
5397
+ if (applyToolInputEvent(event, messages, "muse", inputState, isToolInputQuestion)) continue;
5398
+ if (event.type === "muse-item-delta" && typeof event.payload.itemId === "string" && typeof event.payload.delta === "string") {
5399
+ const field = typeof event.payload.field === "string" ? event.payload.field : "text";
5400
+ const key = `${event.payload.itemId}:${field}`;
5401
+ const content = `${deltas.get(key) ?? ""}${event.payload.delta}`;
5402
+ deltas.set(key, content);
5403
+ if (field === "text") upsertDisplayMessage(messages, {
5404
+ id: `muse-agent-${event.payload.itemId}`,
5405
+ type: "agent",
5406
+ content,
5407
+ timestamp: event.timestamp
5408
+ });
5409
+ if (field.startsWith("summary")) upsertDisplayMessage(messages, {
5410
+ id: `muse-reasoning-${event.payload.itemId}`,
5411
+ type: "reasoning",
5412
+ content,
5413
+ status: "in_progress",
5414
+ timestamp: event.timestamp
5415
+ });
5416
+ continue;
5417
+ }
5418
+ if (!["muse-item-started", "muse-item-updated", "muse-item-completed"].includes(event.type) || !isRecord(event.payload.item)) continue;
5419
+ const item = event.payload.item;
5420
+ if (typeof item.itemId !== "string" || typeof item.kind !== "string") continue;
5421
+ const terminal = item.status !== "inProgress";
5422
+ if (item.kind === "agentMessage" && typeof item.text === "string" && item.text) {
5423
+ upsertDisplayMessage(messages, {
5424
+ id: `muse-agent-${item.itemId}`,
5425
+ type: "agent",
5426
+ content: item.text,
5427
+ timestamp: typeof item.recordedAt === "string" ? item.recordedAt : event.timestamp
5428
+ });
5429
+ } else if (item.kind === "reasoning") {
5430
+ const content = Array.isArray(item.summary) ? item.summary.filter((part) => typeof part === "string").join("\n") : typeof item.text === "string" ? item.text : "";
5431
+ if (content) upsertDisplayMessage(messages, {
5432
+ id: `muse-reasoning-${item.itemId}`,
5433
+ type: "reasoning",
5434
+ content,
5435
+ status: terminal ? "completed" : "in_progress",
5436
+ timestamp: typeof item.recordedAt === "string" ? item.recordedAt : event.timestamp
5437
+ });
5438
+ } else if (item.kind === "toolCall") {
5439
+ let input = item.args;
5440
+ if (typeof item.args === "string") {
5441
+ try {
5442
+ input = JSON.parse(item.args);
5443
+ } catch {
5444
+ }
5445
+ }
5446
+ const message = createCallDisplayMessage({
5447
+ id: `muse-tool-${item.itemId}`,
5448
+ server: "muse",
5449
+ tool: typeof item.tool === "string" ? item.tool : "tool",
5450
+ input: isRecord(input) ? input : typeof input === "string" ? input : void 0,
5451
+ output: typeof item.visibleOutput === "string" ? item.visibleOutput : item.failureReason === void 0 ? void 0 : stringifyDisplayValue(item.failureReason),
5452
+ status: item.status === "failed" || item.status === "rejected" ? "failed" : terminal ? "completed" : "in_progress",
5453
+ timestamp: typeof item.recordedAt === "string" ? item.recordedAt : event.timestamp
5454
+ });
5455
+ if (message.type === "tool_call") message.inputRequest = inputState.requests.get(item.itemId);
5456
+ upsertDisplayMessage(messages, message);
5457
+ }
5458
+ }
5459
+ return messages;
5460
+ }
5461
+
5334
5462
  // ../shared/src/display-message/parsers/pi-parser.ts
5335
5463
  function nestedPayload(event) {
5336
5464
  return isRecord(event.payload.assistantMessageEvent) ? event.payload.assistantMessageEvent : event.payload;
@@ -6116,7 +6244,8 @@ function messageForItem(item) {
6116
6244
  type: "reasoning",
6117
6245
  content: item.text,
6118
6246
  status: normalizeCodexAspTranscriptStatus(item.status),
6119
- timestamp: item.timestamp
6247
+ timestamp: item.timestamp,
6248
+ ...item.sourceTimestamp ? { sourceTimestamp: item.sourceTimestamp } : {}
6120
6249
  };
6121
6250
  }
6122
6251
  if (item.type === "commandExecution") {
@@ -6344,6 +6473,7 @@ function parseCodexAspTranscript(transcript) {
6344
6473
  id: entry.turn.id,
6345
6474
  text: reasoning.map(({ text }) => text.trim()).join("\n\n"),
6346
6475
  timestamp: entry.turn.startedAt,
6476
+ ...reasoning[0] ? { sourceTimestamp: reasoning[0].timestamp } : {},
6347
6477
  status: reasoning.at(-1)?.status ?? "completed",
6348
6478
  sequence: entry.item.sequence
6349
6479
  }
@@ -6389,6 +6519,9 @@ function parseAgentEvents(events, agentType) {
6389
6519
  if (agentType === "kimi") {
6390
6520
  return parseAcpEvents(events, "kimi");
6391
6521
  }
6522
+ if (agentType === "muse") {
6523
+ return parseMuseEvents(events);
6524
+ }
6392
6525
  if (agentType === "opencode") {
6393
6526
  return parseOpencodeEvents(events);
6394
6527
  }
@@ -6740,6 +6873,7 @@ export {
6740
6873
  VALID_THINKING_LEVELS,
6741
6874
  codexReasoningEffortForThinkingLevel,
6742
6875
  detectAgentQuotaLimit,
6876
+ CREDENTIAL_METHOD,
6743
6877
  agentCredentialSnapshotSchema,
6744
6878
  isAgentChatTurnActivityRecord,
6745
6879
  isAgentChatSkillActivityRecord,
@@ -6788,6 +6922,7 @@ export {
6788
6922
  DEFAULT_DEEPSEEK_MODEL,
6789
6923
  DEFAULT_FX_MODEL,
6790
6924
  DEFAULT_KIMI_MODEL,
6925
+ DEFAULT_MUSE_MODEL,
6791
6926
  DEFAULT_PI_MODEL,
6792
6927
  getDefaultAgentModel,
6793
6928
  normalizeClaudeModel,
@@ -6845,6 +6980,7 @@ export {
6845
6980
  isAuthenticationErrorText,
6846
6981
  isClaudeAuthErrorText,
6847
6982
  isCodexAuthError,
6983
+ serializeMuseAuthFile,
6848
6984
  isVersionBelow,
6849
6985
  hasChatStarted,
6850
6986
  DESKTOP_STREAM_PORT,
@@ -12,7 +12,7 @@ import {
12
12
  isValidAgentProvider,
13
13
  parsePosixEnvFile,
14
14
  readReplicasRuntimeEnv
15
- } from "./chunk-2UL5LXFV.js";
15
+ } from "./chunk-6P3FBKKS.js";
16
16
 
17
17
  // src/engine-env.ts
18
18
  import { readFileSync as readFileSync2 } from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  HOOK_EXEC_MAX_BUFFER_BYTES,
4
4
  isVersionBelow
5
- } from "./chunk-2UL5LXFV.js";
5
+ } from "./chunk-6P3FBKKS.js";
6
6
 
7
7
  // src/utils/presigned-upload.ts
8
8
  import { createReadStream } from "fs";
@@ -71,6 +71,7 @@ function hasOwn(record, key) {
71
71
  var AspClient = class {
72
72
  stdin;
73
73
  stdout;
74
+ jsonRpcVersion;
74
75
  emitter = new EventEmitter();
75
76
  pending = /* @__PURE__ */ new Map();
76
77
  nextId = 1;
@@ -79,9 +80,13 @@ var AspClient = class {
79
80
  get isDisposed() {
80
81
  return this.disposed;
81
82
  }
83
+ get pendingRequestCount() {
84
+ return this.pending.size;
85
+ }
82
86
  constructor(options) {
83
87
  this.stdin = options.stdin;
84
88
  this.stdout = options.stdout;
89
+ this.jsonRpcVersion = options.jsonRpcVersion;
85
90
  this.stdout.setEncoding("utf8");
86
91
  this.stdout.on("data", this.handleStdoutData);
87
92
  this.stdin.on("error", this.handleStdinError);
@@ -237,7 +242,7 @@ var AspClient = class {
237
242
  }
238
243
  write(message) {
239
244
  try {
240
- this.stdin.write(`${JSON.stringify(message)}
245
+ this.stdin.write(`${JSON.stringify(this.jsonRpcVersion ? { jsonrpc: this.jsonRpcVersion, ...message } : message)}
241
246
  `, (error) => {
242
247
  if (error) {
243
248
  this.dispose(new Error(`ASP write failed: ${error.message}`));
@@ -267,7 +272,7 @@ var DEFAULT_CODEX_ARGS = [
267
272
  var MIN_CODEX_CLI_VERSION = "0.144.6";
268
273
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
269
274
  var codexCliVersionEnsured = null;
270
- var ENGINE_PACKAGE_VERSION = "0.1.729";
275
+ var ENGINE_PACKAGE_VERSION = "0.1.731";
271
276
  var INITIALIZE_METHOD = "initialize";
272
277
  var INITIALIZED_NOTIFICATION = "initialized";
273
278
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -525,6 +530,7 @@ function recoverCompletedTurn(turn, completedItems, agentMessageDeltas) {
525
530
  export {
526
531
  putPresignedFile,
527
532
  buildCodexAgentEnv,
533
+ AspClient,
528
534
  execAsync,
529
535
  execFileAsync,
530
536
  SUBPROCESS_MAX_BUFFER,
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  evaluateCommandProtection
4
- } from "./chunk-SI3OKIHR.js";
4
+ } from "./chunk-FOMGATAT.js";
5
5
  import {
6
6
  isRecord
7
7
  } from "./chunk-2RB7SIP3.js";
8
- import "./chunk-2UL5LXFV.js";
8
+ import "./chunk-6P3FBKKS.js";
9
9
 
10
10
  // src/command-protection-hook.ts
11
11
  var provider = process.argv[2];
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  evaluateCommandProtection
4
- } from "./chunk-SI3OKIHR.js";
4
+ } from "./chunk-FOMGATAT.js";
5
5
  import {
6
6
  notifyPostToolUse
7
- } from "./chunk-FRNXDLES.js";
7
+ } from "./chunk-3MZHSDWO.js";
8
8
  import "./chunk-2RB7SIP3.js";
9
- import "./chunk-2UL5LXFV.js";
9
+ import "./chunk-6P3FBKKS.js";
10
10
 
11
11
  // src/deepseek-command-protection-plugin.ts
12
12
  function replicasCommandProtection(context) {
@@ -4,12 +4,12 @@ import {
4
4
  buildCodexAgentEnv,
5
5
  putPresignedFile,
6
6
  recoverCompletedTurn
7
- } from "./chunk-NPXUYMVM.js";
7
+ } from "./chunk-RUIFVQCV.js";
8
8
  import {
9
9
  AGENT,
10
10
  getMemoryOutputSafetyViolation,
11
11
  headlessAgentRequestSchema
12
- } from "./chunk-2UL5LXFV.js";
12
+ } from "./chunk-6P3FBKKS.js";
13
13
 
14
14
  // src/headless-agent.ts
15
15
  import { createHash } from "crypto";