@agentconnect.md/setup 1.52.0-rc.5 → 1.52.0-rc.8
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 +15 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37447,8 +37447,18 @@ 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
|
-
/**
|
|
37451
|
-
*
|
|
37450
|
+
/**
|
|
37451
|
+
* Every bot scope the app requests, and the exact set an installation must hold.
|
|
37452
|
+
*
|
|
37453
|
+
* There was briefly a required/capability split here, on the theory that a scope backing one
|
|
37454
|
+
* optional tool should not mark an older installation broken. It did not survive contact: the
|
|
37455
|
+
* "required" half was not required either — the app receives and answers messages without
|
|
37456
|
+
* several of them — so the line was invented rather than observed, and it bought a second
|
|
37457
|
+
* constant, an extra API field, extra console branches, and a message that said six permissions
|
|
37458
|
+
* were missing without naming them. One list is both simpler and more honest: these are the
|
|
37459
|
+
* scopes AgentConnect needs, an install short of any of them is incomplete, and the console
|
|
37460
|
+
* says exactly which to add.
|
|
37461
|
+
*/
|
|
37452
37462
|
const SLACK_BOT_SCOPES = [
|
|
37453
37463
|
"files:read",
|
|
37454
37464
|
"app_mentions:read",
|
|
@@ -37464,32 +37474,16 @@ const SLACK_BOT_SCOPES = [
|
|
|
37464
37474
|
"im:write",
|
|
37465
37475
|
"mpim:history",
|
|
37466
37476
|
"mpim:read",
|
|
37477
|
+
"reactions:read",
|
|
37467
37478
|
"reactions:write",
|
|
37468
37479
|
"assistant:write",
|
|
37469
|
-
"users:read"
|
|
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",
|
|
37480
|
+
"users:read",
|
|
37485
37481
|
"canvases:read",
|
|
37486
37482
|
"canvases:write",
|
|
37487
37483
|
"channels:manage",
|
|
37488
37484
|
"groups:write",
|
|
37489
37485
|
"mpim:write"
|
|
37490
37486
|
];
|
|
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];
|
|
37493
37487
|
const SLACK_BOT_EVENTS = [
|
|
37494
37488
|
"agent_session_stopped",
|
|
37495
37489
|
"agent_session_title_changed",
|
|
@@ -37549,7 +37543,7 @@ function buildSlackAppManifest(name, options = {}) {
|
|
|
37549
37543
|
}]
|
|
37550
37544
|
},
|
|
37551
37545
|
oauth_config: {
|
|
37552
|
-
scopes: { bot: [...
|
|
37546
|
+
scopes: { bot: [...SLACK_BOT_SCOPES] },
|
|
37553
37547
|
...redirectUrls.length > 0 ? { redirect_urls: redirectUrls } : {},
|
|
37554
37548
|
...options.pkceEnabled !== void 0 ? { pkce_enabled: options.pkceEnabled } : {}
|
|
37555
37549
|
},
|