This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// The documents module's manifest (spec §4.1, §16): the one place it registers anything.
|
||||
//
|
||||
// A generic document-review module, and the pattern a product's own extraction module follows:
|
||||
//
|
||||
// upload (files module) -> `files.processors` -> OCR job (this module, in the worker)
|
||||
// -> a model behind ModelGateway proposes lines, code verifies their quotes
|
||||
// -> proposals (proposals module) -> a person approves, edits or rejects
|
||||
// -> approval writes `documents_line` in the same transaction -> export of approved lines.
|
||||
//
|
||||
// It contains no customer vocabulary: what a line means, which units or catalogue numbers it uses,
|
||||
// and what file format a customer's other systems import are product decisions and live in the
|
||||
// product's own module (the extractor's prompt and schema, and a second exporter, are the two seams).
|
||||
|
||||
import { defineModule } from "@conusai-kit/core"
|
||||
import { ocrJob } from "./adapters/jobs.js"
|
||||
import { OCR_JOB } from "./contract/index.js"
|
||||
import { DOCUMENTS_MODULE_BASE } from "./module.shared.js"
|
||||
|
||||
export const documentsModule = defineModule({
|
||||
...DOCUMENTS_MODULE_BASE,
|
||||
jobs: { [OCR_JOB]: ocrJob },
|
||||
})
|
||||
Reference in New Issue
Block a user