@agentxm/registry-auth 0.28.6 → 0.28.7
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.
|
@@ -244,8 +244,16 @@ export const CredentialStoreLive = Layer.effect(CredentialStore, Effect.gen(func
|
|
|
244
244
|
const persistedCredentialsAllowed = canUsePersistedCredentials(env);
|
|
245
245
|
const readStoredFile = () => withCredentialFileLock(fs, path, homeDir, readCredentialFile(fs, path, homeDir));
|
|
246
246
|
const writeStoredFile = (data) => withCredentialFileLock(fs, path, homeDir, writeCredentialFile(fs, path, homeDir, data));
|
|
247
|
+
// A read falls back silently. The auth middleware looks a credential up
|
|
248
|
+
// for every request origin, so a read happens on commands that never
|
|
249
|
+
// authenticate — `axm upgrade` reads the store on its way to GitHub. On a
|
|
250
|
+
// host without a reachable keychain that made an environment fact into a
|
|
251
|
+
// per-request warning on unrelated commands, and the fallback changes
|
|
252
|
+
// neither the outcome nor the reader's next action. The write below is
|
|
253
|
+
// where the tier matters, because there a credential lands in a file
|
|
254
|
+
// instead of the keychain.
|
|
247
255
|
const loadCredentialFile = (registryUrl) => storageTier === "keychain"
|
|
248
|
-
? readKeychainCredentialFile(registryUrl).pipe(Effect.catch(() => Effect.
|
|
256
|
+
? readKeychainCredentialFile(registryUrl).pipe(Effect.catch(() => Effect.logDebug("OS keychain unavailable; reading the restricted credential file.").pipe(Effect.flatMap(() => readStoredFile()))))
|
|
249
257
|
: readStoredFile();
|
|
250
258
|
// Returns the tier actually used, so the caller only deletes the plaintext
|
|
251
259
|
// fallback file when the keychain write genuinely succeeded — never when we
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentxm/registry-auth",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.7",
|
|
4
4
|
"description": "AXM registry-auth feature: login, logout, token, identity inspection, device and loopback flows, and credential lifecycle for the axm CLI. Unstable and unsupported — use the axm.sh CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"@napi-rs/keyring": "^1.3.0",
|
|
50
50
|
"effect": "4.0.0-rc.112",
|
|
51
51
|
"proper-lockfile": "^4.1.2",
|
|
52
|
-
"@agentxm/registry-
|
|
53
|
-
"@agentxm/
|
|
54
|
-
"@agentxm/
|
|
52
|
+
"@agentxm/registry-protocol": "^0.28.7",
|
|
53
|
+
"@agentxm/extension-model": "^0.28.7",
|
|
54
|
+
"@agentxm/registry-client": "^0.28.7"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@effect/platform-node": "4.0.0-rc.112",
|