limbo-ai 1.24.4 → 1.24.6

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/cli.js CHANGED
@@ -1283,7 +1283,7 @@ function decodeJwtPayload(token) {
1283
1283
 
1284
1284
  function writeAuthProfilesToDocker(store) {
1285
1285
  const json = JSON.stringify(store, null, 2);
1286
- const destDir = '/home/limbo/.zeroclaw/agents/main/agent';
1286
+ const destDir = '/home/limbo/.zeroclaw';
1287
1287
  const destFile = `${destDir}/auth-profiles.json`;
1288
1288
  spawnSync('docker', [
1289
1289
  'compose', 'run', '--rm', '--no-deps', '--entrypoint', 'sh', 'limbo',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "limbo-ai",
3
- "version": "1.24.4",
3
+ "version": "1.24.6",
4
4
  "description": "Your personal AI memory agent — install and manage Limbo via npx",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -229,52 +229,48 @@ function decodeJwtPayload(token) {
229
229
  return JSON.parse(Buffer.from(parts[1], 'base64url').toString());
230
230
  }
231
231
 
232
- // ZeroClaw auth-profiles.json format:
233
- // path: ~/.zeroclaw/auth-profiles.json
234
- // fields: profile_name, kind, provider, access_token, refresh_token, expires_at (RFC3339)
235
- // After writing, `zeroclaw auth use --provider X --profile Y` activates it.
232
+ // ZeroClaw auth-profiles.json — must match the structure used by the CLI
233
+ // (cli.js buildAnthropicAuthProfile / buildCodexAuthProfile).
234
+ // Path: ~/.zeroclaw/agents/main/agent/auth-profiles.json
236
235
 
237
236
  function buildCodexAuthProfile(profile) {
238
- const profileName = 'default';
239
- const profileId = `openai-codex:${profileName}`;
237
+ const profileId = profile.email ? `openai-codex:${profile.email}` : 'openai-codex:default';
240
238
  return {
241
239
  version: 1,
242
240
  profiles: {
243
241
  [profileId]: {
244
- profile_name: profileName,
245
- kind: 'oauth',
242
+ type: 'oauth',
246
243
  provider: 'openai-codex',
247
- access_token: profile.access,
248
- refresh_token: profile.refresh,
249
- expires_at: new Date(profile.expires).toISOString(),
250
- account_id: profile.accountId || '',
244
+ access: profile.access,
245
+ refresh: profile.refresh,
246
+ expires: profile.expires,
247
+ accountId: profile.accountId || '',
251
248
  },
252
249
  },
253
- order: { 'openai-codex': [profileId] },
254
- lastGood: { 'openai-codex': profileId },
250
+ order: {},
251
+ lastGood: {},
255
252
  usageStats: {},
256
253
  };
257
254
  }
258
255
 
259
256
  function buildAnthropicAuthProfile(token) {
260
- const profileName = 'default';
261
- const profileId = `anthropic:${profileName}`;
262
257
  return {
263
258
  version: 1,
264
259
  profiles: {
265
- [profileId]: {
266
- profile_name: profileName,
267
- kind: 'token',
260
+ 'anthropic:token': {
261
+ type: 'token',
268
262
  provider: 'anthropic',
269
- access_token: token,
263
+ token,
270
264
  },
271
265
  },
272
- order: { anthropic: [profileId] },
273
- lastGood: { anthropic: profileId },
266
+ order: { anthropic: ['anthropic:token'] },
267
+ lastGood: {},
274
268
  usageStats: {},
275
269
  };
276
270
  }
277
271
 
272
+ // ZeroClaw resolves auth profiles from the state dir root: ~/.zeroclaw/auth-profiles.json
273
+ // See: ZeroClaw src/auth/profiles.rs — state_dir.join("auth-profiles.json")
278
274
  const AUTH_PROFILES_FILE = path.join(ZEROCLAW_STATE, 'auth-profiles.json');
279
275
 
280
276
  function writeAuthProfiles(store) {
@@ -177,13 +177,12 @@ describe('buildCodexAuthProfile', () => {
177
177
  };
178
178
  const result = buildCodexAuthProfile(profile);
179
179
  assert.strictEqual(result.version, 1);
180
- const pid = 'openai-codex:default';
180
+ const pid = 'openai-codex:test@example.com';
181
181
  assert.ok(result.profiles[pid], 'profile entry exists');
182
182
  assert.strictEqual(result.profiles[pid].provider, 'openai-codex');
183
- assert.strictEqual(result.profiles[pid].kind, 'oauth');
184
- assert.strictEqual(result.profiles[pid].access_token, 'access-tok');
185
- assert.strictEqual(result.profiles[pid].refresh_token, 'refresh-tok');
186
- assert.deepStrictEqual(result.order, { 'openai-codex': [pid] });
183
+ assert.strictEqual(result.profiles[pid].type, 'oauth');
184
+ assert.strictEqual(result.profiles[pid].access, 'access-tok');
185
+ assert.strictEqual(result.profiles[pid].refresh, 'refresh-tok');
187
186
  });
188
187
 
189
188
  it('builds correct structure without email (accountId empty)', () => {
@@ -194,7 +193,7 @@ describe('buildCodexAuthProfile', () => {
194
193
  };
195
194
  const result = buildCodexAuthProfile(profile);
196
195
  const pid = 'openai-codex:default';
197
- assert.strictEqual(result.profiles[pid].account_id, '');
196
+ assert.strictEqual(result.profiles[pid].accountId, '');
198
197
  });
199
198
  });
200
199
 
@@ -202,17 +201,17 @@ describe('buildAnthropicAuthProfile', () => {
202
201
  it('builds correct structure', () => {
203
202
  const result = buildAnthropicAuthProfile('sk-ant-test123');
204
203
  assert.strictEqual(result.version, 1);
205
- const pid = 'anthropic:default';
204
+ const pid = 'anthropic:token';
206
205
  assert.ok(result.profiles[pid], 'profile entry exists');
207
206
  assert.strictEqual(result.profiles[pid].provider, 'anthropic');
208
- assert.strictEqual(result.profiles[pid].kind, 'token');
209
- assert.strictEqual(result.profiles[pid].access_token, 'sk-ant-test123');
207
+ assert.strictEqual(result.profiles[pid].type, 'token');
208
+ assert.strictEqual(result.profiles[pid].token, 'sk-ant-test123');
210
209
  });
211
210
 
212
211
  it('order includes anthropic key', () => {
213
212
  const result = buildAnthropicAuthProfile('sk-ant-xyz');
214
213
  assert.ok(result.order.anthropic, 'order has anthropic key');
215
- assert.deepStrictEqual(result.order.anthropic, ['anthropic:default']);
214
+ assert.deepStrictEqual(result.order.anthropic, ['anthropic:token']);
216
215
  });
217
216
  });
218
217