@yushaw/sanqian-chat 0.2.2 → 0.2.3
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.
- package/dist/main/index.d.mts +46 -1
- package/dist/main/index.d.ts +46 -1
- package/dist/main/index.js +49 -1
- package/dist/main/index.mjs +49 -1
- package/package.json +2 -2
package/dist/main/index.d.mts
CHANGED
|
@@ -66,8 +66,19 @@ interface AppAgentConfig {
|
|
|
66
66
|
description?: string;
|
|
67
67
|
/** System prompt */
|
|
68
68
|
systemPrompt?: string;
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Tools to enable. Supports:
|
|
71
|
+
* - Builtin: "file_ops", "run_bash", "web_search"
|
|
72
|
+
* - SDK: "myapp:tool_name" or just "tool_name" (auto-prefixed)
|
|
73
|
+
* - MCP: "mcp_server_tool"
|
|
74
|
+
* - Wildcard: ["*"]
|
|
75
|
+
*/
|
|
70
76
|
tools?: string[];
|
|
77
|
+
/**
|
|
78
|
+
* Skills to enable.
|
|
79
|
+
* @example ["pdf", "web-research", "xlsx"]
|
|
80
|
+
*/
|
|
81
|
+
skills?: string[];
|
|
71
82
|
}
|
|
72
83
|
/**
|
|
73
84
|
* Embedding configuration from Sanqian
|
|
@@ -207,6 +218,40 @@ declare class SanqianAppClient {
|
|
|
207
218
|
* Delete a conversation
|
|
208
219
|
*/
|
|
209
220
|
deleteConversation(conversationId: string): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* List available capabilities (tools, skills, agents)
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* // List all tools
|
|
227
|
+
* const tools = await client.listCapabilities({ type: 'tool' });
|
|
228
|
+
*
|
|
229
|
+
* // List builtin tools only
|
|
230
|
+
* const builtinTools = await client.listCapabilities({ type: 'tool', source: 'builtin' });
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
listCapabilities(options?: _yushaw_sanqian_sdk.ListCapabilitiesOptions): Promise<_yushaw_sanqian_sdk.Capability[]>;
|
|
234
|
+
/**
|
|
235
|
+
* Search capabilities by query
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* const results = await client.searchCapabilities('file operations', { type: 'tool', limit: 5 });
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
searchCapabilities(query: string, options?: _yushaw_sanqian_sdk.SearchCapabilitiesOptions): Promise<_yushaw_sanqian_sdk.CapabilitySearchResult[]>;
|
|
243
|
+
/**
|
|
244
|
+
* List available tools
|
|
245
|
+
*/
|
|
246
|
+
listTools(source?: 'builtin' | 'sdk' | 'mcp'): Promise<_yushaw_sanqian_sdk.ToolCapability[]>;
|
|
247
|
+
/**
|
|
248
|
+
* List available skills
|
|
249
|
+
*/
|
|
250
|
+
listSkills(): Promise<_yushaw_sanqian_sdk.SkillCapability[]>;
|
|
251
|
+
/**
|
|
252
|
+
* List all available agents (not just own agents)
|
|
253
|
+
*/
|
|
254
|
+
listAvailableAgents(): Promise<_yushaw_sanqian_sdk.AgentCapability[]>;
|
|
210
255
|
/**
|
|
211
256
|
* Get the underlying SDK instance
|
|
212
257
|
* @internal This is for internal use by other sanqian-chat components
|
package/dist/main/index.d.ts
CHANGED
|
@@ -66,8 +66,19 @@ interface AppAgentConfig {
|
|
|
66
66
|
description?: string;
|
|
67
67
|
/** System prompt */
|
|
68
68
|
systemPrompt?: string;
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Tools to enable. Supports:
|
|
71
|
+
* - Builtin: "file_ops", "run_bash", "web_search"
|
|
72
|
+
* - SDK: "myapp:tool_name" or just "tool_name" (auto-prefixed)
|
|
73
|
+
* - MCP: "mcp_server_tool"
|
|
74
|
+
* - Wildcard: ["*"]
|
|
75
|
+
*/
|
|
70
76
|
tools?: string[];
|
|
77
|
+
/**
|
|
78
|
+
* Skills to enable.
|
|
79
|
+
* @example ["pdf", "web-research", "xlsx"]
|
|
80
|
+
*/
|
|
81
|
+
skills?: string[];
|
|
71
82
|
}
|
|
72
83
|
/**
|
|
73
84
|
* Embedding configuration from Sanqian
|
|
@@ -207,6 +218,40 @@ declare class SanqianAppClient {
|
|
|
207
218
|
* Delete a conversation
|
|
208
219
|
*/
|
|
209
220
|
deleteConversation(conversationId: string): Promise<void>;
|
|
221
|
+
/**
|
|
222
|
+
* List available capabilities (tools, skills, agents)
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* // List all tools
|
|
227
|
+
* const tools = await client.listCapabilities({ type: 'tool' });
|
|
228
|
+
*
|
|
229
|
+
* // List builtin tools only
|
|
230
|
+
* const builtinTools = await client.listCapabilities({ type: 'tool', source: 'builtin' });
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
listCapabilities(options?: _yushaw_sanqian_sdk.ListCapabilitiesOptions): Promise<_yushaw_sanqian_sdk.Capability[]>;
|
|
234
|
+
/**
|
|
235
|
+
* Search capabilities by query
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```typescript
|
|
239
|
+
* const results = await client.searchCapabilities('file operations', { type: 'tool', limit: 5 });
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
searchCapabilities(query: string, options?: _yushaw_sanqian_sdk.SearchCapabilitiesOptions): Promise<_yushaw_sanqian_sdk.CapabilitySearchResult[]>;
|
|
243
|
+
/**
|
|
244
|
+
* List available tools
|
|
245
|
+
*/
|
|
246
|
+
listTools(source?: 'builtin' | 'sdk' | 'mcp'): Promise<_yushaw_sanqian_sdk.ToolCapability[]>;
|
|
247
|
+
/**
|
|
248
|
+
* List available skills
|
|
249
|
+
*/
|
|
250
|
+
listSkills(): Promise<_yushaw_sanqian_sdk.SkillCapability[]>;
|
|
251
|
+
/**
|
|
252
|
+
* List all available agents (not just own agents)
|
|
253
|
+
*/
|
|
254
|
+
listAvailableAgents(): Promise<_yushaw_sanqian_sdk.AgentCapability[]>;
|
|
210
255
|
/**
|
|
211
256
|
* Get the underlying SDK instance
|
|
212
257
|
* @internal This is for internal use by other sanqian-chat components
|
package/dist/main/index.js
CHANGED
|
@@ -112,7 +112,8 @@ var SanqianAppClient = class {
|
|
|
112
112
|
name: config.name,
|
|
113
113
|
description: config.description,
|
|
114
114
|
system_prompt: config.systemPrompt,
|
|
115
|
-
tools: config.tools
|
|
115
|
+
tools: config.tools,
|
|
116
|
+
skills: config.skills
|
|
116
117
|
};
|
|
117
118
|
const result = await this.sdk.createAgent(sdkConfig);
|
|
118
119
|
return { agentId: result.agent_id };
|
|
@@ -191,6 +192,53 @@ var SanqianAppClient = class {
|
|
|
191
192
|
return this.sdk.deleteConversation(conversationId);
|
|
192
193
|
}
|
|
193
194
|
// ============================================================
|
|
195
|
+
// Capability Discovery
|
|
196
|
+
// ============================================================
|
|
197
|
+
/**
|
|
198
|
+
* List available capabilities (tools, skills, agents)
|
|
199
|
+
*
|
|
200
|
+
* @example
|
|
201
|
+
* ```typescript
|
|
202
|
+
* // List all tools
|
|
203
|
+
* const tools = await client.listCapabilities({ type: 'tool' });
|
|
204
|
+
*
|
|
205
|
+
* // List builtin tools only
|
|
206
|
+
* const builtinTools = await client.listCapabilities({ type: 'tool', source: 'builtin' });
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
209
|
+
async listCapabilities(options) {
|
|
210
|
+
return this.sdk.listCapabilities(options);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Search capabilities by query
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* const results = await client.searchCapabilities('file operations', { type: 'tool', limit: 5 });
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
async searchCapabilities(query, options) {
|
|
221
|
+
return this.sdk.searchCapabilities(query, options);
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* List available tools
|
|
225
|
+
*/
|
|
226
|
+
async listTools(source) {
|
|
227
|
+
return this.sdk.listTools(source);
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* List available skills
|
|
231
|
+
*/
|
|
232
|
+
async listSkills() {
|
|
233
|
+
return this.sdk.listSkills();
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* List all available agents (not just own agents)
|
|
237
|
+
*/
|
|
238
|
+
async listAvailableAgents() {
|
|
239
|
+
return this.sdk.listAvailableAgents();
|
|
240
|
+
}
|
|
241
|
+
// ============================================================
|
|
194
242
|
// Internal Access (for FloatingWindow and other internal components)
|
|
195
243
|
// ============================================================
|
|
196
244
|
/**
|
package/dist/main/index.mjs
CHANGED
|
@@ -75,7 +75,8 @@ var SanqianAppClient = class {
|
|
|
75
75
|
name: config.name,
|
|
76
76
|
description: config.description,
|
|
77
77
|
system_prompt: config.systemPrompt,
|
|
78
|
-
tools: config.tools
|
|
78
|
+
tools: config.tools,
|
|
79
|
+
skills: config.skills
|
|
79
80
|
};
|
|
80
81
|
const result = await this.sdk.createAgent(sdkConfig);
|
|
81
82
|
return { agentId: result.agent_id };
|
|
@@ -154,6 +155,53 @@ var SanqianAppClient = class {
|
|
|
154
155
|
return this.sdk.deleteConversation(conversationId);
|
|
155
156
|
}
|
|
156
157
|
// ============================================================
|
|
158
|
+
// Capability Discovery
|
|
159
|
+
// ============================================================
|
|
160
|
+
/**
|
|
161
|
+
* List available capabilities (tools, skills, agents)
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* // List all tools
|
|
166
|
+
* const tools = await client.listCapabilities({ type: 'tool' });
|
|
167
|
+
*
|
|
168
|
+
* // List builtin tools only
|
|
169
|
+
* const builtinTools = await client.listCapabilities({ type: 'tool', source: 'builtin' });
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
async listCapabilities(options) {
|
|
173
|
+
return this.sdk.listCapabilities(options);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Search capabilities by query
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```typescript
|
|
180
|
+
* const results = await client.searchCapabilities('file operations', { type: 'tool', limit: 5 });
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
async searchCapabilities(query, options) {
|
|
184
|
+
return this.sdk.searchCapabilities(query, options);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* List available tools
|
|
188
|
+
*/
|
|
189
|
+
async listTools(source) {
|
|
190
|
+
return this.sdk.listTools(source);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* List available skills
|
|
194
|
+
*/
|
|
195
|
+
async listSkills() {
|
|
196
|
+
return this.sdk.listSkills();
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* List all available agents (not just own agents)
|
|
200
|
+
*/
|
|
201
|
+
async listAvailableAgents() {
|
|
202
|
+
return this.sdk.listAvailableAgents();
|
|
203
|
+
}
|
|
204
|
+
// ============================================================
|
|
157
205
|
// Internal Access (for FloatingWindow and other internal components)
|
|
158
206
|
// ============================================================
|
|
159
207
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yushaw/sanqian-chat",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Floating chat window SDK for Sanqian AI Assistant",
|
|
5
5
|
"main": "./dist/main/index.js",
|
|
6
6
|
"types": "./dist/main/index.d.ts",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"test:watch": "vitest"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@yushaw/sanqian-sdk": "^0.3.
|
|
46
|
+
"@yushaw/sanqian-sdk": "^0.3.1",
|
|
47
47
|
"react-virtuoso": "^4.15.0",
|
|
48
48
|
"rehype-harden": "^1.1.6",
|
|
49
49
|
"remark-gfm": "^4.0.1",
|