/** * CrowdListen Harness v3 — 3 Tools * * Minimal tool surface for external AI agents. * Everything else is a SKILL.md workflow composing these primitives. * * Core Tools (always on): * recall — Search everything: entities, workspaces, insights, evidence, KB, content_store * analyze — Saved research and source records with coverage receipts * ingest — Upload content to content_store (save, observe, import) * */ import type { SupabaseClient } from "@supabase/supabase-js"; export declare const V2_TOOLS: ({ name: string; description: string; inputSchema: { type: "object"; properties: { mode: { type: string; enum: string[]; description: string; }; query: { type: string; description: string; }; platforms: { type: string; items: { type: string; }; minItems: number; maxItems: number; description: string; }; date_from: { type: string; description: string; }; entity_name: { type: string; description: string; }; entity_id: { type: string; description: string; }; insight_id: { type: string; description: string; }; revision: { type: string; minimum: number; description: string; }; source_revision_id: { type: string; description: string; }; acquisition_history: { type: string; description: string; }; content_id: { type: string; description: string; }; after: { type: string; pattern: string; description: string; }; offset: { type: string; minimum: number; description: string; }; max_chars: { type: string; minimum: number; maximum: number; description: string; }; sort: { type: string; enum: string[]; description: string; }; order: { type: string; enum: string[]; description: string; }; tag: { type: string; description: string; }; window_days: { type: string; description: string; }; category: { type: string; enum: string[]; description: string; }; object_type: { type: string; enum: string[]; description: string; }; status: { type: string; enum: string[]; description: string; }; include_evidence: { type: string; description: string; }; personal: { type: string; description: string; }; limit: { type: string; description: string; }; project_id: { type: string; description: string; }; workspace_id: { type: string; description: string; }; record_type: { type: string; enum: string[]; description: string; }; record_id: { type: string; description: string; }; cursor: { type: string; additionalProperties: boolean; description: string; }; include_content: { type: string; description: string; }; public_view: { type: string; description: string; }; tags: { type: string; items: { type: string; }; description: string; }; action?: undefined; source_mode?: undefined; skill_id?: undefined; question?: undefined; job_id?: undefined; request_id?: undefined; content_ids?: undefined; search_mode?: undefined; depth?: undefined; }; }; } | { name: string; description: string; inputSchema: { type: "object"; properties: { action: { type: string; enum: string[]; description: string; }; source_mode: { type: string; enum: string[]; description: string; }; skill_id: { type: string; minLength: number; maxLength: number; description: string; }; question: { type: string; description: string; }; job_id: { type: string; description: string; }; request_id: { type: string; description: string; format?: undefined; }; project_id: { type: string; description: string; }; content_ids: { type: string; items: { type: string; }; minItems: number; maxItems: number; description: string; }; entity_id: { type: string; description: string; }; search_mode: { type: string; enum: string[]; description: string; }; platforms: { type: string; items: { type: string; }; description: string; minItems?: undefined; maxItems?: undefined; }; depth: { type: string; enum: string[]; description: string; }; mode?: undefined; query?: undefined; date_from?: undefined; entity_name?: undefined; insight_id?: undefined; revision?: undefined; source_revision_id?: undefined; acquisition_history?: undefined; content_id?: undefined; after?: undefined; offset?: undefined; max_chars?: undefined; sort?: undefined; order?: undefined; tag?: undefined; window_days?: undefined; category?: undefined; object_type?: undefined; status?: undefined; include_evidence?: undefined; personal?: undefined; limit?: undefined; workspace_id?: undefined; record_type?: undefined; record_id?: undefined; cursor?: undefined; include_content?: undefined; public_view?: undefined; tags?: undefined; }; }; } | { name: string; description: string; inputSchema: { type: "object"; properties: { insight_id: { type: string; description: string; }; request_id: { type: string; format: string; description: string; }; expected_revision: { type: string; minimum: number; description: string; }; summary: { type: string; maxLength: number; description: string; }; reasoning: { type: string; maxLength: number; }; limitations: { type: string; maxItems: number; items: { type: string; maxLength: number; }; }; client_label: { type: string; maxLength: number; description: string; }; evidence: { type: string; minItems: number; maxItems: number; description: string; items: { type: string; additionalProperties: boolean; properties: { content_id: { type: string; format: string; }; source_revision_id: { type: string; format: string; description: string; }; quote: { type: string; minLength: number; maxLength: number; }; start: { type: string; minimum: number; description: string; }; relation: { type: string; enum: string[]; }; }; required: string[]; }; }; action_id: { type: string; description: string; }; execution_id: { type: string; description: string; }; execution_status: { type: string; enum: string[]; description: string; }; executor_platform: { type: string; enum: string[]; description: string; }; approved_for_execution: { type: string; description: string; }; steps: { type: string; items: { type: string; }; description: string; }; step_results: { type: string; items: { type: string; properties: { step: { type: string; description: string; }; status: { type: string; enum: string[]; }; result: { type: string; description: string; }; }; required: string[]; additionalProperties: boolean; }; description: string; }; outcome_summary: { type: string; description: string; }; metrics: { type: string; additionalProperties: boolean; description: string; }; review_status: { type: string; enum: string[]; description: string; }; training_scopes: { type: string; items: { type: string; enum: string[]; }; uniqueItems: boolean; description: string; }; source_platform: { type: string; enum: string[]; description: string; }; source_url: { type: string; description: string; }; author: { type: string; description: string; }; published_at: { type: string; description: string; }; metadata: { type: string; description: string; }; observations: { type: string; items: { type: string; properties: { content: { type: string; description: string; }; source_platform: { type: string; description: string; }; source_id: { type: string; description: string; }; entity_id: { type: string; description: string; }; signal_type: { type: string; enum: string[]; }; observation_type: { type: string; description: string; }; metadata: { type: string; description: string; }; }; required: string[]; }; description: string; }; skill_id: { type: string; minLength: number; maxLength: number; description: string; }; skills: { type: string; maxItems: number; items: { type: string; additionalProperties: boolean; properties: { id: { type: string; minLength: number; maxLength: number; }; title: { type: string; minLength: number; maxLength: number; }; question: { type: string; minLength: number; maxLength: number; }; decision: { type: string; minLength: number; maxLength: number; }; evidence: { type: string; minLength: number; maxLength: number; }; workflow: { type: string; additionalProperties: boolean; properties: { version: { type: string; const: number; }; instructions: { type: string; maxLength: number; }; synthesis_model: { type: string; enum: string[]; description: string; }; filter_relevance: { type: string; description: string; }; inputs: { type: string; additionalProperties: boolean; properties: { platforms: { type: string; maxItems: number; items: { type: string; enum: string[]; }; }; account_roles: { type: string; maxItems: number; items: { type: string; enum: string[]; }; }; slack_channels: { type: string; maxItems: number; items: { type: string; additionalProperties: boolean; properties: { team_id: { type: string; pattern: string; }; channel_id: { type: string; pattern: string; }; name: { type: string; maxLength: number; }; }; required: string[]; }; }; lookback_days: { type: string; minimum: number; maximum: number; }; max_sources: { type: string; minimum: number; maximum: number; }; x_language: { type: string; enum: string[]; }; x_min_likes: { type: string; minimum: number; maximum: number; }; x_queries: { type: string; maxItems: number; items: { type: string; minLength: number; maxLength: number; }; description: string; }; }; required: string[]; }; }; required: string[]; }; }; required: string[]; }; description: string; }; expected_skills: { type: string; maxItems: number; items: { type: string; additionalProperties: boolean; properties: { id: { type: string; minLength: number; maxLength: number; }; title: { type: string; minLength: number; maxLength: number; }; question: { type: string; minLength: number; maxLength: number; }; decision: { type: string; minLength: number; maxLength: number; }; evidence: { type: string; minLength: number; maxLength: number; }; workflow: { type: string; additionalProperties: boolean; properties: { version: { type: string; const: number; }; instructions: { type: string; maxLength: number; }; synthesis_model: { type: string; enum: string[]; description: string; }; filter_relevance: { type: string; description: string; }; inputs: { type: string; additionalProperties: boolean; properties: { platforms: { type: string; maxItems: number; items: { type: string; enum: string[]; }; }; account_roles: { type: string; maxItems: number; items: { type: string; enum: string[]; }; }; slack_channels: { type: string; maxItems: number; items: { type: string; additionalProperties: boolean; properties: { team_id: { type: string; pattern: string; }; channel_id: { type: string; pattern: string; }; name: { type: string; maxLength: number; }; }; required: string[]; }; }; lookback_days: { type: string; minimum: number; maximum: number; }; max_sources: { type: string; minimum: number; maximum: number; }; x_language: { type: string; enum: string[]; }; x_min_likes: { type: string; minimum: number; maximum: number; }; x_queries: { type: string; maxItems: number; items: { type: string; minLength: number; maxLength: number; }; description: string; }; }; required: string[]; }; }; required: string[]; }; }; required: string[]; }; description: string; }; routine: { type: string; additionalProperties: boolean; properties: { enabled: { type: string; }; interval_hours: { type: string; enum: number[]; }; source_mode: { type: string; enum: string[]; description: string; }; max_charge_cents: { type: string; minimum: number; maximum: number; }; expected_revision: { type: string; minimum: number; description: string; }; }; required: string[]; }; collection_run_id: { type: string; maxLength: number; description: string; }; collection_scope: { type: string; maxLength: number; description: string; }; coverage_state: { type: string; enum: string[]; }; sources: { type: string; minItems: number; maxItems: number; description: string; items: { type: string; required: string[]; additionalProperties: boolean; properties: { id: { maxLength: number; type: string; }; title: { maxLength: number; type: string; }; url: { maxLength: number; type: string; }; platform: { type: string; enum: string[]; }; content: { minLength: number; maxLength: number; type: string; }; author: { maxLength: number; type: string; }; published_at: { description: string; type: string; }; metadata: { type: string; description: string; }; engagement: { type: string; properties: { [k: string]: { type: string; minimum: number; }; }; }; comments: { type: string; items: { type: string; required: string[]; additionalProperties: boolean; properties: { id: { maxLength: number; type: string; }; url: { maxLength: number; type: string; }; text: { minLength: number; maxLength: number; type: string; }; author: { maxLength: number; type: string; }; published_at: { type: string; }; metadata: { type: string; description: string; }; likes: { type: string; minimum: number; }; replies: { type: string; minimum: number; }; }; }; }; }; }; }; coverage: { type: string; required: string[]; additionalProperties: boolean; description: string; properties: { platform: { type: string; enum: string[]; }; collector: { type: string; }; collection_scope: { type: string; }; coverage_state: { type: string; enum: string[]; }; run_id: { type: string; }; query: { type: string; }; started_at: { type: string; }; finished_at: { type: string; }; notes: { type: string; }; totals: { type: string; }; targets: { type: string; maxItems: number; items: { type: string; required: string[]; properties: { target: { type: string; }; target_type: { type: string; }; role: { type: string; }; status: { type: string; }; items_found: { type: string; minimum: number; }; items_stored: { type: string; minimum: number; }; error: { type: string; }; cursor_start: { type: string; }; cursor_end: { type: string; }; reached_end: { type: string; }; metadata: { type: string; description: string; }; }; }; }; }; }; title: { type: string; description: string; }; content: { type: string; description: string; }; path: { type: string; description: string; }; tags: { type: string; items: { type: string; }; description: string; }; project_id: { type: string; description: string; }; entity_id: { type: string; description: string; }; destination: { type: string; enum: string[]; description: string; }; mode?: undefined; query?: undefined; platforms?: undefined; date_from?: undefined; entity_name?: undefined; revision?: undefined; source_revision_id?: undefined; acquisition_history?: undefined; content_id?: undefined; after?: undefined; offset?: undefined; max_chars?: undefined; sort?: undefined; order?: undefined; tag?: undefined; window_days?: undefined; category?: undefined; object_type?: undefined; status?: undefined; include_evidence?: undefined; personal?: undefined; limit?: undefined; workspace_id?: undefined; record_type?: undefined; record_id?: undefined; cursor?: undefined; include_content?: undefined; public_view?: undefined; action?: undefined; source_mode?: undefined; question?: undefined; job_id?: undefined; content_ids?: undefined; search_mode?: undefined; depth?: undefined; }; }; })[]; export declare function handleV2Tool(sb: SupabaseClient, userId: string, name: string, args: Record, accessToken?: string): Promise; export declare function isV2Tool(name: string): boolean;