@useavalon/caelence-agent 0.2.4-canary.0 → 0.2.5-canary.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/README.md +1 -1
- package/brand/previews/desktop-chat.png +0 -0
- package/brand/previews/desktop-commands.png +0 -0
- package/brand/previews/desktop-integrations.png +0 -0
- package/brand/previews/desktop-skills.png +0 -0
- package/desktop/src/DeskToggle.tsx +28 -0
- package/desktop/src/FilesPanel.tsx +3 -1
- package/desktop/src/IntegrationsPanel.tsx +14 -33
- package/desktop/src/MemoryPanel.tsx +12 -7
- package/desktop/src/SessionsPanel.tsx +3 -1
- package/desktop/src/SkillsPanel.tsx +19 -50
- package/desktop/src/app.css +66 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ export OPENROUTER_API_KEY=…
|
|
|
36
36
|
bunx --bun @useavalon/caelence-agent
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
`bun add -g @useavalon/caelence-agent` installs the short names `caelence` and `caelence desktop`.
|
|
39
|
+
`bun add -g @useavalon/caelence-agent` installs the short names `caelence` and `caelence desktop`.
|
|
40
40
|
|
|
41
41
|
## Config
|
|
42
42
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactElement } from "react";
|
|
2
|
+
|
|
3
|
+
export function DeskToggle(
|
|
4
|
+
props: Readonly<{
|
|
5
|
+
checked: boolean;
|
|
6
|
+
pending?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
label: string;
|
|
9
|
+
onChange: (checked: boolean) => void;
|
|
10
|
+
}>,
|
|
11
|
+
): ReactElement {
|
|
12
|
+
return (
|
|
13
|
+
<button
|
|
14
|
+
type="button"
|
|
15
|
+
role="switch"
|
|
16
|
+
className={`desk-toggle${props.checked ? " is-on" : ""}${props.pending ? " is-pending" : ""}`}
|
|
17
|
+
aria-checked={props.checked}
|
|
18
|
+
aria-busy={props.pending ?? false}
|
|
19
|
+
aria-label={props.label}
|
|
20
|
+
disabled={props.pending || props.disabled}
|
|
21
|
+
onClick={() => props.onChange(!props.checked)}
|
|
22
|
+
>
|
|
23
|
+
<span className="desk-toggle__thumb" aria-hidden="true">
|
|
24
|
+
{props.pending ? <span className="cel-chip__spin" /> : null}
|
|
25
|
+
</span>
|
|
26
|
+
</button>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FolderSimpleIcon } from "@phosphor-icons/react/dist/csr/FolderSimple";
|
|
2
|
+
import { TrashIcon } from "@phosphor-icons/react/dist/csr/Trash";
|
|
2
3
|
import { type ReactElement, useEffect, useState } from "react";
|
|
3
4
|
import { pruneSelected, toggleOne, toggleVisible } from "./session-select";
|
|
4
5
|
|
|
@@ -69,9 +70,10 @@ export function FilesPanel(
|
|
|
69
70
|
type="button"
|
|
70
71
|
className="cel-btn cel-btn--danger cel-btn--compact"
|
|
71
72
|
disabled={selected.size === 0 || removing}
|
|
73
|
+
aria-label={selected.size > 1 ? `Delete ${selected.size} files` : "Delete file"}
|
|
72
74
|
onClick={deleteSelected}
|
|
73
75
|
>
|
|
74
|
-
|
|
76
|
+
<TrashIcon size={16} weight="regular" aria-hidden="true" />
|
|
75
77
|
</button>
|
|
76
78
|
</div>
|
|
77
79
|
<ul className="desk-integration-list">
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CheckIcon } from "@phosphor-icons/react/dist/csr/Check";
|
|
2
1
|
import { useEffect, useState } from "react";
|
|
3
2
|
import { errorMessage } from "../../src/core/errors";
|
|
4
3
|
import {
|
|
@@ -8,51 +7,32 @@ import {
|
|
|
8
7
|
getIntegrations,
|
|
9
8
|
type PublicIntegration,
|
|
10
9
|
} from "./api";
|
|
10
|
+
import { DeskToggle } from "./DeskToggle";
|
|
11
11
|
import type { ShowNotice } from "./desk-types";
|
|
12
12
|
import { integrationMatches } from "./integration-search";
|
|
13
13
|
import { McpPanel } from "./McpPanel";
|
|
14
14
|
|
|
15
15
|
export function IntegrationActions(
|
|
16
16
|
props: Readonly<{
|
|
17
|
+
label: string;
|
|
17
18
|
pending: boolean;
|
|
18
19
|
connected: boolean;
|
|
19
20
|
onConnect: () => void;
|
|
20
21
|
onDisconnect: () => void;
|
|
21
22
|
}>,
|
|
22
23
|
): React.ReactElement {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<span className="desk-integration-ok">
|
|
26
|
-
<span className="cel-chip__spin" aria-hidden="true" />
|
|
27
|
-
{props.connected ? "Disconnecting" : "Connecting"}
|
|
28
|
-
</span>
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
if (props.connected) {
|
|
32
|
-
return (
|
|
33
|
-
<>
|
|
34
|
-
<span className="desk-integration-ok">
|
|
35
|
-
<CheckIcon size={16} weight="regular" aria-hidden="true" />
|
|
36
|
-
Connected
|
|
37
|
-
</span>
|
|
38
|
-
<button
|
|
39
|
-
type="button"
|
|
40
|
-
className="cel-btn cel-btn--quiet cel-btn--compact"
|
|
41
|
-
onClick={props.onDisconnect}
|
|
42
|
-
>
|
|
43
|
-
Disconnect
|
|
44
|
-
</button>
|
|
45
|
-
</>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
24
|
+
const pendingLabel = props.connected ? "Disconnecting" : "Connecting";
|
|
25
|
+
const idleLabel = props.connected ? `Disconnect ${props.label}` : `Connect ${props.label}`;
|
|
48
26
|
return (
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
<DeskToggle
|
|
28
|
+
checked={props.connected}
|
|
29
|
+
pending={props.pending}
|
|
30
|
+
label={props.pending ? pendingLabel : idleLabel}
|
|
31
|
+
onChange={(next) => {
|
|
32
|
+
if (next) props.onConnect();
|
|
33
|
+
else props.onDisconnect();
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
56
36
|
);
|
|
57
37
|
}
|
|
58
38
|
|
|
@@ -86,6 +66,7 @@ export function IntegrationRow(
|
|
|
86
66
|
</div>
|
|
87
67
|
<div className="desk-integration-actions">
|
|
88
68
|
<IntegrationActions
|
|
69
|
+
label={item.label}
|
|
89
70
|
pending={props.pending}
|
|
90
71
|
connected={item.connected}
|
|
91
72
|
onConnect={props.onConnect}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PushPinIcon } from "@phosphor-icons/react/dist/csr/PushPin";
|
|
2
|
+
import { TrashIcon } from "@phosphor-icons/react/dist/csr/Trash";
|
|
2
3
|
import { type ReactElement, useCallback, useEffect, useState } from "react";
|
|
3
4
|
import { errorMessage } from "../../src/core/errors";
|
|
4
5
|
import { type BridgeClient, getMemory, type PublicMemoryFact, saveMemory } from "./api";
|
|
@@ -70,15 +71,18 @@ export function MemoryPanel(
|
|
|
70
71
|
</div>
|
|
71
72
|
<div className="desk-integration-actions">
|
|
72
73
|
{fact.pinned ? (
|
|
73
|
-
<span className="desk-
|
|
74
|
-
<
|
|
75
|
-
Pinned
|
|
74
|
+
<span className="desk-row-icon desk-row-icon--pinned" title="Pinned">
|
|
75
|
+
<PushPinIcon size={16} weight="fill" aria-hidden="true" />
|
|
76
|
+
<span className="visually-hidden">Pinned</span>
|
|
76
77
|
</span>
|
|
77
78
|
) : (
|
|
78
79
|
<button
|
|
79
80
|
type="button"
|
|
80
|
-
className="cel-btn cel-btn--
|
|
81
|
+
className="cel-btn cel-btn--quiet cel-btn--compact"
|
|
81
82
|
disabled={pendingId === fact.id}
|
|
83
|
+
aria-label={
|
|
84
|
+
fact.scope === "user" ? "Pin to ~/.harness/AGENTS.md" : "Pin to AGENTS.md"
|
|
85
|
+
}
|
|
82
86
|
onClick={() => {
|
|
83
87
|
if (pendingId) return;
|
|
84
88
|
setPendingId(fact.id);
|
|
@@ -103,13 +107,14 @@ export function MemoryPanel(
|
|
|
103
107
|
})();
|
|
104
108
|
}}
|
|
105
109
|
>
|
|
106
|
-
|
|
110
|
+
<PushPinIcon size={16} weight="regular" aria-hidden="true" />
|
|
107
111
|
</button>
|
|
108
112
|
)}
|
|
109
113
|
<button
|
|
110
114
|
type="button"
|
|
111
115
|
className="cel-btn cel-btn--danger cel-btn--compact"
|
|
112
116
|
disabled={pendingId === fact.id}
|
|
117
|
+
aria-label="Delete memory"
|
|
113
118
|
onClick={() => {
|
|
114
119
|
if (pendingId) return;
|
|
115
120
|
setPendingId(fact.id);
|
|
@@ -126,7 +131,7 @@ export function MemoryPanel(
|
|
|
126
131
|
})();
|
|
127
132
|
}}
|
|
128
133
|
>
|
|
129
|
-
|
|
134
|
+
<TrashIcon size={16} weight="regular" aria-hidden="true" />
|
|
130
135
|
</button>
|
|
131
136
|
</div>
|
|
132
137
|
</li>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SortAscendingIcon } from "@phosphor-icons/react/dist/csr/SortAscending";
|
|
2
2
|
import { SortDescendingIcon } from "@phosphor-icons/react/dist/csr/SortDescending";
|
|
3
|
+
import { TrashIcon } from "@phosphor-icons/react/dist/csr/Trash";
|
|
3
4
|
import { type ReactElement, useEffect, useMemo, useState } from "react";
|
|
4
5
|
import type { PickerItem } from "./api";
|
|
5
6
|
import { type SessionSort, sessionMatches, sortSessions } from "./session-search";
|
|
@@ -108,9 +109,10 @@ export function SessionsPanel(
|
|
|
108
109
|
type="button"
|
|
109
110
|
className="cel-btn cel-btn--danger cel-btn--compact"
|
|
110
111
|
disabled={selected.size === 0 || removing}
|
|
112
|
+
aria-label={selected.size > 1 ? `Delete ${selected.size} sessions` : "Delete session"}
|
|
111
113
|
onClick={deleteSelected}
|
|
112
114
|
>
|
|
113
|
-
|
|
115
|
+
<TrashIcon size={16} weight="regular" aria-hidden="true" />
|
|
114
116
|
</button>
|
|
115
117
|
</div>
|
|
116
118
|
{visible.length === 0 ? (
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CheckIcon } from "@phosphor-icons/react/dist/csr/Check";
|
|
2
1
|
import { type ReactElement, useEffect, useMemo, useState } from "react";
|
|
3
2
|
import { errorMessage } from "../../src/core/errors";
|
|
4
3
|
import {
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
type SkillsPage,
|
|
12
11
|
searchSkills,
|
|
13
12
|
} from "./api";
|
|
13
|
+
import { DeskToggle } from "./DeskToggle";
|
|
14
14
|
import type { ShowNotice } from "./desk-types";
|
|
15
15
|
import { formatSkillInstalls, omitCatalogSkill, skillMatches } from "./skill-search";
|
|
16
16
|
|
|
@@ -49,6 +49,14 @@ function skillChangeNotice(
|
|
|
49
49
|
return "Removed";
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
function skillToggleLabel(item: PublicSkill, pending: boolean): string {
|
|
53
|
+
const title = skillTitle(item);
|
|
54
|
+
if (pending) return `${pendingSkillLabel(item.status)} ${title}`;
|
|
55
|
+
if (item.status === "project") return `Disable ${title}`;
|
|
56
|
+
if (item.status === "user") return `Remove ${title}`;
|
|
57
|
+
return `Add ${title}`;
|
|
58
|
+
}
|
|
59
|
+
|
|
52
60
|
function SkillActions(
|
|
53
61
|
props: Readonly<{
|
|
54
62
|
item: PublicSkill;
|
|
@@ -58,56 +66,17 @@ function SkillActions(
|
|
|
58
66
|
}>,
|
|
59
67
|
): ReactElement {
|
|
60
68
|
const { item } = props;
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<span className="desk-integration-ok">
|
|
64
|
-
<span className="cel-chip__spin" aria-hidden="true" />
|
|
65
|
-
{pendingSkillLabel(item.status)}
|
|
66
|
-
</span>
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
if (item.status === "project") {
|
|
70
|
-
return (
|
|
71
|
-
<>
|
|
72
|
-
<span className="desk-integration-ok">
|
|
73
|
-
<CheckIcon size={16} weight="regular" aria-hidden="true" />
|
|
74
|
-
In project
|
|
75
|
-
</span>
|
|
76
|
-
<button
|
|
77
|
-
type="button"
|
|
78
|
-
className="cel-btn cel-btn--quiet cel-btn--compact"
|
|
79
|
-
onClick={props.onRemove}
|
|
80
|
-
>
|
|
81
|
-
Disable
|
|
82
|
-
</button>
|
|
83
|
-
</>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
if (item.status === "user") {
|
|
87
|
-
return (
|
|
88
|
-
<>
|
|
89
|
-
<span className="desk-integration-ok">
|
|
90
|
-
<CheckIcon size={16} weight="regular" aria-hidden="true" />
|
|
91
|
-
Added
|
|
92
|
-
</span>
|
|
93
|
-
<button
|
|
94
|
-
type="button"
|
|
95
|
-
className="cel-btn cel-btn--quiet cel-btn--compact"
|
|
96
|
-
onClick={props.onRemove}
|
|
97
|
-
>
|
|
98
|
-
Remove
|
|
99
|
-
</button>
|
|
100
|
-
</>
|
|
101
|
-
);
|
|
102
|
-
}
|
|
69
|
+
const on = item.status === "user" || item.status === "project";
|
|
103
70
|
return (
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
71
|
+
<DeskToggle
|
|
72
|
+
checked={on}
|
|
73
|
+
pending={props.pending}
|
|
74
|
+
label={skillToggleLabel(item, props.pending)}
|
|
75
|
+
onChange={(next) => {
|
|
76
|
+
if (next) props.onAdd();
|
|
77
|
+
else props.onRemove();
|
|
78
|
+
}}
|
|
79
|
+
/>
|
|
111
80
|
);
|
|
112
81
|
}
|
|
113
82
|
|
package/desktop/src/app.css
CHANGED
|
@@ -1548,8 +1548,8 @@ p.desk-line__caption {
|
|
|
1548
1548
|
}
|
|
1549
1549
|
|
|
1550
1550
|
.desk-platform__action:hover {
|
|
1551
|
-
background: color-mix(in srgb, #fff 10%,
|
|
1552
|
-
color:
|
|
1551
|
+
background: color-mix(in srgb, #fff 10%, var(--desk-term-bar));
|
|
1552
|
+
color: var(--desk-term-ink);
|
|
1553
1553
|
}
|
|
1554
1554
|
|
|
1555
1555
|
.desk-platform__action:focus-visible {
|
|
@@ -2775,6 +2775,70 @@ p.desk-line__caption {
|
|
|
2775
2775
|
flex: none;
|
|
2776
2776
|
}
|
|
2777
2777
|
|
|
2778
|
+
.desk-row-icon {
|
|
2779
|
+
display: inline-grid;
|
|
2780
|
+
place-items: center;
|
|
2781
|
+
width: 28px;
|
|
2782
|
+
height: 28px;
|
|
2783
|
+
flex: none;
|
|
2784
|
+
color: var(--text-secondary);
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
.desk-row-icon--pinned {
|
|
2788
|
+
color: var(--measure);
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
.desk-toggle {
|
|
2792
|
+
position: relative;
|
|
2793
|
+
width: 44px;
|
|
2794
|
+
height: 26px;
|
|
2795
|
+
padding: 0;
|
|
2796
|
+
border: 0;
|
|
2797
|
+
border-radius: var(--r-full);
|
|
2798
|
+
background: var(--line-2);
|
|
2799
|
+
cursor: pointer;
|
|
2800
|
+
flex: none;
|
|
2801
|
+
transition: background 0.18s ease;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
.desk-toggle:focus-visible {
|
|
2805
|
+
outline: 2px solid var(--measure);
|
|
2806
|
+
outline-offset: 2px;
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
.desk-toggle.is-on {
|
|
2810
|
+
background: var(--b-600);
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
.desk-toggle:disabled {
|
|
2814
|
+
opacity: 0.72;
|
|
2815
|
+
cursor: not-allowed;
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
.desk-toggle__thumb {
|
|
2819
|
+
position: absolute;
|
|
2820
|
+
top: 3px;
|
|
2821
|
+
left: 3px;
|
|
2822
|
+
width: 20px;
|
|
2823
|
+
height: 20px;
|
|
2824
|
+
border-radius: var(--r-full);
|
|
2825
|
+
background: #fff;
|
|
2826
|
+
box-shadow: 0 1px 2px rgb(33 34 39 / 16%);
|
|
2827
|
+
transition: transform 0.18s ease;
|
|
2828
|
+
display: grid;
|
|
2829
|
+
place-items: center;
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
.desk-toggle.is-on .desk-toggle__thumb {
|
|
2833
|
+
transform: translateX(18px);
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
.desk-toggle.is-pending .desk-toggle__thumb .cel-chip__spin {
|
|
2837
|
+
width: 10px;
|
|
2838
|
+
height: 10px;
|
|
2839
|
+
border-width: 1.5px;
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2778
2842
|
.desk-integration-ok {
|
|
2779
2843
|
display: inline-flex;
|
|
2780
2844
|
align-items: center;
|
package/package.json
CHANGED