@lousy-agents/cli 2.0.0 → 2.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.
Files changed (181) hide show
  1. package/dist/145.js +29 -0
  2. package/dist/145.js.map +1 -0
  3. package/dist/190.js +1765 -0
  4. package/dist/190.js.map +1 -0
  5. package/dist/255.js +1850 -0
  6. package/dist/255.js.map +1 -0
  7. package/dist/31.js +127 -0
  8. package/dist/31.js.map +1 -0
  9. package/dist/399.js +13 -0
  10. package/dist/399.js.map +1 -0
  11. package/dist/610.js +254 -0
  12. package/dist/610.js.map +1 -0
  13. package/dist/651.js +39 -0
  14. package/dist/651.js.map +1 -0
  15. package/dist/659.js +16 -0
  16. package/dist/659.js.map +1 -0
  17. package/dist/709.js +47 -0
  18. package/dist/709.js.map +1 -0
  19. package/dist/835.js +298 -0
  20. package/dist/835.js.map +1 -0
  21. package/dist/index.js +30651 -9
  22. package/dist/index.js.map +1 -1
  23. package/dist/mcp-server.js +46530 -5
  24. package/dist/mcp-server.js.map +1 -1
  25. package/package.json +4 -2
  26. package/dist/commands/copilot-setup.d.ts +0 -5
  27. package/dist/commands/copilot-setup.d.ts.map +0 -1
  28. package/dist/commands/copilot-setup.js +0 -97
  29. package/dist/commands/copilot-setup.js.map +0 -1
  30. package/dist/commands/init.d.ts +0 -13
  31. package/dist/commands/init.d.ts.map +0 -1
  32. package/dist/commands/init.js +0 -109
  33. package/dist/commands/init.js.map +0 -1
  34. package/dist/commands/new.d.ts +0 -21
  35. package/dist/commands/new.d.ts.map +0 -1
  36. package/dist/commands/new.js +0 -94
  37. package/dist/commands/new.js.map +0 -1
  38. package/dist/entities/copilot-agent.d.ts +0 -15
  39. package/dist/entities/copilot-agent.d.ts.map +0 -1
  40. package/dist/entities/copilot-agent.js +0 -53
  41. package/dist/entities/copilot-agent.js.map +0 -1
  42. package/dist/entities/copilot-setup.d.ts +0 -65
  43. package/dist/entities/copilot-setup.d.ts.map +0 -1
  44. package/dist/entities/copilot-setup.js +0 -6
  45. package/dist/entities/copilot-setup.js.map +0 -1
  46. package/dist/entities/index.d.ts +0 -7
  47. package/dist/entities/index.d.ts.map +0 -1
  48. package/dist/entities/index.js +0 -7
  49. package/dist/entities/index.js.map +0 -1
  50. package/dist/entities/skill.d.ts +0 -15
  51. package/dist/entities/skill.d.ts.map +0 -1
  52. package/dist/entities/skill.js +0 -63
  53. package/dist/entities/skill.js.map +0 -1
  54. package/dist/gateways/action-version-gateway.d.ts +0 -39
  55. package/dist/gateways/action-version-gateway.d.ts.map +0 -1
  56. package/dist/gateways/action-version-gateway.js +0 -47
  57. package/dist/gateways/action-version-gateway.js.map +0 -1
  58. package/dist/gateways/agent-file-gateway.d.ts +0 -50
  59. package/dist/gateways/agent-file-gateway.d.ts.map +0 -1
  60. package/dist/gateways/agent-file-gateway.js +0 -34
  61. package/dist/gateways/agent-file-gateway.js.map +0 -1
  62. package/dist/gateways/environment-gateway.d.ts +0 -30
  63. package/dist/gateways/environment-gateway.d.ts.map +0 -1
  64. package/dist/gateways/environment-gateway.js +0 -56
  65. package/dist/gateways/environment-gateway.js.map +0 -1
  66. package/dist/gateways/file-system-utils.d.ts +0 -8
  67. package/dist/gateways/file-system-utils.d.ts.map +0 -1
  68. package/dist/gateways/file-system-utils.js +0 -17
  69. package/dist/gateways/file-system-utils.js.map +0 -1
  70. package/dist/gateways/file-system-workflow-gateway.d.ts +0 -27
  71. package/dist/gateways/file-system-workflow-gateway.d.ts.map +0 -1
  72. package/dist/gateways/file-system-workflow-gateway.js +0 -99
  73. package/dist/gateways/file-system-workflow-gateway.js.map +0 -1
  74. package/dist/gateways/index.d.ts +0 -10
  75. package/dist/gateways/index.d.ts.map +0 -1
  76. package/dist/gateways/index.js +0 -10
  77. package/dist/gateways/index.js.map +0 -1
  78. package/dist/gateways/skill-file-gateway.d.ts +0 -59
  79. package/dist/gateways/skill-file-gateway.d.ts.map +0 -1
  80. package/dist/gateways/skill-file-gateway.js +0 -37
  81. package/dist/gateways/skill-file-gateway.js.map +0 -1
  82. package/dist/gateways/workflow-gateway.d.ts +0 -43
  83. package/dist/gateways/workflow-gateway.d.ts.map +0 -1
  84. package/dist/gateways/workflow-gateway.js +0 -6
  85. package/dist/gateways/workflow-gateway.js.map +0 -1
  86. package/dist/index.d.ts +0 -3
  87. package/dist/index.d.ts.map +0 -1
  88. package/dist/lib/config.d.ts +0 -28
  89. package/dist/lib/config.d.ts.map +0 -1
  90. package/dist/lib/config.js +0 -406
  91. package/dist/lib/config.js.map +0 -1
  92. package/dist/lib/copilot-setup-config.d.ts +0 -79
  93. package/dist/lib/copilot-setup-config.d.ts.map +0 -1
  94. package/dist/lib/copilot-setup-config.js +0 -119
  95. package/dist/lib/copilot-setup-config.js.map +0 -1
  96. package/dist/lib/filesystem-structure.d.ts +0 -45
  97. package/dist/lib/filesystem-structure.d.ts.map +0 -1
  98. package/dist/lib/filesystem-structure.js +0 -69
  99. package/dist/lib/filesystem-structure.js.map +0 -1
  100. package/dist/lib/mcp-test-client.d.ts +0 -43
  101. package/dist/lib/mcp-test-client.d.ts.map +0 -1
  102. package/dist/lib/mcp-test-client.js +0 -167
  103. package/dist/lib/mcp-test-client.js.map +0 -1
  104. package/dist/lib/project-name-validation.d.ts +0 -43
  105. package/dist/lib/project-name-validation.d.ts.map +0 -1
  106. package/dist/lib/project-name-validation.js +0 -131
  107. package/dist/lib/project-name-validation.js.map +0 -1
  108. package/dist/mcp/index.d.ts +0 -5
  109. package/dist/mcp/index.d.ts.map +0 -1
  110. package/dist/mcp/index.js +0 -5
  111. package/dist/mcp/index.js.map +0 -1
  112. package/dist/mcp/server.d.ts +0 -15
  113. package/dist/mcp/server.d.ts.map +0 -1
  114. package/dist/mcp/server.js +0 -120
  115. package/dist/mcp/server.js.map +0 -1
  116. package/dist/mcp/tools/analyze-action-versions.d.ts +0 -9
  117. package/dist/mcp/tools/analyze-action-versions.d.ts.map +0 -1
  118. package/dist/mcp/tools/analyze-action-versions.js +0 -81
  119. package/dist/mcp/tools/analyze-action-versions.js.map +0 -1
  120. package/dist/mcp/tools/create-copilot-setup-workflow.d.ts +0 -9
  121. package/dist/mcp/tools/create-copilot-setup-workflow.d.ts.map +0 -1
  122. package/dist/mcp/tools/create-copilot-setup-workflow.js +0 -121
  123. package/dist/mcp/tools/create-copilot-setup-workflow.js.map +0 -1
  124. package/dist/mcp/tools/discover-environment.d.ts +0 -9
  125. package/dist/mcp/tools/discover-environment.d.ts.map +0 -1
  126. package/dist/mcp/tools/discover-environment.js +0 -30
  127. package/dist/mcp/tools/discover-environment.js.map +0 -1
  128. package/dist/mcp/tools/discover-workflow-setup-actions.d.ts +0 -9
  129. package/dist/mcp/tools/discover-workflow-setup-actions.d.ts.map +0 -1
  130. package/dist/mcp/tools/discover-workflow-setup-actions.js +0 -37
  131. package/dist/mcp/tools/discover-workflow-setup-actions.js.map +0 -1
  132. package/dist/mcp/tools/index.d.ts +0 -11
  133. package/dist/mcp/tools/index.d.ts.map +0 -1
  134. package/dist/mcp/tools/index.js +0 -11
  135. package/dist/mcp/tools/index.js.map +0 -1
  136. package/dist/mcp/tools/read-copilot-setup-workflow.d.ts +0 -9
  137. package/dist/mcp/tools/read-copilot-setup-workflow.d.ts.map +0 -1
  138. package/dist/mcp/tools/read-copilot-setup-workflow.js +0 -38
  139. package/dist/mcp/tools/read-copilot-setup-workflow.js.map +0 -1
  140. package/dist/mcp/tools/resolve-action-versions.d.ts +0 -10
  141. package/dist/mcp/tools/resolve-action-versions.d.ts.map +0 -1
  142. package/dist/mcp/tools/resolve-action-versions.js +0 -61
  143. package/dist/mcp/tools/resolve-action-versions.js.map +0 -1
  144. package/dist/mcp/tools/types.d.ts +0 -67
  145. package/dist/mcp/tools/types.d.ts.map +0 -1
  146. package/dist/mcp/tools/types.js +0 -24
  147. package/dist/mcp/tools/types.js.map +0 -1
  148. package/dist/mcp-server.d.ts +0 -7
  149. package/dist/mcp-server.d.ts.map +0 -1
  150. package/dist/use-cases/action-resolution.d.ts +0 -66
  151. package/dist/use-cases/action-resolution.d.ts.map +0 -1
  152. package/dist/use-cases/action-resolution.js +0 -107
  153. package/dist/use-cases/action-resolution.js.map +0 -1
  154. package/dist/use-cases/candidate-builder.d.ts +0 -17
  155. package/dist/use-cases/candidate-builder.d.ts.map +0 -1
  156. package/dist/use-cases/candidate-builder.js +0 -67
  157. package/dist/use-cases/candidate-builder.js.map +0 -1
  158. package/dist/use-cases/copilot-setup.d.ts +0 -8
  159. package/dist/use-cases/copilot-setup.d.ts.map +0 -1
  160. package/dist/use-cases/copilot-setup.js +0 -10
  161. package/dist/use-cases/copilot-setup.js.map +0 -1
  162. package/dist/use-cases/create-copilot-agent.d.ts +0 -29
  163. package/dist/use-cases/create-copilot-agent.d.ts.map +0 -1
  164. package/dist/use-cases/create-copilot-agent.js +0 -73
  165. package/dist/use-cases/create-copilot-agent.js.map +0 -1
  166. package/dist/use-cases/create-skill.d.ts +0 -30
  167. package/dist/use-cases/create-skill.d.ts.map +0 -1
  168. package/dist/use-cases/create-skill.js +0 -75
  169. package/dist/use-cases/create-skill.js.map +0 -1
  170. package/dist/use-cases/index.d.ts +0 -10
  171. package/dist/use-cases/index.d.ts.map +0 -1
  172. package/dist/use-cases/index.js +0 -10
  173. package/dist/use-cases/index.js.map +0 -1
  174. package/dist/use-cases/setup-step-discovery.d.ts +0 -87
  175. package/dist/use-cases/setup-step-discovery.d.ts.map +0 -1
  176. package/dist/use-cases/setup-step-discovery.js +0 -202
  177. package/dist/use-cases/setup-step-discovery.js.map +0 -1
  178. package/dist/use-cases/workflow-generator.d.ts +0 -34
  179. package/dist/use-cases/workflow-generator.d.ts.map +0 -1
  180. package/dist/use-cases/workflow-generator.js +0 -195
  181. package/dist/use-cases/workflow-generator.js.map +0 -1
@@ -1,61 +0,0 @@
1
- /**
2
- * MCP tool handler for resolving GitHub Action versions.
3
- * This is a standalone tool for version resolution without workflow creation.
4
- */
5
- import { loadCopilotSetupConfig } from "../../lib/copilot-setup-config.js";
6
- import { buildActionsToResolve, buildActionToResolve, VERSION_RESOLUTION_INSTRUCTIONS, } from "../../use-cases/action-resolution.js";
7
- import { successResponse, } from "./types.js";
8
- /**
9
- * Resolves action versions for the provided actions or detected candidates.
10
- */
11
- export const resolveActionVersionsHandler = async (args) => {
12
- // If specific actions are provided, use them directly
13
- if (args.actions && args.actions.length > 0) {
14
- const actionsToResolve = args.actions
15
- .filter((action) => {
16
- // Filter out already-resolved actions
17
- if (args.resolvedVersions) {
18
- return !args.resolvedVersions.some((r) => r.action === action);
19
- }
20
- return true;
21
- })
22
- .map(buildActionToResolve);
23
- return successResponse({
24
- actionsToResolve,
25
- instructions: actionsToResolve.length > 0
26
- ? VERSION_RESOLUTION_INSTRUCTIONS
27
- : undefined,
28
- message: actionsToResolve.length > 0
29
- ? `Found ${actionsToResolve.length} action(s) needing version resolution`
30
- : "All actions have been resolved",
31
- });
32
- }
33
- // Load configuration to get supported setup actions
34
- const config = await loadCopilotSetupConfig();
35
- // Build candidates from configured setup actions and patterns
36
- const defaultActions = [
37
- // Add actions from setupActions config
38
- ...config.setupActions.map((actionConfig) => ({
39
- action: actionConfig.action,
40
- source: "version-file",
41
- })),
42
- // Add mise-action if it's in the patterns but not in setupActions
43
- ...config.setupActionPatterns
44
- .filter((pattern) => !config.setupActions.some((a) => a.action === pattern))
45
- .map((action) => ({
46
- action,
47
- source: "version-file",
48
- })),
49
- ];
50
- const actionsToResolve = buildActionsToResolve(defaultActions, args.resolvedVersions);
51
- return successResponse({
52
- actionsToResolve,
53
- instructions: actionsToResolve.length > 0
54
- ? VERSION_RESOLUTION_INSTRUCTIONS
55
- : undefined,
56
- message: actionsToResolve.length > 0
57
- ? `Found ${actionsToResolve.length} action(s) needing version resolution`
58
- : "All actions have been resolved",
59
- });
60
- };
61
- //# sourceMappingURL=resolve-action-versions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-action-versions.js","sourceRoot":"","sources":["../../../src/mcp/tools/resolve-action-versions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EACH,qBAAqB,EACrB,oBAAoB,EACpB,+BAA+B,GAClC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAGH,eAAe,GAElB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA0B,KAAK,EACpE,IAAwB,EACL,EAAE;IACrB,sDAAsD;IACtD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO;aAChC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE;YACf,sCAAsC;YACtC,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACxB,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAC9B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAC7B,CAAC;YACN,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;aACD,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAE/B,OAAO,eAAe,CAAC;YACnB,gBAAgB;YAChB,YAAY,EACR,gBAAgB,CAAC,MAAM,GAAG,CAAC;gBACvB,CAAC,CAAC,+BAA+B;gBACjC,CAAC,CAAC,SAAS;YACnB,OAAO,EACH,gBAAgB,CAAC,MAAM,GAAG,CAAC;gBACvB,CAAC,CAAC,SAAS,gBAAgB,CAAC,MAAM,uCAAuC;gBACzE,CAAC,CAAC,gCAAgC;SAC7C,CAAC,CAAC;IACP,CAAC;IAED,oDAAoD;IACpD,MAAM,MAAM,GAAG,MAAM,sBAAsB,EAAE,CAAC;IAE9C,8DAA8D;IAC9D,MAAM,cAAc,GAAyB;QACzC,uCAAuC;QACvC,GAAG,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YAC1C,MAAM,EAAE,YAAY,CAAC,MAAM;YAC3B,MAAM,EAAE,cAAuB;SAClC,CAAC,CAAC;QACH,kEAAkE;QAClE,GAAG,MAAM,CAAC,mBAAmB;aACxB,MAAM,CACH,CAAC,OAAO,EAAE,EAAE,CACR,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,OAAO,CAAC,CAC7D;aACA,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YACd,MAAM;YACN,MAAM,EAAE,cAAuB;SAClC,CAAC,CAAC;KACV,CAAC;IAEF,MAAM,gBAAgB,GAAG,qBAAqB,CAC1C,cAAc,EACd,IAAI,CAAC,gBAAgB,CACxB,CAAC;IAEF,OAAO,eAAe,CAAC;QACnB,gBAAgB;QAChB,YAAY,EACR,gBAAgB,CAAC,MAAM,GAAG,CAAC;YACvB,CAAC,CAAC,+BAA+B;YACjC,CAAC,CAAC,SAAS;QACnB,OAAO,EACH,gBAAgB,CAAC,MAAM,GAAG,CAAC;YACvB,CAAC,CAAC,SAAS,gBAAgB,CAAC,MAAM,uCAAuC;YACzE,CAAC,CAAC,gCAAgC;KAC7C,CAAC,CAAC;AACP,CAAC,CAAC"}
@@ -1,67 +0,0 @@
1
- /**
2
- * Shared types and utilities for MCP tool handlers.
3
- */
4
- import type { ActionToResolve, ResolvedVersion } from "../../entities/copilot-setup.js";
5
- /**
6
- * Arguments for MCP tools that operate on a target directory.
7
- */
8
- export interface ToolArgs {
9
- targetDir?: string;
10
- }
11
- /**
12
- * Extended arguments for create_copilot_setup_workflow tool.
13
- */
14
- export interface CreateWorkflowArgs extends ToolArgs {
15
- /** Resolved versions to use for SHA-pinning */
16
- resolvedVersions?: ResolvedVersion[];
17
- }
18
- /**
19
- * Arguments for resolve_action_versions tool.
20
- */
21
- export interface ResolveActionsArgs extends ToolArgs {
22
- /** List of action names to resolve (e.g., ["actions/setup-node", "actions/checkout"]) */
23
- actions?: string[];
24
- /** Resolved versions to filter out already-resolved actions */
25
- resolvedVersions?: ResolvedVersion[];
26
- }
27
- /**
28
- * Standard result type for MCP tool responses.
29
- */
30
- export interface ToolResult {
31
- content: Array<{
32
- type: "text";
33
- text: string;
34
- }>;
35
- }
36
- /**
37
- * Tool handler function type.
38
- */
39
- export type ToolHandler = (args: ToolArgs) => Promise<ToolResult>;
40
- /**
41
- * Extended tool handler for create_copilot_setup_workflow.
42
- */
43
- export type CreateWorkflowHandler = (args: CreateWorkflowArgs) => Promise<ToolResult>;
44
- /**
45
- * Extended tool handler for resolve_action_versions.
46
- */
47
- export type ResolveActionsHandler = (args: ResolveActionsArgs) => Promise<ToolResult>;
48
- /**
49
- * Creates an error response for MCP tools.
50
- */
51
- export declare function errorResponse(error: string): ToolResult;
52
- /**
53
- * Creates a success response for MCP tools.
54
- */
55
- export declare function successResponse(data: Record<string, unknown>): ToolResult;
56
- /**
57
- * Response fields for version resolution in create workflow tool.
58
- */
59
- export interface VersionResolutionResponse {
60
- /** The generated workflow content */
61
- workflowTemplate?: string;
62
- /** Actions that need version resolution */
63
- actionsToResolve?: ActionToResolve[];
64
- /** Instructions for the LLM to resolve versions */
65
- instructions?: string;
66
- }
67
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACR,eAAe,EACf,eAAe,EAClB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,QAAQ;IAChD,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,QAAQ;IAChD,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAChC,IAAI,EAAE,kBAAkB,KACvB,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAChC,IAAI,EAAE,kBAAkB,KACvB,OAAO,CAAC,UAAU,CAAC,CAAC;AAEzB;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAMvD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU,CAMzE;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IACrC,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Shared types and utilities for MCP tool handlers.
3
- */
4
- /**
5
- * Creates an error response for MCP tools.
6
- */
7
- export function errorResponse(error) {
8
- return {
9
- content: [
10
- { type: "text", text: JSON.stringify({ success: false, error }) },
11
- ],
12
- };
13
- }
14
- /**
15
- * Creates a success response for MCP tools.
16
- */
17
- export function successResponse(data) {
18
- return {
19
- content: [
20
- { type: "text", text: JSON.stringify({ success: true, ...data }) },
21
- ],
22
- };
23
- }
24
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/mcp/tools/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AA0DH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IACvC,OAAO;QACH,OAAO,EAAE;YACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;SACpE;KACJ,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAA6B;IACzD,OAAO;QACH,OAAO,EAAE;YACL,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,EAAE;SACrE;KACJ,CAAC;AACN,CAAC"}
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * MCP Server entry point for lousy-agents.
4
- * Starts the MCP server with stdio transport for VS Code integration.
5
- */
6
- export {};
7
- //# sourceMappingURL=mcp-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
@@ -1,66 +0,0 @@
1
- /**
2
- * Use case for building action resolution metadata.
3
- * This module provides logic for identifying actions that need version resolution
4
- * and generating lookup URLs for the LLM to fetch latest versions.
5
- */
6
- import type { ActionToResolve, ResolvedVersion, SetupStepCandidate } from "../entities/copilot-setup.js";
7
- /**
8
- * The placeholder string used in workflow templates when version resolution is needed.
9
- */
10
- export declare const VERSION_PLACEHOLDER = "RESOLVE_VERSION";
11
- /**
12
- * Instructions for the LLM to resolve action versions.
13
- */
14
- export declare const VERSION_RESOLUTION_INSTRUCTIONS = "To resolve action versions:\n1. For each action in actionsToResolve, fetch the lookup_url to find the latest release\n2. Find the latest release tag (e.g., v4.0.0)\n3. Get the commit SHA for that tag from the release page or GitHub API\n4. Pin actions to SHA with version comment: action@SHA # vX.X.X\n5. Call this tool again with resolvedVersions to generate the final workflow\n\nExample resolved format: actions/setup-node@1a2b3c4d5e6f # v4.0.0";
15
- /**
16
- * Generates a GitHub releases lookup URL for an action.
17
- * @param action The action name (e.g., "actions/setup-node")
18
- * @returns The URL to the action's latest release page
19
- */
20
- export declare function generateLookupUrl(action: string): string;
21
- /**
22
- * Builds an ActionToResolve entry for a given action.
23
- * @param action The action name (e.g., "actions/setup-node")
24
- * @returns ActionToResolve metadata for the action
25
- */
26
- export declare function buildActionToResolve(action: string): ActionToResolve;
27
- /**
28
- * Builds an array of ActionToResolve entries from setup step candidates.
29
- * Filters out actions that already have resolved versions.
30
- * @param candidates The setup step candidates
31
- * @param resolvedVersions Optional array of already-resolved versions
32
- * @returns Array of actions that need version resolution
33
- */
34
- export declare function buildActionsToResolve(candidates: SetupStepCandidate[], resolvedVersions?: ResolvedVersion[]): ActionToResolve[];
35
- /**
36
- * Formats an action reference with SHA pinning and version comment.
37
- * @param action The action name (e.g., "actions/setup-node")
38
- * @param sha The commit SHA
39
- * @param versionTag The version tag for the comment (e.g., "v4.0.0")
40
- * @returns Formatted action reference (e.g., "actions/setup-node@abc123 # v4.0.0")
41
- */
42
- export declare function formatShaPinnedAction(action: string, sha: string, versionTag: string): string;
43
- /**
44
- * Finds a resolved version for a given action.
45
- * @param action The action name to look up
46
- * @param resolvedVersions Array of resolved versions
47
- * @returns The resolved version or undefined if not found
48
- */
49
- export declare function findResolvedVersion(action: string, resolvedVersions: ResolvedVersion[]): ResolvedVersion | undefined;
50
- /**
51
- * Gets the version string to use for an action.
52
- * Returns SHA-pinned format if resolved, or placeholder if not.
53
- * @param action The action name
54
- * @param resolvedVersions Optional array of resolved versions
55
- * @param fallbackVersion Optional fallback version (e.g., "v4")
56
- * @returns The version string to use in the workflow
57
- */
58
- export declare function getActionVersion(action: string, resolvedVersions?: ResolvedVersion[], fallbackVersion?: string): string;
59
- /**
60
- * Checks if all required actions have been resolved.
61
- * @param candidates The setup step candidates
62
- * @param resolvedVersions Array of resolved versions
63
- * @returns True if all actions (including checkout) are resolved
64
- */
65
- export declare function allActionsResolved(candidates: SetupStepCandidate[], resolvedVersions: ResolvedVersion[]): boolean;
66
- //# sourceMappingURL=action-resolution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-resolution.d.ts","sourceRoot":"","sources":["../../src/use-cases/action-resolution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACR,eAAe,EACf,eAAe,EACf,kBAAkB,EACrB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,mBAAmB,oBAAoB,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,+BAA+B,scAOuB,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAMpE;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACjC,UAAU,EAAE,kBAAkB,EAAE,EAChC,gBAAgB,CAAC,EAAE,eAAe,EAAE,GACrC,eAAe,EAAE,CAcnB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,GACnB,MAAM,CAER;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAC/B,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,eAAe,EAAE,GACpC,eAAe,GAAG,SAAS,CAE7B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,eAAe,EAAE,EACpC,eAAe,CAAC,EAAE,MAAM,GACzB,MAAM,CAeR;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAC9B,UAAU,EAAE,kBAAkB,EAAE,EAChC,gBAAgB,EAAE,eAAe,EAAE,GACpC,OAAO,CAMT"}
@@ -1,107 +0,0 @@
1
- /**
2
- * Use case for building action resolution metadata.
3
- * This module provides logic for identifying actions that need version resolution
4
- * and generating lookup URLs for the LLM to fetch latest versions.
5
- */
6
- /**
7
- * The placeholder string used in workflow templates when version resolution is needed.
8
- */
9
- export const VERSION_PLACEHOLDER = "RESOLVE_VERSION";
10
- /**
11
- * Instructions for the LLM to resolve action versions.
12
- */
13
- export const VERSION_RESOLUTION_INSTRUCTIONS = `To resolve action versions:
14
- 1. For each action in actionsToResolve, fetch the lookup_url to find the latest release
15
- 2. Find the latest release tag (e.g., v4.0.0)
16
- 3. Get the commit SHA for that tag from the release page or GitHub API
17
- 4. Pin actions to SHA with version comment: action@SHA # vX.X.X
18
- 5. Call this tool again with resolvedVersions to generate the final workflow
19
-
20
- Example resolved format: actions/setup-node@1a2b3c4d5e6f # v4.0.0`;
21
- /**
22
- * Generates a GitHub releases lookup URL for an action.
23
- * @param action The action name (e.g., "actions/setup-node")
24
- * @returns The URL to the action's latest release page
25
- */
26
- export function generateLookupUrl(action) {
27
- return `https://github.com/${action}/releases/latest`;
28
- }
29
- /**
30
- * Builds an ActionToResolve entry for a given action.
31
- * @param action The action name (e.g., "actions/setup-node")
32
- * @returns ActionToResolve metadata for the action
33
- */
34
- export function buildActionToResolve(action) {
35
- return {
36
- action,
37
- currentPlaceholder: VERSION_PLACEHOLDER,
38
- lookupUrl: generateLookupUrl(action),
39
- };
40
- }
41
- /**
42
- * Builds an array of ActionToResolve entries from setup step candidates.
43
- * Filters out actions that already have resolved versions.
44
- * @param candidates The setup step candidates
45
- * @param resolvedVersions Optional array of already-resolved versions
46
- * @returns Array of actions that need version resolution
47
- */
48
- export function buildActionsToResolve(candidates, resolvedVersions) {
49
- const resolvedActions = new Set(resolvedVersions?.map((r) => r.action) ?? []);
50
- // Include checkout action which is always added to workflows
51
- const allActions = ["actions/checkout", ...candidates.map((c) => c.action)];
52
- // Deduplicate and filter out already-resolved actions
53
- const uniqueActions = [...new Set(allActions)].filter((action) => !resolvedActions.has(action));
54
- return uniqueActions.map(buildActionToResolve);
55
- }
56
- /**
57
- * Formats an action reference with SHA pinning and version comment.
58
- * @param action The action name (e.g., "actions/setup-node")
59
- * @param sha The commit SHA
60
- * @param versionTag The version tag for the comment (e.g., "v4.0.0")
61
- * @returns Formatted action reference (e.g., "actions/setup-node@abc123 # v4.0.0")
62
- */
63
- export function formatShaPinnedAction(action, sha, versionTag) {
64
- return `${action}@${sha} # ${versionTag}`;
65
- }
66
- /**
67
- * Finds a resolved version for a given action.
68
- * @param action The action name to look up
69
- * @param resolvedVersions Array of resolved versions
70
- * @returns The resolved version or undefined if not found
71
- */
72
- export function findResolvedVersion(action, resolvedVersions) {
73
- return resolvedVersions.find((r) => r.action === action);
74
- }
75
- /**
76
- * Gets the version string to use for an action.
77
- * Returns SHA-pinned format if resolved, or placeholder if not.
78
- * @param action The action name
79
- * @param resolvedVersions Optional array of resolved versions
80
- * @param fallbackVersion Optional fallback version (e.g., "v4")
81
- * @returns The version string to use in the workflow
82
- */
83
- export function getActionVersion(action, resolvedVersions, fallbackVersion) {
84
- if (resolvedVersions) {
85
- const resolved = findResolvedVersion(action, resolvedVersions);
86
- if (resolved) {
87
- return `${resolved.sha} # ${resolved.versionTag}`;
88
- }
89
- }
90
- // If we have a fallback version (from existing workflow or gateway), use it
91
- if (fallbackVersion) {
92
- return fallbackVersion;
93
- }
94
- // Otherwise, use placeholder
95
- return VERSION_PLACEHOLDER;
96
- }
97
- /**
98
- * Checks if all required actions have been resolved.
99
- * @param candidates The setup step candidates
100
- * @param resolvedVersions Array of resolved versions
101
- * @returns True if all actions (including checkout) are resolved
102
- */
103
- export function allActionsResolved(candidates, resolvedVersions) {
104
- const actionsToResolve = buildActionsToResolve(candidates, resolvedVersions);
105
- return actionsToResolve.length === 0;
106
- }
107
- //# sourceMappingURL=action-resolution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"action-resolution.js","sourceRoot":"","sources":["../../src/use-cases/action-resolution.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAErD;;GAEG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;;mEAOoB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc;IAC5C,OAAO,sBAAsB,MAAM,kBAAkB,CAAC;AAC1D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc;IAC/C,OAAO;QACH,MAAM;QACN,kBAAkB,EAAE,mBAAmB;QACvC,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC;KACvC,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACjC,UAAgC,EAChC,gBAAoC;IAEpC,MAAM,eAAe,GAAG,IAAI,GAAG,CAC3B,gBAAgB,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAC/C,CAAC;IAEF,6DAA6D;IAC7D,MAAM,UAAU,GAAG,CAAC,kBAAkB,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAE5E,sDAAsD;IACtD,MAAM,aAAa,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CACjD,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,CAC3C,CAAC;IAEF,OAAO,aAAa,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACjC,MAAc,EACd,GAAW,EACX,UAAkB;IAElB,OAAO,GAAG,MAAM,IAAI,GAAG,OAAO,UAAU,EAAE,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAC/B,MAAc,EACd,gBAAmC;IAEnC,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC;AAC7D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAC5B,MAAc,EACd,gBAAoC,EACpC,eAAwB;IAExB,IAAI,gBAAgB,EAAE,CAAC;QACnB,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAC/D,IAAI,QAAQ,EAAE,CAAC;YACX,OAAO,GAAG,QAAQ,CAAC,GAAG,OAAO,QAAQ,CAAC,UAAU,EAAE,CAAC;QACvD,CAAC;IACL,CAAC;IAED,4EAA4E;IAC5E,IAAI,eAAe,EAAE,CAAC;QAClB,OAAO,eAAe,CAAC;IAC3B,CAAC;IAED,6BAA6B;IAC7B,OAAO,mBAAmB,CAAC;AAC/B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAC9B,UAAgC,EAChC,gBAAmC;IAEnC,MAAM,gBAAgB,GAAG,qBAAqB,CAC1C,UAAU,EACV,gBAAgB,CACnB,CAAC;IACF,OAAO,gBAAgB,CAAC,MAAM,KAAK,CAAC,CAAC;AACzC,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Use case for building setup step candidates from environment detection.
3
- * This module handles the logic of determining which GitHub Actions
4
- * setup steps should be added based on detected version files.
5
- */
6
- import type { DetectedEnvironment, SetupStepCandidate } from "../entities/copilot-setup.js";
7
- import type { ActionVersionGateway } from "../gateways/action-version-gateway.js";
8
- import { type CopilotSetupConfig } from "../lib/copilot-setup-config.js";
9
- /**
10
- * Builds setup step candidates from detected environment
11
- * @param environment The detected environment configuration
12
- * @param versionGateway Optional gateway for looking up action versions (defaults to local)
13
- * @param config Optional copilot-setup configuration
14
- * @returns Array of setup step candidates
15
- */
16
- export declare function buildCandidatesFromEnvironment(environment: DetectedEnvironment, versionGateway?: ActionVersionGateway, config?: CopilotSetupConfig): Promise<SetupStepCandidate[]>;
17
- //# sourceMappingURL=candidate-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"candidate-builder.d.ts","sourceRoot":"","sources":["../../src/use-cases/candidate-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACR,mBAAmB,EACnB,kBAAkB,EAGrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAElF,OAAO,EACH,KAAK,kBAAkB,EAI1B,MAAM,gCAAgC,CAAC;AAExC;;;;;;GAMG;AACH,wBAAsB,8BAA8B,CAChD,WAAW,EAAE,mBAAmB,EAChC,cAAc,GAAE,oBAAmD,EACnE,MAAM,CAAC,EAAE,kBAAkB,GAC5B,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAyB/B"}
@@ -1,67 +0,0 @@
1
- /**
2
- * Use case for building setup step candidates from environment detection.
3
- * This module handles the logic of determining which GitHub Actions
4
- * setup steps should be added based on detected version files.
5
- */
6
- import { createActionVersionGateway } from "../gateways/action-version-gateway.js";
7
- import { getVersionFileConfigKeyMap, getVersionTypeToActionMap, loadCopilotSetupConfig, } from "../lib/copilot-setup-config.js";
8
- /**
9
- * Builds setup step candidates from detected environment
10
- * @param environment The detected environment configuration
11
- * @param versionGateway Optional gateway for looking up action versions (defaults to local)
12
- * @param config Optional copilot-setup configuration
13
- * @returns Array of setup step candidates
14
- */
15
- export async function buildCandidatesFromEnvironment(environment, versionGateway = createActionVersionGateway(), config) {
16
- const loadedConfig = config || (await loadCopilotSetupConfig());
17
- const versionTypeToAction = getVersionTypeToActionMap(loadedConfig);
18
- const versionFileConfigKeys = getVersionFileConfigKeyMap(loadedConfig);
19
- const candidates = [];
20
- // If mise.toml is present, add mise-action only
21
- if (environment.hasMise) {
22
- const miseVersion = await versionGateway.getVersion("jdx/mise-action");
23
- candidates.push({
24
- action: "jdx/mise-action",
25
- version: miseVersion,
26
- source: "version-file",
27
- });
28
- return candidates;
29
- }
30
- // Otherwise, add individual setup actions for each version file
31
- return buildCandidatesFromVersionFiles(environment.versionFiles, versionTypeToAction, versionFileConfigKeys, versionGateway);
32
- }
33
- /**
34
- * Builds setup step candidates from individual version files
35
- * @param versionFiles Array of version files to process
36
- * @param versionTypeToAction Map from version file type to action name
37
- * @param versionFileConfigKeys Map from version file type to config key
38
- * @param versionGateway Gateway for looking up action versions
39
- * @returns Array of setup step candidates
40
- */
41
- async function buildCandidatesFromVersionFiles(versionFiles, versionTypeToAction, versionFileConfigKeys, versionGateway) {
42
- const candidates = [];
43
- // Track which types we've already added to deduplicate (e.g., .nvmrc and .node-version)
44
- const addedTypes = new Set();
45
- for (const versionFile of versionFiles) {
46
- if (addedTypes.has(versionFile.type)) {
47
- continue;
48
- }
49
- addedTypes.add(versionFile.type);
50
- const action = versionTypeToAction[versionFile.type];
51
- const configKey = versionFileConfigKeys[versionFile.type];
52
- if (!action || !configKey) {
53
- continue;
54
- }
55
- const version = await versionGateway.getVersion(action);
56
- candidates.push({
57
- action,
58
- version,
59
- config: {
60
- [configKey]: versionFile.filename,
61
- },
62
- source: "version-file",
63
- });
64
- }
65
- return candidates;
66
- }
67
- //# sourceMappingURL=candidate-builder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"candidate-builder.js","sourceRoot":"","sources":["../../src/use-cases/candidate-builder.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAEH,0BAA0B,EAC1B,yBAAyB,EACzB,sBAAsB,GACzB,MAAM,gCAAgC,CAAC;AAExC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAChD,WAAgC,EAChC,iBAAuC,0BAA0B,EAAE,EACnE,MAA2B;IAE3B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,sBAAsB,EAAE,CAAC,CAAC;IAChE,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,YAAY,CAAC,CAAC;IACpE,MAAM,qBAAqB,GAAG,0BAA0B,CAAC,YAAY,CAAC,CAAC;IAEvE,MAAM,UAAU,GAAyB,EAAE,CAAC;IAE5C,gDAAgD;IAChD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;QACvE,UAAU,CAAC,IAAI,CAAC;YACZ,MAAM,EAAE,iBAAiB;YACzB,OAAO,EAAE,WAAW;YACpB,MAAM,EAAE,cAAc;SACzB,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,gEAAgE;IAChE,OAAO,+BAA+B,CAClC,WAAW,CAAC,YAAY,EACxB,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,CACjB,CAAC;AACN,CAAC;AAED;;;;;;;GAOG;AACH,KAAK,UAAU,+BAA+B,CAC1C,YAA2B,EAC3B,mBAA6D,EAC7D,qBAA+D,EAC/D,cAAoC;IAEpC,MAAM,UAAU,GAAyB,EAAE,CAAC;IAC5C,wFAAwF;IACxF,MAAM,UAAU,GAAG,IAAI,GAAG,EAAmB,CAAC;IAE9C,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACrC,IAAI,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;YACnC,SAAS;QACb,CAAC;QACD,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEjC,MAAM,MAAM,GAAG,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrD,MAAM,SAAS,GAAG,qBAAqB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAE1D,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;YACxB,SAAS;QACb,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAExD,UAAU,CAAC,IAAI,CAAC;YACZ,MAAM;YACN,OAAO;YACP,MAAM,EAAE;gBACJ,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC,QAAQ;aACpC;YACD,MAAM,EAAE,cAAc;SACzB,CAAC,CAAC;IACP,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Use cases for the Copilot Setup Steps feature.
3
- * This module re-exports from candidate-builder and workflow-generator
4
- * for backwards compatibility.
5
- */
6
- export { buildCandidatesFromEnvironment } from "./candidate-builder.js";
7
- export { type GenerateWorkflowOptions, generateWorkflowContent, updateWorkflowWithMissingSteps, } from "./workflow-generator.js";
8
- //# sourceMappingURL=copilot-setup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copilot-setup.d.ts","sourceRoot":"","sources":["../../src/use-cases/copilot-setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAGxE,OAAO,EACH,KAAK,uBAAuB,EAC5B,uBAAuB,EACvB,8BAA8B,GACjC,MAAM,yBAAyB,CAAC"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Use cases for the Copilot Setup Steps feature.
3
- * This module re-exports from candidate-builder and workflow-generator
4
- * for backwards compatibility.
5
- */
6
- // Re-export candidate building functionality
7
- export { buildCandidatesFromEnvironment } from "./candidate-builder.js";
8
- // Re-export workflow generation functionality
9
- export { generateWorkflowContent, updateWorkflowWithMissingSteps, } from "./workflow-generator.js";
10
- //# sourceMappingURL=copilot-setup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"copilot-setup.js","sourceRoot":"","sources":["../../src/use-cases/copilot-setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6CAA6C;AAC7C,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAExE,8CAA8C;AAC9C,OAAO,EAEH,uBAAuB,EACvB,8BAA8B,GACjC,MAAM,yBAAyB,CAAC"}
@@ -1,29 +0,0 @@
1
- /**
2
- * Use case for creating GitHub Copilot custom agent files.
3
- * Orchestrates entity logic with gateway operations.
4
- */
5
- import type { AgentFileGateway } from "../gateways/agent-file-gateway.js";
6
- /**
7
- * Result of the create copilot agent operation
8
- */
9
- export interface CreateCopilotAgentResult {
10
- success: boolean;
11
- normalizedName?: string;
12
- filePath?: string;
13
- error?: string;
14
- }
15
- /**
16
- * Use case for creating a new Copilot agent file
17
- */
18
- export declare class CreateCopilotAgentUseCase {
19
- private readonly gateway;
20
- constructor(gateway: AgentFileGateway);
21
- /**
22
- * Executes the create agent operation
23
- * @param targetDir The root directory of the repository
24
- * @param agentName The name of the agent to create
25
- * @returns Result of the operation
26
- */
27
- execute(targetDir: string, agentName: string): Promise<CreateCopilotAgentResult>;
28
- }
29
- //# sourceMappingURL=create-copilot-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-copilot-agent.d.ts","sourceRoot":"","sources":["../../src/use-cases/create-copilot-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAe1E;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,yBAAyB;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,gBAAgB;IAEtD;;;;;OAKG;IACG,OAAO,CACT,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,wBAAwB,CAAC;CAsDvC"}
@@ -1,73 +0,0 @@
1
- /**
2
- * Use case for creating GitHub Copilot custom agent files.
3
- * Orchestrates entity logic with gateway operations.
4
- */
5
- import { z } from "zod";
6
- import { generateAgentContent, normalizeAgentName, } from "../entities/copilot-agent.js";
7
- /**
8
- * Schema for validating agent name input
9
- * Validates that the input is a non-empty string with reasonable constraints
10
- */
11
- const AgentNameSchema = z
12
- .string()
13
- .min(1, "Agent name is required")
14
- .max(100, "Agent name must be 100 characters or less")
15
- .regex(/^[a-zA-Z0-9\s_-]+$/, "Agent name can only contain letters, numbers, spaces, hyphens, and underscores");
16
- /**
17
- * Use case for creating a new Copilot agent file
18
- */
19
- export class CreateCopilotAgentUseCase {
20
- gateway;
21
- constructor(gateway) {
22
- this.gateway = gateway;
23
- }
24
- /**
25
- * Executes the create agent operation
26
- * @param targetDir The root directory of the repository
27
- * @param agentName The name of the agent to create
28
- * @returns Result of the operation
29
- */
30
- async execute(targetDir, agentName) {
31
- // Validate the agent name using Zod schema
32
- const validationResult = AgentNameSchema.safeParse(agentName);
33
- if (!validationResult.success) {
34
- const errorMessage = validationResult.error.issues[0]?.message ??
35
- "Invalid agent name";
36
- return {
37
- success: false,
38
- error: errorMessage,
39
- };
40
- }
41
- // Normalize the agent name
42
- const normalizedName = normalizeAgentName(validationResult.data);
43
- // Validate that the normalized name is not empty (handles whitespace-only input)
44
- if (!normalizedName) {
45
- return {
46
- success: false,
47
- error: "Agent name is required",
48
- };
49
- }
50
- // Get the file path
51
- const filePath = this.gateway.getAgentFilePath(targetDir, normalizedName);
52
- // Check if the file already exists
53
- if (await this.gateway.agentFileExists(targetDir, normalizedName)) {
54
- return {
55
- success: false,
56
- error: `Agent file already exists: ${filePath}`,
57
- filePath,
58
- };
59
- }
60
- // Ensure the directory exists
61
- await this.gateway.ensureAgentsDirectory(targetDir);
62
- // Generate the content
63
- const content = generateAgentContent(normalizedName);
64
- // Write the file
65
- await this.gateway.writeAgentFile(targetDir, normalizedName, content);
66
- return {
67
- success: true,
68
- normalizedName,
69
- filePath,
70
- };
71
- }
72
- }
73
- //# sourceMappingURL=create-copilot-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-copilot-agent.js","sourceRoot":"","sources":["../../src/use-cases/create-copilot-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,oBAAoB,EACpB,kBAAkB,GACrB,MAAM,8BAA8B,CAAC;AAGtC;;;GAGG;AACH,MAAM,eAAe,GAAG,CAAC;KACpB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;KAChC,GAAG,CAAC,GAAG,EAAE,2CAA2C,CAAC;KACrD,KAAK,CACF,oBAAoB,EACpB,gFAAgF,CACnF,CAAC;AAYN;;GAEG;AACH,MAAM,OAAO,yBAAyB;IACL;IAA7B,YAA6B,OAAyB;QAAzB,YAAO,GAAP,OAAO,CAAkB;IAAG,CAAC;IAE1D;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CACT,SAAiB,EACjB,SAAiB;QAEjB,2CAA2C;QAC3C,MAAM,gBAAgB,GAAG,eAAe,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC9D,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,CAAC;YAC5B,MAAM,YAAY,GACd,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO;gBACzC,oBAAoB,CAAC;YACzB,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,YAAY;aACtB,CAAC;QACN,CAAC;QAED,2BAA2B;QAC3B,MAAM,cAAc,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAEjE,iFAAiF;QACjF,IAAI,CAAC,cAAc,EAAE,CAAC;YAClB,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,wBAAwB;aAClC,CAAC;QACN,CAAC;QAED,oBAAoB;QACpB,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAC1C,SAAS,EACT,cAAc,CACjB,CAAC;QAEF,mCAAmC;QACnC,IAAI,MAAM,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,SAAS,EAAE,cAAc,CAAC,EAAE,CAAC;YAChE,OAAO;gBACH,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,8BAA8B,QAAQ,EAAE;gBAC/C,QAAQ;aACX,CAAC;QACN,CAAC;QAED,8BAA8B;QAC9B,MAAM,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAEpD,uBAAuB;QACvB,MAAM,OAAO,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;QAErD,iBAAiB;QACjB,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QAEtE,OAAO;YACH,OAAO,EAAE,IAAI;YACb,cAAc;YACd,QAAQ;SACX,CAAC;IACN,CAAC;CACJ"}
@@ -1,30 +0,0 @@
1
- /**
2
- * Use case for creating GitHub Copilot Agent Skills.
3
- * Orchestrates entity logic with gateway operations.
4
- */
5
- import type { SkillFileGateway } from "../gateways/skill-file-gateway.js";
6
- /**
7
- * Result of the create skill operation
8
- */
9
- export interface CreateSkillResult {
10
- success: boolean;
11
- normalizedName?: string;
12
- skillDirectoryPath?: string;
13
- skillFilePath?: string;
14
- error?: string;
15
- }
16
- /**
17
- * Use case for creating a new Agent Skill
18
- */
19
- export declare class CreateSkillUseCase {
20
- private readonly gateway;
21
- constructor(gateway: SkillFileGateway);
22
- /**
23
- * Executes the create skill operation
24
- * @param targetDir The root directory of the repository
25
- * @param skillName The name of the skill to create
26
- * @returns Result of the operation
27
- */
28
- execute(targetDir: string, skillName: string): Promise<CreateSkillResult>;
29
- }
30
- //# sourceMappingURL=create-skill.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-skill.d.ts","sourceRoot":"","sources":["../../src/use-cases/create-skill.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAe1E;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,kBAAkB;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,gBAAgB;IAEtD;;;;;OAKG;IACG,OAAO,CACT,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,iBAAiB,CAAC;CA6DhC"}