@mcptoolshop/research-os 0.3.2 → 0.3.3
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/CHANGELOG.md +83 -0
- package/README.es.md +7 -5
- package/README.fr.md +6 -4
- package/README.hi.md +6 -4
- package/README.it.md +7 -5
- package/README.ja.md +6 -4
- package/README.md +4 -2
- package/README.pt-BR.md +6 -4
- package/README.zh.md +7 -5
- package/dist/cli.js +28 -26
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1751,6 +1751,8 @@ interface SourceCounts {
|
|
|
1751
1751
|
unknown: number;
|
|
1752
1752
|
independent_publishers: number;
|
|
1753
1753
|
failed_fetches: number;
|
|
1754
|
+
section_primary: number;
|
|
1755
|
+
section_independent_publishers: number;
|
|
1754
1756
|
}
|
|
1755
1757
|
interface ContradictionCounts {
|
|
1756
1758
|
total: number;
|
|
@@ -2010,6 +2012,8 @@ declare const SectionGateResultSchema: z.ZodObject<{
|
|
|
2010
2012
|
unknown: z.ZodNumber;
|
|
2011
2013
|
independent_publishers: z.ZodNumber;
|
|
2012
2014
|
failed_fetches: z.ZodNumber;
|
|
2015
|
+
section_primary: z.ZodNumber;
|
|
2016
|
+
section_independent_publishers: z.ZodNumber;
|
|
2013
2017
|
}, "strip", z.ZodTypeAny, {
|
|
2014
2018
|
unknown: number;
|
|
2015
2019
|
primary: number;
|
|
@@ -2020,6 +2024,8 @@ declare const SectionGateResultSchema: z.ZodObject<{
|
|
|
2020
2024
|
total: number;
|
|
2021
2025
|
independent_publishers: number;
|
|
2022
2026
|
failed_fetches: number;
|
|
2027
|
+
section_primary: number;
|
|
2028
|
+
section_independent_publishers: number;
|
|
2023
2029
|
}, {
|
|
2024
2030
|
unknown: number;
|
|
2025
2031
|
primary: number;
|
|
@@ -2030,6 +2036,8 @@ declare const SectionGateResultSchema: z.ZodObject<{
|
|
|
2030
2036
|
total: number;
|
|
2031
2037
|
independent_publishers: number;
|
|
2032
2038
|
failed_fetches: number;
|
|
2039
|
+
section_primary: number;
|
|
2040
|
+
section_independent_publishers: number;
|
|
2033
2041
|
}>;
|
|
2034
2042
|
contradiction_counts: z.ZodObject<{
|
|
2035
2043
|
total: z.ZodNumber;
|
|
@@ -2145,6 +2153,8 @@ declare const SectionGateResultSchema: z.ZodObject<{
|
|
|
2145
2153
|
total: number;
|
|
2146
2154
|
independent_publishers: number;
|
|
2147
2155
|
failed_fetches: number;
|
|
2156
|
+
section_primary: number;
|
|
2157
|
+
section_independent_publishers: number;
|
|
2148
2158
|
};
|
|
2149
2159
|
contradiction_counts: {
|
|
2150
2160
|
blocking: number;
|
|
@@ -2226,6 +2236,8 @@ declare const SectionGateResultSchema: z.ZodObject<{
|
|
|
2226
2236
|
total: number;
|
|
2227
2237
|
independent_publishers: number;
|
|
2228
2238
|
failed_fetches: number;
|
|
2239
|
+
section_primary: number;
|
|
2240
|
+
section_independent_publishers: number;
|
|
2229
2241
|
};
|
|
2230
2242
|
contradiction_counts: {
|
|
2231
2243
|
blocking: number;
|
|
@@ -6010,6 +6022,6 @@ declare class SynthesisNotReadyError extends ResearchOSError {
|
|
|
6010
6022
|
constructor(mode: string);
|
|
6011
6023
|
}
|
|
6012
6024
|
|
|
6013
|
-
declare const RESEARCH_OS_VERSION = "0.3.
|
|
6025
|
+
declare const RESEARCH_OS_VERSION = "0.3.3";
|
|
6014
6026
|
|
|
6015
6027
|
export { type AllowedSynthesisInput, AllowedSynthesisInputSchema, type ApproveOptions, type ApproveResult, type ArchivedArtifact, ArchivedArtifactSchema, type ArtifactHash, ArtifactHashSchema, type AuditDensityOptions, type AuditDensityResult, type HandoffMode as AuditHandoffMode, HandoffModeSchema as AuditHandoffModeSchema, type AuditOptions, type AuditSummary, type CitationCoverage, type Claim, type ClaimCluster, ClaimClusterSchema, type ClaimCounts, type ClaimDensityAudit, ClaimDensityAuditSchema, type ClaimExtractionInput, type ClaimExtractionResult, type ClaimExtractor, type ClaimExtractorAdapter, ClaimExtractorSchema, type ClaimReview, ClaimReviewSchema, ClaimSchema, type ClaimSummary, type ClaimTriage, ClaimTriageSchema, type Confidence, ConfidenceSchema, type Contradiction, ContradictionConfidenceSchema, type ContradictionCounts, type ContradictionDetector, type ContradictionDetectorName, ContradictionDetectorSchema, type ContradictionResolution, ContradictionResolutionSchema, ContradictionSchema, type ContradictionStatus, ContradictionStatusSchema, type ContradictionSummary, type ContradictionType, ContradictionTypeSchema, type CoworkHandoffPayload$1 as CoworkHandoffPayload, CoworkHandoffPayloadSchema, type CrossSectionContradictionRef, CrossSectionContradictionRefSchema, type CrossSectionMap, CrossSectionMapSchema, DEFAULT_PROFILE, type DensityFlag, DensityFlagSchema, type DetectionResult, type DetectorMode, type DiscoverOptions, type DiscoverProposal, type DiscoverProvider, type DiscoverProviderInput, type DiscoverProviderResult, type DiscoverResult, type DiscoveryCandidate, DiscoveryCandidateSchema, type DiscoveryCandidateStatus, DiscoveryCandidateStatusSchema, type DiscoverySummary, DiscoverySummarySchema, type DraftClaim, type DraftContradiction, type DraftFinding, EXCERPT_ID_PATTERN, type Excerpt, type ExcerptDraft, type ExcerptOrigin, ExcerptOriginSchema, ExcerptSchema, type ExportOptions, type ExportSummary, type ExportUrlsOptions, type ExportUrlsResult, type ExtractClaimsOptions, type ExtractClaimsSummary, type ExtractionInput, type ExtractionResult, type Extractor, type ExtractorName, ExtractorNameSchema, FORBIDDEN_ACTIONS_ALWAYS, type FetchReceipt, FetchReceiptSchema, type FindingCategory, FindingCategorySchema, type FindingSeverity, FindingSeveritySchema, type ForbiddenInput, ForbiddenInputSchema, type FreezeOptions, type FreezeReceiptPayload, FreezeReceiptPayloadSchema, type FreezeRefusalPayload, FreezeRefusalPayloadSchema, type FreezeSummary, type FreshnessSummary, type GateCheckResult, GateCheckResultSchema, type GateCheckStatus, GateCheckStatusSchema, type GateConfig, GateConfigSchema, type GateFamily, GateFamilySchema, type GateInput, type GateVerdictEntry, GateVerdictEntrySchema, type GatherOptions, type GatherSummary, type HandoffMode$1 as HandoffMode, HandoffModeSchema$1 as HandoffModeSchema, HandoffNotFoundError, type HandoffOptions, type HandoffSummary, HeuristicClaimExtractor, HeuristicContradictionDetector, HeuristicExtractor, HeuristicReviewer, type IndexBuildOptions, type IndexBuildSummary, IndexNotBuiltError, type IndexQueryOptions, type IndexQuerySummary, type IndexStatus, IndexStatusSchema, type InitOptions, type InitResult, IntakeValidationError, type IntegrityCheck, IntegrityCheckSchema, InvalidSectionIdError, type InvalidateExtractionOptions, type InvalidateExtractionResult, type InvalidateReviewOptions, type InvalidateReviewResult, type InvalidationReceipt, InvalidationReceiptSchema, LlmHeuristicDiscoverProvider, type LoadOrBuildArgs, type LoadOrBuildResult, type MapOptions, type MapSummary, type NearDuplicateCluster, NearDuplicateClusterSchema, NoSourcesGatheredError, NoUrlsProvidedError, OllamaInternClaimExtractor, OllamaInternContradictionDetector, OllamaInternExtractor, OllamaInternReviewer, type OrphanClaimRow, OrphanClaimRowSchema, type OverlapAssessment, OverlapAssessmentSchema, type PackAuditPayload, PackAuditPayloadSchema, PackExistsError, PackNotFoundError, type PackVerdict, PackVerdictSchema, type PairedDraft, type PerSourceDensity, PerSourceDensitySchema, type PrimarySourceWaiver, PrimarySourceWaiverSchema, type PromoteOptions, type PromoteResult, type QueryHit, RESEARCH_OS_VERSION, type ReadinessSummary, type RecordType, type RejectOptions, type RejectResult, type Relevance, RelevanceSchema, ResearchOSError, type ResearchYaml, ResearchYamlSchema, type ResolutionStatus, ResolutionStatusSchema, type ReviewActive, ReviewActiveSchema, ReviewConfidenceSchema, type ReviewDecision, type ReviewDecisionCount, ReviewDecisionCountSchema, ReviewDecisionSchema, type ReviewFinding, ReviewFindingSchema, type ReviewInvalidationReceipt, ReviewInvalidationReceiptSchema, type ReviewSnapshot, ReviewSnapshotSchema, type ReviewState, ReviewStateSchema, type ReviewSummary, type Reviewer, type ReviewerInput, type ReviewerName, ReviewerNameSchema, type ReviewerResult, type RunGateOptions, type RunReviewOptions, type RunReviewSummary, SCHEMA_VERSION, type ScopeIntegritySummary, type ScopeOverlap, ScopeOverlapSchema, type ScopeWideningRiskRow, ScopeWideningRiskRowSchema, type Section, type SectionAcceptedSummary, SectionAcceptedSummarySchema, type SectionAddOptions, type SectionAddResult, SectionExistsError, type SectionGateResult$1 as SectionGateResult, SectionGateResultSchema, type SectionGatesYaml, SectionGatesYamlSchema, SectionNotFoundError, type SectionReport, SectionReportAcceptanceSchema, SectionReportContradictionsSchema, SectionReportExtractionSchema, type SectionReportOptions, type SectionReportResult, SectionReportReviewSchema, SectionReportSchema, SectionReportSourcesSchema, SectionSchema, type SectionState, SectionStateSchema, type SectionStatusChange, SectionStatusChangeSchema, type Severity, SeveritySchema, type SharedSource, SharedSourceSchema, type SourceCard, SourceCardSchema, type SourceCounts, type SourceDiversityGapRow, SourceDiversityGapRowSchema, type SourceFetchPair, type SourceSummary, type SourceType, type SourceTypeGuess, SourceTypeGuessSchema, SourceTypeSchema, type StaleSourceRow, StaleSourceRowSchema, type SyncOptions, type SyncSummary, SynthesisNotReadyError, type SynthesisReadinessRow, SynthesisReadinessRowSchema, TemplateNotFoundError, type TriageDecision, TriageDecisionSchema, type TriageOptions, type TriageRunResult, type TriageSummary, TriageSummarySchema, type UnresolvedContradictionRow, UnresolvedContradictionRowSchema, type Verdict, VerdictSchema, type WaiverApplication, WaiverApplicationSchema, type WaiverDependency, WaiverDependencySchema, type WaiverEntry, WaiverEntrySchema, type WaiverSummary, type WeakSourceRow, WeakSourceRowSchema, type WorkspaceOptions, type WorkspaceSummary, add, aggregate, appendFetchLog, appendSectionSourceId, applySchema, applyWaivers, approve, assessScopeOverlap, audit, auditDensity, build, buildCard, buildExcerptIndex, buildResearchYaml, checkClaimIntegrity, checkContradiction, checkFreshness, checkScopeIntegrity, checkSectionBudget, checkSourceFloor, chunkKeyPoints, chunkRawText, collectUrls, dedupeAndValidate, defaultClaimExtractors, defaultContradictionDetectors, defaultExtractors, defaultReviewers, derive, deriveClaimReviews, deriveCrossSectionMap, discover, evidenceGrounded, exportRepoKnowledge, exportUrls, extract, extractClaimCitations, extractContradictionDisclosures, extractWaiverDisclosures, fetchOnce, freeze, gate, gather, handoff, hasNegation, indexDbPath, init, invalidateExtraction, invalidateReview, isValidProfileName, jaccardSimilarity, ledgerPathFor, loadOrBuildLedger, makeReceiptId, makeSourceId, map, normalizeOllamaHost, openIndexDb, parseUrlsFileText, pickClaimExtractor, pickContradictionDetector, pickExtractor, pickReviewer, profileDir, promote, query, readActiveProfile, readTriagedClaimIds, readUrlsFile, reject, renderCoworkMaster, renderCrossSectionMapMarkdown, renderDecisionBrief, renderFinalReport, renderFreezeReceiptMarkdown, renderFreezeRefusalMarkdown, renderGateMarkdown, renderLedgerForPrompt, renderMarkdownView, renderOrphanClaimsMarkdown, renderPackAuditMarkdown, renderReviewMarkdown, renderScopeWideningRisksMarkdown, renderSourceDiversityGapsMarkdown, renderStaleSourcesMarkdown, renderSynthesisReadinessMarkdown, renderUnresolvedContradictionsMarkdown, renderWeakSourcesMarkdown, renderWorkingReport, reportSection, resolve, review, reviewActivePath, slugify, syncRepoKnowledge, tokenize, triage, workspace, writeActiveProfile, writeSourceCard };
|
package/dist/index.js
CHANGED
|
@@ -3641,6 +3641,7 @@ function checkSourceFloor(input) {
|
|
|
3641
3641
|
const cfg = input.research.gates.source_floor;
|
|
3642
3642
|
const results = [];
|
|
3643
3643
|
const cards = input.sources;
|
|
3644
|
+
const sectionCards = cards.filter((c) => c.section_id === input.section.id);
|
|
3644
3645
|
const sourceCount = cards.length;
|
|
3645
3646
|
if (sourceCount < cfg.min_sources) {
|
|
3646
3647
|
results.push({
|
|
@@ -3664,12 +3665,15 @@ function checkSourceFloor(input) {
|
|
|
3664
3665
|
const publishers = new Set(
|
|
3665
3666
|
cards.map((c) => c.publisher).filter((p) => typeof p === "string")
|
|
3666
3667
|
);
|
|
3668
|
+
const sectionPublishers = new Set(
|
|
3669
|
+
sectionCards.map((c) => c.publisher).filter((p) => typeof p === "string")
|
|
3670
|
+
);
|
|
3667
3671
|
if (publishers.size < cfg.min_independent_publishers) {
|
|
3668
3672
|
results.push({
|
|
3669
3673
|
family: "source_floor",
|
|
3670
3674
|
check: "min_independent_publishers",
|
|
3671
3675
|
status: "fail",
|
|
3672
|
-
detail: `Found ${publishers.size} independent publisher(s); minimum ${cfg.min_independent_publishers} required
|
|
3676
|
+
detail: `Found ${publishers.size} independent publisher(s); minimum ${cfg.min_independent_publishers} required. (pack-wide=${publishers.size}, section-scoped=${sectionPublishers.size})`,
|
|
3673
3677
|
evidence: [...publishers],
|
|
3674
3678
|
blocks_synthesis: true
|
|
3675
3679
|
});
|
|
@@ -3678,18 +3682,19 @@ function checkSourceFloor(input) {
|
|
|
3678
3682
|
family: "source_floor",
|
|
3679
3683
|
check: "min_independent_publishers",
|
|
3680
3684
|
status: "pass",
|
|
3681
|
-
detail: `${publishers.size} independent publisher(s) >= minimum ${cfg.min_independent_publishers}
|
|
3685
|
+
detail: `${publishers.size} independent publisher(s) >= minimum ${cfg.min_independent_publishers}. (pack-wide=${publishers.size}, section-scoped=${sectionPublishers.size})`,
|
|
3682
3686
|
evidence: [],
|
|
3683
3687
|
blocks_synthesis: false
|
|
3684
3688
|
});
|
|
3685
3689
|
}
|
|
3686
3690
|
const primaryCount = cards.filter((c) => c.source_type === "primary").length;
|
|
3691
|
+
const sectionPrimaryCount = sectionCards.filter((c) => c.source_type === "primary").length;
|
|
3687
3692
|
if (primaryCount < cfg.primary_sources_required) {
|
|
3688
3693
|
results.push({
|
|
3689
3694
|
family: "source_floor",
|
|
3690
3695
|
check: "primary_sources_required",
|
|
3691
3696
|
status: "fail",
|
|
3692
|
-
detail: `Found ${primaryCount} primary source(s); minimum ${cfg.primary_sources_required} required. Pre-waiver
|
|
3697
|
+
detail: `Found ${primaryCount} primary source(s); minimum ${cfg.primary_sources_required} required. Pre-waiver. (pack-wide=${primaryCount}, section-scoped=${sectionPrimaryCount})`,
|
|
3693
3698
|
evidence: cards.filter((c) => c.source_type === "primary").map((c) => c.source_id),
|
|
3694
3699
|
blocks_synthesis: true
|
|
3695
3700
|
});
|
|
@@ -3698,7 +3703,7 @@ function checkSourceFloor(input) {
|
|
|
3698
3703
|
family: "source_floor",
|
|
3699
3704
|
check: "primary_sources_required",
|
|
3700
3705
|
status: "pass",
|
|
3701
|
-
detail: `${primaryCount} primary source(s) >= minimum ${cfg.primary_sources_required}
|
|
3706
|
+
detail: `${primaryCount} primary source(s) >= minimum ${cfg.primary_sources_required}. (pack-wide=${primaryCount}, section-scoped=${sectionPrimaryCount})`,
|
|
3702
3707
|
evidence: [],
|
|
3703
3708
|
blocks_synthesis: false
|
|
3704
3709
|
});
|
|
@@ -3852,25 +3857,14 @@ function checkClaimIntegrity(input) {
|
|
|
3852
3857
|
monoClaims.push(claim.claim_id);
|
|
3853
3858
|
}
|
|
3854
3859
|
}
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
});
|
|
3864
|
-
} else {
|
|
3865
|
-
results.push({
|
|
3866
|
-
family: "claim_integrity",
|
|
3867
|
-
check: "no_source_cluster_monopoly",
|
|
3868
|
-
status: "pass",
|
|
3869
|
-
detail: `${monoClaims.length}/${claims.length} claim(s) source from a single publisher (within tolerance).`,
|
|
3870
|
-
evidence: [],
|
|
3871
|
-
blocks_synthesis: false
|
|
3872
|
-
});
|
|
3873
|
-
}
|
|
3860
|
+
results.push({
|
|
3861
|
+
family: "claim_integrity",
|
|
3862
|
+
check: "no_source_cluster_monopoly",
|
|
3863
|
+
status: "pass",
|
|
3864
|
+
detail: `${monoClaims.length}/${claims.length} claim(s) are single-source by architecture (each claim references exactly one source). Publisher diversity is enforced at source-card level via min_independent_publishers.`,
|
|
3865
|
+
evidence: [],
|
|
3866
|
+
blocks_synthesis: false
|
|
3867
|
+
});
|
|
3874
3868
|
}
|
|
3875
3869
|
return results;
|
|
3876
3870
|
}
|
|
@@ -4594,7 +4588,9 @@ var init_schema10 = __esm({
|
|
|
4594
4588
|
docs: z11.number().int().nonnegative(),
|
|
4595
4589
|
unknown: z11.number().int().nonnegative(),
|
|
4596
4590
|
independent_publishers: z11.number().int().nonnegative(),
|
|
4597
|
-
failed_fetches: z11.number().int().nonnegative()
|
|
4591
|
+
failed_fetches: z11.number().int().nonnegative(),
|
|
4592
|
+
section_primary: z11.number().int().nonnegative(),
|
|
4593
|
+
section_independent_publishers: z11.number().int().nonnegative()
|
|
4598
4594
|
}),
|
|
4599
4595
|
contradiction_counts: z11.object({
|
|
4600
4596
|
total: z11.number().int().nonnegative(),
|
|
@@ -4667,10 +4663,14 @@ function summarizeClaimCounts(input) {
|
|
|
4667
4663
|
}
|
|
4668
4664
|
function summarizeSourceCounts(input) {
|
|
4669
4665
|
const cards = input.sources;
|
|
4666
|
+
const sectionCards = cards.filter((c) => c.section_id === input.section.id);
|
|
4670
4667
|
const failed = input.receipts.filter((r) => r.fetch_outcome !== "ok").length;
|
|
4671
4668
|
const publishers = new Set(
|
|
4672
4669
|
cards.map((c) => c.publisher).filter((p) => typeof p === "string")
|
|
4673
4670
|
);
|
|
4671
|
+
const sectionPublishers = new Set(
|
|
4672
|
+
sectionCards.map((c) => c.publisher).filter((p) => typeof p === "string")
|
|
4673
|
+
);
|
|
4674
4674
|
return {
|
|
4675
4675
|
total: cards.length,
|
|
4676
4676
|
primary: cards.filter((c) => c.source_type === "primary").length,
|
|
@@ -4680,7 +4680,9 @@ function summarizeSourceCounts(input) {
|
|
|
4680
4680
|
docs: cards.filter((c) => c.source_type === "docs").length,
|
|
4681
4681
|
unknown: cards.filter((c) => c.source_type === "unknown").length,
|
|
4682
4682
|
independent_publishers: publishers.size,
|
|
4683
|
-
failed_fetches: failed
|
|
4683
|
+
failed_fetches: failed,
|
|
4684
|
+
section_primary: sectionCards.filter((c) => c.source_type === "primary").length,
|
|
4685
|
+
section_independent_publishers: sectionPublishers.size
|
|
4684
4686
|
};
|
|
4685
4687
|
}
|
|
4686
4688
|
function buildEffectiveStatuses3(resolutions) {
|
|
@@ -12302,7 +12304,7 @@ var init_src = __esm({
|
|
|
12302
12304
|
init_triage();
|
|
12303
12305
|
init_discover();
|
|
12304
12306
|
init_errors();
|
|
12305
|
-
RESEARCH_OS_VERSION = "0.3.
|
|
12307
|
+
RESEARCH_OS_VERSION = "0.3.3";
|
|
12306
12308
|
}
|
|
12307
12309
|
});
|
|
12308
12310
|
init_src();
|