@lov3kaizen/agentsea-crews 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,98 @@
1
+ import { DynamicModule, Type, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
2
+ import { e as CrewConfig, D as DelegationStrategyType, a as Crew, f as CrewExecutionOptions, g as CrewResult, b as CrewEvent, R as RoleConfig, d as TaskConfig } from '../Crew-BnvVjN7A.js';
3
+ import { C as CrewDashboard, D as DebugMode } from '../DebugMode-o5e9gmQ7.js';
4
+ import 'eventemitter3';
5
+
6
+ interface CrewsModuleOptions {
7
+ crews?: CrewConfig[];
8
+ defaultStrategy?: DelegationStrategyType;
9
+ enableMonitoring?: boolean;
10
+ enableDebug?: boolean;
11
+ global?: boolean;
12
+ }
13
+ interface CrewsModuleAsyncOptions {
14
+ imports?: Type<unknown>[];
15
+ useFactory?: (...args: unknown[]) => Promise<CrewsModuleOptions> | CrewsModuleOptions;
16
+ inject?: unknown[];
17
+ global?: boolean;
18
+ }
19
+ declare const CREWS_MODULE_OPTIONS = "CREWS_MODULE_OPTIONS";
20
+ declare const CREWS_SERVICE = "CREWS_SERVICE";
21
+ declare class CrewsModule {
22
+ static forRoot(options?: CrewsModuleOptions): DynamicModule;
23
+ static forRootAsync(options: CrewsModuleAsyncOptions): DynamicModule;
24
+ static forFeature(crews: CrewConfig[]): DynamicModule;
25
+ private static createProviders;
26
+ private static createAsyncProviders;
27
+ }
28
+
29
+ interface ManagedCrew {
30
+ crew: Crew;
31
+ dashboard?: CrewDashboard;
32
+ debugMode?: DebugMode;
33
+ }
34
+ declare class CrewsService implements OnModuleInit, OnModuleDestroy {
35
+ private readonly crews;
36
+ private readonly options;
37
+ constructor(options?: CrewsModuleOptions);
38
+ onModuleInit(): Promise<void>;
39
+ onModuleDestroy(): Promise<void>;
40
+ registerCrew(config: CrewConfig): Promise<Crew>;
41
+ unregisterCrew(name: string): boolean;
42
+ getCrew(name: string): Crew | undefined;
43
+ getCrewNames(): string[];
44
+ hasCrew(name: string): boolean;
45
+ runCrew(name: string, options?: CrewExecutionOptions): Promise<CrewResult>;
46
+ runCrewStream(name: string, options?: CrewExecutionOptions): AsyncGenerator<CrewEvent>;
47
+ runCrewWithCallback(name: string, onEvent: (event: CrewEvent) => void, options?: CrewExecutionOptions): Promise<CrewResult>;
48
+ pauseCrew(name: string): void;
49
+ resumeCrew(name: string): void;
50
+ abortCrew(name: string): void;
51
+ getDashboard(name: string): CrewDashboard | undefined;
52
+ getDebugMode(name: string): DebugMode | undefined;
53
+ getCrewStatus(name: string): ReturnType<Crew['getStatus']> | undefined;
54
+ getCrewMetrics(name: string): ReturnType<Crew['getMetrics']> | undefined;
55
+ getAllStatus(): Map<string, ReturnType<Crew['getStatus']>>;
56
+ healthCheck(): Promise<{
57
+ healthy: boolean;
58
+ crews: Array<{
59
+ name: string;
60
+ status: string;
61
+ healthy: boolean;
62
+ }>;
63
+ }>;
64
+ }
65
+ declare function createCrewsService(options?: CrewsModuleOptions): CrewsService;
66
+
67
+ declare function CrewDef(config: Partial<CrewConfig>): ClassDecorator;
68
+ declare function RoleDef(config: RoleConfig): PropertyDecorator;
69
+ declare function TaskDef(config: Partial<TaskConfig>): MethodDecorator;
70
+ declare function OnCrewEvent(eventType: string): MethodDecorator;
71
+ declare function InjectCrew(name?: string): ParameterDecorator;
72
+ declare function getCrewMetadata(target: Function): Partial<CrewConfig> | undefined;
73
+ declare function getRoleMetadata(target: Function): Array<{
74
+ propertyKey: string | symbol;
75
+ config: RoleConfig;
76
+ }>;
77
+ declare function getTaskMetadata(target: Function): Array<{
78
+ methodKey: string | symbol;
79
+ config: Partial<TaskConfig>;
80
+ handler: Function;
81
+ }>;
82
+ declare function getEventHandlerMetadata(target: Function): Array<{
83
+ eventType: string;
84
+ methodKey: string | symbol;
85
+ handler: Function;
86
+ }>;
87
+ declare function getInjectCrewMetadata(target: Function): Array<{
88
+ index: number;
89
+ name?: string;
90
+ }>;
91
+ declare function RequireCapability(...capabilities: string[]): PropertyDecorator;
92
+ declare function Priority(priority: 'critical' | 'high' | 'medium' | 'low'): MethodDecorator;
93
+ declare function Timeout(ms: number): MethodDecorator;
94
+ declare function Retry(maxRetries: number): MethodDecorator;
95
+ declare function DependsOn(...taskNames: string[]): MethodDecorator;
96
+ declare function AssignTo(agentName: string): MethodDecorator;
97
+
98
+ export { AssignTo, CREWS_MODULE_OPTIONS, CREWS_SERVICE, CrewDef, CrewsModule, type CrewsModuleAsyncOptions, type CrewsModuleOptions, CrewsService, DependsOn, InjectCrew, type ManagedCrew, OnCrewEvent, Priority, RequireCapability, Retry, RoleDef, TaskDef, Timeout, createCrewsService, getCrewMetadata, getEventHandlerMetadata, getInjectCrewMetadata, getRoleMetadata, getTaskMetadata };
@@ -340,8 +340,37 @@ Background: ${this.backstory}`);
340
340
  }
341
341
  };
342
342
 
343
+ // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
344
+ var import_node_crypto = require("crypto");
345
+
346
+ // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/url-alphabet/index.js
347
+ var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
348
+
349
+ // ../../node_modules/.pnpm/nanoid@5.1.6/node_modules/nanoid/index.js
350
+ var POOL_SIZE_MULTIPLIER = 128;
351
+ var pool;
352
+ var poolOffset;
353
+ function fillPool(bytes) {
354
+ if (!pool || pool.length < bytes) {
355
+ pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
356
+ import_node_crypto.webcrypto.getRandomValues(pool);
357
+ poolOffset = 0;
358
+ } else if (poolOffset + bytes > pool.length) {
359
+ import_node_crypto.webcrypto.getRandomValues(pool);
360
+ poolOffset = 0;
361
+ }
362
+ poolOffset += bytes;
363
+ }
364
+ function nanoid(size = 21) {
365
+ fillPool(size |= 0);
366
+ let id = "";
367
+ for (let i = poolOffset - size; i < poolOffset; i++) {
368
+ id += urlAlphabet[pool[i] & 63];
369
+ }
370
+ return id;
371
+ }
372
+
343
373
  // src/core/Task.ts
344
- var import_nanoid = require("nanoid");
345
374
  var Task = class _Task {
346
375
  id;
347
376
  description;
@@ -361,7 +390,7 @@ var Task = class _Task {
361
390
  _result;
362
391
  _metadata;
363
392
  constructor(config) {
364
- this.id = config.id ?? (0, import_nanoid.nanoid)();
393
+ this.id = config.id ?? nanoid();
365
394
  this.description = config.description;
366
395
  this.expectedOutput = config.expectedOutput;
367
396
  this.priority = config.priority ?? "medium";
@@ -967,7 +996,6 @@ var TaskQueue = class {
967
996
 
968
997
  // src/core/ExecutionContext.ts
969
998
  var import_eventemitter3 = __toESM(require("eventemitter3"));
970
- var import_nanoid2 = require("nanoid");
971
999
  var ExecutionContext = class {
972
1000
  crewId;
973
1001
  crewName;
@@ -984,7 +1012,7 @@ var ExecutionContext = class {
984
1012
  startTime;
985
1013
  endTime;
986
1014
  constructor(config) {
987
- this.crewId = config.crewId ?? (0, import_nanoid2.nanoid)();
1015
+ this.crewId = config.crewId ?? nanoid();
988
1016
  this.crewName = config.crewName;
989
1017
  this.state = /* @__PURE__ */ new Map();
990
1018
  this.completedTasks = /* @__PURE__ */ new Map();
@@ -1230,7 +1258,7 @@ var ExecutionContext = class {
1230
1258
  */
1231
1259
  createCheckpoint() {
1232
1260
  return {
1233
- id: (0, import_nanoid2.nanoid)(),
1261
+ id: nanoid(),
1234
1262
  timestamp: /* @__PURE__ */ new Date(),
1235
1263
  crewId: this.crewId,
1236
1264
  crewName: this.crewName,
@@ -1316,12 +1344,6 @@ var ExecutionContext = class {
1316
1344
  }
1317
1345
  };
1318
1346
 
1319
- // src/core/Crew.ts
1320
- var import_nanoid4 = require("nanoid");
1321
-
1322
- // src/agents/CrewAgent.ts
1323
- var import_nanoid3 = require("nanoid");
1324
-
1325
1347
  // src/agents/AgentCapabilities.ts
1326
1348
  var PROFICIENCY_WEIGHTS = {
1327
1349
  novice: 0.25,
@@ -1606,7 +1628,7 @@ var CrewAgent = class _CrewAgent {
1606
1628
  totalTokensUsed = 0;
1607
1629
  constructor(options) {
1608
1630
  const { config, execute } = options;
1609
- this.id = (0, import_nanoid3.nanoid)();
1631
+ this.id = nanoid();
1610
1632
  this.name = config.name;
1611
1633
  this.role = new Role(config.role);
1612
1634
  this.capabilities = config.role.capabilities;
@@ -1803,7 +1825,7 @@ ${JSON.stringify(task.context, null, 2)}`);
1803
1825
  */
1804
1826
  createHelpRequest(taskId, request) {
1805
1827
  return {
1806
- requestId: (0, import_nanoid3.nanoid)(),
1828
+ requestId: nanoid(),
1807
1829
  fromAgent: this.name,
1808
1830
  taskId,
1809
1831
  request
@@ -4248,7 +4270,7 @@ var Crew = class {
4248
4270
  timeline = [];
4249
4271
  results = /* @__PURE__ */ new Map();
4250
4272
  constructor(config) {
4251
- this.id = (0, import_nanoid4.nanoid)();
4273
+ this.id = nanoid();
4252
4274
  this.name = config.name;
4253
4275
  this.description = config.description;
4254
4276
  this.config = config;
@@ -4397,27 +4419,40 @@ var Crew = class {
4397
4419
  await this.sleep(100);
4398
4420
  continue;
4399
4421
  }
4400
- for (const task of readyTasks) {
4401
- if (this.state !== "running") break;
4402
- const delegationResult = await this.delegateTask(task, options);
4403
- yield this.createEvent({
4404
- type: "task:assigned",
4405
- taskId: task.id,
4406
- agentName: delegationResult.selectedAgent,
4407
- reason: delegationResult.reason,
4408
- strategy: this.config.delegationStrategy
4409
- });
4410
- const taskResult = await this.executeTask(task, delegationResult);
4411
- yield this.createEvent({
4412
- type: "task:completed",
4413
- taskId: task.id,
4414
- result: taskResult,
4415
- agentName: delegationResult.selectedAgent,
4416
- durationMs: taskResult.latencyMs ?? 0
4417
- });
4418
- while (eventQueue.length > 0) {
4419
- yield eventQueue.shift();
4422
+ const concurrency = Math.max(
4423
+ 1,
4424
+ options.maxConcurrentTasks ?? this.config.maxConcurrentTasks ?? 1
4425
+ );
4426
+ if (concurrency === 1) {
4427
+ for (const task of readyTasks) {
4428
+ if (this.state !== "running") break;
4429
+ const delegationResult = await this.delegateTask(task, options);
4430
+ yield this.createEvent({
4431
+ type: "task:assigned",
4432
+ taskId: task.id,
4433
+ agentName: delegationResult.selectedAgent,
4434
+ reason: delegationResult.reason,
4435
+ strategy: this.config.delegationStrategy
4436
+ });
4437
+ const taskResult = await this.executeTask(task, delegationResult);
4438
+ yield this.createEvent({
4439
+ type: "task:completed",
4440
+ taskId: task.id,
4441
+ result: taskResult,
4442
+ agentName: delegationResult.selectedAgent,
4443
+ durationMs: taskResult.latencyMs ?? 0
4444
+ });
4445
+ while (eventQueue.length > 0) {
4446
+ yield eventQueue.shift();
4447
+ }
4420
4448
  }
4449
+ } else {
4450
+ yield* this.processReadyTasksConcurrently(
4451
+ readyTasks,
4452
+ options,
4453
+ eventQueue,
4454
+ concurrency
4455
+ );
4421
4456
  }
4422
4457
  while (this.state === "paused") {
4423
4458
  await this.sleep(100);
@@ -4460,6 +4495,78 @@ var Crew = class {
4460
4495
  });
4461
4496
  this.addTimelineEntry("crew_completed", this.name);
4462
4497
  }
4498
+ /**
4499
+ * Execute a batch of ready tasks concurrently with a bounded worker pool.
4500
+ *
4501
+ * Each task still emits its `task:assigned` and `task:completed` events in
4502
+ * order relative to itself, but events across tasks are interleaved as the
4503
+ * workers settle. At most `concurrency` tasks run at once. If any task throws
4504
+ * (after exhausting retries), no further tasks are started, in-flight tasks
4505
+ * are allowed to settle, and the first error is rethrown so the caller's
4506
+ * error handling (crew:error) behaves identically to the sequential path.
4507
+ */
4508
+ async *processReadyTasksConcurrently(readyTasks, options, eventQueue, concurrency) {
4509
+ let nextIndex = 0;
4510
+ let firstError;
4511
+ const buffer = [];
4512
+ const inFlight = /* @__PURE__ */ new Set();
4513
+ const launch = (task) => {
4514
+ const worker = (async () => {
4515
+ const delegationResult = await this.delegateTask(task, options);
4516
+ buffer.push(
4517
+ this.createEvent({
4518
+ type: "task:assigned",
4519
+ taskId: task.id,
4520
+ agentName: delegationResult.selectedAgent,
4521
+ reason: delegationResult.reason,
4522
+ strategy: this.config.delegationStrategy
4523
+ })
4524
+ );
4525
+ const taskResult = await this.executeTask(task, delegationResult);
4526
+ buffer.push(
4527
+ this.createEvent({
4528
+ type: "task:completed",
4529
+ taskId: task.id,
4530
+ result: taskResult,
4531
+ agentName: delegationResult.selectedAgent,
4532
+ durationMs: taskResult.latencyMs ?? 0
4533
+ })
4534
+ );
4535
+ })().catch((error) => {
4536
+ if (firstError === void 0) {
4537
+ firstError = error;
4538
+ }
4539
+ }).finally(() => {
4540
+ inFlight.delete(worker);
4541
+ });
4542
+ inFlight.add(worker);
4543
+ };
4544
+ const fill = () => {
4545
+ while (inFlight.size < concurrency && nextIndex < readyTasks.length && this.state === "running" && firstError === void 0) {
4546
+ launch(readyTasks[nextIndex++]);
4547
+ }
4548
+ };
4549
+ fill();
4550
+ while (inFlight.size > 0) {
4551
+ await Promise.race(inFlight);
4552
+ while (buffer.length > 0) {
4553
+ yield buffer.shift();
4554
+ }
4555
+ while (eventQueue.length > 0) {
4556
+ yield eventQueue.shift();
4557
+ }
4558
+ fill();
4559
+ }
4560
+ while (buffer.length > 0) {
4561
+ yield buffer.shift();
4562
+ }
4563
+ while (eventQueue.length > 0) {
4564
+ yield eventQueue.shift();
4565
+ }
4566
+ if (firstError !== void 0) {
4567
+ throw firstError;
4568
+ }
4569
+ }
4463
4570
  /**
4464
4571
  * Delegate a task to an agent
4465
4572
  */
@@ -4679,7 +4786,7 @@ ${r.output}`).join("\n\n---\n\n");
4679
4786
  */
4680
4787
  createCheckpoint() {
4681
4788
  return {
4682
- id: (0, import_nanoid4.nanoid)(),
4789
+ id: nanoid(),
4683
4790
  crewId: this.id,
4684
4791
  crewName: this.name,
4685
4792
  timestamp: /* @__PURE__ */ new Date(),
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-4PF73ECN.mjs";
5
5
  import {
6
6
  createCrew
7
- } from "../chunk-V6VK6BOL.mjs";
7
+ } from "../chunk-J5KQSOGT.mjs";
8
8
 
9
9
  // src/nestjs/crews.module.ts
10
10
  var CREWS_MODULE_OPTIONS = "CREWS_MODULE_OPTIONS";
@@ -0,0 +1,78 @@
1
+ import { d as TaskConfig, a as Crew, e as CrewConfig } from '../Crew-BnvVjN7A.mjs';
2
+
3
+ interface ResearchCrewOptions {
4
+ name?: string;
5
+ model?: string;
6
+ provider?: string;
7
+ includeWriter?: boolean;
8
+ depth?: 'shallow' | 'standard' | 'deep';
9
+ tools?: string[];
10
+ }
11
+ declare function createResearchCrewConfig(options?: ResearchCrewOptions): CrewConfig;
12
+ declare function createResearchCrew(options?: ResearchCrewOptions): Crew;
13
+ declare const ResearchTasks: {
14
+ research(topic: string, depth?: "shallow" | "standard" | "deep"): TaskConfig;
15
+ analyze(data: string, focusAreas?: string[]): TaskConfig;
16
+ writeReport(topic: string, format?: "summary" | "detailed" | "executive"): TaskConfig;
17
+ };
18
+
19
+ interface WritingCrewOptions {
20
+ name?: string;
21
+ model?: string;
22
+ provider?: string;
23
+ contentType?: 'blog' | 'technical' | 'marketing' | 'creative' | 'general';
24
+ audience?: string;
25
+ tools?: string[];
26
+ }
27
+ declare function createWritingCrewConfig(options?: WritingCrewOptions): CrewConfig;
28
+ declare function createWritingCrew(options?: WritingCrewOptions): Crew;
29
+ declare const WritingTasks: {
30
+ draft(topic: string, wordCount?: number, style?: string): TaskConfig;
31
+ edit(content: string, focusAreas?: string[]): TaskConfig;
32
+ proofread(content: string): TaskConfig;
33
+ blogPost(topic: string, keywords?: string[]): TaskConfig;
34
+ technicalDoc(subject: string, audience?: "beginner" | "intermediate" | "advanced"): TaskConfig;
35
+ };
36
+
37
+ interface CodeReviewCrewOptions {
38
+ name?: string;
39
+ model?: string;
40
+ provider?: string;
41
+ languages?: string[];
42
+ includeSecurity?: boolean;
43
+ includePerformance?: boolean;
44
+ strictness?: 'relaxed' | 'standard' | 'strict';
45
+ tools?: string[];
46
+ }
47
+ declare function createCodeReviewCrewConfig(options?: CodeReviewCrewOptions): CrewConfig;
48
+ declare function createCodeReviewCrew(options?: CodeReviewCrewOptions): Crew;
49
+ declare const CodeReviewTasks: {
50
+ review(code: string, language?: string, context?: string): TaskConfig;
51
+ securityReview(code: string, language?: string): TaskConfig;
52
+ performanceReview(code: string, language?: string): TaskConfig;
53
+ pullRequestReview(diff: string, prDescription?: string): TaskConfig;
54
+ architectureReview(description: string, codebase?: string): TaskConfig;
55
+ };
56
+
57
+ interface CustomerSupportCrewOptions {
58
+ name?: string;
59
+ model?: string;
60
+ provider?: string;
61
+ productName?: string;
62
+ companyName?: string;
63
+ supportStyle?: 'formal' | 'friendly' | 'technical';
64
+ includeSpecialist?: boolean;
65
+ includeEscalation?: boolean;
66
+ tools?: string[];
67
+ }
68
+ declare function createCustomerSupportCrewConfig(options?: CustomerSupportCrewOptions): CrewConfig;
69
+ declare function createCustomerSupportCrew(options?: CustomerSupportCrewOptions): Crew;
70
+ declare const CustomerSupportTasks: {
71
+ handleTicket(customerMessage: string, priority?: "low" | "normal" | "high" | "urgent", customerTier?: string): TaskConfig;
72
+ resolveTechnicalIssue(issueDescription: string, errorLogs?: string, environment?: string): TaskConfig;
73
+ handleEscalation(caseHistory: string, customerSentiment?: "frustrated" | "angry" | "neutral", businessImpact?: string): TaskConfig;
74
+ respondToFeedback(feedback: string, sentiment: "positive" | "neutral" | "negative"): TaskConfig;
75
+ createKnowledgeBaseArticle(topic: string, resolution: string): TaskConfig;
76
+ };
77
+
78
+ export { type CodeReviewCrewOptions, CodeReviewTasks, type CustomerSupportCrewOptions, CustomerSupportTasks, type ResearchCrewOptions, ResearchTasks, type WritingCrewOptions, WritingTasks, createCodeReviewCrew, createCodeReviewCrewConfig, createCustomerSupportCrew, createCustomerSupportCrewConfig, createResearchCrew, createResearchCrewConfig, createWritingCrew, createWritingCrewConfig };
@@ -0,0 +1,78 @@
1
+ import { d as TaskConfig, a as Crew, e as CrewConfig } from '../Crew-BnvVjN7A.js';
2
+
3
+ interface ResearchCrewOptions {
4
+ name?: string;
5
+ model?: string;
6
+ provider?: string;
7
+ includeWriter?: boolean;
8
+ depth?: 'shallow' | 'standard' | 'deep';
9
+ tools?: string[];
10
+ }
11
+ declare function createResearchCrewConfig(options?: ResearchCrewOptions): CrewConfig;
12
+ declare function createResearchCrew(options?: ResearchCrewOptions): Crew;
13
+ declare const ResearchTasks: {
14
+ research(topic: string, depth?: "shallow" | "standard" | "deep"): TaskConfig;
15
+ analyze(data: string, focusAreas?: string[]): TaskConfig;
16
+ writeReport(topic: string, format?: "summary" | "detailed" | "executive"): TaskConfig;
17
+ };
18
+
19
+ interface WritingCrewOptions {
20
+ name?: string;
21
+ model?: string;
22
+ provider?: string;
23
+ contentType?: 'blog' | 'technical' | 'marketing' | 'creative' | 'general';
24
+ audience?: string;
25
+ tools?: string[];
26
+ }
27
+ declare function createWritingCrewConfig(options?: WritingCrewOptions): CrewConfig;
28
+ declare function createWritingCrew(options?: WritingCrewOptions): Crew;
29
+ declare const WritingTasks: {
30
+ draft(topic: string, wordCount?: number, style?: string): TaskConfig;
31
+ edit(content: string, focusAreas?: string[]): TaskConfig;
32
+ proofread(content: string): TaskConfig;
33
+ blogPost(topic: string, keywords?: string[]): TaskConfig;
34
+ technicalDoc(subject: string, audience?: "beginner" | "intermediate" | "advanced"): TaskConfig;
35
+ };
36
+
37
+ interface CodeReviewCrewOptions {
38
+ name?: string;
39
+ model?: string;
40
+ provider?: string;
41
+ languages?: string[];
42
+ includeSecurity?: boolean;
43
+ includePerformance?: boolean;
44
+ strictness?: 'relaxed' | 'standard' | 'strict';
45
+ tools?: string[];
46
+ }
47
+ declare function createCodeReviewCrewConfig(options?: CodeReviewCrewOptions): CrewConfig;
48
+ declare function createCodeReviewCrew(options?: CodeReviewCrewOptions): Crew;
49
+ declare const CodeReviewTasks: {
50
+ review(code: string, language?: string, context?: string): TaskConfig;
51
+ securityReview(code: string, language?: string): TaskConfig;
52
+ performanceReview(code: string, language?: string): TaskConfig;
53
+ pullRequestReview(diff: string, prDescription?: string): TaskConfig;
54
+ architectureReview(description: string, codebase?: string): TaskConfig;
55
+ };
56
+
57
+ interface CustomerSupportCrewOptions {
58
+ name?: string;
59
+ model?: string;
60
+ provider?: string;
61
+ productName?: string;
62
+ companyName?: string;
63
+ supportStyle?: 'formal' | 'friendly' | 'technical';
64
+ includeSpecialist?: boolean;
65
+ includeEscalation?: boolean;
66
+ tools?: string[];
67
+ }
68
+ declare function createCustomerSupportCrewConfig(options?: CustomerSupportCrewOptions): CrewConfig;
69
+ declare function createCustomerSupportCrew(options?: CustomerSupportCrewOptions): Crew;
70
+ declare const CustomerSupportTasks: {
71
+ handleTicket(customerMessage: string, priority?: "low" | "normal" | "high" | "urgent", customerTier?: string): TaskConfig;
72
+ resolveTechnicalIssue(issueDescription: string, errorLogs?: string, environment?: string): TaskConfig;
73
+ handleEscalation(caseHistory: string, customerSentiment?: "frustrated" | "angry" | "neutral", businessImpact?: string): TaskConfig;
74
+ respondToFeedback(feedback: string, sentiment: "positive" | "neutral" | "negative"): TaskConfig;
75
+ createKnowledgeBaseArticle(topic: string, resolution: string): TaskConfig;
76
+ };
77
+
78
+ export { type CodeReviewCrewOptions, CodeReviewTasks, type CustomerSupportCrewOptions, CustomerSupportTasks, type ResearchCrewOptions, ResearchTasks, type WritingCrewOptions, WritingTasks, createCodeReviewCrew, createCodeReviewCrewConfig, createCustomerSupportCrew, createCustomerSupportCrewConfig, createResearchCrew, createResearchCrewConfig, createWritingCrew, createWritingCrewConfig };