alpha
Login
or
Join now
burrito.space
/
hezo
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
group conversations with models and local files
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
hezo
/
src
/
at
main
2 folders
2 files
dietrich ayala
feat: safer bot file edits — surgical edit_file + write-conflict guard
7w ago
b80237b3
lib
feat: safer bot file edits — surgical edit_file + write-conflict guard Two safeguards on bot file writes: 1. edit_file (surgical): replace an exact old_string with new_string, matched against current content. A non-matching or ambiguous match is rejected without changing the file, and untouched regions — including a human's concurrent edit elsewhere — are preserved. Preferred over update_file for changes. 2. update_file (whole-file rewrite) now uses optimistic concurrency: the bot must read_file this turn AND the content must be unchanged since, or the write is rejected and the bot is told to re-read — so a concurrent human edit can't be silently clobbered. A per-invocation read-snapshot map (seeded by read_file/create_file and refreshed after each write) backs the check. Refactor: the tool set moved to a standalone buildFileTools(deps) so the write-safety logic is unit-testable against a fake store; ProjectStore delegates to it. System preamble updated to steer bots to edit_file. Verified the real buildFileTools end to end (12 cases): surgical replace/non-match/ambiguous/replace_all, must-read-first, stale-rejection, applies-when-fresh, and surgical-edit-preserves-concurrent-human-change.
1 month ago
shared
Symmetric auth: passphrase-only accounts can add a passkey Closes the asymmetry from the previous commit. New endpoint /api/auth/passkey/enroll/{begin,finish} lets an already-authenticated user attach a passkey to their account. The new passkey's PRF output derives a wrap key (domain-separated via INFO_PASSKEY_MASTER_WRAP) that wraps the in-memory master; the ciphertext lands in users.wrapped_master_passkey. Future passkey logins unwrap with that key to recover the same master that a passphrase login would yield. - migration v6: ALTER TABLE users ADD COLUMN wrapped_master_passkey BLOB (nullable) - server/auth.ts: makePasskeyEnrollOptions + finishPasskeyEnroll; finishAuthentication now returns wrappedMasterPasskey (null for legacy passkey-first signups whose master IS the PRF result) - server/index.ts: enroll routes + login finish ships the wrap blob - Identity gains hasPasskey, computed everywhere alongside hasPassphrase - crypto.ts: derivePasskeyMasterWrapKey (HKDF info "hezo.passkey-master-wrap.v1") — distinct from the project wrap key so neither leaks the other on compromise - src/lib/auth.ts: loginPasskey unwraps when the server returns a blob, else falls back to master = PRF; enrollPasskey(email, master) runs the ceremony, wraps, and posts - App.tsx: SettingsModal grows a parallel "Enroll passkey on this device" section (visible only when hasPasskey is false); PasskeyNudge banner mirrors PassphraseNudge; on successful enrollment, the in-memory identity is optimistically updated so the banner + section disappear without a server round-trip
1 month ago
App.tsx
feat: safer bot file edits — surgical edit_file + write-conflict guard Two safeguards on bot file writes: 1. edit_file (surgical): replace an exact old_string with new_string, matched against current content. A non-matching or ambiguous match is rejected without changing the file, and untouched regions — including a human's concurrent edit elsewhere — are preserved. Preferred over update_file for changes. 2. update_file (whole-file rewrite) now uses optimistic concurrency: the bot must read_file this turn AND the content must be unchanged since, or the write is rejected and the bot is told to re-read — so a concurrent human edit can't be silently clobbered. A per-invocation read-snapshot map (seeded by read_file/create_file and refreshed after each write) backs the check. Refactor: the tool set moved to a standalone buildFileTools(deps) so the write-safety logic is unit-testable against a fake store; ProjectStore delegates to it. System preamble updated to steer bots to edit_file. Verified the real buildFileTools end to end (12 cases): surgical replace/non-match/ambiguous/replace_all, must-read-first, stale-rejection, applies-when-fresh, and surgical-edit-preserves-concurrent-human-change.
1 month ago
main.tsx
main: strip whitespace from import URL fragments (markdown paste survives)
1 month ago