clavix 5.6.2 → 5.6.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.
- package/README.md +50 -6
- package/dist/cli/commands/init.js +97 -74
- package/dist/cli/commands/update.js +34 -1
- package/dist/cli/commands/version.js +9 -3
- package/dist/config/integrations.json +73 -17
- package/dist/core/adapter-registry.js +13 -1
- package/dist/templates/slash-commands/_canonical/implement.md +25 -1
- package/dist/templates/slash-commands/_canonical/improve.md +1 -1
- package/dist/templates/slash-commands/_canonical/plan.md +6 -3
- package/dist/templates/slash-commands/_canonical/prd.md +1 -1
- package/dist/templates/slash-commands/_canonical/refine.md +1 -1
- package/dist/templates/slash-commands/_canonical/start.md +1 -1
- package/dist/templates/slash-commands/_canonical/summarize.md +34 -7
- package/dist/utils/schemas.d.ts +202 -0
- package/dist/utils/schemas.js +128 -0
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./integrations.schema.json",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"integrations": [
|
|
5
5
|
{
|
|
6
6
|
"name": "cursor",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"filenamePattern": "clavix-{name}",
|
|
10
10
|
"extension": ".md",
|
|
11
11
|
"separator": "-",
|
|
12
|
-
"detection": ".cursor"
|
|
12
|
+
"detection": ".cursor",
|
|
13
|
+
"type": "standard"
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
16
|
"name": "windsurf",
|
|
@@ -18,7 +19,8 @@
|
|
|
18
19
|
"filenamePattern": "clavix-{name}",
|
|
19
20
|
"extension": ".md",
|
|
20
21
|
"separator": "-",
|
|
21
|
-
"detection": ".windsurf"
|
|
22
|
+
"detection": ".windsurf",
|
|
23
|
+
"type": "standard"
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
"name": "kilocode",
|
|
@@ -27,7 +29,8 @@
|
|
|
27
29
|
"filenamePattern": "clavix-{name}",
|
|
28
30
|
"extension": ".md",
|
|
29
31
|
"separator": "-",
|
|
30
|
-
"detection": ".kilocode"
|
|
32
|
+
"detection": ".kilocode",
|
|
33
|
+
"type": "standard"
|
|
31
34
|
},
|
|
32
35
|
{
|
|
33
36
|
"name": "roocode",
|
|
@@ -36,7 +39,8 @@
|
|
|
36
39
|
"filenamePattern": "clavix-{name}",
|
|
37
40
|
"extension": ".md",
|
|
38
41
|
"separator": "-",
|
|
39
|
-
"detection": ".roo"
|
|
42
|
+
"detection": ".roo",
|
|
43
|
+
"type": "standard"
|
|
40
44
|
},
|
|
41
45
|
{
|
|
42
46
|
"name": "cline",
|
|
@@ -45,7 +49,8 @@
|
|
|
45
49
|
"filenamePattern": "clavix-{name}",
|
|
46
50
|
"extension": ".md",
|
|
47
51
|
"separator": "-",
|
|
48
|
-
"detection": ".clinerules"
|
|
52
|
+
"detection": ".clinerules",
|
|
53
|
+
"type": "standard"
|
|
49
54
|
},
|
|
50
55
|
{
|
|
51
56
|
"name": "droid",
|
|
@@ -55,7 +60,8 @@
|
|
|
55
60
|
"extension": ".md",
|
|
56
61
|
"separator": "-",
|
|
57
62
|
"detection": ".factory",
|
|
58
|
-
"placeholder": "$ARGUMENTS"
|
|
63
|
+
"placeholder": "$ARGUMENTS",
|
|
64
|
+
"type": "standard"
|
|
59
65
|
},
|
|
60
66
|
{
|
|
61
67
|
"name": "opencode",
|
|
@@ -65,7 +71,8 @@
|
|
|
65
71
|
"extension": ".md",
|
|
66
72
|
"separator": "-",
|
|
67
73
|
"detection": ".opencode",
|
|
68
|
-
"placeholder": "$ARGUMENTS"
|
|
74
|
+
"placeholder": "$ARGUMENTS",
|
|
75
|
+
"type": "standard"
|
|
69
76
|
},
|
|
70
77
|
{
|
|
71
78
|
"name": "codebuddy",
|
|
@@ -74,7 +81,8 @@
|
|
|
74
81
|
"filenamePattern": "clavix-{name}",
|
|
75
82
|
"extension": ".md",
|
|
76
83
|
"separator": "-",
|
|
77
|
-
"detection": ".codebuddy"
|
|
84
|
+
"detection": ".codebuddy",
|
|
85
|
+
"type": "standard"
|
|
78
86
|
},
|
|
79
87
|
{
|
|
80
88
|
"name": "amp",
|
|
@@ -83,7 +91,8 @@
|
|
|
83
91
|
"filenamePattern": "clavix-{name}",
|
|
84
92
|
"extension": ".md",
|
|
85
93
|
"separator": "-",
|
|
86
|
-
"detection": ".agents"
|
|
94
|
+
"detection": ".agents",
|
|
95
|
+
"type": "standard"
|
|
87
96
|
},
|
|
88
97
|
{
|
|
89
98
|
"name": "crush",
|
|
@@ -92,7 +101,8 @@
|
|
|
92
101
|
"filenamePattern": "clavix-{name}",
|
|
93
102
|
"extension": ".md",
|
|
94
103
|
"separator": "-",
|
|
95
|
-
"detection": ".crush"
|
|
104
|
+
"detection": ".crush",
|
|
105
|
+
"type": "standard"
|
|
96
106
|
},
|
|
97
107
|
{
|
|
98
108
|
"name": "codex",
|
|
@@ -103,7 +113,8 @@
|
|
|
103
113
|
"separator": "-",
|
|
104
114
|
"detection": ".codex",
|
|
105
115
|
"global": true,
|
|
106
|
-
"placeholder": "$ARGUMENTS"
|
|
116
|
+
"placeholder": "$ARGUMENTS",
|
|
117
|
+
"type": "standard"
|
|
107
118
|
},
|
|
108
119
|
{
|
|
109
120
|
"name": "augment",
|
|
@@ -112,7 +123,8 @@
|
|
|
112
123
|
"filenamePattern": "clavix-{name}",
|
|
113
124
|
"extension": ".md",
|
|
114
125
|
"separator": "-",
|
|
115
|
-
"detection": ".augment"
|
|
126
|
+
"detection": ".augment",
|
|
127
|
+
"type": "standard"
|
|
116
128
|
},
|
|
117
129
|
{
|
|
118
130
|
"name": "claude-code",
|
|
@@ -122,7 +134,8 @@
|
|
|
122
134
|
"extension": ".md",
|
|
123
135
|
"separator": ":",
|
|
124
136
|
"detection": ".claude",
|
|
125
|
-
"specialAdapter": "doc-injection"
|
|
137
|
+
"specialAdapter": "doc-injection",
|
|
138
|
+
"type": "standard"
|
|
126
139
|
},
|
|
127
140
|
{
|
|
128
141
|
"name": "gemini",
|
|
@@ -133,7 +146,8 @@
|
|
|
133
146
|
"separator": ":",
|
|
134
147
|
"detection": ".gemini",
|
|
135
148
|
"specialAdapter": "toml",
|
|
136
|
-
"rootDir": ".gemini"
|
|
149
|
+
"rootDir": ".gemini",
|
|
150
|
+
"type": "standard"
|
|
137
151
|
},
|
|
138
152
|
{
|
|
139
153
|
"name": "qwen",
|
|
@@ -144,7 +158,8 @@
|
|
|
144
158
|
"separator": ":",
|
|
145
159
|
"detection": ".qwen",
|
|
146
160
|
"specialAdapter": "toml",
|
|
147
|
-
"rootDir": ".qwen"
|
|
161
|
+
"rootDir": ".qwen",
|
|
162
|
+
"type": "standard"
|
|
148
163
|
},
|
|
149
164
|
{
|
|
150
165
|
"name": "llxprt",
|
|
@@ -155,7 +170,48 @@
|
|
|
155
170
|
"separator": ":",
|
|
156
171
|
"detection": ".llxprt",
|
|
157
172
|
"specialAdapter": "toml",
|
|
158
|
-
"rootDir": ".llxprt"
|
|
173
|
+
"rootDir": ".llxprt",
|
|
174
|
+
"type": "standard"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "agents-md",
|
|
178
|
+
"displayName": "AGENTS.md",
|
|
179
|
+
"directory": ".",
|
|
180
|
+
"filenamePattern": "AGENTS",
|
|
181
|
+
"extension": ".md",
|
|
182
|
+
"separator": "-",
|
|
183
|
+
"detection": "AGENTS.md",
|
|
184
|
+
"type": "universal"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "copilot-instructions",
|
|
188
|
+
"displayName": "GitHub Copilot",
|
|
189
|
+
"directory": ".github",
|
|
190
|
+
"filenamePattern": "copilot-instructions",
|
|
191
|
+
"extension": ".md",
|
|
192
|
+
"separator": "-",
|
|
193
|
+
"detection": ".github",
|
|
194
|
+
"type": "universal"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "octo-md",
|
|
198
|
+
"displayName": "OCTO.md (Octofriend)",
|
|
199
|
+
"directory": ".",
|
|
200
|
+
"filenamePattern": "OCTO",
|
|
201
|
+
"extension": ".md",
|
|
202
|
+
"separator": "-",
|
|
203
|
+
"detection": "OCTO.md",
|
|
204
|
+
"type": "universal"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "warp-md",
|
|
208
|
+
"displayName": "WARP.md (Warp AI)",
|
|
209
|
+
"directory": ".",
|
|
210
|
+
"filenamePattern": "WARP",
|
|
211
|
+
"extension": ".md",
|
|
212
|
+
"separator": "-",
|
|
213
|
+
"detection": "WARP.md",
|
|
214
|
+
"type": "universal"
|
|
159
215
|
}
|
|
160
216
|
]
|
|
161
217
|
}
|
|
@@ -17,9 +17,21 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { createRequire } from 'module';
|
|
19
19
|
import { DEFAULT_MD_FEATURES, DEFAULT_TOML_FEATURES, } from '../types/adapter-config.js';
|
|
20
|
+
import { validateIntegrationsConfig, formatZodErrors, } from '../utils/schemas.js';
|
|
20
21
|
// Use createRequire for JSON imports in ESM
|
|
21
22
|
const require = createRequire(import.meta.url);
|
|
22
|
-
const
|
|
23
|
+
const rawIntegrations = require('../config/integrations.json');
|
|
24
|
+
// Validate integrations.json at load time (build-time validation)
|
|
25
|
+
const validationResult = validateIntegrationsConfig(rawIntegrations);
|
|
26
|
+
if (!validationResult.success && validationResult.errors) {
|
|
27
|
+
const errorMessages = formatZodErrors(validationResult.errors);
|
|
28
|
+
throw new Error(`Invalid integrations.json configuration:\n${errorMessages.map((e) => ` - ${e}`).join('\n')}`);
|
|
29
|
+
}
|
|
30
|
+
// Log warnings for unknown fields (non-blocking)
|
|
31
|
+
if (validationResult.warnings && validationResult.warnings.length > 0) {
|
|
32
|
+
console.warn(`[Clavix] integrations.json warnings:\n${validationResult.warnings.map((w) => ` - ${w}`).join('\n')}`);
|
|
33
|
+
}
|
|
34
|
+
const integrations = validationResult.data;
|
|
23
35
|
/**
|
|
24
36
|
* Transform JSON config to AdapterConfig
|
|
25
37
|
*/
|
|
@@ -27,14 +27,38 @@ When you run `/clavix:implement`, I:
|
|
|
27
27
|
```
|
|
28
28
|
/clavix:implement
|
|
29
29
|
│
|
|
30
|
-
├─► Check .clavix/outputs/<project>/tasks.md
|
|
30
|
+
├─► Check .clavix/outputs/<project>/tasks.md (all project folders)
|
|
31
31
|
│ └─► If found → Task Implementation Mode
|
|
32
32
|
│
|
|
33
|
+
├─► Check .clavix/outputs/summarize/tasks.md (legacy fallback)
|
|
34
|
+
│ └─► If found → Task Implementation Mode (legacy)
|
|
35
|
+
│
|
|
33
36
|
└─► Check .clavix/outputs/prompts/*.md
|
|
34
37
|
└─► If found → Prompt Execution Mode
|
|
35
38
|
└─► If neither → Ask what to build
|
|
36
39
|
```
|
|
37
40
|
|
|
41
|
+
### Required Confirmation Message
|
|
42
|
+
|
|
43
|
+
**Before starting any implementation, you MUST output a confirmation message:**
|
|
44
|
+
|
|
45
|
+
**For tasks.md detection:**
|
|
46
|
+
```
|
|
47
|
+
Found tasks.md with [N] pending tasks in [project-name]. Starting task implementation...
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**For prompt detection:**
|
|
51
|
+
```
|
|
52
|
+
Found [N] saved prompt(s) in prompts/. Implementing [prompt-name]...
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**For legacy summarize/ fallback:**
|
|
56
|
+
```
|
|
57
|
+
Found tasks.md with [N] pending tasks in summarize/ (legacy location). Starting task implementation...
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
This confirmation ensures the user knows exactly what will be implemented before any code is written.
|
|
61
|
+
|
|
38
62
|
### Explicit Flags
|
|
39
63
|
|
|
40
64
|
Override auto-detection when needed:
|
|
@@ -66,7 +66,7 @@ For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
|
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
|
-
## State Assertion (
|
|
69
|
+
## State Assertion (REQUIRED)
|
|
70
70
|
|
|
71
71
|
**Before starting task breakdown, output:**
|
|
72
72
|
```
|
|
@@ -88,10 +88,13 @@ Implementation: BLOCKED - I will create tasks, not implement them
|
|
|
88
88
|
|
|
89
89
|
1. **Validate prerequisites**:
|
|
90
90
|
- Check if `.clavix/outputs/` directory exists
|
|
91
|
-
- Look for PRD artifacts
|
|
91
|
+
- Look for PRD artifacts in this order:
|
|
92
|
+
1. **Project directories first**: Check `.clavix/outputs/<project-name>/` folders for `full-prd.md`, `quick-prd.md`, `mini-prd.md`, or `optimized-prompt.md`
|
|
93
|
+
2. **Legacy fallback**: If no project directories found, check `.clavix/outputs/summarize/` for `mini-prd.md` or `optimized-prompt.md` (backwards compatibility)
|
|
94
|
+
- **If multiple projects found**: List them and ask user which one to plan
|
|
92
95
|
- **If not found**: Error inline - "No PRD found in `.clavix/outputs/`. Use `/clavix:prd` or `/clavix:summarize` first."
|
|
93
96
|
|
|
94
|
-
2. **Read the PRD** from
|
|
97
|
+
2. **Read the PRD** from detected location (project directory or legacy `summarize/` folder)
|
|
95
98
|
|
|
96
99
|
3. **Generate task breakdown** following Part B principles
|
|
97
100
|
|
|
@@ -66,7 +66,7 @@ For complete mode documentation, see: `.clavix/instructions/core/clavix-mode.md`
|
|
|
66
66
|
|
|
67
67
|
---
|
|
68
68
|
|
|
69
|
-
## State Assertion (
|
|
69
|
+
## State Assertion (REQUIRED)
|
|
70
70
|
|
|
71
71
|
**Before starting extraction, output:**
|
|
72
72
|
```
|
|
@@ -129,13 +129,40 @@ Implementation: BLOCKED - I will extract requirements, not implement them
|
|
|
129
129
|
|
|
130
130
|
3. **CREATE OUTPUT FILES (REQUIRED)** - You MUST create three files. This is not optional.
|
|
131
131
|
|
|
132
|
-
**Step 3.1:
|
|
132
|
+
**Step 3.1: Determine project name (Suggest + Confirm)**
|
|
133
|
+
|
|
134
|
+
Before creating files, derive a project name from the conversation:
|
|
135
|
+
|
|
136
|
+
1. **Analyze conversation** to extract a meaningful name:
|
|
137
|
+
- Look for explicit project names mentioned
|
|
138
|
+
- Identify the main topic/feature being discussed
|
|
139
|
+
- Use key nouns (e.g., "auth", "dashboard", "todo")
|
|
140
|
+
|
|
141
|
+
2. **Generate suggested name**:
|
|
142
|
+
- Format: lowercase, hyphen-separated (e.g., "user-auth", "sales-dashboard")
|
|
143
|
+
- Keep it short (2-4 words max)
|
|
144
|
+
- Make it descriptive but concise
|
|
145
|
+
|
|
146
|
+
3. **Ask user to confirm**:
|
|
147
|
+
```
|
|
148
|
+
I'll save these requirements as project "[suggested-name]".
|
|
149
|
+
|
|
150
|
+
Is this name okay? (y/n/custom name)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
4. **Handle response**:
|
|
154
|
+
- "y" or "yes" → use suggested name
|
|
155
|
+
- "n" or "no" → ask for custom name
|
|
156
|
+
- Any other text → use that as the project name (sanitize to lowercase-hyphenated)
|
|
157
|
+
|
|
158
|
+
**Step 3.2: Create directory structure**
|
|
133
159
|
```bash
|
|
134
160
|
mkdir -p .clavix/outputs/[project-name]
|
|
135
161
|
```
|
|
136
|
-
Use a meaningful project name based on the conversation (e.g., "todo-app", "auth-system", "dashboard").
|
|
137
162
|
|
|
138
|
-
**
|
|
163
|
+
**Note (Backwards Compatibility):** Legacy workflows may have used `.clavix/outputs/summarize/` as output. The `/clavix:plan` and `/clavix:implement` commands check both project directories and the legacy `summarize/` location.
|
|
164
|
+
|
|
165
|
+
**Step 3.3: Write mini-prd.md**
|
|
139
166
|
|
|
140
167
|
Use the Write tool to create `.clavix/outputs/[project-name]/mini-prd.md` with this content:
|
|
141
168
|
|
|
@@ -199,7 +226,7 @@ Implementation: BLOCKED - I will extract requirements, not implement them
|
|
|
199
226
|
|
|
200
227
|
**CHECKPOINT:** Created mini-prd.md successfully
|
|
201
228
|
|
|
202
|
-
**Step 3.
|
|
229
|
+
**Step 3.4: Write original-prompt.md**
|
|
203
230
|
|
|
204
231
|
Use the Write tool to create `.clavix/outputs/[project-name]/original-prompt.md`
|
|
205
232
|
|
|
@@ -225,7 +252,7 @@ Implementation: BLOCKED - I will extract requirements, not implement them
|
|
|
225
252
|
|
|
226
253
|
**CHECKPOINT:** Created original-prompt.md successfully
|
|
227
254
|
|
|
228
|
-
**Step 3.
|
|
255
|
+
**Step 3.5: Write optimized-prompt.md**
|
|
229
256
|
|
|
230
257
|
Use the Write tool to create `.clavix/outputs/[project-name]/optimized-prompt.md`
|
|
231
258
|
|
|
@@ -257,7 +284,7 @@ Implementation: BLOCKED - I will extract requirements, not implement them
|
|
|
257
284
|
|
|
258
285
|
**CHECKPOINT:** Created optimized-prompt.md successfully
|
|
259
286
|
|
|
260
|
-
**Step 3.
|
|
287
|
+
**Step 3.6: Verify file creation**
|
|
261
288
|
|
|
262
289
|
List the created files to confirm they exist:
|
|
263
290
|
```
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for configuration file validation
|
|
3
|
+
* Provides runtime validation for integrations.json and user config.json
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
/**
|
|
7
|
+
* Schema for a single integration entry in integrations.json
|
|
8
|
+
*/
|
|
9
|
+
export declare const IntegrationEntrySchema: z.ZodObject<{
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
displayName: z.ZodString;
|
|
12
|
+
directory: z.ZodString;
|
|
13
|
+
filenamePattern: z.ZodString;
|
|
14
|
+
extension: z.ZodEnum<[".md", ".toml"]>;
|
|
15
|
+
separator: z.ZodEnum<[":", "-"]>;
|
|
16
|
+
detection: z.ZodString;
|
|
17
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["standard", "universal"]>>>;
|
|
18
|
+
specialAdapter: z.ZodOptional<z.ZodEnum<["toml", "doc-injection"]>>;
|
|
19
|
+
rootDir: z.ZodOptional<z.ZodString>;
|
|
20
|
+
global: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
name: string;
|
|
24
|
+
directory: string;
|
|
25
|
+
separator: ":" | "-";
|
|
26
|
+
detection: string;
|
|
27
|
+
displayName: string;
|
|
28
|
+
filenamePattern: string;
|
|
29
|
+
extension: ".md" | ".toml";
|
|
30
|
+
type: "standard" | "universal";
|
|
31
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
32
|
+
rootDir?: string | undefined;
|
|
33
|
+
global?: boolean | undefined;
|
|
34
|
+
placeholder?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
name: string;
|
|
37
|
+
directory: string;
|
|
38
|
+
separator: ":" | "-";
|
|
39
|
+
detection: string;
|
|
40
|
+
displayName: string;
|
|
41
|
+
filenamePattern: string;
|
|
42
|
+
extension: ".md" | ".toml";
|
|
43
|
+
type?: "standard" | "universal" | undefined;
|
|
44
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
45
|
+
rootDir?: string | undefined;
|
|
46
|
+
global?: boolean | undefined;
|
|
47
|
+
placeholder?: string | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Schema for the full integrations.json file
|
|
51
|
+
*/
|
|
52
|
+
export declare const IntegrationsConfigSchema: z.ZodObject<{
|
|
53
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
54
|
+
version: z.ZodString;
|
|
55
|
+
integrations: z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
displayName: z.ZodString;
|
|
58
|
+
directory: z.ZodString;
|
|
59
|
+
filenamePattern: z.ZodString;
|
|
60
|
+
extension: z.ZodEnum<[".md", ".toml"]>;
|
|
61
|
+
separator: z.ZodEnum<[":", "-"]>;
|
|
62
|
+
detection: z.ZodString;
|
|
63
|
+
type: z.ZodDefault<z.ZodOptional<z.ZodEnum<["standard", "universal"]>>>;
|
|
64
|
+
specialAdapter: z.ZodOptional<z.ZodEnum<["toml", "doc-injection"]>>;
|
|
65
|
+
rootDir: z.ZodOptional<z.ZodString>;
|
|
66
|
+
global: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
68
|
+
}, "strip", z.ZodTypeAny, {
|
|
69
|
+
name: string;
|
|
70
|
+
directory: string;
|
|
71
|
+
separator: ":" | "-";
|
|
72
|
+
detection: string;
|
|
73
|
+
displayName: string;
|
|
74
|
+
filenamePattern: string;
|
|
75
|
+
extension: ".md" | ".toml";
|
|
76
|
+
type: "standard" | "universal";
|
|
77
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
78
|
+
rootDir?: string | undefined;
|
|
79
|
+
global?: boolean | undefined;
|
|
80
|
+
placeholder?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
name: string;
|
|
83
|
+
directory: string;
|
|
84
|
+
separator: ":" | "-";
|
|
85
|
+
detection: string;
|
|
86
|
+
displayName: string;
|
|
87
|
+
filenamePattern: string;
|
|
88
|
+
extension: ".md" | ".toml";
|
|
89
|
+
type?: "standard" | "universal" | undefined;
|
|
90
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
91
|
+
rootDir?: string | undefined;
|
|
92
|
+
global?: boolean | undefined;
|
|
93
|
+
placeholder?: string | undefined;
|
|
94
|
+
}>, "many">, {
|
|
95
|
+
name: string;
|
|
96
|
+
directory: string;
|
|
97
|
+
separator: ":" | "-";
|
|
98
|
+
detection: string;
|
|
99
|
+
displayName: string;
|
|
100
|
+
filenamePattern: string;
|
|
101
|
+
extension: ".md" | ".toml";
|
|
102
|
+
type: "standard" | "universal";
|
|
103
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
104
|
+
rootDir?: string | undefined;
|
|
105
|
+
global?: boolean | undefined;
|
|
106
|
+
placeholder?: string | undefined;
|
|
107
|
+
}[], {
|
|
108
|
+
name: string;
|
|
109
|
+
directory: string;
|
|
110
|
+
separator: ":" | "-";
|
|
111
|
+
detection: string;
|
|
112
|
+
displayName: string;
|
|
113
|
+
filenamePattern: string;
|
|
114
|
+
extension: ".md" | ".toml";
|
|
115
|
+
type?: "standard" | "universal" | undefined;
|
|
116
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
117
|
+
rootDir?: string | undefined;
|
|
118
|
+
global?: boolean | undefined;
|
|
119
|
+
placeholder?: string | undefined;
|
|
120
|
+
}[]>;
|
|
121
|
+
}, "strip", z.ZodTypeAny, {
|
|
122
|
+
version: string;
|
|
123
|
+
integrations: {
|
|
124
|
+
name: string;
|
|
125
|
+
directory: string;
|
|
126
|
+
separator: ":" | "-";
|
|
127
|
+
detection: string;
|
|
128
|
+
displayName: string;
|
|
129
|
+
filenamePattern: string;
|
|
130
|
+
extension: ".md" | ".toml";
|
|
131
|
+
type: "standard" | "universal";
|
|
132
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
133
|
+
rootDir?: string | undefined;
|
|
134
|
+
global?: boolean | undefined;
|
|
135
|
+
placeholder?: string | undefined;
|
|
136
|
+
}[];
|
|
137
|
+
$schema?: string | undefined;
|
|
138
|
+
}, {
|
|
139
|
+
version: string;
|
|
140
|
+
integrations: {
|
|
141
|
+
name: string;
|
|
142
|
+
directory: string;
|
|
143
|
+
separator: ":" | "-";
|
|
144
|
+
detection: string;
|
|
145
|
+
displayName: string;
|
|
146
|
+
filenamePattern: string;
|
|
147
|
+
extension: ".md" | ".toml";
|
|
148
|
+
type?: "standard" | "universal" | undefined;
|
|
149
|
+
specialAdapter?: "toml" | "doc-injection" | undefined;
|
|
150
|
+
rootDir?: string | undefined;
|
|
151
|
+
global?: boolean | undefined;
|
|
152
|
+
placeholder?: string | undefined;
|
|
153
|
+
}[];
|
|
154
|
+
$schema?: string | undefined;
|
|
155
|
+
}>;
|
|
156
|
+
/**
|
|
157
|
+
* Schema for user's .clavix/config.json
|
|
158
|
+
*/
|
|
159
|
+
export declare const UserConfigSchema: z.ZodObject<{
|
|
160
|
+
integrations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
161
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
integrations?: string[] | undefined;
|
|
164
|
+
providers?: string[] | undefined;
|
|
165
|
+
}, {
|
|
166
|
+
integrations?: string[] | undefined;
|
|
167
|
+
providers?: string[] | undefined;
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* Inferred TypeScript types from schemas
|
|
171
|
+
*/
|
|
172
|
+
export type IntegrationEntry = z.infer<typeof IntegrationEntrySchema>;
|
|
173
|
+
export type IntegrationsConfig = z.infer<typeof IntegrationsConfigSchema>;
|
|
174
|
+
export type UserConfig = z.infer<typeof UserConfigSchema>;
|
|
175
|
+
/**
|
|
176
|
+
* Validation result type
|
|
177
|
+
*/
|
|
178
|
+
export interface ValidationResult<T> {
|
|
179
|
+
success: boolean;
|
|
180
|
+
data?: T;
|
|
181
|
+
errors?: z.ZodError;
|
|
182
|
+
warnings?: string[];
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Validate integrations.json content (build-time, strict)
|
|
186
|
+
* @param content - Parsed JSON content from integrations.json
|
|
187
|
+
* @returns Validation result with parsed data or errors
|
|
188
|
+
*/
|
|
189
|
+
export declare function validateIntegrationsConfig(content: unknown): ValidationResult<IntegrationsConfig>;
|
|
190
|
+
/**
|
|
191
|
+
* Validate user config.json content (runtime, lenient)
|
|
192
|
+
* @param content - Parsed JSON content from .clavix/config.json
|
|
193
|
+
* @returns Validation result with parsed data or errors
|
|
194
|
+
*/
|
|
195
|
+
export declare function validateUserConfig(content: unknown): ValidationResult<UserConfig>;
|
|
196
|
+
/**
|
|
197
|
+
* Format Zod errors into human-readable messages
|
|
198
|
+
* @param errors - Zod validation errors
|
|
199
|
+
* @returns Array of formatted error messages
|
|
200
|
+
*/
|
|
201
|
+
export declare function formatZodErrors(errors: z.ZodError): string[];
|
|
202
|
+
//# sourceMappingURL=schemas.d.ts.map
|