Skip to content
Draft
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
5 changes: 5 additions & 0 deletions .changeset/3613-approved-owner-read-resolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@schlessera/brain-ui-server": patch
---

Bind immutable read identity evidence to independently published Settings owner approval. Record unavailable qualification for missing or mismatched approval, repository transfer/name reuse and replaced policy roots, and recheck inside the write transaction after waits. Bind publication to the qualified native filesystem and live-brain subvolume UUID, preserving ordinary restart while refusing recreated roots and unqualified hosts. Source trust remains disabled.
7 changes: 7 additions & 0 deletions .changeset/combined-trigger-future-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@schlessera/brain-ui-sdk": minor
"@schlessera/brain-ui-server": minor
"@schlessera/brain-ui-react": minor
---

Review one finalized trigger with optional future origin or tunnel trust. Show exact policy changes, keep recipient permission independent, and preserve publication/verdict receipts across retries and partial completion.
5 changes: 5 additions & 0 deletions .changeset/conservative-trust-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@schlessera/brain-ui-react": patch
---

Keep Security settings readable and enforcement-dependent edits disabled when a host omits trust capability advertisements.
5 changes: 5 additions & 0 deletions .changeset/egress-upstream-socket-ownership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@schlessera/brain-ui-sdk": patch
---

Give each cleartext HTTP proxy operation its own non-pooled upstream connection so a stale same-origin socket cannot produce a spurious 502. Preserve cancellation, admission fences and byte accounting without retrying requests.
73 changes: 73 additions & 0 deletions .changeset/exact-origin-trust.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
"@schlessera/brain-ui-server": minor
"@schlessera/brain-ui-sdk": minor
"@schlessera/brain-ui-react": minor
---

Enforce prospective exact-origin and explicit-tunnel source trust with separate restricted-recipient permission. This pre-1.0 semantic break lets qualified future inputs avoid unresolved triggers while retaining their historical rule, policy hash and revision. Removing a rule fences active admissions and interrupts trusted input streams; repository trust remains unavailable. Existing triggers, independent controls and provider history are preserved.

Bind pending Network approvals to actual transport identity and record the hash of freshly verified valid policy bytes even when trust rules are unchanged.

Enforce canonical bracketed IPv6 tunnels, retain last-valid live trust on bounded policy read failures, and prove DNS subdomains cannot inherit parent trust.

Classify live trust observations consistently: stable invalid or unreadable policy retains last-valid rules with an error, verification races fence, and unchanged chunks use metadata generation checks instead of full policy reads. Refresh rechecks after its durable write.

Normalize all transport host identities, recheck send authority on every HTTP write/end and tunnel chunk, and retain explicit recipient approvals independently of source trust.

Validate complete trusted admission variants on the wire, avoid absent-approval and unchanged-stream evidence scans with live change counters, and let independent readers recover after projection publication races.

Record unmatched source hash and revision from the same live snapshot used for matching, and display IPv6 provenance with bracketed authorities.

Preserve absolute DNS authorities during resolution/dialing separately from comparison keys, and retain the version-1 detector ID contract while strictly validating admission evidence.

Cancel queued turn-start trust refreshes with the turn signal, and distinguish budget, safety and unavailable charge results across proxy, inference/provider relays and managed reference acquisition.

Revalidate only an active input’s admitted source rule across trust revisions, unify source revocation audit/safety results, and reject invalid byte counts before either charge counter changes.

Retire source-rule instances durably across independent publishers, preserve typed commit/charge failures on managed streams, and classify post-write source revocation identically to notification and send fences.

Allow HTTP and tunnel completion exactly at the byte ceiling while preserving terminal safety checks and refusing bytes beyond it.

Separate preparation byte charging from dispatch notification and contacted-host grants, classify initial recording loss as unavailable, and preserve historical IPv6 session grants through canonical host lookup.

Capture one immutable typed refusal per egress operation before abort, preserve it through every caller and audit record, and fence outward exemptions with the active call-classification generation.

Guard the concrete proxy lifecycle through pending, admitted, dispatched and terminal states; distinguish exhausted new dispatch from exact-cap stream completion, fence closed wait continuations, and release all per-operation admission keys after terminal evidence.

Validate destination provenance through the wire schema before durable writes, cancel every upstream cleanup/request with its operation and deadline, and preserve unavailable classifications through repeated inference admission.

Capture relay error causes before terminal signal cleanup, preserve failed versus cancelled receipts and statuses across every response path, and release caller listeners from every operation termination path.

Preserve provider cancellation reasons, fence sends after preparation observers, and meter Files cleanup response headers.

Keep provider receipt status as upstream evidence and fence buffered response release at EOF.

Share relay response metering and EOF fencing across normal, Files, redirect and cleanup paths.

Separate preparation from actual dispatch facts and fence streaming delivery in the same synchronous handoff.

Fence upstream HTTP request construction and prove in-place selector edits retire source instances.

Require remaining allowance on every governed web/relay route and debit received overflow consistently across proxy and relay traffic.

Preserve ordinary upstream-failure classification for synchronous transport handoff errors.

Meter raw proxy header pairs and all observable Fetch headers before forwarding filters; clarify the conservative HTTP wire bound.

Publish dispatched exposure and contacted-host grants only after the transport constructor or fetch call returns successfully; synchronous construction failures remain upstream failures without granting recipient permission.

Bind recipient receipts to the final dispatch authority and share verified, bounded admission validation between durable ingestion, projection and history, including retained provenance after pruning.

Meter relay worker request headers before filtering and cover upstream credential/header growth with the same shared head meter.

Add remainingBytes as an optional SDK route reader, preserving older operation-only routes with a documented 32 MiB per-request compatibility ceiling; host builders require it internally. Meter informational HTTP response heads before the final response.

Require a confirmed durable occurrence before trusted dispatch; false or failed source writes refuse the affected operation as recording unavailable, including permanently restricted turns and legacy recorder adapters.

Keep an approved connection valid across the occurrence and initial collection writes of every peer admitted under that same Network card. Independent evidence still fences dispatch. Restore safety-changed 403 for peer recorder loss or independent pending input while preserving operation-specific recorder-unavailable 503. Preserve the fixed inference refusal wire message and its stored-history classification, keeping detailed causes in host-only denialReason. Document all optional egress receipt fields.

Preserve a committed explicit session recipient grant across later input without relaxing the first-dispatch fence. Keep outward callback payloads compatible and align peer-loss audit/status assertions and received-header byte-cap expectations with their contract.

Keep shared-card peer admissions usable with the real governance writer: exclude only their exact owned local/durable pending reservations from approval freshness and recording-availability fences. Independent pending input, recorder failures and capacity remain enforced; global safety projections and history remain unchanged.

Preserve typed refusal causes through session-binding settlement: revoked authority answers 403 safety_changed, an aborted wait is cancelled, and genuinely pending/failed/missing binding remains 503 unavailable. Native Pi credential-error assertions follow the existing 502 failed-attempt contract without changing the relay.
12 changes: 12 additions & 0 deletions .changeset/security-trust-settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@schlessera/brain-ui-react": minor
"@schlessera/brain-ui-server": minor
"@schlessera/brain-ui-sdk": minor
"@schlessera/brain-common": minor
---

Add Security settings for exact origin and opaque tunnel source trust and separate data-sending permission, using protected exact-byte owner review. Show repository scopes as disabled/unverified until enforcement is available. Authenticated callers can read sanitized trust facts without gaining mutation authority; older hosts remain read-only.

Recheck live read authority after waits, discard private reviews on owner loss, recover expired prepared reviews, and prevent refreshed drafts from restoring revoked permissions or removing replacement rules.

Keep editor transitions explicit, clear drafts after denied reads, allow leaving unknown outcomes, recheck enforcement on writes, preserve unchanged selections using observation-only rule instances, and refresh enforcing policy facts with trust settings.
5 changes: 5 additions & 0 deletions .changeset/trust-refresh-admission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@schlessera/brain-ui-server": patch
---

Keep turn admission independent of a running index when the verified policy hash already matches the healthy durable trust projection. Changed or unavailable policy still refreshes under the cancellable brain lock.
19 changes: 19 additions & 0 deletions api-report/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,25 @@ export "./internal/safe-path" (./src/safe-path.ts)
resolveContained
resolveContainedSync

export "./internal/taint-trust" (./src/taint-trust.ts)
TRUST_LIMITS
TRUST_RUNTIME_CAPABILITIES
type TrustAdmission
type TrustMatch
type TrustProvenance
TrustProvenanceSchema
type TrustRule
TrustRuleSchema
type TrustSelector
TrustSelectorSchema
type TrustVerification
TrustedSourcesSchema
canonicalTrustHost
matchTrustRules
parseTrustGithub
parseTrustOrigin
parseTrustTunnel

export "./internal/worker-areas" (./src/worker-areas.ts)
BRAIN_SCRATCH_DIR
BRAIN_WORKSPACES_DIR
Expand Down
Loading
Loading