watchfix 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +99 -0
- package/dist/agents/base.d.ts +19 -0
- package/dist/agents/base.js +140 -0
- package/dist/agents/claude.d.ts +11 -0
- package/dist/agents/claude.js +6 -0
- package/dist/agents/codex.d.ts +11 -0
- package/dist/agents/codex.js +6 -0
- package/dist/agents/defaults.d.ts +21 -0
- package/dist/agents/defaults.js +21 -0
- package/dist/agents/gemini.d.ts +11 -0
- package/dist/agents/gemini.js +6 -0
- package/dist/agents/index.d.ts +19 -0
- package/dist/agents/index.js +63 -0
- package/dist/agents/types.d.ts +22 -0
- package/dist/agents/types.js +1 -0
- package/dist/cli/commands/clean.d.ts +9 -0
- package/dist/cli/commands/clean.js +173 -0
- package/dist/cli/commands/config.d.ts +7 -0
- package/dist/cli/commands/config.js +134 -0
- package/dist/cli/commands/fix.d.ts +12 -0
- package/dist/cli/commands/fix.js +391 -0
- package/dist/cli/commands/ignore.d.ts +7 -0
- package/dist/cli/commands/ignore.js +74 -0
- package/dist/cli/commands/init.d.ts +5 -0
- package/dist/cli/commands/init.js +115 -0
- package/dist/cli/commands/logs.d.ts +9 -0
- package/dist/cli/commands/logs.js +106 -0
- package/dist/cli/commands/show.d.ts +8 -0
- package/dist/cli/commands/show.js +165 -0
- package/dist/cli/commands/status.d.ts +7 -0
- package/dist/cli/commands/status.js +110 -0
- package/dist/cli/commands/stop.d.ts +7 -0
- package/dist/cli/commands/stop.js +106 -0
- package/dist/cli/commands/version.d.ts +7 -0
- package/dist/cli/commands/version.js +36 -0
- package/dist/cli/commands/watch.d.ts +10 -0
- package/dist/cli/commands/watch.js +204 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +152 -0
- package/dist/config/loader.d.ts +4 -0
- package/dist/config/loader.js +96 -0
- package/dist/config/schema.d.ts +375 -0
- package/dist/config/schema.js +99 -0
- package/dist/db/index.d.ts +15 -0
- package/dist/db/index.js +71 -0
- package/dist/db/queries.d.ts +45 -0
- package/dist/db/queries.js +111 -0
- package/dist/db/schema.d.ts +4 -0
- package/dist/db/schema.js +84 -0
- package/dist/fixer/context.d.ts +9 -0
- package/dist/fixer/context.js +361 -0
- package/dist/fixer/index.d.ts +37 -0
- package/dist/fixer/index.js +398 -0
- package/dist/fixer/lock.d.ts +7 -0
- package/dist/fixer/lock.js +49 -0
- package/dist/fixer/output.d.ts +21 -0
- package/dist/fixer/output.js +108 -0
- package/dist/fixer/queue.d.ts +15 -0
- package/dist/fixer/queue.js +53 -0
- package/dist/fixer/verifier.d.ts +44 -0
- package/dist/fixer/verifier.js +133 -0
- package/dist/utils/daemon.d.ts +22 -0
- package/dist/utils/daemon.js +143 -0
- package/dist/utils/duration.d.ts +2 -0
- package/dist/utils/duration.js +31 -0
- package/dist/utils/errors.d.ts +17 -0
- package/dist/utils/errors.js +20 -0
- package/dist/utils/hash.d.ts +2 -0
- package/dist/utils/hash.js +18 -0
- package/dist/utils/http.d.ts +6 -0
- package/dist/utils/http.js +61 -0
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.js +85 -0
- package/dist/utils/process.d.ts +16 -0
- package/dist/utils/process.js +146 -0
- package/dist/watcher/index.d.ts +55 -0
- package/dist/watcher/index.js +234 -0
- package/dist/watcher/parser.d.ts +42 -0
- package/dist/watcher/parser.js +162 -0
- package/dist/watcher/patterns.d.ts +5 -0
- package/dist/watcher/patterns.js +92 -0
- package/dist/watcher/sources/command.d.ts +27 -0
- package/dist/watcher/sources/command.js +143 -0
- package/dist/watcher/sources/docker.d.ts +28 -0
- package/dist/watcher/sources/docker.js +183 -0
- package/dist/watcher/sources/file.d.ts +30 -0
- package/dist/watcher/sources/file.js +177 -0
- package/dist/watcher/sources/types.d.ts +27 -0
- package/dist/watcher/sources/types.js +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type LogEvent = {
|
|
2
|
+
source: string;
|
|
3
|
+
line: string;
|
|
4
|
+
timestamp: Date;
|
|
5
|
+
};
|
|
6
|
+
export type FileSourceConfig = {
|
|
7
|
+
name: string;
|
|
8
|
+
type: 'file';
|
|
9
|
+
path: string;
|
|
10
|
+
};
|
|
11
|
+
export type DockerSourceConfig = {
|
|
12
|
+
name: string;
|
|
13
|
+
type: 'docker';
|
|
14
|
+
container: string;
|
|
15
|
+
};
|
|
16
|
+
export type CommandSourceConfig = {
|
|
17
|
+
name: string;
|
|
18
|
+
type: 'command';
|
|
19
|
+
run: string;
|
|
20
|
+
interval: string;
|
|
21
|
+
};
|
|
22
|
+
export type LogSourceConfig = FileSourceConfig | DockerSourceConfig | CommandSourceConfig;
|
|
23
|
+
export interface LogSource {
|
|
24
|
+
start(): Promise<void>;
|
|
25
|
+
stop(): Promise<void>;
|
|
26
|
+
on(event: 'line', handler: (event: LogEvent) => void): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "watchfix",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "CLI tool that watches logs, detects errors, and dispatches AI agents to fix them",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"watchfix": "./dist/cli/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc -p tsconfig.json",
|
|
11
|
+
"test": "vitest run",
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"format": "prettier -w ."
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"README.md",
|
|
19
|
+
"package.json"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"better-sqlite3": "^12.6.2",
|
|
23
|
+
"chokidar": "^3.6.0",
|
|
24
|
+
"commander": "^12.1.0",
|
|
25
|
+
"yaml": "^2.4.5",
|
|
26
|
+
"zod": "^3.23.8"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/better-sqlite3": "^7.6.9",
|
|
30
|
+
"@types/node": "^20.11.30",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
32
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
33
|
+
"eslint": "^8.57.0",
|
|
34
|
+
"prettier": "^3.2.5",
|
|
35
|
+
"typescript": "^5.4.5",
|
|
36
|
+
"vitest": "^1.5.0"
|
|
37
|
+
}
|
|
38
|
+
}
|