aifeed 1.0.0a1__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.
aifeed-1.0.0a1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AIFeed Protocol Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,90 @@
1
+ Metadata-Version: 2.4
2
+ Name: aifeed
3
+ Version: 1.0.0a1
4
+ Summary: Independent Python verifier for AIFeed signed declarations: manifests, AIFeed Markdown, MAKO, revocation, bundles, and delta indexes
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://aifeed.md
7
+ Project-URL: Repository, https://github.com/denyn1/aifeed-protocol
8
+ Project-URL: Specification, https://github.com/denyn1/aifeed-protocol/blob/main/spec/en/aifeed-v0.2.md
9
+ Project-URL: Changelog, https://github.com/denyn1/aifeed-protocol/blob/main/CHANGELOG.md
10
+ Keywords: aifeed,ai,verification,ed25519,markdown,mako,content-permissions
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Topic :: Internet :: WWW/HTTP
17
+ Classifier: Topic :: Security :: Cryptography
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
22
+
23
+ # aifeed (Python)
24
+
25
+ Independent Python verifier for the [AIFeed protocol](https://aifeed.md): signed content
26
+ permissions for the AI web. Standard library only — no third-party dependencies.
27
+
28
+ ```bash
29
+ pip install aifeed
30
+ ```
31
+
32
+ ## Verify a directory or manifest
33
+
34
+ ```python
35
+ from aifeed import verify
36
+
37
+ report = verify.verify_directory('./my-site', domain='example.com')
38
+ print(report['result'], report['errors'])
39
+ ```
40
+
41
+ ```python
42
+ from aifeed import verify
43
+
44
+ with open('ai.json', encoding='utf-8') as handle:
45
+ manifest = handle.read()
46
+ with open('ai-signature.json', encoding='utf-8') as handle:
47
+ signature = handle.read()
48
+ report = verify.verify(manifest, signature, domain='example.com')
49
+ ```
50
+
51
+ ## Revocations, bundles, digests
52
+
53
+ ```python
54
+ from aifeed import verify
55
+
56
+ verify.verify_revocation_document(text, domain='example.com', governance_keys=keys)
57
+ verify.verify_bundle('./my-bundle') # offline audit bundle
58
+ verify.parse_strict(text) # strict JSON (no floats/dupes, NFC)
59
+ verify.verify_content_digest(header, body_bytes) # Content-Digest (RFC 9530)
60
+ ```
61
+
62
+ ## AIFeed Markdown / MAKO documents
63
+
64
+ ```python
65
+ from aifeed import mako
66
+
67
+ parsed = mako.parse_frontmatter(page_bytes)
68
+ fields = mako.validate_aimd_fields(parsed['frontmatter']) # or validate_mako_fields
69
+ result = mako.verify_mako_container(container_text, page_url, body_bytes, public_key_value)
70
+ index = mako.verify_aimd_index(index_text, index_url, public_key_value)
71
+ ```
72
+
73
+ ## Command line
74
+
75
+ ```bash
76
+ aifeed-verify ./my-site --json # directory verification
77
+ aifeed-verify ai.json --domain example.com --json # single manifest + signature
78
+ aifeed-verify revocation ./revocation.json --json # multi-signature registry
79
+ aifeed-verify bundle ./my-bundle --json # offline bundle
80
+ aifeed-mako page.aifeed.md # frontmatter/container verification
81
+ ```
82
+
83
+ The historical paths still work: `import aifeed_verify` / `import aifeed_mako` and
84
+ `python clients/python/aifeed_verify.py` are aliases for `aifeed.verify` / `aifeed.mako`.
85
+
86
+ ## Source
87
+
88
+ Part of [aifeed-protocol](https://github.com/denyn1/aifeed-protocol) (`clients/python/`),
89
+ differential-tested against the shared conformance vectors alongside the JavaScript
90
+ implementation. Specs: `spec/en/`; agent guide: `docs/agent-quickstart.md`.
@@ -0,0 +1,68 @@
1
+ # aifeed (Python)
2
+
3
+ Independent Python verifier for the [AIFeed protocol](https://aifeed.md): signed content
4
+ permissions for the AI web. Standard library only — no third-party dependencies.
5
+
6
+ ```bash
7
+ pip install aifeed
8
+ ```
9
+
10
+ ## Verify a directory or manifest
11
+
12
+ ```python
13
+ from aifeed import verify
14
+
15
+ report = verify.verify_directory('./my-site', domain='example.com')
16
+ print(report['result'], report['errors'])
17
+ ```
18
+
19
+ ```python
20
+ from aifeed import verify
21
+
22
+ with open('ai.json', encoding='utf-8') as handle:
23
+ manifest = handle.read()
24
+ with open('ai-signature.json', encoding='utf-8') as handle:
25
+ signature = handle.read()
26
+ report = verify.verify(manifest, signature, domain='example.com')
27
+ ```
28
+
29
+ ## Revocations, bundles, digests
30
+
31
+ ```python
32
+ from aifeed import verify
33
+
34
+ verify.verify_revocation_document(text, domain='example.com', governance_keys=keys)
35
+ verify.verify_bundle('./my-bundle') # offline audit bundle
36
+ verify.parse_strict(text) # strict JSON (no floats/dupes, NFC)
37
+ verify.verify_content_digest(header, body_bytes) # Content-Digest (RFC 9530)
38
+ ```
39
+
40
+ ## AIFeed Markdown / MAKO documents
41
+
42
+ ```python
43
+ from aifeed import mako
44
+
45
+ parsed = mako.parse_frontmatter(page_bytes)
46
+ fields = mako.validate_aimd_fields(parsed['frontmatter']) # or validate_mako_fields
47
+ result = mako.verify_mako_container(container_text, page_url, body_bytes, public_key_value)
48
+ index = mako.verify_aimd_index(index_text, index_url, public_key_value)
49
+ ```
50
+
51
+ ## Command line
52
+
53
+ ```bash
54
+ aifeed-verify ./my-site --json # directory verification
55
+ aifeed-verify ai.json --domain example.com --json # single manifest + signature
56
+ aifeed-verify revocation ./revocation.json --json # multi-signature registry
57
+ aifeed-verify bundle ./my-bundle --json # offline bundle
58
+ aifeed-mako page.aifeed.md # frontmatter/container verification
59
+ ```
60
+
61
+ The historical paths still work: `import aifeed_verify` / `import aifeed_mako` and
62
+ `python clients/python/aifeed_verify.py` are aliases for `aifeed.verify` / `aifeed.mako`.
63
+
64
+ ## Source
65
+
66
+ Part of [aifeed-protocol](https://github.com/denyn1/aifeed-protocol) (`clients/python/`),
67
+ differential-tested against the shared conformance vectors alongside the JavaScript
68
+ implementation. Specs: `spec/en/`; agent guide: `docs/agent-quickstart.md`.
@@ -0,0 +1,13 @@
1
+ """AIFeed protocol verifier (independent Python implementation).
2
+
3
+ Modules:
4
+ ``aifeed.verify`` — manifests, JCS, Ed25519, revocation, bundles, Content-Digest
5
+ ``aifeed.mako`` — MAKO / AIFeed Markdown frontmatter, containers, and indices
6
+
7
+ Standard library only; no third-party dependencies.
8
+ """
9
+
10
+ from . import mako, verify # noqa: F401
11
+
12
+ __all__ = ['mako', 'verify', '__version__']
13
+ __version__ = '1.0.0a1'