replicas-engine 0.1.1155 → 0.1.1157

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.
@@ -8,12 +8,12 @@ import {
8
8
  listRunningCodexModels,
9
9
  restartCodexAspHost,
10
10
  restartCodexAspHostIfRunning
11
- } from "./chunk-CYCT72EA.js";
12
- import "./chunk-BHRLJAIC.js";
13
- import "./chunk-LXYTFVJE.js";
14
- import "./chunk-YNF24JFF.js";
11
+ } from "./chunk-KP56JJDO.js";
12
+ import "./chunk-AUFQ2A3K.js";
13
+ import "./chunk-ZPY6BKYZ.js";
14
+ import "./chunk-2XBQR37E.js";
15
15
  import "./chunk-UZSNFLDQ.js";
16
- import "./chunk-PDOVISJO.js";
16
+ import "./chunk-SN6BFW6M.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
  export {
19
19
  CODEX_ULTRAFAST_SERVICE_TIER,
@@ -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-PDOVISJO.js";
6
+ } from "./chunk-SN6BFW6M.js";
7
7
 
8
8
  // src/utils/exec.ts
9
9
  import { exec, execFile } from "child_process";
@@ -5,14 +5,14 @@ import {
5
5
  getOriginDefaultBranch,
6
6
  monolithRequest,
7
7
  runGitCommand
8
- } from "./chunk-BHRLJAIC.js";
8
+ } from "./chunk-AUFQ2A3K.js";
9
9
  import {
10
10
  extractCommandProtectionCommandText,
11
11
  findCommandProtectionGitLookups,
12
12
  findGitCommitSignals,
13
13
  findPrMergeSignals,
14
14
  parseCommandProtectionRequest
15
- } from "./chunk-PDOVISJO.js";
15
+ } from "./chunk-SN6BFW6M.js";
16
16
 
17
17
  // src/services/command-protection-service.ts
18
18
  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
  AspClient
6
- } from "./chunk-LXYTFVJE.js";
6
+ } from "./chunk-ZPY6BKYZ.js";
7
7
  import {
8
8
  ASTER_BASE_URL,
9
9
  ASTER_PROVIDER,
@@ -11,7 +11,7 @@ import {
11
11
  codexReasoningEffortForThinkingLevel,
12
12
  isRecord,
13
13
  readOllamaAuthEnv
14
- } from "./chunk-PDOVISJO.js";
14
+ } from "./chunk-SN6BFW6M.js";
15
15
 
16
16
  // src/managers/codex-asp/notification-dispatch.ts
17
17
  var TURN_STARTED_METHOD = "turn/started";
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  SUBPROCESS_MAX_BUFFER,
6
6
  execFileAsync
7
- } from "./chunk-YNF24JFF.js";
7
+ } from "./chunk-2XBQR37E.js";
8
8
  import {
9
9
  isRecord as isRecord2
10
10
  } from "./chunk-UZSNFLDQ.js";
@@ -18,7 +18,7 @@ import {
18
18
  isValidAgentProvider,
19
19
  parsePosixEnvFile,
20
20
  readReplicasRuntimeEnv
21
- } from "./chunk-PDOVISJO.js";
21
+ } from "./chunk-SN6BFW6M.js";
22
22
 
23
23
  // src/runtime-env-loader.ts
24
24
  import { readFileSync } from "fs";
@@ -10,15 +10,15 @@ import {
10
10
  resolveDiffBase,
11
11
  runGitCommand,
12
12
  setAgentCredentialSnapshot
13
- } from "./chunk-BHRLJAIC.js";
13
+ } from "./chunk-AUFQ2A3K.js";
14
14
  import {
15
15
  AppServerProcess,
16
16
  buildCodexAgentEnv
17
- } from "./chunk-LXYTFVJE.js";
17
+ } from "./chunk-ZPY6BKYZ.js";
18
18
  import {
19
19
  SUBPROCESS_MAX_BUFFER,
20
20
  execFileAsync
21
- } from "./chunk-YNF24JFF.js";
21
+ } from "./chunk-2XBQR37E.js";
22
22
  import {
23
23
  isRecord
24
24
  } from "./chunk-UZSNFLDQ.js";
@@ -55,7 +55,7 @@ import {
55
55
  resolveOpenAICompatibleModelsUrl,
56
56
  splitMothershipInstructions,
57
57
  withTimeout
58
- } from "./chunk-PDOVISJO.js";
58
+ } from "./chunk-SN6BFW6M.js";
59
59
 
60
60
  // src/managers/codex-token-manager.ts
61
61
  import { promises as fs } from "fs";
@@ -291,7 +291,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
291
291
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
292
292
  await this.applyCredentialsResponse(data);
293
293
  setAgentCredentialSnapshot("codex", data);
294
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-XIYF5R5Q.js");
294
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-HPMIN64L.js");
295
295
  await restartCodexAspHostIfRunning2();
296
296
  });
297
297
  await this.start(true);
@@ -312,7 +312,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
312
312
  const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
313
313
  await this.applyCredentialsResponse(data);
314
314
  if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
315
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-XIYF5R5Q.js");
315
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-HPMIN64L.js");
316
316
  await restartCodexAspHostIfRunning2();
317
317
  }
318
318
  setAgentCredentialSnapshot("codex", data);
@@ -3378,7 +3378,6 @@ var ENVIRONMENT_SETUP_LIMITS = {
3378
3378
  mediaItems: 8,
3379
3379
  repositories: 20
3380
3380
  };
3381
- var ENVIRONMENT_SETUP_VARIABLE_WAIT = { defaultMs: 5 * 6e4, maxMs: 15 * 6e4, pollMs: 5e3 };
3382
3381
  var VARIABLE_KEY_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
3383
3382
  var text2 = (max) => max === void 0 ? z15.string().trim() : z15.string().trim().max(max);
3384
3383
  var requiredText = (max) => text2(max).min(1, "must not be empty");
@@ -3457,19 +3456,16 @@ function environmentSchema(limits) {
3457
3456
  warm_hook: clearableText(limits.hookChars)
3458
3457
  });
3459
3458
  }
3460
- function variableSchema(limits, requiredDefault) {
3461
- return z15.object({
3462
- key: z15.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
3463
- description: optionalText2(limits.variableDescriptionChars).transform((value) => value ?? ""),
3464
- required: z15.boolean().default(requiredDefault)
3465
- });
3466
- }
3467
3459
  function proposalSchema(limits) {
3468
3460
  return z15.object({
3469
3461
  summary: requiredText(limits.summaryChars),
3470
3462
  stack: list(text2(), limits.stackItems).default([]).transform((items) => items.filter(Boolean)),
3471
3463
  environment: environmentSchema(limits),
3472
- variables: list(variableSchema(limits, false), limits.variables).default([]),
3464
+ variables: list(z15.object({
3465
+ key: z15.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(limits.variableKeyChars ?? Number.POSITIVE_INFINITY),
3466
+ description: optionalText2(limits.variableDescriptionChars).transform((value) => value ?? ""),
3467
+ required: z15.boolean().default(false)
3468
+ }), limits.variables).default([]),
3473
3469
  automations: automationListSchema(limits),
3474
3470
  verification: list(z15.object({
3475
3471
  label: requiredText(limits.nameChars),
@@ -3484,11 +3480,6 @@ function proposalSchema(limits) {
3484
3480
  }
3485
3481
  var environmentSetupProposalSchema = proposalSchema({});
3486
3482
  var environmentSetupProposalSubmissionSchema = proposalSchema(ENVIRONMENT_SETUP_LIMITS);
3487
- var environmentSetupVariableRequestSchema = variableSchema({}, false).extend({
3488
- status: z15.enum(["pending", "provided", "skipped"]),
3489
- requested_at: z15.string(),
3490
- resolved_at: z15.string().nullable().default(null)
3491
- });
3492
3483
  var environmentSetupRunStateSchema = z15.object({
3493
3484
  status: z15.enum(ENVIRONMENT_SETUP_RUN_STATUSES),
3494
3485
  steps: z15.partialRecord(z15.enum(ENVIRONMENT_SETUP_STEPS.map((step) => step.key)), z15.enum(ENVIRONMENT_SETUP_STEP_STATUSES)).default({}),
@@ -3496,25 +3487,13 @@ var environmentSetupRunStateSchema = z15.object({
3496
3487
  applied: z15.object({
3497
3488
  applied_at: z15.string(),
3498
3489
  automation_ids: z15.array(z15.string())
3499
- }).nullable().default(null),
3500
- variable_requests: z15.array(environmentSetupVariableRequestSchema).default([])
3490
+ }).nullable().default(null)
3501
3491
  });
3502
3492
  var applyEnvironmentSetupRequestSchema = z15.object({
3503
3493
  environment: environmentSchema(ENVIRONMENT_SETUP_LIMITS).extend({ name: requiredText(ENVIRONMENT_SETUP_LIMITS.nameChars) }),
3504
3494
  variables: list(z15.object({ key: z15.string().regex(VARIABLE_KEY_RE), value: z15.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)),
3505
3495
  automations: automationListSchema(ENVIRONMENT_SETUP_LIMITS)
3506
3496
  });
3507
- var requestEnvironmentSetupVariablesSchema = z15.object({
3508
- variables: list(variableSchema(ENVIRONMENT_SETUP_LIMITS, true), ENVIRONMENT_SETUP_LIMITS.variables).min(1, "must not be empty")
3509
- }).superRefine(({ variables }, ctx) => {
3510
- if (new Set(variables.map((variable) => variable.key)).size !== variables.length) {
3511
- ctx.addIssue({ code: "custom", path: ["variables"], message: "must have unique keys" });
3512
- }
3513
- });
3514
- var respondEnvironmentSetupVariablesSchema = z15.object({
3515
- values: z15.record(z15.string().regex(VARIABLE_KEY_RE), z15.string()).default({}),
3516
- skipped: z15.array(z15.string().regex(VARIABLE_KEY_RE)).default([])
3517
- });
3518
3497
 
3519
3498
  // ../shared/src/default-skills/replicas-agent/abilities/environment-setup.ts
3520
3499
  var SECTION3 = `### Environment setup (agent-led)
@@ -3555,11 +3534,9 @@ When this workspace was started as a setup run, the dashboard shows a live check
3555
3534
  \`\`\`bash
3556
3535
  replicas environment-setup status
3557
3536
  replicas environment-setup step <key> <status>
3558
- replicas environment-setup request-variables -f <path>
3559
- replicas environment-setup wait-variables [-t 5m]
3560
3537
  \`\`\`
3561
3538
 
3562
- \`status\` prints the environment, repositories, current steps, and variable requests. \`request-variables\` returns immediately; \`wait-variables\` blocks until the required values arrive, are skipped, or the time runs out. Step statuses are \`pending\`, \`in_progress\`, \`completed\`, and \`skipped\`. Step keys, in order: \`understand\`, \`install\`, \`verify\`, \`configure\`, \`propose\`. Mark the first step \`in_progress\` before your first tool call, keep exactly one step \`in_progress\`, and mark a step \`completed\` only after its work actually succeeded. Use \`skipped\` when something genuinely cannot run (for example no browser UI to record) and say so in the proposal.
3539
+ \`status\` prints the environment, repositories, and current steps. Step statuses are \`pending\`, \`in_progress\`, \`completed\`, and \`skipped\`. Step keys, in order: \`understand\`, \`install\`, \`verify\`, \`configure\`, \`propose\`. Mark the first step \`in_progress\` before your first tool call, keep exactly one step \`in_progress\`, and mark a step \`completed\` only after its work actually succeeded. Use \`skipped\` when something genuinely cannot run (for example no browser UI to record) and say so in the proposal.
3563
3540
 
3564
3541
  If \`replicas environment-setup status\` reports that there is no active setup run, you are in an ordinary workspace, either because the user asked for this or because the fix you found while debugging belongs in the environment. Follow the same discovery and verification steps, show the exact change in chat, and offer to apply and test it yourself. Ask the user before changing the environment, since it affects every workspace built from it. Once they approve:
3565
3542
 
@@ -3585,34 +3562,18 @@ Use subagents for broad, independent analysis when available, but read the files
3585
3562
 
3586
3563
  ## Asking for variables
3587
3564
 
3588
- The user may be watching the panel or may have walked away, so ask early and wait late:
3589
-
3590
- 1. Right after step 1, request in one batch only the secrets you need to run the app and test its main flow (usually including sign-in) that you cannot replace locally. First check for a local stand-in the app supports, such as a local database, an auth emulator, or documented test credentials. Do not request values you can generate, values that duplicate another key, or values that are not secret, and list optional integrations in the proposal instead of requesting them. \`required\` means the app cannot start, or its main flow cannot be tested, without it.
3591
-
3592
- \`\`\`bash
3593
- replicas environment-setup request-variables --file /tmp/variables.json
3594
- \`\`\`
3595
-
3596
- \`\`\`json
3597
- {
3598
- "variables": [
3599
- { "key": "FIREBASE_PRIVATE_KEY", "description": "Service account private key for a dev Firebase project; sign-in cannot be tested without it", "required": true }
3600
- ]
3601
- }
3602
- \`\`\`
3565
+ The user may be watching or may have walked away, so ask early and wait late:
3603
3566
 
3604
- 2. Keep working on everything that does not need the values. The request appears in the Environment panel next to the chat; the user types values there (stored encrypted on the environment, never in chat) or skips them.
3605
- 3. At the point you actually need a value, say in chat which keys you are waiting for and why, then block on it once:
3567
+ 1. Right after step 1, ask in one command for only the secrets you need to run the app and test its main flow (usually including sign-in) that you cannot replace locally. First check for a local stand-in the app supports, such as a local database, an auth emulator, or documented test credentials. Do not request values you can generate, values that duplicate another key, or values that are not secret, and list optional integrations in the proposal instead of requesting them.
3606
3568
 
3607
3569
  \`\`\`bash
3608
- replicas environment-setup wait-variables --timeout 15m
3609
- replicas environment-setup wait-variables --keys FIREBASE_PRIVATE_KEY --timeout 15m
3570
+ replicas environment vars request FIREBASE_PRIVATE_KEY --reason "Service account key for a dev Firebase project, to test sign-in" --no-wait
3610
3571
  \`\`\`
3611
3572
 
3612
- Without \`--keys\` it waits for every pending required key. It returns when the keys are provided or skipped, or when the time runs out, and prints which happened. Provided keys are exported for every new shell; restart anything you started with \`replicas service start\` before that point so it picks them up. Never print the values.
3613
- 4. For anything skipped or still unanswered after that wait, use the safest local substitute (local database, mock, documented test value), say so in the verification rows, and list the key in the proposal, marked required only if the app cannot start or its main flow cannot be tested without it. A key the user skipped is not asked again; do not resend it.
3614
- 5. Values the user provided are already saved on the environment. Still list those keys in the proposal so the review shows them as set.
3615
- 6. Requests are only accepted before you propose. Anything still missing after that goes into the proposal for the user to fill in at review.
3573
+ 2. Keep working on everything that does not need the values. The form appears above the chat composer; the user pastes values there (saved encrypted on the environment, never in chat) or skips them.
3574
+ 3. At the point you actually need a value, say in chat which keys you are waiting for and why, then run the same command without \`--no-wait\`. It returns when the keys are provided or skipped, or when the time runs out (\`--timeout 15m\`), and loads provided values into \`~/.replicas/runtime-env.sh\`. Run commands as \`. ~/.replicas/runtime-env.sh && <command>\` and restart anything you started with \`replicas service start\` before that point. Never print the values.
3575
+ 4. For anything skipped or still unanswered, use the safest local substitute (local database, mock, documented test value), say so in the verification rows, and list the key in the proposal, marked required only if the app cannot start or its main flow cannot be tested without it. Do not ask again for a key the user skipped.
3576
+ 5. Values the user saved are already on the environment. Still list those keys in the proposal so the review shows them as set.
3616
3577
 
3617
3578
  ## 2. Install and run
3618
3579
 
@@ -3625,7 +3586,7 @@ Work from the smallest failing layer, in this workspace:
3625
3586
 
3626
3587
  Use the repository's pinned package manager and lockfile. Do not upgrade dependencies, rewrite lockfiles, or change application code to make setup pass; environment configuration and narrowly necessary fixes to setup scripts are in scope. Do not deploy, publish, or touch production resources.
3627
3588
 
3628
- When something needs a secret you do not have, request it and run \`wait-variables\` at the point you need it (see "Asking for variables"). If it is skipped or unanswered, use the safest local substitute, keep going, and record the variable in the proposal with a clear description. Never invent or paste secret values anywhere.
3589
+ When something needs a secret you do not have, request it and wait for it at the point you need it (see "Asking for variables"). If it is skipped or unanswered, use the safest local substitute, keep going, and record the variable in the proposal with a clear description. Never invent or paste secret values anywhere.
3629
3590
 
3630
3591
  ## 3. Verify and record
3631
3592
 
@@ -3763,7 +3724,7 @@ Keep it under 250 words plus the lists. Do not paste the hooks or system prompt
3763
3724
 
3764
3725
  ## Safety
3765
3726
 
3766
- - Never put tokens, passwords, or private keys in hooks, prompts, files, logs, or chat. Values that arrive through \`wait-variables\` are exported to your shell; never echo, cat, or paste them.
3727
+ - Never put tokens, passwords, or private keys in hooks, prompts, files, logs, or chat. Values that arrive through \`replicas environment vars request\` are written to \`~/.replicas/runtime-env.sh\`; never echo, cat, or paste them.
3767
3728
  - Do not weaken network, certificate, or package-integrity settings to make setup pass.
3768
3729
  - Do not run destructive git operations, force pushes, or anything against production endpoints.
3769
3730
  - Do not change application code to hide an environment problem. Report it instead.
@@ -4980,6 +4941,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
4980
4941
  | --- | --- |
4981
4942
  | "What environments do I have?" | \`replicas environment list\` |
4982
4943
  | "Add API key X to my staging env" | \`replicas environment vars set <env> <KEY> <VALUE>\` |
4944
+ | You need a secret or API key you don't have | \`replicas environment vars request <KEY>... --reason "..."\` (see "Asking the user for variables") |
4983
4945
  | "Make me a \`.env\` file in the workspace with these vars" | \`replicas environment files set <env> .env --content "..."\` |
4984
4946
  | "Create a new env for my \`acme/web\` repo" | \`replicas environment create <name> -r acme/web\` |
4985
4947
  | "What automations do I have?" | \`replicas automation list\` |
@@ -5027,6 +4989,18 @@ replicas environment vars delete <env> <KEY|VARIABLE_ID> [--force]
5027
4989
 
5028
4990
  These variables are injected into every workspace built from this environment as actual \`env\` vars \u2014 perfect for API keys, feature flags, etc. Anything you want available to the agent's tools (Claude, codex, your code, etc.) goes here.
5029
4991
 
4992
+ ### Asking the user for variables
4993
+
4994
+ When you need a secret, API key, or other value you don't have, ask with one command. Never ask for values in chat, and never write instructions for adding them in the dashboard:
4995
+
4996
+ \`\`\`bash
4997
+ replicas environment vars request AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY --reason "Deploy the stack to AWS" [--optional AWS_REGION]
4998
+ \`\`\`
4999
+
5000
+ The user gets a form above the chat composer in Replicas, where they can paste a whole \`.env\` and choose to save the values to the environment or keep them in this workspace only. The command waits up to 10 minutes (\`--timeout\`), then writes the values to \`~/.replicas/runtime-env.sh\` and prints only the key names. Your current shell doesn't have them yet, so run commands as \`. ~/.replicas/runtime-env.sh && <command>\`, and restart anything you started earlier. Never print the values.
5001
+
5002
+ In workspaces started from Slack, Linear, or an automation, nobody may be watching Replicas, so the command returns right away with a link to the form; share it where you are talking with the user. If the values don't arrive in time, the request stays open. Either way you get a message when the user saves; run the same command again then. If a saved value is wrong, for example the service rejects it, add \`--replace\` to ask for a new one.
5003
+
5030
5004
  ### Environment files
5031
5005
 
5032
5006
  Files materialize on the workspace filesystem when a workspace starts, at the destination path you specify. Use this for things like \`.env\` files at the repo root, dotfiles in \`~\`, prompt files for agents, etc.
@@ -5186,8 +5160,7 @@ Repos are connected via the GitHub integration in the dashboard \u2014 not from
5186
5160
  var REPLICAS_ABILITY = {
5187
5161
  label: "Replicas",
5188
5162
  description: "Teach the agent about Replicas itself \u2014 automations, environments, the in-workspace CLI.",
5189
- // No bullet — help_instructions covers the `replicas` CLI surface in detail.
5190
- bullet: "",
5163
+ bullet: "- Getting a secret, API key, or token you don't have from the user: run `replicas environment vars request <KEY>...`, which shows them a form. Never ask for the value in chat or tell them to add it in settings.",
5191
5164
  section: SECTION11,
5192
5165
  referenceFile: { name: "REPLICAS.md", content: REFERENCE11 },
5193
5166
  locked: true
@@ -9378,6 +9351,11 @@ var workspaceChangedEventSchema = z22.discriminatedUnion("type", [
9378
9351
  workspaceId: z22.string(),
9379
9352
  ts: z22.string()
9380
9353
  }),
9354
+ z22.object({
9355
+ type: z22.literal("variable-request.changed"),
9356
+ workspaceId: z22.string(),
9357
+ ts: z22.string()
9358
+ }),
9381
9359
  z22.object({
9382
9360
  type: z22.literal("pull-request.changed"),
9383
9361
  prUrl: z22.string(),
@@ -9719,6 +9697,30 @@ function isSkillRegistryManifest(value) {
9719
9697
  );
9720
9698
  }
9721
9699
 
9700
+ // ../shared/src/routes/variable-requests.ts
9701
+ import { z as z25 } from "zod";
9702
+ var VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
9703
+ var VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
9704
+ var requestedVariableSchema = z25.object({
9705
+ key: z25.string().regex(VARIABLE_KEY_RE, "must be a valid environment variable name").max(ENVIRONMENT_SETUP_LIMITS.variableKeyChars),
9706
+ required: z25.boolean(),
9707
+ replace: z25.boolean().optional()
9708
+ });
9709
+ var requestedVariablesSchema = z25.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");
9710
+ var createVariableRequestSchema = z25.object({
9711
+ variables: requestedVariablesSchema,
9712
+ reason: z25.string().trim().max(500).nullish().transform((value) => value || null),
9713
+ wait: z25.boolean().default(true)
9714
+ });
9715
+ var respondVariableRequestSchema = z25.discriminatedUnion("action", [
9716
+ z25.object({
9717
+ action: z25.literal("provide"),
9718
+ destination: z25.enum(VARIABLE_REQUEST_DESTINATIONS),
9719
+ values: z25.record(z25.string().regex(VARIABLE_KEY_RE), z25.string())
9720
+ }),
9721
+ z25.object({ action: z25.literal("skip") })
9722
+ ]);
9723
+
9722
9724
  export {
9723
9725
  ENGINE_SEND_MESSAGE_FAILED_ERROR,
9724
9726
  isRecord,
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-PDOVISJO.js";
8
+ } from "./chunk-SN6BFW6M.js";
9
9
 
10
10
  // src/services/published-pull-request-urls.ts
11
11
  function publishedPullRequestUrls(result) {
@@ -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-YNF24JFF.js";
6
+ } from "./chunk-2XBQR37E.js";
7
7
  import {
8
8
  isVersionBelow
9
- } from "./chunk-PDOVISJO.js";
9
+ } from "./chunk-SN6BFW6M.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.1155";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1157";
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-7A3Q4LXV.js";
7
- import "./chunk-BHRLJAIC.js";
8
- import "./chunk-YNF24JFF.js";
6
+ } from "./chunk-3JIKIW2Z.js";
7
+ import "./chunk-AUFQ2A3K.js";
8
+ import "./chunk-2XBQR37E.js";
9
9
  import {
10
10
  isRecord
11
11
  } from "./chunk-UZSNFLDQ.js";
12
- import "./chunk-PDOVISJO.js";
12
+ import "./chunk-SN6BFW6M.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/command-protection-hook.ts
@@ -13,12 +13,12 @@ import {
13
13
  recoverCompletedTurn,
14
14
  spawnMuseMsp,
15
15
  startMuseSession
16
- } from "./chunk-GZOEQDNU.js";
16
+ } from "./chunk-72QTOULU.js";
17
17
  import {
18
18
  AppServerProcess,
19
19
  buildCodexAgentEnv
20
- } from "./chunk-LXYTFVJE.js";
21
- import "./chunk-YNF24JFF.js";
20
+ } from "./chunk-ZPY6BKYZ.js";
21
+ import "./chunk-2XBQR37E.js";
22
22
  import {
23
23
  AGENT,
24
24
  OPENCODE_GO_PROVIDER,
@@ -28,7 +28,7 @@ import {
28
28
  headlessAgentUsagePath,
29
29
  isRecord,
30
30
  withTimeout
31
- } from "./chunk-PDOVISJO.js";
31
+ } from "./chunk-SN6BFW6M.js";
32
32
  import "./chunk-VEQXQN22.js";
33
33
 
34
34
  // 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-7A3Q4LXV.js";
30
+ } from "./chunk-3JIKIW2Z.js";
31
31
  import {
32
32
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
33
33
  AGENT_MESSAGE_DELTA_METHOD,
@@ -64,10 +64,10 @@ import {
64
64
  spawnMuseMsp,
65
65
  startMuseSession,
66
66
  uuidV7
67
- } from "./chunk-GZOEQDNU.js";
67
+ } from "./chunk-72QTOULU.js";
68
68
  import {
69
69
  publishedPullRequestUrls
70
- } from "./chunk-DWYHWMAY.js";
70
+ } from "./chunk-VGJ6K5NJ.js";
71
71
  import {
72
72
  ACCOUNT_RATE_LIMITS_READ_METHOD,
73
73
  AsyncLock,
@@ -130,7 +130,7 @@ import {
130
130
  timestampFromSeconds,
131
131
  upsertCredentialFileLines,
132
132
  writeSecureCredentialFile
133
- } from "./chunk-CYCT72EA.js";
133
+ } from "./chunk-KP56JJDO.js";
134
134
  import {
135
135
  ENGINE_ENV,
136
136
  monolithRequest,
@@ -139,15 +139,15 @@ import {
139
139
  reloadEngineEnv,
140
140
  resolveDiffBase,
141
141
  setAgentCredentialSnapshot
142
- } from "./chunk-BHRLJAIC.js";
142
+ } from "./chunk-AUFQ2A3K.js";
143
143
  import {
144
144
  getCodexModelProvider
145
- } from "./chunk-LXYTFVJE.js";
145
+ } from "./chunk-ZPY6BKYZ.js";
146
146
  import {
147
147
  SUBPROCESS_MAX_BUFFER,
148
148
  execAsync,
149
149
  execFileAsync
150
- } from "./chunk-YNF24JFF.js";
150
+ } from "./chunk-2XBQR37E.js";
151
151
  import {
152
152
  isRecord as isRecord2
153
153
  } from "./chunk-UZSNFLDQ.js";
@@ -374,7 +374,7 @@ import {
374
374
  workspaceTokenRequestSchema,
375
375
  workspaceTokenResponseSchema,
376
376
  wrapInTag
377
- } from "./chunk-PDOVISJO.js";
377
+ } from "./chunk-SN6BFW6M.js";
378
378
  import {
379
379
  cloneMcpConfig,
380
380
  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-DWYHWMAY.js";
6
+ } from "./chunk-VGJ6K5NJ.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
10
  import {
11
11
  shouldRefreshPullRequests
12
- } from "./chunk-PDOVISJO.js";
12
+ } from "./chunk-SN6BFW6M.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/services/post-tool-pr-notifier.ts
@@ -9,7 +9,7 @@ import {
9
9
  spawnSubagentRequestSchema,
10
10
  subagentResponseSchema,
11
11
  waitSubagentRequestSchema
12
- } from "./chunk-PDOVISJO.js";
12
+ } from "./chunk-SN6BFW6M.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/subagent-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.1155",
3
+ "version": "0.1.1157",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",