sakrit 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sakrit-0.0.1/.claude/settings.local.json +39 -0
- sakrit-0.0.1/.github/workflows/chaos.yml +28 -0
- sakrit-0.0.1/.github/workflows/ci.yml +99 -0
- sakrit-0.0.1/.github/workflows/release.yml +81 -0
- sakrit-0.0.1/.gitignore +35 -0
- sakrit-0.0.1/CODE_OF_CONDUCT.md +117 -0
- sakrit-0.0.1/CONTRIBUTING.md +61 -0
- sakrit-0.0.1/LICENSE +201 -0
- sakrit-0.0.1/PKG-INFO +129 -0
- sakrit-0.0.1/README.md +99 -0
- sakrit-0.0.1/SECURITY.md +53 -0
- sakrit-0.0.1/STABILITY.md +79 -0
- sakrit-0.0.1/examples/send_email_langgraph/README.md +12 -0
- sakrit-0.0.1/pyproject.toml +94 -0
- sakrit-0.0.1/src/sakrit/__about__.py +5 -0
- sakrit-0.0.1/src/sakrit/__init__.py +42 -0
- sakrit-0.0.1/src/sakrit/adapters/__init__.py +31 -0
- sakrit-0.0.1/src/sakrit/adapters/fake.py +60 -0
- sakrit-0.0.1/src/sakrit/adapters/langgraph.py +90 -0
- sakrit-0.0.1/src/sakrit/adapters/openai_agents.py +170 -0
- sakrit-0.0.1/src/sakrit/audit.py +320 -0
- sakrit-0.0.1/src/sakrit/cli.py +109 -0
- sakrit-0.0.1/src/sakrit/core/__init__.py +69 -0
- sakrit-0.0.1/src/sakrit/core/adapter.py +141 -0
- sakrit-0.0.1/src/sakrit/core/canonical.py +126 -0
- sakrit-0.0.1/src/sakrit/core/context.py +38 -0
- sakrit-0.0.1/src/sakrit/core/coordinate.py +57 -0
- sakrit-0.0.1/src/sakrit/core/declaration.py +153 -0
- sakrit-0.0.1/src/sakrit/core/errors.py +84 -0
- sakrit-0.0.1/src/sakrit/core/fingerprint.py +113 -0
- sakrit-0.0.1/src/sakrit/core/keys.py +54 -0
- sakrit-0.0.1/src/sakrit/core/leased.py +468 -0
- sakrit-0.0.1/src/sakrit/core/ledger.py +1071 -0
- sakrit-0.0.1/src/sakrit/core/metrics.py +77 -0
- sakrit-0.0.1/src/sakrit/core/normalizers.py +132 -0
- sakrit-0.0.1/src/sakrit/core/outbox.py +13 -0
- sakrit-0.0.1/src/sakrit/core/protocols.py +126 -0
- sakrit-0.0.1/src/sakrit/core/reconcile.py +42 -0
- sakrit-0.0.1/src/sakrit/core/seams.py +25 -0
- sakrit-0.0.1/src/sakrit/core/settle.py +247 -0
- sakrit-0.0.1/src/sakrit/doctor.py +441 -0
- sakrit-0.0.1/src/sakrit/engine.py +558 -0
- sakrit-0.0.1/src/sakrit/py.typed +0 -0
- sakrit-0.0.1/src/sakrit/spec/__init__.py +39 -0
- sakrit-0.0.1/src/sakrit/spec/convergence.py +242 -0
- sakrit-0.0.1/src/sakrit/spec/v1.py +409 -0
- sakrit-0.0.1/tests/chaos/test_ambiguous_exception.py +98 -0
- sakrit-0.0.1/tests/chaos/test_chaos_matrix.py +211 -0
- sakrit-0.0.1/tests/chaos/test_chaos_placeholder.py +15 -0
- sakrit-0.0.1/tests/chaos/worker.py +99 -0
- sakrit-0.0.1/tests/fixtures/sed-normalizer-vectors.json +128 -0
- sakrit-0.0.1/tests/integration/test_integration_placeholder.py +13 -0
- sakrit-0.0.1/tests/integration/test_langgraph_conformance.py +255 -0
- sakrit-0.0.1/tests/integration/test_langgraph_demo.py +81 -0
- sakrit-0.0.1/tests/integration/test_langgraph_toolnode.py +79 -0
- sakrit-0.0.1/tests/integration/test_openai_agents_conformance.py +359 -0
- sakrit-0.0.1/tests/integration/test_plain_conformance.py +215 -0
- sakrit-0.0.1/tests/unit/test_absent_retry_precondition.py +44 -0
- sakrit-0.0.1/tests/unit/test_ambiguous_telling.py +108 -0
- sakrit-0.0.1/tests/unit/test_async_refuse.py +58 -0
- sakrit-0.0.1/tests/unit/test_async_support.py +120 -0
- sakrit-0.0.1/tests/unit/test_audit.py +253 -0
- sakrit-0.0.1/tests/unit/test_bind_fingerprint.py +26 -0
- sakrit-0.0.1/tests/unit/test_canonical.py +89 -0
- sakrit-0.0.1/tests/unit/test_claimed_race.py +47 -0
- sakrit-0.0.1/tests/unit/test_clean_failures_guardrail.py +40 -0
- sakrit-0.0.1/tests/unit/test_contention.py +1010 -0
- sakrit-0.0.1/tests/unit/test_convergence.py +197 -0
- sakrit-0.0.1/tests/unit/test_doctor.py +294 -0
- sakrit-0.0.1/tests/unit/test_engine_leased.py +140 -0
- sakrit-0.0.1/tests/unit/test_fingerprint.py +65 -0
- sakrit-0.0.1/tests/unit/test_generator_refuse.py +100 -0
- sakrit-0.0.1/tests/unit/test_l2.py +106 -0
- sakrit-0.0.1/tests/unit/test_l2_ttl.py +67 -0
- sakrit-0.0.1/tests/unit/test_metrics.py +125 -0
- sakrit-0.0.1/tests/unit/test_multiworker.py +84 -0
- sakrit-0.0.1/tests/unit/test_normalizers.py +56 -0
- sakrit-0.0.1/tests/unit/test_occurrence.py +97 -0
- sakrit-0.0.1/tests/unit/test_preconditions.py +258 -0
- sakrit-0.0.1/tests/unit/test_protocols.py +16 -0
- sakrit-0.0.1/tests/unit/test_provenance.py +158 -0
- sakrit-0.0.1/tests/unit/test_reconcile.py +241 -0
- sakrit-0.0.1/tests/unit/test_replay_fidelity.py +40 -0
- sakrit-0.0.1/tests/unit/test_rotation.py +270 -0
- sakrit-0.0.1/tests/unit/test_seam.py +147 -0
- sakrit-0.0.1/tests/unit/test_sed_format.py +147 -0
- sakrit-0.0.1/tests/unit/test_settle.py +268 -0
- sakrit-0.0.1/tests/unit/test_smoke.py +19 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(\"/Users/nagarajuoruganti/Desktop/Agentic AI/Sakrit/.venv/bin/python\" --version)",
|
|
5
|
+
"Bash(\"/Users/nagarajuoruganti/Desktop/Agentic AI/Sakrit/.venv/bin/pip\" list)",
|
|
6
|
+
"Bash(uv sync *)",
|
|
7
|
+
"Bash(uv run *)",
|
|
8
|
+
"Bash(grep -v '^\\\\.$')",
|
|
9
|
+
"Bash(git init *)",
|
|
10
|
+
"Bash(.venv/bin/python --version)",
|
|
11
|
+
"Bash(.venv/bin/python -c \"import langgraph; print\\('langgraph', langgraph.__version__\\)\")",
|
|
12
|
+
"Bash(.venv/bin/pip list *)",
|
|
13
|
+
"Bash(.venv/bin/python -m pip install --quiet \"langgraph\" \"langgraph-checkpoint-sqlite\")",
|
|
14
|
+
"Bash(.venv/bin/python -c \"import langgraph, langgraph.checkpoint.sqlite as s; print\\('ok langgraph', getattr\\(langgraph,'__version__','?'\\)\\)\")",
|
|
15
|
+
"Bash(uv pip *)",
|
|
16
|
+
"Bash(../../.venv/bin/python run.py)",
|
|
17
|
+
"Bash(../../.venv/bin/python resume.py)",
|
|
18
|
+
"Bash(../../.venv/bin/python check_outbox.py)",
|
|
19
|
+
"Bash(echo \"check_outbox exit code: $?\")",
|
|
20
|
+
"Bash(.venv/bin/ruff check *)",
|
|
21
|
+
"Bash(.venv/bin/python -c \"import langgraph, sys; print\\('python', sys.version.split\\(\\)[0]\\); print\\('langgraph', langgraph.__version__\\)\")",
|
|
22
|
+
"Bash(cat research/repro/outbox.jsonl)",
|
|
23
|
+
"Bash(echo \"exit=$?\")",
|
|
24
|
+
"Bash(grep -v \"~\\\\$\")",
|
|
25
|
+
"Bash(\"/Users/nagarajuoruganti/Desktop/Agentic AI/Sakrit/.venv/bin/python\" tracer.py)",
|
|
26
|
+
"Skill(claude-api)",
|
|
27
|
+
"mcp__claude_ai_Gmail__search_threads",
|
|
28
|
+
"Bash(git checkout *)",
|
|
29
|
+
"Bash(.venv/bin/python -m pytest -q -p no:cacheprovider)",
|
|
30
|
+
"Bash(python -m pytest -q)",
|
|
31
|
+
"Bash(python -m mypy src tests)",
|
|
32
|
+
"Bash(python -m ruff check)",
|
|
33
|
+
"Bash(.venv/bin/sakrit doctor *)",
|
|
34
|
+
"Bash(cat)",
|
|
35
|
+
"Bash(python /tmp/verify_c2.py)",
|
|
36
|
+
"Bash(python /tmp/verify_doctor.py)"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Chaos
|
|
2
|
+
|
|
3
|
+
# Act III kill-at-every-boundary suite, run daily as a published credibility
|
|
4
|
+
# artifact (and on demand). The per-PR *merge gate* for the same suite lives in
|
|
5
|
+
# ci.yml (P2-7) — this scheduled run is the ongoing-proof companion, not the gate.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
schedule:
|
|
9
|
+
- cron: "0 6 * * *" # daily, 06:00 UTC
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
chaos:
|
|
14
|
+
name: exactly-once under crashes
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Sync dependencies
|
|
25
|
+
run: uv sync --all-extras --dev
|
|
26
|
+
|
|
27
|
+
- name: Pytest (chaos)
|
|
28
|
+
run: uv run pytest tests/chaos -m chaos
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ci-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
lint:
|
|
14
|
+
name: lint + types
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
|
|
24
|
+
- name: Sync dependencies
|
|
25
|
+
run: uv sync --all-extras --dev
|
|
26
|
+
|
|
27
|
+
- name: Ruff (lint)
|
|
28
|
+
run: uv run ruff check .
|
|
29
|
+
|
|
30
|
+
- name: Ruff (format check)
|
|
31
|
+
run: uv run ruff format --check .
|
|
32
|
+
|
|
33
|
+
- name: Mypy (types)
|
|
34
|
+
run: uv run mypy
|
|
35
|
+
|
|
36
|
+
test:
|
|
37
|
+
# P0 install matrix: py3.10–3.14 × macOS/Linux. Version-specific failures are
|
|
38
|
+
# real and invisible locally (the py3.14 heartbeat bug), and the durability layer
|
|
39
|
+
# leans on POSIX flock + fsync semantics that differ across OSes — so both axes
|
|
40
|
+
# are load-bearing, not box-ticking.
|
|
41
|
+
name: unit (py${{ matrix.python-version }} · ${{ matrix.os }})
|
|
42
|
+
runs-on: ${{ matrix.os }}
|
|
43
|
+
strategy:
|
|
44
|
+
fail-fast: false
|
|
45
|
+
matrix:
|
|
46
|
+
os: [ubuntu-latest, macos-latest]
|
|
47
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
|
|
51
|
+
- name: Install uv
|
|
52
|
+
uses: astral-sh/setup-uv@v5
|
|
53
|
+
with:
|
|
54
|
+
python-version: ${{ matrix.python-version }}
|
|
55
|
+
|
|
56
|
+
- name: Sync dependencies
|
|
57
|
+
run: uv sync --all-extras --dev
|
|
58
|
+
|
|
59
|
+
- name: Pytest (unit)
|
|
60
|
+
run: uv run pytest tests/unit -m "not chaos"
|
|
61
|
+
|
|
62
|
+
chaos:
|
|
63
|
+
name: exactly-once under crashes (merge gate)
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- uses: actions/checkout@v4
|
|
67
|
+
|
|
68
|
+
- name: Install uv
|
|
69
|
+
uses: astral-sh/setup-uv@v5
|
|
70
|
+
with:
|
|
71
|
+
python-version: "3.12"
|
|
72
|
+
|
|
73
|
+
- name: Sync dependencies
|
|
74
|
+
run: uv sync --all-extras --dev
|
|
75
|
+
|
|
76
|
+
# P2-7: the kill-at-every-boundary matrix is "the do-not-launch gate" — so it must
|
|
77
|
+
# actually gate. It runs here on every PR (fast: subprocess kills over a temp DB),
|
|
78
|
+
# in addition to the daily published run in chaos.yml.
|
|
79
|
+
- name: Pytest (chaos)
|
|
80
|
+
run: uv run pytest tests/chaos -m chaos
|
|
81
|
+
|
|
82
|
+
integration:
|
|
83
|
+
name: adapter conformance + demo (LangGraph)
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/checkout@v4
|
|
87
|
+
|
|
88
|
+
- name: Install uv
|
|
89
|
+
uses: astral-sh/setup-uv@v5
|
|
90
|
+
with:
|
|
91
|
+
python-version: "3.12"
|
|
92
|
+
|
|
93
|
+
- name: Sync dependencies (with the langgraph extra)
|
|
94
|
+
run: uv sync --extra langgraph --dev
|
|
95
|
+
|
|
96
|
+
# Gates the LangGraph adapter: call_site (checkpoint_ns) must be byte-stable
|
|
97
|
+
# across resume and unique per step, and the guarded demo must send once.
|
|
98
|
+
- name: Pytest (integration)
|
|
99
|
+
run: uv run pytest tests/integration -m integration
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Tagged-release automation with a dry-run mode (roadmap Stage 2 · Phase 0 · deliverable 2).
|
|
4
|
+
#
|
|
5
|
+
# Dry run (no publish): Actions → Release → "Run workflow" (workflow_dispatch). Builds the
|
|
6
|
+
# sdist + wheel and runs `twine check` so we can rehearse a release without touching PyPI.
|
|
7
|
+
# Real release: push a tag `vX.Y.Z` (must match src/sakrit/__about__.py). Builds, checks,
|
|
8
|
+
# then publishes to PyPI via Trusted Publishing (OIDC — no API token stored in the repo).
|
|
9
|
+
#
|
|
10
|
+
# Trusted Publishing setup (one-time, on PyPI, per the T-ORG migration note when the org moves):
|
|
11
|
+
# PyPI project → Settings → Publishing → add a GitHub publisher:
|
|
12
|
+
# owner = nagaraju-oruganti, repo = sakrit, workflow = release.yml, environment = pypi
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
tags:
|
|
17
|
+
- "v*"
|
|
18
|
+
workflow_dispatch:
|
|
19
|
+
inputs:
|
|
20
|
+
reason:
|
|
21
|
+
description: "Why this dry run (recorded in the run)"
|
|
22
|
+
required: false
|
|
23
|
+
default: "release rehearsal"
|
|
24
|
+
|
|
25
|
+
concurrency:
|
|
26
|
+
group: release-${{ github.ref }}
|
|
27
|
+
cancel-in-progress: false
|
|
28
|
+
|
|
29
|
+
jobs:
|
|
30
|
+
build:
|
|
31
|
+
name: build + check (dry-run safe)
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.12"
|
|
40
|
+
|
|
41
|
+
- name: Verify tag matches package version
|
|
42
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
43
|
+
run: |
|
|
44
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
45
|
+
pkg="$(uv run python -c 'from sakrit.__about__ import __version__; print(__version__)')"
|
|
46
|
+
echo "tag=$tag package=$pkg"
|
|
47
|
+
if [ "$tag" != "$pkg" ]; then
|
|
48
|
+
echo "::error::tag v$tag does not match package version $pkg (src/sakrit/__about__.py)"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
- name: Build sdist + wheel
|
|
53
|
+
run: uv build
|
|
54
|
+
|
|
55
|
+
- name: Check metadata (twine check)
|
|
56
|
+
run: uvx twine check dist/*
|
|
57
|
+
|
|
58
|
+
- name: Upload build artifacts
|
|
59
|
+
uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: dist
|
|
62
|
+
path: dist/
|
|
63
|
+
|
|
64
|
+
publish:
|
|
65
|
+
name: publish to PyPI
|
|
66
|
+
needs: build
|
|
67
|
+
# Only a real tag push publishes. workflow_dispatch always stops after build+check (the dry run).
|
|
68
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
environment: pypi
|
|
71
|
+
permissions:
|
|
72
|
+
id-token: write # OIDC for Trusted Publishing; no stored token
|
|
73
|
+
steps:
|
|
74
|
+
- name: Download build artifacts
|
|
75
|
+
uses: actions/download-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
name: dist
|
|
78
|
+
path: dist/
|
|
79
|
+
|
|
80
|
+
- name: Publish
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
sakrit-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
*.so
|
|
9
|
+
|
|
10
|
+
# Virtual environments
|
|
11
|
+
.venv/
|
|
12
|
+
venv/
|
|
13
|
+
|
|
14
|
+
# Tooling caches
|
|
15
|
+
.pytest_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
.mypy_cache/
|
|
18
|
+
.coverage
|
|
19
|
+
htmlcov/
|
|
20
|
+
|
|
21
|
+
# uv
|
|
22
|
+
uv.lock
|
|
23
|
+
|
|
24
|
+
# OS / editor
|
|
25
|
+
.DS_Store
|
|
26
|
+
*.swp
|
|
27
|
+
.idea/
|
|
28
|
+
.vscode/
|
|
29
|
+
|
|
30
|
+
# Office temp files
|
|
31
|
+
~$*
|
|
32
|
+
|
|
33
|
+
# Docs and research (kept local, not tracked)
|
|
34
|
+
docs/
|
|
35
|
+
research/
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a
|
|
6
|
+
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
|
7
|
+
disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
|
|
8
|
+
education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or
|
|
9
|
+
sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
|
|
12
|
+
healthy community.
|
|
13
|
+
|
|
14
|
+
## Our Standards
|
|
15
|
+
|
|
16
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
17
|
+
|
|
18
|
+
* Demonstrating empathy and kindness toward other people
|
|
19
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
20
|
+
* Giving and gracefully accepting constructive feedback
|
|
21
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
|
|
22
|
+
experience
|
|
23
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior include:
|
|
26
|
+
|
|
27
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
28
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
* Public or private harassment
|
|
30
|
+
* Publishing others' private information, such as a physical or email address, without their explicit
|
|
31
|
+
permission
|
|
32
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
33
|
+
|
|
34
|
+
## Enforcement Responsibilities
|
|
35
|
+
|
|
36
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
|
|
37
|
+
and will take appropriate and fair corrective action in response to any behavior that they deem
|
|
38
|
+
inappropriate, threatening, offensive, or harmful.
|
|
39
|
+
|
|
40
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
|
|
41
|
+
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
|
|
42
|
+
will communicate reasons for moderation decisions when appropriate.
|
|
43
|
+
|
|
44
|
+
## Scope
|
|
45
|
+
|
|
46
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is
|
|
47
|
+
officially representing the community in public spaces. Examples of representing our community include
|
|
48
|
+
using an official email address, posting via an official social media account, or acting as an
|
|
49
|
+
appointed representative at an online or offline event.
|
|
50
|
+
|
|
51
|
+
## Enforcement
|
|
52
|
+
|
|
53
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
|
|
54
|
+
leaders responsible for enforcement at
|
|
55
|
+
**`<CONDUCT-CONTACT>`** <!-- TODO before public launch (phase0 C-5): a monitored contact address. -->.
|
|
56
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
57
|
+
|
|
58
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any
|
|
59
|
+
incident.
|
|
60
|
+
|
|
61
|
+
## Enforcement Guidelines
|
|
62
|
+
|
|
63
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for
|
|
64
|
+
any action they deem in violation of this Code of Conduct:
|
|
65
|
+
|
|
66
|
+
### 1. Correction
|
|
67
|
+
|
|
68
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
|
|
69
|
+
unwelcome in the community.
|
|
70
|
+
|
|
71
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the
|
|
72
|
+
nature of the violation and an explanation of why the behavior was inappropriate. A public apology
|
|
73
|
+
may be requested.
|
|
74
|
+
|
|
75
|
+
### 2. Warning
|
|
76
|
+
|
|
77
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people
|
|
80
|
+
involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified
|
|
81
|
+
period of time. This includes avoiding interactions in community spaces as well as external channels
|
|
82
|
+
like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
83
|
+
|
|
84
|
+
### 3. Temporary Ban
|
|
85
|
+
|
|
86
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate
|
|
87
|
+
behavior.
|
|
88
|
+
|
|
89
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the
|
|
90
|
+
community for a specified period of time. No public or private interaction with the people involved,
|
|
91
|
+
including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
|
|
92
|
+
period. Violating these terms may lead to a permanent ban.
|
|
93
|
+
|
|
94
|
+
### 4. Permanent Ban
|
|
95
|
+
|
|
96
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained
|
|
97
|
+
inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes
|
|
98
|
+
of individuals.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
101
|
+
|
|
102
|
+
## Attribution
|
|
103
|
+
|
|
104
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at
|
|
105
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
106
|
+
|
|
107
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
108
|
+
|
|
109
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
110
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
111
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
112
|
+
|
|
113
|
+
[homepage]: https://www.contributor-covenant.org
|
|
114
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
115
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
116
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
117
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Contributing to Sakrit
|
|
2
|
+
|
|
3
|
+
Thank you for considering a contribution. Sakrit aims to be *load-bearing*
|
|
4
|
+
infrastructure — a dependency other stacks import without thinking about it —
|
|
5
|
+
so we hold a high bar for correctness and keep the intellectual property clean
|
|
6
|
+
from day one.
|
|
7
|
+
|
|
8
|
+
## The CLA comes first
|
|
9
|
+
|
|
10
|
+
**Before your first contribution can be merged, you must sign our Contributor
|
|
11
|
+
License Agreement (CLA).**
|
|
12
|
+
|
|
13
|
+
This is deliberate and it is not negotiable. If we want Sakrit to be both
|
|
14
|
+
adoptable *and* acquirable, the IP has to be unambiguous from the start.
|
|
15
|
+
Retrofitting a CLA onto dozens of contributors later is a common way
|
|
16
|
+
acquisitions die in diligence — invisible right up until it's fatal
|
|
17
|
+
(see Act I, step 4 of the roadmap).
|
|
18
|
+
|
|
19
|
+
- The CLA is checked automatically on every pull request.
|
|
20
|
+
- You sign once; it covers all your future contributions.
|
|
21
|
+
- Signing assigns the necessary rights to the project while leaving you full
|
|
22
|
+
ownership and use of your own work.
|
|
23
|
+
|
|
24
|
+
> The CLA bot / signing link will be wired up before the repository accepts
|
|
25
|
+
> outside contributions. Until then, this document records the intent.
|
|
26
|
+
|
|
27
|
+
## Ground rules for the code
|
|
28
|
+
|
|
29
|
+
### The core is the moat — protect its boundary
|
|
30
|
+
|
|
31
|
+
Nothing under `src/sakrit/core/` may import an agent framework (langgraph,
|
|
32
|
+
openai-agents, crewai, …). The core knows only about actions, keys, and durable
|
|
33
|
+
records. Framework glue lives in `src/sakrit/stores/`. PRs that cross this
|
|
34
|
+
boundary will be asked to move code before review.
|
|
35
|
+
|
|
36
|
+
### Before you open a PR
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
uv sync
|
|
40
|
+
uv run ruff format . # format
|
|
41
|
+
uv run ruff check . # lint
|
|
42
|
+
uv run mypy # types (strict)
|
|
43
|
+
uv run pytest tests/unit # fast tests
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
CI runs all of the above across Python 3.10–3.13. The chaos suite
|
|
47
|
+
(`tests/chaos/`) runs on a schedule, not per-PR.
|
|
48
|
+
|
|
49
|
+
### Commits and reviews
|
|
50
|
+
|
|
51
|
+
- Keep changes small and focused; one concern per PR.
|
|
52
|
+
- Describe *why*, not just *what*. Correctness arguments matter here more than
|
|
53
|
+
in most projects — this library's entire purpose is a guarantee.
|
|
54
|
+
- New behavior needs a test. Changes to the exactly-once guarantee need a chaos
|
|
55
|
+
test.
|
|
56
|
+
|
|
57
|
+
## Reporting problems
|
|
58
|
+
|
|
59
|
+
Open an issue. If you've found a case where an effect fires twice, that is the
|
|
60
|
+
most valuable report we can receive — include the framework, a minimal
|
|
61
|
+
reproduction, and where in the run the crash occurred.
|
sakrit-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|