@demicodes/provider-grok-build 0.10.2 → 0.11.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/dist/index.mjs +5 -5
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ function redactGrokSecretText(text) {
|
|
|
15
15
|
return redactCredentialText(text, SECRET_FIELD_PATTERNS);
|
|
16
16
|
}
|
|
17
17
|
const DEFAULT_TOKEN_ENDPOINT = "https://auth.x.ai/oauth2/token";
|
|
18
|
-
const REFRESH_EXPIRY_SKEW_MS =
|
|
18
|
+
const REFRESH_EXPIRY_SKEW_MS = 3e5;
|
|
19
19
|
async function grokBuildAuthStatus(options = {}) {
|
|
20
20
|
return new FileGrokAuthStore(options).status();
|
|
21
21
|
}
|
|
@@ -495,9 +495,6 @@ function inferenceItemsToMessages(systemPrompt, items) {
|
|
|
495
495
|
tool_call_id: item.toolUseId,
|
|
496
496
|
content: toolResultContentToText(item.output)
|
|
497
497
|
});
|
|
498
|
-
break;
|
|
499
|
-
case "assistant_thinking":
|
|
500
|
-
case "assistant_redacted_thinking": break;
|
|
501
498
|
}
|
|
502
499
|
flushAssistant();
|
|
503
500
|
return messages;
|
|
@@ -1175,11 +1172,14 @@ function moneyVal(value) {
|
|
|
1175
1172
|
}
|
|
1176
1173
|
//#endregion
|
|
1177
1174
|
//#region src/provider.ts
|
|
1178
|
-
var GrokBuildProvider = class {
|
|
1175
|
+
var GrokBuildProvider = class GrokBuildProvider {
|
|
1179
1176
|
options;
|
|
1180
1177
|
constructor(options) {
|
|
1181
1178
|
this.options = options;
|
|
1182
1179
|
}
|
|
1180
|
+
clone() {
|
|
1181
|
+
return new GrokBuildProvider(this.options);
|
|
1182
|
+
}
|
|
1183
1183
|
async *run(request) {
|
|
1184
1184
|
if (request.cancel.aborted) {
|
|
1185
1185
|
yield { type: "abort" };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@demicodes/provider-grok-build",
|
|
3
3
|
"description": "Grok Build provider adapter for Demi (reuses ~/.grok OAuth session).",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@demicodes/core": "^0.
|
|
15
|
-
"@demicodes/provider": "^0.
|
|
16
|
-
"@demicodes/utils": "^0.
|
|
14
|
+
"@demicodes/core": "^0.11.0",
|
|
15
|
+
"@demicodes/provider": "^0.11.0",
|
|
16
|
+
"@demicodes/utils": "^0.11.0"
|
|
17
17
|
},
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"main": "./dist/index.mjs",
|