dsh-agy-link 0.1.3 → 0.1.5
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/CHANGELOG.md +11 -0
- package/README.md +136 -69
- package/package.json +1 -2
- package/README.zh.md +0 -101
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.5 (2026-08-19)
|
|
4
|
+
|
|
5
|
+
- README restructured into a single bilingual page: Chinese first, then
|
|
6
|
+
English (README.zh.md removed; package files list updated).
|
|
7
|
+
- Releases now publish to npm automatically (NPM_TOKEN secret configured).
|
|
8
|
+
|
|
9
|
+
## 0.1.4 (2026-08-19)
|
|
10
|
+
|
|
11
|
+
- READMEs: added the author promo block (Chinese first, then English).
|
|
12
|
+
- Housekeeping: internal spec documents are no longer part of the repo.
|
|
13
|
+
|
|
3
14
|
## 0.1.3 (2026-08-19)
|
|
4
15
|
|
|
5
16
|
- Fixed the client slot registration: the sidebar footer slot entry must
|
package/README.md
CHANGED
|
@@ -1,61 +1,147 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">🛰️ dsh-agy-link</h1>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<b>DeepSeek Harness × Google Antigravity</b> — 用官方 agy CLI 把 Antigravity 模型接进 DSH / bring Google Antigravity models into DSH via the official agy CLI
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/dsh-agy-link"><img src="https://img.shields.io/npm/v/dsh-agy-link?color=cb3837&label=npm&logo=npm" alt="npm"/></a>
|
|
9
|
+
<a href="https://github.com/amlyczz/dsh-agy-link/actions/workflows/ci.yml"><img src="https://github.com/amlyczz/dsh-agy-link/actions/workflows/ci.yml/badge.svg" alt="CI"/></a>
|
|
10
|
+
<img src="https://img.shields.io/badge/license-MIT-lightgrey" alt="MIT"/>
|
|
11
|
+
<img src="https://img.shields.io/badge/node-%3E%3D24-green" alt="node"/>
|
|
12
|
+
</p>
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
---
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
# 中文
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(annotated as reasoning blocks), mapped onto DSH's native chunk protocol.
|
|
17
|
-
- **Session continuity** — each DSH session binds to a native agy
|
|
18
|
-
conversation (`--conversation`), so multi-turn context rides agy history
|
|
19
|
-
instead of re-sending everything.
|
|
20
|
-
- **Token usage** — input/output/thinking/cache tokens surface in DSH
|
|
21
|
-
usage accounting.
|
|
22
|
-
- **In-GUI Google login** — `/agy auth` prints the consent URL; the sidebar
|
|
23
|
-
panel adds a QR code and a paste box for the authorization code.
|
|
24
|
-
- **`agy_ask` tool** — let any DSH model delegate a one-shot task to an
|
|
25
|
-
Antigravity model (the AskAntigravity pattern).
|
|
26
|
-
- **`/agy` commands** — `status`, `auth`, `auth-code`, `models`, `mode`,
|
|
27
|
-
`effort`, `clear`, `doctor`, `help`.
|
|
28
|
-
- **Dormant-safe** — no agy binary? Not signed in? The plugin loads anyway
|
|
29
|
-
and tells you what to fix.
|
|
18
|
+
> 全网统一昵称:**小斯syzs** · B站 [@小斯syzs](https://space.bilibili.com/390211071) · 抖音 · 小红书 · 快手(全网同名)
|
|
19
|
+
>
|
|
20
|
+
> 💬 **小斯syzs 邀请你加入飞书群** —— [点此一键加入](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=553i2f4a-5cc8-487f-95d3-3c4095bec0d9)
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
把 **Google Antigravity 模型接入 DeepSeek Harness(DSH)** —— 由官方
|
|
23
|
+
`agy` CLI 驱动,完整支持对话输出、思考(thinking)、工具活动与 token
|
|
24
|
+
用量,全部走你的 Antigravity 订阅。
|
|
32
25
|
|
|
33
|
-
|
|
34
|
-
- Node.js >= 24
|
|
35
|
-
- The official `agy` CLI >= 1.1.8, installed and on `PATH`
|
|
26
|
+
## ✨ 你能得到什么
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
| 能力 | 说明 |
|
|
29
|
+
| ---- | ---- |
|
|
30
|
+
| 🔌 **模型路由** | 在 DSH 模型配置里注册 `antigravity` 提供方,`/model` 选择器直接挑任意 Antigravity 模型(Gemini / Claude / GPT-OSS) |
|
|
31
|
+
| 🌊 **完整流式** | 文本、思考、agy 工具活动(注记为 reasoning 块)全部映射到 DSH 原生流协议 |
|
|
32
|
+
| 🔗 **会话连续** | 每个 DSH 会话绑定原生 agy 会话(`--conversation`),多轮上下文由 agy 历史承载,不重发全量 |
|
|
33
|
+
| 📊 **token 用量** | 输入/输出/思考/缓存 token 全部进入 DSH 用量统计 |
|
|
34
|
+
| 🔐 **GUI 内 Google 登录** | `/agy auth` 打印授权 URL;侧栏面板提供二维码 + 授权码粘贴框 |
|
|
35
|
+
| 🤝 **`agy_ask` 工具** | 任何 DSH 模型都可以把一次性任务委托给 Antigravity 模型(AskAntigravity 模式) |
|
|
36
|
+
| ⌨️ **`/agy` 命令族** | `status` / `auth` / `auth-code` / `models` / `mode` / `effort` / `clear` / `doctor` / `help` |
|
|
37
|
+
| 😴 **休眠安全** | 没装 agy?没登录?插件照常加载并告诉你怎么修 |
|
|
38
|
+
|
|
39
|
+
## 🚀 快速开始
|
|
38
40
|
|
|
39
41
|
```bash
|
|
42
|
+
# 1. 安装(npm 官方包,预构建产物,无需构建许可):
|
|
40
43
|
dsh plugin --profile web add dsh-agy-link
|
|
44
|
+
# 升级:
|
|
45
|
+
# dsh plugin --profile web update dsh-agy-link --latest
|
|
46
|
+
|
|
47
|
+
# 2. 重启 DSH Web GUI,输入框执行:
|
|
48
|
+
# /agy status ← 确认 agy 已被检测到
|
|
49
|
+
|
|
50
|
+
# 3. 登录(一次性):
|
|
51
|
+
# /agy auth ← 打开授权 URL,批准并复制授权码
|
|
52
|
+
# /agy auth-code <授权码> ← 或直接用侧栏面板的二维码 + 粘贴框
|
|
53
|
+
|
|
54
|
+
# 4. /model 选择器里选 antigravity 模型,开聊
|
|
41
55
|
```
|
|
42
56
|
|
|
43
|
-
|
|
57
|
+
> 插件绝不读取/复制/移动 `~/.gemini/antigravity-cli/antigravity-oauth-token`;登录完全通过官方 CLI 自己的流程完成。
|
|
58
|
+
|
|
59
|
+
## ⚙️ 配置
|
|
60
|
+
|
|
61
|
+
配置在 `agy-link` 插件条目里(`/plugin` 或 profile patch 层编辑),环境变量优先:
|
|
62
|
+
|
|
63
|
+
| 键 | 环境变量 | 默认值 | 含义 |
|
|
64
|
+
| --- | --- | --- | --- |
|
|
65
|
+
| enabled | `DSH_AGY_ENABLED` | `true` | 总开关 |
|
|
66
|
+
| agyBin | `DSH_AGY_BIN` | 自动 | 显式 agy 路径 |
|
|
67
|
+
| permissionMode | `DSH_AGY_MODE` | `skip` | `skip` / `plan` / `accept-edits`(见下) |
|
|
68
|
+
| defaultModel | `DSH_AGY_DEFAULT_MODEL` | `(agy 默认)` | 模型 slug |
|
|
69
|
+
| defaultEffort | `DSH_AGY_DEFAULT_EFFORT` | `(模型默认)` | `low` / `medium` / `high` |
|
|
70
|
+
| timeoutMs | `DSH_AGY_TIMEOUT_MS` | `600000` | 单轮看门狗 |
|
|
71
|
+
| extraArgs | `DSH_AGY_EXTRA_ARGS` | — | 附加 agy 参数(空格分隔) |
|
|
72
|
+
|
|
73
|
+
### ⚠️ 权限模式——必读
|
|
74
|
+
|
|
75
|
+
agy 有**自己的**工具循环,会自己做文件编辑和 shell 执行。桥接层映射为三种模式:
|
|
76
|
+
|
|
77
|
+
- **plan** —— 只读,体验桥接的安全默认。
|
|
78
|
+
- **accept-edits** —— agy 可以不经询问改文件。
|
|
79
|
+
- **skip** —— `--dangerously-skip-permissions`:agy **所有**工具免审批。非交互 DSH 轮次需要它(或 plan),因为 agy 的权限提示会卡死 print 模式;但这意味着真实的无人值守 写/执行 权限。设置面板里这个按钮是红色的。
|
|
80
|
+
|
|
81
|
+
DSH 侧的工具与权限不受影响——这里只约束 agy 子进程在自己工作区能做什么。
|
|
82
|
+
|
|
83
|
+
## 🧩 工作原理
|
|
84
|
+
|
|
85
|
+
一次 DSH 模型调用 = 一个短生命周期 `agy -p --output-format stream-json` 进程。NDJSON 事件流被解析、归一化并映射为 DSH StreamChunk:思考 → reasoning 块,文本 → text 块,工具活动 → 注记 reasoning 块,结果信封 → usage + finish。会话 id 优先取自流本身,conversations 目录快照对比兜底。**不逆向数据库、不解码 protobuf、不碰 token 文件**——只启动官方未修改的 agy 二进制。
|
|
86
|
+
|
|
87
|
+
## 📋 已知差距
|
|
88
|
+
|
|
89
|
+
见 [docs/KNOWN-GAPS.md](docs/KNOWN-GAPS.md)。要点:图片不转发(agy print 模式纯文本);DSH 工具不暴露给 agy(MCP 反向桥接是后续工作)。
|
|
90
|
+
|
|
91
|
+
## ⚠️ 免责与风险提示
|
|
44
92
|
|
|
45
|
-
|
|
93
|
+
本插件只启动**官方未修改**的 `agy` 二进制并消费其公开 print 输出,不解码内部数据库、不触碰 OAuth token。自动化订阅 CLI 仍可能与提供方服务条款冲突(Google Antigravity ToS §6 语境);风险自负,被要求停止时请停止。
|
|
46
94
|
|
|
47
|
-
|
|
48
|
-
2. Open it, approve access, copy the authorization code.
|
|
49
|
-
3. `/agy auth-code <code>` — or use the sidebar panel (QR + paste box).
|
|
95
|
+
## 许可证
|
|
50
96
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
97
|
+
MIT
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
# English
|
|
102
|
+
|
|
103
|
+
> Known online as **小斯syzs** — Bilibili [@小斯syzs](https://space.bilibili.com/390211071) · Douyin · Xiaohongshu · Kuaishou (same handle on every platform).
|
|
104
|
+
>
|
|
105
|
+
> 💬 **Join the Feishu community group** hosted by 小斯syzs — [one-click invite](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=553i2f4a-5cc8-487f-95d3-3c4095bec0d9)
|
|
106
|
+
|
|
107
|
+
Bring **Google Antigravity models into DeepSeek Harness (DSH)** — chat, thinking, tool activity, and token usage from your Antigravity subscription, driven by the official `agy` CLI.
|
|
54
108
|
|
|
55
|
-
##
|
|
109
|
+
## ✨ What you get
|
|
56
110
|
|
|
57
|
-
|
|
58
|
-
|
|
111
|
+
| Capability | Description |
|
|
112
|
+
| ---- | ---- |
|
|
113
|
+
| 🔌 **A model route, not a proxy** | Registers the `antigravity` provider in DSH's model config; pick any Antigravity model (Gemini / Claude / GPT-OSS) from the `/model` picker |
|
|
114
|
+
| 🌊 **Full streaming** | Text, thinking (reasoning), and agy tool activity (annotated reasoning blocks) mapped onto DSH's native chunk protocol |
|
|
115
|
+
| 🔗 **Session continuity** | Each DSH session binds to a native agy conversation (`--conversation`); multi-turn context rides agy history instead of re-sending everything |
|
|
116
|
+
| 📊 **Token usage** | Input/output/thinking/cache tokens surface in DSH usage accounting |
|
|
117
|
+
| 🔐 **In-GUI Google login** | `/agy auth` prints the consent URL; the sidebar panel adds a QR code and a paste box for the authorization code |
|
|
118
|
+
| 🤝 **`agy_ask` tool** | Let any DSH model delegate a one-shot task to an Antigravity model (the AskAntigravity pattern) |
|
|
119
|
+
| ⌨️ **`/agy` commands** | `status`, `auth`, `auth-code`, `models`, `mode`, `effort`, `clear`, `doctor`, `help` |
|
|
120
|
+
| 😴 **Dormant-safe** | No agy binary? Not signed in? The plugin loads anyway and tells you what to fix |
|
|
121
|
+
|
|
122
|
+
## 🚀 Quick start
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# 1. Install (npm, prebuilt — no build approval needed):
|
|
126
|
+
dsh plugin --profile web add dsh-agy-link
|
|
127
|
+
# Upgrade:
|
|
128
|
+
# dsh plugin --profile web update dsh-agy-link --latest
|
|
129
|
+
|
|
130
|
+
# 2. Restart the DSH Web GUI, then in the composer:
|
|
131
|
+
# /agy status <- confirm agy was detected
|
|
132
|
+
|
|
133
|
+
# 3. Login (one time):
|
|
134
|
+
# /agy auth <- open the consent URL, approve, copy the code
|
|
135
|
+
# /agy auth-code <code> <- or use the sidebar panel (QR + paste box)
|
|
136
|
+
|
|
137
|
+
# 4. Pick an antigravity model in /model and chat
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
> The plugin never reads, copies, or moves `~/.gemini/antigravity-cli/antigravity-oauth-token`; login is driven entirely through the official CLI's own flow.
|
|
141
|
+
|
|
142
|
+
## ⚙️ Configuration
|
|
143
|
+
|
|
144
|
+
Config lives in the `agy-link` plugin entry (edit via `/plugin` or the profile patch layer). Environment variables override the file:
|
|
59
145
|
|
|
60
146
|
| Key | Env | Default | Meaning |
|
|
61
147
|
| --- | --- | --- | --- |
|
|
@@ -67,47 +153,28 @@ profile patch layer). Environment variables override the file:
|
|
|
67
153
|
| timeoutMs | `DSH_AGY_TIMEOUT_MS` | `600000` | per-turn watchdog |
|
|
68
154
|
| extraArgs | `DSH_AGY_EXTRA_ARGS` | — | extra agy flags, space-separated |
|
|
69
155
|
|
|
70
|
-
### Permission modes — read this
|
|
156
|
+
### ⚠️ Permission modes — read this
|
|
71
157
|
|
|
72
|
-
agy runs its **own** tool loop with its own file edits and shell commands.
|
|
73
|
-
The bridge maps that to one of three modes:
|
|
158
|
+
agy runs its **own** tool loop with its own file edits and shell commands. The bridge maps that to one of three modes:
|
|
74
159
|
|
|
75
160
|
- **plan** — read-only; the safe default for trying the bridge.
|
|
76
161
|
- **accept-edits** — agy may edit files without asking.
|
|
77
|
-
- **skip** — `--dangerously-skip-permissions`: agy runs **every** tool
|
|
78
|
-
without approval. Non-interactive DSH turns need this (or plan) because
|
|
79
|
-
agy permission prompts hang print mode, but it means real unattended
|
|
80
|
-
write/exec access. The settings panel shows this button in red.
|
|
162
|
+
- **skip** — `--dangerously-skip-permissions`: agy runs **every** tool without approval. Non-interactive DSH turns need this (or plan) because agy permission prompts hang print mode, but it means real unattended write/exec access. The settings panel shows this button in red.
|
|
81
163
|
|
|
82
|
-
DSH-side tools and permissions are unaffected — this only governs what the
|
|
83
|
-
spawned agy process may do in its workspace.
|
|
164
|
+
DSH-side tools and permissions are unaffected — this only governs what the spawned agy process may do in its workspace.
|
|
84
165
|
|
|
85
|
-
## How it works
|
|
166
|
+
## 🧩 How it works
|
|
86
167
|
|
|
87
|
-
One DSH model call = one short-lived `agy -p --output-format stream-json`
|
|
88
|
-
process. The NDJSON event stream is parsed, normalized, and mapped to
|
|
89
|
-
DSH StreamChunks: thinking → reasoning blocks, text → text blocks, tool
|
|
90
|
-
activity → annotated reasoning blocks, and the result envelope → usage +
|
|
91
|
-
finish. Conversation ids are discovered from the stream itself with a
|
|
92
|
-
conversations-directory snapshot diff as fallback. No reverse-engineered
|
|
93
|
-
database scraping, no protobuf decoding, no token file access.
|
|
168
|
+
One DSH model call = one short-lived `agy -p --output-format stream-json` process. The NDJSON event stream is parsed, normalized, and mapped to DSH StreamChunks: thinking → reasoning blocks, text → text blocks, tool activity → annotated reasoning blocks, and the result envelope → usage + finish. Conversation ids come from the stream itself, with a conversations-directory snapshot diff as fallback. **No reverse-engineered database scraping, no protobuf decoding, no token-file access** — only the official unmodified agy binary is spawned.
|
|
94
169
|
|
|
95
|
-
## Known gaps
|
|
170
|
+
## 📋 Known gaps
|
|
96
171
|
|
|
97
|
-
See [docs/KNOWN-GAPS.md](docs/KNOWN-GAPS.md). Notably: images are not
|
|
98
|
-
forwarded (agy print mode is text-only), and DSH tools are not exposed to
|
|
99
|
-
agy (its MCP reverse bridge is future work).
|
|
172
|
+
See [docs/KNOWN-GAPS.md](docs/KNOWN-GAPS.md). Notably: images are not forwarded (agy print mode is text-only), and DSH tools are not exposed to agy (its MCP reverse bridge is future work).
|
|
100
173
|
|
|
101
|
-
## Disclaimer & risk note
|
|
174
|
+
## ⚠️ Disclaimer & risk note
|
|
102
175
|
|
|
103
|
-
This plugin spawns the **official, unmodified** `agy` binary and consumes
|
|
104
|
-
its public print-mode output. It does not decode internal databases or
|
|
105
|
-
touch OAuth tokens. Automating a subscription CLI may still conflict with
|
|
106
|
-
the provider's terms of service (Google Antigravity ToS §6 context); use
|
|
107
|
-
it at your own risk, and stop if asked to.
|
|
176
|
+
This plugin spawns the **official, unmodified** `agy` binary and consumes its public print-mode output. It does not decode internal databases or touch OAuth tokens. Automating a subscription CLI may still conflict with the provider's terms of service (Google Antigravity ToS §6 context); use it at your own risk, and stop if asked to.
|
|
108
177
|
|
|
109
178
|
## License
|
|
110
179
|
|
|
111
180
|
MIT
|
|
112
|
-
|
|
113
|
-
[DeepSeek Harness (DSH)]: https://npmjs.com/package/@deepseek-ai/dsh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Google Antigravity (agy CLI) models for DeepSeek Harness — stream Gemini/Claude/GPT-OSS subscriptions into DSH with thinking, tool activity, token usage and in-GUI Google OAuth login.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,7 +75,6 @@
|
|
|
75
75
|
"dist",
|
|
76
76
|
"cordis.patch.yml",
|
|
77
77
|
"README.md",
|
|
78
|
-
"README.zh.md",
|
|
79
78
|
"LICENSE",
|
|
80
79
|
"CHANGELOG.md",
|
|
81
80
|
"docs"
|
package/README.zh.md
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# dsh-agy-link(简体中文)
|
|
2
|
-
|
|
3
|
-
把 **Google Antigravity 模型接入 [DeepSeek Harness (DSH)]** —— 由官方
|
|
4
|
-
`agy` CLI 驱动,完整支持对话输出、思考(thinking)、工具活动与 token
|
|
5
|
-
用量,全部走你的 Antigravity 订阅。
|
|
6
|
-
|
|
7
|
-
[English](README.md) | 简体中文
|
|
8
|
-
|
|
9
|
-
## 你能得到什么
|
|
10
|
-
|
|
11
|
-
- **模型路由而非代理** —— 在 DSH 模型配置里注册 `antigravity` 提供方,
|
|
12
|
-
`/model` 选择器里直接挑任意 Antigravity 模型。
|
|
13
|
-
- **完整流式输出** —— 文本、思考、agy 工具活动(注记为 reasoning 块),
|
|
14
|
-
全部映射到 DSH 原生流协议。
|
|
15
|
-
- **会话连续性** —— 每个 DSH 会话绑定原生 agy 会话(`--conversation`),
|
|
16
|
-
多轮上下文由 agy 自己的历史承载,不重发全量。
|
|
17
|
-
- **token 用量** —— 输入/输出/思考/缓存 token 全部进入 DSH 用量统计。
|
|
18
|
-
- **GUI 内 Google 登录** —— `/agy auth` 打印授权 URL;侧栏面板提供
|
|
19
|
-
二维码 + 授权码粘贴框。
|
|
20
|
-
- **`agy_ask` 工具** —— 任何 DSH 模型都可以把一次性任务委托给
|
|
21
|
-
Antigravity 模型(AskAntigravity 模式)。
|
|
22
|
-
- **`/agy` 命令族** —— `status` / `auth` / `auth-code` / `models` /
|
|
23
|
-
`mode` / `effort` / `clear` / `doctor` / `help`。
|
|
24
|
-
- **休眠安全** —— 没装 agy?没登录?插件照常加载并告诉你怎么修。
|
|
25
|
-
|
|
26
|
-
## 环境要求
|
|
27
|
-
|
|
28
|
-
- DSH(DeepSeek Harness)web profile
|
|
29
|
-
- Node.js >= 24
|
|
30
|
-
- 官方 `agy` CLI >= 1.1.8,已安装并在 `PATH` 上
|
|
31
|
-
|
|
32
|
-
## 安装
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
dsh plugin --profile web add dsh-agy-link
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
重启 DSH,在 GUI 里执行 `/agy status`。
|
|
39
|
-
|
|
40
|
-
## 登录(一次性)
|
|
41
|
-
|
|
42
|
-
1. `/agy auth` —— 打印 Google 授权 URL。
|
|
43
|
-
2. 打开链接、批准访问、复制授权码。
|
|
44
|
-
3. `/agy auth-code <授权码>` —— 或用侧栏面板(二维码 + 粘贴框)。
|
|
45
|
-
|
|
46
|
-
插件绝不读取/复制/移动
|
|
47
|
-
`~/.gemini/antigravity-cli/antigravity-oauth-token`;登录完全通过官方
|
|
48
|
-
CLI 自己的流程完成。
|
|
49
|
-
|
|
50
|
-
## 配置
|
|
51
|
-
|
|
52
|
-
配置在 `agy-link` 插件条目里(`/plugin` 或 profile patch 层编辑)。
|
|
53
|
-
环境变量优先于文件:
|
|
54
|
-
|
|
55
|
-
| 键 | 环境变量 | 默认值 | 含义 |
|
|
56
|
-
| --- | --- | --- | --- |
|
|
57
|
-
| enabled | `DSH_AGY_ENABLED` | `true` | 总开关 |
|
|
58
|
-
| agyBin | `DSH_AGY_BIN` | 自动 | 显式 agy 路径 |
|
|
59
|
-
| permissionMode | `DSH_AGY_MODE` | `skip` | `skip` / `plan` / `accept-edits`(见下) |
|
|
60
|
-
| defaultModel | `DSH_AGY_DEFAULT_MODEL` | `(agy 默认)` | 模型 slug |
|
|
61
|
-
| defaultEffort | `DSH_AGY_DEFAULT_EFFORT` | `(模型默认)` | `low` / `medium` / `high` |
|
|
62
|
-
| timeoutMs | `DSH_AGY_TIMEOUT_MS` | `600000` | 单轮看门狗 |
|
|
63
|
-
| extraArgs | `DSH_AGY_EXTRA_ARGS` | — | 附加 agy 参数(空格分隔) |
|
|
64
|
-
|
|
65
|
-
### 权限模式 —— 必读
|
|
66
|
-
|
|
67
|
-
agy 有**自己的**工具循环,会自己做文件编辑和 shell 执行。桥接层映射为
|
|
68
|
-
三种模式:
|
|
69
|
-
|
|
70
|
-
- **plan** —— 只读,体验桥接的安全默认。
|
|
71
|
-
- **accept-edits** —— agy 可以不经询问改文件。
|
|
72
|
-
- **skip** —— `--dangerously-skip-permissions`:agy **所有**工具免审批。
|
|
73
|
-
非交互 DSH 轮次需要它(或 plan),因为 agy 的权限提示会卡死 print
|
|
74
|
-
模式;但这意味着真实的无人值守 写/执行 权限。设置面板里这个按钮是
|
|
75
|
-
红色的。
|
|
76
|
-
|
|
77
|
-
DSH 侧的工具与权限不受影响 —— 这里只约束 agy 子进程在自己工作区能做什么。
|
|
78
|
-
|
|
79
|
-
## 工作原理
|
|
80
|
-
|
|
81
|
-
一次 DSH 模型调用 = 一个短生命周期 `agy -p --output-format stream-json`
|
|
82
|
-
进程。NDJSON 事件流被解析、归一化并映射为 DSH StreamChunk:思考 →
|
|
83
|
-
reasoning 块,文本 → text 块,工具活动 → 注记 reasoning 块,结果信封 →
|
|
84
|
-
usage + finish。会话 id 优先取自流本身,conversations 目录快照对比作为
|
|
85
|
-
兜底。不逆向数据库、不解码 protobuf、不碰 token 文件。
|
|
86
|
-
|
|
87
|
-
## 已知差距
|
|
88
|
-
|
|
89
|
-
见 [docs/KNOWN-GAPS.md](docs/KNOWN-GAPS.md)。要点:图片不转发(agy print
|
|
90
|
-
模式纯文本);DSH 工具不暴露给 agy(MCP 反向桥接是后续工作)。
|
|
91
|
-
|
|
92
|
-
## 免责与风险提示
|
|
93
|
-
|
|
94
|
-
本插件只启动**官方未修改**的 `agy` 二进制并消费其公开 print 输出,
|
|
95
|
-
不解码内部数据库、不触碰 OAuth token。自动化订阅 CLI 仍可能与提供方
|
|
96
|
-
服务条款冲突(Google Antigravity ToS §6 语境);风险自负,被要求停止时
|
|
97
|
-
请停止。
|
|
98
|
-
|
|
99
|
-
## 许可证
|
|
100
|
-
|
|
101
|
-
MIT
|