@agentconnect.md/setup 1.51.0 → 1.52.0-rc.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.js +25 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37447,6 +37447,8 @@ var import_fastify = /* @__PURE__ */ __toESM(require_fastify(), 1);
|
|
|
37447
37447
|
const SLACK_MANAGE_SESSION_SHORTCUT_CALLBACK_ID = "ac_manage_session";
|
|
37448
37448
|
/** Public platform profile copy. Never derive this from an Agent description. */
|
|
37449
37449
|
const PLATFORM_APP_DESCRIPTION = "AI agent powered by AgentConnect.";
|
|
37450
|
+
/** The bot scopes an installation MUST hold — without one of these the app cannot receive,
|
|
37451
|
+
* read, or answer a message at all, so a short grant is refused rather than degraded. */
|
|
37450
37452
|
const SLACK_BOT_SCOPES = [
|
|
37451
37453
|
"files:read",
|
|
37452
37454
|
"app_mentions:read",
|
|
@@ -37466,6 +37468,28 @@ const SLACK_BOT_SCOPES = [
|
|
|
37466
37468
|
"assistant:write",
|
|
37467
37469
|
"users:read"
|
|
37468
37470
|
];
|
|
37471
|
+
/**
|
|
37472
|
+
* Bot scopes that unlock ONE optional capability each and are declared but never fenced on.
|
|
37473
|
+
*
|
|
37474
|
+
* A required scope is load-bearing: an install missing it is broken, so `checkSlackBotScopes`
|
|
37475
|
+
* refuses it and the console asks for a reinstall. These are not — a workspace that granted
|
|
37476
|
+
* the app before the capability existed keeps working, and only the one tool that needs the
|
|
37477
|
+
* scope refuses, with Slack's own `missing_scope`. Fencing on them would mark every existing
|
|
37478
|
+
* installation broken for a feature it never asked for.
|
|
37479
|
+
*
|
|
37480
|
+
* `channels:manage` / `groups:write` also back `conversations.leave`, which has always needed
|
|
37481
|
+
* a write scope this manifest did not declare.
|
|
37482
|
+
*/
|
|
37483
|
+
const SLACK_CAPABILITY_BOT_SCOPES = [
|
|
37484
|
+
"reactions:read",
|
|
37485
|
+
"canvases:read",
|
|
37486
|
+
"canvases:write",
|
|
37487
|
+
"channels:manage",
|
|
37488
|
+
"groups:write",
|
|
37489
|
+
"mpim:write"
|
|
37490
|
+
];
|
|
37491
|
+
/** Everything the app manifest declares: the required fence plus the optional capabilities. */
|
|
37492
|
+
const SLACK_MANIFEST_BOT_SCOPES = [...SLACK_BOT_SCOPES, ...SLACK_CAPABILITY_BOT_SCOPES];
|
|
37469
37493
|
const SLACK_BOT_EVENTS = [
|
|
37470
37494
|
"agent_session_stopped",
|
|
37471
37495
|
"agent_session_title_changed",
|
|
@@ -37525,7 +37549,7 @@ function buildSlackAppManifest(name, options = {}) {
|
|
|
37525
37549
|
}]
|
|
37526
37550
|
},
|
|
37527
37551
|
oauth_config: {
|
|
37528
|
-
scopes: { bot: [...
|
|
37552
|
+
scopes: { bot: [...SLACK_MANIFEST_BOT_SCOPES] },
|
|
37529
37553
|
...redirectUrls.length > 0 ? { redirect_urls: redirectUrls } : {},
|
|
37530
37554
|
...options.pkceEnabled !== void 0 ? { pkce_enabled: options.pkceEnabled } : {}
|
|
37531
37555
|
},
|