skedyul 1.2.19 → 1.2.23
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 +512 -731
- package/dist/config/app-config.d.ts +26 -2
- package/dist/config/index.d.ts +1 -2
- package/dist/config/types/env.d.ts +8 -2
- package/dist/config/types/form.d.ts +10 -6
- package/dist/config/types/index.d.ts +0 -1
- package/dist/config/types/page.d.ts +2 -2
- package/dist/config/types/webhook.d.ts +2 -1
- package/dist/dedicated/server.js +503 -766
- package/dist/esm/index.mjs +503 -720
- package/dist/index.d.ts +2 -3
- package/dist/index.js +503 -722
- package/dist/server/config-serializer.d.ts +12 -0
- package/dist/server/dedicated.d.ts +3 -2
- package/dist/server/handlers/index.d.ts +12 -0
- package/dist/server/handlers/install-handler.d.ts +9 -0
- package/dist/server/handlers/oauth-callback-handler.d.ts +9 -0
- package/dist/server/handlers/provision-handler.d.ts +9 -0
- package/dist/server/handlers/types.d.ts +101 -0
- package/dist/server/handlers/uninstall-handler.d.ts +9 -0
- package/dist/server/handlers/webhook-handler.d.ts +28 -0
- package/dist/server/index.d.ts +15 -6
- package/dist/server/serverless.d.ts +3 -2
- package/dist/server/startup-logger.d.ts +3 -2
- package/dist/server/tool-handler.d.ts +1 -1
- package/dist/server/utils/http.d.ts +3 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +503 -766
- package/dist/serverless/server.mjs +503 -744
- package/dist/types/handlers.d.ts +6 -24
- package/dist/types/index.d.ts +4 -4
- package/dist/types/server.d.ts +1 -34
- package/dist/types/shared.d.ts +5 -0
- package/dist/types/tool.d.ts +5 -7
- package/dist/types/webhook.d.ts +14 -6
- package/package.json +1 -1
- package/dist/config/resolve.d.ts +0 -27
- package/dist/config/types/compute.d.ts +0 -9
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* This module defines the main configuration interfaces for Skedyul apps.
|
|
5
5
|
*/
|
|
6
6
|
import type { ToolRegistry, WebhookRegistry, ToolMetadata, WebhookMetadata } from '../types';
|
|
7
|
+
import type { ServerHooks } from '../types/handlers';
|
|
8
|
+
import type { CoreApiConfig } from '../core/types';
|
|
7
9
|
import type { EnvSchema, ComputeLayer, ModelDefinition, RelationshipDefinition, ChannelDefinition, WorkflowDefinition, PageDefinition, NavigationConfig, AgentDefinition } from './types';
|
|
8
10
|
/**
|
|
9
11
|
* Install configuration - defines per-install env vars and SHARED models.
|
|
@@ -44,8 +46,18 @@ export interface BuildConfig {
|
|
|
44
46
|
/** External dependencies to exclude from bundling (e.g., ['twilio', 'stripe']) */
|
|
45
47
|
external?: string[];
|
|
46
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* CORS configuration options.
|
|
51
|
+
*/
|
|
52
|
+
export interface CorsOptions {
|
|
53
|
+
allowOrigin?: string;
|
|
54
|
+
allowMethods?: string;
|
|
55
|
+
allowHeaders?: string;
|
|
56
|
+
}
|
|
47
57
|
/**
|
|
48
58
|
* Main Skedyul app configuration.
|
|
59
|
+
* This is the unified config type used for both declarative config (skedyul.config.ts)
|
|
60
|
+
* and runtime server creation (server.create()).
|
|
49
61
|
*/
|
|
50
62
|
export interface SkedyulConfig {
|
|
51
63
|
/** App name */
|
|
@@ -56,8 +68,16 @@ export interface SkedyulConfig {
|
|
|
56
68
|
description?: string;
|
|
57
69
|
/** Compute layer: 'serverless' (Lambda) or 'dedicated' (ECS/Docker) */
|
|
58
70
|
computeLayer?: ComputeLayer;
|
|
59
|
-
/**
|
|
60
|
-
|
|
71
|
+
/** Default port for dedicated mode HTTP server */
|
|
72
|
+
defaultPort?: number;
|
|
73
|
+
/** Maximum requests before shutdown (serverless mode) */
|
|
74
|
+
maxRequests?: number | null;
|
|
75
|
+
/** TTL extension in seconds */
|
|
76
|
+
ttlExtendSeconds?: number;
|
|
77
|
+
/** CORS configuration */
|
|
78
|
+
cors?: CorsOptions;
|
|
79
|
+
/** Core API configuration */
|
|
80
|
+
coreApi?: CoreApiConfig;
|
|
61
81
|
/** Tool registry - direct object or dynamic import */
|
|
62
82
|
tools?: ToolRegistry | Promise<{
|
|
63
83
|
toolRegistry: ToolRegistry;
|
|
@@ -66,6 +86,8 @@ export interface SkedyulConfig {
|
|
|
66
86
|
webhooks?: WebhookRegistry | Promise<{
|
|
67
87
|
webhookRegistry: WebhookRegistry;
|
|
68
88
|
}>;
|
|
89
|
+
/** Lifecycle hooks for install, provision, uninstall, and oauth_callback */
|
|
90
|
+
hooks?: ServerHooks;
|
|
69
91
|
/** Provision configuration - direct object or dynamic import */
|
|
70
92
|
provision?: ProvisionConfig | Promise<{
|
|
71
93
|
default: ProvisionConfig;
|
|
@@ -76,6 +98,8 @@ export interface SkedyulConfig {
|
|
|
76
98
|
}>;
|
|
77
99
|
/** Agent definitions - multi-tenant agents with tool bindings */
|
|
78
100
|
agents?: AgentDefinition[];
|
|
101
|
+
/** Build configuration for the integration */
|
|
102
|
+
build?: BuildConfig;
|
|
79
103
|
}
|
|
80
104
|
/**
|
|
81
105
|
* Serializable config (for database storage).
|
package/dist/config/index.d.ts
CHANGED
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
* - All definition types extend BaseDefinition
|
|
10
10
|
*/
|
|
11
11
|
export * from './types';
|
|
12
|
-
export type { InstallConfig, ProvisionConfig, BuildConfig, SkedyulConfig, SerializableSkedyulConfig, } from './app-config';
|
|
12
|
+
export type { InstallConfig, ProvisionConfig, BuildConfig, CorsOptions, SkedyulConfig, SerializableSkedyulConfig, } from './app-config';
|
|
13
13
|
export { defineConfig } from './app-config';
|
|
14
14
|
export { defineModel, defineChannel, definePage, defineWorkflow, defineAgent, defineEnv, defineNavigation, } from './define';
|
|
15
15
|
export { CONFIG_FILE_NAMES, loadConfig, validateConfig } from './loader';
|
|
16
|
-
export { resolveConfig, createMinimalConfig } from './resolve';
|
|
17
16
|
export { getAllEnvKeys, getRequiredInstallEnvKeys } from './utils';
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
* - 'provision': Developer-configured, shared across all installations
|
|
6
6
|
* - 'install': User-configured during app installation
|
|
7
7
|
*/
|
|
8
|
-
import type {
|
|
8
|
+
import type { Visibility } from './base';
|
|
9
|
+
/**
|
|
10
|
+
* Scope for environment variables.
|
|
11
|
+
* - 'provision': Developer-configured, shared across all installations
|
|
12
|
+
* - 'install': User-configured during app installation
|
|
13
|
+
*/
|
|
14
|
+
export type EnvScope = 'provision' | 'install';
|
|
9
15
|
/**
|
|
10
16
|
* Environment variable definition.
|
|
11
17
|
*/
|
|
@@ -13,7 +19,7 @@ export interface EnvVariable {
|
|
|
13
19
|
/** Human-readable label for the variable */
|
|
14
20
|
label: string;
|
|
15
21
|
/** Scope: 'provision' (developer) or 'install' (user) */
|
|
16
|
-
scope?:
|
|
22
|
+
scope?: EnvScope;
|
|
17
23
|
/** Whether this variable is required */
|
|
18
24
|
required?: boolean;
|
|
19
25
|
/** Visibility setting: 'visible' or 'encrypted' */
|
|
@@ -56,7 +56,7 @@ export interface FormHeader {
|
|
|
56
56
|
/**
|
|
57
57
|
* Action definition for form buttons.
|
|
58
58
|
*/
|
|
59
|
-
export interface
|
|
59
|
+
export interface FormActionDefinition {
|
|
60
60
|
handle: string;
|
|
61
61
|
/** Button label - supports Liquid templates */
|
|
62
62
|
label: string;
|
|
@@ -69,6 +69,10 @@ export interface ActionDefinition {
|
|
|
69
69
|
/** Whether hidden - boolean or Liquid template */
|
|
70
70
|
hidden?: boolean | string;
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated Use FormActionDefinition instead.
|
|
74
|
+
*/
|
|
75
|
+
export type ActionDefinition = FormActionDefinition;
|
|
72
76
|
/**
|
|
73
77
|
* Modal form definition for nested forms.
|
|
74
78
|
*/
|
|
@@ -82,7 +86,7 @@ export interface ModalFormDefinition {
|
|
|
82
86
|
/** Inline field definitions (used when template is not specified) */
|
|
83
87
|
fields?: FormComponent[];
|
|
84
88
|
layout?: FormLayoutConfig;
|
|
85
|
-
actions?:
|
|
89
|
+
actions?: FormActionDefinition[];
|
|
86
90
|
}
|
|
87
91
|
/**
|
|
88
92
|
* Input component definition.
|
|
@@ -308,7 +312,7 @@ export interface FormProps {
|
|
|
308
312
|
fields: FormComponent[];
|
|
309
313
|
layout: FormLayoutConfig;
|
|
310
314
|
/** Actions that trigger tool calls */
|
|
311
|
-
actions?:
|
|
315
|
+
actions?: FormActionDefinition[];
|
|
312
316
|
}
|
|
313
317
|
/**
|
|
314
318
|
* Card block header definition.
|
|
@@ -327,9 +331,9 @@ export interface CardBlock {
|
|
|
327
331
|
restructurable?: boolean;
|
|
328
332
|
header?: CardHeader;
|
|
329
333
|
form: FormProps;
|
|
330
|
-
actions?:
|
|
331
|
-
secondaryActions?:
|
|
332
|
-
primaryActions?:
|
|
334
|
+
actions?: FormActionDefinition[];
|
|
335
|
+
secondaryActions?: FormActionDefinition[];
|
|
336
|
+
primaryActions?: FormActionDefinition[];
|
|
333
337
|
}
|
|
334
338
|
/**
|
|
335
339
|
* List block definition.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { BaseDefinition, StructuredFilter } from './base';
|
|
8
8
|
import type { ContextDefinition } from './context';
|
|
9
|
-
import type {
|
|
9
|
+
import type { FormActionDefinition, BlockDefinition } from './form';
|
|
10
10
|
import type { NavigationConfig } from './navigation';
|
|
11
11
|
/**
|
|
12
12
|
* Page type.
|
|
@@ -44,7 +44,7 @@ export interface PageDefinition extends BaseDefinition {
|
|
|
44
44
|
/** Page blocks (cards, lists, etc.) */
|
|
45
45
|
blocks: BlockDefinition[];
|
|
46
46
|
/** Page-level actions */
|
|
47
|
-
actions?:
|
|
47
|
+
actions?: FormActionDefinition[];
|
|
48
48
|
/** Context data to load for Liquid templates */
|
|
49
49
|
context?: ContextDefinition;
|
|
50
50
|
/** Filter for list pages - defines which model instances to show */
|
|
@@ -8,7 +8,7 @@ import type { ContextLogger } from '../../server/logger';
|
|
|
8
8
|
/**
|
|
9
9
|
* HTTP methods supported by webhooks.
|
|
10
10
|
*/
|
|
11
|
-
export type HttpMethod = '
|
|
11
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
12
12
|
/**
|
|
13
13
|
* Incoming webhook request.
|
|
14
14
|
*/
|
|
@@ -56,6 +56,7 @@ export interface WebhookHandlerDefinition {
|
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Webhook registry type.
|
|
59
|
+
* @deprecated Use WebhookRegistry from '../types/webhook' instead.
|
|
59
60
|
*/
|
|
60
61
|
export type Webhooks = Record<string, WebhookHandlerDefinition>;
|
|
61
62
|
/**
|