substrate-ai 0.20.149 → 0.20.150
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-DPE1OgrZ.js +4 -0
- package/dist/cli/index.js +17 -15
- package/dist/{decisions-De43bvYq.js → decisions-7ALaVvR9.js} +1 -1
- package/dist/{dist-C2CAZDep.js → dist-C6pEdj12.js} +74 -10
- package/dist/{errors-Db8EIM9w.js → errors-1xcRMTz_.js} +2 -2
- package/dist/{experimenter-Dm5jUPO6.js → experimenter-CRt7RrrW.js} +1 -1
- package/dist/{health-WGcvcIYK.js → health-Bhwd_HX9.js} +3 -3
- package/dist/{health-ByQadq3J.js → health-CcOYQsgZ.js} +3 -3
- package/dist/{index-DxeIRBBf.d.ts → index-CnV5PcSR.d.ts} +23 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +2 -2
- package/dist/{interactive-prompt-CMBlj6UF.js → interactive-prompt-BVTTIU3t.js} +2 -2
- package/dist/{manifest-read-knD2uWkz.js → manifest-read-8oNapRvD.js} +2 -2
- package/dist/modules/interactive-prompt/index.js +3 -3
- package/dist/{routing-B3sgH5MZ.js → routing-BCXJlbUS.js} +1 -1
- package/dist/{run-BAUlPom3.js → run-B9lhuahO.js} +16 -9
- package/dist/{run-CtIc7_rK.js → run-B_G9KCd-.js} +5 -5
- package/dist/src/modules/recovery-engine/index.d.ts +1 -1
- package/dist/{upgrade-B3iamwjO.js → upgrade-CT6TGMup.js} +2 -2
- package/dist/{upgrade-DOmKCyOY.js → upgrade-DcvPseav.js} +2 -2
- package/dist/{version-manager-impl-DizCvYy8.js → version-manager-impl-zazA11ph.js} +1 -1
- package/package.json +1 -1
- package/dist/adapter-registry-CauYNA1U.js +0 -4
package/dist/cli/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-
|
|
2
|
+
import { FileKvStore, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, buildPipelineStatusOutput, createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion } from "../health-CcOYQsgZ.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, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createGitWorktreeManager, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-
|
|
5
|
+
import { AdapterRegistry, BudgetConfigSchema, CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, ConfigError, CostTrackerConfigSchema, DEFAULT_CONFIG, DoltClient, DoltNotInstalled, GlobalSettingsSchema, InMemoryDatabaseAdapter, IngestionServer, MonitorDatabaseImpl, OPERATIONAL_FINDING, PartialGlobalSettingsSchema, PartialProviderConfigSchema, ProvidersSchema, RoutingRecommender, STORY_METRICS, TelemetryConfigSchema, addTokenUsage, aggregateTokenUsageForRun, checkDoltInstalled, compareRunMetrics, createAmendmentRun, createConfigSystem, createDecision, createGitWorktreeManager, createPipelineRun, createStderrLogger, getActiveDecisions, getAllCostEntriesFiltered, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRunMetrics, loadParentRunDecisions, supersedeDecision, swallowDebug, tagRunAsBaseline, updatePipelineRun } from "../dist-C6pEdj12.js";
|
|
6
6
|
import "../adapter-registry-DXLMTmfD.js";
|
|
7
|
-
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-
|
|
8
|
-
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-
|
|
9
|
-
import "../errors-
|
|
7
|
+
import { RunManifest, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, parseRuntimeProbes, readCurrentRunId, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck } from "../manifest-read-8oNapRvD.js";
|
|
8
|
+
import { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR, GitClient, GrammarLoader, Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runSolutioningPhase, unescape, validateStopAfterFromConflict } from "../run-B9lhuahO.js";
|
|
9
|
+
import "../errors-1xcRMTz_.js";
|
|
10
10
|
import "../routing-DFxoKHDt.js";
|
|
11
11
|
import { WorkGraphRepository } from "../work-graph-repository-DZyJv5pV.js";
|
|
12
12
|
import "../decisions-CzSIEeGP.js";
|
|
13
13
|
import "../decision-router-BAPpON_C.js";
|
|
14
|
-
import "../interactive-prompt-
|
|
14
|
+
import "../interactive-prompt-BVTTIU3t.js";
|
|
15
15
|
import "../recovery-engine-BKGBeBnW.js";
|
|
16
16
|
import "../version-manager-impl-qFBiO4Eh.js";
|
|
17
|
-
import { registerUpgradeCommand } from "../upgrade-
|
|
17
|
+
import { registerUpgradeCommand } from "../upgrade-DcvPseav.js";
|
|
18
18
|
import { Command } from "commander";
|
|
19
19
|
import { fileURLToPath } from "url";
|
|
20
20
|
import { dirname, join, resolve } from "path";
|
|
@@ -624,6 +624,7 @@ const SubstrateConfigSchema = z.object({
|
|
|
624
624
|
supervisor_poll_interval_seconds: z.number().int().positive().optional(),
|
|
625
625
|
retry_budget: z.number().int().positive().optional(),
|
|
626
626
|
epics_path: z.string().optional(),
|
|
627
|
+
dispatch: z.object({ permission_profile: z.enum(["skip", "scoped"]).optional() }).strict().optional(),
|
|
627
628
|
finalization: z.object({
|
|
628
629
|
mode: z.enum([
|
|
629
630
|
"merge",
|
|
@@ -656,6 +657,7 @@ const PartialSubstrateConfigSchema = z.object({
|
|
|
656
657
|
supervisor_poll_interval_seconds: z.number().int().positive().optional(),
|
|
657
658
|
retry_budget: z.number().int().positive().optional(),
|
|
658
659
|
epics_path: z.string().optional(),
|
|
660
|
+
dispatch: z.object({ permission_profile: z.enum(["skip", "scoped"]).optional() }).strict().optional(),
|
|
659
661
|
finalization: z.object({
|
|
660
662
|
mode: z.enum([
|
|
661
663
|
"merge",
|
|
@@ -7078,7 +7080,7 @@ async function runStatusAction(options) {
|
|
|
7078
7080
|
logger$15.debug({ err }, "Work graph query failed, continuing without work graph data");
|
|
7079
7081
|
}
|
|
7080
7082
|
if (run === void 0) {
|
|
7081
|
-
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-
|
|
7083
|
+
const { inspectProcessTree: inspectProcessTree$1 } = await import("../health-Bhwd_HX9.js");
|
|
7082
7084
|
const substrateDirPath = join(projectRoot, ".substrate");
|
|
7083
7085
|
const processInfo = inspectProcessTree$1({
|
|
7084
7086
|
projectRoot,
|
|
@@ -8026,7 +8028,7 @@ function defaultSupervisorDeps() {
|
|
|
8026
8028
|
if (cached === null) {
|
|
8027
8029
|
const { AdapterRegistry: AR } = await import(
|
|
8028
8030
|
/* @vite-ignore */
|
|
8029
|
-
"../adapter-registry-
|
|
8031
|
+
"../adapter-registry-DPE1OgrZ.js"
|
|
8030
8032
|
);
|
|
8031
8033
|
cached = new AR();
|
|
8032
8034
|
await cached.discoverAndRegister();
|
|
@@ -8593,11 +8595,11 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8593
8595
|
try {
|
|
8594
8596
|
const { createExperimenter } = await import(
|
|
8595
8597
|
/* @vite-ignore */
|
|
8596
|
-
"../experimenter-
|
|
8598
|
+
"../experimenter-CRt7RrrW.js"
|
|
8597
8599
|
);
|
|
8598
8600
|
const { getLatestRun: getLatest } = await import(
|
|
8599
8601
|
/* @vite-ignore */
|
|
8600
|
-
"../decisions-
|
|
8602
|
+
"../decisions-7ALaVvR9.js"
|
|
8601
8603
|
);
|
|
8602
8604
|
const expAdapter = createDatabaseAdapter({
|
|
8603
8605
|
backend: "auto",
|
|
@@ -8607,7 +8609,7 @@ async function runSupervisorAction(options, deps = {}) {
|
|
|
8607
8609
|
await initSchema(expAdapter);
|
|
8608
8610
|
const { runRunAction: runPipeline } = await import(
|
|
8609
8611
|
/* @vite-ignore */
|
|
8610
|
-
"../run-
|
|
8612
|
+
"../run-B_G9KCd-.js"
|
|
8611
8613
|
);
|
|
8612
8614
|
const runStoryFn = async (opts) => {
|
|
8613
8615
|
const exitCode = await runPipeline({
|
|
@@ -9132,7 +9134,7 @@ async function runMetricsAction(options) {
|
|
|
9132
9134
|
const routingConfigPath = join(dbDir, "routing.yml");
|
|
9133
9135
|
let routingConfig = null;
|
|
9134
9136
|
if (existsSync$1(routingConfigPath)) try {
|
|
9135
|
-
const { loadModelRoutingConfig } = await import("../routing-
|
|
9137
|
+
const { loadModelRoutingConfig } = await import("../routing-BCXJlbUS.js");
|
|
9136
9138
|
routingConfig = loadModelRoutingConfig(routingConfigPath);
|
|
9137
9139
|
} catch {}
|
|
9138
9140
|
if (routingConfig === null) routingConfig = {
|
|
@@ -13458,8 +13460,8 @@ async function createProgram() {
|
|
|
13458
13460
|
/** Fire-and-forget startup version check (story 8.3, AC3/AC5) */
|
|
13459
13461
|
function checkForUpdatesInBackground(currentVersion) {
|
|
13460
13462
|
if (process.env.SUBSTRATE_NO_UPDATE_CHECK === "1") return;
|
|
13461
|
-
import("../upgrade-
|
|
13462
|
-
const { createVersionManager } = await import("../version-manager-impl-
|
|
13463
|
+
import("../upgrade-CT6TGMup.js").then(async () => {
|
|
13464
|
+
const { createVersionManager } = await import("../version-manager-impl-zazA11ph.js");
|
|
13463
13465
|
const vm = createVersionManager();
|
|
13464
13466
|
const result = await vm.checkForUpdates();
|
|
13465
13467
|
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-C6pEdj12.js";
|
|
2
2
|
import "./decisions-CzSIEeGP.js";
|
|
3
3
|
|
|
4
4
|
export { getLatestRun };
|
|
@@ -4,6 +4,7 @@ import { EventEmitter } from "node:events";
|
|
|
4
4
|
import yaml, { dump, load } from "js-yaml";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { exec, execFile, execSync, spawn, spawnSync } from "node:child_process";
|
|
7
|
+
import * as path$3 from "node:path";
|
|
7
8
|
import * as path$2 from "node:path";
|
|
8
9
|
import * as path$1 from "node:path";
|
|
9
10
|
import path, { dirname as dirname$1, join as join$1, resolve as resolve$1 } from "node:path";
|
|
@@ -1302,7 +1303,8 @@ var DispatcherImpl = class {
|
|
|
1302
1303
|
...storyKey !== void 0 ? { storyKey } : {},
|
|
1303
1304
|
...optimizationDirectives !== void 0 ? { optimizationDirectives } : {},
|
|
1304
1305
|
taskType,
|
|
1305
|
-
dispatchId: id
|
|
1306
|
+
dispatchId: id,
|
|
1307
|
+
...this._config.permissionProfile !== void 0 ? { permissionProfile: this._config.permissionProfile } : {}
|
|
1306
1308
|
});
|
|
1307
1309
|
const baseTimeoutMs = timeout ?? this._config.defaultTimeouts[taskType] ?? DEFAULT_TIMEOUTS[taskType] ?? 3e5;
|
|
1308
1310
|
const timeoutMultiplier = capabilities.timeoutMultiplier ?? 1;
|
|
@@ -1314,6 +1316,29 @@ var DispatcherImpl = class {
|
|
|
1314
1316
|
env["GIT_CEILING_DIRECTORIES"] = dirname$1(worktreePath);
|
|
1315
1317
|
if (cmd.env !== void 0) Object.assign(env, cmd.env);
|
|
1316
1318
|
if (cmd.unsetEnvKeys !== void 0) for (const key of cmd.unsetEnvKeys) delete env[key];
|
|
1319
|
+
if (cmd.executionMode !== void 0 && cmd.executionMode !== "spawn") {
|
|
1320
|
+
this._logger.error({
|
|
1321
|
+
id,
|
|
1322
|
+
agent,
|
|
1323
|
+
executionMode: cmd.executionMode
|
|
1324
|
+
}, "dispatch rejected: execution mode not implemented");
|
|
1325
|
+
this._running.delete(id);
|
|
1326
|
+
this._drainQueue();
|
|
1327
|
+
resolve$2({
|
|
1328
|
+
id,
|
|
1329
|
+
status: "failed",
|
|
1330
|
+
exitCode: -1,
|
|
1331
|
+
output: "",
|
|
1332
|
+
parsed: null,
|
|
1333
|
+
parseError: `executionMode "${cmd.executionMode}" is not implemented — only 'spawn' is available (H4.4 seam)`,
|
|
1334
|
+
durationMs: 0,
|
|
1335
|
+
tokenEstimate: {
|
|
1336
|
+
input: Math.ceil(prompt.length / CHARS_PER_TOKEN$3),
|
|
1337
|
+
output: 0
|
|
1338
|
+
}
|
|
1339
|
+
});
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1317
1342
|
const proc = spawn(cmd.binary, cmd.args, {
|
|
1318
1343
|
cwd: cmd.cwd,
|
|
1319
1344
|
env,
|
|
@@ -6302,6 +6327,7 @@ const SubstrateConfigSchema = z.object({
|
|
|
6302
6327
|
telemetry: TelemetryConfigSchema.optional(),
|
|
6303
6328
|
worktree: WorktreeConfigSchema.optional(),
|
|
6304
6329
|
trivialOutputThreshold: z.number().int().nonnegative().optional(),
|
|
6330
|
+
dispatch: z.object({ permission_profile: z.enum(["skip", "scoped"]).optional() }).strict().optional(),
|
|
6305
6331
|
finalization: z.object({
|
|
6306
6332
|
mode: z.enum([
|
|
6307
6333
|
"merge",
|
|
@@ -6328,6 +6354,7 @@ const PartialSubstrateConfigSchema = z.object({
|
|
|
6328
6354
|
telemetry: TelemetryConfigSchema.partial().optional(),
|
|
6329
6355
|
worktree: WorktreeConfigSchema.partial().optional(),
|
|
6330
6356
|
trivialOutputThreshold: z.number().int().nonnegative().optional(),
|
|
6357
|
+
dispatch: z.object({ permission_profile: z.enum(["skip", "scoped"]).optional() }).strict().optional(),
|
|
6331
6358
|
finalization: z.object({
|
|
6332
6359
|
mode: z.enum([
|
|
6333
6360
|
"merge",
|
|
@@ -6668,8 +6695,8 @@ function readEnvOverrides(logger) {
|
|
|
6668
6695
|
/**
|
|
6669
6696
|
* Get a value from a nested object using dot-notation key.
|
|
6670
6697
|
*/
|
|
6671
|
-
function getByPath(obj, path$
|
|
6672
|
-
const parts = path$
|
|
6698
|
+
function getByPath(obj, path$4) {
|
|
6699
|
+
const parts = path$4.split(".");
|
|
6673
6700
|
let cursor = obj;
|
|
6674
6701
|
for (const part of parts) {
|
|
6675
6702
|
if (cursor === null || cursor === void 0 || typeof cursor !== "object") return void 0;
|
|
@@ -6681,8 +6708,8 @@ function getByPath(obj, path$3) {
|
|
|
6681
6708
|
* Return a deep clone of `obj` with `path` set to `value`.
|
|
6682
6709
|
* Creates intermediate objects as needed.
|
|
6683
6710
|
*/
|
|
6684
|
-
function setByPath(obj, path$
|
|
6685
|
-
const parts = path$
|
|
6711
|
+
function setByPath(obj, path$4, value) {
|
|
6712
|
+
const parts = path$4.split(".");
|
|
6686
6713
|
const result = { ...obj };
|
|
6687
6714
|
let cursor = result;
|
|
6688
6715
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
@@ -9528,6 +9555,40 @@ function checkAdapterVersionCompat(adapterName, actualVersion, tested) {
|
|
|
9528
9555
|
//#endregion
|
|
9529
9556
|
//#region packages/core/dist/adapters/claude-adapter.js
|
|
9530
9557
|
const execAsync$2 = promisify(exec);
|
|
9558
|
+
/**
|
|
9559
|
+
* H4.3: generate the per-worktree Claude Code settings file for the
|
|
9560
|
+
* 'scoped' permission profile. Written NEXT TO the worktree (its parent
|
|
9561
|
+
* directory — the worktree base, outside any repo after H4.2) so it can
|
|
9562
|
+
* never be committed by commit-first.
|
|
9563
|
+
*
|
|
9564
|
+
* Rules: reads/search/bash allowed everywhere (verification needs the
|
|
9565
|
+
* suite + git); file MUTATION allowed only under the worktree — anything
|
|
9566
|
+
* else falls to "ask", which headless -p mode denies visibly (there is no
|
|
9567
|
+
* interactive prompt to stall on).
|
|
9568
|
+
*/
|
|
9569
|
+
function writeScopedPermissionSettings(worktreePath) {
|
|
9570
|
+
const wt = path$3.resolve(worktreePath);
|
|
9571
|
+
const settings = { permissions: {
|
|
9572
|
+
allow: [
|
|
9573
|
+
"Read",
|
|
9574
|
+
"Glob",
|
|
9575
|
+
"Grep",
|
|
9576
|
+
"Bash",
|
|
9577
|
+
"WebFetch",
|
|
9578
|
+
"WebSearch",
|
|
9579
|
+
"TodoWrite",
|
|
9580
|
+
"Task",
|
|
9581
|
+
`Edit(${wt}/**)`,
|
|
9582
|
+
`Write(${wt}/**)`,
|
|
9583
|
+
`NotebookEdit(${wt}/**)`
|
|
9584
|
+
],
|
|
9585
|
+
deny: []
|
|
9586
|
+
} };
|
|
9587
|
+
const settingsPath = path$3.join(path$3.dirname(wt), `.agent-settings-${path$3.basename(wt)}.json`);
|
|
9588
|
+
mkdirSync(path$3.dirname(settingsPath), { recursive: true });
|
|
9589
|
+
writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
9590
|
+
return settingsPath;
|
|
9591
|
+
}
|
|
9531
9592
|
/** Default model used when none is specified */
|
|
9532
9593
|
const DEFAULT_MODEL$1 = "claude-sonnet-4-6";
|
|
9533
9594
|
/**
|
|
@@ -9650,9 +9711,12 @@ var ClaudeCodeAdapter = class ClaudeCodeAdapter {
|
|
|
9650
9711
|
const args = [
|
|
9651
9712
|
"-p",
|
|
9652
9713
|
"--model",
|
|
9653
|
-
model
|
|
9654
|
-
"--dangerously-skip-permissions"
|
|
9714
|
+
model
|
|
9655
9715
|
];
|
|
9716
|
+
if (options.permissionProfile === "scoped") {
|
|
9717
|
+
const settingsPath = writeScopedPermissionSettings(options.worktreePath);
|
|
9718
|
+
args.push("--permission-mode", "acceptEdits", "--settings", settingsPath);
|
|
9719
|
+
} else args.push("--dangerously-skip-permissions");
|
|
9656
9720
|
args.push("--output-format", "stream-json", "--verbose");
|
|
9657
9721
|
if (options.additionalFlags && options.additionalFlags.length > 0) args.push(...options.additionalFlags);
|
|
9658
9722
|
const systemPromptParts = [BASE_SYSTEM_PROMPT];
|
|
@@ -11974,9 +12038,9 @@ var VersionManagerImpl = class {
|
|
|
11974
12038
|
try {
|
|
11975
12039
|
const _require = createRequire(import.meta.url);
|
|
11976
12040
|
const fs = _require("fs");
|
|
11977
|
-
const path$
|
|
12041
|
+
const path$4 = _require("path");
|
|
11978
12042
|
const yaml$1 = _require("js-yaml");
|
|
11979
|
-
const configPath = path$
|
|
12043
|
+
const configPath = path$4.join(process.cwd(), ".substrate", "config.yaml");
|
|
11980
12044
|
try {
|
|
11981
12045
|
const raw = fs.readFileSync(configPath, "utf-8");
|
|
11982
12046
|
configObj = yaml$1.load(raw) ?? {};
|
|
@@ -12531,4 +12595,4 @@ async function callLLM(params) {
|
|
|
12531
12595
|
|
|
12532
12596
|
//#endregion
|
|
12533
12597
|
export { ADVISORY_NOTES, AdapterRegistry, AdtError, BRANCH_PREFIX, BudgetConfigSchema, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, 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, InMemoryDatabaseAdapter, IngestionServer, LEARNING_FINDING, 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, classifyVersionGap, compareRunMetrics, createAmendmentRun, createConfigSystem, createDatabaseAdapter as createDatabaseAdapter$1, createDecision, createExperimenter, createGitWorktreeManager, createPipelineRun, createRequirement, createStderrLogger, createVersionManager, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, determineVerdict, getActiveDecisions, getAllCostEntriesFiltered, getArtifactByTypeForRun, getArtifactsByRun, getBaselineRunMetrics, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestCompletedRun, getLatestRun, getModelTier, getPipelineRunById, getPlanningCostTotal, getRetryableEscalations, getRunMetrics, getRunningPipelineRuns, getSessionCostSummary, getSessionCostSummaryFiltered, getStoryMetricsForRun, getTokenUsageSummary, incrementRunRestarts, initSchema, initWorkGraphSchema, initializeDolt, listRequirements, listRunMetrics, loadModelRoutingConfig, loadParentRunDecisions, registerArtifact, resolvePromptFile, supersedeDecision, swallowDebug, tagRunAsBaseline, updateDecision, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics };
|
|
12534
|
-
//# sourceMappingURL=dist-
|
|
12598
|
+
//# sourceMappingURL=dist-C6pEdj12.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdtError } from "./dist-
|
|
1
|
+
import { AdtError } from "./dist-C6pEdj12.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-1xcRMTz_.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-C6pEdj12.js";
|
|
2
2
|
|
|
3
3
|
export { createExperimenter };
|
|
@@ -1,7 +1,7 @@
|
|
|
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-CcOYQsgZ.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
|
-
import "./dist-
|
|
4
|
-
import "./manifest-read-
|
|
3
|
+
import "./dist-C6pEdj12.js";
|
|
4
|
+
import "./manifest-read-8oNapRvD.js";
|
|
5
5
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
6
6
|
import "./decisions-CzSIEeGP.js";
|
|
7
7
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-
|
|
3
|
-
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-
|
|
2
|
+
import { DoltClient, DoltQueryError, createDatabaseAdapter$1 as createDatabaseAdapter, getLatestRun, getPipelineRunById, initSchema } from "./dist-C6pEdj12.js";
|
|
3
|
+
import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-8oNapRvD.js";
|
|
4
4
|
import { createRequire } from "module";
|
|
5
5
|
import { dirname, join } from "path";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1000,4 +1000,4 @@ function registerHealthCommand(program, _version = "0.0.0", projectRoot = proces
|
|
|
1000
1000
|
|
|
1001
1001
|
//#endregion
|
|
1002
1002
|
export { BMAD_BASELINE_TOKENS_FULL, DEFAULT_STALL_THRESHOLD_SECONDS, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, SUBSTRATE_OWNED_SETTINGS_KEYS, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter$1 as createDatabaseAdapter, createDoltOperatorReader, findPackageRoot, formatOutput, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, inspectProcessTree, isOrchestratorProcessLine, parseDbTimestampAsUtc, registerHealthCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, runHealthAction, validateStoryKey };
|
|
1003
|
-
//# sourceMappingURL=health-
|
|
1003
|
+
//# sourceMappingURL=health-CcOYQsgZ.js.map
|
|
@@ -296,6 +296,12 @@ declare const SubstrateConfigSchema: z.ZodObject<{
|
|
|
296
296
|
}>>;
|
|
297
297
|
}, z.core.$strict>>;
|
|
298
298
|
trivialOutputThreshold: z.ZodOptional<z.ZodNumber>;
|
|
299
|
+
dispatch: z.ZodOptional<z.ZodObject<{
|
|
300
|
+
permission_profile: z.ZodOptional<z.ZodEnum<{
|
|
301
|
+
skip: "skip";
|
|
302
|
+
scoped: "scoped";
|
|
303
|
+
}>>;
|
|
304
|
+
}, z.core.$strict>>;
|
|
299
305
|
finalization: z.ZodOptional<z.ZodObject<{
|
|
300
306
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
301
307
|
merge: "merge";
|
|
@@ -860,6 +866,15 @@ interface SpawnCommand {
|
|
|
860
866
|
stdin?: string;
|
|
861
867
|
/** Optional timeout in milliseconds */
|
|
862
868
|
timeoutMs?: number;
|
|
869
|
+
/**
|
|
870
|
+
* H4.4 (container-ready seam): how this command is executed.
|
|
871
|
+
* 'spawn' (default, and the only implemented mode) = child_process.spawn on
|
|
872
|
+
* the host. 'container' is RESERVED for a future backend that runs the
|
|
873
|
+
* agent in a container with the worktree bind-mounted at the same path —
|
|
874
|
+
* the dispatcher MUST reject it until that backend exists. Mirrors the
|
|
875
|
+
* direct-API adapter design's `executionMode: 'spawn' | 'direct'` seam.
|
|
876
|
+
*/
|
|
877
|
+
executionMode?: 'spawn' | 'container';
|
|
863
878
|
}
|
|
864
879
|
/**
|
|
865
880
|
* Options passed to adapter methods for each invocation.
|
|
@@ -909,6 +924,13 @@ interface AdapterOptions {
|
|
|
909
924
|
taskType?: string;
|
|
910
925
|
/** Dispatch context: unique dispatch ID for per-dispatch telemetry correlation */
|
|
911
926
|
dispatchId?: string;
|
|
927
|
+
/**
|
|
928
|
+
* H4.3: permission profile for the spawned agent. 'skip' (default) uses
|
|
929
|
+
* --dangerously-skip-permissions; 'scoped' generates a per-worktree
|
|
930
|
+
* settings file (mutation allowed only under the worktree) and runs with
|
|
931
|
+
* --permission-mode acceptEdits. Config: `dispatch.permission_profile`.
|
|
932
|
+
*/
|
|
933
|
+
permissionProfile?: 'skip' | 'scoped';
|
|
912
934
|
}
|
|
913
935
|
/**
|
|
914
936
|
* Capabilities reported by an adapter for this CLI agent.
|
|
@@ -1600,4 +1622,4 @@ interface Recommendation {
|
|
|
1600
1622
|
|
|
1601
1623
|
//#endregion
|
|
1602
1624
|
export { AdapterDiscoveryResult, AdapterRegistry as AdapterRegistry$1, AdtError as AdtError$1, ClaudeCodeAdapter as ClaudeCodeAdapter$1, CodexCLIAdapter as CodexCLIAdapter$1, ConfigError as ConfigError$1, ConfigIncompatibleFormatError as ConfigIncompatibleFormatError$1, CoreEvents, DatabaseAdapter, DiscoveryReport, GeminiCLIAdapter as GeminiCLIAdapter$1, Recommendation, TypedEventBus };
|
|
1603
|
-
//# sourceMappingURL=index-
|
|
1625
|
+
//# sourceMappingURL=index-CnV5PcSR.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdapterDiscoveryResult, AdapterRegistry$1 as AdapterRegistry, AdtError$1 as AdtError, ClaudeCodeAdapter$1 as ClaudeCodeAdapter, CodexCLIAdapter$1 as CodexCLIAdapter, ConfigError$1 as ConfigError, ConfigIncompatibleFormatError$1 as ConfigIncompatibleFormatError, DiscoveryReport, GeminiCLIAdapter$1 as GeminiCLIAdapter, Recommendation, TypedEventBus } from "./index-
|
|
1
|
+
import { AdapterDiscoveryResult, AdapterRegistry$1 as AdapterRegistry, AdtError$1 as AdtError, ClaudeCodeAdapter$1 as ClaudeCodeAdapter, CodexCLIAdapter$1 as CodexCLIAdapter, ConfigError$1 as ConfigError, ConfigIncompatibleFormatError$1 as ConfigIncompatibleFormatError, DiscoveryReport, GeminiCLIAdapter$1 as GeminiCLIAdapter, Recommendation, TypedEventBus } from "./index-CnV5PcSR.js";
|
|
2
2
|
import pino from "pino";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { Readable, Writable } from "node:stream";
|
|
@@ -1068,6 +1068,12 @@ declare const SubstrateConfigSchema: z.ZodObject<{
|
|
|
1068
1068
|
supervisor_poll_interval_seconds: z.ZodOptional<z.ZodNumber>;
|
|
1069
1069
|
retry_budget: z.ZodOptional<z.ZodNumber>;
|
|
1070
1070
|
epics_path: z.ZodOptional<z.ZodString>;
|
|
1071
|
+
dispatch: z.ZodOptional<z.ZodObject<{
|
|
1072
|
+
permission_profile: z.ZodOptional<z.ZodEnum<{
|
|
1073
|
+
skip: "skip";
|
|
1074
|
+
scoped: "scoped";
|
|
1075
|
+
}>>;
|
|
1076
|
+
}, z.core.$strict>>;
|
|
1071
1077
|
finalization: z.ZodOptional<z.ZodObject<{
|
|
1072
1078
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
1073
1079
|
merge: "merge";
|
|
@@ -2165,6 +2171,15 @@ interface SpawnCommand {
|
|
|
2165
2171
|
stdin?: string;
|
|
2166
2172
|
/** Optional timeout in milliseconds */
|
|
2167
2173
|
timeoutMs?: number;
|
|
2174
|
+
/**
|
|
2175
|
+
* H4.4 (container-ready seam): how this command is executed.
|
|
2176
|
+
* 'spawn' (default, and the only implemented mode) = child_process.spawn on
|
|
2177
|
+
* the host. 'container' is RESERVED for a future backend that runs the
|
|
2178
|
+
* agent in a container with the worktree bind-mounted at the same path —
|
|
2179
|
+
* the dispatcher MUST reject it until that backend exists. Mirrors the
|
|
2180
|
+
* direct-API adapter design's `executionMode: 'spawn' | 'direct'` seam.
|
|
2181
|
+
*/
|
|
2182
|
+
executionMode?: 'spawn' | 'container';
|
|
2168
2183
|
}
|
|
2169
2184
|
/**
|
|
2170
2185
|
* Options passed to adapter methods for each invocation.
|
|
@@ -2214,6 +2229,13 @@ interface AdapterOptions {
|
|
|
2214
2229
|
taskType?: string;
|
|
2215
2230
|
/** Dispatch context: unique dispatch ID for per-dispatch telemetry correlation */
|
|
2216
2231
|
dispatchId?: string;
|
|
2232
|
+
/**
|
|
2233
|
+
* H4.3: permission profile for the spawned agent. 'skip' (default) uses
|
|
2234
|
+
* --dangerously-skip-permissions; 'scoped' generates a per-worktree
|
|
2235
|
+
* settings file (mutation allowed only under the worktree) and runs with
|
|
2236
|
+
* --permission-mode acceptEdits. Config: `dispatch.permission_profile`.
|
|
2237
|
+
*/
|
|
2238
|
+
permissionProfile?: 'skip' | 'scoped';
|
|
2217
2239
|
}
|
|
2218
2240
|
/**
|
|
2219
2241
|
* Capabilities reported by an adapter for this CLI agent.
|
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-C6pEdj12.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-1xcRMTz_.js";
|
|
6
6
|
|
|
7
7
|
//#region src/core/di.ts
|
|
8
8
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-
|
|
2
|
+
import { readCurrentRunId, resolveMainRepoRoot } from "./manifest-read-8oNapRvD.js";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
5
|
import * as readline from "node:readline";
|
|
@@ -180,4 +180,4 @@ async function runInteractivePrompt(decisionContext) {
|
|
|
180
180
|
|
|
181
181
|
//#endregion
|
|
182
182
|
export { runInteractivePrompt };
|
|
183
|
-
//# sourceMappingURL=interactive-prompt-
|
|
183
|
+
//# sourceMappingURL=interactive-prompt-BVTTIU3t.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from "./logger-KeHncl-f.js";
|
|
2
|
-
import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-
|
|
2
|
+
import { LEARNING_FINDING, createDecision, getDecisionsByCategory } from "./dist-C6pEdj12.js";
|
|
3
3
|
import * as path$1 from "path";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { readFile } from "fs/promises";
|
|
@@ -6300,4 +6300,4 @@ async function resolveRunManifest(dbRoot, runId) {
|
|
|
6300
6300
|
|
|
6301
6301
|
//#endregion
|
|
6302
6302
|
export { FindingsInjector, RunManifest, RuntimeProbeListSchema, SupervisorLock, ZERO_FINDINGS_BY_AUTHOR, ZERO_FINDING_COUNTS, ZERO_PROBE_AUTHOR_METRICS, aggregateProbeAuthorMetrics, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, readCurrentRunId, renderFindings, resolveGraphPath, resolveMainRepoRoot, resolveRunManifest, rollupFindingCounts, rollupFindingsByAuthor, rollupProbeAuthorByClass, rollupProbeAuthorMetrics, runAcTraceabilityCheck, runStaleVerificationRecovery };
|
|
6303
|
-
//# sourceMappingURL=manifest-read-
|
|
6303
|
+
//# sourceMappingURL=manifest-read-8oNapRvD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../logger-KeHncl-f.js";
|
|
2
|
-
import "../../dist-
|
|
3
|
-
import "../../manifest-read-
|
|
4
|
-
import { runInteractivePrompt } from "../../interactive-prompt-
|
|
2
|
+
import "../../dist-C6pEdj12.js";
|
|
3
|
+
import "../../manifest-read-8oNapRvD.js";
|
|
4
|
+
import { runInteractivePrompt } from "../../interactive-prompt-BVTTIU3t.js";
|
|
5
5
|
|
|
6
6
|
export { runInteractivePrompt };
|
|
@@ -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-C6pEdj12.js";
|
|
2
2
|
import "./routing-DFxoKHDt.js";
|
|
3
3
|
|
|
4
4
|
export { loadModelRoutingConfig };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-
|
|
1
|
+
import { BMAD_BASELINE_TOKENS_FULL, FileKvStore, STOP_AFTER_VALID_PHASES, STORY_KEY_PATTERN, VALID_PHASES, __commonJS, __require, __toESM, buildPipelineStatusOutput, createDatabaseAdapter, formatOutput, formatPipelineSummary, formatTokenTelemetry, inspectProcessTree, parseDbTimestampAsUtc, validateStoryKey } from "./health-CcOYQsgZ.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, BRANCH_PREFIX, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, 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, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createGitWorktreeManager, createPipelineRun, createRequirement, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-
|
|
5
|
-
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-
|
|
4
|
+
import { ADVISORY_NOTES, BRANCH_PREFIX, CLAUDE_AUTH_FAILURE_HINT, CODEX_SANDBOX_BLOCK_HINT, 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, classifyVersionGap, createConfigSystem, createDatabaseAdapter$1, createDecision, createGitWorktreeManager, createPipelineRun, createRequirement, detectClaudeAuthFailure, detectCodexSandboxBlock, detectInterfaceChanges, getArtifactByTypeForRun, getArtifactsByRun, getDecisionsByCategory, getDecisionsByPhase, getDecisionsByPhaseForRun, getLatestRun, getPipelineRunById, getRunMetrics, getRunningPipelineRuns, getStoryMetricsForRun, getTokenUsageSummary, initSchema, listRequirements, loadModelRoutingConfig, registerArtifact, swallowDebug, updatePipelineRun, updatePipelineRunConfig, upsertDecision, writeRunMetrics, writeStoryMetrics } from "./dist-C6pEdj12.js";
|
|
5
|
+
import { FindingsInjector, RunManifest, RuntimeProbeListSchema, applyConfigToGraph, createDefaultVerificationPipeline, createGraphOrchestrator, createSdlcCodeReviewHandler, createSdlcCreateStoryHandler, createSdlcDevStoryHandler, createSdlcPhaseHandler, detectsEventDrivenAC, detectsStateIntegratingAC, extractTargetFilesFromStoryContent, parseRuntimeProbes, renderFindings, resolveGraphPath, resolveMainRepoRoot, runAcTraceabilityCheck, runStaleVerificationRecovery } from "./manifest-read-8oNapRvD.js";
|
|
6
6
|
import { WorkGraphRepository, detectCycles } from "./work-graph-repository-DZyJv5pV.js";
|
|
7
7
|
import { deriveExitCode, routeDecision } from "./decision-router-BAPpON_C.js";
|
|
8
|
-
import { runInteractivePrompt } from "./interactive-prompt-
|
|
8
|
+
import { runInteractivePrompt } from "./interactive-prompt-BVTTIU3t.js";
|
|
9
9
|
import { runRecoveryEngine } from "./recovery-engine-BKGBeBnW.js";
|
|
10
10
|
import { basename, dirname, extname, join } from "path";
|
|
11
11
|
import { access, readFile, readdir, stat } from "fs/promises";
|
|
@@ -46317,6 +46317,7 @@ async function runRunAction(options) {
|
|
|
46317
46317
|
let configFinalizationMode;
|
|
46318
46318
|
let configMergeStrategy;
|
|
46319
46319
|
let configEpicGateCommand;
|
|
46320
|
+
let configPermissionProfile;
|
|
46320
46321
|
let configWorktreeCopyFiles;
|
|
46321
46322
|
try {
|
|
46322
46323
|
const configSystem = createConfigSystem({ projectConfigDir: dbDir });
|
|
@@ -46346,6 +46347,7 @@ async function runRunAction(options) {
|
|
|
46346
46347
|
if (cfg.finalization?.mode !== void 0) configFinalizationMode = cfg.finalization.mode;
|
|
46347
46348
|
if (cfg.finalization?.merge_strategy !== void 0) configMergeStrategy = cfg.finalization.merge_strategy;
|
|
46348
46349
|
if (cfg.finalization?.epic_gate_command !== void 0) configEpicGateCommand = cfg.finalization.epic_gate_command;
|
|
46350
|
+
if (cfg.dispatch?.permission_profile !== void 0) configPermissionProfile = cfg.dispatch.permission_profile;
|
|
46349
46351
|
if (Array.isArray(cfg.worktree?.copy_files) && cfg.worktree.copy_files.length > 0) {
|
|
46350
46352
|
configWorktreeCopyFiles = [...cfg.worktree.copy_files];
|
|
46351
46353
|
logger.info({ copyFiles: configWorktreeCopyFiles }, "Loaded worktree.copy_files from config");
|
|
@@ -46448,6 +46450,7 @@ async function runRunAction(options) {
|
|
|
46448
46450
|
...finalization !== void 0 ? { finalizationMode: finalization } : configFinalizationMode !== void 0 ? { finalizationMode: configFinalizationMode } : {},
|
|
46449
46451
|
...configMergeStrategy !== void 0 ? { mergeStrategy: configMergeStrategy } : {},
|
|
46450
46452
|
...configEpicGateCommand !== void 0 ? { epicGateCommand: configEpicGateCommand } : {},
|
|
46453
|
+
...configPermissionProfile !== void 0 ? { permissionProfile: configPermissionProfile } : {},
|
|
46451
46454
|
...configWorktreeCopyFiles !== void 0 ? { worktreeCopyFiles: configWorktreeCopyFiles } : {}
|
|
46452
46455
|
});
|
|
46453
46456
|
let storyKeys = [...parsedStoryKeys];
|
|
@@ -46696,7 +46699,8 @@ async function runRunAction(options) {
|
|
|
46696
46699
|
adapterRegistry: injectedRegistry,
|
|
46697
46700
|
config: {
|
|
46698
46701
|
routingResolver,
|
|
46699
|
-
...dispatchTimeouts ? { defaultTimeouts: dispatchTimeouts } : {}
|
|
46702
|
+
...dispatchTimeouts ? { defaultTimeouts: dispatchTimeouts } : {},
|
|
46703
|
+
...configPermissionProfile !== void 0 ? { permissionProfile: configPermissionProfile } : {}
|
|
46700
46704
|
}
|
|
46701
46705
|
});
|
|
46702
46706
|
eventBus.on("orchestrator:story-phase-complete", (payload) => {
|
|
@@ -47237,7 +47241,7 @@ async function runRunAction(options) {
|
|
|
47237
47241
|
}
|
|
47238
47242
|
}
|
|
47239
47243
|
async function runFullPipeline(options) {
|
|
47240
|
-
const { packName, packPath, dbDir, dbPath, startPhase, stopAfter, concept, concurrency, outputFormat, projectRoot, events: eventsFlag, skipUx, research: researchFlag, skipResearch: skipResearchFlag, skipPreflight, skipVerification, maxReviewCycles = 2, retryBudget, registry: injectedRegistry, tokenCeilings, stories: explicitStories, telemetryEnabled: fullTelemetryEnabled, telemetryPort: fullTelemetryPort, agentId, meshUrl: fpMeshUrl, meshProjectId: fpMeshProjectId, engineType: fpEngineType, probeAuthor, probeAuthorStateIntegrating: fpProbeAuthorStateIntegrating, noWorktree, worktreeCopyFiles: fpWorktreeCopyFiles, finalizationMode: fpFinalizationMode, mergeStrategy: fpMergeStrategy, epicGateCommand: fpEpicGateCommand } = options;
|
|
47244
|
+
const { packName, packPath, dbDir, dbPath, startPhase, stopAfter, concept, concurrency, outputFormat, projectRoot, events: eventsFlag, skipUx, research: researchFlag, skipResearch: skipResearchFlag, skipPreflight, skipVerification, maxReviewCycles = 2, retryBudget, registry: injectedRegistry, tokenCeilings, stories: explicitStories, telemetryEnabled: fullTelemetryEnabled, telemetryPort: fullTelemetryPort, agentId, meshUrl: fpMeshUrl, meshProjectId: fpMeshProjectId, engineType: fpEngineType, probeAuthor, probeAuthorStateIntegrating: fpProbeAuthorStateIntegrating, noWorktree, worktreeCopyFiles: fpWorktreeCopyFiles, finalizationMode: fpFinalizationMode, mergeStrategy: fpMergeStrategy, epicGateCommand: fpEpicGateCommand, permissionProfile: fpPermissionProfile } = options;
|
|
47241
47245
|
if (!existsSync$1(dbDir)) mkdirSync$1(dbDir, { recursive: true });
|
|
47242
47246
|
let doltServerFull = null;
|
|
47243
47247
|
try {
|
|
@@ -47278,7 +47282,10 @@ async function runFullPipeline(options) {
|
|
|
47278
47282
|
const dispatcher = createDispatcher({
|
|
47279
47283
|
eventBus,
|
|
47280
47284
|
adapterRegistry: injectedRegistry,
|
|
47281
|
-
config: {
|
|
47285
|
+
config: {
|
|
47286
|
+
routingResolver,
|
|
47287
|
+
...fpPermissionProfile !== void 0 ? { permissionProfile: fpPermissionProfile } : {}
|
|
47288
|
+
}
|
|
47282
47289
|
});
|
|
47283
47290
|
const phaseDeps = {
|
|
47284
47291
|
db: adapter,
|
|
@@ -47720,7 +47727,7 @@ async function runFullPipeline(options) {
|
|
|
47720
47727
|
*/
|
|
47721
47728
|
async function emitPreDispatchVersionAdvisory(currentVersion) {
|
|
47722
47729
|
if (process.env["SUBSTRATE_NO_UPDATE_CHECK"] === "1") return;
|
|
47723
|
-
const { createVersionManager } = await import("./version-manager-impl-
|
|
47730
|
+
const { createVersionManager } = await import("./version-manager-impl-zazA11ph.js");
|
|
47724
47731
|
const vm = createVersionManager();
|
|
47725
47732
|
const result = await vm.checkForUpdates(true);
|
|
47726
47733
|
const gap = classifyVersionGap(currentVersion, result.latestVersion);
|
|
@@ -47827,4 +47834,4 @@ function registerRunCommand(program, version = "0.0.0", projectRoot = process.cw
|
|
|
47827
47834
|
|
|
47828
47835
|
//#endregion
|
|
47829
47836
|
export { AdapterTelemetryPersistence, AppError, DoltRepoMapMetaRepository, DoltSymbolRepository, ERR_REPO_MAP_STORAGE_WRITE, EpicIngester, GLOBSTAR$1 as GLOBSTAR, GitClient, GrammarLoader, Minimatch$1 as Minimatch, Minipass, RepoMapInjector, RepoMapModule, RepoMapQueryEngine, RepoMapStorage, SymbolParser, createContextCompiler, createDispatcher, createEventEmitter, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStopAfterGate, createTelemetryAdvisor, escape$1 as escape, formatPhaseCompletionSummary, getFactoryRunSummaries, getScenarioResultsForRun, getTwinRunsForRun, listGraphRuns, normalizeGraphSummaryToStatus, registerExportCommand, registerFactoryCommand, registerRunCommand, registerScenariosCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, resolveStoryKeys, runAnalysisPhase, runPlanningPhase, runProbeAuthor, runRunAction, runSolutioningPhase, unescape$1 as unescape, validateStopAfterFromConflict, wireNdjsonEmitter };
|
|
47830
|
-
//# sourceMappingURL=run-
|
|
47837
|
+
//# sourceMappingURL=run-B9lhuahO.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./health-
|
|
1
|
+
import "./health-CcOYQsgZ.js";
|
|
2
2
|
import "./logger-KeHncl-f.js";
|
|
3
3
|
import "./helpers-CElYrONe.js";
|
|
4
|
-
import "./dist-
|
|
5
|
-
import "./manifest-read-
|
|
6
|
-
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-
|
|
4
|
+
import "./dist-C6pEdj12.js";
|
|
5
|
+
import "./manifest-read-8oNapRvD.js";
|
|
6
|
+
import { normalizeGraphSummaryToStatus, registerRunCommand, resolveMaxReviewCycles, resolveProbeAuthorStateIntegrating, runRunAction, wireNdjsonEmitter } from "./run-B9lhuahO.js";
|
|
7
7
|
import "./routing-DFxoKHDt.js";
|
|
8
8
|
import "./work-graph-repository-DZyJv5pV.js";
|
|
9
9
|
import "./decisions-CzSIEeGP.js";
|
|
10
10
|
import "./decision-router-BAPpON_C.js";
|
|
11
|
-
import "./interactive-prompt-
|
|
11
|
+
import "./interactive-prompt-BVTTIU3t.js";
|
|
12
12
|
import "./recovery-engine-BKGBeBnW.js";
|
|
13
13
|
|
|
14
14
|
export { runRunAction };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-C6pEdj12.js";
|
|
2
2
|
import "./version-manager-impl-qFBiO4Eh.js";
|
|
3
|
-
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-
|
|
3
|
+
import { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand } from "./upgrade-DcvPseav.js";
|
|
4
4
|
|
|
5
5
|
export { isGlobalInstall, registerUpgradeCommand, runUpgradeCommand };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createVersionManager } from "./dist-
|
|
1
|
+
import { createVersionManager } from "./dist-C6pEdj12.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-DcvPseav.js.map
|
package/package.json
CHANGED