omnius 1.0.807 → 1.0.809
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/README.md +5 -0
- package/dist/api/py-embed.js +118 -0
- package/dist/index.js +2 -2
- package/dist/library.js +282 -0
- package/dist/update-worker.js +118 -0
- package/docs/DISCOVERY.json +127 -12
- package/docs/DISCOVERY.md +3 -0
- package/docs/corpus-ocr.md +57 -0
- package/docs/guides/pdf-collections.md +76 -0
- package/docs/guides/telegram.md +6 -0
- package/docs/rest/endpoints/chat.md +5 -5
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -133,6 +133,11 @@ the local discover → exact expansion → explicit web-tool workflow.
|
|
|
133
133
|
|
|
134
134
|
## Common Workflows
|
|
135
135
|
|
|
136
|
+
For large PDF collections, Omnius retains originals in a durable scoped index
|
|
137
|
+
and processes ordering, manipulation, summary and extraction in resumable steps.
|
|
138
|
+
See the [PDF collections guide](docs/guides/pdf-collections.md) for coverage,
|
|
139
|
+
source provenance, numeric checks and complete delivery of large results.
|
|
140
|
+
|
|
136
141
|
```bash
|
|
137
142
|
omnius "inspect this repo and summarize the main entrypoints"
|
|
138
143
|
omnius serve
|
package/dist/api/py-embed.js
CHANGED
|
@@ -294593,9 +294593,127 @@ init_vision();
|
|
|
294593
294593
|
init_system_deps();
|
|
294594
294594
|
init_vision();
|
|
294595
294595
|
|
|
294596
|
+
// packages/execution/dist/tools/pdf-corpus-archive.js
|
|
294597
|
+
init_process_async();
|
|
294598
|
+
|
|
294596
294599
|
// packages/execution/dist/tools/ocr-pdf.js
|
|
294597
294600
|
init_process_async();
|
|
294598
294601
|
|
|
294602
|
+
// packages/execution/dist/tools/pdf-transform.js
|
|
294603
|
+
init_process_async();
|
|
294604
|
+
var BUFFER_BYTES = 128 * 1024;
|
|
294605
|
+
var MAX_RECORD_BYTES = 64 * 1024;
|
|
294606
|
+
|
|
294607
|
+
// packages/execution/dist/tools/source-corpus.js
|
|
294608
|
+
var SEGMENT_CHARS = 64 * 1024;
|
|
294609
|
+
var RECORD_BYTES = 64 * 1024;
|
|
294610
|
+
var ACTIONS = /* @__PURE__ */ new Set(["ingest", "inventory", "search", "read", "begin", "process", "status"]);
|
|
294611
|
+
var SOURCE_CORPUS_TOOL_DEFINITION = {
|
|
294612
|
+
name: "source_corpus",
|
|
294613
|
+
aliases: ["pdf_corpus"],
|
|
294614
|
+
description: "Acquire and process a scoped PDF corpus without a total document/page-count cap. ingest uses an immutable JSONL manifest, one {ref,sha256} per source, and returns a durable import ID; repeat it to resume bounded batches. Local directory acquisition requires an explicit host policy and resumes bounded traversal/hash/manifest work with ingest_id. It captures an observed, version-fenced filesystem selection, not an atomic live-tree snapshot, and excludes only this workspace's owned .omnius state tree. inventory/search are cursor-paged; read returns exact channel-labelled segments with character offsets. begin preserves the full processing request and selected source versions; process checkpoints complete native pages and resumes after cancellation/restart. Source bytes, full native text and bbox are archived before bounded views. Explicit filters.channel='ocr_text' schedules resumable CPU OCR; rendered pages, engine/language, full OCR text and TSV are preserved separately. For OCR summaries/extractions use corpus_work filters.channel='ocr_text', complete anchored work, export, and corpus_export_review before delivery; source_answer_review only accepts native facts. Native or OCR engine completion does not prove visual understanding, summaries or final delivery.",
|
|
294615
|
+
parameters: { type: "object", properties: {
|
|
294616
|
+
action: { type: "string", enum: [...ACTIONS] },
|
|
294617
|
+
corpus_id: { type: "string" },
|
|
294618
|
+
manifest: { type: "string", description: "Host-authorized JSONL file or alias; one {ref,sha256} record per PDF." },
|
|
294619
|
+
manifest_sha256: { type: "string" },
|
|
294620
|
+
directory: { type: "string", description: "Explicit local-admin directory enumeration only." },
|
|
294621
|
+
ingest_id: { type: "string", description: "Resume directory acquisition or the immutable import without resupplying its directory/manifest. Use a new ID for a deliberately changed directory selection." },
|
|
294622
|
+
source_budget: { type: "integer", minimum: 1, maximum: 64 },
|
|
294623
|
+
operation_id: { type: "string" },
|
|
294624
|
+
request: { type: "string", description: "Complete extraction processing request; not authority to replace the user's goal." },
|
|
294625
|
+
page_budget: { type: "integer", minimum: 1, maximum: 64 },
|
|
294626
|
+
page_size: { type: "integer", minimum: 1, maximum: 128 },
|
|
294627
|
+
cursor: { type: "string" },
|
|
294628
|
+
query: { type: "string" },
|
|
294629
|
+
filters: { type: "object" },
|
|
294630
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
294631
|
+
page_id: { type: "string" },
|
|
294632
|
+
ocr_language: { type: "string", description: "Explicit OCR operation language, e.g. eng or eng+deu. Immutable after begin; uses installed Tesseract languages." },
|
|
294633
|
+
char_offset: { type: "integer", minimum: 0 },
|
|
294634
|
+
max_chars: { type: "integer", minimum: 2, maximum: SEGMENT_CHARS }
|
|
294635
|
+
}, required: ["action", "corpus_id"], additionalProperties: false }
|
|
294636
|
+
};
|
|
294637
|
+
|
|
294638
|
+
// packages/execution/dist/tools/corpus-work.js
|
|
294639
|
+
var ACTIONS2 = ["begin", "next", "read", "commit", "status", "complete", "cancel", "export", "aggregate", "order"];
|
|
294640
|
+
var CORPUS_WORK_TOOL_DEFINITION = {
|
|
294641
|
+
name: "corpus_work",
|
|
294642
|
+
aliases: ["pdf_corpus_work"],
|
|
294643
|
+
description: "Durable model-driven summary or extraction over a scoped corpus. Native text is default; explicitly select filters.channel='ocr_text' for previously processed OCR evidence. begin preserves the FULL request and immutable selection. next gives bounded leased claims; read exposes each complete input through resumable exact character ranges. commit requires every input fully delivered through a successful host model request and exact quote anchors for every input. A read result prepares an exact range; same-response read+commit cannot establish model exposure. Full derived content is archived, never substituted for originals. Summary parents use host-issued bounded child membership and require complete child reads. Repeat next until leaves and reduction finish. Processing coverage is actor-attested, not proof of factual correctness, visual understanding or final delivery. Optional anchored decimal/count records support exact deterministic aggregates; record selection remains actor-attested. Exact anchored typed fields support SQL ordering before pagination through order, after processing completes. Text uses explicit binary collation; decimal is exact, dates calendar, clocks require declared fixed/source offsets. Missing and multiple values require explicit policies; field meaning and selection remain actor-attested. export resumably streams all derived leaf records and the summary root to JSONL. Repeat the exact export while completeExport=false; partial work has no finished artifact. byte_budget bounds each call, not the final output. Public OCR results require corpus_export_review prepare/process/finalize on the returned retained artifactPath; source_answer_review does not ground OCR inline prose. There is no total corpus or output count cap.",
|
|
294644
|
+
parameters: { type: "object", properties: {
|
|
294645
|
+
action: { type: "string", enum: [...ACTIONS2] },
|
|
294646
|
+
corpus_id: { type: "string" },
|
|
294647
|
+
operation_id: { type: "string" },
|
|
294648
|
+
mode: { type: "string", enum: ["summary", "extraction"] },
|
|
294649
|
+
request: { type: "string" },
|
|
294650
|
+
filters: { type: "object" },
|
|
294651
|
+
query: { type: "string" },
|
|
294652
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
294653
|
+
fan_in: { type: "integer", minimum: 2, maximum: 64, description: "Per-parent child allocation, not total corpus limit." },
|
|
294654
|
+
byte_budget: { type: "integer", minimum: 1, maximum: 67108864, description: "Per-call export write/fixity byte budget; repeat export to finish arbitrarily large output." },
|
|
294655
|
+
page_size: { type: "integer", minimum: 1, maximum: 32 },
|
|
294656
|
+
claim_id: { type: "string" },
|
|
294657
|
+
input_id: { type: "string" },
|
|
294658
|
+
char_offset: { type: "integer", minimum: 0 },
|
|
294659
|
+
max_chars: { type: "integer", minimum: 2, maximum: 65536 },
|
|
294660
|
+
content: { type: "string", description: "Complete nonempty model-derived output for this claim." },
|
|
294661
|
+
anchors: { type: "array", minItems: 1, items: { type: "object", properties: {
|
|
294662
|
+
input_id: { type: "string" },
|
|
294663
|
+
char_start: { type: "integer", minimum: 0 },
|
|
294664
|
+
char_end: { type: "integer", minimum: 0 },
|
|
294665
|
+
quote: { type: "string" }
|
|
294666
|
+
}, required: ["input_id", "char_start", "char_end", "quote"], additionalProperties: false } },
|
|
294667
|
+
fields: { type: "array", items: { type: "object", properties: {
|
|
294668
|
+
field: { type: "string" },
|
|
294669
|
+
kind: { type: "string", enum: ["text", "decimal", "date", "time", "datetime"] },
|
|
294670
|
+
anchor: { type: "integer", minimum: 0 },
|
|
294671
|
+
literal: { type: "string", description: "Entire exact literal in the indicated source anchor." },
|
|
294672
|
+
timezone: { type: "string", description: "Dates: calendar. Clocks: source_offset when the literal has Z/offset; otherwise UTC or a fixed +/-HH:MM offset. No inferred timezone." }
|
|
294673
|
+
}, required: ["field", "kind", "anchor", "literal"], additionalProperties: false } },
|
|
294674
|
+
order_spec: { type: "object", properties: {
|
|
294675
|
+
field: { type: "string" },
|
|
294676
|
+
kind: { type: "string", enum: ["text", "decimal", "date", "time", "datetime"] },
|
|
294677
|
+
unit: { type: "string", enum: ["source", "page"] },
|
|
294678
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
294679
|
+
missing: { type: "string", enum: ["first", "last", "exclude", "error"] },
|
|
294680
|
+
multiple: { type: "string", enum: ["min", "max", "error"] },
|
|
294681
|
+
collation: { type: "string", enum: ["binary"] },
|
|
294682
|
+
timezone: { type: "string", enum: ["calendar", "recorded_offset"] },
|
|
294683
|
+
timeSemantics: { type: "string", enum: ["utc_clock"] },
|
|
294684
|
+
where: { type: "object", properties: { equals: { type: "string" }, from: { type: "string" }, through: { type: "string" } }, additionalProperties: false }
|
|
294685
|
+
}, required: ["field", "kind", "unit", "direction", "missing", "multiple"], additionalProperties: false },
|
|
294686
|
+
cursor: { type: "string" },
|
|
294687
|
+
numbers: { type: "array", items: { type: "object", properties: {
|
|
294688
|
+
field: { type: "string" },
|
|
294689
|
+
kind: { type: "string", enum: ["decimal", "count"] },
|
|
294690
|
+
anchor: { type: "integer", minimum: 0 },
|
|
294691
|
+
literal: { type: "string" }
|
|
294692
|
+
}, required: ["field", "kind", "anchor"], additionalProperties: false } },
|
|
294693
|
+
field: { type: "string" }
|
|
294694
|
+
}, required: ["action", "corpus_id", "operation_id"], additionalProperties: false }
|
|
294695
|
+
};
|
|
294696
|
+
|
|
294697
|
+
// packages/execution/dist/tools/pdf-corpus-transform.js
|
|
294698
|
+
init_process_async();
|
|
294699
|
+
var LINE_BYTES = 64 * 1024;
|
|
294700
|
+
var ACTIONS3 = /* @__PURE__ */ new Set(["begin", "process", "status"]);
|
|
294701
|
+
var PDF_CORPUS_TRANSFORM_TOOL_DEFINITION = {
|
|
294702
|
+
name: "pdf_corpus_transform",
|
|
294703
|
+
aliases: ["pdf_corpus_compose"],
|
|
294704
|
+
description: "Resumable original-page PDF merge, split and reorder over an acquired source_corpus. begin accepts an immutable JSONL recipe with one {sourceId,sourceSha256,page} per output page; order and repetitions are exact. process commits bounded partial PDFs and a durable merge tree; repeat the same operation_id after cancellation/update/restart. Source references must already belong to this host-scoped corpus. No text/OCR extraction is required for page copying. Returns a canonical PDF and streamed flattened original-page lineage with exact hashes; document metadata/forms/signatures are not preserved. No total PDF/page-count cap; each physical merge is atomic and may require a longer host work deadline for very large containers.",
|
|
294705
|
+
parameters: { type: "object", properties: {
|
|
294706
|
+
action: { type: "string", enum: [...ACTIONS3] },
|
|
294707
|
+
corpus_id: { type: "string" },
|
|
294708
|
+
operation_id: { type: "string" },
|
|
294709
|
+
operation: { type: "string", enum: ["merge", "split", "reorder"] },
|
|
294710
|
+
request: { type: "string", description: "Complete caller-declared transformation request; does not replace host goal authority." },
|
|
294711
|
+
manifest: { type: "string" },
|
|
294712
|
+
manifest_sha256: { type: "string" },
|
|
294713
|
+
work_budget: { type: "integer", minimum: 1, maximum: 64, description: "Bounded recipe import or leaf/merge work units for this invocation." }
|
|
294714
|
+
}, required: ["action", "corpus_id", "operation_id"], additionalProperties: false }
|
|
294715
|
+
};
|
|
294716
|
+
|
|
294599
294717
|
// packages/execution/dist/tools/pdf-visual-markdown.js
|
|
294600
294718
|
var MAX_IMAGE_BYTES = 8 * 1024 * 1024;
|
|
294601
294719
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[diffend] Oversized file quarantined before diffing.
|
|
2
2
|
name: package/dist/index.js
|
|
3
|
-
size:
|
|
4
|
-
sha256:
|
|
3
|
+
size: 41434427 bytes
|
|
4
|
+
sha256: 19cfa3387615fd7148ce7841a0c4aed39284bab0e7018dfeacdf47de97e59a16
|
package/dist/library.js
CHANGED
|
@@ -47751,6 +47751,20 @@ var init_immutableEvidenceStore = __esm({
|
|
|
47751
47751
|
}
|
|
47752
47752
|
});
|
|
47753
47753
|
|
|
47754
|
+
// packages/memory/dist/artifactReviewSourceIndex.js
|
|
47755
|
+
var init_artifactReviewSourceIndex = __esm({
|
|
47756
|
+
"packages/memory/dist/artifactReviewSourceIndex.js"() {
|
|
47757
|
+
"use strict";
|
|
47758
|
+
}
|
|
47759
|
+
});
|
|
47760
|
+
|
|
47761
|
+
// packages/memory/dist/sourceCorpusStore.js
|
|
47762
|
+
var init_sourceCorpusStore = __esm({
|
|
47763
|
+
"packages/memory/dist/sourceCorpusStore.js"() {
|
|
47764
|
+
"use strict";
|
|
47765
|
+
}
|
|
47766
|
+
});
|
|
47767
|
+
|
|
47754
47768
|
// packages/memory/dist/structureAwareChunker.js
|
|
47755
47769
|
var init_structureAwareChunker = __esm({
|
|
47756
47770
|
"packages/memory/dist/structureAwareChunker.js"() {
|
|
@@ -49093,6 +49107,8 @@ var init_dist = __esm({
|
|
|
49093
49107
|
init_db();
|
|
49094
49108
|
init_contextMemoryLedger();
|
|
49095
49109
|
init_immutableEvidenceStore();
|
|
49110
|
+
init_artifactReviewSourceIndex();
|
|
49111
|
+
init_sourceCorpusStore();
|
|
49096
49112
|
init_structureAwareChunker();
|
|
49097
49113
|
init_evidenceIngestion();
|
|
49098
49114
|
init_structuredMemoryStore();
|
|
@@ -51865,10 +51881,19 @@ var init_vision_action_loop = __esm({
|
|
|
51865
51881
|
}
|
|
51866
51882
|
});
|
|
51867
51883
|
|
|
51884
|
+
// packages/execution/dist/tools/pdf-corpus-archive.js
|
|
51885
|
+
var init_pdf_corpus_archive = __esm({
|
|
51886
|
+
"packages/execution/dist/tools/pdf-corpus-archive.js"() {
|
|
51887
|
+
"use strict";
|
|
51888
|
+
init_process_async();
|
|
51889
|
+
}
|
|
51890
|
+
});
|
|
51891
|
+
|
|
51868
51892
|
// packages/execution/dist/tools/ocr-pdf.js
|
|
51869
51893
|
var init_ocr_pdf = __esm({
|
|
51870
51894
|
"packages/execution/dist/tools/ocr-pdf.js"() {
|
|
51871
51895
|
"use strict";
|
|
51896
|
+
init_pdf_corpus_archive();
|
|
51872
51897
|
init_process_async();
|
|
51873
51898
|
init_pdf_document();
|
|
51874
51899
|
}
|
|
@@ -51882,6 +51907,243 @@ var init_pdf_to_text = __esm({
|
|
|
51882
51907
|
}
|
|
51883
51908
|
});
|
|
51884
51909
|
|
|
51910
|
+
// packages/execution/dist/tools/pdf-transform.js
|
|
51911
|
+
var BUFFER_BYTES, MAX_RECORD_BYTES;
|
|
51912
|
+
var init_pdf_transform = __esm({
|
|
51913
|
+
"packages/execution/dist/tools/pdf-transform.js"() {
|
|
51914
|
+
"use strict";
|
|
51915
|
+
init_process_async();
|
|
51916
|
+
BUFFER_BYTES = 128 * 1024;
|
|
51917
|
+
MAX_RECORD_BYTES = 64 * 1024;
|
|
51918
|
+
}
|
|
51919
|
+
});
|
|
51920
|
+
|
|
51921
|
+
// packages/execution/dist/tools/source-corpus-ocr.js
|
|
51922
|
+
var init_source_corpus_ocr = __esm({
|
|
51923
|
+
"packages/execution/dist/tools/source-corpus-ocr.js"() {
|
|
51924
|
+
"use strict";
|
|
51925
|
+
init_dist();
|
|
51926
|
+
init_pdf_corpus_archive();
|
|
51927
|
+
}
|
|
51928
|
+
});
|
|
51929
|
+
|
|
51930
|
+
// packages/execution/dist/tools/corpus-directory-manifest.js
|
|
51931
|
+
var init_corpus_directory_manifest = __esm({
|
|
51932
|
+
"packages/execution/dist/tools/corpus-directory-manifest.js"() {
|
|
51933
|
+
"use strict";
|
|
51934
|
+
init_pdf_corpus_archive();
|
|
51935
|
+
}
|
|
51936
|
+
});
|
|
51937
|
+
|
|
51938
|
+
// packages/execution/dist/tools/source-corpus.js
|
|
51939
|
+
var SEGMENT_CHARS, RECORD_BYTES, ACTIONS, SOURCE_CORPUS_TOOL_DEFINITION;
|
|
51940
|
+
var init_source_corpus = __esm({
|
|
51941
|
+
"packages/execution/dist/tools/source-corpus.js"() {
|
|
51942
|
+
"use strict";
|
|
51943
|
+
init_dist();
|
|
51944
|
+
init_pdf_corpus_archive();
|
|
51945
|
+
init_source_corpus_ocr();
|
|
51946
|
+
init_corpus_directory_manifest();
|
|
51947
|
+
SEGMENT_CHARS = 64 * 1024;
|
|
51948
|
+
RECORD_BYTES = 64 * 1024;
|
|
51949
|
+
ACTIONS = /* @__PURE__ */ new Set(["ingest", "inventory", "search", "read", "begin", "process", "status"]);
|
|
51950
|
+
SOURCE_CORPUS_TOOL_DEFINITION = {
|
|
51951
|
+
name: "source_corpus",
|
|
51952
|
+
aliases: ["pdf_corpus"],
|
|
51953
|
+
description: "Acquire and process a scoped PDF corpus without a total document/page-count cap. ingest uses an immutable JSONL manifest, one {ref,sha256} per source, and returns a durable import ID; repeat it to resume bounded batches. Local directory acquisition requires an explicit host policy and resumes bounded traversal/hash/manifest work with ingest_id. It captures an observed, version-fenced filesystem selection, not an atomic live-tree snapshot, and excludes only this workspace's owned .omnius state tree. inventory/search are cursor-paged; read returns exact channel-labelled segments with character offsets. begin preserves the full processing request and selected source versions; process checkpoints complete native pages and resumes after cancellation/restart. Source bytes, full native text and bbox are archived before bounded views. Explicit filters.channel='ocr_text' schedules resumable CPU OCR; rendered pages, engine/language, full OCR text and TSV are preserved separately. For OCR summaries/extractions use corpus_work filters.channel='ocr_text', complete anchored work, export, and corpus_export_review before delivery; source_answer_review only accepts native facts. Native or OCR engine completion does not prove visual understanding, summaries or final delivery.",
|
|
51954
|
+
parameters: { type: "object", properties: {
|
|
51955
|
+
action: { type: "string", enum: [...ACTIONS] },
|
|
51956
|
+
corpus_id: { type: "string" },
|
|
51957
|
+
manifest: { type: "string", description: "Host-authorized JSONL file or alias; one {ref,sha256} record per PDF." },
|
|
51958
|
+
manifest_sha256: { type: "string" },
|
|
51959
|
+
directory: { type: "string", description: "Explicit local-admin directory enumeration only." },
|
|
51960
|
+
ingest_id: { type: "string", description: "Resume directory acquisition or the immutable import without resupplying its directory/manifest. Use a new ID for a deliberately changed directory selection." },
|
|
51961
|
+
source_budget: { type: "integer", minimum: 1, maximum: 64 },
|
|
51962
|
+
operation_id: { type: "string" },
|
|
51963
|
+
request: { type: "string", description: "Complete extraction processing request; not authority to replace the user's goal." },
|
|
51964
|
+
page_budget: { type: "integer", minimum: 1, maximum: 64 },
|
|
51965
|
+
page_size: { type: "integer", minimum: 1, maximum: 128 },
|
|
51966
|
+
cursor: { type: "string" },
|
|
51967
|
+
query: { type: "string" },
|
|
51968
|
+
filters: { type: "object" },
|
|
51969
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
51970
|
+
page_id: { type: "string" },
|
|
51971
|
+
ocr_language: { type: "string", description: "Explicit OCR operation language, e.g. eng or eng+deu. Immutable after begin; uses installed Tesseract languages." },
|
|
51972
|
+
char_offset: { type: "integer", minimum: 0 },
|
|
51973
|
+
max_chars: { type: "integer", minimum: 2, maximum: SEGMENT_CHARS }
|
|
51974
|
+
}, required: ["action", "corpus_id"], additionalProperties: false }
|
|
51975
|
+
};
|
|
51976
|
+
}
|
|
51977
|
+
});
|
|
51978
|
+
|
|
51979
|
+
// packages/execution/dist/tools/corpus-population.js
|
|
51980
|
+
var init_corpus_population = __esm({
|
|
51981
|
+
"packages/execution/dist/tools/corpus-population.js"() {
|
|
51982
|
+
"use strict";
|
|
51983
|
+
}
|
|
51984
|
+
});
|
|
51985
|
+
|
|
51986
|
+
// packages/execution/dist/tools/source-corpus-workspace.js
|
|
51987
|
+
var init_source_corpus_workspace = __esm({
|
|
51988
|
+
"packages/execution/dist/tools/source-corpus-workspace.js"() {
|
|
51989
|
+
"use strict";
|
|
51990
|
+
init_dist();
|
|
51991
|
+
init_source_corpus();
|
|
51992
|
+
init_corpus_population();
|
|
51993
|
+
}
|
|
51994
|
+
});
|
|
51995
|
+
|
|
51996
|
+
// packages/execution/dist/tools/corpus-derived-order.js
|
|
51997
|
+
var init_corpus_derived_order = __esm({
|
|
51998
|
+
"packages/execution/dist/tools/corpus-derived-order.js"() {
|
|
51999
|
+
"use strict";
|
|
52000
|
+
}
|
|
52001
|
+
});
|
|
52002
|
+
|
|
52003
|
+
// packages/execution/dist/tools/corpus-work.js
|
|
52004
|
+
var ACTIONS2, CORPUS_WORK_TOOL_DEFINITION;
|
|
52005
|
+
var init_corpus_work = __esm({
|
|
52006
|
+
"packages/execution/dist/tools/corpus-work.js"() {
|
|
52007
|
+
"use strict";
|
|
52008
|
+
init_dist();
|
|
52009
|
+
init_pdf_corpus_archive();
|
|
52010
|
+
init_corpus_derived_order();
|
|
52011
|
+
ACTIONS2 = ["begin", "next", "read", "commit", "status", "complete", "cancel", "export", "aggregate", "order"];
|
|
52012
|
+
CORPUS_WORK_TOOL_DEFINITION = {
|
|
52013
|
+
name: "corpus_work",
|
|
52014
|
+
aliases: ["pdf_corpus_work"],
|
|
52015
|
+
description: "Durable model-driven summary or extraction over a scoped corpus. Native text is default; explicitly select filters.channel='ocr_text' for previously processed OCR evidence. begin preserves the FULL request and immutable selection. next gives bounded leased claims; read exposes each complete input through resumable exact character ranges. commit requires every input fully delivered through a successful host model request and exact quote anchors for every input. A read result prepares an exact range; same-response read+commit cannot establish model exposure. Full derived content is archived, never substituted for originals. Summary parents use host-issued bounded child membership and require complete child reads. Repeat next until leaves and reduction finish. Processing coverage is actor-attested, not proof of factual correctness, visual understanding or final delivery. Optional anchored decimal/count records support exact deterministic aggregates; record selection remains actor-attested. Exact anchored typed fields support SQL ordering before pagination through order, after processing completes. Text uses explicit binary collation; decimal is exact, dates calendar, clocks require declared fixed/source offsets. Missing and multiple values require explicit policies; field meaning and selection remain actor-attested. export resumably streams all derived leaf records and the summary root to JSONL. Repeat the exact export while completeExport=false; partial work has no finished artifact. byte_budget bounds each call, not the final output. Public OCR results require corpus_export_review prepare/process/finalize on the returned retained artifactPath; source_answer_review does not ground OCR inline prose. There is no total corpus or output count cap.",
|
|
52016
|
+
parameters: { type: "object", properties: {
|
|
52017
|
+
action: { type: "string", enum: [...ACTIONS2] },
|
|
52018
|
+
corpus_id: { type: "string" },
|
|
52019
|
+
operation_id: { type: "string" },
|
|
52020
|
+
mode: { type: "string", enum: ["summary", "extraction"] },
|
|
52021
|
+
request: { type: "string" },
|
|
52022
|
+
filters: { type: "object" },
|
|
52023
|
+
query: { type: "string" },
|
|
52024
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
52025
|
+
fan_in: { type: "integer", minimum: 2, maximum: 64, description: "Per-parent child allocation, not total corpus limit." },
|
|
52026
|
+
byte_budget: { type: "integer", minimum: 1, maximum: 67108864, description: "Per-call export write/fixity byte budget; repeat export to finish arbitrarily large output." },
|
|
52027
|
+
page_size: { type: "integer", minimum: 1, maximum: 32 },
|
|
52028
|
+
claim_id: { type: "string" },
|
|
52029
|
+
input_id: { type: "string" },
|
|
52030
|
+
char_offset: { type: "integer", minimum: 0 },
|
|
52031
|
+
max_chars: { type: "integer", minimum: 2, maximum: 65536 },
|
|
52032
|
+
content: { type: "string", description: "Complete nonempty model-derived output for this claim." },
|
|
52033
|
+
anchors: { type: "array", minItems: 1, items: { type: "object", properties: {
|
|
52034
|
+
input_id: { type: "string" },
|
|
52035
|
+
char_start: { type: "integer", minimum: 0 },
|
|
52036
|
+
char_end: { type: "integer", minimum: 0 },
|
|
52037
|
+
quote: { type: "string" }
|
|
52038
|
+
}, required: ["input_id", "char_start", "char_end", "quote"], additionalProperties: false } },
|
|
52039
|
+
fields: { type: "array", items: { type: "object", properties: {
|
|
52040
|
+
field: { type: "string" },
|
|
52041
|
+
kind: { type: "string", enum: ["text", "decimal", "date", "time", "datetime"] },
|
|
52042
|
+
anchor: { type: "integer", minimum: 0 },
|
|
52043
|
+
literal: { type: "string", description: "Entire exact literal in the indicated source anchor." },
|
|
52044
|
+
timezone: { type: "string", description: "Dates: calendar. Clocks: source_offset when the literal has Z/offset; otherwise UTC or a fixed +/-HH:MM offset. No inferred timezone." }
|
|
52045
|
+
}, required: ["field", "kind", "anchor", "literal"], additionalProperties: false } },
|
|
52046
|
+
order_spec: { type: "object", properties: {
|
|
52047
|
+
field: { type: "string" },
|
|
52048
|
+
kind: { type: "string", enum: ["text", "decimal", "date", "time", "datetime"] },
|
|
52049
|
+
unit: { type: "string", enum: ["source", "page"] },
|
|
52050
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
52051
|
+
missing: { type: "string", enum: ["first", "last", "exclude", "error"] },
|
|
52052
|
+
multiple: { type: "string", enum: ["min", "max", "error"] },
|
|
52053
|
+
collation: { type: "string", enum: ["binary"] },
|
|
52054
|
+
timezone: { type: "string", enum: ["calendar", "recorded_offset"] },
|
|
52055
|
+
timeSemantics: { type: "string", enum: ["utc_clock"] },
|
|
52056
|
+
where: { type: "object", properties: { equals: { type: "string" }, from: { type: "string" }, through: { type: "string" } }, additionalProperties: false }
|
|
52057
|
+
}, required: ["field", "kind", "unit", "direction", "missing", "multiple"], additionalProperties: false },
|
|
52058
|
+
cursor: { type: "string" },
|
|
52059
|
+
numbers: { type: "array", items: { type: "object", properties: {
|
|
52060
|
+
field: { type: "string" },
|
|
52061
|
+
kind: { type: "string", enum: ["decimal", "count"] },
|
|
52062
|
+
anchor: { type: "integer", minimum: 0 },
|
|
52063
|
+
literal: { type: "string" }
|
|
52064
|
+
}, required: ["field", "kind", "anchor"], additionalProperties: false } },
|
|
52065
|
+
field: { type: "string" }
|
|
52066
|
+
}, required: ["action", "corpus_id", "operation_id"], additionalProperties: false }
|
|
52067
|
+
};
|
|
52068
|
+
}
|
|
52069
|
+
});
|
|
52070
|
+
|
|
52071
|
+
// packages/execution/dist/tools/corpus-work-workspace.js
|
|
52072
|
+
var init_corpus_work_workspace = __esm({
|
|
52073
|
+
"packages/execution/dist/tools/corpus-work-workspace.js"() {
|
|
52074
|
+
"use strict";
|
|
52075
|
+
init_corpus_work();
|
|
52076
|
+
init_source_corpus();
|
|
52077
|
+
init_source_corpus_workspace();
|
|
52078
|
+
}
|
|
52079
|
+
});
|
|
52080
|
+
|
|
52081
|
+
// packages/execution/dist/tools/corpus-host-input.js
|
|
52082
|
+
var init_corpus_host_input = __esm({
|
|
52083
|
+
"packages/execution/dist/tools/corpus-host-input.js"() {
|
|
52084
|
+
"use strict";
|
|
52085
|
+
init_pdf_corpus_archive();
|
|
52086
|
+
}
|
|
52087
|
+
});
|
|
52088
|
+
|
|
52089
|
+
// packages/execution/dist/tools/pdf-corpus-transform.js
|
|
52090
|
+
var LINE_BYTES, ACTIONS3, PDF_CORPUS_TRANSFORM_TOOL_DEFINITION;
|
|
52091
|
+
var init_pdf_corpus_transform = __esm({
|
|
52092
|
+
"packages/execution/dist/tools/pdf-corpus-transform.js"() {
|
|
52093
|
+
"use strict";
|
|
52094
|
+
init_process_async();
|
|
52095
|
+
init_pdf_corpus_archive();
|
|
52096
|
+
init_pdf_transform();
|
|
52097
|
+
LINE_BYTES = 64 * 1024;
|
|
52098
|
+
ACTIONS3 = /* @__PURE__ */ new Set(["begin", "process", "status"]);
|
|
52099
|
+
PDF_CORPUS_TRANSFORM_TOOL_DEFINITION = {
|
|
52100
|
+
name: "pdf_corpus_transform",
|
|
52101
|
+
aliases: ["pdf_corpus_compose"],
|
|
52102
|
+
description: "Resumable original-page PDF merge, split and reorder over an acquired source_corpus. begin accepts an immutable JSONL recipe with one {sourceId,sourceSha256,page} per output page; order and repetitions are exact. process commits bounded partial PDFs and a durable merge tree; repeat the same operation_id after cancellation/update/restart. Source references must already belong to this host-scoped corpus. No text/OCR extraction is required for page copying. Returns a canonical PDF and streamed flattened original-page lineage with exact hashes; document metadata/forms/signatures are not preserved. No total PDF/page-count cap; each physical merge is atomic and may require a longer host work deadline for very large containers.",
|
|
52103
|
+
parameters: { type: "object", properties: {
|
|
52104
|
+
action: { type: "string", enum: [...ACTIONS3] },
|
|
52105
|
+
corpus_id: { type: "string" },
|
|
52106
|
+
operation_id: { type: "string" },
|
|
52107
|
+
operation: { type: "string", enum: ["merge", "split", "reorder"] },
|
|
52108
|
+
request: { type: "string", description: "Complete caller-declared transformation request; does not replace host goal authority." },
|
|
52109
|
+
manifest: { type: "string" },
|
|
52110
|
+
manifest_sha256: { type: "string" },
|
|
52111
|
+
work_budget: { type: "integer", minimum: 1, maximum: 64, description: "Bounded recipe import or leaf/merge work units for this invocation." }
|
|
52112
|
+
}, required: ["action", "corpus_id", "operation_id"], additionalProperties: false }
|
|
52113
|
+
};
|
|
52114
|
+
}
|
|
52115
|
+
});
|
|
52116
|
+
|
|
52117
|
+
// packages/execution/dist/tools/pdf-corpus-recipe.js
|
|
52118
|
+
var init_pdf_corpus_recipe = __esm({
|
|
52119
|
+
"packages/execution/dist/tools/pdf-corpus-recipe.js"() {
|
|
52120
|
+
"use strict";
|
|
52121
|
+
init_corpus_derived_order();
|
|
52122
|
+
init_pdf_corpus_archive();
|
|
52123
|
+
}
|
|
52124
|
+
});
|
|
52125
|
+
|
|
52126
|
+
// packages/execution/dist/tools/pdf-corpus-transform-workspace.js
|
|
52127
|
+
var init_pdf_corpus_transform_workspace = __esm({
|
|
52128
|
+
"packages/execution/dist/tools/pdf-corpus-transform-workspace.js"() {
|
|
52129
|
+
"use strict";
|
|
52130
|
+
init_corpus_work();
|
|
52131
|
+
init_pdf_corpus_transform();
|
|
52132
|
+
init_pdf_corpus_recipe();
|
|
52133
|
+
init_source_corpus_workspace();
|
|
52134
|
+
}
|
|
52135
|
+
});
|
|
52136
|
+
|
|
52137
|
+
// packages/execution/dist/tools/pdf-corpus-recipe-workspace.js
|
|
52138
|
+
var init_pdf_corpus_recipe_workspace = __esm({
|
|
52139
|
+
"packages/execution/dist/tools/pdf-corpus-recipe-workspace.js"() {
|
|
52140
|
+
"use strict";
|
|
52141
|
+
init_corpus_work();
|
|
52142
|
+
init_pdf_corpus_recipe();
|
|
52143
|
+
init_source_corpus_workspace();
|
|
52144
|
+
}
|
|
52145
|
+
});
|
|
52146
|
+
|
|
51885
52147
|
// packages/execution/dist/tools/pdf-visual-markdown.js
|
|
51886
52148
|
var MAX_IMAGE_BYTES;
|
|
51887
52149
|
var init_pdf_visual_markdown = __esm({
|
|
@@ -297303,6 +297565,18 @@ var init_dist3 = __esm({
|
|
|
297303
297565
|
init_vision_action_loop();
|
|
297304
297566
|
init_ocr_pdf();
|
|
297305
297567
|
init_pdf_to_text();
|
|
297568
|
+
init_pdf_corpus_archive();
|
|
297569
|
+
init_pdf_transform();
|
|
297570
|
+
init_source_corpus();
|
|
297571
|
+
init_source_corpus_workspace();
|
|
297572
|
+
init_corpus_work();
|
|
297573
|
+
init_corpus_work_workspace();
|
|
297574
|
+
init_corpus_population();
|
|
297575
|
+
init_corpus_host_input();
|
|
297576
|
+
init_pdf_corpus_transform();
|
|
297577
|
+
init_pdf_corpus_transform_workspace();
|
|
297578
|
+
init_pdf_corpus_recipe();
|
|
297579
|
+
init_pdf_corpus_recipe_workspace();
|
|
297306
297580
|
init_pdf_native_tables();
|
|
297307
297581
|
init_pdf_visual_markdown();
|
|
297308
297582
|
init_pdf_document();
|
|
@@ -297390,6 +297664,8 @@ var init_dist3 = __esm({
|
|
|
297390
297664
|
init_transcribe_python_runtime();
|
|
297391
297665
|
init_verificationCommand();
|
|
297392
297666
|
init_verificationInvocation();
|
|
297667
|
+
init_corpus_derived_order();
|
|
297668
|
+
init_ocr_pdf();
|
|
297393
297669
|
}
|
|
297394
297670
|
});
|
|
297395
297671
|
|
|
@@ -301202,6 +301478,12 @@ init_dist();
|
|
|
301202
301478
|
// packages/orchestrator/dist/contextSNR.js
|
|
301203
301479
|
init_dist();
|
|
301204
301480
|
|
|
301481
|
+
// packages/orchestrator/dist/corpus-native-source-proof-memo.js
|
|
301482
|
+
init_dist();
|
|
301483
|
+
|
|
301484
|
+
// packages/orchestrator/dist/corpus-page-review-source.js
|
|
301485
|
+
init_dist();
|
|
301486
|
+
|
|
301205
301487
|
// packages/orchestrator/dist/contextEngine.js
|
|
301206
301488
|
init_dist();
|
|
301207
301489
|
|
package/dist/update-worker.js
CHANGED
|
@@ -295027,9 +295027,127 @@ init_vision();
|
|
|
295027
295027
|
init_system_deps();
|
|
295028
295028
|
init_vision();
|
|
295029
295029
|
|
|
295030
|
+
// packages/execution/dist/tools/pdf-corpus-archive.js
|
|
295031
|
+
init_process_async();
|
|
295032
|
+
|
|
295030
295033
|
// packages/execution/dist/tools/ocr-pdf.js
|
|
295031
295034
|
init_process_async();
|
|
295032
295035
|
|
|
295036
|
+
// packages/execution/dist/tools/pdf-transform.js
|
|
295037
|
+
init_process_async();
|
|
295038
|
+
var BUFFER_BYTES = 128 * 1024;
|
|
295039
|
+
var MAX_RECORD_BYTES = 64 * 1024;
|
|
295040
|
+
|
|
295041
|
+
// packages/execution/dist/tools/source-corpus.js
|
|
295042
|
+
var SEGMENT_CHARS = 64 * 1024;
|
|
295043
|
+
var RECORD_BYTES = 64 * 1024;
|
|
295044
|
+
var ACTIONS = /* @__PURE__ */ new Set(["ingest", "inventory", "search", "read", "begin", "process", "status"]);
|
|
295045
|
+
var SOURCE_CORPUS_TOOL_DEFINITION = {
|
|
295046
|
+
name: "source_corpus",
|
|
295047
|
+
aliases: ["pdf_corpus"],
|
|
295048
|
+
description: "Acquire and process a scoped PDF corpus without a total document/page-count cap. ingest uses an immutable JSONL manifest, one {ref,sha256} per source, and returns a durable import ID; repeat it to resume bounded batches. Local directory acquisition requires an explicit host policy and resumes bounded traversal/hash/manifest work with ingest_id. It captures an observed, version-fenced filesystem selection, not an atomic live-tree snapshot, and excludes only this workspace's owned .omnius state tree. inventory/search are cursor-paged; read returns exact channel-labelled segments with character offsets. begin preserves the full processing request and selected source versions; process checkpoints complete native pages and resumes after cancellation/restart. Source bytes, full native text and bbox are archived before bounded views. Explicit filters.channel='ocr_text' schedules resumable CPU OCR; rendered pages, engine/language, full OCR text and TSV are preserved separately. For OCR summaries/extractions use corpus_work filters.channel='ocr_text', complete anchored work, export, and corpus_export_review before delivery; source_answer_review only accepts native facts. Native or OCR engine completion does not prove visual understanding, summaries or final delivery.",
|
|
295049
|
+
parameters: { type: "object", properties: {
|
|
295050
|
+
action: { type: "string", enum: [...ACTIONS] },
|
|
295051
|
+
corpus_id: { type: "string" },
|
|
295052
|
+
manifest: { type: "string", description: "Host-authorized JSONL file or alias; one {ref,sha256} record per PDF." },
|
|
295053
|
+
manifest_sha256: { type: "string" },
|
|
295054
|
+
directory: { type: "string", description: "Explicit local-admin directory enumeration only." },
|
|
295055
|
+
ingest_id: { type: "string", description: "Resume directory acquisition or the immutable import without resupplying its directory/manifest. Use a new ID for a deliberately changed directory selection." },
|
|
295056
|
+
source_budget: { type: "integer", minimum: 1, maximum: 64 },
|
|
295057
|
+
operation_id: { type: "string" },
|
|
295058
|
+
request: { type: "string", description: "Complete extraction processing request; not authority to replace the user's goal." },
|
|
295059
|
+
page_budget: { type: "integer", minimum: 1, maximum: 64 },
|
|
295060
|
+
page_size: { type: "integer", minimum: 1, maximum: 128 },
|
|
295061
|
+
cursor: { type: "string" },
|
|
295062
|
+
query: { type: "string" },
|
|
295063
|
+
filters: { type: "object" },
|
|
295064
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
295065
|
+
page_id: { type: "string" },
|
|
295066
|
+
ocr_language: { type: "string", description: "Explicit OCR operation language, e.g. eng or eng+deu. Immutable after begin; uses installed Tesseract languages." },
|
|
295067
|
+
char_offset: { type: "integer", minimum: 0 },
|
|
295068
|
+
max_chars: { type: "integer", minimum: 2, maximum: SEGMENT_CHARS }
|
|
295069
|
+
}, required: ["action", "corpus_id"], additionalProperties: false }
|
|
295070
|
+
};
|
|
295071
|
+
|
|
295072
|
+
// packages/execution/dist/tools/corpus-work.js
|
|
295073
|
+
var ACTIONS2 = ["begin", "next", "read", "commit", "status", "complete", "cancel", "export", "aggregate", "order"];
|
|
295074
|
+
var CORPUS_WORK_TOOL_DEFINITION = {
|
|
295075
|
+
name: "corpus_work",
|
|
295076
|
+
aliases: ["pdf_corpus_work"],
|
|
295077
|
+
description: "Durable model-driven summary or extraction over a scoped corpus. Native text is default; explicitly select filters.channel='ocr_text' for previously processed OCR evidence. begin preserves the FULL request and immutable selection. next gives bounded leased claims; read exposes each complete input through resumable exact character ranges. commit requires every input fully delivered through a successful host model request and exact quote anchors for every input. A read result prepares an exact range; same-response read+commit cannot establish model exposure. Full derived content is archived, never substituted for originals. Summary parents use host-issued bounded child membership and require complete child reads. Repeat next until leaves and reduction finish. Processing coverage is actor-attested, not proof of factual correctness, visual understanding or final delivery. Optional anchored decimal/count records support exact deterministic aggregates; record selection remains actor-attested. Exact anchored typed fields support SQL ordering before pagination through order, after processing completes. Text uses explicit binary collation; decimal is exact, dates calendar, clocks require declared fixed/source offsets. Missing and multiple values require explicit policies; field meaning and selection remain actor-attested. export resumably streams all derived leaf records and the summary root to JSONL. Repeat the exact export while completeExport=false; partial work has no finished artifact. byte_budget bounds each call, not the final output. Public OCR results require corpus_export_review prepare/process/finalize on the returned retained artifactPath; source_answer_review does not ground OCR inline prose. There is no total corpus or output count cap.",
|
|
295078
|
+
parameters: { type: "object", properties: {
|
|
295079
|
+
action: { type: "string", enum: [...ACTIONS2] },
|
|
295080
|
+
corpus_id: { type: "string" },
|
|
295081
|
+
operation_id: { type: "string" },
|
|
295082
|
+
mode: { type: "string", enum: ["summary", "extraction"] },
|
|
295083
|
+
request: { type: "string" },
|
|
295084
|
+
filters: { type: "object" },
|
|
295085
|
+
query: { type: "string" },
|
|
295086
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
295087
|
+
fan_in: { type: "integer", minimum: 2, maximum: 64, description: "Per-parent child allocation, not total corpus limit." },
|
|
295088
|
+
byte_budget: { type: "integer", minimum: 1, maximum: 67108864, description: "Per-call export write/fixity byte budget; repeat export to finish arbitrarily large output." },
|
|
295089
|
+
page_size: { type: "integer", minimum: 1, maximum: 32 },
|
|
295090
|
+
claim_id: { type: "string" },
|
|
295091
|
+
input_id: { type: "string" },
|
|
295092
|
+
char_offset: { type: "integer", minimum: 0 },
|
|
295093
|
+
max_chars: { type: "integer", minimum: 2, maximum: 65536 },
|
|
295094
|
+
content: { type: "string", description: "Complete nonempty model-derived output for this claim." },
|
|
295095
|
+
anchors: { type: "array", minItems: 1, items: { type: "object", properties: {
|
|
295096
|
+
input_id: { type: "string" },
|
|
295097
|
+
char_start: { type: "integer", minimum: 0 },
|
|
295098
|
+
char_end: { type: "integer", minimum: 0 },
|
|
295099
|
+
quote: { type: "string" }
|
|
295100
|
+
}, required: ["input_id", "char_start", "char_end", "quote"], additionalProperties: false } },
|
|
295101
|
+
fields: { type: "array", items: { type: "object", properties: {
|
|
295102
|
+
field: { type: "string" },
|
|
295103
|
+
kind: { type: "string", enum: ["text", "decimal", "date", "time", "datetime"] },
|
|
295104
|
+
anchor: { type: "integer", minimum: 0 },
|
|
295105
|
+
literal: { type: "string", description: "Entire exact literal in the indicated source anchor." },
|
|
295106
|
+
timezone: { type: "string", description: "Dates: calendar. Clocks: source_offset when the literal has Z/offset; otherwise UTC or a fixed +/-HH:MM offset. No inferred timezone." }
|
|
295107
|
+
}, required: ["field", "kind", "anchor", "literal"], additionalProperties: false } },
|
|
295108
|
+
order_spec: { type: "object", properties: {
|
|
295109
|
+
field: { type: "string" },
|
|
295110
|
+
kind: { type: "string", enum: ["text", "decimal", "date", "time", "datetime"] },
|
|
295111
|
+
unit: { type: "string", enum: ["source", "page"] },
|
|
295112
|
+
direction: { type: "string", enum: ["asc", "desc"] },
|
|
295113
|
+
missing: { type: "string", enum: ["first", "last", "exclude", "error"] },
|
|
295114
|
+
multiple: { type: "string", enum: ["min", "max", "error"] },
|
|
295115
|
+
collation: { type: "string", enum: ["binary"] },
|
|
295116
|
+
timezone: { type: "string", enum: ["calendar", "recorded_offset"] },
|
|
295117
|
+
timeSemantics: { type: "string", enum: ["utc_clock"] },
|
|
295118
|
+
where: { type: "object", properties: { equals: { type: "string" }, from: { type: "string" }, through: { type: "string" } }, additionalProperties: false }
|
|
295119
|
+
}, required: ["field", "kind", "unit", "direction", "missing", "multiple"], additionalProperties: false },
|
|
295120
|
+
cursor: { type: "string" },
|
|
295121
|
+
numbers: { type: "array", items: { type: "object", properties: {
|
|
295122
|
+
field: { type: "string" },
|
|
295123
|
+
kind: { type: "string", enum: ["decimal", "count"] },
|
|
295124
|
+
anchor: { type: "integer", minimum: 0 },
|
|
295125
|
+
literal: { type: "string" }
|
|
295126
|
+
}, required: ["field", "kind", "anchor"], additionalProperties: false } },
|
|
295127
|
+
field: { type: "string" }
|
|
295128
|
+
}, required: ["action", "corpus_id", "operation_id"], additionalProperties: false }
|
|
295129
|
+
};
|
|
295130
|
+
|
|
295131
|
+
// packages/execution/dist/tools/pdf-corpus-transform.js
|
|
295132
|
+
init_process_async();
|
|
295133
|
+
var LINE_BYTES = 64 * 1024;
|
|
295134
|
+
var ACTIONS3 = /* @__PURE__ */ new Set(["begin", "process", "status"]);
|
|
295135
|
+
var PDF_CORPUS_TRANSFORM_TOOL_DEFINITION = {
|
|
295136
|
+
name: "pdf_corpus_transform",
|
|
295137
|
+
aliases: ["pdf_corpus_compose"],
|
|
295138
|
+
description: "Resumable original-page PDF merge, split and reorder over an acquired source_corpus. begin accepts an immutable JSONL recipe with one {sourceId,sourceSha256,page} per output page; order and repetitions are exact. process commits bounded partial PDFs and a durable merge tree; repeat the same operation_id after cancellation/update/restart. Source references must already belong to this host-scoped corpus. No text/OCR extraction is required for page copying. Returns a canonical PDF and streamed flattened original-page lineage with exact hashes; document metadata/forms/signatures are not preserved. No total PDF/page-count cap; each physical merge is atomic and may require a longer host work deadline for very large containers.",
|
|
295139
|
+
parameters: { type: "object", properties: {
|
|
295140
|
+
action: { type: "string", enum: [...ACTIONS3] },
|
|
295141
|
+
corpus_id: { type: "string" },
|
|
295142
|
+
operation_id: { type: "string" },
|
|
295143
|
+
operation: { type: "string", enum: ["merge", "split", "reorder"] },
|
|
295144
|
+
request: { type: "string", description: "Complete caller-declared transformation request; does not replace host goal authority." },
|
|
295145
|
+
manifest: { type: "string" },
|
|
295146
|
+
manifest_sha256: { type: "string" },
|
|
295147
|
+
work_budget: { type: "integer", minimum: 1, maximum: 64, description: "Bounded recipe import or leaf/merge work units for this invocation." }
|
|
295148
|
+
}, required: ["action", "corpus_id", "operation_id"], additionalProperties: false }
|
|
295149
|
+
};
|
|
295150
|
+
|
|
295033
295151
|
// packages/execution/dist/tools/pdf-visual-markdown.js
|
|
295034
295152
|
var MAX_IMAGE_BYTES = 8 * 1024 * 1024;
|
|
295035
295153
|
|