Repository navigation
okama Planner 0.5.0 — client data behind a human boundary
okama Planner 0.5.0 — client data behind a human boundary
0.5.0 makes the advisor's local database the only home for personal client information and
adds a browser interface for working with it. An AI assistant reaches the same records only
through a pseudonymous API with signed results, so names, contacts, brokers and notes never
enter a model conversation or an MCP argument. The forecasting engines are reused unchanged;
the managed dependency moves to okama 4.
Personal client data
An AI boundary instead of raw rows
okama_planner.ai is the only AI-facing path to client data; the trusted
PlannerStore and the native report API remain available to the human application.
- A coded record replaces the name with
c-0001-name, e-mail withc-0001-email, and
phone, messenger, broker and note fields with corresponding codes. Plan names, person
roles, asset/goal/budget captions and portfolio identifiers becomeanon-000001-style
codes, with every reference between them replaced together. - The assistant can read coded records and change only sex, birth year, the IPS delivery
date, tax residency by year and appended anonymous plan versions. It cannot set a name
or a contact, choose a database path or execute SQL; creating a client is a local
operation only. - Forecasts and comparisons return a
privacy_proofsigned with a process-local key.
Report export accepts only unchanged signed results whose request hash still matches and
fails closed otherwise; restarting the process requires a fresh forecast. - Failures are generic: no input values, local paths, table names or schema text reach the
assistant. Masked request fields that do not belong to the public market namespace are
rejected without being used as a lookup attempt. PlannerClientAccessopens a database for anonymous reads by default. Personal
create/update/delete, meetings and history require an explicit local
allow_personal_data=Truethat is never a model tool parameter.
Human-only intake
Identity enters the database through surfaces a person operates:
python -m okama_planner.private_clients create|update|save-plan --database … --input …
reads a trusted details file and prints only the assignedc-NNNNcode.- The local browser form below covers the same operations without a JSON file.
- Personal data at the AI boundary.
Local web interface for the database
python -m okama_planner.client_form --database /private/planner.sqlite3- The process binds
127.0.0.1, prints a private capability URL and checks Host, Origin
and CSRF/nonce on every request; restarting invalidates earlier URLs. It is a
single-advisor local tool — never reverse-proxy it or publish a real client screenshot. - The client card holds all registry fields: name, sex, birth year, e-mail, phone,
Telegram handle and numeric ID, WhatsApp, MAX, ordered brokers, primary channel, CRM ID,
IPS delivery date and a working note. Client codes drive navigation; names appear only
inside the record. - Финансовые планы appends a validated
ForecastRequestorMulticurrencyRequestas a
new version and reads earlier versions; saving a previous version also appends. - Журнал встреч keeps a meeting goal, date, optional time, format and one Markdown note
with visual editing, preview and download. Assets are bundled: Node is needed only to
rebuild them. A stale edit is rejected instead of overwriting another window, and drafts
survive validation or network errors. --legacy-database old.sqlite3adds a read-only two-level browser for an older LFP
database, including imported intake notes. Planner edits stay in the Planner file; this
option does not migrate data.--initializecreates a new empty database and never overwrites an existing file.- Unified database, journal and access policy,
form reference.
One database, one identity
- Schema 0003 brings client identity, CRM identifiers, tax residency, meetings and the
complete advisory history into one SQLite file, keeping earlier client codes and adding
native public request snapshots inplanner_*tables. - Opening a file never migrates it silently: call
upgrade_database(path)deliberately on
an older Planner file. import_advisor_database(source, destination)copies a recognized advisory schema in one
transaction, verifies every table by row count and SHA256 and rejects conflicts instead of
merging them. Reports carry counts and digests, never client values.- The packaged
empty.sqlite3template contains schema only — zero clients, plans or
results.
Compatibility and upgrade
- Requires Python >=3.11 and now okama >=4.0.0; this release is validated with
okama 4.0.1. okama 4 changed the default of
TimeSeriesStrategy.time_series_discounted_values; Planner sets it explicitly, so the
ledger is not indexed twice and existing plans keep their amounts. - Pair with okama-mcp >=3.1.0,<3.2 and Planner
>=0.5.0,<0.6.0. Earlier Planner
releases lack the AI boundary, so the MCP integration refuses them instead of exposing
personal data. - SQLAlchemy and Alembic are now direct dependencies;
okama-planner[reports]adds Excel
and PNG export. - Since 0.5.0 report and chart presentation is available in English, Russian, German,
Spanish and Simplified Chinese.
Install and downloads
pip install 'okama-planner[reports]==0.5.0'okama_planner-0.5.0-py3-none-any.whlandokama_planner-0.5.0.tar.gz: Python package
and source distribution with the empty database template, migrations, journal and chart
assets and the terminology table; the source distribution also carries the
ui/meeting-journalsources, the documentation and the tests.extraction-manifest.jsonandSHA256SUMS: source inventory and release-asset checksums.
Validation
- 708 tests passed with okama 4.0.1 on Python 3.14.8; Ruff is clean and the five CI
example scripts run offline. - Wheel and source distributions were audited for the privacy modules, migrations, empty
template, terminology table, chart assets and journal bundle; no client records, private
paths or real databases are included. - Smoke-tested the installed wheel: offline forecast, chart and Excel export, SQLite
round-trip, coded AI-boundary operations and rejection of an unsigned report export.