skedyul 1.2.15 → 1.2.17
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/cli/index.js +41 -1
- package/dist/config/types/model.d.ts +18 -1
- package/dist/dedicated/server.js +41 -1
- package/dist/esm/index.mjs +46 -1
- package/dist/index.js +47 -1
- package/dist/schemas.d.ts +31 -0
- package/dist/server/dedicated.d.ts +2 -2
- package/dist/server.js +41 -1
- package/dist/serverless/server.mjs +41 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -2952,7 +2952,7 @@ function printStartupLog(config, tools, webhookRegistry, port) {
|
|
|
2952
2952
|
}
|
|
2953
2953
|
|
|
2954
2954
|
// src/server/dedicated.ts
|
|
2955
|
-
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, webhookRegistry) {
|
|
2955
|
+
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, registry, webhookRegistry) {
|
|
2956
2956
|
const port = getListeningPort(config);
|
|
2957
2957
|
const httpServer = import_http2.default.createServer(
|
|
2958
2958
|
async (req, res) => {
|
|
@@ -2969,6 +2969,26 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
2969
2969
|
sendJSON(res, 200, state.getHealthStatus());
|
|
2970
2970
|
return;
|
|
2971
2971
|
}
|
|
2972
|
+
if (pathname === "/config" && req.method === "GET") {
|
|
2973
|
+
sendJSON(res, 200, {
|
|
2974
|
+
name: config.metadata.name,
|
|
2975
|
+
version: config.metadata.version,
|
|
2976
|
+
computeLayer: config.computeLayer,
|
|
2977
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
2978
|
+
name: tool.name || key,
|
|
2979
|
+
description: tool.description,
|
|
2980
|
+
timeout: tool.timeout,
|
|
2981
|
+
retries: tool.retries,
|
|
2982
|
+
triggers: tool.triggers
|
|
2983
|
+
})),
|
|
2984
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
2985
|
+
name: w.name,
|
|
2986
|
+
description: w.description,
|
|
2987
|
+
methods: w.methods
|
|
2988
|
+
})) : []
|
|
2989
|
+
});
|
|
2990
|
+
return;
|
|
2991
|
+
}
|
|
2972
2992
|
if (pathname.startsWith("/webhooks/") && webhookRegistry) {
|
|
2973
2993
|
const handle = pathname.slice("/webhooks/".length);
|
|
2974
2994
|
const webhookDef = webhookRegistry[handle];
|
|
@@ -4056,6 +4076,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
4056
4076
|
if (path14 === "/health" && method === "GET") {
|
|
4057
4077
|
return createResponse(200, state.getHealthStatus(), headers);
|
|
4058
4078
|
}
|
|
4079
|
+
if (path14 === "/config" && method === "GET") {
|
|
4080
|
+
return createResponse(200, {
|
|
4081
|
+
name: config.metadata.name,
|
|
4082
|
+
version: config.metadata.version,
|
|
4083
|
+
computeLayer: config.computeLayer,
|
|
4084
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
4085
|
+
name: tool.name || key,
|
|
4086
|
+
description: tool.description,
|
|
4087
|
+
timeout: tool.timeout,
|
|
4088
|
+
retries: tool.retries,
|
|
4089
|
+
triggers: tool.triggers
|
|
4090
|
+
})),
|
|
4091
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
4092
|
+
name: w.name,
|
|
4093
|
+
description: w.description,
|
|
4094
|
+
methods: w.methods
|
|
4095
|
+
})) : []
|
|
4096
|
+
}, headers);
|
|
4097
|
+
}
|
|
4059
4098
|
if (path14 === "/mcp" && method === "POST") {
|
|
4060
4099
|
let body;
|
|
4061
4100
|
try {
|
|
@@ -4429,6 +4468,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
4429
4468
|
callTool,
|
|
4430
4469
|
state,
|
|
4431
4470
|
mcpServer,
|
|
4471
|
+
registry,
|
|
4432
4472
|
webhookRegistry
|
|
4433
4473
|
);
|
|
4434
4474
|
}
|
|
@@ -30,6 +30,13 @@ export type FieldType = 'string' | 'long_string' | 'text' | 'number' | 'boolean'
|
|
|
30
30
|
* - 'restrict': Prevent deletion if references exist
|
|
31
31
|
*/
|
|
32
32
|
export type OnDelete = 'none' | 'cascade' | 'restrict';
|
|
33
|
+
/**
|
|
34
|
+
* Field requirement types.
|
|
35
|
+
* - 'optional': Field is never required
|
|
36
|
+
* - 'on_create': Field is required only when creating new records
|
|
37
|
+
* - 'required': Field is always required (create and update)
|
|
38
|
+
*/
|
|
39
|
+
export type FieldRequirementType = 'optional' | 'on_create' | 'required';
|
|
33
40
|
/**
|
|
34
41
|
* Inline field definition for options and validation constraints.
|
|
35
42
|
*/
|
|
@@ -79,7 +86,17 @@ export interface FieldDefinition {
|
|
|
79
86
|
* - Omitted: Auto-creates workplace definition as <subdomain>/<model>/<field>
|
|
80
87
|
*/
|
|
81
88
|
definition?: InlineFieldDefinition | string;
|
|
82
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Field requirement type.
|
|
91
|
+
* - 'optional': Field is never required (default)
|
|
92
|
+
* - 'on_create': Field is required only when creating new records
|
|
93
|
+
* - 'required': Field is always required (create and update)
|
|
94
|
+
*/
|
|
95
|
+
requirement?: FieldRequirementType;
|
|
96
|
+
/**
|
|
97
|
+
* Whether this field is required.
|
|
98
|
+
* @deprecated Use `requirement` instead. Maps to 'required' if true, 'optional' if false.
|
|
99
|
+
*/
|
|
83
100
|
required?: boolean;
|
|
84
101
|
/** Whether this field must be unique across all records */
|
|
85
102
|
unique?: boolean;
|
package/dist/dedicated/server.js
CHANGED
|
@@ -770,7 +770,7 @@ function printStartupLog(config, tools, webhookRegistry, port) {
|
|
|
770
770
|
}
|
|
771
771
|
|
|
772
772
|
// src/server/dedicated.ts
|
|
773
|
-
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, webhookRegistry) {
|
|
773
|
+
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, registry, webhookRegistry) {
|
|
774
774
|
const port = getListeningPort(config);
|
|
775
775
|
const httpServer = import_http2.default.createServer(
|
|
776
776
|
async (req, res) => {
|
|
@@ -787,6 +787,26 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
787
787
|
sendJSON(res, 200, state.getHealthStatus());
|
|
788
788
|
return;
|
|
789
789
|
}
|
|
790
|
+
if (pathname === "/config" && req.method === "GET") {
|
|
791
|
+
sendJSON(res, 200, {
|
|
792
|
+
name: config.metadata.name,
|
|
793
|
+
version: config.metadata.version,
|
|
794
|
+
computeLayer: config.computeLayer,
|
|
795
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
796
|
+
name: tool.name || key,
|
|
797
|
+
description: tool.description,
|
|
798
|
+
timeout: tool.timeout,
|
|
799
|
+
retries: tool.retries,
|
|
800
|
+
triggers: tool.triggers
|
|
801
|
+
})),
|
|
802
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
803
|
+
name: w.name,
|
|
804
|
+
description: w.description,
|
|
805
|
+
methods: w.methods
|
|
806
|
+
})) : []
|
|
807
|
+
});
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
790
810
|
if (pathname.startsWith("/webhooks/") && webhookRegistry) {
|
|
791
811
|
const handle = pathname.slice("/webhooks/".length);
|
|
792
812
|
const webhookDef = webhookRegistry[handle];
|
|
@@ -1874,6 +1894,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
1874
1894
|
if (path === "/health" && method === "GET") {
|
|
1875
1895
|
return createResponse(200, state.getHealthStatus(), headers);
|
|
1876
1896
|
}
|
|
1897
|
+
if (path === "/config" && method === "GET") {
|
|
1898
|
+
return createResponse(200, {
|
|
1899
|
+
name: config.metadata.name,
|
|
1900
|
+
version: config.metadata.version,
|
|
1901
|
+
computeLayer: config.computeLayer,
|
|
1902
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
1903
|
+
name: tool.name || key,
|
|
1904
|
+
description: tool.description,
|
|
1905
|
+
timeout: tool.timeout,
|
|
1906
|
+
retries: tool.retries,
|
|
1907
|
+
triggers: tool.triggers
|
|
1908
|
+
})),
|
|
1909
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
1910
|
+
name: w.name,
|
|
1911
|
+
description: w.description,
|
|
1912
|
+
methods: w.methods
|
|
1913
|
+
})) : []
|
|
1914
|
+
}, headers);
|
|
1915
|
+
}
|
|
1877
1916
|
if (path === "/mcp" && method === "POST") {
|
|
1878
1917
|
let body;
|
|
1879
1918
|
try {
|
|
@@ -2247,6 +2286,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
2247
2286
|
callTool,
|
|
2248
2287
|
state,
|
|
2249
2288
|
mcpServer,
|
|
2289
|
+
registry,
|
|
2250
2290
|
webhookRegistry
|
|
2251
2291
|
);
|
|
2252
2292
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -163,11 +163,15 @@ var AppFieldVisibilitySchema = z2.object({
|
|
|
163
163
|
list: z2.boolean().optional(),
|
|
164
164
|
filters: z2.boolean().optional()
|
|
165
165
|
});
|
|
166
|
+
var FieldRequirementTypeSchema = z2.enum(["optional", "on_create", "required"]);
|
|
166
167
|
var ModelFieldDefinitionSchema = z2.object({
|
|
167
168
|
handle: z2.string(),
|
|
168
169
|
label: z2.string(),
|
|
169
170
|
type: FieldDataTypeSchema.optional(),
|
|
170
171
|
definition: z2.union([InlineFieldDefinitionSchema, z2.string()]).optional(),
|
|
172
|
+
/** Field requirement type: 'optional', 'on_create', or 'required' */
|
|
173
|
+
requirement: FieldRequirementTypeSchema.optional(),
|
|
174
|
+
/** @deprecated Use `requirement` instead */
|
|
171
175
|
required: z2.boolean().optional(),
|
|
172
176
|
unique: z2.boolean().optional(),
|
|
173
177
|
system: z2.boolean().optional(),
|
|
@@ -2452,7 +2456,7 @@ function printStartupLog(config, tools, webhookRegistry, port) {
|
|
|
2452
2456
|
}
|
|
2453
2457
|
|
|
2454
2458
|
// src/server/dedicated.ts
|
|
2455
|
-
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, webhookRegistry) {
|
|
2459
|
+
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, registry, webhookRegistry) {
|
|
2456
2460
|
const port = getListeningPort(config);
|
|
2457
2461
|
const httpServer = http.createServer(
|
|
2458
2462
|
async (req, res) => {
|
|
@@ -2469,6 +2473,26 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
2469
2473
|
sendJSON(res, 200, state.getHealthStatus());
|
|
2470
2474
|
return;
|
|
2471
2475
|
}
|
|
2476
|
+
if (pathname === "/config" && req.method === "GET") {
|
|
2477
|
+
sendJSON(res, 200, {
|
|
2478
|
+
name: config.metadata.name,
|
|
2479
|
+
version: config.metadata.version,
|
|
2480
|
+
computeLayer: config.computeLayer,
|
|
2481
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
2482
|
+
name: tool.name || key,
|
|
2483
|
+
description: tool.description,
|
|
2484
|
+
timeout: tool.timeout,
|
|
2485
|
+
retries: tool.retries,
|
|
2486
|
+
triggers: tool.triggers
|
|
2487
|
+
})),
|
|
2488
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
2489
|
+
name: w.name,
|
|
2490
|
+
description: w.description,
|
|
2491
|
+
methods: w.methods
|
|
2492
|
+
})) : []
|
|
2493
|
+
});
|
|
2494
|
+
return;
|
|
2495
|
+
}
|
|
2472
2496
|
if (pathname.startsWith("/webhooks/") && webhookRegistry) {
|
|
2473
2497
|
const handle = pathname.slice("/webhooks/".length);
|
|
2474
2498
|
const webhookDef = webhookRegistry[handle];
|
|
@@ -3556,6 +3580,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
3556
3580
|
if (path2 === "/health" && method === "GET") {
|
|
3557
3581
|
return createResponse(200, state.getHealthStatus(), headers);
|
|
3558
3582
|
}
|
|
3583
|
+
if (path2 === "/config" && method === "GET") {
|
|
3584
|
+
return createResponse(200, {
|
|
3585
|
+
name: config.metadata.name,
|
|
3586
|
+
version: config.metadata.version,
|
|
3587
|
+
computeLayer: config.computeLayer,
|
|
3588
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
3589
|
+
name: tool.name || key,
|
|
3590
|
+
description: tool.description,
|
|
3591
|
+
timeout: tool.timeout,
|
|
3592
|
+
retries: tool.retries,
|
|
3593
|
+
triggers: tool.triggers
|
|
3594
|
+
})),
|
|
3595
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
3596
|
+
name: w.name,
|
|
3597
|
+
description: w.description,
|
|
3598
|
+
methods: w.methods
|
|
3599
|
+
})) : []
|
|
3600
|
+
}, headers);
|
|
3601
|
+
}
|
|
3559
3602
|
if (path2 === "/mcp" && method === "POST") {
|
|
3560
3603
|
let body;
|
|
3561
3604
|
try {
|
|
@@ -3929,6 +3972,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
3929
3972
|
callTool,
|
|
3930
3973
|
state,
|
|
3931
3974
|
mcpServer,
|
|
3975
|
+
registry,
|
|
3932
3976
|
webhookRegistry
|
|
3933
3977
|
);
|
|
3934
3978
|
}
|
|
@@ -4175,6 +4219,7 @@ export {
|
|
|
4175
4219
|
FieldDataTypeSchema,
|
|
4176
4220
|
FieldOptionSchema,
|
|
4177
4221
|
FieldOwnerSchema,
|
|
4222
|
+
FieldRequirementTypeSchema,
|
|
4178
4223
|
FieldSettingButtonPropsSchema,
|
|
4179
4224
|
FieldSettingComponentDefinitionSchema,
|
|
4180
4225
|
FileSettingComponentDefinitionSchema,
|
package/dist/index.js
CHANGED
|
@@ -57,6 +57,7 @@ __export(index_exports, {
|
|
|
57
57
|
FieldDataTypeSchema: () => FieldDataTypeSchema,
|
|
58
58
|
FieldOptionSchema: () => FieldOptionSchema,
|
|
59
59
|
FieldOwnerSchema: () => FieldOwnerSchema,
|
|
60
|
+
FieldRequirementTypeSchema: () => FieldRequirementTypeSchema,
|
|
60
61
|
FieldSettingButtonPropsSchema: () => FieldSettingButtonPropsSchema,
|
|
61
62
|
FieldSettingComponentDefinitionSchema: () => FieldSettingComponentDefinitionSchema,
|
|
62
63
|
FileSettingComponentDefinitionSchema: () => FileSettingComponentDefinitionSchema,
|
|
@@ -328,11 +329,15 @@ var AppFieldVisibilitySchema = import_v42.z.object({
|
|
|
328
329
|
list: import_v42.z.boolean().optional(),
|
|
329
330
|
filters: import_v42.z.boolean().optional()
|
|
330
331
|
});
|
|
332
|
+
var FieldRequirementTypeSchema = import_v42.z.enum(["optional", "on_create", "required"]);
|
|
331
333
|
var ModelFieldDefinitionSchema = import_v42.z.object({
|
|
332
334
|
handle: import_v42.z.string(),
|
|
333
335
|
label: import_v42.z.string(),
|
|
334
336
|
type: FieldDataTypeSchema.optional(),
|
|
335
337
|
definition: import_v42.z.union([InlineFieldDefinitionSchema, import_v42.z.string()]).optional(),
|
|
338
|
+
/** Field requirement type: 'optional', 'on_create', or 'required' */
|
|
339
|
+
requirement: FieldRequirementTypeSchema.optional(),
|
|
340
|
+
/** @deprecated Use `requirement` instead */
|
|
336
341
|
required: import_v42.z.boolean().optional(),
|
|
337
342
|
unique: import_v42.z.boolean().optional(),
|
|
338
343
|
system: import_v42.z.boolean().optional(),
|
|
@@ -2617,7 +2622,7 @@ function printStartupLog(config, tools, webhookRegistry, port) {
|
|
|
2617
2622
|
}
|
|
2618
2623
|
|
|
2619
2624
|
// src/server/dedicated.ts
|
|
2620
|
-
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, webhookRegistry) {
|
|
2625
|
+
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, registry, webhookRegistry) {
|
|
2621
2626
|
const port = getListeningPort(config);
|
|
2622
2627
|
const httpServer = import_http2.default.createServer(
|
|
2623
2628
|
async (req, res) => {
|
|
@@ -2634,6 +2639,26 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
2634
2639
|
sendJSON(res, 200, state.getHealthStatus());
|
|
2635
2640
|
return;
|
|
2636
2641
|
}
|
|
2642
|
+
if (pathname === "/config" && req.method === "GET") {
|
|
2643
|
+
sendJSON(res, 200, {
|
|
2644
|
+
name: config.metadata.name,
|
|
2645
|
+
version: config.metadata.version,
|
|
2646
|
+
computeLayer: config.computeLayer,
|
|
2647
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
2648
|
+
name: tool.name || key,
|
|
2649
|
+
description: tool.description,
|
|
2650
|
+
timeout: tool.timeout,
|
|
2651
|
+
retries: tool.retries,
|
|
2652
|
+
triggers: tool.triggers
|
|
2653
|
+
})),
|
|
2654
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
2655
|
+
name: w.name,
|
|
2656
|
+
description: w.description,
|
|
2657
|
+
methods: w.methods
|
|
2658
|
+
})) : []
|
|
2659
|
+
});
|
|
2660
|
+
return;
|
|
2661
|
+
}
|
|
2637
2662
|
if (pathname.startsWith("/webhooks/") && webhookRegistry) {
|
|
2638
2663
|
const handle = pathname.slice("/webhooks/".length);
|
|
2639
2664
|
const webhookDef = webhookRegistry[handle];
|
|
@@ -3721,6 +3746,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
3721
3746
|
if (path2 === "/health" && method === "GET") {
|
|
3722
3747
|
return createResponse(200, state.getHealthStatus(), headers);
|
|
3723
3748
|
}
|
|
3749
|
+
if (path2 === "/config" && method === "GET") {
|
|
3750
|
+
return createResponse(200, {
|
|
3751
|
+
name: config.metadata.name,
|
|
3752
|
+
version: config.metadata.version,
|
|
3753
|
+
computeLayer: config.computeLayer,
|
|
3754
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
3755
|
+
name: tool.name || key,
|
|
3756
|
+
description: tool.description,
|
|
3757
|
+
timeout: tool.timeout,
|
|
3758
|
+
retries: tool.retries,
|
|
3759
|
+
triggers: tool.triggers
|
|
3760
|
+
})),
|
|
3761
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
3762
|
+
name: w.name,
|
|
3763
|
+
description: w.description,
|
|
3764
|
+
methods: w.methods
|
|
3765
|
+
})) : []
|
|
3766
|
+
}, headers);
|
|
3767
|
+
}
|
|
3724
3768
|
if (path2 === "/mcp" && method === "POST") {
|
|
3725
3769
|
let body;
|
|
3726
3770
|
try {
|
|
@@ -4094,6 +4138,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
4094
4138
|
callTool,
|
|
4095
4139
|
state,
|
|
4096
4140
|
mcpServer,
|
|
4141
|
+
registry,
|
|
4097
4142
|
webhookRegistry
|
|
4098
4143
|
);
|
|
4099
4144
|
}
|
|
@@ -4341,6 +4386,7 @@ var index_default = { z: import_v44.z };
|
|
|
4341
4386
|
FieldDataTypeSchema,
|
|
4342
4387
|
FieldOptionSchema,
|
|
4343
4388
|
FieldOwnerSchema,
|
|
4389
|
+
FieldRequirementTypeSchema,
|
|
4344
4390
|
FieldSettingButtonPropsSchema,
|
|
4345
4391
|
FieldSettingComponentDefinitionSchema,
|
|
4346
4392
|
FileSettingComponentDefinitionSchema,
|
package/dist/schemas.d.ts
CHANGED
|
@@ -181,6 +181,11 @@ export declare const AppFieldVisibilitySchema: z.ZodObject<{
|
|
|
181
181
|
list: z.ZodOptional<z.ZodBoolean>;
|
|
182
182
|
filters: z.ZodOptional<z.ZodBoolean>;
|
|
183
183
|
}, z.core.$strip>;
|
|
184
|
+
export declare const FieldRequirementTypeSchema: z.ZodEnum<{
|
|
185
|
+
required: "required";
|
|
186
|
+
optional: "optional";
|
|
187
|
+
on_create: "on_create";
|
|
188
|
+
}>;
|
|
184
189
|
export declare const ModelFieldDefinitionSchema: z.ZodObject<{
|
|
185
190
|
handle: z.ZodString;
|
|
186
191
|
label: z.ZodString;
|
|
@@ -211,6 +216,11 @@ export declare const ModelFieldDefinitionSchema: z.ZodObject<{
|
|
|
211
216
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
212
217
|
pattern: z.ZodOptional<z.ZodString>;
|
|
213
218
|
}, z.core.$strip>, z.ZodString]>>;
|
|
219
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
220
|
+
required: "required";
|
|
221
|
+
optional: "optional";
|
|
222
|
+
on_create: "on_create";
|
|
223
|
+
}>>;
|
|
214
224
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
215
225
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
216
226
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -265,6 +275,11 @@ export declare const ModelDefinitionSchema: z.ZodObject<{
|
|
|
265
275
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
266
276
|
pattern: z.ZodOptional<z.ZodString>;
|
|
267
277
|
}, z.core.$strip>, z.ZodString]>>;
|
|
278
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
279
|
+
required: "required";
|
|
280
|
+
optional: "optional";
|
|
281
|
+
on_create: "on_create";
|
|
282
|
+
}>>;
|
|
268
283
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
269
284
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
270
285
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2973,6 +2988,11 @@ export declare const InstallConfigSchema: z.ZodObject<{
|
|
|
2973
2988
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
2974
2989
|
pattern: z.ZodOptional<z.ZodString>;
|
|
2975
2990
|
}, z.core.$strip>, z.ZodString]>>;
|
|
2991
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
2992
|
+
required: "required";
|
|
2993
|
+
optional: "optional";
|
|
2994
|
+
on_create: "on_create";
|
|
2995
|
+
}>>;
|
|
2976
2996
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
2977
2997
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
2978
2998
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3090,6 +3110,11 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
3090
3110
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
3091
3111
|
pattern: z.ZodOptional<z.ZodString>;
|
|
3092
3112
|
}, z.core.$strip>, z.ZodString]>>;
|
|
3113
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
3114
|
+
required: "required";
|
|
3115
|
+
optional: "optional";
|
|
3116
|
+
on_create: "on_create";
|
|
3117
|
+
}>>;
|
|
3093
3118
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
3094
3119
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
3095
3120
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3770,6 +3795,11 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3770
3795
|
relatedModel: z.ZodOptional<z.ZodString>;
|
|
3771
3796
|
pattern: z.ZodOptional<z.ZodString>;
|
|
3772
3797
|
}, z.core.$strip>, z.ZodString]>>;
|
|
3798
|
+
requirement: z.ZodOptional<z.ZodEnum<{
|
|
3799
|
+
required: "required";
|
|
3800
|
+
optional: "optional";
|
|
3801
|
+
on_create: "on_create";
|
|
3802
|
+
}>>;
|
|
3773
3803
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
3774
3804
|
unique: z.ZodOptional<z.ZodBoolean>;
|
|
3775
3805
|
system: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -4405,6 +4435,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
4405
4435
|
export type ParsedSkedyulConfig = z.infer<typeof SkedyulConfigSchema>;
|
|
4406
4436
|
export declare function safeParseConfig(data: unknown): ParsedSkedyulConfig | null;
|
|
4407
4437
|
export type FieldOwner = z.infer<typeof FieldOwnerSchema>;
|
|
4438
|
+
export type FieldRequirementType = z.infer<typeof FieldRequirementTypeSchema>;
|
|
4408
4439
|
export type FieldOption = z.infer<typeof FieldOptionSchema>;
|
|
4409
4440
|
export type InlineFieldDefinition = z.infer<typeof InlineFieldDefinitionSchema>;
|
|
4410
4441
|
export type RelationshipCardinality = z.infer<typeof RelationshipCardinalitySchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import type { SkedyulServerConfig, SkedyulServerInstance, ToolCallResponse, ToolMetadata, WebhookRegistry } from '../types';
|
|
2
|
+
import type { SkedyulServerConfig, SkedyulServerInstance, ToolCallResponse, ToolMetadata, ToolRegistry, WebhookRegistry } from '../types';
|
|
3
3
|
import type { RequestState } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Creates a dedicated (long-running HTTP) server instance
|
|
6
6
|
*/
|
|
7
|
-
export declare function createDedicatedServerInstance(config: SkedyulServerConfig, tools: ToolMetadata[], callTool: (nameRaw: unknown, argsRaw: unknown) => Promise<ToolCallResponse>, state: RequestState, mcpServer: McpServer, webhookRegistry?: WebhookRegistry): SkedyulServerInstance;
|
|
7
|
+
export declare function createDedicatedServerInstance(config: SkedyulServerConfig, tools: ToolMetadata[], callTool: (nameRaw: unknown, argsRaw: unknown) => Promise<ToolCallResponse>, state: RequestState, mcpServer: McpServer, registry: ToolRegistry, webhookRegistry?: WebhookRegistry): SkedyulServerInstance;
|
package/dist/server.js
CHANGED
|
@@ -770,7 +770,7 @@ function printStartupLog(config, tools, webhookRegistry, port) {
|
|
|
770
770
|
}
|
|
771
771
|
|
|
772
772
|
// src/server/dedicated.ts
|
|
773
|
-
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, webhookRegistry) {
|
|
773
|
+
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, registry, webhookRegistry) {
|
|
774
774
|
const port = getListeningPort(config);
|
|
775
775
|
const httpServer = import_http2.default.createServer(
|
|
776
776
|
async (req, res) => {
|
|
@@ -787,6 +787,26 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
787
787
|
sendJSON(res, 200, state.getHealthStatus());
|
|
788
788
|
return;
|
|
789
789
|
}
|
|
790
|
+
if (pathname === "/config" && req.method === "GET") {
|
|
791
|
+
sendJSON(res, 200, {
|
|
792
|
+
name: config.metadata.name,
|
|
793
|
+
version: config.metadata.version,
|
|
794
|
+
computeLayer: config.computeLayer,
|
|
795
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
796
|
+
name: tool.name || key,
|
|
797
|
+
description: tool.description,
|
|
798
|
+
timeout: tool.timeout,
|
|
799
|
+
retries: tool.retries,
|
|
800
|
+
triggers: tool.triggers
|
|
801
|
+
})),
|
|
802
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
803
|
+
name: w.name,
|
|
804
|
+
description: w.description,
|
|
805
|
+
methods: w.methods
|
|
806
|
+
})) : []
|
|
807
|
+
});
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
790
810
|
if (pathname.startsWith("/webhooks/") && webhookRegistry) {
|
|
791
811
|
const handle = pathname.slice("/webhooks/".length);
|
|
792
812
|
const webhookDef = webhookRegistry[handle];
|
|
@@ -1874,6 +1894,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
1874
1894
|
if (path === "/health" && method === "GET") {
|
|
1875
1895
|
return createResponse(200, state.getHealthStatus(), headers);
|
|
1876
1896
|
}
|
|
1897
|
+
if (path === "/config" && method === "GET") {
|
|
1898
|
+
return createResponse(200, {
|
|
1899
|
+
name: config.metadata.name,
|
|
1900
|
+
version: config.metadata.version,
|
|
1901
|
+
computeLayer: config.computeLayer,
|
|
1902
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
1903
|
+
name: tool.name || key,
|
|
1904
|
+
description: tool.description,
|
|
1905
|
+
timeout: tool.timeout,
|
|
1906
|
+
retries: tool.retries,
|
|
1907
|
+
triggers: tool.triggers
|
|
1908
|
+
})),
|
|
1909
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
1910
|
+
name: w.name,
|
|
1911
|
+
description: w.description,
|
|
1912
|
+
methods: w.methods
|
|
1913
|
+
})) : []
|
|
1914
|
+
}, headers);
|
|
1915
|
+
}
|
|
1877
1916
|
if (path === "/mcp" && method === "POST") {
|
|
1878
1917
|
let body;
|
|
1879
1918
|
try {
|
|
@@ -2247,6 +2286,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
2247
2286
|
callTool,
|
|
2248
2287
|
state,
|
|
2249
2288
|
mcpServer,
|
|
2289
|
+
registry,
|
|
2250
2290
|
webhookRegistry
|
|
2251
2291
|
);
|
|
2252
2292
|
}
|
|
@@ -709,7 +709,7 @@ function printStartupLog(config, tools, webhookRegistry, port) {
|
|
|
709
709
|
}
|
|
710
710
|
|
|
711
711
|
// src/server/dedicated.ts
|
|
712
|
-
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, webhookRegistry) {
|
|
712
|
+
function createDedicatedServerInstance(config, tools, callTool, state, mcpServer, registry, webhookRegistry) {
|
|
713
713
|
const port = getListeningPort(config);
|
|
714
714
|
const httpServer = http.createServer(
|
|
715
715
|
async (req, res) => {
|
|
@@ -726,6 +726,26 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
|
|
|
726
726
|
sendJSON(res, 200, state.getHealthStatus());
|
|
727
727
|
return;
|
|
728
728
|
}
|
|
729
|
+
if (pathname === "/config" && req.method === "GET") {
|
|
730
|
+
sendJSON(res, 200, {
|
|
731
|
+
name: config.metadata.name,
|
|
732
|
+
version: config.metadata.version,
|
|
733
|
+
computeLayer: config.computeLayer,
|
|
734
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
735
|
+
name: tool.name || key,
|
|
736
|
+
description: tool.description,
|
|
737
|
+
timeout: tool.timeout,
|
|
738
|
+
retries: tool.retries,
|
|
739
|
+
triggers: tool.triggers
|
|
740
|
+
})),
|
|
741
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
742
|
+
name: w.name,
|
|
743
|
+
description: w.description,
|
|
744
|
+
methods: w.methods
|
|
745
|
+
})) : []
|
|
746
|
+
});
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
729
749
|
if (pathname.startsWith("/webhooks/") && webhookRegistry) {
|
|
730
750
|
const handle = pathname.slice("/webhooks/".length);
|
|
731
751
|
const webhookDef = webhookRegistry[handle];
|
|
@@ -1813,6 +1833,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
|
|
|
1813
1833
|
if (path === "/health" && method === "GET") {
|
|
1814
1834
|
return createResponse(200, state.getHealthStatus(), headers);
|
|
1815
1835
|
}
|
|
1836
|
+
if (path === "/config" && method === "GET") {
|
|
1837
|
+
return createResponse(200, {
|
|
1838
|
+
name: config.metadata.name,
|
|
1839
|
+
version: config.metadata.version,
|
|
1840
|
+
computeLayer: config.computeLayer,
|
|
1841
|
+
tools: Object.entries(registry).map(([key, tool]) => ({
|
|
1842
|
+
name: tool.name || key,
|
|
1843
|
+
description: tool.description,
|
|
1844
|
+
timeout: tool.timeout,
|
|
1845
|
+
retries: tool.retries,
|
|
1846
|
+
triggers: tool.triggers
|
|
1847
|
+
})),
|
|
1848
|
+
webhooks: webhookRegistry ? Object.values(webhookRegistry).map((w) => ({
|
|
1849
|
+
name: w.name,
|
|
1850
|
+
description: w.description,
|
|
1851
|
+
methods: w.methods
|
|
1852
|
+
})) : []
|
|
1853
|
+
}, headers);
|
|
1854
|
+
}
|
|
1816
1855
|
if (path === "/mcp" && method === "POST") {
|
|
1817
1856
|
let body;
|
|
1818
1857
|
try {
|
|
@@ -2186,6 +2225,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
|
|
|
2186
2225
|
callTool,
|
|
2187
2226
|
state,
|
|
2188
2227
|
mcpServer,
|
|
2228
|
+
registry,
|
|
2189
2229
|
webhookRegistry
|
|
2190
2230
|
);
|
|
2191
2231
|
}
|