skedyul 0.3.0 → 0.3.2

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 (77) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/config/app-config.d.ts +73 -0
  3. package/dist/config/app-config.js +12 -0
  4. package/dist/config/index.d.ts +9 -0
  5. package/dist/config/index.js +33 -0
  6. package/dist/config/loader.d.ts +7 -0
  7. package/dist/config/loader.js +119 -0
  8. package/dist/config/types/agent.d.ts +29 -0
  9. package/dist/config/types/agent.js +5 -0
  10. package/dist/config/types/channel.d.ts +46 -0
  11. package/dist/config/types/channel.js +2 -0
  12. package/dist/config/types/compute.d.ts +1 -0
  13. package/dist/config/types/compute.js +5 -0
  14. package/dist/config/types/env.d.ts +16 -0
  15. package/dist/config/types/env.js +5 -0
  16. package/dist/config/types/index.d.ts +9 -0
  17. package/dist/config/types/index.js +26 -0
  18. package/dist/config/types/model.d.ts +62 -0
  19. package/dist/config/types/model.js +2 -0
  20. package/dist/config/types/page.d.ts +436 -0
  21. package/dist/config/types/page.js +5 -0
  22. package/dist/config/types/resource.d.ts +30 -0
  23. package/dist/config/types/resource.js +5 -0
  24. package/dist/config/types/webhook.d.ts +35 -0
  25. package/dist/config/types/webhook.js +5 -0
  26. package/dist/config/types/workflow.d.ts +24 -0
  27. package/dist/config/types/workflow.js +2 -0
  28. package/dist/config/utils.d.ts +16 -0
  29. package/dist/config/utils.js +37 -0
  30. package/dist/config.d.ts +5 -767
  31. package/dist/config.js +11 -151
  32. package/dist/schemas.d.ts +43 -43
  33. package/dist/server/core-api-handler.d.ts +8 -0
  34. package/dist/server/core-api-handler.js +148 -0
  35. package/dist/server/dedicated.d.ts +7 -0
  36. package/dist/server/dedicated.js +610 -0
  37. package/dist/server/handler-helpers.d.ts +24 -0
  38. package/dist/server/handler-helpers.js +75 -0
  39. package/dist/server/index.d.ts +19 -0
  40. package/dist/server/index.js +196 -0
  41. package/dist/server/serverless.d.ts +7 -0
  42. package/dist/server/serverless.js +629 -0
  43. package/dist/server/startup-logger.d.ts +9 -0
  44. package/dist/server/startup-logger.js +113 -0
  45. package/dist/server/tool-handler.d.ts +14 -0
  46. package/dist/server/tool-handler.js +189 -0
  47. package/dist/server/types.d.ts +22 -0
  48. package/dist/server/types.js +2 -0
  49. package/dist/server/utils/env.d.ts +12 -0
  50. package/dist/server/utils/env.js +38 -0
  51. package/dist/server/utils/http.d.ts +30 -0
  52. package/dist/server/utils/http.js +81 -0
  53. package/dist/server/utils/index.d.ts +3 -0
  54. package/dist/server/utils/index.js +24 -0
  55. package/dist/server/utils/schema.d.ts +22 -0
  56. package/dist/server/utils/schema.js +102 -0
  57. package/dist/server.d.ts +7 -11
  58. package/dist/server.js +39 -2026
  59. package/dist/types/aws.d.ts +15 -0
  60. package/dist/types/aws.js +5 -0
  61. package/dist/types/handlers.d.ts +122 -0
  62. package/dist/types/handlers.js +2 -0
  63. package/dist/types/index.d.ts +16 -0
  64. package/dist/types/index.js +16 -0
  65. package/dist/types/server.d.ts +43 -0
  66. package/dist/types/server.js +2 -0
  67. package/dist/types/shared.d.ts +16 -0
  68. package/dist/types/shared.js +5 -0
  69. package/dist/types/tool-context.d.ts +64 -0
  70. package/dist/types/tool-context.js +12 -0
  71. package/dist/types/tool.d.ts +96 -0
  72. package/dist/types/tool.js +19 -0
  73. package/dist/types/webhook.d.ts +116 -0
  74. package/dist/types/webhook.js +7 -0
  75. package/dist/types.d.ts +4 -461
  76. package/dist/types.js +21 -31
  77. package/package.json +2 -2
package/dist/types.d.ts CHANGED
@@ -1,464 +1,7 @@
1
- import type { CoreApiConfig } from './core/types';
2
- import { z } from 'zod';
3
- /** App info - always present in all contexts */
4
- export interface AppInfo {
5
- id: string;
6
- versionId: string;
7
- }
8
- /** Workplace info - present in runtime contexts */
9
- export interface WorkplaceInfo {
10
- id: string;
11
- subdomain: string;
12
- }
13
- /** Request info - present in runtime contexts */
14
- export interface RequestInfo {
15
- url: string;
16
- params: Record<string, string>;
17
- query: Record<string, string>;
18
- }
19
- /** Trigger types for tool execution */
20
- export type ToolTrigger = 'provision' | 'field_change' | 'page_action' | 'form_submit' | 'agent' | 'workflow' | 'page_context';
21
- /** Base context shared by all tool executions */
22
- interface BaseToolContext {
23
- /** Environment variables */
24
- env: Record<string, string | undefined>;
25
- /** Execution mode - 'estimate' returns billing info without side effects */
26
- mode: 'execute' | 'estimate';
27
- /** App info - always present */
28
- app: AppInfo;
29
- }
30
- /** Provision context - no installation, no workplace */
31
- export interface ProvisionToolContext extends BaseToolContext {
32
- trigger: 'provision';
33
- }
34
- /** Runtime base - has installation, workplace, request */
35
- interface RuntimeToolContext extends BaseToolContext {
36
- appInstallationId: string;
37
- workplace: WorkplaceInfo;
38
- request: RequestInfo;
39
- }
40
- /** Field change context */
41
- export interface FieldChangeToolContext extends RuntimeToolContext {
42
- trigger: 'field_change';
43
- field: {
44
- handle: string;
45
- type: string;
46
- pageHandle: string;
47
- value: unknown;
48
- previousValue?: unknown;
49
- };
50
- }
51
- /** Page action context */
52
- export interface PageActionToolContext extends RuntimeToolContext {
53
- trigger: 'page_action';
54
- page: {
55
- handle: string;
56
- values: Record<string, unknown>;
57
- };
58
- }
59
- /** Form submit context */
60
- export interface FormSubmitToolContext extends RuntimeToolContext {
61
- trigger: 'form_submit';
62
- form: {
63
- handle: string;
64
- values: Record<string, unknown>;
65
- };
66
- }
67
- /** Agent-triggered context */
68
- export interface AgentToolContext extends RuntimeToolContext {
69
- trigger: 'agent';
70
- }
71
- /** Workflow-triggered context */
72
- export interface WorkflowToolContext extends RuntimeToolContext {
73
- trigger: 'workflow';
74
- }
75
- /** Discriminated union of all tool execution contexts */
76
- export type ToolExecutionContext = ProvisionToolContext | FieldChangeToolContext | PageActionToolContext | FormSubmitToolContext | AgentToolContext | WorkflowToolContext;
77
- /** Type guard for provision context */
78
- export declare function isProvisionContext(ctx: ToolExecutionContext): ctx is ProvisionToolContext;
79
- /** Type guard for runtime context (any non-provision trigger) */
80
- export declare function isRuntimeContext(ctx: ToolExecutionContext): ctx is FieldChangeToolContext | PageActionToolContext | FormSubmitToolContext | AgentToolContext | WorkflowToolContext;
81
1
  /**
82
- * Input type for Provision lifecycle tools (onProvision, onDeprovision).
83
- * These tools receive no user input - all data comes from context.
84
- */
85
- export type ProvisionToolInput = Record<string, never>;
86
- export interface BillingInfo {
87
- credits: number;
88
- }
89
- /**
90
- * Standardized metadata for tool responses.
91
- * Provides consistent structure for AI evaluation, logging, and debugging.
92
- */
93
- export declare const ToolResponseMetaSchema: z.ZodObject<{
94
- success: z.ZodBoolean;
95
- message: z.ZodString;
96
- toolName: z.ZodString;
97
- }, z.core.$strip>;
98
- export type ToolResponseMeta = z.infer<typeof ToolResponseMetaSchema>;
99
- /**
100
- * Client-side effects that the tool wants the UI to execute.
101
- * These are separate from the data output and represent navigation/UI actions.
102
- */
103
- export interface ToolEffect {
104
- /** URL to navigate to after the tool completes */
105
- redirect?: string;
106
- }
107
- /**
108
- * Structured error information for tool execution results.
109
- * Uses codes for serialization and workflow detection.
110
- */
111
- export interface ToolError {
112
- code: string;
113
- message: string;
114
- }
115
- export interface ToolExecutionResult<Output = unknown> {
116
- /** Tool-specific output data. Null on error. */
117
- output: Output | null;
118
- /** Billing information */
119
- billing: BillingInfo;
120
- /** Standardized response metadata for AI evaluation and debugging */
121
- meta: ToolResponseMeta;
122
- /** Optional client-side effects to execute */
123
- effect?: ToolEffect;
124
- /** Structured error information (null/undefined if no error) */
125
- error?: ToolError | null;
126
- }
127
- export interface ToolSchemaWithJson<Schema extends z.ZodTypeAny = z.ZodTypeAny> {
128
- zod: Schema;
129
- jsonSchema?: Record<string, unknown>;
130
- }
131
- export type ToolSchema<Schema extends z.ZodTypeAny = z.ZodTypeAny> = Schema | ToolSchemaWithJson<Schema>;
132
- /**
133
- * Tool handler function signature.
134
- * Receives tool-specific input as first argument and standardized context as second.
135
- */
136
- export type ToolHandler<Input, Output> = (input: Input, context: ToolExecutionContext) => Promise<ToolExecutionResult<Output>> | ToolExecutionResult<Output>;
137
- export interface ToolDefinition<Input = unknown, Output = unknown, InputSchema extends z.ZodTypeAny = z.ZodType<Input>, OutputSchema extends z.ZodTypeAny = z.ZodType<Output>> {
138
- name: string;
139
- label?: string;
140
- description: string;
141
- inputSchema: ToolSchema<InputSchema>;
142
- handler: ToolHandler<Input, Output>;
143
- outputSchema?: ToolSchema<OutputSchema>;
144
- /** Timeout in milliseconds. Defaults to 10000 (10 seconds) if not specified. */
145
- timeout?: number;
146
- [key: string]: unknown;
147
- }
148
- export interface ToolRegistryEntry {
149
- name: string;
150
- label?: string;
151
- description: string;
152
- inputSchema: ToolSchema;
153
- handler: unknown;
154
- outputSchema?: ToolSchema;
155
- [key: string]: unknown;
156
- }
157
- export type ToolRegistry = Record<string, ToolRegistryEntry>;
158
- export type ToolName<T extends ToolRegistry> = Extract<keyof T, string>;
159
- export interface ToolMetadata {
160
- name: string;
161
- displayName?: string;
162
- description: string;
163
- inputSchema?: Record<string, unknown>;
164
- outputSchema?: Record<string, unknown>;
165
- /** Timeout in milliseconds. Defaults to 10000 (10 seconds) if not specified. */
166
- timeout?: number;
167
- }
168
- export interface HealthStatus {
169
- status: 'running';
170
- requests: number;
171
- maxRequests: number | null;
172
- requestsRemaining: number | null;
173
- lastRequestTime: number;
174
- ttlExtendSeconds: number;
175
- runtime: string;
176
- tools: string[];
177
- }
178
- export type ComputeLayer = 'dedicated' | 'serverless';
179
- export interface ServerMetadata {
180
- name: string;
181
- version: string;
182
- }
183
- export interface CorsOptions {
184
- allowOrigin?: string;
185
- allowMethods?: string;
186
- allowHeaders?: string;
187
- }
188
- /**
189
- * Base ServerHooks type with common fields
190
- */
191
- type BaseServerHooks = {
192
- /** Called after app version provisioning to set up version-level resources */
193
- provision?: ProvisionHandler | {
194
- handler: ProvisionHandler;
195
- /** Timeout in milliseconds. Defaults to 300000 (5 minutes) if not specified. */
196
- timeout?: number;
197
- };
198
- /** Called during app uninstallation to clean up external resources */
199
- uninstall?: UninstallHandler | {
200
- handler: UninstallHandler;
201
- /** Timeout in milliseconds. Defaults to 60000 (1 minute) if not specified. */
202
- timeout?: number;
203
- };
204
- };
205
- /**
206
- * ServerHooks when oauth_callback is present.
207
- * In this case, install handler MUST return a redirect.
208
- */
209
- export type ServerHooksWithOAuth = BaseServerHooks & {
210
- /** Called during app installation to validate/normalize env and perform setup */
211
- install: InstallHandler<ServerHooksWithOAuth> | {
212
- handler: InstallHandler<ServerHooksWithOAuth>;
213
- /** Timeout in milliseconds. Defaults to 60000 (1 minute) if not specified. */
214
- timeout?: number;
215
- };
216
- /** Called when OAuth provider redirects back with authorization code */
217
- oauth_callback: OAuthCallbackHandler | {
218
- handler: OAuthCallbackHandler;
219
- /** Timeout in milliseconds. Defaults to 60000 (1 minute) if not specified. */
220
- timeout?: number;
221
- };
222
- };
223
- /**
224
- * ServerHooks when oauth_callback is not present.
225
- * In this case, install handler may optionally return a redirect.
226
- */
227
- export type ServerHooksWithoutOAuth = BaseServerHooks & {
228
- /** Called during app installation to validate/normalize env and perform setup */
229
- install?: InstallHandler<ServerHooksWithoutOAuth> | {
230
- handler: InstallHandler<ServerHooksWithoutOAuth>;
231
- /** Timeout in milliseconds. Defaults to 60000 (1 minute) if not specified. */
232
- timeout?: number;
233
- };
234
- /** Called when OAuth provider redirects back with authorization code */
235
- oauth_callback?: never;
236
- };
237
- /**
238
- * Lifecycle hooks for the Skedyul server.
239
- * These handlers are called during app installation and provisioning.
2
+ * Types module - re-exports from the types folder
240
3
  *
241
- * If oauth_callback is defined, install handler MUST return a redirect.
242
- */
243
- export type ServerHooks = ServerHooksWithOAuth | ServerHooksWithoutOAuth;
244
- export interface SkedyulServerConfig {
245
- computeLayer: ComputeLayer;
246
- metadata: ServerMetadata;
247
- defaultPort?: number;
248
- maxRequests?: number | null;
249
- ttlExtendSeconds?: number;
250
- cors?: CorsOptions;
251
- coreApi?: CoreApiConfig;
252
- /** Lifecycle hooks for install and provision handlers */
253
- hooks?: ServerHooks;
254
- }
255
- export interface InstallHandlerContext {
256
- env: Record<string, string>;
257
- workplace: {
258
- id: string;
259
- subdomain: string;
260
- };
261
- appInstallationId: string;
262
- app: {
263
- id: string;
264
- versionId: string;
265
- handle: string;
266
- versionHandle: string;
267
- };
268
- }
269
- export interface InstallHandlerResponseOAuth {
270
- env?: Record<string, string>;
271
- redirect: string;
272
- }
273
- export interface InstallHandlerResponseStandard {
274
- env?: Record<string, string>;
275
- redirect?: string;
276
- }
277
- export type HasOAuthCallback<Hooks extends ServerHooks> = Hooks extends {
278
- oauth_callback: any;
279
- } ? true : false;
280
- export type InstallHandlerResult<Hooks extends ServerHooks = ServerHooks> = HasOAuthCallback<Hooks> extends true ? InstallHandlerResponseOAuth : InstallHandlerResponseStandard;
281
- export type InstallHandler<Hooks extends ServerHooks = ServerHooks> = (ctx: InstallHandlerContext) => Promise<InstallHandlerResult<Hooks>>;
282
- export interface UninstallHandlerContext {
283
- env: Record<string, string>;
284
- workplace: {
285
- id: string;
286
- subdomain: string;
287
- };
288
- appInstallationId: string;
289
- app: {
290
- id: string;
291
- versionId: string;
292
- handle: string;
293
- versionHandle: string;
294
- };
295
- }
296
- export interface UninstallHandlerResult {
297
- cleanedWebhookIds?: string[];
298
- }
299
- export type UninstallHandler = (ctx: UninstallHandlerContext) => Promise<UninstallHandlerResult>;
300
- export interface OAuthCallbackContext {
301
- /** Full HTTP request from the OAuth provider */
302
- request: WebhookRequest;
303
- }
304
- export interface OAuthCallbackResult {
305
- env?: Record<string, string>;
306
- appInstallationId?: string;
307
- }
308
- export type OAuthCallbackHandler = (ctx: OAuthCallbackContext) => Promise<OAuthCallbackResult>;
309
- export interface ProvisionHandlerContext {
310
- env: Record<string, string>;
311
- app: {
312
- id: string;
313
- versionId: string;
314
- };
315
- }
316
- export interface ProvisionHandlerResult {
317
- }
318
- export type ProvisionHandler = (ctx: ProvisionHandlerContext) => Promise<ProvisionHandlerResult>;
319
- export interface APIGatewayProxyEvent {
320
- body: string | null;
321
- headers: Record<string, string>;
322
- httpMethod: string;
323
- path: string;
324
- queryStringParameters: Record<string, string> | null;
325
- requestContext: {
326
- requestId: string;
327
- };
328
- }
329
- export interface APIGatewayProxyResult {
330
- statusCode: number;
331
- headers?: Record<string, string>;
332
- body: string;
333
- }
334
- export interface ToolCallResponse {
335
- output: unknown | null;
336
- billing: BillingInfo;
337
- meta: ToolResponseMeta;
338
- error?: ToolError | null;
339
- effect?: ToolEffect;
340
- }
341
- export interface DedicatedServerInstance {
342
- listen(port?: number): Promise<void>;
343
- getHealthStatus(): HealthStatus;
344
- }
345
- export interface ServerlessServerInstance {
346
- handler(event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult>;
347
- getHealthStatus(): HealthStatus;
348
- }
349
- export type SkedyulServerInstance = DedicatedServerInstance | ServerlessServerInstance;
350
- /**
351
- * Raw HTTP request shape sent over the wire in handler envelopes.
352
- * This is the wire format used by both webhooks and OAuth callbacks.
353
- * It gets converted to the rich WebhookRequest type at parse time.
354
- */
355
- export interface HandlerRawRequest {
356
- method: string;
357
- url: string;
358
- path: string;
359
- headers: Record<string, string>;
360
- query: Record<string, string>;
361
- body: string;
362
- }
363
- /** Raw HTTP request received by webhooks */
364
- export interface WebhookRequest {
365
- method: string;
366
- url: string;
367
- path: string;
368
- headers: Record<string, string | string[] | undefined>;
369
- query: Record<string, string>;
370
- /** Raw body - could be Buffer, string, or parsed object depending on content type */
371
- body: Buffer | string | unknown;
372
- /** Original raw body as Buffer if available */
373
- rawBody?: Buffer;
374
- }
375
- export interface WebhookResponse {
376
- status?: number;
377
- headers?: Record<string, string>;
378
- body?: unknown;
379
- }
380
- /** Base webhook context */
381
- interface BaseWebhookContext {
382
- /** Environment variables */
383
- env: Record<string, string | undefined>;
384
- /** App info */
385
- app: AppInfo;
386
- }
387
- /** Provision-level webhook context - no installation or workplace */
388
- export interface ProvisionWebhookContext extends BaseWebhookContext {
389
- }
390
- /** Runtime webhook context - has installation and workplace */
391
- export interface RuntimeWebhookContext extends BaseWebhookContext {
392
- appInstallationId: string;
393
- workplace: WorkplaceInfo;
394
- /** Registration metadata passed when webhook.create() was called */
395
- registration?: Record<string, unknown>;
396
- }
397
- /** Discriminated union of webhook contexts */
398
- export type WebhookContext = ProvisionWebhookContext | RuntimeWebhookContext;
399
- /** Type guard for runtime webhook context */
400
- export declare function isRuntimeWebhookContext(ctx: WebhookContext): ctx is RuntimeWebhookContext;
401
- export type WebhookHandler = (request: WebhookRequest, context: WebhookContext) => Promise<WebhookResponse> | WebhookResponse;
402
- export interface WebhookLifecycleContext {
403
- /** The Skedyul-generated webhook URL for this webhook */
404
- webhookUrl: string;
405
- /** Environment variables available during lifecycle operation */
406
- env: Record<string, string | undefined>;
407
- }
408
- export interface CommunicationChannelLifecycleContext extends WebhookLifecycleContext {
409
- /** The communication channel being configured */
410
- communicationChannel: {
411
- id: string;
412
- /** The identifier value (e.g., phone number like "+15551234567") */
413
- identifierValue: string;
414
- /** The channel handle (e.g., "sms") */
415
- handle: string;
416
- };
417
- }
418
- export interface WebhookLifecycleResult {
419
- /** External ID from the provider (e.g., Twilio phone number SID) */
420
- externalId: string;
421
- /** Optional message describing what was configured */
422
- message?: string;
423
- /** Optional metadata from the provider */
424
- metadata?: Record<string, unknown>;
425
- }
426
- /**
427
- * Lifecycle hook for webhook operations.
428
- * Return null if the API doesn't support programmatic management.
429
- */
430
- export type WebhookLifecycleHook<TContext = WebhookLifecycleContext> = (context: TContext) => Promise<WebhookLifecycleResult | null | undefined> | WebhookLifecycleResult | null | undefined;
431
- /**
432
- * Webhook invocation type - determines how responses are handled.
433
- * - WEBHOOK: Fire-and-forget. Returns 200 immediately, processes asynchronously.
434
- * - CALLBACK: Waits for handler response and returns it to the caller (e.g., Twilio TwiML).
4
+ * This file maintains backward compatibility while the actual type definitions
5
+ * have been split into smaller, focused modules in the types/ folder.
435
6
  */
436
- export type WebhookType = 'WEBHOOK' | 'CALLBACK';
437
- export interface WebhookDefinition {
438
- name: string;
439
- description: string;
440
- /** HTTP methods this webhook accepts. Defaults to ['POST'] */
441
- methods?: ('GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH')[];
442
- /**
443
- * Invocation type. Defaults to 'WEBHOOK' (fire-and-forget).
444
- * Use 'CALLBACK' when the caller expects the handler's response (e.g., Twilio TwiML).
445
- */
446
- type?: WebhookType;
447
- handler: WebhookHandler;
448
- onAppInstalled?: WebhookLifecycleHook;
449
- onAppUninstalled?: WebhookLifecycleHook;
450
- onAppVersionProvisioned?: WebhookLifecycleHook;
451
- onAppVersionDeprovisioned?: WebhookLifecycleHook;
452
- onCommunicationChannelCreated?: WebhookLifecycleHook<CommunicationChannelLifecycleContext>;
453
- onCommunicationChannelUpdated?: WebhookLifecycleHook<CommunicationChannelLifecycleContext>;
454
- onCommunicationChannelDeleted?: WebhookLifecycleHook<CommunicationChannelLifecycleContext>;
455
- }
456
- export type WebhookRegistry = Record<string, WebhookDefinition>;
457
- export type WebhookName<T extends WebhookRegistry> = Extract<keyof T, string>;
458
- export interface WebhookMetadata {
459
- name: string;
460
- description: string;
461
- methods: string[];
462
- type: WebhookType;
463
- }
464
- export {};
7
+ export * from './types/index';
package/dist/types.js CHANGED
@@ -1,34 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolResponseMetaSchema = void 0;
4
- exports.isProvisionContext = isProvisionContext;
5
- exports.isRuntimeContext = isRuntimeContext;
6
- exports.isRuntimeWebhookContext = isRuntimeWebhookContext;
7
- const zod_1 = require("zod");
8
- /** Type guard for provision context */
9
- function isProvisionContext(ctx) {
10
- return ctx.trigger === 'provision';
11
- }
12
- /** Type guard for runtime context (any non-provision trigger) */
13
- function isRuntimeContext(ctx) {
14
- return ctx.trigger !== 'provision';
15
- }
16
- // ─────────────────────────────────────────────────────────────────────────────
17
- // Tool Response Meta
18
- // ─────────────────────────────────────────────────────────────────────────────
19
2
  /**
20
- * Standardized metadata for tool responses.
21
- * Provides consistent structure for AI evaluation, logging, and debugging.
3
+ * Types module - re-exports from the types folder
4
+ *
5
+ * This file maintains backward compatibility while the actual type definitions
6
+ * have been split into smaller, focused modules in the types/ folder.
22
7
  */
23
- exports.ToolResponseMetaSchema = zod_1.z.object({
24
- /** Whether the tool execution succeeded */
25
- success: zod_1.z.boolean(),
26
- /** Human-readable message describing the result or error */
27
- message: zod_1.z.string(),
28
- /** Name of the tool that was executed */
29
- toolName: zod_1.z.string(),
30
- });
31
- /** Type guard for runtime webhook context */
32
- function isRuntimeWebhookContext(ctx) {
33
- return 'appInstallationId' in ctx && ctx.appInstallationId !== undefined;
34
- }
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ // Re-export everything from the types module
24
+ __exportStar(require("./types/index"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "build": "tsc --build tsconfig.json && tsc --project tsconfig.tests.json && node -e \"require('fs').mkdirSync('dist',{recursive:true}); require('fs').writeFileSync('dist/.build-stamp', String(Date.now()))\"",
22
22
  "dev": "npx nodemon --watch src --ext js,ts --exec \"pnpm run build\"",
23
- "test": "npm run build && node --test dist-tests/server.test.js"
23
+ "test": "npm run build && node --test dist-tests/server.test.js dist-tests/cli.test.js"
24
24
  },
25
25
  "keywords": [
26
26
  "mcp",