replicas-mcp 0.2.7 → 0.2.8

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.
@@ -4,7 +4,7 @@ import {
4
4
  fromUtf8,
5
5
  toHex,
6
6
  toUtf8
7
- } from "./chunk-C6IOMGXW.js";
7
+ } from "./chunk-B7L4ZPGB.js";
8
8
  import "./chunk-Q6JESX2O.js";
9
9
 
10
10
  // ../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
@@ -496,7 +496,7 @@ var a_lookUpTable = [
496
496
  ];
497
497
  var lookupTable = uint32ArrayFrom(a_lookUpTable);
498
498
 
499
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js
499
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js
500
500
  var Int64 = class _Int64 {
501
501
  bytes;
502
502
  constructor(bytes) {
@@ -541,7 +541,7 @@ function negate(bytes) {
541
541
  }
542
542
  }
543
543
 
544
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js
544
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js
545
545
  var HeaderMarshaller = class {
546
546
  toUtf8;
547
547
  fromUtf8;
@@ -725,7 +725,7 @@ var TIMESTAMP_TAG = "timestamp";
725
725
  var UUID_TAG = "uuid";
726
726
  var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
727
727
 
728
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js
728
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/splitMessage.js
729
729
  var PRELUDE_MEMBER_LENGTH = 4;
730
730
  var PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;
731
731
  var CHECKSUM_LENGTH = 4;
@@ -756,7 +756,7 @@ function splitMessage({ byteLength, byteOffset, buffer }) {
756
756
  };
757
757
  }
758
758
 
759
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js
759
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/EventStreamCodec.js
760
760
  var EventStreamCodec = class {
761
761
  headerMarshaller;
762
762
  messageBuffer;
@@ -820,7 +820,7 @@ var EventStreamCodec = class {
820
820
  }
821
821
  };
822
822
 
823
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js
823
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageDecoderStream.js
824
824
  var MessageDecoderStream = class {
825
825
  options;
826
826
  constructor(options) {
@@ -837,7 +837,7 @@ var MessageDecoderStream = class {
837
837
  }
838
838
  };
839
839
 
840
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js
840
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/MessageEncoderStream.js
841
841
  var MessageEncoderStream = class {
842
842
  options;
843
843
  constructor(options) {
@@ -857,7 +857,7 @@ var MessageEncoderStream = class {
857
857
  }
858
858
  };
859
859
 
860
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js
860
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js
861
861
  var SmithyMessageDecoderStream = class {
862
862
  options;
863
863
  constructor(options) {
@@ -876,7 +876,7 @@ var SmithyMessageDecoderStream = class {
876
876
  }
877
877
  };
878
878
 
879
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js
879
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageEncoderStream.js
880
880
  var SmithyMessageEncoderStream = class {
881
881
  options;
882
882
  constructor(options) {
@@ -893,10 +893,10 @@ var SmithyMessageEncoderStream = class {
893
893
  }
894
894
  };
895
895
 
896
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js
896
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js
897
897
  import { Readable } from "stream";
898
898
 
899
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js
899
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getChunkedStream.js
900
900
  function getChunkedStream(source) {
901
901
  let currentMessageTotalLength = 0;
902
902
  let currentMessagePendingLength = 0;
@@ -962,7 +962,7 @@ function getChunkedStream(source) {
962
962
  };
963
963
  }
964
964
 
965
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js
965
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js
966
966
  function getUnmarshalledStream(source, options) {
967
967
  const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8);
968
968
  return {
@@ -1008,7 +1008,7 @@ function getMessageUnmarshaller(deserializer, toUtf82) {
1008
1008
  };
1009
1009
  }
1010
1010
 
1011
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js
1011
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/EventStreamMarshaller.js
1012
1012
  var EventStreamMarshaller = class {
1013
1013
  eventStreamCodec;
1014
1014
  utfEncoder;
@@ -1033,7 +1033,7 @@ var EventStreamMarshaller = class {
1033
1033
  };
1034
1034
  var eventStreamSerdeProvider = (options) => new EventStreamMarshaller(options);
1035
1035
 
1036
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js
1036
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/EventStreamMarshaller.js
1037
1037
  var EventStreamMarshaller2 = class {
1038
1038
  universalMarshaller;
1039
1039
  constructor({ utf8Encoder, utf8Decoder }) {
@@ -1078,7 +1078,7 @@ async function* readableToIterable(readStream) {
1078
1078
  }
1079
1079
  }
1080
1080
 
1081
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js
1081
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js
1082
1082
  var readableStreamToIterable = (readableStream) => ({
1083
1083
  [Symbol.asyncIterator]: async function* () {
1084
1084
  const reader = readableStream.getReader();
@@ -1107,12 +1107,12 @@ var iterableToReadableStream = (asyncIterable) => {
1107
1107
  });
1108
1108
  };
1109
1109
 
1110
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js
1110
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-config-resolver/EventStreamSerdeConfig.js
1111
1111
  var resolveEventStreamSerdeConfig = (input) => Object.assign(input, {
1112
1112
  eventStreamMarshaller: input.eventStreamSerdeProvider(input)
1113
1113
  });
1114
1114
 
1115
- // ../node_modules/.bun/@smithy+core@3.24.6/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js
1115
+ // ../node_modules/.bun/@smithy+core@3.25.1/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js
1116
1116
  var EventStreamSerde = class {
1117
1117
  marshaller;
1118
1118
  serializer;
package/dist/index.js CHANGED
@@ -1473,7 +1473,7 @@ var require_stringify = __commonJS({
1473
1473
  props.push(doc.directives.tagString(tag));
1474
1474
  return props.join(" ");
1475
1475
  }
1476
- function stringify2(item, ctx, onComment, onChompKeep) {
1476
+ function stringify(item, ctx, onComment, onChompKeep) {
1477
1477
  if (identity.isPair(item))
1478
1478
  return item.toString(ctx, onComment, onChompKeep);
1479
1479
  if (identity.isAlias(item)) {
@@ -1502,7 +1502,7 @@ var require_stringify = __commonJS({
1502
1502
  ${ctx.indent}${str}`;
1503
1503
  }
1504
1504
  exports.createStringifyContext = createStringifyContext;
1505
- exports.stringify = stringify2;
1505
+ exports.stringify = stringify;
1506
1506
  }
1507
1507
  });
1508
1508
 
@@ -1512,7 +1512,7 @@ var require_stringifyPair = __commonJS({
1512
1512
  "use strict";
1513
1513
  var identity = require_identity();
1514
1514
  var Scalar = require_Scalar();
1515
- var stringify2 = require_stringify();
1515
+ var stringify = require_stringify();
1516
1516
  var stringifyComment = require_stringifyComment();
1517
1517
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
1518
1518
  const { allNullValues, doc, indent, indentStep, options: { commentString, indentSeq, simpleKeys } } = ctx;
@@ -1534,7 +1534,7 @@ var require_stringifyPair = __commonJS({
1534
1534
  });
1535
1535
  let keyCommentDone = false;
1536
1536
  let chompKeep = false;
1537
- let str = stringify2.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
1537
+ let str = stringify.stringify(key, ctx, () => keyCommentDone = true, () => chompKeep = true);
1538
1538
  if (!explicitKey && !ctx.inFlow && str.length > 1024) {
1539
1539
  if (simpleKeys)
1540
1540
  throw new Error("With simple keys, single line scalar must not span more than 1024 characters");
@@ -1586,7 +1586,7 @@ ${indent}:`;
1586
1586
  ctx.indent = ctx.indent.substring(2);
1587
1587
  }
1588
1588
  let valueCommentDone = false;
1589
- const valueStr = stringify2.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
1589
+ const valueStr = stringify.stringify(value, ctx, () => valueCommentDone = true, () => chompKeep = true);
1590
1590
  let ws = " ";
1591
1591
  if (keyComment || vsb || vcb) {
1592
1592
  ws = vsb ? "\n" : "";
@@ -1727,7 +1727,7 @@ var require_addPairToJSMap = __commonJS({
1727
1727
  "use strict";
1728
1728
  var log = require_log();
1729
1729
  var merge = require_merge();
1730
- var stringify2 = require_stringify();
1730
+ var stringify = require_stringify();
1731
1731
  var identity = require_identity();
1732
1732
  var toJS = require_toJS();
1733
1733
  function addPairToJSMap(ctx, map, { key, value }) {
@@ -1763,7 +1763,7 @@ var require_addPairToJSMap = __commonJS({
1763
1763
  if (typeof jsKey !== "object")
1764
1764
  return String(jsKey);
1765
1765
  if (identity.isNode(key) && ctx?.doc) {
1766
- const strCtx = stringify2.createStringifyContext(ctx.doc, {});
1766
+ const strCtx = stringify.createStringifyContext(ctx.doc, {});
1767
1767
  strCtx.anchors = /* @__PURE__ */ new Set();
1768
1768
  for (const node of ctx.anchors.keys())
1769
1769
  strCtx.anchors.add(node.anchor);
@@ -1830,12 +1830,12 @@ var require_stringifyCollection = __commonJS({
1830
1830
  "../node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
1831
1831
  "use strict";
1832
1832
  var identity = require_identity();
1833
- var stringify2 = require_stringify();
1833
+ var stringify = require_stringify();
1834
1834
  var stringifyComment = require_stringifyComment();
1835
1835
  function stringifyCollection(collection, ctx, options) {
1836
1836
  const flow = ctx.inFlow ?? collection.flow;
1837
- const stringify3 = flow ? stringifyFlowCollection : stringifyBlockCollection;
1838
- return stringify3(collection, ctx, options);
1837
+ const stringify2 = flow ? stringifyFlowCollection : stringifyBlockCollection;
1838
+ return stringify2(collection, ctx, options);
1839
1839
  }
1840
1840
  function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
1841
1841
  const { indent, options: { commentString } } = ctx;
@@ -1860,7 +1860,7 @@ var require_stringifyCollection = __commonJS({
1860
1860
  }
1861
1861
  }
1862
1862
  chompKeep = false;
1863
- let str2 = stringify2.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
1863
+ let str2 = stringify.stringify(item, itemCtx, () => comment2 = null, () => chompKeep = true);
1864
1864
  if (comment2)
1865
1865
  str2 += stringifyComment.lineComment(str2, itemIndent, commentString(comment2));
1866
1866
  if (chompKeep && comment2)
@@ -1927,7 +1927,7 @@ ${indent}${line}` : "\n";
1927
1927
  }
1928
1928
  if (comment)
1929
1929
  reqNewline = true;
1930
- let str = stringify2.stringify(item, itemCtx, () => comment = null);
1930
+ let str = stringify.stringify(item, itemCtx, () => comment = null);
1931
1931
  reqNewline || (reqNewline = lines.length > linesAtValue || str.includes("\n"));
1932
1932
  if (i < items.length - 1) {
1933
1933
  str += ",";
@@ -3288,7 +3288,7 @@ var require_stringifyDocument = __commonJS({
3288
3288
  "../node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
3289
3289
  "use strict";
3290
3290
  var identity = require_identity();
3291
- var stringify2 = require_stringify();
3291
+ var stringify = require_stringify();
3292
3292
  var stringifyComment = require_stringifyComment();
3293
3293
  function stringifyDocument(doc, options) {
3294
3294
  const lines = [];
@@ -3303,7 +3303,7 @@ var require_stringifyDocument = __commonJS({
3303
3303
  }
3304
3304
  if (hasDirectives)
3305
3305
  lines.push("---");
3306
- const ctx = stringify2.createStringifyContext(doc, options);
3306
+ const ctx = stringify.createStringifyContext(doc, options);
3307
3307
  const { commentString } = ctx.options;
3308
3308
  if (doc.commentBefore) {
3309
3309
  if (lines.length !== 1)
@@ -3325,7 +3325,7 @@ var require_stringifyDocument = __commonJS({
3325
3325
  contentComment = doc.contents.comment;
3326
3326
  }
3327
3327
  const onChompKeep = contentComment ? void 0 : () => chompKeep = true;
3328
- let body = stringify2.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
3328
+ let body = stringify.stringify(doc.contents, ctx, () => contentComment = null, onChompKeep);
3329
3329
  if (contentComment)
3330
3330
  body += stringifyComment.lineComment(body, "", commentString(contentComment));
3331
3331
  if ((body[0] === "|" || body[0] === ">") && lines[lines.length - 1] === "---") {
@@ -3333,7 +3333,7 @@ var require_stringifyDocument = __commonJS({
3333
3333
  } else
3334
3334
  lines.push(body);
3335
3335
  } else {
3336
- lines.push(stringify2.stringify(doc.contents, ctx));
3336
+ lines.push(stringify.stringify(doc.contents, ctx));
3337
3337
  }
3338
3338
  if (doc.directives?.docEnd) {
3339
3339
  if (doc.comment) {
@@ -5468,7 +5468,7 @@ var require_cst_scalar = __commonJS({
5468
5468
  var require_cst_stringify = __commonJS({
5469
5469
  "../node_modules/.bun/yaml@2.9.0/node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
5470
5470
  "use strict";
5471
- var stringify2 = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
5471
+ var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
5472
5472
  function stringifyToken(token) {
5473
5473
  switch (token.type) {
5474
5474
  case "block-scalar": {
@@ -5521,7 +5521,7 @@ var require_cst_stringify = __commonJS({
5521
5521
  res += stringifyToken(value);
5522
5522
  return res;
5523
5523
  }
5524
- exports.stringify = stringify2;
5524
+ exports.stringify = stringify;
5525
5525
  }
5526
5526
  });
5527
5527
 
@@ -7251,7 +7251,7 @@ var require_public_api = __commonJS({
7251
7251
  }
7252
7252
  return doc.toJS(Object.assign({ reviver: _reviver }, options));
7253
7253
  }
7254
- function stringify2(value, replacer, options) {
7254
+ function stringify(value, replacer, options) {
7255
7255
  let _replacer = null;
7256
7256
  if (typeof replacer === "function" || Array.isArray(replacer)) {
7257
7257
  _replacer = replacer;
@@ -7276,7 +7276,7 @@ var require_public_api = __commonJS({
7276
7276
  exports.parse = parse;
7277
7277
  exports.parseAllDocuments = parseAllDocuments;
7278
7278
  exports.parseDocument = parseDocument;
7279
- exports.stringify = stringify2;
7279
+ exports.stringify = stringify;
7280
7280
  }
7281
7281
  });
7282
7282
 
@@ -7343,7 +7343,7 @@ function isRecord(value) {
7343
7343
  }
7344
7344
 
7345
7345
  // ../shared/src/agent.ts
7346
- var VALID_AGENT_PROVIDERS = ["claude", "codex", "cursor", "relay"];
7346
+ var VALID_AGENT_PROVIDERS = ["claude", "codex", "cursor", "opencode", "relay"];
7347
7347
  var VALID_CODING_AGENT_PROVIDERS = VALID_AGENT_PROVIDERS.filter(
7348
7348
  (provider) => provider !== "relay"
7349
7349
  );
@@ -7356,6 +7356,8 @@ function getProviderDisplayName(provider, variant = "short") {
7356
7356
  return "Codex";
7357
7357
  case "cursor":
7358
7358
  return "Cursor";
7359
+ case "opencode":
7360
+ return "Opencode";
7359
7361
  case "relay":
7360
7362
  return "Relay";
7361
7363
  case "claude":
@@ -7517,16 +7519,13 @@ scrot /tmp/state.png
7517
7519
  replicas computer info
7518
7520
 
7519
7521
  # 2) Launch a browser on the workspace display.
7520
- replicas computer launch chrome
7522
+ replicas computer launch chrome https://news.ycombinator.com
7521
7523
 
7522
7524
  # 3) Take a screenshot so you can see what's there.
7523
7525
  replicas computer screenshot /tmp/state.png
7524
7526
  # (Read the PNG yourself before deciding where to click.)
7525
7527
 
7526
7528
  # 4) Drive the UI.
7527
- replicas computer key ctrl+l # focus address bar
7528
- replicas computer type "https://news.ycombinator.com"
7529
- replicas computer key Return
7530
7529
  replicas computer click 521 700 # click coordinates from the screenshot
7531
7530
  replicas computer scroll down --amount 5
7532
7531
 
@@ -7579,6 +7578,7 @@ Spawns an app on the workspace display. Built-in aliases:
7579
7578
  - \`notepad\` / \`editor\` - mousepad (lightweight GTK text editor)
7580
7579
  - \`files\` / \`filemanager\` - thunar (file manager)
7581
7580
  Anything else gets \`exec\`'d verbatim, so \`replicas computer launch xeyes\` works if xeyes is installed.
7581
+ When opening a known page, prefer passing the URL directly: \`replicas computer launch chrome http://localhost:3000/\`.
7582
7582
 
7583
7583
  ### \`replicas computer record start <path> [--fps N]\`
7584
7584
  Starts an ffmpeg screen recorder. Output is a fragmented MP4 (still playable if the workspace dies mid-record). Default 60fps; drop to 30 if the workspace is CPU-constrained.
@@ -7604,6 +7604,8 @@ replicas computer screenshot /tmp/after-click.png
7604
7604
 
7605
7605
  ### Typing into an address bar
7606
7606
  \`\`\`bash
7607
+ replicas computer launch chrome
7608
+ sleep 2
7607
7609
  replicas computer key ctrl+l # focus address bar
7608
7610
  replicas computer type "https://example.com"
7609
7611
  replicas computer key Return
@@ -8986,6 +8988,7 @@ var CLAUDE_OPUS_1M_MODEL = "opus[1m]";
8986
8988
  var LEGACY_CLAUDE_OPUS_1M_MODEL = "opus-1m";
8987
8989
  var DEFAULT_CODEX_MODEL = "gpt-5.5";
8988
8990
  var DEFAULT_CURSOR_MODEL = "composer-2";
8991
+ var DEFAULT_OPENCODE_MODEL = "z-ai/glm-5.2";
8989
8992
  var MODEL_LABELS = {
8990
8993
  sonnet: "Sonnet 4.5",
8991
8994
  opus: "Opus 4.8",
@@ -8994,7 +8997,11 @@ var MODEL_LABELS = {
8994
8997
  haiku: "Haiku 4.5",
8995
8998
  [DEFAULT_CODEX_MODEL]: "GPT-5.5",
8996
8999
  [DEFAULT_CURSOR_MODEL]: "Composer 2",
9000
+ [DEFAULT_OPENCODE_MODEL]: "GLM 5.2 via OpenRouter",
8997
9001
  "composer-2.5": "Composer 2.5",
9002
+ "minimax/minimax-m3": "MiniMax M3 via OpenRouter",
9003
+ "xiaomi/mimo-v2.5-pro": "MiMo V2.5 Pro via OpenRouter",
9004
+ "moonshotai/kimi-k2.6:free": "Kimi K2.6 via OpenRouter",
8998
9005
  "gpt-5.4": "GPT-5.4",
8999
9006
  "gpt-5.4-mini": "GPT-5.4 Mini",
9000
9007
  "gpt-5.3-codex": "GPT-5.3 Codex",
@@ -9340,12 +9347,8 @@ function parseCodexEvents(events) {
9340
9347
  return messages;
9341
9348
  }
9342
9349
 
9343
- // ../shared/src/display-message/parsers/cursor-parser.ts
9344
- function getTextContent(value) {
9345
- if (!Array.isArray(value)) return "";
9346
- return value.map((block) => isRecord(block) && block.type === "text" && typeof block.text === "string" ? block.text : "").join("");
9347
- }
9348
- function stringify(value) {
9350
+ // ../shared/src/display-message/parsers/utils.ts
9351
+ function stringifyDisplayValue(value) {
9349
9352
  if (value === void 0 || value === null) return void 0;
9350
9353
  if (typeof value === "string") return value;
9351
9354
  try {
@@ -9354,6 +9357,12 @@ function stringify(value) {
9354
9357
  return String(value);
9355
9358
  }
9356
9359
  }
9360
+
9361
+ // ../shared/src/display-message/parsers/cursor-parser.ts
9362
+ function getTextContent(value) {
9363
+ if (!Array.isArray(value)) return "";
9364
+ return value.map((block) => isRecord(block) && block.type === "text" && typeof block.text === "string" ? block.text : "").join("");
9365
+ }
9357
9366
  function cursorStatusToDisplayStatus(status) {
9358
9367
  return status === "completed" || status === "FINISHED" ? "completed" : status === "error" || status === "ERROR" || status === "CANCELLED" || status === "EXPIRED" ? "failed" : "in_progress";
9359
9368
  }
@@ -9486,7 +9495,7 @@ function parseCursorEvents(events) {
9486
9495
  server: "cursor",
9487
9496
  tool,
9488
9497
  ...input !== void 0 ? { input } : {},
9489
- output: stringify(event.payload.result),
9498
+ output: stringifyDisplayValue(event.payload.result),
9490
9499
  status,
9491
9500
  timestamp: event.timestamp
9492
9501
  };
@@ -9538,6 +9547,130 @@ function parseCursorEvents(events) {
9538
9547
  return messages;
9539
9548
  }
9540
9549
 
9550
+ // ../shared/src/display-message/parsers/opencode-parser.ts
9551
+ function timestampFromMs(value, fallback) {
9552
+ return typeof value === "number" && Number.isFinite(value) ? new Date(value).toISOString() : fallback;
9553
+ }
9554
+ function partFromEvent(event) {
9555
+ return isRecord(event.payload.part) ? event.payload.part : null;
9556
+ }
9557
+ function toolStatus(status) {
9558
+ return status === "completed" ? "completed" : status === "error" ? "failed" : "in_progress";
9559
+ }
9560
+ function setById(messages, id, next) {
9561
+ const index = messages.findIndex((message) => message.id === id);
9562
+ if (index === -1) {
9563
+ messages.push(next);
9564
+ } else {
9565
+ messages[index] = next;
9566
+ }
9567
+ }
9568
+ function assistantError(info) {
9569
+ if (!isRecord(info) || !isRecord(info.error)) return null;
9570
+ const data = isRecord(info.error.data) ? info.error.data : null;
9571
+ if (typeof data?.message === "string") return data.message;
9572
+ if (typeof info.error.message === "string") return info.error.message;
9573
+ return stringifyDisplayValue(info.error) ?? "Opencode run failed";
9574
+ }
9575
+ function parseOpencodeEvents(events) {
9576
+ const messages = [];
9577
+ for (const event of events) {
9578
+ if (event.type === "event_msg" && event.payload.type === "user_message") {
9579
+ const message = event.payload.message;
9580
+ if (typeof message === "string" && message.trim()) {
9581
+ messages.push({
9582
+ id: `opencode-user-${event.timestamp}-${messages.length}`,
9583
+ type: "user",
9584
+ content: message,
9585
+ timestamp: event.timestamp
9586
+ });
9587
+ }
9588
+ continue;
9589
+ }
9590
+ if (event.type === "opencode-message.updated") {
9591
+ const error = assistantError(event.payload.info);
9592
+ if (error) {
9593
+ messages.push({
9594
+ id: `opencode-error-${event.timestamp}-${messages.length}`,
9595
+ type: "error",
9596
+ message: error,
9597
+ timestamp: event.timestamp
9598
+ });
9599
+ }
9600
+ continue;
9601
+ }
9602
+ if (event.type === "opencode-error") {
9603
+ const message = typeof event.payload.message === "string" ? event.payload.message : "Opencode run failed";
9604
+ messages.push({
9605
+ id: `opencode-error-${event.timestamp}-${messages.length}`,
9606
+ type: "error",
9607
+ message,
9608
+ timestamp: event.timestamp
9609
+ });
9610
+ continue;
9611
+ }
9612
+ const part = partFromEvent(event);
9613
+ if (!part) continue;
9614
+ const id = typeof part.id === "string" ? `opencode-${part.id}` : `opencode-${event.timestamp}-${messages.length}`;
9615
+ const time = isRecord(part.time) ? part.time : null;
9616
+ const timestamp = timestampFromMs(time?.start, event.timestamp);
9617
+ if (part.type === "text") {
9618
+ const text = typeof part.text === "string" ? part.text : "";
9619
+ if (text.trim()) {
9620
+ setById(messages, id, {
9621
+ id,
9622
+ type: "agent",
9623
+ content: text,
9624
+ timestamp
9625
+ });
9626
+ }
9627
+ continue;
9628
+ }
9629
+ if (part.type === "reasoning") {
9630
+ const text = typeof part.text === "string" ? part.text : "";
9631
+ if (text.trim()) {
9632
+ setById(messages, id, {
9633
+ id,
9634
+ type: "reasoning",
9635
+ content: text,
9636
+ status: time?.end ? "completed" : "in_progress",
9637
+ timestamp
9638
+ });
9639
+ }
9640
+ continue;
9641
+ }
9642
+ if (part.type === "tool" && isRecord(part.state)) {
9643
+ const state = part.state;
9644
+ const status = toolStatus(state.status);
9645
+ const output = state.status === "completed" ? stringifyDisplayValue(state.output) : state.status === "error" ? stringifyDisplayValue(state.error) : void 0;
9646
+ setById(messages, id, {
9647
+ id,
9648
+ type: "tool_call",
9649
+ server: "opencode",
9650
+ tool: typeof part.tool === "string" ? part.tool : "tool",
9651
+ input: isRecord(state.input) ? state.input : stringifyDisplayValue(state.input),
9652
+ output,
9653
+ status,
9654
+ timestamp
9655
+ });
9656
+ continue;
9657
+ }
9658
+ if (part.type === "patch") {
9659
+ const files = Array.isArray(part.files) ? part.files.filter((file) => typeof file === "string") : [];
9660
+ if (files.length > 0) {
9661
+ setById(messages, id, {
9662
+ id,
9663
+ type: "file_change",
9664
+ changes: files.map((path) => ({ path, kind: "update" })),
9665
+ status: "completed",
9666
+ timestamp
9667
+ });
9668
+ }
9669
+ }
9670
+ }
9671
+ return messages;
9672
+ }
9673
+
9541
9674
  // ../shared/src/display-message/task-accumulator.ts
9542
9675
  function mapTaskStatus(status) {
9543
9676
  if (status === "in_progress" || status === "completed") return status;
@@ -10072,6 +10205,9 @@ function parseAgentEvents(events, agentType) {
10072
10205
  if (agentType === "cursor") {
10073
10206
  return parseCursorEvents(events);
10074
10207
  }
10208
+ if (agentType === "opencode") {
10209
+ return parseOpencodeEvents(events);
10210
+ }
10075
10211
  return parseClaudeEvents(events);
10076
10212
  }
10077
10213
 
@@ -10116,7 +10252,7 @@ function result(data, isError = false) {
10116
10252
  }
10117
10253
  var server = new McpServer({
10118
10254
  name: "replicas-mcp",
10119
- version: "0.2.7"
10255
+ version: "0.2.8"
10120
10256
  });
10121
10257
  var registerTool = server.registerTool.bind(server);
10122
10258
  var codingAgentSchema = z.string().refine(isValidCodingAgentProvider, {