@wengine-ai/ccr-provider-gemini-agy-acp 0.0.1 → 0.0.2
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 +6 -0
- package/README.md +1 -1
- package/dist/card.js +68 -0
- package/dist/package.json +1 -1
- package/dist/plugin.json +1 -1
- package/dist/src/card.mjs +68 -0
- package/dist/src/plugin.mjs +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.0.2 — 2026-11-19
|
|
4
|
+
|
|
5
|
+
Ship a read-only management card. The settings page reports a card load failure for every enabled plugin without one, so the previous release showed a misleading reinstall hint. The card explains the local opt-in contract and requires no network access.
|
|
6
|
+
|
|
7
|
+
新增只读管理卡片。设置页会把所有未提供卡片的已启用插件报告为「卡片加载失败」,因此上一版会显示误导性的重装提示。卡片仅说明本地启用方式,不访问网络。
|
|
8
|
+
|
|
3
9
|
## 0.0.1 — 2026-11-19
|
|
4
10
|
|
|
5
11
|
First public experimental release. Route text chat and streaming responses through a local Antigravity CLI worker using ACP and Gemini API-key authentication. The plugin requires explicit opt-in. Testing used simulated workers. Production CLI authentication remains to be verified.
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ Experimental local provider for CCR 2.3.2433 (provider plugin API 1). A text cha
|
|
|
11
11
|
Run the following in the isolated CCR instance described below. Installing the package leaves the transport disabled until the operator enables it.
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
ccr plugin add @wengine-ai/ccr-provider-gemini-agy-acp@0.0.
|
|
14
|
+
ccr plugin add @wengine-ai/ccr-provider-gemini-agy-acp@0.0.2
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Build and install locally
|
package/dist/card.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Read-only management card: a self-contained ES chunk with no imports and no
|
|
2
|
+
// network access. It only explains the local opt-in contract; the operator's
|
|
3
|
+
// sidecar file and environment remain the single source of truth.
|
|
4
|
+
const el = (tag, className, text) => {
|
|
5
|
+
const node = document.createElement(tag);
|
|
6
|
+
if (className) node.className = className;
|
|
7
|
+
if (text != null) node.textContent = text;
|
|
8
|
+
return node;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
mount(target, props) {
|
|
13
|
+
const zh = props.locale === 'zh';
|
|
14
|
+
const t = (en, cn) => (zh ? cn : en);
|
|
15
|
+
const root = el('div', 'ccr-agy-acp-card');
|
|
16
|
+
const style = root.style;
|
|
17
|
+
style.font = '13px/1.6 -apple-system, "Segoe UI", sans-serif';
|
|
18
|
+
style.color = 'inherit';
|
|
19
|
+
|
|
20
|
+
const head = el('div', null, null);
|
|
21
|
+
head.style.display = 'flex';
|
|
22
|
+
head.style.alignItems = 'center';
|
|
23
|
+
head.style.gap = '8px';
|
|
24
|
+
const title = el('strong', null, t('Local Antigravity CLI (ACP) bridge', '本地 Antigravity CLI(ACP)桥'));
|
|
25
|
+
const badge = el('span', null, props.disabled ? t('Disabled', '未启用') : t('Enabled', '已启用'));
|
|
26
|
+
badge.style.padding = '1px 8px';
|
|
27
|
+
badge.style.borderRadius = '999px';
|
|
28
|
+
badge.style.fontSize = '12px';
|
|
29
|
+
badge.style.border = '1px solid currentColor';
|
|
30
|
+
if (!props.disabled) badge.style.opacity = '0.85'; else badge.style.opacity = '0.6';
|
|
31
|
+
head.append(title, badge);
|
|
32
|
+
root.append(head);
|
|
33
|
+
|
|
34
|
+
if (props.plugin?.version) root.append(el('div', null, t('Version', '版本') + ': v' + props.plugin.version));
|
|
35
|
+
|
|
36
|
+
for (const line of props.disabled ? [
|
|
37
|
+
t('This prototype is off until the operator enables it. In the CCR config directory create gemini-agy-acp.json:',
|
|
38
|
+
'原型在运维者显式启用前保持关闭。请在 CCR 配置目录创建 gemini-agy-acp.json:'),
|
|
39
|
+
] : [
|
|
40
|
+
t('Workers start only for requests routed to this provider; API-key quotas and charges apply.',
|
|
41
|
+
'仅路由到本供应商的请求会启动 worker;调用计入 API key 配额与费用。'),
|
|
42
|
+
t('Rotate the key by updating the environment and restarting the isolated CCR host.',
|
|
43
|
+
'更换密钥需更新环境变量并重启隔离的 CCR 实例。'),
|
|
44
|
+
]) root.append(el('p', null, line));
|
|
45
|
+
|
|
46
|
+
const code = el('pre', null, JSON.stringify({
|
|
47
|
+
enabled: true, binary: '/absolute/path/to/agy', authMethod: 'gemini-api-key', maxWorkers: 1, timeoutMs: 60000,
|
|
48
|
+
}, null, 2));
|
|
49
|
+
code.style.background = 'rgba(127,127,127,.12)';
|
|
50
|
+
code.style.padding = '8px 10px';
|
|
51
|
+
code.style.borderRadius = '6px';
|
|
52
|
+
code.style.overflowX = 'auto';
|
|
53
|
+
code.style.whiteSpace = 'pre-wrap';
|
|
54
|
+
root.append(code);
|
|
55
|
+
|
|
56
|
+
root.append(el('p', null, t(
|
|
57
|
+
'Set GEMINI_API_KEY in the CCR process environment and route a primary model to gemini-agy-acp. Consumer OAuth and subscriptions are unsupported.',
|
|
58
|
+
'在 CCR 进程环境设置 GEMINI_API_KEY,并把主路由模型指向 gemini-agy-acp。不支持个人订阅与浏览器 OAuth。')));
|
|
59
|
+
|
|
60
|
+
target.append(root);
|
|
61
|
+
this._root = root;
|
|
62
|
+
},
|
|
63
|
+
unmount(el) {
|
|
64
|
+
this._root?.remove();
|
|
65
|
+
this._root = null;
|
|
66
|
+
el.replaceChildren();
|
|
67
|
+
},
|
|
68
|
+
};
|
package/dist/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"0.0.
|
|
1
|
+
{"type":"module","version":"0.0.2"}
|
package/dist/plugin.json
CHANGED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Read-only management card: a self-contained ES chunk with no imports and no
|
|
2
|
+
// network access. It only explains the local opt-in contract; the operator's
|
|
3
|
+
// sidecar file and environment remain the single source of truth.
|
|
4
|
+
const el = (tag, className, text) => {
|
|
5
|
+
const node = document.createElement(tag);
|
|
6
|
+
if (className) node.className = className;
|
|
7
|
+
if (text != null) node.textContent = text;
|
|
8
|
+
return node;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
mount(target, props) {
|
|
13
|
+
const zh = props.locale === 'zh';
|
|
14
|
+
const t = (en, cn) => (zh ? cn : en);
|
|
15
|
+
const root = el('div', 'ccr-agy-acp-card');
|
|
16
|
+
const style = root.style;
|
|
17
|
+
style.font = '13px/1.6 -apple-system, "Segoe UI", sans-serif';
|
|
18
|
+
style.color = 'inherit';
|
|
19
|
+
|
|
20
|
+
const head = el('div', null, null);
|
|
21
|
+
head.style.display = 'flex';
|
|
22
|
+
head.style.alignItems = 'center';
|
|
23
|
+
head.style.gap = '8px';
|
|
24
|
+
const title = el('strong', null, t('Local Antigravity CLI (ACP) bridge', '本地 Antigravity CLI(ACP)桥'));
|
|
25
|
+
const badge = el('span', null, props.disabled ? t('Disabled', '未启用') : t('Enabled', '已启用'));
|
|
26
|
+
badge.style.padding = '1px 8px';
|
|
27
|
+
badge.style.borderRadius = '999px';
|
|
28
|
+
badge.style.fontSize = '12px';
|
|
29
|
+
badge.style.border = '1px solid currentColor';
|
|
30
|
+
if (!props.disabled) badge.style.opacity = '0.85'; else badge.style.opacity = '0.6';
|
|
31
|
+
head.append(title, badge);
|
|
32
|
+
root.append(head);
|
|
33
|
+
|
|
34
|
+
if (props.plugin?.version) root.append(el('div', null, t('Version', '版本') + ': v' + props.plugin.version));
|
|
35
|
+
|
|
36
|
+
for (const line of props.disabled ? [
|
|
37
|
+
t('This prototype is off until the operator enables it. In the CCR config directory create gemini-agy-acp.json:',
|
|
38
|
+
'原型在运维者显式启用前保持关闭。请在 CCR 配置目录创建 gemini-agy-acp.json:'),
|
|
39
|
+
] : [
|
|
40
|
+
t('Workers start only for requests routed to this provider; API-key quotas and charges apply.',
|
|
41
|
+
'仅路由到本供应商的请求会启动 worker;调用计入 API key 配额与费用。'),
|
|
42
|
+
t('Rotate the key by updating the environment and restarting the isolated CCR host.',
|
|
43
|
+
'更换密钥需更新环境变量并重启隔离的 CCR 实例。'),
|
|
44
|
+
]) root.append(el('p', null, line));
|
|
45
|
+
|
|
46
|
+
const code = el('pre', null, JSON.stringify({
|
|
47
|
+
enabled: true, binary: '/absolute/path/to/agy', authMethod: 'gemini-api-key', maxWorkers: 1, timeoutMs: 60000,
|
|
48
|
+
}, null, 2));
|
|
49
|
+
code.style.background = 'rgba(127,127,127,.12)';
|
|
50
|
+
code.style.padding = '8px 10px';
|
|
51
|
+
code.style.borderRadius = '6px';
|
|
52
|
+
code.style.overflowX = 'auto';
|
|
53
|
+
code.style.whiteSpace = 'pre-wrap';
|
|
54
|
+
root.append(code);
|
|
55
|
+
|
|
56
|
+
root.append(el('p', null, t(
|
|
57
|
+
'Set GEMINI_API_KEY in the CCR process environment and route a primary model to gemini-agy-acp. Consumer OAuth and subscriptions are unsupported.',
|
|
58
|
+
'在 CCR 进程环境设置 GEMINI_API_KEY,并把主路由模型指向 gemini-agy-acp。不支持个人订阅与浏览器 OAuth。')));
|
|
59
|
+
|
|
60
|
+
target.append(root);
|
|
61
|
+
this._root = root;
|
|
62
|
+
},
|
|
63
|
+
unmount(el) {
|
|
64
|
+
this._root?.remove();
|
|
65
|
+
this._root = null;
|
|
66
|
+
el.replaceChildren();
|
|
67
|
+
},
|
|
68
|
+
};
|
package/dist/src/plugin.mjs
CHANGED
|
@@ -56,6 +56,9 @@ export async function activateWithTransport(ctx, createTransport) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
ctx.registerTransformer(AgyTransformer);
|
|
59
|
+
// Read-only management card; the UI renders a hard failure for enabled
|
|
60
|
+
// plugins that ship none, so this prototype must always declare one.
|
|
61
|
+
ctx.registerUiCard?.({ cardPath: 'card.js' });
|
|
59
62
|
ctx.registerManagedRuntime({
|
|
60
63
|
name: NAME,
|
|
61
64
|
// Claim this exact reserved name even on a malformed entry, so it fails
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wengine-ai/ccr-provider-gemini-agy-acp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Experimental text-only CCR provider for the local Antigravity CLI over ACP.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": ["ccr-provider-plugin", "antigravity", "acp"],
|