@honcho-ai/core 1.7.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/index.d.mts +2 -2
  3. package/index.d.ts +2 -2
  4. package/index.d.ts.map +1 -1
  5. package/index.js.map +1 -1
  6. package/index.mjs.map +1 -1
  7. package/package.json +1 -1
  8. package/resources/index.d.ts +1 -1
  9. package/resources/index.d.ts.map +1 -1
  10. package/resources/index.js.map +1 -1
  11. package/resources/index.mjs.map +1 -1
  12. package/resources/workspaces/index.d.ts +2 -3
  13. package/resources/workspaces/index.d.ts.map +1 -1
  14. package/resources/workspaces/index.js +1 -4
  15. package/resources/workspaces/index.js.map +1 -1
  16. package/resources/workspaces/index.mjs +0 -1
  17. package/resources/workspaces/index.mjs.map +1 -1
  18. package/resources/workspaces/observations.d.ts +9 -19
  19. package/resources/workspaces/observations.d.ts.map +1 -1
  20. package/resources/workspaces/observations.js +0 -6
  21. package/resources/workspaces/observations.js.map +1 -1
  22. package/resources/workspaces/observations.mjs +0 -6
  23. package/resources/workspaces/observations.mjs.map +1 -1
  24. package/resources/workspaces/peers/index.d.ts +1 -1
  25. package/resources/workspaces/peers/index.d.ts.map +1 -1
  26. package/resources/workspaces/peers/index.js.map +1 -1
  27. package/resources/workspaces/peers/index.mjs.map +1 -1
  28. package/resources/workspaces/peers/peers.d.ts +64 -66
  29. package/resources/workspaces/peers/peers.d.ts.map +1 -1
  30. package/resources/workspaces/peers/peers.js.map +1 -1
  31. package/resources/workspaces/peers/peers.mjs.map +1 -1
  32. package/resources/workspaces/sessions/sessions.d.ts +5 -68
  33. package/resources/workspaces/sessions/sessions.d.ts.map +1 -1
  34. package/resources/workspaces/sessions/sessions.js +2 -2
  35. package/resources/workspaces/sessions/sessions.js.map +1 -1
  36. package/resources/workspaces/sessions/sessions.mjs +2 -2
  37. package/resources/workspaces/sessions/sessions.mjs.map +1 -1
  38. package/resources/workspaces/workspaces.d.ts +5 -90
  39. package/resources/workspaces/workspaces.d.ts.map +1 -1
  40. package/resources/workspaces/workspaces.js +0 -11
  41. package/resources/workspaces/workspaces.js.map +1 -1
  42. package/resources/workspaces/workspaces.mjs +0 -11
  43. package/resources/workspaces/workspaces.mjs.map +1 -1
  44. package/src/index.ts +0 -4
  45. package/src/resources/index.ts +0 -2
  46. package/src/resources/workspaces/index.ts +1 -17
  47. package/src/resources/workspaces/observations.ts +9 -20
  48. package/src/resources/workspaces/peers/index.ts +1 -0
  49. package/src/resources/workspaces/peers/peers.ts +75 -76
  50. package/src/resources/workspaces/sessions/sessions.ts +5 -79
  51. package/src/resources/workspaces/workspaces.ts +4 -146
  52. package/src/version.ts +1 -1
  53. package/version.d.ts +1 -1
  54. package/version.js +1 -1
  55. package/version.mjs +1 -1
  56. package/resources/workspaces/conclusions.d.ts +0 -142
  57. package/resources/workspaces/conclusions.d.ts.map +0 -1
  58. package/resources/workspaces/conclusions.js +0 -47
  59. package/resources/workspaces/conclusions.js.map +0 -1
  60. package/resources/workspaces/conclusions.mjs +0 -42
  61. package/resources/workspaces/conclusions.mjs.map +0 -1
  62. package/src/resources/workspaces/conclusions.ts +0 -220
@@ -9,7 +9,6 @@ export {
9
9
  type DreamConfiguration,
10
10
  type MessageSearchOptions,
11
11
  type PeerCardConfiguration,
12
- type QueueStatus,
13
12
  type SummaryConfiguration,
14
13
  type Workspace,
15
14
  type WorkspaceConfiguration,
@@ -18,7 +17,6 @@ export {
18
17
  type WorkspaceListParams,
19
18
  type WorkspaceDeriverStatusParams,
20
19
  type WorkspaceGetOrCreateParams,
21
- type WorkspaceQueueStatusParams,
22
20
  type WorkspaceSearchParams,
23
21
  type WorkspaceTriggerDreamParams,
24
22
  } from "./workspaces/workspaces.js";
@@ -1,20 +1,5 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- export {
4
- ConclusionsPage,
5
- Conclusions,
6
- type Conclusion,
7
- type ConclusionCreate,
8
- type ConclusionGet,
9
- type ConclusionQuery,
10
- type PageConclusion,
11
- type ConclusionCreateResponse,
12
- type ConclusionDeleteResponse,
13
- type ConclusionQueryResponse,
14
- type ConclusionCreateParams,
15
- type ConclusionListParams,
16
- type ConclusionQueryParams,
17
- } from "./conclusions.js";
18
3
  export {
19
4
  ObservationsPage,
20
5
  Observations,
@@ -37,6 +22,7 @@ export {
37
22
  type PageSession,
38
23
  type Peer,
39
24
  type PeerCardResponse,
25
+ type Representation,
40
26
  type SessionGet,
41
27
  type PeerChatResponse,
42
28
  type PeerGetContextResponse,
@@ -86,7 +72,6 @@ export {
86
72
  type DreamConfiguration,
87
73
  type MessageSearchOptions,
88
74
  type PeerCardConfiguration,
89
- type QueueStatus,
90
75
  type SummaryConfiguration,
91
76
  type Workspace,
92
77
  type WorkspaceConfiguration,
@@ -95,7 +80,6 @@ export {
95
80
  type WorkspaceListParams,
96
81
  type WorkspaceDeriverStatusParams,
97
82
  type WorkspaceGetOrCreateParams,
98
- type WorkspaceQueueStatusParams,
99
83
  type WorkspaceSearchParams,
100
84
  type WorkspaceTriggerDreamParams,
101
85
  } from "./workspaces.js";
@@ -3,7 +3,6 @@
3
3
  import { APIResource } from "../../resource.js";
4
4
  import { isRequestOptions } from "../../core.js";
5
5
  import * as Core from "../../core.js";
6
- import * as ConclusionsAPI from "./conclusions.js";
7
6
  import { Page, type PageParams } from "../../pagination.js";
8
7
 
9
8
  export class Observations extends APIResource {
@@ -15,8 +14,6 @@ export class Observations extends APIResource {
15
14
  * the workspace. Embeddings are automatically generated for semantic search.
16
15
  *
17
16
  * Maximum of 100 observations per request.
18
- *
19
- * @deprecated
20
17
  */
21
18
  create(
22
19
  workspaceId: string,
@@ -32,8 +29,6 @@ export class Observations extends APIResource {
32
29
  *
33
30
  * Observations can be filtered by session_id, observer_id and observed_id using
34
31
  * the filters parameter.
35
- *
36
- * @deprecated
37
32
  */
38
33
  list(
39
34
  workspaceId: string,
@@ -63,8 +58,6 @@ export class Observations extends APIResource {
63
58
  *
64
59
  * This permanently deletes the observation (document) from the theory-of-mind
65
60
  * system. This action cannot be undone.
66
- *
67
- * @deprecated
68
61
  */
69
62
  delete(
70
63
  workspaceId: string,
@@ -80,8 +73,6 @@ export class Observations extends APIResource {
80
73
  * Performs vector similarity search on observations to find semantically relevant
81
74
  * results. Observer and observed are required for semantic search and must be
82
75
  * provided in filters.
83
- *
84
- * @deprecated
85
76
  */
86
77
  query(
87
78
  workspaceId: string,
@@ -95,7 +86,7 @@ export class Observations extends APIResource {
95
86
  export class ObservationsPage extends Page<Observation> {}
96
87
 
97
88
  /**
98
- * Deprecated: use Conclusion.
89
+ * Observation response - external view of a document
99
90
  */
100
91
  export interface Observation {
101
92
  id: string;
@@ -105,12 +96,12 @@ export interface Observation {
105
96
  created_at: string;
106
97
 
107
98
  /**
108
- * The peer the conclusion is about
99
+ * The peer being observed
109
100
  */
110
101
  observed_id: string;
111
102
 
112
103
  /**
113
- * The peer who made the conclusion
104
+ * The peer who made the observation
114
105
  */
115
106
  observer_id: string;
116
107
 
@@ -118,36 +109,36 @@ export interface Observation {
118
109
  }
119
110
 
120
111
  /**
121
- * Deprecated: use ConclusionCreate.
112
+ * Schema for creating a single observation
122
113
  */
123
114
  export interface ObservationCreate {
124
115
  content: string;
125
116
 
126
117
  /**
127
- * The peer the conclusion is about
118
+ * The peer being observed
128
119
  */
129
120
  observed_id: string;
130
121
 
131
122
  /**
132
- * The peer making the conclusion
123
+ * The peer making the observation
133
124
  */
134
125
  observer_id: string;
135
126
 
136
127
  /**
137
- * The session this conclusion relates to
128
+ * The session this observation relates to
138
129
  */
139
130
  session_id: string;
140
131
  }
141
132
 
142
133
  /**
143
- * Deprecated: use ConclusionGet.
134
+ * Schema for listing observations with optional filters
144
135
  */
145
136
  export interface ObservationGet {
146
137
  filters?: { [key: string]: unknown } | null;
147
138
  }
148
139
 
149
140
  /**
150
- * Deprecated: use ConclusionQuery.
141
+ * Query parameters for semantic search of observations
151
142
  */
152
143
  export interface ObservationQuery {
153
144
  /**
@@ -190,8 +181,6 @@ export type ObservationDeleteResponse = unknown;
190
181
  export type ObservationQueryResponse = Array<Observation>;
191
182
 
192
183
  export interface ObservationCreateParams {
193
- conclusions: Array<ConclusionsAPI.ConclusionCreate>;
194
-
195
184
  observations: Array<ObservationCreate>;
196
185
  }
197
186
 
@@ -7,6 +7,7 @@ export {
7
7
  type PageSession,
8
8
  type Peer,
9
9
  type PeerCardResponse,
10
+ type Representation,
10
11
  type SessionGet,
11
12
  type PeerChatResponse,
12
13
  type PeerGetContextResponse,
@@ -233,6 +233,79 @@ export interface PeerCardResponse {
233
233
  peer_card?: Array<string> | null;
234
234
  }
235
235
 
236
+ /**
237
+ * A Representation is a traversable and diffable map of observations. At the base,
238
+ * we have a list of explicit observations, derived from a peer's messages.
239
+ *
240
+ * From there, deductive observations can be made by establishing logical
241
+ * relationships between explicit observations.
242
+ *
243
+ * In the future, we can add more levels of reasoning on top of these.
244
+ *
245
+ * All of a peer's observations are stored as documents in a collection. These
246
+ * documents can be queried in various ways to produce this Representation object.
247
+ *
248
+ * Additionally, a "working representation" is a version of this data structure
249
+ * representing the most recent observations within a single session.
250
+ *
251
+ * A representation can have a maximum number of observations, which is applied
252
+ * individually to each level of reasoning. If a maximum is set, observations are
253
+ * added and removed in FIFO order.
254
+ */
255
+ export interface Representation {
256
+ /**
257
+ * Conclusions that MUST be true given explicit facts and premises - strict logical
258
+ * necessities. Each deduction should have premises and a single conclusion.
259
+ */
260
+ deductive?: Array<Representation.Deductive>;
261
+
262
+ /**
263
+ * Facts LITERALLY stated by the user - direct quotes or clear paraphrases only, no
264
+ * interpretation or inference. Example: ['The user is 25 years old', 'The user has
265
+ * a dog']
266
+ */
267
+ explicit?: Array<Representation.Explicit>;
268
+ }
269
+
270
+ export namespace Representation {
271
+ /**
272
+ * Deductive observation with multiple premises and one conclusion, plus metadata.
273
+ */
274
+ export interface Deductive {
275
+ /**
276
+ * The deductive conclusion
277
+ */
278
+ conclusion: string;
279
+
280
+ created_at: string;
281
+
282
+ message_ids: Array<number>;
283
+
284
+ session_name: string;
285
+
286
+ /**
287
+ * Supporting premises or evidence for this conclusion
288
+ */
289
+ premises?: Array<string>;
290
+ }
291
+
292
+ /**
293
+ * Explicit observation with content and metadata.
294
+ */
295
+ export interface Explicit {
296
+ /**
297
+ * The explicit observation
298
+ */
299
+ content: string;
300
+
301
+ created_at: string;
302
+
303
+ message_ids: Array<number>;
304
+
305
+ session_name: string;
306
+ }
307
+ }
308
+
236
309
  export interface SessionGet {
237
310
  filters?: { [key: string]: unknown } | null;
238
311
  }
@@ -279,82 +352,7 @@ export interface PeerGetContextResponse {
279
352
  * individually to each level of reasoning. If a maximum is set, observations are
280
353
  * added and removed in FIFO order.
281
354
  */
282
- representation?: PeerGetContextResponse.Representation | null;
283
- }
284
-
285
- export namespace PeerGetContextResponse {
286
- /**
287
- * A Representation is a traversable and diffable map of observations. At the base,
288
- * we have a list of explicit observations, derived from a peer's messages.
289
- *
290
- * From there, deductive observations can be made by establishing logical
291
- * relationships between explicit observations.
292
- *
293
- * In the future, we can add more levels of reasoning on top of these.
294
- *
295
- * All of a peer's observations are stored as documents in a collection. These
296
- * documents can be queried in various ways to produce this Representation object.
297
- *
298
- * Additionally, a "working representation" is a version of this data structure
299
- * representing the most recent observations within a single session.
300
- *
301
- * A representation can have a maximum number of observations, which is applied
302
- * individually to each level of reasoning. If a maximum is set, observations are
303
- * added and removed in FIFO order.
304
- */
305
- export interface Representation {
306
- /**
307
- * Conclusions that MUST be true given explicit facts and premises - strict logical
308
- * necessities. Each deduction should have premises and a single conclusion.
309
- */
310
- deductive?: Array<Representation.Deductive>;
311
-
312
- /**
313
- * Facts LITERALLY stated by the user - direct quotes or clear paraphrases only, no
314
- * interpretation or inference. Example: ['The user is 25 years old', 'The user has
315
- * a dog']
316
- */
317
- explicit?: Array<Representation.Explicit>;
318
- }
319
-
320
- export namespace Representation {
321
- /**
322
- * Deductive observation with multiple premises and one conclusion, plus metadata.
323
- */
324
- export interface Deductive {
325
- /**
326
- * The deductive conclusion
327
- */
328
- conclusion: string;
329
-
330
- created_at: string;
331
-
332
- message_ids: Array<number>;
333
-
334
- session_name: string;
335
-
336
- /**
337
- * Supporting premises or evidence for this conclusion
338
- */
339
- premises?: Array<string>;
340
- }
341
-
342
- /**
343
- * Explicit observation with content and metadata.
344
- */
345
- export interface Explicit {
346
- /**
347
- * The explicit observation
348
- */
349
- content: string;
350
-
351
- created_at: string;
352
-
353
- message_ids: Array<number>;
354
-
355
- session_name: string;
356
- }
357
- }
355
+ representation?: Representation | null;
358
356
  }
359
357
 
360
358
  export type PeerSearchResponse = Array<MessagesAPI.Message>;
@@ -525,6 +523,7 @@ export declare namespace Peers {
525
523
  type PageSession as PageSession,
526
524
  type Peer as Peer,
527
525
  type PeerCardResponse as PeerCardResponse,
526
+ type Representation as Representation,
528
527
  type SessionGet as SessionGet,
529
528
  type PeerChatResponse as PeerChatResponse,
530
529
  type PeerGetContextResponse as PeerGetContextResponse,
@@ -4,6 +4,7 @@ import { APIResource } from "../../../resource.js";
4
4
  import { isRequestOptions } from "../../../core.js";
5
5
  import * as Core from "../../../core.js";
6
6
  import * as WorkspacesAPI from "../workspaces.js";
7
+ import * as PeersAPI from "../peers/peers.js";
7
8
  import * as MessagesAPI from "./messages.js";
8
9
  import {
9
10
  Message,
@@ -17,7 +18,7 @@ import {
17
18
  Messages,
18
19
  MessagesPage,
19
20
  } from "./messages.js";
20
- import * as PeersAPI from "./peers.js";
21
+ import * as SessionsPeersAPI from "./peers.js";
21
22
  import {
22
23
  PeerAddParams,
23
24
  PeerListParams,
@@ -32,7 +33,7 @@ import { Page, type PageParams } from "../../../pagination.js";
32
33
 
33
34
  export class Sessions extends APIResource {
34
35
  messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
35
- peers: PeersAPI.Peers = new PeersAPI.Peers(this._client);
36
+ peers: SessionsPeersAPI.Peers = new SessionsPeersAPI.Peers(this._client);
36
37
 
37
38
  /**
38
39
  * Update the metadata of a Session
@@ -294,7 +295,7 @@ export interface SessionGetContextResponse {
294
295
  * individually to each level of reasoning. If a maximum is set, observations are
295
296
  * added and removed in FIFO order.
296
297
  */
297
- peer_representation?: SessionGetContextResponse.PeerRepresentation | null;
298
+ peer_representation?: PeersAPI.Representation | null;
298
299
 
299
300
  /**
300
301
  * The summary if available
@@ -302,81 +303,6 @@ export interface SessionGetContextResponse {
302
303
  summary?: Summary | null;
303
304
  }
304
305
 
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
306
  export type SessionSearchResponse = Array<MessagesAPI.Message>;
381
307
 
382
308
  export interface SessionSummariesResponse {
@@ -496,7 +422,7 @@ export interface SessionGetOrCreateParams {
496
422
 
497
423
  metadata?: { [key: string]: unknown } | null;
498
424
 
499
- peers?: { [key: string]: PeersAPI.SessionPeerConfig } | null;
425
+ peers?: { [key: string]: SessionsPeersAPI.SessionPeerConfig } | null;
500
426
  }
501
427
 
502
428
  export interface SessionSearchParams {