skedyul 0.1.59 → 0.1.61
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/.build-stamp +1 -1
- package/dist/cli/commands/diff.js +25 -45
- package/dist/cli/commands/validate.js +39 -46
- package/dist/config.d.ts +127 -562
- package/dist/config.js +25 -209
- package/dist/core/client.d.ts +156 -0
- package/dist/core/client.js +126 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -3
- package/dist/schemas.d.ts +507 -791
- package/dist/schemas.js +124 -438
- package/dist/server.js +41 -2
- package/dist/types.d.ts +9 -0
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769048098473
|
|
@@ -173,9 +173,15 @@ async function diffCommand(args) {
|
|
|
173
173
|
// In a full implementation, this would fetch the current deployed config from the server
|
|
174
174
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
175
175
|
const previousConfig = undefined;
|
|
176
|
-
//
|
|
177
|
-
const
|
|
178
|
-
|
|
176
|
+
// Resolve provision if available (may be a Promise for dynamic imports)
|
|
177
|
+
const provision = config.provision && 'env' in config.provision
|
|
178
|
+
? config.provision
|
|
179
|
+
: undefined;
|
|
180
|
+
const previousProvision = previousConfig?.provision && 'env' in previousConfig.provision
|
|
181
|
+
? previousConfig.provision
|
|
182
|
+
: undefined;
|
|
183
|
+
// Compare env schemas (all env is now at provision level)
|
|
184
|
+
const envDiff = compareEnvSchemas(provision?.env, previousProvision?.env);
|
|
179
185
|
// Compare tools if registry path provided
|
|
180
186
|
let toolsDiff;
|
|
181
187
|
const registryPath = (flags.registry || flags.r);
|
|
@@ -196,24 +202,17 @@ async function diffCommand(args) {
|
|
|
196
202
|
}
|
|
197
203
|
const result = {
|
|
198
204
|
configPath,
|
|
199
|
-
|
|
200
|
-
installEnv: installEnvDiff,
|
|
205
|
+
env: envDiff,
|
|
201
206
|
tools: toolsDiff,
|
|
202
207
|
summary: {
|
|
203
|
-
hasChanges:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
installEnvDiff.added.length > 0 ||
|
|
207
|
-
installEnvDiff.removed.length > 0 ||
|
|
208
|
-
installEnvDiff.changed.length > 0 ||
|
|
208
|
+
hasChanges: envDiff.added.length > 0 ||
|
|
209
|
+
envDiff.removed.length > 0 ||
|
|
210
|
+
envDiff.changed.length > 0 ||
|
|
209
211
|
(toolsDiff?.added.length ?? 0) > 0 ||
|
|
210
212
|
(toolsDiff?.removed.length ?? 0) > 0,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
installEnvChanges: installEnvDiff.added.length +
|
|
215
|
-
installEnvDiff.removed.length +
|
|
216
|
-
installEnvDiff.changed.length,
|
|
213
|
+
envChanges: envDiff.added.length +
|
|
214
|
+
envDiff.removed.length +
|
|
215
|
+
envDiff.changed.length,
|
|
217
216
|
toolChanges: (toolsDiff?.added.length ?? 0) + (toolsDiff?.removed.length ?? 0),
|
|
218
217
|
},
|
|
219
218
|
};
|
|
@@ -231,34 +230,18 @@ async function diffCommand(args) {
|
|
|
231
230
|
console.log('ℹ️ Comparing against empty state (new deployment)');
|
|
232
231
|
console.log('');
|
|
233
232
|
}
|
|
234
|
-
//
|
|
235
|
-
if (result.summary.
|
|
236
|
-
console.log('
|
|
237
|
-
for (const key of
|
|
238
|
-
const def =
|
|
233
|
+
// Environment variables diff
|
|
234
|
+
if (result.summary.envChanges > 0) {
|
|
235
|
+
console.log('Environment Variables:');
|
|
236
|
+
for (const key of envDiff.added) {
|
|
237
|
+
const def = provision?.env?.[key];
|
|
239
238
|
const required = def?.required ? ' (required)' : '';
|
|
240
239
|
console.log(` + ${key}${required}`);
|
|
241
240
|
}
|
|
242
|
-
for (const key of
|
|
241
|
+
for (const key of envDiff.removed) {
|
|
243
242
|
console.log(` - ${key}`);
|
|
244
243
|
}
|
|
245
|
-
for (const item of
|
|
246
|
-
console.log(` ~ ${item.key}: ${item.changes.join(', ')}`);
|
|
247
|
-
}
|
|
248
|
-
console.log('');
|
|
249
|
-
}
|
|
250
|
-
// Install env diff
|
|
251
|
-
if (result.summary.installEnvChanges > 0) {
|
|
252
|
-
console.log('Install Environment Variables:');
|
|
253
|
-
for (const key of installEnvDiff.added) {
|
|
254
|
-
const def = config.install?.env?.[key];
|
|
255
|
-
const required = def?.required ? ' (required)' : '';
|
|
256
|
-
console.log(` + ${key}${required}`);
|
|
257
|
-
}
|
|
258
|
-
for (const key of installEnvDiff.removed) {
|
|
259
|
-
console.log(` - ${key}`);
|
|
260
|
-
}
|
|
261
|
-
for (const item of installEnvDiff.changed) {
|
|
244
|
+
for (const item of envDiff.changed) {
|
|
262
245
|
console.log(` ~ ${item.key}: ${item.changes.join(', ')}`);
|
|
263
246
|
}
|
|
264
247
|
console.log('');
|
|
@@ -277,11 +260,8 @@ async function diffCommand(args) {
|
|
|
277
260
|
// Summary
|
|
278
261
|
if (result.summary.hasChanges) {
|
|
279
262
|
console.log('Summary:');
|
|
280
|
-
if (result.summary.
|
|
281
|
-
console.log(` • ${result.summary.
|
|
282
|
-
}
|
|
283
|
-
if (result.summary.installEnvChanges > 0) {
|
|
284
|
-
console.log(` • ${result.summary.installEnvChanges} install env var change(s)`);
|
|
263
|
+
if (result.summary.envChanges > 0) {
|
|
264
|
+
console.log(` • ${result.summary.envChanges} env var change(s)`);
|
|
285
265
|
}
|
|
286
266
|
if (result.summary.toolChanges > 0) {
|
|
287
267
|
console.log(` • ${result.summary.toolChanges} tool change(s)`);
|
|
@@ -147,33 +147,27 @@ async function validateCommand(args) {
|
|
|
147
147
|
warnings.push('No computeLayer specified. Will default to "dedicated".');
|
|
148
148
|
}
|
|
149
149
|
if (!config.tools) {
|
|
150
|
-
warnings.push('No tools specified.
|
|
150
|
+
warnings.push('No tools specified.');
|
|
151
151
|
}
|
|
152
|
-
if (
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
// Resolve provision if available (may be a Promise for dynamic imports)
|
|
153
|
+
const provision = config.provision && 'env' in config.provision
|
|
154
|
+
? config.provision
|
|
155
|
+
: undefined;
|
|
156
|
+
// Check if tools is a dynamic import
|
|
156
157
|
const toolsConfig = config.tools;
|
|
157
158
|
const isToolsDynamicImport = toolsConfig !== undefined && typeof toolsConfig !== 'string';
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
// Check workflow files exist (provision.workflows contains workflow definitions with paths)
|
|
160
|
+
if (provision?.workflows) {
|
|
161
|
+
for (const workflow of provision.workflows) {
|
|
162
|
+
if (workflow.path) {
|
|
163
|
+
const absoluteWorkflowPath = path.resolve(path.dirname(configPath), workflow.path);
|
|
164
|
+
if (!fs.existsSync(absoluteWorkflowPath)) {
|
|
165
|
+
warnings.push(`Workflow file not found: ${workflow.path}`);
|
|
166
|
+
}
|
|
166
167
|
}
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
|
-
// Check if workflows directory exists
|
|
170
|
-
const workflowsPath = config.workflowsPath || './workflows';
|
|
171
|
-
const absoluteWorkflowsPath = path.resolve(path.dirname(configPath), workflowsPath);
|
|
172
|
-
if (!fs.existsSync(absoluteWorkflowsPath)) {
|
|
173
|
-
warnings.push(`Workflows directory not found: ${workflowsPath}`);
|
|
174
|
-
}
|
|
175
170
|
const envKeys = (0, config_1.getAllEnvKeys)(config);
|
|
176
|
-
const requiredInstallKeys = (0, config_1.getRequiredInstallEnvKeys)(config);
|
|
177
171
|
const result = {
|
|
178
172
|
valid: validation.valid,
|
|
179
173
|
configPath,
|
|
@@ -181,12 +175,12 @@ async function validateCommand(args) {
|
|
|
181
175
|
name: config.name,
|
|
182
176
|
version: config.version,
|
|
183
177
|
computeLayer: config.computeLayer,
|
|
184
|
-
tools: isToolsDynamicImport ? 'dynamic-import' : toolsConfig,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
178
|
+
tools: isToolsDynamicImport ? 'dynamic-import' : (toolsConfig ? 'object' : undefined),
|
|
179
|
+
envKeys: envKeys.global,
|
|
180
|
+
modelHandles: provision?.models?.map((m) => m.handle) || [],
|
|
181
|
+
channelHandles: provision?.channels?.map((c) => c.handle) || [],
|
|
182
|
+
workflowCount: provision?.workflows?.length || 0,
|
|
183
|
+
pageCount: provision?.pages?.length || 0,
|
|
190
184
|
},
|
|
191
185
|
errors: validation.errors,
|
|
192
186
|
warnings,
|
|
@@ -204,15 +198,19 @@ async function validateCommand(args) {
|
|
|
204
198
|
const toolsDisplay = isToolsDynamicImport
|
|
205
199
|
? 'dynamic import (import())'
|
|
206
200
|
: (toolsConfig || './src/registry.ts (default)');
|
|
201
|
+
// Resolve provision if available (may be a Promise for dynamic imports)
|
|
202
|
+
const provision = config.provision && 'env' in config.provision
|
|
203
|
+
? config.provision
|
|
204
|
+
: undefined;
|
|
207
205
|
console.log('Configuration:');
|
|
208
206
|
console.log(` Compute Layer: ${config.computeLayer || 'dedicated (default)'}`);
|
|
209
207
|
console.log(` Tools: ${toolsDisplay}`);
|
|
210
|
-
console.log(` Workflows: ${
|
|
208
|
+
console.log(` Workflows: ${provision?.workflows?.length || 0} workflows`);
|
|
211
209
|
console.log('');
|
|
212
210
|
if (envKeys.global.length > 0) {
|
|
213
|
-
console.log('
|
|
211
|
+
console.log('Environment Variables:');
|
|
214
212
|
for (const key of envKeys.global) {
|
|
215
|
-
const def =
|
|
213
|
+
const def = provision?.env?.[key];
|
|
216
214
|
const required = def?.required ? ' (required)' : '';
|
|
217
215
|
const visibility = def?.visibility === 'encrypted' ? ' 🔒' : '';
|
|
218
216
|
console.log(` ${key}${required}${visibility}`);
|
|
@@ -221,22 +219,17 @@ async function validateCommand(args) {
|
|
|
221
219
|
}
|
|
222
220
|
console.log('');
|
|
223
221
|
}
|
|
224
|
-
if (
|
|
225
|
-
console.log('
|
|
226
|
-
for (const
|
|
227
|
-
|
|
228
|
-
const required = def?.required ? ' (required)' : '';
|
|
229
|
-
const visibility = def?.visibility === 'encrypted' ? ' 🔒' : '';
|
|
230
|
-
console.log(` ${key}${required}${visibility}`);
|
|
231
|
-
if (def?.label)
|
|
232
|
-
console.log(` └─ ${def.label}`);
|
|
222
|
+
if (provision?.models && provision.models.length > 0) {
|
|
223
|
+
console.log('Models:');
|
|
224
|
+
for (const model of provision.models) {
|
|
225
|
+
console.log(` ${model.handle}: ${model.name} (${model.scope})`);
|
|
233
226
|
}
|
|
234
227
|
console.log('');
|
|
235
228
|
}
|
|
236
|
-
if (
|
|
237
|
-
console.log('
|
|
238
|
-
for (const
|
|
239
|
-
console.log(` ${
|
|
229
|
+
if (provision?.channels && provision.channels.length > 0) {
|
|
230
|
+
console.log('Channels:');
|
|
231
|
+
for (const channel of provision.channels) {
|
|
232
|
+
console.log(` ${channel.handle}: ${channel.name}`);
|
|
240
233
|
}
|
|
241
234
|
console.log('');
|
|
242
235
|
}
|
|
@@ -261,10 +254,10 @@ async function validateCommand(args) {
|
|
|
261
254
|
if (validation.valid) {
|
|
262
255
|
console.log('✅ Config is valid');
|
|
263
256
|
if (!verbose) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
257
|
+
const modelCount = provision?.models?.length || 0;
|
|
258
|
+
const channelCount = provision?.channels?.length || 0;
|
|
259
|
+
const workflowCount = provision?.workflows?.length || 0;
|
|
260
|
+
console.log(` ${envKeys.global.length} env vars, ${modelCount} models, ${channelCount} channels, ${workflowCount} workflows`);
|
|
268
261
|
}
|
|
269
262
|
}
|
|
270
263
|
else {
|