replicas-cli 0.2.108 → 0.2.111
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.
|
@@ -8353,6 +8353,75 @@ var ENTERPRISE_PLAN = PLANS.enterprise;
|
|
|
8353
8353
|
var WORKSPACE_FILE_UPLOAD_MAX_SIZE_BYTES = 20 * 1024 * 1024;
|
|
8354
8354
|
var WORKSPACE_FILE_CONTENT_MAX_SIZE_BYTES = 1 * 1024 * 1024;
|
|
8355
8355
|
|
|
8356
|
+
// ../shared/src/user-message-parser/plan-quote.ts
|
|
8357
|
+
var MARKER_PREFIX = "> _Quoting from plan_";
|
|
8358
|
+
var MARKER_LINE_REGEX = /^> _Quoting from plan_ `([^`\n]+)`\s*$/;
|
|
8359
|
+
function hasPlanQuoteMarker(content) {
|
|
8360
|
+
return content.includes(MARKER_PREFIX);
|
|
8361
|
+
}
|
|
8362
|
+
function parsePlanQuote(content) {
|
|
8363
|
+
if (!hasPlanQuoteMarker(content)) return null;
|
|
8364
|
+
const lines = content.split("\n");
|
|
8365
|
+
const blocks = [];
|
|
8366
|
+
const leadingBuffer = [];
|
|
8367
|
+
let currentFilename = null;
|
|
8368
|
+
let quoteBuffer = [];
|
|
8369
|
+
let replyBuffer = [];
|
|
8370
|
+
let inQuoteBody = false;
|
|
8371
|
+
const flushCurrentBlock = () => {
|
|
8372
|
+
if (currentFilename !== null) {
|
|
8373
|
+
blocks.push({
|
|
8374
|
+
planFilename: currentFilename,
|
|
8375
|
+
quotedText: trimBlankEdges(quoteBuffer).join("\n"),
|
|
8376
|
+
replyText: trimBlankEdges(replyBuffer).join("\n")
|
|
8377
|
+
});
|
|
8378
|
+
}
|
|
8379
|
+
currentFilename = null;
|
|
8380
|
+
quoteBuffer = [];
|
|
8381
|
+
replyBuffer = [];
|
|
8382
|
+
inQuoteBody = false;
|
|
8383
|
+
};
|
|
8384
|
+
for (const line of lines) {
|
|
8385
|
+
const markerMatch = line.match(MARKER_LINE_REGEX);
|
|
8386
|
+
if (markerMatch) {
|
|
8387
|
+
flushCurrentBlock();
|
|
8388
|
+
currentFilename = markerMatch[1].trim();
|
|
8389
|
+
inQuoteBody = true;
|
|
8390
|
+
continue;
|
|
8391
|
+
}
|
|
8392
|
+
if (currentFilename !== null) {
|
|
8393
|
+
if (inQuoteBody && isBlockquoteLine(line)) {
|
|
8394
|
+
quoteBuffer.push(stripBlockquotePrefix(line));
|
|
8395
|
+
continue;
|
|
8396
|
+
}
|
|
8397
|
+
inQuoteBody = false;
|
|
8398
|
+
replyBuffer.push(line);
|
|
8399
|
+
continue;
|
|
8400
|
+
}
|
|
8401
|
+
leadingBuffer.push(line);
|
|
8402
|
+
}
|
|
8403
|
+
flushCurrentBlock();
|
|
8404
|
+
if (blocks.length === 0) return null;
|
|
8405
|
+
return {
|
|
8406
|
+
source: "plan_quote",
|
|
8407
|
+
blocks,
|
|
8408
|
+
leadingText: trimBlankEdges(leadingBuffer).join("\n")
|
|
8409
|
+
};
|
|
8410
|
+
}
|
|
8411
|
+
function isBlockquoteLine(line) {
|
|
8412
|
+
return line.startsWith(">");
|
|
8413
|
+
}
|
|
8414
|
+
function stripBlockquotePrefix(line) {
|
|
8415
|
+
return line.replace(/^>\s?/, "");
|
|
8416
|
+
}
|
|
8417
|
+
function trimBlankEdges(lines) {
|
|
8418
|
+
let start = 0;
|
|
8419
|
+
let end = lines.length;
|
|
8420
|
+
while (start < end && lines[start].trim() === "") start++;
|
|
8421
|
+
while (end > start && lines[end - 1].trim() === "") end--;
|
|
8422
|
+
return lines.slice(start, end);
|
|
8423
|
+
}
|
|
8424
|
+
|
|
8356
8425
|
// ../shared/src/user-message-parser/parsers.ts
|
|
8357
8426
|
function parseCIFailure(content) {
|
|
8358
8427
|
if (!content.startsWith("# CI/CD Workflow Failed")) return null;
|
|
@@ -8616,7 +8685,7 @@ function parseAutomationTriggered(content) {
|
|
|
8616
8685
|
}
|
|
8617
8686
|
function parseUserMessage(rawContent) {
|
|
8618
8687
|
const content = removeReplicasInstructions(rawContent).trim();
|
|
8619
|
-
return parseCIFailure(content) ?? parseGitHubIssueNew(content) ?? parseGitHubIssueExisting(content) ?? parseGitHubPRNew(content) ?? parseGitHubPRExistingPRReview(content) ?? parseGitHubPRExistingReview(content) ?? parseGitHubPRExistingGeneral(content) ?? parseSlackTask(content) ?? parseLinearIssue(content) ?? parseAutomationTriggered(content) ?? { source: "raw", content };
|
|
8688
|
+
return parseCIFailure(content) ?? parseGitHubIssueNew(content) ?? parseGitHubIssueExisting(content) ?? parseGitHubPRNew(content) ?? parseGitHubPRExistingPRReview(content) ?? parseGitHubPRExistingReview(content) ?? parseGitHubPRExistingGeneral(content) ?? parseSlackTask(content) ?? parseLinearIssue(content) ?? parseAutomationTriggered(content) ?? parsePlanQuote(content) ?? { source: "raw", content };
|
|
8620
8689
|
}
|
|
8621
8690
|
|
|
8622
8691
|
// ../shared/src/user-message-parser/source-config.ts
|
|
@@ -8630,7 +8699,8 @@ var SOURCE_CONFIG = {
|
|
|
8630
8699
|
github_pr_existing_pr_review: { label: "PR Review", color: "#8b949e" },
|
|
8631
8700
|
github_pr_existing_general: { label: "GitHub PR", color: "#8b949e" },
|
|
8632
8701
|
slack_task: { label: "Slack", color: "#BF6CC2" },
|
|
8633
|
-
automation_triggered: { label: "Automation", color: "#f59e0b" }
|
|
8702
|
+
automation_triggered: { label: "Automation", color: "#f59e0b" },
|
|
8703
|
+
plan_quote: { label: "Plan", color: "#66bb6a" }
|
|
8634
8704
|
};
|
|
8635
8705
|
|
|
8636
8706
|
export {
|
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
setIdeCommand,
|
|
17
17
|
setOrganizationId,
|
|
18
18
|
writeConfig
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-Z5AX3HGM.mjs";
|
|
20
20
|
|
|
21
21
|
// src/index.ts
|
|
22
22
|
import "dotenv/config";
|
|
@@ -2505,12 +2505,12 @@ async function interactiveCommand() {
|
|
|
2505
2505
|
);
|
|
2506
2506
|
}
|
|
2507
2507
|
console.log(chalk18.gray("Starting interactive mode..."));
|
|
2508
|
-
const { launchInteractive } = await import("./interactive-
|
|
2508
|
+
const { launchInteractive } = await import("./interactive-OSIEBQKB.mjs");
|
|
2509
2509
|
await launchInteractive();
|
|
2510
2510
|
}
|
|
2511
2511
|
|
|
2512
2512
|
// src/index.ts
|
|
2513
|
-
var CLI_VERSION = "0.2.
|
|
2513
|
+
var CLI_VERSION = "0.2.111";
|
|
2514
2514
|
var program = new Command();
|
|
2515
2515
|
program.name("replicas").description("CLI for managing Replicas workspaces").version(CLI_VERSION);
|
|
2516
2516
|
program.command("login").description("Authenticate with your Replicas account").action(async () => {
|