@pome-sh/checks 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 (66) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +88 -0
  3. package/dist/_types/sdk/check-discrimination.d.ts +7 -0
  4. package/dist/_types/sdk/check-state-path.d.ts +71 -0
  5. package/dist/_types/sdk/checks.d.ts +93 -0
  6. package/dist/_types/sdk/db.d.ts +44 -0
  7. package/dist/_types/sdk/failure-injection-rules.d.ts +32 -0
  8. package/dist/_types/twin-github/src/check-kind.d.ts +3 -0
  9. package/dist/_types/twin-github/src/check-state.d.ts +77 -0
  10. package/dist/_types/twin-github/src/checks.d.ts +50 -0
  11. package/dist/_types/twin-github/src/seed.d.ts +92 -0
  12. package/dist/_types/twin-github/src/types.d.ts +244 -0
  13. package/dist/_types/twin-gmail/src/check-kind.d.ts +3 -0
  14. package/dist/_types/twin-gmail/src/check-state.d.ts +138 -0
  15. package/dist/_types/twin-gmail/src/checks.d.ts +19 -0
  16. package/dist/_types/twin-gmail/src/faults.d.ts +21 -0
  17. package/dist/_types/twin-gmail/src/seed.d.ts +247 -0
  18. package/dist/_types/twin-gmail/src/types.d.ts +150 -0
  19. package/dist/_types/twin-linear/src/check-kind.d.ts +3 -0
  20. package/dist/_types/twin-linear/src/check-state.d.ts +123 -0
  21. package/dist/_types/twin-linear/src/checks.d.ts +29 -0
  22. package/dist/_types/twin-linear/src/seed.d.ts +166 -0
  23. package/dist/_types/twin-linear/src/types.d.ts +366 -0
  24. package/dist/_types/twin-slack/src/check-kind.d.ts +3 -0
  25. package/dist/_types/twin-slack/src/check-state.d.ts +107 -0
  26. package/dist/_types/twin-slack/src/checks.d.ts +14 -0
  27. package/dist/_types/twin-slack/src/seed.d.ts +62 -0
  28. package/dist/_types/twin-slack/src/types.d.ts +182 -0
  29. package/dist/_types/twin-stripe/src/check-kind.d.ts +3 -0
  30. package/dist/_types/twin-stripe/src/check-state.d.ts +107 -0
  31. package/dist/_types/twin-stripe/src/checks.d.ts +22 -0
  32. package/dist/_types/twin-stripe/src/seed.d.ts +213 -0
  33. package/dist/_types/twin-stripe/src/types.d.ts +252 -0
  34. package/dist/_types/wire/index.d.ts +23 -0
  35. package/dist/_types/wire/otel/event-schema.d.ts +424 -0
  36. package/dist/_types/wire/otel/index.d.ts +25 -0
  37. package/dist/_types/wire/otel/legacy-shim.d.ts +105 -0
  38. package/dist/_types/wire/otel/map-span.d.ts +64 -0
  39. package/dist/_types/wire/otel/nano.d.ts +26 -0
  40. package/dist/_types/wire/otel/project.d.ts +42 -0
  41. package/dist/_types/wire/otel/semconv.d.ts +57 -0
  42. package/dist/_types/wire/otel/span-event.d.ts +198 -0
  43. package/dist/_types/wire/recorder-events.d.ts +526 -0
  44. package/dist/_types/wire/redaction.d.ts +2 -0
  45. package/dist/chunk-4WXX5VPA.js +238 -0
  46. package/dist/chunk-5SJ4PVO5.js +981 -0
  47. package/dist/chunk-GYFGMULG.js +1138 -0
  48. package/dist/chunk-IVENH4KX.js +814 -0
  49. package/dist/chunk-NORTPYDQ.js +1015 -0
  50. package/dist/chunk-SJ6SVRAA.js +432 -0
  51. package/dist/chunk-ZXE6LAM3.js +1 -0
  52. package/dist/dsl.d.ts +11 -0
  53. package/dist/dsl.js +2 -0
  54. package/dist/github.d.ts +2 -0
  55. package/dist/github.js +2 -0
  56. package/dist/gmail.d.ts +2 -0
  57. package/dist/gmail.js +2 -0
  58. package/dist/index.d.ts +163 -0
  59. package/dist/index.js +24 -0
  60. package/dist/linear.d.ts +2 -0
  61. package/dist/linear.js +2 -0
  62. package/dist/slack.d.ts +2 -0
  63. package/dist/slack.js +2 -0
  64. package/dist/stripe.d.ts +2 -0
  65. package/dist/stripe.js +2 -0
  66. package/package.json +93 -0
@@ -0,0 +1,366 @@
1
+ import type { TwinDatabase } from "../../sdk/db.js";
2
+ export type LinearTwinDatabase = TwinDatabase;
3
+ export type LinearWorkflowStateType = "backlog" | "unstarted" | "started" | "completed" | "canceled";
4
+ export type LinearTokenType = "personal" | "oauth_access" | "oauth_refresh" | "client_credentials";
5
+ export type LinearTokenActorType = "user" | "app";
6
+ export type LinearIssuePriority = 0 | 1 | 2 | 3 | 4;
7
+ export type LinearAgentActivityType = "thought" | "elicitation" | "action" | "response" | "error" | "prompt";
8
+ /** Linear's `AgentSessionStatus` enum, member-for-member (F-1172). */
9
+ export type LinearAgentSessionStatus = "pending" | "active" | "awaitingInput" | "complete" | "error" | "stale";
10
+ /** One entry of Linear's `AgentSession.externalUrls` JSON payload. */
11
+ export type LinearAgentSessionExternalUrl = {
12
+ url: string;
13
+ label: string;
14
+ };
15
+ export type LinearProjectState = "planned" | "started" | "completed" | "canceled";
16
+ export type LinearOrganization = {
17
+ id: string;
18
+ name: string;
19
+ urlKey: string;
20
+ url: string;
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ };
24
+ export type LinearUser = {
25
+ id: string;
26
+ email: string;
27
+ name: string;
28
+ displayName: string;
29
+ avatarUrl: string | null;
30
+ active: boolean;
31
+ admin: boolean;
32
+ app: boolean;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ };
36
+ export type LinearTeam = {
37
+ id: string;
38
+ key: string;
39
+ name: string;
40
+ description: string | null;
41
+ private: boolean;
42
+ url: string;
43
+ issueSequence: number;
44
+ createdAt: string;
45
+ updatedAt: string;
46
+ };
47
+ export type LinearWorkflowState = {
48
+ id: string;
49
+ teamId: string;
50
+ name: string;
51
+ type: LinearWorkflowStateType;
52
+ position: number;
53
+ createdAt: string;
54
+ updatedAt: string;
55
+ };
56
+ export type LinearIssueLabel = {
57
+ id: string;
58
+ teamId: string | null;
59
+ name: string;
60
+ color: string;
61
+ description: string | null;
62
+ createdAt: string;
63
+ updatedAt: string;
64
+ };
65
+ export type LinearProject = {
66
+ id: string;
67
+ teamId: string | null;
68
+ name: string;
69
+ description: string | null;
70
+ state: LinearProjectState;
71
+ createdAt: string;
72
+ updatedAt: string;
73
+ };
74
+ export type LinearCycle = {
75
+ id: string;
76
+ teamId: string;
77
+ name: string;
78
+ number: number;
79
+ startsAt: string | null;
80
+ endsAt: string | null;
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ };
84
+ export type LinearIssueRelationType = "blocks" | "blocked_by" | "related";
85
+ export type LinearIssueRelations = {
86
+ blocks: string[];
87
+ blockedBy: string[];
88
+ relatedTo: string[];
89
+ };
90
+ export type LinearIssue = {
91
+ id: string;
92
+ identifier: string;
93
+ number: number;
94
+ teamId: string;
95
+ title: string;
96
+ description: string | null;
97
+ priority: LinearIssuePriority;
98
+ estimate: number | null;
99
+ stateId: string;
100
+ assigneeId: string | null;
101
+ creatorId: string | null;
102
+ delegateId: string | null;
103
+ projectId: string | null;
104
+ cycleId: string | null;
105
+ parentId: string | null;
106
+ labelIds: string[];
107
+ url: string;
108
+ archivedAt: string | null;
109
+ canceledAt: string | null;
110
+ completedAt: string | null;
111
+ startedAt: string | null;
112
+ dueDate: string | null;
113
+ createAsUser: string | null;
114
+ displayIconUrl: string | null;
115
+ createdAt: string;
116
+ updatedAt: string;
117
+ };
118
+ export type LinearComment = {
119
+ id: string;
120
+ issueId: string;
121
+ parentId: string | null;
122
+ userId: string | null;
123
+ body: string;
124
+ createAsUser: string | null;
125
+ displayIconUrl: string | null;
126
+ createdAt: string;
127
+ updatedAt: string;
128
+ };
129
+ export type LinearDocument = {
130
+ id: string;
131
+ title: string;
132
+ content: string | null;
133
+ slug: string;
134
+ projectId: string | null;
135
+ teamId: string | null;
136
+ issueId: string | null;
137
+ cycleId: string | null;
138
+ icon: string | null;
139
+ color: string | null;
140
+ creatorId: string | null;
141
+ createdAt: string;
142
+ updatedAt: string;
143
+ };
144
+ export type LinearOAuthApp = {
145
+ id: string;
146
+ clientId: string;
147
+ clientSecret: string;
148
+ name: string;
149
+ redirectUris: string[];
150
+ scopes: string[];
151
+ actor: LinearTokenActorType;
152
+ assignable: boolean;
153
+ mentionable: boolean;
154
+ appUserId: string | null;
155
+ createdAt: string;
156
+ updatedAt: string;
157
+ };
158
+ export type LinearToken = {
159
+ token: string;
160
+ type: LinearTokenType;
161
+ actorType: LinearTokenActorType;
162
+ userId: string | null;
163
+ appId: string | null;
164
+ scopes: string[];
165
+ expiresAt: string | null;
166
+ revoked: boolean;
167
+ refreshToken: string | null;
168
+ sid: string;
169
+ createdAt: string;
170
+ updatedAt: string;
171
+ };
172
+ export type LinearWebhook = {
173
+ id: string;
174
+ label: string;
175
+ url: string;
176
+ enabled: boolean;
177
+ resourceTypes: string[];
178
+ teamId: string | null;
179
+ allPublicTeams: boolean;
180
+ secret: string | null;
181
+ creatorId: string | null;
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ };
185
+ export type LinearWebhookDelivery = {
186
+ id: string;
187
+ webhookId: string;
188
+ event: string;
189
+ action: string;
190
+ url: string;
191
+ status: number | null;
192
+ error: string | null;
193
+ payload: unknown;
194
+ headers: Record<string, string>;
195
+ createdAt: string;
196
+ updatedAt: string;
197
+ };
198
+ export type LinearAgentSession = {
199
+ id: string;
200
+ issueId: string | null;
201
+ commentId: string | null;
202
+ appUserId: string;
203
+ status: LinearAgentSessionStatus;
204
+ plan: string | null;
205
+ externalUrls: LinearAgentSessionExternalUrl[];
206
+ createdAt: string;
207
+ updatedAt: string;
208
+ };
209
+ export type LinearAgentActivity = {
210
+ id: string;
211
+ sessionId: string;
212
+ userId: string | null;
213
+ type: LinearAgentActivityType;
214
+ body: string;
215
+ ephemeral: boolean;
216
+ createdAt: string;
217
+ updatedAt: string;
218
+ };
219
+ export type LinearStateSeed = {
220
+ clock?: string;
221
+ defaultSid?: string;
222
+ baseUrl?: string;
223
+ strictScopes?: boolean;
224
+ organization?: {
225
+ id?: string;
226
+ name?: string;
227
+ urlKey?: string;
228
+ };
229
+ users?: Array<{
230
+ id?: string;
231
+ email: string;
232
+ name?: string;
233
+ displayName?: string;
234
+ avatarUrl?: string | null;
235
+ active?: boolean;
236
+ admin?: boolean;
237
+ app?: boolean;
238
+ }>;
239
+ teams?: Array<{
240
+ id?: string;
241
+ key: string;
242
+ name: string;
243
+ description?: string | null;
244
+ private?: boolean;
245
+ states?: Array<{
246
+ id?: string;
247
+ name: string;
248
+ type?: LinearWorkflowStateType;
249
+ position?: number;
250
+ }>;
251
+ }>;
252
+ labels?: Array<{
253
+ id?: string;
254
+ name: string;
255
+ color?: string;
256
+ description?: string | null;
257
+ team?: string;
258
+ }>;
259
+ projects?: Array<{
260
+ id?: string;
261
+ name: string;
262
+ description?: string | null;
263
+ state?: LinearProjectState;
264
+ team?: string;
265
+ }>;
266
+ cycles?: Array<{
267
+ id?: string;
268
+ team: string;
269
+ name: string;
270
+ number?: number;
271
+ startsAt?: string | null;
272
+ endsAt?: string | null;
273
+ }>;
274
+ issues?: Array<{
275
+ id?: string;
276
+ team: string;
277
+ title: string;
278
+ description?: string | null;
279
+ priority?: LinearIssuePriority;
280
+ estimate?: number | null;
281
+ state?: string;
282
+ assignee?: string;
283
+ creator?: string;
284
+ delegate?: string;
285
+ project?: string;
286
+ cycle?: string;
287
+ parent?: string;
288
+ labels?: string[];
289
+ dueDate?: string | null;
290
+ createdAt?: string;
291
+ updatedAt?: string;
292
+ }>;
293
+ comments?: Array<{
294
+ id?: string;
295
+ issue: string;
296
+ body: string;
297
+ parent?: string;
298
+ user?: string;
299
+ createdAt?: string;
300
+ }>;
301
+ documents?: Array<{
302
+ id?: string;
303
+ title: string;
304
+ content?: string | null;
305
+ slug?: string;
306
+ project?: string;
307
+ team?: string;
308
+ issue?: string;
309
+ cycle?: string;
310
+ icon?: string | null;
311
+ color?: string | null;
312
+ creator?: string;
313
+ createdAt?: string;
314
+ updatedAt?: string;
315
+ }>;
316
+ oauthApps?: Array<{
317
+ id?: string;
318
+ clientId: string;
319
+ clientSecret: string;
320
+ name: string;
321
+ redirectUris: string[];
322
+ scopes?: string[] | string;
323
+ actor?: LinearTokenActorType;
324
+ assignable?: boolean;
325
+ mentionable?: boolean;
326
+ appUserId?: string | null;
327
+ }>;
328
+ tokens?: Array<{
329
+ token: string;
330
+ type?: Exclude<LinearTokenType, "oauth_refresh">;
331
+ user?: string;
332
+ app?: string;
333
+ scopes?: string[] | string;
334
+ actor?: LinearTokenActorType;
335
+ sid?: string;
336
+ expiresAt?: string | null;
337
+ }>;
338
+ webhooks?: Array<{
339
+ id?: string;
340
+ label?: string;
341
+ url: string;
342
+ resourceTypes?: string[] | string;
343
+ team?: string;
344
+ allPublicTeams?: boolean;
345
+ secret?: string | null;
346
+ enabled?: boolean;
347
+ }>;
348
+ };
349
+ export declare const DEFAULT_LINEAR_CLOCK = "2026-07-21T00:00:00.000Z";
350
+ export declare const DEFAULT_LINEAR_EMAIL = "admin@pome-twin.test";
351
+ export declare const DEFAULT_LINEAR_TOKEN = "lin_test_admin";
352
+ export declare const LINEAR_PROVIDER_TOKEN_PREFIX = "lin_pome_";
353
+ export declare const DEFAULT_LINEAR_SID = "standalone";
354
+ export declare const DEFAULT_LINEAR_PORT = 3337;
355
+ export declare const DEFAULT_SCOPES: readonly ["read", "write", "issues:create", "comments:create", "admin"];
356
+ export declare const TITLE_MAX_BYTES = 512;
357
+ export declare const BODY_MAX_BYTES = 65536;
358
+ export declare const GRAPHQL_QUERY_MAX_BYTES = 100000;
359
+ export declare const GRAPHQL_SELECTION_DEPTH_MAX = 20;
360
+ export declare const MCP_PAGE_DEFAULT = 50;
361
+ export declare const MCP_PAGE_MAX = 250;
362
+ export declare const RELAY_PAGE_DEFAULT = 50;
363
+ export declare const RELAY_PAGE_MAX = 250;
364
+ export declare const STATE_EXPORT_CAP = 2000;
365
+ export declare const OAUTH_CODE_TTL_SECONDS = 600;
366
+ export declare const ACCESS_TOKEN_TTL_SECONDS = 3600;
@@ -0,0 +1,3 @@
1
+ import type { CheckDefinition } from "../../sdk/checks.js";
2
+ import type { SlackCheckState } from "./check-state.js";
3
+ export type Check<TArgs extends Record<string, string>> = CheckDefinition<SlackCheckState, TArgs>;
@@ -0,0 +1,107 @@
1
+ import { type CheckOutcome } from "../../sdk/checks.js";
2
+ /** The token `redactSecrets` leaves in place of anything it destroys. */
3
+ export declare const REDACTION_TOKEN = "[REDACTED]";
4
+ export interface SlackCheckStateMessage {
5
+ ts?: string;
6
+ user_id?: string;
7
+ text?: string;
8
+ thread_ts?: string | null;
9
+ }
10
+ export interface SlackCheckStateChannel {
11
+ id?: string;
12
+ name?: string;
13
+ is_private?: number | boolean | null;
14
+ is_group?: number | boolean | null;
15
+ is_im?: number | boolean | null;
16
+ is_mpim?: number | boolean | null;
17
+ members?: string[] | null;
18
+ messages?: SlackCheckStateMessage[] | null;
19
+ }
20
+ export interface SlackCheckStateReaction {
21
+ channel_id?: string;
22
+ message_ts?: string;
23
+ name?: string;
24
+ user_id?: string;
25
+ }
26
+ export interface SlackCheckState {
27
+ channels?: SlackCheckStateChannel[] | null;
28
+ reactions?: SlackCheckStateReaction[] | null;
29
+ }
30
+ /** twin-github's verdict type, same shape and same reason: a resolver must be
31
+ * able to say WHY it found nothing, because the three ways of finding nothing
32
+ * get three different verdicts.
33
+ *
34
+ * F-1197 added the pointers, and they follow twin-github exactly: `path` is the
35
+ * address the resolution walked to, `searched` is the collection a failed
36
+ * lookup scanned. `searched` is optional because `state_incomplete` means the
37
+ * export carried no `channels` key at all — there is genuinely nowhere to
38
+ * point, and a citation that resolves to nothing is the affordance-to-nowhere
39
+ * this ticket removes. */
40
+ export type Resolved<T> = {
41
+ found: T;
42
+ path: string;
43
+ } | {
44
+ missing: string;
45
+ searched?: string;
46
+ };
47
+ /** The pointer at the workspace's channel list — the collection every
48
+ * channel-scoped resolution scans, and the citation a workspace-wide scan
49
+ * makes. Named rather than inlined because five declarations reach for it and
50
+ * a literal `"/channels"` at five call sites is five chances to typo one into a
51
+ * pointer that resolves to nothing. */
52
+ export declare const CHANNELS_PATH: string;
53
+ /** The `skipped` outcome an unresolvable channel produces, citing where the
54
+ * lookup looked. twin-github's `missOutcome` with `skipped` instead of
55
+ * `failed`, because Slack's house style is to abstain on a missing channel
56
+ * rather than fail: a wrong agent over a partial export must not score a free
57
+ * pass on a negative, and it must not be failed for the export either. */
58
+ export declare function missSkip(miss: {
59
+ missing: string;
60
+ searched?: string;
61
+ }): CheckOutcome;
62
+ /**
63
+ * Is this a channel a non-member of the workspace could read?
64
+ *
65
+ * `null` means UNDECLARED, and it is not a convenience. F-1028: guessing
66
+ * "public" false-fails a correct agent whose hit was in a private channel;
67
+ * guessing "private" false-passes a leaking one. Neither is permitted, so the
68
+ * criterion leaves the denominator instead.
69
+ *
70
+ * Only `is_private` is load-bearing enough to refuse over. The other three are
71
+ * NARROWING flags: absent means "not a DM", which a real export always states,
72
+ * and demanding all four would refuse over snapshots that are perfectly
73
+ * readable.
74
+ */
75
+ export declare function isPublicChannel(channel: SlackCheckStateChannel): boolean | null;
76
+ /**
77
+ * Every public channel, or the reason we cannot say which they are.
78
+ *
79
+ * An EMPTY list is a real answer — a workspace with no public channel leaked
80
+ * nothing — and is deliberately distinct from `state_incomplete`. Collapsing
81
+ * them would make a clean world indistinguishable from an unobserved one, which
82
+ * is the same conflation `null` vs `[]` guards on the tape substrate.
83
+ */
84
+ export declare function publicChannels(state: SlackCheckState): Resolved<SlackCheckStateChannel[]>;
85
+ /**
86
+ * The channel a criterion names, with the three outcomes a negative criterion
87
+ * must tell apart (F-1028, carried over verbatim from the cloud's rule):
88
+ * - no `channels` key at all → `state_incomplete`; we cannot attest a negative
89
+ * - present but this channel absent → `channel_not_found`; a wrong agent over a
90
+ * partial export must not score a free pass
91
+ * - found → the predicate evaluates. A present channel with zero messages is a
92
+ * TRUE vacuous pass.
93
+ *
94
+ * Comparison is case-insensitive and `#`-tolerant: the twin stores the exact
95
+ * casing the API caller used, so a phrase-vs-export drift must not flip a
96
+ * verdict.
97
+ */
98
+ export declare function resolveChannel(state: SlackCheckState, name: string): Resolved<SlackCheckStateChannel>;
99
+ /**
100
+ * Does this text carry the mark a redactor left?
101
+ *
102
+ * It reads the POSITION a redactor stamped, never a secret — which is the whole
103
+ * reason the secrets class is expressible as a delta. A scan needs its literal
104
+ * to survive redaction and it does not; this needs only the token, which
105
+ * redaction CREATES.
106
+ */
107
+ export declare function bearsRedactionToken(text: string | undefined): boolean;
@@ -0,0 +1,14 @@
1
+ export type { Check } from "./check-kind.js";
2
+ export type { SlackCheckState, SlackCheckStateChannel, SlackCheckStateMessage, SlackCheckStateReaction, } from "./check-state.js";
3
+ export declare const SLACK_CHECKS: readonly [import("./check-kind.js").Check<{
4
+ channel: string;
5
+ }>, import("./check-kind.js").Check<{
6
+ needle: string;
7
+ scope: string;
8
+ }>, import("./check-kind.js").Check<{
9
+ reaction: string;
10
+ channel: string;
11
+ }>, import("./check-kind.js").Check<{
12
+ channel: string;
13
+ needle: string;
14
+ }>, import("./check-kind.js").Check<Record<string, never>>];
@@ -0,0 +1,62 @@
1
+ import { z } from "zod";
2
+ import type { SlackStateSeed } from "./types.js";
3
+ export declare const seedSchema: z.ZodObject<{
4
+ team: z.ZodPrefault<z.ZodObject<{
5
+ id: z.ZodOptional<z.ZodString>;
6
+ name: z.ZodDefault<z.ZodString>;
7
+ domain: z.ZodDefault<z.ZodString>;
8
+ }, z.core.$strip>>;
9
+ users: z.ZodDefault<z.ZodArray<z.ZodObject<{
10
+ id: z.ZodOptional<z.ZodString>;
11
+ name: z.ZodString;
12
+ real_name: z.ZodDefault<z.ZodString>;
13
+ email: z.ZodOptional<z.ZodString>;
14
+ is_bot: z.ZodDefault<z.ZodBoolean>;
15
+ is_admin: z.ZodDefault<z.ZodBoolean>;
16
+ tz: z.ZodDefault<z.ZodString>;
17
+ profile: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
18
+ }, z.core.$strip>>>;
19
+ channels: z.ZodDefault<z.ZodArray<z.ZodObject<{
20
+ id: z.ZodOptional<z.ZodString>;
21
+ name: z.ZodString;
22
+ is_private: z.ZodDefault<z.ZodBoolean>;
23
+ topic: z.ZodDefault<z.ZodString>;
24
+ purpose: z.ZodDefault<z.ZodString>;
25
+ creator: z.ZodOptional<z.ZodString>;
26
+ members: z.ZodDefault<z.ZodArray<z.ZodString>>;
27
+ messages: z.ZodDefault<z.ZodArray<z.ZodObject<{
28
+ ts: z.ZodOptional<z.ZodString>;
29
+ user: z.ZodString;
30
+ text: z.ZodString;
31
+ thread_ts: z.ZodOptional<z.ZodString>;
32
+ reactions: z.ZodDefault<z.ZodArray<z.ZodObject<{
33
+ name: z.ZodString;
34
+ user: z.ZodString;
35
+ }, z.core.$strip>>>;
36
+ }, z.core.$strip>>>;
37
+ }, z.core.$strip>>>;
38
+ emoji: z.ZodDefault<z.ZodArray<z.ZodObject<{
39
+ name: z.ZodString;
40
+ url: z.ZodOptional<z.ZodString>;
41
+ alias: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>>>;
43
+ }, z.core.$strip>;
44
+ export declare function parseSeed(input: unknown): SlackStateSeed;
45
+ /**
46
+ * Boot-time seed loader: prefer `POME_SEED_JSON` env (set by the cloud
47
+ * control-plane from the CLI-supplied scenario seed). Accepts both the flat
48
+ * shape and the cloud's provider-scoped envelope `{slack:{seed:...}}`. Falls
49
+ * back to `defaultSeedState()` when env is absent. Throws on malformed JSON
50
+ * or schema-invalid seed so a misconfigured cloud deploy fails healthz
51
+ * rather than silently booting with the default world.
52
+ */
53
+ /**
54
+ * `Record<string, string | undefined>` rather than `NodeJS.ProcessEnv`, which is
55
+ * structurally the same thing but an AMBIENT global. This signature is vendored
56
+ * into `@pome-sh/checks`'s published declarations, and an ambient reference there
57
+ * makes a consumer's `tsc` fail with TS2503 unless they happen to have
58
+ * `@types/node` installed — a dependency this package should not impose to
59
+ * describe a plain string map.
60
+ */
61
+ export declare function loadSeedFromEnv(env?: Record<string, string | undefined>): SlackStateSeed;
62
+ export declare function defaultSeedState(): SlackStateSeed;