Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/template-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
reloaded-templates-rust:1.1.0
reloaded-templates-rust:1.2.0
6 changes: 3 additions & 3 deletions .github/workflows/deploy-mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
branches: [main]
paths:
- "docs/**"
- "src/docs/**"

jobs:
build:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Deploy MkDocs
uses: Reloaded-Project/devops-mkdocs@v1
with:
config-file: docs/mkdocs.yml
requirements: ./docs/requirements.txt
config-file: src/docs/mkdocs.yml
requirements: ./src/docs/requirements.txt
publish-to-pages: ${{ github.event_name == 'push' }}
checkout-current-repo: true
6 changes: 2 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,8 @@ jobs:
;;
esac

format:
name: Format
format-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

Expand Down Expand Up @@ -204,7 +202,7 @@ jobs:
permissions:
contents: write

needs: [ci, format, semver-checks]
needs: [ci, format-check, semver-checks]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"[yaml]": {
"editor.formatOnSave": false
}
}
77 changes: 59 additions & 18 deletions src/.cargo/verify.ps1
Original file line number Diff line number Diff line change
@@ -1,36 +1,66 @@
# Post-change verification script
# All steps must pass without warnings
# Keep in sync with verify.sh
# Script is relative to git repo root; search if not found
#
# Note: reloaded-code-serdesai is async-only.
# Blocking mode is validated for core and models-dev.
# reloaded-code-bubblewrap is Linux-only; all bubblewrap steps
# are skipped on non-Linux platforms.

$ErrorActionPreference = "Stop"
$originalDir = Get-Location
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$projectRoot = Join-Path $scriptDir ".."
$originalRustdocFlags = $env:RUSTDOCFLAGS
Set-Location $projectRoot -ErrorAction Stop

$script:exitCode = 0
$script:failedCommands = @()

function Register-CommandFailure {
param(
[string]$DisplayCommand,
[int]$Code,
[string]$Message = ""
)

Write-Host ("Command failed with exit code " + $Code + ": " + $DisplayCommand)
if ($Message -ne "") {
Write-Host $Message
}

$script:failedCommands += $DisplayCommand
if ($script:exitCode -eq 0) {
$script:exitCode = $Code
}
}

function Invoke-LoggedCommand {
param(
[string]$Command,
[string[]]$Arguments
)

if ($Arguments.Count -gt 0) {
Write-Host ($Command + " " + ($Arguments -join " "))
$displayCommand = if ($Arguments.Count -gt 0) {
$Command + " " + ($Arguments -join " ")
} else {
Write-Host $Command
$Command
}

& $Command @Arguments
if ($LASTEXITCODE -ne 0) {
throw "Command '$Command' failed with exit code $LASTEXITCODE"
Write-Host $displayCommand

try {
& $Command @Arguments
$commandExitCode = $LASTEXITCODE
} catch {
Register-CommandFailure $displayCommand 1 $_.Exception.Message
return
}
}

$originalDir = Get-Location
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
$projectRoot = Join-Path $scriptDir ".."
Set-Location $projectRoot
if ($commandExitCode -ne 0) {
Register-CommandFailure $displayCommand $commandExitCode
}
}

$onLinux = $IsLinux -eq $true

Expand Down Expand Up @@ -67,7 +97,6 @@ try {

Write-Host "Docs..."
$docArgs = @("--workspace", "--document-private-items", "--no-deps", "--quiet", "--exclude", "reloaded-code-bubblewrap")
$originalRustdocFlags = $env:RUSTDOCFLAGS
$env:RUSTDOCFLAGS = "-D warnings"
try {
Invoke-LoggedCommand "cargo" (@("doc") + $docArgs)
Expand All @@ -78,6 +107,9 @@ try {
Write-Host "Formatting..."
Invoke-LoggedCommand "cargo" @("fmt", "--all", "--quiet")

Write-Host "Publish dry-run..."
Invoke-LoggedCommand "cargo" @("publish", "--dry-run", "--allow-dirty", "--quiet", "--workspace")

Write-Host "Linux-only feature coverage..."
if ($onLinux) {
Write-Host "Building (linux async features)..."
Expand Down Expand Up @@ -108,19 +140,28 @@ try {
Invoke-LoggedCommand "cargo" @("clippy", "-p", "reloaded-code-core", "--no-default-features", "--features", "blocking,linux-bubblewrap", "--quiet", "--", "-D", "warnings")

Write-Host "Docs (linux-only package)..."
$linuxRustdocFlags = $env:RUSTDOCFLAGS
$env:RUSTDOCFLAGS = "-D warnings"
try {
Invoke-LoggedCommand "cargo" @("doc", "-p", "reloaded-code-bubblewrap", "--document-private-items", "--no-deps", "--quiet")
} finally {
$env:RUSTDOCFLAGS = $linuxRustdocFlags
$env:RUSTDOCFLAGS = $originalRustdocFlags
}
} else {
Write-Host " (skipped - not Linux)"
}
} finally {
$env:RUSTDOCFLAGS = $originalRustdocFlags
Set-Location $originalDir
}

if ($script:exitCode -eq 0) {
Write-Host "All checks passed!"
} else {
Write-Host "Verification failed."
Write-Host "Failed commands:"
foreach ($failedCommand in $script:failedCommands) {
Write-Host (" - " + $failedCommand)
}
}
finally {
Set-Location $originalDir
}

exit $script:exitCode
32 changes: 29 additions & 3 deletions src/.cargo/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,29 @@
# Post-change verification script
# All steps must pass without warnings
# Keep in sync with verify.ps1
# Script is relative to git repo root; search if not found
#
# Note: reloaded-code-serdesai is async-only.
# Blocking mode is validated for core and models-dev.
# reloaded-code-bubblewrap is Linux-only; all bubblewrap steps
# are skipped on non-Linux platforms.

set -e

run_cmd() {
echo "$*"

"$@"
local status=$?
if [ "$status" -eq 0 ]; then
return 0
fi

printf 'Command failed with exit code %s: %s\n' "$status" "$*" >&2
FAILED_COMMANDS+=("$*")
if [ "$EXIT_CODE" -eq 0 ]; then
EXIT_CODE=$status
fi

return 0
}

ORIGINAL_DIR="$(pwd)"
Expand All @@ -22,6 +34,9 @@ cd "$PROJECT_ROOT"

trap 'cd "$ORIGINAL_DIR"' EXIT

EXIT_CODE=0
FAILED_COMMANDS=()

IS_LINUX=false
if [ "$(uname -s)" = "Linux" ]; then
IS_LINUX=true
Expand Down Expand Up @@ -64,6 +79,9 @@ run_cmd env RUSTDOCFLAGS="-D warnings" cargo doc "${DOC_ARGS[@]}"
echo "Formatting..."
run_cmd cargo fmt --all --quiet

echo "Publish dry-run..."
run_cmd cargo publish --dry-run --allow-dirty --quiet --workspace

echo "Linux-only feature coverage..."
if [ "$IS_LINUX" = true ]; then
echo "Building (linux async features)..."
Expand Down Expand Up @@ -100,4 +118,12 @@ else
echo " (skipped - not Linux)"
fi

echo "All checks passed!"
if [ "$EXIT_CODE" -eq 0 ]; then
echo "All checks passed!"
else
echo "Verification failed."
echo "Failed commands:"
printf ' - %s\n' "${FAILED_COMMANDS[@]}"
fi

exit "$EXIT_CODE"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions src/reloaded-code-agents/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ repository = "https://github.com/Reloaded-Project/ReloadedCode"
license = "Apache-2.0"
include = ["src/**/*", "README.md"]
readme = "README.md"
# keywords (search terms): https://crates.io/keywords
keywords = ["agents", "llm", "opencode", "markdown", "yaml"]
# categories (fixed list): https://crates.io/categories
categories = ["development-tools", "artificial-intelligence"]

[dependencies]
# YAML parsing for frontmatter
Expand Down
4 changes: 4 additions & 0 deletions src/reloaded-code-bubblewrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ repository = "https://github.com/Reloaded-Project/ReloadedCode"
license = "Apache-2.0"
include = ["src/**/*", "README.md"]
readme = "README.md"
# keywords (search terms): https://crates.io/keywords
keywords = ["bubblewrap", "sandbox", "linux", "container", "security"]
# categories (fixed list): https://crates.io/categories
categories = ["os", "virtualization", "security", "development-tools"]

[features]
default = ["tokio"]
Expand Down
4 changes: 4 additions & 0 deletions src/reloaded-code-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ repository = "https://github.com/Reloaded-Project/ReloadedCode"
license = "Apache-2.0"
include = ["src/**/*", "README.md"]
readme = "README.md"
# keywords (search terms): https://crates.io/keywords
keywords = ["coding-tools", "file-system", "permissions", "llm", "agent"]
# categories (fixed list): https://crates.io/categories
categories = ["development-tools", "filesystem"]

[features]
default = ["tokio"]
Expand Down
4 changes: 4 additions & 0 deletions src/reloaded-code-models-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ repository = "https://github.com/Reloaded-Project/ReloadedCode"
license = "Apache-2.0"
include = ["src/**/*", "README.md"]
readme = "README.md"
# keywords (search terms): https://crates.io/keywords
keywords = ["models-dev", "llm", "catalog", "etag", "caching"]
# categories (fixed list): https://crates.io/categories
categories = ["artificial-intelligence", "api-bindings", "development-tools"]

[features]
default = ["tokio"]
Expand Down
4 changes: 4 additions & 0 deletions src/reloaded-code-provider-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ repository = "https://github.com/Reloaded-Project/ReloadedCode"
license = "Apache-2.0"
include = ["src/**/*", "README.md"]
readme = "README.md"
# keywords (search terms): https://crates.io/keywords
keywords = ["configuration", "providers", "yaml", "llm", "catalog"]
# categories (fixed list): https://crates.io/categories
categories = ["config", "development-tools"]

[dependencies]
reloaded-code-core = { workspace = true, default-features = false, features = ["tokio"] }
Expand Down
4 changes: 4 additions & 0 deletions src/reloaded-code-serdesai/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ description = "Lightweight, high-performance serdesAI framework Tool implementat
repository = "https://github.com/Reloaded-Project/ReloadedCode"
license = "Apache-2.0"
readme = "README.md"
# keywords (search terms): https://crates.io/keywords
keywords = ["serdesai", "llm", "coding-tools", "agent", "tool-adapter"]
# categories (fixed list): https://crates.io/categories
categories = ["development-tools", "artificial-intelligence"]
include = ["src/**/*", "examples/**/*", "README.md"]

[features]
Expand Down
Loading