@lay111/dsh-plugin-google 1.0.13 → 1.0.15

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.
Files changed (3) hide show
  1. package/README.md +15 -8
  2. package/package.json +2 -2
  3. package/src/api.js +1 -5
package/README.md CHANGED
@@ -2,24 +2,32 @@
2
2
 
3
3
  # 🌌 @lay111/dsh-plugin-google
4
4
 
5
- **DeepSeek Harness 官方微内核原生插件 · 零代理直连 Google Antigravity Pro 算力**
5
+ **DeepSeek Harness 第三方开源插件 · 零代理直连 Google Antigravity Pro 算力**
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/@lay111/dsh-plugin-google?color=blue&logo=npm)](https://www.npmjs.com/package/@lay111/dsh-plugin-google)
8
8
  [![license](https://img.shields.io/npm/l/@lay111/dsh-plugin-google?color=green)](./LICENSE)
9
9
  [![node](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen.svg)](https://nodejs.org)
10
10
  [![DeepSeek Harness](https://img.shields.io/badge/DeepSeek%20Harness-v0.1.1+-purple.svg)](https://github.com/deepseek-ai)
11
11
 
12
- [特性介绍](#-核心特性) • [支持模型](#-支持模型矩阵) • [一行命令安装](#-一行命令极速安装) • [使用指南](#-使用指南) • [架构解析](#-架构设计)
12
+ [特性介绍](#-核心特性) • [安全与免责声明](#-安全风险与免责声明) • [支持模型](#-支持模型矩阵-4-大顶尖旗舰模型) • [安装使用](#-一行命令极速安装) • [架构解析](#-架构设计)
13
13
 
14
14
  </div>
15
15
 
16
16
  ---
17
17
 
18
+ > [!CAUTION]
19
+ > ### ⚠️ 安全风险与免责声明 (Security Warning & Disclaimer)
20
+ > 1. **严禁使用主力 Google 账号**:本插件使用 Google 内部 IDE 协议通道直连,涉及 `cloud-platform` 等高权限 Scope。**强烈建议使用专门注册的独立小号(Alt Account)进行登录,切勿使用绑定重要资产、个人隐私的主账号!**
21
+ > 2. **非官方产品声明**:本项目由社区开发者独立维护开源,**非 Google 官方、亦非 DeepSeek 官方出品**。
22
+ > 3. **ToS 风险提示**:直连内部接口可能存在违反 Google 服务的风险。Google 随时可能吊销内置的 OAuth Client 或对违规调用账号进行风控限制,使用本项目所产生的一切风险由使用者自行承担。
23
+
24
+ ---
25
+
18
26
  ## 📖 简介
19
27
 
20
- `@lay111/dsh-plugin-google` 是专为 **DeepSeek Harness (DSH)** 打造的纯原生 **Cordis 微内核模型与认证提供方插件**。
28
+ `@lay111/dsh-plugin-google` 是为 **DeepSeek Harness (DSH)** 打造的第三方 **Cordis 微内核模型提供方插件**。
21
29
 
22
- 无需在后台启动任何 Node 代理中转服务、无需占用本地端口,直接在 DSH 进程内通过 Google 官方安全认证协议直连 **Google Antigravity Pro**,畅享包含 **Gemini 3.7 Flash High (10,000+ Thinking Budget 满血深度思考)**、**Claude Sonnet 4.6 Thinking** 在内的全量顶尖大模型矩阵!
30
+ 无需在后台启动独立代理进程、无需占用本地端口,直接在 DSH 进程内通过 Google 官方认证协议直连 **Google Antigravity Pro**,支持包含 **Gemini 3.7 Flash High (10,000 Budget 满血深度思考)**、**Claude Opus 4.6 (Thinking)** 在内的 4 大顶尖旗舰模型矩阵!
23
31
 
24
32
  ---
25
33
 
@@ -27,7 +35,7 @@
27
35
 
28
36
  - ⚡ **零代理架构(Zero-Proxy)**:完全基于 DSH 官方 `LlmAdapter` 契约编写,DSH 进程内部直接通过 HTTPS 流式通信,**零后台服务常驻、零端口占用、零额外内存消耗**。
29
37
  - 🧠 **原生满血思维链(Native Thinking Chain)**:完美支持 Gemini 3.7 Flash High 与 Claude 4.6 的流式思考过程(Reasoning Deltas)展开与折叠。
30
- - 🔑 **官方 OAuth 2.0 握手**:内置 Google 认证服务,支持本地浏览器一键授权,Token 自动在后台静默续期,永久免密。
38
+ - 🔑 **官方 OAuth 2.0 握手**:本地浏览器一键授权,Token 本地加密保存(`0600` 文件权限),自动在后台静默续期。
31
39
  - 🌐 **全生态 Profile 兼容**:
32
40
  - 🖥️ **TUI 全屏终端**(`dst`):呈现 Claude Code 风格的沉浸式编程交互;
33
41
  - 🌐 **Web 网页端**(`dsh web`):本地图形化浏览器界面直接选模;
@@ -59,17 +67,16 @@ npx @lay111/dsh-plugin-google
59
67
 
60
68
  ## 💡 使用指南
61
69
 
62
- ### 1. 登录 Google 账号
70
+ ### 1. 登录 Google 账号 (请使用小号)
63
71
  ```bash
64
72
  dsh-google-auth login
65
73
  ```
66
- *(系统会自动打开浏览器让你选择你的 Google Pro 账号并授权,授权后终端自动捕获)*
67
74
 
68
75
  ### 2. 启动终端全屏 TUI 模式 (推荐)
69
76
  ```bash
70
77
  dst
71
78
  ```
72
- *(在 TUI 界面中,可以随时输入 `/model` 打开弹窗自由切换上述任意模型)*
79
+ *(在 TUI 界面中,可以随时输入 `/model` 自由切换上述 4 大旗舰模型)*
73
80
 
74
81
  ### 3. 启动本地 Web 网页端模式
75
82
  ```bash
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lay111/dsh-plugin-google",
3
- "version": "1.0.13",
4
- "description": "Native DeepSeek Harness Plugin for Google Antigravity Pro & Gemini/Claude Flagship Models",
3
+ "version": "1.0.15",
4
+ "description": "Community-driven DeepSeek Harness Plugin for Google Antigravity & Gemini/Claude Models",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
7
7
  "exports": {
package/src/api.js CHANGED
@@ -3,7 +3,7 @@ import { findModel } from './models.js';
3
3
 
4
4
  const ANTIGRAVITY_ENDPOINTS = [
5
5
  'https://daily-cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse',
6
- 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse',
6
+ 'https://daily-cloudcode-pa.sandbox.googleapis.com/v1internal:streamGenerateContent?alt=sse',
7
7
  ];
8
8
 
9
9
  export function formatMessagesToAntigravity(messages, modelSpec, projectId) {
@@ -143,7 +143,6 @@ export async function* streamAntigravity(options, accessToken, projectId) {
143
143
  const errText = await res.text();
144
144
  lastError = `(HTTP ${status}) ${errText}`;
145
145
 
146
- // If rate-limited (429) or temporary server overload (503), wait and retry
147
146
  if ((status === 429 || status === 503) && attempt < maxRetries - 1) {
148
147
  await new Promise((r) => setTimeout(r, (attempt + 1) * 1500));
149
148
  continue;
@@ -160,9 +159,6 @@ export async function* streamAntigravity(options, accessToken, projectId) {
160
159
  }
161
160
 
162
161
  if (!response) {
163
- if (lastError?.includes('429') || lastError?.includes('exhausted')) {
164
- throw new Error(`Google Quota Exceeded (429): 当前模型并发或配额超限。建议在 TUI 中输入 /model 切换至 claude-sonnet-4.6、gemini-3.7-flash-medium 或 gemini-3.6-flash,或稍等 20 秒后重试。`);
165
- }
166
162
  throw new Error(`Google Antigravity Upstream Error: ${lastError}`);
167
163
  }
168
164