From b56735c5552816645bd8bd7b8ea51324b5a2e868 Mon Sep 17 00:00:00 2001 From: anzax <49080+anzax@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:15:39 +0000 Subject: [PATCH 1/4] Enhance DockaShell configuration documentation with complete examples and improved organization --- docs/dockashell-configuration.md | 56 ++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/dockashell-configuration.md b/docs/dockashell-configuration.md index 52ec29a..d3f66b6 100644 --- a/docs/dockashell-configuration.md +++ b/docs/dockashell-configuration.md @@ -6,21 +6,73 @@ This document covers both global and project-specific configuration for DockaShe DockaShell stores global settings in `~/.dockashell/config.json`. This file controls system-wide behavior and default settings. -### Global Configuration Example +### Complete Global Configuration Example ```json { + "projects": { + "directory": "~/dockashell-projects" + }, + "tui": { + "display": { + "max_entries": 300 + } + }, "logging": { "traces": { "session_timeout": "4h" } + }, + "remote_mcp": { + "enabled": false, + "port": 3333, + "auth": { + "username": "admin", + "password": "changeme123" + }, + "cors": { + "origin": "*", + "credentials": true + }, + "session": { + "timeout": "24h" + } } } ``` ### Global Configuration Fields -- `logging.traces.session_timeout` – Time between trace entries before starting a new session (e.g., `"2h"`, `"4h"`) +#### Projects Configuration + +- `projects.directory` – Default directory where project files are stored (default: `"~/dockashell-projects"`) + +#### TUI Configuration + +- `tui.display.max_entries` – Maximum number of trace entries to display in the TUI log viewer (default: `300`) + +#### Logging Configuration + +- `logging.traces.session_timeout` – Time between trace entries before starting a new session (default: `"4h"`, formats: `"2h"`, `"30m"`) + +#### Remote MCP Server Configuration + +- `remote_mcp.enabled` – Enable remote MCP server for multi-user access (default: `false`) +- `remote_mcp.port` – Port for remote MCP server (default: `3333`) + +##### Authentication Settings + +- `remote_mcp.auth.username` – Username for authentication (default: `"admin"`) +- `remote_mcp.auth.password` – Password for authentication (default: `"changeme123"` - should be changed) + +##### CORS Settings + +- `remote_mcp.cors.origin` – Allowed origins for CORS requests (default: `"*"`) +- `remote_mcp.cors.credentials` – Allow credentials in CORS requests (default: `true`) + +##### Session Settings + +- `remote_mcp.session.timeout` – Session timeout for authenticated users (default: `"24h"`) ## Project Configuration From 5af5c0af8e729ac06a17654438af2897003e6595 Mon Sep 17 00:00:00 2001 From: anzax <49080+anzax@users.noreply.github.com> Date: Thu, 5 Jun 2025 13:30:32 +0000 Subject: [PATCH 2/4] Refactor tool registration to include descriptions for better clarity and usability --- src/mcp/remote/remote-mcp-server.js | 30 +++++++------- src/mcp/tools/execution-tools.js | 6 +++ src/mcp/tools/log-tools.js | 4 ++ src/mcp/tools/project-tools.js | 61 +++++++++++++++++++---------- 4 files changed, 64 insertions(+), 37 deletions(-) diff --git a/src/mcp/remote/remote-mcp-server.js b/src/mcp/remote/remote-mcp-server.js index 4b4c529..89de4b1 100644 --- a/src/mcp/remote/remote-mcp-server.js +++ b/src/mcp/remote/remote-mcp-server.js @@ -1,16 +1,16 @@ -import express from 'express'; -import cors from 'cors'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; -import { SimpleAuth } from './auth/simple-auth.js'; -import { TransportManager } from './transport/transport-manager.js'; -import { registerProjectTools } from '../tools/project-tools.js'; -import { registerExecutionTools } from '../tools/execution-tools.js'; -import { registerLogTools } from '../tools/log-tools.js'; -import ProjectManager from '../../core/project-manager.js'; +import cors from 'cors'; +import express from 'express'; +import { v4 as uuidv4 } from 'uuid'; import ContainerManager from '../../core/container-manager.js'; +import ProjectManager from '../../core/project-manager.js'; import SecurityManager from '../../core/security.js'; import Logger from '../../utils/logger.js'; -import { v4 as uuidv4 } from 'uuid'; +import { registerExecutionTools } from '../tools/execution-tools.js'; +import { registerLogTools } from '../tools/log-tools.js'; +import { registerProjectTools } from '../tools/project-tools.js'; +import { SimpleAuth } from './auth/simple-auth.js'; +import { TransportManager } from './transport/transport-manager.js'; /** * Remote MCP Server with simple single-user authentication @@ -80,7 +80,7 @@ export class RemoteMCPServer { if (process.env.NODE_ENV !== 'production') { this.app.use((req, _res, next) => { if (req.method === 'OPTIONS') { - console.log('🔍 CORS Preflight Request:', { + console.log('CORS Preflight Request:', { origin: req.headers.origin, method: req.headers['access-control-request-method'], headers: req.headers['access-control-request-headers'], @@ -167,7 +167,7 @@ export class RemoteMCPServer {
-