dsh-antigravity-auth 0.1.2 → 0.1.4-alpha.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 +16 -0
- package/README.md +39 -24
- package/README.zh.md +38 -22
- package/lib/client.cjs +6 -2
- package/lib/client.cjs.map +1 -1
- package/lib/image.js +14 -13
- package/lib/index.js +36 -4
- package/lib/llm-adapter.js +299 -69
- package/lib/media-admission.js +1 -1
- package/lib/{private-failure-B9vzUkQ7.js → private-failure-DaQoTCkz.js} +1 -1
- package/lib/{private-transport-urF138qW.js → private-transport-BQshWFmk.js} +18 -2
- package/lib/private-transport.js +1 -1
- package/lib/project-context.js +2 -2
- package/lib/quota.js +2 -2
- package/lib/replay.js +2 -1
- package/lib/{rpc-contract-BFWfdKKs.js → rpc-contract-CKmz9a1z.js} +3 -1
- package/lib/rpc-contract.js +1 -1
- package/lib/search.js +14 -13
- package/lib/types/client/AntigravityAuthSettings.d.ts +1 -1
- package/lib/types/client/AntigravityAuthSettings.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +1 -1
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/image.d.ts +1 -1
- package/lib/types/image.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/llm-adapter.d.ts.map +1 -1
- package/lib/types/loopback-rpc.d.ts +19 -0
- package/lib/types/loopback-rpc.d.ts.map +1 -0
- package/lib/types/replay.d.ts +1 -1
- package/lib/types/replay.d.ts.map +1 -1
- package/lib/types/rpc-contract.d.ts +2 -2
- package/lib/types/rpc-contract.d.ts.map +1 -1
- package/lib/types/rpc-vocabulary.d.ts +1 -1
- package/lib/types/rpc-vocabulary.d.ts.map +1 -1
- package/lib/types/rpc.d.ts +2 -2
- package/lib/types/rpc.d.ts.map +1 -1
- package/lib/types/search.d.ts +1 -1
- package/lib/types/search.d.ts.map +1 -1
- package/lib/types/video.d.ts +1 -1
- package/lib/types/video.d.ts.map +1 -1
- package/lib/types/wire-identity.d.ts +1 -3
- package/lib/types/wire-identity.d.ts.map +1 -1
- package/lib/video.js +14 -13
- package/lib/wire-identity.js +9 -19
- package/package.json +47 -42
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.4-alpha.5] - 2026-09-03
|
|
6
|
+
|
|
7
|
+
- Raised the development and peer baseline to DSH `0.1.2-alpha.5`, Cordis `4.0.2`, and Schemastery `3.18.2`, with one coherent prerelease dependency graph.
|
|
8
|
+
- Migrated tool-call IDs, Settings registration, Session event reads, Connection result types, browser Context owners, and client injection metadata to alpha.5 public APIs; removed the retired client-runtime and Host apiproxy packages.
|
|
9
|
+
- Preserved fail-closed account controls after alpha.5 removed per-method RPC authority: only an explicit `127.0.0.1` Web bind uses the real dispatcher; absent, all-interface, and unknown binds receive an inert value-free denial, while non-loopback clients hide the settings section.
|
|
10
|
+
- Updated the audited community core snapshot to `2.2.0`, normalizing the live `gemini-3.8-flash-tiered` directory alias so Gemini 3.8 Flash survives live intersection with its native Medium default and captured Low/Medium/High wire routes and request metadata.
|
|
11
|
+
- Realigned private requests with the audited AGY 1.1.24 wire identity and envelope: the fixed CLI User-Agent replaces obsolete desktop/X-Goog metadata headers while preserving the mandatory DSH secondary attribution, and Gemini 3.8 sends captured numeric thinking budgets plus the `userAgent` field.
|
|
12
|
+
- Drained successful SSE bodies after provider terminal events and replaced Node's race-prone `Readable.toWeb()` bridge with its async-iterable Web Stream bridge, preventing legitimate response cancellation from crashing the Host with `ERR_INVALID_STATE`.
|
|
13
|
+
- Refreshed the release README with current Gemini 3.8 behavior, exact prerelease/tag/tarball installs, the real Host row ID, and no obsolete rc.2 migration warnings.
|
|
14
|
+
|
|
15
|
+
## [0.1.3] - 2026-08-31
|
|
16
|
+
|
|
17
|
+
- Restored reliable Claude Opus tool selection by preserving the complete DSH system prompt and applying the audited Claude tool instruction, strict parameter descriptions, and validated function-calling mode.
|
|
18
|
+
- Fixed Claude continuation after parallel tool execution by preserving call/response IDs, applying the safe thought-signature sentinel, dropping unsigned reasoning replay, and grouping correlated function responses.
|
|
19
|
+
- Mapped exact bounded Antigravity context-window overflow responses into DSH compaction recovery while retaining fail-closed parsing, timeout, response-size, frame-size, depth, and redaction limits.
|
|
20
|
+
|
|
5
21
|
## [0.1.2] - 2026-08-27
|
|
6
22
|
|
|
7
23
|
- Kept the Antigravity provider visible in DSH's stock model catalog during explicitly allowlisted transient live-discovery failures by falling back to the audited pinned text snapshot.
|
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# dsh-antigravity-auth
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/dsh-antigravity-auth)
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-antigravity-auth)
|
|
4
4
|
[](https://awesome-dsh-plugin.com)
|
|
5
5
|
|
|
6
6
|
English | [中文](README.zh.md)
|
|
7
7
|
|
|
8
|
-
Current release: **v0.1.2
|
|
8
|
+
Current alpha release: **v0.1.4-alpha.5**, aligned with DSH `0.1.2-alpha.5`, Cordis `4.0.2`, and Schemastery `3.18.2`.
|
|
9
9
|
|
|
10
10
|
A self-contained [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
11
11
|
**Antigravity Capability Bundle**. It integrates Antigravity's private OAuth session
|
|
12
12
|
and Wire Identity for:
|
|
13
13
|
|
|
14
|
-
- the `google-antigravity` LLM route (Gemini Flash, Gemini Pro, Claude Opus, Claude Sonnet, GPT-OSS);
|
|
14
|
+
- the `google-antigravity` LLM route (Gemini 3.8/3.7/3.6 Flash, Gemini 3.1 Pro, Claude Opus, Claude Sonnet, GPT-OSS);
|
|
15
15
|
- a Global Antigravity Search Provider behind DSH's stock `web_search` tool;
|
|
16
16
|
- durable image generation and editing through `generate_image`, plus the model-facing `list_images` catalog;
|
|
17
17
|
- multimodal workspace MP4 video understanding through `analyze_video`;
|
|
@@ -23,6 +23,14 @@ and Wire Identity for:
|
|
|
23
23
|
> may be rate-limited or changed without notice. Do not rely on it for
|
|
24
24
|
> production workloads.
|
|
25
25
|
|
|
26
|
+
## v0.1.4-alpha.5 highlights
|
|
27
|
+
|
|
28
|
+
- Moves the development graph and peer baseline to DSH `0.1.2-alpha.5`, including current Settings, Session, Connection, client-injection, and `ToolCallId` APIs; this repository's lockfile contains no older DSH family.
|
|
29
|
+
- Adds authenticated Gemini 3.8 Flash discovery with a Medium default and captured Low/Medium/High routes, model enums, and numeric thinking budgets.
|
|
30
|
+
- Realigns every private Cloud Code `v1internal:` operation with the audited AGY CLI 1.1.24 wire identity while retaining mandatory truthful DSH secondary attribution.
|
|
31
|
+
- Drains successful provider terminal SSE framing and bodies, then uses the cancellation-safe async-iterable Web Stream bridge to prevent Node `ERR_INVALID_STATE` crashes.
|
|
32
|
+
- Keeps account RPC fail-closed on alpha.5: only an explicit `127.0.0.1` Web bind reaches authentication services.
|
|
33
|
+
|
|
26
34
|
## Features
|
|
27
35
|
|
|
28
36
|
### Shared Antigravity Login State
|
|
@@ -33,14 +41,14 @@ and Wire Identity for:
|
|
|
33
41
|
- Resolves credentials through versioned owner-only storage (POSIX `0600`; Windows user-data ACLs), short-lived in-memory cache, and proactive refresh before expiry.
|
|
34
42
|
- Coalesces concurrent refreshes in-process and enforces account/lineage consistency before persisting refreshed tokens.
|
|
35
43
|
- 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
|
|
44
|
+
- Sends no token value over `/antigravity-auth`. On DSH alpha.5, the real account dispatcher is mounted only for an explicit `127.0.0.1` Web bind; an absent, all-interface, or unknown bind receives an inert value-free denial handler.
|
|
37
45
|
|
|
38
46
|
### LLM Routing & Models
|
|
39
47
|
|
|
40
48
|
- Registers the `google-antigravity` provider through DSH's public `LlmAdapter` seam.
|
|
41
|
-
- Intersects the
|
|
42
|
-
- Keeps DSH's stock model selector usable when live discovery is temporarily unavailable or drifts by falling back to the pinned text snapshot; Settings still reports the live-catalog state. A successful empty intersection stays empty, while missing authentication, authorization denial, cancellation, and explicit attribution rejection remain fail-closed.
|
|
43
|
-
- Supports streaming with pre-delta authentication replay and preserve-by-id function call correlation across fragmented provider names.
|
|
49
|
+
- Intersects the audited `@cortexkit/antigravity-auth-core@2.2.0` model snapshot with live account discovery, normalizing the provider's `gemini-3.8-flash-tiered` directory alias. Gemini 3.8 Flash uses the captured AGY 1.1.24 Low/Medium/High wire routes, numeric thinking budgets, model enums, `userAgent` envelope field, and Medium default.
|
|
50
|
+
- Keeps DSH's stock model selector usable when live discovery is temporarily unavailable or drifts by falling back to the pinned text snapshot; Settings still reports the live-catalog state. This advisory fallback can temporarily retain a legacy route such as Gemini 3.5 Flash, while a successful live intersection filters routes absent for the account. A successful empty intersection stays empty, while missing authentication, authorization denial, cancellation, and explicit attribution rejection remain fail-closed.
|
|
51
|
+
- Supports streaming with pre-delta authentication replay and preserve-by-id function call correlation across fragmented provider names. Successful terminal events drain the remaining SSE framing before DSH completion, while required cancellation paths use Node's async-iterable Web Stream bridge instead of the race-prone `Readable.toWeb()` adapter.
|
|
44
52
|
|
|
45
53
|
### Web Search
|
|
46
54
|
|
|
@@ -69,46 +77,54 @@ Multimodal `analyze_video` tool accepts workspace MP4 videos, performing bounded
|
|
|
69
77
|
|
|
70
78
|
## Requirements
|
|
71
79
|
|
|
72
|
-
- DeepSeek Harness `0.1.
|
|
80
|
+
- DeepSeek Harness `0.1.2-alpha.5` (minimum and tested prerelease baseline; direct peers use `^0.1.2-alpha.5`).
|
|
73
81
|
- Node.js `^22.19.0` or `>=24.0.0`.
|
|
82
|
+
- `pnpm` available on `PATH` (`11.7.0` is the tested project package manager).
|
|
74
83
|
- A Google account with Antigravity access.
|
|
75
84
|
|
|
76
|
-
## Install from npm
|
|
85
|
+
## Install from npm
|
|
77
86
|
|
|
78
|
-
The npm package includes prebuilt Host and browser bundles:
|
|
87
|
+
The npm package includes prebuilt Host and browser bundles. Install the alpha.5-aligned release explicitly:
|
|
79
88
|
|
|
80
89
|
```sh
|
|
81
|
-
dsh plugin --profile web add dsh-antigravity-auth
|
|
90
|
+
dsh plugin --profile web add dsh-antigravity-auth@0.1.4-alpha.5
|
|
82
91
|
```
|
|
83
92
|
|
|
84
|
-
|
|
93
|
+
With the Web Host bound explicitly to `127.0.0.1`, restart `dsh web`, open Settings, and select **Antigravity Auth**.
|
|
94
|
+
|
|
95
|
+
## Install a prebuilt GitHub release
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
dsh plugin --profile web add https://github.com/suntianc/dsh-antigravity-auth/releases/download/v0.1.4-alpha.5/dsh-antigravity-auth-0.1.4-alpha.5.tgz
|
|
99
|
+
```
|
|
85
100
|
|
|
86
|
-
## Install from GitHub source
|
|
101
|
+
## Install from the tagged GitHub source
|
|
87
102
|
|
|
88
103
|
```sh
|
|
89
|
-
dsh plugin --profile web add github:suntianc/dsh-antigravity-auth
|
|
104
|
+
dsh plugin --profile web add github:suntianc/dsh-antigravity-auth#v0.1.4-alpha.5
|
|
90
105
|
```
|
|
91
106
|
|
|
92
107
|
Git dependencies are built by the package's `prepare` script. If prompted by pnpm,
|
|
93
|
-
add the printed `allowBuilds` key to
|
|
94
|
-
then run the command again.
|
|
108
|
+
add the printed `allowBuilds` key to the `pnpm-workspace.yaml` path printed by
|
|
109
|
+
dsh, then run the command again. Only grant this permission after reviewing the source.
|
|
95
110
|
|
|
96
111
|
## Install a tarball
|
|
97
112
|
|
|
98
113
|
```sh
|
|
99
|
-
git clone https://github.com/suntianc/dsh-antigravity-auth.git
|
|
114
|
+
git clone --branch v0.1.4-alpha.5 --depth 1 https://github.com/suntianc/dsh-antigravity-auth.git
|
|
100
115
|
cd dsh-antigravity-auth
|
|
101
116
|
pnpm install
|
|
102
117
|
pnpm pack
|
|
103
|
-
dsh plugin --profile web add ./dsh-antigravity-auth-0.1.
|
|
118
|
+
dsh plugin --profile web add ./dsh-antigravity-auth-0.1.4-alpha.5.tgz
|
|
104
119
|
```
|
|
105
120
|
|
|
106
121
|
## Upgrade
|
|
107
122
|
|
|
108
|
-
Stop the running `dsh web` process and
|
|
123
|
+
Stop the running `dsh web` process and verify that the Host itself is already on DSH `0.1.2-alpha.5`; upgrade DSH first if it is not. Then install the matching plugin release and verify the profile entry:
|
|
109
124
|
|
|
110
125
|
```sh
|
|
111
|
-
dsh
|
|
126
|
+
dsh --version # must report 0.1.2-alpha.5
|
|
127
|
+
dsh plugin --profile web add dsh-antigravity-auth@0.1.4-alpha.5
|
|
112
128
|
dsh plugin --profile web list
|
|
113
129
|
```
|
|
114
130
|
|
|
@@ -120,15 +136,14 @@ The bundle patch activates independent Host rows in dependency order:
|
|
|
120
136
|
|
|
121
137
|
| Row | Export | Purpose |
|
|
122
138
|
|---|---|---|
|
|
123
|
-
| `
|
|
139
|
+
| `antigravity-auth` | `dsh-antigravity-auth` | Shared auth coordinator and LLM route |
|
|
124
140
|
| `antigravity-search` | `dsh-antigravity-auth/search` | Global Search Provider |
|
|
125
141
|
| `antigravity-image` | `dsh-antigravity-auth/image` | Image generation & editing tools |
|
|
126
142
|
| `antigravity-video` | `dsh-antigravity-auth/video` | Video understanding tools |
|
|
127
143
|
|
|
128
144
|
## Wire Identity
|
|
129
145
|
|
|
130
|
-
The Wire Identity module keeps the audited
|
|
131
|
-
returned by DSH's public `attributionHeaders()` formatter as the secondary carrier:
|
|
146
|
+
The Wire Identity module keeps the audited AGY CLI 1.1.24 content-request User-Agent and adds the truthful DSH identity returned by DSH's public `attributionHeaders()` formatter as the mandatory secondary carrier:
|
|
132
147
|
|
|
133
148
|
```text
|
|
134
149
|
X-DeepSeek-Harness-Attribution: deepseek-harness/<version> (+repository-url)
|
|
@@ -142,7 +157,7 @@ Requests are code-owned: only fixed HTTPS Antigravity origins and enumerated `v1
|
|
|
142
157
|
- POSIX owner-only modes are enforced for auth, gate-evidence, and controlled live-image files. Windows access is governed by ACLs, so synthetic POSIX group/other bits are not treated as an access decision; symlink, file-type, size, schema, and content checks remain enforced.
|
|
143
158
|
- Single-account only: no account arrays, switching, rotation, quota pools, or identity fallback.
|
|
144
159
|
- Local logout clears local storage and in-memory caches immediately.
|
|
145
|
-
- The
|
|
160
|
+
- DSH alpha.5 no longer exposes a per-method or Host-side carrier authority tier. The plugin therefore enables the real account RPC handler only when the public WebServer bind is exactly `127.0.0.1`; absent, all-interface, and unknown binds receive only `loopback-required`. The browser also hides the section when `ConnectionHandle.isLoopback` is false, but that client hint is UX only: an owner-contained custom carrier cannot be authorized until DSH exposes a corresponding Host-side fact.
|
|
146
161
|
- Raw media base64 never enters session text or browser RPC.
|
|
147
162
|
|
|
148
163
|
## Development
|
package/README.zh.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# dsh-antigravity-auth
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/dsh-antigravity-auth)
|
|
3
|
+
[](https://www.npmjs.com/package/dsh-antigravity-auth)
|
|
4
4
|
[](https://awesome-dsh-plugin.com)
|
|
5
5
|
|
|
6
6
|
[English](README.md) | 中文
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
当前 alpha 版本:**v0.1.4-alpha.5**,对齐 DSH `0.1.2-alpha.5`、Cordis `4.0.2` 与 Schemastery `3.18.2`。
|
|
9
9
|
|
|
10
10
|
这是一个自包含的 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)
|
|
11
11
|
**Antigravity 能力包**。它集成了 Antigravity 的私有 OAuth 登录态与 Wire Identity 线路身份,提供:
|
|
12
12
|
|
|
13
|
-
- `google-antigravity` LLM 路由(Gemini Flash、Gemini Pro、Claude Opus、Claude Sonnet、GPT-OSS);
|
|
13
|
+
- `google-antigravity` LLM 路由(Gemini 3.8/3.7/3.6 Flash、Gemini 3.1 Pro、Claude Opus、Claude Sonnet、GPT-OSS);
|
|
14
14
|
- 接入 DSH 内置 `web_search` 工具的全局 Antigravity 搜索提供方;
|
|
15
15
|
- 通过 `generate_image` 实现持久图片生成与编辑,并提供供模型使用的 `list_images` 目录;
|
|
16
16
|
- 支持本地工作区 MP4 文件的多模态 `analyze_video` 视频理解;
|
|
@@ -20,6 +20,14 @@
|
|
|
20
20
|
> **⚠️ 非官方通道——仅限个人开发。** 私有、受账户权限控制的 Antigravity
|
|
21
21
|
> 后端服务未获官方支持、可随时撤销,也可能在没有通知的情况下被限流或变更。请勿依赖它承载生产任务。
|
|
22
22
|
|
|
23
|
+
## v0.1.4-alpha.5 重点更新
|
|
24
|
+
|
|
25
|
+
- 将开发依赖图与 peer 基线迁移到 DSH `0.1.2-alpha.5`,采用当前 Settings、Session、Connection、client injection 与 `ToolCallId` API;本仓库 lockfile 不含旧 DSH 包族。
|
|
26
|
+
- 新增经过登录态目录确认的 Gemini 3.8 Flash,默认 Medium,并使用抓取的 Low/Medium/High route、model enum 与 numeric thinking budget。
|
|
27
|
+
- 所有私有 Cloud Code `v1internal:` 操作重新对齐已审计的 AGY CLI 1.1.24 wire identity,同时保留强制、真实的 DSH 二级归因。
|
|
28
|
+
- 排空成功的 provider terminal SSE framing 与 body,并改用 cancellation-safe async-iterable Web Stream bridge,避免 Node `ERR_INVALID_STATE` 崩溃。
|
|
29
|
+
- 在 alpha.5 上保持账号 RPC fail-closed:只有明确绑定 `127.0.0.1` 的 Web Host 才能触达认证服务。
|
|
30
|
+
|
|
23
31
|
## 功能特性
|
|
24
32
|
|
|
25
33
|
### 共享 Antigravity 登录态
|
|
@@ -30,14 +38,14 @@
|
|
|
30
38
|
- 通过属主权限文件存储(POSIX `0600`;Windows 用户数据目录 ACL)、短时内存缓存解析凭证,并在到期前主动刷新。
|
|
31
39
|
- 进程内合并并发刷新请求;仅在账号与 lineage 未变化时原子提交新 token。
|
|
32
40
|
- 仪表盘实时显示连接状态以及 Gemini 与 Claude/GPT 模型家族的 5 小时和每周额度进度条。
|
|
33
|
-
-
|
|
41
|
+
- `/antigravity-auth` 绝不向前端泄露 token。DSH alpha.5 下,真实账号 dispatcher 只在明确的 `127.0.0.1` Web bind 上启用;缺失、all-interface 或未知 bind 只能得到不含状态的安全拒绝。
|
|
34
42
|
|
|
35
43
|
### LLM 路由与模型发现
|
|
36
44
|
|
|
37
45
|
- 通过 DSH 公开的 `LlmAdapter` 接口注册 `google-antigravity` 提供方。
|
|
38
|
-
-
|
|
39
|
-
- 当真实模型发现暂时不可用或发生协议漂移时,DSH 内置模型选择器会回退到固定文本模型快照,设置页仍诚实显示 live catalog
|
|
40
|
-
- 流式传输支持首个数据块前的一次认证重放,并支持跨分片提供方函数名的 call-id
|
|
46
|
+
- 将已审计的 `@cortexkit/antigravity-auth-core@2.2.0` 固定社区模型快照与真实登录账号的可用模型取交集,并规范化服务端返回的 `gemini-3.8-flash-tiered` 目录别名;Gemini 3.8 Flash 使用 AGY 1.1.24 抓取的 Low/Medium/High wire route、numeric thinking budget、model enum、`userAgent` envelope 字段与 Medium 默认档位。
|
|
47
|
+
- 当真实模型发现暂时不可用或发生协议漂移时,DSH 内置模型选择器会回退到固定文本模型快照,设置页仍诚实显示 live catalog 状态;该 advisory 降级可能暂时保留 Gemini 3.5 Flash 等旧路由,而成功的 live intersection 会过滤账号目录中不存在的路由。成功但零交集的结果仍保持为空,未登录、授权拒绝、取消与明确的 attribution 拒绝仍保持 fail-closed。
|
|
48
|
+
- 流式传输支持首个数据块前的一次认证重放,并支持跨分片提供方函数名的 call-id 稳定关联;成功的 terminal event 会先排空剩余 SSE framing 再向 DSH 完成流,必要的取消路径则使用 Node 的 async-iterable Web Stream bridge,避开存在竞态的 `Readable.toWeb()` 适配器。
|
|
41
49
|
|
|
42
50
|
### 网页搜索
|
|
43
51
|
|
|
@@ -63,44 +71,52 @@
|
|
|
63
71
|
|
|
64
72
|
## 环境要求
|
|
65
73
|
|
|
66
|
-
- DeepSeek Harness `0.1.
|
|
74
|
+
- DeepSeek Harness `0.1.2-alpha.5`(最低且已测试的 prerelease 基线;直接 peer 使用 `^0.1.2-alpha.5`)。
|
|
67
75
|
- Node.js `^22.19.0` 或 `>=24.0.0`。
|
|
76
|
+
- `PATH` 中可用 `pnpm`(本项目测试版本为 `11.7.0`)。
|
|
68
77
|
- 具有 Antigravity 权限的 Google 账号。
|
|
69
78
|
|
|
70
|
-
## 从 npm
|
|
79
|
+
## 从 npm 安装
|
|
71
80
|
|
|
72
|
-
npm 包包含预构建的 Host 与浏览器 bundle
|
|
81
|
+
npm 包包含预构建的 Host 与浏览器 bundle。请显式安装与 DSH alpha.5 对齐的版本:
|
|
73
82
|
|
|
74
83
|
```sh
|
|
75
|
-
dsh plugin --profile web add dsh-antigravity-auth
|
|
84
|
+
dsh plugin --profile web add dsh-antigravity-auth@0.1.4-alpha.5
|
|
76
85
|
```
|
|
77
86
|
|
|
78
|
-
|
|
87
|
+
确认 Web Host 明确绑定 `127.0.0.1` 后,重启 `dsh web`,打开设置并选择 **Antigravity Auth**。
|
|
88
|
+
|
|
89
|
+
## 安装 GitHub 预构建 Release
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
dsh plugin --profile web add https://github.com/suntianc/dsh-antigravity-auth/releases/download/v0.1.4-alpha.5/dsh-antigravity-auth-0.1.4-alpha.5.tgz
|
|
93
|
+
```
|
|
79
94
|
|
|
80
|
-
## 从 GitHub 源码安装
|
|
95
|
+
## 从 GitHub tag 源码安装
|
|
81
96
|
|
|
82
97
|
```sh
|
|
83
|
-
dsh plugin --profile web add github:suntianc/dsh-antigravity-auth
|
|
98
|
+
dsh plugin --profile web add github:suntianc/dsh-antigravity-auth#v0.1.4-alpha.5
|
|
84
99
|
```
|
|
85
100
|
|
|
86
|
-
Git 依赖会通过包内 `prepare` 脚本从源码构建。如遇 pnpm 提示,将输出的 `allowBuilds` 键添加到
|
|
101
|
+
Git 依赖会通过包内 `prepare` 脚本从源码构建。如遇 pnpm 提示,将输出的 `allowBuilds` 键添加到 dsh 输出的 `pnpm-workspace.yaml` 路径,再重新执行安装。只应在审查并信任源码后授权。
|
|
87
102
|
|
|
88
103
|
## 从 tarball 安装
|
|
89
104
|
|
|
90
105
|
```sh
|
|
91
|
-
git clone https://github.com/suntianc/dsh-antigravity-auth.git
|
|
106
|
+
git clone --branch v0.1.4-alpha.5 --depth 1 https://github.com/suntianc/dsh-antigravity-auth.git
|
|
92
107
|
cd dsh-antigravity-auth
|
|
93
108
|
pnpm install
|
|
94
109
|
pnpm pack
|
|
95
|
-
dsh plugin --profile web add ./dsh-antigravity-auth-0.1.
|
|
110
|
+
dsh plugin --profile web add ./dsh-antigravity-auth-0.1.4-alpha.5.tgz
|
|
96
111
|
```
|
|
97
112
|
|
|
98
113
|
## 升级
|
|
99
114
|
|
|
100
|
-
先停止正在运行的 `dsh web
|
|
115
|
+
先停止正在运行的 `dsh web`,确认 Host 本身已经是 DSH `0.1.2-alpha.5`;若不是,必须先升级 DSH。随后安装匹配的插件版本并核对 profile 条目:
|
|
101
116
|
|
|
102
117
|
```sh
|
|
103
|
-
dsh
|
|
118
|
+
dsh --version # 必须显示 0.1.2-alpha.5
|
|
119
|
+
dsh plugin --profile web add dsh-antigravity-auth@0.1.4-alpha.5
|
|
104
120
|
dsh plugin --profile web list
|
|
105
121
|
```
|
|
106
122
|
|
|
@@ -112,14 +128,14 @@ dsh plugin --profile web list
|
|
|
112
128
|
|
|
113
129
|
| 行 | Export | 作用 |
|
|
114
130
|
|---|---|---|
|
|
115
|
-
| `
|
|
131
|
+
| `antigravity-auth` | `dsh-antigravity-auth` | 共享认证协调器与 LLM 路由 |
|
|
116
132
|
| `antigravity-search` | `dsh-antigravity-auth/search` | 全局搜索提供方 |
|
|
117
133
|
| `antigravity-image` | `dsh-antigravity-auth/image` | 图片生成与编辑工具 |
|
|
118
134
|
| `antigravity-video` | `dsh-antigravity-auth/video` | 视频理解工具 |
|
|
119
135
|
|
|
120
136
|
## Wire Identity(线路身份)
|
|
121
137
|
|
|
122
|
-
Wire Identity
|
|
138
|
+
Wire Identity 模块保留已审计的 AGY CLI 1.1.24 content-request User-Agent,并调用 DSH 公开的 `attributionHeaders()` formatter,把真实 DSH 身份放入强制二级 carrier:
|
|
123
139
|
|
|
124
140
|
```text
|
|
125
141
|
X-DeepSeek-Harness-Attribution: deepseek-harness/<version> (+repository-url)
|
|
@@ -133,7 +149,7 @@ X-DeepSeek-Harness-Attribution: deepseek-harness/<version> (+repository-url)
|
|
|
133
149
|
- auth、gate evidence 与受控 live image 文件在 POSIX 上严格校验属主 mode;Windows 由 ACL 管理访问权限,因此不把合成的 POSIX group/other bits 作为访问判据,但仍执行 symlink、文件类型、大小、schema 与内容校验。
|
|
134
150
|
- 严格单账号模式:不提供账号池、轮换、身份回退或账号切换。
|
|
135
151
|
- 本地登出立即清除 Host 内存与本地存储。
|
|
136
|
-
- RPC
|
|
152
|
+
- DSH alpha.5 不再提供逐 method 或 Host 侧 carrier authority。插件只在公开 WebServer bind 恰为 `127.0.0.1` 时启用真实 account RPC;缺失、all-interface 与未知 bind 只返回 `loopback-required`。浏览器在 `ConnectionHandle.isLoopback` 为 false 时也不会注册该设置分区,但该客户端提示仅用于 UX:在 DSH 提供对应 Host 侧事实前,owner-contained 自定义 carrier 仍不能获得授权。
|
|
137
153
|
- 原始多媒体 base64 绝不注入会话正文或前端 RPC。
|
|
138
154
|
|
|
139
155
|
## 本地开发
|
package/lib/client.cjs
CHANGED
|
@@ -78,6 +78,7 @@ window.__ModuleLoader__.load({
|
|
|
78
78
|
//#region src/rpc-vocabulary.ts
|
|
79
79
|
/** Closed, browser-safe RPC error vocabulary shared by Host and client. */
|
|
80
80
|
const OPERATION_ERROR_CODES = [
|
|
81
|
+
"loopback-required",
|
|
81
82
|
"invalid-grant",
|
|
82
83
|
"network",
|
|
83
84
|
"timeout",
|
|
@@ -95,6 +96,7 @@ window.__ModuleLoader__.load({
|
|
|
95
96
|
];
|
|
96
97
|
const SAFE_RPC_ERROR_MESSAGES = Object.freeze({
|
|
97
98
|
"bad-request": "antigravity-auth: invalid request",
|
|
99
|
+
"loopback-required": "Antigravity account controls require a loopback-bound DSH Host",
|
|
98
100
|
cancelled: "The operation was cancelled",
|
|
99
101
|
"risk-acknowledgement-required": "Risk acknowledgement is required before login",
|
|
100
102
|
"port-conflict": "The fixed OAuth callback port is already in use",
|
|
@@ -151,7 +153,7 @@ window.__ModuleLoader__.load({
|
|
|
151
153
|
//#endregion
|
|
152
154
|
//#region src/rpc-contract.ts
|
|
153
155
|
const ANTIGRAVITY_AUTH_RPC_CHANNEL = "/antigravity-auth";
|
|
154
|
-
/** Build the browser face over the plugin-owned
|
|
156
|
+
/** Build the browser face over the plugin-owned guarded account channel. */
|
|
155
157
|
function createAntigravityAuthRpcClient(rpc) {
|
|
156
158
|
return {
|
|
157
159
|
status: (signal) => callValidated(rpc, "status", {}, signal, (value) => {
|
|
@@ -2038,7 +2040,9 @@ window.__ModuleLoader__.load({
|
|
|
2038
2040
|
zh,
|
|
2039
2041
|
en
|
|
2040
2042
|
}), "antigravity-auth: copy dictionaries");
|
|
2041
|
-
const
|
|
2043
|
+
const connection = ctx.get("connection");
|
|
2044
|
+
if (!connection.isLoopback) return;
|
|
2045
|
+
const rpc = createAntigravityAuthRpcClient(connection.rpc);
|
|
2042
2046
|
const t = ctx.locale.bind(NS);
|
|
2043
2047
|
const settingsScope = ctx.settingsScope;
|
|
2044
2048
|
const searchScope = settingsScope?.bind({
|