@aexhq/sdk 0.41.2 → 0.41.3

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.
@@ -16,7 +16,7 @@ import { assertSessionRecordArchivePublicSafeV1, buildSessionRecordDownloadManif
16
16
  */
17
17
  export async function getSessionRecord(http, sessionId) {
18
18
  const result = await http.request(`/api/sessions/${encodeURIComponent(sessionId)}`);
19
- return hasSessionRecord(result) ? result.session : result;
19
+ return hasSessionEnvelope(result) ? result.session : result;
20
20
  }
21
21
  /**
22
22
  * Strongly-typed accessor for the full self-contained session unit:
@@ -34,7 +34,8 @@ export async function getSessionUnit(http, sessionId) {
34
34
  // returns a lean record and omits the aggregate collections (F25). The
35
35
  // aggregates default to empty (safe array/page access) — read files()/events()
36
36
  // for the authoritative per-session data on that plane.
37
- return normalizeSessionUnit(await http.request(`/api/sessions/${encodeURIComponent(sessionId)}`));
37
+ const result = await http.request(`/api/sessions/${encodeURIComponent(sessionId)}`);
38
+ return normalizeSessionUnit(hasSessionEnvelope(result) ? result.session : result);
38
39
  }
39
40
  /**
40
41
  * List the sessions in the token's workspace, most-recent first, one page at a time.
@@ -1190,7 +1191,7 @@ function unwrapSkill(result) {
1190
1191
  }
1191
1192
  return result;
1192
1193
  }
1193
- function hasSessionRecord(value) {
1194
+ function hasSessionEnvelope(value) {
1194
1195
  return Boolean(value && typeof value === "object" && "session" in value);
1195
1196
  }
1196
1197
  function unwrapSession(result) {
package/dist/cli.mjs CHANGED
@@ -3197,10 +3197,11 @@ function zipSync(data, opts) {
3197
3197
  import { randomUUID } from "node:crypto";
3198
3198
  async function getSessionRecord(http, sessionId) {
3199
3199
  const result = await http.request(`/api/sessions/${encodeURIComponent(sessionId)}`);
3200
- return hasSessionRecord(result) ? result.session : result;
3200
+ return hasSessionEnvelope(result) ? result.session : result;
3201
3201
  }
3202
3202
  async function getSessionUnit(http, sessionId) {
3203
- return normalizeSessionUnit(await http.request(`/api/sessions/${encodeURIComponent(sessionId)}`));
3203
+ const result = await http.request(`/api/sessions/${encodeURIComponent(sessionId)}`);
3204
+ return normalizeSessionUnit(hasSessionEnvelope(result) ? result.session : result);
3204
3205
  }
3205
3206
  async function listSessionRecords(http, query) {
3206
3207
  const params = {};
@@ -4132,7 +4133,7 @@ function unwrapSkill(result) {
4132
4133
  }
4133
4134
  return result;
4134
4135
  }
4135
- function hasSessionRecord(value) {
4136
+ function hasSessionEnvelope(value) {
4136
4137
  return Boolean(value && typeof value === "object" && "session" in value);
4137
4138
  }
4138
4139
  function unwrapSession(result) {
@@ -1 +1 @@
1
- b55fdfa4ea2269e666c3232ae406e9f691422193792a6258af7373ce2756d31e cli.mjs
1
+ b436c6ab7ee01ed56ae277b64a36888c551ac9c7608c166c165876015f10a2aa cli.mjs
package/dist/version.d.ts CHANGED
@@ -6,4 +6,4 @@
6
6
  *
7
7
  * Used by the (future) User-Agent header on outbound SDK requests.
8
8
  */
9
- export declare const SDK_VERSION = "0.41.2";
9
+ export declare const SDK_VERSION = "0.41.3";
package/dist/version.js CHANGED
@@ -6,5 +6,5 @@
6
6
  *
7
7
  * Used by the (future) User-Agent header on outbound SDK requests.
8
8
  */
9
- export const SDK_VERSION = "0.41.2";
9
+ export const SDK_VERSION = "0.41.3";
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexhq/sdk",
3
- "version": "0.41.2",
3
+ "version": "0.41.3",
4
4
  "description": "TypeScript SDK for running autonomous agent sessions across providers (Anthropic, OpenAI, DeepSeek, Gemini, Mistral) behind one interface.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {