arisa 2.3.18 → 2.3.19
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/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/**
|
|
3
|
+
* Diagnostic: prints the exact su/bun commands that Arisa would execute,
|
|
4
|
+
* ready to copy-paste into a terminal.
|
|
5
|
+
*/
|
|
6
|
+
import { buildBunWrappedAgentCliCommand } from "../src/shared/ai-cli";
|
|
7
|
+
|
|
8
|
+
function printable(cmd: string[]): string {
|
|
9
|
+
if (cmd[0] === "su") {
|
|
10
|
+
// cmd = ["su", "arisa", "-s", "/bin/bash", "-c", "<bash script>"]
|
|
11
|
+
// Wrap the -c argument in double quotes — safe because shellEscape only uses single quotes
|
|
12
|
+
return `${cmd.slice(0, 5).join(" ")} "${cmd[5]}"`;
|
|
13
|
+
}
|
|
14
|
+
// Non-root: just join, quoting args with spaces
|
|
15
|
+
return cmd.map(c => /[\s']/.test(c) ? `"${c}"` : c).join(" ");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const probeArgs = ["-p", "say ok", "--model", "haiku", "--output-format", "text", "--dangerously-skip-permissions"];
|
|
19
|
+
const processorArgs = ["--dangerously-skip-permissions", "--output-format", "text", "--model", "claude-sonnet-4-20250514", "-p", "hello test"];
|
|
20
|
+
|
|
21
|
+
console.log("=== AUTH PROBE (daemon/auto-install.ts) ===\n");
|
|
22
|
+
console.log(printable(buildBunWrappedAgentCliCommand("claude", probeArgs)));
|
|
23
|
+
|
|
24
|
+
console.log("\n\n=== MESSAGE PROCESSOR (core/processor.ts) ===\n");
|
|
25
|
+
console.log(printable(buildBunWrappedAgentCliCommand("claude", processorArgs)));
|
|
26
|
+
console.log();
|
package/src/core/processor.ts
CHANGED
|
@@ -142,10 +142,11 @@ async function runClaude(message: string, chatId: string): Promise<string> {
|
|
|
142
142
|
log.info(
|
|
143
143
|
`Claude send | promptChars: ${prompt.length} | preview: ${previewPrompt(prompt)}`
|
|
144
144
|
);
|
|
145
|
-
|
|
145
|
+
const spawnCmd = buildBunWrappedAgentCliCommand("claude", args);
|
|
146
|
+
log.info(`Claude spawn cmd (${spawnCmd.length} parts):\n${spawnCmd.map((c, i) => ` [${i}] ${c}`).join("\n")}`);
|
|
146
147
|
log.debug(`Claude prompt >>>>\n${prompt}\n<<<<`);
|
|
147
148
|
|
|
148
|
-
const proc = Bun.spawn(
|
|
149
|
+
const proc = Bun.spawn(spawnCmd, {
|
|
149
150
|
cwd: config.projectDir,
|
|
150
151
|
stdin: "pipe",
|
|
151
152
|
stdout: "pipe",
|
|
@@ -212,14 +213,11 @@ export async function processWithCodex(message: string): Promise<string> {
|
|
|
212
213
|
log.info(
|
|
213
214
|
`Codex send | promptChars: ${message.length} | preview: ${previewPrompt(message)}`
|
|
214
215
|
);
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
? "exec resume --last --dangerously-bypass-approvals-and-sandbox <prompt>"
|
|
218
|
-
: `exec --dangerously-bypass-approvals-and-sandbox -C ${config.projectDir} <prompt>`}`
|
|
219
|
-
);
|
|
216
|
+
const spawnCmd = buildBunWrappedAgentCliCommand("codex", args);
|
|
217
|
+
log.info(`Codex spawn cmd (${spawnCmd.length} parts):\n${spawnCmd.map((c, i) => ` [${i}] ${c}`).join("\n")}`);
|
|
220
218
|
log.debug(`Codex prompt >>>>\n${message}\n<<<<`);
|
|
221
219
|
|
|
222
|
-
const proc = Bun.spawn(
|
|
220
|
+
const proc = Bun.spawn(spawnCmd, {
|
|
223
221
|
cwd: config.projectDir,
|
|
224
222
|
stdout: "pipe",
|
|
225
223
|
stderr: "pipe",
|
|
@@ -125,7 +125,7 @@ export async function probeCliAuth(): Promise<void> {
|
|
|
125
125
|
: ["exec", "--dangerously-bypass-approvals-and-sandbox", "echo ok"];
|
|
126
126
|
|
|
127
127
|
const cmd = buildBunWrappedAgentCliCommand(cli, args);
|
|
128
|
-
log.info(`Auth probe cmd
|
|
128
|
+
log.info(`Auth probe cmd (${cmd.length} parts):\n${cmd.map((c, i) => ` [${i}] ${c}`).join("\n")}`);
|
|
129
129
|
|
|
130
130
|
const proc = Bun.spawn(cmd, {
|
|
131
131
|
stdout: "pipe",
|