Skip to content

Commit 71cb647

Browse files
committed
Version to 1.15.2. Various logging bumps. Add tool_metrics hook. Agent sdk docs.
1 parent 55072bb commit 71cb647

File tree

18 files changed

+3510
-44
lines changed

18 files changed

+3510
-44
lines changed

.hooks/generate_docs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,16 @@ def convert_span(self, el: t.Any, text: str, parent_tags: t.Any) -> t.Any: # no
2727
def convert_div(self, el: t.Any, text: str, parent_tags: t.Any) -> t.Any:
2828
if "doc-md-description" in el.get("class", []):
2929
return text.strip()
30+
3031
return super().convert_div(el, text, parent_tags)
3132

33+
# Replace any header tags inside docstrings with bolded text
34+
def convert_hN(self, n: int, el: t.Any, text: str, parent_tags: t.Any) -> t.Any: # noqa: N802
35+
if "doc-contents" in el.parent.get("class", []):
36+
return f"**{text.strip()}**"
37+
38+
return super().convert_hN(n, el, text, parent_tags)
39+
3240
# Map mkdocstrings details classes to Mintlify callouts
3341
def convert_details(self, el: t.Any, text: str, parent_tags: t.Any) -> t.Any: # noqa: ARG002
3442
classes = el.get("class", [])
@@ -120,6 +128,10 @@ def generate_docs_for_module(
120128
module_data = self.handler.collect(module_path, options)
121129
html = self.handler.render(module_data, options)
122130

131+
if "When to Use This Tool" in html:
132+
with open("debug.html", "w", encoding="utf-8") as f:
133+
f.write(html)
134+
123135
return str(
124136
CustomMarkdownConverter(
125137
code_language="python",

docs/docs.json

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
"groups": [
1818
{
1919
"group": "Getting Started",
20-
"pages": ["intro", "install", "config"]
20+
"pages": [
21+
"intro",
22+
"install",
23+
"config"
24+
]
2125
},
2226
{
2327
"group": "Example Agents",
@@ -88,37 +92,46 @@
8892
},
8993
{
9094
"group": "Migrations",
91-
"pages": ["migrations/v1"]
95+
"pages": [
96+
"migrations/v1"
97+
]
9298
},
9399
{
94100
"group": "SDK",
95101
"pages": [
96102
{
97103
"group": "Core",
98104
"pages": [
99-
"strikes/sdk/main",
100-
"strikes/sdk/task",
101-
"strikes/sdk/api"
105+
"sdk/main",
106+
"sdk/task",
107+
"sdk/api"
108+
]
109+
},
110+
{
111+
"group": "Agents",
112+
"pages": [
113+
"sdk/agent",
114+
"sdk/agent_tools"
102115
]
103116
},
104117
{
105118
"group": "Data and Processing",
106119
"pages": [
107-
"strikes/sdk/data_types",
108-
"strikes/sdk/serialization",
109-
"strikes/sdk/artifact",
110-
"strikes/sdk/transforms",
111-
"strikes/sdk/optimization"
120+
"sdk/data_types",
121+
"sdk/serialization",
122+
"sdk/artifact",
123+
"sdk/transforms",
124+
"sdk/optimization"
112125
]
113126
},
114127
{
115128
"group": "Evaluation and Integrations",
116129
"pages": [
117-
"strikes/sdk/eval",
118-
"strikes/sdk/metrics",
119-
"strikes/sdk/scorers",
120-
"strikes/sdk/integrations",
121-
"strikes/sdk/airt"
130+
"sdk/eval",
131+
"sdk/metrics",
132+
"sdk/scorers",
133+
"sdk/integrations",
134+
"sdk/airt"
122135
]
123136
}
124137
]
@@ -153,4 +166,4 @@
153166
"linkedin": "https://linkedin.com/company/dreadnode"
154167
}
155168
}
156-
}
169+
}

0 commit comments

Comments
 (0)