@hasna/browser 0.1.1 → 0.2.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.
@@ -9142,6 +9142,7 @@ async function diffImages(path1, path2) {
9142
9142
 
9143
9143
  // src/server/index.ts
9144
9144
  var PORT = parseInt(process.env["BROWSER_SERVER_PORT"] ?? "7030");
9145
+ var startTime = Date.now();
9145
9146
  var CORS_HEADERS = {
9146
9147
  "Access-Control-Allow-Origin": "*",
9147
9148
  "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
@@ -9185,6 +9186,14 @@ var server = Bun.serve({
9185
9186
  return new Response(null, { status: 204, headers: CORS_HEADERS });
9186
9187
  }
9187
9188
  try {
9189
+ if (path === "/health" && method === "GET") {
9190
+ const activeSessions = listSessions2({ status: "active" });
9191
+ return ok({
9192
+ status: "ok",
9193
+ active_sessions: activeSessions.length,
9194
+ uptime_ms: Date.now() - startTime
9195
+ });
9196
+ }
9188
9197
  if (path === "/api/sessions" && method === "GET") {
9189
9198
  const status = url.searchParams.get("status");
9190
9199
  const projectId = url.searchParams.get("project_id") ?? undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/browser",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "General-purpose browser agent toolkit — Playwright, Chrome DevTools Protocol, Lightpanda with auto engine selection. CLI + MCP + REST + SDK.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -38,6 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@anthropic-ai/sdk": "^0.52.0",
41
+ "@hasna/connectors": "^1.3.3",
41
42
  "@hasna/conversations": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/open-conversations",
42
43
  "@hasna/mementos": "/Users/hasna/Workspace/hasna/opensource/opensourcedev/open-mementos",
43
44
  "@hasna/sessions": "^0.11.6",