Feat v0.5.1 chat core (#31)
All checks were successful
All checks were successful
Co-authored-by: Jeffrey Smith <jasafpro@gmail.com> Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #31.
This commit is contained in:
40
CHANGELOG.md
40
CHANGELOG.md
@@ -2,6 +2,46 @@
|
||||
|
||||
All notable changes to Switchboard Core are documented here.
|
||||
|
||||
## v0.5.1 — Chat Core Library
|
||||
|
||||
### Added
|
||||
|
||||
- **`chat-core` library package**: Conversations, messages, participants, and
|
||||
read cursors as ext_data tables. Permissions: `db.write`, `realtime.publish`.
|
||||
Consumable by other packages via `lib.require("chat-core")`.
|
||||
- **4 ext_data tables**: `conversations` (title, type, created_by, updated_at),
|
||||
`participants` (conversation_id, participant_id, type, display_name, role,
|
||||
joined_at), `messages` (conversation_id, participant_id, content, content_type,
|
||||
edited_at), `read_cursors` (conversation_id, participant_id,
|
||||
last_read_message_id).
|
||||
- **6 exported Starlark functions**: `create()`, `send()`, `history()`,
|
||||
`add_participant()`, `remove_participant()`, `mark_read()`.
|
||||
- **15 REST endpoints**: Full CRUD for conversations, messages, participants.
|
||||
Cursor-based paginated message history. Per-conversation unread counts.
|
||||
- **Realtime events**: `message`, `message.edited`, `message.deleted`,
|
||||
`participant.added`, `participant.removed` published to
|
||||
`conversation:{id}` channels.
|
||||
- **`db.query()` range parameters**: New `before` and `after` kwargs accept
|
||||
dicts of `{col: val}` generating `col < ?` / `col > ?` WHERE clauses.
|
||||
Enables cursor-based pagination and efficient unread counting for all
|
||||
extension packages. 7 new Go tests.
|
||||
|
||||
### Security
|
||||
|
||||
- **Invisible Unicode scanning gate** (GlassWorm / Trojan Source defense):
|
||||
`ScanSource()` detects variation selectors, bidi overrides, zero-width chars,
|
||||
tag characters, and other invisible Unicode across 10 ranges. `Verdict()`
|
||||
blocks GlassWorm payloads (>=10 variation selector / tag chars), Trojan Source
|
||||
(any bidi override), and excessive zero-width chars (>=6). Two enforcement
|
||||
points: extension install (422 rejection before files written) and Starlark
|
||||
execution (belt-and-suspenders). 23 new tests including GlassWorm payload
|
||||
simulation.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Admin packages type filter**: Added `Library` option alongside Surface/Extension/Full/Workflow. Filter dropdown replaced button group with themed `Dropdown` primitive (keyboard nav, CSS-var theming, consistent with rest of admin UI).
|
||||
- SDK version bumped from 0.5.0 to 0.5.1.
|
||||
|
||||
## v0.5.0 — Realtime Primitive + Dialog Audit + Permissions UI
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user