feat: migrate @perstack/api-client to npm version#415
Merged
Conversation
- Remove local packages/api-client/ directory - Update dependencies to use @perstack/api-client@^0.0.51 - Update API calls to use new response structure - Remove deprecated CLI commands (publish, status, tag) - Remove E2E test for deleted publish command BREAKING CHANGES: - Remove `perstack publish` command (new API uses draft-based publish model) - Remove `perstack status` command (no status update in new API) - Remove `perstack tag` command (no tag update in new API) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The npm @perstack/api-client package imports @perstack/core at runtime,
which caused ESM resolution failures when loading tests. The issue was
that the helpers barrel file (index.ts) re-exported resolve-expert.ts,
triggering the import chain:
test → helpers/index.js → resolve-expert.js → @perstack/api-client (npm)
→ @perstack/core (workspace) → ./adapters/index.js (doesn't exist)
Fix by:
- Remove resolveExpertToRun export from helpers/index.ts
- Use dynamic import in setup-experts.ts to lazy-load resolve-expert.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
For consistency with other removed registry commands (publish, status, tag), also remove the unpublish command since CLI no longer supports registry operations. Removed: - perstack unpublish command - Wizard TUI components (WizardExpertSelector, VersionSelector, useExpertVersionWizard) - Related type definitions (WizardExpertChoice, WizardVersionInfo) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed unused code after the publish/status/tag/unpublish command cleanup: Components: - QueryRow, CompletionRow, ErrorRow from action-row.tsx - ErrorStep component (entire file) - getStatusColor utility (entire file) Types: - EventResult - RuntimeState - RunHistoryItem Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The "Perstack Registry" concept no longer exists. Rename all related references to use "published expert" terminology instead. Changes: - Rename e2e/perstack-cli/registry.test.ts → published-expert.test.ts - Rename RegistryExpertData → PublishedExpertData - Rename registryExpert/expertFromRegistry → publishedExpert - Update error messages: "registry response" → "API response" - Update error messages: "remote expert" → "published expert" - Remove Registry description from agents-md-template.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Migrate from local
packages/api-clientto npm-published version@perstack/api-client@^0.0.51.packages/api-client/directory@perstack/api-client@^0.0.51result.data.data.definition.experts)BREAKING CHANGES
perstack publishcommand (new API uses draft-based publish model)perstack statuscommand (no status update in new API)perstack tagcommand (no tag update in new API)Test plan
pnpm install- Update lockfilepnpm typecheck- 28/28 passedpnpm format-and-lint- Passedpnpm test- 119/123 passed (4 pre-existing failures unrelated to changes)pnpm build- 28/28 passedpnpm test:e2e- 23/24 passed (1 pre-existing failure unrelated to changes)🤖 Generated with Claude Code