@vibescope/mcp-server 0.0.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.
- package/README.md +98 -0
- package/dist/cli.d.ts +34 -0
- package/dist/cli.js +356 -0
- package/dist/cli.test.d.ts +1 -0
- package/dist/cli.test.js +367 -0
- package/dist/handlers/__test-utils__.d.ts +72 -0
- package/dist/handlers/__test-utils__.js +176 -0
- package/dist/handlers/blockers.d.ts +18 -0
- package/dist/handlers/blockers.js +81 -0
- package/dist/handlers/bodies-of-work.d.ts +34 -0
- package/dist/handlers/bodies-of-work.js +614 -0
- package/dist/handlers/checkouts.d.ts +37 -0
- package/dist/handlers/checkouts.js +377 -0
- package/dist/handlers/cost.d.ts +39 -0
- package/dist/handlers/cost.js +247 -0
- package/dist/handlers/decisions.d.ts +16 -0
- package/dist/handlers/decisions.js +64 -0
- package/dist/handlers/deployment.d.ts +36 -0
- package/dist/handlers/deployment.js +1062 -0
- package/dist/handlers/discovery.d.ts +14 -0
- package/dist/handlers/discovery.js +870 -0
- package/dist/handlers/fallback.d.ts +18 -0
- package/dist/handlers/fallback.js +216 -0
- package/dist/handlers/findings.d.ts +18 -0
- package/dist/handlers/findings.js +110 -0
- package/dist/handlers/git-issues.d.ts +22 -0
- package/dist/handlers/git-issues.js +247 -0
- package/dist/handlers/ideas.d.ts +19 -0
- package/dist/handlers/ideas.js +188 -0
- package/dist/handlers/index.d.ts +29 -0
- package/dist/handlers/index.js +65 -0
- package/dist/handlers/knowledge-query.d.ts +22 -0
- package/dist/handlers/knowledge-query.js +253 -0
- package/dist/handlers/knowledge.d.ts +12 -0
- package/dist/handlers/knowledge.js +108 -0
- package/dist/handlers/milestones.d.ts +20 -0
- package/dist/handlers/milestones.js +179 -0
- package/dist/handlers/organizations.d.ts +36 -0
- package/dist/handlers/organizations.js +428 -0
- package/dist/handlers/progress.d.ts +14 -0
- package/dist/handlers/progress.js +149 -0
- package/dist/handlers/project.d.ts +20 -0
- package/dist/handlers/project.js +278 -0
- package/dist/handlers/requests.d.ts +16 -0
- package/dist/handlers/requests.js +131 -0
- package/dist/handlers/roles.d.ts +30 -0
- package/dist/handlers/roles.js +281 -0
- package/dist/handlers/session.d.ts +20 -0
- package/dist/handlers/session.js +791 -0
- package/dist/handlers/tasks.d.ts +52 -0
- package/dist/handlers/tasks.js +1111 -0
- package/dist/handlers/tasks.test.d.ts +1 -0
- package/dist/handlers/tasks.test.js +431 -0
- package/dist/handlers/types.d.ts +94 -0
- package/dist/handlers/types.js +1 -0
- package/dist/handlers/validation.d.ts +16 -0
- package/dist/handlers/validation.js +188 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2707 -0
- package/dist/knowledge.d.ts +6 -0
- package/dist/knowledge.js +121 -0
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +2498 -0
- package/dist/utils.d.ts +149 -0
- package/dist/utils.js +317 -0
- package/dist/utils.test.d.ts +1 -0
- package/dist/utils.test.js +532 -0
- package/dist/validators.d.ts +35 -0
- package/dist/validators.js +111 -0
- package/dist/validators.test.d.ts +1 -0
- package/dist/validators.test.js +176 -0
- package/package.json +44 -0
- package/src/cli.test.ts +442 -0
- package/src/cli.ts +439 -0
- package/src/handlers/__test-utils__.ts +217 -0
- package/src/handlers/blockers.test.ts +390 -0
- package/src/handlers/blockers.ts +110 -0
- package/src/handlers/bodies-of-work.test.ts +1276 -0
- package/src/handlers/bodies-of-work.ts +783 -0
- package/src/handlers/cost.test.ts +436 -0
- package/src/handlers/cost.ts +322 -0
- package/src/handlers/decisions.test.ts +401 -0
- package/src/handlers/decisions.ts +86 -0
- package/src/handlers/deployment.test.ts +516 -0
- package/src/handlers/deployment.ts +1289 -0
- package/src/handlers/discovery.test.ts +254 -0
- package/src/handlers/discovery.ts +969 -0
- package/src/handlers/fallback.test.ts +687 -0
- package/src/handlers/fallback.ts +260 -0
- package/src/handlers/findings.test.ts +565 -0
- package/src/handlers/findings.ts +153 -0
- package/src/handlers/ideas.test.ts +753 -0
- package/src/handlers/ideas.ts +247 -0
- package/src/handlers/index.ts +69 -0
- package/src/handlers/milestones.test.ts +584 -0
- package/src/handlers/milestones.ts +217 -0
- package/src/handlers/organizations.test.ts +997 -0
- package/src/handlers/organizations.ts +550 -0
- package/src/handlers/progress.test.ts +369 -0
- package/src/handlers/progress.ts +188 -0
- package/src/handlers/project.test.ts +562 -0
- package/src/handlers/project.ts +352 -0
- package/src/handlers/requests.test.ts +531 -0
- package/src/handlers/requests.ts +150 -0
- package/src/handlers/session.test.ts +459 -0
- package/src/handlers/session.ts +912 -0
- package/src/handlers/tasks.test.ts +602 -0
- package/src/handlers/tasks.ts +1393 -0
- package/src/handlers/types.ts +88 -0
- package/src/handlers/validation.test.ts +880 -0
- package/src/handlers/validation.ts +223 -0
- package/src/index.ts +3205 -0
- package/src/knowledge.ts +132 -0
- package/src/tmpclaude-0078-cwd +1 -0
- package/src/tmpclaude-0ee1-cwd +1 -0
- package/src/tmpclaude-2dd5-cwd +1 -0
- package/src/tmpclaude-344c-cwd +1 -0
- package/src/tmpclaude-3860-cwd +1 -0
- package/src/tmpclaude-4b63-cwd +1 -0
- package/src/tmpclaude-5c73-cwd +1 -0
- package/src/tmpclaude-5ee3-cwd +1 -0
- package/src/tmpclaude-6795-cwd +1 -0
- package/src/tmpclaude-709e-cwd +1 -0
- package/src/tmpclaude-9839-cwd +1 -0
- package/src/tmpclaude-d829-cwd +1 -0
- package/src/tmpclaude-e072-cwd +1 -0
- package/src/tmpclaude-f6ee-cwd +1 -0
- package/src/utils.test.ts +681 -0
- package/src/utils.ts +375 -0
- package/src/validators.test.ts +223 -0
- package/src/validators.ts +122 -0
- package/tmpclaude-0439-cwd +1 -0
- package/tmpclaude-132f-cwd +1 -0
- package/tmpclaude-15bb-cwd +1 -0
- package/tmpclaude-165a-cwd +1 -0
- package/tmpclaude-1ba9-cwd +1 -0
- package/tmpclaude-21a3-cwd +1 -0
- package/tmpclaude-2a38-cwd +1 -0
- package/tmpclaude-2adf-cwd +1 -0
- package/tmpclaude-2f56-cwd +1 -0
- package/tmpclaude-3626-cwd +1 -0
- package/tmpclaude-3727-cwd +1 -0
- package/tmpclaude-40bc-cwd +1 -0
- package/tmpclaude-436f-cwd +1 -0
- package/tmpclaude-4783-cwd +1 -0
- package/tmpclaude-4b6d-cwd +1 -0
- package/tmpclaude-4ba4-cwd +1 -0
- package/tmpclaude-51e6-cwd +1 -0
- package/tmpclaude-5ecf-cwd +1 -0
- package/tmpclaude-6f97-cwd +1 -0
- package/tmpclaude-7fb2-cwd +1 -0
- package/tmpclaude-825c-cwd +1 -0
- package/tmpclaude-8baf-cwd +1 -0
- package/tmpclaude-8d9f-cwd +1 -0
- package/tmpclaude-975c-cwd +1 -0
- package/tmpclaude-9983-cwd +1 -0
- package/tmpclaude-a045-cwd +1 -0
- package/tmpclaude-ac4a-cwd +1 -0
- package/tmpclaude-b593-cwd +1 -0
- package/tmpclaude-b891-cwd +1 -0
- package/tmpclaude-c032-cwd +1 -0
- package/tmpclaude-cf43-cwd +1 -0
- package/tmpclaude-d040-cwd +1 -0
- package/tmpclaude-dcdd-cwd +1 -0
- package/tmpclaude-dcee-cwd +1 -0
- package/tmpclaude-e16b-cwd +1 -0
- package/tmpclaude-ecd2-cwd +1 -0
- package/tmpclaude-f48d-cwd +1 -0
- package/tsconfig.json +16 -0
- package/vitest.config.ts +13 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Validation Helpers
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export const VALID_TASK_STATUSES = ['backlog', 'pending', 'in_progress', 'completed', 'cancelled'] as const;
|
|
6
|
+
export const VALID_PROJECT_STATUSES = ['active', 'paused', 'completed', 'archived'] as const;
|
|
7
|
+
export const VALID_BLOCKER_STATUSES = ['open', 'resolved'] as const;
|
|
8
|
+
export const VALID_DEPLOYMENT_STATUSES = ['pending', 'validating', 'ready', 'deploying', 'deployed', 'failed'] as const;
|
|
9
|
+
export const VALID_ENVIRONMENTS = ['development', 'staging', 'production'] as const;
|
|
10
|
+
|
|
11
|
+
export type TaskStatus = typeof VALID_TASK_STATUSES[number];
|
|
12
|
+
export type ProjectStatus = typeof VALID_PROJECT_STATUSES[number];
|
|
13
|
+
export type BlockerStatus = typeof VALID_BLOCKER_STATUSES[number];
|
|
14
|
+
export type DeploymentStatus = typeof VALID_DEPLOYMENT_STATUSES[number];
|
|
15
|
+
export type Environment = typeof VALID_ENVIRONMENTS[number];
|
|
16
|
+
|
|
17
|
+
export class ValidationError extends Error {
|
|
18
|
+
field?: string;
|
|
19
|
+
hint?: string;
|
|
20
|
+
validValues?: readonly string[];
|
|
21
|
+
|
|
22
|
+
constructor(message: string, options?: { field?: string; hint?: string; validValues?: readonly string[] }) {
|
|
23
|
+
super(message);
|
|
24
|
+
this.name = 'ValidationError';
|
|
25
|
+
this.field = options?.field;
|
|
26
|
+
this.hint = options?.hint;
|
|
27
|
+
this.validValues = options?.validValues;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
toJSON() {
|
|
31
|
+
return {
|
|
32
|
+
error: 'validation_error',
|
|
33
|
+
message: this.message,
|
|
34
|
+
field: this.field,
|
|
35
|
+
hint: this.hint,
|
|
36
|
+
valid_values: this.validValues,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function validateRequired(value: unknown, fieldName: string): void {
|
|
42
|
+
if (value === undefined || value === null || value === '') {
|
|
43
|
+
throw new ValidationError(`Missing required field: ${fieldName}`, {
|
|
44
|
+
field: fieldName,
|
|
45
|
+
hint: `Please provide a value for "${fieldName}"`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function validateUUID(value: string | undefined, fieldName: string): void {
|
|
51
|
+
if (!value) return;
|
|
52
|
+
const uuidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
53
|
+
if (!uuidRegex.test(value)) {
|
|
54
|
+
throw new ValidationError(`Invalid UUID format for ${fieldName}: "${value}"`, {
|
|
55
|
+
field: fieldName,
|
|
56
|
+
hint: 'UUIDs should be in format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function validateTaskStatus(status: string | undefined): void {
|
|
62
|
+
if (!status) return;
|
|
63
|
+
if (!VALID_TASK_STATUSES.includes(status as TaskStatus)) {
|
|
64
|
+
throw new ValidationError(`Invalid task status: "${status}"`, {
|
|
65
|
+
field: 'status',
|
|
66
|
+
validValues: VALID_TASK_STATUSES,
|
|
67
|
+
hint: `Status must be one of: ${VALID_TASK_STATUSES.join(', ')}`,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function validateProjectStatus(status: string | undefined): void {
|
|
73
|
+
if (!status) return;
|
|
74
|
+
if (!VALID_PROJECT_STATUSES.includes(status as ProjectStatus)) {
|
|
75
|
+
throw new ValidationError(`Invalid project status: "${status}"`, {
|
|
76
|
+
field: 'status',
|
|
77
|
+
validValues: VALID_PROJECT_STATUSES,
|
|
78
|
+
hint: `Status must be one of: ${VALID_PROJECT_STATUSES.join(', ')}`,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function validatePriority(priority: number | undefined): void {
|
|
84
|
+
if (priority === undefined) return;
|
|
85
|
+
if (!Number.isInteger(priority) || priority < 1 || priority > 5) {
|
|
86
|
+
throw new ValidationError(`Invalid priority: ${priority}. Must be an integer between 1 and 5`, {
|
|
87
|
+
field: 'priority',
|
|
88
|
+
hint: 'Priority 1 is highest, 5 is lowest',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function validateProgressPercentage(percentage: number | undefined): void {
|
|
94
|
+
if (percentage === undefined) return;
|
|
95
|
+
if (!Number.isFinite(percentage) || percentage < 0 || percentage > 100) {
|
|
96
|
+
throw new ValidationError(`Invalid progress_percentage: ${percentage}. Must be between 0 and 100`, {
|
|
97
|
+
field: 'progress_percentage',
|
|
98
|
+
hint: 'Use 0 for not started, 100 for complete',
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function validateEstimatedMinutes(minutes: number | undefined): void {
|
|
104
|
+
if (minutes === undefined) return;
|
|
105
|
+
if (!Number.isInteger(minutes) || minutes < 1) {
|
|
106
|
+
throw new ValidationError(`Invalid estimated_minutes: ${minutes}. Must be a positive integer`, {
|
|
107
|
+
field: 'estimated_minutes',
|
|
108
|
+
hint: 'Estimate the task duration in minutes (e.g., 30 for half an hour)',
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function validateEnvironment(environment: string | undefined): void {
|
|
114
|
+
if (!environment) return;
|
|
115
|
+
if (!VALID_ENVIRONMENTS.includes(environment as Environment)) {
|
|
116
|
+
throw new ValidationError(`Invalid environment: "${environment}"`, {
|
|
117
|
+
field: 'environment',
|
|
118
|
+
validValues: VALID_ENVIRONMENTS,
|
|
119
|
+
hint: `Environment must be one of: ${VALID_ENVIRONMENTS.join(', ')}`,
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/d/Repos/Nonatomic/Vibescope/Vibescope/packages/mcp-server
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "./dist",
|
|
8
|
+
"rootDir": "./src",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src/**/*"],
|
|
15
|
+
"exclude": ["node_modules", "dist", "**/*.test.ts"]
|
|
16
|
+
}
|
package/vitest.config.ts
ADDED