@tryarcanist/cli 0.1.153 → 0.1.155
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 +12 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -323,6 +323,16 @@ function applyColorEnvironment(options) {
|
|
|
323
323
|
function randomIdempotencyKey() {
|
|
324
324
|
return randomUUID();
|
|
325
325
|
}
|
|
326
|
+
function assertArcanistSessionMutationAllowed(subcommand) {
|
|
327
|
+
if (process.env.ARCANIST_AGENT_ROLE?.trim() !== "verification") return;
|
|
328
|
+
throw new CliError(
|
|
329
|
+
"user",
|
|
330
|
+
`\`arcanist sessions ${subcommand}\` is disabled inside verification sessions because nested Arcanist sessions are not observable to the verifier.`,
|
|
331
|
+
{
|
|
332
|
+
hint: "Use direct local/sandbox evidence instead, or report a verification gap rather than spawning another Arcanist session."
|
|
333
|
+
}
|
|
334
|
+
);
|
|
335
|
+
}
|
|
326
336
|
function normalizePromptChunk(chunk, carry) {
|
|
327
337
|
const raw = carry + (Buffer.isBuffer(chunk) ? chunk.toString("utf8") : chunk);
|
|
328
338
|
let text = "";
|
|
@@ -2679,6 +2689,7 @@ async function fetchSettledSessionResultFields(config, sessionId, pollIntervalMs
|
|
|
2679
2689
|
}
|
|
2680
2690
|
async function createCommand(repoUrl, promptArg, options, command) {
|
|
2681
2691
|
const runtime = getRuntimeOptions(command, options);
|
|
2692
|
+
assertArcanistSessionMutationAllowed("create");
|
|
2682
2693
|
const config = requireConfig(runtime);
|
|
2683
2694
|
let agentRuntimeBackend = CODEX_AGENT_RUNTIME_BACKEND;
|
|
2684
2695
|
if (options.backend !== void 0) {
|
|
@@ -3009,6 +3020,7 @@ async function loginCommand(options, command) {
|
|
|
3009
3020
|
// src/commands/message.ts
|
|
3010
3021
|
async function messageCommand(sessionId, promptArg, options = {}, command) {
|
|
3011
3022
|
const runtime = getRuntimeOptions(command, options);
|
|
3023
|
+
assertArcanistSessionMutationAllowed("send");
|
|
3012
3024
|
const config = requireConfig(runtime);
|
|
3013
3025
|
const prompt = await resolvePromptInput(promptArg, options);
|
|
3014
3026
|
const uploadedFiles = await resolveUploadedFileOptions(options.uploadedFile);
|