Commit Graph
41 Commits
Author SHA1 Message Date
kyle e1e6c7a338 Decide tool calls against grants, taint and time
Implemented decide and redecide in crates/brokerd/src/policy.rs:
SessionState, Label, Denial, private Matched, and Decision/Ask (private
fields, Debug only, nine getters each) with the Outcome enum. decide
rejects an unknown tool (args not parsed) and malformed arguments before
matching, then runs the M1-M5 matching pass in id order and returns
Allowed/Ask/Denied by the winner's mode; redecide re-runs matching now
and rebuilds the Decision from the Ask. Seven doctests (six compile_fail,
one compiling) guard the two facts. policy 7, policy_matching 10,
policy_redecide 7, policy_property 4, doc 7 all pass; make gate ok.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 03:05:01 -07:00
kyle e2ab29aa15 Load grant files, failing closed on any invalid file
crates/brokerd/src/grants.rs reads grants/*.toml into a GrantSet: load reports every problem in every file and returns either a complete valid set or the full problem list, never a partial one; from_grants sorts by id and collects every rule-2..9 problem; render prints each problem then the runbook pointer. All 17 grants tests pass; make gate prints gate: ok.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 02:50:26 -07:00
kyle 9150effc8e Add typed tool arguments and the form checks for paths, hosts and URLs
Implemented brokerd::args: a pure module (no I/O, no clock) that parses tool
arguments into a typed ToolArgs and checks the form of paths, hosts and URLs.
Four private deny_unknown_fields structs drive parse and canonical_json; path,
cwd and url are validated as written and never normalised. All 13 args tests
pass and make gate prints gate: ok.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 02:37:31 -07:00
kyle 5502de1c90 Add brokerd's configuration
Implemented crates/brokerd/src/config.rs: typed Paths, Sockets, Approvals and
Config with serde(deny_unknown_fields, default) on every struct, hand-written
ConfigError (Read/Parse) with Display and std::error::Error, and the parse/load/
broker_socket/admin_socket/audit_dir/state_dir methods. Added serde, serde_json
and toml to crates/brokerd/Cargo.toml, registered pub mod config; in lib.rs,
added brokerd to the serde and serde_json Used-by cells in docs/dependencies.md,
and copied the given test and six fixtures byte-identical. 7 config tests pass;
make gate prints gate: ok.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 02:24:15 -07:00
kyle d01b2ef2d9 Add the audit chain verifier
Implemented proto::ChainVerifier as a pure line-holding state machine:
each line is judged only once the next has arrived, so a Recovery record
can mark the line before it not-a-record. Adds ChainFailure, TornTail,
ChainReport, Location and ChainVerifier, wired through lib.rs and the
matching re-export in audit.rs. 13 chain tests pass; make gate prints
gate: ok.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 02:19:45 -07:00
kyle e8568edf7e Add the admin messages, approval ids as numbers, and two turn events
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 00:28:46 -07:00
kyle c6395b16f4 Replace the audit record with chained audit events
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-19 00:22:25 -07:00
kyle c060c80c7e Fix four review findings: busy release, poison recovery, core.md errors, chat loop
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 21:06:58 -07:00
kyle 34951084cc Extend on-device verification to the agent loop
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 20:38:56 -07:00
kyle 06cda69509 Add bxctl chat
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 20:24:26 -07:00
kyle eb8fc5f920 Add the loopd serve command
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 19:50:32 -07:00
kyle 8bc835f623 Add the channel server on loop.sock
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 19:43:12 -07:00
kyle 9063cf958e Add the turn loop with its limits
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 19:14:52 -07:00
kyle 9704a64507 Add the session store: baseline file and append-only log
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 18:42:00 -07:00
kyle b152ba3cd3 Add the baseline and the log replay function
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 18:31:33 -07:00
kyle fd7ade9689 Add the tool port, registry, dispatch and the fake tools
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 18:12:45 -07:00
kyle ec5d887daa Add the paths, channel, loop and baseline config tables
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 17:36:20 -07:00
kyle 06298d6a8e Add the channel messages and the usage record to proto
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 17:30:51 -07:00
kyle 0f5213a466 Return chunked body data as soon as it is available
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 16:15:22 -07:00
kyle 1faa38be44 Close the client side when the upstream closes, in inferproxy
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 16:07:45 -07:00
kyle ad7bce88a4 Add on-device verification for the inference path
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 15:32:20 -07:00
kyle f1d880568f Add the startup self-test and the loopd selftest command
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 15:28:37 -07:00
kyle 59cf89e7ba Add the per-slot gate and chat_with_retry
Implemented SlotGate (one request in flight per server slot, FIFO queue,
bounded) and chat_with_retry (retry only server-gone errors, jittered
backoff within a window and attempt budget). chat acquires the gate and
maps GateFull to Busy; Client gained a gate field.

Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 14:45:45 -07:00
kyle a07c341cbb Add the thinking cap to Client::chat
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 14:06:11 -07:00
kyle 60557a0634 Add Client::chat with the first-byte wait, liveness and error mapping
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 13:37:01 -07:00
kyle 3663a1e4d5 Add props, slots, tokenize and the cache-loss check to the llama client
Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)
2026-09-18 03:39:05 -07:00
kyle 3d876d4fa9 Add the assembler that folds streamed chunks into a completion
Implemented-By: GLM-5.3 (z.ai, default settings) via OpenCode
2026-09-18 02:56:31 -07:00
kyle f48999306e Add the llama client types and the chat request builder
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-18 02:40:35 -07:00
kyle f58c29e707 Add a server-sent-events reader to loopd
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-18 02:31:49 -07:00
kyle 4460bb241a M2a/04-loopd-http
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-18 02:11:25 -07:00
kyle 6e8e24794d Add loopd configuration with every M2a limit
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 23:07:38 -07:00
kyle a0495ea36a Add the inferproxy byte forwarder with its two limits
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 21:03:41 -07:00
kyle bc1e727c19 Add SHA-256 to proto, wrapping the emsha crate
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 14:11:51 -07:00
kyle 69120af092 Reject unknown fields in every proto struct and bound Timestamp
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 09:29:48 -07:00
kyle 8c1852ec47 Add Decision, decide and the runner stub to brokerd
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 09:05:48 -07:00
kyle b9f3ab45c1 Add audit and session log record types to proto
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 08:36:44 -07:00
kyle 78e13195ea Add Grant, Mode and Constraints to proto
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 08:23:48 -07:00
kyle d6308c976b Add length-prefixed frame codec to proto
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 08:11:14 -07:00
kyle 56e12f40a6 Add IPC envelope and tool messages to proto
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 07:53:40 -07:00
kyle 1e1b543a7c Add validated identifiers, Hash32, Timestamp and DataClass to proto
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 07:41:49 -07:00
kyle 8dc04b1d48 Add Cargo workspace, crate skeletons and the gate
Implemented-By: Laguna S 2.1 (OpenCode)
2026-09-17 06:45:02 -07:00