substrate-ai 0.3.6 → 0.3.7

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.
@@ -0,0 +1,3 @@
1
+ import { AdapterRegistry } from "./adapter-registry-rSOJ9Kvz.js";
2
+
3
+ export { AdapterRegistry };
@@ -56,14 +56,14 @@ var ClaudeCodeAdapter = class {
56
56
  }
57
57
  /**
58
58
  * Build spawn command for a coding task.
59
- * Uses: `claude -p <prompt> --model <model> --dangerously-skip-permissions --system-prompt <minimal>`
59
+ * Uses: `claude -p --model <model> --dangerously-skip-permissions --system-prompt <minimal>`
60
+ * Prompt is delivered via stdin (not CLI arg) to avoid E2BIG on large prompts.
60
61
  */
61
62
  buildCommand(prompt, options) {
62
63
  const model = options.model ?? DEFAULT_MODEL$1;
63
64
  const systemPrompt = "You are an autonomous coding agent executing a single pipeline task. Ignore all session startup context, memory notes, and \"Next Up\" indicators. Follow the instructions in the user message exactly. Emit ONLY the YAML output specified in the Output Contract — no other text.";
64
65
  const args = [
65
66
  "-p",
66
- prompt,
67
67
  "--model",
68
68
  model,
69
69
  "--dangerously-skip-permissions",
@@ -103,7 +103,6 @@ var ClaudeCodeAdapter = class {
103
103
  const planningPrompt = this._buildPlanningPrompt(request);
104
104
  const args = [
105
105
  "-p",
106
- planningPrompt,
107
106
  "--model",
108
107
  model
109
108
  ];
@@ -825,4 +824,4 @@ var AdapterRegistry = class {
825
824
 
826
825
  //#endregion
827
826
  export { AdapterRegistry, ClaudeCodeAdapter, CodexCLIAdapter, GeminiCLIAdapter };
828
- //# sourceMappingURL=adapter-registry-a2WX0qo_.js.map
827
+ //# sourceMappingURL=adapter-registry-rSOJ9Kvz.js.map
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltNotInstalled, FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-DzzmgEOd.js";
2
+ import { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltNotInstalled, FileStateStore, IngestionServer, SUBSTRATE_OWNED_SETTINGS_KEYS, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runSolutioningPhase, validateStopAfterFromConflict } from "../run-N7voPS_k.js";
3
3
  import { createLogger } from "../logger-D2fS2ccL.js";
4
- import { AdapterRegistry } from "../adapter-registry-a2WX0qo_.js";
4
+ import { AdapterRegistry } from "../adapter-registry-rSOJ9Kvz.js";
5
5
  import { CURRENT_CONFIG_FORMAT_VERSION, CURRENT_TASK_GRAPH_VERSION, PartialSubstrateConfigSchema } from "../config-migrator-DtZW1maj.js";
6
6
  import { ConfigError, createEventBus } from "../helpers-BihqWgVe.js";
7
7
  import { addTokenUsage, createDecision, createPipelineRun, getDecisionsByCategory, getDecisionsByPhaseForRun, getLatestRun, getTokenUsageSummary, listRequirements, updatePipelineRun } from "../decisions-CdpiJIm5.js";
@@ -1197,6 +1197,19 @@ async function runFullPipelineFromPhase(options) {
1197
1197
  }
1198
1198
  if (outputFormat === "human") process.stdout.write(`[SOLUTIONING] Complete\n`);
1199
1199
  } else if (currentPhase === "implementation") {
1200
+ let telemetryEnabled = false;
1201
+ let telemetryPort = 4318;
1202
+ try {
1203
+ const configSystem = createConfigSystem({ projectConfigDir: dbDir });
1204
+ await configSystem.load();
1205
+ const cfg = configSystem.getConfig();
1206
+ if (cfg.telemetry?.enabled === true) {
1207
+ telemetryEnabled = true;
1208
+ telemetryPort = cfg.telemetry.port ?? 4318;
1209
+ }
1210
+ } catch {}
1211
+ const ingestionServer = telemetryEnabled ? new IngestionServer({ port: telemetryPort }) : void 0;
1212
+ const telemetryPersistence = telemetryEnabled ? new TelemetryPersistence(db) : void 0;
1200
1213
  const orchestrator = createImplementationOrchestrator({
1201
1214
  db,
1202
1215
  pack,
@@ -1208,7 +1221,9 @@ async function runFullPipelineFromPhase(options) {
1208
1221
  maxReviewCycles: 2,
1209
1222
  pipelineRunId: runId
1210
1223
  },
1211
- projectRoot
1224
+ projectRoot,
1225
+ ...ingestionServer !== void 0 ? { ingestionServer } : {},
1226
+ ...telemetryPersistence !== void 0 ? { telemetryPersistence } : {}
1212
1227
  });
1213
1228
  eventBus.on("orchestrator:story-phase-complete", (payload) => {
1214
1229
  try {
@@ -2284,7 +2299,7 @@ function defaultSupervisorDeps() {
2284
2299
  if (cached === null) {
2285
2300
  const { AdapterRegistry: AR } = await import(
2286
2301
  /* @vite-ignore */
2287
- "../adapter-registry-BBn0Rmqj.js"
2302
+ "../adapter-registry-CctHT8ZH.js"
2288
2303
  );
2289
2304
  cached = new AR();
2290
2305
  await cached.discoverAndRegister();
@@ -2681,7 +2696,7 @@ async function runSupervisorAction(options, deps = {}) {
2681
2696
  const expDb = expDbWrapper.db;
2682
2697
  const { runRunAction: runPipeline } = await import(
2683
2698
  /* @vite-ignore */
2684
- "../run-D3rMGI6c.js"
2699
+ "../run-C_hKt2wY.js"
2685
2700
  );
2686
2701
  const runStoryFn = async (opts) => {
2687
2702
  const exitCode = await runPipeline({
package/dist/index.d.ts CHANGED
@@ -1783,7 +1783,8 @@ declare class ClaudeCodeAdapter implements WorkerAdapter {
1783
1783
  healthCheck(): Promise<AdapterHealthResult>;
1784
1784
  /**
1785
1785
  * Build spawn command for a coding task.
1786
- * Uses: `claude -p <prompt> --model <model> --dangerously-skip-permissions --system-prompt <minimal>`
1786
+ * Uses: `claude -p --model <model> --dangerously-skip-permissions --system-prompt <minimal>`
1787
+ * Prompt is delivered via stdin (not CLI arg) to avoid E2BIG on large prompts.
1787
1788
  */
1788
1789
  buildCommand(prompt: string, options: AdapterOptions): SpawnCommand;
1789
1790
  /**
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { childLogger, createLogger, logger } from "./logger-D2fS2ccL.js";
2
- import { AdapterRegistry, ClaudeCodeAdapter, CodexCLIAdapter, GeminiCLIAdapter } from "./adapter-registry-a2WX0qo_.js";
2
+ import { AdapterRegistry, ClaudeCodeAdapter, CodexCLIAdapter, GeminiCLIAdapter } from "./adapter-registry-rSOJ9Kvz.js";
3
3
  import { AdtError, BudgetExceededError, ConfigError, ConfigIncompatibleFormatError, GitError, RecoveryError, TaskConfigError, TaskGraphCycleError, TaskGraphError, TaskGraphIncompatibleFormatError, WorkerError, WorkerNotFoundError, assertDefined, createEventBus, createTuiApp, deepClone, formatDuration, generateId, isPlainObject, isTuiCapable, printNonTtyWarning, sleep, withRetry } from "./helpers-BihqWgVe.js";
4
4
 
5
5
  //#region src/core/di.ts
@@ -1,4 +1,4 @@
1
- import { registerRunCommand, runRunAction } from "./run-DzzmgEOd.js";
1
+ import { registerRunCommand, runRunAction } from "./run-N7voPS_k.js";
2
2
  import "./logger-D2fS2ccL.js";
3
3
  import "./config-migrator-DtZW1maj.js";
4
4
  import "./helpers-BihqWgVe.js";
@@ -18649,5 +18649,5 @@ function registerRunCommand(program, _version = "0.0.0", projectRoot = process.c
18649
18649
  }
18650
18650
 
18651
18651
  //#endregion
18652
- export { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltNotInstalled, FileStateStore, SUBSTRATE_OWNED_SETTINGS_KEYS, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
18653
- //# sourceMappingURL=run-DzzmgEOd.js.map
18652
+ export { DEFAULT_CONFIG, DEFAULT_ROUTING_POLICY, DatabaseWrapper, DoltNotInstalled, FileStateStore, IngestionServer, SUBSTRATE_OWNED_SETTINGS_KEYS, TelemetryPersistence, VALID_PHASES, buildPipelineStatusOutput, checkDoltInstalled, createConfigSystem, createContextCompiler, createDispatcher, createDoltClient, createImplementationOrchestrator, createPackLoader, createPhaseOrchestrator, createStateStore, createStopAfterGate, findPackageRoot, formatOutput, formatPhaseCompletionSummary, formatPipelineStatusHuman, formatPipelineSummary, formatTokenTelemetry, getAllDescendantPids, getAutoHealthData, getSubstrateDefaultSettings, initializeDolt, parseDbTimestampAsUtc, registerHealthCommand, registerRunCommand, resolveBmadMethodSrcPath, resolveBmadMethodVersion, resolveMainRepoRoot, resolveStoryKeys, runAnalysisPhase, runMigrations, runPlanningPhase, runRunAction, runSolutioningPhase, validateStopAfterFromConflict };
18653
+ //# sourceMappingURL=run-N7voPS_k.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "substrate-ai",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Substrate — multi-agent orchestration daemon for AI coding agents",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -72,6 +72,12 @@
72
72
  "substrate-ai": "^0.1.22",
73
73
  "zod": "^4.3.6"
74
74
  },
75
+ "optionalDependencies": {
76
+ "tree-sitter": "^0.21.1",
77
+ "tree-sitter-typescript": "^0.21.2",
78
+ "tree-sitter-javascript": "^0.21.4",
79
+ "tree-sitter-python": "^0.21.0"
80
+ },
75
81
  "devDependencies": {
76
82
  "@eslint/js": "^9.17.0",
77
83
  "@types/js-yaml": "^4.0.9",
@@ -223,6 +223,7 @@ prompts:
223
223
  readiness-check: prompts/readiness-check.md
224
224
  # Test plan prompt (Story 25-7)
225
225
  test-plan: prompts/test-plan.md
226
+ test-expansion: prompts/test-expansion.md
226
227
 
227
228
  constraints:
228
229
  create-story: constraints/create-story.yaml
@@ -1,3 +0,0 @@
1
- import { AdapterRegistry } from "./adapter-registry-a2WX0qo_.js";
2
-
3
- export { AdapterRegistry };