skedyul 1.2.11 → 1.2.13

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 CHANGED
@@ -1080,6 +1080,16 @@ function configure(options) {
1080
1080
  async function callCore(method, params) {
1081
1081
  const effectiveConfig = getEffectiveConfig();
1082
1082
  const { baseUrl, apiToken } = effectiveConfig;
1083
+ const requestConfig = requestConfigStorage.getStore();
1084
+ console.log(`[callCore] Method: ${method}, Config state:`, {
1085
+ hasRequestConfig: !!requestConfig,
1086
+ requestConfigBaseUrl: requestConfig?.baseUrl ? "set" : "not set",
1087
+ requestConfigApiToken: requestConfig?.apiToken ? `set (${requestConfig.apiToken.length} chars)` : "not set",
1088
+ globalConfigBaseUrl: globalConfig.baseUrl ? "set" : "not set",
1089
+ globalConfigApiToken: globalConfig.apiToken ? `set (${globalConfig.apiToken.length} chars)` : "not set",
1090
+ effectiveBaseUrl: baseUrl ? "set" : "not set",
1091
+ effectiveApiToken: apiToken ? `set (${apiToken.length} chars)` : "not set"
1092
+ });
1083
1093
  if (!baseUrl) {
1084
1094
  throw new Error(
1085
1095
  "Skedyul client not configured: missing baseUrl. Set SKEDYUL_API_URL environment variable or call configure()."
@@ -3402,6 +3412,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
3402
3412
  if (pathname === "/mcp" && req.method === "POST") {
3403
3413
  try {
3404
3414
  const body = await parseJSONBody(req);
3415
+ if (body?.method === "tools/call") {
3416
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
3417
+ method: body.method,
3418
+ toolName: body.params?.name,
3419
+ hasArguments: !!body.params?.arguments,
3420
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
3421
+ hasEnv: !!body.params?.arguments?.env,
3422
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
3423
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
3424
+ }, null, 2));
3425
+ }
3405
3426
  if (body?.method === "tools/list") {
3406
3427
  sendJSON(res, 200, {
3407
3428
  jsonrpc: "2.0",
@@ -4071,11 +4092,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
4071
4092
  } else if (rpcMethod === "tools/call") {
4072
4093
  const toolName = params?.name;
4073
4094
  const rawArgs = params?.arguments ?? {};
4095
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
4096
+ toolName,
4097
+ hasArguments: !!params?.arguments,
4098
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
4099
+ hasEnv: "env" in rawArgs,
4100
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
4101
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
4102
+ }, null, 2));
4074
4103
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
4075
4104
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
4076
4105
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
4077
4106
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
4078
4107
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
4108
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
4109
+ hasSkedyulFormat,
4110
+ hasToolEnv: !!toolEnv,
4111
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
4112
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
4113
+ }, null, 2));
4079
4114
  let toolKey = null;
4080
4115
  let tool = null;
4081
4116
  for (const [key, t] of Object.entries(registry)) {
@@ -1234,6 +1234,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
1234
1234
  if (pathname === "/mcp" && req.method === "POST") {
1235
1235
  try {
1236
1236
  const body = await parseJSONBody(req);
1237
+ if (body?.method === "tools/call") {
1238
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
1239
+ method: body.method,
1240
+ toolName: body.params?.name,
1241
+ hasArguments: !!body.params?.arguments,
1242
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
1243
+ hasEnv: !!body.params?.arguments?.env,
1244
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
1245
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
1246
+ }, null, 2));
1247
+ }
1237
1248
  if (body?.method === "tools/list") {
1238
1249
  sendJSON(res, 200, {
1239
1250
  jsonrpc: "2.0",
@@ -1903,11 +1914,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1903
1914
  } else if (rpcMethod === "tools/call") {
1904
1915
  const toolName = params?.name;
1905
1916
  const rawArgs = params?.arguments ?? {};
1917
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
1918
+ toolName,
1919
+ hasArguments: !!params?.arguments,
1920
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
1921
+ hasEnv: "env" in rawArgs,
1922
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
1923
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
1924
+ }, null, 2));
1906
1925
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
1907
1926
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
1908
1927
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
1909
1928
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
1910
1929
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
1930
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
1931
+ hasSkedyulFormat,
1932
+ hasToolEnv: !!toolEnv,
1933
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
1934
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
1935
+ }, null, 2));
1911
1936
  let toolKey = null;
1912
1937
  let tool = null;
1913
1938
  for (const [key, t] of Object.entries(registry)) {
@@ -972,6 +972,16 @@ function getConfig() {
972
972
  async function callCore(method, params) {
973
973
  const effectiveConfig = getEffectiveConfig();
974
974
  const { baseUrl, apiToken } = effectiveConfig;
975
+ const requestConfig = requestConfigStorage.getStore();
976
+ console.log(`[callCore] Method: ${method}, Config state:`, {
977
+ hasRequestConfig: !!requestConfig,
978
+ requestConfigBaseUrl: requestConfig?.baseUrl ? "set" : "not set",
979
+ requestConfigApiToken: requestConfig?.apiToken ? `set (${requestConfig.apiToken.length} chars)` : "not set",
980
+ globalConfigBaseUrl: globalConfig.baseUrl ? "set" : "not set",
981
+ globalConfigApiToken: globalConfig.apiToken ? `set (${globalConfig.apiToken.length} chars)` : "not set",
982
+ effectiveBaseUrl: baseUrl ? "set" : "not set",
983
+ effectiveApiToken: apiToken ? `set (${apiToken.length} chars)` : "not set"
984
+ });
975
985
  if (!baseUrl) {
976
986
  throw new Error(
977
987
  "Skedyul client not configured: missing baseUrl. Set SKEDYUL_API_URL environment variable or call configure()."
@@ -2902,6 +2912,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
2902
2912
  if (pathname === "/mcp" && req.method === "POST") {
2903
2913
  try {
2904
2914
  const body = await parseJSONBody(req);
2915
+ if (body?.method === "tools/call") {
2916
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
2917
+ method: body.method,
2918
+ toolName: body.params?.name,
2919
+ hasArguments: !!body.params?.arguments,
2920
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
2921
+ hasEnv: !!body.params?.arguments?.env,
2922
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
2923
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
2924
+ }, null, 2));
2925
+ }
2905
2926
  if (body?.method === "tools/list") {
2906
2927
  sendJSON(res, 200, {
2907
2928
  jsonrpc: "2.0",
@@ -3571,11 +3592,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
3571
3592
  } else if (rpcMethod === "tools/call") {
3572
3593
  const toolName = params?.name;
3573
3594
  const rawArgs = params?.arguments ?? {};
3595
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
3596
+ toolName,
3597
+ hasArguments: !!params?.arguments,
3598
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
3599
+ hasEnv: "env" in rawArgs,
3600
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
3601
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
3602
+ }, null, 2));
3574
3603
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
3575
3604
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
3576
3605
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
3577
3606
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
3578
3607
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
3608
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
3609
+ hasSkedyulFormat,
3610
+ hasToolEnv: !!toolEnv,
3611
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
3612
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
3613
+ }, null, 2));
3579
3614
  let toolKey = null;
3580
3615
  let tool = null;
3581
3616
  for (const [key, t] of Object.entries(registry)) {
package/dist/index.js CHANGED
@@ -1137,6 +1137,16 @@ function getConfig() {
1137
1137
  async function callCore(method, params) {
1138
1138
  const effectiveConfig = getEffectiveConfig();
1139
1139
  const { baseUrl, apiToken } = effectiveConfig;
1140
+ const requestConfig = requestConfigStorage.getStore();
1141
+ console.log(`[callCore] Method: ${method}, Config state:`, {
1142
+ hasRequestConfig: !!requestConfig,
1143
+ requestConfigBaseUrl: requestConfig?.baseUrl ? "set" : "not set",
1144
+ requestConfigApiToken: requestConfig?.apiToken ? `set (${requestConfig.apiToken.length} chars)` : "not set",
1145
+ globalConfigBaseUrl: globalConfig.baseUrl ? "set" : "not set",
1146
+ globalConfigApiToken: globalConfig.apiToken ? `set (${globalConfig.apiToken.length} chars)` : "not set",
1147
+ effectiveBaseUrl: baseUrl ? "set" : "not set",
1148
+ effectiveApiToken: apiToken ? `set (${apiToken.length} chars)` : "not set"
1149
+ });
1140
1150
  if (!baseUrl) {
1141
1151
  throw new Error(
1142
1152
  "Skedyul client not configured: missing baseUrl. Set SKEDYUL_API_URL environment variable or call configure()."
@@ -3067,6 +3077,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
3067
3077
  if (pathname === "/mcp" && req.method === "POST") {
3068
3078
  try {
3069
3079
  const body = await parseJSONBody(req);
3080
+ if (body?.method === "tools/call") {
3081
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
3082
+ method: body.method,
3083
+ toolName: body.params?.name,
3084
+ hasArguments: !!body.params?.arguments,
3085
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
3086
+ hasEnv: !!body.params?.arguments?.env,
3087
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
3088
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
3089
+ }, null, 2));
3090
+ }
3070
3091
  if (body?.method === "tools/list") {
3071
3092
  sendJSON(res, 200, {
3072
3093
  jsonrpc: "2.0",
@@ -3736,11 +3757,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
3736
3757
  } else if (rpcMethod === "tools/call") {
3737
3758
  const toolName = params?.name;
3738
3759
  const rawArgs = params?.arguments ?? {};
3760
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
3761
+ toolName,
3762
+ hasArguments: !!params?.arguments,
3763
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
3764
+ hasEnv: "env" in rawArgs,
3765
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
3766
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
3767
+ }, null, 2));
3739
3768
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
3740
3769
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
3741
3770
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
3742
3771
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
3743
3772
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
3773
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
3774
+ hasSkedyulFormat,
3775
+ hasToolEnv: !!toolEnv,
3776
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
3777
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
3778
+ }, null, 2));
3744
3779
  let toolKey = null;
3745
3780
  let tool = null;
3746
3781
  for (const [key, t] of Object.entries(registry)) {
package/dist/server.js CHANGED
@@ -1234,6 +1234,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
1234
1234
  if (pathname === "/mcp" && req.method === "POST") {
1235
1235
  try {
1236
1236
  const body = await parseJSONBody(req);
1237
+ if (body?.method === "tools/call") {
1238
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
1239
+ method: body.method,
1240
+ toolName: body.params?.name,
1241
+ hasArguments: !!body.params?.arguments,
1242
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
1243
+ hasEnv: !!body.params?.arguments?.env,
1244
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
1245
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
1246
+ }, null, 2));
1247
+ }
1237
1248
  if (body?.method === "tools/list") {
1238
1249
  sendJSON(res, 200, {
1239
1250
  jsonrpc: "2.0",
@@ -1903,11 +1914,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1903
1914
  } else if (rpcMethod === "tools/call") {
1904
1915
  const toolName = params?.name;
1905
1916
  const rawArgs = params?.arguments ?? {};
1917
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
1918
+ toolName,
1919
+ hasArguments: !!params?.arguments,
1920
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
1921
+ hasEnv: "env" in rawArgs,
1922
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
1923
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
1924
+ }, null, 2));
1906
1925
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
1907
1926
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
1908
1927
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
1909
1928
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
1910
1929
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
1930
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
1931
+ hasSkedyulFormat,
1932
+ hasToolEnv: !!toolEnv,
1933
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
1934
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
1935
+ }, null, 2));
1911
1936
  let toolKey = null;
1912
1937
  let tool = null;
1913
1938
  for (const [key, t] of Object.entries(registry)) {
@@ -1173,6 +1173,17 @@ function createDedicatedServerInstance(config, tools, callTool, state, mcpServer
1173
1173
  if (pathname === "/mcp" && req.method === "POST") {
1174
1174
  try {
1175
1175
  const body = await parseJSONBody(req);
1176
+ if (body?.method === "tools/call") {
1177
+ console.log("[dedicated.ts /mcp] Received tools/call request:", JSON.stringify({
1178
+ method: body.method,
1179
+ toolName: body.params?.name,
1180
+ hasArguments: !!body.params?.arguments,
1181
+ argumentKeys: body.params?.arguments ? Object.keys(body.params.arguments) : [],
1182
+ hasEnv: !!body.params?.arguments?.env,
1183
+ envKeys: body.params?.arguments?.env ? Object.keys(body.params.arguments.env) : [],
1184
+ hasApiToken: !!body.params?.arguments?.env?.SKEDYUL_API_TOKEN
1185
+ }, null, 2));
1186
+ }
1176
1187
  if (body?.method === "tools/list") {
1177
1188
  sendJSON(res, 200, {
1178
1189
  jsonrpc: "2.0",
@@ -1842,11 +1853,25 @@ function createServerlessInstance(config, tools, callTool, state, mcpServer, reg
1842
1853
  } else if (rpcMethod === "tools/call") {
1843
1854
  const toolName = params?.name;
1844
1855
  const rawArgs = params?.arguments ?? {};
1856
+ console.log("[serverless.ts /mcp] Received tools/call request:", JSON.stringify({
1857
+ toolName,
1858
+ hasArguments: !!params?.arguments,
1859
+ argumentKeys: rawArgs ? Object.keys(rawArgs) : [],
1860
+ hasEnv: "env" in rawArgs,
1861
+ envKeys: rawArgs.env ? Object.keys(rawArgs.env) : [],
1862
+ hasApiToken: !!rawArgs.env?.SKEDYUL_API_TOKEN
1863
+ }, null, 2));
1845
1864
  const hasSkedyulFormat = "inputs" in rawArgs || "env" in rawArgs || "context" in rawArgs || "invocation" in rawArgs;
1846
1865
  const toolInputs = hasSkedyulFormat ? rawArgs.inputs ?? {} : rawArgs;
1847
1866
  const toolContext = hasSkedyulFormat ? rawArgs.context : void 0;
1848
1867
  const toolEnv = hasSkedyulFormat ? rawArgs.env : void 0;
1849
1868
  const toolInvocation = hasSkedyulFormat ? rawArgs.invocation : void 0;
1869
+ console.log("[serverless.ts /mcp] Extracted env:", JSON.stringify({
1870
+ hasSkedyulFormat,
1871
+ hasToolEnv: !!toolEnv,
1872
+ toolEnvKeys: toolEnv ? Object.keys(toolEnv) : [],
1873
+ hasApiToken: toolEnv?.SKEDYUL_API_TOKEN ? `yes (${toolEnv.SKEDYUL_API_TOKEN.length} chars)` : "no"
1874
+ }, null, 2));
1850
1875
  let toolKey = null;
1851
1876
  let tool = null;
1852
1877
  for (const [key, t] of Object.entries(registry)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",