dsh-agy-link 0.6.55 → 0.6.57
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 +34 -0
- package/README.md +111 -117
- package/dist/cli-image.mjs +919 -306
- package/dist/client.js +7 -2
- package/dist/index.js +1172 -299
- package/docs/ARCHITECTURE.md +4 -4
- package/docs/CONFIGURATION.md +20 -14
- package/docs/KNOWN-GAPS.md +2 -8
- package/docs/README.en.md +76 -30
- package/docs/SECURITY-NOTES.md +2 -0
- package/docs/assets/console.png +0 -0
- package/docs/assets/context-metering.png +0 -0
- package/docs/assets/model-picker.png +0 -0
- package/docs/assets/settings.png +0 -0
- package/docs/assets/token-usage.png +0 -0
- package/package.json +1 -1
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -16,7 +16,7 @@ runtime/ process and platform I/O (agy runner/parser/mapper, proxy/env)
|
|
|
16
16
|
provider/ the LlmAdapter pipeline (call context, purpose policy, prompt,
|
|
17
17
|
account selection, failure classification, attempt/finalize)
|
|
18
18
|
↑
|
|
19
|
-
features/ translation, image, warmup, diagnostics, commands
|
|
19
|
+
features/ acp, ecosystem, translation, image, warmup, diagnostics, commands
|
|
20
20
|
↑
|
|
21
21
|
transport/ HTTP routes, respond helpers, tool registration
|
|
22
22
|
↑
|
|
@@ -48,9 +48,9 @@ effort-refusal replay. `prepareCall()` binds model metadata for newer hosts.
|
|
|
48
48
|
|
|
49
49
|
## HTTP surface
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
(status, pool, auth, config, translate, media). Route paths,
|
|
53
|
-
shapes are frozen and covered by `test/http-contract.test.ts`.
|
|
51
|
+
35 routes are registered by `transport/http/router.ts` from eight modules
|
|
52
|
+
(status, pool, auth, config, translate, media, embed, ecosystem). Route paths,
|
|
53
|
+
methods and JSON shapes are frozen and covered by `test/http-contract.test.ts`.
|
|
54
54
|
|
|
55
55
|
## Client
|
|
56
56
|
|
package/docs/CONFIGURATION.md
CHANGED
|
@@ -13,7 +13,12 @@ Resolution order (highest first): `DSH_AGY_*` environment variable → runtime o
|
|
|
13
13
|
| `enabled` | `DSH_AGY_ENABLED` | `true` | Master switch |
|
|
14
14
|
| `agyBin` | `DSH_AGY_BIN` | `''` (auto-detect) | Path to the `agy` binary |
|
|
15
15
|
| `extraArgs` | `DSH_AGY_EXTRA_ARGS` | `[]` | Extra argv appended to every `agy` spawn (space separated in the env var) |
|
|
16
|
-
| `permissionMode` | `DSH_AGY_MODE` | `skip` | `skip` / `plan` / `accept-edits`. `DSH_AGY_SKIP_PERMISSIONS` maps `true`→`skip`, `false`→`plan` |
|
|
16
|
+
| `permissionMode` | `DSH_AGY_MODE` | `skip` | `skip` / `auto` / `plan` / `accept-edits`. `DSH_AGY_SKIP_PERMISSIONS` maps `true`→`skip`, `false`→`plan` |
|
|
17
|
+
| `sandbox` | `DSH_AGY_SANDBOX` | `false` | Run `agy` with OS terminal sandboxing (`--sandbox`) |
|
|
18
|
+
| `agent` | `DSH_AGY_AGENT` | `''` (agy default) | Default custom Markdown agent name (`--agent`) |
|
|
19
|
+
| `agySettings` | `DSH_AGY_SETTINGS` | `''` | Inline JSON object or file path passed to `agy --settings` |
|
|
20
|
+
| `transport` | `DSH_AGY_TRANSPORT` | `cli` | `cli` (short-lived `-p`) or `acp` (persistent `agy acp` stdio session pool with automatic pre-stream CLI fallback) |
|
|
21
|
+
| `syncAccountCustomizations` | `DSH_AGY_SYNC_CUSTOMIZATIONS` | `true` | Mirror primary `plugins`, `skills`, `rules`, `agents`, and MCP config into isolated pool accounts (credentials/keychains never touched) |
|
|
17
22
|
| `workspaceRoot` | `DSH_AGY_WORKSPACE_ROOT` | `''` (session cwd) | Workspace root passed to agy |
|
|
18
23
|
|
|
19
24
|
## Models and effort
|
|
@@ -47,8 +52,8 @@ Resolution order (highest first): `DSH_AGY_*` environment variable → runtime o
|
|
|
47
52
|
|
|
48
53
|
| Key | Environment | Default | Description |
|
|
49
54
|
| --- | --- | --- | --- |
|
|
50
|
-
| `contextWindowDefault` |
|
|
51
|
-
| `maxTokensDefault` |
|
|
55
|
+
| `contextWindowDefault` | `DSH_AGY_CONTEXT_WINDOW` | `1048576` | Context window advertised when agy does not report one |
|
|
56
|
+
| `maxTokensDefault` | `DSH_AGY_MAX_TOKENS` | `65536` | Max output tokens advertised when agy does not report one |
|
|
52
57
|
| `forwardSystemPrompt` | `—` | `false` | Forward the DSH system prompt to agy |
|
|
53
58
|
| `digestMaxChars` | `—` | `8000` | Budget for the history digest sent each turn |
|
|
54
59
|
| `contextTransferMaxChars` | `—` | `660000` | Character cap for the transferred context block |
|
|
@@ -62,9 +67,10 @@ Resolution order (highest first): `DSH_AGY_*` environment variable → runtime o
|
|
|
62
67
|
|
|
63
68
|
| Key | Environment | Default | Description |
|
|
64
69
|
| --- | --- | --- | --- |
|
|
65
|
-
| `mediaDir` | `DSH_AGY_MEDIA_DIR` | `''` (plugin data dir) | Staging directory for multimodal images |
|
|
66
|
-
| `mediaTtlMs` | `DSH_AGY_MEDIA_TTL_MS` | `86400000` | Staged
|
|
70
|
+
| `mediaDir` | `DSH_AGY_MEDIA_DIR` | `''` (plugin data dir) | Staging directory for multimodal attachments (images, PDF, audio, video) |
|
|
71
|
+
| `mediaTtlMs` | `DSH_AGY_MEDIA_TTL_MS` | `86400000` | Staged attachment lifetime |
|
|
67
72
|
| `mediaMaxBytes` | `—` | `10485760` | Per-image size cap |
|
|
73
|
+
| `mediaMaxFileBytes` | `DSH_AGY_MEDIA_MAX_FILE_BYTES` | `20971520` | Per-file byte cap for non-image multimodal attachments (PDF, audio, video; 20 MiB) |
|
|
68
74
|
| `mediaMaxImages` | `—` | `8` | Images per turn |
|
|
69
75
|
|
|
70
76
|
## MCP and tools
|
|
@@ -94,42 +100,42 @@ Resolution order (highest first): `DSH_AGY_*` environment variable → runtime o
|
|
|
94
100
|
| --- | --- | --- | --- |
|
|
95
101
|
| `autoTranslate` | `DSH_AGY_AUTO_TRANSLATE` | `false` | Translate every completed turn |
|
|
96
102
|
| `translateModel` | `DSH_AGY_TRANSLATE_MODEL` | `gemini-3.8-flash` | Translate model, with catalog fallback |
|
|
97
|
-
| `translateEffort` | `DSH_AGY_TRANSLATE_EFFORT` | `
|
|
103
|
+
| `translateEffort` | `DSH_AGY_TRANSLATE_EFFORT` | `low` | Reasoning effort for the translate model (`low` faster, `medium` / `high` more rigorous) |
|
|
98
104
|
| `translateTargetLanguage` | `DSH_AGY_TRANSLATE_LANG` | `中文(简体)` | Target language wording in the prompt |
|
|
99
105
|
| `translateMaxChars` | `—` | `8000` | Source truncation limit |
|
|
100
106
|
| `translateMaxTokens` | `—` | `4096` | Output token cap |
|
|
101
107
|
| `translateTimeoutMs` | `—` | `120000` | Per-translation timeout |
|
|
102
108
|
| `translateRetries` | `—` | `2` | Retries on retryable failures (account stall, empty answer) |
|
|
103
|
-
|
|
104
109
|
| `translateSkipSameModel` | `—` | `true` | Skip translation when the reply already came from the translate model |
|
|
105
110
|
| `translateBindConversation` | `—` | `true` | One agy conversation per DSH session, persona sent once |
|
|
106
111
|
| `translateMinIntervalMs` | `—` | `3000` | Minimum spacing between automatic translations |
|
|
107
112
|
|
|
108
113
|
`translateModel` and `translateEffort` are also editable in **DSH Settings → Antigravity**, on the auto-translate row (two dropdowns next to the on/off control). Leaving them on their default option hands the choice back to the fallback chain above.
|
|
109
114
|
|
|
110
|
-
## Image generation (`dsh-agy-image`)
|
|
115
|
+
## Image generation (`agy_image` / `/agy image` / `dsh-agy-image`)
|
|
111
116
|
|
|
112
117
|
| Key | Environment | Default | Description |
|
|
113
118
|
| --- | --- | --- | --- |
|
|
114
|
-
| `
|
|
115
|
-
| `
|
|
119
|
+
| `imageTool` | `DSH_AGY_IMAGE_TOOL` | `true` | Register the `agy_image` DSH tool so any DSH model can generate or edit images via Antigravity |
|
|
120
|
+
| `imageModel` | `DSH_AGY_IMAGE_MODEL` | (empty) | Chat model that drives the `generate_image` / `image-generator` call; empty → `defaultModel` → `gemini-4-hydrogen` (when discovered) → `gemini-3.8-flash` |
|
|
121
|
+
| `imageEffort` | `DSH_AGY_IMAGE_EFFORT` | `medium` | Reasoning effort for prompt planning and visual self-review (balanced quality and latency) |
|
|
116
122
|
| `imageTimeoutMs` | `DSH_AGY_IMAGE_TIMEOUT_MS` | `240000` | Wall-clock cap for one image generation |
|
|
117
123
|
| `imageMaxBytes` | `DSH_AGY_IMAGE_MAX_BYTES` | `20971520` | Largest artifact the plugin accepts (20 MiB) |
|
|
118
124
|
| `imageOutputDir` | `DSH_AGY_IMAGE_OUTPUT_DIR` | (empty) | Default directory to copy finished images into |
|
|
119
125
|
| `imageRetries` | `DSH_AGY_IMAGE_RETRIES` | `1` | Extra attempts after a retryable failure (each may pick another account) |
|
|
120
126
|
|
|
121
|
-
|
|
127
|
+
Image generation is exposed across three entry points — the in-chat **`agy_image`** DSH tool, the **`/agy image`** (`/agy img`) slash command, and the **`dsh-agy-image`** CLI (`image-generator` subagent steps also render as inline image preview cards):
|
|
122
128
|
|
|
123
129
|
```bash
|
|
124
130
|
dsh-agy-image -p "一只柴犬,扁平插画风" -a 16:9 -o ./dog.jpg
|
|
125
131
|
dsh-agy-image -p "把背景换成夜晚" -i ./day.png --json
|
|
126
132
|
```
|
|
127
133
|
|
|
128
|
-
There is no HTTP endpoint. Settings → Antigravity exposes `imageModel` / `imageEffort` and a copyable
|
|
134
|
+
There is no HTTP endpoint. Settings → Antigravity exposes `imageModel` / `imageEffort`, the `imageTool` toggle, and a copyable
|
|
129
135
|
`dsh-agy-image` command next to the translation row.
|
|
130
136
|
|
|
131
|
-
|
|
132
|
-
`purpose:'image'
|
|
137
|
+
All three entry points use the plugin's real `AgyAdapter` (`ImageService` with
|
|
138
|
+
`purpose:'image'`), so account selection, quota cooldown/rotation, proxy, failure
|
|
133
139
|
classification and the retry-on-effort-refusal all come from the same code path a
|
|
134
140
|
normal turn uses. `--json` returns the validated artifact (`path`, `mime`,
|
|
135
141
|
`width`, `height`, `bytes`, `aspectRatio`, `accountId`) or a stable failure `code`.
|
package/docs/KNOWN-GAPS.md
CHANGED
|
@@ -97,11 +97,7 @@ reference-counted slot is the strongest isolation the plugin can provide.
|
|
|
97
97
|
|
|
98
98
|
## Not forwarded to agy
|
|
99
99
|
|
|
100
|
-
- **
|
|
101
|
-
input flag. Since v0.2 the bridge stages DSH image attachments to a local
|
|
102
|
-
media directory (`mediaDir`, TTL-swept) and references them by absolute
|
|
103
|
-
path in the prompt, granting `--add-dir` so agy can view them with its own
|
|
104
|
-
file/vision tools. Same approach as the pi extension.
|
|
100
|
+
- **Multimodal inputs via staged paths (`--add-dir`)** - agy print mode (`-p`) has no inline binary attachment flag. The bridge stages DSH attachments — images (up to `mediaMaxBytes` / `mediaMaxImages`) plus PDF, audio, and video files (up to `mediaMaxFileBytes`, 20 MiB default) — into a local media directory (`mediaDir`, TTL-swept) and references them by absolute path in the prompt, granting `--add-dir` so agy can inspect them with its own file/vision tools. Same approach as the pi extension.
|
|
105
101
|
- **DSH tools to agy (reverse MCP bridge)** - available since v0.2 behind the
|
|
106
102
|
`mcpBridge` config flag (experimental): the plugin runs a loopback-only,
|
|
107
103
|
token-guarded HTTP endpoint and registers a zero-dependency stdio MCP
|
|
@@ -169,9 +165,7 @@ reference-counted slot is the strongest isolation the plugin can provide.
|
|
|
169
165
|
|
|
170
166
|
## Mapping choices
|
|
171
167
|
|
|
172
|
-
- agy tool activity
|
|
173
|
-
(`[agy tool: name] ... -> output`), not DSH tool-call blocks — there is no
|
|
174
|
-
DSH-side tool round-trip to honor.
|
|
168
|
+
- agy tool activity is mirrored as **native DSH tool cards** (`agy_tool` dispatched inside `run_code` and rendered by `tool.call.toolview` for terminal, inline diff, read, search, MCP, `swarm`, `run_workflow`, `schedule`, `manage_task`, subagents, `image-generator`, and browser/DevTools), falling back to reasoning-block annotations only when tool mirroring is disabled or unavailable.
|
|
175
169
|
- Gemini effort suffixes fold into one base model with selectable efforts
|
|
176
170
|
(`gemini-3-6-flash` + `--effort`); Claude / GPT-OSS slugs stay verbatim
|
|
177
171
|
(agy rejects `--effort` for them).
|
package/docs/README.en.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<h1 align="center">🛰️ dsh-agy-link</h1>
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<b>DeepSeek Harness × Google Antigravity</b> — multi-account pooling and
|
|
4
|
+
<b>DeepSeek Harness × Google Antigravity</b> — multi-account pooling and native <code>agy</code> CLI / ACP bridge for DSH
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
@@ -9,30 +9,53 @@
|
|
|
9
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
10
|
<img src="https://img.shields.io/badge/license-MIT-lightgrey" alt="MIT"/>
|
|
11
11
|
<img src="https://img.shields.io/badge/node-%3E%3D24-green" alt="node"/>
|
|
12
|
+
<img src="https://img.shields.io/badge/agy-%3E%3D1.5-purple" alt="agy >=1.5"/>
|
|
12
13
|
</p>
|
|
13
14
|
|
|
14
15
|
<p align="center">
|
|
15
16
|
<b>🌐 Language:</b>
|
|
16
17
|
<a href="../README.md">中文</a> ·
|
|
17
18
|
English ·
|
|
18
|
-
<a href="./CONFIGURATION.md">Configuration</a>
|
|
19
|
+
<a href="./CONFIGURATION.md">Configuration</a> ·
|
|
20
|
+
<a href="./ARCHITECTURE.md">Architecture</a> ·
|
|
21
|
+
<a href="./SECURITY-NOTES.md">Security</a>
|
|
19
22
|
</p>
|
|
20
23
|
|
|
21
24
|
---
|
|
22
25
|
|
|
23
|
-
Bring **Google Antigravity models into DeepSeek Harness (DSH)** through the official, unmodified `agy` CLI: streaming, thinking, native tool cards,
|
|
26
|
+
Bring **Google Antigravity models into DeepSeek Harness (DSH)** through the official, unmodified `agy` CLI: streaming, thinking, rich native tool cards, Generative UI embeds, 1M physical context metering, in-GUI OAuth login, per-family multi-account pooling with automatic failover, CLI-first multi-bucket quota tracking (5h rolling + 7d weekly + Argon weekly), in-chat and CLI image generation, and multi-account ecosystem sync.
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<img src="./assets/console.png" alt="Antigravity console — multi-account pool and multi-bucket quota bars" width="760" />
|
|
30
|
+
</p>
|
|
31
|
+
<p align="center">
|
|
32
|
+
<img src="./assets/model-picker.png" alt="Antigravity (agy CLI) model group in the DSH model picker" width="240" />
|
|
33
|
+
|
|
34
|
+
<img src="./assets/settings.png" alt="Antigravity runtime settings, ecosystem panel, and model visibility controls" width="520" />
|
|
35
|
+
</p>
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="./assets/token-usage.png" alt="Native context cache and token usage breakdown" width="330" />
|
|
38
|
+
|
|
39
|
+
<img src="./assets/context-metering.png" alt="1M physical context metering breakdown" width="310" />
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
---
|
|
24
43
|
|
|
25
44
|
## ✨ Features
|
|
26
45
|
|
|
27
46
|
| | |
|
|
28
47
|
| --- | --- |
|
|
29
|
-
| 🤖 **Antigravity models
|
|
30
|
-
| 🔁 **
|
|
31
|
-
| 📊 **
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
48
|
+
| 🤖 **Antigravity models & catalog filtering** | Merges `agy models` with quota-derived model rows; tick-list allow-list (`selectedModels`) and opt-in `poolWideCatalog`; live effort levels (`low`/`medium`/`high`/`xhigh` (Extra)/`max`) with automatic `--effort` refusal learning. |
|
|
49
|
+
| 🔁 **Per-family multi-account pool** | Independent active pins and cooldowns across `Gemini`, `Argon`, `Claude`, and `GPT-OSS`; sequential drain or round-robin with quota-expiry-first rotation, per-account isolated HOME + proxy, and Windows identity-leased credential slots. |
|
|
50
|
+
| 📊 **CLI-first quota console & warmup** | Prefers `agy -p /usage` (`quotaViaCli: true`) with official summary fallback; tracks 5h rolling, 7d weekly, and Argon weekly buckets with pacing markers, manual/auto warmup, and host-backed `WarmupStatusBar`. |
|
|
51
|
+
| 🛡️ **4 permission modes, sandbox & ACP** | `permissionMode` supports `skip`, `auto` (`--mode auto`), `accept-edits`, and `plan`; supports `--sandbox`, `--agent`/`--settings`/`--json-schema` passthrough, and switchable short-lived `cli` (`-p`) or persistent `agy acp` stdio pool transport (with automatic pre-stream CLI fallback). |
|
|
52
|
+
| 🃏 **Extended tool cards & Generative UI** | Native Terminal/Diff/Read/Search/MCP cards plus dedicated cards for `swarm`, `run_workflow`, `schedule`, `manage_task`, subagent lifecycle, `image-generator`, and browser/DevTools; renders `<agent-embed>` HTML widgets inside strict-CSP sandboxed `<iframe>`s with live theme sync. |
|
|
53
|
+
| 🎬 **Multimodal inputs & inline playback** | Stages images plus PDF, audio, and video attachments (up to `mediaMaxFileBytes` 20 MiB default via `--add-dir`), with fullscreen image lightbox, video preview, inline `<audio>` player, Mermaid diagrams, decision chips, and compaction cards. |
|
|
54
|
+
| 🔐 **In-GUI OAuth & token import** | Zero-paste browser PKCE OAuth (`127.0.0.1:51121`) with manual code/URL fallback plus direct `refresh_token`/JSON import; jitter-safe `NETWORK` vs `AUTH` classification and `TOS_VIOLATION` circuit breaker. |
|
|
55
|
+
| 🗣 **Plain-language translation (`/tsl`)** | Native DSH Gemini card anchored under each reply and persisted across reloads; 1:1 per-session translation conversation; opt-in auto mode with model/effort dropdowns and per-reply translate button. |
|
|
56
|
+
| 🎨 **Image generation (`agy_image` / CLI)** | Exposed via the `agy_image` DSH tool (`imageTool: true`), `/agy image` (`/agy img`) slash command, `image-generator` preview cards, and headless `dsh-agy-image` CLI — all sharing `ImageService` and account failover. |
|
|
57
|
+
| 🧩 **Ecosystem sync & slash bridges** | Inspect/toggle `plugins`, view `mcp`/`skills`/`rules`/`agents`, and allowlist-mirror customizations to isolated accounts without touching credentials; bridges DSH `/goal`, `/plan`, and `/agy btw\|fork\|grill\|learn\|compact`. |
|
|
58
|
+
| 🌐 **4-locale UI & visibility toggles** | Full `en`, `zh`, `es`, and `pt-BR` localization, responsive `< 680px` mobile drawer, and opt-out `showHeaderBadge` / `showTranslateAction` controls. |
|
|
36
59
|
|
|
37
60
|
## 📋 Requirements
|
|
38
61
|
|
|
@@ -40,7 +63,7 @@ Bring **Google Antigravity models into DeepSeek Harness (DSH)** through the offi
|
|
|
40
63
|
| --- | --- |
|
|
41
64
|
| DSH | `dsh --version` |
|
|
42
65
|
| Node.js ≥ 24 | `node --version` |
|
|
43
|
-
| Google Antigravity CLI | `agy --version` (install: https://antigravity.google/docs/cli/install) |
|
|
66
|
+
| Google Antigravity CLI (≥ 1.5) | `agy --version` (install: https://antigravity.google/docs/cli/install) |
|
|
44
67
|
| Google connectivity | proxy/VPN/TUN where required |
|
|
45
68
|
|
|
46
69
|
Where Google is unreachable directly, enable system proxy/TUN before starting DSH, or set a per-account proxy in the Antigravity panel.
|
|
@@ -55,14 +78,14 @@ dsh plugin --profile web add dsh-agy-link --registry https://registry.npmjs.org
|
|
|
55
78
|
dsh web
|
|
56
79
|
|
|
57
80
|
# In the chat input:
|
|
58
|
-
/agy status # binary, version, pool and catalog status
|
|
81
|
+
/agy status # binary, version, transport, sandbox, pool and catalog status
|
|
59
82
|
/agy auth # sign the primary account in
|
|
60
|
-
/agy pool # list account IDs
|
|
83
|
+
/agy pool # list account IDs and per-family quota/active pins
|
|
61
84
|
/agy auth <account-id> # reauthenticate an existing secondary account (also accepts full alias or email)
|
|
62
85
|
/agy auth-status # check the final login result within 30 seconds
|
|
63
86
|
```
|
|
64
87
|
|
|
65
|
-
Add more accounts from the **AGY (n)** badge in the header (browser login), then pick an Antigravity model in `/model`.
|
|
88
|
+
Add more accounts from the **AGY (n)** badge in the header (browser login or token import), then pick an Antigravity model in `/model`.
|
|
66
89
|
|
|
67
90
|
## 🗣 Plain-language translation (`/tsl`)
|
|
68
91
|
|
|
@@ -76,45 +99,68 @@ Add more accounts from the **AGY (n)** badge in the header (browser login), then
|
|
|
76
99
|
/tsl auto on|off|status # per-session auto mode
|
|
77
100
|
```
|
|
78
101
|
|
|
79
|
-
- A native DSH card is rendered under the translated reply and survives reloads.
|
|
80
|
-
- Each DSH session gets its own translation conversation; the persona is sent once.
|
|
102
|
+
- A native DSH card is rendered under the translated reply and survives reloads without entering model-visible history.
|
|
103
|
+
- Each DSH session gets its own translation conversation (`<sessionKey>#tsl`); the persona is sent once.
|
|
81
104
|
- The per-reply “translate” button translates the **message you clicked**, not the turn's last answer.
|
|
82
|
-
- Default effort is
|
|
105
|
+
- Default effort is **`low`** (measured on real agy: `low` ≈ 12s, `medium` ≈ 33s, `high` ≈ 45s for a 964-char reply; configurable in Settings next to the auto-translate toggle).
|
|
83
106
|
|
|
84
|
-
## 🎨 Image generation (`dsh-agy-image`)
|
|
107
|
+
## 🎨 Image generation (`agy_image` + `/agy image` + `dsh-agy-image`)
|
|
85
108
|
|
|
86
|
-
agy ships
|
|
109
|
+
agy ships built-in image generation (`generate_image` / `image-generator`). The plugin exposes it across three entry points — the **`agy_image`** DSH tool (enabled by default via `imageTool: true` so any model can invoke it), the **`/agy image`** (`/agy img`) slash command, and the **`dsh-agy-image`** CLI — all reusing `ImageService` and the real `AgyAdapter` (`purpose:'image'`). When discovered in the catalog, `gemini-4-hydrogen` is preferred automatically (falling back to `gemini-3.8-flash`), with balanced `imageEffort: 'medium'` by default. There is **no HTTP endpoint**.
|
|
87
110
|
|
|
88
111
|
```bash
|
|
112
|
+
# In-chat slash command
|
|
113
|
+
/agy image "a shiba in sunglasses, flat illustration" -a 16:9 -n shiba
|
|
114
|
+
/agy img "change the background to night" -i ./day.png
|
|
115
|
+
|
|
116
|
+
# Headless CLI
|
|
89
117
|
dsh-agy-image -p "a shiba in sunglasses, flat illustration" -a 16:9 -o ./dog.jpg
|
|
90
118
|
dsh-agy-image -p "change the background to night" -i ./day.png -n night_scene --json
|
|
91
119
|
```
|
|
92
120
|
|
|
93
|
-
- Parameters passed verbatim to the tool: `Prompt`, `ImageName`, `AspectRatio` (14
|
|
94
|
-
- Strict validation before success: the artifact must exist, pass magic-byte sniffing (PNG/JPEG/WebP/GIF/BMP), parse its dimensions, stay under `imageMaxBytes
|
|
121
|
+
- Parameters passed verbatim to the tool: `Prompt`, `ImageName`, `AspectRatio` (14 ratios), `ImagePaths`.
|
|
122
|
+
- Strict validation before success: the artifact must exist, pass magic-byte sniffing (PNG/JPEG/WebP/GIF/BMP), parse its dimensions, stay under `imageMaxBytes` (20 MiB default), and match the requested aspect ratio within 3%.
|
|
95
123
|
- `--json` returns `{ok, path, mime, width, height, aspectRatio, bytes, model, effort, durationMs, attempts, accountId?, conversationId?}`; failures carry a stable `code` (`BAD_PARAMS`, `IMAGE_NOT_FOUND`, `IMAGE_INVALID`, `IMAGE_ASPECT_MISMATCH`, `IMAGE_REGION_UNSUPPORTED`, `NO_ACCOUNT`, `TIMEOUT`, …).
|
|
96
124
|
- Exit codes: `0` ok · `2` usage · `3` agy missing · `4` generation failed · `5` validation failed · `6` account/region unavailable.
|
|
97
|
-
- The image model
|
|
125
|
+
- The image model produces aspect ratios rather than arbitrary pixel dimensions (e.g., 1:1 → 1024×1024, 16:9 → 1376×768). Region refusals (`User location is not supported`) rotate to the next eligible account on retry.
|
|
126
|
+
|
|
127
|
+
## 🧩 Ecosystem sync & `/agy` command bridges
|
|
128
|
+
|
|
129
|
+
- **Multi-account customization sync**: Settings → Antigravity shows a collapsible **Ecosystem** summary (`plugins`, `mcp`, `agents`, `skills`, `rules`), lets you toggle plugins or select a default `--agent`, and mirrors an explicit allowlist into isolated pool accounts (`syncAccountCustomizations: true`) while excluding `.env`, OAuth tokens, private keys, logs, and keychains.
|
|
130
|
+
- **Slash & runtime commands**:
|
|
131
|
+
- Execution & transport: `/agy mode <skip|auto|plan|accept-edits>`, `/agy sandbox [on|off]`, `/agy transport [cli|acp|status]`, `/agy agent [name|off]`, `/agy settings [show|<json-or-path>|clear]`, `/agy effort <low|medium|high|xhigh|max|default>`
|
|
132
|
+
- Ecosystem: `/agy plugins [list|enable <id>|disable <id>]`, `/agy mcp`, `/agy skills`, `/agy agents [list|use <name>|off]`, `/agy sync-ecosystem`
|
|
133
|
+
- Session & workflow bridges: `/agy goal [status|set|edit|pause|resume|complete|clear]`, `/agy session [info|clear]`, `/agy btw <question>`, `/agy fork [list|restore <id>|<prompt>]`, `/agy grill [topic]` (`/agy grill-me`), `/agy learn [--apply] [focus]`, `/agy compact [focus]`, `/agy doctor`
|
|
98
134
|
|
|
99
135
|
## ⚙️ Configuration
|
|
100
136
|
|
|
101
137
|
Every key, environment variable, default and advanced option lives in **one place**: [CONFIGURATION.md](./CONFIGURATION.md). The README deliberately does not duplicate that table.
|
|
102
138
|
|
|
103
|
-
Common entry points: `/plugin`, the Antigravity settings panel, `DSH_AGY_*` environment variables, and `~/.dsh/agy-link/runtime-overrides.json` (where the panel
|
|
139
|
+
Common entry points: `/plugin`, the Antigravity settings panel, `DSH_AGY_*` environment variables, and `~/.dsh/agy-link/runtime-overrides.json` (where the panel and `/agy` commands write).
|
|
104
140
|
|
|
105
141
|
## 🧩 How it works
|
|
106
142
|
|
|
107
|
-
1. **
|
|
108
|
-
2. **Per-account sandbox**:
|
|
109
|
-
3. **
|
|
110
|
-
4. **Aux routes**:
|
|
143
|
+
1. **CLI (`-p`) & optional persistent `agy acp` pool**: By default each turn runs `agy -p --output-format stream-json` and parses NDJSON events; switching `transport` to `'acp'` reuses persistent `agy acp` stdio JSON-RPC processes (idle-evicted, with automatic pre-stream CLI fallback).
|
|
144
|
+
2. **Per-account sandbox**: The primary account uses the system HOME/keychain; secondary accounts get an isolated HOME with their own `0600` OAuth credentials and `.bak` recovery. On Windows the credential slot is leased by identity (`parallelSameAccount`), so parallel sessions on the same account run concurrently.
|
|
145
|
+
3. **CLI-first quota & pooled failover**: Quotas prefer `agy -p /usage` (`quotaViaCli: true`) with fallback to `v1internal:retrieveUserQuotaSummary`; 429/quota/region/auth failures are classified per model family — cooling down, rotating the pointer, or retrying on another account.
|
|
146
|
+
4. **Aux routes**: Translation, image generation, title generation, and goal derivation ride the same pool through dedicated `purpose` paths without polluting a normal conversation binding.
|
|
111
147
|
|
|
112
148
|
## ❓ FAQ (short)
|
|
113
149
|
|
|
114
150
|
- **Proxy?** Export `HTTPS_PROXY`/`HTTP_PROXY`/`ALL_PROXY` before starting DSH, or set a per-account proxy in the console.
|
|
115
|
-
- **A model rejects `--effort`?** The plugin learns the refusal, replays once without the flag, and hides
|
|
116
|
-
- **Quotas not updating?** They poll hourly by default; press “Sync” on
|
|
117
|
-
- **Windows console flash?**
|
|
151
|
+
- **A model rejects `--effort`?** The plugin learns the refusal, replays once without the flag, persists it to `effort-unsupported.json`, and hides unsupported levels for that model.
|
|
152
|
+
- **Quotas not updating?** They poll hourly by default (`quotaPollIntervalMs`); press “Sync” on a card, click “Refresh Quota”, or run `/agy refresh-quota`.
|
|
153
|
+
- **Windows console flash?** Set Windows Terminal's default terminal application to **Windows Console Host** and restart DSH; `suppressAgyAutoUpdate` also suppresses `agy`'s `--bg-updater` console chain on Windows by default.
|
|
154
|
+
|
|
155
|
+
## 📚 Documentation
|
|
156
|
+
|
|
157
|
+
- [CONFIGURATION.md](./CONFIGURATION.md) — Complete configuration keys, environment variables, and defaults
|
|
158
|
+
- [ARCHITECTURE.md](./ARCHITECTURE.md) — Layering, provider pipeline, and the 35 HTTP routes
|
|
159
|
+
- [AUTH.md](./AUTH.md) — PKCE OAuth, token import, keychain isolation, and redaction
|
|
160
|
+
- [SECURITY-NOTES.md](./SECURITY-NOTES.md) — Threat model, route confinement, `/embed` CSP, and MCP bridge guardrails
|
|
161
|
+
- [HEADLESS-PERMISSIONS.md](./HEADLESS-PERMISSIONS.md) — Least-privilege setup for `dsh headless`
|
|
162
|
+
- [KNOWN-GAPS.md](./KNOWN-GAPS.md) — Platform limits, multimodal staging, and upstream behaviors
|
|
163
|
+
- [DEVELOPMENT.md](./DEVELOPMENT.md) — Verification gates and refactoring guidelines
|
|
118
164
|
|
|
119
165
|
## ⚠️ Disclaimer
|
|
120
166
|
|
package/docs/SECURITY-NOTES.md
CHANGED
|
@@ -11,6 +11,7 @@ Threat model and security boundaries for `dsh-agy-link`. Authoritative specifica
|
|
|
11
11
|
## Credential & Secret Protection
|
|
12
12
|
|
|
13
13
|
- Per-account OAuth token files and `.bak` backups are written atomically with `0600` permissions; Windows Credential Manager handoffs verify refresh-token fingerprints (`sameCredentialGrant`) so foreign tokens can never overwrite an account file.
|
|
14
|
+
- `EcosystemService` mirrors only an explicit allowlist of primary customizations (`plugins`, `skills`, `rules`, `agents`, and MCP config) into isolated pool account HOMEs while explicitly excluding `.env`, OAuth tokens (`.bak`, `.primary-credential.json`), private keys (`.pem`/`.key`), logs, conversations, and keychains.
|
|
14
15
|
- DSH-side API keys and other providers' credentials are never read or modified.
|
|
15
16
|
- `/agy doctor` strips Google auth URLs, `4/...` codes, `ya29.*` access tokens, `1//...` refresh tokens, JWTs, API keys, and proxy credentials before writing diagnostics.
|
|
16
17
|
|
|
@@ -18,4 +19,5 @@ Threat model and security boundaries for `dsh-agy-link`. Authoritative specifica
|
|
|
18
19
|
|
|
19
20
|
- Loopback Origin enforcement: browser requests carrying a non-loopback `Origin` header are rejected (`403`), and no wildcard `Access-Control-Allow-Origin: *` header is emitted on `/media`, `/open`, or `/assets`.
|
|
20
21
|
- `/plugins/agy-link/open` is strictly `POST`-only (`405` on `GET`, preventing auto-trigger via markdown image tags), confined via `realpathSync` to active workspace/media/brain directories, blocks sensitive credential paths (`.ssh`, `.aws`, `.gnupg`, `.kube`, `.dsh`, `.gemini/antigravity-cli`, `.env`, private keys), refuses executable extensions, and passes Windows targets via environment variable (`-LiteralPath`) without PowerShell string interpolation.
|
|
22
|
+
- `/plugins/agy-link/embed` (Generative UI `<agent-embed>`) serves only confined local `.html` artifacts up to 2 MiB with strict CSP (`default-src 'none'`, `connect-src 'none'`, allowlisted Tailwind CDN script only) inside a sandboxed `<iframe sandbox="allow-scripts">` (no `allow-same-origin`).
|
|
21
23
|
- Request bodies are capped (`1 MiB` for plugin routes, `8 MiB` for loopback MCP `/call`), and the loopback MCP bridge requires a constant-time random bearer token plus `mcpToolAllowlist` enforcement while excluding internal tools (`run_code`, `agy_ask`, `agy_tool`).
|
package/docs/assets/console.png
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/docs/assets/settings.png
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.57",
|
|
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",
|