@auto-ai/agent 2.1.95 → 2.1.96

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.
@@ -0,0 +1,25 @@
1
+ import { mkdirSync, appendFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ import { homedir } from 'node:os';
4
+
5
+ const stateDir = process.env.TUITUI_STATE_DIR || join(homedir(), '.claude', 'channels', 'tuitui');
6
+ const bootLog = join(stateDir, 'boot.log');
7
+ mkdirSync(dirname(bootLog), { recursive: true });
8
+
9
+ function log(line) {
10
+ appendFileSync(bootLog, `${new Date().toISOString()} ${line}\n`, { encoding: 'utf8', mode: 0o600, flag: 'a' });
11
+ }
12
+
13
+ log(`[BOOT] tuitui-channel boot.mjs start pid=${process.pid}`);
14
+ log(`[BOOT] marker=2026-03-23-v2-runtime-probe`);
15
+ log(`[BOOT] env TUITUI_DM_POLICY=${process.env.TUITUI_DM_POLICY || ''} TUITUI_STATE_DIR=${process.env.TUITUI_STATE_DIR || ''}`);
16
+
17
+ process.on('uncaughtException', (err) => {
18
+ log(`[BOOT] uncaughtException ${err?.stack || err}`);
19
+ });
20
+ process.on('unhandledRejection', (err) => {
21
+ log(`[BOOT] unhandledRejection ${err?.stack || err}`);
22
+ });
23
+
24
+ await import('./index.mjs');
25
+ log('[BOOT] imported index.mjs successfully');