replicas-engine 0.1.1296 → 0.1.1297
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-6FYWPUOM.js → asp-host-H65IEB3U.js} +5 -5
- package/dist/src/{chunk-OCOIXNER.js → chunk-45DWBRYV.js} +2 -2
- package/dist/src/{chunk-ZNRUYJCQ.js → chunk-64AMDDNX.js} +2 -2
- package/dist/src/{chunk-JPQ2UW3B.js → chunk-CULXAMHI.js} +6 -6
- package/dist/src/{chunk-Q5KCYMUE.js → chunk-FNGZVOD4.js} +372 -367
- package/dist/src/{chunk-TBKEZB4T.js → chunk-JXYPBRHP.js} +1 -1
- package/dist/src/{chunk-EBKIWJLA.js → chunk-Z46UUGHD.js} +1 -1
- package/dist/src/{chunk-7URL5D26.js → chunk-ZJ5W3MDQ.js} +2 -2
- package/dist/src/{chunk-7QO3HM4H.js → chunk-ZJXG4VN4.js} +2 -2
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +8 -8
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -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 =
|
|
1963
|
-
coding_agent:
|
|
1964
|
-
model:
|
|
1965
|
-
thinking_level:
|
|
1966
|
-
service_tier:
|
|
1967
|
-
goal_mode:
|
|
1968
|
-
plan_mode:
|
|
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
|
|
2177
|
-
var headlessAgentRequestSchema =
|
|
2178
|
-
mode:
|
|
2179
|
-
agent:
|
|
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:
|
|
2183
|
-
prompt:
|
|
2184
|
-
workingDirectory:
|
|
2185
|
-
timeoutSeconds:
|
|
2186
|
-
thinkingLevel:
|
|
2187
|
-
codexOauthTokens:
|
|
2188
|
-
outputSchema:
|
|
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
|
|
2280
|
+
import { z as z9 } from "zod";
|
|
2268
2281
|
var WORKSPACE_CREDENTIAL_PROVIDERS = ["claude", "codex"];
|
|
2269
|
-
var workspaceCredentialProviderSchema =
|
|
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:
|
|
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
|
|
2296
|
+
import { z as z11 } from "zod";
|
|
2284
2297
|
|
|
2285
2298
|
// ../shared/src/fallback-chains.ts
|
|
2286
|
-
import { z as
|
|
2287
|
-
var fallbackHarnessStepSchema =
|
|
2288
|
-
kind:
|
|
2289
|
-
provider:
|
|
2290
|
-
model:
|
|
2291
|
-
thinkingLevel:
|
|
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 =
|
|
2294
|
-
|
|
2295
|
-
kind:
|
|
2296
|
-
methods:
|
|
2297
|
-
models:
|
|
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 =
|
|
2314
|
+
var fallbackPlanResponseSchema = z10.object({ steps: z10.array(fallbackPlanStepSchema) });
|
|
2302
2315
|
|
|
2303
2316
|
// ../shared/src/chat-fork.ts
|
|
2304
|
-
var fallbackReasonSchema =
|
|
2305
|
-
var chatForkInfoSchema =
|
|
2306
|
-
source:
|
|
2307
|
-
chatId:
|
|
2308
|
-
provider:
|
|
2309
|
-
title:
|
|
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:
|
|
2324
|
+
trigger: z11.enum(["manual", "auto", "side", "switch"]),
|
|
2312
2325
|
reason: fallbackReasonSchema.optional(),
|
|
2313
|
-
state:
|
|
2314
|
-
error:
|
|
2315
|
-
startedAt:
|
|
2316
|
-
completedAt:
|
|
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 =
|
|
2323
|
-
provider:
|
|
2324
|
-
model:
|
|
2325
|
-
thinkingLevel:
|
|
2326
|
-
title:
|
|
2327
|
-
message:
|
|
2328
|
-
id:
|
|
2329
|
-
clientRequestId:
|
|
2330
|
-
enableInteractiveTools:
|
|
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:
|
|
2333
|
-
senderEmail:
|
|
2334
|
-
senderDisplayName:
|
|
2335
|
-
senderAvatarUrl:
|
|
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 =
|
|
2348
|
-
provider:
|
|
2360
|
+
var agentQuotaExhaustedPayloadSchema = z11.object({
|
|
2361
|
+
provider: z11.enum(VALID_AGENT_PROVIDERS),
|
|
2349
2362
|
reason: fallbackReasonSchema,
|
|
2350
|
-
detail:
|
|
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
|
|
2379
|
-
var engineCredentialRefreshFailureSchema =
|
|
2380
|
-
code:
|
|
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
|
|
2398
|
+
import { z as z13 } from "zod";
|
|
2386
2399
|
var MAX_CREDENTIAL_POOL_ACCOUNTS = 10;
|
|
2387
|
-
var reorderCredentialPoolSchema =
|
|
2388
|
-
credential_ids:
|
|
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
|
|
2405
|
+
import { z as z20 } from "zod";
|
|
2393
2406
|
|
|
2394
2407
|
// ../shared/src/replicas-mcp.ts
|
|
2395
|
-
import { z as
|
|
2408
|
+
import { z as z17 } from "zod";
|
|
2396
2409
|
|
|
2397
2410
|
// ../shared/src/automations/trigger-schemas.ts
|
|
2398
|
-
import { z as
|
|
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 =
|
|
2416
|
-
event:
|
|
2417
|
-
repository_ids:
|
|
2418
|
-
group_pr_events:
|
|
2419
|
-
excluded_actors:
|
|
2420
|
-
reviewer_logins:
|
|
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 =
|
|
2423
|
-
var githubTriggerSchema =
|
|
2424
|
-
type:
|
|
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 =
|
|
2431
|
-
var automationTriggerSchema =
|
|
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
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
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
|
|
2458
|
+
import { z as z15 } from "zod";
|
|
2446
2459
|
var ENVIRONMENT_MCP_TRANSPORTS = ["stdio", "http", "sse"];
|
|
2447
|
-
var stringMap =
|
|
2448
|
-
var createEnvironmentMcpRequestSchema =
|
|
2449
|
-
name:
|
|
2450
|
-
transport:
|
|
2451
|
-
config:
|
|
2452
|
-
|
|
2453
|
-
|
|
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 =
|
|
2458
|
-
var createEnvironmentDeviceRequestSchema =
|
|
2459
|
-
name:
|
|
2460
|
-
host:
|
|
2461
|
-
port:
|
|
2462
|
-
username:
|
|
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:
|
|
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 =
|
|
2469
|
-
name:
|
|
2470
|
-
host:
|
|
2471
|
-
port:
|
|
2472
|
-
username:
|
|
2473
|
-
private_key:
|
|
2474
|
-
screen_password:
|
|
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
|
|
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 =
|
|
2490
|
-
command:
|
|
2491
|
-
timeout_seconds:
|
|
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 =
|
|
2494
|
-
var terminalSocketServerMessageSchema =
|
|
2495
|
-
|
|
2496
|
-
|
|
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
|
-
|
|
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 =
|
|
2543
|
-
name:
|
|
2544
|
-
prompt:
|
|
2545
|
-
environment_id:
|
|
2546
|
-
triggers:
|
|
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:
|
|
2550
|
-
plan_mode:
|
|
2551
|
-
goal_mode:
|
|
2552
|
-
fast_mode:
|
|
2553
|
-
workspace_lifecycle_policy:
|
|
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:
|
|
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:
|
|
2562
|
-
enabled:
|
|
2563
|
-
agent_provider:
|
|
2564
|
-
model:
|
|
2565
|
-
thinking_level:
|
|
2566
|
-
workspace_size:
|
|
2567
|
-
scope:
|
|
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:
|
|
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 =
|
|
2572
|
-
var forkChatToolInputSchema =
|
|
2573
|
-
var renameChatToolInputSchema =
|
|
2574
|
-
var runCommandToolInputSchema =
|
|
2575
|
-
var environmentMcpPath = { environment_id:
|
|
2576
|
-
var createEnvironmentMcpToolInputSchema =
|
|
2577
|
-
var updateEnvironmentMcpToolInputSchema =
|
|
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:
|
|
2592
|
+
mcp_id: z17.string().describe("MCP ID"),
|
|
2580
2593
|
...updateEnvironmentMcpRequestSchema.shape
|
|
2581
2594
|
});
|
|
2582
|
-
var createEnvironmentDeviceToolInputSchema =
|
|
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
|
|
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 ?
|
|
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 ?
|
|
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 =
|
|
2932
|
-
var existingTriggerSchema =
|
|
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 =
|
|
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(
|
|
2947
|
-
return
|
|
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:
|
|
2950
|
-
automation_id:
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
3005
|
-
key:
|
|
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:
|
|
3020
|
+
required: z18.boolean().default(false)
|
|
3008
3021
|
}), limits.variables).default([]),
|
|
3009
3022
|
automations: automationListSchema(limits),
|
|
3010
|
-
verification: list(
|
|
3023
|
+
verification: list(z18.object({
|
|
3011
3024
|
label: requiredText(limits.nameChars),
|
|
3012
|
-
status:
|
|
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(
|
|
3016
|
-
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 =
|
|
3024
|
-
status:
|
|
3025
|
-
steps:
|
|
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:
|
|
3028
|
-
applied_at:
|
|
3029
|
-
automation_ids:
|
|
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 =
|
|
3045
|
+
var applyEnvironmentSetupRequestSchema = z18.object({
|
|
3033
3046
|
environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
|
|
3034
|
-
variables: list(
|
|
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
|
|
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 =
|
|
3518
|
-
var createComputeSandboxRequestSchema =
|
|
3519
|
-
kind:
|
|
3520
|
-
gpu:
|
|
3521
|
-
image:
|
|
3522
|
-
timeoutMinutes:
|
|
3523
|
-
idleTimeoutMinutes:
|
|
3524
|
-
ports:
|
|
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 =
|
|
3528
|
-
command:
|
|
3529
|
-
workdir:
|
|
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:
|
|
3544
|
+
detach: z19.boolean().optional()
|
|
3532
3545
|
});
|
|
3533
|
-
var computeUploadRequestSchema =
|
|
3534
|
-
size:
|
|
3546
|
+
var computeUploadRequestSchema = z19.object({
|
|
3547
|
+
size: z19.number().int().min(1).max(COMPUTE_SANDBOX_LIMITS.maxTransferBytes)
|
|
3535
3548
|
});
|
|
3536
|
-
var computeTransferPathSchema =
|
|
3537
|
-
path:
|
|
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 =
|
|
5177
|
-
id:
|
|
5178
|
-
at:
|
|
5179
|
-
kind:
|
|
5180
|
-
agentId:
|
|
5181
|
-
agentName:
|
|
5182
|
-
summary:
|
|
5183
|
-
detail:
|
|
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:
|
|
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
|
|
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 =
|
|
5998
|
-
skills:
|
|
6010
|
+
var learnedSkillsManifestSchema = z21.object({
|
|
6011
|
+
skills: z21.array(z21.object({ name: z21.string(), sha256: z21.string() }))
|
|
5999
6012
|
});
|
|
6000
|
-
var dreamVerdictChecksSchema =
|
|
6001
|
-
repeatable:
|
|
6002
|
-
realInstruction:
|
|
6003
|
-
noContradiction:
|
|
6004
|
-
formatExact:
|
|
6005
|
-
humanOnly:
|
|
6006
|
-
actionable:
|
|
6007
|
-
durable:
|
|
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:
|
|
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
|
|
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 =
|
|
9508
|
-
branch:
|
|
9509
|
-
defaultBranch:
|
|
9510
|
-
pushBranch:
|
|
9511
|
-
pushConfig:
|
|
9512
|
-
headMessage:
|
|
9513
|
-
mergeInProgress:
|
|
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 =
|
|
9516
|
-
provider:
|
|
9517
|
-
source:
|
|
9518
|
-
toolName:
|
|
9519
|
-
toolInput:
|
|
9520
|
-
command:
|
|
9521
|
-
cwd:
|
|
9522
|
-
toolUseId:
|
|
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:
|
|
9526
|
-
repos:
|
|
9527
|
-
messageFiles:
|
|
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
|
|
9725
|
-
var linearSessionMetadataSchema =
|
|
9726
|
-
via_mothership:
|
|
9727
|
-
issue_id:
|
|
9728
|
-
issue_identifier:
|
|
9729
|
-
issue_title:
|
|
9730
|
-
issue_description:
|
|
9731
|
-
issue_url:
|
|
9732
|
-
comment_id:
|
|
9733
|
-
comment_body:
|
|
9734
|
-
triggered_by_id:
|
|
9735
|
-
triggered_by_name:
|
|
9736
|
-
triggered_by_email:
|
|
9737
|
-
linear_workspace_id:
|
|
9738
|
-
creator_id:
|
|
9739
|
-
creator_name:
|
|
9740
|
-
creator_email:
|
|
9741
|
-
assignee_id:
|
|
9742
|
-
assignee_name:
|
|
9743
|
-
assignee_email:
|
|
9744
|
-
issue_state:
|
|
9745
|
-
parent_issue:
|
|
9746
|
-
id:
|
|
9747
|
-
identifier:
|
|
9748
|
-
title:
|
|
9749
|
-
description:
|
|
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:
|
|
9752
|
-
id:
|
|
9753
|
-
coding_agent:
|
|
9754
|
-
task_description:
|
|
9755
|
-
created_at:
|
|
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
|
|
9773
|
+
import { z as z24 } from "zod";
|
|
9761
9774
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
9762
|
-
var scoutLinearSessionIntentRequestSchema =
|
|
9763
|
-
comment_id:
|
|
9764
|
-
action:
|
|
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 =
|
|
9767
|
-
issue_id:
|
|
9768
|
-
agent_session_id:
|
|
9769
|
-
prompt:
|
|
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 =
|
|
9772
|
-
var slackThreadTsSchema =
|
|
9773
|
-
var scoutSlackSpawnRequestSchema =
|
|
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:
|
|
9777
|
-
user_id:
|
|
9778
|
-
prompt:
|
|
9779
|
-
acknowledgement_ts:
|
|
9780
|
-
environment_id:
|
|
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:
|
|
9784
|
-
prompt:
|
|
9785
|
-
acknowledgement_ts:
|
|
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 =
|
|
9800
|
+
var scoutSlackRelayRequestSchema = z24.object({
|
|
9788
9801
|
channel_id: slackChannelIdSchema,
|
|
9789
9802
|
thread_ts: slackThreadTsSchema,
|
|
9790
|
-
message:
|
|
9791
|
-
user_id:
|
|
9792
|
-
queue:
|
|
9793
|
-
workspace_id:
|
|
9794
|
-
message_ts:
|
|
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 =
|
|
9809
|
+
var scoutSlackSetThreadMutedRequestSchema = z24.object({
|
|
9797
9810
|
channel_id: slackChannelIdSchema,
|
|
9798
9811
|
thread_ts: slackThreadTsSchema,
|
|
9799
|
-
muted:
|
|
9812
|
+
muted: z24.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
|
|
9800
9813
|
});
|
|
9801
|
-
var scoutListWorkspacesRequestSchema =
|
|
9814
|
+
var scoutListWorkspacesRequestSchema = z24.object({
|
|
9802
9815
|
channel_id: slackChannelIdSchema,
|
|
9803
9816
|
thread_ts: slackThreadTsSchema,
|
|
9804
|
-
message_ts:
|
|
9805
|
-
user_id:
|
|
9806
|
-
query:
|
|
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 =
|
|
9809
|
-
confirmation_channel_id:
|
|
9810
|
-
confirmation_thread_ts:
|
|
9811
|
-
confirmation_message_ts:
|
|
9812
|
-
confirmation_user_id:
|
|
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:
|
|
9817
|
-
name:
|
|
9818
|
-
description:
|
|
9819
|
-
icon:
|
|
9820
|
-
instructions:
|
|
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:
|
|
9824
|
-
external_id:
|
|
9825
|
-
monitored:
|
|
9826
|
-
preset_id:
|
|
9827
|
-
instructions:
|
|
9828
|
-
proactivity:
|
|
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:
|
|
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:
|
|
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
|
|
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 =
|
|
10221
|
-
workspaceName:
|
|
10222
|
-
completedAt:
|
|
10223
|
-
processing:
|
|
10224
|
-
pullRequestFeedback:
|
|
10225
|
-
attention:
|
|
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 =
|
|
10228
|
-
|
|
10229
|
-
type:
|
|
10230
|
-
workspaceId:
|
|
10231
|
-
workspace:
|
|
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:
|
|
10246
|
+
ts: z25.string()
|
|
10234
10247
|
}),
|
|
10235
|
-
|
|
10236
|
-
type:
|
|
10237
|
-
workspaceId:
|
|
10238
|
-
chatId:
|
|
10239
|
-
ts:
|
|
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
|
-
|
|
10242
|
-
type:
|
|
10243
|
-
workspaceId:
|
|
10244
|
-
chatId:
|
|
10245
|
-
afterCursor:
|
|
10246
|
-
processing:
|
|
10247
|
-
ts:
|
|
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
|
-
|
|
10250
|
-
|
|
10251
|
-
type:
|
|
10252
|
-
workspaceId:
|
|
10253
|
-
ts:
|
|
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
|
-
|
|
10256
|
-
type:
|
|
10257
|
-
workspaceId:
|
|
10258
|
-
ts:
|
|
10268
|
+
z25.object({
|
|
10269
|
+
type: z25.literal("variable-request.changed"),
|
|
10270
|
+
workspaceId: z25.string(),
|
|
10271
|
+
ts: z25.string()
|
|
10259
10272
|
}),
|
|
10260
|
-
|
|
10261
|
-
type:
|
|
10262
|
-
prUrl:
|
|
10263
|
-
ts:
|
|
10273
|
+
z25.object({
|
|
10274
|
+
type: z25.literal("pull-request.changed"),
|
|
10275
|
+
prUrl: z25.string(),
|
|
10276
|
+
ts: z25.string()
|
|
10264
10277
|
}),
|
|
10265
|
-
|
|
10266
|
-
type:
|
|
10267
|
-
workspaceId:
|
|
10268
|
-
subagent:
|
|
10269
|
-
ts:
|
|
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
|
|
10275
|
-
var presenceStatusSchema =
|
|
10276
|
-
var presenceLocationSchema =
|
|
10277
|
-
workspaceId:
|
|
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 =
|
|
10280
|
-
userId:
|
|
10292
|
+
var presenceEntrySchema = z26.object({
|
|
10293
|
+
userId: z26.string(),
|
|
10281
10294
|
status: presenceStatusSchema,
|
|
10282
10295
|
location: presenceLocationSchema,
|
|
10283
|
-
ts:
|
|
10296
|
+
ts: z26.string()
|
|
10284
10297
|
});
|
|
10285
|
-
var updatePresenceRequestSchema =
|
|
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({
|