dsh-agy-link 0.6.57 → 0.6.58
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 -50
- package/dist/client.js +138 -36
- package/dist/index.js +51 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,68 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.6.
|
|
3
|
+
## 0.6.58 (2026-11-22)
|
|
4
4
|
|
|
5
5
|
### English
|
|
6
6
|
|
|
7
|
-
- **
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
-
|
|
11
|
-
- **Docs: updated READMEs, configuration/architecture/known-gaps/security guides, and refreshed all `docs/assets/*.png` screenshots (PII-redacted) for v0.6.55–v0.6.57.**
|
|
7
|
+
- **Feat(accounts): a pool account's label is now editable from the console (fixes #152, part 1).** `pool.setAccountAlias()` existed but nothing exposed it — the alias could only be set while adding an account, so a typo, or a Google account that was renamed, left a stale label forever.
|
|
8
|
+
- **New route `POST /plugins/agy-link/pool/alias`** (`{ id, alias }`): non-empty, ≤64 chars, 404 for an unknown id. A successful rename clears `defaultAlias`, which is exactly what makes the card stop rendering the generated "Backup Google account N" label and show the typed one instead.
|
|
9
|
+
- **Inline rename in the card**: a "Rename" action opens an input under the card and saves through the host. The proxy editor and this one were the same layout written twice, so both now share `src/client/sections/inline-editor.ts` (which also keeps `AccountsPanel.ts` inside the file-size budget).
|
|
10
|
+
- Four locales carry the copy. `saveAlias` lives with the other account-lifecycle actions, not with quota actions — renaming has nothing to do with quota, and keeping it there would have pushed `quotaActions` past the line budget.
|
|
12
11
|
|
|
13
12
|
### 中文
|
|
14
13
|
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- **文档:同步更新中英文 README、配置/架构/已知限制/安全文档,并全面刷新脱敏后的最新版界面截图(`docs/assets/*.png`)。**
|
|
14
|
+
- **特性(账号):池账号的显示名称现在可在控制台编辑(修复 #152 第一部分)。** `pool.setAccountAlias()` 早就存在,但没有任何入口暴露它——别名只能在添加账号时设定,于是打错字、或 Google 账号改名后,卡片上的旧名字会一直留着。
|
|
15
|
+
- **新增路由 `POST /plugins/agy-link/pool/alias`**(`{ id, alias }`):非空、≤64 字符、未知 id 返回 404。改名成功会清除 `defaultAlias`——这正是让卡片不再渲染自动生成的「备用 Google 账号 N」、改为显示用户输入的机制。
|
|
16
|
+
- **卡片内联重命名**:一个「重命名」动作在卡片下展开输入框,经宿主保存。代理编辑器与它原本是同一套布局写了两遍,现在共用 `src/client/sections/inline-editor.ts`(同时让 `AccountsPanel.ts` 保持在行数预算内)。
|
|
17
|
+
- 四语言文案齐全。`saveAlias` 归入账号生命周期动作而非配额动作——改名与配额无关,放在配额里会把 `quotaActions` 顶出行数预算。
|
|
20
18
|
|
|
21
|
-
## 0.6.56 (2026-11-
|
|
19
|
+
## 0.6.56 (2026-11-21)
|
|
22
20
|
|
|
23
21
|
### English
|
|
24
22
|
|
|
25
|
-
- **
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
23
|
+
- **Feat(accounts): a pool account's label is now editable from the console (fixes #152, part 1).** `pool.setAccountAlias()` existed but nothing exposed it — the alias could only be set while adding an account, so a typo or a renamed Google account left a stale label forever.
|
|
24
|
+
- **New route `POST /plugins/agy-link/pool/alias`** (`{ id, alias }`) with the validations the UI relies on: non-empty, ≤64 chars, and a 404 for an unknown id. A successful rename clears `defaultAlias`, which is what makes the card stop rendering the generated "Backup Google account N" label and show the typed one.
|
|
25
|
+
- **Inline rename in the card**: a "Rename" action opens an input under the card, saving through the host and refreshing the pool. The proxy editor and this one were the same layout twice, so both now share `src/client/sections/inline-editor.ts` (which also keeps `AccountsPanel.ts` inside the file-size budget).
|
|
26
|
+
- **Test(dx): the SIGKILL-escalation test no longer asserts a wall-clock upper bound.** `durationMs` spans spawn→exit, so on a saturated host it read **16 minutes** during a full coverage run while the escalation itself was correct. The lower bound (must wait out the 3s window) and the semantic `signal === 'SIGKILL'` assertion stay; "hangs forever" is covered by the race guard, which reaps the child.
|
|
29
27
|
|
|
30
28
|
### 中文
|
|
31
29
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- `
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
## 0.6.55 (2026-11-21)
|
|
38
|
-
|
|
39
|
-
### English
|
|
40
|
-
|
|
41
|
-
- **Feat(parity): full `agy` high- and medium-value parity suite — in-chat image generation, persistent ACP transport, multi-account ecosystem sync, Generative UI embeds, extended toolview cards, multimodal staging, slash bridges, and CLI security/passthrough flags.**
|
|
42
|
-
- **In-chat image generation & balanced defaults**: Added the `agy_image` DSH tool (`imageTool` config), `/agy image` (`/agy img`) slash command, and `image-generator` subagent image preview card. Updated defaults to balanced `imageEffort: 'medium'` and auto-preference for discovered `gemini-4-hydrogen` (falling back to `gemini-3.8-flash`).
|
|
43
|
-
- **Execution security & CLI passthrough**: Extended `PermissionMode` with `'auto'` (`--mode auto`), added `--sandbox` (`sandbox` config / request option), and wired `--agent`, `--settings`, and `--json-schema` passthrough into CLI arg assembly.
|
|
44
|
-
- **Multimodal input staging & audio playback**: Added PDF, audio, and video attachment staging up to `mediaMaxFileBytes` (20 MiB default) alongside an inline `<audio>` player enhancer (`src/client/images/audio.ts`).
|
|
45
|
-
- **Extended toolview cards**: Added dedicated cards and models for `swarm`, `run_workflow`, `schedule`, `manage_task`, subagent lifecycle (`invoke_subagent`, `define_subagent`, `manage_subagents`, `send_message`), and browser/devtools tools.
|
|
46
|
-
- **Generative UI `<agent-embed>`**: Added streaming `<agent-embed src="...">` tag buffering in `EventMapper`/`text.ts`, a strict-CSP `/plugins/agy-link/embed` route, and a sandboxed `<iframe sandbox="allow-scripts">` auto-resizing/theme-synced renderer (`src/client/embed.ts`).
|
|
47
|
-
- **Persistent `agy acp` session pool**: Added stdio JSON-RPC `AcpProcess` + `AcpSessionPool` (`transport: 'cli' | 'acp'`, lazy idle sweep timer, Windows single-account eviction, and automatic pre-stream CLI `-p` fallback).
|
|
48
|
-
- **Multi-account ecosystem inventory & sync**: Added discovery across `plugins`, `mcp`, `skills`, `rules`, and `agents`, allowlist sync into isolated pool accounts, `/ecosystem` HTTP routes, Settings `EcosystemPanel`, and `/agy plugins|mcp|agents|skills|sync-ecosystem`.
|
|
49
|
-
- **Slash command bridges**: Added `/agy btw`, `/agy fork` (including `list`/`restore`), `/agy grill` / `grill-me`, `/agy learn [--apply]`, and `/agy compact`.
|
|
50
|
-
- **Per-family account scoping & host-backed warmup bar**: Preserved per-family active account pins (`manualPinAtByFamily`, `resolvedActiveAccountIds`) and host-backed `WarmupStatusBar` + warmup resilience improvements.
|
|
51
|
-
- **i18n & Windows test hardening**: Localized all newly introduced DOM surfaces (`embed.ts`, `audio.ts`, `extended-cards.ts`, `image-card.ts`) onto `src/client/i18n-bridge.ts` across `en`/`zh`/`es`/`ptBR`, and fixed Windows path/CRLF handling in `test/issue153-client-locale.test.ts`.
|
|
52
|
-
|
|
53
|
-
### 中文
|
|
54
|
-
|
|
55
|
-
- **特性(能力对齐):全面补齐 `agy` 高/中优先级能力——对话内生图、持久化 ACP 传输池、多账号生态清点与同步、Generative UI 内嵌页、扩展工具卡片、多模态附件暂存、斜杠命令桥接与安全透传参数。**
|
|
56
|
-
- **对话内生图与均衡默认参数**:新增 `agy_image` DSH 工具(`imageTool` 配置)、`/agy image`(`/agy img`)命令以及 `image-generator` 子代理图片预览卡片;将默认生图思考深度调整为均衡 `imageEffort: 'medium'`,并在发现 `gemini-4-hydrogen` 时自动优先选用(否则回退 `gemini-3.8-flash`)。
|
|
57
|
-
- **安全执行与 CLI 参数透传**:为 `PermissionMode` 新增 `'auto'`(`--mode auto`),新增 `--sandbox` 沙箱开关,并打通 `--agent`、`--settings`、`--json-schema` 参数透传。
|
|
58
|
-
- **多模态输入暂存与音频播放器**:支持 PDF、音频、视频附件暂存(默认单文件上限 `mediaMaxFileBytes` 20 MiB)与聊天内联 `<audio>` 播放器(`src/client/images/audio.ts`)。
|
|
59
|
-
- **扩展工具详情卡片**:为 `swarm`、`run_workflow`、`schedule`、`manage_task`、子代理生命周期(`invoke_subagent` / `define_subagent` / `manage_subagents` / `send_message`)及浏览器/DevTools 工具提供专用卡片渲染。
|
|
60
|
-
- **Generative UI `<agent-embed>`**:在 `EventMapper`/`text.ts` 中实现流式标签缓冲,新增严格 CSP 的 `/plugins/agy-link/embed` 路由与支持自适应高度及主题同步的沙箱 `<iframe sandbox="allow-scripts">` 渲染器(`src/client/embed.ts`)。
|
|
61
|
-
- **持久化 `agy acp` 会话池**:实现 stdio JSON-RPC `AcpProcess` 与 `AcpSessionPool`(`transport: 'cli' | 'acp'`、懒启动空闲清理定时器、Windows 单账号驱逐与流前自动回退 CLI `-p`)。
|
|
62
|
-
- **多账号生态清点与同步**:支持 `plugins`/`mcp`/`skills`/`rules`/`agents` 跨账号清点、白名单同步到隔离池账号、`/ecosystem` HTTP 路由、设置页 `EcosystemPanel` 及 `/agy plugins|mcp|agents|skills|sync-ecosystem`。
|
|
63
|
-
- **斜杠命令桥接**:新增 `/agy btw`、`/agy fork`(含 `list`/`restore`)、`/agy grill` / `grill-me`、`/agy learn [--apply]` 与 `/agy compact`。
|
|
64
|
-
- **按模型家族的活跃账号隔离与宿主级预热条**:保留 `manualPinAtByFamily`、`resolvedActiveAccountIds` 及宿主后端驱动的 `WarmupStatusBar` 与预热韧性增强。
|
|
65
|
-
- **国际化与 Windows 测试加固**:将全部新增客户端 DOM 界面(`embed.ts`、`audio.ts`、`extended-cards.ts`、`image-card.ts`)接入 `src/client/i18n-bridge.ts` 并补齐 `en`/`zh`/`es`/`ptBR` 文案,同时修复 `test/issue153-client-locale.test.ts` 的 Windows 路径与 CRLF 注释处理。
|
|
30
|
+
- **特性(账号):池账号的显示名称现在可在控制台直接编辑(修复 #152 第一部分)。** `pool.setAccountAlias()` 早就存在,但没有任何入口暴露它——别名只能在添加账号时设定,于是打错字或 Google 账号改名后,卡片上的旧名字会一直留着。
|
|
31
|
+
- **新增路由 `POST /plugins/agy-link/pool/alias`**(`{ id, alias }`),带 UI 依赖的校验:非空、≤64 字符、未知 id 返回 404。改名成功会清除 `defaultAlias`,这正是让卡片不再渲染自动生成的「备用 Google 账号 N」、改为显示用户输入的关键。
|
|
32
|
+
- **卡片内联重命名**:一个「重命名」动作在卡片下展开输入框,经宿主保存后刷新池。代理编辑器与它原本是同一套布局写了两遍,现在共用 `src/client/sections/inline-editor.ts`(同时让 `AccountsPanel.ts` 保持在文件行数预算内)。
|
|
33
|
+
- **测试(开发体验):SIGKILL 升级用例不再断言墙钟上界。** `durationMs` 是 spawn→exit 的跨度,在饱和的宿主上于一次完整覆盖率运行中读到 **16 分钟**,而升级本身是正确的。保留了下界(必须等过 3 秒窗口)与语义断言 `signal === 'SIGKILL'`;「是否永久挂住」由带回收的 race 守卫覆盖。
|
|
66
34
|
|
|
67
35
|
## 0.6.54 (2026-11-21)
|
|
68
36
|
|
package/dist/client.js
CHANGED
|
@@ -51,6 +51,11 @@ window.__ModuleLoader__.load({
|
|
|
51
51
|
"account.add": "添加 Google 账号",
|
|
52
52
|
"account.aliasDefault": "备用 Google 账号 {number}",
|
|
53
53
|
"account.defaultAlias": "主账号(系统登录)",
|
|
54
|
+
"account.rename": "重命名",
|
|
55
|
+
"account.renameTitle": "编辑该账号的显示名称",
|
|
56
|
+
"account.renameEmpty": "账号名称不能为空",
|
|
57
|
+
"account.renamed": "账号名称已更新",
|
|
58
|
+
"account.renamePlaceholder": "账号名称",
|
|
54
59
|
"decision.quickFill": "💬 点击选项快速填入:",
|
|
55
60
|
"decision.insertTooltip": "点击填入: {text}",
|
|
56
61
|
"decision.insertPayload": "我选择 {choice}",
|
|
@@ -384,6 +389,11 @@ window.__ModuleLoader__.load({
|
|
|
384
389
|
"account.add": "Add Google account",
|
|
385
390
|
"account.aliasDefault": "Backup Google account {number}",
|
|
386
391
|
"account.defaultAlias": "Primary account (system sign-in)",
|
|
392
|
+
"account.rename": "Rename",
|
|
393
|
+
"account.renameTitle": "Edit this account label",
|
|
394
|
+
"account.renameEmpty": "Account label must not be empty",
|
|
395
|
+
"account.renamed": "Account label updated",
|
|
396
|
+
"account.renamePlaceholder": "Account label",
|
|
387
397
|
"decision.quickFill": "💬 Click an option to fill it in:",
|
|
388
398
|
"decision.insertTooltip": "Insert: {text}",
|
|
389
399
|
"decision.insertPayload": "I choose {choice}",
|
|
@@ -717,6 +727,11 @@ window.__ModuleLoader__.load({
|
|
|
717
727
|
"account.add": "Adicionar conta Google",
|
|
718
728
|
"account.aliasDefault": "Conta Google reserva {number}",
|
|
719
729
|
"account.defaultAlias": "Conta principal (login do sistema)",
|
|
730
|
+
"account.rename": "Renomear",
|
|
731
|
+
"account.renameTitle": "Editar o rótulo desta conta",
|
|
732
|
+
"account.renameEmpty": "O rótulo não pode ficar vazio",
|
|
733
|
+
"account.renamed": "Rótulo atualizado",
|
|
734
|
+
"account.renamePlaceholder": "Rótulo da conta",
|
|
720
735
|
"decision.quickFill": "💬 Clique numa opção para preenchê-la:",
|
|
721
736
|
"decision.insertTooltip": "Inserir: {text}",
|
|
722
737
|
"decision.insertPayload": "Escolho {choice}",
|
|
@@ -1050,6 +1065,11 @@ window.__ModuleLoader__.load({
|
|
|
1050
1065
|
"account.add": "Añadir cuenta de Google",
|
|
1051
1066
|
"account.aliasDefault": "Cuenta de Google de respaldo {number}",
|
|
1052
1067
|
"account.defaultAlias": "Cuenta principal (inicio de sesión del sistema)",
|
|
1068
|
+
"account.rename": "Renombrar",
|
|
1069
|
+
"account.renameTitle": "Editar la etiqueta de esta cuenta",
|
|
1070
|
+
"account.renameEmpty": "La etiqueta no puede estar vacía",
|
|
1071
|
+
"account.renamed": "Etiqueta actualizada",
|
|
1072
|
+
"account.renamePlaceholder": "Etiqueta de la cuenta",
|
|
1053
1073
|
"decision.quickFill": "💬 Haz clic en una opción para rellenarla:",
|
|
1054
1074
|
"decision.insertTooltip": "Insertar: {text}",
|
|
1055
1075
|
"decision.insertPayload": "Elijo {choice}",
|
|
@@ -9067,7 +9087,30 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
9067
9087
|
};
|
|
9068
9088
|
}
|
|
9069
9089
|
function lifecycleActions(deps, actionFailed) {
|
|
9070
|
-
const { refresh, showToast, setLoadingAction, t, setOptimisticActiveByFamily } = deps;
|
|
9090
|
+
const { refresh, showToast, setLoadingAction, t, setOptimisticActiveByFamily, aliasInputs, setEditingAliasId } = deps;
|
|
9091
|
+
const saveAlias = async (id) => {
|
|
9092
|
+
const alias = (aliasInputs[id] ?? "").trim();
|
|
9093
|
+
if (alias === "") {
|
|
9094
|
+
showToast(t("account.renameEmpty"), "error");
|
|
9095
|
+
return;
|
|
9096
|
+
}
|
|
9097
|
+
setLoadingAction(`alias:${id}`);
|
|
9098
|
+
try {
|
|
9099
|
+
const res = await postPool("alias", {
|
|
9100
|
+
id,
|
|
9101
|
+
alias
|
|
9102
|
+
});
|
|
9103
|
+
if (res === null || res?.ok === false) {
|
|
9104
|
+
actionFailed();
|
|
9105
|
+
return;
|
|
9106
|
+
}
|
|
9107
|
+
await refresh();
|
|
9108
|
+
setEditingAliasId(null);
|
|
9109
|
+
showToast(t("account.renamed"), "success");
|
|
9110
|
+
} finally {
|
|
9111
|
+
setLoadingAction(null);
|
|
9112
|
+
}
|
|
9113
|
+
};
|
|
9071
9114
|
const setActiveAccount = async (id, family = "google") => {
|
|
9072
9115
|
setOptimisticActiveByFamily((prev) => ({
|
|
9073
9116
|
...prev,
|
|
@@ -9135,7 +9178,8 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
9135
9178
|
return {
|
|
9136
9179
|
setActiveAccount,
|
|
9137
9180
|
removeAccount,
|
|
9138
|
-
toggleAccountEnabled
|
|
9181
|
+
toggleAccountEnabled,
|
|
9182
|
+
saveAlias
|
|
9139
9183
|
};
|
|
9140
9184
|
}
|
|
9141
9185
|
function quotaActions(deps, actionFailed) {
|
|
@@ -9924,6 +9968,38 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
9924
9968
|
return reason === "validation_required" || reason === "tos_violation";
|
|
9925
9969
|
}
|
|
9926
9970
|
//#endregion
|
|
9971
|
+
//#region src/client/sections/inline-editor.ts
|
|
9972
|
+
function renderInlineEditor(t, opts) {
|
|
9973
|
+
return h("div", {
|
|
9974
|
+
key: opts.key,
|
|
9975
|
+
style: {
|
|
9976
|
+
marginTop: "8px",
|
|
9977
|
+
padding: "10px 12px",
|
|
9978
|
+
background: "var(--agy-bg-subbox)",
|
|
9979
|
+
borderRadius: "7px",
|
|
9980
|
+
border: "1px solid var(--agy-border-subbox)"
|
|
9981
|
+
}
|
|
9982
|
+
}, h("div", { style: {
|
|
9983
|
+
display: "flex",
|
|
9984
|
+
gap: "8px"
|
|
9985
|
+
} }, h("input", {
|
|
9986
|
+
style: S.input,
|
|
9987
|
+
value: opts.value,
|
|
9988
|
+
placeholder: opts.placeholder,
|
|
9989
|
+
"aria-label": opts.ariaLabel,
|
|
9990
|
+
onChange: (e) => opts.onChange(e.target.value)
|
|
9991
|
+
}), h(Button, {
|
|
9992
|
+
variant: "primary",
|
|
9993
|
+
className: "agy-btn",
|
|
9994
|
+
disabled: opts.busy,
|
|
9995
|
+
onClick: () => opts.onSave()
|
|
9996
|
+
}, ...opts.busy ? [Spinner(), opts.saveLabel] : [opts.saveLabel]), h(Button, {
|
|
9997
|
+
variant: "default",
|
|
9998
|
+
className: "agy-btn",
|
|
9999
|
+
onClick: () => opts.onCancel()
|
|
10000
|
+
}, opts.cancelLabel)));
|
|
10001
|
+
}
|
|
10002
|
+
//#endregion
|
|
9927
10003
|
//#region src/common/quota-pacing.ts
|
|
9928
10004
|
/**
|
|
9929
10005
|
* Compare remaining quota fraction against remaining reset window fraction.
|
|
@@ -10331,7 +10407,7 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10331
10407
|
return out;
|
|
10332
10408
|
}
|
|
10333
10409
|
function AccountsPanel(props) {
|
|
10334
|
-
const { t, pool, accounts, accountModels, loadingAction, quotaRefreshing = [], warmupState, proxyInputs, setProxyInputs, editingProxyId, setEditingProxyId, expandedModels, toggleExpand, optimisticActiveId, optimisticActiveByFamily, handlers } = props;
|
|
10410
|
+
const { t, pool, accounts, accountModels, loadingAction, quotaRefreshing = [], warmupState, proxyInputs, setProxyInputs, editingProxyId, setEditingProxyId, aliasInputs, setAliasInputs, editingAliasId, setEditingAliasId, expandedModels, toggleExpand, optimisticActiveId, optimisticActiveByFamily, handlers } = props;
|
|
10335
10411
|
const accountActionBusy = (acc, action) => loadingAction === `${action}:${acc.id}`;
|
|
10336
10412
|
const activeIds = resolveFamilyActiveIds(pool, optimisticActiveByFamily, optimisticActiveId);
|
|
10337
10413
|
const now = Date.now();
|
|
@@ -10344,6 +10420,7 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10344
10420
|
const hasAnyActiveFamily = Boolean(acc.enabled && !isAuthRequired && QUOTA_FAMILIES.some((fam) => (fam !== "argon" || acc.quotas.argon !== void 0) && !isFamilyCooling(acc, fam, now) && activeIds[fam] === acc.id));
|
|
10345
10421
|
const dotColor = !acc.enabled ? "#64748b" : isAuthRequired ? "#ef4444" : isFullyCooling ? "#f59e0b" : "#10b981";
|
|
10346
10422
|
const isEditingProxy = editingProxyId === acc.id;
|
|
10423
|
+
const isEditingAlias = editingAliasId === acc.id;
|
|
10347
10424
|
const isExpanded = expandedModels[acc.id] ?? false;
|
|
10348
10425
|
const accIndex = accounts.indexOf(acc);
|
|
10349
10426
|
const cardStyle = {
|
|
@@ -10385,6 +10462,7 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10385
10462
|
isEditingProxy,
|
|
10386
10463
|
isSyncing,
|
|
10387
10464
|
isWarming,
|
|
10465
|
+
isEditingAlias,
|
|
10388
10466
|
displayAlias,
|
|
10389
10467
|
accIndex,
|
|
10390
10468
|
accounts,
|
|
@@ -10392,7 +10470,8 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10392
10470
|
loadingAction,
|
|
10393
10471
|
accountActionBusy,
|
|
10394
10472
|
handlers,
|
|
10395
|
-
setEditingProxyId
|
|
10473
|
+
setEditingProxyId,
|
|
10474
|
+
setEditingAliasId
|
|
10396
10475
|
}), h("div", {
|
|
10397
10476
|
key: "agy-body",
|
|
10398
10477
|
style: S.quotaBox
|
|
@@ -10409,7 +10488,7 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10409
10488
|
}, uiIcon(isExpanded ? "chevronUp" : "chevronDown", 10), h("span", null, isExpanded ? t("account.collapseOthers") : t("account.expandOthers")), !isExpanded && collapsedCoolingNames.length > 0 ? h("span", { style: {
|
|
10410
10489
|
color: "#f59e0b",
|
|
10411
10490
|
fontWeight: 700
|
|
10412
|
-
} }, t("account.collapsedCoolingHint", { families: collapsedCoolingNames.join(", ") })) : null), isExpanded ? h("div", { key: "expanded-details" }, renderQuotaBar("Claude", "anthropic"), renderQuotaBar("GPT-OSS", "openai"), childModels.length > 0 ? renderChildModels(t, childModels) : null) : null), isEditingProxy ? renderProxyEditor(t, acc, pool, proxyInputs, setProxyInputs, setEditingProxyId, loadingAction, accountActionBusy, handlers) : null);
|
|
10491
|
+
} }, t("account.collapsedCoolingHint", { families: collapsedCoolingNames.join(", ") })) : null), isExpanded ? h("div", { key: "expanded-details" }, renderQuotaBar("Claude", "anthropic"), renderQuotaBar("GPT-OSS", "openai"), childModels.length > 0 ? renderChildModels(t, childModels) : null) : null), isEditingAlias ? renderAliasEditor(t, acc, aliasInputs, setAliasInputs, setEditingAliasId, displayAlias, loadingAction, accountActionBusy, handlers) : null, isEditingProxy ? renderProxyEditor(t, acc, pool, proxyInputs, setProxyInputs, setEditingProxyId, loadingAction, accountActionBusy, handlers) : null);
|
|
10413
10492
|
});
|
|
10414
10493
|
}
|
|
10415
10494
|
function extractActionUrl(text) {
|
|
@@ -10569,7 +10648,7 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10569
10648
|
}, ...badges);
|
|
10570
10649
|
}
|
|
10571
10650
|
function renderCardHeader(t, acc, ctx) {
|
|
10572
|
-
const { isEditingProxy, isAuthRequired, isSyncing, isWarming, displayAlias, accounts, pool, loadingAction, accountActionBusy, handlers, setEditingProxyId } = ctx;
|
|
10651
|
+
const { isEditingProxy, isAuthRequired, isSyncing, isWarming, isEditingAlias, displayAlias, accounts, pool, loadingAction, accountActionBusy, handlers, setEditingProxyId, setEditingAliasId } = ctx;
|
|
10573
10652
|
return h("div", {
|
|
10574
10653
|
className: "agy-card-header",
|
|
10575
10654
|
style: {
|
|
@@ -10593,17 +10672,19 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10593
10672
|
isAuthRequired,
|
|
10594
10673
|
isSyncing,
|
|
10595
10674
|
isWarming,
|
|
10675
|
+
isEditingAlias,
|
|
10596
10676
|
displayAlias,
|
|
10597
10677
|
showRemove: accounts.length > 1,
|
|
10598
10678
|
pool,
|
|
10599
10679
|
loadingAction,
|
|
10600
10680
|
accountActionBusy,
|
|
10601
10681
|
handlers,
|
|
10602
|
-
setEditingProxyId
|
|
10682
|
+
setEditingProxyId,
|
|
10683
|
+
setEditingAliasId
|
|
10603
10684
|
})), renderMetaRow(t, acc, ctx));
|
|
10604
10685
|
}
|
|
10605
10686
|
function renderActionButtons(t, acc, ctx) {
|
|
10606
|
-
const { isEditingProxy, isAuthRequired, isSyncing, isWarming, displayAlias, showRemove, pool, loadingAction, accountActionBusy, handlers, setEditingProxyId } = ctx;
|
|
10687
|
+
const { isEditingProxy, isAuthRequired, isSyncing, isWarming, isEditingAlias, displayAlias, showRemove, pool, loadingAction, accountActionBusy, handlers, setEditingProxyId, setEditingAliasId } = ctx;
|
|
10607
10688
|
const effectiveProxy = acc.proxyUrl || pool?.systemProxy;
|
|
10608
10689
|
return h("div", {
|
|
10609
10690
|
className: "agy-card-actions",
|
|
@@ -10614,6 +10695,18 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10614
10695
|
flexShrink: 0
|
|
10615
10696
|
}
|
|
10616
10697
|
}, h(Button, {
|
|
10698
|
+
variant: "default",
|
|
10699
|
+
size: "sm",
|
|
10700
|
+
className: "agy-btn",
|
|
10701
|
+
style: {
|
|
10702
|
+
gap: "3px",
|
|
10703
|
+
fontSize: "11px",
|
|
10704
|
+
padding: "1px 6px",
|
|
10705
|
+
height: "22px"
|
|
10706
|
+
},
|
|
10707
|
+
title: t("account.renameTitle"),
|
|
10708
|
+
onClick: () => setEditingAliasId(isEditingAlias ? null : acc.id)
|
|
10709
|
+
}, ` ${t("account.rename")}`), h(Button, {
|
|
10617
10710
|
variant: acc.enabled ? "default" : "primary",
|
|
10618
10711
|
size: "sm",
|
|
10619
10712
|
className: "agy-btn",
|
|
@@ -10760,38 +10853,39 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
10760
10853
|
}, `↻ ${w.resetText}`) : null));
|
|
10761
10854
|
}));
|
|
10762
10855
|
}
|
|
10856
|
+
function renderAliasEditor(t, acc, aliasInputs, setAliasInputs, setEditingAliasId, displayAlias, loadingAction, accountActionBusy, handlers) {
|
|
10857
|
+
return renderInlineEditor(t, {
|
|
10858
|
+
key: "alias-body",
|
|
10859
|
+
value: aliasInputs[acc.id] ?? displayAlias,
|
|
10860
|
+
placeholder: t("account.renamePlaceholder"),
|
|
10861
|
+
ariaLabel: t("aria.aliasInput"),
|
|
10862
|
+
saveLabel: t("proxy.save"),
|
|
10863
|
+
cancelLabel: t("cancel"),
|
|
10864
|
+
busy: accountActionBusy(acc, "alias"),
|
|
10865
|
+
onChange: (next) => setAliasInputs({
|
|
10866
|
+
...aliasInputs,
|
|
10867
|
+
[acc.id]: next
|
|
10868
|
+
}),
|
|
10869
|
+
onSave: () => void handlers.saveAlias(acc.id),
|
|
10870
|
+
onCancel: () => setEditingAliasId(null)
|
|
10871
|
+
});
|
|
10872
|
+
}
|
|
10763
10873
|
function renderProxyEditor(t, acc, pool, proxyInputs, setProxyInputs, setEditingProxyId, loadingAction, accountActionBusy, handlers) {
|
|
10764
|
-
return
|
|
10874
|
+
return renderInlineEditor(t, {
|
|
10765
10875
|
key: "proxy-body",
|
|
10766
|
-
|
|
10767
|
-
marginTop: "8px",
|
|
10768
|
-
padding: "10px 12px",
|
|
10769
|
-
background: "var(--agy-bg-subbox)",
|
|
10770
|
-
borderRadius: "7px",
|
|
10771
|
-
border: "1px solid var(--agy-border-subbox)"
|
|
10772
|
-
}
|
|
10773
|
-
}, h("div", { style: {
|
|
10774
|
-
display: "flex",
|
|
10775
|
-
gap: "8px"
|
|
10776
|
-
} }, h("input", {
|
|
10777
|
-
style: S.input,
|
|
10778
|
-
value: proxyInputs[acc.id] !== void 0 ? proxyInputs[acc.id] : acc.proxyUrl ?? "",
|
|
10876
|
+
value: proxyInputs[acc.id] ?? acc.proxyUrl ?? "",
|
|
10779
10877
|
placeholder: pool?.systemProxy ? `${t("proxy.placeholder")} (${pool.systemProxy})` : t("proxy.placeholder"),
|
|
10780
|
-
|
|
10781
|
-
|
|
10878
|
+
ariaLabel: t("aria.proxyInput"),
|
|
10879
|
+
saveLabel: t("proxy.save"),
|
|
10880
|
+
cancelLabel: t("cancel"),
|
|
10881
|
+
busy: accountActionBusy(acc, "proxy"),
|
|
10882
|
+
onChange: (next) => setProxyInputs({
|
|
10782
10883
|
...proxyInputs,
|
|
10783
|
-
[acc.id]:
|
|
10784
|
-
})
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
disabled: accountActionBusy(acc, "proxy"),
|
|
10789
|
-
onClick: () => void handlers.saveProxy(acc.id)
|
|
10790
|
-
}, ...loadingAction === `proxy:${acc.id}` ? [Spinner(), t("proxy.save")] : [t("proxy.save")]), h(Button, {
|
|
10791
|
-
variant: "default",
|
|
10792
|
-
className: "agy-btn",
|
|
10793
|
-
onClick: () => setEditingProxyId(null)
|
|
10794
|
-
}, t("cancel"))));
|
|
10884
|
+
[acc.id]: next
|
|
10885
|
+
}),
|
|
10886
|
+
onSave: () => void handlers.saveProxy(acc.id),
|
|
10887
|
+
onCancel: () => setEditingProxyId(null)
|
|
10888
|
+
});
|
|
10795
10889
|
}
|
|
10796
10890
|
//#endregion
|
|
10797
10891
|
//#region src/client/sections/EcosystemPanel.ts
|
|
@@ -11476,6 +11570,8 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
11476
11570
|
const [loadingAction, setLoadingAction] = useBusyAction();
|
|
11477
11571
|
const [proxyInputs, setProxyInputs] = useState({});
|
|
11478
11572
|
const [editingProxyId, setEditingProxyId] = useState(null);
|
|
11573
|
+
const [aliasInputs, setAliasInputs] = useState({});
|
|
11574
|
+
const [editingAliasId, setEditingAliasId] = useState(null);
|
|
11479
11575
|
const [expandedModels, setExpandedModels] = useState({});
|
|
11480
11576
|
const [optimisticActiveByFamily, setOptimisticActiveByFamily] = useState({});
|
|
11481
11577
|
useEffect(() => {
|
|
@@ -11508,6 +11604,8 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
11508
11604
|
t,
|
|
11509
11605
|
proxyInputs,
|
|
11510
11606
|
setEditingProxyId,
|
|
11607
|
+
aliasInputs,
|
|
11608
|
+
setEditingAliasId,
|
|
11511
11609
|
setOptimisticActiveByFamily
|
|
11512
11610
|
});
|
|
11513
11611
|
const copyImageCommand = () => {
|
|
@@ -11584,6 +11682,10 @@ body[data-ds-dark-theme] select.agy-select { color-scheme: dark; }
|
|
|
11584
11682
|
setProxyInputs,
|
|
11585
11683
|
editingProxyId,
|
|
11586
11684
|
setEditingProxyId,
|
|
11685
|
+
aliasInputs,
|
|
11686
|
+
setAliasInputs,
|
|
11687
|
+
editingAliasId,
|
|
11688
|
+
setEditingAliasId,
|
|
11587
11689
|
expandedModels,
|
|
11588
11690
|
toggleExpand,
|
|
11589
11691
|
optimisticActiveByFamily,
|
package/dist/index.js
CHANGED
|
@@ -47819,6 +47819,52 @@ function handlePoolProxy(services, req, res) {
|
|
|
47819
47819
|
});
|
|
47820
47820
|
});
|
|
47821
47821
|
}
|
|
47822
|
+
/** Longest alias we accept: it is a display label on a card, not free text. */
|
|
47823
|
+
const MAX_ALIAS_LEN = 64;
|
|
47824
|
+
function handlePoolAlias(services, req, res) {
|
|
47825
|
+
const { pool } = services;
|
|
47826
|
+
runRoute(res, async () => {
|
|
47827
|
+
if (methodOf(req) !== "POST") {
|
|
47828
|
+
sendJson(res, 405, { error: "POST only" });
|
|
47829
|
+
return;
|
|
47830
|
+
}
|
|
47831
|
+
const body = await readBody(req);
|
|
47832
|
+
const id = typeof body.id === "string" ? body.id.trim() : "";
|
|
47833
|
+
const alias = typeof body.alias === "string" ? body.alias.trim() : "";
|
|
47834
|
+
if (id === "") {
|
|
47835
|
+
sendJson(res, 400, {
|
|
47836
|
+
ok: false,
|
|
47837
|
+
error: "id is required"
|
|
47838
|
+
});
|
|
47839
|
+
return;
|
|
47840
|
+
}
|
|
47841
|
+
if (alias === "") {
|
|
47842
|
+
sendJson(res, 400, {
|
|
47843
|
+
ok: false,
|
|
47844
|
+
error: "alias must not be empty"
|
|
47845
|
+
});
|
|
47846
|
+
return;
|
|
47847
|
+
}
|
|
47848
|
+
if (alias.length > MAX_ALIAS_LEN) {
|
|
47849
|
+
sendJson(res, 400, {
|
|
47850
|
+
ok: false,
|
|
47851
|
+
error: "alias is too long (max 64)"
|
|
47852
|
+
});
|
|
47853
|
+
return;
|
|
47854
|
+
}
|
|
47855
|
+
if (!pool.setAccountAlias(id, alias)) {
|
|
47856
|
+
sendJson(res, 404, {
|
|
47857
|
+
ok: false,
|
|
47858
|
+
error: "account not found"
|
|
47859
|
+
});
|
|
47860
|
+
return;
|
|
47861
|
+
}
|
|
47862
|
+
sendJson(res, 200, {
|
|
47863
|
+
ok: true,
|
|
47864
|
+
pool: pool.getPoolData()
|
|
47865
|
+
});
|
|
47866
|
+
});
|
|
47867
|
+
}
|
|
47822
47868
|
function handlePoolPrimary(services, req, res) {
|
|
47823
47869
|
const { pool, catalog, notifyPicker } = services;
|
|
47824
47870
|
runRoute(res, async () => {
|
|
@@ -48169,6 +48215,11 @@ function register$6(reg, services) {
|
|
|
48169
48215
|
path: "/plugins/agy-link/pool/proxy",
|
|
48170
48216
|
handler: (req, res) => handlePoolProxy(services, req, res)
|
|
48171
48217
|
});
|
|
48218
|
+
reg({
|
|
48219
|
+
kind: "exact",
|
|
48220
|
+
path: "/plugins/agy-link/pool/alias",
|
|
48221
|
+
handler: (req, res) => handlePoolAlias(services, req, res)
|
|
48222
|
+
});
|
|
48172
48223
|
reg({
|
|
48173
48224
|
kind: "exact",
|
|
48174
48225
|
path: "/plugins/agy-link/pool/primary",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agy-link",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.58",
|
|
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",
|