Commit graph

310 commits

Author SHA1 Message Date
d4a075ac9a Complete testing framework with comprehensive test coverage
- Add comprehensive testing framework with 67 test cases covering unit, integration, and functional testing
- Create universal YAML validator supporting all activity types with validation for metadata operations, terminal steps, and Python syntax
- Implement proper Makefile with venv management and test runners following unDRY principles for copy-paste engineering
- Add requirements-test.txt for test dependencies separation
- Configure pytest with conftest.py for proper environment variable management
- Update CLAUDE.md with Makefile best practices
- All 67 tests passing with proper mocking of external dependencies

Testing coverage includes:
• Unit tests (37): Core app functions, utilities, navigation, response handling
• Integration tests (20): Complete activity workflows and error handling
• Functional tests (9): Full battleship game scenarios and edge cases
• YAML validator (17): Universal validation for all activity configurations
2025-08-10 19:38:47 -04:00
292265b5bb Add comprehensive testing framework and YAML validator
- Create universal activity_yaml_validator.py for validating activity configurations
- Add validation for metadata operations (metadata_add, metadata_remove, metadata_feedback_filter, etc.)
- Validate terminal steps cannot have questions or buckets
- Check Python syntax in processing_script and pre_script blocks
- Validate YAML structure, transitions, and logic flow
- Add 17 comprehensive unit tests with 100% pass rate
- Include test fixtures for validation testing
- Support both CLI and programmatic usage
2025-08-10 19:35:52 -04:00
25c694584a
Merge pull request #12 from russellballestrini/battleship-hermes
Battleship hermes mode operational!
2025-08-10 16:06:06 -04:00
1ca6f67c3d Fix code quality issues from PR review
- Add matplotlib.use("Agg") backend configuration to prevent runtime errors in headless environments
- Add error handling guards for script results that might return None
- Fix AI targeting logic to exclude already-fired cells in super hunter and hunter modes
- Update CLAUDE.md with matplotlib best practices
2025-08-10 16:01:58 -04:00
4d909aaecb Fix indentation error from commented print statements
- Add pass statements to empty else blocks that only contained commented prints
- Ensures Python syntax remains valid after commenting out debug statements
2025-08-10 15:19:59 -04:00
29573eaa75 Enhance battleship activity with improved user input handling and feedback
- Add user_response to pre-script metadata for better game state management
- Implement metadata_feedback_filter to control feedback data exposure
- Improve ship destruction announcements and game over messaging
- Add debug logging for ship sinking events
- Include test ship configuration file
2025-08-10 14:49:03 -04:00
80b18cf0bb Add Claude instructions to prevent attribution in commit messages 2025-08-10 11:57:52 -04:00
368c7d290e Add Hermes Reasoner mode to battleship with game ending fixes
- Add new Hermes Reasoner AI mode that combines probability analysis with LLM reasoning
- Implement pre-script and post-script architecture in app.py for flexible YAML processing
- Fix game ending detection by adding transition override mechanism
- Add probability matrix visualization and strategic move analysis
- Support both legacy processing_script and new pre_script/post_script naming
- Restore full ship complement for complete battleship gameplay
2025-08-10 11:57:22 -04:00
38f414c5a9 Fix critical security vulnerabilities in Flask application
- Prevent SQL injection in search functionality with input sanitization
- Add path traversal protection for local file operations
- Replace hardcoded secret key with environment variable
- Escape HTML output to prevent XSS attacks in image generation
- Restrict file access to research/ directory with .yaml extension only
- Add comprehensive input validation and error handling

Security improvements maintain full application functionality while
protecting against common web application vulnerabilities.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-24 00:00:54 -04:00
fc53cd3cc5 ● Enhance math plotting activity with secure multi-function support
- Replace unsafe eval() with sympy for secure expression parsing
  - Add YAML anchors to eliminate code duplication in processing scripts
  - Implement multiple function plotting with comma-separated syntax
  - Add dynamic plot ranges based on function characteristics
  - Include automatic function type detection and analysis
  - Streamline activity flow: intro → demo plot → open sandbox
  - Add comprehensive error handling with visual error messages
  - Support enhanced mathematical notation (arcsin, ln, implied multiplication)

	modified:   research/activity24-math-plot.yaml
2025-06-23 23:21:25 -04:00
2a1efd1f90 claude security upgrade
modified:   requirements.txt
	modified:   research/activity24-math-plot.yaml
2025-06-23 22:36:23 -04:00
648df5a0b2 embed videos like a damn pro! 2025-06-20 17:13:32 -04:00
8011649abc fix all the o1-o4 models
modified:   app.py
2025-06-01 23:28:05 -04:00
b65fd58285 nothing lasts but nothing is lost.
Goodbye Naptha.

	modified:   README.rst
	modified:   vars.sh.sample
2025-05-23 10:29:42 -04:00
85bbac74f2
Merge pull request #11 from russellballestrini/battleship
prompt engineering research/activity29-battleship.yaml
2025-04-24 12:59:34 -04:00
Russell Ballestrini
8cee47fcc9 modified: research/activity29-battleship.yaml 2025-04-23 16:17:05 -04:00
Russell Ballestrini
0e59d29dd7 modified: models.py 2025-04-23 16:06:40 -04:00
Russell Ballestrini
c7278e07a7 modified: vars.sh.sample 2025-03-11 22:14:17 -04:00
54223fc4bb
Merge pull request #10 from russellballestrini/dynamic-models
dynamic models for all the platforms!
2025-03-11 22:02:53 -04:00
Russell Ballestrini
3b463f41ea modified: requirements.txt 2025-03-11 21:18:52 -04:00
Russell Ballestrini
9bfd1c9b5a dynamic models for all the platforms!
modified:   .gitignore
	modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
	new file:   vars.sh.sample
2025-03-11 21:15:13 -04:00
00eba1b150 gemini is actually tested and working
modified:   app.py
	new file:   models.py
2025-02-23 17:11:00 -05:00
2cd434c291
Update app.py 2025-02-16 15:56:32 -05:00
b6b4067134
Update README.rst 2025-02-16 15:54:51 -05:00
7d1b22d564
Merge pull request #9 from russellballestrini/all-the-models
dynamically register models to endpoints
2025-02-10 17:08:11 -05:00
44170459fe dynamically register models to endpoints
modified:   app.py
2025-02-10 16:46:02 -05:00
8fd77088e6
Update README.rst
export VLLM_ENDPOINT2=https://naptha2.ai.unturf.com/v1
    export VLLM_ENDPOINT3=https://naptha3.ai.unturf.com/v1
2025-02-10 13:11:47 -05:00
a1e523e183
Merge pull request #8 from russellballestrini/mistral-ai-upgrades
Mistral ai upgrades
2025-02-08 16:32:22 -05:00
381588d6bc mistral upgrades
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2025-02-08 16:03:22 -05:00
0250bf77b1
mistral ai upgrades 2025-02-08 15:48:23 -05:00
748649d98a o3-mini and hermes 8b 8fp!
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2025-02-01 15:58:01 -05:00
adc202125e free endpoints for open public domain ai
modified:   README.rst
2025-01-25 14:40:14 -05:00
0492d5b329 r1 llm support:
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2025-01-25 14:37:26 -05:00
06d5167628 make port configurable for demo2.opencompletion.com 2025-01-25 07:46:11 -05:00
2e7fd18ba1 more openai models
modified:   README.rst
	modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-12-31 12:18:03 -05:00
91d6192192 bunch more models.
modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-12-09 18:25:37 -05:00
9c44b23758 f 2024-12-07 10:51:08 -05:00
8743464747 modified: README.rst 2024-12-07 10:47:48 -05:00
Russell Ballestrini
2449703489 modified: templates/chat.html 2024-12-06 16:09:05 -05:00
8b90bc6485 sync up mobile and desktop drop downs and user lists!
modified:   templates/base.html
	modified:   templates/chat.html
2024-11-24 17:35:54 -05:00
b01311a825 inactive uesrs now collected.
modified:   app.py
	new file:   migrations/versions/5d93cdf18549_room_inactive_users_column.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-11-24 14:16:25 -05:00
96c10fc6d6 announce when a username leaves the room.
modified:   app.py
	modified:   templates/chat.html
2024-11-24 13:32:08 -05:00
c937c7b2c3
Merge pull request #7 from russellballestrini/user-list
create grid column for room user list
2024-11-23 12:18:17 -05:00
5fa37da991 sort active users, validate models and voices, fix room links
modified:   app.py
	modified:   templates/base.html
	modified:   templates/chat.html
2024-11-23 12:04:48 -05:00
0f82305087 feature complete. "sorry for the convenience"
modified:   app.py
	new file:   migrations/versions/1ac5a8e0f577_user_session_table.py
2024-11-23 11:32:49 -05:00
6f1c7def7b new file: migrations/versions/38a330686a17_room_active_users.py 2024-11-23 10:46:15 -05:00
fab40ba60d w00t! active user list working, now we need disconnect to remove logic.
modified:   app.py
	modified:   templates/chat.html
2024-11-23 10:31:38 -05:00
f9f7da6ffc incremental progress
modified:   app.py
	modified:   templates/chat.html
2024-11-23 09:39:39 -05:00
3b3714f527 Fix defect with TTS after stream.
modified:   app.py
	modified:   templates/chat.html
2024-11-23 08:34:23 -05:00
d99ab35a71 Muhahahaa utility belt!
modified:   templates/chat.html
2024-11-23 07:38:20 -05:00