@stevezhou/sisu 0.3.8 → 0.3.9
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/commands.js +5 -1
- package/dist/runtime/launch.js +13 -0
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -37,7 +37,11 @@ const client_1 = require("./client");
|
|
|
37
37
|
const launch_1 = require("./runtime/launch");
|
|
38
38
|
/** Host + pager stamp for `sisu status`. Shipped reporter — tests drive this. */
|
|
39
39
|
function formatCliReleaseStatus(version = client_1.SISU_CLIENT_VERSION, pagerStamp = (0, launch_1.installedPagerStamp)()) {
|
|
40
|
-
|
|
40
|
+
const lines = [`cli ${version}`, `pager ${pagerStamp || 'none'}`];
|
|
41
|
+
if (!pagerStamp || (0, launch_1.comparePagerStamp)(pagerStamp, version) < 0) {
|
|
42
|
+
lines.push('pager behind — run sisu update');
|
|
43
|
+
}
|
|
44
|
+
return lines.join('\n');
|
|
41
45
|
}
|
|
42
46
|
async function loginCommand(input, http = http_1.defaultHttp) {
|
|
43
47
|
const apiBase = (input.apiBase || process.env.SISU_API_BASE || store_1.DEFAULT_API_BASE).replace(/\/+$/, '');
|
package/dist/runtime/launch.js
CHANGED
|
@@ -191,6 +191,19 @@ function sisuGrokBuildEnv() {
|
|
|
191
191
|
else {
|
|
192
192
|
env.XAI_API_KEY = auth?.token || '';
|
|
193
193
|
}
|
|
194
|
+
// grok-build's cached_token path reads GROK_AUTH / GROK_HOME auth.json.
|
|
195
|
+
// Without a disk session it falls through to accounts.x.ai. Seed an ApiKey
|
|
196
|
+
// snapshot of the SiSu JWT so the pager never starts grok.com OAuth.
|
|
197
|
+
delete env.GROK_AUTH;
|
|
198
|
+
if (auth?.token) {
|
|
199
|
+
env.GROK_AUTH = JSON.stringify({
|
|
200
|
+
key: auth.token,
|
|
201
|
+
auth_mode: 'api_key',
|
|
202
|
+
create_time: new Date().toISOString(),
|
|
203
|
+
user_id: auth.user_id || 'sisu',
|
|
204
|
+
email: auth.email || undefined,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
194
207
|
return {
|
|
195
208
|
...env,
|
|
196
209
|
SISU_ACCESS_POINT: '1',
|