@open-everywhere/provider-slack 0.7.0 → 0.8.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.
Files changed (127) hide show
  1. package/agent/access/slack-attachment-fetch.ts +2 -1
  2. package/agent/app-manifest.ts +18 -2
  3. package/agent/channels/slack-agent-session.ts +338 -0
  4. package/agent/channels/slack-attachments.ts +20 -11
  5. package/agent/channels/slack-commands.ts +172 -12
  6. package/agent/channels/slack-context.ts +0 -5
  7. package/agent/channels/slack-events.ts +161 -33
  8. package/agent/channels/slack-follow-ups.ts +148 -0
  9. package/agent/channels/slack-front.ts +232 -26
  10. package/agent/channels/slack-home.ts +9 -3
  11. package/agent/channels/slack-identity.ts +43 -2
  12. package/agent/channels/slack-memory-canvas.ts +192 -51
  13. package/agent/channels/slack-origin-codec.ts +9 -0
  14. package/agent/channels/slack-post-arm.ts +68 -11
  15. package/agent/channels/slack-read.ts +27 -2
  16. package/agent/channels/slack-reply-blocks.ts +180 -0
  17. package/agent/channels/slack-reply-feedback.ts +75 -0
  18. package/agent/channels/slack-shortcut.ts +1 -1
  19. package/agent/channels/slack-voice-clips.ts +82 -0
  20. package/agent/channels/slack-wake-backscroll.ts +0 -5
  21. package/agent/channels/slack.ts +74 -13
  22. package/agent/docs-generated.ts +1299 -2
  23. package/agent/ops.ts +14 -21
  24. package/agent/register.ts +13 -0
  25. package/agent/setup/credentials.ts +17 -0
  26. package/agent/setup/page.ts +6 -3
  27. package/agent/surface-parity.ts +2 -0
  28. package/dist/agent/access/slack-attachment-fetch.d.ts.map +1 -1
  29. package/dist/agent/access/slack-attachment-fetch.js.map +1 -1
  30. package/dist/agent/app-manifest.d.ts.map +1 -1
  31. package/dist/agent/app-manifest.js +18 -2
  32. package/dist/agent/app-manifest.js.map +1 -1
  33. package/dist/agent/channels/slack-agent-session.d.ts +85 -0
  34. package/dist/agent/channels/slack-agent-session.d.ts.map +1 -0
  35. package/dist/agent/channels/slack-agent-session.js +282 -0
  36. package/dist/agent/channels/slack-agent-session.js.map +1 -0
  37. package/dist/agent/channels/slack-attachments.d.ts +11 -0
  38. package/dist/agent/channels/slack-attachments.d.ts.map +1 -1
  39. package/dist/agent/channels/slack-attachments.js +21 -14
  40. package/dist/agent/channels/slack-attachments.js.map +1 -1
  41. package/dist/agent/channels/slack-commands.d.ts +113 -10
  42. package/dist/agent/channels/slack-commands.d.ts.map +1 -1
  43. package/dist/agent/channels/slack-commands.js +146 -13
  44. package/dist/agent/channels/slack-commands.js.map +1 -1
  45. package/dist/agent/channels/slack-context.d.ts +1 -2
  46. package/dist/agent/channels/slack-context.d.ts.map +1 -1
  47. package/dist/agent/channels/slack-context.js +0 -4
  48. package/dist/agent/channels/slack-context.js.map +1 -1
  49. package/dist/agent/channels/slack-events.d.ts +53 -100
  50. package/dist/agent/channels/slack-events.d.ts.map +1 -1
  51. package/dist/agent/channels/slack-events.js +142 -26
  52. package/dist/agent/channels/slack-events.js.map +1 -1
  53. package/dist/agent/channels/slack-follow-ups.d.ts +44 -0
  54. package/dist/agent/channels/slack-follow-ups.d.ts.map +1 -0
  55. package/dist/agent/channels/slack-follow-ups.js +129 -0
  56. package/dist/agent/channels/slack-follow-ups.js.map +1 -0
  57. package/dist/agent/channels/slack-front.d.ts +28 -45
  58. package/dist/agent/channels/slack-front.d.ts.map +1 -1
  59. package/dist/agent/channels/slack-front.js +207 -22
  60. package/dist/agent/channels/slack-front.js.map +1 -1
  61. package/dist/agent/channels/slack-home.d.ts.map +1 -1
  62. package/dist/agent/channels/slack-home.js +10 -3
  63. package/dist/agent/channels/slack-home.js.map +1 -1
  64. package/dist/agent/channels/slack-identity.d.ts +33 -21
  65. package/dist/agent/channels/slack-identity.d.ts.map +1 -1
  66. package/dist/agent/channels/slack-identity.js +36 -2
  67. package/dist/agent/channels/slack-identity.js.map +1 -1
  68. package/dist/agent/channels/slack-memory-canvas.d.ts +21 -5
  69. package/dist/agent/channels/slack-memory-canvas.d.ts.map +1 -1
  70. package/dist/agent/channels/slack-memory-canvas.js +162 -52
  71. package/dist/agent/channels/slack-memory-canvas.js.map +1 -1
  72. package/dist/agent/channels/slack-origin-codec.d.ts.map +1 -1
  73. package/dist/agent/channels/slack-origin-codec.js +10 -0
  74. package/dist/agent/channels/slack-origin-codec.js.map +1 -1
  75. package/dist/agent/channels/slack-post-arm.d.ts +21 -1
  76. package/dist/agent/channels/slack-post-arm.d.ts.map +1 -1
  77. package/dist/agent/channels/slack-post-arm.js +57 -10
  78. package/dist/agent/channels/slack-post-arm.js.map +1 -1
  79. package/dist/agent/channels/slack-read.d.ts +11 -1
  80. package/dist/agent/channels/slack-read.d.ts.map +1 -1
  81. package/dist/agent/channels/slack-read.js +27 -3
  82. package/dist/agent/channels/slack-read.js.map +1 -1
  83. package/dist/agent/channels/slack-reply-blocks.d.ts +29 -0
  84. package/dist/agent/channels/slack-reply-blocks.d.ts.map +1 -0
  85. package/dist/agent/channels/slack-reply-blocks.js +172 -0
  86. package/dist/agent/channels/slack-reply-blocks.js.map +1 -0
  87. package/dist/agent/channels/slack-reply-feedback.d.ts +23 -0
  88. package/dist/agent/channels/slack-reply-feedback.d.ts.map +1 -0
  89. package/dist/agent/channels/slack-reply-feedback.js +63 -0
  90. package/dist/agent/channels/slack-reply-feedback.js.map +1 -0
  91. package/dist/agent/channels/slack-shortcut.d.ts +10 -0
  92. package/dist/agent/channels/slack-shortcut.d.ts.map +1 -1
  93. package/dist/agent/channels/slack-shortcut.js +1 -1
  94. package/dist/agent/channels/slack-shortcut.js.map +1 -1
  95. package/dist/agent/channels/slack-voice-clips.d.ts +16 -0
  96. package/dist/agent/channels/slack-voice-clips.d.ts.map +1 -0
  97. package/dist/agent/channels/slack-voice-clips.js +80 -0
  98. package/dist/agent/channels/slack-voice-clips.js.map +1 -0
  99. package/dist/agent/channels/slack-wake-backscroll.d.ts +0 -2
  100. package/dist/agent/channels/slack-wake-backscroll.d.ts.map +1 -1
  101. package/dist/agent/channels/slack-wake-backscroll.js +0 -4
  102. package/dist/agent/channels/slack-wake-backscroll.js.map +1 -1
  103. package/dist/agent/channels/slack.d.ts +22 -1
  104. package/dist/agent/channels/slack.d.ts.map +1 -1
  105. package/dist/agent/channels/slack.js +63 -13
  106. package/dist/agent/channels/slack.js.map +1 -1
  107. package/dist/agent/docs-generated.d.ts.map +1 -1
  108. package/dist/agent/docs-generated.js +1299 -2
  109. package/dist/agent/docs-generated.js.map +1 -1
  110. package/dist/agent/ops.d.ts +1 -1
  111. package/dist/agent/ops.d.ts.map +1 -1
  112. package/dist/agent/ops.js +15 -21
  113. package/dist/agent/ops.js.map +1 -1
  114. package/dist/agent/register.d.ts.map +1 -1
  115. package/dist/agent/register.js +12 -1
  116. package/dist/agent/register.js.map +1 -1
  117. package/dist/agent/setup/credentials.d.ts +12 -0
  118. package/dist/agent/setup/credentials.d.ts.map +1 -1
  119. package/dist/agent/setup/credentials.js +17 -0
  120. package/dist/agent/setup/credentials.js.map +1 -1
  121. package/dist/agent/setup/page.d.ts.map +1 -1
  122. package/dist/agent/setup/page.js +6 -3
  123. package/dist/agent/setup/page.js.map +1 -1
  124. package/dist/agent/surface-parity.d.ts.map +1 -1
  125. package/dist/agent/surface-parity.js +2 -0
  126. package/dist/agent/surface-parity.js.map +1 -1
  127. package/package.json +31 -3
package/agent/ops.ts CHANGED
@@ -1,14 +1,15 @@
1
1
  // registerSlackOps — the LIGHT ops-plane half of the slack bundle's boot wiring: the paste-ready
2
- // app manifest and the telemetry credential-presence probe. Split out of register.ts so the
3
- // STANDALONE ops MCP entry (the app's scripts/ops-mcp.ts, which serves the setup tools with no
4
- // agent boot) can register it without pulling the whole channel graph. registerSlackProvider()
5
- // calls this too, so the agent runtime carries the same registrations.
2
+ // app manifest. Split out of register.ts so the STANDALONE ops MCP entry (the app's
3
+ // scripts/ops-mcp.ts, which serves the setup tools with no agent boot) can register it without
4
+ // pulling the whole channel graph. registerSlackProvider() calls this too, so the agent runtime
5
+ // carries the same registrations.
6
6
  //
7
7
  // It imports core through the LIGHT door (`adapter-api-ops.js`), not the main barrel: the main
8
8
  // barrel loads most of core, and that one import was most of the ops MCP server's start time.
9
9
  //
10
- // This file (not core) owns the Slack env-key knowledge — SLACK_BOT_TOKEN / SLACK_SIGNING_SECRET
11
- // are the bundle's vendor fingerprints (boundary-test.ts rule 6).
10
+ // The bundle (not core) owns the Slack env-key knowledge — SLACK_BOT_TOKEN / SLACK_SIGNING_SECRET
11
+ // are the bundle's vendor fingerprints (boundary-test.ts rule 6). agent/setup/credentials.ts reads
12
+ // both; this file reads neither.
12
13
  //
13
14
  // 🔴 THE QUICKSTART GOAL STEP IS GONE (OPE-2233). This file used to register a "slack" step and a
14
15
  // Slack leg of a hosted `deploy` plan with core's `registerQuickstartSurfaceGoal`. That plan — and
@@ -18,13 +19,12 @@
18
19
  // included. Nothing was dropped except the duplicate — and the retired step's own honesty about
19
20
  // `/setup` moved with it, to that engine step's `detail`.
20
21
  //
21
- // 🔴 THERE ARE TWO HOMES SINCE OPE-2231, and this file reads only one of them. The bundle resolves
22
- // both secrets ENV-FIRST and then from the deployment's encrypted credential store, which is where a
23
- // `/setup` run puts them (agent/setup/credentials.ts). This file's checks stay ENV-ONLY, and that is
24
- // a limitation rather than a statement about where the secrets live: the credential-probe seam is
25
- // SYNC, and reading the store is async. So a `/setup`-configured deployment still reports Slack as
26
- // unconfigured here. Every surface that says so says WHY, rather than claiming — as it did before —
27
- // that the credential store is not read at all.
22
+ // 🔴 THE TELEMETRY CREDENTIAL PROBE IS NOT HERE (OPE-2241). The bundle resolves the bot token
23
+ // ENV-FIRST and then from the deployment's encrypted credential store, which is where a `/setup` run
24
+ // puts it (agent/setup/credentials.ts). The store is reachable only through the main barrel, which
25
+ // this light-door file must not load (boundary-test rule 4d). So register.ts registers the probe,
26
+ // next to the status reporter that reads the store for the same reason. An env-only probe here
27
+ // reported a `/setup`-configured deployment as having no Slack credentials while its agent worked.
28
28
 
29
29
  import {
30
30
  agentCommandName,
@@ -32,7 +32,6 @@ import {
32
32
  declaredMcpServers,
33
33
  getSettings,
34
34
  registerSurfaceAppManifest,
35
- registerSurfaceCredentialProbe,
36
35
  } from "@open-everywhere/core/agent/adapter-api-ops.js";
37
36
  import { SLACK_AS_YOU_NAME } from "./slack-as-you.js";
38
37
  import {
@@ -59,7 +58,7 @@ export function slackManifestOptionsFromSettings(opts: { readonly appName?: stri
59
58
  };
60
59
  }
61
60
 
62
- /** Register the slack ops-plane arms (app manifest + telemetry presence probe). */
61
+ /** Register the slack ops-plane arm (the app manifest). */
63
62
  export function registerSlackOps(): void {
64
63
  // THE PASTE-READY APP MANIFEST (OPE-1603). Minting the Slack app stays human, so the ops plane's
65
64
  // job is to hand the operator the exact document. The bundle owns the document (agent/
@@ -74,10 +73,4 @@ export function registerSlackOps(): void {
74
73
  template: (opts) => slackAppManifestTemplate(slackManifestOptionsFromSettings(opts)),
75
74
  appNameMax: SLACK_APP_NAME_MAX,
76
75
  });
77
- // THE PRESENCE PROBE IS ENV-ONLY, AND THAT IS A KNOWN GAP (OPE-2231). `registerSurfaceCredentialProbe`
78
- // takes `() => boolean`; resolving the credential store is async, so a `/setup`-configured deployment
79
- // reports Slack as having no credentials here while the agent is working. Widening the seam to
80
- // `() => boolean | Promise<boolean>` touches every reader of the probe registry in core's
81
- // observability/telemetry.ts, so it is a core change with its own review rather than a line here.
82
- registerSurfaceCredentialProbe("slack", () => Boolean(process.env.SLACK_BOT_TOKEN));
83
76
  }
package/agent/register.ts CHANGED
@@ -51,12 +51,15 @@ import {
51
51
  registerProviderDocs,
52
52
  registerWebhookVerifier,
53
53
  registerBootNotice,
54
+ registerSurfaceCredentialProbe,
54
55
  registerSurfaceStatusReporter,
55
56
  registerMemoryWriteObserver,
56
57
  registerDomainMembershipProbe,
57
58
  registerFriendlyNameResolver,
58
59
  registerBotAskProbe,
60
+ registerSurfaceSessionState,
59
61
  } from "@open-everywhere/core/agent/adapter-api.js";
62
+ import { slackSurfaceSessionPin, slackSurfaceSessionSetter } from "./channels/slack-agent-session.js";
60
63
  import { slackFriendlyNameResolver } from "./channels/slack-friendly-names.js";
61
64
  import { PROVIDER_DOCS } from "./docs-generated.js";
62
65
  import { slackSurfaceStatus } from "./status.js";
@@ -87,6 +90,7 @@ import { liveSlackBotAskDeps, slackBotAskProbe } from "./channels/slack-bot-ask.
87
90
  import { resolveBotIdentity } from "./channels/slack-front.js";
88
91
  import { announceSlackSetupCode } from "./setup/claim.js";
89
92
  import { reopenSlackSetup, slackInstallState } from "./setup/install-state.js";
93
+ import { slackCredentialsConfigured } from "./setup/credentials.js";
90
94
 
91
95
  /** Perform ALL of the slack bundle's registrations. Idempotent (each register call replaces);
92
96
  * cheap and side-effect-free beyond the registry writes (every live Slack call inside the
@@ -118,6 +122,10 @@ export function registerSlackProvider(): void {
118
122
  // bounds by it (OPE-1847). A wrong or missing unit bounds the seat out of its own window.
119
123
  registerSeatCatchUp("slack", slackSeatCatchUpFetch, { timestampPrecisionMs: SLACK_TIMESTAMP_PRECISION_MS });
120
124
  registerReactionSurface("slack");
125
+ // SLACK'S AGENT SESSION STATE (OPE-2519): `processing` while a turn runs (Slack then shows its Stop
126
+ // button), and `active` or `suspended` at the park. Core's turn-anchor hook drives it; the setter
127
+ // names the person's DM session from the wake's auth (channels/slack-agent-session.ts).
128
+ registerSurfaceSessionState("slack", slackSurfaceSessionSetter(), slackSurfaceSessionPin);
121
129
  // The bot's own Slack display name (OPE-587) — the arm the instruction assembler renders as a
122
130
  // HANDLE line on a Slack-pinned session ("your mention/handle here appears as X"), never as
123
131
  // identity since OPE-610 settled the naming model. `botDisplayName` memoises one auth.test +
@@ -173,6 +181,11 @@ export function registerSlackProvider(): void {
173
181
  // The deployment-status surface's slack arm (OPE-2230) — HERE and not in ops.ts, because it
174
182
  // reads the operational store and ops.ts is the light-door half the standalone MCP server loads.
175
183
  registerSurfaceStatusReporter("slack", () => slackSurfaceStatus());
184
+ // The telemetry heartbeat's credential-presence probe (OPE-2241). HERE and not in ops.ts for the same
185
+ // reason: it reads the encrypted credential store, where `/setup` puts the bot token, and the light
186
+ // door cannot reach the store. The heartbeat runs only in the agent runtime, so the standalone ops
187
+ // MCP server loses nothing.
188
+ registerSurfaceCredentialProbe("slack", () => slackCredentialsConfigured());
176
189
  // Webhook-verifier plane (OPE-164, populated for slack by OPE-197): Slack's `v0=` HMAC scheme, so
177
190
  // a GENERIC hook can declare `source: "slack"` and be verified the way Slack signs. Changes no
178
191
  // existing route — `/eve/v1/slack` and `/eve/v1/slack/commands` keep their own inline gate over
@@ -249,6 +249,23 @@ export async function slackBotToken(deps: SlackCredentialDeps = {}): Promise<str
249
249
  return (await resolveSlackSecret(SLACK_BOT_TOKEN_ENV, fromEnv, SLACK_BOT_TOKEN_REF, deps))?.value;
250
250
  }
251
251
 
252
+ /**
253
+ * Does this deployment hold a Slack bot token in EITHER home? The telemetry heartbeat's
254
+ * credential-presence probe (OPE-2241). Same order as {@link slackBotToken}: env first, then the store.
255
+ *
256
+ * 🔴 A SET ENV VAR ANSWERS WITHOUT THE STORE. `slackBotToken` reads the store once per process even
257
+ * when the env var is set, for the env-shadows-store notice. On the heartbeat path that read would cost
258
+ * a process that does no Slack work a store round trip, and a slow store would lose the census's
259
+ * two-second race: an env-configured deployment, which reported `slack` before OPE-2241, would then
260
+ * report it absent. So the env home is checked here first, and only an empty env var reads the store,
261
+ * through the same memo as every outbound call.
262
+ */
263
+ export async function slackCredentialsConfigured(deps: SlackCredentialDeps = {}): Promise<boolean> {
264
+ const env = deps.env ?? process.env;
265
+ if ((env[SLACK_BOT_TOKEN_ENV] ?? "").trim().length > 0) return true;
266
+ return (await slackBotToken(deps)) !== undefined;
267
+ }
268
+
252
269
  /**
253
270
  * Is `name`'s env var set, for the ONE caller that needs to ask without resolving — the `/setup`
254
271
  * page's "this env var will shadow what you are about to store" notice.
@@ -316,9 +316,12 @@ function doneScreen(state: SlackInstallState): Response {
316
316
  `<pre style="${CODE_BLOCK_STYLE}">${escapeHtml(surfaceLine)}</pre>` +
317
317
  `<p><strong>2.</strong> In <code>agent/memory/config/domains/org.ts</code>, replace the <code>admins</code> line:</p>` +
318
318
  `<pre style="${CODE_BLOCK_STYLE}">${escapeHtml(adminLine)}</pre>` +
319
- `<p><strong>Then DM the bot in Slack.</strong> Ask it to make those two edits and it will open a ` +
320
- `pull request against your config repo — the agent configuring itself. Or make them by hand and ` +
321
- `push; either way the deploy that lands them is the last step.</p>` +
319
+ // OPE-2492 — this used to say "DM the bot and it will open a pull request". No config-change card
320
+ // writes the trust vouch or the admin roster, and on a fresh install no card can open a pull
321
+ // request at all (no config repo, admin channel or GitHub app yet).
322
+ `<p><strong>Then make the two edits by hand and push.</strong> The deploy that lands them is the ` +
323
+ `last step. The bot does not change its own admins from chat. To see what it can change from ` +
324
+ `chat, ask it.</p>` +
322
325
  `<p>This page is now closed. An administrator can reopen it with the <code>reopen_slack_setup</code> ` +
323
326
  `control call.</p>`,
324
327
  );
@@ -57,6 +57,8 @@ export const SLACK_SURFACE_PARITY: SurfaceParityDeclaration = {
57
57
  // the one "This should not have run" button, and `slack-front.ts` routes that tap back through
58
58
  // core's shared `contradict` decision.
59
59
  "judge-lift-notice": "supported",
60
+ // OPE-2513: `routeSupervisorEvent` asks core on every seated channel wake (slack-events.ts).
61
+ "out-of-office-cover": "supported",
60
62
 
61
63
  // --- wake legs and conversation shapes -------------------------------------------------------
62
64
  "addressed-leg": "supported",
@@ -1 +1 @@
1
- {"version":3,"file":"slack-attachment-fetch.d.ts","sourceRoot":"","sources":["../../../agent/access/slack-attachment-fetch.ts"],"names":[],"mappings":"AAmCA,OAAO,EAIL,KAAK,eAAe,EAGrB,MAAM,4CAA4C,CAAC;AAuBpD;kFACkF;AAClF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2F/G"}
1
+ {"version":3,"file":"slack-attachment-fetch.d.ts","sourceRoot":"","sources":["../../../agent/access/slack-attachment-fetch.ts"],"names":[],"mappings":"AAmCA,OAAO,EAIL,KAAK,eAAe,EAGrB,MAAM,4CAA4C,CAAC;AAwBpD;kFACkF;AAClF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sFAAsF;IACtF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,sBAAsB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA2F/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"slack-attachment-fetch.js","sourceRoot":"","sources":["../../../agent/access/slack-attachment-fetch.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,0EAA0E;AAC1E,EAAE;AACF,+FAA+F;AAC/F,iGAAiG;AACjG,8FAA8F;AAC9F,kGAAkG;AAClG,+FAA+F;AAC/F,yDAAyD;AACzD,EAAE;AACF,8FAA8F;AAC9F,iFAAiF;AACjF,4FAA4F;AAC5F,kGAAkG;AAClG,mGAAmG;AACnG,qFAAqF;AACrF,EAAE;AACF,iGAAiG;AACjG,iGAAiG;AACjG,kGAAkG;AAClG,EAAE;AACF,8EAA8E;AAC9E,gGAAgG;AAChG,gGAAgG;AAChG,oCAAoC;AACpC,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,iGAAiG;AACjG,qGAAqG;AACrG,iGAAiG;AACjG,oGAAoG;AACpG,2FAA2F;AAC3F,8FAA8F;AAE9F,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,GAIpB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,mGAAmG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AAM,EAAE,CAAC,CAAC,CAAC;IAClG,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"slack-attachment-fetch.js","sourceRoot":"","sources":["../../../agent/access/slack-attachment-fetch.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,0EAA0E;AAC1E,EAAE;AACF,+FAA+F;AAC/F,iGAAiG;AACjG,8FAA8F;AAC9F,kGAAkG;AAClG,+FAA+F;AAC/F,yDAAyD;AACzD,EAAE;AACF,8FAA8F;AAC9F,iFAAiF;AACjF,4FAA4F;AAC5F,kGAAkG;AAClG,mGAAmG;AACnG,qFAAqF;AACrF,EAAE;AACF,iGAAiG;AACjG,iGAAiG;AACjG,kGAAkG;AAClG,EAAE;AACF,8EAA8E;AAC9E,gGAAgG;AAChG,gGAAgG;AAChG,oCAAoC;AACpC,EAAE;AACF,iGAAiG;AACjG,oGAAoG;AACpG,iGAAiG;AACjG,qGAAqG;AACrG,iGAAiG;AACjG,oGAAoG;AACpG,2FAA2F;AAC3F,8FAA8F;AAE9F,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,mBAAmB,GAIpB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,mGAAmG;AACnG,gGAAgG;AAChG,kGAAkG;AAClG,iFAAiF;AACjF,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAE9C,iFAAiF;AACjF,MAAM,eAAe,GAAG,KAAK,CAAC;AAE9B,+FAA+F;AAC/F,kGAAkG;AAClG,iGAAiG;AACjG,8DAA8D;AAC9D,MAAM,gBAAgB,GAAwB,IAAI,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;AAE3E,mGAAmG;AACnG,SAAS,eAAe,CAAC,QAAgB;IACvC,OAAO,gBAAgB,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AACtD,CAAC;AAUD;;;;GAIG;AACH,MAAM,CAAC,KAA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AAE1C,oGAAoG;AACpG,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;0GAC0G;AAC1G,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKnE;AAED;;kFAEkF;AAClF,MAAM,WAAW,uBAAuB;IACtC;;yBAEqB;IACrB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;0CAEsC;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;8CAC0C;IAC1C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7F;AAED,8FAA8F;AAC9F,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAU/C;;6DAE6D;AAC7D,eAAO,MAAM,oCAAoC,uBAAuB,CAAC;AAEzE;iGACiG;AACjG,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,uBAA4B,GAAG,MAAM,CAM/E;AAQD;+DAC+D;AAC/D,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,uBAA4B,GAAG,MAAM,CAwNnF;AAED,8CAA8C;AAC9C,eAAO,MAAM,qBAAqB,+BAA+B,CAAC;AAElE,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,EAAE,SAAS,MAAM,EAQrD,CAAC;AAEF;;8BAE8B;AAC9B,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAKvD,CAAC"}
@@ -106,7 +106,7 @@ export function slackAppManifestTemplate(opts = {}) {
106
106
  description: `${appName} control-plane commands (stop, status, budget) — no model turn.`,
107
107
  // Every subcommand `parseOeCommandTokens` accepts (packages/core/agent/commands/core.ts).
108
108
  // scripts/slack-app-manifest-test.ts fails if one is missing here.
109
- usage_hint: "stop | status | budget [raise <usd> | clear] | rate <n> | optout [on | off] | watch [more | less | none] | help",
109
+ usage_hint: "stop | status | budget [raise <usd> | clear] | rate <n> | optout [on | off] | watch [more | less | none] | cover [on | off] | suggest [on | off] | help",
110
110
  should_escape: false,
111
111
  },
112
112
  ],
@@ -199,8 +199,21 @@ export function slackAppManifestTemplate(opts = {}) {
199
199
  // knows. Without it the canvas refresh fails with `missing_scope`, logged and audited
200
200
  // per channel, and memory itself is unaffected.
201
201
  "canvases:write",
202
+ // canvases.sections.lookup — find a memory canvas made before the `memory_canvas` row
203
+ // existed, by the marker line it carries (OPE-2587, core channels/slack-canvas-list.ts
204
+ // `memoryCanvasAmong`). Without it such a canvas held only as a channel tab is not found:
205
+ // its refresh and take-down record `failed` and `clear-failed`, and nothing is overwritten.
206
+ "canvases:read",
207
+ // slackLists.items.list / .create / .update — the agent's own List writes (OPE-2521,
208
+ // core tools/update_list.ts): it reads a List's rows to match one by name, then adds or
209
+ // changes rows on a person's approval. `canvases:write` above also covers the agent's own
210
+ // canvas writes (canvases.create, canvases.edit; core tools/write_canvas.ts).
211
+ "lists:read",
212
+ "lists:write",
202
213
  // The side panel (OPE-2457): Slack requires it for `app_context_changed`, the event whose
203
- // subscription makes Slack attach the viewed room to each side-panel `message.im`.
214
+ // subscription makes Slack attach the viewed room to each side-panel `message.im`. It also
215
+ // covers `assistant.threads.setStatus`, the status line a turn shows while it works: the
216
+ // mention door's, and the DM seat's (OPE-2629, channels/slack-agent-session.ts).
204
217
  "assistant:write",
205
218
  // Slack requires this bot scope on an app whose people connect to Slack's MCP server
206
219
  // (OPE-2421). Declared only when the app declares "search Slack as you".
@@ -227,6 +240,8 @@ export function slackAppManifestTemplate(opts = {}) {
227
240
  // channel_shared → channels:read, groups:read (re-run the memory canvas gate, OPE-2451)
228
241
  // user_change → users:read (automatic offboarding on a deactivated member, OPE-2423)
229
242
  // app_context_changed → assistant:write (the side panel's viewed room, OPE-2457)
243
+ // agent_session_stopped → chat:write (Slack's native Stop button on an agent session,
244
+ // OPE-2519; Slack shows the button only to an app subscribed to it)
230
245
  // scripts/slack-app-manifest-test.ts derives the handled set from the code and fails if
231
246
  // this list drops one (OPE-2223).
232
247
  bot_events: [
@@ -242,6 +257,7 @@ export function slackAppManifestTemplate(opts = {}) {
242
257
  "channel_shared",
243
258
  "user_change",
244
259
  "app_context_changed",
260
+ "agent_session_stopped",
245
261
  ],
246
262
  },
247
263
  // The INTERACTIVITY Request URL — the SAME public route Event Subscriptions uses. Every
@@ -1 +1 @@
1
- {"version":3,"file":"app-manifest.js","sourceRoot":"","sources":["../../agent/app-manifest.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,gFAAgF;AAChF,gGAAgG;AAChG,kGAAkG;AAClG,qGAAqG;AACrG,4CAA4C;AAC5C,EAAE;AACF,qGAAqG;AACrG,gGAAgG;AAChG,uGAAuG;AACvG,oGAAoG;AAEpG,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9E;;mEAEmE;AACnE,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;AAE/D;yFACyF;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAExD,iGAAiG;AACjG,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAExC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,oGAAoG;AACpG,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAErC;0GAC0G;AAC1G,MAAM,UAAU,mBAAmB,CAAC,GAAW;IAC7C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACxB,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,uBAAuB,CAAC;IAChD,IAAI,IAAI,CAAC,MAAM,GAAG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B;oBAClB,iBAAiB;oBACjB,gBAAgB;oBAChB,aAAa;oBACb,qBAAqB;iBACtB;aACF;YACD,wFAAwF;YACxF,2FAA2F;YAC3F,oFAAoF;YACpF,yFAAyF;YACzF,+DAA+D;YAC/D,aAAa,EAAE;gBACb,UAAU,EAAE,IAAI;gBAChB,WAAW,EAAE,WAAW,6BAA6B,eAAe;aACrE;YACD,kBAAkB,EAAE,KAAK;YACzB,mBAAmB,EAAE,KAAK;YAC1B,sBAAsB,EAAE,KAAK;SAC9B;KACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AACJ,CAAC;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAElE,kFAAkF;AAClF,MAAM,CAAC,MAAM,wBAAwB,GAAsB;IACzD,wFAAwF;IACxF,wCAAwC;IACxC,gEAAgE;IAChE,gBAAgB;IAChB,2DAA2D;IAC3D,4TAA4T;IAC5T,oSAAoS;CACrS,CAAC;AAEF;;8BAE8B;AAC9B,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IAC3D,uEAAuE;IACvE,6EAA6E;IAC7E,sJAAsJ;IACtJ,4HAA4H;CAC7H,CAAC"}
1
+ {"version":3,"file":"app-manifest.js","sourceRoot":"","sources":["../../agent/app-manifest.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,EAAE;AACF,gFAAgF;AAChF,gGAAgG;AAChG,kGAAkG;AAClG,qGAAqG;AACrG,4CAA4C;AAC5C,EAAE;AACF,qGAAqG;AACrG,gGAAgG;AAChG,uGAAuG;AACvG,oGAAoG;AAEpG,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9E;;mEAEmE;AACnE,MAAM,CAAC,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;AAE/D;yFACyF;AACzF,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AAExD,iGAAiG;AACjG,MAAM,0BAA0B,GAAG,I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C,MAAM,0BAA0B,GAAsB;IAC3D,uEAAuE;IACvE,6EAA6E;IAC7E,sJAAsJ;IACtJ,4HAA4H;CAC7H,CAAC"}
@@ -0,0 +1,85 @@
1
+ import { cancelAnchoredTurn, type AttachSessionForCancel, type CancelResult, type SurfaceSessionPinner, type SurfaceSessionSetter } from "@open-everywhere/core/agent/adapter-api.js";
2
+ import { type SlackEventEnvelope } from "./slack-events.js";
3
+ /** Slack's event for a press of the session's Stop button. */
4
+ export declare const AGENT_SESSION_STOPPED_EVENT = "agent_session_stopped";
5
+ /** The longest title OE sets. Slack accepts 200 characters; a session list shows far fewer. */
6
+ export declare const SLACK_SESSION_TITLE_MAX = 60;
7
+ /** The session states OE sets. */
8
+ export type SlackSessionStatus = "processing" | "active" | "suspended";
9
+ /** The form-call seam: `slackForm` in production, a recorder in the tests. */
10
+ export type SlackFormCall = (method: string, body: string) => Promise<Record<string, unknown> | undefined>;
11
+ /**
12
+ * The session title for a conversation that opens with `text`, or undefined when nothing readable is
13
+ * left. Pure. It keeps the first non-empty line, renders a link as its label, a channel as `#name`, and
14
+ * drops a member or group mention (no raw id reaches the title). It strips `*`, `~` and backticks, and
15
+ * keeps `_`, so an identifier such as `oe_config` stays intact. A long line is cut at a word and ends
16
+ * with `…`.
17
+ */
18
+ export declare function slackSessionTitle(text: string | undefined): string | undefined;
19
+ /** One `agents.sessions.setStatus` call. */
20
+ export interface SlackSessionStatusCall {
21
+ readonly channelId: string;
22
+ /** The session's thread root. */
23
+ readonly threadTs: string;
24
+ readonly status: SlackSessionStatus;
25
+ /** Applied only when this call creates the session. */
26
+ readonly title?: string;
27
+ }
28
+ /** The form body of {@link SlackSessionStatusCall}. Pure. */
29
+ export declare function slackSessionStatusForm(call: SlackSessionStatusCall): string;
30
+ /** Set a session's status (and, on creation, its title). True when Slack answered `ok`. Never throws. */
31
+ export declare function setSlackSessionStatus(call: SlackSessionStatusCall, form?: SlackFormCall): Promise<boolean>;
32
+ /**
33
+ * The session a delivery's auth attributes name, or undefined for none. Only a delivery the DM door
34
+ * stamped (`agent_session_ts`) names one: a shortcut, a group DM and every channel carry no stamp, so
35
+ * they never set a session's state, even on a threaded message. Pure.
36
+ */
37
+ export declare function slackAgentSessionOf(attributes: Readonly<Record<string, unknown>>): {
38
+ readonly channelId: string;
39
+ readonly threadTs: string;
40
+ } | undefined;
41
+ /**
42
+ * The Slack pinner (OPE-2536): the session a delivery names, as the setter's own id and the three
43
+ * attributes that name it again. A forwarded job keeps this, so its settlement can set the session
44
+ * `suspended` long after the delivery's auth is gone. Ids only, never text. Pure.
45
+ */
46
+ export declare const slackSurfaceSessionPin: SurfaceSessionPinner;
47
+ /** The status line a DM turn shows while it works — the same words the mention door's `turn.started` shows. */
48
+ export declare const SLACK_DM_WORKING_STATUS = "Working...";
49
+ /** Test-only: forget which sign failures were already logged. */
50
+ export declare function _resetSignWarningsForTest(): void;
51
+ /** The Slack setter core's turn-anchor hook calls (registered in register.ts). */
52
+ export declare function slackSurfaceSessionSetter(form?: SlackFormCall): SurfaceSessionSetter;
53
+ /** One press of the Stop button, as the route reads it. */
54
+ export interface ParsedSessionStop {
55
+ readonly channelId: string;
56
+ /** The session's thread root. */
57
+ readonly threadTs: string;
58
+ /** Who pressed Stop. */
59
+ readonly userId: string;
60
+ /** From the `event_callback` envelope: Slack does not put it in the event. */
61
+ readonly teamId?: string;
62
+ readonly eventTs?: string;
63
+ }
64
+ /** Parse an `agent_session_stopped` envelope, or null for anything else. Pure. */
65
+ export declare function parseAgentSessionStopped(envelope: SlackEventEnvelope): ParsedSessionStop | null;
66
+ /** What the Stop route needs. */
67
+ export interface SessionStopDeps {
68
+ /** eve's I/O-free cancel door, the same one the ✋ arm uses. */
69
+ readonly attachSession: AttachSessionForCancel;
70
+ /** The cancel path. Absent means the live `cancelAnchoredTurn`. */
71
+ readonly cancel?: typeof cancelAnchoredTurn;
72
+ /** The status call. Absent means the live {@link setSlackSessionStatus}. */
73
+ readonly setStatus?: (call: SlackSessionStatusCall) => Promise<boolean>;
74
+ }
75
+ /**
76
+ * Stop the turn a Stop press names, then set the session `active`.
77
+ *
78
+ * The turn is found by the session's thread first (the key the ✋ arm uses for a thread root). In the
79
+ * person's 1:1 DM it falls back to the DM's newest turn, because a top-level DM message keys its turn by
80
+ * the channel alone. In a shared channel it does not fall back: there the newest turn can belong to
81
+ * another thread, and cancelling nothing beats cancelling a guess. The status is set whatever the
82
+ * cancel answers, because a session left `processing` keeps its spinner for an hour. Never throws.
83
+ */
84
+ export declare function routeAgentSessionStop(ev: ParsedSessionStop, deps: SessionStopDeps): Promise<CancelResult>;
85
+ //# sourceMappingURL=slack-agent-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slack-agent-session.d.ts","sourceRoot":"","sources":["../../../agent/channels/slack-agent-session.ts"],"names":[],"mappings":"AAuCA,OAAO,EACL,kBAAkB,EAMlB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5F,8DAA8D;AAC9D,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AAEnE,+FAA+F;AAC/F,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,kCAAkC;AAClC,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,QAAQ,GAAG,WAAW,CAAC;AAYvE,8EAA8E;AAC9E,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;AAS3G;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAsB9E;AAID,4CAA4C;AAC5C,MAAM,WAAW,sBAAsB;IACrC,Q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