replicas-cli 0.3.649 → 0.3.651
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 +55 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -26336,9 +26336,52 @@ function parsePosixEnv(content) {
|
|
|
26336
26336
|
}
|
|
26337
26337
|
return { values: result, unsetKeys };
|
|
26338
26338
|
}
|
|
26339
|
+
var REPLICAS_RUNTIME_ENV_KEYS, RETIRED_WORKSPACE_ENV_KEYS, RESERVED_REPLICAS_ENV_KEYS;
|
|
26339
26340
|
var init_runtime_env = __esm({
|
|
26340
26341
|
"../shared/src/runtime-env.ts"() {
|
|
26341
26342
|
"use strict";
|
|
26343
|
+
REPLICAS_RUNTIME_ENV_KEYS = [
|
|
26344
|
+
"REPLICAS_ENGINE_PORT",
|
|
26345
|
+
"REPLICAS_ENGINE_STATE_DIR",
|
|
26346
|
+
"REPLICAS_ENGINE_SECRET",
|
|
26347
|
+
"REPLICAS_MONOLITH_URL",
|
|
26348
|
+
"REPLICAS_WORKSPACE_ID",
|
|
26349
|
+
"REPLICAS_DIR",
|
|
26350
|
+
"REPLICAS_CANVAS_DIR",
|
|
26351
|
+
"REPLICAS_RUNTIME_ENV_FILE",
|
|
26352
|
+
"REPLICAS_DESKTOP_STREAM_ICE_SERVERS",
|
|
26353
|
+
"REPLICAS_ENVIRONMENT_SETUP_RUN_ID",
|
|
26354
|
+
"REPLICAS_SECURITY_RUN_ID",
|
|
26355
|
+
"REPLICAS_SECURITY_SANDBOX_ROLE",
|
|
26356
|
+
"REPLICAS_SECURITY_CHECKS_VERIFY_SECRETS",
|
|
26357
|
+
"REPLICAS_DISABLE_AUTO_START_HOOKS",
|
|
26358
|
+
"REPLICAS_LINEAR_SESSION_ID",
|
|
26359
|
+
"REPLICAS_LINEAR_ACCESS_TOKEN",
|
|
26360
|
+
"REPLICAS_LINEAR_ACCESS_CONFIGURED",
|
|
26361
|
+
"REPLICAS_SLACK_BOT_TOKEN",
|
|
26362
|
+
"REPLICAS_SLACK_ACCESS_CONFIGURED",
|
|
26363
|
+
"REPLICAS_SLACK_CHANNEL_ID",
|
|
26364
|
+
"REPLICAS_SLACK_THREAD_TS",
|
|
26365
|
+
"REPLICAS_GPU_DISABLED",
|
|
26366
|
+
"REPLICAS_MACOS_ENABLED",
|
|
26367
|
+
"REPLICAS_SCOUT",
|
|
26368
|
+
"REPLICAS_CLAUDE_AUTH_METHOD",
|
|
26369
|
+
"REPLICAS_CODEX_AUTH_METHOD",
|
|
26370
|
+
"REPLICAS_MUSE_AUTH_METHOD",
|
|
26371
|
+
"REPLICAS_AGENT_CREDENTIALS",
|
|
26372
|
+
"REPLICAS_ENV_SYSTEM_PROMPT",
|
|
26373
|
+
"REPLICAS_ENV_START_HOOK",
|
|
26374
|
+
"REPLICAS_REPOSITORY_HOOKS_DISABLED",
|
|
26375
|
+
"REPLICAS_ENV_DEVICES",
|
|
26376
|
+
"REPLICAS_GUARD_NETWORK_MODE"
|
|
26377
|
+
];
|
|
26378
|
+
RETIRED_WORKSPACE_ENV_KEYS = /* @__PURE__ */ new Set([
|
|
26379
|
+
"REPLICAS_PROXY_DB_URL"
|
|
26380
|
+
]);
|
|
26381
|
+
RESERVED_REPLICAS_ENV_KEYS = /* @__PURE__ */ new Set([
|
|
26382
|
+
...REPLICAS_RUNTIME_ENV_KEYS,
|
|
26383
|
+
...RETIRED_WORKSPACE_ENV_KEYS
|
|
26384
|
+
]);
|
|
26342
26385
|
}
|
|
26343
26386
|
});
|
|
26344
26387
|
|
|
@@ -43327,7 +43370,7 @@ var CLI_VERSION;
|
|
|
43327
43370
|
var init_cli_version = __esm({
|
|
43328
43371
|
"../shared/src/cli-version.ts"() {
|
|
43329
43372
|
"use strict";
|
|
43330
|
-
CLI_VERSION = "0.3.
|
|
43373
|
+
CLI_VERSION = "0.3.651";
|
|
43331
43374
|
}
|
|
43332
43375
|
});
|
|
43333
43376
|
|
|
@@ -54407,6 +54450,7 @@ var init_variable_requests = __esm({
|
|
|
54407
54450
|
"use strict";
|
|
54408
54451
|
init_zod();
|
|
54409
54452
|
init_environment_setups();
|
|
54453
|
+
init_runtime_env();
|
|
54410
54454
|
VARIABLE_REQUEST_WAIT = { defaultMs: 10 * 6e4, maxMs: 30 * 6e4, pollMs: 3e3, waiterStaleMs: 15e3 };
|
|
54411
54455
|
VARIABLE_REQUEST_DESTINATIONS = ["environment", "workspace"];
|
|
54412
54456
|
requestedVariableSchema = external_exports.object({
|
|
@@ -54416,7 +54460,12 @@ var init_variable_requests = __esm({
|
|
|
54416
54460
|
});
|
|
54417
54461
|
requestedVariablesSchema = external_exports.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");
|
|
54418
54462
|
createVariableRequestSchema = external_exports.object({
|
|
54419
|
-
variables: requestedVariablesSchema,
|
|
54463
|
+
variables: requestedVariablesSchema.superRefine((variables, ctx) => {
|
|
54464
|
+
const reserved = variables.find((variable) => RESERVED_REPLICAS_ENV_KEYS.has(variable.key))?.key;
|
|
54465
|
+
if (reserved) {
|
|
54466
|
+
ctx.addIssue({ code: "custom", message: `${reserved} is reserved by Replicas and cannot be requested` });
|
|
54467
|
+
}
|
|
54468
|
+
}),
|
|
54420
54469
|
reason: external_exports.string().trim().max(500).nullish().transform((value) => value || null),
|
|
54421
54470
|
wait: external_exports.boolean().default(true)
|
|
54422
54471
|
});
|
|
@@ -57572,6 +57621,8 @@ async function envVarsRequestCommand(requiredKeys, options) {
|
|
|
57572
57621
|
if (keys.length === 0) throw new Error("Name at least one variable to request");
|
|
57573
57622
|
const invalid = keys.find((key2) => !VARIABLE_KEY_RE.test(key2));
|
|
57574
57623
|
if (invalid) throw new Error(`${invalid} is not a valid environment variable name`);
|
|
57624
|
+
const reserved = keys.find((key2) => RESERVED_REPLICAS_ENV_KEYS.has(key2));
|
|
57625
|
+
if (reserved) throw new Error(`${reserved} is reserved by Replicas and cannot be requested. Use a different variable name.`);
|
|
57575
57626
|
const timeoutMs = parseRequestTimeout(options.timeout);
|
|
57576
57627
|
const readRuntimeEnv = () => import_fs5.default.existsSync(RUNTIME_ENV_FILE) ? import_fs5.default.readFileSync(RUNTIME_ENV_FILE, "utf8") : "";
|
|
57577
57628
|
const local = parsePosixEnvFile(readRuntimeEnv());
|
|
@@ -57607,7 +57658,7 @@ async function envVarsRequestCommand(requiredKeys, options) {
|
|
|
57607
57658
|
let exported = [];
|
|
57608
57659
|
if (request2.status === "provided") {
|
|
57609
57660
|
const loaded = await orgAuthenticatedFetch(`/v1/variable-requests/${request2.id}/load`, { method: "POST" });
|
|
57610
|
-
const variables = loaded.variables.filter((variable) => !variable.key
|
|
57661
|
+
const variables = loaded.variables.filter((variable) => !RESERVED_REPLICAS_ENV_KEYS.has(variable.key));
|
|
57611
57662
|
const existing = parsePosixEnv(readRuntimeEnv());
|
|
57612
57663
|
const env = { ...existing.values, ...Object.fromEntries(variables.map((variable) => [variable.key, variable.value])) };
|
|
57613
57664
|
import_fs5.default.mkdirSync(import_path6.default.dirname(RUNTIME_ENV_FILE), { recursive: true });
|
|
@@ -62577,7 +62628,7 @@ var init_src2 = __esm({
|
|
|
62577
62628
|
issue2.command("create <title>").description("File an issue").option("-d, --description <markdown>", "What is wrong or wanted, with the evidence").option("--description-file <path>", "Read the description from a file (- for stdin)").option("-s, --status <status>", `${ISSUE_STATUSES.join(", ")} (default: backlog)`).option("-p, --priority <priority>", ISSUE_PRIORITIES.join(", ")).option("--parent <issue>", "Make it a sub-issue of this issue").option("-a, --assign <who>", "Assignee: user:<email>, workspace:<id> or me (repeatable)", collect, []).option("--manager <workspace>", "Manager whose issues it joins, as workspace:<id> (default: yours, inside a Manager or its ship); 'none' for none").option("--attach <file>", "Upload and embed a screenshot or recording (repeatable)", collect, []).action(run(issueCreateCommand));
|
|
62578
62629
|
issue2.command("update <issue>").description("Change the title, description, status, priority or parent").option("-t, --title <title>", "New title").option("-d, --description <markdown>", "Replace the whole description").option("--description-file <path>", "Replace the description from a file (- for stdin)").option("-s, --status <status>", ISSUE_STATUSES.join(", ")).option("-p, --priority <priority>", ISSUE_PRIORITIES.join(", ")).option("--parent <issue>", "New parent issue, or 'none'").option("--attach <file>", "Upload and embed at the end of the description (repeatable)", collect, []).action(run(issueUpdateCommand));
|
|
62579
62630
|
issue2.command("view <issue>").description("Show an issue with its parent, relations, sub-issues, pull requests, comments and activity").action(run(issueViewCommand));
|
|
62580
|
-
issue2.command("list").description("List issues, newest first").option("-q, --query <text>", "Search titles and descriptions").option("-s, --status <statuses>", "Comma-separated statuses").option("-p, --priority <priorities>", "Comma-separated priorities").option("--mine", "Assigned to you (this workspace inside one)").option("--assignee <actor>", "user:<email>, workspace:<id> or me; comma-separate to match any").option("--manager <workspace>", "
|
|
62631
|
+
issue2.command("list").description("List issues, newest first").option("-q, --query <text>", "Search titles and descriptions").option("-s, --status <statuses>", "Comma-separated statuses").option("-p, --priority <priorities>", "Comma-separated priorities").option("--mine", "Assigned to you (this workspace inside one)").option("--assignee <actor>", "user:<email>, workspace:<id> or me; comma-separate to match any").option("--manager <workspace>", "Issues a Manager or one of its ships is assigned or subscribed to, as workspace:<id>").option("--parent <issue>", "Sub-issues of this issue; 'none' for top-level only").option("--archived", "Include archived issues").option("-l, --limit <n>", "Page size (default 50, max 200)").action(run(issueListCommand));
|
|
62581
62632
|
issue2.command("search <query>").description("Search issues by text or identifier").action(run((query) => issueListCommand({ query })));
|
|
62582
62633
|
issue2.command("comment <issue> [body]").description("Comment on an issue. @Name or @email mentions a person or workspace").option("-f, --file <path>", "Read the comment from a file (- for stdin)").option("--attach <file>", "Upload and embed a screenshot or recording (repeatable)", collect, []).action(run(issueCommentCommand));
|
|
62583
62634
|
issue2.command("assign <issue> <who>").description("Assign user:<email>, workspace:<id> or me").action(run(issueActorCommand(ISSUE_COMMANDS.assign, "Assigned")));
|