replicas-engine 0.1.1243 → 0.1.1244
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-3QBTHLYA.js} +5 -5
- package/dist/src/{chunk-4UMPF6MZ.js → chunk-3VZEWLC4.js} +2 -2
- package/dist/src/{chunk-MMIG2PXJ.js → chunk-5HXCXUAQ.js} +1 -1
- package/dist/src/{chunk-CAX6F5FB.js → chunk-5XM7CFGT.js} +3 -3
- package/dist/src/{chunk-K6LHHTEJ.js → chunk-D3LFCDCW.js} +1 -1
- package/dist/src/{chunk-PR5MCOTJ.js → chunk-I27O3MHS.js} +2 -2
- package/dist/src/{chunk-Z2MHQL4K.js → chunk-OAB342UB.js} +2 -2
- package/dist/src/{chunk-C5KURRLK.js → chunk-RI5L7T76.js} +6 -6
- package/dist/src/{chunk-MSM5OSLN.js → chunk-XQ5WSXBS.js} +372 -355
- 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
|
|
|
@@ -2775,7 +2790,7 @@ var DOCKER_ABILITY = {
|
|
|
2775
2790
|
};
|
|
2776
2791
|
|
|
2777
2792
|
// ../shared/src/routes/environment-setups.ts
|
|
2778
|
-
import { z as
|
|
2793
|
+
import { z as z17 } from "zod";
|
|
2779
2794
|
var ENVIRONMENT_SETUP_STEPS = [
|
|
2780
2795
|
{ key: "understand", label: "Understand the codebase" },
|
|
2781
2796
|
{ key: "install", label: "Install dependencies and run the app" },
|
|
@@ -2808,17 +2823,17 @@ var ENVIRONMENT_SETUP_LIMITS = {
|
|
|
2808
2823
|
repositories: 20
|
|
2809
2824
|
};
|
|
2810
2825
|
var VARIABLE_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2811
|
-
var text2 = (max) => max === void 0 ?
|
|
2826
|
+
var text2 = (max) => max === void 0 ? z17.string().trim() : z17.string().trim().max(max);
|
|
2812
2827
|
var requiredText = (max) => text2(max).min(1, "must not be empty");
|
|
2813
2828
|
var optionalText2 = (max) => text2(max).nullish().transform((value) => value || null);
|
|
2814
2829
|
var clearableText = (max) => text2(max).nullish().transform((value) => value === void 0 ? void 0 : value || null);
|
|
2815
|
-
var list = (item, max) => max === void 0 ?
|
|
2830
|
+
var list = (item, max) => max === void 0 ? z17.array(item) : z17.array(item).max(max);
|
|
2816
2831
|
var ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES = ["cron", "github", "gitlab"];
|
|
2817
2832
|
function isEnvironmentSetupAuthoredTriggerType(type) {
|
|
2818
2833
|
return ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES.some((authored) => authored === type);
|
|
2819
2834
|
}
|
|
2820
|
-
var proposalTriggerSchema =
|
|
2821
|
-
var existingTriggerSchema =
|
|
2835
|
+
var proposalTriggerSchema = z17.discriminatedUnion("type", [cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema]);
|
|
2836
|
+
var existingTriggerSchema = z17.custom(
|
|
2822
2837
|
(value) => isRecord(value) && typeof value.type === "string" && isRecord(value.config),
|
|
2823
2838
|
"must be an automation trigger"
|
|
2824
2839
|
);
|
|
@@ -2826,17 +2841,17 @@ var carriedTriggerSchema = existingTriggerSchema.refine(
|
|
|
2826
2841
|
(trigger) => !isEnvironmentSetupAuthoredTriggerType(trigger.type)
|
|
2827
2842
|
);
|
|
2828
2843
|
function automationSchema(limits) {
|
|
2829
|
-
const authored =
|
|
2844
|
+
const authored = z17.object({
|
|
2830
2845
|
name: text2(limits.nameChars),
|
|
2831
2846
|
description: text2(limits.descriptionChars),
|
|
2832
2847
|
prompt: text2(limits.automationPromptChars),
|
|
2833
2848
|
triggers: list(proposalTriggerSchema, limits.automationTriggers)
|
|
2834
2849
|
});
|
|
2835
|
-
const updated = authored.extend({ triggers: list(
|
|
2836
|
-
return
|
|
2850
|
+
const updated = authored.extend({ triggers: list(z17.union([proposalTriggerSchema, carriedTriggerSchema]), limits.automationTriggers) });
|
|
2851
|
+
return z17.object({
|
|
2837
2852
|
key: requiredText(limits.automationKeyChars),
|
|
2838
|
-
action:
|
|
2839
|
-
automation_id:
|
|
2853
|
+
action: z17.enum(ENVIRONMENT_SETUP_AUTOMATION_ACTIONS).default("create"),
|
|
2854
|
+
automation_id: z17.string().regex(UUID_RE, "must be an automation id").nullable().default(null),
|
|
2840
2855
|
name: text2().default(""),
|
|
2841
2856
|
description: optionalText2().transform((value) => value ?? ""),
|
|
2842
2857
|
prompt: text2().default(""),
|
|
@@ -2859,7 +2874,7 @@ function automationSchema(limits) {
|
|
|
2859
2874
|
const content = (automation.action === "update" ? updated : authored).safeParse(automation);
|
|
2860
2875
|
if (content.success) return { ...automation, ...content.data };
|
|
2861
2876
|
for (const issue of content.error.issues) ctx.addIssue({ ...issue, code: "custom" });
|
|
2862
|
-
return
|
|
2877
|
+
return z17.NEVER;
|
|
2863
2878
|
});
|
|
2864
2879
|
}
|
|
2865
2880
|
function automationListSchema(limits) {
|
|
@@ -2877,7 +2892,7 @@ function automationListSchema(limits) {
|
|
|
2877
2892
|
});
|
|
2878
2893
|
}
|
|
2879
2894
|
function environmentSchema(limits) {
|
|
2880
|
-
return
|
|
2895
|
+
return z17.object({
|
|
2881
2896
|
name: optionalText2(limits.nameChars).transform((value) => value ?? void 0),
|
|
2882
2897
|
description: clearableText(limits.descriptionChars),
|
|
2883
2898
|
system_prompt: clearableText(limits.systemPromptChars),
|
|
@@ -2886,41 +2901,41 @@ function environmentSchema(limits) {
|
|
|
2886
2901
|
});
|
|
2887
2902
|
}
|
|
2888
2903
|
function proposalSchema(limits) {
|
|
2889
|
-
return
|
|
2904
|
+
return z17.object({
|
|
2890
2905
|
summary: requiredText(limits.summaryChars),
|
|
2891
2906
|
stack: list(text2(), limits.stackItems).default([]).transform((items) => items.filter(Boolean)),
|
|
2892
2907
|
environment: environmentSchema(limits),
|
|
2893
|
-
variables: list(
|
|
2894
|
-
key:
|
|
2908
|
+
variables: list(z17.object({
|
|
2909
|
+
key: z17.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
|
|
2895
2910
|
description: optionalText2(limits.variableDescriptionChars).transform((value) => value ?? ""),
|
|
2896
|
-
required:
|
|
2911
|
+
required: z17.boolean().default(false)
|
|
2897
2912
|
}), limits.variables).default([]),
|
|
2898
2913
|
automations: automationListSchema(limits),
|
|
2899
|
-
verification: list(
|
|
2914
|
+
verification: list(z17.object({
|
|
2900
2915
|
label: requiredText(limits.nameChars),
|
|
2901
|
-
status:
|
|
2916
|
+
status: z17.enum(ENVIRONMENT_SETUP_VERIFICATION_STATUSES),
|
|
2902
2917
|
detail: optionalText2(limits.verificationDetailChars).transform((value) => value ?? void 0)
|
|
2903
2918
|
}), limits.verificationItems).default([]),
|
|
2904
|
-
media: list(
|
|
2905
|
-
media_id:
|
|
2919
|
+
media: list(z17.object({
|
|
2920
|
+
media_id: z17.string().regex(UUID_RE, "must be a media id"),
|
|
2906
2921
|
title: requiredText(limits.nameChars)
|
|
2907
2922
|
}), limits.mediaItems).default([])
|
|
2908
2923
|
});
|
|
2909
2924
|
}
|
|
2910
2925
|
var environmentSetupProposalSchema = proposalSchema({});
|
|
2911
2926
|
var environmentSetupProposalSubmissionSchema = proposalSchema(ENVIRONMENT_SETUP_LIMITS);
|
|
2912
|
-
var environmentSetupRunStateSchema =
|
|
2913
|
-
status:
|
|
2914
|
-
steps:
|
|
2927
|
+
var environmentSetupRunStateSchema = z17.object({
|
|
2928
|
+
status: z17.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
|
|
2929
|
+
steps: z17.partialRecord(z17.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z17.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
|
|
2915
2930
|
proposal: environmentSetupProposalSchema.nullable().default(null),
|
|
2916
|
-
applied:
|
|
2917
|
-
applied_at:
|
|
2918
|
-
automation_ids:
|
|
2931
|
+
applied: z17.object({
|
|
2932
|
+
applied_at: z17.string(),
|
|
2933
|
+
automation_ids: z17.array(z17.string())
|
|
2919
2934
|
}).nullable().default(null)
|
|
2920
2935
|
});
|
|
2921
|
-
var applyEnvironmentSetupRequestSchema =
|
|
2936
|
+
var applyEnvironmentSetupRequestSchema = z17.object({
|
|
2922
2937
|
environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
|
|
2923
|
-
variables: list(
|
|
2938
|
+
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
2939
|
automations: automationListSchema(ENVIRONMENT_SETUP_LIMITS)
|
|
2925
2940
|
});
|
|
2926
2941
|
|
|
@@ -3373,7 +3388,7 @@ var GITLAB_ABILITY = {
|
|
|
3373
3388
|
};
|
|
3374
3389
|
|
|
3375
3390
|
// ../shared/src/routes/compute.ts
|
|
3376
|
-
import { z as
|
|
3391
|
+
import { z as z18 } from "zod";
|
|
3377
3392
|
var COMPUTE_SANDBOX_KINDS = ["gpu"];
|
|
3378
3393
|
var GPU_TYPES = ["T4", "L4", "A10G", "L40S", "A100", "A100-80GB", "H100", "H200", "B200"];
|
|
3379
3394
|
var DEFAULT_GPU_TYPE = "L4";
|
|
@@ -3390,27 +3405,27 @@ var COMPUTE_SANDBOX_LIMITS = {
|
|
|
3390
3405
|
maxIdleTimeoutMinutes: 60,
|
|
3391
3406
|
maxTransferBytes: 1024 ** 3
|
|
3392
3407
|
};
|
|
3393
|
-
var computeEnvSchema =
|
|
3394
|
-
var createComputeSandboxRequestSchema =
|
|
3395
|
-
kind:
|
|
3396
|
-
gpu:
|
|
3397
|
-
image:
|
|
3398
|
-
timeoutMinutes:
|
|
3399
|
-
idleTimeoutMinutes:
|
|
3400
|
-
ports:
|
|
3408
|
+
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");
|
|
3409
|
+
var createComputeSandboxRequestSchema = z18.object({
|
|
3410
|
+
kind: z18.enum(COMPUTE_SANDBOX_KINDS),
|
|
3411
|
+
gpu: z18.string().trim().optional(),
|
|
3412
|
+
image: z18.string().trim().min(1).max(256).regex(/^\S+$/, "Image must not contain whitespace").optional(),
|
|
3413
|
+
timeoutMinutes: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTimeoutMinutes).optional(),
|
|
3414
|
+
idleTimeoutMinutes: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxIdleTimeoutMinutes).optional(),
|
|
3415
|
+
ports: z18.array(z18.number().int().min(1).max(65535)).max(COMPUTE_SANDBOX_LIMITS.maxPorts).optional(),
|
|
3401
3416
|
env: computeEnvSchema.optional()
|
|
3402
3417
|
});
|
|
3403
|
-
var computeExecRequestSchema =
|
|
3404
|
-
command:
|
|
3405
|
-
workdir:
|
|
3418
|
+
var computeExecRequestSchema = z18.object({
|
|
3419
|
+
command: z18.string().min(1).max(1e5),
|
|
3420
|
+
workdir: z18.string().min(1).max(4096).optional(),
|
|
3406
3421
|
env: computeEnvSchema.optional(),
|
|
3407
|
-
detach:
|
|
3422
|
+
detach: z18.boolean().optional()
|
|
3408
3423
|
});
|
|
3409
|
-
var computeUploadRequestSchema =
|
|
3410
|
-
size:
|
|
3424
|
+
var computeUploadRequestSchema = z18.object({
|
|
3425
|
+
size: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
|
|
3411
3426
|
});
|
|
3412
|
-
var computeTransferPathSchema =
|
|
3413
|
-
path:
|
|
3427
|
+
var computeTransferPathSchema = z18.object({
|
|
3428
|
+
path: z18.string().min(1).max(4096).optional()
|
|
3414
3429
|
});
|
|
3415
3430
|
|
|
3416
3431
|
// ../shared/src/default-skills/replicas-agent/abilities/gpu.ts
|
|
@@ -5030,16 +5045,16 @@ function splitMothershipInstructions(customInstructions) {
|
|
|
5030
5045
|
// ../shared/src/mothership-events.ts
|
|
5031
5046
|
var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "merged", "closed", "archived"];
|
|
5032
5047
|
var MOTHERSHIP_EVENT_TYPE = "multitask-event";
|
|
5033
|
-
var mothershipEventSchema =
|
|
5034
|
-
id:
|
|
5035
|
-
at:
|
|
5036
|
-
kind:
|
|
5037
|
-
agentId:
|
|
5038
|
-
agentName:
|
|
5039
|
-
summary:
|
|
5040
|
-
detail:
|
|
5048
|
+
var mothershipEventSchema = z19.object({
|
|
5049
|
+
id: z19.string(),
|
|
5050
|
+
at: z19.string(),
|
|
5051
|
+
kind: z19.enum(MOTHERSHIP_EVENT_KINDS),
|
|
5052
|
+
agentId: z19.string(),
|
|
5053
|
+
agentName: z19.string(),
|
|
5054
|
+
summary: z19.string(),
|
|
5055
|
+
detail: z19.string().optional(),
|
|
5041
5056
|
// Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
|
|
5042
|
-
noticed:
|
|
5057
|
+
noticed: z19.boolean().optional()
|
|
5043
5058
|
});
|
|
5044
5059
|
var TAG = "multitask_event";
|
|
5045
5060
|
var BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
|
|
@@ -5796,7 +5811,7 @@ function parseMcpToolName(name) {
|
|
|
5796
5811
|
}
|
|
5797
5812
|
|
|
5798
5813
|
// ../shared/src/learned-skills.ts
|
|
5799
|
-
import { z as
|
|
5814
|
+
import { z as z20 } from "zod";
|
|
5800
5815
|
|
|
5801
5816
|
// ../shared/src/frontmatter.ts
|
|
5802
5817
|
import { parse as parseYaml } from "yaml";
|
|
@@ -5819,20 +5834,20 @@ function parseFrontmatter(content) {
|
|
|
5819
5834
|
var LEARNED_SKILLS_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/learned-skills`;
|
|
5820
5835
|
var LEARNED_SKILLS_MANIFEST_PATH = `${LEARNED_SKILLS_ROOT}/manifest.json`;
|
|
5821
5836
|
var LEARNED_SKILL_DIR_PREFIX = "replicas-learned__";
|
|
5822
|
-
var learnedSkillsManifestSchema =
|
|
5823
|
-
skills:
|
|
5837
|
+
var learnedSkillsManifestSchema = z20.object({
|
|
5838
|
+
skills: z20.array(z20.object({ name: z20.string(), sha256: z20.string() }))
|
|
5824
5839
|
});
|
|
5825
|
-
var dreamVerdictChecksSchema =
|
|
5826
|
-
repeatable:
|
|
5827
|
-
realInstruction:
|
|
5828
|
-
noContradiction:
|
|
5829
|
-
formatExact:
|
|
5830
|
-
humanOnly:
|
|
5831
|
-
actionable:
|
|
5832
|
-
durable:
|
|
5840
|
+
var dreamVerdictChecksSchema = z20.object({
|
|
5841
|
+
repeatable: z20.boolean(),
|
|
5842
|
+
realInstruction: z20.boolean(),
|
|
5843
|
+
noContradiction: z20.boolean(),
|
|
5844
|
+
formatExact: z20.boolean(),
|
|
5845
|
+
humanOnly: z20.boolean(),
|
|
5846
|
+
actionable: z20.boolean(),
|
|
5847
|
+
durable: z20.boolean()
|
|
5833
5848
|
});
|
|
5834
5849
|
var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
|
|
5835
|
-
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve:
|
|
5850
|
+
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z20.boolean(), reason: z20.string() });
|
|
5836
5851
|
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
5852
|
|
|
5838
5853
|
// ../shared/src/user-message-matching.ts
|
|
@@ -9124,7 +9139,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
9124
9139
|
};
|
|
9125
9140
|
|
|
9126
9141
|
// ../shared/src/routes/command-protection.ts
|
|
9127
|
-
import { z as
|
|
9142
|
+
import { z as z21 } from "zod";
|
|
9128
9143
|
|
|
9129
9144
|
// ../shared/src/git-invocations.ts
|
|
9130
9145
|
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 +9230,27 @@ function findCheckoutTarget(args) {
|
|
|
9215
9230
|
}
|
|
9216
9231
|
|
|
9217
9232
|
// ../shared/src/routes/command-protection.ts
|
|
9218
|
-
var commandProtectionRepoStateSchema =
|
|
9219
|
-
branch:
|
|
9220
|
-
defaultBranch:
|
|
9221
|
-
pushBranch:
|
|
9222
|
-
pushConfig:
|
|
9223
|
-
headMessage:
|
|
9224
|
-
mergeInProgress:
|
|
9233
|
+
var commandProtectionRepoStateSchema = z21.object({
|
|
9234
|
+
branch: z21.string().nullable(),
|
|
9235
|
+
defaultBranch: z21.string().nullable(),
|
|
9236
|
+
pushBranch: z21.string().nullable(),
|
|
9237
|
+
pushConfig: z21.string().nullable(),
|
|
9238
|
+
headMessage: z21.string().nullable(),
|
|
9239
|
+
mergeInProgress: z21.boolean().optional()
|
|
9225
9240
|
});
|
|
9226
|
-
var commandProtectionEvaluateRequestSchema =
|
|
9227
|
-
provider:
|
|
9228
|
-
source:
|
|
9229
|
-
toolName:
|
|
9230
|
-
toolInput:
|
|
9231
|
-
command:
|
|
9232
|
-
cwd:
|
|
9233
|
-
toolUseId:
|
|
9241
|
+
var commandProtectionEvaluateRequestSchema = z21.object({
|
|
9242
|
+
provider: z21.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
9243
|
+
source: z21.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
9244
|
+
toolName: z21.string(),
|
|
9245
|
+
toolInput: z21.unknown(),
|
|
9246
|
+
command: z21.string().nullish(),
|
|
9247
|
+
cwd: z21.string().nullish(),
|
|
9248
|
+
toolUseId: z21.string().nullish(),
|
|
9234
9249
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
9235
9250
|
// policy can see branches and commit messages the command text only references.
|
|
9236
|
-
gitContext:
|
|
9237
|
-
repos:
|
|
9238
|
-
messageFiles:
|
|
9251
|
+
gitContext: z21.object({
|
|
9252
|
+
repos: z21.record(z21.string(), commandProtectionRepoStateSchema),
|
|
9253
|
+
messageFiles: z21.record(z21.string(), z21.string())
|
|
9239
9254
|
}).optional()
|
|
9240
9255
|
});
|
|
9241
9256
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -9432,113 +9447,113 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
9432
9447
|
}
|
|
9433
9448
|
|
|
9434
9449
|
// ../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:
|
|
9450
|
+
import { z as z22 } from "zod";
|
|
9451
|
+
var linearSessionMetadataSchema = z22.object({
|
|
9452
|
+
via_mothership: z22.boolean().optional(),
|
|
9453
|
+
issue_id: z22.string(),
|
|
9454
|
+
issue_identifier: z22.string(),
|
|
9455
|
+
issue_title: z22.string(),
|
|
9456
|
+
issue_description: z22.string(),
|
|
9457
|
+
issue_url: z22.string(),
|
|
9458
|
+
comment_id: z22.string(),
|
|
9459
|
+
comment_body: z22.string(),
|
|
9460
|
+
triggered_by_id: z22.string().optional(),
|
|
9461
|
+
triggered_by_name: z22.string().optional(),
|
|
9462
|
+
triggered_by_email: z22.string().optional(),
|
|
9463
|
+
linear_workspace_id: z22.string().optional(),
|
|
9464
|
+
creator_id: z22.string().optional(),
|
|
9465
|
+
creator_name: z22.string().optional(),
|
|
9466
|
+
creator_email: z22.string().optional(),
|
|
9467
|
+
assignee_id: z22.string().optional(),
|
|
9468
|
+
assignee_name: z22.string().optional(),
|
|
9469
|
+
assignee_email: z22.string().optional(),
|
|
9470
|
+
issue_state: z22.string().optional(),
|
|
9471
|
+
parent_issue: z22.object({
|
|
9472
|
+
id: z22.string(),
|
|
9473
|
+
identifier: z22.string(),
|
|
9474
|
+
title: z22.string(),
|
|
9475
|
+
description: z22.string().nullable()
|
|
9461
9476
|
}).optional(),
|
|
9462
|
-
workspace:
|
|
9463
|
-
id:
|
|
9464
|
-
coding_agent:
|
|
9465
|
-
task_description:
|
|
9466
|
-
created_at:
|
|
9477
|
+
workspace: z22.object({
|
|
9478
|
+
id: z22.string(),
|
|
9479
|
+
coding_agent: z22.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
|
|
9480
|
+
task_description: z22.string(),
|
|
9481
|
+
created_at: z22.string()
|
|
9467
9482
|
}).optional()
|
|
9468
9483
|
});
|
|
9469
9484
|
|
|
9470
9485
|
// ../shared/src/routes/scout.ts
|
|
9471
|
-
import { z as
|
|
9486
|
+
import { z as z23 } from "zod";
|
|
9472
9487
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
9473
|
-
var scoutLinearSessionIntentRequestSchema =
|
|
9474
|
-
comment_id:
|
|
9475
|
-
action:
|
|
9488
|
+
var scoutLinearSessionIntentRequestSchema = z23.object({
|
|
9489
|
+
comment_id: z23.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
9490
|
+
action: z23.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
|
|
9476
9491
|
});
|
|
9477
|
-
var scoutLinearStartRequestSchema =
|
|
9478
|
-
issue_id:
|
|
9479
|
-
agent_session_id:
|
|
9480
|
-
prompt:
|
|
9492
|
+
var scoutLinearStartRequestSchema = z23.object({
|
|
9493
|
+
issue_id: z23.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
9494
|
+
agent_session_id: z23.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
9495
|
+
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
9496
|
});
|
|
9482
|
-
var slackChannelIdSchema =
|
|
9483
|
-
var slackThreadTsSchema =
|
|
9484
|
-
var scoutSlackSpawnRequestSchema =
|
|
9497
|
+
var slackChannelIdSchema = z23.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
9498
|
+
var slackThreadTsSchema = z23.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
9499
|
+
var scoutSlackSpawnRequestSchema = z23.object({
|
|
9485
9500
|
channel_id: slackChannelIdSchema,
|
|
9486
9501
|
thread_ts: slackThreadTsSchema,
|
|
9487
|
-
message_ts:
|
|
9488
|
-
user_id:
|
|
9489
|
-
prompt:
|
|
9490
|
-
acknowledgement_ts:
|
|
9491
|
-
environment_id:
|
|
9502
|
+
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."),
|
|
9503
|
+
user_id: z23.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
|
|
9504
|
+
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."),
|
|
9505
|
+
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."),
|
|
9506
|
+
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
9507
|
});
|
|
9493
9508
|
var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
|
|
9494
|
-
title:
|
|
9495
|
-
prompt:
|
|
9496
|
-
acknowledgement_ts:
|
|
9509
|
+
title: z23.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
|
|
9510
|
+
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."),
|
|
9511
|
+
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
9512
|
});
|
|
9498
|
-
var scoutSlackRelayRequestSchema =
|
|
9513
|
+
var scoutSlackRelayRequestSchema = z23.object({
|
|
9499
9514
|
channel_id: slackChannelIdSchema,
|
|
9500
9515
|
thread_ts: slackThreadTsSchema,
|
|
9501
|
-
message:
|
|
9502
|
-
user_id:
|
|
9503
|
-
queue:
|
|
9504
|
-
workspace_id:
|
|
9505
|
-
message_ts:
|
|
9516
|
+
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."),
|
|
9517
|
+
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`."),
|
|
9518
|
+
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."),
|
|
9519
|
+
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.`),
|
|
9520
|
+
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
9521
|
});
|
|
9507
|
-
var scoutSlackSetThreadMutedRequestSchema =
|
|
9522
|
+
var scoutSlackSetThreadMutedRequestSchema = z23.object({
|
|
9508
9523
|
channel_id: slackChannelIdSchema,
|
|
9509
9524
|
thread_ts: slackThreadTsSchema,
|
|
9510
|
-
muted:
|
|
9525
|
+
muted: z23.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
|
|
9511
9526
|
});
|
|
9512
|
-
var scoutListWorkspacesRequestSchema =
|
|
9527
|
+
var scoutListWorkspacesRequestSchema = z23.object({
|
|
9513
9528
|
channel_id: slackChannelIdSchema,
|
|
9514
9529
|
thread_ts: slackThreadTsSchema,
|
|
9515
|
-
message_ts:
|
|
9516
|
-
user_id:
|
|
9517
|
-
query:
|
|
9530
|
+
message_ts: z23.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
9531
|
+
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."),
|
|
9532
|
+
query: z23.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace names and pull request URLs.")
|
|
9518
9533
|
});
|
|
9519
|
-
var scoutSlackConfirmationSchema =
|
|
9520
|
-
confirmation_channel_id:
|
|
9521
|
-
confirmation_thread_ts:
|
|
9522
|
-
confirmation_message_ts:
|
|
9523
|
-
confirmation_user_id:
|
|
9534
|
+
var scoutSlackConfirmationSchema = z23.object({
|
|
9535
|
+
confirmation_channel_id: z23.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
|
|
9536
|
+
confirmation_thread_ts: z23.string().describe("`thread_ts` from that message's envelope."),
|
|
9537
|
+
confirmation_message_ts: z23.string().describe("`message_ts` from that message's envelope."),
|
|
9538
|
+
confirmation_user_id: z23.string().describe("`user_id` from that message's envelope.")
|
|
9524
9539
|
});
|
|
9525
9540
|
var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
|
|
9526
9541
|
var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
9527
|
-
preset_id:
|
|
9528
|
-
name:
|
|
9529
|
-
description:
|
|
9530
|
-
icon:
|
|
9531
|
-
instructions:
|
|
9542
|
+
preset_id: z23.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
|
|
9543
|
+
name: z23.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
|
|
9544
|
+
description: z23.string().optional().describe("One-line summary shown in settings."),
|
|
9545
|
+
icon: z23.enum(SCOUT_PRESET_ICONS).optional(),
|
|
9546
|
+
instructions: z23.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
|
|
9532
9547
|
});
|
|
9533
9548
|
var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
9534
|
-
source:
|
|
9535
|
-
external_id:
|
|
9536
|
-
monitored:
|
|
9537
|
-
preset_id:
|
|
9538
|
-
instructions:
|
|
9549
|
+
source: z23.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
|
|
9550
|
+
external_id: z23.string().describe("Slack channel id or Linear team id."),
|
|
9551
|
+
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."),
|
|
9552
|
+
preset_id: z23.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
9553
|
+
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
9554
|
});
|
|
9540
9555
|
var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
9541
|
-
preset_id:
|
|
9556
|
+
preset_id: z23.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
|
|
9542
9557
|
});
|
|
9543
9558
|
|
|
9544
9559
|
// ../shared/src/routes/plugin-catalog.ts
|
|
@@ -9916,83 +9931,83 @@ var workspaceMarkedUnreadClientStateKey = orgUserClientStateKey(WORKSPACE_MARKED
|
|
|
9916
9931
|
var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_STATE_KEY_PREFIX);
|
|
9917
9932
|
|
|
9918
9933
|
// ../shared/src/routes/workspace-events.ts
|
|
9919
|
-
import { z as
|
|
9934
|
+
import { z as z24 } from "zod";
|
|
9920
9935
|
|
|
9921
9936
|
// ../shared/src/workspace-attention.ts
|
|
9922
9937
|
var WORKSPACE_ATTENTION_REASONS = ["question", "blocked"];
|
|
9923
9938
|
|
|
9924
9939
|
// ../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:
|
|
9940
|
+
var workspaceChangedEventSchema = z24.discriminatedUnion("type", [
|
|
9941
|
+
z24.object({
|
|
9942
|
+
type: z24.literal("workspace.changed"),
|
|
9943
|
+
workspaceId: z24.string(),
|
|
9944
|
+
workspace: z24.object({ status: z24.enum(WORKSPACE_STATUSES), last_activity_at: z24.string().nullable() }).optional(),
|
|
9945
|
+
completion: z24.object({
|
|
9946
|
+
workspaceName: z24.string(),
|
|
9947
|
+
completedAt: z24.string(),
|
|
9948
|
+
processing: z24.boolean().optional(),
|
|
9949
|
+
attention: z24.object({ reason: z24.enum(WORKSPACE_ATTENTION_REASONS), userId: z24.string() }).optional()
|
|
9935
9950
|
}).optional(),
|
|
9936
|
-
ts:
|
|
9951
|
+
ts: z24.string()
|
|
9937
9952
|
}),
|
|
9938
|
-
|
|
9939
|
-
type:
|
|
9940
|
-
workspaceId:
|
|
9941
|
-
chatId:
|
|
9942
|
-
ts:
|
|
9953
|
+
z24.object({
|
|
9954
|
+
type: z24.literal("workspace.chat.changed"),
|
|
9955
|
+
workspaceId: z24.string(),
|
|
9956
|
+
chatId: z24.string(),
|
|
9957
|
+
ts: z24.string()
|
|
9943
9958
|
}),
|
|
9944
|
-
|
|
9945
|
-
type:
|
|
9946
|
-
workspaceId:
|
|
9947
|
-
chatId:
|
|
9948
|
-
afterCursor:
|
|
9949
|
-
processing:
|
|
9950
|
-
ts:
|
|
9959
|
+
z24.object({
|
|
9960
|
+
type: z24.literal("workspace.chat.advanced"),
|
|
9961
|
+
workspaceId: z24.string(),
|
|
9962
|
+
chatId: z24.string(),
|
|
9963
|
+
afterCursor: z24.string().optional(),
|
|
9964
|
+
processing: z24.boolean(),
|
|
9965
|
+
ts: z24.string()
|
|
9951
9966
|
}),
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
type:
|
|
9955
|
-
workspaceId:
|
|
9956
|
-
ts:
|
|
9967
|
+
z24.object({ type: z24.literal("presence.changed"), ts: z24.string() }),
|
|
9968
|
+
z24.object({
|
|
9969
|
+
type: z24.literal("mobile-testing.changed"),
|
|
9970
|
+
workspaceId: z24.string(),
|
|
9971
|
+
ts: z24.string()
|
|
9957
9972
|
}),
|
|
9958
|
-
|
|
9959
|
-
type:
|
|
9960
|
-
workspaceId:
|
|
9961
|
-
ts:
|
|
9973
|
+
z24.object({
|
|
9974
|
+
type: z24.literal("variable-request.changed"),
|
|
9975
|
+
workspaceId: z24.string(),
|
|
9976
|
+
ts: z24.string()
|
|
9962
9977
|
}),
|
|
9963
|
-
|
|
9964
|
-
type:
|
|
9965
|
-
prUrl:
|
|
9966
|
-
ts:
|
|
9978
|
+
z24.object({
|
|
9979
|
+
type: z24.literal("pull-request.changed"),
|
|
9980
|
+
prUrl: z24.string(),
|
|
9981
|
+
ts: z24.string()
|
|
9967
9982
|
}),
|
|
9968
|
-
|
|
9969
|
-
type:
|
|
9970
|
-
workspaceId:
|
|
9971
|
-
subagent:
|
|
9972
|
-
ts:
|
|
9983
|
+
z24.object({
|
|
9984
|
+
type: z24.literal("mothership.subagent.changed"),
|
|
9985
|
+
workspaceId: z24.string(),
|
|
9986
|
+
subagent: z24.object({ id: z24.string(), name: z24.string(), prUrl: z24.string().nullable() }),
|
|
9987
|
+
ts: z24.string()
|
|
9973
9988
|
})
|
|
9974
9989
|
]);
|
|
9975
9990
|
|
|
9976
9991
|
// ../shared/src/routes/presence.ts
|
|
9977
|
-
import { z as
|
|
9978
|
-
var presenceStatusSchema =
|
|
9979
|
-
var presenceLocationSchema =
|
|
9980
|
-
workspaceId:
|
|
9992
|
+
import { z as z25 } from "zod";
|
|
9993
|
+
var presenceStatusSchema = z25.enum(["online", "typing"]);
|
|
9994
|
+
var presenceLocationSchema = z25.object({
|
|
9995
|
+
workspaceId: z25.string().optional()
|
|
9981
9996
|
});
|
|
9982
|
-
var presenceEntrySchema =
|
|
9983
|
-
userId:
|
|
9997
|
+
var presenceEntrySchema = z25.object({
|
|
9998
|
+
userId: z25.string(),
|
|
9984
9999
|
status: presenceStatusSchema,
|
|
9985
10000
|
location: presenceLocationSchema,
|
|
9986
|
-
ts:
|
|
10001
|
+
ts: z25.string()
|
|
9987
10002
|
});
|
|
9988
|
-
var updatePresenceRequestSchema =
|
|
10003
|
+
var updatePresenceRequestSchema = z25.object({
|
|
9989
10004
|
status: presenceStatusSchema,
|
|
9990
10005
|
location: presenceLocationSchema.optional()
|
|
9991
10006
|
});
|
|
9992
10007
|
|
|
9993
10008
|
// ../shared/src/routes/review-messages.ts
|
|
9994
|
-
import { z as
|
|
9995
|
-
var sendPullRequestReviewMessageRequestSchema =
|
|
10009
|
+
import { z as z26 } from "zod";
|
|
10010
|
+
var sendPullRequestReviewMessageRequestSchema = z26.object({
|
|
9996
10011
|
...sendChatMessageRequestSchema.pick({
|
|
9997
10012
|
message: true,
|
|
9998
10013
|
messageId: true,
|
|
@@ -10005,8 +10020,8 @@ var sendPullRequestReviewMessageRequestSchema = z25.object({
|
|
|
10005
10020
|
ultrafastMode: true
|
|
10006
10021
|
}).shape,
|
|
10007
10022
|
/** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
|
|
10008
|
-
newChat:
|
|
10009
|
-
provider:
|
|
10023
|
+
newChat: z26.boolean().optional(),
|
|
10024
|
+
provider: z26.enum(VALID_AGENT_PROVIDERS).optional()
|
|
10010
10025
|
});
|
|
10011
10026
|
|
|
10012
10027
|
// ../shared/src/audit-log.ts
|
|
@@ -10222,30 +10237,30 @@ function isSkillRegistryManifest(value) {
|
|
|
10222
10237
|
}
|
|
10223
10238
|
|
|
10224
10239
|
// ../shared/src/routes/variable-requests.ts
|
|
10225
|
-
import { z as
|
|
10240
|
+
import { z as z27 } from "zod";
|
|
10226
10241
|
var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
|
|
10227
10242
|
var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
|
|
10228
|
-
var requestedVariableSchema =
|
|
10229
|
-
key:
|
|
10230
|
-
required:
|
|
10231
|
-
replace:
|
|
10243
|
+
var requestedVariableSchema = z27.object({
|
|
10244
|
+
key: z27.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
|
|
10245
|
+
required: z27.boolean(),
|
|
10246
|
+
replace: z27.boolean().optional()
|
|
10232
10247
|
});
|
|
10233
|
-
var requestedVariablesSchema =
|
|
10234
|
-
var createVariableRequestSchema =
|
|
10248
|
+
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");
|
|
10249
|
+
var createVariableRequestSchema = z27.object({
|
|
10235
10250
|
variables: requestedVariablesSchema,
|
|
10236
|
-
reason:
|
|
10237
|
-
wait:
|
|
10251
|
+
reason: z27.string().trim().max(500).nullish().transform((value) => value || null),
|
|
10252
|
+
wait: z27.boolean().default(true)
|
|
10238
10253
|
});
|
|
10239
|
-
var respondVariableRequestSchema =
|
|
10240
|
-
|
|
10241
|
-
action:
|
|
10242
|
-
destination:
|
|
10254
|
+
var respondVariableRequestSchema = z27.discriminatedUnion("action", [
|
|
10255
|
+
z27.object({
|
|
10256
|
+
action: z27.literal("provide"),
|
|
10257
|
+
destination: z27.enum(VARIABLE_REQUEST_DESTINATIONS),
|
|
10243
10258
|
/** Defaults to the workspace's environment, so older clients keep saving there. */
|
|
10244
|
-
environment_ids:
|
|
10245
|
-
overwrite:
|
|
10246
|
-
values:
|
|
10259
|
+
environment_ids: z27.array(z27.string().uuid()).optional(),
|
|
10260
|
+
overwrite: z27.boolean().optional(),
|
|
10261
|
+
values: z27.record(z27.string().regex(VARIABLE_KEY_RE), z27.string())
|
|
10247
10262
|
}),
|
|
10248
|
-
|
|
10263
|
+
z27.object({ action: z27.literal("skip") })
|
|
10249
10264
|
]);
|
|
10250
10265
|
|
|
10251
10266
|
export {
|
|
@@ -10403,6 +10418,8 @@ export {
|
|
|
10403
10418
|
workspaceTokenResponseSchema,
|
|
10404
10419
|
legacyWorkspaceTokenBundleSchema,
|
|
10405
10420
|
engineMcpOAuthTokenResponseSchema,
|
|
10421
|
+
SUBAGENT_SERVICE_TIERS,
|
|
10422
|
+
serviceTierRequestFields,
|
|
10406
10423
|
TERMINAL_RTC_ICE_SERVER,
|
|
10407
10424
|
HISTORY_ROOT,
|
|
10408
10425
|
HISTORY_INDEX_FILENAME,
|