load committed seeds regardless of cwd; fix skills listing + SimpleX link

- cli.load_config anchors skill_seeds/skill_bodies/category_registry/log/trace
  to the checkout root, so a fresh clone's committed seeds load from any cwd
  (running outside the repo root had an empty tree -> codegen loop).
- `skills` (CLI + REPL) lists scheduler.tree, not a throwaway built-ins tree.
- SimpleX adapter reads the real /_show_address shape
  (contactLink.connLinkContact), so simplex.connect_link returns the link
  instead of reporting no address.
This commit is contained in:
Denton Social committed 2026-09-28 13:52:00 -05:00
1 parent a9b096f2e8
commit d46fbdca19
4 files changed
+118 -7

No files matched your search

+23 -2
View File
@@ -23,6 +23,27 @@ from typing import Any
from .base import GatewayAdapter, InboundMessage, OutboundMessage
def contact_link(resp: dict) -> dict:
"""Pull `{connShortLink, connFullLink}` out of a daemon address response.
`/_show_address` nests it as `contactLink.connLinkContact`; `/_address`
returns it directly as `connLinkContact`. Tolerate both (and a flat
`contactLink`) so the adapter reads the real daemon shape rather than
calling `/_address` again on an existing link and reporting nothing.
"""
for candidate in (
(resp.get("contactLink") or {}).get("connLinkContact"),
resp.get("connLinkContact"),
resp.get("contactLink"),
resp,
):
if isinstance(candidate, dict) and (
candidate.get("connShortLink") or candidate.get("connFullLink")
):
return candidate
return {}
class SimplexAdapter(GatewayAdapter):
name = "simplex"
@@ -177,10 +198,10 @@ class SimplexAdapter(GatewayAdapter):
link: dict = {}
created = False
if resp.get("type") == "userContactLink":
link = resp.get("contactLink") or {}
link = contact_link(resp)
if not (link.get("connShortLink") or link.get("connFullLink")):
resp = await self._roundtrip(f"/_address {self.user_id}", timeout)
link = resp.get("connLinkContact") or {}
link = contact_link(resp)
created = True
return {
"short_link": link.get("connShortLink") or "",