ft-scout 9.4.9 → 9.5.2
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/README.md +12 -18
- package/bin/src/commands/agent.d.ts +41 -0
- package/bin/src/commands/audit.d.ts +2 -0
- package/bin/src/commands/authCommand.d.ts +2 -0
- package/bin/src/commands/benchmark.d.ts +2 -0
- package/bin/src/commands/brief.d.ts +4 -0
- package/bin/src/commands/checkpoint.d.ts +7 -0
- package/bin/src/commands/configCommand.d.ts +7 -0
- package/bin/src/commands/dashboard.d.ts +5 -0
- package/bin/src/commands/history.d.ts +2 -0
- package/bin/src/commands/init.d.ts +8 -0
- package/bin/src/commands/login.d.ts +10 -0
- package/bin/src/commands/logout.d.ts +6 -0
- package/bin/src/commands/mcp.d.ts +49 -0
- package/bin/src/commands/owners.d.ts +2 -0
- package/bin/src/commands/plan.d.ts +2 -0
- package/bin/src/commands/pr.d.ts +11 -0
- package/bin/src/commands/quota.d.ts +2 -0
- package/bin/src/commands/recommend.d.ts +5 -0
- package/bin/src/commands/risky.d.ts +10 -0
- package/bin/src/commands/setup.d.ts +2 -0
- package/bin/src/commands/signup.d.ts +8 -0
- package/bin/src/commands/switchCommand.d.ts +3 -0
- package/bin/src/commands/undo.d.ts +2 -0
- package/bin/src/commands/watch.d.ts +12 -0
- package/bin/src/commands/web.d.ts +8 -0
- package/bin/src/discovery/config.d.ts +10 -0
- package/bin/src/discovery/display.d.ts +3 -0
- package/bin/src/discovery/messages.d.ts +4 -0
- package/bin/src/discovery/signals.d.ts +16 -0
- package/bin/src/engine/actionVerifier.d.ts +69 -0
- package/bin/src/engine/agentEngine.d.ts +110 -0
- package/bin/src/engine/agentEngine.js +12 -1
- package/bin/src/engine/agentState.d.ts +154 -0
- package/bin/src/engine/browser/browserController.d.ts +155 -0
- package/bin/src/engine/browser/index.d.ts +2 -0
- package/bin/src/engine/checkpoints/checkpointManager.d.ts +48 -0
- package/bin/src/engine/computer/computerController.d.ts +130 -0
- package/bin/src/engine/computer/computerController.js +34 -15
- package/bin/src/engine/computer/computerDiagnostic.d.ts +31 -0
- package/bin/src/engine/computer/index.d.ts +4 -0
- package/bin/src/engine/computer/mockComputer.d.ts +62 -0
- package/bin/src/engine/computer/operatorHud.d.ts +30 -0
- package/bin/src/engine/computer/scoutDriver.cs +85 -20
- package/bin/src/engine/git.d.ts +20 -0
- package/bin/src/engine/llm.d.ts +92 -0
- package/bin/src/engine/llm.js +298 -273
- package/bin/src/engine/planner.d.ts +21 -0
- package/bin/src/engine/planner.js +12 -4
- package/bin/src/engine/runtime/agentRuntime.d.ts +111 -0
- package/bin/src/engine/runtime/agentRuntime.js +12 -1
- package/bin/src/engine/runtime/index.d.ts +2 -0
- package/bin/src/engine/safety.d.ts +55 -0
- package/bin/src/engine/scanners.d.ts +2 -0
- package/bin/src/engine/subagents/subagentManager.d.ts +29 -0
- package/bin/src/engine/toolRegistry.d.ts +38 -0
- package/bin/src/engine/verifier.d.ts +47 -0
- package/bin/src/engine/voiceEngine.d.ts +26 -0
- package/bin/src/engine/web.d.ts +22 -0
- package/bin/src/engine/workspace/agentWorkspace.d.ts +112 -0
- package/bin/src/engine/workspace/index.d.ts +2 -0
- package/bin/src/index.d.ts +2 -0
- package/bin/src/index.js +4 -4
- package/bin/src/mcp/client.d.ts +62 -0
- package/bin/src/mcp/client.js +1 -1
- package/bin/src/mcp/cloudSync.d.ts +19 -0
- package/bin/src/mcp/discovery.d.ts +22 -0
- package/bin/src/mcp/health.d.ts +13 -0
- package/bin/src/mcp/index.d.ts +16 -0
- package/bin/src/mcp/manager.d.ts +113 -0
- package/bin/src/mcp/permissions.d.ts +18 -0
- package/bin/src/mcp/persistence.d.ts +44 -0
- package/bin/src/mcp/persistence.js +8 -1
- package/bin/src/mcp/recovery.d.ts +19 -0
- package/bin/src/mcp/telemetry.d.ts +15 -0
- package/bin/src/mcp/toolRouter.d.ts +23 -0
- package/bin/src/mcp/transport.d.ts +60 -0
- package/bin/src/mcp/types.d.ts +130 -0
- package/bin/src/server/server.d.ts +6 -0
- package/bin/src/utils/admin.d.ts +84 -0
- package/bin/src/utils/auditLogger.d.ts +18 -0
- package/bin/src/utils/auth.d.ts +132 -0
- package/bin/src/utils/auth.js +13 -0
- package/bin/src/utils/branding.d.ts +2 -0
- package/bin/src/utils/branding.js +1 -1
- package/bin/src/utils/claudeUI.d.ts +101 -0
- package/bin/src/utils/config.d.ts +46 -0
- package/bin/src/utils/email.d.ts +36 -0
- package/bin/src/utils/firebaseAuth.d.ts +19 -0
- package/bin/src/utils/holoseneAuth.d.ts +18 -0
- package/bin/src/utils/interruptHandler.d.ts +32 -0
- package/bin/src/utils/language.d.ts +13 -0
- package/bin/src/utils/logger.d.ts +2 -0
- package/bin/src/utils/markdown.d.ts +19 -0
- package/bin/src/utils/payment.d.ts +81 -0
- package/bin/src/utils/pricing.d.ts +26 -0
- package/bin/src/utils/qrBridge.d.ts +33 -0
- package/bin/src/utils/qrBridge.js +1 -1
- package/bin/src/utils/razorpay.d.ts +48 -0
- package/bin/src/utils/rules.d.ts +24 -0
- package/bin/src/utils/session.d.ts +32 -0
- package/bin/src/utils/updateCheck.d.ts +3 -0
- package/package.json +14 -4
- package/.firebase/hosting.d2Vi.cache +0 -16
- package/.firebaserc +0 -14
- package/.mcp-config.json +0 -19
- package/.mft-mcp-config.json +0 -29
- package/.scoutrules +0 -13
- package/bin/src/commands/agent.d.ts.map +0 -1
- package/bin/src/commands/agent.js.map +0 -1
- package/bin/src/commands/audit.d.ts.map +0 -1
- package/bin/src/commands/audit.js.map +0 -1
- package/bin/src/commands/authCommand.d.ts.map +0 -1
- package/bin/src/commands/authCommand.js.map +0 -1
- package/bin/src/commands/benchmark.d.ts.map +0 -1
- package/bin/src/commands/benchmark.js.map +0 -1
- package/bin/src/commands/brief.d.ts.map +0 -1
- package/bin/src/commands/brief.js.map +0 -1
- package/bin/src/commands/checkpoint.d.ts.map +0 -1
- package/bin/src/commands/checkpoint.js.map +0 -1
- package/bin/src/commands/configCommand.d.ts.map +0 -1
- package/bin/src/commands/configCommand.js.map +0 -1
- package/bin/src/commands/dashboard.d.ts.map +0 -1
- package/bin/src/commands/dashboard.js.map +0 -1
- package/bin/src/commands/history.d.ts.map +0 -1
- package/bin/src/commands/history.js.map +0 -1
- package/bin/src/commands/init.d.ts.map +0 -1
- package/bin/src/commands/init.js.map +0 -1
- package/bin/src/commands/login.d.ts.map +0 -1
- package/bin/src/commands/login.js.map +0 -1
- package/bin/src/commands/logout.d.ts.map +0 -1
- package/bin/src/commands/logout.js.map +0 -1
- package/bin/src/commands/mcp.d.ts.map +0 -1
- package/bin/src/commands/mcp.js.map +0 -1
- package/bin/src/commands/owners.d.ts.map +0 -1
- package/bin/src/commands/owners.js.map +0 -1
- package/bin/src/commands/plan.d.ts.map +0 -1
- package/bin/src/commands/plan.js.map +0 -1
- package/bin/src/commands/pr.d.ts.map +0 -1
- package/bin/src/commands/pr.js.map +0 -1
- package/bin/src/commands/quota.d.ts.map +0 -1
- package/bin/src/commands/quota.js.map +0 -1
- package/bin/src/commands/recommend.d.ts.map +0 -1
- package/bin/src/commands/recommend.js.map +0 -1
- package/bin/src/commands/risky.d.ts.map +0 -1
- package/bin/src/commands/risky.js.map +0 -1
- package/bin/src/commands/setup.d.ts.map +0 -1
- package/bin/src/commands/setup.js.map +0 -1
- package/bin/src/commands/signup.d.ts.map +0 -1
- package/bin/src/commands/signup.js.map +0 -1
- package/bin/src/commands/switchCommand.d.ts.map +0 -1
- package/bin/src/commands/switchCommand.js.map +0 -1
- package/bin/src/commands/undo.d.ts.map +0 -1
- package/bin/src/commands/undo.js.map +0 -1
- package/bin/src/commands/watch.d.ts.map +0 -1
- package/bin/src/commands/watch.js.map +0 -1
- package/bin/src/commands/web.d.ts.map +0 -1
- package/bin/src/commands/web.js.map +0 -1
- package/bin/src/discovery/config.d.ts.map +0 -1
- package/bin/src/discovery/config.js.map +0 -1
- package/bin/src/discovery/display.d.ts.map +0 -1
- package/bin/src/discovery/display.js.map +0 -1
- package/bin/src/discovery/messages.d.ts.map +0 -1
- package/bin/src/discovery/messages.js.map +0 -1
- package/bin/src/discovery/signals.d.ts.map +0 -1
- package/bin/src/discovery/signals.js.map +0 -1
- package/bin/src/engine/actionVerifier.d.ts.map +0 -1
- package/bin/src/engine/actionVerifier.js.map +0 -1
- package/bin/src/engine/agentEngine.d.ts.map +0 -1
- package/bin/src/engine/agentEngine.js.map +0 -1
- package/bin/src/engine/agentState.d.ts.map +0 -1
- package/bin/src/engine/agentState.js.map +0 -1
- package/bin/src/engine/browser/browserController.d.ts.map +0 -1
- package/bin/src/engine/browser/browserController.js.map +0 -1
- package/bin/src/engine/browser/index.d.ts.map +0 -1
- package/bin/src/engine/browser/index.js.map +0 -1
- package/bin/src/engine/checkpoints/checkpointManager.d.ts.map +0 -1
- package/bin/src/engine/checkpoints/checkpointManager.js.map +0 -1
- package/bin/src/engine/computer/computerController.d.ts.map +0 -1
- package/bin/src/engine/computer/computerController.js.map +0 -1
- package/bin/src/engine/computer/computerDiagnostic.d.ts.map +0 -1
- package/bin/src/engine/computer/computerDiagnostic.js.map +0 -1
- package/bin/src/engine/computer/index.d.ts.map +0 -1
- package/bin/src/engine/computer/index.js.map +0 -1
- package/bin/src/engine/computer/mockComputer.d.ts.map +0 -1
- package/bin/src/engine/computer/mockComputer.js.map +0 -1
- package/bin/src/engine/computer/operatorHud.d.ts.map +0 -1
- package/bin/src/engine/computer/operatorHud.js.map +0 -1
- package/bin/src/engine/computer/scout_driver.exe +0 -0
- package/bin/src/engine/git.d.ts.map +0 -1
- package/bin/src/engine/git.js.map +0 -1
- package/bin/src/engine/llm.d.ts.map +0 -1
- package/bin/src/engine/llm.js.map +0 -1
- package/bin/src/engine/planner.d.ts.map +0 -1
- package/bin/src/engine/planner.js.map +0 -1
- package/bin/src/engine/runtime/agentRuntime.d.ts.map +0 -1
- package/bin/src/engine/runtime/agentRuntime.js.map +0 -1
- package/bin/src/engine/runtime/index.d.ts.map +0 -1
- package/bin/src/engine/runtime/index.js.map +0 -1
- package/bin/src/engine/safety.d.ts.map +0 -1
- package/bin/src/engine/safety.js.map +0 -1
- package/bin/src/engine/scanners.d.ts.map +0 -1
- package/bin/src/engine/scanners.js.map +0 -1
- package/bin/src/engine/scoutAudioRecorder.cs +0 -215
- package/bin/src/engine/scout_audio_recorder.exe +0 -0
- package/bin/src/engine/subagents/subagentManager.d.ts.map +0 -1
- package/bin/src/engine/subagents/subagentManager.js.map +0 -1
- package/bin/src/engine/toolRegistry.d.ts.map +0 -1
- package/bin/src/engine/toolRegistry.js.map +0 -1
- package/bin/src/engine/verifier.d.ts.map +0 -1
- package/bin/src/engine/verifier.js.map +0 -1
- package/bin/src/engine/voiceEngine.d.ts.map +0 -1
- package/bin/src/engine/voiceEngine.js.map +0 -1
- package/bin/src/engine/web.d.ts.map +0 -1
- package/bin/src/engine/web.js.map +0 -1
- package/bin/src/engine/workspace/agentWorkspace.d.ts.map +0 -1
- package/bin/src/engine/workspace/agentWorkspace.js.map +0 -1
- package/bin/src/engine/workspace/index.d.ts.map +0 -1
- package/bin/src/engine/workspace/index.js.map +0 -1
- package/bin/src/index.d.ts.map +0 -1
- package/bin/src/index.js.map +0 -1
- package/bin/src/mcp/client.d.ts.map +0 -1
- package/bin/src/mcp/client.js.map +0 -1
- package/bin/src/mcp/cloudSync.d.ts.map +0 -1
- package/bin/src/mcp/cloudSync.js.map +0 -1
- package/bin/src/mcp/discovery.d.ts.map +0 -1
- package/bin/src/mcp/discovery.js.map +0 -1
- package/bin/src/mcp/health.d.ts.map +0 -1
- package/bin/src/mcp/health.js.map +0 -1
- package/bin/src/mcp/index.d.ts.map +0 -1
- package/bin/src/mcp/index.js.map +0 -1
- package/bin/src/mcp/manager.d.ts.map +0 -1
- package/bin/src/mcp/manager.js.map +0 -1
- package/bin/src/mcp/permissions.d.ts.map +0 -1
- package/bin/src/mcp/permissions.js.map +0 -1
- package/bin/src/mcp/persistence.d.ts.map +0 -1
- package/bin/src/mcp/persistence.js.map +0 -1
- package/bin/src/mcp/recovery.d.ts.map +0 -1
- package/bin/src/mcp/recovery.js.map +0 -1
- package/bin/src/mcp/telemetry.d.ts.map +0 -1
- package/bin/src/mcp/telemetry.js.map +0 -1
- package/bin/src/mcp/toolRouter.d.ts.map +0 -1
- package/bin/src/mcp/toolRouter.js.map +0 -1
- package/bin/src/mcp/transport.d.ts.map +0 -1
- package/bin/src/mcp/transport.js.map +0 -1
- package/bin/src/mcp/types.d.ts.map +0 -1
- package/bin/src/mcp/types.js.map +0 -1
- package/bin/src/server/server.d.ts.map +0 -1
- package/bin/src/server/server.js.map +0 -1
- package/bin/src/utils/admin.d.ts.map +0 -1
- package/bin/src/utils/admin.js.map +0 -1
- package/bin/src/utils/auditLogger.d.ts.map +0 -1
- package/bin/src/utils/auditLogger.js.map +0 -1
- package/bin/src/utils/auth.d.ts.map +0 -1
- package/bin/src/utils/auth.js.map +0 -1
- package/bin/src/utils/branding.d.ts.map +0 -1
- package/bin/src/utils/branding.js.map +0 -1
- package/bin/src/utils/claudeUI.d.ts.map +0 -1
- package/bin/src/utils/claudeUI.js.map +0 -1
- package/bin/src/utils/config.d.ts.map +0 -1
- package/bin/src/utils/config.js.map +0 -1
- package/bin/src/utils/email.d.ts.map +0 -1
- package/bin/src/utils/email.js.map +0 -1
- package/bin/src/utils/firebaseAuth.d.ts.map +0 -1
- package/bin/src/utils/firebaseAuth.js.map +0 -1
- package/bin/src/utils/holoseneAuth.d.ts.map +0 -1
- package/bin/src/utils/holoseneAuth.js.map +0 -1
- package/bin/src/utils/interruptHandler.d.ts.map +0 -1
- package/bin/src/utils/interruptHandler.js.map +0 -1
- package/bin/src/utils/language.d.ts.map +0 -1
- package/bin/src/utils/language.js.map +0 -1
- package/bin/src/utils/logger.d.ts.map +0 -1
- package/bin/src/utils/logger.js.map +0 -1
- package/bin/src/utils/markdown.d.ts.map +0 -1
- package/bin/src/utils/markdown.js.map +0 -1
- package/bin/src/utils/payment.d.ts.map +0 -1
- package/bin/src/utils/payment.js.map +0 -1
- package/bin/src/utils/pricing.d.ts.map +0 -1
- package/bin/src/utils/pricing.js.map +0 -1
- package/bin/src/utils/qrBridge.d.ts.map +0 -1
- package/bin/src/utils/qrBridge.js.map +0 -1
- package/bin/src/utils/razorpay.d.ts.map +0 -1
- package/bin/src/utils/razorpay.js.map +0 -1
- package/bin/src/utils/rules.d.ts.map +0 -1
- package/bin/src/utils/rules.js.map +0 -1
- package/bin/src/utils/session.d.ts.map +0 -1
- package/bin/src/utils/session.js.map +0 -1
- package/bin/src/utils/updateCheck.d.ts.map +0 -1
- package/bin/src/utils/updateCheck.js.map +0 -1
- package/downloads/invoice-2026-03.pdf +0 -1
- package/firebase.json +0 -74
- package/front-terrain-cli-1.0.0.tgz +0 -0
- package/web/ScoutFavicon.png +0 -0
- package/web/ScoutOGImage.png +0 -0
- package/web/app.js +0 -4510
- package/web/ft-logo.png +0 -0
- package/web/og-image.png +0 -0
- package/web/robots.txt +0 -24
- package/web/site.webmanifest +0 -16
- package/web/sitemap-tryscout.xml +0 -47
- package/web/sitemap.xml +0 -47
- package/web/styles.css +0 -3436
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Cloud Synchronization Engine
|
|
3
|
+
* Enables direct 2-way synchronization between CLI and https://scout.frontterrain.com/#connections
|
|
4
|
+
* using FrontTerrain Cloud Firestore (no localhost required).
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPServerConfig } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Fetch all registered MCP servers from Cloud Firestore
|
|
9
|
+
*/
|
|
10
|
+
export declare function fetchMcpServersFromCloud(filterEmail?: string): Promise<MCPServerConfig[]>;
|
|
11
|
+
/**
|
|
12
|
+
* Push an MCP server configuration to Cloud Firestore
|
|
13
|
+
*/
|
|
14
|
+
export declare function pushMcpServerToCloud(server: MCPServerConfig): Promise<boolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete an MCP server from Cloud Firestore
|
|
17
|
+
*/
|
|
18
|
+
export declare function deleteMcpServerFromCloud(serverId: string): Promise<boolean>;
|
|
19
|
+
//# sourceMappingURL=cloudSync.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Discovery & Tool Normalizer
|
|
3
|
+
* Discovers capabilities, normalizes tool schemas for OpenAI function calling compatibility,
|
|
4
|
+
* and classifies permission boundaries.
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPDiscoveredTool, MCPPermissionLevel } from './types.js';
|
|
7
|
+
export declare function normalizeToolSchema(rawSchema: unknown): {
|
|
8
|
+
type: 'object';
|
|
9
|
+
properties: Record<string, unknown>;
|
|
10
|
+
required: string[];
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export declare function classifyPermissionLevel(toolName: string, description?: string): MCPPermissionLevel;
|
|
14
|
+
export interface RawMcpToolInput {
|
|
15
|
+
name?: string | undefined;
|
|
16
|
+
description?: string | undefined;
|
|
17
|
+
inputSchema?: unknown;
|
|
18
|
+
annotations?: Record<string, unknown> | undefined;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
export declare function normalizeMCPTool(rawTool: RawMcpToolInput, serverId: string, serverName: string): MCPDiscoveredTool;
|
|
22
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Health Monitor
|
|
3
|
+
* Probes MCP server connections, tracks latency, and maintains observable health states.
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPServerConfig, MCPServerHealth } from './types.js';
|
|
6
|
+
import type { MCPClient } from './client.js';
|
|
7
|
+
export declare class MCPHealthMonitor {
|
|
8
|
+
/**
|
|
9
|
+
* Check health of an active MCP client and compute latency
|
|
10
|
+
*/
|
|
11
|
+
static checkHealth(server: MCPServerConfig, client?: MCPClient): Promise<MCPServerHealth>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=health.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Public API
|
|
3
|
+
*/
|
|
4
|
+
export * from './types.js';
|
|
5
|
+
export * from './persistence.js';
|
|
6
|
+
export * from './transport.js';
|
|
7
|
+
export * from './client.js';
|
|
8
|
+
export * from './discovery.js';
|
|
9
|
+
export * from './permissions.js';
|
|
10
|
+
export * from './toolRouter.js';
|
|
11
|
+
export * from './telemetry.js';
|
|
12
|
+
export * from './health.js';
|
|
13
|
+
export * from './recovery.js';
|
|
14
|
+
export * from './cloudSync.js';
|
|
15
|
+
export * from './manager.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Central Connection Manager
|
|
3
|
+
* Coordinates lifecycle, connection pools, tool execution, permissions, health, and persistence.
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPServerConfig, MCPDiscoveredTool, MCPToolResult, MCPServerPermissions, MCPServerHealth } from './types.js';
|
|
6
|
+
import { type RoutedToolSelection } from './toolRouter.js';
|
|
7
|
+
export declare class MCPManager {
|
|
8
|
+
private static instance;
|
|
9
|
+
private servers;
|
|
10
|
+
private clients;
|
|
11
|
+
private initialized;
|
|
12
|
+
private watcherDebounceTimer;
|
|
13
|
+
private fileWatcher;
|
|
14
|
+
private constructor();
|
|
15
|
+
static getInstance(): MCPManager;
|
|
16
|
+
private setupFileWatcher;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Synchronize in-memory server configurations with disk storage (~/.ft/mcp_servers.json).
|
|
20
|
+
* Automatically picks up servers added, modified, or removed via CLI or other processes.
|
|
21
|
+
*/
|
|
22
|
+
syncWithDisk(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Synchronize with FrontTerrain Cloud Firestore.
|
|
25
|
+
* Pulls servers registered on https://scout.frontterrain.com/#connections directly into local CLI state.
|
|
26
|
+
*/
|
|
27
|
+
syncWithCloud(filterEmail?: string): Promise<void>;
|
|
28
|
+
private loadState;
|
|
29
|
+
private persistState;
|
|
30
|
+
/**
|
|
31
|
+
* Find server by ID or case-insensitive Name
|
|
32
|
+
*/
|
|
33
|
+
getServer(idOrName: string): MCPServerConfig | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* List all registered MCP servers (with secrets sanitized), optionally filtered by user account
|
|
36
|
+
*/
|
|
37
|
+
listServers(filterUserEmail?: string, filterUserId?: string): MCPServerConfig[];
|
|
38
|
+
/**
|
|
39
|
+
* Register a new MCP server configuration and optionally store credentials
|
|
40
|
+
*/
|
|
41
|
+
addServer(config: Omit<Partial<MCPServerConfig>, 'permissions'> & {
|
|
42
|
+
name: string;
|
|
43
|
+
transport: 'http' | 'stdio';
|
|
44
|
+
permissions?: Partial<MCPServerPermissions> | undefined;
|
|
45
|
+
}, secret?: string): Promise<MCPServerConfig>;
|
|
46
|
+
/**
|
|
47
|
+
* Remove an MCP server and its stored secrets
|
|
48
|
+
*/
|
|
49
|
+
removeServer(idOrName: string): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Create an IMCPTransport instance for the given server config
|
|
52
|
+
*/
|
|
53
|
+
private createTransport;
|
|
54
|
+
/**
|
|
55
|
+
* Connect to an MCP server, perform initialize handshake, and discover tools
|
|
56
|
+
*/
|
|
57
|
+
connectServer(idOrName: string): Promise<MCPServerConfig>;
|
|
58
|
+
/**
|
|
59
|
+
* Disconnect an active MCP server
|
|
60
|
+
*/
|
|
61
|
+
disconnectServer(idOrName: string): Promise<MCPServerConfig>;
|
|
62
|
+
/**
|
|
63
|
+
* Reconnect to an MCP server
|
|
64
|
+
*/
|
|
65
|
+
reconnectServer(idOrName: string): Promise<MCPServerConfig>;
|
|
66
|
+
/**
|
|
67
|
+
* Check health and latency for a server, or all connected servers
|
|
68
|
+
*/
|
|
69
|
+
checkHealth(idOrName?: string): Promise<Record<string, MCPServerHealth>>;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve all discovered tools for a server
|
|
72
|
+
*/
|
|
73
|
+
getToolsForServer(idOrName: string): MCPDiscoveredTool[];
|
|
74
|
+
/**
|
|
75
|
+
* Retrieve all discovered tools across all servers
|
|
76
|
+
*/
|
|
77
|
+
getAllTools(options?: {
|
|
78
|
+
onlyEnabled?: boolean;
|
|
79
|
+
}): MCPDiscoveredTool[];
|
|
80
|
+
/**
|
|
81
|
+
* Enable or disable an individual tool on a server
|
|
82
|
+
*/
|
|
83
|
+
setToolEnabled(serverId: string, toolName: string, enabled: boolean): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Update permissions for an MCP server
|
|
86
|
+
*/
|
|
87
|
+
setServerPermissions(serverId: string, permissions: Partial<MCPServerPermissions>): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Toggle a tool enabled/disabled state for a given server
|
|
90
|
+
*/
|
|
91
|
+
toggleTool(serverId: string, toolName: string, enabled?: boolean): MCPServerConfig | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* Route user request to relevant MCP tools
|
|
94
|
+
*/
|
|
95
|
+
routeTools(userGoal: string): RoutedToolSelection;
|
|
96
|
+
/**
|
|
97
|
+
* Find tool by either its qualified name (mcp__<serverId>__<toolName>) or its original name.
|
|
98
|
+
*/
|
|
99
|
+
findTool(nameOrQualified: string): {
|
|
100
|
+
tool: MCPDiscoveredTool;
|
|
101
|
+
server: MCPServerConfig;
|
|
102
|
+
} | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Execute an MCP tool by name, handling permissions, connection, retry, and telemetry
|
|
105
|
+
*/
|
|
106
|
+
executeTool(nameOrQualified: string, args?: Record<string, unknown>): Promise<MCPToolResult>;
|
|
107
|
+
/**
|
|
108
|
+
* Get recent observable activity
|
|
109
|
+
*/
|
|
110
|
+
getActivityLog(limit?: number): import("./types.js").MCPActivityEvent[];
|
|
111
|
+
}
|
|
112
|
+
export declare function getMCPManager(): MCPManager;
|
|
113
|
+
//# sourceMappingURL=manager.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Permission Boundary Engine
|
|
3
|
+
* Enforces server-level and tool-level permission rules before execution or model exposure.
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPServerConfig, MCPDiscoveredTool, MCPPermissionLevel } from './types.js';
|
|
6
|
+
export interface MCPPermissionCheckResult {
|
|
7
|
+
allowed: boolean;
|
|
8
|
+
reason?: string;
|
|
9
|
+
requiresApproval: boolean;
|
|
10
|
+
permissionLevel: MCPPermissionLevel;
|
|
11
|
+
}
|
|
12
|
+
export declare class MCPPermissionManager {
|
|
13
|
+
/**
|
|
14
|
+
* Check if a tool can be made available to the agent or executed
|
|
15
|
+
*/
|
|
16
|
+
static checkToolAccess(server: MCPServerConfig, tool: MCPDiscoveredTool): MCPPermissionCheckResult;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Persistence & Encrypted Credential Store
|
|
3
|
+
* Manages MCP server definitions and securely encrypts secrets at rest using AES-256-GCM.
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPServerConfig } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Encrypt a plaintext string using AES-256-GCM
|
|
8
|
+
*/
|
|
9
|
+
export declare function encryptSecret(plainText: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Decrypt an AES-256-GCM encrypted payload string
|
|
12
|
+
*/
|
|
13
|
+
export declare function decryptSecret(encryptedPayload: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Save an encrypted secret for an MCP server
|
|
16
|
+
*/
|
|
17
|
+
export declare function saveServerSecret(serverId: string, secret: string): void;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve decrypted secret for an MCP server
|
|
20
|
+
*/
|
|
21
|
+
export declare function getServerSecret(serverId: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Delete a stored secret for an MCP server
|
|
24
|
+
*/
|
|
25
|
+
export declare function deleteServerSecret(serverId: string): void;
|
|
26
|
+
/**
|
|
27
|
+
* Check if a server has an encrypted secret stored
|
|
28
|
+
*/
|
|
29
|
+
export declare function hasServerSecret(serverId: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Load all configured MCP servers from disk.
|
|
32
|
+
* Returns null if the file exists but could not be parsed (e.g. transient file lock),
|
|
33
|
+
* preventing accidental memory state purge in sync routines.
|
|
34
|
+
*/
|
|
35
|
+
export declare function loadMCPServers(): MCPServerConfig[] | null;
|
|
36
|
+
/**
|
|
37
|
+
* Save MCP servers list to disk atomically to prevent race conditions during reads.
|
|
38
|
+
*/
|
|
39
|
+
export declare function saveMCPServers(servers: MCPServerConfig[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* Return a copy of MCPServerConfig safe for client/UI/CLI display (no secrets)
|
|
42
|
+
*/
|
|
43
|
+
export declare function sanitizeServerConfig(server: MCPServerConfig): MCPServerConfig;
|
|
44
|
+
//# sourceMappingURL=persistence.d.ts.map
|
|
@@ -18,7 +18,14 @@ function getCredentialsFile() {
|
|
|
18
18
|
// Derive machine-specific key for local AES-256-GCM encryption
|
|
19
19
|
function getEncryptionKey() {
|
|
20
20
|
const machineSalt = 'scout_mcp_secure_v1_encryption_salt';
|
|
21
|
-
|
|
21
|
+
let username = 'default_user';
|
|
22
|
+
try {
|
|
23
|
+
username = os.userInfo()?.username || process.env.USER || process.env.USERNAME || 'default_user';
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
username = process.env.USER || process.env.USERNAME || 'default_user';
|
|
27
|
+
}
|
|
28
|
+
const machineId = `${os.hostname()}_${username}_${os.platform()}`;
|
|
22
29
|
return crypto.pbkdf2Sync(machineId, machineSalt, 100000, 32, 'sha256');
|
|
23
30
|
}
|
|
24
31
|
function ensureDir(dirPath) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Failure Recovery & Error Classification
|
|
3
|
+
* Implements bounded recovery, error classification, and user-friendly error formatting.
|
|
4
|
+
*/
|
|
5
|
+
export type MCPErrorCategory = 'CONNECTION_LOST' | 'TIMEOUT' | 'AUTHENTICATION_EXPIRED' | 'TOOL_NOT_FOUND' | 'RATE_LIMITED' | 'VALIDATION_ERROR' | 'INTERNAL_ERROR';
|
|
6
|
+
export interface ClassifiedMCPError {
|
|
7
|
+
category: MCPErrorCategory;
|
|
8
|
+
isRecoverable: boolean;
|
|
9
|
+
canRetry: boolean;
|
|
10
|
+
userFriendlyMessage: string;
|
|
11
|
+
originalError: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class MCPRecovery {
|
|
14
|
+
/**
|
|
15
|
+
* Classify an error encountered during MCP communication or tool execution
|
|
16
|
+
*/
|
|
17
|
+
static classifyError(err: unknown, serverName: string, isDestructive?: boolean): ClassifiedMCPError;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=recovery.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Telemetry & Activity Logger
|
|
3
|
+
* Records observable tool executions and logs without capturing secrets or internal reasoning.
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPActivityEvent, MCPToolResult } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Sanitize an object to remove sensitive keys (auth, token, key, secret, password)
|
|
8
|
+
*/
|
|
9
|
+
export declare function sanitizeData(data: unknown): unknown;
|
|
10
|
+
export declare class MCPTelemetry {
|
|
11
|
+
static loadActivity(limit?: number): MCPActivityEvent[];
|
|
12
|
+
static recordEvent(event: MCPActivityEvent): void;
|
|
13
|
+
static recordResult(result: MCPToolResult): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Intelligent Capability & Tool Router
|
|
3
|
+
* Selects only relevant MCP capabilities and tools for a given user goal,
|
|
4
|
+
* preventing context-window bloating and reasoning degradation.
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPDiscoveredTool, MCPServerConfig } from './types.js';
|
|
7
|
+
export interface RoutedToolSelection {
|
|
8
|
+
tools: MCPDiscoveredTool[];
|
|
9
|
+
activeServers: string[];
|
|
10
|
+
capabilitiesSummary: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class MCPToolRouter {
|
|
13
|
+
private static readonly MAX_ROUTED_MCP_TOOLS;
|
|
14
|
+
/**
|
|
15
|
+
* Compute a relevance score for a tool based on user goal and context
|
|
16
|
+
*/
|
|
17
|
+
private static scoreToolRelevance;
|
|
18
|
+
/**
|
|
19
|
+
* Route user goal to the most relevant MCP tools across all connected servers
|
|
20
|
+
*/
|
|
21
|
+
static routeTools(userGoal: string, connectedServers: MCPServerConfig[]): RoutedToolSelection;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=toolRouter.d.ts.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Transports
|
|
3
|
+
* Implements Streamable HTTP and stdio local process transports for MCP JSON-RPC 2.0.
|
|
4
|
+
*/
|
|
5
|
+
export interface IMCPTransport {
|
|
6
|
+
connect(): Promise<void>;
|
|
7
|
+
disconnect(): Promise<void>;
|
|
8
|
+
sendRequest<T = unknown>(method: string, params?: Record<string, unknown> | unknown[], timeoutMs?: number): Promise<T>;
|
|
9
|
+
sendNotification(method: string, params?: Record<string, unknown> | unknown[]): Promise<void>;
|
|
10
|
+
onNotification(listener: (method: string, params: unknown) => void): void;
|
|
11
|
+
isConnected(): boolean;
|
|
12
|
+
getTransportType(): 'http' | 'stdio';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Streamable HTTP Transport
|
|
16
|
+
* Communicates with remote or local HTTP MCP servers using JSON-RPC 2.0 over HTTP.
|
|
17
|
+
*/
|
|
18
|
+
export declare class HttpMcpTransport implements IMCPTransport {
|
|
19
|
+
private endpoint;
|
|
20
|
+
private headers;
|
|
21
|
+
private connected;
|
|
22
|
+
private requestId;
|
|
23
|
+
private notificationListeners;
|
|
24
|
+
constructor(endpoint: string, headers?: Record<string, string>);
|
|
25
|
+
getTransportType(): 'http';
|
|
26
|
+
isConnected(): boolean;
|
|
27
|
+
onNotification(listener: (method: string, params: unknown) => void): void;
|
|
28
|
+
connect(): Promise<void>;
|
|
29
|
+
disconnect(): Promise<void>;
|
|
30
|
+
sendRequest<T = unknown>(method: string, params?: Record<string, unknown> | unknown[], timeoutMs?: number): Promise<T>;
|
|
31
|
+
sendNotification(method: string, params?: Record<string, unknown> | unknown[]): Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* stdio Local Process Transport
|
|
35
|
+
* Spawns a local MCP server child process communicating over stdin/stdout with newline-delimited or Content-Length framed JSON-RPC 2.0.
|
|
36
|
+
*/
|
|
37
|
+
export declare class StdioMcpTransport implements IMCPTransport {
|
|
38
|
+
private command;
|
|
39
|
+
private args;
|
|
40
|
+
private env;
|
|
41
|
+
private process;
|
|
42
|
+
private connected;
|
|
43
|
+
private requestId;
|
|
44
|
+
private pendingRequests;
|
|
45
|
+
private notificationListeners;
|
|
46
|
+
private stdoutBuffer;
|
|
47
|
+
private stderrBuffer;
|
|
48
|
+
constructor(command: string, args?: string[], env?: Record<string, string>);
|
|
49
|
+
getTransportType(): 'stdio';
|
|
50
|
+
isConnected(): boolean;
|
|
51
|
+
onNotification(listener: (method: string, params: unknown) => void): void;
|
|
52
|
+
getStderrDiagnostics(): string;
|
|
53
|
+
connect(): Promise<void>;
|
|
54
|
+
disconnect(): Promise<void>;
|
|
55
|
+
private handleStdoutData;
|
|
56
|
+
private parseJsonRpcPayload;
|
|
57
|
+
sendRequest<T = unknown>(method: string, params?: Record<string, unknown> | unknown[], timeoutMs?: number): Promise<T>;
|
|
58
|
+
sendNotification(method: string, params?: Record<string, unknown> | unknown[]): Promise<void>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scout MCP Ecosystem - Type Definitions
|
|
3
|
+
* Standards-compliant Model Context Protocol (MCP) types and internal Scout representations.
|
|
4
|
+
*/
|
|
5
|
+
export type MCPTransportType = 'http' | 'stdio';
|
|
6
|
+
export type MCPAuthType = 'none' | 'api-key' | 'bearer' | 'oauth';
|
|
7
|
+
export type MCPServerStatus = 'connected' | 'connecting' | 'disconnected' | 'reconnecting' | 'degraded' | 'error' | 'unauthorized';
|
|
8
|
+
export type MCPPermissionLevel = 'read' | 'write' | 'destructive' | 'admin';
|
|
9
|
+
export interface MCPServerPermissions {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
allowedTools: string[];
|
|
12
|
+
disabledTools: string[];
|
|
13
|
+
requireConfirmationForDestructive: boolean;
|
|
14
|
+
autoApproveSafe: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface MCPDiscoveredTool {
|
|
17
|
+
name: string;
|
|
18
|
+
originalName: string;
|
|
19
|
+
qualifiedName: string;
|
|
20
|
+
description: string;
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object';
|
|
23
|
+
properties?: Record<string, unknown> | undefined;
|
|
24
|
+
required?: string[] | undefined;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
};
|
|
27
|
+
serverId: string;
|
|
28
|
+
serverName: string;
|
|
29
|
+
enabled: boolean;
|
|
30
|
+
permissionLevel: MCPPermissionLevel;
|
|
31
|
+
requiresApproval: boolean;
|
|
32
|
+
annotations?: {
|
|
33
|
+
readOnly?: boolean | undefined;
|
|
34
|
+
destructive?: boolean | undefined;
|
|
35
|
+
category?: string | undefined;
|
|
36
|
+
tags?: string[] | undefined;
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
} | undefined;
|
|
39
|
+
}
|
|
40
|
+
export interface MCPServerCapabilities {
|
|
41
|
+
tools?: {
|
|
42
|
+
listChanged?: boolean | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
resources?: {
|
|
45
|
+
subscribe?: boolean | undefined;
|
|
46
|
+
listChanged?: boolean | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
prompts?: {
|
|
49
|
+
listChanged?: boolean | undefined;
|
|
50
|
+
} | undefined;
|
|
51
|
+
logging?: Record<string, unknown> | undefined;
|
|
52
|
+
experimental?: Record<string, unknown> | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface MCPServerHealth {
|
|
55
|
+
status: MCPServerStatus;
|
|
56
|
+
latencyMs?: number | undefined;
|
|
57
|
+
lastCheckedAt?: string | undefined;
|
|
58
|
+
error?: string | undefined;
|
|
59
|
+
}
|
|
60
|
+
export interface MCPServerConfig {
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
transport: MCPTransportType;
|
|
65
|
+
endpoint?: string | undefined;
|
|
66
|
+
command?: string | undefined;
|
|
67
|
+
args?: string[] | undefined;
|
|
68
|
+
env?: Record<string, string> | undefined;
|
|
69
|
+
authType: MCPAuthType;
|
|
70
|
+
authHeader?: string | undefined;
|
|
71
|
+
hasSecret?: boolean | undefined;
|
|
72
|
+
status: MCPServerStatus;
|
|
73
|
+
health: MCPServerHealth;
|
|
74
|
+
capabilities?: MCPServerCapabilities | undefined;
|
|
75
|
+
tools: MCPDiscoveredTool[];
|
|
76
|
+
permissions: MCPServerPermissions;
|
|
77
|
+
userId?: string | undefined;
|
|
78
|
+
userEmail?: string | undefined;
|
|
79
|
+
createdAt: string;
|
|
80
|
+
updatedAt: string;
|
|
81
|
+
lastConnectedAt?: string | undefined;
|
|
82
|
+
lastActivityAt?: string | undefined;
|
|
83
|
+
}
|
|
84
|
+
export interface MCPToolResult {
|
|
85
|
+
serverId: string;
|
|
86
|
+
serverName: string;
|
|
87
|
+
toolName: string;
|
|
88
|
+
invocationId: string;
|
|
89
|
+
startedAt: string;
|
|
90
|
+
completedAt: string;
|
|
91
|
+
status: 'success' | 'error' | 'timeout' | 'blocked';
|
|
92
|
+
inputSummary: string;
|
|
93
|
+
outputSummary: string;
|
|
94
|
+
result: unknown;
|
|
95
|
+
error?: string | undefined;
|
|
96
|
+
executionDurationMs: number;
|
|
97
|
+
}
|
|
98
|
+
export interface MCPActivityEvent {
|
|
99
|
+
id: string;
|
|
100
|
+
timestamp: string;
|
|
101
|
+
serverId: string;
|
|
102
|
+
serverName: string;
|
|
103
|
+
toolName: string;
|
|
104
|
+
status: 'success' | 'error' | 'blocked' | 'timeout';
|
|
105
|
+
summary: string;
|
|
106
|
+
durationMs: number;
|
|
107
|
+
error?: string | undefined;
|
|
108
|
+
}
|
|
109
|
+
export interface MCPJsonRpcRequest {
|
|
110
|
+
jsonrpc: '2.0';
|
|
111
|
+
id: string | number;
|
|
112
|
+
method: string;
|
|
113
|
+
params?: Record<string, unknown> | unknown[] | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface MCPJsonRpcResponse {
|
|
116
|
+
jsonrpc: '2.0';
|
|
117
|
+
id: string | number;
|
|
118
|
+
result?: unknown;
|
|
119
|
+
error?: {
|
|
120
|
+
code: number;
|
|
121
|
+
message: string;
|
|
122
|
+
data?: unknown;
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface MCPJsonRpcNotification {
|
|
126
|
+
jsonrpc: '2.0';
|
|
127
|
+
method: string;
|
|
128
|
+
params?: Record<string, unknown> | unknown[] | undefined;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare function getAdminSecretKey(): string;
|
|
2
|
+
export declare function isWhitelistedAdminEmail(email?: string | null): boolean;
|
|
3
|
+
export interface AdminAuthSession {
|
|
4
|
+
adminToken: string;
|
|
5
|
+
expiresAt: number;
|
|
6
|
+
email?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function generateAdminToken(email?: string): string;
|
|
9
|
+
export declare function verifyAdminToken(token?: string | null): {
|
|
10
|
+
valid: boolean;
|
|
11
|
+
email?: string;
|
|
12
|
+
error?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function verifyAdminAuth(headersOrPasskey: {
|
|
15
|
+
authorization?: string;
|
|
16
|
+
'x-admin-key'?: string;
|
|
17
|
+
passkey?: string;
|
|
18
|
+
}): boolean;
|
|
19
|
+
export interface AdminUserView {
|
|
20
|
+
userId: string;
|
|
21
|
+
email: string;
|
|
22
|
+
currentTier: string;
|
|
23
|
+
creditsUsed: number;
|
|
24
|
+
creditsTotal: number;
|
|
25
|
+
usagePercent: number;
|
|
26
|
+
renewAt: string;
|
|
27
|
+
lastResetAt: string;
|
|
28
|
+
cancelAtPeriodEnd: boolean;
|
|
29
|
+
pendingDowngrade: string | null;
|
|
30
|
+
byokEnabled: boolean;
|
|
31
|
+
isAdmin: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare function getAdminUsersList(): AdminUserView[];
|
|
34
|
+
export interface UpdateUserParams {
|
|
35
|
+
email: string;
|
|
36
|
+
currentTier?: string | undefined;
|
|
37
|
+
creditsTotal?: number | undefined;
|
|
38
|
+
creditsUsed?: number | undefined;
|
|
39
|
+
renewAt?: string | undefined;
|
|
40
|
+
byokEnabled?: boolean | undefined;
|
|
41
|
+
resetCredits?: boolean | undefined;
|
|
42
|
+
}
|
|
43
|
+
export declare function updateAdminUser(params: UpdateUserParams): AdminUserView;
|
|
44
|
+
export declare function deleteAdminUser(email: string): boolean;
|
|
45
|
+
export declare function getAdminDashboardStats(): {
|
|
46
|
+
totalUsers: number;
|
|
47
|
+
tierCounts: {
|
|
48
|
+
free: number;
|
|
49
|
+
pro: number;
|
|
50
|
+
team: number;
|
|
51
|
+
enterprise: number;
|
|
52
|
+
};
|
|
53
|
+
credits: {
|
|
54
|
+
used: number;
|
|
55
|
+
allocated: number;
|
|
56
|
+
};
|
|
57
|
+
revenue: {
|
|
58
|
+
mrrUSD: number;
|
|
59
|
+
mrrINR: number;
|
|
60
|
+
arrUSD: number;
|
|
61
|
+
targetMrrUSD: number;
|
|
62
|
+
mrrProgressPercent: number;
|
|
63
|
+
arpuUSD: number;
|
|
64
|
+
payingUsers: number;
|
|
65
|
+
};
|
|
66
|
+
pricing: Record<import("./pricing.js").PlanTier, import("./pricing.js").PricingTierConfig>;
|
|
67
|
+
};
|
|
68
|
+
export interface EnterpriseLicenseInfo {
|
|
69
|
+
orgName: string;
|
|
70
|
+
seats: number;
|
|
71
|
+
tier: 'team' | 'enterprise';
|
|
72
|
+
allowedDomain?: string | undefined;
|
|
73
|
+
issuedAt: string;
|
|
74
|
+
expiresAt: string;
|
|
75
|
+
licenseKey: string;
|
|
76
|
+
}
|
|
77
|
+
export declare function generateEnterpriseLicense(params: {
|
|
78
|
+
orgName: string;
|
|
79
|
+
seats: number;
|
|
80
|
+
tier?: 'team' | 'enterprise' | undefined;
|
|
81
|
+
allowedDomain?: string | undefined;
|
|
82
|
+
validDays?: number | undefined;
|
|
83
|
+
}): EnterpriseLicenseInfo;
|
|
84
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AuditEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
timestamp: string;
|
|
4
|
+
action: string;
|
|
5
|
+
tier: string;
|
|
6
|
+
user?: string | undefined;
|
|
7
|
+
details?: Record<string, any> | undefined;
|
|
8
|
+
status?: 'success' | 'failed' | 'warning' | undefined;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Appends an audit event to ~/.ft/audit.log if the user's tier has audit_logging enabled.
|
|
12
|
+
*/
|
|
13
|
+
export declare function logAuditEvent(action: string, details?: Record<string, any> | undefined, status?: 'success' | 'failed' | 'warning'): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Retrieves recent audit logs from ~/.ft/audit.log
|
|
16
|
+
*/
|
|
17
|
+
export declare function getAuditLogs(limit?: number): AuditEvent[];
|
|
18
|
+
//# sourceMappingURL=auditLogger.d.ts.map
|