@skrr-ai/cli 0.1.86 → 0.1.87
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/bin/run.js +11 -0
- package/dist/base-command.js +1 -0
- package/dist/commands/agents/chat.d.ts +58 -1
- package/dist/commands/agents/chat.js +180 -4
- package/dist/lib/agent-home-workspace.d.ts +19 -0
- package/dist/lib/agent-home-workspace.js +27 -0
- package/dist/lib/agentic-stream.d.ts +135 -0
- package/dist/lib/agentic-stream.js +341 -6
- package/dist/lib/auth-storage.d.ts +4 -0
- package/dist/lib/auth-storage.js +33 -0
- package/dist/lib/keychain.d.ts +1 -0
- package/dist/lib/keychain.js +67 -14
- package/dist/lib/refresh.d.ts +7 -0
- package/dist/lib/refresh.js +2 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/oclif.manifest.json +28966 -28958
- package/package.json +1 -1
package/dist/lib/refresh.d.ts
CHANGED
|
@@ -38,6 +38,13 @@ export interface EnsureFreshCliCredentialOptions {
|
|
|
38
38
|
force?: boolean;
|
|
39
39
|
/** Respect `--bare`: do not mutate persisted credentials in bare mode. */
|
|
40
40
|
bareMode?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* `credential` was produced by the resolver a moment ago; decide from the
|
|
43
|
+
* Keychain read it made rather than reading every slot again
|
|
44
|
+
* (`takeResolvedKeychainRead`). Falls back to a fresh read whenever that read
|
|
45
|
+
* does not describe exactly this credential.
|
|
46
|
+
*/
|
|
47
|
+
reuseResolvedRead?: boolean;
|
|
41
48
|
}
|
|
42
49
|
export interface EnsureFreshCliCredentialResult {
|
|
43
50
|
credential: ResolvedCredential;
|
package/dist/lib/refresh.js
CHANGED
|
@@ -133,7 +133,8 @@ async function ensureFreshCliCredential(opts = {}) {
|
|
|
133
133
|
return { credential, refreshed: false, skippedReason: 'external_source' };
|
|
134
134
|
}
|
|
135
135
|
const cfg = (0, config_1.loadConfig)();
|
|
136
|
-
const read = (0, auth_storage_1.
|
|
136
|
+
const read = (opts.reuseResolvedRead ? (0, auth_storage_1.takeResolvedKeychainRead)(credential, cfg.baseURL) : null) ??
|
|
137
|
+
(0, auth_storage_1.readFromBackend)(cfg.baseURL);
|
|
137
138
|
// If a sibling process already rotated the stored access token, adopt it
|
|
138
139
|
// instead of needlessly consuming the latest refresh token again.
|
|
139
140
|
if (read.bundle?.token && read.bundle.token !== credential.token) {
|