Replace old JWT_SECRET/JWT_REFRESH_SECRET scalar vars with flask-jwt-extended
compatible timedelta-based JWT_ACCESS_TOKEN_EXPIRES / JWT_REFRESH_TOKEN_EXPIRES,
and add ACS connection settings and ADMIN_EMAIL/ADMIN_PASSWORD bootstrap vars.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds GET /api/graph/project/<id>/download/source, GET /api/simulation/<id>/download/report,
and GET /api/simulation/<id>/download/log with corresponding tests (5/5 passing).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add _get_project_files classmethod that queries ProjectFileModel for
file_type=="upload" records, and wire it into _to_dict replacing the
hardcoded empty list.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add nobrl,cache=strict,nosharesock,actimeo=30 mount options to the
Azure Files volume so SQLite can use byte-range locking correctly over
SMB (without nobrl, Reddit DB creation fails with 'database is locked')
- Fix _execute_neo4j_query to pass parameters as params= keyword arg
(was parameters_= which the installed neo4j driver does not accept),
restoring per-simulation graph isolation via clone_graph
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- infra.bicep: correct SKU format from B_Standard_B1ms to Standard_B1ms
(Azure Flexible Server uses Standard_* prefix, not B_*); update tier
detection logic accordingly (contains '_B' -> Burstable)
- 2-build-deploy.sh: add --resource-group to az acr login to avoid
accidentally matching an ACR with the same name in a different RG
- config.sh.example: update POSTGRES_SKU default to Standard_B1ms
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- infra.bicep: add storageAccountName param (empty = auto-generate
'${projectName}store'); effectiveStorageAccountName var resolves the
final name; Bicep reconciles the existing account idempotently without
touching other file shares (caddydata, neo4jdata, etc.)
- 1-infra.sh: forward STORAGE_ACCOUNT_NAME (optional) to Bicep
- config.sh.example: document Opció A (existing account, e.g. stgraphiti16852)
vs Opció B (new account); clarify which vars are inputs vs outputs of 1-infra.sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ProjectManager._to_dict now scans simulation state files to find
last_simulation_id and last_report_id for each project
- HistoryDatabase: report button enabled when last_report_id or
last_simulation_id available; goToReport looks up report by
simulation ID if no direct report_id; report status icon reflects
availability
- Add getReportBySimulation() to frontend report API
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a restart button in the action-bar-header of Step5Interaction
that navigates to '/' (home/project list). Translated in all 4 locales.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Step 02/03 UX:
- Remove duplicate simulation params (total_hours, minutes_per_round) from Fase B form
- Add following_probability + recsys_type to step 03 config panel instead
- Step 03 now read-only by default with Edit / Save toolbar toggle
- Add common.edit and log.configSaved i18n keys to all 4 locales
Backend - Azure OpenAI fix (run_parallel_simulation.py):
- create_model() now detects Azure URLs (cognitiveservices.azure.com / openai.azure.com)
and uses ModelPlatformType.AZURE with AzureOpenAIModel, passing api_version and
azure_deployment_name explicitly — fixes 404 "Resource not found" from camel-ai
Backend - offline report interviews (simulation_runner.py):
- interview_agents_batch() falls back to _offline_batch_interview() when OASIS env is
closed (simulation finished), reading posts from SQLite DB instead of failing with
"No successful interviews / check OASIS environment status"
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds patchAgent, deleteAgent, createAgent, regenerateAgent, generateConfig,
patchSimulationConfig, and cloneSimulation to the simulation API client.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements Tasks 8 and 9 of F2-A+B: async agent creation from entity UUID
and async per-agent profile regeneration, both with atomic profile file writes.
Refactors generate_profile_from_entity to accept extra_instructions instead
of requiring user_id (renamed internal logic to _generate_single_profile).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements SimulationManager.clone_simulation() and the corresponding
Flask route. The clone copies reddit_profiles.json, twitter_profiles.csv
and agent_profiles.json from the source simulation; does not copy
simulation_config.json; sets status=PROFILES_READY and records
parent_simulation_id. All 3 tests in test_simulation_clone.py pass.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements atomic agent profile editing with manually_edited flag.
Blocks edits when simulation is running or completed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace getSimulationHistory (simulation API) with listProjects (graph API)
and adapt all template references from simulation_id/report_id fields to
project_id/graph_id fields matching the new project data model.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 tests covering list, get, create, delete, and reset endpoints via
Flask test client with in-memory SQLite and mocked storage.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Convert all project.attribute accesses to project["key"]/project.get("key"),
use save_project({...}) dict calls, and wire save_graph_record/complete_graph_record
helpers for proper graph persistence.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace .to_dict() calls and attribute access with direct dict usage,
add get_storage() import for delete_project, and rewrite reset_project
to use save_project() with a partial dict instead of mutating an ORM object.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused `import io`
- Avoid double-encoding in save_extracted_text by caching encoded bytes
- Delegate _to_dict queries to get_ontology/get_latest_graph_external_id
- Add comment to save_ontology noting full versioning is planned for F2-3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>