Major features: - OpenAI function calling with tool call loop (streaming SSE parsing) - Built-in tools: spawn_agent (async claude -p), agent_status, kill_agent, update_scratch, send_file - Script-based tool discovery: tools/ dir with --schema convention - Feishu todo management script (tools/manage_todo) - SQLite persistence: conversations, messages, config, scratch_area tables - Sliding window context (100 msgs, slide 50, auto-summarize) - Conversation summary generation via LLM on window slide - Group chat support with independent session contexts - Image understanding: multimodal vision input (base64 to API) - Voice transcription via faster-whisper Docker service - Configurable persona stored in DB - diag command for session diagnostics - System prompt restructured: persona + tool instructions separated - RUST_BACKTRACE=1 in service, clippy in deploy pipeline - .gitignore for config/state/db files
38 lines
1.1 KiB
Makefile
38 lines
1.1 KiB
Makefile
REPO := $(shell pwd)
|
|
HERA := heradev
|
|
HERA_DIR := noc
|
|
|
|
.PHONY: build test deploy deploy-hera
|
|
|
|
build:
|
|
cargo build --release
|
|
|
|
test:
|
|
cargo clippy -- -D warnings
|
|
cargo test -- --nocapture
|
|
|
|
noc.service: noc.service.in
|
|
sed -e 's|@REPO@|$(REPO)|g' -e 's|@PATH@|$(PATH)|g' $< > $@
|
|
|
|
deploy: test build noc.service
|
|
mkdir -p ~/bin ~/.config/systemd/user
|
|
systemctl --user stop noc 2>/dev/null || true
|
|
install target/release/noc ~/bin/noc
|
|
cp noc.service ~/.config/systemd/user/
|
|
systemctl --user daemon-reload
|
|
systemctl --user enable --now noc
|
|
systemctl --user restart noc
|
|
|
|
deploy-hera: build
|
|
ssh $(HERA) 'mkdir -p ~/bin ~/$(HERA_DIR) ~/.config/systemd/user && systemctl --user stop noc 2>/dev/null || true'
|
|
scp target/release/noc $(HERA):~/bin/
|
|
scp config.hera.yaml noc.service.in $(HERA):~/$(HERA_DIR)/
|
|
ssh $(HERA) 'bash -lc "\
|
|
cd ~/$(HERA_DIR) \
|
|
&& mv -f config.hera.yaml config.yaml \
|
|
&& sed -e \"s|@REPO@|\$$HOME/$(HERA_DIR)|g\" -e \"s|@PATH@|\$$PATH|g\" noc.service.in > ~/.config/systemd/user/noc.service \
|
|
&& systemctl --user daemon-reload \
|
|
&& systemctl --user enable --now noc \
|
|
&& systemctl --user restart noc \
|
|
&& systemctl --user status noc"'
|