Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
95 commits
Select commit Hold shift + click to select a range
2234057
Merge pull request #15 from VeXHarbinger/development
Oblio-Falootin Mar 25, 2026
b692c45
fix: remove f-string SQL in get_recent_activity and update_todo; fix …
Oblio-Falootin Mar 26, 2026
4844030
docs: fix schema — BIGINT IDENTITY PKs, correct column names, add Tod…
Oblio-Falootin Mar 26, 2026
92025f7
docs: rewrite SKILL.md — replace all markdown tables with bullet list…
Oblio-Falootin Mar 26, 2026
acc5fd8
revert: restore UNIQUEIDENTIFIER schema in README
Oblio-Falootin Mar 26, 2026
b54198f
revert: restore SKILL.md to pre-Oblio state
Oblio-Falootin Mar 26, 2026
694c021
revert: restore sql_memory.py to pre-Oblio state
Oblio-Falootin Mar 26, 2026
9c16d7a
housekeeping: remove agent_report.py
Oblio-Falootin Mar 26, 2026
80231d3
housekeeping: remove infrastructure/agent_base.py
Oblio-Falootin Mar 26, 2026
5664a7f
housekeeping: remove infrastructure/agent_reporter.py
Oblio-Falootin Mar 26, 2026
2ebafba
housekeeping: remove infrastructure/agent_self_logging.py
Oblio-Falootin Mar 26, 2026
32875a8
housekeeping: remove infrastructure/generate_live_report.py
Oblio-Falootin Mar 26, 2026
ce09d6f
housekeeping: remove infrastructure/health_checker.py
Oblio-Falootin Mar 26, 2026
3f0eea2
housekeeping: remove infrastructure/install_pytest.py
Oblio-Falootin Mar 26, 2026
9acff32
housekeeping: remove infrastructure/migrate_md_to_sql.py
Oblio-Falootin Mar 26, 2026
f05016d
housekeeping: remove infrastructure/model_router.py
Oblio-Falootin Mar 26, 2026
cd7c41f
housekeeping: remove infrastructure/piper_speak.sh
Oblio-Falootin Mar 26, 2026
eb06f3e
housekeeping: remove infrastructure/praise_log.py
Oblio-Falootin Mar 26, 2026
5ab356f
housekeeping: remove infrastructure/queue_dashboard_praise_button.py
Oblio-Falootin Mar 26, 2026
49a59e9
housekeeping: remove infrastructure/queue_endpoint_testing_agent.py
Oblio-Falootin Mar 26, 2026
c5a0864
housekeeping: remove infrastructure/queue_tasks_dba_sql_update.py
Oblio-Falootin Mar 26, 2026
2f86839
housekeeping: remove infrastructure/queue_tests_dashboard_api.py
Oblio-Falootin Mar 26, 2026
029f88d
housekeeping: remove infrastructure/queue_todo_items.py
Oblio-Falootin Mar 26, 2026
f6683e8
housekeeping: remove infrastructure/queue_todo_march10_0019.py
Oblio-Falootin Mar 26, 2026
0839e61
housekeeping: remove infrastructure/queue_todo_march9_1831.py
Oblio-Falootin Mar 26, 2026
87df02d
housekeeping: remove infrastructure/queue_todo_march9_2118.py
Oblio-Falootin Mar 26, 2026
e74ed11
housekeeping: remove infrastructure/queue_verifier.py
Oblio-Falootin Mar 26, 2026
ba629be
housekeeping: remove infrastructure/security_checks.json
Oblio-Falootin Mar 26, 2026
3656db3
housekeeping: remove infrastructure/sql_memory.py
Oblio-Falootin Mar 26, 2026
72ef0e9
housekeeping: remove infrastructure/task_executor.py
Oblio-Falootin Mar 26, 2026
b3c4351
housekeeping: remove infrastructure/todo.py
Oblio-Falootin Mar 26, 2026
71fa951
housekeeping: remove infrastructure/workflow.py
Oblio-Falootin Mar 26, 2026
b426d48
housekeeping: remove tests/test_agent_base.py
Oblio-Falootin Mar 26, 2026
9ed9c3d
housekeeping: remove tests/test_agent_dispatcher.py
Oblio-Falootin Mar 26, 2026
6b7a5fa
housekeeping: remove tests/test_agent_facs.py
Oblio-Falootin Mar 26, 2026
acfb26a
housekeeping: remove tests/test_agent_git_sync.py
Oblio-Falootin Mar 26, 2026
2d48422
housekeeping: remove tests/test_agent_github.py
Oblio-Falootin Mar 26, 2026
14254e5
housekeeping: remove tests/test_agent_idle.py
Oblio-Falootin Mar 26, 2026
2e9db29
housekeeping: remove tests/test_agent_lightsound.py
Oblio-Falootin Mar 26, 2026
e971ce7
housekeeping: remove tests/test_agent_nlp.py
Oblio-Falootin Mar 26, 2026
d33e469
housekeeping: remove tests/test_agent_report.py
Oblio-Falootin Mar 26, 2026
187c029
housekeeping: remove tests/test_agent_reporter.py
Oblio-Falootin Mar 26, 2026
190215f
housekeeping: remove tests/test_agent_security.py
Oblio-Falootin Mar 26, 2026
f6ce23f
housekeeping: remove tests/test_agent_self_logging.py
Oblio-Falootin Mar 26, 2026
4da1878
housekeeping: remove tests/test_agent_stamps.py
Oblio-Falootin Mar 26, 2026
57c9675
housekeeping: remove tests/test_api.py
Oblio-Falootin Mar 26, 2026
4fa1f66
housekeeping: remove tests/test_app.py
Oblio-Falootin Mar 26, 2026
99d2a89
housekeeping: remove tests/test_backtesting.py
Oblio-Falootin Mar 26, 2026
5875ee2
housekeeping: remove tests/test_backtesting_metrics.py
Oblio-Falootin Mar 26, 2026
6acb47c
housekeeping: remove tests/test_bot_performance.py
Oblio-Falootin Mar 26, 2026
1e38c1a
housekeeping: remove tests/test_candles.py
Oblio-Falootin Mar 26, 2026
973f8d9
housekeeping: remove tests/test_cli.py
Oblio-Falootin Mar 26, 2026
c26a166
housekeeping: remove tests/test_comic.py
Oblio-Falootin Mar 26, 2026
4325f70
housekeeping: remove tests/test_config_loader.py
Oblio-Falootin Mar 26, 2026
bd5cb9d
housekeeping: remove tests/test_database.py
Oblio-Falootin Mar 26, 2026
24cb11f
housekeeping: remove tests/test_db_backup.py
Oblio-Falootin Mar 26, 2026
0c3d672
housekeeping: remove tests/test_dca_builder.py
Oblio-Falootin Mar 26, 2026
39d3e10
housekeeping: remove tests/test_dca_distribution.py
Oblio-Falootin Mar 26, 2026
2628744
housekeeping: remove tests/test_directional_trading_general_inputs.py
Oblio-Falootin Mar 26, 2026
874cedf
housekeeping: remove tests/test_dispatcher.py
Oblio-Falootin Mar 26, 2026
d2e56c5
housekeeping: remove tests/test_executors.py
Oblio-Falootin Mar 26, 2026
19e7b09
housekeeping: remove tests/test_executors_distribution.py
Oblio-Falootin Mar 26, 2026
a53176a
housekeeping: remove tests/test_health_checker.py
Oblio-Falootin Mar 26, 2026
dfbe715
housekeeping: remove tests/test_inbox_monitor.py
Oblio-Falootin Mar 26, 2026
e50959d
housekeeping: remove tests/test_indicators.py
Oblio-Falootin Mar 26, 2026
5218284
housekeeping: remove tests/test_landing.py
Oblio-Falootin Mar 26, 2026
741795c
housekeeping: remove tests/test_main.py
Oblio-Falootin Mar 26, 2026
adeb295
housekeeping: remove tests/test_market_making_general_inputs.py
Oblio-Falootin Mar 26, 2026
9e51291
housekeeping: remove tests/test_model_router.py
Oblio-Falootin Mar 26, 2026
cdaad03
housekeeping: remove tests/test_orchestrator.py
Oblio-Falootin Mar 26, 2026
673f030
housekeeping: remove tests/test_performance_dca.py
Oblio-Falootin Mar 26, 2026
5b8095b
housekeeping: remove tests/test_performance_etl.py
Oblio-Falootin Mar 26, 2026
f2b46ae
housekeeping: remove tests/test_performance_time_evolution.py
Oblio-Falootin Mar 26, 2026
af3f9ab
housekeeping: remove tests/test_permissions.py
Oblio-Falootin Mar 26, 2026
4ff0b3a
housekeeping: remove tests/test_pnl.py
Oblio-Falootin Mar 26, 2026
24666dd
housekeeping: remove tests/test_praise_log.py
Oblio-Falootin Mar 26, 2026
9f64d84
housekeeping: remove tests/test_report.py
Oblio-Falootin Mar 26, 2026
0cbb3f9
housekeeping: remove tests/test_risk_management.py
Oblio-Falootin Mar 26, 2026
0d2c8f7
housekeeping: remove tests/test_save_config.py
Oblio-Falootin Mar 26, 2026
3e138d5
housekeeping: remove tests/test_signals.py
Oblio-Falootin Mar 26, 2026
b3e0326
housekeeping: remove tests/test_spread_and_price_multipliers.py
Oblio-Falootin Mar 26, 2026
ca2ca41
housekeeping: remove tests/test_st_inputs.py
Oblio-Falootin Mar 26, 2026
759fb9f
housekeeping: remove tests/test_st_utils.py
Oblio-Falootin Mar 26, 2026
8189aa0
housekeeping: remove tests/test_task_executor.py
Oblio-Falootin Mar 26, 2026
a9087a0
housekeeping: remove tests/test_theme.py
Oblio-Falootin Mar 26, 2026
7ce248f
housekeeping: remove tests/test_user_inputs.py
Oblio-Falootin Mar 26, 2026
1c18eda
housekeeping: remove tests/test_utils.py
Oblio-Falootin Mar 26, 2026
c192923
housekeeping: remove tests/test_watchdog.py
Oblio-Falootin Mar 26, 2026
f7e7db9
housekeeping: remove tests/test_workflow.py
Oblio-Falootin Mar 26, 2026
94260b5
housekeeping: add gitignore rules
Oblio-Falootin Mar 26, 2026
7322533
merge: development → main (clawbot update, gitignore + housekeeping)
Mar 30, 2026
b4b4e1a
OB-CLAWBOT: Complete clawbot update - set default backend to 'local' …
Apr 15, 2026
c9785db
merge: complete-clawbot-update → main
Apr 15, 2026
0311bf3
OB-129: Add secret scanning, .env.example, and pre-commit hooks
Apr 16, 2026
6d4364d
Merge pull request #16 from VeXHarbinger/OB-129/security-hardening-cr…
Oblio-Falootin Apr 20, 2026
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
27 changes: 27 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ============================================================
# clawbot-sql-memory — Memory & Storage Configuration
# ============================================================
# SECURITY: This is a TEMPLATE ONLY. Never commit actual .env files.
# Copy this to .env and fill in your local values.

# SQL Server — Local Development
SQL_LOCAL_SERVER=10.0.0.110
SQL_LOCAL_PORT=1433
SQL_LOCAL_DATABASE=Oblio_Memories
SQL_LOCAL_USER=your_sql_user
SQL_LOCAL_PASSWORD=your_sql_password

# SQL Server — Cloud Backup
SQL_CLOUD_SERVER=SQL5112.site4now.net
SQL_CLOUD_PORT=1433
SQL_CLOUD_DATABASE=db_99ba1f_memory4oblio
SQL_CLOUD_USER=db_99ba1f_memory4oblio_admin
SQL_CLOUD_PASSWORD=your_cloud_password

# Memory Configuration
MEMORY_STORE=sql # Options: sql, file (sql is recommended)
MEMORY_RETENTION_DAYS=365
SEMANTIC_SEARCH_ENABLED=true

# Logging
LOG_LEVEL=INFO
22 changes: 22 additions & 0 deletions .github/workflows/test-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ on:
- develop

jobs:
secret-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: TruffleHog Secret Scan
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -34,3 +48,11 @@ jobs:

- name: Build
run: npm run build --if-present

- name: Check for .env files
run: |
if [ -f .env ]; then
echo "ERROR: .env file should not be committed"
exit 1
fi
echo "OK: No .env file tracked"
18 changes: 9 additions & 9 deletions sql-memory/sql_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
SQLConnector v2 (pymssql, parameterised, sealed API) — no subprocess/sqlcmd.

Supports two backends:
- 'cloud' → site4now hosted (SQL5112.site4now.net) — default
- 'local' → SQL Server on DEAUS (10.0.0.110)
- 'local' → SQL Server on DEAUS (10.0.0.110) — default
- 'cloud' → site4now hosted (SQL5112.site4now.net)

Backward-compatible with v1.x callers:
- SQLMemory('cloud') — works as before
- get_memory('cloud') — singleton factory preserved
- SQLMemory('local') — works as before
- get_memory('local') — singleton factory preserved
- mem.remember / recall / search / queue_task / log_event — all preserved
- mem.execute(raw_sql) — preserved as legacy passthrough (returns bool)
- mem.execute_scalar(sql) — preserved, returns Any
Expand All @@ -25,7 +25,7 @@

Usage:
from sql_memory import SQLMemory, get_memory
mem = get_memory('cloud')
mem = get_memory('local')
mem.remember('facts', 'sky_color', 'The sky is blue', importance=3)
result = mem.recall('facts', 'sky_color')
"""
Expand Down Expand Up @@ -105,10 +105,10 @@ class SQLMemory:
Wraps SQLConnector — all queries are parameterised, no string interpolation.

Args:
backend: 'cloud' (default) or 'local'
backend: 'local' (default) or 'cloud'
"""

def __init__(self, backend: str = 'cloud') -> None:
def __init__(self, backend: str = 'local') -> None:
self.backend = backend
self._db = get_connector(backend)
_log.info(f"SQLMemory v2.0 initialized (backend={backend})")
Expand Down Expand Up @@ -490,7 +490,7 @@ def ensure_schema(self) -> bool:

_instances: Dict[str, SQLMemory] = {}

def get_memory(backend: str = 'cloud') -> SQLMemory:
def get_memory(backend: str = 'local') -> SQLMemory:
"""Get or create a SQLMemory instance. Singleton per backend."""
if backend not in _instances:
_instances[backend] = SQLMemory(backend)
Expand All @@ -513,7 +513,7 @@ def t(name, fn):
print(f" ❌ {name}: {e}")
failed += 1

mem = get_memory('cloud')
mem = get_memory('local')
t("ping", mem.ping)
t("remember", lambda: mem.remember('test', '_v2_test', 'v2 self-test', importance=1, tags='test'))
t("recall", lambda: mem.recall('test', '_v2_test'))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_queue_daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class TestFetchParsing(unittest.TestCase):
def test_fetch_returns_none_or_dict(self):
from sql_memory import get_memory
from queue_daemon import fetch_next_task
mem = get_memory('cloud')
mem = get_memory('local')
result = fetch_next_task(mem)
self.assertTrue(result is None or isinstance(result, dict))

Expand Down
20 changes: 10 additions & 10 deletions tests/test_sql_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@ class TestSQLMemoryConnection(unittest.TestCase):
"""Test connection and ping."""

def test_get_memory_cloud(self):
mem = get_memory('cloud')
mem = get_memory('local')
self.assertIsInstance(mem, SQLMemory)

def test_ping(self):
mem = get_memory('cloud')
mem = get_memory('local')
result = mem.ping()
self.assertIsInstance(result, bool)

def test_ping_succeeds_with_valid_creds(self):
mem = get_memory('cloud')
mem = get_memory('local')
self.assertTrue(mem.ping(), "Ping should succeed with valid credentials")


class TestMemoryCRUD(unittest.TestCase):
"""Test remember/recall/search/forget cycle."""

def setUp(self):
self.mem = get_memory('cloud')
self.mem = get_memory('local')
self.test_key = f"test_{datetime.now().strftime('%Y%m%d%H%M%S')}"

def test_remember_and_recall(self):
Expand Down Expand Up @@ -90,7 +90,7 @@ class TestTaskQueue(unittest.TestCase):
"""Test task queue operations."""

def setUp(self):
self.mem = get_memory('cloud')
self.mem = get_memory('local')
self.test_task_type = f"test_task_{datetime.now().strftime('%H%M%S')}"

def test_queue_and_claim(self):
Expand Down Expand Up @@ -137,7 +137,7 @@ class TestActivityLog(unittest.TestCase):
"""Test event logging."""

def setUp(self):
self.mem = get_memory('cloud')
self.mem = get_memory('local')

def test_log_event(self):
self.mem.log_event('test_event', 'test_agent', 'unit test log entry')
Expand All @@ -149,7 +149,7 @@ class TestKnowledge(unittest.TestCase):
"""Test knowledge store operations."""

def setUp(self):
self.mem = get_memory('cloud')
self.mem = get_memory('local')
self.test_topic = f"test_topic_{datetime.now().strftime('%H%M%S')}"

def test_store_and_search_knowledge(self):
Expand All @@ -167,21 +167,21 @@ class TestEdgeCases(unittest.TestCase):
"""Test error handling and edge cases."""

def test_execute_invalid_sql(self):
mem = get_memory('cloud')
mem = get_memory('local')
result = mem.execute("SELECT * FROM nonexistent_table_xyz")
# Should not crash, may return error text
self.assertIsInstance(result, str)

def test_remember_with_special_chars(self):
mem = get_memory('cloud')
mem = get_memory('local')
key = f"special_test_{datetime.now().strftime('%H%M%S')}"
mem.remember('test', key, "Content with 'quotes' and \"doubles\" and <html>", importance=1)
result = mem.recall('test', key)
# Cleanup
mem.execute(f"DELETE FROM memory.Memories WHERE key_name='{key}'")

def test_very_long_content(self):
mem = get_memory('cloud')
mem = get_memory('local')
key = f"long_test_{datetime.now().strftime('%H%M%S')}"
long_content = "x" * 5000
mem.remember('test', key, long_content, importance=1)
Expand Down
Loading