@klitchevo/code-council 0.0.16 → 0.1.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/README.md +153 -4
- package/dist/chunk-JAGOVGRD.js +393 -0
- package/dist/{chunk-W4MFXWTT.js → chunk-RIJGRVVH.js} +6 -1
- package/dist/chunk-W4FYPS5Z.js +19 -0
- package/dist/chunk-YLBGX3Y3.js +110 -0
- package/dist/config/index.d.ts +351 -0
- package/dist/config/index.js +38 -0
- package/dist/formatter-ZWJ44CI5.js +10 -0
- package/dist/index.js +995 -102
- package/dist/loader-4YLGXTWJ.js +14 -0
- package/dist/{tps-audit-TXNM5HYS.js → tps-audit-UJ26A6KT.js} +3 -2
- package/package.json +13 -3
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_esm_shims
|
|
3
|
+
} from "./chunk-W4FYPS5Z.js";
|
|
4
|
+
|
|
5
|
+
// src/config/loader.ts
|
|
6
|
+
init_esm_shims();
|
|
7
|
+
import { existsSync } from "fs";
|
|
8
|
+
import { join } from "path";
|
|
9
|
+
import { createJiti } from "jiti";
|
|
10
|
+
|
|
11
|
+
// src/config/schema.ts
|
|
12
|
+
init_esm_shims();
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
var modelArraySchema = z.array(z.string().min(1)).optional().describe("Array of OpenRouter model IDs");
|
|
15
|
+
var ModelsConfigSchema = z.object({
|
|
16
|
+
defaultModels: modelArraySchema,
|
|
17
|
+
codeReview: modelArraySchema,
|
|
18
|
+
frontendReview: modelArraySchema,
|
|
19
|
+
backendReview: modelArraySchema,
|
|
20
|
+
planReview: modelArraySchema,
|
|
21
|
+
discussion: modelArraySchema,
|
|
22
|
+
tpsAudit: modelArraySchema
|
|
23
|
+
}).optional();
|
|
24
|
+
var ConsensusConfigSchema = z.object({
|
|
25
|
+
enabled: z.boolean().optional(),
|
|
26
|
+
modelWeights: z.record(z.string(), z.number().positive()).optional(),
|
|
27
|
+
highConfidenceThreshold: z.number().min(0).max(1).optional(),
|
|
28
|
+
moderateConfidenceThreshold: z.number().min(0).max(1).optional(),
|
|
29
|
+
extractionModel: z.string().min(1).optional(),
|
|
30
|
+
fallbackOnError: z.boolean().optional(),
|
|
31
|
+
hostExtraction: z.boolean().optional()
|
|
32
|
+
}).optional();
|
|
33
|
+
var LLMConfigSchema = z.object({
|
|
34
|
+
temperature: z.number().min(0).max(2).optional(),
|
|
35
|
+
maxTokens: z.number().int().positive().optional()
|
|
36
|
+
}).optional();
|
|
37
|
+
var SessionConfigSchema = z.object({
|
|
38
|
+
maxSessions: z.number().int().positive().optional(),
|
|
39
|
+
maxMessagesPerModel: z.number().int().positive().optional(),
|
|
40
|
+
ttlMs: z.number().int().positive().optional(),
|
|
41
|
+
rateLimitPerMinute: z.number().int().positive().optional()
|
|
42
|
+
}).optional();
|
|
43
|
+
var InputLimitsConfigSchema = z.object({
|
|
44
|
+
maxCodeLength: z.number().int().positive().optional(),
|
|
45
|
+
maxContextLength: z.number().int().positive().optional(),
|
|
46
|
+
maxModels: z.number().int().positive().optional()
|
|
47
|
+
}).optional();
|
|
48
|
+
var CodeCouncilConfigSchema = z.object({
|
|
49
|
+
models: ModelsConfigSchema,
|
|
50
|
+
consensus: ConsensusConfigSchema,
|
|
51
|
+
llm: LLMConfigSchema,
|
|
52
|
+
session: SessionConfigSchema,
|
|
53
|
+
inputLimits: InputLimitsConfigSchema
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// src/config/loader.ts
|
|
57
|
+
var CONFIG_LOCATIONS = [
|
|
58
|
+
".code-council/config.ts",
|
|
59
|
+
".code-council/config.js",
|
|
60
|
+
"code-council.config.ts",
|
|
61
|
+
"code-council.config.js"
|
|
62
|
+
];
|
|
63
|
+
function findConfigFile(cwd = process.cwd()) {
|
|
64
|
+
for (const location of CONFIG_LOCATIONS) {
|
|
65
|
+
const fullPath = join(cwd, location);
|
|
66
|
+
if (existsSync(fullPath)) {
|
|
67
|
+
return fullPath;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
async function loadConfigFile(configPath) {
|
|
73
|
+
const jiti = createJiti(import.meta.url, {
|
|
74
|
+
interopDefault: true
|
|
75
|
+
});
|
|
76
|
+
const loaded = await jiti.import(configPath);
|
|
77
|
+
const rawConfig = loaded.default ?? loaded;
|
|
78
|
+
const result = CodeCouncilConfigSchema.safeParse(rawConfig);
|
|
79
|
+
if (!result.success) {
|
|
80
|
+
const errors = result.error.issues.map((issue) => ` - ${issue.path.join(".")}: ${issue.message}`).join("\n");
|
|
81
|
+
throw new Error(`Invalid configuration in ${configPath}:
|
|
82
|
+
${errors}`);
|
|
83
|
+
}
|
|
84
|
+
return result.data;
|
|
85
|
+
}
|
|
86
|
+
async function loadConfig(cwd = process.cwd()) {
|
|
87
|
+
const configPath = findConfigFile(cwd);
|
|
88
|
+
if (!configPath) {
|
|
89
|
+
return { config: {}, configPath: null };
|
|
90
|
+
}
|
|
91
|
+
const config = await loadConfigFile(configPath);
|
|
92
|
+
return { config, configPath };
|
|
93
|
+
}
|
|
94
|
+
function hasConfigFile(cwd = process.cwd()) {
|
|
95
|
+
return findConfigFile(cwd) !== null;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
ModelsConfigSchema,
|
|
100
|
+
ConsensusConfigSchema,
|
|
101
|
+
LLMConfigSchema,
|
|
102
|
+
SessionConfigSchema,
|
|
103
|
+
InputLimitsConfigSchema,
|
|
104
|
+
CodeCouncilConfigSchema,
|
|
105
|
+
findConfigFile,
|
|
106
|
+
loadConfigFile,
|
|
107
|
+
loadConfig,
|
|
108
|
+
hasConfigFile
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=chunk-YLBGX3Y3.js.map
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TypeScript configuration interfaces for Code Council
|
|
5
|
+
*
|
|
6
|
+
* These types provide full autocompletion support when using defineConfig()
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Known OpenRouter model IDs for autocomplete.
|
|
10
|
+
* This is not exhaustive - any valid OpenRouter model ID string will work.
|
|
11
|
+
*
|
|
12
|
+
* Find all models at: https://openrouter.ai/models
|
|
13
|
+
*/
|
|
14
|
+
type KnownModel = "anthropic/claude-opus-4" | "anthropic/claude-opus-4.5" | "anthropic/claude-sonnet-4" | "anthropic/claude-sonnet-4.5" | "anthropic/claude-haiku-4" | "anthropic/claude-haiku-4.5" | "anthropic/claude-3.5-sonnet" | "anthropic/claude-3.5-haiku" | "anthropic/claude-3-opus" | "anthropic/claude-3-sonnet" | "anthropic/claude-3-haiku" | "openai/gpt-4o" | "openai/gpt-4o-mini" | "openai/gpt-4-turbo" | "openai/gpt-4" | "openai/gpt-3.5-turbo" | "openai/o1" | "openai/o1-mini" | "openai/o1-preview" | "openai/o3" | "openai/o3-mini" | "openai/gpt-5" | "openai/gpt-5.1" | "openai/gpt-5.2" | "google/gemini-2.5-pro" | "google/gemini-2.5-flash" | "google/gemini-2.0-pro" | "google/gemini-2.0-flash" | "google/gemini-2.0-flash-001" | "google/gemini-pro" | "google/gemini-pro-vision" | "google/gemini-3-pro-preview" | "google/gemini-3-flash-preview" | "meta-llama/llama-3.3-70b-instruct" | "meta-llama/llama-3.2-90b-vision-instruct" | "meta-llama/llama-3.2-11b-vision-instruct" | "meta-llama/llama-3.1-405b-instruct" | "meta-llama/llama-3.1-70b-instruct" | "meta-llama/llama-3.1-8b-instruct" | "meta-llama/llama-4-maverick" | "meta-llama/llama-4-scout" | "mistralai/mistral-large" | "mistralai/mistral-large-2512" | "mistralai/mistral-medium" | "mistralai/mistral-small" | "mistralai/mistral-small-creative" | "mistralai/mixtral-8x7b-instruct" | "mistralai/mixtral-8x22b-instruct" | "mistralai/codestral" | "mistralai/devstral-2512" | "deepseek/deepseek-chat" | "deepseek/deepseek-coder" | "deepseek/deepseek-r1" | "deepseek/deepseek-v3" | "deepseek/deepseek-v3.1" | "deepseek/deepseek-v3.2" | "qwen/qwen-2.5-72b-instruct" | "qwen/qwen-2.5-coder-32b-instruct" | "qwen/qwen-2-72b-instruct" | "qwen/qwq-32b" | "qwen/qwen3-vl-32b-instruct" | "x-ai/grok-2" | "x-ai/grok-2-vision" | "x-ai/grok-3" | "x-ai/grok-4" | "x-ai/grok-4.1-fast" | "amazon/nova-pro-v1" | "amazon/nova-lite-v1" | "amazon/nova-micro-v1" | "amazon/nova-premier-v1" | "amazon/nova-2-lite-v1" | "cohere/command-r-plus" | "cohere/command-r" | "cohere/command" | "minimax/minimax-m2" | "minimax/minimax-m2.1" | "z-ai/glm-4.7" | "moonshotai/kimi-k2-thinking" | "perplexity/sonar-pro" | "perplexity/sonar-pro-search" | "nvidia/nemotron-3-nano-30b-a3b";
|
|
15
|
+
/**
|
|
16
|
+
* Model identifier - accepts known models for autocomplete, but any string is valid
|
|
17
|
+
*/
|
|
18
|
+
type ModelId = KnownModel | (string & {});
|
|
19
|
+
/**
|
|
20
|
+
* Models configuration - arrays of OpenRouter model IDs
|
|
21
|
+
*
|
|
22
|
+
* Use `defaultModels` to set models for all review types at once,
|
|
23
|
+
* or specify individual arrays to override for specific types.
|
|
24
|
+
*
|
|
25
|
+
* Find models at: https://openrouter.ai/models
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* // Use same models for everything
|
|
30
|
+
* models: {
|
|
31
|
+
* defaultModels: ["anthropic/claude-sonnet-4", "openai/gpt-4o"],
|
|
32
|
+
* }
|
|
33
|
+
*
|
|
34
|
+
* // Or customize per review type
|
|
35
|
+
* models: {
|
|
36
|
+
* defaultModels: ["anthropic/claude-sonnet-4"],
|
|
37
|
+
* frontendReview: ["anthropic/claude-sonnet-4", "openai/gpt-4o"],
|
|
38
|
+
* }
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
interface ModelsConfig {
|
|
42
|
+
/**
|
|
43
|
+
* Default models used for all review types.
|
|
44
|
+
* Individual review type arrays override this for that specific type.
|
|
45
|
+
*/
|
|
46
|
+
defaultModels?: ModelId[];
|
|
47
|
+
/** Models for general code review (overrides defaultModels) */
|
|
48
|
+
codeReview?: ModelId[];
|
|
49
|
+
/** Models for frontend-specific review (overrides defaultModels) */
|
|
50
|
+
frontendReview?: ModelId[];
|
|
51
|
+
/** Models for backend-specific review (overrides defaultModels) */
|
|
52
|
+
backendReview?: ModelId[];
|
|
53
|
+
/** Models for implementation plan review (overrides defaultModels) */
|
|
54
|
+
planReview?: ModelId[];
|
|
55
|
+
/** Models for council discussions (overrides defaultModels) */
|
|
56
|
+
discussion?: ModelId[];
|
|
57
|
+
/** Models for TPS audits (overrides defaultModels) */
|
|
58
|
+
tpsAudit?: ModelId[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Consensus analysis configuration
|
|
62
|
+
*/
|
|
63
|
+
interface ConsensusConfig {
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated This option is ignored. All review tools now use host extraction
|
|
66
|
+
* by default, which provides consensus-formatted output without additional API calls.
|
|
67
|
+
* This setting is kept for backwards compatibility but will be removed in a future version.
|
|
68
|
+
*/
|
|
69
|
+
enabled?: boolean;
|
|
70
|
+
/** Custom model weights for scoring (default: equal weights) */
|
|
71
|
+
modelWeights?: Record<string, number>;
|
|
72
|
+
/** High confidence threshold (default: 0.8) */
|
|
73
|
+
highConfidenceThreshold?: number;
|
|
74
|
+
/** Moderate confidence threshold (default: 0.5) */
|
|
75
|
+
moderateConfidenceThreshold?: number;
|
|
76
|
+
/**
|
|
77
|
+
* Model used for finding extraction when hostExtraction is false.
|
|
78
|
+
* @deprecated Host extraction is now the default. This is only used if you explicitly
|
|
79
|
+
* disable host extraction, which is not recommended.
|
|
80
|
+
*/
|
|
81
|
+
extractionModel?: ModelId;
|
|
82
|
+
/** Fall back to raw reviews if consensus fails (default: true) */
|
|
83
|
+
fallbackOnError?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Let the MCP host model do extraction instead of making API calls.
|
|
86
|
+
* When true (default), returns raw reviews formatted for the host
|
|
87
|
+
* model to analyze. This is the recommended approach since the host
|
|
88
|
+
* model (e.g., Claude) can do the extraction work itself without
|
|
89
|
+
* additional API calls.
|
|
90
|
+
*
|
|
91
|
+
* This is now always true by default for all review tools.
|
|
92
|
+
*/
|
|
93
|
+
hostExtraction?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* LLM behavior configuration
|
|
97
|
+
*/
|
|
98
|
+
interface LLMConfig {
|
|
99
|
+
/** Temperature for responses (default: 0.3) */
|
|
100
|
+
temperature?: number;
|
|
101
|
+
/** Maximum tokens for responses (default: 16384) */
|
|
102
|
+
maxTokens?: number;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Session limits for multi-turn discussions
|
|
106
|
+
*/
|
|
107
|
+
interface SessionConfig {
|
|
108
|
+
/** Maximum concurrent sessions (default: 100) */
|
|
109
|
+
maxSessions?: number;
|
|
110
|
+
/** Maximum messages per model (default: 50) */
|
|
111
|
+
maxMessagesPerModel?: number;
|
|
112
|
+
/** Session TTL in milliseconds (default: 30 min) */
|
|
113
|
+
ttlMs?: number;
|
|
114
|
+
/** Rate limit per minute (default: 10) */
|
|
115
|
+
rateLimitPerMinute?: number;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Input limits for safety
|
|
119
|
+
*/
|
|
120
|
+
interface InputLimitsConfig {
|
|
121
|
+
/** Maximum code length in characters (default: 100KB) */
|
|
122
|
+
maxCodeLength?: number;
|
|
123
|
+
/** Maximum context length (default: 5KB) */
|
|
124
|
+
maxContextLength?: number;
|
|
125
|
+
/** Maximum number of parallel models (default: 10) */
|
|
126
|
+
maxModels?: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Complete code-council configuration
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```typescript
|
|
133
|
+
* import { defineConfig } from "@klitchevo/code-council/config";
|
|
134
|
+
*
|
|
135
|
+
* // Simple: use same models for all review types
|
|
136
|
+
* export default defineConfig({
|
|
137
|
+
* models: {
|
|
138
|
+
* defaultModels: ["anthropic/claude-sonnet-4", "openai/gpt-4o"],
|
|
139
|
+
* },
|
|
140
|
+
* });
|
|
141
|
+
*
|
|
142
|
+
* // Advanced: customize models per review type
|
|
143
|
+
* export default defineConfig({
|
|
144
|
+
* models: {
|
|
145
|
+
* defaultModels: ["anthropic/claude-sonnet-4"],
|
|
146
|
+
* frontendReview: ["anthropic/claude-sonnet-4", "openai/gpt-4o"],
|
|
147
|
+
* backendReview: ["deepseek/deepseek-v3.2", "openai/gpt-4o"],
|
|
148
|
+
* },
|
|
149
|
+
* consensus: {
|
|
150
|
+
* enabled: true,
|
|
151
|
+
* highConfidenceThreshold: 0.8,
|
|
152
|
+
* },
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
interface CodeCouncilConfig {
|
|
157
|
+
/** Model configurations for different review types */
|
|
158
|
+
models?: ModelsConfig;
|
|
159
|
+
/** Consensus analysis settings */
|
|
160
|
+
consensus?: ConsensusConfig;
|
|
161
|
+
/** LLM behavior settings */
|
|
162
|
+
llm?: LLMConfig;
|
|
163
|
+
/** Session management settings */
|
|
164
|
+
session?: SessionConfig;
|
|
165
|
+
/** Input limit settings */
|
|
166
|
+
inputLimits?: InputLimitsConfig;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Helper function for creating code-council configuration with full type support.
|
|
171
|
+
*
|
|
172
|
+
* This function provides autocompletion and type checking for your configuration.
|
|
173
|
+
* It's a no-op at runtime - it simply returns the config object unchanged.
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```typescript
|
|
177
|
+
* // .code-council/config.ts
|
|
178
|
+
* import { defineConfig } from "@klitchevo/code-council/config";
|
|
179
|
+
*
|
|
180
|
+
* export default defineConfig({
|
|
181
|
+
* models: {
|
|
182
|
+
* codeReview: ["anthropic/claude-sonnet-4", "openai/gpt-4o"],
|
|
183
|
+
* frontendReview: ["anthropic/claude-sonnet-4"],
|
|
184
|
+
* },
|
|
185
|
+
* consensus: {
|
|
186
|
+
* enabled: true,
|
|
187
|
+
* modelWeights: { "anthropic/claude-sonnet-4": 1.2 },
|
|
188
|
+
* highConfidenceThreshold: 0.8,
|
|
189
|
+
* },
|
|
190
|
+
* llm: {
|
|
191
|
+
* temperature: 0.3,
|
|
192
|
+
* maxTokens: 16384,
|
|
193
|
+
* },
|
|
194
|
+
* });
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* @param config - The configuration object
|
|
198
|
+
* @returns The same configuration object (identity function for type inference)
|
|
199
|
+
*/
|
|
200
|
+
declare function defineConfig(config: CodeCouncilConfig): CodeCouncilConfig;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Configuration loader for Code Council
|
|
204
|
+
*
|
|
205
|
+
* Discovers and loads TypeScript/JavaScript configuration files,
|
|
206
|
+
* validates them with Zod, and merges with environment variables.
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Result of loading configuration
|
|
211
|
+
*/
|
|
212
|
+
interface LoadConfigResult {
|
|
213
|
+
/** The validated configuration object */
|
|
214
|
+
config: CodeCouncilConfig;
|
|
215
|
+
/** Path to the config file that was loaded, or null if none found */
|
|
216
|
+
configPath: string | null;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Discover config file in project
|
|
220
|
+
*
|
|
221
|
+
* Searches for configuration files in the following order:
|
|
222
|
+
* 1. .code-council/config.ts
|
|
223
|
+
* 2. .code-council/config.js
|
|
224
|
+
* 3. code-council.config.ts
|
|
225
|
+
* 4. code-council.config.js
|
|
226
|
+
*
|
|
227
|
+
* @param cwd - Directory to search in (defaults to process.cwd())
|
|
228
|
+
* @returns Full path to config file, or null if not found
|
|
229
|
+
*/
|
|
230
|
+
declare function findConfigFile(cwd?: string): string | null;
|
|
231
|
+
/**
|
|
232
|
+
* Load configuration from a file
|
|
233
|
+
*
|
|
234
|
+
* Uses jiti to load TypeScript files without requiring compilation.
|
|
235
|
+
*
|
|
236
|
+
* @param configPath - Path to the configuration file
|
|
237
|
+
* @returns The loaded and validated configuration
|
|
238
|
+
* @throws Error if the config file is invalid
|
|
239
|
+
*/
|
|
240
|
+
declare function loadConfigFile(configPath: string): Promise<CodeCouncilConfig>;
|
|
241
|
+
/**
|
|
242
|
+
* Load configuration from file (if exists)
|
|
243
|
+
*
|
|
244
|
+
* This function discovers and loads the configuration file without
|
|
245
|
+
* merging with environment variables. Use `loadAndMergeConfig` for
|
|
246
|
+
* the full configuration with env var fallbacks.
|
|
247
|
+
*
|
|
248
|
+
* @param cwd - Directory to search in (defaults to process.cwd())
|
|
249
|
+
* @returns Configuration and the path it was loaded from
|
|
250
|
+
*/
|
|
251
|
+
declare function loadConfig(cwd?: string): Promise<LoadConfigResult>;
|
|
252
|
+
/**
|
|
253
|
+
* Check if a config file exists in the given directory
|
|
254
|
+
*
|
|
255
|
+
* @param cwd - Directory to check
|
|
256
|
+
* @returns true if a config file exists
|
|
257
|
+
*/
|
|
258
|
+
declare function hasConfigFile(cwd?: string): boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Zod schemas for validating code-council configuration
|
|
262
|
+
*/
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Schema for models configuration
|
|
266
|
+
*/
|
|
267
|
+
declare const ModelsConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
defaultModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
269
|
+
codeReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
270
|
+
frontendReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
271
|
+
backendReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
272
|
+
planReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
273
|
+
discussion: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
274
|
+
tpsAudit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
275
|
+
}, z.core.$strip>>;
|
|
276
|
+
/**
|
|
277
|
+
* Schema for consensus configuration
|
|
278
|
+
*/
|
|
279
|
+
declare const ConsensusConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
280
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
281
|
+
modelWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
282
|
+
highConfidenceThreshold: z.ZodOptional<z.ZodNumber>;
|
|
283
|
+
moderateConfidenceThreshold: z.ZodOptional<z.ZodNumber>;
|
|
284
|
+
extractionModel: z.ZodOptional<z.ZodString>;
|
|
285
|
+
fallbackOnError: z.ZodOptional<z.ZodBoolean>;
|
|
286
|
+
hostExtraction: z.ZodOptional<z.ZodBoolean>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
/**
|
|
289
|
+
* Schema for LLM configuration
|
|
290
|
+
*/
|
|
291
|
+
declare const LLMConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
292
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
}, z.core.$strip>>;
|
|
295
|
+
/**
|
|
296
|
+
* Schema for session configuration
|
|
297
|
+
*/
|
|
298
|
+
declare const SessionConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
299
|
+
maxSessions: z.ZodOptional<z.ZodNumber>;
|
|
300
|
+
maxMessagesPerModel: z.ZodOptional<z.ZodNumber>;
|
|
301
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
rateLimitPerMinute: z.ZodOptional<z.ZodNumber>;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
/**
|
|
305
|
+
* Schema for input limits configuration
|
|
306
|
+
*/
|
|
307
|
+
declare const InputLimitsConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
308
|
+
maxCodeLength: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
maxContextLength: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
maxModels: z.ZodOptional<z.ZodNumber>;
|
|
311
|
+
}, z.core.$strip>>;
|
|
312
|
+
/**
|
|
313
|
+
* Complete schema for code-council configuration
|
|
314
|
+
*/
|
|
315
|
+
declare const CodeCouncilConfigSchema: z.ZodObject<{
|
|
316
|
+
models: z.ZodOptional<z.ZodObject<{
|
|
317
|
+
defaultModels: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
318
|
+
codeReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
319
|
+
frontendReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
320
|
+
backendReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
321
|
+
planReview: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
322
|
+
discussion: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
323
|
+
tpsAudit: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
324
|
+
}, z.core.$strip>>;
|
|
325
|
+
consensus: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
327
|
+
modelWeights: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
328
|
+
highConfidenceThreshold: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
moderateConfidenceThreshold: z.ZodOptional<z.ZodNumber>;
|
|
330
|
+
extractionModel: z.ZodOptional<z.ZodString>;
|
|
331
|
+
fallbackOnError: z.ZodOptional<z.ZodBoolean>;
|
|
332
|
+
hostExtraction: z.ZodOptional<z.ZodBoolean>;
|
|
333
|
+
}, z.core.$strip>>;
|
|
334
|
+
llm: z.ZodOptional<z.ZodObject<{
|
|
335
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
336
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
}, z.core.$strip>>;
|
|
338
|
+
session: z.ZodOptional<z.ZodObject<{
|
|
339
|
+
maxSessions: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
maxMessagesPerModel: z.ZodOptional<z.ZodNumber>;
|
|
341
|
+
ttlMs: z.ZodOptional<z.ZodNumber>;
|
|
342
|
+
rateLimitPerMinute: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
}, z.core.$strip>>;
|
|
344
|
+
inputLimits: z.ZodOptional<z.ZodObject<{
|
|
345
|
+
maxCodeLength: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
maxContextLength: z.ZodOptional<z.ZodNumber>;
|
|
347
|
+
maxModels: z.ZodOptional<z.ZodNumber>;
|
|
348
|
+
}, z.core.$strip>>;
|
|
349
|
+
}, z.core.$strip>;
|
|
350
|
+
|
|
351
|
+
export { type CodeCouncilConfig, CodeCouncilConfigSchema, type ConsensusConfig, ConsensusConfigSchema, type InputLimitsConfig, InputLimitsConfigSchema, type KnownModel, type LLMConfig, LLMConfigSchema, type LoadConfigResult, type ModelId, type ModelsConfig, ModelsConfigSchema, type SessionConfig, SessionConfigSchema, defineConfig, findConfigFile, hasConfigFile, loadConfig, loadConfigFile };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CodeCouncilConfigSchema,
|
|
3
|
+
ConsensusConfigSchema,
|
|
4
|
+
InputLimitsConfigSchema,
|
|
5
|
+
LLMConfigSchema,
|
|
6
|
+
ModelsConfigSchema,
|
|
7
|
+
SessionConfigSchema,
|
|
8
|
+
findConfigFile,
|
|
9
|
+
hasConfigFile,
|
|
10
|
+
loadConfig,
|
|
11
|
+
loadConfigFile
|
|
12
|
+
} from "../chunk-YLBGX3Y3.js";
|
|
13
|
+
import {
|
|
14
|
+
init_esm_shims
|
|
15
|
+
} from "../chunk-W4FYPS5Z.js";
|
|
16
|
+
|
|
17
|
+
// src/config/index.ts
|
|
18
|
+
init_esm_shims();
|
|
19
|
+
|
|
20
|
+
// src/config/define-config.ts
|
|
21
|
+
init_esm_shims();
|
|
22
|
+
function defineConfig(config) {
|
|
23
|
+
return config;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
CodeCouncilConfigSchema,
|
|
27
|
+
ConsensusConfigSchema,
|
|
28
|
+
InputLimitsConfigSchema,
|
|
29
|
+
LLMConfigSchema,
|
|
30
|
+
ModelsConfigSchema,
|
|
31
|
+
SessionConfigSchema,
|
|
32
|
+
defineConfig,
|
|
33
|
+
findConfigFile,
|
|
34
|
+
hasConfigFile,
|
|
35
|
+
loadConfig,
|
|
36
|
+
loadConfigFile
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index.js.map
|