fluxy-bot 0.2.9 → 0.2.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluxy-bot",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Self-hosted AI bot — run your own AI assistant from anywhere",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -63,9 +63,11 @@ function readOAuthToken(): string | null {
63
63
  try {
64
64
  if (fs.existsSync(CREDENTIALS_FILE)) {
65
65
  const creds = JSON.parse(fs.readFileSync(CREDENTIALS_FILE, 'utf-8'));
66
- if (creds.accessToken) {
67
- if (creds.expiresAt && Date.now() >= creds.expiresAt) return null;
68
- return creds.accessToken;
66
+ // Support both flat format ({ accessToken }) and nested ({ claudeAiOauth: { accessToken } })
67
+ const oauth = creds.claudeAiOauth || creds;
68
+ if (oauth.accessToken) {
69
+ if (oauth.expiresAt && Date.now() >= oauth.expiresAt) return null;
70
+ return oauth.accessToken;
69
71
  }
70
72
  }
71
73
  } catch {}
@@ -131,7 +131,7 @@ export async function startSupervisor() {
131
131
  ? createProvider(freshConfig.ai.provider, freshConfig.ai.apiKey, freshConfig.ai.baseUrl)
132
132
  : null;
133
133
 
134
- log.info(`[fluxy] provider=${freshConfig.ai.provider}, model=${freshConfig.ai.model}, hasApiKey=${!!freshConfig.ai.apiKey}`);
134
+ log.info(`[fluxy] provider=${freshConfig.ai.provider}, model=${freshConfig.ai.model}`);
135
135
 
136
136
  // Route Anthropic through Agent SDK (uses OAuth token, not API key)
137
137
  if (freshConfig.ai.provider === 'anthropic') {