bazilion 0.53.0 → 0.55.0
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/cli.js +12 -7
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +705 -354
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-DfFOaCjC.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-IMJmAQjN.js +1 -0
- package/dist/web/client/assets/Button-bTJUy9Qf.js +1 -0
- package/dist/web/client/assets/{ConfigPage-DiQiJXP6.js → ConfigPage-CzLHZa5o.js} +1 -1
- package/dist/web/client/assets/ConfirmDialog-Cu_evkgc.js +1 -0
- package/dist/web/client/assets/ConnectionsView-D7Fmutl2.js +1 -0
- package/dist/web/client/assets/{ManagePage-xlePXXx5.js → ManagePage-BfvlCrmz.js} +1 -1
- package/dist/web/client/assets/{SectionTabs-BMiRKFfb.js → SectionTabs-D7kPQGoh.js} +1 -1
- package/dist/web/client/assets/{Segmented-Co4n2C5X.js → Segmented-oPkAHPO1.js} +1 -1
- package/dist/web/client/assets/SkillsParts-BuTxcCam.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-B1UnOvtp.js +1 -0
- package/dist/web/client/assets/TeamForm-DbzxtRjj.js +1 -0
- package/dist/web/client/assets/TeamThread-jpsWq6vI.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-BfyU9v9i.js +1 -0
- package/dist/web/client/assets/_id-BCNBLF-2.js +1 -0
- package/dist/web/client/assets/{_id-DSRgpxEc.js → _id-D8_H79U2.js} +1 -1
- package/dist/web/client/assets/access-CDWe1Kwy.js +1 -0
- package/dist/web/client/assets/agent-actions-CUee6aJq.js +1 -0
- package/dist/web/client/assets/agents-sE686DTf.js +1 -0
- package/dist/web/client/assets/agents-yrur1NDa.js +1 -0
- package/dist/web/client/assets/arrow-right-U66krZnr.js +1 -0
- package/dist/web/client/assets/attention-DYEHDfmx.js +1 -0
- package/dist/web/client/assets/bot-BCone8es.js +1 -0
- package/dist/web/client/assets/chevron-right-CuqJFXTe.js +1 -0
- package/dist/web/client/assets/config-BHv886pr.js +1 -0
- package/dist/web/client/assets/createLucideIcon-jxSFpY0Q.js +1 -0
- package/dist/web/client/assets/{download-Dj-1ltZb.js → download-Dy88XavQ.js} +1 -1
- package/dist/web/client/assets/{file-text-DiP-LaEg.js → file-text-DPsZ8-h9.js} +1 -1
- package/dist/web/client/assets/{images-BKjyhYUc.js → images-QBh_rL8b.js} +1 -1
- package/dist/web/client/assets/index-GOthyyE-.js +14 -0
- package/dist/web/client/assets/{key-round-QpqZklz6.js → key-round-C-I8fAG0.js} +1 -1
- package/dist/web/client/assets/{list-checks-BeyG5SVQ.js → list-checks-C9Q-bjEi.js} +1 -1
- package/dist/web/client/assets/login-Dhe15Uuc.js +1 -0
- package/dist/web/client/assets/manage-BaIU5zKy.js +1 -0
- package/dist/web/client/assets/mcp-A_Eo7x3q.js +1 -0
- package/dist/web/client/assets/{message-square-DnpSOYv4.js → message-square-Bwf9cHOx.js} +1 -1
- package/dist/web/client/assets/{network-BC7rNaOC.js → network-B3FA93gC.js} +1 -1
- package/dist/web/client/assets/parts-CpIfn_BH.js +41 -0
- package/dist/web/client/assets/plus-CQPjc8uR.js +1 -0
- package/dist/web/client/assets/routes-CTg_yjbY.js +85 -0
- package/dist/web/client/assets/skills-CLjtYtkA.js +1 -0
- package/dist/web/client/assets/{square-terminal-hQZ6pexU.js → square-terminal-DaNLwvEs.js} +1 -1
- package/dist/web/client/assets/{style-BtcFIkOS.js → style-mjEbxhf5.js} +1 -1
- package/dist/web/client/assets/styles-DzcEC3Rd.css +2 -0
- package/dist/web/client/assets/system-CrTSr5_t.js +1 -0
- package/dist/web/client/assets/teams-Bhje5n2h.js +1 -0
- package/dist/web/client/assets/teams-Cbgw0Qhv.js +1 -0
- package/dist/web/client/assets/telegram-HtUczmaA.js +1 -0
- package/dist/web/client/assets/tools-BpjFvmoX.js +1 -0
- package/dist/web/client/assets/use-resource-BnvgCpBi.js +1 -0
- package/dist/web/client/assets/users-round-BElBVSnw.js +1 -0
- package/dist/web/client/assets/welcome-D47LKWYO.js +1 -0
- package/dist/web/client/assets/wrench-DotqSqSm.js +1 -0
- package/dist/web/server/assets/{AddProviderDialog-Di5crZUB.js → AddProviderDialog-BbpuvC2a.js} +7 -10
- package/dist/web/server/assets/{AgentTemplateParts-Cqy7kSzx.js → AgentTemplateParts-Ce7snK3m.js} +3 -6
- package/dist/web/server/assets/{ConfigPage-oXM3wyOU.js → ConfigPage-qP9ejjuw.js} +1 -1
- package/dist/web/server/assets/{ConfirmDialog-DfaJ--A6.js → ConfirmDialog-Z-uYbE9B.js} +1 -2
- package/dist/web/server/assets/{ConnectionsView-DZrLoNoW.js → ConnectionsView-CLIV7V5D.js} +9 -9
- package/dist/web/server/assets/{ManagePage-0LKHEcT_.js → ManagePage-BR9FwVZM.js} +1 -1
- package/dist/web/server/assets/ModelMenu-D-hTgYOO.js +278 -0
- package/dist/web/server/assets/{Rail-7JU6ly2O.js → Rail-b6EbjBB-.js} +9 -12
- package/dist/web/server/assets/SkillsParts-DWpdydCJ.js +199 -0
- package/dist/web/server/assets/SpawnDialog-3wNx0W1R.js +1851 -0
- package/dist/web/server/assets/{SpawnTeamModal-CCe6P82H.js → SpawnTeamModal-C-YMvoaB.js} +3 -6
- package/dist/web/server/assets/{TeamForm-BzQmdhVi.js → TeamForm-CL45gBdt.js} +2 -5
- package/dist/web/server/assets/{TeamThread-SyQpUvz5.js → TeamThread-CVVH6kKj.js} +9 -9
- package/dist/web/server/assets/{UnsavedChangesGuard-DrOvPV14.js → UnsavedChangesGuard-CXK75QQp.js} +1 -1
- package/dist/web/server/assets/{_id-AcyGvFrE.js → _id-2I4CSMQj.js} +10 -14
- package/dist/web/server/assets/{_id-DPGzfmjG.js → _id-8zsImuGa.js} +9 -11
- package/dist/web/server/assets/{_id-DXm9W55C.js → _id-BpfoPuTv.js} +2 -2
- package/dist/web/server/assets/{_id-DojvxRZn.js → _id-De3Bm0SG.js} +1 -1
- package/dist/web/server/assets/{_id-BGTgqsWm.js → _id-d2OwovYV.js} +2 -2
- package/dist/web/server/assets/_tanstack-start-manifest_v-kkY_s_uR.js +256 -0
- package/dist/web/server/assets/{access-CKSW7MFH.js → access-CwZ27Wsl.js} +4 -6
- package/dist/web/server/assets/{access-BJe-NduL.js → access-CyUoElTP.js} +2 -2
- package/dist/web/server/assets/{agent-actions-CUDMCG0F.js → agent-actions-C07Cp5Ue.js} +1 -1
- package/dist/web/server/assets/{agents-6d9WxbYF.js → agents-CRtMfKqX.js} +1 -1
- package/dist/web/server/assets/{agents-DtLDoZ_u.js → agents-CwzhpDPm.js} +6 -8
- package/dist/web/server/assets/{agents-1sjSvp5p.js → agents-DCWEoaxY.js} +2 -2
- package/dist/web/server/assets/{agents-DKVGUwD1.js → agents-DQowl6Ly.js} +1 -1
- package/dist/web/server/assets/{agents-DUI4Yjtg.js → agents-DTub-rJk.js} +2 -2
- package/dist/web/server/assets/{agents-DsHeRaLq.js → agents-vuXrAv1j.js} +6 -10
- package/dist/web/server/assets/{attention-DefKwvgm.js → attention-BqCnJ1hg.js} +5 -2
- package/dist/web/server/assets/{attention-B6sSDR_4.js → attention-Dki8rmGZ.js} +3 -0
- package/dist/web/server/assets/{attention-johfkM0_.js → attention-DwGaur_w.js} +53 -11
- package/dist/web/server/assets/{config-DYAaaE9Z.js → config-B9dJiji_.js} +2 -2
- package/dist/web/server/assets/{config-Clz57LuN.js → config-D3MR2VjE.js} +24 -26
- package/dist/web/server/assets/{createSsrRpc-BijMHgqE.js → createSsrRpc-qesavJv-.js} +4 -57
- package/dist/web/server/assets/{login-JoIjlcmu.js → login-CRd1yTH5.js} +34 -45
- package/dist/web/server/assets/{login-VV10kZBl.js → login-ZN6KV8n-.js} +36 -2
- package/dist/web/server/assets/{manage-Ppyi3Y5y.js → manage-Ce6cI4eW.js} +14 -4
- package/dist/web/server/assets/{mcp-Ce6O8Qs2.js → mcp-BQ15a9dG.js} +4 -6
- package/dist/web/server/assets/{mcp-DB38leWS.js → mcp-CYQuYWGX.js} +2 -2
- package/dist/web/server/assets/page-title-CVY-c2Pd.js +98 -0
- package/dist/web/server/assets/{router-C97bwlXi.js → router-CPdWGKQ5.js} +500 -210
- package/dist/web/server/assets/routes-BPloBDc8.js +92 -0
- package/dist/web/server/assets/{routes-C4aGqXfr.js → routes-Dw1K3TQw.js} +2815 -1744
- package/dist/web/server/assets/{routes-DuOShl4q.js → routes-xDPesCQu.js} +2 -2
- package/dist/web/server/assets/{skills-B7sg0QKS.js → skills-6VSpEORe.js} +2 -2
- package/dist/web/server/assets/skills-D0xrNc2_.js +157 -0
- package/dist/web/server/assets/{style-BR7ufS6Z.js → style-aMybyKzc.js} +1 -1
- package/dist/web/server/assets/{system-DaP0ol67.js → system-B5sPgdQW.js} +2 -2
- package/dist/web/server/assets/{system-CNQpt3JB.js → system-CXmiWyDG.js} +4 -4
- package/dist/web/server/assets/{teams-CuKE5iAK.js → teams-ClRBVSYU.js} +2 -2
- package/dist/web/server/assets/{teams-4cEZ4_rw.js → teams-Dq4RCxis.js} +2 -2
- package/dist/web/server/assets/{teams-C3xwTz8-.js → teams-iXiCnN2i.js} +6 -9
- package/dist/web/server/assets/{teams-BKHe67f3.js → teams-yF3I_Zjq.js} +7 -9
- package/dist/web/server/assets/{telegram-BnQADwnj.js → telegram-D9U9c1MN.js} +2 -2
- package/dist/web/server/assets/{telegram-BpmK-HHV.js → telegram-DwEgyR1x.js} +7 -9
- package/dist/web/server/assets/{tools-BQeWn7Tj.js → tools-DflVIdDd.js} +2 -2
- package/dist/web/server/assets/{tools-CURTfG2q.js → tools-VPIKjr3y.js} +4 -6
- package/dist/web/server/assets/{use-resource-DVzK0toP.js → use-resource-CbHGYti0.js} +1 -1
- package/dist/web/server/assets/{welcome-SNsE49JO.js → welcome-7DrYZVs6.js} +2 -2
- package/dist/web/server/assets/{welcome-OiZCAIHZ.js → welcome-966nOyyK.js} +10 -9
- package/dist/web/server/server.js +8 -8
- package/dist/web-server.js +4 -0
- package/dist/web-server.js.map +1 -1
- package/dist/worker.js +34 -13
- package/dist/worker.js.map +1 -1
- package/package.json +4 -4
- package/dist/web/client/assets/AddProviderDialog-CO_uijWF.js +0 -1
- package/dist/web/client/assets/AgentTemplateParts-Dl35c-Ux.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-BVytx3kN.js +0 -1
- package/dist/web/client/assets/ConnectionsView-DDrBaiLg.js +0 -1
- package/dist/web/client/assets/Dialog-BTDzv3J5.js +0 -1
- package/dist/web/client/assets/SpawnDialog-ejwXnyxy.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-Cp-nAvIC.js +0 -1
- package/dist/web/client/assets/TeamForm-Cz9uDVvb.js +0 -1
- package/dist/web/client/assets/TeamThread-D8xqE_gb.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-DmT4nBQU.js +0 -1
- package/dist/web/client/assets/_id-DEQxwq2v.js +0 -1
- package/dist/web/client/assets/access-34_ShgHU.js +0 -1
- package/dist/web/client/assets/agent-actions--EO4yJ4Q.js +0 -1
- package/dist/web/client/assets/agents-C87yBHaR.js +0 -1
- package/dist/web/client/assets/agents-DvCSl1Ro.js +0 -1
- package/dist/web/client/assets/api-CoLs57oO.js +0 -1
- package/dist/web/client/assets/arrow-right-BhTWtC9z.js +0 -1
- package/dist/web/client/assets/attention-CteEeRvX.js +0 -1
- package/dist/web/client/assets/chevron-right-BqOIX9UM.js +0 -1
- package/dist/web/client/assets/config-XJuQeEP4.js +0 -1
- package/dist/web/client/assets/createLucideIcon-dN8ooBD1.js +0 -1
- package/dist/web/client/assets/entities-xVoB-p2j.js +0 -1
- package/dist/web/client/assets/form-Bvr_f9lR.js +0 -1
- package/dist/web/client/assets/index-J_Uqj4md.js +0 -54
- package/dist/web/client/assets/login-076Bc601.js +0 -1
- package/dist/web/client/assets/manage-CsrV2hhK.js +0 -1
- package/dist/web/client/assets/mcp-8N0BqZ0G.js +0 -1
- package/dist/web/client/assets/model-facts-DoB6QD5y.js +0 -1
- package/dist/web/client/assets/parts-B0JBolvG.js +0 -1
- package/dist/web/client/assets/plus-DZ3KVo7E.js +0 -1
- package/dist/web/client/assets/routes-3HkZZOOe.js +0 -76
- package/dist/web/client/assets/skills-DiaqZRXT.js +0 -1
- package/dist/web/client/assets/styles-C7Ztw15K.css +0 -2
- package/dist/web/client/assets/system-YWlJ8ogO.js +0 -1
- package/dist/web/client/assets/teams-DQwceMvk.js +0 -1
- package/dist/web/client/assets/teams-DTC3plIH.js +0 -1
- package/dist/web/client/assets/telegram-D4wINntt.js +0 -1
- package/dist/web/client/assets/tools-CZeQ9pDx.js +0 -1
- package/dist/web/client/assets/use-resource-BaTkTGvG.js +0 -1
- package/dist/web/client/assets/welcome-CnxP_RCk.js +0 -1
- package/dist/web/client/assets/wrench-BrwBswfo.js +0 -1
- package/dist/web/server/assets/Dialog-aup_yJv5.js +0 -85
- package/dist/web/server/assets/ModelMenu-BAZeARx6.js +0 -138
- package/dist/web/server/assets/SpawnDialog-CYkwzETs.js +0 -124
- package/dist/web/server/assets/_tanstack-start-manifest_v-D7RvKGRH.js +0 -285
- package/dist/web/server/assets/entities-Dn2xzKIw.js +0 -16
- package/dist/web/server/assets/form-BRQAsKKq.js +0 -319
- package/dist/web/server/assets/model-facts-mrfrWQne.js +0 -136
- package/dist/web/server/assets/parts-mabERIJZ.js +0 -380
- package/dist/web/server/assets/routes-IHMVKpDK.js +0 -16
- package/dist/web/server/assets/skills-hfTSwqsG.js +0 -353
- package/dist/web/server/assets/utils-C_uf36nf.js +0 -8
- package/dist/web/server/assets/workspace-DaitCM0t.js +0 -651
- /package/dist/web/server/assets/{telegram-CGol0CKX.js → telegram-CGol0CKX2.js} +0 -0
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import { C as api, S as ApiError, T as errorMessage, u as Button } from "./workspace-DaitCM0t.js";
|
|
2
|
-
import { t as cn } from "./utils-C_uf36nf.js";
|
|
3
|
-
import { n as DialogActions, t as Dialog } from "./Dialog-aup_yJv5.js";
|
|
4
|
-
import { t as ConfirmDialog } from "./ConfirmDialog-DfaJ--A6.js";
|
|
5
|
-
import { t as ago } from "./model-facts-mrfrWQne.js";
|
|
6
|
-
import { _ as RowMenu, c as CardToolbar, d as Chip, g as Notice, h as ListRow, i as CardEmpty, o as CardList, r as CardBody, t as Banner, v as SearchField, y as SetupCard } from "./parts-mabERIJZ.js";
|
|
7
|
-
import { l as TextField, n as ChoiceCards, t as CheckboxRow } from "./form-BRQAsKKq.js";
|
|
8
|
-
import { _ as skillState, b as skillsNeedingALook, g as skillSourceLabel, h as skillChosenBy, i as allSkillsLine, l as listed, s as count, u as matchesSkill, v as skillUseSentence } from "./manage-Ppyi3Y5y.js";
|
|
9
|
-
import { t as Route } from "./skills-B7sg0QKS.js";
|
|
10
|
-
import { t as ManagePage } from "./ManagePage-0LKHEcT_.js";
|
|
11
|
-
import { useState } from "react";
|
|
12
|
-
import { useRouter } from "@tanstack/react-router";
|
|
13
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
-
import { Sparkles } from "lucide-react";
|
|
15
|
-
//#region src/components/manage/SkillsParts.tsx
|
|
16
|
-
/** A scan's findings, one to a line: what it found, and where. */
|
|
17
|
-
function FindingLines({ findings }) {
|
|
18
|
-
return /* @__PURE__ */ jsx("ul", {
|
|
19
|
-
className: "m-0 mt-1 grid list-none gap-1 p-0",
|
|
20
|
-
children: findings.map((finding, index) => /* @__PURE__ */ jsxs("li", {
|
|
21
|
-
className: "min-w-0",
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ jsxs("span", {
|
|
24
|
-
className: finding.severity === "danger" ? "font-semibold" : "",
|
|
25
|
-
children: [finding.severity === "danger" ? "Risky" : "Check", ":"]
|
|
26
|
-
}),
|
|
27
|
-
" ",
|
|
28
|
-
finding.message,
|
|
29
|
-
" ",
|
|
30
|
-
/* @__PURE__ */ jsxs("span", {
|
|
31
|
-
className: "text-muted-foreground",
|
|
32
|
-
children: [
|
|
33
|
-
"(",
|
|
34
|
-
finding.code,
|
|
35
|
-
finding.line ? `, line ${finding.line}` : "",
|
|
36
|
-
")"
|
|
37
|
-
]
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
}, index))
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
/** What the scan found in one skill, or in what was imported. */
|
|
44
|
-
function FindingsNotice({ findings, title }) {
|
|
45
|
-
const danger = findings.some((finding) => finding.severity === "danger");
|
|
46
|
-
return /* @__PURE__ */ jsx(Notice, {
|
|
47
|
-
tone: danger ? "warning" : "neutral",
|
|
48
|
-
title: title ?? (danger ? "Read it before an Agent uses it: its text goes into the system prompt." : "Worth a look."),
|
|
49
|
-
children: /* @__PURE__ */ jsx(FindingLines, { findings })
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
var SOURCES = [
|
|
53
|
-
{
|
|
54
|
-
value: "openclaw",
|
|
55
|
-
label: "OpenClaw",
|
|
56
|
-
hint: "Every skill in ~/.openclaw/skills on the computer Bazilion runs on."
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
value: "path",
|
|
60
|
-
label: "A folder",
|
|
61
|
-
hint: "One skill folder with a SKILL.md, or a folder of them, on that computer."
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
value: "zip",
|
|
65
|
-
label: "A ZIP file",
|
|
66
|
-
hint: "Uploaded from here: one folder per skill at its top level."
|
|
67
|
-
}
|
|
68
|
-
];
|
|
69
|
-
/** Import skills from OpenClaw, a folder or a ZIP file; the scan's findings are shown here. */
|
|
70
|
-
function ImportSkillsDialog({ onClose, onImported }) {
|
|
71
|
-
const [source, setSource] = useState("openclaw");
|
|
72
|
-
const [path, setPath] = useState("");
|
|
73
|
-
const [zip, setZip] = useState(null);
|
|
74
|
-
const [dragOver, setDragOver] = useState(false);
|
|
75
|
-
const [force, setForce] = useState(false);
|
|
76
|
-
const [busy, setBusy] = useState(false);
|
|
77
|
-
const [error, setError] = useState(null);
|
|
78
|
-
const [findings, setFindings] = useState([]);
|
|
79
|
-
const pathProblem = source === "path" && path.trim() && !path.trim().startsWith("/") ? "The full path of the folder, starting with /." : void 0;
|
|
80
|
-
const ready = source === "openclaw" || source === "path" && path.trim() !== "" && !pathProblem || source === "zip" && zip !== null;
|
|
81
|
-
function chooseZip(file) {
|
|
82
|
-
if (!file) return;
|
|
83
|
-
setError(null);
|
|
84
|
-
if (!/\.zip$/i.test(file.name)) {
|
|
85
|
-
setError("Only ZIP archives can be imported.");
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
setZip(file);
|
|
89
|
-
}
|
|
90
|
-
async function submit(event) {
|
|
91
|
-
event.preventDefault();
|
|
92
|
-
if (!ready || busy) return;
|
|
93
|
-
setBusy(true);
|
|
94
|
-
setError(null);
|
|
95
|
-
setFindings([]);
|
|
96
|
-
let body;
|
|
97
|
-
if (source === "zip" && zip) {
|
|
98
|
-
const form = new FormData();
|
|
99
|
-
form.set("file", zip);
|
|
100
|
-
if (force) form.set("force", "true");
|
|
101
|
-
body = form;
|
|
102
|
-
} else body = {
|
|
103
|
-
source: source === "openclaw" ? "openclaw" : path.trim(),
|
|
104
|
-
force
|
|
105
|
-
};
|
|
106
|
-
try {
|
|
107
|
-
await onImported(await api("/api/skills/import", { body }));
|
|
108
|
-
} catch (cause) {
|
|
109
|
-
if (cause instanceof ApiError) setFindings(cause.body?.findings ?? []);
|
|
110
|
-
setError(errorMessage(cause));
|
|
111
|
-
setBusy(false);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
return /* @__PURE__ */ jsx(Dialog, {
|
|
115
|
-
title: "Import skills",
|
|
116
|
-
description: "A skill's SKILL.md is added to the system prompt of every Agent it is attached to. Each one is scanned before it is installed.",
|
|
117
|
-
busy,
|
|
118
|
-
onClose,
|
|
119
|
-
className: "max-w-2xl",
|
|
120
|
-
children: /* @__PURE__ */ jsxs("form", {
|
|
121
|
-
onSubmit: (event) => void submit(event),
|
|
122
|
-
className: "grid gap-4",
|
|
123
|
-
children: [
|
|
124
|
-
/* @__PURE__ */ jsx(ChoiceCards, {
|
|
125
|
-
legend: "From",
|
|
126
|
-
name: "skills-source",
|
|
127
|
-
value: source,
|
|
128
|
-
options: SOURCES,
|
|
129
|
-
columns: 3,
|
|
130
|
-
disabled: busy,
|
|
131
|
-
onChange: (next) => {
|
|
132
|
-
setSource(next);
|
|
133
|
-
setError(null);
|
|
134
|
-
setFindings([]);
|
|
135
|
-
}
|
|
136
|
-
}),
|
|
137
|
-
source === "path" && /* @__PURE__ */ jsx(TextField, {
|
|
138
|
-
label: "Folder",
|
|
139
|
-
value: path,
|
|
140
|
-
disabled: busy,
|
|
141
|
-
placeholder: "/home/you/my-skills",
|
|
142
|
-
mono: true,
|
|
143
|
-
className: "max-w-none",
|
|
144
|
-
problem: pathProblem,
|
|
145
|
-
onChange: setPath
|
|
146
|
-
}),
|
|
147
|
-
source === "zip" && /* @__PURE__ */ jsxs("label", {
|
|
148
|
-
onDragOver: (event) => {
|
|
149
|
-
event.preventDefault();
|
|
150
|
-
setDragOver(true);
|
|
151
|
-
},
|
|
152
|
-
onDragLeave: () => setDragOver(false),
|
|
153
|
-
onDrop: (event) => {
|
|
154
|
-
event.preventDefault();
|
|
155
|
-
setDragOver(false);
|
|
156
|
-
chooseZip(event.dataTransfer.files[0]);
|
|
157
|
-
},
|
|
158
|
-
className: cn("relative m-0 block cursor-pointer rounded-xl border-2 border-dashed px-6 py-7 text-center text-sm transition-colors", dragOver ? "border-primary bg-accent text-accent-foreground" : zip ? "border-solid border-primary/40 bg-card text-foreground" : "border-border bg-muted/30 text-muted-foreground hover:border-primary hover:bg-accent/60"),
|
|
159
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
160
|
-
type: "file",
|
|
161
|
-
accept: ".zip,application/zip",
|
|
162
|
-
disabled: busy,
|
|
163
|
-
onChange: (event) => chooseZip(event.target.files?.[0]),
|
|
164
|
-
className: "absolute h-px w-px overflow-hidden opacity-0"
|
|
165
|
-
}), zip ? /* @__PURE__ */ jsx("span", {
|
|
166
|
-
className: "block break-all font-mono text-foreground",
|
|
167
|
-
children: zip.name
|
|
168
|
-
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
169
|
-
className: "block font-semibold text-foreground",
|
|
170
|
-
children: "Choose a ZIP file"
|
|
171
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
172
|
-
className: "text-xs",
|
|
173
|
-
children: "or drop it here"
|
|
174
|
-
})] })]
|
|
175
|
-
}),
|
|
176
|
-
/* @__PURE__ */ jsx(CheckboxRow, {
|
|
177
|
-
checked: force,
|
|
178
|
-
disabled: busy,
|
|
179
|
-
label: "Replace skills that are already installed, and import despite scan findings",
|
|
180
|
-
onChange: setForce
|
|
181
|
-
}),
|
|
182
|
-
findings.length > 0 && /* @__PURE__ */ jsx(FindingsNotice, {
|
|
183
|
-
findings,
|
|
184
|
-
title: `The scan found ${count(findings.length, "thing")} to check. Read them; to import anyway, tick the box above.`
|
|
185
|
-
}),
|
|
186
|
-
error && findings.length === 0 && /* @__PURE__ */ jsx(Notice, {
|
|
187
|
-
tone: "warning",
|
|
188
|
-
role: "alert",
|
|
189
|
-
title: "Nothing was imported.",
|
|
190
|
-
children: error
|
|
191
|
-
}),
|
|
192
|
-
/* @__PURE__ */ jsxs(DialogActions, { children: [/* @__PURE__ */ jsx(Button, {
|
|
193
|
-
variant: "ghost",
|
|
194
|
-
disabled: busy,
|
|
195
|
-
onClick: onClose,
|
|
196
|
-
children: "Cancel"
|
|
197
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
198
|
-
variant: "primary",
|
|
199
|
-
type: "submit",
|
|
200
|
-
disabled: busy || !ready,
|
|
201
|
-
children: busy ? "Importing…" : source === "openclaw" ? "Import from OpenClaw" : source === "zip" ? "Upload and import" : "Import"
|
|
202
|
-
})] })
|
|
203
|
-
]
|
|
204
|
-
})
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region src/routes/skills/index.tsx?tsr-split=component
|
|
209
|
-
function SkillsPage() {
|
|
210
|
-
const { skills, templates, now } = Route.useLoaderData();
|
|
211
|
-
const router = useRouter();
|
|
212
|
-
const [importing, setImporting] = useState(false);
|
|
213
|
-
const [imported, setImported] = useState(null);
|
|
214
|
-
const [removing, setRemoving] = useState(null);
|
|
215
|
-
const [query, setQuery] = useState("");
|
|
216
|
-
const shown = skills.filter((skill) => matchesSkill(skill, query));
|
|
217
|
-
const look = skillsNeedingALook(skills);
|
|
218
|
-
const importedFindings = imported ? Object.entries(imported.findings ?? {}).flatMap(([name, items]) => items.map((item) => ({
|
|
219
|
-
...item,
|
|
220
|
-
message: `${name}: ${item.message}`
|
|
221
|
-
}))) : [];
|
|
222
|
-
return /* @__PURE__ */ jsxs(ManagePage, {
|
|
223
|
-
title: "Skills",
|
|
224
|
-
description: "Prompt-only skills: a skill's SKILL.md is added to the system prompt of every Agent it is attached to. Templates attach skills at spawn; each Agent can change its own.",
|
|
225
|
-
actions: /* @__PURE__ */ jsx(Button, {
|
|
226
|
-
variant: "primary",
|
|
227
|
-
onClick: () => setImporting(true),
|
|
228
|
-
children: "Import skills"
|
|
229
|
-
}),
|
|
230
|
-
children: [
|
|
231
|
-
look.length > 0 && /* @__PURE__ */ jsxs(Banner, {
|
|
232
|
-
tone: "warning",
|
|
233
|
-
lead: `${count(look.length, "skill")} ${look.length === 1 ? "needs" : "need"} a look.`,
|
|
234
|
-
children: [look.map((skill) => skill.parseError ? `${skill.name} cannot be read` : `${skill.name} has a risky finding`).join("; "), "."]
|
|
235
|
-
}),
|
|
236
|
-
/* @__PURE__ */ jsxs(SetupCard, {
|
|
237
|
-
labelledBy: "manage-skills",
|
|
238
|
-
icon: /* @__PURE__ */ jsx(Sparkles, { className: "size-5" }),
|
|
239
|
-
title: "Installed skills",
|
|
240
|
-
description: `Each was scanned when it was imported. ${allSkillsLine(templates) ?? ""}`,
|
|
241
|
-
action: /* @__PURE__ */ jsx(Chip, {
|
|
242
|
-
tone: "neutral",
|
|
243
|
-
children: count(skills.length, "skill")
|
|
244
|
-
}),
|
|
245
|
-
children: [
|
|
246
|
-
imported && /* @__PURE__ */ jsxs(CardBody, {
|
|
247
|
-
className: "py-3",
|
|
248
|
-
children: [/* @__PURE__ */ jsx(Notice, {
|
|
249
|
-
tone: "success",
|
|
250
|
-
title: imported.imported.length > 0 ? `Imported ${count(imported.imported.length, "skill")}: ${imported.imported.join(", ")}.` : "Nothing new was imported.",
|
|
251
|
-
children: imported.skipped.length > 0 && `Already installed, so left as they were: ${listed(imported.skipped.map((entry) => entry.name))}. To replace them, import again with the box ticked.`
|
|
252
|
-
}), importedFindings.length > 0 && /* @__PURE__ */ jsx(FindingsNotice, {
|
|
253
|
-
findings: importedFindings,
|
|
254
|
-
title: "Imported despite these findings:"
|
|
255
|
-
})]
|
|
256
|
-
}),
|
|
257
|
-
skills.length > 0 && /* @__PURE__ */ jsx(CardToolbar, { children: /* @__PURE__ */ jsx(SearchField, {
|
|
258
|
-
label: "Find a skill",
|
|
259
|
-
placeholder: "Find by name or description",
|
|
260
|
-
value: query,
|
|
261
|
-
onChange: setQuery,
|
|
262
|
-
className: "min-w-0 flex-1 basis-60"
|
|
263
|
-
}) }),
|
|
264
|
-
skills.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
265
|
-
icon: /* @__PURE__ */ jsx(Sparkles, { className: "size-5" }),
|
|
266
|
-
title: "No skills installed",
|
|
267
|
-
action: /* @__PURE__ */ jsx(Button, {
|
|
268
|
-
variant: "primary",
|
|
269
|
-
onClick: () => setImporting(true),
|
|
270
|
-
children: "Import skills"
|
|
271
|
-
}),
|
|
272
|
-
children: "Import them from OpenClaw, a folder or a ZIP file."
|
|
273
|
-
}) : shown.length === 0 ? /* @__PURE__ */ jsx(CardEmpty, {
|
|
274
|
-
title: `No skill matches “${query.trim()}”`,
|
|
275
|
-
children: "Try another word from its name or description."
|
|
276
|
-
}) : /* @__PURE__ */ jsx(CardList, { children: shown.map((skill) => {
|
|
277
|
-
const state = skillState(skill);
|
|
278
|
-
const findings = skill.scanFindings ?? [];
|
|
279
|
-
return /* @__PURE__ */ jsx(ListRow, {
|
|
280
|
-
inline: true,
|
|
281
|
-
title: /* @__PURE__ */ jsx("span", {
|
|
282
|
-
className: "font-mono text-[0.92em]",
|
|
283
|
-
children: skill.name
|
|
284
|
-
}),
|
|
285
|
-
chip: state && /* @__PURE__ */ jsx(Chip, {
|
|
286
|
-
tone: state.tone,
|
|
287
|
-
children: state.label
|
|
288
|
-
}),
|
|
289
|
-
meta: /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
290
|
-
skill.description && /* @__PURE__ */ jsx("span", {
|
|
291
|
-
className: "basis-full text-foreground",
|
|
292
|
-
children: skill.description
|
|
293
|
-
}),
|
|
294
|
-
skillChosenBy(skill.name, templates) && /* @__PURE__ */ jsx("span", { children: skillChosenBy(skill.name, templates) }),
|
|
295
|
-
/* @__PURE__ */ jsxs("span", {
|
|
296
|
-
title: skill.source ?? void 0,
|
|
297
|
-
children: [skillSourceLabel(skill.source), skill.importedAt !== null && `, ${ago(skill.importedAt, now)}`]
|
|
298
|
-
})
|
|
299
|
-
] }),
|
|
300
|
-
actions: /* @__PURE__ */ jsx(RowMenu, {
|
|
301
|
-
label: `More for ${skill.name}`,
|
|
302
|
-
items: [{
|
|
303
|
-
label: "Remove…",
|
|
304
|
-
danger: true,
|
|
305
|
-
onSelect: () => setRemoving(skill)
|
|
306
|
-
}]
|
|
307
|
-
}),
|
|
308
|
-
children: skill.parseError ? /* @__PURE__ */ jsx(Notice, {
|
|
309
|
-
tone: "warning",
|
|
310
|
-
title: "Its SKILL.md cannot be read, so no Agent gets it.",
|
|
311
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
312
|
-
className: "break-words font-mono text-xs",
|
|
313
|
-
children: skill.parseError
|
|
314
|
-
})
|
|
315
|
-
}) : findings.length > 0 && /* @__PURE__ */ jsx(FindingsNotice, { findings })
|
|
316
|
-
}, skill.name);
|
|
317
|
-
}) })
|
|
318
|
-
]
|
|
319
|
-
}),
|
|
320
|
-
importing && /* @__PURE__ */ jsx(ImportSkillsDialog, {
|
|
321
|
-
onClose: () => setImporting(false),
|
|
322
|
-
onImported: async (result) => {
|
|
323
|
-
setImporting(false);
|
|
324
|
-
setImported(result);
|
|
325
|
-
await router.invalidate({ sync: true });
|
|
326
|
-
}
|
|
327
|
-
}),
|
|
328
|
-
/* @__PURE__ */ jsx(ConfirmDialog, {
|
|
329
|
-
open: removing !== null,
|
|
330
|
-
onOpenChange: (open) => {
|
|
331
|
-
if (!open) setRemoving(null);
|
|
332
|
-
},
|
|
333
|
-
title: `Remove the ${removing?.name ?? ""} skill?`,
|
|
334
|
-
description: /* @__PURE__ */ jsxs("p", {
|
|
335
|
-
className: "m-0",
|
|
336
|
-
children: [
|
|
337
|
-
"This deletes its SKILL.md and every script and file in its folder. No Agent or template can use it until it is imported again.",
|
|
338
|
-
" ",
|
|
339
|
-
removing && skillUseSentence(removing.name, templates)
|
|
340
|
-
]
|
|
341
|
-
}),
|
|
342
|
-
confirmLabel: "Remove skill",
|
|
343
|
-
onConfirm: async () => {
|
|
344
|
-
if (!removing) return;
|
|
345
|
-
await api(`/api/skills/${encodeURIComponent(removing.name)}`, { method: "DELETE" });
|
|
346
|
-
await router.invalidate({ sync: true });
|
|
347
|
-
}
|
|
348
|
-
})
|
|
349
|
-
]
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
//#endregion
|
|
353
|
-
export { SkillsPage as component };
|