@neta-art/cohub 1.7.1 → 1.8.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.
- package/dist/apis/generations.d.ts +8 -0
- package/dist/apis/generations.js +16 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +3 -0
- package/dist/http.d.ts +2 -0
- package/dist/http.js +3 -0
- package/dist/types.d.ts +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CreateGenerationRequest, Generation, ListGenerationDeclarationsResponse } from "@neta-art/cohub-protocol";
|
|
2
|
+
import type { HttpTransport } from "../transport.js";
|
|
3
|
+
export declare class GenerationsApi {
|
|
4
|
+
private readonly transport;
|
|
5
|
+
constructor(transport: HttpTransport);
|
|
6
|
+
create(request: CreateGenerationRequest): Promise<Generation>;
|
|
7
|
+
listDeclarations(): Promise<ListGenerationDeclarationsResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class GenerationsApi {
|
|
2
|
+
transport;
|
|
3
|
+
constructor(transport) {
|
|
4
|
+
this.transport = transport;
|
|
5
|
+
}
|
|
6
|
+
async create(request) {
|
|
7
|
+
return this.transport.request("/api/generations", {
|
|
8
|
+
method: "POST",
|
|
9
|
+
headers: { "Content-Type": "application/json" },
|
|
10
|
+
body: JSON.stringify(request),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
async listDeclarations() {
|
|
14
|
+
return this.transport.request("/api/generations/declarations");
|
|
15
|
+
}
|
|
16
|
+
}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChannelsApi } from "./apis/channels.js";
|
|
2
2
|
import { CronJobsApi } from "./apis/cron-jobs.js";
|
|
3
3
|
import { ExploreApi } from "./apis/explore.js";
|
|
4
|
+
import { GenerationsApi } from "./apis/generations.js";
|
|
4
5
|
import { ModelsApi } from "./apis/models.js";
|
|
5
6
|
import { PromptsApi } from "./apis/prompts.js";
|
|
6
7
|
import { SessionAccessApi } from "./apis/session-access.js";
|
|
@@ -14,6 +15,7 @@ export declare class CohubClient {
|
|
|
14
15
|
readonly spaces: SpacesApi;
|
|
15
16
|
readonly channels: ChannelsApi;
|
|
16
17
|
readonly user: UserApi;
|
|
18
|
+
readonly generations: GenerationsApi;
|
|
17
19
|
readonly models: ModelsApi;
|
|
18
20
|
readonly prompts: PromptsApi;
|
|
19
21
|
readonly sessionAccess: SessionAccessApi;
|
package/dist/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ChannelsApi } from "./apis/channels.js";
|
|
2
2
|
import { CronJobsApi } from "./apis/cron-jobs.js";
|
|
3
3
|
import { ExploreApi } from "./apis/explore.js";
|
|
4
|
+
import { GenerationsApi } from "./apis/generations.js";
|
|
4
5
|
import { ModelsApi } from "./apis/models.js";
|
|
5
6
|
import { PromptsApi } from "./apis/prompts.js";
|
|
6
7
|
import { SessionAccessApi } from "./apis/session-access.js";
|
|
@@ -16,6 +17,7 @@ export class CohubClient {
|
|
|
16
17
|
spaces;
|
|
17
18
|
channels;
|
|
18
19
|
user;
|
|
20
|
+
generations;
|
|
19
21
|
models;
|
|
20
22
|
prompts;
|
|
21
23
|
sessionAccess;
|
|
@@ -40,6 +42,7 @@ export class CohubClient {
|
|
|
40
42
|
this.spaces = new SpacesApi(this.transport);
|
|
41
43
|
this.channels = new ChannelsApi(this.transport);
|
|
42
44
|
this.user = new UserApi(this.transport, apiBaseUrl, options.setStoredAuthToken, options.clearStoredAuthToken);
|
|
45
|
+
this.generations = new GenerationsApi(this.transport);
|
|
43
46
|
this.models = new ModelsApi(this.transport);
|
|
44
47
|
this.prompts = new PromptsApi(this.transport);
|
|
45
48
|
this.sessionAccess = new SessionAccessApi(this.transport);
|
package/dist/http.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChannelsApi } from "./apis/channels.js";
|
|
2
2
|
import { CronJobsApi } from "./apis/cron-jobs.js";
|
|
3
|
+
import { GenerationsApi } from "./apis/generations.js";
|
|
3
4
|
import { ModelsApi } from "./apis/models.js";
|
|
4
5
|
import { PromptsApi } from "./apis/prompts.js";
|
|
5
6
|
import { SessionAccessApi } from "./apis/session-access.js";
|
|
@@ -12,6 +13,7 @@ export declare class CohubHttpClient {
|
|
|
12
13
|
readonly spaces: SpacesApi;
|
|
13
14
|
readonly channels: ChannelsApi;
|
|
14
15
|
readonly user: UserApi;
|
|
16
|
+
readonly generations: GenerationsApi;
|
|
15
17
|
readonly models: ModelsApi;
|
|
16
18
|
readonly prompts: PromptsApi;
|
|
17
19
|
readonly sessionAccess: SessionAccessApi;
|
package/dist/http.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ChannelsApi } from "./apis/channels.js";
|
|
2
2
|
import { CronJobsApi } from "./apis/cron-jobs.js";
|
|
3
|
+
import { GenerationsApi } from "./apis/generations.js";
|
|
3
4
|
import { ModelsApi } from "./apis/models.js";
|
|
4
5
|
import { PromptsApi } from "./apis/prompts.js";
|
|
5
6
|
import { SessionAccessApi } from "./apis/session-access.js";
|
|
@@ -13,6 +14,7 @@ export class CohubHttpClient {
|
|
|
13
14
|
spaces;
|
|
14
15
|
channels;
|
|
15
16
|
user;
|
|
17
|
+
generations;
|
|
16
18
|
models;
|
|
17
19
|
prompts;
|
|
18
20
|
sessionAccess;
|
|
@@ -26,6 +28,7 @@ export class CohubHttpClient {
|
|
|
26
28
|
this.spaces = new SpacesApi(this.transport);
|
|
27
29
|
this.channels = new ChannelsApi(this.transport);
|
|
28
30
|
this.user = new UserApi(this.transport, apiBaseUrl, options.setStoredAuthToken, options.clearStoredAuthToken);
|
|
31
|
+
this.generations = new GenerationsApi(this.transport);
|
|
29
32
|
this.models = new ModelsApi(this.transport);
|
|
30
33
|
this.prompts = new PromptsApi(this.transport);
|
|
31
34
|
this.sessionAccess = new SessionAccessApi(this.transport);
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { SessionBindingRecord as ProtocolSessionBindingRecord, SessionRecord as ProtocolSessionRecord, SessionForkRecord, SessionTurnIndexItem, SessionTurnRecord, SessionTurnSegmentRecord } from "@neta-art/cohub-protocol/model";
|
|
2
2
|
import type { ChannelConfig } from "@neta-art/cohub-protocol/gateway";
|
|
3
3
|
import type { ContentBlock, Usage } from "@neta-art/cohub-protocol/core";
|
|
4
|
+
import type { Generation, ListGenerationDeclarationsResponse, PublicGenerationDeclaration, CreateGenerationRequest } from "@neta-art/cohub-protocol";
|
|
4
5
|
import type { MessageRecord } from "@neta-art/cohub-protocol/model";
|
|
5
6
|
export type { ChannelConfig, DiscordChannelConfig, } from "@neta-art/cohub-protocol/gateway";
|
|
6
7
|
export type ApiError = {
|
|
@@ -24,7 +25,7 @@ export type UserRulesResponse = {
|
|
|
24
25
|
source: "config-space";
|
|
25
26
|
path: string;
|
|
26
27
|
};
|
|
27
|
-
export type { ContentBlock, MessageRecord, SessionTurnRecord, SessionTurnIndexItem, SessionForkRecord, SessionTurnSegmentRecord };
|
|
28
|
+
export type { ContentBlock, MessageRecord, SessionTurnRecord, SessionTurnIndexItem, SessionForkRecord, SessionTurnSegmentRecord, Generation, ListGenerationDeclarationsResponse, PublicGenerationDeclaration, CreateGenerationRequest, };
|
|
28
29
|
export type SpaceFsEntry = {
|
|
29
30
|
name: string;
|
|
30
31
|
path: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neta-art/cohub",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Cohub SDK for spaces, sessions, checkpoints, and realtime agent collaboration.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"README.md"
|
|
45
45
|
],
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@neta-art/cohub-protocol": "1.
|
|
47
|
+
"@neta-art/cohub-protocol": "1.6.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "^6.0.3"
|