@pillar-ai/sdk 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,4 +25,6 @@
25
25
  */
26
26
  export { validateToolName, TOOL_NAME_PATTERN } from './types';
27
27
  export type { ToolType, ToolDataSchema, ToolDataSchemaProperty, ToolDefinition, ToolDefinitions, ToolManifest, ToolManifestEntry, ClientInfo, Platform, SyncToolDefinition, SyncToolDefinitions, ToolTypeDataMap, NavigateToolData, TriggerToolData, InlineUIData, ExternalLinkData, CopyTextData, QueryToolData, ToolDataType, ToolNames, TypedTaskHandler, TypedOnTask, TypedPillarMethods, ToolExecuteResult, ToolSchemaBase, InlineUIToolSchema, ExecutableToolSchema, ToolSchema, ActionType, ActionDataSchema, ActionDataSchemaProperty, ActionDefinition, ActionDefinitions, ActionManifest, ActionManifestEntry, SyncActionDefinition, SyncActionDefinitions, NavigateActionData, TriggerActionData, QueryActionData, ActionTypeDataMap, ActionDataType, ActionNames, ActionResult, ActionSchema, } from './types';
28
+ export { defineSkill } from './skill';
29
+ export type { SkillDefinition } from './skill';
28
30
  export { setClientInfo, getClientInfo, getHandler, getToolDefinition, hasTool, getToolNames, getManifest, clearRegistry, getToolCount, getActionDefinition, hasAction, getActionNames, getActionCount, } from './registry';
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Skill definitions for registering instructional content with Pillar.
3
+ *
4
+ * Skills are structured markdown instructions that AI agents can load
5
+ * and follow. They are discovered by the CLI scanner (`npx pillar-sync`)
6
+ * and synced to the backend, where they're exposed as MCP prompts and resources.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { defineSkill } from '@pillar-ai/sdk';
11
+ *
12
+ * export const setupSkill = defineSkill({
13
+ * name: 'setup-guide',
14
+ * description: 'How to set up billing in your app',
15
+ * content: '# Setup Guide\n\n1. Install the SDK...',
16
+ * });
17
+ * ```
18
+ */
19
+ export interface SkillDefinition {
20
+ /** Unique skill name (e.g. 'billing-setup') */
21
+ name: string;
22
+ /** When/why to use this skill — used for semantic search matching */
23
+ description: string;
24
+ /** Full skill content (markdown) */
25
+ content: string;
26
+ }
27
+ /**
28
+ * Define a skill for registration with Pillar.
29
+ *
30
+ * The CLI scanner (`npx pillar-sync --scan ./src`) discovers these calls
31
+ * via AST analysis and syncs the skill definitions to the backend.
32
+ */
33
+ export declare function defineSkill(def: SkillDefinition): SkillDefinition;
@@ -560,6 +560,8 @@ export interface ToolSchemaBase<TInput = Record<string, unknown>> {
560
560
  * @default false
561
561
  */
562
562
  webMCP?: boolean;
563
+ /** Channels this tool is available on. Client-side tools default to ["web", "api"]. */
564
+ channelCompatibility?: string[];
563
565
  }
564
566
  /**
565
567
  * Tool schema for `inline_ui` tools that render a component in the chat.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pillar-ai/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Product copilot SDK for SaaS and web apps — AI assistant that executes tasks, not just answers questions",
5
5
  "type": "module",
6
6
  "main": "./dist/pillar.esm.js",