@dexto/agent-management 1.17.0 → 1.18.1

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.
Files changed (61) hide show
  1. package/dist/auth/dexto-accounts.cjs +277 -0
  2. package/dist/auth/dexto-accounts.d.ts +144 -0
  3. package/dist/auth/dexto-accounts.d.ts.map +1 -0
  4. package/dist/auth/dexto-accounts.js +230 -0
  5. package/dist/auth/dexto-cloud.cjs +51 -0
  6. package/dist/auth/dexto-cloud.d.ts +9 -0
  7. package/dist/auth/dexto-cloud.d.ts.map +1 -0
  8. package/dist/auth/dexto-cloud.js +27 -0
  9. package/dist/auth/dexto-gateway.cjs +162 -0
  10. package/dist/auth/dexto-gateway.d.ts +55 -0
  11. package/dist/auth/dexto-gateway.d.ts.map +1 -0
  12. package/dist/auth/dexto-gateway.js +133 -0
  13. package/dist/auth/dexto-mcp.cjs +77 -0
  14. package/dist/auth/dexto-mcp.d.ts +23 -0
  15. package/dist/auth/dexto-mcp.d.ts.map +1 -0
  16. package/dist/auth/dexto-mcp.js +49 -0
  17. package/dist/auth/dexto-sign-in.cjs +345 -0
  18. package/dist/auth/dexto-sign-in.d.ts +86 -0
  19. package/dist/auth/dexto-sign-in.d.ts.map +1 -0
  20. package/dist/auth/dexto-sign-in.js +314 -0
  21. package/dist/auth/index.cjs +25 -0
  22. package/dist/auth/index.d.ts +6 -0
  23. package/dist/auth/index.d.ts.map +1 -1
  24. package/dist/auth/index.js +10 -0
  25. package/dist/auth/model-auth-handlers.cjs +3 -1
  26. package/dist/auth/model-auth-handlers.d.ts +6 -1
  27. package/dist/auth/model-auth-handlers.d.ts.map +1 -1
  28. package/dist/auth/model-auth-handlers.js +6 -1
  29. package/dist/config/errors.cjs +6 -6
  30. package/dist/config/errors.js +6 -6
  31. package/dist/images/image-store.cjs +2 -4
  32. package/dist/images/image-store.d.ts.map +1 -1
  33. package/dist/images/image-store.js +2 -4
  34. package/dist/index.cjs +40 -29
  35. package/dist/index.d.ts +3 -2
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +9 -6
  38. package/dist/installation.cjs +2 -2
  39. package/dist/installation.js +2 -2
  40. package/dist/plugins/discover-skills.cjs +5 -2
  41. package/dist/plugins/discover-skills.d.ts +6 -2
  42. package/dist/plugins/discover-skills.d.ts.map +1 -1
  43. package/dist/plugins/discover-skills.js +5 -2
  44. package/dist/plugins/errors.cjs +2 -2
  45. package/dist/plugins/errors.js +2 -2
  46. package/dist/plugins/marketplace/errors.cjs +4 -4
  47. package/dist/plugins/marketplace/errors.js +4 -4
  48. package/dist/preferences/errors.cjs +1 -1
  49. package/dist/preferences/errors.js +1 -1
  50. package/dist/registry/registry.cjs +3 -3
  51. package/dist/registry/registry.js +3 -3
  52. package/dist/resolver.cjs +1 -1
  53. package/dist/resolver.js +1 -1
  54. package/dist/tool-factories/agent-spawner/factory.cjs +1 -218
  55. package/dist/tool-factories/agent-spawner/factory.d.ts.map +1 -1
  56. package/dist/tool-factories/agent-spawner/factory.js +1 -228
  57. package/dist/utils/dexto-auth.cjs +3 -58
  58. package/dist/utils/dexto-auth.d.ts +4 -18
  59. package/dist/utils/dexto-auth.d.ts.map +1 -1
  60. package/dist/utils/dexto-auth.js +3 -57
  61. package/package.json +5 -6
@@ -1,65 +1,11 @@
1
- import { existsSync, promises as fs } from "fs";
2
- import { z } from "zod";
3
- import { getDextoGlobalPath } from "@dexto/core";
4
- const AUTH_CONFIG_FILE = "auth.json";
5
- const AuthConfigSchema = z.object({
6
- token: z.string().min(1).optional(),
7
- refreshToken: z.string().optional(),
8
- expiresAt: z.number().optional(),
9
- createdAt: z.number().optional(),
10
- dextoApiKey: z.string().optional(),
11
- dextoKeyId: z.string().optional(),
12
- dextoApiKeySource: z.enum(["provisioned", "user-supplied"]).optional()
13
- }).refine((data) => data.token || data.dextoApiKey, {
14
- message: "Either token or dextoApiKey is required"
15
- });
16
- async function loadAuthConfig() {
17
- const authPath = getDextoGlobalPath("", AUTH_CONFIG_FILE);
18
- if (!existsSync(authPath)) {
19
- return null;
20
- }
21
- try {
22
- const content = await fs.readFile(authPath, "utf-8");
23
- const config = JSON.parse(content);
24
- const validated = AuthConfigSchema.safeParse(config);
25
- if (!validated.success) {
26
- return null;
27
- }
28
- const auth = validated.data;
29
- if (auth.expiresAt && auth.expiresAt < Date.now()) {
30
- if (!auth.refreshToken && !auth.dextoApiKey) {
31
- return null;
32
- }
33
- }
34
- return auth;
35
- } catch {
36
- return null;
37
- }
38
- }
1
+ import { defaultDextoGatewayOptions, dextoModelAccess } from "../auth/dexto-gateway.js";
39
2
  async function isDextoAuthenticated() {
40
- return await loadAuthConfig() !== null;
41
- }
42
- async function getDextoApiKeyFromAuth() {
43
- const auth = await loadAuthConfig();
44
- if (auth?.dextoApiKey?.trim()) {
45
- const apiKey = auth.dextoApiKey.trim();
46
- process.env.DEXTO_API_KEY = apiKey;
47
- return apiKey;
48
- }
49
- if (process.env.DEXTO_API_KEY?.trim()) {
50
- return process.env.DEXTO_API_KEY;
51
- }
52
- return null;
3
+ return (await dextoModelAccess(defaultDextoGatewayOptions())).status !== "signed_out";
53
4
  }
54
5
  async function canUseDextoProvider() {
55
- const authenticated = await isDextoAuthenticated();
56
- if (!authenticated) return false;
57
- const apiKey = await getDextoApiKeyFromAuth();
58
- if (!apiKey) return false;
59
- return true;
6
+ return (await dextoModelAccess(defaultDextoGatewayOptions())).status === "ready";
60
7
  }
61
8
  export {
62
9
  canUseDextoProvider,
63
- getDextoApiKeyFromAuth,
64
10
  isDextoAuthenticated
65
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/agent-management",
3
- "version": "1.17.0",
3
+ "version": "1.18.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,11 +22,10 @@
22
22
  "dependencies": {
23
23
  "yaml": "^2.8.3",
24
24
  "zod": "^4.3.6",
25
- "@dexto/agent-config": "1.17.0",
26
- "@dexto/core": "1.17.0",
27
- "@dexto/llm": "1.17.0",
28
- "@dexto/orchestration": "1.17.0",
29
- "@dexto/tools-builtins": "1.17.0"
25
+ "@dexto/agent-config": "1.18.1",
26
+ "@dexto/core": "1.18.1",
27
+ "@dexto/llm": "1.18.1",
28
+ "@dexto/tools-builtins": "1.18.1"
30
29
  },
31
30
  "devDependencies": {
32
31
  "@types/node": "^22.13.5"