Skip to content

Upgrading: Merged and Retired Packages ​

The @zhin.js packages below were merged into another package, renamed or removed and get no new releases. Their last releases on the registry still depend on old Zhin packages (for example @zhin.js/config-yaml@1.1.0 pulls in @zhin.js/runtime@1.1.0 and @zhin.js/plugin-runtime@1.1.9): as long as the project depends on one directly, node_modules holds a second copy of a Zhin package and the single-instance check reports it. Pinning the version with pnpm.overrides only hides the problem: rewrite the imports and remove the dependency.

PackageStatusReplacement import or packageWhat to do
@zhin.js/adapter-processrenamed @zhin.js/adapter-sandbox@zhin.js/adapter-sandboxdepend on it, adjust the plugin configuration per its docs, remove the old dependency
@zhin.js/ai-providermerged into @zhin.js/ai@zhin.js/ai/providerrewrite imports, remove the dependency
@zhin.js/config-filemerged into @zhin.js/runtime@zhin.js/runtime (or @zhin.js/runtime/config-file): YamlConfigDocument, JsonConfigDocument, createConfigDocumentrewrite imports, remove the dependency
@zhin.js/config-yamlretired, merged into @zhin.js/runtimeimport { YamlConfigDocument } from '@zhin.js/runtime'; YamlConfigDocumentError is renamed ConfigFileDocumentError, and ConfigDocumentParseError and ConfigDocumentConflictError now extend ConfigFileDocumentError (ConfigDocumentParseError takes an extra format argument)rewrite imports and instanceof checks, remove the dependency
@zhin.js/consoleremoved (renamed @zhin.js/host-api first, which is removed too)none: zhin start assembles the Console and HTTP Hostremove the dependency and its plugin configuration
@zhin.js/console-appremoved (the Console front end left this repository)none: zhin start assembles the Consoleremove the dependency
@zhin.js/console-corerenamed @zhin.js/pagemanager@zhin.js/pagemanager; the browser half (loadConsoleEntries, apiFetch, …) is in @zhin.js/clientswitch the dependency, remove the old one
@zhin.js/console-typesmerged into @zhin.js/contract@zhin.js/contract (check the names against its current exports)rewrite imports, remove the dependency
@zhin.js/dependencyretiredno direct replacementremove the dependency once nothing uses it
@zhin.js/devteamretiredno direct replacementremove the dependency once nothing uses it
@zhin.js/game-sharedrenamed @zhin.js/game-kit@zhin.js/game-kit (rewrite against its current exports)rewrite imports, remove the dependency
@zhin.js/hmrretiredno direct replacementremove the dependency once nothing uses it
@zhin.js/host-apiremovednone: zhin start assembles the Console and HTTP Hostremove the dependency and its plugin configuration
@zhin.js/host-routerremovednone: @zhin.js/host-http, assembled by zhin start, serves HTTPremove the dependency and its plugin configuration
@zhin.js/httpremoved (renamed @zhin.js/host-router first, which is removed too)none: @zhin.js/host-http, assembled by zhin start, serves HTTPremove the dependency and its plugin configuration
@zhin.js/http-hostremoved (split into @zhin.js/host-router and @zhin.js/host-api, both removed too)none: @zhin.js/host-http, assembled by zhin start, serves HTTPremove the dependency
@zhin.js/interactionmerged into @zhin.js/im-contract@zhin.js/im-contract/interactionrewrite imports, remove the dependency
@zhin.js/isolatemerged into @zhin.js/runtime@zhin.js/runtime/isolaterewrite imports, remove the dependency
@zhin.js/plugin-github-notifybecame the GitHub adapter@zhin.js/adapter-github (webhook notifications are part of it)depend on it, configure it per its docs, remove the old dependency
@zhin.js/plugin-html-rendererremoved@zhin.js/html-rendererswitch the dependency, remove the old one and its plugin configuration
@zhin.js/plugin-test-kitrenamed @zhin.js/testing@zhin.js/testing (same API, same PluginTestKit)rewrite imports, remove the dependency
@zhin.js/plugin-voiceremoved@zhin.js/speech; the config key voice: becomes speech:switch the dependency and configuration, remove the old dependency
@zhin.js/queue-runtimeretiredno direct replacementremove the dependency once nothing uses it
@zhin.js/satoriremovedraster rendering now comes from @zhin.js/html-rendererswitch to it, remove the dependency
@zhin.js/sensitive-filterremoved@zhin.js/plugin-content-moderationdepend on and configure it, remove the old dependency and its plugin configuration
@zhin.js/storage-portretiredno direct replacementremove the dependency once nothing uses it
@zhin.js/typesretiredno direct replacementremove the dependency once nothing uses it
@zhin.js/workroomremovednone: declare groups or channels shared by several bots in ai.venues, and the collaboration scope in collaboration of agents/<name>/agent.jsonremove the dependency

"No direct replacement" means the repository history names no package that took over: those entries only tell you to remove the dependency and suggest no replacement path.

Deleted subpaths ​

The package itself is still published, but the subpath exports below were deleted, so importing them fails at install or run time:

SubpathUse insteadNotes
@zhin.js/agent/tools@zhin.js/toolimport defineAgentTool from @zhin.js/tool and put tools in tools/<name>/index.ts; toolApprovalAlways / toolApprovalOnce / toolApprovalNever become requiresApproval of defineAgentTool, set to 'always', 'once' or 'never'

How the tools flag them ​

  • The retired-packages check of zhin doctor reads the package.json of the root and of every pnpm workspace member (dependencies, devDependencies, optionalDependencies, peerDependencies); each warning names the file, the replacement and the dependency to remove. An import of a deleted subpath above in the project's sources (or of a retired package no manifest declares) is a warning too, listing file and line for the first five.
  • When the single-instance check reports duplicates, it first follows the chain to the direct dependency that drags the old release in (also when a workspace member depends on that old release directly); when that dependency is in the table above, the table's fix comes first, once per retired package however many old releases it drags in, and pnpm.overrides is only the last suggestion.
  • zhin migrate does not upgrade the packages above, and its retired-packages step lists the package.json that declares each one and the imports to rewrite in the project's sources (file and line, deleted subpaths included; specifiers inside comments and other strings do not count). Where a retired package exported only its root, an import with a subpath (such as @zhin.js/isolate/x) gets the action but no replacement path. It neither rewrites sources nor removes dependencies: a retired package may export more than its replacement took over, so you confirm and edit by hand.

Example ​

ts
// before
import { YamlConfigDocument } from '@zhin.js/config-yaml';
// after
import { YamlConfigDocument } from '@zhin.js/runtime';
bash
pnpm remove @zhin.js/config-yaml
# after removing the pnpm.overrides added for it
pnpm install
zhin doctor   # the single-instance check should pass

See also CLI: doctor and CLI: migrate.