feat(server): integrate MCP queries and investigation messaging
Add project-bound OAuth MCP queries and controlled analysis with scoped evidence, limits, timeouts and a nearby-model spatial query using EPSG:4326 inputs. Default nearby searches to 200 meters and five results. Integrate investigation messaging/presentation, health/readiness and typed history; remove duplicate web search and fix online simulation and compressed baseline writes. Include project migrations 023-025; keep local credentials and demo seeding excluded. Validation: 319 focused pytest checks; real PostGIS temporary-table regression; read-only Jinqian bridge radius comparison; cross-language MCP discovery/calls.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
-- Additive MCP storage. Apply through the existing project database workflow.
|
||||
-- No access token, refresh token or OAuth client secret is stored here.
|
||||
BEGIN;
|
||||
CREATE TABLE IF NOT EXISTS workbench.mcp_query_contexts (
|
||||
context_handle text PRIMARY KEY,
|
||||
project_id uuid NOT NULL,
|
||||
subject text NOT NULL,
|
||||
client_id text NOT NULL,
|
||||
document jsonb NOT NULL,
|
||||
expires_at timestamptz NOT NULL,
|
||||
revoked_at timestamptz,
|
||||
created_at timestamptz NOT NULL DEFAULT now()
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS mcp_query_context_owner
|
||||
ON workbench.mcp_query_contexts (project_id,subject,client_id);
|
||||
CREATE INDEX IF NOT EXISTS mcp_query_context_expiry
|
||||
ON workbench.mcp_query_contexts (project_id,expires_at);
|
||||
CREATE TABLE IF NOT EXISTS workbench.mcp_query_receipts (
|
||||
project_id uuid NOT NULL,
|
||||
scope_key text NOT NULL,
|
||||
call_id text NOT NULL,
|
||||
parameters jsonb NOT NULL,
|
||||
result jsonb NOT NULL,
|
||||
created_at timestamptz NOT NULL DEFAULT now(),
|
||||
PRIMARY KEY (project_id,scope_key,call_id)
|
||||
);
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user