skedyul 1.4.0 → 1.4.4

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
@@ -2776,7 +2776,13 @@ function getBakedExecutableEnv() {
2776
2776
  }
2777
2777
  function buildToolExecutionEnv(requestEnv = {}) {
2778
2778
  const bakedEnv = getBakedExecutableEnv();
2779
- const merged = { ...bakedEnv };
2779
+ const merged = {};
2780
+ for (const [key, value] of Object.entries(process.env)) {
2781
+ if (value !== void 0) {
2782
+ merged[key] = value;
2783
+ }
2784
+ }
2785
+ Object.assign(merged, bakedEnv);
2780
2786
  for (const [key, value] of Object.entries(requestEnv)) {
2781
2787
  if (value !== void 0) {
2782
2788
  merged[key] = value;
@@ -14,6 +14,8 @@ export interface NavigationItem {
14
14
  href: string;
15
15
  /** Optional Lucide icon name */
16
16
  icon?: string;
17
+ /** When true, item is omitted from rendered navigation (supports Liquid templates) */
18
+ hidden?: boolean | string;
17
19
  }
18
20
  /**
19
21
  * Navigation section with title and items.
@@ -970,6 +970,82 @@ export declare const ai: {
970
970
  */
971
971
  generateObject<S extends z.ZodTypeAny>(options: GenerateObjectOptions<S>): Promise<z.infer<S>>;
972
972
  };
973
+ export interface CallStartParams {
974
+ /** Communication channel (the Twilio number) this call belongs to */
975
+ communicationChannelId: string;
976
+ /** Caller number in E.164 */
977
+ fromNumber: string;
978
+ /** The dialed number (our Twilio number) in E.164 */
979
+ toNumber: string;
980
+ /** Number the call is forwarded/dialed to (the human agent leg) */
981
+ forwardedToNumber?: string | null;
982
+ direction?: 'INBOUND' | 'OUTBOUND';
983
+ /** Provider call id (Twilio CallSid) */
984
+ externalId?: string | null;
985
+ /** Raw provider status string (e.g. Twilio "ringing") */
986
+ externalStatus?: string | null;
987
+ /** Transcription provider/engine name (e.g. "deepgram", "google") */
988
+ transcriptionEngine?: string | null;
989
+ callerName?: string | null;
990
+ callerContactId?: string | null;
991
+ agentName?: string | null;
992
+ agentMemberId?: string | null;
993
+ }
994
+ export interface CallStartResult {
995
+ callSessionId: string;
996
+ threadId: string;
997
+ }
998
+ export interface CallAppendTranscriptParams {
999
+ callSessionId: string;
1000
+ /** Utterance text */
1001
+ content: string;
1002
+ track?: 'inbound_track' | 'outbound_track';
1003
+ speakerLabel?: string;
1004
+ confidence?: number;
1005
+ stability?: number;
1006
+ sequenceId?: number;
1007
+ isFinal?: boolean;
1008
+ externalId?: string | null;
1009
+ }
1010
+ export interface CallEndParams {
1011
+ callSessionId: string;
1012
+ status?: 'SCHEDULED' | 'RINGING' | 'IN_PROGRESS' | 'ON_HOLD' | 'ENDED' | 'MISSED' | 'DECLINED' | 'FAILED';
1013
+ externalStatus?: string | null;
1014
+ /** Call duration in seconds */
1015
+ duration?: number | null;
1016
+ endedAt?: string | null;
1017
+ recordingUrl?: string | null;
1018
+ recordingSid?: string | null;
1019
+ }
1020
+ export interface CallSummarizeResult {
1021
+ callSessionId: string;
1022
+ summary: string | null;
1023
+ }
1024
+ /**
1025
+ * Call client - manage a voice call session and its real-time transcript.
1026
+ *
1027
+ * Designed for the phone integration's Twilio Real-Time Transcription webhooks:
1028
+ * - `start` when the inbound call arrives (creates the CallSession + thread + CALL block)
1029
+ * - `appendTranscript` for each `transcription-content` event (stored as a tagged ThreadMessage)
1030
+ * - `end` on call completion / `transcription-stopped`
1031
+ * - `summarize` to generate and persist an end-of-call summary
1032
+ *
1033
+ * **Requires sk_wkp_ or sk_app_ token.**
1034
+ */
1035
+ export declare const call: {
1036
+ start(params: CallStartParams): Promise<CallStartResult>;
1037
+ appendTranscript(params: CallAppendTranscriptParams): Promise<{
1038
+ messageId: string;
1039
+ threadId: string;
1040
+ }>;
1041
+ end(params: CallEndParams): Promise<{
1042
+ callSessionId: string;
1043
+ threadId: string;
1044
+ }>;
1045
+ summarize(params: {
1046
+ callSessionId: string;
1047
+ }): Promise<CallSummarizeResult>;
1048
+ };
973
1049
  /**
974
1050
  * Parameters for report.generate().
975
1051
  */
@@ -167,7 +167,13 @@ function getBakedExecutableEnv() {
167
167
  }
168
168
  function buildToolExecutionEnv(requestEnv = {}) {
169
169
  const bakedEnv = getBakedExecutableEnv();
170
- const merged = { ...bakedEnv };
170
+ const merged = {};
171
+ for (const [key, value] of Object.entries(process.env)) {
172
+ if (value !== void 0) {
173
+ merged[key] = value;
174
+ }
175
+ }
176
+ Object.assign(merged, bakedEnv);
171
177
  for (const [key, value] of Object.entries(requestEnv)) {
172
178
  if (value !== void 0) {
173
179
  merged[key] = value;
@@ -1630,7 +1630,9 @@ var NavigationItemSchema = z7.object({
1630
1630
  /** URL href (supports Liquid templates with path_params and context) */
1631
1631
  href: z7.string(),
1632
1632
  /** Optional icon name */
1633
- icon: z7.string().optional()
1633
+ icon: z7.string().optional(),
1634
+ /** When true, item is omitted from rendered navigation (supports Liquid templates) */
1635
+ hidden: z7.union([z7.boolean(), z7.string()]).optional()
1634
1636
  });
1635
1637
  var NavigationSectionSchema = z7.object({
1636
1638
  /** Section title (supports Liquid templates) */
@@ -1984,7 +1986,13 @@ function getBakedExecutableEnv() {
1984
1986
  }
1985
1987
  function buildToolExecutionEnv(requestEnv = {}) {
1986
1988
  const bakedEnv = getBakedExecutableEnv();
1987
- const merged = { ...bakedEnv };
1989
+ const merged = {};
1990
+ for (const [key, value] of Object.entries(process.env)) {
1991
+ if (value !== void 0) {
1992
+ merged[key] = value;
1993
+ }
1994
+ }
1995
+ Object.assign(merged, bakedEnv);
1988
1996
  for (const [key, value] of Object.entries(requestEnv)) {
1989
1997
  if (value !== void 0) {
1990
1998
  merged[key] = value;
@@ -3128,6 +3136,34 @@ var ai = {
3128
3136
  return data;
3129
3137
  }
3130
3138
  };
3139
+ var call = {
3140
+ async start(params) {
3141
+ const { data } = await callCore("call.start", {
3142
+ ...params
3143
+ });
3144
+ return data;
3145
+ },
3146
+ async appendTranscript(params) {
3147
+ const { data } = await callCore(
3148
+ "call.appendTranscript",
3149
+ { ...params }
3150
+ );
3151
+ return data;
3152
+ },
3153
+ async end(params) {
3154
+ const { data } = await callCore(
3155
+ "call.end",
3156
+ { ...params }
3157
+ );
3158
+ return data;
3159
+ },
3160
+ async summarize(params) {
3161
+ const { data } = await callCore("call.summarize", {
3162
+ ...params
3163
+ });
3164
+ return data;
3165
+ }
3166
+ };
3131
3167
  var report = {
3132
3168
  /**
3133
3169
  * Generate a report from a template.
@@ -4740,24 +4776,24 @@ async function handleMcpBatchRoute(req, ctx) {
4740
4776
  };
4741
4777
  }
4742
4778
  const perCallTimeoutMs = deadline ? Math.min(deadline, 25e3) : 25e3;
4743
- const executeWithTimeout = async (call, timeoutMs) => {
4779
+ const executeWithTimeout = async (call2, timeoutMs) => {
4744
4780
  return new Promise(async (resolve4) => {
4745
4781
  const timeoutHandle = setTimeout(() => {
4746
4782
  resolve4({
4747
- id: call.id,
4783
+ id: call2.id,
4748
4784
  success: false,
4749
4785
  error: "Timeout",
4750
4786
  timedOut: true
4751
4787
  });
4752
4788
  }, timeoutMs);
4753
4789
  try {
4754
- const toolName = call.name;
4755
- const toolArgs = call.arguments ?? {};
4790
+ const toolName = call2.name;
4791
+ const toolArgs = call2.arguments ?? {};
4756
4792
  const found = findToolInRegistry(ctx.registry, toolName);
4757
4793
  if (!found) {
4758
4794
  clearTimeout(timeoutHandle);
4759
4795
  resolve4({
4760
- id: call.id,
4796
+ id: call2.id,
4761
4797
  success: false,
4762
4798
  error: `Tool "${toolName}" not found`
4763
4799
  });
@@ -4775,13 +4811,13 @@ async function handleMcpBatchRoute(req, ctx) {
4775
4811
  const isFailure2 = "success" in toolResult && toolResult.success === false || "error" in toolResult && toolResult.error != null;
4776
4812
  if (isFailure2) {
4777
4813
  resolve4({
4778
- id: call.id,
4814
+ id: call2.id,
4779
4815
  success: false,
4780
4816
  error: "error" in toolResult && toolResult.error ? typeof toolResult.error === "string" ? toolResult.error : JSON.stringify(toolResult.error) : "Tool execution failed"
4781
4817
  });
4782
4818
  } else {
4783
4819
  resolve4({
4784
- id: call.id,
4820
+ id: call2.id,
4785
4821
  success: true,
4786
4822
  result: "output" in toolResult ? toolResult.output : toolResult
4787
4823
  });
@@ -4789,7 +4825,7 @@ async function handleMcpBatchRoute(req, ctx) {
4789
4825
  } catch (err) {
4790
4826
  clearTimeout(timeoutHandle);
4791
4827
  resolve4({
4792
- id: call.id,
4828
+ id: call2.id,
4793
4829
  success: false,
4794
4830
  error: err instanceof Error ? err.message : String(err)
4795
4831
  });
@@ -4797,7 +4833,7 @@ async function handleMcpBatchRoute(req, ctx) {
4797
4833
  });
4798
4834
  };
4799
4835
  const results = await Promise.all(
4800
- calls.map((call) => executeWithTimeout(call, perCallTimeoutMs))
4836
+ calls.map((call2) => executeWithTimeout(call2, perCallTimeoutMs))
4801
4837
  );
4802
4838
  return {
4803
4839
  status: 200,
@@ -7579,6 +7615,7 @@ export {
7579
7615
  ai,
7580
7616
  buildAgentContext,
7581
7617
  calculateWaitTime,
7618
+ call,
7582
7619
  communicationChannel,
7583
7620
  compileAgent,
7584
7621
  compileWorkflow,
package/dist/index.d.ts CHANGED
@@ -6,8 +6,8 @@ export { DEFAULT_DOCKERFILE } from './dockerfile';
6
6
  export { InstallError, MissingRequiredFieldError, AuthenticationError, InvalidConfigurationError, ConnectionError, AppAuthInvalidError, } from './errors';
7
7
  export type { InstallErrorCode } from './errors';
8
8
  export { z };
9
- export { workplace, communicationChannel, instance, token, file, webhook, cron, event, resource, ai, report, configure, getConfig, runWithConfig, createInstanceClient, } from './core/client';
10
- export type { InstanceClient, InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileInfo, FileUrlResponse, FileUploadParams, FileUploadResult, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, CronSubscribeParams, CronSubscribeResult, CronSubscriptionItem, CronListOptions, EventCreateResult, EventCreateOptions, ResourceLinkParams, ResourceLinkResult, AITextContent, AIFileContent, AIImageContent, AIMessageContent, AIMessage, GenerateObjectOptions, GenerateObjectResult, ReportGenerateParams, ReportGenerateResult, ReportDefineParams, ReportDefineResult, ReportListParams, ReportListItem, ReportListResult, ReportDefinition, } from './core/client';
9
+ export { workplace, communicationChannel, instance, token, file, webhook, cron, event, resource, ai, call, report, configure, getConfig, runWithConfig, createInstanceClient, } from './core/client';
10
+ export type { InstanceClient, InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileInfo, FileUrlResponse, FileUploadParams, FileUploadResult, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, CallStartParams, CallStartResult, CallAppendTranscriptParams, CallEndParams, CallSummarizeResult, CronSubscribeParams, CronSubscribeResult, CronSubscriptionItem, CronListOptions, EventCreateResult, EventCreateOptions, ResourceLinkParams, ResourceLinkResult, AITextContent, AIFileContent, AIImageContent, AIMessageContent, AIMessage, GenerateObjectOptions, GenerateObjectResult, ReportGenerateParams, ReportGenerateResult, ReportDefineParams, ReportDefineResult, ReportListParams, ReportListItem, ReportListResult, ReportDefinition, } from './core/client';
11
11
  export { createContextLogger } from './server/logger';
12
12
  export type { ContextLogger } from './server/logger';
13
13
  declare const _default: {
package/dist/index.js CHANGED
@@ -241,6 +241,7 @@ __export(index_exports, {
241
241
  ai: () => ai,
242
242
  buildAgentContext: () => buildAgentContext,
243
243
  calculateWaitTime: () => calculateWaitTime,
244
+ call: () => call,
244
245
  communicationChannel: () => communicationChannel,
245
246
  compileAgent: () => compileAgent,
246
247
  compileWorkflow: () => compileWorkflow,
@@ -1955,7 +1956,9 @@ var NavigationItemSchema = import_v47.z.object({
1955
1956
  /** URL href (supports Liquid templates with path_params and context) */
1956
1957
  href: import_v47.z.string(),
1957
1958
  /** Optional icon name */
1958
- icon: import_v47.z.string().optional()
1959
+ icon: import_v47.z.string().optional(),
1960
+ /** When true, item is omitted from rendered navigation (supports Liquid templates) */
1961
+ hidden: import_v47.z.union([import_v47.z.boolean(), import_v47.z.string()]).optional()
1959
1962
  });
1960
1963
  var NavigationSectionSchema = import_v47.z.object({
1961
1964
  /** Section title (supports Liquid templates) */
@@ -2309,7 +2312,13 @@ function getBakedExecutableEnv() {
2309
2312
  }
2310
2313
  function buildToolExecutionEnv(requestEnv = {}) {
2311
2314
  const bakedEnv = getBakedExecutableEnv();
2312
- const merged = { ...bakedEnv };
2315
+ const merged = {};
2316
+ for (const [key, value] of Object.entries(process.env)) {
2317
+ if (value !== void 0) {
2318
+ merged[key] = value;
2319
+ }
2320
+ }
2321
+ Object.assign(merged, bakedEnv);
2313
2322
  for (const [key, value] of Object.entries(requestEnv)) {
2314
2323
  if (value !== void 0) {
2315
2324
  merged[key] = value;
@@ -3453,6 +3462,34 @@ var ai = {
3453
3462
  return data;
3454
3463
  }
3455
3464
  };
3465
+ var call = {
3466
+ async start(params) {
3467
+ const { data } = await callCore("call.start", {
3468
+ ...params
3469
+ });
3470
+ return data;
3471
+ },
3472
+ async appendTranscript(params) {
3473
+ const { data } = await callCore(
3474
+ "call.appendTranscript",
3475
+ { ...params }
3476
+ );
3477
+ return data;
3478
+ },
3479
+ async end(params) {
3480
+ const { data } = await callCore(
3481
+ "call.end",
3482
+ { ...params }
3483
+ );
3484
+ return data;
3485
+ },
3486
+ async summarize(params) {
3487
+ const { data } = await callCore("call.summarize", {
3488
+ ...params
3489
+ });
3490
+ return data;
3491
+ }
3492
+ };
3456
3493
  var report = {
3457
3494
  /**
3458
3495
  * Generate a report from a template.
@@ -5065,24 +5102,24 @@ async function handleMcpBatchRoute(req, ctx) {
5065
5102
  };
5066
5103
  }
5067
5104
  const perCallTimeoutMs = deadline ? Math.min(deadline, 25e3) : 25e3;
5068
- const executeWithTimeout = async (call, timeoutMs) => {
5105
+ const executeWithTimeout = async (call2, timeoutMs) => {
5069
5106
  return new Promise(async (resolve4) => {
5070
5107
  const timeoutHandle = setTimeout(() => {
5071
5108
  resolve4({
5072
- id: call.id,
5109
+ id: call2.id,
5073
5110
  success: false,
5074
5111
  error: "Timeout",
5075
5112
  timedOut: true
5076
5113
  });
5077
5114
  }, timeoutMs);
5078
5115
  try {
5079
- const toolName = call.name;
5080
- const toolArgs = call.arguments ?? {};
5116
+ const toolName = call2.name;
5117
+ const toolArgs = call2.arguments ?? {};
5081
5118
  const found = findToolInRegistry(ctx.registry, toolName);
5082
5119
  if (!found) {
5083
5120
  clearTimeout(timeoutHandle);
5084
5121
  resolve4({
5085
- id: call.id,
5122
+ id: call2.id,
5086
5123
  success: false,
5087
5124
  error: `Tool "${toolName}" not found`
5088
5125
  });
@@ -5100,13 +5137,13 @@ async function handleMcpBatchRoute(req, ctx) {
5100
5137
  const isFailure2 = "success" in toolResult && toolResult.success === false || "error" in toolResult && toolResult.error != null;
5101
5138
  if (isFailure2) {
5102
5139
  resolve4({
5103
- id: call.id,
5140
+ id: call2.id,
5104
5141
  success: false,
5105
5142
  error: "error" in toolResult && toolResult.error ? typeof toolResult.error === "string" ? toolResult.error : JSON.stringify(toolResult.error) : "Tool execution failed"
5106
5143
  });
5107
5144
  } else {
5108
5145
  resolve4({
5109
- id: call.id,
5146
+ id: call2.id,
5110
5147
  success: true,
5111
5148
  result: "output" in toolResult ? toolResult.output : toolResult
5112
5149
  });
@@ -5114,7 +5151,7 @@ async function handleMcpBatchRoute(req, ctx) {
5114
5151
  } catch (err) {
5115
5152
  clearTimeout(timeoutHandle);
5116
5153
  resolve4({
5117
- id: call.id,
5154
+ id: call2.id,
5118
5155
  success: false,
5119
5156
  error: err instanceof Error ? err.message : String(err)
5120
5157
  });
@@ -5122,7 +5159,7 @@ async function handleMcpBatchRoute(req, ctx) {
5122
5159
  });
5123
5160
  };
5124
5161
  const results = await Promise.all(
5125
- calls.map((call) => executeWithTimeout(call, perCallTimeoutMs))
5162
+ calls.map((call2) => executeWithTimeout(call2, perCallTimeoutMs))
5126
5163
  );
5127
5164
  return {
5128
5165
  status: 200,
@@ -7905,6 +7942,7 @@ var index_default = { z: import_v413.z };
7905
7942
  ai,
7906
7943
  buildAgentContext,
7907
7944
  calculateWaitTime,
7945
+ call,
7908
7946
  communicationChannel,
7909
7947
  compileAgent,
7910
7948
  compileWorkflow,
package/dist/schemas.d.ts CHANGED
@@ -2429,6 +2429,7 @@ export declare const NavigationItemSchema: z.ZodObject<{
2429
2429
  label: z.ZodString;
2430
2430
  href: z.ZodString;
2431
2431
  icon: z.ZodOptional<z.ZodString>;
2432
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
2432
2433
  }, z.core.$strip>;
2433
2434
  /** Navigation section with title and items */
2434
2435
  export declare const NavigationSectionSchema: z.ZodObject<{
@@ -2437,6 +2438,7 @@ export declare const NavigationSectionSchema: z.ZodObject<{
2437
2438
  label: z.ZodString;
2438
2439
  href: z.ZodString;
2439
2440
  icon: z.ZodOptional<z.ZodString>;
2441
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
2440
2442
  }, z.core.$strip>>;
2441
2443
  }, z.core.$strip>;
2442
2444
  /** Sidebar navigation configuration */
@@ -2447,6 +2449,7 @@ export declare const NavigationSidebarSchema: z.ZodObject<{
2447
2449
  label: z.ZodString;
2448
2450
  href: z.ZodString;
2449
2451
  icon: z.ZodOptional<z.ZodString>;
2452
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
2450
2453
  }, z.core.$strip>>;
2451
2454
  }, z.core.$strip>>;
2452
2455
  }, z.core.$strip>;
@@ -2471,6 +2474,7 @@ export declare const NavigationConfigSchema: z.ZodObject<{
2471
2474
  label: z.ZodString;
2472
2475
  href: z.ZodString;
2473
2476
  icon: z.ZodOptional<z.ZodString>;
2477
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
2474
2478
  }, z.core.$strip>>;
2475
2479
  }, z.core.$strip>>;
2476
2480
  }, z.core.$strip>>;
@@ -2510,6 +2514,7 @@ export declare const PageDefinitionSchema: z.ZodObject<{
2510
2514
  label: z.ZodString;
2511
2515
  href: z.ZodString;
2512
2516
  icon: z.ZodOptional<z.ZodString>;
2517
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
2513
2518
  }, z.core.$strip>>;
2514
2519
  }, z.core.$strip>>;
2515
2520
  }, z.core.$strip>>;
@@ -3344,6 +3349,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
3344
3349
  label: z.ZodString;
3345
3350
  href: z.ZodString;
3346
3351
  icon: z.ZodOptional<z.ZodString>;
3352
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
3347
3353
  }, z.core.$strip>>;
3348
3354
  }, z.core.$strip>>;
3349
3355
  }, z.core.$strip>>;
@@ -3377,6 +3383,7 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
3377
3383
  label: z.ZodString;
3378
3384
  href: z.ZodString;
3379
3385
  icon: z.ZodOptional<z.ZodString>;
3386
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
3380
3387
  }, z.core.$strip>>;
3381
3388
  }, z.core.$strip>>;
3382
3389
  }, z.core.$strip>>;
@@ -4048,6 +4055,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
4048
4055
  label: z.ZodString;
4049
4056
  href: z.ZodString;
4050
4057
  icon: z.ZodOptional<z.ZodString>;
4058
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
4051
4059
  }, z.core.$strip>>;
4052
4060
  }, z.core.$strip>>;
4053
4061
  }, z.core.$strip>>;
@@ -4081,6 +4089,7 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
4081
4089
  label: z.ZodString;
4082
4090
  href: z.ZodString;
4083
4091
  icon: z.ZodOptional<z.ZodString>;
4092
+ hidden: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
4084
4093
  }, z.core.$strip>>;
4085
4094
  }, z.core.$strip>>;
4086
4095
  }, z.core.$strip>>;
@@ -11,8 +11,12 @@ export declare function parseNumberEnv(value?: string): number | null;
11
11
  */
12
12
  export declare function getBakedExecutableEnv(): Record<string, string>;
13
13
  /**
14
- * Env exposed to tool handlers: per-request values from the platform win over baked secrets.
15
- * Avoids leaking unrelated keys left in process.env during local `dev serve`.
14
+ * Env exposed to tool handlers.
15
+ *
16
+ * Layering (lowest → highest priority):
17
+ * 1. process.env — container-local values (`dev serve` loads provision secrets here)
18
+ * 2. MCP_ENV_JSON / MCP_ENV — baked secrets in deployed containers
19
+ * 3. requestEnv — per-request runtime values from the platform (token, API URL)
16
20
  */
17
21
  export declare function buildToolExecutionEnv(requestEnv?: Record<string, string | undefined>): Record<string, string | undefined>;
18
22
  /**
package/dist/server.js CHANGED
@@ -167,7 +167,13 @@ function getBakedExecutableEnv() {
167
167
  }
168
168
  function buildToolExecutionEnv(requestEnv = {}) {
169
169
  const bakedEnv = getBakedExecutableEnv();
170
- const merged = { ...bakedEnv };
170
+ const merged = {};
171
+ for (const [key, value] of Object.entries(process.env)) {
172
+ if (value !== void 0) {
173
+ merged[key] = value;
174
+ }
175
+ }
176
+ Object.assign(merged, bakedEnv);
171
177
  for (const [key, value] of Object.entries(requestEnv)) {
172
178
  if (value !== void 0) {
173
179
  merged[key] = value;
@@ -128,7 +128,13 @@ function getBakedExecutableEnv() {
128
128
  }
129
129
  function buildToolExecutionEnv(requestEnv = {}) {
130
130
  const bakedEnv = getBakedExecutableEnv();
131
- const merged = { ...bakedEnv };
131
+ const merged = {};
132
+ for (const [key, value] of Object.entries(process.env)) {
133
+ if (value !== void 0) {
134
+ merged[key] = value;
135
+ }
136
+ }
137
+ Object.assign(merged, bakedEnv);
132
138
  for (const [key, value] of Object.entries(requestEnv)) {
133
139
  if (value !== void 0) {
134
140
  merged[key] = value;
@@ -251,10 +251,10 @@ export type WorkflowMetadata = z.infer<typeof WorkflowMetadataSchema>;
251
251
  * Workflow execution status
252
252
  */
253
253
  export declare const WorkflowExecutionStatusSchema: z.ZodEnum<{
254
+ FAILED: "FAILED";
254
255
  PENDING: "PENDING";
255
256
  RUNNING: "RUNNING";
256
257
  COMPLETED: "COMPLETED";
257
- FAILED: "FAILED";
258
258
  CANCELLED: "CANCELLED";
259
259
  WAITING: "WAITING";
260
260
  }>;
@@ -264,10 +264,10 @@ export type WorkflowExecutionStatus = z.infer<typeof WorkflowExecutionStatusSche
264
264
  */
265
265
  export declare const WorkflowExecutionResultSchema: z.ZodObject<{
266
266
  status: z.ZodEnum<{
267
+ FAILED: "FAILED";
267
268
  PENDING: "PENDING";
268
269
  RUNNING: "RUNNING";
269
270
  COMPLETED: "COMPLETED";
270
- FAILED: "FAILED";
271
271
  CANCELLED: "CANCELLED";
272
272
  WAITING: "WAITING";
273
273
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "1.4.0",
3
+ "version": "1.4.4",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",