@cullit/core 2.0.3 → 2.0.5

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.0.3";
74
+ declare const VERSION = "2.0.5";
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"];
@@ -279,7 +279,7 @@ type TeamFeature = 'drafts' | 'approvals' | 'shared_history' | 'project_template
279
279
  /**
280
280
  * Check whether a license tier grants access to a Team/Enterprise feature.
281
281
  */
282
- declare function isFeatureAllowed(feature: TeamFeature, tier: string): boolean;
282
+ declare function isFeatureAllowed(feature: TeamFeature, tier: string, valid?: boolean): boolean;
283
283
  /**
284
284
  * Build a gating summary for a tier — which features are unlocked.
285
285
  */
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/constants.ts
2
- var VERSION = "2.0.3";
2
+ var VERSION = "2.0.5";
3
3
  var DEFAULT_CATEGORIES = ["features", "fixes", "breaking", "improvements", "chores"];
4
4
  var DEFAULT_MODELS = {
5
5
  anthropic: "claude-sonnet-4-20250514",
@@ -793,6 +793,10 @@ async function validateLicense() {
793
793
  if (parsed.protocol !== "https:" && !(parsed.protocol === "http:" && parsed.hostname === "localhost")) {
794
794
  return { tier: "pro", valid: true, message: "CULLIT_LICENSE_URL must use https." };
795
795
  }
796
+ const h = parsed.hostname;
797
+ if (h === "0.0.0.0" || h === "[::]" || h === "[::1]" || h === "127.0.0.1" || h.startsWith("10.") || h.startsWith("192.168.") || h.startsWith("169.254.") || /^172\.(1[6-9]|2\d|3[01])\./.test(h) || h.endsWith(".local") || h.endsWith(".internal")) {
798
+ return { tier: "pro", valid: true, message: "CULLIT_LICENSE_URL must not point to internal addresses." };
799
+ }
796
800
  } catch {
797
801
  return { tier: "pro", valid: true, message: "CULLIT_LICENSE_URL is not a valid URL." };
798
802
  }
@@ -844,7 +848,7 @@ function isAudienceToneAllowed(license) {
844
848
  return (license.tier === "pro" || license.tier === "team" || license.tier === "enterprise") && license.valid;
845
849
  }
846
850
  function upgradeMessage(feature, minTier) {
847
- const tierLabel = minTier === "team" ? "a Team plan or above" : minTier === "pro" ? "a Pro plan or above" : minTier === "enterprise" ? "an Enterprise plan" : "a paid Cullit plan";
851
+ const tierLabel = minTier === "team" ? "a Team plan or above" : minTier === "pro" ? "a Pro plan or above" : minTier === "basic" ? "a Basic plan or above" : minTier === "enterprise" ? "an Enterprise plan" : "a paid Cullit plan";
848
852
  return `\u{1F512} ${feature} requires ${tierLabel}.
849
853
  Upgrade at https://cullit.io/pricing
850
854
  Then set CULLIT_API_KEY in your environment.`;
@@ -871,7 +875,8 @@ var FEATURE_TIERS = {
871
875
  audit_logs: /* @__PURE__ */ new Set(["enterprise"]),
872
876
  sso: /* @__PURE__ */ new Set(["enterprise"])
873
877
  };
874
- function isFeatureAllowed(feature, tier) {
878
+ function isFeatureAllowed(feature, tier, valid = true) {
879
+ if (!valid) return false;
875
880
  const allowed = FEATURE_TIERS[feature];
876
881
  return allowed ? allowed.has(tier) : false;
877
882
  }
@@ -1168,9 +1173,13 @@ async function runPipeline(from, to, config, options = {}) {
1168
1173
  }
1169
1174
  log.info(`\xBB Enriching from ${source}...`);
1170
1175
  const enricher = enricherFactory(config);
1171
- const enrichedTickets = await enricher.enrich(diff);
1172
- tickets.push(...enrichedTickets);
1173
- log.info(`\xBB ${source}: found ${enrichedTickets.length} ${source === "jira" ? "tickets" : "issues"}`);
1176
+ try {
1177
+ const enrichedTickets = await enricher.enrich(diff);
1178
+ tickets.push(...enrichedTickets);
1179
+ log.info(`\xBB ${source}: found ${enrichedTickets.length} ${source === "jira" ? "tickets" : "issues"}`);
1180
+ } catch (err) {
1181
+ log.warn(`\u26A0 ${source} enrichment failed: ${err.message || err} \u2014 continuing without it`);
1182
+ }
1174
1183
  }
1175
1184
  const context = { diff, tickets };
1176
1185
  const providerNames = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cullit/core",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
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.0.3"
41
+ "@cullit/config": "2.0.5"
42
42
  },
43
43
  "scripts": {
44
44
  "build": "tsup src/index.ts --format esm --dts --clean",