omnigateway 0.7.0 → 0.7.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.
Files changed (48) hide show
  1. package/README.md +21 -6
  2. package/bin/omni.js +6035 -5841
  3. package/gateway.js +6326 -5555
  4. package/package.json +1 -1
  5. package/public/assets/{Chip-BWxO0uV7.js → Chip-BOyBT5TP.js} +1 -1
  6. package/public/assets/{CopyValue-DIR5A6PG.js → CopyValue-DRHHQlN_.js} +3 -3
  7. package/public/assets/{Field-DI5YTYOX.js → Field-DK5zaBVA.js} +1 -1
  8. package/public/assets/Lamp-ZlMzNs5N.js +25 -0
  9. package/public/assets/{Panel-BCpZVY4U.js → Panel-CYQvfI3L.js} +19 -19
  10. package/public/assets/Rack-D798XvPQ.js +466 -0
  11. package/public/assets/{Readout-B0TZE8aA.js → Readout-D6-aurU8.js} +1 -1
  12. package/public/assets/{RequestTable-D4z82uxG.js → RequestTable-CEBhwDs7.js} +2 -2
  13. package/public/assets/{SummaryDeck-CzozuXOu.js → SummaryDeck-DBCSHihY.js} +2 -2
  14. package/public/assets/{Toggle-ByxBCMfb.js → Toggle-CdCCoDEo.js} +1 -1
  15. package/public/assets/{TokenBreakdown-BMEiZhRX.js → TokenBreakdown-DDI9uTPW.js} +1 -1
  16. package/public/assets/{WindowChart-nxC4SCRC.js → WindowChart-C-Y6U3WF.js} +2 -2
  17. package/public/assets/_app-BWNEo1e-.js +1 -0
  18. package/public/assets/_app.accounts-CLLLwN77.js +59 -0
  19. package/public/assets/{_app.console-D6lrTxJt.js → _app.console-Dr9qxU7J.js} +3 -3
  20. package/public/assets/{_app.database-Y3lFDxoP.js → _app.database-D0W0pcxC.js} +4 -4
  21. package/public/assets/{_app.index-DUFa7RRT.js → _app.index-CyxnfhVX.js} +8 -8
  22. package/public/assets/{_app.keys-DRfXCzMJ.js → _app.keys-D9qmw9Tj.js} +11 -11
  23. package/public/assets/{_app.logs-BQT3kFZr.js → _app.logs-DtXUZETW.js} +4 -4
  24. package/public/assets/{_app.models-CDpbIYHW.js → _app.models-CNxwXyFl.js} +11 -11
  25. package/public/assets/{_app.plugins._pluginId-jaswB8Z5.js → _app.plugins._pluginId-87Ox_hkW.js} +1 -1
  26. package/public/assets/_app.plugins._pluginId-CZWipH1n.js +2 -0
  27. package/public/assets/_app.settings-DjiMSl1Y.js +88 -0
  28. package/public/assets/{_app.usage-BaT54Vee.js → _app.usage-CZz9raYR.js} +6 -6
  29. package/public/assets/{chevron-right-0adI8395.js → chevron-right-CPoaXYHw.js} +1 -1
  30. package/public/assets/client-CZnyYbay.js +39 -0
  31. package/public/assets/{index-BRrBGt1i.js → index-DNSPtYpM.js} +3 -3
  32. package/public/assets/{login-BSWCo_Fz.js → login-BtlMmyKj.js} +3 -3
  33. package/public/assets/login-dV42ZQIA.js +2 -0
  34. package/public/assets/plus-_zo43Lvf.js +1 -0
  35. package/public/assets/{preload-helper-CD37DT-E.js → preload-helper-4wSmu2-E.js} +1 -1
  36. package/public/assets/{shared-dShKzjig.js → shared-OJcoRCqT.js} +1 -1
  37. package/public/assets/{stream-BD4FhzLn.js → stream-CEb81tzM.js} +1 -1
  38. package/public/assets/{trash-2-DrDlpCqO.js → trash-2-BjpqTubo.js} +1 -1
  39. package/public/index.html +8 -8
  40. package/public/assets/Lamp-DN2EKL4m.js +0 -25
  41. package/public/assets/Rack-B03tpeW-.js +0 -466
  42. package/public/assets/_app-D9B6OIjd.js +0 -1
  43. package/public/assets/_app.accounts-BiRGhH3s.js +0 -59
  44. package/public/assets/_app.plugins._pluginId-CtEAGvad.js +0 -2
  45. package/public/assets/_app.settings-CG63splg.js +0 -58
  46. package/public/assets/client-_6YMm6vh.js +0 -39
  47. package/public/assets/login-C7v-Fr28.js +0 -2
  48. package/public/assets/plus-B_f8M9yB.js +0 -1
package/README.md CHANGED
@@ -21,9 +21,10 @@ omni start
21
21
 
22
22
  ## What it does
23
23
 
24
- - **Speaks both dialects.** `POST /v1/messages` (Anthropic) and
25
- `POST /v1/chat/completions` (OpenAI), including streaming, translated to
26
- whichever provider actually serves the request.
24
+ - **Speaks three dialects.** `POST /v1/messages` (Anthropic),
25
+ `POST /v1/chat/completions` (OpenAI) and `POST /v1/responses` (OpenAI
26
+ Responses, which is the only API Codex CLI speaks), including streaming,
27
+ translated to whichever provider actually serves the request.
27
28
  - **Filters bulky tool history, optionally.** Built-in RTK filters shorten
28
29
  eligible large or repetitive shell and recognizable command output before
29
30
  provider dispatch, preserve errors and non-tool-result content, and default off.
@@ -289,6 +290,7 @@ Everything above is also available in the browser at
289
290
  | --- | --- | --- |
290
291
  | `POST` | `/v1/messages` | Anthropic Messages API |
291
292
  | `POST` | `/v1/chat/completions` | OpenAI Chat Completions API |
293
+ | `POST` | `/v1/responses` | OpenAI Responses API (stateless: no stored responses, no `previous_response_id`) |
292
294
  | `POST` | `/v1/messages/count_tokens` | Anthropic-compatible local token estimation (authenticated) |
293
295
  | `GET` | `/v1/models` | Listing in both dialects, filtered by your key's allowlist |
294
296
  | `GET` | `/health` | Unauthenticated liveness check |
@@ -315,7 +317,7 @@ Most tools that accept a custom base URL work unchanged: set it to
315
317
 
316
318
  Every response carries the limit headers of the surface you asked on, so an SDK
317
319
  backs off using the code it already ships — the Anthropic dialect on
318
- `/v1/messages`, the OpenAI one on `/v1/chat/completions`:
320
+ `/v1/messages`, the OpenAI one on `/v1/chat/completions` and `/v1/responses`:
319
321
 
320
322
  ```http
321
323
  anthropic-ratelimit-requests-limit: 2000 x-ratelimit-limit-requests: 2000
@@ -376,7 +378,7 @@ Use `--db <path>` to point one command somewhere else.
376
378
  | `omni credentials …` | list, show, enable, disable, `set`, `rm`, refresh, `add-key`, health |
377
379
  | `omni models …` | list, show, put, `rm`, `dry-run`, `catalog` |
378
380
  | `omni keys …` | list, create, `limits`, revoke |
379
- | `omni plugin …` | list, verify, install, remove; see [Plugins](#plugins) |
381
+ | `omni plugin …` | list, verify, install, update, remove; see [Plugins](#plugins) |
380
382
  | `omni service install` / `uninstall` | write or remove a systemd unit for this installation |
381
383
  | `omni setup claude` / `opencode` | point a client's config at this gateway |
382
384
  | `omni settings get` / `set` | routing weights, retention, deadlines, and the runtime switches |
@@ -384,7 +386,7 @@ Use `--db <path>` to point one command somewhere else.
384
386
  | `omni db migrate` | create or upgrade the database |
385
387
  | `omni db stats` | size on disk, free pages, schema version, and what snapshots are held |
386
388
  | `omni db backup` / `snapshots` | take a snapshot, and list the ones retention has kept |
387
- | `omni db restore <id>` | put a snapshot back; asks first, and refuses while the gateway is running |
389
+ | `omni db restore <id>` | put a snapshot back; shows a live-vs-snapshot count table, then asks. `--dry-run` shows the table and stops |
388
390
  | `omni db vacuum` | rewrite the database, reclaiming the pages deletion left free |
389
391
 
390
392
  Two worth knowing:
@@ -616,6 +618,12 @@ request-log rows, 1.6 s at 2M, 6.5 s at 8M. A failure is logged rather than
616
618
  raised — the database is live either way, and `omni doctor` reports a rollup
617
619
  that disagrees with its rows.
618
620
 
621
+ Before it asks, `restore` prints one row per table with what the snapshot holds
622
+ against what is live, so the confirmation is informed rather than a judgement on
623
+ an id and an mtime. `--dry-run` prints the same table and exits without asking.
624
+ The counts cover the tables the integrity check reads, so they are a floor on
625
+ what a restore replaces rather than the whole of it.
626
+
619
627
  **`omni db restore <id>` refuses while a gateway is running** against that
620
628
  installation, and there is no override flag. A second process can open its own
621
629
  handle but cannot quiesce the gateway's, and moving the file out from under a live
@@ -715,9 +723,16 @@ omni plugin install https://…/x.tgz # a tarball over https, never http
715
723
  omni plugin install some-plugin@1.2.3 # a package name, through the npm registry
716
724
  omni plugin verify some-plugin # every check the next boot will run
717
725
  omni plugin list # what is installed, and whether it would load
726
+ omni plugin update some-plugin # reinstall from whatever it was installed from
718
727
  omni restart # plugins load at boot, so this is required
719
728
  ```
720
729
 
730
+ `update` needs no spec: `install` records the one you typed in
731
+ `.omni-install.json` beside the plugin, so picking up a patch release is the
732
+ plugin's id and nothing else. A bare package name re-resolves to the current
733
+ release; `name@1.2.3` reinstalls that version exactly. A plugin copied in by
734
+ hand has no record and `update` says so rather than guessing.
735
+
721
736
  **Nothing in the package is executed by any of these.** There is no dependency
722
737
  resolution, no `node_modules`, and no lifecycle script — the installer fetches,
723
738
  checks, and unpacks, and the plugin's own code is first imported at the next boot.