orbitchat 3.0.0 → 3.1.0

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 (62) hide show
  1. package/README.md +60 -90
  2. package/bin/orbitchat.js +408 -429
  3. package/dist/assets/{ChartRenderer-B1mYF_kk.js → ChartRenderer-BEwTOgnq.js} +1 -1
  4. package/dist/assets/{MermaidRenderer-Dhffx5mc.js → MermaidRenderer-Cwj5RQ3g.js} +5 -5
  5. package/dist/assets/{MusicRenderer-DbXJ8e4-.js → MusicRenderer-jiCOczly.js} +2 -2
  6. package/dist/assets/{SVGRenderer-EhamRX_K.js → SVGRenderer-B7MdKpL3.js} +1 -1
  7. package/dist/assets/{_basePickBy-C2AibBqo.js → _basePickBy-CYc6FJVo.js} +1 -1
  8. package/dist/assets/{_baseUniq-D52pUSvn.js → _baseUniq-Db9U29CG.js} +1 -1
  9. package/dist/assets/{architectureDiagram-VXUJARFQ-BLMvVsZu.js → architectureDiagram-VXUJARFQ-ByDEpAtB.js} +1 -1
  10. package/dist/assets/{blockDiagram-VD42YOAC-CTz0dv5u.js → blockDiagram-VD42YOAC-DeU2cMg9.js} +1 -1
  11. package/dist/assets/{c4Diagram-YG6GDRKO-BjbN-GGh.js → c4Diagram-YG6GDRKO-C9ykT6JL.js} +1 -1
  12. package/dist/assets/channel-C4M311uf.js +1 -0
  13. package/dist/assets/{chunk-4BX2VUAB-DEMWGIsU.js → chunk-4BX2VUAB-DSGrQP0T.js} +1 -1
  14. package/dist/assets/{chunk-55IACEB6-BYaauHLT.js → chunk-55IACEB6-BqJf9Ja5.js} +1 -1
  15. package/dist/assets/{chunk-B4BG7PRW-D3_GFcfd.js → chunk-B4BG7PRW-CjLmShZ1.js} +1 -1
  16. package/dist/assets/{chunk-DI55MBZ5-Dy2EuzfA.js → chunk-DI55MBZ5-DpYiJhBX.js} +1 -1
  17. package/dist/assets/{chunk-FMBD7UC4-C9XHmwza.js → chunk-FMBD7UC4-B_-ci5rY.js} +1 -1
  18. package/dist/assets/{chunk-QN33PNHL-BOCltIi9.js → chunk-QN33PNHL-PupYKHzM.js} +1 -1
  19. package/dist/assets/{chunk-QZHKN3VN-CvA964eQ.js → chunk-QZHKN3VN-Ddt7KdjH.js} +1 -1
  20. package/dist/assets/{chunk-TZMSLE5B-B-3rZz90.js → chunk-TZMSLE5B-DFxHvBUh.js} +1 -1
  21. package/dist/assets/classDiagram-2ON5EDUG-Brx1b2Nn.js +1 -0
  22. package/dist/assets/classDiagram-v2-WZHVMYZB-Brx1b2Nn.js +1 -0
  23. package/dist/assets/clone-C6___fhg.js +1 -0
  24. package/dist/assets/{cose-bilkent-S5V4N54A-CzPip3he.js → cose-bilkent-S5V4N54A-CoAwh2dl.js} +1 -1
  25. package/dist/assets/{dagre-6UL2VRFP-CfCXYus3.js → dagre-6UL2VRFP-wqnQLI1r.js} +1 -1
  26. package/dist/assets/{diagram-PSM6KHXK-DyI2eDqp.js → diagram-PSM6KHXK-BThDYp3k.js} +1 -1
  27. package/dist/assets/{diagram-QEK2KX5R-DuakIh40.js → diagram-QEK2KX5R-QO0jbKYo.js} +1 -1
  28. package/dist/assets/{diagram-S2PKOQOG-C3-4IORM.js → diagram-S2PKOQOG-DqXZQ_2w.js} +1 -1
  29. package/dist/assets/{erDiagram-Q2GNP2WA-Dt-nZEaD.js → erDiagram-Q2GNP2WA-BbHMUMHv.js} +1 -1
  30. package/dist/assets/{flowDiagram-NV44I4VS-B-2wjyTQ.js → flowDiagram-NV44I4VS-BcZTJeWn.js} +1 -1
  31. package/dist/assets/{ganttDiagram-JELNMOA3-CHTvjPq0.js → ganttDiagram-JELNMOA3-n27iVieA.js} +1 -1
  32. package/dist/assets/{gitGraphDiagram-V2S2FVAM-d5GWmgY4.js → gitGraphDiagram-V2S2FVAM-DaO03D0c.js} +1 -1
  33. package/dist/assets/{graph-COgkbiU8.js → graph-CqgsEnyP.js} +1 -1
  34. package/dist/assets/index-BLVU3y3C.js +624 -0
  35. package/dist/assets/index-DEMLXEhu.css +1 -0
  36. package/dist/assets/{index-DN2bBcCs.js → index-pVqH5W3l.js} +1 -1
  37. package/dist/assets/{infoDiagram-HS3SLOUP-30Hn0iLj.js → infoDiagram-HS3SLOUP-DA9UPsCv.js} +1 -1
  38. package/dist/assets/{journeyDiagram-XKPGCS4Q-CMOYXQ79.js → journeyDiagram-XKPGCS4Q-DOnOrs8o.js} +1 -1
  39. package/dist/assets/{kanban-definition-3W4ZIXB7-dt3376cq.js → kanban-definition-3W4ZIXB7-CeCakzDJ.js} +1 -1
  40. package/dist/assets/{layout-DH97sy5g.js → layout-D9Y_lOuO.js} +1 -1
  41. package/dist/assets/{mindmap-definition-VGOIOE7T-BcZHPAlA.js → mindmap-definition-VGOIOE7T-DBP7KZgR.js} +1 -1
  42. package/dist/assets/{pieDiagram-ADFJNKIX-DXjvgcgl.js → pieDiagram-ADFJNKIX-DSpFXjVs.js} +1 -1
  43. package/dist/assets/{quadrantDiagram-AYHSOK5B-CICk2FdS.js → quadrantDiagram-AYHSOK5B-1w3noe3A.js} +1 -1
  44. package/dist/assets/{requirementDiagram-UZGBJVZJ-BdtxpQRA.js → requirementDiagram-UZGBJVZJ-B9YzwP8J.js} +1 -1
  45. package/dist/assets/{sankeyDiagram-TZEHDZUN-BVNS9BQJ.js → sankeyDiagram-TZEHDZUN-FLiuEFVI.js} +1 -1
  46. package/dist/assets/{sequenceDiagram-WL72ISMW-DF4fJTM7.js → sequenceDiagram-WL72ISMW-BSJt3OHN.js} +1 -1
  47. package/dist/assets/{stateDiagram-FKZM4ZOC-C8H8HujX.js → stateDiagram-FKZM4ZOC-Ch3MODOU.js} +1 -1
  48. package/dist/assets/stateDiagram-v2-4FDKWEC3-CT2uJHYZ.js +1 -0
  49. package/dist/assets/{timeline-definition-IT6M3QCI-DUSG5Vfy.js → timeline-definition-IT6M3QCI-C_qTQlCc.js} +1 -1
  50. package/dist/assets/{treemap-GDKQZRPO-1PI2PY4S.js → treemap-GDKQZRPO-yzuGqs4o.js} +1 -1
  51. package/dist/assets/{xychartDiagram-PRI3JC2R-CFPJj8WK.js → xychartDiagram-PRI3JC2R-G6i_3Vla.js} +1 -1
  52. package/dist/index.html +2 -2
  53. package/dist/logo.png +0 -0
  54. package/orbitchat.sh +282 -0
  55. package/package.json +6 -2
  56. package/dist/assets/channel-ryTtfXZE.js +0 -1
  57. package/dist/assets/classDiagram-2ON5EDUG-VbShFIzz.js +0 -1
  58. package/dist/assets/classDiagram-v2-WZHVMYZB-VbShFIzz.js +0 -1
  59. package/dist/assets/clone-BlhdKVDQ.js +0 -1
  60. package/dist/assets/index-DtztdW2a.js +0 -643
  61. package/dist/assets/index-lGqyWNWb.css +0 -1
  62. package/dist/assets/stateDiagram-v2-4FDKWEC3-DwtU033b.js +0 -1
package/README.md CHANGED
@@ -16,6 +16,10 @@ Or install locally:
16
16
  npm install orbitchat
17
17
  ```
18
18
 
19
+ Installed CLI commands:
20
+ - `orbitchat` — starts the ORBIT Chat server directly
21
+ - `orbitchat-daemon` — shell wrapper with `--start/--stop/--restart/--force-restart/--status`
22
+
19
23
  ## Quick Start
20
24
 
21
25
  1. Define your adapters (agents) via the `ORBIT_ADAPTERS` or `VITE_ADAPTERS` environment variable:
@@ -27,7 +31,7 @@ npm install orbitchat
27
31
 
28
32
  2. Run the CLI:
29
33
  ```bash
30
- orbitchat --enable-upload --port 5173
34
+ orbitchat --config ./orbitchat.yaml --port 5173
31
35
  ```
32
36
 
33
37
  3. Open `http://localhost:5173` — select an agent and start chatting.
@@ -50,49 +54,21 @@ The frontend never handles API keys. Instead:
50
54
  orbitchat [options]
51
55
 
52
56
  Options:
53
- --api-url URL Default backend URL (default: http://localhost:3000)
54
- --default-adapter NAME Adapter to preselect for new conversations
55
- --application-name NAME Name shown in browser tab (default: ORBIT Chat)
56
- --application-description TEXT Subtitle shown under the welcome heading
57
- --default-input-placeholder TEXT Message input placeholder (default: Message ORBIT...)
58
- --console-debug Enable console debug logging (default: false)
59
- --enable-upload Enable file upload button (default: false)
60
- --enable-audio Enable audio output button (default: false)
61
- --enable-audio-input Enable microphone input button (default: false)
62
- --enable-feedback Enable feedback buttons (default: false)
63
- --enable-autocomplete Enable autocomplete suggestions (default: false)
64
- --voice-silence-timeout-ms N Auto-stop voice capture after N ms of silence (default: 4000)
65
- --voice-recognition-lang LANG Speech recognition language code (default: browser locale)
66
- --out-of-service-message TEXT Show maintenance screen blocking access
67
- --max-files-per-conversation N Max files per conversation (default: 5)
68
- --max-file-size-mb N Max file size in MB (default: 50)
69
- --max-total-files N Max total files (default: 100, 0 = unlimited)
70
- --max-conversations N Max conversations (default: 10, 0 = unlimited)
71
- --max-messages-per-conversation N Max messages per conversation (default: 1000, 0 = unlimited)
72
- --max-messages-per-thread N Max messages per thread (default: 1000, 0 = unlimited)
73
- --max-total-messages N Max total messages (default: 10000, 0 = unlimited)
74
- --max-message-length N Max message length (default: 1000)
75
- --port PORT Server port (default: 5173)
76
- --host HOST Server host (default: localhost)
77
- --open Open browser automatically
78
- --api-only Run API proxy only (no UI serving, no build required)
79
- --cors-origin ORIGIN Allowed CORS origin in api-only mode (default: *)
80
- --config PATH Path to config file (default: ~/.orbit-chat-app/config.json)
81
- --help, -h Show help message
82
- --version, -v Show version number
57
+ --port PORT Server port (default: 5173)
58
+ --host HOST Server host (default: localhost)
59
+ --open Open browser automatically
60
+ --config PATH Path to orbitchat.yaml (default: ./orbitchat.yaml)
61
+ --api-only Run API proxy only (no UI serving)
62
+ --cors-origin URL Allowed CORS origin in api-only mode (default: *)
63
+ --help, -h Show help message
64
+ --version, -v Show version number
83
65
  ```
84
66
 
85
67
  ### Examples
86
68
 
87
69
  ```bash
88
- # Start with custom API URL and port
89
- orbitchat --api-url http://localhost:3000 --port 8080
90
-
91
- # Start with upload, audio output, mic input, and autocomplete enabled
92
- orbitchat --enable-upload --enable-audio --enable-audio-input --enable-autocomplete --open
93
-
94
70
  # Start with a custom config file
95
- orbitchat --config /path/to/config.json
71
+ orbitchat --config /path/to/orbitchat.yaml
96
72
 
97
73
  # Start with adapters defined inline
98
74
  ORBIT_ADAPTERS='[{"name":"Chat","apiKey":"mykey","apiUrl":"https://api.example.com"}]' orbitchat
@@ -204,11 +180,11 @@ Each adapter object supports:
204
180
  |-------|----------|-------------|
205
181
  | `name` | Yes | Display name shown in the agent selector |
206
182
  | `apiKey` | Yes | Backend API key (never exposed to the browser) |
207
- | `apiUrl` | No | Backend URL (defaults to `--api-url` value) |
183
+ | `apiUrl` | No | Backend URL (defaults to `api.url` in `orbitchat.yaml`, then `http://localhost:3000`) |
208
184
  | `description` | No | Short summary shown in dropdowns |
209
185
  | `notes` | No | Markdown content shown in the chat empty state |
210
186
 
211
- If `--default-adapter` is not specified, the first adapter in the list is preselected for new conversations.
187
+ If `api.defaultAdapter` is not set (or left as `default-key`), the first adapter in the list is used.
212
188
 
213
189
  ### Agent Selector UX
214
190
 
@@ -219,56 +195,32 @@ If `--default-adapter` is not specified, the first adapter in the list is presel
219
195
 
220
196
  ## Configuration
221
197
 
222
- ### Configuration Priority
223
-
224
- Configuration is loaded in the following priority order:
225
- 1. CLI arguments (highest priority)
226
- 2. Config file (`~/.orbit-chat-app/config.json`)
227
- 3. Environment variables (`VITE_*`)
228
- 4. Default values (lowest priority)
229
-
230
- ### Configuration File
231
-
232
- Create a config file at `~/.orbit-chat-app/config.json`:
233
-
234
- ```json
235
- {
236
- "apiUrl": "http://localhost:3000",
237
- "defaultKey": "Simple Chat",
238
- "port": 5173,
239
- "host": "localhost",
240
- "enableUploadButton": false,
241
- "enableFeedbackButtons": false,
242
- "maxFilesPerConversation": 5,
243
- "maxFileSizeMB": 50,
244
- "maxTotalFiles": 100,
245
- "maxConversations": 10,
246
- "maxMessagesPerConversation": 1000,
247
- "maxTotalMessages": 10000,
248
- "maxMessageLength": 1000
249
- }
250
- ```
198
+ ### Runtime Config File
199
+
200
+ Runtime settings are loaded from `orbitchat.yaml` (see `orbitchat.yaml.example`).
251
201
 
252
- > **Note:** `defaultKey` should be set to an adapter name (e.g. `"Simple Chat"`). If left as `"default-key"` or empty, the app falls back to the first adapter in `ORBIT_ADAPTERS`.
202
+ Config lookup:
203
+ 1. `--config /path/to/orbitchat.yaml` if provided
204
+ 2. `./orbitchat.yaml` (current working directory)
253
205
 
254
206
  ### Environment Variables
255
207
 
256
- For development, set configuration via environment variables:
208
+ Adapter secrets are provided via environment variables:
257
209
 
258
210
  ```bash
259
- VITE_API_URL=http://localhost:3000
260
- VITE_DEFAULT_KEY=Simple Chat # Adapter name to preselect
261
- VITE_ENABLE_UPLOAD=false
262
- VITE_ENABLE_AUDIO_OUTPUT=false
263
- VITE_ENABLE_AUDIO_INPUT=false
264
- VITE_VOICE_SILENCE_TIMEOUT_MS=4000
265
- VITE_VOICE_RECOGNITION_LANG=
266
- VITE_ENABLE_FEEDBACK=false
267
- VITE_ENABLE_AUTOCOMPLETE=false
268
- VITE_CONSOLE_DEBUG=false
211
+ ORBIT_ADAPTERS='[{"name":"Simple Chat","apiKey":"default-key","apiUrl":"http://localhost:3000"}]'
269
212
  ```
270
213
 
271
- > **Note:** GitHub stats and owner/repo are hardcoded and only configurable via build-time environment variables (`VITE_SHOW_GITHUB_STATS`, `VITE_GITHUB_OWNER`, `VITE_GITHUB_REPO`) for developers who fork the repository.
214
+ - `ORBIT_ADAPTERS` is preferred.
215
+ - `VITE_ADAPTERS` is also supported for compatibility.
216
+ - If both are set, `ORBIT_ADAPTERS` takes precedence.
217
+
218
+ Auth secrets are read from:
219
+ - `VITE_AUTH_DOMAIN`
220
+ - `VITE_AUTH_CLIENT_ID`
221
+ - `VITE_AUTH_AUDIENCE`
222
+
223
+ The CLI also loads `.env` and `.env.local` from the current working directory on startup.
272
224
 
273
225
  ## Development
274
226
 
@@ -307,13 +259,19 @@ orbitchat --port 8080
307
259
 
308
260
  ### Running as a Daemon
309
261
 
310
- Use the included `run-chat-app.sh` script:
262
+ For npm package installs, use:
263
+
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
+ ```
270
+
271
+ From a source checkout, you can also run:
311
272
 
312
273
  ```bash
313
- ./run-chat-app.sh --start # Start in background
314
- ./run-chat-app.sh --start 8080 # Start on custom port
315
- ./run-chat-app.sh --stop # Stop
316
- ./run-chat-app.sh --status # Check status
274
+ ./orbitchat.sh --start
317
275
  ```
318
276
 
319
277
  ## Available Scripts
@@ -394,6 +352,16 @@ If the agent selector shows no adapters:
394
352
  2. Check the CLI startup logs for "Available Adapters: ..."
395
353
  3. Verify each adapter has a `name` and `apiKey` field
396
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
+
397
365
  ### File Upload Issues
398
366
 
399
367
  - **File size exceeded** — Check file size against the configured limit
@@ -405,9 +373,11 @@ If the agent selector shows no adapters:
405
373
 
406
374
  Enable debug logging:
407
375
  ```bash
408
- orbitchat --console-debug
376
+ # in orbitchat.yaml
377
+ debug:
378
+ consoleDebug: true
409
379
  ```
410
- Or set `VITE_CONSOLE_DEBUG=true` during development. This shows detailed API and file upload information in the browser console.
380
+ This enables detailed runtime logging from the CLI server.
411
381
 
412
382
  ## Deployment Checklist
413
383
 
@@ -416,4 +386,4 @@ Or set `VITE_CONSOLE_DEBUG=true` during development. This shows detailed API and
416
386
  3. **Run behind HTTPS** — use a reverse proxy like nginx or Caddy in front of `orbitchat`
417
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
418
388
  5. **Tune limits** — set `--max-conversations`, `--max-message-length`, etc. appropriate for your deployment
419
- 6. **Monitor logs** — use `run-chat-app.sh --start` for daemon mode with log file, or run directly and pipe to your log aggregator
389
+ 6. **Monitor logs** — use `orbitchat-daemon --start` for daemon mode with log file, or run directly and pipe to your log aggregator