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