@agentdock/wire 0.0.1
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 +152 -0
- package/dist/agentCapabilities.d.ts +30 -0
- package/dist/agentCapabilities.d.ts.map +1 -0
- package/dist/agentCapabilities.js +103 -0
- package/dist/agentCapabilities.js.map +1 -0
- package/dist/agentInstallGuide.d.ts +15 -0
- package/dist/agentInstallGuide.d.ts.map +1 -0
- package/dist/agentInstallGuide.js +63 -0
- package/dist/agentInstallGuide.js.map +1 -0
- package/dist/agentModels.d.ts +23 -0
- package/dist/agentModels.d.ts.map +1 -0
- package/dist/agentModels.js +77 -0
- package/dist/agentModels.js.map +1 -0
- package/dist/controlLevel.d.ts +12 -0
- package/dist/controlLevel.d.ts.map +1 -0
- package/dist/controlLevel.js +11 -0
- package/dist/controlLevel.js.map +1 -0
- package/dist/envelope.d.ts +582 -0
- package/dist/envelope.d.ts.map +1 -0
- package/dist/envelope.js +64 -0
- package/dist/envelope.js.map +1 -0
- package/dist/events.d.ts +441 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +88 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/interactionEvents.d.ts +182 -0
- package/dist/interactionEvents.d.ts.map +1 -0
- package/dist/interactionEvents.js +92 -0
- package/dist/interactionEvents.js.map +1 -0
- package/dist/legacyProtocol.d.ts +385 -0
- package/dist/legacyProtocol.d.ts.map +1 -0
- package/dist/legacyProtocol.js +30 -0
- package/dist/legacyProtocol.js.map +1 -0
- package/dist/machine.d.ts +45 -0
- package/dist/machine.d.ts.map +1 -0
- package/dist/machine.js +28 -0
- package/dist/machine.js.map +1 -0
- package/dist/messageMeta.d.ts +49 -0
- package/dist/messageMeta.d.ts.map +1 -0
- package/dist/messageMeta.js +33 -0
- package/dist/messageMeta.js.map +1 -0
- package/dist/messages.d.ts +1843 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +35 -0
- package/dist/messages.js.map +1 -0
- package/dist/pairing.d.ts +133 -0
- package/dist/pairing.d.ts.map +1 -0
- package/dist/pairing.js +115 -0
- package/dist/pairing.js.map +1 -0
- package/dist/rpc.d.ts +340 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +115 -0
- package/dist/rpc.js.map +1 -0
- package/dist/sessionResult.d.ts +40 -0
- package/dist/sessionResult.d.ts.map +1 -0
- package/dist/sessionResult.js +23 -0
- package/dist/sessionResult.js.map +1 -0
- package/dist/spawnError.d.ts +40 -0
- package/dist/spawnError.d.ts.map +1 -0
- package/dist/spawnError.js +31 -0
- package/dist/spawnError.js.map +1 -0
- package/dist/stats.d.ts +1213 -0
- package/dist/stats.d.ts.map +1 -0
- package/dist/stats.js +79 -0
- package/dist/stats.js.map +1 -0
- package/dist/sync.d.ts +721 -0
- package/dist/sync.d.ts.map +1 -0
- package/dist/sync.js +62 -0
- package/dist/sync.js.map +1 -0
- package/dist/team.d.ts +1557 -0
- package/dist/team.d.ts.map +1 -0
- package/dist/team.js +93 -0
- package/dist/team.js.map +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# @agentdock/wire
|
|
2
|
+
|
|
3
|
+
> 协议定义层 — 系统的「宪法」。所有组件通过这里定义的格式通信。
|
|
4
|
+
|
|
5
|
+
## 概述
|
|
6
|
+
|
|
7
|
+
wire 是 AgentDock monorepo 的最底层包,**零运行时依赖**(仅 Zod + cuid2)。它定义了:
|
|
8
|
+
|
|
9
|
+
- 会话事件(agent 产生的文本、工具调用、文件变更等)
|
|
10
|
+
- 信封(给事件加上 id/时间戳/角色/turn 等元数据)
|
|
11
|
+
- 消息格式(加密后的消息结构)
|
|
12
|
+
- RPC 方法(客户端与服务端的远程调用协议)
|
|
13
|
+
- 同步协议(增量更新、版本控制、冲突解决)
|
|
14
|
+
- 元数据(权限模式、CLI 类型、控制深度等级)
|
|
15
|
+
|
|
16
|
+
所有 schema 使用 Zod 定义,提供**编译时类型推断 + 运行时验证**双重保障。
|
|
17
|
+
|
|
18
|
+
## 在架构中的位置
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
wire ← crypto ← sdk ← web
|
|
22
|
+
wire ← server
|
|
23
|
+
wire ← crypto ← daemon
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
wire 被所有其他包依赖,是唯一的零依赖底层包。
|
|
27
|
+
|
|
28
|
+
## 模块结构
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
src/
|
|
32
|
+
├── events.ts # 12 种会话事件 schema(text/service/tool-call/file/turn/start/stop/question/permission/answer)
|
|
33
|
+
├── interactionEvents.ts # 交互事件(question/permission-request/answer)
|
|
34
|
+
├── envelope.ts # SessionEnvelope — 事件 + 元数据封装(superRefine 交叉约束)
|
|
35
|
+
├── messages.ts # SessionMessage — 加密消息格式 + SessionProtocolMessage
|
|
36
|
+
├── messageMeta.ts # MessageMeta — 权限模式、CLI 类型、代价等元数据
|
|
37
|
+
├── rpc.ts # RPC 方法/参数/返回值 schema(daemon ↔ server ↔ client)
|
|
38
|
+
├── sync.ts # CoreUpdate — 增量同步协议 + VersionedEncryptedValue
|
|
39
|
+
├── legacyProtocol.ts # 旧版协议兼容(SessionProtocolMessage 转换)
|
|
40
|
+
├── controlLevel.ts # ControlLevel 枚举(L0-L3 控制深度)+ CLI 类型定义
|
|
41
|
+
├── pairing.ts # 设备配对协议 schema(PairingRequest/Response/Status)
|
|
42
|
+
├── utils.ts # createId (cuid2)、Unix 时间戳工具
|
|
43
|
+
└── index.ts # Barrel exports
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## API 参考
|
|
47
|
+
|
|
48
|
+
### 会话事件 (events.ts)
|
|
49
|
+
|
|
50
|
+
12 种事件类型,通过 `t` 字段的 discriminated union 区分:
|
|
51
|
+
|
|
52
|
+
| 事件 | `t` 值 | 关键字段 | 说明 |
|
|
53
|
+
| ------------- | -------------------- | ------------------------------------------------ | --------------------------------- |
|
|
54
|
+
| Text | `text` | `text`, `thinking?` | AI 输出文本(含思考模式标记) |
|
|
55
|
+
| Service | `service` | `text` | 系统服务消息 |
|
|
56
|
+
| ToolCallStart | `tool-call-start` | `call`, `name`, `title`, `description`, `args` | 工具调用开始 |
|
|
57
|
+
| ToolCallEnd | `tool-call-end` | `call` | 工具调用结束 |
|
|
58
|
+
| File | `file` | `ref`, `name`, `size`, `image?` | 文件变更 |
|
|
59
|
+
| TurnStart | `turn-start` | — | 对话轮次开始 |
|
|
60
|
+
| TurnEnd | `turn-end` | `status: completed\|failed\|cancelled`, `usage?` | 对话轮次结束(含可选 token 用量) |
|
|
61
|
+
| Start | `start` | `title?` | 会话开始 |
|
|
62
|
+
| Stop | `stop` | — | 会话结束 |
|
|
63
|
+
| Question | `question` | `requestId`, `text`, `questionType?` | Agent 向用户提问 |
|
|
64
|
+
| PermRequest | `permission-request` | `requestId`, `toolName`, `toolCallId`, `args` | 工具权限请求 |
|
|
65
|
+
| Answer | `answer` | `requestId`, `text` | 用户回答 |
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { SessionEventSchema } from '@agentdock/wire';
|
|
69
|
+
|
|
70
|
+
const result = SessionEventSchema.safeParse({
|
|
71
|
+
t: 'text',
|
|
72
|
+
text: 'Hello world',
|
|
73
|
+
thinking: false,
|
|
74
|
+
});
|
|
75
|
+
// result.success === true
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 信封 (envelope.ts)
|
|
79
|
+
|
|
80
|
+
`SessionEnvelope` 将事件包装为可传输的完整消息单元:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
import { createEnvelope } from '@agentdock/wire';
|
|
84
|
+
|
|
85
|
+
const envelope = createEnvelope(
|
|
86
|
+
'agent',
|
|
87
|
+
{ t: 'text', text: 'Hello' },
|
|
88
|
+
{
|
|
89
|
+
turn: 'turn-001',
|
|
90
|
+
// id 和 time 自动生成
|
|
91
|
+
},
|
|
92
|
+
);
|
|
93
|
+
// { id: 'cuid2...', time: 1709..., role: 'agent', turn: 'turn-001', ev: { t: 'text', text: 'Hello' } }
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**superRefine 约束**:`service`/`start`/`stop` 事件的 `role` 必须为 `'agent'`。
|
|
97
|
+
|
|
98
|
+
### 消息 (messages.ts)
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
import type { SessionMessage } from '@agentdock/wire';
|
|
102
|
+
|
|
103
|
+
// SessionMessage = 加密后的消息格式
|
|
104
|
+
// content: { c: string (密文), n: string (nonce) }
|
|
105
|
+
// createdAt / updatedAt: Unix timestamp (number)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### RPC (rpc.ts)
|
|
109
|
+
|
|
110
|
+
定义 daemon ↔ server ↔ client 之间的远程调用方法:
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
import { RpcMethodSchema } from '@agentdock/wire';
|
|
114
|
+
// 包含方法名、参数 schema、返回值 schema
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 同步协议 (sync.ts)
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import type { CoreUpdate } from '@agentdock/wire';
|
|
121
|
+
// CoreUpdate: 增量更新载体
|
|
122
|
+
// VersionedEncryptedValue: 带版本号的加密值(乐观锁)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 控制深度 (controlLevel.ts)
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { ControlLevelSchema, CliTypeSchema } from '@agentdock/wire';
|
|
129
|
+
|
|
130
|
+
// ControlLevel: 0(最低) | 1(仅监控) | 2(高控制) | 3(完全控制)
|
|
131
|
+
// CliType: 'claude' | 'copilot' | 'opencode' | 'codex' | 'gemini' | 'qwen'
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 开发
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# 运行测试(300 tests)
|
|
138
|
+
pnpm --filter @agentdock/wire test
|
|
139
|
+
|
|
140
|
+
# 覆盖率(目标 95%+)
|
|
141
|
+
pnpm --filter @agentdock/wire test:coverage
|
|
142
|
+
|
|
143
|
+
# 类型检查
|
|
144
|
+
pnpm --filter @agentdock/wire typecheck
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## 设计决策
|
|
148
|
+
|
|
149
|
+
- **字段名对齐 Happy**:`call`/`name`/`args`(非 `toolId`/`toolName`/`params`),确保协议兼容
|
|
150
|
+
- **cuid2 作为 ID**:`subagent` 字段用 cuid2 验证,`id` 用 `createId()` 生成
|
|
151
|
+
- **Unix number 时间戳**:`time`/`createdAt`/`updatedAt` 都是 Unix 毫秒数,非 ISO string
|
|
152
|
+
- **discriminated union**:`SessionEventSchema` 用 `t` 字段做类型判别,而非 `type`
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent capability matrix — static mapping of which features each CLI agent supports.
|
|
3
|
+
*
|
|
4
|
+
* Web UI uses this to conditionally show/hide spawn parameters
|
|
5
|
+
* (model, systemPrompt, tools, permissions, etc.) based on the selected agent.
|
|
6
|
+
*
|
|
7
|
+
* Model options live in agentModels.ts (separate concern).
|
|
8
|
+
*/
|
|
9
|
+
import type { ControlLevelType } from './controlLevel.js';
|
|
10
|
+
export interface AgentPermissionMode {
|
|
11
|
+
readonly value: string;
|
|
12
|
+
readonly labelKey: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AgentCapability {
|
|
15
|
+
readonly controlLevel: ControlLevelType;
|
|
16
|
+
readonly supportsModel: boolean;
|
|
17
|
+
readonly supportsSystemPrompt: boolean;
|
|
18
|
+
readonly supportsToolConfig: boolean;
|
|
19
|
+
readonly supportsMcpConfig: boolean;
|
|
20
|
+
readonly supportsPermissionMode: boolean;
|
|
21
|
+
readonly supportsResume: boolean;
|
|
22
|
+
readonly supportsMaxTurns: boolean;
|
|
23
|
+
readonly supportsSlashClear: boolean;
|
|
24
|
+
/** Permission modes available for this agent. Empty = no selector. */
|
|
25
|
+
readonly permissionModes: readonly AgentPermissionMode[];
|
|
26
|
+
}
|
|
27
|
+
export declare const AGENT_CAPABILITIES: Readonly<Record<string, AgentCapability>>;
|
|
28
|
+
/** Get capability for an agent, falling back to minimal (Level 0) for unknown agents. */
|
|
29
|
+
export declare function getAgentCapability(agentType: string): AgentCapability;
|
|
30
|
+
//# sourceMappingURL=agentCapabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentCapabilities.d.ts","sourceRoot":"","sources":["../src/agentCapabilities.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,YAAY,EAAE,gBAAgB,CAAC;IACxC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAC;IACvC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;IACrC,sEAAsE;IACtE,QAAQ,CAAC,eAAe,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC1D;AAwBD,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CA6D/D,CAAC;AAEX,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,CAerE"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent capability matrix — static mapping of which features each CLI agent supports.
|
|
3
|
+
*
|
|
4
|
+
* Web UI uses this to conditionally show/hide spawn parameters
|
|
5
|
+
* (model, systemPrompt, tools, permissions, etc.) based on the selected agent.
|
|
6
|
+
*
|
|
7
|
+
* Model options live in agentModels.ts (separate concern).
|
|
8
|
+
*/
|
|
9
|
+
// ── Per-agent permission modes ──────────────────────────────────────
|
|
10
|
+
const CLAUDE_PERMISSION_MODES = [
|
|
11
|
+
{ value: 'default', labelKey: 'permissionDefault' },
|
|
12
|
+
{ value: 'acceptEdits', labelKey: 'permissionAutoEdit' },
|
|
13
|
+
{ value: 'plan', labelKey: 'permissionPlan' },
|
|
14
|
+
{ value: 'bypassPermissions', labelKey: 'permissionFullAuto' },
|
|
15
|
+
];
|
|
16
|
+
const COPILOT_PERMISSION_MODES = [
|
|
17
|
+
{ value: 'default', labelKey: 'permissionDefault' },
|
|
18
|
+
{ value: 'plan', labelKey: 'permissionPlan' },
|
|
19
|
+
{ value: 'bypassPermissions', labelKey: 'permissionFullAuto' },
|
|
20
|
+
];
|
|
21
|
+
const CODEX_PERMISSION_MODES = [
|
|
22
|
+
{ value: 'default', labelKey: 'permissionDefault' },
|
|
23
|
+
{ value: 'bypassPermissions', labelKey: 'permissionFullAuto' },
|
|
24
|
+
];
|
|
25
|
+
// ── Capability matrix ───────────────────────────────────────────────
|
|
26
|
+
export const AGENT_CAPABILITIES = {
|
|
27
|
+
claude: {
|
|
28
|
+
controlLevel: 3,
|
|
29
|
+
supportsModel: true,
|
|
30
|
+
supportsSystemPrompt: true,
|
|
31
|
+
supportsToolConfig: true,
|
|
32
|
+
supportsMcpConfig: true,
|
|
33
|
+
supportsPermissionMode: true,
|
|
34
|
+
supportsResume: true,
|
|
35
|
+
supportsMaxTurns: true,
|
|
36
|
+
supportsSlashClear: true,
|
|
37
|
+
permissionModes: CLAUDE_PERMISSION_MODES,
|
|
38
|
+
},
|
|
39
|
+
copilot: {
|
|
40
|
+
controlLevel: 3,
|
|
41
|
+
supportsModel: true,
|
|
42
|
+
supportsSystemPrompt: false,
|
|
43
|
+
supportsToolConfig: true,
|
|
44
|
+
supportsMcpConfig: true,
|
|
45
|
+
supportsPermissionMode: true,
|
|
46
|
+
supportsResume: true,
|
|
47
|
+
supportsMaxTurns: false,
|
|
48
|
+
supportsSlashClear: false,
|
|
49
|
+
permissionModes: COPILOT_PERMISSION_MODES,
|
|
50
|
+
},
|
|
51
|
+
opencode: {
|
|
52
|
+
controlLevel: 3,
|
|
53
|
+
supportsModel: true,
|
|
54
|
+
supportsSystemPrompt: true,
|
|
55
|
+
supportsToolConfig: true,
|
|
56
|
+
supportsMcpConfig: true,
|
|
57
|
+
supportsPermissionMode: true,
|
|
58
|
+
supportsResume: true,
|
|
59
|
+
supportsMaxTurns: false,
|
|
60
|
+
supportsSlashClear: false,
|
|
61
|
+
permissionModes: CLAUDE_PERMISSION_MODES,
|
|
62
|
+
},
|
|
63
|
+
codex: {
|
|
64
|
+
controlLevel: 2,
|
|
65
|
+
supportsModel: true,
|
|
66
|
+
supportsSystemPrompt: false,
|
|
67
|
+
supportsToolConfig: false,
|
|
68
|
+
supportsMcpConfig: false,
|
|
69
|
+
supportsPermissionMode: true,
|
|
70
|
+
supportsResume: true,
|
|
71
|
+
supportsMaxTurns: false,
|
|
72
|
+
supportsSlashClear: false,
|
|
73
|
+
permissionModes: CODEX_PERMISSION_MODES,
|
|
74
|
+
},
|
|
75
|
+
gemini: {
|
|
76
|
+
controlLevel: 1,
|
|
77
|
+
supportsModel: true,
|
|
78
|
+
supportsSystemPrompt: false,
|
|
79
|
+
supportsToolConfig: false,
|
|
80
|
+
supportsMcpConfig: false,
|
|
81
|
+
supportsPermissionMode: false,
|
|
82
|
+
supportsResume: false,
|
|
83
|
+
supportsMaxTurns: false,
|
|
84
|
+
supportsSlashClear: false,
|
|
85
|
+
permissionModes: [],
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
/** Get capability for an agent, falling back to minimal (Level 0) for unknown agents. */
|
|
89
|
+
export function getAgentCapability(agentType) {
|
|
90
|
+
return (AGENT_CAPABILITIES[agentType] ?? {
|
|
91
|
+
controlLevel: 0,
|
|
92
|
+
supportsModel: false,
|
|
93
|
+
supportsSystemPrompt: false,
|
|
94
|
+
supportsToolConfig: false,
|
|
95
|
+
supportsMcpConfig: false,
|
|
96
|
+
supportsPermissionMode: false,
|
|
97
|
+
supportsResume: false,
|
|
98
|
+
supportsMaxTurns: false,
|
|
99
|
+
supportsSlashClear: false,
|
|
100
|
+
permissionModes: [],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=agentCapabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentCapabilities.js","sourceRoot":"","sources":["../src/agentCapabilities.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-agent install instructions for the web UI.
|
|
3
|
+
*
|
|
4
|
+
* Display-only data — the actual gating logic lives in daemon's registry.
|
|
5
|
+
* Wire only has the strings so the web can render install/upgrade instructions.
|
|
6
|
+
*/
|
|
7
|
+
import type { AgentType } from './messageMeta.js';
|
|
8
|
+
import type { Platform } from './machine.js';
|
|
9
|
+
export interface AgentInstallInfo {
|
|
10
|
+
readonly minVersion: string;
|
|
11
|
+
readonly install: Readonly<Record<Platform, string>>;
|
|
12
|
+
readonly upgradeUrl: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const AGENT_INSTALL_GUIDE: Readonly<Record<AgentType, AgentInstallInfo>>;
|
|
15
|
+
//# sourceMappingURL=agentInstallGuide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentInstallGuide.d.ts","sourceRoot":"","sources":["../src/agentInstallGuide.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,gBAAgB,CAAC,CA0D7E,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-agent install instructions for the web UI.
|
|
3
|
+
*
|
|
4
|
+
* Display-only data — the actual gating logic lives in daemon's registry.
|
|
5
|
+
* Wire only has the strings so the web can render install/upgrade instructions.
|
|
6
|
+
*/
|
|
7
|
+
export const AGENT_INSTALL_GUIDE = {
|
|
8
|
+
claude: {
|
|
9
|
+
minVersion: '1.0.0',
|
|
10
|
+
install: {
|
|
11
|
+
darwin: 'curl -fsSL https://claude.ai/install.sh | bash',
|
|
12
|
+
linux: 'curl -fsSL https://claude.ai/install.sh | bash',
|
|
13
|
+
win32: 'irm https://claude.ai/install.ps1 | iex',
|
|
14
|
+
},
|
|
15
|
+
upgradeUrl: 'https://code.claude.com/docs/en/overview',
|
|
16
|
+
},
|
|
17
|
+
copilot: {
|
|
18
|
+
minVersion: '0.1.0',
|
|
19
|
+
install: {
|
|
20
|
+
darwin: 'curl -fsSL https://claude.ai/install.sh | bash # then: see https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli',
|
|
21
|
+
linux: 'curl -fsSL https://claude.ai/install.sh | bash # then: see https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli',
|
|
22
|
+
win32: 'irm https://claude.ai/install.ps1 | iex # then: see https://docs.github.com/en/copilot/how-tos/set-up/install-copilot-cli',
|
|
23
|
+
},
|
|
24
|
+
upgradeUrl: 'https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli',
|
|
25
|
+
},
|
|
26
|
+
codex: {
|
|
27
|
+
minVersion: '0.43.0',
|
|
28
|
+
install: {
|
|
29
|
+
darwin: 'npm install -g @openai/codex',
|
|
30
|
+
linux: 'npm install -g @openai/codex',
|
|
31
|
+
win32: 'npm install -g @openai/codex',
|
|
32
|
+
},
|
|
33
|
+
upgradeUrl: 'https://github.com/openai/codex',
|
|
34
|
+
},
|
|
35
|
+
gemini: {
|
|
36
|
+
minVersion: '0.1.0',
|
|
37
|
+
install: {
|
|
38
|
+
darwin: 'npm install -g @google/gemini-cli',
|
|
39
|
+
linux: 'npm install -g @google/gemini-cli',
|
|
40
|
+
win32: 'npm install -g @google/gemini-cli',
|
|
41
|
+
},
|
|
42
|
+
upgradeUrl: 'https://github.com/google-gemini/gemini-cli',
|
|
43
|
+
},
|
|
44
|
+
opencode: {
|
|
45
|
+
minVersion: '0.1.0',
|
|
46
|
+
install: {
|
|
47
|
+
darwin: 'curl -fsSL https://opencode.ai/install | bash',
|
|
48
|
+
linux: 'curl -fsSL https://opencode.ai/install | bash',
|
|
49
|
+
win32: 'npm install -g opencode-ai',
|
|
50
|
+
},
|
|
51
|
+
upgradeUrl: 'https://opencode.ai',
|
|
52
|
+
},
|
|
53
|
+
custom: {
|
|
54
|
+
minVersion: '0.0.0',
|
|
55
|
+
install: {
|
|
56
|
+
darwin: 'Install the custom agent CLI per its documentation',
|
|
57
|
+
linux: 'Install the custom agent CLI per its documentation',
|
|
58
|
+
win32: 'Install the custom agent CLI per its documentation',
|
|
59
|
+
},
|
|
60
|
+
upgradeUrl: '',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=agentInstallGuide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentInstallGuide.js","sourceRoot":"","sources":["../src/agentInstallGuide.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,MAAM,CAAC,MAAM,mBAAmB,GAAkD;IAChF,MAAM,EAAE;QACN,UAAU,EAAE,OAAO;QACnB,OAAO,EAAE;YACP,MAAM,EAAE,gDAAgD;YACxD,KAAK,EAAE,gDAAgD;YACvD,KAAK,EAAE,yCAAyC;SACjD;QACD,UAAU,EAAE,0CAA0C;KACvD;IACD,OAAO,EAAE;QACP,UAAU,EAAE,OAAO;QACnB,OAAO,EAAE;YACP,MAAM,EACJ,mIAAmI;YACrI,KAAK,EACH,mIAAmI;YACrI,KAAK,EACH,4HAA4H;SAC/H;QACD,UAAU,EAAE,sEAAsE;KACnF;IACD,KAAK,EAAE;QACL,UAAU,EAAE,QAAQ;QACpB,OAAO,EAAE;YACP,MAAM,EAAE,8BAA8B;YACtC,KAAK,EAAE,8BAA8B;YACrC,KAAK,EAAE,8BAA8B;SACtC;QACD,UAAU,EAAE,iCAAiC;KAC9C;IACD,MAAM,EAAE;QACN,UAAU,EAAE,OAAO;QACnB,OAAO,EAAE;YACP,MAAM,EAAE,mCAAmC;YAC3C,KAAK,EAAE,mCAAmC;YAC1C,KAAK,EAAE,mCAAmC;SAC3C;QACD,UAAU,EAAE,6CAA6C;KAC1D;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,OAAO;QACnB,OAAO,EAAE;YACP,MAAM,EAAE,+CAA+C;YACvD,KAAK,EAAE,+CAA+C;YACtD,KAAK,EAAE,4BAA4B;SACpC;QACD,UAAU,EAAE,qBAAqB;KAClC;IACD,MAAM,EAAE;QACN,UAAU,EAAE,OAAO;QACnB,OAAO,EAAE;YACP,MAAM,EAAE,oDAAoD;YAC5D,KAAK,EAAE,oDAAoD;YAC3D,KAAK,EAAE,oDAAoD;SAC5D;QACD,UAAU,EAAE,EAAE;KACf;CACF,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent model options — known models per CLI agent for UI selection.
|
|
3
|
+
*
|
|
4
|
+
* Labels MUST match what users see in each CLI's TUI.
|
|
5
|
+
* Values are the short keys / model IDs accepted by each CLI's --model flag.
|
|
6
|
+
*
|
|
7
|
+
* For ACP agents (copilot), this is a static fallback — in production,
|
|
8
|
+
* models should come dynamically from ACP session/new response.
|
|
9
|
+
*
|
|
10
|
+
* Ref: Happy modelModeOptions.ts, docs/research/copilot-cli-acp.md
|
|
11
|
+
*/
|
|
12
|
+
export interface AgentModelOption {
|
|
13
|
+
readonly value: string;
|
|
14
|
+
readonly label: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AgentModelConfig {
|
|
17
|
+
readonly defaultModel: string;
|
|
18
|
+
readonly models: readonly AgentModelOption[];
|
|
19
|
+
}
|
|
20
|
+
export declare const AGENT_MODELS: Readonly<Record<string, AgentModelConfig>>;
|
|
21
|
+
/** Get model config for an agent, falling back to default-only for unknown. */
|
|
22
|
+
export declare function getAgentModels(agentType: string): AgentModelConfig;
|
|
23
|
+
//# sourceMappingURL=agentModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentModels.d.ts","sourceRoot":"","sources":["../src/agentModels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC9C;AAED,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAyD1D,CAAC;AAEX,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAOlE"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent model options — known models per CLI agent for UI selection.
|
|
3
|
+
*
|
|
4
|
+
* Labels MUST match what users see in each CLI's TUI.
|
|
5
|
+
* Values are the short keys / model IDs accepted by each CLI's --model flag.
|
|
6
|
+
*
|
|
7
|
+
* For ACP agents (copilot), this is a static fallback — in production,
|
|
8
|
+
* models should come dynamically from ACP session/new response.
|
|
9
|
+
*
|
|
10
|
+
* Ref: Happy modelModeOptions.ts, docs/research/copilot-cli-acp.md
|
|
11
|
+
*/
|
|
12
|
+
export const AGENT_MODELS = {
|
|
13
|
+
claude: {
|
|
14
|
+
defaultModel: '',
|
|
15
|
+
models: [
|
|
16
|
+
{ value: '', label: '' },
|
|
17
|
+
{ value: 'sonnet', label: 'Sonnet' },
|
|
18
|
+
{ value: 'opus', label: 'Opus' },
|
|
19
|
+
{ value: 'haiku', label: 'Haiku' },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
copilot: {
|
|
23
|
+
defaultModel: '',
|
|
24
|
+
models: [
|
|
25
|
+
{ value: '', label: '' },
|
|
26
|
+
{ value: 'gpt-5.3-codex', label: 'GPT-5.3-Codex' },
|
|
27
|
+
{ value: 'gpt-5.2-codex', label: 'GPT-5.2-Codex' },
|
|
28
|
+
{ value: 'gpt-5.2', label: 'GPT-5.2' },
|
|
29
|
+
{ value: 'gpt-5.1-codex-max', label: 'GPT-5.1-Codex-Max' },
|
|
30
|
+
{ value: 'gpt-5.1-codex', label: 'GPT-5.1-Codex' },
|
|
31
|
+
{ value: 'gpt-5.1', label: 'GPT-5.1' },
|
|
32
|
+
{ value: 'gpt-5.1-codex-mini', label: 'GPT-5.1-Codex-Mini' },
|
|
33
|
+
{ value: 'gpt-5-mini', label: 'GPT-5 mini' },
|
|
34
|
+
{ value: 'gpt-4.1', label: 'GPT-4.1' },
|
|
35
|
+
{ value: 'claude-sonnet-4.6', label: 'Claude Sonnet 4.6' },
|
|
36
|
+
{ value: 'claude-sonnet-4.5', label: 'Claude Sonnet 4.5' },
|
|
37
|
+
{ value: 'claude-haiku-4.5', label: 'Claude Haiku 4.5' },
|
|
38
|
+
{ value: 'claude-opus-4.6', label: 'Claude Opus 4.6' },
|
|
39
|
+
{ value: 'claude-opus-4.5', label: 'Claude Opus 4.5' },
|
|
40
|
+
{ value: 'claude-sonnet-4', label: 'Claude Sonnet 4' },
|
|
41
|
+
{ value: 'gemini-3-pro-preview', label: 'Gemini 3 Pro (Preview)' },
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
opencode: {
|
|
45
|
+
defaultModel: '',
|
|
46
|
+
models: [
|
|
47
|
+
{ value: '', label: '' },
|
|
48
|
+
{ value: 'sonnet', label: 'Sonnet' },
|
|
49
|
+
{ value: 'opus', label: 'Opus' },
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
codex: {
|
|
53
|
+
defaultModel: '',
|
|
54
|
+
models: [
|
|
55
|
+
{ value: '', label: '' },
|
|
56
|
+
{ value: 'o3', label: 'o3' },
|
|
57
|
+
{ value: 'o4-mini', label: 'o4-mini' },
|
|
58
|
+
{ value: 'gpt-4.1', label: 'GPT 4.1' },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
gemini: {
|
|
62
|
+
defaultModel: '',
|
|
63
|
+
models: [
|
|
64
|
+
{ value: '', label: '' },
|
|
65
|
+
{ value: 'gemini-2.5-pro', label: 'Gemini 2.5 Pro' },
|
|
66
|
+
{ value: 'gemini-2.5-flash', label: 'Gemini 2.5 Flash' },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
/** Get model config for an agent, falling back to default-only for unknown. */
|
|
71
|
+
export function getAgentModels(agentType) {
|
|
72
|
+
return (AGENT_MODELS[agentType] ?? {
|
|
73
|
+
defaultModel: '',
|
|
74
|
+
models: [{ value: '', label: '' }],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=agentModels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agentModels.js","sourceRoot":"","sources":["../src/agentModels.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Control depth level for CLI tools.
|
|
4
|
+
*
|
|
5
|
+
* Level 3: Full control — bidirectional ACP, per-tool permissions, resume (Claude Code, OpenCode)
|
|
6
|
+
* Level 2: High control — JSONL + resume + pre-configured permissions (Codex CLI)
|
|
7
|
+
* Level 1: Read-only monitoring — JSONL + no resume + binary permissions (Gemini, Qwen)
|
|
8
|
+
* Level 0: Minimal — plain text + no multi-turn (Aider, not recommended)
|
|
9
|
+
*/
|
|
10
|
+
export declare const ControlLevel: z.ZodUnion<[z.ZodLiteral<3>, z.ZodLiteral<2>, z.ZodLiteral<1>, z.ZodLiteral<0>]>;
|
|
11
|
+
export type ControlLevelType = z.infer<typeof ControlLevel>;
|
|
12
|
+
//# sourceMappingURL=controlLevel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controlLevel.d.ts","sourceRoot":"","sources":["../src/controlLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,kFAAoE,CAAC;AAE9F,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Control depth level for CLI tools.
|
|
4
|
+
*
|
|
5
|
+
* Level 3: Full control — bidirectional ACP, per-tool permissions, resume (Claude Code, OpenCode)
|
|
6
|
+
* Level 2: High control — JSONL + resume + pre-configured permissions (Codex CLI)
|
|
7
|
+
* Level 1: Read-only monitoring — JSONL + no resume + binary permissions (Gemini, Qwen)
|
|
8
|
+
* Level 0: Minimal — plain text + no multi-turn (Aider, not recommended)
|
|
9
|
+
*/
|
|
10
|
+
export const ControlLevel = z.union([z.literal(3), z.literal(2), z.literal(1), z.literal(0)]);
|
|
11
|
+
//# sourceMappingURL=controlLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"controlLevel.js","sourceRoot":"","sources":["../src/controlLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|