replicas-cli 0.3.59 → 0.3.61
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 +148 -138
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22348,7 +22348,8 @@ var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZ
|
|
|
22348
22348
|
|
|
22349
22349
|
// ../shared/src/pricing.ts
|
|
22350
22350
|
var TRIAL_CREDIT_CENTS = 1e4;
|
|
22351
|
-
var
|
|
22351
|
+
var SCOUT_SOURCE = "mothership";
|
|
22352
|
+
var WORKSPACE_SOURCES = ["api", "dashboard", "slack", "linear", "github", "gitlab", "automation", SCOUT_SOURCE];
|
|
22352
22353
|
var CLIENT_MESSAGE_SOURCES = ["web", "desktop", "mobile", "tui"];
|
|
22353
22354
|
var MESSAGE_SOURCES = [...CLIENT_MESSAGE_SOURCES, ...WORKSPACE_SOURCES];
|
|
22354
22355
|
var AUTOMATED_SOURCES = ["api", "automation"];
|
|
@@ -22880,7 +22881,7 @@ var MODEL_LABELS = {
|
|
|
22880
22881
|
"kimi-k2.5": "Kimi K2.5"
|
|
22881
22882
|
};
|
|
22882
22883
|
var IMAGE_MEDIA_TYPES = ["image/png", "image/jpeg", "image/gif", "image/webp"];
|
|
22883
|
-
var MAX_CANVAS_FILE_BYTES =
|
|
22884
|
+
var MAX_CANVAS_FILE_BYTES = 100 * 1024 * 1024;
|
|
22884
22885
|
var MAX_CANVAS_PREVIEW_BYTES = 5 * 1024 * 1024;
|
|
22885
22886
|
var CANVAS_KIND_BY_EXTENSION = {
|
|
22886
22887
|
".md": { kind: "markdown", mimeType: "text/markdown; charset=utf-8" },
|
|
@@ -23930,6 +23931,107 @@ var createEnvironmentMcpRequestSchema = external_exports.object({
|
|
|
23930
23931
|
});
|
|
23931
23932
|
var updateEnvironmentMcpRequestSchema = createEnvironmentMcpRequestSchema.partial();
|
|
23932
23933
|
|
|
23934
|
+
// ../shared/src/routes/workspaces.ts
|
|
23935
|
+
var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
|
|
23936
|
+
var STALE_PREPARING_MS = 10 * 6e4;
|
|
23937
|
+
function isWorkspaceSuspendedStatus(status) {
|
|
23938
|
+
return status === "sleeping" || status === "archived";
|
|
23939
|
+
}
|
|
23940
|
+
var VALID_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_after_inactivity"];
|
|
23941
|
+
function workspaceConfigWithCapabilities(config3, capabilities = {}) {
|
|
23942
|
+
const mergedCapabilities = {
|
|
23943
|
+
...config3?.capabilities,
|
|
23944
|
+
...capabilities
|
|
23945
|
+
};
|
|
23946
|
+
return {
|
|
23947
|
+
...config3,
|
|
23948
|
+
capabilities: {
|
|
23949
|
+
...mergedCapabilities,
|
|
23950
|
+
pr_followups: mergedCapabilities.pr_followups === true
|
|
23951
|
+
}
|
|
23952
|
+
};
|
|
23953
|
+
}
|
|
23954
|
+
function workspaceConfigWithPrFollowups(config3, prFollowups = config3?.capabilities?.pr_followups === true) {
|
|
23955
|
+
return workspaceConfigWithCapabilities(config3, { pr_followups: prFollowups });
|
|
23956
|
+
}
|
|
23957
|
+
var WORKSPACE_STATUS_FILTERS = WORKSPACE_STATUSES.map((status) => status === "error" ? "failed" : status);
|
|
23958
|
+
var DEFAULT_STATUS_FILTERS = [...WORKSPACE_STATUS_FILTERS];
|
|
23959
|
+
var DEFAULT_WORKSPACE_FILTERS = {
|
|
23960
|
+
statuses: [...DEFAULT_STATUS_FILTERS],
|
|
23961
|
+
ownerIds: [],
|
|
23962
|
+
activity: "any"
|
|
23963
|
+
};
|
|
23964
|
+
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
23965
|
+
var workspaceExecRequestSchema = external_exports.object({
|
|
23966
|
+
command: external_exports.string().regex(/\S/, "command is required"),
|
|
23967
|
+
timeout_seconds: external_exports.number().int().min(1).max(50).optional().describe("Default: 30")
|
|
23968
|
+
});
|
|
23969
|
+
var terminalRtcCandidateSchema = external_exports.object({ type: external_exports.literal("rtc-candidate"), candidate: external_exports.string(), mid: external_exports.string() });
|
|
23970
|
+
var terminalSocketServerMessageSchema = external_exports.discriminatedUnion("type", [
|
|
23971
|
+
external_exports.object({ type: external_exports.literal("output"), data: external_exports.string() }),
|
|
23972
|
+
external_exports.object({ type: external_exports.literal("rtc-answer"), sdp: external_exports.string() }),
|
|
23973
|
+
terminalRtcCandidateSchema,
|
|
23974
|
+
external_exports.object({ type: external_exports.literal("rtc-switch") })
|
|
23975
|
+
]);
|
|
23976
|
+
|
|
23977
|
+
// ../shared/src/replicas-mcp.ts
|
|
23978
|
+
var REPLICAS_MCP_TOOLS = {
|
|
23979
|
+
listEnvironments: "list_environments",
|
|
23980
|
+
createAutomation: "create_automation",
|
|
23981
|
+
spawn: "spawn_workspace",
|
|
23982
|
+
relay: "relay_to_workspace",
|
|
23983
|
+
listWorkspaces: "list_workspaces",
|
|
23984
|
+
linearStart: "start_linear_session",
|
|
23985
|
+
linearSessionIntent: "register_linear_session_intent",
|
|
23986
|
+
listChannelSettings: "list_channel_settings",
|
|
23987
|
+
saveChannelPreset: "save_channel_preset",
|
|
23988
|
+
deleteChannelPreset: "delete_channel_preset",
|
|
23989
|
+
updateChannelSettings: "update_channel_settings",
|
|
23990
|
+
spawnSubagent: "spawn_subagent",
|
|
23991
|
+
messageSubagent: "message_subagent",
|
|
23992
|
+
listSubagents: "list_subagents",
|
|
23993
|
+
readSubagent: "read_subagent",
|
|
23994
|
+
archiveSubagent: "archive_subagent",
|
|
23995
|
+
waitForSubagents: "wait_for_subagents"
|
|
23996
|
+
};
|
|
23997
|
+
var automationToolInputSchema = external_exports.object({
|
|
23998
|
+
name: external_exports.string().describe("Short automation name."),
|
|
23999
|
+
prompt: external_exports.string().describe("Prompt each automation run starts with."),
|
|
24000
|
+
environment_id: external_exports.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
24001
|
+
triggers: external_exports.array(automationTriggerSchema).min(1).describe(
|
|
24002
|
+
'One or more triggers. Cron: `{ "type": "cron", "config": { "schedule": "0 9 * * 1", "timezone": "America/New_York" } }`. GitHub: `{ "type": "github", "config": { "event": "pull_request.opened", "repository_ids": ["<repository uuid>"] } }`.'
|
|
24003
|
+
),
|
|
24004
|
+
description: external_exports.string().optional().describe("One-line summary shown in the dashboard."),
|
|
24005
|
+
plan_mode: external_exports.boolean().optional(),
|
|
24006
|
+
goal_mode: external_exports.boolean().optional(),
|
|
24007
|
+
fast_mode: external_exports.boolean().optional()
|
|
24008
|
+
});
|
|
24009
|
+
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
24010
|
+
scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
24011
|
+
});
|
|
24012
|
+
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
24013
|
+
automation_id: external_exports.string().describe("Automation ID"),
|
|
24014
|
+
enabled: external_exports.boolean().optional(),
|
|
24015
|
+
agent_provider: external_exports.enum(AGENT).nullable().optional(),
|
|
24016
|
+
model: external_exports.string().nullable().optional(),
|
|
24017
|
+
thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
24018
|
+
workspace_lifecycle_policy: external_exports.enum(VALID_LIFECYCLE_POLICIES).optional(),
|
|
24019
|
+
workspace_size: external_exports.enum(WORKSPACE_SIZES).optional()
|
|
24020
|
+
});
|
|
24021
|
+
var chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
|
|
24022
|
+
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
24023
|
+
var createChatToolInputSchema = external_exports.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
24024
|
+
var forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
24025
|
+
var renameChatToolInputSchema = external_exports.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
24026
|
+
var runCommandToolInputSchema = external_exports.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
24027
|
+
var environmentMcpPath = { environment_id: external_exports.string().describe("Environment ID") };
|
|
24028
|
+
var createEnvironmentMcpToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
24029
|
+
var updateEnvironmentMcpToolInputSchema = external_exports.object({
|
|
24030
|
+
...environmentMcpPath,
|
|
24031
|
+
mcp_id: external_exports.string().describe("MCP ID"),
|
|
24032
|
+
...updateEnvironmentMcpRequestSchema.shape
|
|
24033
|
+
});
|
|
24034
|
+
|
|
23933
24035
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
23934
24036
|
var SECTION = `### Computer use (Linux desktop control)
|
|
23935
24037
|
Drive the workspace's Linux desktop - open a browser, click, type, scroll, screenshot, record - via the \`replicas computer\` CLI. Every Replicas workspace boots with a live H.264 and Opus stream published as an authenticated preview, so a \`Desktop\` tab is always available in the dashboard. Use \`replicas computer info\` to get the viewer URL when you want to share it (e.g. point a user on Slack at the live stream).
|
|
@@ -26098,107 +26200,6 @@ var REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
|
26098
26200
|
REPLICAS_AGENT_ABILITY_REGISTRY
|
|
26099
26201
|
);
|
|
26100
26202
|
|
|
26101
|
-
// ../shared/src/routes/workspaces.ts
|
|
26102
|
-
var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
|
|
26103
|
-
var STALE_PREPARING_MS = 10 * 6e4;
|
|
26104
|
-
function isWorkspaceSuspendedStatus(status) {
|
|
26105
|
-
return status === "sleeping" || status === "archived";
|
|
26106
|
-
}
|
|
26107
|
-
var VALID_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_after_inactivity"];
|
|
26108
|
-
function workspaceConfigWithCapabilities(config3, capabilities = {}) {
|
|
26109
|
-
const mergedCapabilities = {
|
|
26110
|
-
...config3?.capabilities,
|
|
26111
|
-
...capabilities
|
|
26112
|
-
};
|
|
26113
|
-
return {
|
|
26114
|
-
...config3,
|
|
26115
|
-
capabilities: {
|
|
26116
|
-
...mergedCapabilities,
|
|
26117
|
-
pr_followups: mergedCapabilities.pr_followups === true
|
|
26118
|
-
}
|
|
26119
|
-
};
|
|
26120
|
-
}
|
|
26121
|
-
function workspaceConfigWithPrFollowups(config3, prFollowups = config3?.capabilities?.pr_followups === true) {
|
|
26122
|
-
return workspaceConfigWithCapabilities(config3, { pr_followups: prFollowups });
|
|
26123
|
-
}
|
|
26124
|
-
var WORKSPACE_STATUS_FILTERS = WORKSPACE_STATUSES.map((status) => status === "error" ? "failed" : status);
|
|
26125
|
-
var DEFAULT_STATUS_FILTERS = [...WORKSPACE_STATUS_FILTERS];
|
|
26126
|
-
var DEFAULT_WORKSPACE_FILTERS = {
|
|
26127
|
-
statuses: [...DEFAULT_STATUS_FILTERS],
|
|
26128
|
-
ownerIds: [],
|
|
26129
|
-
activity: "any"
|
|
26130
|
-
};
|
|
26131
|
-
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
26132
|
-
var workspaceExecRequestSchema = external_exports.object({
|
|
26133
|
-
command: external_exports.string().regex(/\S/, "command is required"),
|
|
26134
|
-
timeout_seconds: external_exports.number().int().min(1).max(50).optional().describe("Default: 30")
|
|
26135
|
-
});
|
|
26136
|
-
var terminalRtcCandidateSchema = external_exports.object({ type: external_exports.literal("rtc-candidate"), candidate: external_exports.string(), mid: external_exports.string() });
|
|
26137
|
-
var terminalSocketServerMessageSchema = external_exports.discriminatedUnion("type", [
|
|
26138
|
-
external_exports.object({ type: external_exports.literal("output"), data: external_exports.string() }),
|
|
26139
|
-
external_exports.object({ type: external_exports.literal("rtc-answer"), sdp: external_exports.string() }),
|
|
26140
|
-
terminalRtcCandidateSchema,
|
|
26141
|
-
external_exports.object({ type: external_exports.literal("rtc-switch") })
|
|
26142
|
-
]);
|
|
26143
|
-
|
|
26144
|
-
// ../shared/src/replicas-mcp.ts
|
|
26145
|
-
var REPLICAS_MCP_TOOLS = {
|
|
26146
|
-
listEnvironments: "list_environments",
|
|
26147
|
-
createAutomation: "create_automation",
|
|
26148
|
-
spawn: "spawn_workspace",
|
|
26149
|
-
relay: "relay_to_workspace",
|
|
26150
|
-
listWorkspaces: "list_workspaces",
|
|
26151
|
-
linearStart: "start_linear_session",
|
|
26152
|
-
linearSessionIntent: "register_linear_session_intent",
|
|
26153
|
-
listChannelSettings: "list_channel_settings",
|
|
26154
|
-
saveChannelPreset: "save_channel_preset",
|
|
26155
|
-
deleteChannelPreset: "delete_channel_preset",
|
|
26156
|
-
updateChannelSettings: "update_channel_settings",
|
|
26157
|
-
spawnSubagent: "spawn_subagent",
|
|
26158
|
-
messageSubagent: "message_subagent",
|
|
26159
|
-
listSubagents: "list_subagents",
|
|
26160
|
-
readSubagent: "read_subagent",
|
|
26161
|
-
archiveSubagent: "archive_subagent",
|
|
26162
|
-
waitForSubagents: "wait_for_subagents"
|
|
26163
|
-
};
|
|
26164
|
-
var automationToolInputSchema = external_exports.object({
|
|
26165
|
-
name: external_exports.string().describe("Short automation name."),
|
|
26166
|
-
prompt: external_exports.string().describe("Prompt each automation run starts with."),
|
|
26167
|
-
environment_id: external_exports.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
26168
|
-
triggers: external_exports.array(automationTriggerSchema).min(1).describe(
|
|
26169
|
-
'One or more triggers. Cron: `{ "type": "cron", "config": { "schedule": "0 9 * * 1", "timezone": "America/New_York" } }`. GitHub: `{ "type": "github", "config": { "event": "pull_request.opened", "repository_ids": ["<repository uuid>"] } }`.'
|
|
26170
|
-
),
|
|
26171
|
-
description: external_exports.string().optional().describe("One-line summary shown in the dashboard."),
|
|
26172
|
-
plan_mode: external_exports.boolean().optional(),
|
|
26173
|
-
goal_mode: external_exports.boolean().optional(),
|
|
26174
|
-
fast_mode: external_exports.boolean().optional()
|
|
26175
|
-
});
|
|
26176
|
-
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
26177
|
-
scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
26178
|
-
});
|
|
26179
|
-
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
26180
|
-
automation_id: external_exports.string().describe("Automation ID"),
|
|
26181
|
-
enabled: external_exports.boolean().optional(),
|
|
26182
|
-
agent_provider: external_exports.enum(AGENT).nullable().optional(),
|
|
26183
|
-
model: external_exports.string().nullable().optional(),
|
|
26184
|
-
thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
26185
|
-
workspace_lifecycle_policy: external_exports.enum(VALID_LIFECYCLE_POLICIES).optional(),
|
|
26186
|
-
workspace_size: external_exports.enum(WORKSPACE_SIZES).optional()
|
|
26187
|
-
});
|
|
26188
|
-
var chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
|
|
26189
|
-
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
26190
|
-
var createChatToolInputSchema = external_exports.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
26191
|
-
var forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
26192
|
-
var renameChatToolInputSchema = external_exports.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
26193
|
-
var runCommandToolInputSchema = external_exports.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
26194
|
-
var environmentMcpPath = { environment_id: external_exports.string().describe("Environment ID") };
|
|
26195
|
-
var createEnvironmentMcpToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
26196
|
-
var updateEnvironmentMcpToolInputSchema = external_exports.object({
|
|
26197
|
-
...environmentMcpPath,
|
|
26198
|
-
mcp_id: external_exports.string().describe("MCP ID"),
|
|
26199
|
-
...updateEnvironmentMcpRequestSchema.shape
|
|
26200
|
-
});
|
|
26201
|
-
|
|
26202
26203
|
// ../shared/src/routes/preferences.ts
|
|
26203
26204
|
var EMPTY_AGENT_DEFAULT_SETTINGS = {
|
|
26204
26205
|
agent_provider: null,
|
|
@@ -26255,7 +26256,7 @@ var DEFAULT_DEFAULT_SKILLS = {
|
|
|
26255
26256
|
|
|
26256
26257
|
// ../shared/src/prompts.ts
|
|
26257
26258
|
var REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
|
|
26258
|
-
var
|
|
26259
|
+
var MOTHERSHIP_INSTRUCTIONS_TAG = "multitask_instructions";
|
|
26259
26260
|
function removeTag(text3, tag) {
|
|
26260
26261
|
const regex = new RegExp(`<${tag}>[\\s\\S]*?</${tag}>`, "g");
|
|
26261
26262
|
return text3.replace(regex, "").trim();
|
|
@@ -26263,15 +26264,15 @@ function removeTag(text3, tag) {
|
|
|
26263
26264
|
function removeReplicasInstructions(text3) {
|
|
26264
26265
|
return removeTag(text3, REPLICAS_INSTRUCTIONS_TAG);
|
|
26265
26266
|
}
|
|
26266
|
-
var
|
|
26267
|
+
var MOTHERSHIP_INSTRUCTIONS_BLOCK = new RegExp(`\\s*<${MOTHERSHIP_INSTRUCTIONS_TAG}>\\n([\\s\\S]*?)\\n</${MOTHERSHIP_INSTRUCTIONS_TAG}>`);
|
|
26267
26268
|
|
|
26268
|
-
// ../shared/src/
|
|
26269
|
-
var
|
|
26270
|
-
var
|
|
26271
|
-
var
|
|
26269
|
+
// ../shared/src/mothership-events.ts
|
|
26270
|
+
var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "merged", "closed", "archived"];
|
|
26271
|
+
var MOTHERSHIP_EVENT_TYPE = "multitask-event";
|
|
26272
|
+
var mothershipEventSchema = external_exports.object({
|
|
26272
26273
|
id: external_exports.string(),
|
|
26273
26274
|
at: external_exports.string(),
|
|
26274
|
-
kind: external_exports.enum(
|
|
26275
|
+
kind: external_exports.enum(MOTHERSHIP_EVENT_KINDS),
|
|
26275
26276
|
agentId: external_exports.string(),
|
|
26276
26277
|
agentName: external_exports.string(),
|
|
26277
26278
|
summary: external_exports.string(),
|
|
@@ -26283,10 +26284,10 @@ var TAG = "multitask_event";
|
|
|
26283
26284
|
var BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
|
|
26284
26285
|
var ATTRIBUTE = /(\w+)="([^"]*)"/g;
|
|
26285
26286
|
var unescapeAttribute = (value) => value.replace(/</g, "<").replace(/"/g, '"').replace(/&/g, "&");
|
|
26286
|
-
function
|
|
26287
|
+
function extractMothershipEvents(text3) {
|
|
26287
26288
|
return [...text3.matchAll(BLOCK)].flatMap((match) => {
|
|
26288
26289
|
const attributes = Object.fromEntries([...match[1].matchAll(ATTRIBUTE)].map(([, key, value]) => [key, unescapeAttribute(value)]));
|
|
26289
|
-
const kind =
|
|
26290
|
+
const kind = MOTHERSHIP_EVENT_KINDS.find((candidate) => candidate === attributes.kind);
|
|
26290
26291
|
if (!kind || !attributes.id || !attributes.agent_id) return [];
|
|
26291
26292
|
const [summary, ...rest] = match[2].replaceAll(`<\\/${TAG}`, `</${TAG}`).split("\n\n");
|
|
26292
26293
|
const detail = rest.join("\n\n").trim();
|
|
@@ -26302,8 +26303,8 @@ function extractMultitaskEvents(text3) {
|
|
|
26302
26303
|
}];
|
|
26303
26304
|
});
|
|
26304
26305
|
}
|
|
26305
|
-
function
|
|
26306
|
-
const events =
|
|
26306
|
+
function parseMothershipEvents(text3) {
|
|
26307
|
+
const events = extractMothershipEvents(text3);
|
|
26307
26308
|
return events.length > 0 && text3.replace(BLOCK, "").replaceAll(MERGED_MESSAGE_SEPARATOR.trim(), "").trim() === "" ? events : null;
|
|
26308
26309
|
}
|
|
26309
26310
|
|
|
@@ -26345,7 +26346,7 @@ var SUBAGENT_STEPS = {
|
|
|
26345
26346
|
[SUBAGENT_MCP_TOOLS.deleteAgent]: { icon: "trash", live: "Deleting", done: "Deleted" },
|
|
26346
26347
|
[SUBAGENT_MCP_TOOLS.getProviders]: { icon: "list", live: "Listing available providers", done: "Listed available providers" }
|
|
26347
26348
|
};
|
|
26348
|
-
var
|
|
26349
|
+
var MOTHERSHIP_TOOL_ACTIONS = {
|
|
26349
26350
|
[REPLICAS_MCP_TOOLS.spawnSubagent]: "spawn",
|
|
26350
26351
|
[REPLICAS_MCP_TOOLS.messageSubagent]: "send",
|
|
26351
26352
|
[REPLICAS_MCP_TOOLS.listSubagents]: "list",
|
|
@@ -28211,8 +28212,8 @@ function applyInterruptions(messages, events) {
|
|
|
28211
28212
|
function applyEngineNotices(messages, events) {
|
|
28212
28213
|
const notices = [];
|
|
28213
28214
|
events.forEach((event, index) => {
|
|
28214
|
-
if (event.type ===
|
|
28215
|
-
const parsed = typeof event.payload.text === "string" ?
|
|
28215
|
+
if (event.type === MOTHERSHIP_EVENT_TYPE) {
|
|
28216
|
+
const parsed = typeof event.payload.text === "string" ? parseMothershipEvents(event.payload.text) : null;
|
|
28216
28217
|
if (parsed) notices.push({ id: `multitask-event-${event.timestamp}-${index}`, type: "multitask_event", events: parsed, timestamp: event.timestamp });
|
|
28217
28218
|
return;
|
|
28218
28219
|
}
|
|
@@ -28516,10 +28517,10 @@ var SLASH_COMMANDS = [
|
|
|
28516
28517
|
}))
|
|
28517
28518
|
];
|
|
28518
28519
|
|
|
28519
|
-
// ../shared/src/
|
|
28520
|
-
var
|
|
28521
|
-
var
|
|
28522
|
-
var
|
|
28520
|
+
// ../shared/src/scout.ts
|
|
28521
|
+
var SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
28522
|
+
var SCOUT_PRESET_NAME_MAX_LENGTH = 50;
|
|
28523
|
+
var SCOUT_PRESET_ICONS = [
|
|
28523
28524
|
"users",
|
|
28524
28525
|
"user",
|
|
28525
28526
|
"inbox",
|
|
@@ -28574,7 +28575,7 @@ var headlessAgentRequestSchema = external_exports.object({
|
|
|
28574
28575
|
});
|
|
28575
28576
|
|
|
28576
28577
|
// ../shared/src/cli-version.ts
|
|
28577
|
-
var CLI_VERSION = "0.3.
|
|
28578
|
+
var CLI_VERSION = "0.3.61";
|
|
28578
28579
|
|
|
28579
28580
|
// ../shared/src/version.ts
|
|
28580
28581
|
function compareVersions(v1, v2) {
|
|
@@ -28649,20 +28650,20 @@ var linearSessionMetadataSchema = external_exports.object({
|
|
|
28649
28650
|
}).optional()
|
|
28650
28651
|
});
|
|
28651
28652
|
|
|
28652
|
-
// ../shared/src/routes/
|
|
28653
|
-
var
|
|
28654
|
-
var
|
|
28653
|
+
// ../shared/src/routes/scout.ts
|
|
28654
|
+
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
28655
|
+
var scoutLinearSessionIntentRequestSchema = external_exports.object({
|
|
28655
28656
|
comment_id: external_exports.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
28656
|
-
action: external_exports.enum(
|
|
28657
|
+
action: external_exports.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it is the complete task prompt.")
|
|
28657
28658
|
});
|
|
28658
|
-
var
|
|
28659
|
+
var scoutLinearStartRequestSchema = external_exports.object({
|
|
28659
28660
|
issue_id: external_exports.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
28660
28661
|
agent_session_id: external_exports.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
28661
28662
|
prompt: external_exports.string().trim().min(1).describe("Complete task prompt for the coding workspace.")
|
|
28662
28663
|
});
|
|
28663
28664
|
var slackChannelIdSchema = external_exports.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
28664
28665
|
var slackThreadTsSchema = external_exports.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
28665
|
-
var
|
|
28666
|
+
var scoutSlackSpawnRequestSchema = external_exports.object({
|
|
28666
28667
|
channel_id: slackChannelIdSchema,
|
|
28667
28668
|
thread_ts: slackThreadTsSchema,
|
|
28668
28669
|
message_ts: external_exports.string().describe("Timestamp of the Slack message that asked for the work (the envelope's `message_ts`). The server verifies this message and its author."),
|
|
@@ -28670,7 +28671,7 @@ var mothershipSlackSpawnRequestSchema = external_exports.object({
|
|
|
28670
28671
|
prompt: external_exports.string().describe("Complete task for the new workspace, written so it stands on its own."),
|
|
28671
28672
|
environment_id: external_exports.string().optional().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`. Pass it only when clearly confident it fits; omit it to let routing choose. If routing cannot choose, the call fails and nothing is posted, so pick one or ask the person.`)
|
|
28672
28673
|
});
|
|
28673
|
-
var
|
|
28674
|
+
var scoutSlackRelayRequestSchema = external_exports.object({
|
|
28674
28675
|
channel_id: slackChannelIdSchema,
|
|
28675
28676
|
thread_ts: slackThreadTsSchema,
|
|
28676
28677
|
message: external_exports.string().describe("The follow-up to deliver, combining every fresh message that belongs to this update."),
|
|
@@ -28679,35 +28680,35 @@ var mothershipSlackRelayRequestSchema = external_exports.object({
|
|
|
28679
28680
|
workspace_id: external_exports.string().optional().describe(`Existing workspace id, from \`${REPLICAS_MCP_TOOLS.listWorkspaces}\` or a workspace link in the thread, to bind a thread without a workspace to before relaying. The author must be able to see it. Omit to relay into the thread's own workspace.`),
|
|
28680
28681
|
message_ts: external_exports.string().optional().describe("Timestamp of the Slack message that led to this relay (the envelope's `message_ts`). Required with `workspace_id`; the server verifies this message and its author.")
|
|
28681
28682
|
});
|
|
28682
|
-
var
|
|
28683
|
+
var scoutListWorkspacesRequestSchema = external_exports.object({
|
|
28683
28684
|
channel_id: slackChannelIdSchema,
|
|
28684
28685
|
thread_ts: slackThreadTsSchema,
|
|
28685
28686
|
message_ts: external_exports.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
28686
28687
|
user_id: external_exports.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
|
|
28687
28688
|
query: external_exports.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace names and pull request URLs.")
|
|
28688
28689
|
});
|
|
28689
|
-
var
|
|
28690
|
+
var scoutSlackConfirmationSchema = external_exports.object({
|
|
28690
28691
|
confirmation_channel_id: external_exports.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
|
|
28691
28692
|
confirmation_thread_ts: external_exports.string().describe("`thread_ts` from that message's envelope."),
|
|
28692
28693
|
confirmation_message_ts: external_exports.string().describe("`message_ts` from that message's envelope."),
|
|
28693
28694
|
confirmation_user_id: external_exports.string().describe("`user_id` from that message's envelope.")
|
|
28694
28695
|
});
|
|
28695
|
-
var
|
|
28696
|
-
var
|
|
28696
|
+
var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
|
|
28697
|
+
var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
28697
28698
|
preset_id: external_exports.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
|
|
28698
|
-
name: external_exports.string().trim().min(1).max(
|
|
28699
|
+
name: external_exports.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
|
|
28699
28700
|
description: external_exports.string().optional().describe("One-line summary shown in settings."),
|
|
28700
|
-
icon: external_exports.enum(
|
|
28701
|
+
icon: external_exports.enum(SCOUT_PRESET_ICONS).optional(),
|
|
28701
28702
|
instructions: external_exports.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
|
|
28702
28703
|
});
|
|
28703
|
-
var
|
|
28704
|
-
source: external_exports.enum(
|
|
28704
|
+
var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
28705
|
+
source: external_exports.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
|
|
28705
28706
|
external_id: external_exports.string().describe("Slack channel id or Linear team id."),
|
|
28706
28707
|
monitored: external_exports.boolean().optional().describe("`false` stops Scout from handling the source: it excludes a Slack channel or stops monitoring a Linear team. `true` resumes a Slack channel or starts monitoring a Linear team, and only an organization admin can ask for that. Omit to keep it."),
|
|
28707
28708
|
preset_id: external_exports.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
28708
28709
|
instructions: external_exports.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them.")
|
|
28709
28710
|
});
|
|
28710
|
-
var
|
|
28711
|
+
var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
28711
28712
|
preset_id: external_exports.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
|
|
28712
28713
|
});
|
|
28713
28714
|
|
|
@@ -29057,6 +29058,15 @@ var workspaceMarkedUnreadClientStateKey = orgUserClientStateKey(WORKSPACE_MARKED
|
|
|
29057
29058
|
var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_STATE_KEY_PREFIX);
|
|
29058
29059
|
|
|
29059
29060
|
// ../shared/src/workspace-sidebar-state.ts
|
|
29061
|
+
var WORKSPACE_SOURCE_LABELS = {
|
|
29062
|
+
slack: "Slack",
|
|
29063
|
+
linear: "Linear",
|
|
29064
|
+
github: "GitHub",
|
|
29065
|
+
gitlab: "GitLab",
|
|
29066
|
+
automation: "an automation",
|
|
29067
|
+
api: "the API",
|
|
29068
|
+
[SCOUT_SOURCE]: "Scout"
|
|
29069
|
+
};
|
|
29060
29070
|
var FIRST_BOOT_GRACE_MS = 15 * 6e4;
|
|
29061
29071
|
var SLOW_ENGINE_GRACE_MS = 10 * 6e4;
|
|
29062
29072
|
var WORKSPACE_STAGES = ["progress", "review", "backlog", "done"];
|