Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 19:45 UTC
fix(docs): stabilize SDK reference auto PR checks
jkomyno committed
Jun 18, 2026 at 16:13 UTC
0720b760e2a8f3c6db825bc31e54655df551671b
4 files changed
+15
-12
.github/workflows/claude-code-doc-review.yml
+1
-2
@@ -36,7 +36,7 @@ jobs:
36
with:
37
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
38
track_progress: true # Forces tag mode with tracking comments
39
- allowed_bots: "devin-ai-integration[bot],decimal-pr-bot[bot],github-actions[bot],dependabot[bot],zen-agent"
39
+ allowed_bots: "devin-ai-integration[bot],decimal-pr-bot[bot],github-actions[bot],dependabot[bot],zen-agent,sdkrelease,sdkrelease[bot]"
40
41
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
42
# model: "claude-opus-4-20250514"
@@ -72,4 +72,3 @@ jobs:
72
# if: |
73
# !contains(github.event.pull_request.title, '[skip-review]') &&
74
# !contains(github.event.pull_request.title, '[WIP]')
75
-
.github/workflows/generate-sdk-docs.yml
+2
@@ -5,7 +5,9 @@ on:
5
branches: [next]
6
paths:
7
- 'ts/packages/core/src/**'
8
+ - 'ts/packages/core/scripts/generate-docs.ts'
9
- 'python/composio/**'
10
+ - 'python/scripts/generate-docs.py'
11
- '.github/actions/setup-node-pnpm-bun/action.yml'
12
- '.github/actions/setup-python-uv/action.yml'
13
- '.github/workflows/generate-sdk-docs.yml'
python/scripts/generate-docs.py
+4
-6
@@ -79,9 +79,7 @@ def to_kebab_case(name: str) -> str:
79
80
def escape_yaml_string(s: str) -> str:
81
"""Escape a string for YAML frontmatter."""
82
- if any(c in s for c in [":", '"', "'", "\n", "#", "{", "}"]):
83
- return f'"{s.replace(chr(34), chr(92) + chr(34))}"'
84
- return s
82
+ return json.dumps(s)
83
84
85
def get_source_link(obj: griffe.Object) -> str | None:
@@ -266,7 +264,7 @@ def generate_class_mdx(
264
desc = desc[:147] + "..."
265
266
lines.append("---")
269
- lines.append(f"title: {info['name']}")
267
+ lines.append(f"title: {escape_yaml_string(info['name'])}")
268
lines.append(f"description: {escape_yaml_string(desc)}")
269
lines.append("---")
270
lines.append("")
@@ -432,8 +430,8 @@ def generate_index_mdx(classes: list[dict], decorators: list[dict]) -> str:
430
dec_section = "\n".join(dec_lines)
431
432
return f"""---
435
-title: Python SDK Reference
436
-description: API reference for the Composio Python SDK
433
+title: {escape_yaml_string("Python SDK Reference")}
434
+description: {escape_yaml_string("API reference for the Composio Python SDK")}
435
---
436
437
# Python SDK Reference
ts/packages/core/scripts/generate-docs.ts
+8
-4
@@ -243,6 +243,10 @@ function extractTag(comment: TypeDocReflection['comment'] | undefined, tagName:
243
return comment.blockTags.filter(t => t.tag === tagName).map(t => extractText(t.content));
244
}
245
246
+function formatYamlFrontmatterString(value: string): string {
247
+ return JSON.stringify(value);
248
+}
249
+
250
function formatType(type?: TypeDocType, depth = 0): string {
251
if (!type) return 'unknown';
252
if (depth > 5) return '...'; // Prevent infinite recursion
@@ -524,8 +528,8 @@ function generateClassMdx(classDoc: ClassDoc): string {
528
529
// Frontmatter - fumadocs renders title and description automatically
530
lines.push('---');
527
- lines.push(`title: ${classDoc.name}`);
528
- lines.push(`description: ${fullDescription}`);
531
+ lines.push(`title: ${formatYamlFrontmatterString(classDoc.name)}`);
532
+ lines.push(`description: ${formatYamlFrontmatterString(fullDescription)}`);
533
lines.push('---');
534
lines.push('');
535
@@ -807,8 +811,8 @@ async function main() {
811
.join('\n');
812
813
const indexContent = `---
810
-title: TypeScript SDK Reference
811
-description: Complete API reference for the Composio TypeScript SDK (@composio/core).
814
+title: ${formatYamlFrontmatterString('TypeScript SDK Reference')}
815
+description: ${formatYamlFrontmatterString('Complete API reference for the Composio TypeScript SDK (@composio/core).')}
816
---
817
818
## Installation