septum 0.1.3 → 0.1.4
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 +5 -2
- package/package.json +1 -1
- package/src/cli/commands/slice.ts +4 -46
- package/src/cli/commands/topology.ts +119 -0
- package/src/cli/index.ts +11 -0
- package/src/core/database/repositories/environment.repository.ts +207 -0
- package/src/core/database/repositories/symbol.repository.ts +28 -9
- package/src/core/database/repository.ts +6 -1
- package/src/core/database/schema.ts +153 -120
- package/src/core/parser/behavioral-analyzer.ts +119 -0
- package/src/core/parser/boundary-tracker.ts +160 -0
- package/src/core/parser/extractors/base.ts +1 -0
- package/src/core/parser/extractors/blade.ts +158 -158
- package/src/core/parser/extractors/go.ts +5 -1
- package/src/core/parser/extractors/laravel-semantic.ts +320 -4
- package/src/core/parser/extractors/php.ts +5 -1
- package/src/core/parser/extractors/python.ts +3 -1
- package/src/core/parser/extractors/typescript.ts +5 -1
- package/src/core/parser/schema/providers/laravel-migration-provider.ts +215 -0
- package/src/core/parser/schema/providers/prisma-schema-provider.ts +89 -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/resolver/path-resolver.ts +147 -147
- package/src/core/resolver/vertical-slice-tracer.ts +34 -1
- package/src/core/topology/environment-detector.ts +860 -0
- package/src/core/topology/types.ts +83 -0
- package/src/index.ts +3 -0
- package/src/mcp/schemas.ts +48 -0
- package/src/mcp/server.ts +62 -2
- package/src/mcp/tools/get-environment-topology.ts +141 -0
- package/src/mcp/tools/get-symbol-hotspots.ts +13 -3
- package/src/mcp/tools/register-domain.ts +1 -1
- package/src/mcp/tools/trace-vertical-slice.ts +9 -64
- package/src/types/index.ts +16 -0
- package/src/version.ts +3 -3
|
@@ -98,6 +98,23 @@ export class VerticalSliceTracer {
|
|
|
98
98
|
return this.formatSuccessResponse(trimmed, nameMatch, "exact");
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
// 3b. Omni-Trigger Match: "JOB ProcessOrderJob", "job:ProcessOrderJob", "CLI order:cleanup", "EVENT OrderPlacedListener"
|
|
102
|
+
const omniTriggerMatch = trimmed.match(/^(JOB|CLI|EVENT)\s+([A-Za-z0-9_:\-]+)$/i);
|
|
103
|
+
if (omniTriggerMatch) {
|
|
104
|
+
const triggerKind = omniTriggerMatch[1].toUpperCase();
|
|
105
|
+
const targetName = omniTriggerMatch[2].toLowerCase();
|
|
106
|
+
const exact = allSlices.find(
|
|
107
|
+
(s) =>
|
|
108
|
+
s.http_method.toUpperCase() === triggerKind &&
|
|
109
|
+
(s.controller_class.toLowerCase() === targetName ||
|
|
110
|
+
s.route_uri.toLowerCase() === targetName ||
|
|
111
|
+
s.route_uri.toLowerCase() === `${triggerKind.toLowerCase()}:${targetName}`)
|
|
112
|
+
);
|
|
113
|
+
if (exact) {
|
|
114
|
+
return this.formatSuccessResponse(trimmed, exact, "exact");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
101
118
|
// 4. Controller@Action match: "OrderController@updateStatus" or "OrderController"
|
|
102
119
|
const controllerActionMatch = trimmed.match(/^([A-Za-z0-9_]+)(?:@([A-Za-z0-9_]+))?$/);
|
|
103
120
|
if (controllerActionMatch) {
|
|
@@ -219,7 +236,23 @@ export class VerticalSliceTracer {
|
|
|
219
236
|
const stageLines = chain.map((node) => {
|
|
220
237
|
const stageLabel = `[${node.stage.toUpperCase()}]`.padEnd(14, " ");
|
|
221
238
|
const loc = node.file ? ` (${node.file}${node.line ? `:${node.line}` : ""})` : "";
|
|
222
|
-
|
|
239
|
+
let extra = "";
|
|
240
|
+
if (node.table) {
|
|
241
|
+
extra += ` [table: ${node.table}]`;
|
|
242
|
+
}
|
|
243
|
+
if (node.columns_summary) {
|
|
244
|
+
extra += ` {${node.columns_summary}}`;
|
|
245
|
+
}
|
|
246
|
+
if (node.guards && node.guards.length > 0 && node.stage !== "guard") {
|
|
247
|
+
extra += ` [guards: ${node.guards.join(", ")}]`;
|
|
248
|
+
}
|
|
249
|
+
if (node.mutations && node.mutations.length > 0 && node.stage !== "side_effect") {
|
|
250
|
+
extra += ` [mutates: ${node.mutations.join(", ")}]`;
|
|
251
|
+
}
|
|
252
|
+
if (node.transactions && node.stage !== "transaction") {
|
|
253
|
+
extra += ` [tx: active]`;
|
|
254
|
+
}
|
|
255
|
+
return `${stageLabel} ${node.symbol}${loc}${extra}`;
|
|
223
256
|
});
|
|
224
257
|
message = `=== VERTICAL SLICE TRACE (${confidence.toUpperCase()}) ===\n` + stageLines.join("\n");
|
|
225
258
|
}
|