replicas-cli 0.3.260 → 0.3.263
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 +50 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17171,7 +17171,7 @@ var init_pull_requests = __esm({
|
|
|
17171
17171
|
});
|
|
17172
17172
|
|
|
17173
17173
|
// ../shared/src/routes/mothership.ts
|
|
17174
|
-
var linearRuleFields, withLabelIds, mothershipLinearRuleSchema, storedMothershipLinearRuleSchema, SUBAGENT_SERVICE_TIERS, mothershipSubagentSettingsSchema, DEPLOYED_SHOWN_MS, MOTHERSHIP_SHIPPING_LOOKBACK_MS;
|
|
17174
|
+
var linearRuleFields, withLabelIds, mothershipLinearRuleSchema, storedMothershipLinearRuleSchema, SUBAGENT_SERVICE_TIERS, mothershipSubagentSettingsSchema, QUEUE_SECTIONS, MOTHERSHIP_QUEUE_GROUPS, DEPLOYED_SHOWN_MS, MOTHERSHIP_SHIPPING_LOOKBACK_MS;
|
|
17175
17175
|
var init_mothership = __esm({
|
|
17176
17176
|
"../shared/src/routes/mothership.ts"() {
|
|
17177
17177
|
"use strict";
|
|
@@ -17202,6 +17202,12 @@ var init_mothership = __esm({
|
|
|
17202
17202
|
goal_mode: external_exports.boolean(),
|
|
17203
17203
|
plan_mode: external_exports.boolean()
|
|
17204
17204
|
});
|
|
17205
|
+
QUEUE_SECTIONS = [
|
|
17206
|
+
{ label: "Open PRs", groups: ["needs_you", "ready_to_merge", "ready_to_review"] },
|
|
17207
|
+
{ label: "Working", groups: ["working"] },
|
|
17208
|
+
{ label: "Shipping", groups: ["shipping"] }
|
|
17209
|
+
];
|
|
17210
|
+
MOTHERSHIP_QUEUE_GROUPS = QUEUE_SECTIONS.flatMap((section) => section.groups);
|
|
17205
17211
|
DEPLOYED_SHOWN_MS = 3 * 60 * 6e4;
|
|
17206
17212
|
MOTHERSHIP_SHIPPING_LOOKBACK_MS = 3 * 24 * 60 * 6e4;
|
|
17207
17213
|
}
|
|
@@ -20465,6 +20471,34 @@ There is no settings page: people change how you behave by telling you, and you
|
|
|
20465
20471
|
}
|
|
20466
20472
|
});
|
|
20467
20473
|
|
|
20474
|
+
// ../shared/src/message-origin.ts
|
|
20475
|
+
function parseMessageOrigin(raw) {
|
|
20476
|
+
const workspace = raw.match(WORKSPACE_SENDER);
|
|
20477
|
+
if (workspace) {
|
|
20478
|
+
let name;
|
|
20479
|
+
try {
|
|
20480
|
+
name = JSON.parse(workspace[1]);
|
|
20481
|
+
} catch {
|
|
20482
|
+
return null;
|
|
20483
|
+
}
|
|
20484
|
+
if (typeof name === "string") return { kind: "workspace", id: workspace[2], name, body: stripReplicasInstructionBlock(raw.slice(workspace[0].length)) };
|
|
20485
|
+
}
|
|
20486
|
+
const automation2 = raw.match(SCHEDULED_FOLLOW_UP);
|
|
20487
|
+
return automation2 ? { kind: "automation", id: automation2[2], name: automation2[1].trim(), body: stripReplicasInstructionBlock(raw.slice(automation2[0].length)) } : null;
|
|
20488
|
+
}
|
|
20489
|
+
var UUID, WORKSPACE_SENDER, SCHEDULED_NOTE, SCHEDULED_FOLLOW_UP;
|
|
20490
|
+
var init_message_origin = __esm({
|
|
20491
|
+
"../shared/src/message-origin.ts"() {
|
|
20492
|
+
"use strict";
|
|
20493
|
+
init_prompts();
|
|
20494
|
+
init_uuid();
|
|
20495
|
+
UUID = UUID_RE.source.slice(1, -1);
|
|
20496
|
+
WORKSPACE_SENDER = new RegExp(String.raw`^\s*<${REPLICAS_INSTRUCTIONS_TAG}>\nFrom the workspace ("(?:[^"\\\n]|\\.)*") \((${UUID})\)\.\n</${REPLICAS_INSTRUCTIONS_TAG}>`);
|
|
20497
|
+
SCHEDULED_NOTE = "This is a message you or a teammate scheduled earlier, delivered into this workspace.";
|
|
20498
|
+
SCHEDULED_FOLLOW_UP = new RegExp(String.raw`^\s*\*\*Scheduled follow-up: ([^\n]+)\*\*\n\nThe automation "[^\n]*" \((${UUID})\) fired at \S+\. ${SCHEDULED_NOTE.replace(/\./g, "\\.")}`);
|
|
20499
|
+
}
|
|
20500
|
+
});
|
|
20501
|
+
|
|
20468
20502
|
// ../shared/src/mothership-events.ts
|
|
20469
20503
|
function extractMothershipEvents(text3) {
|
|
20470
20504
|
return [...text3.matchAll(BLOCK)].flatMap((match) => {
|
|
@@ -20497,6 +20531,7 @@ var init_mothership_events = __esm({
|
|
|
20497
20531
|
init_zod();
|
|
20498
20532
|
init_v1();
|
|
20499
20533
|
init_prompts();
|
|
20534
|
+
init_message_origin();
|
|
20500
20535
|
init_urls();
|
|
20501
20536
|
MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "merged", "closed", "archived"];
|
|
20502
20537
|
MOTHERSHIP_EVENT_TYPE = "multitask-event";
|
|
@@ -30919,10 +30954,12 @@ function filterDisplayMessages(messages, provider2) {
|
|
|
30919
30954
|
}
|
|
30920
30955
|
const cleaned = (msg.images?.length || files.length) && ATTACHMENT_PLACEHOLDER_REGEX.test(content) ? "" : content;
|
|
30921
30956
|
if (cleaned.length === 0 && !msg.images?.length && files.length === 0 && walkthroughs.length === 0 && appshots.length === 0 && annotations.length === 0) return [];
|
|
30922
|
-
|
|
30957
|
+
const origin = parseMessageOrigin(msg.content);
|
|
30958
|
+
if (cleaned === msg.content && !origin && files.length === 0 && walkthroughs.length === 0 && appshots.length === 0 && annotations.length === 0) return [msg];
|
|
30923
30959
|
return [{
|
|
30924
30960
|
...msg,
|
|
30925
30961
|
content: cleaned,
|
|
30962
|
+
...origin ? { origin } : {},
|
|
30926
30963
|
...files.length > 0 ? { files } : {},
|
|
30927
30964
|
...walkthroughs.length > 0 ? { walkthroughs } : {},
|
|
30928
30965
|
...annotations.length > 0 ? { annotations } : {},
|
|
@@ -30938,6 +30975,7 @@ var init_parsers = __esm({
|
|
|
30938
30975
|
init_event();
|
|
30939
30976
|
init_mothership_events();
|
|
30940
30977
|
init_prompts();
|
|
30978
|
+
init_message_origin();
|
|
30941
30979
|
init_user_message_attachments();
|
|
30942
30980
|
init_agent_event_utils();
|
|
30943
30981
|
init_constants();
|
|
@@ -31123,6 +31161,7 @@ var init_metadata_pills = __esm({
|
|
|
31123
31161
|
"use strict";
|
|
31124
31162
|
init_agent();
|
|
31125
31163
|
init_mothership_events();
|
|
31164
|
+
init_message_origin();
|
|
31126
31165
|
init_prompts();
|
|
31127
31166
|
init_user_message_attachments();
|
|
31128
31167
|
init_parsers2();
|
|
@@ -31161,6 +31200,7 @@ var W, NOT_BEFORE, NOT_AFTER, URL_RE, PR_URL_RE, PR_NUM_RE, ERR_RE, BENIGN_RE, O
|
|
|
31161
31200
|
var init_transcript_condense = __esm({
|
|
31162
31201
|
"../shared/src/transcript-condense.ts"() {
|
|
31163
31202
|
"use strict";
|
|
31203
|
+
init_message_origin();
|
|
31164
31204
|
init_user_message_parser();
|
|
31165
31205
|
W = "[\\p{L}\\p{N}_]";
|
|
31166
31206
|
NOT_BEFORE = `(?<!${W})`;
|
|
@@ -31560,7 +31600,7 @@ var CLI_VERSION;
|
|
|
31560
31600
|
var init_cli_version = __esm({
|
|
31561
31601
|
"../shared/src/cli-version.ts"() {
|
|
31562
31602
|
"use strict";
|
|
31563
|
-
CLI_VERSION = "0.3.
|
|
31603
|
+
CLI_VERSION = "0.3.263";
|
|
31564
31604
|
}
|
|
31565
31605
|
});
|
|
31566
31606
|
|
|
@@ -42228,6 +42268,7 @@ var init_src = __esm({
|
|
|
42228
42268
|
init_slash_commands();
|
|
42229
42269
|
init_prompts();
|
|
42230
42270
|
init_mothership_events();
|
|
42271
|
+
init_message_origin();
|
|
42231
42272
|
init_user_message_attachments();
|
|
42232
42273
|
init_image_attachments();
|
|
42233
42274
|
init_scout();
|
|
@@ -42536,15 +42577,15 @@ async function ask(question) {
|
|
|
42536
42577
|
if (!isInteractive()) {
|
|
42537
42578
|
throw new Error(`Missing input (${String(question.message).trim()}) and no interactive terminal to ask for it. Pass it as an option; see --help.`);
|
|
42538
42579
|
}
|
|
42539
|
-
return (0,
|
|
42580
|
+
return (0, import_prompts7.default)(question);
|
|
42540
42581
|
}
|
|
42541
|
-
var import_chalk,
|
|
42582
|
+
var import_chalk, import_prompts7, jsonMode, isJsonMode, isInteractive, outputSuccess;
|
|
42542
42583
|
var init_output = __esm({
|
|
42543
42584
|
"src/lib/output.ts"() {
|
|
42544
42585
|
"use strict";
|
|
42545
42586
|
import_chalk = __toESM(require("chalk"));
|
|
42546
42587
|
init_src();
|
|
42547
|
-
|
|
42588
|
+
import_prompts7 = __toESM(require("prompts"));
|
|
42548
42589
|
jsonMode = false;
|
|
42549
42590
|
isJsonMode = () => jsonMode;
|
|
42550
42591
|
isInteractive = () => !jsonMode && !!process.stdin.isTTY;
|
|
@@ -43341,16 +43382,16 @@ function parseKeyValuePairs(pairs) {
|
|
|
43341
43382
|
}
|
|
43342
43383
|
async function confirmAction(message2) {
|
|
43343
43384
|
if (!isInteractive()) throw new Error(`${message2} Pass -f to confirm without a terminal.`);
|
|
43344
|
-
const { confirm } = await (0,
|
|
43385
|
+
const { confirm } = await (0, import_prompts8.default)({ type: "confirm", name: "confirm", message: message2, initial: false });
|
|
43345
43386
|
if (!confirm) console.log(import_chalk7.default.yellow("\nCancelled."));
|
|
43346
43387
|
return Boolean(confirm);
|
|
43347
43388
|
}
|
|
43348
|
-
var import_chalk7,
|
|
43389
|
+
var import_chalk7, import_prompts8;
|
|
43349
43390
|
var init_command_utils = __esm({
|
|
43350
43391
|
"src/lib/command-utils.ts"() {
|
|
43351
43392
|
"use strict";
|
|
43352
43393
|
import_chalk7 = __toESM(require("chalk"));
|
|
43353
|
-
|
|
43394
|
+
import_prompts8 = __toESM(require("prompts"));
|
|
43354
43395
|
init_config();
|
|
43355
43396
|
init_output();
|
|
43356
43397
|
}
|