@fortemi/core 2026.7.4 → 2026.7.5
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/aiwg-index-schema.d.ts +9 -0
- package/dist/aiwg-index-schema.js +724 -0
- package/dist/aiwg-index-schema.js.map +1 -0
- package/dist/aiwg-index.d.ts +493 -1
- package/dist/aiwg-index.js +15 -2375
- package/dist/aiwg-index.js.map +1 -1
- package/dist/index.d.ts +820 -8
- package/dist/index.js +1229 -1061
- package/dist/index.js.map +1 -1
- package/package.json +5 -1
- package/dist/aiwg-index-C2G7iy-b.d.ts +0 -826
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../schemas/aiwg-fortemi-index-export.schema.json","../src/aiwg-index-schema.ts"],"names":[],"mappings":";;;;;AAAA,IAAA,wCAAA,GAAA;AAAA,EACE,OAAA,EAAW,8CAAA;AAAA,EACX,GAAA,EAAO,wDAAA;AAAA,EACP,KAAA,EAAS,2BAAA;AAAA,EACT,IAAA,EAAQ,QAAA;AAAA,EACR,oBAAA,EAAwB,KAAA;AAAA,EACxB,QAAA,EAAY,CAAC,gBAAA,EAAkB,cAAA,EAAgB,UAAU,OAAO,CAAA;AAAA,EAChE,UAAA,EAAc;AAAA,IACZ,cAAA,EAAkB;AAAA,MAChB,IAAA,EAAQ,CAAC,8BAAA,EAAgC,8BAA8B;AAAA,KACzE;AAAA,IACA,YAAA,EAAgB;AAAA,MACd,IAAA,EAAQ,QAAA;AAAA,MACR,MAAA,EAAU;AAAA,KACZ;AAAA,IACA,MAAA,EAAU;AAAA,MACR,IAAA,EAAQ,QAAA;AAAA,MACR,oBAAA,EAAwB,KAAA;AAAA,MACxB,QAAA,EAAY,CAAC,MAAA,EAAQ,SAAS,CAAA;AAAA,MAC9B,UAAA,EAAc;AAAA,QACZ,IAAA,EAAQ;AAAA,UACN,IAAA,EAAQ,QAAA;AAAA,UACR,SAAA,EAAa;AAAA,SACf;AAAA,QACA,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O,EAAE,KAAA,EAAO,MAAA,EAAQ,YAAA,CAAa,QAAA,CAAS,MAAM,CAAA,EAAE;AACxD;AAEO,SAAS,yCAAyC,KAAA,EAAiD;AACxG,EAAA,MAAM,WAAW,2BAAA,EAA4B;AAC7C,EAAA,MAAM,KAAA,GAAQ,SAAS,KAAK,CAAA;AAC5B,EAAA,OAAO,EAAE,KAAA,EAAO,MAAA,EAAQ,YAAA,CAAa,QAAA,CAAS,MAAM,CAAA,EAAE;AACxD","file":"aiwg-index-schema.js","sourcesContent":["{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"$id\": \"https://aiwg.io/schemas/aiwg-fortemi-index-export.json\",\n \"title\": \"AIWG Fortemi Index Export\",\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"schema_version\", \"generated_at\", \"source\", \"items\"],\n \"properties\": {\n \"schema_version\": {\n \"enum\": [\"aiwg.fortemi.index.export.v1\", \"aiwg.fortemi.index.export.v2\"]\n },\n \"generated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"source\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"repo\", \"privacy\"],\n \"properties\": {\n \"repo\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"graph\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n }\n },\n \"compatibility\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"previous_schema_version\", \"strategy\"],\n \"properties\": {\n \"previous_schema_version\": {\n \"const\": \"aiwg.fortemi.index.export.v1\"\n },\n \"strategy\": {\n \"const\": \"supported\"\n }\n }\n },\n \"items\": {\n \"type\": \"array\",\n \"items\": {\n \"$ref\": \"#/$defs/record\"\n }\n }\n },\n \"allOf\": [\n {\n \"if\": {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.export.v1\"\n }\n }\n },\n \"then\": {\n \"not\": {\n \"required\": [\"compatibility\"]\n },\n \"properties\": {\n \"source\": {\n \"not\": {\n \"required\": [\"graph\"]\n }\n },\n \"items\": {\n \"items\": {\n \"allOf\": [\n {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.record.v1\"\n }\n }\n },\n {\n \"$ref\": \"#/$defs/v1RecordCompatibility\"\n }\n ]\n }\n }\n }\n }\n },\n {\n \"if\": {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.export.v2\"\n }\n }\n },\n \"then\": {\n \"required\": [\"compatibility\"],\n \"properties\": {\n \"source\": {\n \"required\": [\"graph\"]\n },\n \"items\": {\n \"items\": {\n \"properties\": {\n \"schema_version\": {\n \"const\": \"aiwg.fortemi.index.record.v2\"\n }\n }\n }\n }\n }\n }\n }\n ],\n \"$defs\": {\n \"privacy\": {\n \"enum\": [\"private\", \"sanitized\", \"public\"]\n },\n \"recordType\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"stringArray\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"numberArray\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"number\"\n }\n },\n \"v1RecordCompatibility\": {\n \"type\": \"object\",\n \"not\": {\n \"anyOf\": [\n {\n \"required\": [\"name\"]\n },\n {\n \"required\": [\"summary\"]\n },\n {\n \"required\": [\"search\"]\n },\n {\n \"required\": [\"chunks\"]\n },\n {\n \"required\": [\"embeddings\"]\n },\n {\n \"required\": [\"compatibility\"]\n },\n {\n \"required\": [\"skos_concepts\"]\n },\n {\n \"required\": [\"skos_relations\"]\n },\n {\n \"required\": [\"provenance_events\"]\n }\n ]\n },\n \"properties\": {\n \"source\": {\n \"not\": {\n \"anyOf\": [\n {\n \"required\": [\"origin\"]\n },\n {\n \"required\": [\"generated\"]\n },\n {\n \"required\": [\"checksum\"]\n },\n {\n \"required\": [\"updated_at\"]\n }\n ]\n }\n },\n \"relationships\": {\n \"items\": {\n \"not\": {\n \"anyOf\": [\n {\n \"required\": [\"target_path\"]\n },\n {\n \"required\": [\"direction\"]\n },\n {\n \"required\": [\"label\"]\n },\n {\n \"required\": [\"confidence\"]\n },\n {\n \"required\": [\"privacy\"]\n },\n {\n \"required\": [\"metadata\"]\n }\n ]\n }\n }\n },\n \"privacy\": {\n \"not\": {\n \"required\": [\"locality\"]\n }\n }\n }\n },\n \"record\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"schema_version\",\n \"id\",\n \"type\",\n \"source\",\n \"title\",\n \"text\",\n \"facets\",\n \"tags\",\n \"concepts\",\n \"relationships\",\n \"provenance\",\n \"privacy\",\n \"updated_at\"\n ],\n \"properties\": {\n \"schema_version\": {\n \"enum\": [\n \"aiwg.fortemi.index.record.v1\",\n \"aiwg.fortemi.index.record.v2\"\n ]\n },\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"type\": {\n \"$ref\": \"#/$defs/recordType\"\n },\n \"source\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"path\", \"repo_relative_path\", \"locator\"],\n \"properties\": {\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"repo_relative_path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"locator\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"origin\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"generated\": {\n \"type\": \"boolean\"\n },\n \"checksum\": {\n \"type\": \"string\"\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n },\n \"title\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"search\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\n \"title\",\n \"body\",\n \"triggers\",\n \"aliases\",\n \"tags\",\n \"frontmatter\"\n ],\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"body\": {\n \"type\": \"string\"\n },\n \"triggers\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"aliases\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"capability\": {\n \"type\": \"string\"\n },\n \"tags\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"phase\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\"\n },\n \"frontmatter\": {\n \"type\": \"object\"\n }\n }\n },\n \"facets\": {\n \"type\": \"object\",\n \"additionalProperties\": {\n \"$ref\": \"#/$defs/stringArray\"\n }\n },\n \"tags\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"concepts\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"relationships\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"target_id\"],\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"target_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"target_path\": {\n \"type\": \"string\"\n },\n \"direction\": {\n \"enum\": [\"upstream\", \"downstream\", \"related\"]\n },\n \"label\": {\n \"type\": \"string\"\n },\n \"confidence\": {\n \"type\": \"number\"\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"metadata\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"provenance\": {\n \"type\": \"array\",\n \"minItems\": 1,\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"field\", \"source\", \"path\", \"confidence\", \"privacy\"],\n \"properties\": {\n \"field\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"path\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"confidence\": {\n \"enum\": [\"source\", \"candidate\", \"reviewed\", \"rejected\"]\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n }\n }\n }\n },\n \"privacy\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"classification\", \"pii\"],\n \"properties\": {\n \"classification\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"pii\": {\n \"type\": \"boolean\"\n },\n \"locality\": {\n \"enum\": [\"project\", \"framework\", \"external\"]\n }\n }\n },\n \"chunks\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"text\": {\n \"type\": \"string\"\n },\n \"body\": {\n \"type\": \"string\"\n },\n \"summary\": {\n \"type\": \"string\"\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"metadata\": {\n \"type\": \"object\"\n },\n \"checksum\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"embeddings\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"model\": {\n \"type\": \"string\"\n },\n \"embedding\": {\n \"$ref\": \"#/$defs/numberArray\"\n },\n \"vector\": {\n \"$ref\": \"#/$defs/numberArray\"\n },\n \"granularity\": {\n \"type\": \"string\"\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"metadata\": {\n \"type\": \"object\"\n },\n \"chunk_id\": {\n \"type\": \"string\"\n },\n \"vector_ref\": {\n \"type\": \"string\"\n },\n \"input_hash\": {\n \"type\": \"string\"\n }\n }\n }\n },\n \"compatibility\": {\n \"type\": \"object\"\n },\n \"skos_concepts\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"id\", \"prefLabel\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"prefLabel\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"definition\": {\n \"type\": \"string\"\n },\n \"scheme\": {\n \"type\": \"string\"\n },\n \"notation\": {\n \"type\": \"string\"\n },\n \"uri\": {\n \"type\": \"string\"\n },\n \"altLabels\": {\n \"$ref\": \"#/$defs/stringArray\"\n },\n \"metadata\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"skos_relations\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"type\", \"source_id\", \"target_id\"],\n \"properties\": {\n \"type\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"target_id\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"source_path\": {\n \"type\": \"string\"\n },\n \"metadata\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"provenance_events\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"activity\"],\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n },\n \"activity\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"agent\": {\n \"type\": \"string\"\n },\n \"started_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"ended_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n },\n \"source\": {\n \"type\": \"string\"\n },\n \"path\": {\n \"type\": \"string\"\n },\n \"confidence\": {\n \"enum\": [\"source\", \"candidate\", \"reviewed\", \"rejected\"]\n },\n \"privacy\": {\n \"$ref\": \"#/$defs/privacy\"\n },\n \"attributes\": {\n \"type\": \"object\"\n }\n }\n }\n },\n \"updated_at\": {\n \"type\": \"string\",\n \"format\": \"date-time\"\n }\n }\n }\n }\n}\n","import Ajv2020 from 'ajv/dist/2020.js'\nimport type { ErrorObject, ValidateFunction } from 'ajv'\nimport schema from '../schemas/aiwg-fortemi-index-export.schema.json' with { type: 'json' }\n\nexport interface AiwgIndexSchemaValidationResult {\n valid: boolean\n errors: string[]\n}\n\nconst PROJECTED_FIELDS = [\n 'schema_version',\n 'id',\n 'type',\n 'title',\n 'text',\n 'facets',\n 'tags',\n 'concepts',\n 'privacy',\n] as const\n\nlet ajvInstance: Ajv2020 | undefined\nlet exportValidator: ValidateFunction | undefined\nlet projectedRecordValidator: ValidateFunction | undefined\n\nexport function getAiwgFortemiIndexExportSchema(): unknown {\n return schema\n}\n\nfunction getAjv(): Ajv2020 {\n if (!ajvInstance) {\n ajvInstance = new Ajv2020({\n allErrors: true,\n strict: false,\n validateFormats: false,\n })\n ajvInstance.addSchema(schema)\n }\n return ajvInstance\n}\n\nfunction formatErrors(errors: ErrorObject[] | null | undefined): string[] {\n return (errors ?? []).map((error) => {\n const path = error.instancePath || '(root)'\n return `${path} ${error.message ?? 'is invalid'}`\n })\n}\n\nfunction getExportValidator(): ValidateFunction {\n exportValidator ??= getAjv().getSchema(schema.$id) ?? getAjv().compile(schema)\n return exportValidator\n}\n\nfunction getProjectedRecordValidator(): ValidateFunction {\n if (!projectedRecordValidator) {\n const properties = Object.fromEntries(Object.keys(schema.$defs.record.properties).map((field) => [\n field,\n { $ref: `${schema.$id}#/$defs/record/properties/${field}` },\n ]))\n projectedRecordValidator = getAjv().compile({\n type: 'object',\n required: PROJECTED_FIELDS,\n properties,\n additionalProperties: true,\n allOf: [\n {\n if: {\n properties: {\n schema_version: { const: 'aiwg.fortemi.index.record.v1' },\n },\n },\n then: { $ref: `${schema.$id}#/$defs/v1RecordCompatibility` },\n },\n ],\n })\n }\n return projectedRecordValidator\n}\n\nexport function validateAiwgFortemiIndexExportSchema(value: unknown): AiwgIndexSchemaValidationResult {\n const validate = getExportValidator()\n // `binary_sources` is a documented fortemi-react attachment-text extension;\n // upstream intentionally omits it. Validate every upstream field against the\n // pinned authority while keeping that local extension out of the schema input.\n const schemaValue = value && typeof value === 'object' && Array.isArray((value as { items?: unknown }).items)\n ? {\n ...(value as Record<string, unknown>),\n items: (value as { items: unknown[] }).items.map((item) => {\n if (!item || typeof item !== 'object' || Array.isArray(item)) return item\n const schemaRecord = { ...(item as Record<string, unknown>) }\n Reflect.deleteProperty(schemaRecord, 'binary_sources')\n return schemaRecord\n }),\n }\n : value\n const valid = validate(schemaValue)\n return { valid, errors: formatErrors(validate.errors) }\n}\n\nexport function validateAiwgFortemiProjectedRecordSchema(value: unknown): AiwgIndexSchemaValidationResult {\n const validate = getProjectedRecordValidator()\n const valid = validate(value)\n return { valid, errors: formatErrors(validate.errors) }\n}\n"]}
|
package/dist/aiwg-index.d.ts
CHANGED
|
@@ -1 +1,493 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shard format types — matches the fortemi server matric-shard specification.
|
|
3
|
+
*
|
|
4
|
+
* A shard is a gzip-compressed tar archive (.shard) containing serialized
|
|
5
|
+
* knowledge data with a manifest for integrity verification.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface ShardAttachmentReference {
|
|
9
|
+
id: string;
|
|
10
|
+
path: string;
|
|
11
|
+
mime: string | null;
|
|
12
|
+
checksum: string;
|
|
13
|
+
bytes: number;
|
|
14
|
+
}
|
|
15
|
+
interface ShardAttachmentProjection {
|
|
16
|
+
extracted_text: string | null;
|
|
17
|
+
attachment: ShardAttachmentReference;
|
|
18
|
+
}
|
|
19
|
+
/** @deprecated Legacy React shard field name. Server shards use `attachments`. */
|
|
20
|
+
type ShardBinarySource = ShardAttachmentProjection;
|
|
21
|
+
|
|
22
|
+
type AiwgFortemiRecordType = string;
|
|
23
|
+
type AiwgFortemiRecordSchemaVersion = 'aiwg.fortemi.index.record.v1' | 'aiwg.fortemi.index.record.v2';
|
|
24
|
+
type AiwgFortemiIndexExportSchemaVersion = 'aiwg.fortemi.index.export.v1' | 'aiwg.fortemi.index.export.v2';
|
|
25
|
+
type AiwgPrivacyClassification = 'private' | 'sanitized' | 'public';
|
|
26
|
+
type AiwgProvenanceConfidence = 'source' | 'candidate' | 'reviewed' | 'rejected';
|
|
27
|
+
type AiwgReviewAction = 'accept' | 'reject' | 'defer';
|
|
28
|
+
type AiwgFortemiRelationshipDirection = 'upstream' | 'downstream' | 'related';
|
|
29
|
+
interface AiwgFortemiRecordSource {
|
|
30
|
+
path: string;
|
|
31
|
+
repo_relative_path: string;
|
|
32
|
+
locator: string;
|
|
33
|
+
origin?: string;
|
|
34
|
+
generated?: boolean;
|
|
35
|
+
checksum?: string;
|
|
36
|
+
updated_at?: string;
|
|
37
|
+
}
|
|
38
|
+
interface AiwgFortemiRelationship {
|
|
39
|
+
type: string;
|
|
40
|
+
target_id: string;
|
|
41
|
+
source_path?: string;
|
|
42
|
+
target_path?: string;
|
|
43
|
+
direction?: AiwgFortemiRelationshipDirection;
|
|
44
|
+
label?: string;
|
|
45
|
+
confidence?: number;
|
|
46
|
+
privacy?: AiwgPrivacyClassification;
|
|
47
|
+
metadata?: Record<string, unknown>;
|
|
48
|
+
}
|
|
49
|
+
interface AiwgFortemiProvenance {
|
|
50
|
+
field: string;
|
|
51
|
+
source: string;
|
|
52
|
+
path: string;
|
|
53
|
+
confidence: AiwgProvenanceConfidence;
|
|
54
|
+
privacy: AiwgPrivacyClassification;
|
|
55
|
+
}
|
|
56
|
+
type AiwgFortemiSkosRelationType = 'broader' | 'narrower' | 'related' | string;
|
|
57
|
+
interface AiwgFortemiSkosConcept {
|
|
58
|
+
id: string;
|
|
59
|
+
prefLabel: string;
|
|
60
|
+
definition?: string;
|
|
61
|
+
scheme?: string;
|
|
62
|
+
notation?: string;
|
|
63
|
+
uri?: string;
|
|
64
|
+
altLabels?: string[];
|
|
65
|
+
metadata?: Record<string, unknown>;
|
|
66
|
+
}
|
|
67
|
+
interface AiwgFortemiSkosRelation {
|
|
68
|
+
type: AiwgFortemiSkosRelationType;
|
|
69
|
+
source_id: string;
|
|
70
|
+
target_id: string;
|
|
71
|
+
source_path?: string;
|
|
72
|
+
metadata?: Record<string, unknown>;
|
|
73
|
+
}
|
|
74
|
+
interface AiwgFortemiProvenanceEvent {
|
|
75
|
+
id?: string;
|
|
76
|
+
activity: string;
|
|
77
|
+
agent?: string;
|
|
78
|
+
started_at?: string;
|
|
79
|
+
ended_at?: string;
|
|
80
|
+
source?: string;
|
|
81
|
+
path?: string;
|
|
82
|
+
confidence?: AiwgProvenanceConfidence;
|
|
83
|
+
privacy?: AiwgPrivacyClassification;
|
|
84
|
+
attributes?: Record<string, unknown>;
|
|
85
|
+
}
|
|
86
|
+
interface AiwgFortemiSearchProjection {
|
|
87
|
+
title?: string;
|
|
88
|
+
name?: string;
|
|
89
|
+
summary?: string;
|
|
90
|
+
body?: string;
|
|
91
|
+
triggers?: string[];
|
|
92
|
+
aliases?: string[];
|
|
93
|
+
capability?: string;
|
|
94
|
+
tags?: string[];
|
|
95
|
+
phase?: string;
|
|
96
|
+
type?: string;
|
|
97
|
+
frontmatter?: Record<string, unknown>;
|
|
98
|
+
}
|
|
99
|
+
interface AiwgFortemiChunk {
|
|
100
|
+
id?: string;
|
|
101
|
+
text?: string;
|
|
102
|
+
body?: string;
|
|
103
|
+
summary?: string;
|
|
104
|
+
source_path?: string;
|
|
105
|
+
metadata?: Record<string, unknown>;
|
|
106
|
+
}
|
|
107
|
+
interface AiwgFortemiRecordEmbedding {
|
|
108
|
+
id?: string;
|
|
109
|
+
embedding?: number[];
|
|
110
|
+
vector?: number[];
|
|
111
|
+
model?: string;
|
|
112
|
+
granularity?: string;
|
|
113
|
+
input_hash?: string;
|
|
114
|
+
source_path?: string;
|
|
115
|
+
metadata?: Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
type AiwgFortemiAttachmentReference = ShardAttachmentReference;
|
|
118
|
+
type AiwgFortemiBinarySource = ShardBinarySource;
|
|
119
|
+
interface AiwgFortemiRecord {
|
|
120
|
+
schema_version: AiwgFortemiRecordSchemaVersion;
|
|
121
|
+
id: string;
|
|
122
|
+
type: AiwgFortemiRecordType;
|
|
123
|
+
source: AiwgFortemiRecordSource;
|
|
124
|
+
title?: string;
|
|
125
|
+
text?: string;
|
|
126
|
+
facets: Record<string, string[]>;
|
|
127
|
+
tags: string[];
|
|
128
|
+
concepts: string[];
|
|
129
|
+
relationships: AiwgFortemiRelationship[];
|
|
130
|
+
provenance: AiwgFortemiProvenance[];
|
|
131
|
+
search?: AiwgFortemiSearchProjection;
|
|
132
|
+
chunks?: AiwgFortemiChunk[];
|
|
133
|
+
binary_sources?: AiwgFortemiBinarySource[];
|
|
134
|
+
embeddings?: AiwgFortemiRecordEmbedding[];
|
|
135
|
+
compatibility?: Record<string, unknown>;
|
|
136
|
+
/** Optional rich SKOS metadata for static consumers that need labels/definitions without opening a shard. */
|
|
137
|
+
skos_concepts?: AiwgFortemiSkosConcept[];
|
|
138
|
+
/** Optional SKOS relationship edges among concepts referenced by this record. */
|
|
139
|
+
skos_relations?: AiwgFortemiSkosRelation[];
|
|
140
|
+
/** Optional W3C PROV-style activity chain for this record. */
|
|
141
|
+
provenance_events?: AiwgFortemiProvenanceEvent[];
|
|
142
|
+
privacy: {
|
|
143
|
+
classification: AiwgPrivacyClassification;
|
|
144
|
+
pii: boolean;
|
|
145
|
+
locality?: string;
|
|
146
|
+
};
|
|
147
|
+
updated_at: string;
|
|
148
|
+
}
|
|
149
|
+
interface AiwgFortemiIndexExport {
|
|
150
|
+
schema_version: AiwgFortemiIndexExportSchemaVersion;
|
|
151
|
+
generated_at: string;
|
|
152
|
+
source: {
|
|
153
|
+
repo: string;
|
|
154
|
+
privacy: AiwgPrivacyClassification;
|
|
155
|
+
graph?: string;
|
|
156
|
+
};
|
|
157
|
+
items: AiwgFortemiRecord[];
|
|
158
|
+
compatibility?: {
|
|
159
|
+
previous_schema_version: 'aiwg.fortemi.index.export.v1';
|
|
160
|
+
strategy: 'supported';
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
interface AiwgFortemiChunkPartRef {
|
|
164
|
+
href: string;
|
|
165
|
+
offset: number;
|
|
166
|
+
count: number;
|
|
167
|
+
}
|
|
168
|
+
declare const AIWG_SCAN_REQUIRED_FIELDS: Array<keyof AiwgFortemiRecord>;
|
|
169
|
+
type AiwgFortemiProjectedRecord = Pick<AiwgFortemiRecord, 'schema_version' | 'id' | 'type' | 'title' | 'text' | 'facets' | 'tags' | 'concepts' | 'privacy'> & Partial<AiwgFortemiRecord>;
|
|
170
|
+
type AiwgDetailIdEncoding = 'uri' | 'base64url';
|
|
171
|
+
interface AiwgFortemiChunkDetailRef {
|
|
172
|
+
href: string;
|
|
173
|
+
encoding?: AiwgDetailIdEncoding;
|
|
174
|
+
}
|
|
175
|
+
interface AiwgFortemiChunkManifest {
|
|
176
|
+
schema_version: 'aiwg.fortemi.index.chunk-manifest.v1';
|
|
177
|
+
generated_at: string;
|
|
178
|
+
source: AiwgFortemiIndexExport['source'];
|
|
179
|
+
source_export_schema_version?: AiwgFortemiIndexExportSchemaVersion;
|
|
180
|
+
total: number;
|
|
181
|
+
part_size: number;
|
|
182
|
+
facets?: Record<string, Record<string, number>>;
|
|
183
|
+
projection?: Array<keyof AiwgFortemiRecord>;
|
|
184
|
+
detail?: AiwgFortemiChunkDetailRef;
|
|
185
|
+
parts: AiwgFortemiChunkPartRef[];
|
|
186
|
+
}
|
|
187
|
+
interface AiwgFortemiChunkPart {
|
|
188
|
+
schema_version: 'aiwg.fortemi.index.chunk.v1';
|
|
189
|
+
manifest_schema_version: 'aiwg.fortemi.index.chunk-manifest.v1';
|
|
190
|
+
offset: number;
|
|
191
|
+
items: AiwgFortemiRecord[];
|
|
192
|
+
}
|
|
193
|
+
interface AiwgIndexValidationResult {
|
|
194
|
+
valid: boolean;
|
|
195
|
+
errors: string[];
|
|
196
|
+
counts: Partial<Record<string, number>>;
|
|
197
|
+
}
|
|
198
|
+
interface AiwgChunkedIndexValidationResult {
|
|
199
|
+
valid: boolean;
|
|
200
|
+
errors: string[];
|
|
201
|
+
}
|
|
202
|
+
interface AiwgIndexQueryOptions {
|
|
203
|
+
types?: AiwgFortemiRecordType[];
|
|
204
|
+
facets?: Record<string, string[]>;
|
|
205
|
+
tags?: string[];
|
|
206
|
+
concepts?: string[];
|
|
207
|
+
privacy?: AiwgPrivacyClassification[];
|
|
208
|
+
relationshipTargetId?: string;
|
|
209
|
+
limit?: number;
|
|
210
|
+
offset?: number;
|
|
211
|
+
rank?: boolean;
|
|
212
|
+
snippets?: boolean;
|
|
213
|
+
snippetLength?: number;
|
|
214
|
+
weights?: Partial<AiwgIndexQueryWeights>;
|
|
215
|
+
includeMatches?: boolean;
|
|
216
|
+
searchProfile?: 'default' | 'aiwg-discovery';
|
|
217
|
+
}
|
|
218
|
+
interface AiwgIndexQueryWeights {
|
|
219
|
+
title: number;
|
|
220
|
+
text: number;
|
|
221
|
+
tag: number;
|
|
222
|
+
concept: number;
|
|
223
|
+
facet: number;
|
|
224
|
+
id: number;
|
|
225
|
+
source: number;
|
|
226
|
+
}
|
|
227
|
+
interface AiwgIndexQueryMatch {
|
|
228
|
+
field: 'title' | 'text' | 'tag' | 'concept' | 'facet' | 'id' | 'source';
|
|
229
|
+
value: string;
|
|
230
|
+
score?: number;
|
|
231
|
+
reason?: string;
|
|
232
|
+
}
|
|
233
|
+
interface AiwgIndexQueryRankedItem {
|
|
234
|
+
item: AiwgFortemiRecord;
|
|
235
|
+
rank: number;
|
|
236
|
+
snippet?: string;
|
|
237
|
+
matches?: AiwgIndexQueryMatch[];
|
|
238
|
+
}
|
|
239
|
+
interface AiwgIndexQueryResult {
|
|
240
|
+
items: AiwgFortemiRecord[];
|
|
241
|
+
total: number;
|
|
242
|
+
facets: Record<string, Record<string, number>>;
|
|
243
|
+
rankedItems?: AiwgIndexQueryRankedItem[];
|
|
244
|
+
}
|
|
245
|
+
type AiwgChunkedIndexLoader = (part: AiwgFortemiChunkPartRef, manifest: AiwgFortemiChunkManifest) => Promise<unknown>;
|
|
246
|
+
type AiwgChunkedIndexDetailLoader = (id: string, manifest: AiwgFortemiChunkManifest) => Promise<unknown>;
|
|
247
|
+
interface AiwgChunkedIndexLoadOptions {
|
|
248
|
+
maxCachedParts?: number;
|
|
249
|
+
detailLoader?: AiwgChunkedIndexDetailLoader;
|
|
250
|
+
maxCachedDetails?: number;
|
|
251
|
+
maxCachedMatches?: number;
|
|
252
|
+
}
|
|
253
|
+
type AiwgChunkedIndexProgressPhase = 'part' | 'query';
|
|
254
|
+
interface AiwgChunkedIndexProgress {
|
|
255
|
+
phase: AiwgChunkedIndexProgressPhase;
|
|
256
|
+
done: number;
|
|
257
|
+
total: number;
|
|
258
|
+
href?: string;
|
|
259
|
+
}
|
|
260
|
+
interface AiwgChunkedIndexQueryOptions extends AiwgIndexQueryOptions {
|
|
261
|
+
onProgress?: (progress: AiwgChunkedIndexProgress) => void;
|
|
262
|
+
}
|
|
263
|
+
interface AiwgChunkedIndexQueryResult extends AiwgIndexQueryResult {
|
|
264
|
+
manifestTotal: number;
|
|
265
|
+
scannedParts: number;
|
|
266
|
+
fetchedParts: number;
|
|
267
|
+
complete: boolean;
|
|
268
|
+
}
|
|
269
|
+
interface AiwgReviewDecision {
|
|
270
|
+
item_id: string;
|
|
271
|
+
action: AiwgReviewAction;
|
|
272
|
+
reason?: string;
|
|
273
|
+
updated_at: string;
|
|
274
|
+
}
|
|
275
|
+
interface AiwgReviewDecisionExport {
|
|
276
|
+
schema_version: 'aiwg.fortemi.review-decisions.v1';
|
|
277
|
+
generated_at: string;
|
|
278
|
+
source_export_schema_version: AiwgFortemiIndexExportSchemaVersion;
|
|
279
|
+
decisions: AiwgReviewDecision[];
|
|
280
|
+
}
|
|
281
|
+
interface AiwgIndexGraphOptions {
|
|
282
|
+
communityFacet?: string;
|
|
283
|
+
communityTagPrefix?: string;
|
|
284
|
+
relationshipWeights?: Record<string, number>;
|
|
285
|
+
includeDanglingRelationships?: boolean;
|
|
286
|
+
}
|
|
287
|
+
type AiwgRelationshipDirection = 'in' | 'out' | 'both';
|
|
288
|
+
type AiwgRelationshipSetOperation = 'intersection' | 'union' | 'difference';
|
|
289
|
+
interface AiwgRelationshipTraversalOptions {
|
|
290
|
+
direction?: AiwgRelationshipDirection;
|
|
291
|
+
relationshipType?: string;
|
|
292
|
+
relationshipDirection?: AiwgFortemiRelationshipDirection;
|
|
293
|
+
limit?: number;
|
|
294
|
+
}
|
|
295
|
+
interface AiwgRelationshipQueryOptions extends AiwgRelationshipTraversalOptions {
|
|
296
|
+
sourceId?: string;
|
|
297
|
+
targetId?: string;
|
|
298
|
+
endpointId?: string;
|
|
299
|
+
type?: string;
|
|
300
|
+
}
|
|
301
|
+
interface AiwgRelationshipEdgeSummary {
|
|
302
|
+
source_id: string;
|
|
303
|
+
target_id: string;
|
|
304
|
+
type: string;
|
|
305
|
+
source_path?: string;
|
|
306
|
+
target_path?: string;
|
|
307
|
+
direction?: AiwgFortemiRelationshipDirection;
|
|
308
|
+
}
|
|
309
|
+
interface AiwgRelationshipNodeSummary {
|
|
310
|
+
id: string;
|
|
311
|
+
type: AiwgFortemiRecordType;
|
|
312
|
+
title: string;
|
|
313
|
+
}
|
|
314
|
+
interface AiwgRelationshipTraversalResult {
|
|
315
|
+
nodes: AiwgRelationshipNodeSummary[];
|
|
316
|
+
edges: AiwgRelationshipEdgeSummary[];
|
|
317
|
+
complete: boolean;
|
|
318
|
+
scannedParts?: number;
|
|
319
|
+
fetchedParts?: number;
|
|
320
|
+
}
|
|
321
|
+
interface AiwgRelationshipSetOptions extends AiwgRelationshipTraversalOptions {
|
|
322
|
+
op: AiwgRelationshipSetOperation;
|
|
323
|
+
a: string;
|
|
324
|
+
b: string;
|
|
325
|
+
}
|
|
326
|
+
interface AiwgRelationshipSetResult {
|
|
327
|
+
ids: string[];
|
|
328
|
+
op: AiwgRelationshipSetOperation;
|
|
329
|
+
}
|
|
330
|
+
interface AiwgStaticEmbeddingRecord {
|
|
331
|
+
record_id: string;
|
|
332
|
+
embedding: number[];
|
|
333
|
+
embedding_id?: string;
|
|
334
|
+
granularity?: string;
|
|
335
|
+
input_hash: string;
|
|
336
|
+
source_path?: string;
|
|
337
|
+
}
|
|
338
|
+
interface AiwgStaticEmbeddingSet {
|
|
339
|
+
schema_version: 'aiwg.fortemi.embedding.set.v1';
|
|
340
|
+
id: string;
|
|
341
|
+
model: string;
|
|
342
|
+
dimensions: number;
|
|
343
|
+
generated_at: string;
|
|
344
|
+
granularity: 'title-summary' | 'body' | 'chunked-body' | string;
|
|
345
|
+
metric?: 'cosine' | 'dot' | 'euclidean';
|
|
346
|
+
input_hash_algorithm?: string;
|
|
347
|
+
embeddings: AiwgStaticEmbeddingRecord[];
|
|
348
|
+
}
|
|
349
|
+
interface AiwgHeadlessEmbeddingBackend {
|
|
350
|
+
model: string;
|
|
351
|
+
dimensions: number;
|
|
352
|
+
embed(input: string, record: AiwgFortemiRecord): number[] | Promise<number[]>;
|
|
353
|
+
}
|
|
354
|
+
interface AiwgPrivacyFilterOptions {
|
|
355
|
+
/** Include records classified `private` (default false). */
|
|
356
|
+
includePrivate?: boolean;
|
|
357
|
+
/** Include records flagged `pii` (default false). */
|
|
358
|
+
includePii?: boolean;
|
|
359
|
+
}
|
|
360
|
+
/** Drop `private`/`pii` records unless explicitly opted in (SEC6, default-safe). */
|
|
361
|
+
declare function filterAiwgRecordsByPrivacy(records: AiwgFortemiRecord[], options?: AiwgPrivacyFilterOptions): AiwgFortemiRecord[];
|
|
362
|
+
interface BuildAiwgStaticEmbeddingSetOptions {
|
|
363
|
+
id: string;
|
|
364
|
+
backend: AiwgHeadlessEmbeddingBackend;
|
|
365
|
+
records?: AiwgFortemiRecord[];
|
|
366
|
+
generatedAt?: string | Date;
|
|
367
|
+
granularity?: AiwgStaticEmbeddingSet['granularity'];
|
|
368
|
+
metric?: AiwgStaticEmbeddingSet['metric'];
|
|
369
|
+
textForRecord?: (record: AiwgFortemiRecord) => string;
|
|
370
|
+
/** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */
|
|
371
|
+
privacy?: AiwgPrivacyFilterOptions;
|
|
372
|
+
}
|
|
373
|
+
interface AiwgStaticSemanticQueryOptions {
|
|
374
|
+
limit?: number;
|
|
375
|
+
offset?: number;
|
|
376
|
+
minScore?: number;
|
|
377
|
+
}
|
|
378
|
+
interface AiwgStaticSemanticResult {
|
|
379
|
+
item: AiwgFortemiRecord;
|
|
380
|
+
score: number;
|
|
381
|
+
embedding?: AiwgStaticEmbeddingRecord;
|
|
382
|
+
}
|
|
383
|
+
interface AiwgStaticHybridQueryOptions extends AiwgStaticSemanticQueryOptions, AiwgIndexQueryOptions {
|
|
384
|
+
lexicalWeight?: number;
|
|
385
|
+
semanticWeight?: number;
|
|
386
|
+
}
|
|
387
|
+
interface AiwgStaticDuplicatePair {
|
|
388
|
+
left: AiwgFortemiRecord;
|
|
389
|
+
right: AiwgFortemiRecord;
|
|
390
|
+
score: number;
|
|
391
|
+
}
|
|
392
|
+
interface AiwgReviewInput {
|
|
393
|
+
item_id: string;
|
|
394
|
+
action: AiwgReviewAction;
|
|
395
|
+
reason?: string;
|
|
396
|
+
}
|
|
397
|
+
interface AiwgIndexControllerSnapshot {
|
|
398
|
+
index: AiwgFortemiIndexExport | null;
|
|
399
|
+
chunked: {
|
|
400
|
+
manifest: AiwgFortemiChunkManifest;
|
|
401
|
+
cachedParts: number;
|
|
402
|
+
maxCachedParts: number;
|
|
403
|
+
} | null;
|
|
404
|
+
data: AiwgIndexQueryResult | null;
|
|
405
|
+
error: Error | null;
|
|
406
|
+
reviewDecisions: AiwgReviewDecision[];
|
|
407
|
+
}
|
|
408
|
+
type AiwgIndexControllerListener = (snapshot: AiwgIndexControllerSnapshot) => void;
|
|
409
|
+
interface AiwgIndexController {
|
|
410
|
+
loadIndex(value: unknown): AiwgFortemiIndexExport;
|
|
411
|
+
loadChunkedIndex(manifest: unknown, loader: AiwgChunkedIndexLoader, options?: AiwgChunkedIndexLoadOptions): AiwgFortemiChunkManifest;
|
|
412
|
+
getIndex(): AiwgFortemiIndexExport | null;
|
|
413
|
+
getChunkedManifest(): AiwgFortemiChunkManifest | null;
|
|
414
|
+
getSnapshot(): AiwgIndexControllerSnapshot;
|
|
415
|
+
query(query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
|
|
416
|
+
queryChunked(query?: string, options?: AiwgChunkedIndexQueryOptions): Promise<AiwgChunkedIndexQueryResult>;
|
|
417
|
+
getRecord(id: string): Promise<AiwgFortemiRecord>;
|
|
418
|
+
neighbors(id: string, options?: AiwgRelationshipTraversalOptions): Promise<AiwgRelationshipTraversalResult>;
|
|
419
|
+
relationshipQuery(options?: AiwgRelationshipQueryOptions): Promise<AiwgRelationshipTraversalResult>;
|
|
420
|
+
relationshipSet(options: AiwgRelationshipSetOptions): Promise<AiwgRelationshipSetResult>;
|
|
421
|
+
clearChunkCache(): void;
|
|
422
|
+
toCommunityGraph(options?: AiwgIndexGraphOptions): ReturnType<typeof aiwgFortemiIndexToCommunityGraph>;
|
|
423
|
+
toCommunityGraphChunked(options?: AiwgIndexGraphOptions & {
|
|
424
|
+
onProgress?: (progress: AiwgChunkedIndexProgress) => void;
|
|
425
|
+
}): Promise<ReturnType<typeof aiwgFortemiIndexToCommunityGraph>>;
|
|
426
|
+
setReviewDecision(input: AiwgReviewInput): AiwgReviewDecision;
|
|
427
|
+
clearReviewDecision(itemId: string): void;
|
|
428
|
+
createReviewDecisionExport(generatedAt?: string): AiwgReviewDecisionExport;
|
|
429
|
+
subscribe(listener: AiwgIndexControllerListener): () => void;
|
|
430
|
+
}
|
|
431
|
+
declare function validateAiwgFortemiIndexExport(value: unknown): AiwgIndexValidationResult;
|
|
432
|
+
declare function assertAiwgFortemiIndexExport(value: unknown): AiwgFortemiIndexExport;
|
|
433
|
+
declare function validateAiwgFortemiChunkManifest(value: unknown): AiwgChunkedIndexValidationResult;
|
|
434
|
+
declare function assertAiwgFortemiChunkManifest(value: unknown): AiwgFortemiChunkManifest;
|
|
435
|
+
declare function validateAiwgFortemiChunkPart(value: unknown, partRef?: AiwgFortemiChunkPartRef, manifest?: AiwgFortemiChunkManifest): AiwgChunkedIndexValidationResult;
|
|
436
|
+
declare function assertAiwgFortemiChunkPart(value: unknown, partRef?: AiwgFortemiChunkPartRef, manifest?: AiwgFortemiChunkManifest): AiwgFortemiChunkPart;
|
|
437
|
+
declare function resolveAiwgFetchUrl(href: string, baseUrl?: string | URL): string;
|
|
438
|
+
declare function createAiwgFetchChunkLoader(baseUrl?: string | URL): AiwgChunkedIndexLoader;
|
|
439
|
+
declare function encodeAiwgDetailId(id: string, encoding?: AiwgDetailIdEncoding): string;
|
|
440
|
+
declare function aiwgDetailHrefForId(detail: AiwgFortemiChunkDetailRef, id: string): string;
|
|
441
|
+
declare function createAiwgFetchDetailLoader(baseUrl?: string | URL): AiwgChunkedIndexDetailLoader;
|
|
442
|
+
declare function getAiwgFortemiFacets(items: AiwgFortemiRecord[]): Record<string, Record<string, number>>;
|
|
443
|
+
declare function buildAiwgStaticEmbeddingSet(index: AiwgFortemiIndexExport, options: BuildAiwgStaticEmbeddingSetOptions): Promise<AiwgStaticEmbeddingSet>;
|
|
444
|
+
interface AiwgChunkedIndexBuildOptions {
|
|
445
|
+
partSize?: number;
|
|
446
|
+
projection?: Array<keyof AiwgFortemiRecord>;
|
|
447
|
+
detailHref?: string;
|
|
448
|
+
idEncoding?: AiwgDetailIdEncoding;
|
|
449
|
+
generatedAt?: string;
|
|
450
|
+
/** Privacy filtering (SEC6). Default-safe: excludes `private`/`pii` records. */
|
|
451
|
+
privacy?: AiwgPrivacyFilterOptions;
|
|
452
|
+
}
|
|
453
|
+
interface AiwgChunkedIndexBuildResult {
|
|
454
|
+
manifest: AiwgFortemiChunkManifest;
|
|
455
|
+
parts: Array<{
|
|
456
|
+
href: string;
|
|
457
|
+
part: AiwgFortemiChunkPart;
|
|
458
|
+
}>;
|
|
459
|
+
details: Array<{
|
|
460
|
+
id: string;
|
|
461
|
+
href: string;
|
|
462
|
+
record: AiwgFortemiRecord;
|
|
463
|
+
}>;
|
|
464
|
+
}
|
|
465
|
+
declare function buildAiwgChunkedIndex(index: AiwgFortemiIndexExport, options?: AiwgChunkedIndexBuildOptions): AiwgChunkedIndexBuildResult;
|
|
466
|
+
declare function queryAiwgFortemiIndex(index: AiwgFortemiIndexExport, query?: string, options?: AiwgIndexQueryOptions): AiwgIndexQueryResult;
|
|
467
|
+
declare function validateAiwgStaticEmbeddingSet(value: unknown): AiwgChunkedIndexValidationResult;
|
|
468
|
+
declare function assertAiwgStaticEmbeddingSet(value: unknown): AiwgStaticEmbeddingSet;
|
|
469
|
+
declare function queryAiwgSemanticIndex(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, queryEmbedding: number[], options?: AiwgStaticSemanticQueryOptions): AiwgStaticSemanticResult[];
|
|
470
|
+
declare function queryAiwgHybridIndex(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, query: string, queryEmbedding: number[], options?: AiwgStaticHybridQueryOptions): AiwgStaticSemanticResult[];
|
|
471
|
+
declare const DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS = 5000;
|
|
472
|
+
declare function findAiwgStaticDuplicatePairs(index: AiwgFortemiIndexExport, embeddingSet: AiwgStaticEmbeddingSet, threshold?: number, options?: {
|
|
473
|
+
maxEmbeddings?: number;
|
|
474
|
+
}): AiwgStaticDuplicatePair[];
|
|
475
|
+
declare function createAiwgReviewDecisionExport(source: Pick<AiwgFortemiIndexExport, 'schema_version'>, decisions: AiwgReviewDecision[], generatedAt?: string): AiwgReviewDecisionExport;
|
|
476
|
+
declare function createAiwgIndexController(initialIndex?: AiwgFortemiIndexExport): AiwgIndexController;
|
|
477
|
+
declare function aiwgFortemiIndexToCommunityGraph(index: AiwgFortemiIndexExport, options?: AiwgIndexGraphOptions): {
|
|
478
|
+
nodes: {
|
|
479
|
+
id: string;
|
|
480
|
+
}[];
|
|
481
|
+
edges: {
|
|
482
|
+
source: string;
|
|
483
|
+
target: string;
|
|
484
|
+
kind: string;
|
|
485
|
+
weight: number;
|
|
486
|
+
}[];
|
|
487
|
+
communities: {
|
|
488
|
+
id: string;
|
|
489
|
+
nodes: string[];
|
|
490
|
+
}[];
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
export { AIWG_SCAN_REQUIRED_FIELDS, type AiwgChunkedIndexBuildOptions, type AiwgChunkedIndexBuildResult, type AiwgChunkedIndexDetailLoader, type AiwgChunkedIndexLoadOptions, type AiwgChunkedIndexLoader, type AiwgChunkedIndexProgress, type AiwgChunkedIndexProgressPhase, type AiwgChunkedIndexQueryOptions, type AiwgChunkedIndexQueryResult, type AiwgChunkedIndexValidationResult, type AiwgDetailIdEncoding, type AiwgFortemiAttachmentReference, type AiwgFortemiBinarySource, type AiwgFortemiChunk, type AiwgFortemiChunkDetailRef, type AiwgFortemiChunkManifest, type AiwgFortemiChunkPart, type AiwgFortemiChunkPartRef, type AiwgFortemiIndexExport, type AiwgFortemiIndexExportSchemaVersion, type AiwgFortemiProjectedRecord, type AiwgFortemiProvenance, type AiwgFortemiProvenanceEvent, type AiwgFortemiRecord, type AiwgFortemiRecordEmbedding, type AiwgFortemiRecordSchemaVersion, type AiwgFortemiRecordSource, type AiwgFortemiRecordType, type AiwgFortemiRelationship, type AiwgFortemiRelationshipDirection, type AiwgFortemiSearchProjection, type AiwgFortemiSkosConcept, type AiwgFortemiSkosRelation, type AiwgFortemiSkosRelationType, type AiwgHeadlessEmbeddingBackend, type AiwgIndexController, type AiwgIndexControllerListener, type AiwgIndexControllerSnapshot, type AiwgIndexGraphOptions, type AiwgIndexQueryMatch, type AiwgIndexQueryOptions, type AiwgIndexQueryRankedItem, type AiwgIndexQueryResult, type AiwgIndexQueryWeights, type AiwgIndexValidationResult, type AiwgPrivacyClassification, type AiwgPrivacyFilterOptions, type AiwgProvenanceConfidence, type AiwgRelationshipDirection, type AiwgRelationshipEdgeSummary, type AiwgRelationshipNodeSummary, type AiwgRelationshipQueryOptions, type AiwgRelationshipSetOperation, type AiwgRelationshipSetOptions, type AiwgRelationshipSetResult, type AiwgRelationshipTraversalOptions, type AiwgRelationshipTraversalResult, type AiwgReviewAction, type AiwgReviewDecision, type AiwgReviewDecisionExport, type AiwgReviewInput, type AiwgStaticDuplicatePair, type AiwgStaticEmbeddingRecord, type AiwgStaticEmbeddingSet, type AiwgStaticHybridQueryOptions, type AiwgStaticSemanticQueryOptions, type AiwgStaticSemanticResult, type BuildAiwgStaticEmbeddingSetOptions, DEFAULT_AIWG_DUPLICATE_SCAN_MAX_EMBEDDINGS, aiwgDetailHrefForId, aiwgFortemiIndexToCommunityGraph, assertAiwgFortemiChunkManifest, assertAiwgFortemiChunkPart, assertAiwgFortemiIndexExport, assertAiwgStaticEmbeddingSet, buildAiwgChunkedIndex, buildAiwgStaticEmbeddingSet, createAiwgFetchChunkLoader, createAiwgFetchDetailLoader, createAiwgIndexController, createAiwgReviewDecisionExport, encodeAiwgDetailId, filterAiwgRecordsByPrivacy, findAiwgStaticDuplicatePairs, getAiwgFortemiFacets, queryAiwgFortemiIndex, queryAiwgHybridIndex, queryAiwgSemanticIndex, resolveAiwgFetchUrl, validateAiwgFortemiChunkManifest, validateAiwgFortemiChunkPart, validateAiwgFortemiIndexExport, validateAiwgStaticEmbeddingSet };
|