@xpert-ai/xpert-sdk 0.1.0 → 0.1.1

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/dist/client.d.ts CHANGED
@@ -253,11 +253,11 @@ export declare class ThreadsClient<TStateType = DefaultValues, TUpdateType = TSt
253
253
  */
254
254
  get<ValuesType = TStateType>(threadId: string): Promise<Thread<ValuesType>>;
255
255
  /**
256
- * Get latest-run context usage for a agent in thread.
256
+ * Get the last measured context usage for an agent in a thread.
257
257
  *
258
258
  * @param threadId ID of the thread.
259
259
  * @param options.agentKey Agent key for usage filtering.
260
- * @returns Context usage summary for the latest run tree.
260
+ * @returns Usage and freshness; run_id and updated_at identify the measurement.
261
261
  */
262
262
  getContextUsage(threadId: string, options?: {
263
263
  agentKey?: string;
package/dist/client.js CHANGED
@@ -529,11 +529,11 @@ export class ThreadsClient extends BaseClient {
529
529
  return this.fetch(`/threads/${threadId}`);
530
530
  }
531
531
  /**
532
- * Get latest-run context usage for a agent in thread.
532
+ * Get the last measured context usage for an agent in a thread.
533
533
  *
534
534
  * @param threadId ID of the thread.
535
535
  * @param options.agentKey Agent key for usage filtering.
536
- * @returns Context usage summary for the latest run tree.
536
+ * @returns Usage and freshness; run_id and updated_at identify the measurement.
537
537
  */
538
538
  async getContextUsage(threadId, options) {
539
539
  return this.fetch(`/threads/${threadId}/context-usage`, {
package/dist/client.mjs CHANGED
@@ -529,11 +529,11 @@ export class ThreadsClient extends BaseClient {
529
529
  return this.fetch(`/threads/${threadId}`);
530
530
  }
531
531
  /**
532
- * Get latest-run context usage for a agent in thread.
532
+ * Get the last measured context usage for an agent in a thread.
533
533
  *
534
534
  * @param threadId ID of the thread.
535
535
  * @param options.agentKey Agent key for usage filtering.
536
- * @returns Context usage summary for the latest run tree.
536
+ * @returns Usage and freshness; run_id and updated_at identify the measurement.
537
537
  */
538
538
  async getContextUsage(threadId, options) {
539
539
  return this.fetch(`/threads/${threadId}/context-usage`, {
package/dist/schema.d.ts CHANGED
@@ -179,6 +179,8 @@ export interface ThreadContextUsage {
179
179
  agent_key: string | null;
180
180
  run_id: string | null;
181
181
  updated_at: string | null;
182
+ /** Freshness of the measurement. Optional for older servers. */
183
+ status?: "current" | "stale" | "unavailable";
182
184
  usage: {
183
185
  context_tokens: number;
184
186
  input_tokens: number;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AA0dA;;GAEG;AACH,MAAM,CAAN,IAAY,uBAcX;AAdD,WAAY,uBAAuB;IACjC;;;OAGG;IACH,8CAAmB,CAAA;IACnB;;OAEG;IACH,wDAA6B,CAAA;IAC7B;;OAEG;IACH,4CAAiB,CAAA;AACnB,CAAC,EAdW,uBAAuB,KAAvB,uBAAuB,QAclC;AA+BD,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,wCAAqB,CAAA;AACvB,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B"}
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AA4dA;;GAEG;AACH,MAAM,CAAN,IAAY,uBAcX;AAdD,WAAY,uBAAuB;IACjC;;;OAGG;IACH,8CAAmB,CAAA;IACnB;;OAEG;IACH,wDAA6B,CAAA;IAC7B;;OAEG;IACH,4CAAiB,CAAA;AACnB,CAAC,EAdW,uBAAuB,KAAvB,uBAAuB,QAclC;AA+BD,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,wCAAqB,CAAA;AACvB,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema.mjs","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AA0dA;;GAEG;AACH,MAAM,CAAN,IAAY,uBAcX;AAdD,WAAY,uBAAuB;IACjC;;;OAGG;IACH,8CAAmB,CAAA;IACnB;;OAEG;IACH,wDAA6B,CAAA;IAC7B;;OAEG;IACH,4CAAiB,CAAA;AACnB,CAAC,EAdW,uBAAuB,KAAvB,uBAAuB,QAclC;AA+BD,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,wCAAqB,CAAA;AACvB,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B"}
1
+ {"version":3,"file":"schema.mjs","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AA4dA;;GAEG;AACH,MAAM,CAAN,IAAY,uBAcX;AAdD,WAAY,uBAAuB;IACjC;;;OAGG;IACH,8CAAmB,CAAA;IACnB;;OAEG;IACH,wDAA6B,CAAA;IAC7B;;OAEG;IACH,4CAAiB,CAAA;AACnB,CAAC,EAdW,uBAAuB,KAAvB,uBAAuB,QAclC;AA+BD,MAAM,CAAN,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,8BAAW,CAAA;IACX,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;IACjB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IACzB,8BAAW,CAAA;IACX,wCAAqB,CAAA;AACvB,CAAC,EARW,eAAe,KAAf,eAAe,QAQ1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xpert-ai/xpert-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "SDK Core functionality package",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",