@vertesia/tools-admin-ui 1.0.0-dev.20260227.112605Z → 1.0.0-dev.20260331.091034Z
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/lib/AdminApp.d.ts +3 -1
- package/lib/AdminApp.d.ts.map +1 -1
- package/lib/components/AdminTopBar.d.ts +6 -0
- package/lib/components/AdminTopBar.d.ts.map +1 -0
- package/lib/components/CollectionCard.d.ts.map +1 -1
- package/lib/components/DetailPage.d.ts.map +1 -1
- package/lib/components/EndpointPanel.d.ts.map +1 -1
- package/lib/components/HeroSection.d.ts.map +1 -1
- package/lib/components/ResourceCard.d.ts.map +1 -1
- package/lib/components/ResourceSection.d.ts.map +1 -1
- package/lib/components/SearchBar.d.ts.map +1 -1
- package/lib/components/SummaryBadge.d.ts.map +1 -1
- package/lib/components/index.d.ts +6 -5
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/typeVariants.d.ts +5 -0
- package/lib/components/typeVariants.d.ts.map +1 -0
- package/lib/hooks.d.ts +1 -1
- package/lib/hooks.d.ts.map +1 -1
- package/lib/pages/ActivityCollection.d.ts +2 -0
- package/lib/pages/ActivityCollection.d.ts.map +1 -0
- package/lib/pages/HomePage.d.ts.map +1 -1
- package/lib/pages/InteractionCollection.d.ts.map +1 -1
- package/lib/pages/InteractionDetail.d.ts.map +1 -1
- package/lib/pages/SkillCollection.d.ts.map +1 -1
- package/lib/pages/SkillDetail.d.ts.map +1 -1
- package/lib/pages/TemplateCollection.d.ts.map +1 -1
- package/lib/pages/TemplateDetail.d.ts.map +1 -1
- package/lib/pages/ToolCollection.d.ts.map +1 -1
- package/lib/pages/TypeCollection.d.ts.map +1 -1
- package/lib/pages/TypeDetail.d.ts.map +1 -1
- package/lib/tools-admin-ui.js +481 -379
- package/lib/tools-admin-ui.js.map +1 -1
- package/lib/types.d.ts +8 -3
- package/lib/types.d.ts.map +1 -1
- package/package.json +8 -4
- package/src/AdminApp.tsx +23 -17
- package/src/components/AdminTopBar.tsx +39 -0
- package/src/components/CollectionCard.tsx +20 -14
- package/src/components/DetailPage.tsx +20 -11
- package/src/components/EndpointPanel.tsx +16 -7
- package/src/components/HeroSection.tsx +52 -45
- package/src/components/ResourceCard.tsx +23 -18
- package/src/components/ResourceSection.tsx +7 -5
- package/src/components/SearchBar.tsx +8 -6
- package/src/components/SummaryBadge.tsx +4 -3
- package/src/components/index.ts +6 -5
- package/src/components/typeVariants.ts +19 -0
- package/src/dev/env.ts +3 -3
- package/src/dev/index.css +13 -0
- package/src/dev/main.tsx +11 -5
- package/src/hooks.ts +5 -3
- package/src/pages/ActivityCollection.tsx +67 -0
- package/src/pages/HomePage.tsx +19 -15
- package/src/pages/InteractionCollection.tsx +25 -27
- package/src/pages/InteractionDetail.tsx +35 -34
- package/src/pages/SkillCollection.tsx +29 -32
- package/src/pages/SkillDetail.tsx +31 -41
- package/src/pages/TemplateCollection.tsx +25 -21
- package/src/pages/TemplateDetail.tsx +18 -17
- package/src/pages/ToolCollection.tsx +22 -16
- package/src/pages/TypeCollection.tsx +32 -24
- package/src/pages/TypeDetail.tsx +16 -18
- package/src/theme.css +12 -0
- package/src/types.ts +34 -1
- package/src/admin.css +0 -650
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { useFetch } from '@vertesia/ui/core';
|
|
2
|
-
import { useParams, NavLink } from '@vertesia/ui/router';
|
|
3
1
|
import type { RenderingTemplateDefinitionRef } from '@vertesia/common';
|
|
2
|
+
import { Badge, Card, CardContent, Spinner, useFetch } from '@vertesia/ui/core';
|
|
3
|
+
import { NavLink, useParams } from '@vertesia/ui/router';
|
|
4
|
+
|
|
4
5
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
|
+
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
6
8
|
|
|
7
9
|
export function TemplateCollection() {
|
|
8
10
|
const collection = useParams('collection');
|
|
9
11
|
const { baseUrl } = useAdminContext();
|
|
10
12
|
|
|
11
|
-
const { data: templates,
|
|
13
|
+
const { data: templates, error } = useFetch<RenderingTemplateDefinitionRef[]>(
|
|
12
14
|
() => fetch(`${baseUrl}/templates/${collection}`).then(r => {
|
|
13
15
|
if (!r.ok) throw new Error(`Failed to load collection: ${r.statusText}`);
|
|
14
16
|
return r.json();
|
|
@@ -16,8 +18,8 @@ export function TemplateCollection() {
|
|
|
16
18
|
[baseUrl, collection]
|
|
17
19
|
);
|
|
18
20
|
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
+
if (error) return <div className="p-6 text-destructive">Failed to load template collection “{collection}”.</div>;
|
|
22
|
+
if (!templates) return <div className="flex h-64 items-center justify-center text-muted-foreground"><Spinner /></div>;
|
|
21
23
|
|
|
22
24
|
return (
|
|
23
25
|
<DetailPage
|
|
@@ -25,27 +27,29 @@ export function TemplateCollection() {
|
|
|
25
27
|
title={collection}
|
|
26
28
|
description={`${templates.length} template${templates.length !== 1 ? 's' : ''} in this collection.`}
|
|
27
29
|
>
|
|
28
|
-
<div className="
|
|
30
|
+
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
29
31
|
{templates.map(tmpl => (
|
|
30
32
|
<NavLink
|
|
31
33
|
key={tmpl.name}
|
|
32
34
|
href={`/templates/${collection}/${tmpl.name}`}
|
|
33
|
-
className="
|
|
35
|
+
className="no-underline"
|
|
34
36
|
>
|
|
35
|
-
<
|
|
36
|
-
<
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
<Card className="h-full transition-all hover:-translate-y-0.5 hover:shadow-md">
|
|
38
|
+
<CardContent className="p-5">
|
|
39
|
+
<span className={`mb-2 inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS.template}`}>
|
|
40
|
+
{tmpl.type || 'template'}
|
|
41
|
+
</span>
|
|
42
|
+
<div className="font-semibold text-card-foreground">{tmpl.title || tmpl.name}</div>
|
|
43
|
+
<div className="mt-1 text-sm text-muted-foreground">{tmpl.description || 'No description'}</div>
|
|
44
|
+
{tmpl.tags && tmpl.tags.length > 0 && (
|
|
45
|
+
<div className="mt-3 flex flex-wrap gap-1.5">
|
|
46
|
+
{tmpl.tags.map(tag => (
|
|
47
|
+
<Badge key={tag} variant="default">{tag}</Badge>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
)}
|
|
51
|
+
</CardContent>
|
|
52
|
+
</Card>
|
|
49
53
|
</NavLink>
|
|
50
54
|
))}
|
|
51
55
|
</div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { useFetch } from '@vertesia/ui/core';
|
|
1
|
+
import { Badge, Spinner, useFetch } from '@vertesia/ui/core';
|
|
2
2
|
import { useParams } from '@vertesia/ui/router';
|
|
3
|
+
|
|
3
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
4
5
|
import { DetailPage } from '../components/DetailPage.js';
|
|
5
6
|
|
|
@@ -19,7 +20,7 @@ export function TemplateDetail() {
|
|
|
19
20
|
const name = params.name;
|
|
20
21
|
const { baseUrl } = useAdminContext();
|
|
21
22
|
|
|
22
|
-
const { data: template,
|
|
23
|
+
const { data: template, error } = useFetch<TemplateDefinitionResponse>(
|
|
23
24
|
() => fetch(`${baseUrl}/templates/${collection}/${name}`).then(r => {
|
|
24
25
|
if (!r.ok) throw new Error(`Failed to load template: ${r.statusText}`);
|
|
25
26
|
return r.json();
|
|
@@ -27,8 +28,8 @@ export function TemplateDetail() {
|
|
|
27
28
|
[baseUrl, collection, name]
|
|
28
29
|
);
|
|
29
30
|
|
|
30
|
-
if (
|
|
31
|
-
if (
|
|
31
|
+
if (error) return <div className="p-6 text-destructive">Failed to load template “{name}”.</div>;
|
|
32
|
+
if (!template) return <div className="flex h-64 items-center justify-center text-muted-foreground"><Spinner /></div>;
|
|
32
33
|
|
|
33
34
|
return (
|
|
34
35
|
<DetailPage
|
|
@@ -38,30 +39,30 @@ export function TemplateDetail() {
|
|
|
38
39
|
tags={template.tags}
|
|
39
40
|
backHref={`/templates/${collection}`}
|
|
40
41
|
>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<span className="vta-detail-flag">{template.type}</span>
|
|
42
|
+
<div className="mb-8">
|
|
43
|
+
<div className="flex flex-wrap gap-2">
|
|
44
|
+
<Badge variant="success">{template.type}</Badge>
|
|
45
45
|
</div>
|
|
46
46
|
</div>
|
|
47
47
|
|
|
48
48
|
{template.assets && template.assets.length > 0 && (
|
|
49
|
-
<div className="
|
|
50
|
-
<h2>Assets</h2>
|
|
51
|
-
<div className="
|
|
49
|
+
<div className="mb-8">
|
|
50
|
+
<h2 className="mb-3 text-lg font-semibold text-foreground">Assets</h2>
|
|
51
|
+
<div className="flex flex-wrap gap-2">
|
|
52
52
|
{template.assets.map(asset => (
|
|
53
|
-
<
|
|
53
|
+
<Badge key={asset} variant="success">
|
|
54
54
|
{asset.split('/').pop()}
|
|
55
|
-
</
|
|
55
|
+
</Badge>
|
|
56
56
|
))}
|
|
57
57
|
</div>
|
|
58
58
|
</div>
|
|
59
59
|
)}
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
|
|
61
|
+
<div className="mb-8">
|
|
62
|
+
<h2 className="mb-3 text-lg font-semibold text-foreground">Instructions</h2>
|
|
63
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted-background p-4 font-mono text-sm text-foreground">
|
|
64
|
+
{template.instructions}
|
|
65
|
+
</pre>
|
|
65
66
|
</div>
|
|
66
67
|
</DetailPage>
|
|
67
68
|
);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { useFetch } from '@vertesia/ui/core';
|
|
1
|
+
import { Card, CardContent, Spinner, useFetch } from '@vertesia/ui/core';
|
|
2
2
|
import { useParams } from '@vertesia/ui/router';
|
|
3
|
+
|
|
3
4
|
import { useAdminContext } from '../AdminContext.js';
|
|
4
5
|
import { DetailPage } from '../components/DetailPage.js';
|
|
6
|
+
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
5
7
|
|
|
6
8
|
interface ToolDef {
|
|
7
9
|
name: string;
|
|
@@ -19,7 +21,7 @@ export function ToolCollection() {
|
|
|
19
21
|
const collection = useParams('collection');
|
|
20
22
|
const { baseUrl } = useAdminContext();
|
|
21
23
|
|
|
22
|
-
const { data,
|
|
24
|
+
const { data, error } = useFetch<ToolCollectionResponse>(
|
|
23
25
|
() => fetch(`${baseUrl}/tools/${collection}`).then(r => {
|
|
24
26
|
if (!r.ok) throw new Error(`Failed to load collection: ${r.statusText}`);
|
|
25
27
|
return r.json();
|
|
@@ -27,8 +29,8 @@ export function ToolCollection() {
|
|
|
27
29
|
[baseUrl, collection]
|
|
28
30
|
);
|
|
29
31
|
|
|
30
|
-
if (
|
|
31
|
-
if (
|
|
32
|
+
if (error) return <div className="p-6 text-destructive">Failed to load tool collection “{collection}”.</div>;
|
|
33
|
+
if (!data) return <div className="flex h-64 items-center justify-center text-muted-foreground"><Spinner /></div>;
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<DetailPage
|
|
@@ -37,18 +39,22 @@ export function ToolCollection() {
|
|
|
37
39
|
description={data.description || `${data.tools.length} tool${data.tools.length !== 1 ? 's' : ''} in this collection.`}
|
|
38
40
|
>
|
|
39
41
|
{data.tools.map(tool => (
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
<Card key={tool.name} className="mb-4">
|
|
43
|
+
<CardContent className="p-5">
|
|
44
|
+
<div className="mb-2 flex items-center gap-2">
|
|
45
|
+
<span className={`inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS.tool}`}>
|
|
46
|
+
tool
|
|
47
|
+
</span>
|
|
48
|
+
<span className="font-semibold text-card-foreground">{tool.name}</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div className="text-sm text-muted-foreground">{tool.description || 'No description'}</div>
|
|
51
|
+
{tool.input_schema && (
|
|
52
|
+
<pre className="mt-3 whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted-background p-4 font-mono text-sm text-foreground">
|
|
53
|
+
{JSON.stringify(tool.input_schema, null, 2)}
|
|
54
|
+
</pre>
|
|
55
|
+
)}
|
|
56
|
+
</CardContent>
|
|
57
|
+
</Card>
|
|
52
58
|
))}
|
|
53
59
|
</DetailPage>
|
|
54
60
|
);
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { useFetch } from '@vertesia/ui/core';
|
|
2
|
-
import { useParams, NavLink } from '@vertesia/ui/router';
|
|
3
1
|
import type { InCodeTypeDefinition } from '@vertesia/common';
|
|
2
|
+
import { Badge, Card, CardContent, Spinner, useFetch } from '@vertesia/ui/core';
|
|
3
|
+
import { NavLink, useParams } from '@vertesia/ui/router';
|
|
4
|
+
|
|
4
5
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
7
|
+
import { TYPE_VARIANTS } from '../components/typeVariants.js';
|
|
6
8
|
|
|
7
9
|
export function TypeCollection() {
|
|
8
10
|
const collection = useParams('collection');
|
|
9
11
|
const { baseUrl } = useAdminContext();
|
|
10
12
|
|
|
11
|
-
const { data: types,
|
|
13
|
+
const { data: types, error } = useFetch<InCodeTypeDefinition[]>(
|
|
12
14
|
() => fetch(`${baseUrl}/types/${collection}`).then(r => {
|
|
13
15
|
if (!r.ok) throw new Error(`Failed to load collection: ${r.statusText}`);
|
|
14
16
|
return r.json();
|
|
@@ -16,8 +18,8 @@ export function TypeCollection() {
|
|
|
16
18
|
[baseUrl, collection]
|
|
17
19
|
);
|
|
18
20
|
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
+
if (error) return <div className="p-6 text-destructive">Failed to load type collection “{collection}”.</div>;
|
|
22
|
+
if (!types) return <div className="flex h-64 items-center justify-center text-muted-foreground"><Spinner /></div>;
|
|
21
23
|
|
|
22
24
|
return (
|
|
23
25
|
<DetailPage
|
|
@@ -25,32 +27,38 @@ export function TypeCollection() {
|
|
|
25
27
|
title={collection}
|
|
26
28
|
description={`${types.length} content type${types.length !== 1 ? 's' : ''} in this collection.`}
|
|
27
29
|
>
|
|
28
|
-
<div className="
|
|
30
|
+
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
|
29
31
|
{types.map(t => {
|
|
30
32
|
const typeName = t.id?.split(':')[1] || t.name;
|
|
31
33
|
return (
|
|
32
34
|
<NavLink
|
|
33
35
|
key={t.name}
|
|
34
36
|
href={`/types/${collection}/${typeName}`}
|
|
35
|
-
className="
|
|
37
|
+
className="no-underline"
|
|
36
38
|
>
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<div className="
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
{t.strict_mode &&
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
<Card className="h-full transition-all hover:-translate-y-0.5 hover:shadow-md">
|
|
40
|
+
<CardContent className="p-5">
|
|
41
|
+
<span className={`mb-2 inline-block rounded-full px-2 py-0.5 text-[0.7rem] font-semibold uppercase tracking-wide ${TYPE_VARIANTS.type}`}>
|
|
42
|
+
type
|
|
43
|
+
</span>
|
|
44
|
+
<div className="font-semibold text-card-foreground">{t.name}</div>
|
|
45
|
+
<div className="mt-1 text-sm text-muted-foreground">{t.description || 'No description'}</div>
|
|
46
|
+
{t.tags && t.tags.length > 0 && (
|
|
47
|
+
<div className="mt-3 flex flex-wrap gap-1.5">
|
|
48
|
+
{t.tags.map(tag => (
|
|
49
|
+
<Badge key={tag} variant="default">{tag}</Badge>
|
|
50
|
+
))}
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
{(t.is_chunkable || t.strict_mode) && (
|
|
54
|
+
<div className="mt-2 truncate font-mono text-xs text-muted-foreground">
|
|
55
|
+
{t.is_chunkable && 'chunkable'}
|
|
56
|
+
{t.is_chunkable && t.strict_mode && ' · '}
|
|
57
|
+
{t.strict_mode && 'strict'}
|
|
58
|
+
</div>
|
|
59
|
+
)}
|
|
60
|
+
</CardContent>
|
|
61
|
+
</Card>
|
|
54
62
|
</NavLink>
|
|
55
63
|
);
|
|
56
64
|
})}
|
package/src/pages/TypeDetail.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useFetch } from '@vertesia/ui/core';
|
|
2
|
-
import { useParams } from '@vertesia/ui/router';
|
|
3
1
|
import type { InCodeTypeDefinition } from '@vertesia/common';
|
|
2
|
+
import { Badge, Spinner, useFetch } from '@vertesia/ui/core';
|
|
3
|
+
import { useParams } from '@vertesia/ui/router';
|
|
4
|
+
|
|
4
5
|
import { useAdminContext } from '../AdminContext.js';
|
|
5
6
|
import { DetailPage } from '../components/DetailPage.js';
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ export function TypeDetail() {
|
|
|
10
11
|
const name = params.name;
|
|
11
12
|
const { baseUrl } = useAdminContext();
|
|
12
13
|
|
|
13
|
-
const { data: typeDef,
|
|
14
|
+
const { data: typeDef, error } = useFetch<InCodeTypeDefinition>(
|
|
14
15
|
() => fetch(`${baseUrl}/types/${collection}/${name}`).then(r => {
|
|
15
16
|
if (!r.ok) throw new Error(`Failed to load type: ${r.statusText}`);
|
|
16
17
|
return r.json();
|
|
@@ -18,8 +19,8 @@ export function TypeDetail() {
|
|
|
18
19
|
[baseUrl, collection, name]
|
|
19
20
|
);
|
|
20
21
|
|
|
21
|
-
if (
|
|
22
|
-
if (
|
|
22
|
+
if (error) return <div className="p-6 text-destructive">Failed to load type “{name}”.</div>;
|
|
23
|
+
if (!typeDef) return <div className="flex h-64 items-center justify-center text-muted-foreground"><Spinner /></div>;
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
26
|
<DetailPage
|
|
@@ -29,31 +30,28 @@ export function TypeDetail() {
|
|
|
29
30
|
tags={typeDef.tags}
|
|
30
31
|
backHref={`/types/${collection}`}
|
|
31
32
|
>
|
|
32
|
-
{/* Flags */}
|
|
33
33
|
{(typeDef.is_chunkable || typeDef.strict_mode) && (
|
|
34
|
-
<div className="
|
|
35
|
-
<div className="
|
|
36
|
-
{typeDef.is_chunkable && <
|
|
37
|
-
{typeDef.strict_mode && <
|
|
34
|
+
<div className="mb-8">
|
|
35
|
+
<div className="flex flex-wrap gap-2">
|
|
36
|
+
{typeDef.is_chunkable && <Badge variant="success">Chunkable</Badge>}
|
|
37
|
+
{typeDef.strict_mode && <Badge variant="success">Strict Mode</Badge>}
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
)}
|
|
41
41
|
|
|
42
|
-
{/* Object Schema */}
|
|
43
42
|
{typeDef.object_schema && (
|
|
44
|
-
<div className="
|
|
45
|
-
<h2>Object Schema</h2>
|
|
46
|
-
<pre className="
|
|
43
|
+
<div className="mb-8">
|
|
44
|
+
<h2 className="mb-3 text-lg font-semibold text-foreground">Object Schema</h2>
|
|
45
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted-background p-4 font-mono text-sm text-foreground">
|
|
47
46
|
{JSON.stringify(typeDef.object_schema, null, 2)}
|
|
48
47
|
</pre>
|
|
49
48
|
</div>
|
|
50
49
|
)}
|
|
51
50
|
|
|
52
|
-
{/* Table Layout */}
|
|
53
51
|
{typeDef.table_layout && typeDef.table_layout.length > 0 && (
|
|
54
|
-
<div className="
|
|
55
|
-
<h2>Table Layout</h2>
|
|
56
|
-
<pre className="
|
|
52
|
+
<div className="mb-8">
|
|
53
|
+
<h2 className="mb-3 text-lg font-semibold text-foreground">Table Layout</h2>
|
|
54
|
+
<pre className="whitespace-pre-wrap wrap-break-word rounded-lg border border-border bg-muted-background p-4 font-mono text-sm text-foreground">
|
|
57
55
|
{JSON.stringify(typeDef.table_layout, null, 2)}
|
|
58
56
|
</pre>
|
|
59
57
|
</div>
|
package/src/theme.css
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default theme for @vertesia/tools-admin-ui.
|
|
3
|
+
*
|
|
4
|
+
* Consumers should import this file (or provide their own equivalent)
|
|
5
|
+
* so that @vertesia/ui shadcn components resolve their CSS custom properties.
|
|
6
|
+
*
|
|
7
|
+
* @import '@vertesia/tools-admin-ui/theme.css';
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
@import "@vertesia/ui/styles/color.css";
|
|
11
|
+
@import "@vertesia/ui/styles/theme.css";
|
|
12
|
+
@import "@vertesia/ui/styles/utilities.css";
|
package/src/types.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
AgentToolDefinition,
|
|
7
7
|
CatalogInteractionRef,
|
|
8
8
|
InCodeTypeDefinition,
|
|
9
|
+
RemoteActivityDefinition,
|
|
9
10
|
RenderingTemplateDefinitionRef,
|
|
10
11
|
} from '@vertesia/common';
|
|
11
12
|
|
|
@@ -18,12 +19,13 @@ export interface ServerInfo {
|
|
|
18
19
|
endpoints: {
|
|
19
20
|
tools: string[];
|
|
20
21
|
interactions: string[];
|
|
22
|
+
activities: string[];
|
|
21
23
|
templates: string[];
|
|
22
24
|
mcp: string[];
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
export type ResourceType = 'tool' | 'skill' | 'interaction' | 'type' | 'template' | 'mcp';
|
|
28
|
+
export type ResourceType = 'tool' | 'activity' | 'skill' | 'interaction' | 'type' | 'template' | 'mcp';
|
|
27
29
|
|
|
28
30
|
/**
|
|
29
31
|
* A normalized resource entry for display and search.
|
|
@@ -82,6 +84,11 @@ interface TypesResponse {
|
|
|
82
84
|
collections: CollectionMeta[];
|
|
83
85
|
}
|
|
84
86
|
|
|
87
|
+
interface ActivitiesResponse {
|
|
88
|
+
activities: RemoteActivityDefinition[];
|
|
89
|
+
collections: CollectionMeta[];
|
|
90
|
+
}
|
|
91
|
+
|
|
85
92
|
interface TemplatesResponse {
|
|
86
93
|
templates: RenderingTemplateDefinitionRef[];
|
|
87
94
|
collections: CollectionMeta[];
|
|
@@ -136,6 +143,7 @@ export function buildResourceData(
|
|
|
136
143
|
interactionsResp: InteractionsResponse,
|
|
137
144
|
toolsResp: ToolsResponse,
|
|
138
145
|
skillsResp: SkillsResponse,
|
|
146
|
+
activitiesResp: ActivitiesResponse,
|
|
139
147
|
typesResp: TypesResponse,
|
|
140
148
|
templatesResp: TemplatesResponse,
|
|
141
149
|
mcpEndpoints?: string[],
|
|
@@ -219,6 +227,31 @@ export function buildResourceData(
|
|
|
219
227
|
});
|
|
220
228
|
}
|
|
221
229
|
|
|
230
|
+
// --- Activities (use collection field from definition) ---
|
|
231
|
+
const actCounts = countPerCollection(
|
|
232
|
+
activitiesResp.activities,
|
|
233
|
+
activitiesResp.collections,
|
|
234
|
+
(a) => a.collection,
|
|
235
|
+
);
|
|
236
|
+
for (const col of activitiesResp.collections) {
|
|
237
|
+
collections.push({
|
|
238
|
+
name: col.name,
|
|
239
|
+
title: col.title || formatTitle(col.name),
|
|
240
|
+
description: col.description || '',
|
|
241
|
+
type: 'activity',
|
|
242
|
+
count: actCounts.get(col.name) || 0,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
for (const act of activitiesResp.activities) {
|
|
246
|
+
resources.push({
|
|
247
|
+
name: act.name,
|
|
248
|
+
title: act.title || formatTitle(act.name),
|
|
249
|
+
description: act.description || '',
|
|
250
|
+
type: 'activity',
|
|
251
|
+
url: act.url,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
222
255
|
// --- Types (id format: "collection:pathName") ---
|
|
223
256
|
const typeCounts = countPerCollection(
|
|
224
257
|
typesResp.types,
|