@hailer/mcp 1.1.16 → 1.1.17-beta.0
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/.claude/CLAUDE.md +117 -320
- package/.claude/commands/app-squad.md +86 -90
- package/.claude/commands/audit-squad.md +19 -19
- package/.claude/commands/autoplan.md +3 -3
- package/.claude/commands/cleanup-squad.md +16 -16
- package/.claude/commands/config-squad.md +30 -30
- package/.claude/commands/crud-squad.md +23 -23
- package/.claude/commands/data-squad.md +21 -21
- package/.claude/commands/debug-squad.md +44 -44
- package/.claude/commands/doc-squad.md +16 -16
- package/.claude/commands/help:agents.md +130 -99
- package/.claude/commands/help:commands.md +15 -15
- package/.claude/commands/help:faq.md +17 -17
- package/.claude/commands/help:plugins.md +1 -1
- package/.claude/commands/help:skills.md +18 -24
- package/.claude/commands/hotfix-squad.md +22 -22
- package/.claude/commands/integration-squad.md +22 -22
- package/.claude/commands/janitor-squad.md +31 -31
- package/.claude/commands/learn-auto.md +5 -5
- package/.claude/commands/learn.md +12 -20
- package/.claude/commands/onboard-squad.md +39 -49
- package/.claude/commands/plan-workspace.md +2 -2
- package/.claude/commands/publish.md +32 -37
- package/.claude/commands/review-squad.md +27 -27
- package/.claude/commands/stats.md +26 -12
- package/.claude/commands/swarm.md +25 -25
- package/.claude/skills/chrome-mcp-reference/SKILL.md +5 -0
- package/.claude/skills/hailer-api-client/SKILL.md +55 -16
- package/.claude/skills/hailer-app-builder/SKILL.md +4 -270
- package/.claude/skills/hailer-apps-pictures/SKILL.md +3 -3
- package/.claude/skills/hailer-design-system/SKILL.md +96 -4
- package/.claude/skills/hailer-monolith-automations/SKILL.md +138 -116
- package/.claude/skills/hailer-permissions-system/SKILL.md +6 -9
- package/.claude/skills/hailer-project-protocol/SKILL.md +20 -110
- package/.claude/skills/integration-patterns/SKILL.md +6 -6
- package/.claude/skills/lsp-setup/SKILL.md +8 -9
- package/.claude/skills/sdk-activity-patterns/SKILL.md +238 -0
- package/.claude/skills/{SDK-document-templates → sdk-document-templates}/SKILL.md +13 -340
- package/.claude/skills/{SDK-function-fields → sdk-function-fields}/SKILL.md +8 -40
- package/.claude/skills/{SDK-insight-queries → sdk-insight-queries}/SKILL.md +114 -392
- package/.claude/skills/{SDK-ws-config-skill → sdk-ws-config-skill}/SKILL.md +79 -310
- package/.claude/skills/zapier-hailer-patterns/SKILL.md +84 -361
- package/.opencode/package-lock.json +117 -0
- package/CLAUDE.md +5 -358
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +10 -127
- package/dist/app.js.map +1 -1
- package/dist/bot/bot-manager.d.ts +3 -14
- package/dist/bot/bot-manager.d.ts.map +1 -1
- package/dist/bot/bot-manager.js +13 -4
- package/dist/bot/bot-manager.js.map +1 -1
- package/dist/bot/bot.d.ts +23 -102
- package/dist/bot/bot.d.ts.map +1 -1
- package/dist/bot/bot.js +356 -1212
- package/dist/bot/bot.js.map +1 -1
- package/dist/bot/services/bot-permissions.d.ts +50 -0
- package/dist/bot/services/bot-permissions.d.ts.map +1 -0
- package/dist/bot/services/bot-permissions.js +198 -0
- package/dist/bot/services/bot-permissions.js.map +1 -0
- package/dist/bot/services/index.d.ts +4 -2
- package/dist/bot/services/index.d.ts.map +1 -1
- package/dist/bot/services/index.js +10 -5
- package/dist/bot/services/index.js.map +1 -1
- package/dist/bot/services/message-classifier.d.ts +1 -1
- package/dist/bot/services/message-classifier.d.ts.map +1 -1
- package/dist/bot/services/message-classifier.js.map +1 -1
- package/dist/bot/services/signal-router.d.ts +32 -0
- package/dist/bot/services/signal-router.d.ts.map +1 -0
- package/dist/bot/services/signal-router.js +132 -0
- package/dist/bot/services/signal-router.js.map +1 -0
- package/dist/bot/services/system-prompt.d.ts +12 -0
- package/dist/bot/services/system-prompt.d.ts.map +1 -0
- package/dist/bot/services/system-prompt.js +93 -0
- package/dist/bot/services/system-prompt.js.map +1 -0
- package/dist/bot/services/types.d.ts +7 -34
- package/dist/bot/services/types.d.ts.map +1 -1
- package/dist/bot/services/types.js +0 -3
- package/dist/bot/services/types.js.map +1 -1
- package/dist/bot/services/workspace-refresh.d.ts +47 -0
- package/dist/bot/services/workspace-refresh.d.ts.map +1 -0
- package/dist/bot/services/workspace-refresh.js +154 -0
- package/dist/bot/services/workspace-refresh.js.map +1 -0
- package/dist/bot-config/constants.d.ts +0 -36
- package/dist/bot-config/constants.d.ts.map +1 -1
- package/dist/bot-config/constants.js +1 -76
- package/dist/bot-config/constants.js.map +1 -1
- package/dist/bot-config/context.d.ts +2 -42
- package/dist/bot-config/context.d.ts.map +1 -1
- package/dist/bot-config/context.js +13 -134
- package/dist/bot-config/context.js.map +1 -1
- package/dist/bot-config/index.d.ts +6 -15
- package/dist/bot-config/index.d.ts.map +1 -1
- package/dist/bot-config/index.js +5 -80
- package/dist/bot-config/index.js.map +1 -1
- package/dist/bot-config/loader.d.ts +16 -4
- package/dist/bot-config/loader.d.ts.map +1 -1
- package/dist/bot-config/loader.js +187 -96
- package/dist/bot-config/loader.js.map +1 -1
- package/dist/bot-config/persistence.d.ts +1 -52
- package/dist/bot-config/persistence.d.ts.map +1 -1
- package/dist/bot-config/persistence.js +3 -213
- package/dist/bot-config/persistence.js.map +1 -1
- package/dist/bot-config/state.d.ts +0 -41
- package/dist/bot-config/state.d.ts.map +1 -1
- package/dist/bot-config/state.js +0 -151
- package/dist/bot-config/state.js.map +1 -1
- package/dist/bot-config/tools.d.ts +1 -1
- package/dist/bot-config/tools.js +27 -27
- package/dist/bot-config/tools.js.map +1 -1
- package/dist/bot-config/types.d.ts +39 -32
- package/dist/bot-config/types.d.ts.map +1 -1
- package/dist/bot-config/types.js +0 -3
- package/dist/bot-config/types.js.map +1 -1
- package/dist/bot-config/webhooks.d.ts +0 -4
- package/dist/bot-config/webhooks.d.ts.map +1 -1
- package/dist/bot-config/webhooks.js +0 -13
- package/dist/bot-config/webhooks.js.map +1 -1
- package/dist/commands/seed-config.js +16 -31
- package/dist/commands/seed-config.js.map +1 -1
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -15
- package/dist/config.js.map +1 -1
- package/dist/mcp/hailer-clients.js +2 -2
- package/dist/mcp/hailer-clients.js.map +1 -1
- package/dist/mcp/tool-registry.d.ts +10 -115
- package/dist/mcp/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tool-registry.js +39 -363
- package/dist/mcp/tool-registry.js.map +1 -1
- package/dist/mcp/tools/activity.d.ts +3 -0
- package/dist/mcp/tools/activity.d.ts.map +1 -1
- package/dist/mcp/tools/activity.js +8 -1
- package/dist/mcp/tools/activity.js.map +1 -1
- package/dist/mcp/tools/app-core.d.ts +3 -0
- package/dist/mcp/tools/app-core.d.ts.map +1 -1
- package/dist/mcp/tools/app-core.js +9 -2
- package/dist/mcp/tools/app-core.js.map +1 -1
- package/dist/mcp/tools/app-marketplace.d.ts +3 -0
- package/dist/mcp/tools/app-marketplace.d.ts.map +1 -1
- package/dist/mcp/tools/app-marketplace.js +13 -1
- package/dist/mcp/tools/app-marketplace.js.map +1 -1
- package/dist/mcp/tools/app-member.d.ts +3 -0
- package/dist/mcp/tools/app-member.d.ts.map +1 -1
- package/dist/mcp/tools/app-member.js +6 -1
- package/dist/mcp/tools/app-member.js.map +1 -1
- package/dist/mcp/tools/app-scaffold.d.ts +3 -0
- package/dist/mcp/tools/app-scaffold.d.ts.map +1 -1
- package/dist/mcp/tools/app-scaffold.js +15 -11
- package/dist/mcp/tools/app-scaffold.js.map +1 -1
- package/dist/mcp/tools/company.d.ts +3 -0
- package/dist/mcp/tools/company.d.ts.map +1 -1
- package/dist/mcp/tools/company.js +5 -1
- package/dist/mcp/tools/company.js.map +1 -1
- package/dist/mcp/tools/discussion.d.ts +3 -0
- package/dist/mcp/tools/discussion.d.ts.map +1 -1
- package/dist/mcp/tools/discussion.js +13 -2
- package/dist/mcp/tools/discussion.js.map +1 -1
- package/dist/mcp/tools/file.d.ts +3 -0
- package/dist/mcp/tools/file.d.ts.map +1 -1
- package/dist/mcp/tools/file.js +6 -1
- package/dist/mcp/tools/file.js.map +1 -1
- package/dist/mcp/tools/index.d.ts +7 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +34 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/insight.d.ts +3 -0
- package/dist/mcp/tools/insight.d.ts.map +1 -1
- package/dist/mcp/tools/insight.js +18 -8
- package/dist/mcp/tools/insight.js.map +1 -1
- package/dist/mcp/tools/user.d.ts +3 -0
- package/dist/mcp/tools/user.d.ts.map +1 -1
- package/dist/mcp/tools/user.js +6 -1
- package/dist/mcp/tools/user.js.map +1 -1
- package/dist/mcp/tools/workflow-permissions.d.ts +3 -0
- package/dist/mcp/tools/workflow-permissions.d.ts.map +1 -1
- package/dist/mcp/tools/workflow-permissions.js +8 -1
- package/dist/mcp/tools/workflow-permissions.js.map +1 -1
- package/dist/mcp/tools/workflow.d.ts +3 -0
- package/dist/mcp/tools/workflow.d.ts.map +1 -1
- package/dist/mcp/tools/workflow.js +29 -28
- package/dist/mcp/tools/workflow.js.map +1 -1
- package/dist/mcp/utils/index.d.ts +4 -11
- package/dist/mcp/utils/index.d.ts.map +1 -1
- package/dist/mcp/utils/index.js +5 -36
- package/dist/mcp/utils/index.js.map +1 -1
- package/dist/mcp/utils/role-utils.d.ts +0 -32
- package/dist/mcp/utils/role-utils.d.ts.map +1 -1
- package/dist/mcp/utils/role-utils.js +0 -73
- package/dist/mcp/utils/role-utils.js.map +1 -1
- package/dist/mcp/utils/tool-helpers.d.ts +0 -25
- package/dist/mcp/utils/tool-helpers.d.ts.map +1 -1
- package/dist/mcp/utils/tool-helpers.js +0 -34
- package/dist/mcp/utils/tool-helpers.js.map +1 -1
- package/dist/mcp/webhook-handler.d.ts +4 -34
- package/dist/mcp/webhook-handler.d.ts.map +1 -1
- package/dist/mcp/webhook-handler.js +57 -74
- package/dist/mcp/webhook-handler.js.map +1 -1
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +3 -78
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -2
- package/.claude/agents/agent-ada-skill-builder.md +0 -94
- package/.claude/agents/agent-alejandro-function-fields.md +0 -342
- package/.claude/agents/agent-bjorn-config-audit.md +0 -103
- package/.claude/agents/agent-builder-agent-creator.md +0 -130
- package/.claude/agents/agent-code-simplifier.md +0 -53
- package/.claude/agents/agent-dmitri-activity-crud.md +0 -159
- package/.claude/agents/agent-giuseppe-app-builder.md +0 -208
- package/.claude/agents/agent-gunther-mcp-tools.md +0 -39
- package/.claude/agents/agent-helga-workflow-config.md +0 -204
- package/.claude/agents/agent-igor-activity-mover-automation.md +0 -125
- package/.claude/agents/agent-ingrid-doc-templates.md +0 -261
- package/.claude/agents/agent-ivan-monolith.md +0 -154
- package/.claude/agents/agent-kenji-data-reader.md +0 -86
- package/.claude/agents/agent-lars-code-inspector.md +0 -102
- package/.claude/agents/agent-marco-mockup-builder.md +0 -110
- package/.claude/agents/agent-marcus-api-documenter.md +0 -323
- package/.claude/agents/agent-marketplace-publisher.md +0 -280
- package/.claude/agents/agent-marketplace-reviewer.md +0 -309
- package/.claude/agents/agent-permissions-handler.md +0 -208
- package/.claude/agents/agent-simple-writer.md +0 -48
- package/.claude/agents/agent-svetlana-code-review.md +0 -171
- package/.claude/agents/agent-tanya-test-runner.md +0 -333
- package/.claude/agents/agent-ui-designer.md +0 -100
- package/.claude/agents/agent-viktor-sql-insights.md +0 -212
- package/.claude/agents/agent-web-search.md +0 -55
- package/.claude/agents/agent-yevgeni-discussions.md +0 -45
- package/.claude/agents/agent-zara-zapier.md +0 -159
- package/.claude/skills/SDK-activity-patterns/SKILL.md +0 -428
- package/.claude/skills/SDK-generate-skill/SKILL.md +0 -92
- package/.claude/skills/SDK-init-skill/SKILL.md +0 -127
- package/.claude/skills/agent-structure/SKILL.md +0 -98
- package/.claude/skills/delegation-routing/SKILL.md +0 -202
- package/.claude/skills/frontend-design/SKILL.md +0 -254
- package/.claude/skills/hailer-activity-mover/SKILL.md +0 -213
- package/.claude/skills/hailer-rest-api/SKILL.md +0 -61
- package/.claude/skills/hailer-rest-api/hailer-activities.md +0 -184
- package/.claude/skills/hailer-rest-api/hailer-admin.md +0 -473
- package/.claude/skills/hailer-rest-api/hailer-calendar.md +0 -256
- package/.claude/skills/hailer-rest-api/hailer-feed.md +0 -249
- package/.claude/skills/hailer-rest-api/hailer-insights.md +0 -195
- package/.claude/skills/hailer-rest-api/hailer-messaging.md +0 -276
- package/.claude/skills/hailer-rest-api/hailer-workflows.md +0 -283
- package/.claude/skills/insight-join-patterns/SKILL.md +0 -174
- package/.claude/skills/json-only-output/SKILL.md +0 -72
- package/.claude/skills/mcp-direct-tools/SKILL.md +0 -153
- package/.claude/skills/optional-parameters/SKILL.md +0 -72
- package/.claude/skills/tool-parameter-usage/SKILL.md +0 -126
- package/.claude/skills/tool-response-verification/SKILL.md +0 -92
- package/.opencode/agent/agent-ada-skill-builder.md +0 -35
- package/.opencode/agent/agent-alejandro-function-fields.md +0 -39
- package/.opencode/agent/agent-bjorn-config-audit.md +0 -36
- package/.opencode/agent/agent-builder-agent-creator.md +0 -39
- package/.opencode/agent/agent-code-simplifier.md +0 -31
- package/.opencode/agent/agent-dmitri-activity-crud.md +0 -40
- package/.opencode/agent/agent-giuseppe-app-builder.md +0 -37
- package/.opencode/agent/agent-gunther-mcp-tools.md +0 -39
- package/.opencode/agent/agent-helga-workflow-config.md +0 -204
- package/.opencode/agent/agent-igor-activity-mover-automation.md +0 -46
- package/.opencode/agent/agent-ingrid-doc-templates.md +0 -39
- package/.opencode/agent/agent-ivan-monolith.md +0 -46
- package/.opencode/agent/agent-kenji-data-reader.md +0 -53
- package/.opencode/agent/agent-lars-code-inspector.md +0 -28
- package/.opencode/agent/agent-marco-mockup-builder.md +0 -42
- package/.opencode/agent/agent-marcus-api-documenter.md +0 -53
- package/.opencode/agent/agent-marketplace-publisher.md +0 -44
- package/.opencode/agent/agent-marketplace-reviewer.md +0 -42
- package/.opencode/agent/agent-permissions-handler.md +0 -50
- package/.opencode/agent/agent-simple-writer.md +0 -45
- package/.opencode/agent/agent-svetlana-code-review.md +0 -39
- package/.opencode/agent/agent-tanya-test-runner.md +0 -57
- package/.opencode/agent/agent-ui-designer.md +0 -56
- package/.opencode/agent/agent-viktor-sql-insights.md +0 -34
- package/.opencode/agent/agent-web-search.md +0 -42
- package/.opencode/agent/agent-yevgeni-discussions.md +0 -37
- package/.opencode/agent/agent-zara-zapier.md +0 -53
- package/.opencode/commands/app-squad.md +0 -135
- package/.opencode/commands/audit-squad.md +0 -158
- package/.opencode/commands/autoplan.md +0 -563
- package/.opencode/commands/cleanup-squad.md +0 -98
- package/.opencode/commands/config-squad.md +0 -106
- package/.opencode/commands/crud-squad.md +0 -87
- package/.opencode/commands/data-squad.md +0 -97
- package/.opencode/commands/debug-squad.md +0 -303
- package/.opencode/commands/doc-squad.md +0 -65
- package/.opencode/commands/handoff.md +0 -137
- package/.opencode/commands/health.md +0 -49
- package/.opencode/commands/help-agents.md +0 -151
- package/.opencode/commands/help-commands.md +0 -32
- package/.opencode/commands/help-faq.md +0 -29
- package/.opencode/commands/help-plugins.md +0 -28
- package/.opencode/commands/help-skills.md +0 -7
- package/.opencode/commands/help-tools.md +0 -40
- package/.opencode/commands/help.md +0 -28
- package/.opencode/commands/hotfix-squad.md +0 -112
- package/.opencode/commands/integration-squad.md +0 -82
- package/.opencode/commands/janitor-squad.md +0 -167
- package/.opencode/commands/learn-auto.md +0 -120
- package/.opencode/commands/learn.md +0 -120
- package/.opencode/commands/mcp-list.md +0 -27
- package/.opencode/commands/onboard-squad.md +0 -140
- package/.opencode/commands/plan-workspace.md +0 -732
- package/.opencode/commands/prd.md +0 -131
- package/.opencode/commands/project-status.md +0 -82
- package/.opencode/commands/publish.md +0 -138
- package/.opencode/commands/recap.md +0 -69
- package/.opencode/commands/restore.md +0 -64
- package/.opencode/commands/review-squad.md +0 -152
- package/.opencode/commands/save.md +0 -24
- package/.opencode/commands/stats.md +0 -19
- package/.opencode/commands/swarm.md +0 -210
- package/.opencode/commands/tool-builder.md +0 -39
- package/.opencode/commands/ws-pull.md +0 -44
package/dist/bot-config/index.js
CHANGED
|
@@ -1,104 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Bot Config Module
|
|
4
|
-
*
|
|
5
|
-
* Unified bot configuration management.
|
|
6
|
-
* Handles credentials, state, webhooks, persistence, and MCP tools per workspace.
|
|
7
|
-
*
|
|
8
|
-
* This module consolidates all bot configuration functionality that was previously
|
|
9
|
-
* split between mcp/tools/bot-config/ and this module.
|
|
10
4
|
*/
|
|
11
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.reloadConfigFromHailer = exports.
|
|
13
|
-
exports.botConfigTools = exports.checkSpecialistStatusTool = exports.disableBotTool = exports.enableBotTool = exports.listBotsConfigTool = void 0;
|
|
14
|
-
// ============================================================================
|
|
15
|
-
// Constants
|
|
16
|
-
// ============================================================================
|
|
6
|
+
exports.reloadConfigFromHailer = exports.setActiveWorkspace = exports.handleActivityPhaseChange = exports.setBotEnabled = exports.listWorkspaceConfigFiles = exports.saveWorkspaceConfigFile = exports.loadWorkspaceConfigFile = exports.invalidateConfigCache = exports.loadFlatBotConfigs = exports.loadBotConfigs = exports.getBotContextByWorkflowId = exports.listBotContexts = exports.getExistingBotContext = exports.getBotContext = exports.BotContext = exports.BOT_CONFIG_DIR = void 0;
|
|
17
7
|
var constants_1 = require("./constants");
|
|
18
|
-
// File paths
|
|
19
|
-
Object.defineProperty(exports, "LOCAL_STATE_FILE", { enumerable: true, get: function () { return constants_1.LOCAL_STATE_FILE; } });
|
|
20
|
-
Object.defineProperty(exports, "SCHEMAS_DIR", { enumerable: true, get: function () { return constants_1.SCHEMAS_DIR; } });
|
|
21
|
-
Object.defineProperty(exports, "LOCAL_CREDENTIALS_FILE", { enumerable: true, get: function () { return constants_1.LOCAL_CREDENTIALS_FILE; } });
|
|
22
8
|
Object.defineProperty(exports, "BOT_CONFIG_DIR", { enumerable: true, get: function () { return constants_1.BOT_CONFIG_DIR; } });
|
|
23
|
-
// Signal processing
|
|
24
|
-
Object.defineProperty(exports, "SIGNAL_DEDUP_WINDOW_MS", { enumerable: true, get: function () { return constants_1.SIGNAL_DEDUP_WINDOW_MS; } });
|
|
25
|
-
Object.defineProperty(exports, "RESTART_DEBOUNCE_MS", { enumerable: true, get: function () { return constants_1.RESTART_DEBOUNCE_MS; } });
|
|
26
|
-
// Schema discovery patterns
|
|
27
|
-
Object.defineProperty(exports, "AGENT_DIRECTORY_PATTERNS", { enumerable: true, get: function () { return constants_1.AGENT_DIRECTORY_PATTERNS; } });
|
|
28
|
-
Object.defineProperty(exports, "DEPLOYED_PHASE_PATTERNS", { enumerable: true, get: function () { return constants_1.DEPLOYED_PHASE_PATTERNS; } });
|
|
29
|
-
Object.defineProperty(exports, "RETIRED_PHASE_PATTERNS", { enumerable: true, get: function () { return constants_1.RETIRED_PHASE_PATTERNS; } });
|
|
30
|
-
// Field key patterns
|
|
31
|
-
Object.defineProperty(exports, "FIELD_KEY_HAILER_PROFILE", { enumerable: true, get: function () { return constants_1.FIELD_KEY_HAILER_PROFILE; } });
|
|
32
|
-
Object.defineProperty(exports, "FIELD_KEY_EMAIL", { enumerable: true, get: function () { return constants_1.FIELD_KEY_EMAIL; } });
|
|
33
|
-
Object.defineProperty(exports, "FIELD_KEY_PASSWORD", { enumerable: true, get: function () { return constants_1.FIELD_KEY_PASSWORD; } });
|
|
34
|
-
Object.defineProperty(exports, "FIELD_KEY_BOT_TYPE", { enumerable: true, get: function () { return constants_1.FIELD_KEY_BOT_TYPE; } });
|
|
35
|
-
Object.defineProperty(exports, "FIELD_KEY_SCHEMA_CONFIG", { enumerable: true, get: function () { return constants_1.FIELD_KEY_SCHEMA_CONFIG; } });
|
|
36
|
-
// Legacy IDs
|
|
37
|
-
Object.defineProperty(exports, "LEGACY_AGENT_ACTIVITY_IDS", { enumerable: true, get: function () { return constants_1.LEGACY_AGENT_ACTIVITY_IDS; } });
|
|
38
|
-
// Bot definitions
|
|
39
|
-
Object.defineProperty(exports, "AVAILABLE_BOTS", { enumerable: true, get: function () { return constants_1.AVAILABLE_BOTS; } });
|
|
40
|
-
// ============================================================================
|
|
41
|
-
// Context (main source of truth)
|
|
42
|
-
// ============================================================================
|
|
43
9
|
var context_1 = require("./context");
|
|
44
10
|
Object.defineProperty(exports, "BotContext", { enumerable: true, get: function () { return context_1.BotContext; } });
|
|
45
11
|
Object.defineProperty(exports, "getBotContext", { enumerable: true, get: function () { return context_1.getBotContext; } });
|
|
46
12
|
Object.defineProperty(exports, "getExistingBotContext", { enumerable: true, get: function () { return context_1.getExistingBotContext; } });
|
|
47
13
|
Object.defineProperty(exports, "listBotContexts", { enumerable: true, get: function () { return context_1.listBotContexts; } });
|
|
48
|
-
Object.defineProperty(exports, "hasBotContext", { enumerable: true, get: function () { return context_1.hasBotContext; } });
|
|
49
|
-
Object.defineProperty(exports, "removeBotContext", { enumerable: true, get: function () { return context_1.removeBotContext; } });
|
|
50
|
-
Object.defineProperty(exports, "clearAllBotContexts", { enumerable: true, get: function () { return context_1.clearAllBotContexts; } });
|
|
51
14
|
Object.defineProperty(exports, "getBotContextByWorkflowId", { enumerable: true, get: function () { return context_1.getBotContextByWorkflowId; } });
|
|
52
|
-
// ============================================================================
|
|
53
|
-
// Loader (reads from .bot-config/*.json)
|
|
54
|
-
// ============================================================================
|
|
55
15
|
var loader_1 = require("./loader");
|
|
56
16
|
Object.defineProperty(exports, "loadBotConfigs", { enumerable: true, get: function () { return loader_1.loadBotConfigs; } });
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
Object.defineProperty(exports, "saveBotConfig", { enumerable: true, get: function () { return loader_1.saveBotConfig; } });
|
|
17
|
+
Object.defineProperty(exports, "loadFlatBotConfigs", { enumerable: true, get: function () { return loader_1.loadFlatBotConfigs; } });
|
|
59
18
|
Object.defineProperty(exports, "invalidateConfigCache", { enumerable: true, get: function () { return loader_1.invalidateConfigCache; } });
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
19
|
+
Object.defineProperty(exports, "loadWorkspaceConfigFile", { enumerable: true, get: function () { return loader_1.loadWorkspaceConfigFile; } });
|
|
20
|
+
Object.defineProperty(exports, "saveWorkspaceConfigFile", { enumerable: true, get: function () { return loader_1.saveWorkspaceConfigFile; } });
|
|
21
|
+
Object.defineProperty(exports, "listWorkspaceConfigFiles", { enumerable: true, get: function () { return loader_1.listWorkspaceConfigFiles; } });
|
|
63
22
|
var state_1 = require("./state");
|
|
64
|
-
Object.defineProperty(exports, "getBotState", { enumerable: true, get: function () { return state_1.getBotState; } });
|
|
65
|
-
Object.defineProperty(exports, "getBotContextBotState", { enumerable: true, get: function () { return state_1.getBotContextBotState; } });
|
|
66
|
-
Object.defineProperty(exports, "getBotUserId", { enumerable: true, get: function () { return state_1.getBotUserId; } });
|
|
67
|
-
Object.defineProperty(exports, "getBotType", { enumerable: true, get: function () { return state_1.getBotType; } });
|
|
68
|
-
Object.defineProperty(exports, "getEnabledBotsWithTypes", { enumerable: true, get: function () { return state_1.getEnabledBotsWithTypes; } });
|
|
69
23
|
Object.defineProperty(exports, "setBotEnabled", { enumerable: true, get: function () { return state_1.setBotEnabled; } });
|
|
70
|
-
Object.defineProperty(exports, "setBotUserId", { enumerable: true, get: function () { return state_1.setBotUserId; } });
|
|
71
|
-
Object.defineProperty(exports, "onBotStateChange", { enumerable: true, get: function () { return state_1.onBotStateChange; } });
|
|
72
|
-
Object.defineProperty(exports, "onDaemonRestartNeeded", { enumerable: true, get: function () { return state_1.onDaemonRestartNeeded; } });
|
|
73
|
-
Object.defineProperty(exports, "notifyDaemonRestartNeeded", { enumerable: true, get: function () { return state_1.notifyDaemonRestartNeeded; } });
|
|
74
|
-
Object.defineProperty(exports, "cleanupBotState", { enumerable: true, get: function () { return state_1.cleanupBotState; } });
|
|
75
|
-
// ============================================================================
|
|
76
|
-
// Webhooks (phase change handling)
|
|
77
|
-
// ============================================================================
|
|
78
24
|
var webhooks_1 = require("./webhooks");
|
|
79
25
|
Object.defineProperty(exports, "handleActivityPhaseChange", { enumerable: true, get: function () { return webhooks_1.handleActivityPhaseChange; } });
|
|
80
|
-
// ============================================================================
|
|
81
|
-
// Persistence
|
|
82
|
-
// ============================================================================
|
|
83
26
|
var persistence_1 = require("./persistence");
|
|
84
|
-
Object.defineProperty(exports, "initBotConfigPersistence", { enumerable: true, get: function () { return persistence_1.initBotConfigPersistence; } });
|
|
85
|
-
Object.defineProperty(exports, "initWorkspaceSchema", { enumerable: true, get: function () { return persistence_1.initWorkspaceSchema; } });
|
|
86
|
-
Object.defineProperty(exports, "isPersistenceInitialized", { enumerable: true, get: function () { return persistence_1.isPersistenceInitialized; } });
|
|
87
|
-
Object.defineProperty(exports, "getLocalBotCredentials", { enumerable: true, get: function () { return persistence_1.getLocalBotCredentials; } });
|
|
88
|
-
Object.defineProperty(exports, "getAllLocalBotCredentials", { enumerable: true, get: function () { return persistence_1.getAllLocalBotCredentials; } });
|
|
89
|
-
Object.defineProperty(exports, "getPersistenceStatus", { enumerable: true, get: function () { return persistence_1.getPersistenceStatus; } });
|
|
90
|
-
Object.defineProperty(exports, "cleanupBotConfig", { enumerable: true, get: function () { return persistence_1.cleanupBotConfig; } });
|
|
91
|
-
// Workspace management
|
|
92
27
|
Object.defineProperty(exports, "setActiveWorkspace", { enumerable: true, get: function () { return persistence_1.setActiveWorkspace; } });
|
|
93
|
-
Object.defineProperty(exports, "getActiveWorkspace", { enumerable: true, get: function () { return persistence_1.getActiveWorkspace; } });
|
|
94
28
|
Object.defineProperty(exports, "reloadConfigFromHailer", { enumerable: true, get: function () { return persistence_1.reloadConfigFromHailer; } });
|
|
95
|
-
// ============================================================================
|
|
96
|
-
// MCP Tools
|
|
97
|
-
// ============================================================================
|
|
98
|
-
var tools_1 = require("./tools");
|
|
99
|
-
Object.defineProperty(exports, "listBotsConfigTool", { enumerable: true, get: function () { return tools_1.listBotsConfigTool; } });
|
|
100
|
-
Object.defineProperty(exports, "enableBotTool", { enumerable: true, get: function () { return tools_1.enableBotTool; } });
|
|
101
|
-
Object.defineProperty(exports, "disableBotTool", { enumerable: true, get: function () { return tools_1.disableBotTool; } });
|
|
102
|
-
Object.defineProperty(exports, "checkSpecialistStatusTool", { enumerable: true, get: function () { return tools_1.checkSpecialistStatusTool; } });
|
|
103
|
-
Object.defineProperty(exports, "botConfigTools", { enumerable: true, get: function () { return tools_1.botConfigTools; } });
|
|
104
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bot-config/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/bot-config/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,yCAA6C;AAApC,2GAAA,cAAc,OAAA;AASvB,qCAMmB;AALjB,qGAAA,UAAU,OAAA;AACV,wGAAA,aAAa,OAAA;AACb,gHAAA,qBAAqB,OAAA;AACrB,0GAAA,eAAe,OAAA;AACf,oHAAA,yBAAyB,OAAA;AAG3B,mCAOkB;AANhB,wGAAA,cAAc,OAAA;AACd,4GAAA,kBAAkB,OAAA;AAClB,+GAAA,qBAAqB,OAAA;AACrB,iHAAA,uBAAuB,OAAA;AACvB,iHAAA,uBAAuB,OAAA;AACvB,kHAAA,wBAAwB,OAAA;AAG1B,iCAEiB;AADf,sGAAA,aAAa,OAAA;AAGf,uCAEoB;AADlB,qHAAA,yBAAyB,OAAA;AAI3B,6CAGuB;AAFrB,iHAAA,kBAAkB,OAAA;AAClB,qHAAA,sBAAsB,OAAA"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Creates BotContext instances for each workspace.
|
|
6
6
|
*/
|
|
7
7
|
import { BotContext } from './context';
|
|
8
|
+
import type { BotConfig, BotConfigFile } from './types';
|
|
8
9
|
/**
|
|
9
10
|
* Invalidate the config cache.
|
|
10
11
|
* Call this after saving a config file to ensure fresh reads.
|
|
@@ -18,11 +19,22 @@ export declare function invalidateConfigCache(): void;
|
|
|
18
19
|
*/
|
|
19
20
|
export declare function loadBotConfigs(): BotContext[];
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Load a workspace config file, or return an empty one.
|
|
23
|
+
* This is the ONLY place that reads .bot-config/{workspaceId}.json.
|
|
22
24
|
*/
|
|
23
|
-
export declare function
|
|
25
|
+
export declare function loadWorkspaceConfigFile(workspaceId: string): BotConfigFile;
|
|
24
26
|
/**
|
|
25
|
-
* Save
|
|
27
|
+
* Save a workspace config file.
|
|
28
|
+
* This is the ONLY place that writes .bot-config/{workspaceId}.json.
|
|
26
29
|
*/
|
|
27
|
-
export declare function
|
|
30
|
+
export declare function saveWorkspaceConfigFile(config: BotConfigFile): void;
|
|
31
|
+
/**
|
|
32
|
+
* List all workspace config files.
|
|
33
|
+
*/
|
|
34
|
+
export declare function listWorkspaceConfigFiles(): BotConfigFile[];
|
|
35
|
+
/**
|
|
36
|
+
* Load all bot configs as flat BotConfig[] for BotManager.
|
|
37
|
+
* Reads from .bot-config/*.json, falls back to env vars.
|
|
38
|
+
*/
|
|
39
|
+
export declare function loadFlatBotConfigs(): BotConfig[];
|
|
28
40
|
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/bot-config/loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/bot-config/loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,UAAU,EAAiB,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAC;AA4CxE;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAK5C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,UAAU,EAAE,CA8C7C;AAMD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,CAiB1E;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAYnE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,aAAa,EAAE,CAE1D;AA2DD;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,EAAE,CAgDhD"}
|
|
@@ -41,17 +41,49 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
41
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
42
|
exports.invalidateConfigCache = invalidateConfigCache;
|
|
43
43
|
exports.loadBotConfigs = loadBotConfigs;
|
|
44
|
-
exports.
|
|
45
|
-
exports.
|
|
44
|
+
exports.loadWorkspaceConfigFile = loadWorkspaceConfigFile;
|
|
45
|
+
exports.saveWorkspaceConfigFile = saveWorkspaceConfigFile;
|
|
46
|
+
exports.listWorkspaceConfigFiles = listWorkspaceConfigFiles;
|
|
47
|
+
exports.loadFlatBotConfigs = loadFlatBotConfigs;
|
|
46
48
|
const fs = __importStar(require("fs"));
|
|
47
49
|
const path = __importStar(require("path"));
|
|
48
50
|
const logger_1 = require("../lib/logger");
|
|
51
|
+
const config_1 = require("../config");
|
|
49
52
|
const context_1 = require("./context");
|
|
50
53
|
const logger = (0, logger_1.createLogger)({ component: 'BotConfigLoader' });
|
|
54
|
+
function getConfigDir() { return path.join(process.cwd(), '.bot-config'); }
|
|
55
|
+
function getApiHost() { return config_1.environment.BOT_API_BASE_URL; }
|
|
51
56
|
/** Cache for loaded configs to avoid repeated file reads */
|
|
52
57
|
let cachedContexts = null;
|
|
53
58
|
let cacheTime = 0;
|
|
54
59
|
const CACHE_TTL_MS = 5000; // 5 second cache to avoid repeated reads during startup
|
|
60
|
+
/** Cache for raw parsed config files to avoid duplicate directory scans */
|
|
61
|
+
let cachedRawFiles = null;
|
|
62
|
+
/**
|
|
63
|
+
* Read and parse all .bot-config/*.json files, with caching shared across callers.
|
|
64
|
+
*/
|
|
65
|
+
function readConfigFiles() {
|
|
66
|
+
const now = Date.now();
|
|
67
|
+
if (cachedRawFiles && (now - cachedRawFiles.time) < CACHE_TTL_MS) {
|
|
68
|
+
return cachedRawFiles.configs;
|
|
69
|
+
}
|
|
70
|
+
const configDir = getConfigDir();
|
|
71
|
+
if (!fs.existsSync(configDir))
|
|
72
|
+
return [];
|
|
73
|
+
const files = fs.readdirSync(configDir).filter(f => f.endsWith('.json'));
|
|
74
|
+
const configs = [];
|
|
75
|
+
for (const file of files) {
|
|
76
|
+
try {
|
|
77
|
+
const content = fs.readFileSync(path.join(configDir, file), 'utf-8');
|
|
78
|
+
configs.push(JSON.parse(content));
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
logger.warn('Failed to load bot config file', { file, error: error instanceof Error ? error.message : String(error) });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
cachedRawFiles = { configs, time: now };
|
|
85
|
+
return configs;
|
|
86
|
+
}
|
|
55
87
|
/**
|
|
56
88
|
* Invalidate the config cache.
|
|
57
89
|
* Call this after saving a config file to ensure fresh reads.
|
|
@@ -59,6 +91,7 @@ const CACHE_TTL_MS = 5000; // 5 second cache to avoid repeated reads during star
|
|
|
59
91
|
function invalidateConfigCache() {
|
|
60
92
|
cachedContexts = null;
|
|
61
93
|
cacheTime = 0;
|
|
94
|
+
cachedRawFiles = null;
|
|
62
95
|
logger.debug('Config cache invalidated');
|
|
63
96
|
}
|
|
64
97
|
/**
|
|
@@ -74,40 +107,26 @@ function loadBotConfigs() {
|
|
|
74
107
|
logger.debug('Using cached bot configs', { count: cachedContexts.length, ageMs: now - cacheTime });
|
|
75
108
|
return cachedContexts;
|
|
76
109
|
}
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
79
|
-
logger.warn('No .bot-config
|
|
110
|
+
const rawConfigs = readConfigFiles();
|
|
111
|
+
if (rawConfigs.length === 0) {
|
|
112
|
+
logger.warn('No .bot-config files found');
|
|
80
113
|
return [];
|
|
81
114
|
}
|
|
82
|
-
const files = fs.readdirSync(configDir).filter(f => f.endsWith('.json'));
|
|
83
115
|
const contexts = [];
|
|
84
|
-
for (const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
logger.debug('Loaded bot config', {
|
|
99
|
-
workspaceId: config.workspaceId,
|
|
100
|
-
workspaceName: config.workspaceName,
|
|
101
|
-
hasOrchestrator: !!config.orchestrator,
|
|
102
|
-
specialistCount: config.specialists.length,
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
catch (error) {
|
|
106
|
-
logger.warn('Failed to load bot config file', {
|
|
107
|
-
file,
|
|
108
|
-
error: error instanceof Error ? error.message : String(error),
|
|
109
|
-
});
|
|
110
|
-
}
|
|
116
|
+
for (const config of rawConfigs) {
|
|
117
|
+
// Get or create BotContext for this workspace
|
|
118
|
+
const ctx = (0, context_1.getBotContext)(config.workspaceId, config.workspaceName);
|
|
119
|
+
// Initialize from config
|
|
120
|
+
ctx.initializeFromConfig({
|
|
121
|
+
bots: config.bots,
|
|
122
|
+
schema: config.schema,
|
|
123
|
+
});
|
|
124
|
+
contexts.push(ctx);
|
|
125
|
+
logger.debug('Loaded bot config', {
|
|
126
|
+
workspaceId: config.workspaceId,
|
|
127
|
+
workspaceName: config.workspaceName,
|
|
128
|
+
botCount: config.bots.length,
|
|
129
|
+
});
|
|
111
130
|
}
|
|
112
131
|
logger.debug('Bot configs loaded', {
|
|
113
132
|
total: contexts.length,
|
|
@@ -118,77 +137,149 @@ function loadBotConfigs() {
|
|
|
118
137
|
cacheTime = Date.now();
|
|
119
138
|
return contexts;
|
|
120
139
|
}
|
|
140
|
+
// ============================================================================
|
|
141
|
+
// Workspace Config File I/O (single owner of .bot-config/*.json)
|
|
142
|
+
// ============================================================================
|
|
121
143
|
/**
|
|
122
|
-
*
|
|
144
|
+
* Load a workspace config file, or return an empty one.
|
|
145
|
+
* This is the ONLY place that reads .bot-config/{workspaceId}.json.
|
|
123
146
|
*/
|
|
124
|
-
function
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const config = JSON.parse(content);
|
|
134
|
-
const ctx = (0, context_1.getBotContext)(config.workspaceId, config.workspaceName);
|
|
135
|
-
ctx.initializeFromConfig({
|
|
136
|
-
orchestrator: config.orchestrator,
|
|
137
|
-
specialists: config.specialists,
|
|
138
|
-
schema: config.schema,
|
|
139
|
-
});
|
|
140
|
-
return ctx;
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
logger.error('Failed to load bot config', { workspaceId, error });
|
|
144
|
-
return null;
|
|
147
|
+
function loadWorkspaceConfigFile(workspaceId) {
|
|
148
|
+
const configPath = path.join(getConfigDir(), `${workspaceId}.json`);
|
|
149
|
+
if (fs.existsSync(configPath)) {
|
|
150
|
+
try {
|
|
151
|
+
return JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
logger.warn('Failed to load workspace config', { workspaceId, error: String(error) });
|
|
155
|
+
}
|
|
145
156
|
}
|
|
157
|
+
return {
|
|
158
|
+
workspaceId,
|
|
159
|
+
workspaceName: workspaceId,
|
|
160
|
+
bots: [],
|
|
161
|
+
lastSynced: new Date().toISOString(),
|
|
162
|
+
};
|
|
146
163
|
}
|
|
147
164
|
/**
|
|
148
|
-
* Save
|
|
165
|
+
* Save a workspace config file.
|
|
166
|
+
* This is the ONLY place that writes .bot-config/{workspaceId}.json.
|
|
149
167
|
*/
|
|
150
|
-
function
|
|
151
|
-
const configDir =
|
|
152
|
-
// Ensure directory exists
|
|
168
|
+
function saveWorkspaceConfigFile(config) {
|
|
169
|
+
const configDir = getConfigDir();
|
|
153
170
|
if (!fs.existsSync(configDir)) {
|
|
154
171
|
fs.mkdirSync(configDir, { recursive: true });
|
|
155
172
|
}
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
173
|
+
const configPath = path.join(configDir, `${config.workspaceId}.json`);
|
|
174
|
+
config.lastSynced = new Date().toISOString();
|
|
175
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
176
|
+
logger.debug('Saved workspace config', { workspaceId: config.workspaceId, path: configPath });
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* List all workspace config files.
|
|
180
|
+
*/
|
|
181
|
+
function listWorkspaceConfigFiles() {
|
|
182
|
+
return readConfigFiles();
|
|
183
|
+
}
|
|
184
|
+
// ============================================================================
|
|
185
|
+
// Flat Bot Config Loading (for BotManager)
|
|
186
|
+
// ============================================================================
|
|
187
|
+
/**
|
|
188
|
+
* Load bot configs from env vars (BOT_EMAIL/BOT_PASSWORD or BOT_ACCOUNTS).
|
|
189
|
+
* Returns empty array if no env vars are set.
|
|
190
|
+
*/
|
|
191
|
+
function loadEnvBotConfigs() {
|
|
192
|
+
// Multi-bot: BOT_ACCOUNTS JSON array
|
|
193
|
+
const botAccountsStr = process.env.BOT_ACCOUNTS;
|
|
194
|
+
if (botAccountsStr) {
|
|
195
|
+
try {
|
|
196
|
+
const accounts = JSON.parse(botAccountsStr);
|
|
197
|
+
const configs = accounts
|
|
198
|
+
.filter(a => a.email && a.password)
|
|
199
|
+
.map(a => ({
|
|
200
|
+
activityId: '',
|
|
201
|
+
workspaceId: 'env',
|
|
202
|
+
workspaceName: 'env',
|
|
203
|
+
email: a.email,
|
|
204
|
+
password: a.password,
|
|
205
|
+
displayName: a.displayName || process.env.BOT_DISPLAY_NAME || 'Dev AI',
|
|
206
|
+
enabled: true,
|
|
207
|
+
apiHost: getApiHost(),
|
|
208
|
+
}));
|
|
209
|
+
if (configs.length > 0) {
|
|
210
|
+
logger.info('Loaded bot configs from BOT_ACCOUNTS env', { count: configs.length });
|
|
211
|
+
return configs;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
logger.warn('Failed to parse BOT_ACCOUNTS env var', {
|
|
216
|
+
error: error instanceof Error ? error.message : String(error),
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// Single bot: BOT_EMAIL + BOT_PASSWORD
|
|
221
|
+
const email = process.env.BOT_EMAIL;
|
|
222
|
+
const password = process.env.BOT_PASSWORD;
|
|
223
|
+
if (email && password) {
|
|
224
|
+
logger.info('Loaded bot config from BOT_EMAIL/BOT_PASSWORD env');
|
|
225
|
+
return [{
|
|
226
|
+
activityId: '',
|
|
227
|
+
workspaceId: 'env',
|
|
228
|
+
workspaceName: 'env',
|
|
229
|
+
email,
|
|
230
|
+
password,
|
|
231
|
+
displayName: process.env.BOT_DISPLAY_NAME || 'Dev AI',
|
|
232
|
+
enabled: true,
|
|
233
|
+
apiHost: getApiHost(),
|
|
234
|
+
}];
|
|
235
|
+
}
|
|
236
|
+
return [];
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Load all bot configs as flat BotConfig[] for BotManager.
|
|
240
|
+
* Reads from .bot-config/*.json, falls back to env vars.
|
|
241
|
+
*/
|
|
242
|
+
function loadFlatBotConfigs() {
|
|
243
|
+
const rawConfigs = readConfigFiles();
|
|
244
|
+
if (rawConfigs.length === 0) {
|
|
245
|
+
logger.debug('No .bot-config files found, checking env vars');
|
|
246
|
+
return loadEnvBotConfigs();
|
|
247
|
+
}
|
|
248
|
+
const configs = [];
|
|
249
|
+
for (const raw of rawConfigs) {
|
|
250
|
+
// Load all bots
|
|
251
|
+
let fileCount = 0;
|
|
252
|
+
for (const bot of raw.bots) {
|
|
253
|
+
if (bot?.email && bot?.password && bot?.enabled !== false) {
|
|
254
|
+
configs.push({
|
|
255
|
+
activityId: bot.activityId || '',
|
|
256
|
+
workspaceId: raw.workspaceId,
|
|
257
|
+
workspaceName: raw.workspaceName,
|
|
258
|
+
email: bot.email,
|
|
259
|
+
password: bot.password,
|
|
260
|
+
displayName: bot.displayName,
|
|
261
|
+
systemPrompt: bot.systemPrompt,
|
|
262
|
+
enabled: true,
|
|
263
|
+
apiHost: getApiHost(),
|
|
264
|
+
accessLevel: bot.accessLevel,
|
|
265
|
+
allowedWorkflows: bot.allowedWorkflows,
|
|
266
|
+
responseMode: bot.responseMode,
|
|
267
|
+
});
|
|
268
|
+
fileCount++;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
logger.debug('Loaded bot config', {
|
|
272
|
+
workspaceId: raw.workspaceId,
|
|
273
|
+
workspaceName: raw.workspaceName,
|
|
274
|
+
botCount: fileCount,
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
// If no configs from files, fall back to env vars
|
|
278
|
+
if (configs.length === 0) {
|
|
279
|
+
logger.debug('No bot configs from files, checking env vars');
|
|
280
|
+
return loadEnvBotConfigs();
|
|
281
|
+
}
|
|
282
|
+
logger.debug('Flat bot configs loaded', { total: configs.length });
|
|
283
|
+
return configs;
|
|
193
284
|
}
|
|
194
285
|
//# sourceMappingURL=loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/bot-config/loader.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/bot-config/loader.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDH,sDAKC;AAQD,wCA8CC;AAUD,0DAiBC;AAMD,0DAYC;AAKD,4DAEC;AA+DD,gDAgDC;AAnRD,uCAAyB;AACzB,2CAA6B;AAC7B,0CAA6C;AAC7C,sCAAwC;AACxC,uCAAsD;AAItD,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAE9D,SAAS,YAAY,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;AACnF,SAAS,UAAU,KAAa,OAAO,oBAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEtE,4DAA4D;AAC5D,IAAI,cAAc,GAAwB,IAAI,CAAC;AAC/C,IAAI,SAAS,GAAW,CAAC,CAAC;AAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,CAAC,wDAAwD;AAEnF,2EAA2E;AAC3E,IAAI,cAAc,GAAsD,IAAI,CAAC;AAE7E;;GAEG;AACH,SAAS,eAAe;IACtB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,IAAI,cAAc,IAAI,CAAC,GAAG,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,YAAY,EAAE,CAAC;QACjE,OAAO,cAAc,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;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E,CAAC;gBAC1D,OAAO,CAAC,IAAI,CAAC;oBACX,UAAU,EAAE,GAAG,CAAC,UAAU,IAAI,EAAE;oBAChC,WAAW,EAAE,GAAG,CAAC,WAAW;oBAC5B,aAAa,EAAE,GAAG,CAAC,aAAa;oBAChC,KAAK,EAAE,GAAG,CAAC,KAAK;oBAChB,QAAQ,EAAE,GAAG,CAAC,QAAQ;oBACtB,WAAW,EAAE,GAAG,CAAC,WAAW;oBAC5B,YAAY,EAAE,GAAG,CAAC,YAAY;oBAC9B,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,UAAU,EAAE;oBACrB,WAAW,EAAE,GAAG,CAAC,WAAyC;oBAC1D,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;oBACtC,YAAY,EAAE,GAAG,CAAC,YAAwC;iBAC3D,CAAC,CAAC;gBACH,SAAS,EAAE,CAAC;YACd,CAAC;QACH,CAAC;QAED,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE;YAChC,WAAW,EAAE,GAAG,CAAC,WAAW;YAC5B,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,QAAQ,EAAE,SAAS;SACpB,CAAC,CAAC;IACL,CAAC;IAED,kDAAkD;IAClD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAC7D,OAAO,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACnE,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1,68 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bot Configuration Persistence
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Workspace management and config reload from Hailer API.
|
|
5
5
|
*/
|
|
6
6
|
import { HailerApiClient } from '../mcp/utils';
|
|
7
|
-
/**
|
|
8
|
-
* Initialize bot config persistence
|
|
9
|
-
*
|
|
10
|
-
* Sets up signal handler and loads bot configuration from files.
|
|
11
|
-
*/
|
|
12
|
-
export declare function initBotConfigPersistence(client: HailerApiClient): Promise<void>;
|
|
13
|
-
/**
|
|
14
|
-
* Initialize workspace schema for a specific workspace
|
|
15
|
-
*
|
|
16
|
-
* Discovers the Agent Directory in the workspace and caches field IDs.
|
|
17
|
-
*/
|
|
18
|
-
export declare function initWorkspaceSchema(client: HailerApiClient, workspaceId: string): Promise<boolean>;
|
|
19
|
-
/**
|
|
20
|
-
* Check if persistence is initialized
|
|
21
|
-
*/
|
|
22
|
-
export declare function isPersistenceInitialized(): boolean;
|
|
23
7
|
/**
|
|
24
8
|
* Set the active workspace ID
|
|
25
9
|
*/
|
|
26
10
|
export declare function setActiveWorkspace(workspaceId: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Get the active workspace ID
|
|
29
|
-
*/
|
|
30
|
-
export declare function getActiveWorkspace(): string | null;
|
|
31
11
|
/**
|
|
32
12
|
* Reload bot configuration from Hailer
|
|
33
13
|
*
|
|
34
14
|
* Re-discovers the Agent Directory and reloads credentials.
|
|
35
|
-
* If no client is provided, uses the stored hailerClient.
|
|
36
15
|
*/
|
|
37
16
|
export declare function reloadConfigFromHailer(client?: HailerApiClient): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Get local bot credentials for daemon creation
|
|
40
|
-
*
|
|
41
|
-
* Looks up credentials by user ID or bot ID.
|
|
42
|
-
*/
|
|
43
|
-
export declare function getLocalBotCredentials(userIdOrBotId: string): {
|
|
44
|
-
email: string;
|
|
45
|
-
password: string;
|
|
46
|
-
displayName?: string;
|
|
47
|
-
} | null;
|
|
48
|
-
/**
|
|
49
|
-
* Get all local bot credentials
|
|
50
|
-
*/
|
|
51
|
-
export declare function getAllLocalBotCredentials(): Record<string, {
|
|
52
|
-
email: string;
|
|
53
|
-
password: string;
|
|
54
|
-
displayName?: string;
|
|
55
|
-
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Get persistence status (for debugging)
|
|
58
|
-
*/
|
|
59
|
-
export declare function getPersistenceStatus(): {
|
|
60
|
-
initialized: boolean;
|
|
61
|
-
workspaceCount: number;
|
|
62
|
-
hasClient: boolean;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Cleanup bot config (alias for cleanupBotState)
|
|
66
|
-
*/
|
|
67
|
-
export { cleanupBotState as cleanupBotConfig } from './state';
|
|
68
17
|
//# sourceMappingURL=persistence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../src/bot-config/persistence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../src/bot-config/persistence.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAW/C;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBpF"}
|