replicas-cli 0.3.665 → 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.
- package/dist/index.cjs +19 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -24312,17 +24312,13 @@ var init_chat_kind = __esm({
|
|
|
24312
24312
|
});
|
|
24313
24313
|
|
|
24314
24314
|
// ../shared/src/routes/reviews.ts
|
|
24315
|
-
var
|
|
24315
|
+
var PULL_REQUEST_COMMENT_DESTINATIONS, diffSideSchema, createPullRequestCommentRequestSchema, PULL_REQUEST_REVIEW_EVENTS, submitPullRequestReviewRequestSchema, resolvePullRequestConflictsRequestSchema, updatePullRequestReviewersRequestSchema, text4, optionalText2, pullRequestTourSchema;
|
|
24316
24316
|
var init_reviews = __esm({
|
|
24317
24317
|
"../shared/src/routes/reviews.ts"() {
|
|
24318
24318
|
"use strict";
|
|
24319
24319
|
init_zod();
|
|
24320
24320
|
init_chat_kind();
|
|
24321
24321
|
init_urls();
|
|
24322
|
-
listOwnedPullRequestsQuerySchema = external_exports.union([
|
|
24323
|
-
external_exports.strictObject({ manager_id: external_exports.string().uuid() }),
|
|
24324
|
-
external_exports.strictObject({ user_id: external_exports.string().uuid(), own: external_exports.enum(["true", "false"]).optional() })
|
|
24325
|
-
]);
|
|
24326
24322
|
PULL_REQUEST_COMMENT_DESTINATIONS = ["comment", "review", "agent"];
|
|
24327
24323
|
diffSideSchema = external_exports.enum(["additions", "deletions"]);
|
|
24328
24324
|
createPullRequestCommentRequestSchema = external_exports.object({
|
|
@@ -28664,6 +28660,8 @@ If the org hasn't connected GitHub or GitLab yet, point the user at the integrat
|
|
|
28664
28660
|
|
|
28665
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.
|
|
28666
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
|
+
|
|
28667
28665
|
## When NOT to use the CLI
|
|
28668
28666
|
|
|
28669
28667
|
- **Don't use the CLI to reach into other tools' state** (Linear, Slack, GitHub) \u2014 those have dedicated skill references in this directory.
|
|
@@ -29780,7 +29778,7 @@ var init_environment_config = __esm({
|
|
|
29780
29778
|
});
|
|
29781
29779
|
|
|
29782
29780
|
// ../shared/src/routes/environment-config-source.ts
|
|
29783
|
-
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;
|
|
29784
29782
|
var init_environment_config_source = __esm({
|
|
29785
29783
|
"../shared/src/routes/environment-config-source.ts"() {
|
|
29786
29784
|
"use strict";
|
|
@@ -29824,6 +29822,7 @@ var init_environment_config_source = __esm({
|
|
|
29824
29822
|
}).refine((input2) => input2.file ? !input2.repository_id && !input2.commit_sha : !!input2.commit_sha, {
|
|
29825
29823
|
message: "File configuration requires file contents; Git configuration requires a reviewed commit"
|
|
29826
29824
|
});
|
|
29825
|
+
updateEnvironmentConfigSourceRequestSchema = external_exports.strictObject({ auto_apply: external_exports.boolean() });
|
|
29827
29826
|
validateEnvironmentConfigRequestSchema = external_exports.strictObject({ environment: replicasEnvironmentConfigSchema });
|
|
29828
29827
|
}
|
|
29829
29828
|
});
|
|
@@ -29846,7 +29845,7 @@ var init_environment_inheritance = __esm({
|
|
|
29846
29845
|
});
|
|
29847
29846
|
|
|
29848
29847
|
// ../shared/src/replicas-mcp.ts
|
|
29849
|
-
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;
|
|
29850
29849
|
var init_replicas_mcp = __esm({
|
|
29851
29850
|
"../shared/src/replicas-mcp.ts"() {
|
|
29852
29851
|
"use strict";
|
|
@@ -29974,6 +29973,7 @@ var init_replicas_mcp = __esm({
|
|
|
29974
29973
|
createEnvironmentDeviceToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
29975
29974
|
previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
29976
29975
|
applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
29976
|
+
updateEnvironmentConfigSourceToolInputSchema = updateEnvironmentConfigSourceRequestSchema.extend(environmentMcpPath);
|
|
29977
29977
|
}
|
|
29978
29978
|
});
|
|
29979
29979
|
|
|
@@ -43413,7 +43413,7 @@ var CLI_VERSION;
|
|
|
43413
43413
|
var init_cli_version = __esm({
|
|
43414
43414
|
"../shared/src/cli-version.ts"() {
|
|
43415
43415
|
"use strict";
|
|
43416
|
-
CLI_VERSION = "0.3.
|
|
43416
|
+
CLI_VERSION = "0.3.667";
|
|
43417
43417
|
}
|
|
43418
43418
|
});
|
|
43419
43419
|
|
|
@@ -61392,6 +61392,7 @@ function printSource({ source }) {
|
|
|
61392
61392
|
console.log(source.kind === "file" ? `${source.filename} @ ${source.file_sha}` : `${source.repository_name}/${source.filename} @ ${source.commit_sha}`);
|
|
61393
61393
|
if (source.source_url) console.log(source.source_url);
|
|
61394
61394
|
console.log(`Synced: ${source.synced_at}`);
|
|
61395
|
+
if (source.kind !== "file") console.log(`Automatic apply: ${source.auto_apply ? "on" : "off"}`);
|
|
61395
61396
|
console.log(`Managed settings: ${source.managed.fields.join(", ") || "(none)"}`);
|
|
61396
61397
|
console.log(`Managed variables: ${source.managed.variables.join(", ") || "(none)"}`);
|
|
61397
61398
|
console.log(`Managed MCPs: ${source.managed.mcps.join(", ") || "(none)"}`);
|
|
@@ -61494,6 +61495,15 @@ async function environmentConfigDisconnectCommand(environment2, options) {
|
|
|
61494
61495
|
console.log("Configuration source disconnected. Current settings preserved.");
|
|
61495
61496
|
});
|
|
61496
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
|
+
}
|
|
61497
61507
|
var import_chalk32, import_promises2, import_node_path4;
|
|
61498
61508
|
var init_environment_config2 = __esm({
|
|
61499
61509
|
"src/commands/environment-config.ts"() {
|
|
@@ -62811,6 +62821,7 @@ var init_src2 = __esm({
|
|
|
62811
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));
|
|
62812
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));
|
|
62813
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));
|
|
62814
62825
|
envConfig.command("disconnect <env>").description("Disconnect Git configuration and preserve current settings").option("-y, --yes", "Disconnect without a confirmation prompt").action(run(environmentConfigDisconnectCommand));
|
|
62815
62826
|
envVars = environment.command("vars").description("Manage environment variables");
|
|
62816
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));
|