/** * DataSphere Serverless Skill - Searches SignalWire DataSphere using a DataMap. * * Tier 3 built-in skill. Matches the Python SDK's param-driven design: all * credentials (`space_name`, `project_id`, `token`) are supplied via skill * params. At `setup()` time the skill resolves these params, composes the * full DataSphere API URL and a base64 Basic-auth header, and bakes both as * literal values into the emitted DataMap SWAIG JSON (mirrors Python * `skills/datasphere_serverless/skill.py:152-157, 182-201`). */ import { SkillBase } from '../SkillBase.js'; import type { SkillToolDefinition, SkillPromptSection, SkillConfig, ParameterSchemaEntry } from '../SkillBase.js'; /** * Searches SignalWire DataSphere using a server-side DataMap for serverless execution. * * Tier 3 built-in skill that generates a DataMap configuration SignalWire * executes directly, without a webhook endpoint. Supports `document_id`, * `count`, `distance`, `tags`, `language`, `pos_to_expand`, `max_synonyms`, * and `no_results_message` config options. * * @example * ```ts * agent.addSkill('datasphere_serverless', { * document_id: 'doc_abc123', * count: 3, * }); * ``` */ export declare class DataSphereServerlessSkill 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_serverless_search_knowledge`, matching the Python SDK default. * When `tool_name` is set, uses `datasphere_serverless_`. */ getInstanceKey(): string; /** * Validate required configuration parameters before the skill becomes active. * * Mirrors Python's `setup()` which checks `space_name`, `project_id`, `token`, * and `document_id` and returns `False` (logging an error) if any are absent. * @returns `true` if all required params are present, `false` otherwise. */ setup(): Promise; /** * Global data injected into the agent's SWML/SWAIG context. Matches * Python's `get_global_data()` shape so downstream consumers can * detect DataSphere availability. */ getGlobalData(): Record; /** * Resolve the tool name used in DataMap registration. Defaults to * `search_knowledge` to match the Python SDK default. */ private getToolName; /** * Build the DataMap-based SWAIG function definition for server-side * DataSphere search. This generates a data_map configuration that * SignalWire executes directly, without needing a webhook callback. */ private buildDataMapFunction; /** * Return a stub tool definition since this skill uses DataMap-based execution. * The actual DataMap function is provided by getDataMapTools(). * @returns A single stub tool (named via `tool_name`) that explains its DataMap nature. */ getTools(): SkillToolDefinition[]; /** * Get DataMap-based tool definitions for server-side execution. * These are registered directly in the SWML output as data_map functions * rather than as webhook-backed SWAIG tools. * @returns Array containing the DataSphere search DataMap function definition. */ getDataMapTools(): Record[]; /** @returns Prompt section describing serverless DataSphere search capabilities. */ protected _getPromptSections(): SkillPromptSection[]; } /** * Factory function for creating DataSphereServerlessSkill instances. * @param config - Optional skill configuration. * @returns A new DataSphereServerlessSkill instance. */ export declare function createSkill(config?: SkillConfig): DataSphereServerlessSkill;