@happyvertical/smrt-dev-mcp 0.62.3 → 0.62.5

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.
@@ -20,10 +20,11 @@ sources:
20
20
 
21
21
  # Developer-intent index
22
22
 
23
- Read this before writing queues, schedulers, mailers, uploaders, tenant filters, money fields, flags, audit tables, secrets handling, approvals, webhooks, search, auth, token stores or prompts. Each page names the smrt package and entry point, one verified reason not to hand-roll it, and the generated component page. The last column lists import, call and regex signals that suggest a hand-rolled equivalent.
23
+ Read this before writing MCP endpoints, MCP OAuth, queues, schedulers, mailers, uploaders, tenant filters, money fields, flags, audit tables, secrets handling, approvals, webhooks, search, auth, token stores or prompts. Each page names the smrt package and entry point, one verified reason not to hand-roll it, and the generated component page. The last column lists import, call and regex signals that suggest a hand-rolled equivalent.
24
24
 
25
25
  | Intent | Page | Home package(s) | Entry point | Hand-rolled signals |
26
26
  | --- | --- | --- | --- | --- |
27
+ | Workbook import and proof | [workbook-import](/intents/workbook-import.md) | [smrt-spreadsheets](/components/smrt-spreadsheets.md), [smrt-app-shell](/components/smrt-app-shell.md), [smrt-workflows](/components/smrt-workflows.md) | `@happyvertical/smrt-spreadsheets/import`: `IMPORT_PLAN_SCHEMA`, `validatePlan`, `checkPlan`, `runImport`, `ImportTarget`; shell `/import`; `createWorkflowRunJobs` | `regex:INSERT.*spreadsheet`; `regex:workbook.*rows` |
27
28
  | Background work and retries | [background-work](/intents/background-work.md) | [smrt-jobs](/components/smrt-jobs.md), [smrt-core](/components/smrt-core.md) | `withBackgroundJobs` (`bg()`/`background()`), `SmrtJob`, `TaskRunner` | `import:bullmq`; `import:bull`; `import:bee-queue`; `import:pg-boss`; `import:kue`; `regex:FOR UPDATE SKIP LOCKED` |
28
29
  | Scheduled and recurring runs | [scheduled-runs](/intents/scheduled-runs.md) | [smrt-jobs](/components/smrt-jobs.md), [smrt-agents](/components/smrt-agents.md) | `AgentSchedule` + `createScheduleRunner()`/`ScheduleRunner` | `import:node-cron`; `import:cron`; `import:node-schedule`; `import:agenda`; `import:croner`; `call:setInterval`; `regex:cron\.schedule\(` |
29
30
  | Outbound email, SMS, chat messages | [outbound-messages](/intents/outbound-messages.md) | [smrt-messages](/components/smrt-messages.md), [smrt-tenancy](/components/smrt-tenancy.md) | `PersonaMessagingService.send()`, `EmailSender`/`SlackSender`/`TelegramSender`/`ZulipSender`, `UserNotificationService` | `import:nodemailer`; `import:@sendgrid/mail`; `import:twilio`; `import:@slack/web-api`; `import:resend`; `import:postmark`; `import:mailgun.js` |
@@ -37,6 +38,10 @@ Read this before writing queues, schedulers, mailers, uploaders, tenant filters,
37
38
  | Inbound and outbound webhooks | [webhooks-and-events](/intents/webhooks-and-events.md) | [smrt-webhooks](/components/smrt-webhooks.md), [smrt-core](/components/smrt-core.md), [smrt-jobs](/components/smrt-jobs.md), [smrt-events](/components/smrt-events.md) | `WebhookDispatcher`, `WebhookAdminService`, `registerWebhookRuntime()`; core `createDispatchBus()` | `import:svix`; `regex:createHmac\(`; `regex:x-[a-z-]*signature` |
38
39
  | Search, facts, extracted knowledge | [search-facts-knowledge](/intents/search-facts-knowledge.md) | [smrt-facts](/components/smrt-facts.md), [smrt-content](/components/smrt-content.md), [smrt-ingestion](/components/smrt-ingestion.md), [smrt-core](/components/smrt-core.md) | `FactCollection.reconcile()`, `collection.semanticSearch()`, smrt-ingestion models and `/server` services | `import:@pinecone-database/pinecone`; `import:pgvector`; `import:minisearch`; `import:flexsearch`; `import:lunr`; `regex:cosine_?[sS]imilarity` |
39
40
  | Auth, users, sessions | [auth-and-users](/intents/auth-and-users.md) | [smrt-users](/components/smrt-users.md), [smrt-tenancy](/components/smrt-tenancy.md) | `SessionService`, `PasswordCredentialService`, `PermissionResolver`, `LoginAttemptLimiter`, `/sveltekit` handlers | `import:bcrypt`; `import:bcryptjs`; `import:argon2`; `import:jsonwebtoken`; `import:passport`; `import:express-session`; `import:lucia` |
40
- | Prompts and AI operations | [prompts-and-ai-operations](/intents/prompts-and-ai-operations.md) | [smrt-prompts](/components/smrt-prompts.md), [smrt-core](/components/smrt-core.md), [smrt-agents](/components/smrt-agents.md) | `definePrompt()` + `resolvePrompt()` + tracked client (`createTrackedAiClient`), `PromptOverrideService`, `@smrt({ ai: { callable } })`, `SmrtObject.is()/do()/describe()` | `import:openai`; `import:@anthropic-ai/sdk`; `import:langchain`; `regex:You are an? [a-z ]+`; `regex:role:\s*['"]system['"]` |
41
+ | Prompts and AI operations | [prompts-and-ai-operations](/intents/prompts-and-ai-operations.md) | [smrt-prompts](/components/smrt-prompts.md), [smrt-core](/components/smrt-core.md), [smrt-agents](/components/smrt-agents.md) | `definePrompt()` + `resolvePrompt()` + tracked client (`createTrackedAiClient`), chat `runWorkflowStepTurn` for tool-free child turns, `PromptOverrideService`, `@smrt({ ai: { callable } })`, `SmrtObject.is()/do()/describe()` | `import:openai`; `import:@anthropic-ai/sdk`; `import:langchain`; `regex:You are an? [a-z ]+`; `regex:role:\s*['"]system['"]` |
41
42
  | Polymorphic links, junctions, trees | [relationships-and-trees](/intents/relationships-and-trees.md) | [smrt-core](/components/smrt-core.md) | `SmrtJunction`/`SmrtJunctionBase`, `SmrtHierarchical`, `SmrtPolymorphicAssociation` | `regex:parent_?[iI]d\s*[:=]`; `regex:WITH RECURSIVE`; `regex:entity_?type` |
42
43
  | Local credentials, device tokens and owner sign-in | [local-credentials-and-owner-signin](/intents/local-credentials-and-owner-signin.md) | [smrt-app-runtime](/components/smrt-app-runtime.md), [smrt-users](/components/smrt-users.md) | `openLocalMcpTokenStore()` (`smrt app token`), `claimOwner()` with the loopback `/setup` URL, `SessionService` | `import:keytar`; `import:@napi-rs/keyring`; `regex:security add-generic-password`; `regex:homedir\(\).*(token\|credential)s?[\w.-]*\.json`; `regex:~/\.[\w./-]*(token\|credential)`; `regex:expiresIn\s*:\s*['"]\d+\s*[smhd]['"]` |
44
+ | Let agents or ChatGPT/Claude call my app over MCP | [mcp-agent-access](/intents/mcp-agent-access.md) | [smrt-app-mcp](/components/smrt-app-mcp.md), [smrt-app-runtime](/components/smrt-app-runtime.md), [smrt-mcp-apps](/components/smrt-mcp-apps.md), [smrt-mcp-openai](/components/smrt-mcp-openai.md) | `mountMcpAppRoute({ models })`/`createMcpAppServer({ allowedClassNames })`, `smrt-mcp-bridge`, MCP Apps bridge, signed webhook to wake agents (`signingProfile`), Agent-ready app checklist | `import:@modelcontextprotocol/sdk`; `regex:StreamableHTTPServerTransport`; `regex:tools/list`; `regex:/api/mcp` |
45
+ | OAuth for my MCP endpoint | [mcp-oauth](/intents/mcp-oauth.md) | [smrt-users](/components/smrt-users.md), [smrt-app-mcp](/components/smrt-app-mcp.md), [smrt-app-runtime](/components/smrt-app-runtime.md) | `createSmrtSvelteKitRuntime({ mcp: { authorizationServer } })` + `SmrtOAuthAuthorizationService` + `createOAuthHandlers` (app as issuer), `createCimdAuthorizationServer` (CIMD) / `dynamicClientRegistration` (DCR), `createMcpResourceAuth` (external issuer) | `import:oidc-provider`; `import:jsonwebtoken`; `import:jose`; `import:express-oauth2-jwt-bearer`; `regex:code_challenge`; `regex:authorization_code` |
46
+ | Restrict which tools an agent sees | [mcp-tool-visibility](/intents/mcp-tool-visibility.md) | [smrt-app-mcp](/components/smrt-app-mcp.md), [smrt-approvals](/components/smrt-approvals.md) | `models`/`allowedClassNames`, `toolScopes`, `toolPolicy`, `effects`, `confirmTools` (caller flag, not sign-off); `ApprovalService` for sign-off | `regex:tools\.filter\(`; `regex:tool_?allow`; `regex:confirm_required` |
47
+ | Audit agent tool calls | [mcp-audit](/intents/mcp-audit.md) | [smrt-app-mcp](/components/smrt-app-mcp.md), [smrt-core](/components/smrt-core.md) | `auditSink: createSmrtMcpAuditStore()` (`./audit-store`), `onToolCall`, `auditTenantId` | `regex:mcp_?(call\|tool)_?log`; `regex:tool_?call_?audit`; `regex:console\.log\(.*tool` |
@@ -0,0 +1,68 @@
1
+ ---
2
+ type: Capability
3
+ title: "Let agents or ChatGPT/Claude call my app over MCP"
4
+ description: "Reach for smrt-app-mcp before writing an MCP server, a REST-to-tool adapter or a ChatGPT connector by hand."
5
+ tags:
6
+ - smrt
7
+ - intent
8
+ status: draft
9
+ generated:
10
+ by: claude/smrt-5083
11
+ at: 2026-11-17T00:00:00Z
12
+ stale_after: 2027-02-15T00:00:00Z
13
+ audience: internal
14
+ evidence_level: source-inspected
15
+ package_version: 0.60.8
16
+ sources:
17
+ - id: s1
18
+ resource: https://github.com/happyvertical/smrt/blob/8c511d88ec6aae4e53b3df5d9d0911e6e727cd92/packages/smrt-app-mcp/AGENTS.md
19
+ path: packages/smrt-app-mcp/AGENTS.md
20
+ source_revision: 8c511d88ec6aae4e53b3df5d9d0911e6e727cd92
21
+ title: "packages/smrt-app-mcp/AGENTS.md (purpose and patterns)"
22
+ - id: s2
23
+ resource: https://github.com/happyvertical/smrt/blob/8c511d88ec6aae4e53b3df5d9d0911e6e727cd92/packages/smrt-app-mcp/src/sveltekit.ts
24
+ path: packages/smrt-app-mcp/src/sveltekit.ts
25
+ source_revision: 8c511d88ec6aae4e53b3df5d9d0911e6e727cd92
26
+ title: "packages/smrt-app-mcp/src/sveltekit.ts (mountMcpAppRoute)"
27
+ - id: s3
28
+ resource: https://github.com/happyvertical/smrt/blob/398f57847405df54509d7ba3a5b8cf4c28d28edf/docs/content/architecture/remote-mcp-authorization.md
29
+ path: docs/content/architecture/remote-mcp-authorization.md
30
+ source_revision: 398f57847405df54509d7ba3a5b8cf4c28d28edf
31
+ title: "docs/content/architecture/remote-mcp-authorization.md (remote deployment contract)"
32
+ - id: s4
33
+ resource: https://github.com/happyvertical/smrt/blob/763da335df258784d568b57c5398709038a908ae/packages/webhooks/README.md
34
+ path: packages/webhooks/README.md
35
+ source_revision: 763da335df258784d568b57c5398709038a908ae
36
+ title: "packages/webhooks/README.md (Signing profiles)"
37
+ ---
38
+
39
+ # Let agents or ChatGPT/Claude call my app over MCP
40
+
41
+ # Entry point
42
+
43
+ Mount one stateless Streamable HTTP endpoint with `mountMcpAppRoute({ ... })` from `@happyvertical/smrt-app-mcp/sveltekit` (or `createMcpAppServer()` for another transport) passing the `models` to publish (`createMcpAppServer()` takes `allowedClassNames`). Tools are generated from your `@smrt()` objects. A local stdio bridge, `smrt-mcp-bridge`, pipes a deployed app to desktop MCP clients. Claude and ChatGPT connect to the same `/api/mcp` URL; embedded UI uses `@happyvertical/smrt-mcp-apps` (portable bridge), and ChatGPT-only navigation and settings extras live in the optional `@happyvertical/smrt-mcp-openai`. For the credentials those clients present, including the app as its own OAuth issuer, see [mcp-oauth](/intents/mcp-oauth.md). To wake an agent that is not connected, deliver a signed outbound webhook with the `paperclip` or `standard-webhooks` signing profile (`@happyvertical/smrt-webhooks`; see [webhooks-and-events](/intents/webhooks-and-events.md)), and have the agent call back over MCP with its own grant; the ordered "Agent-ready app checklist" in the remote authorization contract lists every step.[^s3][^s4][^s2]
44
+
45
+ # Why not hand-roll it
46
+
47
+ The route creates a fresh protocol server per request, emits no session id and returns 404 for tools outside the allow-list so private generated tools are not enumerated; list and get tools are treated as read-only and mutating tools need an authenticated principal.[^s1] Authorization, tenant isolation and the allow-list are applied on every call, and the deployment contract covers local, self-hosted and cloud profiles.[^s3] A hand-written tool adapter has none of that policy and drifts from the model schema.
48
+
49
+ # Component pages
50
+
51
+ - [smrt-app-mcp](/components/smrt-app-mcp.md)
52
+ - [smrt-app-runtime](/components/smrt-app-runtime.md)
53
+ - [smrt-mcp-apps](/components/smrt-mcp-apps.md)
54
+ - [smrt-mcp-openai](/components/smrt-mcp-openai.md)
55
+ - [smrt-core](/components/smrt-core.md)
56
+ - [smrt-webhooks](/components/smrt-webhooks.md)
57
+
58
+ # Detection signals
59
+
60
+ - `import:@modelcontextprotocol/sdk`
61
+ - `regex:StreamableHTTPServerTransport`
62
+ - `regex:tools/list`
63
+ - `regex:/api/mcp`
64
+
65
+ [^s1]: `packages/smrt-app-mcp/AGENTS.md` at `8c511d88ec`: packages/smrt-app-mcp/AGENTS.md (purpose and patterns).
66
+ [^s2]: `packages/smrt-app-mcp/src/sveltekit.ts` at `8c511d88ec`: packages/smrt-app-mcp/src/sveltekit.ts (mountMcpAppRoute).
67
+ [^s3]: `docs/content/architecture/remote-mcp-authorization.md` at `398f578474`: docs/content/architecture/remote-mcp-authorization.md (remote deployment contract).
68
+ [^s4]: `packages/webhooks/README.md` at `763da335df`: packages/webhooks/README.md (Signing profiles).
@@ -0,0 +1,57 @@
1
+ ---
2
+ type: Capability
3
+ title: "Audit agent tool calls"
4
+ description: "Reach for the smrt-app-mcp auditSink and the McpCallAudit store before writing a request log for agent tool calls."
5
+ tags:
6
+ - smrt
7
+ - intent
8
+ status: draft
9
+ generated:
10
+ by: claude/smrt-5083
11
+ at: 2026-11-17T00:00:00Z
12
+ stale_after: 2027-02-15T00:00:00Z
13
+ audience: internal
14
+ evidence_level: source-inspected
15
+ package_version: 0.60.8
16
+ sources:
17
+ - id: s1
18
+ resource: https://github.com/happyvertical/smrt/blob/8c511d88ec6aae4e53b3df5d9d0911e6e727cd92/packages/smrt-app-mcp/AGENTS.md
19
+ path: packages/smrt-app-mcp/AGENTS.md
20
+ source_revision: 8c511d88ec6aae4e53b3df5d9d0911e6e727cd92
21
+ title: "packages/smrt-app-mcp/AGENTS.md (audit sink)"
22
+ - id: s2
23
+ resource: https://github.com/happyvertical/smrt/blob/de01f5cc3b0701ef075b3cbf86099a64deaa3cda/packages/smrt-app-mcp/src/audit-store.ts
24
+ path: packages/smrt-app-mcp/src/audit-store.ts
25
+ source_revision: de01f5cc3b0701ef075b3cbf86099a64deaa3cda
26
+ title: "packages/smrt-app-mcp/src/audit-store.ts (McpCallAudit, createSmrtMcpAuditStore)"
27
+ - id: s3
28
+ resource: https://github.com/happyvertical/smrt/blob/398f57847405df54509d7ba3a5b8cf4c28d28edf/packages/smrt-app-mcp/README.md
29
+ path: packages/smrt-app-mcp/README.md
30
+ source_revision: 398f57847405df54509d7ba3a5b8cf4c28d28edf
31
+ title: "packages/smrt-app-mcp/README.md (persistent audit)"
32
+ ---
33
+
34
+ # Audit agent tool calls
35
+
36
+ # Entry point
37
+
38
+ Pass `auditSink: createSmrtMcpAuditStore({ smrtOptions })` (from `@happyvertical/smrt-app-mcp/audit-store`) to the server, set `auditTenantId`, and read rows back with the store's `list({ tenantId, principalId?, tool? })`. `onToolCall` fires for every call for custom sinks. For change history of the data itself, see [audit-trail](/intents/audit-trail.md).[^s2]
39
+
40
+ # Why not hand-roll it
41
+
42
+ Records carry principal, tool, tenant, outcome (`allowed`, `denied`, `error`), error code, verified identity issuer, subject and client when the adapter stamped them, and argument key names only, never values, so the log does not become a second copy of sensitive data.[^s1][^s3] The `McpCallAudit` model is tenant-scoped and lives behind its own subpath so the main entry stays model-free.[^s2] A hand-written logger tends to record argument values and misses denied calls.
43
+
44
+ # Component pages
45
+
46
+ - [smrt-app-mcp](/components/smrt-app-mcp.md)
47
+ - [smrt-core](/components/smrt-core.md)
48
+
49
+ # Detection signals
50
+
51
+ - `regex:mcp_?(call|tool)_?log`
52
+ - `regex:tool_?call_?audit`
53
+ - `regex:console\.log\(.*tool`
54
+
55
+ [^s1]: `packages/smrt-app-mcp/AGENTS.md` at `8c511d88ec`: packages/smrt-app-mcp/AGENTS.md (audit sink).
56
+ [^s2]: `packages/smrt-app-mcp/src/audit-store.ts` at `de01f5cc3b`: packages/smrt-app-mcp/src/audit-store.ts (McpCallAudit, createSmrtMcpAuditStore).
57
+ [^s3]: `packages/smrt-app-mcp/README.md` at `398f578474`: packages/smrt-app-mcp/README.md (persistent audit).
@@ -0,0 +1,67 @@
1
+ ---
2
+ type: Capability
3
+ title: "OAuth for my MCP endpoint"
4
+ description: "Reach for the smrt-users OAuth authorization server wired through the runtime mcp.authorizationServer option, or an external issuer behind smrt-app-mcp auth, before writing token minting or a custom credential path."
5
+ tags:
6
+ - smrt
7
+ - intent
8
+ status: draft
9
+ generated:
10
+ by: claude/smrt-5083
11
+ at: 2026-11-17T00:00:00Z
12
+ stale_after: 2027-02-15T00:00:00Z
13
+ audience: internal
14
+ evidence_level: source-inspected
15
+ package_version: 0.60.8
16
+ sources:
17
+ - id: s1
18
+ resource: https://github.com/happyvertical/smrt/blob/e86fb5be45e40b032c89a398bb6d20dd2a1ce428/packages/users/agents/oauth-authorization.md
19
+ path: packages/users/agents/oauth-authorization.md
20
+ source_revision: e86fb5be45e40b032c89a398bb6d20dd2a1ce428
21
+ title: "packages/users/agents/oauth-authorization.md (hosted OAuth authorization)"
22
+ - id: s2
23
+ resource: https://github.com/happyvertical/smrt/blob/398f57847405df54509d7ba3a5b8cf4c28d28edf/packages/smrt-app-mcp/README.md
24
+ path: packages/smrt-app-mcp/README.md
25
+ source_revision: 398f57847405df54509d7ba3a5b8cf4c28d28edf
26
+ title: "packages/smrt-app-mcp/README.md (Remote JWT authorization)"
27
+ - id: s3
28
+ resource: https://github.com/happyvertical/smrt/blob/398f57847405df54509d7ba3a5b8cf4c28d28edf/docs/content/architecture/remote-mcp-authorization.md
29
+ path: docs/content/architecture/remote-mcp-authorization.md
30
+ source_revision: 398f57847405df54509d7ba3a5b8cf4c28d28edf
31
+ title: "docs/content/architecture/remote-mcp-authorization.md (issuer paths and profiles)"
32
+ - id: s4
33
+ resource: https://github.com/happyvertical/smrt/blob/8c511d88ec6aae4e53b3df5d9d0911e6e727cd92/packages/app-runtime/agents/self-issuer-mcp.md
34
+ path: packages/app-runtime/agents/self-issuer-mcp.md
35
+ source_revision: 8c511d88ec6aae4e53b3df5d9d0911e6e727cd92
36
+ title: "packages/app-runtime/agents/self-issuer-mcp.md (app as its own MCP issuer)"
37
+ ---
38
+
39
+ # OAuth for my MCP endpoint
40
+
41
+ # Entry point
42
+
43
+ Two supported paths. (1) The app is its own issuer. Build the server with `createCimdAuthorizationServer` (`@happyvertical/smrt-users`, a plain SDK server unless you pass `clientIdMetadataDocuments`) over `SmrtOAuthAuthorizationStorage` and `SmrtOAuthAuthorizationService.create({ db, scopePermissions })`, mount `createOAuthHandlers({ server, authorization, getSessionId }).protocol` and the consent and grants handlers from `@happyvertical/smrt-users/sveltekit`, then pass `mcp: { authorizationServer: { server, authorization, resource, scopes } }` to `createSmrtSvelteKitRuntime`. The runtime verifies the app's own tokens in process, re-checks the grant, user and tenant on every call (revoke, then the next call is refused), maps `sub` and the live grant's tenant to the principal by default, and advertises its own issuer; the host owns login and consent and login may be an external OIDC provider.[^s1][^s4] Client registration is a choice, all opt-in: pre-register, Client ID Metadata Documents (`clientIdMetadataDocuments: { allowClientOrigin }`, required policy) for ChatGPT and Claude, or `dynamicClientRegistration: true` as a fallback.[^s1] (2) An external issuer: validate its JWTs with `createMcpResourceAuth` from `@happyvertical/smrt-app-mcp/auth`, or `createHostedMcpResourceAuth` with the app runtime, and map claims to a principal.[^s2][^s3] A local-profile install uses `smrt app token` instead; see [local-credentials-and-owner-signin](/intents/local-credentials-and-owner-signin.md). The ordered checklist is in the remote authorization contract.[^s3]
44
+
45
+ # Why not hand-roll it
46
+
47
+ The users service re-checks the live session, user, tenant membership and consent on code exchange and refresh, snapshots consent as an upper bound, and revokes a whole refresh family on replay; `validateAccessTokenClaims` must follow `verifyAccessToken` because JWT signature checks alone miss revocation, and the runtime option does that on every request so you cannot forget it.[^s1][^s4] The CIMD fetch is SSRF-guarded, deadline-bound and size-capped.[^s1] The resource-server side rechecks membership per request and states the JWT revocation limits.[^s2][^s3] A custom bearer-token path skips PKCE, resource binding, rotation and revocation.
48
+
49
+ # Component pages
50
+
51
+ - [smrt-users](/components/smrt-users.md)
52
+ - [smrt-app-mcp](/components/smrt-app-mcp.md)
53
+ - [smrt-app-runtime](/components/smrt-app-runtime.md)
54
+
55
+ # Detection signals
56
+
57
+ - `import:oidc-provider`
58
+ - `import:jsonwebtoken`
59
+ - `import:jose`
60
+ - `import:express-oauth2-jwt-bearer`
61
+ - `regex:code_challenge`
62
+ - `regex:authorization_code`
63
+
64
+ [^s1]: `packages/users/agents/oauth-authorization.md` at `e86fb5be45`: packages/users/agents/oauth-authorization.md (hosted OAuth authorization).
65
+ [^s2]: `packages/smrt-app-mcp/README.md` at `398f578474`: packages/smrt-app-mcp/README.md (Remote JWT authorization).
66
+ [^s3]: `docs/content/architecture/remote-mcp-authorization.md` at `398f578474`: docs/content/architecture/remote-mcp-authorization.md (issuer paths and profiles).
67
+ [^s4]: `packages/app-runtime/agents/self-issuer-mcp.md` at `8c511d88ec`: packages/app-runtime/agents/self-issuer-mcp.md (app as its own MCP issuer).
@@ -0,0 +1,52 @@
1
+ ---
2
+ type: Capability
3
+ title: "Restrict which tools an agent sees"
4
+ description: "Reach for smrt-app-mcp allow-lists, toolScopes, toolPolicy and the confirm gate before filtering tools by hand."
5
+ tags:
6
+ - smrt
7
+ - intent
8
+ status: draft
9
+ generated:
10
+ by: claude/smrt-5083
11
+ at: 2026-11-17T00:00:00Z
12
+ stale_after: 2027-02-15T00:00:00Z
13
+ audience: internal
14
+ evidence_level: source-inspected
15
+ package_version: 0.60.8
16
+ sources:
17
+ - id: s1
18
+ resource: https://github.com/happyvertical/smrt/blob/8c511d88ec6aae4e53b3df5d9d0911e6e727cd92/packages/smrt-app-mcp/AGENTS.md
19
+ path: packages/smrt-app-mcp/AGENTS.md
20
+ source_revision: 8c511d88ec6aae4e53b3df5d9d0911e6e727cd92
21
+ title: "packages/smrt-app-mcp/AGENTS.md (scopes, confirm, allow-list)"
22
+ - id: s2
23
+ resource: https://github.com/happyvertical/smrt/blob/398f57847405df54509d7ba3a5b8cf4c28d28edf/packages/smrt-app-mcp/README.md
24
+ path: packages/smrt-app-mcp/README.md
25
+ source_revision: 398f57847405df54509d7ba3a5b8cf4c28d28edf
26
+ title: "packages/smrt-app-mcp/README.md (Tool scopes, confirm gate and persistent audit)"
27
+ ---
28
+
29
+ # Restrict which tools an agent sees
30
+
31
+ # Entry point
32
+
33
+ Pass `models` (`mountMcpAppRoute`) or `allowedClassNames` (`createMcpAppServer`) to publish only chosen models, `toolScopes` (glob pattern to required scopes) so a principal sees only tools whose scopes it holds, `toolPolicy` for principal-aware rules, and `confirmTools` to refuse a gated tool unless `arguments.confirm === true` (a caller-supplied flag that stops an agent acting without asking its user, not a human sign-off), and `effects: ['read']` to keep the catalog read-only. For actions that need a person to sign off, use `@happyvertical/smrt-approvals`; see [human-approvals](/intents/human-approvals.md).[^s2]
34
+
35
+ # Why not hand-roll it
36
+
37
+ The scope check lives inside the shared tool policy, so `tools/list`, tool calls and resources agree: a tool whose scopes the principal lacks is hidden from discovery and denied on call, an anonymous caller never passes a scoped tool, and the confirm gate runs before assertions and handlers and answers as an `isError` result.[^s1] Hand-filtering the list while leaving the call path open is the common failure.
38
+
39
+ # Component pages
40
+
41
+ - [smrt-app-mcp](/components/smrt-app-mcp.md)
42
+ - [smrt-approvals](/components/smrt-approvals.md)
43
+ - [smrt-core](/components/smrt-core.md)
44
+
45
+ # Detection signals
46
+
47
+ - `regex:tools\.filter\(`
48
+ - `regex:tool_?allow`
49
+ - `regex:confirm_required`
50
+
51
+ [^s1]: `packages/smrt-app-mcp/AGENTS.md` at `8c511d88ec`: packages/smrt-app-mcp/AGENTS.md (scopes, confirm, allow-list).
52
+ [^s2]: `packages/smrt-app-mcp/README.md` at `398f578474`: packages/smrt-app-mcp/README.md (Tool scopes, confirm gate and persistent audit).
@@ -0,0 +1,112 @@
1
+ ---
2
+ type: Capability
3
+ title: "Workbook import and proof"
4
+ description: "Reach for smrt-spreadsheets import planning and read-back proof, with app-shell drafts and smrt-workflows for durable owner review."
5
+ tags:
6
+ - smrt
7
+ - intent
8
+ status: draft
9
+ generated:
10
+ by: codex/smrt-5034
11
+ at: 2026-11-16T18:36:30Z
12
+ stale_after: 2027-02-14T00:00:00Z
13
+ audience: internal
14
+ evidence_level: source-inspected
15
+ package_version: 0.62.0
16
+ sources:
17
+ - id: s1
18
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/spreadsheets/src/import/index.ts
19
+ path: packages/spreadsheets/src/import/index.ts
20
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
21
+ title: "Public import exports and ImportPlan schema"
22
+ - id: s2
23
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/spreadsheets/src/import/run.ts
24
+ path: packages/spreadsheets/src/import/run.ts
25
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
26
+ title: "runImport admission, load planning and read-back proof"
27
+ - id: s3
28
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/spreadsheets/src/import/target.ts
29
+ path: packages/spreadsheets/src/import/target.ts
30
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
31
+ title: "ImportTarget atomic batches, provenance and exact totals"
32
+ - id: s4
33
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/spreadsheets/src/testing.ts
34
+ path: packages/spreadsheets/src/testing.ts
35
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
36
+ title: "createSqliteReferenceTarget contract fixture target"
37
+ - id: s5
38
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/app-shell/src/lib/server/import-workflow.ts
39
+ path: packages/app-shell/src/lib/server/import-workflow.ts
40
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
41
+ title: "Owner-scoped draft import, repeat safety and publish boundary"
42
+ - id: s6
43
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/app-shell/src/engine/import-target.ts
44
+ path: packages/app-shell/src/engine/import-target.ts
45
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
46
+ title: "createEngineImportTarget draft-host adapter"
47
+ - id: s7
48
+ resource: https://github.com/happyvertical/smrt/blob/e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1/packages/workflows/src/jobs.ts
49
+ path: packages/workflows/src/jobs.ts
50
+ source_revision: e6f72c7cc37e20d7e93c67fd6d627781b9d5b4a1
51
+ title: "createWorkflowRunJobs durable owner-scoped job bridge"
52
+ ---
53
+
54
+ # Workbook import and proof
55
+
56
+ # Entry point
57
+
58
+ Read an `.xlsx` workbook with the `@happyvertical/spreadsheets` SDK, then use
59
+ `@happyvertical/smrt-spreadsheets/import`: `IMPORT_PLAN_SCHEMA` describes the
60
+ model's proposed `ImportPlan`; `validatePlan()` validates its semantics;
61
+ `checkPlan(plan, workbook)` checks the mapping against the workbook. Load with
62
+ `runImport({ plan, workbook, target, limits })`; it includes `checkLoaded()`
63
+ read-back proof. The product supplies an `ImportTarget` with structure, atomic
64
+ batch loading, counts, sums and source-row-ordered stored values. Test an adapter
65
+ against `createSqliteReferenceTarget()` from
66
+ `@happyvertical/smrt-spreadsheets/testing`.[^s1][^s2][^s3][^s4]
67
+
68
+ In app-shell, use the existing owner-only `/import` flow and
69
+ `POST /api/shell/import`. Its `app-shell.import` workflow plans from bounded
70
+ workbook facts and loads through `createEngineImportTarget(draftHost)` from
71
+ `@happyvertical/smrt-app-shell/engine`. Successful proof leaves a draft for the
72
+ existing publish approval. For another host, register a definition with
73
+ `createWorkflowRunJobs()` from `@happyvertical/smrt-workflows` before starting a
74
+ claim-fenced jobs runner; keep large input behind `inputRef` and `readInput`.[^s5][^s6][^s7]
75
+
76
+ # Why not hand-roll it
77
+
78
+ `runImport()` validates and admits the workbook, checks the plan, plans all
79
+ batches and reserves verification work before its first target mutation. It
80
+ refuses table-key clashes, creates structure in dependency order, loads batches
81
+ and proves the stored result against workbook facts. Read-back checks include
82
+ row counts, column sums, references and calculated values against the workbook's
83
+ cached results. Copying rows into a database alone provides none of that
84
+ proof.[^s1][^s2]
85
+
86
+ `ImportTarget` requires all-or-nothing batches and source-row provenance; money
87
+ uses minor units and unsafe integer/money totals remain `bigint`. The SQLite
88
+ reference target gives adapters a reusable contract instead of a second import
89
+ implementation.[^s3][^s4] App-shell records the import-owned draft before loading,
90
+ discards only that draft on repeat or proof failure, and keeps live publication
91
+ behind the existing owner approval. The workflow job bridge retains the run's
92
+ owner, tenant, checkpoint and claim fence across recovery, so retrying a worker
93
+ does not justify loading its half-built tables again.[^s5][^s6][^s7]
94
+
95
+ # Component pages
96
+
97
+ - [smrt-spreadsheets](/components/smrt-spreadsheets.md)
98
+ - [smrt-app-shell](/components/smrt-app-shell.md)
99
+ - [smrt-workflows](/components/smrt-workflows.md)
100
+
101
+ # Detection signals
102
+
103
+ - `regex:INSERT.*spreadsheet`
104
+ - `regex:workbook.*rows`
105
+
106
+ [^s1]: `packages/spreadsheets/src/import/index.ts` at `e6f72c7cc3`: Public import exports and ImportPlan schema.
107
+ [^s2]: `packages/spreadsheets/src/import/run.ts` at `e6f72c7cc3`: runImport admission, load planning and read-back proof.
108
+ [^s3]: `packages/spreadsheets/src/import/target.ts` at `e6f72c7cc3`: ImportTarget atomic batches, provenance and exact totals.
109
+ [^s4]: `packages/spreadsheets/src/testing.ts` at `e6f72c7cc3`: createSqliteReferenceTarget contract fixture target.
110
+ [^s5]: `packages/app-shell/src/lib/server/import-workflow.ts` at `e6f72c7cc3`: Owner-scoped draft import, repeat safety and publish boundary.
111
+ [^s6]: `packages/app-shell/src/engine/import-target.ts` at `e6f72c7cc3`: createEngineImportTarget draft-host adapter.
112
+ [^s7]: `packages/workflows/src/jobs.ts` at `e6f72c7cc3`: createWorkflowRunJobs durable owner-scoped job bridge.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-dev-mcp",
3
- "version": "0.62.3",
3
+ "version": "0.62.5",
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.62.3",
61
+ "@happyvertical/smrt-scanner": "0.62.5",
62
62
  "@modelcontextprotocol/node": "2.1.2",
63
63
  "@modelcontextprotocol/server": "2.4.0",
64
- "@happyvertical/smrt-types": "0.62.3"
64
+ "@happyvertical/smrt-types": "0.62.5"
65
65
  },
66
66
  "devDependencies": {
67
- "@happyvertical/smrt-config": "0.62.3",
68
- "@happyvertical/smrt-core": "0.62.3",
67
+ "@happyvertical/smrt-config": "0.62.5",
68
+ "@happyvertical/smrt-core": "0.62.5",
69
69
  "@happyvertical/sql": "^0.113.0",
70
70
  "@modelcontextprotocol/client": "2.4.0",
71
71
  "@modelcontextprotocol/conformance": "0.2.0-alpha.11",