Commit Graph

172 Commits

Author SHA1 Message Date
Mahmoud-Emad
502e345f91 feat: Enhance service manager with zinit socket discovery and systemd fallback
- Improve Linux support by automatically discovering zinit sockets
  using environment variables and common paths.
- Add fallback to systemd if no zinit server is detected.
- Enhance README with detailed instructions for zinit usage,
  including custom socket path configuration.
- Add example demonstrating zinit socket discovery.
- Add logging to show socket discovery process.
- Add unit tests for service manager creation and socket discovery.
2025-07-02 16:37:27 +03:00
Mahmoud-Emad
352e846410 feat: Improve Zinit service manager integration
- Handle arguments and working directory correctly in Zinit: The
  Zinit service manager now correctly handles arguments and
  working directories passed to services, ensuring consistent
  behavior across different service managers.  This fixes issues
  where commands would fail due to incorrect argument parsing or
  missing working directory settings.

- Simplify Zinit service configuration: The Zinit service
  configuration is now simplified, using a more concise and
  readable format. This improves maintainability and reduces the
  complexity of the service configuration process.

- Refactor Zinit service start: This refactors the Zinit service
  start functionality for better readability and maintainability.
  The changes improve the code structure and reduce the complexity
  of the code.
2025-07-02 13:39:11 +03:00
Mahmoud-Emad
b72c50bed9 feat: Improve publish-all.sh script to handle zinit_client
- Correctly handle the `zinit_client` crate name in package
  publication checks and messages.  The script previously
  failed to account for the difference between the directory
  name and the package name.
- Improve the clarity of published crate names in output messages
  for better user understanding.  This makes the output more
  consistent and user friendly.
2025-07-02 12:46:42 +03:00
Mahmoud-Emad
95122dffee feat: Improve service manager testing and error handling
- Add comprehensive testing instructions to README.
- Improve error handling in examples to prevent crashes.
- Enhance launchctl error handling for production safety.
- Improve zinit error handling for production safety.
- Remove obsolete plan_to_fix.md file.
- Update Rhai integration tests for improved robustness.
- Improve service manager creation on Linux with systemd fallback.
2025-07-02 12:05:03 +03:00
Mahmoud-Emad
a63cbe2bd9 Fix service manager examples to use production-ready API
- Updated simple_service.rs to use start(config) instead of create() + start(name)
- Updated service_spaghetti.rs to use the same unified API
- Fixed factory function calls to use create_service_manager() without parameters
- All examples now compile and work with the production-ready synchronous API
- Maintains backward compatibility while providing cleaner interface
2025-07-02 10:46:47 +03:00
Mahmoud-Emad
1e4c0ac41a Resolve merge conflicts - keep production-ready service manager implementation
- Resolved conflicts in service_manager/src/lib.rs
- Resolved conflicts in service_manager/src/launchctl.rs
- Resolved conflicts in service_manager/src/zinit.rs
- Resolved conflicts in service_manager/README.md
- Kept our production-ready synchronous API design
- Maintained comprehensive service lifecycle management
- Preserved cross-platform compatibility (macOS/Linux)
- All tests passing and ready for production use
2025-07-02 10:34:56 +03:00
Mahmoud-Emad
0e49be8d71 Merge branch 'main' of https://git.threefold.info/herocode/sal 2025-07-02 10:25:48 +03:00
Timur Gordon
32339e6063 service manager add examples and improvements 2025-07-02 05:50:18 +02:00
Mahmoud-Emad
131d978450 feat: Add service manager support
- Add a new service manager crate for dynamic service management
- Integrate service manager with Rhai for scripting
- Provide examples for circle worker management and basic usage
- Add comprehensive tests for service lifecycle and error handling
- Implement cross-platform support for macOS and Linux (zinit/systemd)
2025-07-01 18:00:21 +03:00
Mahmoud-Emad
46ad848e7e Merge branch 'main' of https://git.threefold.info/herocode/sal 2025-07-01 11:26:35 +03:00
Timur Gordon
b4e370b668 add service manager sal 2025-07-01 09:11:45 +02:00
ef8cc74d2b Merge pull request 'feat: Update SAL crate structure and documentation' (#18) from development_kubernetes into main
Some checks failed
Test Publishing Setup / Test Publishing Setup (push) Has been cancelled
Reviewed-on: #18
2025-07-01 06:05:31 +00:00
Mahmoud-Emad
23db07b0bd feat: Update SAL crate structure and documentation
Some checks failed
Test Publishing Setup / Test Publishing Setup (pull_request) Has been cancelled
- Reduced the number of SAL crates from 16 to 15.
- Removed redundant core modules from README examples.
- Updated README to reflect the current state of published crates.
- Added `Cargo.toml.bak` to `.gitignore` to prevent accidental commits.
- Improved the clarity and accuracy of the README's installation instructions.
- Updated `publish-all.sh` script to handle existing crate versions and improve dependency management.
2025-07-01 09:04:23 +03:00
b4dfa7733d Merge pull request 'development_kubernetes' (#17) from development_kubernetes into main
Some checks are pending
Test Publishing Setup / Test Publishing Setup (push) Waiting to run
Reviewed-on: #17
2025-07-01 05:35:06 +00:00
Mahmoud-Emad
e01b83f12a feat: Add CI/CD workflows for testing and publishing SAL crates
Some checks failed
Test Publishing Setup / Test Publishing Setup (pull_request) Has been cancelled
- Add a workflow for testing the publishing setup
- Add a workflow for publishing SAL crates to crates.io
- Improve crate metadata and version management
- Add optional dependencies for modularity
- Improve documentation for publishing and usage
2025-07-01 08:34:20 +03:00
Mahmoud-Emad
52f2f7e3c4 feat: Add Kubernetes module to SAL
- Add Kubernetes cluster management and operations
- Include pod, service, and deployment management
- Implement pattern-based resource deletion
- Support namespace creation and management
- Provide Rhai scripting wrappers for all functions
- Include production safety features (timeouts, retries, rate limiting)
2025-06-30 14:56:54 +03:00
717cd7b16f Merge pull request 'development_monorepo' (#13) from development_monorepo into main
Some checks failed
Rhai Tests / Run Rhai Tests (push) Has been cancelled
Reviewed-on: #13
2025-06-24 09:40:00 +00:00
Mahmoud-Emad
e125bb6511 feat: Migrate SAL to Cargo workspace
Some checks failed
Rhai Tests / Run Rhai Tests (push) Has been cancelled
Rhai Tests / Run Rhai Tests (pull_request) Has been cancelled
- Migrate individual modules to independent crates
- Refactor dependencies for improved modularity
- Update build system and testing infrastructure
- Update documentation to reflect new structure
2025-06-24 12:39:18 +03:00
Mahmoud-Emad
8012a66250 feat: Add Rhai scripting support
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add new `sal-rhai` crate for Rhai scripting integration
- Integrate Rhai with existing SAL modules
- Improve error handling for Rhai scripts and SAL functions
- Add comprehensive unit and integration tests for `sal-rhai`
2025-06-23 16:23:51 +03:00
Mahmoud-Emad
6dead402a2 feat: Remove herodo from monorepo and update dependencies
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Removed the `herodo` binary from the monorepo. This was
  done as part of the monorepo conversion process.
- Updated the `Cargo.toml` file to reflect the removal of
  `herodo` and adjust dependencies accordingly.
- Updated `src/lib.rs` and `src/rhai/mod.rs` to use the new
  `sal-vault` crate for vault functionality.  This improves
  the modularity and maintainability of the project.
2025-06-23 14:56:03 +03:00
Mahmoud-Emad
c94467c205 feat: Add herodo package to workspace
- Added the `herodo` package to the workspace.
- Updated the MONOREPO_CONVERSION_PLAN.md to reflect
  the completion of the herodo package conversion.
- Updated README.md and build_herodo.sh to reflect the
  new package structure.
- Created herodo/Cargo.toml, herodo/README.md,
  herodo/src/main.rs, herodo/src/lib.rs, and
  herodo/tests/integration_tests.rs and
  herodo/tests/unit_tests.rs.
2025-06-23 13:19:20 +03:00
Mahmoud-Emad
b737cd6337 feat: convert postgresclient module to independent sal-postgresclient package
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Move src/postgresclient/ to postgresclient/ package structure
- Add comprehensive test suite (28 tests) with real PostgreSQL operations
- Maintain Rhai integration with all 10 wrapper functions
- Update workspace configuration and dependencies
- Add complete documentation with usage examples
- Remove old module and update all references
- Ensure zero regressions in existing functionality

Closes: postgresclient monorepo conversion
2025-06-23 03:12:26 +03:00
Mahmoud-Emad
455f84528b feat: Add support for virt package
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add sal-virt package to the workspace members
- Update MONOREPO_CONVERSION_PLAN.md to reflect the
  completion of sal-process and sal-virt packages
- Update src/lib.rs to include sal-virt
- Update src/postgresclient to use sal-virt instead of local
  virt module
- Update tests to use sal-virt
2025-06-23 02:37:14 +03:00
Mahmoud-Emad
3e3d0a1d45 feat: Add process package to monorepo
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add `sal-process` package for cross-platform process management.
- Update workspace members in `Cargo.toml`.
- Mark process package as complete in MONOREPO_CONVERSION_PLAN.md
- Remove license information from `mycelium` and `os` READMEs.
2025-06-22 11:41:10 +03:00
Mahmoud-Emad
511729c477 feat: Add zinit_client package to workspace
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add `zinit_client` package to the workspace, enabling its use
  in the SAL monorepo.  This allows for better organization and
  dependency management.
- Update `MONOREPO_CONVERSION_PLAN.md` to reflect the addition
  of `zinit_client` and its status.  This ensures the conversion
  plan stays up-to-date.
- Move `src/zinit_client/` directory to `zinit_client/` for better
   organization.  This improves the overall structure of the
   project.
- Update references to `zinit_client` to use the new path.  This
  ensures the codebase correctly links to the `zinit_client`
  package.
2025-06-22 10:59:19 +03:00
Mahmoud-Emad
74217364fa feat: Add sal-net package to workspace
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add new sal-net package to the workspace.
- Update MONOREPO_CONVERSION_PLAN.md to reflect the
  addition of the sal-net package and mark it as
  production-ready.
- Add Cargo.toml and README.md for the sal-net package.
2025-06-22 09:52:20 +03:00
Mahmoud-Emad
d22fd686b7 feat: Add os package to monorepo conversion plan
- Added the `os` package to the list of converted packages in the
  monorepo conversion plan.
- Updated the success metrics and quality metrics sections to reflect
  the completion of the `os` package.  This ensures the plan
  accurately reflects the current state of the conversion.
2025-06-21 15:51:07 +03:00
Mahmoud-Emad
c4cdb8126c feat: Add support for new OS package
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add a new `sal-os` package containing OS interaction utilities.
- Update workspace members to include the new package.
- Add README and basic usage examples for the new package.
2025-06-21 15:45:43 +03:00
Mahmoud-Emad
a35edc2030 docs: Update MONOREPO_CONVERSION_PLAN.md with text package status
- Marked the `text` package as production-ready in the
  conversion plan.
- Added quality metrics achieved for the `text` package,
  including test coverage, security features, and error
  handling.
- Updated the success metrics checklist to reflect the
  `text` package's completion.
2025-06-19 14:51:30 +03:00
Mahmoud-Emad
a7a7353aa1 feat: Add sal-text crate
Some checks failed
Rhai Tests / Run Rhai Tests (push) Has been cancelled
- Add a new crate `sal-text` for text manipulation utilities.
- Integrate `sal-text` into the main `sal` crate.
- Remove the previous `text` module from `sal`.  This improves
  organization and allows for independent development of the
  `sal-text` library.
2025-06-19 14:43:27 +03:00
Mahmoud-Emad
4a8d3bfd24 feat: Add mycelium package to workspace
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Add the `mycelium` package to the workspace members.
- Add `sal-mycelium` dependency to `Cargo.toml`.
- Update MONOREPO_CONVERSION_PLAN.md to reflect the addition
  and completion of the mycelium package.
2025-06-19 12:11:55 +03:00
Mahmoud-Emad
3e617c2489 feat: Add redisclient package to the monorepo
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Integrate the redisclient package into the workspace.
- Update the MONOREPO_CONVERSION_PLAN.md to reflect the
  completion of the redisclient package conversion.
  This includes marking its conversion as complete and
  updating the success metrics.
- Add the redisclient package's Cargo.toml file.
- Add the redisclient package's source code files.
- Add tests for the redisclient package.
- Add README file for the redisclient package.
2025-06-18 17:53:03 +03:00
Mahmoud-Emad
4d51518f31 docs: Enhance MONOREPO_CONVERSION_PLAN.md with improved details
- Specify production-ready implementation details for sal-git
  package.
- Add a detailed code review and quality assurance process
  section.
- Include comprehensive success metrics and validation checklists
  for production readiness.
- Improve security considerations and risk mitigation strategies.
- Add stricter code review criteria based on sal-git's conversion.
- Update README with security configurations and environment
  variables.
2025-06-18 15:15:07 +03:00
Mahmoud-Emad
e031b03e04 feat: Convert SAL to a Rust monorepo
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
- Migrate SAL project from single-crate to monorepo structure
- Create independent packages for individual modules
- Improve build efficiency and testing capabilities
- Update documentation to reflect new structure
- Successfully convert the git module to an independent package.
2025-06-18 14:12:36 +03:00
ba9103685f ...
Some checks failed
Rhai Tests / Run Rhai Tests (push) Has been cancelled
2025-06-16 07:53:03 +02:00
dee38eb6c2 ... 2025-06-16 07:30:37 +02:00
49c879359b ... 2025-06-15 23:44:59 +02:00
c0df07d6df ...
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 23:05:11 +02:00
6a1e70c484 ...
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 22:43:49 +02:00
e7e8e7daf8 ... 2025-06-15 22:40:28 +02:00
8a8ead17cb ... 2025-06-15 22:16:40 +02:00
0e7dba9466 ...
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 22:15:44 +02:00
f0d7636cda ...
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 22:12:15 +02:00
3a6bde02d5 ... 2025-06-15 21:51:23 +02:00
3a7b323f9a ...
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 21:50:10 +02:00
66d5c8588a ...
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 21:37:16 +02:00
29a06d2bb4 ... 2025-06-15 21:27:21 +02:00
Mahmoud-Emad
bb39f3e3f2 Merge branch 'main' of https://git.threefold.info/herocode/sal
Some checks are pending
Rhai Tests / Run Rhai Tests (push) Waiting to run
2025-06-15 20:36:12 +03:00
Mahmoud-Emad
5194f5245d chore: Update Gitea host and Zinit client dependency
- Updated the Gitea host URL in `.roo/mcp.json` and `Cargo.toml`
  to reflect the change from `git.ourworld.tf` to `git.threefold.info`.
- Updated the `zinit-client` dependency in `Cargo.toml` to version
  `0.3.0`.  This ensures compatibility with the updated repository.
- Updated file paths in example files to reflect the new repository URL.
2025-06-15 20:36:02 +03:00
a9255de679 Merge branch 'main' of git.threefold.info:herocode/sal 2025-06-15 16:21:04 +02:00