@talonic/mcp 0.1.47 → 0.1.49
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/http-server.js +39 -12
- package/dist/http-server.js.map +1 -1
- package/dist/index.js +39 -12
- package/dist/index.js.map +1 -1
- package/dist/server.js +39 -12
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -739,12 +739,24 @@ var DESCRIPTION4 = [
|
|
|
739
739
|
"USE WHEN:",
|
|
740
740
|
"- You need details about a specific document the user already extracted or uploaded.",
|
|
741
741
|
"- You have a document_id from a previous extract or search call and want more context.",
|
|
742
|
+
"- You called talonic_request_upload and need to poll until the user has uploaded the file.",
|
|
742
743
|
"- The user asks 'tell me about document X' or similar.",
|
|
743
744
|
"",
|
|
744
745
|
"DO NOT USE WHEN:",
|
|
745
746
|
"- The user wants the document's full text content (use talonic_to_markdown for OCR markdown).",
|
|
746
747
|
"- The user wants extracted structured data (use talonic_extract with a schema, or fetch the extraction by id).",
|
|
747
|
-
"- The user has a file but no document_id yet (call talonic_extract first to ingest the document)."
|
|
748
|
+
"- The user has a file but no document_id yet (call talonic_extract first to ingest the document).",
|
|
749
|
+
"",
|
|
750
|
+
"STATUS VALUES on the response `status` field:",
|
|
751
|
+
"- pending_upload: document slot reserved via talonic_request_upload, file not yet received.",
|
|
752
|
+
" Keep polling (~5 s interval). Token expires after 15 min \u2014 if status stays 'pending_upload'",
|
|
753
|
+
" past the expires_at returned by talonic_request_upload, the user did not upload in time.",
|
|
754
|
+
"- queued / extracting: file received, OCR and exhaustive extraction in progress. Keep polling.",
|
|
755
|
+
"- completed: extraction is done. This is the state to wait for before calling talonic_extract",
|
|
756
|
+
" with a schema or schema_id \u2014 the schema-specific LLM pass runs off the cached OCR'd text.",
|
|
757
|
+
"- uploaded: file received but the extraction queue could not be enqueued (rare, e.g. Redis",
|
|
758
|
+
" unavailable). The talonic_extract endpoint will trigger processing inline if called.",
|
|
759
|
+
"- error / ocr_failed / extraction_failed: terminal failures; processing_log carries the reason."
|
|
748
760
|
].join("\n");
|
|
749
761
|
var inputSchema4 = {
|
|
750
762
|
document_id: z.string().min(1).describe(
|
|
@@ -761,18 +773,22 @@ var outputSchema4 = {
|
|
|
761
773
|
language_detected: z.string().nullable().optional(),
|
|
762
774
|
status: z.string().optional(),
|
|
763
775
|
source: z.object({
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
776
|
+
// Pre-extraction documents (e.g. fresh browser-handoff uploads) return
|
|
777
|
+
// null for these until the source linkage is set during ingest. Accept
|
|
778
|
+
// null so output validation does not block agents polling for status.
|
|
779
|
+
id: z.string().nullable().optional(),
|
|
780
|
+
type: z.string().nullable().optional()
|
|
781
|
+
}).nullable().optional(),
|
|
767
782
|
triage: z.object({
|
|
768
|
-
|
|
769
|
-
|
|
783
|
+
// Triage fields are populated during ingest; null is normal before that.
|
|
784
|
+
sensitivity: z.string().nullable().optional(),
|
|
785
|
+
department: z.string().nullable().optional(),
|
|
770
786
|
jurisdiction: z.string().nullable().optional(),
|
|
771
|
-
pii_detected: z.boolean().optional(),
|
|
787
|
+
pii_detected: z.boolean().nullable().optional(),
|
|
772
788
|
pii_categories: z.array(z.string()).nullable().optional(),
|
|
773
|
-
regulated_data: z.boolean().optional(),
|
|
789
|
+
regulated_data: z.boolean().nullable().optional(),
|
|
774
790
|
confidentiality_marking: z.string().nullable().optional()
|
|
775
|
-
}).optional(),
|
|
791
|
+
}).nullable().optional(),
|
|
776
792
|
original_path: z.string().nullable().optional(),
|
|
777
793
|
extraction_count: z.number().optional(),
|
|
778
794
|
latest_extraction_id: z.string().nullable().optional(),
|
|
@@ -1075,7 +1091,16 @@ var DESCRIPTION8 = [
|
|
|
1075
1091
|
"plus a document_id to track the upload.",
|
|
1076
1092
|
"",
|
|
1077
1093
|
"After showing the URL to the user, poll with talonic_get_document until",
|
|
1078
|
-
"status is '
|
|
1094
|
+
"status is 'completed' (the file has been uploaded, OCR'd, and is ready for",
|
|
1095
|
+
"schema-specific extraction). Then call talonic_extract with the document_id",
|
|
1096
|
+
"and a schema or schema_id.",
|
|
1097
|
+
"",
|
|
1098
|
+
"IMPORTANT: a user message like 'uploaded', 'done', or 'I dropped it' only",
|
|
1099
|
+
"confirms the browser-side upload finished. It is NOT a signal that server-side",
|
|
1100
|
+
"processing is complete. The document still needs OCR and exhaustive extraction",
|
|
1101
|
+
"(typically 10-30 s after the browser upload). You MUST poll talonic_get_document",
|
|
1102
|
+
"yourself until status is 'completed' regardless of what the user says. Calling",
|
|
1103
|
+
"talonic_extract before status is 'completed' may return errors.",
|
|
1079
1104
|
"",
|
|
1080
1105
|
"USE WHEN:",
|
|
1081
1106
|
"- The user has a file to extract but you cannot send it via tool-call arguments",
|
|
@@ -1095,7 +1120,9 @@ var inputSchema7 = {
|
|
|
1095
1120
|
)
|
|
1096
1121
|
};
|
|
1097
1122
|
var outputSchema8 = {
|
|
1098
|
-
document_id: z.string().describe(
|
|
1123
|
+
document_id: z.string().describe(
|
|
1124
|
+
"The pre-allocated document ID. Use with talonic_get_document to poll status, and with talonic_extract once uploaded."
|
|
1125
|
+
),
|
|
1099
1126
|
upload_url: z.string().describe("URL the user should open in their browser to drop the file."),
|
|
1100
1127
|
expires_at: z.string().describe("ISO 8601 timestamp when the upload link expires.")
|
|
1101
1128
|
};
|
|
@@ -1269,7 +1296,7 @@ function registerToMarkdown(server, getTalonic) {
|
|
|
1269
1296
|
|
|
1270
1297
|
// package.json
|
|
1271
1298
|
var package_default = {
|
|
1272
|
-
version: "0.1.
|
|
1299
|
+
version: "0.1.49"};
|
|
1273
1300
|
|
|
1274
1301
|
// src/version.ts
|
|
1275
1302
|
var VERSION = package_default.version;
|