@open-everywhere/provider-slack 0.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 (151) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +21 -0
  3. package/README.md +47 -0
  4. package/agent/access/slack-attachment-fetch.ts +168 -0
  5. package/agent/app-manifest.ts +149 -0
  6. package/agent/channels/slack-approval-card.ts +275 -0
  7. package/agent/channels/slack-attachments.ts +195 -0
  8. package/agent/channels/slack-commands.ts +227 -0
  9. package/agent/channels/slack-context.ts +185 -0
  10. package/agent/channels/slack-events.ts +5406 -0
  11. package/agent/channels/slack-front.ts +2349 -0
  12. package/agent/channels/slack-identity.ts +520 -0
  13. package/agent/channels/slack-input-response.ts +162 -0
  14. package/agent/channels/slack-mrkdwn.ts +61 -0
  15. package/agent/channels/slack-origin-codec.ts +62 -0
  16. package/agent/channels/slack-post-arm.ts +314 -0
  17. package/agent/channels/slack-read.ts +248 -0
  18. package/agent/channels/slack-route-hold.ts +107 -0
  19. package/agent/channels/slack-shortcut.ts +336 -0
  20. package/agent/channels/slack-signature.ts +53 -0
  21. package/agent/channels/slack-spend-gate.ts +62 -0
  22. package/agent/channels/slack-tenant-fence.ts +99 -0
  23. package/agent/channels/slack-wake-backscroll.ts +604 -0
  24. package/agent/channels/slack-web-api.ts +178 -0
  25. package/agent/channels/slack-webhook-verifier.ts +116 -0
  26. package/agent/channels/slack.ts +1266 -0
  27. package/agent/contributions.ts +32 -0
  28. package/agent/docs-generated.ts +15 -0
  29. package/agent/ops.ts +50 -0
  30. package/agent/provider-events.ts +91 -0
  31. package/agent/register.ts +144 -0
  32. package/agent/surface-parity.ts +99 -0
  33. package/dist/agent/access/slack-attachment-fetch.d.ts +15 -0
  34. package/dist/agent/access/slack-attachment-fetch.d.ts.map +1 -0
  35. package/dist/agent/access/slack-attachment-fetch.js +151 -0
  36. package/dist/agent/access/slack-attachment-fetch.js.map +1 -0
  37. package/dist/agent/app-manifest.d.ts +15 -0
  38. package/dist/agent/app-manifest.d.ts.map +1 -0
  39. package/dist/agent/app-manifest.js +141 -0
  40. package/dist/agent/app-manifest.js.map +1 -0
  41. package/dist/agent/channels/slack-approval-card.d.ts +71 -0
  42. package/dist/agent/channels/slack-approval-card.d.ts.map +1 -0
  43. package/dist/agent/channels/slack-approval-card.js +232 -0
  44. package/dist/agent/channels/slack-approval-card.js.map +1 -0
  45. package/dist/agent/channels/slack-attachments.d.ts +66 -0
  46. package/dist/agent/channels/slack-attachments.d.ts.map +1 -0
  47. package/dist/agent/channels/slack-attachments.js +174 -0
  48. package/dist/agent/channels/slack-attachments.js.map +1 -0
  49. package/dist/agent/channels/slack-commands.d.ts +27 -0
  50. package/dist/agent/channels/slack-commands.d.ts.map +1 -0
  51. package/dist/agent/channels/slack-commands.js +208 -0
  52. package/dist/agent/channels/slack-commands.js.map +1 -0
  53. package/dist/agent/channels/slack-context.d.ts +26 -0
  54. package/dist/agent/channels/slack-context.d.ts.map +1 -0
  55. package/dist/agent/channels/slack-context.js +178 -0
  56. package/dist/agent/channels/slack-context.js.map +1 -0
  57. package/dist/agent/channels/slack-events.d.ts +1654 -0
  58. package/dist/agent/channels/slack-events.d.ts.map +1 -0
  59. package/dist/agent/channels/slack-events.js +4240 -0
  60. package/dist/agent/channels/slack-events.js.map +1 -0
  61. package/dist/agent/channels/slack-front.d.ts +387 -0
  62. package/dist/agent/channels/slack-front.d.ts.map +1 -0
  63. package/dist/agent/channels/slack-front.js +1958 -0
  64. package/dist/agent/channels/slack-front.js.map +1 -0
  65. package/dist/agent/channels/slack-identity.d.ts +245 -0
  66. package/dist/agent/channels/slack-identity.d.ts.map +1 -0
  67. package/dist/agent/channels/slack-identity.js +405 -0
  68. package/dist/agent/channels/slack-identity.js.map +1 -0
  69. package/dist/agent/channels/slack-input-response.d.ts +26 -0
  70. package/dist/agent/channels/slack-input-response.d.ts.map +1 -0
  71. package/dist/agent/channels/slack-input-response.js +127 -0
  72. package/dist/agent/channels/slack-input-response.js.map +1 -0
  73. package/dist/agent/channels/slack-mrkdwn.d.ts +3 -0
  74. package/dist/agent/channels/slack-mrkdwn.d.ts.map +1 -0
  75. package/dist/agent/channels/slack-mrkdwn.js +53 -0
  76. package/dist/agent/channels/slack-mrkdwn.js.map +1 -0
  77. package/dist/agent/channels/slack-origin-codec.d.ts +7 -0
  78. package/dist/agent/channels/slack-origin-codec.d.ts.map +1 -0
  79. package/dist/agent/channels/slack-origin-codec.js +55 -0
  80. package/dist/agent/channels/slack-origin-codec.js.map +1 -0
  81. package/dist/agent/channels/slack-post-arm.d.ts +54 -0
  82. package/dist/agent/channels/slack-post-arm.d.ts.map +1 -0
  83. package/dist/agent/channels/slack-post-arm.js +268 -0
  84. package/dist/agent/channels/slack-post-arm.js.map +1 -0
  85. package/dist/agent/channels/slack-read.d.ts +84 -0
  86. package/dist/agent/channels/slack-read.d.ts.map +1 -0
  87. package/dist/agent/channels/slack-read.js +205 -0
  88. package/dist/agent/channels/slack-read.js.map +1 -0
  89. package/dist/agent/channels/slack-route-hold.d.ts +34 -0
  90. package/dist/agent/channels/slack-route-hold.d.ts.map +1 -0
  91. package/dist/agent/channels/slack-route-hold.js +97 -0
  92. package/dist/agent/channels/slack-route-hold.js.map +1 -0
  93. package/dist/agent/channels/slack-shortcut.d.ts +162 -0
  94. package/dist/agent/channels/slack-shortcut.d.ts.map +1 -0
  95. package/dist/agent/channels/slack-shortcut.js +262 -0
  96. package/dist/agent/channels/slack-shortcut.js.map +1 -0
  97. package/dist/agent/channels/slack-signature.d.ts +19 -0
  98. package/dist/agent/channels/slack-signature.d.ts.map +1 -0
  99. package/dist/agent/channels/slack-signature.js +50 -0
  100. package/dist/agent/channels/slack-signature.js.map +1 -0
  101. package/dist/agent/channels/slack-spend-gate.d.ts +22 -0
  102. package/dist/agent/channels/slack-spend-gate.d.ts.map +1 -0
  103. package/dist/agent/channels/slack-spend-gate.js +48 -0
  104. package/dist/agent/channels/slack-spend-gate.js.map +1 -0
  105. package/dist/agent/channels/slack-tenant-fence.d.ts +61 -0
  106. package/dist/agent/channels/slack-tenant-fence.d.ts.map +1 -0
  107. package/dist/agent/channels/slack-tenant-fence.js +88 -0
  108. package/dist/agent/channels/slack-tenant-fence.js.map +1 -0
  109. package/dist/agent/channels/slack-wake-backscroll.d.ts +188 -0
  110. package/dist/agent/channels/slack-wake-backscroll.d.ts.map +1 -0
  111. package/dist/agent/channels/slack-wake-backscroll.js +473 -0
  112. package/dist/agent/channels/slack-wake-backscroll.js.map +1 -0
  113. package/dist/agent/channels/slack-web-api.d.ts +46 -0
  114. package/dist/agent/channels/slack-web-api.d.ts.map +1 -0
  115. package/dist/agent/channels/slack-web-api.js +147 -0
  116. package/dist/agent/channels/slack-web-api.js.map +1 -0
  117. package/dist/agent/channels/slack-webhook-verifier.d.ts +5 -0
  118. package/dist/agent/channels/slack-webhook-verifier.d.ts.map +1 -0
  119. package/dist/agent/channels/slack-webhook-verifier.js +112 -0
  120. package/dist/agent/channels/slack-webhook-verifier.js.map +1 -0
  121. package/dist/agent/channels/slack.d.ts +37 -0
  122. package/dist/agent/channels/slack.d.ts.map +1 -0
  123. package/dist/agent/channels/slack.js +1169 -0
  124. package/dist/agent/channels/slack.js.map +1 -0
  125. package/dist/agent/contributions.d.ts +17 -0
  126. package/dist/agent/contributions.d.ts.map +1 -0
  127. package/dist/agent/contributions.js +32 -0
  128. package/dist/agent/contributions.js.map +1 -0
  129. package/dist/agent/docs-generated.d.ts +3 -0
  130. package/dist/agent/docs-generated.d.ts.map +1 -0
  131. package/dist/agent/docs-generated.js +13 -0
  132. package/dist/agent/docs-generated.js.map +1 -0
  133. package/dist/agent/ops.d.ts +3 -0
  134. package/dist/agent/ops.d.ts.map +1 -0
  135. package/dist/agent/ops.js +38 -0
  136. package/dist/agent/ops.js.map +1 -0
  137. package/dist/agent/provider-events.d.ts +3 -0
  138. package/dist/agent/provider-events.d.ts.map +1 -0
  139. package/dist/agent/provider-events.js +84 -0
  140. package/dist/agent/provider-events.js.map +1 -0
  141. package/dist/agent/register.d.ts +5 -0
  142. package/dist/agent/register.d.ts.map +1 -0
  143. package/dist/agent/register.js +118 -0
  144. package/dist/agent/register.js.map +1 -0
  145. package/dist/agent/surface-parity.d.ts +3 -0
  146. package/dist/agent/surface-parity.d.ts.map +1 -0
  147. package/dist/agent/surface-parity.js +95 -0
  148. package/dist/agent/surface-parity.js.map +1 -0
  149. package/package.json +209 -0
  150. package/tsconfig.build.json +22 -0
  151. package/tsconfig.json +15 -0
@@ -0,0 +1,188 @@
1
+ import { WAKE_BACKSCROLL_MAX, type ContextLine, type NormalizedMessage, type BackscrollTrustFor, type SeatAdmissionFn, type SeatCatchUpFetch, type SeatCatchUpRequest, type WakeMessageInput } from "@open-everywhere/core/agent/adapter-api.js";
2
+ export { WAKE_BACKSCROLL_MAX };
3
+ /**
4
+ * The widest THREAD slice this module hands a caller that ADMITS BEFORE IT CAPS (OPE-1744,
5
+ * {@link WakeBackscrollInput.threadAdmissionSlice}). Five times {@link WAKE_BACKSCROLL_MAX}, so the
6
+ * policy can look past a long run of refused replies and still fill the ten-line slot; half the page
7
+ * the thread fetch buys, so the slice stays bounded.
8
+ * 🔴 IT IS A COST BOUND, AND THE COST IS THE CALLER'S PER-AUTHOR PROBE. Slack's hydration regrades
9
+ * every returned line before it admits, and that regrade runs one TTL-cached `users.info` per
10
+ * DISTINCT vouchable author. Handing back the whole 100-reply page would put that fan-out on a busy
11
+ * thread; the probe fails OPEN, so an exhausted burst demotes nobody and a guest keeps the tier a
12
+ * confirmed-internal channel gives. The slice is bounded here to keep that burst small.
13
+ */
14
+ export declare const THREAD_ADMISSION_MAX: number;
15
+ /** The Slack bot's resolved identity — used to label the agent's own prior posts as `agent`. */
16
+ export interface WakeBotIdentity {
17
+ readonly userId?: string;
18
+ readonly botId?: string;
19
+ }
20
+ /** A Slack Web-API caller: POSTs `method` with url-encoded `params`, returns parsed JSON or
21
+ * undefined on any failure (fail-soft). Injected so the fetcher is unit-testable offline. */
22
+ export type SlackRequester = (method: string, params: Record<string, string>) => Promise<Record<string, unknown> | undefined>;
23
+ /** The triggering event, narrowed to what the backscroll needs. */
24
+ export interface WakeBackscrollInput {
25
+ readonly channelId: string;
26
+ /** The triggering message's ts. */
27
+ readonly ts: string;
28
+ /** Thread root ts — present ⇒ in-thread wake (conversations.replies); absent ⇒ top-level. */
29
+ readonly threadTs?: string;
30
+ /**
31
+ * THREAD LEG ONLY (OPE-1744): hand back the ADMISSION slice — up to {@link THREAD_ADMISSION_MAX}
32
+ * replies rather than the render cap's {@link WAKE_BACKSCROLL_MAX} — so the caller filters first
33
+ * and caps after. That is the order channels/seat-admission.ts {@link admitToSeat} states ("filter,
34
+ * then let the caller cap — never the reverse, or a refused bot's bytes would eat a person's
35
+ * message out of the cap"). A caller that applies an admission policy asks for it and caps with
36
+ * `capLines` once the policy has run; every other caller leaves it absent and gets the render-cap
37
+ * slice it always got.
38
+ * 🔴 IT MOVES THE CAP, NEVER THE POLICY. The admission stays ABOVE this seam, in the caller, so a
39
+ * wiring that supplies its own `backscroll` still cannot bypass it — a cap is a budget, not a
40
+ * security control, which is why this is the half that may cross.
41
+ * The CHANNEL leg ignores it: its raw fetch asks Slack for {@link WAKE_BACKSCROLL_MAX} messages, so
42
+ * there is no wider slice to hand back and backfilling would mean buying a bigger page.
43
+ */
44
+ readonly threadAdmissionSlice?: boolean;
45
+ }
46
+ /** Injected seams so the fetcher runs without a network (tests) but defaults to live Slack. */
47
+ export interface WakeBackscrollDeps {
48
+ readonly request: SlackRequester;
49
+ readonly identity: () => Promise<WakeBotIdentity>;
50
+ }
51
+ /** Reset the cached wake bot identity (tests only). */
52
+ export declare function _resetWakeBotIdentity(): void;
53
+ /** The RAW-lines result of a name-drop backscroll fetch (W3): the oldest-first
54
+ * {@link ContextLine}s — capped at {@link WAKE_BACKSCROLL_MAX}, or at the wider
55
+ * {@link THREAD_ADMISSION_MAX} where the caller asked for the thread leg's admission slice
56
+ * ({@link WakeBackscrollInput.threadAdmissionSlice}) and caps itself — plus the renderContext
57
+ * `source` label and the Slack read-more hint. The renderer
58
+ * ({@link renderContext}, called inside renderWake) turns these into the untrusted-wrapped context
59
+ * block — so no pre-rendered string ever flows through the wake plumbing. `null` = nothing to add
60
+ * OR any failure (always non-fatal). */
61
+ export interface WakeBackscrollLines {
62
+ readonly lines: readonly ContextLine[];
63
+ readonly source: string;
64
+ /** Slack HAS read tools, so the hint names them; renderContext appends it OUTSIDE the untrusted
65
+ * block only when the slice actually hit the cap. */
66
+ readonly readMoreHint: string;
67
+ }
68
+ /**
69
+ * Fetch recent conversation history for a name-drop wake as RAW ContextLines + source + hint (W3) —
70
+ * the renderer wraps them (renderContext, inside renderWake). `null` = nothing to add OR any
71
+ * failure (always non-fatal).
72
+ *
73
+ * - IN-THREAD wake (`threadTs`): `conversations.replies`, sliced to "since the agent's last reply"
74
+ * (see {@link sinceLastAgentReply}); the triggering message itself is excluded (the wake message
75
+ * already carries its text). Capped at {@link WAKE_BACKSCROLL_MAX}, or at the wider
76
+ * {@link THREAD_ADMISSION_MAX} when the caller asks for the admission slice
77
+ * ({@link WakeBackscrollInput.threadAdmissionSlice}).
78
+ * - TOP-LEVEL wake (no `threadTs`): `conversations.history` with `latest = ts`, `inclusive: false`
79
+ * → strictly-older messages only, most recent N.
80
+ */
81
+ export declare function fetchWakeBackscrollLines(input: WakeBackscrollInput, deps?: WakeBackscrollDeps): Promise<WakeBackscrollLines | null>;
82
+ /**
83
+ * Fetch recent conversation history for a name-drop wake, rendered as `context` strings
84
+ * (untrusted-wrapped, oldest-first, capped at {@link WAKE_BACKSCROLL_MAX}). Empty array = nothing to
85
+ * add OR any failure. Thin wrapper over {@link fetchWakeBackscrollLines} + the shared renderContext,
86
+ * so its output stays byte-identical to before the W3 refactor (retained for its existing callers
87
+ * and byte-identity tests; the live name-drop path now uses the lines variant directly).
88
+ */
89
+ export declare function fetchWakeBackscroll(input: WakeBackscrollInput, deps?: WakeBackscrollDeps): Promise<string[]>;
90
+ /** Reachback (hours) for the raw Slack window: how far back from the trigger conversations.history
91
+ * is paginated. Generous enough that the SPINE (the most-recent cluster, exempt from the 36h
92
+ * enrichment cap) can still reach across a weekend/overnight gap (~66h Fri-4pm→Mon-10am), yet a
93
+ * hard floor that bounds the fetch. 7d default; overridable for ops/testing. */
94
+ export declare const RAW_FETCH_REACHBACK_HOURS: number;
95
+ /**
96
+ * The VISIBILITY / TRUST GATE (spec §Bounds — the load-bearing SECURITY filter): backscroll must
97
+ * never surface a message it can't ATTRIBUTE. The channel-internal confirmation
98
+ * (confirmChannelInternalWithMeta) fail-closes the restricted-area / at-rest-isolation dimension
99
+ * BEFORE this fetcher is ever called. So the per-message gate here KEEPS:
100
+ * - the bot's OWN prior posts (`agent` → `self`);
101
+ * - identifiable humans (`user` → `human`);
102
+ * - ATTRIBUTABLE foreign bots (`bot` WITH a bot id → `bot`) — INCLUDED as MARKED AWARENESS
103
+ * (clearly bot-flagged, CONTEXT-ONLY, never a wake trigger). Design intent: the supervisor
104
+ * SHOULD see foreign-bot posts, and dropping them breaks CONVERSATIONAL COHERENCE — a human
105
+ * replying to a bot's message would otherwise arrive with the bot message missing, so the agent
106
+ * couldn't tell what the human is responding to.
107
+ * and DROPS ONLY:
108
+ * - unattributable senders (`unknown`, or a `bot` with no id) — no auth'd author ⇒ fail closed.
109
+ * (System-subtype noise is already dropped upstream by linesFromMessages.) Foreign-bot messages are
110
+ * CONTEXT-ONLY on this path: the neutral core never sets `trigger` on backscroll, and the LIVE
111
+ * trigger gate (slack-events.ts shouldSupervisorWake) still drops bot-authored messages as triggers,
112
+ * so a bot post is awareness, never a response obligation. Wired explicitly + unit-tested
113
+ * (slack-wake-backscroll-test.ts) so it can't be forgotten.
114
+ */
115
+ export declare function isBackscrollVisible(line: ContextLine): boolean;
116
+ export interface WakeEnvelopeBackscrollInput {
117
+ readonly channelId: string;
118
+ /** The triggering message's ts — the window's upper (exclusive) bound and the reachback origin. */
119
+ readonly ts: string;
120
+ /** Known thread root for a thread-bound catch-up. Present ⇒ read that thread directly; a root
121
+ * older than `sinceMs` is absent from `conversations.history` but its newer replies are not. */
122
+ readonly threadRoot?: string;
123
+ /** Hours to look back from `ts` for the raw fetch. Defaults to {@link RAW_FETCH_REACHBACK_HOURS}. */
124
+ readonly reachbackHours?: number;
125
+ /**
126
+ * THE CATCH-UP BOUND (OPE-1695 (b)): epoch milliseconds of the seat's own LAST WAKE, so this read
127
+ * returns what the room said since the seat last looked. It only ever NARROWS the window — the
128
+ * reachback floor above still applies — so a seat quiet for a month reads the recent tail, and a
129
+ * seat with no recorded wake reads the bootstrap window exactly as a first wake always did.
130
+ */
131
+ readonly sinceMs?: number;
132
+ }
133
+ /**
134
+ * SLACK FETCH SEAM: fetch a bounded, visibility-GATED, NORMALIZED backscroll window (channel history
135
+ * + in-window thread replies) for a supervisor first wake. This is the platform boundary — the
136
+ * neutral core ({@link fetchedBackscroll}) consumes its output. FAIL-SOFT: any error/failure yields
137
+ * `[]`. Deduped by message id (a thread root appears in both history and its replies[0]).
138
+ */
139
+ export declare function fetchSlackBackscrollWindow(input: WakeEnvelopeBackscrollInput, deps?: WakeBackscrollDeps, failureMode?: "soft" | "throw"): Promise<NormalizedMessage[]>;
140
+ /**
141
+ * SLACK'S REGISTERED CATCH-UP FETCH (OPE-1726) — the one thing this surface contributes to the shared
142
+ * since-last-wake path (core channels/seat-catch-up.ts). It is the SAME window fetch the bootstrap
143
+ * arm takes ({@link fetchSlackBackscrollWindow}), addressed by the neutral request shape: the seat's
144
+ * container, bounded below by its last wake and above by the trigger.
145
+ * 🔴 THE UPPER BOUND IS RE-EXPRESSED AS A SLACK `ts`, because `conversations.history` takes `latest`
146
+ * in Slack's own seconds-with-fraction form and not epoch ms. `excludeId` IS that ts on this surface
147
+ * (a Slack ts is both a time and an id), so it is preferred over the derived string — a derived one
148
+ * can lose the trailing digits Slack's ordering depends on. With neither, the read falls back to
149
+ * `now`, which is the honest upper bound for a catch-up with no stated trigger.
150
+ * A transport/read failure propagates to core's shared boundary, which keeps the wake alive and
151
+ * records `failed` instead of reporting a quiet channel (OPE-1842). Bootstrap callers keep the
152
+ * window fetch's default fail-soft mode.
153
+ */
154
+ export declare function fetchSlackSeatCatchUp(req: SeatCatchUpRequest, deps?: WakeBackscrollDeps): Promise<readonly NormalizedMessage[]>;
155
+ /**
156
+ * A Slack `ts` is a second with a six-digit fraction, so it carries MILLISECOND grain (OPE-1847,
157
+ * `core/agent/channels/seat-catch-up.ts` {@link SeatCatchUpDeclaration.timestampPrecisionMs}).
158
+ * 🔴 ONE MILLISECOND IS NOT ZERO WIDENING. The road widens the LOWER bound by nothing here and the
159
+ * UPPER bound by exactly one millisecond, so a message stamped at the trigger's own instant is
160
+ * INSIDE the window and `excludeId` is the only thing that removes the trigger. That holds on this
161
+ * surface twice over: `conversations.history` is called with `inclusive: "false"`, so the trigger
162
+ * never reaches the fetch, and a message that did would carry its `ts` as its id — the same value
163
+ * the wake path passes as `excludeId`.
164
+ * 🔴 THE DECLARATION CANNOT EXPRESS THIS SURFACE'S SUB-MILLISECOND `ts`. The unit is a whole number
165
+ * of milliseconds, so the road's floor rounds Slack's fraction away. It costs nothing today: the
166
+ * bound is a bound, not an ordering, and the fetch orders by `ts` itself.
167
+ * 🔴 IT IS STILL DECLARED, and the parity test requires it. The declaration is what makes "this
168
+ * surface needs the finest unit" a CHECKED claim rather than an omission, and an omission is
169
+ * indistinguishable from the GitHub and Notion defect this whole mechanism exists to close.
170
+ */
171
+ export declare const SLACK_TIMESTAMP_PRECISION_MS = 1;
172
+ /** The registered form — the transport seam is fixed to the live one, so a caller cannot inject past
173
+ * the bot token. Tests drive {@link fetchSlackSeatCatchUp} with a canned requester instead. */
174
+ export declare const slackSeatCatchUpFetch: SeatCatchUpFetch;
175
+ /**
176
+ * Fetch + cluster a standing seat's channel backscroll into session-tagged
177
+ * {@link WakeMessageInput} entries (oldest-first, no `trigger`; per-message trust via
178
+ * `trustFor` when the caller supplies the resolver, the fail-closed per-sender default otherwise).
179
+ * Thin orchestration over the Slack fetch seam ({@link fetchSlackBackscrollWindow}) + the neutral
180
+ * capped core ({@link fetchedBackscroll}), which applies the domain's `admit` policy. Serves the
181
+ * BOOTSTRAP window ONLY — a fresh generation's first wake, the one read with no cross-surface twin.
182
+ * Since OPE-1726 the since-last-wake CATCH-UP is not this function's job: it runs through
183
+ * {@link fetchSlackSeatCatchUp}, registered into the shared core path (core channels/seat-catch-up.ts
184
+ * `seatCatchUp`), which owns the bounds, the admission policy and the cap for every surface. This
185
+ * function still ACCEPTS `input.sinceMs`, but no caller sets it. FAIL-SOFT ABSOLUTELY.
186
+ */
187
+ export declare function fetchWakeEnvelopeBackscroll(input: WakeEnvelopeBackscrollInput, deps?: WakeBackscrollDeps, trustFor?: BackscrollTrustFor, admit?: SeatAdmissionFn): Promise<WakeMessageInput[]>;
188
+ //# sourceMappingURL=slack-wake-backscroll.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slack-wake-backscroll.d.ts","sourceRoot":"","sources":["../../../agent/channels/slack-wake-backscroll.ts"],"names":[],"mappings":"AA4BA,OAAO,EAGL,mBAAmB,EAGnB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,4CAA4C,CAAC;AAIpD,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAE/B;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,QAA0B,CAAC;AAE5D,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;8FAC8F;AAC9F,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KA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