substrate-ai 0.19.12 → 0.19.14
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/adapter-registry-CtlKDROg.js +4 -0
- package/dist/cli/index.js +13 -13
- package/dist/{decisions-CTvoZrPH.js → decisions-BFaxuKlw.js} +1 -1
- package/dist/{dist-adzGUKPc.js → dist-CGOpItka.js} +60 -40
- package/dist/{errors-CZdr5Wqb.js → errors-DBkOZgD4.js} +2 -2
- package/dist/{experimenter-DxQ7CQHb.js → experimenter-DFzSRxTS.js} +1 -1
- package/dist/{health-DJgGZhW-.js → health-CS3SJ2JD.js} +2 -2
- package/dist/{health-Cd_psXRz.js → health-E34oq1s8.js} +2 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +2 -2
- package/dist/{routing-Vzz2S3bc.js → routing-Bg2Xh6tP.js} +1 -1
- package/dist/{run-1Ywys7Fy.js → run-BbZay3p0.js} +3 -3
- package/dist/{run-zc3SEWY1.js → run-ohGVQc0P.js} +3 -3
- package/dist/{upgrade-BtaFOZk0.js → upgrade-4QYypG_Z.js} +2 -2
- package/dist/{upgrade-C3-h4asQ.js → upgrade-DaP1jFb9.js} +2 -2
- package/dist/{version-manager-impl-CCk76_D8.js → version-manager-impl-DFnk7mmw.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-BVAkrT-E.js +0 -4
package/dist/cli/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot } from "../health-
|
|
2
|
+
import { FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, buildPipelineStatusOutput, createDatabaseAdapter, createStateStore, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot } from "../health-CS3SJ2JD.js";
|
|
3
3
|
import { createLogger } from "../logger-KeHncl-f.js";
|
|
4
4
|
import { createEventBus } from "../helpers-CElYrONe.js";
|
|
5
|
-
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-
|
|
5
|
+
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createDoltClient, createPipelineRun, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, tagRunAsBaseline, updatePipelineRun } from "../dist-CGOpItka.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-
|
|
8
|
-
import "../errors-
|
|
7
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-BbZay3p0.js";
|
|
8
|
+
import "../errors-DBkOZgD4.js";
|
|
9
9
|
import "../routing-CcBOCuC9.js";
|
|
10
10
|
import "../decisions-C0pz9Clx.js";
|
|
11
11
|
import "../version-manager-impl-BmOWu8ml.js";
|
|
12
|
-
import { registerUpgradeCommand } from "../upgrade-
|
|
12
|
+
import { registerUpgradeCommand } from "../upgrade-DaP1jFb9.js";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
import { fileURLToPath } from "url";
|
|
15
15
|
import { dirname, join, resolve } from "path";
|
|
@@ -3212,7 +3212,7 @@ async function runStatusAction(options) {
|
|
|
3212
3212
|
if (run === void 0) run = await getLatestRun(adapter);
|
|
3213
3213
|
}
|
|
3214
3214
|
if (run === void 0) {
|
|
3215
|
-
const { inspectProcessTree } = await import("../health-
|
|
3215
|
+
const { inspectProcessTree } = await import("../health-E34oq1s8.js");
|
|
3216
3216
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
3217
3217
|
const processInfo = inspectProcessTree({
|
|
3218
3218
|
projectRoot,
|
|
@@ -4099,7 +4099,7 @@ function defaultSupervisorDeps() {
|
|
|
4099
4099
|
if (cached === null) {
|
|
4100
4100
|
const { AdapterRegistry: AR } = await import(
|
|
4101
4101
|
/* @vite-ignore */
|
|
4102
|
-
"../adapter-registry-
|
|
4102
|
+
"../adapter-registry-CtlKDROg.js"
|
|
4103
4103
|
);
|
|
4104
4104
|
cached = new AR();
|
|
4105
4105
|
await cached.discoverAndRegister();
|
|
@@ -4541,11 +4541,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4541
4541
|
try {
|
|
4542
4542
|
const { createExperimenter } = await import(
|
|
4543
4543
|
/* @vite-ignore */
|
|
4544
|
-
"../experimenter-
|
|
4544
|
+
"../experimenter-DFzSRxTS.js"
|
|
4545
4545
|
);
|
|
4546
4546
|
const { getLatestRun: getLatest } = await import(
|
|
4547
4547
|
/* @vite-ignore */
|
|
4548
|
-
"../decisions-
|
|
4548
|
+
"../decisions-BFaxuKlw.js"
|
|
4549
4549
|
);
|
|
4550
4550
|
const expAdapter = createDatabaseAdapter({
|
|
4551
4551
|
backend: "auto",
|
|
@@ -4555,7 +4555,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
4555
4555
|
await initSchema(expAdapter);
|
|
4556
4556
|
const { runRunAction: runPipeline } = await import(
|
|
4557
4557
|
/* @vite-ignore */
|
|
4558
|
-
"../run-
|
|
4558
|
+
"../run-ohGVQc0P.js"
|
|
4559
4559
|
);
|
|
4560
4560
|
const runStoryFn = async (opts) => {
|
|
4561
4561
|
const exitCode = await runPipeline({
|
|
@@ -5085,7 +5085,7 @@ async function runMetricsAction(options) {
|
|
|
5085
5085
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
5086
5086
|
let routingConfig = null;
|
|
5087
5087
|
if (existsSync$1(routingConfigPath)) try {
|
|
5088
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
5088
|
+
const { loadModelRoutingConfig } = await import("../routing-Bg2Xh6tP.js");
|
|
5089
5089
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
5090
5090
|
} catch {}
|
|
5091
5091
|
if (routingConfig === null) routingConfig = {
|
|
@@ -8163,8 +8163,8 @@ async function createProgram() {
|
|
|
8163
8163
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
8164
8164
|
function checkForUpdatesInBackground(currentVersion) {
|
|
8165
8165
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
8166
|
-
import("../upgrade-
|
|
8167
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
8166
|
+
import("../upgrade-4QYypG_Z.js").then(async () => {
|
|
8167
|
+
const { createVersionManager } = await import("../version-manager-impl-DFnk7mmw.js");
|
|
8168
8168
|
const vm = createVersionManager();
|
|
8169
8169
|
const result = await vm.checkForUpdates();
|
|
8170
8170
|
if (result.updateAvailable) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-
|
|
1
|
+
import { addTokenUsage, createDecision, createPipelineRun, createRequirement, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getTokenUsageSummary, listRequirements, registerArtifact, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision } from "./dist-CGOpItka.js";
|
|
2
2
|
import "./decisions-C0pz9Clx.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -116,7 +116,9 @@ function extractYamlBlock(output) {
|
|
|
116
116
|
const fencedResult = extractLastFencedYaml(output);
|
|
117
117
|
if (fencedResult !== null) return fencedResult;
|
|
118
118
|
const stripped = stripTrailingFence(output);
|
|
119
|
-
|
|
119
|
+
const unfenced = extractUnfencedYaml(stripped);
|
|
120
|
+
if (unfenced !== null) return unfenced;
|
|
121
|
+
return extractJsonAsYaml(output);
|
|
120
122
|
}
|
|
121
123
|
/**
|
|
122
124
|
* Strip a trailing markdown fence that wraps the entire remaining output.
|
|
@@ -172,6 +174,32 @@ function extractUnfencedYaml(output) {
|
|
|
172
174
|
return yamlText !== "" ? yamlText : null;
|
|
173
175
|
}
|
|
174
176
|
/**
|
|
177
|
+
* Try to extract a JSON object from the output and convert it to YAML.
|
|
178
|
+
*
|
|
179
|
+
* Scans for JSON objects (delimited by { ... }) that contain at least one
|
|
180
|
+
* anchor key. Tries the last such object. Converts via yaml.dump so
|
|
181
|
+
* downstream parseYamlResult can validate it with the same Zod schema.
|
|
182
|
+
*/
|
|
183
|
+
function extractJsonAsYaml(output) {
|
|
184
|
+
const jsonPattern = /\{[\s\S]*?\n\}/g;
|
|
185
|
+
let lastJsonObj = null;
|
|
186
|
+
let match;
|
|
187
|
+
while ((match = jsonPattern.exec(output)) !== null) {
|
|
188
|
+
const candidate = match[0];
|
|
189
|
+
if (!YAML_ANCHOR_KEYS.some((key) => candidate.includes(key.replace(":", "")))) continue;
|
|
190
|
+
try {
|
|
191
|
+
const parsed = JSON.parse(candidate);
|
|
192
|
+
if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) lastJsonObj = parsed;
|
|
193
|
+
} catch {}
|
|
194
|
+
}
|
|
195
|
+
if (lastJsonObj === null) return null;
|
|
196
|
+
try {
|
|
197
|
+
return yaml.dump(lastJsonObj, { lineWidth: -1 });
|
|
198
|
+
} catch {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
175
203
|
* Check if a line starts with one of the known anchor keys.
|
|
176
204
|
*/
|
|
177
205
|
function isAnchorLine(line) {
|
|
@@ -371,6 +399,17 @@ function detectInterfaceChanges(options) {
|
|
|
371
399
|
const SHUTDOWN_GRACE_MS = 1e4;
|
|
372
400
|
const SHUTDOWN_MAX_WAIT_MS = 3e4;
|
|
373
401
|
const CHARS_PER_TOKEN$3 = 4;
|
|
402
|
+
const YAML_OUTPUT_SUFFIX = `
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
IMPORTANT: When you have completed the task, output your structured result as a fenced YAML block at the END of your response. Use this exact format:
|
|
406
|
+
|
|
407
|
+
\`\`\`yaml
|
|
408
|
+
result: success
|
|
409
|
+
# ... additional fields as specified in the task above
|
|
410
|
+
\`\`\`
|
|
411
|
+
|
|
412
|
+
The YAML block MUST be the last thing in your output. Do not add any text after the closing fence.`;
|
|
374
413
|
const MIN_FREE_MEMORY_BYTES = (() => {
|
|
375
414
|
const envMB = process.env["SUBSTRATE_MEMORY_THRESHOLD_MB"];
|
|
376
415
|
if (envMB) {
|
|
@@ -628,7 +667,8 @@ var DispatcherImpl = class {
|
|
|
628
667
|
}
|
|
629
668
|
const worktreePath = workingDirectory ?? process.cwd();
|
|
630
669
|
const resolvedMaxTurns = maxTurns ?? DEFAULT_MAX_TURNS[taskType];
|
|
631
|
-
const
|
|
670
|
+
const effectivePrompt = agent === "claude-code" ? prompt : prompt + YAML_OUTPUT_SUFFIX;
|
|
671
|
+
const cmd = adapter.buildCommand(effectivePrompt, {
|
|
632
672
|
worktreePath,
|
|
633
673
|
billingMode: "subscription",
|
|
634
674
|
...effectiveModel !== void 0 ? { model: effectiveModel } : {},
|
|
@@ -640,7 +680,9 @@ var DispatcherImpl = class {
|
|
|
640
680
|
taskType,
|
|
641
681
|
dispatchId: id
|
|
642
682
|
});
|
|
643
|
-
const
|
|
683
|
+
const baseTimeoutMs = timeout ?? this._config.defaultTimeouts[taskType] ?? DEFAULT_TIMEOUTS[taskType] ?? 3e5;
|
|
684
|
+
const timeoutMultiplier = adapter.getCapabilities().timeoutMultiplier ?? 1;
|
|
685
|
+
const timeoutMs = Math.round(baseTimeoutMs * timeoutMultiplier);
|
|
644
686
|
const env = { ...process.env };
|
|
645
687
|
const parentNodeOpts = env["NODE_OPTIONS"] ?? "";
|
|
646
688
|
if (!parentNodeOpts.includes("--max-old-space-size")) env["NODE_OPTIONS"] = `${parentNodeOpts} --max-old-space-size=512`.trim();
|
|
@@ -8782,10 +8824,14 @@ var CodexCLIAdapter = class {
|
|
|
8782
8824
|
}
|
|
8783
8825
|
/**
|
|
8784
8826
|
* Build spawn command for a coding task.
|
|
8785
|
-
* Uses: `codex exec
|
|
8827
|
+
* Uses: `codex exec` with prompt delivered via stdin.
|
|
8828
|
+
*
|
|
8829
|
+
* Do NOT use --json: it produces a JSONL event stream that prevents
|
|
8830
|
+
* extractYamlBlock from finding the structured result block in stdout.
|
|
8831
|
+
* Raw text output is required (same rationale as Claude adapter).
|
|
8786
8832
|
*/
|
|
8787
8833
|
buildCommand(prompt, options) {
|
|
8788
|
-
const args = ["exec"
|
|
8834
|
+
const args = ["exec"];
|
|
8789
8835
|
if (options.additionalFlags && options.additionalFlags.length > 0) args.push(...options.additionalFlags);
|
|
8790
8836
|
const envEntries = {};
|
|
8791
8837
|
if (options.apiKey) envEntries.OPENAI_API_KEY = options.apiKey;
|
|
@@ -8822,7 +8868,10 @@ var CodexCLIAdapter = class {
|
|
|
8822
8868
|
};
|
|
8823
8869
|
}
|
|
8824
8870
|
/**
|
|
8825
|
-
* Parse Codex CLI
|
|
8871
|
+
* Parse Codex CLI output into a TaskResult.
|
|
8872
|
+
*
|
|
8873
|
+
* With raw text mode (no --json), stdout is the agent's direct output.
|
|
8874
|
+
* YAML extraction happens in the dispatcher's extractYamlBlock, not here.
|
|
8826
8875
|
*/
|
|
8827
8876
|
parseOutput(stdout, stderr, exitCode) {
|
|
8828
8877
|
if (exitCode !== 0) return {
|
|
@@ -8831,41 +8880,11 @@ var CodexCLIAdapter = class {
|
|
|
8831
8880
|
error: stderr || `Process exited with code ${String(exitCode)}`,
|
|
8832
8881
|
exitCode
|
|
8833
8882
|
};
|
|
8834
|
-
|
|
8883
|
+
return {
|
|
8835
8884
|
success: true,
|
|
8836
|
-
output:
|
|
8885
|
+
output: stdout,
|
|
8837
8886
|
exitCode
|
|
8838
8887
|
};
|
|
8839
|
-
try {
|
|
8840
|
-
const parsed = JSON.parse(stdout.trim());
|
|
8841
|
-
const success = parsed.status === "success" || parsed.status === "completed" || parsed.status === void 0 && !parsed.error;
|
|
8842
|
-
const inputTokens = parsed.tokens?.input ?? 0;
|
|
8843
|
-
const outputTokens = parsed.tokens?.output ?? 0;
|
|
8844
|
-
const totalTokens = parsed.tokens?.total ?? inputTokens + outputTokens;
|
|
8845
|
-
const hasTokens = inputTokens > 0 || outputTokens > 0;
|
|
8846
|
-
const tokensUsed = hasTokens ? {
|
|
8847
|
-
input: inputTokens,
|
|
8848
|
-
output: outputTokens,
|
|
8849
|
-
total: totalTokens
|
|
8850
|
-
} : void 0;
|
|
8851
|
-
const executionTime = parsed.executionTime;
|
|
8852
|
-
return {
|
|
8853
|
-
success: success && !parsed.error,
|
|
8854
|
-
output: parsed.output ?? parsed.result ?? stdout,
|
|
8855
|
-
...parsed.error ? { error: parsed.error } : {},
|
|
8856
|
-
exitCode,
|
|
8857
|
-
metadata: {
|
|
8858
|
-
...executionTime !== void 0 ? { executionTime } : {},
|
|
8859
|
-
...tokensUsed !== void 0 ? { tokensUsed } : {}
|
|
8860
|
-
}
|
|
8861
|
-
};
|
|
8862
|
-
} catch {
|
|
8863
|
-
return {
|
|
8864
|
-
success: true,
|
|
8865
|
-
output: stdout,
|
|
8866
|
-
exitCode
|
|
8867
|
-
};
|
|
8868
|
-
}
|
|
8869
8888
|
}
|
|
8870
8889
|
/**
|
|
8871
8890
|
* Parse Codex plan generation output.
|
|
@@ -8951,7 +8970,8 @@ var CodexCLIAdapter = class {
|
|
|
8951
8970
|
"debug",
|
|
8952
8971
|
"analyze"
|
|
8953
8972
|
],
|
|
8954
|
-
supportedLanguages: ["*"]
|
|
8973
|
+
supportedLanguages: ["*"],
|
|
8974
|
+
timeoutMultiplier: 3
|
|
8955
8975
|
};
|
|
8956
8976
|
}
|
|
8957
8977
|
_buildPlanningPrompt(request) {
|
|
@@ -10243,4 +10263,4 @@ async function callLLM(params) {
|
|
|
10243
10263
|
|
|
10244
10264
|
//#endregion
|
|
10245
10265
|
export { ADVISORY_NOTES, AdapterRegistry, AdtError, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, Categorizer, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, ConsumerAnalyzer, CostTrackerConfigSchema, DEFAULT_CONFIG, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, DoltNotInstalled, DoltQueryError, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, GeminiCLIAdapter, GlobalSettingsSchema, IngestionServer, LogTurnAnalyzer, ModelRoutingConfigSchema, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProviderPolicySchema, ProvidersSchema, Recommender, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TASK_TYPE_PHASE_MAP, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryConfigSchema, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, VersionManagerImpl, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, callLLM, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createDoltClient, createExperimenter, createPipelineRun, createRequirement, createVersionManager, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
10246
|
-
//# sourceMappingURL=dist-
|
|
10266
|
+
//# sourceMappingURL=dist-CGOpItka.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-CGOpItka.js";
|
|
2
2
|
|
|
3
3
|
//#region src/core/errors.ts
|
|
4
4
|
/** Error thrown when task configuration is invalid */
|
|
@@ -71,4 +71,4 @@ var TaskGraphIncompatibleFormatError = class extends AdtError {
|
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
73
|
export { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError };
|
|
74
|
-
//# sourceMappingURL=errors-
|
|
74
|
+
//# sourceMappingURL=errors-DBkOZgD4.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-
|
|
1
|
+
import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-CGOpItka.js";
|
|
2
2
|
|
|
3
3
|
export { createExperimenter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-
|
|
2
|
+
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-CGOpItka.js";
|
|
3
3
|
import { createRequire } from "module";
|
|
4
4
|
import { dirname, join } from "path";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1930,4 +1930,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
1930
1930
|
|
|
1931
1931
|
//#endregion
|
|
1932
1932
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN$1 as STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createStateStore, detectCycles, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, runHealthAction, validateStoryKey };
|
|
1933
|
-
//# sourceMappingURL=health-
|
|
1933
|
+
//# sourceMappingURL=health-CS3SJ2JD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-
|
|
1
|
+
import { DEFAULT_STALL_THRESHOLD_SECONDS, getAllDescendantPids, getAutoHealthData, inspectProcessTree, isOrchestratorProcessLine, registerHealthCommand, runHealthAction } from "./health-CS3SJ2JD.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
3
|
+
import "./dist-CGOpItka.js";
|
|
4
4
|
import "./decisions-C0pz9Clx.js";
|
|
5
5
|
|
|
6
6
|
export { inspectProcessTree };
|
package/dist/index.d.ts
CHANGED
|
@@ -840,6 +840,13 @@ interface AdapterCapabilities$1 {
|
|
|
840
840
|
supportedTaskTypes: string[];
|
|
841
841
|
/** Programming languages the agent supports */
|
|
842
842
|
supportedLanguages: string[];
|
|
843
|
+
/**
|
|
844
|
+
* Timeout multiplier relative to default dispatch timeouts.
|
|
845
|
+
* Agents that are slower (e.g., Codex) declare a multiplier > 1.0
|
|
846
|
+
* so the dispatcher scales timeouts automatically.
|
|
847
|
+
* Default: 1.0 (no scaling).
|
|
848
|
+
*/
|
|
849
|
+
timeoutMultiplier?: number;
|
|
843
850
|
}
|
|
844
851
|
/**
|
|
845
852
|
* Result returned from an adapter health check.
|
|
@@ -1211,7 +1218,11 @@ declare class CodexCLIAdapter implements WorkerAdapter$1 {
|
|
|
1211
1218
|
healthCheck(): Promise<AdapterHealthResult$1>;
|
|
1212
1219
|
/**
|
|
1213
1220
|
* Build spawn command for a coding task.
|
|
1214
|
-
* Uses: `codex exec
|
|
1221
|
+
* Uses: `codex exec` with prompt delivered via stdin.
|
|
1222
|
+
*
|
|
1223
|
+
* Do NOT use --json: it produces a JSONL event stream that prevents
|
|
1224
|
+
* extractYamlBlock from finding the structured result block in stdout.
|
|
1225
|
+
* Raw text output is required (same rationale as Claude adapter).
|
|
1215
1226
|
*/
|
|
1216
1227
|
buildCommand(prompt: string, options: AdapterOptions$1): SpawnCommand$1;
|
|
1217
1228
|
/**
|
|
@@ -1220,7 +1231,10 @@ declare class CodexCLIAdapter implements WorkerAdapter$1 {
|
|
|
1220
1231
|
*/
|
|
1221
1232
|
buildPlanningCommand(request: PlanRequest$1, options: AdapterOptions$1): SpawnCommand$1;
|
|
1222
1233
|
/**
|
|
1223
|
-
* Parse Codex CLI
|
|
1234
|
+
* Parse Codex CLI output into a TaskResult.
|
|
1235
|
+
*
|
|
1236
|
+
* With raw text mode (no --json), stdout is the agent's direct output.
|
|
1237
|
+
* YAML extraction happens in the dispatcher's extractYamlBlock, not here.
|
|
1224
1238
|
*/
|
|
1225
1239
|
parseOutput(stdout: string, stderr: string, exitCode: number): TaskResult$2;
|
|
1226
1240
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { childLogger, createLogger, logger } from "./logger-KeHncl-f.js";
|
|
2
2
|
import { assertDefined, createEventBus, createTuiApp, deepClone, formatDuration, generateId, isPlainObject, isTuiCapable, printNonTtyWarning, sleep, withRetry } from "./helpers-CElYrONe.js";
|
|
3
|
-
import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-
|
|
3
|
+
import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-CGOpItka.js";
|
|
4
4
|
import "./adapter-registry-DXLMTmfD.js";
|
|
5
|
-
import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-
|
|
5
|
+
import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-DBkOZgD4.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/di.ts
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-
|
|
1
|
+
import { ModelRoutingConfigSchema, ProviderPolicySchema, RoutingConfigError, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, TASK_TYPE_PHASE_MAP, getModelTier, loadModelRoutingConfig } from "./dist-CGOpItka.js";
|
|
2
2
|
import "./routing-CcBOCuC9.js";
|
|
3
3
|
|
|
4
4
|
export { loadModelRoutingConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, detectCycles, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, resolveMainRepoRoot, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, DoltMergeConflict, FileStateStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, WorkGraphRepository, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, detectCycles, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, resolveMainRepoRoot, validateStoryKey } from "./health-CS3SJ2JD.js";
|
|
2
2
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
3
3
|
import { TypedEventBusImpl, createEventBus, createTuiApp, isTuiCapable, printNonTtyWarning, sleep } from "./helpers-CElYrONe.js";
|
|
4
|
-
import { ADVISORY_NOTES, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-
|
|
4
|
+
import { ADVISORY_NOTES, Categorizer, ConsumerAnalyzer, DEFAULT_GLOBAL_SETTINGS, DispatcherImpl, DoltClient, ESCALATION_DIAGNOSIS, EXPERIMENT_RESULT, EfficiencyScorer, IngestionServer, LogTurnAnalyzer, OPERATIONAL_FINDING, Recommender, RoutingRecommender, RoutingResolver, RoutingTelemetry, RoutingTokenAccumulator, RoutingTuner, STORY_METRICS, STORY_OUTCOME, SubstrateConfigSchema, TEST_EXPANSION_FINDING, TEST_PLAN, TelemetryNormalizer, TelemetryPipeline, TurnAnalyzer, addTokenUsage, aggregateTokenUsageForRun, aggregateTokenUsageForStory, callLLM, createConfigSystem, createDatabaseAdapter$1, createDecision, createPipelineRun, createRequirement, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-CGOpItka.js";
|
|
5
5
|
import { basename, dirname, extname, join } from "path";
|
|
6
6
|
import { access, readFile, readdir, stat } from "fs/promises";
|
|
7
7
|
import { EventEmitter } from "node:events";
|
|
@@ -41648,4 +41648,4 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
|
|
|
41648
41648
|
|
|
41649
41649
|
//#endregion
|
|
41650
41650
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GitClient, GrammarLoader, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
|
|
41651
|
-
//# sourceMappingURL=run-
|
|
41651
|
+
//# sourceMappingURL=run-BbZay3p0.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-CS3SJ2JD.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
|
-
import "./dist-
|
|
5
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-
|
|
4
|
+
import "./dist-CGOpItka.js";
|
|
5
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, runRunAction } from "./run-BbZay3p0.js";
|
|
6
6
|
import "./routing-CcBOCuC9.js";
|
|
7
7
|
import "./decisions-C0pz9Clx.js";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-CGOpItka.js";
|
|
2
2
|
import "./version-manager-impl-BmOWu8ml.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-DaP1jFb9.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-CGOpItka.js";
|
|
2
2
|
import { execSync, spawn } from "child_process";
|
|
3
3
|
import * as readline from "readline";
|
|
4
4
|
|
|
@@ -123,4 +123,4 @@ function registerUpgradeCommand(program) {
|
|
|
123
123
|
|
|
124
124
|
//#endregion
|
|
125
125
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
126
|
-
//# sourceMappingURL=upgrade-
|
|
126
|
+
//# sourceMappingURL=upgrade-DaP1jFb9.js.map
|
package/package.json
CHANGED