replicas-cli 0.3.459 → 0.3.461

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 +27 -4
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -26636,7 +26636,7 @@ function defaultReplicasAgentAbilities() {
26636
26636
  function hasAllReplicasAgentAbilities(abilities) {
26637
26637
  return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
26638
26638
  }
26639
- var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, PUSH_WHEN_ACTIVE_COPY, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS, LINEAR_ROUTING_SKILL_MAX_LENGTH, linearRoutingSkillSchema;
26639
+ var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, WALLPAPER_DITHERS, WALLPAPER_EFFECTS, PUSH_WHEN_ACTIVE_COPY, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS, LINEAR_ROUTING_SKILL_MAX_LENGTH, linearRoutingSkillSchema;
26640
26640
  var init_preferences = __esm({
26641
26641
  "../shared/src/routes/preferences.ts"() {
26642
26642
  "use strict";
@@ -26658,6 +26658,8 @@ var init_preferences = __esm({
26658
26658
  wood: ["ready", "pluck", "knock", "bloom", "steps"]
26659
26659
  };
26660
26660
  ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
26661
+ WALLPAPER_DITHERS = ["dither", "halftone", "modulation"];
26662
+ WALLPAPER_EFFECTS = ["soft", "grain", "duotone", ...WALLPAPER_DITHERS, "none"];
26661
26663
  PUSH_WHEN_ACTIVE_COPY = {
26662
26664
  wait: `Wait ${PUSH_HOLD_MINUTES} minutes`,
26663
26665
  skip: "Don\u2019t send",
@@ -35339,13 +35341,19 @@ function parseAnnotationsNote(body) {
35339
35341
  const lines = entry.trim().split("\n");
35340
35342
  const file2 = lines[0]?.match(ANNOTATION_FILE_REGEX);
35341
35343
  if (file2) lines.shift();
35344
+ const source = lines[0]?.match(ANNOTATION_SOURCE_REGEX);
35345
+ if (source) lines.shift();
35346
+ const occurrence = lines[0]?.match(ANNOTATION_OCCURRENCE_REGEX);
35347
+ if (occurrence) lines.shift();
35342
35348
  const quoteLength = lines.findIndex((line) => !line.startsWith(">"));
35343
35349
  const quote = lines.slice(0, quoteLength === -1 ? void 0 : quoteLength).map((line) => line.replace(/^>\s?/, ""));
35344
35350
  const comment = quoteLength === -1 ? "" : lines.slice(quoteLength).join("\n").trim();
35345
35351
  return {
35346
35352
  text: quote.join("\n"),
35347
35353
  ...comment ? { comment } : {},
35348
- ...file2 ? { lines: { path: file2[1], start: Number(file2[2]), end: Number(file2[3] ?? file2[2]) } } : {}
35354
+ ...file2 ? { lines: { path: file2[1], start: Number(file2[2]), end: Number(file2[3] ?? file2[2]) } } : {},
35355
+ ...occurrence ? { occurrence: Number(occurrence[1]) - 1 } : {},
35356
+ ...source ? { messageId: source[1], ...source[2] ? { endMessageId: source[2] } : {} } : {}
35349
35357
  };
35350
35358
  });
35351
35359
  }
@@ -35386,7 +35394,7 @@ function stripAttachmentNote(text4) {
35386
35394
  annotations: annotationsNote ? parseAnnotationsNote(annotationsNote.body) : []
35387
35395
  };
35388
35396
  }
35389
- var ATTACHMENT_PLACEHOLDER_REGEX, withoutAttachmentPlaceholder, annotationLinesSchema, ANNOTATIONS_NOTE_OPENING, ANNOTATIONS_NOTE_REGEX, ANNOTATION_HEADER_REGEX, ANNOTATION_FILE_REGEX, APPSHOT_NOTE_REGEX, TRUNCATED_APPSHOT_NOTE_REGEX, XML_UNESCAPES, unescapeXml, WALKTHROUGH_NOTE_REGEX, TRUNCATED_WALKTHROUGH_NOTE_REGEX, VIDEO_SIZES_REGEX, parseVideoSizes;
35397
+ var ATTACHMENT_PLACEHOLDER_REGEX, withoutAttachmentPlaceholder, annotationLinesSchema, messageAnnotationSchema, ANNOTATIONS_NOTE_OPENING, ANNOTATIONS_NOTE_REGEX, ANNOTATION_HEADER_REGEX, ANNOTATION_FILE_REGEX, ANNOTATION_OCCURRENCE_REGEX, ANNOTATION_SOURCE_REGEX, APPSHOT_NOTE_REGEX, TRUNCATED_APPSHOT_NOTE_REGEX, XML_UNESCAPES, unescapeXml, WALKTHROUGH_NOTE_REGEX, TRUNCATED_WALKTHROUGH_NOTE_REGEX, VIDEO_SIZES_REGEX, parseVideoSizes;
35390
35398
  var init_user_message_attachments = __esm({
35391
35399
  "../shared/src/user-message-attachments.ts"() {
35392
35400
  "use strict";
@@ -35396,10 +35404,22 @@ var init_user_message_attachments = __esm({
35396
35404
  ATTACHMENT_PLACEHOLDER_REGEX = /^\[\d+ (?:(?:images?|files?)(?: and \d+ files?)? attached|(?:image )?attachments?)\]$/;
35397
35405
  withoutAttachmentPlaceholder = (content, attached) => attached && ATTACHMENT_PLACEHOLDER_REGEX.test(content) ? "" : content;
35398
35406
  annotationLinesSchema = external_exports.object({ path: external_exports.string(), start: external_exports.number(), end: external_exports.number() });
35407
+ messageAnnotationSchema = external_exports.object({
35408
+ text: external_exports.string(),
35409
+ comment: external_exports.string().optional(),
35410
+ lines: annotationLinesSchema.optional(),
35411
+ /** Which match of `text` in its message was quoted, from 0, when the same words appear more than once. */
35412
+ occurrence: external_exports.number().int().nonnegative().optional(),
35413
+ /** The rendered message the quote was selected in, and its last one when it spans several, so clients find it without searching. */
35414
+ messageId: external_exports.string().optional(),
35415
+ endMessageId: external_exports.string().optional()
35416
+ });
35399
35417
  ANNOTATIONS_NOTE_OPENING = '<replicas_annotations>\nThe user quoted these passages, some with a comment. Address each annotation, and when you do, refer to it as "Annotation N".';
35400
35418
  ANNOTATIONS_NOTE_REGEX = /(?:^|\n\n)<replicas_annotations>\n([\s\S]*?)\n<\/replicas_annotations>$/;
35401
35419
  ANNOTATION_HEADER_REGEX = /^Annotation \d+$/m;
35402
35420
  ANNOTATION_FILE_REGEX = /^File: (.+):(\d+)(?:-(\d+))?$/;
35421
+ ANNOTATION_OCCURRENCE_REGEX = /^Occurrence: (\d+) /;
35422
+ ANNOTATION_SOURCE_REGEX = /^Source: (\S+)(?: to (\S+))?$/;
35403
35423
  APPSHOT_NOTE_REGEX = /(?:^|\n\n)<replicas_appshot app="([^"\n]*)" window="([^"\n]*)" image="(\d+)">\n([^\n<]*)(?:\n\n([^<]*))?\n<\/replicas_appshot>$/;
35404
35424
  TRUNCATED_APPSHOT_NOTE_REGEX = /(?:^|\n\n)<replicas_appshot app="([^"\n]*)(?:" window="([^"\n]*)(?:" image="(\d*))?)?[^<]*(?:<\/?[a-z_]*)?$/;
35405
35425
  XML_UNESCAPES = { "&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'" };
@@ -37164,6 +37184,9 @@ function toolCallMessage(id, name, args, timestamp, result) {
37164
37184
  if ((name === "write" || name === "edit") && typeof args.path === "string") {
37165
37185
  return { id, type: "file_change", changes: [{ path: args.path, kind: name === "write" ? "add" : "update" }], status, timestamp };
37166
37186
  }
37187
+ if (name === "web_search" && typeof args.query === "string") {
37188
+ return { id, type: "web_search", query: args.query, status, timestamp };
37189
+ }
37167
37190
  return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp });
37168
37191
  }
37169
37192
  function parseReplicasEvents(events) {
@@ -39126,7 +39149,7 @@ var CLI_VERSION;
39126
39149
  var init_cli_version = __esm({
39127
39150
  "../shared/src/cli-version.ts"() {
39128
39151
  "use strict";
39129
- CLI_VERSION = "0.3.459";
39152
+ CLI_VERSION = "0.3.461";
39130
39153
  }
39131
39154
  });
39132
39155
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.459",
3
+ "version": "0.3.461",
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": {