Skip to content

Commit 40248d6

Browse files
hyperpolymathclaude
andcommitted
feat: initialize session-sentinel — multi-AI session health monitor
AffineScript core logic with affine types and effects for storage scanning, health zone classification (green/yellow/red/purple), self-healing engine, diagnostics, and multi-AI provider detection. Idris2 ABI with dependent type proofs for health state machine transitions, monitor protocol, and PanLL panel communication. Zig FFI for KDE StatusNotifierItem system tray, DBus integration, dynamic SVG icon generation, and systemd watchdog with fault tolerance (degraded/failed states, exponential backoff recovery). Supports Claude, Copilot, Ollama, LM Studio, Continue.dev, Cursor, Aider — extensible via TOML config for any AI tool. Starts on boot via systemd user service with resource limits and security hardening. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 parents  commit 40248d6

338 files changed

Lines changed: 23923 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Containerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# Dev Container image for Session Sentinel
5+
# Base: Chainguard Wolfi (minimal, supply-chain-secure)
6+
# Build: podman build -t Session Sentinel-dev -f .devcontainer/Containerfile .
7+
8+
FROM cgr.dev/chainguard/wolfi-base:latest
9+
10+
# Install common development tools
11+
RUN apk update && apk add --no-cache \
12+
bash \
13+
curl \
14+
git \
15+
openssh-client \
16+
ca-certificates \
17+
build-base \
18+
posix-libc-utils \
19+
shadow \
20+
&& rm -rf /var/cache/apk/*
21+
22+
# Create non-root dev user (matches devcontainer.json remoteUser)
23+
RUN groupadd -g 1000 nonroot || true \
24+
&& useradd -m -u 1000 -g 1000 -s /bin/bash nonroot || true
25+
26+
# Set workspace directory
27+
WORKDIR /workspaces/Session Sentinel
28+
29+
# Default shell
30+
ENV SHELL=/bin/bash
31+
32+
USER nonroot

.devcontainer/README.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
= Dev Container Usage
3+
:author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
5+
== Overview
6+
7+
This dev container uses `cgr.dev/chainguard/wolfi-base` with git, curl, bash, and just pre-installed. Dev container features add git, just, and nickel automatically.
8+
9+
== VS Code (Local)
10+
11+
. Install the *Dev Containers* extension (`ms-vscode-remote.remote-containers`).
12+
. Set `dev.containers.dockerPath` to `podman` in VS Code settings.
13+
. Open the repo folder, then choose **Reopen in Container** from the command palette.
14+
15+
== GitHub Codespaces
16+
17+
. From the repository on GitHub, click **Code > Codespaces > New codespace**.
18+
. The container builds automatically from this configuration.
19+
20+
== Gitpod
21+
22+
. Prefix the repo URL with `https://gitpod.io/#` to launch a workspace.
23+
. Gitpod reads `devcontainer.json` and builds the environment.
24+
25+
== Customization
26+
27+
Replace `Session Sentinel` placeholders in both `devcontainer.json` and `Containerfile` with your actual project name. Run `just deps` to verify the environment after first launch.

.devcontainer/devcontainer.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
// Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
//
4+
// Dev Container configuration for Session Sentinel
5+
// Works with: VS Code Dev Containers, GitHub Codespaces, Gitpod
6+
// Container runtime: Podman (recommended) or any OCI-compliant runtime
7+
{
8+
"name": "Session Sentinel",
9+
10+
"build": {
11+
"dockerfile": "Containerfile",
12+
"context": ".."
13+
},
14+
15+
"features": {
16+
"ghcr.io/devcontainers/features/git:1": {
17+
"ppa": false,
18+
"version": "latest"
19+
},
20+
"ghcr.io/jdx/devcontainer-features/just:1": {},
21+
"ghcr.io/nickel-lang/devcontainer-feature:0": {}
22+
},
23+
24+
"postCreateCommand": "just deps",
25+
26+
"remoteUser": "nonroot",
27+
28+
"containerEnv": {
29+
"EDITOR": "code --wait",
30+
"LANG": "C.UTF-8"
31+
},
32+
33+
"customizations": {
34+
"vscode": {
35+
"extensions": [
36+
"EditorConfig.EditorConfig",
37+
"eamodio.gitlens",
38+
"streetsidesoftware.code-spell-checker",
39+
"timonwong.shellcheck",
40+
"tamasfe.even-better-toml",
41+
"skellock.just",
42+
"redhat.vscode-yaml",
43+
"DavidAnson.vscode-markdownlint",
44+
"asciidoctor.asciidoctor-vscode",
45+
"usernamehw.errorlens"
46+
],
47+
"settings": {
48+
"editor.formatOnSave": true,
49+
"editor.insertSpaces": true,
50+
"editor.tabSize": 2,
51+
"files.trimTrailingWhitespace": true,
52+
"files.insertFinalNewline": true,
53+
"files.trimFinalNewlines": true,
54+
"[makefile]": {
55+
"editor.insertSpaces": false
56+
}
57+
}
58+
},
59+
"codespaces": {
60+
"openFiles": [
61+
"README.adoc"
62+
]
63+
}
64+
},
65+
66+
"forwardPorts": [],
67+
68+
"shutdownAction": "stopContainer"
69+
}

.editorconfig

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# RSR-template-repo - Editor Configuration
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_size = 2
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.adoc]
18+
trim_trailing_whitespace = false
19+
20+
[*.rs]
21+
indent_size = 4
22+
23+
[*.ex]
24+
indent_size = 2
25+
26+
[*.exs]
27+
indent_size = 2
28+
29+
[*.zig]
30+
indent_size = 4
31+
32+
[*.ada]
33+
indent_size = 3
34+
35+
[*.adb]
36+
indent_size = 3
37+
38+
[*.ads]
39+
indent_size = 3
40+
41+
[*.hs]
42+
indent_size = 2
43+
44+
[*.res]
45+
indent_size = 2
46+
47+
[*.resi]
48+
indent_size = 2
49+
50+
[*.ncl]
51+
indent_size = 2
52+
53+
[*.rkt]
54+
indent_size = 2
55+
56+
[*.scm]
57+
indent_size = 2
58+
59+
[*.nix]
60+
indent_size = 2
61+
62+
[Justfile]
63+
indent_style = space
64+
indent_size = 4
65+

.envrc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Activate development environment
3+
# Install direnv: https://direnv.net/
4+
5+
# Load .tool-versions if asdf is available
6+
if has asdf; then
7+
use asdf
8+
fi
9+
10+
# Load Guix shell if guix.scm exists
11+
if has guix && [ -f guix.scm ]; then
12+
use guix
13+
fi
14+
15+
# Load Nix flake if flake.nix exists
16+
if has nix && [ -f flake.nix ]; then
17+
use flake
18+
fi
19+
20+
# Project environment variables
21+
export PROJECT_NAME="Session Sentinel"
22+
export RSR_TIER="infrastructure"
23+
# export DATABASE_URL="..."
24+
# export API_KEY="..."
25+
26+
# Source .env if it exists (gitignored)
27+
dotenv_if_exists

.gitattributes

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# RSR-compliant .gitattributes
3+
4+
* text=auto eol=lf
5+
6+
# Source
7+
*.rs text eol=lf diff=rust
8+
*.ex text eol=lf diff=elixir
9+
*.exs text eol=lf diff=elixir
10+
*.jl text eol=lf
11+
*.res text eol=lf
12+
*.resi text eol=lf
13+
*.ada text eol=lf diff=ada
14+
*.adb text eol=lf diff=ada
15+
*.ads text eol=lf diff=ada
16+
*.hs text eol=lf
17+
*.chpl text eol=lf
18+
*.scm text eol=lf
19+
*.a2ml text eol=lf linguist-language=TOML
20+
*.ncl text eol=lf
21+
*.nix text eol=lf
22+
23+
# Docs
24+
*.md text eol=lf diff=markdown
25+
*.adoc text eol=lf
26+
*.txt text eol=lf
27+
28+
# Data
29+
*.json text eol=lf
30+
*.yaml text eol=lf
31+
*.yml text eol=lf
32+
*.toml text eol=lf
33+
34+
# Config
35+
.gitignore text eol=lf
36+
.gitattributes text eol=lf
37+
Justfile text eol=lf
38+
Makefile text eol=lf
39+
Containerfile text eol=lf
40+
41+
# Scripts
42+
*.sh text eol=lf
43+
44+
# Binary
45+
*.png binary
46+
*.jpg binary
47+
*.gif binary
48+
*.pdf binary
49+
*.woff2 binary
50+
*.zip binary
51+
*.gz binary
52+
53+
# Lock files
54+
Cargo.lock text eol=lf -diff
55+
flake.lock text eol=lf -diff

.github/.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> <6759885+hyperpolymath@users.noreply.github.com>

.github/.nojekyll

Whitespace-only changes.

.github/0.1-AI-MANIFEST.a2ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# AI Manifest - Level 1: .github

.github/CODEOWNERS

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# CODEOWNERS - Define code review assignments
3+
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
4+
#
5+
# Replace hyperpolymath with your GitHub username or team
6+
7+
# Default owners for everything
8+
* @hyperpolymath
9+
10+
# Security-sensitive files require explicit review
11+
SECURITY.md @hyperpolymath
12+
.github/workflows/ @hyperpolymath
13+
Trustfile.a2ml @hyperpolymath
14+
.machine_readable/ @hyperpolymath

0 commit comments

Comments
 (0)