omnius 1.0.322 → 1.0.323
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 +220 -17
- package/dist/index.js +3473 -2669
- package/docs/reference/rest-api.md +16 -0
- package/docs/reference/slash-commands.md +108 -46
- package/npm-shrinkwrap.json +15 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -77,6 +77,53 @@ omnius serve
|
|
|
77
77
|
| Architecture | [Architecture overview](docs/architecture/overview.md) |
|
|
78
78
|
| Agent-explorable docs | [Agent memory docs index](docs/agent-memory/INDEX.md) |
|
|
79
79
|
|
|
80
|
+
## Shared Media Dependencies
|
|
81
|
+
|
|
82
|
+
Image, video, audio, and music generation share a **single, system-wide dependency store** instead of duplicating heavy runtimes per project or per Telegram group.
|
|
83
|
+
|
|
84
|
+
Earlier builds wrote a private Python venv plus Hugging Face / Torch / pip caches under every scoped working directory (for example `…/telegram-creative/<group-id>/.omnius/image-gen/.venv`). On a busy machine the same multi-gigabyte diffusers stack and model weights were re-downloaded once per group — tens of gigabytes of pure duplication.
|
|
85
|
+
|
|
86
|
+
Everything now resolves to one source of truth under `~/.omnius` (override with `OMNIUS_HOME`):
|
|
87
|
+
|
|
88
|
+
| Location | Holds |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| `~/.omnius/runtimes/<kind>/.venv-<backend>` | One shared Python venv per kind+backend (image/video/audio) |
|
|
91
|
+
| `~/.omnius/models/huggingface/{hub,transformers,diffusers}` | Shared model weights — downloaded once, reused everywhere |
|
|
92
|
+
| `~/.omnius/models/{torch,cache,pip-cache}` | Shared Torch hub, XDG, and pip caches |
|
|
93
|
+
| `~/.omnius/models/_meta.json` | LRU usage index for automatic disk-pressure eviction |
|
|
94
|
+
| `~/.omnius/media/{images,videos,audio,music}` | Global generated-media gallery (project-independent) |
|
|
95
|
+
|
|
96
|
+
Project directories keep only lightweight session artifacts; no venvs or model weights are written per project.
|
|
97
|
+
|
|
98
|
+
**Migrate and dedup existing machines.** A one-time cleanup consolidates any legacy per-group caches into the unified store — unique weights are moved (never re-downloaded), duplicates and stale venvs are reclaimed:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# TUI — current project only
|
|
102
|
+
/models cleanup
|
|
103
|
+
# TUI — every project + nested scoped group on this machine (dry-run first)
|
|
104
|
+
/models cleanup --all --dry-run
|
|
105
|
+
/models cleanup --all
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# REST — preview, then apply
|
|
110
|
+
curl -s -X POST localhost:11435/v1/media/migrate -H 'content-type: application/json' -d '{"dryRun":true}'
|
|
111
|
+
curl -s -X POST localhost:11435/v1/media/migrate -H 'content-type: application/json' -d '{}'
|
|
112
|
+
# Inspect store + reclaimable legacy caches
|
|
113
|
+
curl -s localhost:11435/v1/media/store
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Generate over REST.** The daemon (default `127.0.0.1:11435`, a port in the IANA dynamic/private range that avoids common system-service collisions) exposes the local generators so any user on the machine can list models, generate, and browse the global gallery without the CLI:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
curl -s localhost:11435/v1/media/models
|
|
120
|
+
curl -s -X POST localhost:11435/v1/media/image -H 'content-type: application/json' -d '{"prompt":"a compact robot painter"}'
|
|
121
|
+
curl -s -X POST localhost:11435/v1/media/music -H 'content-type: application/json' -d '{"prompt":"warm lo-fi piano loop"}'
|
|
122
|
+
curl -s localhost:11435/v1/media/gallery
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
The same surface drives the **Generate** tab in the web UI (`http://127.0.0.1:11435`) — pick a kind (image/video/audio/music), choose a model loaded from the system, generate, and review every previously generated file in one global gallery.
|
|
126
|
+
|
|
80
127
|
## Recent Highlights
|
|
81
128
|
|
|
82
129
|
- `/realtime` and REST `realtime: true` provide short, natural, SOUL.md-aware conversation for ASR/TTS clients.
|
|
@@ -90,33 +137,189 @@ omnius serve
|
|
|
90
137
|
|
|
91
138
|
## REST API
|
|
92
139
|
|
|
93
|
-
Start:
|
|
140
|
+
Start the daemon (default `http://127.0.0.1:11435`; interactive docs at `/docs`, machine spec at `/openapi.json`):
|
|
94
141
|
|
|
95
142
|
```bash
|
|
96
143
|
omnius serve
|
|
97
144
|
```
|
|
98
145
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
GET /docs
|
|
103
|
-
GET /openapi.json
|
|
104
|
-
POST /v1/chat
|
|
105
|
-
POST /v1/chat/completions
|
|
106
|
-
POST /v1/run
|
|
107
|
-
GET /v1/events
|
|
108
|
-
GET /v1/skills
|
|
109
|
-
POST /v1/tools/{name}/call
|
|
110
|
-
WS /v1/voicechat/ws
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
For shared deployments, use bearer keys:
|
|
146
|
+
For shared deployments, gate access with scoped bearer keys (`read` < `run` < `admin`):
|
|
114
147
|
|
|
115
148
|
```bash
|
|
116
149
|
OMNIUS_REST_API_KEYS="read-key:read:grafana,run-key:run:ci:60:100000:3,admin-key:admin:ops" omnius serve
|
|
150
|
+
# then: Authorization: Bearer <key>
|
|
117
151
|
```
|
|
118
152
|
|
|
119
|
-
|
|
153
|
+
The complete endpoint inventory follows. It is kept in lockstep with the served OpenAPI spec by `pnpm docs:check`; the canonical machine contract is generated from [`packages/cli/src/api/openapi.ts`](packages/cli/src/api/openapi.ts) and mirrored in [`docs/reference/rest-api.md`](docs/reference/rest-api.md).
|
|
154
|
+
|
|
155
|
+
### Docs and compatibility aliases
|
|
156
|
+
|
|
157
|
+
| Method | Path | Purpose |
|
|
158
|
+
| --- | --- | --- |
|
|
159
|
+
| `GET` | `/docs` · `/api/docs` · `/swagger-ui` | Swagger UI |
|
|
160
|
+
| `GET` | `/openapi.json` · `/openapi.yaml` · `/v3/api-docs` · `/swagger.json` · `/api-docs` | OpenAPI spec (JSON/YAML + aliases) |
|
|
161
|
+
| `GET` | `/redoc` | ReDoc renderer |
|
|
162
|
+
|
|
163
|
+
### Health and observability
|
|
164
|
+
|
|
165
|
+
| Method | Path | Purpose |
|
|
166
|
+
| --- | --- | --- |
|
|
167
|
+
| `GET` | `/health` · `/health/ready` · `/health/startup` | Liveness, backend readiness, startup probes |
|
|
168
|
+
| `GET` | `/version` | Package version and platform |
|
|
169
|
+
| `GET` | `/metrics` | Prometheus metrics |
|
|
170
|
+
| `GET` | `/v1/events` | Server-sent event stream |
|
|
171
|
+
| `GET` | `/v1/usage` | Token usage and rate limits |
|
|
172
|
+
| `GET` | `/v1/audit` | Audit log query |
|
|
173
|
+
| `GET` | `/v1/cost` | Cost tracker |
|
|
174
|
+
| `GET` | `/v1/system` | CPU, RAM, GPU, and system snapshot |
|
|
175
|
+
|
|
176
|
+
### Inference and chat
|
|
177
|
+
|
|
178
|
+
| Method | Path | Purpose |
|
|
179
|
+
| --- | --- | --- |
|
|
180
|
+
| `GET` | `/v1/models` · `/api/tags` | Aggregated model list (OpenAI + Ollama tags) |
|
|
181
|
+
| `POST` | `/v1/chat/completions` | OpenAI-compatible chat completion |
|
|
182
|
+
| `POST` | `/v1/chat` | Stateful Omnius chat |
|
|
183
|
+
| `POST` | `/api/chat` | Ollama-compatible chat alias |
|
|
184
|
+
| `POST` | `/v1/generate` · `/api/generate` | One-shot generation (Ollama-compatible) |
|
|
185
|
+
| `POST` | `/v1/embeddings` · `/api/embed` | Embeddings (OpenAI + Ollama aliases) |
|
|
186
|
+
| `GET` | `/v1/chat/sessions` | Active chat sessions |
|
|
187
|
+
| `POST` | `/v1/chat/check-in` | Steering check-in for active chat |
|
|
188
|
+
|
|
189
|
+
### Agentic runs
|
|
190
|
+
|
|
191
|
+
| Method | Path | Purpose |
|
|
192
|
+
| --- | --- | --- |
|
|
193
|
+
| `POST` | `/v1/run` | Submit agentic task |
|
|
194
|
+
| `GET` | `/v1/runs` · `/v1/runs/{id}` | List runs · get run details |
|
|
195
|
+
| `DELETE` | `/v1/runs/{id}` | Abort run |
|
|
196
|
+
| `POST`/`GET` | `/v1/todos` | Create/update · list sessions with todos |
|
|
197
|
+
| `GET`/`DELETE` | `/v1/todos/{session_id}` | Get · delete session todos |
|
|
198
|
+
| `POST` | `/v1/evaluate` | Evaluate a run |
|
|
199
|
+
| `POST` | `/v1/index` | Trigger repository indexing |
|
|
200
|
+
|
|
201
|
+
### Configuration, keys, profiles, projects
|
|
202
|
+
|
|
203
|
+
| Method | Path | Purpose |
|
|
204
|
+
| --- | --- | --- |
|
|
205
|
+
| `GET`/`PATCH` | `/v1/config` | Read · update daemon config |
|
|
206
|
+
| `GET`/`PUT` | `/v1/config/model` | Current model · switch model |
|
|
207
|
+
| `POST` | `/v1/config/model/check` | Probe model readiness |
|
|
208
|
+
| `GET`/`PUT` | `/v1/config/endpoint` | Current endpoint · switch endpoint |
|
|
209
|
+
| `POST` | `/v1/config/endpoint/test` | Probe endpoint |
|
|
210
|
+
| `GET`/`DELETE` | `/v1/config/endpoint/history` | Endpoint history · remove item |
|
|
211
|
+
| `POST` | `/v1/share/generate` | Generate remote-access share URL |
|
|
212
|
+
| `GET`/`POST` | `/v1/keys` | List · mint runtime API keys |
|
|
213
|
+
| `DELETE` | `/v1/keys/{prefix}` | Revoke runtime keys by prefix |
|
|
214
|
+
| `GET`/`POST` | `/v1/profiles` | List · create tool profiles |
|
|
215
|
+
| `GET`/`DELETE` | `/v1/profiles/{name}` | Get · delete profile |
|
|
216
|
+
| `GET`/`DELETE` | `/v1/projects` | List · unregister projects |
|
|
217
|
+
| `GET` | `/v1/projects/current` | Current project |
|
|
218
|
+
| `POST` | `/v1/projects/switch` · `/v1/projects/register` · `/v1/projects/rename` | Switch · register · rename project |
|
|
219
|
+
| `GET`/`PUT`/`DELETE` | `/v1/projects/preferences` | Read · patch · reset project preferences |
|
|
220
|
+
|
|
221
|
+
### Skills, commands, tools, MCP
|
|
222
|
+
|
|
223
|
+
| Method | Path | Purpose |
|
|
224
|
+
| --- | --- | --- |
|
|
225
|
+
| `GET` | `/v1/skills` · `/v1/skills/{name}` | List · load skill content |
|
|
226
|
+
| `GET` | `/v1/commands` | List slash commands |
|
|
227
|
+
| `POST` | `/v1/commands/{cmd}` | Execute slash command |
|
|
228
|
+
| `GET` | `/v1/tools` · `/v1/tools/{name}` | List · tool metadata |
|
|
229
|
+
| `POST` | `/v1/tools/{name}/call` | Call tool |
|
|
230
|
+
| `GET` | `/v1/mcps` · `/v1/mcps/{name}` | List · MCP server details |
|
|
231
|
+
| `POST` | `/v1/mcps/{name}/call` | Call MCP tool |
|
|
232
|
+
| `GET` | `/v1/hooks` · `/v1/agents` | Hook registry · agent type registry |
|
|
233
|
+
| `GET` | `/v1/codegraph/snapshot` · `/v1/codegraph/events` | Code graph snapshot · SSE |
|
|
234
|
+
|
|
235
|
+
### AIWG
|
|
236
|
+
|
|
237
|
+
| Method | Path | Purpose |
|
|
238
|
+
| --- | --- | --- |
|
|
239
|
+
| `GET` | `/v1/aiwg` | AIWG root and control map |
|
|
240
|
+
| `GET` | `/v1/aiwg/frameworks` · `/v1/aiwg/frameworks/{name}` · `/v1/aiwg/frameworks/{name}/content` | List · details · tier-aware content |
|
|
241
|
+
| `GET` | `/v1/aiwg/skills` · `/v1/aiwg/skills/{name}` | List · load AIWG skill |
|
|
242
|
+
| `GET` | `/v1/aiwg/agents` · `/v1/aiwg/agents/{name}` | List · load AIWG agent |
|
|
243
|
+
| `GET` | `/v1/aiwg/addons` | List AIWG addons |
|
|
244
|
+
| `POST` | `/v1/aiwg/use` · `/v1/aiwg/expand` | Activation bundle · expand item |
|
|
245
|
+
|
|
246
|
+
### Memory, sessions, context
|
|
247
|
+
|
|
248
|
+
| Method | Path | Purpose |
|
|
249
|
+
| --- | --- | --- |
|
|
250
|
+
| `GET` | `/v1/memory` | Memory backend summary |
|
|
251
|
+
| `POST` | `/v1/memory/search` · `/v1/memory/write` | Search · write memory |
|
|
252
|
+
| `GET` | `/v1/memory/episodes` · `/v1/memory/failures` | List episodes · failures |
|
|
253
|
+
| `GET` | `/v1/sessions` · `/v1/sessions/{id}` | List task sessions · get history |
|
|
254
|
+
| `GET` | `/v1/context` | Current context snapshot |
|
|
255
|
+
| `POST` | `/v1/context/save` · `/v1/context/compact` | Save entry · request compaction |
|
|
256
|
+
| `GET` | `/v1/context/restore` | Build restore prompt |
|
|
257
|
+
|
|
258
|
+
### Files, nexus, ollama pool
|
|
259
|
+
|
|
260
|
+
| Method | Path | Purpose |
|
|
261
|
+
| --- | --- | --- |
|
|
262
|
+
| `GET` | `/v1/files` | List workspace directory |
|
|
263
|
+
| `POST` | `/v1/files/read` | Read workspace file |
|
|
264
|
+
| `GET` | `/v1/nexus/status` | Nexus peer state |
|
|
265
|
+
| `GET` | `/v1/sponsors` | Sponsor directory cache |
|
|
266
|
+
| `GET` | `/v1/ollama/pool/processes` | Ollama process inventory |
|
|
267
|
+
| `POST` | `/v1/ollama/pool/cleanup` | Cleanup stale Ollama pool processes |
|
|
268
|
+
|
|
269
|
+
### Voice, audio, vision
|
|
270
|
+
|
|
271
|
+
| Method | Path | Purpose |
|
|
272
|
+
| --- | --- | --- |
|
|
273
|
+
| `GET` | `/v1/voice/state` | Voice runtime status |
|
|
274
|
+
| `GET`/`POST` | `/v1/voice/models` · `/v1/voice/models/switch` | List · switch TTS model |
|
|
275
|
+
| `GET`/`POST` | `/v1/voice/supertonic-settings` | Read · update voice tuning |
|
|
276
|
+
| `GET`/`POST` | `/v1/voice/asr-models` · `/v1/voice/asr-models/switch` | List · switch ASR model |
|
|
277
|
+
| `POST` | `/v1/voice/tts` · `/v1/audio/speech` | Synthesize speech (+ OpenAI alias) |
|
|
278
|
+
| `POST` | `/v1/voice/transcribe` · `/v1/audio/transcriptions` · `/v1/voice/transcribe/stream` | Transcribe (+ alias + streaming) |
|
|
279
|
+
| `GET`/`POST` | `/v1/voice/clone-refs` | List · upload clone reference |
|
|
280
|
+
| `POST` | `/v1/voice/clone-refs/upload` · `/v1/voice/clone-refs/from-url` | Upload · fetch clone reference |
|
|
281
|
+
| `POST` | `/v1/voice/clone-refs/{filename}/activate` · `/v1/voice/clone-refs/{filename}/rename` | Activate · rename clone reference |
|
|
282
|
+
| `DELETE` | `/v1/voice/clone-refs/{filename}` | Delete clone reference |
|
|
283
|
+
| `POST` | `/v1/voice/speak` | Broadcast speech to voicechat clients |
|
|
284
|
+
| `GET` | `/v1/voicechat/ws` | WebSocket upgrade for full-duplex voicechat |
|
|
285
|
+
| `POST` | `/v1/vision/describe` | Vision describe placeholder |
|
|
286
|
+
|
|
287
|
+
### Generative media
|
|
288
|
+
|
|
289
|
+
Backed by the unified `~/.omnius` store and shared venvs (see [Shared Media Dependencies](#shared-media-dependencies)). Outputs land in the global gallery at `~/.omnius/media/{images,videos,audio,music}`.
|
|
290
|
+
|
|
291
|
+
| Method | Path | Purpose |
|
|
292
|
+
| --- | --- | --- |
|
|
293
|
+
| `GET` | `/v1/media/models` | List available image/video/audio/music models |
|
|
294
|
+
| `GET` | `/v1/media/store` | Unified store disk usage + reclaimable legacy caches |
|
|
295
|
+
| `POST` | `/v1/media/migrate` | Dedup + migrate legacy per-group caches into the unified store |
|
|
296
|
+
| `POST` | `/v1/media/image` · `/v1/media/video` · `/v1/media/audio` · `/v1/media/music` | Generate media (run scope) |
|
|
297
|
+
| `GET` | `/v1/media/gallery` | List previously generated media (global, newest first) |
|
|
298
|
+
| `GET` | `/v1/media/file` | Stream one generated media file |
|
|
299
|
+
|
|
300
|
+
### Engines and scheduled jobs
|
|
301
|
+
|
|
302
|
+
| Method | Path | Purpose |
|
|
303
|
+
| --- | --- | --- |
|
|
304
|
+
| `GET` | `/v1/engines` | Long-running engine status |
|
|
305
|
+
| `GET` | `/v1/scheduled` · `/v1/scheduled/all` · `/v1/scheduled/status` | List · list all · scheduler status |
|
|
306
|
+
| `POST` | `/v1/scheduled/kill` · `/v1/scheduled/fixup` · `/v1/scheduled/reconcile` | Kill · reconcile · force reconcile |
|
|
307
|
+
| `GET` | `/v1/services/systemd` | Systemd service status |
|
|
308
|
+
| `GET` | `/v1/update` | Self-update status |
|
|
309
|
+
|
|
310
|
+
### AIMS governance (ISO/IEC 42001:2023)
|
|
311
|
+
|
|
312
|
+
| Method | Path | Purpose |
|
|
313
|
+
| --- | --- | --- |
|
|
314
|
+
| `GET` | `/v1/aims` | AIMS root and endpoint index |
|
|
315
|
+
| `GET`/`PUT` | `/v1/aims/policies` | Policy register · replace |
|
|
316
|
+
| `GET` | `/v1/aims/roles` · `/v1/aims/resources` | Roles · resource inventory |
|
|
317
|
+
| `GET`/`POST` | `/v1/aims/impact-assessments` | List · file impact assessment |
|
|
318
|
+
| `GET` | `/v1/aims/lifecycle` · `/v1/aims/data-quality` · `/v1/aims/transparency` · `/v1/aims/usage` · `/v1/aims/suppliers` | Lifecycle, data quality, transparency, usage, suppliers |
|
|
319
|
+
| `GET`/`POST` | `/v1/aims/incidents` | List · file incident |
|
|
320
|
+
| `GET` | `/v1/aims/oversight` · `/v1/aims/decisions` · `/v1/aims/config-history` | Oversight gates · decision log · config history |
|
|
321
|
+
|
|
322
|
+
For per-endpoint schemas, parameters, and response shapes, see the served `/openapi.json` and the maintained inventory in [`docs/reference/rest-api.md`](docs/reference/rest-api.md).
|
|
120
323
|
|
|
121
324
|
## Agent-Explorable Documentation
|
|
122
325
|
|