replicas-cli 0.3.666 → 0.3.667

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.
Files changed (2) hide show
  1. package/dist/index.cjs +18 -3
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -28660,6 +28660,8 @@ If the org hasn't connected GitHub or GitLab yet, point the user at the integrat
28660
28660
 
28661
28661
  \`replicas init\` creates a starter config in the current directory. \`-y\` writes YAML, \`-f\` overwrites an existing file. This file controls per-repo workspace setup (warm hooks, start hooks, organization scoping for GitHub triggers). When the user asks to "set up Replicas in this repo", run \`replicas init\` and then edit the generated file based on what they need.
28662
28662
 
28663
+ For linked Git environment configuration, automatic apply is opt-in: \`replicas environment config auto-apply <env> on\` enables applying default-branch pushes, and \`off\` restores manual review/apply. Enable it only when the user asks. Local-file sources do not auto-apply. Validation or missing-secret failures preserve applied settings and appear in \`replicas environment config get <env>\` as \`last_error\`; fix the source/secrets and sync or push again. This uses repository webhook events and applies configuration directly without starting an agent workspace.
28664
+
28663
28665
  ## When NOT to use the CLI
28664
28666
 
28665
28667
  - **Don't use the CLI to reach into other tools' state** (Linear, Slack, GitHub) \u2014 those have dedicated skill references in this directory.
@@ -29776,7 +29778,7 @@ var init_environment_config = __esm({
29776
29778
  });
29777
29779
 
29778
29780
  // ../shared/src/routes/environment-config-source.ts
29779
- var ENVIRONMENT_CONFIG_PREFERENCES, ENVIRONMENT_CONFIG_SETTING_FIELDS, environmentConfigLocationSchema, sourceInput, previewEnvironmentConfigSourceRequestSchema, applyEnvironmentConfigSourceRequestSchema, validateEnvironmentConfigRequestSchema;
29781
+ var ENVIRONMENT_CONFIG_PREFERENCES, ENVIRONMENT_CONFIG_SETTING_FIELDS, environmentConfigLocationSchema, sourceInput, previewEnvironmentConfigSourceRequestSchema, applyEnvironmentConfigSourceRequestSchema, updateEnvironmentConfigSourceRequestSchema, validateEnvironmentConfigRequestSchema;
29780
29782
  var init_environment_config_source = __esm({
29781
29783
  "../shared/src/routes/environment-config-source.ts"() {
29782
29784
  "use strict";
@@ -29820,6 +29822,7 @@ var init_environment_config_source = __esm({
29820
29822
  }).refine((input2) => input2.file ? !input2.repository_id && !input2.commit_sha : !!input2.commit_sha, {
29821
29823
  message: "File configuration requires file contents; Git configuration requires a reviewed commit"
29822
29824
  });
29825
+ updateEnvironmentConfigSourceRequestSchema = external_exports.strictObject({ auto_apply: external_exports.boolean() });
29823
29826
  validateEnvironmentConfigRequestSchema = external_exports.strictObject({ environment: replicasEnvironmentConfigSchema });
29824
29827
  }
29825
29828
  });
@@ -29842,7 +29845,7 @@ var init_environment_inheritance = __esm({
29842
29845
  });
29843
29846
 
29844
29847
  // ../shared/src/replicas-mcp.ts
29845
- var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title2, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, forkEnvironmentToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
29848
+ var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title2, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, forkEnvironmentToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema, updateEnvironmentConfigSourceToolInputSchema;
29846
29849
  var init_replicas_mcp = __esm({
29847
29850
  "../shared/src/replicas-mcp.ts"() {
29848
29851
  "use strict";
@@ -29970,6 +29973,7 @@ var init_replicas_mcp = __esm({
29970
29973
  createEnvironmentDeviceToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
29971
29974
  previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
29972
29975
  applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
29976
+ updateEnvironmentConfigSourceToolInputSchema = updateEnvironmentConfigSourceRequestSchema.extend(environmentMcpPath);
29973
29977
  }
29974
29978
  });
29975
29979
 
@@ -43409,7 +43413,7 @@ var CLI_VERSION;
43409
43413
  var init_cli_version = __esm({
43410
43414
  "../shared/src/cli-version.ts"() {
43411
43415
  "use strict";
43412
- CLI_VERSION = "0.3.666";
43416
+ CLI_VERSION = "0.3.667";
43413
43417
  }
43414
43418
  });
43415
43419
 
@@ -61388,6 +61392,7 @@ function printSource({ source }) {
61388
61392
  console.log(source.kind === "file" ? `${source.filename} @ ${source.file_sha}` : `${source.repository_name}/${source.filename} @ ${source.commit_sha}`);
61389
61393
  if (source.source_url) console.log(source.source_url);
61390
61394
  console.log(`Synced: ${source.synced_at}`);
61395
+ if (source.kind !== "file") console.log(`Automatic apply: ${source.auto_apply ? "on" : "off"}`);
61391
61396
  console.log(`Managed settings: ${source.managed.fields.join(", ") || "(none)"}`);
61392
61397
  console.log(`Managed variables: ${source.managed.variables.join(", ") || "(none)"}`);
61393
61398
  console.log(`Managed MCPs: ${source.managed.mcps.join(", ") || "(none)"}`);
@@ -61490,6 +61495,15 @@ async function environmentConfigDisconnectCommand(environment2, options) {
61490
61495
  console.log("Configuration source disconnected. Current settings preserved.");
61491
61496
  });
61492
61497
  }
61498
+ async function environmentConfigAutoApplyCommand(environment2, mode) {
61499
+ ensureOrgApiAuthenticated();
61500
+ if (mode !== "on" && mode !== "off") throw new Error("Use on or off");
61501
+ const id = await resolveEnvironmentId(environment2);
61502
+ output2(await orgAuthenticatedFetch(`/v1/environments/${id}/config-source`, {
61503
+ method: "PATCH",
61504
+ body: { auto_apply: mode === "on" }
61505
+ }), printSource);
61506
+ }
61493
61507
  var import_chalk32, import_promises2, import_node_path4;
61494
61508
  var init_environment_config2 = __esm({
61495
61509
  "src/commands/environment-config.ts"() {
@@ -62807,6 +62821,7 @@ var init_src2 = __esm({
62807
62821
  envConfig.command("apply <env>").description("Preview and apply environment configuration from a local file").requiredOption("--file <path>", "Read the environment block from a local JSON or YAML file").option("-y, --yes", "Apply the preview without a confirmation prompt").action(run(environmentConfigApplyCommand));
62808
62822
  envConfig.command("link <env>").description("Preview, link, and apply configuration from a repository").option("-r, --repository <name-or-id>", "Repository containing the configuration").option("-y, --yes", "Apply the preview without a confirmation prompt").action(run(environmentConfigLinkCommand));
62809
62823
  envConfig.command("sync <env>").description("Preview and apply changes from the linked configuration").option("-y, --yes", "Apply the preview without a confirmation prompt").action(run(environmentConfigSyncCommand));
62824
+ envConfig.command("auto-apply <env> <on|off>").description("Enable or disable automatic application of default-branch configuration changes").action(run(environmentConfigAutoApplyCommand));
62810
62825
  envConfig.command("disconnect <env>").description("Disconnect Git configuration and preserve current settings").option("-y, --yes", "Disconnect without a confirmation prompt").action(run(environmentConfigDisconnectCommand));
62811
62826
  envVars = environment.command("vars").description("Manage environment variables");
62812
62827
  envVars.command("list <env>").description("List variables in an environment (values masked by default)").option("--reveal", "Show full variable values instead of masking them").action(run(envVarsListCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.666",
3
+ "version": "0.3.667",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {