@neta-art/cohub 1.13.1 → 1.14.0

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.
@@ -77,6 +77,7 @@ type SessionTurnIntermediateSummary = {
77
77
  messageCount: number;
78
78
  toolCallCount: number;
79
79
  usage?: Usage | null;
80
+ durationMs?: number | null;
80
81
  lastMessageText?: string | null;
81
82
  hasError?: boolean;
82
83
  };
@@ -89,6 +90,7 @@ type SessionTurnIndexItem = {
89
90
  status: SessionTurnStatus;
90
91
  startedAt: string | null;
91
92
  completedAt: string | null;
93
+ durationMs: number | null;
92
94
  createdAt: string;
93
95
  updatedAt: string;
94
96
  userPreview: string | null;
@@ -130,6 +132,7 @@ type SessionTurnRecord = {
130
132
  authorProfile?: SessionTurnAuthorProfile | null;
131
133
  startedAt: string | null;
132
134
  completedAt: string | null;
135
+ durationMs: number | null;
133
136
  createdAt: string;
134
137
  updatedAt: string;
135
138
  };
@@ -207,6 +210,9 @@ type MessageRecord = {
207
210
  meta: Record<string, unknown> | null;
208
211
  authorUuid?: string | null;
209
212
  authorProfile?: MessageAuthorProfile | null;
213
+ startedAt: string | null;
214
+ completedAt: string | null;
215
+ durationMs: number | null;
210
216
  createdAt: string;
211
217
  };
212
218
  //#endregion
@@ -1172,6 +1178,7 @@ type GenerationStreamIntermediateMessage = {
1172
1178
  stopReason?: string | null;
1173
1179
  errorMessage?: string | null;
1174
1180
  usage?: Usage | null;
1181
+ durationMs?: number | null;
1175
1182
  toolCallsObjectKey?: string | null;
1176
1183
  meta?: Record<string, unknown> | null;
1177
1184
  createdAt?: string;
@@ -1596,6 +1603,9 @@ declare class SpaceSandboxApi {
1596
1603
  message?: string;
1597
1604
  }>;
1598
1605
  }
1606
+ type SpaceRunCommandResponse = {
1607
+ taskRunId: string;
1608
+ };
1599
1609
  declare class SpaceMarksApi {
1600
1610
  private readonly transport;
1601
1611
  private readonly spaceId;
@@ -1656,6 +1666,9 @@ declare class SpaceClient {
1656
1666
  }): Promise<{
1657
1667
  space: SpaceRecord;
1658
1668
  }>;
1669
+ runCommand(input: {
1670
+ command: string;
1671
+ }): Promise<SpaceRunCommandResponse>;
1659
1672
  getConfig(): Promise<SpaceConfigResponse>;
1660
1673
  updateConfig(input: SpaceConfigInput): Promise<{
1661
1674
  space: SpaceRecord;
@@ -709,6 +709,7 @@ function parseSnapshotMessage(value) {
709
709
  ...typeof value.stopReason === "string" ? { stopReason: value.stopReason } : {},
710
710
  ...typeof value.errorMessage === "string" ? { errorMessage: value.errorMessage } : {},
711
711
  ...isRecord(value.usage) ? { usage: value.usage } : {},
712
+ ...typeof value.durationMs === "number" ? { durationMs: value.durationMs } : {},
712
713
  ...typeof value.toolCallsObjectKey === "string" ? { toolCallsObjectKey: value.toolCallsObjectKey } : {},
713
714
  ...isRecord(value.meta) ? { meta: value.meta } : {},
714
715
  ...typeof value.createdAt === "string" ? { createdAt: value.createdAt } : {}
@@ -730,6 +731,7 @@ function messageRecordToIntermediate(message) {
730
731
  stopReason: message.stopReason,
731
732
  errorMessage: message.errorMessage,
732
733
  usage: message.usage,
734
+ durationMs: message.durationMs,
733
735
  meta: message.meta,
734
736
  createdAt: message.createdAt
735
737
  };
@@ -1837,6 +1839,13 @@ var SpaceClient = class {
1837
1839
  body: JSON.stringify(body)
1838
1840
  });
1839
1841
  }
1842
+ runCommand(input) {
1843
+ return this.transport.request(`/api/spaces/${this.id}/commands`, {
1844
+ method: "POST",
1845
+ headers: { "Content-Type": "application/json" },
1846
+ body: JSON.stringify(input)
1847
+ });
1848
+ }
1840
1849
  getConfig() {
1841
1850
  return this.transport.request(`/api/spaces/${this.id}/config`);
1842
1851
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neta-art/cohub",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "description": "Cohub SDK for spaces, sessions, checkpoints, and realtime agent collaboration.",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,