Skip to content

Commit ea41a7f

Browse files
authored
Merge pull request #10 from Beyond-Better/staging
persistent transport sessions; static plugin loading
2 parents 3cc4554 + d0d5e3f commit ea41a7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2056
-696
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ PLUGINS_DISCOVERY_PATHS=./src/plugins
9797
PLUGINS_AUTOLOAD=true
9898

9999
# Storage
100-
DENO_KV_PATH=./data/app.db
100+
STORAGE_DENO_KV_PATH=./data/app.db
101101

102102
# Logging
103103
LOG_LEVEL=info # debug|info|warn|error

deno.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
"strict": true,
8787
"exactOptionalPropertyTypes": true,
8888
"noImplicitReturns": true,
89+
"noUnusedLocals": true,
8990
"noFallthroughCasesInSwitch": true,
9091
"noUncheckedIndexedAccess": true,
9192
"allowUnreachableCode": false,

docs/storage-migration-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const eventStore = new TransportEventStore(kv, ['events'], logger);
8181
**After:**
8282
```typescript
8383
const eventStore = new TransportEventStoreChunked(
84-
kv,
84+
kvManager,
8585
['events'],
8686
logger,
8787
{

examples/.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ PLUGINS_AUTOLOAD=true
150150

151151
# Deno KV Database Path
152152
# Path to the key-value database file
153-
DENO_KV_PATH=./data/api-mcp-server.db
153+
STORAGE_DENO_KV_PATH=./data/api-mcp-server.db
154154

155155
# =============================================================================
156156
# DEVELOPMENT CONFIGURATION
@@ -286,7 +286,7 @@ TRANSPORT_CLEANUP_INTERVAL_MS=86400000
286286
# 4. PRODUCTION:
287287
# - Set LOG_LEVEL=info or warn
288288
# - Set DEV_MODE=false
289-
# - Configure appropriate DENO_KV_PATH
289+
# - Configure appropriate STORAGE_DENO_KV_PATH
290290
# - Review security settings
291291

292292
# 5. CUSTOMIZATION:

examples/1-simple/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ PLUGINS_DISCOVERY_PATHS=./src/plugins
322322
PLUGINS_AUTOLOAD=true
323323

324324
# Storage
325-
DENO_KV_PATH=./data/simple-mcp-server.db
325+
STORAGE_DENO_KV_PATH=./data/simple-mcp-server.db
326326
```
327327

328328
### Development vs Production

examples/1-simple/tests/utils/test-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export class MockConfigManager {
333333
'MCP_TRANSPORT': 'stdio',
334334
'PLUGINS_DISCOVERY_PATHS': './src/plugins',
335335
'PLUGINS_AUTOLOAD': 'true',
336-
'DENO_KV_PATH': ':memory:', // In-memory database for tests
336+
'STORAGE_DENO_KV_PATH': ':memory:', // In-memory database for tests
337337
'DEV_MODE': 'true',
338338
};
339339

examples/2-plugin-workflows/tests/utils/test-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export class MockConfigManager {
350350
'MCP_TRANSPORT': 'stdio',
351351
'PLUGINS_DISCOVERY_PATHS': './src/plugins',
352352
'PLUGINS_AUTOLOAD': 'true',
353-
'DENO_KV_PATH': ':memory:', // In-memory database for tests
353+
'STORAGE_DENO_KV_PATH': ':memory:', // In-memory database for tests
354354
'DEV_MODE': 'true',
355355
};
356356

examples/3-plugin-api-auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ HTTP_PORT=3000
233233
HTTP_HOST=localhost
234234

235235
# Storage Configuration
236-
DENO_KV_PATH=./examples/3-plugin-api-auth/data/oauth-tokens.db
236+
STORAGE_DENO_KV_PATH=./examples/3-plugin-api-auth/data/oauth-tokens.db
237237

238238
# API Client Configuration
239239
THIRDPARTY_API_TIMEOUT=30000

examples/3-plugin-api-auth/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ Error: Failed to store OAuth tokens
407407
**Solution:**
408408

409409
- Check Deno KV database path is writable
410-
- Verify `DENO_KV_PATH` environment variable
410+
- Verify `STORAGE_DENO_KV_PATH` environment variable
411411
- Ensure sufficient disk space
412412
- Check file permissions
413413

examples/4-manual-deps/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const auditLogger = new AuditLogger({
7979
}, logger);
8080

8181
const kvManager = new KVManager({
82-
kvPath: configManager.get('DENO_KV_PATH', './data/manual-deps.db'),
82+
kvPath: configManager.get('STORAGE_DENO_KV_PATH', './data/manual-deps.db'),
8383
}, logger);
8484

8585
const oauthProvider = new OAuthProvider({
@@ -259,7 +259,7 @@ AUDIT_LOG_ALL_API_CALLS=true
259259
AUDIT_RETENTION_DAYS=90
260260

261261
# Storage Configuration (manual setup)
262-
DENO_KV_PATH=./examples/4-manual-deps/data/manual-mcp-server.db
262+
STORAGE_DENO_KV_PATH=./examples/4-manual-deps/data/manual-mcp-server.db
263263
```
264264

265265
#### OAuth Provider Configuration (Manual Setup)
@@ -370,7 +370,7 @@ logger.info('Manually registered workflows:', {
370370
```typescript
371371
// Manual creation of all infrastructure components
372372
const kvManager = new KVManager({
373-
kvPath: configManager.get('DENO_KV_PATH', './data/manual-deps.db'),
373+
kvPath: configManager.get('STORAGE_DENO_KV_PATH', './data/manual-deps.db'),
374374
}, logger);
375375

376376
// Initialize KV connection manually
@@ -388,7 +388,7 @@ const sessionStore = new SessionStore(
388388

389389
// Manual event store setup
390390
const eventStore = new TransportEventStore(
391-
kvManager.getKV(),
391+
kvManager),
392392
['events'],
393393
logger,
394394
);

0 commit comments

Comments
 (0)