@herdctl/core 3.0.2 → 4.1.0

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.
Files changed (114) hide show
  1. package/dist/config/__tests__/schema.test.js +45 -0
  2. package/dist/config/__tests__/schema.test.js.map +1 -1
  3. package/dist/config/index.d.ts +1 -1
  4. package/dist/config/index.d.ts.map +1 -1
  5. package/dist/config/index.js +4 -2
  6. package/dist/config/index.js.map +1 -1
  7. package/dist/config/schema.d.ts +774 -0
  8. package/dist/config/schema.d.ts.map +1 -1
  9. package/dist/config/schema.js +100 -1
  10. package/dist/config/schema.js.map +1 -1
  11. package/dist/fleet-manager/__tests__/discord-manager.test.js +1415 -84
  12. package/dist/fleet-manager/__tests__/discord-manager.test.js.map +1 -1
  13. package/dist/fleet-manager/__tests__/slack-manager.test.d.ts +11 -0
  14. package/dist/fleet-manager/__tests__/slack-manager.test.d.ts.map +1 -0
  15. package/dist/fleet-manager/__tests__/slack-manager.test.js +1022 -0
  16. package/dist/fleet-manager/__tests__/slack-manager.test.js.map +1 -0
  17. package/dist/fleet-manager/context.d.ts +4 -0
  18. package/dist/fleet-manager/context.d.ts.map +1 -1
  19. package/dist/fleet-manager/discord-manager.d.ts +75 -2
  20. package/dist/fleet-manager/discord-manager.d.ts.map +1 -1
  21. package/dist/fleet-manager/discord-manager.js +374 -3
  22. package/dist/fleet-manager/discord-manager.js.map +1 -1
  23. package/dist/fleet-manager/event-types.d.ts +113 -0
  24. package/dist/fleet-manager/event-types.d.ts.map +1 -1
  25. package/dist/fleet-manager/fleet-manager.d.ts +3 -0
  26. package/dist/fleet-manager/fleet-manager.d.ts.map +1 -1
  27. package/dist/fleet-manager/fleet-manager.js +10 -0
  28. package/dist/fleet-manager/fleet-manager.js.map +1 -1
  29. package/dist/fleet-manager/job-control.d.ts.map +1 -1
  30. package/dist/fleet-manager/job-control.js +5 -2
  31. package/dist/fleet-manager/job-control.js.map +1 -1
  32. package/dist/fleet-manager/slack-manager.d.ts +158 -0
  33. package/dist/fleet-manager/slack-manager.d.ts.map +1 -0
  34. package/dist/fleet-manager/slack-manager.js +570 -0
  35. package/dist/fleet-manager/slack-manager.js.map +1 -0
  36. package/dist/fleet-manager/status-queries.d.ts +2 -1
  37. package/dist/fleet-manager/status-queries.d.ts.map +1 -1
  38. package/dist/fleet-manager/status-queries.js +42 -3
  39. package/dist/fleet-manager/status-queries.js.map +1 -1
  40. package/dist/fleet-manager/types.d.ts +43 -3
  41. package/dist/fleet-manager/types.d.ts.map +1 -1
  42. package/dist/hooks/__tests__/slack-runner.test.d.ts +5 -0
  43. package/dist/hooks/__tests__/slack-runner.test.d.ts.map +1 -0
  44. package/dist/hooks/__tests__/slack-runner.test.js +307 -0
  45. package/dist/hooks/__tests__/slack-runner.test.js.map +1 -0
  46. package/dist/hooks/hook-executor.d.ts +1 -0
  47. package/dist/hooks/hook-executor.d.ts.map +1 -1
  48. package/dist/hooks/hook-executor.js +8 -0
  49. package/dist/hooks/hook-executor.js.map +1 -1
  50. package/dist/hooks/index.d.ts +2 -1
  51. package/dist/hooks/index.d.ts.map +1 -1
  52. package/dist/hooks/index.js +2 -0
  53. package/dist/hooks/index.js.map +1 -1
  54. package/dist/hooks/runners/slack.d.ts +62 -0
  55. package/dist/hooks/runners/slack.d.ts.map +1 -0
  56. package/dist/hooks/runners/slack.js +329 -0
  57. package/dist/hooks/runners/slack.js.map +1 -0
  58. package/dist/hooks/types.d.ts +4 -4
  59. package/dist/hooks/types.d.ts.map +1 -1
  60. package/dist/runner/__tests__/file-sender-mcp.test.d.ts +2 -0
  61. package/dist/runner/__tests__/file-sender-mcp.test.d.ts.map +1 -0
  62. package/dist/runner/__tests__/file-sender-mcp.test.js +177 -0
  63. package/dist/runner/__tests__/file-sender-mcp.test.js.map +1 -0
  64. package/dist/runner/__tests__/job-executor.test.js +12 -12
  65. package/dist/runner/__tests__/job-executor.test.js.map +1 -1
  66. package/dist/runner/file-sender-mcp.d.ts +69 -0
  67. package/dist/runner/file-sender-mcp.d.ts.map +1 -0
  68. package/dist/runner/file-sender-mcp.js +145 -0
  69. package/dist/runner/file-sender-mcp.js.map +1 -0
  70. package/dist/runner/index.d.ts +1 -0
  71. package/dist/runner/index.d.ts.map +1 -1
  72. package/dist/runner/index.js +2 -0
  73. package/dist/runner/index.js.map +1 -1
  74. package/dist/runner/job-executor.d.ts.map +1 -1
  75. package/dist/runner/job-executor.js +35 -5
  76. package/dist/runner/job-executor.js.map +1 -1
  77. package/dist/runner/runtime/__tests__/docker-security.test.js +12 -12
  78. package/dist/runner/runtime/__tests__/docker-security.test.js.map +1 -1
  79. package/dist/runner/runtime/__tests__/mcp-http-bridge.test.d.ts +2 -0
  80. package/dist/runner/runtime/__tests__/mcp-http-bridge.test.d.ts.map +1 -0
  81. package/dist/runner/runtime/__tests__/mcp-http-bridge.test.js +191 -0
  82. package/dist/runner/runtime/__tests__/mcp-http-bridge.test.js.map +1 -0
  83. package/dist/runner/runtime/container-manager.d.ts +5 -1
  84. package/dist/runner/runtime/container-manager.d.ts.map +1 -1
  85. package/dist/runner/runtime/container-manager.js +115 -5
  86. package/dist/runner/runtime/container-manager.js.map +1 -1
  87. package/dist/runner/runtime/container-runner.d.ts +2 -0
  88. package/dist/runner/runtime/container-runner.d.ts.map +1 -1
  89. package/dist/runner/runtime/container-runner.js +121 -74
  90. package/dist/runner/runtime/container-runner.js.map +1 -1
  91. package/dist/runner/runtime/index.d.ts +1 -0
  92. package/dist/runner/runtime/index.d.ts.map +1 -1
  93. package/dist/runner/runtime/index.js +2 -0
  94. package/dist/runner/runtime/index.js.map +1 -1
  95. package/dist/runner/runtime/interface.d.ts +2 -0
  96. package/dist/runner/runtime/interface.d.ts.map +1 -1
  97. package/dist/runner/runtime/mcp-http-bridge.d.ts +39 -0
  98. package/dist/runner/runtime/mcp-http-bridge.d.ts.map +1 -0
  99. package/dist/runner/runtime/mcp-http-bridge.js +205 -0
  100. package/dist/runner/runtime/mcp-http-bridge.js.map +1 -0
  101. package/dist/runner/runtime/sdk-runtime.d.ts.map +1 -1
  102. package/dist/runner/runtime/sdk-runtime.js +74 -1
  103. package/dist/runner/runtime/sdk-runtime.js.map +1 -1
  104. package/dist/runner/types.d.ts +44 -0
  105. package/dist/runner/types.d.ts.map +1 -1
  106. package/dist/state/index.d.ts +1 -1
  107. package/dist/state/index.d.ts.map +1 -1
  108. package/dist/state/index.js +1 -1
  109. package/dist/state/index.js.map +1 -1
  110. package/dist/state/session-validation.d.ts +8 -0
  111. package/dist/state/session-validation.d.ts.map +1 -1
  112. package/dist/state/session-validation.js +36 -0
  113. package/dist/state/session-validation.js.map +1 -1
  114. package/package.json +1 -9
@@ -1883,6 +1883,43 @@ export declare const DiscordGuildSchema: z.ZodObject<{
1883
1883
  blocklist?: string[] | undefined;
1884
1884
  } | undefined;
1885
1885
  }>;
1886
+ /**
1887
+ * Discord output configuration for controlling what gets shown during conversations
1888
+ *
1889
+ * @example
1890
+ * ```yaml
1891
+ * output:
1892
+ * tool_results: true
1893
+ * tool_result_max_length: 900
1894
+ * system_status: true
1895
+ * result_summary: false
1896
+ * errors: true
1897
+ * ```
1898
+ */
1899
+ export declare const DiscordOutputSchema: z.ZodObject<{
1900
+ /** Show tool results as embeds (default: true) */
1901
+ tool_results: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1902
+ /** Max chars of tool output to include in embeds (default: 900, max: 1000) */
1903
+ tool_result_max_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1904
+ /** Show system status messages like "compacting context..." (default: true) */
1905
+ system_status: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1906
+ /** Show a summary embed when the agent finishes a turn (cost, tokens, turns) (default: false) */
1907
+ result_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1908
+ /** Show error messages from the SDK (default: true) */
1909
+ errors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1910
+ }, "strip", z.ZodTypeAny, {
1911
+ tool_results: boolean;
1912
+ tool_result_max_length: number;
1913
+ system_status: boolean;
1914
+ result_summary: boolean;
1915
+ errors: boolean;
1916
+ }, {
1917
+ tool_results?: boolean | undefined;
1918
+ tool_result_max_length?: number | undefined;
1919
+ system_status?: boolean | undefined;
1920
+ result_summary?: boolean | undefined;
1921
+ errors?: boolean | undefined;
1922
+ }>;
1886
1923
  /**
1887
1924
  * Per-agent Discord bot configuration schema
1888
1925
  *
@@ -1896,6 +1933,12 @@ export declare const DiscordGuildSchema: z.ZodObject<{
1896
1933
  * bot_token_env: SUPPORT_DISCORD_TOKEN
1897
1934
  * session_expiry_hours: 24
1898
1935
  * log_level: standard
1936
+ * output:
1937
+ * tool_results: true
1938
+ * tool_result_max_length: 900
1939
+ * system_status: true
1940
+ * result_summary: false
1941
+ * errors: true
1899
1942
  * presence:
1900
1943
  * activity_type: watching
1901
1944
  * activity_message: "for support requests"
@@ -1914,6 +1957,31 @@ export declare const AgentChatDiscordSchema: z.ZodObject<{
1914
1957
  session_expiry_hours: z.ZodDefault<z.ZodNumber>;
1915
1958
  /** Log level for this agent's Discord connector */
1916
1959
  log_level: z.ZodDefault<z.ZodEnum<["minimal", "standard", "verbose"]>>;
1960
+ /** Output configuration for controlling what gets shown during conversations */
1961
+ output: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1962
+ /** Show tool results as embeds (default: true) */
1963
+ tool_results: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1964
+ /** Max chars of tool output to include in embeds (default: 900, max: 1000) */
1965
+ tool_result_max_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1966
+ /** Show system status messages like "compacting context..." (default: true) */
1967
+ system_status: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1968
+ /** Show a summary embed when the agent finishes a turn (cost, tokens, turns) (default: false) */
1969
+ result_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1970
+ /** Show error messages from the SDK (default: true) */
1971
+ errors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1972
+ }, "strip", z.ZodTypeAny, {
1973
+ tool_results: boolean;
1974
+ tool_result_max_length: number;
1975
+ system_status: boolean;
1976
+ result_summary: boolean;
1977
+ errors: boolean;
1978
+ }, {
1979
+ tool_results?: boolean | undefined;
1980
+ tool_result_max_length?: number | undefined;
1981
+ system_status?: boolean | undefined;
1982
+ result_summary?: boolean | undefined;
1983
+ errors?: boolean | undefined;
1984
+ }>>>;
1917
1985
  /** Bot presence/activity configuration */
1918
1986
  presence: z.ZodOptional<z.ZodObject<{
1919
1987
  activity_type: z.ZodOptional<z.ZodEnum<["playing", "watching", "listening", "competing"]>>;
@@ -2010,6 +2078,13 @@ export declare const AgentChatDiscordSchema: z.ZodObject<{
2010
2078
  bot_token_env: string;
2011
2079
  session_expiry_hours: number;
2012
2080
  log_level: "minimal" | "standard" | "verbose";
2081
+ output: {
2082
+ tool_results: boolean;
2083
+ tool_result_max_length: number;
2084
+ system_status: boolean;
2085
+ result_summary: boolean;
2086
+ errors: boolean;
2087
+ };
2013
2088
  guilds: {
2014
2089
  id: string;
2015
2090
  channels?: {
@@ -2060,11 +2135,121 @@ export declare const AgentChatDiscordSchema: z.ZodObject<{
2060
2135
  } | undefined;
2061
2136
  session_expiry_hours?: number | undefined;
2062
2137
  log_level?: "minimal" | "standard" | "verbose" | undefined;
2138
+ output?: {
2139
+ tool_results?: boolean | undefined;
2140
+ tool_result_max_length?: number | undefined;
2141
+ system_status?: boolean | undefined;
2142
+ result_summary?: boolean | undefined;
2143
+ errors?: boolean | undefined;
2144
+ } | undefined;
2063
2145
  presence?: {
2064
2146
  activity_type?: "playing" | "watching" | "listening" | "competing" | undefined;
2065
2147
  activity_message?: string | undefined;
2066
2148
  } | undefined;
2067
2149
  }>;
2150
+ /**
2151
+ * Slack channel configuration for an agent's bot
2152
+ *
2153
+ * @example
2154
+ * ```yaml
2155
+ * channels:
2156
+ * - id: "C0123456789"
2157
+ * name: "#support"
2158
+ * ```
2159
+ */
2160
+ export declare const SlackChannelSchema: z.ZodObject<{
2161
+ /** Slack channel ID */
2162
+ id: z.ZodString;
2163
+ /** Human-readable channel name (for documentation) */
2164
+ name: z.ZodOptional<z.ZodString>;
2165
+ /** Channel message mode: "mention" = only respond to @mentions, "auto" = respond to all messages */
2166
+ mode: z.ZodDefault<z.ZodEnum<["mention", "auto"]>>;
2167
+ /** Number of context messages to include (future use) */
2168
+ context_messages: z.ZodDefault<z.ZodNumber>;
2169
+ }, "strip", z.ZodTypeAny, {
2170
+ mode: "mention" | "auto";
2171
+ id: string;
2172
+ context_messages: number;
2173
+ name?: string | undefined;
2174
+ }, {
2175
+ id: string;
2176
+ name?: string | undefined;
2177
+ mode?: "mention" | "auto" | undefined;
2178
+ context_messages?: number | undefined;
2179
+ }>;
2180
+ /**
2181
+ * Per-agent Slack bot configuration schema
2182
+ *
2183
+ * Unlike Discord where each agent has its own bot token,
2184
+ * Slack uses a single app with one bot token per workspace.
2185
+ * All agents share the same bot + app token pair.
2186
+ *
2187
+ * @example
2188
+ * ```yaml
2189
+ * chat:
2190
+ * slack:
2191
+ * bot_token_env: SLACK_BOT_TOKEN
2192
+ * app_token_env: SLACK_APP_TOKEN
2193
+ * session_expiry_hours: 24
2194
+ * log_level: standard
2195
+ * channels:
2196
+ * - id: "C0123456789"
2197
+ * name: "#support"
2198
+ * ```
2199
+ */
2200
+ export declare const AgentChatSlackSchema: z.ZodObject<{
2201
+ /** Environment variable name containing the bot token (xoxb-...) */
2202
+ bot_token_env: z.ZodDefault<z.ZodString>;
2203
+ /** Environment variable name containing the app token for Socket Mode (xapp-...) */
2204
+ app_token_env: z.ZodDefault<z.ZodString>;
2205
+ /** Session expiry in hours (default: 24) */
2206
+ session_expiry_hours: z.ZodDefault<z.ZodNumber>;
2207
+ /** Log level for this agent's Slack connector */
2208
+ log_level: z.ZodDefault<z.ZodEnum<["minimal", "standard", "verbose"]>>;
2209
+ /** Channels this agent listens in */
2210
+ channels: z.ZodArray<z.ZodObject<{
2211
+ /** Slack channel ID */
2212
+ id: z.ZodString;
2213
+ /** Human-readable channel name (for documentation) */
2214
+ name: z.ZodOptional<z.ZodString>;
2215
+ /** Channel message mode: "mention" = only respond to @mentions, "auto" = respond to all messages */
2216
+ mode: z.ZodDefault<z.ZodEnum<["mention", "auto"]>>;
2217
+ /** Number of context messages to include (future use) */
2218
+ context_messages: z.ZodDefault<z.ZodNumber>;
2219
+ }, "strip", z.ZodTypeAny, {
2220
+ mode: "mention" | "auto";
2221
+ id: string;
2222
+ context_messages: number;
2223
+ name?: string | undefined;
2224
+ }, {
2225
+ id: string;
2226
+ name?: string | undefined;
2227
+ mode?: "mention" | "auto" | undefined;
2228
+ context_messages?: number | undefined;
2229
+ }>, "many">;
2230
+ }, "strip", z.ZodTypeAny, {
2231
+ channels: {
2232
+ mode: "mention" | "auto";
2233
+ id: string;
2234
+ context_messages: number;
2235
+ name?: string | undefined;
2236
+ }[];
2237
+ bot_token_env: string;
2238
+ session_expiry_hours: number;
2239
+ log_level: "minimal" | "standard" | "verbose";
2240
+ app_token_env: string;
2241
+ }, {
2242
+ channels: {
2243
+ id: string;
2244
+ name?: string | undefined;
2245
+ mode?: "mention" | "auto" | undefined;
2246
+ context_messages?: number | undefined;
2247
+ }[];
2248
+ bot_token_env?: string | undefined;
2249
+ session_expiry_hours?: number | undefined;
2250
+ log_level?: "minimal" | "standard" | "verbose" | undefined;
2251
+ app_token_env?: string | undefined;
2252
+ }>;
2068
2253
  export declare const AgentChatSchema: z.ZodObject<{
2069
2254
  discord: z.ZodOptional<z.ZodObject<{
2070
2255
  /** Environment variable name containing the bot token (never store tokens in config) */
@@ -2073,6 +2258,31 @@ export declare const AgentChatSchema: z.ZodObject<{
2073
2258
  session_expiry_hours: z.ZodDefault<z.ZodNumber>;
2074
2259
  /** Log level for this agent's Discord connector */
2075
2260
  log_level: z.ZodDefault<z.ZodEnum<["minimal", "standard", "verbose"]>>;
2261
+ /** Output configuration for controlling what gets shown during conversations */
2262
+ output: z.ZodDefault<z.ZodOptional<z.ZodObject<{
2263
+ /** Show tool results as embeds (default: true) */
2264
+ tool_results: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2265
+ /** Max chars of tool output to include in embeds (default: 900, max: 1000) */
2266
+ tool_result_max_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2267
+ /** Show system status messages like "compacting context..." (default: true) */
2268
+ system_status: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2269
+ /** Show a summary embed when the agent finishes a turn (cost, tokens, turns) (default: false) */
2270
+ result_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2271
+ /** Show error messages from the SDK (default: true) */
2272
+ errors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2273
+ }, "strip", z.ZodTypeAny, {
2274
+ tool_results: boolean;
2275
+ tool_result_max_length: number;
2276
+ system_status: boolean;
2277
+ result_summary: boolean;
2278
+ errors: boolean;
2279
+ }, {
2280
+ tool_results?: boolean | undefined;
2281
+ tool_result_max_length?: number | undefined;
2282
+ system_status?: boolean | undefined;
2283
+ result_summary?: boolean | undefined;
2284
+ errors?: boolean | undefined;
2285
+ }>>>;
2076
2286
  /** Bot presence/activity configuration */
2077
2287
  presence: z.ZodOptional<z.ZodObject<{
2078
2288
  activity_type: z.ZodOptional<z.ZodEnum<["playing", "watching", "listening", "competing"]>>;
@@ -2169,6 +2379,13 @@ export declare const AgentChatSchema: z.ZodObject<{
2169
2379
  bot_token_env: string;
2170
2380
  session_expiry_hours: number;
2171
2381
  log_level: "minimal" | "standard" | "verbose";
2382
+ output: {
2383
+ tool_results: boolean;
2384
+ tool_result_max_length: number;
2385
+ system_status: boolean;
2386
+ result_summary: boolean;
2387
+ errors: boolean;
2388
+ };
2172
2389
  guilds: {
2173
2390
  id: string;
2174
2391
  channels?: {
@@ -2219,16 +2436,83 @@ export declare const AgentChatSchema: z.ZodObject<{
2219
2436
  } | undefined;
2220
2437
  session_expiry_hours?: number | undefined;
2221
2438
  log_level?: "minimal" | "standard" | "verbose" | undefined;
2439
+ output?: {
2440
+ tool_results?: boolean | undefined;
2441
+ tool_result_max_length?: number | undefined;
2442
+ system_status?: boolean | undefined;
2443
+ result_summary?: boolean | undefined;
2444
+ errors?: boolean | undefined;
2445
+ } | undefined;
2222
2446
  presence?: {
2223
2447
  activity_type?: "playing" | "watching" | "listening" | "competing" | undefined;
2224
2448
  activity_message?: string | undefined;
2225
2449
  } | undefined;
2226
2450
  }>>;
2451
+ slack: z.ZodOptional<z.ZodObject<{
2452
+ /** Environment variable name containing the bot token (xoxb-...) */
2453
+ bot_token_env: z.ZodDefault<z.ZodString>;
2454
+ /** Environment variable name containing the app token for Socket Mode (xapp-...) */
2455
+ app_token_env: z.ZodDefault<z.ZodString>;
2456
+ /** Session expiry in hours (default: 24) */
2457
+ session_expiry_hours: z.ZodDefault<z.ZodNumber>;
2458
+ /** Log level for this agent's Slack connector */
2459
+ log_level: z.ZodDefault<z.ZodEnum<["minimal", "standard", "verbose"]>>;
2460
+ /** Channels this agent listens in */
2461
+ channels: z.ZodArray<z.ZodObject<{
2462
+ /** Slack channel ID */
2463
+ id: z.ZodString;
2464
+ /** Human-readable channel name (for documentation) */
2465
+ name: z.ZodOptional<z.ZodString>;
2466
+ /** Channel message mode: "mention" = only respond to @mentions, "auto" = respond to all messages */
2467
+ mode: z.ZodDefault<z.ZodEnum<["mention", "auto"]>>;
2468
+ /** Number of context messages to include (future use) */
2469
+ context_messages: z.ZodDefault<z.ZodNumber>;
2470
+ }, "strip", z.ZodTypeAny, {
2471
+ mode: "mention" | "auto";
2472
+ id: string;
2473
+ context_messages: number;
2474
+ name?: string | undefined;
2475
+ }, {
2476
+ id: string;
2477
+ name?: string | undefined;
2478
+ mode?: "mention" | "auto" | undefined;
2479
+ context_messages?: number | undefined;
2480
+ }>, "many">;
2481
+ }, "strip", z.ZodTypeAny, {
2482
+ channels: {
2483
+ mode: "mention" | "auto";
2484
+ id: string;
2485
+ context_messages: number;
2486
+ name?: string | undefined;
2487
+ }[];
2488
+ bot_token_env: string;
2489
+ session_expiry_hours: number;
2490
+ log_level: "minimal" | "standard" | "verbose";
2491
+ app_token_env: string;
2492
+ }, {
2493
+ channels: {
2494
+ id: string;
2495
+ name?: string | undefined;
2496
+ mode?: "mention" | "auto" | undefined;
2497
+ context_messages?: number | undefined;
2498
+ }[];
2499
+ bot_token_env?: string | undefined;
2500
+ session_expiry_hours?: number | undefined;
2501
+ log_level?: "minimal" | "standard" | "verbose" | undefined;
2502
+ app_token_env?: string | undefined;
2503
+ }>>;
2227
2504
  }, "strip", z.ZodTypeAny, {
2228
2505
  discord?: {
2229
2506
  bot_token_env: string;
2230
2507
  session_expiry_hours: number;
2231
2508
  log_level: "minimal" | "standard" | "verbose";
2509
+ output: {
2510
+ tool_results: boolean;
2511
+ tool_result_max_length: number;
2512
+ system_status: boolean;
2513
+ result_summary: boolean;
2514
+ errors: boolean;
2515
+ };
2232
2516
  guilds: {
2233
2517
  id: string;
2234
2518
  channels?: {
@@ -2255,6 +2539,18 @@ export declare const AgentChatSchema: z.ZodObject<{
2255
2539
  activity_message?: string | undefined;
2256
2540
  } | undefined;
2257
2541
  } | undefined;
2542
+ slack?: {
2543
+ channels: {
2544
+ mode: "mention" | "auto";
2545
+ id: string;
2546
+ context_messages: number;
2547
+ name?: string | undefined;
2548
+ }[];
2549
+ bot_token_env: string;
2550
+ session_expiry_hours: number;
2551
+ log_level: "minimal" | "standard" | "verbose";
2552
+ app_token_env: string;
2553
+ } | undefined;
2258
2554
  }, {
2259
2555
  discord?: {
2260
2556
  bot_token_env: string;
@@ -2281,11 +2577,30 @@ export declare const AgentChatSchema: z.ZodObject<{
2281
2577
  } | undefined;
2282
2578
  session_expiry_hours?: number | undefined;
2283
2579
  log_level?: "minimal" | "standard" | "verbose" | undefined;
2580
+ output?: {
2581
+ tool_results?: boolean | undefined;
2582
+ tool_result_max_length?: number | undefined;
2583
+ system_status?: boolean | undefined;
2584
+ result_summary?: boolean | undefined;
2585
+ errors?: boolean | undefined;
2586
+ } | undefined;
2284
2587
  presence?: {
2285
2588
  activity_type?: "playing" | "watching" | "listening" | "competing" | undefined;
2286
2589
  activity_message?: string | undefined;
2287
2590
  } | undefined;
2288
2591
  } | undefined;
2592
+ slack?: {
2593
+ channels: {
2594
+ id: string;
2595
+ name?: string | undefined;
2596
+ mode?: "mention" | "auto" | undefined;
2597
+ context_messages?: number | undefined;
2598
+ }[];
2599
+ bot_token_env?: string | undefined;
2600
+ session_expiry_hours?: number | undefined;
2601
+ log_level?: "minimal" | "standard" | "verbose" | undefined;
2602
+ app_token_env?: string | undefined;
2603
+ } | undefined;
2289
2604
  }>;
2290
2605
  /**
2291
2606
  * Hook events that can trigger hooks
@@ -2404,6 +2719,41 @@ export declare const DiscordHookConfigSchema: z.ZodObject<{
2404
2719
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2405
2720
  when?: string | undefined;
2406
2721
  }>;
2722
+ /**
2723
+ * Slack hook configuration - sends notification to a Slack channel
2724
+ */
2725
+ export declare const SlackHookConfigSchema: z.ZodObject<{
2726
+ /** Human-readable name for this hook (used in logs) */
2727
+ name: z.ZodOptional<z.ZodString>;
2728
+ /** Whether to continue with subsequent hooks if this hook fails (default: true) */
2729
+ continue_on_error: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2730
+ /** Filter which events trigger this hook (default: all events) */
2731
+ on_events: z.ZodOptional<z.ZodArray<z.ZodEnum<["completed", "failed", "timeout", "cancelled"]>, "many">>;
2732
+ /** Conditional execution: dot-notation path to a boolean field in the hook context (e.g., "metadata.shouldNotify") */
2733
+ when: z.ZodOptional<z.ZodString>;
2734
+ } & {
2735
+ type: z.ZodLiteral<"slack">;
2736
+ /** Slack channel ID to post to */
2737
+ channel_id: z.ZodString;
2738
+ /** Environment variable name containing the bot token */
2739
+ bot_token_env: z.ZodDefault<z.ZodString>;
2740
+ }, "strip", z.ZodTypeAny, {
2741
+ type: "slack";
2742
+ bot_token_env: string;
2743
+ continue_on_error: boolean;
2744
+ channel_id: string;
2745
+ name?: string | undefined;
2746
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2747
+ when?: string | undefined;
2748
+ }, {
2749
+ type: "slack";
2750
+ channel_id: string;
2751
+ name?: string | undefined;
2752
+ bot_token_env?: string | undefined;
2753
+ continue_on_error?: boolean | undefined;
2754
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2755
+ when?: string | undefined;
2756
+ }>;
2407
2757
  /**
2408
2758
  * Union of all hook configuration types
2409
2759
  */
@@ -2508,6 +2858,37 @@ export declare const HookConfigSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
2508
2858
  continue_on_error?: boolean | undefined;
2509
2859
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2510
2860
  when?: string | undefined;
2861
+ }>, z.ZodObject<{
2862
+ /** Human-readable name for this hook (used in logs) */
2863
+ name: z.ZodOptional<z.ZodString>;
2864
+ /** Whether to continue with subsequent hooks if this hook fails (default: true) */
2865
+ continue_on_error: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2866
+ /** Filter which events trigger this hook (default: all events) */
2867
+ on_events: z.ZodOptional<z.ZodArray<z.ZodEnum<["completed", "failed", "timeout", "cancelled"]>, "many">>;
2868
+ /** Conditional execution: dot-notation path to a boolean field in the hook context (e.g., "metadata.shouldNotify") */
2869
+ when: z.ZodOptional<z.ZodString>;
2870
+ } & {
2871
+ type: z.ZodLiteral<"slack">;
2872
+ /** Slack channel ID to post to */
2873
+ channel_id: z.ZodString;
2874
+ /** Environment variable name containing the bot token */
2875
+ bot_token_env: z.ZodDefault<z.ZodString>;
2876
+ }, "strip", z.ZodTypeAny, {
2877
+ type: "slack";
2878
+ bot_token_env: string;
2879
+ continue_on_error: boolean;
2880
+ channel_id: string;
2881
+ name?: string | undefined;
2882
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2883
+ when?: string | undefined;
2884
+ }, {
2885
+ type: "slack";
2886
+ channel_id: string;
2887
+ name?: string | undefined;
2888
+ bot_token_env?: string | undefined;
2889
+ continue_on_error?: boolean | undefined;
2890
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2891
+ when?: string | undefined;
2511
2892
  }>]>;
2512
2893
  /**
2513
2894
  * Agent hooks configuration
@@ -2615,6 +2996,37 @@ export declare const AgentHooksSchema: z.ZodObject<{
2615
2996
  continue_on_error?: boolean | undefined;
2616
2997
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2617
2998
  when?: string | undefined;
2999
+ }>, z.ZodObject<{
3000
+ /** Human-readable name for this hook (used in logs) */
3001
+ name: z.ZodOptional<z.ZodString>;
3002
+ /** Whether to continue with subsequent hooks if this hook fails (default: true) */
3003
+ continue_on_error: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3004
+ /** Filter which events trigger this hook (default: all events) */
3005
+ on_events: z.ZodOptional<z.ZodArray<z.ZodEnum<["completed", "failed", "timeout", "cancelled"]>, "many">>;
3006
+ /** Conditional execution: dot-notation path to a boolean field in the hook context (e.g., "metadata.shouldNotify") */
3007
+ when: z.ZodOptional<z.ZodString>;
3008
+ } & {
3009
+ type: z.ZodLiteral<"slack">;
3010
+ /** Slack channel ID to post to */
3011
+ channel_id: z.ZodString;
3012
+ /** Environment variable name containing the bot token */
3013
+ bot_token_env: z.ZodDefault<z.ZodString>;
3014
+ }, "strip", z.ZodTypeAny, {
3015
+ type: "slack";
3016
+ bot_token_env: string;
3017
+ continue_on_error: boolean;
3018
+ channel_id: string;
3019
+ name?: string | undefined;
3020
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3021
+ when?: string | undefined;
3022
+ }, {
3023
+ type: "slack";
3024
+ channel_id: string;
3025
+ name?: string | undefined;
3026
+ bot_token_env?: string | undefined;
3027
+ continue_on_error?: boolean | undefined;
3028
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3029
+ when?: string | undefined;
2618
3030
  }>]>, "many">>;
2619
3031
  /** Hooks to run only when a job fails */
2620
3032
  on_error: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2718,6 +3130,37 @@ export declare const AgentHooksSchema: z.ZodObject<{
2718
3130
  continue_on_error?: boolean | undefined;
2719
3131
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2720
3132
  when?: string | undefined;
3133
+ }>, z.ZodObject<{
3134
+ /** Human-readable name for this hook (used in logs) */
3135
+ name: z.ZodOptional<z.ZodString>;
3136
+ /** Whether to continue with subsequent hooks if this hook fails (default: true) */
3137
+ continue_on_error: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3138
+ /** Filter which events trigger this hook (default: all events) */
3139
+ on_events: z.ZodOptional<z.ZodArray<z.ZodEnum<["completed", "failed", "timeout", "cancelled"]>, "many">>;
3140
+ /** Conditional execution: dot-notation path to a boolean field in the hook context (e.g., "metadata.shouldNotify") */
3141
+ when: z.ZodOptional<z.ZodString>;
3142
+ } & {
3143
+ type: z.ZodLiteral<"slack">;
3144
+ /** Slack channel ID to post to */
3145
+ channel_id: z.ZodString;
3146
+ /** Environment variable name containing the bot token */
3147
+ bot_token_env: z.ZodDefault<z.ZodString>;
3148
+ }, "strip", z.ZodTypeAny, {
3149
+ type: "slack";
3150
+ bot_token_env: string;
3151
+ continue_on_error: boolean;
3152
+ channel_id: string;
3153
+ name?: string | undefined;
3154
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3155
+ when?: string | undefined;
3156
+ }, {
3157
+ type: "slack";
3158
+ channel_id: string;
3159
+ name?: string | undefined;
3160
+ bot_token_env?: string | undefined;
3161
+ continue_on_error?: boolean | undefined;
3162
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3163
+ when?: string | undefined;
2721
3164
  }>]>, "many">>;
2722
3165
  }, "strip", z.ZodTypeAny, {
2723
3166
  after_run?: ({
@@ -2746,6 +3189,14 @@ export declare const AgentHooksSchema: z.ZodObject<{
2746
3189
  name?: string | undefined;
2747
3190
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2748
3191
  when?: string | undefined;
3192
+ } | {
3193
+ type: "slack";
3194
+ bot_token_env: string;
3195
+ continue_on_error: boolean;
3196
+ channel_id: string;
3197
+ name?: string | undefined;
3198
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3199
+ when?: string | undefined;
2749
3200
  })[] | undefined;
2750
3201
  on_error?: ({
2751
3202
  type: "shell";
@@ -2773,6 +3224,14 @@ export declare const AgentHooksSchema: z.ZodObject<{
2773
3224
  name?: string | undefined;
2774
3225
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2775
3226
  when?: string | undefined;
3227
+ } | {
3228
+ type: "slack";
3229
+ bot_token_env: string;
3230
+ continue_on_error: boolean;
3231
+ channel_id: string;
3232
+ name?: string | undefined;
3233
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3234
+ when?: string | undefined;
2776
3235
  })[] | undefined;
2777
3236
  }, {
2778
3237
  after_run?: ({
@@ -2801,6 +3260,14 @@ export declare const AgentHooksSchema: z.ZodObject<{
2801
3260
  continue_on_error?: boolean | undefined;
2802
3261
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2803
3262
  when?: string | undefined;
3263
+ } | {
3264
+ type: "slack";
3265
+ channel_id: string;
3266
+ name?: string | undefined;
3267
+ bot_token_env?: string | undefined;
3268
+ continue_on_error?: boolean | undefined;
3269
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3270
+ when?: string | undefined;
2804
3271
  })[] | undefined;
2805
3272
  on_error?: ({
2806
3273
  type: "shell";
@@ -2828,6 +3295,14 @@ export declare const AgentHooksSchema: z.ZodObject<{
2828
3295
  continue_on_error?: boolean | undefined;
2829
3296
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
2830
3297
  when?: string | undefined;
3298
+ } | {
3299
+ type: "slack";
3300
+ channel_id: string;
3301
+ name?: string | undefined;
3302
+ bot_token_env?: string | undefined;
3303
+ continue_on_error?: boolean | undefined;
3304
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3305
+ when?: string | undefined;
2831
3306
  })[] | undefined;
2832
3307
  }>;
2833
3308
  export declare const AgentWorkingDirectorySchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
@@ -3167,6 +3642,31 @@ export declare const AgentConfigSchema: z.ZodObject<{
3167
3642
  session_expiry_hours: z.ZodDefault<z.ZodNumber>;
3168
3643
  /** Log level for this agent's Discord connector */
3169
3644
  log_level: z.ZodDefault<z.ZodEnum<["minimal", "standard", "verbose"]>>;
3645
+ /** Output configuration for controlling what gets shown during conversations */
3646
+ output: z.ZodDefault<z.ZodOptional<z.ZodObject<{
3647
+ /** Show tool results as embeds (default: true) */
3648
+ tool_results: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3649
+ /** Max chars of tool output to include in embeds (default: 900, max: 1000) */
3650
+ tool_result_max_length: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3651
+ /** Show system status messages like "compacting context..." (default: true) */
3652
+ system_status: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3653
+ /** Show a summary embed when the agent finishes a turn (cost, tokens, turns) (default: false) */
3654
+ result_summary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3655
+ /** Show error messages from the SDK (default: true) */
3656
+ errors: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3657
+ }, "strip", z.ZodTypeAny, {
3658
+ tool_results: boolean;
3659
+ tool_result_max_length: number;
3660
+ system_status: boolean;
3661
+ result_summary: boolean;
3662
+ errors: boolean;
3663
+ }, {
3664
+ tool_results?: boolean | undefined;
3665
+ tool_result_max_length?: number | undefined;
3666
+ system_status?: boolean | undefined;
3667
+ result_summary?: boolean | undefined;
3668
+ errors?: boolean | undefined;
3669
+ }>>>;
3170
3670
  /** Bot presence/activity configuration */
3171
3671
  presence: z.ZodOptional<z.ZodObject<{
3172
3672
  activity_type: z.ZodOptional<z.ZodEnum<["playing", "watching", "listening", "competing"]>>;
@@ -3263,6 +3763,13 @@ export declare const AgentConfigSchema: z.ZodObject<{
3263
3763
  bot_token_env: string;
3264
3764
  session_expiry_hours: number;
3265
3765
  log_level: "minimal" | "standard" | "verbose";
3766
+ output: {
3767
+ tool_results: boolean;
3768
+ tool_result_max_length: number;
3769
+ system_status: boolean;
3770
+ result_summary: boolean;
3771
+ errors: boolean;
3772
+ };
3266
3773
  guilds: {
3267
3774
  id: string;
3268
3775
  channels?: {
@@ -3313,16 +3820,83 @@ export declare const AgentConfigSchema: z.ZodObject<{
3313
3820
  } | undefined;
3314
3821
  session_expiry_hours?: number | undefined;
3315
3822
  log_level?: "minimal" | "standard" | "verbose" | undefined;
3823
+ output?: {
3824
+ tool_results?: boolean | undefined;
3825
+ tool_result_max_length?: number | undefined;
3826
+ system_status?: boolean | undefined;
3827
+ result_summary?: boolean | undefined;
3828
+ errors?: boolean | undefined;
3829
+ } | undefined;
3316
3830
  presence?: {
3317
3831
  activity_type?: "playing" | "watching" | "listening" | "competing" | undefined;
3318
3832
  activity_message?: string | undefined;
3319
3833
  } | undefined;
3320
3834
  }>>;
3835
+ slack: z.ZodOptional<z.ZodObject<{
3836
+ /** Environment variable name containing the bot token (xoxb-...) */
3837
+ bot_token_env: z.ZodDefault<z.ZodString>;
3838
+ /** Environment variable name containing the app token for Socket Mode (xapp-...) */
3839
+ app_token_env: z.ZodDefault<z.ZodString>;
3840
+ /** Session expiry in hours (default: 24) */
3841
+ session_expiry_hours: z.ZodDefault<z.ZodNumber>;
3842
+ /** Log level for this agent's Slack connector */
3843
+ log_level: z.ZodDefault<z.ZodEnum<["minimal", "standard", "verbose"]>>;
3844
+ /** Channels this agent listens in */
3845
+ channels: z.ZodArray<z.ZodObject<{
3846
+ /** Slack channel ID */
3847
+ id: z.ZodString;
3848
+ /** Human-readable channel name (for documentation) */
3849
+ name: z.ZodOptional<z.ZodString>;
3850
+ /** Channel message mode: "mention" = only respond to @mentions, "auto" = respond to all messages */
3851
+ mode: z.ZodDefault<z.ZodEnum<["mention", "auto"]>>;
3852
+ /** Number of context messages to include (future use) */
3853
+ context_messages: z.ZodDefault<z.ZodNumber>;
3854
+ }, "strip", z.ZodTypeAny, {
3855
+ mode: "mention" | "auto";
3856
+ id: string;
3857
+ context_messages: number;
3858
+ name?: string | undefined;
3859
+ }, {
3860
+ id: string;
3861
+ name?: string | undefined;
3862
+ mode?: "mention" | "auto" | undefined;
3863
+ context_messages?: number | undefined;
3864
+ }>, "many">;
3865
+ }, "strip", z.ZodTypeAny, {
3866
+ channels: {
3867
+ mode: "mention" | "auto";
3868
+ id: string;
3869
+ context_messages: number;
3870
+ name?: string | undefined;
3871
+ }[];
3872
+ bot_token_env: string;
3873
+ session_expiry_hours: number;
3874
+ log_level: "minimal" | "standard" | "verbose";
3875
+ app_token_env: string;
3876
+ }, {
3877
+ channels: {
3878
+ id: string;
3879
+ name?: string | undefined;
3880
+ mode?: "mention" | "auto" | undefined;
3881
+ context_messages?: number | undefined;
3882
+ }[];
3883
+ bot_token_env?: string | undefined;
3884
+ session_expiry_hours?: number | undefined;
3885
+ log_level?: "minimal" | "standard" | "verbose" | undefined;
3886
+ app_token_env?: string | undefined;
3887
+ }>>;
3321
3888
  }, "strip", z.ZodTypeAny, {
3322
3889
  discord?: {
3323
3890
  bot_token_env: string;
3324
3891
  session_expiry_hours: number;
3325
3892
  log_level: "minimal" | "standard" | "verbose";
3893
+ output: {
3894
+ tool_results: boolean;
3895
+ tool_result_max_length: number;
3896
+ system_status: boolean;
3897
+ result_summary: boolean;
3898
+ errors: boolean;
3899
+ };
3326
3900
  guilds: {
3327
3901
  id: string;
3328
3902
  channels?: {
@@ -3349,6 +3923,18 @@ export declare const AgentConfigSchema: z.ZodObject<{
3349
3923
  activity_message?: string | undefined;
3350
3924
  } | undefined;
3351
3925
  } | undefined;
3926
+ slack?: {
3927
+ channels: {
3928
+ mode: "mention" | "auto";
3929
+ id: string;
3930
+ context_messages: number;
3931
+ name?: string | undefined;
3932
+ }[];
3933
+ bot_token_env: string;
3934
+ session_expiry_hours: number;
3935
+ log_level: "minimal" | "standard" | "verbose";
3936
+ app_token_env: string;
3937
+ } | undefined;
3352
3938
  }, {
3353
3939
  discord?: {
3354
3940
  bot_token_env: string;
@@ -3375,11 +3961,30 @@ export declare const AgentConfigSchema: z.ZodObject<{
3375
3961
  } | undefined;
3376
3962
  session_expiry_hours?: number | undefined;
3377
3963
  log_level?: "minimal" | "standard" | "verbose" | undefined;
3964
+ output?: {
3965
+ tool_results?: boolean | undefined;
3966
+ tool_result_max_length?: number | undefined;
3967
+ system_status?: boolean | undefined;
3968
+ result_summary?: boolean | undefined;
3969
+ errors?: boolean | undefined;
3970
+ } | undefined;
3378
3971
  presence?: {
3379
3972
  activity_type?: "playing" | "watching" | "listening" | "competing" | undefined;
3380
3973
  activity_message?: string | undefined;
3381
3974
  } | undefined;
3382
3975
  } | undefined;
3976
+ slack?: {
3977
+ channels: {
3978
+ id: string;
3979
+ name?: string | undefined;
3980
+ mode?: "mention" | "auto" | undefined;
3981
+ context_messages?: number | undefined;
3982
+ }[];
3983
+ bot_token_env?: string | undefined;
3984
+ session_expiry_hours?: number | undefined;
3985
+ log_level?: "minimal" | "standard" | "verbose" | undefined;
3986
+ app_token_env?: string | undefined;
3987
+ } | undefined;
3383
3988
  }>>;
3384
3989
  hooks: z.ZodOptional<z.ZodObject<{
3385
3990
  /** Hooks to run after every job (success or failure) */
@@ -3484,6 +4089,37 @@ export declare const AgentConfigSchema: z.ZodObject<{
3484
4089
  continue_on_error?: boolean | undefined;
3485
4090
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3486
4091
  when?: string | undefined;
4092
+ }>, z.ZodObject<{
4093
+ /** Human-readable name for this hook (used in logs) */
4094
+ name: z.ZodOptional<z.ZodString>;
4095
+ /** Whether to continue with subsequent hooks if this hook fails (default: true) */
4096
+ continue_on_error: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4097
+ /** Filter which events trigger this hook (default: all events) */
4098
+ on_events: z.ZodOptional<z.ZodArray<z.ZodEnum<["completed", "failed", "timeout", "cancelled"]>, "many">>;
4099
+ /** Conditional execution: dot-notation path to a boolean field in the hook context (e.g., "metadata.shouldNotify") */
4100
+ when: z.ZodOptional<z.ZodString>;
4101
+ } & {
4102
+ type: z.ZodLiteral<"slack">;
4103
+ /** Slack channel ID to post to */
4104
+ channel_id: z.ZodString;
4105
+ /** Environment variable name containing the bot token */
4106
+ bot_token_env: z.ZodDefault<z.ZodString>;
4107
+ }, "strip", z.ZodTypeAny, {
4108
+ type: "slack";
4109
+ bot_token_env: string;
4110
+ continue_on_error: boolean;
4111
+ channel_id: string;
4112
+ name?: string | undefined;
4113
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4114
+ when?: string | undefined;
4115
+ }, {
4116
+ type: "slack";
4117
+ channel_id: string;
4118
+ name?: string | undefined;
4119
+ bot_token_env?: string | undefined;
4120
+ continue_on_error?: boolean | undefined;
4121
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4122
+ when?: string | undefined;
3487
4123
  }>]>, "many">>;
3488
4124
  /** Hooks to run only when a job fails */
3489
4125
  on_error: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -3587,6 +4223,37 @@ export declare const AgentConfigSchema: z.ZodObject<{
3587
4223
  continue_on_error?: boolean | undefined;
3588
4224
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3589
4225
  when?: string | undefined;
4226
+ }>, z.ZodObject<{
4227
+ /** Human-readable name for this hook (used in logs) */
4228
+ name: z.ZodOptional<z.ZodString>;
4229
+ /** Whether to continue with subsequent hooks if this hook fails (default: true) */
4230
+ continue_on_error: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4231
+ /** Filter which events trigger this hook (default: all events) */
4232
+ on_events: z.ZodOptional<z.ZodArray<z.ZodEnum<["completed", "failed", "timeout", "cancelled"]>, "many">>;
4233
+ /** Conditional execution: dot-notation path to a boolean field in the hook context (e.g., "metadata.shouldNotify") */
4234
+ when: z.ZodOptional<z.ZodString>;
4235
+ } & {
4236
+ type: z.ZodLiteral<"slack">;
4237
+ /** Slack channel ID to post to */
4238
+ channel_id: z.ZodString;
4239
+ /** Environment variable name containing the bot token */
4240
+ bot_token_env: z.ZodDefault<z.ZodString>;
4241
+ }, "strip", z.ZodTypeAny, {
4242
+ type: "slack";
4243
+ bot_token_env: string;
4244
+ continue_on_error: boolean;
4245
+ channel_id: string;
4246
+ name?: string | undefined;
4247
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4248
+ when?: string | undefined;
4249
+ }, {
4250
+ type: "slack";
4251
+ channel_id: string;
4252
+ name?: string | undefined;
4253
+ bot_token_env?: string | undefined;
4254
+ continue_on_error?: boolean | undefined;
4255
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4256
+ when?: string | undefined;
3590
4257
  }>]>, "many">>;
3591
4258
  }, "strip", z.ZodTypeAny, {
3592
4259
  after_run?: ({
@@ -3615,6 +4282,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
3615
4282
  name?: string | undefined;
3616
4283
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3617
4284
  when?: string | undefined;
4285
+ } | {
4286
+ type: "slack";
4287
+ bot_token_env: string;
4288
+ continue_on_error: boolean;
4289
+ channel_id: string;
4290
+ name?: string | undefined;
4291
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4292
+ when?: string | undefined;
3618
4293
  })[] | undefined;
3619
4294
  on_error?: ({
3620
4295
  type: "shell";
@@ -3642,6 +4317,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
3642
4317
  name?: string | undefined;
3643
4318
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3644
4319
  when?: string | undefined;
4320
+ } | {
4321
+ type: "slack";
4322
+ bot_token_env: string;
4323
+ continue_on_error: boolean;
4324
+ channel_id: string;
4325
+ name?: string | undefined;
4326
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4327
+ when?: string | undefined;
3645
4328
  })[] | undefined;
3646
4329
  }, {
3647
4330
  after_run?: ({
@@ -3670,6 +4353,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
3670
4353
  continue_on_error?: boolean | undefined;
3671
4354
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3672
4355
  when?: string | undefined;
4356
+ } | {
4357
+ type: "slack";
4358
+ channel_id: string;
4359
+ name?: string | undefined;
4360
+ bot_token_env?: string | undefined;
4361
+ continue_on_error?: boolean | undefined;
4362
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4363
+ when?: string | undefined;
3673
4364
  })[] | undefined;
3674
4365
  on_error?: ({
3675
4366
  type: "shell";
@@ -3697,6 +4388,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
3697
4388
  continue_on_error?: boolean | undefined;
3698
4389
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3699
4390
  when?: string | undefined;
4391
+ } | {
4392
+ type: "slack";
4393
+ channel_id: string;
4394
+ name?: string | undefined;
4395
+ bot_token_env?: string | undefined;
4396
+ continue_on_error?: boolean | undefined;
4397
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4398
+ when?: string | undefined;
3700
4399
  })[] | undefined;
3701
4400
  }>>;
3702
4401
  docker: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -3888,6 +4587,13 @@ export declare const AgentConfigSchema: z.ZodObject<{
3888
4587
  bot_token_env: string;
3889
4588
  session_expiry_hours: number;
3890
4589
  log_level: "minimal" | "standard" | "verbose";
4590
+ output: {
4591
+ tool_results: boolean;
4592
+ tool_result_max_length: number;
4593
+ system_status: boolean;
4594
+ result_summary: boolean;
4595
+ errors: boolean;
4596
+ };
3891
4597
  guilds: {
3892
4598
  id: string;
3893
4599
  channels?: {
@@ -3914,6 +4620,18 @@ export declare const AgentConfigSchema: z.ZodObject<{
3914
4620
  activity_message?: string | undefined;
3915
4621
  } | undefined;
3916
4622
  } | undefined;
4623
+ slack?: {
4624
+ channels: {
4625
+ mode: "mention" | "auto";
4626
+ id: string;
4627
+ context_messages: number;
4628
+ name?: string | undefined;
4629
+ }[];
4630
+ bot_token_env: string;
4631
+ session_expiry_hours: number;
4632
+ log_level: "minimal" | "standard" | "verbose";
4633
+ app_token_env: string;
4634
+ } | undefined;
3917
4635
  } | undefined;
3918
4636
  description?: string | undefined;
3919
4637
  identity?: {
@@ -3986,6 +4704,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
3986
4704
  name?: string | undefined;
3987
4705
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
3988
4706
  when?: string | undefined;
4707
+ } | {
4708
+ type: "slack";
4709
+ bot_token_env: string;
4710
+ continue_on_error: boolean;
4711
+ channel_id: string;
4712
+ name?: string | undefined;
4713
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4714
+ when?: string | undefined;
3989
4715
  })[] | undefined;
3990
4716
  on_error?: ({
3991
4717
  type: "shell";
@@ -4013,6 +4739,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
4013
4739
  name?: string | undefined;
4014
4740
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4015
4741
  when?: string | undefined;
4742
+ } | {
4743
+ type: "slack";
4744
+ bot_token_env: string;
4745
+ continue_on_error: boolean;
4746
+ channel_id: string;
4747
+ name?: string | undefined;
4748
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4749
+ when?: string | undefined;
4016
4750
  })[] | undefined;
4017
4751
  } | undefined;
4018
4752
  metadata_file?: string | undefined;
@@ -4100,11 +4834,30 @@ export declare const AgentConfigSchema: z.ZodObject<{
4100
4834
  } | undefined;
4101
4835
  session_expiry_hours?: number | undefined;
4102
4836
  log_level?: "minimal" | "standard" | "verbose" | undefined;
4837
+ output?: {
4838
+ tool_results?: boolean | undefined;
4839
+ tool_result_max_length?: number | undefined;
4840
+ system_status?: boolean | undefined;
4841
+ result_summary?: boolean | undefined;
4842
+ errors?: boolean | undefined;
4843
+ } | undefined;
4103
4844
  presence?: {
4104
4845
  activity_type?: "playing" | "watching" | "listening" | "competing" | undefined;
4105
4846
  activity_message?: string | undefined;
4106
4847
  } | undefined;
4107
4848
  } | undefined;
4849
+ slack?: {
4850
+ channels: {
4851
+ id: string;
4852
+ name?: string | undefined;
4853
+ mode?: "mention" | "auto" | undefined;
4854
+ context_messages?: number | undefined;
4855
+ }[];
4856
+ bot_token_env?: string | undefined;
4857
+ session_expiry_hours?: number | undefined;
4858
+ log_level?: "minimal" | "standard" | "verbose" | undefined;
4859
+ app_token_env?: string | undefined;
4860
+ } | undefined;
4108
4861
  } | undefined;
4109
4862
  description?: string | undefined;
4110
4863
  identity?: {
@@ -4177,6 +4930,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
4177
4930
  continue_on_error?: boolean | undefined;
4178
4931
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4179
4932
  when?: string | undefined;
4933
+ } | {
4934
+ type: "slack";
4935
+ channel_id: string;
4936
+ name?: string | undefined;
4937
+ bot_token_env?: string | undefined;
4938
+ continue_on_error?: boolean | undefined;
4939
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4940
+ when?: string | undefined;
4180
4941
  })[] | undefined;
4181
4942
  on_error?: ({
4182
4943
  type: "shell";
@@ -4204,6 +4965,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
4204
4965
  continue_on_error?: boolean | undefined;
4205
4966
  on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4206
4967
  when?: string | undefined;
4968
+ } | {
4969
+ type: "slack";
4970
+ channel_id: string;
4971
+ name?: string | undefined;
4972
+ bot_token_env?: string | undefined;
4973
+ continue_on_error?: boolean | undefined;
4974
+ on_events?: ("timeout" | "completed" | "failed" | "cancelled")[] | undefined;
4975
+ when?: string | undefined;
4207
4976
  })[] | undefined;
4208
4977
  } | undefined;
4209
4978
  metadata_file?: string | undefined;
@@ -5420,19 +6189,24 @@ export type DiscordPresence = z.infer<typeof DiscordPresenceSchema>;
5420
6189
  export type DiscordDM = z.infer<typeof DiscordDMSchema>;
5421
6190
  export type DiscordChannel = z.infer<typeof DiscordChannelSchema>;
5422
6191
  export type DiscordGuild = z.infer<typeof DiscordGuildSchema>;
6192
+ export type DiscordOutput = z.infer<typeof DiscordOutputSchema>;
5423
6193
  export type AgentChatDiscord = z.infer<typeof AgentChatDiscordSchema>;
5424
6194
  export type AgentChat = z.infer<typeof AgentChatSchema>;
6195
+ export type SlackChannel = z.infer<typeof SlackChannelSchema>;
6196
+ export type AgentChatSlack = z.infer<typeof AgentChatSlackSchema>;
5425
6197
  export type AgentWorkingDirectory = z.infer<typeof AgentWorkingDirectorySchema>;
5426
6198
  export type AgentConfig = z.infer<typeof AgentConfigSchema>;
5427
6199
  export type HookEvent = z.infer<typeof HookEventSchema>;
5428
6200
  export type ShellHookConfig = z.infer<typeof ShellHookConfigSchema>;
5429
6201
  export type WebhookHookConfig = z.infer<typeof WebhookHookConfigSchema>;
5430
6202
  export type DiscordHookConfig = z.infer<typeof DiscordHookConfigSchema>;
6203
+ export type SlackHookConfig = z.infer<typeof SlackHookConfigSchema>;
5431
6204
  export type HookConfig = z.infer<typeof HookConfigSchema>;
5432
6205
  export type AgentHooks = z.infer<typeof AgentHooksSchema>;
5433
6206
  export type ShellHookConfigInput = z.input<typeof ShellHookConfigSchema>;
5434
6207
  export type WebhookHookConfigInput = z.input<typeof WebhookHookConfigSchema>;
5435
6208
  export type DiscordHookConfigInput = z.input<typeof DiscordHookConfigSchema>;
6209
+ export type SlackHookConfigInput = z.input<typeof SlackHookConfigSchema>;
5436
6210
  export type HookConfigInput = z.input<typeof HookConfigSchema>;
5437
6211
  export type AgentHooksInput = z.input<typeof AgentHooksSchema>;
5438
6212
  //# sourceMappingURL=schema.d.ts.map