@hivelore/core 0.57.3 → 0.57.4
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 +70 -1
- package/dist/index.js +65 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1159,6 +1159,19 @@ declare function auditAnchorSpecificity(memories: ReadonlyArray<{
|
|
|
1159
1159
|
anchorPaths: readonly string[];
|
|
1160
1160
|
}>, fileChurn: AnchorChurn, totalCommits: number): AnchorAuditRow[];
|
|
1161
1161
|
|
|
1162
|
+
/**
|
|
1163
|
+
* One ordering for dotted version strings, shared by everything in the release chain.
|
|
1164
|
+
*
|
|
1165
|
+
* There were three byte-identical copies of this — two in core, one in the CLI — because each new
|
|
1166
|
+
* release check wrote its own rather than look for one. Ordering is the kind of thing that must
|
|
1167
|
+
* not disagree with itself between two gates reading the same tags.
|
|
1168
|
+
*
|
|
1169
|
+
* Deliberately lenient, not a semver parser: it splits on `.` and `-`, reads each part as an
|
|
1170
|
+
* integer and treats anything unparseable as 0. Inputs here are tags and registry versions the
|
|
1171
|
+
* repo produced itself, and a comparator that throws would turn an advisory check into a crash.
|
|
1172
|
+
*/
|
|
1173
|
+
declare function compareVersions(a: string, b: string): number;
|
|
1174
|
+
|
|
1162
1175
|
/**
|
|
1163
1176
|
* Did the tagged releases actually reach the registry?
|
|
1164
1177
|
*
|
|
@@ -1195,6 +1208,52 @@ interface NpmPublicationVerdict {
|
|
|
1195
1208
|
}
|
|
1196
1209
|
declare function classifyNpmPublication(input: NpmPublicationInput): NpmPublicationVerdict;
|
|
1197
1210
|
|
|
1211
|
+
/**
|
|
1212
|
+
* Did the tags that were meant to be releases become GitHub Releases?
|
|
1213
|
+
*
|
|
1214
|
+
* The npm check ([[npm-publication.ts]]) closed one end of the release chain. This closes the
|
|
1215
|
+
* other. They are not the same signal: npm is where the code is *installed from*, a GitHub Release
|
|
1216
|
+
* is where the version is *announced* — changelog, provenance, and the thing listing directories
|
|
1217
|
+
* and score checkers read to decide whether a project ships. This repo carried 190 version tags
|
|
1218
|
+
* and zero Releases, and the only reason anyone noticed was a third-party listing scoring it down.
|
|
1219
|
+
*
|
|
1220
|
+
* ## The pre-adoption rule is the whole design
|
|
1221
|
+
*
|
|
1222
|
+
* A repo that adopts Releases at version 0.57 has 189 older tags that were never going to be
|
|
1223
|
+
* Releases. Calling those "skipped" would mean a permanent warning that no action can ever clear,
|
|
1224
|
+
* and a warning you cannot clear is one people learn to scroll past. So only tags **newer than the
|
|
1225
|
+
* oldest Release** count: gaps that opened *after* the repo started releasing. Adopting the
|
|
1226
|
+
* practice retroactively cleans nothing, and is not asked to.
|
|
1227
|
+
*
|
|
1228
|
+
* Severities mirror the npm check exactly, and for the same reason — `finish` runs BEFORE you
|
|
1229
|
+
* publish, so "HEAD has no Release yet" is the normal state and can only be info. Never an error:
|
|
1230
|
+
* publishing is the human's call.
|
|
1231
|
+
*
|
|
1232
|
+
* Pure: listing tags and asking GitHub happen in the caller.
|
|
1233
|
+
*/
|
|
1234
|
+
type GithubReleaseCode = "github-release-published" | "github-release-pending" | "github-releases-skipped" | "github-releases-absent" | "github-release-unverified";
|
|
1235
|
+
interface GithubReleaseInput {
|
|
1236
|
+
/** Version in the working tree (the lockstep version). */
|
|
1237
|
+
localVersion: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Versions that have a published, non-draft GitHub Release. `null` means the lookup could not
|
|
1240
|
+
* run at all — no `gh`, no network, not a GitHub remote — which is "cannot tell", not a defect.
|
|
1241
|
+
*/
|
|
1242
|
+
releasedVersions: readonly string[] | null;
|
|
1243
|
+
/** Every version tag in the repo, without the `v` prefix. */
|
|
1244
|
+
taggedVersions: readonly string[];
|
|
1245
|
+
/** How to create one, injected so core stays free of tooling opinions. */
|
|
1246
|
+
releaseHint?: string;
|
|
1247
|
+
}
|
|
1248
|
+
interface GithubReleaseVerdict {
|
|
1249
|
+
code: GithubReleaseCode;
|
|
1250
|
+
severity: "ok" | "info" | "warn";
|
|
1251
|
+
message: string;
|
|
1252
|
+
fix?: string;
|
|
1253
|
+
}
|
|
1254
|
+
/** `null` when there is nothing worth saying — an untagged repo has no release chain to check. */
|
|
1255
|
+
declare function classifyGithubRelease(input: GithubReleaseInput): GithubReleaseVerdict | null;
|
|
1256
|
+
|
|
1198
1257
|
type MemoryPriority = "must_read" | "useful" | "background";
|
|
1199
1258
|
/**
|
|
1200
1259
|
* Normalized priority evidence. A caller fills only the signals it can compute; unknown ones default
|
|
@@ -2028,6 +2087,16 @@ interface HaiveConfig {
|
|
|
2028
2087
|
* unpublished release looks exactly like a shipped one.
|
|
2029
2088
|
*/
|
|
2030
2089
|
npmPublishCheck?: "off" | "warn";
|
|
2090
|
+
/**
|
|
2091
|
+
* Whether `hivelore enforce finish` checks that tagged versions became GitHub Releases.
|
|
2092
|
+
* Default on; set "off" for repos that deliberately tag without releasing.
|
|
2093
|
+
*
|
|
2094
|
+
* It never blocks, and it never asks you to backfill: only tags NEWER than the oldest existing
|
|
2095
|
+
* Release are reported as gaps, so adopting Releases mid-history does not produce a warning
|
|
2096
|
+
* that no action can clear. A repo with tags and no Release at all gets one info line — tags
|
|
2097
|
+
* are not Releases, and listing/scoring tools read Releases.
|
|
2098
|
+
*/
|
|
2099
|
+
githubReleaseCheck?: "off" | "warn";
|
|
2031
2100
|
/**
|
|
2032
2101
|
* How `hivelore enforce finish` reacts to hard failures observed this session that were never
|
|
2033
2102
|
* captured as a lesson (`mem_tried`):
|
|
@@ -4023,4 +4092,4 @@ interface ReviewDraftOptions {
|
|
|
4023
4092
|
/** Template review learnings into proposed-memory drafts (reuses the scanner-ingest draft shape). */
|
|
4024
4093
|
declare function reviewLearningsToDrafts(learnings: ReviewLearning[], options?: ReviewDraftOptions): MemoryDraft[];
|
|
4025
4094
|
|
|
4026
|
-
export { AUTOPILOT_DEFAULTS, type Activation, type ActivationContext, ActivationSchema, type AgentContext, type Anchor, type AnchorAuditRow, type AnchorChurn, AnchorSchema, type AntiPatternGate, type AppendFrictionInput, type AppendFrictionResult, type AppliedConflictResolution, type AstExport, type AutoPromoteRule, BRIDGE_MARKERS, BRIDGE_TARGETS, BRIDGE_TARGET_PATH, BRIEFING_MARKER_TTL_MS, BRIEFING_PRESET_DEFAULTS, type BaselineHealth, type BehaviourCoverageInput, type BehaviourCoverageMetrics, type BehaviourOracleInfo, type BootstrapAssessment, type BootstrapGap, type BootstrapGate, type BootstrapMetrics, type BootstrapState, type BootstrapStateInput, type BreakingChange, type BridgeFileOutput, type BridgeMemoryEntry, type BridgeSensor, type BridgeTarget, type BriefingBudgetNumbers, type BriefingBudgetPreset, type BriefingMarker, type BriefingProofLineOptions, type BudgetPart, type BudgetSlice, type BuildCodeMapOptions, CHARS_PER_TOKEN, CODE_MAP_DEFAULT_EXCLUDE, CODE_MAP_DEFAULT_INCLUDE, CODE_MAP_FILE, CODE_STOPWORDS, CONFIG_FILE, CONTENT_CATCH_CODES, type CaughtForYouOptions, type CaughtForYouRow, type CaughtForYouSummary, type CodeExport, type CodeExportKind, type CodeFileEntry, type CodeMap, type CodeMapQueryOptions, type CollectTimelineOpts, type CommandSensorSpec, type ConfidenceLevel, type ConfidenceThresholds, type ConflictCandidatePair, type ConflictCandidatesOpts, type ConflictResolution, type ContractCheck, type ContractDiffResult, type ContractFile, type ContractSnapshot, type CoverageGap, type CoverageOptions, CrossRepoProvenanceSchema, type CrossRepoReport, type CrossRepoSource, DECAY_DAYS, DEFAULT_AUTO_PROMOTE_RULE, DEFAULT_BRIEFING_EXCLUDE_TAGS, DEFAULT_CONFIDENCE_THRESHOLDS, DEFAULT_CONFIG, DEFAULT_DORMANT_DAYS, DEFAULT_POSTURE, DEFAULT_PRIORITY_SIGNALS, DEFAULT_SPECIFICITY, type DashboardOptions, type DashboardReport, type DepChange, type DepTrackResult, type DependencySnapshot, type DetectStacksInput, type DetectableStack, type DistilledFailureLesson, type DocFrequency, type DormantRow, type DraftOptions, type DraftsOptions, ENV_WORKAROUND_TAGS, type EvalDelta, type EvalHistoryEntry, type EvalReport, type EvalSpec, type EvalTrend, FRICTION_FIELD_MAX, FRICTION_LOG_FILE, FRICTION_STATE_FILE, type FailureCoverageOptions, type FailureObservation, type FeedbackAdjustment, type FeedbackAdjustmentAction, type FeedbackAdjustmentOptions, type Finding, type FindingFormat, type FindingSeverity, type FrictionGroup, type FrictionKind, type FrictionReport, type FrictionState, type FrictionStateEntry, type FrictionStatus, GATE_REMINDER_WINDOW_MS, GUESSABLE_THRESHOLD, type GateFinding, type GateMissProposal, type GatePolicy, type GatePolicyInput, type GatePosture, type GatePrecision, type GatePrecisionDelta, type GatePrecisionMetricDelta, type GateSeverity, type GateStage, type GateTuningSuggestion, type GateVerdict, type GateVerdictInput, type GenerateBridgesOptions, type GitCommit, type GitWatchPlan, type GitWatchState, HAIVE_DIR, HAIVE_OWNED_FILES, HANDOFF_FILENAME, HIVELORE_ATTRIBUTION, type HaiveConfig, type HaivePaths, type HotFile, type HotFileSource, type ImpactOptions, type ImpactRow, type ImpactScore, type ImpactSummary, type ImpactTier, type IncidentHints, type InvalidMemoryFile, LEGACY_CONFIG_FILE, type LexicalRankResult, type LoadedMemory, MEMORIES_DIR, MIN_WORD_LEN, type Memory, type MemoryDraft, type MemoryFrontmatter, MemoryFrontmatterSchema, type MemoryPriority, type MemoryScope, MemoryScopeSchema, type MemoryStatus, MemoryStatusSchema, type MemoryType, MemoryTypeSchema, type MemoryUsage, type MergeResult, type MetricDelta, type NpmPublicationCode, type NpmPublicationInput, type NpmPublicationVerdict, PREVENTION_DEBOUNCE_MS, PREVENTION_RECEIPT_MARKER, PROCESS_GATE_CODES, PROJECT_CONTEXT_FILE, PROJECT_CONTEXT_THROTTLE_MS, type PostIncidentLesson, type PreventionCommentFinding, type PreventionEvent, type PreventionEventDetail, type PreventionReceipt, type PreventionReceiptRow, type PreventionRow, type PreventionSource, type PreventionTrend, type PrioritySignals, type ProposedEvalSpec, type ProposedSensorVerdict, REVIEW_LEARNING_MARKER, RUNTIME_JOURNAL_FILENAME, type RecurrenceReport, type RecurrenceRow, type ResolveProjectInfo, type RetirementSignal, type RetrievalAggregate, type RetrievalCase, type RetrievalCaseResult, type ReviewDraftOptions, type ReviewLearning, type RuntimeJournalEntry, SCAFFOLD_MARKER_RE, SEED_QUALITY_FLOOR, SENSOR_ABSENT_LOOKBACK, SENSOR_ABSENT_WINDOW, SESSION_RECAP_TTL_MS, SETUP_GATE_CODES, STACK_PACK_TAG, type ScaffoldLoopGap, type ScaffoldOptions, type ScaffoldStyle, type SeedProposal, type SelfEvalOptions, type Sensor, type SensorAggregate, type SensorCase, type SensorCaseResult, type SensorEvaluation, type SensorEvaluationOutcome, type SensorEvaluationStage, type SensorFlap, type SensorHealth, type SensorHit, type SensorRow, SensorSchema, type SensorSeed, type SensorSelfCheck, type SensorSuggestionOptions, type SensorTarget, type SensorWeakening, type SessionHandoffData, type SkillActivation, TEST_FRAMEWORKS, type TestFramework, type TestScaffold, type TierContractCheck, type TimelineEntry, type TopicStatusPair, type TruncateOptions, type TruncateResult, USAGE_FILE, USAGE_LOG_DIR, USAGE_LOG_FILE, type UncapturedFailure, type UncoveredAreaSuggestion, type UsageAggregate, type UsageEvent, type UsageIndex, type VerifyOptions, type VerifyResult, WEAK_ANCHOR_CHURN_RATIO, addedLineNumbersFromDiff, addedLinesFromDiff, aggregateRetrieval, aggregateSensors, aggregateUsage, allocateBudget, anchorMatchesComponent, anchorSpecificity, antiPatternGateParams, appendEvalHistory, appendFrictionReport, appendPreventionEvent, appendProposedRetrievalCases, appendRuntimeJournalEntry, appendSensorEvaluations, appendUsageEvent, applyConflictResolution, applyFeedbackAdjustment, approveProposedCases, assessBehaviourCoverage, assessBootstrapState, assessScaffoldLoop, assessSensorHealth, auditAnchorSpecificity, bridgeMemorySummary, briefingMarkerPath, briefingMarkersDir, briefingProofLine, buildBaselineHealthFinding, buildCodeMap, buildCoverageIndex, buildDashboard, buildDocFrequency, buildFrontmatter, buildHandoffMarkdown, buildPreventionReceipt, buildProposeCommand, buildReport, bumpRead, churnForAnchors, classifyMemoryPriority, classifyNpmPublication, codeMapContentHash, codeMapPath, collectTimelineEntries, compactAutoRecapBody, compareEvalReports, compareGatePrecision, compareImpact, compileRegexSensor, componentOf, computeBaselineHealth, computeEvalTrend, computeGatePrecision, computeImpact, computePreventionTrend, computeRecurrence, computeScopeHash, configPath, contractLockPath, countSourceFilesOnDisk, decideVerdict, dedupeRefusals, deriveConfidence, deriveMainAreas, describePosture, detectAgentContext, detectSensorWeakening, detectStacksFromManifests, diffContract, diffHasDistinctiveOverlap, distillFailureObservations, distinctiveCap, draftsFromFindings, emptyUsage, emptyUsageIndex, enforcementDir, estimateTokens, evalHistoryPath, evaluateSkillActivation, existingGateMissShas, explainSensorRejection, extractActionsBriefBody, extractCorrectApproachExamples, extractReferencedPaths, extractReviewLearnings, extractSensorExamples, extractSnippet, extractTestFilePathsFromCommand, filterNewDrafts, findCoverageGaps, findLexicalConflictPairs, findProjectRoot, findTopicStatusConflictPairs, findUncapturedFailures, findingBody, findingToDraft, firstMemoryOneLine, formatFrictionIssue, frictionFingerprint, frictionLogPath, frictionStatePath, gatePassedShas, generateBridges, getUsage, globToRegExp, groupFriction, handoffAgeMs, handoffFilePath, hasPendingTestMarker, hasRecentBriefingMarker, hashProjectContext, incidentHintsFromDiff, incidentSuffix, inferModulesFromPaths, isAutoPromoteEligible, isAutoRecap, isCovered, isDecaying, isDistinctiveToken, isEnvWorkaroundMemory, isFreshIsoDate, isGlobPath, isHarnessErrorOutput, isLikelyGuessable, isNoiseSubject, isProductionCodeFile, isRetiredMemory, isSensorScannablePath, isSkill, isSkillSuppressed, isStackPackSeed, isStylisticRule, isTemplateProjectContext, isWeakAnchor, judgeProposedSensor, lessonShortName, listMarkdownFilesRecursive, literalMatchesAllTokens, literalMatchesAnyToken, loadCodeMap, loadConfig, loadConfigSync, loadEvalHistory, loadFrictionState, loadMemoriesFromDir, loadMemoriesFromDirDetailed, loadMemory, loadPreventionEvents, loadSensorLedger, loadUsageIndex, looksLikeGenericAdvice, meetsSeedQualityFloor, memoryFilePath, memoryHasExcludedTag, memoryMatchesAnchorPaths, mergeHotFiles, mergeMemoryVersions, mineSensorSeedFromDiff, moduleNameOf, newMemoryId, normalizeChurnPath, normalizeFindingSeverity, normalizeFramework, normalizeFrictionSummary, normalizeKind, normalizeScaffoldStyle, normalizeSessionId, overallScore, parseEslintJson, parseFileAst, parseFindings, parseLessonFields, parseMemory, parseNpmAudit, parseSarif, parseSince, parseSonar, pathsOverlap, pickSnippetNeedle, pickTestFramework, planConflictResolution, planGitWatch, prepareBridgeData, preventionLogPath, priorityRank, prioritySignals, projectContextRecentlyEmitted, proposeGateMissDrafts, proposeSeedsFromCommits, pullCrossRepoSources, quarantineNote, queryCodeMap, rankMemoriesLexical, readFrictionReports, readRecentBriefingMarker, readRuntimeJournalTail, readSessionHandoff, readUsageEvents, recommendFeedbackAdjustment, recordApplied, recordGateReminder, recordPrevention, recordPreventionHits, recordProjectContextEmission, recordRejection, relPathFrom, renderBehaviourCoverageLine, renderBootstrapChecklist, renderCaughtForYou, renderPreventionComment, renderPreventionReceipt, renderPreventionReceiptShare, resolveBriefingBudget, resolveConfigPath, resolveGatePolicy, resolveHaivePaths, resolveManifestFiles, resolveProjectInfo, retirementSignal, revertedShaFromCommit, reviewLearningsToDrafts, runRegexSensor, runSensors, runTierContract, runValidationContract, runtimeJournalPath, saveCodeMap, saveConfig, saveFrictionState, saveUsageIndex, scaffoldPostIncidentTest, scannableSensorTargets, scoreRetrievalCase, scoreSensorCase, scrubbedCommandEnv, selectCommandSensors, sensorAppliesToPath, sensorLedgerPath, sensorPatternBrittleness, sensorPromotedAtMap, sensorSelfCheck, sensorTargetsFromDiff, serializeCodeMap, serializeMemory, setFrictionStatus, shouldExpandGateReminder, snapshotContract, specificityScore, stripPrivate, suggestGate, suggestSensorFromMemory, suggestSensorSeed, suggestTopicKey, summarizeCaughtForYou, summarizeImpact, synthesizeSelfEvalCases, tallyHotFiles, titleFromBody, tokenizeQuery, tokenizeWords, trackDependencies, trackReads, truncateToTokens, usageLogPath, usageLogSize, usagePath, verifyAnchor, watchContracts, withQuarantineNote, withoutQuarantineNote, writeBriefingMarker, writeSessionHandoff };
|
|
4095
|
+
export { AUTOPILOT_DEFAULTS, type Activation, type ActivationContext, ActivationSchema, type AgentContext, type Anchor, type AnchorAuditRow, type AnchorChurn, AnchorSchema, type AntiPatternGate, type AppendFrictionInput, type AppendFrictionResult, type AppliedConflictResolution, type AstExport, type AutoPromoteRule, BRIDGE_MARKERS, BRIDGE_TARGETS, BRIDGE_TARGET_PATH, BRIEFING_MARKER_TTL_MS, BRIEFING_PRESET_DEFAULTS, type BaselineHealth, type BehaviourCoverageInput, type BehaviourCoverageMetrics, type BehaviourOracleInfo, type BootstrapAssessment, type BootstrapGap, type BootstrapGate, type BootstrapMetrics, type BootstrapState, type BootstrapStateInput, type BreakingChange, type BridgeFileOutput, type BridgeMemoryEntry, type BridgeSensor, type BridgeTarget, type BriefingBudgetNumbers, type BriefingBudgetPreset, type BriefingMarker, type BriefingProofLineOptions, type BudgetPart, type BudgetSlice, type BuildCodeMapOptions, CHARS_PER_TOKEN, CODE_MAP_DEFAULT_EXCLUDE, CODE_MAP_DEFAULT_INCLUDE, CODE_MAP_FILE, CODE_STOPWORDS, CONFIG_FILE, CONTENT_CATCH_CODES, type CaughtForYouOptions, type CaughtForYouRow, type CaughtForYouSummary, type CodeExport, type CodeExportKind, type CodeFileEntry, type CodeMap, type CodeMapQueryOptions, type CollectTimelineOpts, type CommandSensorSpec, type ConfidenceLevel, type ConfidenceThresholds, type ConflictCandidatePair, type ConflictCandidatesOpts, type ConflictResolution, type ContractCheck, type ContractDiffResult, type ContractFile, type ContractSnapshot, type CoverageGap, type CoverageOptions, CrossRepoProvenanceSchema, type CrossRepoReport, type CrossRepoSource, DECAY_DAYS, DEFAULT_AUTO_PROMOTE_RULE, DEFAULT_BRIEFING_EXCLUDE_TAGS, DEFAULT_CONFIDENCE_THRESHOLDS, DEFAULT_CONFIG, DEFAULT_DORMANT_DAYS, DEFAULT_POSTURE, DEFAULT_PRIORITY_SIGNALS, DEFAULT_SPECIFICITY, type DashboardOptions, type DashboardReport, type DepChange, type DepTrackResult, type DependencySnapshot, type DetectStacksInput, type DetectableStack, type DistilledFailureLesson, type DocFrequency, type DormantRow, type DraftOptions, type DraftsOptions, ENV_WORKAROUND_TAGS, type EvalDelta, type EvalHistoryEntry, type EvalReport, type EvalSpec, type EvalTrend, FRICTION_FIELD_MAX, FRICTION_LOG_FILE, FRICTION_STATE_FILE, type FailureCoverageOptions, type FailureObservation, type FeedbackAdjustment, type FeedbackAdjustmentAction, type FeedbackAdjustmentOptions, type Finding, type FindingFormat, type FindingSeverity, type FrictionGroup, type FrictionKind, type FrictionReport, type FrictionState, type FrictionStateEntry, type FrictionStatus, GATE_REMINDER_WINDOW_MS, GUESSABLE_THRESHOLD, type GateFinding, type GateMissProposal, type GatePolicy, type GatePolicyInput, type GatePosture, type GatePrecision, type GatePrecisionDelta, type GatePrecisionMetricDelta, type GateSeverity, type GateStage, type GateTuningSuggestion, type GateVerdict, type GateVerdictInput, type GenerateBridgesOptions, type GitCommit, type GitWatchPlan, type GitWatchState, type GithubReleaseCode, type GithubReleaseInput, type GithubReleaseVerdict, HAIVE_DIR, HAIVE_OWNED_FILES, HANDOFF_FILENAME, HIVELORE_ATTRIBUTION, type HaiveConfig, type HaivePaths, type HotFile, type HotFileSource, type ImpactOptions, type ImpactRow, type ImpactScore, type ImpactSummary, type ImpactTier, type IncidentHints, type InvalidMemoryFile, LEGACY_CONFIG_FILE, type LexicalRankResult, type LoadedMemory, MEMORIES_DIR, MIN_WORD_LEN, type Memory, type MemoryDraft, type MemoryFrontmatter, MemoryFrontmatterSchema, type MemoryPriority, type MemoryScope, MemoryScopeSchema, type MemoryStatus, MemoryStatusSchema, type MemoryType, MemoryTypeSchema, type MemoryUsage, type MergeResult, type MetricDelta, type NpmPublicationCode, type NpmPublicationInput, type NpmPublicationVerdict, PREVENTION_DEBOUNCE_MS, PREVENTION_RECEIPT_MARKER, PROCESS_GATE_CODES, PROJECT_CONTEXT_FILE, PROJECT_CONTEXT_THROTTLE_MS, type PostIncidentLesson, type PreventionCommentFinding, type PreventionEvent, type PreventionEventDetail, type PreventionReceipt, type PreventionReceiptRow, type PreventionRow, type PreventionSource, type PreventionTrend, type PrioritySignals, type ProposedEvalSpec, type ProposedSensorVerdict, REVIEW_LEARNING_MARKER, RUNTIME_JOURNAL_FILENAME, type RecurrenceReport, type RecurrenceRow, type ResolveProjectInfo, type RetirementSignal, type RetrievalAggregate, type RetrievalCase, type RetrievalCaseResult, type ReviewDraftOptions, type ReviewLearning, type RuntimeJournalEntry, SCAFFOLD_MARKER_RE, SEED_QUALITY_FLOOR, SENSOR_ABSENT_LOOKBACK, SENSOR_ABSENT_WINDOW, SESSION_RECAP_TTL_MS, SETUP_GATE_CODES, STACK_PACK_TAG, type ScaffoldLoopGap, type ScaffoldOptions, type ScaffoldStyle, type SeedProposal, type SelfEvalOptions, type Sensor, type SensorAggregate, type SensorCase, type SensorCaseResult, type SensorEvaluation, type SensorEvaluationOutcome, type SensorEvaluationStage, type SensorFlap, type SensorHealth, type SensorHit, type SensorRow, SensorSchema, type SensorSeed, type SensorSelfCheck, type SensorSuggestionOptions, type SensorTarget, type SensorWeakening, type SessionHandoffData, type SkillActivation, TEST_FRAMEWORKS, type TestFramework, type TestScaffold, type TierContractCheck, type TimelineEntry, type TopicStatusPair, type TruncateOptions, type TruncateResult, USAGE_FILE, USAGE_LOG_DIR, USAGE_LOG_FILE, type UncapturedFailure, type UncoveredAreaSuggestion, type UsageAggregate, type UsageEvent, type UsageIndex, type VerifyOptions, type VerifyResult, WEAK_ANCHOR_CHURN_RATIO, addedLineNumbersFromDiff, addedLinesFromDiff, aggregateRetrieval, aggregateSensors, aggregateUsage, allocateBudget, anchorMatchesComponent, anchorSpecificity, antiPatternGateParams, appendEvalHistory, appendFrictionReport, appendPreventionEvent, appendProposedRetrievalCases, appendRuntimeJournalEntry, appendSensorEvaluations, appendUsageEvent, applyConflictResolution, applyFeedbackAdjustment, approveProposedCases, assessBehaviourCoverage, assessBootstrapState, assessScaffoldLoop, assessSensorHealth, auditAnchorSpecificity, bridgeMemorySummary, briefingMarkerPath, briefingMarkersDir, briefingProofLine, buildBaselineHealthFinding, buildCodeMap, buildCoverageIndex, buildDashboard, buildDocFrequency, buildFrontmatter, buildHandoffMarkdown, buildPreventionReceipt, buildProposeCommand, buildReport, bumpRead, churnForAnchors, classifyGithubRelease, classifyMemoryPriority, classifyNpmPublication, codeMapContentHash, codeMapPath, collectTimelineEntries, compactAutoRecapBody, compareEvalReports, compareGatePrecision, compareImpact, compareVersions, compileRegexSensor, componentOf, computeBaselineHealth, computeEvalTrend, computeGatePrecision, computeImpact, computePreventionTrend, computeRecurrence, computeScopeHash, configPath, contractLockPath, countSourceFilesOnDisk, decideVerdict, dedupeRefusals, deriveConfidence, deriveMainAreas, describePosture, detectAgentContext, detectSensorWeakening, detectStacksFromManifests, diffContract, diffHasDistinctiveOverlap, distillFailureObservations, distinctiveCap, draftsFromFindings, emptyUsage, emptyUsageIndex, enforcementDir, estimateTokens, evalHistoryPath, evaluateSkillActivation, existingGateMissShas, explainSensorRejection, extractActionsBriefBody, extractCorrectApproachExamples, extractReferencedPaths, extractReviewLearnings, extractSensorExamples, extractSnippet, extractTestFilePathsFromCommand, filterNewDrafts, findCoverageGaps, findLexicalConflictPairs, findProjectRoot, findTopicStatusConflictPairs, findUncapturedFailures, findingBody, findingToDraft, firstMemoryOneLine, formatFrictionIssue, frictionFingerprint, frictionLogPath, frictionStatePath, gatePassedShas, generateBridges, getUsage, globToRegExp, groupFriction, handoffAgeMs, handoffFilePath, hasPendingTestMarker, hasRecentBriefingMarker, hashProjectContext, incidentHintsFromDiff, incidentSuffix, inferModulesFromPaths, isAutoPromoteEligible, isAutoRecap, isCovered, isDecaying, isDistinctiveToken, isEnvWorkaroundMemory, isFreshIsoDate, isGlobPath, isHarnessErrorOutput, isLikelyGuessable, isNoiseSubject, isProductionCodeFile, isRetiredMemory, isSensorScannablePath, isSkill, isSkillSuppressed, isStackPackSeed, isStylisticRule, isTemplateProjectContext, isWeakAnchor, judgeProposedSensor, lessonShortName, listMarkdownFilesRecursive, literalMatchesAllTokens, literalMatchesAnyToken, loadCodeMap, loadConfig, loadConfigSync, loadEvalHistory, loadFrictionState, loadMemoriesFromDir, loadMemoriesFromDirDetailed, loadMemory, loadPreventionEvents, loadSensorLedger, loadUsageIndex, looksLikeGenericAdvice, meetsSeedQualityFloor, memoryFilePath, memoryHasExcludedTag, memoryMatchesAnchorPaths, mergeHotFiles, mergeMemoryVersions, mineSensorSeedFromDiff, moduleNameOf, newMemoryId, normalizeChurnPath, normalizeFindingSeverity, normalizeFramework, normalizeFrictionSummary, normalizeKind, normalizeScaffoldStyle, normalizeSessionId, overallScore, parseEslintJson, parseFileAst, parseFindings, parseLessonFields, parseMemory, parseNpmAudit, parseSarif, parseSince, parseSonar, pathsOverlap, pickSnippetNeedle, pickTestFramework, planConflictResolution, planGitWatch, prepareBridgeData, preventionLogPath, priorityRank, prioritySignals, projectContextRecentlyEmitted, proposeGateMissDrafts, proposeSeedsFromCommits, pullCrossRepoSources, quarantineNote, queryCodeMap, rankMemoriesLexical, readFrictionReports, readRecentBriefingMarker, readRuntimeJournalTail, readSessionHandoff, readUsageEvents, recommendFeedbackAdjustment, recordApplied, recordGateReminder, recordPrevention, recordPreventionHits, recordProjectContextEmission, recordRejection, relPathFrom, renderBehaviourCoverageLine, renderBootstrapChecklist, renderCaughtForYou, renderPreventionComment, renderPreventionReceipt, renderPreventionReceiptShare, resolveBriefingBudget, resolveConfigPath, resolveGatePolicy, resolveHaivePaths, resolveManifestFiles, resolveProjectInfo, retirementSignal, revertedShaFromCommit, reviewLearningsToDrafts, runRegexSensor, runSensors, runTierContract, runValidationContract, runtimeJournalPath, saveCodeMap, saveConfig, saveFrictionState, saveUsageIndex, scaffoldPostIncidentTest, scannableSensorTargets, scoreRetrievalCase, scoreSensorCase, scrubbedCommandEnv, selectCommandSensors, sensorAppliesToPath, sensorLedgerPath, sensorPatternBrittleness, sensorPromotedAtMap, sensorSelfCheck, sensorTargetsFromDiff, serializeCodeMap, serializeMemory, setFrictionStatus, shouldExpandGateReminder, snapshotContract, specificityScore, stripPrivate, suggestGate, suggestSensorFromMemory, suggestSensorSeed, suggestTopicKey, summarizeCaughtForYou, summarizeImpact, synthesizeSelfEvalCases, tallyHotFiles, titleFromBody, tokenizeQuery, tokenizeWords, trackDependencies, trackReads, truncateToTokens, usageLogPath, usageLogSize, usagePath, verifyAnchor, watchContracts, withQuarantineNote, withoutQuarantineNote, writeBriefingMarker, writeSessionHandoff };
|
package/dist/index.js
CHANGED
|
@@ -1462,16 +1462,19 @@ function auditAnchorSpecificity(memories, fileChurn, totalCommits) {
|
|
|
1462
1462
|
return rows.sort((a, b) => a.specificity - b.specificity);
|
|
1463
1463
|
}
|
|
1464
1464
|
|
|
1465
|
-
// src/
|
|
1465
|
+
// src/version-order.ts
|
|
1466
1466
|
function compareVersions(a, b) {
|
|
1467
|
-
const pa = a.split(/[.-]/).map((
|
|
1468
|
-
const pb = b.split(/[.-]/).map((
|
|
1469
|
-
|
|
1467
|
+
const pa = a.split(/[.-]/).map((part) => Number.parseInt(part, 10) || 0);
|
|
1468
|
+
const pb = b.split(/[.-]/).map((part) => Number.parseInt(part, 10) || 0);
|
|
1469
|
+
const len = Math.max(pa.length, pb.length, 3);
|
|
1470
|
+
for (let i = 0; i < len; i++) {
|
|
1470
1471
|
const diff = (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
1471
1472
|
if (diff !== 0) return diff;
|
|
1472
1473
|
}
|
|
1473
1474
|
return 0;
|
|
1474
1475
|
}
|
|
1476
|
+
|
|
1477
|
+
// src/npm-publication.ts
|
|
1475
1478
|
function classifyNpmPublication(input) {
|
|
1476
1479
|
const { packageName, localVersion, publishedVersion } = input;
|
|
1477
1480
|
const hint = input.publishHint ?? `publish ${packageName} ${localVersion}`;
|
|
@@ -1506,6 +1509,62 @@ function classifyNpmPublication(input) {
|
|
|
1506
1509
|
};
|
|
1507
1510
|
}
|
|
1508
1511
|
|
|
1512
|
+
// src/github-release.ts
|
|
1513
|
+
var MAX_LISTED = 5;
|
|
1514
|
+
function listGap(versions) {
|
|
1515
|
+
const shown = versions.slice(0, MAX_LISTED).map((v) => `v${v}`).join(", ");
|
|
1516
|
+
const rest = versions.length - MAX_LISTED;
|
|
1517
|
+
return rest > 0 ? `${shown} and ${rest} more` : shown;
|
|
1518
|
+
}
|
|
1519
|
+
function classifyGithubRelease(input) {
|
|
1520
|
+
const { localVersion, releasedVersions, taggedVersions } = input;
|
|
1521
|
+
const hint = input.releaseHint ?? `create a GitHub Release for v${localVersion}`;
|
|
1522
|
+
if (releasedVersions === null) {
|
|
1523
|
+
return {
|
|
1524
|
+
code: "github-release-unverified",
|
|
1525
|
+
severity: "info",
|
|
1526
|
+
message: `Could not check whether v${localVersion} has a GitHub Release.`
|
|
1527
|
+
};
|
|
1528
|
+
}
|
|
1529
|
+
const tags = [...new Set(taggedVersions)].sort(compareVersions);
|
|
1530
|
+
if (releasedVersions.length === 0) {
|
|
1531
|
+
if (tags.length === 0) return null;
|
|
1532
|
+
return {
|
|
1533
|
+
code: "github-releases-absent",
|
|
1534
|
+
severity: "info",
|
|
1535
|
+
message: `${tags.length} version tag(s) exist but the repository has no GitHub Release. Tags are not Releases: listing and scoring tools read Releases.`,
|
|
1536
|
+
fix: `Start with the current version \u2014 ${hint}. Older tags stay as they are; only gaps after the first Release are reported.`
|
|
1537
|
+
};
|
|
1538
|
+
}
|
|
1539
|
+
const released = new Set(releasedVersions);
|
|
1540
|
+
const oldestReleased = [...releasedVersions].sort(compareVersions)[0];
|
|
1541
|
+
const newestReleased = [...releasedVersions].sort(compareVersions).at(-1);
|
|
1542
|
+
const skipped = tags.filter(
|
|
1543
|
+
(v) => !released.has(v) && compareVersions(v, oldestReleased) > 0 && compareVersions(v, localVersion) < 0
|
|
1544
|
+
);
|
|
1545
|
+
if (skipped.length > 0) {
|
|
1546
|
+
return {
|
|
1547
|
+
code: "github-releases-skipped",
|
|
1548
|
+
severity: "warn",
|
|
1549
|
+
message: `${skipped.length} tagged version(s) after v${oldestReleased} never became a GitHub Release: ${listGap(skipped)}.`,
|
|
1550
|
+
fix: `Releases are not cumulative, so the newest is the one that matters: ${hint}. If the gap is deliberate, turn the check off with \`enforcement.githubReleaseCheck: "off"\`.`
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
if (compareVersions(newestReleased, localVersion) >= 0) {
|
|
1554
|
+
return {
|
|
1555
|
+
code: "github-release-published",
|
|
1556
|
+
severity: "ok",
|
|
1557
|
+
message: `v${newestReleased} has a GitHub Release.`
|
|
1558
|
+
};
|
|
1559
|
+
}
|
|
1560
|
+
return {
|
|
1561
|
+
code: "github-release-pending",
|
|
1562
|
+
severity: "info",
|
|
1563
|
+
message: `v${localVersion} has no GitHub Release yet (newest is v${newestReleased}) \u2014 expected at this point; the Release comes after the tag is pushed.`,
|
|
1564
|
+
fix: hint
|
|
1565
|
+
};
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1509
1568
|
// src/priority.ts
|
|
1510
1569
|
var DEFAULT_PRIORITY_SIGNALS = {
|
|
1511
1570
|
type: "",
|
|
@@ -7346,6 +7405,7 @@ export {
|
|
|
7346
7405
|
buildReport,
|
|
7347
7406
|
bumpRead,
|
|
7348
7407
|
churnForAnchors,
|
|
7408
|
+
classifyGithubRelease,
|
|
7349
7409
|
classifyMemoryPriority,
|
|
7350
7410
|
classifyNpmPublication,
|
|
7351
7411
|
codeMapContentHash,
|
|
@@ -7355,6 +7415,7 @@ export {
|
|
|
7355
7415
|
compareEvalReports,
|
|
7356
7416
|
compareGatePrecision,
|
|
7357
7417
|
compareImpact,
|
|
7418
|
+
compareVersions,
|
|
7358
7419
|
compileRegexSensor,
|
|
7359
7420
|
componentOf,
|
|
7360
7421
|
computeBaselineHealth,
|