@ycodium-ai/agent-grok 0.2.2510 → 0.2.2526
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/dist/index.js +34 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -23,6 +23,12 @@ var GROK_CARD = {
|
|
|
23
23
|
// `grokInstance.startSession` 里按用户选择拼。
|
|
24
24
|
launchArgs: "agent stdio",
|
|
25
25
|
homeEnvVar: "GROK_HOME",
|
|
26
|
+
// 只有一个账户目录,它同时装着会话历史:换目录,已开的 thread 就接不上这个实例了。
|
|
27
|
+
accountDirectory: {
|
|
28
|
+
configKeys: ["homePath"],
|
|
29
|
+
defaultDirectory: "~/.grok",
|
|
30
|
+
holdsThreads: true
|
|
31
|
+
},
|
|
26
32
|
// 只有这一条是实话:实测这个 CLI 从不播报 api key 认证方式,点名 XAI_API_KEY
|
|
27
33
|
// 是把用户指向死路。
|
|
28
34
|
environment: [],
|
|
@@ -42,10 +48,10 @@ var GROK_CARD = {
|
|
|
42
48
|
selfUpdateArgs: ["update"],
|
|
43
49
|
docsUrl: "https://x.ai/docs/grok",
|
|
44
50
|
setupNote: "",
|
|
45
|
-
//
|
|
46
|
-
// `
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
// 空选择时这个值会被 `session/set_model` 发出去,必须在 CLI 当前播报的目录里
|
|
52
|
+
// (发 `grok-build` 被拒:`-32602 unknown model id`)。版本号 id 会随 CLI 升级陈旧,
|
|
53
|
+
// 但没有「不发版本号」的选项。
|
|
54
|
+
defaultModel: "grok-4.7",
|
|
49
55
|
customModelIdExample: "",
|
|
50
56
|
modelSlugAliases: null,
|
|
51
57
|
mcpTransports: ["stdio", "http", "sse"],
|
|
@@ -26398,6 +26404,26 @@ function createAcpExecutor(options) {
|
|
|
26398
26404
|
};
|
|
26399
26405
|
}
|
|
26400
26406
|
|
|
26407
|
+
// ../../packages/ycodium-acp-executor/src/mcp-servers.ts
|
|
26408
|
+
function toAcpMcpServers(entries) {
|
|
26409
|
+
return (entries ?? []).map(
|
|
26410
|
+
(entry) => entry.transport.type === "stdio" ? {
|
|
26411
|
+
name: entry.name,
|
|
26412
|
+
command: entry.transport.command,
|
|
26413
|
+
args: [...entry.transport.args ?? []],
|
|
26414
|
+
env: Object.entries(entry.transport.env ?? {}).map(([name, value]) => ({ name, value }))
|
|
26415
|
+
} : {
|
|
26416
|
+
type: entry.transport.type,
|
|
26417
|
+
name: entry.name,
|
|
26418
|
+
url: entry.transport.url,
|
|
26419
|
+
headers: Object.entries(entry.transport.headers ?? {}).map(([name, value]) => ({
|
|
26420
|
+
name,
|
|
26421
|
+
value
|
|
26422
|
+
}))
|
|
26423
|
+
}
|
|
26424
|
+
);
|
|
26425
|
+
}
|
|
26426
|
+
|
|
26401
26427
|
// ../../packages/ycodium-acp-executor/src/probe.ts
|
|
26402
26428
|
function withProbeTimeout(promise2, timeoutMs, what) {
|
|
26403
26429
|
return new Promise((resolve2, reject) => {
|
|
@@ -27311,6 +27337,10 @@ var createGrokInstance = (config2, host) => {
|
|
|
27311
27337
|
},
|
|
27312
27338
|
...requestedModelId === void 0 ? {} : { requestedModelId },
|
|
27313
27339
|
...input2.bindingGeneration === void 0 ? {} : { originBindingGeneration: input2.bindingGeneration },
|
|
27340
|
+
// 内置编排那一条排第一,后面跟用户在插件中心配的;缺了这一栏,
|
|
27341
|
+
// `mcp__ycodium__*` 整套工具(浏览器等)在这只手的会话里都不存在。
|
|
27342
|
+
// http / sse 由执行器按握手里的 `mcpCapabilities` 再筛。
|
|
27343
|
+
mcpServers: toAcpMcpServers(input2.mcpServers),
|
|
27314
27344
|
...resume === void 0 ? {} : { resumeSessionId: resume.sessionId }
|
|
27315
27345
|
});
|
|
27316
27346
|
const forwarding = (async () => {
|
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.2526",
|
|
4
4
|
"description": "Grok executor: grok CLI over Agent Client Protocol stdio.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ycodium",
|
|
@@ -21,8 +21,8 @@
|
|
|
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.
|
|
25
|
-
"ycodium-acp-executor": "0.2.
|
|
24
|
+
"@ycodium-ai/plugin-api": "0.2.2526",
|
|
25
|
+
"ycodium-acp-executor": "0.2.2526",
|
|
26
26
|
"ycodium-executor-testing": "0.0.0"
|
|
27
27
|
},
|
|
28
28
|
"ycodium": {
|