@hanzo/build 0.2.111 → 0.2.112
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/customize/agents.d.ts +3 -1
- package/lib/customize/agents.js +55 -23
- package/lib/customize/index.js +10 -2
- package/lib/nav.js +2 -2
- package/lib/route.d.ts +2 -2
- package/lib/route.js +2 -2
- package/package.json +1 -1
|
@@ -2,7 +2,9 @@ import { type Cast } from '../api/agents.ts';
|
|
|
2
2
|
import { type Pane } from './ui.tsx';
|
|
3
3
|
/** Categories as Browse offers them: the default agents' first, as listed, then the rest by how many each holds. */
|
|
4
4
|
export declare function kinds(first: readonly Cast[], rest: readonly Cast[]): string[];
|
|
5
|
-
export declare function Agents({ view, q, adding, onAdding, onView, onCount }: Pane
|
|
5
|
+
export declare function Agents({ view, q, adding, onAdding, onView, onCount, mode }: Pane & {
|
|
6
|
+
mode?: 'agents' | 'bots';
|
|
7
|
+
}): import("react").JSX.Element;
|
|
6
8
|
/** One agent's page: who it is, what it runs on and reads, what it may call and spend, and what it has done. */
|
|
7
9
|
export declare function Profile({ name }: {
|
|
8
10
|
name: string;
|
package/lib/customize/agents.js
CHANGED
|
@@ -43,12 +43,31 @@ const TRIGGER_LABELS = {
|
|
|
43
43
|
channel: { title: phrase('Channel & message events'), detail: phrase('Listen and respond to Slack, Discord, Telegram, and team channels.') },
|
|
44
44
|
watch: { title: phrase('Proactive anomaly watch'), detail: phrase('Continuously monitor metrics, queues, and alerts 24/7.') },
|
|
45
45
|
};
|
|
46
|
+
const FAST_BOTS = new Set(['dev', 'qa', 'cyber', 'it', 'auto', 'sal', 'mark', 'rev', 'biz', 'cust', 'com', 'su']);
|
|
47
|
+
const GIT_BOTS = new Set(['dev', 'qa', 'cyber', 'it', 'auto', 'sci', 'data']);
|
|
48
|
+
/** Any real agent preset configured to operate as a 24/7 autonomous, proactive, and event-driven bot. */
|
|
49
|
+
function asBot(c) {
|
|
50
|
+
const key = c.name.toLowerCase();
|
|
51
|
+
const schedule = c.schedule || (FAST_BOTS.has(key) ? '*/15 * * * *' : '0 9 * * 1-5');
|
|
52
|
+
const triggers = c.triggers?.length
|
|
53
|
+
? c.triggers
|
|
54
|
+
: GIT_BOTS.has(key)
|
|
55
|
+
? ['git', 'webhook', 'watch']
|
|
56
|
+
: ['channel', 'webhook', 'watch'];
|
|
57
|
+
return {
|
|
58
|
+
...c,
|
|
59
|
+
category: 'Bot',
|
|
60
|
+
executionMode: 'long-running',
|
|
61
|
+
schedule,
|
|
62
|
+
triggers,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
46
65
|
/** Categories as Browse offers them: the default agents' first, as listed, then the rest by how many each holds. */
|
|
47
66
|
export function kinds(first, rest) {
|
|
48
|
-
const lead = [...new Set(first.map((c) => c.category))];
|
|
67
|
+
const lead = [...new Set(first.map((c) => c.category).filter((cat) => cat !== 'Bot'))];
|
|
49
68
|
const count = new Map();
|
|
50
69
|
for (const c of rest)
|
|
51
|
-
if (!lead.includes(c.category))
|
|
70
|
+
if (c.category !== 'Bot' && !lead.includes(c.category))
|
|
52
71
|
count.set(c.category, (count.get(c.category) ?? 0) + 1);
|
|
53
72
|
return [ANY, ...lead, ...[...count.keys()].sort((a, b) => count.get(b) - count.get(a) || a.localeCompare(b))];
|
|
54
73
|
}
|
|
@@ -79,28 +98,36 @@ const SO_FAR = {
|
|
|
79
98
|
};
|
|
80
99
|
const EACH = { day: phrase('Each day, USD'), week: phrase('Each week, USD'), month: phrase('Each month, USD') };
|
|
81
100
|
const PERIOD = { day: phrase('Day'), week: phrase('Week'), month: phrase('Month') };
|
|
82
|
-
export function Agents({ view, q, adding, onAdding, onView, onCount }) {
|
|
101
|
+
export function Agents({ view, q, adding, onAdding, onView, onCount, mode = 'agents' }) {
|
|
83
102
|
const { t } = useI18n();
|
|
84
103
|
const host = useHost();
|
|
85
104
|
const target = useTarget();
|
|
86
105
|
const signed = Boolean(host.person);
|
|
87
106
|
const browsing = view === 'discover';
|
|
107
|
+
const botsMode = mode === 'bots';
|
|
88
108
|
const mine = useLoad(signed ? () => agents(target) : null, [], [target, signed]);
|
|
89
|
-
const figures = useLoad(browsing && host.personas ? host.personas : null, [], [view]);
|
|
90
|
-
|
|
109
|
+
const figures = useLoad(browsing && !botsMode && host.personas ? host.personas : null, [], [view, botsMode]);
|
|
110
|
+
const yoursList = useMemo(() => (botsMode ? mine.value.filter((a) => a.executionMode === 'long-running') : mine.value.filter((a) => a.executionMode !== 'long-running')), [mine.value, botsMode]);
|
|
111
|
+
useCount(yoursList.length, onCount);
|
|
91
112
|
const [note, setNote] = useState('');
|
|
92
113
|
const [kind, setKind] = useState(ANY);
|
|
93
114
|
const [more, setMore] = useState(PAGE);
|
|
94
115
|
const [using, setUsing] = useState(null);
|
|
95
116
|
const [making, setMaking] = useState(null);
|
|
96
117
|
const [electing, setElecting] = useState(null);
|
|
97
|
-
useEffect(() => setMore(PAGE), [q, kind]);
|
|
118
|
+
useEffect(() => setMore(PAGE), [q, kind, botsMode]);
|
|
98
119
|
const opened = (a) => host.go(path({ kind: 'agent', name: a.name }));
|
|
99
120
|
const take = async (c) => {
|
|
100
121
|
setUsing(c);
|
|
101
122
|
setNote('');
|
|
102
123
|
try {
|
|
103
|
-
opened(await use(target, c, window.location.href
|
|
124
|
+
opened(await use(target, c, window.location.href, botsMode
|
|
125
|
+
? {
|
|
126
|
+
executionMode: 'long-running',
|
|
127
|
+
schedule: c.schedule || '*/15 * * * *',
|
|
128
|
+
triggers: c.triggers?.length ? c.triggers : ['webhook', 'git', 'channel', 'watch'],
|
|
129
|
+
}
|
|
130
|
+
: undefined));
|
|
104
131
|
}
|
|
105
132
|
catch (e) {
|
|
106
133
|
setNote(say(e, t));
|
|
@@ -109,26 +136,28 @@ export function Agents({ view, q, adding, onAdding, onView, onCount }) {
|
|
|
109
136
|
setUsing(null);
|
|
110
137
|
}
|
|
111
138
|
};
|
|
112
|
-
const editor = adding ? (_jsx(Editor, { onClose: () => onAdding(false), onSaved: (a) => {
|
|
139
|
+
const editor = adding ? (_jsx(Editor, { defaultBot: botsMode, onClose: () => onAdding(false), onSaved: (a) => {
|
|
113
140
|
onAdding(false);
|
|
114
141
|
onView('yours');
|
|
115
142
|
mine.reload();
|
|
116
143
|
setNote(t('{name} is saved', { name: a.name }));
|
|
117
144
|
} })) : null;
|
|
118
145
|
if (browsing) {
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
|
|
146
|
+
const allCast = host.cast ?? [];
|
|
147
|
+
const isBotCast = (c) => c.category === 'Bot' || c.executionMode === 'long-running';
|
|
148
|
+
const explicitBots = allCast.filter(isBotCast);
|
|
149
|
+
const first = botsMode ? (explicitBots.length ? explicitBots : allCast.map(asBot)) : allCast.filter((c) => !isBotCast(c));
|
|
150
|
+
const rest = botsMode ? [] : figures.value.filter((c) => !isBotCast(c));
|
|
151
|
+
const all = [...first, ...rest];
|
|
152
|
+
const shown = all.filter((c) => (botsMode || kind === ANY || c.category === kind) && matches(q, c.title, c.name, c.description, c.category));
|
|
153
|
+
const card = (c) => (_jsx(Tile, { title: c.title, detail: c.description === c.title || c.description === c.category ? undefined : c.description, meta: [botsMode ? t('Bot') : category(c.category, t), c.executionMode === 'long-running' ? t('24/7 · Proactive · Event-driven') : '', c.schedule].filter(Boolean).join(' · '), mark: _jsx(Mark, { name: c.title, size: 40, logo: c.avatar }), onOpen: signed && botsMode ? () => setElecting(c) : undefined, action: signed ? (_jsxs(XStack, { items: "center", gap: "$1.5", children: [botsMode ? (_jsx(XStack, { "$max-sm": { display: 'none' }, children: _jsx(Button, { size: "sm", variant: "ghost", disabled: using !== null, "aria-label": t('Elect {name} to run 24/7', { name: c.title }), onPress: () => setElecting(c), children: t('Configure 24/7') }) })) : null, _jsx(Add, { name: c.title, use: true, added: false, busy: using !== null, onPress: () => void take(c) })] })) : undefined }, `${c.category}/${c.name}/${c.title}`));
|
|
154
|
+
return (_jsxs(YStack, { gap: "$3", children: [signed ? (_jsxs(XStack, { gap: "$2", flexWrap: "wrap", children: [_jsx(Button, { size: "sm", variant: "outline", onPress: () => onAdding(true), children: t('Start from scratch') }), botsMode ? (allCast.length ? (_jsx(Button, { size: "sm", variant: "outline", onPress: () => setElecting((first[0] ?? allCast[0])), children: t('Elect 24/7 preset') })) : null) : (_jsxs(_Fragment, { children: [_jsx(Button, { size: "sm", variant: "outline", onPress: () => setMaking('self'), children: t('Clone yourself') }), _jsx(Button, { size: "sm", variant: "outline", onPress: () => setMaking('person'), children: t('Create from a person') })] }))] })) : null, !botsMode ? (_jsx(XStack, { overflowX: "auto", overflowY: "hidden", pb: "$1", children: _jsx(Choice, { label: t('Category'), value: kind, options: kinds(first, rest).map((id) => ({ id, label: category(id, t) })), onChange: setKind }) })) : null, _jsx(Line, { children: note }), shown.length ? (_jsx(Grid, { label: botsMode ? t('Bots to start from') : t('Agents to start from'), children: shown.slice(0, more).map(card) })) : figures.loading ? null : q.trim() ? (_jsx(Soft, { children: t(botsMode ? 'No bot matches “{q}”.' : 'No agent matches “{q}”.', { q: q.trim() }) })) : botsMode ? (_jsx(Soft, { children: t('Create a persistent 24/7 bot from scratch or elect any preset.') })) : (_jsx(Soft, { children: t('No agent matches “{q}”.', { q: q.trim() }) })), shown.length > more ? (_jsx(XStack, { children: _jsx(Button, { size: "sm", variant: "ghost", onPress: () => setMore(more + PAGE), children: t('More') }) })) : null, figures.error ? _jsx(Failed, { error: figures.error, onRetry: figures.reload }) : figures.loading ? _jsx(Soft, { children: t('Loading…') }) : null, editor, making ? _jsx(Person, { self: making === 'self', onClose: () => setMaking(null), onMade: opened }) : null, electing ? _jsx(Elect, { preset: electing, all: allCast, onClose: () => setElecting(null), onElected: opened }) : null] }));
|
|
126
155
|
}
|
|
127
156
|
if (!signed) {
|
|
128
|
-
return _jsx(Visitor, { children: t('Sign in to see your agents.') });
|
|
157
|
+
return _jsx(Visitor, { children: t(botsMode ? 'Sign in to see your bots.' : 'Sign in to see your agents.') });
|
|
129
158
|
}
|
|
130
|
-
const shown =
|
|
131
|
-
return (_jsxs(YStack, { gap: "$3", children: [_jsx(Line, { children: note }), mine.error && !
|
|
159
|
+
const shown = yoursList.filter((a) => matches(q, a.name, a.description, a.model));
|
|
160
|
+
return (_jsxs(YStack, { gap: "$3", children: [_jsx(Line, { children: note }), mine.error && !yoursList.length ? (_jsx(Failed, { error: mine.error, onRetry: mine.reload })) : mine.loading && !yoursList.length ? (_jsx(Soft, { children: t(botsMode ? 'Loading your bots…' : 'Loading your agents…') })) : !yoursList.length ? (_jsxs(Empty, { title: t(botsMode ? 'No bots yet' : 'No agents yet'), detail: "", children: [_jsx(Button, { size: "sm", variant: "outline", onPress: () => onView('discover'), children: t(botsMode ? 'Browse bots' : 'Browse agents') }), _jsx(Button, { size: "sm", onPress: () => onAdding(true), children: t(botsMode ? 'New bot' : 'New agent') })] })) : !shown.length ? (_jsx(Soft, { children: t(botsMode ? 'No bot of yours matches “{q}”.' : 'No agent of yours matches “{q}”.', { q: q.trim() }) })) : (_jsx(Grid, { label: t(botsMode ? 'Your bots' : 'Your agents'), children: shown.map((a) => (_jsx(Tile, { title: a.name, detail: a.description || t('No description.'), meta: [
|
|
132
161
|
a.model,
|
|
133
162
|
a.executionMode === 'long-running' ? t('24/7') : '',
|
|
134
163
|
a.schedule || '',
|
|
@@ -233,9 +262,10 @@ export function Profile({ name }) {
|
|
|
233
262
|
const target = useTarget();
|
|
234
263
|
const got = useLoad(host.person ? () => profile(target, name) : null, null, [target, name]);
|
|
235
264
|
const [editing, setEditing] = useState(false);
|
|
236
|
-
const back = () => host.go(path({ kind: 'customize', tab: 'agents' }));
|
|
237
265
|
const a = got.value?.agent;
|
|
238
|
-
|
|
266
|
+
const isBot = a?.executionMode === 'long-running';
|
|
267
|
+
const back = () => host.go(path({ kind: 'customize', tab: isBot ? 'bots' : 'agents' }));
|
|
268
|
+
return (_jsxs(YStack, { flex: 1, minH: 0, overflow: "scroll", px: "$6", py: "$6", "$max-md": { px: '$4', py: '$4' }, children: [_jsxs(YStack, { width: "100%", maxW: 880, mx: "auto", gap: "$5", children: [_jsxs(XStack, { render: "button", onPress: back, items: "center", gap: "$1.5", self: "flex-start", cursor: "pointer", "aria-label": t(isBot ? 'Back to bots' : 'Back to agents'), children: [_jsx(ArrowLeft, { size: 14, color: "$soft", 'data-i18n-mirror': '' }), _jsx(SizableText, { size: "$2", color: "$soft", children: t(isBot ? 'Bots' : 'Agents') })] }), !host.person ? (_jsx(Visitor, { children: t('Sign in to see this agent.') })) : got.error && !a ? (_jsx(Failed, { error: got.error, onRetry: got.reload })) : !a ? (_jsx(Soft, { children: t('Loading the agent…') })) : (_jsxs(_Fragment, { children: [_jsxs(XStack, { items: "center", gap: "$4", children: [_jsx(Face, { agent: a, cast: host.cast ?? [], size: 64 }), _jsxs(YStack, { flex: 1, minW: 0, gap: "$1", children: [_jsx(SizableText, { render: "h1", size: "$7", color: "$ink", numberOfLines: 1, children: a.name }), _jsx(SizableText, { size: "$3", color: "$soft", children: a.description || t('No role written yet.') })] }), _jsx(Button, { size: "sm", variant: "outline", onPress: () => setEditing(true), children: t('Edit') })] }), _jsx(Part, { title: t('Model'), detail: a.model || t('The deployment’s default') }), _jsx(Part, { title: t('Autonomous & Event-Driven'), detail: a.executionMode === 'long-running'
|
|
239
269
|
? [t('Runs autonomously 24/7'), a.schedule ? `${t('Schedule')}: ${a.schedule}` : '', a.triggers?.length ? `${t('Triggers')}: ${a.triggers.join(', ')}` : '']
|
|
240
270
|
.filter(Boolean)
|
|
241
271
|
.join(' · ')
|
|
@@ -245,13 +275,15 @@ export function Profile({ name }) {
|
|
|
245
275
|
}, onDeleted: back })) : null] }));
|
|
246
276
|
}
|
|
247
277
|
/** Write a new agent, or change one; an existing agent is read whole first, for its instructions. */
|
|
248
|
-
function Editor({ agent, onClose, onSaved, onDeleted, }) {
|
|
278
|
+
function Editor({ agent, defaultBot = false, onClose, onSaved, onDeleted, }) {
|
|
249
279
|
const { t } = useI18n();
|
|
250
280
|
const target = useTarget();
|
|
251
281
|
const full = useLoad(agent ? () => one(target, agent.id || agent.name) : null, null, [target, agent?.id]);
|
|
252
282
|
const catalog = useLoad(() => models(target), [], [target]);
|
|
253
283
|
const on = useLoad(() => tools(target, { activated: true }), [], [target]);
|
|
254
|
-
const [d, setD] = useState(
|
|
284
|
+
const [d, setD] = useState(() => defaultBot
|
|
285
|
+
? { ...EMPTY, executionMode: 'long-running', schedule: '*/15 * * * *', triggers: ['webhook', 'git', 'channel', 'watch'] }
|
|
286
|
+
: EMPTY);
|
|
255
287
|
const [ready, setReady] = useState(!agent);
|
|
256
288
|
const [working, setWorking] = useState(false);
|
|
257
289
|
const [note, setNote] = useState('');
|
|
@@ -289,7 +321,7 @@ function Editor({ agent, onClose, onSaved, onDeleted, }) {
|
|
|
289
321
|
}
|
|
290
322
|
};
|
|
291
323
|
const pick = (name, yes) => set({ tools: yes ? [...d.tools, name] : d.tools.filter((n) => n !== name) });
|
|
292
|
-
return (_jsx(Sheet, { title: agent ? agent.name : t('New agent'), open: true, onOpenChange: (o) => !o && onClose(), width: 680, children: agent && full.error && !full.value ? (_jsx(Failed, { error: full.error, onRetry: full.reload })) : !ready ? (_jsx(Soft, { children: t('Loading the agent…') })) : (_jsxs(_Fragment, { children: [_jsx(Field, { label: t('Name'), hint: agent ? t('An agent keeps its name.') : t('Letters, digits, . _ or -. Other agents call it as agent_<name>.'), children: _jsx(Input, { value: d.name, onChangeText: (v) => set({ name: v }), "aria-label": t('Name'), disabled: Boolean(agent), autoCapitalize: "none" }) }), _jsx(Field, { label: t('Description'), hint: t('The line another agent reads to decide whether to call this one.'), children: _jsx(Input, { value: d.description, onChangeText: (v) => set({ description: v }), placeholder: t('Answers questions about our codebase'), "aria-label": t('Description') }) }), _jsx(Field, { label: t('Model'), children: _jsxs(XStack, { items: "center", gap: "$2", flexWrap: "wrap", children: [_jsx(ModelPicker, { size: "sm", name: t('Model'), placeholder: t('The deployment’s default'), models: catalog.value, scope: "chat", value: d.model || undefined, onChange: (id) => set({ model: id }), loading: catalog.loading, error: catalog.error ? say(catalog.error, t) : null }), d.model && !agent ? (_jsx(Button, { size: "sm", variant: "ghost", onPress: () => set({ model: '' }), children: t('Use the default') })) : null] }) }), _jsx(Field, { label: t('Instructions'), hint: t('The system prompt: what the model reads before every run.'), children: _jsx(Textarea, { value: d.instructions, onChangeText: (v) => set({ instructions: v }), placeholder: t('Be terse, and cite the file you read.'), "aria-label": t('Instructions'), rows: 8 }) }), _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$2", color: "$ink", children: t('Tools') }), _jsx(SizableText, { size: "$1", color: "$soft", children: every
|
|
324
|
+
return (_jsx(Sheet, { title: agent ? agent.name : t(defaultBot ? 'New bot' : 'New agent'), open: true, onOpenChange: (o) => !o && onClose(), width: 680, children: agent && full.error && !full.value ? (_jsx(Failed, { error: full.error, onRetry: full.reload })) : !ready ? (_jsx(Soft, { children: t('Loading the agent…') })) : (_jsxs(_Fragment, { children: [_jsx(Field, { label: t('Name'), hint: agent ? t('An agent keeps its name.') : t('Letters, digits, . _ or -. Other agents call it as agent_<name>.'), children: _jsx(Input, { value: d.name, onChangeText: (v) => set({ name: v }), "aria-label": t('Name'), disabled: Boolean(agent), autoCapitalize: "none" }) }), _jsx(Field, { label: t('Description'), hint: t('The line another agent reads to decide whether to call this one.'), children: _jsx(Input, { value: d.description, onChangeText: (v) => set({ description: v }), placeholder: t('Answers questions about our codebase'), "aria-label": t('Description') }) }), _jsx(Field, { label: t('Model'), children: _jsxs(XStack, { items: "center", gap: "$2", flexWrap: "wrap", children: [_jsx(ModelPicker, { size: "sm", name: t('Model'), placeholder: t('The deployment’s default'), models: catalog.value, scope: "chat", value: d.model || undefined, onChange: (id) => set({ model: id }), loading: catalog.loading, error: catalog.error ? say(catalog.error, t) : null }), d.model && !agent ? (_jsx(Button, { size: "sm", variant: "ghost", onPress: () => set({ model: '' }), children: t('Use the default') })) : null] }) }), _jsx(Field, { label: t('Instructions'), hint: t('The system prompt: what the model reads before every run.'), children: _jsx(Textarea, { value: d.instructions, onChangeText: (v) => set({ instructions: v }), placeholder: t('Be terse, and cite the file you read.'), "aria-label": t('Instructions'), rows: 8 }) }), _jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$2", color: "$ink", children: t('Tools') }), _jsx(SizableText, { size: "$1", color: "$soft", children: every
|
|
293
325
|
? t('Every tool the fleet’s MCP server serves when it runs.')
|
|
294
326
|
: d.tools.length
|
|
295
327
|
? t('{n} chosen. It can call only these.', { n: d.tools.length })
|
package/lib/customize/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
import { SizableText, XStack, YStack } from '@hanzo/gui';
|
|
16
16
|
import { phrase } from '@hanzo/i18n';
|
|
17
17
|
import { useI18n } from '@hanzo/i18n/react';
|
|
18
|
-
import { BookOpen, Bot, Plug, Plus, Puzzle } from '@hanzogui/lucide-icons-2';
|
|
18
|
+
import { BookOpen, Bot, Plug, Plus, Puzzle, Users } from '@hanzogui/lucide-icons-2';
|
|
19
19
|
import { Button, Input } from '@hanzo/ui';
|
|
20
20
|
import { useCallback, useState } from 'react';
|
|
21
21
|
import { useHost } from '../host.js';
|
|
@@ -58,6 +58,14 @@ const LABEL = {
|
|
|
58
58
|
add: phrase('New agent'),
|
|
59
59
|
find: phrase('Search agents'),
|
|
60
60
|
typing: phrase('Search agents…'),
|
|
61
|
+
icon: _jsx(Users, { size: 15 }),
|
|
62
|
+
},
|
|
63
|
+
bots: {
|
|
64
|
+
title: phrase('Bots'),
|
|
65
|
+
says: phrase('Persistent 24/7 agents that run continuously on a schedule or when events fire.'),
|
|
66
|
+
add: phrase('New bot'),
|
|
67
|
+
find: phrase('Search bots'),
|
|
68
|
+
typing: phrase('Search bots…'),
|
|
61
69
|
icon: _jsx(Bot, { size: 15 }),
|
|
62
70
|
},
|
|
63
71
|
};
|
|
@@ -85,5 +93,5 @@ export function Customize({ tab, view: first }) {
|
|
|
85
93
|
}) })), host.sections ? null : (_jsx(SizableText, { size: "$2", color: "$soft", children: t(LABEL[tab].says) })), _jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Choice, { label: t('Show'), value: view, options: [
|
|
86
94
|
{ id: 'discover', label: t('Browse') },
|
|
87
95
|
{ id: 'yours', label: t('Yours'), count },
|
|
88
|
-
], onChange: setView }), _jsx(XStack, { flex: 1 }), may ? (_jsxs(Button, { size: "sm", onPress: () => setAdding(true), children: [_jsx(Plus, { size: 14 }), " ", t(LABEL[tab].add)] })) : null] }), _jsx(Input, { value: q, onChangeText: setQ, placeholder: t(LABEL[tab].typing), "aria-label": t(LABEL[tab].find) }), host.person && kit && !host.admin && LABEL[tab].admin ? (_jsx(SizableText, { size: "$1", color: "$soft", children: t(LABEL[tab].admin) })) : null, tab === 'skills' ? (_jsx(Skills, { ...pane })) : tab === 'connectors' ? (_jsx(Connectors, { ...pane })) : tab === 'plugins' ? (_jsx(Plugins, { ...pane })) : (_jsx(Agents, { ...pane }))] }) }));
|
|
96
|
+
], onChange: setView }), _jsx(XStack, { flex: 1 }), may ? (_jsxs(Button, { size: "sm", onPress: () => setAdding(true), children: [_jsx(Plus, { size: 14 }), " ", t(LABEL[tab].add)] })) : null] }), _jsx(Input, { value: q, onChangeText: setQ, placeholder: t(LABEL[tab].typing), "aria-label": t(LABEL[tab].find) }), host.person && kit && !host.admin && LABEL[tab].admin ? (_jsx(SizableText, { size: "$1", color: "$soft", children: t(LABEL[tab].admin) })) : null, tab === 'skills' ? (_jsx(Skills, { ...pane })) : tab === 'connectors' ? (_jsx(Connectors, { ...pane })) : tab === 'plugins' ? (_jsx(Plugins, { ...pane })) : tab === 'bots' ? (_jsx(Agents, { ...pane, mode: "bots" })) : (_jsx(Agents, { ...pane, mode: "agents" }))] }) }));
|
|
89
97
|
}
|
package/lib/nav.js
CHANGED
|
@@ -109,8 +109,8 @@ export function tabs(host, go, t = english) {
|
|
|
109
109
|
const at = r.kind === 'customize' ? r.tab : r.kind === 'agent' ? 'agents' : '';
|
|
110
110
|
return [{ id: 'customize', label: '', links: TABS.map((tab) => ({ id: tab, label: t(TAB_LABEL[tab]), icon: TAB_ICON[tab], onPress: () => go(path({ kind: 'customize', tab })), active: tab === at })) }];
|
|
111
111
|
}
|
|
112
|
-
const TAB_LABEL = { agents: phrase('Agents'), skills: phrase('Skills'), connectors: phrase('Connectors'), plugins: phrase('Plugins') };
|
|
113
|
-
const TAB_ICON = { agents: _jsx(Bot, { size: 16 }), skills: _jsx(BookOpen, { size: 16 }), connectors: _jsx(Plug, { size: 16 }), plugins: _jsx(Puzzle, { size: 16 }) };
|
|
112
|
+
const TAB_LABEL = { agents: phrase('Agents'), bots: phrase('Bots'), skills: phrase('Skills'), connectors: phrase('Connectors'), plugins: phrase('Plugins') };
|
|
113
|
+
const TAB_ICON = { agents: _jsx(Users, { size: 16 }), bots: _jsx(Bot, { size: 16 }), skills: _jsx(BookOpen, { size: 16 }), connectors: _jsx(Plug, { size: 16 }), plugins: _jsx(Puzzle, { size: 16 }) };
|
|
114
114
|
const SECTION_ICON = {
|
|
115
115
|
general: _jsx(Settings, { size: 16 }),
|
|
116
116
|
account: _jsx(User, { size: 16 }),
|
package/lib/route.d.ts
CHANGED
|
@@ -32,8 +32,8 @@ export type Screen = 'artifacts' | 'templates' | 'projects' | 'issues' | 'automa
|
|
|
32
32
|
/** Settings, one section each. Every setting the builder has lives on this page, none elsewhere. */
|
|
33
33
|
export declare const SECTIONS: readonly ['general', 'account', 'privacy', 'billing', 'usage', 'capabilities', 'memory', 'code', 'environments', 'machines', 'keys', 'members', 'integrations', 'notifications'];
|
|
34
34
|
export type Section = (typeof SECTIONS)[number];
|
|
35
|
-
/** Customize, one tab each: what the agent brings to a run, yours and to discover. Agents first. */
|
|
36
|
-
export declare const TABS: readonly ['agents', 'skills', 'connectors', 'plugins'];
|
|
35
|
+
/** Customize, one tab each: what the agent brings to a run, yours and to discover. Agents first, then Bots. */
|
|
36
|
+
export declare const TABS: readonly ['agents', 'bots', 'skills', 'connectors', 'plugins'];
|
|
37
37
|
export type Tab = (typeof TABS)[number];
|
|
38
38
|
export type Route = {
|
|
39
39
|
kind: 'new';
|
package/lib/route.js
CHANGED
|
@@ -15,8 +15,8 @@ export const SECTIONS = [
|
|
|
15
15
|
'integrations',
|
|
16
16
|
'notifications',
|
|
17
17
|
];
|
|
18
|
-
/** Customize, one tab each: what the agent brings to a run, yours and to discover. Agents first. */
|
|
19
|
-
export const TABS = ['agents', 'skills', 'connectors', 'plugins'];
|
|
18
|
+
/** Customize, one tab each: what the agent brings to a run, yours and to discover. Agents first, then Bots. */
|
|
19
|
+
export const TABS = ['agents', 'bots', 'skills', 'connectors', 'plugins'];
|
|
20
20
|
/** The kinds the Library narrows to by address (api/library.ts KIND_IDS, plus `sites`). */
|
|
21
21
|
export const OF = ['image', 'video', 'audio', 'document', 'slides', 'type', 'model', 'code', 'file', 'sites'];
|
|
22
22
|
export const SESSION = /^sess_[0-9a-f]{32}$/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/build",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.112",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"description": "Hanzo Build — say what you want, watch it built, deployed and running. The builder as a component, mounted by the Hanzo app at hanzo.ai.",
|