opencode-swarm 7.139.7 → 7.140.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.
Files changed (38) hide show
  1. package/dist/cli/{config-doctor-pc48vfzg.js → config-doctor-3bm8pvnb.js} +2 -2
  2. package/dist/cli/{curation-policy-2rh3zysm.js → curation-policy-zkvkg4np.js} +2 -2
  3. package/dist/cli/{curator-tm9rp9yx.js → curator-78ejknh2.js} +12 -12
  4. package/dist/cli/{curator-llm-factory-de10hnhj.js → curator-llm-factory-kbqtk2wm.js} +12 -12
  5. package/dist/cli/{guardrail-explain-979dxbd5.js → guardrail-explain-d6emse0z.js} +13 -13
  6. package/dist/cli/{guardrail-log-wxa8janm.js → guardrail-log-27d6r2xq.js} +3 -3
  7. package/dist/cli/{hive-promoter-w4ezne1c.js → hive-promoter-r5x4a2ta.js} +12 -12
  8. package/dist/cli/{index-rvr1p73g.js → index-0jbhmm8b.js} +1 -1
  9. package/dist/cli/{index-92j14gdt.js → index-0pqh1710.js} +1 -1
  10. package/dist/cli/{index-ssjm3458.js → index-43k8ntw7.js} +1 -1
  11. package/dist/cli/{index-6d60gctc.js → index-6d7jkk1s.js} +2 -2
  12. package/dist/cli/{index-7f4jhdhw.js → index-6ykm2eha.js} +1 -1
  13. package/dist/cli/{index-sd7ajhb5.js → index-6yv6wda9.js} +1 -1
  14. package/dist/cli/{index-3w0kxqyy.js → index-bdnrrx3w.js} +1 -1
  15. package/dist/cli/{index-3r61js2q.js → index-chycpf9y.js} +2 -2
  16. package/dist/cli/{index-k4tcdnvd.js → index-f8dhh53t.js} +3 -3
  17. package/dist/cli/{index-f7wq4q9r.js → index-fxw0zvxc.js} +5 -5
  18. package/dist/cli/{index-4tjk6k4a.js → index-ma8vk3v1.js} +2 -2
  19. package/dist/cli/{index-nxs7r6sd.js → index-mb34t6w9.js} +36 -36
  20. package/dist/cli/{index-n4x9racs.js → index-p6h8f59v.js} +1 -1
  21. package/dist/cli/{index-cp592623.js → index-s38e38qy.js} +4 -4
  22. package/dist/cli/{index-vx6mwms2.js → index-scbp2d32.js} +14 -14
  23. package/dist/cli/{index-j0gy1ggg.js → index-zebb6yw0.js} +1 -1
  24. package/dist/cli/index.js +12 -12
  25. package/dist/cli/{knowledge-escalator-kyejsd7z.js → knowledge-escalator-qjdfv9sj.js} +3 -3
  26. package/dist/cli/{knowledge-events-n5z7w8x2.js → knowledge-events-7szzg70x.js} +1 -1
  27. package/dist/cli/{knowledge-store-s65wnc1m.js → knowledge-store-9mr7a9n8.js} +1 -1
  28. package/dist/cli/{knowledge-validator-cgtmhqya.js → knowledge-validator-58s2j0dp.js} +4 -4
  29. package/dist/cli/{scan-cursor-6z3rbdxp.js → scan-cursor-h3j1egky.js} +2 -2
  30. package/dist/cli/{schema-fvj8smjz.js → schema-9ryqandr.js} +1 -1
  31. package/dist/cli/{skill-generator-9kzsefn1.js → skill-generator-66ez26yh.js} +5 -5
  32. package/dist/hooks/compaction-customizer.d.ts +11 -0
  33. package/dist/index.js +115 -113
  34. package/dist/tools/repo-graph/ask.d.ts +24 -0
  35. package/dist/tools/repo-graph/query.d.ts +2 -0
  36. package/dist/tools/repo-graph/types.d.ts +24 -0
  37. package/dist/tools/repo-graph.d.ts +3 -2
  38. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import type { AskOptions, AskResult, GraphNode, RepoGraph } from './types';
2
+ declare function tokenize(text: string): string[];
3
+ declare function splitCompound(token: string): string[];
4
+ declare function buildVocabulary(graph: RepoGraph): Set<string>;
5
+ declare function expandTerms(tokens: string[], vocab: Set<string>): string[];
6
+ declare function computeIDF(term: string, nodes: GraphNode[]): number;
7
+ declare function lexicalScore(node: GraphNode, terms: string[], idfMap: Map<string, number>): {
8
+ score: number;
9
+ matchedTerms: string[];
10
+ };
11
+ declare function buildUndirectedAdjacency(graph: RepoGraph, nodeKeys: string[]): Map<string, Set<string>>;
12
+ declare function personalizedPageRank(adj: Map<string, Set<string>>, restart: Map<string, number>, nodeKeys: string[]): Map<string, number>;
13
+ export declare function askGraph(graph: RepoGraph, question: string, options?: AskOptions): AskResult;
14
+ export declare const _internals: {
15
+ tokenize: typeof tokenize;
16
+ splitCompound: typeof splitCompound;
17
+ expandTerms: typeof expandTerms;
18
+ buildVocabulary: typeof buildVocabulary;
19
+ computeIDF: typeof computeIDF;
20
+ lexicalScore: typeof lexicalScore;
21
+ personalizedPageRank: typeof personalizedPageRank;
22
+ buildUndirectedAdjacency: typeof buildUndirectedAdjacency;
23
+ };
24
+ export {};
@@ -48,6 +48,8 @@ export declare function getLocalizationContext(graph: RepoGraph, filePath: strin
48
48
  export declare function getContextPack(graph: RepoGraph, file: string, symbol: string, options?: {
49
49
  maxDepth?: number;
50
50
  maxTokens?: number;
51
+ includeSource?: boolean;
52
+ directory?: string;
51
53
  }): ContextPackResult;
52
54
  export declare function getPackageBoundaries(graph: RepoGraph, topN?: number): PackageBoundarySummary[];
53
55
  export declare function buildOntologyPreflightPacket(graph: RepoGraph, filePaths?: string[], options?: {
@@ -218,6 +218,8 @@ export interface ContextPackSpan {
218
218
  startLine: number;
219
219
  endLine: number;
220
220
  mode: 'full' | 'signature';
221
+ text?: string;
222
+ note?: string;
221
223
  }
222
224
  /**
223
225
  * Result of a context-pack query: the set of spans needed to understand
@@ -239,6 +241,28 @@ export interface ContextPackResult {
239
241
  estimatedTokens: number;
240
242
  /** Optional human-readable note about scope or limitations. */
241
243
  note?: string;
244
+ /** Whether source text was embedded in spans (only present when include_source was requested). */
245
+ sourceIncluded?: boolean;
246
+ }
247
+ export interface AskHit {
248
+ file: string;
249
+ score: number;
250
+ matchedTerms: string[];
251
+ topExports: string[];
252
+ role: string;
253
+ community: string;
254
+ }
255
+ export interface AskOptions {
256
+ topN?: number;
257
+ }
258
+ export interface AskResult {
259
+ hits: AskHit[];
260
+ expandedTerms: string[];
261
+ budget: {
262
+ requested: number;
263
+ returned: number;
264
+ dropped: number;
265
+ };
242
266
  }
243
267
  /**
244
268
  * A file that references a specific exported symbol of a target file.
@@ -14,6 +14,7 @@
14
14
  *
15
15
  * All existing imports of this module continue to work unchanged.
16
16
  */
17
+ export { _internals as _askInternals, askGraph } from './repo-graph/ask';
17
18
  export type { RepoGraphInputMetadata, RepoGraphInputWalkOptions, RepoGraphInputWalkResult, ScanResult, } from './repo-graph/builder';
18
19
  export { addEdge, buildWorkspaceGraph, buildWorkspaceGraphAsync, isGraphWideInputPath, isScannableSourcePath, resolveModuleSpecifier, upsertNode, walkRepoGraphInputs, } from './repo-graph/builder';
19
20
  export { clearCache, getCachedGraph, getCachedMtime, isDirty, markDirty, setCachedGraph, } from './repo-graph/cache';
@@ -25,6 +26,6 @@ export { extractFileOntology } from './repo-graph/ontology';
25
26
  export type { DeadExportsOptions } from './repo-graph/query';
26
27
  export { buildOntologyPreflightPacket, getBlastRadius, getCallers, getContextPack, getDeadExports, getDependencies, getFileOntology, getGraphHealth, getGraphNode, getImporters, getKeyFiles, getLocalizationContext, getPackageBoundaries, getSymbolConsumers, isGraphFresh, resetQueryCache, } from './repo-graph/query';
27
28
  export { getGraphPath, loadGraph, loadGraphSync, loadOrCreateGraph, saveGraph, saveIfDirty, } from './repo-graph/storage';
28
- export type { 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 { createEmptyGraph, GRAPH_SCHEMA_VERSION, isSchemaVersionAtLeast, normalizeGraphPath, REPO_GRAPH_FILENAME, updateGraphMetadata, } 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, SymbolReference, } from './repo-graph/types';
30
+ export { createEmptyGraph, GRAPH_SCHEMA_VERSION, inferPackageBoundary, isSchemaVersionAtLeast, normalizeGraphPath, REPO_GRAPH_FILENAME, updateGraphMetadata, } from './repo-graph/types';
30
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.139.7",
3
+ "version": "7.140.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",