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
+2 -9
View File
@@ -1,5 +1,6 @@
import { tool } from "../tool.js";
import { getInternalBridgeConfig } from "../internalBridge.js";
import { taskPublicationDiagramSchema } from "./task-publication-schema.js";
export default tool({
description: "Publish an evidence-backed investigation report. No todo or execution plan is required. An optional Mermaid diagram explains the investigation to people; it never schedules or completes work. Before proposing actions publish an interim concluded report, then publish a final report referencing the actual actions. Missing critical data ends the round with final insufficient_data and blocking gaps, no recommendations or pending items. Query failures are execution errors, not proof that data is absent. The run lifecycle endpoint settles execution independently of the diagram.",
@@ -25,15 +26,7 @@ export default tool({
evidence_refs: tool.schema.array(tool.schema.string()),
blocking: tool.schema.boolean(),
})),
diagram: tool.schema.object({
title: tool.schema.string(),
mermaid: tool.schema.string().describe("Mermaid flowchart source, no Markdown fences, initialization directives or click callbacks"),
node_refs: tool.schema.array(tool.schema.object({
node_id: tool.schema.string(), label: tool.schema.string(),
evidence_refs: tool.schema.array(tool.schema.string()),
action_refs: tool.schema.array(tool.schema.string()),
})),
}).nullable().optional(),
diagram: taskPublicationDiagramSchema.nullish(),
}),
evidence: tool.schema.array(tool.schema.object({
evidence_id: tool.schema.string(),