@copilotkit/web-inspector 1.77.0 → 1.77.1
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/index.cjs +34 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +35 -15
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +172 -25
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/hud-config.cjs +93 -0
- package/dist/lib/hud-config.cjs.map +1 -0
- package/dist/lib/hud-config.mjs +92 -0
- package/dist/lib/hud-config.mjs.map +1 -0
- package/dist/lib/hud-defaults.cjs +19 -0
- package/dist/lib/hud-defaults.cjs.map +1 -0
- package/dist/lib/hud-defaults.mjs +18 -0
- package/dist/lib/hud-defaults.mjs.map +1 -0
- package/dist/lib/hud-loader.cjs +26 -0
- package/dist/lib/hud-loader.cjs.map +1 -0
- package/dist/lib/hud-loader.mjs +26 -0
- package/dist/lib/hud-loader.mjs.map +1 -0
- package/dist/lib/inspector-nav.cjs +1 -0
- package/dist/lib/inspector-nav.mjs +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.mjs +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
let semver = require("semver");
|
|
2
|
+
|
|
3
|
+
//#region src/lib/hud-config.ts
|
|
4
|
+
const HUD_FEATURE_IDS = ["threads", "learning"];
|
|
5
|
+
const HUD_LABEL_MAX_LENGTH = 32;
|
|
6
|
+
const HUD_DESCRIPTION_MAX_LENGTH = 140;
|
|
7
|
+
const frameworkPattern = /^[a-z][a-z0-9-]{0,31}$/;
|
|
8
|
+
const featureIdPattern = /^[a-z][a-z0-9-]{0,31}$/;
|
|
9
|
+
const destinationPattern = /^[a-z][a-z0-9-]{0,63}$/;
|
|
10
|
+
const controlCharacters = /[\u0000-\u001f\u007f-\u009f\u2028\u2029]/;
|
|
11
|
+
function record(value) {
|
|
12
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
13
|
+
}
|
|
14
|
+
function onlyKeys(value, keys) {
|
|
15
|
+
return Object.keys(value).every((key) => keys.includes(key));
|
|
16
|
+
}
|
|
17
|
+
function text(value, max) {
|
|
18
|
+
return typeof value === "string" && value.trim().length > 0 && value.length <= max && !controlCharacters.test(value);
|
|
19
|
+
}
|
|
20
|
+
function parseFeature(value) {
|
|
21
|
+
if (!record(value) || !Object.keys(value).length || !onlyKeys(value, [
|
|
22
|
+
"label",
|
|
23
|
+
"description",
|
|
24
|
+
"destination"
|
|
25
|
+
])) return null;
|
|
26
|
+
if (value.label !== void 0 && !text(value.label, HUD_LABEL_MAX_LENGTH)) return null;
|
|
27
|
+
if (value.description !== void 0 && !text(value.description, HUD_DESCRIPTION_MAX_LENGTH)) return null;
|
|
28
|
+
if (value.destination !== void 0 && (typeof value.destination !== "string" || !destinationPattern.test(value.destination))) return null;
|
|
29
|
+
return {
|
|
30
|
+
...value.label === void 0 ? {} : { label: value.label },
|
|
31
|
+
...value.description === void 0 ? {} : { description: value.description },
|
|
32
|
+
...value.destination === void 0 ? {} : { destination: value.destination }
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function parseRule(value) {
|
|
36
|
+
if (!record(value) || !onlyKeys(value, [
|
|
37
|
+
"framework",
|
|
38
|
+
"sdkVersion",
|
|
39
|
+
"features"
|
|
40
|
+
]) || typeof value.framework !== "string" || !frameworkPattern.test(value.framework) || !text(value.sdkVersion, 256) || (0, semver.validRange)(value.sdkVersion) === null || !record(value.features) || !Object.keys(value.features).length) return null;
|
|
41
|
+
const features = {};
|
|
42
|
+
for (const [id, entry] of Object.entries(value.features)) {
|
|
43
|
+
if (!featureIdPattern.test(id)) return null;
|
|
44
|
+
const feature = parseFeature(entry);
|
|
45
|
+
if (!feature) return null;
|
|
46
|
+
features[id] = feature;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
framework: value.framework,
|
|
50
|
+
sdkVersion: value.sdkVersion,
|
|
51
|
+
features
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Parse the public envelope. Any invalid entry rejects the whole feed. */
|
|
55
|
+
function parseHudFeed(value) {
|
|
56
|
+
if (!record(value) || !onlyKeys(value, ["schemaVersion", "rules"]) || value.schemaVersion !== 1 || !Array.isArray(value.rules) || value.rules.length > 100) return null;
|
|
57
|
+
const rules = [];
|
|
58
|
+
for (const entry of value.rules) {
|
|
59
|
+
const rule = parseRule(entry);
|
|
60
|
+
if (!rule) return null;
|
|
61
|
+
rules.push(rule);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
schemaVersion: 1,
|
|
65
|
+
rules
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Return the first rule for a development client with a known stable SDK. */
|
|
69
|
+
function matchHudRule(feed, context) {
|
|
70
|
+
const { development, framework, sdkVersion } = context;
|
|
71
|
+
if (!development || !framework || !sdkVersion || (0, semver.valid)(sdkVersion) === null || (0, semver.prerelease)(sdkVersion) !== null) return null;
|
|
72
|
+
return feed.rules.find((rule) => rule.framework === framework && (0, semver.satisfies)(sdkVersion, rule.sdkVersion)) ?? null;
|
|
73
|
+
}
|
|
74
|
+
/** Overlay the matching rule on the built-in content, field by field. */
|
|
75
|
+
function resolveHudContent(feed, context, options) {
|
|
76
|
+
const rule = feed ? matchHudRule(feed, context) : null;
|
|
77
|
+
const content = {};
|
|
78
|
+
for (const id of HUD_FEATURE_IDS) {
|
|
79
|
+
const fallback = options.defaults[id];
|
|
80
|
+
const override = rule?.features[id];
|
|
81
|
+
content[id] = {
|
|
82
|
+
label: override?.label ?? fallback.label,
|
|
83
|
+
description: override?.description ?? fallback.description,
|
|
84
|
+
destination: override?.destination !== void 0 && options.supportedDestinations.includes(override.destination) ? override.destination : fallback.destination
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return content;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
exports.parseHudFeed = parseHudFeed;
|
|
92
|
+
exports.resolveHudContent = resolveHudContent;
|
|
93
|
+
//# sourceMappingURL=hud-config.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud-config.cjs","names":[],"sources":["../../src/lib/hud-config.ts"],"sourcesContent":["import { prerelease, satisfies, valid, validRange } from \"semver\";\nimport type { NotificationContext } from \"./notifications.js\";\n\n/** Versioned CDN HUD contract. Keep the Intelligence copy and fixtures aligned. */\nexport type HudFramework = \"react\" | \"vue\" | \"angular\";\nexport type HudFeatureId = \"threads\" | \"learning\";\nexport interface HudFeatureContent {\n label: string;\n description: string;\n destination: string;\n}\nexport type HudContent = Record<HudFeatureId, HudFeatureContent>;\nexport type HudFeatureOverride = Partial<HudFeatureContent>;\nexport interface HudRule {\n /** Frameworks unknown to this SDK are kept but never match. */\n framework: string;\n sdkVersion: string;\n /** Keyed by feature ID; IDs unknown to this SDK are kept but never applied. */\n features: Record<string, HudFeatureOverride>;\n}\nexport interface HudFeed {\n schemaVersion: 1;\n rules: HudRule[];\n}\nexport type HudContext = Pick<\n NotificationContext,\n \"development\" | \"framework\" | \"sdkVersion\"\n>;\nexport interface HudResolveOptions {\n defaults: HudContent;\n /** Destination keys this SDK can open; anything else keeps the default. */\n supportedDestinations: readonly string[];\n}\n\nexport const HUD_FEATURE_IDS: readonly HudFeatureId[] = [\"threads\", \"learning\"];\nexport const HUD_LABEL_MAX_LENGTH = 32;\nexport const HUD_DESCRIPTION_MAX_LENGTH = 140;\nconst frameworkPattern = /^[a-z][a-z0-9-]{0,31}$/;\nconst featureIdPattern = /^[a-z][a-z0-9-]{0,31}$/;\nconst destinationPattern = /^[a-z][a-z0-9-]{0,63}$/;\n// eslint-disable-next-line no-control-regex\nconst controlCharacters = /[\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]/;\n\nfunction record(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\nfunction onlyKeys(value: Record<string, unknown>, keys: string[]): boolean {\n return Object.keys(value).every((key) => keys.includes(key));\n}\nfunction text(value: unknown, max: number): value is string {\n return (\n typeof value === \"string\" &&\n value.trim().length > 0 &&\n value.length <= max &&\n !controlCharacters.test(value)\n );\n}\nfunction parseFeature(value: unknown): HudFeatureOverride | null {\n if (\n !record(value) ||\n !Object.keys(value).length ||\n !onlyKeys(value, [\"label\", \"description\", \"destination\"])\n )\n return null;\n if (value.label !== undefined && !text(value.label, HUD_LABEL_MAX_LENGTH))\n return null;\n if (\n value.description !== undefined &&\n !text(value.description, HUD_DESCRIPTION_MAX_LENGTH)\n )\n return null;\n if (\n value.destination !== undefined &&\n (typeof value.destination !== \"string\" ||\n !destinationPattern.test(value.destination))\n )\n return null;\n return {\n ...(value.label === undefined ? {} : { label: value.label }),\n ...(value.description === undefined\n ? {}\n : { description: value.description }),\n ...(value.destination === undefined\n ? {}\n : { destination: value.destination }),\n };\n}\nfunction parseRule(value: unknown): HudRule | null {\n if (\n !record(value) ||\n !onlyKeys(value, [\"framework\", \"sdkVersion\", \"features\"]) ||\n typeof value.framework !== \"string\" ||\n !frameworkPattern.test(value.framework) ||\n !text(value.sdkVersion, 256) ||\n validRange(value.sdkVersion) === null ||\n !record(value.features) ||\n !Object.keys(value.features).length\n )\n return null;\n const features: Record<string, HudFeatureOverride> = {};\n for (const [id, entry] of Object.entries(value.features)) {\n if (!featureIdPattern.test(id)) return null;\n const feature = parseFeature(entry);\n if (!feature) return null;\n features[id] = feature;\n }\n return {\n framework: value.framework,\n sdkVersion: value.sdkVersion,\n features,\n };\n}\n\n/** Parse the public envelope. Any invalid entry rejects the whole feed. */\nexport function parseHudFeed(value: unknown): HudFeed | null {\n if (\n !record(value) ||\n !onlyKeys(value, [\"schemaVersion\", \"rules\"]) ||\n value.schemaVersion !== 1 ||\n !Array.isArray(value.rules) ||\n value.rules.length > 100\n )\n return null;\n const rules: HudRule[] = [];\n for (const entry of value.rules) {\n const rule = parseRule(entry);\n if (!rule) return null;\n rules.push(rule);\n }\n return { schemaVersion: 1, rules };\n}\n\n/** Return the first rule for a development client with a known stable SDK. */\nexport function matchHudRule(\n feed: HudFeed,\n context: HudContext,\n): HudRule | null {\n const { development, framework, sdkVersion } = context;\n if (\n !development ||\n !framework ||\n !sdkVersion ||\n valid(sdkVersion) === null ||\n prerelease(sdkVersion) !== null\n )\n return null;\n return (\n feed.rules.find(\n (rule) =>\n rule.framework === framework && satisfies(sdkVersion, rule.sdkVersion),\n ) ?? null\n );\n}\n\n/** Overlay the matching rule on the built-in content, field by field. */\nexport function resolveHudContent(\n feed: HudFeed | null,\n context: HudContext,\n options: HudResolveOptions,\n): HudContent {\n const rule = feed ? matchHudRule(feed, context) : null;\n const content = {} as HudContent;\n for (const id of HUD_FEATURE_IDS) {\n const fallback = options.defaults[id];\n const override = rule?.features[id];\n content[id] = {\n label: override?.label ?? fallback.label,\n description: override?.description ?? fallback.description,\n destination:\n override?.destination !== undefined &&\n options.supportedDestinations.includes(override.destination)\n ? override.destination\n : fallback.destination,\n };\n }\n return content;\n}\n"],"mappings":";;;AAkCA,MAAa,kBAA2C,CAAC,WAAW,WAAW;AAC/E,MAAa,uBAAuB;AACpC,MAAa,6BAA6B;AAC1C,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;AAE3B,MAAM,oBAAoB;AAE1B,SAAS,OAAO,OAAkD;AAChE,QAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;AAE7E,SAAS,SAAS,OAAgC,MAAyB;AACzE,QAAO,OAAO,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,SAAS,IAAI,CAAC;;AAE9D,SAAS,KAAK,OAAgB,KAA8B;AAC1D,QACE,OAAO,UAAU,YACjB,MAAM,MAAM,CAAC,SAAS,KACtB,MAAM,UAAU,OAChB,CAAC,kBAAkB,KAAK,MAAM;;A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IH,SAAgB,aAAa,OAAgC;AAC3D,KACE,CAAC,OAAO,MAAM,IACd,CAAC,SAAS,OAAO,CAAC,iBAAiB,QAAQ,CAAC,IAC5C,MAAM,kBAAkB,KACxB,CAAC,MAAM,QAAQ,MAAM,MAAM,IAC3B,MAAM,MAAM,SAAS,IAErB,QAAO;CACT,MAAM,QAAmB,EAAE;AAC3B,MAAK,MAAM,SAAS,MAAM,OAAO;EAC/B,MAAM,OAAO,UAAU,MAAM;AAC7B,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,KAAK,KAAK;;AAElB,QAAO;EAAE,eAAe;EAAG;EAAO;;;AAIpC,SAAgB,aACd,MACA,SACgB;CAChB,MAAM,EAAE,aAAa,WAAW,eAAe;AAC/C,KACE,CAAC,eACD,CAAC,aACD,CAAC,gCACK,WAAW,KAAK,+BACX,WAAW,KAAK,KAE3B,QAAO;AACT,QACE,KAAK,MAAM,MACR,SACC,KAAK,cAAc,mCAAuB,YAAY,KAAK,WAAW,CACzE,IAAI;;;AAKT,SAAgB,kBACd,MACA,SACA,SACY;CACZ,MAAM,OAAO,OAAO,aAAa,MAAM,QAAQ,GAAG;CAClD,MAAM,UAAU,EAAE;AAClB,MAAK,MAAM,MAAM,iBAAiB;EAChC,MAAM,WAAW,QAAQ,SAAS;EAClC,MAAM,WAAW,MAAM,SAAS;AAChC,UAAQ,MAAM;GACZ,OAAO,UAAU,SAAS,SAAS;GACnC,aAAa,UAAU,eAAe,SAAS;GAC/C,aACE,UAAU,gBAAgB,UAC1B,QAAQ,sBAAsB,SAAS,SAAS,YAAY,GACxD,SAAS,cACT,SAAS;GAChB;;AAEH,QAAO"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { prerelease, satisfies, valid, validRange } from "semver";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/hud-config.ts
|
|
4
|
+
const HUD_FEATURE_IDS = ["threads", "learning"];
|
|
5
|
+
const HUD_LABEL_MAX_LENGTH = 32;
|
|
6
|
+
const HUD_DESCRIPTION_MAX_LENGTH = 140;
|
|
7
|
+
const frameworkPattern = /^[a-z][a-z0-9-]{0,31}$/;
|
|
8
|
+
const featureIdPattern = /^[a-z][a-z0-9-]{0,31}$/;
|
|
9
|
+
const destinationPattern = /^[a-z][a-z0-9-]{0,63}$/;
|
|
10
|
+
const controlCharacters = /[\u0000-\u001f\u007f-\u009f\u2028\u2029]/;
|
|
11
|
+
function record(value) {
|
|
12
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
13
|
+
}
|
|
14
|
+
function onlyKeys(value, keys) {
|
|
15
|
+
return Object.keys(value).every((key) => keys.includes(key));
|
|
16
|
+
}
|
|
17
|
+
function text(value, max) {
|
|
18
|
+
return typeof value === "string" && value.trim().length > 0 && value.length <= max && !controlCharacters.test(value);
|
|
19
|
+
}
|
|
20
|
+
function parseFeature(value) {
|
|
21
|
+
if (!record(value) || !Object.keys(value).length || !onlyKeys(value, [
|
|
22
|
+
"label",
|
|
23
|
+
"description",
|
|
24
|
+
"destination"
|
|
25
|
+
])) return null;
|
|
26
|
+
if (value.label !== void 0 && !text(value.label, HUD_LABEL_MAX_LENGTH)) return null;
|
|
27
|
+
if (value.description !== void 0 && !text(value.description, HUD_DESCRIPTION_MAX_LENGTH)) return null;
|
|
28
|
+
if (value.destination !== void 0 && (typeof value.destination !== "string" || !destinationPattern.test(value.destination))) return null;
|
|
29
|
+
return {
|
|
30
|
+
...value.label === void 0 ? {} : { label: value.label },
|
|
31
|
+
...value.description === void 0 ? {} : { description: value.description },
|
|
32
|
+
...value.destination === void 0 ? {} : { destination: value.destination }
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function parseRule(value) {
|
|
36
|
+
if (!record(value) || !onlyKeys(value, [
|
|
37
|
+
"framework",
|
|
38
|
+
"sdkVersion",
|
|
39
|
+
"features"
|
|
40
|
+
]) || typeof value.framework !== "string" || !frameworkPattern.test(value.framework) || !text(value.sdkVersion, 256) || validRange(value.sdkVersion) === null || !record(value.features) || !Object.keys(value.features).length) return null;
|
|
41
|
+
const features = {};
|
|
42
|
+
for (const [id, entry] of Object.entries(value.features)) {
|
|
43
|
+
if (!featureIdPattern.test(id)) return null;
|
|
44
|
+
const feature = parseFeature(entry);
|
|
45
|
+
if (!feature) return null;
|
|
46
|
+
features[id] = feature;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
framework: value.framework,
|
|
50
|
+
sdkVersion: value.sdkVersion,
|
|
51
|
+
features
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Parse the public envelope. Any invalid entry rejects the whole feed. */
|
|
55
|
+
function parseHudFeed(value) {
|
|
56
|
+
if (!record(value) || !onlyKeys(value, ["schemaVersion", "rules"]) || value.schemaVersion !== 1 || !Array.isArray(value.rules) || value.rules.length > 100) return null;
|
|
57
|
+
const rules = [];
|
|
58
|
+
for (const entry of value.rules) {
|
|
59
|
+
const rule = parseRule(entry);
|
|
60
|
+
if (!rule) return null;
|
|
61
|
+
rules.push(rule);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
schemaVersion: 1,
|
|
65
|
+
rules
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Return the first rule for a development client with a known stable SDK. */
|
|
69
|
+
function matchHudRule(feed, context) {
|
|
70
|
+
const { development, framework, sdkVersion } = context;
|
|
71
|
+
if (!development || !framework || !sdkVersion || valid(sdkVersion) === null || prerelease(sdkVersion) !== null) return null;
|
|
72
|
+
return feed.rules.find((rule) => rule.framework === framework && satisfies(sdkVersion, rule.sdkVersion)) ?? null;
|
|
73
|
+
}
|
|
74
|
+
/** Overlay the matching rule on the built-in content, field by field. */
|
|
75
|
+
function resolveHudContent(feed, context, options) {
|
|
76
|
+
const rule = feed ? matchHudRule(feed, context) : null;
|
|
77
|
+
const content = {};
|
|
78
|
+
for (const id of HUD_FEATURE_IDS) {
|
|
79
|
+
const fallback = options.defaults[id];
|
|
80
|
+
const override = rule?.features[id];
|
|
81
|
+
content[id] = {
|
|
82
|
+
label: override?.label ?? fallback.label,
|
|
83
|
+
description: override?.description ?? fallback.description,
|
|
84
|
+
destination: override?.destination !== void 0 && options.supportedDestinations.includes(override.destination) ? override.destination : fallback.destination
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return content;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { parseHudFeed, resolveHudContent };
|
|
92
|
+
//# sourceMappingURL=hud-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud-config.mjs","names":[],"sources":["../../src/lib/hud-config.ts"],"sourcesContent":["import { prerelease, satisfies, valid, validRange } from \"semver\";\nimport type { NotificationContext } from \"./notifications.js\";\n\n/** Versioned CDN HUD contract. Keep the Intelligence copy and fixtures aligned. */\nexport type HudFramework = \"react\" | \"vue\" | \"angular\";\nexport type HudFeatureId = \"threads\" | \"learning\";\nexport interface HudFeatureContent {\n label: string;\n description: string;\n destination: string;\n}\nexport type HudContent = Record<HudFeatureId, HudFeatureContent>;\nexport type HudFeatureOverride = Partial<HudFeatureContent>;\nexport interface HudRule {\n /** Frameworks unknown to this SDK are kept but never match. */\n framework: string;\n sdkVersion: string;\n /** Keyed by feature ID; IDs unknown to this SDK are kept but never applied. */\n features: Record<string, HudFeatureOverride>;\n}\nexport interface HudFeed {\n schemaVersion: 1;\n rules: HudRule[];\n}\nexport type HudContext = Pick<\n NotificationContext,\n \"development\" | \"framework\" | \"sdkVersion\"\n>;\nexport interface HudResolveOptions {\n defaults: HudContent;\n /** Destination keys this SDK can open; anything else keeps the default. */\n supportedDestinations: readonly string[];\n}\n\nexport const HUD_FEATURE_IDS: readonly HudFeatureId[] = [\"threads\", \"learning\"];\nexport const HUD_LABEL_MAX_LENGTH = 32;\nexport const HUD_DESCRIPTION_MAX_LENGTH = 140;\nconst frameworkPattern = /^[a-z][a-z0-9-]{0,31}$/;\nconst featureIdPattern = /^[a-z][a-z0-9-]{0,31}$/;\nconst destinationPattern = /^[a-z][a-z0-9-]{0,63}$/;\n// eslint-disable-next-line no-control-regex\nconst controlCharacters = /[\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029]/;\n\nfunction record(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\nfunction onlyKeys(value: Record<string, unknown>, keys: string[]): boolean {\n return Object.keys(value).every((key) => keys.includes(key));\n}\nfunction text(value: unknown, max: number): value is string {\n return (\n typeof value === \"string\" &&\n value.trim().length > 0 &&\n value.length <= max &&\n !controlCharacters.test(value)\n );\n}\nfunction parseFeature(value: unknown): HudFeatureOverride | null {\n if (\n !record(value) ||\n !Object.keys(value).length ||\n !onlyKeys(value, [\"label\", \"description\", \"destination\"])\n )\n return null;\n if (value.label !== undefined && !text(value.label, HUD_LABEL_MAX_LENGTH))\n return null;\n if (\n value.description !== undefined &&\n !text(value.description, HUD_DESCRIPTION_MAX_LENGTH)\n )\n return null;\n if (\n value.destination !== undefined &&\n (typeof value.destination !== \"string\" ||\n !destinationPattern.test(value.destination))\n )\n return null;\n return {\n ...(value.label === undefined ? {} : { label: value.label }),\n ...(value.description === undefined\n ? {}\n : { description: value.description }),\n ...(value.destination === undefined\n ? {}\n : { destination: value.destination }),\n };\n}\nfunction parseRule(value: unknown): HudRule | null {\n if (\n !record(value) ||\n !onlyKeys(value, [\"framework\", \"sdkVersion\", \"features\"]) ||\n typeof value.framework !== \"string\" ||\n !frameworkPattern.test(value.framework) ||\n !text(value.sdkVersion, 256) ||\n validRange(value.sdkVersion) === null ||\n !record(value.features) ||\n !Object.keys(value.features).length\n )\n return null;\n const features: Record<string, HudFeatureOverride> = {};\n for (const [id, entry] of Object.entries(value.features)) {\n if (!featureIdPattern.test(id)) return null;\n const feature = parseFeature(entry);\n if (!feature) return null;\n features[id] = feature;\n }\n return {\n framework: value.framework,\n sdkVersion: value.sdkVersion,\n features,\n };\n}\n\n/** Parse the public envelope. Any invalid entry rejects the whole feed. */\nexport function parseHudFeed(value: unknown): HudFeed | null {\n if (\n !record(value) ||\n !onlyKeys(value, [\"schemaVersion\", \"rules\"]) ||\n value.schemaVersion !== 1 ||\n !Array.isArray(value.rules) ||\n value.rules.length > 100\n )\n return null;\n const rules: HudRule[] = [];\n for (const entry of value.rules) {\n const rule = parseRule(entry);\n if (!rule) return null;\n rules.push(rule);\n }\n return { schemaVersion: 1, rules };\n}\n\n/** Return the first rule for a development client with a known stable SDK. */\nexport function matchHudRule(\n feed: HudFeed,\n context: HudContext,\n): HudRule | null {\n const { development, framework, sdkVersion } = context;\n if (\n !development ||\n !framework ||\n !sdkVersion ||\n valid(sdkVersion) === null ||\n prerelease(sdkVersion) !== null\n )\n return null;\n return (\n feed.rules.find(\n (rule) =>\n rule.framework === framework && satisfies(sdkVersion, rule.sdkVersion),\n ) ?? null\n );\n}\n\n/** Overlay the matching rule on the built-in content, field by field. */\nexport function resolveHudContent(\n feed: HudFeed | null,\n context: HudContext,\n options: HudResolveOptions,\n): HudContent {\n const rule = feed ? matchHudRule(feed, context) : null;\n const content = {} as HudContent;\n for (const id of HUD_FEATURE_IDS) {\n const fallback = options.defaults[id];\n const override = rule?.features[id];\n content[id] = {\n label: override?.label ?? fallback.label,\n description: override?.description ?? fallback.description,\n destination:\n override?.destination !== undefined &&\n options.supportedDestinations.includes(override.destination)\n ? override.destination\n : fallback.destination,\n };\n }\n return content;\n}\n"],"mappings":";;;AAkCA,MAAa,kBAA2C,CAAC,WAAW,WAAW;AAC/E,MAAa,uBAAuB;AACpC,MAAa,6BAA6B;AAC1C,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,qBAAqB;AAE3B,MAAM,oBAAoB;AAE1B,SAAS,OAAO,OAAkD;AAChE,QAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,MAAM;;AAE7E,SAAS,SAAS,OAAgC,MAAyB;AACzE,QAAO,OAAO,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,SAAS,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
|
|
2
|
+
//#region src/lib/hud-defaults.ts
|
|
3
|
+
/** Built-in HUD copy and destinations; a matching feed rule overrides fields. */
|
|
4
|
+
const HUD_DEFAULT_CONTENT = {
|
|
5
|
+
threads: {
|
|
6
|
+
label: "Rich Threads",
|
|
7
|
+
description: "Click to learn more",
|
|
8
|
+
destination: "threads"
|
|
9
|
+
},
|
|
10
|
+
learning: {
|
|
11
|
+
label: "Automatic Learning",
|
|
12
|
+
description: "Click to learn more",
|
|
13
|
+
destination: "memories"
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
exports.HUD_DEFAULT_CONTENT = HUD_DEFAULT_CONTENT;
|
|
19
|
+
//# sourceMappingURL=hud-defaults.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud-defaults.cjs","names":[],"sources":["../../src/lib/hud-defaults.ts"],"sourcesContent":["import type { HudContent } from \"./hud-config.js\";\n\n/** Built-in HUD copy and destinations; a matching feed rule overrides fields. */\nexport const HUD_DEFAULT_CONTENT: HudContent = {\n threads: {\n label: \"Rich Threads\",\n description: \"Click to learn more\",\n destination: \"threads\",\n },\n learning: {\n label: \"Automatic Learning\",\n description: \"Click to learn more\",\n destination: \"memories\",\n },\n};\n"],"mappings":";;;AAGA,MAAa,sBAAkC;CAC7C,SAAS;EACP,OAAO;EACP,aAAa;EACb,aAAa;EACd;CACD,UAAU;EACR,OAAO;EACP,aAAa;EACb,aAAa;EACd;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/lib/hud-defaults.ts
|
|
2
|
+
/** Built-in HUD copy and destinations; a matching feed rule overrides fields. */
|
|
3
|
+
const HUD_DEFAULT_CONTENT = {
|
|
4
|
+
threads: {
|
|
5
|
+
label: "Rich Threads",
|
|
6
|
+
description: "Click to learn more",
|
|
7
|
+
destination: "threads"
|
|
8
|
+
},
|
|
9
|
+
learning: {
|
|
10
|
+
label: "Automatic Learning",
|
|
11
|
+
description: "Click to learn more",
|
|
12
|
+
destination: "memories"
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { HUD_DEFAULT_CONTENT };
|
|
18
|
+
//# sourceMappingURL=hud-defaults.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud-defaults.mjs","names":[],"sources":["../../src/lib/hud-defaults.ts"],"sourcesContent":["import type { HudContent } from \"./hud-config.js\";\n\n/** Built-in HUD copy and destinations; a matching feed rule overrides fields. */\nexport const HUD_DEFAULT_CONTENT: HudContent = {\n threads: {\n label: \"Rich Threads\",\n description: \"Click to learn more\",\n destination: \"threads\",\n },\n learning: {\n label: \"Automatic Learning\",\n description: \"Click to learn more\",\n destination: \"memories\",\n },\n};\n"],"mappings":";;AAGA,MAAa,sBAAkC;CAC7C,SAAS;EACP,OAAO;EACP,aAAa;EACb,aAAa;EACd;CACD,UAAU;EACR,OAAO;EACP,aAAa;EACb,aAAa;EACd;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const require_hud_config = require('./hud-config.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/lib/hud-loader.ts
|
|
4
|
+
const HUD_FEED_URL = "https://cdn.copilotkit.ai/inspector-hud/v1.json";
|
|
5
|
+
let request = null;
|
|
6
|
+
/** Load the HUD feed once per page. The request carries no client data. */
|
|
7
|
+
function loadHudFeed() {
|
|
8
|
+
if (typeof window === "undefined" || typeof fetch === "undefined") return Promise.resolve(null);
|
|
9
|
+
request ??= Promise.resolve().then(() => fetch(HUD_FEED_URL, {
|
|
10
|
+
cache: "no-cache",
|
|
11
|
+
credentials: "omit"
|
|
12
|
+
})).then(async (response) => {
|
|
13
|
+
if (!response.ok) throw new Error(`Feed request failed (${response.status})`);
|
|
14
|
+
const feed = require_hud_config.parseHudFeed(await response.json());
|
|
15
|
+
if (!feed) throw new Error("Feed failed validation");
|
|
16
|
+
return feed;
|
|
17
|
+
}).catch((error) => {
|
|
18
|
+
console.warn("[CopilotKit Inspector] Failed to load HUD content", error);
|
|
19
|
+
return null;
|
|
20
|
+
});
|
|
21
|
+
return request;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.loadHudFeed = loadHudFeed;
|
|
26
|
+
//# sourceMappingURL=hud-loader.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud-loader.cjs","names":["parseHudFeed"],"sources":["../../src/lib/hud-loader.ts"],"sourcesContent":["import { parseHudFeed } from \"./hud-config.js\";\nimport type { HudFeed } from \"./hud-config.js\";\n\nexport const HUD_FEED_URL = \"https://cdn.copilotkit.ai/inspector-hud/v1.json\";\nlet request: Promise<HudFeed | null> | null = null;\n\n/** Load the HUD feed once per page. The request carries no client data. */\nexport function loadHudFeed(): Promise<HudFeed | null> {\n if (typeof window === \"undefined\" || typeof fetch === \"undefined\")\n return Promise.resolve(null);\n // Start inside a promise so even a synchronous fetch failure resolves null.\n request ??= Promise.resolve()\n .then(() => fetch(HUD_FEED_URL, { cache: \"no-cache\", credentials: \"omit\" }))\n .then(async (response) => {\n if (!response.ok)\n throw new Error(`Feed request failed (${response.status})`);\n const feed = parseHudFeed(await response.json());\n if (!feed) throw new Error(\"Feed failed validation\");\n return feed;\n })\n .catch((error: unknown) => {\n // The HUD keeps its built-in copy; the warning makes that debuggable.\n console.warn(\"[CopilotKit Inspector] Failed to load HUD content\", error);\n return null;\n });\n return request;\n}\n"],"mappings":";;;AAGA,MAAa,eAAe;AAC5B,IAAI,UAA0C;;AAG9C,SAAgB,cAAuC;AACrD,KAAI,OAAO,WAAW,eAAe,OAAO,UAAU,YACpD,QAAO,QAAQ,QAAQ,KAAK;AAE9B,aAAY,QAAQ,SAAS,CAC1B,WAAW,MAAM,cAAc;EAAE,OAAO;EAAY,aAAa;EAAQ,CAAC,CAAC,CAC3E,KAAK,OAAO,aAAa;AACxB,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,wBAAwB,SAAS,OAAO,GAAG;EAC7D,MAAM,OAAOA,gCAAa,MAAM,SAAS,MAAM,CAAC;AAChD,MAAI,CAAC,KAAM,OAAM,IAAI,MAAM,yBAAyB;AACpD,SAAO;GACP,CACD,OAAO,UAAmB;AAEzB,UAAQ,KAAK,qDAAqD,MAAM;AACxE,SAAO;GACP;AACJ,QAAO"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { parseHudFeed } from "./hud-config.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/hud-loader.ts
|
|
4
|
+
const HUD_FEED_URL = "https://cdn.copilotkit.ai/inspector-hud/v1.json";
|
|
5
|
+
let request = null;
|
|
6
|
+
/** Load the HUD feed once per page. The request carries no client data. */
|
|
7
|
+
function loadHudFeed() {
|
|
8
|
+
if (typeof window === "undefined" || typeof fetch === "undefined") return Promise.resolve(null);
|
|
9
|
+
request ??= Promise.resolve().then(() => fetch(HUD_FEED_URL, {
|
|
10
|
+
cache: "no-cache",
|
|
11
|
+
credentials: "omit"
|
|
12
|
+
})).then(async (response) => {
|
|
13
|
+
if (!response.ok) throw new Error(`Feed request failed (${response.status})`);
|
|
14
|
+
const feed = parseHudFeed(await response.json());
|
|
15
|
+
if (!feed) throw new Error("Feed failed validation");
|
|
16
|
+
return feed;
|
|
17
|
+
}).catch((error) => {
|
|
18
|
+
console.warn("[CopilotKit Inspector] Failed to load HUD content", error);
|
|
19
|
+
return null;
|
|
20
|
+
});
|
|
21
|
+
return request;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { loadHudFeed };
|
|
26
|
+
//# sourceMappingURL=hud-loader.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hud-loader.mjs","names":[],"sources":["../../src/lib/hud-loader.ts"],"sourcesContent":["import { parseHudFeed } from \"./hud-config.js\";\nimport type { HudFeed } from \"./hud-config.js\";\n\nexport const HUD_FEED_URL = \"https://cdn.copilotkit.ai/inspector-hud/v1.json\";\nlet request: Promise<HudFeed | null> | null = null;\n\n/** Load the HUD feed once per page. The request carries no client data. */\nexport function loadHudFeed(): Promise<HudFeed | null> {\n if (typeof window === \"undefined\" || typeof fetch === \"undefined\")\n return Promise.resolve(null);\n // Start inside a promise so even a synchronous fetch failure resolves null.\n request ??= Promise.resolve()\n .then(() => fetch(HUD_FEED_URL, { cache: \"no-cache\", credentials: \"omit\" }))\n .then(async (response) => {\n if (!response.ok)\n throw new Error(`Feed request failed (${response.status})`);\n const feed = parseHudFeed(await response.json());\n if (!feed) throw new Error(\"Feed failed validation\");\n return feed;\n })\n .catch((error: unknown) => {\n // The HUD keeps its built-in copy; the warning makes that debuggable.\n console.warn(\"[CopilotKit Inspector] Failed to load HUD content\", error);\n return null;\n });\n return request;\n}\n"],"mappings":";;;AAGA,MAAa,eAAe;AAC5B,IAAI,UAA0C;;AAG9C,SAAgB,cAAuC;AACrD,KAAI,OAAO,WAAW,eAAe,OAAO,UAAU,YACpD,QAAO,QAAQ,QAAQ,KAAK;AAE9B,aAAY,QAAQ,SAAS,CAC1B,WAAW,MAAM,cAAc;EAAE,OAAO;EAAY,aAAa;EAAQ,CAAC,CAAC,CAC3E,KAAK,OAAO,aAAa;AACxB,MAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,wBAAwB,SAAS,OAAO,GAAG;EAC7D,MAAM,OAAO,aAAa,MAAM,SAAS,MAAM,CAAC;AAChD,MAAI,CAAC,KAAM,OAAM,IAAI,MAAM,yBAAyB;AACpD,SAAO;GACP,CACD,OAAO,UAAmB;AAEzB,UAAQ,KAAK,qDAAqD,MAAM;AACxE,SAAO;GACP;AACJ,QAAO"}
|
|
@@ -51,6 +51,7 @@ function shouldUseIconRail(args) {
|
|
|
51
51
|
|
|
52
52
|
//#endregion
|
|
53
53
|
exports.INSPECTOR_GROUPS = INSPECTOR_GROUPS;
|
|
54
|
+
exports.INSPECTOR_MENU_KEYS = INSPECTOR_MENU_KEYS;
|
|
54
55
|
exports.INSPECTOR_NAV_SECTIONS = INSPECTOR_NAV_SECTIONS;
|
|
55
56
|
exports.getGroupForMenu = getGroupForMenu;
|
|
56
57
|
exports.isInspectorMenuKey = isInspectorMenuKey;
|
|
@@ -49,5 +49,5 @@ function shouldUseIconRail(args) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
|
-
export { INSPECTOR_GROUPS, INSPECTOR_NAV_SECTIONS, getGroupForMenu, isInspectorMenuKey, shouldUseIconRail };
|
|
52
|
+
export { INSPECTOR_GROUPS, INSPECTOR_MENU_KEYS, INSPECTOR_NAV_SECTIONS, getGroupForMenu, isInspectorMenuKey, shouldUseIconRail };
|
|
53
53
|
//# sourceMappingURL=inspector-nav.mjs.map
|
package/dist/package.cjs
CHANGED
package/dist/package.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@copilotkit/web-inspector",
|
|
3
|
-
"version": "1.77.
|
|
3
|
+
"version": "1.77.1",
|
|
4
4
|
"description": "Lit-based web component for the CopilotKit web inspector",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ag-ui/client": "1.0.
|
|
30
|
+
"@ag-ui/client": "1.0.2",
|
|
31
31
|
"lit": "^3.2.0",
|
|
32
32
|
"lucide": "^0.525.0",
|
|
33
33
|
"marked": "^12.0.2",
|
|
34
34
|
"semver": "^7.8.5",
|
|
35
|
-
"@copilotkit/core": "1.77.
|
|
36
|
-
"@copilotkit/shared": "1.77.
|
|
35
|
+
"@copilotkit/core": "1.77.1",
|
|
36
|
+
"@copilotkit/shared": "1.77.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@playwright/test": "^1.59.1",
|