@byfriends/sdk 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1109,6 +1109,7 @@ declare const ByfConfigPatchSchema: z.ZodObject<{
1109
1109
  }, z.core.$strip>>>;
1110
1110
  env: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
1111
1111
  customHeaders: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
1112
+ extraBody: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
1112
1113
  }, z.core.$strip>>>;
1113
1114
  defaultProvider: z.ZodOptional<z.ZodString>;
1114
1115
  defaultModel: z.ZodOptional<z.ZodString>;
@@ -1161,6 +1162,7 @@ declare const ByfConfigPatchSchema: z.ZodObject<{
1161
1162
  }, z.core.$strip>>;
1162
1163
  hooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1163
1164
  event: z.ZodEnum<{
1165
+ Notification: "Notification";
1164
1166
  PreToolUse: "PreToolUse";
1165
1167
  PostToolUse: "PostToolUse";
1166
1168
  PostToolUseFailure: "PostToolUseFailure";
@@ -1173,7 +1175,6 @@ declare const ByfConfigPatchSchema: z.ZodObject<{
1173
1175
  SubagentStop: "SubagentStop";
1174
1176
  PreCompact: "PreCompact";
1175
1177
  PostCompact: "PostCompact";
1176
- Notification: "Notification";
1177
1178
  }>;
1178
1179
  matcher: z.ZodOptional<z.ZodString>;
1179
1180
  command: z.ZodString;
@@ -1245,6 +1246,7 @@ declare const ByfConfigSchema: z.ZodObject<{
1245
1246
  }, z.core.$strip>>;
1246
1247
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1247
1248
  customHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1249
+ extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1248
1250
  }, z.core.$strip>>>;
1249
1251
  defaultProvider: z.ZodOptional<z.ZodString>;
1250
1252
  defaultModel: z.ZodOptional<z.ZodString>;
@@ -1297,6 +1299,7 @@ declare const ByfConfigSchema: z.ZodObject<{
1297
1299
  }, z.core.$strip>>;
1298
1300
  hooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
1299
1301
  event: z.ZodEnum<{
1302
+ Notification: "Notification";
1300
1303
  PreToolUse: "PreToolUse";
1301
1304
  PostToolUse: "PostToolUse";
1302
1305
  PostToolUseFailure: "PostToolUseFailure";
@@ -1309,7 +1312,6 @@ declare const ByfConfigSchema: z.ZodObject<{
1309
1312
  SubagentStop: "SubagentStop";
1310
1313
  PreCompact: "PreCompact";
1311
1314
  PostCompact: "PostCompact";
1312
- Notification: "Notification";
1313
1315
  }>;
1314
1316
  matcher: z.ZodOptional<z.ZodString>;
1315
1317
  command: z.ZodString;
@@ -2984,6 +2986,13 @@ declare interface McpConnectionManagerOptions {
2984
2986
  * `session.log` so MCP events land in the session log too.
2985
2987
  */
2986
2988
  readonly log?: Logger;
2989
+ /**
2990
+ * Custom fetch function for HTTP MCP transports. When provided, the
2991
+ * connection manager passes it to every `HttpMcpClient` so the
2992
+ * transport uses it for all HTTP requests — enabling proxy fallback,
2993
+ * custom retries, or test doubles.
2994
+ */
2995
+ readonly fetch?: typeof fetch;
2987
2996
  }
2988
2997
 
2989
2998
  /**
@@ -3678,6 +3687,7 @@ declare const ProviderConfigSchema: z.ZodObject<{
3678
3687
  }, z.core.$strip>>;
3679
3688
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3680
3689
  customHeaders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3690
+ extraBody: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3681
3691
  }, z.core.$strip>;
3682
3692
 
3683
3693
  declare class ProviderManager {
@@ -3976,6 +3986,12 @@ declare interface RuntimeConfig {
3976
3986
  readonly osEnv: Environment;
3977
3987
  readonly urlFetcher?: UrlFetcher | undefined;
3978
3988
  readonly webSearcher?: WebSearchProvider | undefined;
3989
+ /**
3990
+ * ProxiedFetch — a `typeof fetch` wrapper that retries through an
3991
+ * HTTP/SOCKS proxy when the direct attempt fails with a retryable error.
3992
+ * Used by MCP HTTP connections, URL fetcher, and web search.
3993
+ */
3994
+ readonly fetch?: typeof fetch;
3979
3995
  }
3980
3996
 
3981
3997
  declare class ScratchManager {