Commit Graph

176 Commits

Author SHA1 Message Date
Rajat Ahuja 3bea3da169
feat: webhooks (#168)
* feat: webhooks

* feat: Enhance webhook security and typing, fix validation and encryption bugs

* fix: lint / types

* fix: rm files

* fix: rm mcp

* fix: pydantic issue with TypedDict in python version <= 3.11

* fix: pre-commit hook for test coverage

* fix: simplify API -- store url on workspace

* fix: redo architecture

* fix: webhook body

* fix: make workspace optional

* fix: comments

* refactor: add webhook secret

* fix: CR comments

* feat: use deriver for webhooks

* use key-value approach

* feat: add work unit key to deriver

* fix: add work unit key to webhooks

* fix: tests

* fix: cr comments #2

* fix: endpoint structure; make webhook delivery into a function; add tests; other general comments

* chore: change webhook secret, fix test event and workspace_id, use async with

* feat: implement queue.empty and backfill

* fix: unique constraint

* refactor: queue to use outerjoin and remove skip locked; also fix publish queue.empty

* fix: tests

* fix: migration - make columns non-nullable
2025-08-06 17:52:35 -04:00
doria 7b174dd34b
Ben/search rrf (#179)
* chore: fill out missing metadata inputs in python sdk

* feat: add get_peer_config to python sdk, thoroughly document ts sdk and remove bad client usage

* feat: zod
chore: update tests
chore: bump version, changelog

* chore: python sdk version bump and changelog

* [WIP] feat: combine search methods and rework endpoint to include limit param

* chore: test new stainless config with library

* nits: coderabbit

* Merge branch 'ben/sdk-improvements' into ben/search-rrf

* chore: pre-commit hooks cleanup

* feat: thoroughly document observation config

* Update sdks/python/src/honcho/peer.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: v1.3.0

* feat: update version to 2.2.0 and enhance search functionality with arbitrary filters

- Remove unused config variables
- Added arbitrary filters to all search endpoints.
- Pluralize `filters` everywhere in SDKs for consistency
- Updated documentation and changelog to reflect these changes.

* expose core client in TS and Python SDKs (#150)

* expose core client from sdks

* align text

* fix: resolve get_effective_observe me race condition, default peer config (#176)

* fix: resolve get_effective_observe me race condition, default peer config

* fix: preserve custom config even after leaving

* chore: test cases, enqueue types

* Update sdks/typescript/package.json

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: doria <93405247+dr-frmr@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: formatting

* chore: revert undesired changes to v1 spec, clean up docs, coderabbit

* feat: better search docs, fix worker.ts

* fix: correctly make ts params optional in cases, update docs

* chore: coderabbit

* chore: remove spurious package-lock

* fix: asyncify examples, use limit properly in search

* fix(tests): handle 4 return values in test_get_session_peer_configuration

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2025-08-06 17:43:03 -04:00
Vineeth Voruganti ddc16cfc21
Vineeth/dev 1027 (#177)
* fix (deriver): Add Sentry decorators and some additional tests

* feat (test): Deriver Fixtures for Testing
2025-08-06 16:20:22 -04:00
doria 23557ced02
fix: resolve get_effective_observe me race condition, default peer config (#176)
* fix: resolve get_effective_observe me race condition, default peer config

* fix: preserve custom config even after leaving

* chore: test cases, enqueue types
2025-08-05 13:44:54 -04:00
Vineeth Voruganti 0664410878
fix (queue): Add explicit rollback on integrity error (#174) 2025-07-31 16:50:19 -04:00
Rajat Ahuja 6338337c2d
fix: make get_or_create routes more resilient (#175)
* fix: make get_or_create routes more resilien

* fix: standardize retry
2025-07-31 16:49:57 -04:00
doria 29190248d0
Summarizer improvements (#173)
* feat: document summarizer, change configuration, make default behavior exhaustive

* feat: adjust summarizer prompts, add more benchmarks, fix small bugs

* feat: prompt engineering + benchmarking

* chore: fix tests and types

* chore: coderabbit review

* chore: add explanatory comments to summary prompts
2025-07-31 11:04:15 -04:00
Vineeth Voruganti bcb3b6106a
chore (docs): Update Versions and Changelogs (#172) 2025-07-30 17:22:28 -04:00
Vineeth Voruganti 2871ab8248
fix: Various performance and linting improvements (#170)
* fix: Various performance and linting improvements

* chore: Code Rabbit Nitpicks
2025-07-28 17:36:14 -04:00
doria af10ec804c
chore: new mcp docs (#169) 2025-07-25 15:18:27 -04:00
doria 83cf0512c6
Add Honcho MCP server (#158)
* feat: add honcho fastMCP server, stubbed out start_conversation

* feat: fully functional

* feat: update mcp guide

* chore: coderabbit review

* chore: cleanup nits

* fix: improve instructions

* fix: readme clarifications

* fix: [critical] only remove duplicates within workspace+peer, make cloudflare worker mcp server work nice

* chore: update readme

* feat: add more tools
fix: remove python in favor of one typescript MCP server

* chore: refactor for DRYness

* fix: improve readme, (temporary sdk workaround) add assistant peer with observe_me: false

* chore: switch to bun, enforce usage

fix: proper assistant config, proper message formatting

* chore: fill out readme
2025-07-24 14:01:26 -04:00
doria bc5474c170
feat: 2.1.1 release (#167) 2025-07-23 23:06:09 -04:00
Rajat Ahuja ffaae28221
Alembic migration to make session_name required on messages (#166)
* model changes

* add migration

* fix migration note

* handle MessageEmbedding table

* fix json issue and make script idempotent

* add collections name_length change

* make 1025

* coderabbit
2025-07-22 15:25:24 -04:00
Vineeth Voruganti c070b375a7
Add Pre-commit Hooks (#165)
* chore (pre-commit): Setup Pre-commit Hooks and Add Path filter to unittests

* chore (docs): Add pre-commit hook docs

* chore (docs): Code Rabbit nitpicks
2025-07-22 15:17:53 -04:00
doria 54fc5225ca
feat: add filter params everywhere (#164)
* feat: add filter params everywhere
fix: swap peerId/workspaceId in getSessions()

* chore: add eslint and prettier dev dependencies with scripts

Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>

* fix: update tests, chore: ignore trailing commas

* fix (sdks): Add Linting to Typescript SDK

* feat: add TypeScript SDK tests to CI workflow

Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>

* ci: remove postgres service and switch to bun for typescript tests

Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>

* chore (docs): Update Changelog for SDKs

* chore (sdk): Code Rabbit Nitpicks

* chore (action): Fix Typescript SDK Test Action

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Co-authored-by: aider (groq/moonshotai/kimi-k2-instruct) <aider@aider.chat>
2025-07-21 13:40:30 -04:00
Vineeth Voruganti f464352b8c
fix (config): Let config ignore extra values (#163) 2025-07-21 10:50:31 -04:00
Vineeth Voruganti 2b429099ef
fix (sdk): Fix import resolution error (#162) 2025-07-21 10:50:14 -04:00
doria e9edb235af
chore: remove fly deploy actions (no longer used) (#161) 2025-07-17 11:32:55 -04:00
doria a14899521c
Honcho 2.1.0 "ROTE" deriver (#160)
* feat: update SDKs to core 1.2.0

* feat: 2.1.0 introduce ROTE deriver/dialectic
chore: refactor repo

* fix: get typescript sdk tests working again, bump version numbers

* chore: cleanup

* chore: update unit test provider config

* fix: remove "backup" query gen

* fix: remove old utils from conftest
2025-07-16 18:02:43 -04:00
Rajat Ahuja 27bde3d6db
don't send validation errors to sentry (#159) 2025-07-15 23:32:47 -04:00
Vineeth Voruganti 62b3fea7e2
chore (docs): Update Mintlify (#157)
* chore (docs): Update Mintlify

* chore (release): Update Release version to 2.0.5
2025-07-11 12:34:10 -04:00
Vineeth Voruganti f41cd965bb
Documentation edits made through Mintlify web editor 2025-07-10 18:38:33 -04:00
Eri Barrett de02535c2e
platform guide rewrite, workspace dashboard ui (#156)
* workspace dash platform guide

* fix (docs): Platform Update Guide

* feat (scripts): Add utility script to quickly update Changelogs and versions

* chore (sdks): Add Changelog files to SDKs

* chore (docs): Fix compatability guide

* chore (docs): Code Rabbit and Changelog Dates

* chore (docs): Code Rabbit

* chore (docs): Code Rabbit

* chore (docs): Restructure

* chore (docs): Code Rabbit

* Code Rabit

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-07-10 16:57:59 -04:00
Ayush Paul aaa0904482
fix groq client (#155) 2025-07-08 11:25:21 -04:00
Vineeth Voruganti d16660b88f
Core Documentation Re-write (#154)
* fix (docs): Introduction

* fix (docs): Cleaned up core concepts

* fix (docs): Rename section

* chore: Code Rabbit

* chore (docs): Code Rabbit

* nit

* chore (docs): Code Rabbit
2025-07-03 14:32:13 -04:00
doria eb748e8009
fix: prepare_threshold: None in migration/provision (#152)
* fix: prepare_threshold: None in migration/provision

* chore: version bump
2025-07-02 16:50:48 -04:00
doria df4261f78f
2.0.2->2.0.3 (#151)
* 2.0.2->2.0.3

* fix: changelog parity
2025-07-01 16:21:57 -04:00
Rajat Ahuja e2e6ed94ac
Merge pull request #149 from plastic-labs/rajat/fix-type-check
bugfix: avoid runtime NameError by using string annotations for Event and Hint
2025-06-30 15:10:25 -04:00
Rajat Ahuja 37a934cfa9 bugfix: avoid runtime NameError by using string annotations for Event and Hint 2025-06-30 13:46:11 -04:00
Rajat Ahuja 2d9e48e681
make prefix v2 for v2 api reference (#148)
* make prefix v2 for v2 api reference

* Fix Changelog Compatability

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-06-27 17:02:55 -04:00
doria e0167a10fc
fix: use engine args on both engines in db.py (#147)
* fix: use engine args on both engines in db.py

* fix: use one engine everywhere

* 2.0.1->2.0.2
2025-06-27 15:26:29 -04:00
doria 684b2b9777
chore: 2.0.0->2.0.1 (#146)
* chore: 2.0.0->2.0.1

* chore: python sdk uv.lock

* chore (docs): Sync Version Updates

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-06-26 17:25:52 -04:00
doria cb3b6104bd
feat: add new ergo sdks to monorepo (#142)
* feat: add new ergo sdks to monorepo

* fix: resolve some pyright linter errors

* fix: python sdk (mostly) typesafe now

* feat: add tests for python sdk, mostly good pyright

* fix: update sdks/core to 1.1.0

* uv sync

* fix: body->query

* chore: pyright wrangling and coderabbit nits

* fix: ts lib search working

* chore: coderabbit nits
2025-06-26 17:07:23 -04:00
doria 4d5aa4cdb2
fix: add non-nesting session level deriver status (#145) 2025-06-26 15:34:55 -04:00
Vineeth Voruganti 326ea24955
Peer Paradigm Documentation (#133)
* new layout boilerplate

* feat: new sdk documentation

* feat: features documentation

* fix (docs): Update API Reference

* chore (mintlify): Upgrade mintlify

* fix (docs): titles

* feat: glossary of terms

* feat (docs): Add Contextual Menu

* chore: clean up architecture.mdx

* chore: remove old/unused files, clean up architecture/intro

* fix: use `id` over `name` in curl requests

* chore: nits on faq

* chore: refactor mermaid

* feat: quickstart

* chore: quickstart doc casing + info about dialectic response

* chore: update discord spellbook

* chore: update streaming-response, dialectic-endpoint, remove old simple-memory

* chore: ts everywhere, update guided tutorial

* add get context, search spellbooks

* chore: rm faq page

* fix contribution page

* feat: platform overview and screen grabs

* add get context to features

* chore: fix self-hosting page

* chore: move deriver description into architecture, flesh it out, stub out dialectic architecture

* add versioning to docs

* quickstart reformat and links

* fix v1 api reference

* chore: rm deriver from docs sidebar

* chore: fix internal links

* add sdk changelog and update latest release to 2.0.0 for api changelog

* glossary updates and icons

* ♻️ Feat: layout for architecture page

feat: layout reformat for architecture page

* fix changelog

*  Feat: vibe coder one-shot prompts

feat: vibe coder one-shot prompts

* chore: align get context text to spellbook

* condense changelog pages

* feat: add working-rep spellbook

* chore: rename Changelog group

* chore: Code Rabbit Suggestions

* fix (docs): Update Changelog and API Reference Introduction

* fix: remove accordion from glossary

* feat: document new filtering system

* feat: add telegram bot guide (using new template repo)

* checkpoint

* Docs MVP

* chore (docs): Code Rabbit

* Reorganization

---------

Co-authored-by: Erosika <eri@plasticlabs.ai>
Co-authored-by: Benjamin McCormick <docterformer@protonmail.com>
Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2025-06-26 14:57:09 -04:00
Rajat Ahuja c36d2ac449
add MessageEmbedding table (#144)
* fix (sync): Add sync script between public and private remotes

* add embedding column to messages

* add semantic search and tests

* undo db.py change

* use embedding client

* types

* rm .github/workflows/sync-public-changes.yml

* CodeRabbit comments

* compute token count with pydantic

* semantic default None + fix tests

* types and fix make token_count private

* add MessageEmbedding table

* CR and type

* undo change to schema

* fix session / peer where

* add tests to validate embedding creation + search

* CR comment, add chunking todo

* fix get_or_create_collection with peer/target in agent.chat

* move embedding client and implement chunking

* rm comments

* fix bug in migration

* add script to generate message embeddings

* default all workspaces

* CR comments

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-06-26 14:52:18 -04:00
doria 41bf5adc92
feat: add complex arbitrary filtering on all objects (#140)
* feat: add complex arbitrary filtering on all objects

* fix: safe numeric casting and application of comparators

* fix: add way more tests, fix bugs with filter parsing

* chore: pass model_class as arugment to apply_filter

* fix: default to not caring about is_active in get_sessions_for_peer

* fix: address coderabbit complaints (valid)

* fix: throw filter errors when necessary, validate inputs and handle edge cases with more tests

* fix: remove all type errors and most type warnings

* fix: don't use db in tests that don't need it
cheat: sprinkle in some pyright: ignore in filter.py

* fix: allowlist for filtering -- no filtering by content, message id, or anything internal

* fix: handle mixed types in metadata, add tests

* chore: refine types

* chore: rename fiter param everywhere
2025-06-26 12:25:30 -04:00
doria e1804b3ef1
bugfix: use new DB_SCHEMA config label in migrations; use internal_metadata on documents in CRUD (#143)
* fix: swap to DB_SCHEMA; swap to internal_metadata

* fix: use settings for last remaining env vars
2025-06-26 11:40:55 -04:00
doria 2874e136fb
fix: remove hardcoded responses (#141) 2025-06-25 14:50:13 -04:00
Ayush Paul 24bf8eeeb4
Typing (#137)
* type stuff

* add action

* bump python

* Refactor type annotations and update tracking decorators in agent and dependencies modules. Replace ai_track with track from src.utils.types, and enhance type hints for better clarity. Update pyproject.toml to allow untyped libraries.

* type everything basically

* fix migration typing

* type like crazy

* remove usless tests

* Update mocks in tests to use AsyncMock for dialectic_call and dialectic_stream, ensuring proper async behavior in test cases. Adjust mock return values for consistency and clarity.

* Update src/deriver/tom/single_prompt.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/deriver/tom/long_term.py

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Enhance CLAUDE.md documentation with additional details on core concepts, API structure, and development commands. Update command syntax for running server and tests to use 'uv run' for consistency. Improve clarity in configuration and architectural decisions sections.

* Refactor type annotations in CRUD functions to accept more flexible filter types, changing from dict[str, str] to dict[str, Any]. Clean up logging in agent.py by removing unnecessary timing logs for user representation generation and query execution.

* Remove unused import of ai_track from long_term.py and single_prompt.py to clean up the codebase.

* pass tests

* update some stuff

* fix unused

* ruff

* make stuff work again

* Add LLM_GROQ_API_KEY to GitHub Actions and format tom_inference parameters

* test

* test

* Refactor LLM settings to use 'gemini' provider and update related model parameters; remove unused API keys from GitHub Actions workflow.

* Update LLM settings to use 'anthropic' provider and change model to 'claude-3-5-haiku-20241022'; maintain existing summarization provider.

* test

* llm provider stuff

* update

* revert

* Integrate client management for LLM providers across various modules; remove deprecated environment variable setup for API keys.

* only if key avaialble

* Refactor type hints and improve schema definitions for queue processing; remove unused imports and enhance function signatures for clarity.

* fix test

* model

* test

* Update LLM provider type annotations and enhance client management; replace Provider with Providers for better type handling in config and clients modules.

* Refactor LLM provider handling to default to "openai" for custom providers across multiple modules; update type annotations and improve client management for consistency.

---------

Co-authored-by: Dani Balcells <18307962+danibalcells@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-06-24 18:29:13 -04:00
Eri Barrett 80652d4395
get deriver status for peer, optional session param (#132)
* Initial Model Changes

* fix migration

* update schemas

* handle router changes

* make name FK and corresponding crud changes

* fix routers

* comment metamessage references

* add bulk peer session operations

* update messages router

* fix require_auth to make app runnable

* remove peer from get messages

* add new routes

* implement new crud methods for session peers

* alter keys router

* add feature flags dict and token limit + fix SessionContext

* fix: paginate get_session_peers and make tokens/summary query params in get_session_context

* feat: add create_messages_for_peer, get_messages_for_peer

* fix: make session_peers a Table

* finalize upgrade

* fix: working migration

* fixes: schemas, crud, routes

* add token count

* fix migration errors discovered from db with data in it

* fixes: unify with sdk

* downgrade

* feat: swap jwts to new paradigm

* fix unit tests

* fix tests pt 2

* fix: handle foreign key errors in create_messages

* fix downgrade

* downgrade queue changes

* feat: add search to resources, make get_messages handle limits, add get_representation to peer

* chore: beef up tests

* fix: move chat and rep params to post body, add target to get_representation

* fix get_user_protected_collection and embedding store

* feat: add peer config to models, crud, schemas, routes

* fix: update tests and fix list(tuple()) to dict()

* add session peer left_at/joined_at and modify enqueue

* [wip]: feat: refactor history to match new paradigm and implement get_context

* fix messages enqueue and test it

* chore: align deriver and new honcho paradigm

* chore: update consumer

* chore: get rid of is_user

* feat: change queue tables to new key strat

* fix: convert queue session_id to str properly

* fix downgrade migration

* feat: re-integrate old deriver

* chore: coderabbit review, lots of small bug fixes

* fix: fix batch migration of messages and token count

* fix: mock ModelClient

* CodeRabbit comments

* CR comments 2

* fix: handle metadata and feature flags properly in get_or_creates

* cr comments 3

* feature flag to configuration

* feat: add real get crud

* fix: remove reverse param from places it does not belong

* add session.name constraint; narrow task type; disable deriver from configuration

* get_or_add_peers_to_session + session peers limit

* feat: get deriver status for peer, optional session param

* fix: add internal_metadata, fix agent

* rename to get_deriver_status, simplify

* fix: move working rep into crud get/set, unstub get_working_representation

* fix: don't payload metadata

* peer protected collection -> global / local rep collections

* Simplify control flow, use session_name vs id

* coderabbit syntax errors

* coderabbit changes

* ruff formatting

* Revert non-src changes from ruff formatting

* move status endpoint into workspace, protects session_name, peer is optional

* fix: optimize db query for deriver status

* chore: add tests for queue status endpoint, add some extra validation in endpoint, reduce post-processing

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
Co-authored-by: Benjamin McCormick <docterformer@protonmail.com>
Co-authored-by: doria <93405247+dr-frmr@users.noreply.github.com>
2025-06-24 15:25:33 -04:00
Benjamin McCormick a67fb3da95 Revert "feat: add complex arbitrary filtering on all objects"
This reverts commit a3810f7064.
2025-06-24 12:40:49 -04:00
Benjamin McCormick a3810f7064 feat: add complex arbitrary filtering on all objects 2025-06-24 12:38:05 -04:00
Vineeth Voruganti 8ff3cd7a1e
Centralize Configurations (#115)
* fix (schemas): Backwards compatability for metamessage_type and idiomatic schemas

* fix: Pagination Test

* feat: Change codebase to rely on src/config.py

* feat (config): Using pydantic settings for managing settings values across the project

* chore (docs): Add README and coderabbit nitpicks

* chore (lint): Ruff fixes

* fix: Add DB Tracing Configuration

* fix (config): Configurable Pool Class

* fix (config): Add validations

* chore: Code Rabbit Nitpicks

* fix (config): Attempt to fix github actions

* fix (db): Use variable engine settings

* fix (actions): Mock Chat function entirely

* fix (config): Linter errors, docs, and Dockerfile

* chore: Code Rabbit nitpicks

* chore (docs): Increment Version Numbers

* fix (alembic): Fix alembic migrations to use config file

* fix (test): force test_db schema on public

* chore: Code Rabbit nitpick

* fix (config): Add LLM provider settings and consolidate LLM usage to use model client

* fix deps and get tests working

* pass tests

* Update GitHub Actions workflow for unit tests: streamline branch references and enhance environment variable names for clarity.

* Update OpenAI client initialization to use API key from configuration settings

* chore (docs): Update config templates and fix linter errors

* chore (docs): Update Changelog

* chore (docs): Update Changelog, README, and CONTRIBUTING

* chore: Code Rabbit Comments

* chore: Code Rabbit

---------

Co-authored-by: hyusap <paulayush@gmail.com>
2025-06-24 11:00:52 -04:00
doria d332321138
chore: update api routes to /v2 (#138)
* chore: update api routes to /v2

* chore: undo erroneous uv.lock update

* chore: update openapi.json
2025-06-24 10:45:55 -04:00
Rajat Ahuja e6c2e1cb73
Merge pull request #136 from plastic-labs/rajat/fix-peer-chat-streaming
fix peer chat streaming
2025-06-20 12:06:41 -04:00
Rajat Ahuja fd1f1bfede CR comments 2025-06-20 12:01:04 -04:00
Rajat Ahuja e37b60e0ac fix streaming from peer.chat 2025-06-20 11:53:24 -04:00
doria 3acf8fa0ea
fix: update session-level config to inherit by making observe_me nullable (#135) 2025-06-19 16:37:12 -04:00
doria 657feacc53
Migrate to Peer Paradigm (#131)
* Initial Model Changes

* fix migration

* update schemas

* handle router changes

* make name FK and corresponding crud changes

* fix routers

* comment metamessage references

* add bulk peer session operations

* update messages router

* fix require_auth to make app runnable

* remove peer from get messages

* add new routes

* implement new crud methods for session peers

* alter keys router

* add feature flags dict and token limit + fix SessionContext

* fix: paginate get_session_peers and make tokens/summary query params in get_session_context

* feat: add create_messages_for_peer, get_messages_for_peer

* fix: make session_peers a Table

* finalize upgrade

* fix: working migration

* fixes: schemas, crud, routes

* add token count

* fix migration errors discovered from db with data in it

* fixes: unify with sdk

* downgrade

* feat: swap jwts to new paradigm

* fix unit tests

* fix tests pt 2

* fix: handle foreign key errors in create_messages

* fix downgrade

* downgrade queue changes

* feat: add search to resources, make get_messages handle limits, add get_representation to peer

* chore: beef up tests

* fix: move chat and rep params to post body, add target to get_representation

* fix get_user_protected_collection and embedding store

* feat: add peer config to models, crud, schemas, routes

* fix: update tests and fix list(tuple()) to dict()

* add session peer left_at/joined_at and modify enqueue

* [wip]: feat: refactor history to match new paradigm and implement get_context

* fix messages enqueue and test it

* chore: align deriver and new honcho paradigm

* chore: update consumer

* chore: get rid of is_user

* feat: change queue tables to new key strat

* fix: convert queue session_id to str properly

* fix downgrade migration

* feat: re-integrate old deriver

* chore: coderabbit review, lots of small bug fixes

* fix: fix batch migration of messages and token count

* fix: mock ModelClient

* CodeRabbit comments

* CR comments 2

* fix: handle metadata and feature flags properly in get_or_creates

* cr comments 3

* feature flag to configuration

* feat: add real get crud

* fix: remove reverse param from places it does not belong

* add session.name constraint; narrow task type; disable deriver from configuration

* get_or_add_peers_to_session + session peers limit

* fix: add internal_metadata, fix agent

* fix: move working rep into crud get/set, unstub get_working_representation

* fix: don't payload metadata

* peer protected collection -> global / local rep collections

* fix: remove spurious mockery

* feat: add english language search index

* fix: remove spurious error

* chore: 2.0.0 -- update readme, changelog, claude.md

* chore: update readme for peer paradigm

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2025-06-19 11:41:39 -04:00