Repository navigation
feat(slack)!: typed errors for every documented error code, plus object schemas - #1358
sam-goodwin wants to merge 6 commits into
Conversation
Benchmarks: PR
|
| Metric | Change vs main | Programs |
|---|---|---|
| Bundle (gzip) | 1 worse | 18 |
| Import heap | 1 worse | 7 |
| Objects at import | no change | 7 |
| Added latency (p50) ¹ | no change | 7 |
| Import time ¹ | no change | 7 |
| First call ¹ | no change | 7 |
| Program | Call | Bundle (gzip) | Import heap | Objects at import | Added latency (p50) | Import time | First call |
|---|---|---|---|---|---|---|---|
| aws | s3.listBuckets |
79.4 KB | — | — | — | — | — |
| aws~awsJson1_0 | dynamodb.listTables |
71.7 KB | — | — | — | — | — |
| aws~awsJson1_1 | kms.listKeys |
70.9 KB | — | — | — | — | — |
| aws~awsQuery | sts.getCallerIdentity |
72.3 KB | — | — | — | — | — |
| aws~ec2Query | ec2.describeRegions |
72.4 KB | — | — | — | — | — |
| aws~restJson1 | lambda.listFunctions |
73.1 KB | — | — | — | — | — |
| azure | resources.ListTenants |
57.0 KB | — | — | — | — | — |
| cloudflare | workers.listScripts |
69.3 KB | — | — | — | — | — |
| cloudflare~CloudflareProtocol | ips.listIps |
49.9 KB | — | — | — | — | — |
| fly-io | machines.getRegions |
50.9 KB | 776.7 KB | 1,088 | 3.4 µs | 8.1 ms | 3.3 ms |
| fly-io~FlyApiProtocol | mpg.listUsers |
50.6 KB | 668.0 KB | 982 | 2.1 µs | 7.2 ms | 3.0 ms |
| fly-io~SpritesProtocol | sprites.createOrganizationToken |
51.3 KB | 706.2 KB | 1,024 | 5.3 µs | 7.6 ms | 3.3 ms |
| gcp | storage_v1.listBuckets |
51.8 KB | — | — | — | — | — |
| github | gists.list |
53.4 KB | 656.6 KB | 954 | 2.5 µs | 6.8 ms | 3.2 ms |
| neon | neon.listProjects |
52.1 KB | 837.8 KB | 1,084 | 1.5 µs | 7.8 ms | 3.1 ms |
| resend | resend.listLogs |
51.9 KB | 868.4 KB | 1,144 | 1.8 µs | 7.9 ms | 3.0 ms |
| slack | admin.listEmoji |
50.0 KB (+0.3%) 🔴 | 1.0 MB (+40.7%) 🔴 | 1,059 | 3.7 µs | 7.7 ms | 2.9 ms |
| stripe | stripe.GetFiles |
50.1 KB | — | — | — | — | — |
PR 5d49480c5 against main 294d116ba (main's cached run from 2026-11-21 04:12 UTC). 18 programs, measured in 25 s on 8 vCPU.
| Package | Tarball | Unpacked | Files |
|---|---|---|---|
| core | 331.2 KB | 1.3 MB | 229 |
| fly-io | 250.2 KB | 1.6 MB | 71 |
| github | 2.1 MB | 19.6 MB | 338 |
| neon | 221.4 KB | 1.2 MB | 47 |
| resend | 173.2 KB | 1.2 MB | 57 |
| slack | 665.8 KB (+79.1%) | 4.6 MB (+82.5%) | 255 |
| Tracked files | Size | Change vs main | Files |
|---|---|---|---|
services |
512.8 MB | +823.4 KB | 3,024 |
in-tree-specs |
98.3 KB | ±0 B | 4 |
patches |
10.1 MB | +25.6 KB | 4,197 |
handwritten |
9.6 MB | +5.4 KB | 1,957 |
benches |
9.6 MB | ±0 B | 207 |
other |
2.6 MB | ±0 B | 515 |
| Total | 544.8 MB | +854.4 KB | 9,904 |
What a checkout or worktree writes to disk, from git ls-tree (benches/repo-size/tree.ts). The dashboard's Repo size page has the full picture.
Effect alone: effect-minimal bundle 8.9 KB gzip, hand-written effect-http call 48.6 KB gzip; effect import 63.1 ms and 12.8 MB heap; bare mocked HTTP roundtrip 9.6 µs p50.
Bundled (from src/): resend, neon, github, fly-io, aws, cloudflare, gcp, azure, stripe, slack. Built and probed (from lib/): resend, neon, github, fly-io, slack. Changed in this PR: slack.
Job time: bundle 6.7 s, build: tsrs 0.2 s, build: bundle-lib 2.4 s, build: strip-lib-docs 0.1 s, build 2.7 s, size 0.9 s, runtime 14.6 s, providers 0.0 s.
¹ Timings run on a different runner than main's, so 🟡 marks a large move that may still be noise. Sizes, heap and object counts are stable. Offline: every call hits a canned in-memory response. Full suite: node benches/sdks/run.ts. Job log
|
Install the packages built from this commit: @distilled.cloud (2)pnpm install https://pkg.distilled.cloud/@distilled.cloud/core/pr:1358:5d49480pnpm install https://pkg.distilled.cloud/@distilled.cloud/slack/pr:1358:5d49480Published |







Every Slack method page documents the
errorcodes it can return. The converter now turns each one into a typed error on the operations that list it, matched on the envelope's/errormember:*_not_foundcodes carryNotFoundErrorandalready_*/*_takencodes carryAlreadyExistsError. Credential, throttling and server codes keep their shared classes (Unauthorized,SlackRateLimited,InternalServerError). Codes a page doesn't document still arrive asSlackError.Patches:
conversations,usergroups,bookmarks,users: the docs reference the conversation, usergroup, bookmark and user objects by name with no JSON twin, so every response carrying them decoded asunknown. They are modelled from the documented objects.canvases,conversations:document_contentand canvas editchangesare modelled from the method examples.tooling,apps: the rotated configtoken, the new app'sverification_token, andapp_tokenare marked sensitive like the secrets beside them.The new error types widen operation signatures, hence the
!.The errors and schemas come from Slack's docs, not live responses. The companion alchemy PR (
@alchemy.run/slack) has live tests for all of these, waiting on a test workspace.