{"_id":"@bernierllc/onboarding-agent-suite","_rev":"5-80999ccd46db9e1deffd0dfec8241e7c","name":"@bernierllc/onboarding-agent-suite","dist-tags":{"latest":"0.1.3"},"versions":{"0.0.1":{"name":"@bernierllc/onboarding-agent-suite","version":"0.0.1","keywords":["oidc","trusted-publishing","setup"],"_id":"@bernierllc/onboarding-agent-suite@0.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"2817e65fd8426a5d14e93eebc2c4602c6c7faa66","tarball":"https://registry.npmjs.org/@bernierllc/onboarding-agent-suite/-/onboarding-agent-suite-0.0.1.tgz","fileCount":2,"integrity":"sha512-tFlifd6RH43LC++5umkK3uMfriQ2w8cq7Tm5AbgVK4WCzDG/d4oySXEbkhLhXrapcwnXB09UopwUJd1uF8JFFw==","signatures":[{"sig":"MEYCIQCM2WoclLuRdH0j8Sco807Nzjj9s5FTKH5OTwAtC93BgAIhAPD9dwRK7x3NGH0spCFk6GASFwPQuxvd7IZHKoXaKKgJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2099},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_npmVersion":"11.12.1","description":"OIDC trusted publishing setup package for @bernierllc/onboarding-agent-suite","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/onboarding-agent-suite_0.0.1_1782236406405_0.7601801292811303","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bernierllc/onboarding-agent-suite","version":"0.1.0","keywords":["onboarding","agent","ai","streaming","chat","suite","bernierllc"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/onboarding-agent-suite@0.1.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"b9731351528ec3153ff015225ba30d179b32f4ac","tarball":"https://registry.npmjs.org/@bernierllc/onboarding-agent-suite/-/onboarding-agent-suite-0.1.0.tgz","fileCount":19,"integrity":"sha512-W0fAZpONB0Rg2PDetKO85VWdhjA2Cp64fP6ZvFFeCZn9psBw1qpVabh/gCHHWHaPsJqyjgu+Qs0Ktq71UeQNAg==","signatures":[{"sig":"MEUCIC3Js9nl1dTZECbnVeBOdmCf8HRMfETvCia+XncVehXAAiEAoNl5GuVjlmhAFqalyq8Paizb53IVgcJg3e2sqtNJab0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47168},"main":"dist/index.js","_from":"file:bernierllc-onboarding-agent-suite-0.1.0.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts,.tsx","test":"echo 'Tests skipped for initial publish'","build":"tsc","clean":"rm -rf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:344112c1-9d29-4cd8-9887-4e6dea7fb330"}},"_resolved":"/home/runner/work/tools/tools/packages/suite/onboarding-agent-suite/bernierllc-onboarding-agent-suite-0.1.0.tgz","_integrity":"sha512-W0fAZpONB0Rg2PDetKO85VWdhjA2Cp64fP6ZvFFeCZn9psBw1qpVabh/gCHHWHaPsJqyjgu+Qs0Ktq71UeQNAg==","bernierllc":{"runtime":"universal","category":"suite","integration":{"logger":"integrated","neverhub":"required","neveradmin":"optional"}},"_npmVersion":"11.17.0","description":"Drop-in bundle: one-call setup for config-driven conversational onboarding agents with plugin extensibility, streaming chat, goal tracking, and UI components.","directories":{},"_nodeVersion":"24.16.0","dependencies":{"@bernierllc/ai-provider-core":"1.6.0","@bernierllc/onboarding-chat-ui":"0.1.0","@bernierllc/onboarding-config-core":"0.2.0","@bernierllc/onboarding-agent-nextjs":"0.1.0","@bernierllc/agent-conversation-store":"0.2.0","@bernierllc/onboarding-agent-service":"0.1.0","@bernierllc/onboarding-feature-plugin":"0.2.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","next":"^15.0.0","react":"^18.0.0","eslint":"^8.45.0","ts-jest":"^29.1.0","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@testing-library/react":"^13.4.0","jest-environment-jsdom":"^29.5.0","@testing-library/jest-dom":"^5.16.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"next":">=14.0.0 <16","react":">=18","react-dom":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/onboarding-agent-suite_0.1.0_1782237835874_0.6261541473626167","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bernierllc/onboarding-agent-suite","version":"0.1.1","keywords":["onboarding","agent","ai","streaming","chat","suite","bernierllc"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/onboarding-agent-suite@0.1.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"d43116a77015b2fa49a7adfc10b80e460c8b5cdc","tarball":"https://registry.npmjs.org/@bernierllc/onboarding-agent-suite/-/onboarding-agent-suite-0.1.1.tgz","fileCount":19,"integrity":"sha512-VIZgf/+mLsWLqS8uaY/CsOQFXi33hQbv8ukDqhnjkIivSFJ1YqDzr4eZMFuEydq8kXKO6lx/mRE2gnBum1iXUA==","signatures":[{"sig":"MEYCIQDqQDTER8m59Su7EBqyXxMnHm/IsqMrYxavbwVONANgTwIhANW4+f7UTuEYYkGi8pgRkT43LxGyZ4CNt2OZAtNZuXJW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47168},"main":"dist/index.js","_from":"file:bernierllc-onboarding-agent-suite-0.1.1.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts,.tsx","test":"echo 'Tests skipped for initial publish'","build":"tsc","clean":"rm -rf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:344112c1-9d29-4cd8-9887-4e6dea7fb330"}},"_resolved":"/home/runner/work/tools/tools/packages/suite/onboarding-agent-suite/bernierllc-onboarding-agent-suite-0.1.1.tgz","_integrity":"sha512-VIZgf/+mLsWLqS8uaY/CsOQFXi33hQbv8ukDqhnjkIivSFJ1YqDzr4eZMFuEydq8kXKO6lx/mRE2gnBum1iXUA==","bernierllc":{"runtime":"universal","category":"suite","integration":{"logger":"integrated","neverhub":"required","neveradmin":"optional"}},"_npmVersion":"12.0.1","description":"Drop-in bundle: one-call setup for config-driven conversational onboarding agents with plugin extensibility, streaming chat, goal tracking, and UI components.","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@bernierllc/ai-provider-core":"1.6.1","@bernierllc/onboarding-chat-ui":"0.1.1","@bernierllc/onboarding-config-core":"0.2.1","@bernierllc/onboarding-agent-nextjs":"0.1.1","@bernierllc/agent-conversation-store":"0.2.1","@bernierllc/onboarding-agent-service":"0.1.1","@bernierllc/onboarding-feature-plugin":"0.2.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","next":"^15.0.0","react":"^18.0.0","eslint":"^8.45.0","ts-jest":"^29.1.0","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@testing-library/react":"^13.4.0","jest-environment-jsdom":"^29.5.0","@testing-library/jest-dom":"^5.16.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"next":">=14.0.0 <16","react":">=18","react-dom":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/onboarding-agent-suite_0.1.1_1784016102324_0.36876253006393767","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bernierllc/onboarding-agent-suite","version":"0.1.2","keywords":["onboarding","agent","ai","streaming","chat","suite","bernierllc"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/onboarding-agent-suite@0.1.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"774f5b9e3a30d0e6b25c2d0f9a85d520355ac921","tarball":"https://registry.npmjs.org/@bernierllc/onboarding-agent-suite/-/onboarding-agent-suite-0.1.2.tgz","fileCount":19,"integrity":"sha512-LWupkOAuYwMBr4yk2R6k5jIkJLu9SIdrZiwGo+ndwCgLtOJtch5RX+PoIidfMKNIJdpaSrZpCCR236crf8+Vnw==","signatures":[{"sig":"MEYCIQCsDc7yquX3kosJAgzBnaAQYSjTk0zehf6Q3el2Ce5mfwIhAPNBl+JIKdPsSwCqu8vEQAJ5JYo61MMJMtl0NzbAd/Z3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIGz0lYOpBqoHLeVoDa1185eD54JXG8UNVVs43f4ZCX8aAiEA+ShPc72Rbb/v2CVNB/5g3dDSfOqENM7gNmidUznCG6I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47175},"main":"dist/index.js","_from":"file:bernierllc-onboarding-agent-suite-0.1.2.tgz","types":"dist/index.d.ts","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts,.tsx","test":"echo 'Tests skipped for initial publish'","build":"tsc","clean":"rm -rf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"344112c1-9d29-4cd8-9887-4e6dea7fb330"}},"_resolved":"/home/runner/work/tools/tools/packages/suite/onboarding-agent-suite/bernierllc-onboarding-agent-suite-0.1.2.tgz","_integrity":"sha512-LWupkOAuYwMBr4yk2R6k5jIkJLu9SIdrZiwGo+ndwCgLtOJtch5RX+PoIidfMKNIJdpaSrZpCCR236crf8+Vnw==","bernierllc":{"runtime":"universal","category":"suite","integration":{"logger":"integrated","neverhub":"required","neveradmin":"optional"}},"_npmVersion":"12.2.0","description":"Drop-in bundle: one-call setup for config-driven conversational onboarding agents with plugin extensibility, streaming chat, goal tracking, and UI components.","directories":{},"_nodeVersion":"24.21.0","dependencies":{"@bernierllc/ai-provider-core":"^1.6.1","@bernierllc/onboarding-chat-ui":"^0.1.2","@bernierllc/onboarding-config-core":"^0.2.1","@bernierllc/onboarding-agent-nextjs":"^0.1.1","@bernierllc/agent-conversation-store":"^0.2.1","@bernierllc/onboarding-agent-service":"^0.1.1","@bernierllc/onboarding-feature-plugin":"^0.2.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","next":"^15.0.0","react":"^18.0.0","eslint":"^8.45.0","ts-jest":"^29.1.0","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@testing-library/react":"^13.4.0","jest-environment-jsdom":"^29.5.0","@testing-library/jest-dom":"^5.16.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"next":">=14.0.0 <16","react":">=18","react-dom":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/onboarding-agent-suite_0.1.2_1790797177192_0.7599298292419765","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@bernierllc/onboarding-agent-suite@0.1.3","dist":{"shasum":"10c85cc0919621cd3840ab200f52a5ef1ffad33e","tarball":"https://registry.npmjs.org/@bernierllc/onboarding-agent-suite/-/onboarding-agent-suite-0.1.3.tgz","fileCount":19,"integrity":"sha512-/+ygwzCSJpI86ZSt8hPxdI8fe0ymqvkbpu9+sxEOJgpjV2MBkPCmxizE+6f8odJOj66+j9xUPrlmdHxY4h0FgQ==","signatures":[{"sig":"MEQCIAr2wV5vMKyOx23SNjyQWQFTDkdht3AqOgcWd0SQEkWAAiBHsF7oLrfnHIRm8PvGxcHqUOqWIOulkMEqVAheuvLmsA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA6ihf9MJgcWrgcHTaKvErt+nMeBN4tBOt8qpt+pMW0vAiEA80cAMo9/WMTXmnk2XS1HdkU7mrrKPsC8zLQPyoYPzX0="}],"unpackedSize":47175},"main":"dist/index.js","name":"@bernierllc/onboarding-agent-suite","_from":"file:bernierllc-onboarding-agent-suite-0.1.3.tgz","types":"dist/index.d.ts","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","scripts":{"dev":"tsc --watch","lint":"eslint src --ext .ts,.tsx","test":"echo 'Tests skipped for initial publish'","build":"tsc","clean":"rm -rf dist","test:run":"jest --watchAll=false","test:watch":"jest --watch","test:coverage":"jest --coverage"},"version":"0.1.3","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"344112c1-9d29-4cd8-9887-4e6dea7fb330"}},"keywords":["onboarding","agent","ai","streaming","chat","suite","bernierllc"],"_resolved":"/home/runner/work/tools/tools/packages/suite/onboarding-agent-suite/bernierllc-onboarding-agent-suite-0.1.3.tgz","_integrity":"sha512-/+ygwzCSJpI86ZSt8hPxdI8fe0ymqvkbpu9+sxEOJgpjV2MBkPCmxizE+6f8odJOj66+j9xUPrlmdHxY4h0FgQ==","bernierllc":{"runtime":"universal","category":"suite","integration":{"logger":"integrated","neverhub":"required","neveradmin":"optional"}},"_npmVersion":"12.2.0","description":"Drop-in bundle: one-call setup for config-driven conversational onboarding agents with plugin extensibility, streaming chat, goal tracking, and UI components.","directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_nodeVersion":"24.21.0","dependencies":{"@bernierllc/ai-provider-core":"^1.6.1","@bernierllc/onboarding-chat-ui":"^0.1.2","@bernierllc/onboarding-config-core":"^0.2.1","@bernierllc/onboarding-agent-nextjs":"^0.1.2","@bernierllc/agent-conversation-store":"^0.2.1","@bernierllc/onboarding-agent-service":"^0.1.2","@bernierllc/onboarding-feature-plugin":"^0.2.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","next":"^15.0.0","react":"^18.0.0","eslint":"^8.45.0","ts-jest":"^29.1.0","react-dom":"^18.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@testing-library/react":"^13.4.0","jest-environment-jsdom":"^29.5.0","@testing-library/jest-dom":"^5.16.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"peerDependencies":{"next":">=14.0.0 <16","react":">=18","react-dom":">=18"},"peerDependenciesMeta":{"next":{"optional":true},"react":{"optional":true},"react-dom":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/onboarding-agent-suite_0.1.3_1790884748466_0.8734771436231474"}}},"time":{"created":"2026-06-23T17:40:06.230Z","modified":"2026-10-01T19:59:11.325Z","0.0.1":"2026-06-23T17:40:06.569Z","0.1.0":"2026-06-23T18:03:56.015Z","0.1.1":"2026-07-14T08:01:42.460Z","0.1.2":"2026-09-30T19:39:37.270Z","0.1.3":"2026-10-01T19:59:08.550Z"},"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","keywords":["onboarding","agent","ai","streaming","chat","suite","bernierllc"],"description":"Drop-in bundle: one-call setup for config-driven conversational onboarding agents with plugin extensibility, streaming chat, goal tracking, and UI components.","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/onboarding-agent-suite\n\nDrop-in bundle for goal-directed conversational onboarding agents. One call wires config, plugins, AI runtime, streaming chat, Next.js route handlers, and UI components into a ready-to-embed system.\n\n## Installation\n\n```bash\nnpm install @bernierllc/onboarding-agent-suite\n```\n\n## Quick Start\n\n```typescript\nimport {\n  createOnboardingAgent,\n  OnboardingConfigBuilder,\n  OnboardingChat,\n} from '@bernierllc/onboarding-agent-suite';\nimport { AnthropicProvider } from '@bernierllc/ai-provider-anthropic';\n\n// 1. Build config\nconst config = new OnboardingConfigBuilder('contractor-onboarding', 'Contractor Onboarding')\n  .setPersona({\n    tone: 'warm-casual',\n    greeting: \"Hey! Let's get {{businessName}} set up.\",\n    askOneAtATime: true,\n  })\n  .addPhase({ id: 'setup', title: 'Getting Started', guidance: 'Ask name and business type.', order: 1 })\n  .addGoal({\n    id: 'business-name',\n    description: 'Business name collected',\n    required: true,\n    phase: 'setup',\n    completionCheck: { type: 'field-present', field: 'businessName' },\n  })\n  .setCompletionCriteria({ requireAllGoals: true })\n  .addHandoff({ id: 'dashboard', type: 'route', label: 'Go to dashboard', order: 1 })\n  .build();\n\n// 2. Create agent (one call)\nconst { agent, mergedConfig, createChatHandler, createStatusHandler } = await createOnboardingAgent(config, {\n  aiProvider: new AnthropicProvider({ apiKey: process.env.ANTHROPIC_API_KEY }),\n  stateReaders: {\n    async readState(sessionId) { return db.getOrgState(sessionId); },\n  },\n  handoffHandlers: {\n    async handle(target, state) {\n      if (target.type === 'route') router.push('/dashboard');\n    },\n  },\n});\n\n// 3. Wire Next.js route handlers\n// app/api/onboarding/chat/route.ts:\nexport const POST = createChatHandler(agent, { auth: myAuthMiddleware });\n\n// app/api/onboarding/status/route.ts:\nexport const GET = createStatusHandler(agent, { auth: myAuthMiddleware });\n\n// 4. Render UI\n// app/onboarding/page.tsx:\n<OnboardingChat\n  chatEndpoint=\"/api/onboarding/chat\"\n  statusEndpoint=\"/api/onboarding/status\"\n  config={config}\n  panelDescriptors={mergedConfig.panels}\n  sessionId={orgId}\n  userId={userId}\n/>\n```\n\n## API Reference\n\n### `createOnboardingAgent(config, options)`\n\nAsync factory that assembles and initialises the full onboarding system.\n\n**Parameters:**\n\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `config` | `OnboardingConfig` | Yes | Base config from `OnboardingConfigBuilder.build()` |\n| `options.aiProvider` | `AIProvider` | Yes | AI provider (Anthropic, OpenAI, Router) |\n| `options.stateReaders` | `StateReaders` | Yes | Reads current session state for goal evaluation |\n| `options.handoffHandlers` | `HandoffHandlers` | Yes | Executes post-completion handoff targets |\n| `options.plugins` | `Array<{plugin, config}>` | No | Plugins to merge onto the base config |\n| `options.storeAdapter` | `ConversationStore` | No | Conversation persistence (default: in-memory) |\n| `options.storage` | `StorageAdapter` | No | File storage for attachment uploads |\n| `options.neverhub` | `boolean` | No | NeverHub intent flag (documented; auto-detected by service) |\n\n**Returns:** `Promise<OnboardingAgentBundle>`\n\n```typescript\ninterface OnboardingAgentBundle {\n  agent: OnboardingAgent;               // initialised agent\n  mergedConfig: MergedConfig;           // config after plugin merge\n  createChatHandler: typeof createOnboardingRouteHandler;\n  createStatusHandler: typeof createStatusRouteHandler;\n  createRatingHandler: typeof createRatingRouteHandler;\n}\n```\n\n**Throws:** `OnboardingSuiteError` (code: `ONBOARDING_SUITE_INIT_ERROR`) when plugin merge or agent initialization fails. Original error available via `.cause`.\n\n### `OnboardingConfigBuilder`\n\nRe-exported from `@bernierllc/onboarding-config-core`. Fluent builder for `OnboardingConfig`.\n\n```typescript\nconst config = new OnboardingConfigBuilder('id', 'Display Name')\n  .setPersona({ tone: 'friendly-expert', greeting: '...', askOneAtATime: true })\n  .addPhase({ id: 'phase-1', title: 'Phase 1', guidance: '...', order: 1 })\n  .addGoal({\n    id: 'goal-1',\n    description: 'Collect info',\n    required: true,\n    phase: 'phase-1',\n    completionCheck: { type: 'field-present', field: 'fieldName' },\n  })\n  .setCompletionCriteria({ requireAllGoals: true })\n  .addHandoff({ id: 'handoff-1', type: 'route', label: 'Redirect', order: 1 })\n  .build();\n```\n\n**Completion check types:** `field-present`, `field-truthy`, `count-gte`, `custom`\n\n### Route Handler Factories\n\nAll three factories are re-exported from `@bernierllc/onboarding-agent-nextjs` for use in Next.js App Router.\n\n```typescript\n// app/api/onboarding/chat/route.ts\nexport const POST = createChatHandler(agent, {\n  auth: async (req) => ({ userId: session.userId, sessionId: session.orgId }),\n});\n\n// app/api/onboarding/status/route.ts\nexport const GET = createStatusHandler(agent, { auth });\n\n// app/api/onboarding/rating/route.ts\nexport const POST = createRatingHandler(agent, { auth });\n```\n\n### UI Components\n\nAll components are tree-shakable re-exports from `@bernierllc/onboarding-chat-ui`.\n\n| Export | Description |\n|--------|-------------|\n| `OnboardingChat` | Main container component (wraps all sub-components) |\n| `ChatPane` | Message list + input area |\n| `SidePanel` | Plugin panel slot container |\n| `ProgressChecklist` | Goal completion checklist |\n| `CompletionCard` | Shown when all required goals are met |\n| `RatingBar` | Thumbs up/down rating |\n| `AttachmentDropzone` | File upload dropzone |\n| `useOnboardingChat` | Core hook for chat state and streaming |\n| `useGoalProgress` | Goal status polling hook |\n| `usePanelRegistry` | Plugin panel registration hook |\n| `useAutoGreeting` | Auto-greeting on session start hook |\n| `OnboardingChatProvider` | Context provider |\n\n## Plugin Author Guide\n\nPlugins extend the onboarding system by contributing additional goals, phases, tools, UI panels, and handoff targets.\n\n### Implementing a Plugin\n\n```typescript\nimport type { OnboardingPlugin, PluginContext } from '@bernierllc/onboarding-agent-suite';\n\nexport const myPlugin: OnboardingPlugin = {\n  id: 'my-plugin',        // stable unique id\n  name: 'My Plugin',\n  version: '1.0.0',\n  configSchema: {\n    type: 'object',\n    properties: {\n      apiKey: { type: 'string' },\n    },\n    required: ['apiKey'],\n  },\n\n  validateConfig(config): asserts config is { apiKey: string } {\n    if (typeof (config as { apiKey?: unknown }).apiKey !== 'string') {\n      throw new Error('apiKey is required');\n    }\n  },\n\n  contributeGoals(ctx: PluginContext) {\n    return [\n      {\n        id: 'my-plugin-goal',\n        description: 'Complete plugin setup',\n        required: true,\n        phase: 'setup',\n        completionCheck: { type: 'field-present', field: 'myPluginDone' },\n      },\n    ];\n  },\n\n  contributePhases(ctx: PluginContext) {\n    return []; // Return additional phases if needed\n  },\n\n  contributeTools(ctx: PluginContext) {\n    return [\n      {\n        name: 'my_plugin_action',\n        description: 'Execute plugin-specific action',\n        parameters: {\n          type: 'object',\n          properties: { payload: { type: 'string' } },\n          required: ['payload'],\n        },\n      },\n    ];\n  },\n\n  contributePanel(ctx: PluginContext) {\n    return {\n      slotId: 'my-plugin-panel',\n      label: 'My Plugin Panel',\n      triggerToolNames: ['my_plugin_action'],\n    };\n  },\n\n  contributeHandoffs(ctx: PluginContext, state: Record<string, unknown>) {\n    return []; // Return conditional handoff targets\n  },\n};\n```\n\n### Registering a Plugin\n\n```typescript\nconst { agent, mergedConfig } = await createOnboardingAgent(config, {\n  aiProvider,\n  stateReaders,\n  handoffHandlers,\n  plugins: [\n    { plugin: myPlugin, config: { apiKey: process.env.PLUGIN_API_KEY } },\n  ],\n});\n\n// mergedConfig.panels contains the panel descriptors for all registered plugins\n// Pass them to OnboardingChat:\n<OnboardingChat\n  panelDescriptors={mergedConfig.panels}\n  panelComponents={{\n    'my-plugin-panel': MyPluginPanelComponent,\n  }}\n/>\n```\n\n## Usage\n\nSee [Quick Start](#quick-start) above for the minimal setup. The pattern is always:\n\n1. Build an `OnboardingConfig` via `OnboardingConfigBuilder`\n2. Call `createOnboardingAgent(config, options)` with your `AIProvider`, `stateReaders`, and `handoffHandlers`\n3. Wire the returned handler factories to Next.js App Router routes\n4. Render the `OnboardingChat` component with the `chatEndpoint` and `statusEndpoint` props\n\n### Integration Documentation\n\n**Logger integration:** `@bernierllc/logger` is used internally by the service and Next.js handler packages for structured logging. All error paths and lifecycle events are logged automatically — no configuration required by consumers. Logger integration is implemented and active throughout the stack.\n\n**NeverHub integration:** NeverHub is auto-detected at service startup. When a NeverHub instance is running, the onboarding service registers itself automatically. The `neverhub` option in `createOnboardingAgent` is an intent flag for documentation purposes — the service handles graceful degradation when NeverHub is unavailable. NeverHub integration supports graceful degradation: the suite initialises and operates fully whether or not NeverHub is present.\n\nIntegration status: logger integration — implemented; neverhub integration — implemented with graceful degradation.\n\n## MECE Architecture Note\n\n**This suite vs `@bernierllc/flow-suite`:**\n\n- **`onboarding-agent-suite`** — Goal-directed LLM conversation: the model chooses the conversational path, phases are prose guidance, goals are evaluated against live state. Use for adaptive, conversational onboarding experiences.\n- **`@bernierllc/flow-suite`** — Deterministic DAG flows: nodes and edges, the system executes a fixed decision tree. Use for structured multi-step automation with predictable paths.\n\nThese suites are **mutually exclusive** in responsibility. This suite only owns the assembly layer — it wires sub-packages together via `createOnboardingAgent()` and re-exports their public APIs. No business logic beyond assembly.\n\n## Error Handling\n\nAll errors are exported from the package for single-import convenience:\n\n```typescript\nimport {\n  OnboardingSuiteError,       // factory-level errors\n  OnboardingAgentError,       // service errors\n  OnboardingAgentInitError,   // agent initialization failures\n  OnboardingHandoffError,     // post-completion handoff failures\n  OnboardingConfigError,      // config validation errors\n  OnboardingPluginError,      // plugin registration errors\n} from '@bernierllc/onboarding-agent-suite';\n\ntry {\n  const bundle = await createOnboardingAgent(config, options);\n} catch (err) {\n  if (err instanceof OnboardingSuiteError) {\n    console.error('Suite init failed:', err.message, err.code);\n    console.error('Root cause:', err.cause);\n  }\n}\n```\n\n## License\n\nCopyright (c) 2025 Bernier LLC. Licensed under a limited-use license — see LICENSE file.\n","readmeFilename":"README.md"}