axauth 3.0.0 → 3.1.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.
@@ -41,9 +41,15 @@ async function refreshCredentials(creds, options) {
41
41
  }
42
42
  // Run agent with a minimal prompt to trigger internal token refresh.
43
43
  // preserveConfigDirectory keeps the temp dir so we can read refreshed credentials.
44
+ // For OpenCode, use explicit provider option or fall back to credentials.provider.
45
+ const provider = options?.provider ??
46
+ (resolved.credentials.agent === "opencode"
47
+ ? resolved.credentials.provider
48
+ : undefined);
44
49
  const resultPromise = runAgent(resolved.credentials.agent, {
45
50
  prompt: "ping",
46
51
  credentials: resolved.credentials,
52
+ provider,
47
53
  preserveConfigDirectory: true,
48
54
  });
49
55
  const timeoutMarker = { timedOut: true };
@@ -90,10 +96,6 @@ async function refreshCredentials(creds, options) {
90
96
  if (!directories) {
91
97
  return { ok: false, error: "No directories in execution metadata" };
92
98
  }
93
- // For OpenCode, pass the provider to filter refreshed credentials
94
- const provider = resolved.credentials.agent === "opencode"
95
- ? resolved.credentials.provider
96
- : undefined;
97
99
  const refreshedCredentials = await waitForRefreshedCredentials(resolved.credentials.agent, directories, deadlineMs, { provider });
98
100
  if (!refreshedCredentials) {
99
101
  return { ok: false, error: "No credentials found after refresh" };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "axauth",
3
3
  "author": "Łukasz Jerciński",
4
4
  "license": "MIT",
5
- "version": "3.0.0",
5
+ "version": "3.1.0",
6
6
  "description": "Authentication management library and CLI for AI coding agents",
7
7
  "repository": {
8
8
  "type": "git",
@@ -70,7 +70,7 @@
70
70
  "@commander-js/extra-typings": "^14.0.0",
71
71
  "@inquirer/password": "^5.0.4",
72
72
  "axconfig": "^3.6.3",
73
- "axexec": "^1.5.1",
73
+ "axexec": "^1.6.0",
74
74
  "axshared": "^4.0.0",
75
75
  "commander": "^14.0.2",
76
76
  "zod": "^4.3.5"