dexto 1.6.11 → 1.6.12

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.
@@ -53,7 +53,6 @@ interface RequestOptions {
53
53
  * Dexto API client for key management
54
54
  */
55
55
  export declare class DextoApiClient {
56
- private readonly gatewayBaseUrl;
57
56
  private readonly platformBaseUrl;
58
57
  private readonly timeoutMs;
59
58
  constructor(baseUrl?: string | {
@@ -61,7 +60,6 @@ export declare class DextoApiClient {
61
60
  platformBaseUrl?: string | undefined;
62
61
  });
63
62
  private createRequestSignal;
64
- private getGatewayUrl;
65
63
  private getPlatformUrl;
66
64
  private listPlatformApiKeys;
67
65
  private createPlatformApiKey;
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/api-client.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAwBpD,MAAM,WAAW,uBAAuB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,MAAM,sBAAsB,GAC5B;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,QAAQ,CAAA;CAAE,GACp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eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KACnC;IAehB,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,cAAc;YAIR,mBAAmB;YAoBnB,oBAAoB;YAkCpB,oBAAoB;IAoBlC;;OAEG;IACG,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAwB3D;;;OAGG;IACG,oBAAoB,CACtB,SAAS,EAAE,MAAM,EACjB,IAAI,GAAE,MAAwB,EAC9B,UAAU,GAAE,OAAe,GAC5B,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAkCrE;;OAEG;IACG,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IA2BpE;;OAEG;IACG,oBAAoB,CACtB,MAAM,GAAE,MAAoB,EAC5B,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,uBAAuB,CAAC;IAyBnC;;OAEG;IACG,mBAAmB,CACrB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IAuFlC;;OAEG;IACG,iBAAiB,CACnB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IAyBzC;;OAEG;IACG,2BAA2B,CAC7B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,cAAmB,GAC7B,OAAO,CAAC,OAAO,CAAC;CAItB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAElD"}
@@ -1,5 +1,5 @@
1
1
  // packages/cli/src/cli/auth/api-client.ts
2
- // Dexto API client for key management and usage
2
+ // Dexto API client for auth/key/account APIs
3
3
  // TODO: Migrate to typed client for type safety and better DX
4
4
  // Options:
5
5
  // 1. Migrate dexto-web APIs to Hono and use @hono/client (like packages/server)
@@ -7,7 +7,7 @@
7
7
  // 3. Use tRPC if we want full-stack type safety
8
8
  // Currently using plain fetch() with runtime response validation.
9
9
  import { logger } from '@dexto/core';
10
- import { DEXTO_API_URL, DEXTO_PLATFORM_URL, SUPABASE_ANON_KEY, SUPABASE_URL } from './constants.js';
10
+ import { DEXTO_PLATFORM_URL, SUPABASE_ANON_KEY, SUPABASE_URL } from './constants.js';
11
11
  function parseString(value) {
12
12
  return typeof value === 'string' && value.trim().length > 0 ? value : null;
13
13
  }
@@ -257,18 +257,17 @@ function formatHttpFailure(status, payload, rawText) {
257
257
  * Dexto API client for key management
258
258
  */
259
259
  export class DextoApiClient {
260
- gatewayBaseUrl;
261
260
  platformBaseUrl;
262
261
  timeoutMs = 10_000;
263
262
  constructor(baseUrl = {}) {
264
263
  if (typeof baseUrl === 'string') {
265
264
  const normalized = baseUrl.replace(/\/+$/, '');
266
- this.gatewayBaseUrl = normalized;
267
- this.platformBaseUrl = DEXTO_PLATFORM_URL.replace(/\/+$/, '');
265
+ this.platformBaseUrl = normalized;
268
266
  return;
269
267
  }
270
- this.gatewayBaseUrl = (baseUrl.gatewayBaseUrl ?? DEXTO_API_URL).replace(/\/+$/, '');
271
- this.platformBaseUrl = (baseUrl.platformBaseUrl ?? DEXTO_PLATFORM_URL).replace(/\/+$/, '');
268
+ this.platformBaseUrl = (baseUrl.platformBaseUrl ??
269
+ baseUrl.gatewayBaseUrl ??
270
+ DEXTO_PLATFORM_URL).replace(/\/+$/, '');
272
271
  }
273
272
  createRequestSignal(signal) {
274
273
  const timeoutSignal = AbortSignal.timeout(this.timeoutMs);
@@ -277,9 +276,6 @@ export class DextoApiClient {
277
276
  }
278
277
  return AbortSignal.any([signal, timeoutSignal]);
279
278
  }
280
- getGatewayUrl(path) {
281
- return `${this.gatewayBaseUrl}${path}`;
282
- }
283
279
  getPlatformUrl(path) {
284
280
  return `${this.platformBaseUrl}${path}`;
285
281
  }
@@ -394,7 +390,7 @@ export class DextoApiClient {
394
390
  async getUsageSummary(apiKey) {
395
391
  try {
396
392
  logger.debug('Fetching usage summary');
397
- const response = await fetch(this.getGatewayUrl('/me/usage'), {
393
+ const response = await fetch(this.getPlatformUrl('/api/account/usage'), {
398
394
  method: 'GET',
399
395
  headers: {
400
396
  Authorization: `Bearer ${apiKey}`,
@@ -12,17 +12,17 @@
12
12
  * Environment variable overrides (for local development):
13
13
  * - SUPABASE_URL: Override Supabase URL (e.g., http://localhost:54321)
14
14
  * - SUPABASE_ANON_KEY: Override anon key (from `supabase start` output)
15
- * - DEXTO_API_URL: Override Dexto gateway URL for data-plane/usage calls (e.g., http://localhost:3001)
16
- * - DEXTO_PLATFORM_URL: Override Dexto platform URL for auth/key control-plane calls (e.g., http://localhost:3002)
15
+ * - DEXTO_API_URL: Override Dexto gateway URL for data-plane calls (e.g., http://localhost:3001)
16
+ * - DEXTO_PLATFORM_URL: Override Dexto platform URL for auth/key/account control-plane calls (e.g., http://localhost:3002)
17
17
  */
18
18
  export declare const SUPABASE_URL: string;
19
19
  export declare const SUPABASE_ANON_KEY: string;
20
20
  /**
21
- * Dexto gateway URL for usage-summary and other retained gateway endpoints.
21
+ * Dexto gateway URL for retained data-plane endpoints.
22
22
  */
23
23
  export declare const DEXTO_API_URL: string;
24
24
  /**
25
- * Dexto platform URL for auth/key control-plane endpoints.
25
+ * Dexto platform URL for auth/key/account control-plane endpoints.
26
26
  */
27
27
  export declare const DEXTO_PLATFORM_URL: string;
28
28
  /**
@@ -13,18 +13,18 @@
13
13
  * Environment variable overrides (for local development):
14
14
  * - SUPABASE_URL: Override Supabase URL (e.g., http://localhost:54321)
15
15
  * - SUPABASE_ANON_KEY: Override anon key (from `supabase start` output)
16
- * - DEXTO_API_URL: Override Dexto gateway URL for data-plane/usage calls (e.g., http://localhost:3001)
17
- * - DEXTO_PLATFORM_URL: Override Dexto platform URL for auth/key control-plane calls (e.g., http://localhost:3002)
16
+ * - DEXTO_API_URL: Override Dexto gateway URL for data-plane calls (e.g., http://localhost:3001)
17
+ * - DEXTO_PLATFORM_URL: Override Dexto platform URL for auth/key/account control-plane calls (e.g., http://localhost:3002)
18
18
  */
19
19
  export const SUPABASE_URL = process.env.SUPABASE_URL || 'https://gdfbxznhnnsamvsrtwjq.supabase.co';
20
20
  export const SUPABASE_ANON_KEY = process.env.SUPABASE_ANON_KEY ||
21
21
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdkZmJ4em5obm5zYW12c3J0d2pxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQwNjkzNjksImV4cCI6MjA3OTY0NTM2OX0.j2NWOJDOy8gTT84XeomalkGSPpLdPvTCBnQMrTgdlI4';
22
22
  /**
23
- * Dexto gateway URL for usage-summary and other retained gateway endpoints.
23
+ * Dexto gateway URL for retained data-plane endpoints.
24
24
  */
25
25
  export const DEXTO_API_URL = process.env.DEXTO_API_URL || 'https://api.dexto.ai';
26
26
  /**
27
- * Dexto platform URL for auth/key control-plane endpoints.
27
+ * Dexto platform URL for auth/key/account control-plane endpoints.
28
28
  */
29
29
  export const DEXTO_PLATFORM_URL = process.env.DEXTO_PLATFORM_URL || 'https://app.dexto.ai';
30
30
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dexto",
3
- "version": "1.6.11",
3
+ "version": "1.6.12",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "dexto": "./dist/index.js"
@@ -32,16 +32,16 @@
32
32
  "ws": "^8.18.1",
33
33
  "yaml": "^2.7.1",
34
34
  "zod": "^3.25.0",
35
- "@dexto/agent-config": "1.6.11",
36
- "@dexto/agent-management": "1.6.11",
37
- "@dexto/analytics": "1.6.11",
38
- "@dexto/core": "1.6.11",
39
- "@dexto/image-local": "1.6.11",
40
- "@dexto/image-logger-agent": "1.6.11",
41
- "@dexto/registry": "1.6.11",
42
- "@dexto/server": "1.6.11",
43
- "@dexto/storage": "1.6.11",
44
- "@dexto/tui": "1.6.11"
35
+ "@dexto/agent-config": "1.6.12",
36
+ "@dexto/agent-management": "1.6.12",
37
+ "@dexto/analytics": "1.6.12",
38
+ "@dexto/core": "1.6.12",
39
+ "@dexto/image-local": "1.6.12",
40
+ "@dexto/image-logger-agent": "1.6.12",
41
+ "@dexto/registry": "1.6.12",
42
+ "@dexto/server": "1.6.12",
43
+ "@dexto/storage": "1.6.12",
44
+ "@dexto/tui": "1.6.12"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/ws": "^8.5.11",