You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
LineCode Pro v2.1.1
版本信息
版本名称: v2.1.1
版本号: 50
v2.1.1
English
Sub agents
Parallel asynchronous sub-agent runtime - SubAgentRegistry replaces the synchronous NestedAgentRunner bridge: every dispatch owns a real conversation row and a full ChatController, so transcripts persist, compaction works and sessions run concurrently (one single-threaded loop per agent, no shared locks); the agent tool returns a handle immediately and delivers the final output through the runtime event inbox.
Persistent, messageable sessions - persistent=true creates a revivable session that accepts follow-up messages and whose mutating tools route their approvals to the root approval panel; the default one-shot run stays read-only, auto-confirmed and greyed out in the UI.
Session management tools - new agent_list, agent_send and agent_wait tools track and drive sessions: agent_send revives a finished agent in its existing conversation or queues the message in a running agent's inbox (never silently dropped), agent_wait blocks until any session changes status (default 30 s, max 300 s), and completion notices are announced exactly once.
Required workspace binding - the spawn tool now requires workspace, resolved relative to the caller's root through the same containment as the file tools; empty, absolute, escaping and non-directory paths are rejected before a session is created, . and relative paths inside the sub agent resolve to the bound directory, the binding is persisted and reused on revive, and remote (SSH / terminal-provider) workspaces accept only . and keep inheriting the parent root.
Conversation-scoped sessions - every session records its spawning conversation; the header chip, drawer list, session picker and the agent tools only show the current chat's sessions, a brand-new chat shows none, and agent_send / restore refuse sessions that belong to another conversation.
Restart-safe session identity - restore() reattaches to the session's original conversation and restores the seq counter instead of opening a fresh one; records still marked RUNNING/WAITING_INPUT when the process died become INTERRUPTED and revive on the next message, and pre-v15 agent conversations are migrated into records on first load.
Root message channel - agent_message_root lets a sub agent post a progress note or question to the parent inbox without ending its turn; the parent reads it as a hidden user message at its next input point.
Real tools inside sub agents - transient sessions may mutate when the permission mode is auto (they cannot ask for approval otherwise), so shell and file tools are present in the default mode; persistent sessions keep approval-routed writes, and file tools stay local-only by workspace policy, so remote sessions use shell for file work.
Conversations and interface
Agent session switcher - the chat header and the workspace drawer header gain a bot chip with the live sub-agent count, hidden when the viewed conversation has no sessions; it opens a picker with the root conversation plus one row per sub agent and its status, and the drawer keeps its own agent list.
Non-interrupting conversation switching - switching chats while a turn runs renders the target conversation immediately (the view snapshot is published before the controller goes detached), the running turn keeps writing to its own conversation, the composer shows a busy-elsewhere hint while sending is blocked, the write target is handed back when the background turn ends, and the drawer shows a progress spinner instead of the delete action for the running conversation.
Compact agent cards - agent tool cards follow the file/shell pattern: one status row with the bot glyph and a human summary, no ring and no id pills; four semantic icons (spawn / send / wait / list) plus the notify icon select the renderer, expanded bodies show the task, message, wait window or a readable "name · status" list, while the model still receives the raw id/status lines.
Composer constraints - transient agents lock the composer with a one-shot hint, the model pill is disabled in every agent view because model switching stays root-only, and the interrupted session state has its own label.
Fixes
Agent tools in remote workspaces - enabling Agents in SSH or terminal-provider mode used to filter agent_<slug> / agent_list / agent_send / agent_wait out of the tool list because the family still declared needsLocalWorkspace() == true from the retired synchronous bridge; the family is workspace-agnostic now and AgentToolsRemoteTest pins the contract.
Tool copy corrections - the remote shell group is labelled "Shell" instead of "SSH Shell" (it serves both SSH and the terminal provider), local and remote shell descriptions share the same concise wording in en/zh/ru, and the terminal-provider card now points at associated launch (autostart) as the usual cause of a failed connection test.
Architecture
Timeline events - ToolLoopEngine.Listener's eleven callbacks collapse into one Consumer<TimelineEvent> over an immutable hierarchy (TurnStarted, TextDelta, ReasoningDelta, AssistantCompleted, ToolCompleted, NoticeInjected, ConfirmationRequired, TurnFinished, TurnFailed, BudgetExceeded, Retry); ChatLoopBridge posts every event onto SerialEvents, so the feature layer still mutates state only inside the drain.
Unified runtime inbox - every asynchronous input now arrives as a RuntimeEvent (ShellNotice, AgentTurnCompleted, AgentMessage, AgentNeedsInput, AgentFailed, WorkspaceChanged, UserMessage) through the owner-scoped RuntimeInbox; AgentEventBus owns root and per-agent queues, the engine drains at the same three injection points (turn start, after a tool batch, after a final answer), background-shell notices join the same stream, only the final agent output is announced (truncated at 32 K), and an idle root is woken by a non-empty inbox after each finished turn.
Data and persistence
Conversation kinds and session storage - schema v14 adds conversations.kind (user / agent / agent_transient) and parent_id, schema v15 adds the agent_sessions table, and both migrate through the idempotent DDL replay; ConversationStore.list() returns user conversations only, and archive format v3 carries agent_sessions while v1/v2 archives still import.
Documentation and engineering
Formal English Javadoc - every type, constructor, method and non-obvious constant across all modules, :app and the legacy :ipc/:terminal-provider sources carries a formal English Javadoc comment; the change is comment-only (stripped-token comparison against the previous tree shows no code edits), and the documented :app shell budget moves from 1,500 to 1,800 lines to pay for the mandatory per-method Javadoc.
Dead pipeline remnants retired - the unused PIPELINE icon, glyph mapping, renderer, approval icon, preview sample and test assertion plus the seven message_agent_pipeline_* strings are gone.
Gradle wrapper - the distribution URL moves from the Tencent mirror to services.gradle.org; the pinned SHA-256 checksum is unchanged.
AGENT.md and thread guard - AGENT.md documents the timeline event stream, the runtime event inbox, the lock-free parallel sub-agent runtime, approval routing and the schema/archive versions; the retired NestedAgentRunner exemption is removed from the sanctioned blocking-thread list.
Tests
New coverage: AgentToolsTest (required workspace, subdirectory binding, absolute/escaping/missing-path rejection, persistent sessions, remote parity), AgentToolsRemoteTest, RuntimeEventTest (hidden-notice rendering with the 32 K truncation), SqliteAgentSessionStoreTest, SqliteConversationStoreTest (kind separation and a v13-shaped database reopening as user conversations), SubAgentRecoveryTest (stale RUNNING/WAITING_INPUT becomes INTERRUPTED); ToolLoopEngineTest gains inbox aggregation and keep-alive coverage, and ToolRenderersTest, LearningContextProviderTest and SourceHygieneTest are updated.
Release
Version 2.1.1 (versionCode 50); the release workflow builds and publishes both the slim and local variants.