replicas-cli 0.3.659 → 0.3.661
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 +43 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28427,7 +28427,7 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
28427
28427
|
|
|
28428
28428
|
Environments are the org-scoped *primitives* workspaces are built from. Each environment lists the repositories to clone (none is fine) and carries environment variables, project files, enabled skills, and MCP servers. A fork inherits everything from its parent environment and stores only its own overrides. The org's default environment is used for Scout. Slack or Linear requests that don't name one use the requester's own default environment, falling back to the org default.
|
|
28429
28429
|
|
|
28430
|
-
### List / get / create / edit / delete
|
|
28430
|
+
### List / get / create / fork / edit / delete
|
|
28431
28431
|
|
|
28432
28432
|
\`\`\`bash
|
|
28433
28433
|
replicas environment list
|
|
@@ -28436,6 +28436,8 @@ replicas environment create [name] \\
|
|
|
28436
28436
|
--description "..." \\
|
|
28437
28437
|
--repository <repo-names-or-ids> \\
|
|
28438
28438
|
--system-prompt "..."
|
|
28439
|
+
replicas environment fork <id-or-name> <name> \\
|
|
28440
|
+
[--repository <repo-names-or-ids>] [--personal]
|
|
28439
28441
|
replicas environment edit <id-or-name> \\
|
|
28440
28442
|
--name "..." --description "..." \\
|
|
28441
28443
|
--repository <repo-names-or-ids>
|
|
@@ -29821,8 +29823,25 @@ var init_environment_config_source = __esm({
|
|
|
29821
29823
|
}
|
|
29822
29824
|
});
|
|
29823
29825
|
|
|
29826
|
+
// ../shared/src/routes/environment-inheritance.ts
|
|
29827
|
+
var ENVIRONMENT_INHERITANCE_KINDS, RESET_INHERITED_KINDS, forkEnvironmentRequestSchema;
|
|
29828
|
+
var init_environment_inheritance = __esm({
|
|
29829
|
+
"../shared/src/routes/environment-inheritance.ts"() {
|
|
29830
|
+
"use strict";
|
|
29831
|
+
init_zod();
|
|
29832
|
+
ENVIRONMENT_INHERITANCE_KINDS = ["variable", "file", "mcp", "device", "skill", "skills_registry", "plugin", "integration"];
|
|
29833
|
+
RESET_INHERITED_KINDS = [...ENVIRONMENT_INHERITANCE_KINDS, "repository", "memory", "default_skills", "gpu", "mobile_testing"];
|
|
29834
|
+
forkEnvironmentRequestSchema = external_exports.object({
|
|
29835
|
+
name: external_exports.string(),
|
|
29836
|
+
description: external_exports.string().nullable().optional(),
|
|
29837
|
+
scope: external_exports.enum(["org", "user"]).optional().describe("`org` (default) or `user` for a personal fork. A personal environment only forks into `user`"),
|
|
29838
|
+
repository_ids: external_exports.array(external_exports.string()).optional().describe("Repositories to clone instead of this environment's, in checkout order. Omit to keep cloning the same ones")
|
|
29839
|
+
});
|
|
29840
|
+
}
|
|
29841
|
+
});
|
|
29842
|
+
|
|
29824
29843
|
// ../shared/src/replicas-mcp.ts
|
|
29825
|
-
var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title2, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
|
|
29844
|
+
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;
|
|
29826
29845
|
var init_replicas_mcp = __esm({
|
|
29827
29846
|
"../shared/src/replicas-mcp.ts"() {
|
|
29828
29847
|
"use strict";
|
|
@@ -29835,6 +29854,7 @@ var init_replicas_mcp = __esm({
|
|
|
29835
29854
|
init_v1();
|
|
29836
29855
|
init_environment();
|
|
29837
29856
|
init_environment_config_source();
|
|
29857
|
+
init_environment_inheritance();
|
|
29838
29858
|
init_workspaces();
|
|
29839
29859
|
init_sandbox();
|
|
29840
29860
|
REPLICAS_MCP_TOOLS = {
|
|
@@ -29945,6 +29965,7 @@ var init_replicas_mcp = __esm({
|
|
|
29945
29965
|
mcp_id: external_exports.string().describe("MCP ID"),
|
|
29946
29966
|
...updateEnvironmentMcpRequestSchema.shape
|
|
29947
29967
|
});
|
|
29968
|
+
forkEnvironmentToolInputSchema = forkEnvironmentRequestSchema.extend({ environment_id: external_exports.string().min(1).describe("Environment to fork") });
|
|
29948
29969
|
createEnvironmentDeviceToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentDeviceRequestSchema.shape });
|
|
29949
29970
|
previewEnvironmentConfigSourceToolInputSchema = previewEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
29950
29971
|
applyEnvironmentConfigSourceToolInputSchema = applyEnvironmentConfigSourceRequestSchema.safeExtend(environmentMcpPath);
|
|
@@ -43372,7 +43393,7 @@ var CLI_VERSION;
|
|
|
43372
43393
|
var init_cli_version = __esm({
|
|
43373
43394
|
"../shared/src/cli-version.ts"() {
|
|
43374
43395
|
"use strict";
|
|
43375
|
-
CLI_VERSION = "0.3.
|
|
43396
|
+
CLI_VERSION = "0.3.661";
|
|
43376
43397
|
}
|
|
43377
43398
|
});
|
|
43378
43399
|
|
|
@@ -57589,6 +57610,24 @@ Created environment: ${environment2.name}`));
|
|
|
57589
57610
|
`));
|
|
57590
57611
|
});
|
|
57591
57612
|
}
|
|
57613
|
+
async function environmentForkCommand(idOrName, name, options) {
|
|
57614
|
+
ensureOrgApiAuthenticated();
|
|
57615
|
+
if (!idOrName.trim()) throw new Error("Give the name or ID of the environment to fork.");
|
|
57616
|
+
const id = await resolveEnvironmentId(idOrName);
|
|
57617
|
+
const body2 = {
|
|
57618
|
+
name,
|
|
57619
|
+
description: options.description,
|
|
57620
|
+
scope: options.personal ? "user" : "org",
|
|
57621
|
+
repository_ids: options.repository === void 0 ? void 0 : await resolveRepositoryIds(splitList(options.repository))
|
|
57622
|
+
};
|
|
57623
|
+
const response = await orgAuthenticatedFetch(`/v1/environments/${id}/fork`, { method: "POST", body: body2 });
|
|
57624
|
+
output2(response, ({ environment: environment2 }) => {
|
|
57625
|
+
console.log(import_chalk22.default.green(`
|
|
57626
|
+
Forked ${idOrName} into ${environment2.name}`));
|
|
57627
|
+
console.log(import_chalk22.default.gray(` ID: ${environment2.id}
|
|
57628
|
+
`));
|
|
57629
|
+
});
|
|
57630
|
+
}
|
|
57592
57631
|
async function environmentEditCommand(idOrName, options) {
|
|
57593
57632
|
ensureOrgApiAuthenticated();
|
|
57594
57633
|
const id = await resolveEnvironmentId(idOrName);
|
|
@@ -62743,6 +62782,7 @@ var init_src2 = __esm({
|
|
|
62743
62782
|
environment.command("list").description("List all environments").action(run(environmentListCommand));
|
|
62744
62783
|
environment.command("get <id-or-name>").description("Get an environment by ID or name").action(run(environmentGetCommand));
|
|
62745
62784
|
environment.command("create [name]").description("Create a new environment").option("-d, --description <description>", "Environment description").option("-r, --repository <names>", "Repositories to clone (comma-separated names or IDs)").option("--system-prompt <prompt>", "System prompt for agents started in this environment").action(run(environmentCreateCommand));
|
|
62785
|
+
environment.command("fork <id-or-name> <name>").description("Create an environment that inherits another one").option("-d, --description <description>", "Environment description").option("-r, --repository <names>", "Repositories to clone instead of the source's (comma-separated names or IDs; empty string for none)").option("--personal", "Make a personal fork only you can see").action(run(environmentForkCommand));
|
|
62746
62786
|
environment.command("edit <id-or-name>").description("Edit an environment").option("-n, --name <name>", "New name").option("-d, --description <description>", "New description").option("-r, --repository <names>", "Replace the repositories (comma-separated names or IDs; empty string for none)").option("--system-prompt <prompt>", "System prompt").option("--setup-source-mode <mode>", "Which hooks run: app_and_repo, repo_only (app hooks locked), or app_only (replicas.json hooks ignored)").action(run(environmentEditCommand));
|
|
62747
62787
|
environment.command("delete <id-or-name>").description("Delete an environment").option("-f, --force", "Skip confirmation prompt").action(run(environmentDeleteCommand));
|
|
62748
62788
|
envConfig = environment.command("config").description("Link and sync environment configuration from Git");
|