dexto 1.6.13 → 1.6.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/constants.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY,QAAyE,CAAC;AACnG,eAAO,MAAM,iBAAiB,QAEwL,CAAC;AAEvN;;GAEG;AACH,eAAO,MAAM,aAAa,QAAsD,CAAC;AAEjF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAA2D,CAAC;AAE3F;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAC+C,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/auth/constants.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,YAAY,QAAyE,CAAC;AACnG,eAAO,MAAM,iBAAiB,QAEwL,CAAC;AAEvN;;GAEG;AACH,eAAO,MAAM,aAAa,QAAsD,CAAC;AAEjF;;GAEG;AACH,eAAO,MAAM,kBAAkB,QAAgE,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAC+C,CAAC"}
@@ -26,7 +26,7 @@ export const DEXTO_API_URL = process.env.DEXTO_API_URL || 'https://api.dexto.ai'
26
26
  /**
27
27
  * Dexto platform URL for auth/key/account control-plane endpoints.
28
28
  */
29
- export const DEXTO_PLATFORM_URL = process.env.DEXTO_PLATFORM_URL || 'https://app.dexto.ai';
29
+ export const DEXTO_PLATFORM_URL = process.env.DEXTO_PLATFORM_URL || 'https://platform.dexto.ai';
30
30
  /**
31
31
  * Dexto Nova credits purchase URL
32
32
  */
@@ -18,6 +18,12 @@ export interface CloudAgentStatusResult {
18
18
  state: z.output<typeof CloudAgentStateSchema>;
19
19
  stale: boolean;
20
20
  }
21
+ export interface CloudAgentListItemResult {
22
+ cloudAgentId: string;
23
+ name: string | null;
24
+ agentUrl: string;
25
+ state: z.output<typeof CloudAgentStateSchema>;
26
+ }
21
27
  export interface CloudAgentStopResult {
22
28
  cloudAgentId: string;
23
29
  agentUrl: string;
@@ -37,6 +43,7 @@ export declare function createDeployClient(): {
37
43
  cloudAgentId?: string;
38
44
  }): Promise<DeployCloudAgentResult>;
39
45
  getCloudAgent(cloudAgentId: string): Promise<CloudAgentStatusResult>;
46
+ listCloudAgents(): Promise<CloudAgentListItemResult[]>;
40
47
  stopCloudAgent(cloudAgentId: string): Promise<CloudAgentStopResult>;
41
48
  deleteCloudAgent(cloudAgentId: string): Promise<CloudAgentDeleteResult>;
42
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,QAAA,MAAM,qBAAqB;;;;;;gCAIT,CAAC;AAyEnB,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC9C,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sB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AM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAaD,wBAAgB,qBAAqB,IAAI,MAAM,CAY9C;AAuED,wBAAgB,kBAAkB;2BAEG;QACzB,KAAK,EAAE,WAAW,CAAC;QACnB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB,GAAG,OAAO,CAAC,sBAAsB,CAAC;gCAsCD,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;uBAkBjD,OAAO,CAAC,wBAAwB,EAAE,CAAC;iCAkBzB,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;mCA0BpC,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;EAgBpF"}
@@ -17,6 +17,15 @@ const CloudAgentSummarySchema = z
17
17
  state: CloudAgentStateSchema,
18
18
  })
19
19
  .passthrough();
20
+ const CloudAgentListItemSchema = z
21
+ .object({
22
+ cloudAgentId: z.string(),
23
+ name: z.string().nullable().optional(),
24
+ agentUrl: z.string(),
25
+ hostUrl: z.string().nullable().optional(),
26
+ state: CloudAgentStateSchema,
27
+ })
28
+ .passthrough();
20
29
  const DeployResponseSchema = z
21
30
  .object({
22
31
  success: z.boolean(),
@@ -46,6 +55,18 @@ const StatusResponseSchema = z
46
55
  .optional(),
47
56
  })
48
57
  .passthrough();
58
+ const ListResponseSchema = z
59
+ .object({
60
+ success: z.boolean(),
61
+ error: z.string().optional(),
62
+ data: z
63
+ .object({
64
+ cloudAgents: z.array(CloudAgentListItemSchema),
65
+ })
66
+ .passthrough()
67
+ .optional(),
68
+ })
69
+ .passthrough();
49
70
  const StopResponseSchema = z
50
71
  .object({
51
72
  success: z.boolean(),
@@ -193,6 +214,22 @@ export function createDeployClient() {
193
214
  stale: data.stale === true,
194
215
  };
195
216
  },
217
+ async listCloudAgents() {
218
+ const response = await request('/cloud-agents/list', {
219
+ method: 'GET',
220
+ });
221
+ if (!response.ok) {
222
+ await throwApiError(response);
223
+ }
224
+ const payload = await parseJsonResponse(response);
225
+ const data = requireSuccessData(payload, response, ListResponseSchema);
226
+ return data.cloudAgents.map((cloudAgent) => ({
227
+ cloudAgentId: cloudAgent.cloudAgentId,
228
+ name: cloudAgent.name ?? null,
229
+ agentUrl: cloudAgent.agentUrl,
230
+ state: cloudAgent.state,
231
+ }));
232
+ },
196
233
  async stopCloudAgent(cloudAgentId) {
197
234
  const response = await request(`/cloud-agents/${encodeURIComponent(cloudAgentId)}/stop`, {
198
235
  method: 'POST',
@@ -2,6 +2,8 @@ interface InteractiveOptions {
2
2
  interactive?: boolean;
3
3
  }
4
4
  export declare function handleDeployCommand(options?: InteractiveOptions): Promise<void>;
5
+ export declare function handleDeployListCommand(): Promise<void>;
6
+ export declare function handleDeployOpenCommand(): Promise<void>;
5
7
  export declare function handleDeployStatusCommand(): Promise<void>;
6
8
  export declare function handleDeployStopCommand(): Promise<void>;
7
9
  export declare function handleDeployDeleteCommand(options?: InteractiveOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/index.ts"],"names":[],"mappings":"AA0BA,UAAU,kBAAkB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAwED,wBAAsB,mBAAmB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ErF;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB/D;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4B7D;AAED,wBAAsB,yBAAyB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C3F"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/index.ts"],"names":[],"mappings":"AA2BA,UAAU,kBAAkB;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAwGD,wBAAsB,mBAAmB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2ErF;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAiD7D;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqB7D;AAED,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC,CAkB/D;AAED,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4B7D;AAED,wBAAsB,yBAAyB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CA2C3F"}
@@ -3,6 +3,7 @@ import path from 'path';
3
3
  import * as p from '@clack/prompts';
4
4
  import { findDextoProjectRoot } from '@dexto/agent-management';
5
5
  import chalk from 'chalk';
6
+ import open from 'open';
6
7
  import { confirmOrExit } from '../../utils/prompt-helpers.js';
7
8
  import { createCloudDefaultDeployConfig, createWorkspaceDeployConfig, getDeployConfigPath, isWorkspaceDeployAgent, loadDeployConfig, resolveWorkspaceDeployAgentPath, saveDeployConfig, } from './config.js';
8
9
  import { createDeployClient } from './client.js';
@@ -30,6 +31,32 @@ function formatCloudAgentSummary(input) {
30
31
  function getErrorMessage(error) {
31
32
  return error instanceof Error ? error.message : String(error);
32
33
  }
34
+ function formatCloudAgentStatus(status) {
35
+ switch (status) {
36
+ case 'ready':
37
+ return chalk.green(status);
38
+ case 'stopped':
39
+ return chalk.yellow(status);
40
+ case 'failed':
41
+ case 'deleted':
42
+ return chalk.red(status);
43
+ default:
44
+ return chalk.cyan(status);
45
+ }
46
+ }
47
+ function formatCloudAgentListItem(cloudAgent, linkedToWorkspace) {
48
+ const prefix = linkedToWorkspace ? chalk.green('→') : ' ';
49
+ const trimmedName = cloudAgent.name?.trim();
50
+ const heading = trimmedName && trimmedName !== cloudAgent.cloudAgentId
51
+ ? `${chalk.cyan(trimmedName)} ${chalk.gray(`(${cloudAgent.cloudAgentId})`)}`
52
+ : chalk.cyan(cloudAgent.cloudAgentId);
53
+ const status = `${chalk.gray('[')}${formatCloudAgentStatus(cloudAgent.state.status)}${chalk.gray(']')}`;
54
+ const lines = [`${prefix} ${heading} ${status}`];
55
+ if (linkedToWorkspace) {
56
+ lines.push(` ${chalk.green('Linked to this workspace')}`);
57
+ }
58
+ return lines.join('\n');
59
+ }
33
60
  function resolveWorkspaceRoot() {
34
61
  return findDextoProjectRoot(process.cwd()) ?? process.cwd();
35
62
  }
@@ -130,6 +157,58 @@ export async function handleDeployCommand(options) {
130
157
  }
131
158
  }
132
159
  }
160
+ export async function handleDeployListCommand() {
161
+ const workspaceRoot = resolveWorkspaceRoot();
162
+ const deployLink = await loadWorkspaceDeployLink(workspaceRoot);
163
+ const client = createDeployClient();
164
+ const cloudAgents = await client.listCloudAgents();
165
+ if (cloudAgents.length === 0) {
166
+ p.outro('No cloud deployments found.\nRun `dexto deploy` from this workspace to create one.');
167
+ return;
168
+ }
169
+ const linkedCloudAgentId = deployLink?.cloudAgentId ?? null;
170
+ const sortedCloudAgents = [...cloudAgents].sort((left, right) => {
171
+ if (left.cloudAgentId === linkedCloudAgentId && right.cloudAgentId !== linkedCloudAgentId) {
172
+ return -1;
173
+ }
174
+ if (right.cloudAgentId === linkedCloudAgentId && left.cloudAgentId !== linkedCloudAgentId) {
175
+ return 1;
176
+ }
177
+ return 0;
178
+ });
179
+ const linkedVisible = linkedCloudAgentId !== null &&
180
+ sortedCloudAgents.some((cloudAgent) => cloudAgent.cloudAgentId === linkedCloudAgentId);
181
+ const lines = [
182
+ 'Cloud deployments',
183
+ '',
184
+ ...sortedCloudAgents.flatMap((cloudAgent, index) => {
185
+ const entry = formatCloudAgentListItem(cloudAgent, cloudAgent.cloudAgentId === linkedCloudAgentId);
186
+ return index === 0 ? [entry] : ['', entry];
187
+ }),
188
+ ];
189
+ if (linkedCloudAgentId && !linkedVisible) {
190
+ lines.push('', chalk.yellow(`This workspace is linked to ${linkedCloudAgentId}, but that deployment was not returned by the cloud API.`));
191
+ }
192
+ p.outro(lines.join('\n'));
193
+ }
194
+ export async function handleDeployOpenCommand() {
195
+ const workspaceRoot = resolveWorkspaceRoot();
196
+ const deployLink = await loadWorkspaceDeployLink(workspaceRoot);
197
+ if (!deployLink) {
198
+ throw new Error('This workspace is not linked to a cloud deployment yet. Run `dexto deploy` first.');
199
+ }
200
+ const dashboardUrl = getCloudAgentDashboardUrl(deployLink.cloudAgentId);
201
+ try {
202
+ await open(dashboardUrl);
203
+ p.outro(`Opened dashboard for ${deployLink.cloudAgentId}\n${dashboardUrl}`);
204
+ }
205
+ catch (error) {
206
+ p.outro([
207
+ `Unable to open the dashboard automatically (${getErrorMessage(error)})`,
208
+ dashboardUrl,
209
+ ].join('\n'));
210
+ }
211
+ }
133
212
  export async function handleDeployStatusCommand() {
134
213
  const workspaceRoot = resolveWorkspaceRoot();
135
214
  const deployLink = await loadWorkspaceDeployLink(workspaceRoot);
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,WAAW,4BAA4B;IACzC,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,4BAA4B,GAAG,IAAI,CAiFrF"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,WAAW,4BAA4B;IACzC,OAAO,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,4BAA4B,GAAG,IAAI,CAqHrF"}
@@ -6,6 +6,8 @@ export function registerDeployCommand({ program }) {
6
6
  deployCommand.addHelpText('after', `
7
7
  Examples:
8
8
  $ dexto deploy
9
+ $ dexto deploy list
10
+ $ dexto deploy open
9
11
  $ dexto deploy status
10
12
  $ dexto deploy stop
11
13
  $ dexto deploy delete
@@ -23,6 +25,38 @@ Examples:
23
25
  safeExit('deploy', 1, 'error');
24
26
  }
25
27
  }));
28
+ deployCommand
29
+ .command('list')
30
+ .description('List cloud deployments for your account')
31
+ .action(withAnalytics('deploy list', async () => {
32
+ try {
33
+ const { handleDeployListCommand } = await import('./index.js');
34
+ await handleDeployListCommand();
35
+ safeExit('deploy list', 0);
36
+ }
37
+ catch (err) {
38
+ if (err instanceof ExitSignal)
39
+ throw err;
40
+ console.error(`❌ dexto deploy list command failed: ${err}`);
41
+ safeExit('deploy list', 1, 'error');
42
+ }
43
+ }));
44
+ deployCommand
45
+ .command('open')
46
+ .description('Open the linked cloud deployment in the dashboard')
47
+ .action(withAnalytics('deploy open', async () => {
48
+ try {
49
+ const { handleDeployOpenCommand } = await import('./index.js');
50
+ await handleDeployOpenCommand();
51
+ safeExit('deploy open', 0);
52
+ }
53
+ catch (err) {
54
+ if (err instanceof ExitSignal)
55
+ throw err;
56
+ console.error(`❌ dexto deploy open command failed: ${err}`);
57
+ safeExit('deploy open', 1, 'error');
58
+ }
59
+ }));
26
60
  deployCommand
27
61
  .command('status')
28
62
  .description('Show the linked cloud deployment for the current workspace')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dexto",
3
- "version": "1.6.13",
3
+ "version": "1.6.14",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "dexto": "./dist/index.js"
@@ -34,16 +34,16 @@
34
34
  "ws": "^8.18.1",
35
35
  "yaml": "^2.7.1",
36
36
  "zod": "^3.25.0",
37
- "@dexto/agent-config": "1.6.13",
38
- "@dexto/agent-management": "1.6.13",
39
- "@dexto/analytics": "1.6.13",
40
- "@dexto/core": "1.6.13",
41
- "@dexto/image-local": "1.6.13",
42
- "@dexto/image-logger-agent": "1.6.13",
43
- "@dexto/registry": "1.6.13",
44
- "@dexto/server": "1.6.13",
45
- "@dexto/storage": "1.6.13",
46
- "@dexto/tui": "1.6.13"
37
+ "@dexto/agent-config": "1.6.14",
38
+ "@dexto/agent-management": "1.6.14",
39
+ "@dexto/analytics": "1.6.14",
40
+ "@dexto/core": "1.6.14",
41
+ "@dexto/image-local": "1.6.14",
42
+ "@dexto/image-logger-agent": "1.6.14",
43
+ "@dexto/registry": "1.6.14",
44
+ "@dexto/server": "1.6.14",
45
+ "@dexto/storage": "1.6.14",
46
+ "@dexto/tui": "1.6.14"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/ws": "^8.5.11",