@tryvira/sdk 0.1.95 → 0.1.97

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/README.md CHANGED
@@ -15,7 +15,7 @@ Compound execution plans can be persisted with `saveCompoundTaskPlan(plan, {idem
15
15
  ## Install
16
16
 
17
17
  ```bash
18
- npm install @tryvira/sdk@0.1.94
18
+ npm install @tryvira/sdk@0.1.97
19
19
  ```
20
20
 
21
21
  Configure the organization, project, and environment for every request. Keep the API
package/dist/index.js CHANGED
@@ -1140,6 +1140,9 @@ var ViraClient = class {
1140
1140
  resolveRuntime(input) {
1141
1141
  if (!input.behaviorPoint && !input.executionBoundary && !input.semanticContext)
1142
1142
  throw new Error("SDK_RUNTIME_ROUTE_REQUIRED");
1143
+ const idempotencyKey = input.idempotencyKey ?? `sdk:resolve:${globalThis.crypto.randomUUID()}`;
1144
+ if (!idempotencyKey.trim() || idempotencyKey !== idempotencyKey.trim())
1145
+ throw new Error("SDK_IDEMPOTENCY_KEY_INVALID");
1143
1146
  return this.request(
1144
1147
  {
1145
1148
  method: "POST",
@@ -1152,7 +1155,9 @@ var ViraClient = class {
1152
1155
  }
1153
1156
  },
1154
1157
  {
1155
- idempotencyKey: input.idempotencyKey ?? `sdk:resolve:${input.behaviorPoint ?? "boundary"}`,
1158
+ // One key per logical invocation: transport retries reuse this value,
1159
+ // while a later call for the same BehaviorPoint is billed separately.
1160
+ idempotencyKey,
1156
1161
  enforcing: true
1157
1162
  }
1158
1163
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/sdk",
3
- "version": "0.1.95",
3
+ "version": "0.1.97",
4
4
  "description": "Typed Vira SDK for connect-once, observation and governed runtime execution.",
5
5
  "keywords": [
6
6
  "vira",