Skip to content

Commit 3629b84

Browse files
authored
changelog 2025-10-24 (#540)
1 parent 59b240c commit 3629b84

File tree

3 files changed

+96
-3
lines changed

3 files changed

+96
-3
lines changed

agents/changelog/agents/changelog.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { WrappedAgent } from "../classes/wrapped-agent";
22
import type { Config } from "../classes/config";
33
import type { Logger } from "../classes/logger";
4+
import { appendChangelogEntryTool } from "../tools/append-changelog-entry";
45
import { getNewCommitsTool } from "../tools/get-new-commits-and-prs";
56
import { readFileTool } from "../tools/read-file";
6-
import { writeFileTool } from "../tools/write-file";
77

88
export class ChangelogAgent extends WrappedAgent {
99
constructor(config: Config, logger: Logger) {
@@ -28,7 +28,7 @@ There are 4 possible types of changes, which each have an emoji associated with
2828
The steps to follow are:
2929
1. Load the changelog file and note the date of the most recent entry.
3030
2. Load all new commits since the most recent entry in the changelog file from the provided Github repositories.
31-
3. Append the changes to the changelog file. Do not alter the older entries in the changelog - ONLY APPEND NEW ENTRIES. Do not ask the user for confirmation. The changelog should be in the same format as the changelog file. Do not include any other text in the changelog file. Do not combine multiple changes into a single entry.
31+
3. Append the changes to the changelog file. Do not alter the older entries in the changelog - ONLY APPEND NEW ENTRIES. Do not ask the user for confirmation. The changelog should be in the same format as the changelog file. Do not include any other text in the changelog file. Do not combine multiple changes into a single entry EXCEPT when there are changes in the docs repo that relate to another repo - those should be combined into a single entry for the non-docs repo.
3232
3333
When updating the changelog, follow these rules:
3434
- The date to use for the changelog is always the most recent Friday.
@@ -40,7 +40,7 @@ When updating the changelog, follow these rules:
4040

4141
const tools = [
4242
readFileTool(config, logger),
43-
writeFileTool(config, logger),
43+
appendChangelogEntryTool(config, logger),
4444
getNewCommitsTool(config, logger),
4545
];
4646

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import { tool } from '@openai/agents';
2+
import * as fs from 'fs';
3+
import path from 'path';
4+
import { z } from 'zod';
5+
6+
import type { Config } from '../classes/config';
7+
import type { Logger } from '../classes/logger';
8+
import { ToolUtils } from '../utils/tool-utils';
9+
10+
const name = 'append_changelog_entry';
11+
const description = 'Append a changelog entry to a file with a date and body text';
12+
const parametersSchema = z.object({
13+
path: z.string().describe('The path to the changelog file'),
14+
date: z.string().describe('The date for the changelog entry (e.g., YYYY-MM-DD)'),
15+
body: z.string().describe('The body text of the changelog entry'),
16+
});
17+
18+
export const appendChangelogEntryTool = (config: Config, logger: Logger) =>
19+
tool({
20+
name,
21+
description,
22+
parameters: parametersSchema,
23+
execute: ToolUtils.wrappedExecute(name, execute, config, logger),
24+
});
25+
26+
export async function execute(
27+
parameters: z.infer<typeof parametersSchema>,
28+
config: Config
29+
) {
30+
try {
31+
// Resolve the target path relative to the configured directory
32+
const targetPath = path.resolve(parameters.path);
33+
const configDir = path.resolve(config.directory);
34+
35+
// Check if the target path is outside the configured directory
36+
if (!targetPath.startsWith(configDir)) {
37+
return `Error appending changelog entry: Cannot write outside configured directory ${configDir}`;
38+
}
39+
40+
// Check if the file exists
41+
if (!fs.existsSync(targetPath)) {
42+
return `Error appending changelog entry: File does not exist: ${parameters.path}`;
43+
}
44+
45+
// Read the current file content
46+
const currentContent = fs.readFileSync(targetPath, 'utf-8');
47+
48+
// Format the changelog entry
49+
const entry = `## ${parameters.date}\n\n${parameters.body}\n\n`;
50+
51+
// Find the first occurrence of ## (latest entry)
52+
const firstH2Index = currentContent.indexOf('## ');
53+
54+
let newContent: string;
55+
if (firstH2Index !== -1) {
56+
// Insert the new entry before the latest entry
57+
newContent =
58+
currentContent.slice(0, firstH2Index) +
59+
entry +
60+
currentContent.slice(firstH2Index);
61+
} else {
62+
// No existing entries, append to the end
63+
newContent = currentContent + '\n' + entry;
64+
}
65+
66+
// Write the updated content
67+
fs.writeFileSync(targetPath, newContent, 'utf-8');
68+
69+
return `Changelog entry inserted successfully to ${parameters.path}`;
70+
} catch (error: unknown) {
71+
if (error instanceof Error) {
72+
return `Error appending changelog entry: ${error.message}`;
73+
}
74+
return `Error appending changelog entry: ${error}`;
75+
}
76+
}
77+

app/en/home/changelog/page.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ import { Callout } from "nextra/components";
99

1010
_Here's what's new at Arcade.dev!_
1111

12+
## 2025-10-24
13+
14+
**Toolkits**
15+
16+
- `[feature - 🚀]` [Toolkits/Ticktick] Added Ticktick Starter Toolkit
17+
- `[feature - 🚀]` [Toolkits/Weaviate] Added Weaviate Starter Toolkit
18+
- `[feature - 🚀]` [Toolkits/Vercel] Added Vercel Starter Toolkit
19+
- `[feature - 🚀]` [Toolkits/Datadog] Added Datadog Starter Toolkit
20+
- `[feature - 🚀]` [Toolkits/Freshservice] New Freshservice MCP tools with complex objects handling
21+
22+
**Platform and Engine**
23+
24+
- `[feature - 🚀]` Dashboard: Add redirect_uri to MCP Servers
25+
- `[feature - 🚀]` Dashboard: Add OAuth fields to MCP Servers
26+
27+
1228
## 2025-10-17
1329

1430
<Callout type="important">

0 commit comments

Comments
 (0)