replicas-engine 0.1.973 → 0.1.975
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-DSLWM2EA.js → asp-host-SJQEEEQS.js} +5 -5
- package/dist/src/{chunk-NHD7MMAW.js → chunk-DQFGKWE5.js} +6 -6
- package/dist/src/{chunk-OKFWM3XR.js → chunk-DTKUVZ6U.js} +1 -1
- package/dist/src/{chunk-RMH6PDA7.js → chunk-NTM575B4.js} +242 -144
- package/dist/src/{chunk-T65P3LSH.js → chunk-OXFR4PCR.js} +3 -3
- package/dist/src/{chunk-3VGFM7ME.js → chunk-TCG5OMQH.js} +1 -1
- package/dist/src/{chunk-F4ZGMCND.js → chunk-X5MYHFWW.js} +1 -1
- package/dist/src/{chunk-4P4NVCXW.js → chunk-ZOOJP2HJ.js} +3 -3
- package/dist/src/command-protection-hook.js +4 -4
- package/dist/src/headless-agent.js +3 -3
- package/dist/src/index.js +7 -7
- package/dist/src/post-tool-pr-hook.js +2 -2
- package/dist/src/subagent-mcp.js +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
getCodexAspHost,
|
|
6
6
|
restartCodexAspHost,
|
|
7
7
|
restartCodexAspHostIfRunning
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-DQFGKWE5.js";
|
|
9
|
+
import "./chunk-TCG5OMQH.js";
|
|
10
|
+
import "./chunk-ZOOJP2HJ.js";
|
|
11
|
+
import "./chunk-X5MYHFWW.js";
|
|
12
12
|
import "./chunk-UZSNFLDQ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-NTM575B4.js";
|
|
14
14
|
import "./chunk-VEQXQN22.js";
|
|
15
15
|
export {
|
|
16
16
|
getCodexAspHost,
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
ENGINE_ENV,
|
|
6
6
|
monolithRequest,
|
|
7
7
|
setAgentCredentialSnapshot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-TCG5OMQH.js";
|
|
9
9
|
import {
|
|
10
10
|
AppServerProcess,
|
|
11
11
|
buildCodexAgentEnv
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ZOOJP2HJ.js";
|
|
13
13
|
import {
|
|
14
14
|
SUBPROCESS_MAX_BUFFER,
|
|
15
15
|
execFileAsync
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X5MYHFWW.js";
|
|
17
17
|
import {
|
|
18
18
|
isRecord
|
|
19
19
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
listOpenAICompatibleModels,
|
|
28
28
|
readOllamaAuthEnv,
|
|
29
29
|
resolveOpenAICompatibleModelsUrl
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-NTM575B4.js";
|
|
31
31
|
|
|
32
32
|
// src/managers/codex-token-manager.ts
|
|
33
33
|
import { promises as fs } from "fs";
|
|
@@ -260,7 +260,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
260
260
|
await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
|
|
261
261
|
await this.applyCredentialsResponse(data);
|
|
262
262
|
setAgentCredentialSnapshot("codex", data);
|
|
263
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
263
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-SJQEEEQS.js");
|
|
264
264
|
await restartCodexAspHostIfRunning2();
|
|
265
265
|
});
|
|
266
266
|
await this.start(true);
|
|
@@ -280,7 +280,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
|
|
|
280
280
|
await this.applyCredentialUpdate(generation, async () => {
|
|
281
281
|
await this.applyCredentialsResponse(data);
|
|
282
282
|
if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
|
|
283
|
-
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-
|
|
283
|
+
const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-SJQEEEQS.js");
|
|
284
284
|
await restartCodexAspHostIfRunning2();
|
|
285
285
|
}
|
|
286
286
|
setAgentCredentialSnapshot("codex", data);
|
|
@@ -2637,6 +2637,57 @@ function buildCodeHostPrUrl(repoUrl, provider, prNumber) {
|
|
|
2637
2637
|
return `${normalizedRepoUrl}/pull/${prNumber}`;
|
|
2638
2638
|
}
|
|
2639
2639
|
|
|
2640
|
+
// ../shared/src/replicas-mcp.ts
|
|
2641
|
+
import { z as z10 } from "zod";
|
|
2642
|
+
|
|
2643
|
+
// ../shared/src/automations/trigger-schemas.ts
|
|
2644
|
+
import { z as z9 } from "zod";
|
|
2645
|
+
|
|
2646
|
+
// ../shared/src/uuid.ts
|
|
2647
|
+
function createUuidFromHex(value) {
|
|
2648
|
+
return `${value.slice(0, 8)}-${value.slice(8, 12)}-5${value.slice(13, 16)}-${(Number.parseInt(value.slice(16, 17), 16) & 3 | 8).toString(16)}${value.slice(17, 20)}-${value.slice(20, 32)}`;
|
|
2649
|
+
}
|
|
2650
|
+
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2651
|
+
|
|
2652
|
+
// ../shared/src/automations/trigger-schemas.ts
|
|
2653
|
+
var repositoryTriggerConfigSchema = z9.object({
|
|
2654
|
+
event: z9.string(),
|
|
2655
|
+
repository_ids: z9.array(z9.string().regex(UUID_RE, "must be a repository id")).optional(),
|
|
2656
|
+
group_pr_events: z9.boolean().optional(),
|
|
2657
|
+
excluded_actors: z9.array(z9.string()).optional()
|
|
2658
|
+
});
|
|
2659
|
+
var cronTriggerSchema = z9.object({ type: z9.literal("cron"), config: z9.object({ schedule: z9.string(), timezone: z9.string().optional() }) });
|
|
2660
|
+
var githubTriggerSchema = z9.object({ type: z9.literal("github"), config: repositoryTriggerConfigSchema });
|
|
2661
|
+
var gitlabTriggerSchema = z9.object({ type: z9.literal("gitlab"), config: repositoryTriggerConfigSchema });
|
|
2662
|
+
var automationTriggerSchema = z9.discriminatedUnion("type", [
|
|
2663
|
+
cronTriggerSchema,
|
|
2664
|
+
githubTriggerSchema,
|
|
2665
|
+
gitlabTriggerSchema,
|
|
2666
|
+
z9.object({ type: z9.literal("slack"), config: z9.object({ event: z9.string(), channel_ids: z9.array(z9.string()).optional(), group_thread_replies: z9.boolean().optional() }) }),
|
|
2667
|
+
z9.object({ type: z9.literal("sentry"), config: z9.object({ event: z9.string(), project_slugs: z9.array(z9.string()).optional(), min_level: z9.string().optional() }) }),
|
|
2668
|
+
z9.object({ type: z9.literal("custom"), config: z9.object({}) })
|
|
2669
|
+
]);
|
|
2670
|
+
|
|
2671
|
+
// ../shared/src/replicas-mcp.ts
|
|
2672
|
+
var REPLICAS_MCP_SERVER_NAME = "replicas-mcp";
|
|
2673
|
+
var REPLICAS_MCP_TOOLS = {
|
|
2674
|
+
listEnvironments: "list_environments",
|
|
2675
|
+
createAutomation: "create_automation",
|
|
2676
|
+
spawn: "spawn_workspace",
|
|
2677
|
+
relay: "relay_to_workspace",
|
|
2678
|
+
linearStart: "start_linear_session",
|
|
2679
|
+
linearSessionIntent: "register_linear_session_intent"
|
|
2680
|
+
};
|
|
2681
|
+
var automationToolInputSchema = z10.object({
|
|
2682
|
+
name: z10.string().describe("Short automation name."),
|
|
2683
|
+
prompt: z10.string().describe("Prompt each automation run starts with."),
|
|
2684
|
+
environment_id: z10.string().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.`),
|
|
2685
|
+
triggers: z10.array(automationTriggerSchema).min(1).describe(
|
|
2686
|
+
'One or more triggers. Cron: `{ "type": "cron", "config": { "schedule": "0 9 * * 1", "timezone": "America/New_York" } }`. GitHub: `{ "type": "github", "config": { "event": "pull_request.opened", "repository_ids": ["<repository uuid>"] } }`.'
|
|
2687
|
+
),
|
|
2688
|
+
description: z10.string().optional().describe("One-line summary shown in the dashboard.")
|
|
2689
|
+
});
|
|
2690
|
+
|
|
2640
2691
|
// ../shared/src/default-skills/replicas-agent/abilities/computer.ts
|
|
2641
2692
|
var SECTION = `### Computer use (Linux desktop control)
|
|
2642
2693
|
Drive the workspace's Linux desktop - open a browser, click, type, scroll, screenshot, record - via the \`replicas computer\` CLI. Every Replicas workspace boots with a live H.264 and Opus stream published as an authenticated preview, so a \`Desktop\` tab is always available in the dashboard. Use \`replicas computer info\` to get the viewer URL when you want to share it (e.g. point a user on Slack at the live stream).
|
|
@@ -2907,15 +2958,7 @@ var DOCKER_ABILITY = {
|
|
|
2907
2958
|
};
|
|
2908
2959
|
|
|
2909
2960
|
// ../shared/src/routes/environment-setups.ts
|
|
2910
|
-
import { z as
|
|
2911
|
-
|
|
2912
|
-
// ../shared/src/uuid.ts
|
|
2913
|
-
function createUuidFromHex(value) {
|
|
2914
|
-
return `${value.slice(0, 8)}-${value.slice(8, 12)}-5${value.slice(13, 16)}-${(Number.parseInt(value.slice(16, 17), 16) & 3 | 8).toString(16)}${value.slice(17, 20)}-${value.slice(20, 32)}`;
|
|
2915
|
-
}
|
|
2916
|
-
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
2917
|
-
|
|
2918
|
-
// ../shared/src/routes/environment-setups.ts
|
|
2961
|
+
import { z as z11 } from "zod";
|
|
2919
2962
|
var ENVIRONMENT_SETUP_STEPS = [
|
|
2920
2963
|
{ key: "understand", label: "Understand the codebase" },
|
|
2921
2964
|
{ key: "install", label: "Install dependencies and run the app" },
|
|
@@ -2949,27 +2992,17 @@ var ENVIRONMENT_SETUP_LIMITS = {
|
|
|
2949
2992
|
};
|
|
2950
2993
|
var ENVIRONMENT_SETUP_VARIABLE_WAIT = { defaultMs: 5 * 6e4, maxMs: 15 * 6e4, pollMs: 5e3 };
|
|
2951
2994
|
var VARIABLE_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
2952
|
-
var text = (max) => max === void 0 ?
|
|
2995
|
+
var text = (max) => max === void 0 ? z11.string().trim() : z11.string().trim().max(max);
|
|
2953
2996
|
var requiredText = (max) => text(max).min(1, "must not be empty");
|
|
2954
2997
|
var optionalText = (max) => text(max).nullish().transform((value) => value || null);
|
|
2955
2998
|
var clearableText = (max) => text(max).nullish().transform((value) => value === void 0 ? void 0 : value || null);
|
|
2956
|
-
var list = (item, max) => max === void 0 ?
|
|
2999
|
+
var list = (item, max) => max === void 0 ? z11.array(item) : z11.array(item).max(max);
|
|
2957
3000
|
var ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES = ["cron", "github", "gitlab"];
|
|
2958
3001
|
function isEnvironmentSetupAuthoredTriggerType(type) {
|
|
2959
3002
|
return ENVIRONMENT_SETUP_AUTHORED_TRIGGER_TYPES.some((authored) => authored === type);
|
|
2960
3003
|
}
|
|
2961
|
-
var
|
|
2962
|
-
|
|
2963
|
-
repository_ids: z9.array(z9.string().regex(UUID_RE, "must be a repository id")).optional(),
|
|
2964
|
-
group_pr_events: z9.boolean().optional(),
|
|
2965
|
-
excluded_actors: z9.array(z9.string()).optional()
|
|
2966
|
-
});
|
|
2967
|
-
var proposalTriggerSchema = z9.discriminatedUnion("type", [
|
|
2968
|
-
z9.object({ type: z9.literal("cron"), config: z9.object({ schedule: z9.string(), timezone: z9.string().optional() }) }),
|
|
2969
|
-
z9.object({ type: z9.literal("github"), config: repositoryTriggerConfigSchema }),
|
|
2970
|
-
z9.object({ type: z9.literal("gitlab"), config: repositoryTriggerConfigSchema })
|
|
2971
|
-
]);
|
|
2972
|
-
var existingTriggerSchema = z9.custom(
|
|
3004
|
+
var proposalTriggerSchema = z11.discriminatedUnion("type", [cronTriggerSchema, githubTriggerSchema, gitlabTriggerSchema]);
|
|
3005
|
+
var existingTriggerSchema = z11.custom(
|
|
2973
3006
|
(value) => isRecord(value) && typeof value.type === "string" && isRecord(value.config),
|
|
2974
3007
|
"must be an automation trigger"
|
|
2975
3008
|
);
|
|
@@ -2977,17 +3010,17 @@ var carriedTriggerSchema = existingTriggerSchema.refine(
|
|
|
2977
3010
|
(trigger) => !isEnvironmentSetupAuthoredTriggerType(trigger.type)
|
|
2978
3011
|
);
|
|
2979
3012
|
function automationSchema(limits) {
|
|
2980
|
-
const authored =
|
|
3013
|
+
const authored = z11.object({
|
|
2981
3014
|
name: text(limits.nameChars),
|
|
2982
3015
|
description: text(limits.descriptionChars),
|
|
2983
3016
|
prompt: text(limits.automationPromptChars),
|
|
2984
3017
|
triggers: list(proposalTriggerSchema, limits.automationTriggers)
|
|
2985
3018
|
});
|
|
2986
|
-
const updated = authored.extend({ triggers: list(
|
|
2987
|
-
return
|
|
3019
|
+
const updated = authored.extend({ triggers: list(z11.union([proposalTriggerSchema, carriedTriggerSchema]), limits.automationTriggers) });
|
|
3020
|
+
return z11.object({
|
|
2988
3021
|
key: requiredText(limits.automationKeyChars),
|
|
2989
|
-
action:
|
|
2990
|
-
automation_id:
|
|
3022
|
+
action: z11.enum(ENVIRONMENT_SETUP_AUTOMATION_ACTIONS).default("create"),
|
|
3023
|
+
automation_id: z11.string().regex(UUID_RE, "must be an automation id").nullable().default(null),
|
|
2991
3024
|
name: text().default(""),
|
|
2992
3025
|
description: optionalText().transform((value) => value ?? ""),
|
|
2993
3026
|
prompt: text().default(""),
|
|
@@ -3010,7 +3043,7 @@ function automationSchema(limits) {
|
|
|
3010
3043
|
const content = (automation.action === "update" ? updated : authored).safeParse(automation);
|
|
3011
3044
|
if (content.success) return { ...automation, ...content.data };
|
|
3012
3045
|
for (const issue of content.error.issues) ctx.addIssue({ ...issue, code: "custom" });
|
|
3013
|
-
return
|
|
3046
|
+
return z11.NEVER;
|
|
3014
3047
|
});
|
|
3015
3048
|
}
|
|
3016
3049
|
function automationListSchema(limits) {
|
|
@@ -3028,7 +3061,7 @@ function automationListSchema(limits) {
|
|
|
3028
3061
|
});
|
|
3029
3062
|
}
|
|
3030
3063
|
function environmentSchema(limits) {
|
|
3031
|
-
return
|
|
3064
|
+
return z11.object({
|
|
3032
3065
|
name: optionalText(limits.nameChars).transform((value) => value ?? void 0),
|
|
3033
3066
|
description: clearableText(limits.descriptionChars),
|
|
3034
3067
|
system_prompt: clearableText(limits.systemPromptChars),
|
|
@@ -3037,26 +3070,26 @@ function environmentSchema(limits) {
|
|
|
3037
3070
|
});
|
|
3038
3071
|
}
|
|
3039
3072
|
function variableSchema(limits, requiredDefault) {
|
|
3040
|
-
return
|
|
3041
|
-
key:
|
|
3073
|
+
return z11.object({
|
|
3074
|
+
key: z11.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
|
|
3042
3075
|
description: optionalText(limits.variableDescriptionChars).transform((value) => value ?? ""),
|
|
3043
|
-
required:
|
|
3076
|
+
required: z11.boolean().default(requiredDefault)
|
|
3044
3077
|
});
|
|
3045
3078
|
}
|
|
3046
3079
|
function proposalSchema(limits) {
|
|
3047
|
-
return
|
|
3080
|
+
return z11.object({
|
|
3048
3081
|
summary: requiredText(limits.summaryChars),
|
|
3049
3082
|
stack: list(text(), limits.stackItems).default([]).transform((items) => items.filter(Boolean)),
|
|
3050
3083
|
environment: environmentSchema(limits),
|
|
3051
3084
|
variables: list(variableSchema(limits, false), limits.variables).default([]),
|
|
3052
3085
|
automations: automationListSchema(limits),
|
|
3053
|
-
verification: list(
|
|
3086
|
+
verification: list(z11.object({
|
|
3054
3087
|
label: requiredText(limits.nameChars),
|
|
3055
|
-
status:
|
|
3088
|
+
status: z11.enum(ENVIRONMENT_SETUP_VERIFICATION_STATUSES),
|
|
3056
3089
|
detail: optionalText(limits.verificationDetailChars).transform((value) => value ?? void 0)
|
|
3057
3090
|
}), limits.verificationItems).default([]),
|
|
3058
|
-
media: list(
|
|
3059
|
-
media_id:
|
|
3091
|
+
media: list(z11.object({
|
|
3092
|
+
media_id: z11.string().regex(UUID_RE, "must be a media id"),
|
|
3060
3093
|
title: requiredText(limits.nameChars)
|
|
3061
3094
|
}), limits.mediaItems).default([])
|
|
3062
3095
|
});
|
|
@@ -3064,35 +3097,35 @@ function proposalSchema(limits) {
|
|
|
3064
3097
|
var environmentSetupProposalSchema = proposalSchema({});
|
|
3065
3098
|
var environmentSetupProposalSubmissionSchema = proposalSchema(ENVIRONMENT_SETUP_LIMITS);
|
|
3066
3099
|
var environmentSetupVariableRequestSchema = variableSchema({}, false).extend({
|
|
3067
|
-
status:
|
|
3068
|
-
requested_at:
|
|
3069
|
-
resolved_at:
|
|
3100
|
+
status: z11.enum(["pending", "provided", "skipped"]),
|
|
3101
|
+
requested_at: z11.string(),
|
|
3102
|
+
resolved_at: z11.string().nullable().default(null)
|
|
3070
3103
|
});
|
|
3071
|
-
var environmentSetupRunStateSchema =
|
|
3072
|
-
status:
|
|
3073
|
-
steps:
|
|
3104
|
+
var environmentSetupRunStateSchema = z11.object({
|
|
3105
|
+
status: z11.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
|
|
3106
|
+
steps: z11.partialRecord(z11.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z11.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
|
|
3074
3107
|
proposal: environmentSetupProposalSchema.nullable().default(null),
|
|
3075
|
-
applied:
|
|
3076
|
-
applied_at:
|
|
3077
|
-
automation_ids:
|
|
3108
|
+
applied: z11.object({
|
|
3109
|
+
applied_at: z11.string(),
|
|
3110
|
+
automation_ids: z11.array(z11.string())
|
|
3078
3111
|
}).nullable().default(null),
|
|
3079
|
-
variable_requests:
|
|
3112
|
+
variable_requests: z11.array(environmentSetupVariableRequestSchema).default([])
|
|
3080
3113
|
});
|
|
3081
|
-
var applyEnvironmentSetupRequestSchema =
|
|
3114
|
+
var applyEnvironmentSetupRequestSchema = z11.object({
|
|
3082
3115
|
environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
|
|
3083
|
-
variables: list(
|
|
3116
|
+
variables: list(z11.object({ key: z11.string().regex(VARIABLE_KEY_RE), value: z11.string() }), ENVIRONMENT_SETUP_LIMITS.variables).default([]).refine((variables) => new Set(variables.map((variable) => variable.key)).size === variables.length, "must have unique keys").transform((variables) => variables.filter((variable) => variable.value.length > 0)),
|
|
3084
3117
|
automations: automationListSchema(ENVIRONMENT_SETUP_LIMITS)
|
|
3085
3118
|
});
|
|
3086
|
-
var requestEnvironmentSetupVariablesSchema =
|
|
3119
|
+
var requestEnvironmentSetupVariablesSchema = z11.object({
|
|
3087
3120
|
variables: list(variableSchema(ENVIRONMENT_SETUP_LIMITS, true), ENVIRONMENT_SETUP_LIMITS.variables).min(1, "must not be empty")
|
|
3088
3121
|
}).superRefine(({ variables }, ctx) => {
|
|
3089
3122
|
if (new Set(variables.map((variable) => variable.key)).size !== variables.length) {
|
|
3090
3123
|
ctx.addIssue({ code: "custom", path: ["variables"], message: "must have unique keys" });
|
|
3091
3124
|
}
|
|
3092
3125
|
});
|
|
3093
|
-
var respondEnvironmentSetupVariablesSchema =
|
|
3094
|
-
values:
|
|
3095
|
-
skipped:
|
|
3126
|
+
var respondEnvironmentSetupVariablesSchema = z11.object({
|
|
3127
|
+
values: z11.record(z11.string().regex(VARIABLE_KEY_RE), z11.string()).default({}),
|
|
3128
|
+
skipped: z11.array(z11.string().regex(VARIABLE_KEY_RE)).default([])
|
|
3096
3129
|
});
|
|
3097
3130
|
|
|
3098
3131
|
// ../shared/src/default-skills/replicas-agent/abilities/environment-setup.ts
|
|
@@ -4290,6 +4323,7 @@ Take action *with* Replicas itself \u2014 manage automations, environments (vari
|
|
|
4290
4323
|
|
|
4291
4324
|
Use this when:
|
|
4292
4325
|
- The user asks you to create, edit, run, or delete an automation
|
|
4326
|
+
- The user asks you to come back to something later ("check back on this in a week", "remind me tomorrow", "tell me when CI is green") \u2014 schedule a follow-up (see *Follow-ups and reminders*)
|
|
4293
4327
|
- The user asks you to manage environments, environment variables, or environment files
|
|
4294
4328
|
- The user asks "what envs / repos / automations do I have?"
|
|
4295
4329
|
- The user asks you to scaffold a \`replicas.json\` / \`replicas.yaml\` in a repo
|
|
@@ -4350,6 +4384,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
4350
4384
|
| "Create a new env for my \`acme/web\` repo" | \`replicas environment create <name> -r acme/web\` |
|
|
4351
4385
|
| "What automations do I have?" | \`replicas automation list\` |
|
|
4352
4386
|
| "Run my nightly automation now" | \`replicas automation run <id>\` |
|
|
4387
|
+
| "Check back on this in a week" | \`replicas automation create ... --in 1w --background --personal\` |
|
|
4353
4388
|
| "Make an automation that runs every weekday at 9am" | \`replicas automation create\` (interactive) or \`--trigger-cron "0 9 * * 1-5"\` |
|
|
4354
4389
|
| "Make an automation that runs when a PR opens on \`acme/web\`" | \`replicas automation create ... --trigger-github pull_request.opened --trigger-github-repos acme/web\` |
|
|
4355
4390
|
| "Make an automation that runs when an MR opens on \`acme/web\`" | \`replicas automation create ... --trigger-gitlab merge_request.opened --trigger-gitlab-repos acme/web\` |
|
|
@@ -4461,6 +4496,26 @@ replicas automation create ... --lifecycle default --auto-stop-minutes 30
|
|
|
4461
4496
|
|
|
4462
4497
|
When the user says "make me an automation that...", default to **picking the environment for them by listing the available envs** and asking only when the user hasn't already pinned one. Same for repos in GitHub triggers. Don't pepper the user with questions you can answer by reading the existing config.
|
|
4463
4498
|
|
|
4499
|
+
### Follow-ups and reminders
|
|
4500
|
+
|
|
4501
|
+
You cannot wait days yourself. When the user asks you to come back to something later, schedule a one-time automation that delivers a prompt back into **this workspace's conversation** at that time, then deletes itself:
|
|
4502
|
+
|
|
4503
|
+
\`\`\`bash
|
|
4504
|
+
replicas automation create "Re-check PR #142 CI" \\
|
|
4505
|
+
--in 1w \\
|
|
4506
|
+
--background --personal \\
|
|
4507
|
+
--prompt "A week ago the user asked me to re-check CI on https://github.com/acme/web/pull/142 (flaky e2e job 'checkout'). Check the latest run, fix it if it is still failing, and summarize the result for the user."
|
|
4508
|
+
\`\`\`
|
|
4509
|
+
|
|
4510
|
+
- \`--in <duration>\` (\`30m\`, \`2h\`, \`3d\`, \`1w\`, \`1d12h\`) or \`--at <ISO-8601 with offset>\` (e.g. "tomorrow at 9am" \u2192 \`--at 2026-10-08T09:00:00-07:00\`, using the user's timezone if you know it; otherwise say which timezone you assumed).
|
|
4511
|
+
- Inside a workspace, one-time follow-ups default to \`--workspace current\`, so you resume with this conversation's context. Inside a workspace, \`--environment\` defaults to this workspace's environment (same repositories), including for \`--workspace new\` and \`reuse\`.
|
|
4512
|
+
- Write \`--prompt\` as instructions to your future self: the links, what to check, what "done" looks like, and how to report back (e.g. reply in the original Slack thread). It runs with no memory of why it was scheduled beyond what you write.
|
|
4513
|
+
- \`--background\` keeps offhand reminders out of the user's main automations list (they are still visible under **Background**). Omit it for things the user should see and manage, such as ongoing monitoring they asked for.
|
|
4514
|
+
- \`--personal\` makes the automation the user's own. Omit it only when the follow-up belongs to the organization.
|
|
4515
|
+
- Recurring with an end: \`--trigger-cron "0 9 * * *" --max-runs 5 --workspace current\` runs daily five times, then deletes itself. \`--workspace reuse\` creates one new workspace on the first run and sends every later run to it; \`--workspace new\` (the default for non-one-time automations) creates a fresh workspace per run.
|
|
4516
|
+
- Only schedule when the user asked for a follow-up or clearly agreed to one; not for "maybe I'll look at this later".
|
|
4517
|
+
- Confirm using the **Next Run** time the CLI prints, not your own arithmetic. Cancel with \`replicas automation delete <id> --force\`; find them with \`replicas automation list --background true\`.
|
|
4518
|
+
|
|
4464
4519
|
### Edit
|
|
4465
4520
|
|
|
4466
4521
|
\`\`\`bash
|
|
@@ -4563,7 +4618,7 @@ var SENTRY_ABILITY = {
|
|
|
4563
4618
|
};
|
|
4564
4619
|
|
|
4565
4620
|
// ../shared/src/memory.ts
|
|
4566
|
-
import { z as
|
|
4621
|
+
import { z as z12 } from "zod";
|
|
4567
4622
|
|
|
4568
4623
|
// ../shared/src/sandbox.ts
|
|
4569
4624
|
var SANDBOX_LIFECYCLE = {
|
|
@@ -4585,11 +4640,11 @@ var INVALID_WORKSPACE_SIZE_ERROR = `Invalid size: must be one of ${WORKSPACE_SIZ
|
|
|
4585
4640
|
// ../shared/src/memory.ts
|
|
4586
4641
|
var HISTORY_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/history`;
|
|
4587
4642
|
var HISTORY_INDEX_FILENAME = "INDEX.md";
|
|
4588
|
-
var memoryExtractionResultSchema =
|
|
4589
|
-
summary:
|
|
4590
|
-
indexEntry:
|
|
4643
|
+
var memoryExtractionResultSchema = z12.object({
|
|
4644
|
+
summary: z12.string().nullable(),
|
|
4645
|
+
indexEntry: z12.string().nullable()
|
|
4591
4646
|
});
|
|
4592
|
-
var { $schema: _, ...MEMORY_EXTRACTION_SCHEMA } =
|
|
4647
|
+
var { $schema: _, ...MEMORY_EXTRACTION_SCHEMA } = z12.toJSONSchema(memoryExtractionResultSchema);
|
|
4593
4648
|
|
|
4594
4649
|
// ../shared/src/default-skills/replicas-agent/abilities/session-history.ts
|
|
4595
4650
|
var SECTION12 = `### Session history
|
|
@@ -4813,6 +4868,13 @@ function removeTag(text2, tag) {
|
|
|
4813
4868
|
function removeReplicasInstructions(text2) {
|
|
4814
4869
|
return removeTag(text2, REPLICAS_INSTRUCTIONS_TAG);
|
|
4815
4870
|
}
|
|
4871
|
+
var mothershipMcpActions = `These are tools of the \`${REPLICAS_MCP_SERVER_NAME}\` MCP server; their argument names match the envelope fields. Call them directly as tools, never through a shell or the Replicas CLI.
|
|
4872
|
+
- **Spawn** a dedicated workspace for the thread and hand off: \`${REPLICAS_MCP_TOOLS.spawn}\`, with \`environment_id\` when you chose one.
|
|
4873
|
+
- **Relay** a follow-up that is clearly meant for you into the workspace already bound to the thread (pass the envelope's \`user_id\` so it's attributed to its author): \`${REPLICAS_MCP_TOOLS.relay}\`, with \`queue: true\` to queue it.
|
|
4874
|
+
- **List environments**: \`${REPLICAS_MCP_TOOLS.listEnvironments}\`.
|
|
4875
|
+
- **Create an automation**: \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling its \`confirmation_*\` arguments from the accepting message's envelope.
|
|
4876
|
+
- **Register a Linear session intent**: \`${REPLICAS_MCP_TOOLS.linearSessionIntent}\` with \`comment_id\` and \`action\`.
|
|
4877
|
+
- **Start a Linear session**: \`${REPLICAS_MCP_TOOLS.linearStart}\` with \`issue_id\`, \`agent_session_id\`, and \`prompt\`.`;
|
|
4816
4878
|
|
|
4817
4879
|
// ../shared/src/user-message-attachments.ts
|
|
4818
4880
|
var ATTACHMENT_PLACEHOLDER_REGEX = /^\[\d+ (?:(?:images?|files?)(?: and \d+ files?)? attached|(?:image )?attachments?)\]$/;
|
|
@@ -7786,7 +7848,7 @@ var CLAUDE_AUTH_ENV_KEYS_BY_METHOD = {
|
|
|
7786
7848
|
};
|
|
7787
7849
|
|
|
7788
7850
|
// ../shared/src/routes/command-protection.ts
|
|
7789
|
-
import { z as
|
|
7851
|
+
import { z as z13 } from "zod";
|
|
7790
7852
|
|
|
7791
7853
|
// ../shared/src/git-invocations.ts
|
|
7792
7854
|
var COMMIT_VALUE_OPTIONS = /* @__PURE__ */ new Set(["message", "file", "trailer", "reuse-message", "reedit-message", "fixup", "squash", "template", "author", "date", "cleanup", "pathspec-from-file"]);
|
|
@@ -7877,27 +7939,27 @@ function findCheckoutTarget(args) {
|
|
|
7877
7939
|
}
|
|
7878
7940
|
|
|
7879
7941
|
// ../shared/src/routes/command-protection.ts
|
|
7880
|
-
var commandProtectionRepoStateSchema =
|
|
7881
|
-
branch:
|
|
7882
|
-
defaultBranch:
|
|
7883
|
-
pushBranch:
|
|
7884
|
-
pushConfig:
|
|
7885
|
-
headMessage:
|
|
7886
|
-
mergeInProgress:
|
|
7942
|
+
var commandProtectionRepoStateSchema = z13.object({
|
|
7943
|
+
branch: z13.string().nullable(),
|
|
7944
|
+
defaultBranch: z13.string().nullable(),
|
|
7945
|
+
pushBranch: z13.string().nullable(),
|
|
7946
|
+
pushConfig: z13.string().nullable(),
|
|
7947
|
+
headMessage: z13.string().nullable(),
|
|
7948
|
+
mergeInProgress: z13.boolean().optional()
|
|
7887
7949
|
});
|
|
7888
|
-
var commandProtectionEvaluateRequestSchema =
|
|
7889
|
-
provider:
|
|
7890
|
-
source:
|
|
7891
|
-
toolName:
|
|
7892
|
-
toolInput:
|
|
7893
|
-
command:
|
|
7894
|
-
cwd:
|
|
7895
|
-
toolUseId:
|
|
7950
|
+
var commandProtectionEvaluateRequestSchema = z13.object({
|
|
7951
|
+
provider: z13.enum(["claude", "codex", "cursor", "opencode", "pi"]),
|
|
7952
|
+
source: z13.enum(["claude_pre_tool_use", "codex_approval_request", "cursor_pre_tool_use", "opencode_pre_tool_use", "pi_tool_call"]),
|
|
7953
|
+
toolName: z13.string(),
|
|
7954
|
+
toolInput: z13.unknown(),
|
|
7955
|
+
command: z13.string().nullish(),
|
|
7956
|
+
cwd: z13.string().nullish(),
|
|
7957
|
+
toolUseId: z13.string().nullish(),
|
|
7896
7958
|
// Read by the engine before the command runs, keyed by absolute path, so the
|
|
7897
7959
|
// policy can see branches and commit messages the command text only references.
|
|
7898
|
-
gitContext:
|
|
7899
|
-
repos:
|
|
7900
|
-
messageFiles:
|
|
7960
|
+
gitContext: z13.object({
|
|
7961
|
+
repos: z13.record(z13.string(), commandProtectionRepoStateSchema),
|
|
7962
|
+
messageFiles: z13.record(z13.string(), z13.string())
|
|
7901
7963
|
}).optional()
|
|
7902
7964
|
});
|
|
7903
7965
|
var COMMAND_PROTECTION_COMMAND_KEYS = ["command", "cmd", "script", "query", "endpoint", "path", "url", "mutation"];
|
|
@@ -8094,41 +8156,77 @@ function shouldRefreshPullRequests(toolName, toolInput) {
|
|
|
8094
8156
|
}
|
|
8095
8157
|
|
|
8096
8158
|
// ../shared/src/routes/linear.ts
|
|
8097
|
-
import { z as
|
|
8098
|
-
var linearSessionMetadataSchema =
|
|
8099
|
-
via_mothership:
|
|
8100
|
-
issue_id:
|
|
8101
|
-
issue_identifier:
|
|
8102
|
-
issue_title:
|
|
8103
|
-
issue_description:
|
|
8104
|
-
issue_url:
|
|
8105
|
-
comment_id:
|
|
8106
|
-
comment_body:
|
|
8107
|
-
triggered_by_id:
|
|
8108
|
-
triggered_by_name:
|
|
8109
|
-
triggered_by_email:
|
|
8110
|
-
linear_workspace_id:
|
|
8111
|
-
creator_id:
|
|
8112
|
-
creator_name:
|
|
8113
|
-
creator_email:
|
|
8114
|
-
assignee_id:
|
|
8115
|
-
assignee_name:
|
|
8116
|
-
assignee_email:
|
|
8117
|
-
issue_state:
|
|
8118
|
-
parent_issue:
|
|
8119
|
-
id:
|
|
8120
|
-
identifier:
|
|
8121
|
-
title:
|
|
8122
|
-
description:
|
|
8159
|
+
import { z as z14 } from "zod";
|
|
8160
|
+
var linearSessionMetadataSchema = z14.object({
|
|
8161
|
+
via_mothership: z14.boolean().optional(),
|
|
8162
|
+
issue_id: z14.string(),
|
|
8163
|
+
issue_identifier: z14.string(),
|
|
8164
|
+
issue_title: z14.string(),
|
|
8165
|
+
issue_description: z14.string(),
|
|
8166
|
+
issue_url: z14.string(),
|
|
8167
|
+
comment_id: z14.string(),
|
|
8168
|
+
comment_body: z14.string(),
|
|
8169
|
+
triggered_by_id: z14.string().optional(),
|
|
8170
|
+
triggered_by_name: z14.string().optional(),
|
|
8171
|
+
triggered_by_email: z14.string().optional(),
|
|
8172
|
+
linear_workspace_id: z14.string().optional(),
|
|
8173
|
+
creator_id: z14.string().optional(),
|
|
8174
|
+
creator_name: z14.string().optional(),
|
|
8175
|
+
creator_email: z14.string().optional(),
|
|
8176
|
+
assignee_id: z14.string().optional(),
|
|
8177
|
+
assignee_name: z14.string().optional(),
|
|
8178
|
+
assignee_email: z14.string().optional(),
|
|
8179
|
+
issue_state: z14.string().optional(),
|
|
8180
|
+
parent_issue: z14.object({
|
|
8181
|
+
id: z14.string(),
|
|
8182
|
+
identifier: z14.string(),
|
|
8183
|
+
title: z14.string(),
|
|
8184
|
+
description: z14.string().nullable()
|
|
8123
8185
|
}).optional(),
|
|
8124
|
-
workspace:
|
|
8125
|
-
id:
|
|
8126
|
-
coding_agent:
|
|
8127
|
-
task_description:
|
|
8128
|
-
created_at:
|
|
8186
|
+
workspace: z14.object({
|
|
8187
|
+
id: z14.string(),
|
|
8188
|
+
coding_agent: z14.custom((value) => typeof value === "string" && isValidAgentProvider(value)),
|
|
8189
|
+
task_description: z14.string(),
|
|
8190
|
+
created_at: z14.string()
|
|
8129
8191
|
}).optional()
|
|
8130
8192
|
});
|
|
8131
8193
|
|
|
8194
|
+
// ../shared/src/routes/mothership.ts
|
|
8195
|
+
import { z as z15 } from "zod";
|
|
8196
|
+
var MOTHERSHIP_LINEAR_ACTIONS = ["ask", "start"];
|
|
8197
|
+
var mothershipLinearSessionIntentRequestSchema = z15.object({
|
|
8198
|
+
comment_id: z15.string().trim().min(1).describe("Id of the Linear comment the session will be created on."),
|
|
8199
|
+
action: z15.enum(MOTHERSHIP_LINEAR_ACTIONS).describe("`ask` when the comment is a clarifying question, `start` when it is the complete task prompt.")
|
|
8200
|
+
});
|
|
8201
|
+
var mothershipLinearStartRequestSchema = z15.object({
|
|
8202
|
+
issue_id: z15.string().describe("Linear issue id from the envelope's `issue_id`."),
|
|
8203
|
+
agent_session_id: z15.string().describe("Existing Linear agent session id from the envelope's `agent_session_id`."),
|
|
8204
|
+
prompt: z15.string().trim().min(1).describe("Complete task prompt for the coding workspace.")
|
|
8205
|
+
});
|
|
8206
|
+
var slackChannelIdSchema = z15.string().describe("Slack channel id from the envelope's `channel_id`.");
|
|
8207
|
+
var slackThreadTsSchema = z15.string().describe("Slack thread timestamp from the envelope's `thread_ts`.");
|
|
8208
|
+
var mothershipSlackSpawnRequestSchema = z15.object({
|
|
8209
|
+
channel_id: slackChannelIdSchema,
|
|
8210
|
+
thread_ts: slackThreadTsSchema,
|
|
8211
|
+
message_ts: z15.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."),
|
|
8212
|
+
user_id: z15.string().describe("Slack user id of that message's author (the envelope's `user_id`). The workspace is attributed to them."),
|
|
8213
|
+
prompt: z15.string().describe("Complete task for the new workspace, written so it stands on its own."),
|
|
8214
|
+
environment_id: z15.string().optional().describe(`Environment id from \`${REPLICAS_MCP_TOOLS.listEnvironments}\`. Pass it only when clearly confident it fits; omit it to let routing choose or ask the person.`)
|
|
8215
|
+
});
|
|
8216
|
+
var mothershipSlackRelayRequestSchema = z15.object({
|
|
8217
|
+
channel_id: slackChannelIdSchema,
|
|
8218
|
+
thread_ts: slackThreadTsSchema,
|
|
8219
|
+
message: z15.string().describe("The follow-up to deliver, combining every fresh message that belongs to this update."),
|
|
8220
|
+
user_id: z15.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."),
|
|
8221
|
+
queue: z15.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.")
|
|
8222
|
+
});
|
|
8223
|
+
var mothershipAutomationToolInputSchema = automationToolInputSchema.extend({
|
|
8224
|
+
confirmation_channel_id: z15.string().describe("`channel_id` from the envelope of the Slack message that accepted the offer."),
|
|
8225
|
+
confirmation_thread_ts: z15.string().describe("`thread_ts` from that message's envelope."),
|
|
8226
|
+
confirmation_message_ts: z15.string().describe("`message_ts` from that message's envelope."),
|
|
8227
|
+
confirmation_user_id: z15.string().describe("`user_id` from that message's envelope.")
|
|
8228
|
+
});
|
|
8229
|
+
|
|
8132
8230
|
// ../shared/src/routes/plugin-catalog.ts
|
|
8133
8231
|
var EXPLICIT_PLUGIN_CATALOG = [
|
|
8134
8232
|
{
|
|
@@ -8435,7 +8533,7 @@ var MAX_CLIENT_STATE_REQUEST_BYTES = 5 * 1024 * 1024;
|
|
|
8435
8533
|
var MAX_CLIENT_STATE_BYTES_PER_USER = 10 * 1024 * 1024;
|
|
8436
8534
|
|
|
8437
8535
|
// ../shared/src/routes/workspaces.ts
|
|
8438
|
-
import { z as
|
|
8536
|
+
import { z as z16 } from "zod";
|
|
8439
8537
|
var WORKSPACE_STATUSES = ["active", "sleeping", "archived", "preparing", "error"];
|
|
8440
8538
|
var WORKSPACE_STATUS_FILTERS = WORKSPACE_STATUSES.map((status) => status === "error" ? "failed" : status);
|
|
8441
8539
|
var WORKSPACE_SORT_CHOICES = [
|
|
@@ -8459,56 +8557,56 @@ var DEFAULT_WORKSPACE_FILTERS = {
|
|
|
8459
8557
|
activity: "any"
|
|
8460
8558
|
};
|
|
8461
8559
|
var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
|
|
8462
|
-
var terminalRtcCandidateSchema =
|
|
8463
|
-
var terminalSocketServerMessageSchema =
|
|
8464
|
-
|
|
8465
|
-
|
|
8560
|
+
var terminalRtcCandidateSchema = z16.object({ type: z16.literal("rtc-candidate"), candidate: z16.string(), mid: z16.string() });
|
|
8561
|
+
var terminalSocketServerMessageSchema = z16.discriminatedUnion("type", [
|
|
8562
|
+
z16.object({ type: z16.literal("output"), data: z16.string() }),
|
|
8563
|
+
z16.object({ type: z16.literal("rtc-answer"), sdp: z16.string() }),
|
|
8466
8564
|
terminalRtcCandidateSchema,
|
|
8467
|
-
|
|
8565
|
+
z16.object({ type: z16.literal("rtc-switch") })
|
|
8468
8566
|
]);
|
|
8469
8567
|
var TERMINAL_RTC_ICE_SERVER = "stun:stun.l.google.com:19302";
|
|
8470
8568
|
|
|
8471
8569
|
// ../shared/src/routes/workspace-events.ts
|
|
8472
|
-
import { z as
|
|
8473
|
-
var workspaceChangedEventSchema =
|
|
8474
|
-
|
|
8475
|
-
type:
|
|
8476
|
-
workspaceId:
|
|
8477
|
-
completion:
|
|
8478
|
-
workspaceName:
|
|
8479
|
-
completedAt:
|
|
8480
|
-
processing:
|
|
8570
|
+
import { z as z17 } from "zod";
|
|
8571
|
+
var workspaceChangedEventSchema = z17.discriminatedUnion("type", [
|
|
8572
|
+
z17.object({
|
|
8573
|
+
type: z17.literal("workspace.changed"),
|
|
8574
|
+
workspaceId: z17.string(),
|
|
8575
|
+
completion: z17.object({
|
|
8576
|
+
workspaceName: z17.string(),
|
|
8577
|
+
completedAt: z17.string(),
|
|
8578
|
+
processing: z17.boolean().optional()
|
|
8481
8579
|
}).optional(),
|
|
8482
|
-
ts:
|
|
8580
|
+
ts: z17.string()
|
|
8483
8581
|
}),
|
|
8484
|
-
|
|
8485
|
-
type:
|
|
8486
|
-
workspaceId:
|
|
8487
|
-
chatId:
|
|
8488
|
-
ts:
|
|
8582
|
+
z17.object({
|
|
8583
|
+
type: z17.literal("workspace.chat.changed"),
|
|
8584
|
+
workspaceId: z17.string(),
|
|
8585
|
+
chatId: z17.string(),
|
|
8586
|
+
ts: z17.string()
|
|
8489
8587
|
}),
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
type:
|
|
8493
|
-
workspaceId:
|
|
8494
|
-
ts:
|
|
8588
|
+
z17.object({ type: z17.literal("presence.changed"), ts: z17.string() }),
|
|
8589
|
+
z17.object({
|
|
8590
|
+
type: z17.literal("mobile-testing.changed"),
|
|
8591
|
+
workspaceId: z17.string(),
|
|
8592
|
+
ts: z17.string()
|
|
8495
8593
|
})
|
|
8496
8594
|
]);
|
|
8497
8595
|
|
|
8498
8596
|
// ../shared/src/routes/presence.ts
|
|
8499
|
-
import { z as
|
|
8500
|
-
var presenceStatusSchema =
|
|
8501
|
-
var presenceLocationSchema =
|
|
8502
|
-
environmentId:
|
|
8503
|
-
workspaceId:
|
|
8597
|
+
import { z as z18 } from "zod";
|
|
8598
|
+
var presenceStatusSchema = z18.enum(["online", "typing"]);
|
|
8599
|
+
var presenceLocationSchema = z18.object({
|
|
8600
|
+
environmentId: z18.string().optional(),
|
|
8601
|
+
workspaceId: z18.string().optional()
|
|
8504
8602
|
});
|
|
8505
|
-
var presenceEntrySchema =
|
|
8506
|
-
userId:
|
|
8603
|
+
var presenceEntrySchema = z18.object({
|
|
8604
|
+
userId: z18.string(),
|
|
8507
8605
|
status: presenceStatusSchema,
|
|
8508
8606
|
location: presenceLocationSchema,
|
|
8509
|
-
ts:
|
|
8607
|
+
ts: z18.string()
|
|
8510
8608
|
});
|
|
8511
|
-
var updatePresenceRequestSchema =
|
|
8609
|
+
var updatePresenceRequestSchema = z18.object({
|
|
8512
8610
|
status: presenceStatusSchema,
|
|
8513
8611
|
location: presenceLocationSchema.optional()
|
|
8514
8612
|
});
|
|
@@ -3,18 +3,18 @@ import { createRequire as __createRequire } from 'node:module';
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
monolithRequest
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TCG5OMQH.js";
|
|
7
7
|
import {
|
|
8
8
|
SUBPROCESS_MAX_BUFFER,
|
|
9
9
|
execFileAsync
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X5MYHFWW.js";
|
|
11
11
|
import {
|
|
12
12
|
extractCommandProtectionCommandText,
|
|
13
13
|
findCommandProtectionGitLookups,
|
|
14
14
|
findGitCommitSignals,
|
|
15
15
|
findPrMergeSignals,
|
|
16
16
|
parseCommandProtectionRequest
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NTM575B4.js";
|
|
18
18
|
|
|
19
19
|
// src/services/command-protection-service.ts
|
|
20
20
|
import { readFile, stat } from "fs/promises";
|
|
@@ -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-NTM575B4.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-X5MYHFWW.js";
|
|
7
7
|
import {
|
|
8
8
|
isVersionBelow
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-NTM575B4.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.975";
|
|
244
244
|
var INITIALIZE_METHOD = "initialize";
|
|
245
245
|
var INITIALIZED_NOTIFICATION = "initialized";
|
|
246
246
|
var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
|
|
@@ -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-OXFR4PCR.js";
|
|
7
|
+
import "./chunk-TCG5OMQH.js";
|
|
8
|
+
import "./chunk-X5MYHFWW.js";
|
|
9
9
|
import {
|
|
10
10
|
isRecord
|
|
11
11
|
} from "./chunk-UZSNFLDQ.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NTM575B4.js";
|
|
13
13
|
import "./chunk-VEQXQN22.js";
|
|
14
14
|
|
|
15
15
|
// src/command-protection-hook.ts
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
AppServerProcess,
|
|
9
9
|
buildCodexAgentEnv
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ZOOJP2HJ.js";
|
|
11
|
+
import "./chunk-X5MYHFWW.js";
|
|
12
12
|
import {
|
|
13
13
|
AGENT,
|
|
14
14
|
headlessAgentRequestSchema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NTM575B4.js";
|
|
16
16
|
import "./chunk-VEQXQN22.js";
|
|
17
17
|
|
|
18
18
|
// src/headless-agent.ts
|
package/dist/src/index.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
reportCommandProtectionBlock,
|
|
33
33
|
resolveDiffBase,
|
|
34
34
|
runGitCommand
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OXFR4PCR.js";
|
|
36
36
|
import {
|
|
37
37
|
ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
|
|
38
38
|
AGENT_MESSAGE_DELTA_METHOD,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./chunk-P73LGPQO.js";
|
|
58
58
|
import {
|
|
59
59
|
publishedPullRequestUrls
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-DTKUVZ6U.js";
|
|
61
61
|
import {
|
|
62
62
|
BaseRefreshManager,
|
|
63
63
|
CodexAspAuthMethodChangedError,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
refreshDelayMs,
|
|
73
73
|
restartCodexAspHost,
|
|
74
74
|
routineRefreshExclusions
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-DQFGKWE5.js";
|
|
76
76
|
import {
|
|
77
77
|
ENGINE_ENV,
|
|
78
78
|
monolithRequest,
|
|
@@ -80,16 +80,16 @@ import {
|
|
|
80
80
|
readRuntimeEnvFile,
|
|
81
81
|
reloadEngineEnv,
|
|
82
82
|
setAgentCredentialSnapshot
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-TCG5OMQH.js";
|
|
84
84
|
import {
|
|
85
85
|
AspClient,
|
|
86
86
|
getCodexModelProvider
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-ZOOJP2HJ.js";
|
|
88
88
|
import {
|
|
89
89
|
SUBPROCESS_MAX_BUFFER,
|
|
90
90
|
execAsync,
|
|
91
91
|
execFileAsync
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-X5MYHFWW.js";
|
|
93
93
|
import {
|
|
94
94
|
isRecord as isRecord2
|
|
95
95
|
} from "./chunk-UZSNFLDQ.js";
|
|
@@ -310,7 +310,7 @@ import {
|
|
|
310
310
|
workspaceCredentialProviderSchema,
|
|
311
311
|
workspaceTokenRequestSchema,
|
|
312
312
|
workspaceTokenResponseSchema
|
|
313
|
-
} from "./chunk-
|
|
313
|
+
} from "./chunk-NTM575B4.js";
|
|
314
314
|
import {
|
|
315
315
|
cloneMcpConfig,
|
|
316
316
|
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-DTKUVZ6U.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-NTM575B4.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