@neta-art/cohub 8.10.0 → 8.10.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.
@@ -422,6 +422,14 @@ type SessionUserProfile = {
422
422
  displayName: string;
423
423
  avatarUrl: string | null;
424
424
  };
425
+ type SessionActiveTurn = {
426
+ id: string;
427
+ status: "queued" | "running" | "abort_requested";
428
+ provider: string | null;
429
+ model: string | null;
430
+ startedAt: string | null;
431
+ anchorUserMessageId: string | null;
432
+ };
425
433
  type SessionRecord$1 = {
426
434
  id: string;
427
435
  spaceId: string;
@@ -432,6 +440,7 @@ type SessionRecord$1 = {
432
440
  title: string | null;
433
441
  source: string | null;
434
442
  status: string | null;
443
+ activeTurn?: SessionActiveTurn | null;
435
444
  externalSessionId: string | null;
436
445
  meta: Record<string, unknown> | null;
437
446
  latestMessageText: string | null;
@@ -5289,7 +5298,7 @@ type SystemSubscribeErrorEvent = {
5289
5298
  }>;
5290
5299
  };
5291
5300
  };
5292
- type RealtimeSessionRecord = Pick<SessionRecord$1, "id" | "spaceId" | "userUuid" | "title" | "source" | "status" | "externalSessionId" | "latestMessageText" | "lastMessageAt" | "lastMessageId" | "createdAt" | "updatedAt">;
5301
+ type RealtimeSessionRecord = Pick<SessionRecord$1, "id" | "spaceId" | "userUuid" | "title" | "source" | "status" | "activeTurn" | "externalSessionId" | "latestMessageText" | "lastMessageAt" | "lastMessageId" | "createdAt" | "updatedAt">;
5293
5302
  type SessionCreatedEvent = {
5294
5303
  id: string;
5295
5304
  timestamp: number;
@@ -88,8 +88,7 @@ const readScopes = (payload) => Array.isArray(payload?.scopes) ? payload.scopes.
88
88
  function getCohubContext() {
89
89
  const env = readProcessEnv();
90
90
  const token = resolveExecutionToken();
91
- const isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
92
- const runtime = token || readString(env, "COHUB_SPACE_ID") ? "sandbox" : isBrowser ? "browser" : "local";
91
+ const runtime = token ? "sandbox" : typeof window !== "undefined" && typeof document !== "undefined" ? "browser" : "local";
93
92
  const payload = decodeExecutionPayload();
94
93
  if (!token && runtime !== "sandbox") return {
95
94
  runtime: { kind: runtime },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub",
3
- "version": "8.10.0",
3
+ "version": "8.10.1",
4
4
  "description": "Cohub SDK for spaces, sessions, boards, and realtime agent collaboration.",
5
5
  "license": "Apache-2.0",
6
6
  "private": false,