@agenticmail/enterprise 0.5.55 → 0.5.57
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/chunk-3HZNYWYB.js +13099 -0
- package/dist/chunk-6XHO7UCC.js +898 -0
- package/dist/chunk-HZKAGQWE.js +898 -0
- package/dist/chunk-JJIW2UKU.js +2115 -0
- package/dist/chunk-ODD3VA4O.js +13099 -0
- package/dist/chunk-RC26Z7PW.js +2115 -0
- package/dist/chunk-ZEEDQFLX.js +9095 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +4 -4
- package/dist/routes-5VEYR4YM.js +6067 -0
- package/dist/routes-U22UQEZH.js +6067 -0
- package/dist/runtime-OTDD5QIO.js +47 -0
- package/dist/runtime-TMBKLW76.js +47 -0
- package/dist/server-IQL4BQI5.js +12 -0
- package/dist/server-WBWZLAWV.js +12 -0
- package/dist/setup-7UAT2PIJ.js +20 -0
- package/dist/setup-AJFRWYMC.js +20 -0
- package/package.json +1 -1
- package/src/engine/community-registry.ts +19 -8
- package/src/engine/community-routes.ts +36 -16
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentRuntime,
|
|
3
|
+
EmailChannel,
|
|
4
|
+
FollowUpScheduler,
|
|
5
|
+
SessionManager,
|
|
6
|
+
SubAgentManager,
|
|
7
|
+
ToolRegistry,
|
|
8
|
+
callLLM,
|
|
9
|
+
createAgentRuntime,
|
|
10
|
+
createNoopHooks,
|
|
11
|
+
createRuntimeHooks,
|
|
12
|
+
estimateMessageTokens,
|
|
13
|
+
estimateTokens,
|
|
14
|
+
executeTool,
|
|
15
|
+
runAgentLoop,
|
|
16
|
+
toolsToDefinitions
|
|
17
|
+
} from "./chunk-ODD3VA4O.js";
|
|
18
|
+
import "./chunk-TYW5XTOW.js";
|
|
19
|
+
import "./chunk-JLSQOQ5L.js";
|
|
20
|
+
import {
|
|
21
|
+
PROVIDER_REGISTRY,
|
|
22
|
+
listAllProviders,
|
|
23
|
+
resolveApiKeyForProvider,
|
|
24
|
+
resolveProvider
|
|
25
|
+
} from "./chunk-67KZYSLU.js";
|
|
26
|
+
import "./chunk-KFQGP6VL.js";
|
|
27
|
+
export {
|
|
28
|
+
AgentRuntime,
|
|
29
|
+
EmailChannel,
|
|
30
|
+
FollowUpScheduler,
|
|
31
|
+
PROVIDER_REGISTRY,
|
|
32
|
+
SessionManager,
|
|
33
|
+
SubAgentManager,
|
|
34
|
+
ToolRegistry,
|
|
35
|
+
callLLM,
|
|
36
|
+
createAgentRuntime,
|
|
37
|
+
createNoopHooks,
|
|
38
|
+
createRuntimeHooks,
|
|
39
|
+
estimateMessageTokens,
|
|
40
|
+
estimateTokens,
|
|
41
|
+
executeTool,
|
|
42
|
+
listAllProviders,
|
|
43
|
+
resolveApiKeyForProvider,
|
|
44
|
+
resolveProvider,
|
|
45
|
+
runAgentLoop,
|
|
46
|
+
toolsToDefinitions
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AgentRuntime,
|
|
3
|
+
EmailChannel,
|
|
4
|
+
FollowUpScheduler,
|
|
5
|
+
SessionManager,
|
|
6
|
+
SubAgentManager,
|
|
7
|
+
ToolRegistry,
|
|
8
|
+
callLLM,
|
|
9
|
+
createAgentRuntime,
|
|
10
|
+
createNoopHooks,
|
|
11
|
+
createRuntimeHooks,
|
|
12
|
+
estimateMessageTokens,
|
|
13
|
+
estimateTokens,
|
|
14
|
+
executeTool,
|
|
15
|
+
runAgentLoop,
|
|
16
|
+
toolsToDefinitions
|
|
17
|
+
} from "./chunk-3HZNYWYB.js";
|
|
18
|
+
import "./chunk-TYW5XTOW.js";
|
|
19
|
+
import "./chunk-JLSQOQ5L.js";
|
|
20
|
+
import {
|
|
21
|
+
PROVIDER_REGISTRY,
|
|
22
|
+
listAllProviders,
|
|
23
|
+
resolveApiKeyForProvider,
|
|
24
|
+
resolveProvider
|
|
25
|
+
} from "./chunk-67KZYSLU.js";
|
|
26
|
+
import "./chunk-KFQGP6VL.js";
|
|
27
|
+
export {
|
|
28
|
+
AgentRuntime,
|
|
29
|
+
EmailChannel,
|
|
30
|
+
FollowUpScheduler,
|
|
31
|
+
PROVIDER_REGISTRY,
|
|
32
|
+
SessionManager,
|
|
33
|
+
SubAgentManager,
|
|
34
|
+
ToolRegistry,
|
|
35
|
+
callLLM,
|
|
36
|
+
createAgentRuntime,
|
|
37
|
+
createNoopHooks,
|
|
38
|
+
createRuntimeHooks,
|
|
39
|
+
estimateMessageTokens,
|
|
40
|
+
estimateTokens,
|
|
41
|
+
executeTool,
|
|
42
|
+
listAllProviders,
|
|
43
|
+
resolveApiKeyForProvider,
|
|
44
|
+
resolveProvider,
|
|
45
|
+
runAgentLoop,
|
|
46
|
+
toolsToDefinitions
|
|
47
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-JJIW2UKU.js";
|
|
4
|
+
import "./chunk-3SMTCIR4.js";
|
|
5
|
+
import "./chunk-JLSQOQ5L.js";
|
|
6
|
+
import "./chunk-RO537U6H.js";
|
|
7
|
+
import "./chunk-DRXMYYKN.js";
|
|
8
|
+
import "./chunk-67KZYSLU.js";
|
|
9
|
+
import "./chunk-KFQGP6VL.js";
|
|
10
|
+
export {
|
|
11
|
+
createServer
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-RC26Z7PW.js";
|
|
4
|
+
import "./chunk-3SMTCIR4.js";
|
|
5
|
+
import "./chunk-JLSQOQ5L.js";
|
|
6
|
+
import "./chunk-RO537U6H.js";
|
|
7
|
+
import "./chunk-DRXMYYKN.js";
|
|
8
|
+
import "./chunk-67KZYSLU.js";
|
|
9
|
+
import "./chunk-KFQGP6VL.js";
|
|
10
|
+
export {
|
|
11
|
+
createServer
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-6XHO7UCC.js";
|
|
10
|
+
import "./chunk-M4PRT53C.js";
|
|
11
|
+
import "./chunk-KFQGP6VL.js";
|
|
12
|
+
export {
|
|
13
|
+
promptCompanyInfo,
|
|
14
|
+
promptDatabase,
|
|
15
|
+
promptDeployment,
|
|
16
|
+
promptDomain,
|
|
17
|
+
promptRegistration,
|
|
18
|
+
provision,
|
|
19
|
+
runSetupWizard
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
promptCompanyInfo,
|
|
3
|
+
promptDatabase,
|
|
4
|
+
promptDeployment,
|
|
5
|
+
promptDomain,
|
|
6
|
+
promptRegistration,
|
|
7
|
+
provision,
|
|
8
|
+
runSetupWizard
|
|
9
|
+
} from "./chunk-HZKAGQWE.js";
|
|
10
|
+
import "./chunk-M4PRT53C.js";
|
|
11
|
+
import "./chunk-KFQGP6VL.js";
|
|
12
|
+
export {
|
|
13
|
+
promptCompanyInfo,
|
|
14
|
+
promptDatabase,
|
|
15
|
+
promptDeployment,
|
|
16
|
+
promptDomain,
|
|
17
|
+
promptRegistration,
|
|
18
|
+
provision,
|
|
19
|
+
runSetupWizard
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -210,6 +210,21 @@ export class CommunitySkillRegistry {
|
|
|
210
210
|
return inst;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
/** Resolve installed skill from memory cache, falling back to DB */
|
|
214
|
+
private async resolveInstalled(orgId: string, skillId: string): Promise<InstalledCommunitySkill | null> {
|
|
215
|
+
const id = `${orgId}:${skillId}`;
|
|
216
|
+
let inst = this.installed.get(id) || null;
|
|
217
|
+
if (!inst && this.engineDb) {
|
|
218
|
+
const rows = await this.engineDb.getInstalledSkillsByOrg(orgId);
|
|
219
|
+
const found = rows.find((r: any) => r.skillId === skillId || r.skill_id === skillId);
|
|
220
|
+
if (found) {
|
|
221
|
+
inst = found;
|
|
222
|
+
this.installed.set(id, inst!);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return inst;
|
|
226
|
+
}
|
|
227
|
+
|
|
213
228
|
async uninstall(orgId: string, skillId: string): Promise<void> {
|
|
214
229
|
const id = `${orgId}:${skillId}`;
|
|
215
230
|
this.installed.delete(id);
|
|
@@ -217,8 +232,7 @@ export class CommunitySkillRegistry {
|
|
|
217
232
|
}
|
|
218
233
|
|
|
219
234
|
async enable(orgId: string, skillId: string): Promise<void> {
|
|
220
|
-
const
|
|
221
|
-
const inst = this.installed.get(id);
|
|
235
|
+
const inst = await this.resolveInstalled(orgId, skillId);
|
|
222
236
|
if (!inst) throw new Error('Skill not installed');
|
|
223
237
|
inst.enabled = true;
|
|
224
238
|
inst.updatedAt = new Date().toISOString();
|
|
@@ -229,8 +243,7 @@ export class CommunitySkillRegistry {
|
|
|
229
243
|
}
|
|
230
244
|
|
|
231
245
|
async disable(orgId: string, skillId: string): Promise<void> {
|
|
232
|
-
const
|
|
233
|
-
const inst = this.installed.get(id);
|
|
246
|
+
const inst = await this.resolveInstalled(orgId, skillId);
|
|
234
247
|
if (!inst) throw new Error('Skill not installed');
|
|
235
248
|
inst.enabled = false;
|
|
236
249
|
inst.updatedAt = new Date().toISOString();
|
|
@@ -238,8 +251,7 @@ export class CommunitySkillRegistry {
|
|
|
238
251
|
}
|
|
239
252
|
|
|
240
253
|
async updateConfig(orgId: string, skillId: string, config: Record<string, any>): Promise<void> {
|
|
241
|
-
const
|
|
242
|
-
const inst = this.installed.get(id);
|
|
254
|
+
const inst = await this.resolveInstalled(orgId, skillId);
|
|
243
255
|
if (!inst) throw new Error('Skill not installed');
|
|
244
256
|
inst.config = { ...inst.config, ...config };
|
|
245
257
|
inst.updatedAt = new Date().toISOString();
|
|
@@ -247,8 +259,7 @@ export class CommunitySkillRegistry {
|
|
|
247
259
|
}
|
|
248
260
|
|
|
249
261
|
async upgrade(orgId: string, skillId: string): Promise<InstalledCommunitySkill> {
|
|
250
|
-
const
|
|
251
|
-
const inst = this.installed.get(id);
|
|
262
|
+
const inst = await this.resolveInstalled(orgId, skillId);
|
|
252
263
|
if (!inst) throw new Error('Skill not installed');
|
|
253
264
|
|
|
254
265
|
const skill = this.index.get(skillId);
|
|
@@ -100,34 +100,54 @@ export function createCommunityRoutes(registry: CommunitySkillRegistry) {
|
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
router.delete('/skills/:id/uninstall', async (c) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
try {
|
|
104
|
+
const orgId = c.req.query('orgId') || 'default';
|
|
105
|
+
await registry.uninstall(orgId, c.req.param('id'));
|
|
106
|
+
return c.json({ ok: true });
|
|
107
|
+
} catch (e: any) {
|
|
108
|
+
return c.json({ error: e?.message || 'Uninstall failed' }, 404);
|
|
109
|
+
}
|
|
106
110
|
});
|
|
107
111
|
|
|
108
112
|
router.put('/skills/:id/enable', async (c) => {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
113
|
+
try {
|
|
114
|
+
const { orgId } = await c.req.json().catch(() => ({ orgId: 'default' }));
|
|
115
|
+
await registry.enable(orgId || 'default', c.req.param('id'));
|
|
116
|
+
return c.json({ ok: true });
|
|
117
|
+
} catch (e: any) {
|
|
118
|
+
return c.json({ error: e?.message || 'Enable failed' }, 404);
|
|
119
|
+
}
|
|
112
120
|
});
|
|
113
121
|
|
|
114
122
|
router.put('/skills/:id/disable', async (c) => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
123
|
+
try {
|
|
124
|
+
const { orgId } = await c.req.json().catch(() => ({ orgId: 'default' }));
|
|
125
|
+
await registry.disable(orgId || 'default', c.req.param('id'));
|
|
126
|
+
return c.json({ ok: true });
|
|
127
|
+
} catch (e: any) {
|
|
128
|
+
return c.json({ error: e?.message || 'Disable failed' }, 404);
|
|
129
|
+
}
|
|
118
130
|
});
|
|
119
131
|
|
|
120
132
|
router.put('/skills/:id/config', async (c) => {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
133
|
+
try {
|
|
134
|
+
const { orgId, config } = await c.req.json();
|
|
135
|
+
if (!config) return c.json({ error: 'config required' }, 400);
|
|
136
|
+
await registry.updateConfig(orgId || 'default', c.req.param('id'), config);
|
|
137
|
+
return c.json({ ok: true });
|
|
138
|
+
} catch (e: any) {
|
|
139
|
+
return c.json({ error: e?.message || 'Config update failed' }, 404);
|
|
140
|
+
}
|
|
125
141
|
});
|
|
126
142
|
|
|
127
143
|
router.post('/skills/:id/upgrade', async (c) => {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
144
|
+
try {
|
|
145
|
+
const { orgId } = await c.req.json().catch(() => ({ orgId: 'default' }));
|
|
146
|
+
const installed = await registry.upgrade(orgId || 'default', c.req.param('id'));
|
|
147
|
+
return c.json({ installed });
|
|
148
|
+
} catch (e: any) {
|
|
149
|
+
return c.json({ error: e?.message || 'Upgrade failed' }, 404);
|
|
150
|
+
}
|
|
131
151
|
});
|
|
132
152
|
|
|
133
153
|
// ─── Admin / Publishing ──────────────────────────────
|