omnigateway 0.5.1 → 0.7.0
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 +43 -9
- package/bin/omni.js +6611 -5518
- package/gateway.js +6319 -5049
- package/package.json +1 -1
- package/public/assets/Chip-BWxO0uV7.js +32 -0
- package/public/assets/CopyValue-DIR5A6PG.js +27 -0
- package/public/assets/{Field-B2rnk3JM.js → Field-DI5YTYOX.js} +1 -1
- package/public/assets/Lamp-DN2EKL4m.js +25 -0
- package/public/assets/Panel-BCpZVY4U.js +198 -0
- package/public/assets/Rack-B03tpeW-.js +466 -0
- package/public/assets/{Readout-CZfn5JDy.js → Readout-B0TZE8aA.js} +1 -1
- package/public/assets/RequestTable-D4z82uxG.js +11 -0
- package/public/assets/SummaryDeck-CzozuXOu.js +15 -0
- package/public/assets/{Toggle-BvOELhpy.js → Toggle-ByxBCMfb.js} +1 -1
- package/public/assets/TokenBreakdown-BMEiZhRX.js +31 -0
- package/public/assets/{WindowChart-Bvbkz9rt.js → WindowChart-nxC4SCRC.js} +2 -2
- package/public/assets/_app-D9B6OIjd.js +1 -0
- package/public/assets/_app.accounts-BiRGhH3s.js +59 -0
- package/public/assets/_app.console-D6lrTxJt.js +44 -0
- package/public/assets/_app.database-Y3lFDxoP.js +24 -0
- package/public/assets/_app.index-DUFa7RRT.js +62 -0
- package/public/assets/_app.keys-DRfXCzMJ.js +82 -0
- package/public/assets/_app.logs-BQT3kFZr.js +58 -0
- package/public/assets/_app.models-CDpbIYHW.js +148 -0
- package/public/assets/_app.plugins._pluginId-CtEAGvad.js +2 -0
- package/public/assets/_app.plugins._pluginId-jaswB8Z5.js +20 -0
- package/public/assets/_app.settings-CG63splg.js +58 -0
- package/public/assets/_app.usage-BaT54Vee.js +76 -0
- package/public/assets/{chevron-right-mGs1is3r.js → chevron-right-0adI8395.js} +1 -1
- package/public/assets/client-_6YMm6vh.js +39 -0
- package/public/assets/index-BRrBGt1i.js +13 -0
- package/public/assets/{login-bJoYdBqx.js → login-BSWCo_Fz.js} +4 -4
- package/public/assets/login-C7v-Fr28.js +2 -0
- package/public/assets/plus-B_f8M9yB.js +1 -0
- package/public/assets/preload-helper-CD37DT-E.js +1 -0
- package/public/assets/{shared-DQOWYTp3.js → shared-dShKzjig.js} +3 -3
- package/public/assets/stream-BD4FhzLn.js +1 -0
- package/public/assets/{trash-2-BDA1rQVQ.js → trash-2-DrDlpCqO.js} +1 -1
- package/public/index.html +8 -4
- package/public/shared/dashboard-sdk.js +1 -1
- package/public/assets/Chip-BltJSw8A.js +0 -32
- package/public/assets/CopyValue-DNNJGDI5.js +0 -27
- package/public/assets/Match-CvkEmOIG.js +0 -1
- package/public/assets/Panel-BeQOQoap.js +0 -25
- package/public/assets/Rack-DdhpgQWD.js +0 -316
- package/public/assets/RequestTable-I1TrD689.js +0 -11
- package/public/assets/States-2kaQxx-s.js +0 -54
- package/public/assets/SummaryDeck-BisdRswW.js +0 -15
- package/public/assets/TokenBreakdown-En1JT4tT.js +0 -31
- package/public/assets/_app-a3VUev6k.js +0 -1
- package/public/assets/_app.accounts-CYPB-7Xt.js +0 -59
- package/public/assets/_app.console-C4x5F3d0.js +0 -44
- package/public/assets/_app.database-B-9oB52r.js +0 -24
- package/public/assets/_app.index-NBeanmyf.js +0 -62
- package/public/assets/_app.keys-DK9jdOqT.js +0 -82
- package/public/assets/_app.logs-Dr6fApsE.js +0 -58
- package/public/assets/_app.models-CGBQ2QaS.js +0 -148
- package/public/assets/_app.plugins._pluginId-DXzhupNH.js +0 -20
- package/public/assets/_app.settings-zTFRyxhZ.js +0 -58
- package/public/assets/_app.usage-BCCimHY0.js +0 -76
- package/public/assets/catalog-BBKm8Ih8.js +0 -1
- package/public/assets/client-CQGHWD56.js +0 -39
- package/public/assets/index-C3LoGDKu.js +0 -178
- package/public/assets/matchContext-BOenO3J2.js +0 -1
- package/public/assets/plus-Bqi8Y2Xd.js +0 -1
- package/public/assets/queries-GAue98pY.js +0 -145
- package/public/assets/stream-Bu-m1Z1Y.js +0 -1
package/README.md
CHANGED
|
@@ -27,6 +27,12 @@ omni start
|
|
|
27
27
|
- **Filters bulky tool history, optionally.** Built-in RTK filters shorten
|
|
28
28
|
eligible large or repetitive shell and recognizable command output before
|
|
29
29
|
provider dispatch, preserve errors and non-tool-result content, and default off.
|
|
30
|
+
- **Enforces a coding style, optionally.** With `ponytailMode` set, the gateway
|
|
31
|
+
appends the [ponytail](https://github.com/DietrichGebert/ponytail) ruleset —
|
|
32
|
+
build the smallest thing that works — to the system prompt of every request,
|
|
33
|
+
so any client gets it without installing anything. About 1,240 tokens, cached
|
|
34
|
+
with the prompt it joins; skipped when the client already carries it.
|
|
35
|
+
Defaults off.
|
|
30
36
|
- **Routes across your accounts.** Define a virtual model like `fast` or
|
|
31
37
|
`smart` with several targets; the gateway ranks them by tier, health,
|
|
32
38
|
remaining quota, cost, latency, and current load.
|
|
@@ -70,23 +76,28 @@ graph TD
|
|
|
70
76
|
store["@omni/store<br/><i>SQLite + field encryption</i>"]
|
|
71
77
|
providers["@omni/providers<br/><i>adapters, wire codecs,<br/>catalog, HTTP client</i>"]
|
|
72
78
|
rtk["@omni/rtk<br/><i>tool-result filters</i>"]
|
|
79
|
+
ponytail["@omni/ponytail<br/><i>vendored coding ruleset</i>"]
|
|
73
80
|
ratelimit["@omni/ratelimit<br/><i>key limit arithmetic;<br/>no clock, no state</i>"]
|
|
74
81
|
ir["@omni/ir<br/><i>domain model — depends on nothing</i>"]
|
|
75
82
|
|
|
76
83
|
gateway --> control
|
|
77
84
|
gateway --> rtk
|
|
85
|
+
gateway --> ponytail
|
|
78
86
|
gateway --> ratelimit
|
|
79
87
|
cli --> control
|
|
80
|
-
dashboard -. "types
|
|
88
|
+
dashboard -. "types only" .-> ir
|
|
81
89
|
dashboard -. "types only" .-> store
|
|
82
90
|
control --> router
|
|
91
|
+
control --> ponytail
|
|
83
92
|
control --> ratelimit
|
|
84
93
|
router -. "types + 2 pure helpers,<br/>via /types subpath" .-> store
|
|
85
94
|
router --> providers
|
|
86
95
|
store --> rtk
|
|
96
|
+
store --> ponytail
|
|
87
97
|
store --> ratelimit
|
|
88
98
|
providers --> ir
|
|
89
99
|
rtk --> ir
|
|
100
|
+
ponytail --> ir
|
|
90
101
|
store --> ir
|
|
91
102
|
```
|
|
92
103
|
|
|
@@ -103,9 +114,14 @@ even `@omni/ir`. The rings and the in-flight gauge live in the gateway, because
|
|
|
103
114
|
state is not the package's job, and that split is what lets sliding-window
|
|
104
115
|
arithmetic be tested without a gateway, a store, or a clock.
|
|
105
116
|
|
|
106
|
-
The dashboard's edges are dotted because they are type-level only.
|
|
107
|
-
`@omni/providers
|
|
108
|
-
|
|
117
|
+
The dashboard's edges are dotted because they are type-level only. It has no edge
|
|
118
|
+
to `@omni/providers` at all: provider names, colours, order and model lists reach
|
|
119
|
+
the console over `GET /api/catalog`, because a provider loaded from
|
|
120
|
+
`<root>/plugins/` exists only at runtime and no build-time import could see one.
|
|
121
|
+
|
|
122
|
+
`@omni/providers/catalog` and `/descriptors` are still deliberately import-free,
|
|
123
|
+
for a different reason than they used to be: the pure router imports
|
|
124
|
+
`descriptors`, and the leaf property is what lets it.
|
|
109
125
|
|
|
110
126
|
The router's dotted edge into `@omni/store` is nearly the same story: its
|
|
111
127
|
package-root imports are all `import type`. Two pure arithmetic helpers,
|
|
@@ -166,6 +182,9 @@ Connect an account. The CLI prints a URL to open, and waits:
|
|
|
166
182
|
omni connect anthropic # or: openai, kimi, kilo, grok
|
|
167
183
|
```
|
|
168
184
|
|
|
185
|
+
An installed [plugin](#plugins) that supplies its own provider is connected the
|
|
186
|
+
same way, under its plugin id.
|
|
187
|
+
|
|
169
188
|
Every provider also takes a plain API key, if that is what you hold rather than
|
|
170
189
|
a subscription:
|
|
171
190
|
|
|
@@ -496,6 +515,7 @@ Everything else lives in the database rather than the environment, so it can be
|
|
|
496
515
|
changed without a restart: the six routing weights, `maxAttempts`,
|
|
497
516
|
`requestDeadlineMs`, the circuit breaker's `breakerThreshold` and
|
|
498
517
|
`breakerCooldownMs`, `logRetentionDays`, `quotaPollIntervalMs`, `rtkEnabled`,
|
|
518
|
+
`ponytailMode` (`off` | `lite` | `full` | `ultra`),
|
|
499
519
|
and the two body-capture switches. Edit them with `omni settings set` or in the
|
|
500
520
|
console. `quotaPollIntervalMs` is the one exception: the poller reads it once at
|
|
501
521
|
boot, so a change to it takes a restart. Snapshot retention —
|
|
@@ -685,7 +705,8 @@ Worth knowing before you deploy it:
|
|
|
685
705
|
|
|
686
706
|
## Plugins
|
|
687
707
|
|
|
688
|
-
A plugin adds routes, storage, and a screen in the console to one
|
|
708
|
+
A plugin adds routes, storage, a provider, and a screen in the console to one
|
|
709
|
+
installation,
|
|
689
710
|
without being part of OmniGateway. Most installations run none.
|
|
690
711
|
|
|
691
712
|
```bash
|
|
@@ -723,13 +744,26 @@ and whether the gateway would load it:
|
|
|
723
744
|
|
|
724
745
|
```
|
|
725
746
|
ID NAME VERSION API SDK CAPABILITIES STATE
|
|
726
|
-
pokemon Pokémon Companion 1.0.0
|
|
747
|
+
pokemon Pokémon Companion 1.0.0 2 ^1.0.0 storage,files,net:outbound,… ok
|
|
727
748
|
```
|
|
728
749
|
|
|
750
|
+
The API column is the plugin API generation, and it is matched **exactly** — a
|
|
751
|
+
plugin built against an older one is listed with that as its reason rather than
|
|
752
|
+
loaded.
|
|
753
|
+
|
|
729
754
|
The capabilities a manifest may declare are `storage`, `files`, `net:outbound`,
|
|
730
|
-
`events:request`, `events:limit` and `channels`
|
|
731
|
-
topics on the gateway's push socket, which a plugin owns without ever
|
|
732
|
-
connection.
|
|
755
|
+
`events:request`, `events:limit`, `channels` and `provider`. `channels` is
|
|
756
|
+
namespaced topics on the gateway's push socket, which a plugin owns without ever
|
|
757
|
+
touching a connection. `provider` lets a plugin supply a provider of its own —
|
|
758
|
+
the models, the wire format, and optionally the OAuth flow, so
|
|
759
|
+
`omni connect <plugin-id>` works for it exactly as it does for a built-in.
|
|
760
|
+
Anything a plugin did not declare is absent from what it is handed.
|
|
761
|
+
|
|
762
|
+
`net:outbound` and `provider` each require the manifest to declare `origins`,
|
|
763
|
+
and both are enforced: a plugin's own `fetch` and the requests the gateway makes
|
|
764
|
+
on a provider plugin's behalf are both refused outside them. That is what makes
|
|
765
|
+
`omni plugin verify <id>` worth reading before you install one — where your
|
|
766
|
+
prompts can be sent is in the manifest, not only in the code.
|
|
733
767
|
|
|
734
768
|
A plugin that would *not* load is listed with the reason rather than hidden,
|
|
735
769
|
because a plugin missing from the console is exactly what you are trying to
|