@on-par/factory-config 0.0.0-stage → 0.9.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 On PAR Dev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,20 @@
1
- # Temporary Holding Version
1
+ # @on-par/factory-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Typed shipped defaults (models, routes, factory settings) and the bundled constitution markdown for the Software Factory. Zero runtime dependencies.
4
+
5
+ Part of [Software Factory](https://github.com/on-par/software-factory), a multi-agent factory that ships verified work autonomously. Most users want the CLI, [`@on-par/factory-cli`](https://www.npmjs.com/package/@on-par/factory-cli); the other packages are its building blocks.
6
+
7
+ ## Contents
8
+
9
+ - `defaultModelsConfig`, `defaultRoutesConfig`, `defaultFactoryConfig` and friends: the shipped defaults as typed values.
10
+ - `constitutionsDir` / `resolveConfigPath()`: paths to the bundled constitution markdown, which ships under `dist/constitutions/` and is also exported as `@on-par/factory-config/constitutions/*`.
11
+
12
+ ## Documentation
13
+
14
+ - [README and Quick Start](https://github.com/on-par/software-factory#readme)
15
+ - [Architecture and package graph](https://github.com/on-par/software-factory/blob/main/docs/architecture.md)
16
+ - [Changelog](https://github.com/on-par/software-factory/blob/main/CHANGELOG.md)
17
+
18
+ ## License
19
+
20
+ MIT. See [LICENSE](./LICENSE).
@@ -0,0 +1,87 @@
1
+ # Constitution Template
2
+
3
+ A constitution is a written standard that defines "done right" for a product.
4
+ Every build round is tested against it. The prompt isn't instructions — it's
5
+ a standard plus a way to check it.
6
+
7
+ ## Format
8
+
9
+ ```markdown
10
+ ---
11
+ product: <product-name>
12
+ version: 1
13
+ checkers:
14
+ - <checker-name> # References lib/checkers/<checker-name>.sh
15
+ - <checker-name>
16
+ enforced_on: [plan, build, check] # Which phases load this constitution
17
+ requireTests: true # FAIL (instead of SKIP) the tests checker when the repo has no verify/test command
18
+ ---
19
+
20
+ # <Product> Constitution
21
+
22
+ ## Purpose
23
+
24
+ <One paragraph: what this product does and who it's for>
25
+
26
+ ## Standards
27
+
28
+ ### <Standard Category 1>
29
+
30
+ <What "done right" means for this category. Be specific and testable.>
31
+
32
+ ### <Standard Category 2>
33
+
34
+ <...>
35
+
36
+ ### End-to-end (e2e) environment contract
37
+
38
+ The factory leases each lane a dedicated port and injects `PORT`,
39
+ `FACTORY_APP_PORT`, and `FACTORY_BASE_URL` into every build and check
40
+ command run in the worktree. E2e suites MUST boot the app on the leased
41
+ port and test the URL it actually runs on:
42
+
43
+ - `playwright.config` reads `process.env.PORT` for its `webServer`
44
+ (port or embedded in `command`), sets `reuseExistingServer: false`,
45
+ and uses a strict-port dev command (Vite: `--strictPort`;
46
+ Next.js: `-p $PORT`) so a port mismatch fails loudly.
47
+ - `use.baseURL` derives from `process.env.FACTORY_BASE_URL`, falling
48
+ back to `http://127.0.0.1:${process.env.PORT}` — never a hard-coded
49
+ port or URL.
50
+ - The factory also injects `FACTORY_HEADLESS=1` and `PLAYWRIGHT_HEADLESS=1`
51
+ into every factory-managed build and check command: e2e configs MUST be
52
+ headless by default (`headless: true`, or omitted — headless is
53
+ Playwright's default) and MUST NOT bake `--headed`, `--ui`, or
54
+ `cypress open` into test scripts. Headed mode is an explicit human
55
+ opt-in run outside the factory (or `FACTORY_HEADLESS=0`), never a
56
+ config default. The CHECK phase warns on configs that force headed mode.
57
+ - The contract (ports and headless) is plain environment variables, so
58
+ the same rules apply to any e2e tool (Cypress, WebdriverIO, curl smoke
59
+ tests); Playwright is the documented reference, not a dependency.
60
+
61
+ ## Quality Gates
62
+
63
+ <Which checks must pass before work ships. References checkers in lib/checkers/.>
64
+
65
+ ## Dispute Rules
66
+
67
+ <How the boss should arbitrate when a worker disputes a checker failure.
68
+ Reference the standards above, not subjective judgment.>
69
+
70
+ ## Non-Goals
71
+
72
+ <What this constitution does NOT cover — explicitly out of scope.>
73
+ ```
74
+
75
+ ## Writing a Constitution
76
+
77
+ 1. **Name what "done right" means** — concrete, testable criteria, not vibes.
78
+ 2. **Map each standard to a checker** — every standard should be machine-verifiable.
79
+ 3. **Define dispute rules** — when a worker says "the checker is wrong," the boss needs a principled way to decide. Reference the standards, not opinion.
80
+ 4. **List non-goals** — prevents scope creep and false failures from checkers testing things that don't matter for this product.
81
+
82
+ ## How It's Used
83
+
84
+ - **PLAN phase**: The boss reads the constitution before writing the spec. The spec must satisfy every standard.
85
+ - **BUILD phase**: The worker receives the constitution alongside the spec. It's the standard the work will be checked against.
86
+ - **CHECK phase**: Each checker reads the relevant standards section and verifies the output against it — not against the worker's self-report.
87
+ - **DISPUTE**: When a worker escalates a checker failure, the boss re-reads the constitution to decide. Standards outrank both worker and checker.
@@ -0,0 +1,31 @@
1
+ ---
2
+ product: default-review
3
+ version: 1
4
+ checkers:
5
+ - compile
6
+ - tests
7
+ - lint
8
+ enforced_on: [check]
9
+ ---
10
+
11
+ # Default Review Constitution
12
+
13
+ ## Purpose
14
+
15
+ The fallback standard for reviewing a pull request in a repository that has no
16
+ `.factory/constitution.md` and none of `CLAUDE.md`, `AGENTS.md` or
17
+ `.github/copilot-instructions.md`.
18
+
19
+ ## Standards
20
+
21
+ - The change builds and type-checks with the repository's own scripts.
22
+ - Existing tests pass, and new behavior comes with tests where the repository has a test suite.
23
+ - Lint is clean under the repository's own configuration.
24
+ - The diff does what the PR title, body and linked issue say, and nothing unrelated.
25
+ - There are no committed secrets, debug leftovers or disabled tests.
26
+
27
+ ## Checkers
28
+
29
+ Only the built-in compile, tests and lint checkers apply (links and accessibility
30
+ always run). No `custom_*` checkers are declared because the reviewed repository has
31
+ not opted into factory conventions.
@@ -0,0 +1,90 @@
1
+ ---
2
+ product: example-client-delivery
3
+ version: 1
4
+ checkers:
5
+ - compile
6
+ - tests
7
+ - lint
8
+ - links
9
+ - accessibility
10
+ - custom_brand_match
11
+ - custom_client_spec
12
+ enforced_on: [plan, build, check]
13
+ ---
14
+
15
+ # Example Constitution — Client Site Delivery
16
+
17
+ > Example constitution for building a client website against a supplied brand
18
+ > guide and technical spec, where a human reviews only the final output.
19
+
20
+ ## Purpose
21
+
22
+ Build and self-QA a client website against the client's brand guide and technical
23
+ spec (both provided per project). Demonstrates matching output to an external,
24
+ per-project standard rather than a fixed one.
25
+
26
+ ## Standards
27
+
28
+ ### Client Brand Adherence
29
+
30
+ - All copy must match the client's brand voice guide (provided per project)
31
+ - Colors must match the client's palette (exact hex values from the brief)
32
+ - Typography must use the client's specified font families and weights
33
+ - Logo placement must follow the client's brand guidelines
34
+ - Tone must match the client's industry (formal for legal/medical, conversational for retail, etc.)
35
+
36
+ ### Technical Specification
37
+
38
+ - Every page in the client spec must be present in the output
39
+ - All required sections (hero, services, about, contact, etc.) must be implemented
40
+ - Responsive breakpoints must match the spec (mobile-first: 375px, 768px, 1024px, 1440px)
41
+ - Performance budget: LCP < 2.5s, CLS < 0.1, INP < 200ms on the target pages
42
+ - No framework dependencies unless the client spec requires it
43
+
44
+ ### Accessibility (WCAG 2.2 AA)
45
+
46
+ - Same standards as the marketing-site example (see `example-marketing-site.md`)
47
+ - Additional: if the client has a disability statement, it must be present and accurate
48
+
49
+ ### SEO & Metadata
50
+
51
+ - Title tags match the client's SEO strategy from the brief
52
+ - Meta descriptions present and within limits
53
+ - OG tags present and resolve to the client's domain
54
+ - Sitemap and robots.txt present and correct
55
+ - JSON-LD structured data for the client's business type
56
+
57
+ ### Link Integrity
58
+
59
+ - All internal links resolve to real files
60
+ - All external links return HTTP 200
61
+ - Social links resolve to the client's actual profiles
62
+ - No placeholder or dead links
63
+
64
+ ## Quality Gates
65
+
66
+ 1. `compile` — Site builds without errors
67
+ 2. `lint` — Linting passes
68
+ 3. `tests` — Test suite passes
69
+ 4. `links` — All links resolve
70
+ 5. `accessibility` — WCAG 2.2 AA (light + dark mode)
71
+ 6. `custom_brand_match` — Output matches the client brand guide
72
+ 7. `custom_client_spec` — All spec requirements present
73
+
74
+ ## Dispute Rules
75
+
76
+ - If the brand-match checker flags something the worker says is "close enough,"
77
+ the boss compares against the client brand guide hex values / font names. Exact
78
+ match is required for colors and fonts. Tone is judged against the voice guide.
79
+ - If the client-spec checker flags a missing section the worker says is "implied,"
80
+ the boss reads the spec. If the spec lists it as required, it must be present.
81
+ "Implied" is not an acceptable justification for a missing required section.
82
+ - Performance budget: ±20% tolerance on LCP/CLS/INP. The worker must justify any
83
+ miss and propose a fix timeline if it exceeds tolerance.
84
+
85
+ ## Non-Goals
86
+
87
+ - Content writing (the client provides copy; the factory formats and places it)
88
+ - CMS integration
89
+ - E-commerce beyond simple payment links
90
+ - Email marketing integration
@@ -0,0 +1,78 @@
1
+ ---
2
+ product: example-data-app
3
+ version: 1
4
+ checkers:
5
+ - compile
6
+ - tests
7
+ - lint
8
+ - custom_data_verification
9
+ - custom_report_validation
10
+ enforced_on: [plan, build, check]
11
+ ---
12
+
13
+ # Example Constitution — Data Analysis App
14
+
15
+ > Example constitution demonstrating custom data-integrity checkers — the case
16
+ > where reported numbers must be grounded in the underlying data.
17
+
18
+ ## Purpose
19
+
20
+ An app that analyzes an input dataset and produces a report with scores,
21
+ recommendations, and a narrative. Demonstrates checkers that verify reported
22
+ values against the source data so nothing is fabricated.
23
+
24
+ ## Standards
25
+
26
+ ### Data Integrity
27
+
28
+ - All reported values must match the measured/input data — no fabricated numbers
29
+ - Recommendations must be grounded in the measured data (if the data shows a peak
30
+ at some value, a recommendation must not contradict it)
31
+ - Scores must be computed from the actual analysis, not synthesized
32
+ - Input metadata (size, format, counts, duration) must match the source file
33
+
34
+ ### Report Quality
35
+
36
+ - Every report must include: an overall score, per-category scores, recommendations,
37
+ and a narrative
38
+ - Scores must be on the defined scale and match the scoring rubric
39
+ - The narrative must reference specific measured values, not generic advice
40
+ - Recommendations must be actionable and specific, not vague
41
+
42
+ ### Input Handling
43
+
44
+ - Parsing must handle each supported input format
45
+ - Diffs between inputs must show exact changes (field, old value, new value)
46
+ - No values may be fabricated — all must come from the parsed input
47
+
48
+ ### Code Quality
49
+
50
+ - Type checking must pass with no errors
51
+ - All public functions must have doc comments
52
+ - Analysis functions must be deterministic (same input → same output)
53
+ - No floating-point comparisons without epsilon tolerance
54
+
55
+ ## Quality Gates
56
+
57
+ 1. `compile` — Builds without errors
58
+ 2. `lint` — Linting passes
59
+ 3. `tests` — Test suite passes (including fixture-based analysis tests)
60
+ 4. `custom_data_verification` — Report values match the measured/input data
61
+ 5. `custom_report_validation` — Report has all required sections and references real data
62
+
63
+ ## Dispute Rules
64
+
65
+ - If the data-verification checker flags a number as "not matching the data," the
66
+ worker must show the calculation chain. If the calculation is correct and the
67
+ checker used the wrong reference data, the checker is overruled.
68
+ - If the report-validation checker flags a narrative as "too generic," the boss
69
+ compares against the measured values. If the narrative references specific
70
+ numbers that appear in the data, it passes.
71
+ - Scoring-rubric disputes: the boss reads the rubric in the spec. The rubric is
72
+ the source of truth, not the checker's interpretation.
73
+
74
+ ## Non-Goals
75
+
76
+ - Real-time/streaming analysis — this example covers batch input only
77
+ - Any platform-specific or hardware-specific handling
78
+ - UI/responsive design — not in scope for this example
@@ -0,0 +1,102 @@
1
+ ---
2
+ product: example-marketing-site
3
+ version: 1
4
+ checkers:
5
+ - compile
6
+ - links
7
+ - accessibility
8
+ - tests
9
+ - lint
10
+ - custom_brand_voice
11
+ - custom_seo
12
+ enforced_on: [plan, build, check]
13
+ ---
14
+
15
+ # Example Constitution — Marketing Site Generator
16
+
17
+ > Example constitution shipped with the factory to demonstrate the format.
18
+ > Copy it and adapt the standards to your own product.
19
+
20
+ ## Purpose
21
+
22
+ A generator that turns a product brief into a deployable static marketing site
23
+ (HTML/CSS/JS plus a brand kit). The output is static files the user deploys to any
24
+ static host.
25
+
26
+ ## Standards
27
+
28
+ ### Brand Consistency
29
+
30
+ - All copy must match the brand voice defined in the spec (tone, register, vocabulary)
31
+ - Color palette must use the exact hex values from the brand spec — no approximations
32
+ - Logo must be placed on every page at the specified size and position
33
+ - Typography must use the font families from the brand spec
34
+
35
+ ### Accessibility (WCAG 2.2 AA)
36
+
37
+ - Every `<img>` must have meaningful `alt` text (not filename, not "image")
38
+ - All interactive elements must be keyboard-navigable
39
+ - Color contrast must meet WCAG AA (4.5:1 normal text, 3:1 large text)
40
+ - Every form input must have an associated `<label>`
41
+ - Heading hierarchy must be sequential (no skipping h2→h4)
42
+ - A skip-to-content link must be present on every page
43
+
44
+ ### SEO
45
+
46
+ - Every page must have a unique `<title>` (≤60 chars)
47
+ - Every page must have a `<meta name="description">` (≤155 chars)
48
+ - `og:` tags must be present and resolve to real URLs
49
+ - `sitemap.xml` must be present and list every page
50
+ - `robots.txt` must be present and allow crawling
51
+ - Structured data (JSON-LD) must be present on product/service pages
52
+
53
+ ### Link Integrity
54
+
55
+ - All internal links must resolve to real files in the output
56
+ - All external links must return HTTP 200 (checked at build time)
57
+ - No `href="#"` placeholder links in shipped output
58
+ - Footer links (privacy, terms, contact) must all resolve
59
+
60
+ ### Code Quality
61
+
62
+ - HTML must be valid
63
+ - CSS must have no unused rules (purged)
64
+ - JS must pass linting with no errors
65
+ - No inline event handlers (`onclick=`, `onload=`) — use `addEventListener`
66
+ - No `console.log` / debug statements in shipped output
67
+
68
+ ### Payments (optional)
69
+
70
+ - If the site sells, payment links must match the spec's product names and prices exactly
71
+ - Success/cancel URLs must resolve to real pages
72
+ - Any webhook endpoint must be a valid HTTPS URL
73
+
74
+ ## Quality Gates
75
+
76
+ All checkers must pass before the PR is marked ready:
77
+
78
+ 1. `compile` — HTML/CSS/JS builds without errors
79
+ 2. `lint` — Linting passes
80
+ 3. `links` — All links resolve (internal + external)
81
+ 4. `accessibility` — WCAG 2.2 AA checks (light + dark mode)
82
+ 5. `tests` — Test suite passes
83
+ 6. `custom_brand_voice` — Copy matches the brand voice spec
84
+ 7. `custom_seo` — SEO checks (title, meta, OG, sitemap, robots, JSON-LD)
85
+
86
+ ## Dispute Rules
87
+
88
+ - If a checker flags copy as "off-brand," the boss compares against the brand voice
89
+ spec. If the copy matches the spec, the checker is overruled. If the spec is
90
+ ambiguous, the boss updates the spec and re-runs.
91
+ - If the accessibility checker flags something the worker argues is intentional
92
+ (e.g. decorative images with empty `alt`), the boss checks the WCAG 2.2 AA spec.
93
+ Decorative images with `alt=""` are valid; the checker is overruled.
94
+ - SEO length limits are guidelines, not hard limits. ±10% tolerance. Beyond that,
95
+ the worker must justify and the boss approves.
96
+
97
+ ## Non-Goals
98
+
99
+ - Performance optimization (Core Web Vitals) — not checked in this example
100
+ - Cross-browser testing beyond a single evergreen browser
101
+ - Content management — output is static files
102
+ - Analytics/tracking — added by the user post-deploy
@@ -0,0 +1,198 @@
1
+ export interface ModelDefaults {
2
+ provider: 'anthropic' | 'openai' | 'ollama' | 'deepseek' | 'custom';
3
+ tier: string | string[];
4
+ costPerMtokInput: number;
5
+ costPerMtokOutput: number;
6
+ contextWindow: number;
7
+ capabilities: string[];
8
+ envKey: string | null;
9
+ claudeFlag?: string;
10
+ providerModel?: string;
11
+ providerOptions?: Record<string, unknown>;
12
+ codex?: boolean;
13
+ codexFlag?: string;
14
+ harness?: string;
15
+ experimental?: boolean;
16
+ }
17
+ export interface ModelsDefaults {
18
+ version: number;
19
+ models: Record<string, ModelDefaults>;
20
+ tiers: Record<string, string[]>;
21
+ failover: {
22
+ triggers: string[];
23
+ maxRetries: number;
24
+ cooldownMs: number;
25
+ escalateAfterTierExhausted: boolean;
26
+ };
27
+ routingRules: Record<string, unknown>;
28
+ }
29
+ export interface RouteDefaults {
30
+ tier: string;
31
+ description: string;
32
+ requires?: string;
33
+ /** Pinned model-registry key (a key of defaultModelsConfig.models) used instead of resolving the tier. An exact ID, never an alias. */
34
+ model?: string;
35
+ /** Explicit tool allow-list for the route's model call. An empty array means tool-less: no file, shell or network tools. */
36
+ allowedTools?: string[];
37
+ /** Output contract for the route's model call. 'json' means the model must return exactly one JSON object. */
38
+ output?: 'json';
39
+ }
40
+ export interface RoutesDefaults {
41
+ version: number;
42
+ routes: Record<string, RouteDefaults>;
43
+ }
44
+ export interface FactoryDefaults {
45
+ version: number;
46
+ paths: {
47
+ constitutions: string;
48
+ checkers: string;
49
+ plans: string;
50
+ logs: string;
51
+ events: string;
52
+ constitution: string;
53
+ };
54
+ timeouts: {
55
+ plan_seconds: number;
56
+ build_seconds: number;
57
+ check_seconds: number;
58
+ merge_poll_seconds: number;
59
+ approval_seconds: number;
60
+ tests_seconds: number;
61
+ };
62
+ merge: {
63
+ auto: boolean;
64
+ comment: string;
65
+ };
66
+ worktree: {
67
+ parent: string;
68
+ comment: string;
69
+ gcTtlDays: number;
70
+ autoGcOnRun: boolean;
71
+ };
72
+ byok: {
73
+ enabled: boolean;
74
+ comment: string;
75
+ };
76
+ notifications: Record<string, boolean>;
77
+ cost_tracking: {
78
+ enabled: boolean;
79
+ log_file: string;
80
+ comment: string;
81
+ };
82
+ kpis: {
83
+ defectWindowDays: number;
84
+ comment?: string;
85
+ };
86
+ ci: {
87
+ skip: boolean;
88
+ comment?: string;
89
+ };
90
+ sweep: {
91
+ heartbeatFile?: string;
92
+ loopIntervalSeconds: number;
93
+ staleThresholdMultiplier: number;
94
+ comment?: string;
95
+ };
96
+ plan_approval: {
97
+ enabled: boolean;
98
+ comment?: string;
99
+ };
100
+ /** PLAN design-artifact gates (#1819). */
101
+ design: {
102
+ blockUnresolvedRegressions: boolean;
103
+ };
104
+ /** BUILD policy (#1867). publishFromBuild: true lets the claude BUILD worker push and open a PR before CHECK; default false = commit-only, SHIP publishes. */
105
+ build: {
106
+ publishFromBuild: boolean;
107
+ };
108
+ /** Size gate policy (ADR-0147). file: gates file child issues / park (ADR-0043); slice: keep an oversized issue whole and ship it as slice PRs, never filing issues (ADR-0156); off: skip both gates. maxSlices (1-20): cap on a not-yet-started slice plan; over it the plan is recorded and the run parks. */
109
+ sizeGate: {
110
+ mode: 'file' | 'slice' | 'off';
111
+ maxSlices: number;
112
+ };
113
+ sandbox: {
114
+ enabled: boolean;
115
+ runtime: 'auto' | 'sandbox-exec' | 'firejail' | 'docker-sandbox' | 'none';
116
+ network: {
117
+ allow: string[];
118
+ };
119
+ resources: {
120
+ cpuMs: number;
121
+ memMb: number;
122
+ };
123
+ docker?: {
124
+ rolloutPercent: number;
125
+ };
126
+ comment?: string;
127
+ };
128
+ discovery: {
129
+ enabled: boolean;
130
+ schedule: 'weekly' | 'daily' | 'manual';
131
+ maxCandidates: number;
132
+ comment?: string;
133
+ };
134
+ filing: {
135
+ enabled: boolean;
136
+ excludeReasons: string[];
137
+ repeatThreshold: number;
138
+ maxPerRun: number;
139
+ maxPerDay: number;
140
+ selfFixLabel: string;
141
+ bugLabels: string[];
142
+ sensitivePaths: string[];
143
+ comment?: string;
144
+ };
145
+ ingest: {
146
+ enabled: boolean;
147
+ label: string;
148
+ lane: string;
149
+ maxPerCycle: number;
150
+ comment?: string;
151
+ };
152
+ /**
153
+ * Issue-approval gate for claims (#1802). `trustedApprovers` lists the GitHub logins whose approval
154
+ * counts; unset means users with admin permission on the repo (a permission-lookup failure counts
155
+ * as untrusted). `enforce: 'warn'` only logs a missing/untrusted approval; `'enforce'` blocks the claim.
156
+ */
157
+ intake: {
158
+ trustedApprovers?: string[];
159
+ enforce: 'warn' | 'enforce';
160
+ comment?: string;
161
+ };
162
+ environment: {
163
+ ports: {
164
+ enabled: boolean;
165
+ range: [number, number];
166
+ comment?: string;
167
+ };
168
+ proxy: {
169
+ enabled: boolean;
170
+ port: number;
171
+ domain: string;
172
+ comment?: string;
173
+ };
174
+ };
175
+ auto_failover: {
176
+ enabled: boolean;
177
+ cooldown_minutes: number;
178
+ fallback_model: string;
179
+ comment?: string;
180
+ };
181
+ }
182
+ /** Model registry: providers, costs, capabilities, tiers and failover chains. */
183
+ export declare const defaultModelsConfig: ModelsDefaults;
184
+ /** Task-type → model-tier routing. The router resolves a tier to the first available model. */
185
+ export declare const defaultRoutesConfig: RoutesDefaults;
186
+ /** Size caps for auto-filed bug evidence (#1842). Raw logs stay local; issues get a capped excerpt plus a host:path pointer. */
187
+ export interface EvidenceCapsDefaults {
188
+ /** Max characters of the evidence excerpt placed in a filed bug body. */
189
+ maxExcerptChars: number;
190
+ /** Max characters of the whole filed bug body. */
191
+ maxBodyChars: number;
192
+ }
193
+ export declare const defaultEvidenceCaps: EvidenceCapsDefaults;
194
+ /** Lane circuit breaker threshold (#1915): default for `budget.laneBreakerThreshold`. 0 turns the breaker off. */
195
+ export declare const defaultLaneBreakerThreshold = 2;
196
+ /** Global factory configuration: paths, timeouts, merge/worktree/budget/intake defaults. */
197
+ export declare const defaultFactoryConfig: FactoryDefaults;
198
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,Q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