@core-pilot/sdk 0.1.0 → 0.1.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.
package/README.md CHANGED
@@ -38,7 +38,7 @@ import '@core-pilot/sdk/dist/index.css'; // 引入样式
38
38
  // 1. 初始化 SDK 实例
39
39
  const pilot = createCorePilot({
40
40
  // 基础配置
41
- appId: 'your-app-id',
41
+ agentId: 'your-app-id',
42
42
  provider: {
43
43
  name: 'coreagent', // 目前支持 'coreagent' | 'dify'
44
44
  extensions: {
@@ -320,7 +320,7 @@ SDK 支持两种鉴权模式,适应不同的安全需求。
320
320
 
321
321
  ```typescript
322
322
  const pilot = createCorePilot({
323
- appId: 'your-app-id',
323
+ agentId: 'your-app-id',
324
324
  provider: { name: 'coreagent' },
325
325
  auth: {
326
326
  mode: 'client',
@@ -340,7 +340,7 @@ const pilot = createCorePilot({
340
340
 
341
341
  ```typescript
342
342
  const pilot = createCorePilot({
343
- appId: 'your-app-id',
343
+ agentId: 'your-app-id',
344
344
  provider: { name: 'coreagent' },
345
345
  auth: {
346
346
  mode: 'server',
@@ -367,7 +367,7 @@ SDK 内置了完善的日志系统,支持本地调试和远程日志上报。
367
367
 
368
368
  ```typescript
369
369
  const pilot = createCorePilot({
370
- appId: 'your-app-id',
370
+ agentId: 'your-app-id',
371
371
  provider: { name: 'coreagent' },
372
372
  auth: { mode: 'client', token: 'sk-xxx' },
373
373
  mount: { selector: '#agent-container' },
@@ -412,7 +412,7 @@ SDK 支持多种 AI Provider,目前内置了 CoreAgent 协议。
412
412
 
413
413
  ```typescript
414
414
  const pilot = createCorePilot({
415
- appId: 'your-app-id',
415
+ agentId: 'your-app-id',
416
416
  provider: {
417
417
  name: 'coreagent',
418
418
  extensions: {
@@ -427,7 +427,7 @@ const pilot = createCorePilot({
427
427
 
428
428
  ```typescript
429
429
  const pilot = createCorePilot({
430
- appId: 'your-app-id',
430
+ agentId: 'your-app-id',
431
431
  provider: {
432
432
  name: 'dify',
433
433
  extensions: {
@@ -448,7 +448,7 @@ const pilot = createCorePilot({
448
448
 
449
449
  | 属性 | 类型 | 必填 | 默认值 | 说明 |
450
450
  |------|------|------|--------|------|
451
- | `appId` | `string` | ✅ | - | Agent 应用 ID |
451
+ | `agentId` | `string` | ✅ | - | Agent 应用 ID |
452
452
  | `provider` | `AgentProvider` | ✅ | - | 协议提供商配置 |
453
453
  | `auth` | `AuthOptions` | ✅ | - | 鉴权配置 |
454
454
  | `mount` | `MountOptions` | ✅ | - | 挂载配置 |
@@ -690,7 +690,7 @@ useEffect(() => {
690
690
  **解决方案**:
691
691
  - 检查 `auth.token` 是否正确
692
692
  - 确认 Token 未过期
693
- - 验证 `appId` 与 Token 匹配
693
+ - 验证 `agentId` 与 Token 匹配
694
694
 
695
695
  ### 3. 事件回调未触发
696
696