Sign in
Join now
scn-chat
sharedcomputer.network
/
Star
Starred
Star
Something went wrong. Try again.
Fork
0
Eye filled
Watch
Watching
Watch
ATProto-based AI Assistant Chat interface.
Star
Starred
Star
Something went wrong. Try again.
Fork
Eye filled
Watch
Watching
Watch
Overview
Overview
Issues
Issues
1
1
Pulls
Pulls
Pipelines
Pipelines
scn-chat
/
apps
/
server
/
src
/
storage
9 files
at
rate-limits
pouriade.com
·
The convention by which a user message asks for a reply lives in turns/request.ts: userMessage builds a user record asking for its first reply, askAgain raises the attempt with any new model or effort, replyKey gives <key>.r<attempt>, and generationOf reads what a record asks for, leniently enough for one that failed validation. The runner gains send and regenerate, which write the user message and start its turn, so the turn routes only check the request and map the result to a status, and no longer need the chat services. start and answerInvalid both read the request through generationOf, in place of a cast and a parser of their own. ChatService.getMessage reads one message checked against its lexicon, which regenerate and recovery use in place of reading the raw record through chats.store. Regenerating a user message that no longer matches its lexicon now answers InvalidStoredRecord, and recovery leaves such a claimed reply as it is and clears its claim, rather than rewriting it from the invalid value on every restart. The send, regenerate, and request tests run against the runner and the module, the route tests keep the status codes, and the chat turns spec describes it.
·
2w ago
b2ec3044
chat-service.ts
The convention by which a user message asks for a reply lives in turns/request.ts: userMessage builds a user record asking for its first reply, askAgain raises the attempt with any new model or effort, replyKey gives <key>.r<attempt>, and generationOf reads what a record asks for, leniently enough for one that failed validation. The runner gains send and regenerate, which write the user message and start its turn, so the turn routes only check the request and map the result to a status, and no longer need the chat services. start and answerInvalid both read the request through generationOf, in place of a cast and a parser of their own. ChatService.getMessage reads one message checked against its lexicon, which regenerate and recovery use in place of reading the raw record through chats.store. Regenerating a user message that no longer matches its lexicon now answers InvalidStoredRecord, and recovery leaves such a claimed reply as it is and clears its claim, rather than rewriting it from the invalid value on every restart. The send, regenerate, and request tests run against the runner and the module, the route tests keep the status codes, and the chat turns spec describes it.
2w ago
local-record-store.ts
Each account's records and blobs come from its ChatService, so createChatServices is the one place that chooses between a spaces PDS and the local fallback, for blobs as for records. The blob stores are bound to a DID like a RecordStore, as SpaceBlobStore(did, getPdsClient) and LocalBlobStore(did, dataDir), and ChatService gains putBlob and readBlob, which the attachment routes and the turn runner use in place of blobsFor, createBlobStores, turnBlobs, and the runner's TurnBlobs, all removed. The fallback's daily sweep is sweepLocalBlobs, which asks the local record store whether any record still references a blob, so only local-record-store.ts knows the local_record table. Reading or syncing a conversation and signing in no longer check the storage mode first, since the sync engine already skips accounts without spaces. Behaviour is unchanged. The turns harness runs on the real ChatService over the fake PDS in place of its fake blobs, so the test that moves a large tool output into a blob reads it back, and the blob tests go through ChatService in both modes, with a new one for a spaces blob no record references. The chat storage and attachments specs describe it.
2w ago
record-store.ts
Implement initial buildout of core features.
1mo ago
records.ts
Implement initial buildout of core features.
1mo ago
routes.ts
The conversation:created and conversation:deleted plugin hooks run once for each conversation created or deleted, whichever client made the change, where before only the app's own routes ran them. fireChatHooks, wired in server.ts, runs them from the in-process event bus. ChatService announces the conversations the app creates and deletes, through a listener in place of its onWrite callback. Sync announces one another client created when an index sync finds a new conversationRef, whose op has no previous CID, and one another client deleted through the engine's new conversationDeleted, which the deleted index entry, the missing space, and notifySpaceDeleted all go through. RecentWrites remembers the spaces the server deleted for ten minutes, so sync noticing the server's own deletion doesn't announce it again. The first index sync after sign-in, and any while the index is empty, announces nothing. The routes no longer wait for the hooks before answering, and open tabs now hear about deletions made through the app too. The plugins spec and guide describe it, with tests and an acceptance criterion.
2w ago
services.ts
The conversation:created and conversation:deleted plugin hooks run once for each conversation created or deleted, whichever client made the change, where before only the app's own routes ran them. fireChatHooks, wired in server.ts, runs them from the in-process event bus. ChatService announces the conversations the app creates and deletes, through a listener in place of its onWrite callback. Sync announces one another client created when an index sync finds a new conversationRef, whose op has no previous CID, and one another client deleted through the engine's new conversationDeleted, which the deleted index entry, the missing space, and notifySpaceDeleted all go through. RecentWrites remembers the spaces the server deleted for ten minutes, so sync noticing the server's own deletion doesn't announce it again. The first index sync after sign-in, and any while the index is empty, announces nothing. The routes no longer wait for the hooks before answering, and open tabs now hear about deletions made through the app too. The plugins spec and guide describe it, with tests and an acceptance criterion.
2w ago
space-policies.ts
Crash and privacy fixes, request validation, login CSRF, SSRF guard, handover race, and cleanup.
1mo ago
space-record-store.ts
Upgrade spaces alpha to 20261001 (send spaceType, sign space credentials with HTTP message signatures).
3w ago
validate.ts
Implement initial buildout of core features.
1mo ago