co-maintainer 0.5.2 → 0.5.4
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/package.json +2 -4
- package/dist/src/cli/args.js +1 -0
- package/dist/src/cli/commands/clear.d.ts +1 -0
- package/dist/src/cli/commands/clear.js +152 -0
- package/dist/src/cli/commands/registry.d.ts +4 -0
- package/dist/src/cli/commands/registry.js +81 -0
- package/dist/src/cli/commands/set.js +102 -1
- package/dist/src/cli/commands/uninstall.d.ts +1 -0
- package/dist/src/cli/commands/uninstall.js +43 -0
- package/dist/src/cli/main.js +10 -0
- package/dist/src/cli/review_args.d.ts +15 -0
- package/dist/src/cli/review_args.js +41 -1
- package/dist/src/config.d.ts +21 -0
- package/dist/src/config.js +38 -1
- package/dist/src/local/review_local.js +4 -1
- package/dist/src/local/review_lock.js +2 -2
- package/dist/src/pr/reviewer.js +3 -2
- package/dist/src/remote/client.js +14 -1
- package/dist/src/remote/schema.d.ts +3 -0
- package/dist/src/remote/schema.js +3 -0
- package/dist/src/remote/validate.js +12 -1
- package/dist/src/review/system_prompt.d.ts +19 -0
- package/dist/src/review/system_prompt.js +34 -0
- package/dist/src/server/api/knowledge.d.ts +7 -0
- package/dist/src/server/api/knowledge.js +68 -0
- package/dist/src/server/api/repos.js +61 -2
- package/dist/src/server/app.js +4 -0
- package/dist/src/server/pages/client.d.ts +1 -1
- package/dist/src/server/pages/client.js +1 -1
- package/dist/src/server/pages/knowledge.js +20 -1
- package/dist/src/server/pages/repo_settings.js +31 -0
- package/dist/src/server/pages/settings.js +18 -0
- package/dist/src/services/clear.d.ts +70 -0
- package/dist/src/services/clear.js +310 -0
- package/dist/src/services/remote_review.js +30 -1
- package/dist/src/services/review.js +1 -0
- package/dist/src/store/app_db.d.ts +3 -0
- package/dist/src/store/app_db.js +5 -0
- package/dist/src/store/cache_db.d.ts +11 -0
- package/dist/src/store/cache_db.js +60 -1
- package/dist/src/store/migrations.js +7 -0
- package/dist/src/store/remote_review_inputs.d.ts +2 -0
- package/dist/src/store/remote_review_inputs.js +3 -3
- package/dist/src/store/repos.d.ts +3 -0
- package/dist/src/store/repos.js +8 -0
- package/dist/src/store/rows.d.ts +3 -0
- package/dist/src/types.d.ts +11 -0
- package/dist/src/util/runtime.d.ts +3 -0
- package/dist/src/util/runtime.js +6 -1
- package/package.json +2 -4
package/dist/src/store/rows.d.ts
CHANGED
|
@@ -186,4 +186,7 @@ export type RemoteReviewInputRow = {
|
|
|
186
186
|
/** `'byok'` when the client's own key paid for the review, `'server'`
|
|
187
187
|
* otherwise. A null (pre-0.5.1 row) is treated as `'server'`. */
|
|
188
188
|
billed_to?: string | null;
|
|
189
|
+
/** The client's one-run review instructions, kept so a retry reuses them. */
|
|
190
|
+
system_prompt_add?: string | null;
|
|
191
|
+
system_prompt_override?: string | null;
|
|
189
192
|
};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -49,6 +49,17 @@ export type Options = {
|
|
|
49
49
|
/** How a review decides a blocking finding. `model` keeps the
|
|
50
50
|
* 0.4.13 behavior, `severity` uses a fixed P0/P1 threshold. */
|
|
51
51
|
reviewBlocking?: "model" | "severity";
|
|
52
|
+
/** The repository's own review instructions (config.json
|
|
53
|
+
* `repos[repo].reviewSystemPrompt`). Appended to the built-in reviewer
|
|
54
|
+
* prompt as a `CUSTOM REVIEW INSTRUCTIONS` section. */
|
|
55
|
+
reviewSystemPrompt?: string;
|
|
56
|
+
/** A one-run addition to the custom section
|
|
57
|
+
* (`review --system-prompt-file`). */
|
|
58
|
+
reviewSystemPromptAdd?: string;
|
|
59
|
+
/** A one-run replacement of the repository's custom section
|
|
60
|
+
* (`review --system-prompt-override-file`). The built-in role, diagram
|
|
61
|
+
* rules and guide block are still kept. */
|
|
62
|
+
reviewSystemPromptOverride?: string;
|
|
52
63
|
};
|
|
53
64
|
export type GitHubClient = {
|
|
54
65
|
request<T>(endpoint: string): Promise<T>;
|
|
@@ -29,6 +29,9 @@ export declare function mkdir(path: string | URL, options?: {
|
|
|
29
29
|
export declare function remove(path: string | URL, options?: {
|
|
30
30
|
recursive?: boolean;
|
|
31
31
|
}): Promise<void>;
|
|
32
|
+
/** Removes an empty directory only. Unlike `remove`, a non-empty directory
|
|
33
|
+
* fails, which is what callers that prune parents after deleting files want. */
|
|
34
|
+
export declare function rmdir(path: string | URL): Promise<void>;
|
|
32
35
|
export declare function stat(path: string | URL): Promise<Stats>;
|
|
33
36
|
export declare function lstat(path: string | URL): Promise<Stats>;
|
|
34
37
|
export declare function readLink(path: string | URL): Promise<string>;
|
package/dist/src/util/runtime.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* two silent-break classes too: `"windows"` vs `"win32"`, and
|
|
7
7
|
* `Deno.errors.NotFound` vs `ENOENT`.
|
|
8
8
|
*/
|
|
9
|
-
import { chmod as fsChmod, lstat as fsLstat, mkdir as fsMkdir, mkdtemp as fsMkdtemp, readFile as fsReadFile, readdir, readlink as fsReadLink, rename as fsRename, rm as fsRm, stat as fsStat, writeFile as fsWriteFile, } from "node:fs/promises";
|
|
9
|
+
import { chmod as fsChmod, lstat as fsLstat, mkdir as fsMkdir, mkdtemp as fsMkdtemp, readFile as fsReadFile, readdir, readlink as fsReadLink, rename as fsRename, rmdir as fsRmdir, rm as fsRm, stat as fsStat, writeFile as fsWriteFile, } from "node:fs/promises";
|
|
10
10
|
import { mkdirSync as fsMkdirSync, mkdtempSync as fsMkdtempSync, readFileSync as fsReadFileSync, rmSync as fsRmSync, statSync as fsStatSync, writeFileSync as fsWriteFileSync, } from "node:fs";
|
|
11
11
|
import { spawn, spawnSync } from "node:child_process";
|
|
12
12
|
import { tmpdir } from "node:os";
|
|
@@ -81,6 +81,11 @@ export function mkdir(path, options) {
|
|
|
81
81
|
export function remove(path, options) {
|
|
82
82
|
return fsRm(path, { recursive: options?.recursive ?? false, force: false });
|
|
83
83
|
}
|
|
84
|
+
/** Removes an empty directory only. Unlike `remove`, a non-empty directory
|
|
85
|
+
* fails, which is what callers that prune parents after deleting files want. */
|
|
86
|
+
export function rmdir(path) {
|
|
87
|
+
return fsRmdir(path);
|
|
88
|
+
}
|
|
84
89
|
export function stat(path) {
|
|
85
90
|
return fsStat(path);
|
|
86
91
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "co-maintainer",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "An imitator of yours, A PR review tool like co-maintainer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -59,11 +59,9 @@
|
|
|
59
59
|
"dx:scenario": "node scripts/dx_scenario.ts",
|
|
60
60
|
"dashboard:smoke": "node scripts/dashboard_smoke.ts"
|
|
61
61
|
},
|
|
62
|
-
"dependencies": {
|
|
63
|
-
"marked": "^15.0.7"
|
|
64
|
-
},
|
|
65
62
|
"devDependencies": {
|
|
66
63
|
"@types/node": "^24.0.0",
|
|
64
|
+
"marked": "^15.0.7",
|
|
67
65
|
"oxfmt": "^0.68.0",
|
|
68
66
|
"oxlint": "^1.83.0",
|
|
69
67
|
"playwright": "^1.63.0",
|