omnigateway 0.4.13 → 0.5.1

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 (58) hide show
  1. package/README.md +52 -1
  2. package/bin/omni.js +6970 -6733
  3. package/gateway.js +9440 -8038
  4. package/package.json +1 -1
  5. package/public/assets/{CopyValue-C2DkO9Yz.js → CopyValue-DNNJGDI5.js} +5 -5
  6. package/public/assets/{Field-B79Yxdit.js → Field-B2rnk3JM.js} +1 -1
  7. package/public/assets/{Match-BWa6L0L1.js → Match-CvkEmOIG.js} +1 -1
  8. package/public/assets/{Panel-CoulMx6R.js → Panel-BeQOQoap.js} +2 -2
  9. package/public/assets/Rack-DdhpgQWD.js +316 -0
  10. package/public/assets/{Readout-D1XEfywe.js → Readout-CZfn5JDy.js} +1 -1
  11. package/public/assets/RequestTable-I1TrD689.js +11 -0
  12. package/public/assets/States-2kaQxx-s.js +54 -0
  13. package/public/assets/SummaryDeck-BisdRswW.js +15 -0
  14. package/public/assets/{Toggle-CRrH9nDt.js → Toggle-BvOELhpy.js} +1 -1
  15. package/public/assets/{TokenBreakdown-C2NsJnqO.js → TokenBreakdown-En1JT4tT.js} +1 -1
  16. package/public/assets/WindowChart-Bvbkz9rt.js +11 -0
  17. package/public/assets/_app-a3VUev6k.js +1 -0
  18. package/public/assets/_app.accounts-CYPB-7Xt.js +59 -0
  19. package/public/assets/_app.console-C4x5F3d0.js +44 -0
  20. package/public/assets/_app.database-B-9oB52r.js +24 -0
  21. package/public/assets/_app.index-NBeanmyf.js +62 -0
  22. package/public/assets/_app.keys-DK9jdOqT.js +82 -0
  23. package/public/assets/_app.logs-Dr6fApsE.js +58 -0
  24. package/public/assets/_app.models-CGBQ2QaS.js +148 -0
  25. package/public/assets/_app.plugins._pluginId-DXzhupNH.js +20 -0
  26. package/public/assets/_app.settings-zTFRyxhZ.js +58 -0
  27. package/public/assets/_app.usage-BCCimHY0.js +76 -0
  28. package/public/assets/chevron-right-mGs1is3r.js +1 -0
  29. package/public/assets/client-CQGHWD56.js +39 -0
  30. package/public/assets/index-C3LoGDKu.js +178 -0
  31. package/public/assets/login-bJoYdBqx.js +45 -0
  32. package/public/assets/plus-Bqi8Y2Xd.js +1 -0
  33. package/public/assets/queries-GAue98pY.js +145 -0
  34. package/public/assets/reasons-Du1OBWAM.js +1 -0
  35. package/public/assets/shared-DQOWYTp3.js +77 -0
  36. package/public/assets/stream-Bu-m1Z1Y.js +1 -0
  37. package/public/assets/{trash-2-DwMK-JrZ.js → trash-2-BDA1rQVQ.js} +1 -1
  38. package/public/index.html +3 -3
  39. package/public/shared/dashboard-sdk.js +1 -1
  40. package/public/assets/Rack-HM36SprU.js +0 -314
  41. package/public/assets/States-DtkkMzEu.js +0 -54
  42. package/public/assets/_app-DVpIsUid.js +0 -1
  43. package/public/assets/_app.accounts-64d_cxir.js +0 -64
  44. package/public/assets/_app.console-BBuBmLRI.js +0 -44
  45. package/public/assets/_app.database-J9Ujio8l.js +0 -24
  46. package/public/assets/_app.index-BX4yKEXO.js +0 -62
  47. package/public/assets/_app.keys-2sKwhZJc.js +0 -76
  48. package/public/assets/_app.logs-DuHXYrZU.js +0 -68
  49. package/public/assets/_app.models-B0kTfPtn.js +0 -148
  50. package/public/assets/_app.plugins._pluginId-BOXRBToU.js +0 -20
  51. package/public/assets/_app.settings-DoaOUmc1.js +0 -46
  52. package/public/assets/_app.usage-B5sxB40E.js +0 -83
  53. package/public/assets/index-iCfSaRSG.js +0 -178
  54. package/public/assets/login-B9CJqU--.js +0 -36
  55. package/public/assets/plus-DKapAGoR.js +0 -1
  56. package/public/assets/queries-CX9mStps.js +0 -145
  57. package/public/assets/reasons-Cb8yF4Oy.js +0 -1
  58. package/public/assets/shared-Cct_4xwp.js +0 -84
package/README.md CHANGED
@@ -402,6 +402,53 @@ supervisor; use `omni restart` from a terminal there. Shutdown is offered in
402
402
  every shape. In a container it is a one-way door: bring the process back from
403
403
  the host.
404
404
 
405
+ ### Behind a reverse proxy
406
+
407
+ Set `OMNI_BASE_URL` to the public HTTPS origin, or OAuth callbacks come back to
408
+ the wrong host.
409
+
410
+ Beyond that, two things travel badly through a proxy, and both are streams.
411
+ Client responses on `/v1/*` are server-sent events, and the console keeps one
412
+ WebSocket open on `/api/stream`. Neither is optional: buffer the first and every
413
+ token of an agent's reply arrives at once at the end, and drop the second and
414
+ the console silently falls back to polling.
415
+
416
+ Caddy and Cloudflare pass WebSockets and unbuffered responses by default and
417
+ need nothing. nginx needs telling:
418
+
419
+ ```nginx
420
+ location / {
421
+ proxy_pass http://127.0.0.1:9000;
422
+ proxy_http_version 1.1;
423
+
424
+ # Without these two the Upgrade handshake never reaches the gateway and the
425
+ # console shows LIVE·POLL instead of LIVE·PUSH. It keeps working — the
426
+ # fallback exists for exactly this — but you paid for a socket you are not
427
+ # getting.
428
+ proxy_set_header Upgrade $http_upgrade;
429
+ proxy_set_header Connection "upgrade";
430
+
431
+ proxy_set_header Host $host;
432
+ proxy_set_header X-Forwarded-Proto $scheme;
433
+
434
+ # The socket's heartbeat is 20s and it gives up on a missed pong at 60s.
435
+ # A read timeout below that closes a healthy connection from the outside,
436
+ # and the console reconnects in a loop that looks like an unstable gateway.
437
+ proxy_read_timeout 300s;
438
+
439
+ # SSE must not be buffered. The gateway already sends
440
+ # `x-accel-buffering: no` on streaming responses, which nginx honours on its
441
+ # own, so this line is belt and braces for a proxy chain where something
442
+ # else strips that header before nginx sees it.
443
+ proxy_buffering off;
444
+ }
445
+ ```
446
+
447
+ The gateway sends downstream `: keepalive` comments on streaming responses
448
+ because provider heartbeats are decoded away, so an idle stream still looks
449
+ alive to whatever sits in between. Keep any idle timeout in the proxy above
450
+ your longest expected request.
451
+
405
452
  ## Configuration
406
453
 
407
454
  Configuration is environment variables, read from the installation's `.env`:
@@ -417,7 +464,6 @@ Configuration is environment variables, read from the installation's `.env`:
417
464
  | `OMNI_LOG_LEVEL` | No | `info` | Stdout threshold: `debug`, `info`, `warn`, or `error` |
418
465
  | `OMNI_LOG_FILE` | No | the systemd journal, when there is one | Where stdout was already redirected, so the Console screen can read it back. Names a file; does not create one |
419
466
  | `OMNI_BODY_LOGGING_ALLOWED` | No | unset | Permits request/response body capture on this installation. Read at boot. Capture also needs the runtime setting; see [Recording bodies](#recording-bodies) |
420
- | `OMNI_EXPOSE_CLAUDE_CODE_ALIASES` | No | off | Advertises the reserved `claude/*` aliases on `/v1/models`. Read at boot |
421
467
  | `OMNI_ROOT` | No | the installation in the current directory, else `~/.config/omnigateway` | Which installation the CLI acts on, when `--root` is not passed |
422
468
  | `OMNI_PLUGIN_REGISTRY` | No | the public npm registry | Registry `omni plugin install <name>` resolves through; must be `https://` |
423
469
 
@@ -680,6 +726,11 @@ ID NAME VERSION API SDK CAPABILITIES
680
726
  pokemon Pokémon Companion 1.0.0 1 ^1.0.0 storage,files,net:outbound,… ok
681
727
  ```
682
728
 
729
+ The capabilities a manifest may declare are `storage`, `files`, `net:outbound`,
730
+ `events:request`, `events:limit` and `channels` — the last being namespaced
731
+ topics on the gateway's push socket, which a plugin owns without ever touching a
732
+ connection. Anything a plugin did not declare is absent from what it is handed.
733
+
683
734
  A plugin that would *not* load is listed with the reason rather than hidden,
684
735
  because a plugin missing from the console is exactly what you are trying to
685
736
  explain. For one plugin's full detail — its entry points and the outbound