Commit Graph

33 Commits

Author SHA1 Message Date
Phil 418e59ca2e feat(migrations): add tenant_id primitive migration (OSS prosumer-safe)
Add the alembic migration that makes tenant_id a first-class primitive: a new
tenants table + tenant_id with composite PKs / uniques / FKs / indexes on every
tenant-scoped table, matching the declarative models MINUS physical partitioning.
Self-host/prosumer safe: transforms the existing single-tenant schema in place and
backfills every row to a default tenant. A top-of-upgrade guard (tenants-exists)
makes it a no-op on the shared/prod schema, which the internal bootstrap builds and
alembic-stamps past.

Rename tenants.legacy_app_name -> vector_correlation_id (impl-agnostic: the durable
external vector-store namespace key, not legacy).

Remove scripts/bootstrap_shared_schema.py + its test from OSS -- the prod-only
shared-schema standup moves to the internal migration runbook. Strip internal /
migration-transient comments from models.py per the OSS-safe pass.

Verified: pytest tests/alembic -k e5fe7f8bcf62 passes on the full revision chain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-03 11:54:56 -04:00
Phil b1d1537345 docs(models,scripts): keep comments implementation-generic for public readers
Rewrite the tenant-table and schema-bootstrap comments to the generic,
standalone-honcho rationale an external reader needs, dropping
deployment-specific detail. Comment-only; no behavior change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 15:33:06 -04:00
Phil c630993680 refactor: rename tenants.app_name to legacy_app_name; apply agent-comment markers
- Rename Tenant.app_name -> legacy_app_name so the incumbent per-tenant name never
  collides with a shared pool's app_name (which is a single shared value for all
  pooled tenants). It's the value that keeps a tenant's external vector-store
  namespace stable when the tenant moves onto a shared backend.
- Apply the agent-comment-marker convention (# ai: / # region ai) across the
  tenant_id schema, the bootstrap script, and its test: the why (receipts,
  anti-prior gotchas) is foldable-marked; short docstrings carry the what.

Comments/docstrings + one column rename only; the bootstrap integration test
stays green (no behavioral change).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 14:11:01 -04:00
Phil 117a83de96 review: fix migration execution + index/FK consistency for tenant_id schema
- Move the shared-schema bootstrap out of the Alembic chain into a standalone
  script (scripts/bootstrap_shared_schema.py). As a chained revision it collided
  with the per-tenant history on `alembic upgrade head` (DuplicateTable) and would
  have run on existing single-tenant instances via init_db(). It is now run
  explicitly against the fresh shared DB; the migration track owns provisioning.
- Run the bootstrap in AUTOCOMMIT so 1000+ partition creations plus composite FKs
  don't exhaust max_locks_per_transaction in a single transaction.
- Derive the partitioned-table set from the models instead of hand-listing it
  (a hand list drifts and yields a partitioned parent with zero partitions).
- message_embeddings: index (message_id, tenant_id) since message_id lookups are
  cross-tenant; restore the composite workspaces FK for parity with peer tables.
- messages: ix_messages_peer_lookup = (tenant_id, workspace_name, peer_name,
  created_at) to serve the peer-history query without a sort.
- QueueItem.__repr__: include tenant_id.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-02 13:20:50 -04:00
Vineeth Voruganti 4d3ab1c36b
fix: increase throughput of unit tests by changing behavior db teardown (#949)
* fix: increase throughput of unit tests by changing behavior db teardown

* fix: address review comments
2026-07-29 11:19:41 -04:00
Vineeth Voruganti 60a15e664d
v3.0.11 Release Candidate (#841)
* chore(docs): Release Candidate Changelog and Version Updates

* chore: fix basedpyright error
2026-06-24 12:44:13 -04:00
Anthony Yuan f75b336a3c
feat: add generate_jwt.py script for creating scoped JWTs (#757)
* feat: add generate_jwt.py script for creating scoped JWTs

Adds a CLI utility script for generating Honcho JWTs without needing
to call the /v1/keys API endpoint. Useful for local development and
bootstrapping admin tokens.

Features:
- --admin flag for full-access tokens
- --workspace / --peer / --session flags for scoped tokens
- --expires flag with human-friendly duration syntax (e.g. 5h, 30d, 1y)
- --print-only flag for scripting (outputs bare token)

Examples:
  uv run python scripts/generate_jwt.py --admin
  uv run python scripts/generate_jwt.py --admin --expires 24h
  uv run python scripts/generate_jwt.py --workspace my-ws --expires 30d
  uv run python scripts/generate_jwt.py --workspace my-ws --peer my-peer --expires 1y

* docs: document generate_jwt.py in README auth setup section

* fix: remove t='' override to preserve utc_now_iso default in JWTParams

Per CodeRabbit review: explicitly setting t="" bypasses JWTParams's
default utc_now_iso timestamp, causing tokens for the same scope to
become byte-identical. Omitting t lets the default apply, ensuring
each generated token is unique.

* fix: address JWT script review feedback

* fix: type, lint

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2026-06-09 13:49:55 -04:00
Vineeth Voruganti b84da15d03
Make embeddings configurable (#678)
* feat(embedding): add dimensions_mode for OpenAI dimensions= forwarding

Add EMBEDDING_MODEL_CONFIG__DIMENSIONS_MODE (auto|always|never) controlling
  whether the dimensions= parameter is forwarded on OpenAI embeddings.create
  calls. auto (default) sends it when the operator explicitly set
  EMBEDDING_VECTOR_DIMENSIONS and the configured model is not on the
  known-rejecting allowlist (currently text-embedding-ada-002).

  The provenance check (was VECTOR_DIMENSIONS explicitly set?) lives as
  EmbeddingSettings.resolve_send_dimensions() because it needs access to
  model_fields_set, which the standalone resolver does not have. The
  resolved boolean is passed into _EmbeddingClient at construction time;
  the client never inspects mode or provenance.

  Also pins cloudevents <2.0 — 2.0.0 reorganized the package and dropped
  cloudevents.conversion and cloudevents.http, which src/telemetry/emitter.py
  imports. The original `>=1.12.0` constraint allowed the broken 2.0 resolve.
  With the pin, the imports resolve cleanly and the basedpyright warning
  cascade (37+ warnings about unknown types) disappears.

  Drive-by cleanups (all unnecessary cast/ignore comments flagged by
  basedpyright after the cloudevents downgrade):
  - vector_store/lancedb.py, tests/conftest.py, and
    tests/deriver/test_vector_reconciliation.py — drop dead pyright ignores
  - sdks/python/src/honcho/http/{async_,}client.py — drop unnecessary
    cast(datetime, ...) (parsedate_to_datetime already returns datetime)
  - vector_store/turbopuffer.py — cast(Any, rows) for the upsert_rows
    TypedDict that the SDK exposes but our row builder doesn't satisfy
  - tests/test_datetime_parsing.py — ignore reportArgumentType on the
    test that deliberately passes wrong types to assert raises

* feat(models): honor EMBEDDING_VECTOR_DIMENSIONS in pgvector columns

* feat(startup): atomic swap dim-vs-MIGRATED guard for runtime schema validator

Add src/startup/embedding_validator.py that introspects the actual pgvector
  column dim at boot and refuses to start if it does not match
  EMBEDDING_VECTOR_DIMENSIONS. Runs after the DB pool is up and before the
  embedding client is constructed, in both src/main.py (FastAPI lifespan) and
  src/deriver/__main__.py.

  Implementation details:
  - Schema-qualified pg_attribute join through pg_class/pg_namespace respects
    DB.SCHEMA rather than relying on search_path
  - Bounded retry (3 attempts, 1s backoff) for transient introspection failure,
    then fail-closed with "could not validate embedding schema" — uncertainty
    is not a green light to serve traffic
  - External-store sampler (turbopuffer, lancedb) enumerates workspaces from
    the application DB and probes their lazy-created namespaces; current
    per-namespace probe is a no-op stub since the SDKs do not expose
    uniform dim introspection — full enumeration is left to
    `configure_embeddings --report` in Phase 3

  Atomic guard swap: deletes the old dim-vs-MIGRATED config validator (which
  forbade non-1536 pgvector unless MIGRATED=True) in the same commit as the
  new runtime validator. There is no release window where non-1536 pgvector
  can start unprotected. The 9 dual-write branches that use VECTOR_STORE.MIGRATED
  remain untouched and load-bearing for legacy-tenant backend swaps.

  VECTOR_STORE_DIMENSIONS deprecation: drop the "must match" raise; in
  propagate_namespace, check model_fields_set and emit logger.warning +
  DeprecationWarning (DeprecationWarning alone is filtered by Python's default
  config and would not reach operators). Always overwrite with
  EMBEDDING.VECTOR_DIMENSIONS regardless.

  Test changes:
  - tests/test_models_vector_dim.py: Phase 1's VECTOR_STORE_TYPE=lancedb +
    MIGRATED=true escape hatches removed; the test now passes on plain
    EMBEDDING_VECTOR_DIMENSIONS=768
  - tests/llm/test_model_config.py: the two tests asserting the old guards
    replaced with tests for the new deprecation + acceptance behavior
  - tests/startup/test_embedding_validator.py: 10 new tests — dim assertion
    logic (pass/mismatch/missing/unbounded/non-public-schema), fail-closed
    retry budget, real-test-DB pass, real-DB ALTER-then-validate, deprecation
    warning capture, non-1536 + pgvector + MIGRATED=false at config time

* feat(scripts): add configure_embeddings bootstrap CLI

Adds scripts/configure_embeddings.py alongside the other one-off scripts
  (provision_db, migrate_db, generate_jwt_secret, etc.). Invoked as
  `uv run python scripts/configure_embeddings.py` — same convention as the
  existing scripts in that directory, including the sys.path shim that
  lets src.* imports resolve when run directly.

  Bootstrap step for self-hosted installs at a non-default
  EMBEDDING_VECTOR_DIMENSIONS — runs between `alembic upgrade head` and
  starting the API/deriver.

  pgvector ALTER safety (single transaction):
  - LOCK TABLE {schema}.documents, {schema}.message_embeddings IN ACCESS
    EXCLUSIVE MODE — closes the TOCTOU window between population check
    and ALTER
  - COUNT(*) WHERE embedding IS NOT NULL on both tables; refuse with a
    non-zero exit if either is populated (ALTER ... USING NULL would
    silently wipe those vectors)
  - Snapshot HNSW index DDL from pg_indexes; drop, ALTER, recreate from
    the captured DDL so operator-set HNSW params (m, ef_construction)
    survive the round trip

  External vector stores (turbopuffer, lancedb) are never created or
  modified — namespaces are per-workspace and lazy-created on first write.
  The --report mode enumerates workspaces and collections from the
  application DB, derives the expected namespaces via
  get_vector_namespace(), and prints a per-namespace status table.

  CLI modes (mutually exclusive):
  - (default) interactive: print plan, prompt to confirm
  - --dry-run: print plan and exit 0 without touching the DB
  - --yes: apply without prompt
  - --report: print external-store namespace inventory and exit

  Also updates src/startup/embedding_validator.py error-message paths and
  docs/v3/contributing/configuration.mdx invocations to point at the new
  script location.

  Tests cover plan no-op, plan needs-alter, plan raises on missing column,
  ALTER + HNSW round-trip, refuse-when-populated (monkeypatched count to
  avoid wiring the full workspace/peer/collection/document FK chain just
  to land one vector row), and idempotency.

* docs: add changing-embeddings operations page

Document the supported way to change EMBEDDING_VECTOR_DIMENSIONS or
EMBEDDING_MODEL_CONFIG__MODEL on a Honcho deployment: provision a new
deployment at the desired configuration, replay source data out of
band, cut over at the application layer.

The page explains the asymmetry:
- Dimension is machine-enforced as immutable. The startup validator
  introspects pg_attribute and crashes the API/deriver on mismatch.
- Model is operator-owned. There is no persistent metadata recording
  which model produced each vector, so a same-dim model swap is
  silently undetectable — flagged with a Warning callout.

Also documents the truncation edge case (text-embedding-3-large                                                                                                truncated to 1536 with EMBEDDING_VECTOR_DIMENSIONS left at default)
and the DIMENSIONS_MODE=always mitigation, plus a pointer that
storage-backend swap (VECTOR_STORE_MIGRATED + reconciler) is a                                                                                                 distinct operation unaffected by this work.
Registers the page in docs/docs.json under the Self-Hosting nav group
and cross-links from configuration.mdx.

* fix(embedding): correct turbopuffer regex + tighten DIMENSIONS_MODE docs

- Turbopuffer attribute type for a vector column is `[N]f32` / `[N]f16` /
  `[N]i8`, not `f32_vector(N)` as the earlier probe assumed. The earlier
  regex returned None for the real SDK format, so existing Turbopuffer
  namespaces would have been reported as "missing" instead of validated
  for mismatch. Regex switched to `\[(\d+)\]` which is the
  vendor-stable shape. Test cases rewritten to lock the actual format.

- docs/v3/contributing/configuration.mdx had a contradictory pair of
  bullets: 223 said explicit 1536 makes `auto` forward dimensions=, 224
  said `auto` would skip the parameter because 1536 is the default.
  Operators reading both would (rightly) conclude they need `always`
  even when `auto` would work. Rewrote both bullets so:
  - `auto` is provenance-driven (explicit-set, not non-default-value).
  - `always` is positioned as defense-in-depth for config layers that
    might strip explicit default-valued envs, not the only path for
    same-as-default truncation.

* fix(embedding): address PR #678 review comments

CodeRabbit + Rajat review feedback. All actionable items addressed
except two false-positives (responded on PR).

Bug fixes:
- deriver telemetry leak: validator was called outside try/finally so
  shutdown_telemetry() did not run on validation failure. Moved inside.
- _emit_report printed "no effect with pgvector" unconditionally,
  including from implicit post-apply calls. Added is_report_mode flag;
  only print on explicit --report.
- LanceDB and Turbopuffer probes returned None when the namespace
  existed but its schema was malformed (no vector field / unparseable
  type string), silently bucketing real corruption as "missing"
  (lazy-create) and letting it pass the startup validator. Now raise
  VectorStoreError with actionable diagnostics; None remains valid only
  for "namespace does not exist."
- Startup validator only sampled message namespaces; added a parallel
  Collection-row sample so document namespaces are probed too, with the
  same dim assertion. Mirrors the --report path.

Hygiene:
- StartupValidationError now subclasses HonchoException so existing
  exception handlers recognize it. ValidationException is @final and
  has 422 request-validation semantics that would be misleading here.
- scripts/configure_embeddings.py main() no longer spins up two event
  loops. engine.dispose() moved into a try/finally inside _async_main
  so cleanup runs in the same loop as the pipeline.
- Replaced hand-rolled retry loop with tenacity.AsyncRetrying; same
  fail-closed semantics, less code, before_sleep_log for visibility.
- Added _validate_identifier() defense-in-depth: DB.SCHEMA and HNSW
  index names are regex-checked against [A-Za-z_][A-Za-z0-9_]* before
  SQL interpolation. Operator config + DB catalog are not user input
  under the current threat model, but the constraint is cheap to gate.

Test + docs:
- test_app_settings_accepts_non_1536_with_any_vector_store_configuration
  now actually exercises turbopuffer (was missing); supplies a dummy
  TURBOPUFFER_API_KEY to satisfy the model_validator.
- changing-embeddings.mdx: hyphenated "out-of-band" per reviewer style.

* fix: modify conftest to fix ci

* fix: ci tests for typescript server
2026-05-14 15:03:35 -04:00
Rajat Ahuja 5de8a3b81a
fix: use model-aware tokenizer and skip empty messages - DEV-1238 (#647)
* fix: use model-aware tokenizer and skip empty messages

* fix: change default model

* fix: types

* fix: guard on empty msg content
2026-05-11 17:22:50 -04:00
3un01a eba9279af2
Oolong Benchmark (#323)
* (feat) Add Oolong Benchmarks

* (fix) Address issues to fix basedpyright and coderabbit comments

* (fix) Address basedpyrwright additional warnings

* (fix) Address additional coderabbit issues

* (fix) Replace huggingface data loading to local filesystem-based

* (fix) Address coderabbit issues regarding data paths

* fix: Align with test harness conventions

* fix: Code Review Comments

* fix: stream data rather than load all at once

---------

Co-authored-by: 3un01a <3un01a@plasticlabs.ai>
Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2026-02-23 16:55:59 -05:00
ajspig 5bd93a2bef
adding test reasoning levels script (#337)
* chore: 3.0 honcho and 2.0 sdks changelog

fix: use PeerContextResponse in peer.ts

* chore: move docs to /v3/, build SDKs

* chore: code review

* feat: [WIP] migrate away from stainless in typescript sdk

* chore: move api from /v2/ to /v3/

* feat: no-stainless typescript with real tests

* feat: migrate python sdk off of stainless

* feat: clean typescript sdk

* chore: add tests for ts http client

* fix: rewrite entire python sdk in new format, update typescript sdk to use `configuration` not `config` for consistency with API

* fix: clean up SDKs, synchronize

* chore: update sdk examples

* chore: update OpenAPI documentation and SDK examples to reflect changes

* fix: better test

* fix: install deps in test runner, improve robustness of streaming in sdk, coderabbit nits

* fix: standardize around camelCase in TS SDK

* refactor: update configuration handling in SDKs to use typed models for workspace, session, and peer configurations

* docs: clarify queue status usage and remove polling methods from SDKs

add claude skills for migrations

* chore: fix links in docs

* feat: add deriver flush mode to bypass batch token threshold

- Introduced `is_deriver_flush_enabled` function to check if flush mode is active.
- Updated `QueueManager` to conditionally apply batch token thresholds based on flush mode.
- Enhanced `UnifiedTestExecutor` to enable flush mode via Redis.
- Added `flush` parameter to test cases to facilitate testing of flush mode behavior.
- Updated various test cases to utilize the new flush functionality.

* feat: implement schedule_dream functionality in SDKs, use in unified test runner

- Added `schedule_dream` method to both Python and TypeScript SDKs for scheduling dream tasks.
- Updated HTTP routes to include endpoint for scheduling dreams.
- Enhanced test runner to utilize the new `schedule_dream` method for scheduling actions.
- Updated TypeScript client to support the new scheduling functionality with appropriate parameters.

* feat: update single deriver task to support multiple observers

- Changed the `observer` parameter to `observers` as a list in multiple functions across the deriver module.
- Updated the processing logic to handle multiple observers for representation tasks.
- Adjusted related payload and queue management functions to accommodate the new observers structure.
- Modified tests to reflect changes in the representation task handling and ensure proper functionality.

* refactor: update enqueue tests to support deduplication of queue items with multiple observers

- Modified tests in `test_enqueue.py` to reflect changes in the queue item structure, where each message now results in a single queue item containing a list of observers.
- Updated assertions to validate that the `observers` field correctly includes all relevant peers, ensuring proper functionality of the deduplication logic.
- Removed redundant payload matching logic to streamline test cases and improve clarity.

* fix: add backwards compatibility for representation work unit keys and payload observers

* add: results

* add: adoption journey

* feat: update dialectic configuration and introduce cost calculator

- Adjusted LLM and dialectic settings in `.env.template`, `config.toml.example`, and `src/config.py` to reduce maximum tool output characters and session history tokens for cost efficiency.
- Implemented a new `dialectic_cost_calculator.py` script to estimate costs based on reasoning levels and model pricing.
- Enhanced `DialecticAgent` to utilize minimal tools and adjusted output token settings based on reasoning level to optimize performance and reduce costs.

* feat: add reasoning level to chat input in unified test runner

- Enhanced the `UnifiedTestExecutor` to include a `reasoning_level` parameter in the chat method call.
- Updated the `QueryAction` model to support the new `reasoning_level` attribute, allowing for more nuanced chat interactions.

* add: adding script for testing reasoning levels

* fix: moving script

* fix: remove stale doc files deleted in main

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: Code Review Changes

---------

Co-authored-by: Benjamin McCormick <docterformer@protonmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2026-02-19 15:51:15 -05:00
doria dce96889bc
feat: honcho 3.0, sdks 2.0, excise stainless, update v3 docs, changelogs (#331)
* chore: 3.0 honcho and 2.0 sdks changelog

fix: use PeerContextResponse in peer.ts

* chore: move docs to /v3/, build SDKs

* chore: code review

* feat: [WIP] migrate away from stainless in typescript sdk

* chore: move api from /v2/ to /v3/

* feat: no-stainless typescript with real tests

* feat: migrate python sdk off of stainless

* feat: clean typescript sdk

* chore: add tests for ts http client

* fix: rewrite entire python sdk in new format, update typescript sdk to use `configuration` not `config` for consistency with API

* fix: clean up SDKs, synchronize

* chore: update sdk examples

* chore: update OpenAPI documentation and SDK examples to reflect changes

* fix: better test

* fix: install deps in test runner, improve robustness of streaming in sdk, coderabbit nits

* fix: standardize around camelCase in TS SDK

* refactor: update configuration handling in SDKs to use typed models for workspace, session, and peer configurations

* docs: clarify queue status usage and remove polling methods from SDKs

add claude skills for migrations

* chore: fix links in docs

* feat: add deriver flush mode to bypass batch token threshold

- Introduced `is_deriver_flush_enabled` function to check if flush mode is active.
- Updated `QueueManager` to conditionally apply batch token thresholds based on flush mode.
- Enhanced `UnifiedTestExecutor` to enable flush mode via Redis.
- Added `flush` parameter to test cases to facilitate testing of flush mode behavior.
- Updated various test cases to utilize the new flush functionality.

* feat: implement schedule_dream functionality in SDKs, use in unified test runner

- Added `schedule_dream` method to both Python and TypeScript SDKs for scheduling dream tasks.
- Updated HTTP routes to include endpoint for scheduling dreams.
- Enhanced test runner to utilize the new `schedule_dream` method for scheduling actions.
- Updated TypeScript client to support the new scheduling functionality with appropriate parameters.

* feat: update single deriver task to support multiple observers

- Changed the `observer` parameter to `observers` as a list in multiple functions across the deriver module.
- Updated the processing logic to handle multiple observers for representation tasks.
- Adjusted related payload and queue management functions to accommodate the new observers structure.
- Modified tests to reflect changes in the representation task handling and ensure proper functionality.

* refactor: update enqueue tests to support deduplication of queue items with multiple observers

- Modified tests in `test_enqueue.py` to reflect changes in the queue item structure, where each message now results in a single queue item containing a list of observers.
- Updated assertions to validate that the `observers` field correctly includes all relevant peers, ensuring proper functionality of the deduplication logic.
- Removed redundant payload matching logic to streamline test cases and improve clarity.

* fix: add backwards compatibility for representation work unit keys and payload observers

* feat: update dialectic configuration and introduce cost calculator

- Adjusted LLM and dialectic settings in `.env.template`, `config.toml.example`, and `src/config.py` to reduce maximum tool output characters and session history tokens for cost efficiency.
- Implemented a new `dialectic_cost_calculator.py` script to estimate costs based on reasoning levels and model pricing.
- Enhanced `DialecticAgent` to utilize minimal tools and adjusted output token settings based on reasoning level to optimize performance and reduce costs.

* feat: add reasoning level to chat input in unified test runner

- Enhanced the `UnifiedTestExecutor` to include a `reasoning_level` parameter in the chat method call.
- Updated the `QueryAction` model to support the new `reasoning_level` attribute, allowing for more nuanced chat interactions.

* feat: run deriver once for multiple observers (#335)

* feat: update single deriver task to support multiple observers

- Changed the `observer` parameter to `observers` as a list in multiple functions across the deriver module.
- Updated the processing logic to handle multiple observers for representation tasks.
- Adjusted related payload and queue management functions to accommodate the new observers structure.
- Modified tests to reflect changes in the representation task handling and ensure proper functionality.

* refactor: update enqueue tests to support deduplication of queue items with multiple observers

- Modified tests in `test_enqueue.py` to reflect changes in the queue item structure, where each message now results in a single queue item containing a list of observers.
- Updated assertions to validate that the `observers` field correctly includes all relevant peers, ensuring proper functionality of the deduplication logic.
- Removed redundant payload matching logic to streamline test cases and improve clarity.

* fix: add backwards compatibility for representation work unit keys and payload observers

* feat: refactor benchmark runners to share common functionality

- Introduced a new `runner_common.py` module containing shared utilities for benchmark test runners, including common argument parsing, client creation, and queue management.
- Updated `BEAMRunner`, `LoCoMoRunner`, and `LongMemEvalRunner` to inherit from `RunnerMixin`, leveraging shared functionality for metrics collection and logging.
- Added `reasoning_level` and `redis_url` parameters to runner constructors for enhanced configuration.
- Streamlined argument parsing by utilizing `add_common_arguments` for shared command-line options across all runners.

* fix: update last_user_message handling to use message content instead of ID

* fix: standardize config vs configuration

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2026-01-22 15:16:28 -05:00
doria 578ef2c665
feat: agentic dreamer and agentic dialectic (#309)
* feat: add better params to working representation fetch in SDKs, return messages when added

* fix: working representation routes now accepting all parameters properly, with tests

* feat: add metadata/config fields to SDK objects where viable

* fix: tests

* feat: refactor SDKs to use representation config; [TEMP STAINLESS BUILD] update API

* feat: add representation object to sdks

* fix: use stainless sdk on branch

* fix: update TypeScript SDK tsconfig to use node16 module resolution

* fix: add isolatedModules = true to tsconfig

* fix: lol

* chore: coderabbit review

* feat: make delete session real

* feat: add observations routes with delete endpoints for documents. make session deletion real.

* chore: type cleanup

* fix: tests

* chore: coderabbit review

* fix: namespace by workspace

* feat: add ability to customize messages_per_summary at both workspace and session level

* chore: tests for summary config

* chore: coderabbit cleanup

* feat: make session and workspace config totally customizeable

* feat: add search by peer knowledge (#250)

* feat: search by peer perspective

* fix: enforce workspace in filters, make messages distinct in join

* fix: batch and merge migration steps

* fix: add refresh, add config to workspace, add refresh function, make fields readonly

* fix: search distinct

* fix: merge migrations

* fix: merge migrations

* fix: batch deletions, improve comments, limit consolidate dream to 100 docs at a time, auth on observations routes

* chore: review

* chore: coderabbit

* chore: review

* chore: broken comment

* feat: add set peer card route to API

* feat: create advanced configuration parameters with message>session>workspace hierarchy

* [wip] build unified testing harness

* chore: lint

* fix: cache invalidation, naming things, etc

* feat: longmem tests

* chore: peer config refactor

* feat: consolidate dream working, refactor representation

* fix: Various CR Comment Fixes

* feat: Allow configurable Redis port for harness instances and update cleanup methods to be asynchronous.

* feat: agentic ingestion task!!!

* feat: agentic deriver

* feat: dialectic agent and dreamer agent

* chore: browbeat tests into passing

* fix: nits

* chore: remove old code, update config files

* fix: simplify deriver

* feat: dialectic agent prompt updates, re-introduce non_agent deriver, eval tweaks

* feat: fast deriver, dreamer, then dialectic

* fix: tweaks across the board

* feat: add baseline tests

* feat: truncation in tools and client, tweaks for evals

* feat: add locomo, fix longmem judge!!!

* fix: locomo f1 is trash, use llm judge

* feat: trace creation

* feat: add first draft of obex benchmark, fix embedding model, fix locomo methodology

* fix: locomo session-optimized, better logging of cache usage and better cache usage

* chore: use openrouter for baselines

* fix: add test for merge migration

* chore: opus-powered cleanup

* fix: add config for vllm, better client

* chore: clean up clients.py a bit

* chore: move magic numbers to config, add tests for agent tools

* fix: wrong mock in dialectic tests, make ToolContext a dataclass

* feat: tweak prompts, make deriver explicit-only

* feat: more prompt & tool tweaks

* chore: more tweaks

* feat: dream with subagents

* fix: make dream trigger override scheduled, play around with dream agents

* chore: cleanup deriver

* chore: cleanup dialectic

* chore: cleanup orchestrator

* chore: comment out dream stuff, WIPing

* fix: inc temp on retry, typechecking

* feat: tweak dreaming

* feat: contradiction obs

* Add dream trees

* chore: preserve reasoning_details from openrouter in client

* fix: get_observation_context correct params

* fix: use correct message id in tool

* chore: cleanup longmem runner

* chore: clean up tests, remove dream tests for now as rearchitecting around trees

* chore: update stainless deps

* Update threholding mechanism

* chore: pre-commit hooks whitespace

* chore: clean up types

* feat: add explicit bench

* fix: address additional basepyright issues

* fix: adding logging as a fixture on honcho_llm_call and supporting dialectic loging. (#305)

* fix: lock on db for tool calls

* chore: clean up experimental derivers

* chore: coderabbit review cleanup

* feat: add streaming support to agentic dialectic

* feat: prometheus token tracking for deriver and dialectic

* fix: self-loops for isolated nodes

* chore: PascalCase for prometheus parameter typing

* feat: add reasoning levels to dialectic agent

* chore: delete old file, add new fake env vars in unittest.yml

* fix: all fields needed for dialectic reasoning level configs

* feat: track dreaming usage in prometheus

* chore: Create backwards compatabile conclusion and queue endpoints

* fix: remove redundant try-catch, add trace label, move .limit to end of statement

* fix: remove vignettes (for now), review fixes, remove merge migration, config cleanup

* chore: code review / cleanup

* chore: merge fixes

* chore: clean up, remove reasoning_focus, reintroduce peer cards in dreamers

* chore: code rabbit nitpicks

* fix: add unique index for pending dreams in queue

* fix: revert removal of surprisal in dreamer config

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Co-authored-by: 3un01a <3un01a@plasticlabs.ai>
Co-authored-by: 3un01a <3un01a.labs@gmail.com>
Co-authored-by: ajspig <46900795+ajspig@users.noreply.github.com>
2026-01-12 15:12:17 -05:00
Rajat Ahuja d7bdcc3bc1
feat: codify queue columns (#254)
* feat: codify queue columns

* fix: batch with python loop control

* fix: cleanup merge

* fix: down revision

* fix: batch delete in migration

* feat: only run alembic tests for changed migration / test (#264)

* feat: only run alembic tests for changed migration / test
* fix: Run full test suite if alembic testing infra changes

* feat: codify times_derived + level on Document (#260)

* feat: codify times_derived + level on Document
* fix: CR comment

* fix: CodeRabbit comments

* fix: batch migrations; move types; remove fields from payload

* fix: rm duplicate table args

* fix: add messages.id FK
2025-11-07 13:22:24 -05:00
Rajat Ahuja 5db7b4948c
feat: introduce alembic migration verification (#238)
* feat: introducer migration verification checks

* fix: move verification to tests/alembic

* feat: add verification steps for all alembic migrations

* fix: isolate test runs and implement all migration tests

* test: parametrize

* fix: CR comments

* fix: Add README

* feat: add precommit hook for validating alembic

* fix: rm pytest-alembic package

* test: create bulk resources to test migration batching

* fix: add latest test

* fix: tests to handle non-standard schema

* chore: Code Rabbit nits

* fix: CR comments 1

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-23 16:24:35 -04:00
doria f988aae996
create Representation class and use it to unify all formatting (#214)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* [WIP] representation structure + deriver cleanup

* chore: add tests, cleanup

* feat: [WIP: semi-working] representation object

* fix: alignment

* fix: make observations hashable for dedup

* fix: datetime formatting, observation counting

* fix: switch to int for message id, clean up representation

* feat: remove need for metadata working rep

* chore: cleanup

* fix: use tenacity instead of custom fns

* feat: add representation and card to context if desired

* feat: add semantically relevant observations

* fix: pass all params to streaming, nonblocking streaming

* feat: consolidate document saving, make working representation fetching much smarter

* chore: add 100% test coverage of representation util

* feat: basic dream infra

* feat: dream queue item first pass

* chore: fixes & cleanup from coderabbit

* fix: dreams scheduled when new document count reaches a certain threshold

* feat: wip: timed dreams (not working)

* fix: test

* fix: remove useless pyright ignore

* fix: executing dreams

* feat: dreaming

* feat: [WIP] longmemeval bench

* feat: add USE_PEER_CARD setting, fix longmem test driver

* feat: get full working rep for dialectic in one swoop -- fix representation_from_documents to use the proper timestamp!

* fix: timestamps for real, handle assistant qs in longmem

* fix: remove old client, add batching to longmem

* perf: remove duplicate detection, will move to background task

* feat: track perf metrics on evals

* feat: adjust deriver prompt to use peer_id, add question date to question, clean up deriver

* fix: label metrics by task for better perf trace

* chore: code review

* feat: add efficiency score to longmem bench

* chore: tuning and cleaning up eval

* chore: bring in the big prompts

* feat: add support for vllm client

* feat: perf: bundle db calls in deriver and dialectic, increase max conns in docker db

* feat: add merge-sessions flag to longmemeval, add SUMMARY_ENABLED flag

* fix: COLLECT_METRICS default false

* chore: display start/end message ids, don't include in metrics

* fix: break large messages apart for eval

* fix: only get/create collection when needed

* feat: properly attribute documents with message id ranges and add session name column to documents

* fix: revert move of get_or_create_collection (need for fkey)

* fix: always get collection with peer name even if it's none

* chore: coderabbit

* fix: give peer card its own config, expand document schema, refactor get_context to be parallel, various cleanup chores and bugfixes

* chore: refactor: reify observer/observed system across entire codebase, including db migration

* refactor: cleanup code organization, make singletons where desired

* refactor: replace embeddings store with representation manager

* chore: coderabbit cleanup

* chore: update migration to non-null session param in documents, general review and cleanup

* chore: merge branch 'main' into ben/deriver-tidy

* chore: review fixes
2025-10-07 15:28:44 -04:00
Vineeth Voruganti e914dbe334
feat: Add get summaries endpoints & Custom Timestamps (#185)
* feat: add support for custom message timestamps in API

- Introduced `created_at` parameter for message creation, allowing users to specify custom timestamps.
- **Single source of truth for timestamp string format**
- Updated SDK documentation to reflect this new feature and its use cases.
- Enhanced validation schemas to include the optional `created_at` field.
- Added tests to verify functionality for messages with and without custom timestamps, ensuring correct behavior and default timestamp usage.

* feat: add timestamp option to sdks

* feat: Add get summaries endpoints

* feat: WIP basic SDK implementation blocked until stainless release

* feat: Implement SDKs with honcho-core methods

* fix (sdk): Used release 1.4.0 core sdks

* fix: Code Rabbit

* chore: Pytest errors

---------

Co-authored-by: Benjamin McCormick <docterformer@protonmail.com>
2025-08-12 17:19:53 -04:00
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
doria bc5474c170
feat: 2.1.1 release (#167) 2025-07-23 23:06:09 -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 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
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
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
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 606aa14411
Alembic genesis (#106)
* chore: create initial migration for alembic, refactor provision/upgrade db scripts to fully leverage alembic

* add schema everywhere, remove duplicates

* fix: Add default schema public

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-05-13 12:26:58 -04:00
doria d1292aaae4
Continuous deployment of Honcho images to SaaS platform (#102)
* feat: add CD for honcho images to saas test and prod environments

* fix: use github tag in image label

* feat: split up test and prod deployment flows, push to service after

* fix: action parsing properly hopefully

* fix: proper url, version

* remove excessive fly.toml

* fix: specify prod-image in prod workflow

* Potential fix for code scanning alert no. 12: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 11: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Apply suggestions from code review

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

* fix: Change App name in command and make steps sequential

* fix: Address Code Rabbit nitpicks

* Use IMAGE Label environment variable

* fix: collisions between github action groups

* feat: add migrate_db script

* fix: correct image label on prod deploy

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-05-09 00:21:54 +09:00
Vineeth Voruganti 8588d36eb4
v1.0.0 Release Candidate (#95)
* chore: Update versioning for release

* fix: remove db creation at start and sync migrations and models

* fix: Checkpoint changing metamessage schema

* chore: linter fixes

* fix: session cloning working

* Hybrid long-term memory (#92)

* Add TOM method switching

* Add system prompt and note on format

* Add persistence tweaks

* Specify format for each section of user representation

* Parse XML tags before saving representation metamessage

* Clean up

* Use Claude 3.5 Haiku and refine prompt

* Simplify message processing

* chore: update token limit on dialectic and model for deriver

* Add embedding-based long-term fact retrieval

* Fix bug preventing new documents from being created

* Use multiple queries + tweak prompt

* Fix collection name bug + add duplicate removal

* First implementation of on-demand user rep generation

* WIP debug on-demand user rep changes

* Fixed representations not being stored & deriver issue

* Some speed improvements

* Play with number of facts / queries

* WIP prompt caching for Claude

* WIP fix anthropic caching

* Anthropic prompt caching working but messages too short

* Use Cerebras for small inferences

* Make dialectic responses 1000 tokens max

* Make user representation generation model a constant

* Use llama 3.1 8b for query generation

* Update env template

* Add crud.get_or_create_protected_collection

* rabbit comments

* Fix linter issues

* Add Cerebras to stream router method

* Better handling of default-empty string args

* Change prints to debug logs

* Add error handling to TOM inference

* Handle missing/empty client in model responses

* Handle no messages case in get_chat_history

* Fix indent

* Add error handling to single_prompt methods

* Fix get_or_create_user_protected_collection

* Simplify openAI-compatible model client instantiation

* Remove health endpoint

* Remove LocalEmbeddingStore

* Change prints to debug logs

* Change sentry track

* Code review changes

* Add README to ToM module

* Switch to Groq

* Fix inconsistent openai compatible provider list in stream()

* Update env template to include Groq variables

* Add model_client tests

* fix: Fix unit tests

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add scoped API keys (#91)

* add AUTH_JWT_SECRET and ADMIN_KEY, use in security middleware (TODO granular keys)

* WIP: convert all API paths to use scoped keys

* add basic unit tests for API keys, ruff formatting

* MVP of route using JWT for payload

* add get_user_from_token

* add key table to postgres, use it to enable key revocation

* add key revocation pt 2 -- fix order of param checks

* finish convenience routes that assume params from JWT

* add tests for key API

* get_keys

* add secrets utility script, add key rotation, fill out tests

* add tiny cache as PoC

* nits, validations, etc

* only create keys table migration if necessary

* fix keys tests to always use auth

* tiny fix to make custom DATABASE_SCHEMA work

* review: add better docs, fix security issue with cache, clear db on rotation, and more

* remove rotation

* remove key database entirely

* Add `/all` path to get all apps (#94)

* add `/all` path for apps

* assert vector extension installed (need this for groudon)

* review

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add scoped API keys (#91)

* add AUTH_JWT_SECRET and ADMIN_KEY, use in security middleware (TODO granular keys)

* WIP: convert all API paths to use scoped keys

* add basic unit tests for API keys, ruff formatting

* MVP of route using JWT for payload

* add get_user_from_token

* add key table to postgres, use it to enable key revocation

* add key revocation pt 2 -- fix order of param checks

* finish convenience routes that assume params from JWT

* add tests for key API

* get_keys

* add secrets utility script, add key rotation, fill out tests

* add tiny cache as PoC

* nits, validations, etc

* only create keys table migration if necessary

* fix keys tests to always use auth

* tiny fix to make custom DATABASE_SCHEMA work

* review: add better docs, fix security issue with cache, clear db on rotation, and more

* remove rotation

* remove key database entirely

* Add `/all` path to get all apps (#94)

* add `/all` path for apps

* assert vector extension installed (need this for groudon)

* review

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* chore: README and CHANGELOG updates

* add JWT expiry

* fix: Consolidate get methods with JWT token resolution

* chore: Add Annotation to Path, Query, and Body params

* chore: run ruff formatter

* chore: nits & add one exhaustive test of a query route

* fix: undo change to fly.toml

* fix: Langfuse tracing

* Consolidate Get Methods (#96)

* fix: Consolidate get methods with JWT token resolution

* chore: Add Annotation to Path, Query, and Body params

* chore: run ruff formatter

* chore: nits & add one exhaustive test of a query route

* fix: undo change to fly.toml

---------

Co-authored-by: dr-frmr <docterformer@protonmail.com>

* fix: dev-667 fix streaming endpoint

* fix: Anthropic Langfuse Tracing

* fix: add scripts folder to dockerfile

* fix: Remove redundant fields from pydantic schemas

* fix: Add deeper protection on reserved collection

* fix: Consolidate chat and stream methods

* docs: Update Mintlify API Reference and Changelog

* remove langchain guide, update architecture diagram

* honcho mcp server

* chore: Update .env template

* update discord, temporarily remove other guides

* Limit dialectic & deriver context usage with two-scale progressive summarization (#97)

* WIP two tiered summaries

* Move to process_item

* Save user rep metamessage even if no message_id

* Change number of messages per short summary

* Fix broken mock

* Remove prints

* chore: fix test

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* feat: Add Gemini Support, link facts to message, use 8b for dialectic fact queries

* chore: Styling

* chore: coderabbit nitpicks

* keep dialectic guide

* Add streaming guide

* Remove TODO from dialectic guide

* Fix JS snippets that referred to honcho singleton as client

* Add App explanation to architecture page

---------

Co-authored-by: Dani Balcells <18307962+danibalcells@users.noreply.github.com>
Co-authored-by: doria <93405247+dr-frmr@users.noreply.github.com>
Co-authored-by: dr-frmr <docterformer@protonmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
Co-authored-by: Daniel Balcells <dbalcells@gmail.com>
2025-04-10 13:59:40 -04:00
Vineeth Voruganti bc6afccf1a
v0.0.8 Documentation Updates (#55)
* Docker Compose Environment override fix

* Fixes DEV-301 and Fixes DEV-298

* Restructure Repository to focus on Server

* Fixes DEV-300

* Fixes DEV-298

* Fix Dead links in mintlify docs

* Fix directory path

* Add health check and database dependency to compose

* Mirascope deriver (#56)

* ready for testing

* delete prompts folder, mirascope colocation ftw

* Fix mirascope integration errors and streaming endpoint

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

* Fix directory path

---------

Co-authored-by: vintro <vince@plasticlabs.ai>
2024-05-15 00:07:25 -04:00
Vineeth Voruganti 29cd37bc90
[0.0.6] - 3-21-2024 Bug Fixes (#47)
* 🧪 asyncify tests

*  asyncify client

* Basic Test for Page based pagination

* add sync buildstep and client

* add vscode DX

* Added Testing for generators and updated examples

* feat: example updates

* readme exists now

* Stylistic changes and generic message

* Metamessages with other refactoring - untested

* Work with unit tests

* Fix Examples

* MEME-78 Update Changelogs

* Docstrings to client

* 🧪 autogenerate sync tests

* test one

* add db type

* sync client

* add status badge

* add coverage

* add file

* give perms

* properly output coverage

* split test and coverage

* rename action

* 🧪 autogenerate sync tests (#16)

* Vector Support (#18)

* Scaffold for PGVector support

* Buggy crud with logic skeleton on api

* Crud logic and schema definition for pgvector

* Populate all routes and refactor to name Collection

* vince's progress

* AsyncCollection progress

* Local PGVector Docker Container

* client methods for sdk except document delete and update

* Vector Support Passing All Test Cases

* Docs Updates

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

* Add reverse parameters for paginated routes

* Address dependabot

* Formatting

* initial commit on honcho dspy personas

* working, hit token limit and can't test dspy optimization

* initial version working, need to test optimization

* optimizers working, but appending any example

* ready for user object (tbomk)

* Revert "add test actions and coverage"

* Refactor to add User and App Tables

* User Object passing test cases

* Update examples

* DSPy Todo and documentation updates

* Add is_active filtering

* Add is_active filtering to the generator

* Fix update user metadata

* working, but weird compiler error

* fixed str error in optimizer

* ship

* sentry

* Open Telemetry

* optional logging with environment variables

* add actions again? (#29)

* add postgres

* add openai key

* readd coverage

* desyncify and add detailed coverage

* ⚙️ chore: update start script in VS Code to include poetry install --no-root before running uvicorn (#33)

* Refactored code but need to tweak asyncpg

* Working Async API using Psycopg3

* Update Workflow Connection URI

* Update Workflow Connection URI in coverage test as well

* Skeleton for Dialectic API

* Fixes DEV-217 URL Encoding

* Add Built-in Langchain Utility function

* Sphinx Docs MVP

* Metadata filtering for all fixes dev-261

* Basic Dialectic Endpoint fixes dev-253

* Working Fact Deriver

* 0.0.5 Docs and README updates

* Cloudflare Sphinx

* update example to use right function (#36)

* 🚀 feat: add support for running API using docker-compose with configurable environment variables and update docker-compose.yml for API and database services. (#34)

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>

* add interrogate

* routerify everything

* full docstring coverage

* remove unused imports and fix env issue

* Update docker-compose connection uri and remove auto-stop to deriver process

* Docstrings and langchain message converter in reverse

* Sentry, OTEL, langchain both directions, fly.toml for deriver

* Rename to deriver

* Fix favicon and remove metadata from schema

* 0.0.6 Notes

* Changelog edit

* Route bug fix

* Route bug fix again

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
Co-authored-by: vintro <77507980+vintrocode@users.noreply.github.com>
2024-03-21 12:22:29 -07:00
Vineeth Voruganti 995a6d0644
[0.0.5] - 03-14-2024 Dialectic Agent (#38)
* 🧪 asyncify tests

*  asyncify client

* Basic Test for Page based pagination

* add sync buildstep and client

* add vscode DX

* Added Testing for generators and updated examples

* feat: example updates

* readme exists now

* Stylistic changes and generic message

* Metamessages with other refactoring - untested

* Work with unit tests

* Fix Examples

* MEME-78 Update Changelogs

* Docstrings to client

* 🧪 autogenerate sync tests

* test one

* add db type

* sync client

* add status badge

* add coverage

* add file

* give perms

* properly output coverage

* split test and coverage

* rename action

* 🧪 autogenerate sync tests (#16)

* Vector Support (#18)

* Scaffold for PGVector support

* Buggy crud with logic skeleton on api

* Crud logic and schema definition for pgvector

* Populate all routes and refactor to name Collection

* vince's progress

* AsyncCollection progress

* Local PGVector Docker Container

* client methods for sdk except document delete and update

* Vector Support Passing All Test Cases

* Docs Updates

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

* Add reverse parameters for paginated routes

* Address dependabot

* Formatting

* initial commit on honcho dspy personas

* working, hit token limit and can't test dspy optimization

* initial version working, need to test optimization

* optimizers working, but appending any example

* ready for user object (tbomk)

* Revert "add test actions and coverage"

* Refactor to add User and App Tables

* User Object passing test cases

* Update examples

* DSPy Todo and documentation updates

* Add is_active filtering

* Add is_active filtering to the generator

* Fix update user metadata

* working, but weird compiler error

* fixed str error in optimizer

* ship

* sentry

* Open Telemetry

* optional logging with environment variables

* add actions again? (#29)

* add postgres

* add openai key

* readd coverage

* desyncify and add detailed coverage

* ⚙️ chore: update start script in VS Code to include poetry install --no-root before running uvicorn (#33)

* Refactored code but need to tweak asyncpg

* Working Async API using Psycopg3

* Update Workflow Connection URI

* Update Workflow Connection URI in coverage test as well

* Skeleton for Dialectic API

* Fixes DEV-217 URL Encoding

* Add Built-in Langchain Utility function

* Sphinx Docs MVP

* Metadata filtering for all fixes dev-261

* Basic Dialectic Endpoint fixes dev-253

* Working Fact Deriver

* 0.0.5 Docs and README updates

* Cloudflare Sphinx

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
2024-03-14 10:01:08 -07:00
Vineeth Voruganti d368139b2a
v0.0.3 (#19)
* 🧪 asyncify tests

*  asyncify client

* Basic Test for Page based pagination

* add sync buildstep and client

* add vscode DX

* Added Testing for generators and updated examples

* feat: example updates

* readme exists now

* Stylistic changes and generic message

* Metamessages with other refactoring - untested

* Work with unit tests

* Fix Examples

* MEME-78 Update Changelogs

* Docstrings to client

* 🧪 autogenerate sync tests (#16)

* Vector Support (#18)

* Scaffold for PGVector support

* Buggy crud with logic skeleton on api

* Crud logic and schema definition for pgvector

* Populate all routes and refactor to name Collection

* vince's progress

* AsyncCollection progress

* Local PGVector Docker Container

* client methods for sdk except document delete and update

* Vector Support Passing All Test Cases

* Docs Updates

---------

Co-authored-by: vintro <vince@plasticlabs.ai>

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
2024-02-15 09:53:51 -08:00
Vineeth Voruganti 8539b87804
v0.0.2 (#15)
* 🧪 asyncify tests

*  asyncify client

* Basic Test for Page based pagination

* add sync buildstep and client

* add vscode DX

* Added Testing for generators and updated examples

* feat: example updates

* readme exists now

* Stylistic changes and generic message

* Metamessages with other refactoring - untested

* Work with unit tests

* Fix Examples

* MEME-78 Update Changelogs

* Docstrings to client

---------

Co-authored-by: hyusap <paulayush@gmail.com>
Co-authored-by: vintro <vince@plasticlabs.ai>
2024-02-08 11:05:56 -08:00