@webappwiz/cli 0.0.9 → 0.0.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/README.md +56 -34
- package/documents.d.ts +51 -0
- package/index-d8p57dk5.js +593 -0
- package/index.js +40 -44
- package/package.json +4 -12
- package/rules/add.d.ts +7 -0
- package/rules/ls.d.ts +7 -0
- package/rules/new.d.ts +16 -0
- package/rules/review.d.ts +21 -0
- package/rules/rule-set.d.ts +16 -0
- package/rules/update.d.ts +7 -0
- package/skills/skill.d.ts +3 -13
- package/update.d.ts +3 -1
- package/webappwiz.d.ts +0 -2
- package/webappwiz.js +39 -38
- package/changed.d.ts +0 -30
- package/index-g81gg9gz.js +0 -343
- package/index-htwb54c6.js +0 -44
- package/index-pyjg1rtk.js +0 -373
- package/judge.d.ts +0 -63
- package/judge.js +0 -6
- package/mode.d.ts +0 -21
- package/progress.d.ts +0 -64
- package/report.d.ts +0 -69
- package/rules.d.ts +0 -10
- package/rules.js +0 -6
package/index.js
CHANGED
|
@@ -2,24 +2,22 @@
|
|
|
2
2
|
// @bun
|
|
3
3
|
import {
|
|
4
4
|
add,
|
|
5
|
+
add1 as add2,
|
|
5
6
|
ls,
|
|
7
|
+
ls1 as ls2,
|
|
8
|
+
newRule,
|
|
9
|
+
review,
|
|
6
10
|
update,
|
|
7
11
|
update1 as update2,
|
|
12
|
+
update2 as update3,
|
|
8
13
|
version
|
|
9
|
-
} from "./index-
|
|
10
|
-
import {
|
|
11
|
-
JUDGE_RULES
|
|
12
|
-
} from "./index-htwb54c6.js";
|
|
13
|
-
import {
|
|
14
|
-
JudgeCommands
|
|
15
|
-
} from "./index-pyjg1rtk.js";
|
|
14
|
+
} from "./index-d8p57dk5.js";
|
|
16
15
|
|
|
17
16
|
// index.ts
|
|
18
17
|
import { NodeFs, NodeGlob } from "webappwiz/system";
|
|
19
|
-
import { SystemClock } from "webappwiz/time";
|
|
20
18
|
|
|
21
19
|
// webappwiz.ts
|
|
22
|
-
import {
|
|
20
|
+
import { DEFAULT_CHUNK } from "@webappwiz/rules";
|
|
23
21
|
import { cli } from "webappwiz/cmd";
|
|
24
22
|
import { t } from "webappwiz/t";
|
|
25
23
|
var webappwiz = cli("webappwiz");
|
|
@@ -29,49 +27,47 @@ webappwiz.command("update").description("pin every webappwiz dependency in a tre
|
|
|
29
27
|
}).option("version", t.string(), {
|
|
30
28
|
default: version,
|
|
31
29
|
description: "version to pin to"
|
|
32
|
-
}).action((opts, { log, fs }) =>
|
|
33
|
-
var
|
|
34
|
-
|
|
35
|
-
default: ".",
|
|
36
|
-
description: "directory to judge (default: .)"
|
|
37
|
-
}).option("agent", t.optional(t.enum(Object.keys(AGENTS))), {
|
|
38
|
-
description: "model to check with (default: the config's agent)"
|
|
39
|
-
}).option("exec", t.optional(t.string()), {
|
|
40
|
-
description: "command the prompt is passed to, instead of --agent"
|
|
41
|
-
}).option("print", t.boolean(), {
|
|
42
|
-
default: false,
|
|
43
|
-
description: "print the prompts and run no agent at all"
|
|
44
|
-
}).option("chunk", t.number(), {
|
|
45
|
-
default: 25,
|
|
46
|
-
description: "files per review"
|
|
47
|
-
}).option("since", t.optional(t.string()), {
|
|
48
|
-
description: "only check files added or changed since this git ref"
|
|
49
|
-
}).option("concurrency-override", t.optional(t.number()), {
|
|
50
|
-
description: "agent calls in flight at once, over the config's concurrency"
|
|
51
|
-
}).option("ci", t.boolean(), {
|
|
52
|
-
default: false,
|
|
53
|
-
description: "line-by-line output with no live progress block"
|
|
54
|
-
}).action((opts, deps) => judge(deps).judge(opts));
|
|
55
|
-
var rules = webappwiz.group("rules").description("list and print the rules, to run or to read yourself");
|
|
56
|
-
rules.command("ls").description("list the rules").action((_opts, deps) => judge(deps).ls());
|
|
57
|
-
rules.command("show").description("print one rule in full, by the id `rules ls` gives it").arg("id", t.string(), { description: "rule id" }).action((opts, deps) => judge(deps).show(opts));
|
|
58
|
-
var skillsGroup = webappwiz.group("skills").description("manage webappwiz agent skills in .agents/skills");
|
|
59
|
-
skillsGroup.command("ls").description("list the skills there are, and what the project has of them").arg("dir", t.string(), {
|
|
30
|
+
}).action((opts, { log, fs }) => update3({ ...opts, log, fs }));
|
|
31
|
+
var rules = webappwiz.group("rules").description("keep rules in .wiz/rules, and divide a review of them up");
|
|
32
|
+
rules.command("ls").description("list the rules there are, and what the project has of them").arg("dir", t.string(), {
|
|
60
33
|
default: ".",
|
|
61
34
|
description: "project to inspect (default: .)"
|
|
62
35
|
}).action((opts, { log, fs }) => ls({ ...opts, log, fs }));
|
|
63
|
-
|
|
36
|
+
rules.command("new").description("scaffold a rule to fill in, under .wiz/rules/<name>").arg("name", t.string(), { description: "rule id, kebab case" }).arg("dir", t.string(), {
|
|
37
|
+
default: ".",
|
|
38
|
+
description: "project to add it to (default: .)"
|
|
39
|
+
}).action((opts, { log, fs }) => newRule({ ...opts, log, fs }));
|
|
40
|
+
rules.command("add").description("copy a shipped rule into the project").arg("rule", t.string(), { description: "rule id, as `rules ls` lists it" }).arg("dir", t.string(), {
|
|
64
41
|
default: ".",
|
|
65
42
|
description: "project to add it to (default: .)"
|
|
66
43
|
}).action((opts, { log, fs }) => add({ ...opts, log, fs }));
|
|
67
|
-
|
|
44
|
+
rules.command("update").description("refresh the shipped rules the project has copies of").arg("dir", t.string(), {
|
|
68
45
|
default: ".",
|
|
69
46
|
description: "project to refresh (default: .)"
|
|
70
47
|
}).action((opts, { log, fs }) => update({ ...opts, log, fs }));
|
|
48
|
+
rules.command("review").description("print one block of review work per rule the change touches").arg("dir", t.string(), {
|
|
49
|
+
default: ".",
|
|
50
|
+
description: "project to review (default: .)"
|
|
51
|
+
}).option("since", t.string(), {
|
|
52
|
+
default: "HEAD",
|
|
53
|
+
description: "git ref the change is measured from (default: HEAD)"
|
|
54
|
+
}).option("chunk", t.number(), {
|
|
55
|
+
default: DEFAULT_CHUNK,
|
|
56
|
+
description: "files per block, at most"
|
|
57
|
+
}).action((opts, { log, fs, ps, glob }) => review({ ...opts, log, fs, ps, glob }));
|
|
58
|
+
var skills = webappwiz.group("skills").description("manage webappwiz agent skills in .agents/skills");
|
|
59
|
+
skills.command("ls").description("list the skills there are, and what the project has of them").arg("dir", t.string(), {
|
|
60
|
+
default: ".",
|
|
61
|
+
description: "project to inspect (default: .)"
|
|
62
|
+
}).action((opts, { log, fs }) => ls2({ ...opts, log, fs }));
|
|
63
|
+
skills.command("add").description("add a skill to a project").arg("skill", t.string(), { description: "skill name" }).arg("dir", t.string(), {
|
|
64
|
+
default: ".",
|
|
65
|
+
description: "project to add it to (default: .)"
|
|
66
|
+
}).action((opts, { log, fs }) => add2({ ...opts, log, fs }));
|
|
67
|
+
skills.command("update").description("refresh the skills a project already has").arg("dir", t.string(), {
|
|
68
|
+
default: ".",
|
|
69
|
+
description: "project to refresh (default: .)"
|
|
70
|
+
}).action((opts, { log, fs }) => update2({ ...opts, log, fs }));
|
|
71
71
|
|
|
72
72
|
// index.ts
|
|
73
|
-
await webappwiz.run({
|
|
74
|
-
fs: new NodeFs,
|
|
75
|
-
clock: new SystemClock,
|
|
76
|
-
glob: new NodeGlob
|
|
77
|
-
});
|
|
73
|
+
await webappwiz.run({ fs: new NodeFs, glob: new NodeGlob });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webappwiz/cli",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "The webappwiz CLI:
|
|
3
|
+
"version": "0.0.11",
|
|
4
|
+
"description": "The webappwiz CLI: keep rules and agent skills in a project, and divide a review up",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jared Johnson",
|
|
7
7
|
"repository": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@webappwiz/rules": "^0.0.
|
|
21
|
-
"webappwiz": "^0.0.
|
|
20
|
+
"@webappwiz/rules": "^0.0.11",
|
|
21
|
+
"webappwiz": "^0.0.11"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"typescript": "^7"
|
|
@@ -33,14 +33,6 @@
|
|
|
33
33
|
"./webappwiz": {
|
|
34
34
|
"types": "./webappwiz.d.ts",
|
|
35
35
|
"default": "./webappwiz.js"
|
|
36
|
-
},
|
|
37
|
-
"./rules": {
|
|
38
|
-
"types": "./rules.d.ts",
|
|
39
|
-
"default": "./rules.js"
|
|
40
|
-
},
|
|
41
|
-
"./judge": {
|
|
42
|
-
"types": "./judge.d.ts",
|
|
43
|
-
"default": "./judge.js"
|
|
44
36
|
}
|
|
45
37
|
},
|
|
46
38
|
"bin": {
|
package/rules/add.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RulesProjectOptions } from "./rule-set.js";
|
|
2
|
+
export interface AddOptions extends RulesProjectOptions {
|
|
3
|
+
/** The rule to install, as `rules ls` names it. */
|
|
4
|
+
rule: string;
|
|
5
|
+
}
|
|
6
|
+
/** Copies a shipped rule into the project, where it runs and can be edited. */
|
|
7
|
+
export declare function add(opts: AddOptions): Promise<void>;
|
package/rules/ls.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RulesProjectOptions } from "./rule-set.js";
|
|
2
|
+
/**
|
|
3
|
+
* Every rule there is: the project's own, validated, and the shipped ones it
|
|
4
|
+
* could add, one row each. A rule the project holds a copy of shows the
|
|
5
|
+
* version it came from beside the one that ships, so a stale copy is visible.
|
|
6
|
+
*/
|
|
7
|
+
export declare function ls(opts: RulesProjectOptions): Promise<void>;
|
package/rules/new.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Logger } from "webappwiz/log";
|
|
2
|
+
import { type Fs } from "webappwiz/system";
|
|
3
|
+
export interface NewOptions {
|
|
4
|
+
/** The rule's id, kebab case, and the directory it gets. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** The project root: the directory holding `.wiz/rules`. */
|
|
7
|
+
dir: string;
|
|
8
|
+
log?: Logger;
|
|
9
|
+
fs?: Fs;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Scaffolds a rule to fill in: `.wiz/rules/<name>/RULE.md`, with every field
|
|
13
|
+
* a review needs and the headings a rule has to have. Refuses to overwrite a
|
|
14
|
+
* rule that is already there.
|
|
15
|
+
*/
|
|
16
|
+
export declare function newRule(opts: NewOptions): Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Logger } from "webappwiz/log";
|
|
2
|
+
import type { Fs, Glob, Ps } from "webappwiz/system";
|
|
3
|
+
export interface ReviewOptions {
|
|
4
|
+
/** The project root: where `.wiz/rules` is, and what paths are relative to. */
|
|
5
|
+
dir: string;
|
|
6
|
+
/** The git ref the change is measured from. */
|
|
7
|
+
since: string;
|
|
8
|
+
/** Files per block, at most. */
|
|
9
|
+
chunk: number;
|
|
10
|
+
log?: Logger;
|
|
11
|
+
fs?: Fs;
|
|
12
|
+
ps?: Ps;
|
|
13
|
+
glob?: Glob;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Divides a change into blocks of work, one rule over the changed files it
|
|
17
|
+
* matches, and prints them for a parent agent to hand to subagents. Nothing
|
|
18
|
+
* is spawned and no rule is quoted: each block names the rule's file, and the
|
|
19
|
+
* subagent reads it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function review(opts: ReviewOptions): Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Logger } from "webappwiz/log";
|
|
2
|
+
import type { Fs } from "webappwiz/system";
|
|
3
|
+
import type { Layout } from "../documents.js";
|
|
4
|
+
/** Where a project keeps its rules: one directory per rule, holding `RULE.md`. */
|
|
5
|
+
export declare const RULES: Layout;
|
|
6
|
+
/** The project a rules command works on. */
|
|
7
|
+
export interface RulesProjectOptions {
|
|
8
|
+
/** Its root: the directory holding `.wiz/rules`. */
|
|
9
|
+
dir: string;
|
|
10
|
+
log?: Logger;
|
|
11
|
+
fs?: Fs;
|
|
12
|
+
/** The rules on offer, id to `RULE.md`; the catalog by default. */
|
|
13
|
+
rules?: Record<string, string>;
|
|
14
|
+
}
|
|
15
|
+
/** The rules a command offers: what it was handed, else the catalog. */
|
|
16
|
+
export declare const offered: (opts: RulesProjectOptions) => Record<string, string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RulesProjectOptions } from "./rule-set.js";
|
|
2
|
+
/**
|
|
3
|
+
* Refreshes the shipped rules a project has copies of, and leaves the rules
|
|
4
|
+
* it wrote itself alone. Never adds one: a rule someone chose not to install
|
|
5
|
+
* should not arrive by way of an update.
|
|
6
|
+
*/
|
|
7
|
+
export declare function update(opts: RulesProjectOptions): Promise<void>;
|
package/skills/skill.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Logger } from "webappwiz/log";
|
|
2
2
|
import type { Fs } from "webappwiz/system";
|
|
3
|
+
import type { Layout } from "../documents.js";
|
|
3
4
|
/** Skill name to the document a project installs under that name. */
|
|
4
5
|
export type Skills = Record<string, string>;
|
|
5
6
|
/**
|
|
@@ -12,7 +13,8 @@ export type Skills = Record<string, string>;
|
|
|
12
13
|
* not happen to pick up.
|
|
13
14
|
*/
|
|
14
15
|
export declare const bundled: Skills;
|
|
15
|
-
|
|
16
|
+
/** Where a project keeps its skills, the way every agent harness reads them. */
|
|
17
|
+
export declare const SKILLS: Layout;
|
|
16
18
|
/** The project a skills command works on. */
|
|
17
19
|
export interface ProjectOptions {
|
|
18
20
|
/** Its root: the directory holding `.agents/skills`. */
|
|
@@ -22,15 +24,3 @@ export interface ProjectOptions {
|
|
|
22
24
|
/** The skills on offer; the ones this package ships by default. */
|
|
23
25
|
skills?: Skills;
|
|
24
26
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Every skill on offer, name and document together, in the order they are
|
|
27
|
-
* listed and installed in.
|
|
28
|
-
*/
|
|
29
|
-
export declare function available(skills: Skills): Array<[string, string]>;
|
|
30
|
-
/** What `copy` works through, once an action has resolved them. */
|
|
31
|
-
export interface CopyOptions {
|
|
32
|
-
log: Logger;
|
|
33
|
-
fs: Fs;
|
|
34
|
-
}
|
|
35
|
-
/** Installs one skill into a project. */
|
|
36
|
-
export declare function copy(name: string, doc: string, dir: string, opts: CopyOptions): Promise<void>;
|
package/update.d.ts
CHANGED
|
@@ -11,12 +11,14 @@ export interface UpdateOptions {
|
|
|
11
11
|
fs?: Fs;
|
|
12
12
|
/** The skills to refresh with; the ones this package ships by default. */
|
|
13
13
|
skills?: Skills;
|
|
14
|
+
/** The rules to refresh with; the catalog by default. */
|
|
15
|
+
rules?: Record<string, string>;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Pins every webappwiz dependency under `dir` to one version, so a project
|
|
17
19
|
* never runs two of these packages built against different versions of each
|
|
18
20
|
* other. They are released together, so there is only ever one right answer.
|
|
19
21
|
* Installed skills are copies of files those packages ship, so they are
|
|
20
|
-
* refreshed too.
|
|
22
|
+
* refreshed too, and so are the rules copied in from the catalog.
|
|
21
23
|
*/
|
|
22
24
|
export declare function update(opts: UpdateOptions): Promise<void>;
|
package/webappwiz.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { type Deps } from "webappwiz/cmd";
|
|
2
2
|
import type { Fs, Glob } from "webappwiz/system";
|
|
3
|
-
import type { Clock } from "webappwiz/time";
|
|
4
3
|
/** What webappwiz's commands are run with, on top of what any cli needs. */
|
|
5
4
|
export interface CommandDeps extends Deps {
|
|
6
5
|
fs: Fs;
|
|
7
|
-
clock: Clock;
|
|
8
6
|
glob: Glob;
|
|
9
7
|
}
|
|
10
8
|
/**
|
package/webappwiz.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
add,
|
|
3
|
+
add1 as add2,
|
|
3
4
|
ls,
|
|
5
|
+
ls1 as ls2,
|
|
6
|
+
newRule,
|
|
7
|
+
review,
|
|
4
8
|
update,
|
|
5
9
|
update1 as update2,
|
|
10
|
+
update2 as update3,
|
|
6
11
|
version
|
|
7
|
-
} from "./index-
|
|
8
|
-
import {
|
|
9
|
-
JUDGE_RULES
|
|
10
|
-
} from "./index-htwb54c6.js";
|
|
11
|
-
import {
|
|
12
|
-
JudgeCommands
|
|
13
|
-
} from "./index-pyjg1rtk.js";
|
|
12
|
+
} from "./index-d8p57dk5.js";
|
|
14
13
|
|
|
15
14
|
// webappwiz.ts
|
|
16
|
-
import {
|
|
15
|
+
import { DEFAULT_CHUNK } from "@webappwiz/rules";
|
|
17
16
|
import { cli } from "webappwiz/cmd";
|
|
18
17
|
import { t } from "webappwiz/t";
|
|
19
18
|
var webappwiz = cli("webappwiz");
|
|
@@ -23,45 +22,47 @@ webappwiz.command("update").description("pin every webappwiz dependency in a tre
|
|
|
23
22
|
}).option("version", t.string(), {
|
|
24
23
|
default: version,
|
|
25
24
|
description: "version to pin to"
|
|
26
|
-
}).action((opts, { log, fs }) =>
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
default: ".",
|
|
30
|
-
description: "directory to judge (default: .)"
|
|
31
|
-
}).option("agent", t.optional(t.enum(Object.keys(AGENTS))), {
|
|
32
|
-
description: "model to check with (default: the config's agent)"
|
|
33
|
-
}).option("exec", t.optional(t.string()), {
|
|
34
|
-
description: "command the prompt is passed to, instead of --agent"
|
|
35
|
-
}).option("print", t.boolean(), {
|
|
36
|
-
default: false,
|
|
37
|
-
description: "print the prompts and run no agent at all"
|
|
38
|
-
}).option("chunk", t.number(), {
|
|
39
|
-
default: 25,
|
|
40
|
-
description: "files per review"
|
|
41
|
-
}).option("since", t.optional(t.string()), {
|
|
42
|
-
description: "only check files added or changed since this git ref"
|
|
43
|
-
}).option("concurrency-override", t.optional(t.number()), {
|
|
44
|
-
description: "agent calls in flight at once, over the config's concurrency"
|
|
45
|
-
}).option("ci", t.boolean(), {
|
|
46
|
-
default: false,
|
|
47
|
-
description: "line-by-line output with no live progress block"
|
|
48
|
-
}).action((opts, deps) => judge(deps).judge(opts));
|
|
49
|
-
var rules = webappwiz.group("rules").description("list and print the rules, to run or to read yourself");
|
|
50
|
-
rules.command("ls").description("list the rules").action((_opts, deps) => judge(deps).ls());
|
|
51
|
-
rules.command("show").description("print one rule in full, by the id `rules ls` gives it").arg("id", t.string(), { description: "rule id" }).action((opts, deps) => judge(deps).show(opts));
|
|
52
|
-
var skillsGroup = webappwiz.group("skills").description("manage webappwiz agent skills in .agents/skills");
|
|
53
|
-
skillsGroup.command("ls").description("list the skills there are, and what the project has of them").arg("dir", t.string(), {
|
|
25
|
+
}).action((opts, { log, fs }) => update3({ ...opts, log, fs }));
|
|
26
|
+
var rules = webappwiz.group("rules").description("keep rules in .wiz/rules, and divide a review of them up");
|
|
27
|
+
rules.command("ls").description("list the rules there are, and what the project has of them").arg("dir", t.string(), {
|
|
54
28
|
default: ".",
|
|
55
29
|
description: "project to inspect (default: .)"
|
|
56
30
|
}).action((opts, { log, fs }) => ls({ ...opts, log, fs }));
|
|
57
|
-
|
|
31
|
+
rules.command("new").description("scaffold a rule to fill in, under .wiz/rules/<name>").arg("name", t.string(), { description: "rule id, kebab case" }).arg("dir", t.string(), {
|
|
32
|
+
default: ".",
|
|
33
|
+
description: "project to add it to (default: .)"
|
|
34
|
+
}).action((opts, { log, fs }) => newRule({ ...opts, log, fs }));
|
|
35
|
+
rules.command("add").description("copy a shipped rule into the project").arg("rule", t.string(), { description: "rule id, as `rules ls` lists it" }).arg("dir", t.string(), {
|
|
58
36
|
default: ".",
|
|
59
37
|
description: "project to add it to (default: .)"
|
|
60
38
|
}).action((opts, { log, fs }) => add({ ...opts, log, fs }));
|
|
61
|
-
|
|
39
|
+
rules.command("update").description("refresh the shipped rules the project has copies of").arg("dir", t.string(), {
|
|
62
40
|
default: ".",
|
|
63
41
|
description: "project to refresh (default: .)"
|
|
64
42
|
}).action((opts, { log, fs }) => update({ ...opts, log, fs }));
|
|
43
|
+
rules.command("review").description("print one block of review work per rule the change touches").arg("dir", t.string(), {
|
|
44
|
+
default: ".",
|
|
45
|
+
description: "project to review (default: .)"
|
|
46
|
+
}).option("since", t.string(), {
|
|
47
|
+
default: "HEAD",
|
|
48
|
+
description: "git ref the change is measured from (default: HEAD)"
|
|
49
|
+
}).option("chunk", t.number(), {
|
|
50
|
+
default: DEFAULT_CHUNK,
|
|
51
|
+
description: "files per block, at most"
|
|
52
|
+
}).action((opts, { log, fs, ps, glob }) => review({ ...opts, log, fs, ps, glob }));
|
|
53
|
+
var skills = webappwiz.group("skills").description("manage webappwiz agent skills in .agents/skills");
|
|
54
|
+
skills.command("ls").description("list the skills there are, and what the project has of them").arg("dir", t.string(), {
|
|
55
|
+
default: ".",
|
|
56
|
+
description: "project to inspect (default: .)"
|
|
57
|
+
}).action((opts, { log, fs }) => ls2({ ...opts, log, fs }));
|
|
58
|
+
skills.command("add").description("add a skill to a project").arg("skill", t.string(), { description: "skill name" }).arg("dir", t.string(), {
|
|
59
|
+
default: ".",
|
|
60
|
+
description: "project to add it to (default: .)"
|
|
61
|
+
}).action((opts, { log, fs }) => add2({ ...opts, log, fs }));
|
|
62
|
+
skills.command("update").description("refresh the skills a project already has").arg("dir", t.string(), {
|
|
63
|
+
default: ".",
|
|
64
|
+
description: "project to refresh (default: .)"
|
|
65
|
+
}).action((opts, { log, fs }) => update2({ ...opts, log, fs }));
|
|
65
66
|
export {
|
|
66
67
|
webappwiz
|
|
67
68
|
};
|
package/changed.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type Ps } from "webappwiz/system";
|
|
2
|
-
/**
|
|
3
|
-
* The files git says are new or changed in `dir` since `ref`, named the way a
|
|
4
|
-
* rule's glob is: relative to `dir`, so a run over one package of a repo sees
|
|
5
|
-
* its own paths rather than the repo's.
|
|
6
|
-
*
|
|
7
|
-
* Deletions are left out. A violation quotes the offending line from disk, so a
|
|
8
|
-
* file that is gone has nothing to read and nothing to report.
|
|
9
|
-
*/
|
|
10
|
-
export interface ChangedOptions {
|
|
11
|
-
/** What git is spawned through; the real process by default. */
|
|
12
|
-
ps?: Ps;
|
|
13
|
-
}
|
|
14
|
-
export declare function changed(dir: string, ref: string, opts?: ChangedOptions): Promise<Set<string>>;
|
|
15
|
-
/**
|
|
16
|
-
* The change itself, as a patch: everything in `dir` that differs from `ref`,
|
|
17
|
-
* committed or not, and the paths of the files git has never been told about,
|
|
18
|
-
* which no diff reaches.
|
|
19
|
-
*
|
|
20
|
-
* The new files are named rather than shown because a reader of this patch is
|
|
21
|
-
* an agent with the working directory in front of it, and it can open them.
|
|
22
|
-
*/
|
|
23
|
-
export interface DiffOptions {
|
|
24
|
-
/** What git is spawned through; the real process by default. */
|
|
25
|
-
ps?: Ps;
|
|
26
|
-
}
|
|
27
|
-
export declare function diff(dir: string, ref: string, opts?: DiffOptions): Promise<{
|
|
28
|
-
patch: string;
|
|
29
|
-
added: string[];
|
|
30
|
-
}>;
|