@devries-cameron20 / composio Mirror · read-only / commits / 504ad887c
Fork 0

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 22, 18:15 UTC

add more stuff

sjd9021 committed Dec 9, 2025 at 22:28 UTC 504ad887c0f3f7ea88e3555926749942cb67b521
1 file changed +94
fern/pages/src/changelog/12-09-25.md
+94
@@ -99,3 +99,97 @@ For the exact field mapping per toolkit, open `platform.composio.dev` → Toolki
99 - Breaking change for consumers on the `latest` version who post-process the old nested `response_data` shape: outputs are now flattened and explicitly typed.
100 - New and modified fields include richer descriptions and examples; some legacy placeholders were removed.
101 - Re-fetch schemas for your tool/version to see the typed definitions. Use the toolkit view in `platform.composio.dev` for authoritative field details.
102 +
103 +## Schema Diff Snippets
104 +Quick scripts to compare input/output schema changes between tool versions. Fill in `TOOL_SLUG`, `VERSION_OLD`, `VERSION_NEW`, and `API_KEY`, then run locally to see unified diffs.
105 +
106 +**Python:**
107 +```python
108 +import json, requests
109 +from difflib import unified_diff
110 +
111 +TOOL_SLUG = "" # required
112 +VERSION_OLD = "YYYYMMDD_NN"
113 +VERSION_NEW = "YYYYMMDD_NN"
114 +API_KEY = "your-api-key"
115 +
116 +def fetch(version):
117 + r = requests.get(
118 + f"https://backend.composio.dev/api/v3/tools/{TOOL_SLUG}",
119 + params={"version": version},
120 + headers={"x-api-key": API_KEY},
121 + )
122 + r.raise_for_status()
123 + return r.json()
124 +
125 +old, new = fetch(VERSION_OLD), fetch(VERSION_NEW)
126 +for label, a, b in [
127 + ("INPUT", old.get("input_parameters", {}), new.get("input_parameters", {})),
128 + ("OUTPUT", old.get("output_parameters", {}), new.get("output_parameters", {})),
129 +]:
130 + print(f"\n{label} DIFF\n" + "=" * 20)
131 + diff = unified_diff(
132 + json.dumps(a, indent=2, sort_keys=True).splitlines(),
133 + json.dumps(b, indent=2, sort_keys=True).splitlines(),
134 + lineterm="",
135 + )
136 + print("\n".join(diff) or "No changes")
137 +```
138 +
139 +**TypeScript:**
140 +```typescript
141 +import { diffLines } from "diff";
142 +
143 +const TOOL_SLUG = ""; // required
144 +const VERSION_OLD = "YYYYMMDD_NN";
145 +const VERSION_NEW = "YYYYMMDD_NN";
146 +const API_KEY = "your-api-key";
147 +
148 +async function fetchTool(version: string) {
149 + const res = await fetch(
150 + `https://backend.composio.dev/api/v3/tools/${TOOL_SLUG}?version=${version}`,
151 + { headers: { "x-api-key": API_KEY } }
152 + );
153 + if (!res.ok) throw new Error(await res.text());
154 + return res.json();
155 +}
156 +
157 +function printDiff(label: string, oldText: string, newText: string) {
158 + const diff = diffLines(oldText, newText);
159 + console.log(`\n${label} DIFF\n${"=".repeat(20)}`);
160 + if (diff.length === 1 && !diff[0].added && !diff[0].removed) {
161 + console.log("No changes");
162 + return;
163 + }
164 + diff.forEach((part) =>
165 + part.value
166 + .split("\n")
167 + .filter(Boolean)
168 + .forEach((line) =>
169 + console.log(part.added ? `+ ${line}` : part.removed ? `- ${line}` : ` ${line}`)
170 + )
171 + );
172 +}
173 +
174 +async function main() {
175 + const [oldTool, newTool] = await Promise.all([
176 + fetchTool(VERSION_OLD),
177 + fetchTool(VERSION_NEW),
178 + ]);
179 + printDiff(
180 + "INPUT",
181 + JSON.stringify(oldTool.input_parameters || {}, null, 2),
182 + JSON.stringify(newTool.input_parameters || {}, null, 2)
183 + );
184 + printDiff(
185 + "OUTPUT",
186 + JSON.stringify(oldTool.output_parameters || {}, null, 2),
187 + JSON.stringify(newTool.output_parameters || {}, null, 2)
188 + );
189 +}
190 +
191 +main().catch((e) => {
192 + console.error(e.message);
193 + process.exit(1);
194 +});
195 +```