substrate-ai 0.20.148 → 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.
@@ -1,4 +1,4 @@
1
- import { AdtError } from "./dist-CZk5SeSt.js";
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-_tbIg6Cv.js.map
74
+ //# sourceMappingURL=errors-1xcRMTz_.js.map
@@ -1,3 +1,3 @@
1
- import { buildAuditLogEntry, buildBranchName, buildModificationDirective, buildPRBody, buildWorktreePath, createExperimenter, determineVerdict, resolvePromptFile } from "./dist-CZk5SeSt.js";
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-Aqc5cghP.js";
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-CZk5SeSt.js";
4
- import "./manifest-read-D6NAZgt8.js";
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-CZk5SeSt.js";
3
- import { resolveMainRepoRoot, resolveRunManifest } from "./manifest-read-D6NAZgt8.js";
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-Aqc5cghP.js.map
1003
+ //# sourceMappingURL=health-CcOYQsgZ.js.map
@@ -290,8 +290,18 @@ declare const SubstrateConfigSchema: z.ZodObject<{
290
290
  }, z.core.$strict>>;
291
291
  worktree: z.ZodOptional<z.ZodObject<{
292
292
  copy_files: z.ZodDefault<z.ZodArray<z.ZodString>>;
293
+ base: z.ZodOptional<z.ZodEnum<{
294
+ "in-repo": "in-repo";
295
+ external: "external";
296
+ }>>;
293
297
  }, z.core.$strict>>;
294
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>>;
295
305
  finalization: z.ZodOptional<z.ZodObject<{
296
306
  mode: z.ZodOptional<z.ZodEnum<{
297
307
  merge: "merge";
@@ -856,6 +866,15 @@ interface SpawnCommand {
856
866
  stdin?: string;
857
867
  /** Optional timeout in milliseconds */
858
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';
859
878
  }
860
879
  /**
861
880
  * Options passed to adapter methods for each invocation.
@@ -905,6 +924,13 @@ interface AdapterOptions {
905
924
  taskType?: string;
906
925
  /** Dispatch context: unique dispatch ID for per-dispatch telemetry correlation */
907
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';
908
934
  }
909
935
  /**
910
936
  * Capabilities reported by an adapter for this CLI agent.
@@ -1596,4 +1622,4 @@ interface Recommendation {
1596
1622
 
1597
1623
  //#endregion
1598
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 };
1599
- //# sourceMappingURL=index-CvNLhgKV.d.ts.map
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-CvNLhgKV.js";
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";
@@ -1080,6 +1086,13 @@ declare const SubstrateConfigSchema: z.ZodObject<{
1080
1086
  }>>;
1081
1087
  epic_gate_command: z.ZodOptional<z.ZodString>;
1082
1088
  }, z.core.$strict>>;
1089
+ worktree: z.ZodOptional<z.ZodObject<{
1090
+ copy_files: z.ZodDefault<z.ZodArray<z.ZodString>>;
1091
+ base: z.ZodOptional<z.ZodEnum<{
1092
+ "in-repo": "in-repo";
1093
+ external: "external";
1094
+ }>>;
1095
+ }, z.core.$strict>>;
1083
1096
  }, z.core.$strict>;
1084
1097
  type SubstrateConfig = z.infer<typeof SubstrateConfigSchema>;
1085
1098
 
@@ -2158,6 +2171,15 @@ interface SpawnCommand {
2158
2171
  stdin?: string;
2159
2172
  /** Optional timeout in milliseconds */
2160
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';
2161
2183
  }
2162
2184
  /**
2163
2185
  * Options passed to adapter methods for each invocation.
@@ -2207,6 +2229,13 @@ interface AdapterOptions {
2207
2229
  taskType?: string;
2208
2230
  /** Dispatch context: unique dispatch ID for per-dispatch telemetry correlation */
2209
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';
2210
2239
  }
2211
2240
  /**
2212
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-CZk5SeSt.js";
4
- import "./adapter-registry-DIcrxjH8.js";
5
- import { BudgetExceededError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError } from "./errors-_tbIg6Cv.js";
3
+ import { AdapterRegistry, AdtError, ClaudeCodeAdapter, CodexCLIAdapter, ConfigError, ConfigIncompatibleFormatError, GeminiCLIAdapter } from "./dist-C6pEdj12.js";
4
+ import "./adapter-registry-DXLMTmfD.js";
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-D6NAZgt8.js";
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-BLkX0iE_.js.map
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-CZk5SeSt.js";
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-D6NAZgt8.js.map
6303
+ //# sourceMappingURL=manifest-read-8oNapRvD.js.map
@@ -1,6 +1,6 @@
1
1
  import "../../logger-KeHncl-f.js";
2
- import "../../dist-CZk5SeSt.js";
3
- import "../../manifest-read-D6NAZgt8.js";
4
- import { runInteractivePrompt } from "../../interactive-prompt-BLkX0iE_.js";
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-CZk5SeSt.js";
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 };