@a-company/sentinel 0.2.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.
@@ -0,0 +1,82 @@
1
+ import { Express } from 'express';
2
+
3
+ /**
4
+ * Symbol index loader for the server
5
+ *
6
+ * Uses premise-core aggregator for symbol extraction, with fallback
7
+ * to local scanning if premise-core is unavailable.
8
+ */
9
+ interface SymbolEntry {
10
+ id: string;
11
+ symbol: string;
12
+ type: 'component' | 'flow' | 'gate' | 'signal' | 'aspect';
13
+ source: 'purpose' | 'portal' | 'premise';
14
+ filePath: string;
15
+ data: Record<string, unknown>;
16
+ description?: string;
17
+ references: string[];
18
+ referencedBy: string[];
19
+ tags?: string[];
20
+ }
21
+ interface ParadigmConfig {
22
+ name?: string;
23
+ discipline?: string;
24
+ version?: string;
25
+ conventions?: Record<string, unknown>;
26
+ }
27
+ /**
28
+ * Load Paradigm configuration from .paradigm/config.yaml
29
+ */
30
+ declare function loadParadigmConfig(projectDir: string): Promise<ParadigmConfig>;
31
+ /**
32
+ * Load symbol index from .paradigm/index.json or scan .purpose files
33
+ */
34
+ declare function loadSymbolIndex(projectDir: string): Promise<SymbolEntry[]>;
35
+ /**
36
+ * Get total symbol count for a project
37
+ */
38
+ declare function getSymbolCount(projectDir: string): Promise<number>;
39
+
40
+ /**
41
+ * Git integration for loading commit history
42
+ */
43
+ interface CommitInfo {
44
+ hash: string;
45
+ shortHash: string;
46
+ date: string;
47
+ author: string;
48
+ message: string;
49
+ symbolsModified: string[];
50
+ filesChanged: string[];
51
+ }
52
+ /**
53
+ * Load Git commit history for a project
54
+ */
55
+ declare function loadGitHistory(projectDir: string, options?: {
56
+ limit?: number;
57
+ since?: string;
58
+ }): Promise<CommitInfo[]>;
59
+ /**
60
+ * Get symbols at a specific commit
61
+ */
62
+ declare function getSymbolsAtCommit(projectDir: string, commitHash: string): Promise<string[]>;
63
+
64
+ /**
65
+ * Sentinel Server - Express server for the visualizer UI
66
+ */
67
+
68
+ interface ServerOptions {
69
+ port: number;
70
+ projectDir: string;
71
+ open?: boolean;
72
+ }
73
+ /**
74
+ * Create the Express application with all routes configured
75
+ */
76
+ declare function createApp(options: ServerOptions): Express;
77
+ /**
78
+ * Start the Sentinel server
79
+ */
80
+ declare function startServer(options: ServerOptions): Promise<void>;
81
+
82
+ export { type CommitInfo, type ParadigmConfig, type ServerOptions, type SymbolEntry, createApp, getSymbolCount, getSymbolsAtCommit, loadGitHistory, loadParadigmConfig, loadSymbolIndex, startServer };