@honcho-ai/core 1.7.0 → 2.0.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/CHANGELOG.md +58 -0
- package/LICENSE +1 -1
- package/README.md +12 -1
- package/index.d.mts +2 -5
- package/index.d.ts +2 -5
- package/index.d.ts.map +1 -1
- package/index.js +0 -3
- package/index.js.map +1 -1
- package/index.mjs +0 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.ts +1 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -1
- package/resources/index.mjs.map +1 -1
- package/resources/workspaces/conclusions.d.ts +33 -66
- package/resources/workspaces/conclusions.d.ts.map +1 -1
- package/resources/workspaces/conclusions.js +12 -5
- package/resources/workspaces/conclusions.js.map +1 -1
- package/resources/workspaces/conclusions.mjs +12 -5
- package/resources/workspaces/conclusions.mjs.map +1 -1
- package/resources/workspaces/index.d.ts +6 -6
- package/resources/workspaces/index.d.ts.map +1 -1
- package/resources/workspaces/index.js +3 -4
- package/resources/workspaces/index.js.map +1 -1
- package/resources/workspaces/index.mjs +1 -1
- package/resources/workspaces/index.mjs.map +1 -1
- package/resources/workspaces/peers/index.d.ts +1 -1
- package/resources/workspaces/peers/index.d.ts.map +1 -1
- package/resources/workspaces/peers/peers.d.ts +82 -153
- package/resources/workspaces/peers/peers.d.ts.map +1 -1
- package/resources/workspaces/peers/peers.js +24 -20
- package/resources/workspaces/peers/peers.js.map +1 -1
- package/resources/workspaces/peers/peers.mjs +24 -20
- package/resources/workspaces/peers/peers.mjs.map +1 -1
- package/resources/workspaces/peers/sessions.d.ts +1 -1
- package/resources/workspaces/queue.d.ts +82 -0
- package/resources/workspaces/queue.d.ts.map +1 -0
- package/resources/workspaces/queue.js +16 -0
- package/resources/workspaces/queue.js.map +1 -0
- package/resources/workspaces/queue.mjs +12 -0
- package/resources/workspaces/queue.mjs.map +1 -0
- package/resources/workspaces/sessions/index.d.ts +2 -2
- package/resources/workspaces/sessions/index.d.ts.map +1 -1
- package/resources/workspaces/sessions/index.js.map +1 -1
- package/resources/workspaces/sessions/index.mjs.map +1 -1
- package/resources/workspaces/sessions/messages.d.ts +13 -11
- package/resources/workspaces/sessions/messages.d.ts.map +1 -1
- package/resources/workspaces/sessions/messages.js +10 -8
- package/resources/workspaces/sessions/messages.js.map +1 -1
- package/resources/workspaces/sessions/messages.mjs +10 -8
- package/resources/workspaces/sessions/messages.mjs.map +1 -1
- package/resources/workspaces/sessions/peers.d.ts +15 -12
- package/resources/workspaces/sessions/peers.d.ts.map +1 -1
- package/resources/workspaces/sessions/peers.js +12 -7
- package/resources/workspaces/sessions/peers.js.map +1 -1
- package/resources/workspaces/sessions/peers.mjs +12 -7
- package/resources/workspaces/sessions/peers.mjs.map +1 -1
- package/resources/workspaces/sessions/sessions.d.ts +40 -118
- package/resources/workspaces/sessions/sessions.d.ts.map +1 -1
- package/resources/workspaces/sessions/sessions.js +19 -17
- package/resources/workspaces/sessions/sessions.js.map +1 -1
- package/resources/workspaces/sessions/sessions.mjs +19 -17
- package/resources/workspaces/sessions/sessions.mjs.map +1 -1
- package/resources/workspaces/webhooks.d.ts +2 -3
- package/resources/workspaces/webhooks.d.ts.map +1 -1
- package/resources/workspaces/webhooks.js +4 -1
- package/resources/workspaces/webhooks.js.map +1 -1
- package/resources/workspaces/webhooks.mjs +4 -1
- package/resources/workspaces/webhooks.mjs.map +1 -1
- package/resources/workspaces/workspaces.d.ts +59 -196
- package/resources/workspaces/workspaces.d.ts.map +1 -1
- package/resources/workspaces/workspaces.js +32 -34
- package/resources/workspaces/workspaces.js.map +1 -1
- package/resources/workspaces/workspaces.mjs +34 -36
- package/resources/workspaces/workspaces.mjs.map +1 -1
- package/src/index.ts +4 -21
- package/src/resources/index.ts +2 -7
- package/src/resources/workspaces/conclusions.ts +36 -78
- package/src/resources/workspaces/index.ts +9 -33
- package/src/resources/workspaces/peers/index.ts +4 -4
- package/src/resources/workspaces/peers/peers.ts +102 -181
- package/src/resources/workspaces/peers/sessions.ts +1 -1
- package/src/resources/workspaces/queue.ts +111 -0
- package/src/resources/workspaces/sessions/index.ts +2 -3
- package/src/resources/workspaces/sessions/messages.ts +25 -23
- package/src/resources/workspaces/sessions/peers.ts +16 -14
- package/src/resources/workspaces/sessions/sessions.ts +53 -143
- package/src/resources/workspaces/webhooks.ts +5 -5
- package/src/resources/workspaces/workspaces.ts +99 -325
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/keys.d.ts +0 -29
- package/resources/keys.d.ts.map +0 -1
- package/resources/keys.js +0 -20
- package/resources/keys.js.map +0 -1
- package/resources/keys.mjs +0 -16
- package/resources/keys.mjs.map +0 -1
- package/resources/workspaces/observations.d.ts +0 -166
- package/resources/workspaces/observations.d.ts.map +0 -1
- package/resources/workspaces/observations.js +0 -64
- package/resources/workspaces/observations.js.map +0 -1
- package/resources/workspaces/observations.mjs +0 -59
- package/resources/workspaces/observations.mjs.map +0 -1
- package/src/resources/keys.ts +0 -51
- package/src/resources/workspaces/observations.ts +0 -249
|
@@ -3,26 +3,26 @@ import { APIResource } from "../../resource.mjs";
|
|
|
3
3
|
import { isRequestOptions } from "../../core.mjs";
|
|
4
4
|
import * as ConclusionsAPI from "./conclusions.mjs";
|
|
5
5
|
import { Conclusions, ConclusionsPage, } from "./conclusions.mjs";
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
6
|
+
import * as QueueAPI from "./queue.mjs";
|
|
7
|
+
import { Queue } from "./queue.mjs";
|
|
8
8
|
import * as WebhooksAPI from "./webhooks.mjs";
|
|
9
9
|
import { WebhookEndpointsPage, Webhooks, } from "./webhooks.mjs";
|
|
10
10
|
import * as PeersAPI from "./peers/peers.mjs";
|
|
11
11
|
import { Peers, PeersPage, } from "./peers/peers.mjs";
|
|
12
12
|
import * as SessionsAPI from "./sessions/sessions.mjs";
|
|
13
|
-
import { Sessions
|
|
13
|
+
import { Sessions, SessionsPage, } from "./sessions/sessions.mjs";
|
|
14
14
|
import { Page } from "../../pagination.mjs";
|
|
15
15
|
export class Workspaces extends APIResource {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
|
-
this.conclusions = new ConclusionsAPI.Conclusions(this._client);
|
|
19
|
-
this.observations = new ObservationsAPI.Observations(this._client);
|
|
20
18
|
this.peers = new PeersAPI.Peers(this._client);
|
|
21
19
|
this.sessions = new SessionsAPI.Sessions(this._client);
|
|
22
20
|
this.webhooks = new WebhooksAPI.Webhooks(this._client);
|
|
21
|
+
this.queue = new QueueAPI.Queue(this._client);
|
|
22
|
+
this.conclusions = new ConclusionsAPI.Conclusions(this._client);
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* Update
|
|
25
|
+
* Update Workspace metadata and/or configuration.
|
|
26
26
|
*/
|
|
27
27
|
update(workspaceId, body, options) {
|
|
28
28
|
return this._client.put(`/v2/workspaces/${workspaceId}`, { body, ...options });
|
|
@@ -40,16 +40,16 @@ export class Workspaces extends APIResource {
|
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
* Delete a Workspace
|
|
43
|
+
* Delete a Workspace. This will permanently delete all sessions, peers, messages,
|
|
44
|
+
* and conclusions associated with the workspace.
|
|
45
|
+
*
|
|
46
|
+
* This action cannot be undone.
|
|
44
47
|
*/
|
|
45
48
|
delete(workspaceId, options) {
|
|
46
|
-
return this._client.delete(`/v2/workspaces/${workspaceId}`,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return this.deriverStatus(workspaceId, {}, query);
|
|
51
|
-
}
|
|
52
|
-
return this._client.get(`/v2/workspaces/${workspaceId}/deriver/status`, { query, ...options });
|
|
49
|
+
return this._client.delete(`/v2/workspaces/${workspaceId}`, {
|
|
50
|
+
...options,
|
|
51
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
52
|
+
});
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Get a Workspace by ID.
|
|
@@ -60,44 +60,42 @@ export class Workspaces extends APIResource {
|
|
|
60
60
|
getOrCreate(body, options) {
|
|
61
61
|
return this._client.post('/v2/workspaces', { body, ...options });
|
|
62
62
|
}
|
|
63
|
-
queueStatus(workspaceId, query = {}, options) {
|
|
64
|
-
if (isRequestOptions(query)) {
|
|
65
|
-
return this.queueStatus(workspaceId, {}, query);
|
|
66
|
-
}
|
|
67
|
-
return this._client.get(`/v2/workspaces/${workspaceId}/queue/status`, { query, ...options });
|
|
68
|
-
}
|
|
69
63
|
/**
|
|
70
|
-
*
|
|
71
|
-
*/
|
|
72
|
-
search(workspaceId, body, options) {
|
|
73
|
-
return this._client.post(`/v2/workspaces/${workspaceId}/search`, { body, ...options });
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Manually trigger a dream task immediately for a specific collection.
|
|
64
|
+
* Manually schedule a dream task for a specific collection.
|
|
77
65
|
*
|
|
78
66
|
* This endpoint bypasses all automatic dream conditions (document threshold,
|
|
79
|
-
* minimum hours between dreams) and
|
|
80
|
-
*
|
|
67
|
+
* minimum hours between dreams) and schedules the dream task for a future
|
|
68
|
+
* execution.
|
|
69
|
+
*
|
|
70
|
+
* Currently this endpoint only supports scheduling immediate dreams. In the
|
|
71
|
+
* future, users may pass a cron-style expression to schedule dreams at specific
|
|
72
|
+
* times.
|
|
81
73
|
*/
|
|
82
|
-
|
|
83
|
-
return this._client.post(`/v2/workspaces/${workspaceId}/
|
|
74
|
+
scheduleDream(workspaceId, body, options) {
|
|
75
|
+
return this._client.post(`/v2/workspaces/${workspaceId}/schedule_dream`, {
|
|
84
76
|
body,
|
|
85
77
|
...options,
|
|
86
78
|
headers: { Accept: '*/*', ...options?.headers },
|
|
87
79
|
});
|
|
88
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Search messages in a Workspace using optional filters. Use `limit` to control
|
|
83
|
+
* the number of results returned.
|
|
84
|
+
*/
|
|
85
|
+
search(workspaceId, body, options) {
|
|
86
|
+
return this._client.post(`/v2/workspaces/${workspaceId}/search`, { body, ...options });
|
|
87
|
+
}
|
|
89
88
|
}
|
|
90
89
|
export class WorkspacesPage extends Page {
|
|
91
90
|
}
|
|
92
91
|
Workspaces.WorkspacesPage = WorkspacesPage;
|
|
93
|
-
Workspaces.Conclusions = Conclusions;
|
|
94
|
-
Workspaces.ConclusionsPage = ConclusionsPage;
|
|
95
|
-
Workspaces.Observations = Observations;
|
|
96
|
-
Workspaces.ObservationsPage = ObservationsPage;
|
|
97
92
|
Workspaces.Peers = Peers;
|
|
98
93
|
Workspaces.PeersPage = PeersPage;
|
|
99
|
-
Workspaces.Sessions =
|
|
94
|
+
Workspaces.Sessions = Sessions;
|
|
100
95
|
Workspaces.SessionsPage = SessionsPage;
|
|
101
96
|
Workspaces.Webhooks = Webhooks;
|
|
102
97
|
Workspaces.WebhookEndpointsPage = WebhookEndpointsPage;
|
|
98
|
+
Workspaces.Queue = Queue;
|
|
99
|
+
Workspaces.Conclusions = Conclusions;
|
|
100
|
+
Workspaces.ConclusionsPage = ConclusionsPage;
|
|
103
101
|
//# sourceMappingURL=workspaces.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaces.mjs","sourceRoot":"","sources":["../../src/resources/workspaces/workspaces.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,cAAc;OACnB,
|
|
1
|
+
{"version":3,"file":"workspaces.mjs","sourceRoot":"","sources":["../../src/resources/workspaces/workspaces.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,cAAc;OACnB,EAOL,WAAW,EACX,eAAe,GAChB;OACM,KAAK,QAAQ;OACb,EAAE,KAAK,EAA0C;OACjD,KAAK,WAAW;OAChB,E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U,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC/B,UAAU,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;AACvD,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC;AACzB,UAAU,CAAC,WAAW,GAAG,WAAW,CAAC;AACrC,UAAU,CAAC,eAAe,GAAG,eAAe,CAAC"}
|
package/src/index.ts
CHANGED
|
@@ -7,24 +7,19 @@ import * as Pagination from "./pagination.js";
|
|
|
7
7
|
import { type PageParams, PageResponse } from "./pagination.js";
|
|
8
8
|
import * as Uploads from "./uploads.js";
|
|
9
9
|
import * as API from "./resources/index.js";
|
|
10
|
-
import { KeyCreateParams, KeyCreateResponse, Keys } from "./resources/keys.js";
|
|
11
10
|
import {
|
|
12
|
-
DeriverConfiguration,
|
|
13
|
-
DeriverStatus,
|
|
14
11
|
DreamConfiguration,
|
|
15
12
|
MessageSearchOptions,
|
|
16
13
|
PeerCardConfiguration,
|
|
17
|
-
|
|
14
|
+
ReasoningConfiguration,
|
|
18
15
|
SummaryConfiguration,
|
|
19
16
|
Workspace,
|
|
20
17
|
WorkspaceConfiguration,
|
|
21
|
-
WorkspaceDeriverStatusParams,
|
|
22
18
|
WorkspaceGetOrCreateParams,
|
|
23
19
|
WorkspaceListParams,
|
|
24
|
-
|
|
20
|
+
WorkspaceScheduleDreamParams,
|
|
25
21
|
WorkspaceSearchParams,
|
|
26
22
|
WorkspaceSearchResponse,
|
|
27
|
-
WorkspaceTriggerDreamParams,
|
|
28
23
|
WorkspaceUpdateParams,
|
|
29
24
|
Workspaces,
|
|
30
25
|
WorkspacesPage,
|
|
@@ -164,7 +159,6 @@ export class Honcho extends Core.APIClient {
|
|
|
164
159
|
}
|
|
165
160
|
|
|
166
161
|
workspaces: API.Workspaces = new API.Workspaces(this);
|
|
167
|
-
keys: API.Keys = new API.Keys(this);
|
|
168
162
|
|
|
169
163
|
/**
|
|
170
164
|
* Check whether the base URL is set to its default.
|
|
@@ -214,7 +208,6 @@ export class Honcho extends Core.APIClient {
|
|
|
214
208
|
|
|
215
209
|
Honcho.Workspaces = Workspaces;
|
|
216
210
|
Honcho.WorkspacesPage = WorkspacesPage;
|
|
217
|
-
Honcho.Keys = Keys;
|
|
218
211
|
|
|
219
212
|
export declare namespace Honcho {
|
|
220
213
|
export type RequestOptions = Core.RequestOptions;
|
|
@@ -224,12 +217,10 @@ export declare namespace Honcho {
|
|
|
224
217
|
|
|
225
218
|
export {
|
|
226
219
|
Workspaces as Workspaces,
|
|
227
|
-
type DeriverConfiguration as DeriverConfiguration,
|
|
228
|
-
type DeriverStatus as DeriverStatus,
|
|
229
220
|
type DreamConfiguration as DreamConfiguration,
|
|
230
221
|
type MessageSearchOptions as MessageSearchOptions,
|
|
231
222
|
type PeerCardConfiguration as PeerCardConfiguration,
|
|
232
|
-
type
|
|
223
|
+
type ReasoningConfiguration as ReasoningConfiguration,
|
|
233
224
|
type SummaryConfiguration as SummaryConfiguration,
|
|
234
225
|
type Workspace as Workspace,
|
|
235
226
|
type WorkspaceConfiguration as WorkspaceConfiguration,
|
|
@@ -237,17 +228,9 @@ export declare namespace Honcho {
|
|
|
237
228
|
WorkspacesPage as WorkspacesPage,
|
|
238
229
|
type WorkspaceUpdateParams as WorkspaceUpdateParams,
|
|
239
230
|
type WorkspaceListParams as WorkspaceListParams,
|
|
240
|
-
type WorkspaceDeriverStatusParams as WorkspaceDeriverStatusParams,
|
|
241
231
|
type WorkspaceGetOrCreateParams as WorkspaceGetOrCreateParams,
|
|
242
|
-
type
|
|
232
|
+
type WorkspaceScheduleDreamParams as WorkspaceScheduleDreamParams,
|
|
243
233
|
type WorkspaceSearchParams as WorkspaceSearchParams,
|
|
244
|
-
type WorkspaceTriggerDreamParams as WorkspaceTriggerDreamParams,
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
export {
|
|
248
|
-
Keys as Keys,
|
|
249
|
-
type KeyCreateResponse as KeyCreateResponse,
|
|
250
|
-
type KeyCreateParams as KeyCreateParams,
|
|
251
234
|
};
|
|
252
235
|
}
|
|
253
236
|
|
package/src/resources/index.ts
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export { Keys, type KeyCreateResponse, type KeyCreateParams } from "./keys.js";
|
|
4
3
|
export {
|
|
5
4
|
WorkspacesPage,
|
|
6
5
|
Workspaces,
|
|
7
|
-
type DeriverConfiguration,
|
|
8
|
-
type DeriverStatus,
|
|
9
6
|
type DreamConfiguration,
|
|
10
7
|
type MessageSearchOptions,
|
|
11
8
|
type PeerCardConfiguration,
|
|
12
|
-
type
|
|
9
|
+
type ReasoningConfiguration,
|
|
13
10
|
type SummaryConfiguration,
|
|
14
11
|
type Workspace,
|
|
15
12
|
type WorkspaceConfiguration,
|
|
16
13
|
type WorkspaceSearchResponse,
|
|
17
14
|
type WorkspaceUpdateParams,
|
|
18
15
|
type WorkspaceListParams,
|
|
19
|
-
type WorkspaceDeriverStatusParams,
|
|
20
16
|
type WorkspaceGetOrCreateParams,
|
|
21
|
-
type
|
|
17
|
+
type WorkspaceScheduleDreamParams,
|
|
22
18
|
type WorkspaceSearchParams,
|
|
23
|
-
type WorkspaceTriggerDreamParams,
|
|
24
19
|
} from "./workspaces/workspaces.js";
|
|
@@ -7,9 +7,10 @@ import { Page, type PageParams } from "../../pagination.js";
|
|
|
7
7
|
|
|
8
8
|
export class Conclusions extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create one or more
|
|
10
|
+
* Create one or more Conclusions.
|
|
11
11
|
*
|
|
12
|
-
* Conclusions are
|
|
12
|
+
* Conclusions are logical certainties derived from interactions between Peers.
|
|
13
|
+
* They form the basis of a Peer's Representation.
|
|
13
14
|
*/
|
|
14
15
|
create(
|
|
15
16
|
workspaceId: string,
|
|
@@ -20,8 +21,8 @@ export class Conclusions extends APIResource {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
* List
|
|
24
|
-
* true.
|
|
24
|
+
* List Conclusions using optional filters, ordered by recency unless `reverse` is
|
|
25
|
+
* true. Results are paginated.
|
|
25
26
|
*/
|
|
26
27
|
list(
|
|
27
28
|
workspaceId: string,
|
|
@@ -47,14 +48,20 @@ export class Conclusions extends APIResource {
|
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
* Delete a
|
|
51
|
+
* Delete a single Conclusion by ID.
|
|
52
|
+
*
|
|
53
|
+
* This action cannot be undone.
|
|
51
54
|
*/
|
|
52
|
-
delete(workspaceId: string, conclusionId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
53
|
-
return this._client.delete(`/v2/workspaces/${workspaceId}/conclusions/${conclusionId}`,
|
|
55
|
+
delete(workspaceId: string, conclusionId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
56
|
+
return this._client.delete(`/v2/workspaces/${workspaceId}/conclusions/${conclusionId}`, {
|
|
57
|
+
...options,
|
|
58
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
59
|
+
});
|
|
54
60
|
}
|
|
55
61
|
|
|
56
62
|
/**
|
|
57
|
-
* Query
|
|
63
|
+
* Query Conclusions using semantic search. Use `top_k` to control the number of
|
|
64
|
+
* results returned.
|
|
58
65
|
*/
|
|
59
66
|
query(
|
|
60
67
|
workspaceId: string,
|
|
@@ -90,80 +97,36 @@ export interface Conclusion {
|
|
|
90
97
|
session_id: string;
|
|
91
98
|
}
|
|
92
99
|
|
|
93
|
-
|
|
94
|
-
* Schema for creating a single conclusion.
|
|
95
|
-
*/
|
|
96
|
-
export interface ConclusionCreate {
|
|
97
|
-
content: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The peer the conclusion is about
|
|
101
|
-
*/
|
|
102
|
-
observed_id: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* The peer making the conclusion
|
|
106
|
-
*/
|
|
107
|
-
observer_id: string;
|
|
100
|
+
export type ConclusionCreateResponse = Array<Conclusion>;
|
|
108
101
|
|
|
109
|
-
|
|
110
|
-
* The session this conclusion relates to
|
|
111
|
-
*/
|
|
112
|
-
session_id: string;
|
|
113
|
-
}
|
|
102
|
+
export type ConclusionQueryResponse = Array<Conclusion>;
|
|
114
103
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
*/
|
|
118
|
-
export interface ConclusionGet {
|
|
119
|
-
filters?: { [key: string]: unknown } | null;
|
|
104
|
+
export interface ConclusionCreateParams {
|
|
105
|
+
conclusions: Array<ConclusionCreateParams.Conclusion>;
|
|
120
106
|
}
|
|
121
107
|
|
|
122
|
-
|
|
123
|
-
* Query parameters for semantic search of conclusions.
|
|
124
|
-
*/
|
|
125
|
-
export interface ConclusionQuery {
|
|
126
|
-
/**
|
|
127
|
-
* Semantic search query
|
|
128
|
-
*/
|
|
129
|
-
query: string;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Maximum cosine distance threshold for results
|
|
133
|
-
*/
|
|
134
|
-
distance?: number | null;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Additional filters to apply
|
|
138
|
-
*/
|
|
139
|
-
filters?: { [key: string]: unknown } | null;
|
|
140
|
-
|
|
108
|
+
export namespace ConclusionCreateParams {
|
|
141
109
|
/**
|
|
142
|
-
*
|
|
110
|
+
* Schema for creating a single conclusion.
|
|
143
111
|
*/
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
export interface PageConclusion {
|
|
148
|
-
items: Array<Conclusion>;
|
|
149
|
-
|
|
150
|
-
page: number;
|
|
151
|
-
|
|
152
|
-
size: number;
|
|
153
|
-
|
|
154
|
-
pages?: number;
|
|
112
|
+
export interface Conclusion {
|
|
113
|
+
content: string;
|
|
155
114
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
115
|
+
/**
|
|
116
|
+
* The peer the conclusion is about
|
|
117
|
+
*/
|
|
118
|
+
observed_id: string;
|
|
160
119
|
|
|
161
|
-
|
|
120
|
+
/**
|
|
121
|
+
* The peer making the conclusion
|
|
122
|
+
*/
|
|
123
|
+
observer_id: string;
|
|
162
124
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
125
|
+
/**
|
|
126
|
+
* The session this conclusion relates to
|
|
127
|
+
*/
|
|
128
|
+
session_id: string;
|
|
129
|
+
}
|
|
167
130
|
}
|
|
168
131
|
|
|
169
132
|
export interface ConclusionListParams extends PageParams {
|
|
@@ -205,12 +168,7 @@ Conclusions.ConclusionsPage = ConclusionsPage;
|
|
|
205
168
|
export declare namespace Conclusions {
|
|
206
169
|
export {
|
|
207
170
|
type Conclusion as Conclusion,
|
|
208
|
-
type ConclusionCreate as ConclusionCreate,
|
|
209
|
-
type ConclusionGet as ConclusionGet,
|
|
210
|
-
type ConclusionQuery as ConclusionQuery,
|
|
211
|
-
type PageConclusion as PageConclusion,
|
|
212
171
|
type ConclusionCreateResponse as ConclusionCreateResponse,
|
|
213
|
-
type ConclusionDeleteResponse as ConclusionDeleteResponse,
|
|
214
172
|
type ConclusionQueryResponse as ConclusionQueryResponse,
|
|
215
173
|
ConclusionsPage as ConclusionsPage,
|
|
216
174
|
type ConclusionCreateParams as ConclusionCreateParams,
|
|
@@ -4,32 +4,12 @@ export {
|
|
|
4
4
|
ConclusionsPage,
|
|
5
5
|
Conclusions,
|
|
6
6
|
type Conclusion,
|
|
7
|
-
type ConclusionCreate,
|
|
8
|
-
type ConclusionGet,
|
|
9
|
-
type ConclusionQuery,
|
|
10
|
-
type PageConclusion,
|
|
11
7
|
type ConclusionCreateResponse,
|
|
12
|
-
type ConclusionDeleteResponse,
|
|
13
8
|
type ConclusionQueryResponse,
|
|
14
9
|
type ConclusionCreateParams,
|
|
15
10
|
type ConclusionListParams,
|
|
16
11
|
type ConclusionQueryParams,
|
|
17
12
|
} from "./conclusions.js";
|
|
18
|
-
export {
|
|
19
|
-
ObservationsPage,
|
|
20
|
-
Observations,
|
|
21
|
-
type Observation,
|
|
22
|
-
type ObservationCreate,
|
|
23
|
-
type ObservationGet,
|
|
24
|
-
type ObservationQuery,
|
|
25
|
-
type PageObservation,
|
|
26
|
-
type ObservationCreateResponse,
|
|
27
|
-
type ObservationDeleteResponse,
|
|
28
|
-
type ObservationQueryResponse,
|
|
29
|
-
type ObservationCreateParams,
|
|
30
|
-
type ObservationListParams,
|
|
31
|
-
type ObservationQueryParams,
|
|
32
|
-
} from "./observations.js";
|
|
33
13
|
export {
|
|
34
14
|
PeersPage,
|
|
35
15
|
Peers,
|
|
@@ -39,19 +19,20 @@ export {
|
|
|
39
19
|
type PeerCardResponse,
|
|
40
20
|
type SessionGet,
|
|
41
21
|
type PeerChatResponse,
|
|
42
|
-
type
|
|
22
|
+
type PeerContextResponse,
|
|
23
|
+
type PeerRepresentationResponse,
|
|
43
24
|
type PeerSearchResponse,
|
|
44
|
-
type PeerWorkingRepresentationResponse,
|
|
45
25
|
type PeerUpdateParams,
|
|
46
26
|
type PeerListParams,
|
|
47
27
|
type PeerCardParams,
|
|
48
28
|
type PeerChatParams,
|
|
49
|
-
type
|
|
29
|
+
type PeerContextParams,
|
|
50
30
|
type PeerGetOrCreateParams,
|
|
31
|
+
type PeerRepresentationParams,
|
|
51
32
|
type PeerSearchParams,
|
|
52
33
|
type PeerSetCardParams,
|
|
53
|
-
type PeerWorkingRepresentationParams,
|
|
54
34
|
} from "./peers/index.js";
|
|
35
|
+
export { Queue, type QueueStatusResponse, type QueueStatusParams } from "./queue.js";
|
|
55
36
|
export {
|
|
56
37
|
SessionsPage,
|
|
57
38
|
Sessions,
|
|
@@ -59,13 +40,13 @@ export {
|
|
|
59
40
|
type SessionConfiguration,
|
|
60
41
|
type Summary,
|
|
61
42
|
type SessionDeleteResponse,
|
|
62
|
-
type
|
|
43
|
+
type SessionContextResponse,
|
|
63
44
|
type SessionSearchResponse,
|
|
64
45
|
type SessionSummariesResponse,
|
|
65
46
|
type SessionUpdateParams,
|
|
66
47
|
type SessionListParams,
|
|
67
48
|
type SessionCloneParams,
|
|
68
|
-
type
|
|
49
|
+
type SessionContextParams,
|
|
69
50
|
type SessionGetOrCreateParams,
|
|
70
51
|
type SessionSearchParams,
|
|
71
52
|
} from "./sessions/index.js";
|
|
@@ -73,7 +54,6 @@ export {
|
|
|
73
54
|
WebhookEndpointsPage,
|
|
74
55
|
Webhooks,
|
|
75
56
|
type WebhookEndpoint,
|
|
76
|
-
type WebhookDeleteResponse,
|
|
77
57
|
type WebhookTestEmitResponse,
|
|
78
58
|
type WebhookListParams,
|
|
79
59
|
type WebhookGetOrCreateParams,
|
|
@@ -81,21 +61,17 @@ export {
|
|
|
81
61
|
export {
|
|
82
62
|
WorkspacesPage,
|
|
83
63
|
Workspaces,
|
|
84
|
-
type DeriverConfiguration,
|
|
85
|
-
type DeriverStatus,
|
|
86
64
|
type DreamConfiguration,
|
|
87
65
|
type MessageSearchOptions,
|
|
88
66
|
type PeerCardConfiguration,
|
|
89
|
-
type
|
|
67
|
+
type ReasoningConfiguration,
|
|
90
68
|
type SummaryConfiguration,
|
|
91
69
|
type Workspace,
|
|
92
70
|
type WorkspaceConfiguration,
|
|
93
71
|
type WorkspaceSearchResponse,
|
|
94
72
|
type WorkspaceUpdateParams,
|
|
95
73
|
type WorkspaceListParams,
|
|
96
|
-
type WorkspaceDeriverStatusParams,
|
|
97
74
|
type WorkspaceGetOrCreateParams,
|
|
98
|
-
type
|
|
75
|
+
type WorkspaceScheduleDreamParams,
|
|
99
76
|
type WorkspaceSearchParams,
|
|
100
|
-
type WorkspaceTriggerDreamParams,
|
|
101
77
|
} from "./workspaces.js";
|
|
@@ -9,17 +9,17 @@ export {
|
|
|
9
9
|
type PeerCardResponse,
|
|
10
10
|
type SessionGet,
|
|
11
11
|
type PeerChatResponse,
|
|
12
|
-
type
|
|
12
|
+
type PeerContextResponse,
|
|
13
|
+
type PeerRepresentationResponse,
|
|
13
14
|
type PeerSearchResponse,
|
|
14
|
-
type PeerWorkingRepresentationResponse,
|
|
15
15
|
type PeerUpdateParams,
|
|
16
16
|
type PeerListParams,
|
|
17
17
|
type PeerCardParams,
|
|
18
18
|
type PeerChatParams,
|
|
19
|
-
type
|
|
19
|
+
type PeerContextParams,
|
|
20
20
|
type PeerGetOrCreateParams,
|
|
21
|
+
type PeerRepresentationParams,
|
|
21
22
|
type PeerSearchParams,
|
|
22
23
|
type PeerSetCardParams,
|
|
23
|
-
type PeerWorkingRepresentationParams,
|
|
24
24
|
} from "./peers.js";
|
|
25
25
|
export { Sessions, type SessionListParams } from "./sessions.js";
|