synapse-kit 0.0.0-stage → 0.3.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.
- package/LICENSE +21 -0
- package/README.ko.md +129 -0
- package/README.md +127 -2
- package/dist/causal-memory.json +4581 -0
- package/dist/cli-memory.d.ts +5 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +3474 -0
- package/dist/compiler/causal-build.d.ts +51 -0
- package/dist/compiler/causal-graph.d.ts +6 -0
- package/dist/compiler/cli.d.ts +2 -0
- package/dist/compiler/cli.js +1299 -0
- package/dist/compiler/core/config.d.ts +16 -0
- package/dist/compiler/core/engine.d.ts +17 -0
- package/dist/compiler/core/reporter.d.ts +5 -0
- package/dist/compiler/i18n.d.ts +281 -0
- package/dist/compiler/index.d.ts +21 -0
- package/dist/compiler/index.js +1983 -0
- package/dist/compiler/plugins/cpp.d.ts +19 -0
- package/dist/compiler/plugins/csharp.d.ts +13 -0
- package/dist/compiler/plugins/go.d.ts +15 -0
- package/dist/compiler/plugins/java.d.ts +16 -0
- package/dist/compiler/plugins/native.d.ts +12 -0
- package/dist/compiler/plugins/nsis.d.ts +8 -0
- package/dist/compiler/plugins/python.d.ts +21 -0
- package/dist/compiler/plugins/rust.d.ts +9 -0
- package/dist/compiler/plugins/schema.d.ts +12 -0
- package/dist/compiler/plugins/svelte.d.ts +10 -0
- package/dist/compiler/plugins/typescript.d.ts +23 -0
- package/dist/compiler/types.d.ts +72 -0
- package/dist/compiler/virtual_120b_types.d.ts +18 -0
- package/dist/core/config.d.ts +16 -0
- package/dist/core/engine.d.ts +17 -0
- package/dist/core/reporter.d.ts +5 -0
- package/dist/db/index.js +1910 -0
- package/dist/i18n.d.ts +281 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +8282 -0
- package/dist/memory/causal-benchmark.d.ts +29 -0
- package/dist/memory/causal-branch.d.ts +79 -0
- package/dist/memory/causal-build.d.ts +51 -0
- package/dist/memory/causal-config.d.ts +38 -0
- package/dist/memory/causal-context.d.ts +113 -0
- package/dist/memory/causal-contexts.json +316 -0
- package/dist/memory/causal-graph.d.ts +6 -0
- package/dist/memory/causal-graveyard.d.ts +94 -0
- package/dist/memory/causal-lens.d.ts +133 -0
- package/dist/memory/causal-memory.json +5054 -0
- package/dist/memory/causal-migrator.d.ts +11 -0
- package/dist/memory/causal-peer.d.ts +53 -0
- package/dist/memory/causal-predictor.d.ts +42 -0
- package/dist/memory/causal-query.d.ts +21 -0
- package/dist/memory/causal-server.d.ts +578 -0
- package/dist/memory/causal-store.d.ts +280 -0
- package/dist/memory/causal-synthesizer.d.ts +96 -0
- package/dist/memory/causal-timeseries.d.ts +92 -0
- package/dist/memory/cli.d.ts +13 -0
- package/dist/memory/cli.js +5668 -0
- package/dist/memory/index.d.ts +13 -0
- package/dist/memory/index.js +4451 -0
- package/dist/plugins/cpp.d.ts +19 -0
- package/dist/plugins/csharp.d.ts +13 -0
- package/dist/plugins/go.d.ts +15 -0
- package/dist/plugins/java.d.ts +16 -0
- package/dist/plugins/native.d.ts +12 -0
- package/dist/plugins/nsis.d.ts +8 -0
- package/dist/plugins/python.d.ts +21 -0
- package/dist/plugins/rust.d.ts +9 -0
- package/dist/plugins/schema.d.ts +12 -0
- package/dist/plugins/svelte.d.ts +10 -0
- package/dist/plugins/typescript.d.ts +23 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/core/config.d.ts +12 -0
- package/dist/src/core/engine.d.ts +9 -0
- package/dist/src/core/reporter.d.ts +5 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/memory/causal-graph.d.ts +6 -0
- package/dist/src/plugins/native.d.ts +12 -0
- package/dist/src/plugins/nsis.d.ts +8 -0
- package/dist/src/plugins/rust.d.ts +9 -0
- package/dist/src/plugins/schema.d.ts +12 -0
- package/dist/src/plugins/svelte.d.ts +10 -0
- package/dist/src/types.d.ts +55 -0
- package/dist/types.d.ts +72 -0
- package/package.json +87 -4
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 구형 지식 그래프(memory_backup)를 차세대 인과율 메모리(Causal Memory 2.1)로 무손실 변환합니다.
|
|
3
|
+
* 엔티티뿐만 아니라 모든 인과 간선(Relations)을 100% 보존하며, 도메인 오분류를 방지합니다.
|
|
4
|
+
*/
|
|
5
|
+
export declare function migrateLegacyMemoryGraph(sourceBackupPath?: string, targetGlobalPath?: string, targetLocalPath?: string): {
|
|
6
|
+
readonly ok: boolean;
|
|
7
|
+
readonly totalRules: number;
|
|
8
|
+
readonly totalRelations: number;
|
|
9
|
+
readonly alwaysActiveCount: number;
|
|
10
|
+
readonly domains: readonly string[];
|
|
11
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { CausalQueryOptions, CausalResonanceResult } from './causal-store';
|
|
2
|
+
export interface TailscalePeerNode {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly hostName: string;
|
|
5
|
+
readonly ip: string;
|
|
6
|
+
readonly os: string;
|
|
7
|
+
readonly online: boolean;
|
|
8
|
+
readonly active: boolean;
|
|
9
|
+
readonly isSelf: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface PeerHealthResult {
|
|
12
|
+
readonly host: string;
|
|
13
|
+
readonly port: number;
|
|
14
|
+
readonly url: string;
|
|
15
|
+
readonly reachable: boolean;
|
|
16
|
+
readonly rttMs: number;
|
|
17
|
+
readonly version?: string;
|
|
18
|
+
readonly totalRules?: number;
|
|
19
|
+
readonly totalRelations?: number;
|
|
20
|
+
readonly error?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PeerSyncResult {
|
|
23
|
+
readonly targetHost: string;
|
|
24
|
+
readonly direction: 'pull' | 'push';
|
|
25
|
+
readonly success: boolean;
|
|
26
|
+
readonly durationMs: number;
|
|
27
|
+
readonly addedRules?: number;
|
|
28
|
+
readonly updatedRules?: number;
|
|
29
|
+
readonly addedRelations?: number;
|
|
30
|
+
readonly totalRules?: number;
|
|
31
|
+
readonly totalRelations?: number;
|
|
32
|
+
readonly error?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Tailscale CLI 상태를 파싱하여 활성 피어 목록을 조회합니다.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getTailscalePeers(): Promise<{
|
|
38
|
+
selfIp?: string;
|
|
39
|
+
selfHost?: string;
|
|
40
|
+
peers: TailscalePeerNode[];
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* 대상 호스트의 Causal Memory Daemon 헬스체크 및 RTT 측정
|
|
44
|
+
*/
|
|
45
|
+
export declare function pingPeer(host: string, port?: number): Promise<PeerHealthResult>;
|
|
46
|
+
/**
|
|
47
|
+
* 원격 Causal Memory Daemon에 공명 쿼리 실행
|
|
48
|
+
*/
|
|
49
|
+
export declare function queryRemotePeer(remoteUrl: string, options: CausalQueryOptions): Promise<CausalResonanceResult>;
|
|
50
|
+
/**
|
|
51
|
+
* 피어 노드 간 인과율 규칙 및 간선 동기화 (Sync)
|
|
52
|
+
*/
|
|
53
|
+
export declare function syncWithPeer(remoteHost: string, port?: number, direction?: 'pull' | 'push', dbPath?: string): Promise<PeerSyncResult>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CausalMemoryStore } from './causal-store';
|
|
2
|
+
import { ContextCheckpointStore } from './causal-context';
|
|
3
|
+
/**
|
|
4
|
+
* 연쇄 파급 영향 노드 규격
|
|
5
|
+
*/
|
|
6
|
+
export interface AffectedNode {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly domain: string;
|
|
9
|
+
readonly hopLevel: number;
|
|
10
|
+
readonly relationType: string;
|
|
11
|
+
readonly riskScore: number;
|
|
12
|
+
readonly riskReason: string;
|
|
13
|
+
readonly requiredInvariants: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 인과 연쇄 폭발 반경(Blast Radius) 분석 보고서 규격
|
|
17
|
+
*/
|
|
18
|
+
export interface BlastRadiusReport {
|
|
19
|
+
readonly triggerFiles: readonly string[];
|
|
20
|
+
readonly overallRisk: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW';
|
|
21
|
+
readonly maxRiskScore: number;
|
|
22
|
+
readonly affectedNodes: readonly AffectedNode[];
|
|
23
|
+
readonly prefetchedInvariants: readonly string[];
|
|
24
|
+
readonly suggestedTargetFiles: readonly string[];
|
|
25
|
+
readonly durationMs: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* 인과 연쇄 파급 예측 및 Blast Radius 분석 엔진 클래스 (SRP 준수)
|
|
29
|
+
*/
|
|
30
|
+
export declare class CausalPredictorEngine {
|
|
31
|
+
private readonly memoryStore;
|
|
32
|
+
private readonly contextStore;
|
|
33
|
+
constructor(memoryStore?: CausalMemoryStore, contextStore?: ContextCheckpointStore);
|
|
34
|
+
/**
|
|
35
|
+
* 파일 수정 시 2~3단계 뒤에 발생할 연쇄 파급 반경 계산
|
|
36
|
+
*/
|
|
37
|
+
analyzeBlastRadius(files: readonly string[], maxHops?: number): BlastRadiusReport;
|
|
38
|
+
/**
|
|
39
|
+
* 예측 보고서 마크다운 포맷터
|
|
40
|
+
*/
|
|
41
|
+
static formatPredictReport(report: BlastRadiusReport): string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type CausalResonanceResult } from './causal-store';
|
|
2
|
+
/**
|
|
3
|
+
* Git 작업 트리의 변경 파일 목록 자동 추출
|
|
4
|
+
*/
|
|
5
|
+
export declare function detectModifiedFiles(cwd?: string): Promise<string[]>;
|
|
6
|
+
/**
|
|
7
|
+
* 인과율 공명 쿼리 실행기
|
|
8
|
+
*/
|
|
9
|
+
export declare function runCausalQuery(rawOptions: {
|
|
10
|
+
files?: string[];
|
|
11
|
+
keywords?: string[];
|
|
12
|
+
command?: string;
|
|
13
|
+
domain?: string;
|
|
14
|
+
autoGit?: boolean;
|
|
15
|
+
cwd?: string;
|
|
16
|
+
propagateRelations?: boolean;
|
|
17
|
+
}, storeCustomPath?: string): Promise<CausalResonanceResult>;
|
|
18
|
+
/**
|
|
19
|
+
* AI 에이전트 주입용 초경량 마크다운/텍스트 포맷터
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatResonanceForAgent(result: CausalResonanceResult, compact?: boolean): string;
|