@band-ai/band-sdk-core 2.6.0 → 2.7.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/band_sdk_core.js CHANGED
@@ -88,6 +88,17 @@ class AgentFailure {
88
88
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
89
89
  }
90
90
  }
91
+ /**
92
+ * The canonical failure payload under Core's extension-data key.
93
+ * @returns {any}
94
+ */
95
+ toExtensionData() {
96
+ const ret = wasm.agentfailure_toExtensionData(this.__wbg_ptr);
97
+ if (ret[2]) {
98
+ throw takeFromExternrefTable0(ret[1]);
99
+ }
100
+ return takeFromExternrefTable0(ret[0]);
101
+ }
91
102
  /**
92
103
  * The failure as a plain JSON-shaped object: unlike the getters above,
93
104
  * an absent `code`/`detail` serializes as `null` here, matching the
Binary file
package/index.d.ts CHANGED
@@ -20,6 +20,10 @@ export class AgentFailure {
20
20
  * absent `code`/`detail` serializes as `null` here, not `undefined`.
21
21
  */
22
22
  toObject(): Record<string, unknown>;
23
+ /**
24
+ * The `toObject()` payload under Core's `band.ai/failure` extension key.
25
+ */
26
+ toExtensionData(): Record<string, unknown>;
23
27
  }
24
28
 
25
29
  /** Canonical inbound wire-event names `validateEventPayload` accepts. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@band-ai/band-sdk-core",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Shared Band event-payload validation",
5
5
  "license": "MIT",
6
6
  "repository": {