@tryarcanist/cli 0.1.313 → 0.1.315
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.js +18 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7370,7 +7370,7 @@ import { Command } from "commander";
|
|
|
7370
7370
|
// package.json
|
|
7371
7371
|
var package_default = {
|
|
7372
7372
|
name: "@tryarcanist/cli",
|
|
7373
|
-
version: "0.1.
|
|
7373
|
+
version: "0.1.315",
|
|
7374
7374
|
description: "CLI for Arcanist - create and manage coding agent sessions",
|
|
7375
7375
|
type: "module",
|
|
7376
7376
|
bin: {
|
|
@@ -23942,8 +23942,20 @@ async function repoBranchesCommand(repoArg, options = {}, command) {
|
|
|
23942
23942
|
// src/commands/review.ts
|
|
23943
23943
|
var PR_REVIEW_POLL_INTERVAL_MS = 1e4;
|
|
23944
23944
|
var PR_REVIEW_WAIT_TIMEOUT_MS = 30 * 60 * 1e3;
|
|
23945
|
+
var SANDBOX_RUNTIME_BACKENDS = {
|
|
23946
|
+
e2b: "e2b_cloud",
|
|
23947
|
+
modal: "modal_cloud"
|
|
23948
|
+
};
|
|
23949
|
+
function resolveSandboxRuntimeBackend(runtime) {
|
|
23950
|
+
if (runtime === void 0) return null;
|
|
23951
|
+
if (runtime !== "modal" && runtime !== "e2b") {
|
|
23952
|
+
throw new CliError("user", "Sandbox runtime must be modal or e2b.");
|
|
23953
|
+
}
|
|
23954
|
+
return SANDBOX_RUNTIME_BACKENDS[runtime];
|
|
23955
|
+
}
|
|
23945
23956
|
async function reviewCommand(prUrl, options = {}, command) {
|
|
23946
23957
|
assertArcanistSessionMutationAllowed("review");
|
|
23958
|
+
const sandboxRuntimeBackend = resolveSandboxRuntimeBackend(options.sandboxRuntime);
|
|
23947
23959
|
const pollIntervalMs = options.wait ? parsePollInterval(options.pollInterval, { defaultMs: PR_REVIEW_POLL_INTERVAL_MS, maxMs: null }) : null;
|
|
23948
23960
|
const { config: config2 } = resolveBusinessContext(command, options);
|
|
23949
23961
|
const trigger = await apiFetch(config2, "/api/pr-reviews", {
|
|
@@ -23953,7 +23965,8 @@ async function reviewCommand(prUrl, options = {}, command) {
|
|
|
23953
23965
|
...options.focus ? { focus: options.focus } : {},
|
|
23954
23966
|
// Send an explicitly passed model even when empty (e.g. --model "$VAR" with an
|
|
23955
23967
|
// unset VAR) so the server rejects it as invalid instead of silently routing.
|
|
23956
|
-
...options.model !== void 0 ? { model: options.model } : {}
|
|
23968
|
+
...options.model !== void 0 ? { model: options.model } : {},
|
|
23969
|
+
...sandboxRuntimeBackend !== null ? { sandboxRuntimeBackend } : {}
|
|
23957
23970
|
})
|
|
23958
23971
|
});
|
|
23959
23972
|
if (trigger.skipped && trigger.reason === "duplicate_diff") {
|
|
@@ -24037,14 +24050,7 @@ var MAX_ENV_KEY_CHARS = 80;
|
|
|
24037
24050
|
var MAX_ENV_VALUE_BYTES = 2 * 1024;
|
|
24038
24051
|
var MAX_ENV_VARS = 50;
|
|
24039
24052
|
var SECRET_PATTERN = /\b(secret|token|password|passwd|private_key|private-key|access_key|access-key|client_secret|client-secret)\b|BEGIN PRIVATE KEY/i;
|
|
24040
|
-
var FORBIDDEN_PATHS = [
|
|
24041
|
-
"/app",
|
|
24042
|
-
"/app/start-bridge.sh",
|
|
24043
|
-
"/app/bridge",
|
|
24044
|
-
"/app/scripts",
|
|
24045
|
-
"/workspace",
|
|
24046
|
-
"/usr/local/sbin/arcanist-enforce-egress"
|
|
24047
|
-
];
|
|
24053
|
+
var FORBIDDEN_PATHS = ["/app", "/app/start-bridge.sh", "/app/bridge", "/app/scripts", "/workspace"];
|
|
24048
24054
|
var FORBIDDEN_TARGETING_OPS = /\b(rm|mv|cp|ln|chmod|chown|truncate|tee)\b|\bsed\s+-i\b|\bcat\s*>/;
|
|
24049
24055
|
var ENV_KEY_RE = /^[A-Z_][A-Z0-9_]{0,79}$/;
|
|
24050
24056
|
var SandboxLayerValidationError = class extends Error {
|
|
@@ -27267,13 +27273,14 @@ codex.command("use <state>").description("Turn using your saved Codex subscripti
|
|
|
27267
27273
|
codex.command("status").description("Show Codex subscription availability and whether auth is saved").action((options, command) => codexStatusCommand(options, command));
|
|
27268
27274
|
codex.command("logout").description("Deactivate the selector and remove the stored Codex subscription auth for your user").action((options, command) => codexLogoutCommand(options, command));
|
|
27269
27275
|
var sessions = program.command("sessions").description("Session commands");
|
|
27270
|
-
program.command("review <pr-url>").description("Run a Zeus review for a GitHub pull request").option("--focus <text>", "Focus the review on a specific concern").option("--model <model>", "Pin the reviewer model (Arcanist members only); defaults to the Codex reviewer").option("--wait", "Wait for the review and print its verdict and findings").option("--poll-interval <ms>", "Polling interval in milliseconds while waiting (default 10000)").addHelpText(
|
|
27276
|
+
program.command("review <pr-url>").description("Run a Zeus review for a GitHub pull request").option("--focus <text>", "Focus the review on a specific concern").option("--model <model>", "Pin the reviewer model (Arcanist members only); defaults to the Codex reviewer").option("--sandbox-runtime <runtime>", "Force the sandbox runtime (Arcanist members only): modal or e2b").option("--wait", "Wait for the review and print its verdict and findings").option("--poll-interval <ms>", "Polling interval in milliseconds while waiting (default 10000)").addHelpText(
|
|
27271
27277
|
"after",
|
|
27272
27278
|
`
|
|
27273
27279
|
Examples:
|
|
27274
27280
|
arcanist review https://github.com/org/repo/pull/123 --wait --json
|
|
27275
27281
|
arcanist review https://github.com/org/repo/pull/123 --focus "Check auth" --wait
|
|
27276
27282
|
arcanist review https://github.com/org/repo/pull/123 --model gpt-5.5 --wait
|
|
27283
|
+
arcanist review https://github.com/org/repo/pull/123 --sandbox-runtime modal --wait
|
|
27277
27284
|
|
|
27278
27285
|
Zeus reviews with a pinned Codex reviewer model. --model pins a different reviewer model
|
|
27279
27286
|
instead (members only).
|