mirror of
https://github.com/wu736139669/hapi.git
synced 2026-12-04 06:57:55 +00:00
Adopt fork preview/boundary and branch endpoints, GitHub PR awareness, session external refs, queue batch aliases and the attached runtime's history validation. The fork keeps its Session List/Row/Chat surfaces, Claude/DSH import dialogs, goal controls and DSH Web runtime. Notable resolutions: - Codex projection compares replay payload identity while still carrying the fork's Hub persistence options; queue committed() now uses upstream's batch alias matching - user messages are ACKed per accepted batch member, with the fork's replay createdAt/verifyPersistence path retained - server keeps the fork's public studio/share middleware and one gzip middleware; upstream's static cache headers and HEAD handling are adopted - settings keeps the fork's session-summary/teams/unavailable-agents rows and adds GitHub PR awareness - iOS keeps the personal bundle id and local string catalog (Japanese catalog from upstream is not merged) Validation: typecheck passes; suite 5971 pass, failures limited to the four machine-specific macOS responsibility probes. via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run> Co-Authored-By: Claude Code <noreply@anthropic.com>
254 lines
8.7 KiB
JSON
254 lines
8.7 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$id": "https://hapi.run/docs/schemas/settings.schema.json",
|
|
"title": "HAPI Settings",
|
|
"description": "Configuration file for HAPI (~/.hapi/settings.json, or $HAPI_HOME/settings.json). Shared by the hub and the CLI on the same machine. See https://hapi.run/docs/guide/configuration",
|
|
"type": "object",
|
|
"properties": {
|
|
"cliApiToken": {
|
|
"type": "string",
|
|
"description": "Shared secret for CLI authentication. Auto-generated if not set. ENV: CLI_API_TOKEN"
|
|
},
|
|
"apiUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"default": "http://localhost:3006",
|
|
"description": "Hub URL for CLI connections. ENV: HAPI_API_URL"
|
|
},
|
|
"extraHeaders": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Extra headers for CLI to hub HTTP and WebSocket requests. ENV: HAPI_EXTRA_HEADERS_JSON"
|
|
},
|
|
"serverUrl": {
|
|
"type": "string",
|
|
"description": "Legacy name for apiUrl. Read by the CLI only when apiUrl is absent."
|
|
},
|
|
"listenHost": {
|
|
"type": "string",
|
|
"default": "127.0.0.1",
|
|
"description": "Hub HTTP bind address. ENV: HAPI_LISTEN_HOST"
|
|
},
|
|
"listenPort": {
|
|
"type": "integer",
|
|
"default": 3006,
|
|
"minimum": 1,
|
|
"maximum": 65535,
|
|
"description": "Hub HTTP port. ENV: HAPI_LISTEN_PORT"
|
|
},
|
|
"publicUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"description": "Public URL for external access. Must be the hub's canonical HTTPS origin (no path) for passkeys; also used for the Telegram Mini App and to derive default CORS origins. Default: http://localhost:<listenPort>. ENV: HAPI_PUBLIC_URL"
|
|
},
|
|
"corsOrigins": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Allowed CORS origins, or [\"*\"]. Default: derived from publicUrl. ENV: CORS_ORIGINS (comma-separated)"
|
|
},
|
|
"customClaudeModels": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"uniqueItems": true,
|
|
"description": "Additional model names offered by the Claude model picker when using a custom ANTHROPIC_BASE_URL."
|
|
},
|
|
"telegramBotToken": {
|
|
"type": "string",
|
|
"description": "Telegram Bot API token from @BotFather. ENV: TELEGRAM_BOT_TOKEN"
|
|
},
|
|
"telegramNotification": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Enable Telegram notifications. ENV: TELEGRAM_NOTIFICATION"
|
|
},
|
|
"serverChanSendKey": {
|
|
"type": "string",
|
|
"description": "ServerChan SendKey for WeChat push notifications. ENV: SERVERCHAN_SENDKEY"
|
|
},
|
|
"serverChanNotification": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Enable ServerChan notifications. ENV: SERVERCHAN_NOTIFICATION"
|
|
},
|
|
"serverChanBackgroundOnly": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Only send ServerChan notifications when no visible HAPI connection exists in the namespace. ENV: SERVERCHAN_BACKGROUND_ONLY"
|
|
},
|
|
"androidPushMode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"auto",
|
|
"relay",
|
|
"fcm",
|
|
"off"
|
|
],
|
|
"default": "auto",
|
|
"description": "Android push transport. auto: direct FCM when fcmServiceAccountPath is set, otherwise the official push relay. ENV: HAPI_ANDROID_PUSH"
|
|
},
|
|
"fcmServiceAccountPath": {
|
|
"type": "string",
|
|
"description": "Firebase service-account JSON for direct FCM (private builds using the same Firebase project). ENV: FCM_SERVICE_ACCOUNT_PATH"
|
|
},
|
|
"iosPushMode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"relay",
|
|
"apns",
|
|
"off"
|
|
],
|
|
"default": "relay",
|
|
"description": "iOS push transport. apns requires apnsKeyP8Path, apnsKeyId, apnsTeamId and apnsBundleId. ENV: HAPI_IOS_PUSH"
|
|
},
|
|
"iosPushRelayUrl": {
|
|
"type": "string",
|
|
"format": "uri",
|
|
"default": "https://push.hapi.run",
|
|
"description": "Shared Android/iOS native push relay URL (independent of the --relay network tunnel). ENV: HAPI_PUSH_RELAY_URL"
|
|
},
|
|
"apnsKeyP8Path": {
|
|
"type": "string",
|
|
"description": "Path to the APNs .p8 auth key for direct APNs. ENV: APNS_KEY_P8_PATH"
|
|
},
|
|
"apnsKeyId": {
|
|
"type": "string",
|
|
"description": "APNs key ID for direct APNs. ENV: APNS_KEY_ID"
|
|
},
|
|
"apnsTeamId": {
|
|
"type": "string",
|
|
"description": "Apple developer team ID for direct APNs. ENV: APNS_TEAM_ID"
|
|
},
|
|
"apnsBundleId": {
|
|
"type": "string",
|
|
"description": "iOS app bundle ID (APNs topic) for direct APNs. ENV: APNS_BUNDLE_ID"
|
|
},
|
|
"apnsEnv": {
|
|
"type": "string",
|
|
"enum": [
|
|
"production",
|
|
"sandbox"
|
|
],
|
|
"default": "production",
|
|
"description": "APNs environment for direct APNs. ENV: APNS_ENV"
|
|
},
|
|
"relayAuthKey": {
|
|
"type": "string",
|
|
"description": "Per-hub relay auth key issued by the relay server. Auto-obtained if not set. ENV: HAPI_RELAY_AUTH"
|
|
},
|
|
"vapidKeys": {
|
|
"type": "object",
|
|
"description": "Auto-generated Web Push VAPID keys. Do not edit manually.",
|
|
"properties": {
|
|
"publicKey": {
|
|
"type": "string"
|
|
},
|
|
"privateKey": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"publicKey",
|
|
"privateKey"
|
|
]
|
|
},
|
|
"machineId": {
|
|
"type": "string",
|
|
"description": "Auto-generated unique machine identifier. Do not edit manually."
|
|
},
|
|
"machineIdConfirmedByServer": {
|
|
"type": "boolean",
|
|
"description": "Internal flag. Do not edit manually."
|
|
},
|
|
"runnerAutoStartWhenRunningHappy": {
|
|
"type": "boolean",
|
|
"description": "Legacy field; currently not read by HAPI."
|
|
},
|
|
"sessionSummaryContract": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Inject the AGENT_NOTIFY_SUMMARY trailing-line contract into supported agents' instructions. Editable in web Settings. CLI env HAPI_SESSION_SUMMARY_CONTRACT overrides per process."
|
|
},
|
|
"sessionSummaryInChat": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Show a compact AGENT_NOTIFY_SUMMARY row in web chat instead of stripping the footer. Editable in web Settings."
|
|
},
|
|
"autoBridgeTransientModelErrors": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Cursor sessions automatically enqueue a one-shot bridge after a transient model error. Editable in web Settings."
|
|
},
|
|
"peerSpawnDefaults": {
|
|
"type": "object",
|
|
"description": "Hub-wide defaults for spawn_peer / hapi spawn-peer. Unset fields fall back to agent=claude, permissionMode=yolo, models={claude: sonnet}. Editable in web Settings.",
|
|
"properties": {
|
|
"agent": {
|
|
"type": "string",
|
|
"enum": [
|
|
"agy",
|
|
"claude",
|
|
"codex",
|
|
"dsh",
|
|
"copilot",
|
|
"cursor",
|
|
"grok",
|
|
"kimi",
|
|
"opencode",
|
|
"pi"
|
|
],
|
|
"description": "Default agent flavor for spawned peers."
|
|
},
|
|
"permissionMode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"default",
|
|
"acceptEdits",
|
|
"auto",
|
|
"bypassPermissions",
|
|
"plan",
|
|
"ask",
|
|
"debug",
|
|
"autoReview",
|
|
"read-only",
|
|
"safe-yolo",
|
|
"yolo",
|
|
"request-review",
|
|
"always-proceed"
|
|
],
|
|
"description": "Default permission intent; mapped to an equivalent mode the target agent supports."
|
|
},
|
|
"models": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Per-agent model overrides keyed by agent flavor, e.g. {\"claude\": \"sonnet\"}."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"elevenLabsMaxDurationSeconds": {
|
|
"type": "integer",
|
|
"minimum": 60,
|
|
"maximum": 7200,
|
|
"default": 1800,
|
|
"description": "Maximum length of one ElevenLabs voice conversation, in seconds. Editable in web Settings. ENV ELEVENLABS_MAX_DURATION_SECONDS wins when set."
|
|
},
|
|
"providerCredentials": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Hub-managed voice and dictation provider credentials, keyed by env var name (OPENAI_API_KEY, ELEVENLABS_API_KEY, DEEPGRAM_API_KEY, GROQ_API_KEY, TRANSCRIPTION_BASE_URL, TRANSCRIPTION_MODEL, TRANSCRIPTION_API_KEY, GEMINI_API_KEY, GOOGLE_API_KEY, DASHSCOPE_API_KEY, QWEN_API_KEY). Managed from web Settings; process environment variables win over settings-backed values."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|