# Copy this file to .env at the repository root, then replace the API key and # local Neo4j password placeholders. # Runtime paths, ports, service URLs, and other advanced settings have built-in # defaults and only need to be added when overriding them. # Local Neo4j — community edition (packages/qwenpaw-data-context/docker-compose.yml). # Community only has logical DB `neo4j`; do not set NEO4J_DATABASE=appdata. # Initialization replaces YOUR_PASSWORD with a random value and chmods .env 0600. NEO4J_URI=bolt://localhost:7687 NEO4J_USER=neo4j NEO4J_PASSWORD=YOUR_PASSWORD NEO4J_DATABASE=neo4j NEO4J_DATABASE_MCP=neo4j # Shared DataBridge and QwenPaw Data CLI model. OPENAI_API_KEY= OPENAI_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 LLM_MODEL=qwen3.7-max # Embedding uses the shared API credentials and endpoint above. # EMBED_DIM must match the vector index dimension. EMBED_MODEL=text-embedding-v3 EMBED_DIM=1024 # --- Optional QwenPaw Data CLI model overrides --- # By default, the CLI uses provider=openai together with LLM_MODEL, # OPENAI_API_KEY, and OPENAI_BASE_URL above. Uncomment these only when the CLI # should use a different model configuration. # QWENPAW_DATA_MODEL_PROVIDER=openai # QWENPAW_DATA_MODEL_NAME=qwen3.7-max # QWENPAW_DATA_MODEL_API_KEY= # QWENPAW_DATA_MODEL_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 # --- Security (recommended before exposing services beyond 127.0.0.1) --- # Backward-compatible full-scope Bearer token for REST and HTTP MCP. # QWENPAW_DATA_API_TOKEN= # Scoped keys (JSON array). Each entry has id, scopes, and exactly one of token # or sha256. Supported scopes: query, write, manage, credentials:manage. # Prefer sha256 so the server configuration does not contain the bearer secret. # QWENPAW_DATA_API_KEYS='[{"id":"reader","sha256":"<64 lowercase hex>","scopes":["query"]}]' # Token used by CLI/stdio MCP clients. It must match one configured server key. # The frontend asks for its token and stores it only in sessionStorage. # QWENPAW_DATA_CLIENT_API_TOKEN= # Comma-separated CORS origin allowlist for the DataBridge API. # Origins must be explicit HTTP(S) origins; *, null, paths, and credentials are rejected. # Default: http://localhost:3000,http://127.0.0.1:3000 # QWENPAW_DATA_CORS_ORIGINS= # Host header allowlist used for DNS-rebinding protection (hostnames/IPs, no ports). # Default: localhost,127.0.0.1,::1,host.docker.internal # QWENPAW_DATA_API_ALLOWED_HOSTS= # Trust X-Forwarded-For only from these explicit proxy IPs/CIDRs (default: none). # QWENPAW_DATA_TRUSTED_PROXIES= # Authentication brute-force protection (defaults: 10 failures per 60 seconds). # QWENPAW_DATA_AUTH_FAILURE_LIMIT=10 # QWENPAW_DATA_AUTH_FAILURE_WINDOW_SECONDS=60 # Per-principal token-bucket limits; all default to the 60-second window below. # QWENPAW_DATA_RATE_LIMIT_QUERY=120 # QWENPAW_DATA_RATE_LIMIT_WRITE=60 # QWENPAW_DATA_RATE_LIMIT_MANAGE=30 # QWENPAW_DATA_RATE_LIMIT_CREDENTIALS=20 # QWENPAW_DATA_RATE_LIMIT_AUTHENTICATED=60 # QWENPAW_DATA_RATE_LIMIT_WINDOW_SECONDS=60 # Structured security audit output (default: DataBridge logs/security_audit.jsonl). # QWENPAW_DATA_SECURITY_AUDIT_LOG= # Bind host for the standalone MCP server (default 127.0.0.1). # QWENPAW_DATA_MCP_HOST=127.0.0.1 # Public resource URL advertised by MCP auth metadata (set when using a proxy). # QWENPAW_DATA_MCP_PUBLIC_URL=http://127.0.0.1:8765/mcp/v1/cm # Additional allowed Host/Origin values for an explicitly exposed MCP server. # MCP origins must also be explicit; QWENPAW_DATA_CORS_ORIGINS supplies the defaults. # Public MCP hostnames must also appear in QWENPAW_DATA_API_ALLOWED_HOSTS. # QWENPAW_DATA_MCP_ALLOWED_HOSTS= # QWENPAW_DATA_MCP_ALLOWED_ORIGINS= # Additional Vite Host names for an explicitly exposed frontend. # QWENPAW_DATA_FRONTEND_ALLOWED_HOSTS= # Exact callback origin allowlist (scheme + hostname + optional port). # Private IP literals must be listed explicitly; private DNS answers are denied. # QWENPAW_DATA_CALLBACK_ALLOWLIST=https://callbacks.example.com # Callback request/response byte limits and total deadline. # QWENPAW_DATA_CALLBACK_MAX_REQUEST_BYTES=65536 # QWENPAW_DATA_CALLBACK_MAX_RESPONSE_BYTES=65536 # QWENPAW_DATA_CALLBACK_TIMEOUT_SECONDS=10 # Loopback origins that may receive the API token on the built-in weave callback # path. Change this when the API listens on a non-default port. # QWENPAW_DATA_INTERNAL_CALLBACK_ORIGINS=http://127.0.0.1:8765,http://localhost:8765 # Max upload size (MB) for all file-upload endpoints (default: 50). # QWENPAW_DATA_MAX_UPLOAD_MB=50 # XLSX parser complexity limits (defaults shown). # QWENPAW_DATA_XLSX_MAX_ENTRIES=1000 # QWENPAW_DATA_XLSX_MAX_UNCOMPRESSED_MB=200 # QWENPAW_DATA_XLSX_MAX_COMPRESSION_RATIO=100 # QWENPAW_DATA_XLSX_MAX_ROWS_PER_SHEET=200000 # QWENPAW_DATA_XLSX_MAX_CELLS_PER_SHEET=2000000 # Trace JSONL parser limits (defaults shown). # QWENPAW_DATA_TRACE_MAX_LINE_BYTES=1048576 # QWENPAW_DATA_TRACE_MAX_EVENTS=100000 # Event-loop lag probe interval and warning threshold (seconds). # QWENPAW_DATA_EVENT_LOOP_PROBE_SECONDS=1.0 # QWENPAW_DATA_EVENT_LOOP_LAG_WARN_SECONDS=0.2 # Blocking-I/O governance. Sync FastAPI routes use the shared AnyIO limiter; # async routes that call blocking libraries use bounded resource pools. # The standard Uvicorn launcher also rejects excess total HTTP concurrency. # QWENPAW_DATA_HTTP_MAX_CONCURRENCY=128 # QWENPAW_DATA_SYNC_ROUTE_WORKERS=40 # QWENPAW_DATA_BLOCKING_GRAPH_WORKERS=8 # QWENPAW_DATA_BLOCKING_GRAPH_MAX_QUEUE=32 # QWENPAW_DATA_BLOCKING_GRAPH_QUEUE_TIMEOUT_SECONDS=1 # QWENPAW_DATA_BLOCKING_GRAPH_TIMEOUT_SECONDS=60 # QWENPAW_DATA_BLOCKING_FILE_WORKERS=4 # QWENPAW_DATA_BLOCKING_FILE_MAX_QUEUE=8 # QWENPAW_DATA_BLOCKING_FILE_QUEUE_TIMEOUT_SECONDS=1 # QWENPAW_DATA_BLOCKING_FILE_TIMEOUT_SECONDS=60 # QWENPAW_DATA_BLOCKING_NETWORK_WORKERS=8 # QWENPAW_DATA_BLOCKING_NETWORK_MAX_QUEUE=16 # QWENPAW_DATA_BLOCKING_NETWORK_QUEUE_TIMEOUT_SECONDS=1 # QWENPAW_DATA_BLOCKING_NETWORK_TIMEOUT_SECONDS=30 # QWENPAW_DATA_BLOCKING_SQL_WORKERS=4 # QWENPAW_DATA_BLOCKING_SQL_MAX_QUEUE=16 # QWENPAW_DATA_BLOCKING_SQL_QUEUE_TIMEOUT_SECONDS=1 # QWENPAW_DATA_BLOCKING_SQL_TIMEOUT_SECONDS=60 # QWENPAW_DATA_BLOCKING_SHUTDOWN_TIMEOUT_SECONDS=10 # QWENPAW_DATA_ACCESS_LOG_QUEUE_SIZE=4096 # QWENPAW_DATA_CYPHER_TIMEOUT_SECONDS=30 # Workspace backend for agent tool execution: docker (default) or local. # local is an explicit unsandboxed escape hatch; docker requires a running daemon. # QWENPAW_DATA_WORKSPACE=docker # AgentScope permission mode: auto (default), default, accept_edits, explore, # dont_ask, or bypass. auto uses bypass inside Docker, accept_edits for an # interactive local terminal, and dont_ask for unattended local execution. # QWENPAW_DATA_PERMISSION_MODE=auto # Base image for the docker workspace (default: python:3.11-slim). # QWENPAW_DATA_DOCKER_BASE_IMAGE=python:3.11-slim # Extra pip packages preinstalled in the docker workspace (comma-separated), # appended to the built-in analysis stack (pandas, numpy, matplotlib, ...). # QWENPAW_DATA_DOCKER_EXTRA_PIP= # Hostname for containers to reach host services in docker workspace mode # (default: host.docker.internal). # QWENPAW_DATA_DOCKER_HOST_ALIAS=host.docker.internal # Extra allowed Host header values for the CM MCP endpoint (comma-separated, # supports "host:*" port wildcard). Loopback and host.docker.internal are # always allowed. # QWENPAW_DATA_MCP_ALLOWED_HOSTS=