feat(agent): unify MCP tools and adopt Responses delivery

Move project and host queries into native MCP with host-owned OAuth/context,
while retaining memory, skills, actions and publication plugins. Add nearby-model
queries and explicit chat/task/learning model defaults.

Adopt Responses HTTP/SSE and native steer/queue inbox delivery, preserving scoped
session ownership, pending input edits and investigation communication.

Disable local-provider discovery: Server /health allowed native vLLM to probe
/v1/models on port 8000. A native before/after regression prevents recurrence.

Validation: 170 focused Bun tests; service/plugin typechecks; native discovery,
provider-discovery and input-inbox smoke checks; no paid model inference.
This commit is contained in:
2026-10-19 18:46:58 +08:00
parent f5c3cde2c2
commit 6a49d2209e
164 changed files with 12286 additions and 2368 deletions
+4 -6
View File
@@ -1,7 +1,5 @@
import { isMcpTool } from "../runtime/mcp-config.js";
// Shell and file mutation remain interactive even when ordinary read-only
// business tools are automatically approved. Static denials stay in OpenCode.
export function canAutomaticallyApprove(mode: string, action: string) {
return mode === "always" && !isMcpTool(action) && !["shell", "bash", "edit", "write", "patch", "read", "external_directory", "execute", "subagent"].includes(action);
// Called only for native "asked" events. Explicit denials and host isolation
// still run before this point; the selected round mode answers pending requests.
export function canAutomaticallyApprove(mode: string, _action: string) {
return mode === "always";
}