coxpit 2.1.0 → 2.1.1

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/coxpit.js CHANGED
@@ -2,13 +2,19 @@
2
2
  // coxpit CLI — boots the daemon. Ships TS sources and runs them via tsx
3
3
  // (no build step, no ESM extension rewrites).
4
4
  import { spawn } from 'node:child_process';
5
- import { fileURLToPath } from 'node:url';
5
+ import { createRequire } from 'node:module';
6
+ import { fileURLToPath, pathToFileURL } from 'node:url';
6
7
  import { dirname, join } from 'node:path';
7
8
 
8
9
  const root = dirname(dirname(fileURLToPath(import.meta.url)));
9
10
  const entry = join(root, 'src', 'index.ts');
10
11
 
11
- const child = spawn(process.execPath, ['--import', 'tsx', entry, ...process.argv.slice(2)], {
12
+ // --import bare 'tsx' 사용자 cwd 기준으로 해석돼 npx 실행에서 깨진다 —
13
+ // 패키지 루트 기준으로 절대경로 해석해 넘긴다.
14
+ const require_ = createRequire(join(root, 'package.json'));
15
+ const tsxEntry = pathToFileURL(require_.resolve('tsx')).href;
16
+
17
+ const child = spawn(process.execPath, ['--import', tsxEntry, entry, ...process.argv.slice(2)], {
12
18
  stdio: 'inherit',
13
19
  env: process.env,
14
20
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coxpit",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Self-hosted cockpit for running a fleet of AI coding agents across your own machines — parallel worktree runs, live board, compare & merge, web terminal, design capture.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/server.ts CHANGED
@@ -29,7 +29,7 @@ export async function buildServer(): Promise<FastifyInstance> {
29
29
  app.addHook('onRequest', authGate);
30
30
 
31
31
  // 무인증 헬스(외부 감시용)
32
- app.get('/api/health', async () => ({ ok: true, name: 'coxpit', version: '2.1.0' }));
32
+ app.get('/api/health', async () => ({ ok: true, name: 'coxpit', version: '2.1.1' }));
33
33
 
34
34
  // 플릿 보드(단일 페이지). 인증 게이트 적용됨.
35
35
  app.get('/', async (_req, reply) => reply.type('text/html').send(BOARD_HTML));
@@ -354,7 +354,7 @@ export async function buildServer(): Promise<FastifyInstance> {
354
354
  // 라이브 스트림 좌석 — 오케스트레이터가 run/event 를 여기로 broadcast.
355
355
  app.get('/ws', { websocket: true }, (socket) => {
356
356
  addSink(socket);
357
- socket.send(JSON.stringify({ type: 'hello', name: 'coxpit-fleet', version: '2.1.0' }));
357
+ socket.send(JSON.stringify({ type: 'hello', name: 'coxpit-fleet', version: '2.1.1' }));
358
358
  socket.on('close', () => removeSink(socket));
359
359
  });
360
360