@sequoiaport/codes 0.1.0-beta.1 → 0.1.0-beta.3

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/AGENT_PROMPT.md CHANGED
@@ -4,7 +4,7 @@ You now have access to the SequoiaCodex medical coding API. Use it to search and
4
4
 
5
5
  ## CRITICAL: Take things one step at a time
6
6
 
7
- Do NOT try to do everything at once. Complete **Setup** fully before moving on to **Usage**.
7
+ Do NOT try to do everything at once. Complete each step in **Setup** fully before moving on to the next.
8
8
 
9
9
  ## Domain Guide — READ THIS CAREFULLY
10
10
 
@@ -17,13 +17,11 @@ There are TWO different domains. Using the wrong one will fail.
17
17
 
18
18
  # Setup
19
19
 
20
- Complete both steps below before making any API queries.
20
+ Complete all steps below in order before making any API queries.
21
21
 
22
22
  ## Step 1: Get an API key
23
23
 
24
- **Before doing anything else**, check if the `SEQUOIA_CODES_API_KEY` environment variable is already set. If it is, you already have a key — skip the rest of this step and go directly to Step 2.
25
-
26
- **Only if no key is found**, ask the user:
24
+ **Before doing anything else**, ask the user:
27
25
 
28
26
  > "Do you already have a SequoiaCodex API key, or would you like me to generate one for you?"
29
27
 
@@ -85,91 +83,59 @@ When status is `"completed"`, the response includes the API key:
85
83
 
86
84
  **Store this key securely — it is only returned once.** The session expires after 10 minutes.
87
85
 
88
- ## Step 2: Read the documentation
86
+ Display the full key to the user in this format:
89
87
 
90
- Now that you have a key, read the docs at https://github.com/Sequoia-Port/codes to understand the available endpoints, parameters, and response formats. Do NOT guess at endpoints or parameters — always consult the docs first.
88
+ ```
89
+ SEQUOIA_CODES_API_KEY=sk_live_seq_abc123... (show the whole key)
90
+ ```
91
91
 
92
- **Once you have reviewed the docs, you are ready to move on to Usage.**
92
+ Show the **complete key** this is the only time it will ever be returned, so the user must be able to copy it.
93
93
 
94
- ---
94
+ ## Step 2: Determine your environment
95
95
 
96
- # Usage
96
+ After you have the API key, figure out what kind of environment you are running in. This determines how you integrate.
97
97
 
98
- You must have an API key and have read the documentation before proceeding.
98
+ ### Option A: You are in a user's codebase
99
99
 
100
- ## Making API requests
100
+ You can tell if you're in a codebase if there is a `package.json`, project files, a git repo, etc.
101
101
 
102
- Use **api.sequoiacodes.com** for ALL data queries. Run queries using `curl` via a shell/bash tool.
102
+ Ask the user:
103
103
 
104
- ```
105
- Base URL: https://api.sequoiacodes.com
106
- Auth header: Authorization: Bearer {api_key}
107
- Method: GET for all endpoints
108
- URL pattern: /v1/{system}/{action}?{params}
109
- ```
104
+ > "Would you like me to set up the SequoiaCodex SDK in your project? I'll install the package and configure it with your API key."
110
105
 
111
- ### Available Endpoints
112
-
113
- | System | Action | Params |
114
- |----------|---------------------------|------------------------------------|
115
- | icd10 | searchCode | query, limit?, billingOnly? |
116
- | icd10 | identifyCode | code |
117
- | icd10 | getChapters | (none) |
118
- | cpt | searchCode | query, limit? |
119
- | cpt | identifyCode | code |
120
- | cpt | getCost | code |
121
- | cpt | linkIcd10 | code |
122
- | hcpcs | searchCode | query, limit? |
123
- | hcpcs | identifyCode | code |
124
- | hcpcs | getCost | code |
125
- | snomed | searchCode | query, limit? |
126
- | snomed | identifyCode | code |
127
- | rxnorm | searchCode | query, limit? |
128
- | rxnorm | identifyCode | type (ndc or rxcui), code |
129
- | rxnorm | getIngredients | rxcui |
130
- | loinc | searchCode | query, limit? |
131
- | loinc | identifyCode | code |
132
- | loinc | getPanelMembers | code |
133
- | lcd | searchGuidelines | query, limit? |
134
- | lcd | identifyGuideline | id |
135
- | ncd | searchGuidelines | query, limit? |
136
- | ncd | identifyGuideline | id?, section? |
137
- | clinical | checkCoverage | (see /v1/clinical/getMetadata) |
138
- | clinical | getProceduresForDiagnosis | (see /v1/clinical/getMetadata) |
139
- | clinical | getMetadata | (none) |
140
-
141
- All search endpoints accept `query` (string) and optional `limit` (1–200).
142
- Use `searchCode` to find codes by description. Use `identifyCode` to look up a specific code.
143
-
144
- ### Example
106
+ - **If they agree**: Run `npm install @sequoiaport/codes` (or the appropriate package manager), then add `SEQUOIA_CODES_API_KEY` to the project's `.env` or `.env.local` file. Then proceed to Step 3.
107
+ - **If they decline**: Keep the key in memory for the current session and proceed to Step 3.
145
108
 
146
- ```bash
147
- curl -s "https://api.sequoiacodes.com/v1/icd10/searchCode?query=hypertension" \
148
- -H "Authorization: Bearer sk_live_seq_..."
149
- ```
109
+ ### Option B: You are an agent in your own sandbox/environment
150
110
 
151
- ```json
152
- {
153
- "success": true,
154
- "data": {
155
- "query": "hypertension",
156
- "count": 3,
157
- "results": [
158
- {
159
- "code": "I10",
160
- "short_description": "Essential (primary) hypertension",
161
- "long_description": "Essential (primary) hypertension",
162
- "is_billable": true,
163
- "chapter": "IX",
164
- "similarity": 0.98
165
- }
166
- ]
167
- },
168
- "version": "v1"
169
- }
170
- ```
111
+ You are in a standalone agent environment (no user codebase — e.g., a chat agent, Claude Desktop, an AI sandbox).
112
+
113
+ Ask the user:
114
+
115
+ > "Would you like me to install SequoiaCodex as a skill so I can query medical codes natively? This will give me direct access to all code search and lookup tools."
116
+
117
+ - **If they agree**:
118
+ 1. Run `npx skills add sequoia-port/codes` to download the skills and MCP server configuration.
119
+ 2. Read the downloaded skill files for MCP setup instructions.
120
+ 3. Configure the MCP server with the API key so you have native tool access.
121
+ 4. Once the MCP server is running, you now have direct tool access — proceed to Step 3.
122
+ - **If they decline**: Keep the key in memory for the current session and proceed to Step 3.
123
+
124
+ ### Option C: Neither — no shell access or isolated environment
125
+
126
+ If you cannot run commands or determine your environment, simply show the user the API key and tell them:
127
+
128
+ > "Here's your API key. You can use it to query the SequoiaCodex API directly. See the documentation for endpoint details."
129
+
130
+ Then proceed to Step 3.
131
+
132
+ ## Step 3: Read the documentation
133
+
134
+ For full endpoint details, parameter descriptions, response schemas, and usage examples, refer to the GitHub README:
135
+
136
+ **https://github.com/Sequoia-Port/codes**
171
137
 
172
- Responses follow a consistent `{ success, data, version }` envelope.
138
+ Do NOT guess at endpoints or parameters always consult the docs first.
173
139
 
174
140
  ---
175
141
 
package/README.md CHANGED
@@ -231,15 +231,15 @@ This SDK includes agent skills compatible with the [Vercel Agent Skills](https:/
231
231
 
232
232
  ```bash
233
233
  # Install all skills from this repo
234
- npx skills add @sequoiaport/codes
234
+ npx skills add sequoia-port/codes
235
235
 
236
236
  # Or install individual skills
237
- npx skills add @sequoiaport/codes/icd10-codes
238
- npx skills add @sequoiaport/codes/cpt-codes
239
- npx skills add @sequoiaport/codes/snomed-codes
240
- npx skills add @sequoiaport/codes/hcpcs-codes
241
- npx skills add @sequoiaport/codes/loinc-codes
242
- npx skills add @sequoiaport/codes/rxnorm-codes
237
+ npx skills add sequoia-port/codes/icd10-codes
238
+ npx skills add sequoia-port/codes/cpt-codes
239
+ npx skills add sequoia-port/codes/snomed-codes
240
+ npx skills add sequoia-port/codes/hcpcs-codes
241
+ npx skills add sequoia-port/codes/loinc-codes
242
+ npx skills add sequoia-port/codes/rxnorm-codes
243
243
  ```
244
244
 
245
245
  ### Available Skills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sequoiaport/codes",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "description": "Retrieve ICD-10, CPT, SNOMED, and more medical codes via the Sequoia Codes API.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -29,6 +29,14 @@
29
29
  "api",
30
30
  "sdk"
31
31
  ],
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/Sequoia-Port/codes.git"
35
+ },
36
+ "homepage": "https://github.com/Sequoia-Port/codes",
37
+ "bugs": {
38
+ "url": "https://github.com/Sequoia-Port/codes/issues"
39
+ },
32
40
  "author": "wconvery",
33
41
  "license": "MIT",
34
42
  "publishConfig": {