@yitom/acp-client 0.1.0
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 +119 -0
- package/dist/auth/auth-method-order.d.ts +9 -0
- package/dist/auth/connect-auth-decision.d.ts +18 -0
- package/dist/auth/connect-auth-gate.d.ts +35 -0
- package/dist/client/acp-client.d.ts +110 -0
- package/dist/client/acp-fs.d.ts +15 -0
- package/dist/client/acp-paths.d.ts +8 -0
- package/dist/client/acp-proxy-service.d.ts +14 -0
- package/dist/client/acp-terminal.d.ts +36 -0
- package/dist/client/client-handlers.d.ts +27 -0
- package/dist/client/sdk-client.d.ts +32 -0
- package/dist/client/session-open.d.ts +39 -0
- package/dist/contracts/index.d.ts +277 -0
- package/dist/index.cjs +3279 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +3242 -0
- package/dist/mcp/inkdown-mcp-rpc.d.ts +14 -0
- package/dist/mcp/inkdown-mcp-toc-tools.d.ts +3 -0
- package/dist/mcp/inkdown-mcp-tools.d.ts +31 -0
- package/dist/process/process-manager.d.ts +59 -0
- package/dist/runtimes/agy/index.d.ts +19 -0
- package/dist/runtimes/claude/index.d.ts +13 -0
- package/dist/runtimes/codex/codex-auth-preflight.d.ts +10 -0
- package/dist/runtimes/codex/codex-provider-home.d.ts +20 -0
- package/dist/runtimes/codex/codex-provider.d.ts +13 -0
- package/dist/runtimes/codex/index.d.ts +16 -0
- package/dist/runtimes/copilot/index.d.ts +14 -0
- package/dist/runtimes/cursor/index.d.ts +66 -0
- package/dist/runtimes/deepseek/index.d.ts +34 -0
- package/dist/runtimes/gemini/index.d.ts +13 -0
- package/dist/runtimes/index.d.ts +54 -0
- package/dist/runtimes/opencode/index.d.ts +28 -0
- package/dist/session/agent-registry.d.ts +4 -0
- package/dist/session/config-options.d.ts +17 -0
- package/dist/session/session-capabilities.d.ts +10 -0
- package/dist/transport/terminal-output-buffer.d.ts +11 -0
- package/docs/adding-an-agent.md +121 -0
- package/docs/api-reference.md +104 -0
- package/docs/getting-started.md +164 -0
- package/docs/tauri-integration.md +107 -0
- package/package.json +44 -0
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# 完整 API 参考文档 (API Reference)
|
|
2
|
+
|
|
3
|
+
本文档详细列出 `@inkdown/acp` 导出的所有核心类、方法与类型定义。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. `AcpClient` 类
|
|
8
|
+
|
|
9
|
+
管理单个 Agent 连接及其生命周期的核心门面类。
|
|
10
|
+
|
|
11
|
+
### 构造函数
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
const client = new AcpClient(options: AcpClientOptions)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### `AcpClientOptions` 参数说明
|
|
18
|
+
|
|
19
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
20
|
+
| :--- | :--- | :---: | :--- |
|
|
21
|
+
| `workspaceRoot` | `string` | **是** | Agent 工作区根目录(绝对路径) |
|
|
22
|
+
| `runtime` | `string \| AcpRuntimeInfo` | 否 | 运行时标识(如 `'codex-acp'`、`'cursor-cli'`、`'claude'`、`'deepseek'` 等),默认 `'codex-acp'` |
|
|
23
|
+
| `clientInfo` | `{ name: string; version?: string }` | 否 | 客户端身份声明,默认 `{ name: 'inkdown', version: '0.1.0' }` |
|
|
24
|
+
| `dataDir` | `string` | 否 | 本地凭据与配置持久化目录,缺省自动使用操作系统标准应用数据目录 |
|
|
25
|
+
| `proxy` | `Partial<AcpProxySettings>` | 否 | 代理配置 `{ enabled?: boolean; host?: string; port?: number }` |
|
|
26
|
+
| `env` | `NodeJS.ProcessEnv` | 否 | 注入给子进程的额外环境变量 |
|
|
27
|
+
| `callbacks` | `AcpClientCallbacks` | 否 | 事件与审批回调钩子(详见下文) |
|
|
28
|
+
|
|
29
|
+
### 实例属性
|
|
30
|
+
|
|
31
|
+
- `currentStatus`: `AcpConnectionStatus`
|
|
32
|
+
- 当前状态值:`'disconnected' | 'connecting' | 'connected' | 'awaiting_auth' | 'error'`
|
|
33
|
+
- `isConnected`: `boolean`
|
|
34
|
+
- 是否已成功建连且持有就绪的 RPC 客户端
|
|
35
|
+
- `agent`: `ClientContext | null`
|
|
36
|
+
- 底层 `@agentclientprotocol/sdk` 的原生 RPC 上下文,可用于直接发送低级 RPC 请求
|
|
37
|
+
|
|
38
|
+
### 核心方法
|
|
39
|
+
|
|
40
|
+
#### `connect(): Promise<Result<{ status: AcpConnectionStatus; init: InitializeResponse }, AppError>>`
|
|
41
|
+
启动 Agent 后台进程、初始化 Stdio 通道并完成 Initialize 握手。
|
|
42
|
+
|
|
43
|
+
#### `createSession(options?): Promise<Result<AcpSessionHandle, AppError>>`
|
|
44
|
+
开启一个新会话或恢复已有会话。
|
|
45
|
+
- `options.resumeSessionId?: string | null`:尝试恢复的会话 ID
|
|
46
|
+
- `options.mcpServers?: unknown[]`:挂载的 MCP 服务器列表
|
|
47
|
+
|
|
48
|
+
#### `disconnect(reason?: string): Promise<void>`
|
|
49
|
+
断开当前连接,释放 Stdio 管道并安全杀死后台进程(清理进程树,避免孤儿进程)。
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## 2. `AcpSessionHandle` 类
|
|
54
|
+
|
|
55
|
+
代表一个已建立的对话会话。
|
|
56
|
+
|
|
57
|
+
### 方法
|
|
58
|
+
|
|
59
|
+
#### `prompt(text: string, options?: { timeoutMs?: number }): Promise<Result<unknown, AppError>>`
|
|
60
|
+
向当前会话发送提示词或用户输入。
|
|
61
|
+
|
|
62
|
+
#### `setConfigOption(configId: string, value: string | boolean): Promise<Result<unknown, AppError>>`
|
|
63
|
+
动态修改会话配置项(如切换底层模型 `model`、模式 `mode` 等)。
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 3. 回调接口 `AcpClientCallbacks`
|
|
68
|
+
|
|
69
|
+
用于完全解耦宿主与界面的事件驱动接口:
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
export interface AcpClientCallbacks {
|
|
73
|
+
/** 权限审批回调:当 Agent 尝试调用工具或执行敏感操作时触发 */
|
|
74
|
+
onPermissionRequest?: (payload: {
|
|
75
|
+
sessionId?: string
|
|
76
|
+
toolCall?: { id?: string; title?: string; kind?: string }
|
|
77
|
+
params: Record<string, unknown>
|
|
78
|
+
}) => Promise<{ outcome: 'approved' | 'cancelled' }>
|
|
79
|
+
|
|
80
|
+
/** 会话状态与内容流式更新 */
|
|
81
|
+
onSessionUpdate?: (params: Record<string, unknown>) => void
|
|
82
|
+
|
|
83
|
+
/** 连接状态机变化通知 */
|
|
84
|
+
onStatusChange?: (status: AcpConnectionStatus, detail?: string) => void
|
|
85
|
+
|
|
86
|
+
/** Agent 进程 stderr 输出(用于实时调试排错) */
|
|
87
|
+
onStderrLine?: (line: string) => void
|
|
88
|
+
|
|
89
|
+
/** 虚拟文件读取(供 Agent 读取内存快照) */
|
|
90
|
+
readSnapshot?: (resource: InkdownVirtualResource) => Promise<string>
|
|
91
|
+
|
|
92
|
+
/** 日志打印 */
|
|
93
|
+
onLog?: (level: 'info' | 'warn' | 'error', message: string, meta?: unknown) => void
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 4. 运行时适配器工具
|
|
100
|
+
|
|
101
|
+
- `getAcpRuntimeAdapter(runtimeId: string): AcpRuntimeAdapter`
|
|
102
|
+
获取指定运行时的适配器对象。
|
|
103
|
+
- `BUILTIN_ACP_RUNTIMES: readonly AcpRuntimeInfo[]`
|
|
104
|
+
获取当前内置支持的所有 8 大 Agent 运行时配置元数据列表。
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# 快速入门指南 (Getting Started)
|
|
2
|
+
|
|
3
|
+
本指南介绍如何在不同的技术栈与应用宿主中快速集成 `@inkdown/acp`。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 安装
|
|
8
|
+
|
|
9
|
+
在目标项目中安装本包:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add @inkdown/acp
|
|
13
|
+
# 或
|
|
14
|
+
npm install @inkdown/acp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> **环境要求**:Node.js 18+ 或 Bun 1.0+。
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. 场景一:纯 Node.js / Bun 命令行工具 (CLI)
|
|
22
|
+
|
|
23
|
+
在命令行中连接 Agent,并使用标准输入输出与用户交互:
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import readline from 'node:readline/promises'
|
|
27
|
+
import { stdin, stdout } from 'node:process'
|
|
28
|
+
import { AcpClient } from '@inkdown/acp'
|
|
29
|
+
|
|
30
|
+
async function runCli() {
|
|
31
|
+
const rl = readline.createInterface({ input: stdin, output: stdout })
|
|
32
|
+
|
|
33
|
+
const client = new AcpClient({
|
|
34
|
+
runtime: 'cursor-cli', // 可选: 'claude' | 'codex-acp' | 'deepseek' 等
|
|
35
|
+
workspaceRoot: process.cwd(),
|
|
36
|
+
clientInfo: {
|
|
37
|
+
name: 'my-terminal-agent',
|
|
38
|
+
version: '1.0.0',
|
|
39
|
+
},
|
|
40
|
+
callbacks: {
|
|
41
|
+
onStatusChange: (status, detail) => {
|
|
42
|
+
console.log(`[连接状态] ${status} ${detail ? `(${detail})` : ''}`)
|
|
43
|
+
},
|
|
44
|
+
// 敏感权限交互式审批
|
|
45
|
+
onPermissionRequest: async ({ toolCall }) => {
|
|
46
|
+
const answer = await rl.question(
|
|
47
|
+
`\n[权限确认] Agent 请求执行工具 "${toolCall?.title || '未知'}",是否允许?(y/N): `
|
|
48
|
+
)
|
|
49
|
+
const approved = answer.trim().toLowerCase() === 'y'
|
|
50
|
+
return { outcome: approved ? 'approved' : 'cancelled' }
|
|
51
|
+
},
|
|
52
|
+
// 实时流式响应
|
|
53
|
+
onSessionUpdate: (update) => {
|
|
54
|
+
if (update.type === 'message' && typeof update.content === 'string') {
|
|
55
|
+
process.stdout.write(update.content)
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
// 1. 连接 Agent
|
|
62
|
+
const connectRes = await client.connect()
|
|
63
|
+
if (!connectRes.ok) {
|
|
64
|
+
console.error('连接失败:', connectRes.error.message)
|
|
65
|
+
rl.close()
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// 2. 开启新会话
|
|
70
|
+
const sessionRes = await client.createSession()
|
|
71
|
+
if (!sessionRes.ok) {
|
|
72
|
+
console.error('创建会话失败:', sessionRes.error.message)
|
|
73
|
+
rl.close()
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
const session = sessionRes.data
|
|
77
|
+
|
|
78
|
+
// 3. 循环问答
|
|
79
|
+
while (true) {
|
|
80
|
+
const input = await rl.question('\n你: ')
|
|
81
|
+
if (input.trim() === 'exit') break
|
|
82
|
+
await session.prompt(input)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// 4. 清理释放
|
|
86
|
+
await client.disconnect()
|
|
87
|
+
rl.close()
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
runCli().catch(console.error)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 3. 场景二:Web / 后端服务 (WebSocket / SSE)
|
|
96
|
+
|
|
97
|
+
在后端服务中,可以将 `callbacks` 桥接到 WebSocket 或 Server-Sent Events (SSE),向前端浏览器实时推流:
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
import { WebSocketServer } from 'ws'
|
|
101
|
+
import { AcpClient } from '@inkdown/acp'
|
|
102
|
+
|
|
103
|
+
const wss = new WebSocketServer({ port: 8080 })
|
|
104
|
+
|
|
105
|
+
wss.on('connection', async (ws) => {
|
|
106
|
+
const client = new AcpClient({
|
|
107
|
+
runtime: 'deepseek',
|
|
108
|
+
workspaceRoot: '/path/to/project',
|
|
109
|
+
callbacks: {
|
|
110
|
+
onSessionUpdate: (data) => {
|
|
111
|
+
// 向网页前端广播流式输出
|
|
112
|
+
ws.send(JSON.stringify({ event: 'agent_chunk', data }))
|
|
113
|
+
},
|
|
114
|
+
onPermissionRequest: async (req) => {
|
|
115
|
+
// 向前端发送审批弹窗请求,等待网页用户点击确认
|
|
116
|
+
return waitForWebUserApproval(ws, req)
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
await client.connect()
|
|
122
|
+
const session = (await client.createSession()).data
|
|
123
|
+
|
|
124
|
+
ws.on('message', async (message) => {
|
|
125
|
+
const { prompt } = JSON.parse(message.toString())
|
|
126
|
+
await session.prompt(prompt)
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
ws.on('close', () => {
|
|
130
|
+
void client.disconnect()
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## 4. 场景三:Electron 桌面主进程
|
|
138
|
+
|
|
139
|
+
在 Electron 主进程中,将 `callbacks` 桥接给主窗口的 `webContents.send`:
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
import { BrowserWindow } from 'electron'
|
|
143
|
+
import { AcpClient } from '@inkdown/acp'
|
|
144
|
+
|
|
145
|
+
export function setupAcpClient(mainWindow: BrowserWindow, workspaceRoot: string) {
|
|
146
|
+
const client = new AcpClient({
|
|
147
|
+
runtime: 'codex-acp',
|
|
148
|
+
workspaceRoot,
|
|
149
|
+
callbacks: {
|
|
150
|
+
onStatusChange: (status, detail) => {
|
|
151
|
+
mainWindow.webContents.send('acp:status-changed', { status, detail })
|
|
152
|
+
},
|
|
153
|
+
onSessionUpdate: (update) => {
|
|
154
|
+
mainWindow.webContents.send('acp:session-update', update)
|
|
155
|
+
},
|
|
156
|
+
onPermissionRequest: async (payload) => {
|
|
157
|
+
// 弹出 Electron 原生对话框或向渲染进程发起 IPC 请求
|
|
158
|
+
return handleDialogApproval(payload)
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
})
|
|
162
|
+
return client
|
|
163
|
+
}
|
|
164
|
+
```
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Tauri 集成与 Sidecar 模式实战指南
|
|
2
|
+
|
|
3
|
+
本指南面向希望在 **Tauri** 桌面应用中复用 `@inkdown/acp` 的开发者。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 核心思考:为什么选择 Sidecar 模式?
|
|
8
|
+
|
|
9
|
+
Tauri 的前端 WebView 运行在受限的浏览器沙盒中,无法直接调用 `node:child_process` 拉起后台 Agent 子进程。
|
|
10
|
+
|
|
11
|
+
要在 Tauri 中复用本 SDK,**无需将整套协议和 8 大 Agent 适配器用 Rust 重写一遍**。Tauri 官方提供了非常成熟的 **Sidecar(伴生进程)** 机制:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
┌────────────────────────────────────────────────────────┐
|
|
15
|
+
│ Tauri 应用 │
|
|
16
|
+
│ │
|
|
17
|
+
│ ┌───────────────────────┐ ┌─────────────────────┐ │
|
|
18
|
+
│ │ Tauri 前端 UI │ │ Tauri Rust 后端 │ │
|
|
19
|
+
│ │ (React / Vue / Svelte│ │ │ │
|
|
20
|
+
│ └───────────┬───────────┘ └──────────┬──────────┘ │
|
|
21
|
+
│ │ Tauri invoke 命令 │ │
|
|
22
|
+
│ ▼ ▼ │
|
|
23
|
+
│ ┌──────────────────────────────────────────────────┐ │
|
|
24
|
+
│ │ ACP Sidecar 引擎 (纯独立二进制可执行文件) │ │
|
|
25
|
+
│ │ 由 @inkdown/acp 编译而成,负责所有 Agent 交互 │ │
|
|
26
|
+
│ └──────────────────────────────────────────────────┘ │
|
|
27
|
+
└────────────────────────────────────────────────────────┘
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 步骤 1:一键编译出原生二进制 Sidecar
|
|
33
|
+
|
|
34
|
+
利用 Bun 的单文件编译能力,可以将我们的 SDK 与驱动入口秒级编译为独立的原生二进制程序(无任何环境依赖,体积仅几十 MB):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# Windows
|
|
38
|
+
bun build ./packages/acp/examples/standalone-acp-demo.ts --compile --outfile acp-engine-x86_64-pc-windows-msvc.exe
|
|
39
|
+
|
|
40
|
+
# macOS
|
|
41
|
+
bun build ./packages/acp/examples/standalone-acp-demo.ts --compile --outfile acp-engine-aarch64-apple-darwin
|
|
42
|
+
|
|
43
|
+
# Linux
|
|
44
|
+
bun build ./packages/acp/examples/standalone-acp-demo.ts --compile --outfile acp-engine-x86_64-unknown-linux-gnu
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 步骤 2:在 Tauri 中配置 Sidecar
|
|
50
|
+
|
|
51
|
+
把编译好的二进制文件放入 Tauri 项目的 `src-tauri/bin/` 目录下,并在 `tauri.conf.json` 中声明:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"tauri": {
|
|
56
|
+
"bundle": {
|
|
57
|
+
"externalBin": [
|
|
58
|
+
"bin/acp-engine"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 步骤 3:在 Rust 后端拉起 Sidecar
|
|
68
|
+
|
|
69
|
+
在 Tauri 的 `main.rs` 中,通过 Tauri 提供的命令直接拉起并建立管道:
|
|
70
|
+
|
|
71
|
+
```rust
|
|
72
|
+
use tauri::api::process::{Command, CommandEvent};
|
|
73
|
+
|
|
74
|
+
#[tauri::command]
|
|
75
|
+
fn start_acp_sidecar(app_handle: tauri::AppHandle) {
|
|
76
|
+
let (mut rx, mut child) = Command::new_sidecar("acp-engine")
|
|
77
|
+
.expect("未能初始化 acp-engine sidecar")
|
|
78
|
+
.spawn()
|
|
79
|
+
.expect("启动 acp-engine 失败");
|
|
80
|
+
|
|
81
|
+
tauri::async_runtime::spawn(async move {
|
|
82
|
+
while let Some(event) = rx.recv().await {
|
|
83
|
+
match event {
|
|
84
|
+
CommandEvent::Stdout(line) => {
|
|
85
|
+
// 将 Agent 输出广播给前端页面
|
|
86
|
+
println!("Sidecar 输出: {}", line);
|
|
87
|
+
}
|
|
88
|
+
CommandEvent::Stderr(err) => {
|
|
89
|
+
eprintln!("Sidecar 错误: {}", err);
|
|
90
|
+
}
|
|
91
|
+
_ => {}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 总结:Sidecar vs 纯 Rust 重写的优劣对比
|
|
101
|
+
|
|
102
|
+
| 考量因素 | Sidecar 模式(推荐) | 纯 Rust 重写模式 |
|
|
103
|
+
| :--- | :--- | :--- |
|
|
104
|
+
| **代码复用率** | **100% 共用**:Electron、CLI、Tauri 维护同一份 Agent 适配逻辑 | 0%:需用 Rust 把 8 大 Agent 适配器完全重写一遍 |
|
|
105
|
+
| **生态跟进** | **极快**:依赖官方 `@agentclientprotocol/sdk`,上游一更新立即生效 | **滞后**:Rust 生态目前缺少官方实时维护的 ACP 客户端库 |
|
|
106
|
+
| **内存与启动** | 启动毫秒级,常驻内存约 30~50MB | 启动纳秒级,常驻内存约 5~15MB |
|
|
107
|
+
| **适用建议** | **适合 95% 的应用**,用极低维护成本换取跨平台、跨项目通用性 | 仅适合极致追求超小包体积与极低内存的单体纯 Rust 项目 |
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@yitom/acp-client",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Headless ACP (Agent Client Protocol) SDK for connecting to Codex, Claude, Cursor, DeepSeek and more",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"docs"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"author": "Yitom <yitom486@gmail.com>",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/yitom486/acp-client.git"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/yitom486/acp-client#readme",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "bun build ./src/index.ts --outdir ./dist --format esm --target node --external @agentclientprotocol/sdk && bun build ./src/index.ts --outfile ./dist/index.cjs --format cjs --target node --external @agentclientprotocol/sdk && tsc -p tsconfig.json",
|
|
34
|
+
"test": "bun test",
|
|
35
|
+
"prepublishOnly": "bun run build"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@agentclientprotocol/sdk": "^1.0.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^26.6.3",
|
|
42
|
+
"typescript": "^7.0.2"
|
|
43
|
+
}
|
|
44
|
+
}
|