Releases: xsyncio/sierra-dev
Complete Revamp 2.0
🎉 Major Release - Complete Rewrite
Added
Package Manager System
📦 APT-like package manager with GitHub integration
Repository management (add, remove, update, list)
Package installation with automatic dependency resolution
Package search and discovery across multiple sources
Update checking and automatic package upgrades
Local caching and metadata tracking
Type safety validation for all packages
Results and Path is now fixed.
Path and Result issues.
Result issues and double quoting paths are now enforced by default.
Result was being returned in the dict format, which was assumed to be the standard, but given a recent discovery about how the backed processes it, it is now using the json.dumps method that transforms it into a valid result file!
What's Changed
Full Changelog: 0.1.3...0.1.4
Solved PIP errors.
Full Changelog: 0.1.2...0.1.3
Fixed PIP performance issue!
Fixed windows path problem!
Full Changelog: 0.1.0...0.1.1
sierra-dev
Sierra‑SDK
🚀 Overview
Sierra‑SDK is a Python framework for building and managing invoker scripts that can be used across different nodes in Sierra during any investigation.
Project Goals
- Provide a robust and flexible framework for managing invoker scripts
- Offer a simple and intuitive API for building and compiling Sierra applications
- Support extensibility through plugins and custom configurations
Key Features
- Modular Design: Sierra‑SDK is built with a modular architecture, allowing for easy extension and customization
- Invoker Script Management: Easily build, compile, and load invoker scripts across different nodes in Sierra
- Plugin Support: Extend the functionality of Sierra‑SDK through custom plugins
⚙️ Installation
pip Installation
You can install Sierra‑SDK using pip:
pip install sierra-devInstallation from Source
To install Sierra‑SDK from source, clone the repository and run the following command:
git clone https://github.com/xsyncio/sierra-dev.git
cd sierra-dev
pip install .🔧 Usage Examples
Building an Invoker Script
import sierra
# ─── Define the Invoker ────────────────────────────────────────────────────────
invoker = sierra.InvokerScript(
name="greet",
description="Prints a personalized greeting message."
)
# ─── Dependency functions ──────────────────────────────────────────────────────
@invoker.dependancy
def random_function_one(param: int) -> int:
return param * 2
@invoker.dependancy
def random_function_two(message: str) -> str:
return message.upper()
@invoker.dependancy
def random_function_three(value: float) -> float:
return value / 3.14
@invoker.dependancy
def random_function_four(flag: bool) -> bool:
return not flag
# ─── Entry point ───────────────────────────────────────────────────────────────
@invoker.entry_point
def run(
name: sierra.Param[
str | None,
sierra.SierraOption(
description="The name of the person to greet.",
mandatory="MANDATORY"
)
],
polite: sierra.Param[
bool | None,
sierra.SierraOption(
description="Whether to include a polite phrase in the greeting.",
mandatory=None
)
] = False,
) -> None:
"""
Greet the specified user by name, optionally politely.
Parameters
----------
name : str
Name of the user (mandatory).
polite : bool, optional
If True, includes a polite prefix.
"""
if name is None:
# Missing mandatory parameter
result = sierra.create_error_result("Missing mandatory parameter: name")
else:
# Build greeting
greeting = f"Hello, {name}!"
if polite:
greeting = f"Good day to you, {name}!"
# Wrap the greeting in a TreeResult
result = sierra.create_tree_result([greeting])
# Print the structured result
print(result)
# ─── Loader ────────────────────────────────────────────────────────────────────
def load(client: sierra.SierraDevelopmentClient) -> None:
"""
Register this invoker with the given Sierra client.
Parameters
----------
client : SierraDevelopmentClient
The Sierra client instance.
"""
client.load_invoker(invoker)Compiling
import sierra
# Initialize Sierra client with DEBUG‑level logging
client = sierra.SierraDevelopmentClient(
environment_name="idd",
logger=sierra.UniversalLogger(
name="Sierra",
level=sierra.sierra_internal_logger.LogLevel.DEBUG,
),
)
# Discover and register all invoker scripts
client.load_invokers_from_scripts()
# Generate standalone scripts and config.yaml
client.compiler.compile()📦 API Highlights
sierra.core.builder: Builder for invoker scriptssierra.core.compiler: Compiler for invoker scriptssierra.core.loader: Loader for compiled scriptssierra.abc.sierra: Abstract base classes for Sierra componentssierra.invoker: Invoker script definitions
🛠️ Configuration & Extensibility
Sierra‑SDK supports extensibility through plugins and custom configurations. You can add custom plugins by creating a new folder in the plugins/ directory and adding your plugin code.
Plugin Folders
plugins/: Folder for custom pluginscore/: Folder for core Sierra‑SDK componentsabc/: Folder for abstract base classesinvoker/: Folder for invoker script definitions
💡 Contributing Guidelines & Code of Conduct
We welcome contributions to Sierra‑SDK! Please see our CONTRIBUTING.md file for guidelines on how to contribute.
Code of Conduct
We follow the Python Code of Conduct.
📝 License & Authors
Sierra‑SDK is licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.
Authors
Full Changelog: https://github.com/xsyncio/sierra-dev/commits/0.1.0