@backendkit-labs/agent-enterprise 0.3.0 → 0.3.2

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.
Files changed (51) hide show
  1. package/README.md +446 -111
  2. package/dist/factory.d.ts +47 -0
  3. package/dist/factory.d.ts.map +1 -0
  4. package/dist/factory.js +146 -0
  5. package/dist/factory.js.map +1 -0
  6. package/dist/index.d.ts +3 -0
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +15 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/profiles/constants.d.ts +22 -0
  11. package/dist/profiles/constants.d.ts.map +1 -0
  12. package/dist/profiles/constants.js +25 -0
  13. package/dist/profiles/constants.js.map +1 -0
  14. package/dist/profiles/finance.d.ts +3 -0
  15. package/dist/profiles/finance.d.ts.map +1 -0
  16. package/dist/profiles/finance.js +34 -0
  17. package/dist/profiles/finance.js.map +1 -0
  18. package/dist/profiles/general.d.ts +3 -0
  19. package/dist/profiles/general.d.ts.map +1 -0
  20. package/dist/profiles/general.js +32 -0
  21. package/dist/profiles/general.js.map +1 -0
  22. package/dist/profiles/hr.d.ts +3 -0
  23. package/dist/profiles/hr.d.ts.map +1 -0
  24. package/dist/profiles/hr.js +34 -0
  25. package/dist/profiles/hr.js.map +1 -0
  26. package/dist/profiles/index.d.ts +10 -0
  27. package/dist/profiles/index.d.ts.map +1 -0
  28. package/dist/profiles/index.js +33 -0
  29. package/dist/profiles/index.js.map +1 -0
  30. package/dist/profiles/ops.d.ts +3 -0
  31. package/dist/profiles/ops.d.ts.map +1 -0
  32. package/dist/profiles/ops.js +33 -0
  33. package/dist/profiles/ops.js.map +1 -0
  34. package/dist/profiles/sales.d.ts +3 -0
  35. package/dist/profiles/sales.d.ts.map +1 -0
  36. package/dist/profiles/sales.js +30 -0
  37. package/dist/profiles/sales.js.map +1 -0
  38. package/dist/profiles/support.d.ts +3 -0
  39. package/dist/profiles/support.d.ts.map +1 -0
  40. package/dist/profiles/support.js +28 -0
  41. package/dist/profiles/support.js.map +1 -0
  42. package/dist/rag/ObsidianRAGProvider.js +4 -4
  43. package/dist/rag/ObsidianRAGProvider.js.map +1 -1
  44. package/dist/rag/VaultIndexer.d.ts.map +1 -1
  45. package/dist/rag/VaultIndexer.js +4 -1
  46. package/dist/rag/VaultIndexer.js.map +1 -1
  47. package/dist/rag/VaultWriter.d.ts +1 -0
  48. package/dist/rag/VaultWriter.d.ts.map +1 -1
  49. package/dist/rag/VaultWriter.js +8 -3
  50. package/dist/rag/VaultWriter.js.map +1 -1
  51. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ import { AgentEngine, ProviderRegistry } from '@backendkit-labs/agent-core';
2
+ import type { Transport, AgentProfile } from '@backendkit-labs/agent-core';
3
+ import type { Embedder } from './rag/ObsidianRAGProvider';
4
+ export interface EnterpriseSetupOptions {
5
+ /** Absolute path to the shared Obsidian vault. */
6
+ vaultPath: string;
7
+ /** Directory where RAG index files are stored. Default: ~/.bk-agent/rag/enterprise/ */
8
+ indexDir?: string;
9
+ /** Embedder to use. Default: SimpleEmbedder (no Ollama required). */
10
+ embedder?: Embedder;
11
+ /** Pre-configured ProviderRegistry with at least one LLM provider. */
12
+ providers: ProviderRegistry;
13
+ /** Default provider ID to use when no per-agent override is set. */
14
+ defaultProvider: string;
15
+ /** Directory for per-session memory files. Default: ~/.bk-agent/sessions/ */
16
+ sessionsDir?: string;
17
+ /** Additional AgentProfiles to register alongside the 6 enterprise defaults. */
18
+ extraProfiles?: AgentProfile[];
19
+ /** Max iterations per engine run. Default: 20. */
20
+ maxIterations?: number;
21
+ }
22
+ export interface EnterpriseSetup {
23
+ /** Call once at startup to index all vault folders. */
24
+ indexAll(opts?: {
25
+ verbose?: boolean;
26
+ }): Promise<void>;
27
+ /** EngineFactory compatible with AgentServer from @backendkit-labs/agent-web. */
28
+ engineFactory: (sessionId: string, transport: Transport) => AgentEngine;
29
+ }
30
+ /**
31
+ * Creates a fully-wired enterprise setup with:
32
+ * - One RAG instance per department (scoped to its vault folders)
33
+ * - One global RAG for the General agent
34
+ * - VaultWriter shared across all agents
35
+ * - EngineFactory that creates a new AgentEngine per WebSocket session
36
+ *
37
+ * Usage:
38
+ * ```ts
39
+ * const enterprise = createEnterpriseSetup({ vaultPath, providers, defaultProvider });
40
+ * await enterprise.indexAll();
41
+ *
42
+ * const server = new AgentServer({ port: 3000, engineFactory: enterprise.engineFactory, cors: '*' });
43
+ * await server.start();
44
+ * ```
45
+ */
46
+ export declare function createEnterpriseSetup(opts: EnterpriseSetupOptions): EnterpriseSetup;
47
+ //# sourceMappingURL=factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,WAAW,EAGX,gBAAgB,EAInB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAW1D,MAAM,WAAW,sBAAsB;IACnC,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,sEAAsE;IACtE,SAAS,EAAE,gBAAgB,CAAC;IAC5B,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,eAAe;IAC5B,uDAAuD;IACvD,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD,iFAAiF;IACjF,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,KAAK,WAAW,CAAC;CAC3E;AAcD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,sBAAsB,GAAG,eAAe,CA+FnF"}
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.createEnterpriseSetup = createEnterpriseSetup;
37
+ const path = __importStar(require("path"));
38
+ const os = __importStar(require("os"));
39
+ const agent_core_1 = require("@backendkit-labs/agent-core");
40
+ const ObsidianRAGProvider_1 = require("./rag/ObsidianRAGProvider");
41
+ const VaultWriter_1 = require("./rag/VaultWriter");
42
+ const SimpleEmbedder_1 = require("./rag/SimpleEmbedder");
43
+ const profiles_1 = require("./profiles");
44
+ // ── Department RAG config ─────────────────────────────────────────────────────
45
+ const DEPT_CONFIGS = [
46
+ { toolName: profiles_1.ENTERPRISE_TOOLS.SEARCH_SUPPORT, folders: [profiles_1.VAULT_FOLDERS.SUPPORT, profiles_1.VAULT_FOLDERS.GENERAL] },
47
+ { toolName: profiles_1.ENTERPRISE_TOOLS.SEARCH_HR, folders: [profiles_1.VAULT_FOLDERS.HR, profiles_1.VAULT_FOLDERS.GENERAL] },
48
+ { toolName: profiles_1.ENTERPRISE_TOOLS.SEARCH_SALES, folders: [profiles_1.VAULT_FOLDERS.SALES, profiles_1.VAULT_FOLDERS.GENERAL] },
49
+ { toolName: profiles_1.ENTERPRISE_TOOLS.SEARCH_FINANCE, folders: [profiles_1.VAULT_FOLDERS.FINANCE, profiles_1.VAULT_FOLDERS.GENERAL] },
50
+ { toolName: profiles_1.ENTERPRISE_TOOLS.SEARCH_OPS, folders: [profiles_1.VAULT_FOLDERS.OPS, profiles_1.VAULT_FOLDERS.GENERAL] },
51
+ ];
52
+ // ── Factory ────────────────────────────────────────────────────────────────────
53
+ /**
54
+ * Creates a fully-wired enterprise setup with:
55
+ * - One RAG instance per department (scoped to its vault folders)
56
+ * - One global RAG for the General agent
57
+ * - VaultWriter shared across all agents
58
+ * - EngineFactory that creates a new AgentEngine per WebSocket session
59
+ *
60
+ * Usage:
61
+ * ```ts
62
+ * const enterprise = createEnterpriseSetup({ vaultPath, providers, defaultProvider });
63
+ * await enterprise.indexAll();
64
+ *
65
+ * const server = new AgentServer({ port: 3000, engineFactory: enterprise.engineFactory, cors: '*' });
66
+ * await server.start();
67
+ * ```
68
+ */
69
+ function createEnterpriseSetup(opts) {
70
+ const embedder = opts.embedder ?? new SimpleEmbedder_1.SimpleEmbedder();
71
+ const indexDir = opts.indexDir ?? path.join(os.homedir(), '.bk-agent', 'rag', 'enterprise');
72
+ const sessionsDir = opts.sessionsDir ?? path.join(os.homedir(), '.bk-agent', 'sessions');
73
+ // ── Shared RAG instances (one per department + one global) ───────────────
74
+ const globalRAG = new ObsidianRAGProvider_1.ObsidianRAGProvider({
75
+ vaultPath: opts.vaultPath,
76
+ indexPath: path.join(indexDir, 'global.json'),
77
+ embedder,
78
+ topK: 5,
79
+ minScore: 0.1,
80
+ });
81
+ const deptRAGs = new Map(DEPT_CONFIGS.map(({ toolName, folders }) => [
82
+ toolName,
83
+ new ObsidianRAGProvider_1.ObsidianRAGProvider({
84
+ vaultPath: opts.vaultPath,
85
+ folders,
86
+ indexPath: path.join(indexDir, `${folders[0]}.json`),
87
+ embedder,
88
+ topK: 5,
89
+ minScore: 0.1,
90
+ }),
91
+ ]));
92
+ // ── Shared VaultWriter ───────────────────────────────────────────────────
93
+ const writer = new VaultWriter_1.VaultWriter({ vaultPath: opts.vaultPath });
94
+ // ── Index all ────────────────────────────────────────────────────────────
95
+ async function indexAll(indexOpts = {}) {
96
+ const all = [globalRAG, ...deptRAGs.values()];
97
+ await Promise.all(all.map(rag => rag.index(indexOpts)));
98
+ }
99
+ // ── Engine factory ────────────────────────────────────────────────────────
100
+ function engineFactory(sessionId, transport) {
101
+ const tools = new agent_core_1.ToolRegistry();
102
+ // Global search (General agent)
103
+ tools.register(globalRAG.createTool());
104
+ // Department search tools
105
+ for (const [toolName, rag] of deptRAGs) {
106
+ const deptRag = rag;
107
+ tools.register((0, agent_core_1.defineTool)({
108
+ name: toolName,
109
+ description: `Search the ${toolName.replace('search_', '').replace('_kb', '')} department knowledge base.`,
110
+ input: agent_core_1.z.object({
111
+ query: agent_core_1.z.string().describe('What to search for'),
112
+ }),
113
+ execute: async ({ query }) => deptRag.search(query),
114
+ }));
115
+ }
116
+ // Write to vault
117
+ tools.register(writer.createTool('general'));
118
+ // Agents
119
+ const agents = new agent_core_1.AgentRegistry();
120
+ const profiles = [...profiles_1.ALL_ENTERPRISE_PROFILES, ...(opts.extraProfiles ?? [])];
121
+ for (const profile of profiles)
122
+ agents.register(profile);
123
+ // Per-session memory
124
+ const memory = (0, agent_core_1.createMemorySystem)({
125
+ episodic: { provider: 'json', path: path.join(sessionsDir, sessionId, 'ep.json') },
126
+ semantic: { provider: 'json', path: path.join(sessionsDir, sessionId, 'sem.json') },
127
+ procedural: { provider: 'json', path: path.join(sessionsDir, sessionId, 'proc.json') },
128
+ retention: { maxEpisodes: 100 },
129
+ });
130
+ return new agent_core_1.AgentEngine({
131
+ model: { provider: opts.defaultProvider, id: '' },
132
+ agents,
133
+ tools,
134
+ providers: opts.providers,
135
+ defaultProvider: opts.defaultProvider,
136
+ defaultAgentId: 'general',
137
+ transport,
138
+ maxIterations: opts.maxIterations ?? 20,
139
+ iterationMode: 'auto',
140
+ memorySystem: memory,
141
+ sessionId,
142
+ });
143
+ }
144
+ return { indexAll, engineFactory };
145
+ }
146
+ //# sourceMappingURL=factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.js","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,sDA+FC;AA7KD,2CAA6B;AAC7B,uCAAyB;AACzB,4DAQqC;AAErC,mEAAgE;AAEhE,mDAAgD;AAChD,yDAAsD;AACtD,yCAIoB;AA8BpB,iFAAiF;AAEjF,MAAM,YAAY,GAAmD;IACjE,EAAE,QAAQ,EAAE,2BAAgB,CAAC,cAAc,EAAG,OAAO,EAAE,CAAC,wBAAa,CAAC,OAAO,EAAG,wBAAa,CAAC,OAAO,CAAC,EAAE;IACxG,EAAE,QAAQ,EAAE,2BAAgB,CAAC,SAAS,EAAQ,OAAO,EAAE,CAAC,wBAAa,CAAC,EAAE,EAAQ,wBAAa,CAAC,OAAO,CAAC,EAAE;IACxG,EAAE,QAAQ,EAAE,2BAAgB,CAAC,YAAY,EAAK,OAA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e;YACrC,cAAc,EAAG,SAAS;YAC1B,SAAS;YACT,aAAa,EAAI,IAAI,CAAC,aAAa,IAAI,EAAE;YACzC,aAAa,EAAI,MAAM;YACvB,YAAY,EAAK,MAAM;YACvB,SAAS;SACZ,CAAC,CAAC;IACP,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC;AACvC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -9,4 +9,7 @@ export type { IndexerOptions, RawChunk } from './rag/VaultIndexer';
9
9
  export { VaultWriter } from './rag/VaultWriter';
10
10
  export type { VaultWriterOptions, WriteNoteParams } from './rag/VaultWriter';
11
11
  export { SimpleEmbedder } from './rag/SimpleEmbedder';
12
+ export { GENERAL_PROFILE, SUPPORT_PROFILE, HR_PROFILE, SALES_PROFILE, FINANCE_PROFILE, OPS_PROFILE, ALL_ENTERPRISE_PROFILES, ENTERPRISE_TOOLS, VAULT_FOLDERS, } from './profiles';
13
+ export { createEnterpriseSetup } from './factory';
14
+ export type { EnterpriseSetupOptions, EnterpriseSetup } from './factory';
12
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC7G,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE9E,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC7G,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EACH,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,gBAAgB,EAChB,aAAa,GAChB,MAAM,YAAY,CAAC;AAIpB,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAClD,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SimpleEmbedder = exports.VaultWriter = exports.VaultIndexer = exports.VectorStore = exports.OLLAMA_EMBED_DEFAULT_MODEL = exports.OLLAMA_EMBED_DEFAULT_HOST = exports.OllamaEmbedder = exports.ObsidianRAGProvider = void 0;
3
+ exports.createEnterpriseSetup = exports.VAULT_FOLDERS = exports.ENTERPRISE_TOOLS = exports.ALL_ENTERPRISE_PROFILES = exports.OPS_PROFILE = exports.FINANCE_PROFILE = exports.SALES_PROFILE = exports.HR_PROFILE = exports.SUPPORT_PROFILE = exports.GENERAL_PROFILE = exports.SimpleEmbedder = exports.VaultWriter = exports.VaultIndexer = exports.VectorStore = exports.OLLAMA_EMBED_DEFAULT_MODEL = exports.OLLAMA_EMBED_DEFAULT_HOST = exports.OllamaEmbedder = exports.ObsidianRAGProvider = void 0;
4
4
  var ObsidianRAGProvider_1 = require("./rag/ObsidianRAGProvider");
5
5
  Object.defineProperty(exports, "ObsidianRAGProvider", { enumerable: true, get: function () { return ObsidianRAGProvider_1.ObsidianRAGProvider; } });
6
6
  var OllamaEmbedder_1 = require("./rag/OllamaEmbedder");
@@ -15,4 +15,18 @@ var VaultWriter_1 = require("./rag/VaultWriter");
15
15
  Object.defineProperty(exports, "VaultWriter", { enumerable: true, get: function () { return VaultWriter_1.VaultWriter; } });
16
16
  var SimpleEmbedder_1 = require("./rag/SimpleEmbedder");
17
17
  Object.defineProperty(exports, "SimpleEmbedder", { enumerable: true, get: function () { return SimpleEmbedder_1.SimpleEmbedder; } });
18
+ // ── Enterprise profiles ───────────────────────────────────────────────────────
19
+ var profiles_1 = require("./profiles");
20
+ Object.defineProperty(exports, "GENERAL_PROFILE", { enumerable: true, get: function () { return profiles_1.GENERAL_PROFILE; } });
21
+ Object.defineProperty(exports, "SUPPORT_PROFILE", { enumerable: true, get: function () { return profiles_1.SUPPORT_PROFILE; } });
22
+ Object.defineProperty(exports, "HR_PROFILE", { enumerable: true, get: function () { return profiles_1.HR_PROFILE; } });
23
+ Object.defineProperty(exports, "SALES_PROFILE", { enumerable: true, get: function () { return profiles_1.SALES_PROFILE; } });
24
+ Object.defineProperty(exports, "FINANCE_PROFILE", { enumerable: true, get: function () { return profiles_1.FINANCE_PROFILE; } });
25
+ Object.defineProperty(exports, "OPS_PROFILE", { enumerable: true, get: function () { return profiles_1.OPS_PROFILE; } });
26
+ Object.defineProperty(exports, "ALL_ENTERPRISE_PROFILES", { enumerable: true, get: function () { return profiles_1.ALL_ENTERPRISE_PROFILES; } });
27
+ Object.defineProperty(exports, "ENTERPRISE_TOOLS", { enumerable: true, get: function () { return profiles_1.ENTERPRISE_TOOLS; } });
28
+ Object.defineProperty(exports, "VAULT_FOLDERS", { enumerable: true, get: function () { return profiles_1.VAULT_FOLDERS; } });
29
+ // ── Factory ───────────────────────────────────────────────────────────────────
30
+ var factory_1 = require("./factory");
31
+ Object.defineProperty(exports, "createEnterpriseSetup", { enumerable: true, get: function () { return factory_1.createEnterpriseSetup; } });
18
32
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAAvD,0HAAA,mBAAmB,OAAA;AAG5B,uDAA6G;AAApG,gHAAA,cAAc,OAAA;AAAE,2HAAA,yBAAyB,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAG9E,iDAAgD;AAAvC,0GAAA,WAAW,OAAA;AAGpB,mDAAkD;AAAzC,4GAAA,YAAY,OAAA;AAGrB,iDAAgD;AAAvC,0GAAA,WAAW,OAAA;AAGpB,uDAAsD;AAA7C,gHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAAgE;AAAvD,0HAAA,mBAAmB,OAAA;AAG5B,uDAA6G;AAApG,gHAAA,cAAc,OAAA;AAAE,2HAAA,yBAAyB,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAG9E,iDAAgD;AAAvC,0GAAA,WAAW,OAAA;AAGpB,mDAAkD;AAAzC,4GAAA,YAAY,OAAA;AAGrB,iDAAgD;AAAvC,0GAAA,WAAW,OAAA;AAGpB,uDAAsD;AAA7C,gHAAA,cAAc,OAAA;AAEvB,iFAAiF;AAEjF,uCAUoB;AAThB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,2GAAA,eAAe,OAAA;AACf,uGAAA,WAAW,OAAA;AACX,mHAAA,uBAAuB,OAAA;AACvB,4GAAA,gBAAgB,OAAA;AAChB,yGAAA,aAAa,OAAA;AAGjB,iFAAiF;AAEjF,qCAAkD;AAAzC,gHAAA,qBAAqB,OAAA"}
@@ -0,0 +1,22 @@
1
+ /** Tool names registered by createEnterpriseSetup(). */
2
+ export declare const ENTERPRISE_TOOLS: {
3
+ readonly SEARCH_GENERAL: "search_knowledge";
4
+ readonly SEARCH_SUPPORT: "search_support_kb";
5
+ readonly SEARCH_HR: "search_hr_kb";
6
+ readonly SEARCH_SALES: "search_sales_kb";
7
+ readonly SEARCH_FINANCE: "search_finance_kb";
8
+ readonly SEARCH_OPS: "search_ops_kb";
9
+ readonly WRITE_KNOWLEDGE: "write_knowledge";
10
+ readonly ASK_AGENT: "ask_agent";
11
+ };
12
+ /** Vault subfolder for each department. */
13
+ export declare const VAULT_FOLDERS: {
14
+ readonly GENERAL: "general";
15
+ readonly SUPPORT: "soporte";
16
+ readonly HR: "rrhh";
17
+ readonly SALES: "ventas";
18
+ readonly FINANCE: "finanzas";
19
+ readonly OPS: "operaciones";
20
+ readonly AGENTS: "agentes";
21
+ };
22
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/profiles/constants.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,eAAO,MAAM,gBAAgB;;;;;;;;;CASnB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;;;;;;;CAQhB,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VAULT_FOLDERS = exports.ENTERPRISE_TOOLS = void 0;
4
+ /** Tool names registered by createEnterpriseSetup(). */
5
+ exports.ENTERPRISE_TOOLS = {
6
+ SEARCH_GENERAL: 'search_knowledge',
7
+ SEARCH_SUPPORT: 'search_support_kb',
8
+ SEARCH_HR: 'search_hr_kb',
9
+ SEARCH_SALES: 'search_sales_kb',
10
+ SEARCH_FINANCE: 'search_finance_kb',
11
+ SEARCH_OPS: 'search_ops_kb',
12
+ WRITE_KNOWLEDGE: 'write_knowledge',
13
+ ASK_AGENT: 'ask_agent',
14
+ };
15
+ /** Vault subfolder for each department. */
16
+ exports.VAULT_FOLDERS = {
17
+ GENERAL: 'general',
18
+ SUPPORT: 'soporte',
19
+ HR: 'rrhh',
20
+ SALES: 'ventas',
21
+ FINANCE: 'finanzas',
22
+ OPS: 'operaciones',
23
+ AGENTS: 'agentes',
24
+ };
25
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/profiles/constants.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AAC3C,QAAA,gBAAgB,GAAG;IAC5B,cAAc,EAAK,kBAAkB;IACrC,cAAc,EAAK,mBAAmB;IACtC,SAAS,EAAU,cAAc;IACjC,YAAY,EAAO,iBAAiB;IACpC,cAAc,EAAK,mBAAmB;IACtC,UAAU,EAAS,eAAe;IAClC,eAAe,EAAI,iBAAiB;IACpC,SAAS,EAAU,WAAW;CACxB,CAAC;AAEX,2CAA2C;AAC9B,QAAA,aAAa,GAAG;IACzB,OAAO,EAAM,SAAS;IACtB,OAAO,EAAM,SAAS;IACtB,EAAE,EAAW,MAAM;IACnB,KAAK,EAAQ,QAAQ;IACrB,OAAO,EAAM,UAAU;IACvB,GAAG,EAAU,aAAa;IAC1B,MAAM,EAAO,SAAS;CAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
2
+ export declare const FINANCE_PROFILE: AgentProfile;
3
+ //# sourceMappingURL=finance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finance.d.ts","sourceRoot":"","sources":["../../src/profiles/finance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,eAAe,EAAE,YA4B7B,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FINANCE_PROFILE = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.FINANCE_PROFILE = {
6
+ id: 'finance',
7
+ name: 'Finance Agent',
8
+ icon: '📊',
9
+ description: 'Finance specialist — budgets, reports, expense approvals, ERP queries. Runs locally for data privacy.',
10
+ systemPrompt: `You are the Finance Agent for this enterprise.
11
+
12
+ Your responsibilities:
13
+ 1. Search the finance knowledge base (search_finance_kb) for budget guidelines, approval workflows, and financial policies.
14
+ 2. Assist with expense approvals, budget queries, and financial report interpretation.
15
+ 3. Approval authority matrix (always verify before approving):
16
+ - < $500: team lead approval
17
+ - $500–$5,000: department manager approval
18
+ - $5,000–$50,000: CFO approval
19
+ - > $50,000: board approval required
20
+ 4. For report generation requests, outline the required data points and the responsible owner.
21
+ 5. Document new financial procedures or policy clarifications with write_knowledge under finanzas/.
22
+
23
+ IMPORTANT — Confidentiality rules:
24
+ - Never share revenue figures, margins, or salary data in responses that could be forwarded externally.
25
+ - Flag any request that seems to be fishing for confidential financial data.
26
+
27
+ Tone: precise, compliance-aware, numbers-driven.`,
28
+ allowedTools: [
29
+ constants_1.ENTERPRISE_TOOLS.SEARCH_FINANCE,
30
+ constants_1.ENTERPRISE_TOOLS.WRITE_KNOWLEDGE,
31
+ ],
32
+ provider: 'local',
33
+ };
34
+ //# sourceMappingURL=finance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"finance.js","sourceRoot":"","sources":["../../src/profiles/finance.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAElC,QAAA,eAAe,GAAiB;IACzC,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,uGAAuG;IACpH,YAAY,EAAE;;;;;;;;;;;;;;;;;iDAiB+B;IAC7C,YAAY,EAAE;QACV,4BAAgB,CAAC,cAAc;QAC/B,4BAAgB,CAAC,eAAe;KACnC;IACD,QAAQ,EAAE,OAAO;CACpB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
2
+ export declare const GENERAL_PROFILE: AgentProfile;
3
+ //# sourceMappingURL=general.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../src/profiles/general.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,eAAe,EAAE,YA0B7B,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GENERAL_PROFILE = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.GENERAL_PROFILE = {
6
+ id: 'general',
7
+ name: 'General',
8
+ icon: '◆',
9
+ description: 'Orchestrator — routes queries to the right specialist and consolidates multi-domain answers.',
10
+ systemPrompt: `You are the General agent for this enterprise.
11
+
12
+ Your responsibilities:
13
+ 1. Understand the user's request and identify the relevant business domain(s).
14
+ 2. Search the general knowledge base with search_knowledge for cross-domain context.
15
+ 3. For domain-specific queries, delegate to the appropriate specialist via ask_agent:
16
+ - support → customer support, tickets, FAQs
17
+ - hr → human resources, leave, payroll, policies
18
+ - sales → products, pricing, proposals, CRM
19
+ - finance → reports, budgets, approvals, ERP
20
+ - ops → infrastructure, incidents, runbooks, metrics
21
+ 4. For multi-domain queries, run delegations in parallel and consolidate the answers.
22
+ 5. Write key insights back to the vault with write_knowledge.
23
+
24
+ Always be direct and business-focused. Cite your sources.`,
25
+ allowedTools: [
26
+ constants_1.ENTERPRISE_TOOLS.SEARCH_GENERAL,
27
+ constants_1.ENTERPRISE_TOOLS.WRITE_KNOWLEDGE,
28
+ constants_1.ENTERPRISE_TOOLS.ASK_AGENT,
29
+ ],
30
+ delegatesTo: ['support', 'hr', 'sales', 'finance', 'ops'],
31
+ };
32
+ //# sourceMappingURL=general.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"general.js","sourceRoot":"","sources":["../../src/profiles/general.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAElC,QAAA,eAAe,GAAiB;IACzC,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,8FAA8F;IAC3G,YAAY,EAAE;;;;;;;;;;;;;;0DAcwC;IACtD,YAAY,EAAE;QACV,4BAAgB,CAAC,cAAc;QAC/B,4BAAgB,CAAC,eAAe;QAChC,4BAAgB,CAAC,SAAS;KAC7B;IACD,WAAW,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC;CAC5D,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
2
+ export declare const HR_PROFILE: AgentProfile;
3
+ //# sourceMappingURL=hr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hr.d.ts","sourceRoot":"","sources":["../../src/profiles/hr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,UAAU,EAAE,YA4BxB,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HR_PROFILE = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.HR_PROFILE = {
6
+ id: 'hr',
7
+ name: 'HR Agent',
8
+ icon: '👥',
9
+ description: 'Human resources specialist — policies, leave, payroll, onboarding. Runs locally for data privacy.',
10
+ systemPrompt: `You are the HR Agent for this enterprise.
11
+
12
+ Your responsibilities:
13
+ 1. Search the HR knowledge base (search_hr_kb) for policies, procedures, and employee guidelines.
14
+ 2. Answer questions about leave, payroll, benefits, onboarding, and performance processes.
15
+ 3. Always cite the specific policy document you are referencing.
16
+ 4. For requests that require manager or HR director approval, clearly state:
17
+ - What action is needed
18
+ - Who must approve
19
+ - The expected timeline
20
+ 5. Document policy clarifications or common Q&A with write_knowledge under rrhh/.
21
+
22
+ IMPORTANT — Data privacy rules:
23
+ - Never reveal individual employee salary data.
24
+ - Never confirm or deny whether a specific person is employed.
25
+ - Direct requests for personal data to the HR director.
26
+
27
+ Tone: warm, confidential, policy-grounded.`,
28
+ allowedTools: [
29
+ constants_1.ENTERPRISE_TOOLS.SEARCH_HR,
30
+ constants_1.ENTERPRISE_TOOLS.WRITE_KNOWLEDGE,
31
+ ],
32
+ provider: 'local',
33
+ };
34
+ //# sourceMappingURL=hr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hr.js","sourceRoot":"","sources":["../../src/profiles/hr.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAElC,QAAA,UAAU,GAAiB;IACpC,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,mGAAmG;IAChH,YAAY,EAAE;;;;;;;;;;;;;;;;;2CAiByB;IACvC,YAAY,EAAE;QACV,4BAAgB,CAAC,SAAS;QAC1B,4BAAgB,CAAC,eAAe;KACnC;IACD,QAAQ,EAAE,OAAO;CACpB,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { GENERAL_PROFILE } from './general';
2
+ export { SUPPORT_PROFILE } from './support';
3
+ export { HR_PROFILE } from './hr';
4
+ export { SALES_PROFILE } from './sales';
5
+ export { FINANCE_PROFILE } from './finance';
6
+ export { OPS_PROFILE } from './ops';
7
+ export { ENTERPRISE_TOOLS, VAULT_FOLDERS } from './constants';
8
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
9
+ export declare const ALL_ENTERPRISE_PROFILES: AgentProfile[];
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/profiles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAO,WAAW,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAO,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAY,MAAM,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAS,SAAS,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAO,WAAW,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAW,OAAO,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAQ9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,eAAO,MAAM,uBAAuB,EAAE,YAAY,EAOjD,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALL_ENTERPRISE_PROFILES = exports.VAULT_FOLDERS = exports.ENTERPRISE_TOOLS = exports.OPS_PROFILE = exports.FINANCE_PROFILE = exports.SALES_PROFILE = exports.HR_PROFILE = exports.SUPPORT_PROFILE = exports.GENERAL_PROFILE = void 0;
4
+ var general_1 = require("./general");
5
+ Object.defineProperty(exports, "GENERAL_PROFILE", { enumerable: true, get: function () { return general_1.GENERAL_PROFILE; } });
6
+ var support_1 = require("./support");
7
+ Object.defineProperty(exports, "SUPPORT_PROFILE", { enumerable: true, get: function () { return support_1.SUPPORT_PROFILE; } });
8
+ var hr_1 = require("./hr");
9
+ Object.defineProperty(exports, "HR_PROFILE", { enumerable: true, get: function () { return hr_1.HR_PROFILE; } });
10
+ var sales_1 = require("./sales");
11
+ Object.defineProperty(exports, "SALES_PROFILE", { enumerable: true, get: function () { return sales_1.SALES_PROFILE; } });
12
+ var finance_1 = require("./finance");
13
+ Object.defineProperty(exports, "FINANCE_PROFILE", { enumerable: true, get: function () { return finance_1.FINANCE_PROFILE; } });
14
+ var ops_1 = require("./ops");
15
+ Object.defineProperty(exports, "OPS_PROFILE", { enumerable: true, get: function () { return ops_1.OPS_PROFILE; } });
16
+ var constants_1 = require("./constants");
17
+ Object.defineProperty(exports, "ENTERPRISE_TOOLS", { enumerable: true, get: function () { return constants_1.ENTERPRISE_TOOLS; } });
18
+ Object.defineProperty(exports, "VAULT_FOLDERS", { enumerable: true, get: function () { return constants_1.VAULT_FOLDERS; } });
19
+ const general_2 = require("./general");
20
+ const support_2 = require("./support");
21
+ const hr_2 = require("./hr");
22
+ const sales_2 = require("./sales");
23
+ const finance_2 = require("./finance");
24
+ const ops_2 = require("./ops");
25
+ exports.ALL_ENTERPRISE_PROFILES = [
26
+ general_2.GENERAL_PROFILE,
27
+ support_2.SUPPORT_PROFILE,
28
+ hr_2.HR_PROFILE,
29
+ sales_2.SALES_PROFILE,
30
+ finance_2.FINANCE_PROFILE,
31
+ ops_2.OPS_PROFILE,
32
+ ];
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/profiles/index.ts"],"names":[],"mappings":";;;AAAA,qCAA6C;AAApC,0GAAA,eAAe,OAAA;AACxB,qCAA6C;AAApC,0GAAA,eAAe,OAAA;AACxB,2BAAwC;AAA/B,gGAAA,UAAU,OAAA;AACnB,iCAA2C;AAAlC,sGAAA,aAAa,OAAA;AACtB,qCAA6C;AAApC,0GAAA,eAAe,OAAA;AACxB,6BAAyC;AAAhC,kGAAA,WAAW,OAAA;AACpB,yCAA8D;AAArD,6GAAA,gBAAgB,OAAA;AAAE,0GAAA,aAAa,OAAA;AAExC,uCAA6C;AAC7C,uCAA6C;AAC7C,6BAAwC;AACxC,mCAA2C;AAC3C,uCAA6C;AAC7C,+BAAyC;AAG5B,QAAA,uBAAuB,GAAmB;IACnD,yBAAe;IACf,yBAAe;IACf,eAAU;IACV,qBAAa;IACb,yBAAe;IACf,iBAAW;CACd,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
2
+ export declare const OPS_PROFILE: AgentProfile;
3
+ //# sourceMappingURL=ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../src/profiles/ops.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,WAAW,EAAE,YA2BzB,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OPS_PROFILE = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.OPS_PROFILE = {
6
+ id: 'ops',
7
+ name: 'Ops Agent',
8
+ icon: '⚙',
9
+ description: 'Operations specialist — infrastructure, incidents, runbooks, metrics.',
10
+ systemPrompt: `You are the Ops Agent for this enterprise.
11
+
12
+ Your responsibilities:
13
+ 1. Search the operations knowledge base (search_ops_kb) for runbooks, incident history, architecture docs, and metrics baselines.
14
+ 2. For incident response queries:
15
+ - Identify the affected system from the description
16
+ - Pull the relevant runbook from the KB
17
+ - Outline the step-by-step mitigation
18
+ - Flag if escalation to on-call engineer is needed
19
+ 3. Incident severity levels:
20
+ - P1: full outage, all users affected → immediate escalation + war room
21
+ - P2: partial outage or degradation → on-call engineer within 15 min
22
+ - P3: non-critical issue → ticket, next business day
23
+ - P4: cosmetic/low impact → backlog
24
+ 4. Document post-incident learnings or new runbooks with write_knowledge under operaciones/.
25
+
26
+ Tone: calm under pressure, systematic, action-oriented. Lead with immediate actions.
27
+ Never speculate about root cause — state what is known and what needs investigation.`,
28
+ allowedTools: [
29
+ constants_1.ENTERPRISE_TOOLS.SEARCH_OPS,
30
+ constants_1.ENTERPRISE_TOOLS.WRITE_KNOWLEDGE,
31
+ ],
32
+ };
33
+ //# sourceMappingURL=ops.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ops.js","sourceRoot":"","sources":["../../src/profiles/ops.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAElC,QAAA,WAAW,GAAiB;IACrC,EAAE,EAAE,KAAK;IACT,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,uEAAuE;IACpF,YAAY,EAAE;;;;;;;;;;;;;;;;;qFAiBmE;IACjF,YAAY,EAAE;QACV,4BAAgB,CAAC,UAAU;QAC3B,4BAAgB,CAAC,eAAe;KACnC;CACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
2
+ export declare const SALES_PROFILE: AgentProfile;
3
+ //# sourceMappingURL=sales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales.d.ts","sourceRoot":"","sources":["../../src/profiles/sales.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,aAAa,EAAE,YAwB3B,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SALES_PROFILE = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.SALES_PROFILE = {
6
+ id: 'sales',
7
+ name: 'Sales Agent',
8
+ icon: '💼',
9
+ description: 'Sales specialist — products, pricing, proposals, competitive positioning.',
10
+ systemPrompt: `You are the Sales Agent for this enterprise.
11
+
12
+ Your responsibilities:
13
+ 1. Search the sales knowledge base (search_sales_kb) for product specs, pricing, proposals, and competitive intel.
14
+ 2. Help sales reps prepare compelling proposals and answer product/pricing questions.
15
+ 3. Qualification checklist before preparing a proposal:
16
+ - Company size and industry
17
+ - Budget range (if available)
18
+ - Key pain points
19
+ - Decision timeline
20
+ 4. For pricing that requires approval (discounts > 15%, enterprise contracts), flag explicitly.
21
+ 5. Document new competitive intel or successful proposal patterns with write_knowledge under ventas/.
22
+
23
+ Tone: confident, value-focused, consultative. Lead with business outcomes, not features.
24
+ Always connect product capabilities to the customer's stated pain points.`,
25
+ allowedTools: [
26
+ constants_1.ENTERPRISE_TOOLS.SEARCH_SALES,
27
+ constants_1.ENTERPRISE_TOOLS.WRITE_KNOWLEDGE,
28
+ ],
29
+ };
30
+ //# sourceMappingURL=sales.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sales.js","sourceRoot":"","sources":["../../src/profiles/sales.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAElC,QAAA,aAAa,GAAiB;IACvC,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,aAAa;IACnB,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,2EAA2E;IACxF,YAAY,EAAE;;;;;;;;;;;;;;0EAcwD;IACtE,YAAY,EAAE;QACV,4BAAgB,CAAC,YAAY;QAC7B,4BAAgB,CAAC,eAAe;KACnC;CACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { AgentProfile } from '@backendkit-labs/agent-core';
2
+ export declare const SUPPORT_PROFILE: AgentProfile;
3
+ //# sourceMappingURL=support.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../src/profiles/support.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,eAAe,EAAE,YAsB7B,CAAC"}