@topolo/sdk 0.11.5 → 0.11.6

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/index.cjs CHANGED
@@ -2759,6 +2759,7 @@ function enrichActionContract(manifest, action, allActions = manifest.actions ||
2759
2759
  const resource = resourceFor(action);
2760
2760
  const readOnly = action.readOnly !== void 0 ? action.readOnly === true : action.method === "GET";
2761
2761
  const existing = isRecord4(action.agentContract) ? structuredClone(action.agentContract) : {};
2762
+ const declaredAgentContract = Object.keys(existing).length > 0;
2762
2763
  const recovery = isRecord4(existing.recovery) ? existing.recovery : recoveryFor(action, allActions, appId);
2763
2764
  const rollbackActionId = typeof existing.rollbackActionId === "string" && existing.rollbackActionId.trim() ? existing.rollbackActionId.trim() : recovery.mode === "compensating_action" ? recovery.actionId : void 0;
2764
2765
  const inputExample = sampleForSchema(action.inputSchema);
@@ -2782,7 +2783,7 @@ function enrichActionContract(manifest, action, allActions = manifest.actions ||
2782
2783
  examples,
2783
2784
  recovery,
2784
2785
  ...rollbackActionId ? { rollbackActionId } : {},
2785
- contractSource: Object.hasOwn(outputSchema, "x-topolo-contract-source") ? "derived-action-metadata" : "application-declared"
2786
+ contractSource: declaredAgentContract ? "application-declared" : "derived-action-metadata"
2786
2787
  }
2787
2788
  };
2788
2789
  }
package/dist/index.js CHANGED
@@ -2669,6 +2669,7 @@ function enrichActionContract(manifest, action, allActions = manifest.actions ||
2669
2669
  const resource = resourceFor(action);
2670
2670
  const readOnly = action.readOnly !== void 0 ? action.readOnly === true : action.method === "GET";
2671
2671
  const existing = isRecord4(action.agentContract) ? structuredClone(action.agentContract) : {};
2672
+ const declaredAgentContract = Object.keys(existing).length > 0;
2672
2673
  const recovery = isRecord4(existing.recovery) ? existing.recovery : recoveryFor(action, allActions, appId);
2673
2674
  const rollbackActionId = typeof existing.rollbackActionId === "string" && existing.rollbackActionId.trim() ? existing.rollbackActionId.trim() : recovery.mode === "compensating_action" ? recovery.actionId : void 0;
2674
2675
  const inputExample = sampleForSchema(action.inputSchema);
@@ -2692,7 +2693,7 @@ function enrichActionContract(manifest, action, allActions = manifest.actions ||
2692
2693
  examples,
2693
2694
  recovery,
2694
2695
  ...rollbackActionId ? { rollbackActionId } : {},
2695
- contractSource: Object.hasOwn(outputSchema, "x-topolo-contract-source") ? "derived-action-metadata" : "application-declared"
2696
+ contractSource: declaredAgentContract ? "application-declared" : "derived-action-metadata"
2696
2697
  }
2697
2698
  };
2698
2699
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@topolo/sdk",
3
- "version": "0.11.5",
4
- "topoloPublishedVersion": "0.11.5",
3
+ "version": "0.11.6",
4
+ "topoloPublishedVersion": "0.11.6",
5
5
  "description": "Typed client SDK for the Topolo platform. Used by TopoloCli, TopoloMCP, and third-party agents.",
6
6
  "license": "UNLICENSED",
7
7
  "author": "Topolo",