sub-agents-mcp 0.5.2 → 0.5.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.
Files changed (35) hide show
  1. package/README.md +12 -0
  2. package/dist/index.js +0 -0
  3. package/package.json +1 -1
  4. package/dist/execution/ExecutionLimits.d.ts +0 -141
  5. package/dist/execution/ExecutionLimits.d.ts.map +0 -1
  6. package/dist/execution/ExecutionLimits.js +0 -231
  7. package/dist/execution/ExecutionLimits.js.map +0 -1
  8. package/dist/execution/McpRequestTimeout.d.ts +0 -166
  9. package/dist/execution/McpRequestTimeout.d.ts.map +0 -1
  10. package/dist/execution/McpRequestTimeout.js +0 -278
  11. package/dist/execution/McpRequestTimeout.js.map +0 -1
  12. package/dist/execution/PromptController.d.ts +0 -92
  13. package/dist/execution/PromptController.d.ts.map +0 -1
  14. package/dist/execution/PromptController.js +0 -130
  15. package/dist/execution/PromptController.js.map +0 -1
  16. package/dist/execution/TimeoutManager.d.ts +0 -159
  17. package/dist/execution/TimeoutManager.d.ts.map +0 -1
  18. package/dist/execution/TimeoutManager.js +0 -283
  19. package/dist/execution/TimeoutManager.js.map +0 -1
  20. package/dist/session/ToonConverter.d.ts +0 -172
  21. package/dist/session/ToonConverter.d.ts.map +0 -1
  22. package/dist/session/ToonConverter.js +0 -593
  23. package/dist/session/ToonConverter.js.map +0 -1
  24. package/dist/session/ToonUtils.d.ts +0 -23
  25. package/dist/session/ToonUtils.d.ts.map +0 -1
  26. package/dist/session/ToonUtils.js +0 -75
  27. package/dist/session/ToonUtils.js.map +0 -1
  28. package/dist/types/ServerConfig.d.ts +0 -39
  29. package/dist/types/ServerConfig.d.ts.map +0 -1
  30. package/dist/types/ServerConfig.js +0 -3
  31. package/dist/types/ServerConfig.js.map +0 -1
  32. package/dist/types/index.d.ts +0 -19
  33. package/dist/types/index.d.ts.map +0 -1
  34. package/dist/types/index.js +0 -3
  35. package/dist/types/index.js.map +0 -1
@@ -1,75 +0,0 @@
1
- "use strict";
2
- /**
3
- * TOON format utilities for SessionData
4
- *
5
- * Provides type-safe encode/decode functions for SessionData with Date handling.
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.encodeSessionData = encodeSessionData;
9
- exports.decodeSessionData = decodeSessionData;
10
- const toon_1 = require("@toon-format/toon");
11
- /**
12
- * Encodes SessionData to TOON format.
13
- *
14
- * @param sessionData - Session data to encode
15
- * @returns TOON-formatted string
16
- */
17
- function encodeSessionData(sessionData) {
18
- return (0, toon_1.encode)(sessionData);
19
- }
20
- /**
21
- * Decodes TOON format string to SessionData.
22
- *
23
- * Handles Date conversion from ISO strings to Date objects.
24
- *
25
- * @param toonString - TOON-formatted string
26
- * @returns Decoded SessionData with proper Date types
27
- */
28
- function decodeSessionData(toonString) {
29
- const decoded = (0, toon_1.decode)(toonString);
30
- // Type guard: Validate decoded data structure
31
- if (!isValidSessionDataShape(decoded)) {
32
- throw new Error('Invalid TOON format: decoded data does not match SessionData structure');
33
- }
34
- // Convert ISO string dates to Date objects
35
- return convertDatesToObjects(decoded);
36
- }
37
- /**
38
- * Type guard to validate decoded data shape.
39
- *
40
- * @param value - Value to validate
41
- * @returns True if value matches SessionData structure
42
- * @private
43
- */
44
- function isValidSessionDataShape(value) {
45
- if (typeof value !== 'object' || value === null) {
46
- return false;
47
- }
48
- const obj = value;
49
- return (typeof obj['sessionId'] === 'string' &&
50
- typeof obj['agentType'] === 'string' &&
51
- Array.isArray(obj['history']) &&
52
- (typeof obj['createdAt'] === 'string' || obj['createdAt'] instanceof Date) &&
53
- (typeof obj['lastUpdatedAt'] === 'string' || obj['lastUpdatedAt'] instanceof Date));
54
- }
55
- /**
56
- * Converts ISO string dates to Date objects.
57
- *
58
- * @param data - Decoded data with ISO string dates
59
- * @returns SessionData with Date objects
60
- * @private
61
- */
62
- function convertDatesToObjects(data) {
63
- return {
64
- sessionId: data.sessionId,
65
- agentType: data.agentType,
66
- history: data.history.map((entry) => ({
67
- timestamp: typeof entry.timestamp === 'string' ? new Date(entry.timestamp) : entry.timestamp,
68
- request: entry.request,
69
- response: entry.response,
70
- })),
71
- createdAt: typeof data.createdAt === 'string' ? new Date(data.createdAt) : data.createdAt,
72
- lastUpdatedAt: typeof data.lastUpdatedAt === 'string' ? new Date(data.lastUpdatedAt) : data.lastUpdatedAt,
73
- };
74
- }
75
- //# sourceMappingURL=ToonUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToonUtils.js","sourceRoot":"","sources":["../../src/session/ToonUtils.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAWH,8CAEC;AAUD,8CAUC;AA/BD,4CAAkD;AAGlD;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,WAAwB;IACxD,OAAO,IAAA,aAAM,EAAC,WAAW,CAAC,CAAA;AAC5B,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAAC,UAAkB;IAClD,MAAM,OAAO,GAAG,IAAA,aAAM,EAAC,UAAU,CAAY,CAAA;IAE7C,8CAA8C;IAC9C,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAA;IAC3F,CAAC;IAED,2CAA2C;IAC3C,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAA;AACvC,CAAC;AAED;;;;;;GAMG;AACH,SAAS,uBAAuB,CAAC,KAAc;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,GAAG,GAAG,KAAgC,CAAA;IAE5C,OAAO,CACL,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,QAAQ;QACpC,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,QAAQ;QACpC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC,OAAO,GAAG,CAAC,WAAW,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,WAAW,CAAC,YAAY,IAAI,CAAC;QAC1E,CAAC,OAAO,GAAG,CAAC,eAAe,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,CACnF,CAAA;AACH,CAAC;AA2BD;;;;;;GAMG;AACH,SAAS,qBAAqB,CAAC,IAAwB;IACrD,OAAO;QACL,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACpC,SAAS,EAAE,OAAO,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS;YAC5F,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;SACzB,CAAC,CAAC;QACH,SAAS,EAAE,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS;QACzF,aAAa,EACX,OAAO,IAAI,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa;KAC7F,CAAA;AACH,CAAC"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Configuration interface for the MCP server.
3
- * Defines the structure for server configuration parameters
4
- * loaded from environment variables or defaults.
5
- */
6
- export interface ServerConfigInterface {
7
- /**
8
- * Name identifier of the MCP server.
9
- * Used in server registration and client communication.
10
- */
11
- serverName: string;
12
- /**
13
- * Version of the MCP server.
14
- * Used in server identification and client compatibility checking.
15
- */
16
- serverVersion: string;
17
- /**
18
- * Directory path containing agent definition files.
19
- * The server scans this directory for .md files containing agent definitions.
20
- */
21
- agentsDir: string;
22
- /**
23
- * Type of agent to use for execution.
24
- * 'cursor' or 'claude'
25
- */
26
- agentType: 'cursor' | 'claude';
27
- /**
28
- * Log level for server operations.
29
- * Controls verbosity of server logging output.
30
- */
31
- logLevel: 'debug' | 'info' | 'warn' | 'error';
32
- /**
33
- * Maximum execution timeout in milliseconds for agent execution.
34
- * Configurable via EXECUTION_TIMEOUT_MS environment variable.
35
- * Default: 90000ms (90 seconds), Range: 1000ms - 240000ms (4 minutes)
36
- */
37
- executionTimeoutMs: number;
38
- }
39
- //# sourceMappingURL=ServerConfig.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerConfig.d.ts","sourceRoot":"","sources":["../../src/types/ServerConfig.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAA;IAErB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;OAGG;IACH,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAE9B;;;OAGG;IACH,QAAQ,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;IAE7C;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAA;CAC3B"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ServerConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ServerConfig.js","sourceRoot":"","sources":["../../src/types/ServerConfig.ts"],"names":[],"mappings":""}
@@ -1,19 +0,0 @@
1
- /**
2
- * Central export point for all type definitions used in the MCP server.
3
- *
4
- * This module provides type definitions for:
5
- * - Agent definitions and metadata
6
- * - Execution parameters and results
7
- * - Server configuration
8
- * - Type guards for runtime validation
9
- *
10
- * @example
11
- * ```typescript
12
- * import type { AgentDefinition, ExecutionParams } from 'src/types/types'
13
- * import { isAgentDefinition, isExecutionParams } from 'src/types/types'
14
- * ```
15
- */
16
- export type { AgentDefinition } from '../types/AgentDefinition';
17
- export type { ExecutionParams, ExecutionResult } from '../types/ExecutionParams';
18
- export type { ServerConfigInterface } from '../types/ServerConfig';
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,YAAY,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAChE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AACjF,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}