skedyul 0.2.122 → 0.2.125

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 CHANGED
@@ -1 +1 @@
1
- 1769908148108
1
+ 1769918724913
@@ -171,7 +171,7 @@ async function invokeCommand(args) {
171
171
  process.exit(1);
172
172
  }
173
173
  // Validate inputs if schema exists
174
- const inputSchema = getZodSchema(tool.inputs);
174
+ const inputSchema = getZodSchema(tool.inputSchema);
175
175
  let validatedArgs = toolArgs;
176
176
  if (inputSchema) {
177
177
  try {
@@ -108,7 +108,7 @@ async function toolsCommand(args) {
108
108
  }
109
109
  const tools = [];
110
110
  for (const [key, tool] of Object.entries(registry)) {
111
- const inputZod = getZodSchema(tool.inputs);
111
+ const inputZod = getZodSchema(tool.inputSchema);
112
112
  const outputZod = getZodSchema(tool.outputSchema);
113
113
  tools.push({
114
114
  name: tool.name || key,
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Default Dockerfile Template for Node.js/TypeScript Integrations
3
+ * ================================================================
4
+ *
5
+ * This template is used when an integration doesn't provide its own Dockerfile.
6
+ * The build system detects the SDK from the skedyul.config.* extension:
7
+ * - .ts/.js/.mjs/.cjs → skedyul-node → this Dockerfile
8
+ *
9
+ * Supports both dedicated (Docker/ECS) and serverless (Lambda) deployments.
10
+ */
11
+ export declare const DEFAULT_DOCKERFILE = "# =============================================================================\n# BUILDER STAGE - Common build for all targets\n# =============================================================================\nFROM node:22-alpine AS builder\n\nWORKDIR /app\n\n# Install pnpm\nRUN corepack enable && corepack prepare pnpm@latest --activate\n\nCOPY package.json pnpm-lock.yaml tsconfig.json tsup.config.ts ./\nCOPY src ./src\n\n# Install dependencies (including dev deps for build), compile, then prune\n# Note: Using --no-frozen-lockfile since this is a standalone integration package\nRUN pnpm install --no-frozen-lockfile && \\\n pnpm run build && \\\n pnpm prune --prod && \\\n pnpm store prune && \\\n rm -rf /tmp/* /var/cache/apk/* ~/.npm\n\n# =============================================================================\n# DEDICATED STAGE - For local Docker and ECS deployments (HTTP server)\n# =============================================================================\nFROM node:22-alpine AS dedicated\n\nWORKDIR /app\n\n# Copy built artifacts\nCOPY --from=builder /app/node_modules ./node_modules\nCOPY --from=builder /app/dist ./dist\n\n# Allow overriding the baked-in MCP env at runtime\nARG MCP_ENV_JSON=\"{}\"\nENV MCP_ENV_JSON=${MCP_ENV_JSON}\n\n# Expose the HTTP port\nEXPOSE 3000\n\n# Run as HTTP server (dedicated mode auto-detected by absence of AWS_LAMBDA_FUNCTION_NAME)\nCMD [\"node\", \"dist/server/mcp_server.js\"]\n\n# =============================================================================\n# SERVERLESS STAGE - For AWS Lambda deployments\n# =============================================================================\nFROM public.ecr.aws/lambda/nodejs:22 AS serverless\n\nWORKDIR ${LAMBDA_TASK_ROOT}\n\nCOPY --from=builder /app/node_modules ./node_modules\nCOPY --from=builder /app/dist ./dist\n\n# Allow overriding the baked-in MCP env at runtime\nARG MCP_ENV_JSON=\"{}\"\nENV MCP_ENV_JSON=${MCP_ENV_JSON}\n\n# Lambda handler format\nCMD [\"dist/server/mcp_server.handler\"]\n\n# =============================================================================\n# DEFAULT - Use dedicated for local development, override with --target for production\n# =============================================================================\nFROM dedicated\n";
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ /**
3
+ * Default Dockerfile Template for Node.js/TypeScript Integrations
4
+ * ================================================================
5
+ *
6
+ * This template is used when an integration doesn't provide its own Dockerfile.
7
+ * The build system detects the SDK from the skedyul.config.* extension:
8
+ * - .ts/.js/.mjs/.cjs → skedyul-node → this Dockerfile
9
+ *
10
+ * Supports both dedicated (Docker/ECS) and serverless (Lambda) deployments.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.DEFAULT_DOCKERFILE = void 0;
14
+ exports.DEFAULT_DOCKERFILE = `# =============================================================================
15
+ # BUILDER STAGE - Common build for all targets
16
+ # =============================================================================
17
+ FROM node:22-alpine AS builder
18
+
19
+ WORKDIR /app
20
+
21
+ # Install pnpm
22
+ RUN corepack enable && corepack prepare pnpm@latest --activate
23
+
24
+ COPY package.json pnpm-lock.yaml tsconfig.json tsup.config.ts ./
25
+ COPY src ./src
26
+
27
+ # Install dependencies (including dev deps for build), compile, then prune
28
+ # Note: Using --no-frozen-lockfile since this is a standalone integration package
29
+ RUN pnpm install --no-frozen-lockfile && \\
30
+ pnpm run build && \\
31
+ pnpm prune --prod && \\
32
+ pnpm store prune && \\
33
+ rm -rf /tmp/* /var/cache/apk/* ~/.npm
34
+
35
+ # =============================================================================
36
+ # DEDICATED STAGE - For local Docker and ECS deployments (HTTP server)
37
+ # =============================================================================
38
+ FROM node:22-alpine AS dedicated
39
+
40
+ WORKDIR /app
41
+
42
+ # Copy built artifacts
43
+ COPY --from=builder /app/node_modules ./node_modules
44
+ COPY --from=builder /app/dist ./dist
45
+
46
+ # Allow overriding the baked-in MCP env at runtime
47
+ ARG MCP_ENV_JSON="{}"
48
+ ENV MCP_ENV_JSON=\${MCP_ENV_JSON}
49
+
50
+ # Expose the HTTP port
51
+ EXPOSE 3000
52
+
53
+ # Run as HTTP server (dedicated mode auto-detected by absence of AWS_LAMBDA_FUNCTION_NAME)
54
+ CMD ["node", "dist/server/mcp_server.js"]
55
+
56
+ # =============================================================================
57
+ # SERVERLESS STAGE - For AWS Lambda deployments
58
+ # =============================================================================
59
+ FROM public.ecr.aws/lambda/nodejs:22 AS serverless
60
+
61
+ WORKDIR \${LAMBDA_TASK_ROOT}
62
+
63
+ COPY --from=builder /app/node_modules ./node_modules
64
+ COPY --from=builder /app/dist ./dist
65
+
66
+ # Allow overriding the baked-in MCP env at runtime
67
+ ARG MCP_ENV_JSON="{}"
68
+ ENV MCP_ENV_JSON=\${MCP_ENV_JSON}
69
+
70
+ # Lambda handler format
71
+ CMD ["dist/server/mcp_server.handler"]
72
+
73
+ # =============================================================================
74
+ # DEFAULT - Use dedicated for local development, override with --target for production
75
+ # =============================================================================
76
+ FROM dedicated
77
+ `;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ import { z } from 'zod';
2
2
  export * from './types';
3
3
  export * from './schemas';
4
4
  export { server } from './server';
5
+ export { DEFAULT_DOCKERFILE } from './dockerfile';
5
6
  export { z };
6
7
  export { workplace, communicationChannel, instance, token, file, webhook, resource, contactAssociationLink, configure, getConfig, runWithConfig, } from './core/client';
7
8
  export type { InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileUrlResponse, FileUploadParams, FileUploadResult, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, ResourceLinkParams, ResourceLinkResult, ContactAssociationLinkCreateParams, ContactAssociationLinkCreateResult, } from './core/client';
package/dist/index.js CHANGED
@@ -14,13 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getRequiredInstallEnvKeys = exports.getAllEnvKeys = exports.CONFIG_FILE_NAMES = exports.validateConfig = exports.loadConfig = exports.defineConfig = exports.runWithConfig = exports.getConfig = exports.configure = exports.contactAssociationLink = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = exports.z = exports.server = void 0;
17
+ exports.getRequiredInstallEnvKeys = exports.getAllEnvKeys = exports.CONFIG_FILE_NAMES = exports.validateConfig = exports.loadConfig = exports.defineConfig = exports.runWithConfig = exports.getConfig = exports.configure = exports.contactAssociationLink = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = exports.z = exports.DEFAULT_DOCKERFILE = exports.server = void 0;
18
18
  const zod_1 = require("zod");
19
19
  Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod_1.z; } });
20
20
  __exportStar(require("./types"), exports);
21
21
  __exportStar(require("./schemas"), exports);
22
22
  var server_1 = require("./server");
23
23
  Object.defineProperty(exports, "server", { enumerable: true, get: function () { return server_1.server; } });
24
+ var dockerfile_1 = require("./dockerfile");
25
+ Object.defineProperty(exports, "DEFAULT_DOCKERFILE", { enumerable: true, get: function () { return dockerfile_1.DEFAULT_DOCKERFILE; } });
24
26
  var client_1 = require("./core/client");
25
27
  Object.defineProperty(exports, "workplace", { enumerable: true, get: function () { return client_1.workplace; } });
26
28
  Object.defineProperty(exports, "communicationChannel", { enumerable: true, get: function () { return client_1.communicationChannel; } });
package/dist/server.js CHANGED
@@ -259,7 +259,7 @@ function buildToolMetadata(registry) {
259
259
  return Object.values(registry).map((tool) => ({
260
260
  name: tool.name,
261
261
  description: tool.description,
262
- inputSchema: getJsonSchemaFromToolSchema(tool.inputs),
262
+ inputSchema: getJsonSchemaFromToolSchema(tool.inputSchema),
263
263
  outputSchema: getJsonSchemaFromToolSchema(tool.outputSchema),
264
264
  }));
265
265
  }
@@ -586,7 +586,7 @@ function createSkedyulServer(config, registry, webhookRegistry) {
586
586
  for (const [toolKey, tool] of Object.entries(registry)) {
587
587
  // Use the tool's name or fall back to the registry key
588
588
  const toolName = tool.name || toolKey;
589
- const inputZodSchema = getZodSchema(tool.inputs);
589
+ const inputZodSchema = getZodSchema(tool.inputSchema);
590
590
  const outputZodSchema = getZodSchema(tool.outputSchema);
591
591
  // Wrap the input schema to accept Skedyul format: { inputs: {...}, env: {...} }
592
592
  // This allows the MCP SDK to pass through the wrapper without stripping fields
@@ -1257,7 +1257,7 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1257
1257
  },
1258
1258
  }, headers);
1259
1259
  }
1260
- const inputSchema = getZodSchema(tool.inputs);
1260
+ const inputSchema = getZodSchema(tool.inputSchema);
1261
1261
  // Validate arguments against Zod schema
1262
1262
  const validatedArgs = inputSchema ? inputSchema.parse(toolArgs) : toolArgs;
1263
1263
  const estimateResponse = await callTool(toolKey, {
@@ -1350,7 +1350,7 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1350
1350
  }, headers);
1351
1351
  }
1352
1352
  try {
1353
- const inputSchema = getZodSchema(tool.inputs);
1353
+ const inputSchema = getZodSchema(tool.inputSchema);
1354
1354
  const outputSchema = getZodSchema(tool.outputSchema);
1355
1355
  const hasOutputSchema = Boolean(outputSchema);
1356
1356
  const validatedInputs = inputSchema
package/dist/types.d.ts CHANGED
@@ -113,7 +113,7 @@ export type ToolHandler<Input, Output> = (input: Input, context: ToolExecutionCo
113
113
  export interface ToolDefinition<Input = unknown, Output = unknown, InputSchema extends z.ZodTypeAny = z.ZodType<Input>, OutputSchema extends z.ZodTypeAny = z.ZodType<Output>> {
114
114
  name: string;
115
115
  description: string;
116
- inputs: ToolSchema<InputSchema>;
116
+ inputSchema: ToolSchema<InputSchema>;
117
117
  handler: ToolHandler<Input, Output>;
118
118
  outputSchema?: ToolSchema<OutputSchema>;
119
119
  [key: string]: unknown;
@@ -121,7 +121,7 @@ export interface ToolDefinition<Input = unknown, Output = unknown, InputSchema e
121
121
  export interface ToolRegistryEntry {
122
122
  name: string;
123
123
  description: string;
124
- inputs: ToolSchema;
124
+ inputSchema: ToolSchema;
125
125
  handler: unknown;
126
126
  outputSchema?: ToolSchema;
127
127
  [key: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.2.122",
3
+ "version": "0.2.125",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",