dexto 1.6.21 → 1.6.24

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.
@@ -118,6 +118,7 @@ permissions:
118
118
  alwaysAllow:
119
119
  - ask_user
120
120
  - read_file # Read files without approval
121
+ - read_media_file # Read files without approval
121
122
  - glob_files # Search for files without approval
122
123
  - grep_content # Search within files without approval
123
124
  - bash_output # Check background process output
@@ -1 +1 @@
1
- {"version":3,"file":"server-hono.d.ts","sourceRoot":"","sources":["../../src/api/server-hono.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAuC,MAAM,aAAa,CAAC;AAY9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EACH,cAAc,EACd,gBAAgB,EAShB,KAAK,kBAAkB,EAC1B,MAAM,eAAe,CAAC;AAmGvB,MAAM,MAAM,wBAAwB,GAAG;IACnC,GAAG,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IACvC,MAAM,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACtD,iBAAiB,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC1F,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,iBAAiB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,gBAA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E,MAAM,EAChB,WAAW,CAAC,EAAE,kBAAkB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CAiYnC;AAED,wBAAsB,kBAAkB,CACpC,KAAK,EAAE,UAAU,EACjB,IAAI,SAAO,EACX,iBAAiB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EACtC,OAAO,CAAC,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,kBAAkB,GACjC,OAAO,CAAC;IACP,MAAM,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACtD,iBAAiB,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;CAC7F,CAAC,CAkCD"}
@@ -3,7 +3,7 @@ import { createAgentCard, logger, AgentError } from '@dexto/core';
3
3
  import { loadAgentConfig, deriveDisplayName, getAgentRegistry, AgentFactory, globalPreferencesExist, loadGlobalPreferences, createDextoAgentFromConfig, } from '@dexto/agent-management';
4
4
  import { applyUserPreferences } from '../config/cli-overrides.js';
5
5
  import { createFileSessionLoggerFactory } from '../utils/session-logger-factory.js';
6
- import { createDextoApp, createNodeServer, createMcpTransport as createServerMcpTransport, createMcpHttpHandlers, initializeMcpServer as initializeServerMcpServer, createManualApprovalHandler, WebhookEventSubscriber, A2ASseEventSubscriber, ApprovalCoordinator, } from '@dexto/server';
6
+ import { createDextoApp, createNodeServer, createMcpTransport as createServerMcpTransport, createMcpHttpHandlers, initializeMcpServer as initializeServerMcpServer, createManualApprovalHandler, WebhookEventSubscriber, A2ASseEventSubscriber, SessionSseEventSubscriber, ApprovalCoordinator, wireApprovalCoordinatorToAgent, } from '@dexto/server';
7
7
  import { registerGracefulShutdown } from '../utils/graceful-shutdown.js';
8
8
  import { applyWorkspaceToAgent } from '../utils/workspace.js';
9
9
  const DEFAULT_AGENT_VERSION = '1.0.0';
@@ -95,7 +95,9 @@ export async function initializeHonoApi(agent, agentCardOverride, listenPort, ag
95
95
  // Create event subscribers and approval coordinator (shared across agent switches)
96
96
  const webhookSubscriber = new WebhookEventSubscriber();
97
97
  const sseSubscriber = new A2ASseEventSubscriber();
98
+ const sessionSseSubscriber = new SessionSseEventSubscriber();
98
99
  const approvalCoordinator = new ApprovalCoordinator();
100
+ let approvalEventBridge = null;
99
101
  /**
100
102
  * Wire services (SSE subscribers) to an agent.
101
103
  * Called for agent switching to re-subscribe to the new agent's event bus.
@@ -103,11 +105,12 @@ export async function initializeHonoApi(agent, agentCardOverride, listenPort, ag
103
105
  */
104
106
  async function wireServicesToAgent(agent) {
105
107
  logger.debug('Wiring services to agent...');
108
+ approvalEventBridge?.abort();
109
+ approvalEventBridge = wireApprovalCoordinatorToAgent(agent, approvalCoordinator);
106
110
  // Register subscribers (DextoAgent handles (re-)subscription on start/restart)
107
111
  agent.registerSubscriber(webhookSubscriber);
108
112
  agent.registerSubscriber(sseSubscriber);
109
- // Note: ApprovalCoordinator doesn't subscribe to agent event bus
110
- // It's a separate coordination channel between handler and server
113
+ agent.registerSubscriber(sessionSseSubscriber);
111
114
  }
112
115
  /**
113
116
  * Helper to resolve agent ID to { id, name } by looking up in registry
@@ -304,6 +307,7 @@ export async function initializeHonoApi(agent, agentCardOverride, listenPort, ag
304
307
  approvalCoordinator,
305
308
  webhookSubscriber,
306
309
  sseSubscriber,
310
+ sessionSseSubscriber,
307
311
  ...(webRoot ? { webRoot } : {}),
308
312
  ...(webUIConfig ? { webUIConfig } : {}),
309
313
  agentsContext: {
@@ -1 +1 @@
1
- {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/helpers/formatters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AAG9E;;GAEG;AACH,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,eAAe,EAC1B,SAAS,GAAE,OAAe,GAC3B,MAAM,CAiCR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA8DpF"}
1
+ {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/helpers/formatters.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AAG9E;;GAEG;AACH,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,eAAe,EAC1B,SAAS,GAAE,OAAe,GAC3B,MAAM,CAiCR;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA+DpF"}
@@ -79,6 +79,8 @@ export function formatHistoryMessage(message, index) {
79
79
  return '[Image]';
80
80
  if (part.type === 'file')
81
81
  return `[File: ${part.filename || 'unknown'}]`;
82
+ if (part.type === 'resource')
83
+ return `[Resource: ${part.name || part.uri}]`;
82
84
  return '[Unknown content]';
83
85
  })
84
86
  .join(' ');
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Check if user can use Dexto provider.
3
3
  * Requires BOTH:
4
- * 1. User is authenticated (valid auth token from dexto login)
4
+ * 1. User has usable Dexto auth state from `dexto login`
5
5
  * 2. Has DEXTO_API_KEY (from auth config or environment)
6
6
  */
7
7
  export declare function canUseDextoProvider(): Promise<boolean>;
@@ -3,7 +3,7 @@ import { getDextoApiKey, isAuthenticated } from '../auth/index.js';
3
3
  /**
4
4
  * Check if user can use Dexto provider.
5
5
  * Requires BOTH:
6
- * 1. User is authenticated (valid auth token from dexto login)
6
+ * 1. User has usable Dexto auth state from `dexto login`
7
7
  * 2. Has DEXTO_API_KEY (from auth config or environment)
8
8
  */
9
9
  export async function canUseDextoProvider() {