@agenticmail/enterprise 0.5.206 → 0.5.208
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/dist/agent-heartbeat-2D43IBNA.js +510 -0
- package/dist/agent-heartbeat-AYOPPYNS.js +510 -0
- package/dist/agent-heartbeat-BLFZHGVH.js +510 -0
- package/dist/agent-heartbeat-FITCBARW.js +510 -0
- package/dist/chunk-2DJEQCRU.js +4457 -0
- package/dist/chunk-6PIWF5AC.js +1224 -0
- package/dist/chunk-73H2CQN2.js +3685 -0
- package/dist/chunk-APRK35OM.js +3685 -0
- package/dist/chunk-BTT3P4XP.js +3685 -0
- package/dist/chunk-C6FRGFDA.js +4494 -0
- package/dist/chunk-D7SBTNBI.js +1224 -0
- package/dist/chunk-FEEHLIWF.js +1224 -0
- package/dist/chunk-JBLDCQSK.js +4457 -0
- package/dist/chunk-L72IFQCJ.js +1224 -0
- package/dist/chunk-LIHFQM2M.js +3685 -0
- package/dist/chunk-QVKIYQ5F.js +4494 -0
- package/dist/chunk-RTW7WNXZ.js +3685 -0
- package/dist/chunk-VBLS4HXF.js +4494 -0
- package/dist/chunk-W5MVEM4M.js +3685 -0
- package/dist/chunk-WZ4F4SYK.js +292 -0
- package/dist/chunk-YDRP5PXX.js +1224 -0
- package/dist/chunk-ZJZ5N4SD.js +4494 -0
- package/dist/chunk-ZKSOJILT.js +1224 -0
- package/dist/cli-agent-ILMIH4Z4.js +1602 -0
- package/dist/cli-agent-KMHJ3FAP.js +1602 -0
- package/dist/cli-agent-MRGC2WFN.js +1602 -0
- package/dist/cli-agent-ND6P7N2G.js +1719 -0
- package/dist/cli-agent-OTZ6INTM.js +1602 -0
- package/dist/cli-agent-OXSEQWTQ.js +1602 -0
- package/dist/cli-serve-3M2FUSYX.js +114 -0
- package/dist/cli-serve-A4DRJBGH.js +114 -0
- package/dist/cli-serve-ASW2VFVZ.js +114 -0
- package/dist/cli-serve-K27BP4J4.js +114 -0
- package/dist/cli-serve-MJSIZKOG.js +114 -0
- package/dist/cli-serve-V7JBBESA.js +114 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +3 -3
- package/dist/routes-AAXSMKBT.js +13032 -0
- package/dist/routes-EZVM3AQW.js +13281 -0
- package/dist/routes-I7Z57PKK.js +13283 -0
- package/dist/routes-RGYOWZA6.js +13282 -0
- package/dist/runtime-CMOHWZTC.js +45 -0
- package/dist/runtime-DIE72WMW.js +45 -0
- package/dist/runtime-DVDGBQKF.js +45 -0
- package/dist/runtime-HWQ5ZXD3.js +45 -0
- package/dist/runtime-LRKG2KTN.js +45 -0
- package/dist/runtime-ND55ZF2I.js +45 -0
- package/dist/server-6L3RFC42.js +15 -0
- package/dist/server-7P67XIXT.js +15 -0
- package/dist/server-AB6BBV2H.js +15 -0
- package/dist/server-CCNNMVJJ.js +15 -0
- package/dist/server-D2ZZ44LL.js +15 -0
- package/dist/server-UC23ZQIO.js +15 -0
- package/dist/setup-6UB3FST3.js +20 -0
- package/dist/setup-BW5BWSG2.js +20 -0
- package/dist/setup-BWGC6WK7.js +20 -0
- package/dist/setup-KXN6MGWO.js +20 -0
- package/dist/setup-SZK7GYJE.js +20 -0
- package/dist/setup-X6CIHPCV.js +20 -0
- package/package.json +1 -1
- package/src/cli-agent.ts +43 -0
- package/src/engine/agent-routes.ts +32 -2
- package/src/engine/chat-poller.ts +1 -1
- package/src/engine/messaging-poller.ts +17 -1
- package/src/engine/routes.ts +2 -1
- package/src/runtime/gateway.ts +0 -45
package/src/engine/routes.ts
CHANGED
|
@@ -684,10 +684,11 @@ let _messagingPoller: MessagingPoller | null = null;
|
|
|
684
684
|
|
|
685
685
|
async function startMessagingPoller(engineDb: any): Promise<void> {
|
|
686
686
|
const allAgents = lifecycle.getAllAgents();
|
|
687
|
-
const agents = allAgents.filter(a => a.state === 'running' || (a as any).status === 'active').map(a => {
|
|
687
|
+
const agents = allAgents.filter(a => a.state === 'running' || a.state === 'draft' || a.state === 'stopped' || (a as any).status === 'active').map(a => {
|
|
688
688
|
const dep = a.config?.deployment;
|
|
689
689
|
const port = dep?.port || dep?.config?.local?.port || 3100;
|
|
690
690
|
const host = dep?.host || dep?.config?.local?.host || 'localhost';
|
|
691
|
+
// Debug removed — dynamic resolution in messaging-poller.resolveEndpoint()
|
|
691
692
|
return {
|
|
692
693
|
id: a.id, name: a.name || '', displayName: (a.config as any)?.displayName || a.name || a.id,
|
|
693
694
|
status: 'active' as const, port, host,
|
package/src/runtime/gateway.ts
CHANGED
|
@@ -245,51 +245,6 @@ export function createRuntimeGateway(config: GatewayConfig): Hono {
|
|
|
245
245
|
|
|
246
246
|
// ─── Inbound Email Hook ──────────────────────────
|
|
247
247
|
|
|
248
|
-
// ─── Chat dispatch (from enterprise messaging/chat pollers) ──
|
|
249
|
-
app.post('/chat', async function(c) {
|
|
250
|
-
try {
|
|
251
|
-
var body = await c.req.json();
|
|
252
|
-
// Find or create a session for this chat context
|
|
253
|
-
var source = body.source || body.spaceName || 'unknown';
|
|
254
|
-
var spaceId = body.spaceId || body.chatId || 'default';
|
|
255
|
-
var sessionTag = source + ':' + spaceId;
|
|
256
|
-
|
|
257
|
-
// Look for existing session with this tag
|
|
258
|
-
var sessions = await runtime.listSessions();
|
|
259
|
-
var existing = sessions.find(function(s: any) { return s.tag === sessionTag && s.status === 'active'; });
|
|
260
|
-
var session: any;
|
|
261
|
-
|
|
262
|
-
if (existing) {
|
|
263
|
-
session = existing;
|
|
264
|
-
} else {
|
|
265
|
-
// Create new session
|
|
266
|
-
session = await runtime.createSession({
|
|
267
|
-
tag: sessionTag,
|
|
268
|
-
metadata: { source: source, spaceId: spaceId, senderName: body.senderName, isDM: body.isDM },
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
// Send message to the session
|
|
273
|
-
await runtime.sendMessage(session.id, body.messageText || body.message || '', {
|
|
274
|
-
senderName: body.senderName,
|
|
275
|
-
senderEmail: body.senderEmail,
|
|
276
|
-
source: source,
|
|
277
|
-
isDM: body.isDM,
|
|
278
|
-
isManager: body.isManager,
|
|
279
|
-
priority: body.priority,
|
|
280
|
-
messageId: body.messageId,
|
|
281
|
-
isCustomer: body.isCustomer,
|
|
282
|
-
customerSystemPrompt: body.customerSystemPrompt,
|
|
283
|
-
restrictTools: body.restrictTools,
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
return c.json({ ok: true, sessionId: session.id });
|
|
287
|
-
} catch (err: any) {
|
|
288
|
-
console.error('[runtime] /chat error:', err.message);
|
|
289
|
-
return c.json({ error: err.message }, 500);
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
|
|
293
248
|
app.post('/hooks/inbound', async function(c) {
|
|
294
249
|
try {
|
|
295
250
|
var body = await c.req.json();
|