@happyvertical/smrt-dev-mcp 0.61.6 → 0.62.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 +2 -0
- package/README.md +12 -1
- package/agents/agent-skills.md +9 -0
- package/dist/agent-skills.d.ts.map +1 -1
- package/dist/agent-skills.js +7 -0
- package/dist/agent-skills.js.map +1 -1
- package/dist/dev-plane.js +2 -2
- package/dist/{http-Brjn_G5R.js → http-Cm8eDnF_.js} +2 -2
- package/dist/{http-Brjn_G5R.js.map → http-Cm8eDnF_.js.map} +1 -1
- package/dist/index.js +3 -3
- package/dist/knowledge/intents/index.md +1 -1
- package/dist/knowledge/intents/prompts-and-ai-operations.md +1 -1
- package/dist/{knowledge-tD6NTmy1.js → knowledge-CSUS5hbw.js} +2 -2
- package/dist/{knowledge-tD6NTmy1.js.map → knowledge-CSUS5hbw.js.map} +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/smrt-knowledge.okf.md +2 -2
- package/dist/{tool-catalog-CEB611ri.js → tool-catalog-CEJeiUQd.js} +9 -2
- package/dist/tool-catalog-CEJeiUQd.js.map +1 -0
- package/dist/tool-catalog.d.ts +2 -0
- package/dist/tool-catalog.d.ts.map +1 -1
- package/package.json +6 -6
- package/plugin.json +1 -1
- package/skills/smrt-ai-work/SKILL.md +82 -0
- package/skills/smrt-ai-work/evals.json +18 -0
- package/skills/smrt-catalog/SKILL.md +6 -0
- package/dist/tool-catalog-CEB611ri.js.map +0 -1
package/dist/knowledge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as OKF_SHIPPED_COMPONENT_PAGE, D as readFrontmatterScalar, E as compareVersions, O as readOkfBundleManifest, S as OKF_INTENT_HOME_PACKAGES, T as checkOkfBundleFreshness, _ as OKF_BUNDLE_DIR_NAME, a as buildReviewContext, b as OKF_BUNDLE_MAX_AGE_DAYS, c as compactContextResult, d as listConsumerWorkspaceInstallRoots, f as packageDocPaths, g as smrtReview, h as smrtArchitecture, i as buildPackageSpecialistContext, k as stampPackageVersion, l as coreCompatibleToSnakeCase, m as renderKnowledgeIndexMarkdown, n as buildContext, o as checkKnowledgeFreshness, p as renderFreshnessResult, r as buildKnowledgeIndex, s as checkKnowledgeFreshnessFromIndex, t as buildArchitectureContext, u as diffKnowledgeIndex, v as OKF_BUNDLE_FORMAT, w as OKF_SHIPPED_INTENTS_DIR, x as OKF_BUNDLE_PARENT_DIRS, y as OKF_BUNDLE_MANIFEST } from "./knowledge-
|
|
1
|
+
import { C as OKF_SHIPPED_COMPONENT_PAGE, D as readFrontmatterScalar, E as compareVersions, O as readOkfBundleManifest, S as OKF_INTENT_HOME_PACKAGES, T as checkOkfBundleFreshness, _ as OKF_BUNDLE_DIR_NAME, a as buildReviewContext, b as OKF_BUNDLE_MAX_AGE_DAYS, c as compactContextResult, d as listConsumerWorkspaceInstallRoots, f as packageDocPaths, g as smrtReview, h as smrtArchitecture, i as buildPackageSpecialistContext, k as stampPackageVersion, l as coreCompatibleToSnakeCase, m as renderKnowledgeIndexMarkdown, n as buildContext, o as checkKnowledgeFreshness, p as renderFreshnessResult, r as buildKnowledgeIndex, s as checkKnowledgeFreshnessFromIndex, t as buildArchitectureContext, u as diffKnowledgeIndex, v as OKF_BUNDLE_FORMAT, w as OKF_SHIPPED_INTENTS_DIR, x as OKF_BUNDLE_PARENT_DIRS, y as OKF_BUNDLE_MANIFEST } from "./knowledge-CSUS5hbw.js";
|
|
2
2
|
export { OKF_BUNDLE_DIR_NAME, OKF_BUNDLE_FORMAT, OKF_BUNDLE_MANIFEST, OKF_BUNDLE_MAX_AGE_DAYS, OKF_BUNDLE_PARENT_DIRS, OKF_INTENT_HOME_PACKAGES, OKF_SHIPPED_COMPONENT_PAGE, OKF_SHIPPED_INTENTS_DIR, buildArchitectureContext, buildContext, buildKnowledgeIndex, buildPackageSpecialistContext, buildReviewContext, checkKnowledgeFreshness, checkKnowledgeFreshnessFromIndex, checkOkfBundleFreshness, compactContextResult, compareVersions, coreCompatibleToSnakeCase, diffKnowledgeIndex, listConsumerWorkspaceInstallRoots, packageDocPaths, readFrontmatterScalar, readOkfBundleManifest, renderFreshnessResult, renderKnowledgeIndexMarkdown, smrtArchitecture, smrtReview, stampPackageVersion };
|
|
@@ -5,10 +5,10 @@ description: "Development MCP server for SMRT framework knowledge, review contex
|
|
|
5
5
|
status: "stable"
|
|
6
6
|
generated:
|
|
7
7
|
by: "smrt/scripts/generate-knowledge-okf.ts"
|
|
8
|
-
at: "2026-11-
|
|
8
|
+
at: "2026-11-16T10:39:38Z"
|
|
9
9
|
audience: "internal"
|
|
10
10
|
evidence_level: "manifest-described"
|
|
11
|
-
source_revision: "sha256:
|
|
11
|
+
source_revision: "sha256:d451a578dded44b64831e2f32217ac5ee25d06aebd6f9ad1de8495bdf73df61f"
|
|
12
12
|
sources:
|
|
13
13
|
- id: "manifest"
|
|
14
14
|
resource: "https://github.com/happyvertical/smrt/blob/main/packages/smrt-dev-mcp/package.json"
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
//#region src/tool-catalog.ts
|
|
2
2
|
var REVIEW_SKILL_NAME = "smrt-code-review";
|
|
3
|
+
/** Every bundled skill `get-agent-skill` can serve (matches `AGENT_SKILLS`). */
|
|
4
|
+
var AGENT_SKILL_NAMES = [
|
|
5
|
+
REVIEW_SKILL_NAME,
|
|
6
|
+
"smrt-catalog",
|
|
7
|
+
"smrt-contribute",
|
|
8
|
+
"smrt-ai-work"
|
|
9
|
+
];
|
|
3
10
|
var JSON_SCHEMA_2020_12 = "https://json-schema.org/draft/2020-12/schema";
|
|
4
11
|
function compareToolNames(left, right) {
|
|
5
12
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
@@ -543,7 +550,7 @@ var TOOLS = [
|
|
|
543
550
|
properties: {
|
|
544
551
|
name: {
|
|
545
552
|
type: "string",
|
|
546
|
-
enum: [
|
|
553
|
+
enum: [...AGENT_SKILL_NAMES],
|
|
547
554
|
description: "Bundled agent skill name"
|
|
548
555
|
},
|
|
549
556
|
includeReferences: {
|
|
@@ -737,4 +744,4 @@ var TOOLS = [
|
|
|
737
744
|
//#endregion
|
|
738
745
|
export { TOOLS as n, REVIEW_SKILL_NAME as t };
|
|
739
746
|
|
|
740
|
-
//# sourceMappingURL=tool-catalog-
|
|
747
|
+
//# sourceMappingURL=tool-catalog-CEJeiUQd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog-CEJeiUQd.js","names":[],"sources":["../src/tool-catalog.ts"],"sourcesContent":["import type { Tool } from '@modelcontextprotocol/server';\n\nexport const REVIEW_SKILL_NAME = 'smrt-code-review';\n\n/** Every bundled skill `get-agent-skill` can serve (matches `AGENT_SKILLS`). */\nexport const AGENT_SKILL_NAMES = [\n REVIEW_SKILL_NAME,\n 'smrt-catalog',\n 'smrt-contribute',\n 'smrt-ai-work',\n] as const;\n\nconst JSON_SCHEMA_2020_12 = 'https://json-schema.org/draft/2020-12/schema';\n\nfunction compareToolNames(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n\n/**\n * Stable success/error envelope for development tools. `data` preserves each\n * tool's existing payload exactly; coverage/diagnostics are promoted only when\n * the underlying result actually reports them.\n */\nconst DEV_MCP_OUTPUT_SCHEMA: NonNullable<Tool['outputSchema']> = {\n $schema: JSON_SCHEMA_2020_12,\n type: 'object',\n additionalProperties: false,\n required: ['ok', 'coverage', 'diagnostics', 'data'],\n properties: {\n ok: { type: 'boolean' },\n coverage: { type: ['object', 'null'], additionalProperties: true },\n diagnostics: {\n type: 'array',\n items: { type: 'object', additionalProperties: true },\n },\n data: {},\n },\n};\n\nconst KNOWLEDGE_DETAIL_DESCRIPTION =\n 'summary: authored package docs are listed by path to stay inside tool-result budgets. full: embed package docs and matching modules with structural object facts. complete: embed all modules and return full package records.';\n\nconst DATABASE_URL_PROPERTY = {\n type: 'string',\n description:\n 'Optional dev database URL override (read-only diagnostics); prefer SMRT_DEV_DB_URL or cli.database config',\n};\n\nconst DATABASE_TYPE_PROPERTY = {\n type: 'string',\n enum: ['sqlite', 'postgres', 'duckdb'],\n description:\n 'Optional engine hint for dbUrl or the environment connection (sqlite, postgres, duckdb); inferred from the URL scheme when omitted',\n};\n\nconst PROJECT_PATH_PROPERTY = {\n type: 'string',\n description:\n 'Project root to boot manifests from (default: the server working directory; pinned by the HTTP host; a different loaded project requires restart)',\n} as const;\n\nconst LIMIT_PROPERTY = {\n type: 'number',\n description: 'Row budget for result lists (default 50, capped at 500)',\n};\n\n// Tool definitions\nconst TOOL_DEFINITIONS: Array<\n Pick<Tool, 'name' | 'description' | 'inputSchema'>\n> = [\n // Code Generation Tools\n {\n name: 'generate-smrt-class',\n description: 'Generate a complete SMRT class with @smrt() decorator',\n inputSchema: {\n type: 'object',\n properties: {\n className: {\n type: 'string',\n description: 'Name of the class (PascalCase)',\n },\n properties: {\n type: 'array',\n description: 'Array of property definitions',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n type: {\n type: 'string',\n enum: [\n 'text',\n 'integer',\n 'decimal',\n 'boolean',\n 'datetime',\n 'json',\n ],\n },\n required: { type: 'boolean' },\n nullable: { type: 'boolean' },\n description: { type: 'string' },\n defaultValue: {\n oneOf: [\n { type: 'string' },\n { type: 'number' },\n { type: 'boolean' },\n { type: 'object' },\n { type: 'null' },\n ],\n },\n },\n required: ['name', 'type'],\n },\n },\n baseClass: {\n type: 'string',\n enum: ['SmrtObject', 'SmrtCollection'],\n default: 'SmrtObject',\n },\n template: {\n type: 'string',\n enum: [\n 'basic',\n 'global-catalog',\n 'optional-catalog',\n 'tenant-project-object',\n 'tenant-event-log-object',\n 'cross-package-reference',\n ],\n default: 'basic',\n },\n tableName: { type: 'string' },\n conflictColumns: {\n type: 'array',\n items: { type: 'string' },\n },\n tenantScoped: {\n oneOf: [\n { type: 'boolean' },\n {\n type: 'object',\n properties: {\n mode: { type: 'string', enum: ['required', 'optional'] },\n field: { type: 'string' },\n autoFilter: { type: 'boolean' },\n autoPopulate: { type: 'boolean' },\n allowSuperAdminBypass: { type: 'boolean' },\n },\n },\n ],\n },\n includeTenantIdField: { type: 'boolean' },\n relationships: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n type: {\n type: 'string',\n enum: [\n 'foreignKey',\n 'crossPackageRef',\n 'oneToMany',\n 'manyToMany',\n ],\n },\n related: { type: 'string' },\n required: { type: 'boolean' },\n nullable: { type: 'boolean' },\n description: { type: 'string' },\n validate: { type: 'boolean' },\n foreignKey: { type: 'string' },\n through: { type: 'string' },\n sourceKey: { type: 'string' },\n targetKey: { type: 'string' },\n },\n required: ['name', 'type', 'related'],\n },\n },\n includeCompanionSnippets: { type: 'boolean', default: false },\n includeApiConfig: { type: 'boolean', default: true },\n includeMcpConfig: { type: 'boolean', default: true },\n includeCliConfig: { type: 'boolean', default: true },\n },\n required: ['className', 'properties'],\n },\n },\n {\n name: 'harden-smrt-class',\n description:\n 'Suggest a hardening for a smrt class the app uses: a same-named subclass that overrides fields (for example required: true). Returns the source; writes it into the app code only with write: true. Never touches a database: the build and `smrt db:migrate` apply the rule.',\n inputSchema: {\n type: 'object',\n properties: {\n className: {\n type: 'string',\n description: 'The smrt class the app uses (PascalCase)',\n },\n importFrom: {\n type: 'string',\n description:\n 'Package that exports the class, for example @happyvertical/smrt-crm',\n },\n overrides: {\n type: 'array',\n description: 'Fields to override',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n type: {\n type: 'string',\n enum: [\n 'text',\n 'integer',\n 'decimal',\n 'boolean',\n 'datetime',\n 'json',\n ],\n description:\n 'Read from the installed package manifest when omitted',\n },\n required: {\n type: 'boolean',\n description: 'Default true. false loosens the field.',\n },\n maxLength: { type: 'number' },\n description: { type: 'string' },\n },\n required: ['name'],\n },\n },\n directory: {\n type: 'string',\n description: 'Project directory (default: cwd)',\n },\n outputPath: {\n type: 'string',\n description:\n 'File to write, relative to directory (default src/models/<ClassName>.ts)',\n },\n write: {\n type: 'boolean',\n default: false,\n description:\n 'Write the file. Default false: return the suggestion only. Never overwrites a file.',\n },\n },\n required: ['className', 'importFrom', 'overrides'],\n },\n },\n // Project Introspection Tools\n {\n name: 'introspect-project',\n description:\n 'Scan a directory for SMRT objects. Returns a compact summary by default; pass detail: \"full\" for field, schema, and method details.',\n inputSchema: {\n type: 'object',\n properties: {\n directory: {\n type: 'string',\n description: 'Project directory (default: cwd)',\n },\n manifestPath: {\n type: 'string',\n description:\n 'Optional manifest path. Defaults to .smrt/manifest.json, dist/manifest.json, then source scanning.',\n },\n detail: {\n type: 'string',\n enum: ['summary', 'full'],\n default: 'summary',\n description:\n 'summary: one compact record per object. full: complete field/schema/method detail (large).',\n },\n maxChars: {\n type: 'number',\n description:\n 'Character budget for the `objects` payload. Objects past the budget are omitted and reported under `truncated`. Project metadata and diagnostics are always returned in full, so the serialized response is somewhat larger than this budget.',\n },\n cursor: {\n type: 'string',\n description:\n \"Resume after this className (objects are sorted alphabetically). Pass a previous response's `nextCursor` to read the next page instead of raising maxChars.\",\n },\n limit: {\n type: 'number',\n description:\n 'Maximum objects per page, applied before the character budget',\n },\n includeFields: {\n type: 'boolean',\n description: 'Include field details (detail: \"full\" only)',\n },\n includeRelationships: {\n type: 'boolean',\n description: 'Analyze relationships (detail: \"full\" only)',\n },\n includeMethods: {\n type: 'boolean',\n description: 'Include public method details (detail: \"full\" only)',\n },\n },\n },\n },\n {\n name: 'review-smrt-project',\n description:\n 'Advisory ecosystem alignment review for downstream SMRT projects, including intent-driven hand-rolled-equivalent detection',\n inputSchema: {\n type: 'object',\n properties: {\n directory: {\n type: 'string',\n description: 'Project directory (default: cwd)',\n },\n rootDir: {\n type: 'string',\n description: 'Compatibility alias for directory',\n },\n includeSourceEvidence: {\n type: 'boolean',\n description: 'Include file and line evidence in findings',\n default: true,\n },\n maxFindings: {\n type: 'number',\n description: 'Optional maximum number of findings to return',\n },\n intentIndexPath: {\n type: 'string',\n description:\n 'Caller-trusted intent index driving duplicate detection (regex tokens become RegExp). Default: the full index packaged in this release, never read from the reviewed directory',\n },\n detectDuplicates: {\n type: 'boolean',\n description:\n 'Run the intent-driven hand-rolled-equivalent pass (default: true)',\n default: true,\n },\n },\n },\n },\n {\n name: 'reflect-knowledge',\n description:\n 'Report deterministic SMRT + HappyVertical SDK knowledge coverage and freshness',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: {\n type: 'string',\n description: 'Project root directory (default: cwd)',\n },\n },\n },\n },\n {\n name: 'reflect-domain-knowledge',\n description:\n 'Report domain-scoped SMRT knowledge artifacts, SDK packages, and freshness',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n scope: {\n type: 'string',\n enum: ['project', 'local', 'package', 'sdk', 'installed'],\n default: 'project',\n },\n package: { type: 'string' },\n },\n },\n },\n {\n name: 'check-knowledge-freshness',\n description: 'Run deterministic freshness checks for SMRT agent knowledge',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n changed: {\n type: 'boolean',\n description: 'Limit stale-pattern checks to changed files',\n },\n strict: {\n type: 'boolean',\n description: 'Treat stale-pattern findings as errors',\n },\n },\n },\n },\n {\n name: 'build-context',\n description:\n 'Build model-ready SMRT context. task: \"review\" routes changedFiles/focus to package experts and returns file-anchored findings, package hints, and a prompt bundle; task: \"architecture\" ranks packages by the idea text and returns the bundle plus recommendations. Replaces build-review-context, build-domain-review-context, build-architecture-context, and build-domain-architecture-context.',\n inputSchema: {\n type: 'object',\n properties: {\n task: {\n type: 'string',\n enum: ['review', 'architecture'],\n description:\n 'review: changed files and focus. architecture: an idea or documentation.',\n },\n rootDir: { type: 'string' },\n changedFiles: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files to route to package experts (task: review)',\n },\n focus: { type: 'string', description: 'Concern to prioritise' },\n documentation: {\n type: 'string',\n description: 'Existing docs, notes, or requirements',\n },\n idea: {\n type: 'string',\n description: 'Product or implementation idea (task: architecture)',\n },\n scope: {\n type: 'string',\n enum: ['project', 'local', 'package', 'sdk', 'installed'],\n default: 'project',\n },\n package: {\n type: 'string',\n description: 'Package name or short name to focus',\n },\n mode: {\n type: 'string',\n enum: ['findings', 'prompt-bundle', 'both'],\n default: 'both',\n description: 'task: review only',\n },\n detail: {\n type: 'string',\n enum: ['summary', 'full', 'complete'],\n default: 'summary',\n description: KNOWLEDGE_DETAIL_DESCRIPTION,\n },\n },\n required: ['task'],\n },\n },\n {\n name: 'smrt-review',\n description:\n 'Deprecated compatibility name for build-context with task: \"review\"; removed in the next minor release. For a formal downstream review, first call get-agent-skill with { \"name\": \"smrt-code-review\" }.',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n changedFiles: { type: 'array', items: { type: 'string' } },\n focus: { type: 'string' },\n documentation: { type: 'string' },\n mode: {\n type: 'string',\n enum: ['findings', 'prompt-bundle', 'both'],\n default: 'both',\n },\n detail: {\n type: 'string',\n enum: ['summary', 'full', 'complete'],\n default: 'summary',\n description: KNOWLEDGE_DETAIL_DESCRIPTION,\n },\n },\n },\n },\n {\n name: 'build-package-specialist-context',\n description:\n 'Build deterministic package specialist context for the SMRT workbench',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n package: {\n type: 'string',\n description:\n 'Package name or short package query, e.g. @happyvertical/smrt-content or content',\n },\n focus: { type: 'string' },\n },\n required: ['package'],\n },\n },\n {\n name: 'smrt-architecture',\n description:\n 'Deprecated compatibility name for build-context with task: \"architecture\"; removed in the next minor release.',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n idea: { type: 'string' },\n documentation: { type: 'string' },\n focus: { type: 'string' },\n detail: {\n type: 'string',\n enum: ['summary', 'full', 'complete'],\n default: 'summary',\n description: KNOWLEDGE_DETAIL_DESCRIPTION,\n },\n },\n },\n },\n {\n name: 'list-agent-skills',\n description:\n 'List bundled harness-agnostic agent skills shipped with smrt-dev-mcp',\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n {\n name: 'get-agent-skill',\n description:\n 'Return a bundled harness-agnostic agent skill as Markdown plus optional references',\n inputSchema: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n enum: [...AGENT_SKILL_NAMES],\n description: 'Bundled agent skill name',\n },\n includeReferences: {\n type: 'boolean',\n default: true,\n description: 'Include referenced files with the skill bundle',\n },\n },\n required: ['name'],\n },\n },\n {\n name: 'migration-status',\n description:\n 'Live migration status from the _smrt_schema_migrations system table (runtime provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'job-health',\n description:\n 'Live job queue health from the _smrt_jobs/_smrt_workers system tables (runtime provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'schedule-health',\n description:\n 'Live agent schedule health from the _smrt_agent_schedules system table (runtime provenance; read-only; sensitive agentConfig never read)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'dispatch-health',\n description:\n 'Live dispatch health from the _smrt_dispatch/_smrt_dispatch_subscriptions system tables (runtime provenance; read-only; payloads never read)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'recent-changes',\n description:\n 'Tail of the _smrt_changes change feed (runtime provenance; read-only; filter by table/tenant)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n since: {\n type: 'number',\n description: 'Cursor to read after (default 0)',\n },\n tables: {\n type: 'array',\n items: { type: 'string' },\n description: 'Restrict to these physical table names',\n },\n tenantId: {\n type: 'string',\n description: 'Tenant narrowing filter',\n },\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'registry-drift',\n description:\n 'Registry drift report; _smrt_registry is retired and reported as such, never queried (read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n },\n },\n },\n {\n name: 'runtime-registry',\n description:\n 'Sanitized snapshot of the booted ObjectRegistry from the project and installed manifests (booted provenance; read-only; no project code executed)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: PROJECT_PATH_PROPERTY,\n objects: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Restrict field/method detail to these simple or qualified object names',\n },\n detail: {\n type: 'boolean',\n description:\n 'Include field and method detail for every object (default: only when objects is given)',\n },\n cursor: {\n type: 'string',\n description:\n \"Resume after this qualified object name; pass a previous response's `page.nextCursor`\",\n },\n limit: {\n type: 'number',\n description: 'Objects per page (default 50, capped at 500)',\n },\n },\n },\n },\n {\n name: 'runtime-object',\n description:\n 'One booted object: sanitized fields, methods, tenancy, inheritance, and the DDL the registry would generate (booted provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: PROJECT_PATH_PROPERTY,\n name: {\n type: 'string',\n description: 'Simple or qualified object name',\n },\n engine: {\n type: 'string',\n enum: ['sqlite', 'postgres', 'duckdb'],\n description: 'Engine for the DDL preview (default: registry default)',\n },\n },\n required: ['name'],\n },\n },\n {\n name: 'runtime-schema-diff',\n description:\n 'Booted registry schemas versus the live dev database using the db:diff comparer; introspection only, drops/relaxations never proposed (runtime provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: PROJECT_PATH_PROPERTY,\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n },\n },\n },\n];\n\nexport const TOOLS: Tool[] = TOOL_DEFINITIONS.map((tool) => ({\n ...tool,\n inputSchema: {\n ...tool.inputSchema,\n $schema: JSON_SCHEMA_2020_12,\n },\n outputSchema: DEV_MCP_OUTPUT_SCHEMA,\n})).sort((left, right) => compareToolNames(left.name, right.name));\n"],"mappings":";AAEA,IAAa,oBAAoB;;AAGjC,IAAa,oBAAoB;CAC/B;CACA;CACA;CACA;AACF;AAEA,IAAM,sBAAsB;AAE5B,SAAS,iBAAiB,MAAc,OAAuB;CAC7D,OAAO,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAChD;;;;;;AAOA,IAAM,wBAA2D;CAC/D,SAAS;CACT,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAM;EAAY;EAAe;CAAM;CAClD,YAAY;EACV,IAAI,EAAE,MAAM,UAAU;EACtB,UAAU;GAAE,MAAM,CAAC,UAAU,MAAM;GAAG,sBAAsB;EAAK;EACjE,aAAa;GACX,MAAM;GACN,OAAO;IAAE,MAAM;IAAU,sBAAsB;GAAK;EACtD;EACA,MAAM,CAAC;CACT;AACF;AAEA,IAAM,+BACJ;AAEF,IAAM,wBAAwB;CAC5B,MAAM;CACN,aACE;AACJ;AAEA,IAAM,yBAAyB;CAC7B,MAAM;CACN,MAAM;EAAC;EAAU;EAAY;CAAQ;CACrC,aACE;AACJ;AAEA,IAAM,wBAAwB;CAC5B,MAAM;CACN,aACE;AACJ;AAEA,IAAM,iBAAiB;CACrB,MAAM;CACN,aAAa;A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D;CACF;CAEA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,WAAW;KACT,MAAM;KACN,aAAa;IACf;IACA,cAAc;KACZ,MAAM;KACN,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,MAAM,CAAC,WAAW,MAAM;KACxB,SAAS;KACT,aACE;IACJ;IACA,UAAU;KACR,MAAM;KACN,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aACE;IACJ;IACA,eAAe;KACb,MAAM;KACN,aAAa;IACf;IACA,sBAAsB;KACpB,MAAM;KACN,aAAa;IACf;IACA,gBAAgB;KACd,MAAM;KACN,aAAa;IACf;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,WAAW;KACT,MAAM;KACN,aAAa;IACf;IACA,SAAS;KACP,MAAM;KACN,aAAa;IACf;IACA,uBAAuB;KACrB,MAAM;KACN,aAAa;KACb,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,aAAa;IACf;IACA,iBAAiB;KACf,MAAM;KACN,aACE;IACJ;IACA,kBAAkB;KAChB,MAAM;KACN,aACE;KACF,SAAS;IACX;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY,EACV,SAAS;IACP,MAAM;IACN,aAAa;GACf,EACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,SAAS,EAAE,MAAM,SAAS;IAC1B,OAAO;KACL,MAAM;KACN,MAAM;MAAC;MAAW;MAAS;MAAW;MAAO;KAAW;KACxD,SAAS;IACX;IACA,SAAS,EAAE,MAAM,SAAS;GAC5B;EACF;CACF;CACA;EACE,MAAM;EACN,aAAa;EACb,aAAa;GACX,MAAM;GACN,YAAY;IACV,SAAS,EAAE,MAAM,SAAS;IAC1B,SAAS;KACP,MAA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1B,SAAS;KACP,MAAM;KACN,aACE;IACJ;IACA,OAAO,EAAE,MAAM,SAAS;GAC1B;GACA,UAAU,CAAC,SAAS;EACtB;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,SAAS,EAAE,MAAM,SAAS;IAC1B,MAAM,EAAE,MAAM,SAAS;IACvB,eAAe,EAAE,MAAM,SAAS;IAChC,OAAO,EAAE,MAAM,SAAS;IACxB,QAAQ;KACN,MAAM;KACN,MAAM;MAAC;MAAW;MAAQ;KAAU;KACpC,SAAS;KACT,aAAa;IACf;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY,CAAC;EACf;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,MAAM;KACJ,MAAM;KACN,MAAM,CAAC,GAAG,iBAAiB;KAC3B,aAAa;IACf;IACA,mBAAmB;KACjB,MAAM;KACN,SAAS;KACT,aAAa;IACf;GACF;GACA,UAAU,CAAC,MAAM;EACnB;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,QAAQ;KACN,MAAM;KACN,OAAO,EAAE,MAAM,SAAS;KACxB,aAAa;IACf;IACA,UAAU;KACR,MAAM;KACN,aAAa;IACf;IACA,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;GACV;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;IACb,SAAS;KACP,MAAM;KACN,OAAO,EAAE,MAAM,SAAS;KACxB,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;IACb,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,QAAQ;KACN,MAAM;KACN,MAAM;MAAC;MAAU;MAAY;KAAQ;KACrC,aAAa;IACf;GACF;GACA,UAAU,CAAC,MAAM;EACnB;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;IACb,OAAO;IACP,QAAQ;GACV;EACF;CACF;AAG2B,CAAA,CAAiB,KAAK,UAAU;CAC3D,GAAG;CACH,aAAa;EACX,GAAG,KAAK;EACR,SAAS;CACX;CACA,cAAc;AAChB,EAAE,CAAC,CAAC,MAAM,MAAM,UAAU,iBAAiB,KAAK,MAAM,MAAM,IAAI,CAAC"}
|
package/dist/tool-catalog.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { Tool } from '@modelcontextprotocol/server';
|
|
2
2
|
export declare const REVIEW_SKILL_NAME = "smrt-code-review";
|
|
3
|
+
/** Every bundled skill `get-agent-skill` can serve (matches `AGENT_SKILLS`). */
|
|
4
|
+
export declare const AGENT_SKILL_NAMES: readonly ["smrt-code-review", "smrt-catalog", "smrt-contribute", "smrt-ai-work"];
|
|
3
5
|
export declare const TOOLS: Tool[];
|
|
4
6
|
//# sourceMappingURL=tool-catalog.d.ts.map
|
|
@@ -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;AAEpD,gFAAgF;AAChF,eAAO,MAAM,iBAAiB,kFAKpB,CAAC;AA8sBX,eAAO,MAAM,KAAK,EAAE,IAAI,EAO0C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-dev-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.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",
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
"homepage": "https://github.com/happyvertical/smrt/tree/main/packages/smrt-dev-mcp#readme",
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@happyvertical/smrt-scanner": "0.
|
|
61
|
+
"@happyvertical/smrt-scanner": "0.62.1",
|
|
62
62
|
"@modelcontextprotocol/node": "2.1.2",
|
|
63
63
|
"@modelcontextprotocol/server": "2.4.0",
|
|
64
|
-
"@happyvertical/smrt-types": "0.
|
|
64
|
+
"@happyvertical/smrt-types": "0.62.1"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@happyvertical/smrt-config": "0.
|
|
68
|
-
"@happyvertical/smrt-core": "0.
|
|
67
|
+
"@happyvertical/smrt-config": "0.62.1",
|
|
68
|
+
"@happyvertical/smrt-core": "0.62.1",
|
|
69
69
|
"@happyvertical/sql": "^0.113.0",
|
|
70
70
|
"@modelcontextprotocol/client": "2.4.0",
|
|
71
71
|
"@modelcontextprotocol/conformance": "0.2.0-alpha.11",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"scripts": {
|
|
83
83
|
"test": "vitest run",
|
|
84
84
|
"test:watch": "vitest",
|
|
85
|
-
"typecheck": "tsc
|
|
85
|
+
"typecheck": "tsc -p tsconfig.typecheck.json",
|
|
86
86
|
"build": "vite build",
|
|
87
87
|
"build:watch": "vite build --watch",
|
|
88
88
|
"clean": "rm -rf dist",
|
package/plugin.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "smrt-dev-mcp",
|
|
4
|
-
"description": "Development MCP server and SMRT skills: catalog router, contributor guide, and code review."
|
|
4
|
+
"description": "Development MCP server and SMRT skills: catalog router, AI work, contributor guide, and code review."
|
|
5
5
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smrt-ai-work
|
|
3
|
+
description: Use when asked to add AI work to a project that depends on @happyvertical smrt packages ("summarize each ticket", "classify incoming mail", "draft a reply", "add a multi-step AI workflow", "call a model") or to explain how AI work is recorded and limited (runs, events, trajectories, evaluations, tiers, latency, reasoning effort, budgets, fusions, seats, usage rows, ai:usage). Produces a registered prompt, a tracked call carrying its prompt key, and for multi-step work a smrt-workflows definition, never a direct provider SDK call. Stay silent for editing an existing prompt's wording only.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SMRT AI work
|
|
7
|
+
|
|
8
|
+
Every model call in an smrt app is a registered prompt, sent on the tracked
|
|
9
|
+
client, recorded once as a usage row. Several calls that belong together are a
|
|
10
|
+
run. Never import a provider SDK, call `getAI()`, or inline a prompt string.
|
|
11
|
+
|
|
12
|
+
## Adding AI work
|
|
13
|
+
|
|
14
|
+
1. **Register the prompt.** `definePrompt({ key, template, ai })` from
|
|
15
|
+
`@happyvertical/smrt-prompts`, key namespaced by package (`tickets.summarize`).
|
|
16
|
+
Declare the quality it needs as a tier: `ai: { profile: 'cheap' | 'good' |
|
|
17
|
+
'great' | 'best' }` (classification `cheap`, summaries `good`, synthesis
|
|
18
|
+
`great`; never a model name). Add `ai: { latency: 'interactive' |
|
|
19
|
+
'background', effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max',
|
|
20
|
+
minimumTier }` only when the work needs them. Keys are persisted
|
|
21
|
+
identifiers: never rename one.
|
|
22
|
+
2. **Make a tracked call.** On a `SmrtObject`, `is()`, `do()` and `describe()`
|
|
23
|
+
already record and route by tier. Elsewhere (a job, a route, a service):
|
|
24
|
+
`createTrackedAiClient({ db, tenantId })`, then
|
|
25
|
+
`const resolved = await resolvePrompt(key, ...)` and
|
|
26
|
+
`await tracked.client(trackedPromptCall(resolved), { runContext })`. A call
|
|
27
|
+
without a prompt key is refused (`AiPromptKeyRequiredError`).
|
|
28
|
+
3. **Multi-step work is a workflow.** Several dependent steps, schema-checked
|
|
29
|
+
output, repair, approval, or a budget: write a definition for
|
|
30
|
+
`@happyvertical/smrt-workflows` (`createWorkflowRunDriver`, or
|
|
31
|
+
`createWorkflowRunJobs` to run it on background jobs). Each step names a
|
|
32
|
+
prompt key, a JSON Schema for its output, and an optional host `check`.
|
|
33
|
+
Give the run a budget: `{ maxTokens, maxCost, maxCalls, maxSteps,
|
|
34
|
+
maxDurationMs, repairRetries }`. Steps and checks must be safe to repeat.
|
|
35
|
+
4. **Background work uses the handler job contract.** A job targets a model
|
|
36
|
+
method or a named handler `<package>:<name>`
|
|
37
|
+
(`registerJobHandler(name, handler)`; enqueue with
|
|
38
|
+
`SmrtJobCollection.enqueueHandlerJob({ handler, payload })`). Register every
|
|
39
|
+
handler at process startup before `TaskRunner.start()` (registering later
|
|
40
|
+
throws `JobHandlerRegistrationClosedError`); a runner only claims handler
|
|
41
|
+
jobs it registered; a handler job nobody claims fails after
|
|
42
|
+
`handlerUnclaimedDeadlineMs` (default 24 h). The handler gets
|
|
43
|
+
`(payload, context)`; pass the run context explicitly through the payload
|
|
44
|
+
(`serializeAiRunContext` / `restoreAiRunContext`), never a global.
|
|
45
|
+
5. **Tell the user** the prompt key, its tier, and the run type before coding.
|
|
46
|
+
|
|
47
|
+
## Explaining it
|
|
48
|
+
|
|
49
|
+
Read the sources at the end before answering; do not answer from memory.
|
|
50
|
+
|
|
51
|
+
- **Call**: one model request, one `_smrt_ai_usage` row (the cost ledger).
|
|
52
|
+
- **Run**: a piece of work with its own row, status and budget (`fusion`,
|
|
53
|
+
`turn`, `workflow`, or `@scope/pkg:type`); a lone call is not a run.
|
|
54
|
+
A budget limit **stops** a run with a typed reason and a durable run can be
|
|
55
|
+
**resumed**; a **cancel** is final; a failed run is **retried** as a new run.
|
|
56
|
+
- **Event / trajectory**: ordered entries of a run (call, action, check,
|
|
57
|
+
approval, handoff); `getRunTrajectory(runId)` reads them.
|
|
58
|
+
- **Evaluation**: a later judgment on a call or run (`recordAiEvaluation`,
|
|
59
|
+
label or score, by `human`, `app` or `grader:<name>@<version>`). It replaced
|
|
60
|
+
"outcome". A check or approval inside a run is an event.
|
|
61
|
+
- **Tier, latency, effort**: tier is quality bound to a model, alias chain or
|
|
62
|
+
fusion; latency is `interactive` or `background`; effort is reasoning effort
|
|
63
|
+
from the caller, then the prompt, then the tier binding. None of them names
|
|
64
|
+
a model.
|
|
65
|
+
- **Fusion, seat**: a tier bound to several calls (`single`, `pair`,
|
|
66
|
+
`handoff`) run as one `fusion` run; a seat is one prompt plus target.
|
|
67
|
+
- **Reading results**: `smrt ai:usage --by prompt,model,tier`, `--runs`,
|
|
68
|
+
`smrt ai:compare`, `smrt ai:transcript`.
|
|
69
|
+
|
|
70
|
+
Sources:
|
|
71
|
+
|
|
72
|
+
- The AI runs page, https://happyvertical.github.io/smrt/ai-runs, and the
|
|
73
|
+
inference guide, https://happyvertical.github.io/smrt/inference.
|
|
74
|
+
- The notes the installed packages ship:
|
|
75
|
+
`node_modules/@happyvertical/smrt-core/agents/ai-usage.md`,
|
|
76
|
+
`node_modules/@happyvertical/smrt-prompts/AGENTS.md`,
|
|
77
|
+
`node_modules/@happyvertical/smrt-workflows/AGENTS.md`,
|
|
78
|
+
`node_modules/@happyvertical/smrt-workflows/agents/workflow-runs.md` and
|
|
79
|
+
`node_modules/@happyvertical/smrt-jobs/AGENTS.md` (the handler job contract
|
|
80
|
+
is step 4 above).
|
|
81
|
+
- The project's knowledge pages, `.agents/smrt-knowledge/components/*.md`
|
|
82
|
+
(written by `smrt docs:agents`).
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "smrt-ai-work",
|
|
3
|
+
"note": "Trigger eval set. Positive: adding or explaining AI work in a project that depends on smrt packages. Negative: editing an existing prompt's wording, or work with no model call. src/agent-skills.test.ts asserts the description covers the positive classes.",
|
|
4
|
+
"positive": [
|
|
5
|
+
{ "prompt": "summarize each ticket with a model", "signal": "add" },
|
|
6
|
+
{ "prompt": "classify incoming mail with AI", "signal": "add" },
|
|
7
|
+
{ "prompt": "add a multi-step AI workflow that drafts then reviews a proposal", "signal": "workflow" },
|
|
8
|
+
{ "prompt": "call a model to draft a reply", "signal": "add" },
|
|
9
|
+
{ "prompt": "what is the difference between a run and a call?", "signal": "explain" },
|
|
10
|
+
{ "prompt": "why did this AI run stop on its budget?", "signal": "explain" },
|
|
11
|
+
{ "prompt": "how do I record whether an AI answer was good?", "signal": "explain" }
|
|
12
|
+
],
|
|
13
|
+
"negative": [
|
|
14
|
+
{ "prompt": "reword the system prompt for tickets.summarize", "reason": "editing an existing prompt's wording" },
|
|
15
|
+
{ "prompt": "add a price field to Invoice", "reason": "no model call" },
|
|
16
|
+
{ "prompt": "add a nightly cleanup job", "reason": "background work with no model call; smrt-catalog" }
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -24,6 +24,12 @@ installed package already provides the behaviour.
|
|
|
24
24
|
from its output. If `check-knowledge-freshness` reports the bundle stale,
|
|
25
25
|
say so and suggest rerunning `smrt docs:agents`.
|
|
26
26
|
|
|
27
|
+
## AI work
|
|
28
|
+
|
|
29
|
+
A request to add a model call, a prompt or a multi-step AI workflow, or to
|
|
30
|
+
explain runs, evaluations, tiers or budgets, goes to the `smrt-ai-work` skill
|
|
31
|
+
(`get-agent-skill`), not to a provider SDK.
|
|
32
|
+
|
|
27
33
|
## When the package lacks the behaviour
|
|
28
34
|
|
|
29
35
|
The home package exists but does not do what is needed:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog-CEB611ri.js","names":[],"sources":["../src/tool-catalog.ts"],"sourcesContent":["import type { Tool } from '@modelcontextprotocol/server';\n\nexport const REVIEW_SKILL_NAME = 'smrt-code-review';\n\nconst JSON_SCHEMA_2020_12 = 'https://json-schema.org/draft/2020-12/schema';\n\nfunction compareToolNames(left: string, right: string): number {\n return left < right ? -1 : left > right ? 1 : 0;\n}\n\n/**\n * Stable success/error envelope for development tools. `data` preserves each\n * tool's existing payload exactly; coverage/diagnostics are promoted only when\n * the underlying result actually reports them.\n */\nconst DEV_MCP_OUTPUT_SCHEMA: NonNullable<Tool['outputSchema']> = {\n $schema: JSON_SCHEMA_2020_12,\n type: 'object',\n additionalProperties: false,\n required: ['ok', 'coverage', 'diagnostics', 'data'],\n properties: {\n ok: { type: 'boolean' },\n coverage: { type: ['object', 'null'], additionalProperties: true },\n diagnostics: {\n type: 'array',\n items: { type: 'object', additionalProperties: true },\n },\n data: {},\n },\n};\n\nconst KNOWLEDGE_DETAIL_DESCRIPTION =\n 'summary: authored package docs are listed by path to stay inside tool-result budgets. full: embed package docs and matching modules with structural object facts. complete: embed all modules and return full package records.';\n\nconst DATABASE_URL_PROPERTY = {\n type: 'string',\n description:\n 'Optional dev database URL override (read-only diagnostics); prefer SMRT_DEV_DB_URL or cli.database config',\n};\n\nconst DATABASE_TYPE_PROPERTY = {\n type: 'string',\n enum: ['sqlite', 'postgres', 'duckdb'],\n description:\n 'Optional engine hint for dbUrl or the environment connection (sqlite, postgres, duckdb); inferred from the URL scheme when omitted',\n};\n\nconst PROJECT_PATH_PROPERTY = {\n type: 'string',\n description:\n 'Project root to boot manifests from (default: the server working directory; pinned by the HTTP host; a different loaded project requires restart)',\n} as const;\n\nconst LIMIT_PROPERTY = {\n type: 'number',\n description: 'Row budget for result lists (default 50, capped at 500)',\n};\n\n// Tool definitions\nconst TOOL_DEFINITIONS: Array<\n Pick<Tool, 'name' | 'description' | 'inputSchema'>\n> = [\n // Code Generation Tools\n {\n name: 'generate-smrt-class',\n description: 'Generate a complete SMRT class with @smrt() decorator',\n inputSchema: {\n type: 'object',\n properties: {\n className: {\n type: 'string',\n description: 'Name of the class (PascalCase)',\n },\n properties: {\n type: 'array',\n description: 'Array of property definitions',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n type: {\n type: 'string',\n enum: [\n 'text',\n 'integer',\n 'decimal',\n 'boolean',\n 'datetime',\n 'json',\n ],\n },\n required: { type: 'boolean' },\n nullable: { type: 'boolean' },\n description: { type: 'string' },\n defaultValue: {\n oneOf: [\n { type: 'string' },\n { type: 'number' },\n { type: 'boolean' },\n { type: 'object' },\n { type: 'null' },\n ],\n },\n },\n required: ['name', 'type'],\n },\n },\n baseClass: {\n type: 'string',\n enum: ['SmrtObject', 'SmrtCollection'],\n default: 'SmrtObject',\n },\n template: {\n type: 'string',\n enum: [\n 'basic',\n 'global-catalog',\n 'optional-catalog',\n 'tenant-project-object',\n 'tenant-event-log-object',\n 'cross-package-reference',\n ],\n default: 'basic',\n },\n tableName: { type: 'string' },\n conflictColumns: {\n type: 'array',\n items: { type: 'string' },\n },\n tenantScoped: {\n oneOf: [\n { type: 'boolean' },\n {\n type: 'object',\n properties: {\n mode: { type: 'string', enum: ['required', 'optional'] },\n field: { type: 'string' },\n autoFilter: { type: 'boolean' },\n autoPopulate: { type: 'boolean' },\n allowSuperAdminBypass: { type: 'boolean' },\n },\n },\n ],\n },\n includeTenantIdField: { type: 'boolean' },\n relationships: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n type: {\n type: 'string',\n enum: [\n 'foreignKey',\n 'crossPackageRef',\n 'oneToMany',\n 'manyToMany',\n ],\n },\n related: { type: 'string' },\n required: { type: 'boolean' },\n nullable: { type: 'boolean' },\n description: { type: 'string' },\n validate: { type: 'boolean' },\n foreignKey: { type: 'string' },\n through: { type: 'string' },\n sourceKey: { type: 'string' },\n targetKey: { type: 'string' },\n },\n required: ['name', 'type', 'related'],\n },\n },\n includeCompanionSnippets: { type: 'boolean', default: false },\n includeApiConfig: { type: 'boolean', default: true },\n includeMcpConfig: { type: 'boolean', default: true },\n includeCliConfig: { type: 'boolean', default: true },\n },\n required: ['className', 'properties'],\n },\n },\n {\n name: 'harden-smrt-class',\n description:\n 'Suggest a hardening for a smrt class the app uses: a same-named subclass that overrides fields (for example required: true). Returns the source; writes it into the app code only with write: true. Never touches a database: the build and `smrt db:migrate` apply the rule.',\n inputSchema: {\n type: 'object',\n properties: {\n className: {\n type: 'string',\n description: 'The smrt class the app uses (PascalCase)',\n },\n importFrom: {\n type: 'string',\n description:\n 'Package that exports the class, for example @happyvertical/smrt-crm',\n },\n overrides: {\n type: 'array',\n description: 'Fields to override',\n items: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n type: {\n type: 'string',\n enum: [\n 'text',\n 'integer',\n 'decimal',\n 'boolean',\n 'datetime',\n 'json',\n ],\n description:\n 'Read from the installed package manifest when omitted',\n },\n required: {\n type: 'boolean',\n description: 'Default true. false loosens the field.',\n },\n maxLength: { type: 'number' },\n description: { type: 'string' },\n },\n required: ['name'],\n },\n },\n directory: {\n type: 'string',\n description: 'Project directory (default: cwd)',\n },\n outputPath: {\n type: 'string',\n description:\n 'File to write, relative to directory (default src/models/<ClassName>.ts)',\n },\n write: {\n type: 'boolean',\n default: false,\n description:\n 'Write the file. Default false: return the suggestion only. Never overwrites a file.',\n },\n },\n required: ['className', 'importFrom', 'overrides'],\n },\n },\n // Project Introspection Tools\n {\n name: 'introspect-project',\n description:\n 'Scan a directory for SMRT objects. Returns a compact summary by default; pass detail: \"full\" for field, schema, and method details.',\n inputSchema: {\n type: 'object',\n properties: {\n directory: {\n type: 'string',\n description: 'Project directory (default: cwd)',\n },\n manifestPath: {\n type: 'string',\n description:\n 'Optional manifest path. Defaults to .smrt/manifest.json, dist/manifest.json, then source scanning.',\n },\n detail: {\n type: 'string',\n enum: ['summary', 'full'],\n default: 'summary',\n description:\n 'summary: one compact record per object. full: complete field/schema/method detail (large).',\n },\n maxChars: {\n type: 'number',\n description:\n 'Character budget for the `objects` payload. Objects past the budget are omitted and reported under `truncated`. Project metadata and diagnostics are always returned in full, so the serialized response is somewhat larger than this budget.',\n },\n cursor: {\n type: 'string',\n description:\n \"Resume after this className (objects are sorted alphabetically). Pass a previous response's `nextCursor` to read the next page instead of raising maxChars.\",\n },\n limit: {\n type: 'number',\n description:\n 'Maximum objects per page, applied before the character budget',\n },\n includeFields: {\n type: 'boolean',\n description: 'Include field details (detail: \"full\" only)',\n },\n includeRelationships: {\n type: 'boolean',\n description: 'Analyze relationships (detail: \"full\" only)',\n },\n includeMethods: {\n type: 'boolean',\n description: 'Include public method details (detail: \"full\" only)',\n },\n },\n },\n },\n {\n name: 'review-smrt-project',\n description:\n 'Advisory ecosystem alignment review for downstream SMRT projects, including intent-driven hand-rolled-equivalent detection',\n inputSchema: {\n type: 'object',\n properties: {\n directory: {\n type: 'string',\n description: 'Project directory (default: cwd)',\n },\n rootDir: {\n type: 'string',\n description: 'Compatibility alias for directory',\n },\n includeSourceEvidence: {\n type: 'boolean',\n description: 'Include file and line evidence in findings',\n default: true,\n },\n maxFindings: {\n type: 'number',\n description: 'Optional maximum number of findings to return',\n },\n intentIndexPath: {\n type: 'string',\n description:\n 'Caller-trusted intent index driving duplicate detection (regex tokens become RegExp). Default: the full index packaged in this release, never read from the reviewed directory',\n },\n detectDuplicates: {\n type: 'boolean',\n description:\n 'Run the intent-driven hand-rolled-equivalent pass (default: true)',\n default: true,\n },\n },\n },\n },\n {\n name: 'reflect-knowledge',\n description:\n 'Report deterministic SMRT + HappyVertical SDK knowledge coverage and freshness',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: {\n type: 'string',\n description: 'Project root directory (default: cwd)',\n },\n },\n },\n },\n {\n name: 'reflect-domain-knowledge',\n description:\n 'Report domain-scoped SMRT knowledge artifacts, SDK packages, and freshness',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n scope: {\n type: 'string',\n enum: ['project', 'local', 'package', 'sdk', 'installed'],\n default: 'project',\n },\n package: { type: 'string' },\n },\n },\n },\n {\n name: 'check-knowledge-freshness',\n description: 'Run deterministic freshness checks for SMRT agent knowledge',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n changed: {\n type: 'boolean',\n description: 'Limit stale-pattern checks to changed files',\n },\n strict: {\n type: 'boolean',\n description: 'Treat stale-pattern findings as errors',\n },\n },\n },\n },\n {\n name: 'build-context',\n description:\n 'Build model-ready SMRT context. task: \"review\" routes changedFiles/focus to package experts and returns file-anchored findings, package hints, and a prompt bundle; task: \"architecture\" ranks packages by the idea text and returns the bundle plus recommendations. Replaces build-review-context, build-domain-review-context, build-architecture-context, and build-domain-architecture-context.',\n inputSchema: {\n type: 'object',\n properties: {\n task: {\n type: 'string',\n enum: ['review', 'architecture'],\n description:\n 'review: changed files and focus. architecture: an idea or documentation.',\n },\n rootDir: { type: 'string' },\n changedFiles: {\n type: 'array',\n items: { type: 'string' },\n description: 'Files to route to package experts (task: review)',\n },\n focus: { type: 'string', description: 'Concern to prioritise' },\n documentation: {\n type: 'string',\n description: 'Existing docs, notes, or requirements',\n },\n idea: {\n type: 'string',\n description: 'Product or implementation idea (task: architecture)',\n },\n scope: {\n type: 'string',\n enum: ['project', 'local', 'package', 'sdk', 'installed'],\n default: 'project',\n },\n package: {\n type: 'string',\n description: 'Package name or short name to focus',\n },\n mode: {\n type: 'string',\n enum: ['findings', 'prompt-bundle', 'both'],\n default: 'both',\n description: 'task: review only',\n },\n detail: {\n type: 'string',\n enum: ['summary', 'full', 'complete'],\n default: 'summary',\n description: KNOWLEDGE_DETAIL_DESCRIPTION,\n },\n },\n required: ['task'],\n },\n },\n {\n name: 'smrt-review',\n description:\n 'Deprecated compatibility name for build-context with task: \"review\"; removed in the next minor release. For a formal downstream review, first call get-agent-skill with { \"name\": \"smrt-code-review\" }.',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n changedFiles: { type: 'array', items: { type: 'string' } },\n focus: { type: 'string' },\n documentation: { type: 'string' },\n mode: {\n type: 'string',\n enum: ['findings', 'prompt-bundle', 'both'],\n default: 'both',\n },\n detail: {\n type: 'string',\n enum: ['summary', 'full', 'complete'],\n default: 'summary',\n description: KNOWLEDGE_DETAIL_DESCRIPTION,\n },\n },\n },\n },\n {\n name: 'build-package-specialist-context',\n description:\n 'Build deterministic package specialist context for the SMRT workbench',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n package: {\n type: 'string',\n description:\n 'Package name or short package query, e.g. @happyvertical/smrt-content or content',\n },\n focus: { type: 'string' },\n },\n required: ['package'],\n },\n },\n {\n name: 'smrt-architecture',\n description:\n 'Deprecated compatibility name for build-context with task: \"architecture\"; removed in the next minor release.',\n inputSchema: {\n type: 'object',\n properties: {\n rootDir: { type: 'string' },\n idea: { type: 'string' },\n documentation: { type: 'string' },\n focus: { type: 'string' },\n detail: {\n type: 'string',\n enum: ['summary', 'full', 'complete'],\n default: 'summary',\n description: KNOWLEDGE_DETAIL_DESCRIPTION,\n },\n },\n },\n },\n {\n name: 'list-agent-skills',\n description:\n 'List bundled harness-agnostic agent skills shipped with smrt-dev-mcp',\n inputSchema: {\n type: 'object',\n properties: {},\n },\n },\n {\n name: 'get-agent-skill',\n description:\n 'Return a bundled harness-agnostic agent skill as Markdown plus optional references',\n inputSchema: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n enum: [REVIEW_SKILL_NAME],\n description: 'Bundled agent skill name',\n },\n includeReferences: {\n type: 'boolean',\n default: true,\n description: 'Include referenced files with the skill bundle',\n },\n },\n required: ['name'],\n },\n },\n {\n name: 'migration-status',\n description:\n 'Live migration status from the _smrt_schema_migrations system table (runtime provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'job-health',\n description:\n 'Live job queue health from the _smrt_jobs/_smrt_workers system tables (runtime provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'schedule-health',\n description:\n 'Live agent schedule health from the _smrt_agent_schedules system table (runtime provenance; read-only; sensitive agentConfig never read)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'dispatch-health',\n description:\n 'Live dispatch health from the _smrt_dispatch/_smrt_dispatch_subscriptions system tables (runtime provenance; read-only; payloads never read)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'recent-changes',\n description:\n 'Tail of the _smrt_changes change feed (runtime provenance; read-only; filter by table/tenant)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n since: {\n type: 'number',\n description: 'Cursor to read after (default 0)',\n },\n tables: {\n type: 'array',\n items: { type: 'string' },\n description: 'Restrict to these physical table names',\n },\n tenantId: {\n type: 'string',\n description: 'Tenant narrowing filter',\n },\n limit: LIMIT_PROPERTY,\n },\n },\n },\n {\n name: 'registry-drift',\n description:\n 'Registry drift report; _smrt_registry is retired and reported as such, never queried (read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: {\n type: 'string',\n description:\n 'Project root with the installed SMRT runtime (default: server working directory)',\n },\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n },\n },\n },\n {\n name: 'runtime-registry',\n description:\n 'Sanitized snapshot of the booted ObjectRegistry from the project and installed manifests (booted provenance; read-only; no project code executed)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: PROJECT_PATH_PROPERTY,\n objects: {\n type: 'array',\n items: { type: 'string' },\n description:\n 'Restrict field/method detail to these simple or qualified object names',\n },\n detail: {\n type: 'boolean',\n description:\n 'Include field and method detail for every object (default: only when objects is given)',\n },\n cursor: {\n type: 'string',\n description:\n \"Resume after this qualified object name; pass a previous response's `page.nextCursor`\",\n },\n limit: {\n type: 'number',\n description: 'Objects per page (default 50, capped at 500)',\n },\n },\n },\n },\n {\n name: 'runtime-object',\n description:\n 'One booted object: sanitized fields, methods, tenancy, inheritance, and the DDL the registry would generate (booted provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: PROJECT_PATH_PROPERTY,\n name: {\n type: 'string',\n description: 'Simple or qualified object name',\n },\n engine: {\n type: 'string',\n enum: ['sqlite', 'postgres', 'duckdb'],\n description: 'Engine for the DDL preview (default: registry default)',\n },\n },\n required: ['name'],\n },\n },\n {\n name: 'runtime-schema-diff',\n description:\n 'Booted registry schemas versus the live dev database using the db:diff comparer; introspection only, drops/relaxations never proposed (runtime provenance; read-only)',\n inputSchema: {\n type: 'object',\n properties: {\n projectPath: PROJECT_PATH_PROPERTY,\n dbUrl: DATABASE_URL_PROPERTY,\n dbType: DATABASE_TYPE_PROPERTY,\n },\n },\n },\n];\n\nexport const TOOLS: Tool[] = TOOL_DEFINITIONS.map((tool) => ({\n ...tool,\n inputSchema: {\n ...tool.inputSchema,\n $schema: JSON_SCHEMA_2020_12,\n },\n outputSchema: DEV_MCP_OUTPUT_SCHEMA,\n})).sort((left, right) => compareToolNames(left.name, right.name));\n"],"mappings":";AAEA,IAAa,oBAAoB;AAEjC,IAAM,sBAAsB;AAE5B,SAAS,iBAAiB,MAAc,OAAuB;CAC7D,OAAO,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAChD;;;;;;AAOA,IAAM,wBAA2D;CAC/D,SAAS;CACT,MAAM;CACN,sBAAsB;CACtB,UAAU;EAAC;EAAM;EAAY;EAAe;CAAM;CAClD,YAAY;EACV,IAAI,EAAE,MAAM,UAAU;EACtB,UAAU;GAAE,MAAM,CAAC,UAAU,MAAM;GAAG,sBAAsB;EAAK;EACjE,aAAa;GACX,MAAM;GACN,OAAO;IAAE,MAAM;IAAU,sBA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QACR,MAAM;QACN,aAAa;OACf;OACA,WAAW,EAAE,MAAM,SAAS;OAC5B,aAAa,EAAE,MAAM,SAAS;MAChC;MACA,UAAU,CAAC,MAAM;KACnB;IACF;IACA,WAAW;KACT,MAAM;KACN,aAAa;IACf;IACA,YAAY;KACV,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,SAAS;KACT,aACE;IACJ;GACF;GACA,UAAU;IAAC;IAAa;IAAc;GAAW;EACnD;CACF;CAEA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,WAAW;KACT,MAAM;KACN,aAAa;IACf;IACA,cAAc;KACZ,MAAM;KACN,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,MAAM,CAAC,WAAW,MAAM;KACxB,SAAS;KACT,aACE;IACJ;IACA,UAAU;KACR,MAAM;KACN,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aACE;IACJ;IACA,eAAe;KACb,MAAM;KACN,aAAa;IACf;IACA,sBAAsB;KACpB,MAAM;KACN,aAAa;IACf;IACA,gBAAgB;KACd,MAAM;KACN,aAAa;IACf;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,WAAW;KACT,MAAM;KACN,aAAa;IACf;IACA,SAAS;KACP,MAAM;KACN,aAAa;IACf;IACA,uBAAuB;KACrB,MAAM;KACN,aAAa;KACb,SAAS;IACX;IACA,aAAa;KACX,MAAM;KACN,aAAa;IACf;IACA,iBAAiB;KACf,MAAM;KACN,aACE;IACJ;IACA,kBAAkB;KAChB,MAAM;KACN,aACE;KACF,SAAS;IACX;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY,EACV,SAAS;IACP,MAAM;IACN,aAAa;GACf,EACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;G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AAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;IACR,OAAO;KACL,MAAM;KACN,aAAa;IACf;IACA,QAAQ;KACN,MAAM;KACN,OAAO,EAAE,MAAM,SAAS;KACxB,aAAa;IACf;IACA,UAAU;KACR,MAAM;KACN,aAAa;IACf;IACA,OAAO;GACT;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;KACX,MAAM;KACN,aACE;IACJ;IACA,OAAO;IACP,QAAQ;GACV;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;IACb,SAAS;KACP,MAAM;KACN,OAAO,EAAE,MAAM,SAAS;KACxB,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,QAAQ;KACN,MAAM;KACN,aACE;IACJ;IACA,OAAO;KACL,MAAM;KACN,aAAa;IACf;GACF;EACF;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;IACb,MAAM;KACJ,MAAM;KACN,aAAa;IACf;IACA,QAAQ;KACN,MAAM;KACN,MAAM;MAAC;MAAU;MAAY;KAAQ;KACrC,aAAa;IACf;GACF;GACA,UAAU,CAAC,MAAM;EACnB;CACF;CACA;EACE,MAAM;EACN,aACE;EACF,aAAa;GACX,MAAM;GACN,YAAY;IACV,aAAa;IACb,OAAO;IACP,QAAQ;GACV;EACF;CACF;AAG2B,CAAA,CAAiB,KAAK,UAAU;CAC3D,GAAG;CACH,aAAa;EACX,GAAG,KAAK;EACR,SAAS;CACX;CACA,cAAc;AAChB,EAAE,CAAC,CAAC,MAAM,MAAM,UAAU,iBAAiB,KAAK,MAAM,MAAM,IAAI,CAAC"}
|