@cat-factory/orchestration 0.300.0 → 0.301.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.
- package/dist/container/inline-producers.d.ts +55 -0
- package/dist/container/inline-producers.d.ts.map +1 -0
- package/dist/container/inline-producers.js +163 -0
- package/dist/container/inline-producers.js.map +1 -0
- package/dist/container/modules.d.ts +2 -46
- package/dist/container/modules.d.ts.map +1 -1
- package/dist/container/modules.js +6 -143
- package/dist/container/modules.js.map +1 -1
- package/dist/modules/bootstrap/BootstrapService.d.ts +6 -0
- package/dist/modules/bootstrap/BootstrapService.d.ts.map +1 -1
- package/dist/modules/bootstrap/BootstrapService.js +47 -7
- package/dist/modules/bootstrap/BootstrapService.js.map +1 -1
- package/dist/modules/bootstrap/MonorepoAdoptionAdvisorService.d.ts +22 -1
- package/dist/modules/bootstrap/MonorepoAdoptionAdvisorService.d.ts.map +1 -1
- package/dist/modules/bootstrap/MonorepoAdoptionAdvisorService.js +69 -12
- package/dist/modules/bootstrap/MonorepoAdoptionAdvisorService.js.map +1 -1
- package/dist/modules/bootstrap/MonorepoBootstrapController.d.ts +15 -2
- package/dist/modules/bootstrap/MonorepoBootstrapController.d.ts.map +1 -1
- package/dist/modules/bootstrap/MonorepoBootstrapController.js +79 -10
- package/dist/modules/bootstrap/MonorepoBootstrapController.js.map +1 -1
- package/dist/modules/bootstrap/monorepoSurvey.d.ts +6 -3
- package/dist/modules/bootstrap/monorepoSurvey.d.ts.map +1 -1
- package/dist/modules/bootstrap/monorepoSurvey.js +6 -3
- package/dist/modules/bootstrap/monorepoSurvey.js.map +1 -1
- package/dist/modules/bootstrap/referenceRefusal.d.ts +30 -0
- package/dist/modules/bootstrap/referenceRefusal.d.ts.map +1 -0
- package/dist/modules/bootstrap/referenceRefusal.js +60 -0
- package/dist/modules/bootstrap/referenceRefusal.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { BugHuntAssessor, EnvironmentInvestigator, JudgeAssessor, MonorepoAdoptionAdvisor } from '@cat-factory/kernel';
|
|
2
|
+
import { ForkChatService } from '../modules/execution/ForkChatService.js';
|
|
3
|
+
import { TesterQualityReviewService } from '../modules/execution/TesterQualityReviewService.js';
|
|
4
|
+
import type { CoreDependencies } from '../container.js';
|
|
5
|
+
/**
|
|
6
|
+
* The inline bug-hunt ranking model, built from the same dependencies the judge/reviewer
|
|
7
|
+
* assessors ride, so a facade that wired a model gets a working hunt ranking with no
|
|
8
|
+
* hunt-specific wiring (the judge-registry pattern). Absent provider ⇒ undefined, and the hunt
|
|
9
|
+
* returns its candidates unranked with a stated reason.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createBugHuntAssessor(deps: CoreDependencies): BugHuntAssessor | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* The inline monorepo-adoption advisor, built from the same model dependencies the bug-hunt and
|
|
14
|
+
* judge assessors ride, so a facade that wired a model gets a working adoption suggestion with
|
|
15
|
+
* no bootstrap-specific wiring. Absent provider ⇒ undefined, and the run parks with a plan that
|
|
16
|
+
* says the suggestion is unavailable rather than one that says there was nothing to decide.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createMonorepoAdoptionAdvisor(deps: CoreDependencies): MonorepoAdoptionAdvisor | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Build the inline reviewer for the test quality-control companion. It resolves its model
|
|
21
|
+
* exactly like the requirements reviewer (block pin → workspace per-kind default → routing
|
|
22
|
+
* default). Returns `undefined` when no model provider is configured, so the Tester gate's QC
|
|
23
|
+
* step is a pass-through in unconfigured facades / tests.
|
|
24
|
+
*/
|
|
25
|
+
export declare function createTesterQualityReviewer(deps: CoreDependencies): TesterQualityReviewService | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The default {@link JudgeAssessor}: the inline LLM verdict producer behind every judge step.
|
|
28
|
+
* Built from the SAME model-provider dependencies the inline reviewers use, which is why judges
|
|
29
|
+
* need no per-facade wiring at all: a facade that can run a requirements review can run a
|
|
30
|
+
* judge. Returns undefined when no provider is wired, and a facade/harness may inject its own
|
|
31
|
+
* `judgeAssessor` (conformance does, for a deterministic verdict); either way an
|
|
32
|
+
* absent/disabled assessor makes every judge step a pass-through.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createJudgeAssessor(deps: CoreDependencies): JudgeAssessor | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The default {@link EnvironmentInvestigator}: the inline diagnosis behind the deployer's
|
|
37
|
+
* environment-investigation loop. Built from the SAME model-provider dependencies the inline
|
|
38
|
+
* reviewers and judges use, so a facade that can run a requirements review can investigate a
|
|
39
|
+
* failed environment with no investigation-specific wiring at all.
|
|
40
|
+
*
|
|
41
|
+
* Returns undefined when no provider is wired, and a facade or harness may inject its own
|
|
42
|
+
* `environmentInvestigator` (the conformance harness does, for a deterministic verdict); either
|
|
43
|
+
* way an absent or disabled investigator makes the loop a pass-through, and a failed provision is
|
|
44
|
+
* terminal and unexplained exactly as it was before.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createEnvironmentInvestigator(deps: CoreDependencies): EnvironmentInvestigator | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Build the inline grounded-chat responder for the implementation-fork decision phase. Resolves
|
|
49
|
+
* its model exactly like the requirements reviewer / doc interviewer (block pin → workspace
|
|
50
|
+
* per-kind default → routing default). Returns `undefined` when no model provider is configured,
|
|
51
|
+
* so the fork chat degrades to a canned "chat unavailable" reply in unconfigured facades / tests
|
|
52
|
+
* while pick / custom keep working. Stateless: the chat rides the coder step, no session store.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createForkChatService(deps: CoreDependencies): ForkChatService | undefined;
|
|
55
|
+
//# sourceMappingURL=inline-producers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-producers.d.ts","sourceRoot":"","sources":["../../src/container/inline-producers.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,eAAe,EACf,uBAAuB,EACvB,aAAa,EACb,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAI5B,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AAEzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oDAAoD,CAAA;AAG/F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEvD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,CAWzF;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,gBAAgB,GACrB,uBAAuB,GAAG,SAAS,CAgBrC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,gBAAgB,GACrB,0BAA0B,GAAG,SAAS,CAUxC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,gBAAgB,GAAG,aAAa,GAAG,SAAS,CAWrF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,gBAAgB,GACrB,uBAAuB,GAAG,SAAS,CAoBrC;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,GAAG,eAAe,GAAG,SAAS,CAUzF"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// The inline producers a facade gets FOR FREE from the model dependencies it already wires: a
|
|
2
|
+
// judge's verdict, a tester-quality review, an environment diagnosis, a fork chat, the bug-hunt
|
|
3
|
+
// ranking and the monorepo adoption suggestion. One cohesive group, extracted from
|
|
4
|
+
// `modules.ts` when that file hit its size budget (the `review-modules.ts` move is the
|
|
5
|
+
// precedent), and re-exported from it so the composition root keeps one import site.
|
|
6
|
+
//
|
|
7
|
+
// What makes them one group is the shape they all share, and the property that shape buys: each
|
|
8
|
+
// needs NO feature-specific wiring, only a model provider, so a deployment that can run a
|
|
9
|
+
// requirements review can run every one of them. Each returns `undefined` when no provider is
|
|
10
|
+
// configured, and every caller treats that as a PASS-THROUGH: the judge step advances, the QC
|
|
11
|
+
// companion is skipped, a failed environment stays unexplained, the hunt returns its candidates
|
|
12
|
+
// unranked, the bootstrap parks with a plan that says the suggestion is unavailable. A facade or
|
|
13
|
+
// harness may inject its own implementation instead (conformance does, for deterministic
|
|
14
|
+
// verdicts), which is the first thing each factory checks.
|
|
15
|
+
//
|
|
16
|
+
// A producer that needs a REPOSITORY as well as a model is not one of these and stays in
|
|
17
|
+
// `modules.ts` with the rest of its module (the document interviewer owns a session store).
|
|
18
|
+
import { BugHuntAssessorService } from '../modules/bugHunt/BugHuntAssessorService.js';
|
|
19
|
+
import { MonorepoAdoptionAdvisorService } from '../modules/bootstrap/MonorepoAdoptionAdvisorService.js';
|
|
20
|
+
import { EnvironmentInvestigationService } from '../modules/execution/EnvironmentInvestigationService.js';
|
|
21
|
+
import { ForkChatService } from '../modules/execution/ForkChatService.js';
|
|
22
|
+
import { JudgeService } from '../modules/execution/JudgeService.js';
|
|
23
|
+
import { TesterQualityReviewService } from '../modules/execution/TesterQualityReviewService.js';
|
|
24
|
+
import { resolveBlockRunContext } from './blockRunContext.js';
|
|
25
|
+
import { inlineModelResolutionDeps } from './inline-model-deps.js';
|
|
26
|
+
/**
|
|
27
|
+
* The inline bug-hunt ranking model, built from the same dependencies the judge/reviewer
|
|
28
|
+
* assessors ride, so a facade that wired a model gets a working hunt ranking with no
|
|
29
|
+
* hunt-specific wiring (the judge-registry pattern). Absent provider ⇒ undefined, and the hunt
|
|
30
|
+
* returns its candidates unranked with a stated reason.
|
|
31
|
+
*/
|
|
32
|
+
export function createBugHuntAssessor(deps) {
|
|
33
|
+
if (deps.bugHuntAssessor)
|
|
34
|
+
return deps.bugHuntAssessor;
|
|
35
|
+
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
36
|
+
return undefined;
|
|
37
|
+
return new BugHuntAssessorService({
|
|
38
|
+
modelProviderResolver: deps.modelProviderResolver,
|
|
39
|
+
modelProvider: deps.modelProvider,
|
|
40
|
+
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
41
|
+
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
42
|
+
...inlineModelResolutionDeps(deps),
|
|
43
|
+
...(deps.logger ? { logger: deps.logger } : {}),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The inline monorepo-adoption advisor, built from the same model dependencies the bug-hunt and
|
|
48
|
+
* judge assessors ride, so a facade that wired a model gets a working adoption suggestion with
|
|
49
|
+
* no bootstrap-specific wiring. Absent provider ⇒ undefined, and the run parks with a plan that
|
|
50
|
+
* says the suggestion is unavailable rather than one that says there was nothing to decide.
|
|
51
|
+
*/
|
|
52
|
+
export function createMonorepoAdoptionAdvisor(deps) {
|
|
53
|
+
if (deps.monorepoAdoptionAdvisor)
|
|
54
|
+
return deps.monorepoAdoptionAdvisor;
|
|
55
|
+
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
56
|
+
return undefined;
|
|
57
|
+
return new MonorepoAdoptionAdvisorService({
|
|
58
|
+
modelProviderResolver: deps.modelProviderResolver,
|
|
59
|
+
modelProvider: deps.modelProvider,
|
|
60
|
+
...inlineModelResolutionDeps(deps),
|
|
61
|
+
...(deps.logger ? { logger: deps.logger } : {}),
|
|
62
|
+
// The same sink the container executor and the bootstrap dispatch record through, so the
|
|
63
|
+
// survey's prompt is readable beside the apply's on the run's own panel. Wired here rather
|
|
64
|
+
// than per facade: it is already a core dependency, and a facade asked to remember a second
|
|
65
|
+
// wiring site for it is a facade where one of the two halves goes missing.
|
|
66
|
+
...(deps.agentContextObservability
|
|
67
|
+
? { agentContextObservability: deps.agentContextObservability }
|
|
68
|
+
: {}),
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Build the inline reviewer for the test quality-control companion. It resolves its model
|
|
73
|
+
* exactly like the requirements reviewer (block pin → workspace per-kind default → routing
|
|
74
|
+
* default). Returns `undefined` when no model provider is configured, so the Tester gate's QC
|
|
75
|
+
* step is a pass-through in unconfigured facades / tests.
|
|
76
|
+
*/
|
|
77
|
+
export function createTesterQualityReviewer(deps) {
|
|
78
|
+
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
79
|
+
return undefined;
|
|
80
|
+
return new TesterQualityReviewService({
|
|
81
|
+
modelProviderResolver: deps.modelProviderResolver,
|
|
82
|
+
modelProvider: deps.modelProvider,
|
|
83
|
+
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
84
|
+
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
85
|
+
...inlineModelResolutionDeps(deps),
|
|
86
|
+
resolveRunContext: resolveBlockRunContext(deps),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The default {@link JudgeAssessor}: the inline LLM verdict producer behind every judge step.
|
|
91
|
+
* Built from the SAME model-provider dependencies the inline reviewers use, which is why judges
|
|
92
|
+
* need no per-facade wiring at all: a facade that can run a requirements review can run a
|
|
93
|
+
* judge. Returns undefined when no provider is wired, and a facade/harness may inject its own
|
|
94
|
+
* `judgeAssessor` (conformance does, for a deterministic verdict); either way an
|
|
95
|
+
* absent/disabled assessor makes every judge step a pass-through.
|
|
96
|
+
*/
|
|
97
|
+
export function createJudgeAssessor(deps) {
|
|
98
|
+
if (deps.judgeAssessor)
|
|
99
|
+
return deps.judgeAssessor;
|
|
100
|
+
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
101
|
+
return undefined;
|
|
102
|
+
return new JudgeService({
|
|
103
|
+
modelProviderResolver: deps.modelProviderResolver,
|
|
104
|
+
modelProvider: deps.modelProvider,
|
|
105
|
+
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
106
|
+
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
107
|
+
...inlineModelResolutionDeps(deps),
|
|
108
|
+
resolveRunContext: resolveBlockRunContext(deps),
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The default {@link EnvironmentInvestigator}: the inline diagnosis behind the deployer's
|
|
113
|
+
* environment-investigation loop. Built from the SAME model-provider dependencies the inline
|
|
114
|
+
* reviewers and judges use, so a facade that can run a requirements review can investigate a
|
|
115
|
+
* failed environment with no investigation-specific wiring at all.
|
|
116
|
+
*
|
|
117
|
+
* Returns undefined when no provider is wired, and a facade or harness may inject its own
|
|
118
|
+
* `environmentInvestigator` (the conformance harness does, for a deterministic verdict); either
|
|
119
|
+
* way an absent or disabled investigator makes the loop a pass-through, and a failed provision is
|
|
120
|
+
* terminal and unexplained exactly as it was before.
|
|
121
|
+
*/
|
|
122
|
+
export function createEnvironmentInvestigator(deps) {
|
|
123
|
+
if (deps.environmentInvestigator)
|
|
124
|
+
return deps.environmentInvestigator;
|
|
125
|
+
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
126
|
+
return undefined;
|
|
127
|
+
return new EnvironmentInvestigationService({
|
|
128
|
+
modelProviderResolver: deps.modelProviderResolver,
|
|
129
|
+
modelProvider: deps.modelProvider,
|
|
130
|
+
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
131
|
+
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
132
|
+
...inlineModelResolutionDeps(deps),
|
|
133
|
+
resolveRunContext: resolveBlockRunContext(deps),
|
|
134
|
+
// Its prompt is a member of `INLINE_ENGINE_SYSTEM_PROMPTS`, so the prompt editor offers it and
|
|
135
|
+
// an edit saved there has to reach the call. Without this the editor would show a baseline no
|
|
136
|
+
// code path sends and silently discard what a workspace wrote.
|
|
137
|
+
...(deps.agentPromptRepository
|
|
138
|
+
? {
|
|
139
|
+
resolveSystemPromptOverride: async (workspaceId, agentKind) => (await deps.agentPromptRepository.head(workspaceId, agentKind))?.text ?? undefined,
|
|
140
|
+
}
|
|
141
|
+
: {}),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Build the inline grounded-chat responder for the implementation-fork decision phase. Resolves
|
|
146
|
+
* its model exactly like the requirements reviewer / doc interviewer (block pin → workspace
|
|
147
|
+
* per-kind default → routing default). Returns `undefined` when no model provider is configured,
|
|
148
|
+
* so the fork chat degrades to a canned "chat unavailable" reply in unconfigured facades / tests
|
|
149
|
+
* while pick / custom keep working. Stateless: the chat rides the coder step, no session store.
|
|
150
|
+
*/
|
|
151
|
+
export function createForkChatService(deps) {
|
|
152
|
+
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
153
|
+
return undefined;
|
|
154
|
+
return new ForkChatService({
|
|
155
|
+
modelProviderResolver: deps.modelProviderResolver,
|
|
156
|
+
modelProvider: deps.modelProvider,
|
|
157
|
+
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
158
|
+
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
159
|
+
...inlineModelResolutionDeps(deps),
|
|
160
|
+
resolveRunContext: resolveBlockRunContext(deps),
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=inline-producers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-producers.js","sourceRoot":"","sources":["../../src/container/inline-producers.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,gGAAgG;AAChG,mFAAmF;AACnF,uFAAuF;AACvF,qFAAqF;AACrF,EAAE;AACF,gGAAgG;AAChG,0FAA0F;AAC1F,8FAA8F;AAC9F,8FAA8F;AAC9F,gGAAgG;AAChG,iGAAiG;AACjG,yFAAyF;AACzF,2DAA2D;AAC3D,EAAE;AACF,yFAAyF;AACzF,4FAA4F;AAQ5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAA;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,wDAAwD,CAAA;AACvG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yDAAyD,CAAA;AACzG,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AACzE,OAAO,EAAE,YAAY,EAA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E,IAAI,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,aAAa;QAAE,OAAO,SAAS,CAAA;IACxE,OAAO,IAAI,+BAA+B,CAAC;QACzC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;QACjD,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,0FAA0F;QAC1F,uFAAuF;QACvF,GAAG,yBAAyB,CAAC,IAAI,CAAC;QAClC,iBAAiB,EAAE,sBAAsB,CAAC,IAAI,CAAC;QAC/C,+FAA+F;QAC/F,8FAA8F;QAC9F,+DAA+D;QAC/D,GAAG,CAAC,IAAI,CAAC,qBAAqB;YAC5B,CAAC,CAAC;gBACE,2BAA2B,EAAE,KAAK,EAAE,WAAmB,EAAE,SAAiB,EAAE,EAAE,CAC5E,CAAC,MAAM,IAAI,CAAC,qBAAsB,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,EAAE,IAAI,IAAI,SAAS;aACtF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAA;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAsB;IAC1D,IAAI,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,IAAI,CAAC,aAAa;QAAE,OAAO,SAAS,CAAA;IACxE,OAAO,IAAI,eAAe,CAAC;QACzB,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;QACjD,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,0FAA0F;QAC1F,uFAAuF;QACvF,GAAG,yBAAyB,CAAC,IAAI,CAAC;QAClC,iBAAiB,EAAE,sBAAsB,CAAC,IAAI,CAAC;KAChD,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -11,15 +11,13 @@
|
|
|
11
11
|
* The module INTERFACES and the `CoreDependencies`/`Core` types stay in `container.ts` (imported
|
|
12
12
|
* back here type-only), so the value dependency is one-way `container.ts` → this file.
|
|
13
13
|
*/
|
|
14
|
-
import type { AppCaches, ExecutionEventPublisher
|
|
14
|
+
import type { AppCaches, ExecutionEventPublisher } from '@cat-factory/kernel';
|
|
15
15
|
import type { SpendService } from '@cat-factory/spend';
|
|
16
16
|
import { type AgentKindRegistry } from '@cat-factory/agents';
|
|
17
17
|
import { PreflightService, ProvisioningLogRecorder, SharedStackService, TaskConnectionService } from '@cat-factory/integrations';
|
|
18
18
|
import { BoardService } from '../modules/board/BoardService.js';
|
|
19
19
|
import { ExecutionService } from '../modules/execution/ExecutionService.js';
|
|
20
20
|
import { DocInterviewService } from '../modules/docInterview/DocInterviewService.js';
|
|
21
|
-
import { ForkChatService } from '../modules/execution/ForkChatService.js';
|
|
22
|
-
import { TesterQualityReviewService } from '../modules/execution/TesterQualityReviewService.js';
|
|
23
21
|
import type { BootstrapModule, CoreDependencies, DocumentsModule, EnvironmentsModule, GitHubModule, RunnersModule, ServicesModule, TasksModule } from '../container.js';
|
|
24
22
|
import type { AgentPromptsModule, ClarityModule, IncidentEnrichmentModule, KaizenModule, MergeTrackRecordModule, ModelPresetsModule, ConsensusGroupsModule, NotificationsModule, PackageRegistriesModule, PreflightsModule, PreviewModule, RecurringModule, ReleaseHealthModule, RequirementsModule, RiskPoliciesModule, SandboxModule, ServiceFragmentDefaultsModule, SharedStacksModule, SlackModule, TrackerModule, TrackerWebhookModule, TaskTypeSuppressionModule, WorkspaceAgentSettingsModule, WorkspaceSettingsModule } from './module-shapes.js';
|
|
25
23
|
export declare function createServicesModule(deps: CoreDependencies): ServicesModule | undefined;
|
|
@@ -72,20 +70,6 @@ export declare function createBootstrapModule(deps: CoreDependencies, eventPubli
|
|
|
72
70
|
/** The workspace spend safeguard, for the monorepo survey's billable model call. */
|
|
73
71
|
isOverBudget?: (workspaceId: string) => Promise<boolean>;
|
|
74
72
|
}): BootstrapModule | undefined;
|
|
75
|
-
/**
|
|
76
|
-
* Assemble the requirements-review module when its repository is present (the
|
|
77
|
-
* worker wires it unconditionally). The model provider/ref are optional within
|
|
78
|
-
* the module — reads work without them and the run paths surface a clear error —
|
|
79
|
-
* and the document/task repositories are reused, when wired, to fold linked PRDs
|
|
80
|
-
* and tracker issues into the reviewed requirements.
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* Build the inline reviewer for the test quality-control companion. It resolves its model
|
|
84
|
-
* exactly like the requirements reviewer (block pin → workspace per-kind default → routing
|
|
85
|
-
* default). Returns `undefined` when no model provider is configured, so the Tester gate's QC
|
|
86
|
-
* step is a pass-through in unconfigured facades / tests.
|
|
87
|
-
*/
|
|
88
|
-
export declare function createTesterQualityReviewer(deps: CoreDependencies): TesterQualityReviewService | undefined;
|
|
89
73
|
/**
|
|
90
74
|
* Build the interactive document-interview service (WS5). Self-contained (owns its session
|
|
91
75
|
* store + the inline LLM); resolves its model exactly like the requirements reviewer (block
|
|
@@ -95,35 +79,7 @@ export declare function createTesterQualityReviewer(deps: CoreDependencies): Tes
|
|
|
95
79
|
* store-but-no-model deployment still short-circuits the interviewer.
|
|
96
80
|
*/
|
|
97
81
|
export declare function createDocInterviewService(deps: CoreDependencies): DocInterviewService | undefined;
|
|
98
|
-
|
|
99
|
-
* Build the inline grounded-chat responder for the implementation-fork decision phase. Resolves
|
|
100
|
-
* its model exactly like the requirements reviewer / doc interviewer (block pin → workspace
|
|
101
|
-
* per-kind default → routing default). Returns `undefined` when no model provider is configured,
|
|
102
|
-
* so the fork chat degrades to a canned "chat unavailable" reply in unconfigured facades / tests
|
|
103
|
-
* while pick / custom keep working. Stateless — the chat rides the coder step, no session store.
|
|
104
|
-
*/
|
|
105
|
-
/**
|
|
106
|
-
* The default {@link JudgeAssessor}: the inline LLM verdict producer behind every judge step.
|
|
107
|
-
* Built from the SAME model-provider dependencies the inline reviewers use, which is why judges
|
|
108
|
-
* need no per-facade wiring at all — a facade that can run a requirements review can run a
|
|
109
|
-
* judge. Returns undefined when no provider is wired, and a facade/harness may inject its own
|
|
110
|
-
* `judgeAssessor` (conformance does, for a deterministic verdict); either way an
|
|
111
|
-
* absent/disabled assessor makes every judge step a pass-through.
|
|
112
|
-
*/
|
|
113
|
-
export declare function createJudgeAssessor(deps: CoreDependencies): JudgeAssessor | undefined;
|
|
114
|
-
/**
|
|
115
|
-
* The default {@link EnvironmentInvestigator}: the inline diagnosis behind the deployer's
|
|
116
|
-
* environment-investigation loop. Built from the SAME model-provider dependencies the inline
|
|
117
|
-
* reviewers and judges use, so a facade that can run a requirements review can investigate a
|
|
118
|
-
* failed environment with no investigation-specific wiring at all.
|
|
119
|
-
*
|
|
120
|
-
* Returns undefined when no provider is wired, and a facade or harness may inject its own
|
|
121
|
-
* `environmentInvestigator` (the conformance harness does, for a deterministic verdict); either
|
|
122
|
-
* way an absent or disabled investigator makes the loop a pass-through, and a failed provision is
|
|
123
|
-
* terminal and unexplained exactly as it was before.
|
|
124
|
-
*/
|
|
125
|
-
export declare function createEnvironmentInvestigator(deps: CoreDependencies): EnvironmentInvestigator | undefined;
|
|
126
|
-
export declare function createForkChatService(deps: CoreDependencies): ForkChatService | undefined;
|
|
82
|
+
export { createEnvironmentInvestigator, createForkChatService, createJudgeAssessor, createTesterQualityReviewer, } from './inline-producers.js';
|
|
127
83
|
export { createBrainstormModule, createClarityModule, createRequirementsModule, } from './review-modules.js';
|
|
128
84
|
/**
|
|
129
85
|
* Assemble the Kaizen module when its repositories are wired (both runtime facades wire them
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/container/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/container/modules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAqB,MAAM,qBAAqB,CAAA;AAChG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,KAAK,iBAAi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E,gBAAgB,EAClC,uBAAuB,EAAE,uBAAuB,EAChD,qBAAqB,CAAC,EAAE,qBAAqB,EAC7C,KAAK,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,eAAe,GAAG,aAAa,CAAC,GACzD,eAAe,GAAG,SAAS,CAgE7B"}
|
|
@@ -22,12 +22,6 @@ import { EnvConfigRepairService } from '../modules/envConfigRepair/EnvConfigRepa
|
|
|
22
22
|
import { buildEnvironmentProvisioningService, buildEnvironmentTestService, buildEnvironmentUserHandlerService, } from './environmentsModule.factory.js';
|
|
23
23
|
import { resolveBlockRunContext } from './blockRunContext.js';
|
|
24
24
|
import { DocInterviewService } from '../modules/docInterview/DocInterviewService.js';
|
|
25
|
-
import { ForkChatService } from '../modules/execution/ForkChatService.js';
|
|
26
|
-
import { JudgeService } from '../modules/execution/JudgeService.js';
|
|
27
|
-
import { EnvironmentInvestigationService } from '../modules/execution/EnvironmentInvestigationService.js';
|
|
28
|
-
import { BugHuntAssessorService } from '../modules/bugHunt/BugHuntAssessorService.js';
|
|
29
|
-
import { MonorepoAdoptionAdvisorService } from '../modules/bootstrap/MonorepoAdoptionAdvisorService.js';
|
|
30
|
-
import { TesterQualityReviewService } from '../modules/execution/TesterQualityReviewService.js';
|
|
31
25
|
import { KaizenService } from '../modules/kaizen/KaizenService.js';
|
|
32
26
|
import { NotificationService } from '../modules/notifications/NotificationService.js';
|
|
33
27
|
import { NotificationSettingsService } from '../modules/notifications/NotificationSettingsService.js';
|
|
@@ -47,6 +41,7 @@ import { WorkspaceAgentSettingsService } from '../modules/agentSettings/Workspac
|
|
|
47
41
|
import { TaskTypeSuppressionService } from '../modules/taskTypes/TaskTypeSuppressionService.js';
|
|
48
42
|
import { ModelPresetService } from '../modules/modelPresets/ModelPresetService.js';
|
|
49
43
|
import { inlineModelResolutionDeps } from './inline-model-deps.js';
|
|
44
|
+
import { createBugHuntAssessor, createMonorepoAdoptionAdvisor } from './inline-producers.js';
|
|
50
45
|
import { ConsensusGroupService } from '../modules/consensusGroups/ConsensusGroupService.js';
|
|
51
46
|
import { ServiceFragmentDefaultsService } from '../modules/serviceFragmentDefaults/ServiceFragmentDefaultsService.js';
|
|
52
47
|
import { RecurringPipelineService } from '../modules/recurring/RecurringPipelineService.js';
|
|
@@ -355,44 +350,6 @@ export function createTasksModule(deps, boardService, spend) {
|
|
|
355
350
|
...(bugIntakeService ? { bugIntakeService } : {}),
|
|
356
351
|
};
|
|
357
352
|
}
|
|
358
|
-
/**
|
|
359
|
-
* The inline bug-hunt ranking model, built from the same dependencies the judge/reviewer
|
|
360
|
-
* assessors ride — so a facade that wired a model gets a working hunt ranking with no
|
|
361
|
-
* hunt-specific wiring (the judge-registry pattern). Absent provider ⇒ undefined, and the hunt
|
|
362
|
-
* returns its candidates unranked with a stated reason.
|
|
363
|
-
*/
|
|
364
|
-
function createBugHuntAssessor(deps) {
|
|
365
|
-
if (deps.bugHuntAssessor)
|
|
366
|
-
return deps.bugHuntAssessor;
|
|
367
|
-
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
368
|
-
return undefined;
|
|
369
|
-
return new BugHuntAssessorService({
|
|
370
|
-
modelProviderResolver: deps.modelProviderResolver,
|
|
371
|
-
modelProvider: deps.modelProvider,
|
|
372
|
-
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
373
|
-
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
374
|
-
...inlineModelResolutionDeps(deps),
|
|
375
|
-
...(deps.logger ? { logger: deps.logger } : {}),
|
|
376
|
-
});
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* The inline monorepo-adoption advisor, built from the same model dependencies the bug-hunt and
|
|
380
|
-
* judge assessors ride, so a facade that wired a model gets a working adoption suggestion with
|
|
381
|
-
* no bootstrap-specific wiring. Absent provider ⇒ undefined, and the run parks with a plan that
|
|
382
|
-
* says the suggestion is unavailable rather than one that says there was nothing to decide.
|
|
383
|
-
*/
|
|
384
|
-
function createMonorepoAdoptionAdvisor(deps) {
|
|
385
|
-
if (deps.monorepoAdoptionAdvisor)
|
|
386
|
-
return deps.monorepoAdoptionAdvisor;
|
|
387
|
-
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
388
|
-
return undefined;
|
|
389
|
-
return new MonorepoAdoptionAdvisorService({
|
|
390
|
-
modelProviderResolver: deps.modelProviderResolver,
|
|
391
|
-
modelProvider: deps.modelProvider,
|
|
392
|
-
...inlineModelResolutionDeps(deps),
|
|
393
|
-
...(deps.logger ? { logger: deps.logger } : {}),
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
353
|
/**
|
|
397
354
|
* Assemble the environment integration when its provider, both repositories and
|
|
398
355
|
* the secret cipher are present; otherwise return undefined so the feature stays
|
|
@@ -578,31 +535,6 @@ export function createBootstrapModule(deps, eventPublisher, wiring = {}) {
|
|
|
578
535
|
});
|
|
579
536
|
return { service };
|
|
580
537
|
}
|
|
581
|
-
/**
|
|
582
|
-
* Assemble the requirements-review module when its repository is present (the
|
|
583
|
-
* worker wires it unconditionally). The model provider/ref are optional within
|
|
584
|
-
* the module — reads work without them and the run paths surface a clear error —
|
|
585
|
-
* and the document/task repositories are reused, when wired, to fold linked PRDs
|
|
586
|
-
* and tracker issues into the reviewed requirements.
|
|
587
|
-
*/
|
|
588
|
-
/**
|
|
589
|
-
* Build the inline reviewer for the test quality-control companion. It resolves its model
|
|
590
|
-
* exactly like the requirements reviewer (block pin → workspace per-kind default → routing
|
|
591
|
-
* default). Returns `undefined` when no model provider is configured, so the Tester gate's QC
|
|
592
|
-
* step is a pass-through in unconfigured facades / tests.
|
|
593
|
-
*/
|
|
594
|
-
export function createTesterQualityReviewer(deps) {
|
|
595
|
-
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
596
|
-
return undefined;
|
|
597
|
-
return new TesterQualityReviewService({
|
|
598
|
-
modelProviderResolver: deps.modelProviderResolver,
|
|
599
|
-
modelProvider: deps.modelProvider,
|
|
600
|
-
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
601
|
-
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
602
|
-
...inlineModelResolutionDeps(deps),
|
|
603
|
-
resolveRunContext: resolveBlockRunContext(deps),
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
538
|
/**
|
|
607
539
|
* Build the interactive document-interview service (WS5). Self-contained (owns its session
|
|
608
540
|
* store + the inline LLM); resolves its model exactly like the requirements reviewer (block
|
|
@@ -627,80 +559,11 @@ export function createDocInterviewService(deps) {
|
|
|
627
559
|
resolveRunContext: resolveBlockRunContext(deps),
|
|
628
560
|
});
|
|
629
561
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
* while pick / custom keep working. Stateless — the chat rides the coder step, no session store.
|
|
636
|
-
*/
|
|
637
|
-
/**
|
|
638
|
-
* The default {@link JudgeAssessor}: the inline LLM verdict producer behind every judge step.
|
|
639
|
-
* Built from the SAME model-provider dependencies the inline reviewers use, which is why judges
|
|
640
|
-
* need no per-facade wiring at all — a facade that can run a requirements review can run a
|
|
641
|
-
* judge. Returns undefined when no provider is wired, and a facade/harness may inject its own
|
|
642
|
-
* `judgeAssessor` (conformance does, for a deterministic verdict); either way an
|
|
643
|
-
* absent/disabled assessor makes every judge step a pass-through.
|
|
644
|
-
*/
|
|
645
|
-
export function createJudgeAssessor(deps) {
|
|
646
|
-
if (deps.judgeAssessor)
|
|
647
|
-
return deps.judgeAssessor;
|
|
648
|
-
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
649
|
-
return undefined;
|
|
650
|
-
return new JudgeService({
|
|
651
|
-
modelProviderResolver: deps.modelProviderResolver,
|
|
652
|
-
modelProvider: deps.modelProvider,
|
|
653
|
-
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
654
|
-
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
655
|
-
...inlineModelResolutionDeps(deps),
|
|
656
|
-
resolveRunContext: resolveBlockRunContext(deps),
|
|
657
|
-
});
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* The default {@link EnvironmentInvestigator}: the inline diagnosis behind the deployer's
|
|
661
|
-
* environment-investigation loop. Built from the SAME model-provider dependencies the inline
|
|
662
|
-
* reviewers and judges use, so a facade that can run a requirements review can investigate a
|
|
663
|
-
* failed environment with no investigation-specific wiring at all.
|
|
664
|
-
*
|
|
665
|
-
* Returns undefined when no provider is wired, and a facade or harness may inject its own
|
|
666
|
-
* `environmentInvestigator` (the conformance harness does, for a deterministic verdict); either
|
|
667
|
-
* way an absent or disabled investigator makes the loop a pass-through, and a failed provision is
|
|
668
|
-
* terminal and unexplained exactly as it was before.
|
|
669
|
-
*/
|
|
670
|
-
export function createEnvironmentInvestigator(deps) {
|
|
671
|
-
if (deps.environmentInvestigator)
|
|
672
|
-
return deps.environmentInvestigator;
|
|
673
|
-
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
674
|
-
return undefined;
|
|
675
|
-
return new EnvironmentInvestigationService({
|
|
676
|
-
modelProviderResolver: deps.modelProviderResolver,
|
|
677
|
-
modelProvider: deps.modelProvider,
|
|
678
|
-
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
679
|
-
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
680
|
-
...inlineModelResolutionDeps(deps),
|
|
681
|
-
resolveRunContext: resolveBlockRunContext(deps),
|
|
682
|
-
// Its prompt is a member of `INLINE_ENGINE_SYSTEM_PROMPTS`, so the prompt editor offers it and
|
|
683
|
-
// an edit saved there has to reach the call. Without this the editor would show a baseline no
|
|
684
|
-
// code path sends and silently discard what a workspace wrote.
|
|
685
|
-
...(deps.agentPromptRepository
|
|
686
|
-
? {
|
|
687
|
-
resolveSystemPromptOverride: async (workspaceId, agentKind) => (await deps.agentPromptRepository.head(workspaceId, agentKind))?.text ?? undefined,
|
|
688
|
-
}
|
|
689
|
-
: {}),
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
export function createForkChatService(deps) {
|
|
693
|
-
if (!deps.modelProviderResolver && !deps.modelProvider)
|
|
694
|
-
return undefined;
|
|
695
|
-
return new ForkChatService({
|
|
696
|
-
modelProviderResolver: deps.modelProviderResolver,
|
|
697
|
-
modelProvider: deps.modelProvider,
|
|
698
|
-
// The routing default, the block-model resolver, the local-mode inline predicate, and the
|
|
699
|
-
// preset's per-kind default model + route order, wired as ONE slice (see the factory).
|
|
700
|
-
...inlineModelResolutionDeps(deps),
|
|
701
|
-
resolveRunContext: resolveBlockRunContext(deps),
|
|
702
|
-
});
|
|
703
|
-
}
|
|
562
|
+
// The inline producers built from the model dependencies alone (judge, tester-quality review,
|
|
563
|
+
// environment investigation, fork chat, bug-hunt ranking, monorepo adoption) live in
|
|
564
|
+
// `inline-producers.ts`: one cohesive group, extracted when this file hit its size budget.
|
|
565
|
+
// Re-exported here so the composition root keeps one import site for every factory.
|
|
566
|
+
export { createEnvironmentInvestigator, createForkChatService, createJudgeAssessor, createTesterQualityReviewer, } from './inline-producers.js';
|
|
704
567
|
// The inline iterative-review modules (requirements / clarity / brainstorm) live in
|
|
705
568
|
// `review-modules.ts` — one cohesive group, extracted when this file hit its size budget. Re-exported
|
|
706
569
|
// here so the composition root keeps one import site for every module factory.
|