@cullit/core 0.5.0 → 1.0.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.
- package/dist/index.d.ts +18 -5
- package/dist/index.js +34 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EnrichmentType, OutputFormat, AIConfig, CullConfig } from '@cullit/config';
|
|
2
|
-
export { AIConfig, AIProvider, Audience, CullConfig, EnrichmentType, JiraConfig, LinearConfig, OpenClawConfig, OutputFormat, PublishTarget, PublisherType, SourceConfig, Tone } from '@cullit/config';
|
|
2
|
+
export { AIConfig, AIProvider, Audience, BitbucketConfig, ConfluenceConfig, CullConfig, EnrichmentType, GitLabConfig, JiraConfig, LinearConfig, NotionConfig, OpenClawConfig, OutputFormat, PublishTarget, PublisherType, SourceConfig, Tone } from '@cullit/config';
|
|
3
3
|
|
|
4
4
|
interface GitCommit {
|
|
5
5
|
hash: string;
|
|
@@ -71,17 +71,17 @@ interface PipelineResult {
|
|
|
71
71
|
duration: number;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
declare const VERSION = "0.
|
|
74
|
+
declare const VERSION = "1.0.0";
|
|
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", "openclaw", "none"];
|
|
78
78
|
declare const OUTPUT_FORMATS: readonly ["markdown", "html", "json"];
|
|
79
|
-
declare const PUBLISHER_TYPES: readonly ["stdout", "file", "slack", "discord", "github-release"];
|
|
79
|
+
declare const PUBLISHER_TYPES: readonly ["stdout", "file", "slack", "discord", "github-release", "teams", "confluence", "notion", "gitlab-release", "changelog"];
|
|
80
80
|
declare const ENRICHMENT_TYPES: readonly ["jira", "linear"];
|
|
81
81
|
declare const CHANGE_CATEGORIES: readonly ["features", "fixes", "breaking", "improvements", "chores", "other"];
|
|
82
82
|
declare const AUDIENCES: readonly ["developer", "end-user", "executive"];
|
|
83
83
|
declare const TONES: readonly ["professional", "casual", "terse"];
|
|
84
|
-
declare const SOURCE_TYPES: readonly ["local", "jira", "linear"];
|
|
84
|
+
declare const SOURCE_TYPES: readonly ["local", "jira", "linear", "gitlab", "bitbucket"];
|
|
85
85
|
|
|
86
86
|
type LogLevel = 'quiet' | 'normal' | 'verbose';
|
|
87
87
|
interface Logger {
|
|
@@ -234,6 +234,19 @@ declare function isEnrichmentAllowed(license: LicenseStatus): boolean;
|
|
|
234
234
|
* Build a human-readable upgrade message for a gated feature.
|
|
235
235
|
*/
|
|
236
236
|
declare function upgradeMessage(feature: string): string;
|
|
237
|
+
interface UsageLimits {
|
|
238
|
+
generationsPerMonth: number;
|
|
239
|
+
maxProjects: number;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get usage limits for a license tier.
|
|
243
|
+
*/
|
|
244
|
+
declare function getTierLimits(tier: string): UsageLimits;
|
|
245
|
+
/**
|
|
246
|
+
* Report a generation event to the metering service.
|
|
247
|
+
* Non-blocking — failures are logged but never block the pipeline.
|
|
248
|
+
*/
|
|
249
|
+
declare function reportUsage(project?: string): Promise<void>;
|
|
237
250
|
|
|
238
251
|
/**
|
|
239
252
|
* Plugin Registry — the seam between free (core) and pro features.
|
|
@@ -280,4 +293,4 @@ declare function runPipeline(from: string, to: string, config: CullConfig, optio
|
|
|
280
293
|
logger?: Logger;
|
|
281
294
|
}): Promise<PipelineResult>;
|
|
282
295
|
|
|
283
|
-
export { AI_PROVIDERS, AUDIENCES, CHANGE_CATEGORIES, type ChangeCategory, type ChangeEntry, type Collector, type CollectorFactory, DEFAULT_CATEGORIES, DEFAULT_MODELS, ENRICHMENT_TYPES, type EnrichedContext, type EnrichedTicket, type Enricher, type EnricherFactory, FilePublisher, type Generator, type GeneratorFactory, GitCollector, type GitCommit, type GitDiff, type LicenseStatus, type LicenseTier, type LogLevel, type Logger, OUTPUT_FORMATS, PUBLISHER_TYPES, type PipelineResult, type Publisher, type PublisherFactory, type ReleaseAdvisory, type ReleaseNotes, SOURCE_TYPES, type SemverBump, StdoutPublisher, TONES, TemplateGenerator, VERSION, analyzeReleaseReadiness, createLogger, fetchWithTimeout, formatNotes, getCollector, getEnricher, getFormatter, getGenerator, getLatestTag, getPublisher, getRecentTags, hasCollector, hasEnricher, hasGenerator, hasPublisher, isEnrichmentAllowed, isProviderAllowed, isPublisherAllowed, listCollectors, listEnrichers, listFormatters, listGenerators, listPublishers, registerCollector, registerEnricher, registerFormatter, registerGenerator, registerPublisher, resolveLicense, runPipeline, upgradeMessage, validateLicense };
|
|
296
|
+
export { AI_PROVIDERS, AUDIENCES, CHANGE_CATEGORIES, type ChangeCategory, type ChangeEntry, type Collector, type CollectorFactory, DEFAULT_CATEGORIES, DEFAULT_MODELS, ENRICHMENT_TYPES, type EnrichedContext, type EnrichedTicket, type Enricher, type EnricherFactory, FilePublisher, type Generator, type GeneratorFactory, GitCollector, type GitCommit, type GitDiff, type LicenseStatus, type LicenseTier, type LogLevel, type Logger, OUTPUT_FORMATS, PUBLISHER_TYPES, type PipelineResult, type Publisher, type PublisherFactory, type ReleaseAdvisory, type ReleaseNotes, SOURCE_TYPES, type SemverBump, StdoutPublisher, TONES, TemplateGenerator, type UsageLimits, VERSION, analyzeReleaseReadiness, createLogger, fetchWithTimeout, formatNotes, getCollector, getEnricher, getFormatter, getGenerator, getLatestTag, getPublisher, getRecentTags, getTierLimits, hasCollector, hasEnricher, hasGenerator, hasPublisher, isEnrichmentAllowed, isProviderAllowed, isPublisherAllowed, listCollectors, listEnrichers, listFormatters, listGenerators, listPublishers, registerCollector, registerEnricher, registerFormatter, registerGenerator, registerPublisher, reportUsage, resolveLicense, runPipeline, upgradeMessage, validateLicense };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/constants.ts
|
|
2
|
-
var VERSION = "0.
|
|
2
|
+
var VERSION = "1.0.0";
|
|
3
3
|
var DEFAULT_CATEGORIES = ["features", "fixes", "breaking", "improvements", "chores"];
|
|
4
4
|
var DEFAULT_MODELS = {
|
|
5
5
|
anthropic: "claude-sonnet-4-20250514",
|
|
@@ -10,12 +10,12 @@ var DEFAULT_MODELS = {
|
|
|
10
10
|
};
|
|
11
11
|
var AI_PROVIDERS = ["anthropic", "openai", "gemini", "ollama", "openclaw", "none"];
|
|
12
12
|
var OUTPUT_FORMATS = ["markdown", "html", "json"];
|
|
13
|
-
var PUBLISHER_TYPES = ["stdout", "file", "slack", "discord", "github-release"];
|
|
13
|
+
var PUBLISHER_TYPES = ["stdout", "file", "slack", "discord", "github-release", "teams", "confluence", "notion", "gitlab-release", "changelog"];
|
|
14
14
|
var ENRICHMENT_TYPES = ["jira", "linear"];
|
|
15
15
|
var CHANGE_CATEGORIES = ["features", "fixes", "breaking", "improvements", "chores", "other"];
|
|
16
16
|
var AUDIENCES = ["developer", "end-user", "executive"];
|
|
17
17
|
var TONES = ["professional", "casual", "terse"];
|
|
18
|
-
var SOURCE_TYPES = ["local", "jira", "linear"];
|
|
18
|
+
var SOURCE_TYPES = ["local", "jira", "linear", "gitlab", "bitbucket"];
|
|
19
19
|
|
|
20
20
|
// src/logger.ts
|
|
21
21
|
function createLogger(level = "normal") {
|
|
@@ -634,6 +634,35 @@ function upgradeMessage(feature) {
|
|
|
634
634
|
Get your API key at https://cullit.io/pricing
|
|
635
635
|
Then set CULLIT_API_KEY in your environment.`;
|
|
636
636
|
}
|
|
637
|
+
var TIER_LIMITS = {
|
|
638
|
+
free: { generationsPerMonth: 10, maxProjects: 1 },
|
|
639
|
+
pro: { generationsPerMonth: 500, maxProjects: 5 },
|
|
640
|
+
team: { generationsPerMonth: 2e3, maxProjects: 25 },
|
|
641
|
+
enterprise: { generationsPerMonth: Infinity, maxProjects: Infinity }
|
|
642
|
+
};
|
|
643
|
+
function getTierLimits(tier) {
|
|
644
|
+
return TIER_LIMITS[tier] || TIER_LIMITS.free;
|
|
645
|
+
}
|
|
646
|
+
async function reportUsage(project = "default") {
|
|
647
|
+
const key = process.env.CULLIT_API_KEY?.trim();
|
|
648
|
+
const meterUrl = process.env.CULLIT_METER_URL?.trim();
|
|
649
|
+
if (!meterUrl || !key) return;
|
|
650
|
+
try {
|
|
651
|
+
await fetchWithTimeout(meterUrl, {
|
|
652
|
+
method: "POST",
|
|
653
|
+
headers: {
|
|
654
|
+
"Content-Type": "application/json",
|
|
655
|
+
"Authorization": `Bearer ${key}`
|
|
656
|
+
},
|
|
657
|
+
body: JSON.stringify({
|
|
658
|
+
event: "generation",
|
|
659
|
+
project,
|
|
660
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
661
|
+
})
|
|
662
|
+
}, 5e3);
|
|
663
|
+
} catch {
|
|
664
|
+
}
|
|
665
|
+
}
|
|
637
666
|
|
|
638
667
|
// src/registry.ts
|
|
639
668
|
var collectors = /* @__PURE__ */ new Map();
|
|
@@ -823,6 +852,7 @@ export {
|
|
|
823
852
|
getLatestTag,
|
|
824
853
|
getPublisher,
|
|
825
854
|
getRecentTags,
|
|
855
|
+
getTierLimits,
|
|
826
856
|
hasCollector,
|
|
827
857
|
hasEnricher,
|
|
828
858
|
hasGenerator,
|
|
@@ -840,6 +870,7 @@ export {
|
|
|
840
870
|
registerFormatter,
|
|
841
871
|
registerGenerator,
|
|
842
872
|
registerPublisher,
|
|
873
|
+
reportUsage,
|
|
843
874
|
resolveLicense,
|
|
844
875
|
runPipeline,
|
|
845
876
|
upgradeMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cullit/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Core engine for Cullit — AI-powered release note generation.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"node": ">=18"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@cullit/config": "0.
|
|
34
|
+
"@cullit/config": "1.0.0"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsup src/index.ts --format esm --dts --clean",
|