@dobbyai/mcp-external 1.0.4 → 1.2.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/README.md +44 -14
- package/dist/__tests__/agent-mail-tools.test.d.ts +8 -0
- package/dist/__tests__/agent-mail-tools.test.d.ts.map +1 -0
- package/dist/__tests__/agent-mail-tools.test.js +255 -0
- package/dist/__tests__/agent-mail-tools.test.js.map +1 -0
- package/dist/__tests__/annotations.test.d.ts +8 -0
- package/dist/__tests__/annotations.test.d.ts.map +1 -0
- package/dist/__tests__/annotations.test.js +108 -0
- package/dist/__tests__/annotations.test.js.map +1 -0
- package/dist/__tests__/auth.test.d.ts +7 -0
- package/dist/__tests__/auth.test.d.ts.map +1 -0
- package/dist/__tests__/auth.test.js +161 -0
- package/dist/__tests__/auth.test.js.map +1 -0
- package/dist/__tests__/doctor.test.d.ts +16 -0
- package/dist/__tests__/doctor.test.d.ts.map +1 -0
- package/dist/__tests__/doctor.test.js +258 -0
- package/dist/__tests__/doctor.test.js.map +1 -0
- package/dist/__tests__/external-agents-tools.test.d.ts +11 -0
- package/dist/__tests__/external-agents-tools.test.d.ts.map +1 -0
- package/dist/__tests__/external-agents-tools.test.js +619 -0
- package/dist/__tests__/external-agents-tools.test.js.map +1 -0
- package/dist/__tests__/gateway-bearer.test.d.ts +12 -0
- package/dist/__tests__/gateway-bearer.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-bearer.test.js +112 -0
- package/dist/__tests__/gateway-bearer.test.js.map +1 -0
- package/dist/__tests__/gateway-key-resolver.test.d.ts +10 -0
- package/dist/__tests__/gateway-key-resolver.test.d.ts.map +1 -0
- package/dist/__tests__/gateway-key-resolver.test.js +125 -0
- package/dist/__tests__/gateway-key-resolver.test.js.map +1 -0
- package/dist/__tests__/http-concurrency.test.d.ts +20 -0
- package/dist/__tests__/http-concurrency.test.d.ts.map +1 -0
- package/dist/__tests__/http-concurrency.test.js +254 -0
- package/dist/__tests__/http-concurrency.test.js.map +1 -0
- package/dist/__tests__/integration/protocol.test.d.ts +8 -0
- package/dist/__tests__/integration/protocol.test.d.ts.map +1 -0
- package/dist/__tests__/integration/protocol.test.js +110 -0
- package/dist/__tests__/integration/protocol.test.js.map +1 -0
- package/dist/__tests__/mcp-integrations.test.d.ts +8 -0
- package/dist/__tests__/mcp-integrations.test.d.ts.map +1 -0
- package/dist/__tests__/mcp-integrations.test.js +365 -0
- package/dist/__tests__/mcp-integrations.test.js.map +1 -0
- package/dist/__tests__/memory-graph-tools.test.d.ts +8 -0
- package/dist/__tests__/memory-graph-tools.test.d.ts.map +1 -0
- package/dist/__tests__/memory-graph-tools.test.js +254 -0
- package/dist/__tests__/memory-graph-tools.test.js.map +1 -0
- package/dist/__tests__/registry-dispatch.test.d.ts +11 -0
- package/dist/__tests__/registry-dispatch.test.d.ts.map +1 -0
- package/dist/__tests__/registry-dispatch.test.js +30 -0
- package/dist/__tests__/registry-dispatch.test.js.map +1 -0
- package/dist/__tests__/registry-listing-parity.test.d.ts +2 -0
- package/dist/__tests__/registry-listing-parity.test.d.ts.map +1 -0
- package/dist/__tests__/registry-listing-parity.test.js +89 -0
- package/dist/__tests__/registry-listing-parity.test.js.map +1 -0
- package/dist/__tests__/role-cap.test.d.ts +2 -0
- package/dist/__tests__/role-cap.test.d.ts.map +1 -0
- package/dist/__tests__/role-cap.test.js +113 -0
- package/dist/__tests__/role-cap.test.js.map +1 -0
- package/dist/__tests__/schedule-tools.test.d.ts +8 -0
- package/dist/__tests__/schedule-tools.test.d.ts.map +1 -0
- package/dist/__tests__/schedule-tools.test.js +285 -0
- package/dist/__tests__/schedule-tools.test.js.map +1 -0
- package/dist/__tests__/server-gateway-key.test.d.ts +18 -0
- package/dist/__tests__/server-gateway-key.test.d.ts.map +1 -0
- package/dist/__tests__/server-gateway-key.test.js +148 -0
- package/dist/__tests__/server-gateway-key.test.js.map +1 -0
- package/dist/__tests__/server-user-scoped.test.d.ts +34 -0
- package/dist/__tests__/server-user-scoped.test.d.ts.map +1 -0
- package/dist/__tests__/server-user-scoped.test.js +577 -0
- package/dist/__tests__/server-user-scoped.test.js.map +1 -0
- package/dist/__tests__/task-id-pattern.test.d.ts +12 -0
- package/dist/__tests__/task-id-pattern.test.d.ts.map +1 -0
- package/dist/__tests__/task-id-pattern.test.js +43 -0
- package/dist/__tests__/task-id-pattern.test.js.map +1 -0
- package/dist/__tests__/tiers.test.d.ts +7 -0
- package/dist/__tests__/tiers.test.d.ts.map +1 -0
- package/dist/__tests__/tiers.test.js +199 -0
- package/dist/__tests__/tiers.test.js.map +1 -0
- package/dist/__tests__/tools/hosted-agents.test.d.ts +9 -0
- package/dist/__tests__/tools/hosted-agents.test.d.ts.map +1 -0
- package/dist/__tests__/tools/hosted-agents.test.js +301 -0
- package/dist/__tests__/tools/hosted-agents.test.js.map +1 -0
- package/dist/__tests__/tools/llm-providers.test.d.ts +10 -0
- package/dist/__tests__/tools/llm-providers.test.d.ts.map +1 -0
- package/dist/__tests__/tools/llm-providers.test.js +105 -0
- package/dist/__tests__/tools/llm-providers.test.js.map +1 -0
- package/dist/__tests__/tools/services.test.js +139 -98
- package/dist/__tests__/tools/services.test.js.map +1 -1
- package/dist/__tests__/tools.test.d.ts +7 -0
- package/dist/__tests__/tools.test.d.ts.map +1 -0
- package/dist/__tests__/tools.test.js +152 -0
- package/dist/__tests__/tools.test.js.map +1 -0
- package/dist/__tests__/transport.test.d.ts +7 -0
- package/dist/__tests__/transport.test.d.ts.map +1 -0
- package/dist/__tests__/transport.test.js +397 -0
- package/dist/__tests__/transport.test.js.map +1 -0
- package/dist/__tests__/validate-credentials.test.d.ts +9 -0
- package/dist/__tests__/validate-credentials.test.d.ts.map +1 -0
- package/dist/__tests__/validate-credentials.test.js +172 -0
- package/dist/__tests__/validate-credentials.test.js.map +1 -0
- package/dist/__tests__/web-eval-tools.test.d.ts +8 -0
- package/dist/__tests__/web-eval-tools.test.d.ts.map +1 -0
- package/dist/__tests__/web-eval-tools.test.js +241 -0
- package/dist/__tests__/web-eval-tools.test.js.map +1 -0
- package/dist/__tests__/whoami.test.d.ts +11 -0
- package/dist/__tests__/whoami.test.d.ts.map +1 -0
- package/dist/__tests__/whoami.test.js +194 -0
- package/dist/__tests__/whoami.test.js.map +1 -0
- package/dist/__tests__/workflow-tools.test.d.ts +8 -0
- package/dist/__tests__/workflow-tools.test.d.ts.map +1 -0
- package/dist/__tests__/workflow-tools.test.js +261 -0
- package/dist/__tests__/workflow-tools.test.js.map +1 -0
- package/dist/__tests__/workloads.test.d.ts +9 -0
- package/dist/__tests__/workloads.test.d.ts.map +1 -0
- package/dist/__tests__/workloads.test.js +169 -0
- package/dist/__tests__/workloads.test.js.map +1 -0
- package/dist/auth/oauth-provider.d.ts +34 -0
- package/dist/auth/oauth-provider.d.ts.map +1 -0
- package/dist/auth/oauth-provider.js +75 -0
- package/dist/auth/oauth-provider.js.map +1 -0
- package/dist/auth/token-verifier.d.ts +45 -0
- package/dist/auth/token-verifier.d.ts.map +1 -0
- package/dist/auth/token-verifier.js +160 -0
- package/dist/auth/token-verifier.js.map +1 -0
- package/dist/connectors/claude-desktop.d.ts.map +1 -1
- package/dist/connectors/claude-desktop.js +3 -2
- package/dist/connectors/claude-desktop.js.map +1 -1
- package/dist/connectors/cursor.d.ts.map +1 -1
- package/dist/connectors/cursor.js +3 -2
- package/dist/connectors/cursor.js.map +1 -1
- package/dist/connectors/setup.d.ts.map +1 -1
- package/dist/connectors/setup.js +2 -1
- package/dist/connectors/setup.js.map +1 -1
- package/dist/connectors/vscode.d.ts.map +1 -1
- package/dist/connectors/vscode.js +3 -2
- package/dist/connectors/vscode.js.map +1 -1
- package/dist/connectors/windsurf.d.ts.map +1 -1
- package/dist/connectors/windsurf.js +3 -2
- package/dist/connectors/windsurf.js.map +1 -1
- package/dist/doctor.d.ts +34 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +134 -0
- package/dist/doctor.js.map +1 -0
- package/dist/http-server.d.ts +56 -0
- package/dist/http-server.d.ts.map +1 -0
- package/dist/http-server.js +455 -0
- package/dist/http-server.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +96 -171
- package/dist/index.js.map +1 -1
- package/dist/lib/consts.d.ts +21 -0
- package/dist/lib/consts.d.ts.map +1 -0
- package/dist/lib/consts.js +30 -0
- package/dist/lib/consts.js.map +1 -0
- package/dist/lib/dobby-client.d.ts +60 -3
- package/dist/lib/dobby-client.d.ts.map +1 -1
- package/dist/lib/dobby-client.js +145 -44
- package/dist/lib/dobby-client.js.map +1 -1
- package/dist/lib/gateway-key-resolver.d.ts +38 -0
- package/dist/lib/gateway-key-resolver.d.ts.map +1 -0
- package/dist/lib/gateway-key-resolver.js +59 -0
- package/dist/lib/gateway-key-resolver.js.map +1 -0
- package/dist/lib/log.d.ts +25 -0
- package/dist/lib/log.d.ts.map +1 -0
- package/dist/lib/log.js +36 -0
- package/dist/lib/log.js.map +1 -0
- package/dist/server.d.ts +175 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1017 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/agent-mail.d.ts +112 -0
- package/dist/tools/agent-mail.d.ts.map +1 -0
- package/dist/tools/agent-mail.js +118 -0
- package/dist/tools/agent-mail.js.map +1 -0
- package/dist/tools/agent-versions.d.ts +93 -0
- package/dist/tools/agent-versions.d.ts.map +1 -0
- package/dist/tools/agent-versions.js +99 -0
- package/dist/tools/agent-versions.js.map +1 -0
- package/dist/tools/approvals.d.ts +24 -34
- package/dist/tools/approvals.d.ts.map +1 -1
- package/dist/tools/approvals.js +24 -81
- package/dist/tools/approvals.js.map +1 -1
- package/dist/tools/claude-code-sync.d.ts +40 -0
- package/dist/tools/claude-code-sync.d.ts.map +1 -0
- package/dist/tools/claude-code-sync.js +52 -0
- package/dist/tools/claude-code-sync.js.map +1 -0
- package/dist/tools/control-plane.d.ts +118 -0
- package/dist/tools/control-plane.d.ts.map +1 -0
- package/dist/tools/control-plane.js +135 -0
- package/dist/tools/control-plane.js.map +1 -0
- package/dist/tools/crew-builder.d.ts +24 -66
- package/dist/tools/crew-builder.d.ts.map +1 -1
- package/dist/tools/crew-builder.js +24 -185
- package/dist/tools/crew-builder.js.map +1 -1
- package/dist/tools/crewai.d.ts +24 -63
- package/dist/tools/crewai.d.ts.map +1 -1
- package/dist/tools/crewai.js +24 -145
- package/dist/tools/crewai.js.map +1 -1
- package/dist/tools/exa.d.ts +126 -0
- package/dist/tools/exa.d.ts.map +1 -0
- package/dist/tools/exa.js +125 -0
- package/dist/tools/exa.js.map +1 -0
- package/dist/tools/external-agents.d.ts +440 -0
- package/dist/tools/external-agents.d.ts.map +1 -0
- package/dist/tools/external-agents.js +386 -0
- package/dist/tools/external-agents.js.map +1 -0
- package/dist/tools/github-mcp.d.ts +228 -0
- package/dist/tools/github-mcp.d.ts.map +1 -0
- package/dist/tools/github-mcp.js +235 -0
- package/dist/tools/github-mcp.js.map +1 -0
- package/dist/tools/governance.d.ts +273 -0
- package/dist/tools/governance.d.ts.map +1 -0
- package/dist/tools/governance.js +286 -0
- package/dist/tools/governance.js.map +1 -0
- package/dist/tools/hosted-agents.d.ts +216 -0
- package/dist/tools/hosted-agents.d.ts.map +1 -0
- package/dist/tools/hosted-agents.js +214 -0
- package/dist/tools/hosted-agents.js.map +1 -0
- package/dist/tools/index.d.ts +6335 -191
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +441 -172
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/jira.d.ts +60 -176
- package/dist/tools/jira.d.ts.map +1 -1
- package/dist/tools/jira.js +60 -365
- package/dist/tools/jira.js.map +1 -1
- package/dist/tools/llm-providers.d.ts +50 -0
- package/dist/tools/llm-providers.d.ts.map +1 -0
- package/dist/tools/llm-providers.js +41 -0
- package/dist/tools/llm-providers.js.map +1 -0
- package/dist/tools/mcp-metrics.d.ts +47 -0
- package/dist/tools/mcp-metrics.d.ts.map +1 -0
- package/dist/tools/mcp-metrics.js +53 -0
- package/dist/tools/mcp-metrics.js.map +1 -0
- package/dist/tools/mcp-tools.d.ts +12 -29
- package/dist/tools/mcp-tools.d.ts.map +1 -1
- package/dist/tools/mcp-tools.js +12 -131
- package/dist/tools/mcp-tools.js.map +1 -1
- package/dist/tools/mem0.d.ts +127 -0
- package/dist/tools/mem0.d.ts.map +1 -0
- package/dist/tools/mem0.js +155 -0
- package/dist/tools/mem0.js.map +1 -0
- package/dist/tools/memory-graph.d.ts +151 -0
- package/dist/tools/memory-graph.d.ts.map +1 -0
- package/dist/tools/memory-graph.js +159 -0
- package/dist/tools/memory-graph.js.map +1 -0
- package/dist/tools/memory-stores.d.ts +141 -0
- package/dist/tools/memory-stores.d.ts.map +1 -0
- package/dist/tools/memory-stores.js +147 -0
- package/dist/tools/memory-stores.js.map +1 -0
- package/dist/tools/messages.d.ts +12 -20
- package/dist/tools/messages.d.ts.map +1 -1
- package/dist/tools/messages.js +12 -49
- package/dist/tools/messages.js.map +1 -1
- package/dist/tools/moltbook.d.ts +328 -0
- package/dist/tools/moltbook.d.ts.map +1 -0
- package/dist/tools/moltbook.js +334 -0
- package/dist/tools/moltbook.js.map +1 -0
- package/dist/tools/monitoring-attribution.d.ts +71 -0
- package/dist/tools/monitoring-attribution.d.ts.map +1 -0
- package/dist/tools/monitoring-attribution.js +74 -0
- package/dist/tools/monitoring-attribution.js.map +1 -0
- package/dist/tools/ops.d.ts +139 -0
- package/dist/tools/ops.d.ts.map +1 -0
- package/dist/tools/ops.js +151 -0
- package/dist/tools/ops.js.map +1 -0
- package/dist/tools/orchestrations.d.ts +109 -0
- package/dist/tools/orchestrations.d.ts.map +1 -0
- package/dist/tools/orchestrations.js +115 -0
- package/dist/tools/orchestrations.js.map +1 -0
- package/dist/tools/outcomes.d.ts +138 -0
- package/dist/tools/outcomes.d.ts.map +1 -0
- package/dist/tools/outcomes.js +136 -0
- package/dist/tools/outcomes.js.map +1 -0
- package/dist/tools/schedules.d.ts +149 -0
- package/dist/tools/schedules.d.ts.map +1 -0
- package/dist/tools/schedules.js +155 -0
- package/dist/tools/schedules.js.map +1 -0
- package/dist/tools/services.d.ts +6 -16
- package/dist/tools/services.d.ts.map +1 -1
- package/dist/tools/services.js +6 -135
- package/dist/tools/services.js.map +1 -1
- package/dist/tools/sessions.d.ts +124 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +130 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/setup-status.d.ts +29 -0
- package/dist/tools/setup-status.d.ts.map +1 -0
- package/dist/tools/setup-status.js +35 -0
- package/dist/tools/setup-status.js.map +1 -0
- package/dist/tools/tasks.d.ts +44 -56
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +48 -212
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/tiers.d.ts +55 -0
- package/dist/tools/tiers.d.ts.map +1 -0
- package/dist/tools/tiers.js +239 -0
- package/dist/tools/tiers.js.map +1 -0
- package/dist/tools/unified-agents.d.ts +43 -0
- package/dist/tools/unified-agents.d.ts.map +1 -0
- package/dist/tools/unified-agents.js +46 -0
- package/dist/tools/unified-agents.js.map +1 -0
- package/dist/tools/web-eval.d.ts +129 -0
- package/dist/tools/web-eval.d.ts.map +1 -0
- package/dist/tools/web-eval.js +136 -0
- package/dist/tools/web-eval.js.map +1 -0
- package/dist/tools/workflow.d.ts +105 -0
- package/dist/tools/workflow.d.ts.map +1 -0
- package/dist/tools/workflow.js +111 -0
- package/dist/tools/workflow.js.map +1 -0
- package/dist/tools/workloads.d.ts +81 -0
- package/dist/tools/workloads.d.ts.map +1 -0
- package/dist/tools/workloads.js +81 -0
- package/dist/tools/workloads.js.map +1 -0
- package/package.json +13 -7
|
@@ -20,6 +20,12 @@
|
|
|
20
20
|
export const crewBuilderTools = {
|
|
21
21
|
crew_validate: {
|
|
22
22
|
name: 'crew_validate',
|
|
23
|
+
annotations: {
|
|
24
|
+
title: 'Validate Crew',
|
|
25
|
+
readOnlyHint: true,
|
|
26
|
+
destructiveHint: false,
|
|
27
|
+
openWorldHint: false,
|
|
28
|
+
},
|
|
23
29
|
description: 'Validate CrewAI YAML configurations (agents and tasks) without running them. ' +
|
|
24
30
|
'Use this to check for errors before starting a kickoff. ' +
|
|
25
31
|
'Returns validation errors or confirms the configuration is valid.',
|
|
@@ -50,6 +56,12 @@ export const crewBuilderTools = {
|
|
|
50
56
|
},
|
|
51
57
|
crew_kickoff: {
|
|
52
58
|
name: 'crew_kickoff',
|
|
59
|
+
annotations: {
|
|
60
|
+
title: 'Kickoff Crew',
|
|
61
|
+
readOnlyHint: false,
|
|
62
|
+
destructiveHint: true,
|
|
63
|
+
openWorldHint: false,
|
|
64
|
+
},
|
|
53
65
|
description: 'Create a CrewAI crew from YAML configurations and start execution. ' +
|
|
54
66
|
'Agents and tasks are defined in YAML with {placeholder} variable substitution. ' +
|
|
55
67
|
'Returns a run_id to track progress with crew_status. ' +
|
|
@@ -82,6 +94,12 @@ export const crewBuilderTools = {
|
|
|
82
94
|
},
|
|
83
95
|
crew_status: {
|
|
84
96
|
name: 'crew_status',
|
|
97
|
+
annotations: {
|
|
98
|
+
title: 'Crew Status',
|
|
99
|
+
readOnlyHint: true,
|
|
100
|
+
destructiveHint: false,
|
|
101
|
+
openWorldHint: false,
|
|
102
|
+
},
|
|
85
103
|
description: 'Check the status of a local CrewAI crew execution. ' +
|
|
86
104
|
'Returns the state (pending/running/completed/failed), agent outputs, ' +
|
|
87
105
|
'result when complete, or error message if failed.',
|
|
@@ -98,6 +116,12 @@ export const crewBuilderTools = {
|
|
|
98
116
|
},
|
|
99
117
|
crew_list: {
|
|
100
118
|
name: 'crew_list',
|
|
119
|
+
annotations: {
|
|
120
|
+
title: 'List Crews',
|
|
121
|
+
readOnlyHint: true,
|
|
122
|
+
destructiveHint: false,
|
|
123
|
+
openWorldHint: false,
|
|
124
|
+
},
|
|
101
125
|
description: 'List recent local CrewAI crew runs with their status, timing, and summary info.',
|
|
102
126
|
inputSchema: {
|
|
103
127
|
type: 'object',
|
|
@@ -115,192 +139,7 @@ export const crewBuilderTools = {
|
|
|
115
139
|
},
|
|
116
140
|
},
|
|
117
141
|
};
|
|
118
|
-
async function callCrewBuilderProxy(client, payload) {
|
|
119
|
-
const url = `${client.apiUrl}/api/v1/gateway/agents/proxy`;
|
|
120
|
-
const response = await fetch(url, {
|
|
121
|
-
method: 'POST',
|
|
122
|
-
headers: {
|
|
123
|
-
'Content-Type': 'application/json',
|
|
124
|
-
Authorization: `Bearer ${client.apiKey}`,
|
|
125
|
-
...(client.tenantId ? { 'X-Tenant-Id': client.tenantId } : {}),
|
|
126
|
-
},
|
|
127
|
-
body: JSON.stringify({
|
|
128
|
-
...payload,
|
|
129
|
-
provider_id: 'crewai-local',
|
|
130
|
-
}),
|
|
131
|
-
});
|
|
132
|
-
if (!response.ok) {
|
|
133
|
-
const errBody = await response.json().catch(() => ({
|
|
134
|
-
error: `Gateway proxy returned ${response.status}`,
|
|
135
|
-
}));
|
|
136
|
-
throw new Error(errBody.error ||
|
|
137
|
-
errBody.detail ||
|
|
138
|
-
`Gateway proxy error: HTTP ${response.status}`);
|
|
139
|
-
}
|
|
140
|
-
return response.json();
|
|
141
|
-
}
|
|
142
142
|
// ============================================
|
|
143
143
|
// Tool Handlers
|
|
144
144
|
// ============================================
|
|
145
|
-
export async function handleCrewValidate(client, args) {
|
|
146
|
-
try {
|
|
147
|
-
const data = await callCrewBuilderProxy(client, {
|
|
148
|
-
action: 'validate',
|
|
149
|
-
provider_id: 'crewai-local',
|
|
150
|
-
agents_yaml: args.agents_yaml,
|
|
151
|
-
tasks_yaml: args.tasks_yaml,
|
|
152
|
-
});
|
|
153
|
-
const resp = data.response || {};
|
|
154
|
-
let text = `# Crew YAML Validation\n\n`;
|
|
155
|
-
if (resp.valid) {
|
|
156
|
-
text += `✅ **Valid** — Configuration is ready to run.\n\n`;
|
|
157
|
-
}
|
|
158
|
-
else {
|
|
159
|
-
text += `❌ **Invalid** — Found ${resp.errors?.length || 0} error(s):\n\n`;
|
|
160
|
-
for (const error of resp.errors || []) {
|
|
161
|
-
text += `- ${error}\n`;
|
|
162
|
-
}
|
|
163
|
-
text += `\n`;
|
|
164
|
-
}
|
|
165
|
-
if (resp.agents?.length > 0) {
|
|
166
|
-
text += `## Agents (${resp.agents.length})\n\n`;
|
|
167
|
-
for (const agent of resp.agents) {
|
|
168
|
-
text += `- **${agent.name}** — ${agent.role} (${agent.goal})\n`;
|
|
169
|
-
}
|
|
170
|
-
text += `\n`;
|
|
171
|
-
}
|
|
172
|
-
if (resp.tasks?.length > 0) {
|
|
173
|
-
text += `## Tasks (${resp.tasks.length})\n\n`;
|
|
174
|
-
for (const task of resp.tasks) {
|
|
175
|
-
text += `- **${task.name}** → agent: \`${task.agent}\` — ${task.description}\n`;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
return { content: [{ type: 'text', text }] };
|
|
179
|
-
}
|
|
180
|
-
catch (error) {
|
|
181
|
-
return {
|
|
182
|
-
content: [
|
|
183
|
-
{ type: 'text', text: `Crew validation failed: ${error.message}` },
|
|
184
|
-
],
|
|
185
|
-
isError: true,
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
export async function handleCrewKickoff(client, args) {
|
|
190
|
-
try {
|
|
191
|
-
const data = await callCrewBuilderProxy(client, {
|
|
192
|
-
action: 'local_kickoff',
|
|
193
|
-
provider_id: 'crewai-local',
|
|
194
|
-
agents_yaml: args.agents_yaml,
|
|
195
|
-
tasks_yaml: args.tasks_yaml,
|
|
196
|
-
variables: args.variables || {},
|
|
197
|
-
process_type: args.process_type || 'sequential',
|
|
198
|
-
});
|
|
199
|
-
const resp = data.response || {};
|
|
200
|
-
let text = `# Crew Kickoff Started\n\n`;
|
|
201
|
-
text += `- **Run ID:** \`${resp.run_id}\`\n`;
|
|
202
|
-
text += `- **Status:** ${resp.status}\n`;
|
|
203
|
-
text += `- **Agents:** ${resp.agent_count}\n`;
|
|
204
|
-
text += `- **Tasks:** ${resp.task_count}\n`;
|
|
205
|
-
text += `- **Process:** ${resp.process_type}\n`;
|
|
206
|
-
text += `- **Latency:** ${data.latency_ms}ms\n\n`;
|
|
207
|
-
text += `Use \`crew_status\` with run_id \`${resp.run_id}\` to check progress.`;
|
|
208
|
-
return { content: [{ type: 'text', text }] };
|
|
209
|
-
}
|
|
210
|
-
catch (error) {
|
|
211
|
-
return {
|
|
212
|
-
content: [
|
|
213
|
-
{ type: 'text', text: `Crew kickoff failed: ${error.message}` },
|
|
214
|
-
],
|
|
215
|
-
isError: true,
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
export async function handleCrewStatus(client, args) {
|
|
220
|
-
try {
|
|
221
|
-
const data = await callCrewBuilderProxy(client, {
|
|
222
|
-
action: 'local_status',
|
|
223
|
-
provider_id: 'crewai-local',
|
|
224
|
-
run_id: args.run_id,
|
|
225
|
-
});
|
|
226
|
-
const resp = data.response || {};
|
|
227
|
-
let text = `# Crew Run Status\n\n`;
|
|
228
|
-
text += `- **Run ID:** \`${resp.run_id}\`\n`;
|
|
229
|
-
text += `- **Status:** ${resp.status}\n`;
|
|
230
|
-
text += `- **Process:** ${resp.process_type}\n`;
|
|
231
|
-
text += `- **Agents:** ${resp.agent_count}\n`;
|
|
232
|
-
text += `- **Tasks:** ${resp.task_count}\n`;
|
|
233
|
-
if (resp.started_at) {
|
|
234
|
-
text += `- **Started:** ${resp.started_at}\n`;
|
|
235
|
-
}
|
|
236
|
-
if (resp.completed_at) {
|
|
237
|
-
text += `- **Completed:** ${resp.completed_at}\n`;
|
|
238
|
-
}
|
|
239
|
-
if (resp.duration_ms != null) {
|
|
240
|
-
text += `- **Duration:** ${resp.duration_ms}ms\n`;
|
|
241
|
-
}
|
|
242
|
-
if (resp.error_message) {
|
|
243
|
-
text += `\n## Error\n\n\`\`\`\n${resp.error_message}\n\`\`\`\n`;
|
|
244
|
-
}
|
|
245
|
-
if (resp.agent_outputs?.length > 0) {
|
|
246
|
-
text += `\n## Agent Outputs\n\n`;
|
|
247
|
-
for (const output of resp.agent_outputs) {
|
|
248
|
-
text += `### ${output.task || 'Task'}\n\n${output.output}\n\n`;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
if (resp.result) {
|
|
252
|
-
text += `\n## Final Result\n\n${resp.result}\n`;
|
|
253
|
-
}
|
|
254
|
-
return { content: [{ type: 'text', text }] };
|
|
255
|
-
}
|
|
256
|
-
catch (error) {
|
|
257
|
-
return {
|
|
258
|
-
content: [
|
|
259
|
-
{ type: 'text', text: `Failed to get crew status: ${error.message}` },
|
|
260
|
-
],
|
|
261
|
-
isError: true,
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
export async function handleCrewList(client, args) {
|
|
266
|
-
try {
|
|
267
|
-
const data = await callCrewBuilderProxy(client, {
|
|
268
|
-
action: 'list_runs',
|
|
269
|
-
provider_id: 'crewai-local',
|
|
270
|
-
limit: args.limit || 10,
|
|
271
|
-
status: args.status_filter,
|
|
272
|
-
});
|
|
273
|
-
const resp = data.response || {};
|
|
274
|
-
const runs = resp.runs || [];
|
|
275
|
-
let text = `# Crew Runs (${runs.length})\n\n`;
|
|
276
|
-
if (runs.length === 0) {
|
|
277
|
-
text += `_No crew runs found._\n`;
|
|
278
|
-
}
|
|
279
|
-
else {
|
|
280
|
-
for (const run of runs) {
|
|
281
|
-
const statusIcon = run.status === 'completed' ? '✅' :
|
|
282
|
-
run.status === 'running' ? '🔄' :
|
|
283
|
-
run.status === 'failed' ? '❌' : '⏳';
|
|
284
|
-
text += `- ${statusIcon} **${run.run_id}** [${run.status}] — `;
|
|
285
|
-
text += `${run.agent_count} agents, ${run.task_count} tasks`;
|
|
286
|
-
if (run.duration_ms != null) {
|
|
287
|
-
text += ` (${run.duration_ms}ms)`;
|
|
288
|
-
}
|
|
289
|
-
if (run.has_error) {
|
|
290
|
-
text += ` ⚠️`;
|
|
291
|
-
}
|
|
292
|
-
text += `\n`;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return { content: [{ type: 'text', text }] };
|
|
296
|
-
}
|
|
297
|
-
catch (error) {
|
|
298
|
-
return {
|
|
299
|
-
content: [
|
|
300
|
-
{ type: 'text', text: `Failed to list crew runs: ${error.message}` },
|
|
301
|
-
],
|
|
302
|
-
isError: true,
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
145
|
//# sourceMappingURL=crew-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crew-builder.js","sourceRoot":"","sources":["../../src/tools/crew-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"crew-builder.js","sourceRoot":"","sources":["../../src/tools/crew-builder.ts"],"names":[],"mappings":"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"}
|
package/dist/tools/crewai.d.ts
CHANGED
|
@@ -7,10 +7,15 @@
|
|
|
7
7
|
* - connection lookup
|
|
8
8
|
* - request forwarding
|
|
9
9
|
*/
|
|
10
|
-
import { DobbyClient } from '../lib/dobby-client.js';
|
|
11
10
|
export declare const crewaiTools: {
|
|
12
11
|
crewai_health: {
|
|
13
12
|
name: string;
|
|
13
|
+
annotations: {
|
|
14
|
+
title: string;
|
|
15
|
+
readOnlyHint: boolean;
|
|
16
|
+
destructiveHint: boolean;
|
|
17
|
+
openWorldHint: boolean;
|
|
18
|
+
};
|
|
14
19
|
description: string;
|
|
15
20
|
inputSchema: {
|
|
16
21
|
type: "object";
|
|
@@ -24,6 +29,12 @@ export declare const crewaiTools: {
|
|
|
24
29
|
};
|
|
25
30
|
crewai_inputs: {
|
|
26
31
|
name: string;
|
|
32
|
+
annotations: {
|
|
33
|
+
title: string;
|
|
34
|
+
readOnlyHint: boolean;
|
|
35
|
+
destructiveHint: boolean;
|
|
36
|
+
openWorldHint: boolean;
|
|
37
|
+
};
|
|
27
38
|
description: string;
|
|
28
39
|
inputSchema: {
|
|
29
40
|
type: "object";
|
|
@@ -37,6 +48,12 @@ export declare const crewaiTools: {
|
|
|
37
48
|
};
|
|
38
49
|
crewai_kickoff: {
|
|
39
50
|
name: string;
|
|
51
|
+
annotations: {
|
|
52
|
+
title: string;
|
|
53
|
+
readOnlyHint: boolean;
|
|
54
|
+
destructiveHint: boolean;
|
|
55
|
+
openWorldHint: boolean;
|
|
56
|
+
};
|
|
40
57
|
description: string;
|
|
41
58
|
inputSchema: {
|
|
42
59
|
type: "object";
|
|
@@ -58,6 +75,12 @@ export declare const crewaiTools: {
|
|
|
58
75
|
};
|
|
59
76
|
crewai_status: {
|
|
60
77
|
name: string;
|
|
78
|
+
annotations: {
|
|
79
|
+
title: string;
|
|
80
|
+
readOnlyHint: boolean;
|
|
81
|
+
destructiveHint: boolean;
|
|
82
|
+
openWorldHint: boolean;
|
|
83
|
+
};
|
|
61
84
|
description: string;
|
|
62
85
|
inputSchema: {
|
|
63
86
|
type: "object";
|
|
@@ -75,66 +98,4 @@ export declare const crewaiTools: {
|
|
|
75
98
|
};
|
|
76
99
|
};
|
|
77
100
|
};
|
|
78
|
-
export declare function handleCrewAIHealth(client: DobbyClient, args: {
|
|
79
|
-
connection_id?: string;
|
|
80
|
-
}): Promise<{
|
|
81
|
-
content: {
|
|
82
|
-
type: "text";
|
|
83
|
-
text: string;
|
|
84
|
-
}[];
|
|
85
|
-
isError?: undefined;
|
|
86
|
-
} | {
|
|
87
|
-
content: {
|
|
88
|
-
type: "text";
|
|
89
|
-
text: string;
|
|
90
|
-
}[];
|
|
91
|
-
isError: boolean;
|
|
92
|
-
}>;
|
|
93
|
-
export declare function handleCrewAIInputs(client: DobbyClient, args: {
|
|
94
|
-
connection_id?: string;
|
|
95
|
-
}): Promise<{
|
|
96
|
-
content: {
|
|
97
|
-
type: "text";
|
|
98
|
-
text: string;
|
|
99
|
-
}[];
|
|
100
|
-
isError?: undefined;
|
|
101
|
-
} | {
|
|
102
|
-
content: {
|
|
103
|
-
type: "text";
|
|
104
|
-
text: string;
|
|
105
|
-
}[];
|
|
106
|
-
isError: boolean;
|
|
107
|
-
}>;
|
|
108
|
-
export declare function handleCrewAIKickoff(client: DobbyClient, args: {
|
|
109
|
-
inputs: Record<string, string>;
|
|
110
|
-
connection_id?: string;
|
|
111
|
-
}): Promise<{
|
|
112
|
-
content: {
|
|
113
|
-
type: "text";
|
|
114
|
-
text: string;
|
|
115
|
-
}[];
|
|
116
|
-
isError?: undefined;
|
|
117
|
-
} | {
|
|
118
|
-
content: {
|
|
119
|
-
type: "text";
|
|
120
|
-
text: string;
|
|
121
|
-
}[];
|
|
122
|
-
isError: boolean;
|
|
123
|
-
}>;
|
|
124
|
-
export declare function handleCrewAIStatus(client: DobbyClient, args: {
|
|
125
|
-
kickoff_id: string;
|
|
126
|
-
connection_id?: string;
|
|
127
|
-
}): Promise<{
|
|
128
|
-
content: {
|
|
129
|
-
type: "text";
|
|
130
|
-
text: string;
|
|
131
|
-
}[];
|
|
132
|
-
isError?: undefined;
|
|
133
|
-
} | {
|
|
134
|
-
content: {
|
|
135
|
-
type: "text";
|
|
136
|
-
text: string;
|
|
137
|
-
}[];
|
|
138
|
-
isError: boolean;
|
|
139
|
-
}>;
|
|
140
101
|
//# sourceMappingURL=crewai.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crewai.d.ts","sourceRoot":"","sources":["../../src/tools/crewai.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"crewai.d.ts","sourceRoot":"","sources":["../../src/tools/crewai.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGvB,CAAC"}
|
package/dist/tools/crewai.js
CHANGED
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
export const crewaiTools = {
|
|
14
14
|
crewai_health: {
|
|
15
15
|
name: 'crewai_health',
|
|
16
|
+
annotations: {
|
|
17
|
+
title: 'CrewAI Health',
|
|
18
|
+
readOnlyHint: true,
|
|
19
|
+
destructiveHint: false,
|
|
20
|
+
openWorldHint: false,
|
|
21
|
+
},
|
|
16
22
|
description: 'Check the health status of the connected CrewAI agent. Returns the agent status and connection info.',
|
|
17
23
|
inputSchema: {
|
|
18
24
|
type: 'object',
|
|
@@ -26,6 +32,12 @@ export const crewaiTools = {
|
|
|
26
32
|
},
|
|
27
33
|
crewai_inputs: {
|
|
28
34
|
name: 'crewai_inputs',
|
|
35
|
+
annotations: {
|
|
36
|
+
title: 'CrewAI Inputs',
|
|
37
|
+
readOnlyHint: true,
|
|
38
|
+
destructiveHint: false,
|
|
39
|
+
openWorldHint: false,
|
|
40
|
+
},
|
|
29
41
|
description: 'Get the required input fields for the CrewAI crew. Returns the list of input parameter names needed to start a kickoff.',
|
|
30
42
|
inputSchema: {
|
|
31
43
|
type: 'object',
|
|
@@ -39,6 +51,12 @@ export const crewaiTools = {
|
|
|
39
51
|
},
|
|
40
52
|
crewai_kickoff: {
|
|
41
53
|
name: 'crewai_kickoff',
|
|
54
|
+
annotations: {
|
|
55
|
+
title: 'CrewAI Kickoff',
|
|
56
|
+
readOnlyHint: false,
|
|
57
|
+
destructiveHint: true,
|
|
58
|
+
openWorldHint: false,
|
|
59
|
+
},
|
|
42
60
|
description: 'Start a CrewAI crew execution (kickoff). Provide the required inputs and the crew will begin processing. Returns a kickoff_id to track the status.',
|
|
43
61
|
inputSchema: {
|
|
44
62
|
type: 'object',
|
|
@@ -58,6 +76,12 @@ export const crewaiTools = {
|
|
|
58
76
|
},
|
|
59
77
|
crewai_status: {
|
|
60
78
|
name: 'crewai_status',
|
|
79
|
+
annotations: {
|
|
80
|
+
title: 'CrewAI Status',
|
|
81
|
+
readOnlyHint: true,
|
|
82
|
+
destructiveHint: false,
|
|
83
|
+
openWorldHint: false,
|
|
84
|
+
},
|
|
61
85
|
description: 'Check the status of a CrewAI crew execution. Provide the kickoff_id from a previous crewai_kickoff call. Returns the state, result, and execution details.',
|
|
62
86
|
inputSchema: {
|
|
63
87
|
type: 'object',
|
|
@@ -75,152 +99,7 @@ export const crewaiTools = {
|
|
|
75
99
|
},
|
|
76
100
|
},
|
|
77
101
|
};
|
|
78
|
-
async function callGatewayProxy(client, payload) {
|
|
79
|
-
const url = `${client.apiUrl}/api/v1/gateway/agents/proxy`;
|
|
80
|
-
const response = await fetch(url, {
|
|
81
|
-
method: 'POST',
|
|
82
|
-
headers: {
|
|
83
|
-
'Content-Type': 'application/json',
|
|
84
|
-
Authorization: `Bearer ${client.apiKey}`,
|
|
85
|
-
...(client.tenantId ? { 'X-Tenant-Id': client.tenantId } : {}),
|
|
86
|
-
},
|
|
87
|
-
body: JSON.stringify({
|
|
88
|
-
...payload,
|
|
89
|
-
provider_id: payload.provider_id || 'crewai',
|
|
90
|
-
}),
|
|
91
|
-
});
|
|
92
|
-
if (!response.ok) {
|
|
93
|
-
const errBody = await response.json().catch(() => ({
|
|
94
|
-
error: `Gateway proxy returned ${response.status}`,
|
|
95
|
-
}));
|
|
96
|
-
throw new Error(errBody.error ||
|
|
97
|
-
`Gateway proxy error: HTTP ${response.status}`);
|
|
98
|
-
}
|
|
99
|
-
return response.json();
|
|
100
|
-
}
|
|
101
102
|
// ============================================
|
|
102
103
|
// Tool Handlers
|
|
103
104
|
// ============================================
|
|
104
|
-
export async function handleCrewAIHealth(client, args) {
|
|
105
|
-
try {
|
|
106
|
-
const data = await callGatewayProxy(client, {
|
|
107
|
-
action: 'health',
|
|
108
|
-
connection_id: args.connection_id,
|
|
109
|
-
});
|
|
110
|
-
const conn = data.connection || {};
|
|
111
|
-
let text = `# CrewAI Health Check\n\n`;
|
|
112
|
-
text += `- **Status:** ${data.response?.status || 'unknown'}\n`;
|
|
113
|
-
text += `- **Connection:** ${conn.display_name || conn.connection_id}\n`;
|
|
114
|
-
text += `- **Provider:** ${conn.provider_id}\n`;
|
|
115
|
-
text += `- **Connection Status:** ${conn.status}\n`;
|
|
116
|
-
text += `- **Latency:** ${data.latency_ms}ms\n`;
|
|
117
|
-
return { content: [{ type: 'text', text }] };
|
|
118
|
-
}
|
|
119
|
-
catch (error) {
|
|
120
|
-
return {
|
|
121
|
-
content: [
|
|
122
|
-
{ type: 'text', text: `CrewAI health check failed: ${error.message}` },
|
|
123
|
-
],
|
|
124
|
-
isError: true,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
export async function handleCrewAIInputs(client, args) {
|
|
129
|
-
try {
|
|
130
|
-
const data = await callGatewayProxy(client, {
|
|
131
|
-
action: 'inputs',
|
|
132
|
-
connection_id: args.connection_id,
|
|
133
|
-
});
|
|
134
|
-
const inputs = data.response?.inputs || [];
|
|
135
|
-
const conn = data.connection || {};
|
|
136
|
-
let text = `# CrewAI Required Inputs\n\n`;
|
|
137
|
-
text += `**Crew:** ${conn.display_name || 'CrewAI'}\n\n`;
|
|
138
|
-
if (inputs.length > 0) {
|
|
139
|
-
text += `The following inputs are required to start a kickoff:\n\n`;
|
|
140
|
-
for (const input of inputs) {
|
|
141
|
-
text += `- \`${input}\`\n`;
|
|
142
|
-
}
|
|
143
|
-
text += `\nUse \`crewai_kickoff\` with these inputs to start the crew.`;
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
text += `No inputs required. You can call \`crewai_kickoff\` with an empty inputs object.`;
|
|
147
|
-
}
|
|
148
|
-
return { content: [{ type: 'text', text }] };
|
|
149
|
-
}
|
|
150
|
-
catch (error) {
|
|
151
|
-
return {
|
|
152
|
-
content: [
|
|
153
|
-
{ type: 'text', text: `Failed to get CrewAI inputs: ${error.message}` },
|
|
154
|
-
],
|
|
155
|
-
isError: true,
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
export async function handleCrewAIKickoff(client, args) {
|
|
160
|
-
try {
|
|
161
|
-
const data = await callGatewayProxy(client, {
|
|
162
|
-
action: 'kickoff',
|
|
163
|
-
inputs: args.inputs,
|
|
164
|
-
connection_id: args.connection_id,
|
|
165
|
-
});
|
|
166
|
-
const kickoffId = data.response?.kickoff_id;
|
|
167
|
-
const conn = data.connection || {};
|
|
168
|
-
let text = `# CrewAI Kickoff Started\n\n`;
|
|
169
|
-
text += `- **Crew:** ${conn.display_name || 'CrewAI'}\n`;
|
|
170
|
-
text += `- **Kickoff ID:** \`${kickoffId}\`\n`;
|
|
171
|
-
text += `- **Inputs:** ${JSON.stringify(args.inputs)}\n`;
|
|
172
|
-
text += `- **Latency:** ${data.latency_ms}ms\n\n`;
|
|
173
|
-
text += `Use \`crewai_status\` with kickoff_id \`${kickoffId}\` to check progress.`;
|
|
174
|
-
return { content: [{ type: 'text', text }] };
|
|
175
|
-
}
|
|
176
|
-
catch (error) {
|
|
177
|
-
return {
|
|
178
|
-
content: [
|
|
179
|
-
{ type: 'text', text: `CrewAI kickoff failed: ${error.message}` },
|
|
180
|
-
],
|
|
181
|
-
isError: true,
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
export async function handleCrewAIStatus(client, args) {
|
|
186
|
-
try {
|
|
187
|
-
const data = await callGatewayProxy(client, {
|
|
188
|
-
action: 'status',
|
|
189
|
-
kickoff_id: args.kickoff_id,
|
|
190
|
-
connection_id: args.connection_id,
|
|
191
|
-
});
|
|
192
|
-
const resp = data.response || {};
|
|
193
|
-
const conn = data.connection || {};
|
|
194
|
-
let text = `# CrewAI Execution Status\n\n`;
|
|
195
|
-
text += `- **Crew:** ${conn.display_name || 'CrewAI'}\n`;
|
|
196
|
-
text += `- **Kickoff ID:** \`${args.kickoff_id}\`\n`;
|
|
197
|
-
text += `- **State:** ${resp.state || 'unknown'}\n`;
|
|
198
|
-
text += `- **Status:** ${resp.status || 'unknown'}\n`;
|
|
199
|
-
if (resp.last_executed_task) {
|
|
200
|
-
text += `- **Last Task:** ${resp.last_executed_task}\n`;
|
|
201
|
-
}
|
|
202
|
-
if (resp.last_step) {
|
|
203
|
-
text += `- **Last Step:** ${resp.last_step}\n`;
|
|
204
|
-
}
|
|
205
|
-
text += `- **Latency:** ${data.latency_ms}ms\n`;
|
|
206
|
-
if (resp.result) {
|
|
207
|
-
text += `\n## Result\n\n${resp.result}\n`;
|
|
208
|
-
}
|
|
209
|
-
if (resp.result_json) {
|
|
210
|
-
text += `\n## Result (JSON)\n\n\`\`\`json\n${JSON.stringify(resp.result_json, null, 2)}\n\`\`\`\n`;
|
|
211
|
-
}
|
|
212
|
-
return { content: [{ type: 'text', text }] };
|
|
213
|
-
}
|
|
214
|
-
catch (error) {
|
|
215
|
-
return {
|
|
216
|
-
content: [
|
|
217
|
-
{
|
|
218
|
-
type: 'text',
|
|
219
|
-
text: `Failed to get CrewAI status: ${error.message}`,
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
isError: true,
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
105
|
//# sourceMappingURL=crewai.js.map
|
package/dist/tools/crewai.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crewai.js","sourceRoot":"","sources":["../../src/tools/crewai.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"crewai.js","sourceRoot":"","sources":["../../src/tools/crewai.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,+CAA+C;AAC/C,mBAAmB;AACnB,+CAA+C;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,aAAa,EAAE;QACb,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE;YACX,KAAK,EAAE,eAAe;YACtB,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,aAAa,EAAE,KAAK;SACrB;QACD,WAAW,EACT,sGAAsG;QACxG,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,wFAAwF;iBAC3F;aACF;SACF;KACF;IAED,aAAa,EAAE;QACb,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE;YACX,KAAK,EAAE,eAAe;YACtB,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,aAAa,EAAE,KAAK;SACrB;QACD,WAAW,EACT,yHAAyH;QAC3H,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,wFAAwF;iBAC3F;aACF;SACF;KACF;IAED,cAAc,EAAE;QACd,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE;YACX,KAAK,EAAE,gBAAgB;YACvB,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,aAAa,EAAE,KAAK;SACrB;QACD,WAAW,EACT,oJAAoJ;QACtJ,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,8FAA8F;oBAChG,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBACzC;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,wFAAwF;iBAC3F;aACF;YACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;SACrB;KACF;IAED,aAAa,EAAE;QACb,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE;YACX,KAAK,EAAE,eAAe;YACtB,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,aAAa,EAAE,KAAK;SACrB;QACD,WAAW,EACT,4JAA4J;QAC9J,WAAW,EAAE;YACX,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,8CAA8C;iBAC5D;gBACD,aAAa,EAAE;oBACb,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,wFAAwF;iBAC3F;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,CAAC;SACzB;KACF;CACF,CAAC;AAIF,+CAA+C;AAC/C,gBAAgB;AAChB,+CAA+C"}
|