fix: align plugin service names with CoreServiceName enum from @objectstack/spec#227
fix: align plugin service names with CoreServiceName enum from @objectstack/spec#227
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
…tstack/spec - realtime: 'websocket-server' → 'realtime' - storage: 'storage' → 'file-storage' - jobs: 'jobs' → 'job' Updates registration, getService helpers, health checks, and all tests. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
@copilot 本项目的 service还有 workflow |
There was a problem hiding this comment.
Pull request overview
This PR updates several kernel plugin service registration names to match the canonical CoreServiceName enum from @objectstack/spec, ensuring runtime service discovery aligns with the protocol.
Changes:
- Renamed registered service names for
@objectos/realtime,@objectos/storage, and@objectos/jobstorealtime,file-storage, andjob. - Updated corresponding
get*API()helpers and test assertions to use the new service names. - Regenerated
pnpm-lock.yamlreflecting dependency/metadata updates.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Lockfile updated (includes broader dependency/metadata changes beyond service-name renames). |
| packages/storage/src/plugin.ts | Registers storage service under file-storage; updates getStorageAPI() accordingly. |
| packages/storage/test/plugin.test.ts | Updates service registration assertion to file-storage. |
| packages/realtime/src/plugin.ts | Registers realtime service under realtime; updates log + health check check name. |
| packages/realtime/test/plugin.test.ts | Updates service map key and assertions to realtime. |
| packages/jobs/src/plugin.ts | Registers jobs service under job; updates getJobsAPI() accordingly. |
| packages/jobs/test/plugin.test.ts | Updates service registration assertion to job. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| it('should initialize and register websocket-server service', async () => { | ||
| await plugin.init(mockContext); | ||
|
|
||
| expect(mockContext.registerService).toHaveBeenCalledWith( | ||
| 'websocket-server', | ||
| 'realtime', |
There was a problem hiding this comment.
The test case description still refers to the old service name ("websocket-server"), even though the assertions now use "realtime". Updating the it(...) string will keep test output and intent aligned with the new CoreServiceName.
| specifier: ^2.0.1 | ||
| version: 2.0.1(pino@10.3.0) | ||
| optionalDependencies: | ||
| ioredis: | ||
| specifier: ^5.4.2 | ||
| version: 5.9.2 | ||
| '@objectstack/spec': | ||
| specifier: 2.0.1 | ||
| version: 2.0.1 |
There was a problem hiding this comment.
pnpm-lock.yaml changes include dependency scope updates beyond the 3 plugin service-name renames (e.g. adding @objectstack/spec to additional importers like packages/cache). Please confirm these extra dependency changes are intentional and reflect them in the PR description (or split them into a separate PR to keep review scope focused).
| libc: [glibc] | ||
|
|
||
| '@img/sharp-libvips-linux-arm@1.2.4': | ||
| resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} | ||
| cpu: [arm] | ||
| os: [linux] | ||
| libc: [glibc] | ||
|
|
||
| '@img/sharp-libvips-linux-ppc64@1.2.4': | ||
| resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} | ||
| cpu: [ppc64] | ||
| os: [linux] | ||
| libc: [glibc] | ||
|
|
||
| '@img/sharp-libvips-linux-riscv64@1.2.4': | ||
| resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} | ||
| cpu: [riscv64] | ||
| os: [linux] | ||
| libc: [glibc] |
There was a problem hiding this comment.
This lockfile update adds widespread metadata fields (e.g. libc: [...] on many platform-specific packages), which typically means it was regenerated with a different pnpm version/config. If this PR’s intent is only service-name alignment, consider regenerating with the repo-standard pnpm setup (or isolating lockfile-format changes) to reduce unrelated churn and merge conflicts.
| libc: [glibc] | |
| '@img/sharp-libvips-linux-arm@1.2.4': | |
| resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} | |
| cpu: [arm] | |
| os: [linux] | |
| libc: [glibc] | |
| '@img/sharp-libvips-linux-ppc64@1.2.4': | |
| resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} | |
| cpu: [ppc64] | |
| os: [linux] | |
| libc: [glibc] | |
| '@img/sharp-libvips-linux-riscv64@1.2.4': | |
| resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} | |
| cpu: [riscv64] | |
| os: [linux] | |
| libc: [glibc] | |
| '@img/sharp-libvips-linux-arm@1.2.4': | |
| resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} | |
| cpu: [arm] | |
| os: [linux] | |
| '@img/sharp-libvips-linux-ppc64@1.2.4': | |
| resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} | |
| cpu: [ppc64] | |
| os: [linux] | |
| '@img/sharp-libvips-linux-riscv64@1.2.4': | |
| resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} | |
| cpu: [riscv64] | |
| os: [linux] |
|
Three plugins register services with names that don't match the
CoreServiceNameenum defined in@objectstack/spec. The protocol specifies 17 canonical service names; these three were out of sync.Changes
@objectos/realtime'websocket-server''realtime'@objectos/storage'storage''file-storage'@objectos/jobs'jobs''job'Updated in each package:
registerService()call ininit()getService()call in exportedget*API()helperchecks[].nameReference: https://protocol.objectstack.ai/docs/guides/kernel-services
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.