{"record":{"id":"8b37eeb47ab38c23","repo":"moeru-ai/airi","slug":"import-proj-airi-plugin-protocol-types-instead","errorCode":null,"errorMessage":"import @proj-airi/plugin-protocol/types instead","messagePattern":"import @proj-airi/plugin-protocol/types instead","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/plugin-protocol/src/index.ts","lineNumber":1,"sourceCode":"console.warn('import @proj-airi/plugin-protocol/types instead')\n","sourceCodeStart":1,"sourceCodeEnd":2,"githubUrl":"https://github.com/moeru-ai/airi/blob/677329427f32468c74b17f3ec47eeca4e05bec65/packages/plugin-protocol/src/index.ts#L1-L2","documentation":"The root entrypoint of @proj-airi/plugin-protocol is intentionally export-free; its entire module body is this console.warn directing you to the typed subpath. Importing the package root does not fail the build — it just pulls in a module that prints the warning and provides nothing.","triggerScenarios":"Any `import ... from '@proj-airi/plugin-protocol'` (root specifier) instead of '@proj-airi/plugin-protocol/types'.","commonSituations":"IDE auto-complete inserting the root specifier; code migrated from an older layout where the root was the API; barrel-file tooling resolving to the root.","solutions":["Change the import specifier to '@proj-airi/plugin-protocol/types'","Add an ESLint import restriction (import/no-restricted-imports) forbidding the bare package name so it fails lint instead of warning at runtime"],"exampleFix":"// before\nimport type { PluginProtocol } from '@proj-airi/plugin-protocol'\n\n// after\nimport type { PluginProtocol } from '@proj-airi/plugin-protocol/types'","handlingStrategy":"validation","validationCode":"// before resolving, assert the subpath you meant to use\nif (!specifier.startsWith('@proj-airi/plugin-protocol/')) {\n  throw new Error('import @proj-airi/plugin-protocol/types instead')\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always deep-import '@proj-airi/plugin-protocol/types'","Add import/no-restricted-imports for the bare package name","Watch for the literal warning text in dev console — it only fires when the root was imported"],"tags":["import","package-entrypoint","plugin-protocol"],"backgroundTag":"wrong-package-entrypoint","analyzedSha":"677329427f32468c74b17f3ec47eeca4e05bec65","analyzedAt":"2026-08-18T17:29:58.153Z","contentChangedAt":"2026-08-18T17:29:58.153Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}