@popoverai/dotrequirements 0.26.1 → 0.27.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 (84) hide show
  1. package/README.md +13 -69
  2. package/dist/cli.js +19 -7
  3. package/dist/codebase-to-spec/present.js +4 -5
  4. package/dist/codebase-to-spec/validate.js +3 -2
  5. package/dist/commands/acceptance-test.js +4 -2
  6. package/dist/commands/ai-setup.d.ts +8 -2
  7. package/dist/commands/ai-setup.js +154 -310
  8. package/dist/commands/get.js +6 -2
  9. package/dist/commands/init.js +8 -6
  10. package/dist/commands/link-resolution.d.ts +3 -1
  11. package/dist/commands/link-resolution.js +4 -2
  12. package/dist/commands/mcp.d.ts +8 -2
  13. package/dist/commands/mcp.js +17 -6
  14. package/dist/commands/pull.js +36 -3
  15. package/dist/commands/push.js +54 -16
  16. package/dist/commands/report.js +18 -3
  17. package/dist/commands/review-test.d.ts +5 -1
  18. package/dist/commands/review-test.js +117 -15
  19. package/dist/commands/style-check.d.ts +1 -0
  20. package/dist/commands/style-check.js +137 -13
  21. package/dist/commands/tests-for.js +13 -13
  22. package/dist/commands/validate.js +14 -14
  23. package/dist/convex.d.ts +1 -3
  24. package/dist/convex.js +3 -3
  25. package/dist/harness/cache.d.ts +19 -3
  26. package/dist/harness/cache.js +38 -12
  27. package/dist/harness/finalize.js +33 -1
  28. package/dist/harness/index.js +16 -9
  29. package/dist/harness/requirementsLoader.js +12 -0
  30. package/dist/harness/tracking.d.ts +17 -2
  31. package/dist/harness/tracking.js +83 -9
  32. package/dist/push/core.d.ts +50 -0
  33. package/dist/push/core.js +149 -11
  34. package/dist/push/index.d.ts +1 -1
  35. package/dist/push/index.js +1 -1
  36. package/dist/requirements/cloud-ai.d.ts +21 -8
  37. package/dist/requirements/cloud-ai.js +10 -8
  38. package/dist/requirements/cloud-coverage.d.ts +12 -2
  39. package/dist/requirements/cloud-coverage.js +30 -3
  40. package/dist/requirements/grep.d.ts +7 -2
  41. package/dist/requirements/grep.js +75 -47
  42. package/dist/schema/builder.d.ts +1 -1
  43. package/dist/schema/builder.js +13 -0
  44. package/dist/schema/conversions.d.ts +7 -2
  45. package/dist/schema/conversions.js +13 -4
  46. package/dist/schema/parser-core.d.ts +41 -0
  47. package/dist/schema/parser-core.js +113 -18
  48. package/dist/schema/parser.d.ts +8 -26
  49. package/dist/schema/parser.js +23 -251
  50. package/dist/schema/resolver.js +18 -8
  51. package/dist/templates/context-file-section.md +25 -22
  52. package/dist/utils/context-file.d.ts +7 -3
  53. package/dist/utils/context-file.js +10 -7
  54. package/dist/utils/env.js +17 -1
  55. package/dist/utils/oauth-flow.js +8 -0
  56. package/dist/utils/project-settings.d.ts +5 -0
  57. package/dist/utils/project-settings.js +36 -1
  58. package/package.json +3 -5
  59. package/dist/mcp/convexClient.d.ts +0 -19
  60. package/dist/mcp/convexClient.js +0 -24
  61. package/dist/mcp/handlers/authoring.d.ts +0 -41
  62. package/dist/mcp/handlers/authoring.js +0 -104
  63. package/dist/mcp/handlers/debug.d.ts +0 -16
  64. package/dist/mcp/handlers/debug.js +0 -37
  65. package/dist/mcp/handlers/get.d.ts +0 -24
  66. package/dist/mcp/handlers/get.js +0 -65
  67. package/dist/mcp/handlers/index.d.ts +0 -28
  68. package/dist/mcp/handlers/index.js +0 -19
  69. package/dist/mcp/handlers/list.d.ts +0 -7
  70. package/dist/mcp/handlers/list.js +0 -43
  71. package/dist/mcp/handlers/push.d.ts +0 -26
  72. package/dist/mcp/handlers/push.js +0 -186
  73. package/dist/mcp/handlers/report.d.ts +0 -16
  74. package/dist/mcp/handlers/report.js +0 -134
  75. package/dist/mcp/handlers/review.d.ts +0 -51
  76. package/dist/mcp/handlers/review.js +0 -200
  77. package/dist/mcp/handlers/search.d.ts +0 -30
  78. package/dist/mcp/handlers/search.js +0 -58
  79. package/dist/mcp/handlers/test-mapping.d.ts +0 -39
  80. package/dist/mcp/handlers/test-mapping.js +0 -133
  81. package/dist/mcp/handlers/types.d.ts +0 -75
  82. package/dist/mcp/handlers/types.js +0 -25
  83. package/dist/mcp/index.d.ts +0 -45
  84. package/dist/mcp/index.js +0 -634
@@ -1,75 +0,0 @@
1
- /**
2
- * Handler types for MCP tool handlers
3
- *
4
- * Each handler is a pure function that takes arguments and context,
5
- * and returns an MCP tool response. This enables unit testing without
6
- * the full MCP server infrastructure.
7
- */
8
- import type { FlattenedRequirement } from "../../requirements/index.js";
9
- import type { DotreqProject } from "../../utils/project-discovery.js";
10
- /**
11
- * MCP tool response content item
12
- */
13
- export interface ToolContentItem {
14
- type: "text";
15
- text: string;
16
- }
17
- /**
18
- * MCP tool response
19
- *
20
- * Compatible with MCP SDK's CallToolResult type.
21
- * The index signature allows for SDK extensibility (e.g., _meta, task).
22
- */
23
- export interface ToolResponse {
24
- [key: string]: unknown;
25
- content: ToolContentItem[];
26
- isError?: boolean;
27
- }
28
- /**
29
- * Context provided to all handlers
30
- *
31
- * This abstraction enables:
32
- * - Unit testing with mock context
33
- * - Dependency injection
34
- * - Isolation from global state
35
- */
36
- export interface HandlerContext {
37
- /**
38
- * Get flattened requirements for a project
39
- * @param projectId - Optional project ID for multi-project scenarios
40
- */
41
- getRequirements: (projectId?: string) => Promise<FlattenedRequirement[]>;
42
- /**
43
- * Get project from discovery (path, credentials)
44
- * @param projectId - Optional project ID for multi-project scenarios
45
- */
46
- getProjectFromDiscovery: (projectId?: string) => Promise<DotreqProject>;
47
- /**
48
- * Workspace root directory
49
- */
50
- workspaceRoot: string;
51
- /**
52
- * Project paths from environment variables (PROJ_* pattern)
53
- */
54
- projectPaths: Map<string, string>;
55
- /**
56
- * Environment variables (for debug_mcp_environment)
57
- */
58
- env: NodeJS.ProcessEnv;
59
- }
60
- /**
61
- * Handler function signature
62
- *
63
- * All MCP tool handlers implement this interface.
64
- * The args parameter contains tool-specific arguments.
65
- */
66
- export type ToolHandler<TArgs = Record<string, unknown>> = (args: TArgs, context: HandlerContext) => Promise<ToolResponse>;
67
- /**
68
- * Helper to create a text response
69
- */
70
- export declare function textResponse(text: string): ToolResponse;
71
- /**
72
- * Helper to create an error response
73
- */
74
- export declare function errorResponse(message: string): ToolResponse;
75
- //# sourceMappingURL=types.d.ts.map
@@ -1,25 +0,0 @@
1
- /**
2
- * Handler types for MCP tool handlers
3
- *
4
- * Each handler is a pure function that takes arguments and context,
5
- * and returns an MCP tool response. This enables unit testing without
6
- * the full MCP server infrastructure.
7
- */
8
- /**
9
- * Helper to create a text response
10
- */
11
- export function textResponse(text) {
12
- return {
13
- content: [{ type: "text", text }],
14
- };
15
- }
16
- /**
17
- * Helper to create an error response
18
- */
19
- export function errorResponse(message) {
20
- return {
21
- content: [{ type: "text", text: message }],
22
- isError: true,
23
- };
24
- }
25
- //# sourceMappingURL=types.js.map
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env node
2
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
- export declare function invalidateCache(): void;
4
- export declare const server: Server<{
5
- method: string;
6
- params?: {
7
- [x: string]: unknown;
8
- task?: {
9
- [x: string]: unknown;
10
- ttl?: number | null | undefined;
11
- pollInterval?: number | undefined;
12
- } | undefined;
13
- _meta?: {
14
- [x: string]: unknown;
15
- progressToken?: string | number | undefined;
16
- "io.modelcontextprotocol/related-task"?: {
17
- [x: string]: unknown;
18
- taskId: string;
19
- } | undefined;
20
- } | undefined;
21
- } | undefined;
22
- }, {
23
- method: string;
24
- params?: {
25
- [x: string]: unknown;
26
- _meta?: {
27
- [x: string]: unknown;
28
- "io.modelcontextprotocol/related-task"?: {
29
- [x: string]: unknown;
30
- taskId: string;
31
- } | undefined;
32
- } | undefined;
33
- } | undefined;
34
- }, {
35
- [x: string]: unknown;
36
- _meta?: {
37
- [x: string]: unknown;
38
- "io.modelcontextprotocol/related-task"?: {
39
- [x: string]: unknown;
40
- taskId: string;
41
- } | undefined;
42
- } | undefined;
43
- }>;
44
- export declare function main(): Promise<void>;
45
- //# sourceMappingURL=index.d.ts.map