@osfactory/har 0.46.1 → 0.46.2

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 +108 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28010,6 +28010,109 @@ Compared to other leading proprietary and open-weights models Command A delivers
28010
28010
  }
28011
28011
  });
28012
28012
 
28013
+ // packages/schemas/src/cursor-pricing-overlay.ts
28014
+ function isCursorNativeModel(modelId) {
28015
+ const id = modelId.toLowerCase();
28016
+ const normalized = id.startsWith("cursor-") ? id.slice("cursor-".length) : id;
28017
+ return normalized.startsWith("composer") || normalized.includes("grok-4.5");
28018
+ }
28019
+ function estimateCursorNativeCostUsd(usage2, modelId) {
28020
+ if (!isCursorNativeModel(modelId)) return null;
28021
+ try {
28022
+ const result = ve(usage2, modelId, { provider: CURSOR_PRICING_PROVIDER });
28023
+ return result?.total_price ?? null;
28024
+ } catch {
28025
+ return null;
28026
+ }
28027
+ }
28028
+ var CURSOR_PRICING_PROVIDER;
28029
+ var init_cursor_pricing_overlay = __esm({
28030
+ "packages/schemas/src/cursor-pricing-overlay.ts"() {
28031
+ "use strict";
28032
+ init_dist();
28033
+ CURSOR_PRICING_PROVIDER = {
28034
+ id: "cursor",
28035
+ name: "Cursor",
28036
+ pricing_urls: ["https://cursor.com/docs/models-and-pricing"],
28037
+ api_pattern: String.raw`https://(.*\.)?cursor\.(com|sh)`,
28038
+ model_match: {
28039
+ or: [{ starts_with: "composer" }, { contains: "grok-4.5" }]
28040
+ },
28041
+ provider_match: { contains: "cursor" },
28042
+ models: [
28043
+ {
28044
+ id: "composer-2.5-fast",
28045
+ name: "Composer 2.5 (Fast)",
28046
+ description: "Fast-mode variant of Composer 2.5.",
28047
+ match: {
28048
+ or: [
28049
+ { equals: "composer-2.5-fast" },
28050
+ { equals: "cursor-composer-2.5-fast" }
28051
+ ]
28052
+ },
28053
+ prices: {
28054
+ input_mtok: 3,
28055
+ cache_read_mtok: 0.5,
28056
+ output_mtok: 15
28057
+ }
28058
+ },
28059
+ {
28060
+ id: "composer-2.5",
28061
+ name: "Composer 2.5",
28062
+ description: "Cursor's own agentic coding model.",
28063
+ match: {
28064
+ or: [
28065
+ { equals: "composer-2.5" },
28066
+ { equals: "cursor-composer-2.5" }
28067
+ ]
28068
+ },
28069
+ prices: {
28070
+ input_mtok: 0.5,
28071
+ cache_read_mtok: 0.2,
28072
+ output_mtok: 2.5
28073
+ }
28074
+ },
28075
+ {
28076
+ id: "grok-4.5-fast",
28077
+ name: "Grok 4.5 (Fast)",
28078
+ description: "Fast-mode variant of Grok 4.5.",
28079
+ match: {
28080
+ or: [
28081
+ { equals: "grok-4.5-fast" },
28082
+ { equals: "grok-4.5-high-fast" },
28083
+ { equals: "cursor-grok-4.5-high-fast" },
28084
+ { equals: "cursor-grok-4.5-fast" }
28085
+ ]
28086
+ },
28087
+ prices: {
28088
+ input_mtok: 4,
28089
+ cache_read_mtok: 1,
28090
+ output_mtok: 18
28091
+ }
28092
+ },
28093
+ {
28094
+ id: "grok-4.5",
28095
+ name: "Grok 4.5",
28096
+ description: "Jointly trained by Cursor and SpaceXAI for long-running coding and knowledge work.",
28097
+ match: {
28098
+ or: [
28099
+ { equals: "grok-4.5" },
28100
+ { equals: "grok-4.5-high" },
28101
+ { equals: "cursor-grok-4.5-high" },
28102
+ { equals: "cursor-grok-4.5" }
28103
+ ]
28104
+ },
28105
+ prices: {
28106
+ input_mtok: 2,
28107
+ cache_read_mtok: 0.5,
28108
+ output_mtok: 6
28109
+ }
28110
+ }
28111
+ ]
28112
+ };
28113
+ }
28114
+ });
28115
+
28013
28116
  // packages/schemas/src/usage-pricing.ts
28014
28117
  function num(value) {
28015
28118
  return typeof value === "number" && Number.isFinite(value) ? value : 0;
@@ -28056,6 +28159,10 @@ function estimateModelCostUsd(modelId, totals, agentTool) {
28056
28159
  continue;
28057
28160
  }
28058
28161
  }
28162
+ for (const candidate of pricingModelCandidates(modelId)) {
28163
+ const overlay = estimateCursorNativeCostUsd(usage2, candidate);
28164
+ if (overlay != null) return overlay;
28165
+ }
28059
28166
  return null;
28060
28167
  }
28061
28168
  function enrichUsageWithPricing(usage2) {
@@ -28095,6 +28202,7 @@ var init_usage_pricing = __esm({
28095
28202
  "packages/schemas/src/usage-pricing.ts"() {
28096
28203
  "use strict";
28097
28204
  init_dist();
28205
+ init_cursor_pricing_overlay();
28098
28206
  }
28099
28207
  });
28100
28208
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osfactory/har",
3
- "version": "0.46.1",
3
+ "version": "0.46.2",
4
4
  "description": "Open harness for reproducible multi-agent coding workflows",
5
5
  "keywords": [
6
6
  "har",