hakodesh 0.1.0__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.
Files changed (36) hide show
  1. hakodesh-0.1.0/LICENSE +7 -0
  2. hakodesh-0.1.0/MANIFEST.in +8 -0
  3. hakodesh-0.1.0/PKG-INFO +78 -0
  4. hakodesh-0.1.0/README.md +52 -0
  5. hakodesh-0.1.0/docs/EXTRACT.md +25 -0
  6. hakodesh-0.1.0/docs/PROTOCOL.md +56 -0
  7. hakodesh-0.1.0/pyproject.toml +47 -0
  8. hakodesh-0.1.0/setup.cfg +4 -0
  9. hakodesh-0.1.0/src/hakodesh/__init__.py +27 -0
  10. hakodesh-0.1.0/src/hakodesh/__main__.py +4 -0
  11. hakodesh-0.1.0/src/hakodesh/akashic.py +449 -0
  12. hakodesh-0.1.0/src/hakodesh/catalog.py +103 -0
  13. hakodesh-0.1.0/src/hakodesh/cli.py +169 -0
  14. hakodesh-0.1.0/src/hakodesh/combo.py +110 -0
  15. hakodesh-0.1.0/src/hakodesh/contracts/hakodesh-event-v1.json +78 -0
  16. hakodesh-0.1.0/src/hakodesh/dispatch.py +81 -0
  17. hakodesh-0.1.0/src/hakodesh/enchant.py +76 -0
  18. hakodesh-0.1.0/src/hakodesh/events.py +358 -0
  19. hakodesh-0.1.0/src/hakodesh/grimoire.py +239 -0
  20. hakodesh-0.1.0/src/hakodesh/home.py +63 -0
  21. hakodesh-0.1.0/src/hakodesh/keys.py +47 -0
  22. hakodesh-0.1.0/src/hakodesh/mint.py +125 -0
  23. hakodesh-0.1.0/src/hakodesh/templates/combo.json.tmpl +9 -0
  24. hakodesh-0.1.0/src/hakodesh/templates/enchantment.json.tmpl +8 -0
  25. hakodesh-0.1.0/src/hakodesh/templates/spell.py.tmpl +19 -0
  26. hakodesh-0.1.0/src/hakodesh/templates/ward.json.tmpl +12 -0
  27. hakodesh-0.1.0/src/hakodesh/ward.py +107 -0
  28. hakodesh-0.1.0/src/hakodesh.egg-info/PKG-INFO +78 -0
  29. hakodesh-0.1.0/src/hakodesh.egg-info/SOURCES.txt +34 -0
  30. hakodesh-0.1.0/src/hakodesh.egg-info/dependency_links.txt +1 -0
  31. hakodesh-0.1.0/src/hakodesh.egg-info/entry_points.txt +2 -0
  32. hakodesh-0.1.0/src/hakodesh.egg-info/requires.txt +6 -0
  33. hakodesh-0.1.0/src/hakodesh.egg-info/top_level.txt +1 -0
  34. hakodesh-0.1.0/tests/test_agnostic.py +60 -0
  35. hakodesh-0.1.0/tests/test_empty_book.py +131 -0
  36. hakodesh-0.1.0/tests/test_events.py +26 -0
hakodesh-0.1.0/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2026 Shelleyguitar. All rights reserved.
2
+
3
+ This software is proprietary. You may install and use the published PyPI
4
+ package. You may not redistribute, sublicense, or sell the source except as
5
+ allowed by a separate written license from the copyright holder.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
@@ -0,0 +1,8 @@
1
+ include docs/*.md
2
+ include LICENSE
3
+ include README.md
4
+ include pyproject.toml
5
+ graft src/hakodesh
6
+ graft tests
7
+ global-exclude *.pyc
8
+ global-exclude __pycache__
@@ -0,0 +1,78 @@
1
+ Metadata-Version: 2.4
2
+ Name: hakodesh
3
+ Version: 0.1.0
4
+ Summary: Host-agnostic empty book: mint spells, enchantments, wards, and combos as you need them.
5
+ Author: Shelleyguitar
6
+ License-Expression: LicenseRef-Proprietary
7
+ Project-URL: Homepage, https://pypi.org/project/hakodesh/
8
+ Keywords: cli,sdk,spells,agents,receipts,akashic,grimoire
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: platformdirs<5,>=4.2
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest>=8.0; extra == "dev"
23
+ Requires-Dist: build>=1.2; extra == "dev"
24
+ Requires-Dist: twine>=5.0; extra == "dev"
25
+ Dynamic: license-file
26
+
27
+ # hakodesh
28
+
29
+ Host-agnostic Python CLI and SDK. After `pip install hakodesh` the user book is empty. Your LLM or agents **mint** spells, enchantments, wards, and combos as they need them.
30
+
31
+ PyPI name, import, and command: **hakodesh**. Not snax. Not snx.
32
+
33
+ ## Install
34
+
35
+ ```bash
36
+ pip install hakodesh
37
+ ```
38
+
39
+ Data home: `HAKODESH_HOME` or the platform user-data directory for `hakodesh`. Never `~/spells`.
40
+
41
+ ## Kernel commands
42
+
43
+ These are the runtime, not starter spells:
44
+
45
+ | Command | What it does |
46
+ |---|---|
47
+ | `hakodesh catalog` | User artifacts in the book (empty at install) |
48
+ | `hakodesh route "<intent>"` | Rank minted names plus kernel commands |
49
+ | `hakodesh invoke <name> [args...]` | Cast a minted spell by name |
50
+ | `hakodesh mint <name> --kind spell\|enchantment\|ward\|combo` | Scaffold into the book (preview; `--confirm` writes) |
51
+ | `hakodesh akashic` | Verify HMAC chain; `--tail N` |
52
+ | `hakodesh grimoire` | Cast ledger stats |
53
+ | `hakodesh grimoire-seal` | RFC 6962 Merkle seal (preview; `--confirm` writes; `--verify`) |
54
+ | `hakodesh enchant bind\|lift <name> --settings <path>` | Bind or lift a minted enchantment |
55
+ | `hakodesh ward status\|lock\|unlock\|check <name>` | Fail-closed ward kernel |
56
+ | `hakodesh combo seal\|cast\|list [name]` | Sealed pipelines of minted spells |
57
+ | `hakodesh <minted-name> [args...]` | Cast after mint |
58
+
59
+ `--like` on an empty book uses the **kind template** in the wheel. After one spell exists, `--like <that>` copies its shape.
60
+
61
+ Every mint and cast emits `hakodesh.event/v1`. Akashic is SHA-256 linked and HMAC-SHA256 signed. Grimoire is Merkle-sealed with the same chain key. The keystore is `$HAKODESH_HOME/keys` (0700/0600), minted on first seal, never in the wheel.
62
+
63
+ Notifications default to `none`. The package does not write LaunchAgents or editor hooks until you mint and bind an enchantment.
64
+
65
+ ## SDK
66
+
67
+ ```python
68
+ from hakodesh.catalog import catalog
69
+ from hakodesh.mint import mint
70
+ from hakodesh import events, akashic, grimoire
71
+ from hakodesh.enchant import bind, lift
72
+ from hakodesh.ward import unlock
73
+ from hakodesh.combo import seal, cast
74
+ ```
75
+
76
+ ## Empty book law
77
+
78
+ A fresh install has zero user spells, enchantments, wards, or combos. Discovery picks up a file the moment it lands under `HAKODESH_HOME/book/`.
@@ -0,0 +1,52 @@
1
+ # hakodesh
2
+
3
+ Host-agnostic Python CLI and SDK. After `pip install hakodesh` the user book is empty. Your LLM or agents **mint** spells, enchantments, wards, and combos as they need them.
4
+
5
+ PyPI name, import, and command: **hakodesh**. Not snax. Not snx.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install hakodesh
11
+ ```
12
+
13
+ Data home: `HAKODESH_HOME` or the platform user-data directory for `hakodesh`. Never `~/spells`.
14
+
15
+ ## Kernel commands
16
+
17
+ These are the runtime, not starter spells:
18
+
19
+ | Command | What it does |
20
+ |---|---|
21
+ | `hakodesh catalog` | User artifacts in the book (empty at install) |
22
+ | `hakodesh route "<intent>"` | Rank minted names plus kernel commands |
23
+ | `hakodesh invoke <name> [args...]` | Cast a minted spell by name |
24
+ | `hakodesh mint <name> --kind spell\|enchantment\|ward\|combo` | Scaffold into the book (preview; `--confirm` writes) |
25
+ | `hakodesh akashic` | Verify HMAC chain; `--tail N` |
26
+ | `hakodesh grimoire` | Cast ledger stats |
27
+ | `hakodesh grimoire-seal` | RFC 6962 Merkle seal (preview; `--confirm` writes; `--verify`) |
28
+ | `hakodesh enchant bind\|lift <name> --settings <path>` | Bind or lift a minted enchantment |
29
+ | `hakodesh ward status\|lock\|unlock\|check <name>` | Fail-closed ward kernel |
30
+ | `hakodesh combo seal\|cast\|list [name]` | Sealed pipelines of minted spells |
31
+ | `hakodesh <minted-name> [args...]` | Cast after mint |
32
+
33
+ `--like` on an empty book uses the **kind template** in the wheel. After one spell exists, `--like <that>` copies its shape.
34
+
35
+ Every mint and cast emits `hakodesh.event/v1`. Akashic is SHA-256 linked and HMAC-SHA256 signed. Grimoire is Merkle-sealed with the same chain key. The keystore is `$HAKODESH_HOME/keys` (0700/0600), minted on first seal, never in the wheel.
36
+
37
+ Notifications default to `none`. The package does not write LaunchAgents or editor hooks until you mint and bind an enchantment.
38
+
39
+ ## SDK
40
+
41
+ ```python
42
+ from hakodesh.catalog import catalog
43
+ from hakodesh.mint import mint
44
+ from hakodesh import events, akashic, grimoire
45
+ from hakodesh.enchant import bind, lift
46
+ from hakodesh.ward import unlock
47
+ from hakodesh.combo import seal, cast
48
+ ```
49
+
50
+ ## Empty book law
51
+
52
+ A fresh install has zero user spells, enchantments, wards, or combos. Discovery picks up a file the moment it lands under `HAKODESH_HOME/book/`.
@@ -0,0 +1,25 @@
1
+ # Kernel extract
2
+
3
+ Donor tarball: `gdrive:icarus_snx_backup/icarus-snx-spells.tgz`
4
+
5
+ - md5 `76b1e4a2546b524676d458c1fa247d87`
6
+ - bytes `112215291`
7
+ - Canonical members taken from prefix `ICARUSspells/spells/`:
8
+ - `snax/snax/akashic.py`
9
+ - `snax/snax/events.py`
10
+ - `snax/snax/dispatch.py`
11
+ - `snax/snax/discovery.py`
12
+ - `snax/snax/cli.py`
13
+ - `snax/snax/common.py`
14
+ - `snax/snax/spells/mint.py`
15
+ - `snax/snax/spells/enchant.py`
16
+ - `snax/snax/spells/keyrite.py`
17
+ - `snax/snax/spells/grimoire.py`
18
+ - `snax/snax/spells/grimoire_seal.py`
19
+ - `snax/snax/spells/scroll.py`
20
+ - `snax/snax/spells/invoke.py`
21
+ - `contracts/everplay-event-v1.json`
22
+
23
+ Left in the tarball: spell corpus, keystore, host ledgers, worktrees, LaunchAgents.
24
+
25
+ Those engines were rewritten as host-agnostic hakodesh. Event schema is `hakodesh.event/v1` with the same `event_id` hash. A reader may verify harvested `everplay.event/v1` lines.
@@ -0,0 +1,56 @@
1
+ # hakodesh protocol
2
+
3
+ ## Empty-book law
4
+
5
+ Install ships kernel + kind templates only. `HAKODESH_HOME/book/` starts empty. User artifacts appear only via `hakodesh mint … --confirm`.
6
+
7
+ ## Event identity
8
+
9
+ Schema: `hakodesh.event/v1`.
10
+
11
+ ```
12
+ event_id = "evt_" + sha256(actor_id + NUL + idempotency_key).hexdigest()[:32]
13
+ ```
14
+
15
+ Canonical JSON: sorted keys, compact separators, UTF-8. Same hashes as `everplay.event/v1`. Harvested legacy lines may be verified by swapping `schema_version` for the hash check; hakodesh does not emit Everplay actor rosters.
16
+
17
+ Default `notification_policy` is `none`.
18
+
19
+ Mint emits kind `artifact.minted`. Casts emit `spell.cast.started` / `completed` / `failed`.
20
+
21
+ ## Akashic chain
22
+
23
+ `HAKODESH_HOME/akashic/events.jsonl` is append-only.
24
+
25
+ Each sealed line carries:
26
+
27
+ - `chain.prev` / `chain.self` — SHA-256 linkage over `prev + canonical_body`
28
+ - `chain.sig` — HMAC-SHA256 over the same bytes
29
+ - `chain.alg` = `hmac-sha256`
30
+
31
+ The first sealed line's `prev` is `genesis`, or the SHA-256 of any unchained legacy prefix (`legacy_anchor`). `events_head.json` stores length, tail `self`, key fingerprint, seal offset, frozen prefix hash, signed high-water mark, and two head MACs.
32
+
33
+ Key: `$HAKODESH_HOME/keys/akashic-chain-hmac` (dir 0700, file 0600), minted on first seal, never in the wheel.
34
+
35
+ ## Grimoire Merkle seal
36
+
37
+ `HAKODESH_HOME/grimoire.jsonl` is the cast ledger. `grimoire-seal` builds RFC 6962 trees (leaf prefix `0x00`, node prefix `0x01`): per-day batch roots, then a master root over `day + 0x1f + day_root` leaves. Head MAC: `HMAC(grimoire-merkle:{root}:{lines}:{key_fp})` with the Akashic chain key.
38
+
39
+ ## Mint lifecycle
40
+
41
+ 1. Preview (default): show the path and bytes that would land.
42
+ 2. `--confirm`: write only under `HAKODESH_HOME/book/<kind>/`.
43
+ 3. Emit `artifact.minted`.
44
+ 4. Catalog discovers the file immediately.
45
+
46
+ Empty `--like` uses the wheel template for that kind. `--like <existing>` is allowed once that artifact exists.
47
+
48
+ ## Paths
49
+
50
+ All runtime state is under `HAKODESH_HOME` (or platformdirs):
51
+
52
+ - `book/spells|enchantments|wards|combos/`
53
+ - `receipts/`
54
+ - `akashic/`
55
+ - `grimoire.jsonl` / `grimoire_head.json`
56
+ - `keys/`
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hakodesh"
7
+ version = "0.1.0"
8
+ description = "Host-agnostic empty book: mint spells, enchantments, wards, and combos as you need them."
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "LicenseRef-Proprietary"
12
+ license-files = ["LICENSE"]
13
+ authors = [{name = "Shelleyguitar"}]
14
+ keywords = ["cli", "sdk", "spells", "agents", "receipts", "akashic", "grimoire"]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Software Development :: Libraries :: Python Modules",
24
+ ]
25
+ dependencies = ["platformdirs>=4.2,<5"]
26
+
27
+ [project.optional-dependencies]
28
+ dev = ["pytest>=8.0", "build>=1.2", "twine>=5.0"]
29
+
30
+ [project.scripts]
31
+ hakodesh = "hakodesh.cli:main"
32
+
33
+ [project.urls]
34
+ Homepage = "https://pypi.org/project/hakodesh/"
35
+
36
+ [tool.setuptools]
37
+ include-package-data = true
38
+
39
+ [tool.setuptools.packages.find]
40
+ where = ["src"]
41
+
42
+ [tool.setuptools.package-data]
43
+ hakodesh = ["templates/*", "contracts/*.json"]
44
+
45
+ [tool.pytest.ini_options]
46
+ testpaths = ["tests"]
47
+ addopts = "-q"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ """hakodesh — empty book, mint as you go."""
2
+
3
+ from .akashic import inscribe, verify_chain
4
+ from .catalog import catalog as list_catalog
5
+ from .catalog import route
6
+ from .combo import cast as combo_cast
7
+ from .combo import seal as combo_seal
8
+ from .enchant import bind, lift
9
+ from .events import make_event, validate_event
10
+ from .grimoire import seal as grimoire_seal
11
+ from .ward import unlock
12
+
13
+ __version__ = "0.1.0"
14
+ __all__ = [
15
+ "list_catalog",
16
+ "route",
17
+ "make_event",
18
+ "validate_event",
19
+ "inscribe",
20
+ "verify_chain",
21
+ "grimoire_seal",
22
+ "bind",
23
+ "lift",
24
+ "unlock",
25
+ "combo_seal",
26
+ "combo_cast",
27
+ ]
@@ -0,0 +1,4 @@
1
+ from hakodesh.cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())