replicas-engine 0.1.1380 → 0.1.1382
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-OO4BLTPQ.js → asp-host-6WFOKJ54.js} +5 -5
- package/dist/src/{chunk-J6QD3MBR.js → chunk-HVXTTLCG.js} +3 -3
- package/dist/src/{chunk-TMTXAYFB.js → chunk-L6URHRUV.js} +244 -232
- package/dist/src/{chunk-VWMGAL45.js → chunk-LCDGWVEY.js} +2 -2
- package/dist/src/{chunk-VV7G2Y7J.js → chunk-OU5KG7T5.js} +6 -6
- package/dist/src/{chunk-WIXQJEVX.js → chunk-QAB7ES7V.js} +2 -2
- package/dist/src/{chunk-35JNEYKM.js → chunk-S2SWUWDJ.js} +1 -1
- package/dist/src/{chunk-XUZZWF3D.js → chunk-S643QUYK.js} +2 -2
- package/dist/src/{chunk-EZQLKHBL.js → chunk-YYICSSFI.js} +1 -1
- 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
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
listRunningCodexModels,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-OU5KG7T5.js";
|
|
12
|
+
import "./chunk-QAB7ES7V.js";
|
|
13
|
+
import "./chunk-HVXTTLCG.js";
|
|
14
|
+
import "./chunk-S2SWUWDJ.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-L6URHRUV.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
execFileAsync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-S2SWUWDJ.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-L6URHRUV.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
|
|
|
240
240
|
if (method === "foundry") return "azure";
|
|
241
241
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
242
242
|
}
|
|
243
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
243
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1381";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -11672,13 +11672,55 @@ var reorderCredentialPoolSchema = z14.object({
|
|
|
11672
11672
|
});
|
|
11673
11673
|
|
|
11674
11674
|
// ../shared/src/mothership-events.ts
|
|
11675
|
-
import { z as
|
|
11675
|
+
import { z as z23 } from "zod";
|
|
11676
11676
|
|
|
11677
11677
|
// ../shared/src/replicas-mcp.ts
|
|
11678
|
-
import { z as
|
|
11678
|
+
import { z as z19 } from "zod";
|
|
11679
11679
|
|
|
11680
|
-
// ../shared/src/
|
|
11680
|
+
// ../shared/src/routes/linear.ts
|
|
11681
11681
|
import { z as z15 } from "zod";
|
|
11682
|
+
var linearSessionMetadataSchema = z15.object({
|
|
11683
|
+
via_mothership: z15.boolean().optional(),
|
|
11684
|
+
attached: z15.boolean().optional(),
|
|
11685
|
+
issue_id: z15.string(),
|
|
11686
|
+
issue_identifier: z15.string(),
|
|
11687
|
+
issue_title: z15.string(),
|
|
11688
|
+
issue_description: z15.string(),
|
|
11689
|
+
issue_url: z15.string(),
|
|
11690
|
+
comment_id: z15.string(),
|
|
11691
|
+
comment_body: z15.string(),
|
|
11692
|
+
triggered_by_id: z15.string().optional(),
|
|
11693
|
+
triggered_by_name: z15.string().optional(),
|
|
11694
|
+
triggered_by_email: z15.string().optional(),
|
|
11695
|
+
linear_workspace_id: z15.string().optional(),
|
|
11696
|
+
creator_id: z15.string().optional(),
|
|
11697
|
+
creator_name: z15.string().optional(),
|
|
11698
|
+
creator_email: z15.string().optional(),
|
|
11699
|
+
assignee_id: z15.string().optional(),
|
|
11700
|
+
assignee_name: z15.string().optional(),
|
|
11701
|
+
assignee_email: z15.string().optional(),
|
|
11702
|
+
issue_state: z15.string().optional(),
|
|
11703
|
+
parent_issue: z15.object({
|
|
11704
|
+
id: z15.string(),
|
|
11705
|
+
identifier: z15.string(),
|
|
11706
|
+
title: z15.string(),
|
|
11707
|
+
description: z15.string().nullable()
|
|
11708
|
+
}).optional(),
|
|
11709
|
+
workspace: z15.object({
|
|
11710
|
+
id: z15.string(),
|
|
11711
|
+
coding_agent: z15.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
|
|
11712
|
+
task_description: z15.string(),
|
|
11713
|
+
created_at: z15.string()
|
|
11714
|
+
}).optional()
|
|
11715
|
+
});
|
|
11716
|
+
var LINEAR_WORKFLOW_STATE_TYPES = ["triage", "backlog", "unstarted", "started", "completed", "canceled", "duplicate"];
|
|
11717
|
+
|
|
11718
|
+
// ../shared/src/automations/linear/index.ts
|
|
11719
|
+
var LINEAR_ISSUE_STATE_CHANGED_EVENT = "issue.state_changed";
|
|
11720
|
+
var LINEAR_STATE_TYPES = LINEAR_WORKFLOW_STATE_TYPES.filter((type) => type !== "duplicate");
|
|
11721
|
+
|
|
11722
|
+
// ../shared/src/automations/trigger-schemas.ts
|
|
11723
|
+
import { z as z16 } from "zod";
|
|
11682
11724
|
|
|
11683
11725
|
// ../shared/src/uuid.ts
|
|
11684
11726
|
function createUuidFromHex(value) {
|
|
@@ -11695,29 +11737,31 @@ function getReviewerLoginsError(event, logins) {
|
|
|
11695
11737
|
if (isReviewRequested === !!logins?.some((login) => login.trim().replace(/^@+/, ""))) return null;
|
|
11696
11738
|
return isReviewRequested ? "The PR review requested trigger needs at least one GitHub username" : "Requested reviewers only apply to the PR review requested trigger";
|
|
11697
11739
|
}
|
|
11698
|
-
var repositoryTriggerConfigSchema =
|
|
11699
|
-
event:
|
|
11700
|
-
repository_ids:
|
|
11701
|
-
group_pr_events:
|
|
11702
|
-
excluded_actors:
|
|
11703
|
-
reviewer_logins:
|
|
11740
|
+
var repositoryTriggerConfigSchema = z16.object({
|
|
11741
|
+
event: z16.string(),
|
|
11742
|
+
repository_ids: z16.array(z16.string().regex(UUID_RE, "must be a repository id")).optional(),
|
|
11743
|
+
group_pr_events: z16.boolean().optional(),
|
|
11744
|
+
excluded_actors: z16.array(z16.string()).optional(),
|
|
11745
|
+
reviewer_logins: z16.array(z16.string()).optional()
|
|
11704
11746
|
});
|
|
11705
|
-
var cronTriggerSchema =
|
|
11706
|
-
var githubTriggerSchema =
|
|
11707
|
-
type:
|
|
11747
|
+
var cronTriggerSchema = z16.object({ type: z16.literal("cron"), config: z16.object({ schedule: z16.string(), timezone: z16.string().optional() }) });
|
|
11748
|
+
var githubTriggerSchema = z16.object({
|
|
11749
|
+
type: z16.literal("github"),
|
|
11708
11750
|
config: repositoryTriggerConfigSchema.superRefine((config, ctx) => {
|
|
11709
11751
|
const message2 = getReviewerLoginsError(config.event, config.reviewer_logins);
|
|
11710
11752
|
if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["reviewer_logins"] });
|
|
11711
11753
|
})
|
|
11712
11754
|
});
|
|
11713
|
-
var gitlabTriggerSchema =
|
|
11714
|
-
var
|
|
11755
|
+
var gitlabTriggerSchema = z16.object({ type: z16.literal("gitlab"), config: repositoryTriggerConfigSchema });
|
|
11756
|
+
var linearTriggerConfigSchema = z16.object({ event: z16.string(), team_ids: z16.array(z16.string()).optional(), state_types: z16.array(z16.enum(LINEAR_STATE_TYPES)).optional() });
|
|
11757
|
+
var automationTriggerSchema = z16.discriminatedUnion("type", [
|
|
11715
11758
|
cronTriggerSchema,
|
|
11716
11759
|
githubTriggerSchema,
|
|
11717
11760
|
gitlabTriggerSchema,
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11761
|
+
z16.object({ type: z16.literal("slack"), config: z16.object({ event: z16.string(), channel_ids: z16.array(z16.string()).optional(), group_thread_replies: z16.boolean().optional() }) }),
|
|
11762
|
+
z16.object({ type: z16.literal("sentry"), config: z16.object({ event: z16.string(), project_slugs: z16.array(z16.string()).optional(), min_level: z16.string().optional() }) }),
|
|
11763
|
+
z16.object({ type: z16.literal("linear"), config: linearTriggerConfigSchema }),
|
|
11764
|
+
z16.object({ type: z16.literal("custom"), config: z16.object({}) })
|
|
11721
11765
|
]);
|
|
11722
11766
|
|
|
11723
11767
|
// ../shared/src/automations/types.ts
|
|
@@ -11727,40 +11771,40 @@ var AUTOMATION_AUTO_PAUSE_DAYS = 7;
|
|
|
11727
11771
|
var AUTOMATION_AUTO_PAUSE_LABEL = `Paused after failing every run for ${AUTOMATION_AUTO_PAUSE_DAYS} days`;
|
|
11728
11772
|
|
|
11729
11773
|
// ../shared/src/routes/environment.ts
|
|
11730
|
-
import { z as
|
|
11774
|
+
import { z as z17 } from "zod";
|
|
11731
11775
|
var ENVIRONMENT_MCP_TRANSPORTS = ["stdio", "http", "sse"];
|
|
11732
|
-
var stringMap =
|
|
11733
|
-
var createEnvironmentMcpRequestSchema =
|
|
11734
|
-
name:
|
|
11735
|
-
transport:
|
|
11736
|
-
config:
|
|
11737
|
-
|
|
11738
|
-
|
|
11776
|
+
var stringMap = z17.record(z17.string(), z17.string());
|
|
11777
|
+
var createEnvironmentMcpRequestSchema = z17.object({
|
|
11778
|
+
name: z17.string(),
|
|
11779
|
+
transport: z17.enum(ENVIRONMENT_MCP_TRANSPORTS),
|
|
11780
|
+
config: z17.union([
|
|
11781
|
+
z17.object({ command: z17.string().min(1), args: z17.array(z17.string()).optional(), env: stringMap.optional() }),
|
|
11782
|
+
z17.object({ url: z17.url(), headers: stringMap.optional(), auth: mcpAuthSchema.optional() })
|
|
11739
11783
|
]).describe("stdio: `{ command, args, env }`. http/sse: `{ url, headers }`.")
|
|
11740
11784
|
});
|
|
11741
11785
|
var updateEnvironmentMcpRequestSchema = createEnvironmentMcpRequestSchema.partial();
|
|
11742
|
-
var screenPasswordSchema =
|
|
11743
|
-
var createEnvironmentDeviceRequestSchema =
|
|
11744
|
-
name:
|
|
11745
|
-
host:
|
|
11746
|
-
port:
|
|
11747
|
-
username:
|
|
11786
|
+
var screenPasswordSchema = z17.string().min(1, "Enter the screen password").max(256).describe('Screen Sharing password, for `replicas computer screen`. On a Mac, the "VNC viewers may control screen with password" password. Never returned.');
|
|
11787
|
+
var createEnvironmentDeviceRequestSchema = z17.object({
|
|
11788
|
+
name: z17.string().regex(/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/, "Use lowercase letters, numbers and dashes").describe("SSH alias in workspaces, e.g. `mac-mini` for `ssh mac-mini`."),
|
|
11789
|
+
host: z17.string().max(253).regex(/^(?:[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?|[0-9A-Fa-f:]+)$/, "Enter a hostname or IP address").describe("Hostname or IP, such as a Tailscale MagicDNS name (`mac-mini`) or a public address."),
|
|
11790
|
+
port: z17.number().int().min(1).max(65535).optional().describe("SSH port. Defaults to 22."),
|
|
11791
|
+
username: z17.string().regex(/^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$/, "Enter the account name on the device").describe("Account the agent signs in as."),
|
|
11748
11792
|
screen_password: screenPasswordSchema.optional()
|
|
11749
11793
|
});
|
|
11750
11794
|
var updateEnvironmentDeviceRequestSchema = createEnvironmentDeviceRequestSchema.partial().extend({
|
|
11751
|
-
screen_password:
|
|
11795
|
+
screen_password: z17.union([screenPasswordSchema, z17.literal("")]).optional().describe("New Screen Sharing password, or an empty string to remove it.")
|
|
11752
11796
|
});
|
|
11753
|
-
var provisionedDeviceSchema =
|
|
11754
|
-
name:
|
|
11755
|
-
host:
|
|
11756
|
-
port:
|
|
11757
|
-
username:
|
|
11758
|
-
private_key:
|
|
11759
|
-
screen_password:
|
|
11797
|
+
var provisionedDeviceSchema = z17.object({
|
|
11798
|
+
name: z17.string(),
|
|
11799
|
+
host: z17.string(),
|
|
11800
|
+
port: z17.number(),
|
|
11801
|
+
username: z17.string(),
|
|
11802
|
+
private_key: z17.string(),
|
|
11803
|
+
screen_password: z17.string().optional()
|
|
11760
11804
|
});
|
|
11761
11805
|
|
|
11762
11806
|
// ../shared/src/routes/workspaces.ts
|
|
11763
|
-
import { z as
|
|
11807
|
+
import { z as z18 } from "zod";
|
|
11764
11808
|
var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
|
|
11765
11809
|
var SUPPORT_EMAIL = "founders@replicas.dev";
|
|
11766
11810
|
var WORKSPACE_SANDBOX_LOST_MESSAGE = `This workspace can't be resumed because its sandbox was lost on our side. That shouldn't happen, and we're sorry. Please start a new workspace, and email ${SUPPORT_EMAIL} so we can look into it.`;
|
|
@@ -11773,16 +11817,16 @@ var DEFAULT_WORKSPACE_FILTERS = {
|
|
|
11773
11817
|
activity: "any"
|
|
11774
11818
|
};
|
|
11775
11819
|
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
11776
|
-
var workspaceExecRequestSchema =
|
|
11777
|
-
command:
|
|
11778
|
-
timeout_seconds:
|
|
11820
|
+
var workspaceExecRequestSchema = z18.object({
|
|
11821
|
+
command: z18.string().regex(/\S/, "command is required"),
|
|
11822
|
+
timeout_seconds: z18.number().int().min(1).max(50).optional().describe("Default: 30")
|
|
11779
11823
|
});
|
|
11780
|
-
var terminalRtcCandidateSchema =
|
|
11781
|
-
var terminalSocketServerMessageSchema =
|
|
11782
|
-
|
|
11783
|
-
|
|
11824
|
+
var terminalRtcCandidateSchema = z18.object({ type: z18.literal("rtc-candidate"), candidate: z18.string(), mid: z18.string() });
|
|
11825
|
+
var terminalSocketServerMessageSchema = z18.discriminatedUnion("type", [
|
|
11826
|
+
z18.object({ type: z18.literal("output"), data: z18.string() }),
|
|
11827
|
+
z18.object({ type: z18.literal("rtc-answer"), sdp: z18.string() }),
|
|
11784
11828
|
terminalRtcCandidateSchema,
|
|
11785
|
-
|
|
11829
|
+
z18.object({ type: z18.literal("rtc-switch") })
|
|
11786
11830
|
]);
|
|
11787
11831
|
var TERMINAL_RTC_ICE_SERVER = "stun:stun.l.google.com:19302";
|
|
11788
11832
|
|
|
@@ -11805,6 +11849,7 @@ var REPLICAS_MCP_TOOLS = {
|
|
|
11805
11849
|
setSlackAgentDefaults: "set_slack_agent_defaults",
|
|
11806
11850
|
claimSettingsOffer: "claim_settings_offer",
|
|
11807
11851
|
setThreadMuted: "set_thread_muted",
|
|
11852
|
+
setSlackConnectMuted: "set_slack_connect_muted",
|
|
11808
11853
|
spawnSubagent: "spawn_subagent",
|
|
11809
11854
|
messageSubagent: "message_subagent",
|
|
11810
11855
|
listSubagents: "list_subagents",
|
|
@@ -11832,47 +11877,47 @@ var REPLICAS_MCP_TOOLS = {
|
|
|
11832
11877
|
deleteChat: "delete_chat",
|
|
11833
11878
|
listRepositories: "list_repositories"
|
|
11834
11879
|
};
|
|
11835
|
-
var automationToolInputSchema =
|
|
11836
|
-
name:
|
|
11837
|
-
prompt:
|
|
11838
|
-
environment_id:
|
|
11839
|
-
triggers:
|
|
11840
|
-
|
|
11880
|
+
var automationToolInputSchema = z19.object({
|
|
11881
|
+
name: z19.string().describe("Short automation name."),
|
|
11882
|
+
prompt: z19.string().describe("Prompt each automation run starts with."),
|
|
11883
|
+
environment_id: z19.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
11884
|
+
triggers: z19.array(automationTriggerSchema).min(1).describe(
|
|
11885
|
+
`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"] } }\`.`
|
|
11841
11886
|
),
|
|
11842
|
-
description:
|
|
11843
|
-
plan_mode:
|
|
11844
|
-
goal_mode:
|
|
11845
|
-
fast_mode:
|
|
11846
|
-
workspace_lifecycle_policy:
|
|
11887
|
+
description: z19.string().optional().describe("One-line summary shown in the dashboard."),
|
|
11888
|
+
plan_mode: z19.boolean().optional(),
|
|
11889
|
+
goal_mode: z19.boolean().optional(),
|
|
11890
|
+
fast_mode: z19.boolean().optional(),
|
|
11891
|
+
workspace_lifecycle_policy: z19.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
11847
11892
|
"What happens to a run's workspace when the agent finishes. `delete_when_done` (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."
|
|
11848
11893
|
)
|
|
11849
11894
|
});
|
|
11850
11895
|
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
11851
|
-
scope:
|
|
11896
|
+
scope: z19.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
11852
11897
|
});
|
|
11853
11898
|
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
11854
|
-
automation_id:
|
|
11855
|
-
enabled:
|
|
11856
|
-
agent_provider:
|
|
11857
|
-
model:
|
|
11858
|
-
thinking_level:
|
|
11859
|
-
workspace_size:
|
|
11860
|
-
scope:
|
|
11899
|
+
automation_id: z19.string().describe("Automation ID"),
|
|
11900
|
+
enabled: z19.boolean().optional(),
|
|
11901
|
+
agent_provider: z19.enum(AGENT).nullable().optional(),
|
|
11902
|
+
model: z19.string().nullable().optional(),
|
|
11903
|
+
thinking_level: z19.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
11904
|
+
workspace_size: z19.enum(WORKSPACE_SIZES).optional(),
|
|
11905
|
+
scope: z19.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
11861
11906
|
});
|
|
11862
|
-
var chatPath = { id:
|
|
11907
|
+
var chatPath = { id: z19.string().describe("Workspace ID"), chat_id: z19.string().describe("Chat ID") };
|
|
11863
11908
|
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
11864
|
-
var createChatToolInputSchema =
|
|
11865
|
-
var forkChatToolInputSchema =
|
|
11866
|
-
var renameChatToolInputSchema =
|
|
11867
|
-
var runCommandToolInputSchema =
|
|
11868
|
-
var environmentMcpPath = { environment_id:
|
|
11869
|
-
var createEnvironmentMcpToolInputSchema =
|
|
11870
|
-
var updateEnvironmentMcpToolInputSchema =
|
|
11909
|
+
var createChatToolInputSchema = z19.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
11910
|
+
var forkChatToolInputSchema = z19.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
11911
|
+
var renameChatToolInputSchema = z19.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
11912
|
+
var runCommandToolInputSchema = z19.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
11913
|
+
var environmentMcpPath = { environment_id: z19.string().describe("Environment ID") };
|
|
11914
|
+
var createEnvironmentMcpToolInputSchema = z19.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
11915
|
+
var updateEnvironmentMcpToolInputSchema = z19.object({
|
|
11871
11916
|
...environmentMcpPath,
|
|
11872
|
-
mcp_id:
|
|
11917
|
+
mcp_id: z19.string().describe("MCP ID"),
|
|
11873
11918
|
...updateEnvironmentMcpRequestSchema.shape
|
|
11874
11919
|
});
|
|
11875
|
-
var createEnvironmentDeviceToolInputSchema =
|
|
11920
|
+
var createEnvironmentDeviceToolInputSchema = z19.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
11876
11921
|
|
|
11877
11922
|
// ../shared/src/scout.ts
|
|
11878
11923
|
var SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
@@ -11908,50 +11953,50 @@ var SCOUT_PRESET_ICONS = [
|
|
|
11908
11953
|
];
|
|
11909
11954
|
|
|
11910
11955
|
// ../shared/src/routes/push.ts
|
|
11911
|
-
import { z as
|
|
11956
|
+
import { z as z20 } from "zod";
|
|
11912
11957
|
|
|
11913
11958
|
// ../shared/src/workspace-attention.ts
|
|
11914
11959
|
var WORKSPACE_ATTENTION_REASONS = ["question", "plan", "variables", "blocked", "setup"];
|
|
11915
11960
|
var CHAT_ATTENTION_REASONS = ["question", "blocked"];
|
|
11916
11961
|
|
|
11917
11962
|
// ../shared/src/routes/push.ts
|
|
11918
|
-
var registerPushDeviceRequestSchema =
|
|
11919
|
-
|
|
11920
|
-
platform:
|
|
11921
|
-
token:
|
|
11922
|
-
appId:
|
|
11923
|
-
apnsEnvironment:
|
|
11963
|
+
var registerPushDeviceRequestSchema = z20.discriminatedUnion("platform", [
|
|
11964
|
+
z20.object({
|
|
11965
|
+
platform: z20.literal("ios"),
|
|
11966
|
+
token: z20.string().regex(/^[0-9a-f]{64,200}$/i),
|
|
11967
|
+
appId: z20.string().min(1).max(255),
|
|
11968
|
+
apnsEnvironment: z20.enum(["sandbox", "production"])
|
|
11924
11969
|
}),
|
|
11925
|
-
|
|
11926
|
-
platform:
|
|
11927
|
-
token:
|
|
11928
|
-
appId:
|
|
11970
|
+
z20.object({
|
|
11971
|
+
platform: z20.literal("android"),
|
|
11972
|
+
token: z20.string().min(1).max(4096),
|
|
11973
|
+
appId: z20.string().min(1).max(255)
|
|
11929
11974
|
})
|
|
11930
11975
|
]);
|
|
11931
11976
|
var PUSH_HOLD_MINUTES = 5;
|
|
11932
|
-
var recordPushActivityRequestSchema =
|
|
11933
|
-
organizationId:
|
|
11977
|
+
var recordPushActivityRequestSchema = z20.object({
|
|
11978
|
+
organizationId: z20.string().uuid(),
|
|
11934
11979
|
/** Seconds since the last keyboard or mouse input on this computer. A phone leaves it out: it only reports what it has open. */
|
|
11935
|
-
idleSeconds:
|
|
11936
|
-
seenWorkspaceIds:
|
|
11980
|
+
idleSeconds: z20.number().min(0).optional(),
|
|
11981
|
+
seenWorkspaceIds: z20.array(z20.string().uuid()).max(20)
|
|
11937
11982
|
});
|
|
11938
11983
|
var PUSH_NOTIFICATION_KINDS = [...WORKSPACE_ATTENTION_REASONS, "finished"];
|
|
11939
|
-
var pushQuestionSchema =
|
|
11940
|
-
var pushNotificationDataSchema =
|
|
11941
|
-
organizationId:
|
|
11942
|
-
workspaceId:
|
|
11943
|
-
chatId:
|
|
11944
|
-
kind:
|
|
11945
|
-
completedAt:
|
|
11946
|
-
toolRequestId:
|
|
11984
|
+
var pushQuestionSchema = z20.object({ id: z20.string().max(64), options: z20.array(z20.object({ id: z20.string().max(64), label: z20.string().min(1).max(60) })).min(1).max(4) });
|
|
11985
|
+
var pushNotificationDataSchema = z20.object({
|
|
11986
|
+
organizationId: z20.string(),
|
|
11987
|
+
workspaceId: z20.string(),
|
|
11988
|
+
chatId: z20.string().nullable(),
|
|
11989
|
+
kind: z20.enum(PUSH_NOTIFICATION_KINDS),
|
|
11990
|
+
completedAt: z20.string(),
|
|
11991
|
+
toolRequestId: z20.string().optional(),
|
|
11947
11992
|
question: pushQuestionSchema.optional()
|
|
11948
11993
|
});
|
|
11949
|
-
var registerLiveActivityRequestSchema =
|
|
11950
|
-
deviceId:
|
|
11951
|
-
workspaceId:
|
|
11952
|
-
chatId:
|
|
11994
|
+
var registerLiveActivityRequestSchema = z20.object({
|
|
11995
|
+
deviceId: z20.string().uuid(),
|
|
11996
|
+
workspaceId: z20.string().uuid(),
|
|
11997
|
+
chatId: z20.string().min(1).max(100),
|
|
11953
11998
|
/** The iOS activity's push token. Android leaves it out and gets FCM data messages on the device token. */
|
|
11954
|
-
pushToken:
|
|
11999
|
+
pushToken: z20.string().regex(/^[0-9a-f]{64,400}$/i).optional()
|
|
11955
12000
|
});
|
|
11956
12001
|
|
|
11957
12002
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
@@ -12233,7 +12278,7 @@ var DOCKER_ABILITY = {
|
|
|
12233
12278
|
};
|
|
12234
12279
|
|
|
12235
12280
|
// ../shared/src/routes/environment-setups.ts
|
|
12236
|
-
import { z as
|
|
12281
|
+
import { z as z21 } from "zod";
|
|
12237
12282
|
var ENVIRONMENT_SETUP_STEPS = [
|
|
12238
12283
|
{ key: "understand", label: "Understand the codebase" },
|
|
12239
12284
|
{ key: "install", label: "Install dependencies and run the app" },
|
|
@@ -12266,17 +12311,17 @@ var ENVIRONMENT_SETUP_LIMITS = {
|
|
|
12266
12311
|
repositories: 20
|
|
12267
12312
|
};
|
|
12268
12313
|
var VARIABLE_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
12269
|
-
var text2 = (max) => max === void 0 ?
|
|
12314
|
+
var text2 = (max) => max === void 0 ? z21.string().trim() : z21.string().trim().max(max);
|
|
12270
12315
|
var requiredText = (max) => text2(max).min(1, "must not be empty");
|
|
12271
12316
|
var optionalText2 = (max) => text2(max).nullish().transform((value) => value || null);
|
|
12272
12317
|
var clearableText = (max) => text2(max).nullish().transform((value) => value === void 0 ? void 0 : value || null);
|
|
12273
|
-
var list = (item, max) => max === void 0 ?
|
|
12318
|
+
var list = (item, max) => max === void 0 ? z21.array(item) : z21.array(item).max(max);
|
|
12274
12319
|
var ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES = ["cron", "github", "gitlab"];
|
|
12275
12320
|
function isEnvironmentSetupAuthoredTriggerType(type) {
|
|
12276
12321
|
return ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES.some((authored) => authored === type);
|
|
12277
12322
|
}
|
|
12278
|
-
var proposalTriggerSchema =
|
|
12279
|
-
var existingTriggerSchema =
|
|
12323
|
+
var proposalTriggerSchema = z21.discriminatedUnion("type", [cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema]);
|
|
12324
|
+
var existingTriggerSchema = z21.custom(
|
|
12280
12325
|
(value) => isRecord(value) && typeof value.type === "string" && isRecord(value.config),
|
|
12281
12326
|
"must be an automation trigger"
|
|
12282
12327
|
);
|
|
@@ -12284,17 +12329,17 @@ var carriedTriggerSchema = existingTriggerSchema.refine(
|
|
|
12284
12329
|
(trigger) => !isEnvironmentSetupAuthoredTriggerType(trigger.type)
|
|
12285
12330
|
);
|
|
12286
12331
|
function automationSchema(limits) {
|
|
12287
|
-
const authored =
|
|
12332
|
+
const authored = z21.object({
|
|
12288
12333
|
name: text2(limits.nameChars),
|
|
12289
12334
|
description: text2(limits.descriptionChars),
|
|
12290
12335
|
prompt: text2(limits.automationPromptChars),
|
|
12291
12336
|
triggers: list(proposalTriggerSchema, limits.automationTriggers)
|
|
12292
12337
|
});
|
|
12293
|
-
const updated = authored.extend({ triggers: list(
|
|
12294
|
-
return
|
|
12338
|
+
const updated = authored.extend({ triggers: list(z21.union([proposalTriggerSchema, carriedTriggerSchema]), limits.automationTriggers) });
|
|
12339
|
+
return z21.object({
|
|
12295
12340
|
key: requiredText(limits.automationKeyChars),
|
|
12296
|
-
action:
|
|
12297
|
-
automation_id:
|
|
12341
|
+
action: z21.enum(ENVIRONMENT_SETUP_AUTOMATION_ACTIONS).default("create"),
|
|
12342
|
+
automation_id: z21.string().regex(UUID_RE, "must be an automation id").nullable().default(null),
|
|
12298
12343
|
name: text2().default(""),
|
|
12299
12344
|
description: optionalText2().transform((value) => value ?? ""),
|
|
12300
12345
|
prompt: text2().default(""),
|
|
@@ -12317,7 +12362,7 @@ function automationSchema(limits) {
|
|
|
12317
12362
|
const content = (automation.action === "update" ? updated : authored).safeParse(automation);
|
|
12318
12363
|
if (content.success) return { ...automation, ...content.data };
|
|
12319
12364
|
for (const issue of content.error.issues) ctx.addIssue({ ...issue, code: "custom" });
|
|
12320
|
-
return
|
|
12365
|
+
return z21.NEVER;
|
|
12321
12366
|
});
|
|
12322
12367
|
}
|
|
12323
12368
|
function automationListSchema(limits) {
|
|
@@ -12335,7 +12380,7 @@ function automationListSchema(limits) {
|
|
|
12335
12380
|
});
|
|
12336
12381
|
}
|
|
12337
12382
|
function environmentSchema(limits) {
|
|
12338
|
-
return
|
|
12383
|
+
return z21.object({
|
|
12339
12384
|
name: optionalText2(limits.nameChars).transform((value) => value ?? void 0),
|
|
12340
12385
|
description: clearableText(limits.descriptionChars),
|
|
12341
12386
|
system_prompt: clearableText(limits.systemPromptChars),
|
|
@@ -12344,41 +12389,41 @@ function environmentSchema(limits) {
|
|
|
12344
12389
|
});
|
|
12345
12390
|
}
|
|
12346
12391
|
function proposalSchema(limits) {
|
|
12347
|
-
return
|
|
12392
|
+
return z21.object({
|
|
12348
12393
|
summary: requiredText(limits.summaryChars),
|
|
12349
12394
|
stack: list(text2(), limits.stackItems).default([]).transform((items) => items.filter(Boolean)),
|
|
12350
12395
|
environment: environmentSchema(limits),
|
|
12351
|
-
variables: list(
|
|
12352
|
-
key:
|
|
12396
|
+
variables: list(z21.object({
|
|
12397
|
+
key: z21.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
|
|
12353
12398
|
description: optionalText2(limits.variableDescriptionChars).transform((value) => value ?? ""),
|
|
12354
|
-
required:
|
|
12399
|
+
required: z21.boolean().default(false)
|
|
12355
12400
|
}), limits.variables).default([]),
|
|
12356
12401
|
automations: automationListSchema(limits),
|
|
12357
|
-
verification: list(
|
|
12402
|
+
verification: list(z21.object({
|
|
12358
12403
|
label: requiredText(limits.nameChars),
|
|
12359
|
-
status:
|
|
12404
|
+
status: z21.enum(ENVIRONMENT_SETUP_VERIFICATION_STATUSES),
|
|
12360
12405
|
detail: optionalText2(limits.verificationDetailChars).transform((value) => value ?? void 0)
|
|
12361
12406
|
}), limits.verificationItems).default([]),
|
|
12362
|
-
media: list(
|
|
12363
|
-
media_id:
|
|
12407
|
+
media: list(z21.object({
|
|
12408
|
+
media_id: z21.string().regex(UUID_RE, "must be a media id"),
|
|
12364
12409
|
title: requiredText(limits.nameChars)
|
|
12365
12410
|
}), limits.mediaItems).default([])
|
|
12366
12411
|
});
|
|
12367
12412
|
}
|
|
12368
12413
|
var environmentSetupProposalSchema = proposalSchema({});
|
|
12369
12414
|
var environmentSetupProposalSubmissionSchema = proposalSchema(ENVIRONMENT_SETUP_LIMITS);
|
|
12370
|
-
var environmentSetupRunStateSchema =
|
|
12371
|
-
status:
|
|
12372
|
-
steps:
|
|
12415
|
+
var environmentSetupRunStateSchema = z21.object({
|
|
12416
|
+
status: z21.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
|
|
12417
|
+
steps: z21.partialRecord(z21.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z21.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
|
|
12373
12418
|
proposal: environmentSetupProposalSchema.nullable().default(null),
|
|
12374
|
-
applied:
|
|
12375
|
-
applied_at:
|
|
12376
|
-
automation_ids:
|
|
12419
|
+
applied: z21.object({
|
|
12420
|
+
applied_at: z21.string(),
|
|
12421
|
+
automation_ids: z21.array(z21.string())
|
|
12377
12422
|
}).nullable().default(null)
|
|
12378
12423
|
});
|
|
12379
|
-
var applyEnvironmentSetupRequestSchema =
|
|
12424
|
+
var applyEnvironmentSetupRequestSchema = z21.object({
|
|
12380
12425
|
environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
|
|
12381
|
-
variables: list(
|
|
12426
|
+
variables: list(z21.object({ key: z21.string().regex(VARIABLE_KEY_RE), value: z21.string() }), ENVIRONMENT_SETUP_LIMITS.variables).default([]).refine((variables) => new Set(variables.map((variable) => variable.key)).size === variables.length, "must have unique keys").transform((variables) => variables.filter((variable) => variable.value.length > 0)),
|
|
12382
12427
|
automations: automationListSchema(ENVIRONMENT_SETUP_LIMITS)
|
|
12383
12428
|
});
|
|
12384
12429
|
|
|
@@ -12853,7 +12898,7 @@ var GITLAB_ABILITY = {
|
|
|
12853
12898
|
};
|
|
12854
12899
|
|
|
12855
12900
|
// ../shared/src/routes/compute.ts
|
|
12856
|
-
import { z as
|
|
12901
|
+
import { z as z22 } from "zod";
|
|
12857
12902
|
var COMPUTE_SANDBOX_KINDS = ["gpu"];
|
|
12858
12903
|
var GPU_TYPES = ["T4", "L4", "A10G", "L40S", "A100", "A100-80GB", "H100", "H200", "B200"];
|
|
12859
12904
|
var DEFAULT_GPU_TYPE = "L4";
|
|
@@ -12870,27 +12915,27 @@ var COMPUTE_SANDBOX_LIMITS = {
|
|
|
12870
12915
|
maxIdleTimeoutMinutes: 60,
|
|
12871
12916
|
maxTransferBytes: 1024 ** 3
|
|
12872
12917
|
};
|
|
12873
|
-
var computeEnvSchema =
|
|
12874
|
-
var createComputeSandboxRequestSchema =
|
|
12875
|
-
kind:
|
|
12876
|
-
gpu:
|
|
12877
|
-
image:
|
|
12878
|
-
timeoutMinutes:
|
|
12879
|
-
idleTimeoutMinutes:
|
|
12880
|
-
ports:
|
|
12918
|
+
var computeEnvSchema = z22.record(z22.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z22.string().max(32768)).refine((env) => Object.keys(env).length <= 64, "At most 64 environment variables are allowed");
|
|
12919
|
+
var createComputeSandboxRequestSchema = z22.object({
|
|
12920
|
+
kind: z22.enum(COMPUTE_SANDBOX_KINDS),
|
|
12921
|
+
gpu: z22.string().trim().optional(),
|
|
12922
|
+
image: z22.string().trim().min(1).max(256).regex(/^\S+$/, "Image must not contain whitespace").optional(),
|
|
12923
|
+
timeoutMinutes: z22.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTimeoutMinutes).optional(),
|
|
12924
|
+
idleTimeoutMinutes: z22.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxIdleTimeoutMinutes).optional(),
|
|
12925
|
+
ports: z22.array(z22.number().int().min(1).max(65535)).max(COMPUTE_SANDBOX_LIMITS.maxPorts).optional(),
|
|
12881
12926
|
env: computeEnvSchema.optional()
|
|
12882
12927
|
});
|
|
12883
|
-
var computeExecRequestSchema =
|
|
12884
|
-
command:
|
|
12885
|
-
workdir:
|
|
12928
|
+
var computeExecRequestSchema = z22.object({
|
|
12929
|
+
command: z22.string().min(1).max(1e5),
|
|
12930
|
+
workdir: z22.string().min(1).max(4096).optional(),
|
|
12886
12931
|
env: computeEnvSchema.optional(),
|
|
12887
|
-
detach:
|
|
12932
|
+
detach: z22.boolean().optional()
|
|
12888
12933
|
});
|
|
12889
|
-
var computeUploadRequestSchema =
|
|
12890
|
-
size:
|
|
12934
|
+
var computeUploadRequestSchema = z22.object({
|
|
12935
|
+
size: z22.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
|
|
12891
12936
|
});
|
|
12892
|
-
var computeTransferPathSchema =
|
|
12893
|
-
path:
|
|
12937
|
+
var computeTransferPathSchema = z22.object({
|
|
12938
|
+
path: z22.string().min(1).max(4096).optional()
|
|
12894
12939
|
});
|
|
12895
12940
|
|
|
12896
12941
|
// ../shared/src/default-skills/replicas-agent/abilities/gpu.ts
|
|
@@ -14574,18 +14619,18 @@ var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "approved"
|
|
|
14574
14619
|
var MOTHERSHIP_TURN_ERROR_SUMMARY = "Turn ended with an error.";
|
|
14575
14620
|
var MOTHERSHIP_EVENT_TYPE = "multitask-event";
|
|
14576
14621
|
var MOTHERSHIP_EVENT_MESSAGE_TYPE = "multitask_event";
|
|
14577
|
-
var mothershipEventSchema =
|
|
14578
|
-
id:
|
|
14579
|
-
at:
|
|
14580
|
-
kind:
|
|
14581
|
-
agentId:
|
|
14582
|
-
agentName:
|
|
14583
|
-
summary:
|
|
14584
|
-
detail:
|
|
14622
|
+
var mothershipEventSchema = z23.object({
|
|
14623
|
+
id: z23.string(),
|
|
14624
|
+
at: z23.string(),
|
|
14625
|
+
kind: z23.enum(MOTHERSHIP_EVENT_KINDS),
|
|
14626
|
+
agentId: z23.string(),
|
|
14627
|
+
agentName: z23.string(),
|
|
14628
|
+
summary: z23.string(),
|
|
14629
|
+
detail: z23.string().optional(),
|
|
14585
14630
|
// Set when the subagent is a chat in this workspace rather than a ship; agentId is then that chat's id.
|
|
14586
|
-
chatId:
|
|
14631
|
+
chatId: z23.string().optional(),
|
|
14587
14632
|
// Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
|
|
14588
|
-
noticed:
|
|
14633
|
+
noticed: z23.boolean().optional()
|
|
14589
14634
|
});
|
|
14590
14635
|
var TAG = "multitask_event";
|
|
14591
14636
|
var BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
|
|
@@ -15603,7 +15648,7 @@ function subagentChatId(message2) {
|
|
|
15603
15648
|
}
|
|
15604
15649
|
|
|
15605
15650
|
// ../shared/src/learned-skills.ts
|
|
15606
|
-
import { z as
|
|
15651
|
+
import { z as z24 } from "zod";
|
|
15607
15652
|
|
|
15608
15653
|
// ../shared/src/frontmatter.ts
|
|
15609
15654
|
import { parse as parseYaml } from "yaml";
|
|
@@ -15626,20 +15671,20 @@ function parseFrontmatter(content) {
|
|
|
15626
15671
|
var LEARNED_SKILLS_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/learned-skills`;
|
|
15627
15672
|
var LEARNED_SKILLS_MANIFEST_PATH = `${LEARNED_SKILLS_ROOT}/manifest.json`;
|
|
15628
15673
|
var LEARNED_SKILL_DIR_PREFIX = "replicas-learned__";
|
|
15629
|
-
var learnedSkillsManifestSchema =
|
|
15630
|
-
skills:
|
|
15674
|
+
var learnedSkillsManifestSchema = z24.object({
|
|
15675
|
+
skills: z24.array(z24.object({ name: z24.string(), sha256: z24.string() }))
|
|
15631
15676
|
});
|
|
15632
|
-
var dreamVerdictChecksSchema =
|
|
15633
|
-
repeatable:
|
|
15634
|
-
realInstruction:
|
|
15635
|
-
noContradiction:
|
|
15636
|
-
formatExact:
|
|
15637
|
-
humanOnly:
|
|
15638
|
-
actionable:
|
|
15639
|
-
durable:
|
|
15677
|
+
var dreamVerdictChecksSchema = z24.object({
|
|
15678
|
+
repeatable: z24.boolean(),
|
|
15679
|
+
realInstruction: z24.boolean(),
|
|
15680
|
+
noContradiction: z24.boolean(),
|
|
15681
|
+
formatExact: z24.boolean(),
|
|
15682
|
+
humanOnly: z24.boolean(),
|
|
15683
|
+
actionable: z24.boolean(),
|
|
15684
|
+
durable: z24.boolean()
|
|
15640
15685
|
});
|
|
15641
15686
|
var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
|
|
15642
|
-
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve:
|
|
15687
|
+
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z24.boolean(), reason: z24.string() });
|
|
15643
15688
|
var learnedSkillFormatInstruction = (speaker) => `Write a SKILL.md whose frontmatter has a kebab-case \`name\` and a short \`description\` that starts with "Use when" and names the situations it applies to; the body records only what ${speaker} actually said, restated as a direct instruction, usually one to three lines. Every line of a learning is loaded into future sessions, so leave out anything an agent could infer on its own: no headings, explanations, rules, or examples unless ${speaker} stated those specifics themselves. For "from now on, use Conventional Commits", the body is just "Use Conventional Commits for every commit message and PR title."`;
|
|
15644
15689
|
|
|
15645
15690
|
// ../shared/src/user-message-matching.ts
|
|
@@ -19240,10 +19285,10 @@ function hasChatStarted(chat) {
|
|
|
19240
19285
|
}
|
|
19241
19286
|
|
|
19242
19287
|
// ../shared/src/routes/billing.ts
|
|
19243
|
-
import { z as
|
|
19288
|
+
import { z as z25 } from "zod";
|
|
19244
19289
|
var SOURCE_LIMIT_SOURCES = ["limrun", "modal"];
|
|
19245
|
-
var usageLimitCentsSchema =
|
|
19246
|
-
var sourceLimitsCentsSchema =
|
|
19290
|
+
var usageLimitCentsSchema = z25.number().int().min(100).max(1e8);
|
|
19291
|
+
var sourceLimitsCentsSchema = z25.partialRecord(z25.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
|
|
19247
19292
|
|
|
19248
19293
|
// ../shared/src/routes/codex.ts
|
|
19249
19294
|
var CODEX_AUTH_ENV_KEYS = [
|
|
@@ -19397,7 +19442,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
19397
19442
|
};
|
|
19398
19443
|
|
|
19399
19444
|
// ../shared/src/routes/command-protection.ts
|
|
19400
|
-
import { z as
|
|
19445
|
+
import { z as z26 } from "zod";
|
|
19401
19446
|
|
|
19402
19447
|
// ../shared/src/git-invocations.ts
|
|
19403
19448
|
var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
|
|
@@ -19488,27 +19533,27 @@ function findCheckoutTarget(args) {
|
|
|
19488
19533
|
}
|
|
19489
19534
|
|
|
19490
19535
|
// ../shared/src/routes/command-protection.ts
|
|
19491
|
-
var commandProtectionRepoStateSchema =
|
|
19492
|
-
branch:
|
|
19493
|
-
defaultBranch:
|
|
19494
|
-
pushBranch:
|
|
19495
|
-
pushConfig:
|
|
19496
|
-
headMessage:
|
|
19497
|
-
mergeInProgress:
|
|
19536
|
+
var commandProtectionRepoStateSchema = z26.object({
|
|
19537
|
+
branch: z26.string().nullable(),
|
|
19538
|
+
defaultBranch: z26.string().nullable(),
|
|
19539
|
+
pushBranch: z26.string().nullable(),
|
|
19540
|
+
pushConfig: z26.string().nullable(),
|
|
19541
|
+
headMessage: z26.string().nullable(),
|
|
19542
|
+
mergeInProgress: z26.boolean().optional()
|
|
19498
19543
|
});
|
|
19499
|
-
var commandProtectionEvaluateRequestSchema =
|
|
19500
|
-
provider:
|
|
19501
|
-
source:
|
|
19502
|
-
toolName:
|
|
19503
|
-
toolInput:
|
|
19504
|
-
command:
|
|
19505
|
-
cwd:
|
|
19506
|
-
toolUseId:
|
|
19544
|
+
var commandProtectionEvaluateRequestSchema = z26.object({
|
|
19545
|
+
provider: z26.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
19546
|
+
source: z26.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
19547
|
+
toolName: z26.string(),
|
|
19548
|
+
toolInput: z26.unknown(),
|
|
19549
|
+
command: z26.string().nullish(),
|
|
19550
|
+
cwd: z26.string().nullish(),
|
|
19551
|
+
toolUseId: z26.string().nullish(),
|
|
19507
19552
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
19508
19553
|
// policy can see branches and commit messages the command text only references.
|
|
19509
|
-
gitContext:
|
|
19510
|
-
repos:
|
|
19511
|
-
messageFiles:
|
|
19554
|
+
gitContext: z26.object({
|
|
19555
|
+
repos: z26.record(z26.string(), commandProtectionRepoStateSchema),
|
|
19556
|
+
messageFiles: z26.record(z26.string(), z26.string())
|
|
19512
19557
|
}).optional()
|
|
19513
19558
|
});
|
|
19514
19559
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -19727,43 +19772,6 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
19727
19772
|
].some((pattern) => pattern.test(command)) || /\b(?:gh\s+api|glab\s+api|curl)\b/.test(command) && /(?:-x|--method|--request)[\s=]+['"]?post\b/.test(command) && /\/(?:pulls|merge_requests)\b/.test(command);
|
|
19728
19773
|
}
|
|
19729
19774
|
|
|
19730
|
-
// ../shared/src/routes/linear.ts
|
|
19731
|
-
import { z as z26 } from "zod";
|
|
19732
|
-
var linearSessionMetadataSchema = z26.object({
|
|
19733
|
-
via_mothership: z26.boolean().optional(),
|
|
19734
|
-
attached: z26.boolean().optional(),
|
|
19735
|
-
issue_id: z26.string(),
|
|
19736
|
-
issue_identifier: z26.string(),
|
|
19737
|
-
issue_title: z26.string(),
|
|
19738
|
-
issue_description: z26.string(),
|
|
19739
|
-
issue_url: z26.string(),
|
|
19740
|
-
comment_id: z26.string(),
|
|
19741
|
-
comment_body: z26.string(),
|
|
19742
|
-
triggered_by_id: z26.string().optional(),
|
|
19743
|
-
triggered_by_name: z26.string().optional(),
|
|
19744
|
-
triggered_by_email: z26.string().optional(),
|
|
19745
|
-
linear_workspace_id: z26.string().optional(),
|
|
19746
|
-
creator_id: z26.string().optional(),
|
|
19747
|
-
creator_name: z26.string().optional(),
|
|
19748
|
-
creator_email: z26.string().optional(),
|
|
19749
|
-
assignee_id: z26.string().optional(),
|
|
19750
|
-
assignee_name: z26.string().optional(),
|
|
19751
|
-
assignee_email: z26.string().optional(),
|
|
19752
|
-
issue_state: z26.string().optional(),
|
|
19753
|
-
parent_issue: z26.object({
|
|
19754
|
-
id: z26.string(),
|
|
19755
|
-
identifier: z26.string(),
|
|
19756
|
-
title: z26.string(),
|
|
19757
|
-
description: z26.string().nullable()
|
|
19758
|
-
}).optional(),
|
|
19759
|
-
workspace: z26.object({
|
|
19760
|
-
id: z26.string(),
|
|
19761
|
-
coding_agent: z26.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
|
|
19762
|
-
task_description: z26.string(),
|
|
19763
|
-
created_at: z26.string()
|
|
19764
|
-
}).optional()
|
|
19765
|
-
});
|
|
19766
|
-
|
|
19767
19775
|
// ../shared/src/routes/scout.ts
|
|
19768
19776
|
import { z as z27 } from "zod";
|
|
19769
19777
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
@@ -19833,7 +19841,11 @@ var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.ext
|
|
|
19833
19841
|
monitored: z27.boolean().optional().describe("Linear: `true` starts monitoring the team (organization admins only), `false` stops. Slack: kept for older callers; prefer `proactivity`. `false` means `tagged`, and `true` lifts a `tagged` channel back to the organization's level. Omit to keep it."),
|
|
19834
19842
|
preset_id: z27.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
19835
19843
|
instructions: z27.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
|
|
19836
|
-
proactivity: z27.enum([...SCOUT_PROACTIVITY_LEVELS, "organization"]).optional().describe("Slack only: this channel's or group DM's own level, overriding the organization's here alone. `organization` makes it follow the organization's level again. Omit to keep it. 1:1 DMs are always addressed to Replicas, so they take no level.")
|
|
19844
|
+
proactivity: z27.enum([...SCOUT_PROACTIVITY_LEVELS, "organization"]).optional().describe("Slack only: this channel's or group DM's own level, overriding the organization's here alone. `organization` makes it follow the organization's level again. Omit to keep it. 1:1 DMs are always addressed to Replicas, so they take no level."),
|
|
19845
|
+
muted: z27.enum(["on", "off", "default"]).optional().describe(`Slack only, organization admins only: \`on\` mutes Replicas in this channel, \`off\` unmutes it here, \`default\` follows the Slack Connect default from \`${REPLICAS_MCP_TOOLS.setSlackConnectMuted}\`. Omit to keep it.`)
|
|
19846
|
+
});
|
|
19847
|
+
var scoutSetSlackConnectMutedToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19848
|
+
muted: z27.boolean().describe("`true` mutes Replicas in every Slack Connect channel without its own setting; `false` lets them follow their levels again.")
|
|
19837
19849
|
});
|
|
19838
19850
|
var scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19839
19851
|
proactivity: z27.enum(SCOUT_PROACTIVITY_LEVELS).describe("The level every Slack channel and group DM follows unless it has its own. Slack Connect channels without their own level stay `tagged`.")
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QAB7ES7V.js";
|
|
10
10
|
import {
|
|
11
11
|
extractCommandProtectionCommandText,
|
|
12
12
|
findCommandProtectionGitLookups,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
findPrMergeSignals,
|
|
15
15
|
findScoutRepoWriteSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L6URHRUV.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QAB7ES7V.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HVXTTLCG.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-S2SWUWDJ.js";
|
|
22
22
|
import {
|
|
23
23
|
isRecord
|
|
24
24
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
resolveOpenAICompatibleModelsUrl,
|
|
57
57
|
splitMothershipInstructions,
|
|
58
58
|
withTimeout
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-L6URHRUV.js";
|
|
60
60
|
|
|
61
61
|
// src/managers/codex-token-manager.ts
|
|
62
62
|
import { promises as fs } from "fs";
|
|
@@ -319,7 +319,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
319
319
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
320
320
|
await this.applyCredentialsResponse(data);
|
|
321
321
|
setAgentCredentialSnapshot("codex", data);
|
|
322
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
322
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-6WFOKJ54.js");
|
|
323
323
|
await restartCodexAspHostIfRunning2();
|
|
324
324
|
});
|
|
325
325
|
await this.start(true);
|
|
@@ -341,7 +341,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
341
341
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
342
342
|
await this.applyCredentialsResponse(data);
|
|
343
343
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
344
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
344
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-6WFOKJ54.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
SUBPROCESS_MAX_BUFFER,
|
|
6
6
|
execFileAsync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-S2SWUWDJ.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
provisionedDeviceSchema,
|
|
22
22
|
readReplicasRuntimeEnv,
|
|
23
23
|
serializePosixEnvFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-L6URHRUV.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L6URHRUV.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HVXTTLCG.js";
|
|
7
7
|
import {
|
|
8
8
|
ASTER_BASE_URL,
|
|
9
9
|
ASTER_PROVIDER,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isRecord,
|
|
16
16
|
readOllamaAuthEnv,
|
|
17
17
|
readOpenAICompatibleAuthEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-L6URHRUV.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
evaluateCommandProtection
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-LCDGWVEY.js";
|
|
7
|
+
import "./chunk-QAB7ES7V.js";
|
|
8
|
+
import "./chunk-S2SWUWDJ.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-L6URHRUV.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-S643QUYK.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-HVXTTLCG.js";
|
|
22
|
+
import "./chunk-S2SWUWDJ.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
|
25
25
|
OPENCODE_GO_PROVIDER,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
headlessAgentUsagePath,
|
|
30
30
|
isRecord,
|
|
31
31
|
withTimeout
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-L6URHRUV.js";
|
|
33
33
|
import "./chunk-VEQXQN22.js";
|
|
34
34
|
|
|
35
35
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
evaluateCommandProtection,
|
|
28
28
|
extractToolCommand,
|
|
29
29
|
reportCommandProtectionBlock
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LCDGWVEY.js";
|
|
31
31
|
import {
|
|
32
32
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
33
33
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
spawnMuseMsp,
|
|
66
66
|
startMuseSession,
|
|
67
67
|
uuidV7
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-S643QUYK.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-YYICSSFI.js";
|
|
72
72
|
import {
|
|
73
73
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
74
74
|
AsyncLock,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
timestampFromSeconds,
|
|
144
144
|
upsertCredentialFileLines,
|
|
145
145
|
writeSecureCredentialFile
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-OU5KG7T5.js";
|
|
147
147
|
import {
|
|
148
148
|
ENGINE_ENV,
|
|
149
149
|
monolithRequest,
|
|
@@ -153,15 +153,15 @@ import {
|
|
|
153
153
|
resolveDiffBase,
|
|
154
154
|
setAgentCredentialSnapshot,
|
|
155
155
|
setLinearSessionId
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-QAB7ES7V.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-HVXTTLCG.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-S2SWUWDJ.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -423,7 +423,7 @@ import {
|
|
|
423
423
|
workspaceTokenRequestSchema,
|
|
424
424
|
workspaceTokenResponseSchema,
|
|
425
425
|
wrapInTag
|
|
426
|
-
} from "./chunk-
|
|
426
|
+
} from "./chunk-L6URHRUV.js";
|
|
427
427
|
import {
|
|
428
428
|
cloneMcpConfig,
|
|
429
429
|
ensureCompatibilityImports,
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
publishedPullRequestUrls
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YYICSSFI.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
9
|
} from "./chunk-UZSNFLDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
shouldRefreshPullRequests
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-L6URHRUV.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/subagent-mcp.js
CHANGED