@hailer/mcp 0.1.17 → 0.2.1

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 (200) hide show
  1. package/dist/app.js +24 -20
  2. package/dist/core.d.ts +33 -9
  3. package/dist/core.js +279 -147
  4. package/dist/mcp/UserContextCache.js +18 -0
  5. package/dist/mcp/hailer-clients.d.ts +9 -1
  6. package/dist/mcp/hailer-clients.js +13 -3
  7. package/dist/mcp/signal-handler.js +1 -1
  8. package/dist/mcp/tool-registry.d.ts +3 -1
  9. package/dist/mcp/tool-registry.js +4 -1
  10. package/dist/mcp/tools/activity.js +43 -34
  11. package/dist/mcp/tools/bot-config/constants.d.ts +23 -0
  12. package/dist/mcp/tools/bot-config/constants.js +94 -0
  13. package/dist/mcp/tools/{bot-config.d.ts → bot-config/core.d.ts} +6 -6
  14. package/dist/mcp/tools/{bot-config.js → bot-config/core.js} +15 -15
  15. package/dist/mcp/tools/bot-config/index.d.ts +10 -0
  16. package/dist/mcp/tools/bot-config/index.js +59 -0
  17. package/dist/mcp/tools/bot-config/tools.d.ts +7 -0
  18. package/dist/mcp/tools/bot-config/tools.js +15 -0
  19. package/dist/mcp/tools/bot-config/types.d.ts +50 -0
  20. package/dist/mcp/tools/bot-config/types.js +6 -0
  21. package/dist/mcp/tools/bug-fixer-tools.d.ts +21 -0
  22. package/dist/mcp/tools/{giuseppe-tools.js → bug-fixer-tools.js} +61 -61
  23. package/dist/mcp/tools/user.js +10 -29
  24. package/dist/mcp/tools/workflow.js +36 -2
  25. package/dist/mcp/utils/data-transformers.d.ts +0 -8
  26. package/dist/mcp/utils/data-transformers.js +0 -28
  27. package/dist/mcp/utils/index.d.ts +4 -1
  28. package/dist/mcp/utils/index.js +17 -3
  29. package/dist/mcp/utils/pagination.d.ts +40 -0
  30. package/dist/mcp/utils/pagination.js +55 -0
  31. package/dist/mcp/utils/response-builder.d.ts +53 -0
  32. package/dist/mcp/utils/response-builder.js +110 -0
  33. package/dist/mcp/utils/tool-helpers.d.ts +0 -8
  34. package/dist/mcp/utils/tool-helpers.js +0 -24
  35. package/dist/mcp/utils/types.d.ts +1 -33
  36. package/dist/mcp-server.d.ts +2 -2
  37. package/dist/mcp-server.js +161 -139
  38. package/package.json +1 -1
  39. package/REFACTOR_STATUS.md +0 -127
  40. package/dist/agents/bot-manager.d.ts +0 -48
  41. package/dist/agents/bot-manager.js +0 -254
  42. package/dist/agents/factory.d.ts +0 -150
  43. package/dist/agents/factory.js +0 -650
  44. package/dist/agents/giuseppe/ai.d.ts +0 -83
  45. package/dist/agents/giuseppe/ai.js +0 -466
  46. package/dist/agents/giuseppe/bot.d.ts +0 -110
  47. package/dist/agents/giuseppe/bot.js +0 -780
  48. package/dist/agents/giuseppe/config.d.ts +0 -25
  49. package/dist/agents/giuseppe/config.js +0 -227
  50. package/dist/agents/giuseppe/files.d.ts +0 -52
  51. package/dist/agents/giuseppe/files.js +0 -338
  52. package/dist/agents/giuseppe/git.d.ts +0 -48
  53. package/dist/agents/giuseppe/git.js +0 -298
  54. package/dist/agents/giuseppe/index.d.ts +0 -97
  55. package/dist/agents/giuseppe/index.js +0 -258
  56. package/dist/agents/giuseppe/lsp.d.ts +0 -113
  57. package/dist/agents/giuseppe/lsp.js +0 -485
  58. package/dist/agents/giuseppe/monitor.d.ts +0 -118
  59. package/dist/agents/giuseppe/monitor.js +0 -621
  60. package/dist/agents/giuseppe/prompt.d.ts +0 -5
  61. package/dist/agents/giuseppe/prompt.js +0 -94
  62. package/dist/agents/giuseppe/registries/pending-classification.d.ts +0 -28
  63. package/dist/agents/giuseppe/registries/pending-classification.js +0 -50
  64. package/dist/agents/giuseppe/registries/pending-fix.d.ts +0 -30
  65. package/dist/agents/giuseppe/registries/pending-fix.js +0 -42
  66. package/dist/agents/giuseppe/registries/pending.d.ts +0 -27
  67. package/dist/agents/giuseppe/registries/pending.js +0 -49
  68. package/dist/agents/giuseppe/specialist.d.ts +0 -47
  69. package/dist/agents/giuseppe/specialist.js +0 -237
  70. package/dist/agents/giuseppe/types.d.ts +0 -123
  71. package/dist/agents/giuseppe/types.js +0 -9
  72. package/dist/agents/hailer-expert/index.d.ts +0 -8
  73. package/dist/agents/hailer-expert/index.js +0 -14
  74. package/dist/agents/hal/daemon.d.ts +0 -142
  75. package/dist/agents/hal/daemon.js +0 -1103
  76. package/dist/agents/hal/definitions.d.ts +0 -55
  77. package/dist/agents/hal/definitions.js +0 -263
  78. package/dist/agents/hal/index.d.ts +0 -3
  79. package/dist/agents/hal/index.js +0 -8
  80. package/dist/agents/index.d.ts +0 -18
  81. package/dist/agents/index.js +0 -48
  82. package/dist/agents/shared/base.d.ts +0 -216
  83. package/dist/agents/shared/base.js +0 -846
  84. package/dist/agents/shared/services/agent-registry.d.ts +0 -107
  85. package/dist/agents/shared/services/agent-registry.js +0 -629
  86. package/dist/agents/shared/services/conversation-manager.d.ts +0 -50
  87. package/dist/agents/shared/services/conversation-manager.js +0 -136
  88. package/dist/agents/shared/services/mcp-client.d.ts +0 -56
  89. package/dist/agents/shared/services/mcp-client.js +0 -124
  90. package/dist/agents/shared/services/message-classifier.d.ts +0 -37
  91. package/dist/agents/shared/services/message-classifier.js +0 -187
  92. package/dist/agents/shared/services/message-formatter.d.ts +0 -89
  93. package/dist/agents/shared/services/message-formatter.js +0 -371
  94. package/dist/agents/shared/services/session-logger.d.ts +0 -106
  95. package/dist/agents/shared/services/session-logger.js +0 -446
  96. package/dist/agents/shared/services/tool-executor.d.ts +0 -41
  97. package/dist/agents/shared/services/tool-executor.js +0 -169
  98. package/dist/agents/shared/services/workspace-schema-cache.d.ts +0 -125
  99. package/dist/agents/shared/services/workspace-schema-cache.js +0 -578
  100. package/dist/agents/shared/specialist.d.ts +0 -91
  101. package/dist/agents/shared/specialist.js +0 -399
  102. package/dist/agents/shared/tool-schema-loader.d.ts +0 -62
  103. package/dist/agents/shared/tool-schema-loader.js +0 -232
  104. package/dist/agents/shared/types.d.ts +0 -327
  105. package/dist/agents/shared/types.js +0 -121
  106. package/dist/client/agents/base.d.ts +0 -207
  107. package/dist/client/agents/base.js +0 -744
  108. package/dist/client/agents/definitions.d.ts +0 -53
  109. package/dist/client/agents/definitions.js +0 -263
  110. package/dist/client/agents/orchestrator.d.ts +0 -141
  111. package/dist/client/agents/orchestrator.js +0 -1062
  112. package/dist/client/agents/specialist.d.ts +0 -86
  113. package/dist/client/agents/specialist.js +0 -340
  114. package/dist/client/bot-entrypoint.d.ts +0 -7
  115. package/dist/client/bot-entrypoint.js +0 -103
  116. package/dist/client/bot-manager.d.ts +0 -44
  117. package/dist/client/bot-manager.js +0 -173
  118. package/dist/client/bot-runner.d.ts +0 -35
  119. package/dist/client/bot-runner.js +0 -188
  120. package/dist/client/chat-agent-daemon.d.ts +0 -464
  121. package/dist/client/chat-agent-daemon.js +0 -1774
  122. package/dist/client/daemon-factory.d.ts +0 -106
  123. package/dist/client/daemon-factory.js +0 -301
  124. package/dist/client/factory.d.ts +0 -111
  125. package/dist/client/factory.js +0 -314
  126. package/dist/client/index.d.ts +0 -17
  127. package/dist/client/index.js +0 -38
  128. package/dist/client/multi-bot-manager.d.ts +0 -42
  129. package/dist/client/multi-bot-manager.js +0 -161
  130. package/dist/client/orchestrator-daemon.d.ts +0 -87
  131. package/dist/client/orchestrator-daemon.js +0 -444
  132. package/dist/client/server.d.ts +0 -8
  133. package/dist/client/server.js +0 -251
  134. package/dist/client/services/agent-registry.d.ts +0 -108
  135. package/dist/client/services/agent-registry.js +0 -630
  136. package/dist/client/services/conversation-manager.d.ts +0 -50
  137. package/dist/client/services/conversation-manager.js +0 -136
  138. package/dist/client/services/mcp-client.d.ts +0 -48
  139. package/dist/client/services/mcp-client.js +0 -105
  140. package/dist/client/services/message-classifier.d.ts +0 -37
  141. package/dist/client/services/message-classifier.js +0 -187
  142. package/dist/client/services/message-formatter.d.ts +0 -84
  143. package/dist/client/services/message-formatter.js +0 -353
  144. package/dist/client/services/session-logger.d.ts +0 -106
  145. package/dist/client/services/session-logger.js +0 -446
  146. package/dist/client/services/tool-executor.d.ts +0 -41
  147. package/dist/client/services/tool-executor.js +0 -169
  148. package/dist/client/services/workspace-schema-cache.d.ts +0 -149
  149. package/dist/client/services/workspace-schema-cache.js +0 -732
  150. package/dist/client/specialist-daemon.d.ts +0 -77
  151. package/dist/client/specialist-daemon.js +0 -197
  152. package/dist/client/specialists.d.ts +0 -53
  153. package/dist/client/specialists.js +0 -178
  154. package/dist/client/tool-schema-loader.d.ts +0 -62
  155. package/dist/client/tool-schema-loader.js +0 -232
  156. package/dist/client/types.d.ts +0 -327
  157. package/dist/client/types.js +0 -121
  158. package/dist/commands/seed-config.d.ts +0 -9
  159. package/dist/commands/seed-config.js +0 -372
  160. package/dist/lib/context-manager.d.ts +0 -111
  161. package/dist/lib/context-manager.js +0 -431
  162. package/dist/lib/prompt-length-manager.d.ts +0 -81
  163. package/dist/lib/prompt-length-manager.js +0 -457
  164. package/dist/mcp/tools/giuseppe-tools.d.ts +0 -21
  165. package/dist/modules/bug-reports/bug-config.d.ts +0 -25
  166. package/dist/modules/bug-reports/bug-config.js +0 -187
  167. package/dist/modules/bug-reports/bug-monitor.d.ts +0 -108
  168. package/dist/modules/bug-reports/bug-monitor.js +0 -510
  169. package/dist/modules/bug-reports/giuseppe-agent.d.ts +0 -58
  170. package/dist/modules/bug-reports/giuseppe-agent.js +0 -467
  171. package/dist/modules/bug-reports/giuseppe-ai.d.ts +0 -83
  172. package/dist/modules/bug-reports/giuseppe-ai.js +0 -466
  173. package/dist/modules/bug-reports/giuseppe-bot.d.ts +0 -110
  174. package/dist/modules/bug-reports/giuseppe-bot.js +0 -804
  175. package/dist/modules/bug-reports/giuseppe-daemon.d.ts +0 -80
  176. package/dist/modules/bug-reports/giuseppe-daemon.js +0 -617
  177. package/dist/modules/bug-reports/giuseppe-files.d.ts +0 -64
  178. package/dist/modules/bug-reports/giuseppe-files.js +0 -375
  179. package/dist/modules/bug-reports/giuseppe-git.d.ts +0 -48
  180. package/dist/modules/bug-reports/giuseppe-git.js +0 -298
  181. package/dist/modules/bug-reports/giuseppe-lsp.d.ts +0 -113
  182. package/dist/modules/bug-reports/giuseppe-lsp.js +0 -485
  183. package/dist/modules/bug-reports/giuseppe-prompt.d.ts +0 -5
  184. package/dist/modules/bug-reports/giuseppe-prompt.js +0 -94
  185. package/dist/modules/bug-reports/index.d.ts +0 -77
  186. package/dist/modules/bug-reports/index.js +0 -215
  187. package/dist/modules/bug-reports/pending-classification-registry.d.ts +0 -28
  188. package/dist/modules/bug-reports/pending-classification-registry.js +0 -50
  189. package/dist/modules/bug-reports/pending-fix-registry.d.ts +0 -30
  190. package/dist/modules/bug-reports/pending-fix-registry.js +0 -42
  191. package/dist/modules/bug-reports/pending-registry.d.ts +0 -27
  192. package/dist/modules/bug-reports/pending-registry.js +0 -49
  193. package/dist/modules/bug-reports/types.d.ts +0 -123
  194. package/dist/modules/bug-reports/types.js +0 -9
  195. package/dist/routes/agents.d.ts +0 -44
  196. package/dist/routes/agents.js +0 -311
  197. package/dist/services/agent-credential-store.d.ts +0 -73
  198. package/dist/services/agent-credential-store.js +0 -212
  199. package/dist/services/bug-monitor.d.ts +0 -23
  200. package/dist/services/bug-monitor.js +0 -275
@@ -18,12 +18,14 @@ import { McpResponse } from './utils/types';
18
18
  * WRITE: Create/update operations (activities, discussions)
19
19
  * PLAYGROUND: Admin/dev tools (workflow/app management)
20
20
  * NUCLEAR: Destructive operations (remove workflows, apps, insights, templates)
21
+ * BOT_INTERNAL: Tools for autonomous bots only (not exposed to MCP clients by default)
21
22
  */
22
23
  export declare enum ToolGroup {
23
24
  READ = "read",
24
25
  WRITE = "write",
25
26
  PLAYGROUND = "playground",
26
- NUCLEAR = "nuclear"
27
+ NUCLEAR = "nuclear",
28
+ BOT_INTERNAL = "bot_internal"
27
29
  }
28
30
  /**
29
31
  * Tool definition interface
@@ -56,6 +56,7 @@ const logger = (0, logger_1.createLogger)({ component: 'tool-registry' });
56
56
  * WRITE: Create/update operations (activities, discussions)
57
57
  * PLAYGROUND: Admin/dev tools (workflow/app management)
58
58
  * NUCLEAR: Destructive operations (remove workflows, apps, insights, templates)
59
+ * BOT_INTERNAL: Tools for autonomous bots only (not exposed to MCP clients by default)
59
60
  */
60
61
  var ToolGroup;
61
62
  (function (ToolGroup) {
@@ -63,6 +64,7 @@ var ToolGroup;
63
64
  ToolGroup["WRITE"] = "write";
64
65
  ToolGroup["PLAYGROUND"] = "playground";
65
66
  ToolGroup["NUCLEAR"] = "nuclear";
67
+ ToolGroup["BOT_INTERNAL"] = "bot_internal";
66
68
  })(ToolGroup || (exports.ToolGroup = ToolGroup = {}));
67
69
  /**
68
70
  * ToolRegistry - Clean, testable, dependency-injected tool registry
@@ -336,7 +338,8 @@ Then retry \`${name}\` with the correct format from the skill examples.` : `💡
336
338
  [ToolGroup.READ]: 0,
337
339
  [ToolGroup.WRITE]: 0,
338
340
  [ToolGroup.PLAYGROUND]: 0,
339
- [ToolGroup.NUCLEAR]: 0
341
+ [ToolGroup.NUCLEAR]: 0,
342
+ [ToolGroup.BOT_INTERNAL]: 0
340
343
  };
341
344
  for (const tool of this.tools.values()) {
342
345
  byGroup[tool.group]++;
@@ -58,7 +58,7 @@ function validateAndGetWorkflow(workflowId, init) {
58
58
  /**
59
59
  * Resolve phase for listing activities
60
60
  */
61
- async function resolvePhaseForListing(workflow, args, init) {
61
+ async function resolvePhaseForListing(workflow, args, _init) {
62
62
  if (!args.phaseId) {
63
63
  throw new Error(`Phase ID is required. Use the list_workflow_phases tool to get available phase IDs for workflow "${workflow.name}".`);
64
64
  }
@@ -209,16 +209,13 @@ function convertActivityFilters(mcpToolActivityListFilters) {
209
209
  */
210
210
  function formatActivityListResponseWithPagination(activityData, workflow, init, phaseName, args) {
211
211
  const activities = Array.isArray(activityData) ? activityData : (activityData.activities || activityData || []);
212
- const metadata = activityData.metadata || {};
213
212
  const cleanedActivities = (0, index_1.transformActivities)(activities, workflow, init.users);
214
213
  const filteredActivities = args?.fields
215
214
  ? filterFieldsAndValues(cleanedActivities, args.fields, workflow.fields)
216
215
  : cleanedActivities;
217
- const totalCount = metadata.totalCount || activities.length;
218
216
  const currentPage = args?.page || 0;
219
217
  const limit = args?.limit || 50;
220
218
  const hasMorePages = activities.length === limit;
221
- const totalPages = Math.ceil(totalCount / limit);
222
219
  let responseText = `📊 **PAGINATION INFO:**\n`;
223
220
  responseText += `- Current page: ${currentPage + 1}\n`;
224
221
  responseText += `- Activities on this page: ${activities.length}\n`;
@@ -429,10 +426,12 @@ exports.listActivitiesTool = {
429
426
  fields: zod_1.z.preprocess((val) => {
430
427
  if (typeof val === 'string') {
431
428
  try {
429
+ // Try parsing as JSON array first
432
430
  return JSON.parse(val);
433
431
  }
434
432
  catch {
435
- return val;
433
+ // Fall back to comma-separated string
434
+ return val.split(',').map(f => f.trim()).filter(Boolean);
436
435
  }
437
436
  }
438
437
  return val;
@@ -462,6 +461,15 @@ exports.listActivitiesTool = {
462
461
  }),
463
462
  async execute(args, context) {
464
463
  try {
464
+ // Validate phaseId format early - must be 24-char MongoDB ID, not a simple number
465
+ if (args.phaseId && args.phaseId.length !== 24) {
466
+ return {
467
+ content: [{
468
+ type: "text",
469
+ text: `Invalid phaseId "${args.phaseId}" - must be a 24-character ID.\n\n**How to get valid phase IDs:**\n1. Call \`list_workflow_phases\` with the workflowId first\n2. Use the returned phase IDs (24 characters like "691ffdf84217e9e8434e56a5")\n\n**Example:**\n\`\`\`\nlist_workflow_phases({ workflowId: "${args.workflowId}" })\n\`\`\``,
470
+ }],
471
+ };
472
+ }
465
473
  const workflow = validateAndGetWorkflow(args.workflowId, context.init);
466
474
  const phaseId = await resolvePhaseForListing(workflow, args, context.init);
467
475
  if (!args.fields || args.fields.length === 0) {
@@ -588,7 +596,9 @@ exports.showActivityByIdTool = {
588
596
  // ============================================================================
589
597
  // TOOL 3: CREATE ACTIVITY
590
598
  // ============================================================================
591
- const createActivityDescription = `Create activity (single or bulk via activities array)`;
599
+ const createActivityDescription = `Create activity (single or bulk via activities array)
600
+
601
+ **Date fields:** Use Unix timestamp (ms), NOT strings. Example: 1737158400000, not "2025-01-18"`;
592
602
  exports.createActivityTool = {
593
603
  name: 'create_activity',
594
604
  group: tool_registry_1.ToolGroup.WRITE,
@@ -610,7 +620,7 @@ exports.createActivityTool = {
610
620
  fileIds: zod_1.z.union([zod_1.z.array(zod_1.z.string()), zod_1.z.string()]).optional().describe("File IDs to attach"),
611
621
  }))
612
622
  .optional()
613
- .describe("BULK: Array of activities to create. Use this for creating 3+ activities efficiently. If provided, single activity parameters (name, fields) are ignored."),
623
+ .describe("BULK: Array of activities. Example: [{\"name\": \"Task 1\", \"fields\": {...}}, {\"name\": \"Task 2\"}]. If provided, single parameters are ignored."),
614
624
  // SINGLE CREATION (used when 'activities' is not provided)
615
625
  name: zod_1.z
616
626
  .string()
@@ -720,8 +730,18 @@ exports.createActivityTool = {
720
730
  }
721
731
  return activity;
722
732
  };
733
+ // Parse activities if sent as JSON string
734
+ let parsedActivities = args.activities;
735
+ if (typeof args.activities === 'string' && args.activities.trim() !== '') {
736
+ try {
737
+ parsedActivities = JSON.parse(args.activities);
738
+ }
739
+ catch (e) {
740
+ throw new Error(`Invalid activities JSON: ${args.activities}`);
741
+ }
742
+ }
723
743
  // Determine if this is bulk or single creation
724
- const isBulk = args.activities && Array.isArray(args.activities) && args.activities.length > 0;
744
+ const isBulk = parsedActivities && Array.isArray(parsedActivities) && parsedActivities.length > 0;
725
745
  // Get workflow's default team (owner team) if available
726
746
  const rawWorkflow = context.init.processes.find((p) => p._id === args.workflowId);
727
747
  let defaultTeamId = rawWorkflow?.team;
@@ -739,12 +759,12 @@ exports.createActivityTool = {
739
759
  };
740
760
  if (isBulk) {
741
761
  // BULK CREATION
742
- logger.info(`Creating ${args.activities.length} activities in bulk`, {
762
+ logger.info(`Creating ${parsedActivities.length} activities in bulk`, {
743
763
  workflowId: args.workflowId,
744
- count: args.activities.length,
764
+ count: parsedActivities.length,
745
765
  defaultTeamId: defaultTeamId,
746
766
  });
747
- activitiesToCreate = args.activities.map((activityData) => {
767
+ activitiesToCreate = parsedActivities.map((activityData) => {
748
768
  const activity = processActivity(activityData);
749
769
  // Use default team if no teamId provided
750
770
  if (!activity.teamId && defaultTeamId) {
@@ -784,19 +804,16 @@ exports.createActivityTool = {
784
804
  if (isBulk) {
785
805
  // BULK RESPONSE
786
806
  const workflowUrl = `https://app.hailer.com/#/processes/${args.workflowId}`;
787
- const responseText = `🎉 Successfully created ${createdActivities.length} activities in workflow ${args.workflowId}!
788
-
789
- 📊 **Bulk Creation Summary:**
790
- - **Total Created**: ${createdActivities.length} activities
791
- - **Workflow**: ${args.workflowId}
792
- - **Status**: All activities created successfully
807
+ const createdIds = createdActivities.map((act) => act._id);
808
+ const responseText = `🎉 Created ${createdActivities.length} activities in workflow ${args.workflowId}!
793
809
 
794
- 🔗 **View Workflow**: ${workflowUrl}
810
+ 📋 **Created:** ${createdActivities.slice(0, 5).map((act) => `"${act.name}"`).join(', ')}${createdActivities.length > 5 ? ` +${createdActivities.length - 5} more` : ''}
795
811
 
796
- 📋 **Created Activities:**
797
- ${createdActivities.slice(0, 10).map((act, idx) => `${idx + 1}. "${act.name}" (ID: ${act._id}, Phase: ${act.currentPhase})`).join('\n')}${createdActivities.length > 10 ? `\n... and ${createdActivities.length - 10} more` : ''}
812
+ 🔗 [View Workflow](${workflowUrl})
798
813
 
799
- ✅ All activities are now active and ready for use!`;
814
+ \`\`\`json
815
+ {"created_ids":${JSON.stringify(createdIds)}}
816
+ \`\`\``;
800
817
  return {
801
818
  content: [
802
819
  {
@@ -813,10 +830,8 @@ ${createdActivities.slice(0, 10).map((act, idx) => `${idx + 1}. "${act.name}" (I
813
830
  const discussionId = createdActivity.discussion;
814
831
  const sequence = createdActivity.sequence;
815
832
  const currentPhase = createdActivity.currentPhase;
816
- const workspaceId = createdActivity.cid;
817
833
  const activityUrl = `https://app.hailer.com/#/activities/${activityId}`;
818
834
  const discussionUrl = `https://app.hailer.com/#/discussions/${discussionId}`;
819
- const workflowUrl = `https://app.hailer.com/#/processes/${args.workflowId}`;
820
835
  const responseText = `🎉 Successfully created activity "${args.name}" in workflow ${args.workflowId}!
821
836
 
822
837
  📋 **Activity Details:**
@@ -824,18 +839,12 @@ ${createdActivities.slice(0, 10).map((act, idx) => `${idx + 1}. "${act.name}" (I
824
839
  - **Discussion**: ${discussionId}
825
840
  - **Sequence**: #${sequence}
826
841
  - **Current Phase**: ${currentPhase}
827
- - **Status**: Active and ready for use
828
-
829
- 🔗 **Direct Links:**
830
- - **View Activity**: ${activityUrl}
831
- - **Open Discussion**: ${discussionUrl}
832
- - **View Workflow**: ${workflowUrl}
833
842
 
834
- 💬 ${args.discussionId ? "Activity linked to existing discussion" : "New discussion created automatically"} for team collaboration.
843
+ 🔗 **Links:** [Activity](${activityUrl}) | [Discussion](${discussionUrl})
835
844
 
836
- 🔧 **Debug Info:**
837
- - **Workspace ID**: ${workspaceId}
838
- - **Final Phase**: ${currentPhase}`;
845
+ \`\`\`json
846
+ {"created_ids":["${activityId}"],"discussionId":"${discussionId}"}
847
+ \`\`\``;
839
848
  return {
840
849
  content: [
841
850
  {
@@ -975,7 +984,7 @@ exports.updateActivityTool = {
975
984
  const commonPhaseId = phaseIds.length > 0 ? phaseIds[0] : undefined;
976
985
  // Call API with all updates
977
986
  const options = commonPhaseId ? { phaseId: commonPhaseId } : undefined;
978
- const result = await context.hailer.updateActivities(updates, options);
987
+ await context.hailer.updateActivities(updates, options);
979
988
  // Format bulk response
980
989
  return {
981
990
  content: [
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Bot Configuration Constants
3
+ */
4
+ import type { BotInfo } from './types';
5
+ export declare const LOCAL_STATE_FILE: string;
6
+ export declare const SCHEMAS_DIR: string;
7
+ export declare const LOCAL_CREDENTIALS_FILE: string;
8
+ export declare const SIGNAL_DEDUP_WINDOW_MS = 5000;
9
+ export declare const RESTART_DEBOUNCE_MS = 500;
10
+ export declare const AGENT_DIRECTORY_PATTERNS: string[];
11
+ export declare const DEPLOYED_PHASE_PATTERNS: string[];
12
+ export declare const RETIRED_PHASE_PATTERNS: string[];
13
+ export declare const FIELD_KEY_HAILER_PROFILE: string[];
14
+ export declare const FIELD_KEY_EMAIL: string[];
15
+ export declare const FIELD_KEY_PASSWORD: string[];
16
+ export declare const FIELD_KEY_BOT_TYPE: string[];
17
+ export declare const FIELD_KEY_SCHEMA_CONFIG: string[];
18
+ export declare const LEGACY_AGENT_ACTIVITY_IDS: Record<string, string>;
19
+ /**
20
+ * Available bots - single source of truth
21
+ */
22
+ export declare const AVAILABLE_BOTS: BotInfo[];
23
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ /**
3
+ * Bot Configuration Constants
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.AVAILABLE_BOTS = exports.LEGACY_AGENT_ACTIVITY_IDS = exports.FIELD_KEY_SCHEMA_CONFIG = exports.FIELD_KEY_BOT_TYPE = exports.FIELD_KEY_PASSWORD = exports.FIELD_KEY_EMAIL = exports.FIELD_KEY_HAILER_PROFILE = exports.RETIRED_PHASE_PATTERNS = exports.DEPLOYED_PHASE_PATTERNS = exports.AGENT_DIRECTORY_PATTERNS = exports.RESTART_DEBOUNCE_MS = exports.SIGNAL_DEDUP_WINDOW_MS = exports.LOCAL_CREDENTIALS_FILE = exports.SCHEMAS_DIR = exports.LOCAL_STATE_FILE = void 0;
40
+ const path = __importStar(require("path"));
41
+ // File paths
42
+ exports.LOCAL_STATE_FILE = path.join(process.cwd(), '.bot-state.json');
43
+ exports.SCHEMAS_DIR = path.join(process.cwd(), '.bot-schemas');
44
+ exports.LOCAL_CREDENTIALS_FILE = path.join(process.cwd(), '.bot-credentials.json');
45
+ // Signal deduplication
46
+ exports.SIGNAL_DEDUP_WINDOW_MS = 5000;
47
+ exports.RESTART_DEBOUNCE_MS = 500;
48
+ // Schema discovery patterns
49
+ exports.AGENT_DIRECTORY_PATTERNS = ['Agent Directory', 'AI Agents', '🤖 Agent Directory'];
50
+ exports.DEPLOYED_PHASE_PATTERNS = ['deployed', 'active', 'enabled'];
51
+ exports.RETIRED_PHASE_PATTERNS = ['retired', 'disabled', 'inactive'];
52
+ // Field key patterns for discovery
53
+ exports.FIELD_KEY_HAILER_PROFILE = ['hailerProfile', 'Agent Hailer profile'];
54
+ exports.FIELD_KEY_EMAIL = ['agentEmailInHailer', 'email', 'Email of Hailer profile'];
55
+ exports.FIELD_KEY_PASSWORD = ['password'];
56
+ exports.FIELD_KEY_BOT_TYPE = ['botType', 'bot_type', 'type'];
57
+ exports.FIELD_KEY_SCHEMA_CONFIG = ['schemaConfig', 'schema_config', 'schema_config_f3a'];
58
+ // Legacy activity IDs (fallback when discovery fails)
59
+ exports.LEGACY_AGENT_ACTIVITY_IDS = {
60
+ hal: '695e42deca61319424bc8b1f',
61
+ hailerExpert: '695e42deca61319424bc8b20',
62
+ bugFixer: '695e42deca61319424bc8b23',
63
+ vastuullisuus: '695e42dfca61319424bc8b2e'
64
+ };
65
+ /**
66
+ * Available bots - single source of truth
67
+ */
68
+ exports.AVAILABLE_BOTS = [
69
+ {
70
+ id: 'hal',
71
+ name: 'HAL',
72
+ description: 'Main orchestrator - handles general chat and coordinates specialists',
73
+ icon: '🤖'
74
+ },
75
+ {
76
+ id: 'bugFixer',
77
+ name: 'Bug Fixer',
78
+ description: 'Bug fixing specialist - analyzes and repairs Hailer app issues',
79
+ icon: '🔧'
80
+ },
81
+ {
82
+ id: 'hailerExpert',
83
+ name: 'Hailer Expert',
84
+ description: 'Workflow & data specialist - bulk operations, insights, reports',
85
+ icon: '📊'
86
+ },
87
+ {
88
+ id: 'vastuullisuus',
89
+ name: 'Vastuullisuus',
90
+ description: 'Sustainability analysis for SMEs',
91
+ icon: '🌱'
92
+ }
93
+ ];
94
+ //# sourceMappingURL=constants.js.map
@@ -15,8 +15,8 @@
15
15
  * - Orchestrator: Simply the first deployed bot with credentials (no special field needed)
16
16
  */
17
17
  import { z } from 'zod';
18
- import { Tool } from '../tool-registry';
19
- import { HailerApiClient } from '../utils/index';
18
+ import { Tool } from '../../tool-registry';
19
+ import { HailerApiClient } from '../../utils/index';
20
20
  interface SchemaConfig {
21
21
  agentDirectoryWorkflowId: string | null;
22
22
  deployedPhaseId: string | null;
@@ -180,7 +180,7 @@ export interface BotCredentials {
180
180
  * Password is masked for security unless showPassword is true.
181
181
  * Falls back to local file storage if Hailer is unavailable.
182
182
  *
183
- * @param botIdOrActivityId - The bot ID (hal, giuseppe, etc.) or activity ID
183
+ * @param botIdOrActivityId - The bot ID (hal, bugFixer, etc.) or activity ID
184
184
  * @param showPassword - If true, returns unmasked password. Default false for security.
185
185
  * @returns Credentials or null if not found
186
186
  */
@@ -192,7 +192,7 @@ export declare function getBotCredentials(botIdOrActivityId: string, showPasswor
192
192
  * Only updates fields that are provided.
193
193
  * Saves to local file storage as backup (and uses as fallback if Hailer unavailable).
194
194
  *
195
- * @param botIdOrActivityId - The bot ID (hal, giuseppe, etc.) or raw activity ID
195
+ * @param botIdOrActivityId - The bot ID (hal, bugFixer, etc.) or raw activity ID
196
196
  * @param credentials - Credentials to update (email and/or password)
197
197
  */
198
198
  export declare function updateBotCredentials(botIdOrActivityId: string, credentials: BotCredentials): Promise<void>;
@@ -203,7 +203,7 @@ export declare function updateBotCredentials(botIdOrActivityId: string, credenti
203
203
  * This function returns the actual password (not masked) from local storage.
204
204
  * Should only be used internally for creating bot daemon instances.
205
205
  *
206
- * @param userIdOrBotId - The user ID or legacy bot ID (hal, giuseppe, etc.)
206
+ * @param userIdOrBotId - The user ID or legacy bot ID (hal, bugFixer, etc.)
207
207
  * @returns Unmasked credentials or null if not found
208
208
  */
209
209
  export declare function getLocalBotCredentials(userIdOrBotId: string): {
@@ -250,4 +250,4 @@ export declare const disableBotTool: Tool;
250
250
  export declare const checkSpecialistStatusTool: Tool;
251
251
  export declare const botConfigTools: Tool<z.ZodType<any, z.ZodTypeDef, any>>[];
252
252
  export {};
253
- //# sourceMappingURL=bot-config.d.ts.map
253
+ //# sourceMappingURL=core.d.ts.map
@@ -83,10 +83,10 @@ exports.getPersistenceStatus = getPersistenceStatus;
83
83
  const zod_1 = require("zod");
84
84
  const fs = __importStar(require("fs"));
85
85
  const path = __importStar(require("path"));
86
- const tool_registry_1 = require("../tool-registry");
87
- const index_1 = require("../utils/index");
88
- const signal_handler_1 = require("../signal-handler");
89
- const config_1 = require("../../config");
86
+ const tool_registry_1 = require("../../tool-registry");
87
+ const index_1 = require("../../utils/index");
88
+ const signal_handler_1 = require("../../signal-handler");
89
+ const config_1 = require("../../../config");
90
90
  const logger = (0, index_1.createLogger)({ component: 'bot-config-tools' });
91
91
  // ============================================================================
92
92
  // Local State Persistence (fallback)
@@ -701,7 +701,7 @@ let discoveredActivityIds = {};
701
701
  const LEGACY_AGENT_ACTIVITY_IDS = {
702
702
  hal: '6957848b8d347a6c707ee3f6',
703
703
  hailerExpert: '695784913c659fc4d8fe0e02',
704
- giuseppe: '695e42deca61319424bc8b23',
704
+ bugFixer: '695e42deca61319424bc8b23',
705
705
  vastuullisuus: '695e42dfca61319424bc8b2e'
706
706
  };
707
707
  // Get activity ID for a bot - prefers discovered IDs over legacy
@@ -725,8 +725,8 @@ exports.AVAILABLE_BOTS = [
725
725
  icon: '🤖'
726
726
  },
727
727
  {
728
- id: 'giuseppe',
729
- name: 'Giuseppe',
728
+ id: 'bugFixer',
729
+ name: 'Bug Fixer',
730
730
  description: 'Bug fixing specialist - analyzes and repairs Hailer app issues',
731
731
  icon: '🔧'
732
732
  },
@@ -1977,12 +1977,12 @@ async function getAgentUserIdFromDirectory(botId, hailerClient) {
1977
1977
  * Password is masked for security unless showPassword is true.
1978
1978
  * Falls back to local file storage if Hailer is unavailable.
1979
1979
  *
1980
- * @param botIdOrActivityId - The bot ID (hal, giuseppe, etc.) or activity ID
1980
+ * @param botIdOrActivityId - The bot ID (hal, bugFixer, etc.) or activity ID
1981
1981
  * @param showPassword - If true, returns unmasked password. Default false for security.
1982
1982
  * @returns Credentials or null if not found
1983
1983
  */
1984
1984
  async function getBotCredentials(botIdOrActivityId, showPassword = false) {
1985
- // Support both bot IDs (hal, giuseppe) and activity IDs
1985
+ // Support both bot IDs (hal, bugFixer) and activity IDs
1986
1986
  let botId = botIdOrActivityId;
1987
1987
  let activityId = getActivityIdForBot(botIdOrActivityId);
1988
1988
  // If not found by bot ID, try reverse lookup by activity ID
@@ -2092,7 +2092,7 @@ async function getBotCredentials(botIdOrActivityId, showPassword = false) {
2092
2092
  * Only updates fields that are provided.
2093
2093
  * Saves to local file storage as backup (and uses as fallback if Hailer unavailable).
2094
2094
  *
2095
- * @param botIdOrActivityId - The bot ID (hal, giuseppe, etc.) or raw activity ID
2095
+ * @param botIdOrActivityId - The bot ID (hal, bugFixer, etc.) or raw activity ID
2096
2096
  * @param credentials - Credentials to update (email and/or password)
2097
2097
  */
2098
2098
  async function updateBotCredentials(botIdOrActivityId, credentials) {
@@ -2178,7 +2178,7 @@ async function updateBotCredentials(botIdOrActivityId, credentials) {
2178
2178
  * This function returns the actual password (not masked) from local storage.
2179
2179
  * Should only be used internally for creating bot daemon instances.
2180
2180
  *
2181
- * @param userIdOrBotId - The user ID or legacy bot ID (hal, giuseppe, etc.)
2181
+ * @param userIdOrBotId - The user ID or legacy bot ID (hal, bugFixer, etc.)
2182
2182
  * @returns Unmasked credentials or null if not found
2183
2183
  */
2184
2184
  function getLocalBotCredentials(userIdOrBotId) {
@@ -2243,7 +2243,7 @@ exports.enableBotTool = {
2243
2243
  group: tool_registry_1.ToolGroup.WRITE,
2244
2244
  description: 'Enable an AI bot in this workspace',
2245
2245
  schema: zod_1.z.object({
2246
- botId: zod_1.z.string().describe('Bot ID to enable (hal, giuseppe, hailerExpert, vastuullisuus)')
2246
+ botId: zod_1.z.string().describe('Bot ID to enable (hal, bugFixer, hailerExpert, vastuullisuus)')
2247
2247
  }),
2248
2248
  execute: async (params, _context) => {
2249
2249
  const { botId } = params;
@@ -2274,7 +2274,7 @@ exports.disableBotTool = {
2274
2274
  group: tool_registry_1.ToolGroup.WRITE,
2275
2275
  description: 'Disable an AI bot in this workspace',
2276
2276
  schema: zod_1.z.object({
2277
- botId: zod_1.z.string().describe('Bot ID to disable (hal, giuseppe, hailerExpert, vastuullisuus)')
2277
+ botId: zod_1.z.string().describe('Bot ID to disable (hal, bugFixer, hailerExpert, vastuullisuus)')
2278
2278
  }),
2279
2279
  execute: async (params, _context) => {
2280
2280
  const { botId } = params;
@@ -2306,7 +2306,7 @@ exports.checkSpecialistStatusTool = {
2306
2306
  group: tool_registry_1.ToolGroup.READ,
2307
2307
  description: 'Check real-time status of AI specialists from Agent Directory. Returns which specialists are deployed (active) vs retired (disabled).',
2308
2308
  schema: zod_1.z.object({
2309
- specialistName: zod_1.z.string().optional().describe("Optional: specific specialist name to check (e.g., 'Hailer Expert', 'Giuseppe'). If not provided, returns all specialists.")
2309
+ specialistName: zod_1.z.string().optional().describe("Optional: specific specialist name to check (e.g., 'Hailer Expert', 'Bug Fixer'). If not provided, returns all specialists.")
2310
2310
  }),
2311
2311
  execute: async (params, _context) => {
2312
2312
  const { specialistName } = params;
@@ -2453,4 +2453,4 @@ exports.botConfigTools = [
2453
2453
  exports.disableBotTool,
2454
2454
  exports.checkSpecialistStatusTool
2455
2455
  ];
2456
- //# sourceMappingURL=bot-config.js.map
2456
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Bot Configuration Module
3
+ *
4
+ * Modular structure for bot configuration management.
5
+ * Re-exports all public APIs for backwards compatibility.
6
+ */
7
+ export type { SchemaConfig, BotStateEntry, BotStateMap, BotInfo, BotCredentials, ActivitySchemaConfig, LocalCredentials } from './types';
8
+ export { AVAILABLE_BOTS, LEGACY_AGENT_ACTIVITY_IDS } from './constants';
9
+ export { getWorkspaceByWorkflowId, getAllConfiguredWorkspaces, setActiveWorkspace, getActiveWorkspace, getWorkspaceSchema, setWorkspaceSchema, getAgentDirectoryWorkflowId, getPhaseIds, getOrchestratorUserId, setOrchestratorUserId, onBotStateChange, onBotCredentialsChange, onDaemonRestartNeeded, cleanupBotConfig, getBotState, getBotUserId, getBotType, getEnabledBotsWithTypes, setBotUserId, setBotEnabled, handleActivityPhaseChange, reloadConfigFromHailer, initBotConfigPersistence, initWorkspaceSchema, isPersistenceInitialized, getBotCredentials, updateBotCredentials, getLocalBotCredentials, getAllLocalBotCredentials, getPersistenceStatus, listBotsConfigTool, enableBotTool, disableBotTool, checkSpecialistStatusTool, botConfigTools } from './core';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /**
3
+ * Bot Configuration Module
4
+ *
5
+ * Modular structure for bot configuration management.
6
+ * Re-exports all public APIs for backwards compatibility.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.botConfigTools = exports.checkSpecialistStatusTool = exports.disableBotTool = exports.enableBotTool = exports.listBotsConfigTool = exports.getPersistenceStatus = exports.getAllLocalBotCredentials = exports.getLocalBotCredentials = exports.updateBotCredentials = exports.getBotCredentials = exports.isPersistenceInitialized = exports.initWorkspaceSchema = exports.initBotConfigPersistence = exports.reloadConfigFromHailer = exports.handleActivityPhaseChange = exports.setBotEnabled = exports.setBotUserId = exports.getEnabledBotsWithTypes = exports.getBotType = exports.getBotUserId = exports.getBotState = exports.cleanupBotConfig = exports.onDaemonRestartNeeded = exports.onBotCredentialsChange = exports.onBotStateChange = exports.setOrchestratorUserId = exports.getOrchestratorUserId = exports.getPhaseIds = exports.getAgentDirectoryWorkflowId = exports.setWorkspaceSchema = exports.getWorkspaceSchema = exports.getActiveWorkspace = exports.setActiveWorkspace = exports.getAllConfiguredWorkspaces = exports.getWorkspaceByWorkflowId = exports.LEGACY_AGENT_ACTIVITY_IDS = exports.AVAILABLE_BOTS = void 0;
10
+ // Constants
11
+ var constants_1 = require("./constants");
12
+ Object.defineProperty(exports, "AVAILABLE_BOTS", { enumerable: true, get: function () { return constants_1.AVAILABLE_BOTS; } });
13
+ Object.defineProperty(exports, "LEGACY_AGENT_ACTIVITY_IDS", { enumerable: true, get: function () { return constants_1.LEGACY_AGENT_ACTIVITY_IDS; } });
14
+ // Core functionality - all exports from core.ts
15
+ var core_1 = require("./core");
16
+ // Schema management
17
+ Object.defineProperty(exports, "getWorkspaceByWorkflowId", { enumerable: true, get: function () { return core_1.getWorkspaceByWorkflowId; } });
18
+ Object.defineProperty(exports, "getAllConfiguredWorkspaces", { enumerable: true, get: function () { return core_1.getAllConfiguredWorkspaces; } });
19
+ Object.defineProperty(exports, "setActiveWorkspace", { enumerable: true, get: function () { return core_1.setActiveWorkspace; } });
20
+ Object.defineProperty(exports, "getActiveWorkspace", { enumerable: true, get: function () { return core_1.getActiveWorkspace; } });
21
+ Object.defineProperty(exports, "getWorkspaceSchema", { enumerable: true, get: function () { return core_1.getWorkspaceSchema; } });
22
+ Object.defineProperty(exports, "setWorkspaceSchema", { enumerable: true, get: function () { return core_1.setWorkspaceSchema; } });
23
+ Object.defineProperty(exports, "getAgentDirectoryWorkflowId", { enumerable: true, get: function () { return core_1.getAgentDirectoryWorkflowId; } });
24
+ Object.defineProperty(exports, "getPhaseIds", { enumerable: true, get: function () { return core_1.getPhaseIds; } });
25
+ // Orchestrator tracking
26
+ Object.defineProperty(exports, "getOrchestratorUserId", { enumerable: true, get: function () { return core_1.getOrchestratorUserId; } });
27
+ Object.defineProperty(exports, "setOrchestratorUserId", { enumerable: true, get: function () { return core_1.setOrchestratorUserId; } });
28
+ // Callbacks
29
+ Object.defineProperty(exports, "onBotStateChange", { enumerable: true, get: function () { return core_1.onBotStateChange; } });
30
+ Object.defineProperty(exports, "onBotCredentialsChange", { enumerable: true, get: function () { return core_1.onBotCredentialsChange; } });
31
+ Object.defineProperty(exports, "onDaemonRestartNeeded", { enumerable: true, get: function () { return core_1.onDaemonRestartNeeded; } });
32
+ Object.defineProperty(exports, "cleanupBotConfig", { enumerable: true, get: function () { return core_1.cleanupBotConfig; } });
33
+ // Bot state
34
+ Object.defineProperty(exports, "getBotState", { enumerable: true, get: function () { return core_1.getBotState; } });
35
+ Object.defineProperty(exports, "getBotUserId", { enumerable: true, get: function () { return core_1.getBotUserId; } });
36
+ Object.defineProperty(exports, "getBotType", { enumerable: true, get: function () { return core_1.getBotType; } });
37
+ Object.defineProperty(exports, "getEnabledBotsWithTypes", { enumerable: true, get: function () { return core_1.getEnabledBotsWithTypes; } });
38
+ Object.defineProperty(exports, "setBotUserId", { enumerable: true, get: function () { return core_1.setBotUserId; } });
39
+ Object.defineProperty(exports, "setBotEnabled", { enumerable: true, get: function () { return core_1.setBotEnabled; } });
40
+ // Activity handling
41
+ Object.defineProperty(exports, "handleActivityPhaseChange", { enumerable: true, get: function () { return core_1.handleActivityPhaseChange; } });
42
+ Object.defineProperty(exports, "reloadConfigFromHailer", { enumerable: true, get: function () { return core_1.reloadConfigFromHailer; } });
43
+ // Persistence
44
+ Object.defineProperty(exports, "initBotConfigPersistence", { enumerable: true, get: function () { return core_1.initBotConfigPersistence; } });
45
+ Object.defineProperty(exports, "initWorkspaceSchema", { enumerable: true, get: function () { return core_1.initWorkspaceSchema; } });
46
+ Object.defineProperty(exports, "isPersistenceInitialized", { enumerable: true, get: function () { return core_1.isPersistenceInitialized; } });
47
+ // Credentials
48
+ Object.defineProperty(exports, "getBotCredentials", { enumerable: true, get: function () { return core_1.getBotCredentials; } });
49
+ Object.defineProperty(exports, "updateBotCredentials", { enumerable: true, get: function () { return core_1.updateBotCredentials; } });
50
+ Object.defineProperty(exports, "getLocalBotCredentials", { enumerable: true, get: function () { return core_1.getLocalBotCredentials; } });
51
+ Object.defineProperty(exports, "getAllLocalBotCredentials", { enumerable: true, get: function () { return core_1.getAllLocalBotCredentials; } });
52
+ Object.defineProperty(exports, "getPersistenceStatus", { enumerable: true, get: function () { return core_1.getPersistenceStatus; } });
53
+ // MCP Tools
54
+ Object.defineProperty(exports, "listBotsConfigTool", { enumerable: true, get: function () { return core_1.listBotsConfigTool; } });
55
+ Object.defineProperty(exports, "enableBotTool", { enumerable: true, get: function () { return core_1.enableBotTool; } });
56
+ Object.defineProperty(exports, "disableBotTool", { enumerable: true, get: function () { return core_1.disableBotTool; } });
57
+ Object.defineProperty(exports, "checkSpecialistStatusTool", { enumerable: true, get: function () { return core_1.checkSpecialistStatusTool; } });
58
+ Object.defineProperty(exports, "botConfigTools", { enumerable: true, get: function () { return core_1.botConfigTools; } });
59
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Bot Configuration MCP Tools
3
+ *
4
+ * Re-exported from core.ts for modular structure.
5
+ */
6
+ export { listBotsConfigTool, enableBotTool, disableBotTool, checkSpecialistStatusTool, botConfigTools } from './core';
7
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /**
3
+ * Bot Configuration MCP Tools
4
+ *
5
+ * Re-exported from core.ts for modular structure.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.botConfigTools = exports.checkSpecialistStatusTool = exports.disableBotTool = exports.enableBotTool = exports.listBotsConfigTool = void 0;
9
+ var core_1 = require("./core");
10
+ Object.defineProperty(exports, "listBotsConfigTool", { enumerable: true, get: function () { return core_1.listBotsConfigTool; } });
11
+ Object.defineProperty(exports, "enableBotTool", { enumerable: true, get: function () { return core_1.enableBotTool; } });
12
+ Object.defineProperty(exports, "disableBotTool", { enumerable: true, get: function () { return core_1.disableBotTool; } });
13
+ Object.defineProperty(exports, "checkSpecialistStatusTool", { enumerable: true, get: function () { return core_1.checkSpecialistStatusTool; } });
14
+ Object.defineProperty(exports, "botConfigTools", { enumerable: true, get: function () { return core_1.botConfigTools; } });
15
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Bot Configuration Types
3
+ */
4
+ export interface SchemaConfig {
5
+ agentDirectoryWorkflowId: string | null;
6
+ deployedPhaseId: string | null;
7
+ retiredPhaseId: string | null;
8
+ hailerProfileFieldId: string | null;
9
+ emailFieldId: string | null;
10
+ passwordFieldId: string | null;
11
+ botTypeFieldId: string | null;
12
+ }
13
+ export interface BotStateEntry {
14
+ enabled: boolean;
15
+ userId: string | null;
16
+ botType: string | null;
17
+ }
18
+ export type BotStateMap = {
19
+ [userIdOrBotId: string]: BotStateEntry;
20
+ };
21
+ export interface BotInfo {
22
+ id: string;
23
+ name: string;
24
+ description: string;
25
+ icon: string;
26
+ }
27
+ export interface BotCredentials {
28
+ email?: string;
29
+ password?: string;
30
+ displayName?: string;
31
+ workspaceId?: string;
32
+ }
33
+ export interface ActivitySchemaConfig {
34
+ agentDirectoryWorkflowId?: string;
35
+ deployedPhaseId?: string;
36
+ retiredPhaseId?: string;
37
+ hailerProfileFieldId?: string;
38
+ emailFieldId?: string;
39
+ passwordFieldId?: string;
40
+ botTypeFieldId?: string;
41
+ }
42
+ export interface LocalCredentials {
43
+ [userId: string]: {
44
+ email: string;
45
+ password: string;
46
+ displayName?: string;
47
+ workspaceId?: string;
48
+ };
49
+ }
50
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Bot Configuration Types
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=types.js.map