replicas-engine 0.1.1600 → 0.1.1603

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.
@@ -1116,17 +1116,17 @@ var require_luxon = __commonJS({
1116
1116
  constructor(dt, intl, opts) {
1117
1117
  this.opts = opts;
1118
1118
  this.originalZone = void 0;
1119
- let z43 = void 0;
1119
+ let z45 = void 0;
1120
1120
  if (this.opts.timeZone) {
1121
1121
  this.dt = dt;
1122
1122
  } else if (dt.zone.type === "fixed") {
1123
1123
  const gmtOffset = -1 * (dt.offset / 60);
1124
1124
  const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
1125
1125
  if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
1126
- z43 = offsetZ;
1126
+ z45 = offsetZ;
1127
1127
  this.dt = dt;
1128
1128
  } else {
1129
- z43 = "UTC";
1129
+ z45 = "UTC";
1130
1130
  this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({
1131
1131
  minutes: dt.offset
1132
1132
  });
@@ -1136,9 +1136,9 @@ var require_luxon = __commonJS({
1136
1136
  this.dt = dt;
1137
1137
  } else if (dt.zone.type === "iana") {
1138
1138
  this.dt = dt;
1139
- z43 = dt.zone.name;
1139
+ z45 = dt.zone.name;
1140
1140
  } else {
1141
- z43 = "UTC";
1141
+ z45 = "UTC";
1142
1142
  this.dt = dt.setZone("UTC").plus({
1143
1143
  minutes: dt.offset
1144
1144
  });
@@ -1147,7 +1147,7 @@ var require_luxon = __commonJS({
1147
1147
  const intlOpts = {
1148
1148
  ...this.opts
1149
1149
  };
1150
- intlOpts.timeZone = intlOpts.timeZone || z43;
1150
+ intlOpts.timeZone = intlOpts.timeZone || z45;
1151
1151
  this.dtf = getCachedDTF(intl, intlOpts);
1152
1152
  }
1153
1153
  format() {
@@ -9381,6 +9381,7 @@ var WEB_APP_PATHS = {
9381
9381
  accountIntegrations: `${DASHBOARD_PATH}/account/integrations`,
9382
9382
  accountApiKeys: `${DASHBOARD_PATH}/account/api-keys`,
9383
9383
  accountPreferences: `${DASHBOARD_PATH}/account/preferences`,
9384
+ accountKeyboardShortcuts: `${DASHBOARD_PATH}/account/keyboard-shortcuts`,
9384
9385
  fullscreenWorkspaces: "/workspaces"
9385
9386
  };
9386
9387
  var UUID_PATTERN = "????????-????-????-????-????????????";
@@ -10947,7 +10948,7 @@ var ENGINE_SLEEP_PATH = "/lifecycle/sleep";
10947
10948
  var updateChatDisplayNameRequestSchema = z9.object({
10948
10949
  displayName: z9.string().trim().min(1).max(100)
10949
10950
  });
10950
- var createChatRequestSchema = z9.object({
10951
+ var createChatFields = z9.object({
10951
10952
  id: z9.string().uuid().optional(),
10952
10953
  createdAt: z9.string().datetime().optional(),
10953
10954
  provider: z9.enum(ENGINE_AGENT_PROVIDERS),
@@ -10958,9 +10959,11 @@ var createChatRequestSchema = z9.object({
10958
10959
  kind: z9.enum(CHAT_KINDS).optional(),
10959
10960
  sideChat: z9.boolean().optional(),
10960
10961
  clientRequestId: z9.string().min(1).max(128).optional()
10961
- }).refine((request) => !request.sideChat || request.forkSourceChatId !== void 0 && request.parentChatId === request.forkSourceChatId, {
10962
+ });
10963
+ var createChatRequestSchema = createChatFields.refine((request) => !request.sideChat || request.forkSourceChatId !== void 0 && request.parentChatId === request.forkSourceChatId, {
10962
10964
  message: "A side chat must fork its parent chat"
10963
10965
  });
10966
+ var createHarnessChatRequestSchema = createChatFields.pick({ id: true, title: true }).extend({ provider: z9.literal(AGENT.REPLICAS) });
10964
10967
  var spawnSubagentRequestSchema = z9.object({
10965
10968
  provider: z9.enum(ENGINE_AGENT_PROVIDERS),
10966
10969
  prompt: z9.string().min(1),
@@ -13147,7 +13150,7 @@ Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~
13147
13150
  | Piece | When it runs | Put here |
13148
13151
  | --- | --- | --- |
13149
13152
  | **Warm hook** | Once, while Replicas builds the warm-pool snapshot for the environment. Its *filesystem* state is baked into every new workspace; its *processes* are not. Default timeout 60 minutes. | Slow, deterministic setup: dependency installs from the lockfile, toolchain downloads, \`docker pull\`, one-time builds, code generation. |
13150
- | **Start hook** | On every workspace boot, before the agent starts working. Default timeout 5 minutes. | Fast per-boot reconciliation: start daemons and databases, run migrations against local services, launch dev servers with \`replicas service start\`, health checks. Must be idempotent. |
13153
+ | **Start hook** | On every workspace boot, alongside the agent, which is told to wait for it before using the setup. Default timeout 5 minutes. | Fast per-boot reconciliation: start daemons and databases, run migrations against local services, launch dev servers with \`replicas service start\`, health checks. Must be idempotent. |
13151
13154
  | **System prompt** | Injected into the agent's instructions for every workspace in the environment. | Only what an agent cannot learn from the repository itself: team conventions, review expectations, how to verify, gotchas you hit while setting up. |
13152
13155
  | **Variables** | Exported into every workspace (and available inside hooks). Values are encrypted. | API keys, tokens, feature flags, local service URLs. |
13153
13156
  | **Files** | Materialized on the workspace filesystem at boot. | \`.env\` files, dotfiles, config that must not be committed. |
@@ -15373,6 +15376,7 @@ var DEFAULT_USER_PREFERENCES = {
15373
15376
  appshot_shortcut: "command",
15374
15377
  appshot_destination: "automatic",
15375
15378
  appshot_sound: true,
15379
+ keyboard_shortcuts: {},
15376
15380
  mothership_tour_seen: false,
15377
15381
  slack_settings_moved_notice: false,
15378
15382
  mothership_board_opened: false,
@@ -15388,7 +15392,10 @@ var DEFAULT_USER_PREFERENCES = {
15388
15392
  workspace_alerts: {},
15389
15393
  automation_alerts: {},
15390
15394
  push_types: { needs_you: true, finished: true, automations: true, usage_limit: true },
15391
- push_when_active: "wait"
15395
+ push_when_active: "wait",
15396
+ chat_text_size: "default",
15397
+ app_font: "inter",
15398
+ code_font: "geist-mono"
15392
15399
  };
15393
15400
  function defaultReplicasAgentAbilities() {
15394
15401
  const abilities = {};
@@ -18911,6 +18918,101 @@ var TaskAccumulator = class {
18911
18918
  }
18912
18919
  };
18913
18920
 
18921
+ // ../shared/src/display-message/parsers/replicas-parser.ts
18922
+ var HARNESS_EVENT_TYPE_PREFIX = "harness-";
18923
+ function contentBlocks(value) {
18924
+ return Array.isArray(value) ? value.filter(isRecord) : [];
18925
+ }
18926
+ function blockImages(blocks) {
18927
+ return blocks.flatMap((block) => block.type === "image" && typeof block.data === "string" && typeof block.mimeType === "string" ? [{ type: "image", mediaType: block.mimeType, data: block.data }] : []);
18928
+ }
18929
+ function toolCallMessage(id, name, args, timestamp, result) {
18930
+ const status = !result ? "in_progress" : result.isError ? "failed" : "completed";
18931
+ if (name === "bash" && typeof args.command === "string") {
18932
+ return { id, type: "command", command: args.command, output: result?.output, ...result?.exitCode !== void 0 ? { exitCode: result.exitCode } : {}, status, timestamp };
18933
+ }
18934
+ if ((name === "write" || name === "edit") && typeof args.path === "string") {
18935
+ return { id, type: "file_change", changes: [{ path: args.path, kind: name === "write" ? "add" : "update" }], status, timestamp };
18936
+ }
18937
+ return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp });
18938
+ }
18939
+ function parseReplicasEvents(events) {
18940
+ const messages = [];
18941
+ const toolCalls = /* @__PURE__ */ new Map();
18942
+ const lastSavedAssistantMs = Math.max(0, ...events.filter((event) => event.type === `${HARNESS_EVENT_TYPE_PREFIX}assistant_message`).map((event) => Date.parse(event.timestamp)));
18943
+ events.forEach((event) => {
18944
+ const { payload, timestamp } = event;
18945
+ const message2 = isRecord(payload.message) ? payload.message : {};
18946
+ switch (event.type) {
18947
+ // The client's copy of a sent prompt, shown until the worker saves it under the same message id.
18948
+ case "event_msg": {
18949
+ if (payload.type !== "user_message" || typeof payload.message !== "string") return;
18950
+ const images = userMessageImages(payload.images);
18951
+ messages.push({ id: getUserMessageId(event) ?? `replicas-pending-${timestamp}`, type: "user", content: payload.message, ...images ? { images } : {}, timestamp });
18952
+ return;
18953
+ }
18954
+ case `${HARNESS_EVENT_TYPE_PREFIX}user_message`: {
18955
+ const images = blockImages(contentBlocks(message2.content));
18956
+ const messageId = payload[USER_MESSAGE_ID_PAYLOAD_KEY];
18957
+ messages.push({
18958
+ id: typeof messageId === "string" ? messageId : `replicas-user-${String(payload.seq)}`,
18959
+ type: "user",
18960
+ content: extractToolResultText(message2.content),
18961
+ ...images.length ? { images } : {},
18962
+ timestamp
18963
+ });
18964
+ return;
18965
+ }
18966
+ case `${HARNESS_EVENT_TYPE_PREFIX}assistant_message`: {
18967
+ contentBlocks(message2.content).forEach((block, blockIndex) => {
18968
+ const id = `replicas-${String(payload.seq)}-${blockIndex}`;
18969
+ if (block.type === "text" && typeof block.text === "string" && block.text) messages.push({ id, type: "agent", content: block.text, timestamp });
18970
+ if (block.type === "thinking" && typeof block.thinking === "string" && block.thinking) messages.push({ id, type: "reasoning", content: block.thinking, status: "completed", timestamp });
18971
+ if (block.type === "toolCall" && typeof block.id === "string" && typeof block.name === "string") {
18972
+ const call = { name: block.name, args: isRecord(block.arguments) ? block.arguments : {}, timestamp };
18973
+ toolCalls.set(block.id, call);
18974
+ messages.push(toolCallMessage(`replicas-tool-${block.id}`, call.name, call.args, timestamp));
18975
+ }
18976
+ });
18977
+ if (message2.stopReason === "error") {
18978
+ messages.push({
18979
+ id: `replicas-error-${String(payload.seq)}`,
18980
+ type: "error",
18981
+ message: formatInferenceError(typeof message2.errorMessage === "string" && message2.errorMessage ? message2.errorMessage : "The model request failed", {
18982
+ ...typeof message2.provider === "string" ? { provider: message2.provider } : {},
18983
+ ...typeof message2.model === "string" ? { model: message2.model } : {}
18984
+ }),
18985
+ timestamp
18986
+ });
18987
+ }
18988
+ return;
18989
+ }
18990
+ case `${HARNESS_EVENT_TYPE_PREFIX}tool_result`: {
18991
+ if (typeof message2.toolCallId !== "string") return;
18992
+ const call = toolCalls.get(message2.toolCallId) ?? { name: typeof message2.toolName === "string" ? message2.toolName : "tool", args: {}, timestamp };
18993
+ const exitCode = isRecord(message2.details) && typeof message2.details.exitCode === "number" ? message2.details.exitCode : void 0;
18994
+ upsertDisplayMessage(messages, toolCallMessage(`replicas-tool-${message2.toolCallId}`, call.name, call.args, call.timestamp, {
18995
+ output: extractToolResultText(message2.content) || void 0,
18996
+ isError: message2.isError === true,
18997
+ exitCode
18998
+ }));
18999
+ return;
19000
+ }
19001
+ case `${HARNESS_EVENT_TYPE_PREFIX}error`:
19002
+ messages.push({ id: `replicas-error-${String(payload.seq)}`, type: "error", message: stringifyDisplayValue(payload.message) ?? "The agent stopped with an error", timestamp });
19003
+ return;
19004
+ case CLAUDE_PARTIAL_MESSAGE_EVENT_TYPE: {
19005
+ const partial = coerceClaudePartialMessagePayload(payload);
19006
+ if (!partial || Date.parse(event.timestamp) <= lastSavedAssistantMs) return;
19007
+ if (partial.thinking) upsertDisplayMessage(messages, { id: `replicas-partial-${partial.streamId}-thinking`, type: "reasoning", content: partial.thinking, status: "in_progress", timestamp });
19008
+ if (partial.text) upsertDisplayMessage(messages, { id: `replicas-partial-${partial.streamId}`, type: "agent", content: partial.text, timestamp });
19009
+ return;
19010
+ }
19011
+ }
19012
+ });
19013
+ return messages;
19014
+ }
19015
+
18914
19016
  // ../shared/src/display-message/parsers/claude-parser.ts
18915
19017
  var ABORTED_TERMINAL_REASONS = /* @__PURE__ */ new Set(["aborted_streaming", "aborted_tools"]);
18916
19018
  var COMMAND_TOOL_NAMES = /* @__PURE__ */ new Set(["Bash", "bash", "shell"]);
@@ -19228,7 +19330,7 @@ function parseClaudeEvents(events, parentToolUseId) {
19228
19330
  }
19229
19331
  if (event.type === "claude-assistant") {
19230
19332
  const messageId = event.payload.message?.id;
19231
- const contentBlocks = normalizeContentBlocks(event.payload.message?.content);
19333
+ const contentBlocks2 = normalizeContentBlocks(event.payload.message?.content);
19232
19334
  const messageKey = messageId || event.timestamp;
19233
19335
  const localCommand = event.payload.local_command_run;
19234
19336
  const goalArgs = isRecord(localCommand) && localCommand.command === GOAL_TOOL_NAME && typeof localCommand.args === "string" ? localCommand.args.trim() : "";
@@ -19250,12 +19352,12 @@ function parseClaudeEvents(events, parentToolUseId) {
19250
19352
  if (liveStreamId !== null && liveStreamId !== messageId) {
19251
19353
  supersededStreamIds.add(liveStreamId);
19252
19354
  }
19253
- if (contentBlocks.some((block) => block.type === "text" && block.text)) {
19355
+ if (contentBlocks2.some((block) => block.type === "text" && block.text)) {
19254
19356
  completedStreamIds.add(messageId);
19255
19357
  liveStreamId = null;
19256
19358
  }
19257
19359
  }
19258
- const thinkingBlocks = contentBlocks.flatMap(
19360
+ const thinkingBlocks = contentBlocks2.flatMap(
19259
19361
  (block) => block.type === "thinking" && typeof block.thinking === "string" ? [block.thinking] : []
19260
19362
  );
19261
19363
  if (thinkingBlocks.length > 0) {
@@ -19275,7 +19377,7 @@ function parseClaudeEvents(events, parentToolUseId) {
19275
19377
  upsertMessage(reasoningMessage);
19276
19378
  }
19277
19379
  }
19278
- contentBlocks.forEach((block) => {
19380
+ contentBlocks2.forEach((block) => {
19279
19381
  if (block.type === "text" && block.text) {
19280
19382
  const textIndex = assistantTextCounts.get(messageKey) ?? 0;
19281
19383
  assistantTextCounts.set(messageKey, textIndex + 1);
@@ -19571,6 +19673,9 @@ function parseProviderEvents(events, agentType, parentToolUseId) {
19571
19673
  if (agentType === "pi") {
19572
19674
  return parsePiEvents(events);
19573
19675
  }
19676
+ if (agentType === "replicas") {
19677
+ return parseReplicasEvents(events);
19678
+ }
19574
19679
  return parseClaudeEvents(events, parentToolUseId);
19575
19680
  }
19576
19681
  function parseDisplayMessages(events, agentType, options = {}) {
@@ -20476,7 +20581,7 @@ var VOICE_WAVEFORM = {
20476
20581
  };
20477
20582
 
20478
20583
  // ../shared/src/e2b.ts
20479
- var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-16-v15";
20584
+ var E2B_TEMPLATE_NAME = "replicas-sandbox-2026-11-16-v19";
20480
20585
 
20481
20586
  // ../shared/src/e2b-retry.ts
20482
20587
  var DEFAULT_BACKOFFS_MS = [2e3, 5e3];
@@ -20759,9 +20864,9 @@ var KEYBOARD_SHORTCUTS = {
20759
20864
  keys: { key: "ArrowDown", mod: true, alt: true, shift: true },
20760
20865
  linuxKeys: { key: "ArrowDown", alt: true, shift: true }
20761
20866
  },
20762
- jumpToWorkspace: { label: "Workspace 1\u20139 in the sidebar", group: "Navigation", desktopKeys: { key: "1", mod: true } },
20763
- goBack: { label: "Back", group: "Navigation", desktopKeys: { key: "[", mod: true } },
20764
- goForward: { label: "Forward", group: "Navigation", desktopKeys: { key: "]", mod: true } },
20867
+ jumpToWorkspace: { label: "Workspace 1\u20139 in the sidebar", group: "Navigation", desktopKeys: { key: "1", mod: true }, fixed: true },
20868
+ goBack: { label: "Back", group: "Navigation", desktopKeys: { key: "[", mod: true }, fixed: true },
20869
+ goForward: { label: "Forward", group: "Navigation", desktopKeys: { key: "]", mod: true }, fixed: true },
20765
20870
  stopAgent: { label: "Stop the agent", group: "Chat", keys: { key: "Escape" } },
20766
20871
  newChat: { label: "New chat", group: "Chat", desktopKeys: { key: "t", mod: true } },
20767
20872
  previousChat: {
@@ -20798,15 +20903,15 @@ var KEYBOARD_SHORTCUTS = {
20798
20903
  keys: { key: "l", alt: true },
20799
20904
  macKeys: { key: "Tab", alt: true }
20800
20905
  },
20801
- send: { label: "Send", group: "Composer", keys: { key: "Enter" } },
20802
- sendAlternate: { label: "Queue or steer instead", group: "Composer", keys: { key: "Enter", alt: true } },
20803
- newLine: { label: "New line", group: "Composer", keys: { key: "Enter", shift: true } },
20906
+ send: { label: "Send", group: "Composer", keys: { key: "Enter" }, fixed: true },
20907
+ sendAlternate: { label: "Queue or steer instead", group: "Composer", keys: { key: "Enter", alt: true }, fixed: true },
20908
+ newLine: { label: "New line", group: "Composer", keys: { key: "Enter", shift: true }, fixed: true },
20804
20909
  toggleTaskMode: { label: "Switch Plan / Build", group: "Composer", keys: { key: "Tab", shift: true } },
20805
20910
  toggleVoiceInput: { label: "Voice input", group: "Composer", keys: { key: " ", mod: true, shift: true } },
20806
- previousPrompt: { label: "Previous prompt", group: "Composer", keys: { key: "ArrowUp" } },
20911
+ previousPrompt: { label: "Previous prompt", group: "Composer", keys: { key: "ArrowUp" }, fixed: true },
20807
20912
  searchPromptHistory: { label: "Search prompt history", group: "Composer", keys: { key: "r", ctrl: true } },
20808
- mentionFile: { label: "Mention a file", group: "Composer", keys: { key: "@" } },
20809
- slashCommand: { label: "Commands and skills", group: "Composer", keys: { key: "/" } },
20913
+ mentionFile: { label: "Mention a file", group: "Composer", keys: { key: "@" }, fixed: true },
20914
+ slashCommand: { label: "Commands and skills", group: "Composer", keys: { key: "/" }, fixed: true },
20810
20915
  previousCanvasItem: { label: "Previous item", group: "Canvas", keys: { key: "ArrowLeft" } },
20811
20916
  nextCanvasItem: { label: "Next item", group: "Canvas", keys: { key: "ArrowRight" } },
20812
20917
  exitCanvasFullScreen: { label: "Exit full screen", group: "Canvas", keys: { key: "Escape" } },
@@ -21046,6 +21151,90 @@ function parseProxyRouteCheck(output) {
21046
21151
  return { device: route.match(/\bdev (\S+)/)?.[1] ?? null, firewallRules: lines.filter((line) => line.startsWith("-")) };
21047
21152
  }
21048
21153
 
21154
+ // ../shared/src/harness/types.ts
21155
+ import { z as z32 } from "zod";
21156
+ var HARNESS_THREAD_STATUSES = ["idle", "working", "error"];
21157
+ var textSchema = z32.looseObject({ type: z32.literal("text"), text: z32.string() });
21158
+ var imageSchema = z32.looseObject({ type: z32.literal("image"), data: z32.string(), mimeType: z32.string() });
21159
+ var userMessageSchema = z32.looseObject({
21160
+ role: z32.literal("user"),
21161
+ content: z32.union([z32.string(), z32.array(z32.discriminatedUnion("type", [textSchema, imageSchema]))]),
21162
+ timestamp: z32.number()
21163
+ });
21164
+ var assistantMessageSchema = z32.looseObject({
21165
+ role: z32.literal("assistant"),
21166
+ content: z32.array(z32.discriminatedUnion("type", [
21167
+ textSchema,
21168
+ z32.looseObject({ type: z32.literal("thinking"), thinking: z32.string() }),
21169
+ z32.looseObject({ type: z32.literal("toolCall"), id: z32.string(), name: z32.string(), arguments: z32.record(z32.string(), z32.json()) })
21170
+ ])),
21171
+ api: z32.string(),
21172
+ provider: z32.string(),
21173
+ model: z32.string(),
21174
+ usage: z32.looseObject({
21175
+ input: z32.number(),
21176
+ output: z32.number(),
21177
+ cacheRead: z32.number(),
21178
+ cacheWrite: z32.number(),
21179
+ totalTokens: z32.number(),
21180
+ cost: z32.looseObject({ input: z32.number(), output: z32.number(), cacheRead: z32.number(), cacheWrite: z32.number(), total: z32.number() })
21181
+ }),
21182
+ stopReason: z32.enum(["pending", "stop", "length", "toolUse", "error", "aborted", "deferred"]),
21183
+ timestamp: z32.number()
21184
+ });
21185
+ var toolResultMessageSchema = z32.looseObject({
21186
+ role: z32.literal("toolResult"),
21187
+ toolCallId: z32.string(),
21188
+ toolName: z32.string(),
21189
+ content: z32.array(z32.discriminatedUnion("type", [textSchema, imageSchema])),
21190
+ isError: z32.boolean(),
21191
+ timestamp: z32.number()
21192
+ });
21193
+ var harnessInboxPayloadSchemas = {
21194
+ message: z32.looseObject({
21195
+ message: userMessageSchema,
21196
+ userId: z32.string().nullable(),
21197
+ messageId: z32.string().optional(),
21198
+ model: z32.string().optional(),
21199
+ thinkingLevel: z32.enum(VALID_THINKING_LEVELS).optional()
21200
+ }),
21201
+ interrupt: z32.looseObject({ userId: z32.string().nullable() })
21202
+ };
21203
+ var harnessEventBodySchema = z32.discriminatedUnion("type", [
21204
+ z32.object({ type: z32.literal("user_message"), payload: harnessInboxPayloadSchemas.message }),
21205
+ /** Saved before its tool calls run. */
21206
+ z32.object({ type: z32.literal("assistant_message"), payload: z32.looseObject({ message: assistantMessageSchema }) }),
21207
+ z32.object({ type: z32.literal("tool_result"), payload: z32.looseObject({ message: toolResultMessageSchema }) }),
21208
+ z32.object({ type: z32.literal("status"), payload: z32.looseObject({ status: z32.enum(HARNESS_THREAD_STATUSES) }) }),
21209
+ z32.object({ type: z32.literal("error"), payload: z32.looseObject({ message: z32.string() }) })
21210
+ ]);
21211
+ var harnessLiveMessageSchema = z32.union([
21212
+ z32.object({ type: z32.literal("delta"), streamId: z32.string(), text: z32.string() }),
21213
+ z32.object({ type: z32.literal("delta"), streamId: z32.string(), thinking: z32.string() }),
21214
+ z32.object({ type: z32.literal("delta"), streamId: z32.string(), toolCall: z32.object({ id: z32.string(), name: z32.string(), argumentsDelta: z32.string() }) }),
21215
+ z32.object({ type: z32.literal("step_saved"), seq: z32.number() }),
21216
+ z32.object({ type: z32.literal("status"), status: z32.enum(HARNESS_THREAD_STATUSES) })
21217
+ ]);
21218
+
21219
+ // ../shared/src/harness/worker-routes.ts
21220
+ import { z as z33 } from "zod";
21221
+ var harnessWorkerEngineRequestSchema = z33.object({
21222
+ /** The engine we were given didn't answer, so the monolith checks the provider instead of trusting the workspace's status. */
21223
+ unreachable: z33.boolean().optional()
21224
+ });
21225
+ var harnessWorkerEngineResponseSchema = z33.discriminatedUnion("status", [
21226
+ z33.object({ status: z33.literal("ready"), engineUrl: z33.string(), headers: z33.record(z33.string(), z33.string()) }),
21227
+ z33.object({ status: z33.literal("waking") })
21228
+ ]);
21229
+ var harnessWorkerCredentialRequestSchema = z33.object({
21230
+ /** The credential the model rejected, so the monolith refreshes it or moves to the next one instead of handing it back. */
21231
+ failedCredential: agentCredentialSnapshotSchema.optional()
21232
+ });
21233
+ var harnessWorkerCredentialResponseSchema = z33.discriminatedUnion("method", [
21234
+ z33.object({ method: z33.literal("oauth"), accessToken: z33.string(), expiresAt: z33.string(), credential: agentCredentialSnapshotSchema }),
21235
+ z33.object({ method: z33.literal("api_key"), apiKey: z33.string(), credential: agentCredentialSnapshotSchema })
21236
+ ]);
21237
+
21049
21238
  // ../shared/src/auth-errors.ts
21050
21239
  var AUTHENTICATION_ERROR_PATTERNS = [
21051
21240
  /unauthorized/,
@@ -21108,10 +21297,10 @@ var RECONNECT_GIVE_UP_MS = 2 * 6e4;
21108
21297
  var encoder3 = new TextEncoder();
21109
21298
 
21110
21299
  // ../shared/src/routes/billing.ts
21111
- import { z as z32 } from "zod";
21300
+ import { z as z34 } from "zod";
21112
21301
  var SOURCE_LIMIT_SOURCES = ["limrun", "modal"];
21113
- var usageLimitCentsSchema = z32.number().int().min(100).max(1e8);
21114
- var sourceLimitsCentsSchema = z32.partialRecord(z32.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
21302
+ var usageLimitCentsSchema = z34.number().int().min(100).max(1e8);
21303
+ var sourceLimitsCentsSchema = z34.partialRecord(z34.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
21115
21304
 
21116
21305
  // ../shared/src/routes/codex.ts
21117
21306
  var CODEX_AUTH_ENV_KEYS = [
@@ -21265,7 +21454,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
21265
21454
  };
21266
21455
 
21267
21456
  // ../shared/src/routes/command-protection.ts
21268
- import { z as z33 } from "zod";
21457
+ import { z as z35 } from "zod";
21269
21458
 
21270
21459
  // ../shared/src/git-invocations.ts
21271
21460
  var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
@@ -21356,29 +21545,35 @@ function findCheckoutTarget(args) {
21356
21545
  }
21357
21546
 
21358
21547
  // ../shared/src/routes/command-protection.ts
21359
- var commandProtectionRepoStateSchema = z33.object({
21360
- branch: z33.string().nullable(),
21361
- defaultBranch: z33.string().nullable(),
21362
- pushBranch: z33.string().nullable(),
21363
- pushConfig: z33.string().nullable(),
21364
- headMessage: z33.string().nullable(),
21365
- mergeInProgress: z33.boolean().optional()
21548
+ var commandProtectionRepoStateSchema = z35.object({
21549
+ branch: z35.string().nullable(),
21550
+ defaultBranch: z35.string().nullable(),
21551
+ pushBranch: z35.string().nullable(),
21552
+ pushConfig: z35.string().nullable(),
21553
+ headMessage: z35.string().nullable(),
21554
+ mergeInProgress: z35.boolean().optional()
21366
21555
  });
21367
- var commandProtectionEvaluateRequestSchema = z33.object({
21368
- provider: z33.enum(["claude", "codex", "cursor", "opencode", "pi"]),
21369
- source: z33.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
21370
- toolName: z33.string(),
21371
- toolInput: z33.unknown(),
21372
- command: z33.string().nullish(),
21373
- cwd: z33.string().nullish(),
21374
- toolUseId: z33.string().nullish(),
21556
+ var commandProtectionEvaluateRequestSchema = z35.object({
21557
+ provider: z35.enum(["claude", "codex", "cursor", "opencode", "pi", "harness"]),
21558
+ source: z35.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call", "harness_tool_call"]),
21559
+ toolName: z35.string(),
21560
+ toolInput: z35.unknown(),
21561
+ command: z35.string().nullish(),
21562
+ cwd: z35.string().nullish(),
21563
+ toolUseId: z35.string().nullish(),
21375
21564
  // Read by the engine before the command runs, keyed by absolute path, so the
21376
21565
  // policy can see branches and commit messages the command text only references.
21377
- gitContext: z33.object({
21378
- repos: z33.record(z33.string(), commandProtectionRepoStateSchema),
21379
- messageFiles: z33.record(z33.string(), z33.string())
21566
+ gitContext: z35.object({
21567
+ repos: z35.record(z35.string(), commandProtectionRepoStateSchema),
21568
+ messageFiles: z35.record(z35.string(), z35.string())
21380
21569
  }).optional()
21381
21570
  });
21571
+ var commandProtectionEvaluateResponseSchema = z35.object({
21572
+ allowed: z35.boolean(),
21573
+ enabled: z35.boolean(),
21574
+ reason: z35.string().optional(),
21575
+ matchedSignals: z35.array(z35.string()).optional()
21576
+ });
21382
21577
  var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
21383
21578
  function stringifyCommandProtectionInput(value) {
21384
21579
  if (typeof value === "string") return value;
@@ -21568,6 +21763,26 @@ function findScoutRepoWriteSignals(parsed) {
21568
21763
  })
21569
21764
  ])];
21570
21765
  }
21766
+ var COMMAND_PROTECTION_REPO_GIT_ARGS = [
21767
+ ["symbolic-ref", "--quiet", "--short", "HEAD"],
21768
+ ["symbolic-ref", "--short", "refs/remotes/origin/HEAD"],
21769
+ ["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{push}"],
21770
+ ["config", "--get-regexp", "^(push\\.default|push\\.pushoption|remote\\..+\\.push)$"],
21771
+ ["log", "-1", "--format=%B"],
21772
+ ["rev-parse", "--quiet", "--verify", "MERGE_HEAD"]
21773
+ ];
21774
+ var COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES = 64 * 1024;
21775
+ function toCommandProtectionRepoState(outputs) {
21776
+ const [branch, originHead, pushBranch, pushConfig, headMessage, mergeHead] = outputs.map((output) => output || null);
21777
+ return {
21778
+ branch: branch ?? null,
21779
+ defaultBranch: originHead?.match(/^origin\/(.+)$/)?.[1] ?? null,
21780
+ pushBranch: pushBranch?.replace(/^[^/]+\//, "") ?? null,
21781
+ pushConfig: pushConfig ?? null,
21782
+ headMessage: headMessage ?? null,
21783
+ mergeInProgress: Boolean(mergeHead)
21784
+ };
21785
+ }
21571
21786
  function findCommandProtectionGitLookups({ invocations }) {
21572
21787
  const writes = invocations.filter(({ subcommand }) => subcommand === "commit" || subcommand === "push");
21573
21788
  const messageFiles = writes.flatMap(({ subcommand, args, dir, command }) => {
@@ -21597,125 +21812,125 @@ function shouldRefreshPullRequests(toolName, toolInput) {
21597
21812
  }
21598
21813
 
21599
21814
  // ../shared/src/routes/scout.ts
21600
- import { z as z34 } from "zod";
21815
+ import { z as z36 } from "zod";
21601
21816
  var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
21602
- var scoutLinearSessionIntentRequestSchema = z34.object({
21603
- comment_id: z34.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
21604
- action: z34.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
21817
+ var scoutLinearSessionIntentRequestSchema = z36.object({
21818
+ comment_id: z36.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
21819
+ action: z36.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
21605
21820
  });
21606
- var scoutLinearStartRequestSchema = z34.object({
21607
- issue_id: z34.string().describe("Linear issue id from the envelope's `issue_id`."),
21608
- agent_session_id: z34.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
21609
- prompt: z34.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
21821
+ var scoutLinearStartRequestSchema = z36.object({
21822
+ issue_id: z36.string().describe("Linear issue id from the envelope's `issue_id`."),
21823
+ agent_session_id: z36.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
21824
+ prompt: z36.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
21610
21825
  });
21611
- var scoutRouteLinearTicketRequestSchema = z34.object({
21612
- agent_session_id: z34.string().trim().min(1).describe("The ticket's `agent_session_id` from the envelope."),
21613
- environment_id: z34.string().trim().min(1).optional().describe("Start the ticket in this environment."),
21614
- mothership_id: z34.string().trim().min(1).optional().describe("Hand the ticket to this Mothership instead.")
21826
+ var scoutRouteLinearTicketRequestSchema = z36.object({
21827
+ agent_session_id: z36.string().trim().min(1).describe("The ticket's `agent_session_id` from the envelope."),
21828
+ environment_id: z36.string().trim().min(1).optional().describe("Start the ticket in this environment."),
21829
+ mothership_id: z36.string().trim().min(1).optional().describe("Hand the ticket to this Mothership instead.")
21615
21830
  }).refine((args) => !(args.environment_id && args.mothership_id), "Pass environment_id or mothership_id, not both.");
21616
- var slackChannelIdSchema = z34.string().describe("Slack channel id from the envelope's `channel_id`.");
21617
- var slackThreadTsSchema = z34.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
21618
- var scoutSlackMessageReferenceSchema = z34.object({
21831
+ var slackChannelIdSchema = z36.string().describe("Slack channel id from the envelope's `channel_id`.");
21832
+ var slackThreadTsSchema = z36.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
21833
+ var scoutSlackMessageReferenceSchema = z36.object({
21619
21834
  channel_id: slackChannelIdSchema,
21620
21835
  thread_ts: slackThreadTsSchema,
21621
- message_ts: z34.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
21622
- user_id: z34.string().describe("Slack user id of that message's author (the envelope's `user_id`).")
21836
+ message_ts: z36.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
21837
+ user_id: z36.string().describe("Slack user id of that message's author (the envelope's `user_id`).")
21623
21838
  });
21624
- var scoutSlackSpawnRequestSchema = z34.object({
21839
+ var scoutSlackSpawnRequestSchema = z36.object({
21625
21840
  channel_id: slackChannelIdSchema,
21626
21841
  thread_ts: slackThreadTsSchema,
21627
- message_ts: z34.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."),
21628
- user_id: z34.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
21629
- prompt: z34.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."),
21630
- acknowledgement_ts: z34.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."),
21631
- environment_id: z34.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.`)
21842
+ message_ts: z36.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."),
21843
+ user_id: z36.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
21844
+ prompt: z36.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."),
21845
+ acknowledgement_ts: z36.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."),
21846
+ environment_id: z36.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.`)
21632
21847
  });
21633
21848
  var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
21634
- title: z34.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
21635
- prompt: z34.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."),
21636
- acknowledgement_ts: z34.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.")
21849
+ title: z36.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
21850
+ prompt: z36.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."),
21851
+ acknowledgement_ts: z36.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.")
21637
21852
  });
21638
- var scoutSlackRelayRequestSchema = z34.object({
21853
+ var scoutSlackRelayRequestSchema = z36.object({
21639
21854
  channel_id: slackChannelIdSchema,
21640
21855
  thread_ts: slackThreadTsSchema,
21641
- message: z34.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. When forwarding to a `workspace_id` other than the thread's own workspace, also quote exactly the thread messages the request points to (\"forward this\"), since that workspace gets only this message."),
21642
- user_id: z34.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`."),
21643
- queue: z34.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."),
21644
- workspace_id: z34.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. Binding a Mothership gives it the person's own Slack message and the thread instead of \`message\`. In a thread already bound to a different workspace, or in a Mothership's channel, nothing is bound: the workspace or Mothership gets only \`message\`, once, with a link back to Slack, and the thread stays where it is. Omit to relay into the thread's own workspace.`),
21645
- message_ts: z34.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.")
21856
+ message: z36.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. When forwarding to a `workspace_id` other than the thread's own workspace, also quote exactly the thread messages the request points to (\"forward this\"), since that workspace gets only this message."),
21857
+ user_id: z36.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`."),
21858
+ queue: z36.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."),
21859
+ workspace_id: z36.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. Binding a Mothership gives it the person's own Slack message and the thread instead of \`message\`. In a thread already bound to a different workspace, or in a Mothership's channel, nothing is bound: the workspace or Mothership gets only \`message\`, once, with a link back to Slack, and the thread stays where it is. Omit to relay into the thread's own workspace.`),
21860
+ message_ts: z36.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.")
21646
21861
  });
21647
- var scoutSlackSetThreadMutedRequestSchema = z34.object({
21862
+ var scoutSlackSetThreadMutedRequestSchema = z36.object({
21648
21863
  channel_id: slackChannelIdSchema,
21649
21864
  thread_ts: slackThreadTsSchema,
21650
- muted: z34.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
21865
+ muted: z36.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
21651
21866
  });
21652
21867
  var scoutSlackStopWorkspaceRequestSchema = scoutSlackMessageReferenceSchema.extend({
21653
- archive: z34.boolean().describe("true only when the person also asked to close or archive the workspace.")
21868
+ archive: z36.boolean().describe("true only when the person also asked to close or archive the workspace.")
21654
21869
  });
21655
- var scoutListWorkspacesRequestSchema = z34.object({
21870
+ var scoutListWorkspacesRequestSchema = z36.object({
21656
21871
  channel_id: slackChannelIdSchema,
21657
21872
  thread_ts: slackThreadTsSchema,
21658
- message_ts: z34.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
21659
- user_id: z34.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
21660
- query: z34.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace and Mothership names and pull request URLs.")
21873
+ message_ts: z36.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
21874
+ user_id: z36.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
21875
+ query: z36.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace and Mothership names and pull request URLs.")
21661
21876
  });
21662
- var scoutSlackConfirmationSchema = z34.object({
21663
- confirmation_channel_id: z34.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
21664
- confirmation_thread_ts: z34.string().describe("`thread_ts` from that message's envelope."),
21665
- confirmation_message_ts: z34.string().describe("`message_ts` from that message's envelope."),
21666
- confirmation_user_id: z34.string().describe("`user_id` from that message's envelope.")
21877
+ var scoutSlackConfirmationSchema = z36.object({
21878
+ confirmation_channel_id: z36.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
21879
+ confirmation_thread_ts: z36.string().describe("`thread_ts` from that message's envelope."),
21880
+ confirmation_message_ts: z36.string().describe("`message_ts` from that message's envelope."),
21881
+ confirmation_user_id: z36.string().describe("`user_id` from that message's envelope.")
21667
21882
  });
21668
21883
  var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
21669
21884
  var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
21670
- preset_id: z34.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
21671
- name: z34.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
21672
- description: z34.string().optional().describe("One-line summary of what the preset is for."),
21673
- icon: z34.enum(SCOUT_PRESET_ICONS).optional(),
21674
- instructions: z34.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
21885
+ preset_id: z36.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
21886
+ name: z36.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
21887
+ description: z36.string().optional().describe("One-line summary of what the preset is for."),
21888
+ icon: z36.enum(SCOUT_PRESET_ICONS).optional(),
21889
+ instructions: z36.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
21675
21890
  });
21676
21891
  var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
21677
- source: z34.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
21678
- external_id: z34.string().describe("Slack channel id or Linear team id."),
21679
- monitored: z34.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."),
21680
- preset_id: z34.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
21681
- instructions: z34.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
21682
- proactivity: z34.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."),
21683
- silent: z34.enum(["on", "off", "default"]).optional().describe(`Slack only, organization admins only: \`on\` puts this channel in silent mode, where Replicas reads it and follows its instructions but never posts, reacts, or starts work there. \`off\` turns silent mode off here, \`default\` follows the Slack Connect default from \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`. Omit to keep it.`),
21684
- muted: z34.enum(["on", "off", "default"]).optional().describe("Kept for older callers; prefer `silent`.")
21892
+ source: z36.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
21893
+ external_id: z36.string().describe("Slack channel id or Linear team id."),
21894
+ monitored: z36.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."),
21895
+ preset_id: z36.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
21896
+ instructions: z36.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
21897
+ proactivity: z36.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."),
21898
+ silent: z36.enum(["on", "off", "default"]).optional().describe(`Slack only, organization admins only: \`on\` puts this channel in silent mode, where Replicas reads it and follows its instructions but never posts, reacts, or starts work there. \`off\` turns silent mode off here, \`default\` follows the Slack Connect default from \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`. Omit to keep it.`),
21899
+ muted: z36.enum(["on", "off", "default"]).optional().describe("Kept for older callers; prefer `silent`.")
21685
21900
  });
21686
21901
  var mothershipSlackChannelLevelToolInputSchema = scoutSlackConfirmationSchema.extend({
21687
21902
  proactivity: scoutUpdateChannelSettingsToolInputSchema.shape.proactivity.unwrap().describe("This channel's own level. `organization` makes it follow the organization's level again, which a Mothership's channel raises to at least `balanced`.")
21688
21903
  });
21689
21904
  var scoutSetSlackConnectMutedToolInputSchema = scoutSlackConfirmationSchema.extend({
21690
- muted: z34.boolean().describe("`true` puts every Slack Connect channel without its own setting in silent mode; `false` lets them follow their levels again.")
21905
+ muted: z36.boolean().describe("`true` puts every Slack Connect channel without its own setting in silent mode; `false` lets them follow their levels again.")
21691
21906
  });
21692
21907
  var scoutSetSlackConnectDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
21693
- silent: z34.boolean().optional().describe("`true` puts every Slack Connect channel without its own setting in silent mode; `false` lets them follow their levels again. Omit to keep it."),
21694
- muted: z34.boolean().optional().describe("Kept for older callers; prefer `silent`."),
21695
- preset_id: z34.string().optional().describe("Preset for every Slack Connect channel without its own preset or instructions; an empty string removes it. Omit to keep it."),
21696
- instructions: z34.string().optional().describe("Complete default instructions, applied after that preset; replaces the existing text. An empty string clears them. Omit to keep them."),
21697
- proactivity: z34.enum([...SCOUT_PROACTIVITY_LEVELS, "default"]).optional().describe("Level for every Slack Connect channel without its own level. `default` returns them to `tagged`. Omit to keep it.")
21908
+ silent: z36.boolean().optional().describe("`true` puts every Slack Connect channel without its own setting in silent mode; `false` lets them follow their levels again. Omit to keep it."),
21909
+ muted: z36.boolean().optional().describe("Kept for older callers; prefer `silent`."),
21910
+ preset_id: z36.string().optional().describe("Preset for every Slack Connect channel without its own preset or instructions; an empty string removes it. Omit to keep it."),
21911
+ instructions: z36.string().optional().describe("Complete default instructions, applied after that preset; replaces the existing text. An empty string clears them. Omit to keep them."),
21912
+ proactivity: z36.enum([...SCOUT_PROACTIVITY_LEVELS, "default"]).optional().describe("Level for every Slack Connect channel without its own level. `default` returns them to `tagged`. Omit to keep it.")
21698
21913
  });
21699
21914
  var scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
21700
- proactivity: z34.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 follow the shared-channel default from \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` instead.`)
21915
+ proactivity: z36.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 follow the shared-channel default from \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\` instead.`)
21701
21916
  });
21702
21917
  var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
21703
- preset_id: z34.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
21918
+ preset_id: z36.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
21704
21919
  });
21705
21920
  var RESET_TO_DEFAULT = "default";
21706
- var resettable = (schema, description) => z34.union([schema, z34.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
21921
+ var resettable = (schema, description) => z36.union([schema, z36.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
21707
21922
  var scoutSetSlackAgentDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
21708
- agent_provider: resettable(z34.enum(ENGINE_AGENT_PROVIDERS), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
21709
- model: resettable(z34.string(), "Model id for that agent; the default is the agent's own."),
21710
- thinking_level: resettable(z34.enum(VALID_THINKING_LEVELS), "Thinking level."),
21711
- goal_mode: resettable(z34.boolean(), "Goal mode."),
21712
- fast_mode: resettable(z34.boolean(), "Fast mode.")
21923
+ agent_provider: resettable(z36.enum(ENGINE_AGENT_PROVIDERS), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
21924
+ model: resettable(z36.string(), "Model id for that agent; the default is the agent's own."),
21925
+ thinking_level: resettable(z36.enum(VALID_THINKING_LEVELS), "Thinking level."),
21926
+ goal_mode: resettable(z36.boolean(), "Goal mode."),
21927
+ fast_mode: resettable(z36.boolean(), "Fast mode.")
21713
21928
  });
21714
- var scoutClaimSettingsOfferToolInputSchema = z34.object({
21929
+ var scoutClaimSettingsOfferToolInputSchema = z36.object({
21715
21930
  channel_id: slackChannelIdSchema,
21716
- kind: z34.enum(SCOUT_SETTINGS_OFFERS).describe("`proactivity`: offering a lower level after frustration. `raise_proactivity`: offering a higher level after someone had to @mention you. `instructions`: offering channel instructions or a preset. `organization_proactivity` and `raise_organization_proactivity`: offering to lower or raise the workspace default; only decline them, the server claims them for you."),
21717
- user_id: z34.string().optional().describe("The envelope's `user_id`. Required for `proactivity` and `raise_proactivity`, so the server can say whether they are an organization admin."),
21718
- declined: z34.boolean().optional().describe("true when the person declined an offer you already made, so it is not made again.")
21931
+ kind: z36.enum(SCOUT_SETTINGS_OFFERS).describe("`proactivity`: offering a lower level after frustration. `raise_proactivity`: offering a higher level after someone had to @mention you. `instructions`: offering channel instructions or a preset. `organization_proactivity` and `raise_organization_proactivity`: offering to lower or raise the workspace default; only decline them, the server claims them for you."),
21932
+ user_id: z36.string().optional().describe("The envelope's `user_id`. Required for `proactivity` and `raise_proactivity`, so the server can say whether they are an organization admin."),
21933
+ declined: z36.boolean().optional().describe("true when the person declined an offer you already made, so it is not made again.")
21719
21934
  });
21720
21935
 
21721
21936
  // ../shared/src/routes/plugin-catalog.ts
@@ -22073,27 +22288,27 @@ var PLUGIN_CATALOG = [
22073
22288
  ].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
22074
22289
 
22075
22290
  // ../shared/src/routes/sentry.ts
22076
- import { z as z35 } from "zod";
22077
- var sentrySelfHostedConnectRequestSchema = z35.object({
22078
- baseUrl: z35.string().min(1),
22079
- token: z35.string().trim().min(1),
22080
- webhookSecret: z35.string().trim().optional()
22291
+ import { z as z37 } from "zod";
22292
+ var sentrySelfHostedConnectRequestSchema = z37.object({
22293
+ baseUrl: z37.string().min(1),
22294
+ token: z37.string().trim().min(1),
22295
+ webhookSecret: z37.string().trim().optional()
22081
22296
  });
22082
22297
 
22083
22298
  // ../shared/src/routes/user.ts
22084
22299
  var PROFILE_AVATAR_MAX_SIZE_BYTES = 5 * 1024 * 1024;
22085
22300
 
22086
22301
  // ../shared/src/routes/web-auth.ts
22087
- import { z as z36 } from "zod";
22088
- var webAuthRedeemResponseSchema = z36.object({
22089
- path: z36.string(),
22090
- organizationId: z36.string().nullable(),
22091
- session: z36.object({ access_token: z36.string(), refresh_token: z36.string(), user: z36.object({ id: z36.string(), email: z36.string() }) }).nullable()
22302
+ import { z as z38 } from "zod";
22303
+ var webAuthRedeemResponseSchema = z38.object({
22304
+ path: z38.string(),
22305
+ organizationId: z38.string().nullable(),
22306
+ session: z38.object({ access_token: z38.string(), refresh_token: z38.string(), user: z38.object({ id: z38.string(), email: z38.string() }) }).nullable()
22092
22307
  });
22093
22308
 
22094
22309
  // ../shared/src/routes/themes.ts
22095
- import { z as z37 } from "zod";
22096
- var updateThemeRequestSchema = z37.object({ theme: z37.string(), palette: z37.string(), accent: z37.string(), code: z37.string() }).partial();
22310
+ import { z as z39 } from "zod";
22311
+ var updateThemeRequestSchema = z39.object({ theme: z39.string(), palette: z39.string(), accent: z39.string(), code: z39.string() }).partial();
22097
22312
 
22098
22313
  // ../shared/src/routes/client-state.ts
22099
22314
  var MAX_CLIENT_STATE_REQUEST_BYTES = 5 * 1024 * 1024;
@@ -22117,105 +22332,105 @@ var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_ST
22117
22332
  var workspaceSearchOpensClientStateKey = orgUserClientStateKey(WORKSPACE_SEARCH_OPENS_CLIENT_STATE_KEY_PREFIX);
22118
22333
 
22119
22334
  // ../shared/src/routes/workspace-events.ts
22120
- import { z as z39 } from "zod";
22335
+ import { z as z41 } from "zod";
22121
22336
 
22122
22337
  // ../shared/src/routes/presence.ts
22123
- import { z as z38 } from "zod";
22124
- var presenceStatusSchema = z38.enum(["online", "typing"]);
22125
- var presenceLocationSchema = z38.object({
22126
- workspaceId: z38.string().optional()
22338
+ import { z as z40 } from "zod";
22339
+ var presenceStatusSchema = z40.enum(["online", "typing"]);
22340
+ var presenceLocationSchema = z40.object({
22341
+ workspaceId: z40.string().optional()
22127
22342
  });
22128
- var presenceEntrySchema = z38.object({
22129
- userId: z38.string(),
22343
+ var presenceEntrySchema = z40.object({
22344
+ userId: z40.string(),
22130
22345
  status: presenceStatusSchema,
22131
22346
  location: presenceLocationSchema,
22132
- ts: z38.string()
22347
+ ts: z40.string()
22133
22348
  });
22134
- var updatePresenceRequestSchema = z38.object({
22349
+ var updatePresenceRequestSchema = z40.object({
22135
22350
  status: presenceStatusSchema,
22136
22351
  location: presenceLocationSchema.optional()
22137
22352
  });
22138
22353
 
22139
22354
  // ../shared/src/routes/workspace-events.ts
22140
- var workspaceTurnCompletionSchema = z39.object({
22141
- workspaceName: z39.string(),
22142
- completedAt: z39.string(),
22143
- processing: z39.boolean().optional(),
22144
- pullRequestFeedback: z39.boolean().optional(),
22145
- attention: z39.object({ reason: z39.enum(CHAT_ATTENTION_REASONS), userId: z39.string() }).optional()
22355
+ var workspaceTurnCompletionSchema = z41.object({
22356
+ workspaceName: z41.string(),
22357
+ completedAt: z41.string(),
22358
+ processing: z41.boolean().optional(),
22359
+ pullRequestFeedback: z41.boolean().optional(),
22360
+ attention: z41.object({ reason: z41.enum(CHAT_ATTENTION_REASONS), userId: z41.string() }).optional()
22146
22361
  });
22147
- var workspaceEventSchemaByType = z39.discriminatedUnion("type", [
22148
- z39.object({
22149
- type: z39.literal("workspace.changed"),
22150
- workspaceId: z39.string(),
22151
- accessChangedFor: z39.string().optional(),
22152
- accessChangedForOrg: z39.literal(true).optional(),
22153
- workspace: z39.object({ status: z39.enum(WORKSPACE_STATUSES), last_activity_at: z39.string().nullable() }).optional(),
22154
- name: z39.string().optional(),
22362
+ var workspaceEventSchemaByType = z41.discriminatedUnion("type", [
22363
+ z41.object({
22364
+ type: z41.literal("workspace.changed"),
22365
+ workspaceId: z41.string(),
22366
+ accessChangedFor: z41.string().optional(),
22367
+ accessChangedForOrg: z41.literal(true).optional(),
22368
+ workspace: z41.object({ status: z41.enum(WORKSPACE_STATUSES), last_activity_at: z41.string().nullable() }).optional(),
22369
+ name: z41.string().optional(),
22155
22370
  completion: workspaceTurnCompletionSchema.optional(),
22156
- ts: z39.string()
22371
+ ts: z41.string()
22157
22372
  }),
22158
- z39.object({
22159
- type: z39.literal("workspace.chat.changed"),
22160
- workspaceId: z39.string(),
22161
- chatId: z39.string(),
22162
- ts: z39.string()
22373
+ z41.object({
22374
+ type: z41.literal("workspace.chat.changed"),
22375
+ workspaceId: z41.string(),
22376
+ chatId: z41.string(),
22377
+ ts: z41.string()
22163
22378
  }),
22164
- z39.object({
22165
- type: z39.literal("workspace.chat.advanced"),
22166
- workspaceId: z39.string(),
22167
- chatId: z39.string(),
22168
- afterCursor: z39.string().optional(),
22169
- processing: z39.boolean(),
22170
- ts: z39.string()
22379
+ z41.object({
22380
+ type: z41.literal("workspace.chat.advanced"),
22381
+ workspaceId: z41.string(),
22382
+ chatId: z41.string(),
22383
+ afterCursor: z41.string().optional(),
22384
+ processing: z41.boolean(),
22385
+ ts: z41.string()
22171
22386
  }),
22172
- z39.object({
22173
- type: z39.literal("mobile-testing.changed"),
22174
- workspaceId: z39.string(),
22175
- ts: z39.string()
22387
+ z41.object({
22388
+ type: z41.literal("mobile-testing.changed"),
22389
+ workspaceId: z41.string(),
22390
+ ts: z41.string()
22176
22391
  }),
22177
- z39.object({
22178
- type: z39.literal("variable-request.changed"),
22179
- workspaceId: z39.string(),
22180
- ts: z39.string()
22392
+ z41.object({
22393
+ type: z41.literal("variable-request.changed"),
22394
+ workspaceId: z41.string(),
22395
+ ts: z41.string()
22181
22396
  }),
22182
- z39.object({
22183
- type: z39.literal("local-control-request.changed"),
22184
- workspaceId: z39.string(),
22185
- ts: z39.string()
22397
+ z41.object({
22398
+ type: z41.literal("local-control-request.changed"),
22399
+ workspaceId: z41.string(),
22400
+ ts: z41.string()
22186
22401
  }),
22187
- z39.object({
22188
- type: z39.literal("pull-request.changed"),
22189
- prUrl: z39.string(),
22190
- ts: z39.string()
22402
+ z41.object({
22403
+ type: z41.literal("pull-request.changed"),
22404
+ prUrl: z41.string(),
22405
+ ts: z41.string()
22191
22406
  }),
22192
- z39.object({
22193
- type: z39.literal("mothership.subagent.changed"),
22194
- workspaceId: z39.string(),
22195
- subagent: z39.object({ id: z39.string(), name: z39.string(), prUrl: z39.string().nullable() }),
22196
- ts: z39.string()
22407
+ z41.object({
22408
+ type: z41.literal("mothership.subagent.changed"),
22409
+ workspaceId: z41.string(),
22410
+ subagent: z41.object({ id: z41.string(), name: z41.string(), prUrl: z41.string().nullable() }),
22411
+ ts: z41.string()
22197
22412
  }),
22198
- z39.object({ type: z39.literal("mothership.board.changed"), workspaceId: z39.string(), ts: z39.string() }),
22199
- z39.object({ type: z39.literal("needs-you.changed"), workspaceId: z39.string().nullable(), userId: z39.string().optional(), ts: z39.string() }),
22200
- z39.object({
22201
- type: z39.literal("workspace.shared"),
22202
- workspaceId: z39.string(),
22203
- workspaceName: z39.string(),
22204
- sharedWithUserId: z39.string(),
22205
- sharedByName: z39.string(),
22206
- ts: z39.string()
22413
+ z41.object({ type: z41.literal("mothership.board.changed"), workspaceId: z41.string(), ts: z41.string() }),
22414
+ z41.object({ type: z41.literal("needs-you.changed"), workspaceId: z41.string().nullable(), userId: z41.string().optional(), ts: z41.string() }),
22415
+ z41.object({
22416
+ type: z41.literal("workspace.shared"),
22417
+ workspaceId: z41.string(),
22418
+ workspaceName: z41.string(),
22419
+ sharedWithUserId: z41.string(),
22420
+ sharedByName: z41.string(),
22421
+ ts: z41.string()
22207
22422
  }),
22208
- z39.object({ type: z39.literal("client-state.changed"), userId: z39.string(), keys: z39.array(z39.string()), ts: z39.string() })
22423
+ z41.object({ type: z41.literal("client-state.changed"), userId: z41.string(), keys: z41.array(z41.string()), ts: z41.string() })
22209
22424
  ]);
22210
- var workspaceChangedEventSchema = z39.union([
22425
+ var workspaceChangedEventSchema = z41.union([
22211
22426
  workspaceEventSchemaByType,
22212
- z39.object({ type: z39.literal("presence.changed"), userId: z39.string(), entry: presenceEntrySchema.nullable(), ts: z39.string() }),
22213
- z39.object({ type: z39.literal("presence.changed"), ts: z39.string() })
22427
+ z41.object({ type: z41.literal("presence.changed"), userId: z41.string(), entry: presenceEntrySchema.nullable(), ts: z41.string() }),
22428
+ z41.object({ type: z41.literal("presence.changed"), ts: z41.string() })
22214
22429
  ]);
22215
22430
 
22216
22431
  // ../shared/src/routes/review-messages.ts
22217
- import { z as z40 } from "zod";
22218
- var sendPullRequestReviewMessageRequestSchema = z40.object({
22432
+ import { z as z42 } from "zod";
22433
+ var sendPullRequestReviewMessageRequestSchema = z42.object({
22219
22434
  ...sendChatMessageRequestSchema.pick({
22220
22435
  message: true,
22221
22436
  messageId: true,
@@ -22228,8 +22443,8 @@ var sendPullRequestReviewMessageRequestSchema = z40.object({
22228
22443
  ultrafastMode: true
22229
22444
  }).shape,
22230
22445
  /** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
22231
- newChat: z40.boolean().optional(),
22232
- provider: z40.enum(ENGINE_AGENT_PROVIDERS).optional()
22446
+ newChat: z42.boolean().optional(),
22447
+ provider: z42.enum(ENGINE_AGENT_PROVIDERS).optional()
22233
22448
  });
22234
22449
 
22235
22450
  // ../shared/src/audit-log.ts
@@ -22892,40 +23107,40 @@ function isSkillRegistryManifest(value) {
22892
23107
  }
22893
23108
 
22894
23109
  // ../shared/src/routes/variable-requests.ts
22895
- import { z as z41 } from "zod";
23110
+ import { z as z43 } from "zod";
22896
23111
  var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
22897
23112
  var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
22898
- var requestedVariableSchema = z41.object({
22899
- key: z41.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
22900
- required: z41.boolean(),
22901
- replace: z41.boolean().optional()
23113
+ var requestedVariableSchema = z43.object({
23114
+ key: z43.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
23115
+ required: z43.boolean(),
23116
+ replace: z43.boolean().optional()
22902
23117
  });
22903
- var requestedVariablesSchema = z41.array(requestedVariableSchema).min(1, "must not be empty").max(ENVIRONMENT_SETUP_LIMITS.variables).refine((variables) => new Set(variables.map((variable) => variable.key)).size === variables.length, "must have unique keys");
22904
- var createVariableRequestSchema = z41.object({
23118
+ var requestedVariablesSchema = z43.array(requestedVariableSchema).min(1, "must not be empty").max(ENVIRONMENT_SETUP_LIMITS.variables).refine((variables) => new Set(variables.map((variable) => variable.key)).size === variables.length, "must have unique keys");
23119
+ var createVariableRequestSchema = z43.object({
22905
23120
  variables: requestedVariablesSchema,
22906
- reason: z41.string().trim().max(500).nullish().transform((value) => value || null),
22907
- wait: z41.boolean().default(true)
23121
+ reason: z43.string().trim().max(500).nullish().transform((value) => value || null),
23122
+ wait: z43.boolean().default(true)
22908
23123
  });
22909
- var respondVariableRequestSchema = z41.discriminatedUnion("action", [
22910
- z41.object({
22911
- action: z41.literal("provide"),
22912
- destination: z41.enum(VARIABLE_REQUEST_DESTINATIONS),
23124
+ var respondVariableRequestSchema = z43.discriminatedUnion("action", [
23125
+ z43.object({
23126
+ action: z43.literal("provide"),
23127
+ destination: z43.enum(VARIABLE_REQUEST_DESTINATIONS),
22913
23128
  /** Defaults to the workspace's environment, so older clients keep saving there. */
22914
- environment_ids: z41.array(z41.string().uuid()).optional(),
22915
- overwrite: z41.boolean().optional(),
22916
- values: z41.record(z41.string().regex(VARIABLE_KEY_RE), z41.string())
23129
+ environment_ids: z43.array(z43.string().uuid()).optional(),
23130
+ overwrite: z43.boolean().optional(),
23131
+ values: z43.record(z43.string().regex(VARIABLE_KEY_RE), z43.string())
22917
23132
  }),
22918
- z41.object({ action: z41.literal("skip") })
23133
+ z43.object({ action: z43.literal("skip") })
22919
23134
  ]);
22920
23135
 
22921
23136
  // ../shared/src/routes/local-control-requests.ts
22922
- import { z as z42 } from "zod";
22923
- var createLocalControlRequestSchema = z42.object({
22924
- reason: z42.string().trim().max(500).optional().transform((value) => value || null),
22925
- wait: z42.boolean().default(true)
23137
+ import { z as z44 } from "zod";
23138
+ var createLocalControlRequestSchema = z44.object({
23139
+ reason: z44.string().trim().max(500).optional().transform((value) => value || null),
23140
+ wait: z44.boolean().default(true)
22926
23141
  });
22927
- var respondLocalControlRequestSchema = z42.object({ action: z42.enum(["allow", "dismiss"]) });
22928
- var setLocalControlSchema = z42.object({ enabled: z42.boolean() });
23142
+ var respondLocalControlRequestSchema = z44.object({ action: z44.enum(["allow", "dismiss"]) });
23143
+ var setLocalControlSchema = z44.object({ enabled: z44.boolean() });
22929
23144
 
22930
23145
  export {
22931
23146
  ENGINE_SEND_MESSAGE_FAILED_ERROR,
@@ -23245,11 +23460,15 @@ export {
23245
23460
  CLAUDE_AUTH_ENV_KEYS,
23246
23461
  claudeAuthEnvFromResponse,
23247
23462
  CLAUDE_AUTH_ENV_KEYS_BY_METHOD,
23463
+ commandProtectionEvaluateResponseSchema,
23248
23464
  extractCommandProtectionCommandText,
23249
23465
  parseCommandProtectionRequest,
23250
23466
  findPrMergeSignals,
23251
23467
  findGitCommitSignals,
23252
23468
  findScoutRepoWriteSignals,
23469
+ COMMAND_PROTECTION_REPO_GIT_ARGS,
23470
+ COMMAND_PROTECTION_MAX_MESSAGE_FILE_BYTES,
23471
+ toCommandProtectionRepoState,
23253
23472
  findCommandProtectionGitLookups,
23254
23473
  shouldRefreshPullRequests,
23255
23474
  MAX_REPO_FILE_CONTENT_BYTES,