@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
|
@@ -10,7 +10,7 @@ import { type PageParams } from "../../../pagination.js";
|
|
|
10
10
|
|
|
11
11
|
export class Peers extends APIResource {
|
|
12
12
|
/**
|
|
13
|
-
* Get
|
|
13
|
+
* Get all Peers in a Session. Results are paginated.
|
|
14
14
|
*/
|
|
15
15
|
list(
|
|
16
16
|
workspaceId: string,
|
|
@@ -39,7 +39,8 @@ export class Peers extends APIResource {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Add
|
|
42
|
+
* Add Peers to a Session. If a Peer does not yet exist, it will be created
|
|
43
|
+
* automatically.
|
|
43
44
|
*/
|
|
44
45
|
add(
|
|
45
46
|
workspaceId: string,
|
|
@@ -54,9 +55,9 @@ export class Peers extends APIResource {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
/**
|
|
57
|
-
* Get the configuration for a
|
|
58
|
+
* Get the configuration for a Peer in a Session.
|
|
58
59
|
*/
|
|
59
|
-
|
|
60
|
+
config(
|
|
60
61
|
workspaceId: string,
|
|
61
62
|
sessionId: string,
|
|
62
63
|
peerId: string,
|
|
@@ -69,7 +70,7 @@ export class Peers extends APIResource {
|
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
/**
|
|
72
|
-
* Remove
|
|
73
|
+
* Remove Peers by ID from a Session.
|
|
73
74
|
*/
|
|
74
75
|
remove(
|
|
75
76
|
workspaceId: string,
|
|
@@ -84,7 +85,10 @@ export class Peers extends APIResource {
|
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
/**
|
|
87
|
-
* Set the
|
|
88
|
+
* Set the Peers in a Session. If a Peer does not yet exist, it will be created
|
|
89
|
+
* automatically.
|
|
90
|
+
*
|
|
91
|
+
* This will fully replace the current set of Peers in the Session.
|
|
88
92
|
*/
|
|
89
93
|
set(
|
|
90
94
|
workspaceId: string,
|
|
@@ -99,7 +103,7 @@ export class Peers extends APIResource {
|
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
/**
|
|
102
|
-
* Set the configuration for a
|
|
106
|
+
* Set the configuration for a Peer in a Session.
|
|
103
107
|
*/
|
|
104
108
|
setConfig(
|
|
105
109
|
workspaceId: string,
|
|
@@ -107,17 +111,18 @@ export class Peers extends APIResource {
|
|
|
107
111
|
peerId: string,
|
|
108
112
|
body: PeerSetConfigParams,
|
|
109
113
|
options?: Core.RequestOptions,
|
|
110
|
-
): Core.APIPromise<
|
|
111
|
-
return this._client.
|
|
114
|
+
): Core.APIPromise<void> {
|
|
115
|
+
return this._client.put(`/v2/workspaces/${workspaceId}/sessions/${sessionId}/peers/${peerId}/config`, {
|
|
112
116
|
body,
|
|
113
117
|
...options,
|
|
118
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
114
119
|
});
|
|
115
120
|
}
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
export interface SessionPeerConfig {
|
|
119
124
|
/**
|
|
120
|
-
* Whether
|
|
125
|
+
* Whether Honcho will use reasoning to form a representation of this peer
|
|
121
126
|
*/
|
|
122
127
|
observe_me?: boolean | null;
|
|
123
128
|
|
|
@@ -128,8 +133,6 @@ export interface SessionPeerConfig {
|
|
|
128
133
|
observe_others?: boolean | null;
|
|
129
134
|
}
|
|
130
135
|
|
|
131
|
-
export type PeerSetConfigResponse = unknown;
|
|
132
|
-
|
|
133
136
|
export interface PeerListParams extends PageParams {}
|
|
134
137
|
|
|
135
138
|
export type PeerAddParams = { [key: string]: SessionPeerConfig };
|
|
@@ -140,7 +143,7 @@ export type PeerSetParams = { [key: string]: SessionPeerConfig };
|
|
|
140
143
|
|
|
141
144
|
export interface PeerSetConfigParams {
|
|
142
145
|
/**
|
|
143
|
-
* Whether
|
|
146
|
+
* Whether Honcho will use reasoning to form a representation of this peer
|
|
144
147
|
*/
|
|
145
148
|
observe_me?: boolean | null;
|
|
146
149
|
|
|
@@ -154,7 +157,6 @@ export interface PeerSetConfigParams {
|
|
|
154
157
|
export declare namespace Peers {
|
|
155
158
|
export {
|
|
156
159
|
type SessionPeerConfig as SessionPeerConfig,
|
|
157
|
-
type PeerSetConfigResponse as PeerSetConfigResponse,
|
|
158
160
|
type PeerListParams as PeerListParams,
|
|
159
161
|
type PeerAddParams as PeerAddParams,
|
|
160
162
|
type PeerRemoveParams as PeerRemoveParams,
|
|
@@ -23,7 +23,6 @@ import {
|
|
|
23
23
|
PeerListParams,
|
|
24
24
|
PeerRemoveParams,
|
|
25
25
|
PeerSetConfigParams,
|
|
26
|
-
PeerSetConfigResponse,
|
|
27
26
|
PeerSetParams,
|
|
28
27
|
Peers,
|
|
29
28
|
SessionPeerConfig,
|
|
@@ -35,7 +34,7 @@ export class Sessions extends APIResource {
|
|
|
35
34
|
peers: PeersAPI.Peers = new PeersAPI.Peers(this._client);
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
|
-
* Update
|
|
37
|
+
* Update a Session's metadata and/or configuration.
|
|
39
38
|
*/
|
|
40
39
|
update(
|
|
41
40
|
workspaceId: string,
|
|
@@ -47,7 +46,7 @@ export class Sessions extends APIResource {
|
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
/**
|
|
50
|
-
* Get
|
|
49
|
+
* Get all Sessions for a Workspace, paginated with optional filters.
|
|
51
50
|
*/
|
|
52
51
|
list(
|
|
53
52
|
workspaceId: string,
|
|
@@ -73,11 +72,11 @@ export class Sessions extends APIResource {
|
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
/**
|
|
76
|
-
* Delete a
|
|
75
|
+
* Delete a Session and all associated messages.
|
|
77
76
|
*
|
|
78
|
-
* The
|
|
79
|
-
* actual deletion of all related data
|
|
80
|
-
*
|
|
77
|
+
* The Session is marked as inactive immediately and returns 202 Accepted. The
|
|
78
|
+
* actual deletion of all related data happens asynchronously via the queue with
|
|
79
|
+
* retry support.
|
|
81
80
|
*
|
|
82
81
|
* This action cannot be undone.
|
|
83
82
|
*/
|
|
@@ -86,57 +85,58 @@ export class Sessions extends APIResource {
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
/**
|
|
89
|
-
* Clone a
|
|
88
|
+
* Clone a Session, optionally up to a specific message ID.
|
|
90
89
|
*/
|
|
91
90
|
clone(
|
|
92
91
|
workspaceId: string,
|
|
93
92
|
sessionId: string,
|
|
94
|
-
|
|
93
|
+
params?: SessionCloneParams,
|
|
95
94
|
options?: Core.RequestOptions,
|
|
96
95
|
): Core.APIPromise<Session>;
|
|
97
96
|
clone(workspaceId: string, sessionId: string, options?: Core.RequestOptions): Core.APIPromise<Session>;
|
|
98
97
|
clone(
|
|
99
98
|
workspaceId: string,
|
|
100
99
|
sessionId: string,
|
|
101
|
-
|
|
100
|
+
params: SessionCloneParams | Core.RequestOptions = {},
|
|
102
101
|
options?: Core.RequestOptions,
|
|
103
102
|
): Core.APIPromise<Session> {
|
|
104
|
-
if (isRequestOptions(
|
|
105
|
-
return this.clone(workspaceId, sessionId, {},
|
|
103
|
+
if (isRequestOptions(params)) {
|
|
104
|
+
return this.clone(workspaceId, sessionId, {}, params);
|
|
106
105
|
}
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
const { message_id } = params;
|
|
107
|
+
return this._client.post(`/v2/workspaces/${workspaceId}/sessions/${sessionId}/clone`, {
|
|
108
|
+
query: { message_id },
|
|
109
109
|
...options,
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Produce a context object from the
|
|
114
|
+
* Produce a context object from the Session. The caller provides an optional token
|
|
115
115
|
* limit which the entire context must fit into. If not provided, the context will
|
|
116
116
|
* be exhaustive (within configured max tokens). To do this, we allocate 40% of the
|
|
117
117
|
* token limit to the summary, and 60% to recent messages -- as many as can fit.
|
|
118
118
|
* Note that the summary will usually take up less space than this. If the caller
|
|
119
119
|
* does not want a summary, we allocate all the tokens to recent messages.
|
|
120
120
|
*/
|
|
121
|
-
|
|
121
|
+
context(
|
|
122
122
|
workspaceId: string,
|
|
123
123
|
sessionId: string,
|
|
124
|
-
query?:
|
|
124
|
+
query?: SessionContextParams,
|
|
125
125
|
options?: Core.RequestOptions,
|
|
126
|
-
): Core.APIPromise<
|
|
127
|
-
|
|
126
|
+
): Core.APIPromise<SessionContextResponse>;
|
|
127
|
+
context(
|
|
128
128
|
workspaceId: string,
|
|
129
129
|
sessionId: string,
|
|
130
130
|
options?: Core.RequestOptions,
|
|
131
|
-
): Core.APIPromise<
|
|
132
|
-
|
|
131
|
+
): Core.APIPromise<SessionContextResponse>;
|
|
132
|
+
context(
|
|
133
133
|
workspaceId: string,
|
|
134
134
|
sessionId: string,
|
|
135
|
-
query:
|
|
135
|
+
query: SessionContextParams | Core.RequestOptions = {},
|
|
136
136
|
options?: Core.RequestOptions,
|
|
137
|
-
): Core.APIPromise<
|
|
137
|
+
): Core.APIPromise<SessionContextResponse> {
|
|
138
138
|
if (isRequestOptions(query)) {
|
|
139
|
-
return this.
|
|
139
|
+
return this.context(workspaceId, sessionId, {}, query);
|
|
140
140
|
}
|
|
141
141
|
return this._client.get(`/v2/workspaces/${workspaceId}/sessions/${sessionId}/context`, {
|
|
142
142
|
query,
|
|
@@ -145,10 +145,10 @@ export class Sessions extends APIResource {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* Get a
|
|
148
|
+
* Get a Session by ID or create a new Session with the given ID.
|
|
149
149
|
*
|
|
150
|
-
* If
|
|
151
|
-
*
|
|
150
|
+
* If Session ID is provided as a parameter, it verifies the Session is in the
|
|
151
|
+
* Workspace. Otherwise, it uses the session_id from the JWT for verification.
|
|
152
152
|
*/
|
|
153
153
|
getOrCreate(
|
|
154
154
|
workspaceId: string,
|
|
@@ -159,7 +159,8 @@ export class Sessions extends APIResource {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
|
-
* Search a Session
|
|
162
|
+
* Search a Session with optional filters. Use `limit` to control the number of
|
|
163
|
+
* results returned.
|
|
163
164
|
*/
|
|
164
165
|
search(
|
|
165
166
|
workspaceId: string,
|
|
@@ -174,7 +175,7 @@ export class Sessions extends APIResource {
|
|
|
174
175
|
}
|
|
175
176
|
|
|
176
177
|
/**
|
|
177
|
-
* Get available summaries for a
|
|
178
|
+
* Get available summaries for a Session.
|
|
178
179
|
*
|
|
179
180
|
* Returns both short and long summaries if available, including metadata like the
|
|
180
181
|
* message ID they cover up to, creation timestamp, and token count.
|
|
@@ -212,22 +213,22 @@ export interface Session {
|
|
|
212
213
|
*/
|
|
213
214
|
export interface SessionConfiguration {
|
|
214
215
|
/**
|
|
215
|
-
* Configuration for
|
|
216
|
-
|
|
217
|
-
deriver?: WorkspacesAPI.DeriverConfiguration | null;
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Configuration for dream functionality. If deriver is disabled, dreams will also
|
|
221
|
-
* be disabled and these settings will be ignored.
|
|
216
|
+
* Configuration for dream functionality. If reasoning is disabled, dreams will
|
|
217
|
+
* also be disabled and these settings will be ignored.
|
|
222
218
|
*/
|
|
223
219
|
dream?: WorkspacesAPI.DreamConfiguration | null;
|
|
224
220
|
|
|
225
221
|
/**
|
|
226
|
-
* Configuration for peer card functionality. If
|
|
222
|
+
* Configuration for peer card functionality. If reasoning is disabled, peer cards
|
|
227
223
|
* will also be disabled and these settings will be ignored.
|
|
228
224
|
*/
|
|
229
225
|
peer_card?: WorkspacesAPI.PeerCardConfiguration | null;
|
|
230
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Configuration for reasoning functionality.
|
|
229
|
+
*/
|
|
230
|
+
reasoning?: WorkspacesAPI.ReasoningConfiguration | null;
|
|
231
|
+
|
|
231
232
|
/**
|
|
232
233
|
* Configuration for summary functionality.
|
|
233
234
|
*/
|
|
@@ -265,7 +266,7 @@ export interface Summary {
|
|
|
265
266
|
|
|
266
267
|
export type SessionDeleteResponse = unknown;
|
|
267
268
|
|
|
268
|
-
export interface
|
|
269
|
+
export interface SessionContextResponse {
|
|
269
270
|
id: string;
|
|
270
271
|
|
|
271
272
|
messages: Array<MessagesAPI.Message>;
|
|
@@ -276,25 +277,10 @@ export interface SessionGetContextResponse {
|
|
|
276
277
|
peer_card?: Array<string> | null;
|
|
277
278
|
|
|
278
279
|
/**
|
|
279
|
-
* A
|
|
280
|
-
*
|
|
281
|
-
*
|
|
282
|
-
* From there, deductive observations can be made by establishing logical
|
|
283
|
-
* relationships between explicit observations.
|
|
284
|
-
*
|
|
285
|
-
* In the future, we can add more levels of reasoning on top of these.
|
|
286
|
-
*
|
|
287
|
-
* All of a peer's observations are stored as documents in a collection. These
|
|
288
|
-
* documents can be queried in various ways to produce this Representation object.
|
|
289
|
-
*
|
|
290
|
-
* Additionally, a "working representation" is a version of this data structure
|
|
291
|
-
* representing the most recent observations within a single session.
|
|
292
|
-
*
|
|
293
|
-
* A representation can have a maximum number of observations, which is applied
|
|
294
|
-
* individually to each level of reasoning. If a maximum is set, observations are
|
|
295
|
-
* added and removed in FIFO order.
|
|
280
|
+
* A curated subset of a peer representation, if context is requested from a
|
|
281
|
+
* specific perspective
|
|
296
282
|
*/
|
|
297
|
-
peer_representation?:
|
|
283
|
+
peer_representation?: string | null;
|
|
298
284
|
|
|
299
285
|
/**
|
|
300
286
|
* The summary if available
|
|
@@ -302,81 +288,6 @@ export interface SessionGetContextResponse {
|
|
|
302
288
|
summary?: Summary | null;
|
|
303
289
|
}
|
|
304
290
|
|
|
305
|
-
export namespace SessionGetContextResponse {
|
|
306
|
-
/**
|
|
307
|
-
* A Representation is a traversable and diffable map of observations. At the base,
|
|
308
|
-
* we have a list of explicit observations, derived from a peer's messages.
|
|
309
|
-
*
|
|
310
|
-
* From there, deductive observations can be made by establishing logical
|
|
311
|
-
* relationships between explicit observations.
|
|
312
|
-
*
|
|
313
|
-
* In the future, we can add more levels of reasoning on top of these.
|
|
314
|
-
*
|
|
315
|
-
* All of a peer's observations are stored as documents in a collection. These
|
|
316
|
-
* documents can be queried in various ways to produce this Representation object.
|
|
317
|
-
*
|
|
318
|
-
* Additionally, a "working representation" is a version of this data structure
|
|
319
|
-
* representing the most recent observations within a single session.
|
|
320
|
-
*
|
|
321
|
-
* A representation can have a maximum number of observations, which is applied
|
|
322
|
-
* individually to each level of reasoning. If a maximum is set, observations are
|
|
323
|
-
* added and removed in FIFO order.
|
|
324
|
-
*/
|
|
325
|
-
export interface PeerRepresentation {
|
|
326
|
-
/**
|
|
327
|
-
* Conclusions that MUST be true given explicit facts and premises - strict logical
|
|
328
|
-
* necessities. Each deduction should have premises and a single conclusion.
|
|
329
|
-
*/
|
|
330
|
-
deductive?: Array<PeerRepresentation.Deductive>;
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Facts LITERALLY stated by the user - direct quotes or clear paraphrases only, no
|
|
334
|
-
* interpretation or inference. Example: ['The user is 25 years old', 'The user has
|
|
335
|
-
* a dog']
|
|
336
|
-
*/
|
|
337
|
-
explicit?: Array<PeerRepresentation.Explicit>;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
export namespace PeerRepresentation {
|
|
341
|
-
/**
|
|
342
|
-
* Deductive observation with multiple premises and one conclusion, plus metadata.
|
|
343
|
-
*/
|
|
344
|
-
export interface Deductive {
|
|
345
|
-
/**
|
|
346
|
-
* The deductive conclusion
|
|
347
|
-
*/
|
|
348
|
-
conclusion: string;
|
|
349
|
-
|
|
350
|
-
created_at: string;
|
|
351
|
-
|
|
352
|
-
message_ids: Array<number>;
|
|
353
|
-
|
|
354
|
-
session_name: string;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Supporting premises or evidence for this conclusion
|
|
358
|
-
*/
|
|
359
|
-
premises?: Array<string>;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Explicit observation with content and metadata.
|
|
364
|
-
*/
|
|
365
|
-
export interface Explicit {
|
|
366
|
-
/**
|
|
367
|
-
* The explicit observation
|
|
368
|
-
*/
|
|
369
|
-
content: string;
|
|
370
|
-
|
|
371
|
-
created_at: string;
|
|
372
|
-
|
|
373
|
-
message_ids: Array<number>;
|
|
374
|
-
|
|
375
|
-
session_name: string;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
|
|
380
291
|
export type SessionSearchResponse = Array<MessagesAPI.Message>;
|
|
381
292
|
|
|
382
293
|
export interface SessionSummariesResponse {
|
|
@@ -419,15 +330,15 @@ export interface SessionCloneParams {
|
|
|
419
330
|
message_id?: string | null;
|
|
420
331
|
}
|
|
421
332
|
|
|
422
|
-
export interface
|
|
333
|
+
export interface SessionContextParams {
|
|
423
334
|
/**
|
|
424
|
-
* Only used if `last_message` is provided. Whether to include the most
|
|
425
|
-
*
|
|
335
|
+
* Only used if `last_message` is provided. Whether to include the most frequent
|
|
336
|
+
* conclusions in the representation
|
|
426
337
|
*/
|
|
427
|
-
|
|
338
|
+
include_most_frequent?: boolean;
|
|
428
339
|
|
|
429
340
|
/**
|
|
430
|
-
* The most recent message, used to fetch semantically relevant
|
|
341
|
+
* The most recent message, used to fetch semantically relevant conclusions
|
|
431
342
|
*/
|
|
432
343
|
last_message?: string | null;
|
|
433
344
|
|
|
@@ -438,10 +349,10 @@ export interface SessionGetContextParams {
|
|
|
438
349
|
limit_to_session?: boolean;
|
|
439
350
|
|
|
440
351
|
/**
|
|
441
|
-
* Only used if `last_message` is provided. The maximum number of
|
|
352
|
+
* Only used if `last_message` is provided. The maximum number of conclusions to
|
|
442
353
|
* include in the representation
|
|
443
354
|
*/
|
|
444
|
-
|
|
355
|
+
max_conclusions?: number | null;
|
|
445
356
|
|
|
446
357
|
/**
|
|
447
358
|
* A peer to get context for. If given, response will attempt to include
|
|
@@ -460,13 +371,13 @@ export interface SessionGetContextParams {
|
|
|
460
371
|
|
|
461
372
|
/**
|
|
462
373
|
* Only used if `last_message` is provided. The maximum distance to search for
|
|
463
|
-
* semantically relevant
|
|
374
|
+
* semantically relevant conclusions
|
|
464
375
|
*/
|
|
465
376
|
search_max_distance?: number | null;
|
|
466
377
|
|
|
467
378
|
/**
|
|
468
379
|
* Only used if `last_message` is provided. The number of semantic-search-retrieved
|
|
469
|
-
*
|
|
380
|
+
* conclusions to include in the representation
|
|
470
381
|
*/
|
|
471
382
|
search_top_k?: number | null;
|
|
472
383
|
|
|
@@ -527,14 +438,14 @@ export declare namespace Sessions {
|
|
|
527
438
|
type SessionConfiguration as SessionConfiguration,
|
|
528
439
|
type Summary as Summary,
|
|
529
440
|
type SessionDeleteResponse as SessionDeleteResponse,
|
|
530
|
-
type
|
|
441
|
+
type SessionContextResponse as SessionContextResponse,
|
|
531
442
|
type SessionSearchResponse as SessionSearchResponse,
|
|
532
443
|
type SessionSummariesResponse as SessionSummariesResponse,
|
|
533
444
|
SessionsPage as SessionsPage,
|
|
534
445
|
type SessionUpdateParams as SessionUpdateParams,
|
|
535
446
|
type SessionListParams as SessionListParams,
|
|
536
447
|
type SessionCloneParams as SessionCloneParams,
|
|
537
|
-
type
|
|
448
|
+
type SessionContextParams as SessionContextParams,
|
|
538
449
|
type SessionGetOrCreateParams as SessionGetOrCreateParams,
|
|
539
450
|
type SessionSearchParams as SessionSearchParams,
|
|
540
451
|
};
|
|
@@ -555,7 +466,6 @@ export declare namespace Sessions {
|
|
|
555
466
|
export {
|
|
556
467
|
Peers as Peers,
|
|
557
468
|
type SessionPeerConfig as SessionPeerConfig,
|
|
558
|
-
type PeerSetConfigResponse as PeerSetConfigResponse,
|
|
559
469
|
type PeerListParams as PeerListParams,
|
|
560
470
|
type PeerAddParams as PeerAddParams,
|
|
561
471
|
type PeerRemoveParams as PeerRemoveParams,
|
|
@@ -35,8 +35,11 @@ export class Webhooks extends APIResource {
|
|
|
35
35
|
/**
|
|
36
36
|
* Delete a specific webhook endpoint.
|
|
37
37
|
*/
|
|
38
|
-
delete(workspaceId: string, endpointId: string, options?: Core.RequestOptions): Core.APIPromise<
|
|
39
|
-
return this._client.delete(`/v2/workspaces/${workspaceId}/webhooks/${endpointId}`,
|
|
38
|
+
delete(workspaceId: string, endpointId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
39
|
+
return this._client.delete(`/v2/workspaces/${workspaceId}/webhooks/${endpointId}`, {
|
|
40
|
+
...options,
|
|
41
|
+
headers: { Accept: '*/*', ...options?.headers },
|
|
42
|
+
});
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
/**
|
|
@@ -70,8 +73,6 @@ export interface WebhookEndpoint {
|
|
|
70
73
|
workspace_id: string | null;
|
|
71
74
|
}
|
|
72
75
|
|
|
73
|
-
export type WebhookDeleteResponse = unknown;
|
|
74
|
-
|
|
75
76
|
export type WebhookTestEmitResponse = unknown;
|
|
76
77
|
|
|
77
78
|
export interface WebhookListParams extends PageParams {}
|
|
@@ -85,7 +86,6 @@ Webhooks.WebhookEndpointsPage = WebhookEndpointsPage;
|
|
|
85
86
|
export declare namespace Webhooks {
|
|
86
87
|
export {
|
|
87
88
|
type WebhookEndpoint as WebhookEndpoint,
|
|
88
|
-
type WebhookDeleteResponse as WebhookDeleteResponse,
|
|
89
89
|
type WebhookTestEmitResponse as WebhookTestEmitResponse,
|
|
90
90
|
WebhookEndpointsPage as WebhookEndpointsPage,
|
|
91
91
|
type WebhookListParams as WebhookListParams,
|