v0.3.0 finish: TUI tests, embedding wiring, gateway :configured, focus commands, export cleanup
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

- TUI: Fix stale contract (remove handle-return/*incoming-msgs*), rewrite
  10->13 tests (38 checks, 100% pass). Export missing symbols from TUI
  package. Fix view-chat contract arity.
- Gateway messaging: Add :configured key to registry (boolean, nil default).
  Fix contract to match (vault-based, not env-var-based).
- Async Embedding Gateway: Add *embedding-backend* var, embeddings-compute
  function. Modify ingest-ast to populate vectors on new objects.
  Add EMBEDDING_PROVIDER env var support. Add Contract + 4 tests (8 checks).
- Context Manager: Add /focus, /scope, /unfocus commands to TUI on-key
  handler. Commands degrade gracefully when context-manager not loaded.
- Export hygiene: Remove 30+ ghost exports (undefined symbols). Remove
  duplicate/mismatched names. Exports now match actual definitions.
This commit is contained in:
2026-05-05 17:42:03 -04:00
parent 035aac45e3
commit cd86509e3a
13 changed files with 572 additions and 176 deletions

View File

@@ -37,7 +37,8 @@ The tradeoff is memory usage: each snapshot is a deep copy of every object in ac
** Contract
1. (ingest-ast ast &key scope): stores AST nodes in ~*memory-store*~.
Detaches children, gives each an ID, computes Merkle hash. Returns the
Detaches children, gives each an ID, computes Merkle hash, and
populates the ~:vector~ slot via ~embeddings-compute~. Returns the
root ID string.
2. (memory-object-hash object): returns the SHA-256 Merkle hash of the
object's content. Hash is deterministic — same content → same hash.
@@ -228,6 +229,13 @@ Returns the ID of the root node.
:hash hash :scope scope))))
(unless existing-obj (setf (gethash hash *memory-history*) obj))
(setf (gethash id *memory-store*) obj)
;; Populate embedding vector for new objects
(when (and raw-content (not existing-obj) (not (memory-object-vector obj)))
(handler-case
(setf (memory-object-vector obj)
(embeddings-compute raw-content))
(error (c)
(log-message "INGEST: Embedding deferred: ~a" c))))
id)))
#+end_src