Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions alembic/versions/2d1832776538_add_chainlink_bridging.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,40 @@
Create Date: 2025-09-12 17:08:02.426767

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = '2d1832776538'
down_revision: Union[str, None] = '54a4e7fb3a17'
revision: str = "2d1832776538"
down_revision: Union[str, None] = "54a4e7fb3a17"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('chainlink_bridges',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('source_chain_id', sa.Integer(), nullable=False),
sa.Column('dest_chain_id', sa.Integer(), nullable=False),
sa.Column('recipient_address', sa.String(length=42), nullable=False),
sa.Column('token_address', sa.String(length=42), nullable=False),
sa.Column('transaction_hash', sa.String(length=66), nullable=False),
sa.Column('amount', sa.Numeric(precision=78), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
op.create_table(
"chainlink_bridges",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("source_chain_id", sa.Integer(), nullable=False),
sa.Column("dest_chain_id", sa.Integer(), nullable=False),
sa.Column("recipient_address", sa.String(length=42), nullable=False),
sa.Column("token_address", sa.String(length=42), nullable=False),
sa.Column("transaction_hash", sa.String(length=66), nullable=False),
sa.Column("amount", sa.Numeric(precision=78), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('chainlink_bridges')
op.drop_table("chainlink_bridges")
# ### end Alembic commands ###
30 changes: 16 additions & 14 deletions alembic/versions/48f62aff9aa9_add_swaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,40 @@
Create Date: 2025-09-10 00:07:44.965094

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = '48f62aff9aa9'
down_revision: Union[str, None] = 'd7ca3e4695b8'
revision: str = "48f62aff9aa9"
down_revision: Union[str, None] = "d7ca3e4695b8"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('swaps',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('strategy_id', sa.String(length=255), nullable=False),
sa.Column('wallet_address', sa.String(length=42), nullable=False),
sa.Column('amount_in', sa.Numeric(precision=78), nullable=False),
sa.Column('token_in', sa.String(length=42), nullable=False),
sa.Column('amount_out', sa.Numeric(precision=78), nullable=False),
sa.Column('token_out', sa.String(length=42), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
op.create_table(
"swaps",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("strategy_id", sa.String(length=255), nullable=False),
sa.Column("wallet_address", sa.String(length=42), nullable=False),
sa.Column("amount_in", sa.Numeric(precision=78), nullable=False),
sa.Column("token_in", sa.String(length=42), nullable=False),
sa.Column("amount_out", sa.Numeric(precision=78), nullable=False),
sa.Column("token_out", sa.String(length=42), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('swaps')
op.drop_table("swaps")
# ### end Alembic commands ###
213 changes: 123 additions & 90 deletions alembic/versions/ba582872fd6c_initial_migration_with_all_models.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
"""Initial migration with all models

Revision ID: ba582872fd6c
Revises:
Revises:
Create Date: 2025-09-08 11:36:30.346494

"""

from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa

from alembic import op

# revision identifiers, used by Alembic.
revision: str = 'ba582872fd6c'
revision: str = "ba582872fd6c"
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
Expand All @@ -21,104 +22,136 @@
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('users',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('user_id', sa.String(length=255), nullable=False),
sa.Column('is_temporary', sa.Boolean(), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('last_active', sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint('id')
op.create_table(
"users",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("user_id", sa.String(length=255), nullable=False),
sa.Column("is_temporary", sa.Boolean(), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("last_active", sa.DateTime(), nullable=False),
sa.PrimaryKeyConstraint("id"),
)
op.create_index(op.f("ix_users_user_id"), "users", ["user_id"], unique=True)
op.create_table(
"contract_deployments",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("user_id", sa.Integer(), nullable=False),
sa.Column("contract_signature", sa.String(length=66), nullable=False),
sa.Column("contract_address", sa.String(length=42), nullable=False),
sa.Column("chain_id", sa.Integer(), nullable=False),
sa.Column("salt", sa.String(length=66), nullable=False),
sa.Column("bytecode_hash", sa.String(length=66), nullable=False),
sa.Column("deployment_metadata", sa.JSON(), nullable=True),
sa.Column("transaction_hash", sa.String(length=66), nullable=False),
sa.Column("deployed_at", sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(
["user_id"],
["users.id"],
),
sa.PrimaryKeyConstraint("id"),
)
op.create_index("idx_signature_chain", "contract_deployments", ["contract_signature", "chain_id"], unique=True)
op.create_index(op.f("ix_contract_deployments_chain_id"), "contract_deployments", ["chain_id"], unique=False)
op.create_index(
op.f("ix_contract_deployments_contract_address"), "contract_deployments", ["contract_address"], unique=False
)
op.create_index(op.f('ix_users_user_id'), 'users', ['user_id'], unique=True)
op.create_table('contract_deployments',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('contract_signature', sa.String(length=66), nullable=False),
sa.Column('contract_address', sa.String(length=42), nullable=False),
sa.Column('chain_id', sa.Integer(), nullable=False),
sa.Column('salt', sa.String(length=66), nullable=False),
sa.Column('bytecode_hash', sa.String(length=66), nullable=False),
sa.Column('deployment_metadata', sa.JSON(), nullable=True),
sa.Column('transaction_hash', sa.String(length=66), nullable=False),
sa.Column('deployed_at', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_index(
op.f("ix_contract_deployments_contract_signature"), "contract_deployments", ["contract_signature"], unique=False
)
op.create_index('idx_signature_chain', 'contract_deployments', ['contract_signature', 'chain_id'], unique=True)
op.create_index(op.f('ix_contract_deployments_chain_id'), 'contract_deployments', ['chain_id'], unique=False)
op.create_index(op.f('ix_contract_deployments_contract_address'), 'contract_deployments', ['contract_address'], unique=False)
op.create_index(op.f('ix_contract_deployments_contract_signature'), 'contract_deployments', ['contract_signature'], unique=False)
op.create_table('conversation_history',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('session_id', sa.String(length=255), nullable=False),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('updated_at', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_table(
"conversation_history",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("user_id", sa.Integer(), nullable=False),
sa.Column("session_id", sa.String(length=255), nullable=False),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("updated_at", sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(
["user_id"],
["users.id"],
),
sa.PrimaryKeyConstraint("id"),
)
op.create_index(op.f('ix_conversation_history_session_id'), 'conversation_history', ['session_id'], unique=False)
op.create_table('datasets',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('name', sa.String(length=255), nullable=False),
sa.Column('dataset_metadata', sa.JSON(), nullable=True),
sa.Column('created_at', sa.DateTime(), nullable=False),
sa.Column('updated_at', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_index(op.f("ix_conversation_history_session_id"), "conversation_history", ["session_id"], unique=False)
op.create_table(
"datasets",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("user_id", sa.Integer(), nullable=False),
sa.Column("name", sa.String(length=255), nullable=False),
sa.Column("dataset_metadata", sa.JSON(), nullable=True),
sa.Column("created_at", sa.DateTime(), nullable=False),
sa.Column("updated_at", sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(
["user_id"],
["users.id"],
),
sa.PrimaryKeyConstraint("id"),
)
op.create_index(op.f('ix_datasets_name'), 'datasets', ['name'], unique=False)
op.create_table('memories',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('description', sa.Text(), nullable=False),
sa.Column('memory_metadata', sa.JSON(), nullable=True),
sa.Column('embedding', sa.JSON(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_index(op.f("ix_datasets_name"), "datasets", ["name"], unique=False)
op.create_table(
"memories",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("user_id", sa.Integer(), nullable=False),
sa.Column("description", sa.Text(), nullable=False),
sa.Column("memory_metadata", sa.JSON(), nullable=True),
sa.Column("embedding", sa.JSON(), nullable=True),
sa.Column("timestamp", sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(
["user_id"],
["users.id"],
),
sa.PrimaryKeyConstraint("id"),
)
op.create_table('dataset_chunks',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('dataset_id', sa.Integer(), nullable=False),
sa.Column('content', sa.Text(), nullable=False),
sa.Column('embedding', sa.JSON(), nullable=True),
sa.Column('chunk_index', sa.Integer(), nullable=False),
sa.Column('chunk_metadata', sa.JSON(), nullable=True),
sa.ForeignKeyConstraint(['dataset_id'], ['datasets.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_table(
"dataset_chunks",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("dataset_id", sa.Integer(), nullable=False),
sa.Column("content", sa.Text(), nullable=False),
sa.Column("embedding", sa.JSON(), nullable=True),
sa.Column("chunk_index", sa.Integer(), nullable=False),
sa.Column("chunk_metadata", sa.JSON(), nullable=True),
sa.ForeignKeyConstraint(
["dataset_id"],
["datasets.id"],
),
sa.PrimaryKeyConstraint("id"),
)
op.create_table('messages',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('user_id', sa.Integer(), nullable=False),
sa.Column('conversation_id', sa.Integer(), nullable=False),
sa.Column('role', sa.String(length=50), nullable=False),
sa.Column('content', sa.Text(), nullable=False),
sa.Column('message_metadata', sa.JSON(), nullable=True),
sa.Column('timestamp', sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(['conversation_id'], ['conversation_history.id'], ),
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
sa.PrimaryKeyConstraint('id')
op.create_table(
"messages",
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False),
sa.Column("user_id", sa.Integer(), nullable=False),
sa.Column("conversation_id", sa.Integer(), nullable=False),
sa.Column("role", sa.String(length=50), nullable=False),
sa.Column("content", sa.Text(), nullable=False),
sa.Column("message_metadata", sa.JSON(), nullable=True),
sa.Column("timestamp", sa.DateTime(), nullable=False),
sa.ForeignKeyConstraint(
["conversation_id"],
["conversation_history.id"],
),
sa.ForeignKeyConstraint(
["user_id"],
["users.id"],
),
sa.PrimaryKeyConstraint("id"),
)
# ### end Alembic commands ###


def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('messages')
op.drop_table('dataset_chunks')
op.drop_table('memories')
op.drop_index(op.f('ix_datasets_name'), table_name='datasets')
op.drop_table('datasets')
op.drop_index(op.f('ix_conversation_history_session_id'), table_name='conversation_history')
op.drop_table('conversation_history')
op.drop_index(op.f('ix_contract_deployments_contract_signature'), table_name='contract_deployments')
op.drop_index(op.f('ix_contract_deployments_contract_address'), table_name='contract_deployments')
op.drop_index(op.f('ix_contract_deployments_chain_id'), table_name='contract_deployments')
op.drop_index('idx_signature_chain', table_name='contract_deployments')
op.drop_table('contract_deployments')
op.drop_index(op.f('ix_users_user_id'), table_name='users')
op.drop_table('users')
op.drop_table("messages")
op.drop_table("dataset_chunks")
op.drop_table("memories")
op.drop_index(op.f("ix_datasets_name"), table_name="datasets")
op.drop_table("datasets")
op.drop_index(op.f("ix_conversation_history_session_id"), table_name="conversation_history")
op.drop_table("conversation_history")
op.drop_index(op.f("ix_contract_deployments_contract_signature"), table_name="contract_deployments")
op.drop_index(op.f("ix_contract_deployments_contract_address"), table_name="contract_deployments")
op.drop_index(op.f("ix_contract_deployments_chain_id"), table_name="contract_deployments")
op.drop_index("idx_signature_chain", table_name="contract_deployments")
op.drop_table("contract_deployments")
op.drop_index(op.f("ix_users_user_id"), table_name="users")
op.drop_table("users")
# ### end Alembic commands ###
31 changes: 31 additions & 0 deletions comprehensive_test_output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
warning: `uv run` is experimental and may change without warning.
Resolved 175 packages in 687ms
Audited 168 packages in 0.47ms
============================= test session starts ==============================
platform linux -- Python 3.12.12, pytest-8.4.1, pluggy-1.6.0
rootdir: /app
configfile: pyproject.toml
plugins: asyncio-1.3.0, langsmith-0.6.8, mock-3.14.1, anyio-4.12.1
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 13 items

tests/test_resilient_geometric_agent.py ......... [ 69%]
tests/test_intention.py . [ 76%]
tests/test_symbiosis.py .. [ 92%]
tests/test_portals.py . [100%]

=============================== warnings summary ===============================
.venv/lib/python3.12/site-packages/trustcall/_base.py:46
/app/.venv/lib/python3.12/site-packages/trustcall/_base.py:46: LangGraphDeprecatedSinceV10: Importing Send from langgraph.constants is deprecated. Please use 'from langgraph.types import Send' instead. Deprecated in LangGraph V1.0 to be removed in V2.0.
from langgraph.constants import Send

.venv/lib/python3.12/site-packages/websockets/legacy/__init__.py:6
/app/.venv/lib/python3.12/site-packages/websockets/legacy/__init__.py:6: DeprecationWarning: websockets.legacy is deprecated; see https://websockets.readthedocs.io/en/stable/howto/upgrade.html for upgrade instructions
warnings.warn( # deprecated in 14.0 - 2024-11-09

tests/test_resilient_geometric_agent.py::test_agent_initialization
/app/.venv/lib/python3.12/site-packages/apscheduler/schedulers/asyncio.py:35: DeprecationWarning: There is no current event loop
self._eventloop = asyncio.get_event_loop()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================== 13 passed, 3 warnings in 6.52s ========================
Loading
Loading