replicas-cli 0.3.408 → 0.3.409

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 +21 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -26585,7 +26585,23 @@ Check every mutation and tool call succeeded. Never put routing metadata in visi
26585
26585
  });
26586
26586
 
26587
26587
  // ../shared/src/message-origin.ts
26588
+ function parseAutomationRun(raw) {
26589
+ const match = raw.match(AUTOMATION_RUN);
26590
+ if (!match) return null;
26591
+ let run2;
26592
+ try {
26593
+ run2 = JSON.parse(match[1]);
26594
+ } catch {
26595
+ return null;
26596
+ }
26597
+ if (!isRecord(run2) || typeof run2.id !== "string" || typeof run2.name !== "string") return null;
26598
+ const rest = raw.slice(match[0].length);
26599
+ const body = stripReplicasInstructionBlock(rest.replace(SCHEDULED_FOLLOW_UP, ""));
26600
+ return { kind: "automation", id: run2.id, name: run2.name, body, ...typeof run2.firedAt === "string" ? { firedAt: run2.firedAt } : {} };
26601
+ }
26588
26602
  function parseMessageOrigin(raw) {
26603
+ const run2 = parseAutomationRun(raw);
26604
+ if (run2) return run2;
26589
26605
  const workspace = raw.match(WORKSPACE_SENDER);
26590
26606
  if (workspace) {
26591
26607
  let name;
@@ -26601,15 +26617,18 @@ function parseMessageOrigin(raw) {
26601
26617
  const automation2 = raw.match(SCHEDULED_FOLLOW_UP);
26602
26618
  return automation2 ? { kind: "automation", id: automation2[2], name: automation2[1].trim(), body: stripReplicasInstructionBlock(raw.slice(automation2[0].length)) } : null;
26603
26619
  }
26604
- var UUID, WORKSPACE_SENDER, BOARD_ANSWER, SCHEDULED_NOTE, SCHEDULED_FOLLOW_UP;
26620
+ var UUID, WORKSPACE_SENDER, BOARD_ANSWER, AUTOMATION_RUN_PREFIX, AUTOMATION_RUN, SCHEDULED_NOTE, SCHEDULED_FOLLOW_UP;
26605
26621
  var init_message_origin = __esm({
26606
26622
  "../shared/src/message-origin.ts"() {
26607
26623
  "use strict";
26608
26624
  init_prompts();
26625
+ init_type_guards();
26609
26626
  init_uuid();
26610
26627
  UUID = UUID_RE.source.slice(1, -1);
26611
26628
  WORKSPACE_SENDER = new RegExp(String.raw`^\s*<${REPLICAS_INSTRUCTIONS_TAG}>\nFrom the workspace ("(?:[^"\\\n]|\\.)*") \((${UUID})\)\.\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
26612
26629
  BOARD_ANSWER = new RegExp(String.raw`^\s*(?:<${REPLICAS_INSTRUCTIONS_TAG}>\nFrom [^\n]*\n</${REPLICAS_INSTRUCTIONS_TAG}>\s*)?<${REPLICAS_INSTRUCTIONS_TAG}>\n${BOARD_ANSWER_NOTE.replace(/\./g, "\\.")}\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
26630
+ AUTOMATION_RUN_PREFIX = "Automation run: ";
26631
+ AUTOMATION_RUN = new RegExp(String.raw`^\s*(?:<${REPLICAS_INSTRUCTIONS_TAG}>\n[^\n]*\n</${REPLICAS_INSTRUCTIONS_TAG}>\s*)*?<${REPLICAS_INSTRUCTIONS_TAG}>\n${AUTOMATION_RUN_PREFIX}(\{[^\n]*\})\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
26613
26632
  SCHEDULED_NOTE = "This is a message you or a teammate scheduled earlier, delivered into this workspace.";
26614
26633
  SCHEDULED_FOLLOW_UP = new RegExp(String.raw`^\s*\*\*Scheduled follow-up: ([^\n]+)\*\*\n\nThe automation "[^\n]*" \((${UUID})\) fired at \S+\. ${SCHEDULED_NOTE.replace(/\./g, "\\.")}`);
26615
26634
  }
@@ -37939,7 +37958,7 @@ var CLI_VERSION;
37939
37958
  var init_cli_version = __esm({
37940
37959
  "../shared/src/cli-version.ts"() {
37941
37960
  "use strict";
37942
- CLI_VERSION = "0.3.408";
37961
+ CLI_VERSION = "0.3.409";
37943
37962
  }
37944
37963
  });
37945
37964
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.408",
3
+ "version": "0.3.409",
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": {