chore: add an AGENTS.md#2528
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2528 +/- ##
=======================================
Coverage 93.17% 93.17%
=======================================
Files 40 40
Lines 11384 11384
Branches 726 726
=======================================
Hits 10607 10607
Misses 765 765
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
zimeg
left a comment
There was a problem hiding this comment.
@WilliamBergamin The agents come alive! 🤖 ✨
Thanks for bringing these initializations to the node packages - I'm leaving a few notes from unstaged changes but am so excited to refine this ongoing!
| | `OptionalTeamAssignable` | Optional `team_id` | | ||
| | `LocaleAware` | Optional `include_locale` | | ||
|
|
||
| Also reuse namespace-specific mixins from the same file (e.g., `Channel`, `ChannelAndTS`, `AsUser` in `chat.ts`). |
There was a problem hiding this comment.
📣 note: This is a good practice to continue for now, but I'd be so curious in "flattening" these arguments for each method...
| ## Code Generation Details | ||
|
|
||
| ### `scripts/generate-web-api-types.sh` | ||
|
|
||
| Entry point for response type generation. It: | ||
|
|
||
| 1. Clones or pulls `slackapi/java-slack-sdk` into `tmp/` | ||
| 2. Runs `npm install` in `scripts/` to install quicktype | ||
| 3. Executes `scripts/code_generator.rb` | ||
| 4. Runs `npm run lint:fix` on `packages/web-api` | ||
|
|
||
| ### `scripts/code_generator.rb` | ||
|
|
||
| The Ruby script that does the actual generation: | ||
|
|
||
| - Iterates over JSON files in `tmp/java-slack-sdk/json-logs/samples/api/` | ||
| - Converts method names to PascalCase (e.g., `chat.postMessage` → `ChatPostMessage`) | ||
| - Runs quicktype with `--just-types --all-properties-optional` to generate TypeScript interfaces | ||
| - Prepends a "DO NOT EDIT" banner and `import type { WebAPICallResult } from '../../WebClient'` | ||
| - Converts the root interface to a type alias intersected with `WebAPICallResult` | ||
| - Regenerates `packages/web-api/src/types/response/index.ts` with all exports | ||
| - Special handling: `admin.analytics.getFile` exports multiple types (`AdminAnalyticsGetFileResponse`, `AdminAnalyticsMemberDetails`, `AdminAnalyticsPublicChannelDetails`, `AdminAnalyticsPublicChannelMetadataDetails`) | ||
|
|
There was a problem hiding this comment.
🪓 suggestion(non-blocking): I'm unsure if this is covered alright earlier, but I'd want to avoid adding too much about this script unless it's needed!
There was a problem hiding this comment.
I agree 💯 I also saw this and hesitated, axing it now 🪓
| - Streaming support via `chatStream()` using `ChatStreamer` | ||
| - Rate limiting with emitted events | ||
|
|
||
| ## Common Pitfalls |
There was a problem hiding this comment.
🌟 praise: These are nice callouts! I might have need this sometimes before...
Co-authored-by: Eden Zimbelman <[email protected]>
Summary
This PRs aims to add an
AGENTS.mdto help LLM help maintainers maintain this projectRequirements