@ycodium-ai/agent-grok 0.2.6459 → 0.2.6520
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/README.md +5 -4
- package/dist/index.js +9 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -44,10 +44,11 @@ Facts:
|
|
|
44
44
|
- Credential order warning: setting `GROK_MODELS_BASE_URL` does not switch the CLI to
|
|
45
45
|
API-key auth. Grok resolves `api_key` → `env_key` → the signed-in session token →
|
|
46
46
|
`XAI_API_KEY`, so a signed-in instance would send its x.ai session token to the custom
|
|
47
|
-
base URL. When the
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`
|
|
47
|
+
base URL. When the CLI's effective environment (inherited host environment plus
|
|
48
|
+
instance overrides) sets `GROK_MODELS_BASE_URL`, the plugin therefore spawns the CLI
|
|
49
|
+
with `GROK_AUTH_PATH` pointing at a fresh path that does not exist (the card's
|
|
50
|
+
`extraEnv` `$absentPath` entry), unless the instance sets `GROK_AUTH_PATH` itself.
|
|
51
|
+
The login file in the account directory is left untouched.
|
|
51
52
|
Settings also gives a new instance that sets these variables its own account directory.
|
|
52
53
|
- Usage (ADR-0034), per instance, read only when the user asks:
|
|
53
54
|
- Quota: `ExecutorInstance.usage.readQuota` reads the weekly credit window from
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
import { definePlugin } from "@ycodium-ai/plugin-api";
|
|
9
9
|
|
|
10
10
|
// ../../packages/plugin-api/src/version.ts
|
|
11
|
-
var PLUGIN_API_VERSION =
|
|
11
|
+
var PLUGIN_API_VERSION = 218;
|
|
12
12
|
|
|
13
13
|
// src/index.ts
|
|
14
14
|
import { registerEffectiveHomeCommand } from "@ycodium-ai/plugin-api/instance-config";
|
|
@@ -160,8 +160,8 @@ var GROK_CARD = {
|
|
|
160
160
|
// 那是平台语义(POSIX `/dev/null` 对 Windows `NUL`),而「读不到」两边只有一种行为。
|
|
161
161
|
// 1.0.34 实测:`authMethods` 少掉 `cached_token`、两笔请求(推理与标题)都改带
|
|
162
162
|
// `XAI_API_KEY`,账号目录里那份 `auth.json` 一个字节没动,也没在别处新建文件。
|
|
163
|
-
//
|
|
164
|
-
// `GROK_AUTH_PATH`
|
|
163
|
+
// 宿主不注入它。实际交给 CLI 的环境(继承环境 + 实例表)设了 `GROK_MODELS_BASE_URL`、
|
|
164
|
+
// 实例表又没自己写 `GROK_AUTH_PATH` 时,插件替换 `$absentPath` 并填上(`grokHome.ts` 的
|
|
165
165
|
// `ownEndpointAuthGuard`);没换地址的实例照旧用用户自己的登录。
|
|
166
166
|
extraEnv: [{ name: "GROK_AUTH_PATH", value: "$absentPath" }]
|
|
167
167
|
}
|
|
@@ -259,7 +259,12 @@ function absentPath() {
|
|
|
259
259
|
function ownEndpointAuthGuard(recipe) {
|
|
260
260
|
const connectivity = GROK_CARD.modelConnectivity;
|
|
261
261
|
const baseUrlKey = connectivity.baseUrlEnvKey;
|
|
262
|
-
if (baseUrlKey === void 0
|
|
262
|
+
if (baseUrlKey === void 0) return {};
|
|
263
|
+
const effectiveEnv = mergeLaunchEnv({
|
|
264
|
+
inherited: process.env,
|
|
265
|
+
instanceTable: recipe.environment
|
|
266
|
+
});
|
|
267
|
+
if ((effectiveEnv[baseUrlKey]?.trim() ?? "") === "") return {};
|
|
263
268
|
const guard = {};
|
|
264
269
|
for (const entry of connectivity.extraEnv ?? []) {
|
|
265
270
|
if (entry.value === "$absentPath") guard[entry.name] = absentPath();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/agent-grok",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6520",
|
|
4
4
|
"description": "Grok executor: grok CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"@types/node": "24.12.4",
|
|
22
22
|
"esbuild": "0.28.1",
|
|
23
23
|
"vite-plus": "0.2.2",
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.0",
|
|
25
|
+
"ycodium-acp-executor": "0.2.0",
|
|
24
26
|
"ycodium-credential-account": "0.0.0",
|
|
25
|
-
"
|
|
26
|
-
"ycodium-executor-testing": "0.0.0",
|
|
27
|
-
"ycodium-acp-executor": "0.2.6459"
|
|
27
|
+
"ycodium-executor-testing": "0.0.0"
|
|
28
28
|
},
|
|
29
29
|
"ycodium": {
|
|
30
30
|
"plugin": "./dist/index.js",
|