opencode-swarm 7.82.1 → 7.83.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.
package/dist/cli/index.js CHANGED
@@ -52,7 +52,7 @@ var package_default;
52
52
  var init_package = __esm(() => {
53
53
  package_default = {
54
54
  name: "opencode-swarm",
55
- version: "7.82.1",
55
+ version: "7.83.0",
56
56
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
57
57
  main: "dist/index.js",
58
58
  types: "dist/index.d.ts",
@@ -18173,6 +18173,7 @@ __export(exports_schema, {
18173
18173
  ScoringWeightsSchema: () => ScoringWeightsSchema,
18174
18174
  ScoringConfigSchema: () => ScoringConfigSchema,
18175
18175
  ReviewPassesConfigSchema: () => ReviewPassesConfigSchema,
18176
+ RepoGraphConfigSchema: () => RepoGraphConfigSchema,
18176
18177
  QualityBudgetConfigSchema: () => QualityBudgetConfigSchema,
18177
18178
  PrmConfigSchema: () => PrmConfigSchema,
18178
18179
  PrMonitorConfigSchema: () => PrMonitorConfigSchema,
@@ -18304,7 +18305,7 @@ function resolveExternalSkillsConfig(input) {
18304
18305
  };
18305
18306
  return merged;
18306
18307
  }
18307
- var _internals5, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, AgentOverrideConfigSchema, SwarmConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, CheckpointConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, PluginConfigSchema;
18308
+ var _internals5, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, AgentOverrideConfigSchema, SwarmConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, PluginConfigSchema;
18308
18309
  var init_schema = __esm(() => {
18309
18310
  init_zod();
18310
18311
  init_constants();
@@ -18736,6 +18737,9 @@ var init_schema = __esm(() => {
18736
18737
  invalidate_on_hash_change: exports_external.boolean().default(true),
18737
18738
  agent_profiles: exports_external.record(exports_external.string(), exports_external.string()).default({})
18738
18739
  });
18740
+ RepoGraphConfigSchema = exports_external.object({
18741
+ exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([])
18742
+ });
18739
18743
  CheckpointConfigSchema = exports_external.object({
18740
18744
  enabled: exports_external.boolean().default(true),
18741
18745
  auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
@@ -19189,6 +19193,7 @@ var init_schema = __esm(() => {
19189
19193
  authority: AuthorityConfigSchema.optional(),
19190
19194
  plan_cursor: PlanCursorConfigSchema.optional(),
19191
19195
  context_map: ContextMapConfigSchema.optional(),
19196
+ repo_graph: RepoGraphConfigSchema.optional(),
19192
19197
  evidence: EvidenceConfigSchema.optional(),
19193
19198
  summaries: SummaryConfigSchema.optional(),
19194
19199
  review_passes: ReviewPassesConfigSchema.optional(),
@@ -18,7 +18,7 @@ export declare const _internals: {
18
18
  };
19
19
  export type { MigrationStatus, Phase, PhaseStatus, Plan, Task, TaskSize, TaskStatus, } from './plan-schema';
20
20
  export { MigrationStatusSchema, PhaseSchema, PhaseStatusSchema, PlanSchema, TaskSchema, TaskSizeSchema, TaskStatusSchema, } from './plan-schema';
21
- export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, LeanTurboConfig, MemoryConfig, PhaseCompleteConfig, PipelineConfig, PluginConfig, SkillPropagationConfig, SwarmConfig, TurboConfig, WorktreeIsolationConfig, } from './schema';
22
- export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, LeanTurboConfigSchema, MemoryConfigSchema, PhaseCompleteConfigSchema, PipelineConfigSchema, PluginConfigSchema, SkillPropagationConfigSchema, SwarmConfigSchema, TurboConfigSchema, WorktreeIsolationConfigSchema, } from './schema';
21
+ export type { AgentOverrideConfig, AutomationCapabilities, AutomationConfig, AutomationMode, LeanTurboConfig, MemoryConfig, PhaseCompleteConfig, PipelineConfig, PluginConfig, RepoGraphConfig, SkillPropagationConfig, SwarmConfig, TurboConfig, WorktreeIsolationConfig, } from './schema';
22
+ export { AgentOverrideConfigSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, AutomationModeSchema, LeanTurboConfigSchema, MemoryConfigSchema, PhaseCompleteConfigSchema, PipelineConfigSchema, PluginConfigSchema, RepoGraphConfigSchema, SkillPropagationConfigSchema, SwarmConfigSchema, TurboConfigSchema, WorktreeIsolationConfigSchema, } from './schema';
23
23
  export type { DeltaSpec, Obligation, SpecDelta, SpecRequirement, SpecScenario, SpecSection, SwarmSpec, } from './spec-schema';
24
24
  export { DeltaSpecSchema, ObligationSchema, SpecDeltaSchema, SpecRequirementSchema, SpecScenarioSchema, SpecSectionSchema, SwarmSpecSchema, validateSpecContent, } from './spec-schema';
@@ -511,6 +511,10 @@ export declare const ContextMapConfigSchema: z.ZodObject<{
511
511
  agent_profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
512
512
  }, z.core.$strip>;
513
513
  export type ContextMapConfig = z.infer<typeof ContextMapConfigSchema>;
514
+ export declare const RepoGraphConfigSchema: z.ZodObject<{
515
+ exclude_dirs: z.ZodDefault<z.ZodArray<z.ZodString>>;
516
+ }, z.core.$strip>;
517
+ export type RepoGraphConfig = z.infer<typeof RepoGraphConfigSchema>;
514
518
  export declare const CheckpointConfigSchema: z.ZodObject<{
515
519
  enabled: z.ZodDefault<z.ZodBoolean>;
516
520
  auto_checkpoint_threshold: z.ZodDefault<z.ZodNumber>;
@@ -1459,6 +1463,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
1459
1463
  invalidate_on_hash_change: z.ZodDefault<z.ZodBoolean>;
1460
1464
  agent_profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1461
1465
  }, z.core.$strip>>;
1466
+ repo_graph: z.ZodOptional<z.ZodObject<{
1467
+ exclude_dirs: z.ZodDefault<z.ZodArray<z.ZodString>>;
1468
+ }, z.core.$strip>>;
1462
1469
  evidence: z.ZodOptional<z.ZodObject<{
1463
1470
  enabled: z.ZodDefault<z.ZodBoolean>;
1464
1471
  max_age_days: z.ZodDefault<z.ZodNumber>;
@@ -34,6 +34,7 @@ export interface RepoGraphDeps {
34
34
  maxFiles?: number;
35
35
  walkBudgetMs?: number;
36
36
  followSymlinks?: boolean;
37
+ excludeDirs?: readonly string[];
37
38
  }) => Promise<RepoGraph>;
38
39
  saveGraph: (workspace: string, graph: RepoGraph, options?: {
39
40
  createAtomic?: boolean;
@@ -43,4 +44,6 @@ export interface RepoGraphDeps {
43
44
  }) => Promise<RepoGraph>;
44
45
  safeRealpathSync?: typeof safeRealpathSync;
45
46
  }
46
- export declare function createRepoGraphBuilderHook(workspaceRoot: string, deps?: Partial<RepoGraphDeps>): RepoGraphBuilderHook;
47
+ export declare function createRepoGraphBuilderHook(workspaceRoot: string, deps?: Partial<RepoGraphDeps>, options?: {
48
+ excludeDirs?: readonly string[];
49
+ }): RepoGraphBuilderHook;
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ var package_default;
69
69
  var init_package = __esm(() => {
70
70
  package_default = {
71
71
  name: "opencode-swarm",
72
- version: "7.82.1",
72
+ version: "7.83.0",
73
73
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
74
74
  main: "dist/index.js",
75
75
  types: "dist/index.d.ts",
@@ -15347,6 +15347,7 @@ __export(exports_schema, {
15347
15347
  ScoringWeightsSchema: () => ScoringWeightsSchema,
15348
15348
  ScoringConfigSchema: () => ScoringConfigSchema,
15349
15349
  ReviewPassesConfigSchema: () => ReviewPassesConfigSchema,
15350
+ RepoGraphConfigSchema: () => RepoGraphConfigSchema,
15350
15351
  QualityBudgetConfigSchema: () => QualityBudgetConfigSchema,
15351
15352
  PrmConfigSchema: () => PrmConfigSchema,
15352
15353
  PrMonitorConfigSchema: () => PrMonitorConfigSchema,
@@ -15478,7 +15479,7 @@ function resolveExternalSkillsConfig(input) {
15478
15479
  };
15479
15480
  return merged;
15480
15481
  }
15481
- var _internals, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, AgentOverrideConfigSchema, SwarmConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, CheckpointConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, PluginConfigSchema;
15482
+ var _internals, SEPARATORS, CANONICAL_ROLES_LONGEST_FIRST, CANONICAL_ROLES_SET, AgentReasoningConfigSchema, AgentThinkingConfigSchema, AgentOverrideConfigSchema, SwarmConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GateConfigSchema, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, ReviewPassesConfigSchema, AutoReviewConfigSchema, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchemaBase, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchemaBase, AutomationConfigSchema, KnowledgeConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, SkillImproverConfigSchema, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilMemberConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, PluginConfigSchema;
15482
15483
  var init_schema = __esm(() => {
15483
15484
  init_zod();
15484
15485
  init_constants();
@@ -15910,6 +15911,9 @@ var init_schema = __esm(() => {
15910
15911
  invalidate_on_hash_change: exports_external.boolean().default(true),
15911
15912
  agent_profiles: exports_external.record(exports_external.string(), exports_external.string()).default({})
15912
15913
  });
15914
+ RepoGraphConfigSchema = exports_external.object({
15915
+ exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([])
15916
+ });
15913
15917
  CheckpointConfigSchema = exports_external.object({
15914
15918
  enabled: exports_external.boolean().default(true),
15915
15919
  auto_checkpoint_threshold: exports_external.number().int().min(1).max(20).default(3),
@@ -16363,6 +16367,7 @@ var init_schema = __esm(() => {
16363
16367
  authority: AuthorityConfigSchema.optional(),
16364
16368
  plan_cursor: PlanCursorConfigSchema.optional(),
16365
16369
  context_map: ContextMapConfigSchema.optional(),
16370
+ repo_graph: RepoGraphConfigSchema.optional(),
16366
16371
  evidence: EvidenceConfigSchema.optional(),
16367
16372
  summaries: SummaryConfigSchema.optional(),
16368
16373
  review_passes: ReviewPassesConfigSchema.optional(),
@@ -16992,6 +16997,7 @@ __export(exports_config, {
16992
16997
  SpecDeltaSchema: () => SpecDeltaSchema,
16993
16998
  SkillPropagationConfigSchema: () => SkillPropagationConfigSchema,
16994
16999
  ReviewEvidenceSchema: () => ReviewEvidenceSchema,
17000
+ RepoGraphConfigSchema: () => RepoGraphConfigSchema,
16995
17001
  QA_AGENTS: () => QA_AGENTS,
16996
17002
  PluginConfigSchema: () => PluginConfigSchema,
16997
17003
  PlanSchema: () => PlanSchema,
@@ -112402,8 +112408,15 @@ var SKIP_DIRECTORIES3 = new Set([
112402
112408
  ".cache",
112403
112409
  "vendor",
112404
112410
  ".svn",
112405
- ".hg"
112411
+ ".hg",
112412
+ ".svelte-kit"
112406
112413
  ]);
112414
+ function resolveSkipDirectories(excludeDirs) {
112415
+ const extras = excludeDirs?.filter((d) => d.length > 0) ?? [];
112416
+ if (extras.length === 0)
112417
+ return SKIP_DIRECTORIES3;
112418
+ return new Set([...SKIP_DIRECTORIES3, ...extras]);
112419
+ }
112407
112420
  var SUPPORTED_EXTENSIONS = [
112408
112421
  ".ts",
112409
112422
  ".tsx",
@@ -112737,7 +112750,8 @@ async function findSourceFilesAsync(dir, stats2, options) {
112737
112750
  startedAt: Date.now(),
112738
112751
  walkBudgetMs: options?.walkBudgetMs ?? DEFAULT_WALK_BUDGET_MS,
112739
112752
  maxFiles: options?.maxFiles ?? DEFAULT_WALK_FILE_CAP,
112740
- followSymlinks: options?.followSymlinks ?? false
112753
+ followSymlinks: options?.followSymlinks ?? false,
112754
+ skipDirs: resolveSkipDirectories(options?.excludeDirs)
112741
112755
  };
112742
112756
  const files = [];
112743
112757
  const queue = [dir];
@@ -112766,7 +112780,7 @@ async function findSourceFilesAsync(dir, stats2, options) {
112766
112780
  if (isWalkBudgetExceeded(ctx) || isFileCapReached(ctx, files.length)) {
112767
112781
  break;
112768
112782
  }
112769
- if (SKIP_DIRECTORIES3.has(entry.name)) {
112783
+ if (ctx.skipDirs.has(entry.name)) {
112770
112784
  ctx.stats.skippedDirs++;
112771
112785
  continue;
112772
112786
  }
@@ -112895,7 +112909,8 @@ async function buildWorkspaceGraphAsync(workspaceRoot, options) {
112895
112909
  const sourceFiles = await findSourceFilesAsync(absoluteRoot, stats2, {
112896
112910
  walkBudgetMs,
112897
112911
  maxFiles,
112898
- followSymlinks
112912
+ followSymlinks,
112913
+ excludeDirs: options?.excludeDirs
112899
112914
  });
112900
112915
  sourceFiles.sort((a, b) => {
112901
112916
  const normA = normalizeGraphPath(a);
@@ -112910,11 +112925,21 @@ async function buildWorkspaceGraphAsync(workspaceRoot, options) {
112910
112925
  for (const filePath of sourceFiles) {
112911
112926
  const result = scanFile(filePath, absoluteRoot, maxFileSize);
112912
112927
  if (result.node) {
112913
- appendNodeFast(graph, result.node);
112914
- for (const edge of result.edges) {
112915
- appendEdgeFast(graph, edge, seenEdges);
112928
+ let appended = false;
112929
+ try {
112930
+ appendNodeFast(graph, result.node);
112931
+ appended = true;
112932
+ } catch {
112933
+ stats2.skippedFiles++;
112934
+ }
112935
+ if (appended) {
112936
+ for (const edge of result.edges) {
112937
+ try {
112938
+ appendEdgeFast(graph, edge, seenEdges);
112939
+ } catch {}
112940
+ }
112941
+ stats2.filesScanned++;
112916
112942
  }
112917
- stats2.filesScanned++;
112918
112943
  } else {
112919
112944
  stats2.skippedFiles++;
112920
112945
  }
@@ -113757,11 +113782,13 @@ function isSupportedSourceFile(filePath) {
113757
113782
  const ext = filePath.substring(filePath.lastIndexOf(".")).toLowerCase();
113758
113783
  return SUPPORTED_EXTENSIONS2.includes(ext);
113759
113784
  }
113760
- function createRepoGraphBuilderHook(workspaceRoot, deps) {
113785
+ function createRepoGraphBuilderHook(workspaceRoot, deps, options) {
113761
113786
  const _buildWorkspaceGraph = deps?.buildWorkspaceGraph ?? buildWorkspaceGraphAsync;
113762
113787
  const _saveGraph = deps?.saveGraph ?? saveGraph;
113763
113788
  const _updateGraphForFiles = deps?.updateGraphForFiles ?? updateGraphForFiles;
113764
113789
  const _safeRealpathSync = deps?.safeRealpathSync ?? safeRealpathSync;
113790
+ const _excludeDirs = (options?.excludeDirs ?? []).filter((d) => d.length > 0);
113791
+ const _excludeDirSet = new Set(_excludeDirs);
113765
113792
  let initStarted = false;
113766
113793
  let initPromise = Promise.resolve();
113767
113794
  const FAILURE_ADVISORY_THRESHOLD = 3;
@@ -113799,7 +113826,9 @@ function createRepoGraphBuilderHook(workspaceRoot, deps) {
113799
113826
  async function doInit() {
113800
113827
  await yieldToEventLoop();
113801
113828
  try {
113802
- const graph = await _buildWorkspaceGraph(workspaceRoot);
113829
+ const graph = await _buildWorkspaceGraph(workspaceRoot, {
113830
+ excludeDirs: _excludeDirs
113831
+ });
113803
113832
  await _saveGraph(workspaceRoot, graph);
113804
113833
  log(`[repo-graph] Built graph: ${graph.metadata.nodeCount} nodes, ${graph.metadata.edgeCount} edges`);
113805
113834
  } catch (error93) {
@@ -113831,6 +113860,9 @@ function createRepoGraphBuilderHook(workspaceRoot, deps) {
113831
113860
  return;
113832
113861
  if (!isSupportedSourceFile(filePath))
113833
113862
  return;
113863
+ if (_excludeDirSet.size > 0 && filePath.split(/[/\\]/).some((segment) => _excludeDirSet.has(segment))) {
113864
+ return;
113865
+ }
113834
113866
  const absoluteFilePath = path120.isAbsolute(filePath) ? filePath : path120.resolve(workspaceRoot, filePath);
113835
113867
  const realFilePath = _safeRealpathSync(absoluteFilePath, absoluteFilePath);
113836
113868
  if (realFilePath === null) {
@@ -148964,7 +148996,9 @@ async function initializeOpenCodeSwarm(ctx) {
148964
148996
  log("loadSnapshot timed out or failed (non-fatal)", { error: msg });
148965
148997
  });
148966
148998
  initTelemetry(ctx.directory);
148967
- const repoGraphHook = createRepoGraphBuilderHook(ctx.directory);
148999
+ const repoGraphHook = createRepoGraphBuilderHook(ctx.directory, undefined, {
149000
+ excludeDirs: config3.repo_graph?.exclude_dirs
149001
+ });
148968
149002
  queueMicrotask(() => {
148969
149003
  const watchdog = setTimeout(() => {
148970
149004
  log("[repo-graph] init exceeded 30s budget; scan will continue but is overdue");
@@ -167,6 +167,12 @@ export interface BuildWorkspaceGraphOptions {
167
167
  maxFiles?: number;
168
168
  walkBudgetMs?: number;
169
169
  followSymlinks?: boolean;
170
+ /**
171
+ * Extra directory basenames to skip during the workspace walk, merged with
172
+ * the built-in `SKIP_DIRECTORIES` defaults (issue #1448). Matched by basename
173
+ * at any depth, not as glob/path patterns.
174
+ */
175
+ excludeDirs?: readonly string[];
170
176
  }
171
177
  /**
172
178
  * Normalize a file path for use as a graph key.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.82.1",
3
+ "version": "7.83.0",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",