replicas-cli 0.3.408 → 0.3.410
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.
- package/dist/index.cjs +25 -5
- 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
|
}
|
|
@@ -34772,7 +34791,7 @@ var init_workspace_target = __esm({
|
|
|
34772
34791
|
});
|
|
34773
34792
|
|
|
34774
34793
|
// ../shared/src/mothership-board.ts
|
|
34775
|
-
var MOTHERSHIP_TICKET_LIMITS, L, tooLong, text3, clearable, httpsUrl, markdown, linearIdentifier, mediaSchema, questionSchema, mothershipTicketTitleSchema, mothershipTicketTaskSchema, mothershipTicketMediaSchema, mothershipTicketQuestionsSchema, issueSchema, fixSchema, updateMothershipTicketRequestSchema, updateMothershipBoardRequestSchema, answerMothershipTicketRequestSchema, mothershipTicketAnswerRefSchema, LINEAR_ISSUE_SUMMARIES_MAX, linearIssueSummariesRequestSchema;
|
|
34794
|
+
var MOTHERSHIP_TICKET_LIMITS, L, tooLong, text3, clearable, httpsUrl, inlineMarkdown, markdown, linearIdentifier, mediaSchema, questionSchema, mothershipTicketTitleSchema, mothershipTicketTaskSchema, mothershipTicketMediaSchema, mothershipTicketQuestionsSchema, issueSchema, fixSchema, updateMothershipTicketRequestSchema, updateMothershipBoardRequestSchema, answerMothershipTicketRequestSchema, mothershipTicketAnswerRefSchema, LINEAR_ISSUE_SUMMARIES_MAX, linearIssueSummariesRequestSchema;
|
|
34776
34795
|
var init_mothership_board = __esm({
|
|
34777
34796
|
"../shared/src/mothership-board.ts"() {
|
|
34778
34797
|
"use strict";
|
|
@@ -34801,7 +34820,8 @@ var init_mothership_board = __esm({
|
|
|
34801
34820
|
text3 = (max) => external_exports.string().trim().min(1).max(max, tooLong(max));
|
|
34802
34821
|
clearable = (schema) => external_exports.union([schema, external_exports.literal("")]).optional();
|
|
34803
34822
|
httpsUrl = external_exports.url({ protocol: /^https$/, error: "Must be an https URL" });
|
|
34804
|
-
|
|
34823
|
+
inlineMarkdown = "Markdown: **bold**, *italics*, `code`, [links](https://...)";
|
|
34824
|
+
markdown = `${inlineMarkdown} and line breaks.`;
|
|
34805
34825
|
linearIdentifier = external_exports.string().regex(/^[A-Za-z][A-Za-z0-9]{0,9}-\d{1,7}$/, "Use a Linear identifier such as REP-123");
|
|
34806
34826
|
mediaSchema = external_exports.object({
|
|
34807
34827
|
url: httpsUrl.describe("The URL `replicas media upload` printed."),
|
|
@@ -34834,7 +34854,7 @@ var init_mothership_board = __esm({
|
|
|
34834
34854
|
issue: issueSchema,
|
|
34835
34855
|
fix: fixSchema,
|
|
34836
34856
|
pull_requests: external_exports.array(httpsUrl).max(20).optional().describe("Pull request URLs that came out of this ticket's task. They move here from any other ticket. Each pull request is filed under the ticket its ship was working on when it opened it, so pass this only to correct that."),
|
|
34837
|
-
note: clearable(text3(L.note)).describe(`Your one short comment on the ticket, shown under its row, replacing the last. "" removes it. At most ${L.note} characters.`),
|
|
34857
|
+
note: clearable(text3(L.note)).describe(`Your one short comment on the ticket, shown under its row, replacing the last. ${inlineMarkdown}. "" removes it. At most ${L.note} characters.`),
|
|
34838
34858
|
linear: clearable(linearIdentifier).describe('The Linear issue this ticket is for, such as REP-123. "" removes it.'),
|
|
34839
34859
|
archived: external_exports.boolean().optional().describe("true takes it off the board for good: closes its open pull requests without merging, stops their automatic fixes, and archives its ships unless they still have other tickets. false puts it back on the board.")
|
|
34840
34860
|
})).max(50).optional().describe("Changes to existing tickets."),
|
|
@@ -37939,7 +37959,7 @@ var CLI_VERSION;
|
|
|
37939
37959
|
var init_cli_version = __esm({
|
|
37940
37960
|
"../shared/src/cli-version.ts"() {
|
|
37941
37961
|
"use strict";
|
|
37942
|
-
CLI_VERSION = "0.3.
|
|
37962
|
+
CLI_VERSION = "0.3.410";
|
|
37943
37963
|
}
|
|
37944
37964
|
});
|
|
37945
37965
|
|