@listeningkit/treg 0.1.0 → 0.1.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.
- package/README.md +32 -11
- package/banner.png +0 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./banner.png" alt="Treg - OpenRouter for Developer Tools Banner" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# @listeningkit/treg (Convex Treg Component)
|
|
2
6
|
|
|
3
7
|
> A production-ready [Convex Component](https://docs.convex.dev/components) adapting [treg](https://github.com/superdesigndev/treg) — the open-source **"OpenRouter for developer tools"**.
|
|
4
8
|
|
|
5
9
|
[](https://docs.convex.dev/components)
|
|
10
|
+
[](https://www.npmjs.com/package/@listeningkit/treg)
|
|
6
11
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
|
-
[](https://treg.to/?ref=matthewdonse-aebsh)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
> [!TIP]
|
|
17
|
+
> ### 🎁 Get $1.00 of Free Credits on Signup!
|
|
18
|
+
> When you create your account at **[treg.to/?ref=matthewdonse-aebsh](https://treg.to/?ref=matthewdonse-aebsh)**, you automatically receive **$1.00 in free tool execution balance**.
|
|
19
|
+
> Because catalog calls start at just ~$0.0002 per call (e.g. SpyFu, SERP, and SEO data), **$1.00 gives you up to 5,000 free API calls** with zero credit card required upfront!
|
|
20
|
+
> 👉 **[Claim your free $1 credit on treg.to here](https://treg.to/?ref=matthewdonse-aebsh)**
|
|
8
21
|
|
|
9
22
|
---
|
|
10
23
|
|
|
@@ -12,7 +25,7 @@
|
|
|
12
25
|
|
|
13
26
|
[`superdesigndev/treg`](https://github.com/superdesigndev/treg) is an open-source tool execution proxy and registry designed as the *OpenRouter for developer tools*. It enables developers and AI agents to route, run, and pay for 2,600+ external tools and APIs (including SpyFu, Firecrawl, SE Ranking, SerpApi, Perplexity, GitHub, Stripe, Resend, and more) through a single unified API, unified billing, and self-hosted proxy with BYOK, OAuth token refreshing, and per-call spend guardrails.
|
|
14
27
|
|
|
15
|
-
This package (`@listeningkit/treg`) provides the native, fully sandboxed **Convex Component** extension for
|
|
28
|
+
This package (`@listeningkit/treg`) provides the native, fully sandboxed **Convex Component** extension for [treg.to](https://treg.to/?ref=matthewdonse-aebsh). It allows any Convex backend to execute tools directly from Convex actions with zero client credentials on device, automatic spend ceilings, fresh idempotency keys, privacy-preserving attribution, and an isolated audit ledger.
|
|
16
29
|
|
|
17
30
|
---
|
|
18
31
|
|
|
@@ -22,6 +35,7 @@ This package is authored according to the [Convex Component Specification](https
|
|
|
22
35
|
|
|
23
36
|
```
|
|
24
37
|
treg/
|
|
38
|
+
├── banner.png # Visual component header banner
|
|
25
39
|
├── convex.config.ts # Component definition & typed environment variables
|
|
26
40
|
├── schema.ts # Encapsulated database schema (spend receipts ledger)
|
|
27
41
|
├── treg.ts # Component actions, mutations, and queries
|
|
@@ -37,7 +51,7 @@ Components in Convex run inside an isolated boundary. The component defines its
|
|
|
37
51
|
|
|
38
52
|
### 2. Typed Environment Injection
|
|
39
53
|
The component declares its required environment variables in [`convex.config.ts`](./convex.config.ts):
|
|
40
|
-
- `TREG_TOKEN` — Your team bearer token from [treg.to](https://treg.to)
|
|
54
|
+
- `TREG_TOKEN` — Your team bearer token from **[treg.to/?ref=matthewdonse-aebsh](https://treg.to/?ref=matthewdonse-aebsh)** (sign up to get your free $1 credit!).
|
|
41
55
|
- `TREG_BASE_URL` — Optional base URL (defaults to `https://treg.to`).
|
|
42
56
|
|
|
43
57
|
Because these are bound in the component configuration, host action callers never need to pass API secrets as function arguments.
|
|
@@ -89,7 +103,7 @@ export default app;
|
|
|
89
103
|
|
|
90
104
|
### 3. Configure Deployment Environment Variables
|
|
91
105
|
|
|
92
|
-
|
|
106
|
+
Get your team token with free $1 credits from **[treg.to/?ref=matthewdonse-aebsh](https://treg.to/?ref=matthewdonse-aebsh)**, then set it on your Convex deployment:
|
|
93
107
|
|
|
94
108
|
```bash
|
|
95
109
|
npx convex env set TREG_TOKEN="your-treg-team-token"
|
|
@@ -193,9 +207,11 @@ export const getMyToolUsage = query({
|
|
|
193
207
|
|
|
194
208
|
---
|
|
195
209
|
|
|
196
|
-
## Catalog & Failover Strategy
|
|
210
|
+
## Catalog, Costs & Failover Strategy
|
|
197
211
|
|
|
198
|
-
|
|
212
|
+
Sign up at **[treg.to/?ref=matthewdonse-aebsh](https://treg.to/?ref=matthewdonse-aebsh)** to get **$1.00 free credit**, which covers thousands of calls across 2,600+ tools.
|
|
213
|
+
|
|
214
|
+
Search the full catalog at **[treg.to/catalog](https://treg.to/?ref=matthewdonse-aebsh)** or via the unauthenticated search API:
|
|
199
215
|
|
|
200
216
|
```bash
|
|
201
217
|
curl "https://treg.to/catalog/search?q=competitors"
|
|
@@ -205,11 +221,11 @@ curl "https://treg.to/catalog/search?q=competitors"
|
|
|
205
221
|
|
|
206
222
|
When building resilient AI workflows, implement failover between provider rows:
|
|
207
223
|
|
|
208
|
-
| Provider | Endpoint ID | Approx. Cost | Role |
|
|
209
|
-
|
|
210
|
-
| **SpyFu** | `spyfu.google.domain.competitors` | ~$0.0002 / row | Primary (fast, keyword-overlap ranking) |
|
|
211
|
-
| **SE Ranking** | `seranking.google.domain.competitors` | ~$0.0179 / call | Failover (rich metrics: domain relevance, traffic) |
|
|
212
|
-
| **SerpApi** | `serpstat.google.domain.competitors` | ~$0.0005 / result | Alternate |
|
|
224
|
+
| Provider | Endpoint ID | Approx. Cost | Free Calls from $1 Credit | Role |
|
|
225
|
+
|---|---|---|---|---|
|
|
226
|
+
| **SpyFu** | `spyfu.google.domain.competitors` | ~$0.0002 / row | **~5,000 calls** | Primary (fast, keyword-overlap ranking) |
|
|
227
|
+
| **SE Ranking** | `seranking.google.domain.competitors` | ~$0.0179 / call | **~55 calls** | Failover (rich metrics: domain relevance, traffic) |
|
|
228
|
+
| **SerpApi** | `serpstat.google.domain.competitors` | ~$0.0005 / result | **~2,000 calls** | Alternate |
|
|
213
229
|
|
|
214
230
|
> **Failover Policy**: On HTTP `429` (rate limit), `503` (provider temporarily down), or timeout, retry with the next catalog provider row. Never failover on `4xx` client errors (invalid domain/parameters will fail across all providers and waste credit).
|
|
215
231
|
|
|
@@ -244,6 +260,11 @@ pnpm run typecheck
|
|
|
244
260
|
|
|
245
261
|
---
|
|
246
262
|
|
|
263
|
+
## Free Signup Link
|
|
264
|
+
|
|
265
|
+
Don't forget to grab your **$1.00 free tool credit** when getting started:
|
|
266
|
+
👉 **[Sign up on treg.to (?ref=matthewdonse-aebsh)](https://treg.to/?ref=matthewdonse-aebsh)**
|
|
267
|
+
|
|
247
268
|
## License
|
|
248
269
|
|
|
249
270
|
Apache 2.0. See [superdesigndev/treg](https://github.com/superdesigndev/treg) for upstream engine details.
|
package/banner.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@listeningkit/treg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Production Convex component for treg.to — the OpenRouter for developer tools. Run, route, and pay for 2,600+ tools through one API and CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/client.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"treg.ts",
|
|
13
13
|
"client.ts",
|
|
14
14
|
"lib",
|
|
15
|
+
"banner.png",
|
|
15
16
|
"README.md"
|
|
16
17
|
],
|
|
17
18
|
"exports": {
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
"api-proxy",
|
|
58
59
|
"developer-tools"
|
|
59
60
|
],
|
|
60
|
-
"homepage": "https://
|
|
61
|
+
"homepage": "https://treg.to/?ref=matthewdonse-aebsh",
|
|
61
62
|
"repository": {
|
|
62
63
|
"type": "git",
|
|
63
64
|
"url": "git+https://github.com/superdesigndev/treg.git"
|