adachsoft/changelog-tool 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adachsoft/changelog-tool

Composer 安装命令:

composer require adachsoft/changelog-tool

包简介

AI tool-call compatible wrapper around adachsoft/changelog-linter for managing changelog.json and CHANGELOG.md.

README 文档

README

A thin AI tool-call compatible wrapper around adachsoft/changelog-linter for managing changelog.json and CHANGELOG.md.

Installation

Install via Composer:

composer require adachsoft/changelog-tool

Usage with adachsoft/ai-tool-call

Register the SPI factory in your ai-tool-call setup:

use AdachSoft\AiToolCall\PublicApi\Builder\AiToolCallFacadeBuilder;
use AdachSoft\AiToolCall\SPI\Collection\ConfigMap;
use AdachSoft\ChangelogTool\Tool\ChangelogToolFactory;

$facade = AiToolCallFacadeBuilder::new()
    ->withSpiFactories([
        new ChangelogToolFactory(),
    ])
    ->withToolConfigs([
        'changelog_tool' => new ConfigMap([
            'base_path' => getcwd(),
            'changelog_binary_path' => 'vendor/bin/changelog',
            // Default locations and behaviour (config-only, not per-call parameters)
            'json_path' => 'changelog.json',
            'markdown_path' => 'CHANGELOG.md',
            'timeout' => 900,              // 15 minutes
            'with_created_at' => true,     // used for generate-json
            'default_lenient' => false,    // default when `lenient` is not provided per call
        ]),
    ])
    ->build();

Then call the tool from your agent or application:

use AdachSoft\AiToolCall\PublicApi\Dto\ToolCallRequestDto;

// Validate changelog.json (paths and behaviour come from ConfigMap)
$result = $facade->callTool(new ToolCallRequestDto(
    toolName: 'changelog_tool',
    parameters: [
        'mode' => 'validate',
    ],
));

// Generate CHANGELOG.md from changelog.json
$result = $facade->callTool(new ToolCallRequestDto(
    toolName: 'changelog_tool',
    parameters: [
        'mode' => 'generate_md',
    ],
));

// Generate changelog.json from CHANGELOG.md with lenient parsing
$result = $facade->callTool(new ToolCallRequestDto(
    toolName: 'changelog_tool',
    parameters: [
        'mode' => 'generate_json',
        'lenient' => true,
    ],
));

Parameters (per-call)

The changelog_tool exposes the following per-call parameters (snake_case):

  • mode (string, required): one of validate, generate_md, generate_json.
  • lenient (bool, optional): enable lenient parsing/validation for Markdown to JSON (when omitted, default_lenient from ConfigMap is used).

All file paths, timeout and with_created_at behaviour are configured only via ConfigMap in the factory, not as per-call parameters.

Configuration (ConfigMap keys)

The factory ChangelogToolFactory reads the following configuration keys:

  • base_path (string, required): project root used as cwd and base for resolving relative paths.
  • changelog_binary_path (string, optional): path to the changelog CLI, relative to base_path or absolute (default: vendor/bin/changelog).
  • json_path (string, optional): default path to changelog.json (default: changelog.json).
  • markdown_path (string, optional): default path to CHANGELOG.md (default: CHANGELOG.md).
  • timeout (int, optional): default timeout in seconds for the CLI process (default: 900 seconds).
  • with_created_at (bool, optional): when generating JSON from Markdown, add createdAt metadata (default: true).
  • default_lenient (bool, optional): default value for lenient mode when lenient is not provided per call (default: false).

Result shape

The tool always returns a structured result with the following keys:

  • stdout (string)
  • stderr (string)
  • exit_code (int)
  • success (bool)

Paths in stdout/stderr are sanitized to remove the configured base_path prefix where applicable.

adachsoft/changelog-tool 适用场景与选型建议

adachsoft/changelog-tool 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「cli」 「changelog」 「ai」 「adachsoft」 「tool-call」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 adachsoft/changelog-tool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 adachsoft/changelog-tool 我们能提供哪些服务?
定制开发 / 二次开发

基于 adachsoft/changelog-tool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 35
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-09