@mastra/slack 1.8.0-alpha.0 → 1.8.0-alpha.1

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.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region \0rolldown/runtime.js
2
+ // \0rolldown/runtime.js
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -20,13 +20,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
20
  value: mod,
21
21
  enumerable: true
22
22
  }) : target, mod));
23
- //#endregion
24
23
  let crypto = require("crypto");
25
24
  crypto = __toESM(crypto, 1);
26
25
  let _mastra_core_channels = require("@mastra/core/channels");
27
26
  require("@mastra/core/storage");
28
27
  let _chat_adapter_slack = require("@chat-adapter/slack");
29
- //#region src/client.ts
28
+ // src/client.ts
30
29
  const SLACK_API_BASE = "https://slack.com/api";
31
30
  const SLACK_API_TIMEOUT_MS = 3e4;
32
31
  /**
@@ -212,8 +211,7 @@ var SlackManifestClient = class {
212
211
  if (!data.ok) console.warn(`[Slack] Failed to set app icon: ${data.error}`);
213
212
  }
214
213
  };
215
- //#endregion
216
- //#region src/crypto.ts
214
+ // src/crypto.ts
217
215
  /**
218
216
  * Verify a Slack request signature.
219
217
  * @see https://api.slack.com/authentication/verifying-requests-from-slack
@@ -272,8 +270,7 @@ function decrypt(ciphertext, key) {
272
270
  decipher.setAuthTag(authTag);
273
271
  return Buffer.concat([decipher.update(encrypted), decipher.final()]).toString("utf8");
274
272
  }
275
- //#endregion
276
- //#region src/manifest.ts
273
+ // src/manifest.ts
277
274
  /**
278
275
  * Default bot scopes required for agent functionality.
279
276
  */
@@ -360,8 +357,7 @@ function buildManifest(options) {
360
357
  }));
361
358
  return manifest;
362
359
  }
363
- //#endregion
364
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/util.js
360
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/util.js
365
361
  function getEnumValues(entries) {
366
362
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
367
363
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -888,8 +884,7 @@ function constantCatch(value) {
888
884
  fn[CONSTANT_CATCH] = true;
889
885
  return fn;
890
886
  }
891
- //#endregion
892
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/core.js
887
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/core.js
893
888
  var _a$1;
894
889
  const _zodDesc = {
895
890
  value: void 0,
@@ -995,8 +990,7 @@ function config(newConfig) {
995
990
  if (newConfig) Object.assign(globalConfig, newConfig);
996
991
  return globalConfig;
997
992
  }
998
- //#endregion
999
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/errors.js
993
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/errors.js
1000
994
  function _getMessage() {
1001
995
  const internals = this._zod;
1002
996
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -1110,8 +1104,7 @@ function formatError(error, mapper = (issue) => issue.message) {
1110
1104
  processError(error);
1111
1105
  return fieldErrors;
1112
1106
  }
1113
- //#endregion
1114
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/parse.js
1107
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/parse.js
1115
1108
  function finalizeParams(callee, params) {
1116
1109
  return {
1117
1110
  callee: params?.callee ?? callee,
@@ -1313,8 +1306,7 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1313
1306
  const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1314
1307
  return _safeParseAsync(_Err)(schema, value, _ctx);
1315
1308
  };
1316
- //#endregion
1317
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/regexes.js
1309
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/regexes.js
1318
1310
  /**
1319
1311
  * @deprecated CUID v1 is deprecated by its authors due to information leakage
1320
1312
  * (timestamps embedded in the id). Use {@link cuid2} instead.
@@ -1382,8 +1374,7 @@ function datetime(args) {
1382
1374
  const anyString = /^[\s\S]{0,}$/;
1383
1375
  const lowercase = /^[^A-Z]*$/;
1384
1376
  const uppercase = /^[^a-z]*$/;
1385
- //#endregion
1386
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/checks.js
1377
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/checks.js
1387
1378
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
1388
1379
  var _a;
1389
1380
  inst._zod ?? (inst._zod = {});
@@ -1562,8 +1553,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
1562
1553
  payload.value = def.tx(payload.value);
1563
1554
  };
1564
1555
  });
1565
- //#endregion
1566
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/doc.js
1556
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/doc.js
1567
1557
  var Doc = class {
1568
1558
  constructor(args = [], closed = {}) {
1569
1559
  this.content = [];
@@ -1596,15 +1586,13 @@ var Doc = class {
1596
1586
  return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
1597
1587
  }
1598
1588
  };
1599
- //#endregion
1600
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/versions.js
1589
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/versions.js
1601
1590
  const version = {
1602
1591
  major: 4,
1603
1592
  minor: 6,
1604
1593
  patch: 7
1605
1594
  };
1606
- //#endregion
1607
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/schemas.js
1595
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/schemas.js
1608
1596
  const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1609
1597
  var _a;
1610
1598
  inst ?? (inst = {});
@@ -2800,8 +2788,7 @@ function handleRefineResult(result, payload, input, inst) {
2800
2788
  payload.issues.push(issue(_iss));
2801
2789
  }
2802
2790
  }
2803
- //#endregion
2804
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/memoizer.js
2791
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/memoizer.js
2805
2792
  var $ZodCyclicError = class extends Error {
2806
2793
  constructor() {
2807
2794
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -3053,8 +3040,7 @@ function isBackEdge(ctx, value) {
3053
3040
  const backEdges = ctx[STATE]?.backEdges;
3054
3041
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
3055
3042
  }
3056
- //#endregion
3057
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/locales/en.js
3043
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/locales/en.js
3058
3044
  const error = () => {
3059
3045
  const Sizable = {
3060
3046
  string: {
@@ -3161,8 +3147,7 @@ const error = () => {
3161
3147
  function en_default() {
3162
3148
  return { localeError: error() };
3163
3149
  }
3164
- //#endregion
3165
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/registries.js
3150
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/registries.js
3166
3151
  var _a;
3167
3152
  var $ZodRegistry = class {
3168
3153
  constructor() {
@@ -3208,8 +3193,7 @@ function registry() {
3208
3193
  }
3209
3194
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
3210
3195
  const globalRegistry = globalThis.__zod_globalRegistry;
3211
- //#endregion
3212
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/api.js
3196
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/api.js
3213
3197
  function snapshotChecks(def) {
3214
3198
  if (def.checks) def.checks = [...def.checks];
3215
3199
  return def;
@@ -3648,8 +3632,7 @@ function _check(fn, params) {
3648
3632
  ch._zod.check = fn;
3649
3633
  return ch;
3650
3634
  }
3651
- //#endregion
3652
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/to-json-schema.js
3635
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/to-json-schema.js
3653
3636
  function assignProps(target, ...sources) {
3654
3637
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
3655
3638
  return target;
@@ -4092,8 +4075,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
4092
4075
  extractDefs(ctx, schema);
4093
4076
  return finalize(ctx, schema);
4094
4077
  };
4095
- //#endregion
4096
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/json-schema-processors.js
4078
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/core/json-schema-processors.js
4097
4079
  const narrowMin = (agg, key, value) => {
4098
4080
  if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
4099
4081
  };
@@ -4382,8 +4364,7 @@ const optionalProcessor = (schema, ctx, _json, params) => {
4382
4364
  const seen = ctx.seen.get(schema);
4383
4365
  seen.ref = def.innerType;
4384
4366
  };
4385
- //#endregion
4386
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/classic/errors.js
4367
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/classic/errors.js
4387
4368
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
4388
4369
  function _lazyMethod(proto, key, make) {
4389
4370
  Object.defineProperty(proto, key, {
@@ -4432,8 +4413,7 @@ const initializer = (inst, issues) => {
4432
4413
  });
4433
4414
  };
4434
4415
  const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4435
- //#endregion
4436
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/classic/parse.js
4416
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/classic/parse.js
4437
4417
  const parse = /* @__PURE__ */ _parse(ZodRealError);
4438
4418
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
4439
4419
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -4446,8 +4426,7 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
4446
4426
  const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
4447
4427
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
4448
4428
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
4449
- //#endregion
4450
- //#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/classic/schemas.js
4429
+ // ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.7/4c9f15c99caaca8b83ba8ab68f247a75121c86fb7e498876ed36daccd0f3d3ce/node_modules/zod/v4/classic/schemas.js
4451
4430
  function _ensureDefaultLocale() {
4452
4431
  if (!globalConfig.localeError) config(en_default());
4453
4432
  }
@@ -5193,8 +5172,7 @@ function refine(fn, _params = {}) {
5193
5172
  function superRefine(fn, params) {
5194
5173
  return /* @__PURE__ */ _superRefine(fn, params);
5195
5174
  }
5196
- //#endregion
5197
- //#region src/schemas.ts
5175
+ // src/schemas.ts
5198
5176
  /**
5199
5177
  * Zod schemas for Slack channel data stored in ChannelsStorage.
5200
5178
  * These define the shape of the `data` JSON blob in ChannelInstallation records.
@@ -5237,8 +5215,7 @@ const SlackConfigDataSchema = object({
5237
5215
  token: string().optional(),
5238
5216
  refreshToken: string()
5239
5217
  });
5240
- //#endregion
5241
- //#region src/provider.ts
5218
+ // src/provider.ts
5242
5219
  const PLATFORM = "slack";
5243
5220
  /**
5244
5221
  * Remove trailing slashes from a base URL so callback paths like
@@ -6449,7 +6426,6 @@ var SlackProvider = class {
6449
6426
  }
6450
6427
  }
6451
6428
  };
6452
- //#endregion
6453
6429
  exports.DEFAULT_BOT_EVENTS = DEFAULT_BOT_EVENTS;
6454
6430
  exports.DEFAULT_BOT_SCOPES = DEFAULT_BOT_SCOPES;
6455
6431
  exports.SlackConfigDataSchema = SlackConfigDataSchema;