文件最后提交记录最后更新时间
refactor(always-on): remove legacy web execution path, rewire retry through DiscoveryFire The old web-driven Always-On path (discovery trigger → auto-poll → web chat execution) raced with the DiscoveryFire pipeline, causing duplicate plan executions. This commit removes the entire legacy path: - Add alwaysOnRerunPlan gateway RPC so the UI retry button triggers DiscoveryFire phases 2-4 (workspace → execution → report) directly - Remove MainContent auto-poll, discovery trigger handler, execution lifecycle tracking, and all associated refs/callbacks/useEffects - Delete queueExecution, updateExecution, buildExecutionPrompt from DiscoveryPlanService and the PATCH execution REST endpoint - Unregister /ao slash command; delete alwaysOnSlashActions.ts - Delete discovery-trigger-client.js and its WS handler in index.js - Delete old web discovery prompt and utility files - Remove approvalMode field from WebPlanRecord, UI types, i18n, tests Co-authored-by: Cursor <cursoragent@cursor.com> 7 天前
refactor(always-on): introduce Work Cycle as first-class entity for Apply/Archive Workspace ownership moves from individual plans to Work Cycles. Apply and Archive now operate at the cycle level, aligning the product model with the underlying single-workspace-per-project constraint. Key changes: - New WorkCycleRecord type and WorkCycleStore (CRUD + lazy migration) - DiscoveryFire: ensureAlwaysOnWorkspace → ensureActiveWorkCycle - Gateway/CLI: applyPlan → applyCycle (workCycleId replaces planId) - Web service: per-plan apply/archive replaced by cycle-level methods - UI: plans grouped under cycle headers with cycle-level action buttons - Tests updated across all affected modules (141 pass, 0 fail) Co-authored-by: Cursor <cursoragent@cursor.com> 12 天前
refactor(always-on): remove legacy web execution path, rewire retry through DiscoveryFire The old web-driven Always-On path (discovery trigger → auto-poll → web chat execution) raced with the DiscoveryFire pipeline, causing duplicate plan executions. This commit removes the entire legacy path: - Add alwaysOnRerunPlan gateway RPC so the UI retry button triggers DiscoveryFire phases 2-4 (workspace → execution → report) directly - Remove MainContent auto-poll, discovery trigger handler, execution lifecycle tracking, and all associated refs/callbacks/useEffects - Delete queueExecution, updateExecution, buildExecutionPrompt from DiscoveryPlanService and the PATCH execution REST endpoint - Unregister /ao slash command; delete alwaysOnSlashActions.ts - Delete discovery-trigger-client.js and its WS handler in index.js - Delete old web discovery prompt and utility files - Remove approvalMode field from WebPlanRecord, UI types, i18n, tests Co-authored-by: Cursor <cursoragent@cursor.com> 7 天前
feat(always-on): implement Gateway-native Always-On module - Add src/always-on with protocol, config, contracts, runtime, workspace, storage, and tool subpackages per docs/always-on/02 design. - Wire alwaysOn into PolitConfig + loadPolitConfig; politdeck server boots AlwaysOnRuntime, injects extra tools and per-session cwd/permissionMode overrides through createLocalGateway. - Single isolated workspace per project: state.currentWorkspace tracks the handle; ensureAlwaysOnWorkspace reuses it across fires; runtime never auto-disposes (user manually rm to reset). - Discovery and execution turns both run inside the workspace cwd; execution turn is pinned to bypassPermissions with assertWorkspaceCwdSafe. - Discovery prompt now embeds workspace cwd, strategy, and the project's PolitDeck chat transcript directory. - Lease is reverse-only: no_fresh_lease and workspace_capacity gates removed; agent_busy / recent_user_msg only fire when a lease exists. - Workspace config trimmed: maxConcurrentEnvs / retainSuccessfulEnvs / retainFailedEnvs flagged as ALWAYS_ON_FIELD_REMOVED diagnostics. - Add tests/always-on covering config, gates, contracts, state store, ensureAlwaysOnWorkspace, channel leases, and config loader integration. Co-authored-by: Cursor <cursoragent@cursor.com> 24 天前
refactor(always-on): remove legacy web execution path, rewire retry through DiscoveryFire The old web-driven Always-On path (discovery trigger → auto-poll → web chat execution) raced with the DiscoveryFire pipeline, causing duplicate plan executions. This commit removes the entire legacy path: - Add alwaysOnRerunPlan gateway RPC so the UI retry button triggers DiscoveryFire phases 2-4 (workspace → execution → report) directly - Remove MainContent auto-poll, discovery trigger handler, execution lifecycle tracking, and all associated refs/callbacks/useEffects - Delete queueExecution, updateExecution, buildExecutionPrompt from DiscoveryPlanService and the PATCH execution REST endpoint - Unregister /ao slash command; delete alwaysOnSlashActions.ts - Delete discovery-trigger-client.js and its WS handler in index.js - Delete old web discovery prompt and utility files - Remove approvalMode field from WebPlanRecord, UI types, i18n, tests Co-authored-by: Cursor <cursoragent@cursor.com> 7 天前
refactor: rename Polit/PolitDeck to Pilot/PilotDeck across entire codebase Automated global rename covering all case variants: - PolitDeck → PilotDeck, politdeck → pilotdeck, POLITDECK → PILOTDECK - Polit → Pilot, polit → pilot, POLIT → PILOT, politDeck → pilotDeck Includes: - 648 content replacements across 200+ source files - 24 file renames + 3 directory renames (src/polit→pilot, tests/polit→pilot, docs/polit-config→pilot-config) - package.json name, bin, env vars updated - package-lock.json regenerated - "Politely" in server-manager.ts preserved via placeholder mechanism - All 587 unit tests pass, tsc --noEmit clean - E2E tests verified against real OpenRouter API (model, tool-use, context, lifecycle hooks) Co-authored-by: Cursor <cursoragent@cursor.com> 24 天前
fix(always-on): multi-project runtime and real session-busy gate The single AlwaysOnRuntime was bound to process.cwd(), causing a permanent projectKey mismatch when the enabled project lived elsewhere. Introduce AlwaysOnManager to spawn one runtime per enabled project, wire isSessionInFlight through SessionRouter.hasActiveUserTurn so the agent_busy gate reflects actual user turns, and persist execution events via appendRunEvent in DiscoveryFire. Co-authored-by: Cursor <cursoragent@cursor.com> 19 天前
fix(always-on): exclude interactive tools from unattended agent sessions Always-On phases run with canPrompt:false but still exposed enter_plan_mode, exit_plan_mode, and ask_user_question to the model. These tools either block (waiting for elicitation with no listener) or counterproductively switch into plan mode. Filter them out at session creation time via a new SessionConfigOverride.excludeTools field. Co-authored-by: Cursor <cursoragent@cursor.com> 13 天前
feat(always-on): implement Gateway-native Always-On module - Add src/always-on with protocol, config, contracts, runtime, workspace, storage, and tool subpackages per docs/always-on/02 design. - Wire alwaysOn into PolitConfig + loadPolitConfig; politdeck server boots AlwaysOnRuntime, injects extra tools and per-session cwd/permissionMode overrides through createLocalGateway. - Single isolated workspace per project: state.currentWorkspace tracks the handle; ensureAlwaysOnWorkspace reuses it across fires; runtime never auto-disposes (user manually rm to reset). - Discovery and execution turns both run inside the workspace cwd; execution turn is pinned to bypassPermissions with assertWorkspaceCwdSafe. - Discovery prompt now embeds workspace cwd, strategy, and the project's PolitDeck chat transcript directory. - Lease is reverse-only: no_fresh_lease and workspace_capacity gates removed; agent_busy / recent_user_msg only fire when a lease exists. - Workspace config trimmed: maxConcurrentEnvs / retainSuccessfulEnvs / retainFailedEnvs flagged as ALWAYS_ON_FIELD_REMOVED diagnostics. - Add tests/always-on covering config, gates, contracts, state store, ensureAlwaysOnWorkspace, channel leases, and config loader integration. Co-authored-by: Cursor <cursoragent@cursor.com> 24 天前
refactor(always-on): introduce Work Cycle as first-class entity for Apply/Archive Workspace ownership moves from individual plans to Work Cycles. Apply and Archive now operate at the cycle level, aligning the product model with the underlying single-workspace-per-project constraint. Key changes: - New WorkCycleRecord type and WorkCycleStore (CRUD + lazy migration) - DiscoveryFire: ensureAlwaysOnWorkspace → ensureActiveWorkCycle - Gateway/CLI: applyPlan → applyCycle (workCycleId replaces planId) - Web service: per-plan apply/archive replaced by cycle-level methods - UI: plans grouped under cycle headers with cycle-level action buttons - Tests updated across all affected modules (141 pass, 0 fail) Co-authored-by: Cursor <cursoragent@cursor.com> 12 天前
refactor(always-on): make workspace reuse code-driven and remove hardcoded apply strategy runWorkspacePhase now checks for an active cycle with a valid workspace on disk before starting the agent loop, eliminating redundant worktree creation. GitWorktreeProvider creates named branches (always-on/<runId>) instead of detached HEAD, and cleans them up on dispose. Apply prompts no longer prescribe a specific merge strategy—the agent chooses the best approach given the workspace branch, project root, and diff context. Co-authored-by: Cursor <cursoragent@cursor.com> 11 天前
refactor(always-on): make workspace reuse code-driven and remove hardcoded apply strategy runWorkspacePhase now checks for an active cycle with a valid workspace on disk before starting the agent loop, eliminating redundant worktree creation. GitWorktreeProvider creates named branches (always-on/<runId>) instead of detached HEAD, and cleans them up on dispose. Apply prompts no longer prescribe a specific merge strategy—the agent chooses the best approach given the workspace branch, project root, and diff context. Co-authored-by: Cursor <cursoragent@cursor.com> 11 天前