@velum-labs/routekit-daemon 0.16.2 → 0.16.3
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/dist/index.js +16 -0
- package/dist/test/daemon.test.js +3 -0
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -1237,6 +1237,22 @@ export async function startRouteKitDaemon(options) {
|
|
|
1237
1237
|
"accounts.usage": async (_params, context) => {
|
|
1238
1238
|
return await activeRouter.usage(context.signal);
|
|
1239
1239
|
},
|
|
1240
|
+
"accounts.resetCredits": async (params, context) => {
|
|
1241
|
+
try {
|
|
1242
|
+
return {
|
|
1243
|
+
kind: params.kind,
|
|
1244
|
+
label: params.label,
|
|
1245
|
+
resetCredits: await activeRouter.listResetCredits(params.kind, params.label, context.signal)
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
catch (error) {
|
|
1249
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1250
|
+
if (message.includes("is not enrolled") || message.includes("no codex account pool")) {
|
|
1251
|
+
throw new ControlError({ code: "not_found", message });
|
|
1252
|
+
}
|
|
1253
|
+
throw error;
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1240
1256
|
"accounts.redeemReset": async (params, context) => {
|
|
1241
1257
|
try {
|
|
1242
1258
|
const result = await activeRouter.redeemReset({
|
package/dist/test/daemon.test.js
CHANGED
|
@@ -180,6 +180,9 @@ test("singleton daemon exposes authenticated control and a stable reloadable dat
|
|
|
180
180
|
await assert.rejects(client.call("models.info", { model: "openai/not-real" }), (error) => error instanceof ControlError &&
|
|
181
181
|
error.code === "not_found" &&
|
|
182
182
|
/unknown model/.test(error.message));
|
|
183
|
+
await assert.rejects(client.call("accounts.resetCredits", { kind: "codex", label: "work" }), (error) => error instanceof ControlError &&
|
|
184
|
+
error.code === "not_found" &&
|
|
185
|
+
/no codex account pool/.test(error.message));
|
|
183
186
|
const beforeUrl = status.dataUrl;
|
|
184
187
|
const snapshot = await client.call("config.get", {});
|
|
185
188
|
await assert.rejects(client.call("config.update", {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velum-labs/routekit-daemon",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.3",
|
|
5
5
|
"description": "Singleton RouteKit control daemon and stable model gateway.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"yaml": "2.9.0",
|
|
37
|
-
"@velum-labs/routekit-accounts": "0.16.
|
|
38
|
-
"@velum-labs/routekit-config": "0.16.
|
|
39
|
-
"@velum-labs/routekit-control": "0.16.
|
|
40
|
-
"@velum-labs/routekit-gateway": "0.16.
|
|
41
|
-
"@velum-labs/routekit-registry": "0.16.
|
|
42
|
-
"@velum-labs/routekit-router": "0.16.
|
|
43
|
-
"@velum-labs/routekit-
|
|
44
|
-
"@velum-labs/routekit-
|
|
37
|
+
"@velum-labs/routekit-accounts": "0.16.3",
|
|
38
|
+
"@velum-labs/routekit-config": "0.16.3",
|
|
39
|
+
"@velum-labs/routekit-control": "0.16.3",
|
|
40
|
+
"@velum-labs/routekit-gateway": "0.16.3",
|
|
41
|
+
"@velum-labs/routekit-registry": "0.16.3",
|
|
42
|
+
"@velum-labs/routekit-router": "0.16.3",
|
|
43
|
+
"@velum-labs/routekit-telemetry-core": "0.16.3",
|
|
44
|
+
"@velum-labs/routekit-runtime": "0.16.3"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsc -b",
|