deplyze-code 0.1.0 → 0.1.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/README.en.md +161 -210
- package/README.md +161 -210
- package/bin/deplyze +2 -0
- package/package.json +13 -10
- package/preload.ts +2 -2
- package/scripts/smoke.ts +491 -0
- package/src/QueryEngine.ts +2 -3
- package/src/commands/peers/index.ts +50 -0
- package/src/components/PromptInput/Notifications.tsx +9 -4
- package/src/components/PromptInput/PromptInputFooterLeftSide.tsx +3 -4
- package/src/components/PromptInput/footerAuthStatus.ts +41 -0
- package/src/components/memory/MemoryFileSelector.tsx +9 -7
- package/src/coordinator/coordinatorMode.ts +1 -5
- package/src/coordinator/workerAgent.ts +30 -0
- package/src/hooks/useApiKeyVerification.ts +71 -39
- package/src/main.tsx +22 -25
- package/src/screens/REPL.tsx +35 -40
- package/src/screens/ResumeConversation.tsx +30 -34
- package/src/services/autoDream/autoDream.ts +21 -3
- package/src/services/autoDream/config.ts +35 -3
- package/src/tools/AgentTool/AgentTool.tsx +3 -3
- package/src/tools/AgentTool/builtInAgents.ts +6 -8
- package/src/tools/ListPeersTool/ListPeersTool.ts +79 -0
- package/src/tools.ts +4 -11
- package/src/utils/concurrentSessions.ts +182 -32
- package/src/utils/sessionRestore.ts +5 -9
- package/src/utils/systemPrompt.ts +0 -1
- package/src/utils/toolPool.ts +4 -8
- package/src/utils/udsClient.ts +40 -0
- package/src/utils/udsMessaging.ts +98 -0
- package/tests/autoDream.test.ts +140 -0
- package/tests/coordinatorMode.test.ts +80 -0
- package/tests/footerAuthStatus.test.ts +54 -0
- package/tests/udsInbox.test.ts +124 -0
package/README.md
CHANGED
|
@@ -1,210 +1,161 @@
|
|
|
1
|
-
# Deplyze Code
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
PowerShell:
|
|
164
|
-
|
|
165
|
-
```powershell
|
|
166
|
-
$env:CLAUDE_CODE_FORCE_RECOVERY_CLI='1'
|
|
167
|
-
bun ./bin/deplyze
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## 项目结构
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
bin/deplyze # 发布入口脚本
|
|
176
|
-
preload.ts # Bun preload(设置 MACRO 全局变量)
|
|
177
|
-
.env.example # 环境变量模板
|
|
178
|
-
src/
|
|
179
|
-
├── entrypoints/cli.tsx # CLI 主入口
|
|
180
|
-
├── main.tsx # TUI 主逻辑(Commander.js + React/Ink)
|
|
181
|
-
├── localRecoveryCli.ts # Recovery CLI
|
|
182
|
-
├── screens/REPL.tsx # 交互式 REPL 界面
|
|
183
|
-
├── components/ # UI 组件
|
|
184
|
-
├── commands/ # 斜杠命令
|
|
185
|
-
├── tools/ # Agent 工具(Bash、Edit、Grep 等)
|
|
186
|
-
├── services/ # 服务层
|
|
187
|
-
├── hooks/ # React hooks
|
|
188
|
-
└── utils/ # 工具函数
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
---
|
|
192
|
-
|
|
193
|
-
## 技术栈
|
|
194
|
-
|
|
195
|
-
| 类别 | 技术 |
|
|
196
|
-
|------|------|
|
|
197
|
-
| 运行时 | [Bun](https://bun.sh) |
|
|
198
|
-
| 语言 | TypeScript |
|
|
199
|
-
| 终端 UI | React + [Ink](https://github.com/vadimdemedes/ink) |
|
|
200
|
-
| CLI 解析 | Commander.js |
|
|
201
|
-
| API | Gemini + [`@google/genai`](https://www.npmjs.com/package/@google/genai) |
|
|
202
|
-
| 协议 | MCP, LSP |
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
## 说明
|
|
207
|
-
|
|
208
|
-
- 当前主流程只要求 `GEMINI_API_KEY`。
|
|
209
|
-
- 仓库中仍保留旧登录与旧 onboarding 代码,但正常 Gemini 使用不依赖它们。
|
|
210
|
-
- `CLAUDE.md` 文件名出于兼容性考虑暂时保持不变。
|
|
1
|
+
# Deplyze Code
|
|
2
|
+
|
|
3
|
+
Deplyze Code is a Gemini-powered terminal coding assistant with an interactive Ink TUI, REPL, tools, and slash commands.
|
|
4
|
+
|
|
5
|
+
This package is intended to be installed globally and started with:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
deplyze
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Status
|
|
12
|
+
|
|
13
|
+
- Current private release: `0.1.3`
|
|
14
|
+
- Active auth path: Gemini API key
|
|
15
|
+
- Active model picker: Gemini 3.1 Pro, Gemini 3 Flash, Gemini 3.1 Flash-Lite
|
|
16
|
+
- `CLAUDE.md` remains the repository guidance filename for compatibility
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
Install Bun first if it is not already available:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
curl -fsSL https://bun.sh/install | bash
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Install the package globally:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g deplyze-code
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Required Environment Variable
|
|
37
|
+
|
|
38
|
+
Set your Gemini API key:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
export GEMINI_API_KEY="your_api_key_here"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
PowerShell:
|
|
45
|
+
|
|
46
|
+
```powershell
|
|
47
|
+
$env:GEMINI_API_KEY="your_api_key_here"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Optional:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
export GEMINI_MODEL="gemini-3.1-pro-preview"
|
|
54
|
+
export GEMINI_SMALL_FAST_MODEL="gemini-3.1-flash-lite-preview"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Start
|
|
58
|
+
|
|
59
|
+
Run:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
deplyze
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
On first launch with `GEMINI_API_KEY` set, Deplyze Code should open directly into the main REPL without the legacy onboarding flow.
|
|
66
|
+
|
|
67
|
+
## If `deplyze` Is Not Found
|
|
68
|
+
|
|
69
|
+
If global install succeeds but the shell says `deplyze` is not recognized, your npm global bin directory is probably not on `PATH`.
|
|
70
|
+
|
|
71
|
+
Check the prefix:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm prefix -g
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Make sure the corresponding global bin directory is on your shell `PATH`, then reopen the terminal.
|
|
78
|
+
|
|
79
|
+
## Basic Usage
|
|
80
|
+
|
|
81
|
+
Plain interactive launch:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
deplyze
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Single prompt:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
deplyze -p "hello"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Repository question:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
deplyze -p "Inspect this repository and tell me what file launches the REPL."
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Bash tool example:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
deplyze -p "Use the Bash tool to print the current working directory, then answer with only that path." --allowedTools Bash --dangerously-skip-permissions
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Model Switching
|
|
106
|
+
|
|
107
|
+
Inside the interactive UI, run:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
/model
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Available models in the active UI:
|
|
114
|
+
|
|
115
|
+
- `Gemini 3.1 Pro`
|
|
116
|
+
- `Gemini 3 Flash`
|
|
117
|
+
- `Gemini 3.1 Flash-Lite`
|
|
118
|
+
|
|
119
|
+
Underlying Gemini API model handles:
|
|
120
|
+
|
|
121
|
+
- `gemini-3.1-pro-preview`
|
|
122
|
+
- `gemini-3-flash-preview`
|
|
123
|
+
- `gemini-3.1-flash-lite-preview`
|
|
124
|
+
|
|
125
|
+
## What This Release Uses
|
|
126
|
+
|
|
127
|
+
- Provider flow: Gemini API key
|
|
128
|
+
- Required auth for normal usage: `GEMINI_API_KEY`
|
|
129
|
+
- UI flow: existing Deplyze Code TUI and REPL
|
|
130
|
+
- Legacy login and OAuth code still exists in the repository, but it is not required for the standard Gemini path
|
|
131
|
+
|
|
132
|
+
## Source Checkout Usage
|
|
133
|
+
|
|
134
|
+
If you are running from a local checkout instead of a global install:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
bun install
|
|
138
|
+
./bin/deplyze
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Windows:
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
bun install
|
|
145
|
+
bun ./bin/deplyze
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Recovery Mode
|
|
149
|
+
|
|
150
|
+
If you need the simplified recovery CLI:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
CLAUDE_CODE_FORCE_RECOVERY_CLI=1 deplyze
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
PowerShell:
|
|
157
|
+
|
|
158
|
+
```powershell
|
|
159
|
+
$env:CLAUDE_CODE_FORCE_RECOVERY_CLI='1'
|
|
160
|
+
deplyze
|
|
161
|
+
```
|
package/bin/deplyze
CHANGED
|
@@ -8,8 +8,10 @@ import { fileURLToPath } from 'node:url'
|
|
|
8
8
|
const packageRoot = join(dirname(fileURLToPath(import.meta.url)), '..')
|
|
9
9
|
const cwd = process.cwd()
|
|
10
10
|
const envFile = join(cwd, '.env')
|
|
11
|
+
const preloadFile = join(packageRoot, 'preload.ts')
|
|
11
12
|
|
|
12
13
|
const args: string[] = []
|
|
14
|
+
args.push(`--preload=${preloadFile}`)
|
|
13
15
|
if (existsSync(envFile)) {
|
|
14
16
|
args.push(`--env-file=${envFile}`)
|
|
15
17
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "deplyze-code",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
2
|
+
"name": "deplyze-code",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Deplyze Code is a Gemini-powered terminal coding assistant with an interactive Ink TUI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"deplyze": "bin/deplyze"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "bun test",
|
|
11
|
+
"smoke": "bun run ./scripts/smoke.ts",
|
|
12
|
+
"deplyze": "bun run ./bin/deplyze",
|
|
13
|
+
"start": "bun run ./bin/deplyze"
|
|
14
|
+
},
|
|
12
15
|
"dependencies": {
|
|
13
16
|
"@anthropic-ai/sandbox-runtime": "^0.0.44",
|
|
14
17
|
"@anthropic-ai/sdk": "^0.80.0",
|
package/preload.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const version = process.env.CLAUDE_CODE_LOCAL_VERSION ?? '0.1.
|
|
2
|
-
const packageUrl = process.env.CLAUDE_CODE_LOCAL_PACKAGE_URL ?? 'deplyze-code';
|
|
1
|
+
const version = process.env.CLAUDE_CODE_LOCAL_VERSION ?? '0.1.3';
|
|
2
|
+
const packageUrl = process.env.CLAUDE_CODE_LOCAL_PACKAGE_URL ?? 'deplyze-code';
|
|
3
3
|
const buildTime = process.env.CLAUDE_CODE_LOCAL_BUILD_TIME ?? new Date().toISOString();
|
|
4
4
|
|
|
5
5
|
process.env.CLAUDE_CODE_LOCAL_SKIP_REMOTE_PREFETCH ??= '1';
|