@virtengine/openfleet 0.25.0

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.
Files changed (120) hide show
  1. package/.env.example +914 -0
  2. package/LICENSE +190 -0
  3. package/README.md +500 -0
  4. package/agent-endpoint.mjs +918 -0
  5. package/agent-hook-bridge.mjs +230 -0
  6. package/agent-hooks.mjs +1188 -0
  7. package/agent-pool.mjs +2403 -0
  8. package/agent-prompts.mjs +689 -0
  9. package/agent-sdk.mjs +141 -0
  10. package/anomaly-detector.mjs +1195 -0
  11. package/autofix.mjs +1294 -0
  12. package/claude-shell.mjs +708 -0
  13. package/cli.mjs +906 -0
  14. package/codex-config.mjs +1274 -0
  15. package/codex-model-profiles.mjs +135 -0
  16. package/codex-shell.mjs +762 -0
  17. package/config-doctor.mjs +613 -0
  18. package/config.mjs +1720 -0
  19. package/conflict-resolver.mjs +248 -0
  20. package/container-runner.mjs +450 -0
  21. package/copilot-shell.mjs +827 -0
  22. package/daemon-restart-policy.mjs +56 -0
  23. package/diff-stats.mjs +282 -0
  24. package/error-detector.mjs +829 -0
  25. package/fetch-runtime.mjs +34 -0
  26. package/fleet-coordinator.mjs +838 -0
  27. package/get-telegram-chat-id.mjs +71 -0
  28. package/git-safety.mjs +170 -0
  29. package/github-reconciler.mjs +403 -0
  30. package/hook-profiles.mjs +651 -0
  31. package/kanban-adapter.mjs +4491 -0
  32. package/lib/logger.mjs +645 -0
  33. package/maintenance.mjs +828 -0
  34. package/merge-strategy.mjs +1171 -0
  35. package/monitor.mjs +12207 -0
  36. package/openfleet.config.example.json +115 -0
  37. package/openfleet.schema.json +465 -0
  38. package/package.json +203 -0
  39. package/postinstall.mjs +187 -0
  40. package/pr-cleanup-daemon.mjs +978 -0
  41. package/preflight.mjs +408 -0
  42. package/prepublish-check.mjs +90 -0
  43. package/presence.mjs +328 -0
  44. package/primary-agent.mjs +282 -0
  45. package/publish.mjs +151 -0
  46. package/repo-root.mjs +29 -0
  47. package/restart-controller.mjs +100 -0
  48. package/review-agent.mjs +557 -0
  49. package/rotate-agent-logs.sh +133 -0
  50. package/sdk-conflict-resolver.mjs +973 -0
  51. package/session-tracker.mjs +880 -0
  52. package/setup.mjs +3937 -0
  53. package/shared-knowledge.mjs +410 -0
  54. package/shared-state-manager.mjs +841 -0
  55. package/shared-workspace-cli.mjs +199 -0
  56. package/shared-workspace-registry.mjs +537 -0
  57. package/shared-workspaces.json +18 -0
  58. package/startup-service.mjs +1070 -0
  59. package/sync-engine.mjs +1063 -0
  60. package/task-archiver.mjs +801 -0
  61. package/task-assessment.mjs +550 -0
  62. package/task-claims.mjs +924 -0
  63. package/task-complexity.mjs +581 -0
  64. package/task-executor.mjs +5111 -0
  65. package/task-store.mjs +753 -0
  66. package/telegram-bot.mjs +9281 -0
  67. package/telegram-sentinel.mjs +2010 -0
  68. package/ui/app.js +867 -0
  69. package/ui/app.legacy.js +1464 -0
  70. package/ui/app.monolith.js +2488 -0
  71. package/ui/components/charts.js +226 -0
  72. package/ui/components/chat-view.js +567 -0
  73. package/ui/components/command-palette.js +587 -0
  74. package/ui/components/diff-viewer.js +190 -0
  75. package/ui/components/forms.js +327 -0
  76. package/ui/components/kanban-board.js +451 -0
  77. package/ui/components/session-list.js +305 -0
  78. package/ui/components/shared.js +473 -0
  79. package/ui/index.html +70 -0
  80. package/ui/modules/api.js +297 -0
  81. package/ui/modules/icons.js +461 -0
  82. package/ui/modules/router.js +81 -0
  83. package/ui/modules/settings-schema.js +261 -0
  84. package/ui/modules/state.js +679 -0
  85. package/ui/modules/telegram.js +331 -0
  86. package/ui/modules/utils.js +270 -0
  87. package/ui/styles/animations.css +140 -0
  88. package/ui/styles/base.css +98 -0
  89. package/ui/styles/components.css +1915 -0
  90. package/ui/styles/kanban.css +286 -0
  91. package/ui/styles/layout.css +809 -0
  92. package/ui/styles/sessions.css +827 -0
  93. package/ui/styles/variables.css +188 -0
  94. package/ui/styles.css +141 -0
  95. package/ui/styles.monolith.css +1046 -0
  96. package/ui/tabs/agents.js +1417 -0
  97. package/ui/tabs/chat.js +74 -0
  98. package/ui/tabs/control.js +887 -0
  99. package/ui/tabs/dashboard.js +515 -0
  100. package/ui/tabs/infra.js +537 -0
  101. package/ui/tabs/logs.js +783 -0
  102. package/ui/tabs/settings.js +1487 -0
  103. package/ui/tabs/tasks.js +1385 -0
  104. package/ui-server.mjs +4073 -0
  105. package/update-check.mjs +465 -0
  106. package/utils.mjs +172 -0
  107. package/ve-kanban.mjs +654 -0
  108. package/ve-kanban.ps1 +1365 -0
  109. package/ve-kanban.sh +18 -0
  110. package/ve-orchestrator.mjs +340 -0
  111. package/ve-orchestrator.ps1 +6546 -0
  112. package/ve-orchestrator.sh +18 -0
  113. package/vibe-kanban-wrapper.mjs +41 -0
  114. package/vk-error-resolver.mjs +470 -0
  115. package/vk-log-stream.mjs +914 -0
  116. package/whatsapp-channel.mjs +520 -0
  117. package/workspace-monitor.mjs +581 -0
  118. package/workspace-reaper.mjs +405 -0
  119. package/workspace-registry.mjs +238 -0
  120. package/worktree-manager.mjs +1266 -0
package/.env.example ADDED
@@ -0,0 +1,914 @@
1
+ # ─── Codex Monitor — Environment Configuration ───────────────────────────────
2
+ # Copy this file to .env and fill in your values.
3
+ # Or run: openfleet --setup
4
+ # All variables are optional unless marked [REQUIRED].
5
+ # Boolean flags use true/false (preferred). Legacy 1/0 is still accepted.
6
+ # Profile guidance:
7
+ # - Local development: DEVMODE=true, DEVMODE_MONITOR_MONITOR_ENABLED=true, *_TRANSPORT=sdk
8
+ # - End-user stable: DEVMODE=false, DEVMODE_MONITOR_MONITOR_ENABLED=false, *_TRANSPORT=sdk
9
+
10
+ # ─── Task Claims and Coordination ─────────────────────────────────────────────
11
+ # Shared state manager enables distributed task coordination across multiple
12
+ # agents and workstations. Provides atomic claim operations, heartbeat-based
13
+ # liveness detection, and conflict resolution.
14
+ # Enable/disable shared state coordination (default: true)
15
+ SHARED_STATE_ENABLED=true
16
+ # Heartbeat renewal interval in milliseconds (default: 60000 = 1 minute)
17
+ SHARED_STATE_HEARTBEAT_INTERVAL_MS=60000
18
+ # Heartbeat staleness threshold in milliseconds (default: 300000 = 5 minutes)
19
+ # Tasks with stale heartbeats are considered abandoned and can be reclaimed
20
+ SHARED_STATE_STALE_THRESHOLD_MS=300000
21
+ # Maximum retry attempts before permanently ignoring a task (default: 3)
22
+ SHARED_STATE_MAX_RETRIES=3
23
+ # Task claim owner staleness threshold in milliseconds (default: 600000 = 10 minutes)
24
+ # Used by task-claims.mjs to detect stale local claims
25
+ TASK_CLAIM_OWNER_STALE_TTL_MS=600000
26
+
27
+ # ─── Project Identity ─────────────────────────────────────────────────────────
28
+ # Project name shown in Telegram messages and logs.
29
+ # Auto-detected from package.json or directory name if not set.
30
+ # PROJECT_NAME=my-project
31
+
32
+ # ─── Telegram Bot ─────────────────────────────────────────────────────────────
33
+ # Create a bot via @BotFather on Telegram, then paste the token here.
34
+ # Run `openfleet-chat-id` to discover your chat ID.
35
+ TELEGRAM_BOT_TOKEN=
36
+ TELEGRAM_CHAT_ID=
37
+ # Optional additional allow-list entries (comma-separated chat IDs or user IDs).
38
+ # Useful when commands are sent from a group/topic while TELEGRAM_CHAT_ID is your DM user ID.
39
+ # TELEGRAM_ALLOWED_CHAT_IDS=
40
+ # Minutes between periodic status summaries (default: 10)
41
+ TELEGRAM_INTERVAL_MIN=10
42
+ # Long-poll timeout for getUpdates in seconds (default: 20)
43
+ TELEGRAM_COMMAND_POLL_TIMEOUT_SEC=20
44
+ # Agent execution timeout for Telegram-triggered SDK runs (ms).
45
+ # TELEGRAM_AGENT_TIMEOUT_MS=5400000 # 90 minutes
46
+ # Or set minutes instead of ms:
47
+ # TELEGRAM_AGENT_TIMEOUT_MIN=90
48
+ # Max concurrent telegram command handlers (default: 2)
49
+ # TELEGRAM_COMMAND_CONCURRENCY=2
50
+ # Max commands to pull per batch (default: 25)
51
+ # TELEGRAM_COMMAND_MAX_BATCH=25
52
+ # Override Telegram API base URL if your network requires a proxy/gateway
53
+ # TELEGRAM_API_BASE_URL=https://api.telegram.org
54
+ # HTTP timeout per Telegram request in ms (default: 15000)
55
+ # TELEGRAM_HTTP_TIMEOUT_MS=15000
56
+ # Max retry attempts for transient Telegram network/server failures (default: 4)
57
+ # TELEGRAM_RETRY_ATTEMPTS=4
58
+ # Base retry backoff in ms (exponential with jitter, default: 600)
59
+ # TELEGRAM_RETRY_BASE_MS=600
60
+ # Enable curl fallback transport when Node fetch fails (default: true on Linux/macOS, false on Windows)
61
+ # TELEGRAM_CURL_FALLBACK=true
62
+ # Curl connect timeout in seconds when fallback is used (default: 8)
63
+ # TELEGRAM_CURL_CONNECT_TIMEOUT_SEC=8
64
+ # Poll timeout in seconds when curl fallback is active (default: 5)
65
+ # Lower values help when networks drop long-lived idle HTTPS connections.
66
+ # TELEGRAM_CURL_POLL_TIMEOUT_SEC=5
67
+ # ─── Telegram Mini App (Control Center Web UI) ───────────────────────────────
68
+ # Enable the Mini App server. Set to true and configure a port to activate.
69
+ TELEGRAM_MINIAPP_ENABLED=false
70
+ # Port for the Mini App HTTP server. Required when MINIAPP_ENABLED=true.
71
+ # TELEGRAM_UI_PORT=3080
72
+ # Bind address for the server (default: 0.0.0.0 — all interfaces for LAN access)
73
+ # TELEGRAM_UI_HOST=0.0.0.0
74
+ # Public hostname override. By default the server auto-detects your LAN IP.
75
+ # Set this when using a tunnel (ngrok, Cloudflare) or a public domain.
76
+ # TELEGRAM_UI_PUBLIC_HOST=your-lan-ip-or-domain
77
+ # Full public URL override (takes precedence over host/port auto-detection).
78
+ # Use when you have a reverse proxy or tunnel with HTTPS.
79
+ # TELEGRAM_UI_BASE_URL=https://your-public-ui.example.com
80
+ # Skip Telegram initData authentication (for local browser testing only).
81
+ # TELEGRAM_UI_ALLOW_UNSAFE=false
82
+ # Max age in seconds for initData auth tokens (default: 86400 = 24h)
83
+ # TELEGRAM_UI_AUTH_MAX_AGE_SEC=86400
84
+ # Presence heartbeat TTL in seconds (default: 180)
85
+ # TELEGRAM_PRESENCE_TTL_SEC=180
86
+ #
87
+ # ── Cloudflare Tunnel (for persistent HTTPS) ────────────────────────────────
88
+ # Telegram Mini App requires HTTPS with a valid cert. Cloudflare tunnels provide this.
89
+ #
90
+ # Two modes:
91
+ # 1. **Quick tunnel** (default): Random *.trycloudflare.com URL, no setup required.
92
+ # Pros: Zero config. Cons: URL changes on every restart (refresh Telegram button).
93
+ #
94
+ # 2. **Named tunnel** (persistent): Custom domain that never changes.
95
+ # Setup:
96
+ # a) Create tunnel: `cloudflared tunnel create <name>`
97
+ # b) Add DNS: `cloudflared tunnel route dns <name> subdomain.yourdomain.com`
98
+ # c) Set env vars below.
99
+ # Pros: Stable URL (no Telegram button refresh). Cons: Requires Cloudflare account.
100
+ #
101
+ # Named tunnel env vars (leave blank for quick tunnel):
102
+ # CLOUDFLARE_TUNNEL_NAME=my-tunnel
103
+ # CLOUDFLARE_TUNNEL_CREDENTIALS=/home/user/.cloudflared/<tunnel-id>.json
104
+ #
105
+ # Tunnel mode control: auto | cloudflared | disabled
106
+ # TELEGRAM_UI_TUNNEL=auto
107
+
108
+ # ─── Telegram Sentinel (independent watchdog) ──────────────────────────────
109
+ # Keep Telegram command availability even when openfleet is down.
110
+ # Sentinel can auto-restart monitor, detect crash loops, and run repair-agent.
111
+ # Auto-start sentinel whenever openfleet starts (default: disabled)
112
+ # CODEX_MONITOR_SENTINEL_AUTO_START=true
113
+ # Auto-restart monitor when sentinel detects monitor down/crash (default: 1)
114
+ # SENTINEL_AUTO_RESTART_MONITOR=true
115
+ # Crash-loop threshold within rolling window (default: 3)
116
+ # SENTINEL_CRASH_LOOP_THRESHOLD=3
117
+ # Crash-loop window in minutes (default: 10)
118
+ # SENTINEL_CRASH_LOOP_WINDOW_MIN=10
119
+ # Treat monitor deaths shortly after startup as rapid crashes (default: 45s)
120
+ # SENTINEL_MONITOR_START_GRACE_SEC=45
121
+ # Enable autonomous repair-agent when crash-loop is detected (default: 1)
122
+ # SENTINEL_REPAIR_AGENT_ENABLED=true
123
+ # Cooldown between repair-agent runs in minutes (default: 15)
124
+ # SENTINEL_REPAIR_COOLDOWN_MIN=15
125
+ # Repair-agent timeout in minutes (default: 20)
126
+ # SENTINEL_REPAIR_TIMEOUT_MIN=20
127
+ # Enable direct primary-agent fallback for commands while monitor is down (default: 1)
128
+ # SENTINEL_PRIMARY_AGENT_FALLBACK_ENABLED=true
129
+ # Fallback agent timeout in minutes (default: 15)
130
+ # SENTINEL_PRIMARY_AGENT_TIMEOUT_MIN=15
131
+ # Backoff before monitor restart attempts in seconds (default: 5)
132
+ # SENTINEL_RESTART_BACKOFF_SEC=5
133
+ # After manual /stop, suppress auto-restart for this many minutes (default: 10)
134
+ # SENTINEL_MANUAL_STOP_HOLD_MIN=10
135
+ # In devmode, validate monitor-monitor freshness before restart decisions (default: 1)
136
+ # SENTINEL_MONITOR_MONITOR_CHECK_ENABLED=true
137
+ # Max acceptable monitor-monitor age in minutes (default: 20)
138
+ # SENTINEL_MONITOR_MONITOR_MAX_AGE_MIN=20
139
+
140
+ # ─── Notification Batching (RECOMMENDED) ─────────────────────────────────────
141
+ # Batch notifications into periodic summaries instead of spamming individual messages
142
+ # TELEGRAM_BATCH_NOTIFICATIONS=true
143
+ # Batch interval in seconds - send summary every N seconds (default: 300 = 5 min)
144
+ # TELEGRAM_BATCH_INTERVAL_SEC=300
145
+ # Max messages before forcing a flush (default: 50)
146
+ # TELEGRAM_BATCH_MAX_SIZE=50
147
+ # Priority threshold for immediate delivery: 1=critical only, 2=critical+errors (default: 1)
148
+ # TELEGRAM_IMMEDIATE_PRIORITY=1
149
+
150
+ # ─── Presence & Multi-Instance Coordination ──────────────────────────────────
151
+ # Presence heartbeat allows discovering multiple openfleet instances.
152
+ # Heartbeat interval in seconds (default: 60)
153
+ # TELEGRAM_PRESENCE_INTERVAL_SEC=60
154
+ # Consider instances offline after this many seconds (default: 180)
155
+ # TELEGRAM_PRESENCE_TTL_SEC=180
156
+ # Disable presence heartbeats entirely (default: false)
157
+ # TELEGRAM_PRESENCE_DISABLED=false
158
+ # Send presence messages silently without notification sound (default: false)
159
+ # TELEGRAM_PRESENCE_SILENT=false
160
+ # Only send when state changes, not on every heartbeat (default: true)
161
+ # TELEGRAM_PRESENCE_ONLY_ON_CHANGE=true
162
+ # Chat/channel for presence messages (required to enable presence announcements)
163
+ # TELEGRAM_PRESENCE_CHAT_ID=
164
+ # Instance ID (auto-generated stable ID across restarts if not set)
165
+ # VE_INSTANCE_ID=
166
+ # Human-friendly instance label shown in /presence (default: workspace name)
167
+ # VE_INSTANCE_LABEL=
168
+ # Coordinator election priority - lower wins (default: 10 for coordinators, 100 for workspaces)
169
+ # VE_COORDINATOR_PRIORITY=
170
+ # Opt out of coordinator election (default: true)
171
+ # VE_COORDINATOR_ELIGIBLE=true
172
+
173
+ # ─── WhatsApp Channel (Optional) ──────────────────────────────────────────────
174
+ # Optional WhatsApp channel for receiving commands and notifications.
175
+ # Uses @whiskeysockets/baileys for WhatsApp Web multi-device API.
176
+ # Install baileys: npm install @whiskeysockets/baileys qrcode-terminal
177
+ # Then authenticate: openfleet --whatsapp-auth
178
+ # Enable WhatsApp channel (default: disabled)
179
+ # WHATSAPP_ENABLED=false
180
+ # Restrict to a specific chat JID (recommended for security)
181
+ # WHATSAPP_CHAT_ID=1234567890@s.whatsapp.net
182
+ # Bot name prefix for outbound messages (default: project name)
183
+ # WHATSAPP_ASSISTANT_NAME=VirtEngine
184
+ # Auth/session data directory (default: .cache/whatsapp-store)
185
+ # WHATSAPP_STORE_DIR=.cache/whatsapp-store
186
+ # Phone number for pairing code auth (digits only, with country code)
187
+ # WHATSAPP_PHONE_NUMBER=12025551234
188
+
189
+ # ─── Container Isolation (Optional) ──────────────────────────────────────────
190
+ # Run agent tasks inside containers for security isolation.
191
+ # Supports Docker, Podman, or Apple Container (macOS).
192
+ # Enable container isolation (default: disabled)
193
+ # CONTAINER_ENABLED=false
194
+ # Container runtime: docker | podman | container (macOS Apple Container)
195
+ # CONTAINER_RUNTIME=docker
196
+ # Container image for agent execution
197
+ # CONTAINER_IMAGE=node:22-slim
198
+ # Agent execution timeout in ms (default: 1800000 = 30 min)
199
+ # CONTAINER_TIMEOUT_MS=1800000
200
+ # Max output size per container in bytes (default: 10485760 = 10MB)
201
+ # CONTAINER_MAX_OUTPUT_SIZE=10485760
202
+ # Max concurrent containers (default: 3)
203
+ # MAX_CONCURRENT_CONTAINERS=3
204
+ # Resource limits (Docker/Podman only)
205
+ # CONTAINER_MEMORY_LIMIT=4g
206
+ # CONTAINER_CPU_LIMIT=2
207
+
208
+ # ─── Orchestrator Script ──────────────────────────────────────────────────────
209
+ # Path to the orchestrator script (Bash, PowerShell, or any CLI).
210
+ # Auto-detected from common locations if not set.
211
+ # ORCHESTRATOR_SCRIPT=./orchestrator.sh
212
+
213
+ # Arguments passed to the orchestrator script (space-separated).
214
+ # ORCHESTRATOR_ARGS=-MaxParallel 6 -WaitForMutex
215
+
216
+ # ─── Executor Configuration ──────────────────────────────────────────────────
217
+ # Define AI executors that work on tasks.
218
+ # Format: EXECUTOR_TYPE:VARIANT:WEIGHT,EXECUTOR_TYPE:VARIANT:WEIGHT
219
+ # Example: COPILOT:CLAUDE_OPUS_4_6:50,CODEX:DEFAULT:50
220
+ # For full config, use openfleet.config.json instead.
221
+ # EXECUTORS=CODEX:DEFAULT:100
222
+
223
+ # Task distribution mode: "weighted" | "round-robin" | "primary-only"
224
+ # EXECUTOR_DISTRIBUTION=weighted
225
+
226
+ # ─── Failover Configuration ──────────────────────────────────────────────────
227
+ # What happens when an executor fails repeatedly.
228
+ # Strategy: "next-in-line" | "weighted-random" | "round-robin"
229
+ # FAILOVER_STRATEGY=next-in-line
230
+ # Max retries before switching executor
231
+ # FAILOVER_MAX_RETRIES=3
232
+ # Minutes to disable an executor after consecutive failures
233
+ # FAILOVER_COOLDOWN_MIN=5
234
+ # Disable executor after N consecutive failures
235
+ # FAILOVER_DISABLE_AFTER=3
236
+
237
+ # ─── Internal Executor ───────────────────────────────────────────────────────
238
+ # Controls whether tasks are executed locally via agent-pool instead of
239
+ # (or alongside) VK's cloud executor. Modes:
240
+ # "vk" — all tasks via VK executor (default, existing behavior)
241
+ # "internal" — all tasks via local agent-pool (bypass wrapper orchestrator script)
242
+ # "hybrid" — both VK and internal run simultaneously for overflow
243
+ # EXECUTOR_MODE=vk
244
+ # Max concurrent agent slots for internal executor (default: 3)
245
+ # INTERNAL_EXECUTOR_PARALLEL=3
246
+ # INTERNAL_EXECUTOR_BASE_BRANCH_PARALLEL=0
247
+ # How often to poll kanban for new tasks in ms (default: 30000)
248
+ # INTERNAL_EXECUTOR_POLL_MS=30000
249
+ # SDK to use: "auto" | "codex" | "copilot" | "claude" (default: auto)
250
+ # INTERNAL_EXECUTOR_SDK=auto
251
+ # Timeout per task execution in ms (default: 5400000 = 90 min)
252
+ # INTERNAL_EXECUTOR_TIMEOUT_MS=5400000
253
+ # Max retries per task (default: 2)
254
+ # INTERNAL_EXECUTOR_MAX_RETRIES=2
255
+ # Override project ID for polling (auto-detected by default)
256
+ # INTERNAL_EXECUTOR_PROJECT_ID=
257
+ # Enable/disable review handoff agent for completed task PRs (default: enabled)
258
+ # INTERNAL_EXECUTOR_REVIEW_AGENT_ENABLED=true
259
+ # Review agent max concurrent reviews (default: 2)
260
+ # INTERNAL_EXECUTOR_REVIEW_MAX_CONCURRENT=2
261
+ # Review agent timeout per review run in ms (default: 300000)
262
+ # INTERNAL_EXECUTOR_REVIEW_TIMEOUT_MS=300000
263
+ # Experimental autonomous backlog replenishment (disabled by default)
264
+ # INTERNAL_EXECUTOR_REPLENISH_ENABLED=false
265
+ # Minimum follow-up tasks to generate per completed task (1-2)
266
+ # INTERNAL_EXECUTOR_REPLENISH_MIN_NEW_TASKS=1
267
+ # Maximum follow-up tasks to generate per completed task (1-3)
268
+ # INTERNAL_EXECUTOR_REPLENISH_MAX_NEW_TASKS=2
269
+ # Require explicit priority for generated tasks (default: true)
270
+ # INTERNAL_EXECUTOR_REPLENISH_REQUIRE_PRIORITY=true
271
+ # Project requirements profile used by planner/replenishment prompts
272
+ # Allowed: simple-feature | feature | large-feature | system | multi-system
273
+ # PROJECT_REQUIREMENTS_PROFILE=feature
274
+ # Optional free-form constraints/scoping notes
275
+ # PROJECT_REQUIREMENTS_NOTES=
276
+
277
+ # ─── Kanban Backend ──────────────────────────────────────────────────────────
278
+ # Task-board backend:
279
+ # internal - local task-store source of truth (recommended primary)
280
+ # vk - Vibe-Kanban (secondary adapter)
281
+ # github - GitHub Issues
282
+ # jira - Jira Issues
283
+ # KANBAN_BACKEND=internal
284
+ # Sync behavior:
285
+ # internal-primary - internal task-store remains source-of-truth (recommended)
286
+ # bidirectional - external status updates can mutate internal task status
287
+ # KANBAN_SYNC_POLICY=internal-primary
288
+ # Optional explicit kanban project ID (overrides backend auto-detection)
289
+ # KANBAN_PROJECT_ID=
290
+ # For GitHub Issues backend, set owner/repo (or GITHUB_REPOSITORY)
291
+ # GITHUB_REPO_OWNER=your-org
292
+ # GITHUB_REPO_NAME=your-repo
293
+ # GITHUB_REPOSITORY=your-org/your-repo or GITHUB_REPO=your-org/your-repo
294
+ # GitHub task source mode:
295
+ # issues - only create/list issues
296
+ # kanban - create/list issues and auto-link them into a GitHub Project
297
+ # GITHUB_PROJECT_MODE=issues
298
+ # GitHub Project owner/title/number used when GITHUB_PROJECT_MODE=kanban
299
+ # GITHUB_PROJECT_OWNER=your-org
300
+ # GITHUB_PROJECT_TITLE=OpenFleet
301
+ # GITHUB_PROJECT_NUMBER=3
302
+ # GitHub Project v2 status field name mapping (customize to match your board columns)
303
+ # GITHUB_PROJECT_STATUS_TODO=Todo
304
+ # GITHUB_PROJECT_STATUS_INPROGRESS=In Progress
305
+ # GITHUB_PROJECT_STATUS_INREVIEW=In Review
306
+ # GITHUB_PROJECT_STATUS_DONE=Done
307
+ # GITHUB_PROJECT_STATUS_CANCELLED=Cancelled
308
+ # Auto-sync task status to project board when updating via openfleet (default: true)
309
+ # GITHUB_PROJECT_AUTO_SYNC=true
310
+ # GitHub webhook endpoint (served by ui-server.mjs) for project item updates
311
+ # GITHUB_PROJECT_WEBHOOK_PATH=/api/webhooks/github/project-sync
312
+ # Shared secret used to validate X-Hub-Signature-256 (recommended in production)
313
+ # GITHUB_PROJECT_WEBHOOK_SECRET=
314
+ # Require webhook signature validation (default: true if secret is set)
315
+ # GITHUB_PROJECT_WEBHOOK_REQUIRE_SIGNATURE=true
316
+ # Alert threshold for consecutive webhook/sync failures
317
+ # GITHUB_PROJECT_SYNC_ALERT_FAILURE_THRESHOLD=3
318
+ # Alert threshold for accumulated sync rate-limit events
319
+ # GITHUB_PROJECT_SYNC_RATE_LIMIT_ALERT_THRESHOLD=3
320
+ # Default assignee for newly created tasks (defaults to authenticated gh user)
321
+ # GITHUB_DEFAULT_ASSIGNEE=
322
+ # Auto-assign task creator/login when creating issues (default: true)
323
+ # GITHUB_AUTO_ASSIGN_CREATOR=true
324
+ # Codex task scoping label policy (only matching labels are picked by openfleet)
325
+ # CODEX_MONITOR_TASK_LABEL=openfleet
326
+ # CODEX_MONITOR_TASK_LABELS=openfleet,codex-mointor
327
+ # CODEX_MONITOR_ENFORCE_TASK_LABEL=true
328
+ # Optional issue fetch cap per sync/poll cycle (default: 1000)
329
+ # GITHUB_ISSUES_LIST_LIMIT=1000
330
+
331
+ # Jira backend (KANBAN_BACKEND=jira)
332
+ # Jira Cloud site URL (no trailing slash)
333
+ # JIRA_BASE_URL=https://your-domain.atlassian.net
334
+ # Jira user email + API token (Basic auth: email:token)
335
+ # JIRA_EMAIL=you@example.com
336
+ # JIRA_API_TOKEN=
337
+ # Default Jira project key and issue type used for task creation/listing
338
+ # JIRA_PROJECT_KEY=ENG
339
+ # JIRA_ISSUE_TYPE=Task
340
+ # Optional parent issue key when using sub-task issue type
341
+ # JIRA_SUBTASK_PARENT_KEY=ENG-1
342
+ # Default assignee account ID for new Jira tasks
343
+ # JIRA_DEFAULT_ASSIGNEE=5b10a2844c20165700ede21g
344
+ # Jira workflow status mapping (openfleet status -> Jira status name)
345
+ # JIRA_STATUS_TODO=To Do
346
+ # JIRA_STATUS_INPROGRESS=In Progress
347
+ # JIRA_STATUS_INREVIEW=In Review
348
+ # JIRA_STATUS_DONE=Done
349
+ # JIRA_STATUS_CANCELLED=Cancelled
350
+ # Jira labels used for shared-state lifecycle flags
351
+ # JIRA_LABEL_CLAIMED=codex:claimed
352
+ # JIRA_LABEL_WORKING=codex:working
353
+ # JIRA_LABEL_STALE=codex:stale
354
+ # JIRA_LABEL_IGNORE=codex:ignore
355
+ # Jira task scoping labels (only tasks with these labels are picked up)
356
+ # JIRA_TASK_LABELS=openfleet,codex-mointor
357
+ # JIRA_ENFORCE_TASK_LABEL=true
358
+ # Jira issue fetch cap per sync/poll cycle (default: 250)
359
+ # JIRA_ISSUES_LIST_LIMIT=250
360
+ # Use Atlassian Document Format when writing comments (default: true)
361
+ # JIRA_USE_ADF_COMMENTS=true
362
+ # Jira custom fields used for shared-state persistence
363
+ # (leave unset if using structured comment fallback)
364
+ # JIRA_CUSTOM_FIELD_OWNER_ID=customfield_10042
365
+ # JIRA_CUSTOM_FIELD_ATTEMPT_TOKEN=customfield_10043
366
+ # JIRA_CUSTOM_FIELD_ATTEMPT_STARTED=customfield_10044
367
+ # JIRA_CUSTOM_FIELD_HEARTBEAT=customfield_10045
368
+ # JIRA_CUSTOM_FIELD_RETRY_COUNT=customfield_10046
369
+ # JIRA_CUSTOM_FIELD_IGNORE_REASON=customfield_10047
370
+ # JIRA_CUSTOM_FIELD_BASE_BRANCH=customfield_10049
371
+ # Optional JSON custom field to store full shared state payload
372
+ # JIRA_CUSTOM_FIELD_SHARED_STATE=customfield_10048
373
+
374
+ # ─── Sandbox Policy ──────────────────────────────────────────────────────────
375
+ # Controls agent sandbox isolation when using Codex SDK.
376
+ # Options:
377
+ # "workspace-write" — Permissive writes within workspace/worktree (recommended default)
378
+ # "danger-full-access" — Full host filesystem access (use only when required)
379
+ # "read-only" — Agent cannot write to any files
380
+ # CODEX_SANDBOX=workspace-write
381
+
382
+ # ─── Codex Feature Flags ─────────────────────────────────────────────────────
383
+ # Controls which Codex CLI features are enabled in config.toml during setup.
384
+ # All default to "true" (enabled). Set to "false" to disable a specific feature.
385
+ # CODEX_FEATURES_CHILD_AGENTS_MD=true # Sub-agent discovery via CODEX.md (KEY for sub-agents)
386
+ # CODEX_FEATURES_MEMORY_TOOL=true # Persistent memory across sessions
387
+ # CODEX_FEATURES_UNDO=true # Undo/rollback support
388
+ # CODEX_FEATURES_COLLAB=true # Collaboration mode
389
+ # CODEX_FEATURES_COLLABORATION_MODES=true # Mode selection for collaboration
390
+ # CODEX_FEATURES_STEER=true # Steering/guidance
391
+ # CODEX_FEATURES_APPS=true # ChatGPT Apps integration
392
+ # CODEX_FEATURES_BWRAP=true # Bubblewrap sandbox (disable if bwrap userns is blocked)
393
+ # CODEX_FEATURES_SHELL_TOOL=true # Shell tool access
394
+
395
+ # ─── Codex Sandbox Permissions ───────────────────────────────────────────────
396
+ # Comma-separated list of sandbox permission entries for config.toml.
397
+ # Default: "disk-full-write-access"
398
+ # CODEX_SANDBOX_PERMISSIONS=disk-full-write-access
399
+
400
+ # Workspace-write sandbox roots (comma-separated). Defaults to repo parent/root.
401
+ # Include your repo and its .git directory if git operations fail.
402
+ # CODEX_SANDBOX_WRITABLE_ROOTS=/home/jon/repos,/home/jon/repos/virtengine/.git
403
+
404
+ # ─── Codex Shell Environment Policy ─────────────────────────────────────────
405
+ # Controls which env vars are inherited by Codex sandbox.
406
+ # Options: "all" (inherit everything), "none", or custom policy
407
+ # CODEX_SHELL_ENV_POLICY=all
408
+
409
+ # ─── Codex Agent Limits ──────────────────────────────────────────────────────
410
+ # Max concurrent agent threads per Codex session (overrides default 6).
411
+ # CODEX_AGENT_MAX_THREADS=12
412
+
413
+ # ─── Copilot Sub-Agent / Parallel ────────────────────────────────────────────
414
+ # Disable parallel tool execution (sub-agent-like concurrency) in Copilot CLI.
415
+ # Default: parallel is ENABLED. Set to "true" to disable.
416
+ # COPILOT_DISABLE_PARALLEL_TOOLS=false
417
+ # Additional MCP config path for fleet/task sub-agent MCP servers
418
+ # COPILOT_ADDITIONAL_MCP_CONFIG=
419
+
420
+ # ─── Daemon Mode ──────────────────────────────────────────────────────────────
421
+ # Run openfleet as a background daemon:
422
+ # openfleet --daemon Start detached daemon
423
+ # openfleet --stop-daemon Stop running daemon
424
+ # openfleet --daemon-status Check if daemon is running
425
+ # Optional: keep sentinel always-on alongside monitor
426
+ # openfleet --daemon --sentinel
427
+ # PID file: .cache/openfleet.pid
428
+ # Logs: logs/daemon.log
429
+ # Daemon crash supervision (monitor child):
430
+ # CODEX_MONITOR_DAEMON_RESTART_DELAY_MS=5000
431
+ # CODEX_MONITOR_DAEMON_MAX_RESTARTS=0 # 0 = unlimited
432
+ # Consider any crash within this window as an instant startup failure (default: 15000)
433
+ # CODEX_MONITOR_DAEMON_INSTANT_CRASH_WINDOW_MS=15000
434
+ # Stop auto-restarts after this many instant failures in a row (default: 3)
435
+ # CODEX_MONITOR_DAEMON_MAX_INSTANT_RESTARTS=3
436
+
437
+ # ─── Vibe-Kanban ──────────────────────────────────────────────────────────────
438
+ # Base URL for the Vibe-Kanban API (default: http://127.0.0.1:54089)
439
+ VK_BASE_URL=http://127.0.0.1:54089
440
+ # Alternate endpoint URL for VK (overrides VK_BASE_URL if set)
441
+ # VK_ENDPOINT_URL=http://127.0.0.1:54089
442
+ # Port for vibe-kanban API (default: 54089)
443
+ VK_RECOVERY_PORT=54089
444
+ # Host for VK recovery (default: 0.0.0.0)
445
+ # VK_RECOVERY_HOST=0.0.0.0
446
+ # VK_HOST=0.0.0.0
447
+ # Public URL shown in Telegram links (optional)
448
+ # VK_PUBLIC_URL=https://kanban.yoursite.com
449
+ # VK_WEB_URL=https://kanban.yoursite.com
450
+ # VK HTTP timeout/retry controls (used by ve-kanban.ps1)
451
+ # VK_HTTP_TIMEOUT_SEC=45
452
+ # VK_HTTP_RETRIES=2
453
+ # VK_HTTP_RETRY_DELAY_MS=1500
454
+ # Set to true to prevent the monitor from spawning vibe-kanban automatically
455
+ # VK_NO_SPAWN=false
456
+ # Cooldown minutes between VK recovery attempts (default: 10)
457
+ # VK_RECOVERY_COOLDOWN_MIN=10
458
+ # VK health check interval in ms (default: 60000)
459
+ # VK_ENSURE_INTERVAL=60000
460
+ # VK project name (auto-detected)
461
+ # VK_PROJECT_NAME=my-project
462
+ # Explicit VK project/repo IDs (auto-detected if empty)
463
+ # VK_PROJECT_ID=
464
+ # VK_REPO_ID=
465
+ # Override task URL template (optional)
466
+ # VK_TASK_URL_TEMPLATE=https://kanban.yoursite.com/projects/{projectId}/tasks/{taskId}
467
+
468
+ # ─── Shared Workspace Registry ───────────────────────────────────────────────
469
+ # Optional registry path for shared workspace leasing
470
+ # VE_SHARED_WORKSPACE_REGISTRY=.cache/openfleet/shared-workspaces.json
471
+ # Optional audit log path for shared workspace leasing
472
+ # VE_SHARED_WORKSPACE_AUDIT_LOG=.cache/openfleet/shared-workspace-audit.jsonl
473
+ # Default lease TTL in minutes (Telegram claims); can override with seconds below
474
+ # VE_WORKSPACE_LEASE_TTL_MIN=120
475
+ # Default lease TTL in seconds (converted to minutes if set)
476
+ # VE_WORKSPACE_LEASE_TTL_SEC=7200
477
+ # Default owner name for CLI/Telegram claims (falls back to USER/USERNAME)
478
+ # VE_WORKSPACE_OWNER=your-name
479
+
480
+ # ─── GitHub ───────────────────────────────────────────────────────────────────
481
+ # Repository slug for PR links (default: auto-detected from git remote)
482
+ # GITHUB_REPO=your-org/your-repo
483
+ # Custom GitHub URL base for links
484
+ # GITHUB_REPO_URL=https://github.com/your-org/your-repo
485
+ # GitHub API token for PR lookups when gh is unavailable (any of these work)
486
+ # GITHUB_TOKEN=
487
+ # GH_TOKEN=
488
+ # GITHUB_PAT=
489
+ # Owner/repo for gh CLI in ve-kanban
490
+ # GH_OWNER=virtengine
491
+ # GH_REPO=virtengine
492
+ # Target branch for PR checks/merge (default: origin/main)
493
+ # VK_TARGET_BRANCH=origin/main
494
+ # Default upstream/base branch for openfleet tasks (overrides VK_TARGET_BRANCH)
495
+ # CODEX_MONITOR_TASK_UPSTREAM=origin/ve/openfleet-generic
496
+
497
+ # ─── Codex / AI Provider ─────────────────────────────────────────────────────
498
+ # The Codex SDK uses OpenAI-compatible configuration that has been setup in ~/.codex/config.toml -
499
+ # you do not need to set env variables here if config is already setup.
500
+ # Set these to use a different model or provider.
501
+ # OPENAI_API_KEY=
502
+ # AZURE_OPENAI_API_KEY=
503
+ # OPENAI_BASE_URL=https://api.openai.com/v1
504
+ # CODEX_MODEL=gpt-4o
505
+ #
506
+ # Optional profile-based model/provider switching (single Codex config, multiple presets):
507
+ # CODEX_MODEL_PROFILE=xl
508
+ # CODEX_MODEL_PROFILE_SUBAGENT=m
509
+ # CODEX_MODEL_PROFILE_XL_PROVIDER=openai
510
+ # CODEX_MODEL_PROFILE_XL_MODEL=gpt-5.3-codex
511
+ # CODEX_MODEL_PROFILE_XL_BASE_URL=
512
+ # CODEX_MODEL_PROFILE_XL_API_KEY=
513
+ # CODEX_MODEL_PROFILE_M_PROVIDER=openai
514
+ # CODEX_MODEL_PROFILE_M_MODEL=gpt-5.1-codex-mini
515
+ # CODEX_MODEL_PROFILE_M_BASE_URL=
516
+ # CODEX_MODEL_PROFILE_M_API_KEY=
517
+ # CODEX_SUBAGENT_MODEL=gpt-5.1-codex-mini
518
+ # Agent transport selector: auto | sdk | cli
519
+ # CODEX_TRANSPORT=sdk
520
+ # Set to true to disable all Codex/AI features (analysis, autofix, shell)
521
+ # CODEX_SDK_DISABLED=false
522
+
523
+ # Primary agent adapter: codex-sdk | copilot-sdk | claude-sdk
524
+ # PRIMARY_AGENT=codex-sdk
525
+ # Set to true to disable the primary agent adapter
526
+ # PRIMARY_AGENT_DISABLED=false
527
+
528
+ # ─── Agent Pool ──────────────────────────────────────────────────────────────
529
+ # Which SDK the ephemeral agent pool uses for concurrent operations.
530
+ # Defaults to PRIMARY_AGENT value, then falls back through available SDKs.
531
+ # IMPORTANT: single value only (codex | copilot | claude).
532
+ # Do NOT use separators like "|" or "," (unsupported).
533
+ # AGENT_POOL_SDK=copilot
534
+ # Default model for agent pool threads (empty = use SDK default).
535
+ # Note: agent-pool currently resolves model primarily from SDK-specific env vars
536
+ # (for example CODEX_MODEL / COPILOT_MODEL / CLAUDE_MODEL), not a multi-value list.
537
+ # AGENT_POOL_MODEL=
538
+
539
+ # ─── Agent Hooks (Codex / Claude / Copilot) ─────────────────────────────────
540
+ # Setup can scaffold shared hook configs in:
541
+ # .codex/hooks.json
542
+ # .claude/settings.local.json
543
+ # .github/hooks/openfleet.hooks.json
544
+ #
545
+ # Hook profile for setup/non-interactive runs:
546
+ # strict | balanced | lightweight | none
547
+ # CODEX_MONITOR_HOOK_PROFILE=strict
548
+ #
549
+ # Which agents should receive generated hook files (comma-separated):
550
+ # codex,claude,copilot
551
+ # CODEX_MONITOR_HOOK_TARGETS=codex,claude,copilot
552
+ #
553
+ # Set to false to skip hook scaffolding during setup.
554
+ # CODEX_MONITOR_HOOKS_ENABLED=true
555
+ # Set to true to overwrite existing generated hook files.
556
+ # CODEX_MONITOR_HOOKS_OVERWRITE=false
557
+ # Optional overrides for generated bridge command tokens.
558
+ # Defaults are portable across workstations:
559
+ # node scripts/openfleet/agent-hook-bridge.mjs
560
+ # CODEX_MONITOR_HOOK_NODE_BIN=node
561
+ # CODEX_MONITOR_HOOK_BRIDGE_PATH=scripts/openfleet/agent-hook-bridge.mjs
562
+ #
563
+ # Optional per-event command overrides (separate multiple commands with ';;').
564
+ # Use value 'none' to disable that event in generated .codex/hooks.json.
565
+ # CODEX_MONITOR_HOOK_PREPUSH=go vet ./...;;go build ./...
566
+ # CODEX_MONITOR_HOOK_PRECOMMIT=gofmt -l .
567
+ # CODEX_MONITOR_HOOK_TASK_COMPLETE=echo \"task completed\"
568
+ # CODEX_MONITOR_HOOK_SESSION_START=echo \"session start\"
569
+ # CODEX_MONITOR_HOOK_SESSION_STOP=echo \"session stop\"
570
+ #
571
+ # Built-in hook behavior inside openfleet runtime:
572
+ # force (default), auto, off
573
+ # CODEX_MONITOR_HOOKS_BUILTINS_MODE=force
574
+ # CODEX_MONITOR_HOOKS_DISABLE_PREPUSH=false
575
+ # CODEX_MONITOR_HOOKS_DISABLE_TASK_COMPLETE=false
576
+ # CODEX_MONITOR_HOOKS_DISABLE_HEALTH_CHECK=false
577
+
578
+ # Force hooks to fire even for non-managed sessions (debug only):
579
+ # CODEX_MONITOR_HOOKS_FORCE=false
580
+
581
+ # VE_MANAGED is auto-set by openfleet at startup. Agent hook bridge
582
+ # scripts check for this and exit silently if not present, preventing
583
+ # hooks from firing in standalone Copilot/Codex/Claude sessions.
584
+
585
+ # ─── Devmode Monitor-Monitor (24/7 reliability guardian) ───────────────────
586
+ # Prompt is injected directly from openfleet source (no .github/agents file required).
587
+ # Enabled by default in devmode source checkouts. Set to false to disable.
588
+ # DEVMODE_MONITOR_MONITOR_ENABLED=true
589
+ # Poll interval for monitor-monitor runs (milliseconds). Default: 300000 (5 min)
590
+ # DEVMODE_MONITOR_MONITOR_INTERVAL_MS=300000
591
+ # Status stream update interval (milliseconds). Default: 1800000 (30 min)
592
+ # DEVMODE_MONITOR_MONITOR_STATUS_INTERVAL_MS=1800000
593
+ # Per-run timeout before watchdog abort/failover (milliseconds).
594
+ # Default is 21600000 (6h) for long-running reliability analysis sessions.
595
+ # 30 minutes (1800000) is safe if you prefer faster failover on stuck runs.
596
+ # Watchdog abort triggers at timeout+60s, then accelerated force-reset at +120s.
597
+ # Set this explicitly to avoid inherited shell
598
+ # defaults (for example DEVMODE_AUTO_CODE_FIX_TIMEOUT_MS=300000).
599
+ # DEVMODE_MONITOR_MONITOR_TIMEOUT_MS=1800000
600
+ # Optional timeout bounds (applied only when set):
601
+ # DEVMODE_MONITOR_MONITOR_TIMEOUT_MIN_MS=600000
602
+ # DEVMODE_MONITOR_MONITOR_TIMEOUT_MAX_MS=7200000
603
+ # Optional override for Claude tool access (comma-separated)
604
+ # DEVMODE_MONITOR_MONITOR_CLAUDE_ALLOWED_TOOLS=Read,Write,Edit,Grep,Glob,Bash,WebSearch,Task,Skill
605
+ # Legacy alias: DEVMODE_AUTO_CODE_FIX=true also enables this subsystem.
606
+ # Legacy timeout fallback: if DEVMODE_MONITOR_MONITOR_TIMEOUT_MS is unset and
607
+ # DEVMODE_AUTO_CODE_FIX_TIMEOUT_MS is set, monitor-monitor will use it (and
608
+ # still apply DEVMODE_MONITOR_MONITOR_TIMEOUT_MIN_MS/MAX_MS bounds if provided).
609
+
610
+ # ─── Copilot SDK (Primary Agent) ─────────────────────────────────────────────
611
+ # Requires GitHub Copilot CLI installed and authenticated.
612
+ # Set to true to disable Copilot SDK (primary agent) usage.
613
+ # COPILOT_SDK_DISABLED=false
614
+ # Override model (used by Copilot shell + background task-executor agent-pool sessions)
615
+ # COPILOT_MODEL=gpt-5
616
+ # Optional: profile-based overrides (model, reasoning effort, MCP config)
617
+ # COPILOT_PROFILE=default
618
+ # COPILOT_PROFILE_DEFAULT_MODEL=gpt-5
619
+ # COPILOT_PROFILE_DEFAULT_REASONING_EFFORT=high
620
+ # COPILOT_PROFILE_DEFAULT_MCP_CONFIG=.vscode/mcp.json
621
+ # COPILOT_PROFILE_DEFAULT_MCP_SERVERS={"context7":{"command":"npx","args":["-y","@upstash/context7-mcp"]}}
622
+ # Transport selector: auto | sdk | cli | url
623
+ # COPILOT_TRANSPORT=sdk
624
+ #
625
+ # Session mode: local | remote | auto
626
+ # "local" (default): CLI runs as local subprocess via stdio — FULL model access
627
+ # (gpt-5.3-codex, claude-sonnet-4.5, etc.), MCP tools, sub-agents.
628
+ # "remote": Connect to external server via cliUrl (may have restricted models/tools).
629
+ # "auto": Let the SDK decide (falls back to local when no cliUrl is set).
630
+ # COPILOT_SESSION_MODE=local
631
+ # Auto-approve Copilot SDK permission requests in automated runs (default: true)
632
+ # Set to false to require explicit approval callbacks.
633
+ # COPILOT_AUTO_APPROVE_PERMISSIONS=true
634
+ # Force spawned Copilot CLI sessions to allow all tools/paths/urls.
635
+ # Default behavior enables this automatically when auto-approve is enabled.
636
+ # COPILOT_ALLOW_ALL=true
637
+ # Optional: point to Copilot CLI binary or server
638
+ # COPILOT_CLI_PATH=copilot
639
+ # COPILOT_CLI_URL=http://127.0.0.1:8888
640
+ # Optional: pass MCP server config (JSON string or path)
641
+ # COPILOT_MCP_SERVERS={"github":{"type":"http","url":"https://api.githubcopilot.com/mcp/"}}
642
+ # COPILOT_MCP_CONFIG=.vscode/mcp.json
643
+ #
644
+ # ── Copilot Experimental & Autonomy ─────────────────────────────────────────
645
+ # Experimental mode is ON by default in SDK sessions. This enables:
646
+ # - /fleet command (parallel sub-agent dispatch for large tasks)
647
+ # - Autopilot mode (autonomous agent operation)
648
+ # - Persisted permissions across sessions
649
+ # - Subagent compaction (context management)
650
+ # - Session cleanup commands
651
+ # Set to true to DISABLE experimental features:
652
+ # COPILOT_NO_EXPERIMENTAL=false
653
+ #
654
+ # Auto-approve all permissions (tools, paths, URLs) — equivalent to --allow-all / --yolo.
655
+ # ON by default for autonomous operation. Set to true to DISABLE:
656
+ # COPILOT_NO_ALLOW_ALL=false
657
+ #
658
+ # Re-enable the ask_user tool (agent can ask questions and block for input).
659
+ # OFF by default for full autonomy (--no-ask-user). Set to true to ENABLE:
660
+ # COPILOT_ENABLE_ASK_USER=false
661
+ #
662
+ # Reasoning effort for models that support it: low | medium | high | xhigh
663
+ # COPILOT_REASONING_EFFORT=high
664
+ # Max requests per Copilot agent session (used for generated workspace settings)
665
+ # COPILOT_AGENT_MAX_REQUESTS=500
666
+ #
667
+ # Enable ALL GitHub MCP tools (extended toolset beyond defaults):
668
+ # COPILOT_ENABLE_ALL_GITHUB_MCP_TOOLS=true
669
+ #
670
+ # Disable built-in MCP servers (use only custom-configured ones):
671
+ # COPILOT_DISABLE_BUILTIN_MCPS=false
672
+
673
+ # ── Auth Passthrough (Copilot) ──────────────────────────────────────────────
674
+ # The shell automatically detects authentication from multiple sources:
675
+ # 1. COPILOT_CLI_TOKEN / GITHUB_TOKEN / GH_TOKEN / GITHUB_PAT (highest priority)
676
+ # 2. gh CLI authentication (gh auth status)
677
+ # 3. SDK default auth flow
678
+ # Provide a token to skip interactive login:
679
+ # COPILOT_CLI_TOKEN=gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
680
+ # GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
681
+ # GH_TOKEN=your-github-personal-access-token
682
+ # GITHUB_PAT=your-github-personal-access-token
683
+
684
+ # ─── Claude Agent SDK (Claude Code) ─────────────────────────────────────────
685
+ # Set to true to disable Claude SDK features
686
+ # CLAUDE_SDK_DISABLED=false
687
+ # CLAUDE_MODEL=claude-opus-4-6
688
+ # Transport selector: auto | sdk | cli
689
+ # CLAUDE_TRANSPORT=sdk
690
+ # CLAUDE_PERMISSION_MODE=bypassPermissions
691
+ # CLAUDE_MAX_TURNS=0
692
+ # CLAUDE_INCLUDE_PARTIAL=false
693
+ # CLAUDE_ALLOWED_TOOLS=Read,Write,Edit,Grep,Glob,Bash,WebSearch,Task,Skill
694
+
695
+ # ── Auth Passthrough (Claude) ───────────────────────────────────────────────
696
+ # The shell automatically detects authentication from multiple sources:
697
+ # 1. ANTHROPIC_API_KEY / CLAUDE_API_KEY / CLAUDE_KEY (highest priority)
698
+ # 2. ~/.config/claude/config.json
699
+ # 3. SDK prompt (if no auth found)
700
+ # Provide an API key to skip interactive prompts:
701
+ # ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
702
+ # CLAUDE_API_KEY=your-anthropic-api-key
703
+ # CLAUDE_KEY=your-anthropic-api-key
704
+ # ─── Merge Strategy (Codex-powered PR decision engine) ───────────────────────
705
+ # When a task completes, analyze the agent's output via Codex SDK to decide:
706
+ # merge_after_ci_pass, prompt (agent), close_pr, re_attempt, manual_review, wait
707
+ # Set to "false" to disable (default: enabled when Codex is enabled)
708
+ # CODEX_ANALYZE_MERGE_STRATEGY=true
709
+ # Timeout for merge strategy analysis in milliseconds (default: 600000 = 10 min)
710
+ # MERGE_STRATEGY_TIMEOUT_MS=600000
711
+
712
+ # ─── Autofix Mode ────────────────────────────────────────────────────────────
713
+ # How autofix behaves when errors are detected:
714
+ # "auto" - (default) detect from environment (dev source = execute, npm = analyze)
715
+ # "execute" - force execute mode: actually applies fixes to disk
716
+ # "analyze" - force analyze mode: only sends suggestions, never modifies files
717
+ # AUTOFIX_MODE=auto
718
+
719
+ # ─── Task Planner ────────────────────────────────────────────────────────────
720
+ # Auto-trigger task planner when backlog-per-slot drops below threshold
721
+ TASK_PLANNER_PER_CAPITA_THRESHOLD=1
722
+ # Auto-trigger when idle slots meet/exceed threshold
723
+ TASK_PLANNER_IDLE_SLOT_THRESHOLD=1
724
+ # De-duplication window in hours
725
+ TASK_PLANNER_DEDUP_HOURS=6
726
+
727
+ # ─── Task Complexity Routing ─────────────────────────────────────────────────
728
+ # Automatically select AI models based on task size labels [xs]/[s]/[m]/[l]/[xl]/[xxl].
729
+ # Enabled by default. Set to false/0 to disable and use the profile's default model.
730
+ COMPLEXITY_ROUTING_ENABLED=true
731
+ #
732
+ # Override specific tier models (format: COMPLEXITY_ROUTING_{EXECUTOR}_{TIER}_{FIELD}):
733
+ # COMPLEXITY_ROUTING_CODEX_LOW_MODEL=gpt-5.1-codex-mini
734
+ # COMPLEXITY_ROUTING_CODEX_LOW_VARIANT=GPT51_CODEX_MINI
735
+ # COMPLEXITY_ROUTING_CODEX_LOW_REASONING=low
736
+ # COMPLEXITY_ROUTING_CODEX_MEDIUM_MODEL=gpt-5.2-codex
737
+ # COMPLEXITY_ROUTING_CODEX_MEDIUM_VARIANT=DEFAULT
738
+ # COMPLEXITY_ROUTING_CODEX_HIGH_MODEL=gpt-5.1-codex-max
739
+ # COMPLEXITY_ROUTING_CODEX_HIGH_VARIANT=GPT51_CODEX_MAX
740
+ # COMPLEXITY_ROUTING_COPILOT_LOW_MODEL=haiku-4.5
741
+ # COMPLEXITY_ROUTING_COPILOT_MEDIUM_MODEL=sonnet-4.5
742
+ # COMPLEXITY_ROUTING_COPILOT_HIGH_MODEL=opus-4.6
743
+
744
+ # ─── Shared Cloud Workspaces ────────────────────────────────────────────────
745
+ # Registry file for shared workspace leasing (default: .cache/openfleet/shared-workspaces.json)
746
+ # VE_SHARED_WORKSPACE_REGISTRY=
747
+ # Audit log file for claim/release events (default: .cache/openfleet/shared-workspace-audit.jsonl)
748
+ # VE_SHARED_WORKSPACE_AUDIT_LOG=
749
+
750
+ # ─── CI Sweep (Orchestrator) ─────────────────────────────────────────────────
751
+ # Trigger CI sweep after N completed tasks (0 disables)
752
+ # VE_CI_SWEEP_EVERY=15
753
+ # Backup trigger after N merged PRs on main (0 disables)
754
+ # VE_CI_SWEEP_PR_EVERY=15
755
+ # Enable PR-based backup trigger
756
+ # VE_CI_SWEEP_PR_BACKUP=true
757
+ # Disable Copilot cloud triggers when rate-limited
758
+ # COPILOT_CLOUD_DISABLE_ON_RATE_LIMIT=true
759
+ # COPILOT_CLOUD_COOLDOWN_MIN=60
760
+ # Cooldown duration (minutes) when Copilot rate limit is detected in PR comments
761
+ # COPILOT_RATE_LIMIT_COOLDOWN_MIN=120
762
+ # Force-disable Copilot cloud triggers (PR comments/issues)
763
+ # Set to true to prevent @copilot PR comments, issue assignments, and CI sweeps via cloud.
764
+ # Default: true (disabled) — enable explicitly by setting to false.
765
+ COPILOT_CLOUD_DISABLED=true
766
+ # COPILOT_CLOUD_DISABLED_UNTIL=2026-02-07T12:00:00Z
767
+ # Local resolution strategy when Copilot cloud is disabled: "agent" or "codex"
768
+ # COPILOT_LOCAL_RESOLUTION=agent
769
+ # Wait for orchestrator mutex instead of exiting when another instance runs
770
+ # VE_ORCHESTRATOR_WAIT_FOR_MUTEX=true
771
+ # ─── Completed Task Archive ────────────────────────────────────────────────
772
+ # Enable/disable automatic completed task archival (default: true)
773
+ # VE_COMPLETED_TASK_ARCHIVE_ENABLED=true
774
+ # Only archive tasks completed more than N hours ago (default: 24)
775
+ # VE_COMPLETED_TASK_ARCHIVE_AGE_HOURS=24
776
+ # Minimum minutes between archive runs (default: 30)
777
+ # VE_COMPLETED_TASK_ARCHIVE_INTERVAL_MIN=30
778
+ # Max tasks to archive per run (default: 200)
779
+ # VE_COMPLETED_TASK_ARCHIVE_MAX=200
780
+ # Dry run (no deletes/writes) for validation
781
+ # VE_COMPLETED_TASK_ARCHIVE_DRY_RUN=false
782
+ # Allow smartPR to recreate PRs even if a closed PR already exists for the branch
783
+ # VE_SMARTPR_ALLOW_RECREATE_CLOSED=0
784
+
785
+ # ─── Git Identity (optional) ─────────────────────────────────────────────────
786
+ # Override git author for automated commits
787
+ # VE_GIT_AUTHOR_NAME=Codex Monitor
788
+ # VE_GIT_AUTHOR_EMAIL=bot@yoursite.com
789
+
790
+ # ─── Task Planner ─────────────────────────────────────────────────────────────
791
+ # How to plan new tasks when backlog is empty:
792
+ # "kanban" - (default) create a VK planning task for an agent to refine
793
+ # "codex-sdk" - run Codex SDK directly to generate tasks
794
+ # "disabled" - do nothing, wait for manual task creation
795
+ # TASK_PLANNER_MODE=kanban
796
+ # Task planner status stream interval (milliseconds). Default: 1800000 (30 min)
797
+ # DEVMODE_TASK_PLANNER_STATUS_INTERVAL_MS=1800000
798
+
799
+ # ─── GitHub Issue Reconciler ─────────────────────────────────────────────────
800
+ # Periodically reconciles open GitHub issues against open/merged PRs.
801
+ # Hybrid close policy:
802
+ # - closes issues linked by `Closes/Fixes/Resolves #N` OR ve/<N>-* merged branch
803
+ # - keeps tracking/meta issues open
804
+ # - marks issues inreview when matching open PR exists
805
+ # GH_RECONCILE_ENABLED=true
806
+ # GH_RECONCILE_INTERVAL_MS=300000
807
+ # GH_RECONCILE_MERGED_LOOKBACK_HOURS=72
808
+ # GH_RECONCILE_TRACKING_LABELS=tracking
809
+
810
+ # ─── Prompt Overrides (.openfleet/agents) ────────────────────────────────
811
+ # openfleet scaffolds generic prompt templates under:
812
+ # .openfleet/agents/*.md
813
+ # Files in that folder are loaded automatically and are intended for per-project customization.
814
+ # You can also override any prompt path explicitly with env vars:
815
+ # CODEX_MONITOR_PROMPT_PLANNER=.openfleet/agents/task-planner.md
816
+ # CODEX_MONITOR_PROMPT_MONITOR_MONITOR=.openfleet/agents/monitor-monitor.md
817
+ # CODEX_MONITOR_PROMPT_TASK_EXECUTOR=.openfleet/agents/task-executor.md
818
+ # CODEX_MONITOR_PROMPT_REVIEWER=.openfleet/agents/reviewer.md
819
+ # CODEX_MONITOR_PROMPT_SDK_CONFLICT_RESOLVER=.openfleet/agents/sdk-conflict-resolver.md
820
+
821
+ # ─── Dependabot / Bot PR Auto-Merge ───────────────────────────────────────────
822
+ # Auto-merge Dependabot (and other bot) PRs after all CI checks pass.
823
+ # Set to 1/true to enable, 0/false to disable. Default: true (enabled).
824
+ # DEPENDABOT_AUTO_MERGE=true
825
+ # How often (in minutes) to check for mergeable bot PRs. Default: 10.
826
+ # DEPENDABOT_AUTO_MERGE_INTERVAL_MIN=10
827
+ # Merge method: squash (default), merge, or rebase.
828
+ # DEPENDABOT_MERGE_METHOD=squash
829
+ # Comma-separated list of PR authors to auto-merge.
830
+ # DEPENDABOT_AUTHORS=dependabot[bot],app/dependabot
831
+
832
+ # ─── Stale Task Recovery ─────────────────────────────────────────────────────
833
+ # Tasks stuck in "inprogress" or "inreview" with no active branch/PR are
834
+ # automatically moved back to "todo" so another agent can pick them up.
835
+ # Age threshold (hours) for immediate recovery — tasks older than this
836
+ # with no branch/PR are moved to todo on the first check (no strikes needed).
837
+ # Default: 3 hours.
838
+ # STALE_TASK_AGE_HOURS=3
839
+
840
+ # Persistent recovery cache (reduces repeated scans/log spam after restarts).
841
+ # Cache entries are invalidated when task updated_at changes.
842
+ # Set to false to disable persistence (in-memory only).
843
+ # RECOVERY_CACHE_ENABLED=true
844
+ # Max entries to keep per recovery cache section.
845
+ # RECOVERY_CACHE_MAX=2000
846
+ # Suppress repeated "no attempt found" logs for this many minutes.
847
+ # RECOVERY_LOG_DEDUP_MINUTES=30
848
+
849
+ # Task claim stale-owner reclaim (multi-agent coordination)
850
+ # Reclaim claim when owner appears offline/stale for this long (ms).
851
+ # TASK_CLAIM_OWNER_STALE_TTL_MS=600000
852
+ # Renew active claim while agent is running (ms).
853
+ # TASK_CLAIM_RENEW_INTERVAL_MS=300000
854
+
855
+ # ─── Merge Strategy / Conflict Resolution ────────────────────────────────────
856
+ # Merge strategy mode: "smart" or "smart+codexsdk" (enables Codex conflict resolution)
857
+ # MERGE_STRATEGY_MODE=smart
858
+ # Codex conflict resolution timeout in ms
859
+ # MERGE_CONFLICT_RESOLUTION_TIMEOUT_MS=600000
860
+
861
+ # ─── Advanced ─────────────────────────────────────────────────────────────────
862
+ # Override openfleet config directory (where .env and config live)
863
+ # CODEX_MONITOR_DIR=/path/to/scripts/openfleet
864
+ # Max orchestrator restarts (0 = unlimited)
865
+ # MAX_RESTARTS=0
866
+ # Restart delay in milliseconds
867
+ # RESTART_DELAY_MS=10000
868
+ # Max parallel task slots
869
+ # MAX_PARALLEL=6
870
+ # Repository root (auto-detected from git; setup writes this)
871
+ # REPO_ROOT=/path/to/repo
872
+ # Watch path to trigger restarts (default: script path)
873
+ # WATCH_PATH=/path/to/ve-orchestrator.sh
874
+ # Monitor source hot-reload watcher. Default: enabled in devmode, disabled otherwise.
875
+ # Set to true to force-enable monitor source hot-restart, false to force-disable.
876
+ # SELF_RESTART_WATCH_ENABLED=true
877
+ # Status file path (default: .cache/ve-orchestrator-status.json)
878
+ # STATUS_FILE=.cache/ve-orchestrator-status.json
879
+ # Log directory (default: ./logs)
880
+ # LOG_DIR=./logs
881
+ # Max total log folder size in MB. Oldest logs are deleted when exceeded. 0 = unlimited.
882
+ # LOG_MAX_SIZE_MB=500
883
+ # How often to check log folder size in minutes. 0 = startup only.
884
+ # LOG_CLEANUP_INTERVAL_MIN=30
885
+
886
+ # Telegram notification verbosity (default: summary)
887
+ # minimal = critical + errors only (priority 1-2)
888
+ # summary = everything except debug (priority 1-4)
889
+ # detailed = everything including debug (priority 1-5)
890
+ # TELEGRAM_VERBOSITY=summary
891
+
892
+ # ─── Agent Work Logging & Analytics ───────────────────────────────────────────
893
+ # Capture all agent work to structured logs for real-time monitoring and offline analysis.
894
+ # Enables error loop detection, stuck agent alerts, and performance analytics.
895
+ # Enable/disable agent work logging (default: true)
896
+ # AGENT_WORK_LOGGING_ENABLED=true
897
+ # Enable/disable live stream analyzer (default: true)
898
+ # AGENT_WORK_ANALYZER_ENABLED=true
899
+ # Log directory (default: .cache/agent-work-logs)
900
+ # AGENT_WORK_LOG_DIR=.cache/agent-work-logs
901
+ # Session log retention count - keep last N session transcripts (default: 100)
902
+ # AGENT_SESSION_LOG_RETENTION=100
903
+ # Max log size in MB before rotation (default: 500)
904
+ # AGENT_WORK_LOG_MAX_SIZE_MB=500
905
+
906
+ # ── Detection Thresholds ────────────────────────────────────────────────────
907
+ # Alert after N repeated errors in 10-minute window (default: 4)
908
+ # AGENT_ERROR_LOOP_THRESHOLD=4
909
+ # Alert after N rapid tool calls in 1-minute window (default: 10)
910
+ # AGENT_TOOL_LOOP_THRESHOLD=10
911
+ # Alert if agent idle for N milliseconds (default: 300000 = 5 min)
912
+ # AGENT_STUCK_THRESHOLD_MS=300000
913
+ # Alert if session costs more than $N (default: 1.0)
914
+ # AGENT_COST_ANOMALY_THRESHOLD=1.0