@webmcp-auto-ui/sdk 2.5.4 → 2.5.6
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/package.json +1 -1
- package/src/hyperskills.ts +16 -1
- package/src/index.ts +1 -1
package/package.json
CHANGED
package/src/hyperskills.ts
CHANGED
|
@@ -25,7 +25,22 @@ export const hash: (
|
|
|
25
25
|
|
|
26
26
|
export const diff: (prev: unknown, next: unknown) => unknown = hs.diff;
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
/**
|
|
29
|
+
* Get the ?hs= param from a URL string or the current browser URL.
|
|
30
|
+
* When called with a URL argument, parses that URL.
|
|
31
|
+
* When called without arguments, reads window.location.search.
|
|
32
|
+
*/
|
|
33
|
+
export function getHsParam(url?: string): string | null {
|
|
34
|
+
if (url) {
|
|
35
|
+
try {
|
|
36
|
+
const parsed = new URL(url, typeof window !== 'undefined' ? window.location.href : 'https://example.com');
|
|
37
|
+
return parsed.searchParams.get('hs');
|
|
38
|
+
} catch {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return hs.getHsParam();
|
|
43
|
+
}
|
|
29
44
|
|
|
30
45
|
export const createVersion: (
|
|
31
46
|
sourceUrl: string,
|
package/src/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface HyperSkillMeta {
|
|
|
15
15
|
previousHash?: string;
|
|
16
16
|
chatSummary?: string;
|
|
17
17
|
provenance?: {
|
|
18
|
-
mcpServers?: string[];
|
|
18
|
+
mcpServers?: (string | { name: string; url: string })[];
|
|
19
19
|
toolsUsed?: string[];
|
|
20
20
|
toolCallCount?: number;
|
|
21
21
|
skillsReferenced?: string[];
|