@sowonai/crewx-sdk 0.6.0-rc.1 → 0.6.0-rc.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sowonai/crewx-sdk",
3
- "version": "0.6.0-rc.1",
3
+ "version": "0.6.0-rc.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "SowonAI CrewX SDK",
6
6
  "type": "commonjs",
@@ -9,6 +9,7 @@
9
9
  "types": "dist/index.d.ts",
10
10
  "files": [
11
11
  "dist",
12
+ "schema",
12
13
  "README.md",
13
14
  "LICENSE"
14
15
  ],
@@ -0,0 +1,138 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://crewx.ai/schemas/api-provider-config.json",
4
+ "title": "CrewX API Provider Configuration",
5
+ "description": "API provider configuration for CrewX agents (OpenAI, Anthropic, Google, Bedrock, LiteLLM, Ollama, SowonAI)",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["provider", "model"],
9
+ "properties": {
10
+ "provider": {
11
+ "type": "string",
12
+ "enum": [
13
+ "api/openai",
14
+ "api/anthropic",
15
+ "api/google",
16
+ "api/bedrock",
17
+ "api/litellm",
18
+ "api/ollama",
19
+ "api/sowonai"
20
+ ],
21
+ "description": "API provider identifier"
22
+ },
23
+ "url": {
24
+ "type": "string",
25
+ "format": "uri",
26
+ "description": "API base URL (e.g., https://api.openai.com/v1, http://localhost:4000)"
27
+ },
28
+ "apiKey": {
29
+ "type": "string",
30
+ "description": "API key (optional, can use environment variables via {{env.VAR}} template)"
31
+ },
32
+ "model": {
33
+ "type": "string",
34
+ "description": "Model identifier understood by the provider (e.g., gpt-4o, claude-3-5-sonnet-20241022)"
35
+ },
36
+ "temperature": {
37
+ "type": "number",
38
+ "minimum": 0,
39
+ "maximum": 2,
40
+ "default": 0.7,
41
+ "description": "Sampling temperature applied to API calls"
42
+ },
43
+ "maxTokens": {
44
+ "type": "integer",
45
+ "minimum": 1,
46
+ "description": "Maximum completion tokens"
47
+ },
48
+ "options": {
49
+ "type": "object",
50
+ "description": "Mode-specific permissions. Define tools/MCP servers per execution mode (query/execute).",
51
+ "properties": {
52
+ "query": {
53
+ "$ref": "#/$defs/providerModeOptions"
54
+ },
55
+ "execute": {
56
+ "$ref": "#/$defs/providerModeOptions"
57
+ }
58
+ },
59
+ "additionalProperties": {
60
+ "$ref": "#/$defs/providerModeOptions"
61
+ }
62
+ },
63
+ "tools": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "string"
67
+ },
68
+ "uniqueItems": true,
69
+ "description": "Legacy root-level tool list (SowonFlow style). Prefer options.<mode>.tools instead."
70
+ },
71
+ "mcp": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "string"
75
+ },
76
+ "uniqueItems": true,
77
+ "description": "Legacy root-level MCP reference list. Prefer options.<mode>.mcp instead."
78
+ },
79
+ "mcp_servers": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "string"
83
+ },
84
+ "uniqueItems": true,
85
+ "description": "Legacy alias for MCP references (mirrors SowonFlow snake_case). Prefer options.<mode>.mcp instead."
86
+ }
87
+ },
88
+ "$defs": {
89
+ "providerModeOptions": {
90
+ "type": "object",
91
+ "description": "Mode-specific permissions for tools and MCP servers",
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "tools": {
95
+ "type": "array",
96
+ "items": {
97
+ "type": "string"
98
+ },
99
+ "uniqueItems": true,
100
+ "description": "Tool names enabled in this mode"
101
+ },
102
+ "mcp": {
103
+ "type": "array",
104
+ "items": {
105
+ "type": "string"
106
+ },
107
+ "uniqueItems": true,
108
+ "description": "MCP server references enabled in this mode"
109
+ }
110
+ }
111
+ },
112
+ "mcpServerConfig": {
113
+ "type": "object",
114
+ "description": "Model Context Protocol server process definition",
115
+ "required": ["command", "args"],
116
+ "properties": {
117
+ "command": {
118
+ "type": "string",
119
+ "description": "Executable to launch the MCP server (e.g., npx, node)"
120
+ },
121
+ "args": {
122
+ "type": "array",
123
+ "items": {
124
+ "type": "string"
125
+ },
126
+ "description": "Arguments passed to the command"
127
+ },
128
+ "env": {
129
+ "type": "object",
130
+ "additionalProperties": {
131
+ "type": "string"
132
+ },
133
+ "description": "Environment variables injected when spawning the server (supports {{env.VAR}} template)"
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
@@ -0,0 +1,224 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://crewx.ai/schemas/crewx-config.json",
4
+ "title": "CrewX Configuration",
5
+ "description": "Complete CrewX configuration including agents, MCP servers, tools, and global variables.",
6
+ "type": "object",
7
+ "properties": {
8
+ "vars": {
9
+ "type": "object",
10
+ "description": "Global variables accessible in templates as {{vars.key}} and in tool execution context",
11
+ "additionalProperties": true
12
+ },
13
+ "mcp_servers": {
14
+ "type": "object",
15
+ "description": "Model Context Protocol server definitions",
16
+ "additionalProperties": {
17
+ "$ref": "#/$defs/mcpServerConfig"
18
+ }
19
+ },
20
+ "agents": {
21
+ "type": "array",
22
+ "description": "Agent definitions",
23
+ "items": {
24
+ "$ref": "#/$defs/agentConfig"
25
+ }
26
+ }
27
+ },
28
+ "$defs": {
29
+ "agentConfig": {
30
+ "type": "object",
31
+ "required": ["id"],
32
+ "properties": {
33
+ "id": {
34
+ "type": "string",
35
+ "description": "Unique agent identifier"
36
+ },
37
+ "name": {
38
+ "type": "string",
39
+ "description": "Human-readable agent name"
40
+ },
41
+ "provider": {
42
+ "type": "string",
43
+ "description": "Provider identifier (cli/claude, api/openai, etc.)",
44
+ "pattern": "^(cli|api)/[a-z0-9-]+$"
45
+ },
46
+ "inline": {
47
+ "type": "object",
48
+ "description": "Inline provider configuration",
49
+ "properties": {
50
+ "model": {
51
+ "type": "string",
52
+ "description": "Model identifier"
53
+ },
54
+ "provider": {
55
+ "type": "string",
56
+ "enum": [
57
+ "api/openai",
58
+ "api/anthropic",
59
+ "api/google",
60
+ "api/bedrock",
61
+ "api/litellm",
62
+ "api/ollama",
63
+ "api/sowonai",
64
+ "cli/claude",
65
+ "cli/gemini",
66
+ "cli/copilot",
67
+ "cli/codex"
68
+ ],
69
+ "description": "Provider type for inline configuration"
70
+ },
71
+ "url": {
72
+ "type": "string",
73
+ "format": "uri",
74
+ "description": "API base URL (for API providers)"
75
+ },
76
+ "apiKey": {
77
+ "type": "string",
78
+ "description": "API key (supports {{env.VAR}} template)"
79
+ },
80
+ "temperature": {
81
+ "type": "number",
82
+ "minimum": 0,
83
+ "maximum": 2,
84
+ "default": 0.7,
85
+ "description": "Sampling temperature"
86
+ },
87
+ "maxTokens": {
88
+ "type": "integer",
89
+ "minimum": 1,
90
+ "description": "Maximum completion tokens"
91
+ },
92
+ "prompt": {
93
+ "type": "string",
94
+ "description": "Agent system prompt (supports templates)"
95
+ }
96
+ }
97
+ },
98
+ "url": {
99
+ "type": "string",
100
+ "format": "uri",
101
+ "description": "API base URL (shorthand for inline.url)"
102
+ },
103
+ "apiKey": {
104
+ "type": "string",
105
+ "description": "API key (shorthand for inline.apiKey, supports {{env.VAR}} template)"
106
+ },
107
+ "model": {
108
+ "type": "string",
109
+ "description": "Model identifier (shorthand for inline.model)"
110
+ },
111
+ "temperature": {
112
+ "type": "number",
113
+ "minimum": 0,
114
+ "maximum": 2,
115
+ "description": "Sampling temperature (shorthand for inline.temperature)"
116
+ },
117
+ "maxTokens": {
118
+ "type": "integer",
119
+ "minimum": 1,
120
+ "description": "Maximum completion tokens (shorthand for inline.maxTokens)"
121
+ },
122
+ "prompt": {
123
+ "type": "string",
124
+ "description": "Agent system prompt (shorthand for inline.prompt, supports templates)"
125
+ },
126
+ "tools": {
127
+ "oneOf": [
128
+ {
129
+ "type": "array",
130
+ "description": "Simple array of tool names (SowonFlow style)",
131
+ "items": {
132
+ "type": "string"
133
+ },
134
+ "uniqueItems": true
135
+ },
136
+ {
137
+ "type": "object",
138
+ "description": "Include/exclude pattern for tool activation",
139
+ "properties": {
140
+ "include": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "string"
144
+ },
145
+ "uniqueItems": true,
146
+ "description": "Tool names to include"
147
+ },
148
+ "exclude": {
149
+ "type": "array",
150
+ "items": {
151
+ "type": "string"
152
+ },
153
+ "uniqueItems": true,
154
+ "description": "Tool names to exclude"
155
+ }
156
+ }
157
+ }
158
+ ],
159
+ "description": "Tool activation configuration"
160
+ },
161
+ "mcp": {
162
+ "oneOf": [
163
+ {
164
+ "type": "array",
165
+ "description": "Simple array of MCP server names (SowonFlow style)",
166
+ "items": {
167
+ "type": "string"
168
+ },
169
+ "uniqueItems": true
170
+ },
171
+ {
172
+ "type": "object",
173
+ "description": "Include/exclude pattern for MCP server activation",
174
+ "properties": {
175
+ "include": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "string"
179
+ },
180
+ "uniqueItems": true,
181
+ "description": "MCP server names to include"
182
+ },
183
+ "exclude": {
184
+ "type": "array",
185
+ "items": {
186
+ "type": "string"
187
+ },
188
+ "uniqueItems": true,
189
+ "description": "MCP server names to exclude"
190
+ }
191
+ }
192
+ }
193
+ ],
194
+ "description": "MCP server activation configuration"
195
+ }
196
+ }
197
+ },
198
+ "mcpServerConfig": {
199
+ "type": "object",
200
+ "description": "Model Context Protocol server process definition",
201
+ "required": ["command", "args"],
202
+ "properties": {
203
+ "command": {
204
+ "type": "string",
205
+ "description": "Executable to launch the MCP server (e.g., npx, node)"
206
+ },
207
+ "args": {
208
+ "type": "array",
209
+ "items": {
210
+ "type": "string"
211
+ },
212
+ "description": "Arguments passed to the command"
213
+ },
214
+ "env": {
215
+ "type": "object",
216
+ "additionalProperties": {
217
+ "type": "string"
218
+ },
219
+ "description": "Environment variables (supports {{env.VAR}} template)"
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
@@ -0,0 +1,306 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://crewx.dev/schemas/skills-config.json",
4
+ "title": "CrewX Skills Configuration Schema",
5
+ "description": "JSON Schema for CrewX skills and agent configuration with Claude skills.md integration",
6
+ "type": "object",
7
+ "definitions": {
8
+ "skillMetadata": {
9
+ "type": "object",
10
+ "description": "Claude skill metadata from skills.md frontmatter",
11
+ "required": ["name", "description", "version"],
12
+ "properties": {
13
+ "name": {
14
+ "type": "string",
15
+ "pattern": "^[a-z0-9-]+$",
16
+ "maxLength": 50,
17
+ "description": "Skill identifier in kebab-case"
18
+ },
19
+ "description": {
20
+ "type": "string",
21
+ "minLength": 10,
22
+ "maxLength": 200,
23
+ "description": "Short description of the skill"
24
+ },
25
+ "version": {
26
+ "type": "string",
27
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
28
+ "description": "Semantic version (e.g., 1.0.0)"
29
+ },
30
+ "dependencies": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "string",
34
+ "pattern": "^[a-z0-9-]+(@\\d+\\.\\d+\\.\\d+)?$"
35
+ },
36
+ "description": "Array of dependent skills (name or name@version)"
37
+ },
38
+ "runtime": {
39
+ "type": "object",
40
+ "properties": {
41
+ "python": { "type": "string" },
42
+ "node": { "type": "string" }
43
+ },
44
+ "additionalProperties": { "type": "string" },
45
+ "description": "Runtime requirements"
46
+ },
47
+ "visibility": {
48
+ "type": "string",
49
+ "enum": ["public", "private", "internal"],
50
+ "description": "Visibility level"
51
+ }
52
+ },
53
+ "additionalProperties": true
54
+ },
55
+ "skillsConfig": {
56
+ "type": "object",
57
+ "description": "Skills configuration for agents",
58
+ "properties": {
59
+ "paths": {
60
+ "type": "array",
61
+ "items": { "type": "string" },
62
+ "description": "Custom skill directories to search (project-level only)"
63
+ },
64
+ "include": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "string",
68
+ "pattern": "^[a-z0-9-]+$"
69
+ },
70
+ "description": "Explicitly include these skills"
71
+ },
72
+ "exclude": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string",
76
+ "pattern": "^[a-z0-9-]+$"
77
+ },
78
+ "description": "Explicitly exclude these skills"
79
+ },
80
+ "autoload": {
81
+ "type": "boolean",
82
+ "default": true,
83
+ "description": "Auto-load all skills from paths"
84
+ }
85
+ },
86
+ "additionalProperties": false
87
+ },
88
+ "inlineConfig": {
89
+ "type": "object",
90
+ "description": "Inline agent configuration",
91
+ "properties": {
92
+ "type": {
93
+ "type": "string",
94
+ "const": "agent"
95
+ },
96
+ "model": {
97
+ "type": "string",
98
+ "description": "Default AI model"
99
+ },
100
+ "system_prompt": {
101
+ "type": "string",
102
+ "description": "System prompt for the agent"
103
+ },
104
+ "prompt": {
105
+ "type": "string",
106
+ "description": "Alternative to system_prompt"
107
+ },
108
+ "layout": {
109
+ "oneOf": [
110
+ { "type": "string" },
111
+ {
112
+ "type": "object",
113
+ "required": ["id"],
114
+ "properties": {
115
+ "id": { "type": "string" },
116
+ "props": { "type": "object" }
117
+ }
118
+ }
119
+ ],
120
+ "description": "Layout reference"
121
+ },
122
+ "version": {
123
+ "type": "string",
124
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
125
+ "description": "Agent/skill version"
126
+ },
127
+ "dependencies": {
128
+ "type": "array",
129
+ "items": { "type": "string" },
130
+ "description": "Required skills for this agent"
131
+ },
132
+ "documents": {
133
+ "type": "object",
134
+ "additionalProperties": { "type": "string" },
135
+ "description": "Agent-specific documents"
136
+ }
137
+ },
138
+ "additionalProperties": true
139
+ },
140
+ "optionsConfig": {
141
+ "type": "object",
142
+ "description": "CLI options configuration",
143
+ "properties": {
144
+ "query": {
145
+ "oneOf": [
146
+ {
147
+ "type": "array",
148
+ "items": { "type": "string" }
149
+ },
150
+ {
151
+ "type": "object",
152
+ "additionalProperties": {
153
+ "type": "array",
154
+ "items": { "type": "string" }
155
+ }
156
+ }
157
+ ],
158
+ "description": "Read-only query mode options"
159
+ },
160
+ "execute": {
161
+ "oneOf": [
162
+ {
163
+ "type": "array",
164
+ "items": { "type": "string" }
165
+ },
166
+ {
167
+ "type": "object",
168
+ "additionalProperties": {
169
+ "type": "array",
170
+ "items": { "type": "string" }
171
+ }
172
+ }
173
+ ],
174
+ "description": "Execute mode options (file modification)"
175
+ }
176
+ },
177
+ "additionalProperties": false
178
+ },
179
+ "remoteConfig": {
180
+ "type": "object",
181
+ "description": "Remote agent configuration",
182
+ "required": ["type", "url"],
183
+ "properties": {
184
+ "type": { "type": "string" },
185
+ "url": { "type": "string", "format": "uri" },
186
+ "apiKey": { "type": "string" },
187
+ "agentId": { "type": "string" },
188
+ "timeoutMs": { "type": "number", "minimum": 0 }
189
+ },
190
+ "additionalProperties": true
191
+ },
192
+ "agentDefinition": {
193
+ "type": "object",
194
+ "description": "Agent definition with skills support",
195
+ "required": ["id", "provider"],
196
+ "properties": {
197
+ "id": {
198
+ "type": "string",
199
+ "pattern": "^[a-zA-Z0-9_-]+$",
200
+ "description": "Agent identifier"
201
+ },
202
+ "name": {
203
+ "type": "string",
204
+ "description": "Display name"
205
+ },
206
+ "role": {
207
+ "type": "string",
208
+ "description": "Agent role"
209
+ },
210
+ "team": {
211
+ "type": "string",
212
+ "description": "Team name"
213
+ },
214
+ "provider": {
215
+ "oneOf": [
216
+ { "type": "string" },
217
+ {
218
+ "type": "array",
219
+ "items": { "type": "string" },
220
+ "minItems": 1
221
+ }
222
+ ],
223
+ "description": "AI provider or array of providers for fallback"
224
+ },
225
+ "working_directory": {
226
+ "type": "string",
227
+ "description": "Working directory path"
228
+ },
229
+ "description": {
230
+ "type": "string",
231
+ "description": "Agent description"
232
+ },
233
+ "specialties": {
234
+ "type": "array",
235
+ "items": { "type": "string" },
236
+ "description": "Agent specialties"
237
+ },
238
+ "capabilities": {
239
+ "type": "array",
240
+ "items": { "type": "string" },
241
+ "description": "Agent capabilities"
242
+ },
243
+ "skills": {
244
+ "$ref": "#/definitions/skillsConfig",
245
+ "description": "Skills configuration for this agent"
246
+ },
247
+ "inline": {
248
+ "$ref": "#/definitions/inlineConfig",
249
+ "description": "Inline agent configuration"
250
+ },
251
+ "options": {
252
+ "$ref": "#/definitions/optionsConfig",
253
+ "description": "CLI options"
254
+ },
255
+ "remote": {
256
+ "$ref": "#/definitions/remoteConfig",
257
+ "description": "Remote agent configuration"
258
+ }
259
+ },
260
+ "additionalProperties": true
261
+ }
262
+ },
263
+ "properties": {
264
+ "skills_paths": {
265
+ "type": "array",
266
+ "items": { "type": "string" },
267
+ "description": "[DEPRECATED] Use skills.paths instead. Global skill directories to search"
268
+ },
269
+ "skills": {
270
+ "$ref": "#/definitions/skillsConfig",
271
+ "description": "Project-wide skills configuration"
272
+ },
273
+ "layouts": {
274
+ "type": "object",
275
+ "additionalProperties": { "type": "string" },
276
+ "description": "Layout definitions"
277
+ },
278
+ "documents": {
279
+ "type": "object",
280
+ "additionalProperties": { "type": "string" },
281
+ "description": "Document definitions"
282
+ },
283
+ "settings": {
284
+ "type": "object",
285
+ "properties": {
286
+ "slack": {
287
+ "type": "object",
288
+ "properties": {
289
+ "log_conversations": { "type": "boolean" }
290
+ },
291
+ "additionalProperties": true
292
+ }
293
+ },
294
+ "additionalProperties": true,
295
+ "description": "Project settings"
296
+ },
297
+ "agents": {
298
+ "type": "array",
299
+ "items": {
300
+ "$ref": "#/definitions/agentDefinition"
301
+ },
302
+ "description": "Agent definitions"
303
+ }
304
+ },
305
+ "additionalProperties": true
306
+ }