Fix make binary: exclude http-post-stream from std/net/request import
ober
c3ed5569c17900a5dc92460b32fb2e1745e576a9
--- a/Makefile +++ b/Makefile @@ -10,9 +10,27 @@ TUI_SHIM_DIR := $(CURDIR)/vendor/termbox2 NATIVE_LIB_DIR := $(JERBOA_HOME)/lib LDPATH := $(SHIM_DIR):$(TUI_SHIM_DIR):$(SQLITE_LIB_DIR):$(NATIVE_LIB_DIR) -.PHONY: all build gen run test clean repl binary install tui-shim run-tui jcode-musl linux linux-check linux-local docker purge-stale sqlite-shim - -all: build +.PHONY: all help build gen run test clean repl binary install tui-shim run-tui jcode-musl linux linux-check linux-local docker purge-stale sqlite-shim + +all: help + +help: + @echo "Available targets:" + @echo " build Compile src/ → lib/ and pre-compile imports" + @echo " test Run test suite (test/run.ss)" + @echo " run Start interactive agent REPL" + @echo " run-tui Start TUI mode" + @echo " repl Open a bare Scheme REPL with project libdirs" + @echo " gen Run jerbuild + rebuild sqlite/TUI shims" + @echo " binary Build native binary (macOS)" + @echo " install Install binary to ~/.local/bin" + @echo " linux Build static musl binary via Docker" + @echo " linux-local Build static musl binary on host" + @echo " linux-check Fast drift check for musl build path" + @echo " clean Remove compiled artifacts and binaries" + @echo " purge-stale Remove stale .so/.wpo files" + @echo " sqlite-shim Rebuild chez_sqlite_shim.so" + @echo " tui-shim Rebuild jcode_tui_shim" # ── Stale-artifact prevention ─────────────────────────────────────────────── # Delete any compiled .so/.wpo whose source .ss/.sls is newer (or whose --- a/lib/jcode/core/agent.sls +++ b/lib/jcode/core/agent.sls @@ -143,14 +143,14 @@ (let ([trimmed (string-trim args-str)]) (if (string=? trimmed "") "{}" - (or (guard (e [list #t #f]) + (or (guard (e [#t #f]) (let ([ht (string->json-object trimmed)]) (and (hash-table? ht) (json-object->string ht)))) - (guard (e [list #t #f]) + (guard (e [#t #f]) (let ([ht (string->json-object (string-append "{" trimmed "}"))]) (and (hash-table? ht) (json-object->string ht)))) - (guard (e [list #t #f]) + (guard (e [#t #f]) (let ([ht (make-hash-table)]) (for-each (lambda (pair) @@ -318,8 +318,7 @@ (def (execute-single-tool tc) (let* ([name (tool-call-name tc)] [raw-args (tool-call-arguments tc)] - [args (guard (e [list #t #f]) - (string->json-object raw-args))] + [args (guard (e [#t #f]) (string->json-object raw-args))] [cb (current-tool-cb)]) (if (not args) (begin --- a/lib/jcode/provider/provider.sls +++ b/lib/jcode/provider/provider.sls @@ -10,10 +10,10 @@ (except (chezscheme) make-hash-table hash-table? iota \x31;+ \x31;- getenv path-extension path-absolute? thread? make-mutex mutex? mutex-name) - (std text json) (std net request) (std net tls-rustls) - (std net tcp) (std misc string) (std misc retry) - (jcode core log) (jcode core message) (jerboa core) - (jerboa runtime)) + (std text json) (except (std net request) http-post-stream) + (std net tls-rustls) (std net tcp) (std misc string) + (std misc retry) (jcode core log) (jcode core message) + (jerboa core) (jerboa runtime)) (def logger (make-logger "provider")) (def *api-retry-policy* (make-retry-policy 3 1.0 30.0 #t)) (def (retryable-error? e) @@ -703,7 +703,7 @@ (cond [(equal? data "[DONE]") (void)] [else - (let ([json (guard (e [list #t #f]) + (let ([json (guard (e [#t #f]) (string->json-object data))]) (when (and json @@ -883,7 +883,7 @@ (string-length line)))])) lines) (when (and event-type data-str) - (let ([json (guard (e [list #t #f]) + (let ([json (guard (e [#t #f]) (string->json-object data-str))]) (when (and json (hash-table? json)) --- a/lib/jcode/ui/cli.sls +++ b/lib/jcode/ui/cli.sls @@ -412,7 +412,7 @@ (if idx (let ([json-start (string-contains msg "{")]) (if json-start - (guard (ex [list #t msg]) + (guard (ex [#t msg]) (let* ([json-str (substring msg json-start --- a/lib/jcode/ui/tui-ffi.sls +++ b/lib/jcode/ui/tui-ffi.sls @@ -43,11 +43,10 @@ (jerboa core) (jerboa runtime)) (def _shim-loaded - (or (guard (e [list #t #f]) + (or (guard (e [#t #f]) (load-shared-object "jcode_tui_shim.dylib")) - (guard (e [list #t #f]) - (load-shared-object "jcode_tui_shim.so")) - (guard (e [list #t #f]) + (guard (e [#t #f]) (load-shared-object "jcode_tui_shim.so")) + (guard (e [#t #f]) (load-shared-object (path-join (path-directory (car (command-line))) --- a/src/jcode/provider/provider.ss +++ b/src/jcode/provider/provider.ss @@ -9,7 +9,7 @@ provider-model) (import :std/text/json - :std/net/request + (except (std net request) http-post-stream) :std/net/tls-rustls :std/net/tcp :std/misc/string