dexto 1.6.8 → 1.6.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/README.md +4 -4
- package/dist/analytics/wrapper.d.ts.map +1 -1
- package/dist/analytics/wrapper.js +43 -9
- package/dist/cli/auth/api-client.d.ts +50 -0
- package/dist/cli/auth/api-client.d.ts.map +1 -1
- package/dist/cli/auth/api-client.js +379 -15
- package/dist/cli/auth/browser-launch.d.ts +6 -0
- package/dist/cli/auth/browser-launch.d.ts.map +1 -0
- package/dist/cli/auth/browser-launch.js +24 -0
- package/dist/cli/auth/device.d.ts +14 -0
- package/dist/cli/auth/device.d.ts.map +1 -0
- package/dist/cli/auth/device.js +93 -0
- package/dist/cli/auth/index.d.ts +3 -1
- package/dist/cli/auth/index.d.ts.map +1 -1
- package/dist/cli/auth/index.js +2 -1
- package/dist/cli/auth/login-persistence.d.ts +13 -0
- package/dist/cli/auth/login-persistence.d.ts.map +1 -0
- package/dist/cli/auth/login-persistence.js +22 -0
- package/dist/cli/auth/oauth.d.ts +4 -1
- package/dist/cli/auth/oauth.d.ts.map +1 -1
- package/dist/cli/auth/oauth.js +6 -2
- package/dist/cli/auth/types.d.ts +12 -0
- package/dist/cli/auth/types.d.ts.map +1 -0
- package/dist/cli/auth/types.js +1 -0
- package/dist/cli/commands/agents/register.d.ts +6 -0
- package/dist/cli/commands/agents/register.d.ts.map +1 -0
- package/dist/cli/commands/agents/register.js +85 -0
- package/dist/cli/commands/auth/index.d.ts +1 -1
- package/dist/cli/commands/auth/index.d.ts.map +1 -1
- package/dist/cli/commands/auth/index.js +1 -1
- package/dist/cli/commands/auth/login.d.ts +6 -6
- package/dist/cli/commands/auth/login.d.ts.map +1 -1
- package/dist/cli/commands/auth/login.js +85 -115
- package/dist/cli/commands/auth/logout.d.ts.map +1 -1
- package/dist/cli/commands/auth/logout.js +32 -2
- package/dist/cli/commands/auth/register.d.ts +3 -0
- package/dist/cli/commands/auth/register.d.ts.map +1 -0
- package/dist/cli/commands/auth/register.js +94 -0
- package/dist/cli/commands/billing/register.d.ts +3 -0
- package/dist/cli/commands/billing/register.d.ts.map +1 -0
- package/dist/cli/commands/billing/register.js +20 -0
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +9 -0
- package/dist/cli/commands/image/register.d.ts +6 -0
- package/dist/cli/commands/image/register.d.ts.map +1 -0
- package/dist/cli/commands/image/register.js +144 -0
- package/dist/cli/commands/install.d.ts +2 -2
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +3 -3
- package/dist/cli/commands/mcp/register.d.ts +6 -0
- package/dist/cli/commands/mcp/register.d.ts.map +1 -0
- package/dist/cli/commands/mcp/register.js +64 -0
- package/dist/cli/commands/plugin/register.d.ts +6 -0
- package/dist/cli/commands/plugin/register.d.ts.map +1 -0
- package/dist/cli/commands/plugin/register.js +183 -0
- package/dist/cli/commands/plugin.d.ts +4 -4
- package/dist/cli/commands/register-context.d.ts +12 -0
- package/dist/cli/commands/register-context.d.ts.map +1 -0
- package/dist/cli/commands/register-context.js +1 -0
- package/dist/cli/commands/run/headless.d.ts +20 -0
- package/dist/cli/commands/run/headless.d.ts.map +1 -0
- package/dist/cli/commands/run/headless.js +275 -0
- package/dist/cli/commands/run/register.d.ts +3 -0
- package/dist/cli/commands/run/register.d.ts.map +1 -0
- package/dist/cli/commands/run/register.js +78 -0
- package/dist/cli/commands/search/register.d.ts +3 -0
- package/dist/cli/commands/search/register.d.ts.map +1 -0
- package/dist/cli/commands/search/register.js +55 -0
- package/dist/cli/commands/session/register.d.ts +3 -0
- package/dist/cli/commands/session/register.d.ts.map +1 -0
- package/dist/cli/commands/session/register.js +75 -0
- package/dist/cli/commands/setup.js +4 -4
- package/dist/cli/commands/sync-agents.d.ts +3 -3
- package/dist/cli/commands/sync-agents.d.ts.map +1 -1
- package/dist/cli/commands/sync-agents.js +16 -7
- package/dist/cli/commands/uninstall.d.ts +2 -2
- package/dist/cli/modes/cli.d.ts +3 -0
- package/dist/cli/modes/cli.d.ts.map +1 -0
- package/dist/cli/modes/cli.js +170 -0
- package/dist/cli/modes/context.d.ts +20 -0
- package/dist/cli/modes/context.d.ts.map +1 -0
- package/dist/cli/modes/context.js +1 -0
- package/dist/cli/modes/dispatch.d.ts +3 -0
- package/dist/cli/modes/dispatch.d.ts.map +1 -0
- package/dist/cli/modes/dispatch.js +52 -0
- package/dist/cli/modes/mcp.d.ts +3 -0
- package/dist/cli/modes/mcp.d.ts.map +1 -0
- package/dist/cli/modes/mcp.js +23 -0
- package/dist/cli/modes/server.d.ts +3 -0
- package/dist/cli/modes/server.d.ts.map +1 -0
- package/dist/cli/modes/server.js +36 -0
- package/dist/cli/modes/web.d.ts +3 -0
- package/dist/cli/modes/web.d.ts.map +1 -0
- package/dist/cli/modes/web.js +50 -0
- package/dist/cli/utils/setup-utils.js +1 -1
- package/dist/index-main.js +150 -991
- package/dist/utils/port-utils.d.ts +1 -1
- package/dist/utils/port-utils.d.ts.map +1 -1
- package/dist/utils/port-utils.js +7 -3
- package/dist/webui/assets/index-Bn9YuTdA.css +1 -0
- package/dist/webui/assets/index-CNiOYnOb.js +2059 -0
- package/dist/webui/index.html +2 -2
- package/package.json +12 -12
- package/dist/webui/assets/index-d6c-yJNn.js +0 -2059
- package/dist/webui/assets/index-yKdFLN1k.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/modes/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,wBAAsB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA0C3E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getPort } from '../../utils/port-utils.js';
|
|
2
|
+
export async function runServerMode(context) {
|
|
3
|
+
const { agent, opts, derivedAgentId, resolvedPath, getVersionCheckResult } = context;
|
|
4
|
+
const { startHonoApiServer } = await import('../../api/server-hono.js');
|
|
5
|
+
const agentCard = agent.config.agentCard ?? {};
|
|
6
|
+
const defaultPort = (() => {
|
|
7
|
+
if (!opts.port) {
|
|
8
|
+
return 3001;
|
|
9
|
+
}
|
|
10
|
+
const rawPort = opts.port.trim();
|
|
11
|
+
const parsedPort = Number(rawPort);
|
|
12
|
+
if (!/^\d+$/.test(rawPort) ||
|
|
13
|
+
!Number.isInteger(parsedPort) ||
|
|
14
|
+
parsedPort <= 0 ||
|
|
15
|
+
parsedPort > 65535) {
|
|
16
|
+
throw new Error(`Invalid --port value "${opts.port}". Use a port between 1 and 65535.`);
|
|
17
|
+
}
|
|
18
|
+
return parsedPort;
|
|
19
|
+
})();
|
|
20
|
+
const apiPort = getPort(process.env.PORT, defaultPort, 'PORT');
|
|
21
|
+
const apiUrl = process.env.DEXTO_URL ?? `http://localhost:${apiPort}`;
|
|
22
|
+
console.log('🌐 Starting server (REST APIs + SSE)...');
|
|
23
|
+
await startHonoApiServer(agent, apiPort, agentCard, derivedAgentId, resolvedPath);
|
|
24
|
+
console.log(`✅ Server running at ${apiUrl}`);
|
|
25
|
+
console.log('Available endpoints:');
|
|
26
|
+
console.log(' POST /api/message - Send async message');
|
|
27
|
+
console.log(' POST /api/message-sync - Send sync message');
|
|
28
|
+
console.log(' POST /api/reset - Reset conversation');
|
|
29
|
+
console.log(' GET /api/mcp/servers - List MCP servers');
|
|
30
|
+
console.log(' SSE support available for real-time events');
|
|
31
|
+
const serverUpdateInfo = await getVersionCheckResult();
|
|
32
|
+
if (serverUpdateInfo) {
|
|
33
|
+
const { displayUpdateNotification } = await import('../utils/version-check.js');
|
|
34
|
+
displayUpdateNotification(serverUpdateInfo);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../../src/cli/modes/web.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,wBAAsB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmExE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { getPort } from '../../utils/port-utils.js';
|
|
3
|
+
export async function runWebMode(context) {
|
|
4
|
+
const { agent, opts, derivedAgentId, resolvedPath, getVersionCheckResult } = context;
|
|
5
|
+
const [{ resolveWebRoot }, { startHonoApiServer }, { getWebUIAnalyticsConfig }] = await Promise.all([
|
|
6
|
+
import('../../web.js'),
|
|
7
|
+
import('../../api/server-hono.js'),
|
|
8
|
+
import('../../analytics/index.js'),
|
|
9
|
+
]);
|
|
10
|
+
const defaultPort = (() => {
|
|
11
|
+
if (!opts.port) {
|
|
12
|
+
return 3000;
|
|
13
|
+
}
|
|
14
|
+
const rawPort = opts.port.trim();
|
|
15
|
+
const parsedPort = Number(rawPort);
|
|
16
|
+
if (!/^\d+$/.test(rawPort) ||
|
|
17
|
+
!Number.isInteger(parsedPort) ||
|
|
18
|
+
parsedPort <= 0 ||
|
|
19
|
+
parsedPort > 65535) {
|
|
20
|
+
throw new Error(`Invalid --port value "${opts.port}". Use a port between 1 and 65535.`);
|
|
21
|
+
}
|
|
22
|
+
return parsedPort;
|
|
23
|
+
})();
|
|
24
|
+
const port = getPort(process.env.PORT, defaultPort, 'PORT');
|
|
25
|
+
const serverUrl = process.env.DEXTO_URL ?? `http://localhost:${port}`;
|
|
26
|
+
const webRoot = resolveWebRoot();
|
|
27
|
+
if (!webRoot) {
|
|
28
|
+
console.warn(chalk.yellow('⚠️ WebUI not found in this build.'));
|
|
29
|
+
console.info('For production: Run "pnpm build:all" to embed the WebUI');
|
|
30
|
+
console.info('For development: Run "pnpm dev" for hot reload');
|
|
31
|
+
}
|
|
32
|
+
const webUIConfig = webRoot ? { analytics: await getWebUIAnalyticsConfig() } : undefined;
|
|
33
|
+
await startHonoApiServer(agent, port, agent.config.agentCard || {}, derivedAgentId, resolvedPath, webRoot, webUIConfig);
|
|
34
|
+
console.log(chalk.green(`✅ Server running at ${serverUrl}`));
|
|
35
|
+
const webUpdateInfo = await getVersionCheckResult();
|
|
36
|
+
if (webUpdateInfo) {
|
|
37
|
+
const { displayUpdateNotification } = await import('../utils/version-check.js');
|
|
38
|
+
displayUpdateNotification(webUpdateInfo);
|
|
39
|
+
}
|
|
40
|
+
if (webRoot) {
|
|
41
|
+
try {
|
|
42
|
+
const { default: open } = await import('open');
|
|
43
|
+
await open(serverUrl, { wait: false });
|
|
44
|
+
console.log(chalk.green(`🌐 Opened WebUI in browser: ${serverUrl}`));
|
|
45
|
+
}
|
|
46
|
+
catch (_error) {
|
|
47
|
+
console.log(chalk.yellow(`💡 WebUI is available at: ${serverUrl}`));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -113,7 +113,7 @@ export async function getSetupGuidanceMessage() {
|
|
|
113
113
|
' • Set up your API keys',
|
|
114
114
|
' • Configure your default agent',
|
|
115
115
|
'',
|
|
116
|
-
'💡 After setup, you can install agents with: `dexto install <agent-name>`',
|
|
116
|
+
'💡 After setup, you can install agents with: `dexto agents install <agent-name>`',
|
|
117
117
|
].join('\n');
|
|
118
118
|
}
|
|
119
119
|
// Invalid, incomplete, or corrupted preferences
|