@polpo-ai/dashboard 0.1.2 → 0.1.3
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { useState } from "react";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
4
|
import { useParams } from "next/navigation";
|
|
5
5
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
6
6
|
import {
|
|
@@ -14,8 +14,13 @@ import {
|
|
|
14
14
|
Search,
|
|
15
15
|
} from "lucide-react";
|
|
16
16
|
import { usePolpoClient } from "../../lib/polpo-client";
|
|
17
|
-
import {
|
|
18
|
-
|
|
17
|
+
import {
|
|
18
|
+
SkillsProvider,
|
|
19
|
+
SkillCreateForm,
|
|
20
|
+
type SkillsAdapter,
|
|
21
|
+
type SkillCreateInput,
|
|
22
|
+
type Skill,
|
|
23
|
+
} from "@lumea-labs/skills";
|
|
19
24
|
import {
|
|
20
25
|
Dialog,
|
|
21
26
|
DialogContent,
|
|
@@ -63,12 +68,7 @@ function sourceFor(s: RegistrySkill): string {
|
|
|
63
68
|
}
|
|
64
69
|
|
|
65
70
|
export function SkillsInstallWizard() {
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<SkillsProvider adapter={adapter}>
|
|
69
|
-
<WizardDialog />
|
|
70
|
-
</SkillsProvider>
|
|
71
|
-
);
|
|
71
|
+
return <WizardDialog />;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
function WizardDialog() {
|
|
@@ -76,6 +76,25 @@ function WizardDialog() {
|
|
|
76
76
|
const client = usePolpoClient(id);
|
|
77
77
|
const qc = useQueryClient();
|
|
78
78
|
|
|
79
|
+
// Minimal SkillsAdapter built directly on the PolpoClient (the same seam
|
|
80
|
+
// usePolpoClient resolves: OSS direct, cloud session-proxy). Avoids
|
|
81
|
+
// @polpo-ai/react's <PolpoProvider>. Only createSkill is needed here —
|
|
82
|
+
// registry/URL installs go through client.installSkills directly.
|
|
83
|
+
const adapter = useMemo<SkillsAdapter>(
|
|
84
|
+
() => ({
|
|
85
|
+
createSkill: async (input: SkillCreateInput): Promise<Skill> => {
|
|
86
|
+
const res = await client.createSkill({
|
|
87
|
+
name: input.name,
|
|
88
|
+
description: input.description,
|
|
89
|
+
content: input.body,
|
|
90
|
+
allowedTools: (input.frontmatter as { allowedTools?: string[] })?.allowedTools,
|
|
91
|
+
});
|
|
92
|
+
return { id: res.name, name: res.name, description: input.description, installed: true } as Skill;
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
[client],
|
|
96
|
+
);
|
|
97
|
+
|
|
79
98
|
const [open, setOpen] = useState(false);
|
|
80
99
|
const [source, setSource] = useState<Source | null>(null);
|
|
81
100
|
const [search, setSearch] = useState("");
|
|
@@ -244,7 +263,9 @@ function WizardDialog() {
|
|
|
244
263
|
|
|
245
264
|
{/* ── Paste / create (dogfood lumea-agents UI) ──── */}
|
|
246
265
|
{source === "paste" && (
|
|
247
|
-
<
|
|
266
|
+
<SkillsProvider adapter={adapter}>
|
|
267
|
+
<SkillCreateForm onCreated={afterCreate} onCancel={() => setSource(null)} />
|
|
268
|
+
</SkillsProvider>
|
|
248
269
|
)}
|
|
249
270
|
|
|
250
271
|
{install.isError && source === "registry" && (
|
package/index.ts
CHANGED
|
@@ -12,3 +12,6 @@ export type { PolpoClientFactory } from "./lib/polpo-client";
|
|
|
12
12
|
|
|
13
13
|
export { default as AgentsView } from "./app/(dashboard)/projects/[id]/agents/view";
|
|
14
14
|
export type { Team } from "./app/(dashboard)/projects/[id]/agents/view";
|
|
15
|
+
|
|
16
|
+
export { default as SkillsView } from "./app/(dashboard)/projects/[id]/skills/view";
|
|
17
|
+
export type { SkillInfo } from "./app/(dashboard)/projects/[id]/skills/view";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polpo-ai/dashboard",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"tailwind-merge": "^3.5.0",
|
|
71
71
|
"tw-animate-css": "^1.4.0",
|
|
72
72
|
"@polpo-ai/core": "0.7.18",
|
|
73
|
-
"@polpo-ai/
|
|
74
|
-
"@polpo-ai/
|
|
73
|
+
"@polpo-ai/react": "0.7.18",
|
|
74
|
+
"@polpo-ai/sdk": "0.7.18"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@playwright/test": "^1.58.2",
|