@swarmvaultai/engine 1.2.0 → 1.3.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/README.md +3 -3
- package/dist/hooks/claude.js +0 -0
- package/dist/hooks/copilot.js +0 -0
- package/dist/hooks/gemini.js +0 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +158 -28
- package/package.json +9 -8
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ This matters because many "OpenAI-compatible" backends only implement part of th
|
|
|
206
206
|
### Compile + Query
|
|
207
207
|
|
|
208
208
|
- `compileVault(rootDir, { approve })` writes wiki pages, graph data, and search state using the vault schema as guidance, or stages a review bundle
|
|
209
|
-
- compile also writes graph orientation
|
|
209
|
+
- compile also writes graph orientation artifacts such as `wiki/graph/report.md`, `wiki/graph/share-card.md`, `wiki/graph/share-card.svg`, `wiki/graph/report.json`, and `wiki/graph/communities/<community>.md`
|
|
210
210
|
- compile propagates semantic tags onto page frontmatter and source-backed graph nodes, and records deterministic `contradicts` edges plus a Contradictions section in the graph report when conflicting claims are found
|
|
211
211
|
- `benchmarkVault(rootDir, { questions })` writes `state/benchmark.json` and folds the latest benchmark summary into `wiki/graph/report.md` and `wiki/graph/report.json`
|
|
212
212
|
- semantic graph query and embedding-backed similarity enrichment cache vectors under `state/embeddings.json` so graph-semantic refresh stays incremental
|
|
@@ -218,7 +218,7 @@ This matters because many "OpenAI-compatible" backends only implement part of th
|
|
|
218
218
|
- `explainGraphVault(rootDir, target)` returns node, community, neighbor, provenance, and group-pattern details
|
|
219
219
|
- `listGraphHyperedges(rootDir, target?, limit?)` returns graph hyperedges globally or for a specific node/page target
|
|
220
220
|
- `listGodNodes(rootDir, limit)` returns the most connected bridge-heavy graph nodes
|
|
221
|
-
- `buildGraphShareArtifact(...)` and `
|
|
221
|
+
- `buildGraphShareArtifact(...)`, `renderGraphShareMarkdown(...)`, and `renderGraphShareSvg(...)` produce the post-ready text and 1200x630 visual card used by `wiki/graph/share-card.md`, `wiki/graph/share-card.svg`, and the CLI `graph share` command
|
|
222
222
|
- project-aware compile also builds `wiki/projects/index.md` plus `wiki/projects/<project>/index.md` rollups without duplicating page trees
|
|
223
223
|
- human-authored insight pages in `wiki/insights/` are indexed into search and available to query without being rewritten by compile
|
|
224
224
|
- `chart` and `image` formats save wrapper markdown pages plus local output assets under `wiki/outputs/assets/<slug>/`
|
|
@@ -263,7 +263,7 @@ Running the engine produces a local workspace with these main areas:
|
|
|
263
263
|
- `raw/sources/`: immutable source copies
|
|
264
264
|
- `raw/assets/`: copied attachments referenced by ingested markdown bundles and remote URL ingests
|
|
265
265
|
- `wiki/`: generated markdown pages, the append-only `log.md` activity trail, staged candidates, saved query outputs, exploration hub pages, and a human-only `insights/` area
|
|
266
|
-
- `wiki/graph/`: generated graph report pages,
|
|
266
|
+
- `wiki/graph/`: generated graph report pages, markdown/SVG share cards, and per-community summaries derived from `state/graph.json`
|
|
267
267
|
- `wiki/graph/report.json`: machine-readable graph report data used by the viewer and export surfaces
|
|
268
268
|
- `wiki/outputs/assets/`: local chart/image artifacts and JSON manifests for saved visual outputs
|
|
269
269
|
- `wiki/code/`: generated module pages for ingested code sources
|
package/dist/hooks/claude.js
CHANGED
|
File without changes
|
package/dist/hooks/copilot.js
CHANGED
|
File without changes
|
package/dist/hooks/gemini.js
CHANGED
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -2009,6 +2009,7 @@ declare function buildGraphShareArtifact(input: {
|
|
|
2009
2009
|
vaultName?: string;
|
|
2010
2010
|
}): GraphShareArtifact;
|
|
2011
2011
|
declare function renderGraphShareMarkdown(artifact: GraphShareArtifact): string;
|
|
2012
|
+
declare function renderGraphShareSvg(artifact: GraphShareArtifact): string;
|
|
2012
2013
|
|
|
2013
2014
|
declare function graphDiff(oldGraph: GraphArtifact, newGraph: GraphArtifact): GraphDiffResult;
|
|
2014
2015
|
/**
|
|
@@ -2613,4 +2614,4 @@ declare function createWebSearchAdapter(id: string, config: WebSearchProviderCon
|
|
|
2613
2614
|
type WebSearchTaskId = "deepLintProvider" | "queryProvider" | "exploreProvider";
|
|
2614
2615
|
declare function getWebSearchAdapterForTask(rootDir: string, task: WebSearchTaskId): Promise<WebSearchAdapter>;
|
|
2615
2616
|
|
|
2616
|
-
export { ALL_MIGRATIONS, type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalDiffHunk, type ApprovalDiffLine, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalFrontmatterChange, type ApprovalManifest, type ApprovalStructuredDiff, type ApprovalSummary, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkByClassEntry, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type ConsolidationConfig, type ConsolidationPromotion, type ConsolidationResult, DEFAULT_CONSOLIDATION_CONFIG, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HALF_LIFE_DAYS_BY_SOURCE_CLASS, DEFAULT_PROMOTION_CONFIG, DEFAULT_REDACTION_PATTERNS, DEFAULT_STALE_THRESHOLD, type DegradationOutcome, type DirectoryIngestFailure, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type FreshnessConfig, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphDiffResult, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type GraphShareArtifact, type GuidedSessionMode, type GuidedSourceSessionAnswers, type GuidedSourceSessionQuestion, type GuidedSourceSessionRecord, type GuidedSourceSessionStatus, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InputIngestResult, type InstallAgentOptions, type InstallAgentResult, LARGE_REPO_NODE_THRESHOLD, LOCAL_WHISPER_MODEL_SIZES, type LintFinding, type LintOptions, type LocalWhisperAdapterOptions, type LocalWhisperBinaryDiscovery, LocalWhisperProviderAdapter, type LocalWhisperSetupStatus, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type MemoryTier, type MigrationPlan, type MigrationResult, type MigrationStep, type Neo4jGraphSinkConfig, OPENAI_COMPATIBLE_CAPABILITY_MATRIX, type OpenAiCompatiblePresetId, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type PromotionDecision, type PromotionGateKind, type PromotionGateResult, type PromotionSession, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderPresetCapability, type ProviderRegistrationOptions, type ProviderRegistrationResult, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RedactionMatchSummary, type RedactionPatternConfig, type RedactionSettings, type RedactionSummary, type RepoSyncResult, type ResolvedLargeRepoDefaults, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledConsolidateTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceClass, type SourceExtractionArtifact, type SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type SynthesizedHubEdge, type SynthesizedHubNode, type SynthesizedHyperedgeHubs, type VaultConfig, type VaultDashboardPack, type VaultProfileConfig, type VaultProfilePreset, type VaultVersionRecord, type WatchConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, type WhisperRunResult, type WhisperRunner, acceptApproval, addInput, addManagedSource, addWatchedRoot, agentTypeSchema, applyDecayToPages, archiveCandidate, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildGraphShareArtifact, buildRedactor, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, detectVaultVersion, discoverLocalWhisperBinary, downloadWhisperModel, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, expectedModelPath, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportObsidianCanvas, exportObsidianVault, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listPages, listSchedules, listTrackedRepoRoots, listWatchedRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, lookupPresetCapabilities, markSuperseded, modelDownloadUrl, pathGraphVault, persistDecayFrontmatter, planMigration, previewCandidatePromotions, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, registerLocalWhisperProvider, rejectApproval, reloadManagedSources, removeWatchedRoot, renderGraphShareMarkdown, resetDecay, resolveConsolidationConfig, resolveDecayConfig, resolveLargeRepoDefaults, resolvePaths, resolveRedactionPatterns, resolveWatchedRepoRoots, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runConsolidation, runDecayPass, runMigration, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, summarizeLocalWhisperSetup, syncTrackedRepos, syncTrackedReposForWatch, synthesizeHyperedgeHubs, trimToTokenBudget, uninstallGitHooks, watchVault, webSearchProviderTypeSchema, withCapabilityFallback };
|
|
2617
|
+
export { ALL_MIGRATIONS, type AddOptions, type AddResult, type AgentType, type AnalyzedTerm, type ApprovalBundleType, type ApprovalChangeType, type ApprovalDetail, type ApprovalDiffHunk, type ApprovalDiffLine, type ApprovalEntry, type ApprovalEntryDetail, type ApprovalEntryLabel, type ApprovalEntryStatus, type ApprovalFrontmatterChange, type ApprovalManifest, type ApprovalStructuredDiff, type ApprovalSummary, type AudioTranscriptionRequest, type AudioTranscriptionResponse, type BenchmarkArtifact, type BenchmarkByClassEntry, type BenchmarkOptions, type BenchmarkQuestionResult, type BenchmarkSummary, type BlastRadiusResult, type CandidatePromotionConfig, type CandidateRecord, type ChartDatum, type ChartSpec, type ClaimStatus, type CodeAnalysis, type CodeDiagnostic, type CodeImport, type CodeIndexArtifact, type CodeIndexEntry, type CodeLanguage, type CodeSymbol, type CodeSymbolKind, type CommandRoleExecutorConfig, type CompileOptions, type CompileResult, type CompileState, type ConsolidationConfig, type ConsolidationPromotion, type ConsolidationResult, DEFAULT_CONSOLIDATION_CONFIG, DEFAULT_HALF_LIFE_DAYS, DEFAULT_HALF_LIFE_DAYS_BY_SOURCE_CLASS, DEFAULT_PROMOTION_CONFIG, DEFAULT_REDACTION_PATTERNS, DEFAULT_STALE_THRESHOLD, type DegradationOutcome, type DirectoryIngestFailure, type DirectoryIngestResult, type DirectoryIngestSkip, type EmbeddingCacheArtifact, type EmbeddingCacheEntry, type EvidenceClass, type ExploreOptions, type ExploreResult, type ExploreStepResult, type ExtractionClaim, type ExtractionKind, type ExtractionTerm, type Freshness, type FreshnessConfig, type GenerationAttachment, type GenerationRequest, type GenerationResponse, type GitHookStatus, type GraphArtifact, type GraphDiffResult, type GraphEdge, type GraphExplainNeighbor, type GraphExplainResult, type GraphExportFormat, type GraphExportResult, type GraphHyperedge, type GraphNode, type GraphPage, type GraphPathResult, type GraphPushCounts, type GraphPushNeo4jOptions, type GraphPushResult, type GraphQueryMatch, type GraphQueryResult, type GraphReportArtifact, type GraphShareArtifact, type GuidedSessionMode, type GuidedSourceSessionAnswers, type GuidedSourceSessionQuestion, type GuidedSourceSessionRecord, type GuidedSourceSessionStatus, type ImageGenerationRequest, type ImageGenerationResponse, type ImageVisionExtraction, type InboxImportResult, type InboxImportSkip, type IngestOptions, type InitOptions, type InputIngestResult, type InstallAgentOptions, type InstallAgentResult, LARGE_REPO_NODE_THRESHOLD, LOCAL_WHISPER_MODEL_SIZES, type LintFinding, type LintOptions, type LocalWhisperAdapterOptions, type LocalWhisperBinaryDiscovery, LocalWhisperProviderAdapter, type LocalWhisperSetupStatus, type ManagedSourceAddOptions, type ManagedSourceAddResult, type ManagedSourceDeleteResult, type ManagedSourceKind, type ManagedSourceRecord, type ManagedSourceReloadOptions, type ManagedSourceReloadResult, type ManagedSourceStatus, type ManagedSourceSyncCounts, type ManagedSourcesArtifact, type MemoryTier, type MigrationPlan, type MigrationResult, type MigrationStep, type Neo4jGraphSinkConfig, OPENAI_COMPATIBLE_CAPABILITY_MATRIX, type OpenAiCompatiblePresetId, type OrchestrationConfig, type OrchestrationFinding, type OrchestrationProposal, type OrchestrationRole, type OrchestrationRoleConfig, type OrchestrationRoleResult, type OutputAsset, type OutputAssetRole, type OutputFormat, type OutputOrigin, type PageKind, type PageManager, type PageStatus, type PendingSemanticRefreshEntry, type Polarity, type PromotionDecision, type PromotionGateKind, type PromotionGateResult, type PromotionSession, type ProviderAdapter, type ProviderCapability, type ProviderConfig, type ProviderPresetCapability, type ProviderRegistrationOptions, type ProviderRegistrationResult, type ProviderRoleExecutorConfig, type ProviderType, type QueryOptions, type QueryResult, type RedactionMatchSummary, type RedactionPatternConfig, type RedactionSettings, type RedactionSummary, type RepoSyncResult, type ResolvedLargeRepoDefaults, type ResolvedPaths, type ReviewActionResult, type RoleExecutorConfig, type SceneElement, type SceneSpec, type ScheduleController, type ScheduleJobConfig, type ScheduleStateRecord, type ScheduleTriggerConfig, type ScheduledCompileTask, type ScheduledConsolidateTask, type ScheduledExploreTask, type ScheduledLintTask, type ScheduledQueryTask, type ScheduledRunResult, type ScheduledTaskConfig, type SearchResult, type SourceAnalysis, type SourceAttachment, type SourceCaptureType, type SourceClaim, type SourceClass, type SourceExtractionArtifact, type SourceGuideResult, type SourceKind, type SourceManifest, type SourceRationale, type SourceReviewResult, type SynthesizedHubEdge, type SynthesizedHubNode, type SynthesizedHyperedgeHubs, type VaultConfig, type VaultDashboardPack, type VaultProfileConfig, type VaultProfilePreset, type VaultVersionRecord, type WatchConfig, type WatchController, type WatchOptions, type WatchRepoSyncResult, type WatchRunRecord, type WatchStatusResult, type WebSearchAdapter, type WebSearchProviderConfig, type WebSearchProviderType, type WebSearchResult, type WhisperRunResult, type WhisperRunner, acceptApproval, addInput, addManagedSource, addWatchedRoot, agentTypeSchema, applyDecayToPages, archiveCandidate, assertProviderCapability, autoCommitWikiChanges, benchmarkVault, blastRadius, blastRadiusVault, bootstrapDemo, buildConfiguredRedactor, buildGraphShareArtifact, buildRedactor, compileVault, computeDecayScore, consolidateVault, createMcpServer, createProvider, createSupersessionEdge, createWebSearchAdapter, defaultVaultConfig, defaultVaultSchema, deleteManagedSource, detectVaultVersion, discoverLocalWhisperBinary, downloadWhisperModel, estimatePageTokens, estimateTokens, evaluateCandidateForPromotion, expectedModelPath, explainGraphVault, exploreVault, exportGraphFormat, exportGraphHtml, exportGraphReportHtml, exportObsidianCanvas, exportObsidianVault, getGitHookStatus, getProviderForTask, getWatchStatus, getWebSearchAdapterForTask, getWorkspaceInfo, graphDiff, guideManagedSource, guideSourceScope, importInbox, ingestDirectory, ingestInput, ingestInputDetailed, initVault, initWorkspace, installAgent, installConfiguredAgents, installGitHooks, lintVault, listApprovals, listCandidates, listGodNodes, listGraphHyperedges, listManagedSourceRecords, listManifests, listPages, listSchedules, listTrackedRepoRoots, listWatchedRoots, loadVaultConfig, loadVaultSchema, loadVaultSchemas, lookupPresetCapabilities, markSuperseded, modelDownloadUrl, pathGraphVault, persistDecayFrontmatter, planMigration, previewCandidatePromotions, promoteCandidate, providerCapabilitySchema, providerTypeSchema, pushGraphNeo4j, queryGraphVault, queryVault, readApproval, readExtractedText, readGraphReport, readPage, registerLocalWhisperProvider, rejectApproval, reloadManagedSources, removeWatchedRoot, renderGraphShareMarkdown, renderGraphShareSvg, resetDecay, resolveConsolidationConfig, resolveDecayConfig, resolveLargeRepoDefaults, resolvePaths, resolveRedactionPatterns, resolveWatchedRepoRoots, resumeSourceSession, reviewManagedSource, reviewSourceScope, runAutoPromotion, runConsolidation, runDecayPass, runMigration, runSchedule, runWatchCycle, searchVault, serveSchedules, stageGeneratedOutputPages, startGraphServer, startMcpServer, summarizeLocalWhisperSetup, syncTrackedRepos, syncTrackedReposForWatch, synthesizeHyperedgeHubs, trimToTokenBudget, uninstallGitHooks, watchVault, webSearchProviderTypeSchema, withCapabilityFallback };
|
package/dist/index.js
CHANGED
|
@@ -7113,6 +7113,45 @@ function buildShortPost(input) {
|
|
|
7113
7113
|
"Everything stays local. Try: npm install -g @swarmvaultai/cli && swarmvault scan ./your-repo"
|
|
7114
7114
|
].join("\n");
|
|
7115
7115
|
}
|
|
7116
|
+
function escapeXml(value) {
|
|
7117
|
+
return String(value ?? "").replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7118
|
+
}
|
|
7119
|
+
function clipText(value, maxLength) {
|
|
7120
|
+
const normalized = value.replaceAll("\n", " ").replaceAll("\r", " ").trim();
|
|
7121
|
+
if (normalized.length <= maxLength) {
|
|
7122
|
+
return normalized;
|
|
7123
|
+
}
|
|
7124
|
+
return `${normalized.slice(0, Math.max(0, maxLength - 3)).trimEnd()}...`;
|
|
7125
|
+
}
|
|
7126
|
+
function svgText(input) {
|
|
7127
|
+
const attrs = [
|
|
7128
|
+
`x="${input.x}"`,
|
|
7129
|
+
`y="${input.y}"`,
|
|
7130
|
+
`font-size="${input.size}"`,
|
|
7131
|
+
`fill="${input.fill ?? "#f8fafc"}"`,
|
|
7132
|
+
`font-weight="${input.weight ?? 500}"`,
|
|
7133
|
+
`text-anchor="${input.anchor ?? "start"}"`,
|
|
7134
|
+
input.opacity === void 0 ? "" : `opacity="${input.opacity}"`
|
|
7135
|
+
].filter(Boolean);
|
|
7136
|
+
return ` <text ${attrs.join(" ")}>${escapeXml(input.text)}</text>`;
|
|
7137
|
+
}
|
|
7138
|
+
function svgStatCard(input) {
|
|
7139
|
+
return [
|
|
7140
|
+
` <rect x="${input.x}" y="${input.y}" width="168" height="92" rx="14" fill="#111827" stroke="#334155" />`,
|
|
7141
|
+
svgText({ x: input.x + 20, y: input.y + 36, text: String(input.value), size: 30, fill: "#ecfeff", weight: 800 }),
|
|
7142
|
+
svgText({ x: input.x + 20, y: input.y + 66, text: input.label, size: 16, fill: "#94a3b8", weight: 600 })
|
|
7143
|
+
];
|
|
7144
|
+
}
|
|
7145
|
+
function svgListLines(input) {
|
|
7146
|
+
const items = input.items.length ? input.items.slice(0, input.maxItems) : [input.empty];
|
|
7147
|
+
const lines = [svgText({ x: input.x, y: input.y, text: input.title, size: 19, fill: "#a7f3d0", weight: 800 })];
|
|
7148
|
+
for (const [index, item] of items.entries()) {
|
|
7149
|
+
lines.push(
|
|
7150
|
+
svgText({ x: input.x, y: input.y + 38 + index * 30, text: `- ${clipText(item, 58)}`, size: 19, fill: "#e2e8f0", weight: 600 })
|
|
7151
|
+
);
|
|
7152
|
+
}
|
|
7153
|
+
return lines;
|
|
7154
|
+
}
|
|
7116
7155
|
function buildGraphShareArtifact(input) {
|
|
7117
7156
|
const { graph, report } = input;
|
|
7118
7157
|
const vaultName = displayVaultName(input.vaultName);
|
|
@@ -7268,6 +7307,87 @@ function renderGraphShareMarkdown(artifact) {
|
|
|
7268
7307
|
}
|
|
7269
7308
|
return `${lines.join("\n")}`;
|
|
7270
7309
|
}
|
|
7310
|
+
function renderGraphShareSvg(artifact) {
|
|
7311
|
+
const topHubs = artifact.highlights.topHubs.map((node) => node.degree ? `${node.label} (${node.degree})` : node.label);
|
|
7312
|
+
const bridges = artifact.highlights.bridgeNodes.map((node) => node.label);
|
|
7313
|
+
const surprise = artifact.highlights.surprisingConnections[0];
|
|
7314
|
+
const surpriseLine = surprise ? `${surprise.sourceLabel} ${surprise.relation} ${surprise.targetLabel}` : "Add more sources to reveal the first surprising link";
|
|
7315
|
+
const generated = new Date(artifact.generatedAt);
|
|
7316
|
+
const generatedLabel = Number.isNaN(generated.getTime()) ? artifact.generatedAt : generated.toISOString().slice(0, 10);
|
|
7317
|
+
const lines = [
|
|
7318
|
+
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
7319
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="630" viewBox="0 0 1200 630" role="img" aria-labelledby="title desc">`,
|
|
7320
|
+
` <title>SwarmVault share card for ${escapeXml(artifact.vaultName)}</title>`,
|
|
7321
|
+
` <desc>${escapeXml(artifact.tagline)}</desc>`,
|
|
7322
|
+
" <defs>",
|
|
7323
|
+
' <linearGradient id="background" x1="0" y1="0" x2="1" y2="1">',
|
|
7324
|
+
' <stop offset="0%" stop-color="#020617" />',
|
|
7325
|
+
' <stop offset="58%" stop-color="#0f172a" />',
|
|
7326
|
+
' <stop offset="100%" stop-color="#063f37" />',
|
|
7327
|
+
" </linearGradient>",
|
|
7328
|
+
' <linearGradient id="accent" x1="0" y1="0" x2="1" y2="0">',
|
|
7329
|
+
' <stop offset="0%" stop-color="#22c55e" />',
|
|
7330
|
+
' <stop offset="100%" stop-color="#06b6d4" />',
|
|
7331
|
+
" </linearGradient>",
|
|
7332
|
+
" </defs>",
|
|
7333
|
+
' <rect width="1200" height="630" fill="url(#background)" />',
|
|
7334
|
+
' <rect x="34" y="34" width="1132" height="562" rx="28" fill="#020617" opacity="0.72" stroke="#1f2937" />',
|
|
7335
|
+
' <path d="M92 512 C214 386 314 456 438 326 C540 218 648 284 746 194 C860 88 1004 152 1110 84" fill="none" stroke="#22c55e" stroke-width="4" opacity="0.35" />',
|
|
7336
|
+
' <circle cx="92" cy="512" r="9" fill="#22c55e" />',
|
|
7337
|
+
' <circle cx="438" cy="326" r="10" fill="#06b6d4" />',
|
|
7338
|
+
' <circle cx="746" cy="194" r="10" fill="#a7f3d0" />',
|
|
7339
|
+
' <circle cx="1110" cy="84" r="9" fill="#22c55e" />',
|
|
7340
|
+
svgText({ x: 78, y: 96, text: "SwarmVault", size: 28, fill: "#86efac", weight: 900 }),
|
|
7341
|
+
svgText({ x: 78, y: 152, text: clipText(artifact.vaultName, 42), size: 54, fill: "#f8fafc", weight: 900 }),
|
|
7342
|
+
svgText({ x: 78, y: 196, text: clipText(artifact.tagline, 86), size: 22, fill: "#cbd5e1", weight: 600 }),
|
|
7343
|
+
...svgStatCard({ x: 78, y: 242, label: "Sources", value: artifact.overview.sources }),
|
|
7344
|
+
...svgStatCard({ x: 270, y: 242, label: "Wiki pages", value: artifact.overview.pages }),
|
|
7345
|
+
...svgStatCard({ x: 462, y: 242, label: "Graph nodes", value: artifact.overview.nodes }),
|
|
7346
|
+
...svgStatCard({ x: 654, y: 242, label: "Edges", value: artifact.overview.edges }),
|
|
7347
|
+
` <rect x="870" y="240" width="246" height="94" rx="18" fill="url(#accent)" opacity="0.95" />`,
|
|
7348
|
+
svgText({ x: 993, y: 278, text: "Local-first", size: 22, fill: "#052e16", weight: 900, anchor: "middle" }),
|
|
7349
|
+
svgText({ x: 993, y: 307, text: "no API keys required", size: 18, fill: "#064e3b", weight: 800, anchor: "middle" }),
|
|
7350
|
+
...svgListLines({
|
|
7351
|
+
x: 82,
|
|
7352
|
+
y: 398,
|
|
7353
|
+
title: "Top hubs",
|
|
7354
|
+
items: topHubs,
|
|
7355
|
+
empty: "Still emerging",
|
|
7356
|
+
maxItems: 3
|
|
7357
|
+
}),
|
|
7358
|
+
...svgListLines({
|
|
7359
|
+
x: 470,
|
|
7360
|
+
y: 398,
|
|
7361
|
+
title: "Bridge nodes",
|
|
7362
|
+
items: bridges,
|
|
7363
|
+
empty: "Still emerging",
|
|
7364
|
+
maxItems: 3
|
|
7365
|
+
}),
|
|
7366
|
+
svgText({ x: 820, y: 398, text: "Surprising link", size: 19, fill: "#a7f3d0", weight: 800 }),
|
|
7367
|
+
svgText({ x: 820, y: 436, text: clipText(surpriseLine, 40), size: 21, fill: "#e2e8f0", weight: 800 }),
|
|
7368
|
+
svgText({
|
|
7369
|
+
x: 820,
|
|
7370
|
+
y: 470,
|
|
7371
|
+
text: clipText(surprise?.why ?? "Run compile again after adding more sources.", 44),
|
|
7372
|
+
size: 17,
|
|
7373
|
+
fill: "#94a3b8",
|
|
7374
|
+
weight: 600
|
|
7375
|
+
}),
|
|
7376
|
+
` <rect x="78" y="536" width="744" height="42" rx="12" fill="#0f172a" stroke="#1e293b" />`,
|
|
7377
|
+
svgText({
|
|
7378
|
+
x: 100,
|
|
7379
|
+
y: 564,
|
|
7380
|
+
text: "npm install -g @swarmvaultai/cli && swarmvault scan ./your-repo",
|
|
7381
|
+
size: 18,
|
|
7382
|
+
fill: "#d1fae5",
|
|
7383
|
+
weight: 800
|
|
7384
|
+
}),
|
|
7385
|
+
svgText({ x: 1116, y: 564, text: `Generated ${generatedLabel}`, size: 16, fill: "#94a3b8", weight: 600, anchor: "end" }),
|
|
7386
|
+
"</svg>",
|
|
7387
|
+
""
|
|
7388
|
+
];
|
|
7389
|
+
return lines.join("\n");
|
|
7390
|
+
}
|
|
7271
7391
|
|
|
7272
7392
|
// src/graph-query-core.ts
|
|
7273
7393
|
var NODE_TYPE_PRIORITY = {
|
|
@@ -9106,7 +9226,7 @@ function buildGraphReportPage(input) {
|
|
|
9106
9226
|
function buildGraphSharePage(input) {
|
|
9107
9227
|
const pageId = "graph:share-card";
|
|
9108
9228
|
const pathValue = "graph/share-card.md";
|
|
9109
|
-
const artifact = buildGraphShareArtifact({
|
|
9229
|
+
const artifact = input.artifact ?? buildGraphShareArtifact({
|
|
9110
9230
|
graph: input.graph,
|
|
9111
9231
|
report: input.report,
|
|
9112
9232
|
vaultName: input.vaultName
|
|
@@ -20354,7 +20474,7 @@ async function runDeepLint(rootDir, structuralFindings, options = {}) {
|
|
|
20354
20474
|
|
|
20355
20475
|
// src/output-artifacts.ts
|
|
20356
20476
|
import { z as z6 } from "zod";
|
|
20357
|
-
function
|
|
20477
|
+
function escapeXml2(value) {
|
|
20358
20478
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
20359
20479
|
}
|
|
20360
20480
|
function clampNumber(value, min, max) {
|
|
@@ -20425,7 +20545,7 @@ function renderChartSvg(spec) {
|
|
|
20425
20545
|
const y = projectY(value);
|
|
20426
20546
|
return [
|
|
20427
20547
|
`<line x1="${margin.left}" y1="${y}" x2="${width - margin.right}" y2="${y}" stroke="#dbe4ec" stroke-width="1" />`,
|
|
20428
|
-
`<text x="${margin.left - 16}" y="${y + 4}" text-anchor="end" font-size="14" fill="#475569">${
|
|
20548
|
+
`<text x="${margin.left - 16}" y="${y + 4}" text-anchor="end" font-size="14" fill="#475569">${escapeXml2(value.toFixed(0))}</text>`
|
|
20429
20549
|
].join("");
|
|
20430
20550
|
}).join("");
|
|
20431
20551
|
const bars = spec.kind === "bar" ? points.map((point) => {
|
|
@@ -20433,7 +20553,7 @@ function renderChartSvg(spec) {
|
|
|
20433
20553
|
const barHeight = Math.max(8, Math.abs(zeroY - point.y));
|
|
20434
20554
|
return [
|
|
20435
20555
|
`<rect x="${point.centerX - barWidth / 2}" y="${top}" width="${barWidth}" height="${barHeight}" rx="12" fill="#0ea5e9" opacity="0.92" />`,
|
|
20436
|
-
`<text x="${point.centerX}" y="${top - 10}" text-anchor="middle" font-size="13" fill="#0f172a">${
|
|
20556
|
+
`<text x="${point.centerX}" y="${top - 10}" text-anchor="middle" font-size="13" fill="#0f172a">${escapeXml2(
|
|
20437
20557
|
point.value.toFixed(0)
|
|
20438
20558
|
)}</text>`
|
|
20439
20559
|
].join("");
|
|
@@ -20443,33 +20563,33 @@ function renderChartSvg(spec) {
|
|
|
20443
20563
|
`<path d="${linePath}" fill="none" stroke="#0ea5e9" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" />`,
|
|
20444
20564
|
...points.map(
|
|
20445
20565
|
(point) => `<circle cx="${point.centerX}" cy="${point.y}" r="8" fill="#f8fafc" stroke="#0ea5e9" stroke-width="4" />
|
|
20446
|
-
<text x="${point.centerX}" y="${point.y - 18}" text-anchor="middle" font-size="13" fill="#0f172a">${
|
|
20566
|
+
<text x="${point.centerX}" y="${point.y - 18}" text-anchor="middle" font-size="13" fill="#0f172a">${escapeXml2(
|
|
20447
20567
|
point.value.toFixed(0)
|
|
20448
20568
|
)}</text>`
|
|
20449
20569
|
)
|
|
20450
20570
|
].join("") : "";
|
|
20451
20571
|
const labels = points.map(
|
|
20452
|
-
(point) => `<text x="${point.centerX}" y="${height - margin.bottom + 28}" text-anchor="middle" font-size="14" fill="#334155">${
|
|
20572
|
+
(point) => `<text x="${point.centerX}" y="${height - margin.bottom + 28}" text-anchor="middle" font-size="14" fill="#334155">${escapeXml2(
|
|
20453
20573
|
point.label
|
|
20454
20574
|
)}</text>`
|
|
20455
20575
|
).join("");
|
|
20456
20576
|
const notes = (spec.notes ?? []).map(
|
|
20457
|
-
(note, index) => `<text x="${margin.left}" y="${height - 26 - index * 18}" font-size="13" fill="#475569">${
|
|
20577
|
+
(note, index) => `<text x="${margin.left}" y="${height - 26 - index * 18}" font-size="13" fill="#475569">${escapeXml2(note)}</text>`
|
|
20458
20578
|
).join("");
|
|
20459
20579
|
const svg = [
|
|
20460
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-label="${
|
|
20580
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-label="${escapeXml2(spec.title)}">`,
|
|
20461
20581
|
'<rect width="100%" height="100%" fill="#f8fafc" />',
|
|
20462
|
-
`<text x="${margin.left}" y="56" font-size="34" font-weight="700" fill="#0f172a">${
|
|
20463
|
-
spec.subtitle ? `<text x="${margin.left}" y="86" font-size="18" fill="#475569">${
|
|
20582
|
+
`<text x="${margin.left}" y="56" font-size="34" font-weight="700" fill="#0f172a">${escapeXml2(spec.title)}</text>`,
|
|
20583
|
+
spec.subtitle ? `<text x="${margin.left}" y="86" font-size="18" fill="#475569">${escapeXml2(spec.subtitle)}</text>` : "",
|
|
20464
20584
|
gridLines,
|
|
20465
20585
|
`<line x1="${margin.left}" y1="${zeroY}" x2="${width - margin.right}" y2="${zeroY}" stroke="#0f172a" stroke-width="2" />`,
|
|
20466
20586
|
`<line x1="${margin.left}" y1="${margin.top}" x2="${margin.left}" y2="${height - margin.bottom}" stroke="#0f172a" stroke-width="2" />`,
|
|
20467
20587
|
bars,
|
|
20468
20588
|
lineMarks,
|
|
20469
20589
|
labels,
|
|
20470
|
-
spec.xLabel ? `<text x="${margin.left + chartWidth / 2}" y="${height - 46}" text-anchor="middle" font-size="15" fill="#475569">${
|
|
20471
|
-
spec.yLabel ? `<text x="34" y="${margin.top + chartHeight / 2}" text-anchor="middle" font-size="15" fill="#475569" transform="rotate(-90 34 ${margin.top + chartHeight / 2})">${
|
|
20472
|
-
spec.seriesLabel ? `<text x="${width - margin.right}" y="56" text-anchor="end" font-size="15" fill="#475569">${
|
|
20590
|
+
spec.xLabel ? `<text x="${margin.left + chartWidth / 2}" y="${height - 46}" text-anchor="middle" font-size="15" fill="#475569">${escapeXml2(spec.xLabel)}</text>` : "",
|
|
20591
|
+
spec.yLabel ? `<text x="34" y="${margin.top + chartHeight / 2}" text-anchor="middle" font-size="15" fill="#475569" transform="rotate(-90 34 ${margin.top + chartHeight / 2})">${escapeXml2(spec.yLabel)}</text>` : "",
|
|
20592
|
+
spec.seriesLabel ? `<text x="${width - margin.right}" y="56" text-anchor="end" font-size="15" fill="#475569">${escapeXml2(spec.seriesLabel)}</text>` : "",
|
|
20473
20593
|
notes,
|
|
20474
20594
|
"</svg>"
|
|
20475
20595
|
].filter(Boolean).join("");
|
|
@@ -20481,33 +20601,33 @@ function renderSceneSvg(spec) {
|
|
|
20481
20601
|
const elements = spec.elements.map((element) => {
|
|
20482
20602
|
const opacity = element.opacity === void 0 ? 1 : clampNumber(element.opacity, 0, 1);
|
|
20483
20603
|
if (element.kind === "label") {
|
|
20484
|
-
return `<text x="${element.x}" y="${element.y}" font-size="${clampNumber(element.fontSize ?? 28, 10, 72)}" fill="${
|
|
20604
|
+
return `<text x="${element.x}" y="${element.y}" font-size="${clampNumber(element.fontSize ?? 28, 10, 72)}" fill="${escapeXml2(
|
|
20485
20605
|
element.fill ?? "#0f172a"
|
|
20486
|
-
)}" opacity="${opacity}" font-family="'Avenir Next', 'Segoe UI', sans-serif">${
|
|
20606
|
+
)}" opacity="${opacity}" font-family="'Avenir Next', 'Segoe UI', sans-serif">${escapeXml2(element.text ?? "")}</text>`;
|
|
20487
20607
|
}
|
|
20488
20608
|
switch (element.shape) {
|
|
20489
20609
|
case "circle":
|
|
20490
|
-
return `<circle cx="${element.x}" cy="${element.y}" r="${Math.max(6, element.radius ?? 40)}" fill="${
|
|
20610
|
+
return `<circle cx="${element.x}" cy="${element.y}" r="${Math.max(6, element.radius ?? 40)}" fill="${escapeXml2(
|
|
20491
20611
|
element.fill ?? "#dbeafe"
|
|
20492
|
-
)}" stroke="${
|
|
20612
|
+
)}" stroke="${escapeXml2(element.stroke ?? "#0ea5e9")}" stroke-width="${Math.max(1, element.strokeWidth ?? 2)}" opacity="${opacity}" />`;
|
|
20493
20613
|
case "line":
|
|
20494
|
-
return `<line x1="${element.x}" y1="${element.y}" x2="${element.x + (element.width ?? 120)}" y2="${element.y + (element.height ?? 0)}" stroke="${
|
|
20614
|
+
return `<line x1="${element.x}" y1="${element.y}" x2="${element.x + (element.width ?? 120)}" y2="${element.y + (element.height ?? 0)}" stroke="${escapeXml2(element.stroke ?? "#475569")}" stroke-width="${Math.max(1, element.strokeWidth ?? 3)}" opacity="${opacity}" />`;
|
|
20495
20615
|
default:
|
|
20496
20616
|
return `<rect x="${element.x}" y="${element.y}" width="${Math.max(8, element.width ?? 160)}" height="${Math.max(
|
|
20497
20617
|
8,
|
|
20498
20618
|
element.height ?? 120
|
|
20499
|
-
)}" rx="22" fill="${
|
|
20619
|
+
)}" rx="22" fill="${escapeXml2(element.fill ?? "#e2e8f0")}" stroke="${escapeXml2(element.stroke ?? "#94a3b8")}" stroke-width="${Math.max(
|
|
20500
20620
|
1,
|
|
20501
20621
|
element.strokeWidth ?? 2
|
|
20502
20622
|
)}" opacity="${opacity}" />`;
|
|
20503
20623
|
}
|
|
20504
20624
|
}).join("");
|
|
20505
20625
|
const svg = [
|
|
20506
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-label="${
|
|
20626
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-label="${escapeXml2(
|
|
20507
20627
|
spec.alt
|
|
20508
20628
|
)}">`,
|
|
20509
|
-
`<rect width="100%" height="100%" fill="${
|
|
20510
|
-
`<text x="48" y="64" font-size="34" font-weight="700" fill="#0f172a">${
|
|
20629
|
+
`<rect width="100%" height="100%" fill="${escapeXml2(spec.background ?? "#f8fafc")}" />`,
|
|
20630
|
+
`<text x="48" y="64" font-size="34" font-weight="700" fill="#0f172a">${escapeXml2(spec.title)}</text>`,
|
|
20511
20631
|
elements,
|
|
20512
20632
|
`</svg>`
|
|
20513
20633
|
].join("");
|
|
@@ -20518,12 +20638,12 @@ function renderRasterPosterSvg(input) {
|
|
|
20518
20638
|
const height = clampNumber(input.height ?? 720, 320, 1200);
|
|
20519
20639
|
const inset = 42;
|
|
20520
20640
|
const svg = [
|
|
20521
|
-
`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-label="${
|
|
20641
|
+
`<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}" role="img" aria-label="${escapeXml2(
|
|
20522
20642
|
input.alt
|
|
20523
20643
|
)}">`,
|
|
20524
20644
|
'<rect width="100%" height="100%" fill="#f8fafc" />',
|
|
20525
|
-
`<text x="${inset}" y="56" font-size="34" font-weight="700" fill="#0f172a">${
|
|
20526
|
-
`<image href="${
|
|
20645
|
+
`<text x="${inset}" y="56" font-size="34" font-weight="700" fill="#0f172a">${escapeXml2(input.title)}</text>`,
|
|
20646
|
+
`<image href="${escapeXml2(input.rasterFileName)}" x="${inset}" y="92" width="${width - inset * 2}" height="${height - 148}" preserveAspectRatio="xMidYMid meet" />`,
|
|
20527
20647
|
`</svg>`
|
|
20528
20648
|
].join("");
|
|
20529
20649
|
return { svg, width, height };
|
|
@@ -22896,6 +23016,11 @@ async function buildGraphOrientationPages(graph, paths, schemaHash, previousComp
|
|
|
22896
23016
|
report
|
|
22897
23017
|
})
|
|
22898
23018
|
);
|
|
23019
|
+
const shareArtifact = buildGraphShareArtifact({
|
|
23020
|
+
graph,
|
|
23021
|
+
report,
|
|
23022
|
+
vaultName: path26.basename(paths.rootDir)
|
|
23023
|
+
});
|
|
22899
23024
|
const shareRecord = await buildManagedGraphPage(
|
|
22900
23025
|
path26.join(paths.wikiDir, "graph", "share-card.md"),
|
|
22901
23026
|
{
|
|
@@ -22907,13 +23032,15 @@ async function buildGraphOrientationPages(graph, paths, schemaHash, previousComp
|
|
|
22907
23032
|
graph,
|
|
22908
23033
|
schemaHash,
|
|
22909
23034
|
metadata,
|
|
23035
|
+
artifact: shareArtifact,
|
|
22910
23036
|
report,
|
|
22911
23037
|
vaultName: path26.basename(paths.rootDir)
|
|
22912
23038
|
})
|
|
22913
23039
|
);
|
|
22914
23040
|
return {
|
|
22915
23041
|
records: [reportRecord, shareRecord, ...communityRecords],
|
|
22916
|
-
report
|
|
23042
|
+
report,
|
|
23043
|
+
shareSvg: renderGraphShareSvg(shareArtifact)
|
|
22917
23044
|
};
|
|
22918
23045
|
}
|
|
22919
23046
|
async function writePage(wikiDir, relativePath, content, changedPages) {
|
|
@@ -23534,6 +23661,7 @@ async function syncVaultArtifacts(rootDir, input) {
|
|
|
23534
23661
|
}
|
|
23535
23662
|
await writeJsonFile(paths.graphPath, graph);
|
|
23536
23663
|
await writeJsonFile(path26.join(paths.wikiDir, "graph", "report.json"), graphOrientation.report);
|
|
23664
|
+
await writeFileIfChanged(path26.join(paths.wikiDir, "graph", "share-card.svg"), graphOrientation.shareSvg);
|
|
23537
23665
|
await writeJsonFile(paths.codeIndexPath, input.codeIndex);
|
|
23538
23666
|
await writeJsonFile(paths.compileStatePath, {
|
|
23539
23667
|
generatedAt: graph.generatedAt,
|
|
@@ -23592,7 +23720,7 @@ async function refreshIndexesAndSearch(rootDir, pages) {
|
|
|
23592
23720
|
compileState?.generatedAt,
|
|
23593
23721
|
[],
|
|
23594
23722
|
config
|
|
23595
|
-
) : { records: [], report: null };
|
|
23723
|
+
) : { records: [], report: null, shareSvg: "" };
|
|
23596
23724
|
const dashboardRecords = currentGraph ? await buildDashboardRecords(
|
|
23597
23725
|
config,
|
|
23598
23726
|
paths,
|
|
@@ -23728,6 +23856,7 @@ async function refreshIndexesAndSearch(rootDir, pages) {
|
|
|
23728
23856
|
}
|
|
23729
23857
|
if (graphOrientation.report) {
|
|
23730
23858
|
await writeJsonFile(path26.join(paths.wikiDir, "graph", "report.json"), graphOrientation.report);
|
|
23859
|
+
await writeFileIfChanged(path26.join(paths.wikiDir, "graph", "share-card.svg"), graphOrientation.shareSvg);
|
|
23731
23860
|
}
|
|
23732
23861
|
const existingProjectIndexPaths = (await listFilesRecursive(paths.projectsDir)).filter((absolutePath) => absolutePath.endsWith(".md")).map((absolutePath) => toPosix(path26.relative(paths.wikiDir, absolutePath)));
|
|
23733
23862
|
const allowedProjectIndexPaths = /* @__PURE__ */ new Set([
|
|
@@ -26885,7 +27014,7 @@ async function getWatchStatus(rootDir) {
|
|
|
26885
27014
|
}
|
|
26886
27015
|
|
|
26887
27016
|
// src/mcp.ts
|
|
26888
|
-
var SERVER_VERSION = "1.
|
|
27017
|
+
var SERVER_VERSION = "1.3.0";
|
|
26889
27018
|
async function createMcpServer(rootDir) {
|
|
26890
27019
|
const server = new McpServer({
|
|
26891
27020
|
name: "swarmvault",
|
|
@@ -30419,6 +30548,7 @@ export {
|
|
|
30419
30548
|
reloadManagedSources,
|
|
30420
30549
|
removeWatchedRoot,
|
|
30421
30550
|
renderGraphShareMarkdown,
|
|
30551
|
+
renderGraphShareSvg,
|
|
30422
30552
|
resetDecay,
|
|
30423
30553
|
resolveConsolidationConfig,
|
|
30424
30554
|
resolveDecayConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swarmvaultai/engine",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Core engine for SwarmVault: ingest, compile, query, lint, and provider abstractions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,6 +39,13 @@
|
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=24.0.0"
|
|
41
41
|
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "test -f ../viewer/dist/index.html || pnpm --dir ../viewer build; tsup src/index.ts --format esm --dts && tsup --config tsup.hooks.config.ts && rm -rf dist/viewer && mkdir -p dist/viewer && cp -R ../viewer/dist/. dist/viewer/",
|
|
44
|
+
"pretest": "tsup --config tsup.hooks.config.ts",
|
|
45
|
+
"test": "SWARMVAULT_ALLOW_PRIVATE_URLS=1 vitest run",
|
|
46
|
+
"typecheck": "tsc --noEmit",
|
|
47
|
+
"prepublishOnly": "node ../../scripts/check-release-sync.mjs && node ../../scripts/check-published-manifests.mjs"
|
|
48
|
+
},
|
|
42
49
|
"dependencies": {
|
|
43
50
|
"@asciidoctor/core": "^3.0.4",
|
|
44
51
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
@@ -88,11 +95,5 @@
|
|
|
88
95
|
"graphology-types": "^0.24.8",
|
|
89
96
|
"tsup": "^8.5.0",
|
|
90
97
|
"vitest": "^3.2.4"
|
|
91
|
-
},
|
|
92
|
-
"scripts": {
|
|
93
|
-
"build": "test -f ../viewer/dist/index.html || pnpm --dir ../viewer build; tsup src/index.ts --format esm --dts && tsup --config tsup.hooks.config.ts && rm -rf dist/viewer && mkdir -p dist/viewer && cp -R ../viewer/dist/. dist/viewer/",
|
|
94
|
-
"pretest": "tsup --config tsup.hooks.config.ts",
|
|
95
|
-
"test": "SWARMVAULT_ALLOW_PRIVATE_URLS=1 vitest run",
|
|
96
|
-
"typecheck": "tsc --noEmit"
|
|
97
98
|
}
|
|
98
|
-
}
|
|
99
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 SwarmVault
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|