orbitchat 3.1.0 → 3.1.2

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 (60) hide show
  1. package/README.md +82 -215
  2. package/bin/orbitchat.js +292 -655
  3. package/dist/assets/{ChartRenderer-BEwTOgnq.js → ChartRenderer-C6fHQxUM.js} +1 -1
  4. package/dist/assets/{MermaidRenderer-Cwj5RQ3g.js → MermaidRenderer-uOsrV112.js} +5 -5
  5. package/dist/assets/{MusicRenderer-jiCOczly.js → MusicRenderer-C-8fXPzl.js} +2 -2
  6. package/dist/assets/{SVGRenderer-B7MdKpL3.js → SVGRenderer-7yLFncSt.js} +1 -1
  7. package/dist/assets/{_basePickBy-CYc6FJVo.js → _basePickBy-BaAS07_g.js} +1 -1
  8. package/dist/assets/{_baseUniq-Db9U29CG.js → _baseUniq-C0rd4rnF.js} +1 -1
  9. package/dist/assets/{architectureDiagram-VXUJARFQ-ByDEpAtB.js → architectureDiagram-VXUJARFQ-DB0b91Sa.js} +1 -1
  10. package/dist/assets/{blockDiagram-VD42YOAC-DeU2cMg9.js → blockDiagram-VD42YOAC-BQ4Z_gCK.js} +1 -1
  11. package/dist/assets/{c4Diagram-YG6GDRKO-C9ykT6JL.js → c4Diagram-YG6GDRKO-Dtix_O1L.js} +1 -1
  12. package/dist/assets/channel-CuLY6R17.js +1 -0
  13. package/dist/assets/{chunk-4BX2VUAB-DSGrQP0T.js → chunk-4BX2VUAB-BMK9KFRb.js} +1 -1
  14. package/dist/assets/{chunk-55IACEB6-BqJf9Ja5.js → chunk-55IACEB6-DireVK0h.js} +1 -1
  15. package/dist/assets/{chunk-B4BG7PRW-CjLmShZ1.js → chunk-B4BG7PRW-BRwwDrXp.js} +1 -1
  16. package/dist/assets/{chunk-DI55MBZ5-DpYiJhBX.js → chunk-DI55MBZ5-DeD4e72t.js} +1 -1
  17. package/dist/assets/{chunk-FMBD7UC4-B_-ci5rY.js → chunk-FMBD7UC4-D1-BcrE_.js} +1 -1
  18. package/dist/assets/{chunk-QN33PNHL-PupYKHzM.js → chunk-QN33PNHL-5dHN5THo.js} +1 -1
  19. package/dist/assets/{chunk-QZHKN3VN-Ddt7KdjH.js → chunk-QZHKN3VN-BFj7kkUd.js} +1 -1
  20. package/dist/assets/{chunk-TZMSLE5B-DFxHvBUh.js → chunk-TZMSLE5B-B5JCOX6Y.js} +1 -1
  21. package/dist/assets/classDiagram-2ON5EDUG-CCd0SByT.js +1 -0
  22. package/dist/assets/classDiagram-v2-WZHVMYZB-CCd0SByT.js +1 -0
  23. package/dist/assets/clone-DRrrmN93.js +1 -0
  24. package/dist/assets/{cose-bilkent-S5V4N54A-CoAwh2dl.js → cose-bilkent-S5V4N54A-CmgTSX_t.js} +1 -1
  25. package/dist/assets/{dagre-6UL2VRFP-wqnQLI1r.js → dagre-6UL2VRFP-C3rzyEFR.js} +1 -1
  26. package/dist/assets/{diagram-PSM6KHXK-BThDYp3k.js → diagram-PSM6KHXK-CyHeoxQN.js} +1 -1
  27. package/dist/assets/{diagram-QEK2KX5R-QO0jbKYo.js → diagram-QEK2KX5R-2gCRyxH5.js} +1 -1
  28. package/dist/assets/{diagram-S2PKOQOG-DqXZQ_2w.js → diagram-S2PKOQOG-BV4hBni4.js} +1 -1
  29. package/dist/assets/{erDiagram-Q2GNP2WA-BbHMUMHv.js → erDiagram-Q2GNP2WA-DLJ0STwx.js} +1 -1
  30. package/dist/assets/{flowDiagram-NV44I4VS-BcZTJeWn.js → flowDiagram-NV44I4VS-DaJev1Dk.js} +1 -1
  31. package/dist/assets/{ganttDiagram-JELNMOA3-n27iVieA.js → ganttDiagram-JELNMOA3-BVqSlqWd.js} +1 -1
  32. package/dist/assets/{gitGraphDiagram-V2S2FVAM-DaO03D0c.js → gitGraphDiagram-V2S2FVAM-fILg4kGK.js} +1 -1
  33. package/dist/assets/{graph-CqgsEnyP.js → graph-CMQ9In6q.js} +1 -1
  34. package/dist/assets/{index-pVqH5W3l.js → index-Bp6Dtnjv.js} +37 -37
  35. package/dist/assets/{index-BLVU3y3C.js → index-CeOmPokb.js} +116 -116
  36. package/dist/assets/{index-DEMLXEhu.css → index-w5RjGGjS.css} +1 -1
  37. package/dist/assets/{infoDiagram-HS3SLOUP-DA9UPsCv.js → infoDiagram-HS3SLOUP-D7dyBxUc.js} +1 -1
  38. package/dist/assets/{journeyDiagram-XKPGCS4Q-DOnOrs8o.js → journeyDiagram-XKPGCS4Q-B5mS1ZV0.js} +1 -1
  39. package/dist/assets/{kanban-definition-3W4ZIXB7-CeCakzDJ.js → kanban-definition-3W4ZIXB7-BiWSAAjN.js} +1 -1
  40. package/dist/assets/{layout-D9Y_lOuO.js → layout-BME0mjSq.js} +1 -1
  41. package/dist/assets/{mindmap-definition-VGOIOE7T-DBP7KZgR.js → mindmap-definition-VGOIOE7T-CoH0z1ra.js} +1 -1
  42. package/dist/assets/{pieDiagram-ADFJNKIX-DSpFXjVs.js → pieDiagram-ADFJNKIX-Dq0SKRlZ.js} +1 -1
  43. package/dist/assets/{quadrantDiagram-AYHSOK5B-1w3noe3A.js → quadrantDiagram-AYHSOK5B-DwutakEK.js} +1 -1
  44. package/dist/assets/{requirementDiagram-UZGBJVZJ-B9YzwP8J.js → requirementDiagram-UZGBJVZJ-BzFetBkD.js} +1 -1
  45. package/dist/assets/{sankeyDiagram-TZEHDZUN-FLiuEFVI.js → sankeyDiagram-TZEHDZUN-BbOUy78i.js} +1 -1
  46. package/dist/assets/{sequenceDiagram-WL72ISMW-BSJt3OHN.js → sequenceDiagram-WL72ISMW-1ZNpnZKs.js} +1 -1
  47. package/dist/assets/{stateDiagram-FKZM4ZOC-Ch3MODOU.js → stateDiagram-FKZM4ZOC-BAP0pbLV.js} +1 -1
  48. package/dist/assets/stateDiagram-v2-4FDKWEC3-HGuFIOmd.js +1 -0
  49. package/dist/assets/{timeline-definition-IT6M3QCI-C_qTQlCc.js → timeline-definition-IT6M3QCI-CuyYlb9E.js} +1 -1
  50. package/dist/assets/{treemap-GDKQZRPO-yzuGqs4o.js → treemap-GDKQZRPO-CUELWxdP.js} +1 -1
  51. package/dist/assets/{xychartDiagram-PRI3JC2R-G6i_3Vla.js → xychartDiagram-PRI3JC2R-CaZOodKt.js} +1 -1
  52. package/dist/index.html +2 -2
  53. package/orbitchat.sh +118 -37
  54. package/package.json +1 -1
  55. package/dist/assets/channel-C4M311uf.js +0 -1
  56. package/dist/assets/classDiagram-2ON5EDUG-Brx1b2Nn.js +0 -1
  57. package/dist/assets/classDiagram-v2-WZHVMYZB-Brx1b2Nn.js +0 -1
  58. package/dist/assets/clone-C6___fhg.js +0 -1
  59. package/dist/assets/stateDiagram-v2-4FDKWEC3-CT2uJHYZ.js +0 -1
  60. package/dist/logo.png +0 -0
package/README.md CHANGED
@@ -22,19 +22,26 @@ Installed CLI commands:
22
22
 
23
23
  ## Quick Start
24
24
 
25
- 1. Define your adapters (agents) via the `ORBIT_ADAPTERS` or `VITE_ADAPTERS` environment variable:
25
+ 1. Define your adapter secrets via the `ORBIT_ADAPTER_KEYS` or `VITE_ADAPTER_KEYS` environment variable:
26
26
  ```bash
27
- export ORBIT_ADAPTERS='[
28
- {"name":"Simple Chat","apiKey":"my-key","apiUrl":"http://localhost:3000","description":"Default conversational agent."}
29
- ]'
27
+ # Mapping of Agent Name -> API Key
28
+ export ORBIT_ADAPTER_KEYS='{"Simple Chat":"my-secret-key"}'
30
29
  ```
31
30
 
32
- 2. Run the CLI:
31
+ 2. (Optional) Configure adapter URLs and metadata in `orbitchat.yaml`:
32
+ ```yaml
33
+ adapters:
34
+ - name: "Simple Chat"
35
+ apiUrl: "http://localhost:3000"
36
+ description: "Default conversational agent."
37
+ ```
38
+
39
+ 3. Run the CLI:
33
40
  ```bash
34
41
  orbitchat --config ./orbitchat.yaml --port 5173
35
42
  ```
36
43
 
37
- 3. Open `http://localhost:5173` — select an agent and start chatting.
44
+ 4. Open `http://localhost:5173` — select an agent and start chatting.
38
45
 
39
46
  ## Architecture
40
47
 
@@ -46,7 +53,7 @@ Browser ──X-Adapter-Name──▶ Express proxy ──X-API-Key──▶
46
53
  The frontend never handles API keys. Instead:
47
54
  - The browser sends an `X-Adapter-Name` header with every API request.
48
55
  - The Express proxy looks up the adapter, injects the real `X-API-Key`, and forwards the request to the configured backend URL.
49
- - `GET /api/adapters` returns only adapter names and descriptions — never keys or URLs.
56
+ - `GET /api/adapters` returns non-secret adapter metadata (name, description, notes, model) — never keys or backend URLs.
50
57
 
51
58
  ## CLI Options
52
59
 
@@ -70,8 +77,8 @@ Options:
70
77
  # Start with a custom config file
71
78
  orbitchat --config /path/to/orbitchat.yaml
72
79
 
73
- # Start with adapters defined inline
74
- ORBIT_ADAPTERS='[{"name":"Chat","apiKey":"mykey","apiUrl":"https://api.example.com"}]' orbitchat
80
+ # Start with adapter keys defined inline
81
+ ORBIT_ADAPTER_KEYS='{"Chat":"mykey"}' orbitchat
75
82
 
76
83
  # API proxy only — no UI, no build required
77
84
  orbitchat --api-only --port 5174
@@ -101,7 +108,7 @@ Your frontend needs to do two things:
101
108
  ```json
102
109
  {
103
110
  "adapters": [
104
- { "name": "Simple Chat", "description": "...", "notes": "..." }
111
+ { "name": "Simple Chat", "description": "...", "notes": "...", "model": "gpt-4o-mini" }
105
112
  ]
106
113
  }
107
114
  ```
@@ -116,7 +123,7 @@ Your frontend needs to do two things:
116
123
 
117
124
  | Method | Path | Headers | Description |
118
125
  |--------|------|---------|-------------|
119
- | GET | `/api/adapters` | — | List available adapter names and descriptions |
126
+ | GET | `/api/adapters` | — | List available adapter metadata (name, description, notes, model) |
120
127
  | POST | `/api/v1/chat` | `X-Adapter-Name`, `X-Session-ID` | Send a chat message (SSE streaming response) |
121
128
  | POST | `/api/files/upload` | `X-Adapter-Name` | Upload a file (multipart/form-data) |
122
129
  | GET | `/api/files` | `X-Adapter-Name` | List uploaded files |
@@ -124,103 +131,80 @@ Your frontend needs to do two things:
124
131
  | DELETE | `/api/files/:id` | `X-Adapter-Name` | Delete a file |
125
132
  | GET | `/api/v1/autocomplete?q=...&limit=5` | `X-Adapter-Name` | Autocomplete suggestions |
126
133
 
127
- ### Example: calling from a custom React app
128
-
129
- ```js
130
- // Discover adapters
131
- const res = await fetch('http://localhost:5174/api/adapters');
132
- const { adapters } = await res.json();
133
-
134
- // Send a chat message (SSE stream)
135
- const response = await fetch('http://localhost:5174/api/v1/chat', {
136
- method: 'POST',
137
- headers: {
138
- 'Content-Type': 'application/json',
139
- 'X-Adapter-Name': adapters[0].name,
140
- 'X-Session-ID': crypto.randomUUID(),
141
- },
142
- body: JSON.stringify({ message: 'Hello!' }),
143
- });
144
-
145
- // Read the SSE stream
146
- const reader = response.body.getReader();
147
- const decoder = new TextDecoder();
148
- while (true) {
149
- const { done, value } = await reader.read();
150
- if (done) break;
151
- console.log(decoder.decode(value));
152
- }
153
- ```
154
-
155
134
  ## Configuring Adapters
156
135
 
157
- Adapters map a user-visible name to a backend API key and URL. Configure them via the `ORBIT_ADAPTERS` (or `VITE_ADAPTERS`) environment variable as a JSON array:
136
+ Configuration is split between **metadata/URLs** (in `orbitchat.yaml`) and **secrets** (in environment variables).
158
137
 
159
- ```bash
160
- export ORBIT_ADAPTERS='[
161
- {
162
- "name": "Simple Chat",
163
- "apiKey": "default-key",
164
- "apiUrl": "http://localhost:3000",
165
- "description": "Basic chat interface using the default conversational agent."
166
- },
167
- {
168
- "name": "Document QA",
169
- "apiKey": "doc-qa-key",
170
- "apiUrl": "http://localhost:3000",
171
- "description": "Chat with uploaded documents.",
172
- "notes": "Supports PDF, DOCX, and plain text uploads."
173
- }
174
- ]'
138
+ ### 1. Metadata in `orbitchat.yaml`
139
+
140
+ Define your adapters list in the YAML file:
141
+
142
+ ```yaml
143
+ adapters:
144
+ - name: "Simple Chat"
145
+ apiUrl: "http://localhost:3000"
146
+ description: "Basic chat interface using the default conversational agent."
147
+ - name: "Document QA"
148
+ apiUrl: "http://localhost:3000"
149
+ description: "Chat with uploaded documents."
150
+ notes: "Supports PDF, DOCX, and plain text uploads."
175
151
  ```
176
152
 
177
- Each adapter object supports:
153
+ | Field | Description |
154
+ |-------|-------------|
155
+ | `name` | Display name shown in the agent selector (must match the key in `.env`) |
156
+ | `apiUrl` | Backend URL (defaults to `api.url`, then `http://localhost:3000`) |
157
+ | `description` | Short summary shown in dropdowns |
158
+ | `notes` | Markdown content shown in the chat empty state |
178
159
 
179
- | Field | Required | Description |
180
- |-------|----------|-------------|
181
- | `name` | Yes | Display name shown in the agent selector |
182
- | `apiKey` | Yes | Backend API key (never exposed to the browser) |
183
- | `apiUrl` | No | Backend URL (defaults to `api.url` in `orbitchat.yaml`, then `http://localhost:3000`) |
184
- | `description` | No | Short summary shown in dropdowns |
185
- | `notes` | No | Markdown content shown in the chat empty state |
160
+ ### 2. Secrets in `.env`
186
161
 
187
- If `api.defaultAdapter` is not set (or left as `default-key`), the first adapter in the list is used.
162
+ Provide the API keys via `ORBIT_ADAPTER_KEYS` (or `VITE_ADAPTER_KEYS`) as a JSON object:
188
163
 
189
- ### Agent Selector UX
164
+ ```bash
165
+ VITE_ADAPTER_KEYS='{
166
+ "Simple Chat": "secret-key-1",
167
+ "Document QA": "secret-key-2"
168
+ }'
169
+ ```
190
170
 
191
- - When a conversation has no messages, the chat canvas shows a centered agent selector with the adapter's notes rendered beneath it.
192
- - Once an adapter is selected, the input field unlocks.
193
- - Sidebar cards display the agent assigned to each conversation.
194
- - To change the adapter after messages exist, use the "Change agent" action in the sidebar.
171
+ The system deep-merges these sources at runtime.
195
172
 
196
173
  ## Configuration
197
174
 
198
175
  ### Runtime Config File
199
176
 
200
- Runtime settings are loaded from `orbitchat.yaml` (see `orbitchat.yaml.example`).
177
+ Runtime settings are loaded from `orbitchat.yaml` (see `orbitchat.yaml.example`). The configuration uses a nested structure:
201
178
 
202
- Config lookup:
203
- 1. `--config /path/to/orbitchat.yaml` if provided
204
- 2. `./orbitchat.yaml` (current working directory)
179
+ ```yaml
180
+ application:
181
+ name: "ORBIT Chat"
182
+ api:
183
+ url: "http://localhost:3000"
184
+ features:
185
+ enableUpload: true
186
+ ```
205
187
 
206
- ### Environment Variables
188
+ Header logos (`header.logoUrl`, `header.logoUrlLight`, `header.logoUrlDark`) support:
189
+ - Remote URLs, for example `https://example.com/logo.png`
190
+ - Local file paths (absolute or relative to `orbitchat.yaml`), for example `./public/logo.png`
207
191
 
208
- Adapter secrets are provided via environment variables:
192
+ Theme-aware logo selection order:
193
+ - Light theme: `header.logoUrlLight` -> `header.logoUrl` -> `header.logoUrlDark`
194
+ - Dark theme: `header.logoUrlDark` -> `header.logoUrl` -> `header.logoUrlLight`
209
195
 
210
- ```bash
211
- ORBIT_ADAPTERS='[{"name":"Simple Chat","apiKey":"default-key","apiUrl":"http://localhost:3000"}]'
212
- ```
196
+ ### Environment Variables
213
197
 
214
- - `ORBIT_ADAPTERS` is preferred.
215
- - `VITE_ADAPTERS` is also supported for compatibility.
216
- - If both are set, `ORBIT_ADAPTERS` takes precedence.
198
+ Adapter secrets are provided via:
199
+ - `ORBIT_ADAPTER_KEYS` (Preferred)
200
+ - `VITE_ADAPTER_KEYS`
217
201
 
218
202
  Auth secrets are read from:
219
203
  - `VITE_AUTH_DOMAIN`
220
204
  - `VITE_AUTH_CLIENT_ID`
221
205
  - `VITE_AUTH_AUDIENCE`
222
206
 
223
- The CLI also loads `.env` and `.env.local` from the current working directory on startup.
207
+ The CLI loads `.env` and `.env.local` from the current working directory on startup.
224
208
 
225
209
  ## Development
226
210
 
@@ -233,18 +217,6 @@ npm install
233
217
  npm run dev
234
218
  ```
235
219
 
236
- ### Development with Express Proxy
237
-
238
- To run both the Express proxy and Vite dev server together:
239
-
240
- ```bash
241
- node bin/dev-server.js
242
- ```
243
-
244
- This starts:
245
- - Express proxy on port 5174 (handles `/api/*` routes)
246
- - Vite dev server on port 5173 (proxies API requests to Express)
247
-
248
220
  ### Building for Production
249
221
 
250
222
  ```bash
@@ -257,133 +229,28 @@ The output is written to `dist/`. Serve it with:
257
229
  orbitchat --port 8080
258
230
  ```
259
231
 
260
- ### Running as a Daemon
261
-
262
- For npm package installs, use:
232
+ ## Troubleshooting
263
233
 
264
- ```bash
265
- orbitchat-daemon --start # Start in background
266
- orbitchat-daemon --start 8080 # Start on custom port
267
- orbitchat-daemon --stop # Stop
268
- orbitchat-daemon --status # Check status
269
- ```
234
+ ### No Adapters Available
270
235
 
271
- From a source checkout, you can also run:
236
+ If the agent selector shows no adapters:
237
+ 1. Ensure `VITE_ADAPTER_KEYS` is set and contains valid JSON.
238
+ 2. Verify that the adapter `name` in `orbitchat.yaml` exactly matches the key used in `VITE_ADAPTER_KEYS`.
239
+ 3. Check the CLI startup logs for "Available Adapters: ...".
272
240
 
273
- ```bash
274
- ./orbitchat.sh --start
275
- ```
241
+ ### Stale Configuration
276
242
 
277
- ## Available Scripts
278
-
279
- - `npm run dev` Start Vite dev server
280
- - `npm run build` — Build for production
281
- - `npm run preview` — Preview production build
282
- - `npm run dev:local` — Start dev server with local API build
283
- - `npm run dev:with-api` — Build API from `../node-api` and start dev server
284
- - `npm run build:local` — Build for production with local API
285
- - `npm run build:api` — Build and copy API from `../node-api`
286
-
287
- ## Features
288
-
289
- - **Streaming Responses**: Real-time streaming of AI responses via SSE
290
- - **Agent Selection**: Choose from configured adapters per conversation
291
- - **File Upload**: Upload and attach files (PDF, DOCX, TXT, CSV, JSON, HTML, images, audio) to conversations
292
- - **File Context**: Query uploaded files — they are chunked, embedded, and included in chat context
293
- - **Autocomplete**: Optional type-ahead suggestions via `/api/v1/autocomplete`
294
- - **Conversation Threads**: Branch conversations into focused sub-threads
295
- - **Session Management**: Automatic session ID generation and persistence
296
- - **Conversation Persistence**: Chat history saved to localStorage
297
- - **Audio Output**: Optional text-to-speech for AI responses
298
- - **Feedback Buttons**: Optional thumbs-up/down per message
243
+ If you've updated `orbitchat.yaml` but don't see changes:
244
+ 1. The CLI watches the YAML file and should restart automatically.
245
+ 2. Clear browser site data/localStorage for the app origin to ensure no stale session state is being used.
299
246
 
300
247
  ## Security
301
248
 
302
249
  - The browser **never** sees real API keys. The Express proxy maps adapter names to keys server-side.
303
- - `GET /api/adapters` only exposes names and descriptions — never keys or backend URLs.
304
- - Keep `ORBIT_ADAPTERS` / `VITE_ADAPTERS` out of source control.
305
- - Run the proxy behind HTTPS (or another reverse proxy) in production so users cannot intercept traffic.
306
- - Secure the host running the CLI — a compromised host can leak the adapters config or intercept proxied traffic.
307
-
308
- ## File Upload
309
-
310
- ### Supported File Types
311
-
312
- | Type | Formats | Processing |
313
- |------|---------|------------|
314
- | Documents | PDF, DOCX, PPTX, XLSX | Text extraction, chunking, vector indexing |
315
- | Text | TXT, MD, HTML | Direct chunking and indexing |
316
- | Data | CSV, JSON | Chunking and indexing |
317
- | Code | PY, JS, TS, Java, Go, Rust, C/C++, and more | Direct indexing |
318
- | Images | PNG, JPEG, TIFF | OCR via vision service |
319
- | Audio | WAV, MP3, MP4, OGG, FLAC, WebM, M4A, AAC | ASR (Automatic Speech Recognition) |
320
- | Subtitles | VTT | Direct indexing |
321
-
322
- ### Limits
323
-
324
- - Maximum file size: 50 MB (configurable via `--max-file-size-mb`)
325
- - Maximum files per conversation: 5 (configurable via `--max-files-per-conversation`)
326
-
327
- ### Processing Pipeline
328
-
329
- 1. **Upload** — File uploaded via the Express proxy to `/api/files/upload`
330
- 2. **Validation** — File type and size validated client-side and server-side
331
- 3. **Storage** — File saved to filesystem (or S3 in production)
332
- 4. **Extraction** — Text and metadata extracted using format-specific processors
333
- 5. **Chunking** — Content chunked using configured strategy (fixed or semantic)
334
- 6. **Indexing** — Chunks indexed in vector store for semantic search
335
- 7. **Status Polling** — Client polls until processing completes
336
-
337
- ## Integration Details
338
-
339
- The application uses:
340
- - **Zustand** for state management
341
- - **Express** + `http-proxy-middleware` for the API proxy layer
342
- - **@schmitech/markdown-renderer** ([GitHub](https://github.com/schmitech/markdown-renderer) | [NPM](https://www.npmjs.com/package/@schmitech/markdown-renderer)) for rich markdown rendering
343
- - **localStorage** for persistent session and conversation storage
344
- - **TypeScript** for type safety throughout
345
-
346
- ## Troubleshooting
347
-
348
- ### No Adapters Available
349
-
350
- If the agent selector shows no adapters:
351
- 1. Ensure `ORBIT_ADAPTERS` or `VITE_ADAPTERS` is set and valid JSON
352
- 2. Check the CLI startup logs for "Available Adapters: ..."
353
- 3. Verify each adapter has a `name` and `apiKey` field
354
-
355
- If adapters load but descriptions/notes are missing in packaged installs (`npm pack` + install), while `npm run dev` works:
356
- 1. Prefer `ORBIT_ADAPTERS` (it takes precedence over `VITE_ADAPTERS` when both are set)
357
- 2. Ensure `orbitchat.yaml` contains adapter metadata and adapter `name` values exactly match `ORBIT_ADAPTERS`
358
- 3. Rebuild and repack from the updated source: `npm run build && npm pack`
359
- 4. Reinstall the newly generated tarball
360
- 5. Restart with a clean process/port: `orbitchat-daemon --force-restart` (or `./orbitchat.sh --force-restart` in source checkout)
361
- 6. Verify runtime output:
362
- - Startup log shows `Available Adapters: ...`
363
- - `GET /api/adapters` returns `description`/`notes` for each adapter
364
-
365
- ### File Upload Issues
366
-
367
- - **File size exceeded** — Check file size against the configured limit
368
- - **Unsupported format** — Verify file type is in the supported list above
369
- - **Upload fails** — Check server logs and adapter configuration
370
- - **Processing fails** — Ensure the file processing service is initialized on the backend
371
-
372
- ### Debug Mode
373
-
374
- Enable debug logging:
375
- ```bash
376
- # in orbitchat.yaml
377
- debug:
378
- consoleDebug: true
379
- ```
380
- This enables detailed runtime logging from the CLI server.
250
+ - `GET /api/adapters` only exposes non-secret metadata (name, description, notes, model) — never keys or backend URLs.
251
+ - Keep `VITE_ADAPTER_KEYS` out of source control.
252
+ - Run the proxy behind HTTPS in production.
381
253
 
382
- ## Deployment Checklist
254
+ ## License
383
255
 
384
- 1. **Build the app**: `npm run build`
385
- 2. **Set `ORBIT_ADAPTERS`** with your production adapter configs (keep out of git)
386
- 3. **Run behind HTTPS** — use a reverse proxy like nginx or Caddy in front of `orbitchat`
387
- 4. **Bind to the right interface**: use `--host 0.0.0.0` to allow external access, or keep the default `localhost` for local-only
388
- 5. **Tune limits** — set `--max-conversations`, `--max-message-length`, etc. appropriate for your deployment
389
- 6. **Monitor logs** — use `orbitchat-daemon --start` for daemon mode with log file, or run directly and pipe to your log aggregator
256
+ MIT