Skip to content

cosmonapse-core: release notes, v0.1.12 to v0.1.14

Latest

Choose a tag to compare

@AqibKhan26 AqibKhan26 released this 20 Oct 22:23
· 8 commits to main since this release

Covers everything after v0.1.12 (2026-08-11) up to and including v0.1.14 (2026-09-24).

  • v0.1.13 (9803cb8, 2026-09-24): Glia, the AUDIT signal, the repair loop, and the removal of THOUGHT_DELTA.
  • v0.1.14 (3627eb2, 2026-09-24): cosmo init scaffolds a Glia card.
  • Size of the range: 56 files, 10,616 insertions, 514 deletions, 12 commits.

Summary

The release adds Glia, a two-way policy gate that an Axon, an Effector or an Engram can carry. Glia comes with a new AUDIT signal, a bounded correction loop in the Axon, and trace-wide limits on the Dendrite. Genesis and Prism both show which components carry a card. cosmo init now scaffolds one. One signal type, THOUGHT_DELTA, is removed, which is a breaking change.

A card defaults to mode off, so an existing brain behaves as before until a deployment turns it on. The one change that can break existing code is the THOUGHT_DELTA removal.

Breaking changes

THOUGHT_DELTA is removed. This covers the signal type, thought_delta_signal, Dendrite.emit_thought_delta, @dendrite.on_thought_delta, and the event: delta SSE frame on ChatReceptor. Nothing in the SDK produced it. AUDIT takes its slot in SYNAPSE_TYPES.

Migration:

  • Replace @dendrite.on_thought_delta with @dendrite.on_audit where you observed repair progress.
  • Replace emit_thought_delta with your own signal type, or with emit_audit.
  • A chat page that read event: delta should read the record off event: signal, or off the reply's meta.glia. The generated chat page no longer has a delta branch.
  • @pw.on(SignalType.THOUGHT_DELTA) on a Pathway no longer exists. Use SignalType.AUDIT.

Compatibility, as stated in the changelog: a peer on an older SDK that receives an AUDIT logs one warning and drops it. Nothing crashes and no subscription dies. In a mixed-version namespace an audit record can go missing, which is why the verdict also rides the terminal reply's meta.glia.

Added

Glia, a policy gate on each component (v0.1.13)

  • An Axon, an Effector or an Engram may carry one card (cosmonapse.glia). The card reads every signal entering and leaving the component and refuses, rewrites or escalates it.
  • Each policy has a direction (inbound, outbound or both, default both), types (signal types, default all), a verdict, and a retry of reask, resend or none (default).
  • Decorators are @card.on_signal(direction=..., types=...). Handlers receive a read-only SignalView and return a Verdict, or None to fall through.
  • Policies can also live in a file: Glia.load("x.card"). Both are evaluated, the file first.
  • Mode is off, audit or enforce, default off. In audit a violation emits an AUDIT record marked would_block and nothing is refused.
  • A card is mounted at construction (Axon(..., glia=CARD), Effector.serve(..., glia=CARD), Engram.serve(..., glia=CARD)) or at attach time (node.attach_axon(hello.AXON, glia=CARD)).
  • The Effector and Engram gates run in Effector.handle and Engram.handle. The Axon gates its own recall, imprint and call_tool through the clients. A Receptor takes no card.
  • A card also carries the repair budgets, trace limits, journal and audit rate. The wire field is meta.glia. See design/GLIA_DESIGN.md (new, 1,124 lines).
  • New package files: glia/base.py, glia/artifact.py, glia/journal.py, glia/__init__.py.
  • New top-level exports: Glia, Verdict, Decision, Direction, Retry, SignalView, Mode, PolicyOutcome, PolicyRefusal, PolicyError, PolicyArtifact, PolicyRule, RepairPolicy, AuditKind, AuditOutcome, TraceLimits, Journal, InvalidOutput, TraceLimitExceeded, audit_signal.

The correction repair loop in the Axon (v0.1.13)

  • One loop serves three callers: an output nothing claimed (opt-in strict_output, raising InvalidOutput), tool arguments that failed their schema, and a policy refusal whose policy asks to reask.
  • It is bounded by the lower of the policy's max_attempts and repair.max_attempts, and optionally by repair.deadline_s. A next attempt whose input would be identical is not made.
  • Transient retry for Effector and Engram is a separate knob. A policy refusal never feeds it.

Trace-wide limits on the Dendrite (v0.1.13)

  • component mode: exact for what this Dendrite emitted, needs no subscription, and is the default.
  • trace mode: approximate, needs the broadcast subscription.
  • An AUDIT counts as nothing against a trace limit, so a limit cannot suppress its own audit trail.

The AUDIT signal (v0.1.13)

  • One record per policy or repair event, on its own subject, so a compliance consumer can subscribe to cosmonapse.<ns>.AUDIT and nothing else.
  • Seven kinds, each rolling up to a domain: GUARD_RETRY and GUARDED (security), EVAL_RETRY (eval), TOOL_RETRY (tool), TRANSIENT_RETRY and DEADLINE_ABANDONED (reliability), LIMIT_REFUSED (governance).
  • Outcomes: re_asked, resent, recovered, exhausted, uncorrectable, refused, redacted, escalated, would_block.
  • Records carry hashes of matched content, never the content itself.
  • Emitted at the event, one per event, so no AUDIT on a trace means nothing fired.
  • API: Dendrite.emit_audit, @dendrite.on_audit. ENVELOPE_SPEC.md documents the payload fields and compatibility note.
  • An Axon's repair loop triggers an AUDIT, but the hosting Dendrite publishes it, the same way it publishes REGISTER.

cosmo init scaffolds a card (v0.1.14)

  • New glia/ folder with __init__.py and policies.py. policies.py defines one card, card_id="policies", mode="off", with an example inbound policy bounded_name that denies a TASK whose name is longer than 64 characters.
  • brain.py imports from glia import policies and mounts it with node.attach_axon(hello.AXON, glia=policies.CARD).
  • COSMONAPSE_POLICY_MODE=audit python brain.py records violations without blocking. COSMONAPSE_POLICY_MODE=enforce python brain.py applies verdicts. The environment value wins over the mode in code.
  • The generated README lists glia/ and has a new "Policy?" entry explaining the audit then enforce path.
  • The generated terminal Receptor now checks for an error key first and prints refused: <error>, because a refused TASK answers with {"error": ..., "refused_by": "policy"} in place of the Neuron's output.
  • New tests in tests/test_cli_init.py check the files are written, the card is attached in brain.py, and the card ships in mode off.

Genesis

  • Glia layer on the canvas. A gold layer is drawn on any Neuron, Engram or Effector that has a card mounted. Genesis reads this from the source with ast, so glia=None, a def f(glia=None) signature and a comment mentioning glia do not count. It checks both the component module and the attach_* calls in brain.py, including from neurons import hello as h aliases. Receptors never carry the layer. The legend shows a "Glia · policy card" entry once a card exists.
  • Every project file is editable in the Code tab. Previously brain.py, config.py, the README and the other wiring files were read-only. A new FileEditor component edits any project file, including each package's __init__.py. Saving goes through POST /api/file. The editor's own documentation states the endpoint is confined to the project and refuses a .py file that does not parse. Hand edits to brain.py are kept, and the next add or remove works from whatever is on disk.
  • Form and Source views for a component. A component module opens in a Form view (the existing config form) or a Source view (the whole module, including what the form does not model). The choice persists as you move down the sidebar. Messages that used to say "read-only here, edit in your editor" now point to the Source view.
  • Package __init__.py files appear in the sidebar. They are editable and cannot be removed as components.
  • The protocol catalogue gained a "Policy and audit" group with on_audit, and dropped on_thought_delta.
  • Start screen and header copy refreshed. The header comment now describes Canvas, Code and Test as three lenses on one project.

Prism

  • Glia layer on the canvas. The same gold layer, geometrically identical to Genesis's. It is drawn only when a card's mode is not off, because an off card reads nothing.
  • Prism learns about a card from meta.glia on the participant's REGISTER. If Prism joined after the REGISTER, it infers a card from an AUDIT carrying card_id and marks it as inferred. A later REGISTER without meta.glia removes the layer.
  • AUDIT is drawn as a gold particle from the component to the synapse. It is not paired with the next reply on the trace, because an AUDIT answers nothing.
  • An AUDIT is counted on the node, but it does not change the node's last signal type or colour, and it is not used to infer a trace's worker in the constellation view.
  • Tooltip shows glia (card id, mode, policy version, or "seen via AUDIT") and an audits count. Clear resets the audit count and leaves identity alone.
  • AUDIT has its own colour in both themes. A new glia colour token exists in the dark and light palettes.

CLI

  • Grouped root help. cosmo --help renders a banner and commands grouped as build, run, observe and shell, with a quick-start line. It falls back to click's default when rich is not available.
  • Genesis and Prism are imported defensively. If either is absent, cosmo still starts, every other command works, and the missing one fails as a plain "No such command". The comment in main.py says this is so a cloud image can install its own build in place of the bundled one.
  • AUDIT is shown in yellow in CLI output where THOUGHT_DELTA was dim white.
  • The genesis.py docstring now mentions the Test tab and the helper modules _genesis_run.py and _genesis_synapse.py.

Docs and repository

  • CODE_OF_CONDUCT.md added (Contributor Covenant).
  • Root README.md: the "names are borrowed from biology" lexicon table moved below the product section, and the text referring to it was updated.
  • ENVELOPE_SPEC.md, SDK_DESIGN.md, DECISIONS.md and the python-sdk README updated to replace THOUGHT_DELTA with AUDIT.
  • packages/genesis-ui/README.md notes that Canvas lays the project out, Code edits it and Test runs it.
  • CHANGELOG.md gained 210 lines, all under [Unreleased].

Known limitations

  • Glia does not authenticate signals. directed.id is a claim, so a policy on it stops mistakes and misrouted traffic, not an attacker on a shared broker. Treat a shared broker as a trusted zone until signing ships.
  • An audit record can go missing in a mixed-version namespace. The verdict on the reply's meta.glia is the authoritative copy.
  • Prism and Genesis show whether a card is mounted. A card's policies never ride the wire, so neither tool displays them.
  • Genesis detects a mounted card from source. Whether the card's mode is off lives in the card file, so Genesis answers "is a card mounted", and Prism, which sees the REGISTER, is where the mode shows.

Upgrade notes

  1. Search your code for THOUGHT_DELTA, thought_delta_signal, emit_thought_delta, on_thought_delta and event: delta. Each needs replacing as described under Breaking changes.
  2. No other existing API changed in this range. Nothing is gated until you mount a card and set its mode.
  3. Existing projects are not modified by cosmo init. To get the glia/ folder, scaffold a new project or copy the files from a fresh one.
  4. Versions come from git tags (hatch-vcs), so builds of the tags above produce 0.1.13 and 0.1.14.

Maintainer notes

  • CHANGELOG.md has no [0.1.13] or [0.1.14] section and the scaffold change is not described anywhere in it. This document can be used to cut both.
  • The commits "fixes", "Removed git", "junk delete" and "Fix ruff" show no net user-facing change against v0.1.12 that I could attribute to them from the diff. Genesis's git features were built and removed inside this range.
  • The Glia sections are taken from CHANGELOG.md and checked against the diffs for exports, the envelope spec, Genesis, Prism and the scaffold. I did not read the 2,259-line glia/base.py or the Glia tests line by line, and I did not run the test suite.