dsh-antigravity-auth 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/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/README.md +168 -0
- package/README.zh.md +159 -0
- package/cordis.patch.yml +12 -0
- package/lib/capability-lifecycle--tgGKajs.js +1896 -0
- package/lib/client.cjs +2123 -0
- package/lib/client.cjs.map +1 -0
- package/lib/image.js +564 -0
- package/lib/index.js +176 -0
- package/lib/invariant.js +2 -0
- package/lib/live-gate-runner.js +542 -0
- package/lib/live-gates.js +97 -0
- package/lib/llm-adapter.js +916 -0
- package/lib/media-admission.js +206 -0
- package/lib/private-failure-B9vzUkQ7.js +23 -0
- package/lib/private-transport-urF138qW.js +641 -0
- package/lib/private-transport.js +2 -0
- package/lib/project-context.js +133 -0
- package/lib/quota.js +283 -0
- package/lib/replay.js +156 -0
- package/lib/rpc-contract-BFWfdKKs.js +491 -0
- package/lib/rpc-contract.js +2 -0
- package/lib/safe-text-AlEyN8q_.js +12 -0
- package/lib/search.js +259 -0
- package/lib/status-D0-em3Ru.js +125 -0
- package/lib/types/auth-service.d.ts +64 -0
- package/lib/types/auth-service.d.ts.map +1 -0
- package/lib/types/auth-store.d.ts +45 -0
- package/lib/types/auth-store.d.ts.map +1 -0
- package/lib/types/bootstrap-service.d.ts +6 -0
- package/lib/types/bootstrap-service.d.ts.map +1 -0
- package/lib/types/capability-gates.d.ts +19 -0
- package/lib/types/capability-gates.d.ts.map +1 -0
- package/lib/types/capability-lifecycle.d.ts +26 -0
- package/lib/types/capability-lifecycle.d.ts.map +1 -0
- package/lib/types/client/AntigravityAuthSettings.d.ts +19 -0
- package/lib/types/client/AntigravityAuthSettings.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +18 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +121 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/styles.d.ts +4 -0
- package/lib/types/client/styles.d.ts.map +1 -0
- package/lib/types/credential-coordinator.d.ts +84 -0
- package/lib/types/credential-coordinator.d.ts.map +1 -0
- package/lib/types/image.d.ts +39 -0
- package/lib/types/image.d.ts.map +1 -0
- package/lib/types/index.d.ts +21 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/invariant.d.ts +3 -0
- package/lib/types/invariant.d.ts.map +1 -0
- package/lib/types/live-gate-attachments.d.ts +6 -0
- package/lib/types/live-gate-attachments.d.ts.map +1 -0
- package/lib/types/live-gate-auth.d.ts +5 -0
- package/lib/types/live-gate-auth.d.ts.map +1 -0
- package/lib/types/live-gate-image.d.ts +5 -0
- package/lib/types/live-gate-image.d.ts.map +1 -0
- package/lib/types/live-gate-llm.d.ts +10 -0
- package/lib/types/live-gate-llm.d.ts.map +1 -0
- package/lib/types/live-gate-outcome.d.ts +8 -0
- package/lib/types/live-gate-outcome.d.ts.map +1 -0
- package/lib/types/live-gate-runner.d.ts +15 -0
- package/lib/types/live-gate-runner.d.ts.map +1 -0
- package/lib/types/live-gate-search.d.ts +5 -0
- package/lib/types/live-gate-search.d.ts.map +1 -0
- package/lib/types/live-gate-video.d.ts +8 -0
- package/lib/types/live-gate-video.d.ts.map +1 -0
- package/lib/types/live-gates.d.ts +25 -0
- package/lib/types/live-gates.d.ts.map +1 -0
- package/lib/types/llm-adapter.d.ts +65 -0
- package/lib/types/llm-adapter.d.ts.map +1 -0
- package/lib/types/login-types.d.ts +36 -0
- package/lib/types/login-types.d.ts.map +1 -0
- package/lib/types/media-admission.d.ts +54 -0
- package/lib/types/media-admission.d.ts.map +1 -0
- package/lib/types/model-catalog.d.ts +19 -0
- package/lib/types/model-catalog.d.ts.map +1 -0
- package/lib/types/oauth-flow.d.ts +87 -0
- package/lib/types/oauth-flow.d.ts.map +1 -0
- package/lib/types/private-failure.d.ts +6 -0
- package/lib/types/private-failure.d.ts.map +1 -0
- package/lib/types/private-transport-error.d.ts +13 -0
- package/lib/types/private-transport-error.d.ts.map +1 -0
- package/lib/types/private-transport.d.ts +48 -0
- package/lib/types/private-transport.d.ts.map +1 -0
- package/lib/types/project-context.d.ts +30 -0
- package/lib/types/project-context.d.ts.map +1 -0
- package/lib/types/quota.d.ts +43 -0
- package/lib/types/quota.d.ts.map +1 -0
- package/lib/types/raw-http.d.ts +11 -0
- package/lib/types/raw-http.d.ts.map +1 -0
- package/lib/types/replay.d.ts +30 -0
- package/lib/types/replay.d.ts.map +1 -0
- package/lib/types/rpc-contract.d.ts +33 -0
- package/lib/types/rpc-contract.d.ts.map +1 -0
- package/lib/types/rpc-vocabulary.d.ts +7 -0
- package/lib/types/rpc-vocabulary.d.ts.map +1 -0
- package/lib/types/rpc.d.ts +11 -0
- package/lib/types/rpc.d.ts.map +1 -0
- package/lib/types/safe-text.d.ts +3 -0
- package/lib/types/safe-text.d.ts.map +1 -0
- package/lib/types/search.d.ts +42 -0
- package/lib/types/search.d.ts.map +1 -0
- package/lib/types/status.d.ts +62 -0
- package/lib/types/status.d.ts.map +1 -0
- package/lib/types/video.d.ts +42 -0
- package/lib/types/video.d.ts.map +1 -0
- package/lib/types/wire-identity.d.ts +49 -0
- package/lib/types/wire-identity.d.ts.map +1 -0
- package/lib/video.js +320 -0
- package/lib/wire-identity.js +162 -0
- package/package.json +189 -0
- package/scripts/live-gates.mjs +4 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
- Removed callback-URL submission from browser RPC, added closed value-free RPC error validation, and made every settings action abort with component lifetime.
|
|
6
|
+
- Replaced private-endpoint `fetch` dispatch with a plugin-owned TLS/raw HTTP/1.1 serializer that fixes ordered audited `agy` framing and mandatory truthful DSH secondary attribution.
|
|
7
|
+
- Added credential-lineage-fenced, value-free Gate 0/L/S/I/V and independent atomically persisted Gemini/Claude/GPT-OSS outcomes; Auth/LLM is derived directly from all three rather than a separately writable aggregate pass.
|
|
8
|
+
- Added an explicitly acknowledged, one-gate-at-a-time packed `live:gates` harness that remains outside default checks, does not construct credential/network services before opt-in, and persists Gate I outputs through an owner-only content-addressed AttachmentStore seam after bounded PNG chunk/CRC/zlib/pixel admission.
|
|
9
|
+
- Exposed pinned snapshot, live-available, unavailable, refresh-failed, and protocol-drift model states while keeping exact pinned-model requests independent from advisory catalog absence; fixed call-id-correlated tool-result names and fragmented function-call assembly.
|
|
10
|
+
- Changed multi-image generation to independent no-retry requests with partial-success warnings, validates declared MIME against admitted bytes, and rechecks workspace target identity/version around bounded image/video reads.
|
|
11
|
+
- Made each Gate 0/L or selected family run one catalog-free request, distinguished generic forbidden failures from attribution rejection, made Gate V require an exact deterministic pixel-only fixture answer, and fenced replacement logins from prior-account gate evidence.
|
|
12
|
+
- Added the public Antigravity `LlmAdapter` with pinned/live-intersected model discovery, bounded SSE/JSON translation, pre-delta auth replay, and bounded provider replay metadata.
|
|
13
|
+
- Added grounded Web Search, AttachmentStore-backed image generation/edit/list tools, workspace media admission, quota/usage normalization, and the gated MP4 video understanding POC.
|
|
14
|
+
- Added Host settings namespaces, client SettingsScope toggles, quota-safe usage UI, and shared single-account service lifecycle wiring.
|
|
15
|
+
- Added offline transport, replay, quota, media, search, and adapter fixtures; package exports now include the bounded Host capability modules.
|
|
16
|
+
- Added fixed, read-only `loadCodeAssist` project discovery through the centralized Wire Identity policy; only normalized project metadata can gate and replace a single-account credential.
|
|
17
|
+
- Added distinct safe project discovery states for unavailable, authentication, forbidden, rate-limited, offline, malformed, and protocol-drift outcomes; no onboarding or fallback project is attempted.
|
|
18
|
+
- Raised the minimum and tested DSH package baseline to `0.1.1-rc.1`, regenerated a coherent rc.1 lockfile, and added peer-graph verification before the full offline check.
|
|
19
|
+
- Confirmed that the rc.1 credentials/authorization, session-projection, client boot, and sandbox changes require no current Antigravity behavior migration; plugin-owned auth and Wire Identity modules remain unchanged.
|
|
20
|
+
|
|
21
|
+
## [0.1.0]
|
|
22
|
+
|
|
23
|
+
- Added the offline-verifiable Host-only single-account PKCE S256 login path with a strict loopback callback listener.
|
|
24
|
+
- Added one-shot state expiry/cancellation, fixed-port conflict handling, remote callback URL submission, and safe value-free login status RPC results.
|
|
25
|
+
- Added injected project validation and versioned owner-only atomic persistence; access tokens remain Host memory and failed validation preserves the existing account.
|
|
26
|
+
- Added pending, success, cancelled, expired, port-conflict, and safe failure settings states in English and Chinese.
|
|
27
|
+
- Added independently addressable, gate-visible Auth/LLM, Search, Image, and Video rows.
|
|
28
|
+
- Retained the plugin-owned Wire Identity seam and its fixed provider-attribution policy.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 UE-DND
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# dsh-antigravity-auth
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-antigravity-auth)
|
|
4
|
+
[](https://awesome-dsh-plugin.com)
|
|
5
|
+
|
|
6
|
+
English | [中文](README.zh.md)
|
|
7
|
+
|
|
8
|
+
Current release: **v0.1.0**
|
|
9
|
+
|
|
10
|
+
A self-contained [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
11
|
+
**Antigravity Capability Bundle**. It integrates Antigravity's private OAuth session
|
|
12
|
+
and Wire Identity for:
|
|
13
|
+
|
|
14
|
+
- the `google-antigravity` LLM route (Gemini Flash, Gemini Pro, Claude Opus, Claude Sonnet, GPT-OSS);
|
|
15
|
+
- a Global Antigravity Search Provider behind DSH's stock `web_search` tool;
|
|
16
|
+
- durable image generation and editing through `generate_image`, plus the model-facing `list_images` catalog;
|
|
17
|
+
- multimodal workspace MP4 video understanding through `analyze_video`;
|
|
18
|
+
- resilient five-hour and weekly usage/quota visualization dashboard;
|
|
19
|
+
- one native **Antigravity Auth** Settings section with Login, Search, Image Creation, and Video cards.
|
|
20
|
+
|
|
21
|
+
> **⚠️ Unofficial channel — personal development only.** The private,
|
|
22
|
+
> account-gated Antigravity backend surface is unsupported, revocable, and
|
|
23
|
+
> may be rate-limited or changed without notice. Do not rely on it for
|
|
24
|
+
> production workloads.
|
|
25
|
+
|
|
26
|
+
## Features
|
|
27
|
+
|
|
28
|
+
### Shared Antigravity Login State
|
|
29
|
+
|
|
30
|
+
- Uses one Host-only auth coordinator for LLM, Search, Image, Video, and Quota operations.
|
|
31
|
+
- Direct OAuth 2.0 with PKCE S256: Host memory generates verifier and state handle; the browser receives only the authorization URL.
|
|
32
|
+
- The callback listener binds only `127.0.0.1:51121`, accepting only the registered one-shot code/state pair.
|
|
33
|
+
- Resolves credentials through versioned owner-only storage (`0600`), short-lived in-memory cache, and proactive refresh before expiry.
|
|
34
|
+
- Coalesces concurrent refreshes in-process and enforces account/lineage consistency before persisting refreshed tokens.
|
|
35
|
+
- Shows connection state plus real-time visual progress bars for 5-hour and weekly quotas across Gemini and Claude/GPT model families.
|
|
36
|
+
- Sends no token value over the loopback-only `/antigravity-auth` Connection RPC channel.
|
|
37
|
+
|
|
38
|
+
### LLM Routing & Models
|
|
39
|
+
|
|
40
|
+
- Registers the `google-antigravity` provider through DSH's public `LlmAdapter` seam.
|
|
41
|
+
- Intersects the pinned community model catalog with live account discovery.
|
|
42
|
+
- Supports streaming with pre-delta authentication replay and preserve-by-id function call correlation across fragmented provider names.
|
|
43
|
+
|
|
44
|
+
### Web Search
|
|
45
|
+
|
|
46
|
+
The `antigravity-search` Host row registers provider ID `antigravity` through
|
|
47
|
+
`@deepseek-ai/dsh-web`. Grounded web search requests are formatted and dispatched through
|
|
48
|
+
the audited Wire Identity dispatcher. Results include the generated output and deduplicated,
|
|
49
|
+
validated HTTP(S) source references.
|
|
50
|
+
|
|
51
|
+
### Image Creation & Editing
|
|
52
|
+
|
|
53
|
+
`generate_image` presents a unified operation dispatching to Antigravity image endpoints:
|
|
54
|
+
|
|
55
|
+
- Supports prompts, up to five explicit references (session handle `image:<id>` or workspace path), and size/aspect controls.
|
|
56
|
+
- Generated image bytes are validated, decoded, signature-checked, and persisted via `AttachmentStore`.
|
|
57
|
+
- `list_images` provides paginated session image catalogs for image-capable models.
|
|
58
|
+
|
|
59
|
+
### Video Understanding
|
|
60
|
+
|
|
61
|
+
Multimodal `analyze_video` tool accepts workspace MP4 videos, performing bounded frame sampling and textual comprehension.
|
|
62
|
+
|
|
63
|
+
### Usage & Quota Visual Dashboard
|
|
64
|
+
|
|
65
|
+
- Renders real-time progress bars for 5-Hour and Weekly limit windows.
|
|
66
|
+
- Clear status tiers: Normal (>60%, emerald green), Warning (30%–60%, amber), and Low (<30%, coral red).
|
|
67
|
+
- Elegant loading shimmer tracks and querying spinner animations.
|
|
68
|
+
|
|
69
|
+
## Requirements
|
|
70
|
+
|
|
71
|
+
- DeepSeek Harness `0.1.1-rc.1` or a compatible later `0.1.x` release.
|
|
72
|
+
- Node.js `^22.19.0` or `>=24.0.0`.
|
|
73
|
+
- A Google account with Antigravity access.
|
|
74
|
+
|
|
75
|
+
## Install from npm (recommended)
|
|
76
|
+
|
|
77
|
+
The npm package includes prebuilt Host and browser bundles:
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
dsh plugin --profile web add dsh-antigravity-auth
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Restart `dsh web`, open Settings, and select **Antigravity Auth**.
|
|
84
|
+
|
|
85
|
+
## Install from GitHub source
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
dsh plugin --profile web add github:suntianc/dsh-antigravity-auth
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Git dependencies are built by the package's `prepare` script. If prompted by pnpm,
|
|
92
|
+
add the printed `allowBuilds` key to `~/.dsh/profiles/web/pnpm-workspace.yaml`,
|
|
93
|
+
then run the command again.
|
|
94
|
+
|
|
95
|
+
## Install a tarball
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
git clone https://github.com/suntianc/dsh-antigravity-auth.git
|
|
99
|
+
cd dsh-antigravity-auth
|
|
100
|
+
pnpm install
|
|
101
|
+
pnpm pack
|
|
102
|
+
dsh plugin --profile web add ./dsh-antigravity-auth-0.1.0.tgz
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## Upgrade
|
|
106
|
+
|
|
107
|
+
Stop the running `dsh web` process and update the Web profile:
|
|
108
|
+
|
|
109
|
+
```sh
|
|
110
|
+
dsh plugin --profile web add dsh-antigravity-auth@0.1.0
|
|
111
|
+
dsh plugin --profile web list
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Restart `dsh web` and refresh the browser.
|
|
115
|
+
|
|
116
|
+
## Host configuration
|
|
117
|
+
|
|
118
|
+
The bundle patch activates independent Host rows in dependency order:
|
|
119
|
+
|
|
120
|
+
| Row | Export | Purpose |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| `llm-antigravity-auth` | `dsh-antigravity-auth` | Shared auth coordinator and LLM route |
|
|
123
|
+
| `antigravity-search` | `dsh-antigravity-auth/search` | Global Search Provider |
|
|
124
|
+
| `antigravity-image` | `dsh-antigravity-auth/image` | Image generation & editing tools |
|
|
125
|
+
| `antigravity-video` | `dsh-antigravity-auth/video` | Video understanding tools |
|
|
126
|
+
|
|
127
|
+
## Wire Identity
|
|
128
|
+
|
|
129
|
+
The Wire Identity module keeps the audited Antigravity headers and adds the truthful DSH identity
|
|
130
|
+
returned by DSH's public `attributionHeaders()` formatter as the secondary carrier:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
X-DeepSeek-Harness-Attribution: deepseek-harness/<version> (+repository-url)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Requests are code-owned: only fixed HTTPS Antigravity origins and enumerated `v1internal:` operation paths are accepted.
|
|
137
|
+
|
|
138
|
+
## Security and limitations
|
|
139
|
+
|
|
140
|
+
- Token values never enter the browser, settings, logs, session events, or tool metadata. Only Host-side requests receive authorization headers.
|
|
141
|
+
- Single-account only: no account arrays, switching, rotation, quota pools, or identity fallback.
|
|
142
|
+
- Local logout clears local storage and in-memory caches immediately.
|
|
143
|
+
- The status/login RPC channel is restricted to loopback authorities.
|
|
144
|
+
- Raw media base64 never enters session text or browser RPC.
|
|
145
|
+
|
|
146
|
+
## Development
|
|
147
|
+
|
|
148
|
+
```sh
|
|
149
|
+
pnpm install
|
|
150
|
+
pnpm peers check
|
|
151
|
+
pnpm test
|
|
152
|
+
pnpm run check
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`pnpm run build` emits:
|
|
156
|
+
|
|
157
|
+
- `lib/index.js` — Auth / LLM Host plugin;
|
|
158
|
+
- `lib/search.js` — Search Host plugin;
|
|
159
|
+
- `lib/image.js` — Image Host plugin;
|
|
160
|
+
- `lib/video.js` — Video Host plugin;
|
|
161
|
+
- `lib/quota.js` — Quota Host plugin;
|
|
162
|
+
- `lib/wire-identity.js` — Wire Identity Host module;
|
|
163
|
+
- `lib/client.cjs` — Loader-compatible browser settings plugin;
|
|
164
|
+
- `lib/types/**` — TypeScript declarations.
|
|
165
|
+
|
|
166
|
+
## Friendship links
|
|
167
|
+
|
|
168
|
+
- [LINUX DO (L 站)](https://linux.do/)
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# dsh-antigravity-auth
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-antigravity-auth)
|
|
4
|
+
[](https://awesome-dsh-plugin.com)
|
|
5
|
+
|
|
6
|
+
[English](README.md) | 中文
|
|
7
|
+
|
|
8
|
+
当前版本:**v0.1.0**
|
|
9
|
+
|
|
10
|
+
这是一个自包含的 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
11
|
+
**Antigravity 能力包**。它集成了 Antigravity 的私有 OAuth 登录态与 Wire Identity 线路身份,提供:
|
|
12
|
+
|
|
13
|
+
- `google-antigravity` LLM 路由(Gemini Flash、Gemini Pro、Claude Opus、Claude Sonnet、GPT-OSS);
|
|
14
|
+
- 接入 DSH 内置 `web_search` 工具的全局 Antigravity 搜索提供方;
|
|
15
|
+
- 通过 `generate_image` 实现持久图片生成与编辑,并提供供模型使用的 `list_images` 目录;
|
|
16
|
+
- 支持本地工作区 MP4 文件的多模态 `analyze_video` 视频理解;
|
|
17
|
+
- 具备优雅动效的 5 小时与每周用量/配额可视化仪表盘;
|
|
18
|
+
- 一个原生 **Antigravity Auth** 设置分区,内含「登录」「网页搜索」「图片创作」「视频理解」四张卡片。
|
|
19
|
+
|
|
20
|
+
> **⚠️ 非官方通道——仅限个人开发。** 私有、受账户权限控制的 Antigravity
|
|
21
|
+
> 后端服务未获官方支持、可随时撤销,也可能在没有通知的情况下被限流或变更。请勿依赖它承载生产任务。
|
|
22
|
+
|
|
23
|
+
## 功能特性
|
|
24
|
+
|
|
25
|
+
### 共享 Antigravity 登录态
|
|
26
|
+
|
|
27
|
+
- LLM、搜索、图片、视频与配额操作共用一个仅运行于 Host 的认证协调器。
|
|
28
|
+
- 直连 OAuth 2.0 PKCE S256 流程:Host 内存生成 verifier 与 state 句柄,浏览器仅接收授权链接,密钥绝不跨越 Host 边界。
|
|
29
|
+
- 回调监听器仅绑定 `127.0.0.1:51121`,只接受一次性的已注册 code/state 凭据对。
|
|
30
|
+
- 通过属主权限文件存储(`0600`)、短时内存缓存解析凭证,并在到期前主动刷新。
|
|
31
|
+
- 进程内合并并发刷新请求;仅在账号与 lineage 未变化时原子提交新 token。
|
|
32
|
+
- 仪表盘实时显示连接状态以及 Gemini 与 Claude/GPT 模型家族的 5 小时和每周额度进度条。
|
|
33
|
+
- 插件自有、仅允许 loopback 的 `/antigravity-auth` Connection RPC 绝不向前端泄露任何 token 敏感值。
|
|
34
|
+
|
|
35
|
+
### LLM 路由与模型发现
|
|
36
|
+
|
|
37
|
+
- 通过 DSH 公开的 `LlmAdapter` 接口注册 `google-antigravity` 提供方。
|
|
38
|
+
- 将已审计的固定社区模型快照与真实登录账号的可用模型取交集。
|
|
39
|
+
- 流式传输支持首个数据块前的一次认证重放,并支持跨分片提供方函数名的 call-id 稳定关联。
|
|
40
|
+
|
|
41
|
+
### 网页搜索
|
|
42
|
+
|
|
43
|
+
`antigravity-search` Host 行通过 `@deepseek-ai/dsh-web` 注册 ID 为 `antigravity` 的全局搜索提供方。基于审计过的 Wire Identity 线路分发请求,返回真实 grounding 来源与去重检验过的 HTTP(S) 链接。
|
|
44
|
+
|
|
45
|
+
### 图片创作与编辑
|
|
46
|
+
|
|
47
|
+
`generate_image` 为模型提供统一操作接口,分发至 Antigravity 图片端点:
|
|
48
|
+
|
|
49
|
+
- 支持提示词、最多 5 个显式参考图(会话句柄 `image:<id>` 或工作区路径)及尺寸/比例选项。
|
|
50
|
+
- 返回的图片字节经过格式校验、解码、Magic bytes 签名验证并通过 `AttachmentStore` 持久保存。
|
|
51
|
+
- `list_images` 提供会话持久图片分页目录,供多模态模型查看。
|
|
52
|
+
|
|
53
|
+
### 视频理解
|
|
54
|
+
|
|
55
|
+
多模态 `analyze_video` 工具支持本地工作区 MP4 视频的帧采样与内容文本理解。
|
|
56
|
+
|
|
57
|
+
### 用量与配额可视化仪表盘
|
|
58
|
+
|
|
59
|
+
- 直观展示 5 小时窗口与每周窗口的剩余配额比例与刷新倒计时。
|
|
60
|
+
- 状态三档配色:充足(>60%,翡翠绿)、预警(30%–60%,警示橙)、紧急(<30%,警示红)。
|
|
61
|
+
- 配备 Shimmer 微光流动轨道、微型 Spinner 与平滑展开动画。
|
|
62
|
+
|
|
63
|
+
## 环境要求
|
|
64
|
+
|
|
65
|
+
- DeepSeek Harness `0.1.1-rc.1` 或兼容的后续 `0.1.x` 版本。
|
|
66
|
+
- Node.js `^22.19.0` 或 `>=24.0.0`。
|
|
67
|
+
- 具有 Antigravity 权限的 Google 账号。
|
|
68
|
+
|
|
69
|
+
## 从 npm 安装(推荐)
|
|
70
|
+
|
|
71
|
+
npm 包包含预构建的 Host 与浏览器 bundle,无需安装期构建权限:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
dsh plugin --profile web add dsh-antigravity-auth
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
重启 `dsh web`,打开设置并选择 **Antigravity Auth**。
|
|
78
|
+
|
|
79
|
+
## 从 GitHub 源码安装
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
dsh plugin --profile web add github:suntianc/dsh-antigravity-auth
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Git 依赖会通过包内 `prepare` 脚本从源码构建。如遇 pnpm 提示,将输出的 `allowBuilds` 键添加到 `~/.dsh/profiles/web/pnpm-workspace.yaml`,再重新执行安装。
|
|
86
|
+
|
|
87
|
+
## 从 tarball 安装
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
git clone https://github.com/suntianc/dsh-antigravity-auth.git
|
|
91
|
+
cd dsh-antigravity-auth
|
|
92
|
+
pnpm install
|
|
93
|
+
pnpm pack
|
|
94
|
+
dsh plugin --profile web add ./dsh-antigravity-auth-0.1.0.tgz
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## 升级
|
|
98
|
+
|
|
99
|
+
先停止正在运行的 `dsh web`,再将 Web Profile 更新到当前版本:
|
|
100
|
+
|
|
101
|
+
```sh
|
|
102
|
+
dsh plugin --profile web add dsh-antigravity-auth@0.1.0
|
|
103
|
+
dsh plugin --profile web list
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
重启 `dsh web` 并刷新浏览器。
|
|
107
|
+
|
|
108
|
+
## Host 配置
|
|
109
|
+
|
|
110
|
+
能力包 patch 按依赖顺序启用独立的 Host 行:
|
|
111
|
+
|
|
112
|
+
| 行 | Export | 作用 |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| `llm-antigravity-auth` | `dsh-antigravity-auth` | 共享认证协调器与 LLM 路由 |
|
|
115
|
+
| `antigravity-search` | `dsh-antigravity-auth/search` | 全局搜索提供方 |
|
|
116
|
+
| `antigravity-image` | `dsh-antigravity-auth/image` | 图片生成与编辑工具 |
|
|
117
|
+
| `antigravity-video` | `dsh-antigravity-auth/video` | 视频理解工具 |
|
|
118
|
+
|
|
119
|
+
## Wire Identity(线路身份)
|
|
120
|
+
|
|
121
|
+
Wire Identity 模块保留 Antigravity 专有 header,并调用 DSH 公开的 `attributionHeaders()` formatter,把真实 DSH 身份放入二级 carrier:
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
X-DeepSeek-Harness-Attribution: deepseek-harness/<version> (+repository-url)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
请求端点由代码固定:仅接受受信任的 HTTPS Antigravity origin 与枚举的 `v1internal:` 操作路径。
|
|
128
|
+
|
|
129
|
+
## 安全与限制
|
|
130
|
+
|
|
131
|
+
- token 值绝不进入前端、设置、日志、会话事件或工具 metadata,仅在 Host 侧发起私有请求时附带认证 header。
|
|
132
|
+
- 严格单账号模式:不提供账号池、轮换、身份回退或账号切换。
|
|
133
|
+
- 本地登出立即清除 Host 内存与本地存储。
|
|
134
|
+
- RPC 状态与登录通道仅限本机 loopback 访问。
|
|
135
|
+
- 原始多媒体 base64 绝不注入会话正文或前端 RPC。
|
|
136
|
+
|
|
137
|
+
## 本地开发
|
|
138
|
+
|
|
139
|
+
```sh
|
|
140
|
+
pnpm install
|
|
141
|
+
pnpm peers check
|
|
142
|
+
pnpm test
|
|
143
|
+
pnpm run check
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`pnpm run build` 生成:
|
|
147
|
+
|
|
148
|
+
- `lib/index.js`:认证 / LLM Host 插件;
|
|
149
|
+
- `lib/search.js`:搜索 Host 插件;
|
|
150
|
+
- `lib/image.js`:图片 Host 插件;
|
|
151
|
+
- `lib/video.js`:视频 Host 插件;
|
|
152
|
+
- `lib/quota.js`:配额 Host 插件;
|
|
153
|
+
- `lib/wire-identity.js`:Wire Identity 线路身份模块;
|
|
154
|
+
- `lib/client.cjs`:浏览器设置端插件;
|
|
155
|
+
- `lib/types/**`:TypeScript 类型声明。
|
|
156
|
+
|
|
157
|
+
## 友情链接
|
|
158
|
+
|
|
159
|
+
- [LINUX DO (L 站)](https://linux.do/)
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# The bootstrap shell keeps the capability rows independently addressable.
|
|
2
|
+
# OAuth and private I/O stay on Host; each row owns its public capability seam and
|
|
3
|
+
# rechecks the single-account/project/live-evidence/settings gates before doing work.
|
|
4
|
+
- insert:
|
|
5
|
+
- id: antigravity-auth
|
|
6
|
+
name: 'dsh-antigravity-auth'
|
|
7
|
+
- id: antigravity-search
|
|
8
|
+
name: 'dsh-antigravity-auth/search'
|
|
9
|
+
- id: antigravity-image
|
|
10
|
+
name: 'dsh-antigravity-auth/image'
|
|
11
|
+
- id: antigravity-video
|
|
12
|
+
name: 'dsh-antigravity-auth/video'
|