replicas-engine 0.1.1437 → 0.1.1438
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-OYJEXADP.js → asp-host-XS5NNBTN.js} +5 -5
- package/dist/src/{chunk-FQV2HJH6.js → chunk-4YBKVXKQ.js} +2 -2
- package/dist/src/{chunk-X5C5KK3Q.js → chunk-BK2HBHRQ.js} +1 -1
- package/dist/src/{chunk-MSZUJKIX.js → chunk-CZZKD7LV.js} +2 -2
- package/dist/src/{chunk-FLB2IR7V.js → chunk-DCWM3NR7.js} +291 -290
- package/dist/src/{chunk-X5AP6KN6.js → chunk-LYSRJIX4.js} +2 -2
- package/dist/src/{chunk-V4T4E227.js → chunk-NLVL2PPX.js} +6 -6
- package/dist/src/{chunk-GTEK55CB.js → chunk-SDCMCINP.js} +1 -1
- package/dist/src/{chunk-PPI7EQGY.js → chunk-VFCFO3OG.js} +2 -2
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +4 -4
- package/dist/src/index.js +8 -8
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
listCodexModelsForDetails,
|
|
9
9
|
restartCodexAspHost,
|
|
10
10
|
restartCodexAspHostIfRunning
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-NLVL2PPX.js";
|
|
12
|
+
import "./chunk-4YBKVXKQ.js";
|
|
13
|
+
import "./chunk-LYSRJIX4.js";
|
|
14
|
+
import "./chunk-SDCMCINP.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-DCWM3NR7.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -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-SDCMCINP.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-DCWM3NR7.js";
|
|
25
25
|
|
|
26
26
|
// src/runtime-env-loader.ts
|
|
27
27
|
import { readFileSync } from "fs";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4YBKVXKQ.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-DCWM3NR7.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -14785,6 +14785,7 @@ var DEFAULT_USER_PREFERENCES = {
|
|
|
14785
14785
|
appshot_destination: "automatic",
|
|
14786
14786
|
appshot_sound: true,
|
|
14787
14787
|
mothership_tour_seen: false,
|
|
14788
|
+
mothership_board_opened: false,
|
|
14788
14789
|
follow_up_mode: "steer",
|
|
14789
14790
|
memory_enabled: null,
|
|
14790
14791
|
subagent_mcp_enabled: null,
|
|
@@ -15990,6 +15991,119 @@ function workspaceTargetFromToolOutput(output) {
|
|
|
15990
15991
|
}
|
|
15991
15992
|
}
|
|
15992
15993
|
|
|
15994
|
+
// ../shared/src/mothership-board.ts
|
|
15995
|
+
import { z as z26 } from "zod";
|
|
15996
|
+
var MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger", "working"];
|
|
15997
|
+
var label = (max) => z26.string().trim().min(1).max(max);
|
|
15998
|
+
var tone = z26.enum(MOTHERSHIP_BOARD_TONES);
|
|
15999
|
+
var blockId = z26.string().regex(/^[\w.:-]{1,64}$/, "Use 1-64 letters, digits, _, -, . or :");
|
|
16000
|
+
var httpsUrl = z26.url({ protocol: /^https$/, error: "Must be an https URL" });
|
|
16001
|
+
var prUrl = httpsUrl.refine((url) => parseCodeHostPrUrl(url) !== null, "Must be a GitHub pull request or GitLab merge request URL");
|
|
16002
|
+
var linearIdentifier = z26.string().regex(/^[A-Za-z][A-Za-z0-9]{0,9}-\d{1,7}$/, "Use a Linear identifier such as REP-123");
|
|
16003
|
+
var action = z26.discriminatedUnion("type", [
|
|
16004
|
+
z26.object({ type: z26.literal("open_ship"), workspace_id: z26.uuid() }),
|
|
16005
|
+
z26.object({ type: z26.literal("message_ship"), workspace_id: z26.uuid(), message: label(4e3) }),
|
|
16006
|
+
z26.object({ type: z26.literal("open_pr"), url: prUrl }),
|
|
16007
|
+
z26.object({ type: z26.literal("merge_pr"), url: prUrl }),
|
|
16008
|
+
z26.object({ type: z26.literal("message_mothership"), message: label(4e3) }),
|
|
16009
|
+
z26.object({ type: z26.literal("open_link"), url: httpsUrl })
|
|
16010
|
+
]);
|
|
16011
|
+
var text3 = z26.object({ type: z26.literal("text"), id: blockId.optional(), text: label(2e3) });
|
|
16012
|
+
var badge = z26.object({ type: z26.literal("badge"), id: blockId.optional(), label: label(40), tone: tone.optional() });
|
|
16013
|
+
var pr = z26.object({ type: z26.literal("pr"), id: blockId.optional(), url: prUrl });
|
|
16014
|
+
var ship = z26.object({ type: z26.literal("ship"), id: blockId.optional(), workspace_id: z26.uuid() });
|
|
16015
|
+
var linear = z26.object({ type: z26.literal("linear"), id: blockId.optional(), identifier: linearIdentifier });
|
|
16016
|
+
var button = z26.object({ type: z26.literal("button"), id: blockId.optional(), label: label(60), action, variant: z26.enum(["primary", "outline", "warning", "destructive"]).optional(), resolves: blockId.optional() });
|
|
16017
|
+
var steps = z26.object({
|
|
16018
|
+
type: z26.literal("steps"),
|
|
16019
|
+
id: blockId.optional(),
|
|
16020
|
+
steps: z26.array(z26.object({ label: label(30), state: z26.enum(["done", "current", "pending", "failed"]) })).min(1).max(8)
|
|
16021
|
+
});
|
|
16022
|
+
var inline = z26.discriminatedUnion("type", [text3, badge, pr, ship, linear, button, steps]);
|
|
16023
|
+
var row = z26.object({ type: z26.literal("row"), id: blockId.optional(), cells: z26.array(z26.union([label(500), inline])).min(1).max(6) });
|
|
16024
|
+
var blockTypes = {
|
|
16025
|
+
text: text3,
|
|
16026
|
+
badge,
|
|
16027
|
+
pr,
|
|
16028
|
+
ship,
|
|
16029
|
+
linear,
|
|
16030
|
+
button,
|
|
16031
|
+
steps,
|
|
16032
|
+
stat: z26.object({ type: z26.literal("stat"), id: blockId.optional(), label: label(40), value: label(40), tone: tone.optional() }),
|
|
16033
|
+
divider: z26.object({ type: z26.literal("divider"), id: blockId.optional() }),
|
|
16034
|
+
updated_at: z26.object({ type: z26.literal("updated_at"), id: blockId.optional() }),
|
|
16035
|
+
choice: z26.object({
|
|
16036
|
+
type: z26.literal("choice"),
|
|
16037
|
+
id: blockId.optional(),
|
|
16038
|
+
question: label(500),
|
|
16039
|
+
options: z26.array(z26.object({ label: label(60), message: label(2e3).optional() })).min(2).max(6),
|
|
16040
|
+
resolves: blockId.optional()
|
|
16041
|
+
}),
|
|
16042
|
+
button_group: z26.object({ type: z26.literal("button_group"), id: blockId.optional(), children: z26.array(button).min(1).max(8) }),
|
|
16043
|
+
table: z26.object({ type: z26.literal("table"), id: blockId.optional(), columns: z26.array(label(40)).min(1).max(6), children: z26.array(row).max(100) }),
|
|
16044
|
+
callout: z26.object({
|
|
16045
|
+
type: z26.literal("callout"),
|
|
16046
|
+
id: blockId.optional(),
|
|
16047
|
+
tone,
|
|
16048
|
+
title: label(120).optional(),
|
|
16049
|
+
get children() {
|
|
16050
|
+
return z26.array(block).max(20).optional();
|
|
16051
|
+
}
|
|
16052
|
+
}),
|
|
16053
|
+
list: z26.object({
|
|
16054
|
+
type: z26.literal("list"),
|
|
16055
|
+
id: blockId.optional(),
|
|
16056
|
+
ordered: z26.boolean().optional(),
|
|
16057
|
+
get children() {
|
|
16058
|
+
return z26.array(block).max(100);
|
|
16059
|
+
}
|
|
16060
|
+
}),
|
|
16061
|
+
section: z26.object({
|
|
16062
|
+
type: z26.literal("section"),
|
|
16063
|
+
id: blockId.optional(),
|
|
16064
|
+
title: label(120),
|
|
16065
|
+
tone: tone.optional(),
|
|
16066
|
+
collapsed: z26.boolean().optional(),
|
|
16067
|
+
get children() {
|
|
16068
|
+
return z26.array(block).max(100);
|
|
16069
|
+
}
|
|
16070
|
+
})
|
|
16071
|
+
};
|
|
16072
|
+
var blockSchemas = [text3, ...Object.values(blockTypes).filter((schema) => schema !== text3)];
|
|
16073
|
+
var block = z26.discriminatedUnion("type", blockSchemas);
|
|
16074
|
+
var MOTHERSHIP_BOARD_CONTAINER_TYPES = Object.entries(blockTypes).filter(([, schema]) => "children" in schema.shape).map(([type]) => type);
|
|
16075
|
+
var mothershipBoardBlocksSchema = z26.array(block).max(100).superRefine((blocks, ctx) => {
|
|
16076
|
+
const seen = /* @__PURE__ */ new Set();
|
|
16077
|
+
const visit = (node, path) => {
|
|
16078
|
+
if (typeof node === "string") return;
|
|
16079
|
+
if (node.id) {
|
|
16080
|
+
if (seen.has(node.id)) ctx.addIssue({ code: "custom", path: [...path, "id"], message: `Duplicate block id "${node.id}"` });
|
|
16081
|
+
seen.add(node.id);
|
|
16082
|
+
}
|
|
16083
|
+
if (node.type === "table") {
|
|
16084
|
+
node.children.forEach((child, index) => {
|
|
16085
|
+
if (child.cells.length > node.columns.length) ctx.addIssue({ code: "custom", path: [...path, "children", index, "cells"], message: `Row has ${child.cells.length} cells but the table has ${node.columns.length} columns` });
|
|
16086
|
+
});
|
|
16087
|
+
}
|
|
16088
|
+
if (node.type === "row") node.cells.forEach((cell, index) => visit(cell, [...path, "cells", index]));
|
|
16089
|
+
else if ("children" in node) node.children?.forEach((child, index) => visit(child, [...path, "children", index]));
|
|
16090
|
+
};
|
|
16091
|
+
blocks.forEach((node, index) => visit(node, [index]));
|
|
16092
|
+
});
|
|
16093
|
+
var mothershipBoardOperationsSchema = z26.array(z26.discriminatedUnion("op", [
|
|
16094
|
+
z26.object({ op: z26.literal("replace"), blocks: z26.array(block) }),
|
|
16095
|
+
z26.object({
|
|
16096
|
+
op: z26.literal("upsert"),
|
|
16097
|
+
block: z26.discriminatedUnion("type", [row, ...blockSchemas]).refine((value) => Boolean(value.id), { message: "Give the block an id", path: ["id"] }),
|
|
16098
|
+
parent_id: blockId.optional(),
|
|
16099
|
+
position: z26.number().int().min(0).optional()
|
|
16100
|
+
}),
|
|
16101
|
+
z26.object({ op: z26.literal("remove"), id: blockId })
|
|
16102
|
+
])).min(1).max(50);
|
|
16103
|
+
var mothershipBoardItemRefSchema = z26.object({ mothershipId: z26.uuid(), block, occurrence: z26.number().int().min(0).optional() });
|
|
16104
|
+
var LINEAR_ISSUE_SUMMARIES_MAX = 50;
|
|
16105
|
+
var linearIssueSummariesRequestSchema = z26.object({ identifiers: z26.array(linearIdentifier).min(1).max(LINEAR_ISSUE_SUMMARIES_MAX) });
|
|
16106
|
+
|
|
15993
16107
|
// ../shared/src/user-message-matching.ts
|
|
15994
16108
|
var parsedTimestamps = /* @__PURE__ */ new Map();
|
|
15995
16109
|
function parseTimestampMs(timestamp) {
|
|
@@ -19657,10 +19771,10 @@ function hasChatStarted(chat) {
|
|
|
19657
19771
|
}
|
|
19658
19772
|
|
|
19659
19773
|
// ../shared/src/routes/billing.ts
|
|
19660
|
-
import { z as
|
|
19774
|
+
import { z as z27 } from "zod";
|
|
19661
19775
|
var SOURCE_LIMIT_SOURCES = ["limrun", "modal"];
|
|
19662
|
-
var usageLimitCentsSchema =
|
|
19663
|
-
var sourceLimitsCentsSchema =
|
|
19776
|
+
var usageLimitCentsSchema = z27.number().int().min(100).max(1e8);
|
|
19777
|
+
var sourceLimitsCentsSchema = z27.partialRecord(z27.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
|
|
19664
19778
|
|
|
19665
19779
|
// ../shared/src/routes/codex.ts
|
|
19666
19780
|
var CODEX_AUTH_ENV_KEYS = [
|
|
@@ -19814,7 +19928,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
19814
19928
|
};
|
|
19815
19929
|
|
|
19816
19930
|
// ../shared/src/routes/command-protection.ts
|
|
19817
|
-
import { z as
|
|
19931
|
+
import { z as z28 } from "zod";
|
|
19818
19932
|
|
|
19819
19933
|
// ../shared/src/git-invocations.ts
|
|
19820
19934
|
var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
|
|
@@ -19905,27 +20019,27 @@ function findCheckoutTarget(args) {
|
|
|
19905
20019
|
}
|
|
19906
20020
|
|
|
19907
20021
|
// ../shared/src/routes/command-protection.ts
|
|
19908
|
-
var commandProtectionRepoStateSchema =
|
|
19909
|
-
branch:
|
|
19910
|
-
defaultBranch:
|
|
19911
|
-
pushBranch:
|
|
19912
|
-
pushConfig:
|
|
19913
|
-
headMessage:
|
|
19914
|
-
mergeInProgress:
|
|
20022
|
+
var commandProtectionRepoStateSchema = z28.object({
|
|
20023
|
+
branch: z28.string().nullable(),
|
|
20024
|
+
defaultBranch: z28.string().nullable(),
|
|
20025
|
+
pushBranch: z28.string().nullable(),
|
|
20026
|
+
pushConfig: z28.string().nullable(),
|
|
20027
|
+
headMessage: z28.string().nullable(),
|
|
20028
|
+
mergeInProgress: z28.boolean().optional()
|
|
19915
20029
|
});
|
|
19916
|
-
var commandProtectionEvaluateRequestSchema =
|
|
19917
|
-
provider:
|
|
19918
|
-
source:
|
|
19919
|
-
toolName:
|
|
19920
|
-
toolInput:
|
|
19921
|
-
command:
|
|
19922
|
-
cwd:
|
|
19923
|
-
toolUseId:
|
|
20030
|
+
var commandProtectionEvaluateRequestSchema = z28.object({
|
|
20031
|
+
provider: z28.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
20032
|
+
source: z28.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
20033
|
+
toolName: z28.string(),
|
|
20034
|
+
toolInput: z28.unknown(),
|
|
20035
|
+
command: z28.string().nullish(),
|
|
20036
|
+
cwd: z28.string().nullish(),
|
|
20037
|
+
toolUseId: z28.string().nullish(),
|
|
19924
20038
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
19925
20039
|
// policy can see branches and commit messages the command text only references.
|
|
19926
|
-
gitContext:
|
|
19927
|
-
repos:
|
|
19928
|
-
messageFiles:
|
|
20040
|
+
gitContext: z28.object({
|
|
20041
|
+
repos: z28.record(z28.string(), commandProtectionRepoStateSchema),
|
|
20042
|
+
messageFiles: z28.record(z28.string(), z28.string())
|
|
19929
20043
|
}).optional()
|
|
19930
20044
|
});
|
|
19931
20045
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -20145,119 +20259,119 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
20145
20259
|
}
|
|
20146
20260
|
|
|
20147
20261
|
// ../shared/src/routes/scout.ts
|
|
20148
|
-
import { z as
|
|
20262
|
+
import { z as z29 } from "zod";
|
|
20149
20263
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
20150
|
-
var scoutLinearSessionIntentRequestSchema =
|
|
20151
|
-
comment_id:
|
|
20152
|
-
action:
|
|
20264
|
+
var scoutLinearSessionIntentRequestSchema = z29.object({
|
|
20265
|
+
comment_id: z29.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
20266
|
+
action: z29.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
|
|
20153
20267
|
});
|
|
20154
|
-
var scoutLinearStartRequestSchema =
|
|
20155
|
-
issue_id:
|
|
20156
|
-
agent_session_id:
|
|
20157
|
-
prompt:
|
|
20268
|
+
var scoutLinearStartRequestSchema = z29.object({
|
|
20269
|
+
issue_id: z29.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
20270
|
+
agent_session_id: z29.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
20271
|
+
prompt: z29.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
|
|
20158
20272
|
});
|
|
20159
|
-
var scoutRouteLinearTicketRequestSchema =
|
|
20160
|
-
agent_session_id:
|
|
20161
|
-
environment_id:
|
|
20162
|
-
mothership_id:
|
|
20273
|
+
var scoutRouteLinearTicketRequestSchema = z29.object({
|
|
20274
|
+
agent_session_id: z29.string().trim().min(1).describe("The ticket's `agent_session_id` from the envelope."),
|
|
20275
|
+
environment_id: z29.string().trim().min(1).optional().describe("Start the ticket in this environment."),
|
|
20276
|
+
mothership_id: z29.string().trim().min(1).optional().describe("Hand the ticket to this Mothership instead.")
|
|
20163
20277
|
}).refine((args) => !(args.environment_id && args.mothership_id), "Pass environment_id or mothership_id, not both.");
|
|
20164
|
-
var slackChannelIdSchema =
|
|
20165
|
-
var slackThreadTsSchema =
|
|
20166
|
-
var scoutSlackMessageReferenceSchema =
|
|
20278
|
+
var slackChannelIdSchema = z29.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
20279
|
+
var slackThreadTsSchema = z29.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
20280
|
+
var scoutSlackMessageReferenceSchema = z29.object({
|
|
20167
20281
|
channel_id: slackChannelIdSchema,
|
|
20168
20282
|
thread_ts: slackThreadTsSchema,
|
|
20169
|
-
message_ts:
|
|
20170
|
-
user_id:
|
|
20283
|
+
message_ts: z29.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
20284
|
+
user_id: z29.string().describe("Slack user id of that message's author (the envelope's `user_id`).")
|
|
20171
20285
|
});
|
|
20172
|
-
var scoutSlackSpawnRequestSchema =
|
|
20286
|
+
var scoutSlackSpawnRequestSchema = z29.object({
|
|
20173
20287
|
channel_id: slackChannelIdSchema,
|
|
20174
20288
|
thread_ts: slackThreadTsSchema,
|
|
20175
|
-
message_ts:
|
|
20176
|
-
user_id:
|
|
20177
|
-
prompt:
|
|
20178
|
-
acknowledgement_ts:
|
|
20179
|
-
environment_id:
|
|
20289
|
+
message_ts: z29.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."),
|
|
20290
|
+
user_id: z29.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
|
|
20291
|
+
prompt: z29.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."),
|
|
20292
|
+
acknowledgement_ts: z29.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."),
|
|
20293
|
+
environment_id: z29.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.`)
|
|
20180
20294
|
});
|
|
20181
20295
|
var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
|
|
20182
|
-
title:
|
|
20183
|
-
prompt:
|
|
20184
|
-
acknowledgement_ts:
|
|
20296
|
+
title: z29.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
|
|
20297
|
+
prompt: z29.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."),
|
|
20298
|
+
acknowledgement_ts: z29.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.")
|
|
20185
20299
|
});
|
|
20186
|
-
var scoutSlackRelayRequestSchema =
|
|
20300
|
+
var scoutSlackRelayRequestSchema = z29.object({
|
|
20187
20301
|
channel_id: slackChannelIdSchema,
|
|
20188
20302
|
thread_ts: slackThreadTsSchema,
|
|
20189
|
-
message:
|
|
20190
|
-
user_id:
|
|
20191
|
-
queue:
|
|
20192
|
-
workspace_id:
|
|
20193
|
-
message_ts:
|
|
20303
|
+
message: z29.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."),
|
|
20304
|
+
user_id: z29.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`."),
|
|
20305
|
+
queue: z29.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."),
|
|
20306
|
+
workspace_id: z29.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.`),
|
|
20307
|
+
message_ts: z29.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.")
|
|
20194
20308
|
});
|
|
20195
|
-
var scoutSlackSetThreadMutedRequestSchema =
|
|
20309
|
+
var scoutSlackSetThreadMutedRequestSchema = z29.object({
|
|
20196
20310
|
channel_id: slackChannelIdSchema,
|
|
20197
20311
|
thread_ts: slackThreadTsSchema,
|
|
20198
|
-
muted:
|
|
20312
|
+
muted: z29.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
|
|
20199
20313
|
});
|
|
20200
20314
|
var scoutSlackStopWorkspaceRequestSchema = scoutSlackMessageReferenceSchema.extend({
|
|
20201
|
-
archive:
|
|
20315
|
+
archive: z29.boolean().describe("true only when the person also asked to close or archive the workspace.")
|
|
20202
20316
|
});
|
|
20203
|
-
var scoutListWorkspacesRequestSchema =
|
|
20317
|
+
var scoutListWorkspacesRequestSchema = z29.object({
|
|
20204
20318
|
channel_id: slackChannelIdSchema,
|
|
20205
20319
|
thread_ts: slackThreadTsSchema,
|
|
20206
|
-
message_ts:
|
|
20207
|
-
user_id:
|
|
20208
|
-
query:
|
|
20320
|
+
message_ts: z29.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
20321
|
+
user_id: z29.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
|
|
20322
|
+
query: z29.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace and Mothership names and pull request URLs.")
|
|
20209
20323
|
});
|
|
20210
|
-
var scoutSlackConfirmationSchema =
|
|
20211
|
-
confirmation_channel_id:
|
|
20212
|
-
confirmation_thread_ts:
|
|
20213
|
-
confirmation_message_ts:
|
|
20214
|
-
confirmation_user_id:
|
|
20324
|
+
var scoutSlackConfirmationSchema = z29.object({
|
|
20325
|
+
confirmation_channel_id: z29.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
|
|
20326
|
+
confirmation_thread_ts: z29.string().describe("`thread_ts` from that message's envelope."),
|
|
20327
|
+
confirmation_message_ts: z29.string().describe("`message_ts` from that message's envelope."),
|
|
20328
|
+
confirmation_user_id: z29.string().describe("`user_id` from that message's envelope.")
|
|
20215
20329
|
});
|
|
20216
20330
|
var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
|
|
20217
20331
|
var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20218
|
-
preset_id:
|
|
20219
|
-
name:
|
|
20220
|
-
description:
|
|
20221
|
-
icon:
|
|
20222
|
-
instructions:
|
|
20332
|
+
preset_id: z29.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
|
|
20333
|
+
name: z29.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
|
|
20334
|
+
description: z29.string().optional().describe("One-line summary shown in settings."),
|
|
20335
|
+
icon: z29.enum(SCOUT_PRESET_ICONS).optional(),
|
|
20336
|
+
instructions: z29.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
|
|
20223
20337
|
});
|
|
20224
20338
|
var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20225
|
-
source:
|
|
20226
|
-
external_id:
|
|
20227
|
-
monitored:
|
|
20228
|
-
preset_id:
|
|
20229
|
-
instructions:
|
|
20230
|
-
proactivity:
|
|
20231
|
-
muted:
|
|
20339
|
+
source: z29.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
|
|
20340
|
+
external_id: z29.string().describe("Slack channel id or Linear team id."),
|
|
20341
|
+
monitored: z29.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."),
|
|
20342
|
+
preset_id: z29.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
20343
|
+
instructions: z29.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
|
|
20344
|
+
proactivity: z29.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."),
|
|
20345
|
+
muted: z29.enum(["on", "off", "default"]).optional().describe(`Slack only, organization admins only: \`on\` mutes Replicas in this channel, \`off\` unmutes it here, \`default\` follows the Slack Connect default from \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`. Omit to keep it.`)
|
|
20232
20346
|
});
|
|
20233
20347
|
var scoutSetSlackConnectMutedToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20234
|
-
muted:
|
|
20348
|
+
muted: z29.boolean().describe("`true` mutes Replicas in every Slack Connect channel without its own setting; `false` lets them follow their levels again.")
|
|
20235
20349
|
});
|
|
20236
20350
|
var scoutSetSlackConnectDefaultsToolInputSchema = scoutSetSlackConnectMutedToolInputSchema.partial({ muted: true }).extend({
|
|
20237
|
-
preset_id:
|
|
20238
|
-
instructions:
|
|
20239
|
-
proactivity:
|
|
20351
|
+
preset_id: z29.string().optional().describe("Preset for every Slack Connect channel without its own preset or instructions; an empty string removes it. Omit to keep it."),
|
|
20352
|
+
instructions: z29.string().optional().describe("Complete default instructions, applied after that preset; replaces the existing text. An empty string clears them. Omit to keep them."),
|
|
20353
|
+
proactivity: z29.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.")
|
|
20240
20354
|
});
|
|
20241
20355
|
var scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20242
|
-
proactivity:
|
|
20356
|
+
proactivity: z29.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.`)
|
|
20243
20357
|
});
|
|
20244
20358
|
var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20245
|
-
preset_id:
|
|
20359
|
+
preset_id: z29.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
|
|
20246
20360
|
});
|
|
20247
20361
|
var RESET_TO_DEFAULT = "default";
|
|
20248
|
-
var resettable = (schema, description) =>
|
|
20362
|
+
var resettable = (schema, description) => z29.union([schema, z29.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
|
|
20249
20363
|
var scoutSetSlackAgentDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20250
|
-
agent_provider: resettable(
|
|
20251
|
-
model: resettable(
|
|
20252
|
-
thinking_level: resettable(
|
|
20253
|
-
goal_mode: resettable(
|
|
20254
|
-
fast_mode: resettable(
|
|
20364
|
+
agent_provider: resettable(z29.enum(AGENT), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
|
|
20365
|
+
model: resettable(z29.string(), "Model id for that agent; the default is the agent's own."),
|
|
20366
|
+
thinking_level: resettable(z29.enum(VALID_THINKING_LEVELS), "Thinking level."),
|
|
20367
|
+
goal_mode: resettable(z29.boolean(), "Goal mode."),
|
|
20368
|
+
fast_mode: resettable(z29.boolean(), "Fast mode.")
|
|
20255
20369
|
});
|
|
20256
|
-
var scoutClaimSettingsOfferToolInputSchema =
|
|
20370
|
+
var scoutClaimSettingsOfferToolInputSchema = z29.object({
|
|
20257
20371
|
channel_id: slackChannelIdSchema,
|
|
20258
|
-
kind:
|
|
20259
|
-
user_id:
|
|
20260
|
-
declined:
|
|
20372
|
+
kind: z29.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."),
|
|
20373
|
+
user_id: z29.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."),
|
|
20374
|
+
declined: z29.boolean().optional().describe("true when the person declined an offer you already made, so it is not made again.")
|
|
20261
20375
|
});
|
|
20262
20376
|
|
|
20263
20377
|
// ../shared/src/routes/plugin-catalog.ts
|
|
@@ -20615,22 +20729,22 @@ var PLUGIN_CATALOG = [
|
|
|
20615
20729
|
].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
|
|
20616
20730
|
|
|
20617
20731
|
// ../shared/src/routes/sentry.ts
|
|
20618
|
-
import { z as
|
|
20619
|
-
var sentrySelfHostedConnectRequestSchema =
|
|
20620
|
-
baseUrl:
|
|
20621
|
-
token:
|
|
20622
|
-
webhookSecret:
|
|
20732
|
+
import { z as z30 } from "zod";
|
|
20733
|
+
var sentrySelfHostedConnectRequestSchema = z30.object({
|
|
20734
|
+
baseUrl: z30.string().min(1),
|
|
20735
|
+
token: z30.string().trim().min(1),
|
|
20736
|
+
webhookSecret: z30.string().trim().optional()
|
|
20623
20737
|
});
|
|
20624
20738
|
|
|
20625
20739
|
// ../shared/src/routes/user.ts
|
|
20626
20740
|
var PROFILE_AVATAR_MAX_SIZE_BYTES = 5 * 1024 * 1024;
|
|
20627
20741
|
|
|
20628
20742
|
// ../shared/src/routes/web-auth.ts
|
|
20629
|
-
import { z as
|
|
20630
|
-
var webAuthRedeemResponseSchema =
|
|
20631
|
-
path:
|
|
20632
|
-
organizationId:
|
|
20633
|
-
session:
|
|
20743
|
+
import { z as z31 } from "zod";
|
|
20744
|
+
var webAuthRedeemResponseSchema = z31.object({
|
|
20745
|
+
path: z31.string(),
|
|
20746
|
+
organizationId: z31.string().nullable(),
|
|
20747
|
+
session: z31.object({ access_token: z31.string(), refresh_token: z31.string(), user: z31.object({ id: z31.string(), email: z31.string() }) }).nullable()
|
|
20634
20748
|
});
|
|
20635
20749
|
|
|
20636
20750
|
// ../shared/src/routes/client-state.ts
|
|
@@ -20653,81 +20767,81 @@ var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_ST
|
|
|
20653
20767
|
var workspaceSearchOpensClientStateKey = orgUserClientStateKey(WORKSPACE_SEARCH_OPENS_CLIENT_STATE_KEY_PREFIX);
|
|
20654
20768
|
|
|
20655
20769
|
// ../shared/src/routes/workspace-events.ts
|
|
20656
|
-
import { z as
|
|
20657
|
-
var workspaceTurnCompletionSchema =
|
|
20658
|
-
workspaceName:
|
|
20659
|
-
completedAt:
|
|
20660
|
-
processing:
|
|
20661
|
-
pullRequestFeedback:
|
|
20662
|
-
attention:
|
|
20770
|
+
import { z as z32 } from "zod";
|
|
20771
|
+
var workspaceTurnCompletionSchema = z32.object({
|
|
20772
|
+
workspaceName: z32.string(),
|
|
20773
|
+
completedAt: z32.string(),
|
|
20774
|
+
processing: z32.boolean().optional(),
|
|
20775
|
+
pullRequestFeedback: z32.boolean().optional(),
|
|
20776
|
+
attention: z32.object({ reason: z32.enum(CHAT_ATTENTION_REASONS), userId: z32.string() }).optional()
|
|
20663
20777
|
});
|
|
20664
|
-
var workspaceChangedEventSchema =
|
|
20665
|
-
|
|
20666
|
-
type:
|
|
20667
|
-
workspaceId:
|
|
20668
|
-
workspace:
|
|
20778
|
+
var workspaceChangedEventSchema = z32.discriminatedUnion("type", [
|
|
20779
|
+
z32.object({
|
|
20780
|
+
type: z32.literal("workspace.changed"),
|
|
20781
|
+
workspaceId: z32.string(),
|
|
20782
|
+
workspace: z32.object({ status: z32.enum(WORKSPACE_STATUSES), last_activity_at: z32.string().nullable() }).optional(),
|
|
20669
20783
|
completion: workspaceTurnCompletionSchema.optional(),
|
|
20670
|
-
ts:
|
|
20784
|
+
ts: z32.string()
|
|
20671
20785
|
}),
|
|
20672
|
-
|
|
20673
|
-
type:
|
|
20674
|
-
workspaceId:
|
|
20675
|
-
chatId:
|
|
20676
|
-
ts:
|
|
20786
|
+
z32.object({
|
|
20787
|
+
type: z32.literal("workspace.chat.changed"),
|
|
20788
|
+
workspaceId: z32.string(),
|
|
20789
|
+
chatId: z32.string(),
|
|
20790
|
+
ts: z32.string()
|
|
20677
20791
|
}),
|
|
20678
|
-
|
|
20679
|
-
type:
|
|
20680
|
-
workspaceId:
|
|
20681
|
-
chatId:
|
|
20682
|
-
afterCursor:
|
|
20683
|
-
processing:
|
|
20684
|
-
ts:
|
|
20792
|
+
z32.object({
|
|
20793
|
+
type: z32.literal("workspace.chat.advanced"),
|
|
20794
|
+
workspaceId: z32.string(),
|
|
20795
|
+
chatId: z32.string(),
|
|
20796
|
+
afterCursor: z32.string().optional(),
|
|
20797
|
+
processing: z32.boolean(),
|
|
20798
|
+
ts: z32.string()
|
|
20685
20799
|
}),
|
|
20686
|
-
|
|
20687
|
-
|
|
20688
|
-
type:
|
|
20689
|
-
workspaceId:
|
|
20690
|
-
ts:
|
|
20800
|
+
z32.object({ type: z32.literal("presence.changed"), ts: z32.string() }),
|
|
20801
|
+
z32.object({
|
|
20802
|
+
type: z32.literal("mobile-testing.changed"),
|
|
20803
|
+
workspaceId: z32.string(),
|
|
20804
|
+
ts: z32.string()
|
|
20691
20805
|
}),
|
|
20692
|
-
|
|
20693
|
-
type:
|
|
20694
|
-
workspaceId:
|
|
20695
|
-
ts:
|
|
20806
|
+
z32.object({
|
|
20807
|
+
type: z32.literal("variable-request.changed"),
|
|
20808
|
+
workspaceId: z32.string(),
|
|
20809
|
+
ts: z32.string()
|
|
20696
20810
|
}),
|
|
20697
|
-
|
|
20698
|
-
type:
|
|
20699
|
-
prUrl:
|
|
20700
|
-
ts:
|
|
20811
|
+
z32.object({
|
|
20812
|
+
type: z32.literal("pull-request.changed"),
|
|
20813
|
+
prUrl: z32.string(),
|
|
20814
|
+
ts: z32.string()
|
|
20701
20815
|
}),
|
|
20702
|
-
|
|
20703
|
-
type:
|
|
20704
|
-
workspaceId:
|
|
20705
|
-
subagent:
|
|
20706
|
-
ts:
|
|
20816
|
+
z32.object({
|
|
20817
|
+
type: z32.literal("mothership.subagent.changed"),
|
|
20818
|
+
workspaceId: z32.string(),
|
|
20819
|
+
subagent: z32.object({ id: z32.string(), name: z32.string(), prUrl: z32.string().nullable() }),
|
|
20820
|
+
ts: z32.string()
|
|
20707
20821
|
}),
|
|
20708
|
-
|
|
20822
|
+
z32.object({ type: z32.literal("needs-you.changed"), workspaceId: z32.string().nullable(), ts: z32.string() })
|
|
20709
20823
|
]);
|
|
20710
20824
|
|
|
20711
20825
|
// ../shared/src/routes/presence.ts
|
|
20712
|
-
import { z as
|
|
20713
|
-
var presenceStatusSchema =
|
|
20714
|
-
var presenceLocationSchema =
|
|
20715
|
-
workspaceId:
|
|
20826
|
+
import { z as z33 } from "zod";
|
|
20827
|
+
var presenceStatusSchema = z33.enum(["online", "typing"]);
|
|
20828
|
+
var presenceLocationSchema = z33.object({
|
|
20829
|
+
workspaceId: z33.string().optional()
|
|
20716
20830
|
});
|
|
20717
|
-
var presenceEntrySchema =
|
|
20718
|
-
userId:
|
|
20831
|
+
var presenceEntrySchema = z33.object({
|
|
20832
|
+
userId: z33.string(),
|
|
20719
20833
|
status: presenceStatusSchema,
|
|
20720
20834
|
location: presenceLocationSchema,
|
|
20721
|
-
ts:
|
|
20835
|
+
ts: z33.string()
|
|
20722
20836
|
});
|
|
20723
|
-
var updatePresenceRequestSchema =
|
|
20837
|
+
var updatePresenceRequestSchema = z33.object({
|
|
20724
20838
|
status: presenceStatusSchema,
|
|
20725
20839
|
location: presenceLocationSchema.optional()
|
|
20726
20840
|
});
|
|
20727
20841
|
|
|
20728
20842
|
// ../shared/src/routes/review-messages.ts
|
|
20729
|
-
import { z as
|
|
20730
|
-
var sendPullRequestReviewMessageRequestSchema =
|
|
20843
|
+
import { z as z34 } from "zod";
|
|
20844
|
+
var sendPullRequestReviewMessageRequestSchema = z34.object({
|
|
20731
20845
|
...sendChatMessageRequestSchema.pick({
|
|
20732
20846
|
message: true,
|
|
20733
20847
|
messageId: true,
|
|
@@ -20740,8 +20854,8 @@ var sendPullRequestReviewMessageRequestSchema = z33.object({
|
|
|
20740
20854
|
ultrafastMode: true
|
|
20741
20855
|
}).shape,
|
|
20742
20856
|
/** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
|
|
20743
|
-
newChat:
|
|
20744
|
-
provider:
|
|
20857
|
+
newChat: z34.boolean().optional(),
|
|
20858
|
+
provider: z34.enum(VALID_AGENT_PROVIDERS).optional()
|
|
20745
20859
|
});
|
|
20746
20860
|
|
|
20747
20861
|
// ../shared/src/audit-log.ts
|
|
@@ -20962,145 +21076,32 @@ function isSkillRegistryManifest(value) {
|
|
|
20962
21076
|
}
|
|
20963
21077
|
|
|
20964
21078
|
// ../shared/src/routes/variable-requests.ts
|
|
20965
|
-
import { z as
|
|
21079
|
+
import { z as z35 } from "zod";
|
|
20966
21080
|
var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
|
|
20967
21081
|
var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
|
|
20968
|
-
var requestedVariableSchema =
|
|
20969
|
-
key:
|
|
20970
|
-
required:
|
|
20971
|
-
replace:
|
|
21082
|
+
var requestedVariableSchema = z35.object({
|
|
21083
|
+
key: z35.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
|
|
21084
|
+
required: z35.boolean(),
|
|
21085
|
+
replace: z35.boolean().optional()
|
|
20972
21086
|
});
|
|
20973
|
-
var requestedVariablesSchema =
|
|
20974
|
-
var createVariableRequestSchema =
|
|
21087
|
+
var requestedVariablesSchema = z35.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");
|
|
21088
|
+
var createVariableRequestSchema = z35.object({
|
|
20975
21089
|
variables: requestedVariablesSchema,
|
|
20976
|
-
reason:
|
|
20977
|
-
wait:
|
|
21090
|
+
reason: z35.string().trim().max(500).nullish().transform((value) => value || null),
|
|
21091
|
+
wait: z35.boolean().default(true)
|
|
20978
21092
|
});
|
|
20979
|
-
var respondVariableRequestSchema =
|
|
20980
|
-
|
|
20981
|
-
action:
|
|
20982
|
-
destination:
|
|
21093
|
+
var respondVariableRequestSchema = z35.discriminatedUnion("action", [
|
|
21094
|
+
z35.object({
|
|
21095
|
+
action: z35.literal("provide"),
|
|
21096
|
+
destination: z35.enum(VARIABLE_REQUEST_DESTINATIONS),
|
|
20983
21097
|
/** Defaults to the workspace's environment, so older clients keep saving there. */
|
|
20984
|
-
environment_ids:
|
|
20985
|
-
overwrite:
|
|
20986
|
-
values:
|
|
21098
|
+
environment_ids: z35.array(z35.string().uuid()).optional(),
|
|
21099
|
+
overwrite: z35.boolean().optional(),
|
|
21100
|
+
values: z35.record(z35.string().regex(VARIABLE_KEY_RE), z35.string())
|
|
20987
21101
|
}),
|
|
20988
|
-
|
|
21102
|
+
z35.object({ action: z35.literal("skip") })
|
|
20989
21103
|
]);
|
|
20990
21104
|
|
|
20991
|
-
// ../shared/src/mothership-board.ts
|
|
20992
|
-
import { z as z35 } from "zod";
|
|
20993
|
-
var MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger", "working"];
|
|
20994
|
-
var label = (max) => z35.string().trim().min(1).max(max);
|
|
20995
|
-
var tone = z35.enum(MOTHERSHIP_BOARD_TONES);
|
|
20996
|
-
var blockId = z35.string().regex(/^[\w.:-]{1,64}$/, "Use 1-64 letters, digits, _, -, . or :");
|
|
20997
|
-
var httpsUrl = z35.url({ protocol: /^https$/, error: "Must be an https URL" });
|
|
20998
|
-
var prUrl = httpsUrl.refine((url) => parseCodeHostPrUrl(url) !== null, "Must be a GitHub pull request or GitLab merge request URL");
|
|
20999
|
-
var linearIdentifier = z35.string().regex(/^[A-Za-z][A-Za-z0-9]{0,9}-\d{1,7}$/, "Use a Linear identifier such as REP-123");
|
|
21000
|
-
var action = z35.discriminatedUnion("type", [
|
|
21001
|
-
z35.object({ type: z35.literal("open_ship"), workspace_id: z35.uuid() }),
|
|
21002
|
-
z35.object({ type: z35.literal("message_ship"), workspace_id: z35.uuid(), message: label(4e3) }),
|
|
21003
|
-
z35.object({ type: z35.literal("open_pr"), url: prUrl }),
|
|
21004
|
-
z35.object({ type: z35.literal("merge_pr"), url: prUrl }),
|
|
21005
|
-
z35.object({ type: z35.literal("message_mothership"), message: label(4e3) }),
|
|
21006
|
-
z35.object({ type: z35.literal("open_link"), url: httpsUrl })
|
|
21007
|
-
]);
|
|
21008
|
-
var text3 = z35.object({ type: z35.literal("text"), id: blockId.optional(), text: label(2e3) });
|
|
21009
|
-
var badge = z35.object({ type: z35.literal("badge"), id: blockId.optional(), label: label(40), tone: tone.optional() });
|
|
21010
|
-
var pr = z35.object({ type: z35.literal("pr"), id: blockId.optional(), url: prUrl });
|
|
21011
|
-
var ship = z35.object({ type: z35.literal("ship"), id: blockId.optional(), workspace_id: z35.uuid() });
|
|
21012
|
-
var linear = z35.object({ type: z35.literal("linear"), id: blockId.optional(), identifier: linearIdentifier });
|
|
21013
|
-
var button = z35.object({ type: z35.literal("button"), id: blockId.optional(), label: label(60), action, variant: z35.enum(["primary", "outline", "warning", "destructive"]).optional(), resolves: blockId.optional() });
|
|
21014
|
-
var steps = z35.object({
|
|
21015
|
-
type: z35.literal("steps"),
|
|
21016
|
-
id: blockId.optional(),
|
|
21017
|
-
steps: z35.array(z35.object({ label: label(30), state: z35.enum(["done", "current", "pending", "failed"]) })).min(1).max(8)
|
|
21018
|
-
});
|
|
21019
|
-
var inline = z35.discriminatedUnion("type", [text3, badge, pr, ship, linear, button, steps]);
|
|
21020
|
-
var row = z35.object({ type: z35.literal("row"), id: blockId.optional(), cells: z35.array(z35.union([label(500), inline])).min(1).max(6) });
|
|
21021
|
-
var blockTypes = {
|
|
21022
|
-
text: text3,
|
|
21023
|
-
badge,
|
|
21024
|
-
pr,
|
|
21025
|
-
ship,
|
|
21026
|
-
linear,
|
|
21027
|
-
button,
|
|
21028
|
-
steps,
|
|
21029
|
-
stat: z35.object({ type: z35.literal("stat"), id: blockId.optional(), label: label(40), value: label(40), tone: tone.optional() }),
|
|
21030
|
-
divider: z35.object({ type: z35.literal("divider"), id: blockId.optional() }),
|
|
21031
|
-
updated_at: z35.object({ type: z35.literal("updated_at"), id: blockId.optional() }),
|
|
21032
|
-
choice: z35.object({
|
|
21033
|
-
type: z35.literal("choice"),
|
|
21034
|
-
id: blockId.optional(),
|
|
21035
|
-
question: label(500),
|
|
21036
|
-
options: z35.array(z35.object({ label: label(60), message: label(2e3).optional() })).min(2).max(6),
|
|
21037
|
-
resolves: blockId.optional()
|
|
21038
|
-
}),
|
|
21039
|
-
button_group: z35.object({ type: z35.literal("button_group"), id: blockId.optional(), children: z35.array(button).min(1).max(8) }),
|
|
21040
|
-
table: z35.object({ type: z35.literal("table"), id: blockId.optional(), columns: z35.array(label(40)).min(1).max(6), children: z35.array(row).max(100) }),
|
|
21041
|
-
callout: z35.object({
|
|
21042
|
-
type: z35.literal("callout"),
|
|
21043
|
-
id: blockId.optional(),
|
|
21044
|
-
tone,
|
|
21045
|
-
title: label(120).optional(),
|
|
21046
|
-
get children() {
|
|
21047
|
-
return z35.array(block).max(20).optional();
|
|
21048
|
-
}
|
|
21049
|
-
}),
|
|
21050
|
-
list: z35.object({
|
|
21051
|
-
type: z35.literal("list"),
|
|
21052
|
-
id: blockId.optional(),
|
|
21053
|
-
ordered: z35.boolean().optional(),
|
|
21054
|
-
get children() {
|
|
21055
|
-
return z35.array(block).max(100);
|
|
21056
|
-
}
|
|
21057
|
-
}),
|
|
21058
|
-
section: z35.object({
|
|
21059
|
-
type: z35.literal("section"),
|
|
21060
|
-
id: blockId.optional(),
|
|
21061
|
-
title: label(120),
|
|
21062
|
-
tone: tone.optional(),
|
|
21063
|
-
collapsed: z35.boolean().optional(),
|
|
21064
|
-
get children() {
|
|
21065
|
-
return z35.array(block).max(100);
|
|
21066
|
-
}
|
|
21067
|
-
})
|
|
21068
|
-
};
|
|
21069
|
-
var blockSchemas = [text3, ...Object.values(blockTypes).filter((schema) => schema !== text3)];
|
|
21070
|
-
var block = z35.discriminatedUnion("type", blockSchemas);
|
|
21071
|
-
var MOTHERSHIP_BOARD_CONTAINER_TYPES = Object.entries(blockTypes).filter(([, schema]) => "children" in schema.shape).map(([type]) => type);
|
|
21072
|
-
var mothershipBoardBlocksSchema = z35.array(block).max(100).superRefine((blocks, ctx) => {
|
|
21073
|
-
const seen = /* @__PURE__ */ new Set();
|
|
21074
|
-
const visit = (node, path) => {
|
|
21075
|
-
if (typeof node === "string") return;
|
|
21076
|
-
if (node.id) {
|
|
21077
|
-
if (seen.has(node.id)) ctx.addIssue({ code: "custom", path: [...path, "id"], message: `Duplicate block id "${node.id}"` });
|
|
21078
|
-
seen.add(node.id);
|
|
21079
|
-
}
|
|
21080
|
-
if (node.type === "table") {
|
|
21081
|
-
node.children.forEach((child, index) => {
|
|
21082
|
-
if (child.cells.length > node.columns.length) ctx.addIssue({ code: "custom", path: [...path, "children", index, "cells"], message: `Row has ${child.cells.length} cells but the table has ${node.columns.length} columns` });
|
|
21083
|
-
});
|
|
21084
|
-
}
|
|
21085
|
-
if (node.type === "row") node.cells.forEach((cell, index) => visit(cell, [...path, "cells", index]));
|
|
21086
|
-
else if ("children" in node) node.children?.forEach((child, index) => visit(child, [...path, "children", index]));
|
|
21087
|
-
};
|
|
21088
|
-
blocks.forEach((node, index) => visit(node, [index]));
|
|
21089
|
-
});
|
|
21090
|
-
var mothershipBoardOperationsSchema = z35.array(z35.discriminatedUnion("op", [
|
|
21091
|
-
z35.object({ op: z35.literal("replace"), blocks: z35.array(block) }),
|
|
21092
|
-
z35.object({
|
|
21093
|
-
op: z35.literal("upsert"),
|
|
21094
|
-
block: z35.discriminatedUnion("type", [row, ...blockSchemas]).refine((value) => Boolean(value.id), { message: "Give the block an id", path: ["id"] }),
|
|
21095
|
-
parent_id: blockId.optional(),
|
|
21096
|
-
position: z35.number().int().min(0).optional()
|
|
21097
|
-
}),
|
|
21098
|
-
z35.object({ op: z35.literal("remove"), id: blockId })
|
|
21099
|
-
])).min(1).max(50);
|
|
21100
|
-
var mothershipBoardItemRefSchema = z35.object({ mothershipId: z35.uuid(), block, occurrence: z35.number().int().min(0).optional() });
|
|
21101
|
-
var LINEAR_ISSUE_SUMMARIES_MAX = 50;
|
|
21102
|
-
var linearIssueSummariesRequestSchema = z35.object({ identifiers: z35.array(linearIdentifier).min(1).max(LINEAR_ISSUE_SUMMARIES_MAX) });
|
|
21103
|
-
|
|
21104
21105
|
export {
|
|
21105
21106
|
ENGINE_SEND_MESSAGE_FAILED_ERROR,
|
|
21106
21107
|
isRecord,
|
|
@@ -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-SDCMCINP.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DCWM3NR7.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/codex-agent-env.ts
|
|
12
12
|
function buildCodexAgentEnv(source = process.env) {
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4YBKVXKQ.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LYSRJIX4.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SDCMCINP.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-DCWM3NR7.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-XS5NNBTN.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-XS5NNBTN.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-DCWM3NR7.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-LYSRJIX4.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-DCWM3NR7.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -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-CZZKD7LV.js";
|
|
7
|
+
import "./chunk-4YBKVXKQ.js";
|
|
8
|
+
import "./chunk-SDCMCINP.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-DCWM3NR7.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-VFCFO3OG.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-LYSRJIX4.js";
|
|
22
|
+
import "./chunk-SDCMCINP.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-DCWM3NR7.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-CZZKD7LV.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-VFCFO3OG.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-BK2HBHRQ.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-NLVL2PPX.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-4YBKVXKQ.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-LYSRJIX4.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-SDCMCINP.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -433,7 +433,7 @@ import {
|
|
|
433
433
|
workspaceTokenRequestSchema,
|
|
434
434
|
workspaceTokenResponseSchema,
|
|
435
435
|
wrapInTag
|
|
436
|
-
} from "./chunk-
|
|
436
|
+
} from "./chunk-DCWM3NR7.js";
|
|
437
437
|
import {
|
|
438
438
|
cloneMcpConfig,
|
|
439
439
|
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-BK2HBHRQ.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-DCWM3NR7.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