feat: Add starter pack support (StepStarterPack, StepStarterPacks, StepSearchStarterPacks, StepActorStarterPacks) #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive support for Bluesky starter packs to Trotsky, implementing four new step classes with full pagination, iteration, and filtering capabilities:
Key Features
.each()support for iterating through collections.when()filtering support.take()limit supportAPI Endpoints Used
app.bsky.graph.getStarterPack- Get single starter packapp.bsky.graph.getStarterPacks- Get multiple starter packsapp.bsky.graph.searchStarterPacks- Search starter packs (app.bsky.graph.getActorStarterPacks- Get actor's starter packsExamples
Files Changed
Core Implementation:
lib/core/StepStarterPack.ts- Single starter pack retrievallib/core/StepStarterPacks.ts- Multiple starter packs with paginationlib/core/StepStarterPacksEntry.ts- Entry wrapper for iterationlib/core/StepSearchStarterPacks.ts- Search functionalitylib/core/StepActorStarterPacks.ts- Actor's starter packslib/core/Trotsky.ts- Added starter pack methodslib/core/mixins/ActorMixins.ts- AddedstarterPacks()to actor stepslib/trotsky.ts- Exported new classesTests (45 new tests):
tests/core/StepStarterPack.test.ts- 11 teststests/core/StepStarterPacks.test.ts- 13 teststests/core/StepSearchStarterPacks.test.ts- 10 teststests/core/StepActorStarterPacks.test.ts- 11 testsDocumentation:
docs/guide/features.md- Updated feature matrixTest Results
All tests passing with no regressions to existing functionality.
Notes
searchStarterPacksAPI endpoint is not yet deployed to production Bluesky servers. Tests work in the test environment, but production usage will receiveXRPCNotSupportederrors until the API is deployed.