replicas-cli 0.2.645 → 0.2.647
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 +36 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -27249,7 +27249,7 @@ var headlessFilesystemAgentResultSchema = external_exports.object({
|
|
|
27249
27249
|
});
|
|
27250
27250
|
|
|
27251
27251
|
// ../shared/src/cli-version.ts
|
|
27252
|
-
var CLI_VERSION = "0.2.
|
|
27252
|
+
var CLI_VERSION = "0.2.647";
|
|
27253
27253
|
|
|
27254
27254
|
// ../shared/src/version.ts
|
|
27255
27255
|
function compareVersions(v1, v2) {
|
|
@@ -31403,6 +31403,29 @@ async function serviceLogsCommand(name, options) {
|
|
|
31403
31403
|
}
|
|
31404
31404
|
|
|
31405
31405
|
// src/commands/mothership.ts
|
|
31406
|
+
async function mothershipMonitorChannelCommand(options) {
|
|
31407
|
+
const channel = options.channel?.trim();
|
|
31408
|
+
const approvalChannel = options.approvalChannel?.trim();
|
|
31409
|
+
const approvalThread = options.approvalThread?.trim();
|
|
31410
|
+
const approvalMessageTs = options.approvalMessageTs?.trim();
|
|
31411
|
+
const approvalUser = options.approvalUser?.trim();
|
|
31412
|
+
if (!channel || !approvalChannel || !approvalThread || !approvalMessageTs || !approvalUser) {
|
|
31413
|
+
throw new Error("--channel and every --approval-* option are required.");
|
|
31414
|
+
}
|
|
31415
|
+
const body = {
|
|
31416
|
+
channel_id: channel,
|
|
31417
|
+
approval_channel_id: approvalChannel,
|
|
31418
|
+
approval_thread_ts: approvalThread,
|
|
31419
|
+
approval_message_ts: approvalMessageTs,
|
|
31420
|
+
approval_user_id: approvalUser,
|
|
31421
|
+
...options.instructions?.trim() ? { instructions: options.instructions.trim() } : {}
|
|
31422
|
+
};
|
|
31423
|
+
await agentFetch("/v1/agent/mothership/monitor-channel", {
|
|
31424
|
+
method: "POST",
|
|
31425
|
+
body
|
|
31426
|
+
});
|
|
31427
|
+
console.log(`Channel ${channel} is now monitored by Mothership.`);
|
|
31428
|
+
}
|
|
31406
31429
|
async function mothershipSpawnCommand(options) {
|
|
31407
31430
|
const channel = options.channel?.trim();
|
|
31408
31431
|
const thread = options.thread?.trim();
|
|
@@ -32764,6 +32787,18 @@ if (isAgentMode()) {
|
|
|
32764
32787
|
}
|
|
32765
32788
|
});
|
|
32766
32789
|
const mothership = program.command("mothership").description("Mothership triage operations");
|
|
32790
|
+
mothership.command("monitor-channel").description("Add a Slack channel to Mothership monitoring after an admin confirms").requiredOption("--channel <id>", "Slack channel id to monitor").option("--instructions <text>", "Editable channel-specific instructions").requiredOption("--approval-channel <id>", "Slack channel containing the admin confirmation").requiredOption("--approval-thread <ts>", "Slack thread containing the admin confirmation").requiredOption("--approval-message-ts <ts>", "Slack timestamp of the admin confirmation").requiredOption("--approval-user <id>", "Slack id of the confirming admin").action(async (options) => {
|
|
32791
|
+
try {
|
|
32792
|
+
await mothershipMonitorChannelCommand(options);
|
|
32793
|
+
} catch (error51) {
|
|
32794
|
+
if (error51 instanceof Error) {
|
|
32795
|
+
console.error(import_chalk23.default.red(`
|
|
32796
|
+
\u2717 ${error51.message}
|
|
32797
|
+
`));
|
|
32798
|
+
}
|
|
32799
|
+
process.exit(1);
|
|
32800
|
+
}
|
|
32801
|
+
});
|
|
32767
32802
|
mothership.command("spawn").description("Spawn a dedicated workspace for a Slack thread and hand off to it").requiredOption("--channel <id>", "Slack channel id of the thread").requiredOption("--thread <ts>", "Slack thread timestamp").requiredOption("--message-ts <ts>", "Slack timestamp of the triggering message").requiredOption("--prompt <text>", "Task prompt for the new workspace").requiredOption("--user <id>", "Slack id of the triggering message's author").option("--environment <id>", "Environment to spawn into (from `replicas environment list`); omit if unsure to let the user pick").action(async (options) => {
|
|
32768
32803
|
try {
|
|
32769
32804
|
await mothershipSpawnCommand(options);
|