Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
365 commits
Select commit Hold shift + click to select a range
d75d64d
chore: ignore macOS .DS_Store globally
steipete Dec 5, 2025
5949ef0
chore: rename package to clawdis
steipete Dec 5, 2025
99b174f
fix: avoid directive hits inside URLs and add tests
steipete Dec 5, 2025
c95c6d7
test: cover directive parsing and abort/restart prefixes
steipete Dec 5, 2025
24d90c1
fix: ignore directives inside history blocks
steipete Dec 5, 2025
4cb2a92
fix: avoid echoing prompts when rpc returns empty
steipete Dec 5, 2025
5b217b2
fix: suppress heartbeat directive acks and add coverage
steipete Dec 5, 2025
d7a188f
fix: broaden prompt-echo guard and add heartbeat directive test
steipete Dec 5, 2025
3241d81
fix: allow inline directives to continue and add mixed-message test
steipete Dec 5, 2025
36b0796
fix: handle prompt-too-long by resetting session and continuing inlin…
steipete Dec 5, 2025
3c64a57
revert prompt-too-long fallback and keep inline directives
steipete Dec 5, 2025
38a4e98
chore: ignore mac build artifacts
steipete Dec 5, 2025
d0cefec
chore: add mac build+run helper
steipete Dec 5, 2025
b66098e
chore: bundle mac app and custom menu icon
steipete Dec 5, 2025
b557a73
feat: richer mac settings panes and template icon
steipete Dec 5, 2025
4aa275e
feat(mac): animate menubar icon
steipete Dec 5, 2025
0ec9c6c
fix(mac): show critter menubar icon
steipete Dec 5, 2025
73a1e13
feat: trimmy-style settings tabs and CLI helper bundling
steipete Dec 5, 2025
13704d9
chore: add settings shortcut and restart packaging
steipete Dec 5, 2025
a573ea4
chore: open settings from menu and restart packaged app
steipete Dec 5, 2025
4fe6510
fix(mac): align critter legs
steipete Dec 5, 2025
5d01b32
mac: polish onboarding and lifecycle
steipete Dec 5, 2025
d031c5c
mac: auto-show onboarding on first run
steipete Dec 5, 2025
a2604a3
mac: tighten settings layout
steipete Dec 5, 2025
28e0dbc
fix: harden directive handling
steipete Dec 5, 2025
1ee690e
mac: match trimmy about layout
steipete Dec 5, 2025
c1a6430
mac: lock settings window size
steipete Dec 5, 2025
6f27f74
feat(mac): add critter ear/leg wiggles
steipete Dec 5, 2025
ddfb76e
fix: bundle pi dependency and directive handling
steipete Dec 5, 2025
b0ecafc
mac: bring onboarding layout closer to vibetunnel
steipete Dec 5, 2025
60f4c9f
mac: tighten onboarding card layout
steipete Dec 5, 2025
3067807
mac: trimmy-style padding and debug toggle
steipete Dec 5, 2025
f09390a
mac: fix settings window size persistence
steipete Dec 5, 2025
26e939c
fix(mac): dim menubar icon like trimmy
steipete Dec 6, 2025
12e5b81
chore(mac): rebuild and relaunch like trimmy
steipete Dec 6, 2025
2e393b7
docs: note trimmy-style restart and dimming
steipete Dec 6, 2025
3a32b83
chore(mac): label toggle as Clawdis Active
steipete Dec 6, 2025
fa1eb9b
fix(mac): rebuild into .build-local and clean cache
steipete Dec 6, 2025
f290b9a
fix(mac): align restart/package to use .build
steipete Dec 6, 2025
c545ec7
chore(mac): rely on status item disable for dimming
steipete Dec 6, 2025
b508ab2
fix(mac): stop critter animation when paused
steipete Dec 6, 2025
4ea2518
mac: align settings window layout
steipete Dec 6, 2025
e863fd7
CLI: compact sessions table output
steipete Dec 6, 2025
67fe5ed
chore(mac): widen settings and keep critter static when paused
steipete Dec 6, 2025
cb35e3a
mac: add sessions tab to settings
steipete Dec 6, 2025
4e7d905
mac: lock onboarding page width to 640
steipete Dec 6, 2025
e1c9885
chore: vendor swabble and add speech usage strings
steipete Dec 6, 2025
f444604
feat: surface mic and speech permissions
steipete Dec 6, 2025
09ed3f3
fix: keep voice wake permission callbacks on main actor
steipete Dec 6, 2025
84b4406
fix: run voice wake permission callbacks off the main actor
steipete Dec 6, 2025
f207788
refactor: make voice wake tester an actor
steipete Dec 6, 2025
d2a3db4
mac: add app icon and tidy voice picker
steipete Dec 6, 2025
6a1d58d
mac: fix voice wake mic picker build
steipete Dec 6, 2025
b5afb9d
feat: add mic selection to Voice Wake settings
steipete Dec 6, 2025
4efecfd
feat: add live mic meter to Voice Wake
steipete Dec 6, 2025
98b0595
fix: pause mic meter while running voice wake test
steipete Dec 6, 2025
acc88bc
tweak: faster mic meter response
steipete Dec 6, 2025
45400a1
fix: show live transcript in voice wake test
steipete Dec 6, 2025
b5f65e3
chore: gate Voice Wake on macOS 26
steipete Dec 6, 2025
bf21ed7
feat: add language picker for Voice Wake
steipete Dec 6, 2025
135a520
fix: run speech tap and handlers on safe queues
steipete Dec 6, 2025
daca3a5
fix: stabilize voice wake test
steipete Dec 6, 2025
a7d3619
fix: avoid audio tap isolation crash
steipete Dec 6, 2025
649e6ef
fix: decouple voice tester from main actor
steipete Dec 6, 2025
f93e33d
fix: ignore cancellation and keep mic meter during test
steipete Dec 6, 2025
a8932c2
feat: add additional voice wake languages + clean locale labels
steipete Dec 6, 2025
19677f0
ci: add macOS app build
steipete Dec 6, 2025
c6e3b49
ci: add swiftlint/swiftformat for mac app
steipete Dec 6, 2025
fbf5333
chore: run formatters and lint
steipete Dec 6, 2025
b88b18d
fix: apply dock icon preference at launch
steipete Dec 6, 2025
2e62659
chore: align lint/format configs with peekaboo defaults
steipete Dec 6, 2025
df7dbff
ui: align live level row with mic picker
steipete Dec 6, 2025
93eec9a
mac: expand settings layout and dock toggle
steipete Dec 6, 2025
3c13a26
mac: add web chat bridge and docs
steipete Dec 6, 2025
15cdeed
feat: add config editor for clawdis model and session store
steipete Dec 6, 2025
42d8432
mac: bundle web chat assets
steipete Dec 6, 2025
88c8009
feat: move CLI config into its own Settings tab
steipete Dec 6, 2025
07e56dd
docs: note bundled web chat assets
steipete Dec 6, 2025
1916e68
feat: load PI model catalog and add dropdown in Config tab
steipete Dec 6, 2025
6f80be0
mac: add webview debug logging
steipete Dec 6, 2025
0d07c58
fix: expose Config tab in settings
steipete Dec 6, 2025
5e6af3d
fix: add Config tab title case
steipete Dec 6, 2025
46d55a8
fix: harden model catalog parsing
steipete Dec 6, 2025
46ed4f2
docs: clarify Voice Wake runs on-device
steipete Dec 6, 2025
629140d
docs: document macOS Voice Wake and on-device processing
steipete Dec 6, 2025
e528b43
build: add mac icon pipeline
steipete Dec 6, 2025
6182b20
mac: fix web chat boot in WKWebView
steipete Dec 6, 2025
3925422
mac: fix notification prompt and center onboarding toggle
steipete Dec 6, 2025
c435236
mac: streamline model config UI
steipete Dec 6, 2025
460d8fc
feat(mac): add child relay process manager
steipete Dec 6, 2025
4b63259
feat: unify main session and icon cues
steipete Dec 6, 2025
56cedad
chore: remove bin/warelay.js
steipete Dec 6, 2025
16f452c
feat(macos): add tools tab installers
steipete Dec 6, 2025
b3564bf
chore(mac): guard Darwin import for relay manager
steipete Dec 6, 2025
89bb7d0
fix(macos): avoid voice tester crash
steipete Dec 6, 2025
ad2a266
chore: move model reload to debug tab
steipete Dec 6, 2025
649f644
chore: reorder settings tabs
steipete Dec 6, 2025
58d0f30
feat(mac): show relay run indicator in menu
steipete Dec 6, 2025
7daef74
chore: move relay status below toggles
steipete Dec 6, 2025
7aca8d2
fix(mac): harden relay spawn path and show status
steipete Dec 6, 2025
6dafca7
build: sign debug app and use stable bundle id
steipete Dec 6, 2025
c3866b7
docs: document debug signing and bundle id
steipete Dec 6, 2025
51a4b86
fix(mac): resolve relay executable via common paths and pnpm fallback
steipete Dec 6, 2025
ec00e0a
fix(mac): run pnpm from project root and set PNPM_HOME for relay
steipete Dec 6, 2025
c9f5edb
feat(mac): make relay project root configurable from Debug tab
steipete Dec 6, 2025
ff36375
feat(mac): show relay attention badge without dimming paused state
steipete Dec 6, 2025
b25b72a
chore(mac): rename relay root label to Clawdis project root
steipete Dec 6, 2025
02e2699
fix(mac): run relay with cwd set to configured project root
steipete Dec 6, 2025
9c32e63
docs: add 500 LOC cap to guardrails
steipete Dec 6, 2025
c5c50a2
fix(mac): bundle web chat UI deps
steipete Dec 6, 2025
82e751a
macOS: split AppMain into focused modules
steipete Dec 6, 2025
7b7c4bd
chore: fix swiftlint after split
steipete Dec 6, 2025
ab316b3
docs: update relay run mode
steipete Dec 6, 2025
757cedc
fix: remove legacy relay references
steipete Dec 6, 2025
b2e3013
mac: add signing helper and document debug bundle
steipete Dec 6, 2025
0a6b934
mac: show build metadata in About
steipete Dec 6, 2025
515e973
Mac: fix permission prompt crash
steipete Dec 6, 2025
4426bf2
Docs: note SIGN_IDENTITY for mac signing
steipete Dec 6, 2025
11311d0
mac: tidy About metadata layout
steipete Dec 6, 2025
21bb2fb
Mac: add mic entitlement to signing helper
steipete Dec 6, 2025
ce02f79
Mac: fix voice wake actor crash; add mic entitlement
steipete Dec 7, 2025
c911568
Mac: remove Tools & MCP header
steipete Dec 7, 2025
9ef8cda
Mac: lighten tool cards
steipete Dec 7, 2025
567644d
Mac: privileged CLI helper install via osascript
steipete Dec 7, 2025
8b20e01
CLI: add --help and usage
steipete Dec 7, 2025
0f71667
CLI: add --version flag
steipete Dec 7, 2025
9497a4c
CLI: fix --version by reading app Info.plist
steipete Dec 7, 2025
00ef7ec
Mac: align app version with package.json
steipete Dec 7, 2025
6355113
chore(mac): move relay status row directly under Active toggle
steipete Dec 7, 2025
cf0f448
VoiceWake: add SSH forward target
steipete Dec 7, 2025
141d2b5
VoiceWake: add SSH forwarder tests
steipete Dec 7, 2025
b27f0dd
Settings: keep tabs fixed, only content scrolls
steipete Dec 7, 2025
374472d
VoiceWake: add SSH connectivity check UI
steipete Dec 7, 2025
f4f4f2d
Mac: run via launchd agent with mach service
steipete Dec 7, 2025
699cb92
Mac: let launch checkbox toggle launchd agent
steipete Dec 7, 2025
ea99308
Mac: disable KeepAlive; launch toggle controls agent
steipete Dec 7, 2025
f51f8ff
scripts: make restart clean step resilient
steipete Dec 7, 2025
1d80791
VoiceWake: better ssh target parsing and error detail
steipete Dec 7, 2025
9d0415f
VoiceWake: make tab content scrollable
steipete Dec 7, 2025
e906b87
VoiceWake: keep listening until silence, gate enable on permissions
steipete Dec 7, 2025
bac5ac1
fix: gate voice wake permissions
steipete Dec 7, 2025
e27690e
VoiceWake: log detection, hold to 1s silence, ssh log clarity
steipete Dec 7, 2025
bc20664
tools: add clawlog helper for unified logs
steipete Dec 7, 2025
3a4bf8f
VoiceWake: compact SSH test row
steipete Dec 7, 2025
752bc5a
VoiceWake: align mic + level rows
steipete Dec 7, 2025
2e67c5a
VoiceWake: stabilize test card height
steipete Dec 7, 2025
ea37ee6
feat(mac): add automation permission
steipete Dec 7, 2025
78c67ed
Mac: stabilize XPC and voice wake handling
steipete Dec 7, 2025
aeb708f
Mac: secure XPC and register mach service via launchd
steipete Dec 7, 2025
cdbbdcb
Docs: describe mac XPC setup
steipete Dec 7, 2025
ea83982
Docs: add clawlog helper note
steipete Dec 7, 2025
71c5511
chore(mac): add webchat auto-open flag and verbose logging
steipete Dec 7, 2025
5d5e739
docs(mac): document webchat auto-open and debug flow
steipete Dec 7, 2025
40013c2
fix(mac): bundle WebChat resources when packaging
steipete Dec 7, 2025
3c61524
Mac: allow signed CLI + same-uid XPC clients
steipete Dec 7, 2025
759ab54
VoiceWake: ssh check also verifies remote clawdis-mac
steipete Dec 7, 2025
faca83e
fix: ensure remote clawdis-mac path
steipete Dec 7, 2025
c74c1a0
fix: stabilize tools action width
steipete Dec 7, 2025
fdfcff2
Mac: link Debug log button to pino log
steipete Dec 7, 2025
36ba1ff
Mac: debug log button falls back to legacy path
steipete Dec 7, 2025
33396ca
Mac: debug log button shows path and opens in Finder
steipete Dec 7, 2025
1a10569
Logging: use /tmp/clawdis for default pino logs
steipete Dec 7, 2025
21dfbd0
feat(macos): detect installed CLI helper
steipete Dec 7, 2025
6c3d3b9
chore: purge warelay references
steipete Dec 7, 2025
060f80c
feat: add icon animation setting
steipete Dec 7, 2025
f23b16d
build: require signing identity for mac packaging
steipete Dec 7, 2025
31f788e
CLI: allow --provider flag for login/logout (default whatsapp)
steipete Dec 7, 2025
050ebb3
Mac: add relay restart button in Debug
steipete Dec 7, 2025
55e0086
fix: harden remote voice wake CLI lookup
steipete Dec 7, 2025
ca4e76b
test: add voice wake forwarder cache coverage
steipete Dec 7, 2025
38abb04
feat(macos): run live voice wake listener and animate ears
steipete Dec 7, 2025
55ea0f3
test(voicewake): cover trigger matching for runtime listener
steipete Dec 7, 2025
f1dbff1
fix(voicewake): log ssh/cli failure instead of staying silent
steipete Dec 7, 2025
a489550
feat(cli): add agent send command and wire through XPC
steipete Dec 7, 2025
bbe92a3
Mac: fix agent XPC by invoking CLI agent
steipete Dec 7, 2025
cac988f
fix(webchat): wire agent CLI send into web chat view
steipete Dec 7, 2025
e1c4a59
docs: outline RPC plan for agent CLI
steipete Dec 7, 2025
0a9b98e
feat(cli): add stdin/stdout rpc loop for agent sends
steipete Dec 7, 2025
69cb71a
feat(agent): use persistent rpc worker for agent sends
steipete Dec 7, 2025
fb1de5c
chore(agent): drop cli fallback, rpc only for sends
steipete Dec 7, 2025
32720bd
feat(agent): add rpc status command and tests; rpc only path
steipete Dec 7, 2025
fb10696
fix(macos): guard unavailable speech recognizer
steipete Dec 7, 2025
2f44046
chore(agent): start rpc worker at launch, fail if not running
steipete Dec 7, 2025
bf429b7
Settings: add heartbeat controls
steipete Dec 7, 2025
78d9635
Settings: inline heartbeat inputs
steipete Dec 7, 2025
2714ed5
CLI: add health probe command
steipete Dec 7, 2025
ddf8aef
Settings: move session store path to Debug
steipete Dec 7, 2025
cb5c932
Health: CLI probe and mac UI surfacing
steipete Dec 7, 2025
3d89999
docs: add voice wake forwarding tips to agents
steipete Dec 7, 2025
4645f51
fix: reuse resolver for agent rpc launch
steipete Dec 7, 2025
f32a647
test: cover command resolver fallbacks
steipete Dec 7, 2025
3a8e049
chore: fix test import and lint
steipete Dec 7, 2025
1190b9c
Health: strengthen probe tests
steipete Dec 7, 2025
2abc517
UI: streamline relay status label
steipete Dec 7, 2025
fdc0b28
Docs: scrub personal phone example
steipete Dec 7, 2025
67c67dd
Docs: swap to obviously fake phone numbers
steipete Dec 7, 2025
753995a
Docs: add no-real-data rule to AGENTS
steipete Dec 7, 2025
b20507e
chore(health): kick off health refresh at app launch
steipete Dec 7, 2025
17aeec5
fix: raise voice wake forward timeout to 30s
steipete Dec 7, 2025
1ae0b44
fix(health): reveal logs alerts when missing; align actions
steipete Dec 7, 2025
093e737
fix: keep launch agent alive and inject PATH
steipete Dec 7, 2025
e70f847
fix: auto-start rpc worker for agent calls
steipete Dec 7, 2025
1d38f5a
Revert "fix: auto-start rpc worker for agent calls"
steipete Dec 7, 2025
67fa82c
agent: deliver via rpc and voice forward
steipete Dec 7, 2025
f974157
chore(macos): remove focus ring on about icon
steipete Dec 7, 2025
4d2f4f1
chore(macos): make debug settings scrollable
steipete Dec 7, 2025
28b5315
fix(macos): resolve clawdis path for health check
steipete Dec 7, 2025
ff41a61
chore(macos): clean up CLI helper subtext
steipete Dec 7, 2025
809f5d6
chore(macos): align mic level bar width
steipete Dec 7, 2025
42c74e8
chore(macos): align recognition language row styling
steipete Dec 7, 2025
a23846b
chore(macos): simplify health status menu and messaging
steipete Dec 7, 2025
175f929
macOS: widen voice wake label spacing
steipete Dec 7, 2025
15381c7
ci: use macos-latest with Xcode 26.1
steipete Dec 7, 2025
9c9e04c
debug: add voice forward test button
steipete Dec 7, 2025
96ae0dd
fix(macos): handle missing clawdis CLI for health check
steipete Dec 7, 2025
a3bf0d6
fix(macos): honor pnpm/node when locating clawdis for health
steipete Dec 7, 2025
76559b3
debug: surface ssh error details in voice test
steipete Dec 7, 2025
eeee962
chore(macos): tighten voice wake control widths
steipete Dec 7, 2025
2dbef61
agent: allow deliver when json output
steipete Dec 7, 2025
b30db08
feat: add heartbeat toggle with live RPC control
steipete Dec 7, 2025
f6db636
Debug: make voice wake test follow config
steipete Dec 7, 2025
5986cf4
docs: record current rpc protocol and heartbeat toggle
steipete Dec 7, 2025
7dc9434
chore(macos): enlarge about icon
steipete Dec 7, 2025
75234da
Debug: surface detailed voice send errors
steipete Dec 7, 2025
ee84537
rpc: surface raw error lines and auto-start worker
steipete Dec 7, 2025
4e2fb38
debug: hide helper subtext while sending
steipete Dec 7, 2025
f878e5e
fix(mac): keep pnpm health output json-safe
steipete Dec 7, 2025
9aea85a
General: add bottom inset to quit button
steipete Dec 7, 2025
f4fa9bf
fix(macos): load web chat from bundled html
steipete Dec 7, 2025
ba0f594
voice wake: surface ssh failures (missing key/no output)
steipete Dec 7, 2025
73133b6
chore(macos): allow file access for web chat modules
steipete Dec 7, 2025
3387c13
Icon: add ear holes on voice wake
steipete Dec 7, 2025
ddd4594
voice wake: show identity not found when configured
steipete Dec 7, 2025
139697b
voice wake: keep default key when identity is blank
steipete Dec 7, 2025
6f6c512
chore: bump version to 2.0.0
steipete Dec 7, 2025
f3950a5
feat(macos): serve web chat over localhost to avoid cors
steipete Dec 7, 2025
45398b7
voice wake: use clean PATH (no inherited junk)
steipete Dec 7, 2025
040fe58
chore: format macOS sources
steipete Dec 7, 2025
8942e3e
voice wake: log full ssh command for debug
steipete Dec 7, 2025
41a84ce
chore(webchat): wait for local server and add debug logging
steipete Dec 7, 2025
9c07aab
voice wake: log ssh command at info level
steipete Dec 7, 2025
9dd9bb7
chore(webchat): add server logging and ensure buildable
steipete Dec 7, 2025
fec49e1
chore(webchat): increase server logging for module load debugging
steipete Dec 7, 2025
12f74de
VoiceWake: pipe transcript to ssh forwarder
steipete Dec 7, 2025
16f9dbf
VoiceWake: include ssh cmd on failure
steipete Dec 7, 2025
74e5e5e
docs(mac): document privacy-off logging
steipete Dec 7, 2025
98651c2
webchat: bundle assets with rolldown
steipete Dec 7, 2025
71072f0
VoiceWake: send transcript via python/base64 instead of stdin
steipete Dec 7, 2025
9a66b54
feat: add Telegram provider support (grammY)
Dec 7, 2025
fd0b049
fix: send plain string message in tau-rpc instead of structured object
Dec 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,36 @@ jobs:

- name: Build
run: pnpm build

macos-app:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Select Xcode 26.1
run: |
sudo xcode-select -s /Applications/Xcode_26.1.app
xcodebuild -version

- name: Install SwiftLint / SwiftFormat
run: |
brew install swiftlint swiftformat

- name: Show toolchain
run: |
sw_vers
xcodebuild -version
swift --version

- name: SwiftLint
run: swiftlint --config .swiftlint.yml

- name: SwiftFormat (lint mode)
run: swiftformat --lint apps/macos/Sources --config .swiftformat

- name: Swift build (release)
run: swift build --package-path apps/macos --configuration release

- name: Swift tests
run: swift test --package-path apps/macos --parallel
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ dist
pnpm-lock.yaml
coverage
.pnpm-store
**/.DS_Store
apps/macos/.build/
bin/clawdis-mac
apps/macos/.build-local/
51 changes: 51 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# SwiftFormat configuration adapted from Peekaboo defaults (Swift 6 friendly)

--swiftversion 6.2

# Self handling
--self insert
--selfrequired

# Imports / extensions
--importgrouping testable-bottom
--extensionacl on-declarations

# Indentation
--indent 4
--indentcase false
--ifdef no-indent
--xcodeindentation enabled

# Line breaks
--linebreaks lf
--maxwidth 120

# Whitespace
--trimwhitespace always
--emptybraces no-space
--nospaceoperators ...,..<
--ranges no-space
--someAny true
--voidtype void

# Wrapping
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first
--closingparen same-line

# Organization
--organizetypes class,struct,enum,extension
--extensionmark "MARK: - %t + %p"
--marktypes always
--markextensions always
--structthreshold 0
--enumthreshold 0

# Other
--stripunusedargs closure-only
--header ignore
--allman false

# Exclusions
--exclude .build,.swiftpm,DerivedData,node_modules,dist,coverage,xcuserdata
142 changes: 142 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# SwiftLint configuration adapted from Peekaboo defaults (Swift 6 friendly)

included:
- apps/macos/Sources

excluded:
- .build
- DerivedData
- "**/.build"
- "**/.swiftpm"
- "**/DerivedData"
- "**/Generated"
- "**/Resources"
- "**/Package.swift"
- "**/Tests/Resources"
- node_modules
- dist
- coverage
- "*.playground"

analyzer_rules:
- unused_declaration
- unused_import

opt_in_rules:
- array_init
- closure_spacing
- contains_over_first_not_nil
- empty_count
- empty_string
- explicit_init
- fallthrough
- fatal_error_message
- first_where
- joined_default_parameter
- last_where
- literal_expression_end_indentation
- multiline_arguments
- multiline_parameters
- operator_usage_whitespace
- overridden_super_call
- pattern_matching_keywords
- private_outlet
- prohibited_super_call
- redundant_nil_coalescing
- sorted_first_last
- switch_case_alignment
- unneeded_parentheses_in_closure_argument
- vertical_parameter_alignment_on_call

disabled_rules:
# SwiftFormat handles these
- trailing_whitespace
- trailing_newline
- trailing_comma
- vertical_whitespace
- indentation_width

# Style exclusions
- explicit_self
- identifier_name
- file_header
- explicit_top_level_acl
- explicit_acl
- explicit_type_interface
- missing_docs
- required_deinit
- prefer_nimble
- quick_discouraged_call
- quick_discouraged_focused_test
- quick_discouraged_pending_test
- anonymous_argument_in_multiline_closure
- no_extension_access_modifier
- no_grouping_extension
- switch_case_on_newline
- strict_fileprivate
- extension_access_modifier
- convenience_type
- no_magic_numbers
- one_declaration_per_file
- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
- superfluous_else
- number_separator
- prefixed_toplevel_constant
- opening_brace
- trailing_closure
- contrasted_opening_brace
- sorted_imports
- redundant_type_annotation
- shorthand_optional_binding
- untyped_error_in_catch
- file_name
- todo

force_cast: warning
force_try: warning

type_name:
min_length:
warning: 2
error: 1
max_length:
warning: 60
error: 80

function_body_length:
warning: 150
error: 300

file_length:
warning: 1500
error: 2500
ignore_comment_only_lines: true

type_body_length:
warning: 800
error: 1200

cyclomatic_complexity:
warning: 20
error: 120

large_tuple:
warning: 4
error: 5

nesting:
type_level:
warning: 4
error: 6
function_level:
warning: 5
error: 7

line_length:
warning: 120
error: 250
ignores_comments: true
ignores_urls: true

reporter: "xcode"
34 changes: 21 additions & 13 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Repository Guidelines

## Project Structure & Module Organization
- Source code: `src/` (CLI wiring in `src/cli`, commands in `src/commands`, Twilio in `src/twilio`, Web provider in `src/provider-web.ts`, infra in `src/infra`, media pipeline in `src/media`).
- Tests: colocated `*.test.ts` plus e2e in `src/cli/relay.e2e.test.ts`.
- Docs: `docs/` (images, queue, Claude config). Built output lives in `dist/`.
- Source code: `src/` (CLI wiring in `src/cli`, commands in `src/commands`, web provider in `src/provider-web.ts`, infra in `src/infra`, media pipeline in `src/media`).
- Tests: colocated `*.test.ts`.
- Docs: `docs/` (images, queue, Pi config). Built output lives in `dist/`.

## Build, Test, and Development Commands
- Install deps: `pnpm install`
- Run CLI in dev: `pnpm warelay ...` (tsx entry) or `pnpm dev` for `src/index.ts`.
- Run CLI in dev: `pnpm clawdis ...` (tsx entry) or `pnpm dev` for `src/index.ts`.
- Type-check/build: `pnpm build` (tsc)
- Lint/format: `pnpm lint` (biome check), `pnpm format` (biome format)
- Tests: `pnpm test` (vitest); coverage: `pnpm test:coverage`
Expand All @@ -16,6 +16,7 @@
- Language: TypeScript (ESM). Prefer strict typing; avoid `any`.
- Formatting/linting via Biome; run `pnpm lint` before commits.
- Keep files concise; extract helpers instead of “V2” copies. Use existing patterns for CLI options and dependency injection via `createDefaultDeps`.
- Keep every file ≤ 500 LOC; refactor or split before exceeding and check frequently.

## Testing Guidelines
- Framework: Vitest with V8 coverage thresholds (70% lines/branches/functions/statements).
Expand All @@ -29,26 +30,33 @@
- PRs should summarize scope, note testing performed, and mention any user-facing changes or new flags.

## Security & Configuration Tips
- Environment: copy `.env.example`; set Twilio creds and WhatsApp sender (`TWILIO_WHATSAPP_FROM`).
- Web provider stores creds at `~/.warelay/credentials/`; rerun `warelay login` if logged out.
- Media hosting relies on Tailscale Funnel when using Twilio; use `warelay webhook --ingress tailscale` or `--serve-media` for local hosting.
- Web provider stores creds at `~/.clawdis/credentials/`; rerun `clawdis login` if logged out.
- Pi/Tau sessions live under `~/.clawdis/sessions/` by default; the base directory is not configurable.
- Never commit or publish real phone numbers, videos, or live configuration values. Use obviously fake placeholders in docs, tests, and examples.

## Agent-Specific Notes
- If the relay is running in tmux (`warelay-relay`), restart it after code changes: kill pane/session and run `pnpm warelay relay --verbose` inside tmux. Check tmux before editing; keep the watcher healthy if you start it.
- Relay is managed by launchctl (label `com.steipete.clawdis`). After code changes restart with `launchctl kickstart -k gui/$UID/com.steipete.clawdis` and verify via `launchctl list | grep clawdis`. Use tmux only if you spin up a temporary relay yourself and clean it up afterward.
- macOS logs: use `./scripts/clawlog.sh` (aka `vtlog`) to query unified logs for subsystem `com.steipete.clawdis`; it supports follow/tail/category filters and expects passwordless sudo for `/usr/bin/log`.
- Also read the shared guardrails at `~/Projects/oracle/AGENTS.md` and `~/Projects/agent-scripts/AGENTS.MD` before making changes; align with any cross-repo rules noted there.
- When asked to open a “session” file, open the Pi/Tau session logs under `~/.tau/agent/sessions/clawdis/*.jsonl` (newest unless a specific ID is given), not the default `sessions.json`.
- Menubar dimming + restart flow mirrors Trimmy: use `scripts/restart-mac.sh` (kills all Clawdis variants, runs `swift build`, packages, relaunches). Icon dimming depends on MenuBarExtraAccess wiring in AppMain; keep `appearsDisabled` updates intact when touching the status item.
- Voice wake forwarding tips:
- Command template should stay `clawdis-mac agent --message "${text}" --thinking low`; `VoiceWakeForwarder` already shell-escapes `${text}`. Don’t add extra quotes.
- launchd PATH is minimal; ensure the app’s launch agent sets PATH to include `/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/steipete/Library/pnpm` so `pnpm`/`clawdis` binaries resolve when invoked via `clawdis-mac`.
- For manual `clawdis send` messages that include `!`, use the heredoc pattern noted below to avoid the Bash tool’s escaping.

## Exclamation Mark Escaping Workaround
The Claude Code Bash tool escapes `!` to `\!` in command arguments. When using `warelay send` with messages containing exclamation marks, use heredoc syntax:
The Claude Code Bash tool escapes `!` to `\\!` in command arguments. When using `clawdis send` with messages containing exclamation marks, use heredoc syntax:

```bash
# WRONG - will send "Hello\!" with backslash
warelay send --provider web --to "+1234" --message 'Hello!'
# WRONG - will send "Hello\\!" with backslash
clawdis send --to "+1234" --message 'Hello!'

# CORRECT - use heredoc to avoid escaping
warelay send --provider web --to "+1234" --message "$(cat <<'EOF'
clawdis send --to "+1234" --message "$(cat <<'EOF'
Hello!
EOF
)"
```

This is a Claude Code quirk, not a warelay bug.
This is a Claude Code quirk, not a clawdis bug.
Loading