replicas-engine 0.1.1633 → 0.1.1635
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/src/{asp-host-7H6YX6UX.js → asp-host-FRHDOPWV.js} +5 -5
- package/dist/src/{chunk-LOSXCZQF.js → chunk-76YCZMMZ.js} +1091 -1029
- package/dist/src/{chunk-LOS4XS5X.js → chunk-AMJ2SVUW.js} +1 -1
- package/dist/src/{chunk-MWSGR5K7.js → chunk-CYRN62DZ.js} +1 -1
- package/dist/src/{chunk-ESJ7XDED.js → chunk-I5VADKCS.js} +3 -3
- package/dist/src/{chunk-G7CP5UGN.js → chunk-NVJYLSRW.js} +6 -6
- package/dist/src/{chunk-GUCHYVO3.js → chunk-W3DI4PWU.js} +2 -2
- package/dist/src/{chunk-NZCJGYXC.js → chunk-YONBXWPY.js} +2 -2
- package/dist/src/{chunk-J2FL2YBC.js → chunk-YTJST2VN.js} +2 -2
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +8 -8
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -11141,7 +11141,10 @@ var createChatFields = z9.object({
|
|
|
11141
11141
|
var createChatRequestSchema = createChatFields.refine((request) => !request.sideChat || request.forkSourceChatId !== void 0 && request.parentChatId === request.forkSourceChatId, {
|
|
11142
11142
|
message: "A side chat must fork its parent chat"
|
|
11143
11143
|
});
|
|
11144
|
-
var createHarnessChatRequestSchema = createChatFields.pick({ id: true, title: true }).extend({ provider: z9.literal(AGENT.REPLICAS) })
|
|
11144
|
+
var createHarnessChatRequestSchema = createChatFields.pick({ id: true, title: true, parentChatId: true, forkSourceChatId: true, sideChat: true }).extend({ provider: z9.literal(AGENT.REPLICAS) }).refine(
|
|
11145
|
+
(request) => !request.parentChatId && !request.forkSourceChatId && !request.sideChat || request.sideChat === true && request.parentChatId !== void 0 && request.forkSourceChatId === request.parentChatId,
|
|
11146
|
+
{ message: "A Replicas side chat must fork its parent chat." }
|
|
11147
|
+
);
|
|
11145
11148
|
var spawnSubagentRequestSchema = z9.object({
|
|
11146
11149
|
provider: z9.enum(ENGINE_AGENT_PROVIDERS),
|
|
11147
11150
|
prompt: z9.string().min(1),
|
|
@@ -12547,7 +12550,7 @@ var LINEAR_ICON_DEFINITION = {
|
|
|
12547
12550
|
};
|
|
12548
12551
|
|
|
12549
12552
|
// ../shared/src/replicas-mcp.ts
|
|
12550
|
-
import { z as
|
|
12553
|
+
import { z as z27 } from "zod";
|
|
12551
12554
|
|
|
12552
12555
|
// ../shared/src/automations/types.ts
|
|
12553
12556
|
var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
|
|
@@ -12568,746 +12571,69 @@ var AUTOMATION_AUTO_PAUSE_DAYS = 7;
|
|
|
12568
12571
|
var AUTOMATION_AUTO_PAUSE_LABEL = `Paused after failing every run for ${AUTOMATION_AUTO_PAUSE_DAYS} days`;
|
|
12569
12572
|
|
|
12570
12573
|
// ../shared/src/routes/environment-config-source.ts
|
|
12571
|
-
import { z as
|
|
12574
|
+
import { z as z26 } from "zod";
|
|
12572
12575
|
|
|
12573
12576
|
// ../shared/src/environment-config.ts
|
|
12577
|
+
import { z as z25 } from "zod";
|
|
12578
|
+
|
|
12579
|
+
// ../shared/src/routes/preferences.ts
|
|
12580
|
+
import { z as z24 } from "zod";
|
|
12581
|
+
|
|
12582
|
+
// ../shared/src/routes/push.ts
|
|
12574
12583
|
import { z as z22 } from "zod";
|
|
12575
12584
|
|
|
12576
|
-
// ../shared/src/
|
|
12577
|
-
var
|
|
12578
|
-
var
|
|
12579
|
-
function validateEnvironmentFilePath(path) {
|
|
12580
|
-
const trimmedPath = path.trim();
|
|
12581
|
-
if (!trimmedPath) {
|
|
12582
|
-
return "Path is required.";
|
|
12583
|
-
}
|
|
12584
|
-
if (!trimmedPath.startsWith(HOME_PREFIX)) {
|
|
12585
|
-
return `Path must start with the home-directory prefix ~/ . ${ENVIRONMENT_FILE_PATH_GUIDANCE}`.replace("~/ .", "~/");
|
|
12586
|
-
}
|
|
12587
|
-
if (trimmedPath === HOME_PREFIX) {
|
|
12588
|
-
return "Path must include a file name after ~/.";
|
|
12589
|
-
}
|
|
12590
|
-
return null;
|
|
12591
|
-
}
|
|
12585
|
+
// ../shared/src/workspace-attention.ts
|
|
12586
|
+
var WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup", "deploy_failed"];
|
|
12587
|
+
var CHAT_ATTENTION_REASONS = ["question", "blocked"];
|
|
12592
12588
|
|
|
12593
|
-
// ../shared/src/routes/
|
|
12594
|
-
var
|
|
12595
|
-
{
|
|
12596
|
-
|
|
12597
|
-
|
|
12598
|
-
|
|
12599
|
-
|
|
12600
|
-
|
|
12601
|
-
|
|
12602
|
-
|
|
12603
|
-
|
|
12604
|
-
|
|
12605
|
-
id: "calendly",
|
|
12606
|
-
backend: "composio",
|
|
12607
|
-
toolkit: "calendly",
|
|
12608
|
-
authType: "oauth",
|
|
12609
|
-
category: "productivity",
|
|
12610
|
-
name: "Calendly",
|
|
12611
|
-
description: "Manage event types, scheduled events, invitees, and scheduling links."
|
|
12612
|
-
},
|
|
12613
|
-
{
|
|
12614
|
-
id: "clickhouse",
|
|
12615
|
-
backend: "composio",
|
|
12616
|
-
toolkit: "clickhouse",
|
|
12617
|
-
authType: "basic",
|
|
12618
|
-
category: "data",
|
|
12619
|
-
name: "ClickHouse",
|
|
12620
|
-
description: "Manage databases, tables, schemas, and queries."
|
|
12621
|
-
},
|
|
12622
|
-
{
|
|
12623
|
-
id: "cloudflare",
|
|
12624
|
-
backend: "composio",
|
|
12625
|
-
toolkit: "cloudflare_api_key",
|
|
12626
|
-
authType: "api_key",
|
|
12627
|
-
category: "data",
|
|
12628
|
-
name: "Cloudflare",
|
|
12629
|
-
description: "Manage zones, DNS records, analytics, and security settings."
|
|
12630
|
-
},
|
|
12631
|
-
{
|
|
12632
|
-
id: "e2b",
|
|
12633
|
-
toolkit: "e2b",
|
|
12634
|
-
backend: "native",
|
|
12635
|
-
authType: "api_key",
|
|
12636
|
-
category: "data",
|
|
12637
|
-
name: "E2B",
|
|
12638
|
-
description: "Create secure cloud sandboxes and run commands in them."
|
|
12639
|
-
},
|
|
12640
|
-
{
|
|
12641
|
-
id: "gmail",
|
|
12642
|
-
backend: "composio",
|
|
12643
|
-
toolkit: "gmail",
|
|
12644
|
-
authType: "oauth",
|
|
12645
|
-
category: "productivity",
|
|
12646
|
-
name: "Gmail",
|
|
12647
|
-
description: "Manage messages, threads, attachments, labels, and mailbox settings."
|
|
12648
|
-
},
|
|
12649
|
-
{
|
|
12650
|
-
id: "greptile",
|
|
12651
|
-
backend: "native",
|
|
12652
|
-
toolkit: "greptile",
|
|
12653
|
-
authType: "api_key",
|
|
12654
|
-
category: "data",
|
|
12655
|
-
name: "Greptile Knowledge Base",
|
|
12656
|
-
description: "Search and read self-updating codebase documentation, architecture, and flows."
|
|
12657
|
-
},
|
|
12658
|
-
{
|
|
12659
|
-
id: "googleads",
|
|
12660
|
-
backend: "composio",
|
|
12661
|
-
toolkit: "googleads",
|
|
12662
|
-
authType: "oauth",
|
|
12663
|
-
category: "data",
|
|
12664
|
-
name: "Google Ads",
|
|
12665
|
-
description: "Manage campaigns, customers, accounts, and reporting data."
|
|
12666
|
-
},
|
|
12667
|
-
{
|
|
12668
|
-
id: "googledocs",
|
|
12669
|
-
backend: "composio",
|
|
12670
|
-
toolkit: "googledocs",
|
|
12671
|
-
authType: "oauth",
|
|
12672
|
-
category: "productivity",
|
|
12673
|
-
name: "Google Docs",
|
|
12674
|
-
description: "Manage documents, structure, comments, and exported content."
|
|
12675
|
-
},
|
|
12676
|
-
{
|
|
12677
|
-
id: "googledrive",
|
|
12678
|
-
backend: "composio",
|
|
12679
|
-
toolkit: "googledrive",
|
|
12680
|
-
authType: "oauth",
|
|
12681
|
-
category: "productivity",
|
|
12682
|
-
name: "Google Drive",
|
|
12683
|
-
description: "Manage files, folders, metadata, permissions, and shared drives."
|
|
12684
|
-
},
|
|
12685
|
-
{
|
|
12686
|
-
id: "googlesearch",
|
|
12687
|
-
backend: "composio",
|
|
12688
|
-
toolkit: "google_search_console",
|
|
12689
|
-
authType: "oauth",
|
|
12690
|
-
category: "data",
|
|
12691
|
-
name: "Google Search",
|
|
12692
|
-
description: "Manage Search Console performance, indexing, sites, and sitemaps."
|
|
12693
|
-
},
|
|
12694
|
-
{
|
|
12695
|
-
id: "googlesheets",
|
|
12696
|
-
backend: "composio",
|
|
12697
|
-
toolkit: "googlesheets",
|
|
12698
|
-
authType: "oauth",
|
|
12699
|
-
category: "productivity",
|
|
12700
|
-
name: "Google Sheets",
|
|
12701
|
-
description: "Manage spreadsheets, worksheets, ranges, tables, and charts."
|
|
12702
|
-
},
|
|
12703
|
-
{
|
|
12704
|
-
id: "linkedin",
|
|
12705
|
-
backend: "composio",
|
|
12706
|
-
toolkit: "linkedin",
|
|
12707
|
-
authType: "oauth",
|
|
12708
|
-
category: "business",
|
|
12709
|
-
name: "LinkedIn",
|
|
12710
|
-
description: "Manage profiles, organizations, posts, and professional activity."
|
|
12711
|
-
},
|
|
12712
|
-
{
|
|
12713
|
-
id: "modal",
|
|
12714
|
-
backend: "native",
|
|
12715
|
-
toolkit: "modal",
|
|
12716
|
-
authType: "basic",
|
|
12717
|
-
category: "data",
|
|
12718
|
-
name: "Modal",
|
|
12719
|
-
description: "Invoke deployed functions through Modal compute."
|
|
12720
|
-
},
|
|
12721
|
-
{
|
|
12722
|
-
id: "posthog",
|
|
12723
|
-
backend: "composio",
|
|
12724
|
-
toolkit: "posthog",
|
|
12725
|
-
authType: "api_key",
|
|
12726
|
-
category: "data",
|
|
12727
|
-
name: "PostHog",
|
|
12728
|
-
description: "Manage projects, events, insights, dashboards, flags, and recordings."
|
|
12729
|
-
},
|
|
12730
|
-
{
|
|
12731
|
-
id: "planetscale",
|
|
12732
|
-
toolkit: "planetscale",
|
|
12733
|
-
backend: "native",
|
|
12734
|
-
authType: "oauth",
|
|
12735
|
-
category: "data",
|
|
12736
|
-
name: "PlanetScale",
|
|
12737
|
-
description: "Manage organizations, databases, branches, deploy requests, and Insights."
|
|
12738
|
-
},
|
|
12739
|
-
{
|
|
12740
|
-
id: "sazabi",
|
|
12741
|
-
backend: "native",
|
|
12742
|
-
toolkit: "sazabi",
|
|
12743
|
-
authType: "oauth",
|
|
12744
|
-
category: "data",
|
|
12745
|
-
name: "Sazabi",
|
|
12746
|
-
description: "Query logs, investigate issues, and run the Sazabi observability agent."
|
|
12747
|
-
},
|
|
12748
|
-
{
|
|
12749
|
-
id: "stripe",
|
|
12750
|
-
backend: "composio",
|
|
12751
|
-
toolkit: "stripe",
|
|
12752
|
-
authType: "oauth",
|
|
12753
|
-
category: "business",
|
|
12754
|
-
name: "Stripe",
|
|
12755
|
-
description: "Manage customers, payments, invoices, subscriptions, and balances."
|
|
12756
|
-
},
|
|
12757
|
-
{
|
|
12758
|
-
id: "kondo",
|
|
12759
|
-
backend: "native",
|
|
12760
|
-
toolkit: "kondo",
|
|
12761
|
-
authType: "oauth",
|
|
12762
|
-
category: "business",
|
|
12763
|
-
name: "Kondo",
|
|
12764
|
-
description: "Manage LinkedIn chats, labels, reminders, drafts, connections, and invites."
|
|
12765
|
-
},
|
|
12766
|
-
{
|
|
12767
|
-
id: "lightfield",
|
|
12768
|
-
backend: "native",
|
|
12769
|
-
toolkit: "lightfield",
|
|
12770
|
-
authType: "api_key",
|
|
12771
|
-
category: "business",
|
|
12772
|
-
name: "Lightfield",
|
|
12773
|
-
description: "Manage CRM accounts, contacts, opportunities, meetings, notes, and tasks."
|
|
12774
|
-
},
|
|
12775
|
-
{
|
|
12776
|
-
id: "pangram",
|
|
12777
|
-
backend: "native",
|
|
12778
|
-
toolkit: "pangram",
|
|
12779
|
-
authType: "api_key",
|
|
12780
|
-
category: "data",
|
|
12781
|
-
name: "Pangram",
|
|
12782
|
-
description: "Analyze text for AI generation and plagiarism signals."
|
|
12783
|
-
},
|
|
12784
|
-
{
|
|
12785
|
-
id: "vercel",
|
|
12786
|
-
backend: "native",
|
|
12787
|
-
toolkit: "vercel",
|
|
12788
|
-
authType: "api_key",
|
|
12789
|
-
category: "data",
|
|
12790
|
-
name: "Vercel",
|
|
12791
|
-
description: "Manage projects, deployments, logs, domains, and infrastructure."
|
|
12792
|
-
},
|
|
12793
|
-
{
|
|
12794
|
-
id: "turbopuffer",
|
|
12795
|
-
backend: "native",
|
|
12796
|
-
toolkit: "turbopuffer",
|
|
12797
|
-
authType: "api_key",
|
|
12798
|
-
category: "data",
|
|
12799
|
-
name: "turbopuffer",
|
|
12800
|
-
description: "Query and manage turbopuffer namespaces."
|
|
12801
|
-
},
|
|
12802
|
-
{
|
|
12803
|
-
id: "vanta",
|
|
12804
|
-
backend: "native",
|
|
12805
|
-
toolkit: "vanta",
|
|
12806
|
-
authType: "credentials",
|
|
12807
|
-
category: "data",
|
|
12808
|
-
name: "Vanta",
|
|
12809
|
-
description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data."
|
|
12810
|
-
}
|
|
12811
|
-
];
|
|
12812
|
-
var HOSTED_COMPOSIO_PLUGIN_DEFINITIONS = [
|
|
12813
|
-
["notion", "notion", "OAUTH2", true, "productivity", "Notion"],
|
|
12814
|
-
["jira", "jira", "OAUTH2", true, "productivity", "Jira"],
|
|
12815
|
-
["confluence", "confluence", "OAUTH2", true, "productivity", "Confluence"],
|
|
12816
|
-
["googlecalendar", "googlecalendar", "OAUTH2", true, "productivity", "Google Calendar"],
|
|
12817
|
-
["microsoftteams", "microsoft_teams", "OAUTH2", true, "productivity", "Microsoft Teams"],
|
|
12818
|
-
["outlook", "outlook", "OAUTH2", true, "productivity", "Outlook"],
|
|
12819
|
-
["bitbucket", "bitbucket", "OAUTH2", true, "data", "Bitbucket"],
|
|
12820
|
-
["datadog", "datadog", "API_KEY", false, "data", "Datadog"],
|
|
12821
|
-
["pagerduty", "pagerduty", "OAUTH2", true, "data", "PagerDuty"],
|
|
12822
|
-
["intercom", "intercom", "OAUTH2", true, "business", "Intercom"],
|
|
12823
|
-
["zendesk", "zendesk", "OAUTH2", true, "business", "Zendesk"],
|
|
12824
|
-
["hubspot", "hubspot", "OAUTH2", true, "business", "HubSpot"],
|
|
12825
|
-
["supabase", "supabase", "OAUTH2", true, "data", "Supabase"],
|
|
12826
|
-
["figma", "figma", "OAUTH2", true, "productivity", "Figma"],
|
|
12827
|
-
["launchdarkly", "launch_darkly", "API_KEY", false, "data", "LaunchDarkly"],
|
|
12828
|
-
["asana", "asana", "OAUTH2", true, "productivity", "Asana"],
|
|
12829
|
-
["clickup", "clickup", "OAUTH2", true, "productivity", "ClickUp"],
|
|
12830
|
-
["trello", "trello", "OAUTH1", true, "productivity", "Trello"],
|
|
12831
|
-
["todoist", "todoist", "OAUTH2", true, "productivity", "Todoist"],
|
|
12832
|
-
["airtable", "airtable", "OAUTH2", true, "productivity", "Airtable"],
|
|
12833
|
-
["coda", "coda", "API_KEY", false, "productivity", "Coda"],
|
|
12834
|
-
["miro", "miro", "OAUTH2", true, "productivity", "Miro"],
|
|
12835
|
-
["sharepoint", "share_point", "OAUTH2", true, "productivity", "SharePoint"],
|
|
12836
|
-
["onedrive", "one_drive", "OAUTH2", true, "productivity", "OneDrive"],
|
|
12837
|
-
["googleslides", "googleslides", "OAUTH2", true, "productivity", "Google Slides"],
|
|
12838
|
-
["googlemeet", "googlemeet", "OAUTH2", true, "productivity", "Google Meet"],
|
|
12839
|
-
["circleback", "circleback_mcp", "DCR_OAUTH", false, "productivity", "Circleback"],
|
|
12840
|
-
["granola", "granola_mcp", "DCR_OAUTH", false, "productivity", "Granola"],
|
|
12841
|
-
["mercury", "mercury_mcp", "DCR_OAUTH", false, "business", "Mercury"],
|
|
12842
|
-
["googletasks", "googletasks", "OAUTH2", true, "productivity", "Google Tasks"],
|
|
12843
|
-
["dropbox", "dropbox", "OAUTH2", true, "productivity", "Dropbox"],
|
|
12844
|
-
["box", "box", "OAUTH2", true, "productivity", "Box"],
|
|
12845
|
-
["discord", "discord", "OAUTH2", true, "productivity", "Discord"],
|
|
12846
|
-
["discordbot", "discordbot", "OAUTH2", true, "productivity", "Discord Bot"],
|
|
12847
|
-
["zoom", "zoom", "OAUTH2", true, "productivity", "Zoom"],
|
|
12848
|
-
["googlechat", "google_chat", "OAUTH2", false, "productivity", "Google Chat"],
|
|
12849
|
-
["newrelic", "new_relic", "API_KEY", false, "data", "New Relic"],
|
|
12850
|
-
["betterstack", "better_stack", "API_KEY", false, "data", "Better Stack"],
|
|
12851
|
-
["incidentio", "incident_io", "API_KEY", false, "data", "incident.io"],
|
|
12852
|
-
["grafana", "grafana", "BEARER_TOKEN", false, "data", "Grafana"],
|
|
12853
|
-
["honeycomb", "honeycomb_mcp", "DCR_OAUTH", false, "data", "Honeycomb MCP"],
|
|
12854
|
-
["neon", "neon_mcp", "DCR_OAUTH", false, "data", "Neon"],
|
|
12855
|
-
["glen", "glen_mcp", "DCR_OAUTH", false, "data", "Glen"],
|
|
12856
|
-
["bugsnag", "bugsnag", "API_KEY", false, "data", "Bugsnag"],
|
|
12857
|
-
["circleci", "circleci", "API_KEY", false, "data", "CircleCI"],
|
|
12858
|
-
["buildkite", "buildkite", "API_KEY", false, "data", "Buildkite"],
|
|
12859
|
-
["dockerhub", "docker_hub", "API_KEY", false, "data", "Docker Hub"],
|
|
12860
|
-
["digitalocean", "digital_ocean", "OAUTH2", true, "data", "DigitalOcean"],
|
|
12861
|
-
["railway", "railway", "API_KEY", false, "data", "Railway"],
|
|
12862
|
-
["render", "render", "API_KEY", false, "data", "Render"],
|
|
12863
|
-
["firebase", "firebase", "API_KEY", false, "data", "Firebase"],
|
|
12864
|
-
["cloudinary", "cloudinary", "API_KEY", false, "data", "Cloudinary"],
|
|
12865
|
-
["configcat", "configcat", "API_KEY", false, "data", "ConfigCat"],
|
|
12866
|
-
["contextdev", "context_dev", "API_KEY", false, "data", "Context.dev"],
|
|
12867
|
-
["googleanalytics", "google_analytics", "OAUTH2", true, "data", "Google Analytics"],
|
|
12868
|
-
["googlebigquery", "googlebigquery", "OAUTH2", true, "data", "Google BigQuery"],
|
|
12869
|
-
["amplitude", "amplitude", "API_KEY", false, "data", "Amplitude"],
|
|
12870
|
-
["mixpanel", "mixpanel", "BASIC", false, "data", "Mixpanel"],
|
|
12871
|
-
["segment", "segment", "API_KEY", false, "data", "Segment"],
|
|
12872
|
-
["supermemory", "supermemory", "API_KEY", false, "data", "Supermemory"],
|
|
12873
|
-
["databricks", "databricks", "API_KEY", false, "data", "Databricks"],
|
|
12874
|
-
["snowflake", "snowflake", "OAUTH2", false, "data", "Snowflake"],
|
|
12875
|
-
["algolia", "algolia", "API_KEY", false, "data", "Algolia"],
|
|
12876
|
-
["elasticsearch", "elasticsearch", "API_KEY", false, "data", "Elasticsearch"],
|
|
12877
|
-
["salesforce", "salesforce", "OAUTH2", true, "business", "Salesforce"],
|
|
12878
|
-
["pipedrive", "pipedrive", "API_KEY", false, "business", "Pipedrive"],
|
|
12879
|
-
["close", "close", "API_KEY", false, "business", "Close"],
|
|
12880
|
-
["apollo", "apollo", "API_KEY", false, "business", "Apollo"],
|
|
12881
|
-
["gong", "gong", "OAUTH2", true, "business", "Gong"],
|
|
12882
|
-
["freshdesk", "freshdesk", "API_KEY", false, "business", "Freshdesk"],
|
|
12883
|
-
["helpscout", "help_scout", "OAUTH2", false, "business", "Help Scout"],
|
|
12884
|
-
["servicenow", "servicenow", "BASIC", false, "business", "ServiceNow"],
|
|
12885
|
-
["mailchimp", "mailchimp", "OAUTH2", true, "business", "Mailchimp"],
|
|
12886
|
-
["customerio", "customerio", "API_KEY", false, "business", "Customer.io"],
|
|
12887
|
-
["klaviyo", "klaviyo", "API_KEY", false, "business", "Klaviyo"],
|
|
12888
|
-
["shopify", "shopify", "API_KEY", false, "business", "Shopify"],
|
|
12889
|
-
["quickbooks", "quickbooks", "OAUTH2", true, "business", "QuickBooks"],
|
|
12890
|
-
["xero", "xero", "OAUTH2", false, "business", "Xero"],
|
|
12891
|
-
["brex", "brex", "API_KEY", false, "business", "Brex"],
|
|
12892
|
-
["buffer", "buffer", "OAUTH2", false, "business", "Buffer"],
|
|
12893
|
-
["canva", "canva", "OAUTH2", true, "productivity", "Canva"],
|
|
12894
|
-
["webflow", "webflow", "API_KEY", false, "business", "Webflow"],
|
|
12895
|
-
["firecrawl", "firecrawl", "API_KEY", false, "data", "Firecrawl"],
|
|
12896
|
-
["browserbase", "browserbase_tool", "API_KEY", false, "data", "Browserbase"],
|
|
12897
|
-
["exa", "exa", "API_KEY", false, "data", "Exa"],
|
|
12898
|
-
["youtube", "youtube", "OAUTH2", true, "business", "YouTube"],
|
|
12899
|
-
["twitter", "twitter", "OAUTH2", false, "business", "Twitter/X"],
|
|
12900
|
-
["instagram", "instagram", "OAUTH2", true, "business", "Instagram"],
|
|
12901
|
-
["facebook", "facebook", "OAUTH2", true, "business", "Facebook"]
|
|
12902
|
-
];
|
|
12903
|
-
var HOSTED_COMPOSIO_PLUGINS = HOSTED_COMPOSIO_PLUGIN_DEFINITIONS.map(
|
|
12904
|
-
([id, toolkit, authScheme, managedAuth, category, name]) => ({
|
|
12905
|
-
id,
|
|
12906
|
-
backend: "composio",
|
|
12907
|
-
toolkit,
|
|
12908
|
-
authType: "hosted",
|
|
12909
|
-
authScheme,
|
|
12910
|
-
managedAuth,
|
|
12911
|
-
category,
|
|
12912
|
-
name,
|
|
12913
|
-
description: `Use ${name} tools from workspace agents.`
|
|
12589
|
+
// ../shared/src/routes/push.ts
|
|
12590
|
+
var registerPushDeviceRequestSchema = z22.discriminatedUnion("platform", [
|
|
12591
|
+
z22.object({
|
|
12592
|
+
platform: z22.literal("ios"),
|
|
12593
|
+
token: z22.string().regex(/^[0-9a-f]{64,200}$/i),
|
|
12594
|
+
appId: z22.string().min(1).max(255),
|
|
12595
|
+
apnsEnvironment: z22.enum(["sandbox", "production"])
|
|
12596
|
+
}),
|
|
12597
|
+
z22.object({
|
|
12598
|
+
platform: z22.literal("android"),
|
|
12599
|
+
token: z22.string().min(1).max(4096),
|
|
12600
|
+
appId: z22.string().min(1).max(255)
|
|
12914
12601
|
})
|
|
12915
|
-
);
|
|
12916
|
-
var READ_ONLY_SCOPES = {
|
|
12917
|
-
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"],
|
|
12918
|
-
googledocs: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/documents.readonly"],
|
|
12919
|
-
googledrive: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly"],
|
|
12920
|
-
googlesheets: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/spreadsheets.readonly"],
|
|
12921
|
-
googleslides: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/presentations.readonly"],
|
|
12922
|
-
googlecalendar: ["https://www.googleapis.com/auth/calendar.readonly"],
|
|
12923
|
-
googletasks: ["https://www.googleapis.com/auth/tasks.readonly"],
|
|
12924
|
-
googlesearch: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/webmasters.readonly"],
|
|
12925
|
-
googleanalytics: ["https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/analytics.readonly"],
|
|
12926
|
-
youtube: ["https://www.googleapis.com/auth/youtube.readonly"],
|
|
12927
|
-
outlook: ["User.Read", "Mail.Read", "MailboxSettings.Read", "Calendars.Read", "Contacts.Read", "offline_access"],
|
|
12928
|
-
onedrive: ["Files.Read.All", "Sites.Read.All", "offline_access"],
|
|
12929
|
-
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"],
|
|
12930
|
-
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"],
|
|
12931
|
-
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"],
|
|
12932
|
-
zendesk: ["read"],
|
|
12933
|
-
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"],
|
|
12934
|
-
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"],
|
|
12935
|
-
airtable: ["data.records:read", "data.recordComments:read", "schema.bases:read", "user.email:read"],
|
|
12936
|
-
todoist: ["data:read"],
|
|
12937
|
-
dropbox: ["openid", "email", "profile", "account_info.read", "files.metadata.read", "files.content.read", "file_requests.read", "sharing.read", "contacts.read"],
|
|
12938
|
-
canva: ["profile:read", "asset:read", "brandtemplate:content:read", "brandtemplate:meta:read", "comment:read", "design:content:read", "design:meta:read", "folder:read"],
|
|
12939
|
-
facebook: ["public_profile", "email", "pages_show_list", "pages_read_engagement", "pages_read_user_content", "read_insights"],
|
|
12940
|
-
instagram: ["instagram_business_basic", "instagram_business_manage_insights"]
|
|
12941
|
-
};
|
|
12942
|
-
var PLUGIN_CATALOG = [
|
|
12943
|
-
...EXPLICIT_PLUGIN_CATALOG,
|
|
12944
|
-
...HOSTED_COMPOSIO_PLUGINS
|
|
12945
|
-
].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
|
|
12946
|
-
|
|
12947
|
-
// ../shared/src/routes/plugins.ts
|
|
12948
|
-
function isPluginId(value) {
|
|
12949
|
-
return PLUGIN_CATALOG.some((plugin) => plugin.id === value);
|
|
12950
|
-
}
|
|
12951
|
-
|
|
12952
|
-
// ../shared/src/environment-config.ts
|
|
12953
|
-
var variableNameSchema = z22.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name");
|
|
12954
|
-
var mcpValueSchema = z22.union([
|
|
12955
|
-
z22.string(),
|
|
12956
|
-
environmentMcpVariableReferenceSchema
|
|
12957
12602
|
]);
|
|
12958
|
-
var
|
|
12959
|
-
var
|
|
12960
|
-
|
|
12961
|
-
|
|
12962
|
-
|
|
12963
|
-
z22.
|
|
12964
|
-
|
|
12965
|
-
|
|
12966
|
-
args: environmentMcpStdioConfigSchema.shape.args.unwrap().default([]),
|
|
12967
|
-
env: z22.record(variableNameSchema, mcpValueSchema).default({})
|
|
12968
|
-
}).strict()
|
|
12969
|
-
}),
|
|
12970
|
-
z22.strictObject({ transport: z22.literal("http"), config: httpConfigSchema }),
|
|
12971
|
-
z22.strictObject({ transport: z22.literal("sse"), config: httpConfigSchema })
|
|
12972
|
-
]).superRefine((definition, context) => {
|
|
12973
|
-
if (definition.transport === "stdio") return;
|
|
12974
|
-
const result = validateEnvironmentMcpAuthentication(definition.transport, definition.config);
|
|
12975
|
-
if (!result.ok) context.addIssue({ code: "custom", path: result.error.code === "transport" ? ["transport"] : ["config", result.error.code ?? "auth"], message: result.error.message });
|
|
12603
|
+
var PUSH_HOLD_MINUTES = 5;
|
|
12604
|
+
var chatRefSchema = z22.object({ workspaceId: z22.string().uuid(), chatId: z22.string().min(1).max(100) });
|
|
12605
|
+
var recordPushActivityRequestSchema = z22.object({
|
|
12606
|
+
organizationId: z22.string().uuid(),
|
|
12607
|
+
/** Seconds since the last keyboard or mouse input on this computer. A phone leaves it out: it only reports what it has open. */
|
|
12608
|
+
idleSeconds: z22.number().min(0).optional(),
|
|
12609
|
+
seenWorkspaceIds: z22.array(z22.string().uuid()).max(20),
|
|
12610
|
+
seenChats: z22.array(chatRefSchema).max(20).optional()
|
|
12976
12611
|
});
|
|
12977
|
-
var
|
|
12978
|
-
|
|
12979
|
-
|
|
12980
|
-
|
|
12981
|
-
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
variables: z22.record(variableNameSchema, z22.string()).optional(),
|
|
12990
|
-
requiredSecrets: z22.array(variableNameSchema).optional(),
|
|
12991
|
-
mcps: z22.record(z22.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()
|
|
12992
|
-
}).superRefine((config, context) => {
|
|
12993
|
-
const skillNames = Object.keys(config.skills ?? {}).map((slug) => slug.toLowerCase());
|
|
12994
|
-
if (new Set(skillNames).size !== skillNames.length) context.addIssue({ code: "custom", path: ["skills"], message: "Skill slugs must be unique regardless of case" });
|
|
12995
|
-
const names = /* @__PURE__ */ new Set();
|
|
12996
|
-
for (const name of Object.keys(config.mcps ?? {})) {
|
|
12997
|
-
const normalized = name.toLowerCase();
|
|
12998
|
-
if (names.has(normalized)) {
|
|
12999
|
-
context.addIssue({ code: "custom", path: ["mcps", name], message: "MCP names must be unique regardless of case" });
|
|
13000
|
-
}
|
|
13001
|
-
names.add(normalized);
|
|
13002
|
-
}
|
|
13003
|
-
for (const key of config.requiredSecrets ?? []) {
|
|
13004
|
-
if (config.variables && Object.hasOwn(config.variables, key)) {
|
|
13005
|
-
context.addIssue({ code: "custom", path: ["requiredSecrets"], message: `"${key}" cannot also be declared as a non-secret variable` });
|
|
13006
|
-
}
|
|
13007
|
-
}
|
|
12612
|
+
var PUSH_NOTIFICATION_KINDS = [...WORKSPACE_ATTENTION_REASONS, "finished"];
|
|
12613
|
+
var PUSH_OPTION_LABEL_MAX = 60;
|
|
12614
|
+
var PUSH_OPTIONS_MAX = 4;
|
|
12615
|
+
var pushQuestionSchema = z22.object({ id: z22.string().max(64), allowCustom: z22.boolean().optional(), options: z22.array(z22.object({ id: z22.string().max(64), label: z22.string().min(1).max(PUSH_OPTION_LABEL_MAX) })).min(1).max(PUSH_OPTIONS_MAX) });
|
|
12616
|
+
var pushNotificationDataSchema = z22.object({
|
|
12617
|
+
organizationId: z22.string(),
|
|
12618
|
+
workspaceId: z22.string(),
|
|
12619
|
+
chatId: z22.string().nullable(),
|
|
12620
|
+
kind: z22.enum(PUSH_NOTIFICATION_KINDS),
|
|
12621
|
+
completedAt: z22.string(),
|
|
12622
|
+
toolRequestId: z22.string().optional(),
|
|
12623
|
+
question: pushQuestionSchema.optional()
|
|
13008
12624
|
});
|
|
13009
|
-
|
|
13010
|
-
|
|
13011
|
-
|
|
13012
|
-
|
|
13013
|
-
|
|
13014
|
-
|
|
13015
|
-
|
|
13016
|
-
repository_name: z23.string(),
|
|
13017
|
-
filename: z23.string(),
|
|
13018
|
-
commit_sha: z23.string(),
|
|
13019
|
-
source_url: z23.string(),
|
|
13020
|
-
file_sha: z23.undefined().optional()
|
|
13021
|
-
}),
|
|
13022
|
-
z23.object({
|
|
13023
|
-
kind: z23.literal("file"),
|
|
13024
|
-
repository_id: z23.null(),
|
|
13025
|
-
repository_name: z23.null(),
|
|
13026
|
-
filename: z23.string(),
|
|
13027
|
-
commit_sha: z23.null(),
|
|
13028
|
-
source_url: z23.null(),
|
|
13029
|
-
file_sha: z23.string()
|
|
13030
|
-
})
|
|
13031
|
-
]);
|
|
13032
|
-
var sourceInput = {
|
|
13033
|
-
repository_id: z23.string().min(1).optional(),
|
|
13034
|
-
file: z23.strictObject({ filename: z23.string().min(1).max(1024), environment: replicasEnvironmentConfigSchema }).optional()
|
|
13035
|
-
};
|
|
13036
|
-
var previewEnvironmentConfigSourceRequestSchema = z23.strictObject(sourceInput).refine(
|
|
13037
|
-
(input) => !input.file || !input.repository_id,
|
|
13038
|
-
{ message: "Choose either a repository or a file" }
|
|
13039
|
-
);
|
|
13040
|
-
var applyEnvironmentConfigSourceRequestSchema = z23.strictObject({
|
|
13041
|
-
...sourceInput,
|
|
13042
|
-
commit_sha: z23.string().min(1).optional(),
|
|
13043
|
-
fingerprint: z23.string().min(1)
|
|
13044
|
-
}).refine((input) => input.file ? !input.repository_id && !input.commit_sha : !!input.commit_sha, {
|
|
13045
|
-
message: "File configuration requires file contents; Git configuration requires a reviewed commit"
|
|
12625
|
+
var workspaceSharedPushDataSchema = pushNotificationDataSchema.pick({ organizationId: true, workspaceId: true, chatId: true, completedAt: true }).extend({ kind: z22.literal("shared") });
|
|
12626
|
+
var registerLiveActivityRequestSchema = chatRefSchema.extend({
|
|
12627
|
+
deviceId: z22.string().uuid(),
|
|
12628
|
+
/** The iOS activity's push token. Android leaves it out and gets FCM data messages on the device token. */
|
|
12629
|
+
pushToken: z22.string().regex(/^[0-9a-f]{64,400}$/i).optional(),
|
|
12630
|
+
/** iOS only: when the card's turn started, in seconds. Cards keep their order by it. */
|
|
12631
|
+
startedAt: z22.number().positive().optional()
|
|
13046
12632
|
});
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
var REPLICAS_MCP_SERVER_NAME = "replicas-mcp";
|
|
13050
|
-
var REPLICAS_MCP_TOOLS = {
|
|
13051
|
-
listEnvironments: "list_environments",
|
|
13052
|
-
createAutomation: "create_automation",
|
|
13053
|
-
spawn: "spawn_workspace",
|
|
13054
|
-
spawnInNewThread: "spawn_workspace_in_new_thread",
|
|
13055
|
-
relay: "relay_to_workspace",
|
|
13056
|
-
listWorkspaces: "list_workspaces",
|
|
13057
|
-
linearStart: "start_linear_session",
|
|
13058
|
-
linearSessionIntent: "register_linear_session_intent",
|
|
13059
|
-
routeLinearTicket: "route_linear_ticket",
|
|
13060
|
-
listChannelSettings: "list_channel_settings",
|
|
13061
|
-
saveChannelPreset: "save_channel_preset",
|
|
13062
|
-
deleteChannelPreset: "delete_channel_preset",
|
|
13063
|
-
updateChannelSettings: "update_channel_settings",
|
|
13064
|
-
setOrganizationProactivity: "set_organization_proactivity",
|
|
13065
|
-
setSlackAgentDefaults: "set_slack_agent_defaults",
|
|
13066
|
-
claimSettingsOffer: "claim_settings_offer",
|
|
13067
|
-
setThreadMuted: "set_thread_muted",
|
|
13068
|
-
stopWorkspace: "stop_workspace",
|
|
13069
|
-
setSlackConnectMuted: "set_slack_connect_muted",
|
|
13070
|
-
setSlackConnectDefaults: "set_slack_connect_defaults",
|
|
13071
|
-
spawnSubagent: "spawn_subagent",
|
|
13072
|
-
messageSubagent: "message_subagent",
|
|
13073
|
-
listSubagents: "list_subagents",
|
|
13074
|
-
readSubagent: "read_subagent",
|
|
13075
|
-
archiveSubagent: "archive_subagent",
|
|
13076
|
-
mergeWhenReady: "merge_when_ready",
|
|
13077
|
-
waitForSubagents: "wait_for_subagents",
|
|
13078
|
-
getBoard: "get_board",
|
|
13079
|
-
updateBoard: "update_board",
|
|
13080
|
-
updateTicket: "update_ticket",
|
|
13081
|
-
replyOnTicket: "reply_on_ticket",
|
|
13082
|
-
sendToChat: "send_to_chat",
|
|
13083
|
-
setStatus: "set_status",
|
|
13084
|
-
getLinearRouting: "get_linear_routing",
|
|
13085
|
-
setLinearRouting: "set_linear_routing",
|
|
13086
|
-
clearLinearRouting: "clear_linear_routing",
|
|
13087
|
-
getSlackChannel: "get_slack_channel",
|
|
13088
|
-
linkSlackChannel: "link_slack_channel",
|
|
13089
|
-
createSlackChannel: "create_slack_channel",
|
|
13090
|
-
unlinkSlackChannel: "unlink_slack_channel",
|
|
13091
|
-
setSlackChannelLevel: "set_slack_channel_level",
|
|
13092
|
-
createReplica: "create_replica",
|
|
13093
|
-
listReplicas: "list_replicas",
|
|
13094
|
-
getReplica: "get_replica",
|
|
13095
|
-
deleteReplica: "delete_replica",
|
|
13096
|
-
wakeReplica: "wake_replica",
|
|
13097
|
-
sleepReplica: "sleep_replica",
|
|
13098
|
-
archiveReplica: "archive_replica",
|
|
13099
|
-
waitForReplica: "wait_for_replica",
|
|
13100
|
-
runCommand: "run_command",
|
|
13101
|
-
getReplicaHooks: "get_replica_hooks",
|
|
13102
|
-
whoami: "whoami",
|
|
13103
|
-
sendReplicaMessage: "send_replica_message",
|
|
13104
|
-
readReplicaHistory: "read_replica_history",
|
|
13105
|
-
listChats: "list_chats",
|
|
13106
|
-
createChat: "create_chat",
|
|
13107
|
-
deleteChat: "delete_chat",
|
|
13108
|
-
listRepositories: "list_repositories"
|
|
13109
|
-
};
|
|
13110
|
-
var automationToolInputSchema = z24.object({
|
|
13111
|
-
name: z24.string().describe("Short automation name."),
|
|
13112
|
-
prompt: z24.string().describe("Prompt each automation run starts with."),
|
|
13113
|
-
environment_id: z24.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
13114
|
-
triggers: z24.array(automationTriggerSchema).min(1).describe(
|
|
13115
|
-
`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"] } }\`.`
|
|
13116
|
-
),
|
|
13117
|
-
description: z24.string().optional().describe("One-line summary shown in the dashboard."),
|
|
13118
|
-
plan_mode: z24.boolean().optional(),
|
|
13119
|
-
goal_mode: z24.boolean().optional(),
|
|
13120
|
-
fast_mode: z24.boolean().optional(),
|
|
13121
|
-
workspace_lifecycle_policy: z24.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
13122
|
-
"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."
|
|
13123
|
-
)
|
|
12633
|
+
var syncLiveActivitiesRequestSchema = z22.object({
|
|
12634
|
+
activities: z22.array(chatRefSchema).max(100)
|
|
13124
12635
|
});
|
|
13125
|
-
var
|
|
13126
|
-
var automationBackgroundSchema = z24.boolean().optional().describe(
|
|
13127
|
-
"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."
|
|
13128
|
-
);
|
|
13129
|
-
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
13130
|
-
credential_user_id: z24.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
|
|
13131
|
-
background: automationBackgroundSchema,
|
|
13132
|
-
scope: z24.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
13133
|
-
});
|
|
13134
|
-
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
13135
|
-
automation_id: z24.string().describe("Automation ID"),
|
|
13136
|
-
enabled: z24.boolean().optional(),
|
|
13137
|
-
agent_provider: z24.enum(ENGINE_AGENT_PROVIDERS).nullable().optional(),
|
|
13138
|
-
model: z24.string().nullable().optional(),
|
|
13139
|
-
thinking_level: z24.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
13140
|
-
workspace_size: z24.enum(WORKSPACE_SIZES).optional(),
|
|
13141
|
-
credential_user_id: z24.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
|
|
13142
|
-
background: automationBackgroundSchema,
|
|
13143
|
-
scope: z24.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
13144
|
-
});
|
|
13145
|
-
var chatPath = { id: z24.string().describe("Workspace ID"), chat_id: z24.string().describe("Chat ID") };
|
|
13146
|
-
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
13147
|
-
var createChatToolInputSchema = z24.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
13148
|
-
var forkChatToolInputSchema = z24.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
13149
|
-
var renameChatToolInputSchema = z24.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
13150
|
-
var runCommandToolInputSchema = z24.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
13151
|
-
var environmentMcpPath = { environment_id: z24.string().describe("Environment ID") };
|
|
13152
|
-
var createEnvironmentMcpToolInputSchema = z24.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
13153
|
-
var updateEnvironmentMcpToolInputSchema = z24.object({
|
|
13154
|
-
...environmentMcpPath,
|
|
13155
|
-
mcp_id: z24.string().describe("MCP ID"),
|
|
13156
|
-
...updateEnvironmentMcpRequestSchema.shape
|
|
13157
|
-
});
|
|
13158
|
-
var createEnvironmentDeviceToolInputSchema = z24.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
13159
|
-
var previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
13160
|
-
var applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
13161
|
-
|
|
13162
|
-
// ../shared/src/scout.ts
|
|
13163
|
-
var SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
13164
|
-
var SCOUT_PROACTIVITY_LEVELS = ["tagged", "conservative", "balanced", "proactive"];
|
|
13165
|
-
var SCOUT_PRESET_NAME_MAX_LENGTH = 50;
|
|
13166
|
-
var SCOUT_CHANNEL_SETTINGS_OFFERS = ["proactivity", "raise_proactivity", "instructions"];
|
|
13167
|
-
var SCOUT_SETTINGS_OFFERS = [...SCOUT_CHANNEL_SETTINGS_OFFERS, "organization_proactivity", "raise_organization_proactivity"];
|
|
13168
|
-
var SCOUT_PRESET_ICONS = [
|
|
13169
|
-
"users",
|
|
13170
|
-
"user",
|
|
13171
|
-
"inbox",
|
|
13172
|
-
"building",
|
|
13173
|
-
"bug",
|
|
13174
|
-
"message-circle",
|
|
13175
|
-
"headphones",
|
|
13176
|
-
"heart",
|
|
13177
|
-
"star",
|
|
13178
|
-
"flag",
|
|
13179
|
-
"zap",
|
|
13180
|
-
"shield",
|
|
13181
|
-
"code",
|
|
13182
|
-
"terminal",
|
|
13183
|
-
"rocket",
|
|
13184
|
-
"wrench",
|
|
13185
|
-
"briefcase",
|
|
13186
|
-
"globe",
|
|
13187
|
-
"book-open",
|
|
13188
|
-
"lightbulb",
|
|
13189
|
-
"target",
|
|
13190
|
-
"bell",
|
|
13191
|
-
"layers",
|
|
13192
|
-
"tag"
|
|
13193
|
-
];
|
|
13194
|
-
|
|
13195
|
-
// ../shared/src/default-skills/scout-settings.ts
|
|
13196
|
-
var SCOUT_SETTINGS_SKILL_NAME = "scout-settings";
|
|
13197
|
-
var CONTENT = `---
|
|
13198
|
-
name: ${SCOUT_SETTINGS_SKILL_NAME}
|
|
13199
|
-
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.
|
|
13200
|
-
---
|
|
13201
|
-
|
|
13202
|
-
# Scout settings
|
|
13203
|
-
|
|
13204
|
-
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.
|
|
13205
|
-
|
|
13206
|
-
## What you can do
|
|
13207
|
-
| Ask | How | Who |
|
|
13208
|
-
| --- | --- | --- |
|
|
13209
|
-
| 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 |
|
|
13210
|
-
| How much you speak up in every channel | \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\` | Admin |
|
|
13211
|
-
| 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 |
|
|
13212
|
-
| 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 |
|
|
13213
|
-
| 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 |
|
|
13214
|
-
| Defaults for every channel shared with another company: preset, instructions, level, silent mode | \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` | Admin |
|
|
13215
|
-
| Triage new issues in a Linear team, or stop | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`source: linear\`, \`monitored\` | Admin starts; any member stops |
|
|
13216
|
-
| Agent, model, thinking level, goal mode, and fast mode for tasks started from Slack | \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` | Admin |
|
|
13217
|
-
| Stay quiet in this thread, or come back | \`${REPLICAS_MCP_TOOLS.setThreadMuted}\` | Anyone in the thread |
|
|
13218
|
-
| A recurring task ("every Monday, summarize open PRs in #eng") | \`${REPLICAS_MCP_TOOLS.createAutomation}\` (see Automations) | Members who can create automations |
|
|
13219
|
-
|
|
13220
|
-
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.
|
|
13221
|
-
|
|
13222
|
-
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.
|
|
13223
|
-
|
|
13224
|
-
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.
|
|
13225
|
-
|
|
13226
|
-
## Tools
|
|
13227
|
-
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.
|
|
13228
|
-
|
|
13229
|
-
## Changing settings
|
|
13230
|
-
- 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.
|
|
13231
|
-
- **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.
|
|
13232
|
-
- 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.
|
|
13233
|
-
- 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.
|
|
13234
|
-
- **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.
|
|
13235
|
-
- **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.
|
|
13236
|
-
- **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.
|
|
13237
|
-
- **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.
|
|
13238
|
-
- **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).
|
|
13239
|
-
- **"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.
|
|
13240
|
-
- **"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".
|
|
13241
|
-
- 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.
|
|
13242
|
-
|
|
13243
|
-
## Offers
|
|
13244
|
-
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.
|
|
13245
|
-
- **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.
|
|
13246
|
-
- **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.
|
|
13247
|
-
- **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.
|
|
13248
|
-
|
|
13249
|
-
## Automations
|
|
13250
|
-
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.
|
|
13251
|
-
`;
|
|
13252
|
-
|
|
13253
|
-
// ../shared/src/routes/preferences.ts
|
|
13254
|
-
import { z as z27 } from "zod";
|
|
13255
|
-
|
|
13256
|
-
// ../shared/src/routes/push.ts
|
|
13257
|
-
import { z as z25 } from "zod";
|
|
13258
|
-
|
|
13259
|
-
// ../shared/src/workspace-attention.ts
|
|
13260
|
-
var WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup", "deploy_failed"];
|
|
13261
|
-
var CHAT_ATTENTION_REASONS = ["question", "blocked"];
|
|
13262
|
-
|
|
13263
|
-
// ../shared/src/routes/push.ts
|
|
13264
|
-
var registerPushDeviceRequestSchema = z25.discriminatedUnion("platform", [
|
|
13265
|
-
z25.object({
|
|
13266
|
-
platform: z25.literal("ios"),
|
|
13267
|
-
token: z25.string().regex(/^[0-9a-f]{64,200}$/i),
|
|
13268
|
-
appId: z25.string().min(1).max(255),
|
|
13269
|
-
apnsEnvironment: z25.enum(["sandbox", "production"])
|
|
13270
|
-
}),
|
|
13271
|
-
z25.object({
|
|
13272
|
-
platform: z25.literal("android"),
|
|
13273
|
-
token: z25.string().min(1).max(4096),
|
|
13274
|
-
appId: z25.string().min(1).max(255)
|
|
13275
|
-
})
|
|
13276
|
-
]);
|
|
13277
|
-
var PUSH_HOLD_MINUTES = 5;
|
|
13278
|
-
var chatRefSchema = z25.object({ workspaceId: z25.string().uuid(), chatId: z25.string().min(1).max(100) });
|
|
13279
|
-
var recordPushActivityRequestSchema = z25.object({
|
|
13280
|
-
organizationId: z25.string().uuid(),
|
|
13281
|
-
/** Seconds since the last keyboard or mouse input on this computer. A phone leaves it out: it only reports what it has open. */
|
|
13282
|
-
idleSeconds: z25.number().min(0).optional(),
|
|
13283
|
-
seenWorkspaceIds: z25.array(z25.string().uuid()).max(20),
|
|
13284
|
-
seenChats: z25.array(chatRefSchema).max(20).optional()
|
|
13285
|
-
});
|
|
13286
|
-
var PUSH_NOTIFICATION_KINDS = [...WORKSPACE_ATTENTION_REASONS, "finished"];
|
|
13287
|
-
var PUSH_OPTION_LABEL_MAX = 60;
|
|
13288
|
-
var PUSH_OPTIONS_MAX = 4;
|
|
13289
|
-
var pushQuestionSchema = z25.object({ id: z25.string().max(64), allowCustom: z25.boolean().optional(), options: z25.array(z25.object({ id: z25.string().max(64), label: z25.string().min(1).max(PUSH_OPTION_LABEL_MAX) })).min(1).max(PUSH_OPTIONS_MAX) });
|
|
13290
|
-
var pushNotificationDataSchema = z25.object({
|
|
13291
|
-
organizationId: z25.string(),
|
|
13292
|
-
workspaceId: z25.string(),
|
|
13293
|
-
chatId: z25.string().nullable(),
|
|
13294
|
-
kind: z25.enum(PUSH_NOTIFICATION_KINDS),
|
|
13295
|
-
completedAt: z25.string(),
|
|
13296
|
-
toolRequestId: z25.string().optional(),
|
|
13297
|
-
question: pushQuestionSchema.optional()
|
|
13298
|
-
});
|
|
13299
|
-
var workspaceSharedPushDataSchema = pushNotificationDataSchema.pick({ organizationId: true, workspaceId: true, chatId: true, completedAt: true }).extend({ kind: z25.literal("shared") });
|
|
13300
|
-
var registerLiveActivityRequestSchema = chatRefSchema.extend({
|
|
13301
|
-
deviceId: z25.string().uuid(),
|
|
13302
|
-
/** The iOS activity's push token. Android leaves it out and gets FCM data messages on the device token. */
|
|
13303
|
-
pushToken: z25.string().regex(/^[0-9a-f]{64,400}$/i).optional(),
|
|
13304
|
-
/** iOS only: when the card's turn started, in seconds. Cards keep their order by it. */
|
|
13305
|
-
startedAt: z25.number().positive().optional()
|
|
13306
|
-
});
|
|
13307
|
-
var syncLiveActivitiesRequestSchema = z25.object({
|
|
13308
|
-
activities: z25.array(chatRefSchema).max(100)
|
|
13309
|
-
});
|
|
13310
|
-
var setLiveActivityStartTokenRequestSchema = z25.object({ token: z25.string().regex(/^[0-9a-f]{64,400}$/i) });
|
|
12636
|
+
var setLiveActivityStartTokenRequestSchema = z22.object({ token: z22.string().regex(/^[0-9a-f]{64,400}$/i) });
|
|
13311
12637
|
|
|
13312
12638
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
13313
12639
|
var SECTION = `### Computer use (Linux desktop control)
|
|
@@ -14059,7 +13385,7 @@ var GITLAB_ABILITY = {
|
|
|
14059
13385
|
};
|
|
14060
13386
|
|
|
14061
13387
|
// ../shared/src/routes/compute.ts
|
|
14062
|
-
import { z as
|
|
13388
|
+
import { z as z23 } from "zod";
|
|
14063
13389
|
var COMPUTE_SANDBOX_KINDS = ["gpu", "macos"];
|
|
14064
13390
|
var GPU_TYPES = ["T4", "L4", "A10G", "L40S", "A100", "A100-80GB", "H100", "H200", "B200"];
|
|
14065
13391
|
var DEFAULT_GPU_TYPE = "L4";
|
|
@@ -14077,27 +13403,27 @@ var COMPUTE_SANDBOX_LIMITS = {
|
|
|
14077
13403
|
maxIdleTimeoutMinutes: 60,
|
|
14078
13404
|
maxTransferBytes: 1024 ** 3
|
|
14079
13405
|
};
|
|
14080
|
-
var computeEnvSchema =
|
|
14081
|
-
var createComputeSandboxRequestSchema =
|
|
14082
|
-
kind:
|
|
14083
|
-
gpu:
|
|
14084
|
-
image:
|
|
14085
|
-
timeoutMinutes:
|
|
14086
|
-
idleTimeoutMinutes:
|
|
14087
|
-
ports:
|
|
13406
|
+
var computeEnvSchema = z23.record(z23.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z23.string().max(32768)).refine((env) => Object.keys(env).length <= 64, "At most 64 environment variables are allowed");
|
|
13407
|
+
var createComputeSandboxRequestSchema = z23.object({
|
|
13408
|
+
kind: z23.enum(COMPUTE_SANDBOX_KINDS),
|
|
13409
|
+
gpu: z23.string().trim().optional(),
|
|
13410
|
+
image: z23.string().trim().min(1).max(256).regex(/^\S+$/, "Image must not contain whitespace").optional(),
|
|
13411
|
+
timeoutMinutes: z23.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTimeoutMinutes).optional(),
|
|
13412
|
+
idleTimeoutMinutes: z23.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxIdleTimeoutMinutes).optional(),
|
|
13413
|
+
ports: z23.array(z23.number().int().min(1).max(65535)).max(COMPUTE_SANDBOX_LIMITS.maxPorts).optional(),
|
|
14088
13414
|
env: computeEnvSchema.optional()
|
|
14089
13415
|
});
|
|
14090
|
-
var computeExecRequestSchema =
|
|
14091
|
-
command:
|
|
14092
|
-
workdir:
|
|
13416
|
+
var computeExecRequestSchema = z23.object({
|
|
13417
|
+
command: z23.string().min(1).max(1e5),
|
|
13418
|
+
workdir: z23.string().min(1).max(4096).optional(),
|
|
14093
13419
|
env: computeEnvSchema.optional(),
|
|
14094
|
-
detach:
|
|
13420
|
+
detach: z23.boolean().optional()
|
|
14095
13421
|
});
|
|
14096
|
-
var computeUploadRequestSchema =
|
|
14097
|
-
size:
|
|
13422
|
+
var computeUploadRequestSchema = z23.object({
|
|
13423
|
+
size: z23.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
|
|
14098
13424
|
});
|
|
14099
|
-
var computeTransferPathSchema =
|
|
14100
|
-
path:
|
|
13425
|
+
var computeTransferPathSchema = z23.object({
|
|
13426
|
+
path: z23.string().min(1).max(4096).optional()
|
|
14101
13427
|
});
|
|
14102
13428
|
|
|
14103
13429
|
// ../shared/src/default-skills/replicas-agent/abilities/gpu.ts
|
|
@@ -15632,302 +14958,995 @@ For screenshots, recordings, diagrams, or other media, read \`references/MEDIA.m
|
|
|
15632
14958
|
|
|
15633
14959
|
Attach every new top-level conversation so future replies route to this workspace. For a reply in another thread, attach its root \`thread_ts\`, not the reply timestamp. Do not attach the originating thread again.
|
|
15634
14960
|
|
|
15635
|
-
## Search and batch
|
|
14961
|
+
## Search and batch
|
|
14962
|
+
|
|
14963
|
+
\`\`\`ts
|
|
14964
|
+
const [messages, users] = await Promise.all([
|
|
14965
|
+
replicas.slack.call('search.messages', { query: 'launch status' }),
|
|
14966
|
+
replicas.slack.call('users.list', { limit: 200 }),
|
|
14967
|
+
]);
|
|
14968
|
+
\`\`\`
|
|
14969
|
+
|
|
14970
|
+
Supported methods cover conversations, messages, search, users, reactions, and Slack's external file-upload flow. An unsupported method is rejected by Replicas before Slack is called.
|
|
14971
|
+
|
|
14972
|
+
## Older workspaces without the SDK
|
|
14973
|
+
|
|
14974
|
+
If \`@replicas/sdk\` cannot be imported, use the gateway with workspace authentication. Send JSON containing \`method\` and \`arguments\` on stdin, for example \`{"method":"conversations.list","arguments":{"limit":3,"types":"public_channel"}}\`:
|
|
14975
|
+
|
|
14976
|
+
\`\`\`bash
|
|
14977
|
+
curl -sS --fail-with-body -X POST "\${REPLICAS_MONOLITH_URL:-$MONOLITH_URL}/v1/engine/slack/api" \\
|
|
14978
|
+
-H "Authorization: Bearer $REPLICAS_ENGINE_SECRET" \\
|
|
14979
|
+
-H "X-Workspace-Id: \${REPLICAS_WORKSPACE_ID:-$WORKSPACE_ID}" \\
|
|
14980
|
+
-H "X-Replicas-Chat-Id: \${REPLICAS_CHAT_ID:-}" \\
|
|
14981
|
+
-H "Content-Type: application/json" \\
|
|
14982
|
+
--data-binary @-
|
|
14983
|
+
\`\`\`
|
|
14984
|
+
`;
|
|
14985
|
+
var SLACK_ABILITY = {
|
|
14986
|
+
label: "Slack",
|
|
14987
|
+
description: "Send messages, read threads, search, and transfer files through @replicas/sdk.",
|
|
14988
|
+
bullet: "- Interacting with Slack (listing channels, sending messages, reading threads, or searching): use replicas.slack.call from @replicas/sdk. Read references/SLACK.md; no Slack MCP server or provider token in the VM is required.",
|
|
14989
|
+
section: SECTION16,
|
|
14990
|
+
referenceFile: { name: "SLACK.md", content: REFERENCE16 }
|
|
14991
|
+
};
|
|
14992
|
+
|
|
14993
|
+
// ../shared/src/visuals.ts
|
|
14994
|
+
var VISUAL_COLUMN_WIDTH = 760;
|
|
14995
|
+
var VISUAL_PHONE_WIDTH = 390;
|
|
14996
|
+
var FONT_FAMILIES = ["Inter", "General Sans"];
|
|
14997
|
+
var FONT_SANS = `${FONT_FAMILIES.map((family) => `"${family}"`).join(", ")}, system-ui, -apple-system, "Segoe UI", sans-serif`;
|
|
14998
|
+
var 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.
|
|
14999
|
+
- 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.
|
|
15000
|
+
- 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.
|
|
15001
|
+
- 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.
|
|
15002
|
+
- 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.
|
|
15003
|
+
- 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.
|
|
15004
|
+
- Interaction is welcome: hover details, tabs, toggles, sliders. Links open in a new browser tab.
|
|
15005
|
+
- Keep the top-right corner (about 110\xD740px) free of anything essential: the chat shows the visual's actions there on hover.`;
|
|
15006
|
+
var THEME_FRAGMENT_KEY = "replicas-theme";
|
|
15007
|
+
var HOST_CONTEXT_CHANGED_METHOD = "ui/notifications/host-context-changed";
|
|
15008
|
+
var SIZE_CHANGED_METHOD = "ui/notifications/size-changed";
|
|
15009
|
+
var OPEN_LINK_METHOD = "ui/open-link";
|
|
15010
|
+
var OPEN_IMAGE_METHOD = "replicas/open-image";
|
|
15011
|
+
var VISUAL_CONTENT_HEIGHT_EXPRESSION = "(function(){var r=document.documentElement;return Math.ceil(r.scrollHeight>r.clientHeight?r.scrollHeight:r.getBoundingClientRect().height)})()";
|
|
15012
|
+
var 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}";
|
|
15013
|
+
var THEME_STYLE_ID = "replicas-visual-theme";
|
|
15014
|
+
var BOOTSTRAP_SCRIPT = `
|
|
15015
|
+
(() => {
|
|
15016
|
+
const style = document.getElementById('${THEME_STYLE_ID}');
|
|
15017
|
+
const nativeView = window.ReactNativeWebView;
|
|
15018
|
+
const framed = window.parent !== window;
|
|
15019
|
+
const post = (message) => nativeView ? nativeView.postMessage(JSON.stringify(message)) : window.parent.postMessage(message, '*');
|
|
15020
|
+
const applyTheme = (theme) => {
|
|
15021
|
+
const variables = Object.entries(theme.variables).map(([name, value]) => name + ':' + value + ';').join('');
|
|
15022
|
+
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('') : '';
|
|
15023
|
+
style.textContent = ':root{color-scheme:' + theme.appearance + ';' + variables + '}' + font + ${JSON.stringify(BASE_CSS)};
|
|
15024
|
+
};
|
|
15025
|
+
try {
|
|
15026
|
+
const fragment = /[#&]${THEME_FRAGMENT_KEY}=([^&]*)/.exec(location.hash);
|
|
15027
|
+
if (fragment) {
|
|
15028
|
+
applyTheme(JSON.parse(decodeURIComponent(fragment[1])));
|
|
15029
|
+
history.replaceState(history.state, '', location.pathname + location.search);
|
|
15030
|
+
}
|
|
15031
|
+
} catch {}
|
|
15032
|
+
if (!nativeView) {
|
|
15033
|
+
document.addEventListener('click', (event) => {
|
|
15034
|
+
const anchor = event.isTrusted && event.composedPath().find((target) => target instanceof Element && target.matches('a[href]'));
|
|
15035
|
+
if (!anchor) return;
|
|
15036
|
+
const url = new URL(anchor.getAttribute('href'), document.baseURI);
|
|
15037
|
+
if (!/^https?:$/.test(url.protocol) || url.href.split('#')[0] === location.href.split('#')[0]) return;
|
|
15038
|
+
if (framed) {
|
|
15039
|
+
event.preventDefault();
|
|
15040
|
+
post({ jsonrpc: '2.0', method: '${OPEN_LINK_METHOD}', params: { url: url.href } });
|
|
15041
|
+
} else {
|
|
15042
|
+
anchor.setAttribute('target', '_blank');
|
|
15043
|
+
anchor.setAttribute('rel', 'noopener');
|
|
15044
|
+
}
|
|
15045
|
+
}, true);
|
|
15046
|
+
}
|
|
15047
|
+
if (!framed && !nativeView) return;
|
|
15048
|
+
window.addEventListener('click', (event) => {
|
|
15049
|
+
const image = event.composedPath()[0];
|
|
15050
|
+
if (!event.isTrusted || event.defaultPrevented || !(image instanceof HTMLImageElement) || image.closest('a[href], button')) return;
|
|
15051
|
+
let src = image.currentSrc || image.src;
|
|
15052
|
+
if (/^blob:/i.test(src) || (nativeView && /^data:image\\/svg|\\.svg(?:[?#]|$)/i.test(src))) {
|
|
15053
|
+
try {
|
|
15054
|
+
const canvas = document.createElement('canvas');
|
|
15055
|
+
canvas.width = (image.naturalWidth || image.width) * 2;
|
|
15056
|
+
canvas.height = (image.naturalHeight || image.height) * 2;
|
|
15057
|
+
canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
15058
|
+
src = canvas.toDataURL('image/png');
|
|
15059
|
+
} catch {
|
|
15060
|
+
return;
|
|
15061
|
+
}
|
|
15062
|
+
}
|
|
15063
|
+
if (src) post({ jsonrpc: '2.0', method: '${OPEN_IMAGE_METHOD}', params: { src, name: image.alt } });
|
|
15064
|
+
});
|
|
15065
|
+
let reportedHeight;
|
|
15066
|
+
const reportHeight = () => {
|
|
15067
|
+
const height = ${VISUAL_CONTENT_HEIGHT_EXPRESSION};
|
|
15068
|
+
if (height === reportedHeight) return;
|
|
15069
|
+
reportedHeight = height;
|
|
15070
|
+
post({ jsonrpc: '2.0', method: '${SIZE_CHANGED_METHOD}', params: { height } });
|
|
15071
|
+
};
|
|
15072
|
+
window.addEventListener('message', (event) => {
|
|
15073
|
+
if (event.source !== window.parent || event.data?.method !== '${HOST_CONTEXT_CHANGED_METHOD}') return;
|
|
15074
|
+
const { theme, styles, fontUrl } = event.data.params;
|
|
15075
|
+
applyTheme({ appearance: theme, variables: styles.variables, fontUrl });
|
|
15076
|
+
reportedHeight = undefined;
|
|
15077
|
+
if (document.readyState !== 'loading') reportHeight();
|
|
15078
|
+
});
|
|
15079
|
+
const resizeObserver = new ResizeObserver(reportHeight);
|
|
15080
|
+
resizeObserver.observe(document.documentElement);
|
|
15081
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
15082
|
+
resizeObserver.observe(document.body);
|
|
15083
|
+
reportHeight();
|
|
15084
|
+
});
|
|
15085
|
+
window.addEventListener('load', reportHeight);
|
|
15086
|
+
})();
|
|
15087
|
+
`.trim().replace(/\s*\n\s*/g, " ");
|
|
15088
|
+
|
|
15089
|
+
// ../shared/src/default-skills/replicas-agent/abilities/visuals.ts
|
|
15090
|
+
var SECTION17 = `### Visuals
|
|
15091
|
+
Show a chart, diagram, comparison, timeline, or mockup inline in your Replicas chat reply, in the chat's own font and colors.
|
|
15092
|
+
|
|
15093
|
+
**Reference:** \`references/VISUALS.md\`
|
|
15094
|
+
|
|
15095
|
+
Use this when:
|
|
15096
|
+
- Seeing it would explain faster than reading it: numbers over time, a flow or architecture, a before and after, options side by side
|
|
15097
|
+
- The user asks to see, chart, plot, compare, or visualize something`;
|
|
15098
|
+
var REFERENCE17 = `# Visuals
|
|
15099
|
+
|
|
15100
|
+
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.
|
|
15101
|
+
|
|
15102
|
+
## When to make one
|
|
15103
|
+
|
|
15104
|
+
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.
|
|
15105
|
+
|
|
15106
|
+
Don't make one when:
|
|
15107
|
+
- A short answer or list covers it.
|
|
15108
|
+
- It is a plain table: write a Markdown table.
|
|
15109
|
+
- 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\`.
|
|
15110
|
+
- The user wants a page, site, or component in their project: build that in the repo.
|
|
15111
|
+
|
|
15112
|
+
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.
|
|
15113
|
+
|
|
15114
|
+
## Make it
|
|
15115
|
+
|
|
15116
|
+
1. Write the page, for example \`/tmp/visuals/<name>.html\`, following the page rules below.
|
|
15117
|
+
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.
|
|
15118
|
+
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.
|
|
15119
|
+
4. Paste the printed \`\` line on its own line where the visual belongs in your final reply.
|
|
15120
|
+
|
|
15121
|
+
## Page rules
|
|
15122
|
+
|
|
15123
|
+
${VISUAL_PAGE_RULES}
|
|
15124
|
+
|
|
15125
|
+
## In your reply
|
|
15126
|
+
|
|
15127
|
+
- 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.
|
|
15128
|
+
- 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.
|
|
15129
|
+
- 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.
|
|
15130
|
+
`;
|
|
15131
|
+
var VISUALS_ABILITY = {
|
|
15132
|
+
label: "Visuals",
|
|
15133
|
+
description: "Show charts, diagrams, comparisons, and mockups inline in chat replies.",
|
|
15134
|
+
// The visuals_instructions system prompt block is its trigger.
|
|
15135
|
+
bullet: "",
|
|
15136
|
+
section: SECTION17,
|
|
15137
|
+
referenceFile: { name: "VISUALS.md", content: REFERENCE17 }
|
|
15138
|
+
};
|
|
15139
|
+
|
|
15140
|
+
// ../shared/src/default-skills/replicas-agent/registry.ts
|
|
15141
|
+
var REPLICAS_AGENT_ABILITY_REGISTRY = {
|
|
15142
|
+
replicas: REPLICAS_ABILITY,
|
|
15143
|
+
memory: SESSION_HISTORY_ABILITY,
|
|
15144
|
+
computer: COMPUTER_ABILITY,
|
|
15145
|
+
docker: DOCKER_ABILITY,
|
|
15146
|
+
environment_setup: ENVIRONMENT_SETUP_ABILITY,
|
|
15147
|
+
github: GITHUB_ABILITY,
|
|
15148
|
+
gitlab: GITLAB_ABILITY,
|
|
15149
|
+
gpu: GPU_ABILITY,
|
|
15150
|
+
linear: LINEAR_ABILITY,
|
|
15151
|
+
local_computer: LOCAL_COMPUTER_ABILITY,
|
|
15152
|
+
macos: MACOS_ABILITY,
|
|
15153
|
+
media: MEDIA_ABILITY,
|
|
15154
|
+
plugins: PLUGINS_ABILITY,
|
|
15155
|
+
previews: PREVIEWS_ABILITY,
|
|
15156
|
+
sentry: SENTRY_ABILITY,
|
|
15157
|
+
slack: SLACK_ABILITY,
|
|
15158
|
+
visuals: VISUALS_ABILITY
|
|
15159
|
+
};
|
|
15160
|
+
var REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
15161
|
+
REPLICAS_AGENT_ABILITY_REGISTRY
|
|
15162
|
+
);
|
|
15163
|
+
|
|
15164
|
+
// ../shared/src/routes/preferences.ts
|
|
15165
|
+
var EMPTY_AGENT_DEFAULT_SETTINGS = {
|
|
15166
|
+
agent_provider: null,
|
|
15167
|
+
model: null,
|
|
15168
|
+
thinking_level: null,
|
|
15169
|
+
goal_mode: null,
|
|
15170
|
+
fast_mode: null
|
|
15171
|
+
};
|
|
15172
|
+
var DEFAULT_SUBAGENT_MCP_PROVIDERS = [...ENGINE_AGENT_PROVIDERS];
|
|
15173
|
+
var ALERT_SOUND_FAMILIES = {
|
|
15174
|
+
glass: ["glint", "tap", "ripple", "halo"],
|
|
15175
|
+
wood: ["ready", "pluck", "knock", "bloom", "steps"]
|
|
15176
|
+
};
|
|
15177
|
+
var ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
|
|
15178
|
+
var WALLPAPER_DITHERS = ["dither", "halftone", "modulation"];
|
|
15179
|
+
var WALLPAPER_EFFECTS = ["soft", "grain", "duotone", ...WALLPAPER_DITHERS, "none"];
|
|
15180
|
+
var PUSH_WHEN_ACTIVE_COPY = {
|
|
15181
|
+
wait: `Wait ${PUSH_HOLD_MINUTES} minutes`,
|
|
15182
|
+
skip: "Don\u2019t send",
|
|
15183
|
+
send: "Send right away"
|
|
15184
|
+
};
|
|
15185
|
+
var DEFAULT_USER_PREFERENCES = {
|
|
15186
|
+
default_agent: null,
|
|
15187
|
+
default_model: null,
|
|
15188
|
+
claude_models: null,
|
|
15189
|
+
codex_models: null,
|
|
15190
|
+
cursor_models: null,
|
|
15191
|
+
claude_hidden_models: null,
|
|
15192
|
+
codex_hidden_models: null,
|
|
15193
|
+
cursor_hidden_models: null,
|
|
15194
|
+
openrouter_models: null,
|
|
15195
|
+
opencode_go_models: null,
|
|
15196
|
+
close_workspace_on_pr_close: false,
|
|
15197
|
+
close_workspace_on_pr_merge: false,
|
|
15198
|
+
default_environment_id: null,
|
|
15199
|
+
respond_to_ci_workflows: true,
|
|
15200
|
+
respond_to_ci_checks: true,
|
|
15201
|
+
respond_to_human_pr_reviews: false,
|
|
15202
|
+
pr_user_attribution: false,
|
|
15203
|
+
github_commit_name: null,
|
|
15204
|
+
github_commit_email: null,
|
|
15205
|
+
auto_draft_prs: false,
|
|
15206
|
+
open_prs_in_graphite: false,
|
|
15207
|
+
open_links_in_desktop_app: false,
|
|
15208
|
+
local_control: false,
|
|
15209
|
+
spotify_controls: false,
|
|
15210
|
+
appshot_shortcut: "command",
|
|
15211
|
+
appshot_destination: "automatic",
|
|
15212
|
+
appshot_sound: true,
|
|
15213
|
+
keyboard_shortcuts: {},
|
|
15214
|
+
mothership_tour_seen: false,
|
|
15215
|
+
slack_settings_moved_notice: false,
|
|
15216
|
+
mothership_board_opened: false,
|
|
15217
|
+
follow_up_mode: "steer",
|
|
15218
|
+
send_key: "enter",
|
|
15219
|
+
memory_enabled: null,
|
|
15220
|
+
subagent_mcp_enabled: null,
|
|
15221
|
+
default_fast_mode: false,
|
|
15222
|
+
auto_compact_tokens: null,
|
|
15223
|
+
agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
|
|
15224
|
+
fallback_chains: null,
|
|
15225
|
+
alert_sound: null,
|
|
15226
|
+
workspace_alerts: {},
|
|
15227
|
+
automation_alerts: {},
|
|
15228
|
+
push_types: { needs_you: true, finished: true, automations: true, usage_limit: true },
|
|
15229
|
+
push_when_active: "wait",
|
|
15230
|
+
chat_text_size: "default",
|
|
15231
|
+
app_font: "inter",
|
|
15232
|
+
code_font: "geist-mono",
|
|
15233
|
+
wallpaper: null
|
|
15234
|
+
};
|
|
15235
|
+
function defaultReplicasAgentAbilities() {
|
|
15236
|
+
const abilities = {};
|
|
15237
|
+
for (const key of REPLICAS_AGENT_ABILITIES) {
|
|
15238
|
+
abilities[key] = true;
|
|
15239
|
+
}
|
|
15240
|
+
if (hasAllReplicasAgentAbilities(abilities)) return abilities;
|
|
15241
|
+
throw new Error("Default Replicas agent ability flags are incomplete");
|
|
15242
|
+
}
|
|
15243
|
+
function hasAllReplicasAgentAbilities(abilities) {
|
|
15244
|
+
return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
|
|
15245
|
+
}
|
|
15246
|
+
var DEFAULT_DEFAULT_SKILLS = {
|
|
15247
|
+
replicas_agent: {
|
|
15248
|
+
enabled: true,
|
|
15249
|
+
abilities: defaultReplicasAgentAbilities()
|
|
15250
|
+
}
|
|
15251
|
+
};
|
|
15252
|
+
var defaultSkillsOverridesSchema = z24.strictObject({
|
|
15253
|
+
replicas_agent: z24.strictObject({
|
|
15254
|
+
enabled: z24.boolean().optional(),
|
|
15255
|
+
abilities: z24.partialRecord(z24.enum(REPLICAS_AGENT_ABILITIES), z24.boolean()).optional()
|
|
15256
|
+
}).optional()
|
|
15257
|
+
});
|
|
15258
|
+
var LINEAR_ROUTING_SKILL_MAX_LENGTH = 5e4;
|
|
15259
|
+
var linearRoutingSkillSchema = z24.union([
|
|
15260
|
+
z24.object({ name: z24.string().min(1), content: z24.string().trim().min(1).max(LINEAR_ROUTING_SKILL_MAX_LENGTH) }),
|
|
15261
|
+
z24.object({ name: z24.string().min(1), repository_id: z24.string().regex(UUID_RE), path: z24.string().min(1) })
|
|
15262
|
+
]);
|
|
15263
|
+
|
|
15264
|
+
// ../shared/src/environment-files.ts
|
|
15265
|
+
var HOME_PREFIX = "~/";
|
|
15266
|
+
var ENVIRONMENT_FILE_PATH_GUIDANCE = "Use ~/... for home-directory files, or ~/workspaces/... for files that should live alongside your cloned repositories.";
|
|
15267
|
+
function validateEnvironmentFilePath(path) {
|
|
15268
|
+
const trimmedPath = path.trim();
|
|
15269
|
+
if (!trimmedPath) {
|
|
15270
|
+
return "Path is required.";
|
|
15271
|
+
}
|
|
15272
|
+
if (!trimmedPath.startsWith(HOME_PREFIX)) {
|
|
15273
|
+
return `Path must start with the home-directory prefix ~/ . ${ENVIRONMENT_FILE_PATH_GUIDANCE}`.replace("~/ .", "~/");
|
|
15274
|
+
}
|
|
15275
|
+
if (trimmedPath === HOME_PREFIX) {
|
|
15276
|
+
return "Path must include a file name after ~/.";
|
|
15277
|
+
}
|
|
15278
|
+
return null;
|
|
15279
|
+
}
|
|
15280
|
+
|
|
15281
|
+
// ../shared/src/routes/plugin-catalog.ts
|
|
15282
|
+
var EXPLICIT_PLUGIN_CATALOG = [
|
|
15283
|
+
{
|
|
15284
|
+
id: "attio",
|
|
15285
|
+
backend: "composio",
|
|
15286
|
+
toolkit: "attio",
|
|
15287
|
+
authType: "oauth",
|
|
15288
|
+
category: "business",
|
|
15289
|
+
name: "Attio",
|
|
15290
|
+
description: "Manage CRM records, people, companies, lists, and notes."
|
|
15291
|
+
},
|
|
15292
|
+
{
|
|
15293
|
+
id: "calendly",
|
|
15294
|
+
backend: "composio",
|
|
15295
|
+
toolkit: "calendly",
|
|
15296
|
+
authType: "oauth",
|
|
15297
|
+
category: "productivity",
|
|
15298
|
+
name: "Calendly",
|
|
15299
|
+
description: "Manage event types, scheduled events, invitees, and scheduling links."
|
|
15300
|
+
},
|
|
15301
|
+
{
|
|
15302
|
+
id: "clickhouse",
|
|
15303
|
+
backend: "composio",
|
|
15304
|
+
toolkit: "clickhouse",
|
|
15305
|
+
authType: "basic",
|
|
15306
|
+
category: "data",
|
|
15307
|
+
name: "ClickHouse",
|
|
15308
|
+
description: "Manage databases, tables, schemas, and queries."
|
|
15309
|
+
},
|
|
15310
|
+
{
|
|
15311
|
+
id: "cloudflare",
|
|
15312
|
+
backend: "composio",
|
|
15313
|
+
toolkit: "cloudflare_api_key",
|
|
15314
|
+
authType: "api_key",
|
|
15315
|
+
category: "data",
|
|
15316
|
+
name: "Cloudflare",
|
|
15317
|
+
description: "Manage zones, DNS records, analytics, and security settings."
|
|
15318
|
+
},
|
|
15319
|
+
{
|
|
15320
|
+
id: "e2b",
|
|
15321
|
+
toolkit: "e2b",
|
|
15322
|
+
backend: "native",
|
|
15323
|
+
authType: "api_key",
|
|
15324
|
+
category: "data",
|
|
15325
|
+
name: "E2B",
|
|
15326
|
+
description: "Create secure cloud sandboxes and run commands in them."
|
|
15327
|
+
},
|
|
15328
|
+
{
|
|
15329
|
+
id: "gmail",
|
|
15330
|
+
backend: "composio",
|
|
15331
|
+
toolkit: "gmail",
|
|
15332
|
+
authType: "oauth",
|
|
15333
|
+
category: "productivity",
|
|
15334
|
+
name: "Gmail",
|
|
15335
|
+
description: "Manage messages, threads, attachments, labels, and mailbox settings."
|
|
15336
|
+
},
|
|
15337
|
+
{
|
|
15338
|
+
id: "greptile",
|
|
15339
|
+
backend: "native",
|
|
15340
|
+
toolkit: "greptile",
|
|
15341
|
+
authType: "api_key",
|
|
15342
|
+
category: "data",
|
|
15343
|
+
name: "Greptile Knowledge Base",
|
|
15344
|
+
description: "Search and read self-updating codebase documentation, architecture, and flows."
|
|
15345
|
+
},
|
|
15346
|
+
{
|
|
15347
|
+
id: "googleads",
|
|
15348
|
+
backend: "composio",
|
|
15349
|
+
toolkit: "googleads",
|
|
15350
|
+
authType: "oauth",
|
|
15351
|
+
category: "data",
|
|
15352
|
+
name: "Google Ads",
|
|
15353
|
+
description: "Manage campaigns, customers, accounts, and reporting data."
|
|
15354
|
+
},
|
|
15355
|
+
{
|
|
15356
|
+
id: "googledocs",
|
|
15357
|
+
backend: "composio",
|
|
15358
|
+
toolkit: "googledocs",
|
|
15359
|
+
authType: "oauth",
|
|
15360
|
+
category: "productivity",
|
|
15361
|
+
name: "Google Docs",
|
|
15362
|
+
description: "Manage documents, structure, comments, and exported content."
|
|
15363
|
+
},
|
|
15364
|
+
{
|
|
15365
|
+
id: "googledrive",
|
|
15366
|
+
backend: "composio",
|
|
15367
|
+
toolkit: "googledrive",
|
|
15368
|
+
authType: "oauth",
|
|
15369
|
+
category: "productivity",
|
|
15370
|
+
name: "Google Drive",
|
|
15371
|
+
description: "Manage files, folders, metadata, permissions, and shared drives."
|
|
15372
|
+
},
|
|
15373
|
+
{
|
|
15374
|
+
id: "googlesearch",
|
|
15375
|
+
backend: "composio",
|
|
15376
|
+
toolkit: "google_search_console",
|
|
15377
|
+
authType: "oauth",
|
|
15378
|
+
category: "data",
|
|
15379
|
+
name: "Google Search",
|
|
15380
|
+
description: "Manage Search Console performance, indexing, sites, and sitemaps."
|
|
15381
|
+
},
|
|
15382
|
+
{
|
|
15383
|
+
id: "googlesheets",
|
|
15384
|
+
backend: "composio",
|
|
15385
|
+
toolkit: "googlesheets",
|
|
15386
|
+
authType: "oauth",
|
|
15387
|
+
category: "productivity",
|
|
15388
|
+
name: "Google Sheets",
|
|
15389
|
+
description: "Manage spreadsheets, worksheets, ranges, tables, and charts."
|
|
15390
|
+
},
|
|
15391
|
+
{
|
|
15392
|
+
id: "linkedin",
|
|
15393
|
+
backend: "composio",
|
|
15394
|
+
toolkit: "linkedin",
|
|
15395
|
+
authType: "oauth",
|
|
15396
|
+
category: "business",
|
|
15397
|
+
name: "LinkedIn",
|
|
15398
|
+
description: "Manage profiles, organizations, posts, and professional activity."
|
|
15399
|
+
},
|
|
15400
|
+
{
|
|
15401
|
+
id: "modal",
|
|
15402
|
+
backend: "native",
|
|
15403
|
+
toolkit: "modal",
|
|
15404
|
+
authType: "basic",
|
|
15405
|
+
category: "data",
|
|
15406
|
+
name: "Modal",
|
|
15407
|
+
description: "Invoke deployed functions through Modal compute."
|
|
15408
|
+
},
|
|
15409
|
+
{
|
|
15410
|
+
id: "posthog",
|
|
15411
|
+
backend: "composio",
|
|
15412
|
+
toolkit: "posthog",
|
|
15413
|
+
authType: "api_key",
|
|
15414
|
+
category: "data",
|
|
15415
|
+
name: "PostHog",
|
|
15416
|
+
description: "Manage projects, events, insights, dashboards, flags, and recordings."
|
|
15417
|
+
},
|
|
15418
|
+
{
|
|
15419
|
+
id: "planetscale",
|
|
15420
|
+
toolkit: "planetscale",
|
|
15421
|
+
backend: "native",
|
|
15422
|
+
authType: "oauth",
|
|
15423
|
+
category: "data",
|
|
15424
|
+
name: "PlanetScale",
|
|
15425
|
+
description: "Manage organizations, databases, branches, deploy requests, and Insights."
|
|
15426
|
+
},
|
|
15427
|
+
{
|
|
15428
|
+
id: "sazabi",
|
|
15429
|
+
backend: "native",
|
|
15430
|
+
toolkit: "sazabi",
|
|
15431
|
+
authType: "oauth",
|
|
15432
|
+
category: "data",
|
|
15433
|
+
name: "Sazabi",
|
|
15434
|
+
description: "Query logs, investigate issues, and run the Sazabi observability agent."
|
|
15435
|
+
},
|
|
15436
|
+
{
|
|
15437
|
+
id: "stripe",
|
|
15438
|
+
backend: "composio",
|
|
15439
|
+
toolkit: "stripe",
|
|
15440
|
+
authType: "oauth",
|
|
15441
|
+
category: "business",
|
|
15442
|
+
name: "Stripe",
|
|
15443
|
+
description: "Manage customers, payments, invoices, subscriptions, and balances."
|
|
15444
|
+
},
|
|
15445
|
+
{
|
|
15446
|
+
id: "kondo",
|
|
15447
|
+
backend: "native",
|
|
15448
|
+
toolkit: "kondo",
|
|
15449
|
+
authType: "oauth",
|
|
15450
|
+
category: "business",
|
|
15451
|
+
name: "Kondo",
|
|
15452
|
+
description: "Manage LinkedIn chats, labels, reminders, drafts, connections, and invites."
|
|
15453
|
+
},
|
|
15454
|
+
{
|
|
15455
|
+
id: "lightfield",
|
|
15456
|
+
backend: "native",
|
|
15457
|
+
toolkit: "lightfield",
|
|
15458
|
+
authType: "api_key",
|
|
15459
|
+
category: "business",
|
|
15460
|
+
name: "Lightfield",
|
|
15461
|
+
description: "Manage CRM accounts, contacts, opportunities, meetings, notes, and tasks."
|
|
15462
|
+
},
|
|
15463
|
+
{
|
|
15464
|
+
id: "pangram",
|
|
15465
|
+
backend: "native",
|
|
15466
|
+
toolkit: "pangram",
|
|
15467
|
+
authType: "api_key",
|
|
15468
|
+
category: "data",
|
|
15469
|
+
name: "Pangram",
|
|
15470
|
+
description: "Analyze text for AI generation and plagiarism signals."
|
|
15471
|
+
},
|
|
15472
|
+
{
|
|
15473
|
+
id: "vercel",
|
|
15474
|
+
backend: "native",
|
|
15475
|
+
toolkit: "vercel",
|
|
15476
|
+
authType: "api_key",
|
|
15477
|
+
category: "data",
|
|
15478
|
+
name: "Vercel",
|
|
15479
|
+
description: "Manage projects, deployments, logs, domains, and infrastructure."
|
|
15480
|
+
},
|
|
15481
|
+
{
|
|
15482
|
+
id: "turbopuffer",
|
|
15483
|
+
backend: "native",
|
|
15484
|
+
toolkit: "turbopuffer",
|
|
15485
|
+
authType: "api_key",
|
|
15486
|
+
category: "data",
|
|
15487
|
+
name: "turbopuffer",
|
|
15488
|
+
description: "Query and manage turbopuffer namespaces."
|
|
15489
|
+
},
|
|
15490
|
+
{
|
|
15491
|
+
id: "vanta",
|
|
15492
|
+
backend: "native",
|
|
15493
|
+
toolkit: "vanta",
|
|
15494
|
+
authType: "credentials",
|
|
15495
|
+
category: "data",
|
|
15496
|
+
name: "Vanta",
|
|
15497
|
+
description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data."
|
|
15498
|
+
}
|
|
15499
|
+
];
|
|
15500
|
+
var HOSTED_COMPOSIO_PLUGIN_DEFINITIONS = [
|
|
15501
|
+
["notion", "notion", "OAUTH2", true, "productivity", "Notion"],
|
|
15502
|
+
["jira", "jira", "OAUTH2", true, "productivity", "Jira"],
|
|
15503
|
+
["confluence", "confluence", "OAUTH2", true, "productivity", "Confluence"],
|
|
15504
|
+
["googlecalendar", "googlecalendar", "OAUTH2", true, "productivity", "Google Calendar"],
|
|
15505
|
+
["microsoftteams", "microsoft_teams", "OAUTH2", true, "productivity", "Microsoft Teams"],
|
|
15506
|
+
["outlook", "outlook", "OAUTH2", true, "productivity", "Outlook"],
|
|
15507
|
+
["bitbucket", "bitbucket", "OAUTH2", true, "data", "Bitbucket"],
|
|
15508
|
+
["datadog", "datadog", "API_KEY", false, "data", "Datadog"],
|
|
15509
|
+
["pagerduty", "pagerduty", "OAUTH2", true, "data", "PagerDuty"],
|
|
15510
|
+
["intercom", "intercom", "OAUTH2", true, "business", "Intercom"],
|
|
15511
|
+
["zendesk", "zendesk", "OAUTH2", true, "business", "Zendesk"],
|
|
15512
|
+
["hubspot", "hubspot", "OAUTH2", true, "business", "HubSpot"],
|
|
15513
|
+
["supabase", "supabase", "OAUTH2", true, "data", "Supabase"],
|
|
15514
|
+
["figma", "figma", "OAUTH2", true, "productivity", "Figma"],
|
|
15515
|
+
["launchdarkly", "launch_darkly", "API_KEY", false, "data", "LaunchDarkly"],
|
|
15516
|
+
["asana", "asana", "OAUTH2", true, "productivity", "Asana"],
|
|
15517
|
+
["clickup", "clickup", "OAUTH2", true, "productivity", "ClickUp"],
|
|
15518
|
+
["trello", "trello", "OAUTH1", true, "productivity", "Trello"],
|
|
15519
|
+
["todoist", "todoist", "OAUTH2", true, "productivity", "Todoist"],
|
|
15520
|
+
["airtable", "airtable", "OAUTH2", true, "productivity", "Airtable"],
|
|
15521
|
+
["coda", "coda", "API_KEY", false, "productivity", "Coda"],
|
|
15522
|
+
["miro", "miro", "OAUTH2", true, "productivity", "Miro"],
|
|
15523
|
+
["sharepoint", "share_point", "OAUTH2", true, "productivity", "SharePoint"],
|
|
15524
|
+
["onedrive", "one_drive", "OAUTH2", true, "productivity", "OneDrive"],
|
|
15525
|
+
["googleslides", "googleslides", "OAUTH2", true, "productivity", "Google Slides"],
|
|
15526
|
+
["googlemeet", "googlemeet", "OAUTH2", true, "productivity", "Google Meet"],
|
|
15527
|
+
["circleback", "circleback_mcp", "DCR_OAUTH", false, "productivity", "Circleback"],
|
|
15528
|
+
["granola", "granola_mcp", "DCR_OAUTH", false, "productivity", "Granola"],
|
|
15529
|
+
["mercury", "mercury_mcp", "DCR_OAUTH", false, "business", "Mercury"],
|
|
15530
|
+
["googletasks", "googletasks", "OAUTH2", true, "productivity", "Google Tasks"],
|
|
15531
|
+
["dropbox", "dropbox", "OAUTH2", true, "productivity", "Dropbox"],
|
|
15532
|
+
["box", "box", "OAUTH2", true, "productivity", "Box"],
|
|
15533
|
+
["discord", "discord", "OAUTH2", true, "productivity", "Discord"],
|
|
15534
|
+
["discordbot", "discordbot", "OAUTH2", true, "productivity", "Discord Bot"],
|
|
15535
|
+
["zoom", "zoom", "OAUTH2", true, "productivity", "Zoom"],
|
|
15536
|
+
["googlechat", "google_chat", "OAUTH2", false, "productivity", "Google Chat"],
|
|
15537
|
+
["newrelic", "new_relic", "API_KEY", false, "data", "New Relic"],
|
|
15538
|
+
["betterstack", "better_stack", "API_KEY", false, "data", "Better Stack"],
|
|
15539
|
+
["incidentio", "incident_io", "API_KEY", false, "data", "incident.io"],
|
|
15540
|
+
["grafana", "grafana", "BEARER_TOKEN", false, "data", "Grafana"],
|
|
15541
|
+
["honeycomb", "honeycomb_mcp", "DCR_OAUTH", false, "data", "Honeycomb MCP"],
|
|
15542
|
+
["neon", "neon_mcp", "DCR_OAUTH", false, "data", "Neon"],
|
|
15543
|
+
["glen", "glen_mcp", "DCR_OAUTH", false, "data", "Glen"],
|
|
15544
|
+
["bugsnag", "bugsnag", "API_KEY", false, "data", "Bugsnag"],
|
|
15545
|
+
["circleci", "circleci", "API_KEY", false, "data", "CircleCI"],
|
|
15546
|
+
["buildkite", "buildkite", "API_KEY", false, "data", "Buildkite"],
|
|
15547
|
+
["dockerhub", "docker_hub", "API_KEY", false, "data", "Docker Hub"],
|
|
15548
|
+
["digitalocean", "digital_ocean", "OAUTH2", true, "data", "DigitalOcean"],
|
|
15549
|
+
["railway", "railway", "API_KEY", false, "data", "Railway"],
|
|
15550
|
+
["render", "render", "API_KEY", false, "data", "Render"],
|
|
15551
|
+
["firebase", "firebase", "API_KEY", false, "data", "Firebase"],
|
|
15552
|
+
["cloudinary", "cloudinary", "API_KEY", false, "data", "Cloudinary"],
|
|
15553
|
+
["configcat", "configcat", "API_KEY", false, "data", "ConfigCat"],
|
|
15554
|
+
["contextdev", "context_dev", "API_KEY", false, "data", "Context.dev"],
|
|
15555
|
+
["googleanalytics", "google_analytics", "OAUTH2", true, "data", "Google Analytics"],
|
|
15556
|
+
["googlebigquery", "googlebigquery", "OAUTH2", true, "data", "Google BigQuery"],
|
|
15557
|
+
["amplitude", "amplitude", "API_KEY", false, "data", "Amplitude"],
|
|
15558
|
+
["mixpanel", "mixpanel", "BASIC", false, "data", "Mixpanel"],
|
|
15559
|
+
["segment", "segment", "API_KEY", false, "data", "Segment"],
|
|
15560
|
+
["supermemory", "supermemory", "API_KEY", false, "data", "Supermemory"],
|
|
15561
|
+
["databricks", "databricks", "API_KEY", false, "data", "Databricks"],
|
|
15562
|
+
["snowflake", "snowflake", "OAUTH2", false, "data", "Snowflake"],
|
|
15563
|
+
["algolia", "algolia", "API_KEY", false, "data", "Algolia"],
|
|
15564
|
+
["elasticsearch", "elasticsearch", "API_KEY", false, "data", "Elasticsearch"],
|
|
15565
|
+
["salesforce", "salesforce", "OAUTH2", true, "business", "Salesforce"],
|
|
15566
|
+
["pipedrive", "pipedrive", "API_KEY", false, "business", "Pipedrive"],
|
|
15567
|
+
["close", "close", "API_KEY", false, "business", "Close"],
|
|
15568
|
+
["apollo", "apollo", "API_KEY", false, "business", "Apollo"],
|
|
15569
|
+
["gong", "gong", "OAUTH2", true, "business", "Gong"],
|
|
15570
|
+
["freshdesk", "freshdesk", "API_KEY", false, "business", "Freshdesk"],
|
|
15571
|
+
["helpscout", "help_scout", "OAUTH2", false, "business", "Help Scout"],
|
|
15572
|
+
["servicenow", "servicenow", "BASIC", false, "business", "ServiceNow"],
|
|
15573
|
+
["mailchimp", "mailchimp", "OAUTH2", true, "business", "Mailchimp"],
|
|
15574
|
+
["customerio", "customerio", "API_KEY", false, "business", "Customer.io"],
|
|
15575
|
+
["klaviyo", "klaviyo", "API_KEY", false, "business", "Klaviyo"],
|
|
15576
|
+
["shopify", "shopify", "API_KEY", false, "business", "Shopify"],
|
|
15577
|
+
["quickbooks", "quickbooks", "OAUTH2", true, "business", "QuickBooks"],
|
|
15578
|
+
["xero", "xero", "OAUTH2", false, "business", "Xero"],
|
|
15579
|
+
["brex", "brex", "API_KEY", false, "business", "Brex"],
|
|
15580
|
+
["buffer", "buffer", "OAUTH2", false, "business", "Buffer"],
|
|
15581
|
+
["canva", "canva", "OAUTH2", true, "productivity", "Canva"],
|
|
15582
|
+
["webflow", "webflow", "API_KEY", false, "business", "Webflow"],
|
|
15583
|
+
["firecrawl", "firecrawl", "API_KEY", false, "data", "Firecrawl"],
|
|
15584
|
+
["browserbase", "browserbase_tool", "API_KEY", false, "data", "Browserbase"],
|
|
15585
|
+
["exa", "exa", "API_KEY", false, "data", "Exa"],
|
|
15586
|
+
["youtube", "youtube", "OAUTH2", true, "business", "YouTube"],
|
|
15587
|
+
["twitter", "twitter", "OAUTH2", false, "business", "Twitter/X"],
|
|
15588
|
+
["instagram", "instagram", "OAUTH2", true, "business", "Instagram"],
|
|
15589
|
+
["facebook", "facebook", "OAUTH2", true, "business", "Facebook"]
|
|
15590
|
+
];
|
|
15591
|
+
var HOSTED_COMPOSIO_PLUGINS = HOSTED_COMPOSIO_PLUGIN_DEFINITIONS.map(
|
|
15592
|
+
([id, toolkit, authScheme, managedAuth, category, name]) => ({
|
|
15593
|
+
id,
|
|
15594
|
+
backend: "composio",
|
|
15595
|
+
toolkit,
|
|
15596
|
+
authType: "hosted",
|
|
15597
|
+
authScheme,
|
|
15598
|
+
managedAuth,
|
|
15599
|
+
category,
|
|
15600
|
+
name,
|
|
15601
|
+
description: `Use ${name} tools from workspace agents.`
|
|
15602
|
+
})
|
|
15603
|
+
);
|
|
15604
|
+
var READ_ONLY_SCOPES = {
|
|
15605
|
+
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"],
|
|
15606
|
+
googledocs: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/documents.readonly"],
|
|
15607
|
+
googledrive: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly"],
|
|
15608
|
+
googlesheets: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/spreadsheets.readonly"],
|
|
15609
|
+
googleslides: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/presentations.readonly"],
|
|
15610
|
+
googlecalendar: ["https://www.googleapis.com/auth/calendar.readonly"],
|
|
15611
|
+
googletasks: ["https://www.googleapis.com/auth/tasks.readonly"],
|
|
15612
|
+
googlesearch: ["https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/webmasters.readonly"],
|
|
15613
|
+
googleanalytics: ["https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/analytics.readonly"],
|
|
15614
|
+
youtube: ["https://www.googleapis.com/auth/youtube.readonly"],
|
|
15615
|
+
outlook: ["User.Read", "Mail.Read", "MailboxSettings.Read", "Calendars.Read", "Contacts.Read", "offline_access"],
|
|
15616
|
+
onedrive: ["Files.Read.All", "Sites.Read.All", "offline_access"],
|
|
15617
|
+
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"],
|
|
15618
|
+
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"],
|
|
15619
|
+
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"],
|
|
15620
|
+
zendesk: ["read"],
|
|
15621
|
+
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"],
|
|
15622
|
+
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"],
|
|
15623
|
+
airtable: ["data.records:read", "data.recordComments:read", "schema.bases:read", "user.email:read"],
|
|
15624
|
+
todoist: ["data:read"],
|
|
15625
|
+
dropbox: ["openid", "email", "profile", "account_info.read", "files.metadata.read", "files.content.read", "file_requests.read", "sharing.read", "contacts.read"],
|
|
15626
|
+
canva: ["profile:read", "asset:read", "brandtemplate:content:read", "brandtemplate:meta:read", "comment:read", "design:content:read", "design:meta:read", "folder:read"],
|
|
15627
|
+
facebook: ["public_profile", "email", "pages_show_list", "pages_read_engagement", "pages_read_user_content", "read_insights"],
|
|
15628
|
+
instagram: ["instagram_business_basic", "instagram_business_manage_insights"]
|
|
15629
|
+
};
|
|
15630
|
+
var PLUGIN_CATALOG = [
|
|
15631
|
+
...EXPLICIT_PLUGIN_CATALOG,
|
|
15632
|
+
...HOSTED_COMPOSIO_PLUGINS
|
|
15633
|
+
].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
|
|
15634
|
+
|
|
15635
|
+
// ../shared/src/routes/plugins.ts
|
|
15636
|
+
function isPluginId(value) {
|
|
15637
|
+
return PLUGIN_CATALOG.some((plugin) => plugin.id === value);
|
|
15638
|
+
}
|
|
15636
15639
|
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
|
|
15640
|
-
|
|
15640
|
+
// ../shared/src/environment-config.ts
|
|
15641
|
+
var variableNameSchema = z25.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name");
|
|
15642
|
+
var mcpValueSchema = z25.union([
|
|
15643
|
+
z25.string(),
|
|
15644
|
+
environmentMcpVariableReferenceSchema
|
|
15641
15645
|
]);
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
|
|
15646
|
-
|
|
15647
|
-
|
|
15648
|
-
|
|
15649
|
-
|
|
15650
|
-
|
|
15651
|
-
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
|
|
15667
|
-
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
15674
|
-
|
|
15675
|
-
|
|
15676
|
-
|
|
15677
|
-
|
|
15678
|
-
|
|
15679
|
-
|
|
15680
|
-
|
|
15681
|
-
|
|
15682
|
-
|
|
15683
|
-
|
|
15684
|
-
|
|
15685
|
-
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15689
|
-
(
|
|
15690
|
-
|
|
15691
|
-
|
|
15692
|
-
const framed = window.parent !== window;
|
|
15693
|
-
const post = (message) => nativeView ? nativeView.postMessage(JSON.stringify(message)) : window.parent.postMessage(message, '*');
|
|
15694
|
-
const applyTheme = (theme) => {
|
|
15695
|
-
const variables = Object.entries(theme.variables).map(([name, value]) => name + ':' + value + ';').join('');
|
|
15696
|
-
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('') : '';
|
|
15697
|
-
style.textContent = ':root{color-scheme:' + theme.appearance + ';' + variables + '}' + font + ${JSON.stringify(BASE_CSS)};
|
|
15698
|
-
};
|
|
15699
|
-
try {
|
|
15700
|
-
const fragment = /[#&]${THEME_FRAGMENT_KEY}=([^&]*)/.exec(location.hash);
|
|
15701
|
-
if (fragment) {
|
|
15702
|
-
applyTheme(JSON.parse(decodeURIComponent(fragment[1])));
|
|
15703
|
-
history.replaceState(history.state, '', location.pathname + location.search);
|
|
15646
|
+
var mcpValuesSchema = z25.record(z25.string(), mcpValueSchema);
|
|
15647
|
+
var httpConfigSchema = environmentMcpHttpConfigSchema.pick({ url: true, auth: true }).extend({
|
|
15648
|
+
headers: mcpValuesSchema.default({})
|
|
15649
|
+
}).strict();
|
|
15650
|
+
var replicasMcpDefinitionSchema = z25.discriminatedUnion("transport", [
|
|
15651
|
+
z25.strictObject({
|
|
15652
|
+
transport: z25.literal("stdio"),
|
|
15653
|
+
config: environmentMcpStdioConfigSchema.pick({ command: true }).extend({
|
|
15654
|
+
args: environmentMcpStdioConfigSchema.shape.args.unwrap().default([]),
|
|
15655
|
+
env: z25.record(variableNameSchema, mcpValueSchema).default({})
|
|
15656
|
+
}).strict()
|
|
15657
|
+
}),
|
|
15658
|
+
z25.strictObject({ transport: z25.literal("http"), config: httpConfigSchema }),
|
|
15659
|
+
z25.strictObject({ transport: z25.literal("sse"), config: httpConfigSchema })
|
|
15660
|
+
]).superRefine((definition, context) => {
|
|
15661
|
+
if (definition.transport === "stdio") return;
|
|
15662
|
+
const result = validateEnvironmentMcpAuthentication(definition.transport, definition.config);
|
|
15663
|
+
if (!result.ok) context.addIssue({ code: "custom", path: result.error.code === "transport" ? ["transport"] : ["config", result.error.code ?? "auth"], message: result.error.message });
|
|
15664
|
+
});
|
|
15665
|
+
var replicasEnvironmentConfigSchema = z25.strictObject({
|
|
15666
|
+
inheritRepositories: z25.boolean().optional(),
|
|
15667
|
+
memory: z25.strictObject({ read: z25.boolean().optional(), write: z25.boolean().optional() }).nullable().optional(),
|
|
15668
|
+
gpu: z25.boolean().nullable().optional(),
|
|
15669
|
+
mobileTesting: z25.boolean().nullable().optional(),
|
|
15670
|
+
defaultSkills: defaultSkillsOverridesSchema.superRefine((skills, context) => {
|
|
15671
|
+
for (const ability of REPLICAS_AGENT_ABILITIES) if (skills.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" });
|
|
15672
|
+
}).nullable().optional(),
|
|
15673
|
+
repositories: z25.array(z25.string().trim().min(1)).optional(),
|
|
15674
|
+
workspaceSize: z25.enum(WORKSPACE_SIZE_OPTIONS).optional(),
|
|
15675
|
+
files: z25.record(z25.string().trim().refine((path) => !validateEnvironmentFilePath(path), "must be a file path starting with ~/"), z25.strictObject({
|
|
15676
|
+
name: z25.string().trim().min(1).optional(),
|
|
15677
|
+
content: z25.string().max(65536)
|
|
15678
|
+
})).optional(),
|
|
15679
|
+
skills: z25.record(z25.string().trim().min(1), z25.strictObject({ source: z25.string().trim().min(1), name: z25.string().trim().min(1).optional() })).optional(),
|
|
15680
|
+
requiredPlugins: z25.array(z25.string().refine(isPluginId, "must be a supported plugin")).transform((plugins) => [...new Set(plugins)]).optional(),
|
|
15681
|
+
systemPrompt: z25.string().optional(),
|
|
15682
|
+
warmHook: z25.string().optional(),
|
|
15683
|
+
startHook: z25.string().optional(),
|
|
15684
|
+
variables: z25.record(variableNameSchema, z25.string()).optional(),
|
|
15685
|
+
requiredSecrets: z25.array(variableNameSchema).optional(),
|
|
15686
|
+
mcps: z25.record(z25.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()
|
|
15687
|
+
}).superRefine((config, context) => {
|
|
15688
|
+
if (config.inheritRepositories === true && config.repositories !== void 0) context.addIssue({ code: "custom", path: ["repositories"], message: "Inherited repositories cannot also be declared explicitly" });
|
|
15689
|
+
const skillNames = Object.keys(config.skills ?? {}).map((slug) => slug.toLowerCase());
|
|
15690
|
+
if (new Set(skillNames).size !== skillNames.length) context.addIssue({ code: "custom", path: ["skills"], message: "Skill slugs must be unique regardless of case" });
|
|
15691
|
+
const names = /* @__PURE__ */ new Set();
|
|
15692
|
+
for (const name of Object.keys(config.mcps ?? {})) {
|
|
15693
|
+
const normalized = name.toLowerCase();
|
|
15694
|
+
if (names.has(normalized)) {
|
|
15695
|
+
context.addIssue({ code: "custom", path: ["mcps", name], message: "MCP names must be unique regardless of case" });
|
|
15704
15696
|
}
|
|
15705
|
-
|
|
15706
|
-
if (!nativeView) {
|
|
15707
|
-
document.addEventListener('click', (event) => {
|
|
15708
|
-
const anchor = event.isTrusted && event.composedPath().find((target) => target instanceof Element && target.matches('a[href]'));
|
|
15709
|
-
if (!anchor) return;
|
|
15710
|
-
const url = new URL(anchor.getAttribute('href'), document.baseURI);
|
|
15711
|
-
if (!/^https?:$/.test(url.protocol) || url.href.split('#')[0] === location.href.split('#')[0]) return;
|
|
15712
|
-
if (framed) {
|
|
15713
|
-
event.preventDefault();
|
|
15714
|
-
post({ jsonrpc: '2.0', method: '${OPEN_LINK_METHOD}', params: { url: url.href } });
|
|
15715
|
-
} else {
|
|
15716
|
-
anchor.setAttribute('target', '_blank');
|
|
15717
|
-
anchor.setAttribute('rel', 'noopener');
|
|
15718
|
-
}
|
|
15719
|
-
}, true);
|
|
15697
|
+
names.add(normalized);
|
|
15720
15698
|
}
|
|
15721
|
-
|
|
15722
|
-
|
|
15723
|
-
|
|
15724
|
-
if (!event.isTrusted || event.defaultPrevented || !(image instanceof HTMLImageElement) || image.closest('a[href], button')) return;
|
|
15725
|
-
let src = image.currentSrc || image.src;
|
|
15726
|
-
if (/^blob:/i.test(src) || (nativeView && /^data:image\\/svg|\\.svg(?:[?#]|$)/i.test(src))) {
|
|
15727
|
-
try {
|
|
15728
|
-
const canvas = document.createElement('canvas');
|
|
15729
|
-
canvas.width = (image.naturalWidth || image.width) * 2;
|
|
15730
|
-
canvas.height = (image.naturalHeight || image.height) * 2;
|
|
15731
|
-
canvas.getContext('2d').drawImage(image, 0, 0, canvas.width, canvas.height);
|
|
15732
|
-
src = canvas.toDataURL('image/png');
|
|
15733
|
-
} catch {
|
|
15734
|
-
return;
|
|
15735
|
-
}
|
|
15699
|
+
for (const key of config.requiredSecrets ?? []) {
|
|
15700
|
+
if (config.variables && Object.hasOwn(config.variables, key)) {
|
|
15701
|
+
context.addIssue({ code: "custom", path: ["requiredSecrets"], message: `"${key}" cannot also be declared as a non-secret variable` });
|
|
15736
15702
|
}
|
|
15737
|
-
|
|
15738
|
-
|
|
15739
|
-
let reportedHeight;
|
|
15740
|
-
const reportHeight = () => {
|
|
15741
|
-
const height = ${VISUAL_CONTENT_HEIGHT_EXPRESSION};
|
|
15742
|
-
if (height === reportedHeight) return;
|
|
15743
|
-
reportedHeight = height;
|
|
15744
|
-
post({ jsonrpc: '2.0', method: '${SIZE_CHANGED_METHOD}', params: { height } });
|
|
15745
|
-
};
|
|
15746
|
-
window.addEventListener('message', (event) => {
|
|
15747
|
-
if (event.source !== window.parent || event.data?.method !== '${HOST_CONTEXT_CHANGED_METHOD}') return;
|
|
15748
|
-
const { theme, styles, fontUrl } = event.data.params;
|
|
15749
|
-
applyTheme({ appearance: theme, variables: styles.variables, fontUrl });
|
|
15750
|
-
reportedHeight = undefined;
|
|
15751
|
-
if (document.readyState !== 'loading') reportHeight();
|
|
15752
|
-
});
|
|
15753
|
-
const resizeObserver = new ResizeObserver(reportHeight);
|
|
15754
|
-
resizeObserver.observe(document.documentElement);
|
|
15755
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
15756
|
-
resizeObserver.observe(document.body);
|
|
15757
|
-
reportHeight();
|
|
15758
|
-
});
|
|
15759
|
-
window.addEventListener('load', reportHeight);
|
|
15760
|
-
})();
|
|
15761
|
-
`.trim().replace(/\s*\n\s*/g, " ");
|
|
15703
|
+
}
|
|
15704
|
+
});
|
|
15762
15705
|
|
|
15763
|
-
// ../shared/src/
|
|
15764
|
-
var
|
|
15765
|
-
|
|
15706
|
+
// ../shared/src/routes/environment-config-source.ts
|
|
15707
|
+
var ENVIRONMENT_CONFIG_PREFERENCES = [["memory", "memory"], ["gpu", "gpu"], ["mobileTesting", "mobile_testing"], ["defaultSkills", "default_skills"]];
|
|
15708
|
+
var ENVIRONMENT_CONFIG_SETTING_FIELDS = ["repositories", "workspaceSize", "inheritRepositories", ...ENVIRONMENT_CONFIG_PREFERENCES.map(([field]) => field)];
|
|
15709
|
+
var environmentConfigLocationSchema = z26.union([
|
|
15710
|
+
z26.object({
|
|
15711
|
+
kind: z26.literal("git").default("git"),
|
|
15712
|
+
entrypoint_filename: z26.string().optional(),
|
|
15713
|
+
repository_id: z26.string(),
|
|
15714
|
+
repository_name: z26.string(),
|
|
15715
|
+
filename: z26.string(),
|
|
15716
|
+
commit_sha: z26.string(),
|
|
15717
|
+
source_url: z26.string(),
|
|
15718
|
+
file_sha: z26.undefined().optional()
|
|
15719
|
+
}),
|
|
15720
|
+
z26.object({
|
|
15721
|
+
kind: z26.literal("file"),
|
|
15722
|
+
repository_id: z26.null(),
|
|
15723
|
+
repository_name: z26.null(),
|
|
15724
|
+
filename: z26.string(),
|
|
15725
|
+
commit_sha: z26.null(),
|
|
15726
|
+
source_url: z26.null(),
|
|
15727
|
+
file_sha: z26.string()
|
|
15728
|
+
})
|
|
15729
|
+
]);
|
|
15730
|
+
var sourceInput = {
|
|
15731
|
+
repository_id: z26.string().min(1).optional(),
|
|
15732
|
+
file: z26.strictObject({ filename: z26.string().min(1).max(1024), environment: replicasEnvironmentConfigSchema }).optional()
|
|
15733
|
+
};
|
|
15734
|
+
var previewEnvironmentConfigSourceRequestSchema = z26.strictObject(sourceInput).refine(
|
|
15735
|
+
(input) => !input.file || !input.repository_id,
|
|
15736
|
+
{ message: "Choose either a repository or a file" }
|
|
15737
|
+
);
|
|
15738
|
+
var applyEnvironmentConfigSourceRequestSchema = z26.strictObject({
|
|
15739
|
+
...sourceInput,
|
|
15740
|
+
commit_sha: z26.string().min(1).optional(),
|
|
15741
|
+
fingerprint: z26.string().min(1)
|
|
15742
|
+
}).refine((input) => input.file ? !input.repository_id && !input.commit_sha : !!input.commit_sha, {
|
|
15743
|
+
message: "File configuration requires file contents; Git configuration requires a reviewed commit"
|
|
15744
|
+
});
|
|
15766
15745
|
|
|
15767
|
-
|
|
15746
|
+
// ../shared/src/replicas-mcp.ts
|
|
15747
|
+
var REPLICAS_MCP_SERVER_NAME = "replicas-mcp";
|
|
15748
|
+
var REPLICAS_MCP_TOOLS = {
|
|
15749
|
+
listEnvironments: "list_environments",
|
|
15750
|
+
createAutomation: "create_automation",
|
|
15751
|
+
spawn: "spawn_workspace",
|
|
15752
|
+
spawnInNewThread: "spawn_workspace_in_new_thread",
|
|
15753
|
+
relay: "relay_to_workspace",
|
|
15754
|
+
listWorkspaces: "list_workspaces",
|
|
15755
|
+
linearStart: "start_linear_session",
|
|
15756
|
+
linearSessionIntent: "register_linear_session_intent",
|
|
15757
|
+
routeLinearTicket: "route_linear_ticket",
|
|
15758
|
+
listChannelSettings: "list_channel_settings",
|
|
15759
|
+
saveChannelPreset: "save_channel_preset",
|
|
15760
|
+
deleteChannelPreset: "delete_channel_preset",
|
|
15761
|
+
updateChannelSettings: "update_channel_settings",
|
|
15762
|
+
setOrganizationProactivity: "set_organization_proactivity",
|
|
15763
|
+
setSlackAgentDefaults: "set_slack_agent_defaults",
|
|
15764
|
+
claimSettingsOffer: "claim_settings_offer",
|
|
15765
|
+
setThreadMuted: "set_thread_muted",
|
|
15766
|
+
stopWorkspace: "stop_workspace",
|
|
15767
|
+
setSlackConnectMuted: "set_slack_connect_muted",
|
|
15768
|
+
setSlackConnectDefaults: "set_slack_connect_defaults",
|
|
15769
|
+
spawnSubagent: "spawn_subagent",
|
|
15770
|
+
messageSubagent: "message_subagent",
|
|
15771
|
+
listSubagents: "list_subagents",
|
|
15772
|
+
readSubagent: "read_subagent",
|
|
15773
|
+
archiveSubagent: "archive_subagent",
|
|
15774
|
+
mergeWhenReady: "merge_when_ready",
|
|
15775
|
+
waitForSubagents: "wait_for_subagents",
|
|
15776
|
+
getBoard: "get_board",
|
|
15777
|
+
updateBoard: "update_board",
|
|
15778
|
+
updateTicket: "update_ticket",
|
|
15779
|
+
replyOnTicket: "reply_on_ticket",
|
|
15780
|
+
sendToChat: "send_to_chat",
|
|
15781
|
+
setStatus: "set_status",
|
|
15782
|
+
getLinearRouting: "get_linear_routing",
|
|
15783
|
+
setLinearRouting: "set_linear_routing",
|
|
15784
|
+
clearLinearRouting: "clear_linear_routing",
|
|
15785
|
+
getSlackChannel: "get_slack_channel",
|
|
15786
|
+
linkSlackChannel: "link_slack_channel",
|
|
15787
|
+
createSlackChannel: "create_slack_channel",
|
|
15788
|
+
unlinkSlackChannel: "unlink_slack_channel",
|
|
15789
|
+
setSlackChannelLevel: "set_slack_channel_level",
|
|
15790
|
+
createReplica: "create_replica",
|
|
15791
|
+
listReplicas: "list_replicas",
|
|
15792
|
+
getReplica: "get_replica",
|
|
15793
|
+
deleteReplica: "delete_replica",
|
|
15794
|
+
wakeReplica: "wake_replica",
|
|
15795
|
+
sleepReplica: "sleep_replica",
|
|
15796
|
+
archiveReplica: "archive_replica",
|
|
15797
|
+
waitForReplica: "wait_for_replica",
|
|
15798
|
+
runCommand: "run_command",
|
|
15799
|
+
getReplicaHooks: "get_replica_hooks",
|
|
15800
|
+
whoami: "whoami",
|
|
15801
|
+
sendReplicaMessage: "send_replica_message",
|
|
15802
|
+
readReplicaHistory: "read_replica_history",
|
|
15803
|
+
listChats: "list_chats",
|
|
15804
|
+
createChat: "create_chat",
|
|
15805
|
+
deleteChat: "delete_chat",
|
|
15806
|
+
listRepositories: "list_repositories"
|
|
15807
|
+
};
|
|
15808
|
+
var automationToolInputSchema = z27.object({
|
|
15809
|
+
name: z27.string().describe("Short automation name."),
|
|
15810
|
+
prompt: z27.string().describe("Prompt each automation run starts with."),
|
|
15811
|
+
environment_id: z27.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
15812
|
+
triggers: z27.array(automationTriggerSchema).min(1).describe(
|
|
15813
|
+
`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"] } }\`.`
|
|
15814
|
+
),
|
|
15815
|
+
description: z27.string().optional().describe("One-line summary shown in the dashboard."),
|
|
15816
|
+
plan_mode: z27.boolean().optional(),
|
|
15817
|
+
goal_mode: z27.boolean().optional(),
|
|
15818
|
+
fast_mode: z27.boolean().optional(),
|
|
15819
|
+
workspace_lifecycle_policy: z27.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
15820
|
+
"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."
|
|
15821
|
+
)
|
|
15822
|
+
});
|
|
15823
|
+
var 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.`;
|
|
15824
|
+
var automationBackgroundSchema = z27.boolean().optional().describe(
|
|
15825
|
+
"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."
|
|
15826
|
+
);
|
|
15827
|
+
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
15828
|
+
credential_user_id: z27.string().optional().describe(`${credentialUserIdDescription} Omit to use the organization's.`),
|
|
15829
|
+
background: automationBackgroundSchema,
|
|
15830
|
+
scope: z27.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
15831
|
+
});
|
|
15832
|
+
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
15833
|
+
automation_id: z27.string().describe("Automation ID"),
|
|
15834
|
+
enabled: z27.boolean().optional(),
|
|
15835
|
+
agent_provider: z27.enum(ENGINE_AGENT_PROVIDERS).nullable().optional(),
|
|
15836
|
+
model: z27.string().nullable().optional(),
|
|
15837
|
+
thinking_level: z27.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
15838
|
+
workspace_size: z27.enum(WORKSPACE_SIZES).optional(),
|
|
15839
|
+
credential_user_id: z27.string().nullable().optional().describe(`${credentialUserIdDescription} Null switches back to the organization's.`),
|
|
15840
|
+
background: automationBackgroundSchema,
|
|
15841
|
+
scope: z27.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
15842
|
+
});
|
|
15843
|
+
var chatPath = { id: z27.string().describe("Workspace ID"), chat_id: z27.string().describe("Chat ID") };
|
|
15844
|
+
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
15845
|
+
var createChatToolInputSchema = z27.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
15846
|
+
var forkChatToolInputSchema = z27.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
15847
|
+
var renameChatToolInputSchema = z27.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
15848
|
+
var runCommandToolInputSchema = z27.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
15849
|
+
var environmentMcpPath = { environment_id: z27.string().describe("Environment ID") };
|
|
15850
|
+
var createEnvironmentMcpToolInputSchema = z27.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
15851
|
+
var updateEnvironmentMcpToolInputSchema = z27.object({
|
|
15852
|
+
...environmentMcpPath,
|
|
15853
|
+
mcp_id: z27.string().describe("MCP ID"),
|
|
15854
|
+
...updateEnvironmentMcpRequestSchema.shape
|
|
15855
|
+
});
|
|
15856
|
+
var createEnvironmentDeviceToolInputSchema = z27.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
15857
|
+
var previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
15858
|
+
var applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
15768
15859
|
|
|
15769
|
-
|
|
15770
|
-
|
|
15771
|
-
|
|
15772
|
-
var
|
|
15860
|
+
// ../shared/src/scout.ts
|
|
15861
|
+
var SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
15862
|
+
var SCOUT_PROACTIVITY_LEVELS = ["tagged", "conservative", "balanced", "proactive"];
|
|
15863
|
+
var SCOUT_PRESET_NAME_MAX_LENGTH = 50;
|
|
15864
|
+
var SCOUT_CHANNEL_SETTINGS_OFFERS = ["proactivity", "raise_proactivity", "instructions"];
|
|
15865
|
+
var SCOUT_SETTINGS_OFFERS = [...SCOUT_CHANNEL_SETTINGS_OFFERS, "organization_proactivity", "raise_organization_proactivity"];
|
|
15866
|
+
var SCOUT_PRESET_ICONS = [
|
|
15867
|
+
"users",
|
|
15868
|
+
"user",
|
|
15869
|
+
"inbox",
|
|
15870
|
+
"building",
|
|
15871
|
+
"bug",
|
|
15872
|
+
"message-circle",
|
|
15873
|
+
"headphones",
|
|
15874
|
+
"heart",
|
|
15875
|
+
"star",
|
|
15876
|
+
"flag",
|
|
15877
|
+
"zap",
|
|
15878
|
+
"shield",
|
|
15879
|
+
"code",
|
|
15880
|
+
"terminal",
|
|
15881
|
+
"rocket",
|
|
15882
|
+
"wrench",
|
|
15883
|
+
"briefcase",
|
|
15884
|
+
"globe",
|
|
15885
|
+
"book-open",
|
|
15886
|
+
"lightbulb",
|
|
15887
|
+
"target",
|
|
15888
|
+
"bell",
|
|
15889
|
+
"layers",
|
|
15890
|
+
"tag"
|
|
15891
|
+
];
|
|
15773
15892
|
|
|
15774
|
-
|
|
15893
|
+
// ../shared/src/default-skills/scout-settings.ts
|
|
15894
|
+
var SCOUT_SETTINGS_SKILL_NAME = "scout-settings";
|
|
15895
|
+
var CONTENT = `---
|
|
15896
|
+
name: ${SCOUT_SETTINGS_SKILL_NAME}
|
|
15897
|
+
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.
|
|
15898
|
+
---
|
|
15775
15899
|
|
|
15776
|
-
|
|
15900
|
+
# Scout settings
|
|
15777
15901
|
|
|
15778
|
-
|
|
15902
|
+
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.
|
|
15779
15903
|
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
15783
|
-
|
|
15784
|
-
|
|
15904
|
+
## What you can do
|
|
15905
|
+
| Ask | How | Who |
|
|
15906
|
+
| --- | --- | --- |
|
|
15907
|
+
| 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 |
|
|
15908
|
+
| How much you speak up in every channel | \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\` | Admin |
|
|
15909
|
+
| 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 |
|
|
15910
|
+
| 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 |
|
|
15911
|
+
| 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 |
|
|
15912
|
+
| Defaults for every channel shared with another company: preset, instructions, level, silent mode | \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` | Admin |
|
|
15913
|
+
| Triage new issues in a Linear team, or stop | \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` \`source: linear\`, \`monitored\` | Admin starts; any member stops |
|
|
15914
|
+
| Agent, model, thinking level, goal mode, and fast mode for tasks started from Slack | \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` | Admin |
|
|
15915
|
+
| Stay quiet in this thread, or come back | \`${REPLICAS_MCP_TOOLS.setThreadMuted}\` | Anyone in the thread |
|
|
15916
|
+
| A recurring task ("every Monday, summarize open PRs in #eng") | \`${REPLICAS_MCP_TOOLS.createAutomation}\` (see Automations) | Members who can create automations |
|
|
15785
15917
|
|
|
15786
|
-
|
|
15918
|
+
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.
|
|
15787
15919
|
|
|
15788
|
-
|
|
15920
|
+
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.
|
|
15789
15921
|
|
|
15790
|
-
|
|
15791
|
-
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.
|
|
15792
|
-
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.
|
|
15793
|
-
4. Paste the printed \`\` line on its own line where the visual belongs in your final reply.
|
|
15922
|
+
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.
|
|
15794
15923
|
|
|
15795
|
-
##
|
|
15924
|
+
## Tools
|
|
15925
|
+
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.
|
|
15796
15926
|
|
|
15797
|
-
|
|
15927
|
+
## Changing settings
|
|
15928
|
+
- 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.
|
|
15929
|
+
- **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.
|
|
15930
|
+
- 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.
|
|
15931
|
+
- 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.
|
|
15932
|
+
- **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.
|
|
15933
|
+
- **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.
|
|
15934
|
+
- **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.
|
|
15935
|
+
- **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.
|
|
15936
|
+
- **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).
|
|
15937
|
+
- **"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.
|
|
15938
|
+
- **"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".
|
|
15939
|
+
- 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.
|
|
15798
15940
|
|
|
15799
|
-
##
|
|
15941
|
+
## Offers
|
|
15942
|
+
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.
|
|
15943
|
+
- **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.
|
|
15944
|
+
- **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.
|
|
15945
|
+
- **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.
|
|
15800
15946
|
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
- 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.
|
|
15947
|
+
## Automations
|
|
15948
|
+
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.
|
|
15804
15949
|
`;
|
|
15805
|
-
var VISUALS_ABILITY = {
|
|
15806
|
-
label: "Visuals",
|
|
15807
|
-
description: "Show charts, diagrams, comparisons, and mockups inline in chat replies.",
|
|
15808
|
-
// The visuals_instructions system prompt block is its trigger.
|
|
15809
|
-
bullet: "",
|
|
15810
|
-
section: SECTION17,
|
|
15811
|
-
referenceFile: { name: "VISUALS.md", content: REFERENCE17 }
|
|
15812
|
-
};
|
|
15813
|
-
|
|
15814
|
-
// ../shared/src/default-skills/replicas-agent/registry.ts
|
|
15815
|
-
var REPLICAS_AGENT_ABILITY_REGISTRY = {
|
|
15816
|
-
replicas: REPLICAS_ABILITY,
|
|
15817
|
-
memory: SESSION_HISTORY_ABILITY,
|
|
15818
|
-
computer: COMPUTER_ABILITY,
|
|
15819
|
-
docker: DOCKER_ABILITY,
|
|
15820
|
-
environment_setup: ENVIRONMENT_SETUP_ABILITY,
|
|
15821
|
-
github: GITHUB_ABILITY,
|
|
15822
|
-
gitlab: GITLAB_ABILITY,
|
|
15823
|
-
gpu: GPU_ABILITY,
|
|
15824
|
-
linear: LINEAR_ABILITY,
|
|
15825
|
-
local_computer: LOCAL_COMPUTER_ABILITY,
|
|
15826
|
-
macos: MACOS_ABILITY,
|
|
15827
|
-
media: MEDIA_ABILITY,
|
|
15828
|
-
plugins: PLUGINS_ABILITY,
|
|
15829
|
-
previews: PREVIEWS_ABILITY,
|
|
15830
|
-
sentry: SENTRY_ABILITY,
|
|
15831
|
-
slack: SLACK_ABILITY,
|
|
15832
|
-
visuals: VISUALS_ABILITY
|
|
15833
|
-
};
|
|
15834
|
-
var REPLICAS_AGENT_ABILITIES = Object.keys(
|
|
15835
|
-
REPLICAS_AGENT_ABILITY_REGISTRY
|
|
15836
|
-
);
|
|
15837
|
-
|
|
15838
|
-
// ../shared/src/routes/preferences.ts
|
|
15839
|
-
var EMPTY_AGENT_DEFAULT_SETTINGS = {
|
|
15840
|
-
agent_provider: null,
|
|
15841
|
-
model: null,
|
|
15842
|
-
thinking_level: null,
|
|
15843
|
-
goal_mode: null,
|
|
15844
|
-
fast_mode: null
|
|
15845
|
-
};
|
|
15846
|
-
var DEFAULT_SUBAGENT_MCP_PROVIDERS = [...ENGINE_AGENT_PROVIDERS];
|
|
15847
|
-
var ALERT_SOUND_FAMILIES = {
|
|
15848
|
-
glass: ["glint", "tap", "ripple", "halo"],
|
|
15849
|
-
wood: ["ready", "pluck", "knock", "bloom", "steps"]
|
|
15850
|
-
};
|
|
15851
|
-
var ALERT_SOUNDS = [...ALERT_SOUND_FAMILIES.glass, ...ALERT_SOUND_FAMILIES.wood];
|
|
15852
|
-
var WALLPAPER_DITHERS = ["dither", "halftone", "modulation"];
|
|
15853
|
-
var WALLPAPER_EFFECTS = ["soft", "grain", "duotone", ...WALLPAPER_DITHERS, "none"];
|
|
15854
|
-
var PUSH_WHEN_ACTIVE_COPY = {
|
|
15855
|
-
wait: `Wait ${PUSH_HOLD_MINUTES} minutes`,
|
|
15856
|
-
skip: "Don\u2019t send",
|
|
15857
|
-
send: "Send right away"
|
|
15858
|
-
};
|
|
15859
|
-
var DEFAULT_USER_PREFERENCES = {
|
|
15860
|
-
default_agent: null,
|
|
15861
|
-
default_model: null,
|
|
15862
|
-
claude_models: null,
|
|
15863
|
-
codex_models: null,
|
|
15864
|
-
cursor_models: null,
|
|
15865
|
-
claude_hidden_models: null,
|
|
15866
|
-
codex_hidden_models: null,
|
|
15867
|
-
cursor_hidden_models: null,
|
|
15868
|
-
openrouter_models: null,
|
|
15869
|
-
opencode_go_models: null,
|
|
15870
|
-
close_workspace_on_pr_close: false,
|
|
15871
|
-
close_workspace_on_pr_merge: false,
|
|
15872
|
-
default_environment_id: null,
|
|
15873
|
-
respond_to_ci_workflows: true,
|
|
15874
|
-
respond_to_ci_checks: true,
|
|
15875
|
-
respond_to_human_pr_reviews: false,
|
|
15876
|
-
pr_user_attribution: false,
|
|
15877
|
-
github_commit_name: null,
|
|
15878
|
-
github_commit_email: null,
|
|
15879
|
-
auto_draft_prs: false,
|
|
15880
|
-
open_prs_in_graphite: false,
|
|
15881
|
-
open_links_in_desktop_app: false,
|
|
15882
|
-
local_control: false,
|
|
15883
|
-
spotify_controls: false,
|
|
15884
|
-
appshot_shortcut: "command",
|
|
15885
|
-
appshot_destination: "automatic",
|
|
15886
|
-
appshot_sound: true,
|
|
15887
|
-
keyboard_shortcuts: {},
|
|
15888
|
-
mothership_tour_seen: false,
|
|
15889
|
-
slack_settings_moved_notice: false,
|
|
15890
|
-
mothership_board_opened: false,
|
|
15891
|
-
follow_up_mode: "steer",
|
|
15892
|
-
send_key: "enter",
|
|
15893
|
-
memory_enabled: null,
|
|
15894
|
-
subagent_mcp_enabled: null,
|
|
15895
|
-
default_fast_mode: false,
|
|
15896
|
-
auto_compact_tokens: null,
|
|
15897
|
-
agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
|
|
15898
|
-
fallback_chains: null,
|
|
15899
|
-
alert_sound: null,
|
|
15900
|
-
workspace_alerts: {},
|
|
15901
|
-
automation_alerts: {},
|
|
15902
|
-
push_types: { needs_you: true, finished: true, automations: true, usage_limit: true },
|
|
15903
|
-
push_when_active: "wait",
|
|
15904
|
-
chat_text_size: "default",
|
|
15905
|
-
app_font: "inter",
|
|
15906
|
-
code_font: "geist-mono",
|
|
15907
|
-
wallpaper: null
|
|
15908
|
-
};
|
|
15909
|
-
function defaultReplicasAgentAbilities() {
|
|
15910
|
-
const abilities = {};
|
|
15911
|
-
for (const key of REPLICAS_AGENT_ABILITIES) {
|
|
15912
|
-
abilities[key] = true;
|
|
15913
|
-
}
|
|
15914
|
-
if (hasAllReplicasAgentAbilities(abilities)) return abilities;
|
|
15915
|
-
throw new Error("Default Replicas agent ability flags are incomplete");
|
|
15916
|
-
}
|
|
15917
|
-
function hasAllReplicasAgentAbilities(abilities) {
|
|
15918
|
-
return REPLICAS_AGENT_ABILITIES.every((key) => typeof abilities[key] === "boolean");
|
|
15919
|
-
}
|
|
15920
|
-
var DEFAULT_DEFAULT_SKILLS = {
|
|
15921
|
-
replicas_agent: {
|
|
15922
|
-
enabled: true,
|
|
15923
|
-
abilities: defaultReplicasAgentAbilities()
|
|
15924
|
-
}
|
|
15925
|
-
};
|
|
15926
|
-
var LINEAR_ROUTING_SKILL_MAX_LENGTH = 5e4;
|
|
15927
|
-
var linearRoutingSkillSchema = z27.union([
|
|
15928
|
-
z27.object({ name: z27.string().min(1), content: z27.string().trim().min(1).max(LINEAR_ROUTING_SKILL_MAX_LENGTH) }),
|
|
15929
|
-
z27.object({ name: z27.string().min(1), repository_id: z27.string().regex(UUID_RE), path: z27.string().min(1) })
|
|
15930
|
-
]);
|
|
15931
15950
|
|
|
15932
15951
|
// ../shared/src/prompts.ts
|
|
15933
15952
|
var REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
|
|
@@ -19465,6 +19484,16 @@ function toolCallMessage(id, name, args, timestamp, result) {
|
|
|
19465
19484
|
if (name === "web_search" && typeof args.query === "string") {
|
|
19466
19485
|
return { id, type: "web_search", query: args.query, status, timestamp };
|
|
19467
19486
|
}
|
|
19487
|
+
if (name === "spawn_agent") {
|
|
19488
|
+
const spawned = result?.output ? (() => {
|
|
19489
|
+
try {
|
|
19490
|
+
return JSON.parse(result.output);
|
|
19491
|
+
} catch {
|
|
19492
|
+
return null;
|
|
19493
|
+
}
|
|
19494
|
+
})() : null;
|
|
19495
|
+
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 };
|
|
19496
|
+
}
|
|
19468
19497
|
return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp });
|
|
19469
19498
|
}
|
|
19470
19499
|
function parseReplicasEvents(events) {
|
|
@@ -19484,13 +19513,24 @@ function parseReplicasEvents(events) {
|
|
|
19484
19513
|
messages.push({ id: getUserMessageId(event) ?? `replicas-pending-${timestamp}`, type: "user", content: payload.message, ...images ? { images } : {}, timestamp });
|
|
19485
19514
|
return;
|
|
19486
19515
|
}
|
|
19516
|
+
case `${HARNESS_EVENT_TYPE_PREFIX}cancelled_message`:
|
|
19487
19517
|
case `${HARNESS_EVENT_TYPE_PREFIX}user_message`: {
|
|
19518
|
+
if (isRecord(payload.agentOutcome)) {
|
|
19519
|
+
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 });
|
|
19520
|
+
for (const item of messages) {
|
|
19521
|
+
if (item.type === "subagent" && item.receiverThreadIds?.includes(String(payload.agentOutcome.agentId))) {
|
|
19522
|
+
item.status = payload.agentOutcome.status === "completed" ? "completed" : payload.agentOutcome.status === "help" ? "in_progress" : "failed";
|
|
19523
|
+
item.output = typeof payload.agentOutcome.response === "string" ? payload.agentOutcome.response : void 0;
|
|
19524
|
+
}
|
|
19525
|
+
}
|
|
19526
|
+
return;
|
|
19527
|
+
}
|
|
19488
19528
|
const images = blockImages(contentBlocks(message2.content));
|
|
19489
19529
|
const messageId = payload[USER_MESSAGE_ID_PAYLOAD_KEY];
|
|
19490
19530
|
messages.push({
|
|
19491
19531
|
id: typeof messageId === "string" ? messageId : `replicas-user-${String(payload.seq)}`,
|
|
19492
19532
|
type: "user",
|
|
19493
|
-
content: extractToolResultText(message2.content)
|
|
19533
|
+
content: `${event.type === `${HARNESS_EVENT_TYPE_PREFIX}cancelled_message` ? "[Cancelled before it started]\n\n" : ""}${extractToolResultText(message2.content)}`,
|
|
19494
19534
|
...images.length ? { images } : {},
|
|
19495
19535
|
timestamp
|
|
19496
19536
|
});
|
|
@@ -21117,7 +21157,7 @@ var VOICE_WAVEFORM = {
|
|
|
21117
21157
|
};
|
|
21118
21158
|
|
|
21119
21159
|
// ../shared/src/e2b.ts
|
|
21120
|
-
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-18-
|
|
21160
|
+
var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-18-v10";
|
|
21121
21161
|
|
|
21122
21162
|
// ../shared/src/e2b-retry.ts
|
|
21123
21163
|
var DEFAULT_BACKOFFS_MS = [2e3, 5e3];
|
|
@@ -21734,11 +21774,26 @@ var toolResultMessageSchema = z32.looseObject({
|
|
|
21734
21774
|
isError: z32.boolean(),
|
|
21735
21775
|
timestamp: z32.number()
|
|
21736
21776
|
});
|
|
21777
|
+
var harnessAgentOutcomeSchema = z32.object({
|
|
21778
|
+
agentId: z32.string().uuid(),
|
|
21779
|
+
assignmentId: z32.string(),
|
|
21780
|
+
status: z32.enum(["completed", "cancelled", "error", "help"]),
|
|
21781
|
+
response: z32.string()
|
|
21782
|
+
});
|
|
21783
|
+
var HARNESS_AGENT_TYPES = ["general", "explore", "execute"];
|
|
21784
|
+
var harnessThreadOriginSchema = z32.object({
|
|
21785
|
+
kind: z32.enum(["side_chat", "subagent"]),
|
|
21786
|
+
agentType: z32.enum(HARNESS_AGENT_TYPES).optional(),
|
|
21787
|
+
parentThreadId: z32.string().uuid(),
|
|
21788
|
+
depth: z32.number().int().nonnegative(),
|
|
21789
|
+
message: userMessageSchema
|
|
21790
|
+
});
|
|
21737
21791
|
var harnessInboxPayloadSchemas = {
|
|
21738
21792
|
message: z32.looseObject({
|
|
21739
21793
|
message: userMessageSchema,
|
|
21740
21794
|
userId: z32.string().nullable(),
|
|
21741
21795
|
messageId: z32.string().optional(),
|
|
21796
|
+
agentOutcome: harnessAgentOutcomeSchema.optional(),
|
|
21742
21797
|
model: z32.string().optional(),
|
|
21743
21798
|
thinkingLevel: z32.enum(VALID_THINKING_LEVELS).optional(),
|
|
21744
21799
|
instructionsHash: z32.string().optional(),
|
|
@@ -21747,10 +21802,14 @@ var harnessInboxPayloadSchemas = {
|
|
|
21747
21802
|
instructions: z32.object({ environmentSystemPrompt: z32.string().optional(), customInstructions: z32.string().optional() }).optional(),
|
|
21748
21803
|
errorNotificationTarget: integrationErrorNotificationTargetSchema.optional()
|
|
21749
21804
|
}),
|
|
21750
|
-
interrupt: z32.looseObject({ userId: z32.string().nullable() })
|
|
21805
|
+
interrupt: z32.looseObject({ userId: z32.string().nullable(), messageId: z32.string().optional(), cancelQueued: z32.boolean().optional() })
|
|
21751
21806
|
};
|
|
21752
21807
|
var harnessEventBodySchema = z32.discriminatedUnion("type", [
|
|
21808
|
+
z32.object({ type: z32.literal("thread_origin"), payload: harnessThreadOriginSchema }),
|
|
21809
|
+
z32.object({ type: z32.literal("agent_outcome"), payload: harnessAgentOutcomeSchema }),
|
|
21753
21810
|
z32.object({ type: z32.literal("user_message"), payload: harnessInboxPayloadSchemas.message }),
|
|
21811
|
+
z32.object({ type: z32.literal("cancelled_message"), payload: harnessInboxPayloadSchemas.message }),
|
|
21812
|
+
z32.object({ type: z32.literal("interrupt"), payload: harnessInboxPayloadSchemas.interrupt }),
|
|
21754
21813
|
/** Saved before its tool calls run. */
|
|
21755
21814
|
z32.object({ type: z32.literal("assistant_message"), payload: z32.looseObject({ message: assistantMessageSchema }) }),
|
|
21756
21815
|
z32.object({ type: z32.literal("tool_result"), payload: z32.looseObject({ message: toolResultMessageSchema }) }),
|
|
@@ -21782,6 +21841,9 @@ var harnessLiveMessageSchema = z32.union([
|
|
|
21782
21841
|
z32.object({ type: z32.literal("status"), status: z32.enum(HARNESS_THREAD_STATUSES) })
|
|
21783
21842
|
]);
|
|
21784
21843
|
|
|
21844
|
+
// ../shared/src/harness/context.ts
|
|
21845
|
+
var MAX_REFERENCE_IMAGE_BYTES = 8 * 1024 * 1024;
|
|
21846
|
+
|
|
21785
21847
|
// ../shared/src/harness/worker-routes.ts
|
|
21786
21848
|
import { z as z33 } from "zod";
|
|
21787
21849
|
var harnessWorkerEngineRequestSchema = z33.object({
|
|
@@ -23605,8 +23667,6 @@ export {
|
|
|
23605
23667
|
engineMcpOAuthTokenResponseSchema,
|
|
23606
23668
|
DEVICE_HOST_KEYS_HEADER,
|
|
23607
23669
|
provisionedDeviceSchema,
|
|
23608
|
-
REPLICAS_MCP_SERVER_NAME,
|
|
23609
|
-
REPLICAS_MCP_TOOLS,
|
|
23610
23670
|
REPLICAS_RUNTIME_ENV_ALIASES,
|
|
23611
23671
|
readReplicasRuntimeEnv,
|
|
23612
23672
|
shellQuotePosix,
|
|
@@ -23627,6 +23687,8 @@ export {
|
|
|
23627
23687
|
gitIdentityConfigCommands,
|
|
23628
23688
|
HISTORY_ROOT,
|
|
23629
23689
|
HISTORY_INDEX_FILENAME,
|
|
23690
|
+
REPLICAS_MCP_SERVER_NAME,
|
|
23691
|
+
REPLICAS_MCP_TOOLS,
|
|
23630
23692
|
REPLICAS_INSTRUCTIONS_TAG,
|
|
23631
23693
|
MOTHERSHIP_INSTRUCTIONS_TAG,
|
|
23632
23694
|
wrapInTag,
|