@neta-art/cohub 1.7.1 → 1.9.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 +7 -0
- package/dist/apis/generations.js +13 -0
- package/dist/apis/models.d.ts +5 -2
- package/dist/apis/models.js +4 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +3 -0
- package/dist/http.d.ts +4 -0
- package/dist/http.js +6 -0
- package/dist/types.d.ts +2 -1
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CreateGenerationRequest, Generation } 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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
package/dist/apis/models.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { HttpTransport } from "../transport.js";
|
|
2
|
-
import type { ModelCatalogEntry } from "../types.js";
|
|
2
|
+
import type { ModelCatalogEntry, ListGenerationModelsResponse } from "../types.js";
|
|
3
|
+
export declare const MULTIMODAL_MODEL_TYPE = "multimodal";
|
|
4
|
+
export type ModelsCatalog = Record<string, ModelCatalogEntry[]>;
|
|
3
5
|
export declare class ModelsApi {
|
|
4
6
|
private readonly transport;
|
|
5
7
|
constructor(transport: HttpTransport);
|
|
6
|
-
list(): Promise<
|
|
8
|
+
list(): Promise<ModelsCatalog>;
|
|
9
|
+
listMultimodal(): Promise<ListGenerationModelsResponse>;
|
|
7
10
|
}
|
package/dist/apis/models.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export const MULTIMODAL_MODEL_TYPE = "multimodal";
|
|
1
2
|
export class ModelsApi {
|
|
2
3
|
transport;
|
|
3
4
|
constructor(transport) {
|
|
@@ -6,4 +7,7 @@ export class ModelsApi {
|
|
|
6
7
|
async list() {
|
|
7
8
|
return this.transport.request("/api/models");
|
|
8
9
|
}
|
|
10
|
+
async listMultimodal() {
|
|
11
|
+
return this.transport.request(`/api/models?modelType=${MULTIMODAL_MODEL_TYPE}`);
|
|
12
|
+
}
|
|
9
13
|
}
|
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,7 +1,9 @@
|
|
|
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";
|
|
6
|
+
import { SearchApi } from "./apis/search.js";
|
|
5
7
|
import { SessionAccessApi } from "./apis/session-access.js";
|
|
6
8
|
import { SpaceClient, SpacesApi } from "./apis/spaces.js";
|
|
7
9
|
import { TasksApi } from "./apis/tasks.js";
|
|
@@ -12,9 +14,11 @@ export declare class CohubHttpClient {
|
|
|
12
14
|
readonly spaces: SpacesApi;
|
|
13
15
|
readonly channels: ChannelsApi;
|
|
14
16
|
readonly user: UserApi;
|
|
17
|
+
readonly generations: GenerationsApi;
|
|
15
18
|
readonly models: ModelsApi;
|
|
16
19
|
readonly prompts: PromptsApi;
|
|
17
20
|
readonly sessionAccess: SessionAccessApi;
|
|
21
|
+
readonly search: SearchApi;
|
|
18
22
|
readonly tasks: TasksApi;
|
|
19
23
|
readonly cronJobs: CronJobsApi;
|
|
20
24
|
readonly invite: PublicInviteApi;
|
package/dist/http.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
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";
|
|
6
|
+
import { SearchApi } from "./apis/search.js";
|
|
5
7
|
import { SessionAccessApi } from "./apis/session-access.js";
|
|
6
8
|
import { SpaceClient, SpacesApi } from "./apis/spaces.js";
|
|
7
9
|
import { TasksApi } from "./apis/tasks.js";
|
|
@@ -13,9 +15,11 @@ export class CohubHttpClient {
|
|
|
13
15
|
spaces;
|
|
14
16
|
channels;
|
|
15
17
|
user;
|
|
18
|
+
generations;
|
|
16
19
|
models;
|
|
17
20
|
prompts;
|
|
18
21
|
sessionAccess;
|
|
22
|
+
search;
|
|
19
23
|
tasks;
|
|
20
24
|
cronJobs;
|
|
21
25
|
invite;
|
|
@@ -26,9 +30,11 @@ export class CohubHttpClient {
|
|
|
26
30
|
this.spaces = new SpacesApi(this.transport);
|
|
27
31
|
this.channels = new ChannelsApi(this.transport);
|
|
28
32
|
this.user = new UserApi(this.transport, apiBaseUrl, options.setStoredAuthToken, options.clearStoredAuthToken);
|
|
33
|
+
this.generations = new GenerationsApi(this.transport);
|
|
29
34
|
this.models = new ModelsApi(this.transport);
|
|
30
35
|
this.prompts = new PromptsApi(this.transport);
|
|
31
36
|
this.sessionAccess = new SessionAccessApi(this.transport);
|
|
37
|
+
this.search = new SearchApi(this.transport);
|
|
32
38
|
this.tasks = new TasksApi(this.transport);
|
|
33
39
|
this.cronJobs = new CronJobsApi(this.transport);
|
|
34
40
|
this.invite = new PublicInviteApi(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, ListGenerationModelsResponse, 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, ListGenerationModelsResponse, 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.9.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": "
|
|
47
|
+
"@neta-art/cohub-protocol": "2.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "^6.0.3"
|