@symplek/cli 0.0.0-stage → 0.2.0-beta.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 (75) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/LICENSE +21 -0
  3. package/README.md +74 -2
  4. package/bin/symplek.js +5 -0
  5. package/dist/cli.d.ts +3 -0
  6. package/dist/cli.d.ts.map +1 -0
  7. package/dist/cli.js +44 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/commands/add.d.ts +36 -0
  10. package/dist/commands/add.d.ts.map +1 -0
  11. package/dist/commands/add.js +467 -0
  12. package/dist/commands/add.js.map +1 -0
  13. package/dist/commands/generate.d.ts +26 -0
  14. package/dist/commands/generate.d.ts.map +1 -0
  15. package/dist/commands/generate.js +491 -0
  16. package/dist/commands/generate.js.map +1 -0
  17. package/dist/commands/init.d.ts +46 -0
  18. package/dist/commands/init.d.ts.map +1 -0
  19. package/dist/commands/init.js +350 -0
  20. package/dist/commands/init.js.map +1 -0
  21. package/dist/commands/migrate.d.ts +41 -0
  22. package/dist/commands/migrate.d.ts.map +1 -0
  23. package/dist/commands/migrate.js +518 -0
  24. package/dist/commands/migrate.js.map +1 -0
  25. package/dist/commands/validate.d.ts +252 -0
  26. package/dist/commands/validate.d.ts.map +1 -0
  27. package/dist/commands/validate.js +515 -0
  28. package/dist/commands/validate.js.map +1 -0
  29. package/dist/index.d.ts +7 -0
  30. package/dist/index.d.ts.map +1 -0
  31. package/dist/index.js +46 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/models.d.ts +24 -0
  34. package/dist/models.d.ts.map +1 -0
  35. package/dist/models.js +39 -0
  36. package/dist/models.js.map +1 -0
  37. package/dist/naming.d.ts +20 -0
  38. package/dist/naming.d.ts.map +1 -0
  39. package/dist/naming.js +48 -0
  40. package/dist/naming.js.map +1 -0
  41. package/dist/templates/agent/agent.ts.template +41 -0
  42. package/dist/templates/agent/general.yaml.template +34 -0
  43. package/dist/templates/agent/researcher.yaml.template +42 -0
  44. package/dist/templates/agent/reviewer.yaml.template +51 -0
  45. package/dist/templates/project/full/.github/workflows/ci.yml.template +34 -0
  46. package/dist/templates/project/full/.gitignore.template +6 -0
  47. package/dist/templates/project/full/Dockerfile.template +43 -0
  48. package/dist/templates/project/full/README.md.template +77 -0
  49. package/dist/templates/project/full/agents/example.yaml.template +16 -0
  50. package/dist/templates/project/full/package.json.template +30 -0
  51. package/dist/templates/project/full/src/index.ts.template +43 -0
  52. package/dist/templates/project/full/src/symplek.config.ts.template +20 -0
  53. package/dist/templates/project/full/src/tools/index.ts.template +73 -0
  54. package/dist/templates/project/full/tests/example.test.ts.template +49 -0
  55. package/dist/templates/project/full/tsconfig.json.template +18 -0
  56. package/dist/templates/project/minimal/.gitignore.template +6 -0
  57. package/dist/templates/project/minimal/agents/example.yaml.template +16 -0
  58. package/dist/templates/project/minimal/package.json.template +27 -0
  59. package/dist/templates/project/minimal/src/index.ts.template +43 -0
  60. package/dist/templates/project/minimal/src/symplek.config.ts.template +20 -0
  61. package/dist/templates/project/minimal/tsconfig.json.template +18 -0
  62. package/dist/templates/project/standard/.gitignore.template +6 -0
  63. package/dist/templates/project/standard/README.md.template +77 -0
  64. package/dist/templates/project/standard/agents/example.yaml.template +16 -0
  65. package/dist/templates/project/standard/package.json.template +30 -0
  66. package/dist/templates/project/standard/src/index.ts.template +43 -0
  67. package/dist/templates/project/standard/src/symplek.config.ts.template +20 -0
  68. package/dist/templates/project/standard/src/tools/index.ts.template +73 -0
  69. package/dist/templates/project/standard/tests/example.test.ts.template +49 -0
  70. package/dist/templates/project/standard/tsconfig.json.template +18 -0
  71. package/dist/utils/templates.d.ts +41 -0
  72. package/dist/utils/templates.d.ts.map +1 -0
  73. package/dist/utils/templates.js +133 -0
  74. package/dist/utils/templates.js.map +1 -0
  75. package/package.json +60 -3
@@ -0,0 +1,252 @@
1
+ /**
2
+ * `symplek validate` command - validates YAML agent definitions
3
+ * @description Validates YAML files against the Symplek agent schema with line-number error reporting
4
+ */
5
+ import { Command } from "commander";
6
+ declare const AGENT_SCHEMA: {
7
+ $schema: string;
8
+ type: string;
9
+ required: string[];
10
+ properties: {
11
+ name: {
12
+ type: string;
13
+ pattern: string;
14
+ };
15
+ model: {
16
+ type: string;
17
+ pattern: string;
18
+ };
19
+ systemPrompt: {
20
+ type: string;
21
+ minLength: number;
22
+ };
23
+ description: {
24
+ type: string;
25
+ };
26
+ version: {
27
+ type: string;
28
+ pattern: string;
29
+ };
30
+ temperature: {
31
+ type: string;
32
+ minimum: number;
33
+ maximum: number;
34
+ };
35
+ maxTokens: {
36
+ type: string;
37
+ minimum: number;
38
+ maximum: number;
39
+ };
40
+ timeout: {
41
+ type: string;
42
+ minimum: number;
43
+ maximum: number;
44
+ };
45
+ retries: {
46
+ type: string;
47
+ properties: {
48
+ maxAttempts: {
49
+ type: string;
50
+ minimum: number;
51
+ maximum: number;
52
+ };
53
+ backoffMs: {
54
+ type: string;
55
+ minimum: number;
56
+ maximum: number;
57
+ };
58
+ backoffMultiplier: {
59
+ type: string;
60
+ minimum: number;
61
+ maximum: number;
62
+ };
63
+ };
64
+ additionalProperties: boolean;
65
+ };
66
+ tools: {
67
+ type: string;
68
+ items: {
69
+ oneOf: ({
70
+ type: string;
71
+ required?: undefined;
72
+ properties?: undefined;
73
+ additionalProperties?: undefined;
74
+ } | {
75
+ type: string;
76
+ required: string[];
77
+ properties: {
78
+ name: {
79
+ type: string;
80
+ };
81
+ enabled: {
82
+ type: string;
83
+ };
84
+ config: {
85
+ type: string;
86
+ additionalProperties: boolean;
87
+ };
88
+ };
89
+ additionalProperties: boolean;
90
+ })[];
91
+ };
92
+ };
93
+ tracking: {
94
+ type: string;
95
+ properties: {
96
+ enabled: {
97
+ type: string;
98
+ };
99
+ defaultSource: {
100
+ type: string;
101
+ enum: string[];
102
+ };
103
+ defaultConfidence: {
104
+ type: string;
105
+ minimum: number;
106
+ maximum: number;
107
+ };
108
+ requireVerification: {
109
+ type: string;
110
+ };
111
+ };
112
+ additionalProperties: boolean;
113
+ };
114
+ operators: {
115
+ type: string;
116
+ properties: {
117
+ retry: {
118
+ type: string;
119
+ properties: {
120
+ maxAttempts: {
121
+ type: string;
122
+ minimum: number;
123
+ maximum: number;
124
+ };
125
+ backoffMs: {
126
+ type: string;
127
+ minimum: number;
128
+ };
129
+ };
130
+ additionalProperties: boolean;
131
+ };
132
+ timeout: {
133
+ type: string;
134
+ properties: {
135
+ ms: {
136
+ type: string;
137
+ minimum: number;
138
+ };
139
+ fallback: {
140
+ type: string;
141
+ };
142
+ };
143
+ additionalProperties: boolean;
144
+ };
145
+ fallback: {
146
+ type: string;
147
+ properties: {
148
+ agent: {
149
+ type: string;
150
+ };
151
+ value: {};
152
+ };
153
+ additionalProperties: boolean;
154
+ };
155
+ challenge: {
156
+ type: string;
157
+ properties: {
158
+ challenger: {
159
+ type: string;
160
+ };
161
+ minConfidence: {
162
+ type: string;
163
+ minimum: number;
164
+ maximum: number;
165
+ };
166
+ };
167
+ additionalProperties: boolean;
168
+ };
169
+ consensus: {
170
+ type: string;
171
+ properties: {
172
+ agents: {
173
+ type: string;
174
+ items: {
175
+ type: string;
176
+ };
177
+ };
178
+ quorum: {
179
+ type: string;
180
+ minimum: number;
181
+ maximum: number;
182
+ };
183
+ weights: {
184
+ type: string;
185
+ additionalProperties: {
186
+ type: string;
187
+ };
188
+ };
189
+ };
190
+ additionalProperties: boolean;
191
+ };
192
+ };
193
+ additionalProperties: boolean;
194
+ };
195
+ memory: {
196
+ type: string;
197
+ properties: {
198
+ episodic: {
199
+ type: string;
200
+ };
201
+ semantic: {
202
+ type: string;
203
+ };
204
+ procedural: {
205
+ type: string;
206
+ };
207
+ maxEpisodes: {
208
+ type: string;
209
+ minimum: number;
210
+ };
211
+ maxFacts: {
212
+ type: string;
213
+ minimum: number;
214
+ };
215
+ };
216
+ additionalProperties: boolean;
217
+ };
218
+ tags: {
219
+ type: string;
220
+ items: {
221
+ type: string;
222
+ };
223
+ };
224
+ metadata: {
225
+ type: string;
226
+ additionalProperties: boolean;
227
+ };
228
+ };
229
+ additionalProperties: boolean;
230
+ };
231
+ /** Validation error with location information */
232
+ export interface ValidationError {
233
+ file: string;
234
+ line: number;
235
+ column: number;
236
+ message: string;
237
+ suggestion?: string;
238
+ }
239
+ /** Result of validating a single file */
240
+ export interface FileValidationResult {
241
+ file: string;
242
+ valid: boolean;
243
+ errors: ValidationError[];
244
+ }
245
+ /** Validate a single YAML file */
246
+ export declare function validateFile(filePath: string): FileValidationResult;
247
+ /**
248
+ * Create the validate command
249
+ */
250
+ export declare function validateCommand(): Command;
251
+ export { AGENT_SCHEMA };
252
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8IjB,CAAC;AAMF,iDAAiD;AACjD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,yCAAyC;AACzC,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAmMD,kCAAkC;AAClC,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,CAkHnE;AA+CD;;GAEG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAuDzC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAC"}