Skip to content

Releases: xsyncio/sierra-dev

Complete Revamp 2.0

26 Nov 12:17

Choose a tag to compare

🎉 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.

25 Jul 06:42
5552550

Choose a tag to compare

Reversed the change with double quoting PATHS

What's Changed

Full Changelog: 0.1.4...0.1.5

Path and Result issues.

24 Jul 17:39
097dbf2

Choose a tag to compare

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

  • Restore double quoted paths and add json output to invoker results by @xsyncio in #5

Full Changelog: 0.1.3...0.1.4

Solved PIP errors.

24 Jul 06:07

Choose a tag to compare

Fixed PIP performance issue!

24 Jul 05:04
4b0a6f8

Choose a tag to compare

What's Changed

  • 1 performance issue with requirement installation by @xsyncio in #3

New Contributors

Full Changelog: 0.1.1...0.1.2

Fixed windows path problem!

24 Jul 01:31

Choose a tag to compare

sierra-dev

23 Jul 06:54

Choose a tag to compare

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-dev

Installation 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 scripts
  • sierra.core.compiler: Compiler for invoker scripts
  • sierra.core.loader: Loader for compiled scripts
  • sierra.abc.sierra: Abstract base classes for Sierra components
  • sierra.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 plugins
  • core/: Folder for core Sierra‑SDK components
  • abc/: Folder for abstract base classes
  • invoker/: 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