ai-agent-session-center 2.0.8 → 2.1.0
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/bin/cli.js +5 -1
- package/package.json +1 -1
- package/server/sessionMatcher.ts +3 -1
package/bin/cli.js
CHANGED
|
@@ -19,9 +19,13 @@ const isFirstRun = !existsSync(configPath);
|
|
|
19
19
|
|
|
20
20
|
const installHooksPath = join(projectRoot, 'hooks', 'install-hooks.js');
|
|
21
21
|
|
|
22
|
+
// Resolve tsx binary: prefer local node_modules/.bin (works for global installs)
|
|
23
|
+
const localTsx = join(projectRoot, 'node_modules', '.bin', 'tsx');
|
|
24
|
+
const tsxBin = existsSync(localTsx) ? localTsx : 'tsx';
|
|
25
|
+
|
|
22
26
|
function startServer() {
|
|
23
27
|
const serverArgs = args.filter(a => a !== '--setup');
|
|
24
|
-
const child = spawn(
|
|
28
|
+
const child = spawn(tsxBin, [serverPath, ...serverArgs], {
|
|
25
29
|
stdio: 'inherit',
|
|
26
30
|
cwd: projectRoot,
|
|
27
31
|
});
|
package/package.json
CHANGED
package/server/sessionMatcher.ts
CHANGED
|
@@ -386,8 +386,10 @@ export function matchSession(
|
|
|
386
386
|
// No SSH terminal match — create a display-only card with detected source
|
|
387
387
|
const detectedSource = detectHookSource(hookData);
|
|
388
388
|
log.info('session', `Creating display-only session ${session_id?.slice(0, 8)} source=${detectedSource} cwd=${cwd}`);
|
|
389
|
+
// Inherit SSH config for capability (e.g. terminal relay) but keep the actual detected source.
|
|
390
|
+
// Only sessions created via the dashboard (createTerminalSession) should have source='ssh'.
|
|
389
391
|
const inheritedConfig = findSshConfig(sessions, hookData.agent_terminal_id, cwd);
|
|
390
|
-
session = createDefaultSession(session_id, cwd, hookData,
|
|
392
|
+
session = createDefaultSession(session_id, cwd, hookData, detectedSource, hookData.agent_terminal_id || null, inheritedConfig);
|
|
391
393
|
sessions.set(session_id, session);
|
|
392
394
|
}
|
|
393
395
|
}
|