@cullit/core 2.1.0 → 2.2.1

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.d.ts CHANGED
@@ -71,7 +71,7 @@ interface PipelineResult {
71
71
  duration: number;
72
72
  }
73
73
 
74
- declare const VERSION = "2.1.0";
74
+ declare const VERSION = "2.2.1";
75
75
  declare const DEFAULT_CATEGORIES: string[];
76
76
  declare const DEFAULT_MODELS: Record<string, string>;
77
77
  declare const AI_PROVIDERS: readonly ["anthropic", "openai", "gemini", "ollama", "none"];
@@ -284,7 +284,7 @@ declare function getTierLimits(tier: string): UsageLimits;
284
284
  * Use when the plan is known (API context); use getTierLimits when only tier is known (CLI).
285
285
  */
286
286
  declare function getPlanLimits(plan: string, tier: string): UsageLimits;
287
- type TeamFeature = 'drafts' | 'approvals' | 'shared_history' | 'project_templates' | 'hosted_changelog' | 'branded_widget' | 'team_publishers' | 'org_settings' | 'audit_logs' | 'sso';
287
+ type TeamFeature = 'drafts' | 'approvals' | 'shared_history' | 'project_templates' | 'hosted_changelog' | 'branded_widget' | 'team_publishers' | 'org_settings' | 'audit_logs' | 'team_analytics' | 'sso';
288
288
  /**
289
289
  * Check whether a license tier grants access to a Team/Enterprise feature.
290
290
  */
@@ -297,8 +297,9 @@ declare function isFeatureAllowed(feature: TeamFeature, tier: string, valid?: bo
297
297
  declare function isPlanFeatureAllowed(feature: TeamFeature, plan: string, tier: string, valid?: boolean): boolean;
298
298
  /**
299
299
  * Build a gating summary for a tier — which features are unlocked.
300
+ * When plan is provided, uses plan-aware feature checks.
300
301
  */
301
- declare function getFeatureGating(tier: string): Record<TeamFeature, boolean>;
302
+ declare function getFeatureGating(tier: string, plan?: string): Record<TeamFeature, boolean>;
302
303
  /**
303
304
  * Report a generation event to the metering service.
304
305
  * Non-blocking — failures are logged but never block the pipeline.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/constants.ts
2
- var VERSION = "2.1.0";
2
+ var VERSION = "2.2.1";
3
3
  var DEFAULT_CATEGORIES = ["features", "fixes", "breaking", "improvements", "chores"];
4
4
  var DEFAULT_MODELS = {
5
5
  anthropic: "claude-sonnet-4-20250514",
@@ -859,6 +859,7 @@ var TIER_LIMITS = {
859
859
  enterprise: { generationsPerMonth: Infinity, maxProjects: Infinity }
860
860
  };
861
861
  var PLAN_LIMITS = {
862
+ "team-10": { generationsPerMonth: 4e3, maxProjects: 350 },
862
863
  "team-25": { generationsPerMonth: 5e3, maxProjects: 500 }
863
864
  };
864
865
  function getTierLimits(tier) {
@@ -880,12 +881,15 @@ var FEATURE_TIERS = {
880
881
  org_settings: /* @__PURE__ */ new Set(["team", "enterprise"]),
881
882
  audit_logs: /* @__PURE__ */ new Set(["enterprise"]),
882
883
  // plan-gated: team-25 via PLAN_FEATURES
884
+ team_analytics: /* @__PURE__ */ new Set(["enterprise"]),
885
+ // plan-gated: team-25 via PLAN_FEATURES
883
886
  sso: /* @__PURE__ */ new Set(["enterprise"])
884
887
  };
885
888
  var PLAN_FEATURES = {
886
889
  branded_widget: /* @__PURE__ */ new Set(["team-25"]),
887
890
  project_templates: /* @__PURE__ */ new Set(["team-25"]),
888
- audit_logs: /* @__PURE__ */ new Set(["team-25"])
891
+ audit_logs: /* @__PURE__ */ new Set(["team-25"]),
892
+ team_analytics: /* @__PURE__ */ new Set(["team-25"])
889
893
  };
890
894
  function isFeatureAllowed(feature, tier, valid = true) {
891
895
  if (!valid) return false;
@@ -900,10 +904,10 @@ function isPlanFeatureAllowed(feature, plan, tier, valid = true) {
900
904
  const tierSet = FEATURE_TIERS[feature];
901
905
  return tierSet ? tierSet.has(tier) : false;
902
906
  }
903
- function getFeatureGating(tier) {
907
+ function getFeatureGating(tier, plan) {
904
908
  const result = {};
905
909
  for (const feature of Object.keys(FEATURE_TIERS)) {
906
- result[feature] = isFeatureAllowed(feature, tier);
910
+ result[feature] = plan ? isPlanFeatureAllowed(feature, plan, tier) : isFeatureAllowed(feature, tier);
907
911
  }
908
912
  return result;
909
913
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cullit/core",
3
- "version": "2.1.0",
3
+ "version": "2.2.1",
4
4
  "type": "module",
5
5
  "description": "Core engine for Cullit — AI-powered release note generation.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -38,7 +38,7 @@
38
38
  "access": "public"
39
39
  },
40
40
  "dependencies": {
41
- "@cullit/config": "2.1.0"
41
+ "@cullit/config": "2.2.1"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsup src/index.ts --format esm --dts --clean",