@honcho-ai/core 1.8.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 +40 -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 +109 -0
- package/resources/workspaces/conclusions.d.ts.map +1 -0
- package/resources/workspaces/conclusions.js +54 -0
- package/resources/workspaces/conclusions.js.map +1 -0
- package/resources/workspaces/conclusions.mjs +49 -0
- package/resources/workspaces/conclusions.mjs.map +1 -0
- package/resources/workspaces/index.d.ts +6 -5
- package/resources/workspaces/index.d.ts.map +1 -1
- package/resources/workspaces/index.js +6 -4
- package/resources/workspaces/index.js.map +1 -1
- package/resources/workspaces/index.mjs +2 -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/index.js.map +1 -1
- package/resources/workspaces/peers/index.mjs.map +1 -1
- package/resources/workspaces/peers/peers.d.ts +83 -152
- 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 +43 -58
- package/resources/workspaces/sessions/sessions.d.ts.map +1 -1
- package/resources/workspaces/sessions/sessions.js +21 -19
- package/resources/workspaces/sessions/sessions.js.map +1 -1
- package/resources/workspaces/sessions/sessions.mjs +21 -19
- 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 +73 -125
- package/resources/workspaces/workspaces.d.ts.map +1 -1
- package/resources/workspaces/workspaces.js +34 -25
- package/resources/workspaces/workspaces.js.map +1 -1
- package/resources/workspaces/workspaces.mjs +36 -27
- package/resources/workspaces/workspaces.mjs.map +1 -1
- package/src/index.ts +4 -17
- package/src/resources/index.ts +2 -5
- package/src/resources/workspaces/conclusions.ts +178 -0
- package/src/resources/workspaces/index.ts +18 -26
- package/src/resources/workspaces/peers/index.ts +4 -5
- package/src/resources/workspaces/peers/peers.ts +104 -182
- 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 +56 -72
- package/src/resources/workspaces/webhooks.ts +5 -5
- package/src/resources/workspaces/workspaces.ts +125 -209
- 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 -156
- package/resources/workspaces/observations.d.ts.map +0 -1
- package/resources/workspaces/observations.js +0 -58
- package/resources/workspaces/observations.js.map +0 -1
- package/resources/workspaces/observations.mjs +0 -53
- package/resources/workspaces/observations.mjs.map +0 -1
- package/src/resources/keys.ts +0 -51
- package/src/resources/workspaces/observations.ts +0 -238
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { PeersPage, Peers, type PagePeer, type PageSession, type Peer, type PeerCardResponse, type
|
|
1
|
+
export { PeersPage, Peers, type PagePeer, type PageSession, type Peer, type PeerCardResponse, type SessionGet, type PeerChatResponse, type PeerContextResponse, type PeerRepresentationResponse, type PeerSearchResponse, type PeerUpdateParams, type PeerListParams, type PeerCardParams, type PeerChatParams, type PeerContextParams, type PeerGetOrCreateParams, type PeerRepresentationParams, type PeerSearchParams, type PeerSetCardParams, } from "./peers.js";
|
|
2
2
|
export { Sessions, type SessionListParams } from "./sessions.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,SAAS,EACT,KAAK,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,IAAI,EACT,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oCAqBiB;AApBf,kGAAA,SAAS,OAAA;AACT,8FAAA,KAAK,OAAA;AAoBP,0CAA8D;AAArD,oGAAA,QAAQ,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,SAAS,EACT,KAAK,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,SAAS,EACT,KAAK,GAmBN;OACM,EAAE,QAAQ,EAA0B"}
|
|
@@ -8,11 +8,11 @@ import { Page, type PageParams } from "../../../pagination.js";
|
|
|
8
8
|
export declare class Peers extends APIResource {
|
|
9
9
|
sessions: SessionsAPI.Sessions;
|
|
10
10
|
/**
|
|
11
|
-
* Update a Peer's
|
|
11
|
+
* Update a Peer's metadata and/or configuration.
|
|
12
12
|
*/
|
|
13
13
|
update(workspaceId: string, peerId: string, body: PeerUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Peer>;
|
|
14
14
|
/**
|
|
15
|
-
* Get
|
|
15
|
+
* Get all Peers for a Workspace, paginated with optional filters.
|
|
16
16
|
*/
|
|
17
17
|
list(workspaceId: string, params?: PeerListParams, options?: Core.RequestOptions): Core.PagePromise<PeersPage, Peer>;
|
|
18
18
|
list(workspaceId: string, options?: Core.RequestOptions): Core.PagePromise<PeersPage, Peer>;
|
|
@@ -25,31 +25,44 @@ export declare class Peers extends APIResource {
|
|
|
25
25
|
card(workspaceId: string, peerId: string, query?: PeerCardParams, options?: Core.RequestOptions): Core.APIPromise<PeerCardResponse>;
|
|
26
26
|
card(workspaceId: string, peerId: string, options?: Core.RequestOptions): Core.APIPromise<PeerCardResponse>;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Query a Peer's representation using natural language. Performs agentic search
|
|
29
|
+
* and reasoning to comprehensively answer the query based on all latent knowledge
|
|
30
|
+
* gathered about the peer from their messages and conclusions.
|
|
29
31
|
*/
|
|
30
32
|
chat(workspaceId: string, peerId: string, body: PeerChatParams, options?: Core.RequestOptions): Core.APIPromise<PeerChatResponse>;
|
|
31
33
|
/**
|
|
32
34
|
* Get context for a peer, including their representation and peer card.
|
|
33
35
|
*
|
|
34
|
-
* This endpoint returns the
|
|
35
|
-
* target is specified, returns the context for the target from the
|
|
36
|
-
* perspective. If no target is specified, returns the peer's own
|
|
37
|
-
* (self-observation).
|
|
36
|
+
* This endpoint returns a curated subset of the representation and peer card for a
|
|
37
|
+
* peer. If a target is specified, returns the context for the target from the
|
|
38
|
+
* observer peer's perspective. If no target is specified, returns the peer's own
|
|
39
|
+
* context (self-observation).
|
|
38
40
|
*
|
|
39
41
|
* This is useful for getting all the context needed about a peer without making
|
|
40
42
|
* multiple API calls.
|
|
41
43
|
*/
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
context(workspaceId: string, peerId: string, query?: PeerContextParams, options?: Core.RequestOptions): Core.APIPromise<PeerContextResponse>;
|
|
45
|
+
context(workspaceId: string, peerId: string, options?: Core.RequestOptions): Core.APIPromise<PeerContextResponse>;
|
|
44
46
|
/**
|
|
45
|
-
* Get a Peer by ID
|
|
47
|
+
* Get a Peer by ID or create a new Peer with the given ID.
|
|
46
48
|
*
|
|
47
49
|
* If peer_id is provided as a query parameter, it uses that (must match JWT
|
|
48
50
|
* workspace_id). Otherwise, it uses the peer_id from the JWT.
|
|
49
51
|
*/
|
|
50
52
|
getOrCreate(workspaceId: string, body: PeerGetOrCreateParams, options?: Core.RequestOptions): Core.APIPromise<Peer>;
|
|
51
53
|
/**
|
|
52
|
-
*
|
|
54
|
+
* Get a curated subset of a Peer's Representation. A Representation is always a
|
|
55
|
+
* subset of the total knowledge about the Peer. The subset can be scoped and
|
|
56
|
+
* filtered in various ways.
|
|
57
|
+
*
|
|
58
|
+
* If a session_id is provided in the body, we get the Representation of the Peer
|
|
59
|
+
* scoped to that Session. If a target is provided, we get the Representation of
|
|
60
|
+
* the target from the perspective of the Peer. If no target is provided, we get
|
|
61
|
+
* the omniscient Honcho Representation of the Peer.
|
|
62
|
+
*/
|
|
63
|
+
representation(workspaceId: string, peerId: string, body: PeerRepresentationParams, options?: Core.RequestOptions): Core.APIPromise<PeerRepresentationResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Search a Peer's messages, optionally filtered by various criteria.
|
|
53
66
|
*/
|
|
54
67
|
search(workspaceId: string, peerId: string, body: PeerSearchParams, options?: Core.RequestOptions): Core.APIPromise<PeerSearchResponse>;
|
|
55
68
|
/**
|
|
@@ -59,15 +72,6 @@ export declare class Peers extends APIResource {
|
|
|
59
72
|
* is specified, sets the observer's own peer card.
|
|
60
73
|
*/
|
|
61
74
|
setCard(workspaceId: string, peerId: string, params: PeerSetCardParams, options?: Core.RequestOptions): Core.APIPromise<PeerCardResponse>;
|
|
62
|
-
/**
|
|
63
|
-
* Get a peer's working representation for a session.
|
|
64
|
-
*
|
|
65
|
-
* If a session_id is provided in the body, we get the working representation of
|
|
66
|
-
* the peer in that session. If a target is provided, we get the representation of
|
|
67
|
-
* the target from the perspective of the peer. If no target is provided, we get
|
|
68
|
-
* the omniscient Honcho representation of the peer.
|
|
69
|
-
*/
|
|
70
|
-
workingRepresentation(workspaceId: string, peerId: string, body: PeerWorkingRepresentationParams, options?: Core.RequestOptions): Core.APIPromise<PeerWorkingRepresentationResponse>;
|
|
71
75
|
}
|
|
72
76
|
export declare class PeersPage extends Page<Peer> {
|
|
73
77
|
}
|
|
@@ -102,68 +106,6 @@ export interface PeerCardResponse {
|
|
|
102
106
|
*/
|
|
103
107
|
peer_card?: Array<string> | null;
|
|
104
108
|
}
|
|
105
|
-
/**
|
|
106
|
-
* A Representation is a traversable and diffable map of observations. At the base,
|
|
107
|
-
* we have a list of explicit observations, derived from a peer's messages.
|
|
108
|
-
*
|
|
109
|
-
* From there, deductive observations can be made by establishing logical
|
|
110
|
-
* relationships between explicit observations.
|
|
111
|
-
*
|
|
112
|
-
* In the future, we can add more levels of reasoning on top of these.
|
|
113
|
-
*
|
|
114
|
-
* All of a peer's observations are stored as documents in a collection. These
|
|
115
|
-
* documents can be queried in various ways to produce this Representation object.
|
|
116
|
-
*
|
|
117
|
-
* Additionally, a "working representation" is a version of this data structure
|
|
118
|
-
* representing the most recent observations within a single session.
|
|
119
|
-
*
|
|
120
|
-
* A representation can have a maximum number of observations, which is applied
|
|
121
|
-
* individually to each level of reasoning. If a maximum is set, observations are
|
|
122
|
-
* added and removed in FIFO order.
|
|
123
|
-
*/
|
|
124
|
-
export interface Representation {
|
|
125
|
-
/**
|
|
126
|
-
* Conclusions that MUST be true given explicit facts and premises - strict logical
|
|
127
|
-
* necessities. Each deduction should have premises and a single conclusion.
|
|
128
|
-
*/
|
|
129
|
-
deductive?: Array<Representation.Deductive>;
|
|
130
|
-
/**
|
|
131
|
-
* Facts LITERALLY stated by the user - direct quotes or clear paraphrases only, no
|
|
132
|
-
* interpretation or inference. Example: ['The user is 25 years old', 'The user has
|
|
133
|
-
* a dog']
|
|
134
|
-
*/
|
|
135
|
-
explicit?: Array<Representation.Explicit>;
|
|
136
|
-
}
|
|
137
|
-
export declare namespace Representation {
|
|
138
|
-
/**
|
|
139
|
-
* Deductive observation with multiple premises and one conclusion, plus metadata.
|
|
140
|
-
*/
|
|
141
|
-
interface Deductive {
|
|
142
|
-
/**
|
|
143
|
-
* The deductive conclusion
|
|
144
|
-
*/
|
|
145
|
-
conclusion: string;
|
|
146
|
-
created_at: string;
|
|
147
|
-
message_ids: Array<number>;
|
|
148
|
-
session_name: string;
|
|
149
|
-
/**
|
|
150
|
-
* Supporting premises or evidence for this conclusion
|
|
151
|
-
*/
|
|
152
|
-
premises?: Array<string>;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Explicit observation with content and metadata.
|
|
156
|
-
*/
|
|
157
|
-
interface Explicit {
|
|
158
|
-
/**
|
|
159
|
-
* The explicit observation
|
|
160
|
-
*/
|
|
161
|
-
content: string;
|
|
162
|
-
created_at: string;
|
|
163
|
-
message_ids: Array<number>;
|
|
164
|
-
session_name: string;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
109
|
export interface SessionGet {
|
|
168
110
|
filters?: {
|
|
169
111
|
[key: string]: unknown;
|
|
@@ -175,7 +117,7 @@ export interface PeerChatResponse {
|
|
|
175
117
|
/**
|
|
176
118
|
* Context for a peer, including representation and peer card.
|
|
177
119
|
*/
|
|
178
|
-
export interface
|
|
120
|
+
export interface PeerContextResponse {
|
|
179
121
|
/**
|
|
180
122
|
* The ID of the peer
|
|
181
123
|
*/
|
|
@@ -189,30 +131,15 @@ export interface PeerGetContextResponse {
|
|
|
189
131
|
*/
|
|
190
132
|
peer_card?: Array<string> | null;
|
|
191
133
|
/**
|
|
192
|
-
* A
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* From there, deductive observations can be made by establishing logical
|
|
196
|
-
* relationships between explicit observations.
|
|
197
|
-
*
|
|
198
|
-
* In the future, we can add more levels of reasoning on top of these.
|
|
199
|
-
*
|
|
200
|
-
* All of a peer's observations are stored as documents in a collection. These
|
|
201
|
-
* documents can be queried in various ways to produce this Representation object.
|
|
202
|
-
*
|
|
203
|
-
* Additionally, a "working representation" is a version of this data structure
|
|
204
|
-
* representing the most recent observations within a single session.
|
|
205
|
-
*
|
|
206
|
-
* A representation can have a maximum number of observations, which is applied
|
|
207
|
-
* individually to each level of reasoning. If a maximum is set, observations are
|
|
208
|
-
* added and removed in FIFO order.
|
|
134
|
+
* A curated subset of the representation of the target peer from the observer's
|
|
135
|
+
* perspective
|
|
209
136
|
*/
|
|
210
|
-
representation?:
|
|
137
|
+
representation?: string | null;
|
|
138
|
+
}
|
|
139
|
+
export interface PeerRepresentationResponse {
|
|
140
|
+
representation: string;
|
|
211
141
|
}
|
|
212
142
|
export type PeerSearchResponse = Array<MessagesAPI.Message>;
|
|
213
|
-
export type PeerWorkingRepresentationResponse = {
|
|
214
|
-
[key: string]: unknown;
|
|
215
|
-
};
|
|
216
143
|
export interface PeerUpdateParams {
|
|
217
144
|
configuration?: {
|
|
218
145
|
[key: string]: unknown;
|
|
@@ -231,8 +158,8 @@ export interface PeerListParams extends PageParams {
|
|
|
231
158
|
}
|
|
232
159
|
export interface PeerCardParams {
|
|
233
160
|
/**
|
|
234
|
-
*
|
|
235
|
-
* card
|
|
161
|
+
* Optional target peer to retrieve a card for, from the observer's perspective. If
|
|
162
|
+
* not provided, returns the observer's own card
|
|
236
163
|
*/
|
|
237
164
|
target?: string | null;
|
|
238
165
|
}
|
|
@@ -241,6 +168,10 @@ export interface PeerChatParams {
|
|
|
241
168
|
* Dialectic API Prompt
|
|
242
169
|
*/
|
|
243
170
|
query: string;
|
|
171
|
+
/**
|
|
172
|
+
* Level of reasoning to apply: minimal, low, medium, high, or extra-high
|
|
173
|
+
*/
|
|
174
|
+
reasoning_level?: 'minimal' | 'low' | 'medium' | 'high' | 'extra-high';
|
|
244
175
|
/**
|
|
245
176
|
* ID of the session to scope the representation to
|
|
246
177
|
*/
|
|
@@ -251,18 +182,18 @@ export interface PeerChatParams {
|
|
|
251
182
|
*/
|
|
252
183
|
target?: string | null;
|
|
253
184
|
}
|
|
254
|
-
export interface
|
|
185
|
+
export interface PeerContextParams {
|
|
255
186
|
/**
|
|
256
|
-
* Whether to include the most
|
|
187
|
+
* Whether to include the most frequent conclusions in the representation
|
|
257
188
|
*/
|
|
258
|
-
|
|
189
|
+
include_most_frequent?: boolean;
|
|
259
190
|
/**
|
|
260
|
-
* Maximum number of
|
|
191
|
+
* Maximum number of conclusions to include in the representation
|
|
261
192
|
*/
|
|
262
|
-
|
|
193
|
+
max_conclusions?: number | null;
|
|
263
194
|
/**
|
|
264
195
|
* Only used if `search_query` is provided. Maximum distance for semantically
|
|
265
|
-
* relevant
|
|
196
|
+
* relevant conclusions
|
|
266
197
|
*/
|
|
267
198
|
search_max_distance?: number | null;
|
|
268
199
|
/**
|
|
@@ -271,12 +202,12 @@ export interface PeerGetContextParams {
|
|
|
271
202
|
search_query?: string | null;
|
|
272
203
|
/**
|
|
273
204
|
* Only used if `search_query` is provided. Number of semantic-search-retrieved
|
|
274
|
-
*
|
|
205
|
+
* conclusions to include
|
|
275
206
|
*/
|
|
276
207
|
search_top_k?: number | null;
|
|
277
208
|
/**
|
|
278
|
-
*
|
|
279
|
-
* context (self-observation)
|
|
209
|
+
* Optional target peer to get context for, from the observer's perspective. If not
|
|
210
|
+
* provided, returns the observer's own context (self-observation)
|
|
280
211
|
*/
|
|
281
212
|
target?: string | null;
|
|
282
213
|
}
|
|
@@ -289,47 +220,20 @@ export interface PeerGetOrCreateParams {
|
|
|
289
220
|
[key: string]: unknown;
|
|
290
221
|
} | null;
|
|
291
222
|
}
|
|
292
|
-
export interface
|
|
293
|
-
/**
|
|
294
|
-
* Search query
|
|
295
|
-
*/
|
|
296
|
-
query: string;
|
|
297
|
-
/**
|
|
298
|
-
* Filters to scope the search
|
|
299
|
-
*/
|
|
300
|
-
filters?: {
|
|
301
|
-
[key: string]: unknown;
|
|
302
|
-
} | null;
|
|
303
|
-
/**
|
|
304
|
-
* Number of results to return
|
|
305
|
-
*/
|
|
306
|
-
limit?: number;
|
|
307
|
-
}
|
|
308
|
-
export interface PeerSetCardParams {
|
|
309
|
-
/**
|
|
310
|
-
* Body param: The peer card content to set
|
|
311
|
-
*/
|
|
312
|
-
peer_card: Array<string>;
|
|
313
|
-
/**
|
|
314
|
-
* Query param: The peer whose card to set. If not provided, sets the observer's
|
|
315
|
-
* own card
|
|
316
|
-
*/
|
|
317
|
-
target?: string | null;
|
|
318
|
-
}
|
|
319
|
-
export interface PeerWorkingRepresentationParams {
|
|
223
|
+
export interface PeerRepresentationParams {
|
|
320
224
|
/**
|
|
321
|
-
* Only used if `search_query` is provided. Whether to include the most
|
|
322
|
-
*
|
|
225
|
+
* Only used if `search_query` is provided. Whether to include the most frequent
|
|
226
|
+
* conclusions in the representation
|
|
323
227
|
*/
|
|
324
|
-
|
|
228
|
+
include_most_frequent?: boolean | null;
|
|
325
229
|
/**
|
|
326
|
-
* Only used if `search_query` is provided. Maximum number of
|
|
230
|
+
* Only used if `search_query` is provided. Maximum number of conclusions to
|
|
327
231
|
* include in the representation
|
|
328
232
|
*/
|
|
329
|
-
|
|
233
|
+
max_conclusions?: number | null;
|
|
330
234
|
/**
|
|
331
235
|
* Only used if `search_query` is provided. Maximum distance to search for
|
|
332
|
-
* semantically relevant
|
|
236
|
+
* semantically relevant conclusions
|
|
333
237
|
*/
|
|
334
238
|
search_max_distance?: number | null;
|
|
335
239
|
/**
|
|
@@ -338,11 +242,11 @@ export interface PeerWorkingRepresentationParams {
|
|
|
338
242
|
search_query?: string | null;
|
|
339
243
|
/**
|
|
340
244
|
* Only used if `search_query` is provided. Number of semantic-search-retrieved
|
|
341
|
-
*
|
|
245
|
+
* conclusions to include in the representation
|
|
342
246
|
*/
|
|
343
247
|
search_top_k?: number | null;
|
|
344
248
|
/**
|
|
345
|
-
*
|
|
249
|
+
* Optional session ID within which to scope the representation
|
|
346
250
|
*/
|
|
347
251
|
session_id?: string | null;
|
|
348
252
|
/**
|
|
@@ -351,8 +255,35 @@ export interface PeerWorkingRepresentationParams {
|
|
|
351
255
|
*/
|
|
352
256
|
target?: string | null;
|
|
353
257
|
}
|
|
258
|
+
export interface PeerSearchParams {
|
|
259
|
+
/**
|
|
260
|
+
* Search query
|
|
261
|
+
*/
|
|
262
|
+
query: string;
|
|
263
|
+
/**
|
|
264
|
+
* Filters to scope the search
|
|
265
|
+
*/
|
|
266
|
+
filters?: {
|
|
267
|
+
[key: string]: unknown;
|
|
268
|
+
} | null;
|
|
269
|
+
/**
|
|
270
|
+
* Number of results to return
|
|
271
|
+
*/
|
|
272
|
+
limit?: number;
|
|
273
|
+
}
|
|
274
|
+
export interface PeerSetCardParams {
|
|
275
|
+
/**
|
|
276
|
+
* Body param: The peer card content to set
|
|
277
|
+
*/
|
|
278
|
+
peer_card: Array<string>;
|
|
279
|
+
/**
|
|
280
|
+
* Query param: Optional target peer to set a card for, from the observer's
|
|
281
|
+
* perspective. If not provided, sets the observer's own card
|
|
282
|
+
*/
|
|
283
|
+
target?: string | null;
|
|
284
|
+
}
|
|
354
285
|
export declare namespace Peers {
|
|
355
|
-
export { type PagePeer as PagePeer, type PageSession as PageSession, type Peer as Peer, type PeerCardResponse as PeerCardResponse, type
|
|
286
|
+
export { type PagePeer as PagePeer, type PageSession as PageSession, type Peer as Peer, type PeerCardResponse as PeerCardResponse, type SessionGet as SessionGet, type PeerChatResponse as PeerChatResponse, type PeerContextResponse as PeerContextResponse, type PeerRepresentationResponse as PeerRepresentationResponse, type PeerSearchResponse as PeerSearchResponse, PeersPage as PeersPage, type PeerUpdateParams as PeerUpdateParams, type PeerListParams as PeerListParams, type PeerCardParams as PeerCardParams, type PeerChatParams as PeerChatParams, type PeerContextParams as PeerContextParams, type PeerGetOrCreateParams as PeerGetOrCreateParams, type PeerRepresentationParams as PeerRepresentationParams, type PeerSearchParams as PeerSearchParams, type PeerSetCardParams as PeerSetCardParams, };
|
|
356
287
|
export { Sessions as Sessions, type SessionListParams as SessionListParams };
|
|
357
288
|
}
|
|
358
289
|
//# sourceMappingURL=peers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peers.d.ts","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/peers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,mBAAmB,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE5D,qBAAa,KAAM,SAAQ,WAAW;IACpC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IAExE;;OAEG;IACH,MAAM,CACJ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,c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C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,SAAS,IAAI,SAAS,EACtB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;IAEF,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,KAAK,iBAAiB,IAAI,iBAAiB,EAAE,CAAC;CAC9E"}
|
|
@@ -36,7 +36,7 @@ class Peers extends resource_1.APIResource {
|
|
|
36
36
|
this.sessions = new SessionsAPI.Sessions(this._client);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Update a Peer's
|
|
39
|
+
* Update a Peer's metadata and/or configuration.
|
|
40
40
|
*/
|
|
41
41
|
update(workspaceId, peerId, body, options) {
|
|
42
42
|
return this._client.put(`/v2/workspaces/${workspaceId}/peers/${peerId}`, { body, ...options });
|
|
@@ -60,19 +60,21 @@ class Peers extends resource_1.APIResource {
|
|
|
60
60
|
return this._client.get(`/v2/workspaces/${workspaceId}/peers/${peerId}/card`, { query, ...options });
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Query a Peer's representation using natural language. Performs agentic search
|
|
64
|
+
* and reasoning to comprehensively answer the query based on all latent knowledge
|
|
65
|
+
* gathered about the peer from their messages and conclusions.
|
|
64
66
|
*/
|
|
65
67
|
chat(workspaceId, peerId, body, options) {
|
|
66
68
|
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/chat`, { body, ...options });
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
context(workspaceId, peerId, query = {}, options) {
|
|
69
71
|
if ((0, core_1.isRequestOptions)(query)) {
|
|
70
|
-
return this.
|
|
72
|
+
return this.context(workspaceId, peerId, {}, query);
|
|
71
73
|
}
|
|
72
74
|
return this._client.get(`/v2/workspaces/${workspaceId}/peers/${peerId}/context`, { query, ...options });
|
|
73
75
|
}
|
|
74
76
|
/**
|
|
75
|
-
* Get a Peer by ID
|
|
77
|
+
* Get a Peer by ID or create a new Peer with the given ID.
|
|
76
78
|
*
|
|
77
79
|
* If peer_id is provided as a query parameter, it uses that (must match JWT
|
|
78
80
|
* workspace_id). Otherwise, it uses the peer_id from the JWT.
|
|
@@ -81,7 +83,23 @@ class Peers extends resource_1.APIResource {
|
|
|
81
83
|
return this._client.post(`/v2/workspaces/${workspaceId}/peers`, { body, ...options });
|
|
82
84
|
}
|
|
83
85
|
/**
|
|
84
|
-
*
|
|
86
|
+
* Get a curated subset of a Peer's Representation. A Representation is always a
|
|
87
|
+
* subset of the total knowledge about the Peer. The subset can be scoped and
|
|
88
|
+
* filtered in various ways.
|
|
89
|
+
*
|
|
90
|
+
* If a session_id is provided in the body, we get the Representation of the Peer
|
|
91
|
+
* scoped to that Session. If a target is provided, we get the Representation of
|
|
92
|
+
* the target from the perspective of the Peer. If no target is provided, we get
|
|
93
|
+
* the omniscient Honcho Representation of the Peer.
|
|
94
|
+
*/
|
|
95
|
+
representation(workspaceId, peerId, body, options) {
|
|
96
|
+
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/representation`, {
|
|
97
|
+
body,
|
|
98
|
+
...options,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Search a Peer's messages, optionally filtered by various criteria.
|
|
85
103
|
*/
|
|
86
104
|
search(workspaceId, peerId, body, options) {
|
|
87
105
|
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/search`, { body, ...options });
|
|
@@ -100,20 +118,6 @@ class Peers extends resource_1.APIResource {
|
|
|
100
118
|
...options,
|
|
101
119
|
});
|
|
102
120
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Get a peer's working representation for a session.
|
|
105
|
-
*
|
|
106
|
-
* If a session_id is provided in the body, we get the working representation of
|
|
107
|
-
* the peer in that session. If a target is provided, we get the representation of
|
|
108
|
-
* the target from the perspective of the peer. If no target is provided, we get
|
|
109
|
-
* the omniscient Honcho representation of the peer.
|
|
110
|
-
*/
|
|
111
|
-
workingRepresentation(workspaceId, peerId, body, options) {
|
|
112
|
-
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/representation`, {
|
|
113
|
-
body,
|
|
114
|
-
...options,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
121
|
}
|
|
118
122
|
exports.Peers = Peers;
|
|
119
123
|
class PeersPage extends pagination_1.Page {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peers.js","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/peers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,mDAAgD;AAChD,2CAAiD;AAEjD,2DAA0C;AAC1C,4CAAyD;AAGzD,uDAA4D;AAE5D,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"peers.js","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/peers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,mDAAgD;AAChD,2CAAiD;AAEjD,2DAA0C;AAC1C,4CAAyD;AAGzD,uDAA4D;AAE5D,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoL1E,CAAC;IAlL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,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,WAAW,UAAU,MAAM,OAAO,EAAE;YAC5E,KAAK,EAAE,EAAE,MAAM,EAAE;YACjB,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AArLD,sBAqLC;AAED,MAAa,SAAU,SAAQ,iBAAU;CAAG;AAA5C,8BAA4C;AAqP5C,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAC5B,KAAK,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
|
@@ -10,7 +10,7 @@ export class Peers extends APIResource {
|
|
|
10
10
|
this.sessions = new SessionsAPI.Sessions(this._client);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Update a Peer's
|
|
13
|
+
* Update a Peer's metadata and/or configuration.
|
|
14
14
|
*/
|
|
15
15
|
update(workspaceId, peerId, body, options) {
|
|
16
16
|
return this._client.put(`/v2/workspaces/${workspaceId}/peers/${peerId}`, { body, ...options });
|
|
@@ -34,19 +34,21 @@ export class Peers extends APIResource {
|
|
|
34
34
|
return this._client.get(`/v2/workspaces/${workspaceId}/peers/${peerId}/card`, { query, ...options });
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Query a Peer's representation using natural language. Performs agentic search
|
|
38
|
+
* and reasoning to comprehensively answer the query based on all latent knowledge
|
|
39
|
+
* gathered about the peer from their messages and conclusions.
|
|
38
40
|
*/
|
|
39
41
|
chat(workspaceId, peerId, body, options) {
|
|
40
42
|
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/chat`, { body, ...options });
|
|
41
43
|
}
|
|
42
|
-
|
|
44
|
+
context(workspaceId, peerId, query = {}, options) {
|
|
43
45
|
if (isRequestOptions(query)) {
|
|
44
|
-
return this.
|
|
46
|
+
return this.context(workspaceId, peerId, {}, query);
|
|
45
47
|
}
|
|
46
48
|
return this._client.get(`/v2/workspaces/${workspaceId}/peers/${peerId}/context`, { query, ...options });
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
|
-
* Get a Peer by ID
|
|
51
|
+
* Get a Peer by ID or create a new Peer with the given ID.
|
|
50
52
|
*
|
|
51
53
|
* If peer_id is provided as a query parameter, it uses that (must match JWT
|
|
52
54
|
* workspace_id). Otherwise, it uses the peer_id from the JWT.
|
|
@@ -55,7 +57,23 @@ export class Peers extends APIResource {
|
|
|
55
57
|
return this._client.post(`/v2/workspaces/${workspaceId}/peers`, { body, ...options });
|
|
56
58
|
}
|
|
57
59
|
/**
|
|
58
|
-
*
|
|
60
|
+
* Get a curated subset of a Peer's Representation. A Representation is always a
|
|
61
|
+
* subset of the total knowledge about the Peer. The subset can be scoped and
|
|
62
|
+
* filtered in various ways.
|
|
63
|
+
*
|
|
64
|
+
* If a session_id is provided in the body, we get the Representation of the Peer
|
|
65
|
+
* scoped to that Session. If a target is provided, we get the Representation of
|
|
66
|
+
* the target from the perspective of the Peer. If no target is provided, we get
|
|
67
|
+
* the omniscient Honcho Representation of the Peer.
|
|
68
|
+
*/
|
|
69
|
+
representation(workspaceId, peerId, body, options) {
|
|
70
|
+
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/representation`, {
|
|
71
|
+
body,
|
|
72
|
+
...options,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Search a Peer's messages, optionally filtered by various criteria.
|
|
59
77
|
*/
|
|
60
78
|
search(workspaceId, peerId, body, options) {
|
|
61
79
|
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/search`, { body, ...options });
|
|
@@ -74,20 +92,6 @@ export class Peers extends APIResource {
|
|
|
74
92
|
...options,
|
|
75
93
|
});
|
|
76
94
|
}
|
|
77
|
-
/**
|
|
78
|
-
* Get a peer's working representation for a session.
|
|
79
|
-
*
|
|
80
|
-
* If a session_id is provided in the body, we get the working representation of
|
|
81
|
-
* the peer in that session. If a target is provided, we get the representation of
|
|
82
|
-
* the target from the perspective of the peer. If no target is provided, we get
|
|
83
|
-
* the omniscient Honcho representation of the peer.
|
|
84
|
-
*/
|
|
85
|
-
workingRepresentation(workspaceId, peerId, body, options) {
|
|
86
|
-
return this._client.post(`/v2/workspaces/${workspaceId}/peers/${peerId}/representation`, {
|
|
87
|
-
body,
|
|
88
|
-
...options,
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
95
|
}
|
|
92
96
|
export class PeersPage extends Page {
|
|
93
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peers.mjs","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/peers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,WAAW;OAChB,EAAqB,QAAQ,EAAE;OAG/B,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"peers.mjs","sourceRoot":"","sources":["../../../src/resources/workspaces/peers/peers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,WAAW;OAChB,EAAqB,QAAQ,EAAE;OAG/B,EAAE,IAAI,EAAmB;AAEhC,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAoL1E,CAAC;IAlLC;;OAEG;IACH,MAAM,CACJ,WAAmB,EACnB,MAAc,EACd,IAAsB,EACtB,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,WAAW,UAAU,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,C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qP5C,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;AAC5B,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { SessionsPage } from "../sessions/sessions.js";
|
|
|
5
5
|
import { type PageParams } from "../../../pagination.js";
|
|
6
6
|
export declare class Sessions extends APIResource {
|
|
7
7
|
/**
|
|
8
|
-
* Get
|
|
8
|
+
* Get all Sessions for a Peer, paginated with optional filters.
|
|
9
9
|
*/
|
|
10
10
|
list(workspaceId: string, peerId: string, params?: SessionListParams, options?: Core.RequestOptions): Core.PagePromise<SessionsPage, SessionsSessionsAPI.Session>;
|
|
11
11
|
list(workspaceId: string, peerId: string, options?: Core.RequestOptions): Core.PagePromise<SessionsPage, SessionsSessionsAPI.Session>;
|