Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions server/modules/providers/services/live-sessions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export function isGjcCommandLine(cmdline: string): boolean {
const argv = cmdline.includes('\0')
? cmdline.split('\0').filter(Boolean)
: cmdline.trim().split(/\s+/).filter(Boolean);
return argv.some((token) => basename(token) === 'gjc') || cmdline.includes('@chatmux-code/coding-agent');
return argv.some((token) => basename(token) === 'gjc')
|| cmdline.includes('@gajae-code/coding-agent');
}

/** Roots gjc writes transcripts under; a live transcript sits in one of them. */
Expand Down Expand Up @@ -124,7 +125,8 @@ export function isGjcProcessArgs(args: string): boolean {
return true;
}
if ((head === 'bun' || head === 'node') && tokens.length > 1) {
return basename(tokens[1]) === 'gjc' || tokens[1].includes('@chatmux-code/coding-agent');
return basename(tokens[1]) === 'gjc'
|| tokens[1].includes('@gajae-code/coding-agent');
}
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions server/modules/providers/tests/live-sessions.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ test('findIdleGjcTmuxSessions: a stray "gjc" token deeper in argv never qualifie
test('isGjcProcessArgs: argv-anchored — native, bun/node entry, package path; rejects lookalikes', () => {
assert.equal(isGjcProcessArgs('/usr/local/bin/gjc --resume 019f'), true);
assert.equal(isGjcProcessArgs('/home/u/.bun/bin/bun /home/u/.bun/bin/gjc'), true);
assert.equal(isGjcProcessArgs('/usr/bin/node /opt/node_modules/@chatmux-code/coding-agent/bin/gjc.js'), true);
assert.equal(isGjcProcessArgs('/usr/bin/node /opt/node_modules/@gajae-code/coding-agent/bin/gjc.js'), true);
assert.equal(isGjcProcessArgs('man gjc'), false);
assert.equal(isGjcProcessArgs('vi /tmp/notes/gjc'), false);
assert.equal(isGjcProcessArgs('/usr/bin/node /srv/devserver/index.js'), false);
Expand Down Expand Up @@ -1274,7 +1274,7 @@ test('isGjcCommandLine matches gjc as a native binary AND under bun/node interpr
// bun launcher — real-world case where comm reads "bun" (the regression this fixes)
assert.equal(isGjcCommandLine(cmdline('/home/u/.bun/bin/bun', '/home/u/.bun/bin/gjc', '--resume', '019f6f27')), true);
// node launching the packaged entry (basename is gjc.js — matched via the package path)
assert.equal(isGjcCommandLine(cmdline('/usr/bin/node', '/opt/node_modules/@chatmux-code/coding-agent/bin/gjc.js', 'start')), true);
assert.equal(isGjcCommandLine(cmdline('/usr/bin/node', '/opt/node_modules/@gajae-code/coding-agent/bin/gjc.js', 'start')), true);
// NOT gjc: the app server and its native watcher must never be mistaken for a session holder
assert.equal(isGjcCommandLine(cmdline('/usr/bin/node', '/home/u/.chatmux/current/scripts/chatmux-runtime.mjs', 'start')), false);
assert.equal(isGjcCommandLine(cmdline('/home/u/.chatmux/current/dist-native/chatmux-core', 'watch', '--root', '/home/u/.gjc/agent/sessions')), false);
Expand Down
2 changes: 1 addition & 1 deletion server/modules/providers/tests/support/tmux-e2e-harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export async function createTmuxE2EHarness(): Promise<TmuxE2EHarness> {
const npmPackageDirectory = path.join(
workspace,
'node_modules',
'@chatmux-code',
'@gajae-code',
'coding-agent',
);
const npmGjcPath = path.join(npmPackageDirectory, 'gjc');
Expand Down