/** * DataSphere Skill - Searches SignalWire DataSphere for knowledge base content. * * Tier 3 built-in skill matching the Python SDK. All credentials (`space_name`, * `project_id`, `token`) and `document_id` are supplied via skill params. Env * var fallbacks (`SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, `SIGNALWIRE_SPACE`) * are honored when the corresponding param is not set. */ import { SkillBase } from '../SkillBase.js'; import type { SkillToolDefinition, SkillPromptSection, SkillConfig, ParameterSchemaEntry } from '../SkillBase.js'; /** * Searches SignalWire DataSphere for knowledge base content using semantic search. * * Tier 3 built-in skill. Credentials can be supplied via params or fall back to * `SIGNALWIRE_PROJECT_ID`, `SIGNALWIRE_TOKEN`, and `SIGNALWIRE_SPACE` environment * variables. Supports `count`, `distance`, `tags`, `language`, `pos_to_expand`, * `max_synonyms`, and `no_results_message` config options. * * @example * ```ts * agent.addSkill('datasphere', { * document_id: 'doc_abc123', * count: 3, * tags: ['faq'], * }); * ``` */ export declare class DataSphereSkill extends SkillBase { static SKILL_NAME: string; static SKILL_DESCRIPTION: string; static SKILL_VERSION: string; static REQUIRED_PACKAGES: readonly string[]; static REQUIRED_ENV_VARS: readonly string[]; static SUPPORTS_MULTIPLE_INSTANCES: boolean; static getParameterSchema(): Record; /** * Instance key for the SkillManager. Defaults to `datasphere_search_knowledge`, * matching the Python SDK default. When `tool_name` is set, uses * `datasphere_`. */ getInstanceKey(): string; /** * Global data injected into the agent's SWML context. Matches Python's * `get_global_data()` so downstream consumers can detect DataSphere * availability, the configured `document_id`, and the knowledge provider. */ getGlobalData(): Record; /** * Validate required credentials before the skill becomes active. * * Mirrors Python skills/datasphere/skill.py:120-128: `setup()` returns false * when any of `space_name`, `project_id`, `token`, or `document_id` is * missing from either config or env. Fails closed so SkillManager refuses * to register a skill that would break at call time. */ setup(): Promise; /** Resolve the tool name (defaults to `search_knowledge`, matching Python SDK). */ private getToolName; /** @returns A single tool (named via `tool_name`) that performs semantic search. */ getTools(): SkillToolDefinition[]; /** Format search result chunks into a user-facing string. */ private static _formatSearchResults; /** Apply the `{query}` template to the no-results message. */ private static _formatNoResultsMessage; /** @returns Prompt section describing DataSphere knowledge base search capabilities. */ protected _getPromptSections(): SkillPromptSection[]; } /** * Factory function for creating DataSphereSkill instances. * @param config - Optional skill configuration. * @returns A new DataSphereSkill instance. */ export declare function createSkill(config?: SkillConfig): DataSphereSkill;