mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
corepack prepare runs as root and leaves COREPACK_HOME/v1 and lastKnownGood.json root-owned under the sticky dir, so a project packageManager pin failed with 'Failed to create cache directory' for the exec uid; open up the whole corepack tree after prewarming and verify a pinned download as an unknown uid. Pin uv (0.12.9 segfaults under qemu-user amd64 emulation) and bump the guest image digest.
106 lines
2.2 KiB
TypeScript
106 lines
2.2 KiB
TypeScript
export const DEFAULTS = {
|
|
SERVER: {
|
|
PORT: 5003,
|
|
HOST: '0.0.0.0',
|
|
CORS_ORIGIN: 'http://localhost:5173',
|
|
},
|
|
|
|
FRONTEND: {
|
|
PORT: 5173,
|
|
HOST: '0.0.0.0',
|
|
},
|
|
|
|
OPENCODE: {
|
|
PORT: 5551,
|
|
HOST: '127.0.0.1',
|
|
PUBLIC_URL: '', // Optional: public URL for OAuth callbacks (e.g., https://mydomain.com)
|
|
HEALTH_WATCH_ENABLED: true,
|
|
HEALTH_POLL_MS: 30000,
|
|
HEALTH_FAILURE_THRESHOLD: 2,
|
|
},
|
|
|
|
DATABASE: {
|
|
PATH: './data/opencode.db',
|
|
},
|
|
|
|
WORKSPACE: {
|
|
BASE_PATH: './workspace',
|
|
REPOS_DIR: 'repos',
|
|
SCHEDULE_WORKTREES_DIR: 'schedule-worktrees',
|
|
CONFIG_DIR: '.config/opencode',
|
|
AUTH_FILE: '.opencode/state/opencode/auth.json',
|
|
},
|
|
|
|
SANDBOX: {
|
|
MSB_PATH: 'msb',
|
|
IMAGE: 'docker.io/cstechdev/ocm-sandbox@sha256:7435dce147503b846bcd89ad5e9f7192f37b332c8e49087a7e619034352c47f4',
|
|
MEMORY: '4G',
|
|
CPUS: 2,
|
|
EXEC_USER: 'node',
|
|
NET: 'public',
|
|
START_TIMEOUT_MS: 300000,
|
|
EXEC_TIMEOUT_MS: 600000,
|
|
},
|
|
|
|
TIMEOUTS: {
|
|
PROCESS_START_WAIT_MS: 2000,
|
|
PROCESS_VERIFY_WAIT_MS: 1000,
|
|
HEALTH_CHECK_TIMEOUT_MS: 30000,
|
|
},
|
|
|
|
FILE_LIMITS: {
|
|
MAX_SIZE_MB: 50,
|
|
MAX_UPLOAD_SIZE_MB: 50,
|
|
},
|
|
|
|
LOGGING: {
|
|
DEBUG: false,
|
|
LOG_LEVEL: 'info',
|
|
},
|
|
|
|
LOGS: {
|
|
BUFFER_CAPACITY: 2000,
|
|
MAX_ENTRY_LENGTH: 4000,
|
|
DEFAULT_PAGE_SIZE: 500,
|
|
MAX_PAGE_SIZE: 1000,
|
|
POLL_INTERVAL_MS: 3000,
|
|
},
|
|
|
|
SSE: {
|
|
RECONNECT_DELAY_MS: 1000,
|
|
MAX_RECONNECT_DELAY_MS: 30000,
|
|
CONNECT_TIMEOUT_MS: 10000,
|
|
IDLE_GRACE_PERIOD_MS: 5000,
|
|
HEARTBEAT_INTERVAL_MS: 30000,
|
|
STALL_THRESHOLD_MS: 90000,
|
|
WATCHDOG_TICK_MS: 15000,
|
|
},
|
|
} as const
|
|
|
|
export const ALLOWED_MIME_TYPES = [
|
|
'text/plain',
|
|
'text/html',
|
|
'text/css',
|
|
'text/javascript',
|
|
'text/typescript',
|
|
'application/json',
|
|
'application/xml',
|
|
'image/png',
|
|
'image/jpeg',
|
|
'image/gif',
|
|
'image/svg+xml',
|
|
'application/pdf',
|
|
'application/zip',
|
|
'text/markdown',
|
|
] as const
|
|
|
|
export const GIT_PROVIDERS = {
|
|
GITHUB: 'github.com',
|
|
GITLAB: 'gitlab.com',
|
|
BITBUCKET: 'bitbucket.org',
|
|
} as const
|
|
|
|
export type Config = typeof DEFAULTS
|
|
export type AllowedMimeType = (typeof ALLOWED_MIME_TYPES)[number]
|
|
export type GitProvider = (typeof GIT_PROVIDERS)[keyof typeof GIT_PROVIDERS]
|