replicas-engine 0.1.1243 → 0.1.1245
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-HGU7UE6G.js → asp-host-AUWG4TM5.js} +5 -5
- package/dist/src/{chunk-PR5MCOTJ.js → chunk-2VFSDNB4.js} +2 -2
- package/dist/src/{chunk-4UMPF6MZ.js → chunk-B2IU3EA4.js} +2 -2
- package/dist/src/{chunk-MSM5OSLN.js → chunk-BITFRIB7.js} +394 -374
- package/dist/src/{chunk-Z2MHQL4K.js → chunk-G5LEEPN7.js} +2 -2
- package/dist/src/{chunk-CAX6F5FB.js → chunk-HJJ7VRXK.js} +3 -3
- package/dist/src/{chunk-C5KURRLK.js → chunk-KE2AWRDG.js} +6 -6
- package/dist/src/{chunk-K6LHHTEJ.js → chunk-M3IIIYS7.js} +1 -1
- package/dist/src/{chunk-MMIG2PXJ.js → chunk-N4MLANHG.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 +5 -4
- package/package.json +1 -1
|
@@ -1916,6 +1916,21 @@ var engineMcpOAuthTokenResponseSchema = z5.object({
|
|
|
1916
1916
|
expires_at: z5.string().nullable()
|
|
1917
1917
|
});
|
|
1918
1918
|
|
|
1919
|
+
// ../shared/src/routes/mothership.ts
|
|
1920
|
+
import { z as z6 } from "zod";
|
|
1921
|
+
var SUBAGENT_SERVICE_TIERS = ["default", "fast", "ultrafast"];
|
|
1922
|
+
function serviceTierRequestFields(tier) {
|
|
1923
|
+
return { fastMode: tier !== "default", ...tier === "ultrafast" ? { ultrafastMode: true } : {} };
|
|
1924
|
+
}
|
|
1925
|
+
var mothershipSubagentSettingsSchema = z6.object({
|
|
1926
|
+
coding_agent: z6.enum(VALID_AGENT_PROVIDERS),
|
|
1927
|
+
model: z6.string().nullable(),
|
|
1928
|
+
thinking_level: z6.enum(VALID_THINKING_LEVELS).nullable(),
|
|
1929
|
+
service_tier: z6.enum(SUBAGENT_SERVICE_TIERS),
|
|
1930
|
+
goal_mode: z6.boolean(),
|
|
1931
|
+
plan_mode: z6.boolean()
|
|
1932
|
+
});
|
|
1933
|
+
|
|
1919
1934
|
// ../shared/src/runtime-env.ts
|
|
1920
1935
|
var REPLICAS_RUNTIME_ENV_ALIASES = {
|
|
1921
1936
|
monolithUrl: ["REPLICAS_MONOLITH_URL", "MONOLITH_URL"],
|
|
@@ -2105,19 +2120,19 @@ function gitIdentityConfigCommands(identity, scope = "global") {
|
|
|
2105
2120
|
}
|
|
2106
2121
|
|
|
2107
2122
|
// ../shared/src/headless-agent.ts
|
|
2108
|
-
import { z as
|
|
2109
|
-
var headlessAgentRequestSchema =
|
|
2110
|
-
mode:
|
|
2111
|
-
agent:
|
|
2123
|
+
import { z as z7 } from "zod";
|
|
2124
|
+
var headlessAgentRequestSchema = z7.object({
|
|
2125
|
+
mode: z7.literal("structured"),
|
|
2126
|
+
agent: z7.custom(
|
|
2112
2127
|
(value) => typeof value === "string" && isValidAgentProvider(value)
|
|
2113
2128
|
),
|
|
2114
|
-
model:
|
|
2115
|
-
prompt:
|
|
2116
|
-
workingDirectory:
|
|
2117
|
-
timeoutSeconds:
|
|
2118
|
-
thinkingLevel:
|
|
2119
|
-
codexOauthTokens:
|
|
2120
|
-
outputSchema:
|
|
2129
|
+
model: z7.string().min(1),
|
|
2130
|
+
prompt: z7.string(),
|
|
2131
|
+
workingDirectory: z7.string().min(1),
|
|
2132
|
+
timeoutSeconds: z7.number().int().min(1).max(1800).default(300),
|
|
2133
|
+
thinkingLevel: z7.enum(STANDARD_THINKING_LEVELS).optional(),
|
|
2134
|
+
codexOauthTokens: z7.object({ accessToken: z7.string(), accountId: z7.string() }).optional(),
|
|
2135
|
+
outputSchema: z7.record(z7.string(), z7.json())
|
|
2121
2136
|
});
|
|
2122
2137
|
var headlessAgentUsagePath = (outputPath) => `${outputPath}.usage`;
|
|
2123
2138
|
|
|
@@ -2193,12 +2208,12 @@ function describeAuthFallback(payload) {
|
|
|
2193
2208
|
}
|
|
2194
2209
|
|
|
2195
2210
|
// ../shared/src/workspace-credentials.ts
|
|
2196
|
-
import { z as
|
|
2211
|
+
import { z as z8 } from "zod";
|
|
2197
2212
|
var WORKSPACE_CREDENTIAL_PROVIDERS = ["claude", "codex"];
|
|
2198
|
-
var workspaceCredentialProviderSchema =
|
|
2213
|
+
var workspaceCredentialProviderSchema = z8.enum(WORKSPACE_CREDENTIAL_PROVIDERS);
|
|
2199
2214
|
var workspaceCredentialSelectionSchema = agentCredentialSnapshotSchema.omit({ revision: true, account: true, credentialId: true });
|
|
2200
2215
|
var createWorkspaceCredentialSchema = workspaceCredentialSelectionSchema.extend({
|
|
2201
|
-
provider:
|
|
2216
|
+
provider: z8.enum(VALID_AGENT_PROVIDERS)
|
|
2202
2217
|
}).refine(({ provider: provider2, method }) => agentCredentialMethods(provider2).includes(method), {
|
|
2203
2218
|
message: "This inference provider is not supported by this agent"
|
|
2204
2219
|
});
|
|
@@ -2209,59 +2224,59 @@ var switchWorkspaceCredentialSchema = workspaceCredentialSelectionSchema.extend(
|
|
|
2209
2224
|
});
|
|
2210
2225
|
|
|
2211
2226
|
// ../shared/src/chat-fork.ts
|
|
2212
|
-
import { z as
|
|
2227
|
+
import { z as z10 } from "zod";
|
|
2213
2228
|
|
|
2214
2229
|
// ../shared/src/fallback-chains.ts
|
|
2215
|
-
import { z as
|
|
2216
|
-
var fallbackHarnessStepSchema =
|
|
2217
|
-
kind:
|
|
2218
|
-
provider:
|
|
2219
|
-
model:
|
|
2220
|
-
thinkingLevel:
|
|
2230
|
+
import { z as z9 } from "zod";
|
|
2231
|
+
var fallbackHarnessStepSchema = z9.object({
|
|
2232
|
+
kind: z9.literal("harness"),
|
|
2233
|
+
provider: z9.enum(VALID_AGENT_PROVIDERS),
|
|
2234
|
+
model: z9.string().min(1),
|
|
2235
|
+
thinkingLevel: z9.enum(VALID_THINKING_LEVELS).optional()
|
|
2221
2236
|
});
|
|
2222
|
-
var fallbackPlanStepSchema =
|
|
2223
|
-
|
|
2224
|
-
kind:
|
|
2225
|
-
methods:
|
|
2226
|
-
models:
|
|
2237
|
+
var fallbackPlanStepSchema = z9.discriminatedUnion("kind", [
|
|
2238
|
+
z9.object({
|
|
2239
|
+
kind: z9.literal("credentials"),
|
|
2240
|
+
methods: z9.array(z9.custom(isAuthMethod)).min(1),
|
|
2241
|
+
models: z9.record(z9.string(), z9.string().min(1)).optional()
|
|
2227
2242
|
}),
|
|
2228
2243
|
fallbackHarnessStepSchema
|
|
2229
2244
|
]);
|
|
2230
|
-
var fallbackPlanResponseSchema =
|
|
2245
|
+
var fallbackPlanResponseSchema = z9.object({ steps: z9.array(fallbackPlanStepSchema) });
|
|
2231
2246
|
|
|
2232
2247
|
// ../shared/src/chat-fork.ts
|
|
2233
|
-
var fallbackReasonSchema =
|
|
2234
|
-
var chatForkInfoSchema =
|
|
2235
|
-
source:
|
|
2236
|
-
chatId:
|
|
2237
|
-
provider:
|
|
2238
|
-
title:
|
|
2248
|
+
var fallbackReasonSchema = z10.enum(AGENT_FALLBACK_REASONS);
|
|
2249
|
+
var chatForkInfoSchema = z10.object({
|
|
2250
|
+
source: z10.object({
|
|
2251
|
+
chatId: z10.string().min(1),
|
|
2252
|
+
provider: z10.enum(VALID_AGENT_PROVIDERS),
|
|
2253
|
+
title: z10.string()
|
|
2239
2254
|
}),
|
|
2240
|
-
trigger:
|
|
2255
|
+
trigger: z10.enum(["manual", "auto", "side"]),
|
|
2241
2256
|
reason: fallbackReasonSchema.optional(),
|
|
2242
|
-
state:
|
|
2243
|
-
error:
|
|
2244
|
-
startedAt:
|
|
2245
|
-
completedAt:
|
|
2257
|
+
state: z10.enum(["preparing", "ready", "failed"]),
|
|
2258
|
+
error: z10.string().optional(),
|
|
2259
|
+
startedAt: z10.string(),
|
|
2260
|
+
completedAt: z10.string().optional()
|
|
2246
2261
|
});
|
|
2247
2262
|
function coerceChatForkInfo(value) {
|
|
2248
2263
|
const parsed = chatForkInfoSchema.safeParse(value);
|
|
2249
2264
|
return parsed.success ? parsed.data : null;
|
|
2250
2265
|
}
|
|
2251
|
-
var forkChatRequestSchema =
|
|
2252
|
-
provider:
|
|
2253
|
-
model:
|
|
2254
|
-
thinkingLevel:
|
|
2255
|
-
title:
|
|
2256
|
-
message:
|
|
2257
|
-
id:
|
|
2258
|
-
clientRequestId:
|
|
2259
|
-
enableInteractiveTools:
|
|
2266
|
+
var forkChatRequestSchema = z10.object({
|
|
2267
|
+
provider: z10.enum(VALID_AGENT_PROVIDERS),
|
|
2268
|
+
model: z10.string().min(1).optional(),
|
|
2269
|
+
thinkingLevel: z10.enum(VALID_THINKING_LEVELS).optional(),
|
|
2270
|
+
title: z10.string().min(1).max(200).optional(),
|
|
2271
|
+
message: z10.string().trim().optional(),
|
|
2272
|
+
id: z10.string().uuid().optional(),
|
|
2273
|
+
clientRequestId: z10.string().min(1).max(128).optional(),
|
|
2274
|
+
enableInteractiveTools: z10.boolean().optional(),
|
|
2260
2275
|
// Server-injected by the monolith from the authenticated request; never trusted from clients.
|
|
2261
|
-
senderUserId:
|
|
2262
|
-
senderEmail:
|
|
2263
|
-
senderDisplayName:
|
|
2264
|
-
senderAvatarUrl:
|
|
2276
|
+
senderUserId: z10.string().optional(),
|
|
2277
|
+
senderEmail: z10.string().optional(),
|
|
2278
|
+
senderDisplayName: z10.string().optional(),
|
|
2279
|
+
senderAvatarUrl: z10.string().optional()
|
|
2265
2280
|
});
|
|
2266
2281
|
function describeQuotaLimit(reason) {
|
|
2267
2282
|
if (reason === "auth_failed") return "could not authenticate";
|
|
@@ -2272,10 +2287,10 @@ function describeChatForkReason(reason, provider2) {
|
|
|
2272
2287
|
return reason ? `${getProviderDisplayName(provider2)} ${describeQuotaLimit(reason)}` : null;
|
|
2273
2288
|
}
|
|
2274
2289
|
var AGENT_QUOTA_EXHAUSTED_EVENT_TYPE = "agent-quota-exhausted";
|
|
2275
|
-
var agentQuotaExhaustedPayloadSchema =
|
|
2276
|
-
provider:
|
|
2290
|
+
var agentQuotaExhaustedPayloadSchema = z10.object({
|
|
2291
|
+
provider: z10.enum(VALID_AGENT_PROVIDERS),
|
|
2277
2292
|
reason: fallbackReasonSchema,
|
|
2278
|
-
detail:
|
|
2293
|
+
detail: z10.string().optional(),
|
|
2279
2294
|
forkTo: fallbackHarnessStepSchema.optional()
|
|
2280
2295
|
});
|
|
2281
2296
|
function defaultForkChatTitle(source, provider2) {
|
|
@@ -2289,27 +2304,27 @@ function getChatContinuation(chats, chatId) {
|
|
|
2289
2304
|
}
|
|
2290
2305
|
|
|
2291
2306
|
// ../shared/src/credential-refresh.ts
|
|
2292
|
-
import { z as
|
|
2293
|
-
var engineCredentialRefreshFailureSchema =
|
|
2294
|
-
code:
|
|
2307
|
+
import { z as z11 } from "zod";
|
|
2308
|
+
var engineCredentialRefreshFailureSchema = z11.object({
|
|
2309
|
+
code: z11.string(),
|
|
2295
2310
|
credential: workspaceCredentialSelectionSchema.optional()
|
|
2296
2311
|
});
|
|
2297
2312
|
|
|
2298
2313
|
// ../shared/src/credential-pool.ts
|
|
2299
|
-
import { z as
|
|
2314
|
+
import { z as z12 } from "zod";
|
|
2300
2315
|
var MAX_CREDENTIAL_POOL_ACCOUNTS = 10;
|
|
2301
|
-
var reorderCredentialPoolSchema =
|
|
2302
|
-
credential_ids:
|
|
2316
|
+
var reorderCredentialPoolSchema = z12.object({
|
|
2317
|
+
credential_ids: z12.array(z12.string().uuid()).min(1).max(MAX_CREDENTIAL_POOL_ACCOUNTS)
|
|
2303
2318
|
});
|
|
2304
2319
|
|
|
2305
2320
|
// ../shared/src/mothership-events.ts
|
|
2306
|
-
import { z as
|
|
2321
|
+
import { z as z19 } from "zod";
|
|
2307
2322
|
|
|
2308
2323
|
// ../shared/src/replicas-mcp.ts
|
|
2309
|
-
import { z as
|
|
2324
|
+
import { z as z16 } from "zod";
|
|
2310
2325
|
|
|
2311
2326
|
// ../shared/src/automations/trigger-schemas.ts
|
|
2312
|
-
import { z as
|
|
2327
|
+
import { z as z13 } from "zod";
|
|
2313
2328
|
|
|
2314
2329
|
// ../shared/src/uuid.ts
|
|
2315
2330
|
function createUuidFromHex(value) {
|
|
@@ -2326,29 +2341,29 @@ function getReviewerLoginsError(event, logins) {
|
|
|
2326
2341
|
if (isReviewRequested === !!logins?.some((login) => login.trim().replace(/^@+/, ""))) return null;
|
|
2327
2342
|
return isReviewRequested ? "The PR review requested trigger needs at least one GitHub username" : "Requested reviewers only apply to the PR review requested trigger";
|
|
2328
2343
|
}
|
|
2329
|
-
var repositoryTriggerConfigSchema =
|
|
2330
|
-
event:
|
|
2331
|
-
repository_ids:
|
|
2332
|
-
group_pr_events:
|
|
2333
|
-
excluded_actors:
|
|
2334
|
-
reviewer_logins:
|
|
2344
|
+
var repositoryTriggerConfigSchema = z13.object({
|
|
2345
|
+
event: z13.string(),
|
|
2346
|
+
repository_ids: z13.array(z13.string().regex(UUID_RE, "must be a repository id")).optional(),
|
|
2347
|
+
group_pr_events: z13.boolean().optional(),
|
|
2348
|
+
excluded_actors: z13.array(z13.string()).optional(),
|
|
2349
|
+
reviewer_logins: z13.array(z13.string()).optional()
|
|
2335
2350
|
});
|
|
2336
|
-
var cronTriggerSchema =
|
|
2337
|
-
var githubTriggerSchema =
|
|
2338
|
-
type:
|
|
2351
|
+
var cronTriggerSchema = z13.object({ type: z13.literal("cron"), config: z13.object({ schedule: z13.string(), timezone: z13.string().optional() }) });
|
|
2352
|
+
var githubTriggerSchema = z13.object({
|
|
2353
|
+
type: z13.literal("github"),
|
|
2339
2354
|
config: repositoryTriggerConfigSchema.superRefine((config, ctx) => {
|
|
2340
2355
|
const message2 = getReviewerLoginsError(config.event, config.reviewer_logins);
|
|
2341
2356
|
if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["reviewer_logins"] });
|
|
2342
2357
|
})
|
|
2343
2358
|
});
|
|
2344
|
-
var gitlabTriggerSchema =
|
|
2345
|
-
var automationTriggerSchema =
|
|
2359
|
+
var gitlabTriggerSchema = z13.object({ type: z13.literal("gitlab"), config: repositoryTriggerConfigSchema });
|
|
2360
|
+
var automationTriggerSchema = z13.discriminatedUnion("type", [
|
|
2346
2361
|
cronTriggerSchema,
|
|
2347
2362
|
githubTriggerSchema,
|
|
2348
2363
|
gitlabTriggerSchema,
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2364
|
+
z13.object({ type: z13.literal("slack"), config: z13.object({ event: z13.string(), channel_ids: z13.array(z13.string()).optional(), group_thread_replies: z13.boolean().optional() }) }),
|
|
2365
|
+
z13.object({ type: z13.literal("sentry"), config: z13.object({ event: z13.string(), project_slugs: z13.array(z13.string()).optional(), min_level: z13.string().optional() }) }),
|
|
2366
|
+
z13.object({ type: z13.literal("custom"), config: z13.object({}) })
|
|
2352
2367
|
]);
|
|
2353
2368
|
|
|
2354
2369
|
// ../shared/src/automations/types.ts
|
|
@@ -2356,21 +2371,21 @@ var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
|
|
|
2356
2371
|
var AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_when_done"];
|
|
2357
2372
|
|
|
2358
2373
|
// ../shared/src/routes/environment.ts
|
|
2359
|
-
import { z as
|
|
2374
|
+
import { z as z14 } from "zod";
|
|
2360
2375
|
var ENVIRONMENT_MCP_TRANSPORTS = ["stdio", "http", "sse"];
|
|
2361
|
-
var stringMap =
|
|
2362
|
-
var createEnvironmentMcpRequestSchema =
|
|
2363
|
-
name:
|
|
2364
|
-
transport:
|
|
2365
|
-
config:
|
|
2366
|
-
|
|
2367
|
-
|
|
2376
|
+
var stringMap = z14.record(z14.string(), z14.string());
|
|
2377
|
+
var createEnvironmentMcpRequestSchema = z14.object({
|
|
2378
|
+
name: z14.string(),
|
|
2379
|
+
transport: z14.enum(ENVIRONMENT_MCP_TRANSPORTS),
|
|
2380
|
+
config: z14.union([
|
|
2381
|
+
z14.object({ command: z14.string().min(1), args: z14.array(z14.string()).optional(), env: stringMap.optional() }),
|
|
2382
|
+
z14.object({ url: z14.url(), headers: stringMap.optional(), auth: mcpAuthSchema.optional() })
|
|
2368
2383
|
]).describe("stdio: `{ command, args, env }`. http/sse: `{ url, headers }`.")
|
|
2369
2384
|
});
|
|
2370
2385
|
var updateEnvironmentMcpRequestSchema = createEnvironmentMcpRequestSchema.partial();
|
|
2371
2386
|
|
|
2372
2387
|
// ../shared/src/routes/workspaces.ts
|
|
2373
|
-
import { z as
|
|
2388
|
+
import { z as z15 } from "zod";
|
|
2374
2389
|
var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
|
|
2375
2390
|
var STALE_PREPARING_MS = 10 * 6e4;
|
|
2376
2391
|
var WORKSPACE_STATUS_FILTERS = WORKSPACE_STATUSES.map((status) => status === "error" ? "failed" : status);
|
|
@@ -2381,16 +2396,16 @@ var DEFAULT_WORKSPACE_FILTERS = {
|
|
|
2381
2396
|
activity: "any"
|
|
2382
2397
|
};
|
|
2383
2398
|
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
2384
|
-
var workspaceExecRequestSchema =
|
|
2385
|
-
command:
|
|
2386
|
-
timeout_seconds:
|
|
2399
|
+
var workspaceExecRequestSchema = z15.object({
|
|
2400
|
+
command: z15.string().regex(/\S/, "command is required"),
|
|
2401
|
+
timeout_seconds: z15.number().int().min(1).max(50).optional().describe("Default: 30")
|
|
2387
2402
|
});
|
|
2388
|
-
var terminalRtcCandidateSchema =
|
|
2389
|
-
var terminalSocketServerMessageSchema =
|
|
2390
|
-
|
|
2391
|
-
|
|
2403
|
+
var terminalRtcCandidateSchema = z15.object({ type: z15.literal("rtc-candidate"), candidate: z15.string(), mid: z15.string() });
|
|
2404
|
+
var terminalSocketServerMessageSchema = z15.discriminatedUnion("type", [
|
|
2405
|
+
z15.object({ type: z15.literal("output"), data: z15.string() }),
|
|
2406
|
+
z15.object({ type: z15.literal("rtc-answer"), sdp: z15.string() }),
|
|
2392
2407
|
terminalRtcCandidateSchema,
|
|
2393
|
-
|
|
2408
|
+
z15.object({ type: z15.literal("rtc-switch") })
|
|
2394
2409
|
]);
|
|
2395
2410
|
var TERMINAL_RTC_ICE_SERVER = "stun:stun.l.google.com:19302";
|
|
2396
2411
|
|
|
@@ -2433,44 +2448,44 @@ var REPLICAS_MCP_TOOLS = {
|
|
|
2433
2448
|
deleteChat: "delete_chat",
|
|
2434
2449
|
listRepositories: "list_repositories"
|
|
2435
2450
|
};
|
|
2436
|
-
var automationToolInputSchema =
|
|
2437
|
-
name:
|
|
2438
|
-
prompt:
|
|
2439
|
-
environment_id:
|
|
2440
|
-
triggers:
|
|
2451
|
+
var automationToolInputSchema = z16.object({
|
|
2452
|
+
name: z16.string().describe("Short automation name."),
|
|
2453
|
+
prompt: z16.string().describe("Prompt each automation run starts with."),
|
|
2454
|
+
environment_id: z16.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
2455
|
+
triggers: z16.array(automationTriggerSchema).min(1).describe(
|
|
2441
2456
|
'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>"] } }`.'
|
|
2442
2457
|
),
|
|
2443
|
-
description:
|
|
2444
|
-
plan_mode:
|
|
2445
|
-
goal_mode:
|
|
2446
|
-
fast_mode:
|
|
2447
|
-
workspace_lifecycle_policy:
|
|
2458
|
+
description: z16.string().optional().describe("One-line summary shown in the dashboard."),
|
|
2459
|
+
plan_mode: z16.boolean().optional(),
|
|
2460
|
+
goal_mode: z16.boolean().optional(),
|
|
2461
|
+
fast_mode: z16.boolean().optional(),
|
|
2462
|
+
workspace_lifecycle_policy: z16.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
|
|
2448
2463
|
"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."
|
|
2449
2464
|
)
|
|
2450
2465
|
});
|
|
2451
2466
|
var automationCreateToolInputSchema = automationToolInputSchema.extend({
|
|
2452
|
-
scope:
|
|
2467
|
+
scope: z16.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
|
|
2453
2468
|
});
|
|
2454
2469
|
var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
|
|
2455
|
-
automation_id:
|
|
2456
|
-
enabled:
|
|
2457
|
-
agent_provider:
|
|
2458
|
-
model:
|
|
2459
|
-
thinking_level:
|
|
2460
|
-
workspace_size:
|
|
2461
|
-
scope:
|
|
2470
|
+
automation_id: z16.string().describe("Automation ID"),
|
|
2471
|
+
enabled: z16.boolean().optional(),
|
|
2472
|
+
agent_provider: z16.enum(AGENT).nullable().optional(),
|
|
2473
|
+
model: z16.string().nullable().optional(),
|
|
2474
|
+
thinking_level: z16.enum(VALID_THINKING_LEVELS).nullable().optional(),
|
|
2475
|
+
workspace_size: z16.enum(WORKSPACE_SIZES).optional(),
|
|
2476
|
+
scope: z16.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
|
|
2462
2477
|
});
|
|
2463
|
-
var chatPath = { id:
|
|
2478
|
+
var chatPath = { id: z16.string().describe("Workspace ID"), chat_id: z16.string().describe("Chat ID") };
|
|
2464
2479
|
var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
|
|
2465
|
-
var createChatToolInputSchema =
|
|
2466
|
-
var forkChatToolInputSchema =
|
|
2467
|
-
var renameChatToolInputSchema =
|
|
2468
|
-
var runCommandToolInputSchema =
|
|
2469
|
-
var environmentMcpPath = { environment_id:
|
|
2470
|
-
var createEnvironmentMcpToolInputSchema =
|
|
2471
|
-
var updateEnvironmentMcpToolInputSchema =
|
|
2480
|
+
var createChatToolInputSchema = z16.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
|
|
2481
|
+
var forkChatToolInputSchema = z16.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
|
|
2482
|
+
var renameChatToolInputSchema = z16.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
|
|
2483
|
+
var runCommandToolInputSchema = z16.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
|
|
2484
|
+
var environmentMcpPath = { environment_id: z16.string().describe("Environment ID") };
|
|
2485
|
+
var createEnvironmentMcpToolInputSchema = z16.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
|
|
2486
|
+
var updateEnvironmentMcpToolInputSchema = z16.object({
|
|
2472
2487
|
...environmentMcpPath,
|
|
2473
|
-
mcp_id:
|
|
2488
|
+
mcp_id: z16.string().describe("MCP ID"),
|
|
2474
2489
|
...updateEnvironmentMcpRequestSchema.shape
|
|
2475
2490
|
});
|
|
2476
2491
|
|
|
@@ -2534,7 +2549,7 @@ The CLI is the canonical surface. Chat transcripts that show \`DISPLAY=:99 xdoto
|
|
|
2534
2549
|
\`\`\`bash
|
|
2535
2550
|
# DO
|
|
2536
2551
|
replicas computer key Return
|
|
2537
|
-
replicas computer observe /tmp/state.
|
|
2552
|
+
replicas computer observe /tmp/state.jpg
|
|
2538
2553
|
|
|
2539
2554
|
# DON'T
|
|
2540
2555
|
DISPLAY=:99 xdotool key Return
|
|
@@ -2553,11 +2568,10 @@ replicas computer info
|
|
|
2553
2568
|
replicas computer launch chrome https://news.ycombinator.com
|
|
2554
2569
|
|
|
2555
2570
|
# 3) Capture the settled viewport and native accessibility tree together.
|
|
2556
|
-
replicas computer browser-state /tmp/state.
|
|
2571
|
+
replicas computer browser-state /tmp/state.jpg --full
|
|
2557
2572
|
|
|
2558
2573
|
# 4) Batch actions that use refs from the same state, then capture the semantic diff.
|
|
2559
2574
|
replicas computer browser-batch '[{"action":"fill","ref":17,"value":"hello"},{"action":"click","ref":42}]'
|
|
2560
|
-
replicas computer browser-state /tmp/after-click.png
|
|
2561
2575
|
|
|
2562
2576
|
# 5) (Optional) Record a screencap to share back.
|
|
2563
2577
|
replicas computer record start /tmp/demo.mp4 --fps 60
|
|
@@ -2579,34 +2593,39 @@ If invoked very early in the workspace lifecycle, \`info\` will poll briefly whi
|
|
|
2579
2593
|
Checks and repairs the desktop bridge, then prints which desktop services are running and the active preview URL (if any). Useful for debugging when a tool call seems to be doing nothing.
|
|
2580
2594
|
|
|
2581
2595
|
### \`replicas computer screenshot <path> [--raw] [--grid [px]]\`
|
|
2582
|
-
Captures the current desktop to
|
|
2596
|
+
Captures the current desktop to the given path. The extension picks the format; \`.jpg\` captures several times faster than \`.png\`.
|
|
2583
2597
|
|
|
2584
2598
|
Use \`--raw\` for a 1:1 desktop capture with no branding, padding, or rounded corners. Use \`--grid\` for the same 1:1 capture plus a coordinate grid; the optional value sets grid spacing in pixels and defaults to 100. Use the default branded screenshot only when you plan to share the image with \`replicas media upload\`.
|
|
2585
2599
|
|
|
2586
|
-
### \`replicas computer observe <path> [--
|
|
2600
|
+
### \`replicas computer observe <path> [--grid [px]] [--timeout MS] [--stable-ms MS] [--poll-ms MS]\`
|
|
2587
2601
|
Waits briefly for the screen to stop changing, saves a 1:1 screenshot, and prints JSON with screen dimensions, whether the screen stabilized, frame/change counts, mouse location, active window title, and visible window titles.
|
|
2588
2602
|
|
|
2589
|
-
Use this instead of hand-written \`sleep && screenshot\` loops after clicks, navigation, typing, or page loads.
|
|
2603
|
+
Use this instead of hand-written \`sleep && screenshot\` loops after clicks, navigation, typing, or page loads. It waits up to 3s for 600ms of visual stability. Use a \`.jpg\` path for the fastest capture. \`--grid\` overlays a coordinate grid.
|
|
2590
2604
|
|
|
2591
|
-
### \`replicas computer browser-state
|
|
2592
|
-
Waits
|
|
2605
|
+
### \`replicas computer browser-state [path] [--full] [--timeout MS] [--stable-ms MS]\`
|
|
2606
|
+
Waits until the selected Chrome page has been quiet for 500ms (immediately if it already has), then prints a compact native Chrome accessibility tree. Pass a path to also save a viewport screenshot in the same coordinate space. Nodes other than text have DOM-backed refs such as \`[ref=42] button "Save"\` or \`[ref=7] region "Done"\`; elements that only look clickable (a pointer cursor and no accessible role) appear as \`clickable\`. The tree includes accessible roles, names, values, states, visible bounds, and iframe content.
|
|
2593
2607
|
|
|
2594
2608
|
The first call returns a full tree. Later calls for the same target and document return semantic changes; navigation or reload forces a new full tree. Pass \`--full\` to reset the baseline. Refs are valid for the current document.
|
|
2595
2609
|
|
|
2610
|
+
Every browser action below (\`browser-click\`, \`browser-fill\`, \`browser-drag\`, \`browser-scroll\`, \`browser-key\`, \`browser-type\`, \`browser-batch\`) waits for the page to settle and ends its output with an \`observation\`: the same tree changes \`browser-state\` would print, including refs for new elements. Read it instead of calling \`browser-state\` again.
|
|
2611
|
+
|
|
2596
2612
|
### \`replicas computer browser [--snapshot]\`
|
|
2597
2613
|
Lists Chrome tabs. \`--snapshot\` returns the compatibility accessibility snapshot. Use \`browser-state\` for the primary action/observe loop.
|
|
2598
2614
|
|
|
2599
2615
|
### \`replicas computer browser-batch '<actions-json>'\`
|
|
2600
|
-
Runs up to 100 ordered browser actions through one Chrome session and stops at the first failure. Supported actions are \`click\`, \`fill\`, \`key\`, \`type\`, \`scroll\`, and \`wait\`. Prefer this when several actions use refs from the same
|
|
2616
|
+
Runs up to 100 ordered browser actions through one Chrome session and stops at the first failure. Supported actions are \`click\`, \`fill\`, \`drag\` (\`{"action":"drag","ref":3,"toRef":9}\`), \`key\`, \`type\`, \`scroll\`, and \`wait\`. Prefer this when several actions use refs from the same state; it avoids repeated process, tab-selection, and connection setup. The observation after the batch (or after a failure) carries the refs for the next step. Do not carry refs across navigation.
|
|
2601
2617
|
|
|
2602
2618
|
### \`replicas computer browser-click --ref ID [--button left|middle|right] [--double]\`
|
|
2603
2619
|
Scrolls the referenced node into view and sends trusted Chrome mouse input at its current visible bounds. Prefer refs from \`browser-state\`. \`browser-click <text> [--exact] [--index N]\` remains a fallback when no fresh ref is available.
|
|
2604
2620
|
|
|
2605
2621
|
### \`replicas computer browser-fill --ref ID <value>\`
|
|
2606
|
-
Focuses the referenced field, fills it with trusted Chrome input, and verifies the resulting value.
|
|
2622
|
+
Focuses the referenced field, fills it with trusted Chrome input, and verifies the resulting value. Selects take an option's value or label; range sliders and number, date, time and color inputs take their value directly (\`browser-fill --ref 12 75\` sets a slider to 75). \`browser-fill <field> <value> [--exact] [--index N]\` remains a text-matching fallback.
|
|
2623
|
+
|
|
2624
|
+
### \`replicas computer browser-drag --ref ID --to-ref ID\`
|
|
2625
|
+
Drags one element onto another with trusted mouse input, including HTML5 drag-and-drop. Both refs come from the latest state and should be visible together.
|
|
2607
2626
|
|
|
2608
|
-
### \`replicas computer browser-scroll <up|down|left|right> [--ref ID] [--amount PX]\`
|
|
2609
|
-
Sends trusted wheel input at a referenced element or the
|
|
2627
|
+
### \`replicas computer browser-scroll <up|down|left|right> [--ref ID] [--amount PX] [--until TEXT] [--timeout MS]\`
|
|
2628
|
+
Sends trusted wheel input at a referenced element. Without \`--ref\` it scrolls the page, or the largest visible scrollable panel when the page itself does not scroll. \`--until <text>\` keeps scrolling, letting lazy-loaded content arrive, until the text is on the page, then centers it; it fails if the content ends or \`--timeout\` (default 10000) passes first. Use it instead of scrolling in a loop.
|
|
2610
2629
|
|
|
2611
2630
|
### \`replicas computer browser-key <combo>\` / \`browser-type <text>\`
|
|
2612
2631
|
Sends trusted keyboard input to the focused element in the selected Chrome target. Prefer \`browser-fill\` when setting a known field value.
|
|
@@ -2664,28 +2683,27 @@ For Chrome, use the native accessibility state before interpreting pixels or gue
|
|
|
2664
2683
|
|
|
2665
2684
|
\`\`\`bash
|
|
2666
2685
|
replicas computer launch chrome https://example.com
|
|
2667
|
-
replicas computer browser-state
|
|
2686
|
+
replicas computer browser-state --full --target-id <page-id>
|
|
2668
2687
|
replicas computer browser-batch '[{"action":"fill","ref":17,"value":"hello"},{"action":"click","ref":23}]' --target-id <page-id>
|
|
2669
|
-
replicas computer browser-state /tmp/after.png --target-id <page-id>
|
|
2670
2688
|
\`\`\`
|
|
2671
2689
|
|
|
2672
|
-
|
|
2690
|
+
Batch ordered actions whose refs all come from the latest state, then read the observation the batch prints: it is the next semantic diff. A batch is fail-fast and validates each ref against the cached document. Split at navigation or whenever a later action depends on newly rendered refs. Pass a screenshot path to \`browser-state\` when the tree alone is ambiguous (icons, colors, canvas). Fall back to \`observe\` plus desktop coordinates for canvas content, browser chrome, non-Chrome apps, or controls missing from the accessibility tree.
|
|
2673
2691
|
|
|
2674
2692
|
### Typing into an address bar
|
|
2675
2693
|
\`\`\`bash
|
|
2676
2694
|
replicas computer launch chrome
|
|
2677
|
-
replicas computer observe /tmp/browser-open.
|
|
2695
|
+
replicas computer observe /tmp/browser-open.jpg
|
|
2678
2696
|
replicas computer key ctrl+l
|
|
2679
2697
|
replicas computer type "https://example.com"
|
|
2680
2698
|
replicas computer key Return
|
|
2681
|
-
replicas computer browser-state
|
|
2699
|
+
replicas computer browser-state --full
|
|
2682
2700
|
replicas computer browser-fill --ref 17 "replicas"
|
|
2683
2701
|
replicas computer browser-click --ref 23 --title "Example"
|
|
2684
2702
|
replicas computer browser-wait "Example Domain" --mode title --title "Example"
|
|
2685
2703
|
\`\`\`
|
|
2686
2704
|
|
|
2687
2705
|
### Coordinates from screenshots
|
|
2688
|
-
The display is 1920\xD71080 by default. For click planning, use \`observe\`, \`screenshot --raw\`, or \`screenshot --grid\`; those pixels map 1:1 to click coordinates. If the
|
|
2706
|
+
The display is 1920\xD71080 by default. For click planning, use \`observe\`, \`screenshot --raw\`, or \`screenshot --grid\`; those pixels map 1:1 to click coordinates. If the screenshot shows a button at pixel (520, 700), click \`replicas computer click 520 700\`. The default screenshot is branded for sharing and has padding around the desktop, so do not use it for coordinates.
|
|
2689
2707
|
|
|
2690
2708
|
Use percentages for broad, layout-relative targets when exact pixels are unnecessary: \`replicas computer click 50% 50%\` clicks the center of the screen, and \`replicas computer move 95% 5%\` moves near the top-right.
|
|
2691
2709
|
|
|
@@ -2710,7 +2728,7 @@ Then embed the printed \`\` lines in your chat reply and follow
|
|
|
2710
2728
|
- **"Computer-use daemon is unavailable"**: the package-managed systemd service did not start. Check \`systemctl status replicas-computer.service\` and its journal.
|
|
2711
2729
|
- **"Desktop services script missing"**: workspace image is older than this skill. Tell the user - nothing you can do from the CLI side.
|
|
2712
2730
|
- **\`xdotool ... failed: Can't open display\`**: Xvfb didn't come up. \`replicas computer status\` will show which service is dead and auto-repair the desktop bridge.
|
|
2713
|
-
- **Browser doesn't appear after \`launch chrome\`**: run \`replicas computer observe /tmp/state.
|
|
2731
|
+
- **Browser doesn't appear after \`launch chrome\`**: run \`replicas computer observe /tmp/state.jpg\`. Chrome cold-start on the virtual display takes ~500ms but bigger pages take longer.
|
|
2714
2732
|
- **Live preview shows static / black screen**: the browser may have crashed. \`replicas computer status\` should show no Chrome process - re-launch.
|
|
2715
2733
|
- **\`replicas computer info\` errors with "not registered"**: engine couldn't register the preview at startup (transient monolith error, or warming mode). Re-running the engine usually fixes it. Until it's registered, the Desktop tab will show a placeholder.
|
|
2716
2734
|
|
|
@@ -2775,7 +2793,7 @@ var DOCKER_ABILITY = {
|
|
|
2775
2793
|
};
|
|
2776
2794
|
|
|
2777
2795
|
// ../shared/src/routes/environment-setups.ts
|
|
2778
|
-
import { z as
|
|
2796
|
+
import { z as z17 } from "zod";
|
|
2779
2797
|
var ENVIRONMENT_SETUP_STEPS = [
|
|
2780
2798
|
{ key: "understand", label: "Understand the codebase" },
|
|
2781
2799
|
{ key: "install", label: "Install dependencies and run the app" },
|
|
@@ -2808,17 +2826,17 @@ var ENVIRONMENT_SETUP_LIMITS = {
|
|
|
2808
2826
|
repositories: 20
|
|
2809
2827
|
};
|
|
2810
2828
|
var VARIABLE_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2811
|
-
var text2 = (max) => max === void 0 ?
|
|
2829
|
+
var text2 = (max) => max === void 0 ? z17.string().trim() : z17.string().trim().max(max);
|
|
2812
2830
|
var requiredText = (max) => text2(max).min(1, "must not be empty");
|
|
2813
2831
|
var optionalText2 = (max) => text2(max).nullish().transform((value) => value || null);
|
|
2814
2832
|
var clearableText = (max) => text2(max).nullish().transform((value) => value === void 0 ? void 0 : value || null);
|
|
2815
|
-
var list = (item, max) => max === void 0 ?
|
|
2833
|
+
var list = (item, max) => max === void 0 ? z17.array(item) : z17.array(item).max(max);
|
|
2816
2834
|
var ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES = ["cron", "github", "gitlab"];
|
|
2817
2835
|
function isEnvironmentSetupAuthoredTriggerType(type) {
|
|
2818
2836
|
return ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES.some((authored) => authored === type);
|
|
2819
2837
|
}
|
|
2820
|
-
var proposalTriggerSchema =
|
|
2821
|
-
var existingTriggerSchema =
|
|
2838
|
+
var proposalTriggerSchema = z17.discriminatedUnion("type", [cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema]);
|
|
2839
|
+
var existingTriggerSchema = z17.custom(
|
|
2822
2840
|
(value) => isRecord(value) && typeof value.type === "string" && isRecord(value.config),
|
|
2823
2841
|
"must be an automation trigger"
|
|
2824
2842
|
);
|
|
@@ -2826,17 +2844,17 @@ var carriedTriggerSchema = existingTriggerSchema.refine(
|
|
|
2826
2844
|
(trigger) => !isEnvironmentSetupAuthoredTriggerType(trigger.type)
|
|
2827
2845
|
);
|
|
2828
2846
|
function automationSchema(limits) {
|
|
2829
|
-
const authored =
|
|
2847
|
+
const authored = z17.object({
|
|
2830
2848
|
name: text2(limits.nameChars),
|
|
2831
2849
|
description: text2(limits.descriptionChars),
|
|
2832
2850
|
prompt: text2(limits.automationPromptChars),
|
|
2833
2851
|
triggers: list(proposalTriggerSchema, limits.automationTriggers)
|
|
2834
2852
|
});
|
|
2835
|
-
const updated = authored.extend({ triggers: list(
|
|
2836
|
-
return
|
|
2853
|
+
const updated = authored.extend({ triggers: list(z17.union([proposalTriggerSchema, carriedTriggerSchema]), limits.automationTriggers) });
|
|
2854
|
+
return z17.object({
|
|
2837
2855
|
key: requiredText(limits.automationKeyChars),
|
|
2838
|
-
action:
|
|
2839
|
-
automation_id:
|
|
2856
|
+
action: z17.enum(ENVIRONMENT_SETUP_AUTOMATION_ACTIONS).default("create"),
|
|
2857
|
+
automation_id: z17.string().regex(UUID_RE, "must be an automation id").nullable().default(null),
|
|
2840
2858
|
name: text2().default(""),
|
|
2841
2859
|
description: optionalText2().transform((value) => value ?? ""),
|
|
2842
2860
|
prompt: text2().default(""),
|
|
@@ -2859,7 +2877,7 @@ function automationSchema(limits) {
|
|
|
2859
2877
|
const content = (automation.action === "update" ? updated : authored).safeParse(automation);
|
|
2860
2878
|
if (content.success) return { ...automation, ...content.data };
|
|
2861
2879
|
for (const issue of content.error.issues) ctx.addIssue({ ...issue, code: "custom" });
|
|
2862
|
-
return
|
|
2880
|
+
return z17.NEVER;
|
|
2863
2881
|
});
|
|
2864
2882
|
}
|
|
2865
2883
|
function automationListSchema(limits) {
|
|
@@ -2877,7 +2895,7 @@ function automationListSchema(limits) {
|
|
|
2877
2895
|
});
|
|
2878
2896
|
}
|
|
2879
2897
|
function environmentSchema(limits) {
|
|
2880
|
-
return
|
|
2898
|
+
return z17.object({
|
|
2881
2899
|
name: optionalText2(limits.nameChars).transform((value) => value ?? void 0),
|
|
2882
2900
|
description: clearableText(limits.descriptionChars),
|
|
2883
2901
|
system_prompt: clearableText(limits.systemPromptChars),
|
|
@@ -2886,41 +2904,41 @@ function environmentSchema(limits) {
|
|
|
2886
2904
|
});
|
|
2887
2905
|
}
|
|
2888
2906
|
function proposalSchema(limits) {
|
|
2889
|
-
return
|
|
2907
|
+
return z17.object({
|
|
2890
2908
|
summary: requiredText(limits.summaryChars),
|
|
2891
2909
|
stack: list(text2(), limits.stackItems).default([]).transform((items) => items.filter(Boolean)),
|
|
2892
2910
|
environment: environmentSchema(limits),
|
|
2893
|
-
variables: list(
|
|
2894
|
-
key:
|
|
2911
|
+
variables: list(z17.object({
|
|
2912
|
+
key: z17.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
|
|
2895
2913
|
description: optionalText2(limits.variableDescriptionChars).transform((value) => value ?? ""),
|
|
2896
|
-
required:
|
|
2914
|
+
required: z17.boolean().default(false)
|
|
2897
2915
|
}), limits.variables).default([]),
|
|
2898
2916
|
automations: automationListSchema(limits),
|
|
2899
|
-
verification: list(
|
|
2917
|
+
verification: list(z17.object({
|
|
2900
2918
|
label: requiredText(limits.nameChars),
|
|
2901
|
-
status:
|
|
2919
|
+
status: z17.enum(ENVIRONMENT_SETUP_VERIFICATION_STATUSES),
|
|
2902
2920
|
detail: optionalText2(limits.verificationDetailChars).transform((value) => value ?? void 0)
|
|
2903
2921
|
}), limits.verificationItems).default([]),
|
|
2904
|
-
media: list(
|
|
2905
|
-
media_id:
|
|
2922
|
+
media: list(z17.object({
|
|
2923
|
+
media_id: z17.string().regex(UUID_RE, "must be a media id"),
|
|
2906
2924
|
title: requiredText(limits.nameChars)
|
|
2907
2925
|
}), limits.mediaItems).default([])
|
|
2908
2926
|
});
|
|
2909
2927
|
}
|
|
2910
2928
|
var environmentSetupProposalSchema = proposalSchema({});
|
|
2911
2929
|
var environmentSetupProposalSubmissionSchema = proposalSchema(ENVIRONMENT_SETUP_LIMITS);
|
|
2912
|
-
var environmentSetupRunStateSchema =
|
|
2913
|
-
status:
|
|
2914
|
-
steps:
|
|
2930
|
+
var environmentSetupRunStateSchema = z17.object({
|
|
2931
|
+
status: z17.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
|
|
2932
|
+
steps: z17.partialRecord(z17.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z17.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
|
|
2915
2933
|
proposal: environmentSetupProposalSchema.nullable().default(null),
|
|
2916
|
-
applied:
|
|
2917
|
-
applied_at:
|
|
2918
|
-
automation_ids:
|
|
2934
|
+
applied: z17.object({
|
|
2935
|
+
applied_at: z17.string(),
|
|
2936
|
+
automation_ids: z17.array(z17.string())
|
|
2919
2937
|
}).nullable().default(null)
|
|
2920
2938
|
});
|
|
2921
|
-
var applyEnvironmentSetupRequestSchema =
|
|
2939
|
+
var applyEnvironmentSetupRequestSchema = z17.object({
|
|
2922
2940
|
environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
|
|
2923
|
-
variables: list(
|
|
2941
|
+
variables: list(z17.object({ key: z17.string().regex(VARIABLE_KEY_RE), value: z17.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)),
|
|
2924
2942
|
automations: automationListSchema(ENVIRONMENT_SETUP_LIMITS)
|
|
2925
2943
|
});
|
|
2926
2944
|
|
|
@@ -3373,7 +3391,7 @@ var GITLAB_ABILITY = {
|
|
|
3373
3391
|
};
|
|
3374
3392
|
|
|
3375
3393
|
// ../shared/src/routes/compute.ts
|
|
3376
|
-
import { z as
|
|
3394
|
+
import { z as z18 } from "zod";
|
|
3377
3395
|
var COMPUTE_SANDBOX_KINDS = ["gpu"];
|
|
3378
3396
|
var GPU_TYPES = ["T4", "L4", "A10G", "L40S", "A100", "A100-80GB", "H100", "H200", "B200"];
|
|
3379
3397
|
var DEFAULT_GPU_TYPE = "L4";
|
|
@@ -3390,27 +3408,27 @@ var COMPUTE_SANDBOX_LIMITS = {
|
|
|
3390
3408
|
maxIdleTimeoutMinutes: 60,
|
|
3391
3409
|
maxTransferBytes: 1024 ** 3
|
|
3392
3410
|
};
|
|
3393
|
-
var computeEnvSchema =
|
|
3394
|
-
var createComputeSandboxRequestSchema =
|
|
3395
|
-
kind:
|
|
3396
|
-
gpu:
|
|
3397
|
-
image:
|
|
3398
|
-
timeoutMinutes:
|
|
3399
|
-
idleTimeoutMinutes:
|
|
3400
|
-
ports:
|
|
3411
|
+
var computeEnvSchema = z18.record(z18.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z18.string().max(32768)).refine((env) => Object.keys(env).length <= 64, "At most 64 environment variables are allowed");
|
|
3412
|
+
var createComputeSandboxRequestSchema = z18.object({
|
|
3413
|
+
kind: z18.enum(COMPUTE_SANDBOX_KINDS),
|
|
3414
|
+
gpu: z18.string().trim().optional(),
|
|
3415
|
+
image: z18.string().trim().min(1).max(256).regex(/^\S+$/, "Image must not contain whitespace").optional(),
|
|
3416
|
+
timeoutMinutes: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTimeoutMinutes).optional(),
|
|
3417
|
+
idleTimeoutMinutes: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxIdleTimeoutMinutes).optional(),
|
|
3418
|
+
ports: z18.array(z18.number().int().min(1).max(65535)).max(COMPUTE_SANDBOX_LIMITS.maxPorts).optional(),
|
|
3401
3419
|
env: computeEnvSchema.optional()
|
|
3402
3420
|
});
|
|
3403
|
-
var computeExecRequestSchema =
|
|
3404
|
-
command:
|
|
3405
|
-
workdir:
|
|
3421
|
+
var computeExecRequestSchema = z18.object({
|
|
3422
|
+
command: z18.string().min(1).max(1e5),
|
|
3423
|
+
workdir: z18.string().min(1).max(4096).optional(),
|
|
3406
3424
|
env: computeEnvSchema.optional(),
|
|
3407
|
-
detach:
|
|
3425
|
+
detach: z18.boolean().optional()
|
|
3408
3426
|
});
|
|
3409
|
-
var computeUploadRequestSchema =
|
|
3410
|
-
size:
|
|
3427
|
+
var computeUploadRequestSchema = z18.object({
|
|
3428
|
+
size: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
|
|
3411
3429
|
});
|
|
3412
|
-
var computeTransferPathSchema =
|
|
3413
|
-
path:
|
|
3430
|
+
var computeTransferPathSchema = z18.object({
|
|
3431
|
+
path: z18.string().min(1).max(4096).optional()
|
|
3414
3432
|
});
|
|
3415
3433
|
|
|
3416
3434
|
// ../shared/src/default-skills/replicas-agent/abilities/gpu.ts
|
|
@@ -5030,16 +5048,16 @@ function splitMothershipInstructions(customInstructions) {
|
|
|
5030
5048
|
// ../shared/src/mothership-events.ts
|
|
5031
5049
|
var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "merged", "closed", "archived"];
|
|
5032
5050
|
var MOTHERSHIP_EVENT_TYPE = "multitask-event";
|
|
5033
|
-
var mothershipEventSchema =
|
|
5034
|
-
id:
|
|
5035
|
-
at:
|
|
5036
|
-
kind:
|
|
5037
|
-
agentId:
|
|
5038
|
-
agentName:
|
|
5039
|
-
summary:
|
|
5040
|
-
detail:
|
|
5051
|
+
var mothershipEventSchema = z19.object({
|
|
5052
|
+
id: z19.string(),
|
|
5053
|
+
at: z19.string(),
|
|
5054
|
+
kind: z19.enum(MOTHERSHIP_EVENT_KINDS),
|
|
5055
|
+
agentId: z19.string(),
|
|
5056
|
+
agentName: z19.string(),
|
|
5057
|
+
summary: z19.string(),
|
|
5058
|
+
detail: z19.string().optional(),
|
|
5041
5059
|
// Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
|
|
5042
|
-
noticed:
|
|
5060
|
+
noticed: z19.boolean().optional()
|
|
5043
5061
|
});
|
|
5044
5062
|
var TAG = "multitask_event";
|
|
5045
5063
|
var BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
|
|
@@ -5796,7 +5814,7 @@ function parseMcpToolName(name) {
|
|
|
5796
5814
|
}
|
|
5797
5815
|
|
|
5798
5816
|
// ../shared/src/learned-skills.ts
|
|
5799
|
-
import { z as
|
|
5817
|
+
import { z as z20 } from "zod";
|
|
5800
5818
|
|
|
5801
5819
|
// ../shared/src/frontmatter.ts
|
|
5802
5820
|
import { parse as parseYaml } from "yaml";
|
|
@@ -5819,20 +5837,20 @@ function parseFrontmatter(content) {
|
|
|
5819
5837
|
var LEARNED_SKILLS_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/learned-skills`;
|
|
5820
5838
|
var LEARNED_SKILLS_MANIFEST_PATH = `${LEARNED_SKILLS_ROOT}/manifest.json`;
|
|
5821
5839
|
var LEARNED_SKILL_DIR_PREFIX = "replicas-learned__";
|
|
5822
|
-
var learnedSkillsManifestSchema =
|
|
5823
|
-
skills:
|
|
5840
|
+
var learnedSkillsManifestSchema = z20.object({
|
|
5841
|
+
skills: z20.array(z20.object({ name: z20.string(), sha256: z20.string() }))
|
|
5824
5842
|
});
|
|
5825
|
-
var dreamVerdictChecksSchema =
|
|
5826
|
-
repeatable:
|
|
5827
|
-
realInstruction:
|
|
5828
|
-
noContradiction:
|
|
5829
|
-
formatExact:
|
|
5830
|
-
humanOnly:
|
|
5831
|
-
actionable:
|
|
5832
|
-
durable:
|
|
5843
|
+
var dreamVerdictChecksSchema = z20.object({
|
|
5844
|
+
repeatable: z20.boolean(),
|
|
5845
|
+
realInstruction: z20.boolean(),
|
|
5846
|
+
noContradiction: z20.boolean(),
|
|
5847
|
+
formatExact: z20.boolean(),
|
|
5848
|
+
humanOnly: z20.boolean(),
|
|
5849
|
+
actionable: z20.boolean(),
|
|
5850
|
+
durable: z20.boolean()
|
|
5833
5851
|
});
|
|
5834
5852
|
var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
|
|
5835
|
-
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve:
|
|
5853
|
+
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z20.boolean(), reason: z20.string() });
|
|
5836
5854
|
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."`;
|
|
5837
5855
|
|
|
5838
5856
|
// ../shared/src/user-message-matching.ts
|
|
@@ -9124,7 +9142,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
9124
9142
|
};
|
|
9125
9143
|
|
|
9126
9144
|
// ../shared/src/routes/command-protection.ts
|
|
9127
|
-
import { z as
|
|
9145
|
+
import { z as z21 } from "zod";
|
|
9128
9146
|
|
|
9129
9147
|
// ../shared/src/git-invocations.ts
|
|
9130
9148
|
var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
|
|
@@ -9215,27 +9233,27 @@ function findCheckoutTarget(args) {
|
|
|
9215
9233
|
}
|
|
9216
9234
|
|
|
9217
9235
|
// ../shared/src/routes/command-protection.ts
|
|
9218
|
-
var commandProtectionRepoStateSchema =
|
|
9219
|
-
branch:
|
|
9220
|
-
defaultBranch:
|
|
9221
|
-
pushBranch:
|
|
9222
|
-
pushConfig:
|
|
9223
|
-
headMessage:
|
|
9224
|
-
mergeInProgress:
|
|
9236
|
+
var commandProtectionRepoStateSchema = z21.object({
|
|
9237
|
+
branch: z21.string().nullable(),
|
|
9238
|
+
defaultBranch: z21.string().nullable(),
|
|
9239
|
+
pushBranch: z21.string().nullable(),
|
|
9240
|
+
pushConfig: z21.string().nullable(),
|
|
9241
|
+
headMessage: z21.string().nullable(),
|
|
9242
|
+
mergeInProgress: z21.boolean().optional()
|
|
9225
9243
|
});
|
|
9226
|
-
var commandProtectionEvaluateRequestSchema =
|
|
9227
|
-
provider:
|
|
9228
|
-
source:
|
|
9229
|
-
toolName:
|
|
9230
|
-
toolInput:
|
|
9231
|
-
command:
|
|
9232
|
-
cwd:
|
|
9233
|
-
toolUseId:
|
|
9244
|
+
var commandProtectionEvaluateRequestSchema = z21.object({
|
|
9245
|
+
provider: z21.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
9246
|
+
source: z21.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
9247
|
+
toolName: z21.string(),
|
|
9248
|
+
toolInput: z21.unknown(),
|
|
9249
|
+
command: z21.string().nullish(),
|
|
9250
|
+
cwd: z21.string().nullish(),
|
|
9251
|
+
toolUseId: z21.string().nullish(),
|
|
9234
9252
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
9235
9253
|
// policy can see branches and commit messages the command text only references.
|
|
9236
|
-
gitContext:
|
|
9237
|
-
repos:
|
|
9238
|
-
messageFiles:
|
|
9254
|
+
gitContext: z21.object({
|
|
9255
|
+
repos: z21.record(z21.string(), commandProtectionRepoStateSchema),
|
|
9256
|
+
messageFiles: z21.record(z21.string(), z21.string())
|
|
9239
9257
|
}).optional()
|
|
9240
9258
|
});
|
|
9241
9259
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -9432,113 +9450,113 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
9432
9450
|
}
|
|
9433
9451
|
|
|
9434
9452
|
// ../shared/src/routes/linear.ts
|
|
9435
|
-
import { z as
|
|
9436
|
-
var linearSessionMetadataSchema =
|
|
9437
|
-
via_mothership:
|
|
9438
|
-
issue_id:
|
|
9439
|
-
issue_identifier:
|
|
9440
|
-
issue_title:
|
|
9441
|
-
issue_description:
|
|
9442
|
-
issue_url:
|
|
9443
|
-
comment_id:
|
|
9444
|
-
comment_body:
|
|
9445
|
-
triggered_by_id:
|
|
9446
|
-
triggered_by_name:
|
|
9447
|
-
triggered_by_email:
|
|
9448
|
-
linear_workspace_id:
|
|
9449
|
-
creator_id:
|
|
9450
|
-
creator_name:
|
|
9451
|
-
creator_email:
|
|
9452
|
-
assignee_id:
|
|
9453
|
-
assignee_name:
|
|
9454
|
-
assignee_email:
|
|
9455
|
-
issue_state:
|
|
9456
|
-
parent_issue:
|
|
9457
|
-
id:
|
|
9458
|
-
identifier:
|
|
9459
|
-
title:
|
|
9460
|
-
description:
|
|
9453
|
+
import { z as z22 } from "zod";
|
|
9454
|
+
var linearSessionMetadataSchema = z22.object({
|
|
9455
|
+
via_mothership: z22.boolean().optional(),
|
|
9456
|
+
issue_id: z22.string(),
|
|
9457
|
+
issue_identifier: z22.string(),
|
|
9458
|
+
issue_title: z22.string(),
|
|
9459
|
+
issue_description: z22.string(),
|
|
9460
|
+
issue_url: z22.string(),
|
|
9461
|
+
comment_id: z22.string(),
|
|
9462
|
+
comment_body: z22.string(),
|
|
9463
|
+
triggered_by_id: z22.string().optional(),
|
|
9464
|
+
triggered_by_name: z22.string().optional(),
|
|
9465
|
+
triggered_by_email: z22.string().optional(),
|
|
9466
|
+
linear_workspace_id: z22.string().optional(),
|
|
9467
|
+
creator_id: z22.string().optional(),
|
|
9468
|
+
creator_name: z22.string().optional(),
|
|
9469
|
+
creator_email: z22.string().optional(),
|
|
9470
|
+
assignee_id: z22.string().optional(),
|
|
9471
|
+
assignee_name: z22.string().optional(),
|
|
9472
|
+
assignee_email: z22.string().optional(),
|
|
9473
|
+
issue_state: z22.string().optional(),
|
|
9474
|
+
parent_issue: z22.object({
|
|
9475
|
+
id: z22.string(),
|
|
9476
|
+
identifier: z22.string(),
|
|
9477
|
+
title: z22.string(),
|
|
9478
|
+
description: z22.string().nullable()
|
|
9461
9479
|
}).optional(),
|
|
9462
|
-
workspace:
|
|
9463
|
-
id:
|
|
9464
|
-
coding_agent:
|
|
9465
|
-
task_description:
|
|
9466
|
-
created_at:
|
|
9480
|
+
workspace: z22.object({
|
|
9481
|
+
id: z22.string(),
|
|
9482
|
+
coding_agent: z22.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
|
|
9483
|
+
task_description: z22.string(),
|
|
9484
|
+
created_at: z22.string()
|
|
9467
9485
|
}).optional()
|
|
9468
9486
|
});
|
|
9469
9487
|
|
|
9470
9488
|
// ../shared/src/routes/scout.ts
|
|
9471
|
-
import { z as
|
|
9489
|
+
import { z as z23 } from "zod";
|
|
9472
9490
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
9473
|
-
var scoutLinearSessionIntentRequestSchema =
|
|
9474
|
-
comment_id:
|
|
9475
|
-
action:
|
|
9491
|
+
var scoutLinearSessionIntentRequestSchema = z23.object({
|
|
9492
|
+
comment_id: z23.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
9493
|
+
action: z23.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
|
|
9476
9494
|
});
|
|
9477
|
-
var scoutLinearStartRequestSchema =
|
|
9478
|
-
issue_id:
|
|
9479
|
-
agent_session_id:
|
|
9480
|
-
prompt:
|
|
9495
|
+
var scoutLinearStartRequestSchema = z23.object({
|
|
9496
|
+
issue_id: z23.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
9497
|
+
agent_session_id: z23.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
9498
|
+
prompt: z23.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
|
|
9481
9499
|
});
|
|
9482
|
-
var slackChannelIdSchema =
|
|
9483
|
-
var slackThreadTsSchema =
|
|
9484
|
-
var scoutSlackSpawnRequestSchema =
|
|
9500
|
+
var slackChannelIdSchema = z23.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
9501
|
+
var slackThreadTsSchema = z23.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
9502
|
+
var scoutSlackSpawnRequestSchema = z23.object({
|
|
9485
9503
|
channel_id: slackChannelIdSchema,
|
|
9486
9504
|
thread_ts: slackThreadTsSchema,
|
|
9487
|
-
message_ts:
|
|
9488
|
-
user_id:
|
|
9489
|
-
prompt:
|
|
9490
|
-
acknowledgement_ts:
|
|
9491
|
-
environment_id:
|
|
9505
|
+
message_ts: z23.string().describe("Timestamp of the Slack message that asked for the work (the envelope's `message_ts`). The server verifies this message and its author."),
|
|
9506
|
+
user_id: z23.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
|
|
9507
|
+
prompt: z23.string().describe("The person's request in their own words, quoting earlier messages only when it points to them. The workspace already receives the Slack thread, so add no research, plan, or guesses."),
|
|
9508
|
+
acknowledgement_ts: z23.string().optional().describe("`ts` of the one-line reply you posted in this thread before spawning. The server appends the workspace link to it and tells the workspace not to acknowledge again."),
|
|
9509
|
+
environment_id: z23.string().optional().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`. Pass it only when clearly confident it fits; omit it to let routing choose. If routing cannot choose, the call fails and nothing is posted, so pick one or ask the person.`)
|
|
9492
9510
|
});
|
|
9493
9511
|
var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
|
|
9494
|
-
title:
|
|
9495
|
-
prompt:
|
|
9496
|
-
acknowledgement_ts:
|
|
9512
|
+
title: z23.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
|
|
9513
|
+
prompt: z23.string().describe("The person's request in their own words. The full source thread is attached as background, so add no summary, research, plan, or guesses."),
|
|
9514
|
+
acknowledgement_ts: z23.string().optional().describe("`ts` of the one-line reply you posted in this thread before spawning. The server appends the new thread's link to it.")
|
|
9497
9515
|
});
|
|
9498
|
-
var scoutSlackRelayRequestSchema =
|
|
9516
|
+
var scoutSlackRelayRequestSchema = z23.object({
|
|
9499
9517
|
channel_id: slackChannelIdSchema,
|
|
9500
9518
|
thread_ts: slackThreadTsSchema,
|
|
9501
|
-
message:
|
|
9502
|
-
user_id:
|
|
9503
|
-
queue:
|
|
9504
|
-
workspace_id:
|
|
9505
|
-
message_ts:
|
|
9519
|
+
message: z23.string().describe("The follow-up to deliver: every fresh message that belongs to this update, in its author's words, with no research, plan, or guesses added."),
|
|
9520
|
+
user_id: z23.string().optional().describe("Slack user id of the follow-up's author (the envelope's `user_id`), so it is attributed to them. Defaults to the thread's original requester. Required with `workspace_id`."),
|
|
9521
|
+
queue: z23.boolean().optional().describe("Set true only when the person explicitly asked for this to happen after the current task finishes. Delivers behind the active turn instead of interrupting it."),
|
|
9522
|
+
workspace_id: z23.string().optional().describe(`Existing workspace id, from \`${REPLICAS_MCP_TOOLS.listWorkspaces}\` or a workspace link in the thread, to bind a thread without a workspace to before relaying. The author must be able to see it. Omit to relay into the thread's own workspace.`),
|
|
9523
|
+
message_ts: z23.string().optional().describe("Timestamp of the Slack message that led to this relay (the envelope's `message_ts`). Required with `workspace_id`; the server verifies this message and its author.")
|
|
9506
9524
|
});
|
|
9507
|
-
var scoutSlackSetThreadMutedRequestSchema =
|
|
9525
|
+
var scoutSlackSetThreadMutedRequestSchema = z23.object({
|
|
9508
9526
|
channel_id: slackChannelIdSchema,
|
|
9509
9527
|
thread_ts: slackThreadTsSchema,
|
|
9510
|
-
muted:
|
|
9528
|
+
muted: z23.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
|
|
9511
9529
|
});
|
|
9512
|
-
var scoutListWorkspacesRequestSchema =
|
|
9530
|
+
var scoutListWorkspacesRequestSchema = z23.object({
|
|
9513
9531
|
channel_id: slackChannelIdSchema,
|
|
9514
9532
|
thread_ts: slackThreadTsSchema,
|
|
9515
|
-
message_ts:
|
|
9516
|
-
user_id:
|
|
9517
|
-
query:
|
|
9533
|
+
message_ts: z23.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
9534
|
+
user_id: z23.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
|
|
9535
|
+
query: z23.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace names and pull request URLs.")
|
|
9518
9536
|
});
|
|
9519
|
-
var scoutSlackConfirmationSchema =
|
|
9520
|
-
confirmation_channel_id:
|
|
9521
|
-
confirmation_thread_ts:
|
|
9522
|
-
confirmation_message_ts:
|
|
9523
|
-
confirmation_user_id:
|
|
9537
|
+
var scoutSlackConfirmationSchema = z23.object({
|
|
9538
|
+
confirmation_channel_id: z23.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
|
|
9539
|
+
confirmation_thread_ts: z23.string().describe("`thread_ts` from that message's envelope."),
|
|
9540
|
+
confirmation_message_ts: z23.string().describe("`message_ts` from that message's envelope."),
|
|
9541
|
+
confirmation_user_id: z23.string().describe("`user_id` from that message's envelope.")
|
|
9524
9542
|
});
|
|
9525
9543
|
var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
|
|
9526
9544
|
var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
9527
|
-
preset_id:
|
|
9528
|
-
name:
|
|
9529
|
-
description:
|
|
9530
|
-
icon:
|
|
9531
|
-
instructions:
|
|
9545
|
+
preset_id: z23.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
|
|
9546
|
+
name: z23.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
|
|
9547
|
+
description: z23.string().optional().describe("One-line summary shown in settings."),
|
|
9548
|
+
icon: z23.enum(SCOUT_PRESET_ICONS).optional(),
|
|
9549
|
+
instructions: z23.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
|
|
9532
9550
|
});
|
|
9533
9551
|
var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
9534
|
-
source:
|
|
9535
|
-
external_id:
|
|
9536
|
-
monitored:
|
|
9537
|
-
preset_id:
|
|
9538
|
-
instructions:
|
|
9552
|
+
source: z23.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
|
|
9553
|
+
external_id: z23.string().describe("Slack channel id or Linear team id."),
|
|
9554
|
+
monitored: z23.boolean().optional().describe("`false` stops Scout from handling the source: it excludes a Slack channel or stops monitoring a Linear team. `true` resumes a Slack channel or starts monitoring a Linear team, and only an organization admin can ask for that. Omit to keep it."),
|
|
9555
|
+
preset_id: z23.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
9556
|
+
instructions: z23.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them.")
|
|
9539
9557
|
});
|
|
9540
9558
|
var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
9541
|
-
preset_id:
|
|
9559
|
+
preset_id: z23.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
|
|
9542
9560
|
});
|
|
9543
9561
|
|
|
9544
9562
|
// ../shared/src/routes/plugin-catalog.ts
|
|
@@ -9916,83 +9934,83 @@ var workspaceMarkedUnreadClientStateKey = orgUserClientStateKey(WORKSPACE_MARKED
|
|
|
9916
9934
|
var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_STATE_KEY_PREFIX);
|
|
9917
9935
|
|
|
9918
9936
|
// ../shared/src/routes/workspace-events.ts
|
|
9919
|
-
import { z as
|
|
9937
|
+
import { z as z24 } from "zod";
|
|
9920
9938
|
|
|
9921
9939
|
// ../shared/src/workspace-attention.ts
|
|
9922
9940
|
var WORKSPACE_ATTENTION_REASONS = ["question", "blocked"];
|
|
9923
9941
|
|
|
9924
9942
|
// ../shared/src/routes/workspace-events.ts
|
|
9925
|
-
var workspaceChangedEventSchema =
|
|
9926
|
-
|
|
9927
|
-
type:
|
|
9928
|
-
workspaceId:
|
|
9929
|
-
workspace:
|
|
9930
|
-
completion:
|
|
9931
|
-
workspaceName:
|
|
9932
|
-
completedAt:
|
|
9933
|
-
processing:
|
|
9934
|
-
attention:
|
|
9943
|
+
var workspaceChangedEventSchema = z24.discriminatedUnion("type", [
|
|
9944
|
+
z24.object({
|
|
9945
|
+
type: z24.literal("workspace.changed"),
|
|
9946
|
+
workspaceId: z24.string(),
|
|
9947
|
+
workspace: z24.object({ status: z24.enum(WORKSPACE_STATUSES), last_activity_at: z24.string().nullable() }).optional(),
|
|
9948
|
+
completion: z24.object({
|
|
9949
|
+
workspaceName: z24.string(),
|
|
9950
|
+
completedAt: z24.string(),
|
|
9951
|
+
processing: z24.boolean().optional(),
|
|
9952
|
+
attention: z24.object({ reason: z24.enum(WORKSPACE_ATTENTION_REASONS), userId: z24.string() }).optional()
|
|
9935
9953
|
}).optional(),
|
|
9936
|
-
ts:
|
|
9954
|
+
ts: z24.string()
|
|
9937
9955
|
}),
|
|
9938
|
-
|
|
9939
|
-
type:
|
|
9940
|
-
workspaceId:
|
|
9941
|
-
chatId:
|
|
9942
|
-
ts:
|
|
9956
|
+
z24.object({
|
|
9957
|
+
type: z24.literal("workspace.chat.changed"),
|
|
9958
|
+
workspaceId: z24.string(),
|
|
9959
|
+
chatId: z24.string(),
|
|
9960
|
+
ts: z24.string()
|
|
9943
9961
|
}),
|
|
9944
|
-
|
|
9945
|
-
type:
|
|
9946
|
-
workspaceId:
|
|
9947
|
-
chatId:
|
|
9948
|
-
afterCursor:
|
|
9949
|
-
processing:
|
|
9950
|
-
ts:
|
|
9962
|
+
z24.object({
|
|
9963
|
+
type: z24.literal("workspace.chat.advanced"),
|
|
9964
|
+
workspaceId: z24.string(),
|
|
9965
|
+
chatId: z24.string(),
|
|
9966
|
+
afterCursor: z24.string().optional(),
|
|
9967
|
+
processing: z24.boolean(),
|
|
9968
|
+
ts: z24.string()
|
|
9951
9969
|
}),
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
type:
|
|
9955
|
-
workspaceId:
|
|
9956
|
-
ts:
|
|
9970
|
+
z24.object({ type: z24.literal("presence.changed"), ts: z24.string() }),
|
|
9971
|
+
z24.object({
|
|
9972
|
+
type: z24.literal("mobile-testing.changed"),
|
|
9973
|
+
workspaceId: z24.string(),
|
|
9974
|
+
ts: z24.string()
|
|
9957
9975
|
}),
|
|
9958
|
-
|
|
9959
|
-
type:
|
|
9960
|
-
workspaceId:
|
|
9961
|
-
ts:
|
|
9976
|
+
z24.object({
|
|
9977
|
+
type: z24.literal("variable-request.changed"),
|
|
9978
|
+
workspaceId: z24.string(),
|
|
9979
|
+
ts: z24.string()
|
|
9962
9980
|
}),
|
|
9963
|
-
|
|
9964
|
-
type:
|
|
9965
|
-
prUrl:
|
|
9966
|
-
ts:
|
|
9981
|
+
z24.object({
|
|
9982
|
+
type: z24.literal("pull-request.changed"),
|
|
9983
|
+
prUrl: z24.string(),
|
|
9984
|
+
ts: z24.string()
|
|
9967
9985
|
}),
|
|
9968
|
-
|
|
9969
|
-
type:
|
|
9970
|
-
workspaceId:
|
|
9971
|
-
subagent:
|
|
9972
|
-
ts:
|
|
9986
|
+
z24.object({
|
|
9987
|
+
type: z24.literal("mothership.subagent.changed"),
|
|
9988
|
+
workspaceId: z24.string(),
|
|
9989
|
+
subagent: z24.object({ id: z24.string(), name: z24.string(), prUrl: z24.string().nullable() }),
|
|
9990
|
+
ts: z24.string()
|
|
9973
9991
|
})
|
|
9974
9992
|
]);
|
|
9975
9993
|
|
|
9976
9994
|
// ../shared/src/routes/presence.ts
|
|
9977
|
-
import { z as
|
|
9978
|
-
var presenceStatusSchema =
|
|
9979
|
-
var presenceLocationSchema =
|
|
9980
|
-
workspaceId:
|
|
9995
|
+
import { z as z25 } from "zod";
|
|
9996
|
+
var presenceStatusSchema = z25.enum(["online", "typing"]);
|
|
9997
|
+
var presenceLocationSchema = z25.object({
|
|
9998
|
+
workspaceId: z25.string().optional()
|
|
9981
9999
|
});
|
|
9982
|
-
var presenceEntrySchema =
|
|
9983
|
-
userId:
|
|
10000
|
+
var presenceEntrySchema = z25.object({
|
|
10001
|
+
userId: z25.string(),
|
|
9984
10002
|
status: presenceStatusSchema,
|
|
9985
10003
|
location: presenceLocationSchema,
|
|
9986
|
-
ts:
|
|
10004
|
+
ts: z25.string()
|
|
9987
10005
|
});
|
|
9988
|
-
var updatePresenceRequestSchema =
|
|
10006
|
+
var updatePresenceRequestSchema = z25.object({
|
|
9989
10007
|
status: presenceStatusSchema,
|
|
9990
10008
|
location: presenceLocationSchema.optional()
|
|
9991
10009
|
});
|
|
9992
10010
|
|
|
9993
10011
|
// ../shared/src/routes/review-messages.ts
|
|
9994
|
-
import { z as
|
|
9995
|
-
var sendPullRequestReviewMessageRequestSchema =
|
|
10012
|
+
import { z as z26 } from "zod";
|
|
10013
|
+
var sendPullRequestReviewMessageRequestSchema = z26.object({
|
|
9996
10014
|
...sendChatMessageRequestSchema.pick({
|
|
9997
10015
|
message: true,
|
|
9998
10016
|
messageId: true,
|
|
@@ -10005,8 +10023,8 @@ var sendPullRequestReviewMessageRequestSchema = z25.object({
|
|
|
10005
10023
|
ultrafastMode: true
|
|
10006
10024
|
}).shape,
|
|
10007
10025
|
/** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
|
|
10008
|
-
newChat:
|
|
10009
|
-
provider:
|
|
10026
|
+
newChat: z26.boolean().optional(),
|
|
10027
|
+
provider: z26.enum(VALID_AGENT_PROVIDERS).optional()
|
|
10010
10028
|
});
|
|
10011
10029
|
|
|
10012
10030
|
// ../shared/src/audit-log.ts
|
|
@@ -10222,30 +10240,30 @@ function isSkillRegistryManifest(value) {
|
|
|
10222
10240
|
}
|
|
10223
10241
|
|
|
10224
10242
|
// ../shared/src/routes/variable-requests.ts
|
|
10225
|
-
import { z as
|
|
10243
|
+
import { z as z27 } from "zod";
|
|
10226
10244
|
var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
|
|
10227
10245
|
var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
|
|
10228
|
-
var requestedVariableSchema =
|
|
10229
|
-
key:
|
|
10230
|
-
required:
|
|
10231
|
-
replace:
|
|
10246
|
+
var requestedVariableSchema = z27.object({
|
|
10247
|
+
key: z27.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
|
|
10248
|
+
required: z27.boolean(),
|
|
10249
|
+
replace: z27.boolean().optional()
|
|
10232
10250
|
});
|
|
10233
|
-
var requestedVariablesSchema =
|
|
10234
|
-
var createVariableRequestSchema =
|
|
10251
|
+
var requestedVariablesSchema = z27.array(requestedVariableSchema).min(1, "must not be empty").max(ENVIRONMENT_SETUP_LIMITS.variables).refine((variables) => new Set(variables.map((variable) => variable.key)).size === variables.length, "must have unique keys");
|
|
10252
|
+
var createVariableRequestSchema = z27.object({
|
|
10235
10253
|
variables: requestedVariablesSchema,
|
|
10236
|
-
reason:
|
|
10237
|
-
wait:
|
|
10254
|
+
reason: z27.string().trim().max(500).nullish().transform((value) => value || null),
|
|
10255
|
+
wait: z27.boolean().default(true)
|
|
10238
10256
|
});
|
|
10239
|
-
var respondVariableRequestSchema =
|
|
10240
|
-
|
|
10241
|
-
action:
|
|
10242
|
-
destination:
|
|
10257
|
+
var respondVariableRequestSchema = z27.discriminatedUnion("action", [
|
|
10258
|
+
z27.object({
|
|
10259
|
+
action: z27.literal("provide"),
|
|
10260
|
+
destination: z27.enum(VARIABLE_REQUEST_DESTINATIONS),
|
|
10243
10261
|
/** Defaults to the workspace's environment, so older clients keep saving there. */
|
|
10244
|
-
environment_ids:
|
|
10245
|
-
overwrite:
|
|
10246
|
-
values:
|
|
10262
|
+
environment_ids: z27.array(z27.string().uuid()).optional(),
|
|
10263
|
+
overwrite: z27.boolean().optional(),
|
|
10264
|
+
values: z27.record(z27.string().regex(VARIABLE_KEY_RE), z27.string())
|
|
10247
10265
|
}),
|
|
10248
|
-
|
|
10266
|
+
z27.object({ action: z27.literal("skip") })
|
|
10249
10267
|
]);
|
|
10250
10268
|
|
|
10251
10269
|
export {
|
|
@@ -10403,6 +10421,8 @@ export {
|
|
|
10403
10421
|
workspaceTokenResponseSchema,
|
|
10404
10422
|
legacyWorkspaceTokenBundleSchema,
|
|
10405
10423
|
engineMcpOAuthTokenResponseSchema,
|
|
10424
|
+
SUBAGENT_SERVICE_TIERS,
|
|
10425
|
+
serviceTierRequestFields,
|
|
10406
10426
|
TERMINAL_RTC_ICE_SERVER,
|
|
10407
10427
|
HISTORY_ROOT,
|
|
10408
10428
|
HISTORY_INDEX_FILENAME,
|