@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.
- package/dist/adapters/express.d.ts +44 -0
- package/dist/adapters/express.js +30 -0
- package/dist/adapters/fastify.d.ts +23 -0
- package/dist/adapters/fastify.js +18 -0
- package/dist/adapters/hono.d.ts +23 -0
- package/dist/adapters/hono.js +26 -0
- package/dist/chunk-KPMG4XED.js +1249 -0
- package/dist/cli.js +32 -0
- package/dist/commands-KIMGFR2I.js +3278 -0
- package/dist/dist-2F7NO4H4.js +6851 -0
- package/dist/dist-BPWLYV4U.js +6853 -0
- package/dist/index.d.ts +434 -0
- package/dist/index.js +2270 -0
- package/dist/mcp.js +2767 -0
- package/dist/sdk-B27_vK1g.d.ts +644 -0
- package/dist/server/index.d.ts +82 -0
- package/dist/server/index.js +854 -0
- package/package.json +98 -0
- package/src/seeds/loader.ts +45 -0
- package/src/seeds/paradigm-patterns.json +195 -0
- package/src/seeds/universal-patterns.json +292 -0
- package/ui/dist/assets/index-BNgsn_C8.js +62 -0
- package/ui/dist/assets/index-BNgsn_C8.js.map +1 -0
- package/ui/dist/assets/index-DPxatSdT.css +1 -0
- package/ui/dist/index.html +17 -0
- package/ui/dist/sentinel.svg +19 -0
|
@@ -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 };
|