@acontext/acontext 0.0.12 → 0.0.13

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.
@@ -4,7 +4,7 @@
4
4
  import { RequesterProtocol } from '../client-types';
5
5
  import { AcontextMessage } from '../messages';
6
6
  import { FileUpload } from '../uploads';
7
- import { EditStrategy, GetMessagesOutput, GetTasksOutput, LearningStatus, ListSessionsOutput, Message, Session, TokenCounts } from '../types';
7
+ import { EditStrategy, GetMessagesOutput, GetTasksOutput, LearningStatus, ListSessionsOutput, Message, MessageObservingStatus, Session, TokenCounts } from '../types';
8
8
  export type MessageBlob = AcontextMessage | Record<string, unknown>;
9
9
  export declare class SessionsAPI {
10
10
  private requester;
@@ -84,4 +84,15 @@ export declare class SessionsAPI {
84
84
  * @returns TokenCounts object containing total_tokens.
85
85
  */
86
86
  getTokenCounts(sessionId: string): Promise<TokenCounts>;
87
+ /**
88
+ * Get message observing status counts for a session.
89
+ *
90
+ * Returns the count of messages by their observing status:
91
+ * observed, in_process, and pending.
92
+ *
93
+ * @param sessionId - The UUID of the session.
94
+ * @returns MessageObservingStatus object containing observed, in_process,
95
+ * pending counts and updated_at timestamp.
96
+ */
97
+ messagesObservingStatus(sessionId: string): Promise<MessageObservingStatus>;
87
98
  }
@@ -180,5 +180,19 @@ class SessionsAPI {
180
180
  const data = await this.requester.request('GET', `/session/${sessionId}/token_counts`);
181
181
  return types_1.TokenCountsSchema.parse(data);
182
182
  }
183
+ /**
184
+ * Get message observing status counts for a session.
185
+ *
186
+ * Returns the count of messages by their observing status:
187
+ * observed, in_process, and pending.
188
+ *
189
+ * @param sessionId - The UUID of the session.
190
+ * @returns MessageObservingStatus object containing observed, in_process,
191
+ * pending counts and updated_at timestamp.
192
+ */
193
+ async messagesObservingStatus(sessionId) {
194
+ const data = await this.requester.request('GET', `/session/${sessionId}/observing_status`);
195
+ return types_1.MessageObservingStatusSchema.parse(data);
196
+ }
183
197
  }
184
198
  exports.SessionsAPI = SessionsAPI;
@@ -153,6 +153,13 @@ export declare const TokenCountsSchema: z.ZodObject<{
153
153
  total_tokens: z.ZodNumber;
154
154
  }, z.core.$strip>;
155
155
  export type TokenCounts = z.infer<typeof TokenCountsSchema>;
156
+ export declare const MessageObservingStatusSchema: z.ZodObject<{
157
+ observed: z.ZodNumber;
158
+ in_process: z.ZodNumber;
159
+ pending: z.ZodNumber;
160
+ updated_at: z.ZodString;
161
+ }, z.core.$strip>;
162
+ export type MessageObservingStatus = z.infer<typeof MessageObservingStatusSchema>;
156
163
  /**
157
164
  * Parameters for the remove_tool_result edit strategy.
158
165
  */
@@ -3,7 +3,7 @@
3
3
  * Type definitions for session, message, and task resources.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.EditStrategySchema = exports.TokenLimitStrategySchema = exports.TokenLimitParamsSchema = exports.RemoveToolResultStrategySchema = exports.RemoveToolCallParamsStrategySchema = exports.RemoveToolCallParamsParamsSchema = exports.RemoveToolResultParamsSchema = exports.TokenCountsSchema = exports.LearningStatusSchema = exports.GetTasksOutputSchema = exports.GetMessagesOutputSchema = exports.PublicURLSchema = exports.ListSessionsOutputSchema = exports.TaskSchema = exports.TaskDataSchema = exports.SessionSchema = exports.MessageSchema = exports.PartSchema = exports.AssetSchema = void 0;
6
+ exports.EditStrategySchema = exports.TokenLimitStrategySchema = exports.TokenLimitParamsSchema = exports.RemoveToolResultStrategySchema = exports.RemoveToolCallParamsStrategySchema = exports.RemoveToolCallParamsParamsSchema = exports.RemoveToolResultParamsSchema = exports.MessageObservingStatusSchema = exports.TokenCountsSchema = exports.LearningStatusSchema = exports.GetTasksOutputSchema = exports.GetMessagesOutputSchema = exports.PublicURLSchema = exports.ListSessionsOutputSchema = exports.TaskSchema = exports.TaskDataSchema = exports.SessionSchema = exports.MessageSchema = exports.PartSchema = exports.AssetSchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  exports.AssetSchema = zod_1.z.object({
9
9
  bucket: zod_1.z.string(),
@@ -92,6 +92,12 @@ exports.LearningStatusSchema = zod_1.z.object({
92
92
  exports.TokenCountsSchema = zod_1.z.object({
93
93
  total_tokens: zod_1.z.number(),
94
94
  });
95
+ exports.MessageObservingStatusSchema = zod_1.z.object({
96
+ observed: zod_1.z.number(),
97
+ in_process: zod_1.z.number(),
98
+ pending: zod_1.z.number(),
99
+ updated_at: zod_1.z.string(),
100
+ });
95
101
  /**
96
102
  * Parameters for the remove_tool_result edit strategy.
97
103
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acontext/acontext",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "TypeScript SDK for the Acontext API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",