opencode-swarm 7.151.1 → 7.152.1

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.
Files changed (58) hide show
  1. package/.opencode/skills/{resume → swarm-resume}/SKILL.md +1 -1
  2. package/dist/cli/{config-doctor-08zmx89c.js → config-doctor-bbqmye7a.js} +2 -2
  3. package/dist/cli/{core-w0gjhw5q.js → core-fh4e6ex0.js} +1 -1
  4. package/dist/cli/{curation-policy-fmvccdrg.js → curation-policy-nem98yc9.js} +4 -4
  5. package/dist/cli/{curator-twqjxden.js → curator-909s9dvs.js} +23 -23
  6. package/dist/cli/{curator-llm-factory-jmx72zhc.js → curator-llm-factory-462rysph.js} +23 -23
  7. package/dist/cli/{evidence-summary-service-py66zgn4.js → evidence-summary-service-kqw4y0yr.js} +9 -9
  8. package/dist/cli/{gate-evidence-ynhyzwsw.js → gate-evidence-ycts62pj.js} +4 -4
  9. package/dist/cli/{guardrail-explain-j9h5r8gh.js → guardrail-explain-7620hasq.js} +24 -24
  10. package/dist/cli/{guardrail-log-7995v5q5.js → guardrail-log-e1tmdxxa.js} +3 -3
  11. package/dist/cli/{guardrail-reset-seextj6h.js → guardrail-reset-gdnaxxvb.js} +23 -23
  12. package/dist/cli/{hive-promoter-a6xtvynw.js → hive-promoter-d0xydg6r.js} +23 -23
  13. package/dist/cli/{index-xysb3ed7.js → index-02ajc6d1.js} +2 -2
  14. package/dist/cli/{index-npzmqk01.js → index-0tfgn5x0.js} +6 -6
  15. package/dist/cli/{index-akef15kb.js → index-26vyr198.js} +4 -4
  16. package/dist/cli/{index-2xfffkk0.js → index-29vd7v3e.js} +1 -1
  17. package/dist/cli/{index-z09fmg67.js → index-2e1294d1.js} +42 -5
  18. package/dist/cli/{index-a2phfdsv.js → index-3djxegsc.js} +1 -1
  19. package/dist/cli/{index-jjpppdvb.js → index-44xdtqz8.js} +1 -1
  20. package/dist/cli/{index-hw93dwd0.js → index-4tvvh7pn.js} +25 -25
  21. package/dist/cli/{index-9wpr1p2g.js → index-73pmnsjg.js} +1 -1
  22. package/dist/cli/{index-v3gshkpz.js → index-79g6edht.js} +1 -1
  23. package/dist/cli/{index-dvycdkhj.js → index-7fh82sm1.js} +2 -2
  24. package/dist/cli/{index-9d9p7bv2.js → index-96m8ckpq.js} +3 -3
  25. package/dist/cli/{index-fbj6wvew.js → index-dn6yt0xg.js} +5 -5
  26. package/dist/cli/{index-1z7kx41f.js → index-k3d919yf.js} +1 -1
  27. package/dist/cli/{index-frp2hwdg.js → index-mken64yj.js} +1 -1
  28. package/dist/cli/{index-4y7n76bn.js → index-n0vc5b5t.js} +2 -2
  29. package/dist/cli/{index-t9h95vjd.js → index-nd8tkb3g.js} +5 -5
  30. package/dist/cli/{index-f73px21b.js → index-pvrap7xg.js} +1 -1
  31. package/dist/cli/{index-xtyxnxf4.js → index-q77e475x.js} +3 -3
  32. package/dist/cli/{index-twhhwe74.js → index-qqrdmaxq.js} +1 -1
  33. package/dist/cli/{index-n35866rr.js → index-rq6aetkv.js} +4 -4
  34. package/dist/cli/{index-qmwed766.js → index-ryecg2st.js} +2 -2
  35. package/dist/cli/{index-kzdv0g9e.js → index-sg2sx2q7.js} +81 -58
  36. package/dist/cli/{index-5jwbepcr.js → index-x6803sxh.js} +1 -1
  37. package/dist/cli/{index-gqss5zbr.js → index-xyfdmrv7.js} +1 -1
  38. package/dist/cli/{index-7w2b1z4j.js → index-z8s2asdk.js} +2 -2
  39. package/dist/cli/{index-5sh0kqf5.js → index-z9fyd0d6.js} +2 -2
  40. package/dist/cli/index.js +23 -23
  41. package/dist/cli/{knowledge-escalator-bqnkq3k7.js → knowledge-escalator-4egcr928.js} +9 -9
  42. package/dist/cli/{knowledge-events-rz3mt7gf.js → knowledge-events-kdyv4jzn.js} +7 -7
  43. package/dist/cli/{knowledge-link-v7hj1h8m.js → knowledge-link-h8cwj7af.js} +3 -3
  44. package/dist/cli/{knowledge-store-1m74b90j.js → knowledge-store-dq3cvg53.js} +4 -4
  45. package/dist/cli/{knowledge-validator-hfvhpkgk.js → knowledge-validator-4bhtden9.js} +6 -6
  46. package/dist/cli/{runner-7znestx4.js → runner-w81n9js3.js} +4 -4
  47. package/dist/cli/{scan-cursor-b36bzxkt.js → scan-cursor-2eezv81a.js} +5 -5
  48. package/dist/cli/{schema-sc332es3.js → schema-v4qcqhek.js} +1 -1
  49. package/dist/cli/{scope-persistence-phkj8438.js → scope-persistence-y2r227r0.js} +5 -5
  50. package/dist/cli/{skill-generator-2d005nr6.js → skill-generator-hhzxvb3h.js} +11 -11
  51. package/dist/cli/{worktree-isolation-zpgkd71h.js → worktree-isolation-ve338ez6.js} +23 -23
  52. package/dist/config/bundled-skills.d.ts +10 -1
  53. package/dist/index.js +182 -182
  54. package/dist/tools/repo-graph/builder.d.ts +1 -1
  55. package/dist/tools/repo-graph/symbol-edge.d.ts +21 -0
  56. package/dist/tools/repo-graph/types.d.ts +39 -1
  57. package/dist/tools/repo-graph.d.ts +1 -1
  58. package/package.json +2 -2
@@ -271,7 +271,7 @@ export declare function scanFile(filePath: string, absoluteRoot: string, maxFile
271
271
  * @param maxFileSize - Maximum file size in bytes
272
272
  * @returns AsyncScanResult with node, edges, and symbolEdges
273
273
  */
274
- export declare function scanFileAsync(filePath: string, absoluteRoot: string, maxFileSize: number, hasManifest?: (relDir: string) => boolean): Promise<AsyncScanResult>;
274
+ export declare function scanFileAsync(filePath: string, absoluteRoot: string, maxFileSize: number, hasManifest: ((relDir: string) => boolean) | undefined, repoRootId: string): Promise<AsyncScanResult>;
275
275
  /**
276
276
  * Build a complete dependency graph for a workspace by scanning all source files.
277
277
  *
@@ -0,0 +1,21 @@
1
+ import { type SymbolEdge, type SymbolEdgeEvidence, type SymbolEdgeKind, type SymbolEdgeResolution, type SymbolIdentityKind } from './types';
2
+ export declare const LOW_CONFIDENCE_SYMBOL_EDGE_THRESHOLD = 0.5;
3
+ export declare const MAX_SYMBOL_EDGE_EVIDENCE = 16;
4
+ declare const V2_KEYS: readonly ["id", "fromId", "toId", "kind", "confidence", "resolution", "evidence"];
5
+ export declare function deriveRepoRootId(workspaceRoot: string): string;
6
+ export declare function relativeSymbolPath(workspaceRoot: string, filePath: string): string;
7
+ export declare function createStableSymbolId(repoRootId: string, relativePath: string, qualifiedName: string, identityKind: SymbolIdentityKind): string;
8
+ export declare function createStableSymbolEdgeId(fromId: string, toId: string, kind: SymbolEdgeKind): string;
9
+ export declare function hashSymbolEdgeSnippet(snippet: string): string;
10
+ export declare function isCompleteSymbolEdge(edge: SymbolEdge): edge is SymbolEdge & Required<Pick<SymbolEdge, (typeof V2_KEYS)[number]>>;
11
+ export declare function hasSymbolEdgeV2Fields(edge: SymbolEdge): boolean;
12
+ export declare function mergeSymbolEdgeEvidence(left: readonly SymbolEdgeEvidence[], right: readonly SymbolEdgeEvidence[]): SymbolEdgeEvidence[];
13
+ export declare function normalizeSymbolEdge(edge: SymbolEdge, workspaceRoot: string, repoRootId: string): SymbolEdge & Required<Pick<SymbolEdge, (typeof V2_KEYS)[number]>>;
14
+ export declare function createSymbolEdgeV2(edge: Pick<SymbolEdge, 'fromFile' | 'fromSymbol' | 'toFile' | 'toSymbol'>, workspaceRoot: string, repoRootId: string, options: {
15
+ kind?: SymbolEdgeKind;
16
+ confidence: number;
17
+ resolution: SymbolEdgeResolution;
18
+ evidence: SymbolEdgeEvidence[];
19
+ }): SymbolEdge;
20
+ export declare function mergeSymbolEdges(left: SymbolEdge, right: SymbolEdge, workspaceRoot: string, repoRootId: string): SymbolEdge;
21
+ export {};
@@ -43,8 +43,12 @@ export declare const REPO_GRAPH_FILENAME = "repo-graph.json";
43
43
  * source read. The content-freshness sidecar requires both witnesses before
44
44
  * it will certify a graph; older graphs remain readable but are intentionally
45
45
  * treated as needing a rebuild before certification.
46
+ *
47
+ * 1.5.0 adds an optional graph-level `repoRootId` plus additive SymbolEdge v2
48
+ * identity, kind, confidence, resolution, and evidence fields. Legacy 1.2.0
49
+ * four-coordinate symbol edges remain readable and are normalized in memory.
46
50
  */
47
- export declare const GRAPH_SCHEMA_VERSION = "1.4.0";
51
+ export declare const GRAPH_SCHEMA_VERSION = "1.5.0";
48
52
  /**
49
53
  * Compare dotted numeric version strings (e.g. '1.1.0' >= '1.1.0').
50
54
  * Missing/non-numeric segments are treated as 0. Returns true when `version`
@@ -228,6 +232,23 @@ export interface SymbolReference {
228
232
  * than {@link GraphEdge} (which tracks file-level imports) and enable
229
233
  * precise context-packing and symbol navigation queries.
230
234
  */
235
+ export declare const SYMBOL_EDGE_KIND_VALUES: readonly ["CALLS", "REFERENCES", "USES_TYPE", "INSTANTIATES", "IMPLEMENTS", "OVERRIDES"];
236
+ export type SymbolEdgeKind = (typeof SYMBOL_EDGE_KIND_VALUES)[number];
237
+ export declare const SYMBOL_EDGE_RESOLUTION_VALUES: readonly ["exact", "import_binding", "same_file_scope", "unique_name", "type_resolved", "lsp", "scip", "heuristic", "unresolved"];
238
+ export type SymbolEdgeResolution = (typeof SYMBOL_EDGE_RESOLUTION_VALUES)[number];
239
+ export type SymbolIdentityKind = 'symbol' | 'module';
240
+ export interface SymbolEdgeEvidence {
241
+ /** Workspace-relative source path; source text itself is never persisted. */
242
+ file: string;
243
+ /** 1-based source line. */
244
+ line: number;
245
+ /** Optional 1-based source column. */
246
+ column?: number;
247
+ /** SHA-256 of the NFC-normalized logical source line. */
248
+ snippetHash: string;
249
+ /** Extractor that produced the fact, for example `tree-sitter/typescript`. */
250
+ extractor: string;
251
+ }
231
252
  export interface SymbolEdge {
232
253
  /** Resolved absolute path of the source file (matches `GraphNode.filePath` keys). */
233
254
  fromFile: string;
@@ -237,6 +258,20 @@ export interface SymbolEdge {
237
258
  toFile: string;
238
259
  /** Exported symbol referenced in the target file. */
239
260
  toSymbol: string;
261
+ /** Stable SHA-256 identity of this edge (schema >= 1.5.0). */
262
+ id?: string;
263
+ /** Stable SHA-256 identity of the source symbol. */
264
+ fromId?: string;
265
+ /** Stable SHA-256 identity of the target symbol. */
266
+ toId?: string;
267
+ /** Relationship kind. Current tree-sitter extraction emits REFERENCES. */
268
+ kind?: SymbolEdgeKind;
269
+ /** Advisory confidence in the inclusive range 0..1. */
270
+ confidence?: number;
271
+ /** How the relationship was resolved. */
272
+ resolution?: SymbolEdgeResolution;
273
+ /** Bounded provenance records. Empty only when no honest location exists. */
274
+ evidence?: SymbolEdgeEvidence[];
240
275
  }
241
276
  /**
242
277
  * A contiguous line span inside a source file, used by context-packing to
@@ -396,6 +431,7 @@ export interface GraphHealthResult {
396
431
  unreadableFiles: string[];
397
432
  validationSkippedFiles: string[];
398
433
  lowConfidenceEdgeCount: number;
434
+ unresolvedSymbolEdgeCount: number;
399
435
  walkTruncated: boolean;
400
436
  walkTruncationReason: 'budget' | 'cap' | null;
401
437
  incrementalFallbacks: number;
@@ -441,6 +477,8 @@ export interface RepoGraph {
441
477
  schema_version: string;
442
478
  /** Workspace root directory */
443
479
  workspaceRoot: string;
480
+ /** Root-independent repository label used to scope stable symbol IDs. */
481
+ repoRootId?: string;
444
482
  /** Graph nodes keyed by resolved file path */
445
483
  nodes: Record<string, GraphNode>;
446
484
  /** Graph edges representing dependencies */
@@ -26,6 +26,6 @@ export { extractFileOntology } from './repo-graph/ontology';
26
26
  export type { DeadExportsOptions } from './repo-graph/query';
27
27
  export { buildOntologyPreflightPacket, getBlastRadius, getCallers, getContextPack, getDeadExports, getDependencies, getFileOntology, getGraphHealth, getGraphNode, getImporters, getKeyFiles, getLocalizationContext, getPackageBoundaries, getSymbolConsumers, isGraphFresh, resetQueryCache, } from './repo-graph/query';
28
28
  export { getGraphPath, loadGraph, loadGraphSync, loadOrCreateGraph, saveGraph, saveIfDirty, } from './repo-graph/storage';
29
- export type { AskHit, AskOptions, AskResult, BlastRadiusResult, BuildWorkspaceGraphOptions, CallerReference, ContextPackResult, ContextPackSpan, ConventionFact, DataOperationFact, DeadExportCandidate, DeadExportsResult, FileOntology, FileReference, FileRole, FreshnessProbeState, GraphEdge, GraphExtractionFailure, GraphExtractorInputWitness, GraphHealthResult, GraphNode, GraphUnresolvedImport, LocalizationBlock, OntologyFinding, PackageBoundarySummary, RepoGraph, RepoGraphDiagnostics, RouteFact, RouteMethod, SecurityFact, SymbolEdge, SymbolReference, } from './repo-graph/types';
29
+ export type { AskHit, AskOptions, AskResult, BlastRadiusResult, BuildWorkspaceGraphOptions, CallerReference, ContextPackResult, ContextPackSpan, ConventionFact, DataOperationFact, DeadExportCandidate, DeadExportsResult, FileOntology, FileReference, FileRole, FreshnessProbeState, GraphEdge, GraphExtractionFailure, GraphExtractorInputWitness, GraphHealthResult, GraphNode, GraphUnresolvedImport, LocalizationBlock, OntologyFinding, PackageBoundarySummary, RepoGraph, RepoGraphDiagnostics, RouteFact, RouteMethod, SecurityFact, SymbolEdge, SymbolEdgeEvidence, SymbolEdgeKind, SymbolEdgeResolution, SymbolIdentityKind, SymbolReference, } from './repo-graph/types';
30
30
  export { createEmptyGraph, GRAPH_SCHEMA_VERSION, inferPackageBoundary, isSchemaVersionAtLeast, normalizeGraphPath, REPO_GRAPH_FILENAME, updateGraphMetadata, } from './repo-graph/types';
31
31
  export { validateGraphEdge, validateGraphNode, validateWorkspace, } from './repo-graph/validation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.151.1",
3
+ "version": "7.152.1",
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",
@@ -45,7 +45,7 @@
45
45
  ".opencode/skills/brainstorm",
46
46
  ".opencode/skills/specify",
47
47
  ".opencode/skills/clarify-spec",
48
- ".opencode/skills/resume",
48
+ ".opencode/skills/swarm-resume",
49
49
  ".opencode/skills/clarify",
50
50
  ".opencode/skills/discover",
51
51
  ".opencode/skills/consult",