@hailer/mcp 1.0.29 → 1.1.3
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/.session-checked +1 -0
- package/.claude/agents/agent-ada-skill-builder.md +10 -2
- package/.claude/agents/agent-alejandro-function-fields.md +104 -37
- package/.claude/agents/agent-bjorn-config-audit.md +41 -21
- package/.claude/agents/agent-builder-agent-creator.md +13 -3
- package/.claude/agents/agent-code-simplifier.md +53 -0
- package/.claude/agents/agent-dmitri-activity-crud.md +126 -11
- package/.claude/agents/agent-giuseppe-app-builder.md +212 -22
- package/.claude/agents/agent-gunther-mcp-tools.md +7 -36
- package/.claude/agents/agent-helga-workflow-config.md +75 -10
- package/.claude/agents/agent-igor-activity-mover-automation.md +125 -0
- package/.claude/agents/agent-ingrid-doc-templates.md +164 -36
- package/.claude/agents/agent-ivan-monolith.md +154 -0
- package/.claude/agents/agent-kenji-data-reader.md +15 -8
- package/.claude/agents/agent-lars-code-inspector.md +56 -8
- package/.claude/agents/agent-marco-mockup-builder.md +110 -0
- package/.claude/agents/agent-marcus-api-documenter.md +323 -0
- package/.claude/agents/agent-marketplace-publisher.md +232 -72
- package/.claude/agents/agent-marketplace-reviewer.md +255 -79
- package/.claude/agents/agent-permissions-handler.md +208 -0
- package/.claude/agents/agent-simple-writer.md +48 -0
- package/.claude/agents/agent-svetlana-code-review.md +127 -14
- package/.claude/agents/agent-tanya-test-runner.md +333 -0
- package/.claude/agents/agent-ui-designer.md +100 -0
- package/.claude/agents/agent-viktor-sql-insights.md +19 -6
- package/.claude/agents/agent-web-search.md +55 -0
- package/.claude/agents/agent-yevgeni-discussions.md +7 -1
- package/.claude/agents/agent-zara-zapier.md +159 -0
- package/.claude/commands/app-squad.md +135 -0
- package/.claude/commands/audit-squad.md +158 -0
- package/.claude/commands/autoplan.md +563 -0
- package/.claude/commands/cleanup-squad.md +98 -0
- package/.claude/commands/config-squad.md +106 -0
- package/.claude/commands/crud-squad.md +87 -0
- package/.claude/commands/data-squad.md +97 -0
- package/.claude/commands/debug-squad.md +303 -0
- package/.claude/commands/doc-squad.md +65 -0
- package/.claude/commands/handoff.md +137 -0
- package/.claude/commands/health.md +49 -0
- package/.claude/commands/help.md +2 -1
- package/.claude/commands/help:agents.md +96 -16
- package/.claude/commands/help:commands.md +55 -11
- package/.claude/commands/help:faq.md +16 -1
- package/.claude/commands/help:skills.md +93 -0
- package/.claude/commands/hotfix-squad.md +112 -0
- package/.claude/commands/integration-squad.md +82 -0
- package/.claude/commands/janitor-squad.md +167 -0
- package/.claude/commands/learn-auto.md +120 -0
- package/.claude/commands/learn.md +120 -0
- package/.claude/commands/mcp-list.md +27 -0
- package/.claude/commands/onboard-squad.md +140 -0
- package/.claude/commands/plan-workspace.md +732 -0
- package/.claude/commands/prd.md +131 -0
- package/.claude/commands/project-status.md +82 -0
- package/.claude/commands/publish.md +138 -0
- package/.claude/commands/recap.md +69 -0
- package/.claude/commands/restore.md +64 -0
- package/.claude/commands/review-squad.md +152 -0
- package/.claude/commands/save.md +24 -0
- package/.claude/commands/stats.md +19 -0
- package/.claude/commands/swarm.md +210 -0
- package/.claude/commands/tool-builder.md +3 -1
- package/.claude/commands/ws-pull.md +1 -1
- package/.claude/commands/yolo-off.md +17 -0
- package/.claude/commands/yolo.md +82 -0
- package/.claude/hooks/_shared-memory.cjs +305 -0
- package/.claude/hooks/_utils.cjs +134 -0
- package/.claude/hooks/agent-failure-detector.cjs +164 -79
- package/.claude/hooks/agent-usage-logger.cjs +204 -0
- package/.claude/hooks/app-edit-guard.cjs +20 -4
- package/.claude/hooks/auto-learn.cjs +316 -0
- package/.claude/hooks/bash-guard.cjs +282 -0
- package/.claude/hooks/builder-mode-manager.cjs +183 -54
- package/.claude/hooks/bulk-activity-guard.cjs +283 -0
- package/.claude/hooks/context-watchdog.cjs +292 -0
- package/.claude/hooks/delegation-reminder.cjs +478 -0
- package/.claude/hooks/design-system-lint.cjs +283 -0
- package/.claude/hooks/post-scaffold-hook.cjs +16 -3
- package/.claude/hooks/prompt-guard.cjs +366 -0
- package/.claude/hooks/publish-template-guard.cjs +16 -0
- package/.claude/hooks/session-start.cjs +35 -0
- package/.claude/hooks/shared-memory-writer.cjs +147 -0
- package/.claude/hooks/skill-injector.cjs +140 -0
- package/.claude/hooks/skill-usage-logger.cjs +258 -0
- package/.claude/hooks/src-edit-guard.cjs +16 -1
- package/.claude/hooks/sync-marketplace-agents.cjs +53 -8
- package/.claude/scripts/yolo-toggle.cjs +142 -0
- package/.claude/settings.json +141 -14
- package/.claude/skills/SDK-activity-patterns/SKILL.md +428 -0
- package/.claude/skills/SDK-document-templates/SKILL.md +1033 -0
- package/.claude/skills/SDK-function-fields/SKILL.md +542 -0
- package/.claude/skills/SDK-generate-skill/SKILL.md +92 -0
- package/.claude/skills/SDK-init-skill/SKILL.md +127 -0
- package/.claude/skills/SDK-insight-queries/SKILL.md +787 -0
- package/.claude/skills/SDK-ws-config-skill/SKILL.md +1139 -0
- package/.claude/skills/agent-structure/SKILL.md +98 -0
- package/.claude/skills/api-documentation-patterns/SKILL.md +474 -0
- package/.claude/skills/chrome-mcp-reference/SKILL.md +370 -0
- package/.claude/skills/delegation-routing/SKILL.md +202 -0
- package/.claude/skills/frontend-design/SKILL.md +254 -0
- package/.claude/skills/hailer-activity-mover/SKILL.md +213 -0
- package/.claude/skills/hailer-api-client/SKILL.md +518 -0
- package/.claude/skills/hailer-app-builder/SKILL.md +939 -11
- package/.claude/skills/hailer-apps-pictures/SKILL.md +269 -0
- package/.claude/skills/hailer-design-system/SKILL.md +235 -0
- package/.claude/skills/hailer-monolith-automations/SKILL.md +686 -0
- package/.claude/skills/hailer-permissions-system/SKILL.md +121 -0
- package/.claude/skills/hailer-project-protocol/SKILL.md +488 -0
- package/.claude/skills/hailer-rest-api/SKILL.md +61 -0
- package/.claude/skills/hailer-rest-api/hailer-activities.md +184 -0
- package/.claude/skills/hailer-rest-api/hailer-admin.md +473 -0
- package/.claude/skills/hailer-rest-api/hailer-calendar.md +256 -0
- package/.claude/skills/hailer-rest-api/hailer-feed.md +249 -0
- package/.claude/skills/hailer-rest-api/hailer-insights.md +195 -0
- package/.claude/skills/hailer-rest-api/hailer-messaging.md +276 -0
- package/.claude/skills/hailer-rest-api/hailer-workflows.md +283 -0
- package/.claude/skills/insight-join-patterns/SKILL.md +3 -0
- package/.claude/skills/integration-patterns/SKILL.md +421 -0
- package/.claude/skills/json-only-output/SKILL.md +52 -12
- package/.claude/skills/lsp-setup/SKILL.md +160 -0
- package/.claude/skills/mcp-direct-tools/SKILL.md +153 -0
- package/.claude/skills/optional-parameters/SKILL.md +32 -23
- package/.claude/skills/publish-hailer-app/SKILL.md +76 -12
- package/.claude/skills/testing-patterns/SKILL.md +630 -0
- package/.claude/skills/tool-builder/SKILL.md +250 -0
- package/.claude/skills/tool-parameter-usage/SKILL.md +59 -45
- package/.claude/skills/tool-response-verification/SKILL.md +82 -48
- package/.claude/skills/zapier-hailer-patterns/SKILL.md +581 -0
- package/.env.example +26 -7
- package/CLAUDE.md +290 -224
- package/dist/CLAUDE.md +370 -0
- package/dist/app.d.ts +1 -1
- package/dist/app.js +101 -101
- package/dist/bot/bot-config.d.ts +26 -0
- package/dist/bot/bot-config.js +135 -0
- package/dist/bot/bot-manager.d.ts +40 -0
- package/dist/bot/bot-manager.js +137 -0
- package/dist/bot/bot.d.ts +127 -0
- package/dist/bot/bot.js +1328 -0
- package/dist/bot/operation-logger.d.ts +28 -0
- package/dist/bot/operation-logger.js +132 -0
- package/dist/bot/services/conversation-manager.d.ts +60 -0
- package/dist/bot/services/conversation-manager.js +246 -0
- package/dist/bot/services/index.d.ts +9 -0
- package/dist/bot/services/index.js +18 -0
- package/dist/bot/services/message-classifier.d.ts +42 -0
- package/dist/bot/services/message-classifier.js +228 -0
- package/dist/bot/services/message-formatter.d.ts +88 -0
- package/dist/bot/services/message-formatter.js +411 -0
- package/dist/bot/services/session-logger.d.ts +162 -0
- package/dist/bot/services/session-logger.js +724 -0
- package/dist/bot/services/token-billing.d.ts +78 -0
- package/dist/bot/services/token-billing.js +233 -0
- package/dist/bot/services/types.d.ts +169 -0
- package/dist/bot/services/types.js +12 -0
- package/dist/bot/services/typing-indicator.d.ts +23 -0
- package/dist/bot/services/typing-indicator.js +60 -0
- package/dist/bot/services/workspace-schema-cache.d.ts +122 -0
- package/dist/bot/services/workspace-schema-cache.js +506 -0
- package/dist/bot/tool-executor.d.ts +28 -0
- package/dist/bot/tool-executor.js +48 -0
- package/dist/bot/workspace-overview.d.ts +12 -0
- package/dist/bot/workspace-overview.js +94 -0
- package/dist/cli.d.ts +1 -8
- package/dist/cli.js +1 -253
- package/dist/config.d.ts +96 -3
- package/dist/config.js +148 -37
- package/dist/core.d.ts +5 -0
- package/dist/core.js +61 -8
- package/dist/lib/discussion-lock.d.ts +42 -0
- package/dist/lib/discussion-lock.js +110 -0
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +39 -23
- package/dist/lib/request-logger.d.ts +77 -0
- package/dist/lib/request-logger.js +147 -0
- package/dist/mcp/UserContextCache.js +16 -13
- package/dist/mcp/hailer-clients.js +18 -17
- package/dist/mcp/signal-handler.js +43 -13
- package/dist/mcp/tool-registry.d.ts +4 -15
- package/dist/mcp/tool-registry.js +94 -32
- package/dist/mcp/tools/activity.js +28 -69
- package/dist/mcp/tools/app-core.js +9 -4
- package/dist/mcp/tools/app-marketplace.js +22 -12
- package/dist/mcp/tools/app-member.js +5 -2
- package/dist/mcp/tools/app-scaffold.js +32 -18
- package/dist/mcp/tools/bot-config/constants.d.ts +23 -0
- package/dist/mcp/tools/bot-config/constants.js +94 -0
- package/dist/mcp/tools/bot-config/core.d.ts +253 -0
- package/dist/mcp/tools/bot-config/core.js +2456 -0
- package/dist/mcp/tools/bot-config/index.d.ts +10 -0
- package/dist/mcp/tools/bot-config/index.js +59 -0
- package/dist/mcp/tools/bot-config/tools.d.ts +7 -0
- package/dist/mcp/tools/bot-config/tools.js +15 -0
- package/dist/mcp/tools/bot-config/types.d.ts +50 -0
- package/dist/mcp/tools/bot-config/types.js +6 -0
- package/dist/mcp/tools/discussion.js +107 -77
- package/dist/mcp/tools/document.d.ts +11 -0
- package/dist/mcp/tools/document.js +741 -0
- package/dist/mcp/tools/file.js +5 -2
- package/dist/mcp/tools/insight.js +36 -12
- package/dist/mcp/tools/investigate.d.ts +9 -0
- package/dist/mcp/tools/investigate.js +254 -0
- package/dist/mcp/tools/user.d.ts +2 -4
- package/dist/mcp/tools/user.js +9 -50
- package/dist/mcp/tools/workflow.d.ts +1 -0
- package/dist/mcp/tools/workflow.js +164 -52
- package/dist/mcp/utils/hailer-api-client.js +26 -17
- package/dist/mcp/webhook-handler.d.ts +64 -3
- package/dist/mcp/webhook-handler.js +227 -9
- package/dist/mcp-server.d.ts +4 -0
- package/dist/mcp-server.js +237 -25
- package/dist/plugins/bug-fixer/index.d.ts +2 -0
- package/dist/plugins/bug-fixer/index.js +18 -0
- package/dist/plugins/bug-fixer/tools.d.ts +45 -0
- package/dist/plugins/bug-fixer/tools.js +1096 -0
- package/package.json +10 -10
- package/scripts/test-hal-tools.ts +154 -0
- package/.claude/agents/agent-nora-name-functions.md +0 -123
- package/.claude/assistant-knowledge.md +0 -23
- package/.claude/commands/install-plugin.md +0 -261
- package/.claude/commands/list-plugins.md +0 -42
- package/.claude/commands/marketplace-setup.md +0 -33
- package/.claude/commands/publish-plugin.md +0 -55
- package/.claude/commands/uninstall-plugin.md +0 -87
- package/.claude/hooks/interactive-mode.cjs +0 -87
- package/.claude/hooks/mcp-server-guard.cjs +0 -108
- package/.claude/skills/marketplace-publishing.md +0 -155
- package/dist/bot/chat-bot.d.ts +0 -31
- package/dist/bot/chat-bot.js +0 -357
- package/dist/mcp/tools/metrics.d.ts +0 -13
- package/dist/mcp/tools/metrics.js +0 -546
- package/dist/stdio-server.d.ts +0 -14
- package/dist/stdio-server.js +0 -114
|
@@ -14,7 +14,7 @@ const zod_1 = require("zod");
|
|
|
14
14
|
const tool_registry_1 = require("../tool-registry");
|
|
15
15
|
const index_1 = require("../utils/index");
|
|
16
16
|
const workspace_cache_1 = require("../workspace-cache");
|
|
17
|
-
const
|
|
17
|
+
const request_logger_1 = require("../../lib/request-logger");
|
|
18
18
|
const logger = (0, index_1.createLogger)({ component: 'activity-tools' });
|
|
19
19
|
/**
|
|
20
20
|
* Extract error message from various error types
|
|
@@ -46,28 +46,13 @@ function extractErrorMessage(error) {
|
|
|
46
46
|
return String(error);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
/**
|
|
50
|
-
* Get workflows filtered by workspace ID
|
|
51
|
-
* If workspaceId is provided, returns only workflows from that workspace
|
|
52
|
-
* Otherwise returns all workflows
|
|
53
|
-
*/
|
|
54
|
-
function getWorkflowsForWorkspace(init, workspaceId) {
|
|
55
|
-
if (!workspaceId)
|
|
56
|
-
return init.processes;
|
|
57
|
-
return init.processes.filter((p) => p.cid === workspaceId);
|
|
58
|
-
}
|
|
59
49
|
/**
|
|
60
50
|
* Validate and get workflow from init data
|
|
61
|
-
* Optionally filter by workspace to prevent accessing workflows from other workspaces
|
|
62
51
|
*/
|
|
63
|
-
function validateAndGetWorkflow(workflowId, init
|
|
64
|
-
const
|
|
65
|
-
const workflow = workflows.find((p) => p._id === workflowId);
|
|
52
|
+
function validateAndGetWorkflow(workflowId, init) {
|
|
53
|
+
const workflow = init.processes.find((p) => p._id === workflowId);
|
|
66
54
|
if (!workflow) {
|
|
67
|
-
|
|
68
|
-
? `Use list_workflows with workspaceId to find available workflows in this workspace.`
|
|
69
|
-
: `Use get_workflow_info to find available workflows.`;
|
|
70
|
-
throw new Error(`Workflow "${workflowId}" not found. ${hint}`);
|
|
55
|
+
throw new Error(`Workflow "${workflowId}" not found. Use get_workflow_info to find available workflows.`);
|
|
71
56
|
}
|
|
72
57
|
return (0, index_1.transformWorkflow)(workflow);
|
|
73
58
|
}
|
|
@@ -437,7 +422,6 @@ exports.listActivitiesTool = {
|
|
|
437
422
|
group: tool_registry_1.ToolGroup.READ,
|
|
438
423
|
description: `List activities from workflow phase`,
|
|
439
424
|
schema: zod_1.z.object({
|
|
440
|
-
workspaceId: zod_1.z.string().optional().describe("Workspace ID. If not provided, uses current workspace. Use list_my_workspaces to see available workspaces."),
|
|
441
425
|
workflowId: zod_1.z.string().describe("Workflow ID to list activities from"),
|
|
442
426
|
phaseId: zod_1.z.string().describe("Phase ID to filter activities (required - use list_workflow_phases to get available phases)"),
|
|
443
427
|
fields: zod_1.z.preprocess((val) => {
|
|
@@ -477,11 +461,6 @@ exports.listActivitiesTool = {
|
|
|
477
461
|
includeStats: zod_1.z.coerce.boolean().optional().default(true).describe("Include total count and pagination metadata"),
|
|
478
462
|
}),
|
|
479
463
|
async execute(args, context) {
|
|
480
|
-
// Resolve workspace ID from args or default to current workspace
|
|
481
|
-
const workspaceId = (0, tool_helpers_1.getResolvedWorkspaceId)(args, context);
|
|
482
|
-
if (!workspaceId) {
|
|
483
|
-
return (0, tool_helpers_1.missingWorkspaceCacheResponse)();
|
|
484
|
-
}
|
|
485
464
|
try {
|
|
486
465
|
// Validate phaseId format early - must be 24-char MongoDB ID, not a simple number
|
|
487
466
|
if (args.phaseId && args.phaseId.length !== 24) {
|
|
@@ -492,7 +471,7 @@ exports.listActivitiesTool = {
|
|
|
492
471
|
}],
|
|
493
472
|
};
|
|
494
473
|
}
|
|
495
|
-
const workflow = validateAndGetWorkflow(args.workflowId, context.init
|
|
474
|
+
const workflow = validateAndGetWorkflow(args.workflowId, context.init);
|
|
496
475
|
const phaseId = await resolvePhaseForListing(workflow, args, context.init);
|
|
497
476
|
if (!args.fields || args.fields.length === 0) {
|
|
498
477
|
return {
|
|
@@ -568,7 +547,8 @@ exports.listActivitiesTool = {
|
|
|
568
547
|
return response;
|
|
569
548
|
}
|
|
570
549
|
catch (error) {
|
|
571
|
-
|
|
550
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
551
|
+
logger.error("Failed to list activities", error);
|
|
572
552
|
return {
|
|
573
553
|
content: [
|
|
574
554
|
{
|
|
@@ -585,15 +565,9 @@ exports.showActivityByIdTool = {
|
|
|
585
565
|
group: tool_registry_1.ToolGroup.READ,
|
|
586
566
|
description: `Get activity by ID`,
|
|
587
567
|
schema: zod_1.z.object({
|
|
588
|
-
workspaceId: zod_1.z.string().optional().describe("Workspace ID. If not provided, uses current workspace. Use list_my_workspaces to see available workspaces."),
|
|
589
568
|
activityId: zod_1.z.string().describe("Activity ID to load"),
|
|
590
569
|
}),
|
|
591
570
|
async execute(args, context) {
|
|
592
|
-
// Resolve workspace ID (for consistency, though activity IDs are globally unique)
|
|
593
|
-
const workspaceId = (0, tool_helpers_1.getResolvedWorkspaceId)(args, context);
|
|
594
|
-
if (!workspaceId) {
|
|
595
|
-
return (0, tool_helpers_1.missingWorkspaceCacheResponse)();
|
|
596
|
-
}
|
|
597
571
|
try {
|
|
598
572
|
const activity = await context.hailer.fetchActivityById(args.activityId);
|
|
599
573
|
let responseText = `✅ Loaded activity with ID "${activity._id}":\n\n${JSON.stringify(activity, null, 2)}`;
|
|
@@ -607,9 +581,10 @@ exports.showActivityByIdTool = {
|
|
|
607
581
|
};
|
|
608
582
|
}
|
|
609
583
|
catch (error) {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
584
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
585
|
+
logger.error("Failed to load activity", error, {
|
|
586
|
+
activityId: args.activityId,
|
|
587
|
+
});
|
|
613
588
|
return {
|
|
614
589
|
content: [
|
|
615
590
|
{
|
|
@@ -626,16 +601,14 @@ exports.showActivityByIdTool = {
|
|
|
626
601
|
// ============================================================================
|
|
627
602
|
const createActivityDescription = `Create activity (single or bulk via activities array)
|
|
628
603
|
|
|
604
|
+
**REQUIRED:** You MUST provide either 'name' (single) or 'activities' array (bulk). Calls with only workflowId will fail.
|
|
605
|
+
|
|
629
606
|
**Date fields:** Use Unix timestamp (ms), NOT strings. Example: 1737158400000, not "2025-01-18"`;
|
|
630
607
|
exports.createActivityTool = {
|
|
631
608
|
name: 'create_activity',
|
|
632
609
|
group: tool_registry_1.ToolGroup.WRITE,
|
|
633
610
|
description: createActivityDescription,
|
|
634
611
|
schema: zod_1.z.object({
|
|
635
|
-
workspaceId: zod_1.z
|
|
636
|
-
.string()
|
|
637
|
-
.optional()
|
|
638
|
-
.describe("Workspace ID. If not provided, uses current workspace. Use list_my_workspaces to see available workspaces."),
|
|
639
612
|
workflowId: zod_1.z
|
|
640
613
|
.string()
|
|
641
614
|
.min(24, "Workflow ID must be at least 24 characters")
|
|
@@ -689,14 +662,9 @@ exports.createActivityTool = {
|
|
|
689
662
|
.describe("SINGLE: Optional array of file IDs to attach"),
|
|
690
663
|
}),
|
|
691
664
|
async execute(args, context) {
|
|
692
|
-
// Resolve workspace ID from args or default to current workspace
|
|
693
|
-
const workspaceId = (0, tool_helpers_1.getResolvedWorkspaceId)(args, context);
|
|
694
|
-
if (!workspaceId) {
|
|
695
|
-
return (0, tool_helpers_1.missingWorkspaceCacheResponse)();
|
|
696
|
-
}
|
|
697
665
|
try {
|
|
698
666
|
// DEBUG: Log raw input to diagnose LLM tool calling issues
|
|
699
|
-
logger.
|
|
667
|
+
logger.debug("create_activity called", {
|
|
700
668
|
hasName: !!args.name,
|
|
701
669
|
hasActivities: !!args.activities,
|
|
702
670
|
activitiesType: typeof args.activities,
|
|
@@ -790,9 +758,7 @@ exports.createActivityTool = {
|
|
|
790
758
|
// Determine if this is bulk or single creation
|
|
791
759
|
const isBulk = parsedActivities && Array.isArray(parsedActivities) && parsedActivities.length > 0;
|
|
792
760
|
// Get workflow's default team (owner team) if available
|
|
793
|
-
|
|
794
|
-
const workflowsInWorkspace = getWorkflowsForWorkspace(context.init, workspaceId);
|
|
795
|
-
const rawWorkflow = workflowsInWorkspace.find((p) => p._id === args.workflowId);
|
|
761
|
+
const rawWorkflow = context.init.processes.find((p) => p._id === args.workflowId);
|
|
796
762
|
let defaultTeamId = rawWorkflow?.team;
|
|
797
763
|
// Fallback to first workspace team if workflow has no default team
|
|
798
764
|
if (!defaultTeamId && context.init.teams) {
|
|
@@ -808,7 +774,7 @@ exports.createActivityTool = {
|
|
|
808
774
|
};
|
|
809
775
|
if (isBulk) {
|
|
810
776
|
// BULK CREATION
|
|
811
|
-
logger.
|
|
777
|
+
logger.debug(`Creating ${parsedActivities.length} activities in bulk`, {
|
|
812
778
|
workflowId: args.workflowId,
|
|
813
779
|
count: parsedActivities.length,
|
|
814
780
|
defaultTeamId: defaultTeamId,
|
|
@@ -831,7 +797,7 @@ exports.createActivityTool = {
|
|
|
831
797
|
if (!args.name) {
|
|
832
798
|
throw new Error("Either 'activities' array or 'name' parameter is required");
|
|
833
799
|
}
|
|
834
|
-
logger.
|
|
800
|
+
logger.debug("Creating single activity", {
|
|
835
801
|
workflowId: args.workflowId,
|
|
836
802
|
name: args.name,
|
|
837
803
|
defaultTeamId: defaultTeamId,
|
|
@@ -847,7 +813,7 @@ exports.createActivityTool = {
|
|
|
847
813
|
}
|
|
848
814
|
}
|
|
849
815
|
// Pre-validate required fields before API call
|
|
850
|
-
const workflow =
|
|
816
|
+
const workflow = context.init.processes?.find((p) => p._id === args.workflowId);
|
|
851
817
|
if (workflow?.fields) {
|
|
852
818
|
const requiredFields = [];
|
|
853
819
|
for (const [fieldId, field] of Object.entries(workflow.fields)) {
|
|
@@ -942,10 +908,11 @@ exports.createActivityTool = {
|
|
|
942
908
|
}
|
|
943
909
|
}
|
|
944
910
|
catch (error) {
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
911
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
912
|
+
logger.error("Failed to create activity/activities", error, {
|
|
913
|
+
workflowId: args.workflowId,
|
|
914
|
+
isBulk: !!(args.activities && args.activities.length > 0),
|
|
915
|
+
});
|
|
949
916
|
const errorMessage = error instanceof Error
|
|
950
917
|
? error.message
|
|
951
918
|
: (typeof error === 'object' && error !== null)
|
|
@@ -971,10 +938,6 @@ exports.updateActivityTool = {
|
|
|
971
938
|
group: tool_registry_1.ToolGroup.WRITE,
|
|
972
939
|
description: updateActivityDescription,
|
|
973
940
|
schema: zod_1.z.object({
|
|
974
|
-
workspaceId: zod_1.z
|
|
975
|
-
.string()
|
|
976
|
-
.optional()
|
|
977
|
-
.describe("Workspace ID. If not provided, uses current workspace. Use list_my_workspaces to see available workspaces."),
|
|
978
941
|
// BULK: Array of activities to update
|
|
979
942
|
activities: zod_1.z
|
|
980
943
|
.preprocess((val) => (typeof val === "string" ? JSON.parse(val) : val), zod_1.z
|
|
@@ -1004,11 +967,6 @@ exports.updateActivityTool = {
|
|
|
1004
967
|
.describe("SINGLE: Optional phase ID to move the activity to"),
|
|
1005
968
|
}),
|
|
1006
969
|
async execute(args, context) {
|
|
1007
|
-
// Resolve workspace ID (for consistency, though activity IDs are globally unique)
|
|
1008
|
-
const workspaceId = (0, tool_helpers_1.getResolvedWorkspaceId)(args, context);
|
|
1009
|
-
if (!workspaceId) {
|
|
1010
|
-
return (0, tool_helpers_1.missingWorkspaceCacheResponse)();
|
|
1011
|
-
}
|
|
1012
970
|
try {
|
|
1013
971
|
// BULK MODE: Update multiple activities
|
|
1014
972
|
if (args.activities && Array.isArray(args.activities)) {
|
|
@@ -1121,10 +1079,11 @@ exports.updateActivityTool = {
|
|
|
1121
1079
|
return formatUpdateActivityResponse(args, result);
|
|
1122
1080
|
}
|
|
1123
1081
|
catch (error) {
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1082
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
1083
|
+
logger.error("Failed to update activity", error, {
|
|
1084
|
+
activityId: args.activityId || 'bulk',
|
|
1085
|
+
activityCount: args.activities?.length,
|
|
1086
|
+
});
|
|
1128
1087
|
return {
|
|
1129
1088
|
content: [
|
|
1130
1089
|
{
|
|
@@ -13,6 +13,7 @@ exports.removeAppTool = exports.updateAppTool = exports.listAppsTool = exports.c
|
|
|
13
13
|
const zod_1 = require("zod");
|
|
14
14
|
const tool_registry_1 = require("../tool-registry");
|
|
15
15
|
const logger_1 = require("../../lib/logger");
|
|
16
|
+
const request_logger_1 = require("../../lib/request-logger");
|
|
16
17
|
const tool_helpers_1 = require("../utils/tool-helpers");
|
|
17
18
|
const logger = (0, logger_1.createLogger)({ component: 'app-core' });
|
|
18
19
|
// ============================================================================
|
|
@@ -114,7 +115,8 @@ exports.createAppTool = {
|
|
|
114
115
|
};
|
|
115
116
|
}
|
|
116
117
|
catch (error) {
|
|
117
|
-
|
|
118
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
119
|
+
logger.error("Error creating app", error);
|
|
118
120
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
119
121
|
if (errorMessage.toLowerCase().includes('permission')) {
|
|
120
122
|
return {
|
|
@@ -215,7 +217,8 @@ exports.listAppsTool = {
|
|
|
215
217
|
};
|
|
216
218
|
}
|
|
217
219
|
catch (error) {
|
|
218
|
-
|
|
220
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
221
|
+
logger.error("Error listing apps", error);
|
|
219
222
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
220
223
|
return {
|
|
221
224
|
content: [{
|
|
@@ -312,7 +315,8 @@ exports.updateAppTool = {
|
|
|
312
315
|
};
|
|
313
316
|
}
|
|
314
317
|
catch (error) {
|
|
315
|
-
|
|
318
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
319
|
+
logger.error("Error updating app", error);
|
|
316
320
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
317
321
|
if (errorMessage.toLowerCase().includes('not found')) {
|
|
318
322
|
return {
|
|
@@ -443,7 +447,8 @@ exports.removeAppTool = {
|
|
|
443
447
|
};
|
|
444
448
|
}
|
|
445
449
|
catch (error) {
|
|
446
|
-
|
|
450
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
451
|
+
logger.error("Error removing app", error);
|
|
447
452
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
448
453
|
if (errorMessage.toLowerCase().includes('not found')) {
|
|
449
454
|
return {
|
|
@@ -15,6 +15,7 @@ const zod_1 = require("zod");
|
|
|
15
15
|
const tool_registry_1 = require("../tool-registry");
|
|
16
16
|
const UserContextCache_1 = require("../UserContextCache");
|
|
17
17
|
const logger_1 = require("../../lib/logger");
|
|
18
|
+
const request_logger_1 = require("../../lib/request-logger");
|
|
18
19
|
const tool_helpers_1 = require("../utils/tool-helpers");
|
|
19
20
|
const logger = (0, logger_1.createLogger)({ component: 'app-marketplace' });
|
|
20
21
|
const listTemplatesDescription = `List marketplace templates`;
|
|
@@ -109,7 +110,8 @@ exports.listTemplatesTool = {
|
|
|
109
110
|
};
|
|
110
111
|
}
|
|
111
112
|
catch (error) {
|
|
112
|
-
|
|
113
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
114
|
+
logger.error("Error listing templates", error);
|
|
113
115
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
114
116
|
return {
|
|
115
117
|
content: [{
|
|
@@ -185,7 +187,8 @@ exports.createTemplateTool = {
|
|
|
185
187
|
};
|
|
186
188
|
}
|
|
187
189
|
catch (error) {
|
|
188
|
-
|
|
190
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
191
|
+
logger.error("Error creating template", error);
|
|
189
192
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
190
193
|
if (errorMessage.toLowerCase().includes('permission')) {
|
|
191
194
|
return {
|
|
@@ -246,7 +249,7 @@ exports.installTemplateTool = {
|
|
|
246
249
|
});
|
|
247
250
|
// Invalidate user context cache so subsequent list_workflows calls get fresh data
|
|
248
251
|
UserContextCache_1.UserContextCache.clearContext(context.apiKey);
|
|
249
|
-
logger.
|
|
252
|
+
logger.debug('Cleared user context cache after template install', {
|
|
250
253
|
apiKey: context.apiKey.substring(0, 8) + '...'
|
|
251
254
|
});
|
|
252
255
|
const appId = result?.appId || result?._id;
|
|
@@ -267,7 +270,8 @@ exports.installTemplateTool = {
|
|
|
267
270
|
};
|
|
268
271
|
}
|
|
269
272
|
catch (error) {
|
|
270
|
-
|
|
273
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
274
|
+
logger.error("Error installing template", error);
|
|
271
275
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
272
276
|
if (errorMessage.toLowerCase().includes('not found')) {
|
|
273
277
|
return {
|
|
@@ -395,7 +399,8 @@ exports.getTemplateTool = {
|
|
|
395
399
|
};
|
|
396
400
|
}
|
|
397
401
|
catch (error) {
|
|
398
|
-
|
|
402
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
403
|
+
logger.error("Error getting template", error);
|
|
399
404
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
400
405
|
if (errorMessage.toLowerCase().includes('not found')) {
|
|
401
406
|
return {
|
|
@@ -569,7 +574,8 @@ exports.publishTemplateTool = {
|
|
|
569
574
|
};
|
|
570
575
|
}
|
|
571
576
|
catch (error) {
|
|
572
|
-
|
|
577
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
578
|
+
logger.error("Error publishing template", error);
|
|
573
579
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
574
580
|
if (errorMessage.toLowerCase().includes('permission')) {
|
|
575
581
|
return {
|
|
@@ -650,7 +656,8 @@ exports.getProductTool = {
|
|
|
650
656
|
};
|
|
651
657
|
}
|
|
652
658
|
catch (error) {
|
|
653
|
-
|
|
659
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
660
|
+
logger.error("Error getting product", error);
|
|
654
661
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
655
662
|
return {
|
|
656
663
|
content: [{
|
|
@@ -705,7 +712,8 @@ exports.getProductManifestTool = {
|
|
|
705
712
|
};
|
|
706
713
|
}
|
|
707
714
|
catch (error) {
|
|
708
|
-
|
|
715
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
716
|
+
logger.error("Error getting product manifest", error);
|
|
709
717
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
710
718
|
return {
|
|
711
719
|
content: [{
|
|
@@ -859,9 +867,9 @@ exports.publishAppTool = {
|
|
|
859
867
|
apiMethod = 'v3.product.create';
|
|
860
868
|
apiArgs = [productData];
|
|
861
869
|
}
|
|
862
|
-
logger.
|
|
870
|
+
logger.debug(`Calling ${apiMethod}`, { productId, workspaceId, appId: args.appId, targetId, productData });
|
|
863
871
|
const apiResult = await context.hailer.request(apiMethod, apiArgs);
|
|
864
|
-
logger.
|
|
872
|
+
logger.debug(`${apiMethod} response`, {
|
|
865
873
|
result: JSON.stringify(apiResult)
|
|
866
874
|
});
|
|
867
875
|
// Get the final product ID from the v3 API response
|
|
@@ -885,7 +893,8 @@ exports.publishAppTool = {
|
|
|
885
893
|
};
|
|
886
894
|
}
|
|
887
895
|
catch (error) {
|
|
888
|
-
|
|
896
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
897
|
+
logger.error("Error publishing app to marketplace", error);
|
|
889
898
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
890
899
|
if (errorMessage.toLowerCase().includes('permission')) {
|
|
891
900
|
return {
|
|
@@ -987,7 +996,8 @@ exports.installMarketplaceAppTool = {
|
|
|
987
996
|
};
|
|
988
997
|
}
|
|
989
998
|
catch (error) {
|
|
990
|
-
|
|
999
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
1000
|
+
logger.error("Error installing marketplace app", error);
|
|
991
1001
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
992
1002
|
if (errorMessage.toLowerCase().includes('permission')) {
|
|
993
1003
|
return {
|
|
@@ -11,6 +11,7 @@ exports.removeAppMemberTool = exports.addAppMemberTool = void 0;
|
|
|
11
11
|
const zod_1 = require("zod");
|
|
12
12
|
const tool_registry_1 = require("../tool-registry");
|
|
13
13
|
const logger_1 = require("../../lib/logger");
|
|
14
|
+
const request_logger_1 = require("../../lib/request-logger");
|
|
14
15
|
const tool_helpers_1 = require("../utils/tool-helpers");
|
|
15
16
|
const logger = (0, logger_1.createLogger)({ component: 'app-member' });
|
|
16
17
|
const addAppMemberDescription = `Share app with users/teams`;
|
|
@@ -75,7 +76,8 @@ exports.addAppMemberTool = {
|
|
|
75
76
|
};
|
|
76
77
|
}
|
|
77
78
|
catch (error) {
|
|
78
|
-
|
|
79
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
80
|
+
logger.error("Error adding app member", error);
|
|
79
81
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
80
82
|
if (errorMessage.toLowerCase().includes('not found')) {
|
|
81
83
|
return {
|
|
@@ -157,7 +159,8 @@ exports.removeAppMemberTool = {
|
|
|
157
159
|
};
|
|
158
160
|
}
|
|
159
161
|
catch (error) {
|
|
160
|
-
|
|
162
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
163
|
+
logger.error("Error removing app member", error);
|
|
161
164
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
162
165
|
if (errorMessage.toLowerCase().includes('not found')) {
|
|
163
166
|
return {
|
|
@@ -44,6 +44,7 @@ exports.publishHailerAppTool = exports.scaffoldHailerAppTool = void 0;
|
|
|
44
44
|
const zod_1 = require("zod");
|
|
45
45
|
const tool_registry_1 = require("../tool-registry");
|
|
46
46
|
const logger_1 = require("../../lib/logger");
|
|
47
|
+
const request_logger_1 = require("../../lib/request-logger");
|
|
47
48
|
const config_1 = require("../../config");
|
|
48
49
|
const tool_helpers_1 = require("../utils/tool-helpers");
|
|
49
50
|
const logger = (0, logger_1.createLogger)({ component: 'app-scaffold' });
|
|
@@ -526,7 +527,8 @@ exports.publishHailerAppTool = {
|
|
|
526
527
|
execSync('which expect', { encoding: 'utf-8', stdio: 'pipe' });
|
|
527
528
|
}
|
|
528
529
|
catch {
|
|
529
|
-
|
|
530
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
531
|
+
logger.error('expect command not found');
|
|
530
532
|
return {
|
|
531
533
|
content: [{
|
|
532
534
|
type: "text",
|
|
@@ -538,7 +540,8 @@ exports.publishHailerAppTool = {
|
|
|
538
540
|
const projectDir = args.projectDirectory || config_1.environment.DEV_APPS_PATH || process.cwd();
|
|
539
541
|
// Check if directory exists
|
|
540
542
|
if (!fs.existsSync(projectDir)) {
|
|
541
|
-
|
|
543
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
544
|
+
logger.error('Project directory does not exist', { projectDir });
|
|
542
545
|
return {
|
|
543
546
|
content: [{
|
|
544
547
|
type: "text",
|
|
@@ -549,7 +552,8 @@ exports.publishHailerAppTool = {
|
|
|
549
552
|
// Check if package.json exists
|
|
550
553
|
const packageJsonPath = path.join(projectDir, 'package.json');
|
|
551
554
|
if (!fs.existsSync(packageJsonPath)) {
|
|
552
|
-
|
|
555
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
556
|
+
logger.error('package.json not found', { packageJsonPath });
|
|
553
557
|
return {
|
|
554
558
|
content: [{
|
|
555
559
|
type: "text",
|
|
@@ -570,7 +574,8 @@ exports.publishHailerAppTool = {
|
|
|
570
574
|
}
|
|
571
575
|
appName = manifest.name || appName;
|
|
572
576
|
if (!appId) {
|
|
573
|
-
|
|
577
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
578
|
+
logger.error('No appId found');
|
|
574
579
|
return {
|
|
575
580
|
content: [{
|
|
576
581
|
type: "text",
|
|
@@ -580,7 +585,8 @@ exports.publishHailerAppTool = {
|
|
|
580
585
|
}
|
|
581
586
|
// Validate version fields are present and not empty
|
|
582
587
|
if (!manifest.version || manifest.version.trim() === '') {
|
|
583
|
-
|
|
588
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
589
|
+
logger.error('version field missing or empty');
|
|
584
590
|
return {
|
|
585
591
|
content: [{
|
|
586
592
|
type: "text",
|
|
@@ -589,7 +595,8 @@ exports.publishHailerAppTool = {
|
|
|
589
595
|
};
|
|
590
596
|
}
|
|
591
597
|
if (!manifest.versionDescription || manifest.versionDescription.trim() === '') {
|
|
592
|
-
|
|
598
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
599
|
+
logger.error('versionDescription field missing or empty');
|
|
593
600
|
return {
|
|
594
601
|
content: [{
|
|
595
602
|
type: "text",
|
|
@@ -600,7 +607,8 @@ exports.publishHailerAppTool = {
|
|
|
600
607
|
}
|
|
601
608
|
catch (error) {
|
|
602
609
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
603
|
-
|
|
610
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
611
|
+
logger.error('Failed to parse manifest.json', { error: errorMessage });
|
|
604
612
|
return {
|
|
605
613
|
content: [{
|
|
606
614
|
type: "text",
|
|
@@ -610,7 +618,8 @@ exports.publishHailerAppTool = {
|
|
|
610
618
|
}
|
|
611
619
|
}
|
|
612
620
|
else if (!appId) {
|
|
613
|
-
|
|
621
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
622
|
+
logger.error('Manifest not found and no appId provided');
|
|
614
623
|
return {
|
|
615
624
|
content: [{
|
|
616
625
|
type: "text",
|
|
@@ -622,7 +631,8 @@ exports.publishHailerAppTool = {
|
|
|
622
631
|
try {
|
|
623
632
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
624
633
|
if (!packageJson.scripts?.['publish-production']) {
|
|
625
|
-
|
|
634
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
635
|
+
logger.error('publish-production script not found');
|
|
626
636
|
return {
|
|
627
637
|
content: [{
|
|
628
638
|
type: "text",
|
|
@@ -633,7 +643,8 @@ exports.publishHailerAppTool = {
|
|
|
633
643
|
}
|
|
634
644
|
catch (error) {
|
|
635
645
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
636
|
-
|
|
646
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
647
|
+
logger.error('Failed to parse package.json for scripts', { error: errorMessage });
|
|
637
648
|
return {
|
|
638
649
|
content: [{
|
|
639
650
|
type: "text",
|
|
@@ -642,7 +653,7 @@ exports.publishHailerAppTool = {
|
|
|
642
653
|
};
|
|
643
654
|
}
|
|
644
655
|
// Log the start of publish
|
|
645
|
-
logger.
|
|
656
|
+
logger.debug('Publishing app...', { appId, appName, workspace: context.workspaceCache.currentWorkspace.name });
|
|
646
657
|
let responseText = `🚀 **Publishing Hailer App**\n\n`;
|
|
647
658
|
responseText += `**App Name:** ${appName}\n`;
|
|
648
659
|
responseText += `**App ID:** \`${appId}\`\n`;
|
|
@@ -754,10 +765,11 @@ expect {
|
|
|
754
765
|
}
|
|
755
766
|
}
|
|
756
767
|
catch (error) {
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
768
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
769
|
+
logger.error('Expect script execution failed', {
|
|
770
|
+
errorCode: error.code,
|
|
771
|
+
signal: error.signal
|
|
772
|
+
});
|
|
761
773
|
// Clean up temp file
|
|
762
774
|
try {
|
|
763
775
|
fs.unlinkSync(expectScriptPath);
|
|
@@ -801,7 +813,8 @@ expect {
|
|
|
801
813
|
}
|
|
802
814
|
});
|
|
803
815
|
if (!result.success) {
|
|
804
|
-
|
|
816
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
817
|
+
logger.error('Publish failed');
|
|
805
818
|
return {
|
|
806
819
|
content: [{
|
|
807
820
|
type: "text",
|
|
@@ -810,7 +823,7 @@ expect {
|
|
|
810
823
|
};
|
|
811
824
|
}
|
|
812
825
|
// Log success
|
|
813
|
-
logger.
|
|
826
|
+
logger.debug('App published successfully', { appId, appName });
|
|
814
827
|
responseText += `✅ **App Published Successfully!**\n\n`;
|
|
815
828
|
if (result.targetId) {
|
|
816
829
|
responseText += `**Target ID:** \`${result.targetId}\`\n\n`;
|
|
@@ -853,7 +866,8 @@ expect {
|
|
|
853
866
|
}
|
|
854
867
|
catch (error) {
|
|
855
868
|
const errorMessage = (0, tool_helpers_1.extractErrorMessage)(error);
|
|
856
|
-
|
|
869
|
+
if (!request_logger_1.RequestLogger.getCurrent())
|
|
870
|
+
logger.error('Error publishing Hailer app', { error: errorMessage });
|
|
857
871
|
return {
|
|
858
872
|
content: [{
|
|
859
873
|
type: "text",
|
|
@@ -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
|