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.
CODEGEN.md:
- replace the stale "Manifest schema" (allowed_inputs/actions/cost_budget/
decision_log_ref, a dotted leaf name) with the real registry shape and note
the body writer does not author it
- document ctx.timers (and that ctx.admin is built-in-only) and the
request.meta resume cache, both used by the authoritative seed set
- correct acceptance criteria: INTEGRATION is not hard-rejected (inferred /
fidelity-gated); note which items the parser actually enforces; compile ->
ast.parse
- fix the SemIf URL, the structured-state claim (state is a string here), the
config_vars/CONTRACT relationship, and defer llm_bridge_* names to the catalog
TESTGEN.md:
- separate the only static check (ast.parse) from execution (exit 0); state
that stdlib-only/inline-fixtures/hermeticity are required but not verified
- clarify contract.json is handed to the test writer as context
README.md: fix the same stale manifest field list.
tests/test_codegen.py: add guards for the runtime surface and against the
stale manifest fields returning.
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.
CODEGEN.md was strong on real integrations and config plumbing but silent on
the two things that make a skill turn a query into an output: reading
request.text for per-request arguments and returning the real result. Bodies
(and the old query-agnostic health-check example) were free to ignore the
request and return a generic string.
- add "Turning the request into arguments": read request.text, keep
per-request arguments out of CONTRACT, resolve targets with a SemIf
sub-decision, needs_input only for genuine ambiguity
- add "Producing the result (output)": action_log/new_state must carry the
fetched data or the service's real response, never a placeholder
- replace the worked example with a task-shaped body (extract tracking number
from the query, real HTTP lookup, real result) that passes the parser
- add import-time-safety and single-phase-resume rules + acceptance criteria
- mirror the two requirements into BODY_DIRECTIVES so first/retry/regen
prompts carry them, with tests asserting both
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.
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.
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
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.
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
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.
email.compose and tracking.check were hardcoded fakes (draft files / local
JSON, no real service) that shadowed the authoring path for real skills.
Remove them, delete their data fixtures and config keys, and ship a real
starter integration instead: seeds/calendar/next_event, a Nextcloud CalDAV
body in the SKILL.md folder format (PROPFIND calendar discovery + SemIf
calendar choice, calendar-query REPORT with server-side recurrence
expansion, all-day/TZID parsing, honest failures) with a hermetic
skill.test.py. merge_seed_store loads seeds into every tree at startup;
recorded config lands in gitignored data/skills/, and generated bodies
replace seeds of the same name. Only service-free response.reject stays
built-in.
Anchor the product premise at the top of AGENTS.md: semif-agent is an
end-user app that does the user's task for real against their actual
service, asking a few questions and learning when it doesn't know how.
Elicitation now asks implementation questions (service/account, how to
connect, credential source, expected result) and is on by default. The
REPL asks inline; the dashboard defers via a question queue the worker
waits on (/api/questions + panel). Answers ride every body attempt and
persist in the registry so restart doesn't re-ask.
SKILL.md requires real actions via stdlib transports with values from
ctx.config and a module-level INTEGRATION declaration
(service/transport/config_vars). TESTGEN.md scopes tests as hermetic
mechanics checks (loopback http.server in-test, never fixture addresses
in bodies) that never certify the live integration.
After the body lands a fidelity review (small LLM + static declaration
findings) regenerates a simulated body once, then accepts it traced and
badged unverified. A failed real run logs a SemIf repair choice
(retry/repair_skill/ask_user/no_repair), surfaced in REPL and dashboard,
bounded by codegen.repair.max_attempts and user-confirmed.
Dev unit suite: 191 passed. Jarvis integration run still pending.
The testgen call now replies with plain Python (no JSON envelope), so the
model can no longer confuse the envelope with the artifact. skill.test.py
carries its fixture data inline as Python literals; the folder layout is
now skill.py, skill.test.py, contract.json, config.json. The regen ladder
drops the mock option (3-option: code/contract/test) since a fixture fix
is a test regen.
CodegenClient now sends temperature/top_p/presence_penalty/frequency_penalty
(card-endorsed high presence_penalty, temp 0.7 instead of greedy 0.0) and
generate_skill_body escalates on invalid parse with an escalated sampler
(temp 0.5/presence 2.0) and a fresh short corrective prompt, up to max_attempts.
Degeneration aborts are a distinct DegenerationError(CodegenError) that
propagates without retry; retry-on-degeneration is left open. Marks guardrail
items 5/6 per the model card.
CodegenClient accepts a per-chat degeneration_check callback polled every
interval chars against the last window chars of content+reasoning (bounded
rolling buffer); a non-None return aborts the stream. build_scheduler wires a
2-option SemIf continue/stop decision (P(stop) >= threshold aborts) recorded
as a trace-only codegen event, degrading to keep-going when the engine is
unavailable.
qwen38-iq3s reasons extensively before emitting the skill body. A max_tokens
cap truncated the hidden reasoning (finish_reason: length) leaving content
empty, so the body write failed with 'skill body is empty'. Omit max_tokens
so the model runs to completion (~7 min); reasoning is filtered automatically
since only content is read. Client timeout default raised to 1200s.
create_skill now writes a real predict/act body: the small decision model
still authors title + description (engine.generate), then a larger
OpenAI-compatible model (default qwen38-iq3s) writes the runnable code
against the SKILL.md contract. Bodies persist to data/skills/<cat>/<name>.py,
are hot-loaded via importlib, merged into the running tree, and the request
re-dispatches to the new leaf. The dashboard decision-flow view shows the
title/description with a writing badge while the body is being written.
Codegen failure degrades to a navigable stub.