claudity 1.0.0 → 1.2.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/install.sh +55 -12
- package/package.json +1 -1
- package/public/css/style.css +124 -10
- package/public/index.html +25 -7
- package/public/js/app.js +146 -24
- package/setup.sh +1 -1
- package/src/db.js +22 -2
- package/src/index.js +17 -1
- package/src/routes/api.js +41 -7
- package/src/services/auth.js +26 -3
- package/src/services/chat.js +93 -55
- package/src/services/claude.js +173 -53
- package/src/services/connections.js +1 -1
- package/src/services/discord.js +30 -7
- package/src/services/imessage.js +12 -3
- package/src/services/memory.js +2 -2
- package/src/services/signal.js +12 -4
- package/src/services/slack.js +33 -5
- package/src/services/telegram.js +31 -5
- package/src/services/tools.js +8 -19
- package/src/services/whatsapp.js +17 -7
- package/src/services/workspace.js +7 -7
package/install.sh
CHANGED
|
@@ -136,7 +136,7 @@ if xcode-select -p &>/dev/null; then
|
|
|
136
136
|
ok "already installed"
|
|
137
137
|
else
|
|
138
138
|
xcode-select --install 2>/dev/null || true
|
|
139
|
-
warn "a dialog may appear
|
|
139
|
+
warn "a dialog may appear - click install and wait"
|
|
140
140
|
elapsed=0
|
|
141
141
|
timeout=1800
|
|
142
142
|
chars="⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"
|
|
@@ -210,7 +210,7 @@ fi
|
|
|
210
210
|
|
|
211
211
|
step "downloading claudity"
|
|
212
212
|
INSTALL_DIR="$HOME/claudity"
|
|
213
|
-
REPO_URL="https://github.com/
|
|
213
|
+
REPO_URL="https://github.com/claudity/claudity.git"
|
|
214
214
|
if [ -d "$INSTALL_DIR/.git" ]; then
|
|
215
215
|
spin "updating claudity" git -C "$INSTALL_DIR" pull --ff-only
|
|
216
216
|
elif [ -d "$INSTALL_DIR" ]; then
|
|
@@ -256,7 +256,7 @@ else
|
|
|
256
256
|
warn "no authentication found"
|
|
257
257
|
echo ""
|
|
258
258
|
echo -e " ${green}1${reset}) run ${green}claude login${reset} now ${dim}(recommended)${reset}"
|
|
259
|
-
echo -e " ${green}2${reset}) skip
|
|
259
|
+
echo -e " ${green}2${reset}) skip - configure later via web ui"
|
|
260
260
|
echo ""
|
|
261
261
|
echo -en " choice ${dim}[1/2]${reset}: "
|
|
262
262
|
read -r auth_choice </dev/tty
|
|
@@ -270,10 +270,10 @@ else
|
|
|
270
270
|
if [ -n "$KEYCHAIN_CREDS" ]; then
|
|
271
271
|
ok "authenticated successfully"
|
|
272
272
|
else
|
|
273
|
-
warn "credentials not detected
|
|
273
|
+
warn "credentials not detected - you can authenticate later"
|
|
274
274
|
fi
|
|
275
275
|
else
|
|
276
|
-
info "skipped
|
|
276
|
+
info "skipped - authenticate at http://localhost:6767"
|
|
277
277
|
fi
|
|
278
278
|
fi
|
|
279
279
|
fi
|
|
@@ -322,15 +322,57 @@ fi
|
|
|
322
322
|
echo ""
|
|
323
323
|
info "for signal support: ${green}brew install signal-cli${reset}"
|
|
324
324
|
|
|
325
|
-
step "
|
|
326
|
-
|
|
327
|
-
|
|
325
|
+
step "setting up auto-start"
|
|
326
|
+
PLIST_NAME="ai.claudity.server"
|
|
327
|
+
PLIST_PATH="$HOME/Library/LaunchAgents/${PLIST_NAME}.plist"
|
|
328
|
+
NODE_PATH="$(which node)"
|
|
329
|
+
CLAUDE_PATH="$(which claude 2>/dev/null || echo "")"
|
|
330
|
+
mkdir -p "$INSTALL_DIR/data"
|
|
331
|
+
|
|
332
|
+
PLIST_PATH_DIRS="/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin"
|
|
333
|
+
[ -n "$NODE_PATH" ] && PLIST_PATH_DIRS="$(dirname "$NODE_PATH"):${PLIST_PATH_DIRS}"
|
|
334
|
+
[ -n "$CLAUDE_PATH" ] && PLIST_PATH_DIRS="$(dirname "$CLAUDE_PATH"):${PLIST_PATH_DIRS}"
|
|
335
|
+
|
|
336
|
+
launchctl bootout "gui/$(id -u)/${PLIST_NAME}" 2>/dev/null || true
|
|
337
|
+
|
|
338
|
+
cat > "$PLIST_PATH" <<PLIST
|
|
339
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
340
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
341
|
+
<plist version="1.0">
|
|
342
|
+
<dict>
|
|
343
|
+
<key>Label</key>
|
|
344
|
+
<string>${PLIST_NAME}</string>
|
|
345
|
+
<key>ProgramArguments</key>
|
|
346
|
+
<array>
|
|
347
|
+
<string>${NODE_PATH}</string>
|
|
348
|
+
<string>${INSTALL_DIR}/src/index.js</string>
|
|
349
|
+
</array>
|
|
350
|
+
<key>WorkingDirectory</key>
|
|
351
|
+
<string>${INSTALL_DIR}</string>
|
|
352
|
+
<key>RunAtLoad</key>
|
|
353
|
+
<true/>
|
|
354
|
+
<key>KeepAlive</key>
|
|
355
|
+
<true/>
|
|
356
|
+
<key>StandardOutPath</key>
|
|
357
|
+
<string>${INSTALL_DIR}/data/claudity.log</string>
|
|
358
|
+
<key>StandardErrorPath</key>
|
|
359
|
+
<string>${INSTALL_DIR}/data/claudity.log</string>
|
|
360
|
+
<key>EnvironmentVariables</key>
|
|
361
|
+
<dict>
|
|
362
|
+
<key>PATH</key>
|
|
363
|
+
<string>${PLIST_PATH_DIRS}</string>
|
|
364
|
+
</dict>
|
|
365
|
+
</dict>
|
|
366
|
+
</plist>
|
|
367
|
+
PLIST
|
|
368
|
+
|
|
369
|
+
launchctl bootstrap "gui/$(id -u)" "$PLIST_PATH" 2>/dev/null || launchctl load "$PLIST_PATH" 2>/dev/null
|
|
328
370
|
sleep 2
|
|
329
371
|
|
|
330
|
-
if
|
|
331
|
-
ok "claudity is running"
|
|
372
|
+
if curl -sf http://localhost:6767/api/auth/status >/dev/null 2>&1; then
|
|
373
|
+
ok "claudity is running and will restart automatically"
|
|
332
374
|
else
|
|
333
|
-
warn "
|
|
375
|
+
warn "service loaded but server not responding yet - check ~/claudity/data/claudity.log"
|
|
334
376
|
fi
|
|
335
377
|
|
|
336
378
|
boxlines \
|
|
@@ -338,6 +380,7 @@ boxlines \
|
|
|
338
380
|
"" \
|
|
339
381
|
"${green}http://localhost:6767${reset}" \
|
|
340
382
|
"" \
|
|
341
|
-
"${dim}
|
|
383
|
+
"${dim}claudity starts automatically on login${reset}" \
|
|
384
|
+
"${dim}logs: ~/claudity/data/claudity.log${reset}"
|
|
342
385
|
|
|
343
386
|
echo ""
|
package/package.json
CHANGED
package/public/css/style.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'berkeley';
|
|
3
3
|
src: url('../font/berkeley.woff2') format('woff2');
|
|
4
|
-
font-weight:
|
|
4
|
+
font-weight: 100 900;
|
|
5
5
|
font-style: normal;
|
|
6
6
|
font-display: swap;
|
|
7
7
|
}
|
|
@@ -67,7 +67,6 @@ html, body {
|
|
|
67
67
|
|
|
68
68
|
body {
|
|
69
69
|
font-family: 'berkeley', monospace;
|
|
70
|
-
-webkit-text-stroke: 0px;
|
|
71
70
|
background: var(--black);
|
|
72
71
|
color: var(--white);
|
|
73
72
|
display: grid;
|
|
@@ -114,7 +113,7 @@ nav[aria-label="agents"] header {
|
|
|
114
113
|
|
|
115
114
|
nav[aria-label="agents"] header h1 {
|
|
116
115
|
font-size: 14px;
|
|
117
|
-
-
|
|
116
|
+
font-weight: 600;
|
|
118
117
|
color: var(--accent);
|
|
119
118
|
letter-spacing: 0.05em;
|
|
120
119
|
display: flex;
|
|
@@ -124,7 +123,7 @@ nav[aria-label="agents"] header h1 {
|
|
|
124
123
|
|
|
125
124
|
nav[aria-label="agents"] header h1 span {
|
|
126
125
|
font-size: 9px;
|
|
127
|
-
-
|
|
126
|
+
font-weight: normal;
|
|
128
127
|
color: var(--accent);
|
|
129
128
|
letter-spacing: 0.06em;
|
|
130
129
|
background: rgba(var(--glow), 0.1);
|
|
@@ -366,6 +365,16 @@ section[aria-label="empty"] p {
|
|
|
366
365
|
font-size: 12px;
|
|
367
366
|
}
|
|
368
367
|
|
|
368
|
+
section[aria-label="empty"] a {
|
|
369
|
+
color: var(--accent);
|
|
370
|
+
text-decoration: none;
|
|
371
|
+
cursor: pointer;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
section[aria-label="empty"] a:hover {
|
|
375
|
+
text-decoration: underline;
|
|
376
|
+
}
|
|
377
|
+
|
|
369
378
|
section[aria-label="setup"] pre {
|
|
370
379
|
background: var(--bg-raised);
|
|
371
380
|
border: 1px solid var(--muted);
|
|
@@ -611,7 +620,7 @@ div[aria-label="messages"] > div[data-role="assistant"] > .msg-body p:last-child
|
|
|
611
620
|
}
|
|
612
621
|
|
|
613
622
|
div[aria-label="messages"] > div[data-role="assistant"] > .msg-body strong {
|
|
614
|
-
-
|
|
623
|
+
font-weight: 600;
|
|
615
624
|
}
|
|
616
625
|
|
|
617
626
|
div[aria-label="messages"] > div[data-role="assistant"] > .msg-body strong a {
|
|
@@ -744,10 +753,110 @@ div[aria-label="messages"] > div[data-activity] [data-thinking] {
|
|
|
744
753
|
opacity: 0.85;
|
|
745
754
|
}
|
|
746
755
|
|
|
756
|
+
div[aria-label="messages"] > div[data-activity] [data-activity-row] {
|
|
757
|
+
display: flex;
|
|
758
|
+
align-items: center;
|
|
759
|
+
gap: 8px;
|
|
760
|
+
margin-top: 4px;
|
|
761
|
+
}
|
|
762
|
+
|
|
747
763
|
div[aria-label="messages"] > div[data-activity] [data-status] {
|
|
748
764
|
color: var(--muted);
|
|
749
765
|
font-size: 11px;
|
|
750
|
-
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
div[aria-label="messages"] > div[data-activity] [data-stop] {
|
|
769
|
+
background: transparent;
|
|
770
|
+
border: 1px solid var(--bg-hover);
|
|
771
|
+
color: var(--muted);
|
|
772
|
+
font-family: inherit;
|
|
773
|
+
font-size: 10px;
|
|
774
|
+
padding: 2px 10px;
|
|
775
|
+
border-radius: 4px;
|
|
776
|
+
cursor: pointer;
|
|
777
|
+
transition: all 0.15s;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
div[aria-label="messages"] > div[data-activity] [data-stop]:hover {
|
|
781
|
+
background: rgba(255, 80, 80, 0.1);
|
|
782
|
+
border-color: rgba(255, 80, 80, 0.3);
|
|
783
|
+
color: var(--danger);
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
div[aria-label="messages"] > div[data-activity] [data-watchdog-warn] {
|
|
787
|
+
color: #f59e0b;
|
|
788
|
+
font-size: 11px;
|
|
789
|
+
margin: 0.3rem 0 0;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
div[aria-label="messages"] > div[data-role="system"] {
|
|
793
|
+
color: var(--muted);
|
|
794
|
+
font-size: 11px;
|
|
795
|
+
padding: 0.25rem 0;
|
|
796
|
+
font-style: italic;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
[data-usage-bar] {
|
|
800
|
+
display: flex;
|
|
801
|
+
gap: 1.5rem;
|
|
802
|
+
padding: 0.5rem 1.5rem;
|
|
803
|
+
font-size: 10px;
|
|
804
|
+
color: var(--muted);
|
|
805
|
+
font-variant-numeric: tabular-nums;
|
|
806
|
+
flex-shrink: 0;
|
|
807
|
+
border-top: 1px solid var(--bg-raised);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
[data-usage-bar][hidden] {
|
|
811
|
+
display: none;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
[data-usage-bar] > div {
|
|
815
|
+
flex: 1;
|
|
816
|
+
min-width: 0;
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
[data-usage-bar] [data-quota-header] {
|
|
820
|
+
display: flex;
|
|
821
|
+
justify-content: space-between;
|
|
822
|
+
margin-bottom: 3px;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
[data-usage-bar] [data-quota-header] span:first-child {
|
|
826
|
+
color: var(--white);
|
|
827
|
+
font-weight: 600;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
[data-usage-bar] [data-quota-pct] {
|
|
831
|
+
color: var(--white);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
[data-usage-bar] [data-quota-track] {
|
|
835
|
+
height: 6px;
|
|
836
|
+
background: var(--bg-raised);
|
|
837
|
+
border-radius: 3px;
|
|
838
|
+
overflow: hidden;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
[data-usage-bar] [data-quota-fill] {
|
|
842
|
+
height: 100%;
|
|
843
|
+
border-radius: 3px;
|
|
844
|
+
background: var(--accent);
|
|
845
|
+
transition: width 0.4s ease, background 0.3s;
|
|
846
|
+
width: 0%;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
[data-usage-bar] [data-quota-fill][data-warn] {
|
|
850
|
+
background: var(--amber);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
[data-usage-bar] [data-quota-fill][data-danger] {
|
|
854
|
+
background: var(--danger);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
[data-usage-bar] [data-quota-reset] {
|
|
858
|
+
margin-top: 2px;
|
|
859
|
+
font-size: 9px;
|
|
751
860
|
}
|
|
752
861
|
|
|
753
862
|
form[aria-label="input"] {
|
|
@@ -869,19 +978,19 @@ section[aria-label="connections"] [data-platforms] {
|
|
|
869
978
|
border-color: var(--muted);
|
|
870
979
|
}
|
|
871
980
|
|
|
872
|
-
[data-platforms] article[data-status="connected"] {
|
|
981
|
+
[data-platforms] article[data-conn-status="connected"] {
|
|
873
982
|
border-color: rgba(var(--glow), 0.2);
|
|
874
983
|
}
|
|
875
984
|
|
|
876
|
-
[data-platforms] article[data-status="connected"]:hover {
|
|
985
|
+
[data-platforms] article[data-conn-status="connected"]:hover {
|
|
877
986
|
border-color: rgba(var(--glow), 0.4);
|
|
878
987
|
}
|
|
879
988
|
|
|
880
|
-
[data-platforms] article[data-status="connecting"] {
|
|
989
|
+
[data-platforms] article[data-conn-status="connecting"] {
|
|
881
990
|
border-color: rgba(245, 158, 11, 0.3);
|
|
882
991
|
}
|
|
883
992
|
|
|
884
|
-
[data-platforms] article[data-status="error"] {
|
|
993
|
+
[data-platforms] article[data-conn-status="error"] {
|
|
885
994
|
border-color: rgba(239, 68, 68, 0.3);
|
|
886
995
|
}
|
|
887
996
|
|
|
@@ -1446,6 +1555,11 @@ dialog[aria-label="connection"] footer button[data-disconnect]:hover {
|
|
|
1446
1555
|
max-width: 95%;
|
|
1447
1556
|
}
|
|
1448
1557
|
|
|
1558
|
+
[data-usage-bar] {
|
|
1559
|
+
padding: 0.5rem 0.75rem;
|
|
1560
|
+
gap: 0.75rem;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1449
1563
|
form[aria-label="input"] {
|
|
1450
1564
|
padding: 0.5rem 0.75rem 0.75rem;
|
|
1451
1565
|
}
|
package/public/index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<meta name="theme-color" content="#000000">
|
|
9
9
|
<meta name="color-scheme" content="dark">
|
|
10
10
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
|
11
|
-
<link rel="stylesheet" href="css/style.css">
|
|
11
|
+
<link rel="stylesheet" href="css/style.css?cb=20">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<button type="button" aria-label="menu" aria-expanded="false" aria-controls="agent-nav" title="menu" data-action="toggle-nav">
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<section aria-label="empty" hidden role="region">
|
|
84
84
|
<div>
|
|
85
85
|
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path fill="currentColor" d="M352 0c0-17.7-14.3-32-32-32S288-17.7 288 0l0 64-96 0c-53 0-96 43-96 96l0 224c0 53 43 96 96 96l256 0c53 0 96-43 96-96l0-224c0-53-43-96-96-96l-96 0 0-64zM160 368c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm120 0c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zm120 0c0-13.3 10.7-24 24-24l32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0c-13.3 0-24-10.7-24-24zM224 176a48 48 0 1 1 0 96 48 48 0 1 1 0-96zm144 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM64 224c0-17.7-14.3-32-32-32S0 206.3 0 224l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96zm544-32c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32z"/></svg>
|
|
86
|
-
<p>select or create an agent to begin</p>
|
|
86
|
+
<p>select or <a data-action="create-agent-link">create an agent</a> to begin</p>
|
|
87
87
|
</div>
|
|
88
88
|
</section>
|
|
89
89
|
|
|
@@ -114,6 +114,24 @@
|
|
|
114
114
|
|
|
115
115
|
<div aria-label="messages" role="log" aria-live="polite"></div>
|
|
116
116
|
|
|
117
|
+
<div data-usage-bar hidden>
|
|
118
|
+
<div data-quota-session>
|
|
119
|
+
<div data-quota-header><span>session</span><span data-quota-pct>0%</span></div>
|
|
120
|
+
<div data-quota-track><div data-quota-fill></div></div>
|
|
121
|
+
<div data-quota-reset></div>
|
|
122
|
+
</div>
|
|
123
|
+
<div data-quota-weekly>
|
|
124
|
+
<div data-quota-header><span>weekly</span><span data-quota-pct>0%</span></div>
|
|
125
|
+
<div data-quota-track><div data-quota-fill></div></div>
|
|
126
|
+
<div data-quota-reset></div>
|
|
127
|
+
</div>
|
|
128
|
+
<div data-quota-overage>
|
|
129
|
+
<div data-quota-header><span>extra usage</span><span data-quota-pct>0%</span></div>
|
|
130
|
+
<div data-quota-track><div data-quota-fill></div></div>
|
|
131
|
+
<div data-quota-reset></div>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
117
135
|
<form aria-label="input">
|
|
118
136
|
<textarea placeholder="say something..." rows="1" aria-label="message"></textarea>
|
|
119
137
|
<button type="submit" aria-label="send message" title="send message">
|
|
@@ -145,8 +163,8 @@
|
|
|
145
163
|
</select>
|
|
146
164
|
</label>
|
|
147
165
|
<label data-select>
|
|
148
|
-
<span>
|
|
149
|
-
<select name="
|
|
166
|
+
<span>effort</span>
|
|
167
|
+
<select name="effort">
|
|
150
168
|
<option value="low">low</option>
|
|
151
169
|
<option value="medium">medium</option>
|
|
152
170
|
<option value="high" selected>high</option>
|
|
@@ -183,8 +201,8 @@
|
|
|
183
201
|
</select>
|
|
184
202
|
</label>
|
|
185
203
|
<label data-select>
|
|
186
|
-
<span>
|
|
187
|
-
<select name="
|
|
204
|
+
<span>effort</span>
|
|
205
|
+
<select name="effort">
|
|
188
206
|
<option value="low">low</option>
|
|
189
207
|
<option value="medium">medium</option>
|
|
190
208
|
<option value="high">high</option>
|
|
@@ -257,6 +275,6 @@
|
|
|
257
275
|
</footer>
|
|
258
276
|
</dialog>
|
|
259
277
|
|
|
260
|
-
<script src="js/app.js"></script>
|
|
278
|
+
<script src="js/app.js?cb=20"></script>
|
|
261
279
|
</body>
|
|
262
280
|
</html>
|