@cat-factory/agents 0.33.1 → 0.34.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/dist/agents/catalog.d.ts +3 -2
- package/dist/agents/catalog.d.ts.map +1 -1
- package/dist/agents/catalog.js +13 -14
- package/dist/agents/catalog.js.map +1 -1
- package/dist/agents/kinds/bug-investigator.d.ts +29 -0
- package/dist/agents/kinds/bug-investigator.d.ts.map +1 -0
- package/dist/agents/kinds/bug-investigator.js +102 -0
- package/dist/agents/kinds/bug-investigator.js.map +1 -0
- package/dist/agents/kinds/configs.d.ts +3 -2
- package/dist/agents/kinds/configs.d.ts.map +1 -1
- package/dist/agents/kinds/configs.js +4 -5
- package/dist/agents/kinds/configs.js.map +1 -1
- package/dist/agents/kinds/document.d.ts +4 -4
- package/dist/agents/kinds/document.d.ts.map +1 -1
- package/dist/agents/kinds/document.js +4 -7
- package/dist/agents/kinds/document.js.map +1 -1
- package/dist/agents/kinds/initiative.d.ts +4 -4
- package/dist/agents/kinds/initiative.d.ts.map +1 -1
- package/dist/agents/kinds/initiative.js +4 -7
- package/dist/agents/kinds/initiative.js.map +1 -1
- package/dist/agents/kinds/registry.d.ts +69 -36
- package/dist/agents/kinds/registry.d.ts.map +1 -1
- package/dist/agents/kinds/registry.js +111 -82
- package/dist/agents/kinds/registry.js.map +1 -1
- package/dist/agents/kinds/step-surface.d.ts +2 -1
- package/dist/agents/kinds/step-surface.d.ts.map +1 -1
- package/dist/agents/kinds/step-surface.js +2 -3
- package/dist/agents/kinds/step-surface.js.map +1 -1
- package/dist/agents/kinds/traits.d.ts +10 -4
- package/dist/agents/kinds/traits.d.ts.map +1 -1
- package/dist/agents/kinds/traits.js +12 -8
- package/dist/agents/kinds/traits.js.map +1 -1
- package/dist/agents/kinds/tuning.d.ts +2 -1
- package/dist/agents/kinds/tuning.d.ts.map +1 -1
- package/dist/agents/kinds/tuning.js +2 -3
- package/dist/agents/kinds/tuning.js.map +1 -1
- package/dist/agents/prompts/roles.d.ts.map +1 -1
- package/dist/agents/prompts/roles.js +4 -6
- package/dist/agents/prompts/roles.js.map +1 -1
- package/dist/agents/runtime/executor.d.ts +9 -1
- package/dist/agents/runtime/executor.d.ts.map +1 -1
- package/dist/agents/runtime/executor.js +7 -4
- package/dist/agents/runtime/executor.js.map +1 -1
- package/dist/agents/runtime/web-search.d.ts +2 -1
- package/dist/agents/runtime/web-search.d.ts.map +1 -1
- package/dist/agents/runtime/web-search.js +2 -3
- package/dist/agents/runtime/web-search.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/agents/catalog.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { AgentKind } from '@cat-factory/kernel';
|
|
2
2
|
import type { AgentRunContext } from '@cat-factory/kernel';
|
|
3
|
-
|
|
3
|
+
import type { AgentKindRegistry } from './kinds/registry.js';
|
|
4
|
+
export declare function systemPromptFor(kind: AgentKind, registry: AgentKindRegistry): string;
|
|
4
5
|
/**
|
|
5
6
|
* Build the user prompt from the block context and the run so far. `opts.materialized`
|
|
6
7
|
* (set by the container executor) renders linked context as a summary index pointing at
|
|
7
8
|
* the on-disk files; the default (inline executors) injects the bodies into the prompt.
|
|
8
9
|
*/
|
|
9
|
-
export declare function userPromptFor(context: AgentRunContext, opts?: {
|
|
10
|
+
export declare function userPromptFor(context: AgentRunContext, registry: AgentKindRegistry, opts?: {
|
|
10
11
|
materialized?: boolean;
|
|
11
12
|
}): string;
|
|
12
13
|
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAY1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAsB5D,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAWpF;AAuGD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,iBAAiB,EAC3B,IAAI,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,GACpC,MAAM,CAER"}
|
package/dist/agents/catalog.js
CHANGED
|
@@ -5,7 +5,6 @@ import { READ_ONLY_GUARDRAIL, isReadOnlyAgentKind } from './kinds/read-only.js';
|
|
|
5
5
|
import { businessLogicSystemPrompt } from './prompts/business-logic.js';
|
|
6
6
|
import { mockFrontendSection, mockSystemPrompt } from './prompts/mock.js';
|
|
7
7
|
import { testingSystemPrompt, testerEnvironmentSection } from './prompts/testing.js';
|
|
8
|
-
import { registeredAgentStep, registeredSystemPrompt, registeredUserPrompt, } from './kinds/registry.js';
|
|
9
8
|
import { traitGuidanceFor } from './kinds/traits.js';
|
|
10
9
|
import { roleSystemPrompt } from './prompts/roles.js';
|
|
11
10
|
import { FINAL_ANSWER_IN_REPLY } from './prompts/shared.js';
|
|
@@ -18,16 +17,16 @@ import { environmentSection, involvedServicesSection, linkedContextSection, phas
|
|
|
18
17
|
// builder in ./prompts/mock, the business-logic track in ./prompts/business-logic,
|
|
19
18
|
// the tester/fixer track in ./prompts/testing, the companions in ./prompts/companion,
|
|
20
19
|
// and the thin one-line roles + generic fallback in ./prompts/roles).
|
|
21
|
-
export function systemPromptFor(kind) {
|
|
22
|
-
const base = baseSystemPromptFor(kind);
|
|
20
|
+
export function systemPromptFor(kind, registry) {
|
|
21
|
+
const base = baseSystemPromptFor(kind, registry);
|
|
23
22
|
// Append the surface-driven directives (read-only guardrail + final-answer-in-reply) — see
|
|
24
23
|
// {@link applySurfaceDirectives}. This is the single place that decision lives, so a
|
|
25
24
|
// registered kind gets the SAME treatment a built-in does from its declared `agent.surface`.
|
|
26
|
-
const withDirectives = applySurfaceDirectives(base, kind);
|
|
25
|
+
const withDirectives = applySurfaceDirectives(base, kind, registry);
|
|
27
26
|
// Fold in any guidance contributed by the kind's traits (e.g. the spec-aware kinds get
|
|
28
27
|
// the in-repo-spec reading guidance). Marker traits like `code-aware` add nothing here —
|
|
29
28
|
// their effect (folding the service's fragments) is applied by the execution engine.
|
|
30
|
-
const guidance = traitGuidanceFor(kind);
|
|
29
|
+
const guidance = traitGuidanceFor(kind, registry);
|
|
31
30
|
return guidance.length ? `${withDirectives}\n\n${guidance.join('\n\n')}` : withDirectives;
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
@@ -48,11 +47,11 @@ export function systemPromptFor(kind) {
|
|
|
48
47
|
* already carries FINAL_ANSWER_IN_REPLY), not the registered one — so we gate `needsFinalAnswer`
|
|
49
48
|
* on the base actually being the registered prompt, not merely on the kind being in the registry.
|
|
50
49
|
*/
|
|
51
|
-
function applySurfaceDirectives(prompt, kind) {
|
|
52
|
-
const surface =
|
|
50
|
+
function applySurfaceDirectives(prompt, kind, registry) {
|
|
51
|
+
const surface = registry.agentStep(kind)?.surface;
|
|
53
52
|
// True only when the base prompt is the one from the registry — i.e. no built-in track claimed
|
|
54
53
|
// this kind. A built-in-track-owned id (even if also registered) already got the directive.
|
|
55
|
-
const usedRegisteredPrompt = prompt ===
|
|
54
|
+
const usedRegisteredPrompt = prompt === registry.systemPrompt(kind);
|
|
56
55
|
const needsGuardrail = isReadOnlyAgentKind(kind) || surface === 'container-explore';
|
|
57
56
|
const needsFinalAnswer = usedRegisteredPrompt && (surface === 'inline' || surface === 'container-explore');
|
|
58
57
|
let result = prompt;
|
|
@@ -62,7 +61,7 @@ function applySurfaceDirectives(prompt, kind) {
|
|
|
62
61
|
result = `${result}\n\n${FINAL_ANSWER_IN_REPLY}`;
|
|
63
62
|
return result;
|
|
64
63
|
}
|
|
65
|
-
function baseSystemPromptFor(kind) {
|
|
64
|
+
function baseSystemPromptFor(kind, registry) {
|
|
66
65
|
// Companion kinds (reviewer, architect-companion, spec-companion, …) win over every
|
|
67
66
|
// built-in track: they grade a prior step's output and return a JSON rating.
|
|
68
67
|
const companion = companionSystemPrompt(kind);
|
|
@@ -90,7 +89,7 @@ function baseSystemPromptFor(kind) {
|
|
|
90
89
|
// surface-driven directives (FINAL_ANSWER_IN_REPLY / read-only guardrail) are applied
|
|
91
90
|
// centrally in `systemPromptFor` via `applySurfaceDirectives`, so the raw registered
|
|
92
91
|
// prompt is returned here as-is.
|
|
93
|
-
const registered =
|
|
92
|
+
const registered = registry.systemPrompt(kind);
|
|
94
93
|
if (registered !== undefined)
|
|
95
94
|
return registered;
|
|
96
95
|
return roleSystemPrompt(kind);
|
|
@@ -132,17 +131,17 @@ function withRevision(prompt, context) {
|
|
|
132
131
|
* (set by the container executor) renders linked context as a summary index pointing at
|
|
133
132
|
* the on-disk files; the default (inline executors) injects the bodies into the prompt.
|
|
134
133
|
*/
|
|
135
|
-
export function userPromptFor(context, opts = {}) {
|
|
136
|
-
return withRevision(buildBaseUserPrompt(context, opts), context);
|
|
134
|
+
export function userPromptFor(context, registry, opts = {}) {
|
|
135
|
+
return withRevision(buildBaseUserPrompt(context, registry, opts), context);
|
|
137
136
|
}
|
|
138
|
-
function buildBaseUserPrompt(context, opts = {}) {
|
|
137
|
+
function buildBaseUserPrompt(context, registry, opts = {}) {
|
|
139
138
|
// Standard phases get their built-out, templated user prompt.
|
|
140
139
|
const phase = phaseForKind(context.agentKind);
|
|
141
140
|
if (phase)
|
|
142
141
|
return renderStandardUserPrompt(phase, context, opts);
|
|
143
142
|
// A registered custom kind may supply its own user prompt; otherwise it falls through
|
|
144
143
|
// to the generic block-context prompt below, like any other non-standard-phase kind.
|
|
145
|
-
const registered =
|
|
144
|
+
const registered = registry.userPrompt(context);
|
|
146
145
|
if (registered !== undefined)
|
|
147
146
|
return registered;
|
|
148
147
|
const { block, pipelineName, priorOutputs, decisions, resolvedDecision } = context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/agents/catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB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AAI,CAAC,CAAA;AACzB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,sBAAsB,CAAC,OAAwB;IACtD,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,SAAS,CAAC;QAAE,OAAO,SAAS,CAAA;IACzD,MAAM,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;IACnD,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1D,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAE,CAAA;QACzC,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;YACzC,OAAO,CACL,uCAAuC,QAAQ,CAAC,SAAS,uBAAuB;gBAChF,QAAQ,QAAQ,CAAC,SAAS,4CAA4C,CACvE,CAAA;QACH,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AgentKindDefinition, AgentKindRegistry } from './registry.js';
|
|
2
|
+
export declare const BUG_INVESTIGATOR_KIND = "bug-investigator";
|
|
3
|
+
/**
|
|
4
|
+
* The bug investigator's structured finding. Lenient (`v.fallback`/`v.optional`) exactly like
|
|
5
|
+
* `securityAssessment` so a partially-malformed reply degrades to sensible defaults rather than
|
|
6
|
+
* failing the whole run: an unreadable `clarity` reads as `clear` (advance rather than falsely
|
|
7
|
+
* park), and each list degrades to empty rather than discarding the object.
|
|
8
|
+
*/
|
|
9
|
+
export declare const bugInvestigation: import("./structured-output.js").StructuredOutput<{
|
|
10
|
+
clarity: "clear" | "needs_clarification";
|
|
11
|
+
summary?: string | undefined;
|
|
12
|
+
rootCauseHypotheses: string[];
|
|
13
|
+
affectedRepos: {
|
|
14
|
+
repo: string;
|
|
15
|
+
frameId?: string | undefined;
|
|
16
|
+
paths: string[];
|
|
17
|
+
rationale?: string | undefined;
|
|
18
|
+
}[];
|
|
19
|
+
suggestedReproductions: string[];
|
|
20
|
+
questions: string[];
|
|
21
|
+
}>;
|
|
22
|
+
export type BugInvestigation = ReturnType<typeof bugInvestigation.parse>;
|
|
23
|
+
export declare const BUG_INVESTIGATOR_AGENT_KINDS: AgentKindDefinition[];
|
|
24
|
+
/**
|
|
25
|
+
* Register the bug-investigator kind on the given registry. Called by
|
|
26
|
+
* `defaultAgentKindRegistry()`; idempotent (the registry replaces by kind).
|
|
27
|
+
*/
|
|
28
|
+
export declare function registerBugInvestigatorAgent(registry: AgentKindRegistry): void;
|
|
29
|
+
//# sourceMappingURL=bug-investigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-investigator.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/bug-investigator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAyB3E,eAAO,MAAM,qBAAqB,qBAAqB,CAAA;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EA4B5B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAA;AAwBxE,eAAO,MAAM,4BAA4B,EAAE,mBAAmB,EAwB7D,CAAA;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAE9E"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
import { defineStructuredOutput } from './structured-output.js';
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// The `bug-investigator` agent kind — the read-only, multi-repo investigation that
|
|
5
|
+
// OPENS a bug-fix / bug-triage pipeline.
|
|
6
|
+
//
|
|
7
|
+
// It was a thin prose role (an enriched Markdown report); it is upgraded here to a
|
|
8
|
+
// STRUCTURED `container-explore` kind through the public `registerAgentKind` seam (the
|
|
9
|
+
// `security-auditor` worked example is the shape copied), keeping the SAME kind id so the
|
|
10
|
+
// existing `pl_bugfix` preset inherits the upgrade with no pipeline change. It clones the
|
|
11
|
+
// primary repo read-only PLUS every connected involved-service repo as sibling checkouts
|
|
12
|
+
// (the service-connections `peerRepos` job body, gated on `MULTI_REPO_FANOUT_KINDS`), so a
|
|
13
|
+
// cross-service bug is traced across every repo it touches — not prompt-only.
|
|
14
|
+
//
|
|
15
|
+
// Its structured output drives the downstream clarity gate: `clarity` decides whether the
|
|
16
|
+
// gate auto-passes (`clear`) or parks a human for answers (`needs_clarification`, seeding
|
|
17
|
+
// the review items from `questions`), and a post-completion resolver renders a prose digest
|
|
18
|
+
// into `step.output` so the estimator / repro-test / coder read it via `priorOutputs`. The
|
|
19
|
+
// structured object stays on `step.custom`, rendered by the stock `generic-structured` view.
|
|
20
|
+
//
|
|
21
|
+
// The read-only guardrail + final-answer-in-reply directives are appended automatically for
|
|
22
|
+
// a registered `container-explore` kind (see `applySurfaceDirectives` in `catalog.ts`), so
|
|
23
|
+
// the prompt below is only the core role.
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
export const BUG_INVESTIGATOR_KIND = 'bug-investigator';
|
|
26
|
+
/**
|
|
27
|
+
* The bug investigator's structured finding. Lenient (`v.fallback`/`v.optional`) exactly like
|
|
28
|
+
* `securityAssessment` so a partially-malformed reply degrades to sensible defaults rather than
|
|
29
|
+
* failing the whole run: an unreadable `clarity` reads as `clear` (advance rather than falsely
|
|
30
|
+
* park), and each list degrades to empty rather than discarding the object.
|
|
31
|
+
*/
|
|
32
|
+
export const bugInvestigation = defineStructuredOutput(v.object({
|
|
33
|
+
/** Whether the report is fixable as-is (`clear`) or needs the reporter to clarify. */
|
|
34
|
+
clarity: v.fallback(v.picklist(['clear', 'needs_clarification']), 'clear'),
|
|
35
|
+
/** What the bug is, restated in the investigator's own words with the context it found. */
|
|
36
|
+
summary: v.fallback(v.optional(v.string()), undefined),
|
|
37
|
+
/** Ranked candidate root causes (most likely first). */
|
|
38
|
+
rootCauseHypotheses: v.fallback(v.array(v.fallback(v.string(), '')), []),
|
|
39
|
+
/** Each repo the bug touches, with the relevant paths + why it is implicated. */
|
|
40
|
+
affectedRepos: v.fallback(v.array(v.fallback(v.object({
|
|
41
|
+
repo: v.fallback(v.string(), ''),
|
|
42
|
+
frameId: v.fallback(v.optional(v.string()), undefined),
|
|
43
|
+
paths: v.fallback(v.array(v.fallback(v.string(), '')), []),
|
|
44
|
+
rationale: v.fallback(v.optional(v.string()), undefined),
|
|
45
|
+
}), { repo: '', paths: [] })), []),
|
|
46
|
+
/** Concrete reproduction / failing-test ideas for the downstream repro-test step. */
|
|
47
|
+
suggestedReproductions: v.fallback(v.array(v.fallback(v.string(), '')), []),
|
|
48
|
+
/** Non-empty ONLY when `clarity === 'needs_clarification'`: what to ask the reporter. */
|
|
49
|
+
questions: v.fallback(v.array(v.fallback(v.string(), '')), []),
|
|
50
|
+
}));
|
|
51
|
+
const BUG_INVESTIGATOR_SYSTEM_PROMPT = 'You are a senior engineer triaging a bug report against this codebase before anyone fixes ' +
|
|
52
|
+
'it. Read the relevant code paths, tests and configuration across every checked-out ' +
|
|
53
|
+
'repository to understand the reported behaviour and where it lives. When more than one ' +
|
|
54
|
+
'repository is present (a cross-service bug), investigate all of them — the fault may be in ' +
|
|
55
|
+
'a service other than the one the report names. Decide whether the report is fixable AS-IS ' +
|
|
56
|
+
'or whether you must ask the reporter for missing detail (no reproduction steps, no ' +
|
|
57
|
+
'expected-vs-actual, ambiguous scope). Return ONLY a JSON object of this exact shape:\n' +
|
|
58
|
+
'{\n' +
|
|
59
|
+
' "clarity": "clear" | "needs_clarification",\n' +
|
|
60
|
+
' "summary": "what the bug is, restated with the technical context you found",\n' +
|
|
61
|
+
' "rootCauseHypotheses": ["ranked candidate root causes, most likely first"],\n' +
|
|
62
|
+
' "affectedRepos": [{ "repo": "owner/name", "frameId": "optional", "paths": ["files"], "rationale": "why" }],\n' +
|
|
63
|
+
' "suggestedReproductions": ["concrete repro / failing-test ideas"],\n' +
|
|
64
|
+
' "questions": ["only when needs_clarification: what to ask the reporter"]\n' +
|
|
65
|
+
'}\n' +
|
|
66
|
+
'Set "clarity" to "needs_clarification" ONLY when you genuinely cannot confidently locate the ' +
|
|
67
|
+
'fault without more input, and then make "questions" a non-empty, specific, answerable list ' +
|
|
68
|
+
'phrased for the bug reporter. Otherwise set "clarity" to "clear" and leave "questions" empty. ' +
|
|
69
|
+
'Only propose a root-cause hypothesis when you are reasonably confident — a low-confidence guess ' +
|
|
70
|
+
'would misdirect the fix. Do not propose or write a fix.';
|
|
71
|
+
export const BUG_INVESTIGATOR_AGENT_KINDS = [
|
|
72
|
+
{
|
|
73
|
+
kind: BUG_INVESTIGATOR_KIND,
|
|
74
|
+
systemPrompt: BUG_INVESTIGATOR_SYSTEM_PROMPT,
|
|
75
|
+
// Read-only checkout of the primary repo's base branch (+ any peer repos as siblings,
|
|
76
|
+
// wired by the executor's multi-repo fan-out). `agent.output` is derived from the schema.
|
|
77
|
+
agent: { surface: 'container-explore', clone: { branch: 'base' } },
|
|
78
|
+
// A cross-service bug may live in a connected service other than the one it was filed
|
|
79
|
+
// against, so fan out over every involved-service repo (read-only sibling checkouts).
|
|
80
|
+
fanOutMultiRepo: true,
|
|
81
|
+
structuredOutput: bugInvestigation,
|
|
82
|
+
presentation: {
|
|
83
|
+
label: 'Bug Investigator',
|
|
84
|
+
icon: 'i-lucide-search-code',
|
|
85
|
+
color: '#38bdf8',
|
|
86
|
+
description: 'Read-only, multi-repo codebase investigation that traces a bug to its root cause and ' +
|
|
87
|
+
'decides whether the report is fixable as-is or needs the reporter to clarify.',
|
|
88
|
+
category: 'review',
|
|
89
|
+
// The structured finding opens in the shared generic viewer (no bespoke window); the
|
|
90
|
+
// clarity gate consumes `clarity`/`questions` server-side.
|
|
91
|
+
resultView: 'generic-structured',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
];
|
|
95
|
+
/**
|
|
96
|
+
* Register the bug-investigator kind on the given registry. Called by
|
|
97
|
+
* `defaultAgentKindRegistry()`; idempotent (the registry replaces by kind).
|
|
98
|
+
*/
|
|
99
|
+
export function registerBugInvestigatorAgent(registry) {
|
|
100
|
+
registry.registerAll(BUG_INVESTIGATOR_AGENT_KINDS);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=bug-investigator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bug-investigator.js","sourceRoot":"","sources":["../../../src/agents/kinds/bug-investigator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,8EAA8E;AAC9E,mFAAmF;AACnF,yCAAyC;AACzC,EAAE;AACF,mFAAmF;AACnF,uFAAuF;AACvF,0FAA0F;AAC1F,0FAA0F;AAC1F,yFAAyF;AACzF,2FAA2F;AAC3F,8EAA8E;AAC9E,EAAE;AACF,0FAA0F;AAC1F,0FAA0F;AAC1F,4FAA4F;AAC5F,2FAA2F;AAC3F,6FAA6F;AAC7F,EAAE;AACF,4FAA4F;AAC5F,2FAA2F;AAC3F,0CAA0C;AAC1C,8EAA8E;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,sBAAsB,CACpD,CAAC,CAAC,MAAM,CAAC;IACP,sFAAsF;IACtF,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC,EAAE,OAAO,CAAC;IAC1E,2FAA2F;IAC3F,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,C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,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC;CAC/D,CAAC,CACH,CAAA;AAID,MAAM,8BAA8B,GAClC,4FAA4F;IAC5F,qFAAqF;IACrF,yFAAyF;IACzF,6FAA6F;IAC7F,4FAA4F;IAC5F,qFAAqF;IACrF,wFAAwF;IACxF,KAAK;IACL,iDAAiD;IACjD,kFAAkF;IAClF,iFAAiF;IACjF,iHAAiH;IACjH,wEAAwE;IACxE,8EAA8E;IAC9E,KAAK;IACL,+FAA+F;IAC/F,6FAA6F;IAC7F,gGAAgG;IAChG,kGAAkG;IAClG,yDAAyD,CAAA;AAE3D,MAAM,CAAC,MAAM,4BAA4B,GAA0B;IACjE;QACE,IAAI,EAAE,qBAAqB;QAC3B,YAAY,EAAE,8BAA8B;QAC5C,sFAAsF;QACtF,0FAA0F;QAC1F,KAAK,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;QAClE,sFAAsF;QACtF,sFAAsF;QACtF,eAAe,EAAE,IAAI;QACrB,gBAAgB,EAAE,gBAAgB;QAClC,YAAY,EAAE;YACZ,KAAK,EAAE,kBAAkB;YACzB,IAAI,EAAE,sBAAsB;YAC5B,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,uFAAuF;gBACvF,+EAA+E;YACjF,QAAQ,EAAE,QAAQ;YAClB,qFAAqF;YACrF,2DAA2D;YAC3D,UAAU,EAAE,oBAAoB;SACjC;KACF;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAA2B;IACtE,QAAQ,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAA;AACpD,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { AgentConfigDescriptor, AgentKind } from '@cat-factory/kernel';
|
|
2
|
+
import type { AgentKindRegistry } from './registry.js';
|
|
2
3
|
/** The acceptance/e2e execution target: project CI, or the ephemeral env. */
|
|
3
4
|
export declare const PLAYWRIGHT_E2E_TARGET_CONFIG_ID = "playwright.e2eTarget";
|
|
4
5
|
/**
|
|
5
6
|
* The config descriptors an agent kind contributes: the built-in ones plus any a
|
|
6
7
|
* deployment registered for the kind. Empty for kinds that contribute none.
|
|
7
8
|
*/
|
|
8
|
-
export declare function configContributionsFor(kind: AgentKind): AgentConfigDescriptor[];
|
|
9
|
+
export declare function configContributionsFor(kind: AgentKind, registry: AgentKindRegistry): AgentConfigDescriptor[];
|
|
9
10
|
/**
|
|
10
11
|
* The deduplicated catalog of config descriptors contributed across a set of agent
|
|
11
12
|
* kinds (e.g. all the kinds used by a workspace's pipelines), keyed by descriptor
|
|
12
13
|
* id (first contribution wins). This is what the workspace snapshot carries.
|
|
13
14
|
*/
|
|
14
|
-
export declare function configContributionCatalog(kinds: Iterable<AgentKind
|
|
15
|
+
export declare function configContributionCatalog(kinds: Iterable<AgentKind>, registry: AgentKindRegistry): AgentConfigDescriptor[];
|
|
15
16
|
//# sourceMappingURL=configs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/configs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/configs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAOtD,6EAA6E;AAC7E,eAAO,MAAM,+BAA+B,yBAAyB,CAAA;AAoBrE;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,iBAAiB,GAC1B,qBAAqB,EAAE,CAIzB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC,EAC1B,QAAQ,EAAE,iBAAiB,GAC1B,qBAAqB,EAAE,CAQzB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { registeredConfigContributions } from './registry.js';
|
|
2
1
|
// Built-in agent config contributions. An agent kind declares the task-level
|
|
3
2
|
// parameters it cares about here; the union over a pipeline's kinds is what the
|
|
4
3
|
// task-creation form and inspector render (and freeze once the owning step runs).
|
|
@@ -25,9 +24,9 @@ const BUILTIN_CONFIG_CONTRIBUTIONS = {
|
|
|
25
24
|
* The config descriptors an agent kind contributes: the built-in ones plus any a
|
|
26
25
|
* deployment registered for the kind. Empty for kinds that contribute none.
|
|
27
26
|
*/
|
|
28
|
-
export function configContributionsFor(kind) {
|
|
27
|
+
export function configContributionsFor(kind, registry) {
|
|
29
28
|
const builtin = BUILTIN_CONFIG_CONTRIBUTIONS[kind] ?? [];
|
|
30
|
-
const registered =
|
|
29
|
+
const registered = registry.configContributions(kind);
|
|
31
30
|
return registered.length ? [...builtin, ...registered] : builtin;
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
@@ -35,10 +34,10 @@ export function configContributionsFor(kind) {
|
|
|
35
34
|
* kinds (e.g. all the kinds used by a workspace's pipelines), keyed by descriptor
|
|
36
35
|
* id (first contribution wins). This is what the workspace snapshot carries.
|
|
37
36
|
*/
|
|
38
|
-
export function configContributionCatalog(kinds) {
|
|
37
|
+
export function configContributionCatalog(kinds, registry) {
|
|
39
38
|
const byId = new Map();
|
|
40
39
|
for (const kind of kinds) {
|
|
41
|
-
for (const descriptor of configContributionsFor(kind)) {
|
|
40
|
+
for (const descriptor of configContributionsFor(kind, registry)) {
|
|
42
41
|
if (!byId.has(descriptor.id))
|
|
43
42
|
byId.set(descriptor.id, descriptor);
|
|
44
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.js","sourceRoot":"","sources":["../../../src/agents/kinds/configs.ts"],"names":[],"mappings":"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BAAE,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,EAAE,UAAU,CAAC,CAAA;QACnE,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;AAC3B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentKindDefinition } from './registry.js';
|
|
1
|
+
import type { AgentKindDefinition, AgentKindRegistry } from './registry.js';
|
|
2
2
|
export declare const DOC_RESEARCHER_KIND = "doc-researcher";
|
|
3
3
|
export declare const DOC_OUTLINER_KIND = "doc-outliner";
|
|
4
4
|
export declare const DOC_WRITER_KIND = "doc-writer";
|
|
@@ -8,8 +8,8 @@ export declare const DOC_REVIEWER_KIND = "doc-reviewer";
|
|
|
8
8
|
/** The document-authoring kinds (the companion `doc-reviewer` is defined in ./companions). */
|
|
9
9
|
export declare const DOCUMENT_AGENT_KINDS: AgentKindDefinition[];
|
|
10
10
|
/**
|
|
11
|
-
* Register the document-authoring kinds
|
|
12
|
-
*
|
|
11
|
+
* Register the document-authoring kinds on the given registry. Called by
|
|
12
|
+
* `defaultAgentKindRegistry()`; idempotent (the registry replaces by kind).
|
|
13
13
|
*/
|
|
14
|
-
export declare function registerDocumentAgents(): void;
|
|
14
|
+
export declare function registerDocumentAgents(registry: AgentKindRegistry): void;
|
|
15
15
|
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/document.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/document.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAiC3E,eAAO,MAAM,mBAAmB,mBAAmB,CAAA;AACnD,eAAO,MAAM,iBAAiB,iBAAiB,CAAA;AAC/C,eAAO,MAAM,eAAe,eAAe,CAAA;AAC3C,eAAO,MAAM,kBAAkB,kBAAkB,CAAA;AACjD,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,iBAAiB,CAAA;AAyL/C,8FAA8F;AAC9F,eAAO,MAAM,oBAAoB,EAAE,mBAAmB,EAuErD,CAAA;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAExE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CONTEXT_BUDGET, estimateTokens } from '@cat-factory/kernel';
|
|
2
|
-
import { registerAgentKinds } from './registry.js';
|
|
3
2
|
import { DOC_AWARE_TRAIT } from './traits.js';
|
|
4
3
|
import { linkedContextSection } from '../prompts/standard.js';
|
|
5
4
|
import { docTemplateFor, templateOutlineGuidance, templateSkeletonGuidance, templateStructureLine, } from './doc-templates.js';
|
|
@@ -258,12 +257,10 @@ export const DOCUMENT_AGENT_KINDS = [
|
|
|
258
257
|
},
|
|
259
258
|
];
|
|
260
259
|
/**
|
|
261
|
-
* Register the document-authoring kinds
|
|
262
|
-
*
|
|
260
|
+
* Register the document-authoring kinds on the given registry. Called by
|
|
261
|
+
* `defaultAgentKindRegistry()`; idempotent (the registry replaces by kind).
|
|
263
262
|
*/
|
|
264
|
-
export function registerDocumentAgents() {
|
|
265
|
-
|
|
263
|
+
export function registerDocumentAgents(registry) {
|
|
264
|
+
registry.registerAll(DOCUMENT_AGENT_KINDS);
|
|
266
265
|
}
|
|
267
|
-
// Side-effect registration: importing `@cat-factory/agents` registers these first-class kinds.
|
|
268
|
-
registerDocumentAgents();
|
|
269
266
|
//# sourceMappingURL=document.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../../src/agents/kinds/document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MA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AAM,EAAE,CAAC,eAAe,CAAC;QACzB,YAAY,EAAE;YACZ,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,uBAAuB;YAC7B,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,0GAA0G;YAC5G,QAAQ,EAAE,MAAM;SACjB;KACF;CACF,CAAA;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAA2B;IAChE,QAAQ,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAA;AAC5C,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { AgentKindDefinition } from './registry.js';
|
|
1
|
+
import type { AgentKindDefinition, AgentKindRegistry } from './registry.js';
|
|
2
2
|
export declare const INITIATIVE_BREAKDOWN_KIND = "initiative-breakdown";
|
|
3
3
|
export declare const INITIATIVE_AGENT_KINDS: AgentKindDefinition[];
|
|
4
4
|
/**
|
|
5
|
-
* Register the initiative kind
|
|
6
|
-
*
|
|
5
|
+
* Register the initiative kind on the given registry. Called by `defaultAgentKindRegistry()`;
|
|
6
|
+
* idempotent (the registry replaces by kind).
|
|
7
7
|
*/
|
|
8
|
-
export declare function registerInitiativeAgents(): void;
|
|
8
|
+
export declare function registerInitiativeAgents(registry: AgentKindRegistry): void;
|
|
9
9
|
//# sourceMappingURL=initiative.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiative.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/initiative.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"initiative.d.ts","sourceRoot":"","sources":["../../../src/agents/kinds/initiative.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAc3E,eAAO,MAAM,yBAAyB,yBAAyB,CAAA;AAyB/D,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,EAevD,CAAA;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAE1E"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { registerAgentKinds } from './registry.js';
|
|
2
1
|
// ---------------------------------------------------------------------------
|
|
3
2
|
// The `initiative-breakdown` agent kind — the first agent reachable from the PUBLIC API.
|
|
4
3
|
//
|
|
@@ -47,12 +46,10 @@ export const INITIATIVE_AGENT_KINDS = [
|
|
|
47
46
|
},
|
|
48
47
|
];
|
|
49
48
|
/**
|
|
50
|
-
* Register the initiative kind
|
|
51
|
-
*
|
|
49
|
+
* Register the initiative kind on the given registry. Called by `defaultAgentKindRegistry()`;
|
|
50
|
+
* idempotent (the registry replaces by kind).
|
|
52
51
|
*/
|
|
53
|
-
export function registerInitiativeAgents() {
|
|
54
|
-
|
|
52
|
+
export function registerInitiativeAgents(registry) {
|
|
53
|
+
registry.registerAll(INITIATIVE_AGENT_KINDS);
|
|
55
54
|
}
|
|
56
|
-
// Side-effect registration: importing `@cat-factory/agents` registers this first-class kind.
|
|
57
|
-
registerInitiativeAgents();
|
|
58
55
|
//# sourceMappingURL=initiative.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initiative.js","sourceRoot":"","sources":["../../../src/agents/kinds/initiative.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"initiative.js","sourceRoot":"","sources":["../../../src/agents/kinds/initiative.ts"],"names":[],"mappings":"AAGA,8EAA8E;AAC9E,yFAAyF;AACzF,EAAE;AACF,8FAA8F;AAC9F,gGAAgG;AAChG,iGAAiG;AACjG,8FAA8F;AAC9F,kGAAkG;AAClG,6FAA6F;AAC7F,mFAAmF;AACnF,8EAA8E;AAE9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,sBAAsB,CAAA;AAE/D,MAAM,kCAAkC,GACtC,gGAAgG;IAChG,8FAA8F;IAC9F,2FAA2F;IAC3F,yFAAyF;IACzF,iGA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