@rivus/agent 0.8.3 → 0.8.4

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/mcp.d.ts CHANGED
@@ -69,6 +69,7 @@ interface BackgroundSessionControlHttpServerOptions {
69
69
  readonly control: BackgroundSessionControl;
70
70
  readonly host?: string;
71
71
  readonly port: number;
72
+ readonly status?: () => unknown;
72
73
  readonly token: string;
73
74
  }
74
75
  interface BackgroundSessionControlHttpServer {
package/dist/mcp.js CHANGED
@@ -338,6 +338,14 @@ function createBackgroundSessionControlHttpServer(options) {
338
338
  const serverHandle = createServer((request, response) => {
339
339
  (async () => {
340
340
  try {
341
+ if (request.method === "GET" && request.url === "/background-sessions/status") {
342
+ if (request.headers.authorization !== `Bearer ${options.token}`) throw new BackgroundSessionControlHttpError(401, "unauthorized");
343
+ respond(response, 200, {
344
+ ok: true,
345
+ result: options.status?.() ?? null
346
+ });
347
+ return;
348
+ }
341
349
  if (request.method !== "POST" || request.url !== "/background-sessions") throw new BackgroundSessionControlHttpError(404, "not found");
342
350
  if (request.headers.authorization !== `Bearer ${options.token}`) throw new BackgroundSessionControlHttpError(401, "unauthorized");
343
351
  const envelope = parseEnvelope(await readBody(request, 64 * 1024));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivus/agent",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "A local agent daemon core built around a usable agent harness and domain events.",
5
5
  "type": "module",
6
6
  "license": "MIT",