Commit Graph

19 Commits

Author SHA1 Message Date
程序员阿江(Relakkes) 0e7cecd81f fix(connectors): synchronize authorization and chat runtime readiness
Clear stale MCP authentication and discovery failures after successful connections.
Verify plugin skills and MCP tools in active chats across all connector types,
and remove stale tools using normalized server names.

Cover all 54 catalog entries with offline runtime and lifecycle regressions.
2026-09-14 14:37:59 +08:00
程序员阿江(Relakkes) a24931002d fix(mcp): enforce disabled state across active sessions 2026-09-10 18:09:43 +08:00
程序员阿江(Relakkes) 01c0dfc585 fix(mcp): preserve newer connections during stale cleanup 2026-09-07 22:53:10 +08:00
vzionv 001a62efe4 test: add MCP reconnect race coverage
Cover MCP connection-close lifecycle, automatic retry outcomes, headless reconnect and toggle flows, stale OAuth results, and MCP state replacement with deterministic mocks. Configure the headless tests with an isolated placeholder credential so they exercise no live provider.
2026-09-06 09:30:35 +08:00
vzionv 51d4a52832 fix: close stale reconnect results without racing re-enable
Stale connections closed by the disabled-state guard now go through
client.cleanup() so their caches are cleared by the close handler at
close time, never by a post-close invalidation that could hit a
connection created by a concurrent re-enable. The post-OAuth reconnect
gets the same disabled check, with the config check and disabled state
write kept synchronous (no await in between) so a later enable cannot
be overwritten by the stale OAuth result.
2026-09-06 08:59:21 +08:00
vzionv 65a9fedcfe fix: keep disabled state across in-flight reconnect results
A reconnect request that completes after the server was disabled no
longer overwrites the disabled state. Connection attempts fold into
disabled when the config no longer allows the server, closing any
fresh connection and clearing its caches; the mcp_toggle enable and
mcp_reconnect handlers apply the same check before writing their
results, and the reconnect failure path keeps disabled when the server
was disabled mid-flight.
2026-09-06 08:59:21 +08:00
vzionv b6fced9af5 refactor: unify MCP connection close handling and disable paths
A single onclose registered at connection creation now clears caches
and notifies a session-registered handler that updates AppState and
decides whether to reconnect; it is unregistered on unmount so shutdown
closes never reconnect. Disabling a connected server clears its caches
and updates AppState directly, so the disabled state never depends on
the close handler firing (headless sessions and cleanup failures
included). Queued disabled updates are dropped when the server was
re-enabled before the batch flush.
2026-09-06 08:59:20 +08:00
程序员阿江(Relakkes) ab0d89e16e fix(agents): stream child runs in shared UI 2026-08-11 14:46:28 +08:00
程序员阿江(Relakkes) 17e06146ec fix(workflows): deduplicate resumed activity runs 2026-08-10 03:36:50 +08:00
程序员阿江(Relakkes) 4fbbafa0b6 feat(agent-teams): add collaborative workbench 2026-08-08 22:48:51 +08:00
程序员阿江(Relakkes) d52f9fb646 fix(oauth): stabilize GPT streaming and agent recovery 2026-08-02 16:48:30 +08:00
程序员阿江(Relakkes) b21c63cff3 fix(cli): backport Claude Code stability fixes 2026-07-29 09:36:03 +08:00
程序员阿江(Relakkes) 7f6fdadaa3 feat(agents): add per-agent model and effort controls #1062 2026-07-21 00:16:11 +08:00
程序员阿江(Relakkes) ad2a504bba feat(permission): add Auto mode #978 2026-07-11 20:06:36 +08:00
程序员阿江(Relakkes) c2355205dc fix(agent): stabilize background task continuations
Fixes #870, #884, #886.

Route backgrounded sync Agent tool activity through the same parent-tagged event path as detached agents, recover incomplete tool-use streams with the non-streaming fallback, and suppress structured-output local-agent terminal notifications from re-entering the model.

Tested: bun test src/tools/AgentTool/agentToolUtils.test.ts src/utils/taskNotificationPolicy.test.ts src/services/api/streamFallback.test.ts src/server/__tests__/proxy-streaming.test.ts

Tested: bun run check:server

Confidence: high

Scope-risk: moderate
2026-06-23 00:09:35 +08:00
程序员阿江(Relakkes) 2323e6ec47 Keep subagent progress readable in desktop sessions
Desktop sessions can receive task tools, background-agent lifecycle events, and child tool stream events in the same turn. The UI now keeps root Agent cards separate from task-management tools, preserves parent links when later stream events omit them, and surfaces completed background-agent result text from task notifications.

Constraint: Existing desktop session history can contain task-notification XML and live WS events with incomplete parent metadata.
Rejected: Render local_agent lifecycle messages as standalone cards | duplicates the Agent tool card and makes ownership unclear.
Confidence: high
Scope-risk: moderate
Directive: Do not collapse Agent and TaskCreate/TaskUpdate root tools into one generic group without checking multi-agent screenshots.
Tested: SKIP_INSTALL=1 PRESERVE_TAURI_TARGET=1 ./desktop/scripts/build-macos-arm64.sh
Tested: Real gpt-5.5 desktop E2E sessions under /tmp/cc-haha-subagent-e2e-20260519-025454 for 3 subagents, child tools, result dialog, and background Bash completion.
Not-tested: Full bun run verify gate.
2026-05-19 03:15:52 +08:00
程序员阿江(Relakkes) 0508277998 fix: keep inspector context responsive
The session inspector now asks the resumed CLI for a fast structural context estimate instead of forcing the full token-counting API path. This preserves live CLI state for system prompt, tools, MCP tools, skills, and messages while avoiding the 20s timeout that made historical sessions appear stuck or fall back to transcript-only estimates.

Constraint: Inspector requests must return quickly for third-party providers and historical resumed sessions.

Rejected: Increase the server timeout | the slow path can still block on provider token counting and keeps the UI feeling broken.

Confidence: high

Scope-risk: narrow

Directive: Keep interactive inspector context on the estimateOnly control path unless the UI explicitly supports a slow precise refresh.

Tested: bun test src/server/__tests__/conversations.test.ts -t 'structured session inspection|Sonnet 4.6 transcript usage'

Tested: cd desktop && bun run test -- --run src/i18n/index.test.tsx

Tested: cd desktop && bun run build

Tested: direct /api/sessions/:id/inspection?includeContext=1 returned live context in 0.046867s with System prompt, System tools, MCP tools, Messages

Tested: agent-browser automation verified no loading/error and visible System prompt/System tools/MCP tools/Messages

Not-tested: bare root tsc --noEmit, because current tsconfig scans existing desktop/src-tauri/target generated binary assets unrelated to this change
2026-04-28 23:05:52 +08:00
程序员阿江(Relakkes) b4142c8221 Make desktop slash commands useful outside the terminal
Desktop slash commands now separate local UI panels from CLI turn execution. The session inspector exposes status, usage, and context data from the active session, including transcript and context fallbacks, so /status, /cost, and /context can render structured desktop UI instead of raw terminal text. The inspector and help surfaces now use the existing desktop i18n catalogs for English and Chinese labels.

Constraint: Desktop read-only slash commands must not spawn duplicate CLI processes or depend on submitting a normal user turn.

Rejected: Render raw CLI command text in chat | it keeps terminal-specific layout constraints and does not fit the desktop panel UX.

Confidence: high

Scope-risk: moderate

Directive: Keep /status, /cost, and /context routed through the local inspector unless the CLI exposes a structured interactive command protocol.

Tested: cd desktop && bun run lint

Tested: cd desktop && bun test src/components/chat/composerUtils.test.ts

Tested: bun test src/server/__tests__/conversations.test.ts

Tested: cd desktop && bun run build

Tested: agent-browser smoke test on http://127.0.0.1:2024/ for /context localized inspector

Tested: git diff --check

Not-tested: Full packaged Tauri desktop build.
2026-04-28 16:38:16 +08:00
sigridjineth f5a40b86de init: add source code from src.zip 2026-03-31 01:55:58 -07:00