@nexalink/carecompass-sdk 0.2.0-beta.14 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +137 -94
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,29 +1,84 @@
1
- # CareCompass Healthcare SDK
1
+ # CareCompass Healthcare AI Infrastructure SDK
2
2
 
3
- CareCompass is a healthcare navigation AI for healthcare apps and portals. The SDK gives payers, providers, employers, and healthcare technology teams a branded member-facing chat experience backed by Nexalink-hosted AI infrastructure.
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.
4
4
 
5
- CareCompass is not a general-purpose LLM SDK, medical diagnosis tool, replacement for clinical decision making, or system for autonomous treatment recommendations.
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.
6
+
7
+ ## Who It's For
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
15
+
16
+ ## Why Teams Use CareCompass
17
+
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.
25
+
26
+ ## Why Not Build It Yourself?
27
+
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:
29
+
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
38
+
39
+ CareCompass provides a managed healthcare AI infrastructure layer for these workflows, while keeping the embedded experience configurable for your application and brand.
40
+
41
+ ## What You Avoid Building
42
+
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
+ - Compliance-oriented onboarding workflow
6
52
 
7
53
  ## What You Can Build
8
54
 
9
- - Member navigation assistants
10
- - Benefits guidance tools
11
- - Provider discovery experiences
12
- - Healthcare support chat interfaces
55
+ - Member support assistants
56
+ - Benefits navigation assistants
57
+ - Provider discovery support flows
13
58
  - Employer healthcare navigation portals
14
59
  - Payer member engagement tools
60
+ - Digital health support chat experiences
61
+
62
+ ## Example Questions CareCompass Can Help With
63
+
64
+ CareCompass is intended for healthcare navigation and support, not diagnosis or treatment recommendations. Example navigation questions include:
15
65
 
16
- ## Why CareCompass
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?"
17
71
 
18
- - **Healthcare-focused experience**: prompts, labels, guardrails, and defaults are oriented around healthcare navigation.
19
- - **Hosted AI infrastructure**: chat requests go through Nexalink-hosted APIs and the Nexalink-managed AI runtime.
20
- - **Branding and customization**: configure display name, logo, support links, theme, labels, placement, and approved prompt context.
21
- - **Usage tracking**: Nexalink tracks usage under issued keys for deployment monitoring and future metered billing.
22
- - **Enterprise deployment support**: use separate staging/production keys, origin allowlists, validation, BAA-gated onboarding where PHI may be involved, and security controls.
72
+ ## What CareCompass Is Not
73
+
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
23
78
 
24
79
  ## Quick Start
25
80
 
26
- The package is publicly installable for developer convenience. Live regulated use requires Nexalink onboarding, BAA coverage where PHI may be involved, and Nexalink-issued credentials.
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.
27
82
 
28
83
  ```bash
29
84
  npx @nexalink/carecompass-sdk init --account-type developer --api-key <nexalink-api-key> --payer-id acme-health --origin https://members.acme-health.com
@@ -39,7 +94,7 @@ npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.jso
39
94
  - `carecompass/carecompass-iframe.html`
40
95
  - `carecompass/README.md`
41
96
 
42
- `npx` does not install a permanent `carecompass` command. Keep using `npx @nexalink/carecompass-sdk <command>` or install the package. The CLI requires Node.js 18 or newer.
97
+ `npx` does not install a permanent `carecompass` command. Keep using `npx @nexalink/carecompass-sdk <command>` or install the package.
43
98
 
44
99
  ## How It Works
45
100
 
@@ -53,19 +108,22 @@ Nexalink Hosted APIs
53
108
  CareCompass AI Runtime
54
109
  ```
55
110
 
56
- Your application renders the React component, JavaScript mount helper, generated embed page, or iframe. The browser receives only public embed configuration: payer ID, environment, public embed key, branding, labels, theme, support links, approved prompt settings, and telemetry defaults. Chat goes to Nexalink-hosted CareCompass API routes.
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.
112
+
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.
114
+
115
+ ## Account, Credentials, and BAA Requirements
57
116
 
58
- ## Account Requirements
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.
59
118
 
60
- A Nexalink account with SDK access is required beyond package installation so Nexalink can validate payer identity, environment, secret API key, public embed key, allowed origins, approved prompt configuration, and API usage. API keys are issued in the Nexalink portal. When PHI may be involved, a tenant owner or admin executes the canonical BAA before generating the first key. The secret API key is shown once, stored locally, and must never be committed or placed in browser code.
119
+ CareCompass uses two different keys:
61
120
 
62
- ## Common Use Cases
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.
63
123
 
64
- - Payers: branded member assistants for benefits, coverage navigation, support resources, and next steps.
65
- - Employers: healthcare navigation portals that route employees to plan resources and approved support channels.
66
- - Providers and digital health companies: support chat with model access, validation, and usage tracking behind Nexalink-hosted APIs.
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.
67
125
 
68
- ## React Example
126
+ ## React Usage
69
127
 
70
128
  ```tsx
71
129
  import { CareCompassEmbed } from "@nexalink/carecompass-sdk";
@@ -76,7 +134,7 @@ export function MemberSupport() {
76
134
  }
77
135
  ```
78
136
 
79
- ## JavaScript Example
137
+ ## JavaScript Usage
80
138
 
81
139
  ```ts
82
140
  import { mountCareCompass } from "@nexalink/carecompass-sdk";
@@ -85,76 +143,6 @@ import config from "./carecompass/carecompass.config.json";
85
143
  mountCareCompass(document.getElementById("carecompass-root"), config);
86
144
  ```
87
145
 
88
- ## Enterprise Features
89
-
90
- CareCompass uses separate credentials for trusted setup and browser runtime:
91
-
92
- - **API key**: a secret credential for trusted setup and server-side/CLI workflows, including `init` sign-in and validation. Never include it in browser code, generated embed HTML, frontend config, or source control.
93
- - **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.
94
-
95
- Enterprise concepts include API keys, embed keys, origin allowlists, BAA requirements where PHI may be involved, usage tracking, future Stripe metered billing support, hosted validation, prompt guardrails, rate limiting, request attribution, tenant isolation, and staging/production separation. Enterprise signup and BAA execution happen in the Nexalink web app before API key creation.
96
-
97
- Use separate keys and config files for staging and production:
98
-
99
- ```bash
100
- npx @nexalink/carecompass-sdk validate --config carecompass.staging.json
101
- npx @nexalink/carecompass-sdk snippet --config carecompass.staging.json --output carecompass/staging-embed.html
102
- npx @nexalink/carecompass-sdk doctor --config carecompass.staging.json
103
- ```
104
-
105
- Before production, confirm the exact origin allowlist, a production-specific `embedKey`, approved Nexalink-hosted `apiBaseUrl`, support links, prompt instructions, and no secret API key in generated source code.
106
-
107
- ## Security & Compliance
108
-
109
- CareCompass keeps secret SDK API keys out of the browser. The browser uses public `embedKey`, payer ID, environment, and allowed origin metadata to call Nexalink-hosted embed API routes. Staging and production `apiBaseUrl` values must be Nexalink-hosted HTTPS URLs; `localhost` is accepted only for `development`.
110
-
111
- The browser does not receive SageMaker credentials, AppSync signing roles, private model endpoint details, Nexalink server-side allowlists, or the secret SDK API key. Generated snippets escape serialized config, and React renders chat messages and labels as text.
112
-
113
- 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.
114
-
115
- Some MVP and development model endpoints may use scale-to-zero capacity; first request after an idle period can take several minutes while the endpoint warms through Nexalink-hosted APIs.
116
-
117
- ## CLI Reference
118
-
119
- ### `init`
120
-
121
- 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.
122
-
123
- 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`.
124
-
125
- 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`.
126
-
127
- ```bash
128
- npx @nexalink/carecompass-sdk init --account-type developer --api-key <nexalink-api-key> --payer-id acme-health --origin https://members.acme-health.com
129
- npx @nexalink/carecompass-sdk init --account-type developer --snippet-mode cdn --payer-id acme-health --origin https://members.acme-health.com
130
- ```
131
-
132
- ### `validate`
133
-
134
- 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.
135
-
136
- ```bash
137
- npx @nexalink/carecompass-sdk validate --config carecompass/carecompass.config.json
138
- npx @nexalink/carecompass-sdk validate --local-only --config carecompass/carecompass.config.json
139
- ```
140
-
141
- ### `snippet`
142
-
143
- Regenerates the HTML embed snippet after config, branding, origin, or prompt changes. `init` already runs this once.
144
-
145
- ```bash
146
- npx @nexalink/carecompass-sdk snippet --config carecompass/carecompass.config.json
147
- npx @nexalink/carecompass-sdk snippet --snippet-mode cdn --config carecompass/carecompass.config.json
148
- ```
149
-
150
- ### `doctor`
151
-
152
- Prints a deployment readiness summary for the selected config.
153
-
154
- ```bash
155
- npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.json
156
- ```
157
-
158
146
  ## Configuration Reference
159
147
 
160
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.
@@ -212,6 +200,61 @@ npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.jso
212
200
 
213
201
  Serve `carecompass/carecompass-embed.html` at the iframe `src`, often by copying the generated `carecompass` folder into public/static assets.
214
202
 
203
+ ## CLI Reference
204
+
205
+ ### `init`
206
+
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.
208
+
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`.
210
+
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`.
212
+
213
+ ```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
216
+ ```
217
+
218
+ ### `validate`
219
+
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.
221
+
222
+ ```bash
223
+ npx @nexalink/carecompass-sdk validate --config carecompass/carecompass.config.json
224
+ npx @nexalink/carecompass-sdk validate --local-only --config carecompass/carecompass.config.json
225
+ ```
226
+
227
+ ### `snippet`
228
+
229
+ Regenerates the HTML embed snippet after config, branding, origin, or prompt changes. `init` already runs this once.
230
+
231
+ ```bash
232
+ npx @nexalink/carecompass-sdk snippet --config carecompass/carecompass.config.json
233
+ npx @nexalink/carecompass-sdk snippet --snippet-mode cdn --config carecompass/carecompass.config.json
234
+ ```
235
+
236
+ ### `doctor`
237
+
238
+ Prints a deployment readiness summary for the selected config.
239
+
240
+ ```bash
241
+ npx @nexalink/carecompass-sdk doctor --config carecompass/carecompass.config.json
242
+ ```
243
+
244
+ ## Security and Compliance Model
245
+
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.
247
+
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`.
249
+
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.
251
+
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.
253
+
254
+ ## Runtime Notes
255
+
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.
257
+
215
258
  ## Troubleshooting
216
259
 
217
260
  - `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`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexalink/carecompass-sdk",
3
- "version": "0.2.0-beta.14",
3
+ "version": "0.2.0-beta.15",
4
4
  "description": "Embeddable CareCompass SDK and CLI for healthcare ecosystem integrations with Nexalink onboarding, BAA coverage, and API keys.",
5
5
  "type": "module",
6
6
  "packageManager": "bun@1.3.9",