This commit is contained in:
1 parent
0e1a2ad008
commit
34f4923566
28 files changed
+3932
-81
No files matched your search
@@ -928,6 +928,121 @@ export interface components {
|
||||
/** Detail */
|
||||
detail?: components["schemas"]["ValidationError"][];
|
||||
};
|
||||
/** IngestReviewCreate */
|
||||
IngestReviewCreate: {
|
||||
/**
|
||||
* Candidate Audience
|
||||
* @default []
|
||||
*/
|
||||
candidate_audience: string[];
|
||||
/**
|
||||
* Candidate Domain
|
||||
* @default []
|
||||
*/
|
||||
candidate_domain: string[];
|
||||
/**
|
||||
* Candidate Facet Labels
|
||||
* @default []
|
||||
*/
|
||||
candidate_facet_labels: components["schemas"]["IngestReviewCreate__FacetLabelProposal"][];
|
||||
/**
|
||||
* Candidate Tags
|
||||
* @default []
|
||||
*/
|
||||
candidate_tags: string[];
|
||||
/**
|
||||
* Candidate Use For
|
||||
* @default []
|
||||
*/
|
||||
candidate_use_for: string[];
|
||||
/** Excerpt */
|
||||
excerpt: string;
|
||||
/** Extraction Id */
|
||||
extraction_id: string;
|
||||
/**
|
||||
* Lens
|
||||
* @enum {string}
|
||||
*/
|
||||
lens: "technical" | "conceptual" | "cultural-historical" | "financial-market";
|
||||
locator: components["schemas"]["IngestReviewCreate__Locator"];
|
||||
/** Project Id */
|
||||
project_id: string;
|
||||
/**
|
||||
* Relevance
|
||||
* @default borderline
|
||||
* @enum {string}
|
||||
*/
|
||||
relevance: "borderline" | "low";
|
||||
/** Relevance Rationale */
|
||||
relevance_rationale: string;
|
||||
/** Review Id */
|
||||
review_id: string;
|
||||
/** Run Id */
|
||||
run_id: string;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Source Revision Id */
|
||||
source_revision_id: string;
|
||||
/** Summary */
|
||||
summary: string;
|
||||
};
|
||||
/** FacetLabelProposal */
|
||||
IngestReviewCreate__FacetLabelProposal: {
|
||||
/** Definition */
|
||||
definition: string;
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Value */
|
||||
value: string;
|
||||
};
|
||||
/** Locator */
|
||||
IngestReviewCreate__Locator: {
|
||||
/** Block Id */
|
||||
block_id: string;
|
||||
/** End */
|
||||
end: number;
|
||||
/**
|
||||
* Kind
|
||||
* @enum {string}
|
||||
*/
|
||||
kind: "text_span" | "pdf_page_span" | "transcript_timestamp_span";
|
||||
/**
|
||||
* Page
|
||||
* @default null
|
||||
*/
|
||||
page: number | null;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Start */
|
||||
start: number;
|
||||
/**
|
||||
* Time End Ms
|
||||
* @default null
|
||||
*/
|
||||
time_end_ms: number | null;
|
||||
/**
|
||||
* Time Start Ms
|
||||
* @default null
|
||||
*/
|
||||
time_start_ms: number | null;
|
||||
};
|
||||
/** IngestReviewDecision */
|
||||
IngestReviewDecision: {
|
||||
/**
|
||||
@@ -966,6 +1081,11 @@ export interface components {
|
||||
excerpt: string;
|
||||
/** Extraction Id */
|
||||
extraction_id: string;
|
||||
/**
|
||||
* Jev Facet Resolutions
|
||||
* @default []
|
||||
*/
|
||||
jev_facet_resolutions: components["schemas"]["JevFacetResolution"][];
|
||||
/**
|
||||
* Jev Facet Scores
|
||||
* @default []
|
||||
@@ -1018,6 +1138,126 @@ export interface components {
|
||||
/** Summary */
|
||||
summary: string;
|
||||
};
|
||||
/** JevFacetOptionScore */
|
||||
IngestReviewItem__JevFacetOptionScore: {
|
||||
/** Label */
|
||||
label: string;
|
||||
/**
|
||||
* Label Id
|
||||
* @default null
|
||||
*/
|
||||
label_id: string | null;
|
||||
/** Probability */
|
||||
probability: number;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
};
|
||||
/** JevFacetResolution */
|
||||
IngestReviewItem__JevFacetResolution: {
|
||||
/**
|
||||
* Added To Project
|
||||
* @default false
|
||||
*/
|
||||
added_to_project: boolean;
|
||||
/** Choice Confidence */
|
||||
choice_confidence: number;
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/** Fit Probability */
|
||||
fit_probability: number;
|
||||
/** New Probability */
|
||||
new_probability: number;
|
||||
/**
|
||||
* Option Probabilities
|
||||
* @default []
|
||||
*/
|
||||
option_probabilities: components["schemas"]["IngestReviewItem__JevFacetOptionScore"][];
|
||||
/** Rank */
|
||||
rank: number;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/**
|
||||
* Selected Label
|
||||
* @default null
|
||||
*/
|
||||
selected_label: string | null;
|
||||
/**
|
||||
* Selected Label Id
|
||||
* @default null
|
||||
*/
|
||||
selected_label_id: string | null;
|
||||
/**
|
||||
* Selected New Label
|
||||
* @default false
|
||||
*/
|
||||
selected_new_label: boolean;
|
||||
/** Value */
|
||||
value: string;
|
||||
};
|
||||
/** JevFacetScore */
|
||||
IngestReviewItem__JevFacetScore: {
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/** Probability */
|
||||
probability: number;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Value */
|
||||
value: string;
|
||||
};
|
||||
/** Locator */
|
||||
IngestReviewItem__Locator: {
|
||||
/** Block Id */
|
||||
block_id: string;
|
||||
/** End */
|
||||
end: number;
|
||||
/**
|
||||
* Kind
|
||||
* @enum {string}
|
||||
*/
|
||||
kind: "text_span" | "pdf_page_span" | "transcript_timestamp_span";
|
||||
/**
|
||||
* Page
|
||||
* @default null
|
||||
*/
|
||||
page: number | null;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Start */
|
||||
start: number;
|
||||
/**
|
||||
* Time End Ms
|
||||
* @default null
|
||||
*/
|
||||
time_end_ms: number | null;
|
||||
/**
|
||||
* Time Start Ms
|
||||
* @default null
|
||||
*/
|
||||
time_start_ms: number | null;
|
||||
};
|
||||
/** IssuedCredential */
|
||||
IssuedCredential: {
|
||||
/** Credential Id */
|
||||
@@ -1025,6 +1265,64 @@ export interface components {
|
||||
/** Token */
|
||||
token: string;
|
||||
};
|
||||
/** JevFacetOptionScore */
|
||||
JevFacetOptionScore: {
|
||||
/** Label */
|
||||
label: string;
|
||||
/** Label Id */
|
||||
label_id?: string | null;
|
||||
/** Probability */
|
||||
probability: number;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
};
|
||||
/** JevFacetResolution */
|
||||
JevFacetResolution: {
|
||||
/**
|
||||
* Added To Project
|
||||
* @default false
|
||||
*/
|
||||
added_to_project: boolean;
|
||||
/** Choice Confidence */
|
||||
choice_confidence: number;
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/** Fit Probability */
|
||||
fit_probability: number;
|
||||
/** New Probability */
|
||||
new_probability: number;
|
||||
/**
|
||||
* Option Probabilities
|
||||
* @default []
|
||||
*/
|
||||
option_probabilities: components["schemas"]["JevFacetOptionScore"][];
|
||||
/** Rank */
|
||||
rank: number;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/** Selected Label */
|
||||
selected_label?: string | null;
|
||||
/** Selected Label Id */
|
||||
selected_label_id?: string | null;
|
||||
/**
|
||||
* Selected New Label
|
||||
* @default false
|
||||
*/
|
||||
selected_new_label: boolean;
|
||||
/** Value */
|
||||
value: string;
|
||||
};
|
||||
/** JevFacetScore */
|
||||
JevFacetScore: {
|
||||
/**
|
||||
@@ -1478,6 +1776,52 @@ export interface components {
|
||||
policy: components["schemas"]["AutoAcceptPolicy"];
|
||||
project: components["schemas"]["ProjectRecord"];
|
||||
};
|
||||
/** ProjectFacetLabel */
|
||||
ProjectFacetLabel: {
|
||||
/**
|
||||
* Aliases
|
||||
* @default []
|
||||
*/
|
||||
aliases: string[];
|
||||
/** Canonical Label */
|
||||
canonical_label: string;
|
||||
/**
|
||||
* Created At
|
||||
* Format: date-time
|
||||
*/
|
||||
created_at: string;
|
||||
/** Definition */
|
||||
definition: string;
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/** Jev Fit Probability */
|
||||
jev_fit_probability?: number | null;
|
||||
/** Jev Model */
|
||||
jev_model?: string | null;
|
||||
/** Jev New Probability */
|
||||
jev_new_probability?: number | null;
|
||||
/** Label Id */
|
||||
label_id: string;
|
||||
/** Merged Into */
|
||||
merged_into?: string | null;
|
||||
/** Origin Review Id */
|
||||
origin_review_id?: string | null;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/**
|
||||
* Status
|
||||
* @default active
|
||||
* @enum {string}
|
||||
*/
|
||||
status: "active" | "merged" | "retired";
|
||||
};
|
||||
/** ProjectRecord */
|
||||
ProjectRecord: {
|
||||
/** Autonomy Policy Id */
|
||||
@@ -1494,6 +1838,11 @@ export interface components {
|
||||
* @default
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* Facet Labels
|
||||
* @default []
|
||||
*/
|
||||
facet_labels: components["schemas"]["ProjectFacetLabel"][];
|
||||
/** Key Questions */
|
||||
key_questions: string[];
|
||||
/** North Star */
|
||||
@@ -1534,6 +1883,67 @@ export interface components {
|
||||
*/
|
||||
watch_list: string[];
|
||||
};
|
||||
/** ProjectFacetLabel */
|
||||
ProjectRecord__ProjectFacetLabel: {
|
||||
/**
|
||||
* Aliases
|
||||
* @default []
|
||||
*/
|
||||
aliases: string[];
|
||||
/** Canonical Label */
|
||||
canonical_label: string;
|
||||
/**
|
||||
* Created At
|
||||
* Format: date-time
|
||||
*/
|
||||
created_at: string;
|
||||
/** Definition */
|
||||
definition: string;
|
||||
/**
|
||||
* Facet
|
||||
* @enum {string}
|
||||
*/
|
||||
facet: "tags" | "audience" | "use_for" | "domain";
|
||||
/**
|
||||
* Jev Fit Probability
|
||||
* @default null
|
||||
*/
|
||||
jev_fit_probability: number | null;
|
||||
/**
|
||||
* Jev Model
|
||||
* @default null
|
||||
*/
|
||||
jev_model: string | null;
|
||||
/**
|
||||
* Jev New Probability
|
||||
* @default null
|
||||
*/
|
||||
jev_new_probability: number | null;
|
||||
/** Label Id */
|
||||
label_id: string;
|
||||
/**
|
||||
* Merged Into
|
||||
* @default null
|
||||
*/
|
||||
merged_into: string | null;
|
||||
/**
|
||||
* Origin Review Id
|
||||
* @default null
|
||||
*/
|
||||
origin_review_id: string | null;
|
||||
/**
|
||||
* Schema Version
|
||||
* @default 1
|
||||
* @constant
|
||||
*/
|
||||
schema_version: 1;
|
||||
/**
|
||||
* Status
|
||||
* @default active
|
||||
* @enum {string}
|
||||
*/
|
||||
status: "active" | "merged" | "retired";
|
||||
};
|
||||
/**
|
||||
* ProjectStatus
|
||||
* @enum {string}
|
||||
|
||||
@@ -26,6 +26,13 @@ type IngestReview = {
|
||||
jev_relation_probability?: number | null; jev_lens?: string | null;
|
||||
jev_lens_confidence?: number | null; jev_model?: string | null;
|
||||
jev_facet_scores?: { facet: 'tags' | 'audience' | 'use_for' | 'domain'; value: string; probability: number }[];
|
||||
jev_facet_resolutions?: {
|
||||
facet: 'tags' | 'audience' | 'use_for' | 'domain'; value: string;
|
||||
fit_probability: number; selected_label?: string | null; selected_new_label: boolean;
|
||||
new_probability: number;
|
||||
choice_confidence: number; rank: number; added_to_project: boolean;
|
||||
option_probabilities: { label_id?: string | null; label: string; probability: number }[];
|
||||
}[];
|
||||
relevance: 'borderline' | 'low'; status: string; created_at: string;
|
||||
};
|
||||
|
||||
@@ -76,6 +83,7 @@ function IngestReviewSection({ csrf, projects, onError, onMessage }: {
|
||||
<p>{item.excerpt}</p><p className="muted-copy">{item.relevance_rationale}</p>
|
||||
{item.jev_relation_probability != null ? <p className="muted-copy">Jev relevance: {Math.round(item.jev_relation_probability * 100)}% · lens: {item.jev_lens ?? 'unknown'} ({item.jev_lens_confidence != null ? `${Math.round(item.jev_lens_confidence * 100)}% confidence` : 'no confidence score'}) · {item.jev_model}</p> : <p className="muted-copy">Jev signal unavailable or not configured.</p>}
|
||||
{!!item.jev_facet_scores?.length && <p className="muted-copy">Facet suggestions: {item.jev_facet_scores.map(score => `${score.facet.replace('_', ' ')} “${score.value}” (${Math.round(score.probability * 100)}%)`).join(' · ')}</p>}
|
||||
{!!item.jev_facet_resolutions?.length && <p className="muted-copy">Label decisions: {item.jev_facet_resolutions.map(label => `${label.facet.replace('_', ' ')} “${label.value}” → ${label.added_to_project ? 'added as a new project label' : label.selected_label ? `reused “${label.selected_label}”` : label.selected_new_label ? 'new label suggested, not added' : 'no label selected'} (fit ${Math.round(label.fit_probability * 100)}%, new ${Math.round(label.new_probability * 100)}%, confidence ${Math.round(label.choice_confidence * 100)}%, top-N rank ${label.rank}; options: ${label.option_probabilities.map(option => `${option.label} ${Math.round(option.probability * 100)}%`).join(', ')})`).join(' · ')}</p>}
|
||||
<p className="muted-copy">Source {item.source_revision_id} · {item.locator.kind.replaceAll('_', ' ')} {item.locator.page ? `· page ${item.locator.page}` : ''} · run {item.run_id}</p>
|
||||
<label>Decision reason<textarea maxLength={2000} value={rationales[item.review_id] ?? ''} onChange={event => setRationales(value => ({ ...value, [item.review_id]: event.target.value }))} /></label>
|
||||
<label><input type="checkbox" checked={saveGuidance[item.review_id] ?? false} onChange={event => setSaveGuidance(value => ({ ...value, [item.review_id]: event.target.checked }))} /> Save a reusable rule for this project and lens</label>
|
||||
|
||||
Reference in new issue
Block a user