dsh-taskbridge 1.7.0 → 1.8.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 +18 -0
- package/LICENSE +21 -21
- package/README.md +150 -289
- package/THIRD_PARTY_NOTICES.txt +23 -23
- package/antigravity/agents/dsh-taskbridge.md +31 -0
- package/antigravity/skills/dsh-taskbridge/SKILL.md +51 -0
- package/codex/dsh-taskbridge.toml +170 -627
- package/cordis.patch.yml +6 -6
- package/docs/INTRODUCTION.md +119 -295
- package/docs/INTRODUCTION.zh.md +134 -279
- package/docs/antigravity-integration.md +42 -0
- package/docs/auth-contract.md +138 -138
- package/docs/claude-code.md +6 -11
- package/docs/codex-integration.md +13 -2
- package/docs/contracts-stage-b.md +443 -443
- package/docs/plugin-market.md +30 -30
- package/docs/redaction-contract.md +170 -170
- package/docs/releases/1.7.0.zh.md +11 -11
- package/docs/releases/1.8.0.zh.md +16 -0
- package/docs/runtime-compatibility.md +1 -1
- package/docs/taskbridge-upgrade.md +28 -28
- package/docs/taskdispatch-upgrade.md +25 -25
- package/docs/workspace-contract.md +538 -538
- package/docs/workspace-grouping.md +126 -126
- package/icon.svg +1 -1
- package/lib/client.d.ts +733 -699
- package/lib/client.js +7 -7
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +149 -144
- package/src/antigravity/installer.js +1046 -0
- package/src/antigravity/seam.js +142 -0
- package/src/auth/fence.js +361 -361
- package/src/auth/grants.js +789 -789
- package/src/client/api.js +143 -0
- package/src/client/index.jsx +113 -3
- package/src/client/sidebar.jsx +862 -862
- package/src/client/styles.js +624 -624
- package/src/client/task-cleanup.js +304 -304
- package/src/client/task-records-table.jsx +217 -217
- package/src/client/task-view.js +307 -307
- package/src/client/workspace-groups.js +482 -482
- package/src/client/workspaces-browser.jsx +770 -770
- package/src/codex/agent-ownership.js +270 -270
- package/src/codex/installer.js +6 -0
- package/src/codex/toml.js +784 -784
- package/src/config/redact.js +245 -245
- package/src/config/store.js +186 -186
- package/src/credentials/seam.js +202 -202
- package/src/http/respond.js +6 -5
- package/src/http/user-plane.js +72 -0
- package/src/index.js +25 -0
- package/src/jobs/diagnostics.js +15 -15
- package/src/jobs/plan-store.js +1020 -1020
- package/src/jobs/review-note.js +63 -63
- package/src/jobs/task-descriptions.js +82 -82
- package/src/jobs/task-display.js +73 -73
- package/src/jobs/task-tree.js +786 -786
- package/src/jobs/title.js +134 -134
- package/src/mcp/continuation.js +317 -317
- package/src/mcp/server.js +12 -5
- package/src/model/connectivity.js +371 -371
- package/src/model/discovery.js +582 -582
- package/src/model/native-catalog.js +68 -68
- package/src/model/openai-adapter.js +671 -671
- package/src/model/probe.js +264 -264
- package/src/model/providers.js +756 -756
- package/src/model/routing.js +321 -321
- package/src/runtime/permissions.js +1619 -1619
- package/src/runtime/question-call.js +162 -162
- package/src/runtime/questions.js +909 -909
- package/src/runtime/worker-prompt.js +60 -53
- package/src/workspace/audit.js +775 -775
- package/src/workspace/preflight.js +424 -424
- package/src/workspace/worktrees.js +679 -679
package/src/client/api.js
CHANGED
|
@@ -111,6 +111,7 @@ export const ROUTES = Object.freeze({
|
|
|
111
111
|
connectivity: `${USER_PLANE_PREFIX}/connectivity`,
|
|
112
112
|
// One path, two methods: `GET` diagnoses, `POST` performs one explicit action.
|
|
113
113
|
codex: `${USER_PLANE_PREFIX}/codex`,
|
|
114
|
+
antigravity: `${USER_PLANE_PREFIX}/antigravity`,
|
|
114
115
|
});
|
|
115
116
|
|
|
116
117
|
/** A refusal or transport failure carrying the contract's stable code. */
|
|
@@ -440,6 +441,14 @@ export function createApi(options = {}) {
|
|
|
440
441
|
async runCodexAction(action) {
|
|
441
442
|
return await request('POST', ROUTES.codex, { action });
|
|
442
443
|
},
|
|
444
|
+
/** Diagnose the Antigravity plugin integration. Read-only on the host. */
|
|
445
|
+
async getAntigravityStatus() {
|
|
446
|
+
return await request('GET', ROUTES.antigravity);
|
|
447
|
+
},
|
|
448
|
+
/** Perform one explicit Antigravity integration action (`install`, `repair`, `remove`). */
|
|
449
|
+
async runAntigravityAction(action) {
|
|
450
|
+
return await request('POST', ROUTES.antigravity, { action });
|
|
451
|
+
},
|
|
443
452
|
};
|
|
444
453
|
}
|
|
445
454
|
|
|
@@ -949,6 +958,68 @@ export function describeCodexOutcome(outcome) {
|
|
|
949
958
|
return parts.join(';') + '。';
|
|
950
959
|
}
|
|
951
960
|
|
|
961
|
+
export const ANTIGRAVITY_ACTIONS = Object.freeze(['install', 'repair', 'remove']);
|
|
962
|
+
|
|
963
|
+
export const ANTIGRAVITY_TARGETS = Object.freeze([
|
|
964
|
+
{ key: 'plugin', label: 'Antigravity 插件与规则(Skill + 子智能体)' },
|
|
965
|
+
{ key: 'mcp', label: 'Antigravity 插件 MCP 配置' },
|
|
966
|
+
{ key: 'switch', label: 'DSH 本机调用开关' },
|
|
967
|
+
]);
|
|
968
|
+
|
|
969
|
+
export function antigravityTargetView(antigravity, switchState, target) {
|
|
970
|
+
const label = ANTIGRAVITY_TARGETS.find((entry) => entry.key === target)?.label ?? target;
|
|
971
|
+
if (target === 'switch') {
|
|
972
|
+
const authorized = switchState?.authorized === true;
|
|
973
|
+
return {
|
|
974
|
+
key: 'switch',
|
|
975
|
+
label,
|
|
976
|
+
state: authorized ? 'on' : 'off',
|
|
977
|
+
tone: authorized ? 'on' : 'off',
|
|
978
|
+
detail: authorized
|
|
979
|
+
? '已开启:Antigravity 可以通过 MCP 提交任务。'
|
|
980
|
+
: '已关闭:Antigravity 可以查询状态,但新任务会被拒绝;本页不会替你打开它。',
|
|
981
|
+
};
|
|
982
|
+
}
|
|
983
|
+
const block = target === 'plugin' ? antigravity?.plugin : antigravity?.mcp;
|
|
984
|
+
if (block === null || block === undefined || typeof block !== 'object') {
|
|
985
|
+
return { key: target, label, state: 'unknown', tone: 'off', detail: '宿主尚未回报该状态。' };
|
|
986
|
+
}
|
|
987
|
+
const state = String(block.state ?? 'unknown');
|
|
988
|
+
const done = target === 'plugin' ? block.installed === true : block.configured === true;
|
|
989
|
+
const detailParts = [];
|
|
990
|
+
if (typeof block.path === 'string' && block.path !== '') detailParts.push(block.path);
|
|
991
|
+
if (target === 'mcp' && typeof block.script === 'string' && block.script !== '') {
|
|
992
|
+
detailParts.push(`入口:${block.script}`);
|
|
993
|
+
}
|
|
994
|
+
if (target === 'mcp') {
|
|
995
|
+
if (typeof block.node === 'string' && block.node !== '') detailParts.push(`Node:${block.node}`);
|
|
996
|
+
else if (block.nodeResolved === false) detailParts.push('Node:未确定(不会写入桌面应用自身的 exe)');
|
|
997
|
+
}
|
|
998
|
+
return {
|
|
999
|
+
key: target,
|
|
1000
|
+
label,
|
|
1001
|
+
state,
|
|
1002
|
+
tone: done ? 'on' : (state === 'conflict' || state === 'unreadable' || state === 'modified') ? 'warn' : 'off',
|
|
1003
|
+
detail: CODEX_STATE_LABELS[state] ?? state,
|
|
1004
|
+
path: typeof block.path === 'string' ? block.path : '',
|
|
1005
|
+
paths: detailParts,
|
|
1006
|
+
};
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
export function describeAntigravityOutcome(outcome) {
|
|
1010
|
+
if (outcome === null || outcome === undefined) return '';
|
|
1011
|
+
const names = { plugin: '插件与规则文件', mcp: 'MCP 配置' };
|
|
1012
|
+
const changed = Array.isArray(outcome.changed) ? outcome.changed.map((key) => names[key] ?? key) : [];
|
|
1013
|
+
const refused = Array.isArray(outcome.refused) ? outcome.refused : [];
|
|
1014
|
+
const parts = [];
|
|
1015
|
+
if (changed.length > 0) parts.push(`已写入:${changed.join('、')}`);
|
|
1016
|
+
if (refused.length > 0) parts.push(`未改动:${refused.map((entry) => names[entry?.target] ?? entry?.target ?? '未知').join('、')}`);
|
|
1017
|
+
if (parts.length === 0) {
|
|
1018
|
+
return outcome.action === 'remove' ? '没有需要移除的插件托管文件。' : '已是最新,没有需要写入的内容。';
|
|
1019
|
+
}
|
|
1020
|
+
return parts.join(';') + '。';
|
|
1021
|
+
}
|
|
1022
|
+
|
|
952
1023
|
/** Provider protocols this stage supports. */
|
|
953
1024
|
export const SUPPORTED_PROTOCOLS = Object.freeze(['openai-chat']);
|
|
954
1025
|
|
|
@@ -2197,6 +2268,15 @@ export function describeError(error) {
|
|
|
2197
2268
|
CLEANUP_REVIEW_WRITE: '该任务的审查意见正在写入,未删除任何记录;请稍后重试。',
|
|
2198
2269
|
CLEANUP_UNAVAILABLE: '当前宿主不提供记录清理能力(或记录暂时无法读取),未删除任何记录。',
|
|
2199
2270
|
CLEANUP_FAILED: '记录写入失败,未删除任何记录;旧记录仍会显示。',
|
|
2271
|
+
CODEX_INTEGRATION_UNAVAILABLE: '当前宿主未提供 Codex 集成接口。',
|
|
2272
|
+
CODEX_HOME_INVALID: 'Codex 配置目录路径不合法(必须为绝对路径)。',
|
|
2273
|
+
CODEX_ACTION_INVALID: '不支持的 Codex 集成操作。',
|
|
2274
|
+
CODEX_CONFIG_UNSUPPORTED: 'Codex 配置文件存在冲突或不受支持的格式,插件未改动。',
|
|
2275
|
+
ANTIGRAVITY_INTEGRATION_UNAVAILABLE: '当前宿主未提供 Antigravity 集成接口。',
|
|
2276
|
+
ANTIGRAVITY_HOME_INVALID: 'Antigravity 配置目录路径不合法(必须为绝对路径)。',
|
|
2277
|
+
ANTIGRAVITY_HOME_UNUSABLE: 'Antigravity 配置目录不可用(非普通目录或链接无法解析)。',
|
|
2278
|
+
ANTIGRAVITY_ACTION_INVALID: '不支持的 Antigravity 集成操作。',
|
|
2279
|
+
ANTIGRAVITY_PATH_CONFLICT: 'Antigravity 插件目录存在冲突或符号链接边界,插件未写入。',
|
|
2200
2280
|
};
|
|
2201
2281
|
const known = messages[code];
|
|
2202
2282
|
if (known !== undefined) return `${known}(${code})`;
|
|
@@ -2590,6 +2670,9 @@ export function createStore(options = {}) {
|
|
|
2590
2670
|
codex: null,
|
|
2591
2671
|
codexError: null,
|
|
2592
2672
|
codexOutcome: null,
|
|
2673
|
+
antigravity: null,
|
|
2674
|
+
antigravityError: null,
|
|
2675
|
+
antigravityOutcome: null,
|
|
2593
2676
|
};
|
|
2594
2677
|
/** @type {Set<() => void>} */
|
|
2595
2678
|
const listeners = new Set();
|
|
@@ -3351,6 +3434,65 @@ export function createStore(options = {}) {
|
|
|
3351
3434
|
});
|
|
3352
3435
|
},
|
|
3353
3436
|
|
|
3437
|
+
/** Read the Antigravity integration status. Strictly read-only. */
|
|
3438
|
+
async refreshAntigravityStatus() {
|
|
3439
|
+
if (typeof api.getAntigravityStatus !== 'function') {
|
|
3440
|
+
patch({
|
|
3441
|
+
antigravity: null,
|
|
3442
|
+
antigravityError: '当前宿主未提供 Antigravity 集成接口(插件版本可能较旧)。',
|
|
3443
|
+
});
|
|
3444
|
+
return { ok: false };
|
|
3445
|
+
}
|
|
3446
|
+
return await track('antigravityStatus', async () => {
|
|
3447
|
+
try {
|
|
3448
|
+
const body = await api.getAntigravityStatus();
|
|
3449
|
+
patch({ antigravity: body.antigravity ?? null, antigravityError: null });
|
|
3450
|
+
return { ok: true, antigravity: body.antigravity ?? null, switch: body.switch ?? null };
|
|
3451
|
+
} catch (error) {
|
|
3452
|
+
const unavailable = error?.code === 'HTTP_404' || error?.code === 'USER_PLANE_UNKNOWN_ROUTE';
|
|
3453
|
+
patch({
|
|
3454
|
+
antigravity: null,
|
|
3455
|
+
antigravityError: unavailable
|
|
3456
|
+
? '当前宿主未提供 Antigravity 集成接口(插件版本可能较旧)。'
|
|
3457
|
+
: describeError(error),
|
|
3458
|
+
});
|
|
3459
|
+
return { ok: false, error };
|
|
3460
|
+
}
|
|
3461
|
+
});
|
|
3462
|
+
},
|
|
3463
|
+
|
|
3464
|
+
/** Perform one explicit Antigravity integration action (`install`, `repair`, `remove`). */
|
|
3465
|
+
async runAntigravityAction(action) {
|
|
3466
|
+
if (!ANTIGRAVITY_ACTIONS.includes(action)) {
|
|
3467
|
+
notify('error', `未知的 Antigravity 操作:${String(action)}`);
|
|
3468
|
+
return { ok: false };
|
|
3469
|
+
}
|
|
3470
|
+
if (typeof api.runAntigravityAction !== 'function') {
|
|
3471
|
+
notify('error', '当前宿主未提供 Antigravity 集成接口。');
|
|
3472
|
+
return { ok: false };
|
|
3473
|
+
}
|
|
3474
|
+
return await track('antigravityAction', async () => {
|
|
3475
|
+
try {
|
|
3476
|
+
const body = await api.runAntigravityAction(action);
|
|
3477
|
+
const outcome = {
|
|
3478
|
+
action: body.action ?? action,
|
|
3479
|
+
changed: Array.isArray(body.changed) ? body.changed : [],
|
|
3480
|
+
refused: Array.isArray(body.refused) ? body.refused : [],
|
|
3481
|
+
};
|
|
3482
|
+
const antigravity = body.antigravity ?? state.antigravity;
|
|
3483
|
+
patch({ antigravity, antigravityError: null, antigravityOutcome: outcome });
|
|
3484
|
+
const summary = describeAntigravityOutcome(outcome);
|
|
3485
|
+
const failed = outcome.refused.length > 0;
|
|
3486
|
+
notify(failed ? 'error' : 'success', summary === '' ? '操作完成。' : summary);
|
|
3487
|
+
return { ok: !failed, outcome, antigravity };
|
|
3488
|
+
} catch (error) {
|
|
3489
|
+
patch({ antigravityOutcome: null });
|
|
3490
|
+
notify('error', describeError(error));
|
|
3491
|
+
return { ok: false, error };
|
|
3492
|
+
}
|
|
3493
|
+
});
|
|
3494
|
+
},
|
|
3495
|
+
|
|
3354
3496
|
/**
|
|
3355
3497
|
* Replace the silence thresholds, the progress-check cadence and the repeated-failure count.
|
|
3356
3498
|
*
|
|
@@ -3686,6 +3828,7 @@ export function createStore(options = {}) {
|
|
|
3686
3828
|
// Diagnostic read only. `init` must never perform a Codex write: installing
|
|
3687
3829
|
// files is an explicit operator action, not a side effect of opening a page.
|
|
3688
3830
|
void store.refreshCodexStatus();
|
|
3831
|
+
void store.refreshAntigravityStatus();
|
|
3689
3832
|
void store.loadCatalog();
|
|
3690
3833
|
},
|
|
3691
3834
|
|
package/src/client/index.jsx
CHANGED
|
@@ -50,6 +50,8 @@
|
|
|
50
50
|
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
|
|
51
51
|
|
|
52
52
|
import {
|
|
53
|
+
ANTIGRAVITY_ACTIONS,
|
|
54
|
+
CODEX_ACTIONS,
|
|
53
55
|
CONNECTIVITY_LAYERS,
|
|
54
56
|
CONVERSATION_POLICY_LABEL,
|
|
55
57
|
EFFORT_LABELS,
|
|
@@ -64,11 +66,13 @@ import {
|
|
|
64
66
|
PERMISSION_STATE_LABELS,
|
|
65
67
|
REVIEW_STATE_LABELS,
|
|
66
68
|
REVIEW_VERDICT_LABELS,
|
|
69
|
+
ROUTES,
|
|
67
70
|
SUPPORTED_PROTOCOLS,
|
|
68
71
|
TASK_STATES,
|
|
69
72
|
TREE_ORPHAN_LABELS,
|
|
70
73
|
TREE_STATUS_LABELS,
|
|
71
74
|
TREE_STATUS_TONES,
|
|
75
|
+
antigravityTargetView,
|
|
72
76
|
boundedText,
|
|
73
77
|
changedFiles,
|
|
74
78
|
clone,
|
|
@@ -76,6 +80,7 @@ import {
|
|
|
76
80
|
codexTargetView,
|
|
77
81
|
createApi,
|
|
78
82
|
createStore,
|
|
83
|
+
describeAntigravityOutcome,
|
|
79
84
|
describeCodexOutcome,
|
|
80
85
|
describeError,
|
|
81
86
|
documentFromDraft,
|
|
@@ -1612,7 +1617,7 @@ function MonitoringCard({ store, snapshot }) {
|
|
|
1612
1617
|
<strong>运行进度检查</strong>从<strong>最近一次真正回传给派工方的新成果</strong>算起(第一段基准是运行开始),
|
|
1613
1618
|
不是"没有进展",也不是运行总时长:DSH 内部的模型输出、思考步骤、工具调用与结果,心跳、空轮询、页面刷新、
|
|
1614
1619
|
等待授权或等待问题答复、重复失败提醒、检查本身,以及本机自检的结论,<strong>都不算新成果</strong>。
|
|
1615
|
-
|
|
1620
|
+
当前等待通道只在任务结束时交付成果,所以运行一开始就长时间没有新交付的任务,会在到达你设定的「运行进度检查」间隔时被提醒一次。
|
|
1616
1621
|
<strong>这些检查完全在本机进行,不会调用任何大模型,也不消耗 token;提醒只是提示,绝不取消、重启或重新提交任务。</strong>
|
|
1617
1622
|
任一间隔填 <strong>0</strong> 即关闭对应提醒,两项可以分别关闭。
|
|
1618
1623
|
</p>
|
|
@@ -3445,16 +3450,108 @@ function CodexPanel({ store, snapshot }) {
|
|
|
3445
3450
|
);
|
|
3446
3451
|
}
|
|
3447
3452
|
|
|
3453
|
+
/**
|
|
3454
|
+
* The Antigravity integration card: manages the self-contained plugin bundle under
|
|
3455
|
+
* `<ANTIGRAVITY_CONFIG_DIR>/plugins/dsh-taskbridge/` without touching global config.
|
|
3456
|
+
* @param {object} props - `store`, `snapshot`.
|
|
3457
|
+
* @returns {object} the card.
|
|
3458
|
+
*/
|
|
3459
|
+
function AntigravityPanel({ store, snapshot }) {
|
|
3460
|
+
const antigravity = snapshot.antigravity ?? null;
|
|
3461
|
+
const error = snapshot.antigravityError ?? null;
|
|
3462
|
+
const busy = snapshot.loading?.antigravityAction === true;
|
|
3463
|
+
const refreshing = snapshot.loading?.antigravityStatus === true;
|
|
3464
|
+
const pluginView = antigravityTargetView(antigravity, null, 'plugin');
|
|
3465
|
+
const mcpView = antigravityTargetView(antigravity, null, 'mcp');
|
|
3466
|
+
const switchAuthorized = snapshot.status?.delegation?.authorized === true
|
|
3467
|
+
|| snapshot.settings?.delegationEnabled === true;
|
|
3468
|
+
const switchView = antigravityTargetView(antigravity, { authorized: switchAuthorized }, 'switch');
|
|
3469
|
+
const ready = antigravity?.ready === true;
|
|
3470
|
+
const notes = Array.isArray(antigravity?.notes) ? antigravity.notes : [];
|
|
3471
|
+
const disabled = busy || refreshing || antigravity === null;
|
|
3472
|
+
return (
|
|
3473
|
+
<section className="dshdg-card" aria-labelledby="dshdg-antigravity-title">
|
|
3474
|
+
<div className="dshdg-row">
|
|
3475
|
+
<h3 id="dshdg-antigravity-title">Antigravity 集成(插件包 + Skill + 子智能体 + MCP)</h3>
|
|
3476
|
+
<span className="dshdg-spacer" />
|
|
3477
|
+
<Badge tone={ready ? 'on' : 'off'}>{ready ? '已就绪' : '未就绪'}</Badge>
|
|
3478
|
+
</div>
|
|
3479
|
+
<p className="dshdg-muted">
|
|
3480
|
+
{'点下面的按钮,把独立的 TaskBridge 插件装进 Antigravity 插件目录('}
|
|
3481
|
+
<span className="dshdg-mono">plugins/dsh-taskbridge/</span>
|
|
3482
|
+
{'),内含 '}
|
|
3483
|
+
<span className="dshdg-mono">plugin.json</span>
|
|
3484
|
+
{'、按需加载的 '}
|
|
3485
|
+
<span className="dshdg-mono">skills/dsh-taskbridge/SKILL.md</span>
|
|
3486
|
+
{'、后台派工子智能体 '}
|
|
3487
|
+
<span className="dshdg-mono">agents/dsh-taskbridge.md</span>
|
|
3488
|
+
{' 以及插件内独立 '}
|
|
3489
|
+
<span className="dshdg-mono">mcp_config.json</span>
|
|
3490
|
+
{'。不会修改 Antigravity 全局 '}
|
|
3491
|
+
<span className="dshdg-mono">mcp_config.json</span>
|
|
3492
|
+
{' 或 '}
|
|
3493
|
+
<span className="dshdg-mono">config.json</span>
|
|
3494
|
+
{'。首次安装只会由你点击触发;已安装且未被手动修改的文件会在插件升级后自动刷新。'}
|
|
3495
|
+
</p>
|
|
3496
|
+
{error === null ? null : <p className="dshdg-fail">{error}</p>}
|
|
3497
|
+
{antigravity === null ? (
|
|
3498
|
+
<p className="dshdg-faint">正在读取 Antigravity 状态…</p>
|
|
3499
|
+
) : (
|
|
3500
|
+
<>
|
|
3501
|
+
<p className="dshdg-faint">
|
|
3502
|
+
{'Antigravity 配置目录:'}
|
|
3503
|
+
<span className="dshdg-mono">{String(antigravity.antigravityHome ?? '')}</span>
|
|
3504
|
+
{'(设置环境变量 ANTIGRAVITY_CONFIG_DIR 可改到别处)'}
|
|
3505
|
+
</p>
|
|
3506
|
+
<div className="dshdg-list" data-dshdg-antigravity-targets="">
|
|
3507
|
+
<CodexTargetRow view={pluginView} />
|
|
3508
|
+
<CodexTargetRow view={mcpView} />
|
|
3509
|
+
<CodexTargetRow view={switchView} />
|
|
3510
|
+
</div>
|
|
3511
|
+
{notes.length === 0 ? null : (
|
|
3512
|
+
<ul className="dshdg-hint">
|
|
3513
|
+
{notes.map((note) => <li key={note.code}>{note.text}</li>)}
|
|
3514
|
+
</ul>
|
|
3515
|
+
)}
|
|
3516
|
+
<div className="dshdg-row">
|
|
3517
|
+
<button type="button" disabled={busy || refreshing} onClick={() => { void store.refreshAntigravityStatus(); }}>
|
|
3518
|
+
{refreshing ? '读取中…' : '刷新状态'}
|
|
3519
|
+
</button>
|
|
3520
|
+
<button type="button" className="dshdg-primary" disabled={disabled} onClick={() => { void store.runAntigravityAction('install'); }}>
|
|
3521
|
+
{busy ? '处理中…' : '安装 / 更新 Antigravity 插件'}
|
|
3522
|
+
</button>
|
|
3523
|
+
<button type="button" disabled={disabled} onClick={() => { void store.runAntigravityAction('repair'); }}>
|
|
3524
|
+
仅修复 MCP 配置
|
|
3525
|
+
</button>
|
|
3526
|
+
<button type="button" className="dshdg-danger" disabled={disabled} onClick={() => { void store.runAntigravityAction('remove'); }}>
|
|
3527
|
+
移除插件托管项
|
|
3528
|
+
</button>
|
|
3529
|
+
</div>
|
|
3530
|
+
{snapshot.antigravityOutcome === null || snapshot.antigravityOutcome === undefined
|
|
3531
|
+
? null
|
|
3532
|
+
: <p className="dshdg-hint">{describeAntigravityOutcome(snapshot.antigravityOutcome)}</p>}
|
|
3533
|
+
</>
|
|
3534
|
+
)}
|
|
3535
|
+
<p className="dshdg-hint">
|
|
3536
|
+
{'安装后 Antigravity 会自动发现插件(或在重启 / 新开对话后加载新的 MCP 工具与技能)。'
|
|
3537
|
+
+ '你可以在 Antigravity 对话中通过 @dsh-taskbridge 或明确要求“交给 DSH 执行”触发派工,也可由主智能体通过后台子智能体并行盯梢多个独立隔离任务。'
|
|
3538
|
+
+ '本页不会替你打开顶部的本机调用开关;被你手动编辑过的 SKILL.md、子智能体或 MCP 配置会被保留并报告,不会被覆盖或删除。'}
|
|
3539
|
+
</p>
|
|
3540
|
+
</section>
|
|
3541
|
+
);
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3448
3544
|
// ---------------------------------------------------------------------------
|
|
3449
3545
|
// Root page
|
|
3450
3546
|
// ---------------------------------------------------------------------------
|
|
3451
3547
|
|
|
3452
|
-
/** Tab definitions: authorization is not a tab — it renders above all
|
|
3548
|
+
/** Tab definitions: authorization is not a tab — it renders above all five. */
|
|
3453
3549
|
const TABS = Object.freeze([
|
|
3454
3550
|
{ key: 'providers', label: '接口管理' },
|
|
3455
3551
|
{ key: 'execution', label: '执行设置' },
|
|
3456
3552
|
{ key: 'tasks', label: '任务记录' },
|
|
3457
3553
|
{ key: 'codex', label: 'Codex 集成' },
|
|
3554
|
+
{ key: 'antigravity', label: 'Antigravity 集成' },
|
|
3458
3555
|
]);
|
|
3459
3556
|
|
|
3460
3557
|
/**
|
|
@@ -3541,6 +3638,7 @@ export function DelegateConfigPage(props) {
|
|
|
3541
3638
|
</SessionNavigation.Provider>
|
|
3542
3639
|
) : null}
|
|
3543
3640
|
{tab === 'codex' ? <CodexPanel store={store} snapshot={snapshot} /> : null}
|
|
3641
|
+
{tab === 'antigravity' ? <AntigravityPanel store={store} snapshot={snapshot} /> : null}
|
|
3544
3642
|
</div>
|
|
3545
3643
|
|
|
3546
3644
|
<div className="dshdg-row" data-dshdg-autosave="">
|
|
@@ -3565,7 +3663,19 @@ export function DelegateConfigPage(props) {
|
|
|
3565
3663
|
}
|
|
3566
3664
|
|
|
3567
3665
|
/** Re-exported so the documented contract and tests share one name for the body document. */
|
|
3568
|
-
export {
|
|
3666
|
+
export {
|
|
3667
|
+
ANTIGRAVITY_ACTIONS,
|
|
3668
|
+
CODEX_ACTIONS,
|
|
3669
|
+
ROUTES,
|
|
3670
|
+
antigravityTargetView,
|
|
3671
|
+
codexTargetView,
|
|
3672
|
+
describeAntigravityOutcome,
|
|
3673
|
+
describeCodexOutcome,
|
|
3674
|
+
describeError,
|
|
3675
|
+
documentFromDraft,
|
|
3676
|
+
exportDocument,
|
|
3677
|
+
planCreateRequest,
|
|
3678
|
+
};
|
|
3569
3679
|
|
|
3570
3680
|
export {
|
|
3571
3681
|
MAX_CLEANUP_CHAINS,
|