@perstack/core 0.0.57 → 0.0.58

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.
@@ -1145,9 +1145,9 @@ declare const providerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1145
1145
  /** Model tier for provider-aware model selection */
1146
1146
  type ModelTier = "low" | "middle" | "high";
1147
1147
  declare const modelTierSchema: z.ZodEnum<{
1148
- high: "high";
1149
- middle: "middle";
1150
1148
  low: "low";
1149
+ middle: "middle";
1150
+ high: "high";
1151
1151
  }>;
1152
1152
  /**
1153
1153
  * Resolve a model tier to a concrete model name for the given provider.
@@ -1447,11 +1447,11 @@ declare const expertBaseSchema: z.ZodObject<{
1447
1447
  skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1448
1448
  type: z.ZodLiteral<"mcpStdioSkill">;
1449
1449
  args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1450
- command: z.ZodString;
1451
1450
  description: z.ZodOptional<z.ZodString>;
1452
1451
  rule: z.ZodOptional<z.ZodString>;
1453
1452
  pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1454
1453
  omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1454
+ command: z.ZodString;
1455
1455
  packageName: z.ZodOptional<z.ZodString>;
1456
1456
  requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1457
1457
  }, z.core.$strip>, z.ZodObject<{
@@ -1463,6 +1463,8 @@ declare const expertBaseSchema: z.ZodObject<{
1463
1463
  endpoint: z.ZodString;
1464
1464
  }, z.core.$strip>, z.ZodObject<{
1465
1465
  type: z.ZodLiteral<"interactiveSkill">;
1466
+ description: z.ZodOptional<z.ZodString>;
1467
+ rule: z.ZodOptional<z.ZodString>;
1466
1468
  tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
1467
1469
  description: z.ZodOptional<z.ZodString>;
1468
1470
  inputJsonSchema: z.ZodString;
@@ -1476,8 +1478,6 @@ declare const expertBaseSchema: z.ZodObject<{
1476
1478
  inputJsonSchema: string;
1477
1479
  description?: string | undefined;
1478
1480
  }>>>;
1479
- description: z.ZodOptional<z.ZodString>;
1480
- rule: z.ZodOptional<z.ZodString>;
1481
1481
  }, z.core.$strip>], "type">>>>, z.ZodTransform<{
1482
1482
  [k: string]: {
1483
1483
  type: "mcpStdioSkill";
@@ -1514,9 +1514,9 @@ declare const expertBaseSchema: z.ZodObject<{
1514
1514
  }, Record<string, {
1515
1515
  type: "mcpStdioSkill";
1516
1516
  args: string[];
1517
- command: string;
1518
1517
  pick: string[];
1519
1518
  omit: string[];
1519
+ command: string;
1520
1520
  requiredEnv: string[];
1521
1521
  description?: string | undefined;
1522
1522
  rule?: string | undefined;
@@ -1544,9 +1544,9 @@ declare const expertBaseSchema: z.ZodObject<{
1544
1544
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1545
1545
  minRuntimeVersion: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`v${number}.${number}`, string>>>;
1546
1546
  defaultModelTier: z.ZodOptional<z.ZodEnum<{
1547
- high: "high";
1548
- middle: "middle";
1549
1547
  low: "low";
1548
+ middle: "middle";
1549
+ high: "high";
1550
1550
  }>>;
1551
1551
  providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1552
1552
  providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1589,11 +1589,11 @@ declare const expertSchema: z.ZodObject<{
1589
1589
  skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
1590
1590
  type: z.ZodLiteral<"mcpStdioSkill">;
1591
1591
  args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1592
- command: z.ZodString;
1593
1592
  description: z.ZodOptional<z.ZodString>;
1594
1593
  rule: z.ZodOptional<z.ZodString>;
1595
1594
  pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1596
1595
  omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1596
+ command: z.ZodString;
1597
1597
  packageName: z.ZodOptional<z.ZodString>;
1598
1598
  requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1599
1599
  }, z.core.$strip>, z.ZodObject<{
@@ -1605,6 +1605,8 @@ declare const expertSchema: z.ZodObject<{
1605
1605
  endpoint: z.ZodString;
1606
1606
  }, z.core.$strip>, z.ZodObject<{
1607
1607
  type: z.ZodLiteral<"interactiveSkill">;
1608
+ description: z.ZodOptional<z.ZodString>;
1609
+ rule: z.ZodOptional<z.ZodString>;
1608
1610
  tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
1609
1611
  description: z.ZodOptional<z.ZodString>;
1610
1612
  inputJsonSchema: z.ZodString;
@@ -1618,8 +1620,6 @@ declare const expertSchema: z.ZodObject<{
1618
1620
  inputJsonSchema: string;
1619
1621
  description?: string | undefined;
1620
1622
  }>>>;
1621
- description: z.ZodOptional<z.ZodString>;
1622
- rule: z.ZodOptional<z.ZodString>;
1623
1623
  }, z.core.$strip>], "type">>>>, z.ZodTransform<{
1624
1624
  [k: string]: {
1625
1625
  type: "mcpStdioSkill";
@@ -1656,9 +1656,9 @@ declare const expertSchema: z.ZodObject<{
1656
1656
  }, Record<string, {
1657
1657
  type: "mcpStdioSkill";
1658
1658
  args: string[];
1659
- command: string;
1660
1659
  pick: string[];
1661
1660
  omit: string[];
1661
+ command: string;
1662
1662
  requiredEnv: string[];
1663
1663
  description?: string | undefined;
1664
1664
  rule?: string | undefined;
@@ -1686,9 +1686,9 @@ declare const expertSchema: z.ZodObject<{
1686
1686
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
1687
1687
  minRuntimeVersion: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`v${number}.${number}`, string>>>;
1688
1688
  defaultModelTier: z.ZodOptional<z.ZodEnum<{
1689
- high: "high";
1690
- middle: "middle";
1691
1689
  low: "low";
1690
+ middle: "middle";
1691
+ high: "high";
1692
1692
  }>>;
1693
1693
  providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1694
1694
  providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1725,8 +1725,8 @@ type ReasoningBudget = "none" | "minimal" | "low" | "medium" | "high" | number;
1725
1725
  /** Default reasoning budget - enables extended thinking by default */
1726
1726
  declare const defaultReasoningBudget: ReasoningBudget;
1727
1727
  declare const reasoningBudgetSchema: z.ZodUnion<readonly [z.ZodEnum<{
1728
- high: "high";
1729
1728
  low: "low";
1729
+ high: "high";
1730
1730
  none: "none";
1731
1731
  minimal: "minimal";
1732
1732
  medium: "medium";
@@ -2009,8 +2009,8 @@ declare const perstackConfigSchema: z.ZodObject<{
2009
2009
  }, z.core.$strip>], "providerName">>;
2010
2010
  model: z.ZodOptional<z.ZodString>;
2011
2011
  reasoningBudget: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
2012
- high: "high";
2013
2012
  low: "low";
2013
+ high: "high";
2014
2014
  none: "none";
2015
2015
  minimal: "minimal";
2016
2016
  medium: "medium";
@@ -2023,9 +2023,9 @@ declare const perstackConfigSchema: z.ZodObject<{
2023
2023
  description: z.ZodOptional<z.ZodString>;
2024
2024
  instruction: z.ZodString;
2025
2025
  defaultModelTier: z.ZodOptional<z.ZodEnum<{
2026
- high: "high";
2027
- middle: "middle";
2028
2026
  low: "low";
2027
+ middle: "middle";
2028
+ high: "high";
2029
2029
  }>>;
2030
2030
  skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2031
2031
  type: z.ZodLiteral<"mcpStdioSkill">;
@@ -2627,11 +2627,11 @@ declare const runSettingSchema: z.ZodObject<{
2627
2627
  skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2628
2628
  type: z.ZodLiteral<"mcpStdioSkill">;
2629
2629
  args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2630
- command: z.ZodString;
2631
2630
  description: z.ZodOptional<z.ZodString>;
2632
2631
  rule: z.ZodOptional<z.ZodString>;
2633
2632
  pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2634
2633
  omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2634
+ command: z.ZodString;
2635
2635
  packageName: z.ZodOptional<z.ZodString>;
2636
2636
  requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2637
2637
  }, z.core.$strip>, z.ZodObject<{
@@ -2643,6 +2643,8 @@ declare const runSettingSchema: z.ZodObject<{
2643
2643
  endpoint: z.ZodString;
2644
2644
  }, z.core.$strip>, z.ZodObject<{
2645
2645
  type: z.ZodLiteral<"interactiveSkill">;
2646
+ description: z.ZodOptional<z.ZodString>;
2647
+ rule: z.ZodOptional<z.ZodString>;
2646
2648
  tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
2647
2649
  description: z.ZodOptional<z.ZodString>;
2648
2650
  inputJsonSchema: z.ZodString;
@@ -2656,8 +2658,6 @@ declare const runSettingSchema: z.ZodObject<{
2656
2658
  inputJsonSchema: string;
2657
2659
  description?: string | undefined;
2658
2660
  }>>>;
2659
- description: z.ZodOptional<z.ZodString>;
2660
- rule: z.ZodOptional<z.ZodString>;
2661
2661
  }, z.core.$strip>], "type">>>>, z.ZodTransform<{
2662
2662
  [k: string]: {
2663
2663
  type: "mcpStdioSkill";
@@ -2694,9 +2694,9 @@ declare const runSettingSchema: z.ZodObject<{
2694
2694
  }, Record<string, {
2695
2695
  type: "mcpStdioSkill";
2696
2696
  args: string[];
2697
- command: string;
2698
2697
  pick: string[];
2699
2698
  omit: string[];
2699
+ command: string;
2700
2700
  requiredEnv: string[];
2701
2701
  description?: string | undefined;
2702
2702
  rule?: string | undefined;
@@ -2724,9 +2724,9 @@ declare const runSettingSchema: z.ZodObject<{
2724
2724
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2725
2725
  minRuntimeVersion: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`v${number}.${number}`, string>>>;
2726
2726
  defaultModelTier: z.ZodOptional<z.ZodEnum<{
2727
- high: "high";
2728
- middle: "middle";
2729
2727
  low: "low";
2728
+ middle: "middle";
2729
+ high: "high";
2730
2730
  }>>;
2731
2731
  providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
2732
2732
  providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -2757,8 +2757,8 @@ declare const runSettingSchema: z.ZodObject<{
2757
2757
  }, z.core.$strip>>;
2758
2758
  }, z.core.$strip>>;
2759
2759
  reasoningBudget: z.ZodDefault<z.ZodUnion<readonly [z.ZodEnum<{
2760
- high: "high";
2761
2760
  low: "low";
2761
+ high: "high";
2762
2762
  none: "none";
2763
2763
  minimal: "minimal";
2764
2764
  medium: "medium";
@@ -2841,28 +2841,15 @@ declare const runParamsSchema: z.ZodObject<{
2841
2841
  name: z.ZodString;
2842
2842
  version: z.ZodString;
2843
2843
  description: z.ZodOptional<z.ZodString>;
2844
- providerToolOptions: z.ZodOptional<z.ZodObject<{
2845
- webSearch: z.ZodOptional<z.ZodObject<{
2846
- maxUses: z.ZodOptional<z.ZodNumber>;
2847
- allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
2848
- }, z.core.$strip>>;
2849
- webFetch: z.ZodOptional<z.ZodObject<{
2850
- maxUses: z.ZodOptional<z.ZodNumber>;
2851
- }, z.core.$strip>>;
2852
- fileSearch: z.ZodOptional<z.ZodObject<{
2853
- vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2854
- maxNumResults: z.ZodOptional<z.ZodNumber>;
2855
- }, z.core.$strip>>;
2856
- }, z.core.$strip>>;
2857
2844
  instruction: z.ZodString;
2858
2845
  skills: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
2859
2846
  type: z.ZodLiteral<"mcpStdioSkill">;
2860
2847
  args: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2861
- command: z.ZodString;
2862
2848
  description: z.ZodOptional<z.ZodString>;
2863
2849
  rule: z.ZodOptional<z.ZodString>;
2864
2850
  pick: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2865
2851
  omit: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2852
+ command: z.ZodString;
2866
2853
  packageName: z.ZodOptional<z.ZodString>;
2867
2854
  requiredEnv: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2868
2855
  }, z.core.$strip>, z.ZodObject<{
@@ -2874,6 +2861,8 @@ declare const runParamsSchema: z.ZodObject<{
2874
2861
  endpoint: z.ZodString;
2875
2862
  }, z.core.$strip>, z.ZodObject<{
2876
2863
  type: z.ZodLiteral<"interactiveSkill">;
2864
+ description: z.ZodOptional<z.ZodString>;
2865
+ rule: z.ZodOptional<z.ZodString>;
2877
2866
  tools: z.ZodPipe<z.ZodRecord<z.ZodString, z.ZodObject<{
2878
2867
  description: z.ZodOptional<z.ZodString>;
2879
2868
  inputJsonSchema: z.ZodString;
@@ -2887,8 +2876,6 @@ declare const runParamsSchema: z.ZodObject<{
2887
2876
  inputJsonSchema: string;
2888
2877
  description?: string | undefined;
2889
2878
  }>>>;
2890
- description: z.ZodOptional<z.ZodString>;
2891
- rule: z.ZodOptional<z.ZodString>;
2892
2879
  }, z.core.$strip>], "type">>>>, z.ZodTransform<{
2893
2880
  [k: string]: {
2894
2881
  type: "mcpStdioSkill";
@@ -2925,9 +2912,9 @@ declare const runParamsSchema: z.ZodObject<{
2925
2912
  }, Record<string, {
2926
2913
  type: "mcpStdioSkill";
2927
2914
  args: string[];
2928
- command: string;
2929
2915
  pick: string[];
2930
2916
  omit: string[];
2917
+ command: string;
2931
2918
  requiredEnv: string[];
2932
2919
  description?: string | undefined;
2933
2920
  rule?: string | undefined;
@@ -2953,11 +2940,24 @@ declare const runParamsSchema: z.ZodObject<{
2953
2940
  }>>>;
2954
2941
  delegates: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2955
2942
  tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
2943
+ providerToolOptions: z.ZodOptional<z.ZodObject<{
2944
+ webSearch: z.ZodOptional<z.ZodObject<{
2945
+ maxUses: z.ZodOptional<z.ZodNumber>;
2946
+ allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
2947
+ }, z.core.$strip>>;
2948
+ webFetch: z.ZodOptional<z.ZodObject<{
2949
+ maxUses: z.ZodOptional<z.ZodNumber>;
2950
+ }, z.core.$strip>>;
2951
+ fileSearch: z.ZodOptional<z.ZodObject<{
2952
+ vectorStoreIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2953
+ maxNumResults: z.ZodOptional<z.ZodNumber>;
2954
+ }, z.core.$strip>>;
2955
+ }, z.core.$strip>>;
2956
2956
  minRuntimeVersion: z.ZodDefault<z.ZodPipe<z.ZodString, z.ZodTransform<`v${number}.${number}`, string>>>;
2957
2957
  defaultModelTier: z.ZodOptional<z.ZodEnum<{
2958
- high: "high";
2959
- middle: "middle";
2960
2958
  low: "low";
2959
+ middle: "middle";
2960
+ high: "high";
2961
2961
  }>>;
2962
2962
  providerTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
2963
2963
  providerSkills: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -3017,7 +3017,7 @@ declare const runParamsSchema: z.ZodObject<{
3017
3017
  tags: string[];
3018
3018
  minRuntimeVersion: `v${number}.${number}`;
3019
3019
  description?: string | undefined;
3020
- defaultModelTier?: "high" | "middle" | "low" | undefined;
3020
+ defaultModelTier?: "low" | "middle" | "high" | undefined;
3021
3021
  providerTools?: string[] | undefined;
3022
3022
  providerSkills?: ({
3023
3023
  type: "builtin";
@@ -3096,7 +3096,7 @@ declare const runParamsSchema: z.ZodObject<{
3096
3096
  maxNumResults?: number | undefined;
3097
3097
  } | undefined;
3098
3098
  } | undefined;
3099
- defaultModelTier?: "high" | "middle" | "low" | undefined;
3099
+ defaultModelTier?: "low" | "middle" | "high" | undefined;
3100
3100
  providerTools?: string[] | undefined;
3101
3101
  providerSkills?: ({
3102
3102
  type: "builtin";
@@ -3108,8 +3108,8 @@ declare const runParamsSchema: z.ZodObject<{
3108
3108
  })[] | undefined;
3109
3109
  }>>>;
3110
3110
  reasoningBudget: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3111
- high: "high";
3112
3111
  low: "low";
3112
+ high: "high";
3113
3113
  none: "none";
3114
3114
  minimal: "minimal";
3115
3115
  medium: "medium";
@@ -6218,9 +6218,9 @@ declare const runCommandInputSchema: z.ZodObject<{
6218
6218
  "google-vertex": "google-vertex";
6219
6219
  }>>;
6220
6220
  model: z.ZodOptional<z.ZodString>;
6221
- reasoningBudget: z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | "high" | "low" | "none" | "minimal" | "medium" | undefined, string | undefined>>, z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
6222
- high: "high";
6221
+ reasoningBudget: z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | "low" | "high" | "none" | "minimal" | "medium" | undefined, string | undefined>>, z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
6223
6222
  low: "low";
6223
+ high: "high";
6224
6224
  none: "none";
6225
6225
  minimal: "minimal";
6226
6226
  medium: "medium";
@@ -6263,9 +6263,9 @@ declare const startCommandInputSchema: z.ZodObject<{
6263
6263
  "google-vertex": "google-vertex";
6264
6264
  }>>;
6265
6265
  model: z.ZodOptional<z.ZodString>;
6266
- reasoningBudget: z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | "high" | "low" | "none" | "minimal" | "medium" | undefined, string | undefined>>, z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
6267
- high: "high";
6266
+ reasoningBudget: z.ZodPipe<z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<number | "low" | "high" | "none" | "minimal" | "medium" | undefined, string | undefined>>, z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
6268
6267
  low: "low";
6268
+ high: "high";
6269
6269
  none: "none";
6270
6270
  minimal: "minimal";
6271
6271
  medium: "medium";
@@ -6414,9 +6414,13 @@ declare function validateDelegation(source: string, target: string): string | nu
6414
6414
  */
6415
6415
  declare function validateAllDelegations(expertName: string, delegates: string[]): string[];
6416
6416
  //#endregion
6417
+ //#region src/utils/truncate.d.ts
6418
+ declare const MAX_TOOL_OUTPUT_CHARS = 30000;
6419
+ declare function truncateText(text: string, maxChars?: number): string;
6420
+ //#endregion
6417
6421
  //#region src/utils/zod-error.d.ts
6418
6422
  declare function formatZodError(error: ZodError): string;
6419
6423
  declare function parseWithFriendlyError<T>(schema: ZodSchema<T>, data: unknown, context?: string): T;
6420
6424
  //#endregion
6421
- export { Activity, ActivityOrGroup, ActivityType, AddDelegateActivity, AddSkillActivity, AmazonBedrockProviderConfig, AnthropicProviderConfig, AnthropicProviderSkill, AnthropicProviderToolName, AttemptCompletionActivity, AzureOpenAIProviderToolName, AzureOpenAiProviderConfig, BASE_SKILL_PREFIX, BaseEvent, BasePart, BuiltinAnthropicSkill, CallToolResultContent, Checkpoint, CheckpointStatus, ClearTodoActivity, CommandOptions, CompleteActivity, type CreateCheckpointParams, CreateExpertActivity, CustomAnthropicSkill, DeepseekProviderConfig, DelegateActivity, DelegateSkillManagerParams, DelegationCompleteActivity, DelegationTarget, EditTextFileActivity, ErrorActivity, EventForType, EventType, ExecActivity, Expert, ExpertMessage, ExpertStateEvent, ExpertStateEventType, ExpertType, FileBinaryPart, FileInlinePart, FileUrlPart, GeneralToolActivity, GetActivitiesParams, GoogleGenerativeAiProviderConfig, GoogleProviderToolName, GoogleVertexProviderConfig, Headers, ImageBinaryPart, ImageInlinePart, ImageUrlPart, InstructionMessage, InteractiveSkill, InteractiveSkillManagerParams, InteractiveTool, InteractiveToolActivity, Job, JobStatus, Lockfile, LockfileExpert, LockfileToolDefinition, McpSkillManagerParams, McpSseSkill, McpStdioSkill, Message, MessagePart, ModelTier, OllamaProviderConfig, OpenAIProviderToolName, OpenAiProviderConfig, ParallelActivitiesGroup, PerstackConfig, PerstackConfigExpert, PerstackConfigSkill, PerstackError, PerstackEvent, ProviderConfig, ProviderName, ProviderTable, ProviderToolOptions, QueryActivity, ReadImageFileActivity, ReadPdfFileActivity, ReadTextFileActivity, ReasoningBudget, RemoveDelegateActivity, RemoveSkillActivity, Resource, RetryActivity, RunCommandInput, RunEvent, RunInput, RunParams, RunParamsInput, RunSetting, RuntimeEvent, RuntimeEventForType, RuntimeEventType, RuntimeVersion, SAFE_ENV_VARS, Skill, SkillManagerParams, SkillType, StartCommandInput, Step, StreamingEvent, StreamingEventType, TextPart, ThinkingPart, TodoActivity, ToolCall, ToolCallPart, ToolDefinition, ToolMessage, ToolResult, ToolResultPart, Usage, UserMessage, VertexProviderToolName, WriteTextFileActivity, activityOrGroupSchema, activitySchema, addDelegateActivitySchema, addSkillActivitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createExpertActivitySchema, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries, defaultPerstackApiBaseUrl, defaultReasoningBudget, defaultTimeout, delegateActivitySchema, delegationCompleteActivitySchema, delegationTargetSchema, domainPatternSchema, editTextFileActivitySchema, errorActivitySchema, execActivitySchema, expertBaseSchema, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileSearchOptionsSchema, fileUrlPartSchema, finishMcpTools, finishToolCall, formatZodError, generalToolActivitySchema, getActivities, getExpertScope, getExpertShortName, getExpertType, getFilteredEnv, googleGenerativeAiProviderConfigSchema, googleProviderToolNameSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolActivitySchema, interactiveToolSchema, isCoordinatorExpert, isDelegateExpert, isPrivateOrLocalIP, isValidEventType, isValidRuntimeEventType, jobSchema, jobStatusSchema, knownModels, lockfileExpertSchema, lockfileSchema, lockfileToolDefinitionSchema, maxExpertNameLength, maxSkillNameLength, maxSkillToolNameLength, mcpSseSkillSchema, mcpStdioSkillSchema, messagePartSchema, messageSchema, modelTierSchema, ollamaProviderConfigSchema, openAiProviderConfigSchema, openaiProviderToolNameSchema, parallelActivitiesGroupSchema, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, proceedToInteractiveTools, providerConfigSchema, providerNameSchema, providerTableSchema, providerToolOptionsSchema, queryActivitySchema, readImageFileActivitySchema, readPdfFileActivitySchema, readTextFileActivitySchema, reasoningBudgetSchema, removeDelegateActivitySchema, removeSkillActivitySchema, resolveModelTier, resolveToolResults, resumeFromStop, resumeToolCalls, retry, retryActivitySchema, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeVersionSchema, skillSchema, skipDelegates, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByError, stopRunByInteractiveTool, tagNameRegex, textPartSchema, thinkingPartSchema, todoActivitySchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, usageSchema, userMessageSchema, validateAllDelegations, validateDelegation, validateEventFilter, vertexProviderToolNameSchema, webFetchOptionsSchema, webSearchOptionsSchema, writeTextFileActivitySchema };
6425
+ export { Activity, ActivityOrGroup, ActivityType, AddDelegateActivity, AddSkillActivity, AmazonBedrockProviderConfig, AnthropicProviderConfig, AnthropicProviderSkill, AnthropicProviderToolName, AttemptCompletionActivity, AzureOpenAIProviderToolName, AzureOpenAiProviderConfig, BASE_SKILL_PREFIX, BaseEvent, BasePart, BuiltinAnthropicSkill, CallToolResultContent, Checkpoint, CheckpointStatus, ClearTodoActivity, CommandOptions, CompleteActivity, type CreateCheckpointParams, CreateExpertActivity, CustomAnthropicSkill, DeepseekProviderConfig, DelegateActivity, DelegateSkillManagerParams, DelegationCompleteActivity, DelegationTarget, EditTextFileActivity, ErrorActivity, EventForType, EventType, ExecActivity, Expert, ExpertMessage, ExpertStateEvent, ExpertStateEventType, ExpertType, FileBinaryPart, FileInlinePart, FileUrlPart, GeneralToolActivity, GetActivitiesParams, GoogleGenerativeAiProviderConfig, GoogleProviderToolName, GoogleVertexProviderConfig, Headers, ImageBinaryPart, ImageInlinePart, ImageUrlPart, InstructionMessage, InteractiveSkill, InteractiveSkillManagerParams, InteractiveTool, InteractiveToolActivity, Job, JobStatus, Lockfile, LockfileExpert, LockfileToolDefinition, MAX_TOOL_OUTPUT_CHARS, McpSkillManagerParams, McpSseSkill, McpStdioSkill, Message, MessagePart, ModelTier, OllamaProviderConfig, OpenAIProviderToolName, OpenAiProviderConfig, ParallelActivitiesGroup, PerstackConfig, PerstackConfigExpert, PerstackConfigSkill, PerstackError, PerstackEvent, ProviderConfig, ProviderName, ProviderTable, ProviderToolOptions, QueryActivity, ReadImageFileActivity, ReadPdfFileActivity, ReadTextFileActivity, ReasoningBudget, RemoveDelegateActivity, RemoveSkillActivity, Resource, RetryActivity, RunCommandInput, RunEvent, RunInput, RunParams, RunParamsInput, RunSetting, RuntimeEvent, RuntimeEventForType, RuntimeEventType, RuntimeVersion, SAFE_ENV_VARS, Skill, SkillManagerParams, SkillType, StartCommandInput, Step, StreamingEvent, StreamingEventType, TextPart, ThinkingPart, TodoActivity, ToolCall, ToolCallPart, ToolDefinition, ToolMessage, ToolResult, ToolResultPart, Usage, UserMessage, VertexProviderToolName, WriteTextFileActivity, activityOrGroupSchema, activitySchema, addDelegateActivitySchema, addSkillActivitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createExpertActivitySchema, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries, defaultPerstackApiBaseUrl, defaultReasoningBudget, defaultTimeout, delegateActivitySchema, delegationCompleteActivitySchema, delegationTargetSchema, domainPatternSchema, editTextFileActivitySchema, errorActivitySchema, execActivitySchema, expertBaseSchema, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileSearchOptionsSchema, fileUrlPartSchema, finishMcpTools, finishToolCall, formatZodError, generalToolActivitySchema, getActivities, getExpertScope, getExpertShortName, getExpertType, getFilteredEnv, googleGenerativeAiProviderConfigSchema, googleProviderToolNameSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolActivitySchema, interactiveToolSchema, isCoordinatorExpert, isDelegateExpert, isPrivateOrLocalIP, isValidEventType, isValidRuntimeEventType, jobSchema, jobStatusSchema, knownModels, lockfileExpertSchema, lockfileSchema, lockfileToolDefinitionSchema, maxExpertNameLength, maxSkillNameLength, maxSkillToolNameLength, mcpSseSkillSchema, mcpStdioSkillSchema, messagePartSchema, messageSchema, modelTierSchema, ollamaProviderConfigSchema, openAiProviderConfigSchema, openaiProviderToolNameSchema, parallelActivitiesGroupSchema, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, proceedToInteractiveTools, providerConfigSchema, providerNameSchema, providerTableSchema, providerToolOptionsSchema, queryActivitySchema, readImageFileActivitySchema, readPdfFileActivitySchema, readTextFileActivitySchema, reasoningBudgetSchema, removeDelegateActivitySchema, removeSkillActivitySchema, resolveModelTier, resolveToolResults, resumeFromStop, resumeToolCalls, retry, retryActivitySchema, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeVersionSchema, skillSchema, skipDelegates, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByError, stopRunByInteractiveTool, tagNameRegex, textPartSchema, thinkingPartSchema, todoActivitySchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, truncateText, usageSchema, userMessageSchema, validateAllDelegations, validateDelegation, validateEventFilter, vertexProviderToolNameSchema, webFetchOptionsSchema, webSearchOptionsSchema, writeTextFileActivitySchema };
6422
6426
  //# sourceMappingURL=index.d.ts.map
package/dist/src/index.js CHANGED
@@ -2027,6 +2027,19 @@ function createFilteredEventListener(listener, allowedTypes) {
2027
2027
  };
2028
2028
  }
2029
2029
 
2030
+ //#endregion
2031
+ //#region src/utils/truncate.ts
2032
+ const MAX_TOOL_OUTPUT_CHARS = 3e4;
2033
+ function truncateText(text, maxChars = MAX_TOOL_OUTPUT_CHARS) {
2034
+ if (text.length <= maxChars) return text;
2035
+ const marker = `\n\n... [truncated: ${text.length - maxChars} characters removed from middle of ${text.length} total] ...\n\n`;
2036
+ const available = maxChars - marker.length;
2037
+ if (available <= 0) return text.slice(0, maxChars);
2038
+ const head = Math.floor(available * .8);
2039
+ const tail = available - head;
2040
+ return text.slice(0, head) + marker + text.slice(text.length - tail);
2041
+ }
2042
+
2030
2043
  //#endregion
2031
2044
  //#region src/utils/zod-error.ts
2032
2045
  function formatZodError(error) {
@@ -2041,5 +2054,5 @@ function parseWithFriendlyError(schema, data, context) {
2041
2054
  }
2042
2055
 
2043
2056
  //#endregion
2044
- export { BASE_SKILL_PREFIX, PerstackError, SAFE_ENV_VARS, activityOrGroupSchema, activitySchema, addDelegateActivitySchema, addSkillActivitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createExpertActivitySchema, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries, defaultPerstackApiBaseUrl, defaultReasoningBudget, defaultTimeout, delegateActivitySchema, delegationCompleteActivitySchema, delegationTargetSchema, domainPatternSchema, editTextFileActivitySchema, errorActivitySchema, execActivitySchema, expertBaseSchema, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileSearchOptionsSchema, fileUrlPartSchema, finishMcpTools, finishToolCall, formatZodError, generalToolActivitySchema, getActivities, getExpertScope, getExpertShortName, getExpertType, getFilteredEnv, googleGenerativeAiProviderConfigSchema, googleProviderToolNameSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolActivitySchema, interactiveToolSchema, isCoordinatorExpert, isDelegateExpert, isPrivateOrLocalIP, isValidEventType, isValidRuntimeEventType, jobSchema, jobStatusSchema, knownModels, lockfileExpertSchema, lockfileSchema, lockfileToolDefinitionSchema, maxExpertNameLength, maxSkillNameLength, maxSkillToolNameLength, mcpSseSkillSchema, mcpStdioSkillSchema, messagePartSchema, messageSchema, modelTierSchema, ollamaProviderConfigSchema, openAiProviderConfigSchema, openaiProviderToolNameSchema, parallelActivitiesGroupSchema, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, proceedToInteractiveTools, providerConfigSchema, providerNameSchema, providerTableSchema, providerToolOptionsSchema, queryActivitySchema, readImageFileActivitySchema, readPdfFileActivitySchema, readTextFileActivitySchema, reasoningBudgetSchema, removeDelegateActivitySchema, removeSkillActivitySchema, resolveModelTier, resolveToolResults, resumeFromStop, resumeToolCalls, retry, retryActivitySchema, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeVersionSchema, skillSchema, skipDelegates, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByError, stopRunByInteractiveTool, tagNameRegex, textPartSchema, thinkingPartSchema, todoActivitySchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, usageSchema, userMessageSchema, validateAllDelegations, validateDelegation, validateEventFilter, vertexProviderToolNameSchema, webFetchOptionsSchema, webSearchOptionsSchema, writeTextFileActivitySchema };
2057
+ export { BASE_SKILL_PREFIX, MAX_TOOL_OUTPUT_CHARS, PerstackError, SAFE_ENV_VARS, activityOrGroupSchema, activitySchema, addDelegateActivitySchema, addSkillActivitySchema, amazonBedrockProviderConfigSchema, anthropicProviderConfigSchema, anthropicProviderSkillSchema, anthropicProviderToolNameSchema, attemptCompletionActivitySchema, azureOpenAIProviderToolNameSchema, azureOpenAiProviderConfigSchema, basePartSchema, builtinAnthropicSkillSchema, callTools, checkpointSchema, checkpointStatusSchema, clearTodoActivitySchema, completeActivitySchema, completeRun, continueToNextStep, createBaseToolActivity, createCallToolsEvent, createCompleteRunEvent, createEmptyUsage, createEvent, createExpertActivitySchema, createFilteredEventListener, createGeneralToolActivity, createNormalizedCheckpoint, createResolveToolResultsEvent, createRuntimeEvent, createRuntimeInitEvent, createStartRunEvent, createStreamingEvent, createToolMessage, customAnthropicSkillSchema, deepseekProviderConfigSchema, defaultMaxRetries, defaultPerstackApiBaseUrl, defaultReasoningBudget, defaultTimeout, delegateActivitySchema, delegationCompleteActivitySchema, delegationTargetSchema, domainPatternSchema, editTextFileActivitySchema, errorActivitySchema, execActivitySchema, expertBaseSchema, expertKeyRegex, expertMessageSchema, expertNameRegex, expertSchema, expertVersionRegex, fileBinaryPartSchema, fileInlinePartSchema, fileSearchOptionsSchema, fileUrlPartSchema, finishMcpTools, finishToolCall, formatZodError, generalToolActivitySchema, getActivities, getExpertScope, getExpertShortName, getExpertType, getFilteredEnv, googleGenerativeAiProviderConfigSchema, googleProviderToolNameSchema, googleVertexProviderConfigSchema, headersSchema, imageBinaryPartSchema, imageInlinePartSchema, imageUrlPartSchema, instructionMessageSchema, interactiveSkillSchema, interactiveToolActivitySchema, interactiveToolSchema, isCoordinatorExpert, isDelegateExpert, isPrivateOrLocalIP, isValidEventType, isValidRuntimeEventType, jobSchema, jobStatusSchema, knownModels, lockfileExpertSchema, lockfileSchema, lockfileToolDefinitionSchema, maxExpertNameLength, maxSkillNameLength, maxSkillToolNameLength, mcpSseSkillSchema, mcpStdioSkillSchema, messagePartSchema, messageSchema, modelTierSchema, ollamaProviderConfigSchema, openAiProviderConfigSchema, openaiProviderToolNameSchema, parallelActivitiesGroupSchema, parseExpertKey, parseWithFriendlyError, perstackConfigSchema, proceedToInteractiveTools, providerConfigSchema, providerNameSchema, providerTableSchema, providerToolOptionsSchema, queryActivitySchema, readImageFileActivitySchema, readPdfFileActivitySchema, readTextFileActivitySchema, reasoningBudgetSchema, removeDelegateActivitySchema, removeSkillActivitySchema, resolveModelTier, resolveToolResults, resumeFromStop, resumeToolCalls, retry, retryActivitySchema, runCommandInputSchema, runParamsSchema, runSettingSchema, runtimeVersionSchema, skillSchema, skipDelegates, startCommandInputSchema, startGeneration, startRun, stepSchema, stopRunByDelegate, stopRunByError, stopRunByInteractiveTool, tagNameRegex, textPartSchema, thinkingPartSchema, todoActivitySchema, toolCallPartSchema, toolCallSchema, toolMessageSchema, toolResultPartSchema, toolResultSchema, truncateText, usageSchema, userMessageSchema, validateAllDelegations, validateDelegation, validateEventFilter, vertexProviderToolNameSchema, webFetchOptionsSchema, webSearchOptionsSchema, writeTextFileActivitySchema };
2045
2058
  //# sourceMappingURL=index.js.map