arisa 2.3.12 → 2.3.13
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 +1 -1
- package/src/daemon/index.ts +6 -0
- package/src/daemon/setup.ts +4 -3
package/package.json
CHANGED
package/src/daemon/index.ts
CHANGED
|
@@ -42,6 +42,12 @@ const { saveMessageRecord } = await import("../shared/db");
|
|
|
42
42
|
|
|
43
43
|
const log = createLogger("daemon");
|
|
44
44
|
|
|
45
|
+
// Log version
|
|
46
|
+
try {
|
|
47
|
+
const _pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
48
|
+
log.info(`Arisa v${_pkg.version}`);
|
|
49
|
+
} catch {}
|
|
50
|
+
|
|
45
51
|
// --- Claim process: kill previous daemon, write our PID ---
|
|
46
52
|
claimProcess("daemon");
|
|
47
53
|
|
package/src/daemon/setup.ts
CHANGED
|
@@ -278,9 +278,10 @@ async function runInteractiveLogin(cli: AgentCliName, vars: Record<string, strin
|
|
|
278
278
|
if (exitCode === 0) {
|
|
279
279
|
// Step 1: Strip ANSI escape sequences FIRST (their params contain digits/letters)
|
|
280
280
|
const clean = output
|
|
281
|
-
.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "")
|
|
282
|
-
.replace(/\x1b\][^\x07]*\x07/g, "")
|
|
283
|
-
.replace(/\x1b[
|
|
281
|
+
.replace(/\x1b\[[0-9;?]*[A-Za-z]/g, "") // CSI: ESC [ params final (e.g. ESC[1C)
|
|
282
|
+
.replace(/\x1b\][^\x07]*\x07/g, "") // OSC: ESC ] ... BEL
|
|
283
|
+
.replace(/\x1b[()#][A-Za-z0-9]/g, "") // 3-byte: ESC ( B, ESC ) 0, ESC # 8
|
|
284
|
+
.replace(/\x1b./g, "") // Remaining 2-byte ESC sequences
|
|
284
285
|
.replace(/[\x00-\x09\x0b-\x0c\x0e-\x1f]/g, ""); // Control chars (keep \n \r)
|
|
285
286
|
|
|
286
287
|
// Step 2: Find boundaries in clean text
|