omnius 1.0.591 → 1.0.592
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 +15 -1
- package/.aiwg/addons/omnius-docs/manifest.json +28 -68
- package/.aiwg/addons/omnius-docs/skills/agent-failure-recovery/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/browser-interaction-validation/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/evidence-directed-delivery/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/hardware-evidence-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/omnius-docs/SKILL.md +17 -7
- package/.aiwg/addons/omnius-docs/skills/omnius-inference-docs/SKILL.md +27 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-integration-docs/SKILL.md +21 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-ops-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-realtime-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-sponsor-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-telegram-docs/SKILL.md +2 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-tools-docs/SKILL.md +23 -0
- package/.aiwg/addons/omnius-docs/skills/omnius-version-compatibility-docs/SKILL.md +23 -0
- package/.aiwg/addons/omnius-docs/skills/runtime-provenance-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/secrets-and-config-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/test-surface-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-docs/skills/workspace-reality-audit/SKILL.md +2 -1
- package/.aiwg/addons/omnius-rest-docs/README.md +3 -0
- package/.aiwg/addons/omnius-rest-docs/manifest.json +27 -20
- package/.aiwg/addons/omnius-rest-docs/skills/omnius-rest-docs/SKILL.md +9 -5
- package/README.md +36 -0
- package/dist/discovery.d.ts +50 -0
- package/dist/index.js +5975 -4021
- package/dist/library.d.ts +7 -0
- package/dist/library.js +950 -0
- package/dist/postinstall-daemon.cjs +18 -0
- package/dist/providerRegistry.d.ts +80 -0
- package/dist/service-version.d.ts +35 -0
- package/docs/.vitepress/config.mts +8 -0
- package/docs/DISCOVERY.json +20224 -0
- package/docs/DISCOVERY.md +648 -0
- package/docs/HANDOFF-crl-encoder-decoder-fix.md +129 -0
- package/docs/agent-memory/INDEX.md +9 -4
- package/docs/agent-memory/index.md +7 -0
- package/docs/concept-relational-language.md +869 -0
- package/docs/context-management-medium-models-proposal.md +449 -0
- package/docs/dedup-false-positive-meta-analysis.md +96 -0
- package/docs/discovery/catalog-overrides.json +724 -0
- package/docs/duplicate-calls-root-cause-analysis.md +91 -0
- package/docs/duplicate-calls-root-cause-deep.md +155 -0
- package/docs/ephemeral-skill-pack-small-context.md +57 -0
- package/docs/explorations/context-window-todo-association.md +156 -0
- package/docs/explorations/todo-association-verify.json +30 -0
- package/docs/explorations/verification-ledger.json +45 -0
- package/docs/explorations/verify-todo-association.sh +30 -0
- package/docs/flowstate.md +806 -0
- package/docs/getting-started/install.md +24 -0
- package/docs/getting-started/model-providers.md +13 -0
- package/docs/guides/agent-integration.md +87 -0
- package/docs/guides/bring-your-own-inference.md +126 -0
- package/docs/guides/tools-and-web-search.md +95 -0
- package/docs/index.md +14 -0
- package/docs/longhaul-35b-workorders.md +496 -0
- package/docs/memory-integration-analysis.md +303 -0
- package/docs/model-capability-awareness-and-multimodal-memory-root-fix.md +799 -0
- package/docs/multimodal-identity-memory-implementation.md +76 -0
- package/docs/omnius-self-edit-eval-2026-06-10.md +169 -0
- package/docs/opencode-agentic-loop-comparison.md +290 -0
- package/docs/operations/security-and-remote-access.md +2 -2
- package/docs/operations/version-compatibility.md +63 -0
- package/docs/proposals/git-progress-tracking-strategy.md +289 -0
- package/docs/proposals/opencode-modules/backendAdapter.ts +443 -0
- package/docs/proposals/opencode-modules/childSession.ts +288 -0
- package/docs/proposals/opencode-modules/compactionAgent.ts +101 -0
- package/docs/proposals/opencode-modules/orchestrator.ts +387 -0
- package/docs/proposals/opencode-modules/runner.ts +258 -0
- package/docs/reference/auth-map.md +87 -196
- package/docs/reference/configuration.md +27 -0
- package/docs/reference/rest-api.md +7 -0
- package/docs/reference/slash-commands.md +125 -2
- package/docs/research/_archived/README.md +18 -0
- package/docs/research/_archived/context_window_attention_model.py +418 -0
- package/docs/research/_archived/context_window_attention_spec.md +55 -0
- package/docs/research/_archived/context_window_attention_weights.json +68 -0
- package/docs/research/k-splanifolds.pdf +0 -0
- package/docs/research/personality-verbosity-control.md +293 -0
- package/docs/rest/INDEX.md +7 -0
- package/docs/rest/QUICKREF.md +18 -0
- package/docs/rest/REST-DOCS-MANIFEST.json +1 -0
- package/docs/rest/auth-and-scopes.md +7 -1
- package/docs/rest/endpoints/discovery.md +44 -0
- package/docs/rest/endpoints/events.md +5 -0
- package/docs/rest/endpoints/tools.md +9 -0
- package/docs/reviews/adversary-system-review.md +42 -0
- package/docs/sana-and-video-generation-integration-plan.md +712 -0
- package/docs/session-diary-llm-training-analysis.md +218 -0
- package/docs/telegram-dmn-curiosity-outreach-scaffold.md +91 -0
- package/docs/telegram-mid-horizon-download-loop-handoff.md +468 -0
- package/docs/telegram-reflection-corpus-integration-plan.md +306 -0
- package/docs/telegram-unified-tooling-architecture.md +332 -0
- package/docs/threat-model.md +868 -0
- package/docs/trajectory-grounding.md +160 -0
- package/docs/voice-flow-architecture.md +489 -0
- package/docs/work-orders/WO-AM-GAPS.md +638 -0
- package/docs/work-orders/daemon-hud-ui-overhaul.md +82 -0
- package/docs/work-orders/hermes-architecture-deltas/01-public-scrutiny-provenance-control/INDEX.md +21 -0
- package/docs/work-orders/hermes-architecture-deltas/01-public-scrutiny-provenance-control/WORKORDER.md +225 -0
- package/docs/work-orders/hermes-architecture-deltas/02-context-engine-plugin-boundary/INDEX.md +20 -0
- package/docs/work-orders/hermes-architecture-deltas/02-context-engine-plugin-boundary/WORKORDER.md +198 -0
- package/docs/work-orders/hermes-architecture-deltas/03-typed-gateway-event-stream/INDEX.md +19 -0
- package/docs/work-orders/hermes-architecture-deltas/03-typed-gateway-event-stream/WORKORDER.md +172 -0
- package/docs/work-orders/hermes-architecture-deltas/04-task-local-gateway-context/INDEX.md +19 -0
- package/docs/work-orders/hermes-architecture-deltas/04-task-local-gateway-context/WORKORDER.md +169 -0
- package/docs/work-orders/hermes-architecture-deltas/05-process-lifecycle-monitoring-notifications/INDEX.md +22 -0
- package/docs/work-orders/hermes-architecture-deltas/05-process-lifecycle-monitoring-notifications/WORKORDER.md +189 -0
- package/docs/work-orders/hermes-architecture-deltas/06-vision-evidence-routing-ladder/INDEX.md +22 -0
- package/docs/work-orders/hermes-architecture-deltas/06-vision-evidence-routing-ladder/WORKORDER.md +199 -0
- package/docs/work-orders/hermes-architecture-deltas/07-durable-multi-agent-kanban/INDEX.md +20 -0
- package/docs/work-orders/hermes-architecture-deltas/07-durable-multi-agent-kanban/WORKORDER.md +174 -0
- package/docs/work-orders/hermes-architecture-deltas/08-completion-critic-reconciliation-ledger/INDEX.md +22 -0
- package/docs/work-orders/hermes-architecture-deltas/08-completion-critic-reconciliation-ledger/WORKORDER.md +226 -0
- package/docs/work-orders/hermes-architecture-deltas/INDEX.md +38 -0
- package/docs/work-orders/omnius-context-engineering-behavior-fixes.md +281 -0
- package/docs/work-orders/telegram-dropbear-context-rca-workorder.md +202 -0
- package/docs/work-orders/world-class-memory-compiler/README.md +162 -0
- package/docs/work-orders/world-class-memory-compiler/TRACKER.md +179 -0
- package/docs/work-orders/world-class-memory-compiler/WO-01-exact-request-budget.md +79 -0
- package/docs/work-orders/world-class-memory-compiler/WO-02-typed-memory-fabric.md +65 -0
- package/docs/work-orders/world-class-memory-compiler/WO-03-dependency-working-set.md +55 -0
- package/docs/work-orders/world-class-memory-compiler/WO-04-inference-memory-compiler.md +67 -0
- package/docs/work-orders/world-class-memory-compiler/WO-05-artifact-fidelity-materialization.md +72 -0
- package/docs/work-orders/world-class-memory-compiler/WO-06-temporal-hybrid-retrieval.md +49 -0
- package/docs/work-orders/world-class-memory-compiler/WO-07-evaluation-harness.md +45 -0
- package/docs/work-orders/world-class-memory-compiler/WO-08-rollout-legacy-removal.md +45 -0
- package/docs/x402-remote-inference-plan.md +323 -0
- package/npm-shrinkwrap.json +108 -117
- package/package.json +7 -6
- package/templates/AGENTS.md +6 -0
- package/templates/OMNIUS.md +20 -0
|
@@ -1,229 +1,120 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Authentication And Authorization Map
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Omnius has two separate credential boundaries:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
1. provider credentials authenticate Omnius to an inference provider; and
|
|
6
|
+
2. REST bearer credentials authenticate a caller to the Omnius daemon.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Do not reuse one boundary as the other in new deployments.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
2. **Secret redaction** — preventing credential leaks in logs/tool output
|
|
11
|
-
3. **Session-scoped permissions** — internal permission rules for sub-agent handoffs
|
|
10
|
+
## Provider Credentials
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Upstream inference credentials resolve in this exact order:
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| `apps/api/src/routes/health.ts` | Health check — no auth needed. |
|
|
24
|
-
| `apps/api/src/middleware/error-handler.ts` | Error handling only. |
|
|
25
|
-
|
|
26
|
-
**Verdict:** The REST daemon is completely open. Any caller can create sessions, send messages, list/delete sessions.
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## 2. apps/worker (Background Worker) — NO AUTH
|
|
31
|
-
|
|
32
|
-
| File | Finding |
|
|
33
|
-
|------|---------|
|
|
34
|
-
| `apps/worker/src/queue.ts` | Only references `sessionId: string` in queue job types. No auth logic. |
|
|
35
|
-
|
|
36
|
-
**Verdict:** Worker processes tasks from the queue without auth checks. Trusts the API daemon to route correctly.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## 3. packages/cli — Provider Auth + Secret Redaction
|
|
41
|
-
|
|
42
|
-
### 3a. Provider API Key Configuration
|
|
43
|
-
|
|
44
|
-
| File | Line | Finding |
|
|
45
|
-
|------|------|---------|
|
|
46
|
-
| `packages/cli/src/config.ts` | 32 | `/** Optional Bearer token for authenticated vLLM deployments */` — config field for vLLM auth |
|
|
47
|
-
| `packages/cli/src/config.ts` | 50 | Tool-calling session opt-in logic (not auth, but session-scoped) |
|
|
48
|
-
|
|
49
|
-
### 3b. Secret Redaction (preventing credential leaks)
|
|
50
|
-
|
|
51
|
-
| File | Finding |
|
|
52
|
-
|------|---------|
|
|
53
|
-
| `packages/cli/src/redact/secret-redactor.ts` | Comprehensive regex-based secret redactor. Detects and masks: |
|
|
54
|
-
| | - Known API key prefixes: `sk-`, `sk-or-`, `gsk_`, `fw_`, `cpk_`, `csk-`, `nvapi-`, `xox[baprs]-`, `hf_`, `r8_`, `npm_`, `pypi-`, `gAAAA` |
|
|
55
|
-
| | - Generic patterns: `api_key`, `token`, `secret`, `password`, `access_token`, `refresh_token`, `auth_token`, `bearer` |
|
|
56
|
-
| | - Short tokens (<18 chars) → fully masked (`***`). Longer → partial (`sk-..yKey`) |
|
|
57
|
-
|
|
58
|
-
### 3c. Session State
|
|
59
|
-
|
|
60
|
-
| File | Finding |
|
|
61
|
-
|------|---------|
|
|
62
|
-
| `packages/cli/src/state/store.ts` | `closeSession(sessionId, endReason)` — session lifecycle management. Token counting (input/output/cache_read/cache_write/reasoning). No auth. |
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## 4. packages/backend-vllm — Provider Auth (API Keys)
|
|
67
|
-
|
|
68
|
-
### 4a. Provider Auth Configuration
|
|
69
|
-
|
|
70
|
-
| File | Line | Provider | authRequired | keyPrefix |
|
|
71
|
-
|------|------|----------|-------------|-----------|
|
|
72
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 81 | Anthropic | true | `sk-ant-` |
|
|
73
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 85 | OpenAI | true | `sk-` |
|
|
74
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 89 | Together AI | true | — |
|
|
75
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 93 | Groq | true | `gsk_` |
|
|
76
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 97 | OpenRouter | true | `sk-or-` |
|
|
77
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 101 | Fireworks AI | true | `fw_` |
|
|
78
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 105 | DeepInfra | true | — |
|
|
79
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 109 | Mistral AI | true | — |
|
|
80
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 113 | Chutes AI | true | `cpk_` |
|
|
81
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 117 | Cerebras | true | `csk-` |
|
|
82
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 121 | SambaNova | true | — |
|
|
83
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 125 | NVIDIA NIM | true | `nvapi-` |
|
|
84
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 129 | Hyperbolic | true | — |
|
|
85
|
-
| `packages/backend-vllm/src/normalizeUrl.ts` | 134 | Ollama (local) | **false** | — |
|
|
86
|
-
|
|
87
|
-
### 4b. Runtime Auth Headers
|
|
88
|
-
|
|
89
|
-
| File | Line | Finding |
|
|
90
|
-
|------|------|---------|
|
|
91
|
-
| `packages/backend-vllm/src/VllmBackend.ts` | 217 | `private authHeaders(): Record<string, string>` — builds auth headers for vLLM requests |
|
|
92
|
-
| `packages/backend-vllm/src/VllmBackend.ts` | 237 | Uses `authHeaders()` in fetch calls |
|
|
93
|
-
|
|
94
|
-
**Verdict:** Provider auth is key-based (Bearer tokens). No OAuth flow. Keys are configured in CLI config and passed as headers.
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## 5. packages/orchestrator — Session-Scoped Permissions
|
|
99
|
-
|
|
100
|
-
### 5a. Permission Ruleset (sub-agent authorization)
|
|
101
|
-
|
|
102
|
-
| File | Finding |
|
|
103
|
-
|------|---------|
|
|
104
|
-
| `packages/orchestrator/src/permissionRuleset.ts` | **The only authorization logic in the codebase.** Implements: |
|
|
105
|
-
| | - Parent session deny rules (cascade to sub-agents) |
|
|
106
|
-
| | - Parent agent deny rules |
|
|
107
|
-
| | - External directory rules forwarded to sub-agent sessions |
|
|
108
|
-
| | - "Forwarding pattern" — parent agent denies + parent session denies + external_directory rules cascade |
|
|
109
|
-
|
|
110
|
-
### 5b. Session Metrics
|
|
111
|
-
|
|
112
|
-
| File | Finding |
|
|
113
|
-
|------|---------|
|
|
114
|
-
| `packages/orchestrator/src/sessionMetrics.ts` | Tracks `sessionDurationMs`, token usage, context estimates. No auth. |
|
|
115
|
-
|
|
116
|
-
### 5c. Adversarial Handoffs (test data only)
|
|
117
|
-
|
|
118
|
-
| File | Finding |
|
|
119
|
-
|------|---------|
|
|
120
|
-
| `packages/orchestrator/src/adversarialHandoffs.ts` | Contains test scenarios referencing logout/session cleanup (lines 324-369). These are **test fixtures**, not production auth code. |
|
|
14
|
+
```text
|
|
15
|
+
OMNIUS_PROVIDER_API_KEY
|
|
16
|
+
→ OMNIUS_MODEL_API_KEY
|
|
17
|
+
→ OMNIUS_UPSTREAM_API_KEY
|
|
18
|
+
→ OMNIUS_API_KEY
|
|
19
|
+
→ VLLM_API_KEY
|
|
20
|
+
→ persisted endpoint configuration
|
|
21
|
+
```
|
|
121
22
|
|
|
122
|
-
|
|
23
|
+
The first defined value wins. `OMNIUS_API_KEY` is retained as a legacy
|
|
24
|
+
provider and REST fallback; prefer the explicit provider namespace.
|
|
123
25
|
|
|
124
|
-
|
|
26
|
+
The resolved value is applied according to the registered provider protocol:
|
|
125
27
|
|
|
126
|
-
|
|
28
|
+
| Protocol/provider | Authentication |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `ollama` | none by default |
|
|
31
|
+
| local `openai-chat` | optional `Authorization: Bearer` |
|
|
32
|
+
| cloud `openai-chat` | `Authorization: Bearer <provider-key>` |
|
|
33
|
+
| Gemini | Bearer plus `x-goog-api-client: omnius/<version>` |
|
|
34
|
+
| `anthropic-messages` | `x-api-key: <provider-key>` plus `anthropic-version` |
|
|
35
|
+
| sponsor/COHERE | peer/session policy; upstream secrets stay provider-side |
|
|
127
36
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
| `packages/execution/src/model-broker.ts` | 205-207 | `sessionKey?: string` — reserved per-chat session key for guaranteed slots |
|
|
131
|
-
| `packages/execution/src/model-broker.ts` | 361-362 | `_reservedBySession: Map<string, string>` — reserved slots per sessionKey |
|
|
132
|
-
| `packages/execution/src/model-broker.ts` | 1271-1277 | Reserved slot path: per-session, one outstanding slot per sessionKey |
|
|
37
|
+
Provider credentials must never appear in endpoint URLs, discovery documents,
|
|
38
|
+
logs, process output, sponsor metadata, or client-visible errors.
|
|
133
39
|
|
|
134
|
-
|
|
40
|
+
## REST Daemon Credentials
|
|
135
41
|
|
|
136
|
-
|
|
137
|
-
|------|---------|
|
|
138
|
-
| `packages/execution/src/mcp/secret-detector.ts` | `matchType: "auth-header"` — detects auth header prefixes in strings. Sensitive field name tracking. |
|
|
42
|
+
Preferred environment variables:
|
|
139
43
|
|
|
140
|
-
|
|
44
|
+
```text
|
|
45
|
+
OMNIUS_REST_API_KEY
|
|
46
|
+
OMNIUS_REST_API_KEYS
|
|
47
|
+
```
|
|
141
48
|
|
|
142
|
-
|
|
49
|
+
Compatibility variables:
|
|
143
50
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
| `packages/indexer/src/fileSummarizer.ts` | 80 | Domain keyword `/auth/i` in file content |
|
|
149
|
-
| `packages/indexer/src/fileSummarizer.ts` | 119 | `if (domain === "auth") return "high"` — auth domain files get high priority |
|
|
51
|
+
```text
|
|
52
|
+
OMNIUS_API_KEY
|
|
53
|
+
OMNIUS_API_KEYS
|
|
54
|
+
```
|
|
150
55
|
|
|
151
|
-
|
|
56
|
+
Multi-key format:
|
|
152
57
|
|
|
153
|
-
|
|
58
|
+
```text
|
|
59
|
+
key:scope:owner:rpm:tpd:max_jobs
|
|
60
|
+
```
|
|
154
61
|
|
|
155
|
-
|
|
62
|
+
The daemon also accepts persistent runtime keys stored under
|
|
63
|
+
`~/.omnius/keys.json` by default and a local bootstrap key under
|
|
64
|
+
`~/.omnius/api.key`. Runtime keys are minted, listed in masked form, and
|
|
65
|
+
revoked through `/v1/keys`.
|
|
156
66
|
|
|
157
|
-
|
|
158
|
-
|------|---------|
|
|
159
|
-
| `packages/memory/src/selfModel.ts` | `DECAY_CLASSES: ["session", "daily", "procedural", "permanent"]` — session-scoped memory decay |
|
|
160
|
-
| `packages/memory/src/toolOutcomes.ts` | `Reset (e.g., on session start before restoring from store)` |
|
|
161
|
-
| `packages/memory/src/predictionStore.ts` | `tokenSimilarity()` — token-based string comparison (not auth tokens) |
|
|
67
|
+
Send daemon credentials only in:
|
|
162
68
|
|
|
163
|
-
|
|
69
|
+
```text
|
|
70
|
+
Authorization: Bearer <key>
|
|
71
|
+
```
|
|
164
72
|
|
|
165
|
-
|
|
73
|
+
Query-string credentials are rejected because URLs leak into browser history,
|
|
74
|
+
logs, and telemetry.
|
|
166
75
|
|
|
167
|
-
|
|
168
|
-
|------|---------|
|
|
169
|
-
| `packages/schemas/src/messages.ts` | `sessionId: z.string().uuid()` — session ID schema |
|
|
170
|
-
| `packages/schemas/src/index.ts` | `export { SessionSchema, type Session }` |
|
|
171
|
-
| `packages/schemas/src/memory.ts` | `ownershipArea` field: "Logical ownership area (e.g. 'auth', 'api', 'db', 'frontend')" |
|
|
76
|
+
## Scopes
|
|
172
77
|
|
|
173
|
-
|
|
78
|
+
| Scope | Typical authority |
|
|
79
|
+
| --- | --- |
|
|
80
|
+
| `read` | health/version, discovery, models, config summaries, tools/skills metadata, memory search, usage, events |
|
|
81
|
+
| `run` | chat, runs, permitted tool calls, allowed memory writes |
|
|
82
|
+
| `admin` | config/key/profile mutation, high-risk controls, admin tools |
|
|
174
83
|
|
|
175
|
-
|
|
84
|
+
Scope is necessary but not sufficient for a tool call. Tool security metadata,
|
|
85
|
+
the selected profile, request origin, off-device policy, network policy, and
|
|
86
|
+
risk classification are enforced after bearer authentication.
|
|
176
87
|
|
|
177
|
-
|
|
178
|
-
|------|---------|
|
|
179
|
-
| `packages/retrieval/src/semanticSearch.ts` | "auth" appears only as an example query term: `Example: "auth middleware +api -test ~service"` |
|
|
180
|
-
| `packages/retrieval/src/snippetPacker.ts` | Token budget logic (not auth tokens) |
|
|
88
|
+
## Profiles And External Tools
|
|
181
89
|
|
|
182
|
-
|
|
90
|
+
Runtime keys may bind a named tool profile. A run key with a bookkeeping
|
|
91
|
+
profile can update todos and notes without receiving filesystem, shell, or
|
|
92
|
+
network tools.
|
|
183
93
|
|
|
184
|
-
|
|
94
|
+
HTTP- and MCP-backed external tools use the same daemon auth, policy, audit,
|
|
95
|
+
and direct-call metadata as built-in tools. Registration requires run scope
|
|
96
|
+
locally and admin scope for remote callers.
|
|
185
97
|
|
|
186
|
-
|
|
98
|
+
## Routes Without Work Authority
|
|
187
99
|
|
|
188
|
-
|
|
100
|
+
Health, version, help, OpenAPI, and discovery remain accessible for
|
|
101
|
+
compatibility diagnosis according to daemon binding/auth configuration.
|
|
102
|
+
Reading capability metadata does not grant authority to execute it.
|
|
189
103
|
|
|
190
|
-
|
|
104
|
+
The optional `X-Omnius-Min-Version` header is a package compatibility
|
|
105
|
+
precondition, not authentication. A valid bearer key does not bypass a stale
|
|
106
|
+
service rejection, and satisfying the version gate does not grant a scope.
|
|
191
107
|
|
|
192
|
-
|
|
193
|
-
┌─────────────────────────────────────────────────────────────────┐
|
|
194
|
-
│ AUTH IN OMNIUS │
|
|
195
|
-
│ │
|
|
196
|
-
│ 1. PROVIDER AUTH (API Keys) │
|
|
197
|
-
│ ├── CLI config → bearer tokens for remote providers │
|
|
198
|
-
│ ├── backend-vllm → authHeaders() for vLLM requests │
|
|
199
|
-
│ ├── 14 remote providers configured (all require API keys) │
|
|
200
|
-
│ └── Ollama (local) → no auth required │
|
|
201
|
-
│ │
|
|
202
|
-
│ 2. SECRET REDACTION │
|
|
203
|
-
│ ├── CLI secret-redactor.ts — regex-based masking │
|
|
204
|
-
│ ├── MCP secret-detector.ts — auth header detection │
|
|
205
|
-
│ └── Covers: sk-, gsk_, hf_, npm_, pypi-, etc. │
|
|
206
|
-
│ │
|
|
207
|
-
│ 3. SESSION-SCOPED PERMISSIONS (internal) │
|
|
208
|
-
│ ├── orchestrator/permissionRuleset.ts — deny cascade │
|
|
209
|
-
│ ├── execution/model-broker.ts — sessionKey slot reservation│
|
|
210
|
-
│ └── memory/selfModel.ts — session-scoped decay │
|
|
211
|
-
│ │
|
|
212
|
-
│ 4. REST DAEMON — NO AUTH │
|
|
213
|
-
│ ├── apps/api — helmet + cors only │
|
|
214
|
-
│ ├── sessionsRouter — in-memory, no auth │
|
|
215
|
-
│ └── healthRouter — open │
|
|
216
|
-
│ │
|
|
217
|
-
│ 5. WORKER — NO AUTH │
|
|
218
|
-
│ └── Trusts API daemon for routing │
|
|
219
|
-
└─────────────────────────────────────────────────────────────────┘
|
|
220
|
-
```
|
|
108
|
+
## Network Deployment Rules
|
|
221
109
|
|
|
222
|
-
|
|
110
|
+
- Keep the default loopback binding for personal use.
|
|
111
|
+
- Require scoped bearer keys before binding to LAN or public interfaces.
|
|
112
|
+
- Put internet-facing daemons behind TLS and a narrow reverse-proxy allowlist.
|
|
113
|
+
- Use a distinct key and narrow tool profile for each agent/service.
|
|
114
|
+
- Strip REST key variables before spawning model-facing subprocesses.
|
|
115
|
+
- Redact provider and REST credentials before sending context to remote
|
|
116
|
+
inference, sponsor, COHERE, Telegram, or MCP peers.
|
|
223
117
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
4. **No CSRF protection** — CORS is enabled but no CSRF tokens
|
|
228
|
-
5. **No session validation** — sessions are in-memory Map, no persistence or validation
|
|
229
|
-
6. **No admin/auth endpoints** — no login, logout, or user management
|
|
118
|
+
See [Auth And Scopes](../rest/auth-and-scopes.md) for request examples and
|
|
119
|
+
[Security And Remote Access](../operations/security-and-remote-access.md) for
|
|
120
|
+
deployment hardening.
|
|
@@ -11,6 +11,7 @@ Configuration is layered from environment, global user settings, project setting
|
|
|
11
11
|
| `OMNIUS_REST_API_KEYS` | Multi-key REST auth: `key:scope:owner:rpm:tpd:max_jobs` |
|
|
12
12
|
| `OMNIUS_PROVIDER_API_KEY` | Upstream model-provider bearer token |
|
|
13
13
|
| `OMNIUS_MODEL_API_KEY` | Alternate upstream model-provider bearer token |
|
|
14
|
+
| `OMNIUS_UPSTREAM_API_KEY` | Compatibility upstream provider token |
|
|
14
15
|
| `OMNIUS_API_KEY` | Legacy fallback for provider auth and legacy REST auth |
|
|
15
16
|
| `OMNIUS_API_KEYS` | Legacy multi-key REST auth |
|
|
16
17
|
| `OMNIUS_ACCESS` | Network access policy for the daemon |
|
|
@@ -18,6 +19,32 @@ Configuration is layered from environment, global user settings, project setting
|
|
|
18
19
|
| `OMNIUS_FORCE_NO_THINK` | Force `think: false` for Qwen-style backends |
|
|
19
20
|
| `OMNIUS_THINK_AUTO` | Enable opt-in automatic thinking mode trigger |
|
|
20
21
|
|
|
22
|
+
## Provider Key Precedence
|
|
23
|
+
|
|
24
|
+
For an upstream inference request, Omnius resolves one credential in this
|
|
25
|
+
exact order:
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
OMNIUS_PROVIDER_API_KEY
|
|
29
|
+
→ OMNIUS_MODEL_API_KEY
|
|
30
|
+
→ OMNIUS_UPSTREAM_API_KEY
|
|
31
|
+
→ OMNIUS_API_KEY
|
|
32
|
+
→ VLLM_API_KEY
|
|
33
|
+
→ persisted endpoint configuration
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The first defined value wins. `OMNIUS_REST_API_KEY` and
|
|
37
|
+
`OMNIUS_REST_API_KEYS` authenticate callers to the Omnius daemon; they are not
|
|
38
|
+
upstream provider credentials.
|
|
39
|
+
|
|
40
|
+
## Provider Protocol
|
|
41
|
+
|
|
42
|
+
Known provider presets select one of `ollama`, `openai-chat`, or
|
|
43
|
+
`anthropic-messages`. Custom endpoint configuration must include an explicit
|
|
44
|
+
protocol. If a legacy endpoint can be identified unambiguously from its known
|
|
45
|
+
provider or saved backend type, Omnius migrates it; otherwise the endpoint
|
|
46
|
+
remains saved but disabled until a protocol is selected.
|
|
47
|
+
|
|
21
48
|
## Runtime State
|
|
22
49
|
|
|
23
50
|
Project runtime state:
|
|
@@ -37,6 +37,13 @@ pnpm docs:check
|
|
|
37
37
|
| `GET` | `/v1/cost` | Cost tracker |
|
|
38
38
|
| `GET` | `/v1/system` | CPU, RAM, GPU, and system snapshot |
|
|
39
39
|
|
|
40
|
+
## Discovery
|
|
41
|
+
|
|
42
|
+
| Method | Path | Purpose |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| `GET` | `/v1/discovery` | Search or list the capability catalog |
|
|
45
|
+
| `GET` | `/v1/discovery/{id}` | Expand one stable capability entry |
|
|
46
|
+
|
|
40
47
|
## Inference And Chat
|
|
41
48
|
|
|
42
49
|
| Method | Path | Purpose |
|
|
@@ -14,13 +14,13 @@ Command metadata drives the TUI, REST command proxy, gateway exposure, and agent
|
|
|
14
14
|
|
|
15
15
|
| Category | Commands |
|
|
16
16
|
| --- | ---: |
|
|
17
|
-
| Core |
|
|
17
|
+
| Core | 30 |
|
|
18
18
|
| Models And Endpoints | 2 |
|
|
19
19
|
| Sessions And Control | 14 |
|
|
20
20
|
| Runtime | 12 |
|
|
21
21
|
| Media | 11 |
|
|
22
22
|
| Network And P2P | 10 |
|
|
23
|
-
| Memory And Context |
|
|
23
|
+
| Memory And Context | 3 |
|
|
24
24
|
| Tools And Skills | 6 |
|
|
25
25
|
| External Gateways | 2 |
|
|
26
26
|
| Secrets | 2 |
|
|
@@ -48,6 +48,26 @@ Signatures:
|
|
|
48
48
|
|
|
49
49
|
- `/bruteforce` - Toggle brute-force mode (auto re-engage on turn limit)
|
|
50
50
|
|
|
51
|
+
### /camera
|
|
52
|
+
|
|
53
|
+
Open compact camera preset menu shared with /live
|
|
54
|
+
|
|
55
|
+
| Field | Value |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| Category | Core |
|
|
58
|
+
| Status | implemented |
|
|
59
|
+
| Surfaces | tui, rest, gateway, agentTool |
|
|
60
|
+
| Safety | none |
|
|
61
|
+
| Aliases | - |
|
|
62
|
+
| Args | - |
|
|
63
|
+
| Subcommands | status |
|
|
64
|
+
|
|
65
|
+
Signatures:
|
|
66
|
+
|
|
67
|
+
- `/camera` - Open compact camera preset menu shared with /live
|
|
68
|
+
- `/camera status` - Show selected camera and per-device presets
|
|
69
|
+
- `/camera select\|preview\|resolution\|fps\|rotate` - Manage camera source, preview, resolution, FPS, and orientation
|
|
70
|
+
|
|
51
71
|
### /clear
|
|
52
72
|
|
|
53
73
|
Clear the screen
|
|
@@ -298,6 +318,54 @@ Signatures:
|
|
|
298
318
|
|
|
299
319
|
- `/insights` - Show historical session insights
|
|
300
320
|
|
|
321
|
+
### /live
|
|
322
|
+
|
|
323
|
+
Open live sensor stream menu for video/audio context
|
|
324
|
+
|
|
325
|
+
| Field | Value |
|
|
326
|
+
| --- | --- |
|
|
327
|
+
| Category | Core |
|
|
328
|
+
| Status | implemented |
|
|
329
|
+
| Surfaces | tui, rest, gateway, agentTool |
|
|
330
|
+
| Safety | none |
|
|
331
|
+
| Aliases | - |
|
|
332
|
+
| Args | - |
|
|
333
|
+
| Subcommands | status, run, chat, camera, resolution, fps, rotate, infer, clip, stop |
|
|
334
|
+
|
|
335
|
+
Signatures:
|
|
336
|
+
|
|
337
|
+
- `/live` - Open live sensor stream menu for video/audio context
|
|
338
|
+
- `/live status` - Show live sensor devices, selected streams, and latest snapshot
|
|
339
|
+
- `/live run [agent]` - Start low-latency video/audio feedback; agent enables background PFC review
|
|
340
|
+
- `/live chat` - Start low-latency voicechat with live audio/video context and async agent review
|
|
341
|
+
- `/live camera <device>` - Select a camera and render an ASCII preview
|
|
342
|
+
- `/live resolution [camera] 720p\|1080p\|1440p\|4k\|native` - Set per-camera live stream resolution (default 1080p)
|
|
343
|
+
- `/live fps [camera] 1\|2\|4\|8\|12\|15\|24\|30` - Set per-camera live stream FPS (default 8)
|
|
344
|
+
- `/live camera-on\|camera-off [camera]` - Enable or disable an individual live camera stream
|
|
345
|
+
- `/live rotate auto\|cw\|ccw\|180\|none [camera]` - Detect or set persistent camera orientation correction
|
|
346
|
+
- `/live infer [now\|on\|off]` - Toggle or run camera object/location inference
|
|
347
|
+
- `/live clip [on\|off]` - Toggle CLIP visual-memory recognition on live frames
|
|
348
|
+
- `/live audio\|asr\|sounds on\|off` - Toggle live audio context streams
|
|
349
|
+
- `/live stop` - Disable all live sensor streams
|
|
350
|
+
|
|
351
|
+
### /livechat
|
|
352
|
+
|
|
353
|
+
Alias for /live chat, used by the top live button
|
|
354
|
+
|
|
355
|
+
| Field | Value |
|
|
356
|
+
| --- | --- |
|
|
357
|
+
| Category | Core |
|
|
358
|
+
| Status | implemented |
|
|
359
|
+
| Surfaces | tui, rest, gateway, agentTool |
|
|
360
|
+
| Safety | none |
|
|
361
|
+
| Aliases | - |
|
|
362
|
+
| Args | - |
|
|
363
|
+
| Subcommands | - |
|
|
364
|
+
|
|
365
|
+
Signatures:
|
|
366
|
+
|
|
367
|
+
- `/livechat` - Alias for /live chat, used by the top live button
|
|
368
|
+
|
|
301
369
|
### /music
|
|
302
370
|
|
|
303
371
|
Open music-generation model/setup menu
|
|
@@ -503,6 +571,25 @@ Signatures:
|
|
|
503
571
|
|
|
504
572
|
- `/think` - Toggle thinking/reasoning mode (Qwen3, DeepSeek-R1, etc.)
|
|
505
573
|
|
|
574
|
+
### /tree
|
|
575
|
+
|
|
576
|
+
Switch between the action waterfall and an explorable action tree
|
|
577
|
+
|
|
578
|
+
| Field | Value |
|
|
579
|
+
| --- | --- |
|
|
580
|
+
| Category | Core |
|
|
581
|
+
| Status | implemented |
|
|
582
|
+
| Surfaces | tui, rest, gateway, agentTool |
|
|
583
|
+
| Safety | none |
|
|
584
|
+
| Aliases | - |
|
|
585
|
+
| Args | - |
|
|
586
|
+
| Subcommands | - |
|
|
587
|
+
|
|
588
|
+
Signatures:
|
|
589
|
+
|
|
590
|
+
- `/tree` - Switch between the action waterfall and an explorable action tree
|
|
591
|
+
- `/tree on\|off\|status` - Show, hide, or inspect the action-tree presentation
|
|
592
|
+
|
|
506
593
|
### /usage
|
|
507
594
|
|
|
508
595
|
Show current session token count and cost
|
|
@@ -1555,6 +1642,42 @@ Signatures:
|
|
|
1555
1642
|
- `/memory concepts` - Show concept clusters view
|
|
1556
1643
|
- `/memory timeline` - Show temporal timeline view
|
|
1557
1644
|
|
|
1645
|
+
### /metabolize
|
|
1646
|
+
|
|
1647
|
+
Run memory maintenance: import deferred memory, prune episodes, compact graph stores
|
|
1648
|
+
|
|
1649
|
+
| Field | Value |
|
|
1650
|
+
| --- | --- |
|
|
1651
|
+
| Category | Memory And Context |
|
|
1652
|
+
| Status | implemented |
|
|
1653
|
+
| Surfaces | tui, rest, gateway, agentTool |
|
|
1654
|
+
| Safety | none |
|
|
1655
|
+
| Aliases | /metab |
|
|
1656
|
+
| Args | [--dry-run] [--verbose] [--min-score <n>] |
|
|
1657
|
+
| Subcommands | - |
|
|
1658
|
+
|
|
1659
|
+
Signatures:
|
|
1660
|
+
|
|
1661
|
+
- `/metabolize [--dry-run] [--verbose] [--min-score <n>]` - Run memory maintenance: import deferred memory, prune episodes, compact graph stores
|
|
1662
|
+
|
|
1663
|
+
### /prune
|
|
1664
|
+
|
|
1665
|
+
Shrink knowledge.db in the background: evict low-signal graph nodes (archived), then VACUUM. 'infer' = model-guided sleep consolidation. No arg shows stats + usage
|
|
1666
|
+
|
|
1667
|
+
| Field | Value |
|
|
1668
|
+
| --- | --- |
|
|
1669
|
+
| Category | Memory And Context |
|
|
1670
|
+
| Status | implemented |
|
|
1671
|
+
| Surfaces | tui, rest, gateway, agentTool |
|
|
1672
|
+
| Safety | none |
|
|
1673
|
+
| Aliases | - |
|
|
1674
|
+
| Args | [now\|dry\|infer\|aggressive\|stats] [--target <n>] |
|
|
1675
|
+
| Subcommands | - |
|
|
1676
|
+
|
|
1677
|
+
Signatures:
|
|
1678
|
+
|
|
1679
|
+
- `/prune [now\|dry\|infer\|aggressive\|stats] [--target <n>]` - Shrink knowledge.db in the background: evict low-signal graph nodes (archived), then VACUUM. 'infer' = model-guided sleep consolidation. No arg shows stats + usage
|
|
1680
|
+
|
|
1558
1681
|
|
|
1559
1682
|
## Tools And Skills
|
|
1560
1683
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Archived design notes — unwired
|
|
2
|
+
|
|
3
|
+
Documents in this directory describe design proposals that were never wired
|
|
4
|
+
into the runtime. They are kept for historical context only.
|
|
5
|
+
|
|
6
|
+
| File | Status | Superseded by |
|
|
7
|
+
|---|---|---|
|
|
8
|
+
| `context_window_attention_spec.md` | Step 4 ("scale QK dot products by item weight") is physically impossible against API-served LLMs (Anthropic / OpenAI / Ollama). The rest was unwired. | `OA_WEIGHTED_MEMORY_PLAN.md` (repo root) |
|
|
9
|
+
| `context_window_attention_weights.json` | No loader in any package. Pure documentation. | `.omnius/config/memory-weighting.yaml` (per the new plan) |
|
|
10
|
+
| `context_window_attention_model.py` | Python module never imported by the Node.js runtime. | `packages/orchestrator/src/memory/composite-scorer.ts` (per the new plan) |
|
|
11
|
+
|
|
12
|
+
The current canonical design is `OA_WEIGHTED_MEMORY_PLAN.md` at the repo root,
|
|
13
|
+
which replaces the theater with real KV-cache-affecting wiring (Anthropic
|
|
14
|
+
`cache_control` markers, Ollama `memoryPrefix` prefix-cache exploitation) and
|
|
15
|
+
score-driven materialization tiers.
|
|
16
|
+
|
|
17
|
+
If you came here looking for "how attention weighting works in omnius," the
|
|
18
|
+
answer was: it didn't, until the new plan. Read that instead.
|