@cat-factory/agents 0.75.0 → 0.75.1
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.
|
@@ -32,6 +32,22 @@ export declare const prReview: import("./structured-output.js").StructuredOutput
|
|
|
32
32
|
}[] | undefined;
|
|
33
33
|
}>;
|
|
34
34
|
export type PrReviewOutput = ReturnType<typeof prReview.parse>;
|
|
35
|
+
/**
|
|
36
|
+
* The most slice subagents the reviewer may keep in flight at once.
|
|
37
|
+
*
|
|
38
|
+
* The fan-out is unbounded otherwise, and a large PR slices into dozens: every one of them is a
|
|
39
|
+
* concurrent model conversation against the same account, so an uncapped wave is what turns a
|
|
40
|
+
* review into provider rate-limiting (each 429 costs a retry, and the parent sits idle through
|
|
41
|
+
* it) and lands every slice's findings back in one burst at the end. A window of
|
|
42
|
+
* {@link MAX_PARALLEL_SLICE_SUBAGENTS} keeps the review saturated while its slices return
|
|
43
|
+
* steadily, which is also what makes the live per-slice progress readable rather than a
|
|
44
|
+
* single 0% → 100% jump.
|
|
45
|
+
*
|
|
46
|
+
* This is a PROMPT-level budget: the CLI owns tool dispatch, so the harness can observe the
|
|
47
|
+
* in-flight count (`SliceTracker`) but cannot refuse a call. Treat an over-wide wave as a prompt
|
|
48
|
+
* adherence problem, not a broken guard.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MAX_PARALLEL_SLICE_SUBAGENTS = 5;
|
|
35
51
|
export declare const PR_REVIEWER_SYSTEM_PROMPT: string;
|
|
36
52
|
export declare const PR_REVIEWER_AGENT_KINDS: AgentKindDefinition[];
|
|
37
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-reviewer.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/pr-reviewer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAkD3E,eAAO,MAAM,gBAAgB,gBAAgB,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;EAAoD,CAAA;AAEzE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"pr-reviewer.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/pr-reviewer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAkD3E,eAAO,MAAM,gBAAgB,gBAAgB,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;EAAoD,CAAA;AAEzE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;AAsB9D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAA;AA8B7C,eAAO,MAAM,yBAAyB,QAoEK,CAAA;AAE3C,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,EAsCxD,CAAA;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAEzE;AAED,OAAO,EACL,oBAAoB,EACpB,iCAAiC,EACjC,+BAA+B,EAC/B,UAAU,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,wBAAwB,EACxB,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAA"}
|
|
@@ -70,15 +70,38 @@ later turn. A large file read early costs many times what it looks like. So:
|
|
|
70
70
|
- Prefer \`--stat\` / \`--name-status\` to a full patch when you only need the shape.
|
|
71
71
|
- Keep each slice small enough to review in a few dozen turns. If a slice needs more, it was
|
|
72
72
|
too big: split it and dispatch the parts separately.`;
|
|
73
|
+
/**
|
|
74
|
+
* The most slice subagents the reviewer may keep in flight at once.
|
|
75
|
+
*
|
|
76
|
+
* The fan-out is unbounded otherwise, and a large PR slices into dozens: every one of them is a
|
|
77
|
+
* concurrent model conversation against the same account, so an uncapped wave is what turns a
|
|
78
|
+
* review into provider rate-limiting (each 429 costs a retry, and the parent sits idle through
|
|
79
|
+
* it) and lands every slice's findings back in one burst at the end. A window of
|
|
80
|
+
* {@link MAX_PARALLEL_SLICE_SUBAGENTS} keeps the review saturated while its slices return
|
|
81
|
+
* steadily, which is also what makes the live per-slice progress readable rather than a
|
|
82
|
+
* single 0% → 100% jump.
|
|
83
|
+
*
|
|
84
|
+
* This is a PROMPT-level budget: the CLI owns tool dispatch, so the harness can observe the
|
|
85
|
+
* in-flight count (`SliceTracker`) but cannot refuse a call. Treat an over-wide wave as a prompt
|
|
86
|
+
* adherence problem, not a broken guard.
|
|
87
|
+
*/
|
|
88
|
+
export const MAX_PARALLEL_SLICE_SUBAGENTS = 5;
|
|
73
89
|
/**
|
|
74
90
|
* How to fan the slices out. Each subagent starts with a FRESH context, which is exactly why
|
|
75
91
|
* parallel slices are cheaper than one sequential pass — the slice's reading never accumulates
|
|
76
92
|
* onto the parent's transcript. The parent's job is to stay small: plan, dispatch, aggregate.
|
|
77
93
|
*/
|
|
78
94
|
const SLICE_DISPATCH_GUIDANCE = `
|
|
79
|
-
Review the slices by dispatching ONE subagent per slice
|
|
80
|
-
|
|
81
|
-
|
|
95
|
+
Review the slices by dispatching ONE subagent per slice. Each subagent gets a fresh context, so
|
|
96
|
+
the files it reads never land on yours — this is the single biggest reason a large review stays
|
|
97
|
+
affordable. Run them in parallel, but keep AT MOST ${MAX_PARALLEL_SLICE_SUBAGENTS} in flight at
|
|
98
|
+
once: dispatch the first ${MAX_PARALLEL_SLICE_SUBAGENTS}, and each time one returns, dispatch the
|
|
99
|
+
next queued slice. Do not fan every slice out in one wave — a wider wave gets rate-limited rather
|
|
100
|
+
than finishing sooner. As you go, mark a slice's task entry in progress when you dispatch it and
|
|
101
|
+
completed when its subagent returns; that is what the user watches the review by.
|
|
102
|
+
Describe each dispatch as \`Review <slice short name> slice\`, reusing the SAME short name as that
|
|
103
|
+
slice's task entry — the two are matched by name to show one row per slice.
|
|
104
|
+
In each subagent's prompt:
|
|
82
105
|
- Name the slice's files and the base/head refs, and tell it to read the diffs ITSELF.
|
|
83
106
|
- Name which \`.cat-context/standard-*.md\` files apply and tell it to READ them. Do not
|
|
84
107
|
paraphrase a standard into the prompt — a summary is not the standard.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-reviewer.js","sourceRoot":"","sources":["../../../src/agents/kinds/pr-reviewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,yCAAyC,EAAE,MAAM,sBAAsB,CAAA;AAChF,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,wBAAwB,CAAA;AAE/B,8EAA8E;AAC9E,kFAAkF;AAClF,iFAAiF;AACjF,kCAAkC;AAClC,EAAE;AACF,kFAAkF;AAClF,kFAAkF;AAClF,6EAA6E;AAC7E,oFAAoF;AACpF,uFAAuF;AACvF,yFAAyF;AACzF,EAAE;AACF,6FAA6F;AAC7F,2FAA2F;AAC3F,6FAA6F;AAC7F,yFAAyF;AACzF,sFAAsF;AACtF,0CAA0C;AAC1C,EAAE;AACF,6FAA6F;AAC7F,6FAA6F;AAC7F,8DAA8D;AAC9D,EAAE;AACF,0FAA0F;AAC1F,6FAA6F;AAC7F,qFAAqF;AACrF,4FAA4F;AAC5F,qDAAqD;AACrD,EAAE;AACF,sFAAsF;AACtF,wFAAwF;AACxF,yFAAyF;AACzF,0FAA0F;AAC1F,iFAAiF;AACjF,2C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W,CAAC,uBAAuB,CAAC,CAAA;AAC/C,CAAC;AAED,OAAO,EACL,oBAAoB,EACpB,iCAAiC,EACjC,+BAA+B,EAC/B,UAAU,EACV,mBAAmB,EACnB,+BAA+B,EAC/B,wBAAwB,EACxB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,wBAAwB,GAEzB,MAAM,wBAAwB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/agents",
|
|
3
|
-
"version": "0.75.
|
|
3
|
+
"version": "0.75.1",
|
|
4
4
|
"description": "Agent catalog, routing, prompts and fragment library for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"handlebars": "^4.7.9",
|
|
33
33
|
"p-map": "^7.0.6",
|
|
34
34
|
"valibot": "^1.4.2",
|
|
35
|
-
"@cat-factory/contracts": "0.
|
|
36
|
-
"@cat-factory/kernel": "0.
|
|
37
|
-
"@cat-factory/prompt-fragments": "0.15.
|
|
35
|
+
"@cat-factory/contracts": "0.178.0",
|
|
36
|
+
"@cat-factory/kernel": "0.171.0",
|
|
37
|
+
"@cat-factory/prompt-fragments": "0.15.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"typescript": "7.0.2",
|
|
41
41
|
"vitest": "^4.1.10",
|
|
42
|
-
"@cat-factory/caching": "0.10.
|
|
42
|
+
"@cat-factory/caching": "0.10.56"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "tsc -b tsconfig.build.json",
|