astp-docs-server 0.1.0__py3-none-any.whl
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.
- astp_docs_server/__init__.py +12 -0
- astp_docs_server/__main__.py +8 -0
- astp_docs_server/atlas_manifest.py +108 -0
- astp_docs_server/corpus/open/CHANGELOG.md +568 -0
- astp_docs_server/corpus/open/CONFORMANCE-BFM.md +430 -0
- astp_docs_server/corpus/open/CONFORMANCE-CONTEXT.md +332 -0
- astp_docs_server/corpus/open/CONFORMANCE-CROSS-EPISODE-LINKING.md +258 -0
- astp_docs_server/corpus/open/CONFORMANCE-LAYER3.md +272 -0
- astp_docs_server/corpus/open/CONFORMANCE-REPRODUCIBILITY.md +219 -0
- astp_docs_server/corpus/open/CONFORMANCE-TRUST.md +639 -0
- astp_docs_server/corpus/open/GLOSSARY.md +661 -0
- astp_docs_server/corpus/open/GOVERNANCE.md +43 -0
- astp_docs_server/corpus/open/IMPLEMENTATION-CONTEXT.md +121 -0
- astp_docs_server/corpus/open/IMPLEMENTATION-PHASE3.md +732 -0
- astp_docs_server/corpus/open/LICENSE.txt +202 -0
- astp_docs_server/corpus/open/NOTICE +60 -0
- astp_docs_server/corpus/open/PATENTS.md +325 -0
- astp_docs_server/corpus/open/PROTOCOL-CONFORMANCE.md +470 -0
- astp_docs_server/corpus/open/RATIFICATION-5.0.0.md +56 -0
- astp_docs_server/corpus/open/RATIFICATION-6.0.0.md +71 -0
- astp_docs_server/corpus/open/RATIFICATION-PATENTS-1.0.0.md +116 -0
- astp_docs_server/corpus/open/RATIFICATION-PROTOCOL-CONFORMANCE-1.0.0.md +145 -0
- astp_docs_server/corpus/open/RATIFICATION-SPEC-6.0.2.md +136 -0
- astp_docs_server/corpus/open/README.md +230 -0
- astp_docs_server/corpus/open/SPEC.md +3220 -0
- astp_docs_server/corpus/open/VERSIONING.md +105 -0
- astp_docs_server/corpus/open/vectors/5.0.0/seal-constructions.json +402 -0
- astp_docs_server/corpus/open/vectors/6.0.0/context-commitment.json +353 -0
- astp_docs_server/corpus/open/vendor_manifest.json +31 -0
- astp_docs_server/mcp_server.py +145 -0
- astp_docs_server/open_corpus.py +235 -0
- astp_docs_server/vendor_manifest.py +124 -0
- astp_docs_server/web/__init__.py +7 -0
- astp_docs_server/web/__main__.py +5 -0
- astp_docs_server/web/answerer.py +307 -0
- astp_docs_server/web/app.py +151 -0
- astp_docs_server-0.1.0.dist-info/METADATA +107 -0
- astp_docs_server-0.1.0.dist-info/RECORD +42 -0
- astp_docs_server-0.1.0.dist-info/WHEEL +4 -0
- astp_docs_server-0.1.0.dist-info/entry_points.txt +3 -0
- astp_docs_server-0.1.0.dist-info/licenses/LICENSE.txt +202 -0
- astp_docs_server-0.1.0.dist-info/licenses/NOTICE +72 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Open documentation server for ASTP — MCP + web-chat heads over the open corpus.
|
|
2
|
+
|
|
3
|
+
Two transports on one substrate: the FastMCP server (`mcp_server`) for adopters'
|
|
4
|
+
coding agents, and the web-chat head (`web/`) for the docs site. Both consume the
|
|
5
|
+
shared `astp_docs` core + `astp_docs.toolkit` and cite identical chunks. Serves
|
|
6
|
+
ONLY the open protocol corpus.
|
|
7
|
+
|
|
8
|
+
The package `__init__` stays import-light on purpose: it does NOT import the MCP
|
|
9
|
+
transport, so the web head runs without the `mcp` dependency installed. Import the
|
|
10
|
+
server explicitly where needed: `from astp_docs_server.mcp_server import run`.
|
|
11
|
+
"""
|
|
12
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""Atlas service manifest for the ASTP Open Docs MCP Server.
|
|
2
|
+
|
|
3
|
+
Registers the server's read-only capabilities with Atlas so agents can discover
|
|
4
|
+
it. All tools are ``read`` (a docs server writes nothing). No API keys.
|
|
5
|
+
|
|
6
|
+
from astp_docs_server.atlas_manifest import get_astp_docs_open_manifest
|
|
7
|
+
await atlas.register_service(get_astp_docs_open_manifest())
|
|
8
|
+
"""
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from typing import Any
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _read_cap(cap_id: str, tool_name: str, name: str, desc: str, schema: dict) -> dict:
|
|
15
|
+
return {
|
|
16
|
+
"id": cap_id,
|
|
17
|
+
"name": name,
|
|
18
|
+
"tool_name": tool_name,
|
|
19
|
+
"capability_type": "read",
|
|
20
|
+
"description": desc,
|
|
21
|
+
"schema": schema,
|
|
22
|
+
"required_permissions": ["astp.docs.read"],
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def get_astp_docs_open_manifest() -> dict[str, Any]:
|
|
27
|
+
return {
|
|
28
|
+
"service_id": "astp-docs-open",
|
|
29
|
+
"name": "ASTP Open Docs MCP Server",
|
|
30
|
+
"version": "0.1.0",
|
|
31
|
+
"description": (
|
|
32
|
+
"Serves the OPEN ASTP protocol corpus (SPEC, "
|
|
33
|
+
"IMPLEMENTATION/CONFORMANCE companions, GLOSSARY, CHANGELOG) with "
|
|
34
|
+
"exact lookup of governance rules, conformance vectors, and sections "
|
|
35
|
+
"plus lexical search. Read-only; no proprietary content."
|
|
36
|
+
),
|
|
37
|
+
"mcp_endpoint": "stdio://astp-docs-open",
|
|
38
|
+
"health_endpoint": None,
|
|
39
|
+
"docs_url": "https://github.com/scorched-earth-labs/astp-docs",
|
|
40
|
+
"contact": {"team": "ASTP Protocol", "email": "protocol@scorchedearthlabs.com"},
|
|
41
|
+
"metadata": {
|
|
42
|
+
"category": "documentation",
|
|
43
|
+
"corpus_visibility": "open",
|
|
44
|
+
"requires_api_keys": [],
|
|
45
|
+
"cost_model": "free",
|
|
46
|
+
},
|
|
47
|
+
"capabilities": [
|
|
48
|
+
_read_cap(
|
|
49
|
+
"astp.docs.search_spec", "search_spec", "Search Spec",
|
|
50
|
+
"Search the protocol corpus for relevant passages (lexical; semantic in a later release).",
|
|
51
|
+
{
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"query": {"type": "string", "description": "What to find"},
|
|
55
|
+
"k": {"type": "integer", "default": 5, "minimum": 1, "maximum": 20},
|
|
56
|
+
},
|
|
57
|
+
"required": ["query"],
|
|
58
|
+
},
|
|
59
|
+
),
|
|
60
|
+
_read_cap(
|
|
61
|
+
"astp.docs.get_governance_rule", "get_governance_rule", "Get Governance Rule",
|
|
62
|
+
"Fetch a governance rule G-1..G-43 verbatim with citation.",
|
|
63
|
+
{
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {"rule_id": {"type": "string", "description": "e.g. G-2"}},
|
|
66
|
+
"required": ["rule_id"],
|
|
67
|
+
},
|
|
68
|
+
),
|
|
69
|
+
_read_cap(
|
|
70
|
+
"astp.docs.get_conformance_vectors", "get_conformance_vectors", "Get Conformance Vectors",
|
|
71
|
+
"Fetch a conformance vector by id (WF-004) or a family by prefix (WF).",
|
|
72
|
+
{
|
|
73
|
+
"type": "object",
|
|
74
|
+
"properties": {"id_or_family": {"type": "string", "description": "e.g. WF-004 or WF"}},
|
|
75
|
+
"required": ["id_or_family"],
|
|
76
|
+
},
|
|
77
|
+
),
|
|
78
|
+
_read_cap(
|
|
79
|
+
"astp.docs.get_section", "get_section", "Get Section",
|
|
80
|
+
"Fetch a numbered spec section verbatim.",
|
|
81
|
+
{
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"section_id": {"type": "string", "description": "e.g. 5.2"},
|
|
85
|
+
"doc": {"type": "string", "description": "Optional doc id, e.g. SPEC"},
|
|
86
|
+
},
|
|
87
|
+
"required": ["section_id"],
|
|
88
|
+
},
|
|
89
|
+
),
|
|
90
|
+
_read_cap(
|
|
91
|
+
"astp.docs.get_hash_preimage", "get_hash_preimage", "Get Hash Preimage",
|
|
92
|
+
"Find how a type's content hash is built (fields + order).",
|
|
93
|
+
{
|
|
94
|
+
"type": "object",
|
|
95
|
+
"properties": {
|
|
96
|
+
"type_name": {"type": "string", "description": "e.g. WorkflowDeclaration"},
|
|
97
|
+
"k": {"type": "integer", "default": 5, "minimum": 1, "maximum": 20},
|
|
98
|
+
},
|
|
99
|
+
"required": ["type_name"],
|
|
100
|
+
},
|
|
101
|
+
),
|
|
102
|
+
_read_cap(
|
|
103
|
+
"astp.docs.corpus_info", "corpus_info", "Corpus Info",
|
|
104
|
+
"Report served doc count, governance rules, and conformance families.",
|
|
105
|
+
{"type": "object", "properties": {}},
|
|
106
|
+
),
|
|
107
|
+
],
|
|
108
|
+
}
|