@rulvar/anthropic 1.246.0 → 1.247.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.
Files changed (2) hide show
  1. package/dist/index.js +20 -0
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -838,10 +838,30 @@ function anthropic(options = {}) {
838
838
  }
839
839
  };
840
840
  }
841
+ const declaredBaseUrl = options.baseURL ?? options.sdkOptions?.baseURL;
842
+ const baseUrlOrigin = declaredBaseUrl === void 0 || declaredBaseUrl === null ? void 0 : (() => {
843
+ try {
844
+ return new URL(declaredBaseUrl).origin;
845
+ } catch {
846
+ return declaredBaseUrl.slice(0, 128);
847
+ }
848
+ })();
849
+ const regulatedPosture = {
850
+ regulatedPosture: 1,
851
+ kind: "model-adapter",
852
+ name: "anthropic",
853
+ transport: options.client !== void 0 ? "preconstructed-client" : baseUrlOrigin !== void 0 ? "custom-base-url" : "official",
854
+ ...options.client === void 0 && baseUrlOrigin !== void 0 ? { baseUrlOrigin } : {},
855
+ capsBound: {
856
+ declared: capsMaxPages !== void 0,
857
+ ...capsMaxPages === void 0 ? {} : { maxPages: capsMaxPages }
858
+ }
859
+ };
841
860
  return {
842
861
  id: "anthropic",
843
862
  provider: "anthropic",
844
863
  usageSemantics: "anthropic-cache-additive-v1",
864
+ describeRegulatedPosture: () => regulatedPosture,
845
865
  caps(model) {
846
866
  return infoFor(model).caps;
847
867
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/anthropic",
3
- "version": "1.246.0",
3
+ "version": "1.247.0",
4
4
  "description": "Rulvar first-class provider adapter over @anthropic-ai/sdk.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -23,13 +23,13 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@anthropic-ai/sdk": "^0.115.0",
26
- "@rulvar/core": "1.246.0"
26
+ "@rulvar/core": "1.247.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^22.20.1",
30
30
  "tsdown": "^0.22.14",
31
31
  "typescript": "~6.0.3",
32
- "@rulvar/testing": "1.246.0"
32
+ "@rulvar/testing": "1.247.0"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",