orbitchat 3.1.1 → 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.
- package/README.md +79 -245
- package/bin/orbitchat.js +258 -729
- package/dist/assets/{ChartRenderer-CapBCpbV.js → ChartRenderer-C6fHQxUM.js} +1 -1
- package/dist/assets/{MermaidRenderer-DQJRirnm.js → MermaidRenderer-uOsrV112.js} +5 -5
- package/dist/assets/{MusicRenderer-9vnA54gg.js → MusicRenderer-C-8fXPzl.js} +2 -2
- package/dist/assets/{SVGRenderer-By7CKtqU.js → SVGRenderer-7yLFncSt.js} +1 -1
- package/dist/assets/{_basePickBy-Dm-zx8im.js → _basePickBy-BaAS07_g.js} +1 -1
- package/dist/assets/{_baseUniq-DLPvoy-d.js → _baseUniq-C0rd4rnF.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-B1kMlTMW.js → architectureDiagram-VXUJARFQ-DB0b91Sa.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-BlglDb-U.js → blockDiagram-VD42YOAC-BQ4Z_gCK.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CaZm--Yy.js → c4Diagram-YG6GDRKO-Dtix_O1L.js} +1 -1
- package/dist/assets/channel-CuLY6R17.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-4Kq-2AyN.js → chunk-4BX2VUAB-BMK9KFRb.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-FApueVFk.js → chunk-55IACEB6-DireVK0h.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-CHox7be9.js → chunk-B4BG7PRW-BRwwDrXp.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-N5sePLFo.js → chunk-DI55MBZ5-DeD4e72t.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-BSbBs0xy.js → chunk-FMBD7UC4-D1-BcrE_.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-ByurI9-W.js → chunk-QN33PNHL-5dHN5THo.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-Yy8VVut9.js → chunk-QZHKN3VN-BFj7kkUd.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-B5oe8pT4.js → chunk-TZMSLE5B-B5JCOX6Y.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-CCd0SByT.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-CCd0SByT.js +1 -0
- package/dist/assets/clone-DRrrmN93.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-DS_-k6qR.js → cose-bilkent-S5V4N54A-CmgTSX_t.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-DgkwJjVY.js → dagre-6UL2VRFP-C3rzyEFR.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-C9su64f9.js → diagram-PSM6KHXK-CyHeoxQN.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-DY6-9Dbc.js → diagram-QEK2KX5R-2gCRyxH5.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-_Wub-Eik.js → diagram-S2PKOQOG-BV4hBni4.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-Gwx9nSAM.js → erDiagram-Q2GNP2WA-DLJ0STwx.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-DmrXTF_S.js → flowDiagram-NV44I4VS-DaJev1Dk.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-DymVUgsd.js → ganttDiagram-JELNMOA3-BVqSlqWd.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-D3VSQFT4.js → gitGraphDiagram-V2S2FVAM-fILg4kGK.js} +1 -1
- package/dist/assets/{graph-BIe-N9yO.js → graph-CMQ9In6q.js} +1 -1
- package/dist/assets/{index-BiM6VNSE.js → index-Bp6Dtnjv.js} +37 -37
- package/dist/assets/{index-B-NnBj1Y.js → index-CeOmPokb.js} +116 -116
- package/dist/assets/index-w5RjGGjS.css +1 -0
- package/dist/assets/{infoDiagram-HS3SLOUP-D2DeUrgk.js → infoDiagram-HS3SLOUP-D7dyBxUc.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-GxFhv1XB.js → journeyDiagram-XKPGCS4Q-B5mS1ZV0.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-BhT-ga9I.js → kanban-definition-3W4ZIXB7-BiWSAAjN.js} +1 -1
- package/dist/assets/{layout-38O87Ivt.js → layout-BME0mjSq.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-DfKjmcaV.js → mindmap-definition-VGOIOE7T-CoH0z1ra.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-D7lDWRGN.js → pieDiagram-ADFJNKIX-Dq0SKRlZ.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-CPtZ8LgW.js → quadrantDiagram-AYHSOK5B-DwutakEK.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-h-H7R8sR.js → requirementDiagram-UZGBJVZJ-BzFetBkD.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-C6cn5g4m.js → sankeyDiagram-TZEHDZUN-BbOUy78i.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-B6AwcQ4F.js → sequenceDiagram-WL72ISMW-1ZNpnZKs.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-B4ne7z3I.js → stateDiagram-FKZM4ZOC-BAP0pbLV.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-HGuFIOmd.js +1 -0
- package/dist/assets/{timeline-definition-IT6M3QCI-BmjJnJ-r.js → timeline-definition-IT6M3QCI-CuyYlb9E.js} +1 -1
- package/dist/assets/treemap-GDKQZRPO-CUELWxdP.js +160 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-C3lVgboM.js → xychartDiagram-PRI3JC2R-CaZOodKt.js} +1 -1
- package/dist/index.html +2 -2
- package/orbitchat.sh +94 -36
- package/package.json +1 -1
- package/dist/assets/channel-BjUDQMqf.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-BhHCvLfM.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-BhHCvLfM.js +0 -1
- package/dist/assets/clone-oQOn4Sap.js +0 -1
- package/dist/assets/index-BA5Mw76S.css +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-C_qp8U90.js +0 -1
- package/dist/assets/treemap-GDKQZRPO-CBUbyJIX.js +0 -160
package/README.md
CHANGED
|
@@ -22,19 +22,26 @@ Installed CLI commands:
|
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
|
-
1. Define your
|
|
25
|
+
1. Define your adapter secrets via the `ORBIT_ADAPTER_KEYS` or `VITE_ADAPTER_KEYS` environment variable:
|
|
26
26
|
```bash
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
]'
|
|
27
|
+
# Mapping of Agent Name -> API Key
|
|
28
|
+
export ORBIT_ADAPTER_KEYS='{"Simple Chat":"my-secret-key"}'
|
|
30
29
|
```
|
|
31
30
|
|
|
32
|
-
2.
|
|
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
|
-
|
|
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
|
|
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
|
|
74
|
-
|
|
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
|
|
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
|
-
|
|
136
|
+
Configuration is split between **metadata/URLs** (in `orbitchat.yaml`) and **secrets** (in environment variables).
|
|
158
137
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
162
|
+
Provide the API keys via `ORBIT_ADAPTER_KEYS` (or `VITE_ADAPTER_KEYS`) as a JSON object:
|
|
188
163
|
|
|
189
|
-
|
|
164
|
+
```bash
|
|
165
|
+
VITE_ADAPTER_KEYS='{
|
|
166
|
+
"Simple Chat": "secret-key-1",
|
|
167
|
+
"Document QA": "secret-key-2"
|
|
168
|
+
}'
|
|
169
|
+
```
|
|
190
170
|
|
|
191
|
-
|
|
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
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
215
|
-
|
|
216
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
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
|
-
|
|
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
|
-
|
|
305
|
-
|
|
306
|
-
|
|
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
|
|
331
|
-
- Keep `
|
|
332
|
-
- Run the proxy behind HTTPS
|
|
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
|
-
##
|
|
254
|
+
## License
|
|
416
255
|
|
|
417
|
-
|
|
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
|