vibeman 0.0.3 → 0.0.6
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/dist/api.js +49 -0
- package/dist/cli.js +135 -0
- package/dist/ui/index-gnk6rhxs.js +9 -0
- package/dist/ui/index.html +10 -0
- package/dist/ui/index.js +2 -0
- package/package.json +10 -80
- package/README.md +0 -12
- package/dist/index.js +0 -114
- package/dist/runtime/api/.tsbuildinfo +0 -1
- package/dist/runtime/api/agent/agent-service.d.ts +0 -225
- package/dist/runtime/api/agent/agent-service.js +0 -904
- package/dist/runtime/api/agent/ai-providers/claude-code-adapter.d.ts +0 -61
- package/dist/runtime/api/agent/ai-providers/claude-code-adapter.js +0 -362
- package/dist/runtime/api/agent/ai-providers/codex-cli-provider.d.ts +0 -36
- package/dist/runtime/api/agent/ai-providers/codex-cli-provider.js +0 -347
- package/dist/runtime/api/agent/ai-providers/index.d.ts +0 -9
- package/dist/runtime/api/agent/ai-providers/index.js +0 -7
- package/dist/runtime/api/agent/ai-providers/types.d.ts +0 -182
- package/dist/runtime/api/agent/ai-providers/types.js +0 -5
- package/dist/runtime/api/agent/codex-cli-provider.test.d.ts +0 -1
- package/dist/runtime/api/agent/codex-cli-provider.test.js +0 -170
- package/dist/runtime/api/agent/core-agent-service.d.ts +0 -119
- package/dist/runtime/api/agent/core-agent-service.js +0 -267
- package/dist/runtime/api/agent/parsers.d.ts +0 -16
- package/dist/runtime/api/agent/parsers.js +0 -308
- package/dist/runtime/api/agent/prompt-service.d.ts +0 -30
- package/dist/runtime/api/agent/prompt-service.js +0 -449
- package/dist/runtime/api/agent/prompt-service.test.d.ts +0 -1
- package/dist/runtime/api/agent/prompt-service.test.js +0 -230
- package/dist/runtime/api/agent/routing-policy.d.ts +0 -171
- package/dist/runtime/api/agent/routing-policy.js +0 -196
- package/dist/runtime/api/agent/routing-policy.test.d.ts +0 -1
- package/dist/runtime/api/agent/routing-policy.test.js +0 -63
- package/dist/runtime/api/api/router-helpers.d.ts +0 -32
- package/dist/runtime/api/api/router-helpers.js +0 -31
- package/dist/runtime/api/api/routers/ai.d.ts +0 -200
- package/dist/runtime/api/api/routers/ai.js +0 -396
- package/dist/runtime/api/api/routers/executions.d.ts +0 -98
- package/dist/runtime/api/api/routers/executions.js +0 -94
- package/dist/runtime/api/api/routers/git.d.ts +0 -45
- package/dist/runtime/api/api/routers/git.js +0 -35
- package/dist/runtime/api/api/routers/provider-config.d.ts +0 -165
- package/dist/runtime/api/api/routers/provider-config.js +0 -252
- package/dist/runtime/api/api/routers/settings.d.ts +0 -139
- package/dist/runtime/api/api/routers/settings.js +0 -113
- package/dist/runtime/api/api/routers/tasks.d.ts +0 -141
- package/dist/runtime/api/api/routers/tasks.js +0 -238
- package/dist/runtime/api/api/routers/workflows.d.ts +0 -275
- package/dist/runtime/api/api/routers/workflows.js +0 -311
- package/dist/runtime/api/api/routers/worktrees.d.ts +0 -101
- package/dist/runtime/api/api/routers/worktrees.js +0 -80
- package/dist/runtime/api/api/trpc.d.ts +0 -118
- package/dist/runtime/api/api/trpc.js +0 -34
- package/dist/runtime/api/index.d.ts +0 -9
- package/dist/runtime/api/index.js +0 -117
- package/dist/runtime/api/lib/id-generator.d.ts +0 -70
- package/dist/runtime/api/lib/id-generator.js +0 -123
- package/dist/runtime/api/lib/local-config.d.ts +0 -245
- package/dist/runtime/api/lib/local-config.js +0 -288
- package/dist/runtime/api/lib/logger.d.ts +0 -11
- package/dist/runtime/api/lib/logger.js +0 -188
- package/dist/runtime/api/lib/provider-detection.d.ts +0 -59
- package/dist/runtime/api/lib/provider-detection.js +0 -244
- package/dist/runtime/api/lib/server/agent-service-singleton.d.ts +0 -6
- package/dist/runtime/api/lib/server/agent-service-singleton.js +0 -27
- package/dist/runtime/api/lib/server/bootstrap.d.ts +0 -38
- package/dist/runtime/api/lib/server/bootstrap.js +0 -197
- package/dist/runtime/api/lib/server/git-service-singleton.d.ts +0 -6
- package/dist/runtime/api/lib/server/git-service-singleton.js +0 -47
- package/dist/runtime/api/lib/server/project-root.d.ts +0 -2
- package/dist/runtime/api/lib/server/project-root.js +0 -61
- package/dist/runtime/api/lib/server/task-service-singleton.d.ts +0 -7
- package/dist/runtime/api/lib/server/task-service-singleton.js +0 -58
- package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.d.ts +0 -7
- package/dist/runtime/api/lib/server/vibing-orchestrator-singleton.js +0 -57
- package/dist/runtime/api/lib/trpc/client.d.ts +0 -1
- package/dist/runtime/api/lib/trpc/client.js +0 -5
- package/dist/runtime/api/lib/trpc/server.d.ts +0 -935
- package/dist/runtime/api/lib/trpc/server.js +0 -11
- package/dist/runtime/api/lib/trpc/ws-server.d.ts +0 -8
- package/dist/runtime/api/lib/trpc/ws-server.js +0 -33
- package/dist/runtime/api/persistence/database-service.d.ts +0 -14
- package/dist/runtime/api/persistence/database-service.js +0 -74
- package/dist/runtime/api/persistence/execution-log-persistence.d.ts +0 -90
- package/dist/runtime/api/persistence/execution-log-persistence.js +0 -410
- package/dist/runtime/api/persistence/execution-log-persistence.test.d.ts +0 -1
- package/dist/runtime/api/persistence/execution-log-persistence.test.js +0 -170
- package/dist/runtime/api/router.d.ts +0 -938
- package/dist/runtime/api/router.js +0 -34
- package/dist/runtime/api/settings-service.d.ts +0 -110
- package/dist/runtime/api/settings-service.js +0 -661
- package/dist/runtime/api/tasks/file-watcher.d.ts +0 -23
- package/dist/runtime/api/tasks/file-watcher.js +0 -88
- package/dist/runtime/api/tasks/task-file-parser.d.ts +0 -13
- package/dist/runtime/api/tasks/task-file-parser.js +0 -161
- package/dist/runtime/api/tasks/task-service.d.ts +0 -36
- package/dist/runtime/api/tasks/task-service.js +0 -173
- package/dist/runtime/api/types/index.d.ts +0 -186
- package/dist/runtime/api/types/index.js +0 -1
- package/dist/runtime/api/types/settings.d.ts +0 -94
- package/dist/runtime/api/types/settings.js +0 -2
- package/dist/runtime/api/types.d.ts +0 -2
- package/dist/runtime/api/types.js +0 -1
- package/dist/runtime/api/utils/env.d.ts +0 -6
- package/dist/runtime/api/utils/env.js +0 -12
- package/dist/runtime/api/utils/stripNextEnv.d.ts +0 -7
- package/dist/runtime/api/utils/stripNextEnv.js +0 -22
- package/dist/runtime/api/utils/title-slug.d.ts +0 -6
- package/dist/runtime/api/utils/title-slug.js +0 -77
- package/dist/runtime/api/utils/url.d.ts +0 -2
- package/dist/runtime/api/utils/url.js +0 -19
- package/dist/runtime/api/vcs/git-history-service.d.ts +0 -57
- package/dist/runtime/api/vcs/git-history-service.js +0 -228
- package/dist/runtime/api/vcs/git-service.d.ts +0 -127
- package/dist/runtime/api/vcs/git-service.js +0 -284
- package/dist/runtime/api/vcs/worktree-service.d.ts +0 -93
- package/dist/runtime/api/vcs/worktree-service.js +0 -506
- package/dist/runtime/api/vcs/worktree-service.test.d.ts +0 -1
- package/dist/runtime/api/vcs/worktree-service.test.js +0 -20
- package/dist/runtime/api/workflows/quality-pipeline.d.ts +0 -58
- package/dist/runtime/api/workflows/quality-pipeline.js +0 -400
- package/dist/runtime/api/workflows/vibing-orchestrator.d.ts +0 -318
- package/dist/runtime/api/workflows/vibing-orchestrator.js +0 -1891
- package/dist/runtime/web/.next/BUILD_ID +0 -1
- package/dist/runtime/web/.next/app-build-manifest.json +0 -66
- package/dist/runtime/web/.next/app-path-routes-manifest.json +0 -8
- package/dist/runtime/web/.next/build-manifest.json +0 -33
- package/dist/runtime/web/.next/package.json +0 -1
- package/dist/runtime/web/.next/prerender-manifest.json +0 -61
- package/dist/runtime/web/.next/react-loadable-manifest.json +0 -39
- package/dist/runtime/web/.next/required-server-files.json +0 -334
- package/dist/runtime/web/.next/routes-manifest.json +0 -70
- package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js +0 -1
- package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/.vibeman/assets/images/[...path]/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/_not-found/page.js +0 -2
- package/dist/runtime/web/.next/server/app/_not-found/page.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/_not-found.html +0 -7
- package/dist/runtime/web/.next/server/app/_not-found.meta +0 -8
- package/dist/runtime/web/.next/server/app/_not-found.rsc +0 -22
- package/dist/runtime/web/.next/server/app/api/health/route.js +0 -1
- package/dist/runtime/web/.next/server/app/api/health/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/api/health/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js +0 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/api/images/[...path]/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/api/upload/route.js +0 -1
- package/dist/runtime/web/.next/server/app/api/upload/route.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/api/upload/route_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app/index.html +0 -7
- package/dist/runtime/web/.next/server/app/index.meta +0 -7
- package/dist/runtime/web/.next/server/app/index.rsc +0 -27
- package/dist/runtime/web/.next/server/app/page.js +0 -147
- package/dist/runtime/web/.next/server/app/page.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/app/page_client-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/app-paths-manifest.json +0 -8
- package/dist/runtime/web/.next/server/chunks/217.js +0 -1
- package/dist/runtime/web/.next/server/chunks/383.js +0 -6
- package/dist/runtime/web/.next/server/chunks/458.js +0 -1
- package/dist/runtime/web/.next/server/chunks/576.js +0 -18
- package/dist/runtime/web/.next/server/chunks/635.js +0 -22
- package/dist/runtime/web/.next/server/chunks/761.js +0 -1
- package/dist/runtime/web/.next/server/chunks/777.js +0 -3
- package/dist/runtime/web/.next/server/chunks/825.js +0 -1
- package/dist/runtime/web/.next/server/chunks/838.js +0 -1
- package/dist/runtime/web/.next/server/chunks/973.js +0 -15
- package/dist/runtime/web/.next/server/functions-config-manifest.json +0 -4
- package/dist/runtime/web/.next/server/middleware-build-manifest.js +0 -1
- package/dist/runtime/web/.next/server/middleware-manifest.json +0 -6
- package/dist/runtime/web/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/dist/runtime/web/.next/server/next-font-manifest.js +0 -1
- package/dist/runtime/web/.next/server/next-font-manifest.json +0 -1
- package/dist/runtime/web/.next/server/pages/404.html +0 -7
- package/dist/runtime/web/.next/server/pages/500.html +0 -1
- package/dist/runtime/web/.next/server/pages/_app.js +0 -1
- package/dist/runtime/web/.next/server/pages/_app.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/pages/_document.js +0 -1
- package/dist/runtime/web/.next/server/pages/_document.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/pages/_error.js +0 -19
- package/dist/runtime/web/.next/server/pages/_error.js.nft.json +0 -1
- package/dist/runtime/web/.next/server/pages-manifest.json +0 -6
- package/dist/runtime/web/.next/server/server-reference-manifest.js +0 -1
- package/dist/runtime/web/.next/server/server-reference-manifest.json +0 -1
- package/dist/runtime/web/.next/server/webpack-runtime.js +0 -1
- package/dist/runtime/web/.next/static/5_15u1WQCxN1_eHZpldCv/_buildManifest.js +0 -1
- package/dist/runtime/web/.next/static/5_15u1WQCxN1_eHZpldCv/_ssgManifest.js +0 -1
- package/dist/runtime/web/.next/static/chunks/18-15c10d3288afef2e.js +0 -1
- package/dist/runtime/web/.next/static/chunks/1c0ca389.537bbe362e3ffbd9.js +0 -3
- package/dist/runtime/web/.next/static/chunks/22747d63-ad5da0c19f4cfe41.js +0 -71
- package/dist/runtime/web/.next/static/chunks/355.056c2645878a799a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/420.a5ccf151c9e2b2f1.js +0 -1
- package/dist/runtime/web/.next/static/chunks/439.1be0c6242fd248d5.js +0 -15
- package/dist/runtime/web/.next/static/chunks/440.c52e7c0f797e22b2.js +0 -1
- package/dist/runtime/web/.next/static/chunks/575-e2478287c27da87b.js +0 -1
- package/dist/runtime/web/.next/static/chunks/691.920d88c115087314.js +0 -1
- package/dist/runtime/web/.next/static/chunks/765-e838910065b50c3d.js +0 -1
- package/dist/runtime/web/.next/static/chunks/823-6f371a6e829adbba.js +0 -63
- package/dist/runtime/web/.next/static/chunks/87c73c54-09e1ba5c70e60a51.js +0 -1
- package/dist/runtime/web/.next/static/chunks/891cff7f.0f71fc028f87e683.js +0 -1
- package/dist/runtime/web/.next/static/chunks/8bb4d8db-3e2aa02b0a2384b9.js +0 -1
- package/dist/runtime/web/.next/static/chunks/9af238c7-271a911d4e99ab18.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/.vibeman/assets/images/[...path]/route-751c9265a65409e5.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/_not-found/page-1cb74d1cba27d0ab.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/api/health/route-751c9265a65409e5.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/api/images/[...path]/route-751c9265a65409e5.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/api/upload/route-751c9265a65409e5.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/layout-8435322f09fd0975.js +0 -1
- package/dist/runtime/web/.next/static/chunks/app/page-9fe7d75095b4ccec.js +0 -1
- package/dist/runtime/web/.next/static/chunks/cac567b0-5b77dd12911823cd.js +0 -1
- package/dist/runtime/web/.next/static/chunks/framework-2518f1345b5b2806.js +0 -1
- package/dist/runtime/web/.next/static/chunks/main-17665e5e39de9a8a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/main-app-c0b0f5ba4f7f9d75.js +0 -1
- package/dist/runtime/web/.next/static/chunks/pages/_app-d6f6b3bbc3d81ee1.js +0 -1
- package/dist/runtime/web/.next/static/chunks/pages/_error-75a96cf1997cc3b9.js +0 -1
- package/dist/runtime/web/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/dist/runtime/web/.next/static/chunks/webpack-c8de37305b4635cf.js +0 -1
- package/dist/runtime/web/.next/static/css/08c950681f1a9a92.css +0 -1
- package/dist/runtime/web/.next/static/css/2728291c68f99cb1.css +0 -3
- package/dist/runtime/web/.next/static/css/521bd69cc298cd1a.css +0 -1
- package/dist/runtime/web/.next/static/css/537e22821e101b87.css +0 -1
- package/dist/runtime/web/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
- package/dist/runtime/web/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
- package/dist/runtime/web/package.json +0 -65
- package/dist/runtime/web/server.js +0 -44
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import { EventEmitter } from 'events';
|
|
4
|
-
import { log } from '../lib/logger.js';
|
|
5
|
-
export class FileWatcher extends EventEmitter {
|
|
6
|
-
constructor(watchDir, options = {}) {
|
|
7
|
-
super();
|
|
8
|
-
this.watcher = null;
|
|
9
|
-
this.pendingChanges = new Map();
|
|
10
|
-
this.watchDir = path.resolve(watchDir);
|
|
11
|
-
this.options = {
|
|
12
|
-
recursive: false,
|
|
13
|
-
debounceMs: 100,
|
|
14
|
-
fileFilter: () => true,
|
|
15
|
-
...options,
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
start() {
|
|
19
|
-
if (this.watcher) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
// Check if directory exists
|
|
23
|
-
if (!fs.existsSync(this.watchDir)) {
|
|
24
|
-
const error = new Error(`Watch directory does not exist: ${this.watchDir}`);
|
|
25
|
-
log.error('FileWatcher start failed', error, 'file-watcher');
|
|
26
|
-
this.emit('error', error);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
this.watcher = fs.watch(this.watchDir, { recursive: this.options.recursive }, (eventType, filename) => {
|
|
30
|
-
if (filename && this.options.fileFilter(filename)) {
|
|
31
|
-
this.debounceFileChange(filename);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
log.debug('FileWatcher started', { watchDir: this.watchDir }, 'file-watcher');
|
|
35
|
-
}
|
|
36
|
-
stop() {
|
|
37
|
-
if (this.watcher) {
|
|
38
|
-
this.watcher.close();
|
|
39
|
-
this.watcher = null;
|
|
40
|
-
// Clear all pending timeouts
|
|
41
|
-
for (const timeout of this.pendingChanges.values()) {
|
|
42
|
-
clearTimeout(timeout);
|
|
43
|
-
}
|
|
44
|
-
this.pendingChanges.clear();
|
|
45
|
-
log.info('FileWatcher stopped', { watchDir: this.watchDir }, 'file-watcher');
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
debounceFileChange(filename) {
|
|
49
|
-
// Clear any existing timeout for this file
|
|
50
|
-
const existingTimeout = this.pendingChanges.get(filename);
|
|
51
|
-
if (existingTimeout) {
|
|
52
|
-
clearTimeout(existingTimeout);
|
|
53
|
-
}
|
|
54
|
-
// Set a new timeout to handle the change after a short delay
|
|
55
|
-
const timeout = setTimeout(() => {
|
|
56
|
-
this.handleFileChange(filename);
|
|
57
|
-
this.pendingChanges.delete(filename);
|
|
58
|
-
}, this.options.debounceMs);
|
|
59
|
-
this.pendingChanges.set(filename, timeout);
|
|
60
|
-
}
|
|
61
|
-
async handleFileChange(filename) {
|
|
62
|
-
const fullPath = path.join(this.watchDir, filename);
|
|
63
|
-
try {
|
|
64
|
-
const fileExists = await this.fileExists(fullPath);
|
|
65
|
-
const changeType = fileExists ? 'updated' : 'deleted';
|
|
66
|
-
const event = {
|
|
67
|
-
type: changeType,
|
|
68
|
-
filename,
|
|
69
|
-
fullPath,
|
|
70
|
-
};
|
|
71
|
-
this.emit('fileChanged', event);
|
|
72
|
-
log.debug(`File ${changeType}: ${filename}`, { filename, fullPath, type: changeType }, 'file-watcher');
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
log.error(`Error processing file change for ${filename}`, error, 'file-watcher');
|
|
76
|
-
this.emit('error', error);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
async fileExists(filePath) {
|
|
80
|
-
try {
|
|
81
|
-
await fs.promises.access(filePath);
|
|
82
|
-
return true;
|
|
83
|
-
}
|
|
84
|
-
catch {
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Task } from '../types/index.js';
|
|
2
|
-
export declare class TaskFileParser {
|
|
3
|
-
private baseDir;
|
|
4
|
-
constructor(baseDir: string);
|
|
5
|
-
parseFile(filePath: string): Promise<Task | null>;
|
|
6
|
-
parseDirectory(dirPath?: string): Promise<Task[]>;
|
|
7
|
-
parseContent(content: string, filePath?: string): Promise<Task | null>;
|
|
8
|
-
private getFileStats;
|
|
9
|
-
writeTask(task: Task): Promise<void>;
|
|
10
|
-
deleteTask(taskId: string): Promise<void>;
|
|
11
|
-
generateFilePath(task: Task): string;
|
|
12
|
-
generateFilePathFromId(taskId: string): string;
|
|
13
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import fs from 'fs/promises';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import matter from 'gray-matter';
|
|
4
|
-
import { log } from '../lib/logger.js';
|
|
5
|
-
export class TaskFileParser {
|
|
6
|
-
constructor(baseDir) {
|
|
7
|
-
this.baseDir = baseDir;
|
|
8
|
-
}
|
|
9
|
-
async parseFile(filePath) {
|
|
10
|
-
try {
|
|
11
|
-
const content = await fs.readFile(filePath, 'utf-8');
|
|
12
|
-
return await this.parseContent(content, filePath);
|
|
13
|
-
}
|
|
14
|
-
catch (error) {
|
|
15
|
-
log.error(`Error reading file ${filePath}`, error, 'task-file-parser:parseFile');
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
async parseDirectory(dirPath) {
|
|
20
|
-
const targetDir = dirPath || this.baseDir;
|
|
21
|
-
try {
|
|
22
|
-
const files = await fs.readdir(targetDir);
|
|
23
|
-
const markdownFiles = files.filter((file) => file.endsWith('.md'));
|
|
24
|
-
const tasks = [];
|
|
25
|
-
for (const file of markdownFiles) {
|
|
26
|
-
const filePath = path.join(targetDir, file);
|
|
27
|
-
const task = await this.parseFile(filePath);
|
|
28
|
-
if (task) {
|
|
29
|
-
tasks.push(task);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
// Sort by ID for consistent ordering
|
|
33
|
-
return tasks.sort((a, b) => a.id.localeCompare(b.id));
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
log.error(`Error reading directory ${targetDir}`, error, 'task-file-parser:parseDirectory');
|
|
37
|
-
return [];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
async parseContent(content, filePath) {
|
|
41
|
-
try {
|
|
42
|
-
const parsed = matter(content);
|
|
43
|
-
const metadata = parsed.data;
|
|
44
|
-
// Validate required fields
|
|
45
|
-
if (!metadata.id || !metadata.title || !metadata.type || !metadata.status) {
|
|
46
|
-
log.error(`Invalid task metadata in ${filePath}`, { metadata, filePath }, 'task-file-parser:parseContent');
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
// Validate enum values
|
|
50
|
-
const validTypes = ['feature', 'bug', 'chore', 'refactor', 'test', 'doc'];
|
|
51
|
-
const validStatuses = ['backlog', 'in-progress', 'review', 'done'];
|
|
52
|
-
const validPriorities = ['low', 'medium', 'high'];
|
|
53
|
-
if (!validTypes.includes(metadata.type)) {
|
|
54
|
-
log.error(`Invalid task type '${metadata.type}' in ${filePath}`, { type: metadata.type, filePath, validTypes }, 'task-file-parser:parseContent');
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
if (!validStatuses.includes(metadata.status)) {
|
|
58
|
-
log.error(`Invalid task status '${metadata.status}' in ${filePath}`, { status: metadata.status, filePath, validStatuses }, 'task-file-parser:parseContent');
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
if (metadata.priority && !validPriorities.includes(metadata.priority)) {
|
|
62
|
-
log.error(`Invalid task priority '${metadata.priority}' in ${filePath}`, { priority: metadata.priority, filePath, validPriorities }, 'task-file-parser:parseContent');
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
const now = new Date().toISOString();
|
|
66
|
-
const stats = filePath ? await this.getFileStats(filePath) : null;
|
|
67
|
-
const task = {
|
|
68
|
-
id: metadata.id,
|
|
69
|
-
title: metadata.title,
|
|
70
|
-
type: metadata.type,
|
|
71
|
-
status: metadata.status,
|
|
72
|
-
tags: Array.isArray(metadata.tags) ? metadata.tags : [],
|
|
73
|
-
due_date: metadata.due_date
|
|
74
|
-
? metadata.due_date instanceof Date
|
|
75
|
-
? metadata.due_date.toISOString().split('T')[0]
|
|
76
|
-
: String(metadata.due_date)
|
|
77
|
-
: undefined,
|
|
78
|
-
assignee: Array.isArray(metadata.assignee)
|
|
79
|
-
? metadata.assignee
|
|
80
|
-
: metadata.assignee
|
|
81
|
-
? [metadata.assignee]
|
|
82
|
-
: [],
|
|
83
|
-
priority: metadata.priority || 'medium',
|
|
84
|
-
comments: Array.isArray(metadata.comments)
|
|
85
|
-
? metadata.comments
|
|
86
|
-
: metadata.comments
|
|
87
|
-
? [metadata.comments]
|
|
88
|
-
: [],
|
|
89
|
-
deleted_at: metadata.deleted_at ? String(metadata.deleted_at) : undefined,
|
|
90
|
-
content: parsed.content.trim(),
|
|
91
|
-
created_at: stats?.birthtime && !isNaN(stats.birthtime.getTime())
|
|
92
|
-
? stats.birthtime.toISOString()
|
|
93
|
-
: now,
|
|
94
|
-
updated_at: stats?.mtime && !isNaN(stats.mtime.getTime()) ? stats.mtime.toISOString() : now,
|
|
95
|
-
};
|
|
96
|
-
return task;
|
|
97
|
-
}
|
|
98
|
-
catch (error) {
|
|
99
|
-
log.error(`Error parsing task content from ${filePath}`, error, 'task-file-parser:parseContent');
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
async getFileStats(filePath) {
|
|
104
|
-
try {
|
|
105
|
-
return await fs.stat(filePath);
|
|
106
|
-
}
|
|
107
|
-
catch {
|
|
108
|
-
return null;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
async writeTask(task) {
|
|
112
|
-
const filePath = this.generateFilePath(task);
|
|
113
|
-
const frontMatter = {
|
|
114
|
-
id: task.id,
|
|
115
|
-
title: task.title,
|
|
116
|
-
type: task.type,
|
|
117
|
-
status: task.status,
|
|
118
|
-
tags: task.tags.join(', ') || '',
|
|
119
|
-
due_date: task.due_date || '',
|
|
120
|
-
assignee: task.assignee?.join(', ') || '',
|
|
121
|
-
priority: task.priority,
|
|
122
|
-
comments: task.comments?.join(', ') || '',
|
|
123
|
-
deleted_at: task.deleted_at || '',
|
|
124
|
-
};
|
|
125
|
-
// Compose the file so there is always exactly one blank line
|
|
126
|
-
// between the front matter and the content body.
|
|
127
|
-
// 1) Build only front matter
|
|
128
|
-
let fmOnly = matter.stringify('', frontMatter);
|
|
129
|
-
// 2) Normalize trailing newlines on FM to exactly one
|
|
130
|
-
fmOnly = fmOnly.replace(/\n*$/, '\n');
|
|
131
|
-
// 3) Normalize leading newlines on body
|
|
132
|
-
const body = (task.content || '').replace(/^[\r\n]+/, '');
|
|
133
|
-
// 4) Join with exactly one extra newline to create a single blank line
|
|
134
|
-
const fileContent = body ? fmOnly + '\n' + body : fmOnly;
|
|
135
|
-
try {
|
|
136
|
-
await fs.writeFile(filePath, fileContent, 'utf-8');
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
log.error(`Error writing task file ${filePath}`, error, 'task-file-parser:writeTask');
|
|
140
|
-
throw error;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async deleteTask(taskId) {
|
|
144
|
-
const filePath = this.generateFilePathFromId(taskId);
|
|
145
|
-
try {
|
|
146
|
-
await fs.unlink(filePath);
|
|
147
|
-
}
|
|
148
|
-
catch (error) {
|
|
149
|
-
log.error(`Error deleting task file ${filePath}`, error, 'task-file-parser:deleteTask');
|
|
150
|
-
throw error;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
generateFilePath(task) {
|
|
154
|
-
const fileName = `${task.id}.md`;
|
|
155
|
-
return path.join(this.baseDir, fileName);
|
|
156
|
-
}
|
|
157
|
-
generateFilePathFromId(taskId) {
|
|
158
|
-
const fileName = `${taskId}.md`;
|
|
159
|
-
return path.join(this.baseDir, fileName);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
import { Task } from '../types/index.js';
|
|
3
|
-
export declare class TaskService extends EventEmitter {
|
|
4
|
-
private tasks;
|
|
5
|
-
private fileWatcher;
|
|
6
|
-
private taskParser;
|
|
7
|
-
private tasksDir;
|
|
8
|
-
private initialized;
|
|
9
|
-
constructor(vibeDir: string);
|
|
10
|
-
private handleFileChange;
|
|
11
|
-
private extractTaskIdFromFilename;
|
|
12
|
-
initialize(): Promise<void>;
|
|
13
|
-
ensureInitialized(): Promise<void>;
|
|
14
|
-
stop(): void;
|
|
15
|
-
getAllTasks(): Task[];
|
|
16
|
-
getActiveTasks(): Task[];
|
|
17
|
-
getTask(id: string): Task | undefined;
|
|
18
|
-
getTasksByStatus(status: Task['status']): Task[];
|
|
19
|
-
getTasksByType(type: Task['type']): Task[];
|
|
20
|
-
searchTasks(query: string): Task[];
|
|
21
|
-
createTask(taskData: Omit<Task, 'id' | 'created_at' | 'updated_at'> & {
|
|
22
|
-
id?: string;
|
|
23
|
-
}): Promise<Task>;
|
|
24
|
-
updateTask(id: string, updates: Partial<Task>): Promise<Task>;
|
|
25
|
-
deleteTask(id: string): Promise<void>;
|
|
26
|
-
moveTask(id: string, newStatus: Task['status']): Promise<Task>;
|
|
27
|
-
getTaskStats(): {
|
|
28
|
-
total: number;
|
|
29
|
-
backlog: number;
|
|
30
|
-
'in-progress': number;
|
|
31
|
-
review: number;
|
|
32
|
-
done: number;
|
|
33
|
-
byType: Record<Task["type"], number>;
|
|
34
|
-
byPriority: Record<Task["priority"], number>;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
import { FileWatcher } from './file-watcher.js';
|
|
3
|
-
import { TaskFileParser } from './task-file-parser.js';
|
|
4
|
-
import { generateHumanTaskId } from '../utils/title-slug.js';
|
|
5
|
-
import { log } from '../lib/logger.js';
|
|
6
|
-
import fs from 'fs/promises';
|
|
7
|
-
export class TaskService extends EventEmitter {
|
|
8
|
-
constructor(vibeDir) {
|
|
9
|
-
super();
|
|
10
|
-
this.tasks = new Map();
|
|
11
|
-
this.initialized = false;
|
|
12
|
-
this.tasksDir = `${vibeDir}/tasks`;
|
|
13
|
-
this.fileWatcher = new FileWatcher(this.tasksDir, {
|
|
14
|
-
fileFilter: (filename) => filename.endsWith('.md'),
|
|
15
|
-
});
|
|
16
|
-
this.taskParser = new TaskFileParser(this.tasksDir);
|
|
17
|
-
this.fileWatcher.on('fileChanged', async (event) => {
|
|
18
|
-
try {
|
|
19
|
-
await this.handleFileChange(event);
|
|
20
|
-
}
|
|
21
|
-
catch (error) {
|
|
22
|
-
log.error('Error handling file change', error, 'task-service');
|
|
23
|
-
this.emit('error', error);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
this.fileWatcher.on('error', (error) => {
|
|
27
|
-
log.error('FileWatcher error', error, 'task-service');
|
|
28
|
-
this.emit('error', error);
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
async handleFileChange(event) {
|
|
32
|
-
const { type, filename, fullPath } = event;
|
|
33
|
-
if (type === 'deleted') {
|
|
34
|
-
const taskId = this.extractTaskIdFromFilename(filename);
|
|
35
|
-
if (taskId && this.tasks.has(taskId)) {
|
|
36
|
-
this.tasks.delete(taskId);
|
|
37
|
-
this.emit('taskDeleted', taskId);
|
|
38
|
-
log.info('Task deleted', { taskId }, 'task-service');
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
// File exists, parse and update
|
|
43
|
-
const task = await this.taskParser.parseFile(fullPath);
|
|
44
|
-
if (task) {
|
|
45
|
-
this.tasks.set(task.id, task);
|
|
46
|
-
this.emit('taskUpdated', task);
|
|
47
|
-
log.info(`Task updated from file change: ${task.id}`, { taskId: task.id, filename }, 'task-service');
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
log.warn(`Failed to parse task from ${filename}`, { filename }, 'task-service');
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
extractTaskIdFromFilename(filename) {
|
|
55
|
-
// Use the basename (without extension) as ID, supports multi-hyphen IDs
|
|
56
|
-
return filename.endsWith('.md') ? filename.slice(0, -3) : null;
|
|
57
|
-
}
|
|
58
|
-
async initialize() {
|
|
59
|
-
if (this.initialized) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
// Ensure directories exist
|
|
63
|
-
await fs.mkdir(this.tasksDir, { recursive: true });
|
|
64
|
-
// Load existing tasks
|
|
65
|
-
const tasks = await this.taskParser.parseDirectory();
|
|
66
|
-
for (const task of tasks) {
|
|
67
|
-
this.tasks.set(task.id, task);
|
|
68
|
-
}
|
|
69
|
-
// Start file watcher
|
|
70
|
-
this.fileWatcher.start();
|
|
71
|
-
this.initialized = true;
|
|
72
|
-
}
|
|
73
|
-
async ensureInitialized() {
|
|
74
|
-
if (!this.initialized) {
|
|
75
|
-
await this.initialize();
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
stop() {
|
|
79
|
-
this.fileWatcher.stop();
|
|
80
|
-
this.tasks.clear();
|
|
81
|
-
this.initialized = false;
|
|
82
|
-
log.info('Task Service stopped', undefined, 'task-service');
|
|
83
|
-
}
|
|
84
|
-
// Task CRUD operations
|
|
85
|
-
getAllTasks() {
|
|
86
|
-
return Array.from(this.tasks.values());
|
|
87
|
-
}
|
|
88
|
-
// Get all non-deleted tasks (excludes soft-deleted tasks)
|
|
89
|
-
getActiveTasks() {
|
|
90
|
-
return Array.from(this.tasks.values()).filter((task) => !task.deleted_at);
|
|
91
|
-
}
|
|
92
|
-
getTask(id) {
|
|
93
|
-
return this.tasks.get(id);
|
|
94
|
-
}
|
|
95
|
-
getTasksByStatus(status) {
|
|
96
|
-
return this.getAllTasks().filter((task) => task.status === status);
|
|
97
|
-
}
|
|
98
|
-
getTasksByType(type) {
|
|
99
|
-
return this.getAllTasks().filter((task) => task.type === type);
|
|
100
|
-
}
|
|
101
|
-
searchTasks(query) {
|
|
102
|
-
const searchTerm = query.toLowerCase();
|
|
103
|
-
return this.getAllTasks().filter((task) => task.title.toLowerCase().includes(searchTerm) ||
|
|
104
|
-
task.content.toLowerCase().includes(searchTerm) ||
|
|
105
|
-
task.tags.some((tag) => tag.toLowerCase().includes(searchTerm)));
|
|
106
|
-
}
|
|
107
|
-
async createTask(taskData) {
|
|
108
|
-
const now = new Date().toISOString();
|
|
109
|
-
// Generate human-readable ID if not provided
|
|
110
|
-
const id = taskData.id ||
|
|
111
|
-
generateHumanTaskId(taskData.type, taskData.title, Array.from(this.tasks.keys()));
|
|
112
|
-
const task = {
|
|
113
|
-
...taskData,
|
|
114
|
-
id,
|
|
115
|
-
created_at: now,
|
|
116
|
-
updated_at: now,
|
|
117
|
-
};
|
|
118
|
-
// Write to file system (watcher will update memory)
|
|
119
|
-
await this.taskParser.writeTask(task);
|
|
120
|
-
return task;
|
|
121
|
-
}
|
|
122
|
-
async updateTask(id, updates) {
|
|
123
|
-
const existingTask = this.tasks.get(id);
|
|
124
|
-
if (!existingTask) {
|
|
125
|
-
throw new Error(`Task ${id} not found`);
|
|
126
|
-
}
|
|
127
|
-
const updatedTask = {
|
|
128
|
-
...existingTask,
|
|
129
|
-
...updates,
|
|
130
|
-
id, // Ensure ID cannot be changed
|
|
131
|
-
updated_at: new Date().toISOString(),
|
|
132
|
-
};
|
|
133
|
-
// Write to file system (watcher will update memory)
|
|
134
|
-
await this.taskParser.writeTask(updatedTask);
|
|
135
|
-
return updatedTask;
|
|
136
|
-
}
|
|
137
|
-
async deleteTask(id) {
|
|
138
|
-
const existingTask = this.tasks.get(id);
|
|
139
|
-
if (!existingTask) {
|
|
140
|
-
throw new Error(`Task ${id} not found`);
|
|
141
|
-
}
|
|
142
|
-
// Soft delete: mark deleted_at and write file
|
|
143
|
-
const softDeleted = {
|
|
144
|
-
...existingTask,
|
|
145
|
-
deleted_at: new Date().toISOString(),
|
|
146
|
-
};
|
|
147
|
-
await this.taskParser.writeTask(softDeleted);
|
|
148
|
-
// Update in-memory map and emit update event for subscribers
|
|
149
|
-
this.tasks.set(id, softDeleted);
|
|
150
|
-
this.emit('taskUpdated', softDeleted);
|
|
151
|
-
}
|
|
152
|
-
async moveTask(id, newStatus) {
|
|
153
|
-
return this.updateTask(id, { status: newStatus });
|
|
154
|
-
}
|
|
155
|
-
getTaskStats() {
|
|
156
|
-
const tasks = this.getAllTasks();
|
|
157
|
-
const stats = {
|
|
158
|
-
total: tasks.length,
|
|
159
|
-
backlog: 0,
|
|
160
|
-
'in-progress': 0,
|
|
161
|
-
review: 0,
|
|
162
|
-
done: 0,
|
|
163
|
-
byType: {},
|
|
164
|
-
byPriority: {},
|
|
165
|
-
};
|
|
166
|
-
for (const task of tasks) {
|
|
167
|
-
stats[task.status]++;
|
|
168
|
-
stats.byType[task.type] = (stats.byType[task.type] || 0) + 1;
|
|
169
|
-
stats.byPriority[task.priority] = (stats.byPriority[task.priority] || 0) + 1;
|
|
170
|
-
}
|
|
171
|
-
return stats;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import type { VibingStatus, VibingStage } from '@vibeman/types';
|
|
2
|
-
export interface Task {
|
|
3
|
-
id: string;
|
|
4
|
-
title: string;
|
|
5
|
-
type: 'feature' | 'bug' | 'chore' | 'refactor' | 'test' | 'doc';
|
|
6
|
-
status: 'backlog' | 'in-progress' | 'review' | 'done';
|
|
7
|
-
tags: string[];
|
|
8
|
-
due_date?: string;
|
|
9
|
-
assignee?: string[];
|
|
10
|
-
priority: 'low' | 'medium' | 'high';
|
|
11
|
-
comments?: string[];
|
|
12
|
-
content: string;
|
|
13
|
-
created_at: string;
|
|
14
|
-
updated_at: string;
|
|
15
|
-
deleted_at?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface TaskMetadata {
|
|
18
|
-
id: string;
|
|
19
|
-
title: string;
|
|
20
|
-
type: Task['type'];
|
|
21
|
-
status: Task['status'];
|
|
22
|
-
tags: string[];
|
|
23
|
-
due_date?: string | Date;
|
|
24
|
-
assignee?: string[];
|
|
25
|
-
priority: Task['priority'];
|
|
26
|
-
comments?: string[];
|
|
27
|
-
deleted_at?: string;
|
|
28
|
-
}
|
|
29
|
-
export interface ServerConfig {
|
|
30
|
-
port: number;
|
|
31
|
-
host: string;
|
|
32
|
-
vibeDir: string;
|
|
33
|
-
tasksDir: string;
|
|
34
|
-
}
|
|
35
|
-
export interface ExecutionLog {
|
|
36
|
-
id: string;
|
|
37
|
-
taskId: string;
|
|
38
|
-
timestamp: string;
|
|
39
|
-
level: 'info' | 'warn' | 'error';
|
|
40
|
-
message: string;
|
|
41
|
-
data?: Record<string, unknown>;
|
|
42
|
-
}
|
|
43
|
-
export interface AgentExecution {
|
|
44
|
-
id: string;
|
|
45
|
-
taskId: string;
|
|
46
|
-
status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
47
|
-
startTime: string;
|
|
48
|
-
endTime?: string;
|
|
49
|
-
logs: string[];
|
|
50
|
-
error?: string;
|
|
51
|
-
provider?: string;
|
|
52
|
-
usage?: {
|
|
53
|
-
promptTokens: number;
|
|
54
|
-
completionTokens: number;
|
|
55
|
-
totalTokens: number;
|
|
56
|
-
cost?: number;
|
|
57
|
-
};
|
|
58
|
-
worktree?: WorktreeInfo;
|
|
59
|
-
workingDirectory: string;
|
|
60
|
-
}
|
|
61
|
-
export interface WorktreeInfo {
|
|
62
|
-
taskId: string;
|
|
63
|
-
path: string;
|
|
64
|
-
branchName: string;
|
|
65
|
-
}
|
|
66
|
-
export interface WorktreeConfig {
|
|
67
|
-
worktreePath: string;
|
|
68
|
-
}
|
|
69
|
-
export interface TaskImprovementRequest {
|
|
70
|
-
taskId: string;
|
|
71
|
-
title: string;
|
|
72
|
-
type: Task['type'];
|
|
73
|
-
priority: Task['priority'];
|
|
74
|
-
content: string;
|
|
75
|
-
}
|
|
76
|
-
export interface TaskImprovementResponse {
|
|
77
|
-
type: Task['type'];
|
|
78
|
-
priority: Task['priority'];
|
|
79
|
-
content: string;
|
|
80
|
-
executionId: string;
|
|
81
|
-
}
|
|
82
|
-
export type VibingPhase = VibingStatus | VibingStage;
|
|
83
|
-
export interface VibingExecution {
|
|
84
|
-
id: string;
|
|
85
|
-
taskId: string;
|
|
86
|
-
phase: VibingPhase;
|
|
87
|
-
startTime: string;
|
|
88
|
-
endTime?: string;
|
|
89
|
-
status?: VibingStatus;
|
|
90
|
-
lastPhase?: VibingPhase;
|
|
91
|
-
phaseHistory?: Array<{
|
|
92
|
-
from: VibingPhase;
|
|
93
|
-
to: VibingPhase;
|
|
94
|
-
at: string;
|
|
95
|
-
reason?: string;
|
|
96
|
-
}>;
|
|
97
|
-
failureContext?: {
|
|
98
|
-
atPhase: VibingPhase;
|
|
99
|
-
error?: string;
|
|
100
|
-
timestamp: string;
|
|
101
|
-
};
|
|
102
|
-
executionIds?: Partial<Record<VibingPhase, string[]>>;
|
|
103
|
-
attempts?: Partial<Record<VibingPhase, number>>;
|
|
104
|
-
rerunContextHistory?: Array<{
|
|
105
|
-
at: string;
|
|
106
|
-
phase: VibingPhase;
|
|
107
|
-
reason: string;
|
|
108
|
-
attempt: number;
|
|
109
|
-
previousExecutionId?: string;
|
|
110
|
-
}>;
|
|
111
|
-
qualityResults?: QualityResults;
|
|
112
|
-
aiReviewResult?: {
|
|
113
|
-
executionId: string;
|
|
114
|
-
reviewSummary: string;
|
|
115
|
-
recommendations: string[];
|
|
116
|
-
qualityScore: number;
|
|
117
|
-
timestamp?: string;
|
|
118
|
-
};
|
|
119
|
-
links?: {
|
|
120
|
-
prUrl?: string;
|
|
121
|
-
prNumber?: number;
|
|
122
|
-
branchName?: string;
|
|
123
|
-
baseBranch?: string;
|
|
124
|
-
};
|
|
125
|
-
error?: string;
|
|
126
|
-
metrics?: {
|
|
127
|
-
durationsMs: Partial<Record<VibingPhase, number>>;
|
|
128
|
-
totalDurationMs?: number;
|
|
129
|
-
lastPhaseStartedAt?: string;
|
|
130
|
-
};
|
|
131
|
-
lastUpdatedAt?: string;
|
|
132
|
-
metadata: VibingConfig;
|
|
133
|
-
timeline?: Array<{
|
|
134
|
-
id: string;
|
|
135
|
-
label: string;
|
|
136
|
-
phase: VibingPhase;
|
|
137
|
-
attempt?: number;
|
|
138
|
-
executionId?: string;
|
|
139
|
-
startTime: string;
|
|
140
|
-
endTime?: string;
|
|
141
|
-
reason?: string;
|
|
142
|
-
usage?: {
|
|
143
|
-
promptTokens: number;
|
|
144
|
-
completionTokens: number;
|
|
145
|
-
totalTokens: number;
|
|
146
|
-
cost?: number;
|
|
147
|
-
};
|
|
148
|
-
}>;
|
|
149
|
-
}
|
|
150
|
-
export interface QualityResults {
|
|
151
|
-
overall: boolean;
|
|
152
|
-
timestamp: string;
|
|
153
|
-
details: Record<string, boolean>;
|
|
154
|
-
outputs: Record<string, string>;
|
|
155
|
-
}
|
|
156
|
-
export interface VibingConfig {
|
|
157
|
-
autoQualityChecks: boolean;
|
|
158
|
-
requireHumanApproval: boolean;
|
|
159
|
-
stepByStepMode?: boolean;
|
|
160
|
-
retryPolicy?: {
|
|
161
|
-
maxImplementationAttempts: number;
|
|
162
|
-
};
|
|
163
|
-
autoCommit?: boolean;
|
|
164
|
-
createPR?: boolean;
|
|
165
|
-
autoMerge?: boolean;
|
|
166
|
-
aiCodeReview?: boolean;
|
|
167
|
-
qualityChecks?: Array<{
|
|
168
|
-
name: string;
|
|
169
|
-
command: string;
|
|
170
|
-
args?: string[];
|
|
171
|
-
timeout?: number;
|
|
172
|
-
enabled?: boolean;
|
|
173
|
-
}>;
|
|
174
|
-
aiRoutingOverrides?: Partial<Record<'execute_task' | 'quality_checks' | 'ai_codereview' | 'ai_merge' | 'improve_task', {
|
|
175
|
-
provider?: string;
|
|
176
|
-
model?: string;
|
|
177
|
-
}>>;
|
|
178
|
-
aiReviewResult?: {
|
|
179
|
-
executionId: string;
|
|
180
|
-
reviewSummary: string;
|
|
181
|
-
recommendations: string[];
|
|
182
|
-
qualityScore: number;
|
|
183
|
-
timestamp?: string;
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
export type { VibingStage, VibingStatus, LegacyVibingPhase, VibingWorkflowV2, StageToStatusMapping, } from '@vibeman/types';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|