replicas-cli 0.2.809 → 0.2.811

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.
Files changed (2) hide show
  1. package/dist/index.cjs +62 -52
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1841,7 +1841,7 @@ var require_Pair = __commonJS({
1841
1841
  value = value.clone(schema);
1842
1842
  return new _Pair(key, value);
1843
1843
  }
1844
- toJSON(_2, ctx) {
1844
+ toJSON(_, ctx) {
1845
1845
  const pair = ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
1846
1846
  return addPairToJSMap.addPairToJSMap(ctx, pair, this);
1847
1847
  }
@@ -2118,7 +2118,7 @@ var require_YAMLMap = __commonJS({
2118
2118
  * @param {Class} Type - If set, forces the returned collection type
2119
2119
  * @returns Instance of Type, Map, or Object
2120
2120
  */
2121
- toJSON(_2, ctx, Type) {
2121
+ toJSON(_, ctx, Type) {
2122
2122
  const map2 = Type ? new Type() : ctx?.mapAsMap ? /* @__PURE__ */ new Map() : {};
2123
2123
  if (ctx?.onCreate)
2124
2124
  ctx.onCreate(map2);
@@ -2241,7 +2241,7 @@ var require_YAMLSeq = __commonJS({
2241
2241
  else
2242
2242
  this.items[idx] = value;
2243
2243
  }
2244
- toJSON(_2, ctx) {
2244
+ toJSON(_, ctx) {
2245
2245
  const seq = [];
2246
2246
  if (ctx?.onCreate)
2247
2247
  ctx.onCreate(seq);
@@ -2750,9 +2750,9 @@ var require_omap = __commonJS({
2750
2750
  * If `ctx` is given, the return type is actually `Map<unknown, unknown>`,
2751
2751
  * but TypeScript won't allow widening the signature of a child method.
2752
2752
  */
2753
- toJSON(_2, ctx) {
2753
+ toJSON(_, ctx) {
2754
2754
  if (!ctx)
2755
- return super.toJSON(_2);
2755
+ return super.toJSON(_);
2756
2756
  const map2 = /* @__PURE__ */ new Map();
2757
2757
  if (ctx?.onCreate)
2758
2758
  ctx.onCreate(map2);
@@ -3007,8 +3007,8 @@ var require_set = __commonJS({
3007
3007
  this.items.push(new Pair.Pair(key));
3008
3008
  }
3009
3009
  }
3010
- toJSON(_2, ctx) {
3011
- return super.toJSON(_2, ctx, Set);
3010
+ toJSON(_, ctx) {
3011
+ return super.toJSON(_, ctx, Set);
3012
3012
  }
3013
3013
  toString(ctx, onComment, onChompKeep) {
3014
3014
  if (!ctx)
@@ -8331,7 +8331,7 @@ function $constructor(name, initializer3, params) {
8331
8331
  Object.defineProperty(inst, "_zod", {
8332
8332
  value: {
8333
8333
  def,
8334
- constr: _2,
8334
+ constr: _,
8335
8335
  traits: /* @__PURE__ */ new Set()
8336
8336
  },
8337
8337
  enumerable: false
@@ -8342,7 +8342,7 @@ function $constructor(name, initializer3, params) {
8342
8342
  }
8343
8343
  inst._zod.traits.add(name);
8344
8344
  initializer3(inst, def);
8345
- const proto = _2.prototype;
8345
+ const proto = _.prototype;
8346
8346
  const keys = Object.keys(proto);
8347
8347
  for (let i = 0; i < keys.length; i++) {
8348
8348
  const k = keys[i];
@@ -8355,7 +8355,7 @@ function $constructor(name, initializer3, params) {
8355
8355
  class Definition extends Parent {
8356
8356
  }
8357
8357
  Object.defineProperty(Definition, "name", { value: name });
8358
- function _2(def) {
8358
+ function _(def) {
8359
8359
  var _a3;
8360
8360
  const inst = params?.Parent ? new Definition() : this;
8361
8361
  init(inst, def);
@@ -8365,16 +8365,16 @@ function $constructor(name, initializer3, params) {
8365
8365
  }
8366
8366
  return inst;
8367
8367
  }
8368
- Object.defineProperty(_2, "init", { value: init });
8369
- Object.defineProperty(_2, Symbol.hasInstance, {
8368
+ Object.defineProperty(_, "init", { value: init });
8369
+ Object.defineProperty(_, Symbol.hasInstance, {
8370
8370
  value: (inst) => {
8371
8371
  if (params?.Parent && inst instanceof params.Parent)
8372
8372
  return true;
8373
8373
  return inst?._zod?.traits?.has(name);
8374
8374
  }
8375
8375
  });
8376
- Object.defineProperty(_2, "name", { value: name });
8377
- return _2;
8376
+ Object.defineProperty(_, "name", { value: name });
8377
+ return _;
8378
8378
  }
8379
8379
  var $brand = /* @__PURE__ */ Symbol("zod_brand");
8380
8380
  var $ZodAsyncError = class extends Error {
@@ -8474,17 +8474,17 @@ function assertIs(_arg) {
8474
8474
  function assertNever(_x) {
8475
8475
  throw new Error("Unexpected value in exhaustive check");
8476
8476
  }
8477
- function assert(_2) {
8477
+ function assert(_) {
8478
8478
  }
8479
8479
  function getEnumValues(entries) {
8480
8480
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
8481
- const values = Object.entries(entries).filter(([k, _2]) => numericValues.indexOf(+k) === -1).map(([_2, v]) => v);
8481
+ const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
8482
8482
  return values;
8483
8483
  }
8484
8484
  function joinValues(array2, separator = "|") {
8485
8485
  return array2.map((val) => stringifyPrimitive(val)).join(separator);
8486
8486
  }
8487
- function jsonStringifyReplacer(_2, value) {
8487
+ function jsonStringifyReplacer(_, value) {
8488
8488
  if (typeof value === "bigint")
8489
8489
  return value.toString();
8490
8490
  return value;
@@ -8609,7 +8609,7 @@ var allowsEval = /* @__PURE__ */ cached(() => {
8609
8609
  const F = Function;
8610
8610
  new F("");
8611
8611
  return true;
8612
- } catch (_2) {
8612
+ } catch (_) {
8613
8613
  return false;
8614
8614
  }
8615
8615
  });
@@ -8730,31 +8730,31 @@ function normalizeParams(_params) {
8730
8730
  function createTransparentProxy(getter) {
8731
8731
  let target;
8732
8732
  return new Proxy({}, {
8733
- get(_2, prop, receiver) {
8733
+ get(_, prop, receiver) {
8734
8734
  target ?? (target = getter());
8735
8735
  return Reflect.get(target, prop, receiver);
8736
8736
  },
8737
- set(_2, prop, value, receiver) {
8737
+ set(_, prop, value, receiver) {
8738
8738
  target ?? (target = getter());
8739
8739
  return Reflect.set(target, prop, value, receiver);
8740
8740
  },
8741
- has(_2, prop) {
8741
+ has(_, prop) {
8742
8742
  target ?? (target = getter());
8743
8743
  return Reflect.has(target, prop);
8744
8744
  },
8745
- deleteProperty(_2, prop) {
8745
+ deleteProperty(_, prop) {
8746
8746
  target ?? (target = getter());
8747
8747
  return Reflect.deleteProperty(target, prop);
8748
8748
  },
8749
- ownKeys(_2) {
8749
+ ownKeys(_) {
8750
8750
  target ?? (target = getter());
8751
8751
  return Reflect.ownKeys(target);
8752
8752
  },
8753
- getOwnPropertyDescriptor(_2, prop) {
8753
+ getOwnPropertyDescriptor(_, prop) {
8754
8754
  target ?? (target = getter());
8755
8755
  return Reflect.getOwnPropertyDescriptor(target, prop);
8756
8756
  },
8757
- defineProperty(_2, prop, descriptor) {
8757
+ defineProperty(_, prop, descriptor) {
8758
8758
  target ?? (target = getter());
8759
8759
  return Reflect.defineProperty(target, prop, descriptor);
8760
8760
  }
@@ -9046,7 +9046,7 @@ function issue(...args) {
9046
9046
  return { ...iss };
9047
9047
  }
9048
9048
  function cleanEnum(obj) {
9049
- return Object.entries(obj).filter(([k, _2]) => {
9049
+ return Object.entries(obj).filter(([k, _]) => {
9050
9050
  return Number.isNaN(Number.parseInt(k, 10));
9051
9051
  }).map((el) => el[1]);
9052
9052
  }
@@ -10105,13 +10105,13 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
10105
10105
  continue;
10106
10106
  }
10107
10107
  const currLen = payload.issues.length;
10108
- const _2 = ch._zod.check(payload);
10109
- if (_2 instanceof Promise && ctx?.async === false) {
10108
+ const _ = ch._zod.check(payload);
10109
+ if (_ instanceof Promise && ctx?.async === false) {
10110
10110
  throw new $ZodAsyncError();
10111
10111
  }
10112
- if (asyncResult || _2 instanceof Promise) {
10112
+ if (asyncResult || _ instanceof Promise) {
10113
10113
  asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
10114
- await _2;
10114
+ await _;
10115
10115
  const nextLen = payload.issues.length;
10116
10116
  if (nextLen === currLen)
10117
10117
  return;
@@ -10173,7 +10173,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
10173
10173
  try {
10174
10174
  const r = safeParse(inst, value);
10175
10175
  return r.success ? { value: r.data } : { issues: r.error?.issues };
10176
- } catch (_2) {
10176
+ } catch (_) {
10177
10177
  return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
10178
10178
  }
10179
10179
  },
@@ -10184,11 +10184,11 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
10184
10184
  var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
10185
10185
  $ZodType.init(inst, def);
10186
10186
  inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
10187
- inst._zod.parse = (payload, _2) => {
10187
+ inst._zod.parse = (payload, _) => {
10188
10188
  if (def.coerce)
10189
10189
  try {
10190
10190
  payload.value = String(payload.value);
10191
- } catch (_3) {
10191
+ } catch (_2) {
10192
10192
  }
10193
10193
  if (typeof payload.value === "string")
10194
10194
  return payload;
@@ -10286,7 +10286,7 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
10286
10286
  payload.value = trimmed;
10287
10287
  }
10288
10288
  return;
10289
- } catch (_2) {
10289
+ } catch (_) {
10290
10290
  payload.issues.push({
10291
10291
  code: "invalid_format",
10292
10292
  format: "url",
@@ -10513,7 +10513,7 @@ var $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
10513
10513
  if (def.coerce)
10514
10514
  try {
10515
10515
  payload.value = Number(payload.value);
10516
- } catch (_2) {
10516
+ } catch (_) {
10517
10517
  }
10518
10518
  const input = payload.value;
10519
10519
  if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
@@ -10541,7 +10541,7 @@ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
10541
10541
  if (def.coerce)
10542
10542
  try {
10543
10543
  payload.value = Boolean(payload.value);
10544
- } catch (_2) {
10544
+ } catch (_) {
10545
10545
  }
10546
10546
  const input = payload.value;
10547
10547
  if (typeof input === "boolean")
@@ -10562,7 +10562,7 @@ var $ZodBigInt = /* @__PURE__ */ $constructor("$ZodBigInt", (inst, def) => {
10562
10562
  if (def.coerce)
10563
10563
  try {
10564
10564
  payload.value = BigInt(payload.value);
10565
- } catch (_2) {
10565
+ } catch (_) {
10566
10566
  }
10567
10567
  if (typeof payload.value === "bigint")
10568
10568
  return payload;
@@ -12131,7 +12131,7 @@ var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
12131
12131
  var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
12132
12132
  $ZodCheck.init(inst, def);
12133
12133
  $ZodType.init(inst, def);
12134
- inst._zod.parse = (payload, _2) => {
12134
+ inst._zod.parse = (payload, _) => {
12135
12135
  return payload;
12136
12136
  };
12137
12137
  inst._zod.check = (payload) => {
@@ -20080,7 +20080,7 @@ function toJSONSchema(input, params) {
20080
20080
  const ctx2 = initializeContext({ ...params, processors: allProcessors });
20081
20081
  const defs = {};
20082
20082
  for (const entry of registry2._idmap.entries()) {
20083
- const [_2, schema] = entry;
20083
+ const [_, schema] = entry;
20084
20084
  process2(schema, ctx2);
20085
20085
  }
20086
20086
  const schemas = {};
@@ -20179,7 +20179,7 @@ var JSONSchemaGenerator = class {
20179
20179
  }
20180
20180
  extractDefs(this.ctx, schema);
20181
20181
  const result = finalize(this.ctx, schema);
20182
- const { "~standard": _2, ...plainResult } = result;
20182
+ const { "~standard": _, ...plainResult } = result;
20183
20183
  return plainResult;
20184
20184
  }
20185
20185
  };
@@ -25596,11 +25596,6 @@ var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZ
25596
25596
  // ../shared/src/memory.ts
25597
25597
  var HISTORY_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/history`;
25598
25598
  var HISTORY_INDEX_FILENAME = "INDEX.md";
25599
- var memoryExtractionResultSchema = external_exports.object({
25600
- summary: external_exports.string().nullable(),
25601
- indexEntry: external_exports.string().nullable()
25602
- });
25603
- var { $schema: _, ...MEMORY_EXTRACTION_SCHEMA } = external_exports.toJSONSchema(memoryExtractionResultSchema);
25604
25599
 
25605
25600
  // ../shared/src/default-skills/replicas-agent/abilities/session-history.ts
25606
25601
  var SECTION12 = `### Session history
@@ -25611,20 +25606,20 @@ var REFERENCE12 = `# Session history
25611
25606
 
25612
25607
  Past sessions are installed under \`${HISTORY_ROOT}\`:
25613
25608
 
25614
- - \`${HISTORY_INDEX_FILENAME}\` lists every session, grouped under \`## YYYY-MM-DD\` headings by start day (UTC). Each line is \`- <date> <time> | <who> | <workspace> | <description> | active: <days> | <summary>\`; \`active:\` appears only for sessions spanning several days.
25615
- - \`summaries/<YYYY-MM-DD>-<id>.md\` holds the summary of a session you can read. Teammates' private sessions show \`\u2014\` instead of a summary path. Sessions without a shareable description show "Private session" unless they are yours.
25609
+ - \`${HISTORY_INDEX_FILENAME}\` lists every session, grouped under \`## YYYY-MM-DD\` headings by start day (UTC). Each line is \`- <date> <time> | <who> | <workspace> | <description>; <PRs with current state> | active: <days> | <condensed file>\`; \`active:\` appears only for sessions spanning several days.
25610
+ - \`condensed/<YYYY-MM-DD>-<id>.md\` holds the condensed transcript of a session you can read: the user's messages, the agent's replies (the final one in full), commands with their last output lines, errors, links, small diffs, and the files touched. Teammates' private sessions show "Private session" and \`\u2014\` instead of a file.
25616
25611
 
25617
- Search the index, then open the referenced summaries:
25612
+ Search the index, then open or search the condensed transcripts:
25618
25613
 
25619
25614
  \`\`\`bash
25620
25615
  cd ${HISTORY_ROOT}
25621
25616
  rg '^- 2026-09-30' ${HISTORY_INDEX_FILENAME} # sessions that started that day
25622
25617
  rg 2026-09-30 ${HISTORY_INDEX_FILENAME} # also sessions active that day
25623
25618
  rg -i 'launch|video' ${HISTORY_INDEX_FILENAME} # by topic, person, or workspace
25624
- rg -il 'launch|video' summaries/ # full-text search of summaries
25619
+ rg -il 'launch|video' condensed/ # full-text search of condensed transcripts
25625
25620
  \`\`\`
25626
25621
 
25627
- When a summary isn't enough, fetch the full transcript of any session you can read. It is saved as JSONL, one JSON string per message or tool call:
25622
+ Condensed transcripts drop most tool output. When you need an exact value, id, number, error, or a command's full output, fetch the full transcript of any session you can read. It is saved as JSONL, one JSON string per message or tool call:
25628
25623
 
25629
25624
  \`\`\`bash
25630
25625
  replicas history transcript 2026-09-30-<id>
@@ -27661,7 +27656,7 @@ function parseClaudeEvents(events, parentToolUseId) {
27661
27656
  if (refs?.agent !== void 0) staleIndexes.add(refs.agent);
27662
27657
  }
27663
27658
  if (staleIndexes.size === 0) return messages;
27664
- return messages.filter((_2, index) => !staleIndexes.has(index));
27659
+ return messages.filter((_, index) => !staleIndexes.has(index));
27665
27660
  }
27666
27661
 
27667
27662
  // ../shared/src/display-message/parsers/index.ts
@@ -27806,6 +27801,21 @@ function excludeQueuedAcceptedEvents(events, queue, removedMessageIds = []) {
27806
27801
  return events.filter((event) => event.payload.source !== ACCEPTED_USER_MESSAGE_SOURCE || !queuedMessageIds.has(getUserMessageId(event) ?? ""));
27807
27802
  }
27808
27803
 
27804
+ // ../shared/src/transcript-condense.ts
27805
+ var W = "[\\p{L}\\p{N}_]";
27806
+ var NOT_BEFORE = `(?<!${W})`;
27807
+ var NOT_AFTER = `(?!${W})`;
27808
+ var URL_RE = new RegExp(`https?://(?:github\\.com/[\\p{L}\\p{N}_.\\-]+/[\\p{L}\\p{N}_.\\-]+/(?:pull|issues|commit)/[0-9a-f]+|gitlab\\.[\\p{L}\\p{N}_.\\-]+/[\\p{L}\\p{N}_./\\-]+?/-/(?:merge_requests|issues)/\\d+|linear\\.app/[\\p{L}\\p{N}_\\-]+/issue/[\\p{L}\\p{N}_\\-]+)`, "gu");
27809
+ var PR_URL_RE = new RegExp(`https?://github\\.com/([\\p{L}\\p{N}_.\\-]+/[\\p{L}\\p{N}_.\\-]+)/pull/(\\d+)|https?://gitlab\\.[\\p{L}\\p{N}_.\\-]+/([\\p{L}\\p{N}_./\\-]+?)/-/merge_requests/(\\d+)`, "gu");
27810
+ var PR_NUM_RE = new RegExp(`(?:${NOT_BEFORE}PR|${NOT_BEFORE}pull request|${NOT_BEFORE}MR)\\s*[#!]?(\\d{1,6})${NOT_AFTER}|(?<![\\p{L}\\p{N}_/#&])#(\\d{2,6})${NOT_AFTER}`, "giu");
27811
+ var ERR_RE = new RegExp(`${NOT_BEFORE}(errors?|failed|failures?|fail|fails|exception|traceback|denied|not found|fatal|panic|cannot|unable to|refused|timed out)${NOT_AFTER}`, "iu");
27812
+ var BENIGN_RE = new RegExp(`${NOT_BEFORE}0\\s+(?:fail${W}*|errors?)${NOT_AFTER}|${NOT_BEFORE}no errors?${NOT_AFTER}|${NOT_BEFORE}errors?:\\s*0${NOT_AFTER}|${NOT_BEFORE}fail(?:ed|ures)?:\\s*0${NOT_AFTER}|${NOT_BEFORE}0 failed${NOT_AFTER}`, "giu");
27813
+ var OPENERS_RE = new RegExp(`^(done|all done|all set|fixed|pushed|merged|complete|completed|finished|yes|no|sure|ok|okay|got it|great|perfect|thanks|thank you|sounds good|on it|here you go|here it is|updated|sorry|my mistake|good catch|you(?:'re| are| were) right)${NOT_AFTER}[^.!?]{0,24}[.!?:]?$`, "iu");
27814
+ var GENERIC_CHAT_TITLE = new RegExp(
27815
+ `^(?:forked from [^\\n]*|(?:claude code|claude|codex|relay|pi|opencode|cursor|gemini|amp|droid|mothership|agent|chat|new chat|new session|untitled(?: session| chat)?|session|slack|linear(?: \xB7 [^\\n]*)?|#[\\p{L}\\p{N}_.\\-]+|[^\\n]+ \\(dm\\)|pr #\\d+ fixes)(?: \\(${W}+\\))*(?: \\d+)?)$`,
27816
+ "iu"
27817
+ );
27818
+
27809
27819
  // ../shared/src/port.ts
27810
27820
  function isValidPort(port) {
27811
27821
  return Number.isInteger(port) && Number(port) >= 1 && Number(port) <= 65535;
@@ -28076,7 +28086,7 @@ var headlessAgentRequestSchema = external_exports.object({
28076
28086
  });
28077
28087
 
28078
28088
  // ../shared/src/cli-version.ts
28079
- var CLI_VERSION = "0.2.809";
28089
+ var CLI_VERSION = "0.2.811";
28080
28090
 
28081
28091
  // ../shared/src/version.ts
28082
28092
  function compareVersions(v1, v2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.809",
3
+ "version": "0.2.811",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {