replicas-engine 0.1.1296 → 0.1.1298

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.
@@ -1954,19 +1954,32 @@ var engineMcpOAuthTokenResponseSchema = z5.object({
1954
1954
  });
1955
1955
 
1956
1956
  // ../shared/src/routes/mothership.ts
1957
+ import { z as z7 } from "zod";
1958
+
1959
+ // ../shared/src/routes/pull-requests.ts
1957
1960
  import { z as z6 } from "zod";
1961
+ var PULL_REQUEST_MERGE_METHODS = ["merge", "squash", "rebase"];
1962
+ var DEPLOY_START_WINDOW_MS = 30 * 6e4;
1963
+ var mergePullRequestRequestSchema = z6.object({
1964
+ mergeMethod: z6.enum(PULL_REQUEST_MERGE_METHODS).optional(),
1965
+ bypassRules: z6.boolean().optional()
1966
+ });
1967
+
1968
+ // ../shared/src/routes/mothership.ts
1958
1969
  var SUBAGENT_SERVICE_TIERS = ["default", "fast", "ultrafast"];
1959
1970
  function serviceTierRequestFields(tier) {
1960
1971
  return { fastMode: tier !== "default", ...tier === "ultrafast" ? { ultrafastMode: true } : {} };
1961
1972
  }
1962
- var mothershipSubagentSettingsSchema = z6.object({
1963
- coding_agent: z6.enum(VALID_AGENT_PROVIDERS),
1964
- model: z6.string().nullable(),
1965
- thinking_level: z6.enum(VALID_THINKING_LEVELS).nullable(),
1966
- service_tier: z6.enum(SUBAGENT_SERVICE_TIERS),
1967
- goal_mode: z6.boolean(),
1968
- plan_mode: z6.boolean()
1973
+ var mothershipSubagentSettingsSchema = z7.object({
1974
+ coding_agent: z7.enum(VALID_AGENT_PROVIDERS),
1975
+ model: z7.string().nullable(),
1976
+ thinking_level: z7.enum(VALID_THINKING_LEVELS).nullable(),
1977
+ service_tier: z7.enum(SUBAGENT_SERVICE_TIERS),
1978
+ goal_mode: z7.boolean(),
1979
+ plan_mode: z7.boolean()
1969
1980
  });
1981
+ var DEPLOYED_SHOWN_MS = 3 * 60 * 6e4;
1982
+ var MOTHERSHIP_SHIPPING_LOOKBACK_MS = 3 * 24 * 60 * 6e4;
1970
1983
 
1971
1984
  // ../shared/src/runtime-env.ts
1972
1985
  var REPLICAS_RUNTIME_ENV_ALIASES = {
@@ -2173,19 +2186,19 @@ function gitIdentityConfigCommands(identity, scope = "global") {
2173
2186
  }
2174
2187
 
2175
2188
  // ../shared/src/headless-agent.ts
2176
- import { z as z7 } from "zod";
2177
- var headlessAgentRequestSchema = z7.object({
2178
- mode: z7.literal("structured"),
2179
- agent: z7.custom(
2189
+ import { z as z8 } from "zod";
2190
+ var headlessAgentRequestSchema = z8.object({
2191
+ mode: z8.literal("structured"),
2192
+ agent: z8.custom(
2180
2193
  (value) => typeof value === "string" && isValidAgentProvider(value)
2181
2194
  ),
2182
- model: z7.string().min(1),
2183
- prompt: z7.string(),
2184
- workingDirectory: z7.string().min(1),
2185
- timeoutSeconds: z7.number().int().min(1).max(1800).default(300),
2186
- thinkingLevel: z7.enum(STANDARD_THINKING_LEVELS).optional(),
2187
- codexOauthTokens: z7.object({ accessToken: z7.string(), accountId: z7.string() }).optional(),
2188
- outputSchema: z7.record(z7.string(), z7.json())
2195
+ model: z8.string().min(1),
2196
+ prompt: z8.string(),
2197
+ workingDirectory: z8.string().min(1),
2198
+ timeoutSeconds: z8.number().int().min(1).max(1800).default(300),
2199
+ thinkingLevel: z8.enum(STANDARD_THINKING_LEVELS).optional(),
2200
+ codexOauthTokens: z8.object({ accessToken: z8.string(), accountId: z8.string() }).optional(),
2201
+ outputSchema: z8.record(z8.string(), z8.json())
2189
2202
  });
2190
2203
  var headlessAgentUsagePath = (outputPath) => `${outputPath}.usage`;
2191
2204
 
@@ -2264,12 +2277,12 @@ function describeAuthFallback(payload) {
2264
2277
  }
2265
2278
 
2266
2279
  // ../shared/src/workspace-credentials.ts
2267
- import { z as z8 } from "zod";
2280
+ import { z as z9 } from "zod";
2268
2281
  var WORKSPACE_CREDENTIAL_PROVIDERS = ["claude", "codex"];
2269
- var workspaceCredentialProviderSchema = z8.enum(WORKSPACE_CREDENTIAL_PROVIDERS);
2282
+ var workspaceCredentialProviderSchema = z9.enum(WORKSPACE_CREDENTIAL_PROVIDERS);
2270
2283
  var workspaceCredentialSelectionSchema = agentCredentialSnapshotSchema.omit({ revision: true, account: true, credentialId: true });
2271
2284
  var createWorkspaceCredentialSchema = workspaceCredentialSelectionSchema.extend({
2272
- provider: z8.enum(VALID_AGENT_PROVIDERS)
2285
+ provider: z9.enum(VALID_AGENT_PROVIDERS)
2273
2286
  }).refine(({ provider: provider2, method }) => agentCredentialMethods(provider2).includes(method), {
2274
2287
  message: "This inference provider is not supported by this agent"
2275
2288
  });
@@ -2280,59 +2293,59 @@ var switchWorkspaceCredentialSchema = workspaceCredentialSelectionSchema.extend(
2280
2293
  });
2281
2294
 
2282
2295
  // ../shared/src/chat-fork.ts
2283
- import { z as z10 } from "zod";
2296
+ import { z as z11 } from "zod";
2284
2297
 
2285
2298
  // ../shared/src/fallback-chains.ts
2286
- import { z as z9 } from "zod";
2287
- var fallbackHarnessStepSchema = z9.object({
2288
- kind: z9.literal("harness"),
2289
- provider: z9.enum(VALID_AGENT_PROVIDERS),
2290
- model: z9.string().min(1),
2291
- thinkingLevel: z9.enum(VALID_THINKING_LEVELS).optional()
2299
+ import { z as z10 } from "zod";
2300
+ var fallbackHarnessStepSchema = z10.object({
2301
+ kind: z10.literal("harness"),
2302
+ provider: z10.enum(VALID_AGENT_PROVIDERS),
2303
+ model: z10.string().min(1),
2304
+ thinkingLevel: z10.enum(VALID_THINKING_LEVELS).optional()
2292
2305
  });
2293
- var fallbackPlanStepSchema = z9.discriminatedUnion("kind", [
2294
- z9.object({
2295
- kind: z9.literal("credentials"),
2296
- methods: z9.array(z9.custom(isAuthMethod)).min(1),
2297
- models: z9.record(z9.string(), z9.string().min(1)).optional()
2306
+ var fallbackPlanStepSchema = z10.discriminatedUnion("kind", [
2307
+ z10.object({
2308
+ kind: z10.literal("credentials"),
2309
+ methods: z10.array(z10.custom(isAuthMethod)).min(1),
2310
+ models: z10.record(z10.string(), z10.string().min(1)).optional()
2298
2311
  }),
2299
2312
  fallbackHarnessStepSchema
2300
2313
  ]);
2301
- var fallbackPlanResponseSchema = z9.object({ steps: z9.array(fallbackPlanStepSchema) });
2314
+ var fallbackPlanResponseSchema = z10.object({ steps: z10.array(fallbackPlanStepSchema) });
2302
2315
 
2303
2316
  // ../shared/src/chat-fork.ts
2304
- var fallbackReasonSchema = z10.enum(AGENT_FALLBACK_REASONS);
2305
- var chatForkInfoSchema = z10.object({
2306
- source: z10.object({
2307
- chatId: z10.string().min(1),
2308
- provider: z10.enum(VALID_AGENT_PROVIDERS),
2309
- title: z10.string()
2317
+ var fallbackReasonSchema = z11.enum(AGENT_FALLBACK_REASONS);
2318
+ var chatForkInfoSchema = z11.object({
2319
+ source: z11.object({
2320
+ chatId: z11.string().min(1),
2321
+ provider: z11.enum(VALID_AGENT_PROVIDERS),
2322
+ title: z11.string()
2310
2323
  }),
2311
- trigger: z10.enum(["manual", "auto", "side", "switch"]),
2324
+ trigger: z11.enum(["manual", "auto", "side", "switch"]),
2312
2325
  reason: fallbackReasonSchema.optional(),
2313
- state: z10.enum(["preparing", "ready", "failed"]),
2314
- error: z10.string().optional(),
2315
- startedAt: z10.string(),
2316
- completedAt: z10.string().optional()
2326
+ state: z11.enum(["preparing", "ready", "failed"]),
2327
+ error: z11.string().optional(),
2328
+ startedAt: z11.string(),
2329
+ completedAt: z11.string().optional()
2317
2330
  });
2318
2331
  function coerceChatForkInfo(value) {
2319
2332
  const parsed = chatForkInfoSchema.safeParse(value);
2320
2333
  return parsed.success ? parsed.data : null;
2321
2334
  }
2322
- var forkChatRequestSchema = z10.object({
2323
- provider: z10.enum(VALID_AGENT_PROVIDERS),
2324
- model: z10.string().min(1).optional(),
2325
- thinkingLevel: z10.enum(VALID_THINKING_LEVELS).optional(),
2326
- title: z10.string().min(1).max(200).optional(),
2327
- message: z10.string().trim().optional(),
2328
- id: z10.string().uuid().optional(),
2329
- clientRequestId: z10.string().min(1).max(128).optional(),
2330
- enableInteractiveTools: z10.boolean().optional(),
2335
+ var forkChatRequestSchema = z11.object({
2336
+ provider: z11.enum(VALID_AGENT_PROVIDERS),
2337
+ model: z11.string().min(1).optional(),
2338
+ thinkingLevel: z11.enum(VALID_THINKING_LEVELS).optional(),
2339
+ title: z11.string().min(1).max(200).optional(),
2340
+ message: z11.string().trim().optional(),
2341
+ id: z11.string().uuid().optional(),
2342
+ clientRequestId: z11.string().min(1).max(128).optional(),
2343
+ enableInteractiveTools: z11.boolean().optional(),
2331
2344
  // Server-injected by the monolith from the authenticated request; never trusted from clients.
2332
- senderUserId: z10.string().optional(),
2333
- senderEmail: z10.string().optional(),
2334
- senderDisplayName: z10.string().optional(),
2335
- senderAvatarUrl: z10.string().optional()
2345
+ senderUserId: z11.string().optional(),
2346
+ senderEmail: z11.string().optional(),
2347
+ senderDisplayName: z11.string().optional(),
2348
+ senderAvatarUrl: z11.string().optional()
2336
2349
  });
2337
2350
  function describeQuotaLimit(reason) {
2338
2351
  if (reason === "auth_failed") return "could not authenticate";
@@ -2344,10 +2357,10 @@ function describeChatForkReason(reason, provider2) {
2344
2357
  return reason ? `${getProviderDisplayName(provider2)} ${describeQuotaLimit(reason)}` : null;
2345
2358
  }
2346
2359
  var AGENT_QUOTA_EXHAUSTED_EVENT_TYPE = "agent-quota-exhausted";
2347
- var agentQuotaExhaustedPayloadSchema = z10.object({
2348
- provider: z10.enum(VALID_AGENT_PROVIDERS),
2360
+ var agentQuotaExhaustedPayloadSchema = z11.object({
2361
+ provider: z11.enum(VALID_AGENT_PROVIDERS),
2349
2362
  reason: fallbackReasonSchema,
2350
- detail: z10.string().optional(),
2363
+ detail: z11.string().optional(),
2351
2364
  forkTo: fallbackHarnessStepSchema.optional()
2352
2365
  });
2353
2366
  function defaultForkChatTitle(source, provider2) {
@@ -2375,27 +2388,27 @@ function getChatThreadSources(chats, chat) {
2375
2388
  }
2376
2389
 
2377
2390
  // ../shared/src/credential-refresh.ts
2378
- import { z as z11 } from "zod";
2379
- var engineCredentialRefreshFailureSchema = z11.object({
2380
- code: z11.string(),
2391
+ import { z as z12 } from "zod";
2392
+ var engineCredentialRefreshFailureSchema = z12.object({
2393
+ code: z12.string(),
2381
2394
  credential: workspaceCredentialSelectionSchema.optional()
2382
2395
  });
2383
2396
 
2384
2397
  // ../shared/src/credential-pool.ts
2385
- import { z as z12 } from "zod";
2398
+ import { z as z13 } from "zod";
2386
2399
  var MAX_CREDENTIAL_POOL_ACCOUNTS = 10;
2387
- var reorderCredentialPoolSchema = z12.object({
2388
- credential_ids: z12.array(z12.string().uuid()).min(1).max(MAX_CREDENTIAL_POOL_ACCOUNTS)
2400
+ var reorderCredentialPoolSchema = z13.object({
2401
+ credential_ids: z13.array(z13.string().uuid()).min(1).max(MAX_CREDENTIAL_POOL_ACCOUNTS)
2389
2402
  });
2390
2403
 
2391
2404
  // ../shared/src/mothership-events.ts
2392
- import { z as z19 } from "zod";
2405
+ import { z as z20 } from "zod";
2393
2406
 
2394
2407
  // ../shared/src/replicas-mcp.ts
2395
- import { z as z16 } from "zod";
2408
+ import { z as z17 } from "zod";
2396
2409
 
2397
2410
  // ../shared/src/automations/trigger-schemas.ts
2398
- import { z as z13 } from "zod";
2411
+ import { z as z14 } from "zod";
2399
2412
 
2400
2413
  // ../shared/src/uuid.ts
2401
2414
  function createUuidFromHex(value) {
@@ -2412,29 +2425,29 @@ function getReviewerLoginsError(event, logins) {
2412
2425
  if (isReviewRequested === !!logins?.some((login) => login.trim().replace(/^@+/, ""))) return null;
2413
2426
  return isReviewRequested ? "The PR review requested trigger needs at least one GitHub username" : "Requested reviewers only apply to the PR review requested trigger";
2414
2427
  }
2415
- var repositoryTriggerConfigSchema = z13.object({
2416
- event: z13.string(),
2417
- repository_ids: z13.array(z13.string().regex(UUID_RE, "must be a repository id")).optional(),
2418
- group_pr_events: z13.boolean().optional(),
2419
- excluded_actors: z13.array(z13.string()).optional(),
2420
- reviewer_logins: z13.array(z13.string()).optional()
2428
+ var repositoryTriggerConfigSchema = z14.object({
2429
+ event: z14.string(),
2430
+ repository_ids: z14.array(z14.string().regex(UUID_RE, "must be a repository id")).optional(),
2431
+ group_pr_events: z14.boolean().optional(),
2432
+ excluded_actors: z14.array(z14.string()).optional(),
2433
+ reviewer_logins: z14.array(z14.string()).optional()
2421
2434
  });
2422
- var cronTriggerSchema = z13.object({ type: z13.literal("cron"), config: z13.object({ schedule: z13.string(), timezone: z13.string().optional() }) });
2423
- var githubTriggerSchema = z13.object({
2424
- type: z13.literal("github"),
2435
+ var cronTriggerSchema = z14.object({ type: z14.literal("cron"), config: z14.object({ schedule: z14.string(), timezone: z14.string().optional() }) });
2436
+ var githubTriggerSchema = z14.object({
2437
+ type: z14.literal("github"),
2425
2438
  config: repositoryTriggerConfigSchema.superRefine((config, ctx) => {
2426
2439
  const message2 = getReviewerLoginsError(config.event, config.reviewer_logins);
2427
2440
  if (message2) ctx.addIssue({ code: "custom", message: message2, path: ["reviewer_logins"] });
2428
2441
  })
2429
2442
  });
2430
- var gitlabTriggerSchema = z13.object({ type: z13.literal("gitlab"), config: repositoryTriggerConfigSchema });
2431
- var automationTriggerSchema = z13.discriminatedUnion("type", [
2443
+ var gitlabTriggerSchema = z14.object({ type: z14.literal("gitlab"), config: repositoryTriggerConfigSchema });
2444
+ var automationTriggerSchema = z14.discriminatedUnion("type", [
2432
2445
  cronTriggerSchema,
2433
2446
  githubTriggerSchema,
2434
2447
  gitlabTriggerSchema,
2435
- 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() }) }),
2436
- z13.object({ type: z13.literal("sentry"), config: z13.object({ event: z13.string(), project_slugs: z13.array(z13.string()).optional(), min_level: z13.string().optional() }) }),
2437
- z13.object({ type: z13.literal("custom"), config: z13.object({}) })
2448
+ z14.object({ type: z14.literal("slack"), config: z14.object({ event: z14.string(), channel_ids: z14.array(z14.string()).optional(), group_thread_replies: z14.boolean().optional() }) }),
2449
+ z14.object({ type: z14.literal("sentry"), config: z14.object({ event: z14.string(), project_slugs: z14.array(z14.string()).optional(), min_level: z14.string().optional() }) }),
2450
+ z14.object({ type: z14.literal("custom"), config: z14.object({}) })
2438
2451
  ]);
2439
2452
 
2440
2453
  // ../shared/src/automations/types.ts
@@ -2442,40 +2455,40 @@ var AUTOMATION_DEBOUNCE_MAX_SECONDS = 24 * 60 * 60;
2442
2455
  var AUTOMATION_LIFECYCLE_POLICIES = ["default", "archive_when_done", "sleep_when_done", "delete_when_done"];
2443
2456
 
2444
2457
  // ../shared/src/routes/environment.ts
2445
- import { z as z14 } from "zod";
2458
+ import { z as z15 } from "zod";
2446
2459
  var ENVIRONMENT_MCP_TRANSPORTS = ["stdio", "http", "sse"];
2447
- var stringMap = z14.record(z14.string(), z14.string());
2448
- var createEnvironmentMcpRequestSchema = z14.object({
2449
- name: z14.string(),
2450
- transport: z14.enum(ENVIRONMENT_MCP_TRANSPORTS),
2451
- config: z14.union([
2452
- z14.object({ command: z14.string().min(1), args: z14.array(z14.string()).optional(), env: stringMap.optional() }),
2453
- z14.object({ url: z14.url(), headers: stringMap.optional(), auth: mcpAuthSchema.optional() })
2460
+ var stringMap = z15.record(z15.string(), z15.string());
2461
+ var createEnvironmentMcpRequestSchema = z15.object({
2462
+ name: z15.string(),
2463
+ transport: z15.enum(ENVIRONMENT_MCP_TRANSPORTS),
2464
+ config: z15.union([
2465
+ z15.object({ command: z15.string().min(1), args: z15.array(z15.string()).optional(), env: stringMap.optional() }),
2466
+ z15.object({ url: z15.url(), headers: stringMap.optional(), auth: mcpAuthSchema.optional() })
2454
2467
  ]).describe("stdio: `{ command, args, env }`. http/sse: `{ url, headers }`.")
2455
2468
  });
2456
2469
  var updateEnvironmentMcpRequestSchema = createEnvironmentMcpRequestSchema.partial();
2457
- var screenPasswordSchema = z14.string().min(1, "Enter the screen password").max(256).describe('Screen Sharing password, for `replicas computer screen`. On a Mac, the "VNC viewers may control screen with password" password. Never returned.');
2458
- var createEnvironmentDeviceRequestSchema = z14.object({
2459
- name: z14.string().regex(/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/, "Use lowercase letters, numbers and dashes").describe("SSH alias in workspaces, e.g. `mac-mini` for `ssh mac-mini`."),
2460
- host: z14.string().max(253).regex(/^(?:[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?|[0-9A-Fa-f:]+)$/, "Enter a hostname or IP address").describe("Hostname or IP, such as a Tailscale MagicDNS name (`mac-mini`) or a public address."),
2461
- port: z14.number().int().min(1).max(65535).optional().describe("SSH port. Defaults to 22."),
2462
- username: z14.string().regex(/^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$/, "Enter the account name on the device").describe("Account the agent signs in as."),
2470
+ var screenPasswordSchema = z15.string().min(1, "Enter the screen password").max(256).describe('Screen Sharing password, for `replicas computer screen`. On a Mac, the "VNC viewers may control screen with password" password. Never returned.');
2471
+ var createEnvironmentDeviceRequestSchema = z15.object({
2472
+ name: z15.string().regex(/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/, "Use lowercase letters, numbers and dashes").describe("SSH alias in workspaces, e.g. `mac-mini` for `ssh mac-mini`."),
2473
+ host: z15.string().max(253).regex(/^(?:[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?|[0-9A-Fa-f:]+)$/, "Enter a hostname or IP address").describe("Hostname or IP, such as a Tailscale MagicDNS name (`mac-mini`) or a public address."),
2474
+ port: z15.number().int().min(1).max(65535).optional().describe("SSH port. Defaults to 22."),
2475
+ username: z15.string().regex(/^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$/, "Enter the account name on the device").describe("Account the agent signs in as."),
2463
2476
  screen_password: screenPasswordSchema.optional()
2464
2477
  });
2465
2478
  var updateEnvironmentDeviceRequestSchema = createEnvironmentDeviceRequestSchema.partial().extend({
2466
- screen_password: z14.union([screenPasswordSchema, z14.literal("")]).optional().describe("New Screen Sharing password, or an empty string to remove it.")
2479
+ screen_password: z15.union([screenPasswordSchema, z15.literal("")]).optional().describe("New Screen Sharing password, or an empty string to remove it.")
2467
2480
  });
2468
- var provisionedDeviceSchema = z14.object({
2469
- name: z14.string(),
2470
- host: z14.string(),
2471
- port: z14.number(),
2472
- username: z14.string(),
2473
- private_key: z14.string(),
2474
- screen_password: z14.string().optional()
2481
+ var provisionedDeviceSchema = z15.object({
2482
+ name: z15.string(),
2483
+ host: z15.string(),
2484
+ port: z15.number(),
2485
+ username: z15.string(),
2486
+ private_key: z15.string(),
2487
+ screen_password: z15.string().optional()
2475
2488
  });
2476
2489
 
2477
2490
  // ../shared/src/routes/workspaces.ts
2478
- import { z as z15 } from "zod";
2491
+ import { z as z16 } from "zod";
2479
2492
  var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
2480
2493
  var STALE_PREPARING_MS = 10 * 6e4;
2481
2494
  var WORKSPACE_STATUS_FILTERS = WORKSPACE_STATUSES.map((status) => status === "error" ? "failed" : status);
@@ -2486,16 +2499,16 @@ var DEFAULT_WORKSPACE_FILTERS = {
2486
2499
  activity: "any"
2487
2500
  };
2488
2501
  var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
2489
- var workspaceExecRequestSchema = z15.object({
2490
- command: z15.string().regex(/\S/, "command is required"),
2491
- timeout_seconds: z15.number().int().min(1).max(50).optional().describe("Default: 30")
2502
+ var workspaceExecRequestSchema = z16.object({
2503
+ command: z16.string().regex(/\S/, "command is required"),
2504
+ timeout_seconds: z16.number().int().min(1).max(50).optional().describe("Default: 30")
2492
2505
  });
2493
- var terminalRtcCandidateSchema = z15.object({ type: z15.literal("rtc-candidate"), candidate: z15.string(), mid: z15.string() });
2494
- var terminalSocketServerMessageSchema = z15.discriminatedUnion("type", [
2495
- z15.object({ type: z15.literal("output"), data: z15.string() }),
2496
- z15.object({ type: z15.literal("rtc-answer"), sdp: z15.string() }),
2506
+ var terminalRtcCandidateSchema = z16.object({ type: z16.literal("rtc-candidate"), candidate: z16.string(), mid: z16.string() });
2507
+ var terminalSocketServerMessageSchema = z16.discriminatedUnion("type", [
2508
+ z16.object({ type: z16.literal("output"), data: z16.string() }),
2509
+ z16.object({ type: z16.literal("rtc-answer"), sdp: z16.string() }),
2497
2510
  terminalRtcCandidateSchema,
2498
- z15.object({ type: z15.literal("rtc-switch") })
2511
+ z16.object({ type: z16.literal("rtc-switch") })
2499
2512
  ]);
2500
2513
  var TERMINAL_RTC_ICE_SERVER = "stun:stun.l.google.com:19302";
2501
2514
 
@@ -2539,47 +2552,47 @@ var REPLICAS_MCP_TOOLS = {
2539
2552
  deleteChat: "delete_chat",
2540
2553
  listRepositories: "list_repositories"
2541
2554
  };
2542
- var automationToolInputSchema = z16.object({
2543
- name: z16.string().describe("Short automation name."),
2544
- prompt: z16.string().describe("Prompt each automation run starts with."),
2545
- environment_id: z16.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
2546
- triggers: z16.array(automationTriggerSchema).min(1).describe(
2555
+ var automationToolInputSchema = z17.object({
2556
+ name: z17.string().describe("Short automation name."),
2557
+ prompt: z17.string().describe("Prompt each automation run starts with."),
2558
+ environment_id: z17.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
2559
+ triggers: z17.array(automationTriggerSchema).min(1).describe(
2547
2560
  '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>"] } }`.'
2548
2561
  ),
2549
- description: z16.string().optional().describe("One-line summary shown in the dashboard."),
2550
- plan_mode: z16.boolean().optional(),
2551
- goal_mode: z16.boolean().optional(),
2552
- fast_mode: z16.boolean().optional(),
2553
- workspace_lifecycle_policy: z16.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
2562
+ description: z17.string().optional().describe("One-line summary shown in the dashboard."),
2563
+ plan_mode: z17.boolean().optional(),
2564
+ goal_mode: z17.boolean().optional(),
2565
+ fast_mode: z17.boolean().optional(),
2566
+ workspace_lifecycle_policy: z17.enum(AUTOMATION_LIFECYCLE_POLICIES).optional().describe(
2554
2567
  "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."
2555
2568
  )
2556
2569
  });
2557
2570
  var automationCreateToolInputSchema = automationToolInputSchema.extend({
2558
- scope: z16.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
2571
+ scope: z17.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal automation, which needs a personal API key.")
2559
2572
  });
2560
2573
  var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
2561
- automation_id: z16.string().describe("Automation ID"),
2562
- enabled: z16.boolean().optional(),
2563
- agent_provider: z16.enum(AGENT).nullable().optional(),
2564
- model: z16.string().nullable().optional(),
2565
- thinking_level: z16.enum(VALID_THINKING_LEVELS).nullable().optional(),
2566
- workspace_size: z16.enum(WORKSPACE_SIZES).optional(),
2567
- 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.")
2574
+ automation_id: z17.string().describe("Automation ID"),
2575
+ enabled: z17.boolean().optional(),
2576
+ agent_provider: z17.enum(AGENT).nullable().optional(),
2577
+ model: z17.string().nullable().optional(),
2578
+ thinking_level: z17.enum(VALID_THINKING_LEVELS).nullable().optional(),
2579
+ workspace_size: z17.enum(WORKSPACE_SIZES).optional(),
2580
+ scope: z17.literal("org").optional().describe("`org` moves a personal automation to the organization so teammates can see and edit it. It cannot be moved back.")
2568
2581
  });
2569
- var chatPath = { id: z16.string().describe("Workspace ID"), chat_id: z16.string().describe("Chat ID") };
2582
+ var chatPath = { id: z17.string().describe("Workspace ID"), chat_id: z17.string().describe("Chat ID") };
2570
2583
  var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
2571
- var createChatToolInputSchema = z16.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
2572
- var forkChatToolInputSchema = z16.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
2573
- var renameChatToolInputSchema = z16.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
2574
- var runCommandToolInputSchema = z16.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
2575
- var environmentMcpPath = { environment_id: z16.string().describe("Environment ID") };
2576
- var createEnvironmentMcpToolInputSchema = z16.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
2577
- var updateEnvironmentMcpToolInputSchema = z16.object({
2584
+ var createChatToolInputSchema = z17.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
2585
+ var forkChatToolInputSchema = z17.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
2586
+ var renameChatToolInputSchema = z17.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
2587
+ var runCommandToolInputSchema = z17.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
2588
+ var environmentMcpPath = { environment_id: z17.string().describe("Environment ID") };
2589
+ var createEnvironmentMcpToolInputSchema = z17.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
2590
+ var updateEnvironmentMcpToolInputSchema = z17.object({
2578
2591
  ...environmentMcpPath,
2579
- mcp_id: z16.string().describe("MCP ID"),
2592
+ mcp_id: z17.string().describe("MCP ID"),
2580
2593
  ...updateEnvironmentMcpRequestSchema.shape
2581
2594
  });
2582
- var createEnvironmentDeviceToolInputSchema = z16.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
2595
+ var createEnvironmentDeviceToolInputSchema = z17.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
2583
2596
 
2584
2597
  // ../shared/src/scout.ts
2585
2598
  var SCOUT_SOURCE_TYPES = ["slack", "linear"];
@@ -2886,7 +2899,7 @@ var DOCKER_ABILITY = {
2886
2899
  };
2887
2900
 
2888
2901
  // ../shared/src/routes/environment-setups.ts
2889
- import { z as z17 } from "zod";
2902
+ import { z as z18 } from "zod";
2890
2903
  var ENVIRONMENT_SETUP_STEPS = [
2891
2904
  { key: "understand", label: "Understand the codebase" },
2892
2905
  { key: "install", label: "Install dependencies and run the app" },
@@ -2919,17 +2932,17 @@ var ENVIRONMENT_SETUP_LIMITS = {
2919
2932
  repositories: 20
2920
2933
  };
2921
2934
  var VARIABLE_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
2922
- var text2 = (max) => max === void 0 ? z17.string().trim() : z17.string().trim().max(max);
2935
+ var text2 = (max) => max === void 0 ? z18.string().trim() : z18.string().trim().max(max);
2923
2936
  var requiredText = (max) => text2(max).min(1, "must not be empty");
2924
2937
  var optionalText2 = (max) => text2(max).nullish().transform((value) => value || null);
2925
2938
  var clearableText = (max) => text2(max).nullish().transform((value) => value === void 0 ? void 0 : value || null);
2926
- var list = (item, max) => max === void 0 ? z17.array(item) : z17.array(item).max(max);
2939
+ var list = (item, max) => max === void 0 ? z18.array(item) : z18.array(item).max(max);
2927
2940
  var ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES = ["cron", "github", "gitlab"];
2928
2941
  function isEnvironmentSetupAuthoredTriggerType(type) {
2929
2942
  return ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES.some((authored) => authored === type);
2930
2943
  }
2931
- var proposalTriggerSchema = z17.discriminatedUnion("type", [cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema]);
2932
- var existingTriggerSchema = z17.custom(
2944
+ var proposalTriggerSchema = z18.discriminatedUnion("type", [cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema]);
2945
+ var existingTriggerSchema = z18.custom(
2933
2946
  (value) => isRecord(value) && typeof value.type === "string" && isRecord(value.config),
2934
2947
  "must be an automation trigger"
2935
2948
  );
@@ -2937,17 +2950,17 @@ var carriedTriggerSchema = existingTriggerSchema.refine(
2937
2950
  (trigger) => !isEnvironmentSetupAuthoredTriggerType(trigger.type)
2938
2951
  );
2939
2952
  function automationSchema(limits) {
2940
- const authored = z17.object({
2953
+ const authored = z18.object({
2941
2954
  name: text2(limits.nameChars),
2942
2955
  description: text2(limits.descriptionChars),
2943
2956
  prompt: text2(limits.automationPromptChars),
2944
2957
  triggers: list(proposalTriggerSchema, limits.automationTriggers)
2945
2958
  });
2946
- const updated = authored.extend({ triggers: list(z17.union([proposalTriggerSchema, carriedTriggerSchema]), limits.automationTriggers) });
2947
- return z17.object({
2959
+ const updated = authored.extend({ triggers: list(z18.union([proposalTriggerSchema, carriedTriggerSchema]), limits.automationTriggers) });
2960
+ return z18.object({
2948
2961
  key: requiredText(limits.automationKeyChars),
2949
- action: z17.enum(ENVIRONMENT_SETUP_AUTOMATION_ACTIONS).default("create"),
2950
- automation_id: z17.string().regex(UUID_RE, "must be an automation id").nullable().default(null),
2962
+ action: z18.enum(ENVIRONMENT_SETUP_AUTOMATION_ACTIONS).default("create"),
2963
+ automation_id: z18.string().regex(UUID_RE, "must be an automation id").nullable().default(null),
2951
2964
  name: text2().default(""),
2952
2965
  description: optionalText2().transform((value) => value ?? ""),
2953
2966
  prompt: text2().default(""),
@@ -2970,7 +2983,7 @@ function automationSchema(limits) {
2970
2983
  const content = (automation.action === "update" ? updated : authored).safeParse(automation);
2971
2984
  if (content.success) return { ...automation, ...content.data };
2972
2985
  for (const issue of content.error.issues) ctx.addIssue({ ...issue, code: "custom" });
2973
- return z17.NEVER;
2986
+ return z18.NEVER;
2974
2987
  });
2975
2988
  }
2976
2989
  function automationListSchema(limits) {
@@ -2988,7 +3001,7 @@ function automationListSchema(limits) {
2988
3001
  });
2989
3002
  }
2990
3003
  function environmentSchema(limits) {
2991
- return z17.object({
3004
+ return z18.object({
2992
3005
  name: optionalText2(limits.nameChars).transform((value) => value ?? void 0),
2993
3006
  description: clearableText(limits.descriptionChars),
2994
3007
  system_prompt: clearableText(limits.systemPromptChars),
@@ -2997,41 +3010,41 @@ function environmentSchema(limits) {
2997
3010
  });
2998
3011
  }
2999
3012
  function proposalSchema(limits) {
3000
- return z17.object({
3013
+ return z18.object({
3001
3014
  summary: requiredText(limits.summaryChars),
3002
3015
  stack: list(text2(), limits.stackItems).default([]).transform((items) => items.filter(Boolean)),
3003
3016
  environment: environmentSchema(limits),
3004
- variables: list(z17.object({
3005
- key: z17.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
3017
+ variables: list(z18.object({
3018
+ key: z18.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
3006
3019
  description: optionalText2(limits.variableDescriptionChars).transform((value) => value ?? ""),
3007
- required: z17.boolean().default(false)
3020
+ required: z18.boolean().default(false)
3008
3021
  }), limits.variables).default([]),
3009
3022
  automations: automationListSchema(limits),
3010
- verification: list(z17.object({
3023
+ verification: list(z18.object({
3011
3024
  label: requiredText(limits.nameChars),
3012
- status: z17.enum(ENVIRONMENT_SETUP_VERIFICATION_STATUSES),
3025
+ status: z18.enum(ENVIRONMENT_SETUP_VERIFICATION_STATUSES),
3013
3026
  detail: optionalText2(limits.verificationDetailChars).transform((value) => value ?? void 0)
3014
3027
  }), limits.verificationItems).default([]),
3015
- media: list(z17.object({
3016
- media_id: z17.string().regex(UUID_RE, "must be a media id"),
3028
+ media: list(z18.object({
3029
+ media_id: z18.string().regex(UUID_RE, "must be a media id"),
3017
3030
  title: requiredText(limits.nameChars)
3018
3031
  }), limits.mediaItems).default([])
3019
3032
  });
3020
3033
  }
3021
3034
  var environmentSetupProposalSchema = proposalSchema({});
3022
3035
  var environmentSetupProposalSubmissionSchema = proposalSchema(ENVIRONMENT_SETUP_LIMITS);
3023
- var environmentSetupRunStateSchema = z17.object({
3024
- status: z17.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
3025
- steps: z17.partialRecord(z17.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z17.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
3036
+ var environmentSetupRunStateSchema = z18.object({
3037
+ status: z18.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
3038
+ steps: z18.partialRecord(z18.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z18.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
3026
3039
  proposal: environmentSetupProposalSchema.nullable().default(null),
3027
- applied: z17.object({
3028
- applied_at: z17.string(),
3029
- automation_ids: z17.array(z17.string())
3040
+ applied: z18.object({
3041
+ applied_at: z18.string(),
3042
+ automation_ids: z18.array(z18.string())
3030
3043
  }).nullable().default(null)
3031
3044
  });
3032
- var applyEnvironmentSetupRequestSchema = z17.object({
3045
+ var applyEnvironmentSetupRequestSchema = z18.object({
3033
3046
  environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
3034
- 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)),
3047
+ variables: list(z18.object({ key: z18.string().regex(VARIABLE_KEY_RE), value: z18.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)),
3035
3048
  automations: automationListSchema(ENVIRONMENT_SETUP_LIMITS)
3036
3049
  });
3037
3050
 
@@ -3497,7 +3510,7 @@ var GITLAB_ABILITY = {
3497
3510
  };
3498
3511
 
3499
3512
  // ../shared/src/routes/compute.ts
3500
- import { z as z18 } from "zod";
3513
+ import { z as z19 } from "zod";
3501
3514
  var COMPUTE_SANDBOX_KINDS = ["gpu"];
3502
3515
  var GPU_TYPES = ["T4", "L4", "A10G", "L40S", "A100", "A100-80GB", "H100", "H200", "B200"];
3503
3516
  var DEFAULT_GPU_TYPE = "L4";
@@ -3514,27 +3527,27 @@ var COMPUTE_SANDBOX_LIMITS = {
3514
3527
  maxIdleTimeoutMinutes: 60,
3515
3528
  maxTransferBytes: 1024 ** 3
3516
3529
  };
3517
- 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");
3518
- var createComputeSandboxRequestSchema = z18.object({
3519
- kind: z18.enum(COMPUTE_SANDBOX_KINDS),
3520
- gpu: z18.string().trim().optional(),
3521
- image: z18.string().trim().min(1).max(256).regex(/^\S+$/, "Image must not contain whitespace").optional(),
3522
- timeoutMinutes: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTimeoutMinutes).optional(),
3523
- idleTimeoutMinutes: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxIdleTimeoutMinutes).optional(),
3524
- ports: z18.array(z18.number().int().min(1).max(65535)).max(COMPUTE_SANDBOX_LIMITS.maxPorts).optional(),
3530
+ var computeEnvSchema = z19.record(z19.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/).max(128), z19.string().max(32768)).refine((env) => Object.keys(env).length <= 64, "At most 64 environment variables are allowed");
3531
+ var createComputeSandboxRequestSchema = z19.object({
3532
+ kind: z19.enum(COMPUTE_SANDBOX_KINDS),
3533
+ gpu: z19.string().trim().optional(),
3534
+ image: z19.string().trim().min(1).max(256).regex(/^\S+$/, "Image must not contain whitespace").optional(),
3535
+ timeoutMinutes: z19.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTimeoutMinutes).optional(),
3536
+ idleTimeoutMinutes: z19.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxIdleTimeoutMinutes).optional(),
3537
+ ports: z19.array(z19.number().int().min(1).max(65535)).max(COMPUTE_SANDBOX_LIMITS.maxPorts).optional(),
3525
3538
  env: computeEnvSchema.optional()
3526
3539
  });
3527
- var computeExecRequestSchema = z18.object({
3528
- command: z18.string().min(1).max(1e5),
3529
- workdir: z18.string().min(1).max(4096).optional(),
3540
+ var computeExecRequestSchema = z19.object({
3541
+ command: z19.string().min(1).max(1e5),
3542
+ workdir: z19.string().min(1).max(4096).optional(),
3530
3543
  env: computeEnvSchema.optional(),
3531
- detach: z18.boolean().optional()
3544
+ detach: z19.boolean().optional()
3532
3545
  });
3533
- var computeUploadRequestSchema = z18.object({
3534
- size: z18.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
3546
+ var computeUploadRequestSchema = z19.object({
3547
+ size: z19.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
3535
3548
  });
3536
- var computeTransferPathSchema = z18.object({
3537
- path: z18.string().min(1).max(4096).optional()
3549
+ var computeTransferPathSchema = z19.object({
3550
+ path: z19.string().min(1).max(4096).optional()
3538
3551
  });
3539
3552
 
3540
3553
  // ../shared/src/default-skills/replicas-agent/abilities/gpu.ts
@@ -5173,16 +5186,16 @@ function splitMothershipInstructions(customInstructions) {
5173
5186
  // ../shared/src/mothership-events.ts
5174
5187
  var MOTHERSHIP_EVENT_KINDS = ["finished", "ready", "needs_attention", "merged", "closed", "archived"];
5175
5188
  var MOTHERSHIP_EVENT_TYPE = "multitask-event";
5176
- var mothershipEventSchema = z19.object({
5177
- id: z19.string(),
5178
- at: z19.string(),
5179
- kind: z19.enum(MOTHERSHIP_EVENT_KINDS),
5180
- agentId: z19.string(),
5181
- agentName: z19.string(),
5182
- summary: z19.string(),
5183
- detail: z19.string().optional(),
5189
+ var mothershipEventSchema = z20.object({
5190
+ id: z20.string(),
5191
+ at: z20.string(),
5192
+ kind: z20.enum(MOTHERSHIP_EVENT_KINDS),
5193
+ agentId: z20.string(),
5194
+ agentName: z20.string(),
5195
+ summary: z20.string(),
5196
+ detail: z20.string().optional(),
5184
5197
  // Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
5185
- noticed: z19.boolean().optional()
5198
+ noticed: z20.boolean().optional()
5186
5199
  });
5187
5200
  var TAG = "multitask_event";
5188
5201
  var BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
@@ -5971,7 +5984,7 @@ function parseMcpToolName(name) {
5971
5984
  }
5972
5985
 
5973
5986
  // ../shared/src/learned-skills.ts
5974
- import { z as z20 } from "zod";
5987
+ import { z as z21 } from "zod";
5975
5988
 
5976
5989
  // ../shared/src/frontmatter.ts
5977
5990
  import { parse as parseYaml } from "yaml";
@@ -5994,20 +6007,20 @@ function parseFrontmatter(content) {
5994
6007
  var LEARNED_SKILLS_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/learned-skills`;
5995
6008
  var LEARNED_SKILLS_MANIFEST_PATH = `${LEARNED_SKILLS_ROOT}/manifest.json`;
5996
6009
  var LEARNED_SKILL_DIR_PREFIX = "replicas-learned__";
5997
- var learnedSkillsManifestSchema = z20.object({
5998
- skills: z20.array(z20.object({ name: z20.string(), sha256: z20.string() }))
6010
+ var learnedSkillsManifestSchema = z21.object({
6011
+ skills: z21.array(z21.object({ name: z21.string(), sha256: z21.string() }))
5999
6012
  });
6000
- var dreamVerdictChecksSchema = z20.object({
6001
- repeatable: z20.boolean(),
6002
- realInstruction: z20.boolean(),
6003
- noContradiction: z20.boolean(),
6004
- formatExact: z20.boolean(),
6005
- humanOnly: z20.boolean(),
6006
- actionable: z20.boolean(),
6007
- durable: z20.boolean()
6013
+ var dreamVerdictChecksSchema = z21.object({
6014
+ repeatable: z21.boolean(),
6015
+ realInstruction: z21.boolean(),
6016
+ noContradiction: z21.boolean(),
6017
+ formatExact: z21.boolean(),
6018
+ humanOnly: z21.boolean(),
6019
+ actionable: z21.boolean(),
6020
+ durable: z21.boolean()
6008
6021
  });
6009
6022
  var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
6010
- var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z20.boolean(), reason: z20.string() });
6023
+ var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z21.boolean(), reason: z21.string() });
6011
6024
  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."`;
6012
6025
 
6013
6026
  // ../shared/src/user-message-matching.ts
@@ -9413,7 +9426,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
9413
9426
  };
9414
9427
 
9415
9428
  // ../shared/src/routes/command-protection.ts
9416
- import { z as z21 } from "zod";
9429
+ import { z as z22 } from "zod";
9417
9430
 
9418
9431
  // ../shared/src/git-invocations.ts
9419
9432
  var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
@@ -9504,27 +9517,27 @@ function findCheckoutTarget(args) {
9504
9517
  }
9505
9518
 
9506
9519
  // ../shared/src/routes/command-protection.ts
9507
- var commandProtectionRepoStateSchema = z21.object({
9508
- branch: z21.string().nullable(),
9509
- defaultBranch: z21.string().nullable(),
9510
- pushBranch: z21.string().nullable(),
9511
- pushConfig: z21.string().nullable(),
9512
- headMessage: z21.string().nullable(),
9513
- mergeInProgress: z21.boolean().optional()
9520
+ var commandProtectionRepoStateSchema = z22.object({
9521
+ branch: z22.string().nullable(),
9522
+ defaultBranch: z22.string().nullable(),
9523
+ pushBranch: z22.string().nullable(),
9524
+ pushConfig: z22.string().nullable(),
9525
+ headMessage: z22.string().nullable(),
9526
+ mergeInProgress: z22.boolean().optional()
9514
9527
  });
9515
- var commandProtectionEvaluateRequestSchema = z21.object({
9516
- provider: z21.enum(["claude", "codex", "cursor", "opencode", "pi"]),
9517
- source: z21.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
9518
- toolName: z21.string(),
9519
- toolInput: z21.unknown(),
9520
- command: z21.string().nullish(),
9521
- cwd: z21.string().nullish(),
9522
- toolUseId: z21.string().nullish(),
9528
+ var commandProtectionEvaluateRequestSchema = z22.object({
9529
+ provider: z22.enum(["claude", "codex", "cursor", "opencode", "pi"]),
9530
+ source: z22.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
9531
+ toolName: z22.string(),
9532
+ toolInput: z22.unknown(),
9533
+ command: z22.string().nullish(),
9534
+ cwd: z22.string().nullish(),
9535
+ toolUseId: z22.string().nullish(),
9523
9536
  // Read by the engine before the command runs, keyed by absolute path, so the
9524
9537
  // policy can see branches and commit messages the command text only references.
9525
- gitContext: z21.object({
9526
- repos: z21.record(z21.string(), commandProtectionRepoStateSchema),
9527
- messageFiles: z21.record(z21.string(), z21.string())
9538
+ gitContext: z22.object({
9539
+ repos: z22.record(z22.string(), commandProtectionRepoStateSchema),
9540
+ messageFiles: z22.record(z22.string(), z22.string())
9528
9541
  }).optional()
9529
9542
  });
9530
9543
  var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
@@ -9721,117 +9734,117 @@ function shouldRefreshPullRequests(toolName, toolInput) {
9721
9734
  }
9722
9735
 
9723
9736
  // ../shared/src/routes/linear.ts
9724
- import { z as z22 } from "zod";
9725
- var linearSessionMetadataSchema = z22.object({
9726
- via_mothership: z22.boolean().optional(),
9727
- issue_id: z22.string(),
9728
- issue_identifier: z22.string(),
9729
- issue_title: z22.string(),
9730
- issue_description: z22.string(),
9731
- issue_url: z22.string(),
9732
- comment_id: z22.string(),
9733
- comment_body: z22.string(),
9734
- triggered_by_id: z22.string().optional(),
9735
- triggered_by_name: z22.string().optional(),
9736
- triggered_by_email: z22.string().optional(),
9737
- linear_workspace_id: z22.string().optional(),
9738
- creator_id: z22.string().optional(),
9739
- creator_name: z22.string().optional(),
9740
- creator_email: z22.string().optional(),
9741
- assignee_id: z22.string().optional(),
9742
- assignee_name: z22.string().optional(),
9743
- assignee_email: z22.string().optional(),
9744
- issue_state: z22.string().optional(),
9745
- parent_issue: z22.object({
9746
- id: z22.string(),
9747
- identifier: z22.string(),
9748
- title: z22.string(),
9749
- description: z22.string().nullable()
9737
+ import { z as z23 } from "zod";
9738
+ var linearSessionMetadataSchema = z23.object({
9739
+ via_mothership: z23.boolean().optional(),
9740
+ issue_id: z23.string(),
9741
+ issue_identifier: z23.string(),
9742
+ issue_title: z23.string(),
9743
+ issue_description: z23.string(),
9744
+ issue_url: z23.string(),
9745
+ comment_id: z23.string(),
9746
+ comment_body: z23.string(),
9747
+ triggered_by_id: z23.string().optional(),
9748
+ triggered_by_name: z23.string().optional(),
9749
+ triggered_by_email: z23.string().optional(),
9750
+ linear_workspace_id: z23.string().optional(),
9751
+ creator_id: z23.string().optional(),
9752
+ creator_name: z23.string().optional(),
9753
+ creator_email: z23.string().optional(),
9754
+ assignee_id: z23.string().optional(),
9755
+ assignee_name: z23.string().optional(),
9756
+ assignee_email: z23.string().optional(),
9757
+ issue_state: z23.string().optional(),
9758
+ parent_issue: z23.object({
9759
+ id: z23.string(),
9760
+ identifier: z23.string(),
9761
+ title: z23.string(),
9762
+ description: z23.string().nullable()
9750
9763
  }).optional(),
9751
- workspace: z22.object({
9752
- id: z22.string(),
9753
- coding_agent: z22.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
9754
- task_description: z22.string(),
9755
- created_at: z22.string()
9764
+ workspace: z23.object({
9765
+ id: z23.string(),
9766
+ coding_agent: z23.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
9767
+ task_description: z23.string(),
9768
+ created_at: z23.string()
9756
9769
  }).optional()
9757
9770
  });
9758
9771
 
9759
9772
  // ../shared/src/routes/scout.ts
9760
- import { z as z23 } from "zod";
9773
+ import { z as z24 } from "zod";
9761
9774
  var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
9762
- var scoutLinearSessionIntentRequestSchema = z23.object({
9763
- comment_id: z23.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
9764
- action: z23.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
9775
+ var scoutLinearSessionIntentRequestSchema = z24.object({
9776
+ comment_id: z24.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
9777
+ action: z24.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
9765
9778
  });
9766
- var scoutLinearStartRequestSchema = z23.object({
9767
- issue_id: z23.string().describe("Linear issue id from the envelope's `issue_id`."),
9768
- agent_session_id: z23.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
9769
- prompt: z23.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
9779
+ var scoutLinearStartRequestSchema = z24.object({
9780
+ issue_id: z24.string().describe("Linear issue id from the envelope's `issue_id`."),
9781
+ agent_session_id: z24.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
9782
+ prompt: z24.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
9770
9783
  });
9771
- var slackChannelIdSchema = z23.string().describe("Slack channel id from the envelope's `channel_id`.");
9772
- var slackThreadTsSchema = z23.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
9773
- var scoutSlackSpawnRequestSchema = z23.object({
9784
+ var slackChannelIdSchema = z24.string().describe("Slack channel id from the envelope's `channel_id`.");
9785
+ var slackThreadTsSchema = z24.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
9786
+ var scoutSlackSpawnRequestSchema = z24.object({
9774
9787
  channel_id: slackChannelIdSchema,
9775
9788
  thread_ts: slackThreadTsSchema,
9776
- 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."),
9777
- user_id: z23.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
9778
- 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."),
9779
- 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."),
9780
- 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.`)
9789
+ message_ts: z24.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."),
9790
+ user_id: z24.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
9791
+ prompt: z24.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."),
9792
+ acknowledgement_ts: z24.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."),
9793
+ environment_id: z24.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.`)
9781
9794
  });
9782
9795
  var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
9783
- title: z23.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
9784
- 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."),
9785
- 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.")
9796
+ title: z24.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
9797
+ prompt: z24.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."),
9798
+ acknowledgement_ts: z24.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.")
9786
9799
  });
9787
- var scoutSlackRelayRequestSchema = z23.object({
9800
+ var scoutSlackRelayRequestSchema = z24.object({
9788
9801
  channel_id: slackChannelIdSchema,
9789
9802
  thread_ts: slackThreadTsSchema,
9790
- 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."),
9791
- 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`."),
9792
- 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."),
9793
- 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.`),
9794
- 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.")
9803
+ message: z24.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."),
9804
+ user_id: z24.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`."),
9805
+ queue: z24.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."),
9806
+ workspace_id: z24.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.`),
9807
+ message_ts: z24.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.")
9795
9808
  });
9796
- var scoutSlackSetThreadMutedRequestSchema = z23.object({
9809
+ var scoutSlackSetThreadMutedRequestSchema = z24.object({
9797
9810
  channel_id: slackChannelIdSchema,
9798
9811
  thread_ts: slackThreadTsSchema,
9799
- muted: z23.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
9812
+ muted: z24.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
9800
9813
  });
9801
- var scoutListWorkspacesRequestSchema = z23.object({
9814
+ var scoutListWorkspacesRequestSchema = z24.object({
9802
9815
  channel_id: slackChannelIdSchema,
9803
9816
  thread_ts: slackThreadTsSchema,
9804
- message_ts: z23.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
9805
- 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."),
9806
- query: z23.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace names and pull request URLs.")
9817
+ message_ts: z24.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
9818
+ user_id: z24.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
9819
+ query: z24.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace names and pull request URLs.")
9807
9820
  });
9808
- var scoutSlackConfirmationSchema = z23.object({
9809
- confirmation_channel_id: z23.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
9810
- confirmation_thread_ts: z23.string().describe("`thread_ts` from that message's envelope."),
9811
- confirmation_message_ts: z23.string().describe("`message_ts` from that message's envelope."),
9812
- confirmation_user_id: z23.string().describe("`user_id` from that message's envelope.")
9821
+ var scoutSlackConfirmationSchema = z24.object({
9822
+ confirmation_channel_id: z24.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
9823
+ confirmation_thread_ts: z24.string().describe("`thread_ts` from that message's envelope."),
9824
+ confirmation_message_ts: z24.string().describe("`message_ts` from that message's envelope."),
9825
+ confirmation_user_id: z24.string().describe("`user_id` from that message's envelope.")
9813
9826
  });
9814
9827
  var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
9815
9828
  var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
9816
- preset_id: z23.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
9817
- name: z23.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
9818
- description: z23.string().optional().describe("One-line summary shown in settings."),
9819
- icon: z23.enum(SCOUT_PRESET_ICONS).optional(),
9820
- instructions: z23.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
9829
+ preset_id: z24.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
9830
+ name: z24.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
9831
+ description: z24.string().optional().describe("One-line summary shown in settings."),
9832
+ icon: z24.enum(SCOUT_PRESET_ICONS).optional(),
9833
+ instructions: z24.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
9821
9834
  });
9822
9835
  var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
9823
- source: z23.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
9824
- external_id: z23.string().describe("Slack channel id or Linear team id."),
9825
- monitored: z23.boolean().optional().describe("Linear: `true` starts monitoring the team (organization admins only), `false` stops. Slack: kept for older callers; prefer `proactivity`. `false` means `tagged`, and `true` lifts a `tagged` channel back to the organization's level. Omit to keep it."),
9826
- preset_id: z23.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
9827
- 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."),
9828
- proactivity: z23.enum([...SCOUT_PROACTIVITY_LEVELS, "organization"]).optional().describe("Slack only: this channel's or group DM's own level, overriding the organization's here alone. `organization` makes it follow the organization's level again. Omit to keep it. 1:1 DMs are always addressed to Replicas, so they take no level.")
9836
+ source: z24.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
9837
+ external_id: z24.string().describe("Slack channel id or Linear team id."),
9838
+ monitored: z24.boolean().optional().describe("Linear: `true` starts monitoring the team (organization admins only), `false` stops. Slack: kept for older callers; prefer `proactivity`. `false` means `tagged`, and `true` lifts a `tagged` channel back to the organization's level. Omit to keep it."),
9839
+ preset_id: z24.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
9840
+ instructions: z24.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
9841
+ proactivity: z24.enum([...SCOUT_PROACTIVITY_LEVELS, "organization"]).optional().describe("Slack only: this channel's or group DM's own level, overriding the organization's here alone. `organization` makes it follow the organization's level again. Omit to keep it. 1:1 DMs are always addressed to Replicas, so they take no level.")
9829
9842
  });
9830
9843
  var scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
9831
- proactivity: z23.enum(SCOUT_PROACTIVITY_LEVELS).describe("The level every Slack channel and group DM follows unless it has its own. Slack Connect channels without their own level stay `tagged`.")
9844
+ proactivity: z24.enum(SCOUT_PROACTIVITY_LEVELS).describe("The level every Slack channel and group DM follows unless it has its own. Slack Connect channels without their own level stay `tagged`.")
9832
9845
  });
9833
9846
  var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
9834
- preset_id: z23.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
9847
+ preset_id: z24.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
9835
9848
  });
9836
9849
 
9837
9850
  // ../shared/src/routes/plugin-catalog.ts
@@ -10211,90 +10224,82 @@ var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_ST
10211
10224
  var workspaceSearchOpensClientStateKey = orgUserClientStateKey(WORKSPACE_SEARCH_OPENS_CLIENT_STATE_KEY_PREFIX);
10212
10225
 
10213
10226
  // ../shared/src/routes/workspace-events.ts
10214
- import { z as z24 } from "zod";
10227
+ import { z as z25 } from "zod";
10215
10228
 
10216
10229
  // ../shared/src/workspace-attention.ts
10217
10230
  var WORKSPACE_ATTENTION_REASONS = ["question", "blocked"];
10218
10231
 
10219
10232
  // ../shared/src/routes/workspace-events.ts
10220
- var workspaceTurnCompletionSchema = z24.object({
10221
- workspaceName: z24.string(),
10222
- completedAt: z24.string(),
10223
- processing: z24.boolean().optional(),
10224
- pullRequestFeedback: z24.boolean().optional(),
10225
- attention: z24.object({ reason: z24.enum(WORKSPACE_ATTENTION_REASONS), userId: z24.string() }).optional()
10233
+ var workspaceTurnCompletionSchema = z25.object({
10234
+ workspaceName: z25.string(),
10235
+ completedAt: z25.string(),
10236
+ processing: z25.boolean().optional(),
10237
+ pullRequestFeedback: z25.boolean().optional(),
10238
+ attention: z25.object({ reason: z25.enum(WORKSPACE_ATTENTION_REASONS), userId: z25.string() }).optional()
10226
10239
  });
10227
- var workspaceChangedEventSchema = z24.discriminatedUnion("type", [
10228
- z24.object({
10229
- type: z24.literal("workspace.changed"),
10230
- workspaceId: z24.string(),
10231
- workspace: z24.object({ status: z24.enum(WORKSPACE_STATUSES), last_activity_at: z24.string().nullable() }).optional(),
10240
+ var workspaceChangedEventSchema = z25.discriminatedUnion("type", [
10241
+ z25.object({
10242
+ type: z25.literal("workspace.changed"),
10243
+ workspaceId: z25.string(),
10244
+ workspace: z25.object({ status: z25.enum(WORKSPACE_STATUSES), last_activity_at: z25.string().nullable() }).optional(),
10232
10245
  completion: workspaceTurnCompletionSchema.optional(),
10233
- ts: z24.string()
10246
+ ts: z25.string()
10234
10247
  }),
10235
- z24.object({
10236
- type: z24.literal("workspace.chat.changed"),
10237
- workspaceId: z24.string(),
10238
- chatId: z24.string(),
10239
- ts: z24.string()
10248
+ z25.object({
10249
+ type: z25.literal("workspace.chat.changed"),
10250
+ workspaceId: z25.string(),
10251
+ chatId: z25.string(),
10252
+ ts: z25.string()
10240
10253
  }),
10241
- z24.object({
10242
- type: z24.literal("workspace.chat.advanced"),
10243
- workspaceId: z24.string(),
10244
- chatId: z24.string(),
10245
- afterCursor: z24.string().optional(),
10246
- processing: z24.boolean(),
10247
- ts: z24.string()
10254
+ z25.object({
10255
+ type: z25.literal("workspace.chat.advanced"),
10256
+ workspaceId: z25.string(),
10257
+ chatId: z25.string(),
10258
+ afterCursor: z25.string().optional(),
10259
+ processing: z25.boolean(),
10260
+ ts: z25.string()
10248
10261
  }),
10249
- z24.object({ type: z24.literal("presence.changed"), ts: z24.string() }),
10250
- z24.object({
10251
- type: z24.literal("mobile-testing.changed"),
10252
- workspaceId: z24.string(),
10253
- ts: z24.string()
10262
+ z25.object({ type: z25.literal("presence.changed"), ts: z25.string() }),
10263
+ z25.object({
10264
+ type: z25.literal("mobile-testing.changed"),
10265
+ workspaceId: z25.string(),
10266
+ ts: z25.string()
10254
10267
  }),
10255
- z24.object({
10256
- type: z24.literal("variable-request.changed"),
10257
- workspaceId: z24.string(),
10258
- ts: z24.string()
10268
+ z25.object({
10269
+ type: z25.literal("variable-request.changed"),
10270
+ workspaceId: z25.string(),
10271
+ ts: z25.string()
10259
10272
  }),
10260
- z24.object({
10261
- type: z24.literal("pull-request.changed"),
10262
- prUrl: z24.string(),
10263
- ts: z24.string()
10273
+ z25.object({
10274
+ type: z25.literal("pull-request.changed"),
10275
+ prUrl: z25.string(),
10276
+ ts: z25.string()
10264
10277
  }),
10265
- z24.object({
10266
- type: z24.literal("mothership.subagent.changed"),
10267
- workspaceId: z24.string(),
10268
- subagent: z24.object({ id: z24.string(), name: z24.string(), prUrl: z24.string().nullable() }),
10269
- ts: z24.string()
10278
+ z25.object({
10279
+ type: z25.literal("mothership.subagent.changed"),
10280
+ workspaceId: z25.string(),
10281
+ subagent: z25.object({ id: z25.string(), name: z25.string(), prUrl: z25.string().nullable() }),
10282
+ ts: z25.string()
10270
10283
  })
10271
10284
  ]);
10272
10285
 
10273
10286
  // ../shared/src/routes/presence.ts
10274
- import { z as z25 } from "zod";
10275
- var presenceStatusSchema = z25.enum(["online", "typing"]);
10276
- var presenceLocationSchema = z25.object({
10277
- workspaceId: z25.string().optional()
10287
+ import { z as z26 } from "zod";
10288
+ var presenceStatusSchema = z26.enum(["online", "typing"]);
10289
+ var presenceLocationSchema = z26.object({
10290
+ workspaceId: z26.string().optional()
10278
10291
  });
10279
- var presenceEntrySchema = z25.object({
10280
- userId: z25.string(),
10292
+ var presenceEntrySchema = z26.object({
10293
+ userId: z26.string(),
10281
10294
  status: presenceStatusSchema,
10282
10295
  location: presenceLocationSchema,
10283
- ts: z25.string()
10296
+ ts: z26.string()
10284
10297
  });
10285
- var updatePresenceRequestSchema = z25.object({
10298
+ var updatePresenceRequestSchema = z26.object({
10286
10299
  status: presenceStatusSchema,
10287
10300
  location: presenceLocationSchema.optional()
10288
10301
  });
10289
10302
 
10290
- // ../shared/src/routes/pull-requests.ts
10291
- import { z as z26 } from "zod";
10292
- var PULL_REQUEST_MERGE_METHODS = ["merge", "squash", "rebase"];
10293
- var mergePullRequestRequestSchema = z26.object({
10294
- mergeMethod: z26.enum(PULL_REQUEST_MERGE_METHODS).optional(),
10295
- bypassRules: z26.boolean().optional()
10296
- });
10297
-
10298
10303
  // ../shared/src/routes/review-messages.ts
10299
10304
  import { z as z27 } from "zod";
10300
10305
  var sendPullRequestReviewMessageRequestSchema = z27.object({