Commit Graph

30 Commits

Author SHA1 Message Date
Kian Jones
f5c4ab50f4 chore: add ty + pre-commit hook and repeal even more ruff rules (#9504)
* auto fixes

* auto fix pt2 and transitive deps and undefined var checking locals()

* manual fixes (ignored or letta-code fixed)

* fix circular import

* remove all ignores, add FastAPI rules and Ruff rules

* add ty and precommit

* ruff stuff

* ty check fixes

* ty check fixes pt 2

* error on invalid
2026-02-24 10:55:11 -08:00
Kian Jones
25d54dd896 chore: enable F821, F401, W293 (#9503)
* auto fixes

* auto fix pt2 and transitive deps and undefined var checking locals()

* manual fixes (ignored or letta-code fixed)

* fix circular import
2026-02-24 10:55:08 -08:00
Sarah Wooders
21e880907f feat(core): structure memory directory and block labels [LET-7336] (#9309) 2026-02-24 10:52:06 -08:00
cthomas
ab4ccfca31 feat: add tags support to blocks (#8474)
* feat: add tags support to blocks

* fix: add timestamps and org scoping to blocks_tags

Addresses PR feedback:

1. Migration: Added timestamps (created_at, updated_at), soft delete
   (is_deleted), audit fields (_created_by_id, _last_updated_by_id),
   and organization_id to blocks_tags table for filtering support.
   Follows SQLite baseline pattern (composite PK of block_id+tag, no
   separate id column) to avoid insert failures.

2. ORM: Relationship already correct with lazy="raise" to prevent
   implicit joins and passive_deletes=True for efficient CASCADE deletes.

3. Schema: Changed normalize_tags() from Any to dict for type safety.

4. SQLite: Added blocks_tags to SQLite baseline schema to prevent
   table-not-found errors.

5. Code: Updated all tag row inserts to include organization_id.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: add ORM columns and update SQLite baseline for blocks_tags

Fixes test failures (CompileError: Unconsumed column names: organization_id):

1. ORM: Added organization_id, timestamps, audit fields to BlocksTags
   ORM model to match database schema from migrations.

2. SQLite baseline: Added full column set to blocks_tags (organization_id,
   timestamps, audit fields) to match PostgreSQL schema.

3. Test: Added 'tags' to expected Block schema fields.

This ensures SQLite and PostgreSQL have matching schemas and the ORM
can consume all columns that the code inserts.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* revert change to existing alembic migration

* fix: remove passive_deletes and SQLite support for blocks_tags

1. Removed passive_deletes=True from Block.tags relationship to match
   AgentsTags pattern (neither have ondelete CASCADE in DB schema).

2. Removed SQLite branch from _replace_block_pivot_rows_async since
   blocks_tags table is PostgreSQL-only (migration skips SQLite).

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* api sync

---------

Co-authored-by: Letta <noreply@letta.com>
2026-01-19 15:54:38 -08:00
Kian Jones
78600fac23 chore: index suggestions from planetscale suggestions (#6111)
suggestions from ps dashboard
2025-11-13 15:36:56 -08:00
Matthew Zhou
932b418681 feat: Add FK cascades, remove app-side label propagation [LET-4690] (#5219)
add FK cascades, remove app-side label propagation
2025-10-07 17:50:50 -07:00
Charles Packer
d748d86059 feat: add more indexes (#4849) 2025-10-07 17:50:45 -07:00
Sarah Wooders
a952a1266b feat: add various indexes (#4811) 2025-10-07 17:50:44 -07:00
Kian Jones
b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00
Kian Jones
22f70ca07c chore: officially migrate to submodule (#4502)
* remove apps/core and apps/fern

* fix precommit

* add submodule updates in workflows

* submodule

* remove core tests

* update core revision

* Add submodules: true to all GitHub workflows

- Ensure all workflows can access git submodules
- Add submodules support to deployment, test, and CI workflows
- Fix YAML syntax issues in workflow files

🤖 Generated with [Claude Code](https://claude.ai/code)

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

* remove core-lint

* upgrade core with latest main of oss

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 12:45:53 -07:00
Shubham Naik
eb21668f35 feat: add hidden property to group and blocks [PRO-1145] (#4415)
* feat: add hidden property to group and blocks

* feat: add hidden property to group and blocks

* chore: bup

* chore: add hidden property

* chore: next

---------

Co-authored-by: Shubham Naik <shub@memgpt.ai>
2025-09-04 10:53:16 -07:00
Kian Jones
fecf6decfb chore: migrate to ruff (#4305)
* base requirements

* autofix

* Configure ruff for Python linting and formatting

- Set up minimal ruff configuration with basic checks (E, W, F, I)
- Add temporary ignores for common issues during migration
- Configure pre-commit hooks to use ruff with pass_filenames
- This enables gradual migration from black to ruff

* Delete sdj

* autofixed only

* migrate lint action

* more autofixed

* more fixes

* change precommit

* try changing the hook

* try this stuff
2025-08-29 11:11:19 -07:00
Sarah Wooders
250d8b8006 feat: add cloud template fields to blocks/groups/agents [LET-3979]
* commit

* fix tests

* add routes

* remove old fields

* remove entity from group

* generate, migrate

* update

* keep from_template, etc.

* keep block fields

* final

* generate

* pass tests

* generate

* keep defaults

---------

Co-authored-by: jin <jin@letta.com>
2025-08-26 23:17:06 -07:00
Andy Li
1959109821 feat: support for project_id and backfills 2025-07-25 13:06:12 -07:00
cthomas
1ad3ebd934 feat: remove organization from blocks pydantic schema (#3428) 2025-07-19 23:42:19 -07:00
cthomas
4f37a39741 feat: remove agents SELECTIN from blocks model (#3427) 2025-07-19 23:04:33 -07:00
cthomas
96df26fdfe feat: remove groups selectin on blocks model (#3423) 2025-07-19 22:03:22 -07:00
cthomas
89f86b4263 feat: remove identities selectin from blocks model (#3424) 2025-07-19 21:44:47 -07:00
Andy Li
306175554f fix: alembic migration non-optional field (#2528) 2025-05-29 12:38:10 -07:00
Andy Li
5c02467eef feat: add-preserve_on_migration-to-property-of-block (#2476) 2025-05-29 11:07:45 -07:00
Sarah Wooders
99b44ce62d chore: add a concept (and enforcement of) read-only blocks (#2161) 2025-05-13 20:54:52 -07:00
cthomas
bc232ca56b feat: background multi-agent group for sleeptime agent (#1508) 2025-04-01 15:00:45 -07:00
Matthew Zhou
24fbdc6032 feat: Add block history tables (#1489) 2025-03-31 16:39:23 -07:00
cthomas
6b4533e7cb feat: add identities to blocks (#1219) 2025-03-12 12:09:31 -07:00
Matthew Zhou
d4c0264e95 feat: Hard deleting a Block will also reflect for all relevant AgentStates (#757) 2025-01-23 16:50:06 -08:00
mlong93
d6be7809d0 fix: deprecate cursor param and replace with before, after (#736)
Co-authored-by: Mindy Long <mindy@letta.com>
2025-01-23 14:17:25 -08:00
cthomas
f5bcef2657 chore: rename metadata_ field to metadata in pydantic (#732) 2025-01-22 19:05:41 -08:00
Caren Thomas
fd8961c39e run black, add isort config to pyproject.toml 2024-12-26 19:43:11 -08:00
Shubham Naik
0b8017853a fix: add tests to cypress 2024-12-23 14:44:08 -08:00
Shubham Naik
5a743d1dc4 Add 'apps/core/' from commit 'ea2a7395f4023f5b9fab03e6273db3b64a1181d5'
git-subtree-dir: apps/core
git-subtree-mainline: a8963e11e7a5a0059acbc849ce768e1eee80df61
git-subtree-split: ea2a7395f4023f5b9fab03e6273db3b64a1181d5
2024-12-22 20:31:22 -08:00