0.3.0 - #1162
Merged
Merged
Conversation
…ion as the first step for repository investigations
- Added a thread snapshot cache to optimize thread state retrieval and management. - Introduced functions to snapshot thread projections, retrieve snapshots, and invalidate them. - Enhanced thread actions to utilize the new snapshot cache for improved performance. - Updated chat store types to include a loading state for threads. - Added tests for thread snapshot caching behavior and limits. - Introduced new API endpoints for retrieving thread states. - Updated existing actions and tests to accommodate the new snapshot caching mechanism.
…ty for Chromium browsers
- Implemented `cancelToolCall` function in `turns.ts` to handle tool call cancellations. - Created `ToolCancellationService` to manage cancellation requests and state. - Added new endpoint for tool cancellation in `kun-endpoints.ts`. - Updated IPC schemas to include tool cancellation. - Enhanced the chat store to support tool cancellation actions. - Added UI components for cancelling tool calls in the chat interface. - Updated localization files to include new strings for tool cancellation. - Added tests for `ToolCancellationService` to ensure correct behavior. - Modified state management to handle turn abortion and tool cancellation.
…quest handling - Removed the `hydratePromptPressureIfCold` method from `LoopTelemetry` to streamline prompt pressure management. - Updated `HistoryCompactionService` to eliminate unnecessary telemetry calls. - Adjusted `effectiveOutputBudgetTokens` to ensure output capabilities are bounded by context capacity. - Enhanced tests to reflect changes in telemetry and model request behavior. - Modified UI components for better media preview handling and adjusted styles for consistency. - Updated localization strings for clarity in token usage descriptions. - Added new tests to ensure proper handling of compaction markers and model provider presets.
- Implemented timing aggregation for thread-cumulative average time-to-first-token (TTFT) and tokens-per-second (TPS) in UsageCounter. - Updated UsageCounter to handle missing timing fields as null instead of zero. - Enhanced tests for UsageCounter to validate timing aggregation across threads and reset behavior. - Introduced new fields in CoreUsageSnapshotJson for request timing metrics and averages. - Updated mapping functions to pass through timing metrics to the UI. - Added formatting functions for displaying TTFT and TPS in a user-friendly manner. - Enhanced chat projection reducer to manage per-turn timing metrics keyed by turnId. - Updated initial state and types to accommodate new timing metrics. - Added localization strings for new timing metrics in multiple languages.
…s and improve provider API key handling
…verwriting current settings
Strict OpenXML validation rejected WPS etCustomData attributes on xlsx autoFilter, so drag-drop fell back to a local tool reference. Treat Schema/undeclared vendor attrs as warnings and continue text extraction; keep edit-path validation strict. Fixes #1122 Co-authored-by: Cursor <cursoragent@cursor.com>
Fetch/import could stage models before the shared connection existed, so catalog commit failed and SSE projection dropped the local provider back to presets. Connect-then-patch missing connections, retain pending local catalogs during projection, and skip AppSettings writes while a catalog drain is in flight. Fixes #1117 Co-authored-by: Cursor <cursoragent@cursor.com>
Detached shared runtimes could leave a stale resolvedConnection after the process exited, so watchdog treated the host as unresponsive and waited through repeated health failures. Clear dead discovery PIDs from the adapter cache and re-check isChildRunning after health probes so recovery takes the missing/ensure path. Fixes #1116 Co-authored-by: Cursor <cursoragent@cursor.com>
…tests for credential preservation
…take fix(office): soft-fail WPS schema validate on intake
…pid-recovery fix(runtime): recover shared Kun when discovery PID is dead
…log-race fix(providers): keep Token Plan catalog across registry races
…liases (#1126) Recognize api.minimax.io/v1 and api.minimaxi.com/v1 for regular and Token Plan profiles alongside the existing Anthropic endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid cancelling Graph runs whose completion gates already passed when the owning Lead turn settles incidentally; resume finalization instead of force-cancel. Co-authored-by: Cursor <cursoragent@cursor.com>
…1128) Keep the 5s durable snapshot fallback, but bind Graph projection atomically per thread and project SSE through an owner-scoped observer so Lead settlement and thread switches cannot paint stale Graph state. Co-authored-by: Cursor <cursoragent@cursor.com>
…sing cmd.exe shell
…ed on Lab settings
- Implemented explore-card-copy and explore-peek-summary components for handling explore tasks. - Added utility functions to determine tool types and resolve task titles. - Enhanced message-timeline-process to recognize explore_agent as a subagent. - Updated message-timeline-empty to differentiate between explore and subagent sessions. - Created comprehensive tests for new functionalities to ensure reliability. - Updated localization files to include new strings for explore processes and UI elements.
…SubagentCallCard with conclusion handling
…sts and documentation
- Introduced support for additional Chromium browsers (Chrome Beta, Chrome Canary, Edge Beta, Edge Canary, Brave Beta, Brave Nightly) in cookie retrieval. - Added a non-sensitive diagnosis type for cookie read operations to distinguish between success, not found, and decryption failures. - Improved cookie header filtering to handle manual Cookie headers and environment variables. - Implemented caching for OpenCode Go cookies with clear and persist functionality. - Enhanced error handling to provide specific messages for Keychain access issues and missing credentials. - Updated tests to cover new cookie handling scenarios and ensure proper functionality across different platforms.
… stability, and runtime capabilities - Introduced read-only explore_agent for parallel investigations and improved session presentation. - Enhanced Agent Graph with thread ownership controls and independent SSE observers for better concurrency. - Updated Provider credential handling and model directory stability during concurrent updates. - Added tool cancellation feature and improved usage tracking metrics. - Implemented automatic updates and cleanup for a smoother upgrade process. - Ensured compatibility for Windows script execution and refined document import validation.
…s in the whiteboard panel
…for credential resolution
…on binding The plan-build side thread only persisted planBuildRunId while Main's durable admission fingerprint and capability hash were dropped before the thread record was committed, so recovery rejected the run. Production and development runtimes can also share ~/.kun/data while thread mutations only use an in-process WeakMap lock, allowing one runtime to overwrite the other's fork snapshot. - Advertise planBuildAdmissionBindingV1 in the runtime capability manifest and refuse plan-worktree creation before the worktree exists when the running Kun build does not support it - Pin the goal + first-turn admission transaction to one runtime lease (acquireRuntimeRequestLease + lease.request) instead of re-resolving per request - Serialize deterministic plan fork, goal writes, and turn admission with withManagerDataMutex so cross-process writes cannot interleave on the same thread record - Enforce planBuildRunId <-> planBuildAdmissionFingerprint <-> capability hash as a persistence invariant (ThreadSchema) while keeping a tolerant read schema so malformed legacy records remain visible for repair - Add host-only CAS backfill (PATCH thread plan-build-admission-binding) that only repairs pristine side threads whose worktree still sits on baseCommit - Surface the first prepare failure in the renderer instead of letting reconcile overwrite it with a recovered-thread projection
…p journals, peek-then-consume errors, scale board refs by intent - design_update_shapes now builds patch.textContent from loose top-level text/content aliases and always drops the aliases when textContent exists - executor persists a failed journal entry for all-invalid replay batches so canvasReplayResult returns the INVALID_OP diagnostics across remount/restart - canvas op errors use peek during composition and consume only after the turn is admitted, so a failed send keeps the diagnostics for the next try - Work whiteboard reference scales its shape cap by intent (focused 18, whole-board 64, new-board 8) instead of always attaching 64 shapes - omittedShapeCount is shapeCount - included, removing the double count
…eal canvas outcomes - design_canvas/create_screen/update_shapes return an accepted placeholder with a deterministic receiptKey instead of claiming verified success - ToolExecutionService registers pending receipts in a runtime CanvasReceiptRegistry; the loop awaits the renderer receipt (45s) before the next model request - New POST /v1/threads/:id/canvas-receipts route: renderer reports the turn-level applied/failed outcome; the registry finalizes the accepted tool result or times out to an explicit unverified result (never ok:true without a receipt) - Renderer sends a turn receipt after applying canvas ops (guarded when the preload bridge is absent); applyToolBlock extracted to apply-canvas-tool-block to keep use-apply-shape-ops-live within the 700-line boundary
…neration state Replace the session-level Code/Design mutual exclusion with per-turn surface selection: thread.agentSurface stays 'code', each turn persists its own agentSurface, and lockedTaskSurface is scoped to legacy write/design records. Runtime admission now accepts Code->Design->Code->Design and rejects only Design-profile mismatches with design_profile_locked. Register the two lock codes in the shared runtime-error contract and make deterministic 4xx rejections fail exactly once (queue terminal 'failed' state with explicit retry/delete, plus backoff/circuit-breaking for unknown outcomes). Split renderer task state into next-turn surface, profile lock, and Design-document presence so the whiteboard binding follows the document instead of the next-turn choice. Carry the full whiteboard host target (surfaceKind + workspace + threadId + documentId + boardArtifactId), render a Code icon with a Design artifact badge for mixed conversations, and add generation placeholder, in-place success replacement, actionable failure/abort state with retry, generation-aware open, first-success fit-to-content, and focus/full-width presentation with a usable minimum width. Corrects the unify-code-design-and-work OpenSpec (proposal, design, specs, tasks section 12) to the per-turn model and adds focused regressions for admission, error codes, queue governance, renderer state split, whiteboard lifecycle, and replay.
Per-turn Code/Design surface selection and whiteboard generation state (cdbf6c653).
The canvas-receipts route passes its :id URL param (the thread id) under the wrong key name, which is a type error at the call site. Rename the field to match the receiveCanvasReceipt contract.
A long running turn can emit more process items than the newest timeline page budget (300 items / 4 MiB). The page then started mid-turn, the opening user_message fell on an older page, and the renderer refused to page back while busy, so the active request and earlier history appeared missing. - Add anchorTurnId to the internal item page options; the newest page keeps the anchor turn's first real user_message pinned in front and trims the continuous window from the oldest side so the item/byte budget still holds. The cursor points at the retained window start so older pages cover the anchor and the gap without transcript gaps. - Wire the anchor through in-memory, JSONL, hybrid, and manager-backed session stores, and have the thread timeline route pass the latest turn id on the newest page (re-applied after gate healing/merging). - Renderer: resolve latestUserMessageId from the active turn's opening user message with the old reverse scan as legacy fallback. - Regression tests for paging, JSONL scan, manager passthrough, HTTP timeline, and busy-thread hydration.
… for compatibility
…hread loading Uncommitted work from unify-code-design-and-work, work-canvas receipt replay, knowledge-base end-to-end, ppt-agent direction prompts, runtime background maintenance and sidebar worktree discovery.
- ListThreadsQuery gains cursor/workspace/lean; response gains nextCursor/hasMore/total with total only on the first page - HybridThreadStore.listPage implements keyset pagination with an opaque (updatedAt,id) cursor, fetching limit+1 rows to decide hasMore - ThreadService.list delegates to listPage so filtering and pagination stay consistent for both full and paged consumers - lean projection omits heavy metadata blobs (goal/todos/systemPrompt/ knowledge mounts) from the sidebar inventory - ThreadListOptions moves from agent/types.ts to provider-types.ts next to ThreadListPage; AgentProvider gains optional listThreadsPage
…pagination - threadListStatus (idle/loading/ready/refreshing/error) guards the empty state: 'no conversations yet' only renders when ready and empty; first load shows skeleton rows, background refresh keeps the old list - startup probe fires immediately with the 900ms timer kept only as a cold-start fallback, guarded by an in-flight flag - thread-list-cache persists a lean summary to localStorage after each successful refresh so the sidebar paints instantly on next startup - loadMoreThreads appends the next older page per workspace using the runtime cursor; cursor metadata is tracked per workspace - new zh/en sidebar.json locales for skeleton, retry and show-more copy
Brings in codex/progressive-sidebar-thread-loading-7dde9aed5f: - threadListStatus state machine + skeleton rows (no false empty state) - immediate startup probe with 900ms cold-start fallback - thread-list-cache for cache-first sidebar paint - /v1/threads keyset pagination (cursor/workspace/lean) + per-workspace loadMoreThreads Conflict resolution: kept listThreadsPage calibration path with includeSide so the plan-build side filter keeps working; SidebarProjectsSection keeps both the worktree-discovery import and the SidebarThreadListStatus type.
…oard handling - Enhanced `requestCodeCanvasPanelOpen` to include a `title` property for better context. - Updated `WorkCanvasOpenRequestDetail` type to include a canonical `title`. - Added new localization strings for whiteboard title prompts and validation messages. - Removed deprecated worktree default title and description from settings localization. - Introduced experimental settings for isolated worktree builds in the lab configuration. - Updated tests to reflect changes in worktree state management and feature toggling. - Refactored whiteboard session title handling to ensure proper title normalization and validation. - Improved handling of whiteboard creation to enforce title constraints and provide fallback titles.
…e preferences - Removed legacy code for killing stale Kun processes on startup, replaced with a more robust restart mechanism for all Kun serve processes. - Updated comments and documentation to clarify the startup restart policy and its implications. - Refactored PlanBuildActions component to utilize new worktree preference store, simplifying state management and improving clarity. - Removed deprecated worktree-related features and replaced them with a prompt-managed worktree protocol for Direct builds. - Introduced a new plan worktree preference store to manage user preferences for worktree usage, including initialization and settings synchronization. - Updated localization files to reflect changes in worktree terminology and user prompts. - Enhanced tests to cover new worktree preference store functionality and ensure proper integration with existing components.
- Deleted the chat-store-plan-worktree-actions.ts file and its associated tests. - Removed references to plan worktree actions in chat-store.ts and chat-store-types.ts. - Updated runtime projection support to eliminate dependencies on plan worktree. - Adjusted thread pagination to filter out side conversations without plan build surfaces. - Modified thread queue actions to remove plan worktree input checks. - Updated plan worktree settings in app settings types for clarity. - Removed plan worktree API surface definitions and related schemas.
…ogress - Added a test to ensure loaded content fits within the canvas viewport instead of restoring a blank camera state. - Updated the canvas viewport document sync logic to handle authoritative document merging and live changes more effectively. - Improved the handling of canvas viewport state when loading documents, ensuring visible edits are preserved. - Enhanced image generation progress handling to bring generating placeholders into view when the saved camera is off-canvas. - Added functionality to replay running placeholders after the target canvas document mounts or reloads. - Updated localization files to include new settings related to code personas and migration systems in multiple languages.
- Introduced canvas-occupied-regions module to manage occupied areas on the canvas. - Updated image generation and placement functions to avoid overlapping with occupied regions. - Added tests to verify that generated images and placeholders are placed outside the design system board. - Enhanced snapshot functionality to include design system board projections as occupied regions. - Improved design system board layout management with persistent storage capabilities. - Refactored existing shape operations to utilize the new occupied regions logic for better placement accuracy.
Failed and aborted child agents discarded usage accrued before the failure, so parent-thread cost aggregates and the GUI under-reported total spend versus the provider bill (#1155). - ChildResultExecutionError now carries a usage/toolInvocations settlement payload alongside the materialized result. - createChildAgentExecutor captures usage.forThread() and tool invocations for every terminal status and attaches them to all failure throws, not only the success return. - DelegationRuntime.executeChild settles recovered usage on the failure/abort path through the same subtractChildUsage delta as the success path, so resume/retry never double-count and children that fail before any model request stay at zero. - Failed-record construction moved to buildFailedChildRecord in delegation-runtime-support to stay under the 700-line file gate. Fixes #1155
…ore bloat M1 (P0) of the issue #1156 fix plan: - Settings migration: discard a persisted createEnabled=true exactly once (createEnabledResetAt marker) so the off-by-default reaches old installs; later explicit opt-ins are respected again. - Hard per-thread cap: pruneThreadCheckpoints/pruneAllThreadCheckpoints now evict the oldest checkpoints even when messages still reference them; the create/restore reasons gain quota_exceeded and restore keeps not_found. - Global disk quota (git-checkpoint-quota.ts): maxTotalBytes (default 2 GiB) and minFreeDiskBytes (default 1 GiB) enforced before snapshot creation via evict-oldest-then-refuse, plus quota eviction on the startup cleanup pass. - Renderer: quota skips are info-logged instead of error-logged; restoring an evicted checkpoint surfaces 'rollback point expired' instead of a raw error; settings UI gains quota/free-disk inputs (MB) across all seven locales. - Extracted CheckpointSettingsPanel and startWorkspaceCheckpointSnapshot to keep settings-section-general.tsx and chat-store-thread-send-direct.ts under the 700-line gate.
Replace the sliding newest-to-oldest cumulative collapse with cache-stable checkpoints at whole multiples of the cumulative budget. The collapse boundary is now the largest multiple strictly below the raw cumulative total, a pure step function of the persisted history: appending a tool result no longer rewrites items that were previously sent verbatim, so the model-facing projection stays append-only between checkpoint advances. Each advance collapses one batch of the oldest results in a single intentional prefix-cache reset instead of invalidating the warmed prefix on every request. Fixes #1154
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.