feat: bound agent facet label proposals

This commit is contained in:
vasily committed 2026-10-14 21:53:35 +08:00
1 parent 6adc5a0d35
commit 1e5beb5fc2
7 files changed
+999 -6

No files matched your search

@@ -0,0 +1,277 @@
{
"$defs": {
"FacetLabelProposal": {
"additionalProperties": false,
"properties": {
"definition": {
"maxLength": 500,
"minLength": 1,
"title": "Definition",
"type": "string"
},
"facet": {
"enum": [
"tags",
"audience",
"use_for",
"domain"
],
"title": "Facet",
"type": "string"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"value": {
"maxLength": 100,
"minLength": 1,
"title": "Value",
"type": "string"
}
},
"required": [
"facet",
"value",
"definition"
],
"title": "FacetLabelProposal",
"type": "object"
},
"Locator": {
"additionalProperties": false,
"properties": {
"block_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Block Id",
"type": "string"
},
"end": {
"exclusiveMinimum": 0,
"title": "End",
"type": "integer"
},
"kind": {
"enum": [
"text_span",
"pdf_page_span",
"transcript_timestamp_span"
],
"title": "Kind",
"type": "string"
},
"page": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Page"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"start": {
"minimum": 0,
"title": "Start",
"type": "integer"
},
"time_end_ms": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Time End Ms"
},
"time_start_ms": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Time Start Ms"
}
},
"required": [
"kind",
"block_id",
"start",
"end"
],
"title": "Locator",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"candidate_audience": {
"default": [],
"items": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"maxItems": 3,
"title": "Candidate Audience",
"type": "array"
},
"candidate_domain": {
"default": [],
"items": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"maxItems": 3,
"title": "Candidate Domain",
"type": "array"
},
"candidate_facet_labels": {
"default": [],
"items": {
"$ref": "#/$defs/FacetLabelProposal"
},
"maxItems": 14,
"title": "Candidate Facet Labels",
"type": "array"
},
"candidate_tags": {
"default": [],
"items": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"maxItems": 5,
"title": "Candidate Tags",
"type": "array"
},
"candidate_use_for": {
"default": [],
"items": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"maxItems": 3,
"title": "Candidate Use For",
"type": "array"
},
"excerpt": {
"maxLength": 4000,
"minLength": 1,
"title": "Excerpt",
"type": "string"
},
"extraction_id": {
"pattern": "^[a-f0-9]{64}$",
"title": "Extraction Id",
"type": "string"
},
"lens": {
"enum": [
"technical",
"conceptual",
"cultural-historical",
"financial-market"
],
"title": "Lens",
"type": "string"
},
"locator": {
"$ref": "#/$defs/Locator"
},
"project_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Project Id",
"type": "string"
},
"relevance": {
"default": "borderline",
"enum": [
"borderline",
"low"
],
"title": "Relevance",
"type": "string"
},
"relevance_rationale": {
"maxLength": 2000,
"minLength": 1,
"title": "Relevance Rationale",
"type": "string"
},
"review_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Review Id",
"type": "string"
},
"run_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Run Id",
"type": "string"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"source_revision_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Source Revision Id",
"type": "string"
},
"summary": {
"maxLength": 2000,
"minLength": 1,
"title": "Summary",
"type": "string"
}
},
"required": [
"review_id",
"project_id",
"run_id",
"source_revision_id",
"extraction_id",
"locator",
"excerpt",
"lens",
"summary",
"relevance_rationale"
],
"title": "IngestReviewCreate",
"type": "object"
}
@@ -0,0 +1,66 @@
{
"additionalProperties": false,
"properties": {
"decision": {
"enum": [
"include",
"exclude",
"defer"
],
"title": "Decision",
"type": "string"
},
"decision_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Decision Id",
"type": "string"
},
"guidance_rule": {
"anyOf": [
{
"maxLength": 1000,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Guidance Rule"
},
"rationale": {
"maxLength": 2000,
"minLength": 1,
"title": "Rationale",
"type": "string"
},
"review_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Review Id",
"type": "string"
},
"save_as_guidance": {
"default": false,
"title": "Save As Guidance",
"type": "boolean"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
}
},
"required": [
"decision_id",
"review_id",
"decision",
"rationale"
],
"title": "IngestReviewDecision",
"type": "object"
}
@@ -0,0 +1,479 @@
{
"$defs": {
"JevFacetOptionScore": {
"additionalProperties": false,
"properties": {
"label": {
"maxLength": 100,
"minLength": 1,
"title": "Label",
"type": "string"
},
"label_id": {
"anyOf": [
{
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label Id"
},
"probability": {
"maximum": 1,
"minimum": 0,
"title": "Probability",
"type": "number"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
}
},
"required": [
"label",
"probability"
],
"title": "JevFacetOptionScore",
"type": "object"
},
"JevFacetResolution": {
"additionalProperties": false,
"properties": {
"added_to_project": {
"default": false,
"title": "Added To Project",
"type": "boolean"
},
"choice_confidence": {
"maximum": 1,
"minimum": 0,
"title": "Choice Confidence",
"type": "number"
},
"facet": {
"enum": [
"tags",
"audience",
"use_for",
"domain"
],
"title": "Facet",
"type": "string"
},
"fit_probability": {
"maximum": 1,
"minimum": 0,
"title": "Fit Probability",
"type": "number"
},
"new_probability": {
"maximum": 1,
"minimum": 0,
"title": "New Probability",
"type": "number"
},
"option_probabilities": {
"default": [],
"items": {
"$ref": "#/$defs/JevFacetOptionScore"
},
"maxItems": 6,
"title": "Option Probabilities",
"type": "array"
},
"rank": {
"maximum": 20,
"minimum": 1,
"title": "Rank",
"type": "integer"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"selected_label": {
"anyOf": [
{
"maxLength": 100,
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Selected Label"
},
"selected_label_id": {
"anyOf": [
{
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Selected Label Id"
},
"selected_new_label": {
"default": false,
"title": "Selected New Label",
"type": "boolean"
},
"value": {
"maxLength": 100,
"minLength": 1,
"title": "Value",
"type": "string"
}
},
"required": [
"facet",
"value",
"fit_probability",
"new_probability",
"choice_confidence",
"rank"
],
"title": "JevFacetResolution",
"type": "object"
},
"JevFacetScore": {
"additionalProperties": false,
"properties": {
"facet": {
"enum": [
"tags",
"audience",
"use_for",
"domain"
],
"title": "Facet",
"type": "string"
},
"probability": {
"maximum": 1,
"minimum": 0,
"title": "Probability",
"type": "number"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"value": {
"maxLength": 100,
"minLength": 1,
"title": "Value",
"type": "string"
}
},
"required": [
"facet",
"value",
"probability"
],
"title": "JevFacetScore",
"type": "object"
},
"Locator": {
"additionalProperties": false,
"properties": {
"block_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Block Id",
"type": "string"
},
"end": {
"exclusiveMinimum": 0,
"title": "End",
"type": "integer"
},
"kind": {
"enum": [
"text_span",
"pdf_page_span",
"transcript_timestamp_span"
],
"title": "Kind",
"type": "string"
},
"page": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Page"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"start": {
"minimum": 0,
"title": "Start",
"type": "integer"
},
"time_end_ms": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Time End Ms"
},
"time_start_ms": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Time Start Ms"
}
},
"required": [
"kind",
"block_id",
"start",
"end"
],
"title": "Locator",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"created_at": {
"format": "date-time",
"title": "Created At",
"type": "string"
},
"excerpt": {
"maxLength": 4000,
"minLength": 1,
"title": "Excerpt",
"type": "string"
},
"extraction_id": {
"pattern": "^[a-f0-9]{64}$",
"title": "Extraction Id",
"type": "string"
},
"jev_facet_resolutions": {
"default": [],
"items": {
"$ref": "#/$defs/JevFacetResolution"
},
"maxItems": 20,
"title": "Jev Facet Resolutions",
"type": "array"
},
"jev_facet_scores": {
"default": [],
"items": {
"$ref": "#/$defs/JevFacetScore"
},
"maxItems": 20,
"title": "Jev Facet Scores",
"type": "array"
},
"jev_lens": {
"anyOf": [
{
"enum": [
"technical",
"conceptual",
"cultural-historical",
"financial-market"
],
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev Lens"
},
"jev_lens_confidence": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev Lens Confidence"
},
"jev_model": {
"anyOf": [
{
"maxLength": 100,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev Model"
},
"jev_relation_probability": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev Relation Probability"
},
"lens": {
"enum": [
"technical",
"conceptual",
"cultural-historical",
"financial-market"
],
"title": "Lens",
"type": "string"
},
"locator": {
"$ref": "#/$defs/Locator"
},
"project_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Project Id",
"type": "string"
},
"relevance": {
"default": "borderline",
"enum": [
"borderline",
"low"
],
"title": "Relevance",
"type": "string"
},
"relevance_rationale": {
"maxLength": 2000,
"minLength": 1,
"title": "Relevance Rationale",
"type": "string"
},
"review_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Review Id",
"type": "string"
},
"run_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Run Id",
"type": "string"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"source_revision_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Source Revision Id",
"type": "string"
},
"status": {
"default": "needs-user-review",
"enum": [
"needs-user-review",
"included",
"excluded",
"deferred"
],
"title": "Status",
"type": "string"
},
"submitted_by": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Submitted By",
"type": "string"
},
"summary": {
"maxLength": 2000,
"minLength": 1,
"title": "Summary",
"type": "string"
}
},
"required": [
"review_id",
"project_id",
"run_id",
"source_revision_id",
"extraction_id",
"locator",
"excerpt",
"lens",
"summary",
"relevance_rationale",
"submitted_by",
"created_at"
],
"title": "IngestReviewItem",
"type": "object"
}
+155
View File
@@ -1,5 +1,151 @@
{
"$defs": {
"ProjectFacetLabel": {
"additionalProperties": false,
"properties": {
"aliases": {
"default": [],
"items": {
"maxLength": 100,
"minLength": 1,
"type": "string"
},
"maxItems": 20,
"title": "Aliases",
"type": "array"
},
"canonical_label": {
"maxLength": 100,
"minLength": 1,
"title": "Canonical Label",
"type": "string"
},
"created_at": {
"format": "date-time",
"title": "Created At",
"type": "string"
},
"definition": {
"maxLength": 500,
"minLength": 1,
"title": "Definition",
"type": "string"
},
"facet": {
"enum": [
"tags",
"audience",
"use_for",
"domain"
],
"title": "Facet",
"type": "string"
},
"jev_fit_probability": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev Fit Probability"
},
"jev_model": {
"anyOf": [
{
"maxLength": 100,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev Model"
},
"jev_new_probability": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Jev New Probability"
},
"label_id": {
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"title": "Label Id",
"type": "string"
},
"merged_into": {
"anyOf": [
{
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Merged Into"
},
"origin_review_id": {
"anyOf": [
{
"maxLength": 128,
"minLength": 1,
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Review Id"
},
"schema_version": {
"const": 1,
"default": 1,
"title": "Schema Version",
"type": "integer"
},
"status": {
"default": "active",
"enum": [
"active",
"merged",
"retired"
],
"title": "Status",
"type": "string"
}
},
"required": [
"label_id",
"facet",
"canonical_label",
"definition",
"created_at"
],
"title": "ProjectFacetLabel",
"type": "object"
},
"ProjectStatus": {
"enum": [
"active",
@@ -38,6 +184,15 @@
"title": "Description",
"type": "string"
},
"facet_labels": {
"default": [],
"items": {
"$ref": "#/$defs/ProjectFacetLabel"
},
"maxItems": 2000,
"title": "Facet Labels",
"type": "array"
},
"key_questions": {
"items": {
"type": "string"
+13 -1
View File
@@ -230,6 +230,18 @@
"path": "schemas/ExtractionRecord.schema.json",
"sha256": "5b7c6c8a46696736ef90fca1b1eac6d17dd9918ed12e9c212a776651b0c31937"
},
{
"path": "schemas/IngestReviewCreate.schema.json",
"sha256": "0db108b90265d2089ce8df3d2734865a13f7abb1dfba85058b9bbec5fcac426d"
},
{
"path": "schemas/IngestReviewDecision.schema.json",
"sha256": "5f62ad3fd8035130cb5e31141eeef1f83acc55727246bc7bf82b43fca6697a9f"
},
{
"path": "schemas/IngestReviewItem.schema.json",
"sha256": "5cf759227279a87552bc2f43d4545a68c00a8702afce87b2088bc6f276a85f27"
},
{
"path": "schemas/KnowledgeNode.schema.json",
"sha256": "62efb24c24967c2339c1ba605fa498ffa54459b027b6236421f30f2c4f9437ce"
@@ -240,7 +252,7 @@
},
{
"path": "schemas/ProjectRecord.schema.json",
"sha256": "f69f0987b556f3aa9aa71d310a890cb4a46de790360356b31aae572659c6f1eb"
"sha256": "bba7461c640c05734f668fd1568b6a80b2c9569e81c3efd289875aff46a168da"
},
{
"path": "schemas/ProposalReceipt.schema.json",