Commit Graph

1560 Commits

Author SHA1 Message Date
Mahmoud-Emad
e59ff8b63f feat: enhance server documentation and configuration
- Add HTML homepage and JSON handler info endpoints
- Implement markdown documentation generation for APIs
- Introduce auth_enabled flag for server configuration
- Improve documentation generation with dynamic base URLs
- Refactor server initialization and handler registration
2025-09-18 12:10:49 +03:00
Mahmoud-Emad
5eedae9717 Merge branch 'development_heroserver' of https://github.com/Incubaid/herolib into development_heroserver 2025-09-17 21:08:29 +03:00
Mahmoud-Emad
386fae3421 refactor: integrate heromodels RPC with heroserver
- Integrate heromodels RPC as a handler within heroserver
- Update API endpoint to use standard JSON-RPC format
- Add generated curl examples with copy button to docs
- Improve error handling to return JSON-RPC errors
- Simplify heromodels server example script
2025-09-17 21:08:17 +03:00
ade9cfb2a5 ... 2025-09-17 17:52:57 +02:00
Mahmoud-Emad
380a8dea1b feat: redesign API documentation template
- Add a Table of Contents for methods and objects
- Display detailed service info like contact and license
- Use Bootstrap cards and badges for a cleaner UI
- Improve layout and styling for methods and parameters
- Format code examples with `<pre>` tags for word wrapping
2025-09-17 17:59:51 +03:00
Mahmoud-Emad
e4101351aa feat: generate dynamic API docs from OpenRPC spec
- Implement dynamic doc generation from OpenRPC methods
- Generate example calls and responses from schemas
- Improve OpenRPC and JSON Schema decoders for full parsing
- Add example value generation based on schema type
- Add tests for schema decoding with examples
2025-09-17 17:50:43 +03:00
Mahmoud-Emad
844e3d5214 feat: implement documentation handler
- Fetch OpenRPC handler based on type
- Convert OpenRPC specification to DocSpec
- Render `doc.html` template with specification
- Apply `@[heap]` attribute to `Handler` struct
- Import `os` module
2025-09-17 14:43:19 +03:00
029936e9ba ... 2025-09-17 09:10:31 +02:00
0d0e756125 ... 2025-09-17 09:07:07 +02:00
56db4a17ab ... 2025-09-17 09:07:03 +02:00
d94d226ca5 ... 2025-09-17 08:58:46 +02:00
dec5a4fcf8 ... 2025-09-17 08:54:48 +02:00
4cdb9edaaa ... 2025-09-17 08:47:34 +02:00
4bef194924 ... 2025-09-17 08:42:07 +02:00
a11650fd64 ... 2025-09-17 08:40:58 +02:00
48857379fb ... 2025-09-17 08:14:09 +02:00
b3a72d3222 ... 2025-09-17 08:10:54 +02:00
63782e673a ... 2025-09-17 07:51:18 +02:00
c49ce44481 ... 2025-09-17 07:49:31 +02:00
59cf09f73a ... 2025-09-17 07:49:27 +02:00
48607d710e ... 2025-09-17 07:39:54 +02:00
304cdb5918 ... 2025-09-17 07:22:27 +02:00
5d4974e38a ... 2025-09-17 06:12:57 +02:00
ee11b07ffb ... 2025-09-17 06:03:27 +02:00
a44c9330c6 ... 2025-09-17 05:52:09 +02:00
fdc47f1415 ... 2025-09-17 05:39:03 +02:00
Mahmoud-Emad
8576e8421b fix: Fix heromodels tests 2025-09-16 19:31:46 +03:00
Mahmoud-Emad
7d176ed74d fix: Fix herofs tests 2025-09-16 19:18:34 +03:00
Mahmoud-Emad
4778bb3fb3 Merge branch 'development_fs' of https://github.com/Incubaid/herolib into development_fs 2025-09-16 18:38:08 +03:00
Mahmoud-Emad
af1d6a7485 feat(herofs): Complete HeroFS implementation with comprehensive testing
- Implement high-level filesystem tools (find, cp, mv, rm) with pattern matching
- Add complete import/export functionality for VFS ↔ real filesystem operations
- Implement symlink operations with broken link detection
- Add comprehensive error condition testing (blob limits, invalid refs, edge cases)
- Fix blob hash-based retrieval using Redis mapping instead of membership
- Add 5 test suites with 100% green CI coverage
- Clean up placeholder code and improve error messages
- Document known limitations (directory merging, quota enforcement)

Features added:
- fs_tools_*.v: High-level filesystem operations with FindOptions/CopyOptions/MoveOptions
- fs_tools_import_export.v: Bidirectional VFS/filesystem data transfer
- fs_symlink_test.v: Complete symlink lifecycle testing
- fs_error_conditions_test.v: Edge cases and error condition validation
- Working examples for all functionality

Fixes:
- Blob get_by_hash() now uses direct Redis hash mapping
- File listing handles deleted files gracefully
- V compiler namespace conflicts resolved in tests
- All compilation warnings cleaned up

Ready for open source publication with production-grade test coverage.
2025-09-16 18:35:26 +03:00
825a644ce9 Merge branch 'development_fs' of github.com:Incubaid/herolib into development_fs 2025-09-16 12:01:08 +02:00
5215843308 ... 2025-09-16 12:01:06 +02:00
Mahmoud-Emad
3669edf24e feat: implement built-in API documentation system
- Introduce `DocRegistry` for managing API documentation
- Add automatic discovery of markdown documentation from templates
- Implement a new web-based documentation viewer at `/docs`
- Include basic markdown to HTML conversion logic
- Register core HeroServer API documentation and an example 'comments' API
2025-09-16 12:54:16 +03:00
64c7efca5e ... 2025-09-16 08:50:50 +02:00
Mahmoud-Emad
e9e11ee407 refactor: Update new_server signature and module structure
- Adjust `new_server` calls to use `ServerConfig` struct
- Unify `AuthConfig` and manager type references within module
- Remove duplicate `ServerConfig` and factory function definition
- Update `test_heroserver_new` to reflect API changes
- Refine internal module imports and factory calls
2025-09-16 09:45:18 +03:00
a763a03884 Merge branch 'development' into development_fs
* development:
  refactor: Simplify handler signatures and add server runner
  fix: improve Redis response parsing and error handling
  fix: Correct AGEClient method receivers and error syntax

# Conflicts:
#	lib/hero/heroserver/factory.v
2025-09-15 20:29:57 +02:00
27a536ab9a Merge branch 'development' of github.com:Incubaid/herolib into development
* 'development' of github.com:Incubaid/herolib:
  refactor: Simplify handler signatures and add server runner
  fix: improve Redis response parsing and error handling
  fix: Correct AGEClient method receivers and error syntax
2025-09-15 20:28:58 +02:00
Mahmoud-Emad
f9fa1df7cc test: add comprehensive CRUD and edge case tests for heromodels
- Add tests for CalendarEvent, Calendar, ChatGroup, and ChatMessage models
- Include tests for Comment, Group, Project, ProjectIssue, and User models
- Cover create, read, update, delete, existence, and list operations
- Validate model-specific features like recurrence, chat types, group roles
- Test edge cases for various fields, including empty and large values
2025-09-15 19:43:41 +03:00
Mahmoud-Emad
e58db411f2 feat: Setup RPC server and basic calendar test
- Update RPC server startup and status messages
- Shorten initial sleep duration for server start
- Initialize heromodels and create a test calendar
- Generate 'calendar_set' JSON-RPC request
- Ensure server remains running with main loop
2025-09-15 18:05:09 +03:00
Mahmoud-Emad
eeac447644 refactor: Update RPC server main and entity ID handling
- Refactor `main` to spawn RPC server process
- Add `time` import for server startup delay
- Update `mydb.set` calls to use mutable object references
- Return entity ID from modified object after `set`
2025-09-15 18:02:45 +03:00
Mahmoud-Emad
e2a894de29 fix: Fix the examples
- Updated the examples to match the new fix of the heromodels
- Removed the caller variable of the set method since the method does
  not return a value now
2025-09-15 17:44:09 +03:00
Mahmoud-Emad
ff16a9bc07 build: add -no-skip-unused flag to V shebangs 2025-09-15 17:00:47 +03:00
Mahmoud-Emad
23f7e05931 wip 2025-09-15 15:49:23 +03:00
Mahmoud-Emad
6d67dbe2d7 wip: Working on fixing the CError, commented out the code:
- Commented out all models except the calendar model to fix the C Error
- The error is coming from the dump method in the core_methods file
- The error happen because we call `obj.dump` so, maybe a registered
  model does not implement this method, or there is an issue in any of
  these methods, so i commented out the code to unlock one by one to
  understand the reason of the compiler error
2025-09-15 14:51:29 +03:00
9a41f9e732 ... 2025-09-15 10:20:09 +02:00
ab1044079e ... 2025-09-15 08:43:49 +02:00
554478ffe7 ... 2025-09-15 08:41:54 +02:00
43ae67a070 ... 2025-09-15 08:02:44 +02:00
006dab5905 ... 2025-09-15 07:40:33 +02:00
bea94be43c ... 2025-09-15 07:33:16 +02:00