@structured-vibe-coding/core 0.20.0 → 0.22.0

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,130 +1,10 @@
1
1
  import {
2
- interpolate,
2
+ callMcpSourceTool
3
+ } from "./chunk-47GWMUCR.js";
4
+ import {
3
5
  interpolateArgs,
4
6
  loadMcpConfig
5
7
  } from "./chunk-4BRO7BOJ.js";
6
- import {
7
- SddError
8
- } from "./chunk-MHODNFIL.js";
9
-
10
- // src/mcp/client.ts
11
- import { Client } from "@modelcontextprotocol/sdk/client/index.js";
12
- import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
13
-
14
- // src/env.ts
15
- function toProcessEnv(base, extra) {
16
- const out = {};
17
- for (const [k, v] of Object.entries(base)) {
18
- if (v !== void 0) out[k] = String(v);
19
- }
20
- if (extra) {
21
- for (const [k, v] of Object.entries(extra)) {
22
- if (v !== void 0) out[k] = String(v);
23
- }
24
- }
25
- return out;
26
- }
27
-
28
- // src/version.ts
29
- var SDD_CORE_VERSION = "0.20.0" ? "0.20.0" : "0.0.0-dev";
30
-
31
- // src/mcp/client.ts
32
- function mcpTimeoutMs() {
33
- const raw = process.env.SDD_MCP_TIMEOUT_MS;
34
- if (raw) {
35
- const n = Number(raw);
36
- if (Number.isFinite(n) && n > 0) return n;
37
- }
38
- return 3e4;
39
- }
40
- function contentToText(result) {
41
- const parts = result.content ?? [];
42
- return parts.map((p) => p.type === "text" ? p.text ?? "" : JSON.stringify(p)).join("\n").trim();
43
- }
44
- async function withTimeout(promise, ms, label) {
45
- let timer;
46
- try {
47
- return await Promise.race([
48
- promise,
49
- new Promise((_, reject) => {
50
- timer = setTimeout(() => {
51
- reject(
52
- new SddError(`MCP ${label} timed out after ${ms}ms`, {
53
- code: "MCP_TIMEOUT",
54
- hint: "Raise SDD_MCP_TIMEOUT_MS or fix the source server."
55
- })
56
- );
57
- }, ms);
58
- })
59
- ]);
60
- } finally {
61
- if (timer) clearTimeout(timer);
62
- }
63
- }
64
- async function withMcpSource(source, projectRoot, fn) {
65
- const vars = { projectRoot };
66
- const cwd = source.cwd ? interpolate(source.cwd, vars) : projectRoot;
67
- const env = toProcessEnv(process.env, {
68
- ...source.env,
69
- SDD_PROJECT_ROOT: projectRoot
70
- });
71
- const transport = new StdioClientTransport({
72
- command: source.command,
73
- args: source.args,
74
- cwd,
75
- env
76
- });
77
- const client = new Client({
78
- name: "sdd-mcp-client",
79
- version: SDD_CORE_VERSION
80
- });
81
- const ms = mcpTimeoutMs();
82
- await withTimeout(client.connect(transport), ms, `connect (${source.id})`);
83
- try {
84
- return await withTimeout(fn(client), ms, `call (${source.id})`);
85
- } finally {
86
- try {
87
- await client.close();
88
- } catch {
89
- }
90
- }
91
- }
92
- async function listMcpSourceTools(source, projectRoot) {
93
- return withMcpSource(source, projectRoot, async (client) => {
94
- const listed = await client.listTools();
95
- return listed.tools.map((t) => ({
96
- name: t.name,
97
- description: t.description
98
- }));
99
- });
100
- }
101
- async function callMcpSourceTool(source, projectRoot, tool, args) {
102
- try {
103
- if (source.tools?.length && !source.tools.includes(tool)) {
104
- return {
105
- ok: false,
106
- text: "",
107
- error: `Tool "${tool}" not in allowlist for source ${source.id}: ${source.tools.join(", ")}`
108
- };
109
- }
110
- return await withMcpSource(source, projectRoot, async (client) => {
111
- const result = await client.callTool({ name: tool, arguments: args });
112
- const text = contentToText(result);
113
- const isError = Boolean(result.isError);
114
- return {
115
- ok: !isError,
116
- text: text || (isError ? "(empty error result)" : "(empty)"),
117
- error: isError ? text || "tool returned isError" : void 0
118
- };
119
- });
120
- } catch (err) {
121
- return {
122
- ok: false,
123
- text: "",
124
- error: err instanceof Error ? err.message : String(err)
125
- };
126
- }
127
- }
128
8
 
129
9
  // src/mcp/match.ts
130
10
  function includesCI(list, value) {
@@ -266,12 +146,6 @@ function listMatchingSourceIds(sources, match) {
266
146
  }
267
147
 
268
148
  export {
269
- toProcessEnv,
270
- SDD_CORE_VERSION,
271
- mcpTimeoutMs,
272
- withMcpSource,
273
- listMcpSourceTools,
274
- callMcpSourceTool,
275
149
  matchMcpSources,
276
150
  explainMatch,
277
151
  gatherMcpContext,
@@ -6,7 +6,7 @@ import {
6
6
  loadConfig,
7
7
  readRole,
8
8
  readTeamConfig
9
- } from "./chunk-HUSXETPS.js";
9
+ } from "./chunk-QE6RMJUS.js";
10
10
  import {
11
11
  buildContext,
12
12
  defaultMemoryDir,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-TNWFMRIA.js";
15
15
  import {
16
16
  SddError
17
- } from "./chunk-MHODNFIL.js";
17
+ } from "./chunk-47GWMUCR.js";
18
18
  import {
19
19
  configPath,
20
20
  guidancePaths,
@@ -4,7 +4,7 @@ import {
4
4
  gitUserName,
5
5
  loadConfig,
6
6
  readTeamConfig
7
- } from "./chunk-HUSXETPS.js";
7
+ } from "./chunk-QE6RMJUS.js";
8
8
  import {
9
9
  ChangeMetaSchema,
10
10
  activeStages,
@@ -137,6 +137,61 @@ function isSubstantiveArtifactContent(content) {
137
137
  const meaningful = stripped.replace(/[-–—_.\s|#*`]/g, "").replace(/\{\{[^}]*\}\}/g, "").replace(/\b(TBD|TODO|N\/A|none|n\/a)\b/gi, "");
138
138
  return meaningful.length >= 32;
139
139
  }
140
+ function h2Title(line) {
141
+ const trimmed = line.trim();
142
+ if (!trimmed.startsWith("##") || trimmed.startsWith("###")) return null;
143
+ const rest = trimmed.slice(2);
144
+ if (!rest.startsWith(" ") && !rest.startsWith(" ")) return null;
145
+ const text = rest.trim();
146
+ return text.length > 0 ? text : null;
147
+ }
148
+ function isTaskStub(line) {
149
+ const text = line.replace(/^\s*(?:[-*+]|\d+\.)\s+/, "").replace(/^\[[ xX]\]\s*/, "").trim();
150
+ return /^Task \d+$/i.test(text);
151
+ }
152
+ function h2Sections(content) {
153
+ const buffers = /* @__PURE__ */ new Map();
154
+ let current = null;
155
+ for (const line of content.split(/\r?\n/)) {
156
+ const title = h2Title(line);
157
+ if (title) {
158
+ current = title;
159
+ if (!buffers.has(current)) buffers.set(current, []);
160
+ continue;
161
+ }
162
+ if (current) buffers.get(current)?.push(line);
163
+ }
164
+ const sections = /* @__PURE__ */ new Map();
165
+ for (const [heading, lines] of buffers) sections.set(heading, lines.join("\n"));
166
+ return sections;
167
+ }
168
+ function sectionHasLine(body) {
169
+ const rawLines = body.split(/\r?\n/);
170
+ for (let i = 0; i < rawLines.length; i++) {
171
+ const line = rawLines[i] ?? "";
172
+ const trimmed = line.trim();
173
+ if (!trimmed || /^Request:/.test(trimmed) || /^#{1,6}\s+/.test(trimmed)) continue;
174
+ if (isTableRow(trimmed)) {
175
+ const next = rawLines[i + 1]?.trim() ?? "";
176
+ if (isSeparatorRow(trimmed) || isSeparatorRow(next)) continue;
177
+ const kept = tableRowToText(trimmed);
178
+ if (!kept || isTaskStub(kept) || isInstructionalLine(kept)) continue;
179
+ return true;
180
+ }
181
+ if (isInstructionalLine(line) || isTaskStub(line)) continue;
182
+ return true;
183
+ }
184
+ return false;
185
+ }
186
+ function headingsFilled(content, headings) {
187
+ if (headings.length === 0) return true;
188
+ const sections = h2Sections(content);
189
+ for (const heading of headings) {
190
+ const body = sections.get(heading);
191
+ if (body === void 0 || !sectionHasLine(body)) return false;
192
+ }
193
+ return true;
194
+ }
140
195
  function incompleteArtifactReason(path, content) {
141
196
  if (content == null) {
142
197
  return `Missing required artifact: ${path}`;
@@ -970,7 +1025,7 @@ async function createChange(input) {
970
1025
  await materializeStageArtifacts(projectRoot, config, id, workflow, meta, firstStage);
971
1026
  await setActiveChange(projectRoot, config, id);
972
1027
  try {
973
- const { refreshActiveAgentContext } = await import("./agents-YN3Z3VOH.js");
1028
+ const { refreshActiveAgentContext } = await import("./agents-EDCIINXG.js");
974
1029
  await refreshActiveAgentContext(projectRoot);
975
1030
  } catch {
976
1031
  }
@@ -1072,7 +1127,7 @@ async function advanceStage(projectRoot, config, changeId, opts) {
1072
1127
  stage2
1073
1128
  );
1074
1129
  try {
1075
- const { refreshActiveAgentContext } = await import("./agents-YN3Z3VOH.js");
1130
+ const { refreshActiveAgentContext } = await import("./agents-EDCIINXG.js");
1076
1131
  await refreshActiveAgentContext(projectRoot);
1077
1132
  } catch {
1078
1133
  }
@@ -1129,7 +1184,7 @@ async function advanceStage(projectRoot, config, changeId, opts) {
1129
1184
  stage
1130
1185
  );
1131
1186
  try {
1132
- const { refreshActiveAgentContext } = await import("./agents-YN3Z3VOH.js");
1187
+ const { refreshActiveAgentContext } = await import("./agents-EDCIINXG.js");
1133
1188
  await refreshActiveAgentContext(projectRoot);
1134
1189
  } catch {
1135
1190
  }
@@ -1262,7 +1317,7 @@ async function completeChange(projectRoot, config, changeId) {
1262
1317
  let promoted;
1263
1318
  if (ctx.meta.workflow === "greenfield" || ctx.meta.flags?.greenfield === true) {
1264
1319
  try {
1265
- const { promoteGreenfieldToMemory: promoteGreenfieldToMemory2 } = await import("./greenfield-O2DI27HY.js");
1320
+ const { promoteGreenfieldToMemory: promoteGreenfieldToMemory2 } = await import("./greenfield-E5CHDQPH.js");
1266
1321
  promoted = await promoteGreenfieldToMemory2(projectRoot, config, changeId);
1267
1322
  } catch {
1268
1323
  }
@@ -1555,6 +1610,8 @@ export {
1555
1610
  assertSessionLogAllowed,
1556
1611
  importSessionMetrics,
1557
1612
  isSubstantiveArtifactContent,
1613
+ h2Title,
1614
+ headingsFilled,
1558
1615
  recordSignoff,
1559
1616
  recordDecisionRequest,
1560
1617
  incompletePriorStageErrors,
@@ -3,9 +3,9 @@ import {
3
3
  gatherMcpContext,
4
4
  gatherMcpContextForChange,
5
5
  listMatchingSourceIds
6
- } from "./chunk-EDXT3RTN.js";
6
+ } from "./chunk-RXVTVLCJ.js";
7
+ import "./chunk-47GWMUCR.js";
7
8
  import "./chunk-4BRO7BOJ.js";
8
- import "./chunk-MHODNFIL.js";
9
9
  import "./chunk-O5SP6X5R.js";
10
10
  export {
11
11
  formatMcpContextForHandoff,
@@ -6,10 +6,11 @@ import {
6
6
  startFeatureFromBacklog,
7
7
  startGreenfield,
8
8
  updateFeatureStatus
9
- } from "./chunk-NY5FFWXG.js";
10
- import "./chunk-HUSXETPS.js";
9
+ } from "./chunk-XHNO536D.js";
10
+ import "./chunk-QE6RMJUS.js";
11
11
  import "./chunk-TNWFMRIA.js";
12
- import "./chunk-MHODNFIL.js";
12
+ import "./chunk-47GWMUCR.js";
13
+ import "./chunk-4BRO7BOJ.js";
13
14
  import "./chunk-O5SP6X5R.js";
14
15
  export {
15
16
  findFeaturesBacklogPath,
package/dist/index.d.ts CHANGED
@@ -1770,6 +1770,8 @@ declare const SearchConfigSchema: z.ZodObject<{
1770
1770
  default: z.ZodDefault<z.ZodNumber>;
1771
1771
  }, z.ZodNumber, "strip">>>;
1772
1772
  exclude: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1773
+ mcp_source: z.ZodOptional<z.ZodString>;
1774
+ mcp_tool: z.ZodOptional<z.ZodString>;
1773
1775
  }, "strip", z.ZodTypeAny, {
1774
1776
  version: 1;
1775
1777
  exclude: string[];
@@ -1781,6 +1783,8 @@ declare const SearchConfigSchema: z.ZodObject<{
1781
1783
  } & {
1782
1784
  [k: string]: number;
1783
1785
  };
1786
+ mcp_source?: string | undefined;
1787
+ mcp_tool?: string | undefined;
1784
1788
  }, {
1785
1789
  version?: 1 | undefined;
1786
1790
  exclude?: string[] | undefined;
@@ -1790,6 +1794,8 @@ declare const SearchConfigSchema: z.ZodObject<{
1790
1794
  budgets?: z.objectInputType<{
1791
1795
  default: z.ZodDefault<z.ZodNumber>;
1792
1796
  }, z.ZodNumber, "strip"> | undefined;
1797
+ mcp_source?: string | undefined;
1798
+ mcp_tool?: string | undefined;
1793
1799
  }>;
1794
1800
  type SearchConfig = z.infer<typeof SearchConfigSchema>;
1795
1801
  declare function budgetForStage(config: SearchConfig, stage: string | undefined): number;
@@ -1821,7 +1827,7 @@ interface SearchHit {
1821
1827
  language: string;
1822
1828
  }
1823
1829
  interface SearchResult {
1824
- provider: "builtin";
1830
+ provider: string;
1825
1831
  warning?: string;
1826
1832
  query: string;
1827
1833
  scope: SearchScope;
@@ -1831,7 +1837,7 @@ interface SearchResult {
1831
1837
  text: string;
1832
1838
  }
1833
1839
  interface IndexStats {
1834
- provider: "builtin";
1840
+ provider: string;
1835
1841
  files: number;
1836
1842
  chunks: number;
1837
1843
  lastIndexFilesConsidered: number;
@@ -1862,7 +1868,7 @@ interface RawHit {
1862
1868
  summary?: string;
1863
1869
  }
1864
1870
 
1865
- declare function searchPreamble(query: string, scope: string, budget: number, hybrid?: boolean): string;
1871
+ declare function searchPreamble(query: string, scope: string, budget: number, hybrid?: boolean, provider?: string): string;
1866
1872
  declare function renderBlock(hit: RawHit, form: "full" | "signature" | "summary"): string;
1867
1873
  declare function packHits(input: {
1868
1874
  preamble: string;
@@ -1985,12 +1991,32 @@ declare function fuseHits(keyword: readonly RawHit[], vector: readonly RawHit[])
1985
1991
  */
1986
1992
  declare function mergeRankedHits(hits: readonly RawHit[]): RawHit[];
1987
1993
 
1994
+ interface McpToolResult {
1995
+ ok: boolean;
1996
+ text: string;
1997
+ }
1998
+ type McpSearchCall = (input: {
1999
+ sourceId: string;
2000
+ tool: string;
2001
+ args: Record<string, unknown>;
2002
+ }) => Promise<McpToolResult>;
2003
+ interface SearchRunOptions {
2004
+ mcpCall?: McpSearchCall;
2005
+ mcpTimeoutMs?: number;
2006
+ }
2007
+ declare function openMcpSearchProvider(input: {
2008
+ projectRoot: string;
2009
+ search: SearchConfig;
2010
+ call?: McpSearchCall;
2011
+ timeoutMs?: number;
2012
+ }): SearchProvider;
2013
+
1988
2014
  declare function registerSearchProvider(provider: SearchProvider): void;
1989
2015
  declare function clearRegisteredSearchProviders(): void;
1990
2016
  declare function fallbackWarning(name: string): string;
1991
- declare function resolveSearchProvider(projectRoot: string, config: Config, search: SearchConfig, runtime?: SearchRuntime): SearchProvider;
2017
+ declare function resolveSearchProvider(projectRoot: string, config: Config, search: SearchConfig, runtime?: SearchRuntime, run?: SearchRunOptions): SearchProvider;
1992
2018
  declare function buildRetrievedInner(projectRoot: string, config: Config, title: string, stage: string | undefined, budget: number | undefined, runtime?: SearchRuntime, activeChange?: string): Promise<string>;
1993
- declare function executeSearch(projectRoot: string, config: Config, query: string, scope: SearchScope, budget: number | undefined): Promise<SearchResult>;
2019
+ declare function executeSearch(projectRoot: string, config: Config, query: string, scope: SearchScope, budget: number | undefined, run?: SearchRunOptions): Promise<SearchResult>;
1994
2020
 
1995
2021
  interface SyncChangeResult {
1996
2022
  changeId: string;
@@ -3351,6 +3377,30 @@ declare function rebuildNetwork(root: string, input: {
3351
3377
  now?: () => Date;
3352
3378
  }): Promise<RoleCommandResult>;
3353
3379
 
3380
+ interface IssueRecord {
3381
+ number: number;
3382
+ title: string;
3383
+ state: string;
3384
+ }
3385
+ type IssueRead = {
3386
+ ok: true;
3387
+ issue: IssueRecord;
3388
+ } | {
3389
+ ok: false;
3390
+ missing: boolean;
3391
+ };
3392
+ interface IssueSource {
3393
+ read(number: number): Promise<IssueRead>;
3394
+ }
3395
+ declare function ghIssueSource(): IssueSource;
3396
+ declare function readConnector(input: {
3397
+ verb: string;
3398
+ connector: string;
3399
+ record: string;
3400
+ source?: IssueSource;
3401
+ }): Promise<RoleCommandResult>;
3402
+ declare function runRoutine(root: string, roleName: string, routineName: string, source?: IssueSource): Promise<RoleCommandResult>;
3403
+
3354
3404
  interface RunRoleInput {
3355
3405
  name: string;
3356
3406
  task?: string;
@@ -3397,6 +3447,32 @@ declare function runGuide(root: string, input?: {
3397
3447
  now?: () => Date;
3398
3448
  }): Promise<RoleCommandResult>;
3399
3449
 
3450
+ declare const SETUP_STEP_IDS: readonly ["folder", "workflow", "host", "roles", "model", "check", "start"];
3451
+ type SetupStepId = (typeof SETUP_STEP_IDS)[number];
3452
+ declare const SETUP_WHY: Record<SetupStepId, string>;
3453
+ type SetupRolesChoice = "duties" | "software" | "keep";
3454
+ type SetupModelState = "configured" | "missing" | {
3455
+ error: string;
3456
+ };
3457
+ type SetupStatus = {
3458
+ folder: boolean;
3459
+ host: string | null;
3460
+ roles: string[];
3461
+ model: SetupModelState;
3462
+ };
3463
+ type SetupStepInput = {
3464
+ step: SetupStepId;
3465
+ workflow?: string;
3466
+ host?: false | AgentTarget;
3467
+ roles?: SetupRolesChoice;
3468
+ /** When the model is missing, true exits 1. False prints the sentence and exits 0. */
3469
+ requireModel?: boolean;
3470
+ };
3471
+ declare function parseSetupStep(raw: string): SetupStepId | null;
3472
+ declare function formatSetupStatus(status: SetupStatus): string;
3473
+ declare function readSetupStatus(root: string, env?: Record<string, string | undefined>): Promise<SetupStatus>;
3474
+ declare function runSetupStep(root: string, input: SetupStepInput, env?: Record<string, string | undefined>): Promise<RoleCommandResult>;
3475
+
3400
3476
  declare function recordSignoff(root: string, input: {
3401
3477
  note?: string;
3402
3478
  stage?: string;
@@ -4005,4 +4081,4 @@ declare function formatEpicGraph(nodes: StoryNode[]): {
4005
4081
  /** Graph errors, then open dependencies. Null means the branch may be created. */
4006
4082
  declare function branchBlock(nodes: StoryNode[], story: string): string | null;
4007
4083
 
4008
- export { AGENT_INTEGRATIONS, AGENT_TARGET_OPTIONS, ALL_AGENT_TARGETS, type AdapterExtractResult, AdapterRegistry, type AdvanceResult, type AgentInstallPlan, AgentInstallPreflightError, type AgentIntegration, type AgentTarget, type AgentTargetOption, type AllowRoleInput, type ArtifactDef, ArtifactDefSchema, type BuildRefinePlanOptions, type CallMcpToolResult, type ChangeContext, type ChangeMeta, ChangeMetaSchema, type ChangeMetrics, ChangeMetricsSchema, type ChangePhaseOrder, type CodeContextCaps, type CodeContextGap, type CodeContextGapCode, type CodeContextRequest, type CodeContextResult, type CodeContextSummary, type CodeSlice, type Complexity, type Config, ConfigSchema, type CreateChangeInput, DEFAULT_CODE_CONTEXT_CAPS, DEFAULT_INIT_INTEGRATION, type DecideInput, type DecisionMetric, DecisionMetricSchema, type DecisionModel, type DecisionOutcome, type Duty, EMBEDDINGS_UNAVAILABLE, EMBEDDING_MODEL, type Embedder, type FastembedHooks, type FocusPlan, type Gate, GateSchema, type GatherMcpOptions, type GenerateCodeContextDeps, type GeneratedManifest, type GeneratedState, type GitHeadRunner, type GreenfieldFeature, type IndexStats, type InitOptions, type InitResult, type InstallAgentOptions, type InstallAgentResult, type InstallAgentsOptions, type InstallAgentsResult, type InstalledAgentSnapshot, type KeptFile, type KeptReason, type LanguageAdapter, type McpConfig, McpConfigSchema, type McpFetchResult, type McpInvoke, McpInvokeSchema, type McpMatchContext, type McpSource, McpSourceSchema, type McpWhen, McpWhenSchema, type MetricsImportResult, type ModelChoice, type ModelContext, type ModelEntry, type ModelsConfig, ModelsConfigSchema, PROTOCOL_MD, type PhaseMetric, PhaseMetricSchema, type PhaseTiming, type PhaseTimingRow, type PlannedWrite, type PriceCard, type Prices, type ProductTeamMember, RRF_K, type RawHit, type ReconcileGeneratedResult, type RefineArtifactRef, type RefineMode, type RefinePlan, type RemoveAgentHostsResult, type RenderChangeReportInput, type RoleCommandResult, type RoleLists, type RoleModel, type RoleProfile, type RouteDeps, type RouteHit, type RouteItem, type RunRoleInput, SDD_AGENT_ROLES, SDD_CORE_VERSION, SDD_DIR, SUMMARY_TOKEN_CAP, type SddAgentRole, type SddAgentRoleId, SddError, type SearchConfig, SearchConfigError, type SearchHit, type SearchProvider, type SearchQuery, type SearchResult, type SearchRuntime, type SearchScope, type Stage, StageSchema, type StartFeatureInput, type StartGreenfieldInput, type StartGreenfieldResult, type StoryDraft, type StoryNode, type SymbolInfo, type SymbolKind, type SyncChangeResult, type TeamConfig, TeamSchema, type TokenCounts, type TokenUsageMetric, TokenUsageMetricSchema, VerifyCommandSchema, type VerifyResult, type VerifyStatus, WORK_TYPES, type WorkType, type Workflow, WorkflowSchema, acceptNetwork, activePointerPath, activeStages, addLesson, addMcpSource, advanceStage, agentHostPaths, agentKickoffMessage, allowRole, approveGate, archiveDir, assertAgentInstallable, assertSessionLogAllowed, branchBlock, budgetForStage, buildAgentPrompt, buildContext, buildRefinePlan, buildRetrievedInner, callMcpSourceTool, canLeaveStage, changeDirName, changeMetaPath, changePath, changesDir, changesPathRel, checkModels, checkTeam, chunkCode, chunkMarkdown, classifyPath, clearActiveIf, clearRegisteredSearchProviders, compareChangesByFirstPhase, completeChange, configPath, contentHash, copyDir, copyDirSkipExisting, costFor, countTokens, createBuiltinProvider, createChange, createFastembedEmbedder, createRole, createRoleFromTemplate, decide, defaultConfig, defaultMcpConfig, defaultMcpYamlPath, defaultMemoryDir, defaultPricesYamlPath, defaultSearchYamlPath, defaultTeamsDir, defaultTemplatesDir, defaultWorkflowsDir, defaultsRoot, deleteRole, describeFsError, describeKept, displayArchivePath, displayChangePath, domainsDir, duplicateRole, dutyForStage, editRole, embedSearchQuery, emptyChangeMetrics, ensureDir, ensureMcpConfig, errorMessage, executeSearch, explainMatch, explainModel, extractiveSummary, fallbackAdapter, fallbackIncompleteStageId, fallbackWarning, fastembedImportCount, findFeaturesBacklogPath, firstActiveStageId, formatDuration, formatEpicGraph, formatJsonSummary, formatMcpContextForHandoff, formatModels, formatStatus, formatTeam, formatTokenInventory, ftsTokens, fuseByRank, fuseHits, gatherMcpContext, gatherMcpContextForChange, generateCodeContext, generatedState, getActiveChangeId, getFacts, getHeadSha, getIntegration, getStage, gitUserName, guidancePaths, handoffRole, hideRole, importSessionMetrics, incompletePriorStageErrors, indexDbPath, inferComplexity, initProject, initTeam, installAgentIntegration, installAgentIntegrations, integrationKeyFor, interpolate, interpolateArgs, isHardDenied, isIgnoredPath, isInitialized, isPrunedDir, isSddError, isSecretPath, isStageSkipped, isSubstantiveArtifactContent, isWorkType, keywordHits, listBacklogFeatures, listBundledWorkflowNames, listChanges, listDirs, listFacts, listFiles, listMatchingSourceIds, listMcpSourceTools, listRoleTemplates, listScopeHits, listTeamTemplates, listWorkflowNames, loadBrain, loadChangeMeta, loadConfig, loadEpicStories, loadExcluder, loadGeneratedManifest, loadInstalledAgent, loadMcpConfig, loadModels, loadPrices, loadProductTeam, loadSearchConfig, loadWorkflow, markGenerated, matchMcpSources, mcpConfigPath, mcpTimeoutMs, memoryDir, memoryPathRel, mergeCaps, mergeConfigDefaults, mergeRankedHits, migrateTeamMemory, missingBundledWorkflows, modelFromEnv, nextStageId, nowIso, optionForTarget, packHits, parseAgentTargets, parseFeaturesBacklog, parseIntegration, parseStoryDraft, pathExists, phaseTiming, pinRole, planAgentIntegration, planNetwork, postRoom, prepareGuide, productTeamHome, promoteGreenfieldToMemory, queueRole, rankScope, readChangeMetrics, readHandoffCodePoints, readTeamConfig, readText, readYaml, rebuildNetwork, recommendWorkflow, reconcileGeneratedTree, recordDecisionMetric, recordDecisionRequest, recordSignoff, refreshActiveAgentContext, refreshConfiguredGuidance, registerSearchProvider, removeMcpSource, removeOtherAgentHosts, removeOtherAgentHostsDetailed, removePath, renderAgentsMd, renderBlock, renderChangeReport, renderMemoryIndex, renderProductTeamSection, renderProtocolMd, renderSddReadme, renderThinAgent, repairRequiredIgnores, reportAllChanges, reportChange, resolveActiveDirectory, resolveBot, resolveChangeId, resolveEmbedder, resolveFocus, resolveSearchProvider, resolveStages, reviewRoom, roleContextBody, routeRole, rrf, runGuide, runLocalVerify, runLoop, runNetwork, runRole, saveChangeMeta, saveConfig, saveGeneratedManifest, saveMcpConfig, scopeForPath, sddRoot, searchConfigPath, searchPreamble, selectModel, setActiveChange, setFact, setRoleContext, setRoleMessaging, shouldAutoSkip, showFact, showMemory, showRoleGroup, showRoles, showRoom, showTeam, skipStage, slugify, spawnModelCommand, startFeatureFromBacklog, startGreenfield, startPhase, storyIdTaken, switchWorkflow, syncChangeHead, takeRole, templatesDir, toProcessEnv, todayIsoDate, tokenizeKeywords, transitionPhase, typescriptAdapter, uniqueChangeDirName, updateFeatureStatus, validBranchName, withMcpSource, workKind, workflowUnavailableMessage, workflowsDir, writeAgentHandoff, writeRefineBrief, writeText, writeTextIfMissing, writeYaml };
4084
+ export { AGENT_INTEGRATIONS, AGENT_TARGET_OPTIONS, ALL_AGENT_TARGETS, type AdapterExtractResult, AdapterRegistry, type AdvanceResult, type AgentInstallPlan, AgentInstallPreflightError, type AgentIntegration, type AgentTarget, type AgentTargetOption, type AllowRoleInput, type ArtifactDef, ArtifactDefSchema, type BuildRefinePlanOptions, type CallMcpToolResult, type ChangeContext, type ChangeMeta, ChangeMetaSchema, type ChangeMetrics, ChangeMetricsSchema, type ChangePhaseOrder, type CodeContextCaps, type CodeContextGap, type CodeContextGapCode, type CodeContextRequest, type CodeContextResult, type CodeContextSummary, type CodeSlice, type Complexity, type Config, ConfigSchema, type CreateChangeInput, DEFAULT_CODE_CONTEXT_CAPS, DEFAULT_INIT_INTEGRATION, type DecideInput, type DecisionMetric, DecisionMetricSchema, type DecisionModel, type DecisionOutcome, type Duty, EMBEDDINGS_UNAVAILABLE, EMBEDDING_MODEL, type Embedder, type FastembedHooks, type FocusPlan, type Gate, GateSchema, type GatherMcpOptions, type GenerateCodeContextDeps, type GeneratedManifest, type GeneratedState, type GitHeadRunner, type GreenfieldFeature, type IndexStats, type InitOptions, type InitResult, type InstallAgentOptions, type InstallAgentResult, type InstallAgentsOptions, type InstallAgentsResult, type InstalledAgentSnapshot, type IssueRead, type IssueRecord, type IssueSource, type KeptFile, type KeptReason, type LanguageAdapter, type McpConfig, McpConfigSchema, type McpFetchResult, type McpInvoke, McpInvokeSchema, type McpMatchContext, type McpSearchCall, type McpSource, McpSourceSchema, type McpToolResult, type McpWhen, McpWhenSchema, type MetricsImportResult, type ModelChoice, type ModelContext, type ModelEntry, type ModelsConfig, ModelsConfigSchema, PROTOCOL_MD, type PhaseMetric, PhaseMetricSchema, type PhaseTiming, type PhaseTimingRow, type PlannedWrite, type PriceCard, type Prices, type ProductTeamMember, RRF_K, type RawHit, type ReconcileGeneratedResult, type RefineArtifactRef, type RefineMode, type RefinePlan, type RemoveAgentHostsResult, type RenderChangeReportInput, type RoleCommandResult, type RoleLists, type RoleModel, type RoleProfile, type RouteDeps, type RouteHit, type RouteItem, type RunRoleInput, SDD_AGENT_ROLES, SDD_CORE_VERSION, SDD_DIR, SETUP_STEP_IDS, SETUP_WHY, SUMMARY_TOKEN_CAP, type SddAgentRole, type SddAgentRoleId, SddError, type SearchConfig, SearchConfigError, type SearchHit, type SearchProvider, type SearchQuery, type SearchResult, type SearchRunOptions, type SearchRuntime, type SearchScope, type SetupModelState, type SetupRolesChoice, type SetupStatus, type SetupStepId, type SetupStepInput, type Stage, StageSchema, type StartFeatureInput, type StartGreenfieldInput, type StartGreenfieldResult, type StoryDraft, type StoryNode, type SymbolInfo, type SymbolKind, type SyncChangeResult, type TeamConfig, TeamSchema, type TokenCounts, type TokenUsageMetric, TokenUsageMetricSchema, VerifyCommandSchema, type VerifyResult, type VerifyStatus, WORK_TYPES, type WorkType, type Workflow, WorkflowSchema, acceptNetwork, activePointerPath, activeStages, addLesson, addMcpSource, advanceStage, agentHostPaths, agentKickoffMessage, allowRole, approveGate, archiveDir, assertAgentInstallable, assertSessionLogAllowed, branchBlock, budgetForStage, buildAgentPrompt, buildContext, buildRefinePlan, buildRetrievedInner, callMcpSourceTool, canLeaveStage, changeDirName, changeMetaPath, changePath, changesDir, changesPathRel, checkModels, checkTeam, chunkCode, chunkMarkdown, classifyPath, clearActiveIf, clearRegisteredSearchProviders, compareChangesByFirstPhase, completeChange, configPath, contentHash, copyDir, copyDirSkipExisting, costFor, countTokens, createBuiltinProvider, createChange, createFastembedEmbedder, createRole, createRoleFromTemplate, decide, defaultConfig, defaultMcpConfig, defaultMcpYamlPath, defaultMemoryDir, defaultPricesYamlPath, defaultSearchYamlPath, defaultTeamsDir, defaultTemplatesDir, defaultWorkflowsDir, defaultsRoot, deleteRole, describeFsError, describeKept, displayArchivePath, displayChangePath, domainsDir, duplicateRole, dutyForStage, editRole, embedSearchQuery, emptyChangeMetrics, ensureDir, ensureMcpConfig, errorMessage, executeSearch, explainMatch, explainModel, extractiveSummary, fallbackAdapter, fallbackIncompleteStageId, fallbackWarning, fastembedImportCount, findFeaturesBacklogPath, firstActiveStageId, formatDuration, formatEpicGraph, formatJsonSummary, formatMcpContextForHandoff, formatModels, formatSetupStatus, formatStatus, formatTeam, formatTokenInventory, ftsTokens, fuseByRank, fuseHits, gatherMcpContext, gatherMcpContextForChange, generateCodeContext, generatedState, getActiveChangeId, getFacts, getHeadSha, getIntegration, getStage, ghIssueSource, gitUserName, guidancePaths, handoffRole, hideRole, importSessionMetrics, incompletePriorStageErrors, indexDbPath, inferComplexity, initProject, initTeam, installAgentIntegration, installAgentIntegrations, integrationKeyFor, interpolate, interpolateArgs, isHardDenied, isIgnoredPath, isInitialized, isPrunedDir, isSddError, isSecretPath, isStageSkipped, isSubstantiveArtifactContent, isWorkType, keywordHits, listBacklogFeatures, listBundledWorkflowNames, listChanges, listDirs, listFacts, listFiles, listMatchingSourceIds, listMcpSourceTools, listRoleTemplates, listScopeHits, listTeamTemplates, listWorkflowNames, loadBrain, loadChangeMeta, loadConfig, loadEpicStories, loadExcluder, loadGeneratedManifest, loadInstalledAgent, loadMcpConfig, loadModels, loadPrices, loadProductTeam, loadSearchConfig, loadWorkflow, markGenerated, matchMcpSources, mcpConfigPath, mcpTimeoutMs, memoryDir, memoryPathRel, mergeCaps, mergeConfigDefaults, mergeRankedHits, migrateTeamMemory, missingBundledWorkflows, modelFromEnv, nextStageId, nowIso, openMcpSearchProvider, optionForTarget, packHits, parseAgentTargets, parseFeaturesBacklog, parseIntegration, parseSetupStep, parseStoryDraft, pathExists, phaseTiming, pinRole, planAgentIntegration, planNetwork, postRoom, prepareGuide, productTeamHome, promoteGreenfieldToMemory, queueRole, rankScope, readChangeMetrics, readConnector, readHandoffCodePoints, readSetupStatus, readTeamConfig, readText, readYaml, rebuildNetwork, recommendWorkflow, reconcileGeneratedTree, recordDecisionMetric, recordDecisionRequest, recordSignoff, refreshActiveAgentContext, refreshConfiguredGuidance, registerSearchProvider, removeMcpSource, removeOtherAgentHosts, removeOtherAgentHostsDetailed, removePath, renderAgentsMd, renderBlock, renderChangeReport, renderMemoryIndex, renderProductTeamSection, renderProtocolMd, renderSddReadme, renderThinAgent, repairRequiredIgnores, reportAllChanges, reportChange, resolveActiveDirectory, resolveBot, resolveChangeId, resolveEmbedder, resolveFocus, resolveSearchProvider, resolveStages, reviewRoom, roleContextBody, routeRole, rrf, runGuide, runLocalVerify, runLoop, runNetwork, runRole, runRoutine, runSetupStep, saveChangeMeta, saveConfig, saveGeneratedManifest, saveMcpConfig, scopeForPath, sddRoot, searchConfigPath, searchPreamble, selectModel, setActiveChange, setFact, setRoleContext, setRoleMessaging, shouldAutoSkip, showFact, showMemory, showRoleGroup, showRoles, showRoom, showTeam, skipStage, slugify, spawnModelCommand, startFeatureFromBacklog, startGreenfield, startPhase, storyIdTaken, switchWorkflow, syncChangeHead, takeRole, templatesDir, toProcessEnv, todayIsoDate, tokenizeKeywords, transitionPhase, typescriptAdapter, uniqueChangeDirName, updateFeatureStatus, validBranchName, withMcpSource, workKind, workflowUnavailableMessage, workflowsDir, writeAgentHandoff, writeRefineBrief, writeText, writeTextIfMissing, writeYaml };