Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changeset/ui-react-default-root-wrappers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"@schlessera/brain-ui-react": patch
---
Remove nine internal default-root wrappers that no entry point exported and nothing called. The public API is unchanged.
6 changes: 6 additions & 0 deletions .changeset/ui-unused-module-exports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@schlessera/brain-ui-server": patch
"@schlessera/brain-ui-kit": patch
"@schlessera/brain-ui-react": patch
---
Removed: the `export` keyword from 478 module-level names that no other file imported and no entry point reaches. Names that were also unused in their own file were deleted. No entry point's exports changed.
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,14 @@ internal: no compatibility promise, valid only at the same lockstep version.
import of gray-matter. The reason is in
[docs/decisions/frontmatter-parsing.md](docs/decisions/frontmatter-parsing.md).

In ui-server, ui-kit and ui-react, `bun run lint` refuses an `export` in `src/`
that no other file imports (`scripts/check-unused-exports.ts`). Drop the
keyword, or delete the declaration if its own file does not use it either. An
entry point's own exports and the declarations its api-report signatures
record are exempt. Anything else that has to stay exported, such as a type
that another file's declaration emit infers, gets an allowlist entry with a
one-line reason in that script.

The invisible-character and leakage gates here are brain-kit's own. A
deployment keeps its own copies with its own patterns, and a copy that runs
before `bun install` stays dependency-free.
Expand Down
35 changes: 8 additions & 27 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/decisions/action-notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ Collection for a chat environment is not authenticated notification-zone
binding or lifecycle freshness proof.

Existing activity digest generation serializes its transaction
(`generateActivityDigest`, `packages/ui-server/src/activity/digest.ts:31-39`)
(`generateActivityDigest`, `packages/ui-server/src/activity/digest.ts:30-38`)
and owns an activity-specific window/coverage marker
(`generateInTx`, `packages/ui-server/src/activity/digest.ts:41-101`).
(`generateInTx`, `packages/ui-server/src/activity/digest.ts:40-100`).
Those mechanisms provide prior art; that global marker cannot represent
client-context waiting episodes or discard older unreported decisions.

Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/agent-observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ interpretation layer added by this proposal.

The existing generator reads per-run rollups, computes counts and costs, and
selects notable failures (`generateInTx`,
`packages/ui-server/src/activity/digest.ts:41-102`). Those counts and the failure
`packages/ui-server/src/activity/digest.ts:40-101`). Those counts and the failure
list do not justify the model cost and latency of an additional prose pass.
It would also need factual validation to keep the summary faithful to the
rollups, plus a fallback when the model is unavailable or returns unusable
Expand Down
4 changes: 2 additions & 2 deletions docs/decisions/answer-delivery.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ that fails leaves the card editable and sends nothing, because sending an
answer that would not survive a reload breaks the promise the queued state
makes. After a reconnect or a takeover, every held answer asks for its
status first and is sent again only while the host reports it `pending`
(`function replay(entry`, `manager.ts:321-325`).
(`function replay(entry`, `manager.ts:319-323`).

Admission against Queue A is decided, and its storage write committed, under
one lock that every tab shares. The count and byte totals are read from what
Expand Down Expand Up @@ -174,7 +174,7 @@ A host hello can arrive while startup is still reading the previously stored
principal. The completed storage read is only a fallback: it cannot replace
the newer host identity, even with an empty first-visit value. A read begun
before logout or disposal cannot restore admission authority (`async function
restore`, `packages/ui-react/src/lib/answer-delivery/manager.ts:705-725`). Without
restore`, `packages/ui-react/src/lib/answer-delivery/manager.ts:703-723`). Without
the check after the await, a real offline Submit could incorrectly say Not
saved, or queue its answer under an older principal.

Expand Down
12 changes: 6 additions & 6 deletions docs/decisions/claude-code-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ next to it.
`@schlessera/brain-backend-claude` at `^0.3.241`
(`"@anthropic-ai/claude-agent-sdk"`,
`packages/ui-backend-claude/package.json:49`), resolved by this repo's
lockfile (`"@anthropic-ai/claude-agent-sdk": [`, `bun.lock:505`): 0.3.278 when
lockfile (`"@anthropic-ai/claude-agent-sdk": [`, `bun.lock:504`): 0.3.278 when
this record was written, 0.3.280 from 0.37.0, 0.3.283 from 0.38.0.
The binary at `CLAUDE_CODE_PATH` is whatever the host put there.

Expand All @@ -87,13 +87,13 @@ than recalled:
(`node_modules/@anthropic-ai/claude-agent-sdk/sdk.d.ts:1887-1889`).
- The built-in executable is a real Claude Code release, shipped as per-platform
optional dependencies pinned to the SDK's exact version
(`optionalDependencies`, `bun.lock:505`, eight
(`optionalDependencies`, `bun.lock:504`, eight
`claude-agent-sdk-<os>-<arch>[-musl]@0.3.278` entries), each with an integrity
hash in the lockfile
(`"@anthropic-ai/claude-agent-sdk/@anthropic-ai/claude-agent-sdk-linux-x64": [`,
`bun.lock:2589`). The public SDK's platform package is nested because the
private development-only hygiene research alias retains its original292 pair;
the public backend still resolves293. The SDK carries a manifest naming the release and a checksum
(`"@anthropic-ai/claude-agent-sdk-linux-x64": [`,
`bun.lock:514`). The platform packages are hoisted again now that the
development-only hygiene research alias and its 0.3.292 pair are gone
(#2509). The SDK carries a manifest naming the release and a checksum
per platform (`node_modules/@anthropic-ai/claude-agent-sdk/manifest.json`:
`"version": "2.1.278"`, `linux-x64` checksum `5c47359…`).
- It is byte-identical to the standalone release. `sha256sum` of the SDK's
Expand Down
11 changes: 10 additions & 1 deletion docs/decisions/design-kit/sessions-and-drafts.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,20 @@ of the [six-part #943 design](https://github.com/schlessera/brain-kit/issues/943
(2026-10-04) with its four residual answers, R1–R4 (2026-10-05). Where
those later rulings do not replace it, the supplied navigation and
parallel-session designs still bind; §8 lists what carries over. The measured input is
[`docs/plans/navigation-recovery.md`](../../plans/navigation-recovery.md)
[`docs/plans/navigation-recovery.md`](https://github.com/schlessera/brain-kit/blob/5a0ce18fdcecf0a6c5b83487c865a3f73806d5d0/docs/plans/navigation-recovery.md)
(#942). The row's adopted geometry is the
[shared-row design](https://github.com/schlessera/brain-kit/issues/929#issuecomment-5998113323),
which amends the #943 strip.

> **2026-11-02 — The measured input left `docs/plans/` ([#2511](https://github.com/schlessera/brain-kit/issues/2511)).**
> #942, #943, #964, #965, #910, #951 and #979 are closed, and the Sessions
> destination, host-backed drafts and latest-turn recovery are in source
> (`const destinations`, `packages/ui-react/src/components/layout/desktop-routes.ts`;
> `packages/ui-server/src/drafts/`). The report held measurements and
> follow-up ownership, not rulings; every ruling it fed is in this entry. Read
> it unchanged at the pinned link above. Its probes stay in the tree at
> `scripts/probes/navigation-recovery/`.

**What this amends.** D37 §1's destinations and New chat placement; D22's
≥1280 list pane and the space between transcript and composer; and the
drawing of #93's New chat disc. It replaces the supplied tracker rules
Expand Down
18 changes: 16 additions & 2 deletions docs/decisions/design-kit/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,28 @@ approval; it is a design, not evidence of a shipped pane or removal operation.
The screenshots in the original brief illustrate the proposal; the rulings
and layouts here control where the proposal differs.

The [accounting model](../../plans/storage-accounting.md) supplies ownership,
object identity, capacity scopes and coverage. The [lifecycle model](../../plans/storage-lifecycle.md)
The [accounting model](https://github.com/schlessera/brain-kit/blob/5a0ce18fdcecf0a6c5b83487c865a3f73806d5d0/docs/plans/storage-accounting.md) supplies ownership,
object identity, capacity scopes and coverage. The [lifecycle model](https://github.com/schlessera/brain-kit/blob/5a0ce18fdcecf0a6c5b83487c865a3f73806d5d0/docs/plans/storage-lifecycle.md)
supplies action eligibility and recovery. Read both with the later
[native storage decision](../native-brain-storage.md): immutable native
checkpoints, writable output staging, turn temp and retained recovery objects
have distinct owners and capacity. A lower-only deletion does not release
writable-upper headroom. Neither discovery authorizes a new retention policy.

> **2026-11-02 — Both discoveries left `docs/plans/` ([#2511](https://github.com/schlessera/brain-kit/issues/2511)).**
> #1779, #1780, #1781 and #2013 are closed, and the inventory, owner
> maintenance and recoverable removal they informed are built (#2009 in #2017,
> #2010–#2013 in #2172). Their recommendations and constraints that
> still bind are in this entry, chiefly under
> [Maintenance and ongoing management](#maintenance-and-ongoing-management) and
> [Implementation boundaries and deferred capabilities](#implementation-boundaries-and-deferred-capabilities);
> the shipped command and HTTP shapes are in the integration contract
> (`docs/integration-contract/cli.md`, `docs/integration-contract/http.md`).
> Read the discoveries unchanged at the pinned links above. The accounting
> experiment moved to the
> [measurement archive](../measurement-archive.md#storage-design-experiments-2511);
> the lifecycle experiment is still `experiments/storage-lifecycle.ts`.

### Placement and alternatives

Storage is the eighth Settings pane, in **This brain**, immediately after
Expand Down
Loading
Loading