Skip to content

Commit f3c6fde

Browse files
Making language spec default page vary based on type of documentation
1 parent 4381ca7 commit f3c6fde

File tree

3 files changed

+41
-13
lines changed

3 files changed

+41
-13
lines changed

docs/pyagentspec/source/_components/all_components.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,5 +275,15 @@
275275
{"path": "pyagentspec.a2aagent.A2AConnectionConfig"},
276276
{"path": "pyagentspec.a2aagent.A2ASessionParameters"}
277277
]
278+
},
279+
{
280+
"name": "Adapters",
281+
"path": "adapters",
282+
"classes": [
283+
{"path": "pyagentspec.adapters.autogen.AgentSpecExporter"},
284+
{"path": "pyagentspec.adapters.autogen.AgentSpecLoader"},
285+
{"path": "pyagentspec.adapters.langgraph.AgentSpecExporter"},
286+
{"path": "pyagentspec.adapters.langgraph.AgentSpecLoader"}
287+
]
278288
}
279289
]

docs/pyagentspec/source/agentspec/index.rst

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,23 @@ or create them from object representations with the assurance of conformance to
1919

2020
You can download the Agent Spec technical report at the following :download:`link <../_static/agentspec_technical_report.pdf>`.
2121

22-
You can also find the nightly version of the Agent Spec language specification
23-
with all the latest updates at :ref:`this link<agentspecspec_nightly>`.
22+
.. only:: stable
2423

25-
.. toctree::
26-
:maxdepth: 2
24+
.. toctree::
25+
:maxdepth: 2
2726

28-
Introduction, motivation & vision <intro_and_motivation>
29-
Language specification (v25.4.1) <language_spec_25_4_1>
30-
Positioning in the agentic ecosystem <positioning>
31-
Tracing <tracing>
27+
Introduction, motivation & vision <intro_and_motivation>
28+
Language specification (v25.4.1) <language_spec_25_4_1>
29+
Positioning in the agentic ecosystem <positioning>
30+
Tracing <tracing>
31+
32+
.. only:: dev
33+
34+
.. toctree::
35+
:maxdepth: 2
36+
37+
Introduction, motivation & vision <intro_and_motivation>
38+
Language specification (v25.4.1) <language_spec_25_4_1>
39+
Language specification (under development) <language_spec_nightly>
40+
Positioning in the agentic ecosystem <positioning>
41+
Tracing <tracing>

docs/pyagentspec/source/conf.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
with open(Path(__file__).parents[3] / "VERSION", "r") as f:
3838
version_file = f.read().strip()
3939

40-
# The IDE complains, but the tags set exists
41-
# We add stable as current version, we might add the version switch in the future
42-
tags.add("stable") # type: ignore
43-
4440
# The full version, including alpha/beta/rc tags.
4541
release = pyagentspec.__version__
4642

@@ -57,6 +53,13 @@
5753
else:
5854
docs_version = stable_release
5955

56+
# The IDE complains, but the tags set exists
57+
# We add stable as current version, we might add the version switch in the future
58+
if docs_version == "dev":
59+
tags.add("dev") # type: ignore
60+
else:
61+
tags.add("stable") # type: ignore
62+
6063
# -- General configuration ---------------------------------------------------
6164

6265
# Add any Sphinx extension module names here, as strings. They can be
@@ -79,6 +82,11 @@
7982
"sphinx_design",
8083
]
8184

85+
if docs_version == "dev":
86+
language_spec_file = "language_spec_nightly"
87+
else:
88+
language_spec_file = f"language_spec_{docs_version.replace('.', '_')}"
89+
8290
# Set the variables that should be replaced in the substitution-extensions directives
8391
rst_prolog = f"""
8492
.. |release| replace:: {release}
@@ -128,7 +136,7 @@
128136
autodoc_typehints = "description"
129137

130138
# Redirects
131-
rediraffe_redirects = {"agentspec/language_spec.rst": "agentspec/language_spec_25_4_1.rst"}
139+
rediraffe_redirects = {"agentspec/language_spec.rst": f"agentspec/{language_spec_file}.rst"}
132140

133141

134142
# -- Options for HTML output -------------------------------------------------

0 commit comments

Comments
 (0)