fix(javascript)!: avoid event payload copies in graph metadata (#1427)
Share the canonical string identity rule with endpoint projection, scope event keys to each emitter, and keep complete event/listener names in properties. Verify real CLI and stdio MCP with large names, registration/removal, distinct emitters, exact name seeds, reserved-prefix values, and unresolved dynamic names. BREAKING CHANGE: New analyses use digest-based IDs for long or reserved-prefix event names and shorter event/listener display labels. Select IDs from the parent graph and read exact names from event_name properties. Stored graphs and their original IDs remain accepted for semantic tracing.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import { digestCanonicalValue } from "./canonicalDigest.js";
|
||||
|
||||
/** Retain short exact string keys or commit their value in a reserved digest namespace. */
|
||||
export const compactStringIdentityKey = (value: string): string => {
|
||||
const prefix = "value-sha256:";
|
||||
const digestKey = `${prefix}${digestCanonicalValue(value, "String identity")}`;
|
||||
return value.length <= digestKey.length && !value.startsWith(prefix)
|
||||
? value
|
||||
: digestKey;
|
||||
};
|
||||
Reference in New Issue
Block a user