replicas-engine 0.1.1426 → 0.1.1427
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-R5TXZLU4.js → asp-host-JBPDLVYE.js} +5 -5
- package/dist/src/{chunk-WO7DLKJO.js → chunk-5HHQUSV6.js} +1 -1
- package/dist/src/{chunk-AGADZY7X.js → chunk-6MUQYWOB.js} +268 -252
- package/dist/src/{chunk-FEYJDKNU.js → chunk-B2ATLNXY.js} +1 -1
- package/dist/src/{chunk-5T3TGWH4.js → chunk-ENW4Y4AT.js} +3 -3
- package/dist/src/{chunk-QJ5DP5BI.js → chunk-EUOFM2PA.js} +2 -2
- package/dist/src/{chunk-C5WXCDPR.js → chunk-G5Q2RQDE.js} +2 -2
- package/dist/src/{chunk-S3GFXX3C.js → chunk-IS2FTK43.js} +2 -2
- package/dist/src/{chunk-FDZBQL7G.js → chunk-MK4TMIVM.js} +6 -6
- 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-MK4TMIVM.js";
|
|
12
|
+
import "./chunk-EUOFM2PA.js";
|
|
13
|
+
import "./chunk-ENW4Y4AT.js";
|
|
14
|
+
import "./chunk-B2ATLNXY.js";
|
|
15
15
|
import "./chunk-UZSNFLDQ.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-6MUQYWOB.js";
|
|
17
17
|
import "./chunk-VEQXQN22.js";
|
|
18
18
|
export {
|
|
19
19
|
CODEX_ULTRAFAST_SERVICE_TIER,
|
|
@@ -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 z36 = 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
|
+
z36 = offsetZ;
|
|
1127
1127
|
this.dt = dt;
|
|
1128
1128
|
} else {
|
|
1129
|
-
|
|
1129
|
+
z36 = "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
|
+
z36 = dt.zone.name;
|
|
1140
1140
|
} else {
|
|
1141
|
-
|
|
1141
|
+
z36 = "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 || z36;
|
|
1151
1151
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
1152
1152
|
}
|
|
1153
1153
|
format() {
|
|
@@ -11742,7 +11742,7 @@ var reorderCredentialPoolSchema = z15.object({
|
|
|
11742
11742
|
});
|
|
11743
11743
|
|
|
11744
11744
|
// ../shared/src/mothership-events.ts
|
|
11745
|
-
import { z as
|
|
11745
|
+
import { z as z24 } from "zod";
|
|
11746
11746
|
|
|
11747
11747
|
// ../shared/src/design-tokens.ts
|
|
11748
11748
|
var plain = {
|
|
@@ -11876,6 +11876,7 @@ import { z as z16 } from "zod";
|
|
|
11876
11876
|
var linearSessionMetadataSchema = z16.object({
|
|
11877
11877
|
via_mothership: z16.boolean().optional(),
|
|
11878
11878
|
attached: z16.boolean().optional(),
|
|
11879
|
+
routing_chat_id: z16.string().optional(),
|
|
11879
11880
|
issue_id: z16.string(),
|
|
11880
11881
|
issue_identifier: z16.string(),
|
|
11881
11882
|
issue_title: z16.string(),
|
|
@@ -12002,6 +12003,7 @@ var REPLICAS_MCP_TOOLS = {
|
|
|
12002
12003
|
listWorkspaces: "list_workspaces",
|
|
12003
12004
|
linearStart: "start_linear_session",
|
|
12004
12005
|
linearSessionIntent: "register_linear_session_intent",
|
|
12006
|
+
routeLinearTicket: "route_linear_ticket",
|
|
12005
12007
|
listChannelSettings: "list_channel_settings",
|
|
12006
12008
|
saveChannelPreset: "save_channel_preset",
|
|
12007
12009
|
deleteChannelPreset: "delete_channel_preset",
|
|
@@ -12152,6 +12154,9 @@ When the envelope has \`offers\`, it lists the offers you may still make in this
|
|
|
12152
12154
|
When someone accepts an offer to automate a repeated request, set it up here instead of spawning. Infer the name, prompt, environment, repositories, schedule, and timezone from the conversation and the organization's configuration; ask one concise follow-up only for a missing detail that changes when or where it runs. Create it with \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling \`confirmation_*\` from the accepting message's envelope. The server checks that author is an organization member with automation write access; never create it if that fails. Post the result in the same thread.
|
|
12153
12155
|
`;
|
|
12154
12156
|
|
|
12157
|
+
// ../shared/src/routes/preferences.ts
|
|
12158
|
+
import { z as z23 } from "zod";
|
|
12159
|
+
|
|
12155
12160
|
// ../shared/src/routes/push.ts
|
|
12156
12161
|
import { z as z20 } from "zod";
|
|
12157
12162
|
|
|
@@ -14763,6 +14768,11 @@ var DEFAULT_DEFAULT_SKILLS = {
|
|
|
14763
14768
|
abilities: defaultReplicasAgentAbilities()
|
|
14764
14769
|
}
|
|
14765
14770
|
};
|
|
14771
|
+
var LINEAR_ROUTING_SKILL_MAX_LENGTH = 5e4;
|
|
14772
|
+
var linearRoutingSkillSchema = z23.union([
|
|
14773
|
+
z23.object({ name: z23.string().min(1), content: z23.string().trim().min(1).max(LINEAR_ROUTING_SKILL_MAX_LENGTH) }),
|
|
14774
|
+
z23.object({ name: z23.string().min(1), repository_id: z23.string().regex(UUID_RE), path: z23.string().min(1) })
|
|
14775
|
+
]);
|
|
14766
14776
|
|
|
14767
14777
|
// ../shared/src/prompts.ts
|
|
14768
14778
|
var REPLICAS_INSTRUCTIONS_TAG = "replicas_instructions";
|
|
@@ -14830,18 +14840,18 @@ var UNKNOWN_EVENT_KIND = "update";
|
|
|
14830
14840
|
var MOTHERSHIP_TURN_ERROR_SUMMARY = "Turn ended with an error.";
|
|
14831
14841
|
var MOTHERSHIP_EVENT_TYPE = "multitask-event";
|
|
14832
14842
|
var MOTHERSHIP_EVENT_MESSAGE_TYPE = "multitask_event";
|
|
14833
|
-
var mothershipEventSchema =
|
|
14834
|
-
id:
|
|
14835
|
-
at:
|
|
14836
|
-
kind:
|
|
14837
|
-
agentId:
|
|
14838
|
-
agentName:
|
|
14839
|
-
summary:
|
|
14840
|
-
detail:
|
|
14843
|
+
var mothershipEventSchema = z24.object({
|
|
14844
|
+
id: z24.string(),
|
|
14845
|
+
at: z24.string(),
|
|
14846
|
+
kind: z24.enum([...MOTHERSHIP_EVENT_KINDS, UNKNOWN_EVENT_KIND]),
|
|
14847
|
+
agentId: z24.string(),
|
|
14848
|
+
agentName: z24.string(),
|
|
14849
|
+
summary: z24.string(),
|
|
14850
|
+
detail: z24.string().optional(),
|
|
14841
14851
|
// Set when the subagent is a chat in this workspace rather than a ship; agentId is then that chat's id.
|
|
14842
|
-
chatId:
|
|
14852
|
+
chatId: z24.string().optional(),
|
|
14843
14853
|
// Set on events recorded before every kind woke the orchestrator, which were shown as a row when they happened.
|
|
14844
|
-
noticed:
|
|
14854
|
+
noticed: z24.boolean().optional()
|
|
14845
14855
|
});
|
|
14846
14856
|
var TAG = "multitask_event";
|
|
14847
14857
|
var BLOCK = new RegExp(`<${TAG}((?:\\s+\\w+="[^"]*")*)>\\n?([\\s\\S]*?)\\n?</${TAG}>`, "g");
|
|
@@ -15863,7 +15873,7 @@ function subagentChatId(message2) {
|
|
|
15863
15873
|
}
|
|
15864
15874
|
|
|
15865
15875
|
// ../shared/src/learned-skills.ts
|
|
15866
|
-
import { z as
|
|
15876
|
+
import { z as z25 } from "zod";
|
|
15867
15877
|
|
|
15868
15878
|
// ../shared/src/frontmatter.ts
|
|
15869
15879
|
import { parse as parseYaml } from "yaml";
|
|
@@ -15886,20 +15896,20 @@ function parseFrontmatter(content) {
|
|
|
15886
15896
|
var LEARNED_SKILLS_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/learned-skills`;
|
|
15887
15897
|
var LEARNED_SKILLS_MANIFEST_PATH = `${LEARNED_SKILLS_ROOT}/manifest.json`;
|
|
15888
15898
|
var LEARNED_SKILL_DIR_PREFIX = "replicas-learned__";
|
|
15889
|
-
var learnedSkillsManifestSchema =
|
|
15890
|
-
skills:
|
|
15899
|
+
var learnedSkillsManifestSchema = z25.object({
|
|
15900
|
+
skills: z25.array(z25.object({ name: z25.string(), sha256: z25.string() }))
|
|
15891
15901
|
});
|
|
15892
|
-
var dreamVerdictChecksSchema =
|
|
15893
|
-
repeatable:
|
|
15894
|
-
realInstruction:
|
|
15895
|
-
noContradiction:
|
|
15896
|
-
formatExact:
|
|
15897
|
-
humanOnly:
|
|
15898
|
-
actionable:
|
|
15899
|
-
durable:
|
|
15902
|
+
var dreamVerdictChecksSchema = z25.object({
|
|
15903
|
+
repeatable: z25.boolean(),
|
|
15904
|
+
realInstruction: z25.boolean(),
|
|
15905
|
+
noContradiction: z25.boolean(),
|
|
15906
|
+
formatExact: z25.boolean(),
|
|
15907
|
+
humanOnly: z25.boolean(),
|
|
15908
|
+
actionable: z25.boolean(),
|
|
15909
|
+
durable: z25.boolean()
|
|
15900
15910
|
});
|
|
15901
15911
|
var DREAM_VERDICT_CHECKS = dreamVerdictChecksSchema.keyof().options;
|
|
15902
|
-
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve:
|
|
15912
|
+
var dreamVerdictSchema = dreamVerdictChecksSchema.extend({ approve: z25.boolean(), reason: z25.string() });
|
|
15903
15913
|
var learnedSkillFormatInstruction = (speaker) => `Write a SKILL.md whose frontmatter has a kebab-case \`name\` and a short \`description\` that starts with "Use when" and names the situations it applies to; the body records only what ${speaker} actually said, restated as a direct instruction, usually one to three lines. Every line of a learning is loaded into future sessions, so leave out anything an agent could infer on its own: no headings, explanations, rules, or examples unless ${speaker} stated those specifics themselves. For "from now on, use Conventional Commits", the body is just "Use Conventional Commits for every commit message and PR title."`;
|
|
15904
15914
|
|
|
15905
15915
|
// ../shared/src/user-message-matching.ts
|
|
@@ -19568,10 +19578,10 @@ function hasChatStarted(chat) {
|
|
|
19568
19578
|
}
|
|
19569
19579
|
|
|
19570
19580
|
// ../shared/src/routes/billing.ts
|
|
19571
|
-
import { z as
|
|
19581
|
+
import { z as z26 } from "zod";
|
|
19572
19582
|
var SOURCE_LIMIT_SOURCES = ["limrun", "modal"];
|
|
19573
|
-
var usageLimitCentsSchema =
|
|
19574
|
-
var sourceLimitsCentsSchema =
|
|
19583
|
+
var usageLimitCentsSchema = z26.number().int().min(100).max(1e8);
|
|
19584
|
+
var sourceLimitsCentsSchema = z26.partialRecord(z26.enum(SOURCE_LIMIT_SOURCES), usageLimitCentsSchema);
|
|
19575
19585
|
|
|
19576
19586
|
// ../shared/src/routes/codex.ts
|
|
19577
19587
|
var CODEX_AUTH_ENV_KEYS = [
|
|
@@ -19725,7 +19735,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
19725
19735
|
};
|
|
19726
19736
|
|
|
19727
19737
|
// ../shared/src/routes/command-protection.ts
|
|
19728
|
-
import { z as
|
|
19738
|
+
import { z as z27 } from "zod";
|
|
19729
19739
|
|
|
19730
19740
|
// ../shared/src/git-invocations.ts
|
|
19731
19741
|
var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
|
|
@@ -19816,27 +19826,27 @@ function findCheckoutTarget(args) {
|
|
|
19816
19826
|
}
|
|
19817
19827
|
|
|
19818
19828
|
// ../shared/src/routes/command-protection.ts
|
|
19819
|
-
var commandProtectionRepoStateSchema =
|
|
19820
|
-
branch:
|
|
19821
|
-
defaultBranch:
|
|
19822
|
-
pushBranch:
|
|
19823
|
-
pushConfig:
|
|
19824
|
-
headMessage:
|
|
19825
|
-
mergeInProgress:
|
|
19829
|
+
var commandProtectionRepoStateSchema = z27.object({
|
|
19830
|
+
branch: z27.string().nullable(),
|
|
19831
|
+
defaultBranch: z27.string().nullable(),
|
|
19832
|
+
pushBranch: z27.string().nullable(),
|
|
19833
|
+
pushConfig: z27.string().nullable(),
|
|
19834
|
+
headMessage: z27.string().nullable(),
|
|
19835
|
+
mergeInProgress: z27.boolean().optional()
|
|
19826
19836
|
});
|
|
19827
|
-
var commandProtectionEvaluateRequestSchema =
|
|
19828
|
-
provider:
|
|
19829
|
-
source:
|
|
19830
|
-
toolName:
|
|
19831
|
-
toolInput:
|
|
19832
|
-
command:
|
|
19833
|
-
cwd:
|
|
19834
|
-
toolUseId:
|
|
19837
|
+
var commandProtectionEvaluateRequestSchema = z27.object({
|
|
19838
|
+
provider: z27.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
19839
|
+
source: z27.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
19840
|
+
toolName: z27.string(),
|
|
19841
|
+
toolInput: z27.unknown(),
|
|
19842
|
+
command: z27.string().nullish(),
|
|
19843
|
+
cwd: z27.string().nullish(),
|
|
19844
|
+
toolUseId: z27.string().nullish(),
|
|
19835
19845
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
19836
19846
|
// policy can see branches and commit messages the command text only references.
|
|
19837
|
-
gitContext:
|
|
19838
|
-
repos:
|
|
19839
|
-
messageFiles:
|
|
19847
|
+
gitContext: z27.object({
|
|
19848
|
+
repos: z27.record(z27.string(), commandProtectionRepoStateSchema),
|
|
19849
|
+
messageFiles: z27.record(z27.string(), z27.string())
|
|
19840
19850
|
}).optional()
|
|
19841
19851
|
});
|
|
19842
19852
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -20056,105 +20066,110 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
20056
20066
|
}
|
|
20057
20067
|
|
|
20058
20068
|
// ../shared/src/routes/scout.ts
|
|
20059
|
-
import { z as
|
|
20069
|
+
import { z as z28 } from "zod";
|
|
20060
20070
|
var SCOUT_LINEAR_ACTIONS = ["ask", "start"];
|
|
20061
|
-
var scoutLinearSessionIntentRequestSchema =
|
|
20062
|
-
comment_id:
|
|
20063
|
-
action:
|
|
20071
|
+
var scoutLinearSessionIntentRequestSchema = z28.object({
|
|
20072
|
+
comment_id: z28.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
20073
|
+
action: z28.enum(SCOUT_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it hands off the task.")
|
|
20064
20074
|
});
|
|
20065
|
-
var scoutLinearStartRequestSchema =
|
|
20066
|
-
issue_id:
|
|
20067
|
-
agent_session_id:
|
|
20068
|
-
prompt:
|
|
20075
|
+
var scoutLinearStartRequestSchema = z28.object({
|
|
20076
|
+
issue_id: z28.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
20077
|
+
agent_session_id: z28.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
20078
|
+
prompt: z28.string().trim().min(1).describe("The latest request, in its author's words. The workspace already receives the issue and its comments.")
|
|
20069
20079
|
});
|
|
20070
|
-
var
|
|
20071
|
-
|
|
20072
|
-
|
|
20080
|
+
var scoutRouteLinearTicketRequestSchema = z28.object({
|
|
20081
|
+
agent_session_id: z28.string().trim().min(1).describe("The ticket's `agent_session_id` from the envelope."),
|
|
20082
|
+
environment_id: z28.string().trim().min(1).optional().describe("Start the ticket in this environment."),
|
|
20083
|
+
mothership_id: z28.string().trim().min(1).optional().describe("Hand the ticket to this Mothership instead.")
|
|
20084
|
+
}).refine((args) => !(args.environment_id && args.mothership_id), "Pass environment_id or mothership_id, not both.");
|
|
20085
|
+
var slackChannelIdSchema = z28.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
20086
|
+
var slackThreadTsSchema = z28.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
20087
|
+
var scoutSlackSpawnRequestSchema = z28.object({
|
|
20073
20088
|
channel_id: slackChannelIdSchema,
|
|
20074
20089
|
thread_ts: slackThreadTsSchema,
|
|
20075
|
-
message_ts:
|
|
20076
|
-
user_id:
|
|
20077
|
-
prompt:
|
|
20078
|
-
acknowledgement_ts:
|
|
20079
|
-
environment_id:
|
|
20090
|
+
message_ts: z28.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."),
|
|
20091
|
+
user_id: z28.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
|
|
20092
|
+
prompt: z28.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."),
|
|
20093
|
+
acknowledgement_ts: z28.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."),
|
|
20094
|
+
environment_id: z28.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.`)
|
|
20080
20095
|
});
|
|
20081
20096
|
var scoutSlackSpawnInNewThreadRequestSchema = scoutSlackSpawnRequestSchema.extend({
|
|
20082
|
-
title:
|
|
20083
|
-
prompt:
|
|
20084
|
-
acknowledgement_ts:
|
|
20097
|
+
title: z28.string().trim().min(1).max(500).describe("One or two sentences stating the task, posted as the new top-level message."),
|
|
20098
|
+
prompt: z28.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."),
|
|
20099
|
+
acknowledgement_ts: z28.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.")
|
|
20085
20100
|
});
|
|
20086
|
-
var scoutSlackRelayRequestSchema =
|
|
20101
|
+
var scoutSlackRelayRequestSchema = z28.object({
|
|
20087
20102
|
channel_id: slackChannelIdSchema,
|
|
20088
20103
|
thread_ts: slackThreadTsSchema,
|
|
20089
|
-
message:
|
|
20090
|
-
user_id:
|
|
20091
|
-
queue:
|
|
20092
|
-
workspace_id:
|
|
20093
|
-
message_ts:
|
|
20104
|
+
message: z28.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."),
|
|
20105
|
+
user_id: z28.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`."),
|
|
20106
|
+
queue: z28.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."),
|
|
20107
|
+
workspace_id: z28.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.`),
|
|
20108
|
+
message_ts: z28.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.")
|
|
20094
20109
|
});
|
|
20095
|
-
var scoutSlackSetThreadMutedRequestSchema =
|
|
20110
|
+
var scoutSlackSetThreadMutedRequestSchema = z28.object({
|
|
20096
20111
|
channel_id: slackChannelIdSchema,
|
|
20097
20112
|
thread_ts: slackThreadTsSchema,
|
|
20098
|
-
muted:
|
|
20113
|
+
muted: z28.boolean().describe("true to mute Replicas in this thread, false to unmute it.")
|
|
20099
20114
|
});
|
|
20100
|
-
var scoutListWorkspacesRequestSchema =
|
|
20115
|
+
var scoutListWorkspacesRequestSchema = z28.object({
|
|
20101
20116
|
channel_id: slackChannelIdSchema,
|
|
20102
20117
|
thread_ts: slackThreadTsSchema,
|
|
20103
|
-
message_ts:
|
|
20104
|
-
user_id:
|
|
20105
|
-
query:
|
|
20118
|
+
message_ts: z28.string().describe("The envelope's `message_ts`. The server verifies this message and its author."),
|
|
20119
|
+
user_id: z28.string().describe("Slack user id of that message's author (the envelope's `user_id`). Only workspaces they can see are listed."),
|
|
20120
|
+
query: z28.string().trim().min(1).optional().describe("Case-insensitive text to match against workspace and Mothership names and pull request URLs.")
|
|
20106
20121
|
});
|
|
20107
|
-
var scoutSlackConfirmationSchema =
|
|
20108
|
-
confirmation_channel_id:
|
|
20109
|
-
confirmation_thread_ts:
|
|
20110
|
-
confirmation_message_ts:
|
|
20111
|
-
confirmation_user_id:
|
|
20122
|
+
var scoutSlackConfirmationSchema = z28.object({
|
|
20123
|
+
confirmation_channel_id: z28.string().describe("`channel_id` from the envelope of the Slack message that asked for or accepted this."),
|
|
20124
|
+
confirmation_thread_ts: z28.string().describe("`thread_ts` from that message's envelope."),
|
|
20125
|
+
confirmation_message_ts: z28.string().describe("`message_ts` from that message's envelope."),
|
|
20126
|
+
confirmation_user_id: z28.string().describe("`user_id` from that message's envelope.")
|
|
20112
20127
|
});
|
|
20113
20128
|
var scoutAutomationToolInputSchema = automationToolInputSchema.extend(scoutSlackConfirmationSchema.shape);
|
|
20114
20129
|
var scoutSaveChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20115
|
-
preset_id:
|
|
20116
|
-
name:
|
|
20117
|
-
description:
|
|
20118
|
-
icon:
|
|
20119
|
-
instructions:
|
|
20130
|
+
preset_id: z28.string().optional().describe(`Id of the preset to update, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Omit to create a new preset.`),
|
|
20131
|
+
name: z28.string().trim().min(1).max(SCOUT_PRESET_NAME_MAX_LENGTH).optional().describe("Preset name. Required when creating."),
|
|
20132
|
+
description: z28.string().optional().describe("One-line summary shown in settings."),
|
|
20133
|
+
icon: z28.enum(SCOUT_PRESET_ICONS).optional(),
|
|
20134
|
+
instructions: z28.string().optional().describe("Complete preset instructions; replaces the existing text. Required when creating.")
|
|
20120
20135
|
});
|
|
20121
20136
|
var scoutUpdateChannelSettingsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20122
|
-
source:
|
|
20123
|
-
external_id:
|
|
20124
|
-
monitored:
|
|
20125
|
-
preset_id:
|
|
20126
|
-
instructions:
|
|
20127
|
-
proactivity:
|
|
20128
|
-
muted:
|
|
20137
|
+
source: z28.enum(SCOUT_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
|
|
20138
|
+
external_id: z28.string().describe("Slack channel id or Linear team id."),
|
|
20139
|
+
monitored: z28.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."),
|
|
20140
|
+
preset_id: z28.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
|
|
20141
|
+
instructions: z28.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them."),
|
|
20142
|
+
proactivity: z28.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."),
|
|
20143
|
+
muted: z28.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.`)
|
|
20129
20144
|
});
|
|
20130
20145
|
var scoutSetSlackConnectMutedToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20131
|
-
muted:
|
|
20146
|
+
muted: z28.boolean().describe("`true` mutes Replicas in every Slack Connect channel without its own setting; `false` lets them follow their levels again.")
|
|
20132
20147
|
});
|
|
20133
20148
|
var scoutSetSlackConnectDefaultsToolInputSchema = scoutSetSlackConnectMutedToolInputSchema.partial({ muted: true }).extend({
|
|
20134
|
-
preset_id:
|
|
20135
|
-
instructions:
|
|
20136
|
-
proactivity:
|
|
20149
|
+
preset_id: z28.string().optional().describe("Preset for every Slack Connect channel without its own preset or instructions; an empty string removes it. Omit to keep it."),
|
|
20150
|
+
instructions: z28.string().optional().describe("Complete default instructions, applied after that preset; replaces the existing text. An empty string clears them. Omit to keep them."),
|
|
20151
|
+
proactivity: z28.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.")
|
|
20137
20152
|
});
|
|
20138
20153
|
var scoutSetOrganizationProactivityToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20139
|
-
proactivity:
|
|
20154
|
+
proactivity: z28.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.`)
|
|
20140
20155
|
});
|
|
20141
20156
|
var scoutDeleteChannelPresetToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20142
|
-
preset_id:
|
|
20157
|
+
preset_id: z28.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
|
|
20143
20158
|
});
|
|
20144
20159
|
var RESET_TO_DEFAULT = "default";
|
|
20145
|
-
var resettable = (schema, description) =>
|
|
20160
|
+
var resettable = (schema, description) => z28.union([schema, z28.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
|
|
20146
20161
|
var scoutSetSlackAgentDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
|
|
20147
|
-
agent_provider: resettable(
|
|
20148
|
-
model: resettable(
|
|
20149
|
-
thinking_level: resettable(
|
|
20150
|
-
goal_mode: resettable(
|
|
20151
|
-
fast_mode: resettable(
|
|
20162
|
+
agent_provider: resettable(z28.enum(AGENT), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
|
|
20163
|
+
model: resettable(z28.string(), "Model id for that agent; the default is the agent's own."),
|
|
20164
|
+
thinking_level: resettable(z28.enum(VALID_THINKING_LEVELS), "Thinking level."),
|
|
20165
|
+
goal_mode: resettable(z28.boolean(), "Goal mode."),
|
|
20166
|
+
fast_mode: resettable(z28.boolean(), "Fast mode.")
|
|
20152
20167
|
});
|
|
20153
|
-
var scoutClaimSettingsOfferToolInputSchema =
|
|
20168
|
+
var scoutClaimSettingsOfferToolInputSchema = z28.object({
|
|
20154
20169
|
channel_id: slackChannelIdSchema,
|
|
20155
|
-
kind:
|
|
20156
|
-
user_id:
|
|
20157
|
-
declined:
|
|
20170
|
+
kind: z28.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."),
|
|
20171
|
+
user_id: z28.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."),
|
|
20172
|
+
declined: z28.boolean().optional().describe("true when the person declined an offer you already made, so it is not made again.")
|
|
20158
20173
|
});
|
|
20159
20174
|
|
|
20160
20175
|
// ../shared/src/routes/plugin-catalog.ts
|
|
@@ -20512,22 +20527,22 @@ var PLUGIN_CATALOG = [
|
|
|
20512
20527
|
].map((plugin) => ({ ...plugin, readOnlyScopes: READ_ONLY_SCOPES[plugin.id] }));
|
|
20513
20528
|
|
|
20514
20529
|
// ../shared/src/routes/sentry.ts
|
|
20515
|
-
import { z as
|
|
20516
|
-
var sentrySelfHostedConnectRequestSchema =
|
|
20517
|
-
baseUrl:
|
|
20518
|
-
token:
|
|
20519
|
-
webhookSecret:
|
|
20530
|
+
import { z as z29 } from "zod";
|
|
20531
|
+
var sentrySelfHostedConnectRequestSchema = z29.object({
|
|
20532
|
+
baseUrl: z29.string().min(1),
|
|
20533
|
+
token: z29.string().trim().min(1),
|
|
20534
|
+
webhookSecret: z29.string().trim().optional()
|
|
20520
20535
|
});
|
|
20521
20536
|
|
|
20522
20537
|
// ../shared/src/routes/user.ts
|
|
20523
20538
|
var PROFILE_AVATAR_MAX_SIZE_BYTES = 5 * 1024 * 1024;
|
|
20524
20539
|
|
|
20525
20540
|
// ../shared/src/routes/web-auth.ts
|
|
20526
|
-
import { z as
|
|
20527
|
-
var webAuthRedeemResponseSchema =
|
|
20528
|
-
path:
|
|
20529
|
-
organizationId:
|
|
20530
|
-
session:
|
|
20541
|
+
import { z as z30 } from "zod";
|
|
20542
|
+
var webAuthRedeemResponseSchema = z30.object({
|
|
20543
|
+
path: z30.string(),
|
|
20544
|
+
organizationId: z30.string().nullable(),
|
|
20545
|
+
session: z30.object({ access_token: z30.string(), refresh_token: z30.string(), user: z30.object({ id: z30.string(), email: z30.string() }) }).nullable()
|
|
20531
20546
|
});
|
|
20532
20547
|
|
|
20533
20548
|
// ../shared/src/routes/client-state.ts
|
|
@@ -20550,81 +20565,81 @@ var promptHistoryClientStateKey = orgUserClientStateKey(PROMPT_HISTORY_CLIENT_ST
|
|
|
20550
20565
|
var workspaceSearchOpensClientStateKey = orgUserClientStateKey(WORKSPACE_SEARCH_OPENS_CLIENT_STATE_KEY_PREFIX);
|
|
20551
20566
|
|
|
20552
20567
|
// ../shared/src/routes/workspace-events.ts
|
|
20553
|
-
import { z as
|
|
20554
|
-
var workspaceTurnCompletionSchema =
|
|
20555
|
-
workspaceName:
|
|
20556
|
-
completedAt:
|
|
20557
|
-
processing:
|
|
20558
|
-
pullRequestFeedback:
|
|
20559
|
-
attention:
|
|
20568
|
+
import { z as z31 } from "zod";
|
|
20569
|
+
var workspaceTurnCompletionSchema = z31.object({
|
|
20570
|
+
workspaceName: z31.string(),
|
|
20571
|
+
completedAt: z31.string(),
|
|
20572
|
+
processing: z31.boolean().optional(),
|
|
20573
|
+
pullRequestFeedback: z31.boolean().optional(),
|
|
20574
|
+
attention: z31.object({ reason: z31.enum(CHAT_ATTENTION_REASONS), userId: z31.string() }).optional()
|
|
20560
20575
|
});
|
|
20561
|
-
var workspaceChangedEventSchema =
|
|
20562
|
-
|
|
20563
|
-
type:
|
|
20564
|
-
workspaceId:
|
|
20565
|
-
workspace:
|
|
20576
|
+
var workspaceChangedEventSchema = z31.discriminatedUnion("type", [
|
|
20577
|
+
z31.object({
|
|
20578
|
+
type: z31.literal("workspace.changed"),
|
|
20579
|
+
workspaceId: z31.string(),
|
|
20580
|
+
workspace: z31.object({ status: z31.enum(WORKSPACE_STATUSES), last_activity_at: z31.string().nullable() }).optional(),
|
|
20566
20581
|
completion: workspaceTurnCompletionSchema.optional(),
|
|
20567
|
-
ts:
|
|
20582
|
+
ts: z31.string()
|
|
20568
20583
|
}),
|
|
20569
|
-
|
|
20570
|
-
type:
|
|
20571
|
-
workspaceId:
|
|
20572
|
-
chatId:
|
|
20573
|
-
ts:
|
|
20584
|
+
z31.object({
|
|
20585
|
+
type: z31.literal("workspace.chat.changed"),
|
|
20586
|
+
workspaceId: z31.string(),
|
|
20587
|
+
chatId: z31.string(),
|
|
20588
|
+
ts: z31.string()
|
|
20574
20589
|
}),
|
|
20575
|
-
|
|
20576
|
-
type:
|
|
20577
|
-
workspaceId:
|
|
20578
|
-
chatId:
|
|
20579
|
-
afterCursor:
|
|
20580
|
-
processing:
|
|
20581
|
-
ts:
|
|
20590
|
+
z31.object({
|
|
20591
|
+
type: z31.literal("workspace.chat.advanced"),
|
|
20592
|
+
workspaceId: z31.string(),
|
|
20593
|
+
chatId: z31.string(),
|
|
20594
|
+
afterCursor: z31.string().optional(),
|
|
20595
|
+
processing: z31.boolean(),
|
|
20596
|
+
ts: z31.string()
|
|
20582
20597
|
}),
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
type:
|
|
20586
|
-
workspaceId:
|
|
20587
|
-
ts:
|
|
20598
|
+
z31.object({ type: z31.literal("presence.changed"), ts: z31.string() }),
|
|
20599
|
+
z31.object({
|
|
20600
|
+
type: z31.literal("mobile-testing.changed"),
|
|
20601
|
+
workspaceId: z31.string(),
|
|
20602
|
+
ts: z31.string()
|
|
20588
20603
|
}),
|
|
20589
|
-
|
|
20590
|
-
type:
|
|
20591
|
-
workspaceId:
|
|
20592
|
-
ts:
|
|
20604
|
+
z31.object({
|
|
20605
|
+
type: z31.literal("variable-request.changed"),
|
|
20606
|
+
workspaceId: z31.string(),
|
|
20607
|
+
ts: z31.string()
|
|
20593
20608
|
}),
|
|
20594
|
-
|
|
20595
|
-
type:
|
|
20596
|
-
prUrl:
|
|
20597
|
-
ts:
|
|
20609
|
+
z31.object({
|
|
20610
|
+
type: z31.literal("pull-request.changed"),
|
|
20611
|
+
prUrl: z31.string(),
|
|
20612
|
+
ts: z31.string()
|
|
20598
20613
|
}),
|
|
20599
|
-
|
|
20600
|
-
type:
|
|
20601
|
-
workspaceId:
|
|
20602
|
-
subagent:
|
|
20603
|
-
ts:
|
|
20614
|
+
z31.object({
|
|
20615
|
+
type: z31.literal("mothership.subagent.changed"),
|
|
20616
|
+
workspaceId: z31.string(),
|
|
20617
|
+
subagent: z31.object({ id: z31.string(), name: z31.string(), prUrl: z31.string().nullable() }),
|
|
20618
|
+
ts: z31.string()
|
|
20604
20619
|
}),
|
|
20605
|
-
|
|
20620
|
+
z31.object({ type: z31.literal("needs-you.changed"), workspaceId: z31.string().nullable(), ts: z31.string() })
|
|
20606
20621
|
]);
|
|
20607
20622
|
|
|
20608
20623
|
// ../shared/src/routes/presence.ts
|
|
20609
|
-
import { z as
|
|
20610
|
-
var presenceStatusSchema =
|
|
20611
|
-
var presenceLocationSchema =
|
|
20612
|
-
workspaceId:
|
|
20624
|
+
import { z as z32 } from "zod";
|
|
20625
|
+
var presenceStatusSchema = z32.enum(["online", "typing"]);
|
|
20626
|
+
var presenceLocationSchema = z32.object({
|
|
20627
|
+
workspaceId: z32.string().optional()
|
|
20613
20628
|
});
|
|
20614
|
-
var presenceEntrySchema =
|
|
20615
|
-
userId:
|
|
20629
|
+
var presenceEntrySchema = z32.object({
|
|
20630
|
+
userId: z32.string(),
|
|
20616
20631
|
status: presenceStatusSchema,
|
|
20617
20632
|
location: presenceLocationSchema,
|
|
20618
|
-
ts:
|
|
20633
|
+
ts: z32.string()
|
|
20619
20634
|
});
|
|
20620
|
-
var updatePresenceRequestSchema =
|
|
20635
|
+
var updatePresenceRequestSchema = z32.object({
|
|
20621
20636
|
status: presenceStatusSchema,
|
|
20622
20637
|
location: presenceLocationSchema.optional()
|
|
20623
20638
|
});
|
|
20624
20639
|
|
|
20625
20640
|
// ../shared/src/routes/review-messages.ts
|
|
20626
|
-
import { z as
|
|
20627
|
-
var sendPullRequestReviewMessageRequestSchema =
|
|
20641
|
+
import { z as z33 } from "zod";
|
|
20642
|
+
var sendPullRequestReviewMessageRequestSchema = z33.object({
|
|
20628
20643
|
...sendChatMessageRequestSchema.pick({
|
|
20629
20644
|
message: true,
|
|
20630
20645
|
messageId: true,
|
|
@@ -20637,8 +20652,8 @@ var sendPullRequestReviewMessageRequestSchema = z32.object({
|
|
|
20637
20652
|
ultrafastMode: true
|
|
20638
20653
|
}).shape,
|
|
20639
20654
|
/** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
|
|
20640
|
-
newChat:
|
|
20641
|
-
provider:
|
|
20655
|
+
newChat: z33.boolean().optional(),
|
|
20656
|
+
provider: z33.enum(VALID_AGENT_PROVIDERS).optional()
|
|
20642
20657
|
});
|
|
20643
20658
|
|
|
20644
20659
|
// ../shared/src/audit-log.ts
|
|
@@ -20859,62 +20874,62 @@ function isSkillRegistryManifest(value) {
|
|
|
20859
20874
|
}
|
|
20860
20875
|
|
|
20861
20876
|
// ../shared/src/routes/variable-requests.ts
|
|
20862
|
-
import { z as
|
|
20877
|
+
import { z as z34 } from "zod";
|
|
20863
20878
|
var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
|
|
20864
20879
|
var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
|
|
20865
|
-
var requestedVariableSchema =
|
|
20866
|
-
key:
|
|
20867
|
-
required:
|
|
20868
|
-
replace:
|
|
20880
|
+
var requestedVariableSchema = z34.object({
|
|
20881
|
+
key: z34.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
|
|
20882
|
+
required: z34.boolean(),
|
|
20883
|
+
replace: z34.boolean().optional()
|
|
20869
20884
|
});
|
|
20870
|
-
var requestedVariablesSchema =
|
|
20871
|
-
var createVariableRequestSchema =
|
|
20885
|
+
var requestedVariablesSchema = z34.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");
|
|
20886
|
+
var createVariableRequestSchema = z34.object({
|
|
20872
20887
|
variables: requestedVariablesSchema,
|
|
20873
|
-
reason:
|
|
20874
|
-
wait:
|
|
20888
|
+
reason: z34.string().trim().max(500).nullish().transform((value) => value || null),
|
|
20889
|
+
wait: z34.boolean().default(true)
|
|
20875
20890
|
});
|
|
20876
|
-
var respondVariableRequestSchema =
|
|
20877
|
-
|
|
20878
|
-
action:
|
|
20879
|
-
destination:
|
|
20891
|
+
var respondVariableRequestSchema = z34.discriminatedUnion("action", [
|
|
20892
|
+
z34.object({
|
|
20893
|
+
action: z34.literal("provide"),
|
|
20894
|
+
destination: z34.enum(VARIABLE_REQUEST_DESTINATIONS),
|
|
20880
20895
|
/** Defaults to the workspace's environment, so older clients keep saving there. */
|
|
20881
|
-
environment_ids:
|
|
20882
|
-
overwrite:
|
|
20883
|
-
values:
|
|
20896
|
+
environment_ids: z34.array(z34.string().uuid()).optional(),
|
|
20897
|
+
overwrite: z34.boolean().optional(),
|
|
20898
|
+
values: z34.record(z34.string().regex(VARIABLE_KEY_RE), z34.string())
|
|
20884
20899
|
}),
|
|
20885
|
-
|
|
20900
|
+
z34.object({ action: z34.literal("skip") })
|
|
20886
20901
|
]);
|
|
20887
20902
|
|
|
20888
20903
|
// ../shared/src/mothership-board.ts
|
|
20889
|
-
import { z as
|
|
20904
|
+
import { z as z35 } from "zod";
|
|
20890
20905
|
var MOTHERSHIP_BOARD_TONES = ["neutral", "needs_you", "warning", "success", "danger"];
|
|
20891
|
-
var label = (max) =>
|
|
20892
|
-
var tone =
|
|
20893
|
-
var blockId =
|
|
20894
|
-
var httpsUrl =
|
|
20906
|
+
var label = (max) => z35.string().trim().min(1).max(max);
|
|
20907
|
+
var tone = z35.enum(MOTHERSHIP_BOARD_TONES);
|
|
20908
|
+
var blockId = z35.string().regex(/^[\w.:-]{1,64}$/, "Use 1-64 letters, digits, _, -, . or :");
|
|
20909
|
+
var httpsUrl = z35.url({ protocol: /^https$/, error: "Must be an https URL" });
|
|
20895
20910
|
var prUrl = httpsUrl.refine((url) => parseCodeHostPrUrl(url) !== null, "Must be a GitHub pull request or GitLab merge request URL");
|
|
20896
|
-
var linearIdentifier =
|
|
20897
|
-
var action =
|
|
20898
|
-
|
|
20899
|
-
|
|
20900
|
-
|
|
20901
|
-
|
|
20902
|
-
|
|
20903
|
-
|
|
20911
|
+
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");
|
|
20912
|
+
var action = z35.discriminatedUnion("type", [
|
|
20913
|
+
z35.object({ type: z35.literal("open_ship"), workspace_id: z35.uuid() }),
|
|
20914
|
+
z35.object({ type: z35.literal("message_ship"), workspace_id: z35.uuid(), message: label(4e3) }),
|
|
20915
|
+
z35.object({ type: z35.literal("open_pr"), url: prUrl }),
|
|
20916
|
+
z35.object({ type: z35.literal("merge_pr"), url: prUrl }),
|
|
20917
|
+
z35.object({ type: z35.literal("message_mothership"), message: label(4e3) }),
|
|
20918
|
+
z35.object({ type: z35.literal("open_link"), url: httpsUrl })
|
|
20904
20919
|
]);
|
|
20905
|
-
var text3 =
|
|
20906
|
-
var badge =
|
|
20907
|
-
var pr =
|
|
20908
|
-
var ship =
|
|
20909
|
-
var linear =
|
|
20910
|
-
var button =
|
|
20911
|
-
var steps =
|
|
20912
|
-
type:
|
|
20920
|
+
var text3 = z35.object({ type: z35.literal("text"), id: blockId.optional(), text: label(2e3) });
|
|
20921
|
+
var badge = z35.object({ type: z35.literal("badge"), id: blockId.optional(), label: label(40), tone: tone.optional() });
|
|
20922
|
+
var pr = z35.object({ type: z35.literal("pr"), id: blockId.optional(), url: prUrl });
|
|
20923
|
+
var ship = z35.object({ type: z35.literal("ship"), id: blockId.optional(), workspace_id: z35.uuid() });
|
|
20924
|
+
var linear = z35.object({ type: z35.literal("linear"), id: blockId.optional(), identifier: linearIdentifier });
|
|
20925
|
+
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() });
|
|
20926
|
+
var steps = z35.object({
|
|
20927
|
+
type: z35.literal("steps"),
|
|
20913
20928
|
id: blockId.optional(),
|
|
20914
|
-
steps:
|
|
20929
|
+
steps: z35.array(z35.object({ label: label(30), state: z35.enum(["done", "current", "pending", "failed"]) })).min(1).max(8)
|
|
20915
20930
|
});
|
|
20916
|
-
var inline =
|
|
20917
|
-
var row =
|
|
20931
|
+
var inline = z35.discriminatedUnion("type", [text3, badge, pr, ship, linear, button, steps]);
|
|
20932
|
+
var row = z35.object({ type: z35.literal("row"), id: blockId.optional(), cells: z35.array(z35.union([label(500), inline])).min(1).max(6) });
|
|
20918
20933
|
var blockTypes = {
|
|
20919
20934
|
text: text3,
|
|
20920
20935
|
badge,
|
|
@@ -20923,49 +20938,50 @@ var blockTypes = {
|
|
|
20923
20938
|
linear,
|
|
20924
20939
|
button,
|
|
20925
20940
|
steps,
|
|
20926
|
-
stat:
|
|
20927
|
-
divider:
|
|
20928
|
-
updated_at:
|
|
20929
|
-
choice:
|
|
20930
|
-
type:
|
|
20941
|
+
stat: z35.object({ type: z35.literal("stat"), id: blockId.optional(), label: label(40), value: label(40), tone: tone.optional() }),
|
|
20942
|
+
divider: z35.object({ type: z35.literal("divider"), id: blockId.optional() }),
|
|
20943
|
+
updated_at: z35.object({ type: z35.literal("updated_at"), id: blockId.optional() }),
|
|
20944
|
+
choice: z35.object({
|
|
20945
|
+
type: z35.literal("choice"),
|
|
20931
20946
|
id: blockId.optional(),
|
|
20932
20947
|
question: label(500),
|
|
20933
|
-
options:
|
|
20948
|
+
options: z35.array(z35.object({ label: label(60), message: label(2e3).optional() })).min(2).max(6),
|
|
20934
20949
|
resolves: blockId.optional()
|
|
20935
20950
|
}),
|
|
20936
|
-
button_group:
|
|
20937
|
-
table:
|
|
20938
|
-
callout:
|
|
20939
|
-
type:
|
|
20951
|
+
button_group: z35.object({ type: z35.literal("button_group"), id: blockId.optional(), children: z35.array(button).min(1).max(8) }),
|
|
20952
|
+
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) }),
|
|
20953
|
+
callout: z35.object({
|
|
20954
|
+
type: z35.literal("callout"),
|
|
20940
20955
|
id: blockId.optional(),
|
|
20941
20956
|
tone,
|
|
20942
20957
|
title: label(120).optional(),
|
|
20943
20958
|
get children() {
|
|
20944
|
-
return
|
|
20959
|
+
return z35.array(block).max(20).optional();
|
|
20945
20960
|
}
|
|
20946
20961
|
}),
|
|
20947
|
-
list:
|
|
20948
|
-
type:
|
|
20962
|
+
list: z35.object({
|
|
20963
|
+
type: z35.literal("list"),
|
|
20949
20964
|
id: blockId.optional(),
|
|
20950
|
-
ordered:
|
|
20965
|
+
ordered: z35.boolean().optional(),
|
|
20951
20966
|
get children() {
|
|
20952
|
-
return
|
|
20967
|
+
return z35.array(block).max(100);
|
|
20953
20968
|
}
|
|
20954
20969
|
}),
|
|
20955
|
-
section:
|
|
20956
|
-
type:
|
|
20970
|
+
section: z35.object({
|
|
20971
|
+
type: z35.literal("section"),
|
|
20957
20972
|
id: blockId.optional(),
|
|
20958
20973
|
title: label(120),
|
|
20959
|
-
|
|
20974
|
+
tone: tone.optional(),
|
|
20975
|
+
collapsed: z35.boolean().optional(),
|
|
20960
20976
|
get children() {
|
|
20961
|
-
return
|
|
20977
|
+
return z35.array(block).max(100);
|
|
20962
20978
|
}
|
|
20963
20979
|
})
|
|
20964
20980
|
};
|
|
20965
20981
|
var blockSchemas = [text3, ...Object.values(blockTypes).filter((schema) => schema !== text3)];
|
|
20966
|
-
var block =
|
|
20982
|
+
var block = z35.discriminatedUnion("type", blockSchemas);
|
|
20967
20983
|
var MOTHERSHIP_BOARD_CONTAINER_TYPES = Object.entries(blockTypes).filter(([, schema]) => "children" in schema.shape).map(([type]) => type);
|
|
20968
|
-
var mothershipBoardBlocksSchema =
|
|
20984
|
+
var mothershipBoardBlocksSchema = z35.array(block).max(100).superRefine((blocks, ctx) => {
|
|
20969
20985
|
const seen = /* @__PURE__ */ new Set();
|
|
20970
20986
|
const visit = (node, path) => {
|
|
20971
20987
|
if (typeof node === "string") return;
|
|
@@ -20983,19 +20999,19 @@ var mothershipBoardBlocksSchema = z34.array(block).max(100).superRefine((blocks,
|
|
|
20983
20999
|
};
|
|
20984
21000
|
blocks.forEach((node, index) => visit(node, [index]));
|
|
20985
21001
|
});
|
|
20986
|
-
var mothershipBoardOperationsSchema =
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
op:
|
|
20990
|
-
block:
|
|
21002
|
+
var mothershipBoardOperationsSchema = z35.array(z35.discriminatedUnion("op", [
|
|
21003
|
+
z35.object({ op: z35.literal("replace"), blocks: z35.array(block) }),
|
|
21004
|
+
z35.object({
|
|
21005
|
+
op: z35.literal("upsert"),
|
|
21006
|
+
block: z35.discriminatedUnion("type", [row, ...blockSchemas]).refine((value) => Boolean(value.id), { message: "Give the block an id", path: ["id"] }),
|
|
20991
21007
|
parent_id: blockId.optional(),
|
|
20992
|
-
position:
|
|
21008
|
+
position: z35.number().int().min(0).optional()
|
|
20993
21009
|
}),
|
|
20994
|
-
|
|
21010
|
+
z35.object({ op: z35.literal("remove"), id: blockId })
|
|
20995
21011
|
])).min(1).max(50);
|
|
20996
|
-
var mothershipBoardItemRefSchema =
|
|
21012
|
+
var mothershipBoardItemRefSchema = z35.object({ mothershipId: z35.uuid(), block, occurrence: z35.number().int().min(0).optional() });
|
|
20997
21013
|
var LINEAR_ISSUE_SUMMARIES_MAX = 50;
|
|
20998
|
-
var linearIssueSummariesRequestSchema =
|
|
21014
|
+
var linearIssueSummariesRequestSchema = z35.object({ identifiers: z35.array(linearIdentifier).min(1).max(LINEAR_ISSUE_SUMMARIES_MAX) });
|
|
20999
21015
|
|
|
21000
21016
|
export {
|
|
21001
21017
|
ENGINE_SEND_MESSAGE_FAILED_ERROR,
|
|
@@ -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-6MUQYWOB.js";
|
|
7
7
|
|
|
8
8
|
// src/utils/exec.ts
|
|
9
9
|
import { exec, execFile } from "child_process";
|
|
@@ -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-B2ATLNXY.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6MUQYWOB.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.1427";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -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-B2ATLNXY.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-6MUQYWOB.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
|
AspClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ENW4Y4AT.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-6MUQYWOB.js";
|
|
19
19
|
|
|
20
20
|
// src/managers/codex-asp/notification-dispatch.ts
|
|
21
21
|
var TURN_STARTED_METHOD = "turn/started";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getOriginDefaultBranch,
|
|
7
7
|
monolithRequest,
|
|
8
8
|
runGitCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-EUOFM2PA.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-6MUQYWOB.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
resolveDiffBase,
|
|
11
11
|
runGitCommand,
|
|
12
12
|
setAgentCredentialSnapshot
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EUOFM2PA.js";
|
|
14
14
|
import {
|
|
15
15
|
AppServerProcess,
|
|
16
16
|
buildCodexAgentEnv
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-ENW4Y4AT.js";
|
|
18
18
|
import {
|
|
19
19
|
SUBPROCESS_MAX_BUFFER,
|
|
20
20
|
execFileAsync
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-B2ATLNXY.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-6MUQYWOB.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-JBPDLVYE.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-JBPDLVYE.js");
|
|
345
345
|
await restartCodexAspHostIfRunning2();
|
|
346
346
|
}
|
|
347
347
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -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-IS2FTK43.js";
|
|
7
|
+
import "./chunk-EUOFM2PA.js";
|
|
8
|
+
import "./chunk-B2ATLNXY.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-6MUQYWOB.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-G5Q2RQDE.js";
|
|
18
18
|
import {
|
|
19
19
|
AppServerProcess,
|
|
20
20
|
buildCodexAgentEnv
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-ENW4Y4AT.js";
|
|
22
|
+
import "./chunk-B2ATLNXY.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-6MUQYWOB.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-IS2FTK43.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-G5Q2RQDE.js";
|
|
69
69
|
import {
|
|
70
70
|
publishedPullRequestUrls
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-5HHQUSV6.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-MK4TMIVM.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-EUOFM2PA.js";
|
|
157
157
|
import {
|
|
158
158
|
getCodexModelProvider
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-ENW4Y4AT.js";
|
|
160
160
|
import {
|
|
161
161
|
SUBPROCESS_MAX_BUFFER,
|
|
162
162
|
execAsync,
|
|
163
163
|
execFileAsync
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-B2ATLNXY.js";
|
|
165
165
|
import {
|
|
166
166
|
isRecord as isRecord2
|
|
167
167
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -432,7 +432,7 @@ import {
|
|
|
432
432
|
workspaceTokenRequestSchema,
|
|
433
433
|
workspaceTokenResponseSchema,
|
|
434
434
|
wrapInTag
|
|
435
|
-
} from "./chunk-
|
|
435
|
+
} from "./chunk-6MUQYWOB.js";
|
|
436
436
|
import {
|
|
437
437
|
cloneMcpConfig,
|
|
438
438
|
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-5HHQUSV6.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-6MUQYWOB.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