@mcoda/mswarm 0.1.56 → 0.1.60
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 +20 -1
- package/dist/codali-executor.d.ts +266 -0
- package/dist/codali-executor.d.ts.map +1 -0
- package/dist/codali-executor.js +227 -0
- package/dist/codali-executor.js.map +1 -0
- package/dist/runtime.d.ts +47 -1
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +248 -30
- package/dist/runtime.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +83 -3
- package/dist/server.js.map +1 -1
- package/dist/vendor/codali/agents/AgentProtocol.d.ts +287 -0
- package/dist/vendor/codali/agents/AgentProtocol.d.ts.map +1 -0
- package/dist/vendor/codali/agents/AgentProtocol.js +365 -0
- package/dist/vendor/codali/agents/AgentResolver.d.ts +23 -0
- package/dist/vendor/codali/agents/AgentResolver.d.ts.map +1 -0
- package/dist/vendor/codali/agents/AgentResolver.js +77 -0
- package/dist/vendor/codali/agents/PhaseAgentSelector.d.ts +23 -0
- package/dist/vendor/codali/agents/PhaseAgentSelector.d.ts.map +1 -0
- package/dist/vendor/codali/agents/PhaseAgentSelector.js +287 -0
- package/dist/vendor/codali/cli/EvalCommand.d.ts +37 -0
- package/dist/vendor/codali/cli/EvalCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/EvalCommand.js +333 -0
- package/dist/vendor/codali/cli/FeedbackCommand.d.ts +22 -0
- package/dist/vendor/codali/cli/FeedbackCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/FeedbackCommand.js +163 -0
- package/dist/vendor/codali/cli/RunCommand.d.ts +78 -0
- package/dist/vendor/codali/cli/RunCommand.d.ts.map +1 -0
- package/dist/vendor/codali/cli/RunCommand.js +2261 -0
- package/dist/vendor/codali/cli.d.ts +3 -0
- package/dist/vendor/codali/cli.d.ts.map +1 -0
- package/dist/vendor/codali/cli.js +109 -0
- package/dist/vendor/codali/cognitive/ArchitectPlanner.d.ts +107 -0
- package/dist/vendor/codali/cognitive/ArchitectPlanner.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ArchitectPlanner.js +1726 -0
- package/dist/vendor/codali/cognitive/BuilderOutputParser.d.ts +25 -0
- package/dist/vendor/codali/cognitive/BuilderOutputParser.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/BuilderOutputParser.js +164 -0
- package/dist/vendor/codali/cognitive/BuilderRunner.d.ts +76 -0
- package/dist/vendor/codali/cognitive/BuilderRunner.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/BuilderRunner.js +1159 -0
- package/dist/vendor/codali/cognitive/ContextAssembler.d.ts +91 -0
- package/dist/vendor/codali/cognitive/ContextAssembler.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextAssembler.js +4547 -0
- package/dist/vendor/codali/cognitive/ContextBudget.d.ts +19 -0
- package/dist/vendor/codali/cognitive/ContextBudget.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextBudget.js +35 -0
- package/dist/vendor/codali/cognitive/ContextFileLoader.d.ts +30 -0
- package/dist/vendor/codali/cognitive/ContextFileLoader.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextFileLoader.js +307 -0
- package/dist/vendor/codali/cognitive/ContextManager.d.ts +47 -0
- package/dist/vendor/codali/cognitive/ContextManager.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextManager.js +272 -0
- package/dist/vendor/codali/cognitive/ContextRedactor.d.ts +18 -0
- package/dist/vendor/codali/cognitive/ContextRedactor.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextRedactor.js +53 -0
- package/dist/vendor/codali/cognitive/ContextSelector.d.ts +22 -0
- package/dist/vendor/codali/cognitive/ContextSelector.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextSelector.js +431 -0
- package/dist/vendor/codali/cognitive/ContextSerializer.d.ts +8 -0
- package/dist/vendor/codali/cognitive/ContextSerializer.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextSerializer.js +882 -0
- package/dist/vendor/codali/cognitive/ContextStore.d.ts +27 -0
- package/dist/vendor/codali/cognitive/ContextStore.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextStore.js +79 -0
- package/dist/vendor/codali/cognitive/ContextSummarizer.d.ts +16 -0
- package/dist/vendor/codali/cognitive/ContextSummarizer.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ContextSummarizer.js +45 -0
- package/dist/vendor/codali/cognitive/CostEstimator.d.ts +31 -0
- package/dist/vendor/codali/cognitive/CostEstimator.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/CostEstimator.js +66 -0
- package/dist/vendor/codali/cognitive/CriticEvaluator.d.ts +32 -0
- package/dist/vendor/codali/cognitive/CriticEvaluator.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/CriticEvaluator.js +297 -0
- package/dist/vendor/codali/cognitive/EvidenceGate.d.ts +9 -0
- package/dist/vendor/codali/cognitive/EvidenceGate.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/EvidenceGate.js +75 -0
- package/dist/vendor/codali/cognitive/GoldenExampleIndexer.d.ts +12 -0
- package/dist/vendor/codali/cognitive/GoldenExampleIndexer.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/GoldenExampleIndexer.js +34 -0
- package/dist/vendor/codali/cognitive/GoldenSetStore.d.ts +33 -0
- package/dist/vendor/codali/cognitive/GoldenSetStore.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/GoldenSetStore.js +159 -0
- package/dist/vendor/codali/cognitive/IntentSignals.d.ts +7 -0
- package/dist/vendor/codali/cognitive/IntentSignals.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/IntentSignals.js +285 -0
- package/dist/vendor/codali/cognitive/LearningGovernance.d.ts +100 -0
- package/dist/vendor/codali/cognitive/LearningGovernance.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/LearningGovernance.js +276 -0
- package/dist/vendor/codali/cognitive/MemoryWriteback.d.ts +64 -0
- package/dist/vendor/codali/cognitive/MemoryWriteback.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/MemoryWriteback.js +287 -0
- package/dist/vendor/codali/cognitive/PatchApplier.d.ts +49 -0
- package/dist/vendor/codali/cognitive/PatchApplier.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/PatchApplier.js +199 -0
- package/dist/vendor/codali/cognitive/PatchInterpreter.d.ts +35 -0
- package/dist/vendor/codali/cognitive/PatchInterpreter.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/PatchInterpreter.js +100 -0
- package/dist/vendor/codali/cognitive/PatchOutputNormalizer.d.ts +7 -0
- package/dist/vendor/codali/cognitive/PatchOutputNormalizer.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/PatchOutputNormalizer.js +59 -0
- package/dist/vendor/codali/cognitive/PostMortemAnalyzer.d.ts +17 -0
- package/dist/vendor/codali/cognitive/PostMortemAnalyzer.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/PostMortemAnalyzer.js +131 -0
- package/dist/vendor/codali/cognitive/PreferenceExtraction.d.ts +3 -0
- package/dist/vendor/codali/cognitive/PreferenceExtraction.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/PreferenceExtraction.js +85 -0
- package/dist/vendor/codali/cognitive/Prompts.d.ts +15 -0
- package/dist/vendor/codali/cognitive/Prompts.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/Prompts.js +326 -0
- package/dist/vendor/codali/cognitive/ProviderRouting.d.ts +16 -0
- package/dist/vendor/codali/cognitive/ProviderRouting.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ProviderRouting.js +24 -0
- package/dist/vendor/codali/cognitive/QueryExtraction.d.ts +12 -0
- package/dist/vendor/codali/cognitive/QueryExtraction.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/QueryExtraction.js +262 -0
- package/dist/vendor/codali/cognitive/RunHistoryIndexer.d.ts +13 -0
- package/dist/vendor/codali/cognitive/RunHistoryIndexer.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/RunHistoryIndexer.js +125 -0
- package/dist/vendor/codali/cognitive/SmartPipeline.d.ts +92 -0
- package/dist/vendor/codali/cognitive/SmartPipeline.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/SmartPipeline.js +4804 -0
- package/dist/vendor/codali/cognitive/Types.d.ts +474 -0
- package/dist/vendor/codali/cognitive/Types.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/Types.js +7 -0
- package/dist/vendor/codali/cognitive/ValidationRunner.d.ts +57 -0
- package/dist/vendor/codali/cognitive/ValidationRunner.d.ts.map +1 -0
- package/dist/vendor/codali/cognitive/ValidationRunner.js +515 -0
- package/dist/vendor/codali/config/Config.d.ts +249 -0
- package/dist/vendor/codali/config/Config.d.ts.map +1 -0
- package/dist/vendor/codali/config/Config.js +200 -0
- package/dist/vendor/codali/config/ConfigLoader.d.ts +56 -0
- package/dist/vendor/codali/config/ConfigLoader.d.ts.map +1 -0
- package/dist/vendor/codali/config/ConfigLoader.js +1246 -0
- package/dist/vendor/codali/docdex/DocdexClient.d.ts +113 -0
- package/dist/vendor/codali/docdex/DocdexClient.d.ts.map +1 -0
- package/dist/vendor/codali/docdex/DocdexClient.js +524 -0
- package/dist/vendor/codali/eval/EvalRunner.d.ts +35 -0
- package/dist/vendor/codali/eval/EvalRunner.d.ts.map +1 -0
- package/dist/vendor/codali/eval/EvalRunner.js +38 -0
- package/dist/vendor/codali/eval/EvalTaskExecutor.d.ts +81 -0
- package/dist/vendor/codali/eval/EvalTaskExecutor.d.ts.map +1 -0
- package/dist/vendor/codali/eval/EvalTaskExecutor.js +371 -0
- package/dist/vendor/codali/eval/GateEvaluator.d.ts +31 -0
- package/dist/vendor/codali/eval/GateEvaluator.d.ts.map +1 -0
- package/dist/vendor/codali/eval/GateEvaluator.js +134 -0
- package/dist/vendor/codali/eval/MetricTypes.d.ts +28 -0
- package/dist/vendor/codali/eval/MetricTypes.d.ts.map +1 -0
- package/dist/vendor/codali/eval/MetricTypes.js +1 -0
- package/dist/vendor/codali/eval/MetricsAggregator.d.ts +4 -0
- package/dist/vendor/codali/eval/MetricsAggregator.d.ts.map +1 -0
- package/dist/vendor/codali/eval/MetricsAggregator.js +97 -0
- package/dist/vendor/codali/eval/RegressionComparator.d.ts +29 -0
- package/dist/vendor/codali/eval/RegressionComparator.d.ts.map +1 -0
- package/dist/vendor/codali/eval/RegressionComparator.js +155 -0
- package/dist/vendor/codali/eval/ReportInputAdapter.d.ts +52 -0
- package/dist/vendor/codali/eval/ReportInputAdapter.d.ts.map +1 -0
- package/dist/vendor/codali/eval/ReportInputAdapter.js +229 -0
- package/dist/vendor/codali/eval/ReportSerializer.d.ts +32 -0
- package/dist/vendor/codali/eval/ReportSerializer.d.ts.map +1 -0
- package/dist/vendor/codali/eval/ReportSerializer.js +33 -0
- package/dist/vendor/codali/eval/ReportStore.d.ts +18 -0
- package/dist/vendor/codali/eval/ReportStore.d.ts.map +1 -0
- package/dist/vendor/codali/eval/ReportStore.js +96 -0
- package/dist/vendor/codali/eval/SuiteLoader.d.ts +12 -0
- package/dist/vendor/codali/eval/SuiteLoader.d.ts.map +1 -0
- package/dist/vendor/codali/eval/SuiteLoader.js +51 -0
- package/dist/vendor/codali/eval/SuiteSchema.d.ts +56 -0
- package/dist/vendor/codali/eval/SuiteSchema.d.ts.map +1 -0
- package/dist/vendor/codali/eval/SuiteSchema.js +357 -0
- package/dist/vendor/codali/index.d.ts +11 -0
- package/dist/vendor/codali/index.d.ts.map +1 -0
- package/dist/vendor/codali/index.js +5 -0
- package/dist/vendor/codali/providers/CodexCliProvider.d.ts +8 -0
- package/dist/vendor/codali/providers/CodexCliProvider.d.ts.map +1 -0
- package/dist/vendor/codali/providers/CodexCliProvider.js +282 -0
- package/dist/vendor/codali/providers/OllamaRemoteProvider.d.ts +8 -0
- package/dist/vendor/codali/providers/OllamaRemoteProvider.d.ts.map +1 -0
- package/dist/vendor/codali/providers/OllamaRemoteProvider.js +300 -0
- package/dist/vendor/codali/providers/OpenAiCompatibleProvider.d.ts +8 -0
- package/dist/vendor/codali/providers/OpenAiCompatibleProvider.d.ts.map +1 -0
- package/dist/vendor/codali/providers/OpenAiCompatibleProvider.js +192 -0
- package/dist/vendor/codali/providers/ProviderRegistry.d.ts +12 -0
- package/dist/vendor/codali/providers/ProviderRegistry.d.ts.map +1 -0
- package/dist/vendor/codali/providers/ProviderRegistry.js +28 -0
- package/dist/vendor/codali/providers/ProviderTypes.d.ts +81 -0
- package/dist/vendor/codali/providers/ProviderTypes.d.ts.map +1 -0
- package/dist/vendor/codali/providers/ProviderTypes.js +1 -0
- package/dist/vendor/codali/runtime/CodaliRuntime.d.ts +183 -0
- package/dist/vendor/codali/runtime/CodaliRuntime.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/CodaliRuntime.js +1363 -0
- package/dist/vendor/codali/runtime/DeepInvestigationErrors.d.ts +39 -0
- package/dist/vendor/codali/runtime/DeepInvestigationErrors.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/DeepInvestigationErrors.js +57 -0
- package/dist/vendor/codali/runtime/RunContext.d.ts +27 -0
- package/dist/vendor/codali/runtime/RunContext.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/RunContext.js +51 -0
- package/dist/vendor/codali/runtime/RunLogQuery.d.ts +48 -0
- package/dist/vendor/codali/runtime/RunLogQuery.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/RunLogQuery.js +36 -0
- package/dist/vendor/codali/runtime/RunLogReader.d.ts +19 -0
- package/dist/vendor/codali/runtime/RunLogReader.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/RunLogReader.js +361 -0
- package/dist/vendor/codali/runtime/RunLogger.d.ts +71 -0
- package/dist/vendor/codali/runtime/RunLogger.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/RunLogger.js +100 -0
- package/dist/vendor/codali/runtime/RunTelemetryTypes.d.ts +117 -0
- package/dist/vendor/codali/runtime/RunTelemetryTypes.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/RunTelemetryTypes.js +299 -0
- package/dist/vendor/codali/runtime/Runner.d.ts +66 -0
- package/dist/vendor/codali/runtime/Runner.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/Runner.js +215 -0
- package/dist/vendor/codali/runtime/StoragePaths.d.ts +3 -0
- package/dist/vendor/codali/runtime/StoragePaths.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/StoragePaths.js +19 -0
- package/dist/vendor/codali/runtime/WorkspaceLock.d.ts +30 -0
- package/dist/vendor/codali/runtime/WorkspaceLock.d.ts.map +1 -0
- package/dist/vendor/codali/runtime/WorkspaceLock.js +141 -0
- package/dist/vendor/codali/session/InstructionLoader.d.ts +14 -0
- package/dist/vendor/codali/session/InstructionLoader.d.ts.map +1 -0
- package/dist/vendor/codali/session/InstructionLoader.js +107 -0
- package/dist/vendor/codali/session/SessionStore.d.ts +81 -0
- package/dist/vendor/codali/session/SessionStore.d.ts.map +1 -0
- package/dist/vendor/codali/session/SessionStore.js +244 -0
- package/dist/vendor/codali/subagents/SubagentOrchestrator.d.ts +68 -0
- package/dist/vendor/codali/subagents/SubagentOrchestrator.d.ts.map +1 -0
- package/dist/vendor/codali/subagents/SubagentOrchestrator.js +150 -0
- package/dist/vendor/codali/tools/ToolRegistry.d.ts +9 -0
- package/dist/vendor/codali/tools/ToolRegistry.d.ts.map +1 -0
- package/dist/vendor/codali/tools/ToolRegistry.js +263 -0
- package/dist/vendor/codali/tools/ToolTypes.d.ts +66 -0
- package/dist/vendor/codali/tools/ToolTypes.d.ts.map +1 -0
- package/dist/vendor/codali/tools/ToolTypes.js +32 -0
- package/dist/vendor/codali/tools/diff/DiffTool.d.ts +3 -0
- package/dist/vendor/codali/tools/diff/DiffTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/diff/DiffTool.js +34 -0
- package/dist/vendor/codali/tools/docdex/DocdexTools.d.ts +4 -0
- package/dist/vendor/codali/tools/docdex/DocdexTools.d.ts.map +1 -0
- package/dist/vendor/codali/tools/docdex/DocdexTools.js +453 -0
- package/dist/vendor/codali/tools/filesystem/FileTools.d.ts +3 -0
- package/dist/vendor/codali/tools/filesystem/FileTools.d.ts.map +1 -0
- package/dist/vendor/codali/tools/filesystem/FileTools.js +141 -0
- package/dist/vendor/codali/tools/search/SearchTool.d.ts +3 -0
- package/dist/vendor/codali/tools/search/SearchTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/search/SearchTool.js +46 -0
- package/dist/vendor/codali/tools/shell/ShellTool.d.ts +3 -0
- package/dist/vendor/codali/tools/shell/ShellTool.d.ts.map +1 -0
- package/dist/vendor/codali/tools/shell/ShellTool.js +104 -0
- package/package.json +5 -3
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
export interface DocdexConfig {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
repoRoot?: string;
|
|
4
|
+
repoId?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ToolConfig {
|
|
7
|
+
enabled?: string[];
|
|
8
|
+
allowShell?: boolean;
|
|
9
|
+
shellAllowlist?: string[];
|
|
10
|
+
allowOutsideWorkspace?: boolean;
|
|
11
|
+
allowDestructiveOperations?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface LimitsConfig {
|
|
14
|
+
maxSteps: number;
|
|
15
|
+
maxToolCalls: number;
|
|
16
|
+
maxRetries: number;
|
|
17
|
+
maxTokens?: number;
|
|
18
|
+
timeoutMs: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ContextConfig {
|
|
21
|
+
mode: "bundle_text" | "json";
|
|
22
|
+
maxFiles: number;
|
|
23
|
+
maxTotalBytes: number;
|
|
24
|
+
tokenBudget: number;
|
|
25
|
+
focusMaxFileBytes: number;
|
|
26
|
+
peripheryMaxBytes: number;
|
|
27
|
+
includeRepoMap: boolean;
|
|
28
|
+
includeImpact: boolean;
|
|
29
|
+
includeSnippets: boolean;
|
|
30
|
+
readStrategy: "docdex" | "fs";
|
|
31
|
+
maxContextRefreshes: number;
|
|
32
|
+
skeletonizeLargeFiles: boolean;
|
|
33
|
+
redactSecrets: boolean;
|
|
34
|
+
ignoreFilesFrom: string[];
|
|
35
|
+
preferredFiles?: string[];
|
|
36
|
+
recentFiles?: string[];
|
|
37
|
+
skipSearchWhenPreferred?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Minimum tool usage required during deep investigation.
|
|
41
|
+
* Counts are category-based and only enforced when deep investigation is enabled.
|
|
42
|
+
*/
|
|
43
|
+
export interface DeepInvestigationToolQuotaConfig {
|
|
44
|
+
search: number;
|
|
45
|
+
openOrSnippet: number;
|
|
46
|
+
symbolsOrAst: number;
|
|
47
|
+
impact: number;
|
|
48
|
+
tree: number;
|
|
49
|
+
dagExport: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Minimum investigation budget required before planning.
|
|
53
|
+
* Values are only enforced when deep investigation is enabled.
|
|
54
|
+
*/
|
|
55
|
+
export interface DeepInvestigationBudgetConfig {
|
|
56
|
+
minCycles: number;
|
|
57
|
+
minSeconds: number;
|
|
58
|
+
maxCycles: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Evidence thresholds used to decide if investigation is sufficient.
|
|
62
|
+
* Values are only enforced when deep investigation is enabled.
|
|
63
|
+
*/
|
|
64
|
+
export interface DeepInvestigationEvidenceConfig {
|
|
65
|
+
minSearchHits: number;
|
|
66
|
+
minOpenOrSnippet: number;
|
|
67
|
+
minSymbolsOrAst: number;
|
|
68
|
+
minImpact: number;
|
|
69
|
+
maxWarnings: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Deep investigation configuration bundle.
|
|
73
|
+
*/
|
|
74
|
+
export interface DeepInvestigationConfig {
|
|
75
|
+
enabled: boolean;
|
|
76
|
+
deepScanPreset: boolean;
|
|
77
|
+
toolQuota: DeepInvestigationToolQuotaConfig;
|
|
78
|
+
investigationBudget: DeepInvestigationBudgetConfig;
|
|
79
|
+
evidenceGate: DeepInvestigationEvidenceConfig;
|
|
80
|
+
}
|
|
81
|
+
export interface SecurityConfig {
|
|
82
|
+
redactPatterns: string[];
|
|
83
|
+
readOnlyPaths: string[];
|
|
84
|
+
allowDocEdits: boolean;
|
|
85
|
+
allowCloudModels: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface BuilderConfig {
|
|
88
|
+
mode: "tool_calls" | "patch_json" | "freeform";
|
|
89
|
+
patchFormat: "search_replace" | "file_writes";
|
|
90
|
+
fallbackToInterpreter?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export declare const WORKFLOW_PROFILE_NAMES: readonly ["run", "fix", "review", "explain", "test"];
|
|
93
|
+
export type WorkflowProfileName = (typeof WORKFLOW_PROFILE_NAMES)[number];
|
|
94
|
+
export type WorkflowProfileSource = "command" | "cli" | "env" | "config" | "default";
|
|
95
|
+
export type WorkflowOutputContract = "general" | "patch_summary" | "review_findings" | "explanation" | "verification_summary";
|
|
96
|
+
export interface WorkflowProfile {
|
|
97
|
+
name: WorkflowProfileName;
|
|
98
|
+
description: string;
|
|
99
|
+
smart: boolean;
|
|
100
|
+
builderMode: BuilderConfig["mode"];
|
|
101
|
+
fallbackToInterpreter: boolean;
|
|
102
|
+
retryBudget: number;
|
|
103
|
+
verificationPolicy: string;
|
|
104
|
+
verificationMinimumChecks: number;
|
|
105
|
+
verificationEnforceHighConfidence: boolean;
|
|
106
|
+
outputContract: WorkflowOutputContract;
|
|
107
|
+
allowWrites: boolean;
|
|
108
|
+
}
|
|
109
|
+
export interface WorkflowConfig {
|
|
110
|
+
profile?: WorkflowProfileName;
|
|
111
|
+
profiles?: Partial<Record<WorkflowProfileName, Partial<WorkflowProfile>>>;
|
|
112
|
+
}
|
|
113
|
+
export interface ResolvedWorkflowProfile extends WorkflowProfile {
|
|
114
|
+
source: WorkflowProfileSource;
|
|
115
|
+
command: string;
|
|
116
|
+
}
|
|
117
|
+
export interface InterpreterConfig {
|
|
118
|
+
provider: string;
|
|
119
|
+
model: string;
|
|
120
|
+
format: string;
|
|
121
|
+
grammar?: string;
|
|
122
|
+
maxRetries: number;
|
|
123
|
+
timeoutMs: number;
|
|
124
|
+
}
|
|
125
|
+
export interface StreamingConfig {
|
|
126
|
+
enabled: boolean;
|
|
127
|
+
flushEveryMs: number;
|
|
128
|
+
}
|
|
129
|
+
export interface CostConfig {
|
|
130
|
+
maxCostPerRun: number;
|
|
131
|
+
charPerToken: number;
|
|
132
|
+
pricingOverrides: Record<string, {
|
|
133
|
+
inputPer1K?: number;
|
|
134
|
+
outputPer1K?: number;
|
|
135
|
+
per1K?: number;
|
|
136
|
+
}>;
|
|
137
|
+
}
|
|
138
|
+
export interface LocalContextSummarizeConfig {
|
|
139
|
+
enabled: boolean;
|
|
140
|
+
provider: string;
|
|
141
|
+
model?: string;
|
|
142
|
+
targetTokens: number;
|
|
143
|
+
thresholdPct: number;
|
|
144
|
+
}
|
|
145
|
+
export interface LocalContextConfig {
|
|
146
|
+
enabled: boolean;
|
|
147
|
+
storageDir: string;
|
|
148
|
+
persistToolMessages: boolean;
|
|
149
|
+
maxMessages: number;
|
|
150
|
+
maxBytesPerLane: number;
|
|
151
|
+
modelTokenLimits: Record<string, number>;
|
|
152
|
+
summarize: LocalContextSummarizeConfig;
|
|
153
|
+
}
|
|
154
|
+
export interface RoutingPhaseConfig {
|
|
155
|
+
agent?: string;
|
|
156
|
+
provider?: string;
|
|
157
|
+
model?: string;
|
|
158
|
+
temperature?: number;
|
|
159
|
+
format?: string;
|
|
160
|
+
grammar?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface RoutingConfig {
|
|
163
|
+
librarian?: RoutingPhaseConfig;
|
|
164
|
+
architect?: RoutingPhaseConfig;
|
|
165
|
+
builder?: RoutingPhaseConfig;
|
|
166
|
+
critic?: RoutingPhaseConfig;
|
|
167
|
+
interpreter?: RoutingPhaseConfig;
|
|
168
|
+
}
|
|
169
|
+
export interface LoggingConfig {
|
|
170
|
+
directory: string;
|
|
171
|
+
}
|
|
172
|
+
export interface EvalGateConfig {
|
|
173
|
+
patch_apply_drop_max: number;
|
|
174
|
+
verification_pass_rate_min: number;
|
|
175
|
+
hallucination_rate_max: number;
|
|
176
|
+
scope_violation_rate_max: number;
|
|
177
|
+
}
|
|
178
|
+
export interface EvalConfig {
|
|
179
|
+
report_dir: string;
|
|
180
|
+
gates: EvalGateConfig;
|
|
181
|
+
}
|
|
182
|
+
export interface LearningConfig {
|
|
183
|
+
persistence_min_confidence: number;
|
|
184
|
+
enforcement_min_confidence: number;
|
|
185
|
+
require_confirmation_for_low_confidence: boolean;
|
|
186
|
+
auto_enforce_high_confidence: boolean;
|
|
187
|
+
candidate_store_file: string;
|
|
188
|
+
}
|
|
189
|
+
export interface CodaliConfig {
|
|
190
|
+
workspaceRoot: string;
|
|
191
|
+
project?: string;
|
|
192
|
+
command?: string;
|
|
193
|
+
commandRunId?: string;
|
|
194
|
+
jobId?: string;
|
|
195
|
+
runId?: string;
|
|
196
|
+
taskId?: string;
|
|
197
|
+
taskKey?: string;
|
|
198
|
+
agentId?: string;
|
|
199
|
+
agentSlug?: string;
|
|
200
|
+
smart?: boolean;
|
|
201
|
+
planHint?: string;
|
|
202
|
+
provider: string;
|
|
203
|
+
model: string;
|
|
204
|
+
apiKey?: string;
|
|
205
|
+
baseUrl?: string;
|
|
206
|
+
workflow?: WorkflowConfig;
|
|
207
|
+
resolvedWorkflowProfile?: ResolvedWorkflowProfile;
|
|
208
|
+
docdex: DocdexConfig;
|
|
209
|
+
tools: ToolConfig;
|
|
210
|
+
limits: LimitsConfig;
|
|
211
|
+
context: ContextConfig;
|
|
212
|
+
/**
|
|
213
|
+
* Deep investigation controls. When unset or disabled, deep mode is inactive.
|
|
214
|
+
* Deep investigation requires the smart pipeline; builder-only runs fail closed.
|
|
215
|
+
*/
|
|
216
|
+
deepInvestigation?: DeepInvestigationConfig;
|
|
217
|
+
security: SecurityConfig;
|
|
218
|
+
builder: BuilderConfig;
|
|
219
|
+
interpreter: InterpreterConfig;
|
|
220
|
+
streaming: StreamingConfig;
|
|
221
|
+
cost: CostConfig;
|
|
222
|
+
localContext: LocalContextConfig;
|
|
223
|
+
eval: EvalConfig;
|
|
224
|
+
learning: LearningConfig;
|
|
225
|
+
logging: LoggingConfig;
|
|
226
|
+
routing?: RoutingConfig;
|
|
227
|
+
}
|
|
228
|
+
export declare const DEFAULT_DOCDEX_BASE_URL = "http://127.0.0.1:28491";
|
|
229
|
+
export declare const DEFAULT_LOG_DIR = "logs/codali";
|
|
230
|
+
export declare const DEFAULT_WORKFLOW_PROFILE: WorkflowProfileName;
|
|
231
|
+
export declare const DEFAULT_WORKFLOW_PROFILES: Record<WorkflowProfileName, WorkflowProfile>;
|
|
232
|
+
export declare const DEFAULT_LIMITS: LimitsConfig;
|
|
233
|
+
export declare const DEFAULT_CONTEXT: ContextConfig;
|
|
234
|
+
export declare const DEFAULT_DEEP_INVESTIGATION_TOOL_QUOTA: DeepInvestigationToolQuotaConfig;
|
|
235
|
+
export declare const DEFAULT_DEEP_INVESTIGATION_BUDGET: DeepInvestigationBudgetConfig;
|
|
236
|
+
export declare const DEFAULT_DEEP_INVESTIGATION_EVIDENCE: DeepInvestigationEvidenceConfig;
|
|
237
|
+
export declare const DEFAULT_DEEP_INVESTIGATION: DeepInvestigationConfig;
|
|
238
|
+
export declare const DEFAULT_SECURITY: SecurityConfig;
|
|
239
|
+
export declare const DEFAULT_BUILDER: BuilderConfig;
|
|
240
|
+
export declare const DEFAULT_INTERPRETER: InterpreterConfig;
|
|
241
|
+
export declare const DEFAULT_STREAMING: StreamingConfig;
|
|
242
|
+
export declare const DEFAULT_COST: CostConfig;
|
|
243
|
+
export declare const DEFAULT_LOCAL_CONTEXT: LocalContextConfig;
|
|
244
|
+
export declare const DEFAULT_TOOL_CONFIG: ToolConfig;
|
|
245
|
+
export declare const DEFAULT_EVAL_GATES: EvalGateConfig;
|
|
246
|
+
export declare const DEFAULT_EVAL: EvalConfig;
|
|
247
|
+
export declare const DEFAULT_LEARNING: LearningConfig;
|
|
248
|
+
export declare const DEFAULT_LOGGING: LoggingConfig;
|
|
249
|
+
//# sourceMappingURL=Config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../../src/config/Config.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,aAAa,GAAG,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,MAAM,EAAE,CA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;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAMjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAKhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAG1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,cAM9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,aAE7B,CAAC"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
export const WORKFLOW_PROFILE_NAMES = ["run", "fix", "review", "explain", "test"];
|
|
2
|
+
export const DEFAULT_DOCDEX_BASE_URL = "http://127.0.0.1:28491";
|
|
3
|
+
export const DEFAULT_LOG_DIR = "logs/codali";
|
|
4
|
+
export const DEFAULT_WORKFLOW_PROFILE = "run";
|
|
5
|
+
export const DEFAULT_WORKFLOW_PROFILES = {
|
|
6
|
+
run: {
|
|
7
|
+
name: "run",
|
|
8
|
+
description: "General-purpose workflow profile for advanced usage.",
|
|
9
|
+
smart: true,
|
|
10
|
+
builderMode: "patch_json",
|
|
11
|
+
fallbackToInterpreter: true,
|
|
12
|
+
retryBudget: 3,
|
|
13
|
+
verificationPolicy: "general",
|
|
14
|
+
verificationMinimumChecks: 0,
|
|
15
|
+
verificationEnforceHighConfidence: false,
|
|
16
|
+
outputContract: "general",
|
|
17
|
+
allowWrites: true,
|
|
18
|
+
},
|
|
19
|
+
fix: {
|
|
20
|
+
name: "fix",
|
|
21
|
+
description: "Apply code changes and emit a patch-oriented summary.",
|
|
22
|
+
smart: true,
|
|
23
|
+
builderMode: "patch_json",
|
|
24
|
+
fallbackToInterpreter: true,
|
|
25
|
+
retryBudget: 3,
|
|
26
|
+
verificationPolicy: "fix",
|
|
27
|
+
verificationMinimumChecks: 0,
|
|
28
|
+
verificationEnforceHighConfidence: false,
|
|
29
|
+
outputContract: "patch_summary",
|
|
30
|
+
allowWrites: true,
|
|
31
|
+
},
|
|
32
|
+
review: {
|
|
33
|
+
name: "review",
|
|
34
|
+
description: "Analyze risks/findings without applying write-oriented changes by default.",
|
|
35
|
+
smart: true,
|
|
36
|
+
builderMode: "patch_json",
|
|
37
|
+
fallbackToInterpreter: true,
|
|
38
|
+
retryBudget: 2,
|
|
39
|
+
verificationPolicy: "review",
|
|
40
|
+
verificationMinimumChecks: 0,
|
|
41
|
+
verificationEnforceHighConfidence: false,
|
|
42
|
+
outputContract: "review_findings",
|
|
43
|
+
allowWrites: false,
|
|
44
|
+
},
|
|
45
|
+
explain: {
|
|
46
|
+
name: "explain",
|
|
47
|
+
description: "Produce explanation-first output without applying write-oriented changes by default.",
|
|
48
|
+
smart: true,
|
|
49
|
+
builderMode: "patch_json",
|
|
50
|
+
fallbackToInterpreter: true,
|
|
51
|
+
retryBudget: 2,
|
|
52
|
+
verificationPolicy: "explain",
|
|
53
|
+
verificationMinimumChecks: 0,
|
|
54
|
+
verificationEnforceHighConfidence: false,
|
|
55
|
+
outputContract: "explanation",
|
|
56
|
+
allowWrites: false,
|
|
57
|
+
},
|
|
58
|
+
test: {
|
|
59
|
+
name: "test",
|
|
60
|
+
description: "Produce verification-first output without applying write-oriented changes by default.",
|
|
61
|
+
smart: true,
|
|
62
|
+
builderMode: "patch_json",
|
|
63
|
+
fallbackToInterpreter: true,
|
|
64
|
+
retryBudget: 2,
|
|
65
|
+
verificationPolicy: "test",
|
|
66
|
+
verificationMinimumChecks: 1,
|
|
67
|
+
verificationEnforceHighConfidence: true,
|
|
68
|
+
outputContract: "verification_summary",
|
|
69
|
+
allowWrites: false,
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
export const DEFAULT_LIMITS = {
|
|
73
|
+
maxSteps: 12,
|
|
74
|
+
maxToolCalls: 40,
|
|
75
|
+
maxRetries: 3,
|
|
76
|
+
timeoutMs: 5 * 60 * 1000,
|
|
77
|
+
};
|
|
78
|
+
export const DEFAULT_CONTEXT = {
|
|
79
|
+
mode: "bundle_text",
|
|
80
|
+
maxFiles: 8,
|
|
81
|
+
maxTotalBytes: 40000,
|
|
82
|
+
tokenBudget: 120000,
|
|
83
|
+
focusMaxFileBytes: 12000,
|
|
84
|
+
peripheryMaxBytes: 4000,
|
|
85
|
+
includeRepoMap: true,
|
|
86
|
+
includeImpact: true,
|
|
87
|
+
includeSnippets: true,
|
|
88
|
+
readStrategy: "docdex",
|
|
89
|
+
maxContextRefreshes: 1,
|
|
90
|
+
skeletonizeLargeFiles: true,
|
|
91
|
+
redactSecrets: true,
|
|
92
|
+
ignoreFilesFrom: [".gitignore", ".codaliignore"],
|
|
93
|
+
skipSearchWhenPreferred: false,
|
|
94
|
+
};
|
|
95
|
+
// Deep investigation defaults are only enforced when deep mode is enabled.
|
|
96
|
+
export const DEFAULT_DEEP_INVESTIGATION_TOOL_QUOTA = {
|
|
97
|
+
search: 3,
|
|
98
|
+
openOrSnippet: 3,
|
|
99
|
+
symbolsOrAst: 2,
|
|
100
|
+
impact: 1,
|
|
101
|
+
tree: 1,
|
|
102
|
+
dagExport: 0,
|
|
103
|
+
};
|
|
104
|
+
export const DEFAULT_DEEP_INVESTIGATION_BUDGET = {
|
|
105
|
+
minCycles: 2,
|
|
106
|
+
minSeconds: 0,
|
|
107
|
+
maxCycles: 6,
|
|
108
|
+
};
|
|
109
|
+
export const DEFAULT_DEEP_INVESTIGATION_EVIDENCE = {
|
|
110
|
+
minSearchHits: 0,
|
|
111
|
+
minOpenOrSnippet: 0,
|
|
112
|
+
minSymbolsOrAst: 0,
|
|
113
|
+
minImpact: 0,
|
|
114
|
+
maxWarnings: 2,
|
|
115
|
+
};
|
|
116
|
+
export const DEFAULT_DEEP_INVESTIGATION = {
|
|
117
|
+
enabled: true,
|
|
118
|
+
deepScanPreset: false,
|
|
119
|
+
toolQuota: DEFAULT_DEEP_INVESTIGATION_TOOL_QUOTA,
|
|
120
|
+
investigationBudget: DEFAULT_DEEP_INVESTIGATION_BUDGET,
|
|
121
|
+
evidenceGate: DEFAULT_DEEP_INVESTIGATION_EVIDENCE,
|
|
122
|
+
};
|
|
123
|
+
export const DEFAULT_SECURITY = {
|
|
124
|
+
redactPatterns: ["AKIA[0-9A-Z]{16}", "-----BEGIN PRIVATE KEY-----"],
|
|
125
|
+
readOnlyPaths: [
|
|
126
|
+
"docs/sds",
|
|
127
|
+
"docs/rfp",
|
|
128
|
+
"openapi",
|
|
129
|
+
"openapi.yaml",
|
|
130
|
+
"openapi.yml",
|
|
131
|
+
"openapi.json",
|
|
132
|
+
],
|
|
133
|
+
allowDocEdits: false,
|
|
134
|
+
allowCloudModels: false,
|
|
135
|
+
};
|
|
136
|
+
export const DEFAULT_BUILDER = {
|
|
137
|
+
mode: "patch_json",
|
|
138
|
+
patchFormat: "search_replace",
|
|
139
|
+
fallbackToInterpreter: true,
|
|
140
|
+
};
|
|
141
|
+
export const DEFAULT_INTERPRETER = {
|
|
142
|
+
provider: "auto",
|
|
143
|
+
model: "auto",
|
|
144
|
+
format: "json",
|
|
145
|
+
maxRetries: 1,
|
|
146
|
+
timeoutMs: 300000,
|
|
147
|
+
};
|
|
148
|
+
export const DEFAULT_STREAMING = {
|
|
149
|
+
enabled: true,
|
|
150
|
+
flushEveryMs: 250,
|
|
151
|
+
};
|
|
152
|
+
export const DEFAULT_COST = {
|
|
153
|
+
maxCostPerRun: 0.5,
|
|
154
|
+
charPerToken: 4,
|
|
155
|
+
pricingOverrides: {},
|
|
156
|
+
};
|
|
157
|
+
export const DEFAULT_LOCAL_CONTEXT = {
|
|
158
|
+
enabled: true,
|
|
159
|
+
storageDir: "codali/context",
|
|
160
|
+
persistToolMessages: false,
|
|
161
|
+
maxMessages: 200,
|
|
162
|
+
maxBytesPerLane: 200000,
|
|
163
|
+
// Populated dynamically from selected phase-agent context windows when available.
|
|
164
|
+
modelTokenLimits: {},
|
|
165
|
+
summarize: {
|
|
166
|
+
enabled: true,
|
|
167
|
+
provider: "librarian",
|
|
168
|
+
// Intentionally unset so the summarizer uses the selected phase agent model.
|
|
169
|
+
model: undefined,
|
|
170
|
+
targetTokens: 1200,
|
|
171
|
+
thresholdPct: 0.9,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
export const DEFAULT_TOOL_CONFIG = {
|
|
175
|
+
enabled: [],
|
|
176
|
+
allowShell: false,
|
|
177
|
+
shellAllowlist: [],
|
|
178
|
+
allowOutsideWorkspace: false,
|
|
179
|
+
allowDestructiveOperations: false,
|
|
180
|
+
};
|
|
181
|
+
export const DEFAULT_EVAL_GATES = {
|
|
182
|
+
patch_apply_drop_max: 0.02,
|
|
183
|
+
verification_pass_rate_min: 0.9,
|
|
184
|
+
hallucination_rate_max: 0.02,
|
|
185
|
+
scope_violation_rate_max: 0,
|
|
186
|
+
};
|
|
187
|
+
export const DEFAULT_EVAL = {
|
|
188
|
+
report_dir: `${DEFAULT_LOG_DIR}/eval`,
|
|
189
|
+
gates: DEFAULT_EVAL_GATES,
|
|
190
|
+
};
|
|
191
|
+
export const DEFAULT_LEARNING = {
|
|
192
|
+
persistence_min_confidence: 0.45,
|
|
193
|
+
enforcement_min_confidence: 0.85,
|
|
194
|
+
require_confirmation_for_low_confidence: true,
|
|
195
|
+
auto_enforce_high_confidence: true,
|
|
196
|
+
candidate_store_file: `${DEFAULT_LOG_DIR}/learning-rules.json`,
|
|
197
|
+
};
|
|
198
|
+
export const DEFAULT_LOGGING = {
|
|
199
|
+
directory: DEFAULT_LOG_DIR,
|
|
200
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { type BuilderConfig, type ContextConfig, type CostConfig, type DeepInvestigationBudgetConfig, type DeepInvestigationConfig, type DeepInvestigationEvidenceConfig, type DeepInvestigationToolQuotaConfig, type DocdexConfig, type EvalConfig, type EvalGateConfig, type LearningConfig, type LimitsConfig, type LocalContextConfig, type LoggingConfig, type CodaliConfig, type InterpreterConfig, type RoutingConfig, type SecurityConfig, type StreamingConfig, type ToolConfig, type WorkflowConfig, type WorkflowProfile, type WorkflowProfileName } from "./Config.js";
|
|
2
|
+
type DeepInvestigationConfigSource = Partial<Omit<DeepInvestigationConfig, "toolQuota" | "investigationBudget" | "evidenceGate">> & {
|
|
3
|
+
toolQuota?: Partial<DeepInvestigationToolQuotaConfig>;
|
|
4
|
+
investigationBudget?: Partial<DeepInvestigationBudgetConfig>;
|
|
5
|
+
evidenceGate?: Partial<DeepInvestigationEvidenceConfig>;
|
|
6
|
+
};
|
|
7
|
+
type WorkflowConfigSource = Partial<WorkflowConfig> & {
|
|
8
|
+
profiles?: Partial<Record<WorkflowProfileName, Partial<WorkflowProfile>>>;
|
|
9
|
+
};
|
|
10
|
+
type EvalConfigSource = Partial<Omit<EvalConfig, "gates">> & {
|
|
11
|
+
gates?: Partial<EvalGateConfig>;
|
|
12
|
+
};
|
|
13
|
+
type LearningConfigSource = Partial<LearningConfig>;
|
|
14
|
+
export interface ConfigSource {
|
|
15
|
+
workspaceRoot?: string;
|
|
16
|
+
project?: string;
|
|
17
|
+
command?: string;
|
|
18
|
+
commandRunId?: string;
|
|
19
|
+
jobId?: string;
|
|
20
|
+
runId?: string;
|
|
21
|
+
taskId?: string;
|
|
22
|
+
taskKey?: string;
|
|
23
|
+
agentId?: string;
|
|
24
|
+
agentSlug?: string;
|
|
25
|
+
smart?: boolean;
|
|
26
|
+
planHint?: string;
|
|
27
|
+
provider?: string;
|
|
28
|
+
model?: string;
|
|
29
|
+
apiKey?: string;
|
|
30
|
+
baseUrl?: string;
|
|
31
|
+
workflow?: WorkflowConfigSource;
|
|
32
|
+
docdex?: Partial<DocdexConfig>;
|
|
33
|
+
tools?: Partial<ToolConfig>;
|
|
34
|
+
limits?: Partial<LimitsConfig>;
|
|
35
|
+
context?: Partial<ContextConfig>;
|
|
36
|
+
deepInvestigation?: DeepInvestigationConfigSource;
|
|
37
|
+
security?: Partial<SecurityConfig>;
|
|
38
|
+
builder?: Partial<BuilderConfig>;
|
|
39
|
+
interpreter?: Partial<InterpreterConfig>;
|
|
40
|
+
streaming?: Partial<StreamingConfig>;
|
|
41
|
+
cost?: Partial<CostConfig>;
|
|
42
|
+
localContext?: Partial<LocalContextConfig>;
|
|
43
|
+
eval?: EvalConfigSource;
|
|
44
|
+
learning?: LearningConfigSource;
|
|
45
|
+
logging?: Partial<LoggingConfig>;
|
|
46
|
+
routing?: Partial<RoutingConfig>;
|
|
47
|
+
}
|
|
48
|
+
export interface LoadConfigOptions {
|
|
49
|
+
cwd?: string;
|
|
50
|
+
env?: NodeJS.ProcessEnv;
|
|
51
|
+
cli?: ConfigSource;
|
|
52
|
+
configPath?: string;
|
|
53
|
+
}
|
|
54
|
+
export declare const loadConfig: (options?: LoadConfigOptions) => Promise<CodaliConfig>;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=ConfigLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigLoader.d.ts","sourceRoot":"","sources":["../../src/config/ConfigLoader.ts"],"names":[],"mappings":"AAGA,OAAO,EAkBL,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAElB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EAEnB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EAEzB,MAAM,aAAa,CAAC;AAErB,KAAK,6BAA6B,GAAG,OAAO,CAC1C,IAAI,CAAC,uBAAuB,EAAE,WAAW,GAAG,qBAAqB,GAAG,cAAc,CAAC,CACpF,GAAG;IACF,SAAS,CAAC,EAAE,OAAO,CAAC,gCAAgC,CAAC,CAAC;IACtD,mBAAmB,CAAC,EAAE,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC7D,YAAY,CAAC,EAA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