@a3t/rapid-schema 0.1.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.
- package/dist/index.d.ts +154 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/rapid.schema.json +271 -0
- package/package.json +49 -0
- package/src/rapid.schema.json +271 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @a3t/rapid-schema
|
|
3
|
+
*
|
|
4
|
+
* JSON schema and TypeScript types for RAPID configuration.
|
|
5
|
+
* An open source project by A3T.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { default as schema } from './rapid.schema.json';
|
|
10
|
+
/**
|
|
11
|
+
* RAPID configuration file (rapid.json)
|
|
12
|
+
*/
|
|
13
|
+
export interface RapidConfig {
|
|
14
|
+
/** JSON schema URL for validation and IntelliSense */
|
|
15
|
+
$schema?: string;
|
|
16
|
+
/** RAPID configuration specification version */
|
|
17
|
+
version: '1.0';
|
|
18
|
+
/** Project name (defaults to directory name) */
|
|
19
|
+
name?: string;
|
|
20
|
+
/** Container lifecycle configuration */
|
|
21
|
+
container?: ContainerConfig;
|
|
22
|
+
/** Secret management configuration */
|
|
23
|
+
secrets?: SecretsConfig;
|
|
24
|
+
/** AI agent configuration */
|
|
25
|
+
agents: AgentsConfig;
|
|
26
|
+
/** Context file generation and management */
|
|
27
|
+
context?: ContextConfig;
|
|
28
|
+
/** Model Context Protocol server configuration */
|
|
29
|
+
mcp?: McpConfig;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Container lifecycle configuration
|
|
33
|
+
*/
|
|
34
|
+
export interface ContainerConfig {
|
|
35
|
+
/** Path to devcontainer.json (default: ".devcontainer/devcontainer.json") */
|
|
36
|
+
devcontainer?: string;
|
|
37
|
+
/** Docker Compose file (overrides devcontainer) */
|
|
38
|
+
compose?: string;
|
|
39
|
+
/** Start container automatically on rapid dev (default: true) */
|
|
40
|
+
autoStart?: boolean;
|
|
41
|
+
/** Additional Docker build arguments */
|
|
42
|
+
buildArgs?: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Secret management configuration
|
|
46
|
+
*/
|
|
47
|
+
export interface SecretsConfig {
|
|
48
|
+
/** Secret provider to use (default: "1password") */
|
|
49
|
+
provider?: '1password' | 'vault' | 'env';
|
|
50
|
+
/** Vault name (1Password) or path (HashiCorp) */
|
|
51
|
+
vault?: string;
|
|
52
|
+
/** Vault server address (HashiCorp Vault only) */
|
|
53
|
+
address?: string;
|
|
54
|
+
/** Map of environment variable names to secret references */
|
|
55
|
+
items?: Record<string, string>;
|
|
56
|
+
/** .envrc generation settings */
|
|
57
|
+
envrc?: EnvrcConfig;
|
|
58
|
+
/** .env file integration (discouraged) */
|
|
59
|
+
dotenv?: DotenvConfig;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* .envrc generation settings
|
|
63
|
+
*/
|
|
64
|
+
export interface EnvrcConfig {
|
|
65
|
+
/** Auto-generate .envrc from items (default: true) */
|
|
66
|
+
generate?: boolean;
|
|
67
|
+
/** Path to .envrc file (default: ".envrc") */
|
|
68
|
+
path?: string;
|
|
69
|
+
/** Source .envrc.local if present (default: true) */
|
|
70
|
+
includeLocal?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* .env file integration (discouraged)
|
|
74
|
+
*/
|
|
75
|
+
export interface DotenvConfig {
|
|
76
|
+
/** Enable .env file loading (default: false) */
|
|
77
|
+
enabled?: boolean;
|
|
78
|
+
/** .env files to load (default: [".env", ".env.local"]) */
|
|
79
|
+
files?: string[];
|
|
80
|
+
/** Show security warning when loading .env files (default: true) */
|
|
81
|
+
warn?: boolean;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* AI agent configuration
|
|
85
|
+
*/
|
|
86
|
+
export interface AgentsConfig {
|
|
87
|
+
/** Name of the default agent */
|
|
88
|
+
default: string;
|
|
89
|
+
/** Map of agent name to configuration */
|
|
90
|
+
available: Record<string, AgentDefinition>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Configuration for a single AI agent
|
|
94
|
+
*/
|
|
95
|
+
export interface AgentDefinition {
|
|
96
|
+
/** CLI command to execute */
|
|
97
|
+
cli: string;
|
|
98
|
+
/** Path to instruction file for this agent */
|
|
99
|
+
instructionFile?: string;
|
|
100
|
+
/** Required environment variables */
|
|
101
|
+
envVars?: string[];
|
|
102
|
+
/** Command to install the CLI tool */
|
|
103
|
+
installCmd?: string;
|
|
104
|
+
/** Additional CLI arguments */
|
|
105
|
+
args?: string[];
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Context file generation and management
|
|
109
|
+
*/
|
|
110
|
+
export interface ContextConfig {
|
|
111
|
+
/** Files to include in agent context (default: ["README.md"]) */
|
|
112
|
+
files?: string[];
|
|
113
|
+
/** Directories to include (default: ["docs/"]) */
|
|
114
|
+
dirs?: string[];
|
|
115
|
+
/** Patterns to exclude */
|
|
116
|
+
exclude?: string[];
|
|
117
|
+
/** Auto-generate AGENTS.md, CLAUDE.md (default: true) */
|
|
118
|
+
generateAgentFiles?: boolean;
|
|
119
|
+
/** Custom templates for agent files */
|
|
120
|
+
templateDir?: string;
|
|
121
|
+
/** Files to preserve from auto-updates */
|
|
122
|
+
preserve?: string[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Model Context Protocol server configuration
|
|
126
|
+
*/
|
|
127
|
+
export interface McpConfig {
|
|
128
|
+
/** Path to MCP config file (default: ".mcp.json") */
|
|
129
|
+
configFile?: string;
|
|
130
|
+
/** MCP server configurations */
|
|
131
|
+
servers?: Record<string, McpServerConfig>;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Configuration for a single MCP server
|
|
135
|
+
*/
|
|
136
|
+
export interface McpServerConfig {
|
|
137
|
+
/** Enable this MCP server (default: true) */
|
|
138
|
+
enabled?: boolean;
|
|
139
|
+
/** Additional server-specific configuration */
|
|
140
|
+
[key: string]: unknown;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Schema URL for use in rapid.json files
|
|
144
|
+
*/
|
|
145
|
+
export declare const SCHEMA_URL = "https://getrapid.dev/schema/v1/rapid.json";
|
|
146
|
+
/**
|
|
147
|
+
* Current schema version
|
|
148
|
+
*/
|
|
149
|
+
export declare const SCHEMA_VERSION = "1.0";
|
|
150
|
+
/**
|
|
151
|
+
* Default rapid.json configuration
|
|
152
|
+
*/
|
|
153
|
+
export declare const DEFAULT_CONFIG: RapidConfig;
|
|
154
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @a3t/rapid-schema
|
|
3
|
+
*
|
|
4
|
+
* JSON schema and TypeScript types for RAPID configuration.
|
|
5
|
+
* An open source project by A3T.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
// Re-export the JSON schema
|
|
10
|
+
export { default as schema } from './rapid.schema.json';
|
|
11
|
+
/**
|
|
12
|
+
* Schema URL for use in rapid.json files
|
|
13
|
+
*/
|
|
14
|
+
export const SCHEMA_URL = 'https://getrapid.dev/schema/v1/rapid.json';
|
|
15
|
+
/**
|
|
16
|
+
* Current schema version
|
|
17
|
+
*/
|
|
18
|
+
export const SCHEMA_VERSION = '1.0';
|
|
19
|
+
/**
|
|
20
|
+
* Default rapid.json configuration
|
|
21
|
+
*/
|
|
22
|
+
export const DEFAULT_CONFIG = {
|
|
23
|
+
version: '1.0',
|
|
24
|
+
agents: {
|
|
25
|
+
default: 'claude',
|
|
26
|
+
available: {
|
|
27
|
+
claude: {
|
|
28
|
+
cli: 'claude',
|
|
29
|
+
instructionFile: 'CLAUDE.md',
|
|
30
|
+
envVars: ['ANTHROPIC_API_KEY'],
|
|
31
|
+
installCmd: 'npm install -g @anthropic-ai/claude-code',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,4BAA4B;AAC5B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA+KxD;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,2CAA2C,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,CAAC;AAEpC;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,OAAO,EAAE,KAAK;IACd,MAAM,EAAE;QACN,OAAO,EAAE,QAAQ;QACjB,SAAS,EAAE;YACT,MAAM,EAAE;gBACN,GAAG,EAAE,QAAQ;gBACb,eAAe,EAAE,WAAW;gBAC5B,OAAO,EAAE,CAAC,mBAAmB,CAAC;gBAC9B,UAAU,EAAE,0CAA0C;aACvD;SACF;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://getrapid.dev/schema/v1/rapid.json",
|
|
4
|
+
"title": "RAPID Configuration",
|
|
5
|
+
"description": "Configuration file for RAPID - AI-assisted development with dev containers",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "agents"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "JSON schema URL for validation and IntelliSense"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["1.0"],
|
|
16
|
+
"description": "RAPID configuration specification version"
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Project name (defaults to directory name)"
|
|
21
|
+
},
|
|
22
|
+
"container": {
|
|
23
|
+
"$ref": "#/definitions/ContainerConfig"
|
|
24
|
+
},
|
|
25
|
+
"secrets": {
|
|
26
|
+
"$ref": "#/definitions/SecretsConfig"
|
|
27
|
+
},
|
|
28
|
+
"agents": {
|
|
29
|
+
"$ref": "#/definitions/AgentsConfig"
|
|
30
|
+
},
|
|
31
|
+
"context": {
|
|
32
|
+
"$ref": "#/definitions/ContextConfig"
|
|
33
|
+
},
|
|
34
|
+
"mcp": {
|
|
35
|
+
"$ref": "#/definitions/McpConfig"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"definitions": {
|
|
39
|
+
"ContainerConfig": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"description": "Container lifecycle configuration",
|
|
42
|
+
"properties": {
|
|
43
|
+
"devcontainer": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"default": ".devcontainer/devcontainer.json",
|
|
46
|
+
"description": "Path to devcontainer.json"
|
|
47
|
+
},
|
|
48
|
+
"compose": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Docker Compose file (overrides devcontainer)"
|
|
51
|
+
},
|
|
52
|
+
"autoStart": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": true,
|
|
55
|
+
"description": "Start container automatically on rapid dev"
|
|
56
|
+
},
|
|
57
|
+
"buildArgs": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"description": "Additional Docker build arguments"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"SecretsConfig": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"description": "Secret management configuration",
|
|
69
|
+
"properties": {
|
|
70
|
+
"provider": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": ["1password", "vault", "env"],
|
|
73
|
+
"default": "1password",
|
|
74
|
+
"description": "Secret provider to use"
|
|
75
|
+
},
|
|
76
|
+
"vault": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Vault name (1Password) or path (HashiCorp)"
|
|
79
|
+
},
|
|
80
|
+
"address": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Vault server address (HashiCorp Vault only)"
|
|
83
|
+
},
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"description": "Map of environment variable names to secret references"
|
|
90
|
+
},
|
|
91
|
+
"envrc": {
|
|
92
|
+
"$ref": "#/definitions/EnvrcConfig"
|
|
93
|
+
},
|
|
94
|
+
"dotenv": {
|
|
95
|
+
"$ref": "#/definitions/DotenvConfig"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"EnvrcConfig": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": ".envrc generation settings",
|
|
102
|
+
"properties": {
|
|
103
|
+
"generate": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"default": true,
|
|
106
|
+
"description": "Auto-generate .envrc from items"
|
|
107
|
+
},
|
|
108
|
+
"path": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"default": ".envrc",
|
|
111
|
+
"description": "Path to .envrc file"
|
|
112
|
+
},
|
|
113
|
+
"includeLocal": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"default": true,
|
|
116
|
+
"description": "Source .envrc.local if present"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"DotenvConfig": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"description": ".env file integration (discouraged)",
|
|
123
|
+
"properties": {
|
|
124
|
+
"enabled": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": false,
|
|
127
|
+
"description": "Enable .env file loading"
|
|
128
|
+
},
|
|
129
|
+
"files": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"default": [".env", ".env.local"],
|
|
135
|
+
"description": ".env files to load"
|
|
136
|
+
},
|
|
137
|
+
"warn": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"default": true,
|
|
140
|
+
"description": "Show security warning when loading .env files"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"AgentsConfig": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"description": "AI agent configuration",
|
|
147
|
+
"required": ["default", "available"],
|
|
148
|
+
"properties": {
|
|
149
|
+
"default": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Name of the default agent"
|
|
152
|
+
},
|
|
153
|
+
"available": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": {
|
|
156
|
+
"$ref": "#/definitions/AgentDefinition"
|
|
157
|
+
},
|
|
158
|
+
"description": "Map of agent name to configuration"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"AgentDefinition": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "Configuration for a single AI agent",
|
|
165
|
+
"required": ["cli"],
|
|
166
|
+
"properties": {
|
|
167
|
+
"cli": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "CLI command to execute"
|
|
170
|
+
},
|
|
171
|
+
"instructionFile": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"description": "Path to instruction file for this agent"
|
|
174
|
+
},
|
|
175
|
+
"envVars": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"description": "Required environment variables"
|
|
181
|
+
},
|
|
182
|
+
"installCmd": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Command to install the CLI tool"
|
|
185
|
+
},
|
|
186
|
+
"args": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"description": "Additional CLI arguments"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"ContextConfig": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"description": "Context file generation and management",
|
|
198
|
+
"properties": {
|
|
199
|
+
"files": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"default": ["README.md"],
|
|
205
|
+
"description": "Files to include in agent context"
|
|
206
|
+
},
|
|
207
|
+
"dirs": {
|
|
208
|
+
"type": "array",
|
|
209
|
+
"items": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"default": ["docs/"],
|
|
213
|
+
"description": "Directories to include"
|
|
214
|
+
},
|
|
215
|
+
"exclude": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"description": "Patterns to exclude"
|
|
221
|
+
},
|
|
222
|
+
"generateAgentFiles": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"default": true,
|
|
225
|
+
"description": "Auto-generate AGENTS.md, CLAUDE.md"
|
|
226
|
+
},
|
|
227
|
+
"templateDir": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Custom templates for agent files"
|
|
230
|
+
},
|
|
231
|
+
"preserve": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"description": "Files to preserve from auto-updates"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"McpConfig": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"description": "Model Context Protocol server configuration",
|
|
243
|
+
"properties": {
|
|
244
|
+
"configFile": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"default": ".mcp.json",
|
|
247
|
+
"description": "Path to MCP config file"
|
|
248
|
+
},
|
|
249
|
+
"servers": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"additionalProperties": {
|
|
252
|
+
"$ref": "#/definitions/McpServerConfig"
|
|
253
|
+
},
|
|
254
|
+
"description": "MCP server configurations"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"McpServerConfig": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"description": "Configuration for a single MCP server",
|
|
261
|
+
"properties": {
|
|
262
|
+
"enabled": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"default": true,
|
|
265
|
+
"description": "Enable this MCP server"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"additionalProperties": true
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@a3t/rapid-schema",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JSON schema and TypeScript types for RAPID configuration",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Steve Rude <steve@rude.la>",
|
|
7
|
+
"homepage": "https://getrapid.dev",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/a3tai/rapid.git",
|
|
11
|
+
"directory": "packages/schema"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"rapid",
|
|
15
|
+
"ai",
|
|
16
|
+
"devcontainer",
|
|
17
|
+
"schema",
|
|
18
|
+
"json-schema",
|
|
19
|
+
"typescript"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"import": "./dist/index.js"
|
|
26
|
+
},
|
|
27
|
+
"./schema": {
|
|
28
|
+
"import": "./src/rapid.schema.json"
|
|
29
|
+
},
|
|
30
|
+
"./rapid.schema.json": "./src/rapid.schema.json"
|
|
31
|
+
},
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"files": [
|
|
35
|
+
"dist",
|
|
36
|
+
"src/rapid.schema.json"
|
|
37
|
+
],
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "^5.9.3",
|
|
40
|
+
"vitest": "^3.0.5"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc",
|
|
44
|
+
"dev": "tsc --watch",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
46
|
+
"test": "echo 'No tests yet'",
|
|
47
|
+
"clean": "rm -rf dist .turbo"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://getrapid.dev/schema/v1/rapid.json",
|
|
4
|
+
"title": "RAPID Configuration",
|
|
5
|
+
"description": "Configuration file for RAPID - AI-assisted development with dev containers",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "agents"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "JSON schema URL for validation and IntelliSense"
|
|
12
|
+
},
|
|
13
|
+
"version": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"enum": ["1.0"],
|
|
16
|
+
"description": "RAPID configuration specification version"
|
|
17
|
+
},
|
|
18
|
+
"name": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Project name (defaults to directory name)"
|
|
21
|
+
},
|
|
22
|
+
"container": {
|
|
23
|
+
"$ref": "#/definitions/ContainerConfig"
|
|
24
|
+
},
|
|
25
|
+
"secrets": {
|
|
26
|
+
"$ref": "#/definitions/SecretsConfig"
|
|
27
|
+
},
|
|
28
|
+
"agents": {
|
|
29
|
+
"$ref": "#/definitions/AgentsConfig"
|
|
30
|
+
},
|
|
31
|
+
"context": {
|
|
32
|
+
"$ref": "#/definitions/ContextConfig"
|
|
33
|
+
},
|
|
34
|
+
"mcp": {
|
|
35
|
+
"$ref": "#/definitions/McpConfig"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"definitions": {
|
|
39
|
+
"ContainerConfig": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"description": "Container lifecycle configuration",
|
|
42
|
+
"properties": {
|
|
43
|
+
"devcontainer": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"default": ".devcontainer/devcontainer.json",
|
|
46
|
+
"description": "Path to devcontainer.json"
|
|
47
|
+
},
|
|
48
|
+
"compose": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "Docker Compose file (overrides devcontainer)"
|
|
51
|
+
},
|
|
52
|
+
"autoStart": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": true,
|
|
55
|
+
"description": "Start container automatically on rapid dev"
|
|
56
|
+
},
|
|
57
|
+
"buildArgs": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"description": "Additional Docker build arguments"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"SecretsConfig": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"description": "Secret management configuration",
|
|
69
|
+
"properties": {
|
|
70
|
+
"provider": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"enum": ["1password", "vault", "env"],
|
|
73
|
+
"default": "1password",
|
|
74
|
+
"description": "Secret provider to use"
|
|
75
|
+
},
|
|
76
|
+
"vault": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Vault name (1Password) or path (HashiCorp)"
|
|
79
|
+
},
|
|
80
|
+
"address": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Vault server address (HashiCorp Vault only)"
|
|
83
|
+
},
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"description": "Map of environment variable names to secret references"
|
|
90
|
+
},
|
|
91
|
+
"envrc": {
|
|
92
|
+
"$ref": "#/definitions/EnvrcConfig"
|
|
93
|
+
},
|
|
94
|
+
"dotenv": {
|
|
95
|
+
"$ref": "#/definitions/DotenvConfig"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"EnvrcConfig": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"description": ".envrc generation settings",
|
|
102
|
+
"properties": {
|
|
103
|
+
"generate": {
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"default": true,
|
|
106
|
+
"description": "Auto-generate .envrc from items"
|
|
107
|
+
},
|
|
108
|
+
"path": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"default": ".envrc",
|
|
111
|
+
"description": "Path to .envrc file"
|
|
112
|
+
},
|
|
113
|
+
"includeLocal": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"default": true,
|
|
116
|
+
"description": "Source .envrc.local if present"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"DotenvConfig": {
|
|
121
|
+
"type": "object",
|
|
122
|
+
"description": ".env file integration (discouraged)",
|
|
123
|
+
"properties": {
|
|
124
|
+
"enabled": {
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": false,
|
|
127
|
+
"description": "Enable .env file loading"
|
|
128
|
+
},
|
|
129
|
+
"files": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
"default": [".env", ".env.local"],
|
|
135
|
+
"description": ".env files to load"
|
|
136
|
+
},
|
|
137
|
+
"warn": {
|
|
138
|
+
"type": "boolean",
|
|
139
|
+
"default": true,
|
|
140
|
+
"description": "Show security warning when loading .env files"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"AgentsConfig": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"description": "AI agent configuration",
|
|
147
|
+
"required": ["default", "available"],
|
|
148
|
+
"properties": {
|
|
149
|
+
"default": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Name of the default agent"
|
|
152
|
+
},
|
|
153
|
+
"available": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"additionalProperties": {
|
|
156
|
+
"$ref": "#/definitions/AgentDefinition"
|
|
157
|
+
},
|
|
158
|
+
"description": "Map of agent name to configuration"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"AgentDefinition": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "Configuration for a single AI agent",
|
|
165
|
+
"required": ["cli"],
|
|
166
|
+
"properties": {
|
|
167
|
+
"cli": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"description": "CLI command to execute"
|
|
170
|
+
},
|
|
171
|
+
"instructionFile": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"description": "Path to instruction file for this agent"
|
|
174
|
+
},
|
|
175
|
+
"envVars": {
|
|
176
|
+
"type": "array",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "string"
|
|
179
|
+
},
|
|
180
|
+
"description": "Required environment variables"
|
|
181
|
+
},
|
|
182
|
+
"installCmd": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"description": "Command to install the CLI tool"
|
|
185
|
+
},
|
|
186
|
+
"args": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"description": "Additional CLI arguments"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"ContextConfig": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"description": "Context file generation and management",
|
|
198
|
+
"properties": {
|
|
199
|
+
"files": {
|
|
200
|
+
"type": "array",
|
|
201
|
+
"items": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"default": ["README.md"],
|
|
205
|
+
"description": "Files to include in agent context"
|
|
206
|
+
},
|
|
207
|
+
"dirs": {
|
|
208
|
+
"type": "array",
|
|
209
|
+
"items": {
|
|
210
|
+
"type": "string"
|
|
211
|
+
},
|
|
212
|
+
"default": ["docs/"],
|
|
213
|
+
"description": "Directories to include"
|
|
214
|
+
},
|
|
215
|
+
"exclude": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "string"
|
|
219
|
+
},
|
|
220
|
+
"description": "Patterns to exclude"
|
|
221
|
+
},
|
|
222
|
+
"generateAgentFiles": {
|
|
223
|
+
"type": "boolean",
|
|
224
|
+
"default": true,
|
|
225
|
+
"description": "Auto-generate AGENTS.md, CLAUDE.md"
|
|
226
|
+
},
|
|
227
|
+
"templateDir": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Custom templates for agent files"
|
|
230
|
+
},
|
|
231
|
+
"preserve": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
},
|
|
236
|
+
"description": "Files to preserve from auto-updates"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
"McpConfig": {
|
|
241
|
+
"type": "object",
|
|
242
|
+
"description": "Model Context Protocol server configuration",
|
|
243
|
+
"properties": {
|
|
244
|
+
"configFile": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"default": ".mcp.json",
|
|
247
|
+
"description": "Path to MCP config file"
|
|
248
|
+
},
|
|
249
|
+
"servers": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"additionalProperties": {
|
|
252
|
+
"$ref": "#/definitions/McpServerConfig"
|
|
253
|
+
},
|
|
254
|
+
"description": "MCP server configurations"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"McpServerConfig": {
|
|
259
|
+
"type": "object",
|
|
260
|
+
"description": "Configuration for a single MCP server",
|
|
261
|
+
"properties": {
|
|
262
|
+
"enabled": {
|
|
263
|
+
"type": "boolean",
|
|
264
|
+
"default": true,
|
|
265
|
+
"description": "Enable this MCP server"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"additionalProperties": true
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|