@happyvertical/smrt-dev-mcp 0.46.0 → 0.47.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/AGENTS.md +6 -0
- package/README.md +113 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +428 -2
- package/dist/index.js.map +1 -1
- package/dist/knowledge/index.d.ts.map +1 -1
- package/dist/{knowledge-SqpqYA67.js → knowledge-DmZ-7GO9.js} +105 -2
- package/dist/knowledge-DmZ-7GO9.js.map +1 -0
- package/dist/knowledge.js +1 -1
- 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/connection.d.ts +70 -0
- package/dist/tools/runtime/connection.d.ts.map +1 -0
- package/dist/tools/runtime/tools.d.ts +48 -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-DmZ-7GO9.js";
|
|
2
2
|
export { buildArchitectureContext, buildKnowledgeIndex, buildPackageSpecialistContext, buildReviewContext, checkKnowledgeFreshness, checkKnowledgeFreshnessFromIndex, compactContextResult, diffKnowledgeIndex, packageDocPaths, renderFreshnessResult, renderKnowledgeIndexMarkdown, smrtArchitecture, smrtReview };
|
|
@@ -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;AA6kBpD,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,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,CAmC5D;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,48 @@
|
|
|
1
|
+
import { RuntimeDatabaseArgs } from './connection.js';
|
|
2
|
+
/** Provenance labels separating runtime facts from static/declared facts. */
|
|
3
|
+
export declare const RUNTIME_PROVENANCE = "runtime (live DB)";
|
|
4
|
+
export declare const STATIC_PROVENANCE = "static";
|
|
5
|
+
export interface RuntimeDiagnostic {
|
|
6
|
+
severity: 'info' | 'warning';
|
|
7
|
+
code: string;
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
export interface RuntimeToolEnvelope {
|
|
11
|
+
ok: true;
|
|
12
|
+
coverage: null;
|
|
13
|
+
diagnostics: RuntimeDiagnostic[];
|
|
14
|
+
data: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export interface MigrationStatusArgs extends RuntimeDatabaseArgs {
|
|
17
|
+
/** Row budget for latest/failed lists (default 50, capped at 500). */
|
|
18
|
+
limit?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function runtimeMigrationStatus(args?: MigrationStatusArgs): Promise<RuntimeToolEnvelope>;
|
|
21
|
+
export interface JobHealthArgs extends RuntimeDatabaseArgs {
|
|
22
|
+
/** Row budget for the jobs list (default 50, capped at 500). */
|
|
23
|
+
limit?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function runtimeJobHealth(args?: JobHealthArgs): Promise<RuntimeToolEnvelope>;
|
|
26
|
+
export interface ScheduleHealthArgs extends RuntimeDatabaseArgs {
|
|
27
|
+
/** Row budget for the schedules list (default 50, capped at 500). */
|
|
28
|
+
limit?: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function runtimeScheduleHealth(args?: ScheduleHealthArgs): Promise<RuntimeToolEnvelope>;
|
|
31
|
+
export interface DispatchHealthArgs extends RuntimeDatabaseArgs {
|
|
32
|
+
/** Row budget for messages/subscriptions lists (default 50, capped at 500). */
|
|
33
|
+
limit?: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function runtimeDispatchHealth(args?: DispatchHealthArgs): Promise<RuntimeToolEnvelope>;
|
|
36
|
+
export interface RecentChangesArgs extends RuntimeDatabaseArgs {
|
|
37
|
+
/** Cursor to read after (default 0). */
|
|
38
|
+
since?: number;
|
|
39
|
+
/** Restrict to these physical table names. */
|
|
40
|
+
tables?: string[];
|
|
41
|
+
/** Tenant narrowing filter. */
|
|
42
|
+
tenantId?: string;
|
|
43
|
+
/** Page size (default 200, capped at 500). */
|
|
44
|
+
limit?: number;
|
|
45
|
+
}
|
|
46
|
+
export declare function runtimeRecentChanges(args?: RecentChangesArgs): Promise<RuntimeToolEnvelope>;
|
|
47
|
+
export declare function runtimeRegistryDrift(args?: RuntimeDatabaseArgs): Promise<RuntimeToolEnvelope>;
|
|
48
|
+
//# 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;AAYH,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,M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,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.
|
|
3
|
+
"version": "0.47.1",
|
|
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,10 +43,12 @@
|
|
|
43
43
|
"homepage": "https://github.com/happyvertical/smrt/tree/main/packages/smrt-dev-mcp#readme",
|
|
44
44
|
"license": "MIT",
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@
|
|
47
|
-
"@happyvertical/smrt-core": "0.
|
|
48
|
-
"@happyvertical/smrt-scanner": "0.
|
|
49
|
-
"@happyvertical/smrt-types": "0.
|
|
46
|
+
"@happyvertical/smrt-config": "0.47.1",
|
|
47
|
+
"@happyvertical/smrt-core": "0.47.1",
|
|
48
|
+
"@happyvertical/smrt-scanner": "0.47.1",
|
|
49
|
+
"@happyvertical/smrt-types": "0.47.1",
|
|
50
|
+
"@happyvertical/sql": "^0.89.6",
|
|
51
|
+
"@modelcontextprotocol/server": "2.0.0"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
54
|
"@modelcontextprotocol/client": "2.0.0",
|