@useavalon/caelence-agent 0.2.0 → 0.2.1-canary.1

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.
Files changed (71) hide show
  1. package/README.md +8 -5
  2. package/desktop/README.md +26 -0
  3. package/desktop/bun.lock +321 -0
  4. package/desktop/index.html +20 -0
  5. package/desktop/package.json +28 -0
  6. package/desktop/scripts/make-icons.ts +105 -0
  7. package/desktop/scripts/run-tauri.ts +40 -0
  8. package/desktop/src/App.tsx +2657 -0
  9. package/desktop/src/ComposerAttach.tsx +111 -0
  10. package/desktop/src/FloatNotice.test.ts +23 -0
  11. package/desktop/src/FloatNotice.tsx +30 -0
  12. package/desktop/src/LogoMark.tsx +37 -0
  13. package/desktop/src/SkillsPanel.tsx +409 -0
  14. package/desktop/src/api.ts +503 -0
  15. package/desktop/src/app.css +1749 -0
  16. package/desktop/src/composer-files.test.ts +46 -0
  17. package/desktop/src/composer-files.ts +135 -0
  18. package/desktop/src/dictation.test.ts +22 -0
  19. package/desktop/src/dictation.ts +59 -0
  20. package/desktop/src/integration-search.test.ts +13 -0
  21. package/desktop/src/integration-search.ts +8 -0
  22. package/desktop/src/main.tsx +43 -0
  23. package/desktop/src/picker-nav.test.ts +27 -0
  24. package/desktop/src/picker-nav.ts +26 -0
  25. package/desktop/src/queue.test.ts +37 -0
  26. package/desktop/src/queue.ts +40 -0
  27. package/desktop/src/rich-text.test.ts +85 -0
  28. package/desktop/src/rich-text.ts +193 -0
  29. package/desktop/src/session-menu.test.ts +19 -0
  30. package/desktop/src/session-menu.ts +12 -0
  31. package/desktop/src/skill-search.test.ts +37 -0
  32. package/desktop/src/skill-search.ts +25 -0
  33. package/desktop/src/stream.test.ts +93 -0
  34. package/desktop/src/stream.ts +197 -0
  35. package/desktop/src/styles/fonts/chivo-mono-latin-ext-wght-normal.woff2 +0 -0
  36. package/desktop/src/styles/fonts/chivo-mono-latin-wght-normal.ttf +0 -0
  37. package/desktop/src/styles/fonts/chivo-mono-latin-wght-normal.woff2 +0 -0
  38. package/desktop/src/styles/fonts/instrument-sans-latin-ext-wght-normal.woff2 +0 -0
  39. package/desktop/src/styles/fonts/instrument-sans-latin-wght-normal.ttf +0 -0
  40. package/desktop/src/styles/fonts/instrument-sans-latin-wght-normal.woff2 +0 -0
  41. package/desktop/src/styles/fonts.css +53 -0
  42. package/desktop/src/styles/primitives.css +600 -0
  43. package/desktop/src/styles/tokens-matte.css +354 -0
  44. package/desktop/src/thought.test.ts +96 -0
  45. package/desktop/src/thought.ts +87 -0
  46. package/desktop/src/tool-label.test.ts +17 -0
  47. package/desktop/src/tool-label.ts +70 -0
  48. package/desktop/src/vite-env.d.ts +15 -0
  49. package/desktop/src-tauri/Cargo.lock +4791 -0
  50. package/desktop/src-tauri/Cargo.toml +21 -0
  51. package/desktop/src-tauri/Entitlements.plist +8 -0
  52. package/desktop/src-tauri/Info.plist +12 -0
  53. package/desktop/src-tauri/build.rs +16 -0
  54. package/desktop/src-tauri/capabilities/default.json +15 -0
  55. package/desktop/src-tauri/icons/128x128.png +0 -0
  56. package/desktop/src-tauri/icons/16x16.png +0 -0
  57. package/desktop/src-tauri/icons/32x32.png +0 -0
  58. package/desktop/src-tauri/icons/henry.w@example.net +0 -0
  59. package/desktop/src-tauri/icons/icon.icns +0 -0
  60. package/desktop/src-tauri/icons/icon.ico +0 -0
  61. package/desktop/src-tauri/icons/icon.png +0 -0
  62. package/desktop/src-tauri/icons/icon.svg +7 -0
  63. package/desktop/src-tauri/permissions/bridge.toml +24 -0
  64. package/desktop/src-tauri/src/main.rs +312 -0
  65. package/desktop/src-tauri/src/mic.rs +216 -0
  66. package/desktop/src-tauri/tauri.conf.json +46 -0
  67. package/desktop/tsconfig.json +21 -0
  68. package/desktop/vite.config.ts +18 -0
  69. package/package.json +5 -4
  70. package/src/cli/main.test.ts +6 -0
  71. package/src/cli/main.ts +5 -2
@@ -0,0 +1,111 @@
1
+ import { FileIcon as FileGlyph } from "@phosphor-icons/react/dist/csr/File";
2
+ import { XIcon } from "@phosphor-icons/react/dist/csr/X";
3
+ import type { AttachmentPreview, ComposerFileKind } from "./composer-files.ts";
4
+ import { fileExtension } from "./composer-files.ts";
5
+
6
+ export function AttachmentThumbs(
7
+ props: Readonly<{
8
+ items: Array<AttachmentPreview & { id?: string }>;
9
+ onRemove?: (index: number) => void;
10
+ variant?: "thumb" | "chat";
11
+ }>,
12
+ ): React.ReactElement | null {
13
+ if (props.items.length === 0) return null;
14
+ if (props.variant === "chat") {
15
+ return (
16
+ <ul className="desk-attach-previews" aria-label="Attached files">
17
+ {props.items.map((item, index) => (
18
+ <li key={item.id ?? `${item.name}-${index}`} className="desk-attach-preview">
19
+ <ChatPreview name={item.name} kind={item.kind} previewUrl={item.previewUrl} />
20
+ </li>
21
+ ))}
22
+ </ul>
23
+ );
24
+ }
25
+ return (
26
+ <ul className="desk-thumbs" aria-label="Attached files">
27
+ {props.items.map((item, index) => (
28
+ <li key={item.id ?? `${item.name}-${index}`} className="desk-thumb" title={item.name}>
29
+ <ThumbPreview name={item.name} kind={item.kind} previewUrl={item.previewUrl} />
30
+ {props.onRemove ? (
31
+ <button
32
+ type="button"
33
+ className="desk-thumb__remove"
34
+ aria-label={`Remove ${item.name}`}
35
+ onClick={() => props.onRemove?.(index)}
36
+ >
37
+ <XIcon size={12} weight="bold" />
38
+ </button>
39
+ ) : null}
40
+ </li>
41
+ ))}
42
+ </ul>
43
+ );
44
+ }
45
+
46
+ function ChatPreview(
47
+ props: Readonly<{
48
+ name: string;
49
+ kind: ComposerFileKind;
50
+ previewUrl?: string;
51
+ }>,
52
+ ): React.ReactElement {
53
+ if (props.kind === "image" && props.previewUrl) {
54
+ return (
55
+ <>
56
+ <img className="desk-preview desk-preview--img" src={props.previewUrl} alt={props.name} />
57
+ <p className="desk-line__caption">{props.name}</p>
58
+ </>
59
+ );
60
+ }
61
+ if (props.kind === "video" && props.previewUrl) {
62
+ return (
63
+ <>
64
+ <video className="desk-preview desk-preview--img" controls src={props.previewUrl}>
65
+ <track kind="captions" srcLang="en" label="Captions" src="data:text/vtt,WEBVTT" />
66
+ </video>
67
+ <p className="desk-line__caption">{props.name}</p>
68
+ </>
69
+ );
70
+ }
71
+ return (
72
+ <span className="desk-attach-file">
73
+ <FileGlyph size={16} weight="regular" aria-hidden="true" />
74
+ <em>{fileExtension(props.name)}</em>
75
+ <span>{props.name}</span>
76
+ </span>
77
+ );
78
+ }
79
+
80
+ function ThumbPreview(
81
+ props: Readonly<{
82
+ name: string;
83
+ kind: ComposerFileKind;
84
+ previewUrl?: string;
85
+ }>,
86
+ ): React.ReactElement {
87
+ if (props.kind === "image" && props.previewUrl) {
88
+ return <img className="desk-thumb__media" src={props.previewUrl} alt={props.name} />;
89
+ }
90
+ if (props.kind === "video" && props.previewUrl) {
91
+ return (
92
+ <video
93
+ className="desk-thumb__media"
94
+ src={props.previewUrl}
95
+ muted
96
+ playsInline
97
+ preload="metadata"
98
+ aria-label={props.name}
99
+ >
100
+ <track kind="captions" srcLang="en" label="Captions" src="data:text/vtt,WEBVTT" />
101
+ </video>
102
+ );
103
+ }
104
+ return (
105
+ <span className="desk-thumb__file">
106
+ <FileGlyph size={16} weight="regular" aria-hidden="true" />
107
+ <em>{fileExtension(props.name)}</em>
108
+ <span>{props.name}</span>
109
+ </span>
110
+ );
111
+ }
@@ -0,0 +1,23 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { createElement } from "react";
3
+ import { renderToStaticMarkup } from "react-dom/server";
4
+ import { FloatNotice, NOTICE_MS } from "./FloatNotice.tsx";
5
+
6
+ describe("FloatNotice", () => {
7
+ test("drains on the same interval as the product notice", () => {
8
+ expect(NOTICE_MS).toBe(4000);
9
+ });
10
+
11
+ test("shows the line and a dismiss control without taking document flow", () => {
12
+ const html = renderToStaticMarkup(
13
+ createElement(FloatNotice, {
14
+ text: "Figma desktop MCP is not running",
15
+ onDismiss: () => undefined,
16
+ }),
17
+ );
18
+ expect(html).toContain("Figma desktop MCP is not running");
19
+ expect(html).toContain('aria-label="Dismiss"');
20
+ expect(html).toContain("<output");
21
+ expect(html).toContain("desk-notice");
22
+ });
23
+ });
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Short overlay at the top of the main pane. Dismiss with the close control
3
+ * or wait for the timer bar to run out. Matches the builder FloatNotice.
4
+ */
5
+
6
+ import { XIcon } from "@phosphor-icons/react/dist/csr/X";
7
+ import { useEffect } from "react";
8
+
9
+ export const NOTICE_MS = 4000;
10
+
11
+ export function FloatNotice(
12
+ props: Readonly<{ text: string; onDismiss: () => void }>,
13
+ ): React.ReactElement {
14
+ const { text, onDismiss } = props;
15
+ useEffect(() => {
16
+ const id = window.setTimeout(onDismiss, NOTICE_MS);
17
+ return () => window.clearTimeout(id);
18
+ }, [onDismiss]);
19
+ return (
20
+ <output className="desk-notice cel-float">
21
+ <span className="desk-notice__label">{text}</span>
22
+ <button type="button" className="desk-notice__close" aria-label="Dismiss" onClick={onDismiss}>
23
+ <XIcon size={16} weight="regular" />
24
+ </button>
25
+ <span className="desk-notice__timer" aria-hidden="true">
26
+ <span className="desk-notice__bar" style={{ animationDuration: `${NOTICE_MS}ms` }} />
27
+ </span>
28
+ </output>
29
+ );
30
+ }
@@ -0,0 +1,37 @@
1
+ import type { SVGAttributes } from "react";
2
+
3
+ /** Agent app mark: dark field, paper leaves. `brand/logo/favicon-agent-bg-32.svg`. */
4
+ export function LogoMark({
5
+ size = 20,
6
+ ...props
7
+ }: SVGAttributes<SVGSVGElement> & { size?: number }): React.ReactElement {
8
+ return (
9
+ <svg
10
+ width={size}
11
+ height={size}
12
+ viewBox="0 0 32 32"
13
+ fill="none"
14
+ aria-hidden
15
+ role="presentation"
16
+ {...props}
17
+ >
18
+ <rect width="32" height="32" rx="5" fill="#212227" />
19
+ <path
20
+ d="M6.50197 14.8776C6.47382 15.2812 6.80456 15.6104 7.20916 15.6104H16.0006V6C10.793 6 6.85251 9.85089 6.50197 14.8776Z"
21
+ fill="#FDFCF8"
22
+ />
23
+ <path
24
+ d="M25.4948 6.73255C25.5275 6.32926 25.1964 5.99998 24.7918 5.99998H16.0003V15.6104C20.5445 15.6104 25.0877 11.7593 25.4948 6.73255Z"
25
+ fill="#FDFCF8"
26
+ />
27
+ <path
28
+ d="M6.50197 18.1224C6.47382 17.7188 6.80456 17.3896 7.20916 17.3896H16.0006V27C10.793 27 6.85251 23.1491 6.50197 18.1224Z"
29
+ fill="#FDFCF8"
30
+ />
31
+ <path
32
+ d="M25.4948 26.2675C25.5275 26.6707 25.1964 27 24.7918 27H16.0003V17.3896C20.5445 17.3896 25.0877 21.2407 25.4948 26.2675Z"
33
+ fill="#FDFCF8"
34
+ />
35
+ </svg>
36
+ );
37
+ }
@@ -0,0 +1,409 @@
1
+ import { CheckIcon } from "@phosphor-icons/react/dist/csr/Check";
2
+ import { type ReactElement, useEffect, useMemo, useState } from "react";
3
+ import { errorMessage } from "../../src/core/errors";
4
+ import {
5
+ addSkill,
6
+ type BridgeClient,
7
+ getPopularSkills,
8
+ getSkills,
9
+ type PublicSkill,
10
+ removeSkill,
11
+ type SkillsPage,
12
+ searchSkills,
13
+ } from "./api";
14
+ import { formatSkillInstalls, omitCatalogSkill, skillMatches } from "./skill-search";
15
+
16
+ function skillTitle(item: PublicSkill): string {
17
+ return item.name;
18
+ }
19
+
20
+ function skillGlyph(item: PublicSkill): string {
21
+ const letters = skillTitle(item)
22
+ .replace(/[^a-zA-Z0-9]/g, "")
23
+ .slice(0, 2);
24
+ return letters.toUpperCase() || "SK";
25
+ }
26
+
27
+ function skillDetail(item: PublicSkill): string {
28
+ if (item.origin === "bundled") {
29
+ return item.description || "Bundled with the app";
30
+ }
31
+ const installs =
32
+ item.installs !== undefined ? `${formatSkillInstalls(item.installs)} installs` : "";
33
+ return [item.source, item.description, installs].filter(Boolean).join(" · ");
34
+ }
35
+
36
+ function pendingSkillLabel(status: PublicSkill["status"]): string {
37
+ if (status === "user") return "Removing";
38
+ if (status === "project") return "Disabling";
39
+ return "Adding";
40
+ }
41
+
42
+ function SkillActions(
43
+ props: Readonly<{
44
+ item: PublicSkill;
45
+ pending: boolean;
46
+ onAdd: () => void;
47
+ onRemove: () => void;
48
+ }>,
49
+ ): ReactElement {
50
+ const { item } = props;
51
+ if (props.pending) {
52
+ return (
53
+ <span className="desk-integration-ok">
54
+ <span className="cel-chip__spin" aria-hidden="true" />
55
+ {pendingSkillLabel(item.status)}
56
+ </span>
57
+ );
58
+ }
59
+ if (item.status === "project") {
60
+ return (
61
+ <>
62
+ <span className="desk-integration-ok">
63
+ <CheckIcon size={16} weight="regular" aria-hidden="true" />
64
+ In project
65
+ </span>
66
+ <button
67
+ type="button"
68
+ className="cel-btn cel-btn--quiet cel-btn--compact"
69
+ onClick={props.onRemove}
70
+ >
71
+ Disable
72
+ </button>
73
+ </>
74
+ );
75
+ }
76
+ if (item.status === "user") {
77
+ return (
78
+ <>
79
+ <span className="desk-integration-ok">
80
+ <CheckIcon size={16} weight="regular" aria-hidden="true" />
81
+ Added
82
+ </span>
83
+ <button
84
+ type="button"
85
+ className="cel-btn cel-btn--quiet cel-btn--compact"
86
+ onClick={props.onRemove}
87
+ >
88
+ Remove
89
+ </button>
90
+ </>
91
+ );
92
+ }
93
+ return (
94
+ <button
95
+ type="button"
96
+ className="cel-btn cel-btn--secondary cel-btn--compact"
97
+ onClick={props.onAdd}
98
+ >
99
+ Add
100
+ </button>
101
+ );
102
+ }
103
+
104
+ function SkillRow(
105
+ props: Readonly<{
106
+ item: PublicSkill;
107
+ pending: boolean;
108
+ onAdd: () => void;
109
+ onRemove: () => void;
110
+ }>,
111
+ ): ReactElement {
112
+ const { item } = props;
113
+ return (
114
+ <li>
115
+ <span className="desk-integration-glyph desk-integration-mark">{skillGlyph(item)}</span>
116
+ <div>
117
+ <p>{skillTitle(item)}</p>
118
+ <em>{skillDetail(item)}</em>
119
+ </div>
120
+ <div className="desk-integration-actions">
121
+ <SkillActions
122
+ item={item}
123
+ pending={props.pending}
124
+ onAdd={props.onAdd}
125
+ onRemove={props.onRemove}
126
+ />
127
+ </div>
128
+ </li>
129
+ );
130
+ }
131
+
132
+ function SkillsRemoteBlock(
133
+ props: Readonly<{
134
+ searching: boolean;
135
+ query: string;
136
+ remote: PublicSkill[] | null;
137
+ remoteVisible: PublicSkill[];
138
+ popular: PublicSkill[];
139
+ pendingId: string | null;
140
+ onAdd: (id: string) => void;
141
+ onRemove: (id: string) => void;
142
+ }>,
143
+ ): ReactElement | null {
144
+ if (props.searching) {
145
+ if (props.remote === null) {
146
+ return <p className="desk-side-empty">Searching skills.sh</p>;
147
+ }
148
+ if (props.remoteVisible.length === 0) return null;
149
+ return (
150
+ <>
151
+ <div className="desk-integration-split">
152
+ <p>skills.sh</p>
153
+ <em>Matches for “{props.query.trim()}”.</em>
154
+ </div>
155
+ <SkillList
156
+ items={props.remoteVisible}
157
+ pendingId={props.pendingId}
158
+ onAdd={props.onAdd}
159
+ onRemove={props.onRemove}
160
+ />
161
+ </>
162
+ );
163
+ }
164
+ if (props.popular.length === 0) return null;
165
+ return (
166
+ <>
167
+ <div className="desk-integration-split">
168
+ <p>Popular on skills.sh</p>
169
+ <em>A short cached list. Type in the search bar to find more.</em>
170
+ </div>
171
+ <SkillList
172
+ items={props.popular}
173
+ pendingId={props.pendingId}
174
+ onAdd={props.onAdd}
175
+ onRemove={props.onRemove}
176
+ />
177
+ </>
178
+ );
179
+ }
180
+
181
+ function SkillList(
182
+ props: Readonly<{
183
+ items: PublicSkill[];
184
+ pendingId: string | null;
185
+ onAdd: (id: string) => void;
186
+ onRemove: (id: string) => void;
187
+ }>,
188
+ ): ReactElement | null {
189
+ if (props.items.length === 0) return null;
190
+ return (
191
+ <ul className="desk-integration-list">
192
+ {props.items.map((item) => (
193
+ <SkillRow
194
+ key={item.id}
195
+ item={item}
196
+ pending={props.pendingId === item.id}
197
+ onAdd={() => props.onAdd(item.id)}
198
+ onRemove={() => props.onRemove(item.id)}
199
+ />
200
+ ))}
201
+ </ul>
202
+ );
203
+ }
204
+
205
+ export function SkillsPanel(
206
+ props: Readonly<{
207
+ bridge: BridgeClient;
208
+ query: string;
209
+ onQuery: (value: string) => void;
210
+ onNotice: (text: string) => void;
211
+ }>,
212
+ ): ReactElement {
213
+ const [page, setPage] = useState<SkillsPage | null>(null);
214
+ const [remote, setRemote] = useState<PublicSkill[] | null>(null);
215
+ const [loadFailed, setLoadFailed] = useState(false);
216
+ const [pendingId, setPendingId] = useState<string | null>(null);
217
+ const searching = props.query.trim().length >= 2;
218
+
219
+ useEffect(() => {
220
+ let alive = true;
221
+ let popular: PublicSkill[] | null = null;
222
+ void getSkills(props.bridge)
223
+ .then((result) => {
224
+ if (!alive) return;
225
+ setPage(popular ? { ...result, popular } : result);
226
+ })
227
+ .catch((err: unknown) => {
228
+ if (!alive) return;
229
+ setLoadFailed(true);
230
+ props.onNotice(errorMessage(err));
231
+ });
232
+ void getPopularSkills(props.bridge)
233
+ .then((result) => {
234
+ if (!alive) return;
235
+ popular = result.popular;
236
+ setPage((current) => (current ? { ...current, popular: result.popular } : current));
237
+ })
238
+ .catch(() => {
239
+ // Seed/cached popular from GET /skills is enough.
240
+ });
241
+ return () => {
242
+ alive = false;
243
+ };
244
+ }, [props.bridge, props.onNotice]);
245
+
246
+ useEffect(() => {
247
+ if (!searching) {
248
+ setRemote(null);
249
+ return;
250
+ }
251
+ const q = props.query.trim();
252
+ let alive = true;
253
+ const timer = window.setTimeout(() => {
254
+ void searchSkills(props.bridge, q)
255
+ .then((result) => {
256
+ if (alive) setRemote(result.items);
257
+ })
258
+ .catch((err: unknown) => {
259
+ if (!alive) return;
260
+ props.onNotice(errorMessage(err));
261
+ });
262
+ }, 250);
263
+ return () => {
264
+ alive = false;
265
+ window.clearTimeout(timer);
266
+ };
267
+ }, [props.bridge, props.onNotice, props.query, searching]);
268
+
269
+ const applyPage = (next: SkillsPage) => {
270
+ setPage(next);
271
+ if (!searching) return;
272
+ const byId = new Map(
273
+ [...next.bundled, ...next.popular, ...next.loaded].map((item) => [item.id, item]),
274
+ );
275
+ setRemote((current) => (current ?? []).map((item) => byId.get(item.id) ?? item));
276
+ };
277
+
278
+ const run = async (id: string, action: "add" | "remove"): Promise<void> => {
279
+ setPendingId(id);
280
+ try {
281
+ const result =
282
+ action === "add" ? await addSkill(props.bridge, id) : await removeSkill(props.bridge, id);
283
+ applyPage(result);
284
+ } catch (err) {
285
+ props.onNotice(errorMessage(err));
286
+ if (action === "add") {
287
+ setRemote((current) => (current ? omitCatalogSkill(current, id) : current));
288
+ setPage((current) =>
289
+ current
290
+ ? {
291
+ ...current,
292
+ popular: omitCatalogSkill(current.popular, id),
293
+ loaded: omitCatalogSkill(current.loaded, id),
294
+ }
295
+ : current,
296
+ );
297
+ }
298
+ } finally {
299
+ setPendingId(null);
300
+ }
301
+ };
302
+
303
+ const bundled = useMemo(
304
+ () => (page?.bundled ?? []).filter((item) => skillMatches(item, props.query)),
305
+ [page, props.query],
306
+ );
307
+ const popular = useMemo(
308
+ () => (page?.popular ?? []).filter((item) => skillMatches(item, props.query)),
309
+ [page, props.query],
310
+ );
311
+ const loaded = useMemo(
312
+ () => (page?.loaded ?? []).filter((item) => skillMatches(item, props.query)),
313
+ [page, props.query],
314
+ );
315
+ const remoteVisible = useMemo(() => {
316
+ if (!remote) return [];
317
+ const seen = new Set([...bundled, ...popular].map((item) => item.id));
318
+ return remote.filter((item) => !seen.has(item.id));
319
+ }, [bundled, popular, remote]);
320
+
321
+ if (!page && !loadFailed) {
322
+ return (
323
+ <div className="desk-integrations">
324
+ <p>Loading skills</p>
325
+ </div>
326
+ );
327
+ }
328
+
329
+ if (!page && loadFailed) {
330
+ return (
331
+ <div className="desk-integrations">
332
+ <p className="desk-side-empty">Skills could not be loaded</p>
333
+ </div>
334
+ );
335
+ }
336
+
337
+ const emptySearch =
338
+ searching &&
339
+ remote !== null &&
340
+ bundled.length === 0 &&
341
+ remoteVisible.length === 0 &&
342
+ loaded.length === 0;
343
+
344
+ return (
345
+ <div className="desk-integrations">
346
+ <p className="desk-integrations-lead">
347
+ Instruction files the agent reads when a task matches. Bundled skills stay off until you add
348
+ them. Disable a project skill to keep it out of the prompt without deleting the file.
349
+ </p>
350
+ <label className="desk-field">
351
+ <span className="visually-hidden">Search skills</span>
352
+ <input
353
+ className="cel-input"
354
+ value={props.query}
355
+ placeholder="Search skills.sh"
356
+ onChange={(event) => props.onQuery(event.target.value)}
357
+ />
358
+ </label>
359
+ {emptySearch ? (
360
+ <p className="desk-side-empty">No skills match</p>
361
+ ) : (
362
+ <>
363
+ {!searching && loaded.length > 0 ? (
364
+ <>
365
+ <div className="desk-integration-split">
366
+ <p>Added</p>
367
+ <em>Installed for your user. Remove takes them out of ~/.harness/skills.</em>
368
+ </div>
369
+ <SkillList
370
+ items={loaded}
371
+ pendingId={pendingId}
372
+ onAdd={(id) => void run(id, "add")}
373
+ onRemove={(id) => void run(id, "remove")}
374
+ />
375
+ </>
376
+ ) : null}
377
+ {bundled.length > 0 ? (
378
+ <>
379
+ {searching ? null : (
380
+ <div className="desk-integration-split">
381
+ <p>Bundled</p>
382
+ <em>
383
+ Shipped with Caelence. Off until you add them; they do not start in the prompt.
384
+ </em>
385
+ </div>
386
+ )}
387
+ <SkillList
388
+ items={bundled}
389
+ pendingId={pendingId}
390
+ onAdd={(id) => void run(id, "add")}
391
+ onRemove={(id) => void run(id, "remove")}
392
+ />
393
+ </>
394
+ ) : null}
395
+ <SkillsRemoteBlock
396
+ searching={searching}
397
+ query={props.query}
398
+ remote={remote}
399
+ remoteVisible={remoteVisible}
400
+ popular={popular}
401
+ pendingId={pendingId}
402
+ onAdd={(id) => void run(id, "add")}
403
+ onRemove={(id) => void run(id, "remove")}
404
+ />
405
+ </>
406
+ )}
407
+ </div>
408
+ );
409
+ }