pi-usage-hub 1.0.4 → 1.0.5

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 CHANGED
@@ -97,7 +97,17 @@ These are companion packages, not npm peer dependencies:
97
97
 
98
98
  pi-usage-hub only reads those credentials; it does not run their OAuth flows.
99
99
 
100
- Built-in providers are the ones already used and smoke-tested by the author. The provider ecosystem is too broad to cover exhaustively. Add another provider through L2 registration, or fork the package and submit a PR.
100
+ Built-in providers cover the integrations used and smoke-tested by the author. To support another provider, register a custom provider from an extension, or fork the package and submit a PR.
101
+
102
+ ### Add a custom provider
103
+
104
+ See [`examples/custom-provider.ts`](./examples/custom-provider.ts) for a self-contained extension that implements and registers a provider. Copy it into `~/.pi/agent/extensions/`, then adapt the endpoint, credentials, response shape, and labels.
105
+
106
+ ```ts
107
+ pi.events.on("pi-usage-hub:ready", (hub) => hub.register(myProvider));
108
+ pi.events.emit("pi-usage-hub:register", myProvider);
109
+ pi.events.emit("pi-usage-hub:unregister", { key: "my-relay" });
110
+ ```
101
111
 
102
112
  ## Pull API
103
113
 
@@ -157,16 +167,6 @@ pi.on("session_shutdown", async () => {
157
167
  });
158
168
  ```
159
169
 
160
- ### L2 provider registration
161
-
162
- See [`examples/custom-provider.ts`](./examples/custom-provider.ts) for a self-contained extension that implements and registers a provider. Copy it into `~/.pi/agent/extensions/`, then adapt the endpoint, credentials, response shape, and labels.
163
-
164
- ```ts
165
- pi.events.on("pi-usage-hub:ready", (hub) => hub.register(myProvider));
166
- pi.events.emit("pi-usage-hub:register", myProvider);
167
- pi.events.emit("pi-usage-hub:unregister", { key: "my-relay" });
168
- ```
169
-
170
170
  ## License
171
171
 
172
172
  MIT
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Example: register a custom usage provider through the L2 event API.
2
+ * Example: register a custom usage provider through the event API.
3
3
  *
4
4
  * Copy this file into ~/.pi/agent/extensions/ and adapt the endpoint,
5
5
  * credentials, response shape, and labels for your provider.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-usage-hub",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Usage hub for pi — provider quota/balance registry with cache, /usage-hub panel, and pull API",
5
5
  "keywords": [
6
6
  "pi",