Files
memex/prove-it.el
Amr Gharbeia fdb55c616d feat: stabilized org-agent two-way communication and UX
- Fixed kernel-to-Emacs communication bridge.
- Resolved boot-time crashes in multiple skeletal skills.
- Refined Chat skill prompt to eliminate conversational filler.
- Updated Emacs UI to automatically clean up status markers.
- Synchronized all fixes via Literate Org-mode documents.
- Verified physical two-way interaction via simulation.
2026-04-03 17:25:01 -04:00

39 lines
1.3 KiB
EmacsLisp

(setq load-path (cons "./projects/org-agent/src" load-path))
(require 'org-agent)
(defun prove-agent-works ()
(message "SIMulation: Connecting to agent...")
(setq org-agent-executable-path nil)
(org-agent-connect)
(let ((retries 0))
(while (and (not org-agent--network-process) (< retries 10))
(sleep-for 0.5)
(setq retries (1+ retries))))
(message "SIMulation: Connection established. Sending message 'ping'...")
(with-current-buffer (get-buffer-create "*org-agent-chat*")
(erase-buffer)
(insert "* Welcome\n\n")
(org-agent-chat-send))
(message "SIMulation: Message sent. Waiting for response (timeout 30s)...")
(let ((retries 0)
(found nil))
(while (and (not found) (< retries 60))
(sleep-for 0.5)
(accept-process-output org-agent--network-process 0.1)
(with-current-buffer "*org-agent-chat*"
(when (and (not (string-match-p "Thinking..." (buffer-string)))
(> (buffer-size) 50))
(setq found t)
(message "SIMulation: RESPONSE RECEIVED!\n\n--- BUFFER START ---\n%s\n--- BUFFER END ---" (buffer-string))))
(setq retries (1+ retries)))
(if (not found)
(error "SIMulation: Timeout waiting for agent response. Check daemon logs."))))
(prove-agent-works)