orbitchat 3.1.1 → 3.1.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.
Files changed (60) hide show
  1. package/README.md +79 -245
  2. package/bin/orbitchat.js +284 -729
  3. package/dist/assets/{ChartRenderer-CapBCpbV.js → ChartRenderer-Rhc3nvY3.js} +1 -1
  4. package/dist/assets/{MermaidRenderer-DQJRirnm.js → MermaidRenderer-BzYGDbGL.js} +5 -5
  5. package/dist/assets/{MusicRenderer-9vnA54gg.js → MusicRenderer-NnEIYAVw.js} +2 -2
  6. package/dist/assets/{SVGRenderer-By7CKtqU.js → SVGRenderer-_sr2u3jg.js} +1 -1
  7. package/dist/assets/{_basePickBy-Dm-zx8im.js → _basePickBy-gYhf5rnT.js} +1 -1
  8. package/dist/assets/{_baseUniq-DLPvoy-d.js → _baseUniq-Cbl9K6Wy.js} +1 -1
  9. package/dist/assets/{architectureDiagram-VXUJARFQ-B1kMlTMW.js → architectureDiagram-VXUJARFQ-PClktC-4.js} +1 -1
  10. package/dist/assets/{blockDiagram-VD42YOAC-BlglDb-U.js → blockDiagram-VD42YOAC-C0SW8BqM.js} +1 -1
  11. package/dist/assets/{c4Diagram-YG6GDRKO-CaZm--Yy.js → c4Diagram-YG6GDRKO-DSxXGReX.js} +1 -1
  12. package/dist/assets/channel-BqlT4tcZ.js +1 -0
  13. package/dist/assets/{chunk-4BX2VUAB-4Kq-2AyN.js → chunk-4BX2VUAB-BGhKp2Fa.js} +1 -1
  14. package/dist/assets/{chunk-55IACEB6-FApueVFk.js → chunk-55IACEB6-lipYmTAW.js} +1 -1
  15. package/dist/assets/{chunk-B4BG7PRW-CHox7be9.js → chunk-B4BG7PRW-BbomVOnh.js} +1 -1
  16. package/dist/assets/{chunk-DI55MBZ5-N5sePLFo.js → chunk-DI55MBZ5-Dc5SGEEJ.js} +1 -1
  17. package/dist/assets/{chunk-FMBD7UC4-BSbBs0xy.js → chunk-FMBD7UC4-8br3AiC5.js} +1 -1
  18. package/dist/assets/{chunk-QN33PNHL-ByurI9-W.js → chunk-QN33PNHL-DVUU2Ki_.js} +1 -1
  19. package/dist/assets/{chunk-QZHKN3VN-Yy8VVut9.js → chunk-QZHKN3VN-DeCce7KS.js} +1 -1
  20. package/dist/assets/{chunk-TZMSLE5B-B5oe8pT4.js → chunk-TZMSLE5B-DGJHN-_V.js} +1 -1
  21. package/dist/assets/classDiagram-2ON5EDUG-D4Qktu8o.js +1 -0
  22. package/dist/assets/classDiagram-v2-WZHVMYZB-D4Qktu8o.js +1 -0
  23. package/dist/assets/clone-Dr4xHo_5.js +1 -0
  24. package/dist/assets/{cose-bilkent-S5V4N54A-DS_-k6qR.js → cose-bilkent-S5V4N54A-B2ykdhqW.js} +1 -1
  25. package/dist/assets/{dagre-6UL2VRFP-DgkwJjVY.js → dagre-6UL2VRFP-UORxvWZD.js} +1 -1
  26. package/dist/assets/{diagram-PSM6KHXK-C9su64f9.js → diagram-PSM6KHXK-BQFC4vRN.js} +1 -1
  27. package/dist/assets/{diagram-QEK2KX5R-DY6-9Dbc.js → diagram-QEK2KX5R-CCSOfl0X.js} +1 -1
  28. package/dist/assets/{diagram-S2PKOQOG-_Wub-Eik.js → diagram-S2PKOQOG-D3PUtgH9.js} +1 -1
  29. package/dist/assets/{erDiagram-Q2GNP2WA-Gwx9nSAM.js → erDiagram-Q2GNP2WA-Bq9ZcVy_.js} +1 -1
  30. package/dist/assets/{flowDiagram-NV44I4VS-DmrXTF_S.js → flowDiagram-NV44I4VS-BBgWHY4c.js} +1 -1
  31. package/dist/assets/{ganttDiagram-JELNMOA3-DymVUgsd.js → ganttDiagram-JELNMOA3-CkPkSvB6.js} +1 -1
  32. package/dist/assets/{gitGraphDiagram-V2S2FVAM-D3VSQFT4.js → gitGraphDiagram-V2S2FVAM-hYLGJpbm.js} +1 -1
  33. package/dist/assets/{graph-BIe-N9yO.js → graph-DJgI4-QL.js} +1 -1
  34. package/dist/assets/{index-B-NnBj1Y.js → index-CkCAzH0b.js} +116 -116
  35. package/dist/assets/{index-BiM6VNSE.js → index-CtSNEVGd.js} +37 -37
  36. package/dist/assets/index-w5RjGGjS.css +1 -0
  37. package/dist/assets/{infoDiagram-HS3SLOUP-D2DeUrgk.js → infoDiagram-HS3SLOUP-DqPal58O.js} +1 -1
  38. package/dist/assets/{journeyDiagram-XKPGCS4Q-GxFhv1XB.js → journeyDiagram-XKPGCS4Q-ckP7tQ6L.js} +1 -1
  39. package/dist/assets/{kanban-definition-3W4ZIXB7-BhT-ga9I.js → kanban-definition-3W4ZIXB7-D5coRbbB.js} +1 -1
  40. package/dist/assets/{layout-38O87Ivt.js → layout-Dbu3AECQ.js} +1 -1
  41. package/dist/assets/{mindmap-definition-VGOIOE7T-DfKjmcaV.js → mindmap-definition-VGOIOE7T-Rh2iyVPx.js} +1 -1
  42. package/dist/assets/{pieDiagram-ADFJNKIX-D7lDWRGN.js → pieDiagram-ADFJNKIX-jhHLFKwA.js} +1 -1
  43. package/dist/assets/{quadrantDiagram-AYHSOK5B-CPtZ8LgW.js → quadrantDiagram-AYHSOK5B-_KQn5Onj.js} +1 -1
  44. package/dist/assets/{requirementDiagram-UZGBJVZJ-h-H7R8sR.js → requirementDiagram-UZGBJVZJ-BGcyxuJP.js} +1 -1
  45. package/dist/assets/{sankeyDiagram-TZEHDZUN-C6cn5g4m.js → sankeyDiagram-TZEHDZUN-HpFhSy4a.js} +1 -1
  46. package/dist/assets/{sequenceDiagram-WL72ISMW-B6AwcQ4F.js → sequenceDiagram-WL72ISMW-CRcnJnhH.js} +1 -1
  47. package/dist/assets/{stateDiagram-FKZM4ZOC-B4ne7z3I.js → stateDiagram-FKZM4ZOC-CzYGK2Iy.js} +1 -1
  48. package/dist/assets/stateDiagram-v2-4FDKWEC3-C-DbD7yi.js +1 -0
  49. package/dist/assets/{timeline-definition-IT6M3QCI-BmjJnJ-r.js → timeline-definition-IT6M3QCI-DtJxDVMX.js} +1 -1
  50. package/dist/assets/{treemap-GDKQZRPO-CBUbyJIX.js → treemap-GDKQZRPO-DC-6lh4E.js} +1 -1
  51. package/dist/assets/{xychartDiagram-PRI3JC2R-C3lVgboM.js → xychartDiagram-PRI3JC2R-DJ3uOpiG.js} +1 -1
  52. package/dist/index.html +2 -2
  53. package/orbitchat.sh +103 -35
  54. package/package.json +1 -1
  55. package/dist/assets/channel-BjUDQMqf.js +0 -1
  56. package/dist/assets/classDiagram-2ON5EDUG-BhHCvLfM.js +0 -1
  57. package/dist/assets/classDiagram-v2-WZHVMYZB-BhHCvLfM.js +0 -1
  58. package/dist/assets/clone-oQOn4Sap.js +0 -1
  59. package/dist/assets/index-BA5Mw76S.css +0 -1
  60. package/dist/assets/stateDiagram-v2-4FDKWEC3-C_qp8U90.js +0 -1
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,109 +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
- Header logo (`header.logoUrl`) supports:
188
+ Header logos (`header.logoUrl`, `header.logoUrlLight`, `header.logoUrlDark`) support:
207
189
  - Remote URLs, for example `https://example.com/logo.png`
208
190
  - Local file paths (absolute or relative to `orbitchat.yaml`), for example `./public/logo.png`
209
191
 
210
- When a local file path is used, the CLI serves it on an internal route (`/__orbitchat_assets/...`) at runtime.
192
+ Theme-aware logo selection order:
193
+ - Light theme: `header.logoUrlLight` -> `header.logoUrl` -> `header.logoUrlDark`
194
+ - Dark theme: `header.logoUrlDark` -> `header.logoUrl` -> `header.logoUrlLight`
211
195
 
212
196
  ### Environment Variables
213
197
 
214
- Adapter secrets are provided via environment variables:
215
-
216
- ```bash
217
- ORBIT_ADAPTERS='[{"name":"Simple Chat","apiKey":"default-key","apiUrl":"http://localhost:3000"}]'
218
- ```
219
-
220
- - `ORBIT_ADAPTERS` is preferred.
221
- - `VITE_ADAPTERS` is also supported for compatibility.
222
- - If both are set, `ORBIT_ADAPTERS` takes precedence.
198
+ Adapter secrets are provided via:
199
+ - `ORBIT_ADAPTER_KEYS` (Preferred)
200
+ - `VITE_ADAPTER_KEYS`
223
201
 
224
202
  Auth secrets are read from:
225
203
  - `VITE_AUTH_DOMAIN`
226
204
  - `VITE_AUTH_CLIENT_ID`
227
205
  - `VITE_AUTH_AUDIENCE`
228
206
 
229
- 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.
230
208
 
231
209
  ## Development
232
210
 
@@ -239,18 +217,6 @@ npm install
239
217
  npm run dev
240
218
  ```
241
219
 
242
- ### Development with Express Proxy
243
-
244
- To run both the Express proxy and Vite dev server together:
245
-
246
- ```bash
247
- node bin/dev-server.js
248
- ```
249
-
250
- This starts:
251
- - Express proxy on port 5174 (handles `/api/*` routes)
252
- - Vite dev server on port 5173 (proxies API requests to Express)
253
-
254
220
  ### Building for Production
255
221
 
256
222
  ```bash
@@ -263,160 +229,28 @@ The output is written to `dist/`. Serve it with:
263
229
  orbitchat --port 8080
264
230
  ```
265
231
 
266
- ### Running as a Daemon
267
-
268
- For npm package installs, use:
269
-
270
- ```bash
271
- orbitchat-daemon --start # Start in background
272
- orbitchat-daemon --start 8080 # Start on custom port
273
- orbitchat-daemon --stop # Stop
274
- orbitchat-daemon --status # Check status
275
- ```
276
-
277
- From a source checkout, you can also run:
278
-
279
- ```bash
280
- ./orbitchat.sh --start
281
- ```
232
+ ## Troubleshooting
282
233
 
283
- Daemon state files:
284
- - Default PID/log directory: `$XDG_STATE_HOME/orbitchat` or `~/.local/state/orbitchat`
285
- - Override with: `ORBITCHAT_STATE_DIR=/path/to/state`
234
+ ### No Adapters Available
286
235
 
287
- Daemon examples with config:
288
- ```bash
289
- orbitchat-daemon --config /home/ubuntu/orbitchat/orbitchat.yaml --start
290
- orbitchat-daemon --config /home/ubuntu/orbitchat/orbitchat.yaml --force-restart
291
- ```
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: ...".
292
240
 
293
- Using `sudo`:
294
- - `sudo` may drop environment variables (including `ORBIT_ADAPTERS`).
295
- - Preserve adapter env explicitly:
296
- ```bash
297
- sudo --preserve-env=ORBIT_ADAPTERS orbitchat-daemon --config /home/ubuntu/orbitchat/orbitchat.yaml --start
298
- ```
299
- - If needed, set writable daemon state dir explicitly:
300
- ```bash
301
- sudo ORBITCHAT_STATE_DIR=/var/tmp/orbitchat orbitchat-daemon --config /home/ubuntu/orbitchat/orbitchat.yaml --start
302
- ```
241
+ ### Stale Configuration
303
242
 
304
- ## Available Scripts
305
-
306
- - `npm run dev` Start Vite dev server
307
- - `npm run build` — Build for production
308
- - `npm run preview` — Preview production build
309
- - `npm run dev:local` — Start dev server with local API build
310
- - `npm run dev:with-api` — Build API from `../node-api` and start dev server
311
- - `npm run build:local` — Build for production with local API
312
- - `npm run build:api` — Build and copy API from `../node-api`
313
-
314
- ## Features
315
-
316
- - **Streaming Responses**: Real-time streaming of AI responses via SSE
317
- - **Agent Selection**: Choose from configured adapters per conversation
318
- - **File Upload**: Upload and attach files (PDF, DOCX, TXT, CSV, JSON, HTML, images, audio) to conversations
319
- - **File Context**: Query uploaded files — they are chunked, embedded, and included in chat context
320
- - **Autocomplete**: Optional type-ahead suggestions via `/api/v1/autocomplete`
321
- - **Conversation Threads**: Branch conversations into focused sub-threads
322
- - **Session Management**: Automatic session ID generation and persistence
323
- - **Conversation Persistence**: Chat history saved to localStorage
324
- - **Audio Output**: Optional text-to-speech for AI responses
325
- - **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.
326
246
 
327
247
  ## Security
328
248
 
329
249
  - The browser **never** sees real API keys. The Express proxy maps adapter names to keys server-side.
330
- - `GET /api/adapters` only exposes names and descriptions — never keys or backend URLs.
331
- - Keep `ORBIT_ADAPTERS` / `VITE_ADAPTERS` out of source control.
332
- - Run the proxy behind HTTPS (or another reverse proxy) in production so users cannot intercept traffic.
333
- - Secure the host running the CLI — a compromised host can leak the adapters config or intercept proxied traffic.
334
-
335
- ## File Upload
336
-
337
- ### Supported File Types
338
-
339
- | Type | Formats | Processing |
340
- |------|---------|------------|
341
- | Documents | PDF, DOCX, PPTX, XLSX | Text extraction, chunking, vector indexing |
342
- | Text | TXT, MD, HTML | Direct chunking and indexing |
343
- | Data | CSV, JSON | Chunking and indexing |
344
- | Code | PY, JS, TS, Java, Go, Rust, C/C++, and more | Direct indexing |
345
- | Images | PNG, JPEG, TIFF | OCR via vision service |
346
- | Audio | WAV, MP3, MP4, OGG, FLAC, WebM, M4A, AAC | ASR (Automatic Speech Recognition) |
347
- | Subtitles | VTT | Direct indexing |
348
-
349
- ### Limits
350
-
351
- - Maximum file size: 50 MB (configurable via `--max-file-size-mb`)
352
- - Maximum files per conversation: 5 (configurable via `--max-files-per-conversation`)
353
-
354
- ### Processing Pipeline
355
-
356
- 1. **Upload** — File uploaded via the Express proxy to `/api/files/upload`
357
- 2. **Validation** — File type and size validated client-side and server-side
358
- 3. **Storage** — File saved to filesystem (or S3 in production)
359
- 4. **Extraction** — Text and metadata extracted using format-specific processors
360
- 5. **Chunking** — Content chunked using configured strategy (fixed or semantic)
361
- 6. **Indexing** — Chunks indexed in vector store for semantic search
362
- 7. **Status Polling** — Client polls until processing completes
363
-
364
- ## Integration Details
365
-
366
- The application uses:
367
- - **Zustand** for state management
368
- - **Express** + `http-proxy-middleware` for the API proxy layer
369
- - **@schmitech/markdown-renderer** ([GitHub](https://github.com/schmitech/markdown-renderer) | [NPM](https://www.npmjs.com/package/@schmitech/markdown-renderer)) for rich markdown rendering
370
- - **localStorage** for persistent session and conversation storage
371
- - **TypeScript** for type safety throughout
372
-
373
- ## Troubleshooting
374
-
375
- ### No Adapters Available
376
-
377
- If the agent selector shows no adapters:
378
- 1. Ensure `ORBIT_ADAPTERS` or `VITE_ADAPTERS` is set and valid JSON
379
- 2. Check the CLI startup logs for "Available Adapters: ..."
380
- 3. Verify each adapter has a `name` and `apiKey` field
381
-
382
- If adapters load but descriptions/notes are missing in packaged installs (`npm pack` + install), while `npm run dev` works:
383
- 1. Prefer `ORBIT_ADAPTERS` (it takes precedence over `VITE_ADAPTERS` when both are set)
384
- 2. Ensure `orbitchat.yaml` contains adapter metadata and adapter `name` values exactly match `ORBIT_ADAPTERS`
385
- 3. Rebuild and repack from the updated source: `npm run build && npm pack`
386
- 4. Reinstall the newly generated tarball
387
- 5. Restart with a clean process/port: `orbitchat-daemon --force-restart` (or `./orbitchat.sh --force-restart` in source checkout)
388
- 6. Verify runtime output:
389
- - Startup log shows `Available Adapters: ...`
390
- - `GET /api/adapters` returns `description`/`notes` for each adapter
391
-
392
- If logs show an adapter not in your current config (for example `Cross Domain`):
393
- 1. Check startup log `Available Adapters: ...` to confirm what the server actually loaded
394
- 2. Clear browser site data/localStorage for the app origin or open an incognito window
395
- 3. Start a new conversation and reselect the agent
396
- 4. Confirm requests no longer send stale `X-Adapter-Name` values
397
-
398
- ### File Upload Issues
399
-
400
- - **File size exceeded** — Check file size against the configured limit
401
- - **Unsupported format** — Verify file type is in the supported list above
402
- - **Upload fails** — Check server logs and adapter configuration
403
- - **Processing fails** — Ensure the file processing service is initialized on the backend
404
-
405
- ### Debug Mode
406
-
407
- Enable debug logging:
408
- ```bash
409
- # in orbitchat.yaml
410
- debug:
411
- consoleDebug: true
412
- ```
413
- 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.
414
253
 
415
- ## Deployment Checklist
254
+ ## License
416
255
 
417
- 1. **Build the app**: `npm run build`
418
- 2. **Set `ORBIT_ADAPTERS`** with your production adapter configs (keep out of git)
419
- 3. **Run behind HTTPS** — use a reverse proxy like nginx or Caddy in front of `orbitchat`
420
- 4. **Bind to the right interface**: use `--host 0.0.0.0` to allow external access, or keep the default `localhost` for local-only
421
- 5. **Tune limits** — set `--max-conversations`, `--max-message-length`, etc. appropriate for your deployment
422
- 6. **Monitor logs** — use `orbitchat-daemon --start` for daemon mode with log file, or run directly and pipe to your log aggregator
256
+ MIT