37 Commits

Author SHA1 Message Date
inomata137 ff18b4dff1 Merge branch 'upstream' into fix-array-query-params-serialization
Signed-off-by: inomata137 <67103297+inomata137@users.noreply.github.com>
2026-08-25 11:30:53 +09:00
inomata137 caf3c3718d Merge pull request #271 from C-FO/fix/generate-references-anyof-scalar-unions
fix(skill): anyOf の同一スカラー型を正しく出力する
2026-08-25 11:16:46 +09:00
inomata137 6153e8db03 fix(skill): anyOf の同一スカラー型を正しく出力する 2026-08-24 16:30:51 +09:00
inomata137 8a73d7ee17 fix: serialize query parameters using OpenAPI metadata 2026-08-24 15:48:20 +09:00
nagaosa 9d537b3955 Merge remote-tracking branch 'origin/upstream' into feat/partner-management-api
# Conflicts:
#	README.md
#	skills/freee-api-skill/SKILL.md
2026-08-20 15:03:07 +09:00
him0 56b17f6ee4 refactor(skill): 索引と service 一覧をテーブルからリストに変更
Markdown テーブルは区切り記号とヘッダ行の分だけトークンを消費するので、
毎回読まれる索引・SKILL.md には割に合わない。

- references/INDEX.md を「ファイル名 — 内容」の1行1エントリ形式に変更
- 主なパス列を削除(ファイル名と内容が分かれば参照先は絞れるため)
- SKILL.md の service 表もリストに変更

INDEX.md は 12,892 バイト -> 5,284 バイト。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 20:49:19 +09:00
him0 a3f287a124 feat(skill): リファレンス索引の自動生成と SKILL.md の整理
references/ が94ファイルまで増え、索引なしのキーワード検索だけでは
目的のリファレンスに辿り着きにくくなっていたため INDEX.md を追加する。
リファレンス本体と同じソース(tag-mappings.json + スキーマ)から
generate-references.ts が生成するので、スキーマ同期に自動で追従する。

あわせて SKILL.md から、実行時に毎回は不要な情報を分離した。

- セットアップ手順を SETUP.md へ(未接続・未認証時のみ読む)
- カラールールを COLORS.md へ(可視化時のみ読む)
- 「主なリファレンス」5件は INDEX.md と重複するため削除
- 「関連リンク」は README にあるため削除

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 20:43:22 +09:00
nagaosa a75cf91897 feat(partner-management): freee業務委託管理APIをサポート
- partner_management service を追加(/hub/partner_management/ 配下)
- スキーマ取得・リファレンス生成スクリプトに partner-management-api を追加
- CLAUDE.md / README.md / SKILL.md / SERVER_INSTRUCTIONS に業務委託管理を追記
- evals.json id 8 に業務委託管理を追加

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-08-13 14:47:25 +09:00
him0 6392a7e758 fix(skill): requestBody の $ref と複数要素 allOf を解決する
`formatRequestBody` が `requestBody.content` を直接参照していたため、
requestBody を `components.requestBodies` に切り出している販売管理 API の
40 エンドポイントで、リクエストボディのセクションが丸ごと欠落していた。

また `resolveSchema` は 1 要素の `allOf` しか解決していなかったため、
共通項目を `allOf` で合成しているスキーマでは `properties` が空になり、
型が `object` と誤表示されたり例・制約が落ちたりしていた。

- `components.requestBodies` への `$ref` を解決する
- 複数要素の `allOf` を合成する(properties は後勝ち、required は和集合、
  それ以外の属性は先勝ち。ラッパー自身の description は参照先より優先)
- 循環参照に備えて解決の深さに上限を設ける

いずれも本 PR で入れた退行ではなく、以前から存在していた不具合。
リファレンス合計は 624,845 → 712,058 文字(元の 1,469,759 比で -51.6%)。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 15:39:53 +09:00
him0 cb2aa22b25 fix(skill): リクエストボディ自体の必須性を保持する
`requestBody.required` は schema の `required`(本文内フィールドの必須性)から
推論できないため、見出しの `*` で表すようにした。未指定の schema が多く無指定を
「任意」と書くと実態と食い違うので、明示的に `true` のときだけ付ける。

見出しは重複判定キーに含まれるので、同じ schema を共有していても required が
異なるエンドポイントは「◯◯ と同じ」に潰れなくなる。実際に該当するのは
`tagParams`(POST /api/1/tags: true / PUT /api/1/tags/{id}: false)と
`transferParams`(POST /api/1/transfers: false / PUT /api/1/transfers/{id}: true)。

回帰テストのため `buildEndpointsMarkdown` を切り出して export し、直接実行時のみ
`main()` を呼ぶようにした。vitest の include に `scripts/` を追加している。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 15:26:11 +09:00
him0 2ae0880e36 refactor(skill): API リファレンスを軽量化してトークン消費を削減
generate-references.ts の出力形式を見直し、`references/` と
`sign-references/` の合計サイズを 1,469,759 文字から 622,003 文字
(-57.7%)に削減した。

- パラメータを markdown テーブルから箇条書きに変更
- 必須・任意の表記を `名前*`(必須)に簡素化
- レスポンスはトップレベルの項目のみ出力(詳細は API を呼び出して確認)
- 同一ファイル内で内容が同一のブロックを初出への参照に置き換え
- description に残っていた HTML タグを除去(`<br>` や表は整形して保持)
- 情報量のない見出し(概要・参考情報・定型のレスポンス説明)を削除

記法の凡例は SKILL.md の「リファレンス」セクションに追加した。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 14:00:23 +09:00
ikesho ae0ba95057 feat(survey): サーベイAPI対応と mcp-only エンドポイントのバナー/ゲート自動化 (#233)
* feat(survey): サーベイAPI対応と mcp-only エンドポイントのバナー/ゲート自動化

- service: "survey" でサーベイ企画・実施回の取得(GET)に対応
- mcp-only(freee-mcp リモート版限定)を mcponly.yml 由来で判定する仕組みを追加
  - generate-references が該当リファレンス冒頭にバナーを自動注入(手編集不要)
  - schema-loader の isMcpOnlyPath と client-mode の stdio ゲートで
    ローカルモードでの呼び出しを弾き、freee-mcp(リモート版)へ案内
- サーベイのレシピ・リファレンス・eval、CLAUDE.md の運用手順を追加

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(survey): biome の import 並び順修正と client-mode テストの mock 追加

- client-mode.ts の import を biome organizeImports 順に並べ替え
- client-mode.test.ts の schema-loader mock に isMcpOnlyPath を追加
  (新 export 未定義で 4xx テストが落ちていた)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-30 12:18:45 +09:00
aki 2a9a82c620 feat: freeeIT管理 API (メンバー・SaaSアカウント・備品) のサポート追加 (#135)
* feat: IT管理 APIのスキーマ取得設定を追加

it_management.yml をスキーマ取得対象に追加し、リファレンス生成・タグマッピング・ドキュメントを更新。

* feat: schema-loader / client-mode で it_management サービスをサポート

* docs: freee-api-skill に IT管理APIのリファレンス・レシピを追加

freee-api-skill に IT管理API(メンバー・SaaSアカウント・備品)のエンドポイントリファレンスと操作レシピを同梱。SKILL.md・eval も IT管理対応に更新。

* chore: generate-references.ts に $ref パラメータ解決を追加しリファレンスを再生成

* docs: IT管理API リファレンスのファイル名から重複プレフィックスを除去

* chore: IT管理APIスキーマを最新化しリファレンスを再生成

* chore: IT管理 API の changeset を統合

* スキーマの更新

* chore: IT管理 SaaSアカウント API スキーマを最新化しリファレンスを再生成

api-hub の OpenAPI スキーマを最新版に同期し、freee-api-skill の IT管理
リファレンスを再生成。bundle 側の新規受付パラメータが反映される。

主な変更点:
- PATCH /hub/it_management/application_accounts/{id} に以下を追加:
  - application_account_status_id (uuid): 同一アプリの status ID
  - application_account_role_id (uuid, nullable): 同一アプリの role ID。null で解除
  - attributes の description 更新: UUID/title どちらでも指定可
- レスポンスフィールドの順序整理(last_synced_at / role / data を本体内へ)

関連:
- bundle: C-FO/bundle#19143
- api-hub: C-FO/api-hub#214

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* スキーマの取得元URL変更

* IT管理APIスキーマを最新化しオープンベータ必須ヘッダを反映、skillの注記とリンクを修正

* changesetをIT管理機能1件に統合し、company_idの扱い(GET/DELETEクエリ・POSTボディ必須、PATCH不要)にレシピを修正

* docs: README と CLAUDE.md に IT管理 API を追記

- README の対応サービス一覧・特徴・Skill 内容テーブルに IT管理を追加
- CLAUDE.md の API Base URL 上書き用環境変数に FREEE_API_BASE_URL_IT_MANAGEMENT を追加

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(skill): リファレンスを再生成し最新スキーマ・生成ロジックを反映

- IT管理: freee-using-beta ヘッダ・status の enum 選択肢・ネストフィールドを反映
- サイン: sign-documents に password / has_password / face_to_face_url を反映

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(skill): IT管理レシピを実機検証結果に合わせて加筆・修正

実機検証 (members / assets / application_accounts) で判明した
仕様差分とレシピの誤記を反映する。

修正:
- PATCH も body に company_id 必須("PATCH 不要" は誤り)
- 一意制約違反は 400 + ITM-05-XX-0001 + fields("409" は誤り)
- 不正参照 ID は AHB-1002-9001 ではなく ITM-05-03-0001 + fields
- 備品 current_member_id 拒否はゲートウェイ層 AHB-3003-0002

追記:
- ページサイズ上限 100 と並び順固定の制約
- キーワード検索の実際の対象範囲
- SaaSアカウント特殊仕様(カスタムアプリ限定 / attributes / status / role)
- POST と PATCH のフィールド差(POST は attributes 不可、PATCH 二段運用)
- エラー形式テーブル(ITM-05-01/02/03、AHB-3003-0002、AHB-1002-9001)
- 全エンドポイントを "IT管理 全エンドポイント" と明確化

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(skill): IT管理レシピのレビュー指摘を反映

- オープンベータ章のヘッダー記述を削除(freee-mcp が全 API に自動付与する方針のため、IT管理 限定の説明は混乱の元)
- 強調表現 (**...**) を全て除去
- キーワード検索とエラー形式のテーブルを箇条書きに変換(コンテキスト効率優先)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: ryoya-kobayashi <ryoya-kobayashi@c-fo.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: him0 <him0@freee.co.jp>
2026-06-04 12:48:24 +09:00
Hiroki Nakashima 033d7d5745 fix(skill): リファレンス生成で allOf でラップされた $ref が解決されない問題を修正 (#459)
* fix(skill): リファレンス生成で allOf でラップされた $ref が解決されない問題を修正

* docs: add @ryoya1122 to Contributors

* chore(skill): regenerate sign-documents reference to sync approve_on_signing field

---------

Co-authored-by: Claude <claude@anthropic.com>
2026-05-12 00:35:52 +09:00
Hiroki Nakashima 9ff1a30175 chore: remove obsolete scripts/test-tools.js (#453)
* Fix for Unused variable, import, function or class

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* chore: remove obsolete scripts/test-tools.js

ハードコードしたツール名を print するだけの陳腐化スクリプトを削除。
実サーバへの検証は scripts/test-mcp.js が tools/list JSON-RPC で行える。

検証:
- package.json の scripts に登録なし
- README / CLAUDE.md / CI / hooks のいずれからも参照なし
- 他のソースから import/require もなし
- /scripts は .npmignore で配布対象外

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 14:54:52 +09:00
Hiroki Nakashima ff9aff221a fix(skill): リファレンス生成で $ref のパラメータが空欄になる問題を修正 (#441)
* fix(skill): リファレンス生成で $ref のパラメータが空欄になる問題を修正

freee-api-skill のリファレンスドキュメント生成において、OpenAPI スキーマで
`$ref` を使って定義されているパラメータが空欄として出力されていた問題を修正。

- `scripts/generate-references.ts` の `formatParameters()` で
  `#/components/parameters/*` を解決するロジックを追加
- `Parameter` インターフェースに `$ref` を追加し、
  `OpenAPISchema.components` に `parameters` を追加
- 影響を受ける sm-api のリファレンス
  (sm-businesses.md / sm-deliveries.md / sm-master.md /
  sm-sales-orders.md / sm-sales.md) を再生成

* docs(claude): freee organization 外のリポジトリや Jira URL を書かないルールを追記
2026-05-08 15:28:49 +09:00
Yasuaki Omokawa 160b717669 support sign mcp (#375)
* feat: freee サイン(電子契約)の MCP サーバーサポートを追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(sign): スキーマ取得・リファレンス生成にサイン API を追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(sign): bin エントリポイント freee-sign-mcp を追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: README.md と CLAUDE.md にサイン関連の記述を追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: bin/freee-sign-mcp.js を .gitignore に追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: MCP サーバー名を freee-sign-mcp に統一

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor(skill): サイン関連コンテンツを SIGN-GUIDE.md + sign-references/ に分離

サインは独立 MCP サーバー (freee-sign-mcp) のため、SKILL.md に混在していると
AI がツール呼び出しを誤ったり company_id ワークフローを適用してしまう問題を解消。
- SIGN-GUIDE.md: サイン専用ガイド(セットアップ・ツール一覧・ワークフロー)
- sign-references/: サインAPIリファレンス(references/ から移動)
- SKILL.md: サインツール定義を除去し SIGN-GUIDE.md への誘導を追加
- generate-references.ts: サインの出力先を sign-references/ に分岐

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(skill): description を freee-mcp / freee-sign-mcp で検索しやすい表現に変更

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(sign): デフォルトコールバックポートを 54322 に変更し freee 本体と競合を回避

freee 本体(54321)とサインが同時に動作してもポートが衝突しないよう
SIGN_DEFAULT_CALLBACK_PORT を独自に定義。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* revert: src/index.ts の無関係なスペース変更を元に戻す

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: freee サインの Remote MCP 提供が準備中であることを記載

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docs): npx freee-sign-mcp の呼び出し方法を修正

freee-sign-mcp は freee-mcp パッケージの追加 bin エントリのため
npx freee-sign-mcp では実行できない。
npx --package=freee-mcp -- freee-sign-mcp に修正。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(sign): Devin Review の指摘3件を修正

- SIGN_API_URL の末尾スラッシュをトリムし OAuth エンドポイントの二重スラッシュを防止
- sign_auth_status のトークン期限切れメッセージを freee 本体と統一(自動更新される旨を表示)
- configure が生成する MCP 設定の args を npx --package=freee-mcp -- freee-sign-mcp に修正

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(sign): OAuth 2.0 タグをリファレンス生成のブラックリストに追加

ユーザーが直接操作しない認証エンドポイントのリファレンスを除外するため、
generate-references.ts に TAG_BLACKLIST を追加。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(docs): SIGN-GUIDE.md から削除済みの sign-oauth-2.0.md 参照を除去

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs(sign): サインリファレンスの概要追加と不要リンク削除

各 sign-references ファイルに概要説明を追加し、
存在しない OpenAPI スキーマへのリンクを削除。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: him0 <him0@freee.co.jp>
2026-04-08 12:01:29 +09:00
Hiroki Nakashima 4b1306e934 feat: freee-api-skill の改善、reference 自動生成の修正、レシピの重複削減 (#369)
* feat: freee-api-skill の改善と reference 自動生成の修正

- description に undertrigger 防止の文言を追加
- SKILL.md に概要の価値提案とワークフローの WHY 補足を追記
- VERSION.md 不在時のフォールバック説明を追加
- generate-references.ts: 空の概要にフォールバック、壊れた相対リンク除去、description の改行改善
- 全75 reference ファイルを再生成

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: レシピの重複内容を削減し reference への参照に置き換え

- メモタグ「freee-mcp」の付与ガイドを共通レシピ(freee-mcp-tag.md)に集約
- 5つのレシピから重複していたタグ付与手順を削除し共通レシピへの参照に変更
- enum/ステータステーブル(収支区分、決済状況、口座区分、書類種類、運用ステータス、打刻タイプ等)を削除し reference への参照に変更
- 関連APIパス一覧の重複を削除
- 合計240行の削減

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: メモタグ付与の指示を「必ず付与すること」に強化

参照だけでは AI がタグ付与を実行しなかったため、
各レシピのタグセクションに行動指示を明記

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: レシピのマスタIDハードコードを事前取得の指示に置き換え

勘定科目ID、税区分コード等は事業所ごとに異なるため、
ダミー値(101, 1, 202等)を使用例に含めると AI が推測して
無効なIDを投げる原因になっていた。

- deal-operations.md: 「取引作成の前準備」セクションを追加し、
  勘定科目・税区分・口座の事前取得ステップを明記
- expense-application-operations.md: 経費科目ID事前取得の注意を追加
- manual-journal-operations.md: 事前取得の参照を追加、ダミー値を除去
- payment-request-operations.md: 事前取得の参照を追加、ダミー値を除去
- 全使用例のハードコード値を <取得した勘定科目ID> 等のプレースホルダに変更

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore(changeset): changeset を統合し全変更内容を反映

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:49:31 +09:00
Hiroki Nakashima 37edff1a74 feat: 開発ツールチェーンを bun に移行 (#283)
* feat: migrate toolchain from pnpm/tsx/esbuild to bun

- Package manager: pnpm → bun (bun install, bun.lock)
- Bundler: esbuild → Bun.build (build.ts rewritten)
- Script execution: tsx → bun (dev, start, scripts)
- Tests: kept vitest (bun:test mock.module has file isolation bugs)
- CI/CD: pnpm/action-setup → oven-sh/setup-bun
- Removed devDependencies: esbuild, tsx
- Built artifact still targets Node.js (#!/usr/bin/env node)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: .mcp.json のコマンドを pnpm から bun に変更

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: 残存していた pnpm/tsx/esbuild 参照を bun に統一

README.md, mcp.json, scripts/, release.yml, .claude/settings.json,
schema-loader.ts, constants.ts のコマンドやコメントを更新。
bun.lock を再生成して不要な eslint/prettier/tsx 依存を削除。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: CI の node-version を .tool-versions から読むように修正

publish.yml, test.yml, release.yml でハードコードされた
node-version を node-version-file: .tool-versions に変更。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 10:54:41 +09:00
Hiroki Nakashima ca0b7f83e4 スキーマからタグマッピングを自動同期する機能を追加 (#236)
generate-references.ts にスキーマのタグを自動検出して tag-mappings.json に
同期する処理を追加。手動でマッピングを追加し忘れてリファレンスが生成されない
問題を防ぐ。非ASCII(日本語)タグは自動変換せず警告を出す。
SM API のリファレンス生成にも対応。

https://claude.ai/code/session_01LwPJ35hdXhgtaBCZSx5qjf

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-04 13:49:45 +09:00
Claude 2595e5ef45 環境変数による設定の案内を削除
FREEE_CLIENT_ID, FREEE_CLIENT_SECRET, FREEE_CALLBACK_PORT 環境変数による
セットアップの案内・ガイダンスを各所から削除。環境変数を読み取る挙動自体は維持。

- README.md: 非推奨警告ブロックを削除
- CLAUDE.md: Environment Variables (Deprecated) セクションを削除
- src/config.ts: stderr への非推奨警告メッセージを削除
- src/mcp/tools.ts: エラーメッセージを configure コマンドへ誘導する文言に変更
- src/api/client.ts: エラーメッセージから環境変数の確認事項を削除
- scripts/test-tools.js: 設定例から env ブロックを削除

https://claude.ai/code/session_01UaK4KqyLKuaPRLd9BL7tXK
2026-02-26 12:57:00 +00:00
him0 85a6161e46 refactor: monorepo構成を単一パッケージ構成に戻す
freee-agentパッケージを削除し、packages/freee-mcp配下のファイルをルートに移動。
pnpm workspaceの設定を削除し、package.jsonを統合。
CIワークフローとCLAUDE.mdのパス参照を修正。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 21:45:49 +09:00
Claude 5e40d206c6 feat: setup pnpm monorepo with freee-mcp and freee-agent packages
Restructure the repository as a pnpm workspace monorepo to support
multiple packages. This enables the development of freee-agent CLI
alongside the existing freee-mcp server.

Changes:
- Move freee-mcp source to packages/freee-mcp
- Create freee-agent package scaffold in packages/freee-agent
- Configure pnpm workspace with packages/*
- Update root package.json with workspace scripts
- Update CLAUDE.md to document monorepo structure
2026-01-15 14:06:00 +00:00
him0 48d1fab45f refactor: replace local gh-setup.sh with gh-setup-hooks npm package
Replace the local GitHub CLI setup script with the `gh-setup-hooks` npm
package for better maintainability and reusability across projects.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 02:32:53 +09:00
him0 fe4a14d74f feat: improve gh-setup.sh with flexible install location and remote hints
- Prefer /usr/local/bin if writable, fallback to ~/.local/bin
- Only update PATH when installing to ~/.local/bin
- Add hints for remote environment:
  - origin/main not fetched by default
  - PR creation and update commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 03:05:57 +09:00
him0 67eaa417f0 feat: fetch latest gh CLI version from GitHub API
Instead of hardcoding a version, fetch the latest release from GitHub API.
Falls back to 2.82.2 if API request fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 02:02:09 +09:00
him0 95e30c984e feat: add SessionStart hook for gh CLI auto-installation
Add a hook that automatically installs GitHub CLI in remote Claude Code
environments. The script is idempotent and fail-safe.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 01:47:24 +09:00
Claude 65bdc2b110 refactor: remove FREEE_DEFAULT_COMPANY_ID environment variable
The company ID should be set using freee_set_current_company tool
instead of environment variables.
2026-01-01 19:07:14 +00:00
Claude 7d323ac2a6 refactor: rename freee_set_company to freee_set_current_company
Rename the tool to be more consistent with freee_get_current_company
2026-01-01 19:01:59 +00:00
Claude 982a41c9d7 refactor: remove markdown bold syntax (**) from all files
Removed all ** bold emphasis from markdown files to simplify formatting:
- CLAUDE.md
- README.md
- SKILL.md
- troubleshooting.md
- All generated reference files

Also updated generate-references.ts to stop generating bold syntax.
2026-01-01 18:34:13 +00:00
Claude 62909ce6ab docs: remove references to deleted freee_help tool
Update documentation and test scripts to remove references to
freee_help, freee_status, and freee_getting_started tools that
were removed in v0.4.0. Added references to current tools
(freee_clear_auth, freee_get_current_company, freee_current_user).
2026-01-01 07:20:32 +00:00
him0 dd306aa7e5 feat: minimize OpenAPI schemas for reduced memory consumption
- Add schema minimization function to fetch-schemas.ts
- Generate minimal schemas in openapi/minimal/ directory
- Extract only essential fields: paths, summary, description, parameters, hasJsonBody
- Update schema-loader.ts to use minimal schemas instead of full schemas
- Create minimal-types.ts with type definitions for minimized schemas
- Update converter.ts and schema.ts to use MinimalParameter type
- Remove NODE_OPTIONS from release.yml as memory optimization is no longer needed

Schema size reduction:
- accounting: 708KB → 171KB (75.9%)
- hr: 362KB → 71KB (80.3%)
- invoice: 112KB → 7KB (93.7%)
- pm: 36KB → 6KB (84.6%)
- sm: 61KB → 5KB (91.9%)
- Total: ~80% reduction

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 02:35:54 +09:00
him0 a8d76e1823 feat: add schema fetch script and update OpenAPI schemas
- Add scripts/fetch-schemas.ts to fetch latest OpenAPI schemas from freee official repos
- Add sm-api-schema.json for freee販売管理 API
- Update existing schemas (accounting, hr, invoice) to latest versions
- Add yaml dependency for YAML schema parsing
- Add pnpm fetch:schemas script
- Exclude openapi/ directory from ESLint and Prettier to avoid memory issues
- Fix Zod 3.25+ type inference issues with MCP SDK

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 01:43:05 +09:00
him0 7d24d071ba feat: integrate freee-api-skills into freee-mcp
- Add Claude plugin configuration (.claude-plugin/plugin.json, marketplace.json)
- Add API reference generation script (scripts/generate-references.ts) converted from Bun to tsx
- Add skills directory with SKILL.md and 63 API reference documents
- Add tag-mappings.json for reference generation
- Update .npmignore to exclude skills/, .claude-plugin/, and tag-mappings.json from npm package
- Add generate:references script to package.json

This integrates all content from freee-api-skills repository, allowing it to be deprecated.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 00:39:54 +09:00
Claude e33d31e364 refactor: rename FREEE_COMPANY_ID to FREEE_DEFAULT_COMPANY_ID
環境変数 FREEE_COMPANY_ID を FREEE_DEFAULT_COMPANY_ID に改名しました。
この変更により、デフォルト事業所IDであることがより明確になります。

変更内容:
- src/config.ts: 環境変数の参照を更新
- vitest.config.ts: テスト環境変数を更新
- scripts/test-tools.js: 設定例を更新
- src/mcp/tools.ts: ドキュメント文字列を更新
- CLAUDE.md: 環境変数ドキュメントを更新
- README.md: 環境変数ドキュメントを更新

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 13:21:11 +00:00
Claude ae5de3ece9 Change default OAuth callback port from 8080 to 54321
- Update default port in src/config.ts to avoid conflicts with common development servers
- Update all documentation (README.md, CLAUDE.md, README-TESTING.md) with new port
- Update all test files to use new port number
- Update error messages and example configurations

The port 54321 was chosen as it's in a less commonly used range and less likely to conflict with other development tools.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-25 06:52:55 +00:00
him0 783658551e feat: enhance freee_list_companies and add comprehensive testing tools
- Modified freee_list_companies to internally call get_companies API
- Added fallback to local company data when API fails
- Created testing infrastructure with multiple approaches:
  - scripts/test-tools.js: Quick tool verification
  - scripts/test-mcp.js: Full MCP protocol testing
  - README-TESTING.md: Comprehensive testing guide
- Updated CLAUDE.md with testing workflow and tool usage
- Improved error handling and user guidance in company listing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-21 22:47:35 +09:00