@dimassetoid/septum-mcp 0.0.0-stage → 0.2.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.md +124 -2
- package/bin/septum.ts +4 -0
- package/package.json +70 -4
- package/scripts/postinstall.ts +25 -0
- package/src/cli/commands/check.ts +122 -0
- package/src/cli/commands/hook.ts +268 -0
- package/src/cli/commands/init.ts +553 -0
- package/src/cli/commands/serve.ts +5 -0
- package/src/cli/commands/sync.ts +41 -0
- package/src/cli/commands/topology.ts +161 -0
- package/src/cli/index.ts +167 -0
- package/src/cli/scaffold/harness-config.ts +621 -0
- package/src/cli/templates/hooks.ts +75 -0
- package/src/cli/templates/rules.ts +50 -0
- package/src/cli/templates/skill.ts +51 -0
- package/src/cli/ui/prompts.ts +122 -0
- package/src/core/boundary/evaluator.ts +442 -0
- package/src/core/boundary/staged-auditor.ts +58 -0
- package/src/core/config/loader.ts +122 -0
- package/src/core/config/schema.ts +69 -0
- package/src/core/database/client.ts +60 -0
- package/src/core/database/repositories/dependency.repository.ts +712 -0
- package/src/core/database/repositories/domain.repository.ts +330 -0
- package/src/core/database/repositories/environment.repository.ts +207 -0
- package/src/core/database/repositories/file.repository.ts +117 -0
- package/src/core/database/repositories/meta.repository.ts +33 -0
- package/src/core/database/repositories/symbol.repository.ts +508 -0
- package/src/core/database/repository.ts +303 -0
- package/src/core/database/schema.ts +154 -0
- package/src/core/discovery/topology-detector.ts +805 -0
- package/src/core/ingestion/hasher.ts +5 -0
- package/src/core/ingestion/pipeline.ts +623 -0
- package/src/core/parser/behavioral-analyzer.ts +119 -0
- package/src/core/parser/boundary-tracker.ts +443 -0
- package/src/core/parser/extractors/base.ts +67 -0
- package/src/core/parser/extractors/blade.ts +159 -0
- package/src/core/parser/extractors/csharp.ts +244 -0
- package/src/core/parser/extractors/django-semantic.ts +687 -0
- package/src/core/parser/extractors/elysia-semantic.ts +538 -0
- package/src/core/parser/extractors/express-semantic.ts +444 -0
- package/src/core/parser/extractors/fastapi-semantic.ts +736 -0
- package/src/core/parser/extractors/fastify-semantic.ts +774 -0
- package/src/core/parser/extractors/flask-semantic.ts +515 -0
- package/src/core/parser/extractors/frontend.ts +149 -0
- package/src/core/parser/extractors/go-semantic.ts +611 -0
- package/src/core/parser/extractors/go.ts +491 -0
- package/src/core/parser/extractors/hono-semantic.ts +567 -0
- package/src/core/parser/extractors/java.ts +225 -0
- package/src/core/parser/extractors/laravel-semantic.ts +1122 -0
- package/src/core/parser/extractors/mcp-cli-semantic.ts +368 -0
- package/src/core/parser/extractors/nestjs-semantic.ts +543 -0
- package/src/core/parser/extractors/php.ts +569 -0
- package/src/core/parser/extractors/python.ts +498 -0
- package/src/core/parser/extractors/registry.ts +78 -0
- package/src/core/parser/extractors/ruby.ts +234 -0
- package/src/core/parser/extractors/rust.ts +286 -0
- package/src/core/parser/extractors/semantic-extractor.interface.ts +22 -0
- package/src/core/parser/extractors/symfony-semantic.ts +354 -0
- package/src/core/parser/extractors/typescript.ts +826 -0
- package/src/core/parser/language-capabilities.ts +71 -0
- package/src/core/parser/schema/providers/laravel-migration-provider.ts +216 -0
- package/src/core/parser/schema/providers/prisma-schema-provider.ts +90 -0
- package/src/core/parser/schema/schema-provider-registry.ts +43 -0
- package/src/core/parser/schema/schema-provider.interface.ts +33 -0
- package/src/core/parser/tree-sitter.ts +63 -0
- package/src/core/parser/wasm-assets.ts +25 -0
- package/src/core/parser/wasm-loader.ts +274 -0
- package/src/core/resolver/call-graph-tracer.ts +724 -0
- package/src/core/resolver/import-resolver.ts +437 -0
- package/src/core/resolver/module-resolver.ts +482 -0
- package/src/core/resolver/path-resolver.ts +200 -0
- package/src/core/resolver/symbol-locator.ts +276 -0
- package/src/core/resolver/symbol-reference.ts +53 -0
- package/src/core/resolver/vertical-slice-tracer.ts +366 -0
- package/src/core/resources/ignore.ts +123 -0
- package/src/core/resources/limits.ts +14 -0
- package/src/core/resources/source-files.ts +62 -0
- package/src/core/resources/work-queue.ts +74 -0
- package/src/core/session/session-manager.ts +107 -0
- package/src/core/telemetry/telemetry.ts +97 -0
- package/src/core/topology/environment-detector.ts +973 -0
- package/src/core/topology/types.ts +83 -0
- package/src/index.ts +21 -0
- package/src/mcp/schemas.ts +1105 -0
- package/src/mcp/server.ts +774 -0
- package/src/mcp/tools/boundary.ts +17 -0
- package/src/mcp/tools/check-boundary.ts +387 -0
- package/src/mcp/tools/domain.ts +40 -0
- package/src/mcp/tools/feature.ts +67 -0
- package/src/mcp/tools/get-domain-catalog.ts +226 -0
- package/src/mcp/tools/get-environment-topology.ts +138 -0
- package/src/mcp/tools/get-feature-context.ts +224 -0
- package/src/mcp/tools/get-symbol-hotspots.ts +54 -0
- package/src/mcp/tools/get-symbol-impact.ts +64 -0
- package/src/mcp/tools/get-symbol.ts +175 -0
- package/src/mcp/tools/locate-symbol.ts +196 -0
- package/src/mcp/tools/register-domain.ts +75 -0
- package/src/mcp/tools/register-feature.ts +110 -0
- package/src/mcp/tools/slice.ts +16 -0
- package/src/mcp/tools/symbol.ts +93 -0
- package/src/mcp/tools/trace-vertical-slice.ts +80 -0
- package/src/mcp/workspace-manager.ts +159 -0
- package/src/mcp/workspace-watcher.ts +202 -0
- package/src/types/index.ts +456 -0
- package/src/types/wasm.d.ts +4 -0
- package/src/utils/version-check.ts +209 -0
- package/src/version.ts +1 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export type EnvironmentLayer =
|
|
2
|
+
| "edge"
|
|
3
|
+
| "gateway"
|
|
4
|
+
| "host"
|
|
5
|
+
| "runtime"
|
|
6
|
+
| "storage"
|
|
7
|
+
| "telemetry";
|
|
8
|
+
|
|
9
|
+
export type LayerResolutionStatus = "DETECTED" | "AMBIGUOUS" | "UNRESOLVED" | "VERIFIED";
|
|
10
|
+
|
|
11
|
+
export type CanonicalPlatformTag =
|
|
12
|
+
| "shared_hosting"
|
|
13
|
+
| "vps"
|
|
14
|
+
| "docker"
|
|
15
|
+
| "serverless"
|
|
16
|
+
| "kubernetes"
|
|
17
|
+
| "managed_db"
|
|
18
|
+
| "cdn_edge"
|
|
19
|
+
| "paas"
|
|
20
|
+
| "static_cdn"
|
|
21
|
+
| "unspecified";
|
|
22
|
+
|
|
23
|
+
export interface EnvironmentLayerInfo {
|
|
24
|
+
layer: EnvironmentLayer;
|
|
25
|
+
platform?: string;
|
|
26
|
+
canonical_tag?: CanonicalPlatformTag;
|
|
27
|
+
status: LayerResolutionStatus;
|
|
28
|
+
detected_from?: string[];
|
|
29
|
+
evidence?: string[];
|
|
30
|
+
constraints?: string[];
|
|
31
|
+
unresolved_inquiry?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface TopologyNode {
|
|
35
|
+
id: string; // e.g. "edge:cloudflare", "host:api-vps", "host:worker-vps", "storage:central-db"
|
|
36
|
+
layer: EnvironmentLayer;
|
|
37
|
+
name: string; // e.g. "Cloudflare Perimeter", "API Backend VPS", "Postgres Cluster"
|
|
38
|
+
platform: string; // e.g. "Cloudflare WAF", "Hostinger VPS", "AWS RDS Postgres"
|
|
39
|
+
canonical_tag: CanonicalPlatformTag;
|
|
40
|
+
domain_or_ip?: string; // e.g. "api.example.com", "10.0.0.5"
|
|
41
|
+
role?: string; // e.g. "web_api", "queue_worker", "frontend_spa", "database_primary"
|
|
42
|
+
status: LayerResolutionStatus;
|
|
43
|
+
detected_from: string[];
|
|
44
|
+
constraints: string[];
|
|
45
|
+
connected_to?: string[]; // IDs of nodes this node interacts with
|
|
46
|
+
unresolved_inquiry?: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CrossLayerInterplay {
|
|
50
|
+
title: string;
|
|
51
|
+
involved_layers: EnvironmentLayer[];
|
|
52
|
+
involved_node_ids?: string[];
|
|
53
|
+
risk_or_rule: string;
|
|
54
|
+
required_action: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface EnvironmentTopology {
|
|
58
|
+
is_distributed: boolean;
|
|
59
|
+
nodes: TopologyNode[];
|
|
60
|
+
layers: Record<EnvironmentLayer, EnvironmentLayerInfo>;
|
|
61
|
+
overall_status: "RESOLVED" | "NEEDS_CLARIFICATION";
|
|
62
|
+
interplays: CrossLayerInterplay[];
|
|
63
|
+
pending_inquiries: string[];
|
|
64
|
+
architectural_summary: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ResolveLayerInput {
|
|
68
|
+
layer: EnvironmentLayer;
|
|
69
|
+
platform: string;
|
|
70
|
+
constraints?: string[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ResolveNodeInput {
|
|
74
|
+
id: string;
|
|
75
|
+
layer: EnvironmentLayer;
|
|
76
|
+
name: string;
|
|
77
|
+
platform: string;
|
|
78
|
+
canonical_tag?: CanonicalPlatformTag;
|
|
79
|
+
domain_or_ip?: string;
|
|
80
|
+
role?: string;
|
|
81
|
+
constraints?: string[];
|
|
82
|
+
connected_to?: string[];
|
|
83
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * from "./types/index.ts";
|
|
2
|
+
export * from "./core/config/schema.ts";
|
|
3
|
+
export * from "./core/config/loader.ts";
|
|
4
|
+
export * from "./core/database/client.ts";
|
|
5
|
+
export * from "./core/database/repository.ts";
|
|
6
|
+
export * from "./core/parser/extractors/base.ts";
|
|
7
|
+
export * from "./core/parser/tree-sitter.ts";
|
|
8
|
+
export * from "./core/ingestion/pipeline.ts";
|
|
9
|
+
export * from "./core/boundary/evaluator.ts";
|
|
10
|
+
export * from "./core/resolver/call-graph-tracer.ts";
|
|
11
|
+
export * from "./core/resolver/vertical-slice-tracer.ts";
|
|
12
|
+
export * from "./core/topology/types.ts";
|
|
13
|
+
export * from "./core/topology/environment-detector.ts";
|
|
14
|
+
export * from "./mcp/tools/get-environment-topology.ts";
|
|
15
|
+
export * from "./mcp/server.ts";
|
|
16
|
+
export * from "./cli/index.ts";
|
|
17
|
+
|
|
18
|
+
import { runCLI } from "./cli/index.ts";
|
|
19
|
+
if (import.meta.main) {
|
|
20
|
+
runCLI(process.argv);
|
|
21
|
+
}
|