@mhmo91/schmancy 0.9.26 → 0.9.27
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/agent/schmancy.agent.js +56 -15
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/handover/agent-runtime-v2-loopback.md +5 -5
- package/package.json +1 -1
- package/src/agent/agent-bundle.test.ts +49 -0
- package/src/agent/helpers.ts +94 -0
- package/src/agent/schmancy-skill.ts +3 -0
- package/types/src/agent/helpers.d.ts +26 -0
- package/types/src/agent/schmancy-skill.d.ts +2 -1
|
@@ -36876,13 +36876,53 @@ function Sp(e) {
|
|
|
36876
36876
|
function Cp() {
|
|
36877
36877
|
return vp.tokens ?? [];
|
|
36878
36878
|
}
|
|
36879
|
-
|
|
36879
|
+
var wp = new Set(/* @__PURE__ */ "a.an.and.or.the.of.in.on.at.to.for.with.is.it.this.that.these.those.be.by.as.are.was.i.you.we.my.your".split("."));
|
|
36880
|
+
function Tp(e) {
|
|
36881
|
+
let t = /* @__PURE__ */ new Set();
|
|
36882
|
+
for (let n of e.toLowerCase().match(/[a-z][a-z0-9]+/g) ?? []) n.length >= 2 && !wp.has(n) && t.add(n);
|
|
36883
|
+
return t;
|
|
36884
|
+
}
|
|
36885
|
+
var Ep = null;
|
|
36886
|
+
function Dp(e, t = 5) {
|
|
36887
|
+
Ep ||= bp().map((e) => {
|
|
36888
|
+
let t = Tp((e.tagName ?? "").replace(/-/g, " "));
|
|
36889
|
+
return {
|
|
36890
|
+
entry: e,
|
|
36891
|
+
body: Tp([
|
|
36892
|
+
e.tagName ?? "",
|
|
36893
|
+
e.summary ?? "",
|
|
36894
|
+
e.description ?? "",
|
|
36895
|
+
e.whenToUse ?? "",
|
|
36896
|
+
(e.examples ?? []).join(" ")
|
|
36897
|
+
].join(" ")),
|
|
36898
|
+
tagTokens: t
|
|
36899
|
+
};
|
|
36900
|
+
});
|
|
36901
|
+
let n = Tp(e);
|
|
36902
|
+
if (n.size === 0) return [];
|
|
36903
|
+
let r = [];
|
|
36904
|
+
for (let e of Ep) {
|
|
36905
|
+
let t = 0;
|
|
36906
|
+
for (let r of n) e.tagTokens.has(r) ? t += 3 : e.body.has(r) && (t += 1);
|
|
36907
|
+
t > 0 && r.push({
|
|
36908
|
+
entry: e.entry,
|
|
36909
|
+
score: t
|
|
36910
|
+
});
|
|
36911
|
+
}
|
|
36912
|
+
return r.sort((e, t) => t.score - e.score), r.slice(0, t).map(({ entry: e, score: t }) => ({
|
|
36913
|
+
tag: e.tagName ?? "",
|
|
36914
|
+
score: t,
|
|
36915
|
+
summary: e.summary,
|
|
36916
|
+
examples: e.examples
|
|
36917
|
+
}));
|
|
36918
|
+
}
|
|
36919
|
+
function Op(e) {
|
|
36880
36920
|
return bp().find((t) => t.tagName === e)?.platformPrimitive ?? null;
|
|
36881
36921
|
}
|
|
36882
|
-
function
|
|
36922
|
+
function kp() {
|
|
36883
36923
|
return bp().map((e) => e.tagName).filter((e) => customElements.get(e) !== void 0);
|
|
36884
36924
|
}
|
|
36885
|
-
function
|
|
36925
|
+
function Ap() {
|
|
36886
36926
|
let e = new Set(bp().map((e) => e.tagName)), t = [], n = document.querySelectorAll("*");
|
|
36887
36927
|
for (let r of Array.from(n)) {
|
|
36888
36928
|
let n = r.tagName.toLowerCase();
|
|
@@ -36898,7 +36938,7 @@ function Ep() {
|
|
|
36898
36938
|
}
|
|
36899
36939
|
return t;
|
|
36900
36940
|
}
|
|
36901
|
-
function
|
|
36941
|
+
function jp() {
|
|
36902
36942
|
let e = typeof HTMLTemplateElement < "u" ? HTMLTemplateElement.prototype : null, t = typeof ElementInternals < "u" ? ElementInternals.prototype : null;
|
|
36903
36943
|
return {
|
|
36904
36944
|
popover: typeof HTMLElement < "u" && "popover" in HTMLElement.prototype,
|
|
@@ -36917,29 +36957,30 @@ function Dp() {
|
|
|
36917
36957
|
adoptedStyleSheets: typeof Document < "u" && "adoptedStyleSheets" in Document.prototype
|
|
36918
36958
|
};
|
|
36919
36959
|
}
|
|
36920
|
-
var
|
|
36921
|
-
function
|
|
36922
|
-
typeof window < "u" && (
|
|
36960
|
+
var Mp = null;
|
|
36961
|
+
function Np() {
|
|
36962
|
+
typeof window < "u" && (Mp || (Mp = function() {
|
|
36923
36963
|
let e = new Blob([JSON.stringify(vp)], { type: "application/json" });
|
|
36924
36964
|
return URL.createObjectURL(e);
|
|
36925
36965
|
}(), window.schmancy = {
|
|
36926
36966
|
manifest: vp,
|
|
36927
|
-
manifestUrl:
|
|
36967
|
+
manifestUrl: Mp,
|
|
36928
36968
|
help: Sp,
|
|
36929
36969
|
tokens: Cp,
|
|
36930
|
-
platformPrimitive:
|
|
36931
|
-
registeredTags:
|
|
36932
|
-
a11yAudit:
|
|
36933
|
-
capabilities:
|
|
36970
|
+
platformPrimitive: Op,
|
|
36971
|
+
registeredTags: kp,
|
|
36972
|
+
a11yAudit: Ap,
|
|
36973
|
+
capabilities: jp,
|
|
36974
|
+
findFor: Dp
|
|
36934
36975
|
}));
|
|
36935
36976
|
}
|
|
36936
|
-
var
|
|
36977
|
+
var Pp = class extends B() {
|
|
36937
36978
|
connectedCallback() {
|
|
36938
|
-
super.connectedCallback(),
|
|
36979
|
+
super.connectedCallback(), Np();
|
|
36939
36980
|
}
|
|
36940
36981
|
render() {
|
|
36941
36982
|
return j``;
|
|
36942
36983
|
}
|
|
36943
36984
|
};
|
|
36944
|
-
|
|
36985
|
+
Pp = N([P("schmancy-skill")], Pp);
|
|
36945
36986
|
export { B as $LitElement, Mc as $dialog, hd as $notify, Nc as SchmancySheetPosition, ti as area, Oa as createContext, ai as lazy, gc as schmancyContentDrawer, Pa as select, Fa as selectItem, Pc as sheet, Oo as theme };
|