replicas-cli 0.3.473 → 0.3.475
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 +1266 -1195
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22721,7 +22721,10 @@ var init_v1 = __esm({
|
|
|
22721
22721
|
createChatRequestSchema = createChatFields.refine((request) => !request.sideChat || request.forkSourceChatId !== void 0 && request.parentChatId === request.forkSourceChatId, {
|
|
22722
22722
|
message: "A side chat must fork its parent chat"
|
|
22723
22723
|
});
|
|
22724
|
-
createHarnessChatRequestSchema = createChatFields.pick({ id: true, title: true }).extend({ provider: external_exports.literal(AGENT.REPLICAS) })
|
|
22724
|
+
createHarnessChatRequestSchema = createChatFields.pick({ id: true, title: true, parentChatId: true, forkSourceChatId: true, sideChat: true }).extend({ provider: external_exports.literal(AGENT.REPLICAS) }).refine(
|
|
22725
|
+
(request) => !request.parentChatId && !request.forkSourceChatId && !request.sideChat || request.sideChat === true && request.parentChatId !== void 0 && request.forkSourceChatId === request.parentChatId,
|
|
22726
|
+
{ message: "A Replicas side chat must fork its parent chat." }
|
|
22727
|
+
);
|
|
22725
22728
|
spawnSubagentRequestSchema = external_exports.object({
|
|
22726
22729
|
provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
|
|
22727
22730
|
prompt: external_exports.string().min(1),
|
|
@@ -23421,850 +23424,104 @@ var init_environment = __esm({
|
|
|
23421
23424
|
}
|
|
23422
23425
|
});
|
|
23423
23426
|
|
|
23424
|
-
// ../shared/src/
|
|
23425
|
-
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
|
|
23431
|
-
return `Path must start with the home-directory prefix ~/ . ${ENVIRONMENT_FILE_PATH_GUIDANCE}`.replace("~/ .", "~/");
|
|
23432
|
-
}
|
|
23433
|
-
if (trimmedPath === HOME_PREFIX) {
|
|
23434
|
-
return "Path must include a file name after ~/.";
|
|
23427
|
+
// ../shared/src/workspace-attention.ts
|
|
23428
|
+
var WORKSPACE_ATTENTION_REASONS, CHAT_ATTENTION_REASONS;
|
|
23429
|
+
var init_workspace_attention = __esm({
|
|
23430
|
+
"../shared/src/workspace-attention.ts"() {
|
|
23431
|
+
"use strict";
|
|
23432
|
+
WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup", "deploy_failed"];
|
|
23433
|
+
CHAT_ATTENTION_REASONS = ["question", "blocked"];
|
|
23435
23434
|
}
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
var
|
|
23440
|
-
|
|
23435
|
+
});
|
|
23436
|
+
|
|
23437
|
+
// ../shared/src/routes/push.ts
|
|
23438
|
+
var registerPushDeviceRequestSchema, PUSH_HOLD_MINUTES, chatRefSchema, recordPushActivityRequestSchema, PUSH_NOTIFICATION_KINDS, PUSH_OPTION_LABEL_MAX, PUSH_OPTIONS_MAX, pushQuestionSchema, pushNotificationDataSchema, workspaceSharedPushDataSchema, registerLiveActivityRequestSchema, syncLiveActivitiesRequestSchema, setLiveActivityStartTokenRequestSchema;
|
|
23439
|
+
var init_push = __esm({
|
|
23440
|
+
"../shared/src/routes/push.ts"() {
|
|
23441
23441
|
"use strict";
|
|
23442
|
-
|
|
23443
|
-
|
|
23442
|
+
init_zod();
|
|
23443
|
+
init_workspace_attention();
|
|
23444
|
+
registerPushDeviceRequestSchema = external_exports.discriminatedUnion("platform", [
|
|
23445
|
+
external_exports.object({
|
|
23446
|
+
platform: external_exports.literal("ios"),
|
|
23447
|
+
token: external_exports.string().regex(/^[0-9a-f]{64,200}$/i),
|
|
23448
|
+
appId: external_exports.string().min(1).max(255),
|
|
23449
|
+
apnsEnvironment: external_exports.enum(["sandbox", "production"])
|
|
23450
|
+
}),
|
|
23451
|
+
external_exports.object({
|
|
23452
|
+
platform: external_exports.literal("android"),
|
|
23453
|
+
token: external_exports.string().min(1).max(4096),
|
|
23454
|
+
appId: external_exports.string().min(1).max(255)
|
|
23455
|
+
})
|
|
23456
|
+
]);
|
|
23457
|
+
PUSH_HOLD_MINUTES = 5;
|
|
23458
|
+
chatRefSchema = external_exports.object({ workspaceId: external_exports.string().uuid(), chatId: external_exports.string().min(1).max(100) });
|
|
23459
|
+
recordPushActivityRequestSchema = external_exports.object({
|
|
23460
|
+
organizationId: external_exports.string().uuid(),
|
|
23461
|
+
/** Seconds since the last keyboard or mouse input on this computer. A phone leaves it out: it only reports what it has open. */
|
|
23462
|
+
idleSeconds: external_exports.number().min(0).optional(),
|
|
23463
|
+
seenWorkspaceIds: external_exports.array(external_exports.string().uuid()).max(20),
|
|
23464
|
+
seenChats: external_exports.array(chatRefSchema).max(20).optional()
|
|
23465
|
+
});
|
|
23466
|
+
PUSH_NOTIFICATION_KINDS = [...WORKSPACE_ATTENTION_REASONS, "finished"];
|
|
23467
|
+
PUSH_OPTION_LABEL_MAX = 60;
|
|
23468
|
+
PUSH_OPTIONS_MAX = 4;
|
|
23469
|
+
pushQuestionSchema = external_exports.object({ id: external_exports.string().max(64), allowCustom: external_exports.boolean().optional(), options: external_exports.array(external_exports.object({ id: external_exports.string().max(64), label: external_exports.string().min(1).max(PUSH_OPTION_LABEL_MAX) })).min(1).max(PUSH_OPTIONS_MAX) });
|
|
23470
|
+
pushNotificationDataSchema = external_exports.object({
|
|
23471
|
+
organizationId: external_exports.string(),
|
|
23472
|
+
workspaceId: external_exports.string(),
|
|
23473
|
+
chatId: external_exports.string().nullable(),
|
|
23474
|
+
kind: external_exports.enum(PUSH_NOTIFICATION_KINDS),
|
|
23475
|
+
completedAt: external_exports.string(),
|
|
23476
|
+
toolRequestId: external_exports.string().optional(),
|
|
23477
|
+
question: pushQuestionSchema.optional()
|
|
23478
|
+
});
|
|
23479
|
+
workspaceSharedPushDataSchema = pushNotificationDataSchema.pick({ organizationId: true, workspaceId: true, chatId: true, completedAt: true }).extend({ kind: external_exports.literal("shared") });
|
|
23480
|
+
registerLiveActivityRequestSchema = chatRefSchema.extend({
|
|
23481
|
+
deviceId: external_exports.string().uuid(),
|
|
23482
|
+
/** The iOS activity's push token. Android leaves it out and gets FCM data messages on the device token. */
|
|
23483
|
+
pushToken: external_exports.string().regex(/^[0-9a-f]{64,400}$/i).optional(),
|
|
23484
|
+
/** iOS only: when the card's turn started, in seconds. Cards keep their order by it. */
|
|
23485
|
+
startedAt: external_exports.number().positive().optional()
|
|
23486
|
+
});
|
|
23487
|
+
syncLiveActivitiesRequestSchema = external_exports.object({
|
|
23488
|
+
activities: external_exports.array(chatRefSchema).max(100)
|
|
23489
|
+
});
|
|
23490
|
+
setLiveActivityStartTokenRequestSchema = external_exports.object({ token: external_exports.string().regex(/^[0-9a-f]{64,400}$/i) });
|
|
23444
23491
|
}
|
|
23445
23492
|
});
|
|
23446
23493
|
|
|
23447
|
-
// ../shared/src/
|
|
23448
|
-
var
|
|
23449
|
-
var
|
|
23450
|
-
"../shared/src/
|
|
23494
|
+
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
23495
|
+
var SECTION, REFERENCE, COMPUTER_ABILITY;
|
|
23496
|
+
var init_computer = __esm({
|
|
23497
|
+
"../shared/src/default-skills/replicas-agent/abilities/computer.ts"() {
|
|
23451
23498
|
"use strict";
|
|
23452
|
-
|
|
23453
|
-
|
|
23454
|
-
id: "attio",
|
|
23455
|
-
backend: "composio",
|
|
23456
|
-
toolkit: "attio",
|
|
23457
|
-
authType: "oauth",
|
|
23458
|
-
category: "business",
|
|
23459
|
-
name: "Attio",
|
|
23460
|
-
description: "Manage CRM records, people, companies, lists, and notes."
|
|
23461
|
-
},
|
|
23462
|
-
{
|
|
23463
|
-
id: "calendly",
|
|
23464
|
-
backend: "composio",
|
|
23465
|
-
toolkit: "calendly",
|
|
23466
|
-
authType: "oauth",
|
|
23467
|
-
category: "productivity",
|
|
23468
|
-
name: "Calendly",
|
|
23469
|
-
description: "Manage event types, scheduled events, invitees, and scheduling links."
|
|
23470
|
-
},
|
|
23471
|
-
{
|
|
23472
|
-
id: "clickhouse",
|
|
23473
|
-
backend: "composio",
|
|
23474
|
-
toolkit: "clickhouse",
|
|
23475
|
-
authType: "basic",
|
|
23476
|
-
category: "data",
|
|
23477
|
-
name: "ClickHouse",
|
|
23478
|
-
description: "Manage databases, tables, schemas, and queries."
|
|
23479
|
-
},
|
|
23480
|
-
{
|
|
23481
|
-
id: "cloudflare",
|
|
23482
|
-
backend: "composio",
|
|
23483
|
-
toolkit: "cloudflare_api_key",
|
|
23484
|
-
authType: "api_key",
|
|
23485
|
-
category: "data",
|
|
23486
|
-
name: "Cloudflare",
|
|
23487
|
-
description: "Manage zones, DNS records, analytics, and security settings."
|
|
23488
|
-
},
|
|
23489
|
-
{
|
|
23490
|
-
id: "e2b",
|
|
23491
|
-
toolkit: "e2b",
|
|
23492
|
-
backend: "native",
|
|
23493
|
-
authType: "api_key",
|
|
23494
|
-
category: "data",
|
|
23495
|
-
name: "E2B",
|
|
23496
|
-
description: "Create secure cloud sandboxes and run commands in them."
|
|
23497
|
-
},
|
|
23498
|
-
{
|
|
23499
|
-
id: "gmail",
|
|
23500
|
-
backend: "composio",
|
|
23501
|
-
toolkit: "gmail",
|
|
23502
|
-
authType: "oauth",
|
|
23503
|
-
category: "productivity",
|
|
23504
|
-
name: "Gmail",
|
|
23505
|
-
description: "Manage messages, threads, attachments, labels, and mailbox settings."
|
|
23506
|
-
},
|
|
23507
|
-
{
|
|
23508
|
-
id: "greptile",
|
|
23509
|
-
backend: "native",
|
|
23510
|
-
toolkit: "greptile",
|
|
23511
|
-
authType: "api_key",
|
|
23512
|
-
category: "data",
|
|
23513
|
-
name: "Greptile Knowledge Base",
|
|
23514
|
-
description: "Search and read self-updating codebase documentation, architecture, and flows."
|
|
23515
|
-
},
|
|
23516
|
-
{
|
|
23517
|
-
id: "googleads",
|
|
23518
|
-
backend: "composio",
|
|
23519
|
-
toolkit: "googleads",
|
|
23520
|
-
authType: "oauth",
|
|
23521
|
-
category: "data",
|
|
23522
|
-
name: "Google Ads",
|
|
23523
|
-
description: "Manage campaigns, customers, accounts, and reporting data."
|
|
23524
|
-
},
|
|
23525
|
-
{
|
|
23526
|
-
id: "googledocs",
|
|
23527
|
-
backend: "composio",
|
|
23528
|
-
toolkit: "googledocs",
|
|
23529
|
-
authType: "oauth",
|
|
23530
|
-
category: "productivity",
|
|
23531
|
-
name: "Google Docs",
|
|
23532
|
-
description: "Manage documents, structure, comments, and exported content."
|
|
23533
|
-
},
|
|
23534
|
-
{
|
|
23535
|
-
id: "googledrive",
|
|
23536
|
-
backend: "composio",
|
|
23537
|
-
toolkit: "googledrive",
|
|
23538
|
-
authType: "oauth",
|
|
23539
|
-
category: "productivity",
|
|
23540
|
-
name: "Google Drive",
|
|
23541
|
-
description: "Manage files, folders, metadata, permissions, and shared drives."
|
|
23542
|
-
},
|
|
23543
|
-
{
|
|
23544
|
-
id: "googlesearch",
|
|
23545
|
-
backend: "composio",
|
|
23546
|
-
toolkit: "google_search_console",
|
|
23547
|
-
authType: "oauth",
|
|
23548
|
-
category: "data",
|
|
23549
|
-
name: "Google Search",
|
|
23550
|
-
description: "Manage Search Console performance, indexing, sites, and sitemaps."
|
|
23551
|
-
},
|
|
23552
|
-
{
|
|
23553
|
-
id: "googlesheets",
|
|
23554
|
-
backend: "composio",
|
|
23555
|
-
toolkit: "googlesheets",
|
|
23556
|
-
authType: "oauth",
|
|
23557
|
-
category: "productivity",
|
|
23558
|
-
name: "Google Sheets",
|
|
23559
|
-
description: "Manage spreadsheets, worksheets, ranges, tables, and charts."
|
|
23560
|
-
},
|
|
23561
|
-
{
|
|
23562
|
-
id: "linkedin",
|
|
23563
|
-
backend: "composio",
|
|
23564
|
-
toolkit: "linkedin",
|
|
23565
|
-
authType: "oauth",
|
|
23566
|
-
category: "business",
|
|
23567
|
-
name: "LinkedIn",
|
|
23568
|
-
description: "Manage profiles, organizations, posts, and professional activity."
|
|
23569
|
-
},
|
|
23570
|
-
{
|
|
23571
|
-
id: "modal",
|
|
23572
|
-
backend: "native",
|
|
23573
|
-
toolkit: "modal",
|
|
23574
|
-
authType: "basic",
|
|
23575
|
-
category: "data",
|
|
23576
|
-
name: "Modal",
|
|
23577
|
-
description: "Invoke deployed functions through Modal compute."
|
|
23578
|
-
},
|
|
23579
|
-
{
|
|
23580
|
-
id: "posthog",
|
|
23581
|
-
backend: "composio",
|
|
23582
|
-
toolkit: "posthog",
|
|
23583
|
-
authType: "api_key",
|
|
23584
|
-
category: "data",
|
|
23585
|
-
name: "PostHog",
|
|
23586
|
-
description: "Manage projects, events, insights, dashboards, flags, and recordings."
|
|
23587
|
-
},
|
|
23588
|
-
{
|
|
23589
|
-
id: "planetscale",
|
|
23590
|
-
toolkit: "planetscale",
|
|
23591
|
-
backend: "native",
|
|
23592
|
-
authType: "oauth",
|
|
23593
|
-
category: "data",
|
|
23594
|
-
name: "PlanetScale",
|
|
23595
|
-
description: "Manage organizations, databases, branches, deploy requests, and Insights."
|
|
23596
|
-
},
|
|
23597
|
-
{
|
|
23598
|
-
id: "sazabi",
|
|
23599
|
-
backend: "native",
|
|
23600
|
-
toolkit: "sazabi",
|
|
23601
|
-
authType: "oauth",
|
|
23602
|
-
category: "data",
|
|
23603
|
-
name: "Sazabi",
|
|
23604
|
-
description: "Query logs, investigate issues, and run the Sazabi observability agent."
|
|
23605
|
-
},
|
|
23606
|
-
{
|
|
23607
|
-
id: "stripe",
|
|
23608
|
-
backend: "composio",
|
|
23609
|
-
toolkit: "stripe",
|
|
23610
|
-
authType: "oauth",
|
|
23611
|
-
category: "business",
|
|
23612
|
-
name: "Stripe",
|
|
23613
|
-
description: "Manage customers, payments, invoices, subscriptions, and balances."
|
|
23614
|
-
},
|
|
23615
|
-
{
|
|
23616
|
-
id: "kondo",
|
|
23617
|
-
backend: "native",
|
|
23618
|
-
toolkit: "kondo",
|
|
23619
|
-
authType: "oauth",
|
|
23620
|
-
category: "business",
|
|
23621
|
-
name: "Kondo",
|
|
23622
|
-
description: "Manage LinkedIn chats, labels, reminders, drafts, connections, and invites."
|
|
23623
|
-
},
|
|
23624
|
-
{
|
|
23625
|
-
id: "lightfield",
|
|
23626
|
-
backend: "native",
|
|
23627
|
-
toolkit: "lightfield",
|
|
23628
|
-
authType: "api_key",
|
|
23629
|
-
category: "business",
|
|
23630
|
-
name: "Lightfield",
|
|
23631
|
-
description: "Manage CRM accounts, contacts, opportunities, meetings, notes, and tasks."
|
|
23632
|
-
},
|
|
23633
|
-
{
|
|
23634
|
-
id: "pangram",
|
|
23635
|
-
backend: "native",
|
|
23636
|
-
toolkit: "pangram",
|
|
23637
|
-
authType: "api_key",
|
|
23638
|
-
category: "data",
|
|
23639
|
-
name: "Pangram",
|
|
23640
|
-
description: "Analyze text for AI generation and plagiarism signals."
|
|
23641
|
-
},
|
|
23642
|
-
{
|
|
23643
|
-
id: "vercel",
|
|
23644
|
-
backend: "native",
|
|
23645
|
-
toolkit: "vercel",
|
|
23646
|
-
authType: "api_key",
|
|
23647
|
-
category: "data",
|
|
23648
|
-
name: "Vercel",
|
|
23649
|
-
description: "Manage projects, deployments, logs, domains, and infrastructure."
|
|
23650
|
-
},
|
|
23651
|
-
{
|
|
23652
|
-
id: "turbopuffer",
|
|
23653
|
-
backend: "native",
|
|
23654
|
-
toolkit: "turbopuffer",
|
|
23655
|
-
authType: "api_key",
|
|
23656
|
-
category: "data",
|
|
23657
|
-
name: "turbopuffer",
|
|
23658
|
-
description: "Query and manage turbopuffer namespaces."
|
|
23659
|
-
},
|
|
23660
|
-
{
|
|
23661
|
-
id: "vanta",
|
|
23662
|
-
backend: "native",
|
|
23663
|
-
toolkit: "vanta",
|
|
23664
|
-
authType: "credentials",
|
|
23665
|
-
category: "data",
|
|
23666
|
-
name: "Vanta",
|
|
23667
|
-
description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data."
|
|
23668
|
-
}
|
|
23669
|
-
];
|
|
23670
|
-
HOSTED_COMPOSIO_PLUGIN_DEFINITIONS = [
|
|
23671
|
-
["notion", "notion", "OAUTH2", true, "productivity", "Notion"],
|
|
23672
|
-
["jira", "jira", "OAUTH2", true, "productivity", "Jira"],
|
|
23673
|
-
["confluence", "confluence", "OAUTH2", true, "productivity", "Confluence"],
|
|
23674
|
-
["googlecalendar", "googlecalendar", "OAUTH2", true, "productivity", "Google Calendar"],
|
|
23675
|
-
["microsoftteams", "microsoft_teams", "OAUTH2", true, "productivity", "Microsoft Teams"],
|
|
23676
|
-
["outlook", "outlook", "OAUTH2", true, "productivity", "Outlook"],
|
|
23677
|
-
["bitbucket", "bitbucket", "OAUTH2", true, "data", "Bitbucket"],
|
|
23678
|
-
["datadog", "datadog", "API_KEY", false, "data", "Datadog"],
|
|
23679
|
-
["pagerduty", "pagerduty", "OAUTH2", true, "data", "PagerDuty"],
|
|
23680
|
-
["intercom", "intercom", "OAUTH2", true, "business", "Intercom"],
|
|
23681
|
-
["zendesk", "zendesk", "OAUTH2", true, "business", "Zendesk"],
|
|
23682
|
-
["hubspot", "hubspot", "OAUTH2", true, "business", "HubSpot"],
|
|
23683
|
-
["supabase", "supabase", "OAUTH2", true, "data", "Supabase"],
|
|
23684
|
-
["figma", "figma", "OAUTH2", true, "productivity", "Figma"],
|
|
23685
|
-
["launchdarkly", "launch_darkly", "API_KEY", false, "data", "LaunchDarkly"],
|
|
23686
|
-
["asana", "asana", "OAUTH2", true, "productivity", "Asana"],
|
|
23687
|
-
["clickup", "clickup", "OAUTH2", true, "productivity", "ClickUp"],
|
|
23688
|
-
["trello", "trello", "OAUTH1", true, "productivity", "Trello"],
|
|
23689
|
-
["todoist", "todoist", "OAUTH2", true, "productivity", "Todoist"],
|
|
23690
|
-
["airtable", "airtable", "OAUTH2", true, "productivity", "Airtable"],
|
|
23691
|
-
["coda", "coda", "API_KEY", false, "productivity", "Coda"],
|
|
23692
|
-
["miro", "miro", "OAUTH2", true, "productivity", "Miro"],
|
|
23693
|
-
["sharepoint", "share_point", "OAUTH2", true, "productivity", "SharePoint"],
|
|
23694
|
-
["onedrive", "one_drive", "OAUTH2", true, "productivity", "OneDrive"],
|
|
23695
|
-
["googleslides", "googleslides", "OAUTH2", true, "productivity", "Google Slides"],
|
|
23696
|
-
["googlemeet", "googlemeet", "OAUTH2", true, "productivity", "Google Meet"],
|
|
23697
|
-
["circleback", "circleback_mcp", "DCR_OAUTH", false, "productivity", "Circleback"],
|
|
23698
|
-
["granola", "granola_mcp", "DCR_OAUTH", false, "productivity", "Granola"],
|
|
23699
|
-
["mercury", "mercury_mcp", "DCR_OAUTH", false, "business", "Mercury"],
|
|
23700
|
-
["googletasks", "googletasks", "OAUTH2", true, "productivity", "Google Tasks"],
|
|
23701
|
-
["dropbox", "dropbox", "OAUTH2", true, "productivity", "Dropbox"],
|
|
23702
|
-
["box", "box", "OAUTH2", true, "productivity", "Box"],
|
|
23703
|
-
["discord", "discord", "OAUTH2", true, "productivity", "Discord"],
|
|
23704
|
-
["discordbot", "discordbot", "OAUTH2", true, "productivity", "Discord Bot"],
|
|
23705
|
-
["zoom", "zoom", "OAUTH2", true, "productivity", "Zoom"],
|
|
23706
|
-
["googlechat", "google_chat", "OAUTH2", false, "productivity", "Google Chat"],
|
|
23707
|
-
["newrelic", "new_relic", "API_KEY", false, "data", "New Relic"],
|
|
23708
|
-
["betterstack", "better_stack", "API_KEY", false, "data", "Better Stack"],
|
|
23709
|
-
["incidentio", "incident_io", "API_KEY", false, "data", "incident.io"],
|
|
23710
|
-
["grafana", "grafana", "BEARER_TOKEN", false, "data", "Grafana"],
|
|
23711
|
-
["honeycomb", "honeycomb_mcp", "DCR_OAUTH", false, "data", "Honeycomb MCP"],
|
|
23712
|
-
["neon", "neon_mcp", "DCR_OAUTH", false, "data", "Neon"],
|
|
23713
|
-
["glen", "glen_mcp", "DCR_OAUTH", false, "data", "Glen"],
|
|
23714
|
-
["bugsnag", "bugsnag", "API_KEY", false, "data", "Bugsnag"],
|
|
23715
|
-
["circleci", "circleci", "API_KEY", false, "data", "CircleCI"],
|
|
23716
|
-
["buildkite", "buildkite", "API_KEY", false, "data", "Buildkite"],
|
|
23717
|
-
["dockerhub", "docker_hub", "API_KEY", false, "data", "Docker Hub"],
|
|
23718
|
-
["digitalocean", "digital_ocean", "OAUTH2", true, "data", "DigitalOcean"],
|
|
23719
|
-
["railway", "railway", "API_KEY", false, "data", "Railway"],
|
|
23720
|
-
["render", "render", "API_KEY", false, "data", "Render"],
|
|
23721
|
-
["firebase", "firebase", "API_KEY", false, "data", "Firebase"],
|
|
23722
|
-
["cloudinary", "cloudinary", "API_KEY", false, "data", "Cloudinary"],
|
|
23723
|
-
["configcat", "configcat", "API_KEY", false, "data", "ConfigCat"],
|
|
23724
|
-
["contextdev", "context_dev", "API_KEY", false, "data", "Context.dev"],
|
|
23725
|
-
["googleanalytics", "google_analytics", "OAUTH2", true, "data", "Google Analytics"],
|
|
23726
|
-
["googlebigquery", "googlebigquery", "OAUTH2", true, "data", "Google BigQuery"],
|
|
23727
|
-
["amplitude", "amplitude", "API_KEY", false, "data", "Amplitude"],
|
|
23728
|
-
["mixpanel", "mixpanel", "BASIC", false, "data", "Mixpanel"],
|
|
23729
|
-
["segment", "segment", "API_KEY", false, "data", "Segment"],
|
|
23730
|
-
["supermemory", "supermemory", "API_KEY", false, "data", "Supermemory"],
|
|
23731
|
-
["databricks", "databricks", "API_KEY", false, "data", "Databricks"],
|
|
23732
|
-
["snowflake", "snowflake", "OAUTH2", false, "data", "Snowflake"],
|
|
23733
|
-
["algolia", "algolia", "API_KEY", false, "data", "Algolia"],
|
|
23734
|
-
["elasticsearch", "elasticsearch", "API_KEY", false, "data", "Elasticsearch"],
|
|
23735
|
-
["salesforce", "salesforce", "OAUTH2", true, "business", "Salesforce"],
|
|
23736
|
-
["pipedrive", "pipedrive", "API_KEY", false, "business", "Pipedrive"],
|
|
23737
|
-
["close", "close", "API_KEY", false, "business", "Close"],
|
|
23738
|
-
["apollo", "apollo", "API_KEY", false, "business", "Apollo"],
|
|
23739
|
-
["gong", "gong", "OAUTH2", true, "business", "Gong"],
|
|
23740
|
-
["freshdesk", "freshdesk", "API_KEY", false, "business", "Freshdesk"],
|
|
23741
|
-
["helpscout", "help_scout", "OAUTH2", false, "business", "Help Scout"],
|
|
23742
|
-
["servicenow", "servicenow", "BASIC", false, "business", "ServiceNow"],
|
|
23743
|
-
["mailchimp", "mailchimp", "OAUTH2", true, "business", "Mailchimp"],
|
|
23744
|
-
["customerio", "customerio", "API_KEY", false, "business", "Customer.io"],
|
|
23745
|
-
["klaviyo", "klaviyo", "API_KEY", false, "business", "Klaviyo"],
|
|
23746
|
-
["shopify", "shopify", "API_KEY", false, "business", "Shopify"],
|
|
23747
|
-
["quickbooks", "quickbooks", "OAUTH2", true, "business", "QuickBooks"],
|
|
23748
|
-
["xero", "xero", "OAUTH2", false, "business", "Xero"],
|
|
23749
|
-
["brex", "brex", "API_KEY", false, "business", "Brex"],
|
|
23750
|
-
["buffer", "buffer", "OAUTH2", false, "business", "Buffer"],
|
|
23751
|
-
["canva", "canva", "OAUTH2", true, "productivity", "Canva"],
|
|
23752
|
-
["webflow", "webflow", "API_KEY", false, "business", "Webflow"],
|
|
23753
|
-
["firecrawl", "firecrawl", "API_KEY", false, "data", "Firecrawl"],
|
|
23754
|
-
["browserbase", "browserbase_tool", "API_KEY", false, "data", "Browserbase"],
|
|
23755
|
-
["exa", "exa", "API_KEY", false, "data", "Exa"],
|
|
23756
|
-
["youtube", "youtube", "OAUTH2", true, "business", "YouTube"],
|
|
23757
|
-
["twitter", "twitter", "OAUTH2", false, "business", "Twitter/X"],
|
|
23758
|
-
["instagram", "instagram", "OAUTH2", true, "business", "Instagram"],
|
|
23759
|
-
["facebook", "facebook", "OAUTH2", true, "business", "Facebook"]
|
|
23760
|
-
];
|
|
23761
|
-
HOSTED_COMPOSIO_PLUGINS = HOSTED_COMPOSIO_PLUGIN_DEFINITIONS.map(
|
|
23762
|
-
([id, toolkit, authScheme, managedAuth, category, name]) => ({
|
|
23763
|
-
id,
|
|
23764
|
-
backend: "composio",
|
|
23765
|
-
toolkit,
|
|
23766
|
-
authType: "hosted",
|
|
23767
|
-
authScheme,
|
|
23768
|
-
managedAuth,
|
|
23769
|
-
category,
|
|
23770
|
-
name,
|
|
23771
|
-
description: `Use ${name} tools from workspace agents.`
|
|
23772
|
-
})
|
|
23773
|
-
);
|
|
23774
|
-
READ_ONLY_SCOPES = {
|
|
23775
|
-
gmail: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/contacts.readonly", "https://www.googleapis.com/auth/contacts.other.readonly", "https://www.googleapis.com/auth/gmail.readonly"],
|
|
23776
|
-
googledocs: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/documents.readonly"],
|
|
23777
|
-
googledrive: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly"],
|
|
23778
|
-
googlesheets: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/spreadsheets.readonly"],
|
|
23779
|
-
googleslides: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/presentations.readonly"],
|
|
23780
|
-
googlecalendar: ["https://www.googleapis.com/auth/calendar.readonly"],
|
|
23781
|
-
googletasks: ["https://www.googleapis.com/auth/tasks.readonly"],
|
|
23782
|
-
googlesearch: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/webmasters.readonly"],
|
|
23783
|
-
googleanalytics: ["https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/analytics.readonly"],
|
|
23784
|
-
youtube: ["https://www.googleapis.com/auth/youtube.readonly"],
|
|
23785
|
-
outlook: ["User.Read", "Mail.Read", "MailboxSettings.Read", "Calendars.Read", "Contacts.Read", "offline_access"],
|
|
23786
|
-
onedrive: ["Files.Read.All", "Sites.Read.All", "offline_access"],
|
|
23787
|
-
microsoftteams: ["User.Read", "Team.ReadBasic.All", "Channel.ReadBasic.All", "ChannelMessage.Read.All", "Chat.Read", "Chat.ReadBasic", "ChatMessage.Read", "People.Read.All", "TeamsActivity.Read", "offline_access"],
|
|
23788
|
-
jira: ["read:jira-work", "read:jira-user", "read:servicedesk-request", "read:servicemanagement-insight-objects", "read:sprint:jira-software", "read:board-scope:jira-software", "read:project:jira", "read:issue-type-scheme:jira", "offline_access"],
|
|
23789
|
-
confluence: ["read:space-details:confluence", "read:audit-log:confluence", "read:page:confluence", "read:blogpost:confluence", "read:whiteboard:confluence", "read:comment:confluence", "read:content.restriction:confluence", "read:content.metadata:confluence", "read:inlinetask:confluence", "read:task:confluence", "offline_access"],
|
|
23790
|
-
zendesk: ["read"],
|
|
23791
|
-
gong: ["api:calls:read:basic", "api:calls:read:extensive", "api:calls:read:transcript", "api:calls:read:media-url", "api:users:read", "api:stats:interaction", "api:stats:scorecards", "api:stats:user-actions", "api:stats:user-actions:detailed", "api:settings:scorecards:read", "api:settings:trackers:read", "api:library:read", "api:tasks:read", "api:flows:read", "api:workspaces:read", "api:crm:get-objects", "api:crm:schema", "api:crm:integrations:read", "api:call-outcomes:read", "api:permission-profile:read", "api:logs:read"],
|
|
23792
|
-
figma: ["current_user:read", "file_content:read", "file_comments:read", "file_metadata:read", "file_versions:read", "projects:read", "library_assets:read", "library_content:read", "team_library_content:read", "webhooks:read"],
|
|
23793
|
-
airtable: ["data.records:read", "data.recordComments:read", "schema.bases:read", "user.email:read"],
|
|
23794
|
-
todoist: ["data:read"],
|
|
23795
|
-
dropbox: ["openid", "email", "profile", "account_info.read", "files.metadata.read", "files.content.read", "file_requests.read", "sharing.read", "contacts.read"],
|
|
23796
|
-
canva: ["profile:read", "asset:read", "brandtemplate:content:read", "brandtemplate:meta:read", "comment:read", "design:content:read", "design:meta:read", "folder:read"],
|
|
23797
|
-
facebook: ["public_profile", "email", "pages_show_list", "pages_read_engagement", "pages_read_user_content", "read_insights"],
|
|
23798
|
-
instagram: ["instagram_business_basic", "instagram_business_manage_insights"]
|
|
23799
|
-
};
|
|
23800
|
-
PLUGIN_CATALOG = [
|
|
23801
|
-
...EXPLICIT_PLUGIN_CATALOG,
|
|
23802
|
-
...HOSTED_COMPOSIO_PLUGINS
|
|
23803
|
-
].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
|
|
23804
|
-
}
|
|
23805
|
-
});
|
|
23499
|
+
SECTION = `### Computer use (Linux desktop control)
|
|
23500
|
+
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).
|
|
23806
23501
|
|
|
23807
|
-
|
|
23808
|
-
function isPluginId(value) {
|
|
23809
|
-
return PLUGIN_CATALOG.some((plugin) => plugin.id === value);
|
|
23810
|
-
}
|
|
23811
|
-
var init_plugins = __esm({
|
|
23812
|
-
"../shared/src/routes/plugins.ts"() {
|
|
23813
|
-
"use strict";
|
|
23814
|
-
init_plugin_catalog();
|
|
23815
|
-
init_plugin_catalog();
|
|
23816
|
-
}
|
|
23817
|
-
});
|
|
23502
|
+
**Reference:** \`references/COMPUTER-USE.md\`
|
|
23818
23503
|
|
|
23819
|
-
|
|
23820
|
-
|
|
23821
|
-
|
|
23822
|
-
|
|
23823
|
-
|
|
23824
|
-
|
|
23825
|
-
|
|
23826
|
-
init_sandbox();
|
|
23827
|
-
init_environment_files();
|
|
23828
|
-
init_plugins();
|
|
23829
|
-
init_environment_setups();
|
|
23830
|
-
variableNameSchema = external_exports.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name");
|
|
23831
|
-
mcpValueSchema = external_exports.union([
|
|
23832
|
-
external_exports.string(),
|
|
23833
|
-
environmentMcpVariableReferenceSchema
|
|
23834
|
-
]);
|
|
23835
|
-
mcpValuesSchema = external_exports.record(external_exports.string(), mcpValueSchema);
|
|
23836
|
-
httpConfigSchema = environmentMcpHttpConfigSchema.pick({ url: true, auth: true }).extend({
|
|
23837
|
-
headers: mcpValuesSchema.default({})
|
|
23838
|
-
}).strict();
|
|
23839
|
-
replicasMcpDefinitionSchema = external_exports.discriminatedUnion("transport", [
|
|
23840
|
-
external_exports.strictObject({
|
|
23841
|
-
transport: external_exports.literal("stdio"),
|
|
23842
|
-
config: environmentMcpStdioConfigSchema.pick({ command: true }).extend({
|
|
23843
|
-
args: environmentMcpStdioConfigSchema.shape.args.unwrap().default([]),
|
|
23844
|
-
env: external_exports.record(variableNameSchema, mcpValueSchema).default({})
|
|
23845
|
-
}).strict()
|
|
23846
|
-
}),
|
|
23847
|
-
external_exports.strictObject({ transport: external_exports.literal("http"), config: httpConfigSchema }),
|
|
23848
|
-
external_exports.strictObject({ transport: external_exports.literal("sse"), config: httpConfigSchema })
|
|
23849
|
-
]).superRefine((definition, context) => {
|
|
23850
|
-
if (definition.transport === "stdio") return;
|
|
23851
|
-
const result = validateEnvironmentMcpAuthentication(definition.transport, definition.config);
|
|
23852
|
-
if (!result.ok) context.addIssue({ code: "custom", path: result.error.code === "transport" ? ["transport"] : ["config", result.error.code ?? "auth"], message: result.error.message });
|
|
23853
|
-
});
|
|
23854
|
-
replicasEnvironmentConfigSchema = external_exports.strictObject({
|
|
23855
|
-
repositories: external_exports.array(external_exports.string().trim().min(1)).optional(),
|
|
23856
|
-
workspaceSize: external_exports.enum(WORKSPACE_SIZE_OPTIONS).optional(),
|
|
23857
|
-
files: external_exports.record(external_exports.string().trim().refine((path11) => !validateEnvironmentFilePath(path11), "must be a file path starting with ~/"), external_exports.strictObject({
|
|
23858
|
-
name: external_exports.string().trim().min(1).optional(),
|
|
23859
|
-
content: external_exports.string().max(65536)
|
|
23860
|
-
})).optional(),
|
|
23861
|
-
skills: external_exports.record(external_exports.string().trim().min(1), external_exports.strictObject({ source: external_exports.string().trim().min(1), name: external_exports.string().trim().min(1).optional() })).optional(),
|
|
23862
|
-
requiredPlugins: external_exports.array(external_exports.string().refine(isPluginId, "must be a supported plugin")).transform((plugins2) => [...new Set(plugins2)]).optional(),
|
|
23863
|
-
systemPrompt: external_exports.string().optional(),
|
|
23864
|
-
warmHook: external_exports.string().optional(),
|
|
23865
|
-
startHook: external_exports.string().optional(),
|
|
23866
|
-
variables: external_exports.record(variableNameSchema, external_exports.string()).optional(),
|
|
23867
|
-
requiredSecrets: external_exports.array(variableNameSchema).optional(),
|
|
23868
|
-
mcps: external_exports.record(external_exports.string().regex(MCP_NAME_PATTERN, "must be 1\u201364 letters, digits, underscores or hyphens, starting with a letter or digit").refine((name) => !isReservedMcpName(name), "is reserved for Replicas"), replicasMcpDefinitionSchema).optional()
|
|
23869
|
-
}).superRefine((config3, context) => {
|
|
23870
|
-
const skillNames = Object.keys(config3.skills ?? {}).map((slug) => slug.toLowerCase());
|
|
23871
|
-
if (new Set(skillNames).size !== skillNames.length) context.addIssue({ code: "custom", path: ["skills"], message: "Skill slugs must be unique regardless of case" });
|
|
23872
|
-
const names = /* @__PURE__ */ new Set();
|
|
23873
|
-
for (const name of Object.keys(config3.mcps ?? {})) {
|
|
23874
|
-
const normalized = name.toLowerCase();
|
|
23875
|
-
if (names.has(normalized)) {
|
|
23876
|
-
context.addIssue({ code: "custom", path: ["mcps", name], message: "MCP names must be unique regardless of case" });
|
|
23877
|
-
}
|
|
23878
|
-
names.add(normalized);
|
|
23879
|
-
}
|
|
23880
|
-
for (const key of config3.requiredSecrets ?? []) {
|
|
23881
|
-
if (config3.variables && Object.hasOwn(config3.variables, key)) {
|
|
23882
|
-
context.addIssue({ code: "custom", path: ["requiredSecrets"], message: `"${key}" cannot also be declared as a non-secret variable` });
|
|
23883
|
-
}
|
|
23884
|
-
}
|
|
23885
|
-
});
|
|
23886
|
-
}
|
|
23887
|
-
});
|
|
23504
|
+
Use this when:
|
|
23505
|
+
- A task requires interacting with a website, web app, or desktop application that has no usable API
|
|
23506
|
+
- You want the user to watch the agent work - they can open the \`Desktop\` tab, or you can share the URL from \`replicas computer info\`
|
|
23507
|
+
- You're testing UI changes in a browser before reporting them as done
|
|
23508
|
+
- You want to record a screen capture of a task as proof to share back
|
|
23509
|
+
- You need to open or use an app on the user's Mac: use \`replicas computer mac\`, never \`ssh\` with \`open\` or AppleScript, which can switch the user's view`;
|
|
23510
|
+
REFERENCE = `# Computer use (Linux desktop control)
|
|
23888
23511
|
|
|
23889
|
-
|
|
23890
|
-
var environmentConfigLocationSchema, sourceInput, previewEnvironmentConfigSourceRequestSchema, applyEnvironmentConfigSourceRequestSchema;
|
|
23891
|
-
var init_environment_config_source = __esm({
|
|
23892
|
-
"../shared/src/routes/environment-config-source.ts"() {
|
|
23893
|
-
"use strict";
|
|
23894
|
-
init_zod();
|
|
23895
|
-
init_environment_config();
|
|
23896
|
-
environmentConfigLocationSchema = external_exports.union([
|
|
23897
|
-
external_exports.object({
|
|
23898
|
-
kind: external_exports.literal("git").default("git"),
|
|
23899
|
-
entrypoint_filename: external_exports.string().optional(),
|
|
23900
|
-
repository_id: external_exports.string(),
|
|
23901
|
-
repository_name: external_exports.string(),
|
|
23902
|
-
filename: external_exports.string(),
|
|
23903
|
-
commit_sha: external_exports.string(),
|
|
23904
|
-
source_url: external_exports.string(),
|
|
23905
|
-
file_sha: external_exports.undefined().optional()
|
|
23906
|
-
}),
|
|
23907
|
-
external_exports.object({
|
|
23908
|
-
kind: external_exports.literal("file"),
|
|
23909
|
-
repository_id: external_exports.null(),
|
|
23910
|
-
repository_name: external_exports.null(),
|
|
23911
|
-
filename: external_exports.string(),
|
|
23912
|
-
commit_sha: external_exports.null(),
|
|
23913
|
-
source_url: external_exports.null(),
|
|
23914
|
-
file_sha: external_exports.string()
|
|
23915
|
-
})
|
|
23916
|
-
]);
|
|
23917
|
-
sourceInput = {
|
|
23918
|
-
repository_id: external_exports.string().min(1).optional(),
|
|
23919
|
-
file: external_exports.strictObject({ filename: external_exports.string().min(1).max(1024), environment: replicasEnvironmentConfigSchema }).optional()
|
|
23920
|
-
};
|
|
23921
|
-
previewEnvironmentConfigSourceRequestSchema = external_exports.strictObject(sourceInput).refine(
|
|
23922
|
-
(input2) => !input2.file || !input2.repository_id,
|
|
23923
|
-
{ message: "Choose either a repository or a file" }
|
|
23924
|
-
);
|
|
23925
|
-
applyEnvironmentConfigSourceRequestSchema = external_exports.strictObject({
|
|
23926
|
-
...sourceInput,
|
|
23927
|
-
commit_sha: external_exports.string().min(1).optional(),
|
|
23928
|
-
fingerprint: external_exports.string().min(1)
|
|
23929
|
-
}).refine((input2) => input2.file ? !input2.repository_id && !input2.commit_sha : !!input2.commit_sha, {
|
|
23930
|
-
message: "File configuration requires file contents; Git configuration requires a reviewed commit"
|
|
23931
|
-
});
|
|
23932
|
-
}
|
|
23933
|
-
});
|
|
23512
|
+
Every Replicas workspace boots with a full Linux desktop stack - Xvfb (1920\xD71080), openbox, tint2, PulseAudio, ffmpeg, and Google Chrome. The engine auto-registers the H.264 and Opus viewer (port 6080) as an authenticated preview at startup, so the dashboard \`Desktop\` tab is live the moment the workspace is up. You drive the desktop through the \`replicas computer\` CLI.
|
|
23934
23513
|
|
|
23935
|
-
|
|
23936
|
-
var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
|
|
23937
|
-
var init_replicas_mcp = __esm({
|
|
23938
|
-
"../shared/src/replicas-mcp.ts"() {
|
|
23939
|
-
"use strict";
|
|
23940
|
-
init_zod();
|
|
23941
|
-
init_agent();
|
|
23942
|
-
init_linear2();
|
|
23943
|
-
init_trigger_schemas();
|
|
23944
|
-
init_types5();
|
|
23945
|
-
init_chat_fork();
|
|
23946
|
-
init_v1();
|
|
23947
|
-
init_environment();
|
|
23948
|
-
init_environment_config_source();
|
|
23949
|
-
init_workspaces();
|
|
23950
|
-
init_sandbox();
|
|
23951
|
-
REPLICAS_MCP_TOOLS = {
|
|
23952
|
-
listEnvironments: "list_environments",
|
|
23953
|
-
createAutomation: "create_automation",
|
|
23954
|
-
spawn: "spawn_workspace",
|
|
23955
|
-
spawnInNewThread: "spawn_workspace_in_new_thread",
|
|
23956
|
-
relay: "relay_to_workspace",
|
|
23957
|
-
listWorkspaces: "list_workspaces",
|
|
23958
|
-
linearStart: "start_linear_session",
|
|
23959
|
-
linearSessionIntent: "register_linear_session_intent",
|
|
23960
|
-
routeLinearTicket: "route_linear_ticket",
|
|
23961
|
-
listChannelSettings: "list_channel_settings",
|
|
23962
|
-
saveChannelPreset: "save_channel_preset",
|
|
23963
|
-
deleteChannelPreset: "delete_channel_preset",
|
|
23964
|
-
updateChannelSettings: "update_channel_settings",
|
|
23965
|
-
setOrganizationProactivity: "set_organization_proactivity",
|
|
23966
|
-
setSlackAgentDefaults: "set_slack_agent_defaults",
|
|
23967
|
-
claimSettingsOffer: "claim_settings_offer",
|
|
23968
|
-
setThreadMuted: "set_thread_muted",
|
|
23969
|
-
stopWorkspace: "stop_workspace",
|
|
23970
|
-
setSlackConnectMuted: "set_slack_connect_muted",
|
|
23971
|
-
setSlackConnectDefaults: "set_slack_connect_defaults",
|
|
23972
|
-
spawnSubagent: "spawn_subagent",
|
|
23973
|
-
messageSubagent: "message_subagent",
|
|
23974
|
-
listSubagents: "list_subagents",
|
|
23975
|
-
readSubagent: "read_subagent",
|
|
23976
|
-
archiveSubagent: "archive_subagent",
|
|
23977
|
-
mergeWhenReady: "merge_when_ready",
|
|
23978
|
-
waitForSubagents: "wait_for_subagents",
|
|
23979
|
-
getBoard: "get_board",
|
|
23980
|
-
updateBoard: "update_board",
|
|
23981
|
-
updateTicket: "update_ticket",
|
|
23982
|
-
replyOnTicket: "reply_on_ticket",
|
|
23983
|
-
sendToChat: "send_to_chat",
|
|
23984
|
-
setStatus: "set_status",
|
|
23985
|
-
getLinearRouting: "get_linear_routing",
|
|
23986
|
-
setLinearRouting: "set_linear_routing",
|
|
23987
|
-
clearLinearRouting: "clear_linear_routing",
|
|
23988
|
-
getSlackChannel: "get_slack_channel",
|
|
23989
|
-
linkSlackChannel: "link_slack_channel",
|
|
23990
|
-
createSlackChannel: "create_slack_channel",
|
|
23991
|
-
unlinkSlackChannel: "unlink_slack_channel",
|
|
23992
|
-
setSlackChannelLevel: "set_slack_channel_level",
|
|
23993
|
-
createReplica: "create_replica",
|
|
23994
|
-
listReplicas: "list_replicas",
|
|
23995
|
-
getReplica: "get_replica",
|
|
23996
|
-
deleteReplica: "delete_replica",
|
|
23997
|
-
wakeReplica: "wake_replica",
|
|
23998
|
-
sleepReplica: "sleep_replica",
|
|
23999
|
-
archiveReplica: "archive_replica",
|
|
24000
|
-
waitForReplica: "wait_for_replica",
|
|
24001
|
-
runCommand: "run_command",
|
|
24002
|
-
getReplicaHooks: "get_replica_hooks",
|
|
24003
|
-
whoami: "whoami",
|
|
24004
|
-
sendReplicaMessage: "send_replica_message",
|
|
24005
|
-
readReplicaHistory: "read_replica_history",
|
|
24006
|
-
listChats: "list_chats",
|
|
24007
|
-
createChat: "create_chat",
|
|
24008
|
-
deleteChat: "delete_chat",
|
|
24009
|
-
listRepositories: "list_repositories"
|
|
24010
|
-
};
|
|
24011
|
-
automationToolInputSchema = external_exports.object({
|
|
24012
|
-
name: external_exports.string().describe("Short automation name."),
|
|
24013
|
-
prompt: external_exports.string().describe("Prompt each automation run starts with."),
|
|
24014
|
-
environment_id: external_exports.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
24015
|
-
triggers: external_exports.array(automationTriggerSchema).min(1).describe(
|
|
24016
|
-
`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>"] } }\`. Linear: \`{ "type": "linear", "config": { "event": "${LINEAR_ISSUE_STATE_CHANGED_EVENT}", "state_types": ["completed"] } }\`.`
|
|
24017
|
-
),
|
|
24018
|
-
description: external_exports.string().optional().describe("One-line summary shown in the dashboard."),
|
|
24019
|
-
plan_mode: external_exports.boolean().optional(),
|
|
24020
|
-
goal_mode: external_exports.boolean().optional(),
|
|
24021
|
-
fast_mode: external_exports.boolean().optional(),
|
|
24022
|
-
workspace_lifecycle_policy: external_exports.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
24023
|
-
"What happens to a run's workspace when the agent finishes. `delete_when_done` (default, except one-time runs, which default to `default`) when the output lives elsewhere (PR comments, checks, Slack posts); `sleep_when_done` when later runs reuse the workspace, like one per PR across pushes; `default` (keep alive) when people follow up in the workspace."
|
|
24024
|
-
)
|
|
24025
|
-
});
|
|
24026
|
-
credentialUserIdDescription = `Organization automations only: the user ID (see \`${REPLICAS_MCP_TOOLS.whoami}\`) of the member whose coding agent credentials, such as their Claude subscription, runs use before the organization's. Only your workspace's owner, or whoever's credentials this workspace runs on.`;
|
|
24027
|
-
automationBackgroundSchema = external_exports.boolean().optional().describe(
|
|
24028
|
-
"Marks this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list."
|
|
24029
|
-
);
|
|
24030
|
-
automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
24031
|
-
credential_user_id: external_exports.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
|
|
24032
|
-
background: automationBackgroundSchema,
|
|
24033
|
-
scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
24034
|
-
});
|
|
24035
|
-
automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
24036
|
-
automation_id: external_exports.string().describe("Automation ID"),
|
|
24037
|
-
enabled: external_exports.boolean().optional(),
|
|
24038
|
-
agent_provider: external_exports.enum(ENGINE_AGENT_PROVIDERS).nullable().optional(),
|
|
24039
|
-
model: external_exports.string().nullable().optional(),
|
|
24040
|
-
thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
24041
|
-
workspace_size: external_exports.enum(WORKSPACE_SIZES).optional(),
|
|
24042
|
-
credential_user_id: external_exports.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
|
|
24043
|
-
background: automationBackgroundSchema,
|
|
24044
|
-
scope: external_exports.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
24045
|
-
});
|
|
24046
|
-
chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
|
|
24047
|
-
({ provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape);
|
|
24048
|
-
createChatToolInputSchema = external_exports.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
24049
|
-
forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
24050
|
-
renameChatToolInputSchema = external_exports.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
24051
|
-
runCommandToolInputSchema = external_exports.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
24052
|
-
environmentMcpPath = { environment_id: external_exports.string().describe("Environment ID") };
|
|
24053
|
-
createEnvironmentMcpToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
24054
|
-
updateEnvironmentMcpToolInputSchema = external_exports.object({
|
|
24055
|
-
...environmentMcpPath,
|
|
24056
|
-
mcp_id: external_exports.string().describe("MCP ID"),
|
|
24057
|
-
...updateEnvironmentMcpRequestSchema.shape
|
|
24058
|
-
});
|
|
24059
|
-
createEnvironmentDeviceToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
24060
|
-
previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
24061
|
-
applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
24062
|
-
}
|
|
24063
|
-
});
|
|
23514
|
+
Use this for anything the user can't reasonably do via an API - clicking around web apps, filling forms, testing UI changes, dragging files between desktop apps, recording a walkthrough.
|
|
24064
23515
|
|
|
24065
|
-
|
|
24066
|
-
var SCOUT_SOURCE_TYPES, SCOUT_PROACTIVITY_LEVELS, SCOUT_PRESET_NAME_MAX_LENGTH, SCOUT_CHANNEL_SETTINGS_OFFERS, SCOUT_SETTINGS_OFFERS, SCOUT_PRESET_ICONS;
|
|
24067
|
-
var init_scout = __esm({
|
|
24068
|
-
"../shared/src/scout.ts"() {
|
|
24069
|
-
"use strict";
|
|
24070
|
-
SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
24071
|
-
SCOUT_PROACTIVITY_LEVELS = ["tagged", "conservative", "balanced", "proactive"];
|
|
24072
|
-
SCOUT_PRESET_NAME_MAX_LENGTH = 50;
|
|
24073
|
-
SCOUT_CHANNEL_SETTINGS_OFFERS = ["proactivity", "raise_proactivity", "instructions"];
|
|
24074
|
-
SCOUT_SETTINGS_OFFERS = [...SCOUT_CHANNEL_SETTINGS_OFFERS, "organization_proactivity", "raise_organization_proactivity"];
|
|
24075
|
-
SCOUT_PRESET_ICONS = [
|
|
24076
|
-
"users",
|
|
24077
|
-
"user",
|
|
24078
|
-
"inbox",
|
|
24079
|
-
"building",
|
|
24080
|
-
"bug",
|
|
24081
|
-
"message-circle",
|
|
24082
|
-
"headphones",
|
|
24083
|
-
"heart",
|
|
24084
|
-
"star",
|
|
24085
|
-
"flag",
|
|
24086
|
-
"zap",
|
|
24087
|
-
"shield",
|
|
24088
|
-
"code",
|
|
24089
|
-
"terminal",
|
|
24090
|
-
"rocket",
|
|
24091
|
-
"wrench",
|
|
24092
|
-
"briefcase",
|
|
24093
|
-
"globe",
|
|
24094
|
-
"book-open",
|
|
24095
|
-
"lightbulb",
|
|
24096
|
-
"target",
|
|
24097
|
-
"bell",
|
|
24098
|
-
"layers",
|
|
24099
|
-
"tag"
|
|
24100
|
-
];
|
|
24101
|
-
}
|
|
24102
|
-
});
|
|
23516
|
+
## When to use it
|
|
24103
23517
|
|
|
24104
|
-
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
"../shared/src/default-skills/scout-settings.ts"() {
|
|
24108
|
-
"use strict";
|
|
24109
|
-
init_replicas_mcp();
|
|
24110
|
-
init_scout();
|
|
24111
|
-
SCOUT_SETTINGS_SKILL_NAME = "scout-settings";
|
|
24112
|
-
CONTENT = `---
|
|
24113
|
-
name: ${SCOUT_SETTINGS_SKILL_NAME}
|
|
24114
|
-
description: Use when someone asks what Replicas can do or what they can change ("what can you do?", "what can I change here?"), asks to change or explain how Replicas behaves in Slack or Linear (channel levels, "be quieter", "only reply when tagged", silent mode, mute, channel or team instructions, presets, monitored Linear teams, Slack Connect defaults, Slack agent defaults), when someone is annoyed that Scout replied unasked ("not you", "nobody asked", a thumbs-down), when making or answering a settings or automation offer, or when setting up an automation. Not for routing ordinary requests.
|
|
24115
|
-
---
|
|
23518
|
+
- **Prefer real APIs first.** If a task has a CLI or HTTP API (GitHub, Linear, Slack, Replicas itself), use that. Driving a UI is slower, flakier, and less auditable.
|
|
23519
|
+
- **Use it when there's no API**: testing a frontend you just changed, navigating a vendor portal, demonstrating a flow on video.
|
|
23520
|
+
- **Use it when the user wants to watch.** The dashboard already shows a \`Desktop\` tab. If you're talking to the user somewhere else (e.g. Slack), call \`replicas computer info\` to get the viewer URL and paste it in.
|
|
24116
23521
|
|
|
24117
|
-
|
|
23522
|
+
## Never use raw \`xdotool\` / \`scrot\` / \`ffmpeg\` directly
|
|
24118
23523
|
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
## What you can do
|
|
24122
|
-
| Ask | How | Who |
|
|
24123
|
-
| --- | --- | --- |
|
|
24124
|
-
| How much you speak up in a channel or group DM (Mentions only, Low, Balanced, High) | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`proactivity\` | Any member, except that raising one from Mentions only needs an admin |
|
|
24125
|
-
| How much you speak up in every channel | \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\` | Admin |
|
|
24126
|
-
| Silent mode for a channel, also asked as muting you there (you still read it and follow its instructions, but never post there) | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`silent\` | Admin |
|
|
24127
|
-
| Instructions for a channel or Linear team, such as "file bugs in Linear and post them in #triage", "send actionable messages to App Support", or "mobile requests go to the mobile-ios environment" | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`instructions\` | Any member |
|
|
24128
|
-
| Create, edit, or delete a preset (reusable instructions), or assign one | \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`preset_id\` | Any member |
|
|
24129
|
-
| Defaults for every channel shared with another company: preset, instructions, level, silent mode | \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` | Admin |
|
|
24130
|
-
| Triage new issues in a Linear team, or stop | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`source: linear\`, \`monitored\` | Admin starts; any member stops |
|
|
24131
|
-
| Agent, model, thinking level, goal mode, and fast mode for tasks started from Slack | \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` | Admin |
|
|
24132
|
-
| Stay quiet in this thread, or come back | \`${REPLICAS_MCP_TOOLS.setThreadMuted}\` | Anyone in the thread |
|
|
24133
|
-
| A recurring task ("every Monday, summarize open PRs in #eng") | \`${REPLICAS_MCP_TOOLS.createAutomation}\` (see Automations) | Members who can create automations |
|
|
24134
|
-
|
|
24135
|
-
You also answer questions, start a workspace for a task (in a separate thread when asked), relay follow-ups to a thread's workspace, stop it, hand a thread to a Mothership by name, and file Linear tickets with \`replicas.linear.graphql\`. Spawn for a one-time reminder ("remind me tomorrow at 9"): workspaces can schedule one-time runs.
|
|
24136
|
-
|
|
24137
|
-
A person's own defaults (agent, model, environment) and the organization's general defaults are changed in the Replicas app, not by you; Slack tasks use them unless the Slack agent defaults above say otherwise.
|
|
24138
|
-
|
|
24139
|
-
You can't add yourself to or remove yourself from a channel: people type \`/invite @Replicas\` or \`/remove @Replicas\` there, and an admin can pick channels under Integrations, Slack, Configure. To keep you in a channel but out of the way, lower it to Mentions only or put it in silent mode. A channel becomes a Mothership's own channel from that Mothership, not here; any channel's instructions can still send its messages to a Mothership.
|
|
24140
|
-
|
|
24141
|
-
## Tools
|
|
24142
|
-
Read presets, channel instructions, and levels with \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Change them with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\`, \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`, \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`, or \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`. Every change takes \`confirmation_*\` arguments naming who asked. For a Slack message, fill them with its envelope \`channel_id\`, \`thread_ts\`, \`message_ts\`, and \`user_id\`. A message from a person in the Replicas dashboard has no \`[Slack]\` envelope and carries a \`confirmation_dashboard_token\`: pass only that, never one from another message, and answer in the chat. The server checks that the person who asked is an organization member (and an admin where noted). If it refuses, say why briefly and change nothing.
|
|
24143
|
-
|
|
24144
|
-
## Changing settings
|
|
24145
|
-
- Settings also change outside your chat, often on purpose: read the current settings first, never trust earlier messages, and never re-apply an earlier request the current message doesn't ask for. Save only what the current message asks.
|
|
24146
|
-
- **Levels**, lowest to highest: \`tagged\` (only @Replicas pings reach you, not even messages naming Replicas), \`conservative\` (also messages naming Replicas or Scout, and follow-ups in threads with a workspace), \`balanced\` (the normal triage rules), \`proactive\` (also clear untagged questions and requests). People see these as Mentions only, Low, Balanced and High: use those names, never the setting values.
|
|
24147
|
-
- The organization has one level for its whole Slack workspace, which only an admin can set with \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`. A channel or group DM can override it with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` and \`proactivity\`. 1:1 DMs are always addressed to you. Any member can lower a channel; raising one above \`tagged\` needs an admin.
|
|
24148
|
-
- A request that points at a channel ("here", "in #eng", "stop replying in #random") changes that channel only. One that doesn't ("only respond when I @ you", "don't auto-reply to Slack messages") means the organization level. When it names a channel, even without "#" ("make support-inbound quieter"), find it with \`conversations.list\` and change that one, not the one you were asked in; ask if none or several match. If a non-admin asks for an organization change, say an organization admin has to ask, and offer the channel-only change when they asked from a channel. Instructions don't substitute for a level.
|
|
24149
|
-
- **Instructions and presets:** prefer changing the channel's own instructions; edit a shared preset only when asked, since every channel using it changes. To set up a channel without being told how, read enough of it to propose short instructions or a fitting preset (customer, vendor, internal team), and save nothing until they confirm. Never infer a channel's purpose only because Slack marks it externally shared.
|
|
24150
|
-
- **Silent mode** is what people mean by muting you in a channel. A channel in silent mode still reaches you as its level allows, and you follow its instructions anywhere but there. For "watch #alerts and report to #team", an admin turns on \`silent\` for the watched channel, raises it to Balanced or High so untagged messages reach you, and its instructions name where to report. It is separate from a thread mute, which lasts hours and only quiets one thread.
|
|
24151
|
-
- **Linear teams:** set \`monitored: true\` to start triaging a team (admin only) and \`monitored: false\` to stop. Teams take a preset or instructions like channels.
|
|
24152
|
-
- **Slack Connect** channels shared with another company follow the organization's shared-channel defaults (\`tagged\` with no preset unless an admin set them with \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`) until they get their own settings, unless a Mothership is linked to one. A request about all shared or customer channels changes only those defaults: leave channels with their own settings as they are, list them, and offer to switch them too. Asked why you stay quiet in one, say it's external and an admin can ask you to raise its level.
|
|
24153
|
-
- **Slack agent defaults:** to change the agent, model, thinking level, goal mode, or fast mode for tasks started from Slack ("use Codex for Slack tasks"), call \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` (admin only).
|
|
24154
|
-
- **"What can you do?"** Keep it short: one line on what you do (answer questions, start a workspace for a task, hand work to a Mothership, file Linear tickets, set up recurring tasks), two or three example requests in backticks drawn from both work and behavior (like \`fix the flaky login test\`, \`only reply here when tagged\`, \`every Monday, summarize open PRs\`), then "Ask me what you can change here to see every setting." No settings list or current values.
|
|
24155
|
-
- **"What can I change?"** Read the current settings, then reply in a few short lines from **What you can do**: what applies here with its current value (this channel's level, silent mode, instructions or preset), then what applies everywhere (the every-channel level, shared-channel defaults, Linear teams, Slack agent defaults), marking what needs an admin. Give one example phrasing, like "only reply here when tagged".
|
|
24156
|
-
- After any change, say what changed and its scope ("every channel", or "#eng only"). Confirm only after the tool succeeded and only what it changed; say so when it failed or did less than asked.
|
|
24157
|
-
|
|
24158
|
-
## Offers
|
|
24159
|
-
When the envelope has \`offers\`, it lists the offers you may still make in this channel (${SCOUT_CHANNEL_SETTINGS_OFFERS.map((offer) => `\`${offer}\``).join(", ")}); \`offers=none\` means none. Offer only what it lists, at most one per message. Claim the offer with \`${REPLICAS_MCP_TOOLS.claimSettingsOffer}\` right before posting it, and post only when the claim succeeds. When someone declines ("no", "it's fine", "leave it"), record it with \`declined: true\`; never repeat an ignored offer. When they accept, apply it with the tools above using the accepting message as confirmation, then confirm in one short line.
|
|
24160
|
-
- **Frustration.** When someone is clearly annoyed that you replied or acted unasked ("wtf why did replicas respond", "not you", "nobody asked", or a thumbs-down on a reply you posted unasked), claim \`proactivity\` and post one short apology offering to lower this channel exactly one step. From Balanced or High: "Sorry for jumping in. Want me to only reply here when someone mentions me by name?" From Low: "Sorry for jumping in. Want me to only reply here when someone @mentions me?" On a yes, set that level, nothing lower. Do nothing else in that thread. When the claim answers \`offer: organization\`, offer to set every channel's default to \`organization_target\` instead; when \`requester_is_admin\` is false, say an admin can change it for every channel and offer this channel. An explicit "stop replying in this thread" is still a thread mute.
|
|
24161
|
-
- **Having to tag you.** After doing what an earlier untagged message asked, claim \`raise_proactivity\` and end your reply with one line offering one step up. From Mentions only: "Want me to pick up messages here that name me, without an @mention? @mention me with your answer." From Low: "Want me to pick up requests like that here without a tag next time? I can raise this channel to Balanced." From Balanced: "Want me to jump in on requests like that here without being asked? I can raise this channel to High." When the claim answers \`offer: organization\`, offer to raise every channel's default to \`organization_target\` instead, and say channels with their own level keep it. Mention an admin only when the claim answers \`needs_admin: true\`, then offer this channel instead. On a yes, raise to that level only.
|
|
24162
|
-
- **Channel instructions.** When you join a channel or first act in one whose name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), claim \`instructions\` and offer one concrete behavior in one line ("This looks like an incident channel. Want me to triage new reports here, check for duplicates, and post findings in the thread?"). Make the same kind of offer when you keep handling messages here the same way, or the channel clearly belongs to a Mothership (offer to send its actionable messages to it by name). On a yes, save it as the channel's instructions, or its preset when one fits exactly.
|
|
24163
|
-
|
|
24164
|
-
## Automations
|
|
24165
|
-
When someone asks for a recurring task or accepts an offer to automate a repeated request, set it up here instead of spawning. Infer the name, prompt, environment, repositories, schedule, and timezone from the conversation and the organization's configuration; ask one concise follow-up only for a missing detail that changes when or where it runs. Create it with \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling \`confirmation_*\` from the envelope of the message that asked or accepted. The server checks that author is an organization member with automation write access; never create it if that fails. Post the result in the same thread.
|
|
24166
|
-
`;
|
|
24167
|
-
}
|
|
24168
|
-
});
|
|
24169
|
-
|
|
24170
|
-
// ../shared/src/workspace-attention.ts
|
|
24171
|
-
var WORKSPACE_ATTENTION_REASONS, CHAT_ATTENTION_REASONS;
|
|
24172
|
-
var init_workspace_attention = __esm({
|
|
24173
|
-
"../shared/src/workspace-attention.ts"() {
|
|
24174
|
-
"use strict";
|
|
24175
|
-
WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup", "deploy_failed"];
|
|
24176
|
-
CHAT_ATTENTION_REASONS = ["question", "blocked"];
|
|
24177
|
-
}
|
|
24178
|
-
});
|
|
24179
|
-
|
|
24180
|
-
// ../shared/src/routes/push.ts
|
|
24181
|
-
var registerPushDeviceRequestSchema, PUSH_HOLD_MINUTES, chatRefSchema, recordPushActivityRequestSchema, PUSH_NOTIFICATION_KINDS, PUSH_OPTION_LABEL_MAX, PUSH_OPTIONS_MAX, pushQuestionSchema, pushNotificationDataSchema, workspaceSharedPushDataSchema, registerLiveActivityRequestSchema, syncLiveActivitiesRequestSchema, setLiveActivityStartTokenRequestSchema;
|
|
24182
|
-
var init_push = __esm({
|
|
24183
|
-
"../shared/src/routes/push.ts"() {
|
|
24184
|
-
"use strict";
|
|
24185
|
-
init_zod();
|
|
24186
|
-
init_workspace_attention();
|
|
24187
|
-
registerPushDeviceRequestSchema = external_exports.discriminatedUnion("platform", [
|
|
24188
|
-
external_exports.object({
|
|
24189
|
-
platform: external_exports.literal("ios"),
|
|
24190
|
-
token: external_exports.string().regex(/^[0-9a-f]{64,200}$/i),
|
|
24191
|
-
appId: external_exports.string().min(1).max(255),
|
|
24192
|
-
apnsEnvironment: external_exports.enum(["sandbox", "production"])
|
|
24193
|
-
}),
|
|
24194
|
-
external_exports.object({
|
|
24195
|
-
platform: external_exports.literal("android"),
|
|
24196
|
-
token: external_exports.string().min(1).max(4096),
|
|
24197
|
-
appId: external_exports.string().min(1).max(255)
|
|
24198
|
-
})
|
|
24199
|
-
]);
|
|
24200
|
-
PUSH_HOLD_MINUTES = 5;
|
|
24201
|
-
chatRefSchema = external_exports.object({ workspaceId: external_exports.string().uuid(), chatId: external_exports.string().min(1).max(100) });
|
|
24202
|
-
recordPushActivityRequestSchema = external_exports.object({
|
|
24203
|
-
organizationId: external_exports.string().uuid(),
|
|
24204
|
-
/** Seconds since the last keyboard or mouse input on this computer. A phone leaves it out: it only reports what it has open. */
|
|
24205
|
-
idleSeconds: external_exports.number().min(0).optional(),
|
|
24206
|
-
seenWorkspaceIds: external_exports.array(external_exports.string().uuid()).max(20),
|
|
24207
|
-
seenChats: external_exports.array(chatRefSchema).max(20).optional()
|
|
24208
|
-
});
|
|
24209
|
-
PUSH_NOTIFICATION_KINDS = [...WORKSPACE_ATTENTION_REASONS, "finished"];
|
|
24210
|
-
PUSH_OPTION_LABEL_MAX = 60;
|
|
24211
|
-
PUSH_OPTIONS_MAX = 4;
|
|
24212
|
-
pushQuestionSchema = external_exports.object({ id: external_exports.string().max(64), allowCustom: external_exports.boolean().optional(), options: external_exports.array(external_exports.object({ id: external_exports.string().max(64), label: external_exports.string().min(1).max(PUSH_OPTION_LABEL_MAX) })).min(1).max(PUSH_OPTIONS_MAX) });
|
|
24213
|
-
pushNotificationDataSchema = external_exports.object({
|
|
24214
|
-
organizationId: external_exports.string(),
|
|
24215
|
-
workspaceId: external_exports.string(),
|
|
24216
|
-
chatId: external_exports.string().nullable(),
|
|
24217
|
-
kind: external_exports.enum(PUSH_NOTIFICATION_KINDS),
|
|
24218
|
-
completedAt: external_exports.string(),
|
|
24219
|
-
toolRequestId: external_exports.string().optional(),
|
|
24220
|
-
question: pushQuestionSchema.optional()
|
|
24221
|
-
});
|
|
24222
|
-
workspaceSharedPushDataSchema = pushNotificationDataSchema.pick({ organizationId: true, workspaceId: true, chatId: true, completedAt: true }).extend({ kind: external_exports.literal("shared") });
|
|
24223
|
-
registerLiveActivityRequestSchema = chatRefSchema.extend({
|
|
24224
|
-
deviceId: external_exports.string().uuid(),
|
|
24225
|
-
/** The iOS activity's push token. Android leaves it out and gets FCM data messages on the device token. */
|
|
24226
|
-
pushToken: external_exports.string().regex(/^[0-9a-f]{64,400}$/i).optional(),
|
|
24227
|
-
/** iOS only: when the card's turn started, in seconds. Cards keep their order by it. */
|
|
24228
|
-
startedAt: external_exports.number().positive().optional()
|
|
24229
|
-
});
|
|
24230
|
-
syncLiveActivitiesRequestSchema = external_exports.object({
|
|
24231
|
-
activities: external_exports.array(chatRefSchema).max(100)
|
|
24232
|
-
});
|
|
24233
|
-
setLiveActivityStartTokenRequestSchema = external_exports.object({ token: external_exports.string().regex(/^[0-9a-f]{64,400}$/i) });
|
|
24234
|
-
}
|
|
24235
|
-
});
|
|
24236
|
-
|
|
24237
|
-
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
24238
|
-
var SECTION, REFERENCE, COMPUTER_ABILITY;
|
|
24239
|
-
var init_computer = __esm({
|
|
24240
|
-
"../shared/src/default-skills/replicas-agent/abilities/computer.ts"() {
|
|
24241
|
-
"use strict";
|
|
24242
|
-
SECTION = `### Computer use (Linux desktop control)
|
|
24243
|
-
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).
|
|
24244
|
-
|
|
24245
|
-
**Reference:** \`references/COMPUTER-USE.md\`
|
|
24246
|
-
|
|
24247
|
-
Use this when:
|
|
24248
|
-
- A task requires interacting with a website, web app, or desktop application that has no usable API
|
|
24249
|
-
- You want the user to watch the agent work - they can open the \`Desktop\` tab, or you can share the URL from \`replicas computer info\`
|
|
24250
|
-
- You're testing UI changes in a browser before reporting them as done
|
|
24251
|
-
- You want to record a screen capture of a task as proof to share back
|
|
24252
|
-
- You need to open or use an app on the user's Mac: use \`replicas computer mac\`, never \`ssh\` with \`open\` or AppleScript, which can switch the user's view`;
|
|
24253
|
-
REFERENCE = `# Computer use (Linux desktop control)
|
|
24254
|
-
|
|
24255
|
-
Every Replicas workspace boots with a full Linux desktop stack - Xvfb (1920\xD71080), openbox, tint2, PulseAudio, ffmpeg, and Google Chrome. The engine auto-registers the H.264 and Opus viewer (port 6080) as an authenticated preview at startup, so the dashboard \`Desktop\` tab is live the moment the workspace is up. You drive the desktop through the \`replicas computer\` CLI.
|
|
24256
|
-
|
|
24257
|
-
Use this for anything the user can't reasonably do via an API - clicking around web apps, filling forms, testing UI changes, dragging files between desktop apps, recording a walkthrough.
|
|
24258
|
-
|
|
24259
|
-
## When to use it
|
|
24260
|
-
|
|
24261
|
-
- **Prefer real APIs first.** If a task has a CLI or HTTP API (GitHub, Linear, Slack, Replicas itself), use that. Driving a UI is slower, flakier, and less auditable.
|
|
24262
|
-
- **Use it when there's no API**: testing a frontend you just changed, navigating a vendor portal, demonstrating a flow on video.
|
|
24263
|
-
- **Use it when the user wants to watch.** The dashboard already shows a \`Desktop\` tab. If you're talking to the user somewhere else (e.g. Slack), call \`replicas computer info\` to get the viewer URL and paste it in.
|
|
24264
|
-
|
|
24265
|
-
## Never use raw \`xdotool\` / \`scrot\` / \`ffmpeg\` directly
|
|
24266
|
-
|
|
24267
|
-
The CLI is the canonical surface. Chat transcripts that show \`DISPLAY=:99 xdotool key Return\` are noisy and break when the underlying stack changes. Always call the CLI:
|
|
23524
|
+
The CLI is the canonical surface. Chat transcripts that show \`DISPLAY=:99 xdotool key Return\` are noisy and break when the underlying stack changes. Always call the CLI:
|
|
24268
23525
|
|
|
24269
23526
|
\`\`\`bash
|
|
24270
23527
|
# DO
|
|
@@ -26014,7 +25271,7 @@ It is your responsibility to make previews work for outsiders as well as they wo
|
|
|
26014
25271
|
|
|
26015
25272
|
// ../shared/src/default-skills/replicas-agent/abilities/plugins.ts
|
|
26016
25273
|
var SECTION12, REFERENCE12, PLUGINS_ABILITY;
|
|
26017
|
-
var
|
|
25274
|
+
var init_plugins = __esm({
|
|
26018
25275
|
"../shared/src/default-skills/replicas-agent/abilities/plugins.ts"() {
|
|
26019
25276
|
"use strict";
|
|
26020
25277
|
SECTION12 = `### Plugins
|
|
@@ -26813,386 +26070,1150 @@ curl -sS --fail-with-body -X POST "\${REPLICAS_MONOLITH_URL:-$MONOLITH_URL}/v1/e
|
|
|
26813
26070
|
}
|
|
26814
26071
|
});
|
|
26815
26072
|
|
|
26816
|
-
// ../shared/src/visuals.ts
|
|
26817
|
-
function visualTheme(mode, fontUrl, theme = DEFAULT_THEME) {
|
|
26818
|
-
const colors = designColors({ ...theme, mode });
|
|
26819
|
-
return {
|
|
26820
|
-
appearance: mode,
|
|
26821
|
-
variables: {
|
|
26822
|
-
"--background": colors.background,
|
|
26823
|
-
"--foreground": colors.foreground,
|
|
26824
|
-
"--muted": colors.muted,
|
|
26825
|
-
"--muted-foreground": colors.mutedForeground,
|
|
26826
|
-
"--accent": colors.selected,
|
|
26827
|
-
"--primary": colors.primary,
|
|
26828
|
-
"--primary-foreground": colors.primaryForeground,
|
|
26829
|
-
"--success": colors.success,
|
|
26830
|
-
"--border": colors.border,
|
|
26831
|
-
"--ring": colors.primary,
|
|
26832
|
-
"--destructive": colors.destructive,
|
|
26833
|
-
"--warning": colors.warning,
|
|
26834
|
-
"--code-background": colors.background,
|
|
26835
|
-
"--code-foreground": colors.foreground,
|
|
26836
|
-
...Object.fromEntries(SERIES.map((color, index) => [`--chart-${index + 1}`, colors[color]])),
|
|
26837
|
-
"--radius": "6px",
|
|
26838
|
-
"--font-sans": FONT_SANS,
|
|
26839
|
-
"--font-mono": FONT_MONO
|
|
26840
|
-
},
|
|
26841
|
-
...fontUrl ? { fontUrl } : {}
|
|
26842
|
-
};
|
|
26843
|
-
}
|
|
26844
|
-
function visualThemeFragment(theme) {
|
|
26845
|
-
return `#${THEME_FRAGMENT_KEY}=${encodeURIComponent(JSON.stringify(theme))}`;
|
|
26846
|
-
}
|
|
26847
|
-
function clampVisualHeight(height) {
|
|
26848
|
-
return Math.min(VISUAL_MAX_HEIGHT, Math.max(VISUAL_MIN_HEIGHT, Math.round(height)));
|
|
26849
|
-
}
|
|
26850
|
-
function rootRule(theme) {
|
|
26851
|
-
const declarations = Object.entries(theme.variables).map(([name, value]) => `${name}:${value};`).join("");
|
|
26852
|
-
return `:root{color-scheme:${theme.appearance};${declarations}}`;
|
|
26853
|
-
}
|
|
26854
|
-
function bootstrapMarkup(scan) {
|
|
26855
|
-
const css = `${rootRule(visualTheme("dark"))}@media (prefers-color-scheme: light){${rootRule(visualTheme("light"))}}${BASE_CSS}`;
|
|
26856
|
-
return [
|
|
26857
|
-
/<meta\s[^>]*charset/i.test(scan.slice(0, 4096)) ? "" : '<meta charset="utf-8">',
|
|
26858
|
-
/<meta\s[^>]*name\s*=\s*["']?viewport/i.test(scan) ? "" : '<meta name="viewport" content="width=device-width, initial-scale=1">',
|
|
26859
|
-
`<style id="${THEME_STYLE_ID}">${css}</style>`,
|
|
26860
|
-
`<script>${BOOTSTRAP_SCRIPT}</script>`
|
|
26861
|
-
].join("");
|
|
26862
|
-
}
|
|
26863
|
-
function injectVisualBootstrap(html) {
|
|
26864
|
-
const scan = blankNonMarkup(html);
|
|
26865
|
-
const markup = bootstrapMarkup(scan);
|
|
26866
|
-
const doctype = /^\s*<!doctype[^>]*>/i.exec(scan);
|
|
26867
|
-
const prefix = doctype ? "" : "<!doctype html>";
|
|
26868
|
-
const headOpen = /<head(?:\s[^>]*)?>/i.exec(scan);
|
|
26869
|
-
if (headOpen) {
|
|
26870
|
-
const at2 = headOpen.index + headOpen[0].length;
|
|
26871
|
-
return `${prefix}${html.slice(0, at2)}${markup}${html.slice(at2)}`;
|
|
26872
|
-
}
|
|
26873
|
-
const htmlOpen = /<html(?:\s[^>]*)?>/i.exec(scan);
|
|
26874
|
-
const at = htmlOpen ? htmlOpen.index + htmlOpen[0].length : doctype ? doctype[0].length : 0;
|
|
26875
|
-
return `${prefix}${html.slice(0, at)}<head>${markup}</head>${html.slice(at)}`;
|
|
26073
|
+
// ../shared/src/visuals.ts
|
|
26074
|
+
function visualTheme(mode, fontUrl, theme = DEFAULT_THEME) {
|
|
26075
|
+
const colors = designColors({ ...theme, mode });
|
|
26076
|
+
return {
|
|
26077
|
+
appearance: mode,
|
|
26078
|
+
variables: {
|
|
26079
|
+
"--background": colors.background,
|
|
26080
|
+
"--foreground": colors.foreground,
|
|
26081
|
+
"--muted": colors.muted,
|
|
26082
|
+
"--muted-foreground": colors.mutedForeground,
|
|
26083
|
+
"--accent": colors.selected,
|
|
26084
|
+
"--primary": colors.primary,
|
|
26085
|
+
"--primary-foreground": colors.primaryForeground,
|
|
26086
|
+
"--success": colors.success,
|
|
26087
|
+
"--border": colors.border,
|
|
26088
|
+
"--ring": colors.primary,
|
|
26089
|
+
"--destructive": colors.destructive,
|
|
26090
|
+
"--warning": colors.warning,
|
|
26091
|
+
"--code-background": colors.background,
|
|
26092
|
+
"--code-foreground": colors.foreground,
|
|
26093
|
+
...Object.fromEntries(SERIES.map((color, index) => [`--chart-${index + 1}`, colors[color]])),
|
|
26094
|
+
"--radius": "6px",
|
|
26095
|
+
"--font-sans": FONT_SANS,
|
|
26096
|
+
"--font-mono": FONT_MONO
|
|
26097
|
+
},
|
|
26098
|
+
...fontUrl ? { fontUrl } : {}
|
|
26099
|
+
};
|
|
26100
|
+
}
|
|
26101
|
+
function visualThemeFragment(theme) {
|
|
26102
|
+
return `#${THEME_FRAGMENT_KEY}=${encodeURIComponent(JSON.stringify(theme))}`;
|
|
26103
|
+
}
|
|
26104
|
+
function clampVisualHeight(height) {
|
|
26105
|
+
return Math.min(VISUAL_MAX_HEIGHT, Math.max(VISUAL_MIN_HEIGHT, Math.round(height)));
|
|
26106
|
+
}
|
|
26107
|
+
function rootRule(theme) {
|
|
26108
|
+
const declarations = Object.entries(theme.variables).map(([name, value]) => `${name}:${value};`).join("");
|
|
26109
|
+
return `:root{color-scheme:${theme.appearance};${declarations}}`;
|
|
26110
|
+
}
|
|
26111
|
+
function bootstrapMarkup(scan) {
|
|
26112
|
+
const css = `${rootRule(visualTheme("dark"))}@media (prefers-color-scheme: light){${rootRule(visualTheme("light"))}}${BASE_CSS}`;
|
|
26113
|
+
return [
|
|
26114
|
+
/<meta\s[^>]*charset/i.test(scan.slice(0, 4096)) ? "" : '<meta charset="utf-8">',
|
|
26115
|
+
/<meta\s[^>]*name\s*=\s*["']?viewport/i.test(scan) ? "" : '<meta name="viewport" content="width=device-width, initial-scale=1">',
|
|
26116
|
+
`<style id="${THEME_STYLE_ID}">${css}</style>`,
|
|
26117
|
+
`<script>${BOOTSTRAP_SCRIPT}</script>`
|
|
26118
|
+
].join("");
|
|
26119
|
+
}
|
|
26120
|
+
function injectVisualBootstrap(html) {
|
|
26121
|
+
const scan = blankNonMarkup(html);
|
|
26122
|
+
const markup = bootstrapMarkup(scan);
|
|
26123
|
+
const doctype = /^\s*<!doctype[^>]*>/i.exec(scan);
|
|
26124
|
+
const prefix = doctype ? "" : "<!doctype html>";
|
|
26125
|
+
const headOpen = /<head(?:\s[^>]*)?>/i.exec(scan);
|
|
26126
|
+
if (headOpen) {
|
|
26127
|
+
const at2 = headOpen.index + headOpen[0].length;
|
|
26128
|
+
return `${prefix}${html.slice(0, at2)}${markup}${html.slice(at2)}`;
|
|
26129
|
+
}
|
|
26130
|
+
const htmlOpen = /<html(?:\s[^>]*)?>/i.exec(scan);
|
|
26131
|
+
const at = htmlOpen ? htmlOpen.index + htmlOpen[0].length : doctype ? doctype[0].length : 0;
|
|
26132
|
+
return `${prefix}${html.slice(0, at)}<head>${markup}</head>${html.slice(at)}`;
|
|
26133
|
+
}
|
|
26134
|
+
var VISUAL_MEASURE_WIDTHS, VISUAL_COLUMN_WIDTH, VISUAL_PHONE_WIDTH, VISUAL_MIN_HEIGHT, VISUAL_MAX_HEIGHT, VISUAL_FONT_PATH, FONT_FAMILIES, FONT_SANS, FONT_MONO, VISUAL_PAGE_RULES, THEME_FRAGMENT_KEY, HOST_CONTEXT_CHANGED_METHOD, SIZE_CHANGED_METHOD, OPEN_LINK_METHOD, OPEN_IMAGE_METHOD, VISUAL_CONTENT_HEIGHT_EXPRESSION, BASE_CSS, THEME_STYLE_ID, BOOTSTRAP_SCRIPT, blankNonMarkup;
|
|
26135
|
+
var init_visuals = __esm({
|
|
26136
|
+
"../shared/src/visuals.ts"() {
|
|
26137
|
+
"use strict";
|
|
26138
|
+
init_design_tokens();
|
|
26139
|
+
init_type_guards();
|
|
26140
|
+
VISUAL_MEASURE_WIDTHS = [320, 375, 430, 520, 640, 760, 880, 952];
|
|
26141
|
+
VISUAL_COLUMN_WIDTH = 760;
|
|
26142
|
+
VISUAL_PHONE_WIDTH = 390;
|
|
26143
|
+
VISUAL_MIN_HEIGHT = 24;
|
|
26144
|
+
VISUAL_MAX_HEIGHT = 2e4;
|
|
26145
|
+
VISUAL_FONT_PATH = "/fonts/InterVariable.woff2";
|
|
26146
|
+
FONT_FAMILIES = ["Inter", "General Sans"];
|
|
26147
|
+
FONT_SANS = `${FONT_FAMILIES.map((family) => `"${family}"`).join(", ")}, system-ui, -apple-system, "Segoe UI", sans-serif`;
|
|
26148
|
+
FONT_MONO = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace';
|
|
26149
|
+
VISUAL_PAGE_RULES = `- Write one self-contained HTML file with inline <style> and <script>; a fragment without <html> or <head> is fine. Put data inline instead of fetching it. Libraries may load from public CDNs such as cdn.jsdelivr.net. Local images written as absolute paths (src="/abs/shot.png", url(/abs/bg.webp)) are inlined when you publish.
|
|
26150
|
+
- The page sits directly on the chat background, as wide as your reply (about ${VISUAL_COLUMN_WIDTH}px on desktop, ${VISUAL_PHONE_WIDTH - 30}px on phones), with its left edge aligned to your text. Leave html and body transparent, use a fluid width with no outer padding, and add no outer card, border, or title banner: the page is part of your reply.
|
|
26151
|
+
- Let content set the height. Never use 100vh, height:100%, or min-height:100vh on html, body, or the outer element; publishing refuses a page whose height follows the frame. Give charts fixed pixel heights.
|
|
26152
|
+
- Color everything with the theme variables so the page follows light and dark mode live: --foreground, --muted-foreground (secondary text), --background, --muted (subtle fills), --accent, --border, --primary and --primary-foreground (the brand accent, for emphasis), --success (passed, done, or added), --destructive, --warning, --code-background, --code-foreground, and --chart-1 to --chart-8 for series (use them in order and label series directly). Never hardcode a light or dark palette. A canvas or chart library that needs literal colors can read them with getComputedStyle(document.documentElement) and redraw on matchMedia("(prefers-color-scheme: dark)") changes.
|
|
26153
|
+
- Text is 13px Inter, like the chat; --font-sans and --font-mono are set. Keep Replicas' flat look: separate sections with 1px var(--border) lines or var(--muted) fills, without shadows or rounded cards. Use var(--radius) only on small controls.
|
|
26154
|
+
- A mockup of a specific product's UI, such as a client's app or a competitor's screen, is the exception: give it its own panel with at least 16px of padding and use that product's real colors, fonts, corners, and shadows inside it, so it looks like the product. Everything around the panel follows the rules above.
|
|
26155
|
+
- Interaction is welcome: hover details, tabs, toggles, sliders. Links open in a new browser tab.
|
|
26156
|
+
- Keep the top-right corner (about 110\xD740px) free of anything essential: the chat shows the visual's actions there on hover.`;
|
|
26157
|
+
THEME_FRAGMENT_KEY = "replicas-theme";
|
|
26158
|
+
HOST_CONTEXT_CHANGED_METHOD = "ui/notifications/host-context-changed";
|
|
26159
|
+
SIZE_CHANGED_METHOD = "ui/notifications/size-changed";
|
|
26160
|
+
OPEN_LINK_METHOD = "ui/open-link";
|
|
26161
|
+
OPEN_IMAGE_METHOD = "replicas/open-image";
|
|
26162
|
+
VISUAL_CONTENT_HEIGHT_EXPRESSION = "(function(){var r=document.documentElement;return Math.ceil(r.scrollHeight>r.clientHeight?r.scrollHeight:r.getBoundingClientRect().height)})()";
|
|
26163
|
+
BASE_CSS = "html{color:var(--foreground);font-family:var(--font-sans);font-size:13px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;scrollbar-width:none}html::-webkit-scrollbar{display:none}body{margin:0}:where(*,*::before,*::after){box-sizing:border-box}code,kbd,pre,samp{font-family:var(--font-mono)}:where(:focus-visible){outline:2px solid var(--ring);outline-offset:-2px}";
|
|
26164
|
+
THEME_STYLE_ID = "replicas-visual-theme";
|
|
26165
|
+
BOOTSTRAP_SCRIPT = `
|
|
26166
|
+
(() => {
|
|
26167
|
+
const style = document.getElementById('${THEME_STYLE_ID}');
|
|
26168
|
+
const nativeView = window.ReactNativeWebView;
|
|
26169
|
+
const framed = window.parent !== window;
|
|
26170
|
+
const post = (message) => nativeView ? nativeView.postMessage(JSON.stringify(message)) : window.parent.postMessage(message, '*');
|
|
26171
|
+
const applyTheme = (theme) => {
|
|
26172
|
+
const variables = Object.entries(theme.variables).map(([name, value]) => name + ':' + value + ';').join('');
|
|
26173
|
+
const font = theme.fontUrl ? ${JSON.stringify(FONT_FAMILIES)}.map((family) => '@font-face{font-family:"' + family + '";src:url("' + theme.fontUrl + '") format("woff2");font-weight:100 900;font-display:swap}').join('') : '';
|
|
26174
|
+
style.textContent = ':root{color-scheme:' + theme.appearance + ';' + variables + '}' + font + ${JSON.stringify(BASE_CSS)};
|
|
26175
|
+
};
|
|
26176
|
+
try {
|
|
26177
|
+
const fragment = /[#&]${THEME_FRAGMENT_KEY}=([^&]*)/.exec(location.hash);
|
|
26178
|
+
if (fragment) {
|
|
26179
|
+
applyTheme(JSON.parse(decodeURIComponent(fragment[1])));
|
|
26180
|
+
history.replaceState(history.state, '', location.pathname + location.search);
|
|
26181
|
+
}
|
|
26182
|
+
} catch {}
|
|
26183
|
+
if (!nativeView) {
|
|
26184
|
+
document.addEventListener('click', (event) => {
|
|
26185
|
+
const anchor = event.isTrusted && event.composedPath().find((target) => target instanceof Element && target.matches('a[href]'));
|
|
26186
|
+
if (!anchor) return;
|
|
26187
|
+
const url = new URL(anchor.getAttribute('href'), document.baseURI);
|
|
26188
|
+
if (!/^https?:$/.test(url.protocol) || url.href.split('#')[0] === location.href.split('#')[0]) return;
|
|
26189
|
+
if (framed) {
|
|
26190
|
+
event.preventDefault();
|
|
26191
|
+
post({ jsonrpc: '2.0', method: '${OPEN_LINK_METHOD}', params: { url: url.href } });
|
|
26192
|
+
} else {
|
|
26193
|
+
anchor.setAttribute('target', '_blank');
|
|
26194
|
+
anchor.setAttribute('rel', 'noopener');
|
|
26195
|
+
}
|
|
26196
|
+
}, true);
|
|
26197
|
+
}
|
|
26198
|
+
if (!framed && !nativeView) return;
|
|
26199
|
+
window.addEventListener('click', (event) => {
|
|
26200
|
+
const image = event.composedPath()[0];
|
|
26201
|
+
if (!event.isTrusted || event.defaultPrevented || !(image instanceof HTMLImageElement) || image.closest('a[href], button')) return;
|
|
26202
|
+
let src = image.currentSrc || image.src;
|
|
26203
|
+
if (/^blob:/i.test(src) || (nativeView && /^data:image\\/svg|\\.svg(?:[?#]|$)/i.test(src))) {
|
|
26204
|
+
try {
|
|
26205
|
+
const canvas = document.createElement('canvas');
|
|
26206
|
+
canvas.width = (image.naturalWidth || image.width) * 2;
|
|
26207
|
+
canvas.height = (image.naturalHeight || image.height) * 2;
|
|
26208
|
+
canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
26209
|
+
src = canvas.toDataURL('image/png');
|
|
26210
|
+
} catch {
|
|
26211
|
+
return;
|
|
26212
|
+
}
|
|
26213
|
+
}
|
|
26214
|
+
if (src) post({ jsonrpc: '2.0', method: '${OPEN_IMAGE_METHOD}', params: { src, name: image.alt } });
|
|
26215
|
+
});
|
|
26216
|
+
let reportedHeight;
|
|
26217
|
+
const reportHeight = () => {
|
|
26218
|
+
const height = ${VISUAL_CONTENT_HEIGHT_EXPRESSION};
|
|
26219
|
+
if (height === reportedHeight) return;
|
|
26220
|
+
reportedHeight = height;
|
|
26221
|
+
post({ jsonrpc: '2.0', method: '${SIZE_CHANGED_METHOD}', params: { height } });
|
|
26222
|
+
};
|
|
26223
|
+
window.addEventListener('message', (event) => {
|
|
26224
|
+
if (event.source !== window.parent || event.data?.method !== '${HOST_CONTEXT_CHANGED_METHOD}') return;
|
|
26225
|
+
const { theme, styles, fontUrl } = event.data.params;
|
|
26226
|
+
applyTheme({ appearance: theme, variables: styles.variables, fontUrl });
|
|
26227
|
+
reportedHeight = undefined;
|
|
26228
|
+
if (document.readyState !== 'loading') reportHeight();
|
|
26229
|
+
});
|
|
26230
|
+
const resizeObserver = new ResizeObserver(reportHeight);
|
|
26231
|
+
resizeObserver.observe(document.documentElement);
|
|
26232
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
26233
|
+
resizeObserver.observe(document.body);
|
|
26234
|
+
reportHeight();
|
|
26235
|
+
});
|
|
26236
|
+
window.addEventListener('load', reportHeight);
|
|
26237
|
+
})();
|
|
26238
|
+
`.trim().replace(/\s*\n\s*/g, " ");
|
|
26239
|
+
blankNonMarkup = (html) => html.replace(
|
|
26240
|
+
/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|xmp|iframe|noembed|noframes|noscript|template)\b[\s\S]*?(?:<\/\1\s*>|$)/gi,
|
|
26241
|
+
(match) => " ".repeat(match.length)
|
|
26242
|
+
);
|
|
26243
|
+
}
|
|
26244
|
+
});
|
|
26245
|
+
|
|
26246
|
+
// ../shared/src/default-skills/replicas-agent/abilities/visuals.ts
|
|
26247
|
+
var SECTION17, REFERENCE17, VISUALS_ABILITY;
|
|
26248
|
+
var init_visuals2 = __esm({
|
|
26249
|
+
"../shared/src/default-skills/replicas-agent/abilities/visuals.ts"() {
|
|
26250
|
+
"use strict";
|
|
26251
|
+
init_visuals();
|
|
26252
|
+
SECTION17 = `### Visuals
|
|
26253
|
+
Show a chart, diagram, comparison, timeline, or mockup inline in your Replicas chat reply, in the chat's own font and colors.
|
|
26254
|
+
|
|
26255
|
+
**Reference:** \`references/VISUALS.md\`
|
|
26256
|
+
|
|
26257
|
+
Use this when:
|
|
26258
|
+
- Seeing it would explain faster than reading it: numbers over time, a flow or architecture, a before and after, options side by side
|
|
26259
|
+
- The user asks to see, chart, plot, compare, or visualize something`;
|
|
26260
|
+
REFERENCE17 = `# Visuals
|
|
26261
|
+
|
|
26262
|
+
A visual is a self-contained HTML page shown inline in your Replicas chat reply. It sits on the chat background in the chat's font and colors, grows to fit its content, and follows the user's light or dark theme live.
|
|
26263
|
+
|
|
26264
|
+
## When to make one
|
|
26265
|
+
|
|
26266
|
+
Make one when seeing beats reading: how parts of a system connect, how a request or data flows, numbers or options compared, a timeline, a before and after, or a UI mockup. Make one when the user asks to see, chart, compare, sketch, or visualize something. Never draw these as ASCII art or text diagrams.
|
|
26267
|
+
|
|
26268
|
+
Don't make one when:
|
|
26269
|
+
- A short answer or list covers it.
|
|
26270
|
+
- It is a plain table: write a Markdown table.
|
|
26271
|
+
- It is screenshots, or a before and after of them: upload them as images, which readers can open full screen and zoom. See "Before and after" in \`references/MEDIA.md\`.
|
|
26272
|
+
- The user wants a page, site, or component in their project: build that in the repo.
|
|
26273
|
+
|
|
26274
|
+
A long report or write-up goes in the Canvas, and its key charts and comparisons go in a visual in your reply. Never screenshot a report, chart, or diagram you made to show it: a long page shrunk to an image can't be read, and it ignores the reader's theme. Screenshots of app UI you changed are still right.
|
|
26275
|
+
|
|
26276
|
+
## Make it
|
|
26277
|
+
|
|
26278
|
+
1. Write the page, for example \`/tmp/visuals/<name>.html\`, following the page rules below.
|
|
26279
|
+
2. Run \`replicas visualize <page.html> --title "<short title>"\`. It checks the page in a headless browser, publishes it, and prints two screenshots (dark at desktop width, light at phone width) with any console errors and layout warnings.
|
|
26280
|
+
3. Open both screenshots and look. If anything is wrong, fix the page and publish again, then use the newest line. While iterating, \`replicas visualize <page.html> --check\` renders without publishing.
|
|
26281
|
+
4. Paste the printed \`\` line on its own line where the visual belongs in your final reply.
|
|
26282
|
+
|
|
26283
|
+
## Page rules
|
|
26284
|
+
|
|
26285
|
+
${VISUAL_PAGE_RULES}
|
|
26286
|
+
|
|
26287
|
+
## In your reply
|
|
26288
|
+
|
|
26289
|
+
- The user sees the visual itself. Don't introduce it ("Here's a chart", "Here's the diagram"), say where it is, or restate its data. Add only what it doesn't say, such as the takeaway or a caveat.
|
|
26290
|
+
- Paste the line in your final reply, not in a progress update. To change a visual, edit the page, publish it again, and paste the new line.
|
|
26291
|
+
- The line only renders in Replicas chat. When you post to pull requests, Slack, Linear, or anywhere else, link the printed Forge link instead. Leave the Forge link out of your chat reply.
|
|
26292
|
+
`;
|
|
26293
|
+
VISUALS_ABILITY = {
|
|
26294
|
+
label: "Visuals",
|
|
26295
|
+
description: "Show charts, diagrams, comparisons, and mockups inline in chat replies.",
|
|
26296
|
+
// The visuals_instructions system prompt block is its trigger.
|
|
26297
|
+
bullet: "",
|
|
26298
|
+
section: SECTION17,
|
|
26299
|
+
referenceFile: { name: "VISUALS.md", content: REFERENCE17 }
|
|
26300
|
+
};
|
|
26301
|
+
}
|
|
26302
|
+
});
|
|
26303
|
+
|
|
26304
|
+
// ../shared/src/default-skills/replicas-agent/registry.ts
|
|
26305
|
+
var REPLICAS_AGENT_ABILITY_REGISTRY, REPLICAS_AGENT_ABILITIES;
|
|
26306
|
+
var init_registry = __esm({
|
|
26307
|
+
"../shared/src/default-skills/replicas-agent/registry.ts"() {
|
|
26308
|
+
"use strict";
|
|
26309
|
+
init_computer();
|
|
26310
|
+
init_docker();
|
|
26311
|
+
init_environment_setup();
|
|
26312
|
+
init_github2();
|
|
26313
|
+
init_gitlab();
|
|
26314
|
+
init_gpu();
|
|
26315
|
+
init_linear3();
|
|
26316
|
+
init_local_computer();
|
|
26317
|
+
init_macos();
|
|
26318
|
+
init_media();
|
|
26319
|
+
init_previews();
|
|
26320
|
+
init_plugins();
|
|
26321
|
+
init_replicas();
|
|
26322
|
+
init_sentry();
|
|
26323
|
+
init_session_history();
|
|
26324
|
+
init_slack();
|
|
26325
|
+
init_visuals2();
|
|
26326
|
+
REPLICAS_AGENT_ABILITY_REGISTRY = {
|
|
26327
|
+
replicas: REPLICAS_ABILITY,
|
|
26328
|
+
memory: SESSION_HISTORY_ABILITY,
|
|
26329
|
+
computer: COMPUTER_ABILITY,
|
|
26330
|
+
docker: DOCKER_ABILITY,
|
|
26331
|
+
environment_setup: ENVIRONMENT_SETUP_ABILITY,
|
|
26332
|
+
github: GITHUB_ABILITY,
|
|
26333
|
+
gitlab: GITLAB_ABILITY,
|
|
26334
|
+
gpu: GPU_ABILITY,
|
|
26335
|
+
linear: LINEAR_ABILITY,
|
|
26336
|
+
local_computer: LOCAL_COMPUTER_ABILITY,
|
|
26337
|
+
macos: MACOS_ABILITY,
|
|
26338
|
+
media: MEDIA_ABILITY,
|
|
26339
|
+
plugins: PLUGINS_ABILITY,
|
|
26340
|
+
previews: PREVIEWS_ABILITY,
|
|
26341
|
+
sentry: SENTRY_ABILITY,
|
|
26342
|
+
slack: SLACK_ABILITY,
|
|
26343
|
+
visuals: VISUALS_ABILITY
|
|
26344
|
+
};
|
|
26345
|
+
REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
26346
|
+
REPLICAS_AGENT_ABILITY_REGISTRY
|
|
26347
|
+
);
|
|
26348
|
+
}
|
|
26349
|
+
});
|
|
26350
|
+
|
|
26351
|
+
// ../shared/src/routes/preferences.ts
|
|
26352
|
+
function defaultReplicasAgentAbilities() {
|
|
26353
|
+
const abilities = {};
|
|
26354
|
+
for (const key of REPLICAS_AGENT_ABILITIES) {
|
|
26355
|
+
abilities[key] = true;
|
|
26356
|
+
}
|
|
26357
|
+
if (hasAllReplicasAgentAbilities(abilities)) return abilities;
|
|
26358
|
+
throw new Error("Default Replicas agent ability flags are incomplete");
|
|
26359
|
+
}
|
|
26360
|
+
function hasAllReplicasAgentAbilities(abilities) {
|
|
26361
|
+
return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
|
|
26362
|
+
}
|
|
26363
|
+
var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, WALLPAPER_DITHERS, WALLPAPER_EFFECTS, PUSH_WHEN_ACTIVE_COPY, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS, defaultSkillsOverridesSchema, LINEAR_ROUTING_SKILL_MAX_LENGTH, linearRoutingSkillSchema;
|
|
26364
|
+
var init_preferences = __esm({
|
|
26365
|
+
"../shared/src/routes/preferences.ts"() {
|
|
26366
|
+
"use strict";
|
|
26367
|
+
init_zod();
|
|
26368
|
+
init_uuid();
|
|
26369
|
+
init_agent();
|
|
26370
|
+
init_push();
|
|
26371
|
+
init_registry();
|
|
26372
|
+
EMPTY_AGENT_DEFAULT_SETTINGS = {
|
|
26373
|
+
agent_provider: null,
|
|
26374
|
+
model: null,
|
|
26375
|
+
thinking_level: null,
|
|
26376
|
+
goal_mode: null,
|
|
26377
|
+
fast_mode: null
|
|
26378
|
+
};
|
|
26379
|
+
DEFAULT_SUBAGENT_MCP_PROVIDERS = [...ENGINE_AGENT_PROVIDERS];
|
|
26380
|
+
ALERT_SOUND_FAMILIES = {
|
|
26381
|
+
glass: ["glint", "tap", "ripple", "halo"],
|
|
26382
|
+
wood: ["ready", "pluck", "knock", "bloom", "steps"]
|
|
26383
|
+
};
|
|
26384
|
+
ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
|
|
26385
|
+
WALLPAPER_DITHERS = ["dither", "halftone", "modulation"];
|
|
26386
|
+
WALLPAPER_EFFECTS = ["soft", "grain", "duotone", ...WALLPAPER_DITHERS, "none"];
|
|
26387
|
+
PUSH_WHEN_ACTIVE_COPY = {
|
|
26388
|
+
wait: `Wait ${PUSH_HOLD_MINUTES} minutes`,
|
|
26389
|
+
skip: "Don\u2019t send",
|
|
26390
|
+
send: "Send right away"
|
|
26391
|
+
};
|
|
26392
|
+
DEFAULT_USER_PREFERENCES = {
|
|
26393
|
+
default_agent: null,
|
|
26394
|
+
default_model: null,
|
|
26395
|
+
claude_models: null,
|
|
26396
|
+
codex_models: null,
|
|
26397
|
+
cursor_models: null,
|
|
26398
|
+
claude_hidden_models: null,
|
|
26399
|
+
codex_hidden_models: null,
|
|
26400
|
+
cursor_hidden_models: null,
|
|
26401
|
+
openrouter_models: null,
|
|
26402
|
+
opencode_go_models: null,
|
|
26403
|
+
close_workspace_on_pr_close: false,
|
|
26404
|
+
close_workspace_on_pr_merge: false,
|
|
26405
|
+
default_environment_id: null,
|
|
26406
|
+
respond_to_ci_workflows: true,
|
|
26407
|
+
respond_to_ci_checks: true,
|
|
26408
|
+
respond_to_human_pr_reviews: false,
|
|
26409
|
+
pr_user_attribution: false,
|
|
26410
|
+
github_commit_name: null,
|
|
26411
|
+
github_commit_email: null,
|
|
26412
|
+
auto_draft_prs: false,
|
|
26413
|
+
open_prs_in_graphite: false,
|
|
26414
|
+
open_links_in_desktop_app: false,
|
|
26415
|
+
local_control: false,
|
|
26416
|
+
spotify_controls: false,
|
|
26417
|
+
appshot_shortcut: "command",
|
|
26418
|
+
appshot_destination: "automatic",
|
|
26419
|
+
appshot_sound: true,
|
|
26420
|
+
keyboard_shortcuts: {},
|
|
26421
|
+
mothership_tour_seen: false,
|
|
26422
|
+
slack_settings_moved_notice: false,
|
|
26423
|
+
mothership_board_opened: false,
|
|
26424
|
+
follow_up_mode: "steer",
|
|
26425
|
+
send_key: "enter",
|
|
26426
|
+
memory_enabled: null,
|
|
26427
|
+
subagent_mcp_enabled: null,
|
|
26428
|
+
default_fast_mode: false,
|
|
26429
|
+
auto_compact_tokens: null,
|
|
26430
|
+
agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
|
|
26431
|
+
fallback_chains: null,
|
|
26432
|
+
alert_sound: null,
|
|
26433
|
+
workspace_alerts: {},
|
|
26434
|
+
automation_alerts: {},
|
|
26435
|
+
push_types: { needs_you: true, finished: true, automations: true, usage_limit: true },
|
|
26436
|
+
push_when_active: "wait",
|
|
26437
|
+
chat_text_size: "default",
|
|
26438
|
+
app_font: "inter",
|
|
26439
|
+
code_font: "geist-mono",
|
|
26440
|
+
wallpaper: null
|
|
26441
|
+
};
|
|
26442
|
+
DEFAULT_DEFAULT_SKILLS = {
|
|
26443
|
+
replicas_agent: {
|
|
26444
|
+
enabled: true,
|
|
26445
|
+
abilities: defaultReplicasAgentAbilities()
|
|
26446
|
+
}
|
|
26447
|
+
};
|
|
26448
|
+
defaultSkillsOverridesSchema = external_exports.strictObject({
|
|
26449
|
+
replicas_agent: external_exports.strictObject({
|
|
26450
|
+
enabled: external_exports.boolean().optional(),
|
|
26451
|
+
abilities: external_exports.partialRecord(external_exports.enum(REPLICAS_AGENT_ABILITIES), external_exports.boolean()).optional()
|
|
26452
|
+
}).optional()
|
|
26453
|
+
});
|
|
26454
|
+
LINEAR_ROUTING_SKILL_MAX_LENGTH = 5e4;
|
|
26455
|
+
linearRoutingSkillSchema = external_exports.union([
|
|
26456
|
+
external_exports.object({ name: external_exports.string().min(1), content: external_exports.string().trim().min(1).max(LINEAR_ROUTING_SKILL_MAX_LENGTH) }),
|
|
26457
|
+
external_exports.object({ name: external_exports.string().min(1), repository_id: external_exports.string().regex(UUID_RE), path: external_exports.string().min(1) })
|
|
26458
|
+
]);
|
|
26459
|
+
}
|
|
26460
|
+
});
|
|
26461
|
+
|
|
26462
|
+
// ../shared/src/environment-files.ts
|
|
26463
|
+
function validateEnvironmentFilePath(path11) {
|
|
26464
|
+
const trimmedPath = path11.trim();
|
|
26465
|
+
if (!trimmedPath) {
|
|
26466
|
+
return "Path is required.";
|
|
26467
|
+
}
|
|
26468
|
+
if (!trimmedPath.startsWith(HOME_PREFIX)) {
|
|
26469
|
+
return `Path must start with the home-directory prefix ~/ . ${ENVIRONMENT_FILE_PATH_GUIDANCE}`.replace("~/ .", "~/");
|
|
26470
|
+
}
|
|
26471
|
+
if (trimmedPath === HOME_PREFIX) {
|
|
26472
|
+
return "Path must include a file name after ~/.";
|
|
26473
|
+
}
|
|
26474
|
+
return null;
|
|
26475
|
+
}
|
|
26476
|
+
var HOME_PREFIX, ENVIRONMENT_FILE_PATH_GUIDANCE;
|
|
26477
|
+
var init_environment_files = __esm({
|
|
26478
|
+
"../shared/src/environment-files.ts"() {
|
|
26479
|
+
"use strict";
|
|
26480
|
+
HOME_PREFIX = "~/";
|
|
26481
|
+
ENVIRONMENT_FILE_PATH_GUIDANCE = "Use ~/... for home-directory files, or ~/workspaces/... for files that should live alongside your cloned repositories.";
|
|
26482
|
+
}
|
|
26483
|
+
});
|
|
26484
|
+
|
|
26485
|
+
// ../shared/src/routes/plugin-catalog.ts
|
|
26486
|
+
var EXPLICIT_PLUGIN_CATALOG, HOSTED_COMPOSIO_PLUGIN_DEFINITIONS, HOSTED_COMPOSIO_PLUGINS, READ_ONLY_SCOPES, PLUGIN_CATALOG;
|
|
26487
|
+
var init_plugin_catalog = __esm({
|
|
26488
|
+
"../shared/src/routes/plugin-catalog.ts"() {
|
|
26489
|
+
"use strict";
|
|
26490
|
+
EXPLICIT_PLUGIN_CATALOG = [
|
|
26491
|
+
{
|
|
26492
|
+
id: "attio",
|
|
26493
|
+
backend: "composio",
|
|
26494
|
+
toolkit: "attio",
|
|
26495
|
+
authType: "oauth",
|
|
26496
|
+
category: "business",
|
|
26497
|
+
name: "Attio",
|
|
26498
|
+
description: "Manage CRM records, people, companies, lists, and notes."
|
|
26499
|
+
},
|
|
26500
|
+
{
|
|
26501
|
+
id: "calendly",
|
|
26502
|
+
backend: "composio",
|
|
26503
|
+
toolkit: "calendly",
|
|
26504
|
+
authType: "oauth",
|
|
26505
|
+
category: "productivity",
|
|
26506
|
+
name: "Calendly",
|
|
26507
|
+
description: "Manage event types, scheduled events, invitees, and scheduling links."
|
|
26508
|
+
},
|
|
26509
|
+
{
|
|
26510
|
+
id: "clickhouse",
|
|
26511
|
+
backend: "composio",
|
|
26512
|
+
toolkit: "clickhouse",
|
|
26513
|
+
authType: "basic",
|
|
26514
|
+
category: "data",
|
|
26515
|
+
name: "ClickHouse",
|
|
26516
|
+
description: "Manage databases, tables, schemas, and queries."
|
|
26517
|
+
},
|
|
26518
|
+
{
|
|
26519
|
+
id: "cloudflare",
|
|
26520
|
+
backend: "composio",
|
|
26521
|
+
toolkit: "cloudflare_api_key",
|
|
26522
|
+
authType: "api_key",
|
|
26523
|
+
category: "data",
|
|
26524
|
+
name: "Cloudflare",
|
|
26525
|
+
description: "Manage zones, DNS records, analytics, and security settings."
|
|
26526
|
+
},
|
|
26527
|
+
{
|
|
26528
|
+
id: "e2b",
|
|
26529
|
+
toolkit: "e2b",
|
|
26530
|
+
backend: "native",
|
|
26531
|
+
authType: "api_key",
|
|
26532
|
+
category: "data",
|
|
26533
|
+
name: "E2B",
|
|
26534
|
+
description: "Create secure cloud sandboxes and run commands in them."
|
|
26535
|
+
},
|
|
26536
|
+
{
|
|
26537
|
+
id: "gmail",
|
|
26538
|
+
backend: "composio",
|
|
26539
|
+
toolkit: "gmail",
|
|
26540
|
+
authType: "oauth",
|
|
26541
|
+
category: "productivity",
|
|
26542
|
+
name: "Gmail",
|
|
26543
|
+
description: "Manage messages, threads, attachments, labels, and mailbox settings."
|
|
26544
|
+
},
|
|
26545
|
+
{
|
|
26546
|
+
id: "greptile",
|
|
26547
|
+
backend: "native",
|
|
26548
|
+
toolkit: "greptile",
|
|
26549
|
+
authType: "api_key",
|
|
26550
|
+
category: "data",
|
|
26551
|
+
name: "Greptile Knowledge Base",
|
|
26552
|
+
description: "Search and read self-updating codebase documentation, architecture, and flows."
|
|
26553
|
+
},
|
|
26554
|
+
{
|
|
26555
|
+
id: "googleads",
|
|
26556
|
+
backend: "composio",
|
|
26557
|
+
toolkit: "googleads",
|
|
26558
|
+
authType: "oauth",
|
|
26559
|
+
category: "data",
|
|
26560
|
+
name: "Google Ads",
|
|
26561
|
+
description: "Manage campaigns, customers, accounts, and reporting data."
|
|
26562
|
+
},
|
|
26563
|
+
{
|
|
26564
|
+
id: "googledocs",
|
|
26565
|
+
backend: "composio",
|
|
26566
|
+
toolkit: "googledocs",
|
|
26567
|
+
authType: "oauth",
|
|
26568
|
+
category: "productivity",
|
|
26569
|
+
name: "Google Docs",
|
|
26570
|
+
description: "Manage documents, structure, comments, and exported content."
|
|
26571
|
+
},
|
|
26572
|
+
{
|
|
26573
|
+
id: "googledrive",
|
|
26574
|
+
backend: "composio",
|
|
26575
|
+
toolkit: "googledrive",
|
|
26576
|
+
authType: "oauth",
|
|
26577
|
+
category: "productivity",
|
|
26578
|
+
name: "Google Drive",
|
|
26579
|
+
description: "Manage files, folders, metadata, permissions, and shared drives."
|
|
26580
|
+
},
|
|
26581
|
+
{
|
|
26582
|
+
id: "googlesearch",
|
|
26583
|
+
backend: "composio",
|
|
26584
|
+
toolkit: "google_search_console",
|
|
26585
|
+
authType: "oauth",
|
|
26586
|
+
category: "data",
|
|
26587
|
+
name: "Google Search",
|
|
26588
|
+
description: "Manage Search Console performance, indexing, sites, and sitemaps."
|
|
26589
|
+
},
|
|
26590
|
+
{
|
|
26591
|
+
id: "googlesheets",
|
|
26592
|
+
backend: "composio",
|
|
26593
|
+
toolkit: "googlesheets",
|
|
26594
|
+
authType: "oauth",
|
|
26595
|
+
category: "productivity",
|
|
26596
|
+
name: "Google Sheets",
|
|
26597
|
+
description: "Manage spreadsheets, worksheets, ranges, tables, and charts."
|
|
26598
|
+
},
|
|
26599
|
+
{
|
|
26600
|
+
id: "linkedin",
|
|
26601
|
+
backend: "composio",
|
|
26602
|
+
toolkit: "linkedin",
|
|
26603
|
+
authType: "oauth",
|
|
26604
|
+
category: "business",
|
|
26605
|
+
name: "LinkedIn",
|
|
26606
|
+
description: "Manage profiles, organizations, posts, and professional activity."
|
|
26607
|
+
},
|
|
26608
|
+
{
|
|
26609
|
+
id: "modal",
|
|
26610
|
+
backend: "native",
|
|
26611
|
+
toolkit: "modal",
|
|
26612
|
+
authType: "basic",
|
|
26613
|
+
category: "data",
|
|
26614
|
+
name: "Modal",
|
|
26615
|
+
description: "Invoke deployed functions through Modal compute."
|
|
26616
|
+
},
|
|
26617
|
+
{
|
|
26618
|
+
id: "posthog",
|
|
26619
|
+
backend: "composio",
|
|
26620
|
+
toolkit: "posthog",
|
|
26621
|
+
authType: "api_key",
|
|
26622
|
+
category: "data",
|
|
26623
|
+
name: "PostHog",
|
|
26624
|
+
description: "Manage projects, events, insights, dashboards, flags, and recordings."
|
|
26625
|
+
},
|
|
26626
|
+
{
|
|
26627
|
+
id: "planetscale",
|
|
26628
|
+
toolkit: "planetscale",
|
|
26629
|
+
backend: "native",
|
|
26630
|
+
authType: "oauth",
|
|
26631
|
+
category: "data",
|
|
26632
|
+
name: "PlanetScale",
|
|
26633
|
+
description: "Manage organizations, databases, branches, deploy requests, and Insights."
|
|
26634
|
+
},
|
|
26635
|
+
{
|
|
26636
|
+
id: "sazabi",
|
|
26637
|
+
backend: "native",
|
|
26638
|
+
toolkit: "sazabi",
|
|
26639
|
+
authType: "oauth",
|
|
26640
|
+
category: "data",
|
|
26641
|
+
name: "Sazabi",
|
|
26642
|
+
description: "Query logs, investigate issues, and run the Sazabi observability agent."
|
|
26643
|
+
},
|
|
26644
|
+
{
|
|
26645
|
+
id: "stripe",
|
|
26646
|
+
backend: "composio",
|
|
26647
|
+
toolkit: "stripe",
|
|
26648
|
+
authType: "oauth",
|
|
26649
|
+
category: "business",
|
|
26650
|
+
name: "Stripe",
|
|
26651
|
+
description: "Manage customers, payments, invoices, subscriptions, and balances."
|
|
26652
|
+
},
|
|
26653
|
+
{
|
|
26654
|
+
id: "kondo",
|
|
26655
|
+
backend: "native",
|
|
26656
|
+
toolkit: "kondo",
|
|
26657
|
+
authType: "oauth",
|
|
26658
|
+
category: "business",
|
|
26659
|
+
name: "Kondo",
|
|
26660
|
+
description: "Manage LinkedIn chats, labels, reminders, drafts, connections, and invites."
|
|
26661
|
+
},
|
|
26662
|
+
{
|
|
26663
|
+
id: "lightfield",
|
|
26664
|
+
backend: "native",
|
|
26665
|
+
toolkit: "lightfield",
|
|
26666
|
+
authType: "api_key",
|
|
26667
|
+
category: "business",
|
|
26668
|
+
name: "Lightfield",
|
|
26669
|
+
description: "Manage CRM accounts, contacts, opportunities, meetings, notes, and tasks."
|
|
26670
|
+
},
|
|
26671
|
+
{
|
|
26672
|
+
id: "pangram",
|
|
26673
|
+
backend: "native",
|
|
26674
|
+
toolkit: "pangram",
|
|
26675
|
+
authType: "api_key",
|
|
26676
|
+
category: "data",
|
|
26677
|
+
name: "Pangram",
|
|
26678
|
+
description: "Analyze text for AI generation and plagiarism signals."
|
|
26679
|
+
},
|
|
26680
|
+
{
|
|
26681
|
+
id: "vercel",
|
|
26682
|
+
backend: "native",
|
|
26683
|
+
toolkit: "vercel",
|
|
26684
|
+
authType: "api_key",
|
|
26685
|
+
category: "data",
|
|
26686
|
+
name: "Vercel",
|
|
26687
|
+
description: "Manage projects, deployments, logs, domains, and infrastructure."
|
|
26688
|
+
},
|
|
26689
|
+
{
|
|
26690
|
+
id: "turbopuffer",
|
|
26691
|
+
backend: "native",
|
|
26692
|
+
toolkit: "turbopuffer",
|
|
26693
|
+
authType: "api_key",
|
|
26694
|
+
category: "data",
|
|
26695
|
+
name: "turbopuffer",
|
|
26696
|
+
description: "Query and manage turbopuffer namespaces."
|
|
26697
|
+
},
|
|
26698
|
+
{
|
|
26699
|
+
id: "vanta",
|
|
26700
|
+
backend: "native",
|
|
26701
|
+
toolkit: "vanta",
|
|
26702
|
+
authType: "credentials",
|
|
26703
|
+
category: "data",
|
|
26704
|
+
name: "Vanta",
|
|
26705
|
+
description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data."
|
|
26706
|
+
}
|
|
26707
|
+
];
|
|
26708
|
+
HOSTED_COMPOSIO_PLUGIN_DEFINITIONS = [
|
|
26709
|
+
["notion", "notion", "OAUTH2", true, "productivity", "Notion"],
|
|
26710
|
+
["jira", "jira", "OAUTH2", true, "productivity", "Jira"],
|
|
26711
|
+
["confluence", "confluence", "OAUTH2", true, "productivity", "Confluence"],
|
|
26712
|
+
["googlecalendar", "googlecalendar", "OAUTH2", true, "productivity", "Google Calendar"],
|
|
26713
|
+
["microsoftteams", "microsoft_teams", "OAUTH2", true, "productivity", "Microsoft Teams"],
|
|
26714
|
+
["outlook", "outlook", "OAUTH2", true, "productivity", "Outlook"],
|
|
26715
|
+
["bitbucket", "bitbucket", "OAUTH2", true, "data", "Bitbucket"],
|
|
26716
|
+
["datadog", "datadog", "API_KEY", false, "data", "Datadog"],
|
|
26717
|
+
["pagerduty", "pagerduty", "OAUTH2", true, "data", "PagerDuty"],
|
|
26718
|
+
["intercom", "intercom", "OAUTH2", true, "business", "Intercom"],
|
|
26719
|
+
["zendesk", "zendesk", "OAUTH2", true, "business", "Zendesk"],
|
|
26720
|
+
["hubspot", "hubspot", "OAUTH2", true, "business", "HubSpot"],
|
|
26721
|
+
["supabase", "supabase", "OAUTH2", true, "data", "Supabase"],
|
|
26722
|
+
["figma", "figma", "OAUTH2", true, "productivity", "Figma"],
|
|
26723
|
+
["launchdarkly", "launch_darkly", "API_KEY", false, "data", "LaunchDarkly"],
|
|
26724
|
+
["asana", "asana", "OAUTH2", true, "productivity", "Asana"],
|
|
26725
|
+
["clickup", "clickup", "OAUTH2", true, "productivity", "ClickUp"],
|
|
26726
|
+
["trello", "trello", "OAUTH1", true, "productivity", "Trello"],
|
|
26727
|
+
["todoist", "todoist", "OAUTH2", true, "productivity", "Todoist"],
|
|
26728
|
+
["airtable", "airtable", "OAUTH2", true, "productivity", "Airtable"],
|
|
26729
|
+
["coda", "coda", "API_KEY", false, "productivity", "Coda"],
|
|
26730
|
+
["miro", "miro", "OAUTH2", true, "productivity", "Miro"],
|
|
26731
|
+
["sharepoint", "share_point", "OAUTH2", true, "productivity", "SharePoint"],
|
|
26732
|
+
["onedrive", "one_drive", "OAUTH2", true, "productivity", "OneDrive"],
|
|
26733
|
+
["googleslides", "googleslides", "OAUTH2", true, "productivity", "Google Slides"],
|
|
26734
|
+
["googlemeet", "googlemeet", "OAUTH2", true, "productivity", "Google Meet"],
|
|
26735
|
+
["circleback", "circleback_mcp", "DCR_OAUTH", false, "productivity", "Circleback"],
|
|
26736
|
+
["granola", "granola_mcp", "DCR_OAUTH", false, "productivity", "Granola"],
|
|
26737
|
+
["mercury", "mercury_mcp", "DCR_OAUTH", false, "business", "Mercury"],
|
|
26738
|
+
["googletasks", "googletasks", "OAUTH2", true, "productivity", "Google Tasks"],
|
|
26739
|
+
["dropbox", "dropbox", "OAUTH2", true, "productivity", "Dropbox"],
|
|
26740
|
+
["box", "box", "OAUTH2", true, "productivity", "Box"],
|
|
26741
|
+
["discord", "discord", "OAUTH2", true, "productivity", "Discord"],
|
|
26742
|
+
["discordbot", "discordbot", "OAUTH2", true, "productivity", "Discord Bot"],
|
|
26743
|
+
["zoom", "zoom", "OAUTH2", true, "productivity", "Zoom"],
|
|
26744
|
+
["googlechat", "google_chat", "OAUTH2", false, "productivity", "Google Chat"],
|
|
26745
|
+
["newrelic", "new_relic", "API_KEY", false, "data", "New Relic"],
|
|
26746
|
+
["betterstack", "better_stack", "API_KEY", false, "data", "Better Stack"],
|
|
26747
|
+
["incidentio", "incident_io", "API_KEY", false, "data", "incident.io"],
|
|
26748
|
+
["grafana", "grafana", "BEARER_TOKEN", false, "data", "Grafana"],
|
|
26749
|
+
["honeycomb", "honeycomb_mcp", "DCR_OAUTH", false, "data", "Honeycomb MCP"],
|
|
26750
|
+
["neon", "neon_mcp", "DCR_OAUTH", false, "data", "Neon"],
|
|
26751
|
+
["glen", "glen_mcp", "DCR_OAUTH", false, "data", "Glen"],
|
|
26752
|
+
["bugsnag", "bugsnag", "API_KEY", false, "data", "Bugsnag"],
|
|
26753
|
+
["circleci", "circleci", "API_KEY", false, "data", "CircleCI"],
|
|
26754
|
+
["buildkite", "buildkite", "API_KEY", false, "data", "Buildkite"],
|
|
26755
|
+
["dockerhub", "docker_hub", "API_KEY", false, "data", "Docker Hub"],
|
|
26756
|
+
["digitalocean", "digital_ocean", "OAUTH2", true, "data", "DigitalOcean"],
|
|
26757
|
+
["railway", "railway", "API_KEY", false, "data", "Railway"],
|
|
26758
|
+
["render", "render", "API_KEY", false, "data", "Render"],
|
|
26759
|
+
["firebase", "firebase", "API_KEY", false, "data", "Firebase"],
|
|
26760
|
+
["cloudinary", "cloudinary", "API_KEY", false, "data", "Cloudinary"],
|
|
26761
|
+
["configcat", "configcat", "API_KEY", false, "data", "ConfigCat"],
|
|
26762
|
+
["contextdev", "context_dev", "API_KEY", false, "data", "Context.dev"],
|
|
26763
|
+
["googleanalytics", "google_analytics", "OAUTH2", true, "data", "Google Analytics"],
|
|
26764
|
+
["googlebigquery", "googlebigquery", "OAUTH2", true, "data", "Google BigQuery"],
|
|
26765
|
+
["amplitude", "amplitude", "API_KEY", false, "data", "Amplitude"],
|
|
26766
|
+
["mixpanel", "mixpanel", "BASIC", false, "data", "Mixpanel"],
|
|
26767
|
+
["segment", "segment", "API_KEY", false, "data", "Segment"],
|
|
26768
|
+
["supermemory", "supermemory", "API_KEY", false, "data", "Supermemory"],
|
|
26769
|
+
["databricks", "databricks", "API_KEY", false, "data", "Databricks"],
|
|
26770
|
+
["snowflake", "snowflake", "OAUTH2", false, "data", "Snowflake"],
|
|
26771
|
+
["algolia", "algolia", "API_KEY", false, "data", "Algolia"],
|
|
26772
|
+
["elasticsearch", "elasticsearch", "API_KEY", false, "data", "Elasticsearch"],
|
|
26773
|
+
["salesforce", "salesforce", "OAUTH2", true, "business", "Salesforce"],
|
|
26774
|
+
["pipedrive", "pipedrive", "API_KEY", false, "business", "Pipedrive"],
|
|
26775
|
+
["close", "close", "API_KEY", false, "business", "Close"],
|
|
26776
|
+
["apollo", "apollo", "API_KEY", false, "business", "Apollo"],
|
|
26777
|
+
["gong", "gong", "OAUTH2", true, "business", "Gong"],
|
|
26778
|
+
["freshdesk", "freshdesk", "API_KEY", false, "business", "Freshdesk"],
|
|
26779
|
+
["helpscout", "help_scout", "OAUTH2", false, "business", "Help Scout"],
|
|
26780
|
+
["servicenow", "servicenow", "BASIC", false, "business", "ServiceNow"],
|
|
26781
|
+
["mailchimp", "mailchimp", "OAUTH2", true, "business", "Mailchimp"],
|
|
26782
|
+
["customerio", "customerio", "API_KEY", false, "business", "Customer.io"],
|
|
26783
|
+
["klaviyo", "klaviyo", "API_KEY", false, "business", "Klaviyo"],
|
|
26784
|
+
["shopify", "shopify", "API_KEY", false, "business", "Shopify"],
|
|
26785
|
+
["quickbooks", "quickbooks", "OAUTH2", true, "business", "QuickBooks"],
|
|
26786
|
+
["xero", "xero", "OAUTH2", false, "business", "Xero"],
|
|
26787
|
+
["brex", "brex", "API_KEY", false, "business", "Brex"],
|
|
26788
|
+
["buffer", "buffer", "OAUTH2", false, "business", "Buffer"],
|
|
26789
|
+
["canva", "canva", "OAUTH2", true, "productivity", "Canva"],
|
|
26790
|
+
["webflow", "webflow", "API_KEY", false, "business", "Webflow"],
|
|
26791
|
+
["firecrawl", "firecrawl", "API_KEY", false, "data", "Firecrawl"],
|
|
26792
|
+
["browserbase", "browserbase_tool", "API_KEY", false, "data", "Browserbase"],
|
|
26793
|
+
["exa", "exa", "API_KEY", false, "data", "Exa"],
|
|
26794
|
+
["youtube", "youtube", "OAUTH2", true, "business", "YouTube"],
|
|
26795
|
+
["twitter", "twitter", "OAUTH2", false, "business", "Twitter/X"],
|
|
26796
|
+
["instagram", "instagram", "OAUTH2", true, "business", "Instagram"],
|
|
26797
|
+
["facebook", "facebook", "OAUTH2", true, "business", "Facebook"]
|
|
26798
|
+
];
|
|
26799
|
+
HOSTED_COMPOSIO_PLUGINS = HOSTED_COMPOSIO_PLUGIN_DEFINITIONS.map(
|
|
26800
|
+
([id, toolkit, authScheme, managedAuth, category, name]) => ({
|
|
26801
|
+
id,
|
|
26802
|
+
backend: "composio",
|
|
26803
|
+
toolkit,
|
|
26804
|
+
authType: "hosted",
|
|
26805
|
+
authScheme,
|
|
26806
|
+
managedAuth,
|
|
26807
|
+
category,
|
|
26808
|
+
name,
|
|
26809
|
+
description: `Use ${name} tools from workspace agents.`
|
|
26810
|
+
})
|
|
26811
|
+
);
|
|
26812
|
+
READ_ONLY_SCOPES = {
|
|
26813
|
+
gmail: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/contacts.readonly", "https://www.googleapis.com/auth/contacts.other.readonly", "https://www.googleapis.com/auth/gmail.readonly"],
|
|
26814
|
+
googledocs: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/documents.readonly"],
|
|
26815
|
+
googledrive: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly"],
|
|
26816
|
+
googlesheets: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/spreadsheets.readonly"],
|
|
26817
|
+
googleslides: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/presentations.readonly"],
|
|
26818
|
+
googlecalendar: ["https://www.googleapis.com/auth/calendar.readonly"],
|
|
26819
|
+
googletasks: ["https://www.googleapis.com/auth/tasks.readonly"],
|
|
26820
|
+
googlesearch: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/webmasters.readonly"],
|
|
26821
|
+
googleanalytics: ["https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/analytics.readonly"],
|
|
26822
|
+
youtube: ["https://www.googleapis.com/auth/youtube.readonly"],
|
|
26823
|
+
outlook: ["User.Read", "Mail.Read", "MailboxSettings.Read", "Calendars.Read", "Contacts.Read", "offline_access"],
|
|
26824
|
+
onedrive: ["Files.Read.All", "Sites.Read.All", "offline_access"],
|
|
26825
|
+
microsoftteams: ["User.Read", "Team.ReadBasic.All", "Channel.ReadBasic.All", "ChannelMessage.Read.All", "Chat.Read", "Chat.ReadBasic", "ChatMessage.Read", "People.Read.All", "TeamsActivity.Read", "offline_access"],
|
|
26826
|
+
jira: ["read:jira-work", "read:jira-user", "read:servicedesk-request", "read:servicemanagement-insight-objects", "read:sprint:jira-software", "read:board-scope:jira-software", "read:project:jira", "read:issue-type-scheme:jira", "offline_access"],
|
|
26827
|
+
confluence: ["read:space-details:confluence", "read:audit-log:confluence", "read:page:confluence", "read:blogpost:confluence", "read:whiteboard:confluence", "read:comment:confluence", "read:content.restriction:confluence", "read:content.metadata:confluence", "read:inlinetask:confluence", "read:task:confluence", "offline_access"],
|
|
26828
|
+
zendesk: ["read"],
|
|
26829
|
+
gong: ["api:calls:read:basic", "api:calls:read:extensive", "api:calls:read:transcript", "api:calls:read:media-url", "api:users:read", "api:stats:interaction", "api:stats:scorecards", "api:stats:user-actions", "api:stats:user-actions:detailed", "api:settings:scorecards:read", "api:settings:trackers:read", "api:library:read", "api:tasks:read", "api:flows:read", "api:workspaces:read", "api:crm:get-objects", "api:crm:schema", "api:crm:integrations:read", "api:call-outcomes:read", "api:permission-profile:read", "api:logs:read"],
|
|
26830
|
+
figma: ["current_user:read", "file_content:read", "file_comments:read", "file_metadata:read", "file_versions:read", "projects:read", "library_assets:read", "library_content:read", "team_library_content:read", "webhooks:read"],
|
|
26831
|
+
airtable: ["data.records:read", "data.recordComments:read", "schema.bases:read", "user.email:read"],
|
|
26832
|
+
todoist: ["data:read"],
|
|
26833
|
+
dropbox: ["openid", "email", "profile", "account_info.read", "files.metadata.read", "files.content.read", "file_requests.read", "sharing.read", "contacts.read"],
|
|
26834
|
+
canva: ["profile:read", "asset:read", "brandtemplate:content:read", "brandtemplate:meta:read", "comment:read", "design:content:read", "design:meta:read", "folder:read"],
|
|
26835
|
+
facebook: ["public_profile", "email", "pages_show_list", "pages_read_engagement", "pages_read_user_content", "read_insights"],
|
|
26836
|
+
instagram: ["instagram_business_basic", "instagram_business_manage_insights"]
|
|
26837
|
+
};
|
|
26838
|
+
PLUGIN_CATALOG = [
|
|
26839
|
+
...EXPLICIT_PLUGIN_CATALOG,
|
|
26840
|
+
...HOSTED_COMPOSIO_PLUGINS
|
|
26841
|
+
].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
|
|
26842
|
+
}
|
|
26843
|
+
});
|
|
26844
|
+
|
|
26845
|
+
// ../shared/src/routes/plugins.ts
|
|
26846
|
+
function isPluginId(value) {
|
|
26847
|
+
return PLUGIN_CATALOG.some((plugin) => plugin.id === value);
|
|
26876
26848
|
}
|
|
26877
|
-
var
|
|
26878
|
-
|
|
26879
|
-
"../shared/src/visuals.ts"() {
|
|
26849
|
+
var init_plugins2 = __esm({
|
|
26850
|
+
"../shared/src/routes/plugins.ts"() {
|
|
26880
26851
|
"use strict";
|
|
26881
|
-
|
|
26882
|
-
|
|
26883
|
-
VISUAL_MEASURE_WIDTHS = [320, 375, 430, 520, 640, 760, 880, 952];
|
|
26884
|
-
VISUAL_COLUMN_WIDTH = 760;
|
|
26885
|
-
VISUAL_PHONE_WIDTH = 390;
|
|
26886
|
-
VISUAL_MIN_HEIGHT = 24;
|
|
26887
|
-
VISUAL_MAX_HEIGHT = 2e4;
|
|
26888
|
-
VISUAL_FONT_PATH = "/fonts/InterVariable.woff2";
|
|
26889
|
-
FONT_FAMILIES = ["Inter", "General Sans"];
|
|
26890
|
-
FONT_SANS = `${FONT_FAMILIES.map((family) => `"${family}"`).join(", ")}, system-ui, -apple-system, "Segoe UI", sans-serif`;
|
|
26891
|
-
FONT_MONO = '"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace';
|
|
26892
|
-
VISUAL_PAGE_RULES = `- Write one self-contained HTML file with inline <style> and <script>; a fragment without <html> or <head> is fine. Put data inline instead of fetching it. Libraries may load from public CDNs such as cdn.jsdelivr.net. Local images written as absolute paths (src="/abs/shot.png", url(/abs/bg.webp)) are inlined when you publish.
|
|
26893
|
-
- The page sits directly on the chat background, as wide as your reply (about ${VISUAL_COLUMN_WIDTH}px on desktop, ${VISUAL_PHONE_WIDTH - 30}px on phones), with its left edge aligned to your text. Leave html and body transparent, use a fluid width with no outer padding, and add no outer card, border, or title banner: the page is part of your reply.
|
|
26894
|
-
- Let content set the height. Never use 100vh, height:100%, or min-height:100vh on html, body, or the outer element; publishing refuses a page whose height follows the frame. Give charts fixed pixel heights.
|
|
26895
|
-
- Color everything with the theme variables so the page follows light and dark mode live: --foreground, --muted-foreground (secondary text), --background, --muted (subtle fills), --accent, --border, --primary and --primary-foreground (the brand accent, for emphasis), --success (passed, done, or added), --destructive, --warning, --code-background, --code-foreground, and --chart-1 to --chart-8 for series (use them in order and label series directly). Never hardcode a light or dark palette. A canvas or chart library that needs literal colors can read them with getComputedStyle(document.documentElement) and redraw on matchMedia("(prefers-color-scheme: dark)") changes.
|
|
26896
|
-
- Text is 13px Inter, like the chat; --font-sans and --font-mono are set. Keep Replicas' flat look: separate sections with 1px var(--border) lines or var(--muted) fills, without shadows or rounded cards. Use var(--radius) only on small controls.
|
|
26897
|
-
- A mockup of a specific product's UI, such as a client's app or a competitor's screen, is the exception: give it its own panel with at least 16px of padding and use that product's real colors, fonts, corners, and shadows inside it, so it looks like the product. Everything around the panel follows the rules above.
|
|
26898
|
-
- Interaction is welcome: hover details, tabs, toggles, sliders. Links open in a new browser tab.
|
|
26899
|
-
- Keep the top-right corner (about 110\xD740px) free of anything essential: the chat shows the visual's actions there on hover.`;
|
|
26900
|
-
THEME_FRAGMENT_KEY = "replicas-theme";
|
|
26901
|
-
HOST_CONTEXT_CHANGED_METHOD = "ui/notifications/host-context-changed";
|
|
26902
|
-
SIZE_CHANGED_METHOD = "ui/notifications/size-changed";
|
|
26903
|
-
OPEN_LINK_METHOD = "ui/open-link";
|
|
26904
|
-
OPEN_IMAGE_METHOD = "replicas/open-image";
|
|
26905
|
-
VISUAL_CONTENT_HEIGHT_EXPRESSION = "(function(){var r=document.documentElement;return Math.ceil(r.scrollHeight>r.clientHeight?r.scrollHeight:r.getBoundingClientRect().height)})()";
|
|
26906
|
-
BASE_CSS = "html{color:var(--foreground);font-family:var(--font-sans);font-size:13px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;scrollbar-width:none}html::-webkit-scrollbar{display:none}body{margin:0}:where(*,*::before,*::after){box-sizing:border-box}code,kbd,pre,samp{font-family:var(--font-mono)}:where(:focus-visible){outline:2px solid var(--ring);outline-offset:-2px}";
|
|
26907
|
-
THEME_STYLE_ID = "replicas-visual-theme";
|
|
26908
|
-
BOOTSTRAP_SCRIPT = `
|
|
26909
|
-
(() => {
|
|
26910
|
-
const style = document.getElementById('${THEME_STYLE_ID}');
|
|
26911
|
-
const nativeView = window.ReactNativeWebView;
|
|
26912
|
-
const framed = window.parent !== window;
|
|
26913
|
-
const post = (message) => nativeView ? nativeView.postMessage(JSON.stringify(message)) : window.parent.postMessage(message, '*');
|
|
26914
|
-
const applyTheme = (theme) => {
|
|
26915
|
-
const variables = Object.entries(theme.variables).map(([name, value]) => name + ':' + value + ';').join('');
|
|
26916
|
-
const font = theme.fontUrl ? ${JSON.stringify(FONT_FAMILIES)}.map((family) => '@font-face{font-family:"' + family + '";src:url("' + theme.fontUrl + '") format("woff2");font-weight:100 900;font-display:swap}').join('') : '';
|
|
26917
|
-
style.textContent = ':root{color-scheme:' + theme.appearance + ';' + variables + '}' + font + ${JSON.stringify(BASE_CSS)};
|
|
26918
|
-
};
|
|
26919
|
-
try {
|
|
26920
|
-
const fragment = /[#&]${THEME_FRAGMENT_KEY}=([^&]*)/.exec(location.hash);
|
|
26921
|
-
if (fragment) {
|
|
26922
|
-
applyTheme(JSON.parse(decodeURIComponent(fragment[1])));
|
|
26923
|
-
history.replaceState(history.state, '', location.pathname + location.search);
|
|
26924
|
-
}
|
|
26925
|
-
} catch {}
|
|
26926
|
-
if (!nativeView) {
|
|
26927
|
-
document.addEventListener('click', (event) => {
|
|
26928
|
-
const anchor = event.isTrusted && event.composedPath().find((target) => target instanceof Element && target.matches('a[href]'));
|
|
26929
|
-
if (!anchor) return;
|
|
26930
|
-
const url = new URL(anchor.getAttribute('href'), document.baseURI);
|
|
26931
|
-
if (!/^https?:$/.test(url.protocol) || url.href.split('#')[0] === location.href.split('#')[0]) return;
|
|
26932
|
-
if (framed) {
|
|
26933
|
-
event.preventDefault();
|
|
26934
|
-
post({ jsonrpc: '2.0', method: '${OPEN_LINK_METHOD}', params: { url: url.href } });
|
|
26935
|
-
} else {
|
|
26936
|
-
anchor.setAttribute('target', '_blank');
|
|
26937
|
-
anchor.setAttribute('rel', 'noopener');
|
|
26938
|
-
}
|
|
26939
|
-
}, true);
|
|
26852
|
+
init_plugin_catalog();
|
|
26853
|
+
init_plugin_catalog();
|
|
26940
26854
|
}
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
|
|
26945
|
-
|
|
26946
|
-
|
|
26947
|
-
|
|
26948
|
-
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
|
|
26855
|
+
});
|
|
26856
|
+
|
|
26857
|
+
// ../shared/src/environment-config.ts
|
|
26858
|
+
var variableNameSchema, mcpValueSchema, mcpValuesSchema, httpConfigSchema, replicasMcpDefinitionSchema, replicasEnvironmentConfigSchema;
|
|
26859
|
+
var init_environment_config = __esm({
|
|
26860
|
+
"../shared/src/environment-config.ts"() {
|
|
26861
|
+
"use strict";
|
|
26862
|
+
init_zod();
|
|
26863
|
+
init_preferences();
|
|
26864
|
+
init_registry();
|
|
26865
|
+
init_environment();
|
|
26866
|
+
init_sandbox();
|
|
26867
|
+
init_environment_files();
|
|
26868
|
+
init_plugins2();
|
|
26869
|
+
init_environment_setups();
|
|
26870
|
+
variableNameSchema = external_exports.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name");
|
|
26871
|
+
mcpValueSchema = external_exports.union([
|
|
26872
|
+
external_exports.string(),
|
|
26873
|
+
environmentMcpVariableReferenceSchema
|
|
26874
|
+
]);
|
|
26875
|
+
mcpValuesSchema = external_exports.record(external_exports.string(), mcpValueSchema);
|
|
26876
|
+
httpConfigSchema = environmentMcpHttpConfigSchema.pick({ url: true, auth: true }).extend({
|
|
26877
|
+
headers: mcpValuesSchema.default({})
|
|
26878
|
+
}).strict();
|
|
26879
|
+
replicasMcpDefinitionSchema = external_exports.discriminatedUnion("transport", [
|
|
26880
|
+
external_exports.strictObject({
|
|
26881
|
+
transport: external_exports.literal("stdio"),
|
|
26882
|
+
config: environmentMcpStdioConfigSchema.pick({ command: true }).extend({
|
|
26883
|
+
args: environmentMcpStdioConfigSchema.shape.args.unwrap().default([]),
|
|
26884
|
+
env: external_exports.record(variableNameSchema, mcpValueSchema).default({})
|
|
26885
|
+
}).strict()
|
|
26886
|
+
}),
|
|
26887
|
+
external_exports.strictObject({ transport: external_exports.literal("http"), config: httpConfigSchema }),
|
|
26888
|
+
external_exports.strictObject({ transport: external_exports.literal("sse"), config: httpConfigSchema })
|
|
26889
|
+
]).superRefine((definition, context) => {
|
|
26890
|
+
if (definition.transport === "stdio") return;
|
|
26891
|
+
const result = validateEnvironmentMcpAuthentication(definition.transport, definition.config);
|
|
26892
|
+
if (!result.ok) context.addIssue({ code: "custom", path: result.error.code === "transport" ? ["transport"] : ["config", result.error.code ?? "auth"], message: result.error.message });
|
|
26893
|
+
});
|
|
26894
|
+
replicasEnvironmentConfigSchema = external_exports.strictObject({
|
|
26895
|
+
inheritRepositories: external_exports.boolean().optional(),
|
|
26896
|
+
memory: external_exports.strictObject({ read: external_exports.boolean().optional(), write: external_exports.boolean().optional() }).nullable().optional(),
|
|
26897
|
+
gpu: external_exports.boolean().nullable().optional(),
|
|
26898
|
+
mobileTesting: external_exports.boolean().nullable().optional(),
|
|
26899
|
+
defaultSkills: defaultSkillsOverridesSchema.superRefine((skills2, context) => {
|
|
26900
|
+
for (const ability of REPLICAS_AGENT_ABILITIES) if (skills2.replicas_agent?.abilities?.[ability] === false && REPLICAS_AGENT_ABILITY_REGISTRY[ability].locked) context.addIssue({ code: "custom", path: ["replicas_agent", "abilities", ability], message: "This built-in ability cannot be disabled" });
|
|
26901
|
+
}).nullable().optional(),
|
|
26902
|
+
repositories: external_exports.array(external_exports.string().trim().min(1)).optional(),
|
|
26903
|
+
workspaceSize: external_exports.enum(WORKSPACE_SIZE_OPTIONS).optional(),
|
|
26904
|
+
files: external_exports.record(external_exports.string().trim().refine((path11) => !validateEnvironmentFilePath(path11), "must be a file path starting with ~/"), external_exports.strictObject({
|
|
26905
|
+
name: external_exports.string().trim().min(1).optional(),
|
|
26906
|
+
content: external_exports.string().max(65536)
|
|
26907
|
+
})).optional(),
|
|
26908
|
+
skills: external_exports.record(external_exports.string().trim().min(1), external_exports.strictObject({ source: external_exports.string().trim().min(1), name: external_exports.string().trim().min(1).optional() })).optional(),
|
|
26909
|
+
requiredPlugins: external_exports.array(external_exports.string().refine(isPluginId, "must be a supported plugin")).transform((plugins2) => [...new Set(plugins2)]).optional(),
|
|
26910
|
+
systemPrompt: external_exports.string().optional(),
|
|
26911
|
+
warmHook: external_exports.string().optional(),
|
|
26912
|
+
startHook: external_exports.string().optional(),
|
|
26913
|
+
variables: external_exports.record(variableNameSchema, external_exports.string()).optional(),
|
|
26914
|
+
requiredSecrets: external_exports.array(variableNameSchema).optional(),
|
|
26915
|
+
mcps: external_exports.record(external_exports.string().regex(MCP_NAME_PATTERN, "must be 1\u201364 letters, digits, underscores or hyphens, starting with a letter or digit").refine((name) => !isReservedMcpName(name), "is reserved for Replicas"), replicasMcpDefinitionSchema).optional()
|
|
26916
|
+
}).superRefine((config3, context) => {
|
|
26917
|
+
if (config3.inheritRepositories === true && config3.repositories !== void 0) context.addIssue({ code: "custom", path: ["repositories"], message: "Inherited repositories cannot also be declared explicitly" });
|
|
26918
|
+
const skillNames = Object.keys(config3.skills ?? {}).map((slug) => slug.toLowerCase());
|
|
26919
|
+
if (new Set(skillNames).size !== skillNames.length) context.addIssue({ code: "custom", path: ["skills"], message: "Skill slugs must be unique regardless of case" });
|
|
26920
|
+
const names = /* @__PURE__ */ new Set();
|
|
26921
|
+
for (const name of Object.keys(config3.mcps ?? {})) {
|
|
26922
|
+
const normalized = name.toLowerCase();
|
|
26923
|
+
if (names.has(normalized)) {
|
|
26924
|
+
context.addIssue({ code: "custom", path: ["mcps", name], message: "MCP names must be unique regardless of case" });
|
|
26925
|
+
}
|
|
26926
|
+
names.add(normalized);
|
|
26955
26927
|
}
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
|
|
26961
|
-
|
|
26962
|
-
if (height === reportedHeight) return;
|
|
26963
|
-
reportedHeight = height;
|
|
26964
|
-
post({ jsonrpc: '2.0', method: '${SIZE_CHANGED_METHOD}', params: { height } });
|
|
26965
|
-
};
|
|
26966
|
-
window.addEventListener('message', (event) => {
|
|
26967
|
-
if (event.source !== window.parent || event.data?.method !== '${HOST_CONTEXT_CHANGED_METHOD}') return;
|
|
26968
|
-
const { theme, styles, fontUrl } = event.data.params;
|
|
26969
|
-
applyTheme({ appearance: theme, variables: styles.variables, fontUrl });
|
|
26970
|
-
reportedHeight = undefined;
|
|
26971
|
-
if (document.readyState !== 'loading') reportHeight();
|
|
26972
|
-
});
|
|
26973
|
-
const resizeObserver = new ResizeObserver(reportHeight);
|
|
26974
|
-
resizeObserver.observe(document.documentElement);
|
|
26975
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
26976
|
-
resizeObserver.observe(document.body);
|
|
26977
|
-
reportHeight();
|
|
26978
|
-
});
|
|
26979
|
-
window.addEventListener('load', reportHeight);
|
|
26980
|
-
})();
|
|
26981
|
-
`.trim().replace(/\s*\n\s*/g, " ");
|
|
26982
|
-
blankNonMarkup = (html) => html.replace(
|
|
26983
|
-
/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|xmp|iframe|noembed|noframes|noscript|template)\b[\s\S]*?(?:<\/\1\s*>|$)/gi,
|
|
26984
|
-
(match) => " ".repeat(match.length)
|
|
26985
|
-
);
|
|
26928
|
+
for (const key of config3.requiredSecrets ?? []) {
|
|
26929
|
+
if (config3.variables && Object.hasOwn(config3.variables, key)) {
|
|
26930
|
+
context.addIssue({ code: "custom", path: ["requiredSecrets"], message: `"${key}" cannot also be declared as a non-secret variable` });
|
|
26931
|
+
}
|
|
26932
|
+
}
|
|
26933
|
+
});
|
|
26986
26934
|
}
|
|
26987
26935
|
});
|
|
26988
26936
|
|
|
26989
|
-
// ../shared/src/
|
|
26990
|
-
var
|
|
26991
|
-
var
|
|
26992
|
-
"../shared/src/
|
|
26937
|
+
// ../shared/src/routes/environment-config-source.ts
|
|
26938
|
+
var ENVIRONMENT_CONFIG_PREFERENCES, ENVIRONMENT_CONFIG_SETTING_FIELDS, environmentConfigLocationSchema, sourceInput, previewEnvironmentConfigSourceRequestSchema, applyEnvironmentConfigSourceRequestSchema;
|
|
26939
|
+
var init_environment_config_source = __esm({
|
|
26940
|
+
"../shared/src/routes/environment-config-source.ts"() {
|
|
26993
26941
|
"use strict";
|
|
26994
|
-
|
|
26995
|
-
|
|
26996
|
-
|
|
26942
|
+
init_zod();
|
|
26943
|
+
init_environment_config();
|
|
26944
|
+
ENVIRONMENT_CONFIG_PREFERENCES = [["memory", "memory"], ["gpu", "gpu"], ["mobileTesting", "mobile_testing"], ["defaultSkills", "default_skills"]];
|
|
26945
|
+
ENVIRONMENT_CONFIG_SETTING_FIELDS = ["repositories", "workspaceSize", "inheritRepositories", ...ENVIRONMENT_CONFIG_PREFERENCES.map(([field2]) => field2)];
|
|
26946
|
+
environmentConfigLocationSchema = external_exports.union([
|
|
26947
|
+
external_exports.object({
|
|
26948
|
+
kind: external_exports.literal("git").default("git"),
|
|
26949
|
+
entrypoint_filename: external_exports.string().optional(),
|
|
26950
|
+
repository_id: external_exports.string(),
|
|
26951
|
+
repository_name: external_exports.string(),
|
|
26952
|
+
filename: external_exports.string(),
|
|
26953
|
+
commit_sha: external_exports.string(),
|
|
26954
|
+
source_url: external_exports.string(),
|
|
26955
|
+
file_sha: external_exports.undefined().optional()
|
|
26956
|
+
}),
|
|
26957
|
+
external_exports.object({
|
|
26958
|
+
kind: external_exports.literal("file"),
|
|
26959
|
+
repository_id: external_exports.null(),
|
|
26960
|
+
repository_name: external_exports.null(),
|
|
26961
|
+
filename: external_exports.string(),
|
|
26962
|
+
commit_sha: external_exports.null(),
|
|
26963
|
+
source_url: external_exports.null(),
|
|
26964
|
+
file_sha: external_exports.string()
|
|
26965
|
+
})
|
|
26966
|
+
]);
|
|
26967
|
+
sourceInput = {
|
|
26968
|
+
repository_id: external_exports.string().min(1).optional(),
|
|
26969
|
+
file: external_exports.strictObject({ filename: external_exports.string().min(1).max(1024), environment: replicasEnvironmentConfigSchema }).optional()
|
|
26970
|
+
};
|
|
26971
|
+
previewEnvironmentConfigSourceRequestSchema = external_exports.strictObject(sourceInput).refine(
|
|
26972
|
+
(input2) => !input2.file || !input2.repository_id,
|
|
26973
|
+
{ message: "Choose either a repository or a file" }
|
|
26974
|
+
);
|
|
26975
|
+
applyEnvironmentConfigSourceRequestSchema = external_exports.strictObject({
|
|
26976
|
+
...sourceInput,
|
|
26977
|
+
commit_sha: external_exports.string().min(1).optional(),
|
|
26978
|
+
fingerprint: external_exports.string().min(1)
|
|
26979
|
+
}).refine((input2) => input2.file ? !input2.repository_id && !input2.commit_sha : !!input2.commit_sha, {
|
|
26980
|
+
message: "File configuration requires file contents; Git configuration requires a reviewed commit"
|
|
26981
|
+
});
|
|
26982
|
+
}
|
|
26983
|
+
});
|
|
26997
26984
|
|
|
26998
|
-
|
|
26985
|
+
// ../shared/src/replicas-mcp.ts
|
|
26986
|
+
var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
|
|
26987
|
+
var init_replicas_mcp = __esm({
|
|
26988
|
+
"../shared/src/replicas-mcp.ts"() {
|
|
26989
|
+
"use strict";
|
|
26990
|
+
init_zod();
|
|
26991
|
+
init_agent();
|
|
26992
|
+
init_linear2();
|
|
26993
|
+
init_trigger_schemas();
|
|
26994
|
+
init_types5();
|
|
26995
|
+
init_chat_fork();
|
|
26996
|
+
init_v1();
|
|
26997
|
+
init_environment();
|
|
26998
|
+
init_environment_config_source();
|
|
26999
|
+
init_workspaces();
|
|
27000
|
+
init_sandbox();
|
|
27001
|
+
REPLICAS_MCP_TOOLS = {
|
|
27002
|
+
listEnvironments: "list_environments",
|
|
27003
|
+
createAutomation: "create_automation",
|
|
27004
|
+
spawn: "spawn_workspace",
|
|
27005
|
+
spawnInNewThread: "spawn_workspace_in_new_thread",
|
|
27006
|
+
relay: "relay_to_workspace",
|
|
27007
|
+
listWorkspaces: "list_workspaces",
|
|
27008
|
+
linearStart: "start_linear_session",
|
|
27009
|
+
linearSessionIntent: "register_linear_session_intent",
|
|
27010
|
+
routeLinearTicket: "route_linear_ticket",
|
|
27011
|
+
listChannelSettings: "list_channel_settings",
|
|
27012
|
+
saveChannelPreset: "save_channel_preset",
|
|
27013
|
+
deleteChannelPreset: "delete_channel_preset",
|
|
27014
|
+
updateChannelSettings: "update_channel_settings",
|
|
27015
|
+
setOrganizationProactivity: "set_organization_proactivity",
|
|
27016
|
+
setSlackAgentDefaults: "set_slack_agent_defaults",
|
|
27017
|
+
claimSettingsOffer: "claim_settings_offer",
|
|
27018
|
+
setThreadMuted: "set_thread_muted",
|
|
27019
|
+
stopWorkspace: "stop_workspace",
|
|
27020
|
+
setSlackConnectMuted: "set_slack_connect_muted",
|
|
27021
|
+
setSlackConnectDefaults: "set_slack_connect_defaults",
|
|
27022
|
+
spawnSubagent: "spawn_subagent",
|
|
27023
|
+
messageSubagent: "message_subagent",
|
|
27024
|
+
listSubagents: "list_subagents",
|
|
27025
|
+
readSubagent: "read_subagent",
|
|
27026
|
+
archiveSubagent: "archive_subagent",
|
|
27027
|
+
mergeWhenReady: "merge_when_ready",
|
|
27028
|
+
waitForSubagents: "wait_for_subagents",
|
|
27029
|
+
getBoard: "get_board",
|
|
27030
|
+
updateBoard: "update_board",
|
|
27031
|
+
updateTicket: "update_ticket",
|
|
27032
|
+
replyOnTicket: "reply_on_ticket",
|
|
27033
|
+
sendToChat: "send_to_chat",
|
|
27034
|
+
setStatus: "set_status",
|
|
27035
|
+
getLinearRouting: "get_linear_routing",
|
|
27036
|
+
setLinearRouting: "set_linear_routing",
|
|
27037
|
+
clearLinearRouting: "clear_linear_routing",
|
|
27038
|
+
getSlackChannel: "get_slack_channel",
|
|
27039
|
+
linkSlackChannel: "link_slack_channel",
|
|
27040
|
+
createSlackChannel: "create_slack_channel",
|
|
27041
|
+
unlinkSlackChannel: "unlink_slack_channel",
|
|
27042
|
+
setSlackChannelLevel: "set_slack_channel_level",
|
|
27043
|
+
createReplica: "create_replica",
|
|
27044
|
+
listReplicas: "list_replicas",
|
|
27045
|
+
getReplica: "get_replica",
|
|
27046
|
+
deleteReplica: "delete_replica",
|
|
27047
|
+
wakeReplica: "wake_replica",
|
|
27048
|
+
sleepReplica: "sleep_replica",
|
|
27049
|
+
archiveReplica: "archive_replica",
|
|
27050
|
+
waitForReplica: "wait_for_replica",
|
|
27051
|
+
runCommand: "run_command",
|
|
27052
|
+
getReplicaHooks: "get_replica_hooks",
|
|
27053
|
+
whoami: "whoami",
|
|
27054
|
+
sendReplicaMessage: "send_replica_message",
|
|
27055
|
+
readReplicaHistory: "read_replica_history",
|
|
27056
|
+
listChats: "list_chats",
|
|
27057
|
+
createChat: "create_chat",
|
|
27058
|
+
deleteChat: "delete_chat",
|
|
27059
|
+
listRepositories: "list_repositories"
|
|
27060
|
+
};
|
|
27061
|
+
automationToolInputSchema = external_exports.object({
|
|
27062
|
+
name: external_exports.string().describe("Short automation name."),
|
|
27063
|
+
prompt: external_exports.string().describe("Prompt each automation run starts with."),
|
|
27064
|
+
environment_id: external_exports.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
27065
|
+
triggers: external_exports.array(automationTriggerSchema).min(1).describe(
|
|
27066
|
+
`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>"] } }\`. Linear: \`{ "type": "linear", "config": { "event": "${LINEAR_ISSUE_STATE_CHANGED_EVENT}", "state_types": ["completed"] } }\`.`
|
|
27067
|
+
),
|
|
27068
|
+
description: external_exports.string().optional().describe("One-line summary shown in the dashboard."),
|
|
27069
|
+
plan_mode: external_exports.boolean().optional(),
|
|
27070
|
+
goal_mode: external_exports.boolean().optional(),
|
|
27071
|
+
fast_mode: external_exports.boolean().optional(),
|
|
27072
|
+
workspace_lifecycle_policy: external_exports.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
27073
|
+
"What happens to a run's workspace when the agent finishes. `delete_when_done` (default, except one-time runs, which default to `default`) when the output lives elsewhere (PR comments, checks, Slack posts); `sleep_when_done` when later runs reuse the workspace, like one per PR across pushes; `default` (keep alive) when people follow up in the workspace."
|
|
27074
|
+
)
|
|
27075
|
+
});
|
|
27076
|
+
credentialUserIdDescription = `Organization automations only: the user ID (see \`${REPLICAS_MCP_TOOLS.whoami}\`) of the member whose coding agent credentials, such as their Claude subscription, runs use before the organization's. Only your workspace's owner, or whoever's credentials this workspace runs on.`;
|
|
27077
|
+
automationBackgroundSchema = external_exports.boolean().optional().describe(
|
|
27078
|
+
"Marks this as an AI agent's own automation (a reminder, follow-up or recurring check-in for its task). Kept out of the main automations list."
|
|
27079
|
+
);
|
|
27080
|
+
automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
27081
|
+
credential_user_id: external_exports.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
|
|
27082
|
+
background: automationBackgroundSchema,
|
|
27083
|
+
scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
27084
|
+
});
|
|
27085
|
+
automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
27086
|
+
automation_id: external_exports.string().describe("Automation ID"),
|
|
27087
|
+
enabled: external_exports.boolean().optional(),
|
|
27088
|
+
agent_provider: external_exports.enum(ENGINE_AGENT_PROVIDERS).nullable().optional(),
|
|
27089
|
+
model: external_exports.string().nullable().optional(),
|
|
27090
|
+
thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
27091
|
+
workspace_size: external_exports.enum(WORKSPACE_SIZES).optional(),
|
|
27092
|
+
credential_user_id: external_exports.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
|
|
27093
|
+
background: automationBackgroundSchema,
|
|
27094
|
+
scope: external_exports.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
27095
|
+
});
|
|
27096
|
+
chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
|
|
27097
|
+
({ provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape);
|
|
27098
|
+
createChatToolInputSchema = external_exports.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
27099
|
+
forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
27100
|
+
renameChatToolInputSchema = external_exports.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
27101
|
+
runCommandToolInputSchema = external_exports.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
27102
|
+
environmentMcpPath = { environment_id: external_exports.string().describe("Environment ID") };
|
|
27103
|
+
createEnvironmentMcpToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
27104
|
+
updateEnvironmentMcpToolInputSchema = external_exports.object({
|
|
27105
|
+
...environmentMcpPath,
|
|
27106
|
+
mcp_id: external_exports.string().describe("MCP ID"),
|
|
27107
|
+
...updateEnvironmentMcpRequestSchema.shape
|
|
27108
|
+
});
|
|
27109
|
+
createEnvironmentDeviceToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
27110
|
+
previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
27111
|
+
applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
27112
|
+
}
|
|
27113
|
+
});
|
|
26999
27114
|
|
|
27000
|
-
|
|
27001
|
-
|
|
27002
|
-
|
|
27003
|
-
|
|
27115
|
+
// ../shared/src/scout.ts
|
|
27116
|
+
var SCOUT_SOURCE_TYPES, SCOUT_PROACTIVITY_LEVELS, SCOUT_PRESET_NAME_MAX_LENGTH, SCOUT_CHANNEL_SETTINGS_OFFERS, SCOUT_SETTINGS_OFFERS, SCOUT_PRESET_ICONS;
|
|
27117
|
+
var init_scout = __esm({
|
|
27118
|
+
"../shared/src/scout.ts"() {
|
|
27119
|
+
"use strict";
|
|
27120
|
+
SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
27121
|
+
SCOUT_PROACTIVITY_LEVELS = ["tagged", "conservative", "balanced", "proactive"];
|
|
27122
|
+
SCOUT_PRESET_NAME_MAX_LENGTH = 50;
|
|
27123
|
+
SCOUT_CHANNEL_SETTINGS_OFFERS = ["proactivity", "raise_proactivity", "instructions"];
|
|
27124
|
+
SCOUT_SETTINGS_OFFERS = [...SCOUT_CHANNEL_SETTINGS_OFFERS, "organization_proactivity", "raise_organization_proactivity"];
|
|
27125
|
+
SCOUT_PRESET_ICONS = [
|
|
27126
|
+
"users",
|
|
27127
|
+
"user",
|
|
27128
|
+
"inbox",
|
|
27129
|
+
"building",
|
|
27130
|
+
"bug",
|
|
27131
|
+
"message-circle",
|
|
27132
|
+
"headphones",
|
|
27133
|
+
"heart",
|
|
27134
|
+
"star",
|
|
27135
|
+
"flag",
|
|
27136
|
+
"zap",
|
|
27137
|
+
"shield",
|
|
27138
|
+
"code",
|
|
27139
|
+
"terminal",
|
|
27140
|
+
"rocket",
|
|
27141
|
+
"wrench",
|
|
27142
|
+
"briefcase",
|
|
27143
|
+
"globe",
|
|
27144
|
+
"book-open",
|
|
27145
|
+
"lightbulb",
|
|
27146
|
+
"target",
|
|
27147
|
+
"bell",
|
|
27148
|
+
"layers",
|
|
27149
|
+
"tag"
|
|
27150
|
+
];
|
|
27151
|
+
}
|
|
27152
|
+
});
|
|
27004
27153
|
|
|
27005
|
-
|
|
27154
|
+
// ../shared/src/default-skills/scout-settings.ts
|
|
27155
|
+
var SCOUT_SETTINGS_SKILL_NAME, CONTENT;
|
|
27156
|
+
var init_scout_settings = __esm({
|
|
27157
|
+
"../shared/src/default-skills/scout-settings.ts"() {
|
|
27158
|
+
"use strict";
|
|
27159
|
+
init_replicas_mcp();
|
|
27160
|
+
init_scout();
|
|
27161
|
+
SCOUT_SETTINGS_SKILL_NAME = "scout-settings";
|
|
27162
|
+
CONTENT = `---
|
|
27163
|
+
name: ${SCOUT_SETTINGS_SKILL_NAME}
|
|
27164
|
+
description: Use when someone asks what Replicas can do or what they can change ("what can you do?", "what can I change here?"), asks to change or explain how Replicas behaves in Slack or Linear (channel levels, "be quieter", "only reply when tagged", silent mode, mute, channel or team instructions, presets, monitored Linear teams, Slack Connect defaults, Slack agent defaults), when someone is annoyed that Scout replied unasked ("not you", "nobody asked", a thumbs-down), when making or answering a settings or automation offer, or when setting up an automation. Not for routing ordinary requests.
|
|
27165
|
+
---
|
|
27006
27166
|
|
|
27007
|
-
|
|
27167
|
+
# Scout settings
|
|
27008
27168
|
|
|
27009
|
-
|
|
27169
|
+
There is no settings page: people change how Replicas behaves by asking you, and you own every setting below. Handle requests here, never by spawning a workspace. People know you as Replicas, so never say Scout to them.
|
|
27010
27170
|
|
|
27011
|
-
|
|
27012
|
-
|
|
27013
|
-
|
|
27014
|
-
|
|
27015
|
-
|
|
27171
|
+
## What you can do
|
|
27172
|
+
| Ask | How | Who |
|
|
27173
|
+
| --- | --- | --- |
|
|
27174
|
+
| How much you speak up in a channel or group DM (Mentions only, Low, Balanced, High) | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`proactivity\` | Any member, except that raising one from Mentions only needs an admin |
|
|
27175
|
+
| How much you speak up in every channel | \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\` | Admin |
|
|
27176
|
+
| Silent mode for a channel, also asked as muting you there (you still read it and follow its instructions, but never post there) | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`silent\` | Admin |
|
|
27177
|
+
| Instructions for a channel or Linear team, such as "file bugs in Linear and post them in #triage", "send actionable messages to App Support", or "mobile requests go to the mobile-ios environment" | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`instructions\` | Any member |
|
|
27178
|
+
| Create, edit, or delete a preset (reusable instructions), or assign one | \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`preset_id\` | Any member |
|
|
27179
|
+
| Defaults for every channel shared with another company: preset, instructions, level, silent mode | \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` | Admin |
|
|
27180
|
+
| Triage new issues in a Linear team, or stop | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`source: linear\`, \`monitored\` | Admin starts; any member stops |
|
|
27181
|
+
| Agent, model, thinking level, goal mode, and fast mode for tasks started from Slack | \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` | Admin |
|
|
27182
|
+
| Stay quiet in this thread, or come back | \`${REPLICAS_MCP_TOOLS.setThreadMuted}\` | Anyone in the thread |
|
|
27183
|
+
| A recurring task ("every Monday, summarize open PRs in #eng") | \`${REPLICAS_MCP_TOOLS.createAutomation}\` (see Automations) | Members who can create automations |
|
|
27016
27184
|
|
|
27017
|
-
|
|
27185
|
+
You also answer questions, start a workspace for a task (in a separate thread when asked), relay follow-ups to a thread's workspace, stop it, hand a thread to a Mothership by name, and file Linear tickets with \`replicas.linear.graphql\`. Spawn for a one-time reminder ("remind me tomorrow at 9"): workspaces can schedule one-time runs.
|
|
27018
27186
|
|
|
27019
|
-
|
|
27187
|
+
A person's own defaults (agent, model, environment) and the organization's general defaults are changed in the Replicas app, not by you; Slack tasks use them unless the Slack agent defaults above say otherwise.
|
|
27020
27188
|
|
|
27021
|
-
|
|
27022
|
-
2. Run \`replicas visualize <page.html> --title "<short title>"\`. It checks the page in a headless browser, publishes it, and prints two screenshots (dark at desktop width, light at phone width) with any console errors and layout warnings.
|
|
27023
|
-
3. Open both screenshots and look. If anything is wrong, fix the page and publish again, then use the newest line. While iterating, \`replicas visualize <page.html> --check\` renders without publishing.
|
|
27024
|
-
4. Paste the printed \`\` line on its own line where the visual belongs in your final reply.
|
|
27189
|
+
You can't add yourself to or remove yourself from a channel: people type \`/invite @Replicas\` or \`/remove @Replicas\` there, and an admin can pick channels under Integrations, Slack, Configure. To keep you in a channel but out of the way, lower it to Mentions only or put it in silent mode. A channel becomes a Mothership's own channel from that Mothership, not here; any channel's instructions can still send its messages to a Mothership.
|
|
27025
27190
|
|
|
27026
|
-
##
|
|
27191
|
+
## Tools
|
|
27192
|
+
Read presets, channel instructions, and levels with \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Change them with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\`, \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`, \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`, or \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`. Every change takes \`confirmation_*\` arguments naming who asked. For a Slack message, fill them with its envelope \`channel_id\`, \`thread_ts\`, \`message_ts\`, and \`user_id\`. A message from a person in the Replicas dashboard has no \`[Slack]\` envelope and carries a \`confirmation_dashboard_token\`: pass only that, never one from another message, and answer in the chat. The server checks that the person who asked is an organization member (and an admin where noted). If it refuses, say why briefly and change nothing.
|
|
27027
27193
|
|
|
27028
|
-
|
|
27194
|
+
## Changing settings
|
|
27195
|
+
- Settings also change outside your chat, often on purpose: read the current settings first, never trust earlier messages, and never re-apply an earlier request the current message doesn't ask for. Save only what the current message asks.
|
|
27196
|
+
- **Levels**, lowest to highest: \`tagged\` (only @Replicas pings reach you, not even messages naming Replicas), \`conservative\` (also messages naming Replicas or Scout, and follow-ups in threads with a workspace), \`balanced\` (the normal triage rules), \`proactive\` (also clear untagged questions and requests). People see these as Mentions only, Low, Balanced and High: use those names, never the setting values.
|
|
27197
|
+
- The organization has one level for its whole Slack workspace, which only an admin can set with \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`. A channel or group DM can override it with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` and \`proactivity\`. 1:1 DMs are always addressed to you. Any member can lower a channel; raising one above \`tagged\` needs an admin.
|
|
27198
|
+
- A request that points at a channel ("here", "in #eng", "stop replying in #random") changes that channel only. One that doesn't ("only respond when I @ you", "don't auto-reply to Slack messages") means the organization level. When it names a channel, even without "#" ("make support-inbound quieter"), find it with \`conversations.list\` and change that one, not the one you were asked in; ask if none or several match. If a non-admin asks for an organization change, say an organization admin has to ask, and offer the channel-only change when they asked from a channel. Instructions don't substitute for a level.
|
|
27199
|
+
- **Instructions and presets:** prefer changing the channel's own instructions; edit a shared preset only when asked, since every channel using it changes. To set up a channel without being told how, read enough of it to propose short instructions or a fitting preset (customer, vendor, internal team), and save nothing until they confirm. Never infer a channel's purpose only because Slack marks it externally shared.
|
|
27200
|
+
- **Silent mode** is what people mean by muting you in a channel. A channel in silent mode still reaches you as its level allows, and you follow its instructions anywhere but there. For "watch #alerts and report to #team", an admin turns on \`silent\` for the watched channel, raises it to Balanced or High so untagged messages reach you, and its instructions name where to report. It is separate from a thread mute, which lasts hours and only quiets one thread.
|
|
27201
|
+
- **Linear teams:** set \`monitored: true\` to start triaging a team (admin only) and \`monitored: false\` to stop. Teams take a preset or instructions like channels.
|
|
27202
|
+
- **Slack Connect** channels shared with another company follow the organization's shared-channel defaults (\`tagged\` with no preset unless an admin set them with \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`) until they get their own settings, unless a Mothership is linked to one. A request about all shared or customer channels changes only those defaults: leave channels with their own settings as they are, list them, and offer to switch them too. Asked why you stay quiet in one, say it's external and an admin can ask you to raise its level.
|
|
27203
|
+
- **Slack agent defaults:** to change the agent, model, thinking level, goal mode, or fast mode for tasks started from Slack ("use Codex for Slack tasks"), call \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` (admin only).
|
|
27204
|
+
- **"What can you do?"** Keep it short: one line on what you do (answer questions, start a workspace for a task, hand work to a Mothership, file Linear tickets, set up recurring tasks), two or three example requests in backticks drawn from both work and behavior (like \`fix the flaky login test\`, \`only reply here when tagged\`, \`every Monday, summarize open PRs\`), then "Ask me what you can change here to see every setting." No settings list or current values.
|
|
27205
|
+
- **"What can I change?"** Read the current settings, then reply in a few short lines from **What you can do**: what applies here with its current value (this channel's level, silent mode, instructions or preset), then what applies everywhere (the every-channel level, shared-channel defaults, Linear teams, Slack agent defaults), marking what needs an admin. Give one example phrasing, like "only reply here when tagged".
|
|
27206
|
+
- After any change, say what changed and its scope ("every channel", or "#eng only"). Confirm only after the tool succeeded and only what it changed; say so when it failed or did less than asked.
|
|
27029
27207
|
|
|
27030
|
-
##
|
|
27208
|
+
## Offers
|
|
27209
|
+
When the envelope has \`offers\`, it lists the offers you may still make in this channel (${SCOUT_CHANNEL_SETTINGS_OFFERS.map((offer) => `\`${offer}\``).join(", ")}); \`offers=none\` means none. Offer only what it lists, at most one per message. Claim the offer with \`${REPLICAS_MCP_TOOLS.claimSettingsOffer}\` right before posting it, and post only when the claim succeeds. When someone declines ("no", "it's fine", "leave it"), record it with \`declined: true\`; never repeat an ignored offer. When they accept, apply it with the tools above using the accepting message as confirmation, then confirm in one short line.
|
|
27210
|
+
- **Frustration.** When someone is clearly annoyed that you replied or acted unasked ("wtf why did replicas respond", "not you", "nobody asked", or a thumbs-down on a reply you posted unasked), claim \`proactivity\` and post one short apology offering to lower this channel exactly one step. From Balanced or High: "Sorry for jumping in. Want me to only reply here when someone mentions me by name?" From Low: "Sorry for jumping in. Want me to only reply here when someone @mentions me?" On a yes, set that level, nothing lower. Do nothing else in that thread. When the claim answers \`offer: organization\`, offer to set every channel's default to \`organization_target\` instead; when \`requester_is_admin\` is false, say an admin can change it for every channel and offer this channel. An explicit "stop replying in this thread" is still a thread mute.
|
|
27211
|
+
- **Having to tag you.** After doing what an earlier untagged message asked, claim \`raise_proactivity\` and end your reply with one line offering one step up. From Mentions only: "Want me to pick up messages here that name me, without an @mention? @mention me with your answer." From Low: "Want me to pick up requests like that here without a tag next time? I can raise this channel to Balanced." From Balanced: "Want me to jump in on requests like that here without being asked? I can raise this channel to High." When the claim answers \`offer: organization\`, offer to raise every channel's default to \`organization_target\` instead, and say channels with their own level keep it. Mention an admin only when the claim answers \`needs_admin: true\`, then offer this channel instead. On a yes, raise to that level only.
|
|
27212
|
+
- **Channel instructions.** When you join a channel or first act in one whose name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), claim \`instructions\` and offer one concrete behavior in one line ("This looks like an incident channel. Want me to triage new reports here, check for duplicates, and post findings in the thread?"). Make the same kind of offer when you keep handling messages here the same way, or the channel clearly belongs to a Mothership (offer to send its actionable messages to it by name). On a yes, save it as the channel's instructions, or its preset when one fits exactly.
|
|
27031
27213
|
|
|
27032
|
-
|
|
27033
|
-
|
|
27034
|
-
- The line only renders in Replicas chat. When you post to pull requests, Slack, Linear, or anywhere else, link the printed Forge link instead. Leave the Forge link out of your chat reply.
|
|
27214
|
+
## Automations
|
|
27215
|
+
When someone asks for a recurring task or accepts an offer to automate a repeated request, set it up here instead of spawning. Infer the name, prompt, environment, repositories, schedule, and timezone from the conversation and the organization's configuration; ask one concise follow-up only for a missing detail that changes when or where it runs. Create it with \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling \`confirmation_*\` from the envelope of the message that asked or accepted. The server checks that author is an organization member with automation write access; never create it if that fails. Post the result in the same thread.
|
|
27035
27216
|
`;
|
|
27036
|
-
VISUALS_ABILITY = {
|
|
27037
|
-
label: "Visuals",
|
|
27038
|
-
description: "Show charts, diagrams, comparisons, and mockups inline in chat replies.",
|
|
27039
|
-
// The visuals_instructions system prompt block is its trigger.
|
|
27040
|
-
bullet: "",
|
|
27041
|
-
section: SECTION17,
|
|
27042
|
-
referenceFile: { name: "VISUALS.md", content: REFERENCE17 }
|
|
27043
|
-
};
|
|
27044
|
-
}
|
|
27045
|
-
});
|
|
27046
|
-
|
|
27047
|
-
// ../shared/src/default-skills/replicas-agent/registry.ts
|
|
27048
|
-
var REPLICAS_AGENT_ABILITY_REGISTRY, REPLICAS_AGENT_ABILITIES;
|
|
27049
|
-
var init_registry = __esm({
|
|
27050
|
-
"../shared/src/default-skills/replicas-agent/registry.ts"() {
|
|
27051
|
-
"use strict";
|
|
27052
|
-
init_computer();
|
|
27053
|
-
init_docker();
|
|
27054
|
-
init_environment_setup();
|
|
27055
|
-
init_github2();
|
|
27056
|
-
init_gitlab();
|
|
27057
|
-
init_gpu();
|
|
27058
|
-
init_linear3();
|
|
27059
|
-
init_local_computer();
|
|
27060
|
-
init_macos();
|
|
27061
|
-
init_media();
|
|
27062
|
-
init_previews();
|
|
27063
|
-
init_plugins2();
|
|
27064
|
-
init_replicas();
|
|
27065
|
-
init_sentry();
|
|
27066
|
-
init_session_history();
|
|
27067
|
-
init_slack();
|
|
27068
|
-
init_visuals2();
|
|
27069
|
-
REPLICAS_AGENT_ABILITY_REGISTRY = {
|
|
27070
|
-
replicas: REPLICAS_ABILITY,
|
|
27071
|
-
memory: SESSION_HISTORY_ABILITY,
|
|
27072
|
-
computer: COMPUTER_ABILITY,
|
|
27073
|
-
docker: DOCKER_ABILITY,
|
|
27074
|
-
environment_setup: ENVIRONMENT_SETUP_ABILITY,
|
|
27075
|
-
github: GITHUB_ABILITY,
|
|
27076
|
-
gitlab: GITLAB_ABILITY,
|
|
27077
|
-
gpu: GPU_ABILITY,
|
|
27078
|
-
linear: LINEAR_ABILITY,
|
|
27079
|
-
local_computer: LOCAL_COMPUTER_ABILITY,
|
|
27080
|
-
macos: MACOS_ABILITY,
|
|
27081
|
-
media: MEDIA_ABILITY,
|
|
27082
|
-
plugins: PLUGINS_ABILITY,
|
|
27083
|
-
previews: PREVIEWS_ABILITY,
|
|
27084
|
-
sentry: SENTRY_ABILITY,
|
|
27085
|
-
slack: SLACK_ABILITY,
|
|
27086
|
-
visuals: VISUALS_ABILITY
|
|
27087
|
-
};
|
|
27088
|
-
REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
27089
|
-
REPLICAS_AGENT_ABILITY_REGISTRY
|
|
27090
|
-
);
|
|
27091
|
-
}
|
|
27092
|
-
});
|
|
27093
|
-
|
|
27094
|
-
// ../shared/src/routes/preferences.ts
|
|
27095
|
-
function defaultReplicasAgentAbilities() {
|
|
27096
|
-
const abilities = {};
|
|
27097
|
-
for (const key of REPLICAS_AGENT_ABILITIES) {
|
|
27098
|
-
abilities[key] = true;
|
|
27099
|
-
}
|
|
27100
|
-
if (hasAllReplicasAgentAbilities(abilities)) return abilities;
|
|
27101
|
-
throw new Error("Default Replicas agent ability flags are incomplete");
|
|
27102
|
-
}
|
|
27103
|
-
function hasAllReplicasAgentAbilities(abilities) {
|
|
27104
|
-
return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
|
|
27105
|
-
}
|
|
27106
|
-
var EMPTY_AGENT_DEFAULT_SETTINGS, DEFAULT_SUBAGENT_MCP_PROVIDERS, ALERT_SOUND_FAMILIES, ALERT_SOUNDS, WALLPAPER_DITHERS, WALLPAPER_EFFECTS, PUSH_WHEN_ACTIVE_COPY, DEFAULT_USER_PREFERENCES, DEFAULT_DEFAULT_SKILLS, LINEAR_ROUTING_SKILL_MAX_LENGTH, linearRoutingSkillSchema;
|
|
27107
|
-
var init_preferences = __esm({
|
|
27108
|
-
"../shared/src/routes/preferences.ts"() {
|
|
27109
|
-
"use strict";
|
|
27110
|
-
init_zod();
|
|
27111
|
-
init_uuid();
|
|
27112
|
-
init_agent();
|
|
27113
|
-
init_push();
|
|
27114
|
-
init_registry();
|
|
27115
|
-
EMPTY_AGENT_DEFAULT_SETTINGS = {
|
|
27116
|
-
agent_provider: null,
|
|
27117
|
-
model: null,
|
|
27118
|
-
thinking_level: null,
|
|
27119
|
-
goal_mode: null,
|
|
27120
|
-
fast_mode: null
|
|
27121
|
-
};
|
|
27122
|
-
DEFAULT_SUBAGENT_MCP_PROVIDERS = [...ENGINE_AGENT_PROVIDERS];
|
|
27123
|
-
ALERT_SOUND_FAMILIES = {
|
|
27124
|
-
glass: ["glint", "tap", "ripple", "halo"],
|
|
27125
|
-
wood: ["ready", "pluck", "knock", "bloom", "steps"]
|
|
27126
|
-
};
|
|
27127
|
-
ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
|
|
27128
|
-
WALLPAPER_DITHERS = ["dither", "halftone", "modulation"];
|
|
27129
|
-
WALLPAPER_EFFECTS = ["soft", "grain", "duotone", ...WALLPAPER_DITHERS, "none"];
|
|
27130
|
-
PUSH_WHEN_ACTIVE_COPY = {
|
|
27131
|
-
wait: `Wait ${PUSH_HOLD_MINUTES} minutes`,
|
|
27132
|
-
skip: "Don\u2019t send",
|
|
27133
|
-
send: "Send right away"
|
|
27134
|
-
};
|
|
27135
|
-
DEFAULT_USER_PREFERENCES = {
|
|
27136
|
-
default_agent: null,
|
|
27137
|
-
default_model: null,
|
|
27138
|
-
claude_models: null,
|
|
27139
|
-
codex_models: null,
|
|
27140
|
-
cursor_models: null,
|
|
27141
|
-
claude_hidden_models: null,
|
|
27142
|
-
codex_hidden_models: null,
|
|
27143
|
-
cursor_hidden_models: null,
|
|
27144
|
-
openrouter_models: null,
|
|
27145
|
-
opencode_go_models: null,
|
|
27146
|
-
close_workspace_on_pr_close: false,
|
|
27147
|
-
close_workspace_on_pr_merge: false,
|
|
27148
|
-
default_environment_id: null,
|
|
27149
|
-
respond_to_ci_workflows: true,
|
|
27150
|
-
respond_to_ci_checks: true,
|
|
27151
|
-
respond_to_human_pr_reviews: false,
|
|
27152
|
-
pr_user_attribution: false,
|
|
27153
|
-
github_commit_name: null,
|
|
27154
|
-
github_commit_email: null,
|
|
27155
|
-
auto_draft_prs: false,
|
|
27156
|
-
open_prs_in_graphite: false,
|
|
27157
|
-
open_links_in_desktop_app: false,
|
|
27158
|
-
local_control: false,
|
|
27159
|
-
spotify_controls: false,
|
|
27160
|
-
appshot_shortcut: "command",
|
|
27161
|
-
appshot_destination: "automatic",
|
|
27162
|
-
appshot_sound: true,
|
|
27163
|
-
keyboard_shortcuts: {},
|
|
27164
|
-
mothership_tour_seen: false,
|
|
27165
|
-
slack_settings_moved_notice: false,
|
|
27166
|
-
mothership_board_opened: false,
|
|
27167
|
-
follow_up_mode: "steer",
|
|
27168
|
-
send_key: "enter",
|
|
27169
|
-
memory_enabled: null,
|
|
27170
|
-
subagent_mcp_enabled: null,
|
|
27171
|
-
default_fast_mode: false,
|
|
27172
|
-
auto_compact_tokens: null,
|
|
27173
|
-
agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
|
|
27174
|
-
fallback_chains: null,
|
|
27175
|
-
alert_sound: null,
|
|
27176
|
-
workspace_alerts: {},
|
|
27177
|
-
automation_alerts: {},
|
|
27178
|
-
push_types: { needs_you: true, finished: true, automations: true, usage_limit: true },
|
|
27179
|
-
push_when_active: "wait",
|
|
27180
|
-
chat_text_size: "default",
|
|
27181
|
-
app_font: "inter",
|
|
27182
|
-
code_font: "geist-mono",
|
|
27183
|
-
wallpaper: null
|
|
27184
|
-
};
|
|
27185
|
-
DEFAULT_DEFAULT_SKILLS = {
|
|
27186
|
-
replicas_agent: {
|
|
27187
|
-
enabled: true,
|
|
27188
|
-
abilities: defaultReplicasAgentAbilities()
|
|
27189
|
-
}
|
|
27190
|
-
};
|
|
27191
|
-
LINEAR_ROUTING_SKILL_MAX_LENGTH = 5e4;
|
|
27192
|
-
linearRoutingSkillSchema = external_exports.union([
|
|
27193
|
-
external_exports.object({ name: external_exports.string().min(1), content: external_exports.string().trim().min(1).max(LINEAR_ROUTING_SKILL_MAX_LENGTH) }),
|
|
27194
|
-
external_exports.object({ name: external_exports.string().min(1), repository_id: external_exports.string().regex(UUID_RE), path: external_exports.string().min(1) })
|
|
27195
|
-
]);
|
|
27196
27217
|
}
|
|
27197
27218
|
});
|
|
27198
27219
|
|
|
@@ -37655,6 +37676,16 @@ function toolCallMessage(id, name, args, timestamp, result) {
|
|
|
37655
37676
|
if (name === "web_search" && typeof args.query === "string") {
|
|
37656
37677
|
return { id, type: "web_search", query: args.query, status, timestamp };
|
|
37657
37678
|
}
|
|
37679
|
+
if (name === "spawn_agent") {
|
|
37680
|
+
const spawned = result?.output ? (() => {
|
|
37681
|
+
try {
|
|
37682
|
+
return JSON.parse(result.output);
|
|
37683
|
+
} catch {
|
|
37684
|
+
return null;
|
|
37685
|
+
}
|
|
37686
|
+
})() : null;
|
|
37687
|
+
return { id, type: "subagent", toolUseId: id, description: typeof args.title === "string" ? args.title : "Replicas subagent", prompt: typeof args.prompt === "string" ? args.prompt : "", subagentType: "replicas", model: typeof args.model === "string" ? args.model : void 0, receiverThreadIds: isRecord(spawned) && typeof spawned.agentId === "string" ? [spawned.agentId] : void 0, status: result?.isError ? "failed" : "in_progress", nestedEvents: [], timestamp };
|
|
37688
|
+
}
|
|
37658
37689
|
return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp });
|
|
37659
37690
|
}
|
|
37660
37691
|
function parseReplicasEvents(events) {
|
|
@@ -37674,13 +37705,24 @@ function parseReplicasEvents(events) {
|
|
|
37674
37705
|
messages.push({ id: getUserMessageId(event) ?? `replicas-pending-${timestamp}`, type: "user", content: payload.message, ...images ? { images } : {}, timestamp });
|
|
37675
37706
|
return;
|
|
37676
37707
|
}
|
|
37708
|
+
case `${HARNESS_EVENT_TYPE_PREFIX}cancelled_message`:
|
|
37677
37709
|
case `${HARNESS_EVENT_TYPE_PREFIX}user_message`: {
|
|
37710
|
+
if (isRecord(payload.agentOutcome)) {
|
|
37711
|
+
messages.push({ id: `replicas-peer-${String(payload.seq)}`, type: "peer_message", direction: "received", chat: typeof payload.agentOutcome.agentId === "string" ? payload.agentOutcome.agentId : void 0, content: extractToolResultText(message2.content), timestamp });
|
|
37712
|
+
for (const item of messages) {
|
|
37713
|
+
if (item.type === "subagent" && item.receiverThreadIds?.includes(String(payload.agentOutcome.agentId))) {
|
|
37714
|
+
item.status = payload.agentOutcome.status === "completed" ? "completed" : payload.agentOutcome.status === "help" ? "in_progress" : "failed";
|
|
37715
|
+
item.output = typeof payload.agentOutcome.response === "string" ? payload.agentOutcome.response : void 0;
|
|
37716
|
+
}
|
|
37717
|
+
}
|
|
37718
|
+
return;
|
|
37719
|
+
}
|
|
37678
37720
|
const images = blockImages(contentBlocks(message2.content));
|
|
37679
37721
|
const messageId = payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
37680
37722
|
messages.push({
|
|
37681
37723
|
id: typeof messageId === "string" ? messageId : `replicas-user-${String(payload.seq)}`,
|
|
37682
37724
|
type: "user",
|
|
37683
|
-
content: extractToolResultText(message2.content)
|
|
37725
|
+
content: `${event.type === `${HARNESS_EVENT_TYPE_PREFIX}cancelled_message` ? "[Cancelled before it started]\n\n" : ""}${extractToolResultText(message2.content)}`,
|
|
37684
37726
|
...images.length ? { images } : {},
|
|
37685
37727
|
timestamp
|
|
37686
37728
|
});
|
|
@@ -39442,7 +39484,7 @@ var init_organizations = __esm({
|
|
|
39442
39484
|
});
|
|
39443
39485
|
|
|
39444
39486
|
// ../shared/src/harness/types.ts
|
|
39445
|
-
var HARNESS_THREAD_STATUSES, textSchema, imageSchema, userMessageSchema, assistantMessageSchema, toolResultMessageSchema, harnessInboxPayloadSchemas, harnessEventBodySchema, harnessLiveMessageSchema;
|
|
39487
|
+
var HARNESS_THREAD_STATUSES, textSchema, imageSchema, userMessageSchema, assistantMessageSchema, toolResultMessageSchema, harnessAgentOutcomeSchema, HARNESS_AGENT_TYPES, harnessThreadOriginSchema, harnessInboxPayloadSchemas, harnessEventBodySchema, harnessLiveMessageSchema;
|
|
39446
39488
|
var init_types8 = __esm({
|
|
39447
39489
|
"../shared/src/harness/types.ts"() {
|
|
39448
39490
|
"use strict";
|
|
@@ -39486,11 +39528,26 @@ var init_types8 = __esm({
|
|
|
39486
39528
|
isError: external_exports.boolean(),
|
|
39487
39529
|
timestamp: external_exports.number()
|
|
39488
39530
|
});
|
|
39531
|
+
harnessAgentOutcomeSchema = external_exports.object({
|
|
39532
|
+
agentId: external_exports.string().uuid(),
|
|
39533
|
+
assignmentId: external_exports.string(),
|
|
39534
|
+
status: external_exports.enum(["completed", "cancelled", "error", "help"]),
|
|
39535
|
+
response: external_exports.string()
|
|
39536
|
+
});
|
|
39537
|
+
HARNESS_AGENT_TYPES = ["general", "explore", "execute"];
|
|
39538
|
+
harnessThreadOriginSchema = external_exports.object({
|
|
39539
|
+
kind: external_exports.enum(["side_chat", "subagent"]),
|
|
39540
|
+
agentType: external_exports.enum(HARNESS_AGENT_TYPES).optional(),
|
|
39541
|
+
parentThreadId: external_exports.string().uuid(),
|
|
39542
|
+
depth: external_exports.number().int().nonnegative(),
|
|
39543
|
+
message: userMessageSchema
|
|
39544
|
+
});
|
|
39489
39545
|
harnessInboxPayloadSchemas = {
|
|
39490
39546
|
message: external_exports.looseObject({
|
|
39491
39547
|
message: userMessageSchema,
|
|
39492
39548
|
userId: external_exports.string().nullable(),
|
|
39493
39549
|
messageId: external_exports.string().optional(),
|
|
39550
|
+
agentOutcome: harnessAgentOutcomeSchema.optional(),
|
|
39494
39551
|
model: external_exports.string().optional(),
|
|
39495
39552
|
thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional(),
|
|
39496
39553
|
instructionsHash: external_exports.string().optional(),
|
|
@@ -39499,10 +39556,14 @@ var init_types8 = __esm({
|
|
|
39499
39556
|
instructions: external_exports.object({ environmentSystemPrompt: external_exports.string().optional(), customInstructions: external_exports.string().optional() }).optional(),
|
|
39500
39557
|
errorNotificationTarget: integrationErrorNotificationTargetSchema.optional()
|
|
39501
39558
|
}),
|
|
39502
|
-
interrupt: external_exports.looseObject({ userId: external_exports.string().nullable() })
|
|
39559
|
+
interrupt: external_exports.looseObject({ userId: external_exports.string().nullable(), messageId: external_exports.string().optional(), cancelQueued: external_exports.boolean().optional() })
|
|
39503
39560
|
};
|
|
39504
39561
|
harnessEventBodySchema = external_exports.discriminatedUnion("type", [
|
|
39562
|
+
external_exports.object({ type: external_exports.literal("thread_origin"), payload: harnessThreadOriginSchema }),
|
|
39563
|
+
external_exports.object({ type: external_exports.literal("agent_outcome"), payload: harnessAgentOutcomeSchema }),
|
|
39505
39564
|
external_exports.object({ type: external_exports.literal("user_message"), payload: harnessInboxPayloadSchemas.message }),
|
|
39565
|
+
external_exports.object({ type: external_exports.literal("cancelled_message"), payload: harnessInboxPayloadSchemas.message }),
|
|
39566
|
+
external_exports.object({ type: external_exports.literal("interrupt"), payload: harnessInboxPayloadSchemas.interrupt }),
|
|
39506
39567
|
/** Saved before its tool calls run. */
|
|
39507
39568
|
external_exports.object({ type: external_exports.literal("assistant_message"), payload: external_exports.looseObject({ message: assistantMessageSchema }) }),
|
|
39508
39569
|
external_exports.object({ type: external_exports.literal("tool_result"), payload: external_exports.looseObject({ message: toolResultMessageSchema }) }),
|
|
@@ -39536,6 +39597,15 @@ var init_types8 = __esm({
|
|
|
39536
39597
|
}
|
|
39537
39598
|
});
|
|
39538
39599
|
|
|
39600
|
+
// ../shared/src/harness/context.ts
|
|
39601
|
+
var MAX_REFERENCE_IMAGE_BYTES;
|
|
39602
|
+
var init_context = __esm({
|
|
39603
|
+
"../shared/src/harness/context.ts"() {
|
|
39604
|
+
"use strict";
|
|
39605
|
+
MAX_REFERENCE_IMAGE_BYTES = 8 * 1024 * 1024;
|
|
39606
|
+
}
|
|
39607
|
+
});
|
|
39608
|
+
|
|
39539
39609
|
// ../shared/src/harness/worker-routes.ts
|
|
39540
39610
|
var harnessWorkerEngineRequestSchema, harnessWorkerEngineResponseSchema, harnessWorkerCredentialRequestSchema, harnessWorkerCredentialResponseSchema, harnessWorkerTurnCompleteRequestSchema;
|
|
39541
39611
|
var init_worker_routes = __esm({
|
|
@@ -39630,7 +39700,7 @@ var CLI_VERSION;
|
|
|
39630
39700
|
var init_cli_version = __esm({
|
|
39631
39701
|
"../shared/src/cli-version.ts"() {
|
|
39632
39702
|
"use strict";
|
|
39633
|
-
CLI_VERSION = "0.3.
|
|
39703
|
+
CLI_VERSION = "0.3.475";
|
|
39634
39704
|
}
|
|
39635
39705
|
});
|
|
39636
39706
|
|
|
@@ -50645,6 +50715,7 @@ var init_src = __esm({
|
|
|
50645
50715
|
init_replicas_mcp();
|
|
50646
50716
|
init_subagent_mcp();
|
|
50647
50717
|
init_types8();
|
|
50718
|
+
init_context();
|
|
50648
50719
|
init_worker_routes();
|
|
50649
50720
|
init_headless_agent();
|
|
50650
50721
|
init_errors3();
|
|
@@ -50690,7 +50761,7 @@ var init_src = __esm({
|
|
|
50690
50761
|
init_linear();
|
|
50691
50762
|
init_slack2();
|
|
50692
50763
|
init_scout2();
|
|
50693
|
-
|
|
50764
|
+
init_plugins2();
|
|
50694
50765
|
init_sentry2();
|
|
50695
50766
|
init_infisical();
|
|
50696
50767
|
init_doppler();
|