@nexalink/carecompass-sdk 0.3.0-beta.15 → 0.4.0-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,141 +1,190 @@
1
- # CareCompass Healthcare AI Infrastructure SDK
1
+ # CareCompass SDK
2
2
 
3
- CareCompass helps healthcare teams launch branded healthcare navigation assistants, member support assistants, and patient-facing AI experiences inside their own portals or applications. The SDK combines an embeddable chat experience with Nexalink-hosted healthcare AI infrastructure, reducing the implementation effort required to move from idea to deployable healthcare navigation workflow.
3
+ CareCompass is embeddable healthcare AI infrastructure for teams building AI-powered healthcare products.
4
4
 
5
- The SDK is publicly installable for developer convenience, but live regulated use requires Nexalink onboarding, issued credentials, and BAA coverage where PHI may be involved. CareCompass is designed for healthcare navigation and support workflows. It is not a general-purpose LLM SDK, not a medical diagnosis tool, not autonomous treatment recommendation software, and not a replacement for clinicians or clinical judgment.
5
+ It gives healthcare companies a secure SDK and hosted runtime for adding LLM-powered experiences to their own applications without building the regulated AI stack from scratch: model routing, tenant-aware runtime APIs, browser-safe authentication, prompt controls, guardrails, origin validation, deployment checks, and healthcare-specific onboarding.
6
6
 
7
- ## Who It's For
7
+ CareCompass is for teams that want to ship their own AI product experience while relying on Nexalink to operate the healthcare AI infrastructure layer underneath.
8
8
 
9
- - Healthcare startups building AI-powered patient experiences
10
- - Payer innovation and member engagement teams
11
- - Employer-benefits platforms
12
- - Provider organizations adding patient-facing support workflows
13
- - Digital health engineering teams
14
- - Healthcare product teams that need AI infrastructure quickly
9
+ The SDK gives teams two integration paths:
15
10
 
16
- ## Why Teams Use CareCompass
11
+ - **Headless core** for product teams that want full control over their own UI, workflow, state management, and rendering.
12
+ - **Optional UI kit** for teams that want a fast, branded AI chat experience they can drop into a web app and customize over time.
17
13
 
18
- - **Faster deployment**: add a healthcare-focused AI assistant to an existing healthcare product without months of infrastructure work.
19
- - **Reduced engineering effort**: avoid building and operating the supporting healthcare AI infrastructure around the assistant.
20
- - **Hosted healthcare AI runtime**: chat requests route through Nexalink-hosted APIs and the CareCompass AI runtime.
21
- - **Embedded branded experience**: use the React component, JavaScript mount helper, generated embed page, or iframe with your display name, labels, theme, logo, and support links.
22
- - **Prompt and configuration controls**: define approved prompt context, welcome copy, placement, allowed origins, and deployment environment.
23
- - **Deployment controls**: use key management, origin allowlists, hosted validation, and staging/production credential separation.
24
- - **Enterprise onboarding**: support BAA-gated onboarding where PHI may be involved.
14
+ CareCompass is not a diagnosis tool, autonomous treatment product, replacement for clinicians, or general-purpose LLM SDK. It is healthcare AI infrastructure for building compliance-oriented, embedded AI workflows.
25
15
 
26
- ## Why Not Build It Yourself?
16
+ ## Why Teams Choose CareCompass
27
17
 
28
- Most healthcare teams can access foundation models through OpenAI, Anthropic, Bedrock, Azure OpenAI, or similar providers. The harder work is not obtaining an LLM. The harder work is building and operating the healthcare AI infrastructure around it:
18
+ Healthcare teams can already access foundation models. The hard part is turning those models into production-ready healthcare software.
29
19
 
30
- - Healthcare-focused prompts and guardrails
31
- - Hosted inference infrastructure
32
- - Tenant isolation
33
- - Key management
34
- - Deployment validation
35
- - Browser embedding
36
- - Usage tracking
37
- - Compliance-oriented onboarding
20
+ CareCompass packages the healthcare-specific infrastructure layer that most teams would otherwise need to build themselves:
38
21
 
39
- CareCompass provides a managed healthcare AI infrastructure layer for these workflows, while keeping the embedded experience configurable for your application and brand.
22
+ - secure hosted runtime APIs
23
+ - tenant and environment routing
24
+ - browser-safe embed authentication
25
+ - origin allowlist validation
26
+ - prompt and configuration controls
27
+ - guardrails for regulated workflows
28
+ - deployment readiness checks
29
+ - white-label UI support
30
+ - operational onboarding for healthcare use cases
31
+
32
+ Instead of spending months building LLM infrastructure, product teams can use CareCompass to embed AI into their own application and focus on the workflow, customer experience, and clinical or operational use case they are trying to ship.
33
+
34
+ ## What You Can Build
35
+
36
+ CareCompass can power healthcare AI features inside products such as:
37
+
38
+ - clinical workflow copilots
39
+ - patient engagement assistants
40
+ - care navigation and resource guidance flows
41
+ - benefits or plan guidance experiences
42
+ - RCM and prior authorization support tools
43
+ - onboarding and support flows for digital health products
44
+ - internal operations copilots for healthcare teams
45
+ - white-labeled AI assistants inside existing healthcare applications
46
+
47
+ CareCompass is intentionally workflow-agnostic at the infrastructure layer. The customer owns the product experience; CareCompass provides the SDK, runtime, guardrails, and deployment model needed to make healthcare AI usable in production.
40
48
 
41
49
  ## What You Avoid Building
42
50
 
43
- - Model gateway
44
- - Chat embed
45
- - Prompt validation layer
46
- - Tenant and key management
47
- - Usage tracking
48
- - Hosted inference path
49
- - Staging and production credential separation
50
- - Deployment validation tooling
51
+ CareCompass handles infrastructure that healthcare AI teams usually need before they can safely ship:
52
+
53
+ - Hosted inference gateway
54
+ - Tenant-aware runtime APIs
55
+ - Browser-safe embed authentication model
56
+ - Tenant and environment routing
57
+ - Origin allowlist validation
58
+ - Prompt and configuration validation
59
+ - Guardrail enforcement
60
+ - Streaming and retry lifecycle state
61
+ - Default chat UI and iframe setup assets
62
+ - Deployment readiness tooling
63
+ - Anonymous deployment-health telemetry
51
64
  - Compliance-oriented onboarding workflow
52
65
 
53
- ## What You Can Build
66
+ ## SDK Architecture
54
67
 
55
- - Member support assistants
56
- - Benefits navigation assistants
57
- - Provider discovery support flows
58
- - Employer healthcare navigation portals
59
- - Payer member engagement tools
60
- - Digital health support chat experiences
68
+ ```text
69
+ Your product UI
70
+ |
71
+ | uses either
72
+ |-- CareCompass headless core
73
+ |-- CareCompass UI kit
74
+ |
75
+ CareCompass SDK
76
+ |
77
+ Nexalink-hosted CareCompass APIs
78
+ |
79
+ CareCompass AI runtime
80
+ ```
61
81
 
62
- ## Example Questions CareCompass Can Help With
82
+ The browser receives only public embed configuration: tenant identifier, environment, public embed key, allowed origins, branding, labels, theme, placement, and approved prompt settings.
63
83
 
64
- CareCompass is intended for healthcare navigation and support, not diagnosis or treatment recommendations. Example navigation questions include:
84
+ Secret API keys stay in CLI, server-side, or trusted setup workflows. The browser never receives model credentials or Nexalink API keys.
65
85
 
66
- - "How do I find an in-network cardiologist?"
67
- - "What does my deductible mean?"
68
- - "How do I schedule a specialist appointment?"
69
- - "Where can I find behavioral health resources?"
70
- - "What support resources are available through my plan?"
86
+ ## Integration Options
71
87
 
72
- ## What CareCompass Is Not
88
+ ### 1. Headless Core
73
89
 
74
- - Not a general-purpose LLM SDK
75
- - Not a diagnosis tool
76
- - Not a replacement for clinical judgment
77
- - Not autonomous treatment recommendation software
90
+ Use the headless core when your team already has a product surface and wants CareCompass to own the AI runtime lifecycle, not the UI.
78
91
 
79
- ## Quick Start
92
+ The core manages:
80
93
 
81
- Account creation and credentials are required because CareCompass is healthcare AI infrastructure for regulated deployment workflows, not an unauthenticated demo widget. The CLI requires Node.js 18 or newer.
94
+ - message submission
95
+ - poll-backed streaming lifecycle events
96
+ - conversation snapshots
97
+ - loading, error, timeout, and retry state
98
+ - context injection
99
+ - subscriptions for custom renderers
100
+ - endpoint calls and telemetry integration
82
101
 
83
- ```bash
84
- npx @nexalink/carecompass-sdk init --account-type developer --api-key <nexalink-api-key> --payer-id acme-health --origin https://members.acme-health.com
85
- npx @nexalink/carecompass-sdk validate --config carecompass/carecompass.config.json
86
- npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.json
87
- ```
102
+ ```ts
103
+ import { createCareCompassCore } from "@nexalink/carecompass-sdk/core";
104
+ import config from "./carecompass/carecompass.config.json";
88
105
 
89
- `init` validates your Nexalink API key, stores it locally, and generates:
106
+ const careCompass = createCareCompassCore(config, {
107
+ initialContext: {
108
+ userId: "user_123",
109
+ organizationId: "acme-health",
110
+ },
111
+ });
112
+
113
+ const unsubscribe = careCompass.subscribe((snapshot) => {
114
+ renderMessages(snapshot.messages);
115
+ renderLoading(snapshot.loading);
116
+ renderError(snapshot.error);
117
+ });
118
+
119
+ for await (const event of careCompass.streamMessage(
120
+ "Help me understand the next step in this workflow.",
121
+ { context: { workflow: "patient-onboarding" } },
122
+ )) {
123
+ console.log(event.type);
124
+ }
90
125
 
91
- - `carecompass/carecompass.config.json`
92
- - `carecompass/system-prompt.md`
93
- - `carecompass/carecompass-embed.html`
94
- - `carecompass/carecompass-iframe.html`
95
- - `carecompass/README.md`
126
+ unsubscribe();
127
+ careCompass.dispose();
128
+ ```
96
129
 
97
- `npx` does not install a permanent `carecompass` command. Keep using `npx @nexalink/carecompass-sdk <command>` or install the package.
130
+ The streaming API is lifecycle streaming over the existing CareCompass endpoint flow. It exposes submitted, status, completion, and error events so your UI can respond immediately while the hosted runtime works. It is not token-by-token model streaming.
98
131
 
99
- ## How It Works
132
+ ### 2. Optional React UI Kit
100
133
 
101
- ```text
102
- Your Application
103
- ↓
104
- CareCompass SDK
105
- ↓
106
- Nexalink Hosted APIs
107
- ↓
108
- CareCompass AI Runtime
109
- ```
134
+ Use the UI kit when you want a fast branded AI interface with minimal setup.
110
135
 
111
- Your application renders the CareCompass UI through the SDK. The browser receives only public embed configuration: payer ID, environment, public embed key, branding, labels, theme, support links, approved prompt settings, placement, and telemetry defaults. The browser does not receive the secret API key, private model endpoint details, SageMaker credentials, AppSync signing roles, or Nexalink server-side allowlists.
136
+ ```tsx
137
+ import { CareCompassChat } from "@nexalink/carecompass-sdk/ui";
138
+ import config from "./carecompass/carecompass.config.json";
112
139
 
113
- Chat requests go to Nexalink-hosted CareCompass API routes. Those hosted routes are responsible for authorization, origin validation, tenant isolation, prompt guardrails, rate limiting, request attribution, usage tracking, and routing to the CareCompass AI runtime.
140
+ export function HealthcareAssistant() {
141
+ return (
142
+ <CareCompassChat
143
+ config={config}
144
+ initialContext={{ userId: "user_123" }}
145
+ renderMessage={(message) => (
146
+ <p data-role={message.role}>{message.text}</p>
147
+ )}
148
+ retryLabel="Try again"
149
+ onEvent={(event) => console.log(event.type)}
150
+ />
151
+ );
152
+ }
153
+ ```
114
154
 
115
- ## Account, Credentials, and BAA Requirements
155
+ The UI kit includes:
116
156
 
117
- A Nexalink account with SDK access is required beyond package installation so Nexalink can validate payer identity, deployment environment, allowed origins, approved prompt configuration, credentials, and API usage.
157
+ - branded header, labels, disclaimer, and theme support
158
+ - loading, error, and retry states
159
+ - default assistant markdown rendering for headings, bold text, lists, rules, and tables
160
+ - safe text rendering without raw HTML injection
161
+ - `renderMessage` escape hatch for teams that want complete message-render control
162
+ - compatibility with existing `CareCompassEmbed` and `mountCareCompass` integrations
118
163
 
119
- CareCompass uses two different keys:
164
+ Custom message rendering:
120
165
 
121
- - **API key**: a secret credential for trusted setup and server-side or CLI workflows, including `init` sign-in and validation. Never include it in browser code, generated embed HTML, frontend config, or source control.
122
- - **Embed key**: a public browser-facing identifier for the CareCompass embed. It is safe to include in `carecompass.config.json` and generated snippets. It identifies the payer, environment, and embed client for runtime requests, but it is not a secret or proof of identity on its own.
166
+ ```tsx
167
+ <CareCompassChat
168
+ config={config}
169
+ renderMessage={(message) => (
170
+ <MessageBubble role={message.role}>{message.text}</MessageBubble>
171
+ )}
172
+ />
173
+ ```
123
174
 
124
- API keys are issued in the Nexalink portal. When PHI may be involved, a tenant owner or admin may need to execute the canonical BAA before generating the first key. The secret API key is shown once, stored locally by the developer, and should be handled as a server-side or CLI credential.
175
+ ### 3. Existing Embed Compatibility
125
176
 
126
- ## React Usage
177
+ Existing embed integrations can keep using the root package exports.
127
178
 
128
179
  ```tsx
129
180
  import { CareCompassEmbed } from "@nexalink/carecompass-sdk";
130
181
  import config from "./carecompass/carecompass.config.json";
131
182
 
132
- export function MemberSupport() {
183
+ export function HealthcareAssistant() {
133
184
  return <CareCompassEmbed config={config} />;
134
185
  }
135
186
  ```
136
187
 
137
- ## JavaScript Usage
138
-
139
188
  ```ts
140
189
  import { mountCareCompass } from "@nexalink/carecompass-sdk";
141
190
  import config from "./carecompass/carecompass.config.json";
@@ -143,9 +192,31 @@ import config from "./carecompass/carecompass.config.json";
143
192
  mountCareCompass(document.getElementById("carecompass-root"), config);
144
193
  ```
145
194
 
146
- ## Configuration Reference
195
+ ## Quick Start
196
+
197
+ Live regulated use requires Nexalink onboarding, issued credentials, and BAA coverage where PHI may be involved. The package is publicly installable for developer convenience, but runtime access is credentialed.
198
+
199
+ ```bash
200
+ npx @nexalink/carecompass-sdk init --account-type developer --api-key <nexalink-api-key> --payer-id acme-health --origin https://app.acme-health.com
201
+ npx @nexalink/carecompass-sdk validate --config carecompass/carecompass.config.json
202
+ npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.json
203
+ ```
204
+
205
+ `payerId` is the current tenant identifier used by the SDK. Despite the name, it can represent any healthcare customer workspace, including providers, digital health companies, RCM vendors, care platforms, AI healthcare products, and other healthcare organizations.
206
+
207
+ `init` creates a starter setup kit:
208
+
209
+ - `carecompass/carecompass.config.json`
210
+ - `carecompass/system-prompt.md`
211
+ - `carecompass/carecompass-embed.html`
212
+ - `carecompass/carecompass-iframe.html`
213
+ - `carecompass/README.md`
214
+
215
+ `npx` does not install a permanent `carecompass` command. Keep using `npx @nexalink/carecompass-sdk <command>` or install the package in your project.
147
216
 
148
- `carecompass/carecompass.config.json` is safe to commit when it contains only public embed configuration. Store the secret API key only in local CLI credentials or an approved server-side secret store.
217
+ ## Public Configuration
218
+
219
+ `carecompass.config.json` is safe to commit when it contains only public embed configuration. Do not put the secret API key in browser code, generated HTML, frontend config, or source control.
149
220
 
150
221
  ```json
151
222
  {
@@ -153,11 +224,11 @@ mountCareCompass(document.getElementById("carecompass-root"), config);
153
224
  "environment": "staging",
154
225
  "apiBaseUrl": "https://www.nexalink.care",
155
226
  "embedKey": "embed_public_key_from_nexalink",
156
- "allowedOrigins": ["https://members.acme-health.com"],
227
+ "allowedOrigins": ["https://app.acme-health.com"],
157
228
  "branding": {
158
229
  "displayName": "Acme Health",
159
- "logoUrl": "https://members.acme-health.com/logo.svg",
160
- "supportUrl": "https://members.acme-health.com/support"
230
+ "logoUrl": "https://app.acme-health.com/logo.svg",
231
+ "supportUrl": "https://app.acme-health.com/support"
161
232
  },
162
233
  "theme": {
163
234
  "primaryColor": "#2563eb",
@@ -167,15 +238,15 @@ mountCareCompass(document.getElementById("carecompass-root"), config);
167
238
  "fontFamily": "system-ui, sans-serif"
168
239
  },
169
240
  "labels": {
170
- "title": "Acme Care Guide",
171
- "placeholder": "Ask about benefits, care options, or next steps...",
241
+ "title": "Acme AI Assistant",
242
+ "placeholder": "Ask about this workflow...",
172
243
  "sendButton": "Send",
173
- "disclaimer": "CareCompass provides navigation support, not medical advice.",
244
+ "disclaimer": "This assistant provides support, not medical advice.",
174
245
  "errorMessage": "CareCompass is unavailable right now."
175
246
  },
176
247
  "prompt": {
177
248
  "systemInstructionFile": "./system-prompt.md",
178
- "welcomeMessage": "How can I help you navigate your care today?",
249
+ "welcomeMessage": "How can I help?",
179
250
  "allowUserContext": false
180
251
  },
181
252
  "placement": {
@@ -185,39 +256,34 @@ mountCareCompass(document.getElementById("carecompass-root"), config);
185
256
  }
186
257
  ```
187
258
 
188
- `carecompass/system-prompt.md` defines approved context before a member message reaches the AI runtime: plan terminology, support boundaries, escalation rules, and navigation context. The CLI resolves the prompt file into `carecompass/carecompass-embed.html`; the browser receives prompt text, not a local file path. Nexalink guardrails still validate prompt content.
259
+ ## Credential Model
189
260
 
190
- `carecompass/carecompass-iframe.html` contains the iframe to place on the integrating page:
261
+ CareCompass uses two key types:
191
262
 
192
- ```html
193
- <iframe
194
- title="Acme Health CareCompass"
195
- src="/carecompass/carecompass-embed.html"
196
- style="width: 100%; min-height: 640px; border: 0; border-radius: 8px;"
197
- loading="lazy"
198
- ></iframe>
199
- ```
263
+ - **API key**: secret credential for trusted setup, CLI validation, and server-side workflows. Never expose it in browser code.
264
+ - **Embed key**: public browser-facing identifier used by the runtime embed. It identifies the tenant, environment, and embed client, but it is not a secret by itself.
200
265
 
201
- Serve `carecompass/carecompass-embed.html` at the iframe `src`, often by copying the generated `carecompass` folder into public/static assets.
266
+ Nexalink-hosted routes remain responsible for authorization, origin validation, tenant isolation, prompt guardrails, rate limiting, request attribution, usage tracking, and routing to the CareCompass runtime.
202
267
 
203
268
  ## CLI Reference
204
269
 
205
270
  ### `init`
206
271
 
207
- Runs first-time setup: routes users to signup, validates the API key, stores it locally, and generates the config, prompt starter, embed page, iframe, and setup guide with only public embed configuration.
272
+ Creates the local setup kit, validates credentials, stores the API key locally, and generates starter config and embed assets.
208
273
 
209
- Credentials are stored at `~/.nexalink/carecompass/credentials.json` by default. You can also set `CARECOMPASS_API_KEY`. For scripted setup, pass `--account-type developer`. Configure signup with `--developer-signup-url` or `CARECOMPASS_DEVELOPER_SIGNUP_URL`; default: `https://www.nexalink.care/developer/signup`.
274
+ ```bash
275
+ npx @nexalink/carecompass-sdk init --account-type developer --api-key <nexalink-api-key> --payer-id acme-health --origin https://app.acme-health.com
276
+ ```
210
277
 
211
- Generated HTML defaults to bundler-friendly imports from `@nexalink/carecompass-sdk`. For a raw browser HTML demo that is not processed by a bundler, add `--snippet-mode cdn`.
278
+ For raw browser HTML that is not processed by a bundler:
212
279
 
213
280
  ```bash
214
- npx @nexalink/carecompass-sdk init --account-type developer --api-key <nexalink-api-key> --payer-id acme-health --origin https://members.acme-health.com
215
- npx @nexalink/carecompass-sdk init --account-type developer --snippet-mode cdn --payer-id acme-health --origin https://members.acme-health.com
281
+ npx @nexalink/carecompass-sdk init --account-type developer --snippet-mode cdn --payer-id acme-health --origin https://app.acme-health.com
216
282
  ```
217
283
 
218
284
  ### `validate`
219
285
 
220
- Checks local config shape and credentials, then hosted validation for `apiBaseUrl`, `embedKey`, `payerId`, `environment`, and `allowedOrigins` unless `--local-only` is passed. Browser-side validation uses public embed headers and does not send the secret API key.
286
+ Checks local config shape and hosted runtime configuration.
221
287
 
222
288
  ```bash
223
289
  npx @nexalink/carecompass-sdk validate --config carecompass/carecompass.config.json
@@ -226,7 +292,7 @@ npx @nexalink/carecompass-sdk validate --local-only --config carecompass/carecom
226
292
 
227
293
  ### `snippet`
228
294
 
229
- Regenerates the HTML embed snippet after config, branding, origin, or prompt changes. `init` already runs this once.
295
+ Regenerates embed HTML after config, branding, origin, or prompt changes.
230
296
 
231
297
  ```bash
232
298
  npx @nexalink/carecompass-sdk snippet --config carecompass/carecompass.config.json
@@ -235,36 +301,42 @@ npx @nexalink/carecompass-sdk snippet --snippet-mode cdn --config carecompass/ca
235
301
 
236
302
  ### `doctor`
237
303
 
238
- Prints a deployment readiness summary for the selected config.
304
+ Prints a deployment readiness summary.
239
305
 
240
306
  ```bash
241
307
  npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.json
242
308
  ```
243
309
 
244
- ## Security and Compliance Model
310
+ ## Security And Compliance Positioning
245
311
 
246
- CareCompass is BAA-gated where PHI may be involved and HIPAA-oriented for regulated healthcare deployment workflows, but this README does not claim blanket HIPAA compliance for every implementation or deployment.
312
+ CareCompass is BAA-gated where PHI may be involved and built for regulated healthcare workflows, but this README does not claim blanket HIPAA compliance for every implementation or deployment.
247
313
 
248
- The SDK keeps secret keys out of the browser. Browser code receives public embed configuration only. Staging and production `apiBaseUrl` values must be Nexalink-hosted HTTPS URLs; `localhost` is accepted only for `development`.
314
+ The SDK is designed to keep sensitive operational details out of the browser:
249
315
 
250
- Nexalink-hosted API routes are responsible for authorization, origin allowlists, tenant isolation, prompt guardrails, rate limiting, request attribution, and usage tracking. Generated snippets escape serialized config, and React renders chat messages and labels as text.
316
+ - no secret API keys in frontend config
317
+ - no model endpoint credentials in browser code
318
+ - no customer-managed telemetry switches in runtime config
319
+ - no prompt, response, chat history, user context, PHI/PII, credentials, raw errors, stack traces, CLI arguments, terminal input, or file paths in SDK telemetry
320
+ - generated snippets escape serialized config
321
+ - default React rendering escapes raw HTML
251
322
 
252
- Telemetry is enabled automatically with Nexalink-managed defaults. The SDK sends only allowlisted anonymous deployment-health events to PostHog's public ingestion API. It does not bundle `posthog-js`, enable session replay or autocapture, identify users, set cookies, or persist analytics state. Prompts, responses, chat history, user context, PHI/PII, credentials, raw errors, stack traces, CLI arguments, terminal input, and file paths are excluded from telemetry.
323
+ Telemetry is enabled with Nexalink-managed defaults and sends only allowlisted anonymous deployment-health events.
253
324
 
254
325
  ## Runtime Notes
255
326
 
256
- Some development and MVP environments may use scale-to-zero infrastructure, which can add cold-start latency to the first request after an idle period. The request still routes through Nexalink-hosted APIs; the browser embed does not receive infrastructure credentials or call the model endpoint directly.
327
+ Some development and MVP environments may use scale-to-zero infrastructure, which can add cold-start latency to the first request after an idle period.
328
+
329
+ Requests still route through Nexalink-hosted APIs. The browser embed does not receive infrastructure credentials or call model endpoints directly.
257
330
 
258
331
  ## Troubleshooting
259
332
 
260
333
  - `Missing Nexalink API key`: run `init`, choose Developer, and sign in. For scripts, pass `--account-type developer` with `--api-key <key>`, or set `CARECOMPASS_API_KEY` with `CARECOMPASS_ACCOUNT_TYPE=developer`.
261
334
  - `zsh: command not found: carecompass`: `npx` does not install a permanent command. Run `npx @nexalink/carecompass-sdk <command>` or install the package.
262
- - `@parcel/core: Failed to resolve 'https://esm.sh/...'`: regenerate with bundler mode: `npx @nexalink/carecompass-sdk snippet --config carecompass/carecompass.config.json`. CDN mode is for raw browser HTML.
263
- - `CareCompass could not reach http://localhost:3000`: hosted sandboxes cannot reach your machine's `localhost`. Test locally or use a deployed Nexalink `apiBaseUrl`. Run `validate` before typing into the embed.
264
- - `Origin is not authorized`: add the exact website origin to the Nexalink portal SDK configuration.
335
+ - `@parcel/core: Failed to resolve 'https://esm.sh/...'`: regenerate with bundler mode. CDN mode is for raw browser HTML.
336
+ - `CareCompass could not reach http://localhost:3000`: hosted sandboxes cannot reach your machine's `localhost`. Test locally or use a deployed Nexalink `apiBaseUrl`.
337
+ - `Origin is not authorized`: add the exact website origin to the Nexalink SDK configuration.
265
338
  - `Prompt configuration violates CareCompass guardrails`: remove unsafe or unsupported instructions and re-run validation.
266
- - `CareCompass embed client is not authorized`: confirm `payerId`, `embedKey`, `environment`, and allowed origins match the key issued in the Nexalink portal.
267
- - `CareCompass AppSync inference service is not configured`: Nexalink server operators should confirm `NEXT_PUBLIC_API_URL` or `CARECOMPASS_APPSYNC_URL`. The embed does not require a payer-provided LLM URL.
339
+ - `CareCompass embed client is not authorized`: confirm `payerId`, `embedKey`, `environment`, and allowed origins match the key issued for the deployment.
268
340
 
269
341
  ## License
270
342