Add core database support and enhance documentation
- Introduced `MYSQL_CORE_DATABASE` in `.env.example` and `settings.py` for core database configuration. - Added `CoreReadOnlyRepository` for read-only access to the `jinrong_core` database. - Updated `AGENTS.md`, `README.md`, and various documentation files to reflect new agent onboarding processes and project structure. - Revised requirements in `requirements.txt` to include `langgraph` and `langchain-core`. - Enhanced `FLOW.md` with local bootstrap instructions for setting up the core simulation environment. - Added new scripts for database creation and seeding for the core simulation library. - Improved overall documentation for clarity on project architecture and memory management. - Updated `TODO.md` to reflect current development priorities and tasks.
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
#Requires -Version 5.1
|
||||
<#
|
||||
.SYNOPSIS
|
||||
重置 jinrong_core 模拟库并同步到 agent / Neo4j
|
||||
#>
|
||||
param(
|
||||
[string]$MysqlUser = "root",
|
||||
[string]$MysqlHost = "127.0.0.1",
|
||||
[switch]$SkipNeo4j
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$Root = Split-Path (Split-Path $PSScriptRoot -Parent) -Parent
|
||||
Set-Location $Root
|
||||
|
||||
function Invoke-SqlFile($path) {
|
||||
Write-Host ">> $path"
|
||||
Get-Content -LiteralPath $path -Encoding UTF8 | mysql -h $MysqlHost -u $MysqlUser -p
|
||||
}
|
||||
|
||||
Write-Host "=== Drop & recreate jinrong_core ==="
|
||||
mysql -h $MysqlHost -u $MysqlUser -p -e "DROP DATABASE IF EXISTS jinrong_core;"
|
||||
|
||||
$files = @(
|
||||
"scripts/core/00-create-database.sql",
|
||||
"scripts/core/01-ddl.sql",
|
||||
"scripts/core/02-seed-base.sql",
|
||||
"scripts/core/03-seed-customers.sql",
|
||||
"scripts/core/04-seed-holdings.sql",
|
||||
"scripts/core/05-seed-trades.sql",
|
||||
"scripts/core/06-seed-nav.sql"
|
||||
)
|
||||
foreach ($f in $files) { Invoke-SqlFile (Join-Path $Root $f) }
|
||||
|
||||
Write-Host "=== Sync advisor rel ==="
|
||||
python scripts/sync/sync_advisor_rel.py
|
||||
|
||||
if (-not $SkipNeo4j) {
|
||||
Write-Host "=== Sync Neo4j ==="
|
||||
python scripts/sync/sync_neo4j.py
|
||||
}
|
||||
|
||||
Write-Host "Done."
|
||||
Reference in New Issue
Block a user