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