@happyvertical/smrt-dev-mcp 0.47.0 → 0.47.2
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/AGENTS.md +9 -0
- package/README.md +176 -0
- package/dist/http.d.ts +95 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +923 -20
- package/dist/index.js.map +1 -1
- package/dist/knowledge/index.d.ts.map +1 -1
- package/dist/{knowledge-SqpqYA67.js → knowledge-CY6sQzpj.js} +165 -3
- package/dist/knowledge-CY6sQzpj.js.map +1 -0
- package/dist/knowledge.js +1 -1
- package/dist/server-info.d.ts +3 -0
- package/dist/server-info.d.ts.map +1 -0
- package/dist/tool-catalog.d.ts.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/runtime/boot.d.ts +60 -0
- package/dist/tools/runtime/boot.d.ts.map +1 -0
- package/dist/tools/runtime/connection.d.ts +70 -0
- package/dist/tools/runtime/connection.d.ts.map +1 -0
- package/dist/tools/runtime/observation.d.ts +31 -0
- package/dist/tools/runtime/observation.d.ts.map +1 -0
- package/dist/tools/runtime/tools.d.ts +67 -0
- package/dist/tools/runtime/tools.d.ts.map +1 -0
- package/package.json +7 -5
- package/dist/knowledge-SqpqYA67.js.map +0 -1
package/dist/knowledge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as checkKnowledgeFreshness, c as diffKnowledgeIndex, d as renderKnowledgeIndexMarkdown, f as smrtArchitecture, i as buildReviewContext, l as packageDocPaths, n as buildKnowledgeIndex, o as checkKnowledgeFreshnessFromIndex, p as smrtReview, r as buildPackageSpecialistContext, s as compactContextResult, t as buildArchitectureContext, u as renderFreshnessResult } from "./knowledge-
|
|
1
|
+
import { a as checkKnowledgeFreshness, c as diffKnowledgeIndex, d as renderKnowledgeIndexMarkdown, f as smrtArchitecture, i as buildReviewContext, l as packageDocPaths, n as buildKnowledgeIndex, o as checkKnowledgeFreshnessFromIndex, p as smrtReview, r as buildPackageSpecialistContext, s as compactContextResult, t as buildArchitectureContext, u as renderFreshnessResult } from "./knowledge-CY6sQzpj.js";
|
|
2
2
|
export { buildArchitectureContext, buildKnowledgeIndex, buildPackageSpecialistContext, buildReviewContext, checkKnowledgeFreshness, checkKnowledgeFreshnessFromIndex, compactContextResult, diffKnowledgeIndex, packageDocPaths, renderFreshnessResult, renderKnowledgeIndexMarkdown, smrtArchitecture, smrtReview };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-info.d.ts","sourceRoot":"","sources":["../src/server-info.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAiB1C,eAAO,MAAM,cAAc,QAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.d.ts","sourceRoot":"","sources":["../src/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-catalog.d.ts","sourceRoot":"","sources":["../src/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AA2oBpD,eAAO,MAAM,KAAK,EAAE,IAAI,EAO0C,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
export { generateSmrtClass } from './generate-smrt-class.js';
|
|
6
6
|
export { introspectProject } from './introspect-project.js';
|
|
7
7
|
export { reviewSmrtProject } from './review-smrt-project.js';
|
|
8
|
+
export { runtimeDispatchHealth, runtimeJobHealth, runtimeMigrationStatus, runtimeRecentChanges, runtimeRegistryDrift, runtimeScheduleHealth, } from './runtime/tools.js';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confined runtime bootstrap for the Level 2 observation plane (#1831).
|
|
3
|
+
*
|
|
4
|
+
* "Booting" here means registering *manifests* into the in-process
|
|
5
|
+
* `ObjectRegistry` — the project's own `.smrt/manifest.json` (or built
|
|
6
|
+
* `dist/manifest.json`) plus every installed SMRT package manifest that the
|
|
7
|
+
* project's dependency tree resolves to. No project source is imported, no
|
|
8
|
+
* module is executed, no database is touched. That confinement is the safety
|
|
9
|
+
* boundary: an observing agent sees what the runtime *would* register, never
|
|
10
|
+
* what arbitrary project code does on import.
|
|
11
|
+
*
|
|
12
|
+
* The registry is a process-global singleton, so a process boots once. There
|
|
13
|
+
* is deliberately no re-boot tool; restart the process to observe a rebuilt
|
|
14
|
+
* manifest.
|
|
15
|
+
*/
|
|
16
|
+
/** Provenance label for facts read from authored/installed manifests. */
|
|
17
|
+
export declare const DECLARED_PROVENANCE = "declared (manifest)";
|
|
18
|
+
export interface BootDiagnostic {
|
|
19
|
+
severity: 'info' | 'warning' | 'error';
|
|
20
|
+
code: string;
|
|
21
|
+
message: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BootedManifest {
|
|
24
|
+
/** `project` for the project's own manifest, `dependency` for installed packages. */
|
|
25
|
+
kind: 'project' | 'dependency';
|
|
26
|
+
packageName: string | null;
|
|
27
|
+
/** Path relative to the project root (never absolute). */
|
|
28
|
+
path: string;
|
|
29
|
+
objectCount: number;
|
|
30
|
+
}
|
|
31
|
+
export interface RuntimeBoot {
|
|
32
|
+
provenance: typeof DECLARED_PROVENANCE;
|
|
33
|
+
bootedAt: string;
|
|
34
|
+
/** Basename only; the absolute project root never leaves the process. */
|
|
35
|
+
projectName: string;
|
|
36
|
+
manifests: BootedManifest[];
|
|
37
|
+
objectCount: number;
|
|
38
|
+
diagnostics: BootDiagnostic[];
|
|
39
|
+
}
|
|
40
|
+
/** The boot record for this process, or `null` before {@link bootRuntime}. */
|
|
41
|
+
export declare function getRuntimeBoot(): RuntimeBoot | null;
|
|
42
|
+
/**
|
|
43
|
+
* The resolved root the process booted from. Consumers must relativize
|
|
44
|
+
* paths against *this* root, never a per-request argument, or a caller could
|
|
45
|
+
* widen the root (e.g. `/`) and read the layout back through "relative" paths.
|
|
46
|
+
*/
|
|
47
|
+
export declare function getBootedProjectRoot(): string | null;
|
|
48
|
+
/** Test seam: forget the boot record (the registry itself is cleared by the caller). */
|
|
49
|
+
export declare function resetRuntimeBootForTests(): void;
|
|
50
|
+
export interface BootRuntimeOptions {
|
|
51
|
+
projectRoot?: string;
|
|
52
|
+
/** Clock for `bootedAt` (defaults to `new Date()`). */
|
|
53
|
+
now?: Date;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Boot the confined runtime once per process. A second call returns the
|
|
57
|
+
* existing record without touching the registry.
|
|
58
|
+
*/
|
|
59
|
+
export declare function bootRuntime(options?: BootRuntimeOptions): Promise<RuntimeBoot>;
|
|
60
|
+
//# sourceMappingURL=boot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../../src/tools/runtime/boot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,wBAAwB,CAAC;AAQzD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,IAAI,EAAE,SAAS,GAAG,YAAY,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,OAAO,mBAAmB,CAAC;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B;AA4DD,8EAA8E;AAC9E,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAEpD;AAED,wFAAwF;AACxF,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uDAAuD;IACvD,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,WAAW,CAAC,CA2FtB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DatabaseInterface } from '@happyvertical/sql';
|
|
2
|
+
/** Engine labels `@happyvertical/sql`'s `getDatabase` accepts. */
|
|
3
|
+
export type RuntimeDatabaseType = 'sqlite' | 'postgres' | 'duckdb';
|
|
4
|
+
/** Tool arguments every runtime-diagnostics tool accepts. */
|
|
5
|
+
export interface RuntimeDatabaseArgs {
|
|
6
|
+
/** Optional database URL/connection string (overrides env and config). */
|
|
7
|
+
dbUrl?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Optional engine hint for `dbUrl` or the environment connection.
|
|
10
|
+
* Must be `'sqlite'` | `'postgres'` | `'duckdb'` (case-insensitive); any
|
|
11
|
+
* other non-empty hint surfaces a safe diagnostic error rather than
|
|
12
|
+
* silently opening the wrong adapter. When absent, the engine is inferred
|
|
13
|
+
* from the URL scheme.
|
|
14
|
+
*/
|
|
15
|
+
dbType?: string;
|
|
16
|
+
}
|
|
17
|
+
export type ConnectionSource = 'argument' | 'environment' | 'config' | 'none';
|
|
18
|
+
export interface ResolvedRuntimeConnection {
|
|
19
|
+
/** Open connection, or `null` when no connection is configured. */
|
|
20
|
+
db: DatabaseInterface | null;
|
|
21
|
+
source: ConnectionSource;
|
|
22
|
+
/** Redacted connection string for display; '' when no connection. */
|
|
23
|
+
displayUrl: string;
|
|
24
|
+
/**
|
|
25
|
+
* Normalized engine label for the resolved connection (`sqlite`,
|
|
26
|
+
* `postgres`, or `duckdb`); `null` when no connection is configured.
|
|
27
|
+
*/
|
|
28
|
+
databaseType: string | null;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Redact a connection string so it can be shown to an agent without leaking
|
|
32
|
+
* credentials. Mirrors the CLI's `redactConnectionString` (which is CLI
|
|
33
|
+
* private); patterned identically so dev-mcp never depends on the CLI.
|
|
34
|
+
*
|
|
35
|
+
* Query-parameter masking normalizes each key (lowercase, `_`/`-` stripped),
|
|
36
|
+
* so camelCase forms such as Turso/libsql's `?authToken=` mask exactly like
|
|
37
|
+
* their snake_case forms. A final regex pass also masks `key=value` pairs
|
|
38
|
+
* embedded in free text (driver error messages often quote the URL); it treats
|
|
39
|
+
* the start of the string, `?`, `&`, `,`, `(`, and whitespace as the
|
|
40
|
+
* preceding boundary.
|
|
41
|
+
*/
|
|
42
|
+
export declare function redactConnectionString(value: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Build a safe, redacted error message for a database failure. Connection
|
|
45
|
+
* strings and raw driver error objects are never surfaced verbatim.
|
|
46
|
+
*/
|
|
47
|
+
export declare function safeErrorMessage(error: unknown): string;
|
|
48
|
+
/**
|
|
49
|
+
* Normalize a type hint into an engine `getDatabase` accepts. Unknown values
|
|
50
|
+
* throw a safe error (no URL is included) so the caller can surface a
|
|
51
|
+
* diagnostic instead of silently opening the wrong adapter.
|
|
52
|
+
*/
|
|
53
|
+
export declare function toRuntimeDatabaseType(value: string): RuntimeDatabaseType;
|
|
54
|
+
/** Infer an engine hint from a URL scheme when no explicit type is given. */
|
|
55
|
+
export declare function inferDatabaseType(url: string, hint?: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the dev-database connection for one tool call.
|
|
58
|
+
*
|
|
59
|
+
* Returns `db: null` (never throws) when no connection is configured; callers
|
|
60
|
+
* must treat that as "no runtime database" and return a static-only envelope.
|
|
61
|
+
* A thrown connect error is propagated to the caller, which converts it into
|
|
62
|
+
* a diagnostic envelope — it must never reach the MCP transport.
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveRuntimeConnection(args?: RuntimeDatabaseArgs): Promise<ResolvedRuntimeConnection>;
|
|
65
|
+
/**
|
|
66
|
+
* Best-effort close of a resolved connection. Never throws; diagnostics must
|
|
67
|
+
* not fail because cleanup hiccuped.
|
|
68
|
+
*/
|
|
69
|
+
export declare function closeRuntimeConnection(db: unknown): Promise<void>;
|
|
70
|
+
//# sourceMappingURL=connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../../../src/tools/runtime/connection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5D,kEAAkE;AAClE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAYnE,6DAA6D;AAC7D,MAAM,WAAW,mBAAmB;IAClC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9E,MAAM,WAAW,yBAAyB;IACxC,mEAAmE;IACnE,EAAE,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,gBAAgB,CAAC;IACzB,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AA+BD;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CA2C5D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIvD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAQxE;AAED,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAKpE;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,yBAAyB,CAAC,CAgDpC;AA2CD;;;GAGG;AACH,wBAAsB,sBAAsB,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAWvE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RuntimeDatabaseArgs } from './connection.js';
|
|
2
|
+
import { RuntimeToolEnvelope } from './tools.js';
|
|
3
|
+
export interface RuntimeProjectArgs {
|
|
4
|
+
/** Project root to boot from (defaults to the server's cwd). */
|
|
5
|
+
projectPath?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RuntimeRegistryArgs extends RuntimeProjectArgs {
|
|
8
|
+
/** Restrict object detail to these simple or qualified names. */
|
|
9
|
+
objects?: string[];
|
|
10
|
+
/** Include field/method detail (default: only when `objects` is given). */
|
|
11
|
+
detail?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** `runtime-registry`: sanitized snapshot of the booted registry. */
|
|
14
|
+
export declare function runtimeRegistry(args?: RuntimeRegistryArgs): Promise<RuntimeToolEnvelope>;
|
|
15
|
+
export interface RuntimeObjectArgs extends RuntimeProjectArgs {
|
|
16
|
+
/** Simple or qualified object name. */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Engine for the generated DDL preview (default: the registry's default). */
|
|
19
|
+
engine?: 'sqlite' | 'postgres' | 'duckdb';
|
|
20
|
+
}
|
|
21
|
+
/** `runtime-object`: one object's sanitized definition plus its generated DDL. */
|
|
22
|
+
export declare function runtimeObject(args: RuntimeObjectArgs): Promise<RuntimeToolEnvelope>;
|
|
23
|
+
export interface RuntimeSchemaDiffArgs extends RuntimeDatabaseArgs, RuntimeProjectArgs {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* `runtime-schema-diff`: booted registry schemas versus the live database,
|
|
27
|
+
* using the same comparer `db:diff`/`db:migrate` use. Introspection only —
|
|
28
|
+
* drop/relax options are pinned off and nothing is executed.
|
|
29
|
+
*/
|
|
30
|
+
export declare function runtimeSchemaDiff(args?: RuntimeSchemaDiffArgs): Promise<RuntimeToolEnvelope>;
|
|
31
|
+
//# sourceMappingURL=observation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observation.d.ts","sourceRoot":"","sources":["../../../src/tools/runtime/observation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAEL,KAAK,mBAAmB,EAEzB,MAAM,YAAY,CAAC;AAKpB,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAsBD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,iEAAiE;IACjE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,2EAA2E;IAC3E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,qEAAqE;AACrE,wBAAsB,eAAe,CACnC,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAmB9B;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;CAC3C;AAED,kFAAkF;AAClF,wBAAsB,aAAa,CACjC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,mBAAmB,CAAC,CA2D9B;AAED,MAAM,WAAW,qBACf,SAAQ,mBAAmB,EACzB,kBAAkB;CAAG;AAEzB;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,GAAE,qBAA0B,GAC/B,OAAO,CAAC,mBAAmB,CAAC,CAsC9B"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { DatabaseInterface } from '@happyvertical/sql';
|
|
2
|
+
import { RuntimeDatabaseArgs } from './connection.js';
|
|
3
|
+
/** Provenance labels separating runtime facts from static/declared facts. */
|
|
4
|
+
export declare const RUNTIME_PROVENANCE = "runtime (live DB)";
|
|
5
|
+
export declare const STATIC_PROVENANCE = "static";
|
|
6
|
+
export interface RuntimeDiagnostic {
|
|
7
|
+
severity: 'info' | 'warning';
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RuntimeToolEnvelope {
|
|
12
|
+
ok: true;
|
|
13
|
+
coverage: null;
|
|
14
|
+
diagnostics: RuntimeDiagnostic[];
|
|
15
|
+
data: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
type RuntimeReadParts = {
|
|
18
|
+
data: Record<string, unknown>;
|
|
19
|
+
diagnostics: RuntimeDiagnostic[];
|
|
20
|
+
};
|
|
21
|
+
type RuntimeRead = (db: DatabaseInterface) => Promise<RuntimeReadParts>;
|
|
22
|
+
/**
|
|
23
|
+
* Run one read against the optional runtime connection, mapping every outcome
|
|
24
|
+
* to a successful MCP envelope:
|
|
25
|
+
*
|
|
26
|
+
* - no connection configured → static-only envelope (`connected: false`)
|
|
27
|
+
* - connect failure → static envelope with a safe diagnostic
|
|
28
|
+
* - read failure → connected envelope with a safe diagnostic
|
|
29
|
+
* - success → live result under `provenance: 'runtime (live DB)'`; a
|
|
30
|
+
* category-unavailable reader result keeps its `available: false` data and
|
|
31
|
+
* surfaces its message as a diagnostic
|
|
32
|
+
*/
|
|
33
|
+
export declare function withRuntimeConnection(args: RuntimeDatabaseArgs, read: RuntimeRead, staticHint: string): Promise<RuntimeToolEnvelope>;
|
|
34
|
+
export interface MigrationStatusArgs extends RuntimeDatabaseArgs {
|
|
35
|
+
/** Row budget for latest/failed lists (default 50, capped at 500). */
|
|
36
|
+
limit?: number;
|
|
37
|
+
}
|
|
38
|
+
export declare function runtimeMigrationStatus(args?: MigrationStatusArgs): Promise<RuntimeToolEnvelope>;
|
|
39
|
+
export interface JobHealthArgs extends RuntimeDatabaseArgs {
|
|
40
|
+
/** Row budget for the jobs list (default 50, capped at 500). */
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
export declare function runtimeJobHealth(args?: JobHealthArgs): Promise<RuntimeToolEnvelope>;
|
|
44
|
+
export interface ScheduleHealthArgs extends RuntimeDatabaseArgs {
|
|
45
|
+
/** Row budget for the schedules list (default 50, capped at 500). */
|
|
46
|
+
limit?: number;
|
|
47
|
+
}
|
|
48
|
+
export declare function runtimeScheduleHealth(args?: ScheduleHealthArgs): Promise<RuntimeToolEnvelope>;
|
|
49
|
+
export interface DispatchHealthArgs extends RuntimeDatabaseArgs {
|
|
50
|
+
/** Row budget for messages/subscriptions lists (default 50, capped at 500). */
|
|
51
|
+
limit?: number;
|
|
52
|
+
}
|
|
53
|
+
export declare function runtimeDispatchHealth(args?: DispatchHealthArgs): Promise<RuntimeToolEnvelope>;
|
|
54
|
+
export interface RecentChangesArgs extends RuntimeDatabaseArgs {
|
|
55
|
+
/** Cursor to read after (default 0). */
|
|
56
|
+
since?: number;
|
|
57
|
+
/** Restrict to these physical table names. */
|
|
58
|
+
tables?: string[];
|
|
59
|
+
/** Tenant narrowing filter. */
|
|
60
|
+
tenantId?: string;
|
|
61
|
+
/** Page size (default 200, capped at 500). */
|
|
62
|
+
limit?: number;
|
|
63
|
+
}
|
|
64
|
+
export declare function runtimeRecentChanges(args?: RecentChangesArgs): Promise<RuntimeToolEnvelope>;
|
|
65
|
+
export declare function runtimeRegistryDrift(args?: RuntimeDatabaseArgs): Promise<RuntimeToolEnvelope>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/tools/runtime/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAWH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAEL,KAAK,mBAAmB,EAIzB,MAAM,iBAAiB,CAAC;AAEzB,6EAA6E;AAC7E,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAE1C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,IAAI,CAAC;IACT,QAAQ,EAAE,IAAI,CAAC;IACf,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,WAAW,EAAE,iBAAiB,EAAE,CAAC;CAClC,CAAC;AAEF,KAAK,WAAW,GAAG,CAAC,EAAE,EAAE,iBAAiB,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAC;AA6CxE;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,mBAAmB,CAAC,CAO9B;AAsJD,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAO9B;AAED,MAAM,WAAW,aAAc,SAAQ,mBAAmB;IACxD,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,gBAAgB,CACpC,IAAI,GAAE,aAAkB,GACvB,OAAO,CAAC,mBAAmB,CAAC,CAO9B;AAED,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,qBAAqB,CACzC,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAO9B;AAED,MAAM,WAAW,kBAAmB,SAAQ,mBAAmB;IAC7D,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,qBAAqB,CACzC,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,mBAAmB,CAAC,CAO9B;AAED,MAAM,WAAW,iBAAkB,SAAQ,mBAAmB;IAC5D,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,oBAAoB,CACxC,IAAI,GAAE,iBAAsB,GAC3B,OAAO,CAAC,mBAAmB,CAAC,CAQ9B;AAED,wBAAsB,oBAAoB,CACxC,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAM9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-dev-mcp",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.2",
|
|
4
4
|
"description": "Development MCP server for SMRT framework knowledge, review context, architecture context, and code generation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,15 +43,17 @@
|
|
|
43
43
|
"homepage": "https://github.com/happyvertical/smrt/tree/main/packages/smrt-dev-mcp#readme",
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@happyvertical/smrt-
|
|
47
|
-
"@happyvertical/smrt-
|
|
48
|
-
"@happyvertical/smrt-
|
|
46
|
+
"@happyvertical/smrt-config": "0.47.2",
|
|
47
|
+
"@happyvertical/smrt-core": "0.47.2",
|
|
48
|
+
"@happyvertical/smrt-scanner": "0.47.2",
|
|
49
|
+
"@happyvertical/smrt-types": "0.47.2",
|
|
50
|
+
"@happyvertical/sql": "^0.89.6",
|
|
51
|
+
"@modelcontextprotocol/node": "2.0.0",
|
|
49
52
|
"@modelcontextprotocol/server": "2.0.0"
|
|
50
53
|
},
|
|
51
54
|
"devDependencies": {
|
|
52
55
|
"@modelcontextprotocol/client": "2.0.0",
|
|
53
56
|
"@modelcontextprotocol/conformance": "0.2.0-alpha.10",
|
|
54
|
-
"@modelcontextprotocol/node": "2.0.0",
|
|
55
57
|
"@types/node": "24.13.2",
|
|
56
58
|
"ajv": "8.18.0",
|
|
57
59
|
"typescript": "5.9.3",
|