replicas-engine 0.1.1375 → 0.1.1377
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-PCUPGJRD.js → asp-host-3C4YEO7F.js} +5 -5
- package/dist/src/{chunk-AVI4QYDL.js → chunk-3FVW3JCR.js} +1 -1
- package/dist/src/{chunk-5GNPDKZX.js → chunk-5IIU545W.js} +6 -6
- package/dist/src/{chunk-Z2KNJBXZ.js → chunk-64DQBGLZ.js} +2 -2
- package/dist/src/{chunk-5ZFK4NQS.js → chunk-NPPH5Y36.js} +1 -1
- package/dist/src/{chunk-O3PYQIRJ.js → chunk-OHUZJSF4.js} +2 -2
- package/dist/src/{chunk-4VFPTXOA.js → chunk-RXGCKGLJ.js} +3 -3
- package/dist/src/{chunk-ONVWJYWY.js → chunk-Y2IJNK27.js} +2 -2
- package/dist/src/{chunk-NOHCO22T.js → chunk-ZGY4X7WZ.js} +204 -196
- 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
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
listRunningCodexModels,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-5IIU545W.js";
|
|
12
|
+
import "./chunk-64DQBGLZ.js";
|
|
13
|
+
import "./chunk-RXGCKGLJ.js";
|
|
14
|
+
import "./chunk-NPPH5Y36.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ZGY4X7WZ.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-64DQBGLZ.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-RXGCKGLJ.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NPPH5Y36.js";
|
|
22
22
|
import {
|
|
23
23
|
isRecord
|
|
24
24
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
resolveOpenAICompatibleModelsUrl,
|
|
57
57
|
splitMothershipInstructions,
|
|
58
58
|
withTimeout
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
60
60
|
|
|
61
61
|
// src/managers/codex-token-manager.ts
|
|
62
62
|
import { promises as fs } from "fs";
|
|
@@ -319,7 +319,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
319
319
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
320
320
|
await this.applyCredentialsResponse(data);
|
|
321
321
|
setAgentCredentialSnapshot("codex", data);
|
|
322
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
322
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-3C4YEO7F.js");
|
|
323
323
|
await restartCodexAspHostIfRunning2();
|
|
324
324
|
});
|
|
325
325
|
await this.start(true);
|
|
@@ -341,7 +341,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
341
341
|
const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
|
|
342
342
|
await this.applyCredentialsResponse(data);
|
|
343
343
|
if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
|
|
344
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
344
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-3C4YEO7F.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
SUBPROCESS_MAX_BUFFER,
|
|
6
6
|
execFileAsync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NPPH5Y36.js";
|
|
8
8
|
import {
|
|
9
9
|
isRecord as isRecord2
|
|
10
10
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
provisionedDeviceSchema,
|
|
22
22
|
readReplicasRuntimeEnv,
|
|
23
23
|
serializePosixEnvFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
HOOK_EXEC_MAX_BUFFER_BYTES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-64DQBGLZ.js";
|
|
10
10
|
import {
|
|
11
11
|
extractCommandProtectionCommandText,
|
|
12
12
|
findCommandProtectionGitLookups,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
findPrMergeSignals,
|
|
15
15
|
findScoutRepoWriteSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
execFileAsync
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NPPH5Y36.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
|
|
|
240
240
|
if (method === "foundry") return "azure";
|
|
241
241
|
return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
|
|
242
242
|
}
|
|
243
|
-
var ENGINE_PACKAGE_VERSION = "0.1.
|
|
243
|
+
var ENGINE_PACKAGE_VERSION = "0.1.1377";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RXGCKGLJ.js";
|
|
7
7
|
import {
|
|
8
8
|
ASTER_BASE_URL,
|
|
9
9
|
ASTER_PROVIDER,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isRecord,
|
|
16
16
|
readOllamaAuthEnv,
|
|
17
17
|
readOpenAICompatibleAuthEnv
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -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
|
|
1119
|
+
let z33 = 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
|
-
|
|
1126
|
+
z33 = offsetZ;
|
|
1127
1127
|
this.dt = dt;
|
|
1128
1128
|
} else {
|
|
1129
|
-
|
|
1129
|
+
z33 = "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
|
-
|
|
1139
|
+
z33 = dt.zone.name;
|
|
1140
1140
|
} else {
|
|
1141
|
-
|
|
1141
|
+
z33 = "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 ||
|
|
1150
|
+
intlOpts.timeZone = intlOpts.timeZone || z33;
|
|
1151
1151
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
1152
1152
|
}
|
|
1153
1153
|
format() {
|
|
@@ -11876,7 +11876,8 @@ var createEnvironmentDeviceToolInputSchema = z18.object({ ...environmentMcpPath,
|
|
|
11876
11876
|
var SCOUT_SOURCE_TYPES = ["slack", "linear"];
|
|
11877
11877
|
var SCOUT_PROACTIVITY_LEVELS = ["tagged", "conservative", "balanced", "proactive"];
|
|
11878
11878
|
var SCOUT_PRESET_NAME_MAX_LENGTH = 50;
|
|
11879
|
-
var
|
|
11879
|
+
var SCOUT_CHANNEL_SETTINGS_OFFERS = ["proactivity", "raise_proactivity", "instructions"];
|
|
11880
|
+
var SCOUT_SETTINGS_OFFERS = [...SCOUT_CHANNEL_SETTINGS_OFFERS, "organization_proactivity"];
|
|
11880
11881
|
var SCOUT_PRESET_ICONS = [
|
|
11881
11882
|
"users",
|
|
11882
11883
|
"user",
|
|
@@ -14538,8 +14539,9 @@ function splitMothershipInstructions(customInstructions) {
|
|
|
14538
14539
|
};
|
|
14539
14540
|
}
|
|
14540
14541
|
var SCOUT_ADAPTIVE_SETTINGS_PROMPT = `### Adapting to each channel
|
|
14541
|
-
There is no settings page: people change how you behave by telling you, and you suggest a change when it would clearly help. The envelope carries the channel's \`proactivity\` and \`offers\`, the offers you may still make in this channel (
|
|
14542
|
+
There is no settings page: people change how you behave by telling you, and you suggest a change when it would clearly help. The envelope carries the channel's \`proactivity\` and \`offers\`, the offers you may still make in this channel (${SCOUT_CHANNEL_SETTINGS_OFFERS.map((offer) => `\`${offer}\``).join(", ")}); \`offers=none\` means make none. Offer only what \`offers\` lists, at most one per message. Claim an offer with \`${REPLICAS_MCP_TOOLS.claimSettingsOffer}\` right before posting it, and post it only when the claim succeeds. When someone declines ("no", "it's fine", "leave it"), record it with \`declined: true\` and drop it; never repeat an ignored offer. When they accept, apply it with the settings tools using the accepting message as confirmation, then confirm what changed in one short line.
|
|
14542
14543
|
- **Frustration.** When someone is clearly annoyed that you replied or acted unasked ("wtf why did replicas respond", "stop", "not you", "nobody asked", or \`event=reaction:\u2026\`, a thumbs-down or similar on a reply you posted unasked), claim \`proactivity\` and post one short apology that offers to lower this channel exactly one step. From Balanced or High, offer Low: "Sorry for jumping in. Want me to only reply here when someone mentions me by name?" From Low, offer Mentions only: "Sorry for jumping in. Want me to only reply here when someone @mentions me?" On a yes, set the level you offered, nothing lower. Do nothing else in that thread. When the claim answers \`offer: organization\`, people were frustrated in several channels, so offer the same for every channel instead; when \`requester_is_admin\` is false, say an organization admin can change it for every channel and offer this channel. A thumbs-down on a reply someone asked for is about the answer, not about speaking up, so leave it. An explicit "stop replying in this thread" is still a thread mute.
|
|
14544
|
+
- **Having to tag you.** When \`directed=true\` and the same person's untagged message just before in this thread asked you something you didn't act on, so they had to @mention you, answer as usual, then claim \`raise_proactivity\` and end the reply with one line asking whether to pick up messages like that without a tag next time. They may have meant that message for someone else, so ask, never assume. Offer exactly one step up: from Mentions only, where an untagged reply never reaches you, "Want me to pick up messages here that name me, without an @mention? @mention me with your answer."; from Low, "Want me to pick up questions and requests here without a tag next time?"; from Balanced, "Want me to jump in on questions and requests here without being asked?" On a yes, raise this channel to that level only; if the server refuses because they aren't an admin, say an organization admin can raise it.
|
|
14543
14545
|
- **Channel instructions.** On \`event=joined\` (you were just added to the channel; reply in that envelope's thread), or when you act in a channel for the first time, and the channel's name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), claim \`instructions\` and offer one concrete behavior in one line, such as "This looks like an incident channel. Want me to triage new reports here, check for duplicates, and post findings in the thread?" On \`event=joined\` without a clear role, do nothing at all. Make the same kind of offer when you notice you keep handling messages here the same way, or that the channel clearly belongs to a Mothership (offer to send its actionable messages to that Mothership by name). On a yes, save it as the channel's instructions, or as its preset when one fits exactly.
|
|
14544
14546
|
- **Tip.** When the envelope has \`tip=true\`, this is the first time someone pinged you in this channel, so end the reply you post with one more line: "_Tip: tell me how you want me to act in this channel._" It is shown once per channel, so never add it otherwise.
|
|
14545
14547
|
- **Slack agent defaults.** To change the agent, model, thinking level, goal mode or fast mode used for tasks started from Slack ("use Codex for Slack tasks"), call \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`; only an organization admin can.
|
|
@@ -19235,6 +19237,12 @@ function hasChatStarted(chat) {
|
|
|
19235
19237
|
return chat.processing || Boolean(chat.awaitingInput) || Boolean(chat.goal) || Boolean(chat.lastMessageText) || chat.updatedAt > chat.createdAt;
|
|
19236
19238
|
}
|
|
19237
19239
|
|
|
19240
|
+
// ../shared/src/routes/billing.ts
|
|
19241
|
+
import { z as z24 } from "zod";
|
|
19242
|
+
var SOURCE_LIMIT_SOURCES = ["limrun", "modal"];
|
|
19243
|
+
var usageLimitCentsSchema = z24.number().int().min(100).max(1e8);
|
|
19244
|
+
var sourceLimitsCentsSchema = z24.partialRecord(z24.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
|
|
19245
|
+
|
|
19238
19246
|
// ../shared/src/routes/codex.ts
|
|
19239
19247
|
var CODEX_AUTH_ENV_KEYS = [
|
|
19240
19248
|
"REPLICAS_CODEX_OLLAMA_API_KEY",
|
|
@@ -19387,7 +19395,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
19387
19395
|
};
|
|
19388
19396
|
|
|
19389
19397
|
// ../shared/src/routes/command-protection.ts
|
|
19390
|
-
import { z as
|
|
19398
|
+
import { z as z25 } from "zod";
|
|
19391
19399
|
|
|
19392
19400
|
// ../shared/src/git-invocations.ts
|
|
19393
19401
|
var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
|
|
@@ -19478,27 +19486,27 @@ function findCheckoutTarget(args) {
|
|
|
19478
19486
|
}
|
|
19479
19487
|
|
|
19480
19488
|
// ../shared/src/routes/command-protection.ts
|
|
19481
|
-
var commandProtectionRepoStateSchema =
|
|
19482
|
-
branch:
|
|
19483
|
-
defaultBranch:
|
|
19484
|
-
pushBranch:
|
|
19485
|
-
pushConfig:
|
|
19486
|
-
headMessage:
|
|
19487
|
-
mergeInProgress:
|
|
19489
|
+
var commandProtectionRepoStateSchema = z25.object({
|
|
19490
|
+
branch: z25.string().nullable(),
|
|
19491
|
+
defaultBranch: z25.string().nullable(),
|
|
19492
|
+
pushBranch: z25.string().nullable(),
|
|
19493
|
+
pushConfig: z25.string().nullable(),
|
|
19494
|
+
headMessage: z25.string().nullable(),
|
|
19495
|
+
mergeInProgress: z25.boolean().optional()
|
|
19488
19496
|
});
|
|
19489
|
-
var commandProtectionEvaluateRequestSchema =
|
|
19490
|
-
provider:
|
|
19491
|
-
source:
|
|
19492
|
-
toolName:
|
|
19493
|
-
toolInput:
|
|
19494
|
-
command:
|
|
19495
|
-
cwd:
|
|
19496
|
-
toolUseId:
|
|
19497
|
+
var commandProtectionEvaluateRequestSchema = z25.object({
|
|
19498
|
+
provider: z25.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
19499
|
+
source: z25.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
19500
|
+
toolName: z25.string(),
|
|
19501
|
+
toolInput: z25.unknown(),
|
|
19502
|
+
command: z25.string().nullish(),
|
|
19503
|
+
cwd: z25.string().nullish(),
|
|
19504
|
+
toolUseId: z25.string().nullish(),
|
|
19497
19505
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
19498
19506
|
// policy can see branches and commit messages the command text only references.
|
|
19499
|
-
gitContext:
|
|
19500
|
-
repos:
|
|
19501
|
-
messageFiles:
|
|
19507
|
+
gitContext: z25.object({
|
|
19508
|
+
repos: z25.record(z25.string(), commandProtectionRepoStateSchema),
|
|
19509
|
+
messageFiles: z25.record(z25.string(), z25.string())
|
|
19502
19510
|
}).optional()
|
|
19503
19511
|
});
|
|
19504
19512
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -19718,133 +19726,133 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
19718
19726
|
}
|
|
19719
19727
|
|
|
19720
19728
|
// ../shared/src/routes/linear.ts
|
|
19721
|
-
import { z as
|
|
19722
|
-
var linearSessionMetadataSchema =
|
|
19723
|
-
via_mothership:
|
|
19724
|
-
attached:
|
|
19725
|
-
issue_id:
|
|
19726
|
-
issue_identifier:
|
|
19727
|
-
issue_title:
|
|
19728
|
-
issue_description:
|
|
19729
|
-
issue_url:
|
|
19730
|
-
comment_id:
|
|
19731
|
-
comment_body:
|
|
19732
|
-
triggered_by_id:
|
|
19733
|
-
triggered_by_name:
|
|
19734
|
-
triggered_by_email:
|
|
19735
|
-
linear_workspace_id:
|
|
19736
|
-
creator_id:
|
|
19737
|
-
creator_name:
|
|
19738
|
-
creator_email:
|
|
19739
|
-
assignee_id:
|
|
19740
|
-
assignee_name:
|
|
19741
|
-
assignee_email:
|
|
19742
|
-
issue_state:
|
|
19743
|
-
parent_issue:
|
|
19744
|
-
id:
|
|
19745
|
-
identifier:
|
|
19746
|
-
title:
|
|
19747
|
-
description:
|
|
19729
|
+
import { z as z26 } from "zod";
|
|
19730
|
+
var linearSessionMetadataSchema = z26.object({
|
|
19731
|
+
via_mothership: z26.boolean().optional(),
|
|
19732
|
+
attached: z26.boolean().optional(),
|
|
19733
|
+
issue_id: z26.string(),
|
|
19734
|
+
issue_identifier: z26.string(),
|
|
19735
|
+
issue_title: z26.string(),
|
|
19736
|
+
issue_description: z26.string(),
|
|
19737
|
+
issue_url: z26.string(),
|
|
19738
|
+
comment_id: z26.string(),
|
|
19739
|
+
comment_body: z26.string(),
|
|
19740
|
+
triggered_by_id: z26.string().optional(),
|
|
19741
|
+
triggered_by_name: z26.string().optional(),
|
|
19742
|
+
triggered_by_email: z26.string().optional(),
|
|
19743
|
+
linear_workspace_id: z26.string().optional(),
|
|
19744
|
+
creator_id: z26.string().optional(),
|
|
19745
|
+
creator_name: z26.string().optional(),
|
|
19746
|
+
creator_email: z26.string().optional(),
|
|
19747
|
+
assignee_id: z26.string().optional(),
|
|
19748
|
+
assignee_name: z26.string().optional(),
|
|
19749
|
+
assignee_email: z26.string().optional(),
|
|
19750
|
+
issue_state: z26.string().optional(),
|
|
19751
|
+
parent_issue: z26.object({
|
|
19752
|
+
id: z26.string(),
|
|
19753
|
+
identifier: z26.string(),
|
|
19754
|
+
title: z26.string(),
|
|
19755
|
+
description: z26.string().nullable()
|
|
19748
19756
|
}).optional(),
|
|
19749
|
-
workspace:
|
|
19750
|
-
id:
|
|
19751
|
-
coding_agent:
|
|
19752
|
-
task_description:
|
|
19753
|
-
created_at:
|
|
19757
|
+
workspace: z26.object({
|
|
19758
|
+
id: z26.string(),
|
|
19759
|
+
coding_agent: z26.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
|
|
19760
|
+
task_description: z26.string(),
|
|
19761
|
+
created_at: z26.string()
|
|
19754
19762
|
}).optional()
|
|
19755
19763
|
});
|
|
19756
19764
|
|
|
19757
19765
|
// ../shared/src/routes/scout.ts
|
|
19758
|
-
import { z as
|
|
19766
|
+
import { z as z27 } from "zod";
|
|
19759
19767
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
19760
|
-
var scoutLinearSessionIntentRequestSchema =
|
|
19761
|
-
comment_id:
|
|
19762
|
-
action:
|
|
19768
|
+
var scoutLinearSessionIntentRequestSchema = z27.object({
|
|
19769
|
+
comment_id: z27.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
19770
|
+
action: z27.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
|
|
19763
19771
|
});
|
|
19764
|
-
var scoutLinearStartRequestSchema =
|
|
19765
|
-
issue_id:
|
|
19766
|
-
agent_session_id:
|
|
19767
|
-
prompt:
|
|
19772
|
+
var scoutLinearStartRequestSchema = z27.object({
|
|
19773
|
+
issue_id: z27.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
19774
|
+
agent_session_id: z27.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
19775
|
+
prompt: z27.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
|
|
19768
19776
|
});
|
|
19769
|
-
var slackChannelIdSchema =
|
|
19770
|
-
var slackThreadTsSchema =
|
|
19771
|
-
var scoutSlackSpawnRequestSchema =
|
|
19777
|
+
var slackChannelIdSchema = z27.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
19778
|
+
var slackThreadTsSchema = z27.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
19779
|
+
var scoutSlackSpawnRequestSchema = z27.object({
|
|
19772
19780
|
channel_id: slackChannelIdSchema,
|
|
19773
19781
|
thread_ts: slackThreadTsSchema,
|
|
19774
|
-
message_ts:
|
|
19775
|
-
user_id:
|
|
19776
|
-
prompt:
|
|
19777
|
-
acknowledgement_ts:
|
|
19778
|
-
environment_id:
|
|
19782
|
+
message_ts: z27.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."),
|
|
19783
|
+
user_id: z27.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
|
|
19784
|
+
prompt: z27.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."),
|
|
19785
|
+
acknowledgement_ts: z27.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."),
|
|
19786
|
+
environment_id: z27.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.`)
|
|
19779
19787
|
});
|
|
19780
19788
|
var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
|
|
19781
|
-
title:
|
|
19782
|
-
prompt:
|
|
19783
|
-
acknowledgement_ts:
|
|
19789
|
+
title: z27.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
|
|
19790
|
+
prompt: z27.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."),
|
|
19791
|
+
acknowledgement_ts: z27.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.")
|
|
19784
19792
|
});
|
|
19785
|
-
var scoutSlackRelayRequestSchema =
|
|
19793
|
+
var scoutSlackRelayRequestSchema = z27.object({
|
|
19786
19794
|
channel_id: slackChannelIdSchema,
|
|
19787
19795
|
thread_ts: slackThreadTsSchema,
|
|
19788
|
-
message:
|
|
19789
|
-
user_id:
|
|
19790
|
-
queue:
|
|
19791
|
-
workspace_id:
|
|
19792
|
-
message_ts:
|
|
19796
|
+
message: z27.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."),
|
|
19797
|
+
user_id: z27.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`."),
|
|
19798
|
+
queue: z27.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."),
|
|
19799
|
+
workspace_id: z27.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. A Mothership gets the person's own Slack message and the thread instead of \`message\`. Omit to relay into the thread's own workspace.`),
|
|
19800
|
+
message_ts: z27.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.")
|
|
19793
19801
|
});
|
|
19794
|
-
var scoutSlackSetThreadMutedRequestSchema =
|
|
19802
|
+
var scoutSlackSetThreadMutedRequestSchema = z27.object({
|
|
19795
19803
|
channel_id: slackChannelIdSchema,
|
|
19796
19804
|
thread_ts: slackThreadTsSchema,
|
|
19797
|
-
muted:
|
|
19805
|
+
muted: z27.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
|
|
19798
19806
|
});
|
|
19799
|
-
var scoutListWorkspacesRequestSchema =
|
|
19807
|
+
var scoutListWorkspacesRequestSchema = z27.object({
|
|
19800
19808
|
channel_id: slackChannelIdSchema,
|
|
19801
19809
|
thread_ts: slackThreadTsSchema,
|
|
19802
|
-
message_ts:
|
|
19803
|
-
user_id:
|
|
19804
|
-
query:
|
|
19810
|
+
message_ts: z27.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
19811
|
+
user_id: z27.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
|
|
19812
|
+
query: z27.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace and Mothership names and pull request URLs.")
|
|
19805
19813
|
});
|
|
19806
|
-
var scoutSlackConfirmationSchema =
|
|
19807
|
-
confirmation_channel_id:
|
|
19808
|
-
confirmation_thread_ts:
|
|
19809
|
-
confirmation_message_ts:
|
|
19810
|
-
confirmation_user_id:
|
|
19814
|
+
var scoutSlackConfirmationSchema = z27.object({
|
|
19815
|
+
confirmation_channel_id: z27.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
|
|
19816
|
+
confirmation_thread_ts: z27.string().describe("`thread_ts` from that message's envelope."),
|
|
19817
|
+
confirmation_message_ts: z27.string().describe("`message_ts` from that message's envelope."),
|
|
19818
|
+
confirmation_user_id: z27.string().describe("`user_id` from that message's envelope.")
|
|
19811
19819
|
});
|
|
19812
19820
|
var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
|
|
19813
19821
|
var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19814
|
-
preset_id:
|
|
19815
|
-
name:
|
|
19816
|
-
description:
|
|
19817
|
-
icon:
|
|
19818
|
-
instructions:
|
|
19822
|
+
preset_id: z27.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
|
|
19823
|
+
name: z27.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
|
|
19824
|
+
description: z27.string().optional().describe("One-line summary shown in settings."),
|
|
19825
|
+
icon: z27.enum(SCOUT_PRESET_ICONS).optional(),
|
|
19826
|
+
instructions: z27.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
|
|
19819
19827
|
});
|
|
19820
19828
|
var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19821
|
-
source:
|
|
19822
|
-
external_id:
|
|
19823
|
-
monitored:
|
|
19824
|
-
preset_id:
|
|
19825
|
-
instructions:
|
|
19826
|
-
proactivity:
|
|
19829
|
+
source: z27.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
|
|
19830
|
+
external_id: z27.string().describe("Slack channel id or Linear team id."),
|
|
19831
|
+
monitored: z27.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."),
|
|
19832
|
+
preset_id: z27.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
19833
|
+
instructions: z27.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
|
|
19834
|
+
proactivity: z27.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.")
|
|
19827
19835
|
});
|
|
19828
19836
|
var scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19829
|
-
proactivity:
|
|
19837
|
+
proactivity: z27.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`.")
|
|
19830
19838
|
});
|
|
19831
19839
|
var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19832
|
-
preset_id:
|
|
19840
|
+
preset_id: z27.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
|
|
19833
19841
|
});
|
|
19834
19842
|
var RESET_TO_DEFAULT = "default";
|
|
19835
|
-
var resettable = (schema, description) =>
|
|
19843
|
+
var resettable = (schema, description) => z27.union([schema, z27.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
|
|
19836
19844
|
var scoutSetSlackAgentDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
19837
|
-
agent_provider: resettable(
|
|
19838
|
-
model: resettable(
|
|
19839
|
-
thinking_level: resettable(
|
|
19840
|
-
goal_mode: resettable(
|
|
19841
|
-
fast_mode: resettable(
|
|
19845
|
+
agent_provider: resettable(z27.enum(AGENT), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
|
|
19846
|
+
model: resettable(z27.string(), "Model id for that agent; the default is the agent's own."),
|
|
19847
|
+
thinking_level: resettable(z27.enum(VALID_THINKING_LEVELS), "Thinking level."),
|
|
19848
|
+
goal_mode: resettable(z27.boolean(), "Goal mode."),
|
|
19849
|
+
fast_mode: resettable(z27.boolean(), "Fast mode.")
|
|
19842
19850
|
});
|
|
19843
|
-
var scoutClaimSettingsOfferToolInputSchema =
|
|
19851
|
+
var scoutClaimSettingsOfferToolInputSchema = z27.object({
|
|
19844
19852
|
channel_id: slackChannelIdSchema,
|
|
19845
|
-
kind:
|
|
19846
|
-
user_id:
|
|
19847
|
-
declined:
|
|
19853
|
+
kind: z27.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`: offering to lower the workspace default; only decline it, the server claims it for you."),
|
|
19854
|
+
user_id: z27.string().optional().describe("The envelope's `user_id`. Required for `proactivity`, so the server can say whether they are an organization admin."),
|
|
19855
|
+
declined: z27.boolean().optional().describe("true when the person declined an offer you already made, so it is not made again.")
|
|
19848
19856
|
});
|
|
19849
19857
|
|
|
19850
19858
|
// ../shared/src/routes/plugin-catalog.ts
|
|
@@ -20206,11 +20214,11 @@ var PLUGIN_CATALOG = [
|
|
|
20206
20214
|
var PROFILE_AVATAR_MAX_SIZE_BYTES = 5 * 1024 * 1024;
|
|
20207
20215
|
|
|
20208
20216
|
// ../shared/src/routes/web-auth.ts
|
|
20209
|
-
import { z as
|
|
20210
|
-
var webAuthRedeemResponseSchema =
|
|
20211
|
-
path:
|
|
20212
|
-
organizationId:
|
|
20213
|
-
session:
|
|
20217
|
+
import { z as z28 } from "zod";
|
|
20218
|
+
var webAuthRedeemResponseSchema = z28.object({
|
|
20219
|
+
path: z28.string(),
|
|
20220
|
+
organizationId: z28.string().nullable(),
|
|
20221
|
+
session: z28.object({ access_token: z28.string(), refresh_token: z28.string(), user: z28.object({ id: z28.string(), email: z28.string() }) }).nullable()
|
|
20214
20222
|
});
|
|
20215
20223
|
|
|
20216
20224
|
// ../shared/src/routes/client-state.ts
|
|
@@ -20233,81 +20241,81 @@ var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_ST
|
|
|
20233
20241
|
var workspaceSearchOpensClientStateKey = orgUserClientStateKey(WORKSPACE_SEARCH_OPENS_CLIENT_STATE_KEY_PREFIX);
|
|
20234
20242
|
|
|
20235
20243
|
// ../shared/src/routes/workspace-events.ts
|
|
20236
|
-
import { z as
|
|
20237
|
-
var workspaceTurnCompletionSchema =
|
|
20238
|
-
workspaceName:
|
|
20239
|
-
completedAt:
|
|
20240
|
-
processing:
|
|
20241
|
-
pullRequestFeedback:
|
|
20242
|
-
attention:
|
|
20244
|
+
import { z as z29 } from "zod";
|
|
20245
|
+
var workspaceTurnCompletionSchema = z29.object({
|
|
20246
|
+
workspaceName: z29.string(),
|
|
20247
|
+
completedAt: z29.string(),
|
|
20248
|
+
processing: z29.boolean().optional(),
|
|
20249
|
+
pullRequestFeedback: z29.boolean().optional(),
|
|
20250
|
+
attention: z29.object({ reason: z29.enum(CHAT_ATTENTION_REASONS), userId: z29.string() }).optional()
|
|
20243
20251
|
});
|
|
20244
|
-
var workspaceChangedEventSchema =
|
|
20245
|
-
|
|
20246
|
-
type:
|
|
20247
|
-
workspaceId:
|
|
20248
|
-
workspace:
|
|
20252
|
+
var workspaceChangedEventSchema = z29.discriminatedUnion("type", [
|
|
20253
|
+
z29.object({
|
|
20254
|
+
type: z29.literal("workspace.changed"),
|
|
20255
|
+
workspaceId: z29.string(),
|
|
20256
|
+
workspace: z29.object({ status: z29.enum(WORKSPACE_STATUSES), last_activity_at: z29.string().nullable() }).optional(),
|
|
20249
20257
|
completion: workspaceTurnCompletionSchema.optional(),
|
|
20250
|
-
ts:
|
|
20258
|
+
ts: z29.string()
|
|
20251
20259
|
}),
|
|
20252
|
-
|
|
20253
|
-
type:
|
|
20254
|
-
workspaceId:
|
|
20255
|
-
chatId:
|
|
20256
|
-
ts:
|
|
20260
|
+
z29.object({
|
|
20261
|
+
type: z29.literal("workspace.chat.changed"),
|
|
20262
|
+
workspaceId: z29.string(),
|
|
20263
|
+
chatId: z29.string(),
|
|
20264
|
+
ts: z29.string()
|
|
20257
20265
|
}),
|
|
20258
|
-
|
|
20259
|
-
type:
|
|
20260
|
-
workspaceId:
|
|
20261
|
-
chatId:
|
|
20262
|
-
afterCursor:
|
|
20263
|
-
processing:
|
|
20264
|
-
ts:
|
|
20266
|
+
z29.object({
|
|
20267
|
+
type: z29.literal("workspace.chat.advanced"),
|
|
20268
|
+
workspaceId: z29.string(),
|
|
20269
|
+
chatId: z29.string(),
|
|
20270
|
+
afterCursor: z29.string().optional(),
|
|
20271
|
+
processing: z29.boolean(),
|
|
20272
|
+
ts: z29.string()
|
|
20265
20273
|
}),
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
type:
|
|
20269
|
-
workspaceId:
|
|
20270
|
-
ts:
|
|
20274
|
+
z29.object({ type: z29.literal("presence.changed"), ts: z29.string() }),
|
|
20275
|
+
z29.object({
|
|
20276
|
+
type: z29.literal("mobile-testing.changed"),
|
|
20277
|
+
workspaceId: z29.string(),
|
|
20278
|
+
ts: z29.string()
|
|
20271
20279
|
}),
|
|
20272
|
-
|
|
20273
|
-
type:
|
|
20274
|
-
workspaceId:
|
|
20275
|
-
ts:
|
|
20280
|
+
z29.object({
|
|
20281
|
+
type: z29.literal("variable-request.changed"),
|
|
20282
|
+
workspaceId: z29.string(),
|
|
20283
|
+
ts: z29.string()
|
|
20276
20284
|
}),
|
|
20277
|
-
|
|
20278
|
-
type:
|
|
20279
|
-
prUrl:
|
|
20280
|
-
ts:
|
|
20285
|
+
z29.object({
|
|
20286
|
+
type: z29.literal("pull-request.changed"),
|
|
20287
|
+
prUrl: z29.string(),
|
|
20288
|
+
ts: z29.string()
|
|
20281
20289
|
}),
|
|
20282
|
-
|
|
20283
|
-
type:
|
|
20284
|
-
workspaceId:
|
|
20285
|
-
subagent:
|
|
20286
|
-
ts:
|
|
20290
|
+
z29.object({
|
|
20291
|
+
type: z29.literal("mothership.subagent.changed"),
|
|
20292
|
+
workspaceId: z29.string(),
|
|
20293
|
+
subagent: z29.object({ id: z29.string(), name: z29.string(), prUrl: z29.string().nullable() }),
|
|
20294
|
+
ts: z29.string()
|
|
20287
20295
|
}),
|
|
20288
|
-
|
|
20296
|
+
z29.object({ type: z29.literal("needs-you.changed"), workspaceId: z29.string().nullable(), ts: z29.string() })
|
|
20289
20297
|
]);
|
|
20290
20298
|
|
|
20291
20299
|
// ../shared/src/routes/presence.ts
|
|
20292
|
-
import { z as
|
|
20293
|
-
var presenceStatusSchema =
|
|
20294
|
-
var presenceLocationSchema =
|
|
20295
|
-
workspaceId:
|
|
20300
|
+
import { z as z30 } from "zod";
|
|
20301
|
+
var presenceStatusSchema = z30.enum(["online", "typing"]);
|
|
20302
|
+
var presenceLocationSchema = z30.object({
|
|
20303
|
+
workspaceId: z30.string().optional()
|
|
20296
20304
|
});
|
|
20297
|
-
var presenceEntrySchema =
|
|
20298
|
-
userId:
|
|
20305
|
+
var presenceEntrySchema = z30.object({
|
|
20306
|
+
userId: z30.string(),
|
|
20299
20307
|
status: presenceStatusSchema,
|
|
20300
20308
|
location: presenceLocationSchema,
|
|
20301
|
-
ts:
|
|
20309
|
+
ts: z30.string()
|
|
20302
20310
|
});
|
|
20303
|
-
var updatePresenceRequestSchema =
|
|
20311
|
+
var updatePresenceRequestSchema = z30.object({
|
|
20304
20312
|
status: presenceStatusSchema,
|
|
20305
20313
|
location: presenceLocationSchema.optional()
|
|
20306
20314
|
});
|
|
20307
20315
|
|
|
20308
20316
|
// ../shared/src/routes/review-messages.ts
|
|
20309
|
-
import { z as
|
|
20310
|
-
var sendPullRequestReviewMessageRequestSchema =
|
|
20317
|
+
import { z as z31 } from "zod";
|
|
20318
|
+
var sendPullRequestReviewMessageRequestSchema = z31.object({
|
|
20311
20319
|
...sendChatMessageRequestSchema.pick({
|
|
20312
20320
|
message: true,
|
|
20313
20321
|
messageId: true,
|
|
@@ -20320,8 +20328,8 @@ var sendPullRequestReviewMessageRequestSchema = z30.object({
|
|
|
20320
20328
|
ultrafastMode: true
|
|
20321
20329
|
}).shape,
|
|
20322
20330
|
/** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
|
|
20323
|
-
newChat:
|
|
20324
|
-
provider:
|
|
20331
|
+
newChat: z31.boolean().optional(),
|
|
20332
|
+
provider: z31.enum(VALID_AGENT_PROVIDERS).optional()
|
|
20325
20333
|
});
|
|
20326
20334
|
|
|
20327
20335
|
// ../shared/src/audit-log.ts
|
|
@@ -20542,30 +20550,30 @@ function isSkillRegistryManifest(value) {
|
|
|
20542
20550
|
}
|
|
20543
20551
|
|
|
20544
20552
|
// ../shared/src/routes/variable-requests.ts
|
|
20545
|
-
import { z as
|
|
20553
|
+
import { z as z32 } from "zod";
|
|
20546
20554
|
var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
|
|
20547
20555
|
var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
|
|
20548
|
-
var requestedVariableSchema =
|
|
20549
|
-
key:
|
|
20550
|
-
required:
|
|
20551
|
-
replace:
|
|
20556
|
+
var requestedVariableSchema = z32.object({
|
|
20557
|
+
key: z32.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
|
|
20558
|
+
required: z32.boolean(),
|
|
20559
|
+
replace: z32.boolean().optional()
|
|
20552
20560
|
});
|
|
20553
|
-
var requestedVariablesSchema =
|
|
20554
|
-
var createVariableRequestSchema =
|
|
20561
|
+
var requestedVariablesSchema = z32.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");
|
|
20562
|
+
var createVariableRequestSchema = z32.object({
|
|
20555
20563
|
variables: requestedVariablesSchema,
|
|
20556
|
-
reason:
|
|
20557
|
-
wait:
|
|
20564
|
+
reason: z32.string().trim().max(500).nullish().transform((value) => value || null),
|
|
20565
|
+
wait: z32.boolean().default(true)
|
|
20558
20566
|
});
|
|
20559
|
-
var respondVariableRequestSchema =
|
|
20560
|
-
|
|
20561
|
-
action:
|
|
20562
|
-
destination:
|
|
20567
|
+
var respondVariableRequestSchema = z32.discriminatedUnion("action", [
|
|
20568
|
+
z32.object({
|
|
20569
|
+
action: z32.literal("provide"),
|
|
20570
|
+
destination: z32.enum(VARIABLE_REQUEST_DESTINATIONS),
|
|
20563
20571
|
/** Defaults to the workspace's environment, so older clients keep saving there. */
|
|
20564
|
-
environment_ids:
|
|
20565
|
-
overwrite:
|
|
20566
|
-
values:
|
|
20572
|
+
environment_ids: z32.array(z32.string().uuid()).optional(),
|
|
20573
|
+
overwrite: z32.boolean().optional(),
|
|
20574
|
+
values: z32.record(z32.string().regex(VARIABLE_KEY_RE), z32.string())
|
|
20567
20575
|
}),
|
|
20568
|
-
|
|
20576
|
+
z32.object({ action: z32.literal("skip") })
|
|
20569
20577
|
]);
|
|
20570
20578
|
|
|
20571
20579
|
export {
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
evaluateCommandProtection
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OHUZJSF4.js";
|
|
7
|
+
import "./chunk-64DQBGLZ.js";
|
|
8
|
+
import "./chunk-NPPH5Y36.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZGY4X7WZ.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
recoverCompletedTurn,
|
|
15
15
|
spawnMuseMsp,
|
|
16
16
|
startMuseSession
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-Y2IJNK27.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-RXGCKGLJ.js";
|
|
22
|
+
import "./chunk-NPPH5Y36.js";
|
|
23
23
|
import {
|
|
24
24
|
AGENT,
|
|
25
25
|
OPENCODE_GO_PROVIDER,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
headlessAgentUsagePath,
|
|
30
30
|
isRecord,
|
|
31
31
|
withTimeout
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
33
33
|
import "./chunk-VEQXQN22.js";
|
|
34
34
|
|
|
35
35
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
evaluateCommandProtection,
|
|
28
28
|
extractToolCommand,
|
|
29
29
|
reportCommandProtectionBlock
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-OHUZJSF4.js";
|
|
31
31
|
import {
|
|
32
32
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
33
33
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
spawnMuseMsp,
|
|
66
66
|
startMuseSession,
|
|
67
67
|
uuidV7
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-Y2IJNK27.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-3FVW3JCR.js";
|
|
72
72
|
import {
|
|
73
73
|
ACCOUNT_RATE_LIMITS_READ_METHOD,
|
|
74
74
|
AsyncLock,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
timestampFromSeconds,
|
|
144
144
|
upsertCredentialFileLines,
|
|
145
145
|
writeSecureCredentialFile
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-5IIU545W.js";
|
|
147
147
|
import {
|
|
148
148
|
ENGINE_ENV,
|
|
149
149
|
monolithRequest,
|
|
@@ -153,15 +153,15 @@ import {
|
|
|
153
153
|
resolveDiffBase,
|
|
154
154
|
setAgentCredentialSnapshot,
|
|
155
155
|
setLinearSessionId
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-64DQBGLZ.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-RXGCKGLJ.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-NPPH5Y36.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -423,7 +423,7 @@ import {
|
|
|
423
423
|
workspaceTokenRequestSchema,
|
|
424
424
|
workspaceTokenResponseSchema,
|
|
425
425
|
wrapInTag
|
|
426
|
-
} from "./chunk-
|
|
426
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
427
427
|
import {
|
|
428
428
|
cloneMcpConfig,
|
|
429
429
|
ensureCompatibilityImports,
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
publishedPullRequestUrls
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3FVW3JCR.js";
|
|
7
7
|
import {
|
|
8
8
|
isRecord
|
|
9
9
|
} from "./chunk-UZSNFLDQ.js";
|
|
10
10
|
import {
|
|
11
11
|
shouldRefreshPullRequests
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZGY4X7WZ.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/services/post-tool-pr-notifier.ts
|
package/dist/src/subagent-mcp.js
CHANGED