Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bc7dc80
feat: Implement elicitation support for interactive user input during…
frontegg-david Jan 16, 2026
575cd22
feat: Add elicitation support documentation and type tests for intera…
frontegg-david Jan 17, 2026
f05f818
feat: Implement elicitation support with Redis and in-memory stores f…
frontegg-david Jan 18, 2026
1f13881
feat: Implement elicitation support with Redis and in-memory stores f…
frontegg-david Jan 18, 2026
6b10357
feat: Enhance elicitation support with improved error handling and ty…
frontegg-david Jan 18, 2026
49ace1f
feat: Implement fallback elicitation support for non-supporting clien…
frontegg-david Jan 18, 2026
e51d917
feat: Add universal LLM support for elicitation with automatic fallba…
frontegg-david Jan 18, 2026
a1e6cc2
feat: Add universal LLM support for elicitation with automatic fallba…
frontegg-david Jan 18, 2026
7286287
feat: Enhance session handling with client name and version retrieval
frontegg-david Jan 18, 2026
8231246
feat: Improve error handling and validation in elicitation tools and …
frontegg-david Jan 18, 2026
f663c8e
feat: Refactor elicitation store creation to support async initializa…
frontegg-david Jan 18, 2026
a0e9da0
feat: Update Redis configuration and add TODO for migration to storag…
frontegg-david Jan 18, 2026
22b1c4e
feat: Add ElicitationStoreNotInitializedError for better error handli…
frontegg-david Jan 19, 2026
d56054a
feat: Add support for client elicitation capabilities in session and …
frontegg-david Jan 19, 2026
4b011a7
feat: Refactor imports and improve dynamic loading in elicitation sto…
frontegg-david Jan 19, 2026
262b153
feat: Introduce elicitation flows and hooks for improved request hand…
frontegg-david Jan 20, 2026
49a5f1b
feat: Add script to remove unused imports from changed files
frontegg-david Jan 20, 2026
6eed007
feat: Enhance elicitation functionality with validation and encryptio…
frontegg-david Jan 20, 2026
4a4e49b
fix: Handle unsubscribe errors gracefully in call-tool flow
frontegg-david Jan 20, 2026
2ff3150
feat: Improve encryption handling and migration support in elicitatio…
frontegg-david Jan 21, 2026
7f0ed09
feat: Enhance encrypted elicitation handling with deferred promises a…
frontegg-david Jan 21, 2026
d01d328
feat: Add zod-from-json-schema as a peer dependency and update branch…
frontegg-david Jan 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,21 @@ Never:
- `git commit --amend`
- Any command that modifies git history

## Task Completion Checklist

**Before completing a task**, run the following cleanup:

```bash
# Remove unused imports from changed files
node scripts/fix-unused-imports.mjs
```

This script automatically:

- Finds all files changed in the current branch (compared to main)
- Removes unused imports using ESLint
- Supports custom base branch: `node scripts/fix-unused-imports.mjs <branch-name>`

## Plugin Development

### Creating Plugins with Context Extensions
Expand Down Expand Up @@ -350,6 +365,54 @@ Benefits:
- Consistent API across the codebase
- Centralized error handling and logging

### Storage Factory Pattern

**IMPORTANT**: When creating stores (session stores, elicitation stores, etc.), always use the factory pattern. Never construct stores directly with raw Redis clients.

```typescript
// ✅ Good - Use factory function
import { createSessionStore } from '@frontmcp/sdk/auth/session';
import { createElicitationStore } from '@frontmcp/sdk/elicitation';

const sessionStore = await createSessionStore({
provider: 'redis',
host: 'localhost',
port: 6379,
keyPrefix: 'mcp:session:',
});

const { store, type } = createElicitationStore({
redis: { provider: 'redis', host: 'localhost', port: 6379 },
keyPrefix: 'mcp:elicit:',
logger,
});

// ❌ Bad - Direct construction with raw Redis client
const Redis = require('ioredis');
const client = new Redis({ host: 'localhost' });
const store = new RedisElicitationStore(client, logger); // DON'T DO THIS
```

**Factory Pattern Benefits:**

- Automatic provider detection (Redis, Vercel KV, etc.)
- Consistent key prefix handling
- Lazy-loading of dependencies (avoids bundling ioredis when not used)
- Built-in error handling and logging
- Support for fallback to memory store in development
- Edge runtime detection and appropriate error messages

**Creating New Store Factories:**

1. Create a factory file (e.g., `my-store.factory.ts`)
2. Use `RedisOptions` type for configuration
3. Use type guards (`isRedisProvider()`, `isVercelKvProvider()`) for provider detection
4. Lazy-require implementations: `const { MyStore } = require('./my.store')`
5. Return store type information: `{ store, type: 'redis' | 'memory' }`
6. Handle Edge runtime restrictions (throw if memory not supported)

See `libs/sdk/src/elicitation/elicitation-store.factory.ts` for a complete example.

### RememberPlugin Usage

When `RememberPlugin` is installed, tools can use `this.remember` and `this.approval`:
Expand Down
1 change: 1 addition & 0 deletions apps/demo/src/apps/expenses/providers/redis.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default class RedisProvider {
maxRetriesPerRequest: 3,
});

// TODO: migrate to the storage utils
this.client.on('connect', () => console.log('[Redis] Connected'));
this.client.on('error', (err) => console.error('[Redis] Error:', err));
}
Expand Down
9 changes: 6 additions & 3 deletions apps/demo/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { FrontMcp, LogLevel } from '@frontmcp/sdk';
import { DashboardApp } from '@frontmcp/plugins';

// Other demo apps available but not active:
import WeatherMcpApp from './apps/weather';
Expand All @@ -10,13 +9,17 @@ import CrmMcpApp from './apps/crm';

@FrontMcp({
info: { name: 'Demo 🚀', version: '0.1.0' },
apps: [DashboardApp, WeatherMcpApp, CrmMcpApp, ExpenseMcpApp, CalculatorMcpApp, EmployeeTimeMcpApp],
apps: [WeatherMcpApp, CrmMcpApp, ExpenseMcpApp, CalculatorMcpApp, EmployeeTimeMcpApp],
logging: { level: LogLevel.Verbose },
http: {
port: 3003,
},
transport: {
protocol: 'full',
protocol: 'legacy',
},
redis: {
port: 6379,
host: 'localhost',
},
auth: {
mode: 'transparent',
Expand Down
Loading
Loading