Commit Graph
90 Commits
Author SHA1 Message Date
gabby 912417792f seeds: ship create_nextcloud_task as a starter skill
Turn the generated productivity_management.create_nextcloud_task body into
a committed seed in the CODEGEN.md folder format. It goes through the
Nextcloud bridge: GET /tasklists picks a VTODO-capable target (never an
event-only calendar or a Deck board) and POST /tasks creates the task; the
LLM bridge phrases the summary/description. The CONTRACT mirrors the four
bridge config vars the body reads, so the seed passes the integration and
contract checks.

Register productivity_management in CATEGORY_DESCRIPTIONS so the seed's
category is described for navigation, and list the seed in
tests/test_seed_skills.py.
2026-10-08 02:05:31 +00:00
gabby 0005d8f7ee bridges: resolve Nextcloud tasks to VTODO-capable lists
Task operations used the same calendar resolver as events, so a request
that named (or defaulted to) an event-only calendar like "personal" put a
VTODO into a collection that rejects it. Read each collection's CalDAV
supported-calendar-component-set, expose it as `components` on
/calendars, and add GET /tasklists (VTODO-capable calendars, minus
Nextcloud Deck boards).

_resolve_calendar is now component-aware: task routes only target a
VTODO-capable list and reject an event-only calendar with a clear 400;
with no name they try default_task_calendar, then default_calendar when
it also accepts VTODO, then the sole user task list. Add the
default_task_calendar config (top-level nextcloud_default_task_calendar
fallback) and document the routes in the bridge catalog.
2026-10-08 01:56:22 +00:00
gabby 228886f7cd bridges: derive skill config vars from the bridge block
Bridge listener addresses were hand-maintained duplicates of
bridges.<name>.host/port at the top level (simplex_bridge_url,
llm_bridge_url, nextcloud_bridge_url, plus their _token). A host
provisioned before a bridge was added never gained the key, so a skill
for that bridge could not resolve its URL: the contract config search
fell back to 'ask' and a front end captured an unrelated reply as the
value (a voice task request was recorded as nextcloud_bridge_url).

Add bridges.registry.derived_config_vars(config): for every catalog
bridge, derive <name>_bridge_url/<name>_bridge_token from its own
bridges.<name> host/port/token. build_scheduler injects these into the
config the scheduler and ctx.config expose, so the contract config
search finds them and skills read them with no top-level duplicate.
A block with no port contributes no URL, leaving an unconfigured bridge
as an unresolved variable the operator is asked for. Bind-all hosts
normalize to 127.0.0.1.

Remove the six redundant top-level keys from config.example.json and
update README/AGENTS/bootstrap notes. Tests cover derivation, bind-all
normalization, and the unconfigured-bridge skip.
2026-10-08 00:17:53 +00:00
gabby d9cc7e4fed bridges: add a Nextcloud bridge (files, calendars, tasks, contacts, notes)
A standalone bridge wrapping the account's native protocols — WebDAV files,
CalDAV events and tasks, CardDAV contacts, and the OCS Notes API — behind one
token-guarded localhost JSON surface, so a codegen-authored body never speaks
DAV/OCS directly.

- nextcloud_client.py: stdlib-only client (urllib + xml.etree + ssl + base64)
  with Basic auth, DAV/OCS request bodies, and minimal iCalendar/vCard build +
  parse; every failure is a NextcloudError carrying the HTTP status.
- nextcloud.py: NextcloudBridge with no service daemon (check_requirements is
  always (True, None)), ~35 routes (GET reads, POST mutations). Event/task
  updates edit the stored iCalendar in place (preserving VALARM/ATTENDEE) behind
  If-Match; creates use If-None-Match. Missing connection is 503; a real
  Nextcloud failure is 502, never a fabricated success.
- registry: CATALOG entry + build_bridge passes the top-level nextcloud_* values
  as a fallback so the account the calendar seeds collect is configured once.
- config.example.json: bridges.nextcloud block + nextcloud_bridge_url/token.
- docs: README, AGENTS, bridges/__init__, bootstrap closing notes.

Tests drive the real client over a loopback http.server faking Nextcloud's
DAV/OCS shapes. One codegen test's context window was raised because the bridge
catalog injected into every prompt grew the baseline prompt.
2026-10-07 12:17:39 +00:00
gabby ee7700275c add remote winnow support 2026-10-07 08:12:45 +00:00
gabby 17f16a6bfc engine: opt-in GPU offload for the decision engine
Let the SemIf decision engine run on a GPU via llama.cpp. SemIf's llamacpp
backend is CPU-only by construction (it hardcodes n_gpu_layers=0), so the
agent wraps `_cpu_model_params` for the duration of the load and restores it
after — no patch to the re-cloned engine source.

- `engine.gpu_layers` / `gpu_device` / `gpu_split` in config (default 0 = CPU).
- On the GPU path, force a full cache reset (`llama_memory_clear(mem, True)`):
  SemIf's metadata-only clear leaves stale hybrid-attention state on Vulkan,
  so repeated scores drift (0.08 -> 0.36 -> 0.43) and return wrong
  probabilities.
- Fail loudly when `gpu_layers` is set but the build has no GPU backend.
- bootstrap.sh: opt-in `--gpu auto|vulkan|rocm|cuda|cpu`. A GPU build is
  opt-in because llama.cpp's Vulkan backend splits the graph across CPU and
  Vulkan even at `n_gpu_layers=0`, roughly halving CPU throughput, so a CPU-only
  host must keep the CPU wheel. Detects the backend, installs the Vulkan build
  prereqs, and rebuilds when offload support disagrees (pip's wheel cache
  otherwise serves the CPU wheel back).
- Bump the SemIf pin 1f2dea3 -> 23cf1f3.
- Tests: unit coverage for the config mapping + loader patches; an integration
  test asserting GPU determinism and CPU parity.
- Offload needs the accelerator to itself (~2.9 GiB for the 4B Q4 model): a GPU
  already holding another model makes the engine slower than CPU and can abort
  with `vk::DeviceLostError`.
2026-10-07 05:21:21 +00:00
gabby e9a7fc73ee scheduler/gateway: carry skill identity structurally, not in action_log
Skill bodies prefixed their own `category.name` into `ActionResult.action_log`,
which duplicated the runner's deterministic summary prefix and leaked the name
into the text the gateways speak. Identity is not data for the output string.

- bodies (seeds, canned replies, housekeeping meta skills) write only the real
  result; the runner already owns the `category.name:` summary prefix
- `run_queue`/`submit_request`/`answer` now return a structured `SchedulerReply`
  (status, text, run_id, skill_ref, result); the gateway reads `skill_ref` and
  `result` from it instead of regex-parsing them back out of the summary
- drop the gateway's `_SKILL_REF`/`_LEADING_RUN_ID` parsing helpers
- fix a latent double-prefix when a failed run had an empty action_log
- CODEGEN.md: generated bodies must not prefix the skill name
2026-10-07 00:30:37 +00:00
gabby d0c1dccffd navigation: skip confirms on a confident softmax; per-skill humanize; 500ms VAD
Four latency/ergonomics changes from the voice-gateway diagnosis:

1. Per-skill humanize override. A skill's own recorded config
   (data/skills/<cat>/<name>/config.json -> {"humanize": bool}) now wins over
   the per-platform and global defaults, so an already-speakable result
   (time.now) can skip the rewrite. The gateway resolves the skill ref from the
   result summary; `_finish_run` now emits `category.name: ok — …` (matching the
   assessment summary) so the ref is available. Missing store/config/key and
   test doubles degrade to the existing platform/global behavior.

2. Example voice endpointing: vad.silence_ms 1000 -> 500 (config.example.json).

3. Confident softmax winners skip their confirm guard. New
   navigation.softmax_bypass_tau (default 0.5): a category winner at/above it
   skips confirm_category_fit (trace `category_scope_bypassed`); a leaf winner
   at/above it is handed to dispatch and skips confirm_skill_fit (trace
   `intent_bypass`). Below the threshold the two-stage confirm is unchanged.
   Assumption tested first on the decision log: 28/28 category and 28/28 leaf
   winners >= 0.5 agreed with their guard.

4. Engine-throughput investigation saved to AGENTS.md "Later / open questions"
   (routing/assessment compute dominates; profile the engine, not the audio).

Tests updated for the bypass threshold and added for the skill-level humanize
override and bypass paths. Full suite: 486 passed, 1 skipped.
2026-10-06 22:33:38 +00:00
gabby e426998cf7 llm: add the loaded semif engine as a text-generation provider
Restore SemIfEngine.generate (autoregressive sampling from the loaded
llama.cpp context) and wrap it in provider.SemIfEngineClient, a non-HTTP
sibling of OpenAICompatClient with the same chat() surface. llm.SemIfLLMClient
keeps the LLMError contract so the scheduler's graceful draft_failed path and
the LLM bridge's 502 path are unchanged.

llm.provider now selects "semif" (the in-process decision model, no endpoint
or model needed), "opencode", or the default "ollama"; build_llm_client owns
the choice (build_scheduler delegates). Knobs live under llm.semif
(temperature 0 = greedy, max_tokens). bootstrap skips the ollama llm
warn/pull/probe when provider is semif.

Only the llm task supports it; codegen still needs a real code model.
2026-10-06 21:35:21 +00:00
gabby 1dc0550659 replace urgency priority queue with strict FIFO
Drop the urgency score and interrupt/preempt decisions: intake is now
idle -> dispatch, busy -> append to a bounded FIFO queue (RequestQueue).
The running process always finishes before the next queued request.

- queue.py: UrgencyQueue -> RequestQueue (deque, no weight/age/recency)
- scheduler.py: remove _priority_score, _interrupt_choice, urgency
  constants, and the weight threaded through dispatch/authoring/requeue
- dashboard/static/gateway: drop weight + preempted handling
- tests + docs updated; flow-main.svg regenerated
2026-10-06 20:38:49 +00:00
gabby a354958599 time seeds: report the configured timezone, not the host's
The time seeds resolved "local" via datetime.now().astimezone(), which
returns the host's local zone. On a UTC host that is UTC, so "what time is
it?" answered in UTC. Decouple from the host: add a top-level `timezone`
config value (an IANA name; empty/unknown falls back to host local) and
resolve it through zoneinfo.

- timers.py: add resolve_timezone/local_now; TimerService takes a
  timezone and formats due/fired times in it (Timer carries the tzinfo).
- scheduler.py: pass config["timezone"] into TimerService.
- seeds/time/{now,date,set_alarm}: use local_now(ctx.config).
- seeds/calendar/{create_event,next_event}: derive "now" the same way, so
  a requested time is parsed in the user's zone.
- config.example.json: add `timezone` (empty = host local).
- tests: cover resolve_timezone, local_now, and zone-formatted timers.
- AGENTS.md: document the timezone value.

config.json (gitignored, per-machine) sets timezone to America/Chicago.
2026-10-06 11:26:11 +00:00
gabby 85cdb94dc9 humanize ouputs at gateway 2026-10-06 10:29:57 +00:00
gabby 7ee200d921 add meta skills for housekeeping (delete skill, clear config, etc.) 2026-10-06 08:40:50 +00:00
gabby e8d1685177 voice gateway returns skill result only 2026-10-06 05:55:07 +00:00
gabby d2f9a74bd9 voice: play a beep cue on wake 2026-10-06 04:45:59 +00:00
gabby eeed8407f9 bootstrap: install alsa-utils for voice hosts 2026-10-06 04:42:08 +00:00
gabby d25b3259e4 add voice gateway (wake word, speech-to-text, text-to-speech) 2026-10-06 04:32:21 +00:00
gabby 49f67575cf add LXMF gateway 2026-10-05 23:07:57 +00:00
gabby 1d9730bfcb check actionability at the top of navigation
Move the actionability guard (confirm_non_action) to the top of navigate,
before category selection, instead of only firing when the category softmax
proposed response/create_category. A non-request now goes straight to the
closed response tree and never reaches the category softmax, and the category
softmax offers only real categories (the canned response tree is excluded), so
a request can never be canned and a non-request can never be routed into a
real category.

Reword the guard so vague/incomplete fragments ("what") count as non-action:
they previously matched none of the non_action cases and split the decision
(action 0.513 / non_action 0.487), so "what" authored a redundant
"unclear"/"clarify_intent" category. It now lands on the catchall
response.clarify.

Remove the now-dead CreateSkill-for-canned fallback and _canned_fallback.

Update AGENTS.md, the navigation unit tests, the tune_navigation eval set, and
add an integration test for the vague-fragment route.
2026-10-05 21:44:18 +00:00
gabby 80518dcdda route only non-request input into the response tree
The response category scope claimed to cover "inputs the agent cannot act
on", so an actionable request like "what is 255 * 12?" scored as in-scope
and landed in the response.unable canned refusal.

Add the actionability guard (confirm_non_action, phase
navigate:actionability, navigation.action_tau) which arbitrates the
response/create_category boundary whichever side the softmax proposed: the
closed response tree is now reached only when the input is not a request, so
a request no skill covers authors a skill instead. Reword the response scope,
drop the response.unable reply, and update tests/docs.
2026-10-05 09:59:03 +00:00
gabby 07b0e2ff7e add basic clock functions (timer, alarm, date, current time) 2026-10-05 05:30:15 +00:00
gabby 780c9592ed codegen: show imports in CODEGEN.md and reject unimported names
A 4B codegen model wrote a plausible body that called
urllib.request.urlopen and returned ActionResult without importing either.
The contract described imports in prose but never showed one (and the model
only ever sees CODEGEN.md, not the seeds it points at), and parse_skill_body
only compiled the AST — so the body was accepted and failed later at
materialize/run.

- CODEGEN.md: add a complete minimal example (imports first, then
  INTEGRATION/CONTRACT/act), an explicit "import everything you use" note,
  the correct DecisionRequest/Option import path, and a strengthened
  acceptance criterion.
- codegen.py: parse_skill_body now rejects a body that references names it
  never imports or binds, via a scope-aware symtable check (skips locals,
  parameters, closures, builtins, and module dunders). The failure is a
  ValueError, so the existing retry ladder fires with a corrective prompt.
- tests: parse-level coverage (missing imports, closures/locals/builtins,
  module dunders, wrong-but-bound module paths) plus a pipeline test that an
  import-less body fails authoring and leaves a restartable stub.
2026-10-03 21:21:09 +00:00
gabby e81e6c3a6b seeds: make calendar.create_event the authoritative example
CODEGEN.md now points to seeds/calendar/create_event/ as the worked example,
and the other seeds mirror it: next_event and next_message gain the
configured-default contract var plus create_event's tau -> default ->
weak-winner candidate resolution, and the shared docstring/banner/_now style.
connect_link gets the style alignment only; create_event itself is unchanged.
2026-10-03 18:07:16 +00:00
gabby 63c5fc9903 llm bridge service 2026-10-03 09:05:28 +00:00
gabby f21baa7ebd remove worked example, refactor calendar create_event seed 2026-10-03 07:14:46 +00:00
gabby 341eb9f8a0 change all references from SKILL.md to CODEGEN.md to avoid ambiguity 2026-10-02 21:35:01 +00:00
gabby 43ece0cfd6 bootstrap: seed config.json once; move refs to committed pins.json
config.json is now per-machine USER config that no code writes: bootstrap
seeds it from config.example.json only when absent, then reads every
per-machine value from it. Flags override those values for the run only and
are never written back.

External refs (engine commit, GGUF url+sha256, HF tokenizer revision,
simplex-chat version/url+sha256) move out of config into a committed,
code-owned pins.json, so a git pull bump propagates on the next bootstrap
run instead of being frozen per machine. The agent reads engine
source/revision from pins.json and derives the GGUF path from engine.gguf_url
under .runtime/models/ (an explicit engine.gguf in config.json overrides it).

- config.example.json: drop all refs; ship the provisioned defaults
  (codegen.timeout 3600, gateway/bridge enabled, dashboard 127.0.0.1)
- scripts/bootstrap.sh: seed config.json if absent, read pins from pins.json
  and per-machine values from config.json, never write config.json; drop the
  flags that only existed to populate config.json; US-delimit read fields so
  empty values do not shift later fields
- semif_agent/cli.py: add load_pins / build_engine_config; load_config
  hard-errors when config.json is missing
- tests/integration + README/AGENTS updated
2026-10-02 19:47:56 +00:00
gabby 38cba33bbf remove dev environment references from codebase 2026-10-02 18:07:39 +00:00
gabby 5747ad2fa6 Make provider sampler params opt-in; drop escalation preset
Sampler parameters (temperature/top_p/presence_penalty/frequency_penalty)
now default to None and are omitted from the request payload when unset, so
the server's model/Modelfile default applies. The provider no longer guesses
values on the user's behalf; callers opt in via config or a per-chat override.

- provider.OpenAICompatClient / llm.LLMClient: default the four params to None
  and only include them in the payload when set (max_tokens/reasoning_effort
  already behaved this way).
- cli.build_scheduler: pass None when the config key is absent via _opt_float,
  instead of hardcoded numeric fallbacks.
- codegen: remove ESCALATED_SAMPLER and its use on retries (body, elicitation,
  testgen, regen). The retry ladder keeps the fresh short prompt but reuses the
  configured/omitted sampler; appropriate values can't be known in advance for
  arbitrary user models.
- console: no functional change; the hosted Console API now receives no sampler
  params by default.
- Tests cover omit-by-default, send-when-configured, per-call override, and the
  no-escalation retry.
- Docs: config.example.json comments, provider/llm/codegen/console docstrings,
  AGENTS.md.
2026-10-02 13:00:50 +00:00
gabby 215c22afb8 authoring UX: sequential elicitation questions + optional creation approval
Elicitation now asks one question at a time: only one PendingQuestion is
live, and the next is posted only after the current is answered (an empty
answer is accepted) or skipped. Each question gets a fresh
codegen.elicitation.answer_timeout (default 30s) that resets on every answer
submit; a timeout stops the sequence. questions_timeout is now traced only on
a real timeout. Front ends need no change — they read pending_questions().

Add opt-in creation_approval: the single-slot llm draft worker blocks after
authoring a proposal and before anything is registered; approve/deny via the
REPL, dashboard (/api/approvals + UI), or a gateway chat reply (yes/no). One
prompt per creation request (a category approval covers its chained skill);
denial or timeout aborts creation. Off by default.

Tests updated for both; full stdlib suite passes (337).
2026-10-01 23:57:03 +00:00
gabby 25ade160df simplex gateway produces link for user to connect to service 2026-10-01 22:27:50 +00:00
gabby de78a0e96a tune category selection 2026-10-01 14:16:29 +00:00
gabby 567c280ee2 Remove the predict phase; contract-driven resolution
Skills now have a single `act(ctx, request)` body phase. The free-string
`Prediction.text` handoff, the `Prediction` type, and the predict phase are
gone.

- Resolution is pipeline-owned: the tiered config merge (global -> category ->
  skill) fills contract vars; the authoring-time SemIf search now searches the
  whole cascade; unresolved vars pause pre-act (`pre_act`, renamed from
  `pre_predict`) and are asked of the human one at a time.
- The data contract is a module-level `CONTRACT` constant in the body, parsed by
  `parse_contract`; `contract.json` is a derived mirror. The separate
  `generate_data_contract` codegen call is removed.
- Candidate selection stays in the body: a set of candidates (bridge endpoint,
  direct API, hard-coded list) gets a SemIf query, and the decisions ride back on
  `ActionResult.decisions` to be logged with the run outcome (phase `act`).
- `assess:outcome`/`assess:requeue` state carries the resolved inputs (secrets
  redacted by name) so the decision sees the full query -> resolution -> action
  path.
- Authoring validation enforces: compiles + `act`; `INTEGRATION` flat and valid;
  `CONTRACT` flat str->str; every CONTRACT key actually read from `ctx.config`.
- Test-regen ladder narrowed to code/test (the contract rides in the code).

SKILL.md/TESTGEN.md rewritten; seeds (calendar.next_event, simplex.next_message,
simplex.connect_link) rewritten to act-only + CONTRACT; docs updated.

BREAKING: persisted bodies in data/skills/ must be regenerated.
2026-10-01 10:21:31 +00:00
gabby 4a62e794a5 implement opencode provider 2026-10-01 06:00:45 +00:00
gabby 65c5899393 remove reasoning from llm calls for title and description generation 2026-10-01 01:43:36 +00:00
Denton Social 50c83c61fd edit documentation for clarity, add table for per-query context composition 2026-09-30 15:01:47 -05:00
Denton Social e93db6ec09 bridges: daemon-backed message history + true unread
The in-memory inbox is a receive buffer, not the daemon's read state, so
the bridge could not see messages that arrived while it was down. Query
/_get chats <userId> count=<n> with a ChatListQuery unread filter
(chatStats{unreadCount, minUnreadItemId} + chatItem.meta.itemStatus
rcvNew/rcvRead) and /_get chat @<id> count=<n> over the existing
corrId->Future path, and expose GET /unread and GET /history?contact=<id>.
Both are read-only (v7 has no mark-read command) and degrade like
/address: 503 not connected, 502 lookup failure, 400 without a contact.
The live /inbox buffer is unchanged.
2026-09-30 12:10:34 -05:00
Denton Social 4a4fe850e0 bridges: refresh SimpleX contact list from the daemon
The bridge only learned contacts from observed inbound senders, so /send
could not address a contact it had never received from. Query /_contacts
<userId> (active user from /user, cached) over the existing corrId->Future
path, merge into the inbox on (re)connect via an on_connected hook and on
demand (GET /contacts, send-resolution miss). Best-effort: a disconnected
daemon keeps the cached set.
2026-09-30 11:39:28 -05:00
Denton Social fb5303928b authoring: dedicated llm provider for skill title/description
Move new category/skill draft authoring off SemIfEngine.generate onto a
separate small OpenAI-compatible provider, deliberately distinct from
codegen. Extract the shared transport (SSE/budget/idle/degeneration) into
provider.OpenAICompatClient; LLMClient and CodegenClient subclass it with
their own endpoints, sampler defaults, and error types.

Draft authoring now runs on its own async single-slot worker: a create
request queues, the gate stays free, a category job chains into its skill
job, and the original request re-runs when the body lands. An unreachable
llm endpoint is graceful (draft_failed trace, user notified, no
re-dispatch); only SemIf availability is fatal. Elicitation is deferred on
every front end (REPL included) now that authoring is async.
2026-09-29 22:18:01 -05:00
Denton Social 22f91e0360 response: rebuild as a closed tree of canned replies; drop the gate
There is no up-front handle/ignore filter any more. Every input is scored
and dispatched; inputs that are not tasks fall through navigation into the
closed response category of hardcoded canned lines (greeting/thanks/
acknowledge/farewell/affirm/unable + the catchall response.clarify). The
category is CANNED_CATEGORIES: navigation offers no create_skill there,
dispatch/restart refuse to author it, and the runner skips assessment and
repair for it (a canned line has no side effect to assess).

Removes _contains_request/build_gate_decision and the dropped path.
2026-09-29 03:46:53 -05:00
Denton Social a29371f510 navigation: confidence gate on create_skill/create_category
The create branches share a softmax with the real options, so a weak
plurality win was enough to trigger authoring. Require P(create) to clear
navigation.create_tau and lead the best existing option by
navigation.create_margin; otherwise fall back to the best existing option
(the intent guard remains a second door) and trace create_suppressed.
An empty tree/category still short-circuits straight to create.
2026-09-29 02:47:43 -05:00
Denton Social 98ec4ee5e2 codegen: move bridge specifics into the catalog
Bridge specifics (service, base-URL config var, auth header/token var,
config-var docs, endpoints with error shapes) now live in BridgeInfo and
render through describe_bridges(), which is injected into body, retry,
regen, elicitation, and testgen prompts. SKILL.md/TESTGEN.md carry only
the generic pattern.

- regen prompt regains the catalog (was a dangling reference)
- elicitation integration hint rides body/retry/regen as an advisory
- top-level simplex_bridge_token config var; bootstrap syncs it
- simplex seeds read the token and send X-Semif-Token when set
2026-09-28 23:30:44 -05:00
Denton Social 3d0cff325c assessment: make assess/fidelity SemIf decisions, drop LLM from decision path
Assessment was an LLM generation step emitting prose. Move it to SemIf:
- assess:outcome (success/failure @ tau) and assess:requeue (complete/retry,
  updated_request = request.text bounded by max_reentries) are logged decisions.
- Run summary is deterministic (category.skill + ok/failed + action_log/new_state).
- Fidelity gate is a real authoring:fidelity accept/reconsider decision plus
  static integration findings; it only triggers a rewrite, never a diagnosis.
- Corrective regens receive the raw evidence bundle as-is (render_evidence),
  never an LLM paraphrase.
- Every EngineUnavailable is fatal app-wide: Scheduler.fatal is recorded, the
  worker stops, and the CLI prints 'decision engine not available' and exits
  non-zero. Remove llm.assess/review_skill_body (keep _parse_json).
- Tests: ScriptedEngine double in tests/conftest.py for scheduling mechanics;
  replace the review_skill_body integration test with a SemIf fidelity test;
  add deterministic-summary and evidence-renderer unit tests.
2026-09-28 17:49:26 -05:00
Denton Social ddc5cb66c8 bridges: standalone third-party API bridges; isolate the command gateway
Split messaging UX (invite links, read, send) out of the command gateway into a
new `semif_agent.bridges` layer. Each bridge is its own process (`cli bridge`)
against its own service daemon/profile; the SimpleX bridge owns a second
simplex-chat daemon and buffers every inbound DM, so a message sent to the
connect-link address shows up in `simplex.next_message`.

- new: bridges/{base,inbox,registry,simplex}.py + neutral semif_agent/simplex_ws.py
- gateway: delete bridge.py; drop address/observer/pull-mode from the command path
- codegen: inject the bridge catalog (describe_bridges) into body + elicitation prompts
- seeds: repoint simplex.next_message/connect_link to top-level `simplex_bridge_url`
- config/bootstrap: new top-level `bridges` block + `simplex_bridge_url`; render
  semif-simplex-forward + semif-bridge units; gateway config loses bridge/inbox
- docs: AGENTS.md gateway isolation is non-negotiable
2026-09-28 15:24:44 -05:00
Denton Social a9b096f2e8 gateway: show/create the SimpleX contact link (simplex.connect_link seed)
Add a reusable corrId->Future request path to SimplexAdapter so the daemon
can be queried off the event loop, expose it as GET /address on the local
messaging bridge (injected address_provider; 503 unwired, 502 on daemon
failure), and ship a simplex.connect_link seed that reports the bot's short
and full contact link honestly, creating it on first call.
2026-09-28 05:14:01 -05:00
Denton Social 9057213217 docs: fold codegen backlog insights into the codegen section
The completed codegen guardrails backlog carried durable findings that
were not yet in the codegen section: SKILL.md commit-ref provenance
(skill_contract_ref / contract_ref / contract_dirty), the Modelfile-only
sampler knobs behind the per-request presence_penalty cure, the
DegenerationError no-retry behavior, and the ollama /api/show
parameters-as-text shape + budget-is-a-safety-net note. Transfer those,
add the gateway messaging backlog, and drop the now-empty [x] backlog.
2026-09-26 22:22:24 -05:00
Denton Social 08d6bb23e2 gateway: serve a local messaging bridge so skills can send/read SimpleX
The gateway now exposes a localhost stdlib HTTP API (bridge.py) that
buffers authorized inbound DMs and forwards outbound sends, so a skill
body never opens a WebSocket to the simplex-chat daemon. Endpoints:
GET /health, /contacts, /inbox (peek), /inbox/next (pop oldest unread),
POST /send (resolve id/display name onto the adapter's outbound queue).
GatewayService gains an observer hook and inbox.dispatch (pull-only mode).

Expose the capability to codegen (SKILL.md, BODY_DIRECTIVES, elicitation,
TESTGEN.md) and add the simplex.next_message seed (SemIf recipient
resolution) with its hermetic loopback test. Config: messaging_bridge_url
plus gateway.simplex.{inbox,bridge}; bootstrap keeps them in sync.
2026-09-26 21:39:39 -05:00
Denton Social 5f05c5c749 bootstrap: split --llm-url (local) from --codegen-url (guppy), pull the local model
The small self-assessment model runs on this box's local ollama; only codegen
travels to the peer host. Replace the single --peer-ollama (which pointed llm
and codegen at guppy) with --llm-url (default http://127.0.0.1:11434) and
--codegen-url (default guppy). Bootstrap now pulls llm.model from the local
ollama if missing (API /api/pull, CLI fallback) and probes llm and codegen
separately (codegen WARN-only, never auto-pulled). Correct AGENTS: guppy is the
codegen host, jarvis runs its own ollama for qwen3.5:4b.
2026-09-26 19:27:12 -05:00
Denton Social c92aff5038 gateway: run simplex-chat bot under a PTY so it pumps WS events
Plain bot mode under systemd has no controlling terminal, so the CLI accepts
the WebSocket socket but never emits receivedContactRequest/newChatItems —
contact requests hung unaccepted. Wrap ExecStart in script(1) to allocate a
PTY; the events then flow and the gateway auto-accepts. Add util-linux to
bootstrap prereqs.
2026-09-26 18:45:19 -05:00
Denton Social 6059bec1e4 gateway: run simplex-chat in bot mode, not relay/headless
In v7 --headless means "chat relay" (requires --relay) and yields a relay
address, not a user contact address, so the bot could not be added as a
contact. Run bot mode instead (-p PORT --create-bot-display-name), which needs
no TTY and is restart-safe. simplex-address.py now creates the user contact
address on first run (/_address + /_show_address), and bootstrap invokes it
after the services start and prints the link.
2026-09-26 18:33:57 -05:00