omnius 1.0.159 → 1.0.161
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/.aiwg/addons/omnius-docs/README.md +5 -0
- package/.aiwg/addons/omnius-docs/manifest.json +32 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-docs/SKILL.md +48 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-ops-docs/SKILL.md +32 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-realtime-docs/SKILL.md +30 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-sponsor-docs/SKILL.md +31 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-telegram-docs/SKILL.md +30 -0
- package/.aiwg/addons/omnius-rest-docs/README.md +7 -0
- package/.aiwg/addons/omnius-rest-docs/manifest.json +24 -0
- package/.aiwg/addons/omnius-rest-docs/skills/omnius-rest-docs/SKILL.md +72 -0
- package/README.md +115 -5011
- package/dist/index.js +1353 -363
- package/docs/.vitepress/config.mts +108 -0
- package/docs/agent-memory/INDEX.md +38 -0
- package/docs/agent-memory/index.md +14 -0
- package/docs/architecture/overview.md +30 -0
- package/docs/getting-started/first-run.md +38 -0
- package/docs/getting-started/install.md +58 -0
- package/docs/getting-started/model-providers.md +48 -0
- package/docs/guides/media-generation.md +88 -0
- package/docs/guides/realtime.md +138 -0
- package/docs/guides/sponsor-and-cohere.md +123 -0
- package/docs/guides/telegram.md +95 -0
- package/docs/guides/tui-workflows.md +48 -0
- package/docs/index.md +30 -0
- package/docs/operations/runtime-hygiene.md +75 -0
- package/docs/operations/security-and-remote-access.md +70 -0
- package/docs/reference/configuration.md +45 -0
- package/docs/reference/rest-api.md +225 -0
- package/docs/reference/slash-commands.md +2095 -0
- package/docs/rest/INDEX.md +129 -0
- package/docs/rest/QUICKREF.md +125 -0
- package/docs/rest/REST-DOCS-MANIFEST.json +27 -0
- package/docs/rest/auth-and-scopes.md +101 -0
- package/docs/rest/endpoints/aims.md +26 -0
- package/docs/rest/endpoints/aiwg.md +44 -0
- package/docs/rest/endpoints/chat.md +101 -0
- package/docs/rest/endpoints/config.md +53 -0
- package/docs/rest/endpoints/events.md +63 -0
- package/docs/rest/endpoints/files.md +18 -0
- package/docs/rest/endpoints/memory.md +42 -0
- package/docs/rest/endpoints/run.md +52 -0
- package/docs/rest/endpoints/skills.md +41 -0
- package/docs/rest/endpoints/tools.md +62 -0
- package/docs/rest/endpoints/voice-vision.md +80 -0
- package/docs/rest/errors-pagination-etags.md +84 -0
- package/docs/rest/examples/curl.md +84 -0
- package/docs/rest/examples/openai-sdk.md +59 -0
- package/docs/rest/openapi-source.md +36 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +5 -2
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Omnius REST API Docs
|
|
2
|
+
|
|
3
|
+
This directory is the human-readable REST API reference for Omnius. It is meant to be explored incrementally by agents and humans.
|
|
4
|
+
|
|
5
|
+
Canonical sources:
|
|
6
|
+
|
|
7
|
+
- Runtime OpenAPI generator: `packages/cli/src/api/openapi.ts`
|
|
8
|
+
- Live OpenAPI document: `GET /openapi.json`
|
|
9
|
+
- Swagger UI: `GET /docs` or `GET /api/docs`
|
|
10
|
+
- ReDoc: `GET /redoc`
|
|
11
|
+
- AsyncAPI voicechat document: generated from `packages/cli/src/api/openapi.ts`
|
|
12
|
+
|
|
13
|
+
## How To Explore
|
|
14
|
+
|
|
15
|
+
Use this index first, then open the smallest relevant family file:
|
|
16
|
+
|
|
17
|
+
| Need | Read |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| Quick commands and examples | `docs/rest/QUICKREF.md` |
|
|
20
|
+
| Full maintained endpoint inventory | `docs/reference/rest-api.md` |
|
|
21
|
+
| Auth, scopes, rate limits, API keys | `docs/rest/auth-and-scopes.md` |
|
|
22
|
+
| Errors, pagination, ETags, request IDs | `docs/rest/errors-pagination-etags.md` |
|
|
23
|
+
| OpenAPI and docs renderers | `docs/rest/openapi-source.md` |
|
|
24
|
+
| Chat, realtime, OpenAI-compatible inference | `docs/rest/endpoints/chat.md` |
|
|
25
|
+
| Agentic jobs and run lifecycle | `docs/rest/endpoints/run.md` |
|
|
26
|
+
| Config, endpoints, keys, profiles, projects | `docs/rest/endpoints/config.md` |
|
|
27
|
+
| Memory, sessions, context | `docs/rest/endpoints/memory.md` |
|
|
28
|
+
| Skills and slash commands | `docs/rest/endpoints/skills.md` |
|
|
29
|
+
| AIWG cascade loader | `docs/rest/endpoints/aiwg.md` |
|
|
30
|
+
| Tools, MCP, code graph | `docs/rest/endpoints/tools.md` |
|
|
31
|
+
| Events, metrics, usage, audit, system | `docs/rest/endpoints/events.md` |
|
|
32
|
+
| Files | `docs/rest/endpoints/files.md` |
|
|
33
|
+
| Voice, audio, vision, voicechat WebSocket | `docs/rest/endpoints/voice-vision.md` |
|
|
34
|
+
| AIMS governance | `docs/rest/endpoints/aims.md` |
|
|
35
|
+
| Curl examples | `docs/rest/examples/curl.md` |
|
|
36
|
+
| OpenAI SDK examples | `docs/rest/examples/openai-sdk.md` |
|
|
37
|
+
|
|
38
|
+
## Start The Daemon
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
omnius serve
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Default base URL:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
http://127.0.0.1:11435
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Bind a custom port:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
omnius serve --port 9000
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Bind from environment:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
OMNIUS_HOST=0.0.0.0:11435 omnius serve
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Auth Model
|
|
63
|
+
|
|
64
|
+
Local anonymous requests default to read behavior unless the runtime is configured for insecure loopback admin. Remote/shared deployments should use bearer keys.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
OMNIUS_API_KEY="admin-secret" omnius serve
|
|
68
|
+
OMNIUS_API_KEYS="read-key:read:grafana,run-key:run:ci:60:100000:3,admin-key:admin:ops" omnius serve
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Scopes:
|
|
72
|
+
|
|
73
|
+
- `read`: inspect models, health, usage, memory search, skills, tools metadata, events, and summaries.
|
|
74
|
+
- `run`: submit tasks and invoke permitted run-scope tools.
|
|
75
|
+
- `admin`: mutate config, keys, high-risk controls, and admin-only tools.
|
|
76
|
+
|
|
77
|
+
## Common Conventions
|
|
78
|
+
|
|
79
|
+
- Errors use RFC 7807-style Problem Details where implemented.
|
|
80
|
+
- List endpoints use `{ "data": [...], "pagination": { "limit": 50, "offset": 0, "total": 0, "has_more": false } }` where implemented.
|
|
81
|
+
- Cacheable GET responses may include `ETag`; send `If-None-Match` for conditional reads.
|
|
82
|
+
- Responses include `X-API-Version` and `X-Request-ID` where the API middleware can attach them.
|
|
83
|
+
- Use `Authorization: Bearer <key>` when auth is enabled.
|
|
84
|
+
- Use `X-Request-ID` to correlate client logs with the daemon audit log.
|
|
85
|
+
|
|
86
|
+
## Endpoint Families
|
|
87
|
+
|
|
88
|
+
| Family | Representative endpoints |
|
|
89
|
+
| --- | --- |
|
|
90
|
+
| Health | `/health`, `/health/ready`, `/health/startup`, `/version`, `/metrics` |
|
|
91
|
+
| Inference and chat | `/v1/models`, `/v1/chat/completions`, `/v1/embeddings`, `/v1/chat`, `/v1/generate`, `/api/generate`, `/v1/chat/sessions`, `/v1/chat/check-in` |
|
|
92
|
+
| AIWG | `/v1/aiwg`, `/v1/aiwg/frameworks`, `/v1/aiwg/skills`, `/v1/aiwg/use`, `/v1/aiwg/expand` |
|
|
93
|
+
| Runs | `/v1/run`, `/v1/runs`, `/v1/runs/{id}`, `/v1/todos`, `/v1/todos/{session_id}` |
|
|
94
|
+
| Config | `/v1/config`, `/v1/config/model`, `/v1/config/endpoint`, `/v1/config/endpoint/test`, `/v1/config/endpoint/history`, `/v1/share/generate` |
|
|
95
|
+
| Metering and audit | `/v1/usage`, `/v1/audit`, `/v1/cost`, `/v1/system` |
|
|
96
|
+
| Runtime keys | `/v1/keys`, `/v1/keys/{prefix}` |
|
|
97
|
+
| Profiles | `/v1/profiles`, `/v1/profiles/{name}` |
|
|
98
|
+
| Files | `/v1/files`, `/v1/files/read` |
|
|
99
|
+
| Skills and commands | `/v1/skills`, `/v1/skills/{name}`, `/v1/commands`, `/v1/commands/{cmd}` |
|
|
100
|
+
| MCP | `/v1/mcps`, `/v1/mcps/{name}`, `/v1/mcps/{name}/call` |
|
|
101
|
+
| Tools | `/v1/tools`, `/v1/tools/{name}`, `/v1/tools/{name}/call`, `/v1/hooks`, `/v1/agents` |
|
|
102
|
+
| Memory | `/v1/memory`, `/v1/memory/search`, `/v1/memory/write`, `/v1/memory/episodes`, `/v1/memory/failures` |
|
|
103
|
+
| Events | `/v1/events` |
|
|
104
|
+
| Sessions and context | `/v1/sessions`, `/v1/sessions/{id}`, `/v1/context`, `/v1/context/save`, `/v1/context/restore`, `/v1/context/compact` |
|
|
105
|
+
| Nexus | `/v1/nexus/status`, `/v1/sponsors` |
|
|
106
|
+
| Ollama pool | `/v1/ollama/pool/processes`, `/v1/ollama/pool/cleanup` |
|
|
107
|
+
| Voice and audio | `/v1/voice/state`, `/v1/voice/models`, `/v1/voice/tts`, `/v1/audio/speech`, `/v1/voice/transcribe`, `/v1/audio/transcriptions`, `/v1/voicechat/ws` |
|
|
108
|
+
| Vision | `/v1/vision/describe` |
|
|
109
|
+
| Projects | `/v1/projects`, `/v1/projects/current`, `/v1/projects/switch`, `/v1/projects/register`, `/v1/projects/rename`, `/v1/projects/preferences` |
|
|
110
|
+
| Code graph | `/v1/codegraph/snapshot`, `/v1/codegraph/events` |
|
|
111
|
+
| Scheduled jobs | `/v1/scheduled`, `/v1/scheduled/all`, `/v1/scheduled/status`, `/v1/scheduled/kill`, `/v1/scheduled/fixup`, `/v1/scheduled/reconcile` |
|
|
112
|
+
| Services and update | `/v1/services/systemd`, `/v1/update` |
|
|
113
|
+
| AIMS | `/v1/aims`, `/v1/aims/policies`, `/v1/aims/roles`, `/v1/aims/resources`, `/v1/aims/impact-assessments`, `/v1/aims/lifecycle`, `/v1/aims/data-quality`, `/v1/aims/transparency`, `/v1/aims/usage`, `/v1/aims/suppliers`, `/v1/aims/incidents`, `/v1/aims/oversight`, `/v1/aims/decisions`, `/v1/aims/config-history` |
|
|
114
|
+
|
|
115
|
+
## Realtime REST Flag
|
|
116
|
+
|
|
117
|
+
`POST /v1/chat` and `POST /v1/chat/completions` accept:
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"realtime": true,
|
|
122
|
+
"realtime_options": {
|
|
123
|
+
"max_history_messages": 12,
|
|
124
|
+
"max_tokens": 160
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
This applies Omnius realtime conversation mode before proxying to the configured backend. It is intended for ASR/TTS clients and short back-and-forth speech.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Omnius REST Quick Reference
|
|
2
|
+
|
|
3
|
+
Start:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
omnius serve
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Base:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
http://127.0.0.1:11435
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Docs:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
GET /docs
|
|
19
|
+
GET /api/docs
|
|
20
|
+
GET /openapi.json
|
|
21
|
+
GET /openapi.yaml
|
|
22
|
+
GET /redoc
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Auth header:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
Authorization: Bearer <key>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Health
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
curl -s http://127.0.0.1:11435/health
|
|
35
|
+
curl -s http://127.0.0.1:11435/health/ready
|
|
36
|
+
curl -s http://127.0.0.1:11435/version
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Models
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
curl -s http://127.0.0.1:11435/v1/models
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Chat
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
curl -s http://127.0.0.1:11435/v1/chat \
|
|
49
|
+
-H 'content-type: application/json' \
|
|
50
|
+
-d '{"message":"Summarize this repo in one paragraph.","tools":true}'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Realtime Chat
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
curl -s http://127.0.0.1:11435/v1/chat \
|
|
57
|
+
-H 'content-type: application/json' \
|
|
58
|
+
-d '{"message":"Keep this short for voice.","realtime":true}'
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## OpenAI-Compatible Chat
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
curl -s http://127.0.0.1:11435/v1/chat/completions \
|
|
65
|
+
-H 'content-type: application/json' \
|
|
66
|
+
-d '{"model":"qwen3:4b","messages":[{"role":"user","content":"hello"}]}'
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Ollama-Compatible Generate
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
curl -s http://127.0.0.1:11435/v1/generate \
|
|
73
|
+
-H 'content-type: application/json' \
|
|
74
|
+
-d '{"model":"qwen3:4b","prompt":"Return one sentence."}'
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Agentic Run
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
curl -s -X POST http://127.0.0.1:11435/v1/run \
|
|
81
|
+
-H 'content-type: application/json' \
|
|
82
|
+
-d '{"task":"Run tests and report failures.","sandbox":"none"}'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Events
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
curl -N http://127.0.0.1:11435/v1/events
|
|
89
|
+
curl -N 'http://127.0.0.1:11435/v1/events?type=tool.*'
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Skills
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
curl -s http://127.0.0.1:11435/v1/skills
|
|
96
|
+
curl -s http://127.0.0.1:11435/v1/skills/omnius-rest-docs
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Tool Call
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
curl -s -X POST http://127.0.0.1:11435/v1/tools/memory_search/call \
|
|
103
|
+
-H 'content-type: application/json' \
|
|
104
|
+
-d '{"args":{"query":"rest api docs"}}'
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Voice TTS
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
curl -s -X POST http://127.0.0.1:11435/v1/voice/tts \
|
|
111
|
+
-H 'content-type: application/json' \
|
|
112
|
+
-d '{"text":"Hello from Omnius.","format":"wav"}' \
|
|
113
|
+
--output speech.wav
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Runtime Key Minting
|
|
117
|
+
|
|
118
|
+
Requires admin scope:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
curl -s -X POST http://127.0.0.1:11435/v1/keys \
|
|
122
|
+
-H 'authorization: Bearer admin-secret' \
|
|
123
|
+
-H 'content-type: application/json' \
|
|
124
|
+
-d '{"scope":"run","owner":"ci","rpm":60,"tpd":100000,"max_jobs":3}'
|
|
125
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omnius-rest-docs",
|
|
3
|
+
"description": "Explorable Omnius REST API documentation index.",
|
|
4
|
+
"canonical_sources": [
|
|
5
|
+
"packages/cli/src/api/openapi.ts",
|
|
6
|
+
"GET /openapi.json",
|
|
7
|
+
"GET /docs",
|
|
8
|
+
"GET /redoc"
|
|
9
|
+
],
|
|
10
|
+
"entrypoint": "docs/rest/INDEX.md",
|
|
11
|
+
"quickref": "docs/rest/QUICKREF.md",
|
|
12
|
+
"full_reference": "docs/reference/rest-api.md",
|
|
13
|
+
"skill": ".aiwg/addons/omnius-rest-docs/skills/omnius-rest-docs/SKILL.md",
|
|
14
|
+
"families": [
|
|
15
|
+
{ "name": "chat", "path": "docs/rest/endpoints/chat.md", "triggers": ["chat", "generate", "realtime", "OpenAI-compatible", "/v1/chat", "/v1/generate"] },
|
|
16
|
+
{ "name": "run", "path": "docs/rest/endpoints/run.md", "triggers": ["run", "jobs", "todos", "scheduled"] },
|
|
17
|
+
{ "name": "config", "path": "docs/rest/endpoints/config.md", "triggers": ["config", "keys", "profiles", "projects", "endpoint"] },
|
|
18
|
+
{ "name": "memory", "path": "docs/rest/endpoints/memory.md", "triggers": ["memory", "context", "sessions"] },
|
|
19
|
+
{ "name": "skills", "path": "docs/rest/endpoints/skills.md", "triggers": ["skills", "commands", "skill_execute"] },
|
|
20
|
+
{ "name": "aiwg", "path": "docs/rest/endpoints/aiwg.md", "triggers": ["AIWG", "cascade", "expand", "use"] },
|
|
21
|
+
{ "name": "tools", "path": "docs/rest/endpoints/tools.md", "triggers": ["tools", "MCP", "codegraph"] },
|
|
22
|
+
{ "name": "events", "path": "docs/rest/endpoints/events.md", "triggers": ["events", "metrics", "audit", "usage", "system"] },
|
|
23
|
+
{ "name": "files", "path": "docs/rest/endpoints/files.md", "triggers": ["files", "read file"] },
|
|
24
|
+
{ "name": "voice-vision", "path": "docs/rest/endpoints/voice-vision.md", "triggers": ["voice", "TTS", "ASR", "voicechat", "vision"] },
|
|
25
|
+
{ "name": "aims", "path": "docs/rest/endpoints/aims.md", "triggers": ["AIMS", "ISO 42001", "governance"] }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Auth And Scopes
|
|
2
|
+
|
|
3
|
+
Omnius can run without auth for local development, but shared deployments should use bearer keys.
|
|
4
|
+
|
|
5
|
+
## Environment Keys
|
|
6
|
+
|
|
7
|
+
Single admin key:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
OMNIUS_API_KEY="admin-secret" omnius serve
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Multiple scoped keys:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
OMNIUS_API_KEYS="read-key:read:grafana,run-key:run:ci:60:100000:3,admin-key:admin:ops" omnius serve
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Format:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
key:scope:owner:rpm:tpd:max_jobs
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Fields:
|
|
26
|
+
|
|
27
|
+
- `key`: bearer token.
|
|
28
|
+
- `scope`: `read`, `run`, or `admin`.
|
|
29
|
+
- `owner`: audit label.
|
|
30
|
+
- `rpm`: optional requests-per-minute cap.
|
|
31
|
+
- `tpd`: optional tokens-per-day cap.
|
|
32
|
+
- `max_jobs`: optional concurrent job cap.
|
|
33
|
+
|
|
34
|
+
## Runtime Keys
|
|
35
|
+
|
|
36
|
+
Runtime keys are stored under `~/.omnius/keys.json` and are checked after environment keys.
|
|
37
|
+
|
|
38
|
+
| Method | Path | Scope | Purpose |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| `GET` | `/v1/keys` | admin | List masked runtime keys |
|
|
41
|
+
| `POST` | `/v1/keys` | admin | Mint a key; response contains the full secret once |
|
|
42
|
+
| `DELETE` | `/v1/keys/{prefix}` | admin | Revoke keys matching a prefix |
|
|
43
|
+
|
|
44
|
+
Mint body:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"scope": "run",
|
|
49
|
+
"owner": "ci",
|
|
50
|
+
"profile": "readonly",
|
|
51
|
+
"rpm": 60,
|
|
52
|
+
"tpd": 100000,
|
|
53
|
+
"max_jobs": 3
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Scope Semantics
|
|
58
|
+
|
|
59
|
+
`read` is for inspection:
|
|
60
|
+
|
|
61
|
+
- health, version, metrics
|
|
62
|
+
- models
|
|
63
|
+
- config summaries
|
|
64
|
+
- usage, cost, audit reads
|
|
65
|
+
- skills and tools metadata
|
|
66
|
+
- memory search
|
|
67
|
+
- events
|
|
68
|
+
|
|
69
|
+
`run` can execute:
|
|
70
|
+
|
|
71
|
+
- `/v1/run`
|
|
72
|
+
- run-scope tools
|
|
73
|
+
- memory writes where allowed
|
|
74
|
+
- chat and agentic endpoints
|
|
75
|
+
|
|
76
|
+
`admin` can mutate:
|
|
77
|
+
|
|
78
|
+
- config
|
|
79
|
+
- runtime keys
|
|
80
|
+
- profiles
|
|
81
|
+
- admin-only tools
|
|
82
|
+
- AIMS policy registers
|
|
83
|
+
- high-risk local controls
|
|
84
|
+
|
|
85
|
+
Tool calls are additionally gated by each tool's security metadata. Scope alone is not the only control.
|
|
86
|
+
|
|
87
|
+
## Request Header
|
|
88
|
+
|
|
89
|
+
```text
|
|
90
|
+
Authorization: Bearer <key>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Network Access
|
|
94
|
+
|
|
95
|
+
For local development, bind to loopback. For remote access, set explicit auth and access policy:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
OMNIUS_HOST=0.0.0.0:11435 OMNIUS_API_KEYS="run-key:run:remote" omnius serve
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Do not expose an unauthenticated daemon on a public interface.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# AIMS Governance Endpoints
|
|
2
|
+
|
|
3
|
+
Omnius exposes an ISO/IEC 42001-oriented AI Management System surface for audit-aligned deployments.
|
|
4
|
+
|
|
5
|
+
## Endpoint Summary
|
|
6
|
+
|
|
7
|
+
| Method | Path | Purpose |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `GET` | `/v1/aims` | AIMS root, control map, endpoint index |
|
|
10
|
+
| `GET`/`PUT` | `/v1/aims/policies` | Policy register |
|
|
11
|
+
| `GET` | `/v1/aims/roles` | Roles and responsibilities |
|
|
12
|
+
| `GET` | `/v1/aims/resources` | Compute and backend inventory |
|
|
13
|
+
| `GET`/`POST` | `/v1/aims/impact-assessments` | Impact assessment records |
|
|
14
|
+
| `GET` | `/v1/aims/lifecycle` | AI system lifecycle state |
|
|
15
|
+
| `GET` | `/v1/aims/data-quality` | Data quality controls |
|
|
16
|
+
| `GET` | `/v1/aims/transparency` | Model cards and transparency info |
|
|
17
|
+
| `GET` | `/v1/aims/usage` | Alias of usage reporting |
|
|
18
|
+
| `GET` | `/v1/aims/suppliers` | Third-party suppliers, sponsors, backends |
|
|
19
|
+
| `GET`/`POST` | `/v1/aims/incidents` | Incident records |
|
|
20
|
+
| `GET` | `/v1/aims/oversight` | Human oversight gates |
|
|
21
|
+
| `GET` | `/v1/aims/decisions` | Consequential decision log |
|
|
22
|
+
| `GET` | `/v1/aims/config-history` | Config change history |
|
|
23
|
+
|
|
24
|
+
## Use
|
|
25
|
+
|
|
26
|
+
Use these endpoints for compliance dashboards, deployment reviews, supplier tracking, and audit evidence. Mutating endpoints require admin scope.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# AIWG Cascade Endpoints
|
|
2
|
+
|
|
3
|
+
AIWG endpoints expose a discover-then-expand documentation and workflow model for small and large context agents.
|
|
4
|
+
|
|
5
|
+
## Endpoint Summary
|
|
6
|
+
|
|
7
|
+
| Method | Path | Purpose |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `GET` | `/v1/aiwg` | AIWG installation root and control map |
|
|
10
|
+
| `GET` | `/v1/aiwg/frameworks` | List frameworks |
|
|
11
|
+
| `GET` | `/v1/aiwg/frameworks/{name}` | Framework details and items |
|
|
12
|
+
| `GET` | `/v1/aiwg/frameworks/{name}/content` | Tier-aware framework content |
|
|
13
|
+
| `GET` | `/v1/aiwg/skills` | List AIWG skills |
|
|
14
|
+
| `GET` | `/v1/aiwg/skills/{name}` | Load AIWG skill content |
|
|
15
|
+
| `GET` | `/v1/aiwg/agents` | List AIWG agents |
|
|
16
|
+
| `GET` | `/v1/aiwg/agents/{name}` | Load agent definition |
|
|
17
|
+
| `GET` | `/v1/aiwg/addons` | List addons |
|
|
18
|
+
| `POST` | `/v1/aiwg/use` | Return tier-sized activation bundle |
|
|
19
|
+
| `POST` | `/v1/aiwg/expand` | Expand matching item by trigger or name |
|
|
20
|
+
|
|
21
|
+
## Cascade Model
|
|
22
|
+
|
|
23
|
+
`/v1/aiwg/use` returns a model-tier-sized activation bundle:
|
|
24
|
+
|
|
25
|
+
- Small models: index and core pointers.
|
|
26
|
+
- Medium models: metadata.
|
|
27
|
+
- Large models: content excerpts.
|
|
28
|
+
- Extra-large models: broader framework dumps.
|
|
29
|
+
|
|
30
|
+
This prevents context overflow and mirrors the README docs-memory design.
|
|
31
|
+
|
|
32
|
+
## Expand
|
|
33
|
+
|
|
34
|
+
`POST /v1/aiwg/expand` accepts:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"trigger": "rest api docs",
|
|
39
|
+
"name": "omnius-rest-docs",
|
|
40
|
+
"limit": 3
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
It returns matching items for targeted unpacking.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Chat And Inference Endpoints
|
|
2
|
+
|
|
3
|
+
## Endpoint Summary
|
|
4
|
+
|
|
5
|
+
| Method | Path | Purpose |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `GET` | `/v1/models` | List aggregated models |
|
|
8
|
+
| `POST` | `/v1/chat/completions` | OpenAI-compatible chat completions |
|
|
9
|
+
| `POST` | `/v1/embeddings` | Generate embeddings |
|
|
10
|
+
| `POST` | `/v1/chat` | Stateful Omnius chat with optional full agent tools |
|
|
11
|
+
| `POST` | `/v1/generate` | Ollama-compatible one-shot generation |
|
|
12
|
+
| `POST` | `/api/generate` | Ollama-compatible alias |
|
|
13
|
+
| `GET` | `/v1/chat/sessions` | List active chat sessions |
|
|
14
|
+
| `POST` | `/v1/chat/check-in` | Send a steering check-in to the active chat session |
|
|
15
|
+
|
|
16
|
+
## `/v1/models`
|
|
17
|
+
|
|
18
|
+
Returns an OpenAI-style model list aggregated from enabled endpoints. Model discovery should include local Ollama, configured external endpoints, sponsor endpoints, and COHERE/passthrough models where enabled.
|
|
19
|
+
|
|
20
|
+
## `/v1/chat/completions`
|
|
21
|
+
|
|
22
|
+
This is the OpenAI-compatible endpoint. It forwards standard chat-completion fields and adds Omnius controls.
|
|
23
|
+
|
|
24
|
+
Important body fields:
|
|
25
|
+
|
|
26
|
+
| Field | Type | Purpose |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `model` | string | Backend model name |
|
|
29
|
+
| `messages` | array | OpenAI-style messages |
|
|
30
|
+
| `stream` | boolean | SSE streaming when supported |
|
|
31
|
+
| `realtime` | boolean | Enable Omnius realtime conversation mode |
|
|
32
|
+
| `realtime_options` | object | Realtime history and max-token defaults |
|
|
33
|
+
| `tools` | array | OpenAI-shape tools array |
|
|
34
|
+
| `tool_choice` | any | OpenAI-shape tool choice |
|
|
35
|
+
| `parallel_tool_calls` | boolean | Forwarded to backend |
|
|
36
|
+
| `timeout_s` | number | Per-request timeout |
|
|
37
|
+
| `agent_loop` | boolean | Run server-side tool loop |
|
|
38
|
+
| `include_daemon_tools` | array | Merge daemon tools by scope: `read`, `run`, `admin` |
|
|
39
|
+
| `max_turns` | integer | Server-side agent loop turn cap |
|
|
40
|
+
| `prompt_template` | string | Optional template such as `factual-first` |
|
|
41
|
+
|
|
42
|
+
Realtime example:
|
|
43
|
+
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"model": "qwen3:4b",
|
|
47
|
+
"realtime": true,
|
|
48
|
+
"realtime_options": {
|
|
49
|
+
"max_history_messages": 12,
|
|
50
|
+
"max_tokens": 160
|
|
51
|
+
},
|
|
52
|
+
"messages": [
|
|
53
|
+
{ "role": "user", "content": "Make that shorter for voice." }
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## `/v1/chat`
|
|
59
|
+
|
|
60
|
+
This is the Omnius stateful chat endpoint. By default it runs the full Omnius agent stack with tools, memory, skills, and multi-agent context. Set `tools: false` to use the fast direct backend path. `realtime: true` also uses the direct backend path.
|
|
61
|
+
|
|
62
|
+
Body fields:
|
|
63
|
+
|
|
64
|
+
| Field | Type | Purpose |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| `message` | string | User message |
|
|
67
|
+
| `model` | string | Optional model override |
|
|
68
|
+
| `session_id` | string | Reuse or name a session |
|
|
69
|
+
| `stream` | boolean | Stream when supported |
|
|
70
|
+
| `tools` | boolean | Full agent stack by default |
|
|
71
|
+
| `realtime` | boolean | Short ASR/TTS conversation mode |
|
|
72
|
+
| `realtime_options` | object | Realtime settings |
|
|
73
|
+
|
|
74
|
+
## `/v1/generate` And `/api/generate`
|
|
75
|
+
|
|
76
|
+
These endpoints provide one-shot Ollama-compatible generation. They are useful for clients that speak Ollama's generate shape rather than OpenAI chat messages. The route has no session history and can still use Omnius' backend routing layer.
|
|
77
|
+
|
|
78
|
+
Common body fields:
|
|
79
|
+
|
|
80
|
+
| Field | Type | Purpose |
|
|
81
|
+
| --- | --- | --- |
|
|
82
|
+
| `model` | string | Optional model override |
|
|
83
|
+
| `prompt` | string | Prompt text |
|
|
84
|
+
| `stream` | boolean | Stream when supported |
|
|
85
|
+
|
|
86
|
+
## Realtime Behavior
|
|
87
|
+
|
|
88
|
+
When `realtime: true`, Omnius:
|
|
89
|
+
|
|
90
|
+
- Builds a compact system prompt from `SOUL.md` or `.aiwg/SOUL.md`.
|
|
91
|
+
- Reads a compact voice profile from `.aiwg/voices/` when present.
|
|
92
|
+
- Keeps only recent non-system history.
|
|
93
|
+
- Preserves caller system messages under the realtime contract.
|
|
94
|
+
- Defaults to short response settings.
|
|
95
|
+
- Removes Omnius-only realtime fields before backend proxying.
|
|
96
|
+
|
|
97
|
+
Use this for live voice clients, not long coding tasks.
|
|
98
|
+
|
|
99
|
+
## Server-Side Agent Loop
|
|
100
|
+
|
|
101
|
+
`/v1/chat/completions` can run an internal tool loop when `agent_loop: true`. This lets clients collapse multiple model/tool round trips into one daemon request. Daemon tool calls execute inline; client-owned tool calls can still be yielded in OpenAI-compatible shape.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Config, Endpoints, Keys, Profiles, And Projects
|
|
2
|
+
|
|
3
|
+
## Endpoint Summary
|
|
4
|
+
|
|
5
|
+
| Method | Path | Purpose |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `GET` | `/v1/config` | Get daemon config and settings |
|
|
8
|
+
| `PATCH` | `/v1/config` | Update settings |
|
|
9
|
+
| `GET` | `/v1/config/model` | Show active model |
|
|
10
|
+
| `PUT` | `/v1/config/model` | Switch model |
|
|
11
|
+
| `GET` | `/v1/config/endpoint` | Show active backend endpoint |
|
|
12
|
+
| `PUT` | `/v1/config/endpoint` | Switch endpoint with TUI-compatible normalization |
|
|
13
|
+
| `POST` | `/v1/config/endpoint/test` | Probe endpoint from daemon process |
|
|
14
|
+
| `GET` | `/v1/config/endpoint/history` | List recently used endpoints |
|
|
15
|
+
| `DELETE` | `/v1/config/endpoint/history` | Remove an endpoint from history |
|
|
16
|
+
| `POST` | `/v1/share/generate` | Generate a remote-access share URL |
|
|
17
|
+
| `GET` | `/v1/keys` | List runtime API keys |
|
|
18
|
+
| `POST` | `/v1/keys` | Mint runtime API key |
|
|
19
|
+
| `DELETE` | `/v1/keys/{prefix}` | Revoke runtime API keys by prefix |
|
|
20
|
+
| `GET` | `/v1/profiles` | List tool profiles |
|
|
21
|
+
| `POST` | `/v1/profiles` | Create a tool profile |
|
|
22
|
+
| `GET` | `/v1/profiles/{name}` | Get profile details |
|
|
23
|
+
| `DELETE` | `/v1/profiles/{name}` | Delete profile |
|
|
24
|
+
| `GET` | `/v1/projects` | List known projects |
|
|
25
|
+
| `GET` | `/v1/projects/current` | Get active project |
|
|
26
|
+
| `POST` | `/v1/projects/switch` | Switch active project |
|
|
27
|
+
| `POST` | `/v1/projects/register` | Register project root |
|
|
28
|
+
| `POST` | `/v1/projects/rename` | Rename project |
|
|
29
|
+
| `GET`/`PUT` | `/v1/projects/preferences` | Read or patch project preferences |
|
|
30
|
+
|
|
31
|
+
## Endpoint Switching
|
|
32
|
+
|
|
33
|
+
Endpoint switching uses the same normalization as the TUI. Use `/v1/config/endpoint/test` before switching a remote endpoint in automation.
|
|
34
|
+
|
|
35
|
+
Endpoint history mirrors the `/endpoint` TUI flow. It records recently used endpoints with metadata so users can reselect external routers, sponsor endpoints, and OpenAI-compatible URLs without retyping them.
|
|
36
|
+
|
|
37
|
+
`POST /v1/share/generate` creates a remote-access URL embedding the daemon host and auth material needed by the browser client. Use it only in authenticated contexts.
|
|
38
|
+
|
|
39
|
+
## Model Switching
|
|
40
|
+
|
|
41
|
+
`PUT /v1/config/model` updates the active model for subsequent requests. Clients can still pass per-request `model` fields to chat endpoints.
|
|
42
|
+
|
|
43
|
+
## Runtime Keys
|
|
44
|
+
|
|
45
|
+
Runtime keys are persistent, scoped, and revocable. See `docs/rest/auth-and-scopes.md`.
|
|
46
|
+
|
|
47
|
+
## Profiles
|
|
48
|
+
|
|
49
|
+
Profiles constrain tools and runtime behavior for a key or request path. Use them for CI, dashboards, or remote clients that should not receive the full local tool surface.
|
|
50
|
+
|
|
51
|
+
## Projects
|
|
52
|
+
|
|
53
|
+
The daemon is process-wide, but project endpoints track the active workspace and per-project preferences such as selected model, chat session, and UI choices.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Events, Metrics, Usage, Audit, System, Nexus, And Ollama Pool
|
|
2
|
+
|
|
3
|
+
## Endpoint Summary
|
|
4
|
+
|
|
5
|
+
| Method | Path | Purpose |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `GET` | `/health` | Liveness |
|
|
8
|
+
| `GET` | `/health/ready` | Readiness |
|
|
9
|
+
| `GET` | `/health/startup` | Startup complete |
|
|
10
|
+
| `GET` | `/version` | Package version and platform |
|
|
11
|
+
| `GET` | `/metrics` | Prometheus metrics |
|
|
12
|
+
| `GET` | `/v1/events` | Server-sent events |
|
|
13
|
+
| `GET` | `/v1/usage` | Token usage and rate limits |
|
|
14
|
+
| `GET` | `/v1/audit` | Audit log query |
|
|
15
|
+
| `GET` | `/v1/cost` | Cost tracker |
|
|
16
|
+
| `GET` | `/v1/system` | System info and resource snapshot |
|
|
17
|
+
| `GET` | `/v1/nexus/status` | Nexus peer state |
|
|
18
|
+
| `GET` | `/v1/sponsors` | Local sponsor directory cache |
|
|
19
|
+
| `GET` | `/v1/ollama/pool/processes` | Ollama process inventory |
|
|
20
|
+
| `POST` | `/v1/ollama/pool/cleanup` | Cleanup stale Ollama pool processes |
|
|
21
|
+
|
|
22
|
+
## Events
|
|
23
|
+
|
|
24
|
+
`GET /v1/events` is an SSE stream. Filter by exact type or prefix:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
/v1/events?type=tool.called
|
|
28
|
+
/v1/events?type=tool.*
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Documented event families include:
|
|
32
|
+
|
|
33
|
+
- `config.changed`
|
|
34
|
+
- `run.started`
|
|
35
|
+
- `run.completed`
|
|
36
|
+
- `run.aborted`
|
|
37
|
+
- `run.failed`
|
|
38
|
+
- `tool.called`
|
|
39
|
+
- `memory.written`
|
|
40
|
+
- `memory.searched`
|
|
41
|
+
- `skill.invoked`
|
|
42
|
+
- `mcp.called`
|
|
43
|
+
- `engine.state_changed`
|
|
44
|
+
- `auth.failed`
|
|
45
|
+
- `rate_limit.hit`
|
|
46
|
+
- `incident.raised`
|
|
47
|
+
- `incident.resolved`
|
|
48
|
+
- `session.created`
|
|
49
|
+
- `session.ended`
|
|
50
|
+
- `aims.policy_changed`
|
|
51
|
+
- `aims.decision_recorded`
|
|
52
|
+
|
|
53
|
+
## Usage And Cost
|
|
54
|
+
|
|
55
|
+
Usage endpoints support dashboards for requests, token counts, rate limits, and provider cost estimates. Sponsor and COHERE dashboards should use these concepts consistently: requests per minute, daily tokens, concurrency, per-peer tokens, and per-model tokens.
|
|
56
|
+
|
|
57
|
+
## Nexus And Sponsors
|
|
58
|
+
|
|
59
|
+
`/v1/nexus/status` reports peer mesh state. `/v1/sponsors` exposes the local sponsor directory cache.
|
|
60
|
+
|
|
61
|
+
## Ollama Pool
|
|
62
|
+
|
|
63
|
+
The pool endpoints are admin-oriented process hygiene tools. They report managed `ollama serve` processes and cleanup decisions. Cleanup accounts for stale pool state and orphan runner risks.
|