Skip to content

v0.116.0

Choose a tag to compare

@davidfarah-dev davidfarah-dev released this 28 Oct 09:51
2cbf879

Install or update: npm i -g cotal-ai@0.116.0

Changes in this release

  • Cut what an idle seat costs its host, with stock build and runtime mechanisms.

    Every connector bundle that loads into a long-running process now ships as one-byte text. V8 holds a
    string at one byte per character only while every character is Latin-1, and a single character above
    U+00FF made each 5 MB bundle two-byte for the life of the process. The characters were em dashes and
    arrows in comments, so the bundles are built with esbuild's --minify-whitespace, which drops
    comments and the parentheses around a single arrow parameter, and keeps every identifier. Anything
    matching text in a built bundle sees the second part: (e) => f(e) now reads e=>f(e). pnpm smoke:connector-bundle-text reads the 19 built bundles
    and fails on any character above U+00FF. Stack-trace frames keep their function names and their line
    and column numbers move, because the bundle is now fewer, longer lines.

    The Claude Code connector's seat is launched through a new entry, dist/seat.cjs, which enables
    Node's module compile cache in ~/.cotal/compile-cache and then loads dist/mcp.cjs. Node's cache
    covers modules compiled after it is enabled, so the entry has to sit in front of the bundle. The
    directory is created 0700 like the rest of ~/.cotal, whatever the launching umask was. A cache
    that cannot be opened prints one line and the seat serves without it,
    NODE_DISABLE_COMPILE_CACHE=1 turns it off, and NODE_COMPILE_CACHE takes precedence and is left
    alone. dist/mcp.cjs remains the library entry (@cotal-ai/connector-claude-code/mcp) and still
    serves when run directly.

    The declared Node floor rises from 22 to 22.10, which is where module.flushCompileCache() lands,
    and every package's engines.node now says so. The cotal binary checks it at its front door and
    refuses an older runtime with the floor, the running version and the repair for how it was
    installed; the seat entry refuses before its first cache call, so an old Node gets one sentence
    rather than a TypeError; and the installer compares the minor version, so a host whose own Node is
    22.9 gets the pinned Node downloaded and verified instead. node dist/mcp.cjs still serves on an
    older runtime. Operators moving a host read
    the upgrade note.

    Measured on one idle seat per arm, Node v22.23.2, paired and read at 160 s and 600 s: 41.9 MiB USS
    on the stock bundle, 35.2 with one-byte text, 26.3 with the seat entry's compile cache as well.

  • cotal channel lists a registry key whose value does not decode, with the decode error, and readChannelRegistry returns those keys in undecodable. A single-key read still resolves such a value as unset, as an endpoint's registry watch does. A later write does not replace those bytes: cotal up, including one whose channel seed would write the key, and cotal channel set or channel defaults, refuse with CONFLICT and leave the key as it is. channel remove removes it. A defaults value that decodes but names no delivery class is still filled.

  • A workflow conclave's membership write is fenced by each member lifecycle's exact read-ACL row, as the delivery daemon's join is: the row is read just before the commit and again after it, a member the row no longer covers gets no row, and a row written while the row was narrowed is removed by its exact key. Before, a conclave executing while a member was retiring could create that member's row after the retirement's inventory, and the retired lifecycle kept it. The run-mediator profile gains the read of the ACL registry this needs; a mesh without that registry (open mode) is unchanged.

  • recordGoalIndex now refuses a same-goal record over an entry clearGoalIndex already deleted with failed-precondition, naming the goal as settled or withdrawn. It used to report that normal end state as store corruption with internal and "reconcile the store", which it still does for an absent or purged key.

  • The delivery daemon keeps its in-memory retirement mark only for a lifecycleMemberships inventory whose caller did not fence the lifecycle's read-ACL row first. A fenced or retired row refuses every later durable join by itself, so such an inventory leaves no mark; before, every retired alias that never retired again kept one entry per space lane until the daemon restarted. An inventory from a manager that does not fence is marked as before.

  • Keep open managed-seat persona operations, spawns and generic manager self reads on their launching manager without changing authenticated routing or grants.

  • A managed seat on a legacy-rail bearer no longer asks the broker for its accepted row on every manager call. The read is attempted once per credential and rechecked hourly; a refusal is remembered, so a seat that pulls its turns every 15 s stops putting one refused DIRECT.GET request in the broker's log each time (100k to 340k lines a day on one hosted mesh). Issued views are unaffected: their read succeeds and nothing is remembered. managerCallerBinding now also returns the bearer's credentialId when the issuer stamped one.

  • CotalEndpoint.readMembership() reads the membership feed with paged batched Direct Gets and binds no consumer. The observer and admin profiles gain $JS.API.DIRECT.GET.KV_cotal_membership_<space>. Before, each read bound an ordered consumer whose delete those profiles may not send, so every dashboard poll left a consumer to the broker's inactive threshold and a refused CONSUMER.DELETE line in the broker log (#4123). A credential an older issuer minted without the row is refused with the grant it lacks and the remint to make; it is not scanned instead.

  • watchMembership delivers each membership-feed entry to its callback as a MembershipChange (the decoded member record or its deletion, the heartbeat's asOf, and one replayed marker closing every replay) instead of a bare tick. The web dashboard, cotal view and cotal channel members --follow copy a heartbeat into their last snapshot's asOf and read the feed back only on a member change; before, every heartbeat the delivery daemon wrote cost each observer a full ordered-consumer rescan of the bucket with nothing changed.

  • assertValidName now refuses a name holding any line break a Unicode-aware splitter honours: VT, FF, NEL (U+0085), LINE SEPARATOR (U+2028) and PARAGRAPH SEPARATOR (U+2029), as well as CR and LF. Before, it tested only CR and LF, so new CotalEndpoint, agent-file loading, the gateway connect request and the manager's launch spec accepted such a name and published presence under it, although the validator states a single-line rule. The class is now exported from @cotal-ai/core as LINE_BREAK, and the connector's message framing uses the same definition.

  • The delivery daemon's trusted reader removes a retired lifecycle's member row when it drops an inbox entry fanned out against it. Such a row is left when a daemon dies between creating the row and its post-write ACL read; it authorizes nothing, but every later message on the channel was copied into the retired inbox and dropped again until the row went. The row goes by its exact key, only when it exists, where that cost is paid.

  • On a user-auth mesh, cotal send, cotal endpoints, cotal personas list --running and cotal channels list read the roster and the channel registry once on the user's bearer and leave no watch or scan consumer behind, as they already did on a static or open mesh. The agent profile, which the auth service mints for a user's connection, gains the batched Direct Get of the channel registry (it already carried the presence one), so an agent credential from cotal auth mint passed with --creds reads once too. A user connection an older auth service minted without that row is refused with PERMISSION_DENIED naming the update, never watched instead.

  • A pinned fetch that the policy refuses, a target that is not https and not a loopback http literal, or an answer that is a redirect, now throws PinnedFetchRefused with an unmarked message. A transport failure still escapes as whatever fetch threw. meshes add, meshes add --from and space add --from tell the two apart with instanceof and add ✗ where they print, instead of sniffing the glyph in the message. The policy refresh no longer strips that glyph before rethrowing. A bundle whose agent-provisioning URL fails the same rule still carries ✗ on the check the front end prints, like every other bundle refusal.

  • A multi-space host stopped by SIGINT or SIGTERM while a pass is still opening a space waits for that open, bounded by the open deadline, and closes the lane it produces before the host ends. Before, the lane joined the map after the stop had snapshotted the lanes to close and was never closed: a delivery host stopped in that window left the space's lease row in place until its TTL, and a restart was refused with "a live lease already exists".

  • packUnits refuses a unit that cannot fit in one frame as a unit. The message names the byte sizes, the event count and the run, and no longer calls the unit a source observation cut mid-record. A close hands the same function a terminal the emitter authored, which consumes no source record, and that refusal was telling the operator to look for a record the close never read. The reason a unit is never split stays in the function's doc comment.

  • POST /interactive-lifecycle/retire, POST /managed-lifecycle/retire and POST /manager-service-authority/verify-enrollment count a missing or wrong loopback capability in the same invalid-capability window as POST /exchange. The first 30 in a rolling minute answer 401 with the route's own reason, and a further one answers 429. Each refusal is logged. A correct capability is unchanged. The interactive retirement route still states outcome: "not-executed" on that refusal, because nothing was retired.

  • The console's Ctrl-P palette answers Enter on an action the session cannot take. A row marked read-only or no control path now hands the line to the command dispatcher, whose refusal on the status line names the missing permission (publishing, or manager control); before, the palette swallowed the key and nothing changed on screen. The action stays blocked: no picker, no spawn form, no send.

  • A down --preserve-state that is refused after it stopped the delivery daemon (the manager refuses to prepare, an endpoint the manager does not manage is live, or a seat cannot be checkpointed) starts the daemon again, so the mesh it leaves can spawn, retire and join; before, the daemon stayed stopped until the next cotal up while the refusal read as a running, unfenced mesh. The live-unmanaged-endpoint refusal is classified (LIFECYCLE_BLOCKED, exit 2, with a next step) instead of an unknown outcome, and a daemon that cannot be started again is named in the refusal with cotal up as the remedy.

What's Changed

  • fix(core): keep a registry write off an entry that does not decode by @davidfarah2003 in #5039
  • fix(cli): check held user-auth bundles as objects by @davidfarah2003 in #5042
  • fix(connector-core): ask for a legacy-rail bearer's accepted row once per credential by @davidfarah2003 in #5043
  • test(auth): expect a host 409 at enrollment as a held conflict, not a permission refusal by @davidfarah2003 in #5044
  • fix(auth): count a bad capability on the loopback host doors by @davidfarah2003 in #5046
  • fix(workspace): close the lane a multi-space host was still opening when a stop lands by @davidfarah2003 in #5045
  • feat(core): deliver membership-feed entries to the watch callback by @davidfarah2003 in #5047
  • fix(cli): explain a blocked command palette action on Enter by @davidfarah2003 in #5048
  • fix(connector-core): word a packUnits refusal for the unit it was handed by @davidfarah2003 in #5049
  • fix(cli): start the delivery daemon again when a preserve-state cut is refused by @davidfarah2003 in #5051
  • test(smoke): gate the two down live suites that shipped without a CI fragment by @davidfarah2003 in #5053
  • fix(core): remove a retired lifecycle's member row when the reader drops its entry by @davidfarah2003 in #5054
  • fix(core): keep the daemon's retirement mark only for an unfenced inventory by @davidfarah2003 in #5056
  • fix(connector-core): keep open seat controls on launching manager by @davidfarah2003 in #5052
  • fix(runtime): fence a conclave's membership write on the member's read ACL by @davidfarah2003 in #5057
  • fix(workspace): classify a pinned-fetch refusal by its class by @davidfarah2003 in #5058
  • fix(cli): user-mode one-shot commands read the registry once and leave no consumer by @davidfarah2003 in #5059
  • fix(core): read the membership feed with batched Direct Gets, binding no consumer by @davidfarah2003 in #5060
  • docs(workspace): move the pinned-fetch doc block onto its declaration by @davidfarah2003 in #5061
  • fix(core): refuse a cleared goal-index entry as settled instead of corrupt by @davidfarah2003 in #5062
  • perf(connectors)!: ship one-byte bundles, cache the seat compile, and require Node 22.10 by @davidfarah2003 in #5050
  • fix(core): refuse every line break in a name, not only CR and LF by @davidfarah2003 in #5063
  • test(core): narrow the deleted membership change once in the delivery reconnect smoke by @davidfarah2003 in #5064
  • chore(release): version packages by @davidfarah2003 in #5041

Full Changelog: v0.115.4...v0.116.0