Skip to content

feat: migrate @perstack/api-client to npm version#415

Merged
FL4TLiN3 merged 5 commits intomainfrom
feat/migrate-api-client-to-npm
Jan 17, 2026
Merged

feat: migrate @perstack/api-client to npm version#415
FL4TLiN3 merged 5 commits intomainfrom
feat/migrate-api-client-to-npm

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

Migrate from local packages/api-client to npm-published version @perstack/api-client@^0.0.51.

  • Remove local packages/api-client/ directory
  • Update dependencies to use @perstack/api-client@^0.0.51
  • Update API calls to use new response structure (result.data.data.definition.experts)
  • Remove deprecated CLI commands (publish, status, tag) that have no equivalent in new API
  • 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)

Test plan

  • pnpm install - Update lockfile
  • pnpm typecheck - 28/28 passed
  • pnpm format-and-lint - Passed
  • pnpm test - 119/123 passed (4 pre-existing failures unrelated to changes)
  • pnpm build - 28/28 passed
  • pnpm test:e2e - 23/24 passed (1 pre-existing failure unrelated to changes)

🤖 Generated with Claude Code

FL4TLiN3 and others added 2 commits January 17, 2026 21:38
- 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-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 37.50000% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
apps/runtime/src/helpers/resolve-expert.ts 33.33% 6 Missing and 8 partials ⚠️
apps/runtime/src/helpers/setup-experts.ts 66.66% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

FL4TLiN3 and others added 3 commits January 17, 2026 22:12
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>
@FL4TLiN3 FL4TLiN3 merged commit 4b153c7 into main Jan 17, 2026
9 checks passed
@github-actions github-actions bot mentioned this pull request Jan 17, 2026
@FL4TLiN3 FL4TLiN3 deleted the feat/migrate-api-client-to-npm branch February 25, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants