@veryfront/ext-content-mdx 0.1.1285 → 0.1.1286-rc.25337
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/esm/deno.js +1 -1
- package/esm/src/observability/telemetry-error.d.ts.map +1 -1
- package/esm/src/observability/telemetry-error.js +119 -9
- package/esm/src/platform/compat/http/pinned-fetch.d.ts +1 -1
- package/esm/src/platform/compat/http/pinned-fetch.d.ts.map +1 -1
- package/esm/src/provider/runtime-loader/stream-protocol-classification.d.ts +18 -0
- package/esm/src/provider/runtime-loader/stream-protocol-classification.d.ts.map +1 -0
- package/esm/src/provider/runtime-loader/stream-protocol-classification.js +27 -0
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.d.ts.map +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +4 -4
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry-error.d.ts","sourceRoot":"","sources":["../../../src/src/observability/telemetry-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"telemetry-error.d.ts","sourceRoot":"","sources":["../../../src/src/observability/telemetry-error.ts"],"names":[],"mappings":"AAmLA,MAAM,MAAM,uBAAuB,GAC/B,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,GACtC,SAAS,CAAC;AAUd,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK9E;AAED,qDAAqD;AACrD,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,uBAAuB,GAC7B,uBAAuB,CAyBzB;AAED,wEAAwE;AACxE,wBAAgB,2BAA2B,CACzC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,GAAG,SAAS,EAC7D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AC;CACtB;AAmeD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,EAAE,GAAG,SAAS,CAoCzF"}
|
|
@@ -5,6 +5,7 @@ import { snapshotVeryfrontError } from "../errors/types.js";
|
|
|
5
5
|
import { isNativeErrorWithoutHooks, isProxyWithoutHooks, readNativeErrorNameWithoutHooks, readNativeErrorStackWithoutHooks, } from "../platform/compat/error-introspection.js";
|
|
6
6
|
import { readRuntimeProviderStreamFailureCause } from "../runtime/provider-stream-error-provenance.js";
|
|
7
7
|
import { readProviderErrorDiagnostic } from "../provider/runtime-loader/provider-error-diagnostic.js";
|
|
8
|
+
import { readStreamProtocolClassification } from "../provider/runtime-loader/stream-protocol-classification.js";
|
|
8
9
|
const apply = Reflect.apply;
|
|
9
10
|
const createObject = Object.create;
|
|
10
11
|
const defineProperty = Object.defineProperty;
|
|
@@ -521,6 +522,8 @@ export function telemetryErrorCauseType(error) {
|
|
|
521
522
|
* cause message may embed untrusted data and is withheld.
|
|
522
523
|
*/
|
|
523
524
|
const LOGGABLE_CAUSE_MESSAGES = new NativeSet([
|
|
525
|
+
"Anthropic SSE event exceeded 8388608 bytes",
|
|
526
|
+
"Anthropic SSE remainder exceeded 8388608 bytes",
|
|
524
527
|
"Anthropic partial_json exceeded 4096 deltas",
|
|
525
528
|
"Anthropic partial_json exceeded 4096 empty fragments",
|
|
526
529
|
"Anthropic partial_json exceeded 1048576 UTF-8 bytes",
|
|
@@ -810,17 +813,124 @@ const LOGGABLE_OPENAI_STREAM_ISSUES = new NativeSet([
|
|
|
810
813
|
"web-search sources were malformed",
|
|
811
814
|
]);
|
|
812
815
|
const SUCCESSFUL_OPENAI_STREAM_MESSAGE = /^(?:OpenAI|openai|veryfront-cloud) request failed: invalid successful stream \(([^)]+)\)$/;
|
|
816
|
+
/** Fixed direct Anthropic parser classifications only; never retain provider text. */
|
|
817
|
+
const LOGGABLE_ANTHROPIC_STREAM_ISSUES = new NativeSet([
|
|
818
|
+
// SSE framing
|
|
819
|
+
"Anthropic SSE event exceeded 8388608 bytes",
|
|
820
|
+
"Anthropic SSE remainder exceeded 8388608 bytes",
|
|
821
|
+
"SSE event contained malformed JSON",
|
|
822
|
+
"SSE event was not valid UTF-8",
|
|
823
|
+
// Message lifecycle
|
|
824
|
+
"event followed the terminal message_stop",
|
|
825
|
+
"event type was missing",
|
|
826
|
+
"event was not an object",
|
|
827
|
+
"message delta was malformed",
|
|
828
|
+
"message stop reason was malformed",
|
|
829
|
+
"message stop reason was repeated",
|
|
830
|
+
"message_delta was out of sequence",
|
|
831
|
+
"message_start message was malformed",
|
|
832
|
+
"message_start was out of sequence",
|
|
833
|
+
"message_stop was out of sequence",
|
|
834
|
+
"stream contained no provider envelope",
|
|
835
|
+
"stream contained no supported content blocks",
|
|
836
|
+
"stream ended before a stop reason",
|
|
837
|
+
"stream ended before a terminal marker",
|
|
838
|
+
"stream ended with unfinished content blocks",
|
|
839
|
+
"terminal marker was out of sequence",
|
|
840
|
+
"trailing event type was missing",
|
|
841
|
+
"trailing event was not a usage-bearing lifecycle event",
|
|
842
|
+
"unsupported event type",
|
|
843
|
+
// Content block lifecycle
|
|
844
|
+
"content_block_start was out of sequence",
|
|
845
|
+
"content_block_start content block was malformed",
|
|
846
|
+
"content_block_start index was malformed",
|
|
847
|
+
"content_block_delta index was malformed",
|
|
848
|
+
"content_block_stop index was malformed",
|
|
849
|
+
"content block could not be retained safely",
|
|
850
|
+
"content block delta referenced an unopened block",
|
|
851
|
+
"content block delta was malformed",
|
|
852
|
+
"content block index was reused",
|
|
853
|
+
"content block stop referenced an unopened block",
|
|
854
|
+
"unsupported content block delta type",
|
|
855
|
+
"unsupported content block type",
|
|
856
|
+
// Text
|
|
857
|
+
"text content block was malformed",
|
|
858
|
+
"text delta did not match its content block",
|
|
859
|
+
"text delta retention state was missing",
|
|
860
|
+
"text delta was malformed",
|
|
861
|
+
"text retention budget was exceeded",
|
|
862
|
+
// Thinking
|
|
863
|
+
"thinking content block was malformed",
|
|
864
|
+
"thinking delta did not match its content block",
|
|
865
|
+
"thinking delta retention state was missing",
|
|
866
|
+
"thinking delta was malformed",
|
|
867
|
+
"thinking retention budget was exceeded",
|
|
868
|
+
"redacted thinking content block was malformed",
|
|
869
|
+
// Signature
|
|
870
|
+
"signature delta did not match its content block",
|
|
871
|
+
"signature delta was malformed",
|
|
872
|
+
// Citation
|
|
873
|
+
"citation delta did not match its content block",
|
|
874
|
+
"citation delta was malformed",
|
|
875
|
+
"citation retention budget was exceeded",
|
|
876
|
+
// Tool use
|
|
877
|
+
"tool call arguments were not valid JSON object text",
|
|
878
|
+
"tool-input delta did not match its content block",
|
|
879
|
+
"tool-input delta was malformed",
|
|
880
|
+
"tool-use content block was malformed",
|
|
881
|
+
// Provider tool use
|
|
882
|
+
"provider tool-result content block was malformed",
|
|
883
|
+
"provider tool-use content block was malformed",
|
|
884
|
+
"web-fetch result block was malformed",
|
|
885
|
+
"web-search result block was malformed",
|
|
886
|
+
// Retention limits: partial_json
|
|
887
|
+
"Anthropic partial_json exceeded 1048576 UTF-8 bytes",
|
|
888
|
+
"Anthropic partial_json exceeded 4096 empty fragments",
|
|
889
|
+
// Retention limits: content block
|
|
890
|
+
"Anthropic retained content exceeded 8192 empty fragments (content block)",
|
|
891
|
+
"Anthropic retained content exceeded 8192 items (content block)",
|
|
892
|
+
"Anthropic retained content exceeded 16777216 UTF-8 bytes (content block)",
|
|
893
|
+
// Retention limits: text delta
|
|
894
|
+
"Anthropic retained content exceeded 8192 empty fragments (text delta)",
|
|
895
|
+
"Anthropic retained content exceeded 16777216 UTF-8 bytes (text delta)",
|
|
896
|
+
// Retention limits: thinking delta
|
|
897
|
+
"Anthropic retained content exceeded 8192 empty fragments (thinking delta)",
|
|
898
|
+
"Anthropic retained content exceeded 16777216 UTF-8 bytes (thinking delta)",
|
|
899
|
+
// Retention limits: citation delta
|
|
900
|
+
"Anthropic retained content exceeded 8192 empty fragments (citation delta)",
|
|
901
|
+
"Anthropic retained content exceeded 8192 items (citation delta)",
|
|
902
|
+
"Anthropic retained content exceeded 16777216 UTF-8 bytes (citation delta)",
|
|
903
|
+
]);
|
|
813
904
|
function addSuccessfulStreamIssueForLog(error, entry) {
|
|
814
|
-
if ((entry.name
|
|
815
|
-
entry.provider
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
905
|
+
if ((entry.name === "ProviderRequestError" || entry.name === "ProviderStreamProtocolError") &&
|
|
906
|
+
(entry.provider === "openai" || entry.provider === "anthropic") && entry.status === 200) {
|
|
907
|
+
// Anthropic: read from trusted WeakMap provenance, not from the error message.
|
|
908
|
+
if (entry.provider === "anthropic") {
|
|
909
|
+
const classification = readStreamProtocolClassification(error);
|
|
910
|
+
if (typeof classification === "string" &&
|
|
911
|
+
apply(setHas, LOGGABLE_ANTHROPIC_STREAM_ISSUES, [classification]) === true) {
|
|
912
|
+
entry.streamIssue = classification;
|
|
913
|
+
}
|
|
914
|
+
return;
|
|
915
|
+
}
|
|
916
|
+
// OpenAI: extract from the error message via regex.
|
|
917
|
+
const message = readOwnErrorDataField(error, "message");
|
|
918
|
+
if (typeof message !== "string" || message.length > MAX_STRING_DISPLAY_LENGTH)
|
|
919
|
+
return;
|
|
920
|
+
const match = apply(regExpExec, SUCCESSFUL_OPENAI_STREAM_MESSAGE, [message]);
|
|
921
|
+
const issue = match?.[1];
|
|
922
|
+
if (typeof issue === "string" && apply(setHas, LOGGABLE_OPENAI_STREAM_ISSUES, [issue]) === true) {
|
|
923
|
+
entry.streamIssue = issue;
|
|
924
|
+
}
|
|
819
925
|
return;
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
926
|
+
}
|
|
927
|
+
// Raw parser errors (e.g. RangeError) with trusted WeakMap provenance: these
|
|
928
|
+
// carry no provider/status metadata but the classification is stored in a
|
|
929
|
+
// private WeakMap that user code cannot forge.
|
|
930
|
+
const classification = readStreamProtocolClassification(error);
|
|
931
|
+
if (typeof classification === "string" &&
|
|
932
|
+
apply(setHas, LOGGABLE_ANTHROPIC_STREAM_ISSUES, [classification]) === true) {
|
|
933
|
+
entry.streamIssue = classification;
|
|
824
934
|
}
|
|
825
935
|
}
|
|
826
936
|
function addBoundedProviderDiagnostics(error, entry) {
|
|
@@ -49,7 +49,7 @@ export declare function assertNodeRequestMembersUnchanged(intrinsics: NodeTransp
|
|
|
49
49
|
* Client identity for guarded egress, standing in for the runtime-supplied
|
|
50
50
|
* `user-agent` (`node`, `Deno/x.y.z`) that this transport cannot inherit.
|
|
51
51
|
*/
|
|
52
|
-
export declare const DEFAULT_OUTBOUND_USER_AGENT = "veryfront/0.1.
|
|
52
|
+
export declare const DEFAULT_OUTBOUND_USER_AGENT = "veryfront/0.1.1286-rc.25337";
|
|
53
53
|
export interface PinnedFetchTlsOptions {
|
|
54
54
|
/**
|
|
55
55
|
* Complete trusted CA set for this connection. Passing this replaces the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pinned-fetch.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/http/pinned-fetch.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EACV,KAAK,EAEL,aAAa,EACb,eAAe,EAEhB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAkB,MAAM,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAuC5C,KAAK,cAAc,GAAG,cAAc,WAAW,CAAC,CAAC;AACjD,KAAK,eAAe,GAAG,cAAc,YAAY,CAAC,CAAC;AACnD,KAAK,aAAa,GAAG,cAAc,UAAU,CAAC,CAAC;AAC/C,KAAK,aAAa,GAAG,cAAc,UAAU,CAAC,CAAC;AAC/C,KAAK,cAAc,GAAG,cAAc,WAAW,CAAC,CAAC;AACjD,KAAK,mBAAmB,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC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5B,IAAI,EAAE,WAAW,EACjB,GAAG,GAAE,qBAA0B,EAC/B,mBAAmB,CAAC,EAAE,MAAM,IAAI,GAC/B,OAAO,CAAC,QAAQ,CAAC,CAuRnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Private WeakMap-backed storage for stream protocol classifications.
|
|
3
|
+
*
|
|
4
|
+
* When a provider stream parser detects a protocol violation, it records the
|
|
5
|
+
* fixed classification here before throwing. Telemetry reads only from this
|
|
6
|
+
* trusted store, so forged error fields cannot inject arbitrary text into logs.
|
|
7
|
+
*
|
|
8
|
+
* The WeakMap writer is exported for internal use by the factory module but is
|
|
9
|
+
* NOT re-exported through the public `veryfront/provider/shared` barrel.
|
|
10
|
+
* External code uses the factory functions in
|
|
11
|
+
* `stream-protocol-classification-factories.ts` which create their own errors
|
|
12
|
+
* and record classification internally.
|
|
13
|
+
*/
|
|
14
|
+
/** Record a stream protocol classification on the error that created it. */
|
|
15
|
+
export declare function recordStreamProtocolClassification(error: Error, classification: string): void;
|
|
16
|
+
/** Read the trusted stream protocol classification, if any. */
|
|
17
|
+
export declare function readStreamProtocolClassification(error: unknown): string | undefined;
|
|
18
|
+
//# sourceMappingURL=stream-protocol-classification.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-protocol-classification.d.ts","sourceRoot":"","sources":["../../../../src/src/provider/runtime-loader/stream-protocol-classification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,4EAA4E;AAC5E,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,MAAM,GACrB,IAAI,CAEN;AAED,+DAA+D;AAC/D,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,GACb,MAAM,GAAG,SAAS,CAGpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Private WeakMap-backed storage for stream protocol classifications.
|
|
3
|
+
*
|
|
4
|
+
* When a provider stream parser detects a protocol violation, it records the
|
|
5
|
+
* fixed classification here before throwing. Telemetry reads only from this
|
|
6
|
+
* trusted store, so forged error fields cannot inject arbitrary text into logs.
|
|
7
|
+
*
|
|
8
|
+
* The WeakMap writer is exported for internal use by the factory module but is
|
|
9
|
+
* NOT re-exported through the public `veryfront/provider/shared` barrel.
|
|
10
|
+
* External code uses the factory functions in
|
|
11
|
+
* `stream-protocol-classification-factories.ts` which create their own errors
|
|
12
|
+
* and record classification internally.
|
|
13
|
+
*/
|
|
14
|
+
const apply = Reflect.apply;
|
|
15
|
+
const weakMapGet = WeakMap.prototype.get;
|
|
16
|
+
const weakMapSet = WeakMap.prototype.set;
|
|
17
|
+
const classifications = new WeakMap();
|
|
18
|
+
/** Record a stream protocol classification on the error that created it. */
|
|
19
|
+
export function recordStreamProtocolClassification(error, classification) {
|
|
20
|
+
apply(weakMapSet, classifications, [error, classification]);
|
|
21
|
+
}
|
|
22
|
+
/** Read the trusted stream protocol classification, if any. */
|
|
23
|
+
export function readStreamProtocolClassification(error) {
|
|
24
|
+
if (typeof error !== "object" || error === null)
|
|
25
|
+
return undefined;
|
|
26
|
+
return apply(weakMapGet, classifications, [error]);
|
|
27
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-constant.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version-constant.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version-constant.d.ts","sourceRoot":"","sources":["../../../src/src/utils/version-constant.ts"],"names":[],"mappings":"AAEA,4BAA4B;AAC5B,eAAO,MAAM,OAAO,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veryfront/ext-content-mdx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1286-rc.25337",
|
|
4
4
|
"description": "Veryfront first-party extension package for ext-content-mdx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"veryfront",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/hast": "3.0.3",
|
|
54
54
|
"@types/mdast": "4.0.3",
|
|
55
55
|
"@types/unist": "3.0.2",
|
|
56
|
-
"@veryfront/ext-parser-babel": "0.1.
|
|
56
|
+
"@veryfront/ext-parser-babel": "0.1.1286-rc.25337",
|
|
57
57
|
"acorn": "8.17.0",
|
|
58
58
|
"acorn-jsx": "5.3.2",
|
|
59
59
|
"github-slugger": "2.0.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vfile": "6.0.3"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
|
-
"veryfront": "^0.1.
|
|
85
|
+
"veryfront": "^0.1.1286-rc.25337"
|
|
86
86
|
},
|
|
87
87
|
"type": "module",
|
|
88
88
|
"types": "./esm/extensions/ext-content-mdx/src/index.d.ts",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"NOTICE",
|
|
93
93
|
"README.md"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "1547fd58b8387214c0d1d9c7ebd5367edf98ff29"
|
|
96
96
|
}
|