commandmate 0.1.9 → 0.1.11
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/.env.example +8 -3
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +11 -11
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/config.json +3 -3
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/2.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/api/external-apps/[id]/health/route.js +11 -12
- package/.next/server/app/api/external-apps/[id]/route.js +14 -15
- package/.next/server/app/api/external-apps/route.js +12 -13
- package/.next/server/app/api/hooks/claude-done/route.js +1 -1
- package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
- package/.next/server/app/api/repositories/clone/route.js +1 -1
- package/.next/server/app/api/repositories/route.js +1 -1
- package/.next/server/app/api/repositories/scan/route.js +1 -1
- package/.next/server/app/api/repositories/sync/route.js +1 -1
- package/.next/server/app/api/slash-commands.body +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
- package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/logs/route.js +7 -7
- package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
- package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
- package/.next/server/app/api/worktrees/route.js +1 -1
- package/.next/server/app/index.html +2 -2
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/proxy/[...path]/route.js +12 -13
- package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/page.js +5 -5
- package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/simple-terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +10 -10
- package/.next/server/chunks/1318.js +4 -4
- package/.next/server/chunks/1528.js +1 -1
- package/.next/server/chunks/7425.js +162 -46
- package/.next/server/chunks/9723.js +1 -1
- package/.next/server/middleware-manifest.json +5 -5
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/server/src/middleware.js +2 -2
- package/.next/server/src/middleware.js.map +1 -1
- package/.next/static/chunks/app/{page-9cd00de9cc0abc43.js → page-fe35d61f14b90a51.js} +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-720605c2fb074444.js +1 -0
- package/.next/static/css/{e174aa24f94ce607.css → 376b339640084689.css} +1 -1
- package/.next/trace +5 -5
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +6 -4
- package/dist/cli/commands/start.d.ts +2 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +64 -17
- package/dist/cli/commands/status.d.ts +4 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +95 -6
- package/dist/cli/commands/stop.d.ts +2 -0
- package/dist/cli/commands/stop.d.ts.map +1 -1
- package/dist/cli/commands/stop.js +27 -10
- package/dist/cli/index.js +16 -2
- package/dist/cli/types/index.d.ts +20 -0
- package/dist/cli/types/index.d.ts.map +1 -1
- package/dist/cli/utils/daemon-factory.d.ts +105 -0
- package/dist/cli/utils/daemon-factory.d.ts.map +1 -0
- package/dist/cli/utils/daemon-factory.js +117 -0
- package/dist/cli/utils/daemon.d.ts.map +1 -1
- package/dist/cli/utils/daemon.js +4 -0
- package/dist/cli/utils/env-setup.d.ts +24 -12
- package/dist/cli/utils/env-setup.d.ts.map +1 -1
- package/dist/cli/utils/env-setup.js +64 -43
- package/dist/cli/utils/input-validators.d.ts +103 -0
- package/dist/cli/utils/input-validators.d.ts.map +1 -0
- package/dist/cli/utils/input-validators.js +163 -0
- package/dist/cli/utils/install-context.d.ts +53 -0
- package/dist/cli/utils/install-context.d.ts.map +1 -0
- package/dist/cli/utils/install-context.js +96 -0
- package/dist/cli/utils/pid-manager.d.ts +34 -0
- package/dist/cli/utils/pid-manager.d.ts.map +1 -1
- package/dist/cli/utils/pid-manager.js +43 -0
- package/dist/cli/utils/port-allocator.d.ts +108 -0
- package/dist/cli/utils/port-allocator.d.ts.map +1 -0
- package/dist/cli/utils/port-allocator.js +166 -0
- package/dist/cli/utils/resource-resolvers.d.ts +92 -0
- package/dist/cli/utils/resource-resolvers.d.ts.map +1 -0
- package/dist/cli/utils/resource-resolvers.js +175 -0
- package/dist/cli/utils/worktree-detector.d.ts +82 -0
- package/dist/cli/utils/worktree-detector.d.ts.map +1 -0
- package/dist/cli/utils/worktree-detector.js +221 -0
- package/dist/lib/errors.d.ts +111 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +153 -0
- package/dist/server/server.js +3 -0
- package/dist/server/src/cli/utils/install-context.js +96 -0
- package/dist/server/src/config/system-directories.js +40 -0
- package/dist/server/src/lib/auto-yes-manager.js +325 -0
- package/dist/server/src/lib/auto-yes-resolver.js +34 -0
- package/dist/server/src/lib/cli-patterns.js +6 -1
- package/dist/server/src/lib/db-instance.js +12 -2
- package/dist/server/src/lib/db-migrations.js +143 -1
- package/dist/server/src/lib/db-path-resolver.js +99 -0
- package/dist/server/src/lib/db.js +63 -0
- package/dist/server/src/lib/env.js +52 -3
- package/dist/server/src/lib/worktrees.js +36 -1
- package/dist/server/src/types/external-apps.js +20 -0
- package/package.json +1 -1
- package/.next/static/chunks/app/worktrees/[id]/page-8c6676303b63fdaf.js +0 -1
- /package/.next/static/{ntEU_tKhyyZ-FVJS5Em3L → gRNW5YXY43KqCKbCdaJoJ}/_buildManifest.js +0 -0
- /package/.next/static/{ntEU_tKhyyZ-FVJS5Em3L → gRNW5YXY43KqCKbCdaJoJ}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=7425,exports.ids=[7425],exports.modules={97425:(e,t,
|
|
1
|
+
"use strict";exports.id=7425,exports.ids=[7425],exports.modules={97425:(e,t,r)=>{r.d(t,{n:()=>p});var s=r(85890),a=r.n(s),o=r(55315),i=r.n(o),_=r(75748);let n=[{version:1,name:"initial-schema",up:e=>{(0,_.qZ)(e)},down:e=>{e.exec("DROP TABLE IF EXISTS session_states;"),e.exec("DROP TABLE IF EXISTS chat_messages;"),e.exec("DROP TABLE IF EXISTS worktrees;")}},{version:2,name:"add-multi-repo-and-memo-support",up:e=>{e.exec(`
|
|
2
2
|
ALTER TABLE worktrees ADD COLUMN repository_path TEXT;
|
|
3
3
|
ALTER TABLE worktrees ADD COLUMN repository_name TEXT;
|
|
4
4
|
ALTER TABLE worktrees ADD COLUMN memo TEXT;
|
|
@@ -7,23 +7,23 @@
|
|
|
7
7
|
`),e.exec(`
|
|
8
8
|
CREATE INDEX IF NOT EXISTS idx_worktrees_repository
|
|
9
9
|
ON worktrees(repository_path);
|
|
10
|
-
`);let t=e.prepare("SELECT id, path FROM worktrees").all(),
|
|
10
|
+
`);let t=e.prepare("SELECT id, path FROM worktrees").all(),r=e.prepare(`
|
|
11
11
|
UPDATE worktrees
|
|
12
12
|
SET repository_path = ?,
|
|
13
13
|
repository_name = ?
|
|
14
14
|
WHERE id = ?
|
|
15
|
-
`);for(let e of t){let t=
|
|
15
|
+
`);for(let e of t){let t=E(e.path),s=i().basename(t);r.run(t,s,e.id)}let s=e.prepare(`
|
|
16
16
|
UPDATE worktrees
|
|
17
17
|
SET last_user_message = ?,
|
|
18
18
|
last_user_message_at = ?
|
|
19
19
|
WHERE id = ?
|
|
20
|
-
`);for(let
|
|
20
|
+
`);for(let r of t){let t=e.prepare(`
|
|
21
21
|
SELECT content, timestamp
|
|
22
22
|
FROM chat_messages
|
|
23
23
|
WHERE worktree_id = ? AND role = 'user'
|
|
24
24
|
ORDER BY timestamp DESC
|
|
25
25
|
LIMIT 1
|
|
26
|
-
`).get(
|
|
26
|
+
`).get(r.id);if(t){let e=t.content.substring(0,200);s.run(e,t.timestamp,r.id)}}},down:e=>{e.exec(`
|
|
27
27
|
-- Create backup table
|
|
28
28
|
CREATE TABLE worktrees_backup AS
|
|
29
29
|
SELECT id, name, path, last_message_summary, updated_at
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
|
|
52
52
|
-- Drop index
|
|
53
53
|
DROP INDEX IF EXISTS idx_worktrees_repository;
|
|
54
|
-
`)}},{version:3,name:"fix-worktree-repository-paths",up:e=>{let t=e.prepare("SELECT id, path FROM worktrees").all(),
|
|
54
|
+
`)}},{version:3,name:"fix-worktree-repository-paths",up:e=>{let t=e.prepare("SELECT id, path FROM worktrees").all(),r=e.prepare(`
|
|
55
55
|
UPDATE worktrees
|
|
56
56
|
SET repository_path = ?,
|
|
57
57
|
repository_name = ?
|
|
58
58
|
WHERE id = ?
|
|
59
|
-
`);for(let e of t){let t=
|
|
59
|
+
`);for(let e of t){let t=E(e.path),s=i().basename(t);r.run(t,s,e.id)}},down:()=>{console.log("No rollback needed for repository path fix")}},{version:4,name:"add-favorite-field",up:e=>{e.exec(`
|
|
60
60
|
ALTER TABLE worktrees ADD COLUMN favorite INTEGER DEFAULT 0;
|
|
61
61
|
`),e.exec(`
|
|
62
62
|
CREATE INDEX IF NOT EXISTS idx_worktrees_favorite
|
|
@@ -175,12 +175,12 @@
|
|
|
175
175
|
`),e.exec(`
|
|
176
176
|
CREATE INDEX idx_worktree_memos_worktree
|
|
177
177
|
ON worktree_memos(worktree_id, position);
|
|
178
|
-
`);let{randomUUID:t}=
|
|
178
|
+
`);let{randomUUID:t}=r(84770),s=e.prepare(`
|
|
179
179
|
SELECT id, memo FROM worktrees WHERE memo IS NOT NULL AND memo != ''
|
|
180
180
|
`).all(),a=e.prepare(`
|
|
181
181
|
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
182
182
|
VALUES (?, ?, 'Memo', ?, 0, ?, ?)
|
|
183
|
-
`),o=Date.now();for(let e of
|
|
183
|
+
`),o=Date.now();for(let e of s)a.run(t(),e.id,e.memo,o,o);console.log(`✓ Created worktree_memos table`),console.log(`✓ Migrated ${s.length} existing memos to new table`)},down:e=>{e.exec("DROP TABLE IF EXISTS worktree_memos"),console.log("✓ Dropped worktree_memos table")}},{version:11,name:"add-viewed-tracking",up:e=>{e.exec(`
|
|
184
184
|
ALTER TABLE worktrees ADD COLUMN last_viewed_at TEXT;
|
|
185
185
|
`),e.exec(`
|
|
186
186
|
CREATE INDEX IF NOT EXISTS idx_chat_messages_assistant_latest
|
|
@@ -266,16 +266,122 @@
|
|
|
266
266
|
`),e.exec(`
|
|
267
267
|
CREATE INDEX IF NOT EXISTS idx_clone_jobs_normalized_clone_url
|
|
268
268
|
ON clone_jobs(normalized_clone_url);
|
|
269
|
-
`),console.log("✓ Created repositories table"),console.log("✓ Created clone_jobs table"),console.log("✓ Created indexes for repositories and clone_jobs")},down:e=>{e.exec("DROP INDEX IF EXISTS idx_clone_jobs_normalized_clone_url"),e.exec("DROP INDEX IF EXISTS idx_clone_jobs_status"),e.exec("DROP TABLE IF EXISTS clone_jobs"),e.exec("DROP INDEX IF EXISTS idx_repositories_path"),e.exec("DROP INDEX IF EXISTS idx_repositories_normalized_clone_url"),e.exec("DROP TABLE IF EXISTS repositories"),console.log("✓ Dropped repositories and clone_jobs tables")}}
|
|
269
|
+
`),console.log("✓ Created repositories table"),console.log("✓ Created clone_jobs table"),console.log("✓ Created indexes for repositories and clone_jobs")},down:e=>{e.exec("DROP INDEX IF EXISTS idx_clone_jobs_normalized_clone_url"),e.exec("DROP INDEX IF EXISTS idx_clone_jobs_status"),e.exec("DROP TABLE IF EXISTS clone_jobs"),e.exec("DROP INDEX IF EXISTS idx_repositories_path"),e.exec("DROP INDEX IF EXISTS idx_repositories_normalized_clone_url"),e.exec("DROP TABLE IF EXISTS repositories"),console.log("✓ Dropped repositories and clone_jobs tables")}},{version:15,name:"add-initial-branch-column",up:e=>{e.exec(`
|
|
270
|
+
ALTER TABLE worktrees ADD COLUMN initial_branch TEXT;
|
|
271
|
+
`),console.log("✓ Added initial_branch column to worktrees table")},down:e=>{e.exec(`
|
|
272
|
+
-- 1. Create backup table without initial_branch
|
|
273
|
+
CREATE TABLE worktrees_backup AS
|
|
274
|
+
SELECT id, name, path, repository_path, repository_name, description,
|
|
275
|
+
last_user_message, last_user_message_at, last_message_summary,
|
|
276
|
+
favorite, status, link, cli_tool_id, updated_at, last_viewed_at
|
|
277
|
+
FROM worktrees;
|
|
278
|
+
|
|
279
|
+
-- 2. Drop original table
|
|
280
|
+
DROP TABLE worktrees;
|
|
281
|
+
|
|
282
|
+
-- 3. Recreate table without initial_branch
|
|
283
|
+
CREATE TABLE worktrees (
|
|
284
|
+
id TEXT PRIMARY KEY,
|
|
285
|
+
name TEXT NOT NULL,
|
|
286
|
+
path TEXT NOT NULL UNIQUE,
|
|
287
|
+
repository_path TEXT,
|
|
288
|
+
repository_name TEXT,
|
|
289
|
+
description TEXT,
|
|
290
|
+
last_user_message TEXT,
|
|
291
|
+
last_user_message_at INTEGER,
|
|
292
|
+
last_message_summary TEXT,
|
|
293
|
+
favorite INTEGER DEFAULT 0,
|
|
294
|
+
status TEXT DEFAULT NULL,
|
|
295
|
+
link TEXT DEFAULT NULL,
|
|
296
|
+
cli_tool_id TEXT DEFAULT 'claude',
|
|
297
|
+
updated_at INTEGER,
|
|
298
|
+
last_viewed_at TEXT
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
-- 4. Restore data
|
|
302
|
+
INSERT INTO worktrees (id, name, path, repository_path, repository_name,
|
|
303
|
+
description, last_user_message, last_user_message_at, last_message_summary,
|
|
304
|
+
favorite, status, link, cli_tool_id, updated_at, last_viewed_at)
|
|
305
|
+
SELECT id, name, path, repository_path, repository_name,
|
|
306
|
+
description, last_user_message, last_user_message_at, last_message_summary,
|
|
307
|
+
favorite, status, link, cli_tool_id, updated_at, last_viewed_at
|
|
308
|
+
FROM worktrees_backup;
|
|
309
|
+
|
|
310
|
+
-- 5. Drop backup
|
|
311
|
+
DROP TABLE worktrees_backup;
|
|
312
|
+
|
|
313
|
+
-- 6. Recreate indexes
|
|
314
|
+
CREATE INDEX IF NOT EXISTS idx_worktrees_updated_at
|
|
315
|
+
ON worktrees(updated_at DESC);
|
|
316
|
+
|
|
317
|
+
CREATE INDEX IF NOT EXISTS idx_worktrees_repository
|
|
318
|
+
ON worktrees(repository_path);
|
|
319
|
+
|
|
320
|
+
CREATE INDEX IF NOT EXISTS idx_worktrees_favorite
|
|
321
|
+
ON worktrees(favorite DESC, updated_at DESC);
|
|
322
|
+
|
|
323
|
+
CREATE INDEX IF NOT EXISTS idx_worktrees_status
|
|
324
|
+
ON worktrees(status);
|
|
325
|
+
|
|
326
|
+
CREATE INDEX IF NOT EXISTS idx_worktrees_cli_tool
|
|
327
|
+
ON worktrees(cli_tool_id);
|
|
328
|
+
`),console.log("✓ Removed initial_branch column from worktrees table")}},{version:16,name:"add-issue-no-to-external-apps",up:e=>{e.exec(`
|
|
329
|
+
ALTER TABLE external_apps ADD COLUMN issue_no INTEGER;
|
|
330
|
+
`),e.exec(`
|
|
331
|
+
CREATE INDEX IF NOT EXISTS idx_external_apps_issue_no ON external_apps(issue_no);
|
|
332
|
+
`),console.log("✓ Added issue_no column to external_apps table"),console.log("✓ Created index idx_external_apps_issue_no")},down:e=>{e.exec(`
|
|
333
|
+
-- 1. Create backup table without issue_no
|
|
334
|
+
CREATE TABLE external_apps_backup AS
|
|
335
|
+
SELECT id, name, display_name, description, path_prefix, target_port,
|
|
336
|
+
target_host, app_type, websocket_enabled, websocket_path_pattern,
|
|
337
|
+
enabled, created_at, updated_at
|
|
338
|
+
FROM external_apps;
|
|
339
|
+
|
|
340
|
+
-- 2. Drop original table (this also drops indexes)
|
|
341
|
+
DROP TABLE external_apps;
|
|
342
|
+
|
|
343
|
+
-- 3. Recreate table without issue_no
|
|
344
|
+
CREATE TABLE external_apps (
|
|
345
|
+
id TEXT PRIMARY KEY,
|
|
346
|
+
name TEXT NOT NULL UNIQUE,
|
|
347
|
+
display_name TEXT NOT NULL,
|
|
348
|
+
description TEXT,
|
|
349
|
+
path_prefix TEXT NOT NULL UNIQUE,
|
|
350
|
+
target_port INTEGER NOT NULL,
|
|
351
|
+
target_host TEXT DEFAULT 'localhost',
|
|
352
|
+
app_type TEXT NOT NULL CHECK(app_type IN ('sveltekit', 'streamlit', 'nextjs', 'other')),
|
|
353
|
+
websocket_enabled INTEGER DEFAULT 0,
|
|
354
|
+
websocket_path_pattern TEXT,
|
|
355
|
+
enabled INTEGER DEFAULT 1,
|
|
356
|
+
created_at INTEGER NOT NULL,
|
|
357
|
+
updated_at INTEGER NOT NULL
|
|
358
|
+
);
|
|
359
|
+
|
|
360
|
+
-- 4. Restore data
|
|
361
|
+
INSERT INTO external_apps (id, name, display_name, description, path_prefix,
|
|
362
|
+
target_port, target_host, app_type, websocket_enabled, websocket_path_pattern,
|
|
363
|
+
enabled, created_at, updated_at)
|
|
364
|
+
SELECT id, name, display_name, description, path_prefix,
|
|
365
|
+
target_port, target_host, app_type, websocket_enabled, websocket_path_pattern,
|
|
366
|
+
enabled, created_at, updated_at
|
|
367
|
+
FROM external_apps_backup;
|
|
368
|
+
|
|
369
|
+
-- 5. Drop backup
|
|
370
|
+
DROP TABLE external_apps_backup;
|
|
371
|
+
|
|
372
|
+
-- 6. Recreate original indexes
|
|
373
|
+
CREATE INDEX idx_external_apps_path_prefix ON external_apps(path_prefix);
|
|
374
|
+
CREATE INDEX idx_external_apps_enabled ON external_apps(enabled);
|
|
375
|
+
`),console.log("✓ Removed issue_no column from external_apps table")}}];function E(e){let t=r(92048),s=e;for(;s!==i().dirname(s);){let e=i().join(s,".git");if(t.existsSync(e)){let r=t.statSync(e);if(r.isDirectory())return s;if(r.isFile()){let r=t.readFileSync(e,"utf-8").trim().match(/^gitdir:\s*(.+)$/);if(r)return r[1].split("/.git/")[0]}}s=i().dirname(s)}return e}function l(e){try{let t=e.prepare("SELECT MAX(version) as version FROM schema_version").get();return t?.version??0}catch{return 0}}var d=r(93346);let T=null;function p(){if(!T){let e=(0,d.dU)().CM_DB_PATH,t=r(92048),s=i().dirname(e);t.existsSync(s)||t.mkdirSync(s,{recursive:!0,mode:448}),function(e){!function(e){e.exec(`
|
|
270
376
|
CREATE TABLE IF NOT EXISTS schema_version (
|
|
271
377
|
version INTEGER PRIMARY KEY,
|
|
272
378
|
name TEXT NOT NULL,
|
|
273
379
|
applied_at INTEGER NOT NULL
|
|
274
380
|
);
|
|
275
|
-
`)}(e);let t=l(e);console.log(`Current schema version: ${t}`);let
|
|
381
|
+
`)}(e);let t=l(e);console.log(`Current schema version: ${t}`);let r=n.filter(e=>e.version>t);if(0===r.length){console.log("✓ Schema is up to date");return}for(let t of(console.log(`Found ${r.length} pending migration(s)`),r)){console.log(`Applying migration ${t.version}: ${t.name}...`);try{e.transaction(()=>{t.up(e),e.prepare(`
|
|
276
382
|
INSERT INTO schema_version (version, name, applied_at)
|
|
277
383
|
VALUES (?, ?, ?)
|
|
278
|
-
`).run(t.version,t.name,Date.now())})(),console.log(`✓ Migration ${t.version} applied successfully`)}catch(
|
|
384
|
+
`).run(t.version,t.name,Date.now())})(),console.log(`✓ Migration ${t.version} applied successfully`)}catch(r){let e=r instanceof Error?r.message:String(r);throw console.error(`✗ Migration ${t.version} failed:`,e),Error(`Migration ${t.version} (${t.name}) failed: ${e}`)}}console.log(`✓ All migrations completed. Current version: ${l(e)}`)}(T=new(a())(e))}return T}},75748:(e,t,r)=>{r.d(t,{DF:()=>b,Db:()=>h,ER:()=>_,Ek:()=>M,GA:()=>A,GP:()=>g,HE:()=>u,IH:()=>L,Mf:()=>R,Nf:()=>S,Nr:()=>U,OK:()=>I,Of:()=>T,Pv:()=>y,Q7:()=>F,R3:()=>D,S$:()=>O,VW:()=>k,Xv:()=>i,ZI:()=>X,_U:()=>c,_e:()=>f,dD:()=>x,gU:()=>n,j8:()=>w,ly:()=>E,pM:()=>v,qZ:()=>o,tn:()=>p,vX:()=>m,xr:()=>l,y:()=>d,zl:()=>N});var s=r(84770);function a(e){return{id:e.id,worktreeId:e.worktree_id,role:e.role,content:e.content,summary:e.summary||void 0,timestamp:new Date(e.timestamp),logFileName:e.log_file_name||void 0,requestId:e.request_id||void 0,messageType:e.message_type||"normal",promptData:e.prompt_data?JSON.parse(e.prompt_data):void 0,cliToolId:e.cli_tool_id??"claude"}}function o(e){e.exec(`
|
|
279
385
|
CREATE TABLE IF NOT EXISTS worktrees (
|
|
280
386
|
id TEXT PRIMARY KEY,
|
|
281
387
|
name TEXT NOT NULL,
|
|
@@ -323,7 +429,7 @@
|
|
|
323
429
|
PRIMARY KEY (worktree_id, cli_tool_id),
|
|
324
430
|
FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
|
|
325
431
|
);
|
|
326
|
-
`)}function i(e,t){let
|
|
432
|
+
`)}function i(e,t){let r=`
|
|
327
433
|
SELECT
|
|
328
434
|
w.id, w.name, w.path, w.repository_path, w.repository_name, w.description,
|
|
329
435
|
w.last_user_message, w.last_user_message_at, w.last_message_summary,
|
|
@@ -331,7 +437,7 @@
|
|
|
331
437
|
(SELECT MAX(timestamp) FROM chat_messages
|
|
332
438
|
WHERE worktree_id = w.id AND role = 'assistant') as last_assistant_message_at
|
|
333
439
|
FROM worktrees w
|
|
334
|
-
`,
|
|
440
|
+
`,s=[];t&&(r+=" WHERE w.repository_path = ?",s.push(t)),r+=" ORDER BY w.updated_at DESC NULLS LAST";let a=e.prepare(r).all(...s),o=function(e,t){if(0===t.length)return new Map;let r=t.map(()=>"?").join(","),s=e.prepare(`
|
|
335
441
|
WITH ranked_messages AS (
|
|
336
442
|
SELECT
|
|
337
443
|
worktree_id,
|
|
@@ -342,14 +448,14 @@
|
|
|
342
448
|
ORDER BY timestamp DESC
|
|
343
449
|
) as rn
|
|
344
450
|
FROM chat_messages
|
|
345
|
-
WHERE worktree_id IN (${
|
|
451
|
+
WHERE worktree_id IN (${r})
|
|
346
452
|
AND role = 'user'
|
|
347
453
|
AND cli_tool_id IN ('claude', 'codex', 'gemini')
|
|
348
454
|
)
|
|
349
455
|
SELECT worktree_id, cli_tool_id, content
|
|
350
456
|
FROM ranked_messages
|
|
351
457
|
WHERE rn = 1
|
|
352
|
-
`).all(...t),a=new Map;for(let e of t)a.set(e,{});for(let e of
|
|
458
|
+
`).all(...t),a=new Map;for(let e of t)a.set(e,{});for(let e of s){let t=a.get(e.worktree_id)||{};t[e.cli_tool_id]=e.content.substring(0,50),a.set(e.worktree_id,t)}return a}(e,a.map(e=>e.id));return a.map(e=>{let t=o.get(e.id)||{};return{id:e.id,name:e.name,path:e.path,repositoryPath:e.repository_path||"",repositoryName:e.repository_name||"",description:e.description||void 0,lastUserMessage:e.last_user_message||void 0,lastUserMessageAt:e.last_user_message_at?new Date(e.last_user_message_at):void 0,lastMessageSummary:e.last_message_summary||void 0,lastMessagesByCli:t,updatedAt:e.updated_at?new Date(e.updated_at):void 0,lastViewedAt:e.last_viewed_at?new Date(e.last_viewed_at):void 0,lastAssistantMessageAt:e.last_assistant_message_at?new Date(e.last_assistant_message_at):void 0,favorite:1===e.favorite,status:e.status||null,link:e.link||void 0,cliToolId:e.cli_tool_id??"claude"}})}function _(e){return e.prepare(`
|
|
353
459
|
SELECT
|
|
354
460
|
repository_path as path,
|
|
355
461
|
repository_name as name,
|
|
@@ -358,7 +464,7 @@
|
|
|
358
464
|
WHERE repository_path IS NOT NULL
|
|
359
465
|
GROUP BY repository_path, repository_name
|
|
360
466
|
ORDER BY repository_name ASC
|
|
361
|
-
`).all().map(e=>({path:e.path,name:e.name,worktreeCount:e.worktree_count}))}function n(e,t){let
|
|
467
|
+
`).all().map(e=>({path:e.path,name:e.name,worktreeCount:e.worktree_count}))}function n(e,t){let r=e.prepare(`
|
|
362
468
|
SELECT
|
|
363
469
|
w.id, w.name, w.path, w.repository_path, w.repository_name, w.description,
|
|
364
470
|
w.last_user_message, w.last_user_message_at, w.last_message_summary,
|
|
@@ -367,7 +473,7 @@
|
|
|
367
473
|
WHERE worktree_id = w.id AND role = 'assistant') as last_assistant_message_at
|
|
368
474
|
FROM worktrees w
|
|
369
475
|
WHERE w.id = ?
|
|
370
|
-
`).get(t);return
|
|
476
|
+
`).get(t);return r?{id:r.id,name:r.name,path:r.path,repositoryPath:r.repository_path||"",repositoryName:r.repository_name||"",description:r.description||void 0,lastUserMessage:r.last_user_message||void 0,lastUserMessageAt:r.last_user_message_at?new Date(r.last_user_message_at):void 0,lastMessageSummary:r.last_message_summary||void 0,updatedAt:r.updated_at?new Date(r.updated_at):void 0,lastViewedAt:r.last_viewed_at?new Date(r.last_viewed_at):void 0,lastAssistantMessageAt:r.last_assistant_message_at?new Date(r.last_assistant_message_at):void 0,favorite:1===r.favorite,status:r.status||null,link:r.link||void 0,cliToolId:r.cli_tool_id??"claude"}:null}function E(e,t){e.prepare("DELETE FROM worktrees WHERE path = ? AND id != ?").run(t.path,t.id),e.prepare(`
|
|
371
477
|
INSERT INTO worktrees (
|
|
372
478
|
id, name, path, repository_path, repository_name, description,
|
|
373
479
|
last_user_message, last_user_message_at, last_message_summary, updated_at, cli_tool_id
|
|
@@ -384,73 +490,73 @@
|
|
|
384
490
|
last_message_summary = COALESCE(excluded.last_message_summary, worktrees.last_message_summary),
|
|
385
491
|
updated_at = COALESCE(excluded.updated_at, worktrees.updated_at),
|
|
386
492
|
cli_tool_id = COALESCE(excluded.cli_tool_id, worktrees.cli_tool_id)
|
|
387
|
-
`).run(t.id,t.name,t.path,t.repositoryPath||null,t.repositoryName||null,t.description||null,t.lastUserMessage||null,t.lastUserMessageAt?.getTime()||null,t.lastMessageSummary||null,t.updatedAt?.getTime()||null,t.cliToolId||"claude")}function l(e,t,
|
|
493
|
+
`).run(t.id,t.name,t.path,t.repositoryPath||null,t.repositoryName||null,t.description||null,t.lastUserMessage||null,t.lastUserMessageAt?.getTime()||null,t.lastMessageSummary||null,t.updatedAt?.getTime()||null,t.cliToolId||"claude")}function l(e,t,r){e.prepare(`
|
|
388
494
|
UPDATE worktrees
|
|
389
495
|
SET description = ?
|
|
390
496
|
WHERE id = ?
|
|
391
|
-
`).run(
|
|
497
|
+
`).run(r||null,t)}function d(e,t,r){e.prepare(`
|
|
392
498
|
UPDATE worktrees
|
|
393
499
|
SET link = ?
|
|
394
500
|
WHERE id = ?
|
|
395
|
-
`).run(
|
|
501
|
+
`).run(r||null,t)}function T(e,t,r){e.prepare(`
|
|
396
502
|
UPDATE worktrees
|
|
397
503
|
SET last_viewed_at = ?
|
|
398
504
|
WHERE id = ?
|
|
399
|
-
`).run(
|
|
505
|
+
`).run(r.toISOString(),t)}function p(e,t){let r=(0,s.randomUUID)();return e.prepare(`
|
|
400
506
|
INSERT INTO chat_messages
|
|
401
507
|
(id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id)
|
|
402
508
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
403
|
-
`).run(
|
|
509
|
+
`).run(r,t.worktreeId,t.role,t.content,t.summary||null,t.timestamp.getTime(),t.logFileName||null,t.requestId||null,t.messageType||"normal",t.promptData?JSON.stringify(t.promptData):null,t.cliToolId||"claude"),function(e,t,r){e.prepare(`
|
|
404
510
|
UPDATE worktrees
|
|
405
511
|
SET updated_at = ?
|
|
406
512
|
WHERE id = ?
|
|
407
|
-
`).run(
|
|
513
|
+
`).run(r.getTime(),t)}(e,t.worktreeId,t.timestamp),"user"===t.role&&I(e,t.worktreeId,t.content,t.timestamp),{id:r,...t}}function c(e,t,r,s=50,o){let i=`
|
|
408
514
|
SELECT id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id
|
|
409
515
|
FROM chat_messages
|
|
410
516
|
WHERE worktree_id = ? AND (? IS NULL OR timestamp < ?)
|
|
411
|
-
`,
|
|
517
|
+
`,_=[t,r?.getTime()||null,r?.getTime()||null];return o&&(i+=" AND cli_tool_id = ?",_.push(o)),i+=" ORDER BY timestamp DESC LIMIT ?",_.push(s),e.prepare(i).all(..._).map(a)}function m(e,t){let r=e.prepare(`
|
|
412
518
|
SELECT id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id
|
|
413
519
|
FROM chat_messages
|
|
414
520
|
WHERE worktree_id = ? AND role = 'user'
|
|
415
521
|
ORDER BY timestamp DESC
|
|
416
522
|
LIMIT 1
|
|
417
|
-
`).get(t);return
|
|
523
|
+
`).get(t);return r?a(r):null}function u(e,t){e.prepare(`
|
|
418
524
|
DELETE FROM chat_messages
|
|
419
525
|
WHERE worktree_id = ?
|
|
420
|
-
`).run(t),console.log(`[deleteAllMessages] Deleted all messages for worktree: ${t}`)}function N(e,t,
|
|
526
|
+
`).run(t),console.log(`[deleteAllMessages] Deleted all messages for worktree: ${t}`)}function N(e,t,r="claude"){let s=e.prepare(`
|
|
421
527
|
SELECT worktree_id, cli_tool_id, last_captured_line, in_progress_message_id
|
|
422
528
|
FROM session_states
|
|
423
529
|
WHERE worktree_id = ? AND cli_tool_id = ?
|
|
424
|
-
`).get(t,
|
|
530
|
+
`).get(t,r);return s?{worktreeId:s.worktree_id,cliToolId:s.cli_tool_id,lastCapturedLine:s.last_captured_line,inProgressMessageId:s.in_progress_message_id||null}:null}function L(e,t,r,s){e.prepare(`
|
|
425
531
|
INSERT INTO session_states (worktree_id, cli_tool_id, last_captured_line)
|
|
426
532
|
VALUES (?, ?, ?)
|
|
427
533
|
ON CONFLICT(worktree_id, cli_tool_id) DO UPDATE SET
|
|
428
534
|
last_captured_line = excluded.last_captured_line
|
|
429
|
-
`).run(t,s
|
|
535
|
+
`).run(t,r,s)}function R(e,t,r){!function(e,t,r,s){e.prepare(`
|
|
430
536
|
INSERT INTO session_states (worktree_id, cli_tool_id, last_captured_line, in_progress_message_id)
|
|
431
537
|
VALUES (?, ?, 0, ?)
|
|
432
538
|
ON CONFLICT(worktree_id, cli_tool_id) DO UPDATE SET
|
|
433
539
|
in_progress_message_id = excluded.in_progress_message_id
|
|
434
|
-
`).run(t,
|
|
540
|
+
`).run(t,r,null)}(e,t,r,0)}function w(e,t,r){r?e.prepare(`
|
|
435
541
|
DELETE FROM session_states
|
|
436
542
|
WHERE worktree_id = ? AND cli_tool_id = ?
|
|
437
|
-
`).run(t,
|
|
543
|
+
`).run(t,r):e.prepare(`
|
|
438
544
|
DELETE FROM session_states
|
|
439
545
|
WHERE worktree_id = ?
|
|
440
|
-
`).run(t)}function
|
|
546
|
+
`).run(t)}function I(e,t,r,s){let a=e.prepare(`
|
|
441
547
|
UPDATE worktrees
|
|
442
548
|
SET last_user_message = ?,
|
|
443
549
|
last_user_message_at = ?
|
|
444
550
|
WHERE id = ?
|
|
445
|
-
`),o=
|
|
551
|
+
`),o=r.substring(0,200);a.run(o,s.getTime(),t)}function O(e,t){let r=e.prepare(`
|
|
446
552
|
SELECT id, worktree_id, role, content, summary, timestamp, log_file_name, request_id, message_type, prompt_data, cli_tool_id
|
|
447
553
|
FROM chat_messages
|
|
448
554
|
WHERE id = ?
|
|
449
|
-
`).get(t);return
|
|
555
|
+
`).get(t);return r?a(r):null}function A(e,t,r){e.prepare(`
|
|
450
556
|
UPDATE chat_messages
|
|
451
557
|
SET prompt_data = ?
|
|
452
558
|
WHERE id = ?
|
|
453
|
-
`).run(JSON.stringify(
|
|
559
|
+
`).run(JSON.stringify(r),t)}function g(e,t,r){let s=e.prepare(`
|
|
454
560
|
SELECT id, prompt_data
|
|
455
561
|
FROM chat_messages
|
|
456
562
|
WHERE worktree_id = ?
|
|
@@ -458,43 +564,53 @@
|
|
|
458
564
|
AND message_type = 'prompt'
|
|
459
565
|
AND json_extract(prompt_data, '$.status') = 'pending'
|
|
460
566
|
ORDER BY timestamp DESC
|
|
461
|
-
`).all(t,
|
|
567
|
+
`).all(t,r);if(0===s.length)return 0;let a=e.prepare(`
|
|
462
568
|
UPDATE chat_messages
|
|
463
569
|
SET prompt_data = ?
|
|
464
570
|
WHERE id = ?
|
|
465
|
-
`),o=0;for(let e of
|
|
571
|
+
`),o=0;for(let e of s)try{let t=JSON.parse(e.prompt_data);t.status="answered",t.answer="(answered via terminal)",t.answeredAt=new Date().toISOString(),a.run(JSON.stringify(t),e.id),o++}catch{}return o}function D(e,t,r){e.prepare(`
|
|
466
572
|
UPDATE worktrees
|
|
467
573
|
SET favorite = ?
|
|
468
574
|
WHERE id = ?
|
|
469
|
-
`).run(
|
|
575
|
+
`).run(r?1:0,t)}function S(e,t,r){e.prepare(`
|
|
470
576
|
UPDATE worktrees
|
|
471
577
|
SET status = ?
|
|
472
578
|
WHERE id = ?
|
|
473
|
-
`).run(
|
|
579
|
+
`).run(r,t)}function k(e,t,r){e.prepare(`
|
|
474
580
|
UPDATE worktrees
|
|
475
581
|
SET cli_tool_id = ?
|
|
476
582
|
WHERE id = ?
|
|
477
|
-
`).run(
|
|
583
|
+
`).run(r,t)}function C(e){return{id:e.id,worktreeId:e.worktree_id,title:e.title,content:e.content,position:e.position,createdAt:new Date(e.created_at),updatedAt:new Date(e.updated_at)}}function h(e,t){return e.prepare(`
|
|
478
584
|
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
479
585
|
FROM worktree_memos
|
|
480
586
|
WHERE worktree_id = ?
|
|
481
587
|
ORDER BY position ASC
|
|
482
|
-
`).all(t).map(
|
|
588
|
+
`).all(t).map(C)}function X(e,t){let r=e.prepare(`
|
|
483
589
|
SELECT id, worktree_id, title, content, position, created_at, updated_at
|
|
484
590
|
FROM worktree_memos
|
|
485
591
|
WHERE id = ?
|
|
486
|
-
`).get(t);return
|
|
592
|
+
`).get(t);return r?C(r):null}function x(e,t,r){let a=(0,s.randomUUID)(),o=Date.now(),i=r.title??"Memo",_=r.content??"";return e.prepare(`
|
|
487
593
|
INSERT INTO worktree_memos (id, worktree_id, title, content, position, created_at, updated_at)
|
|
488
594
|
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
489
|
-
`).run(a,t,i,
|
|
595
|
+
`).run(a,t,i,_,r.position,o,o),{id:a,worktreeId:t,title:i,content:_,position:r.position,createdAt:new Date(o),updatedAt:new Date(o)}}function U(e,t,r){let s=Date.now(),a=["updated_at = ?"],o=[s];void 0!==r.title&&(a.push("title = ?"),o.push(r.title)),void 0!==r.content&&(a.push("content = ?"),o.push(r.content)),o.push(t),e.prepare(`
|
|
490
596
|
UPDATE worktree_memos
|
|
491
597
|
SET ${a.join(", ")}
|
|
492
598
|
WHERE id = ?
|
|
493
599
|
`).run(...o)}function f(e,t){e.prepare(`
|
|
494
600
|
DELETE FROM worktree_memos
|
|
495
601
|
WHERE id = ?
|
|
496
|
-
`).run(t)}function
|
|
602
|
+
`).run(t)}function M(e,t,r){e.prepare(`
|
|
603
|
+
UPDATE worktrees
|
|
604
|
+
SET initial_branch = ?
|
|
605
|
+
WHERE id = ?
|
|
606
|
+
`).run(r,t)}function F(e,t){let r=e.prepare(`
|
|
607
|
+
SELECT initial_branch
|
|
608
|
+
FROM worktrees
|
|
609
|
+
WHERE id = ?
|
|
610
|
+
`).get(t);return r?.initial_branch??null}function y(e,t){return e.prepare(`
|
|
497
611
|
SELECT id FROM worktrees WHERE repository_path = ?
|
|
498
|
-
`).all(t).map(e=>e.id)}function
|
|
612
|
+
`).all(t).map(e=>e.id)}function b(e,t){return{deletedCount:e.prepare(`
|
|
499
613
|
DELETE FROM worktrees WHERE repository_path = ?
|
|
500
|
-
`).run(t).changes}}}
|
|
614
|
+
`).run(t).changes}}function v(e,t){if(0===t.length)return{deletedCount:0};let r=t.map(()=>"?").join(",");return{deletedCount:e.prepare(`
|
|
615
|
+
DELETE FROM worktrees WHERE id IN (${r})
|
|
616
|
+
`).run(...t).changes}}},93346:(e,t,r)=>{r.d(t,{dU:()=>m,Hb:()=>T,LI:()=>c});var s=r(55315),a=r.n(s),o=r(19801);function i(){let e=(0,s.dirname)(__dirname);return e.includes("/lib/node_modules/")||e.includes("\\node_modules\\")||e.includes("/node_modules/commandmate")}r(92048);let _=["/etc","/usr","/bin","/sbin","/var","/tmp","/dev","/sys","/proc"];function n(){return i()?a().join((0,o.homedir)(),".commandmate","data","cm.db"):a().resolve(process.cwd(),"data","cm.db")}function E(e){let t=a().resolve(e);if(i()){let e=(0,o.homedir)();if(!t.startsWith(e))throw Error(`Security error: DB path must be within home directory: ${t}`)}else if(_.some(e=>t.startsWith(e)))throw Error(`Security error: DB path cannot be in system directory: ${t}`);return t}let l={CM_ROOT_DIR:"MCBD_ROOT_DIR",CM_PORT:"MCBD_PORT",CM_BIND:"MCBD_BIND",CM_AUTH_TOKEN:"MCBD_AUTH_TOKEN",CM_LOG_LEVEL:"MCBD_LOG_LEVEL",CM_LOG_FORMAT:"MCBD_LOG_FORMAT",CM_LOG_DIR:"MCBD_LOG_DIR",CM_DB_PATH:"MCBD_DB_PATH"},d=new Set;function T(e){return function(e,t){let r=process.env[e];if(void 0!==r)return r;let s=process.env[t];if(void 0!==s)return d.has(t)||(console.warn(`[DEPRECATED] ${t} is deprecated, use ${e} instead`),d.add(t)),s}(e,l[e])}let p=!1;function c(){let e=T("CM_LOG_LEVEL")?.toLowerCase(),t=T("CM_LOG_FORMAT")?.toLowerCase();return{level:void 0!==e&&["debug","info","warn","error"].includes(e)?e:"info",format:"json"===t?"json":"text"}}function m(){let e;let t=T("CM_ROOT_DIR")||process.cwd(),r=parseInt(T("CM_PORT")||"3000",10),s=T("CM_BIND")||"127.0.0.1",o=T("CM_AUTH_TOKEN"),i=T("CM_DB_PATH")||function(){let e=process.env.DATABASE_PATH;return e&&!p&&(console.warn("[DEPRECATED] DATABASE_PATH is deprecated. Use CM_DB_PATH instead."),p=!0),e}()||n();if(!t)throw Error("CM_ROOT_DIR (or MCBD_ROOT_DIR) is required");if(isNaN(r)||r<1||r>65535)throw Error(`Invalid CM_PORT: ${T("CM_PORT")}. Must be between 1 and 65535.`);if("127.0.0.1"!==s&&"0.0.0.0"!==s&&"localhost"!==s)throw Error(`Invalid CM_BIND: ${s}. Must be '127.0.0.1', '0.0.0.0', or 'localhost'.`);if("0.0.0.0"===s&&!o)throw Error("CM_AUTH_TOKEN (or MCBD_AUTH_TOKEN) is required when CM_BIND=0.0.0.0");try{e=E(i)}catch{console.warn(`[Security] Invalid DB path "${i}", using default.`),e=E(n())}return{CM_ROOT_DIR:a().resolve(t),CM_PORT:r,CM_BIND:s,CM_AUTH_TOKEN:o,CM_DB_PATH:e}}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
exports.id=9723,exports.ids=[9723],exports.modules={58359:()=>{},93739:()=>{},89287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});let r=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,s=/Request ID: ([^\s\n]+)/,o=/Summary: (.+?)(?:\n─|$)/s;function i(e){let t={content:e},n=r.exec(e);n&&(t.logFileName=n[2]);let i=s.exec(e);i&&(t.requestId=i[1]);let l=o.exec(e);return l&&(t.summary=l[1].trim()),t}},76966:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var r=n(75748),s=n(98636);async function o(e,t,n,o="claude"){let i=(0,r.vX)(e,t);if(i)try{await (0,s.xN)(t,i.content,n,o)}catch(e){console.error("[recordClaudeConversation] Failed to create log file:",e)}}},98636:(e,t,n)=>{"use strict";n.d(t,{e7:()=>p,xN:()=>d});var r=n(20629),s=n.n(r),o=n(55315),i=n.n(o),l=n(73853);let a=(0,n(
|
|
1
|
+
exports.id=9723,exports.ids=[9723],exports.modules={58359:()=>{},93739:()=>{},89287:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});let r=/📄 Session log: (.+?\/([^\/\s]+\.jsonl))/,s=/Request ID: ([^\s\n]+)/,o=/Summary: (.+?)(?:\n─|$)/s;function i(e){let t={content:e},n=r.exec(e);n&&(t.logFileName=n[2]);let i=s.exec(e);i&&(t.requestId=i[1]);let l=o.exec(e);return l&&(t.summary=l[1].trim()),t}},76966:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});var r=n(75748),s=n(98636);async function o(e,t,n,o="claude"){let i=(0,r.vX)(e,t);if(i)try{await (0,s.xN)(t,i.content,n,o)}catch(e){console.error("[recordClaudeConversation] Failed to create log file:",e)}}},98636:(e,t,n)=>{"use strict";n.d(t,{e7:()=>p,xN:()=>d});var r=n(20629),s=n.n(r),o=n(55315),i=n.n(o),l=n(73853);let a=(0,n(93346).Hb)("CM_LOG_DIR")||i().join(process.cwd(),"data","logs");function c(e="claude"){return i().join(a,e)}async function u(e="claude"){let t=c(e);try{await s().access(t)}catch{await s().mkdir(t,{recursive:!0})}}async function d(e,t,n,r="claude"){await u(r);let o=function(e,t="claude"){let n=(0,l.WU)(new Date,"yyyy-MM-dd"),r=`${e}-${n}.md`,s=c(t);return i().join(s,r)}(e,r),a=(0,l.WU)(new Date,"yyyy-MM-dd HH:mm:ss"),d="";try{d=await s().readFile(o,"utf-8")}catch{let t="claude"===r?"Claude Code":"codex"===r?"Codex CLI":"Gemini CLI";d=`# ${t} Conversation Log: ${e}
|
|
2
2
|
|
|
3
3
|
Created: ${a}
|
|
4
4
|
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"wasm": [],
|
|
18
18
|
"assets": [],
|
|
19
19
|
"env": {
|
|
20
|
-
"__NEXT_BUILD_ID": "
|
|
21
|
-
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "
|
|
22
|
-
"__NEXT_PREVIEW_MODE_ID": "
|
|
23
|
-
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "
|
|
24
|
-
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "
|
|
20
|
+
"__NEXT_BUILD_ID": "gRNW5YXY43KqCKbCdaJoJ",
|
|
21
|
+
"NEXT_SERVER_ACTIONS_ENCRYPTION_KEY": "SD4iLk4wfGNZOHVEjwGPo7VDXl8nByj4DkEJwAOrBmk=",
|
|
22
|
+
"__NEXT_PREVIEW_MODE_ID": "cd838fec255a21214ed4f485002cc6b8",
|
|
23
|
+
"__NEXT_PREVIEW_MODE_ENCRYPTION_KEY": "2aa1530b2941fb807c0a9a69c1bf07d98c7f3423bed5739e01dfc9e8c0ea833d",
|
|
24
|
+
"__NEXT_PREVIEW_MODE_SIGNING_KEY": "ce4a155222996d432fa485d254421961421ee39e65c1c802e05a2f151979fc54"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="ja"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/376b339640084689.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-3fc79fab9bb738d7.js"/><script src="/_next/static/chunks/fd9d1056-bbe86e4ae099d5cd.js" async=""></script><script src="/_next/static/chunks/2117-d845c2cd62e344a6.js" async=""></script><script src="/_next/static/chunks/main-app-420d93e43682fee5.js" async=""></script><script src="/_next/static/chunks/816-7e340dad784be28c.js" async=""></script><script src="/_next/static/chunks/app/layout-37e55f11dcc8b1bf.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>CommandMate</title><meta name="description" content="Git worktree management with Claude CLI and tmux sessions"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="min-h-screen bg-gray-50"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-3fc79fab9bb738d7.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/376b339640084689.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[12846,[],\"\"]\n4:I[4707,[],\"\"]\n5:I[36423,[],\"\"]\n6:I[91795,[\"816\",\"static/chunks/816-7e340dad784be28c.js\",\"3185\",\"static/chunks/app/layout-37e55f11dcc8b1bf.js\"],\"AppProviders\"]\nc:I[61060,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"gRNW5YXY43KqCKbCdaJoJ\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/376b339640084689.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"ja\",\"children\":[\"$\",\"body\",null,{\"className\":\"min-h-screen bg-gray-50\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"CommandMate\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Git worktree management with Claude CLI and tmux sessions\"}]]\n3:null\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-3fc79fab9bb738d7.js" defer=""></script><script src="/_next/static/chunks/framework-8e0e0f4a6b83a956.js" defer=""></script><script src="/_next/static/chunks/main-a960f4a5e1a2f598.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3c9ca398d360b709.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js" defer=""></script><script src="/_next/static/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-42372ed130431b0a.js"></script><script src="/_next/static/chunks/webpack-3fc79fab9bb738d7.js" defer=""></script><script src="/_next/static/chunks/framework-8e0e0f4a6b83a956.js" defer=""></script><script src="/_next/static/chunks/main-a960f4a5e1a2f598.js" defer=""></script><script src="/_next/static/chunks/pages/_app-3c9ca398d360b709.js" defer=""></script><script src="/_next/static/chunks/pages/_error-cf5ca766ac8f493f.js" defer=""></script><script src="/_next/static/gRNW5YXY43KqCKbCdaJoJ/_buildManifest.js" defer=""></script><script src="/_next/static/gRNW5YXY43KqCKbCdaJoJ/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"gRNW5YXY43KqCKbCdaJoJ","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"SD4iLk4wfGNZOHVEjwGPo7VDXl8nByj4DkEJwAOrBmk="}
|