ai-cli-mcp 2.3.2 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +2 -2
- package/.github/workflows/publish.yml +49 -0
- package/.github/workflows/test.yml +13 -36
- package/.mcp.json +10 -0
- package/.releaserc.json +18 -0
- package/CHANGELOG.md +150 -1
- package/README.md +11 -9
- package/dist/__tests__/e2e.test.js +4 -0
- package/dist/__tests__/edge-cases.test.js +4 -1
- package/dist/__tests__/server.test.js +72 -0
- package/dist/__tests__/utils/mcp-client.js +1 -1
- package/dist/__tests__/utils/persistent-mock.js +5 -2
- package/dist/__tests__/validation.test.js +35 -0
- package/dist/parsers.js +14 -3
- package/dist/server.js +39 -12
- package/docs/RELEASE_CHECKLIST.md +57 -20
- package/package.json +4 -1
- package/src/__tests__/e2e.test.ts +5 -1
- package/src/__tests__/edge-cases.test.ts +7 -3
- package/src/__tests__/server.test.ts +100 -0
- package/src/__tests__/utils/mcp-client.ts +2 -2
- package/src/__tests__/utils/persistent-mock.ts +7 -3
- package/src/__tests__/validation.test.ts +44 -1
- package/src/parsers.ts +12 -4
- package/src/server.ts +49 -13
- package/.claude/settings.local.json +0 -22
package/.github/workflows/ci.yml
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- develop
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
name: Release
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write # to create release and push changelog
|
|
17
|
+
issues: write # to comment on released issues
|
|
18
|
+
pull-requests: write # to comment on released PRs
|
|
19
|
+
id-token: write # for OIDC trusted publishing
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
fetch-depth: 0
|
|
25
|
+
fetch-tags: true
|
|
26
|
+
persist-credentials: false
|
|
27
|
+
|
|
28
|
+
- name: Setup Node.js
|
|
29
|
+
uses: actions/setup-node@v4
|
|
30
|
+
with:
|
|
31
|
+
node-version: '24'
|
|
32
|
+
registry-url: 'https://registry.npmjs.org'
|
|
33
|
+
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: npm clean-install
|
|
36
|
+
|
|
37
|
+
- name: Build
|
|
38
|
+
run: npm run build
|
|
39
|
+
|
|
40
|
+
- name: Run tests
|
|
41
|
+
run: npm test
|
|
42
|
+
|
|
43
|
+
- name: Verify provenance attestations
|
|
44
|
+
run: npm audit signatures
|
|
45
|
+
|
|
46
|
+
- name: Release
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
49
|
+
run: npx semantic-release
|
|
@@ -1,43 +1,20 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: test
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ main ]
|
|
6
4
|
pull_request:
|
|
7
|
-
branches: [ main ]
|
|
8
5
|
|
|
9
6
|
jobs:
|
|
10
7
|
test:
|
|
11
|
-
runs-on:
|
|
12
|
-
strategy:
|
|
13
|
-
matrix:
|
|
14
|
-
node-version: [20.x, 22.x]
|
|
15
|
-
|
|
8
|
+
runs-on: ubuntu-latest
|
|
16
9
|
steps:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
run: npm run build
|
|
29
|
-
|
|
30
|
-
- name: Run unit tests only
|
|
31
|
-
run: npm run test:unit
|
|
32
|
-
|
|
33
|
-
- name: Run all tests with coverage
|
|
34
|
-
run: npm run test:coverage
|
|
35
|
-
|
|
36
|
-
- name: Upload coverage to Codecov
|
|
37
|
-
uses: codecov/codecov-action@v4
|
|
38
|
-
if: matrix.node-version == '20.x'
|
|
39
|
-
with:
|
|
40
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
41
|
-
file: ./coverage/coverage-final.json
|
|
42
|
-
flags: unittests
|
|
43
|
-
name: codecov-umbrella
|
|
10
|
+
- name: Checkout
|
|
11
|
+
uses: actions/checkout@v4
|
|
12
|
+
- name: Setup Node
|
|
13
|
+
uses: actions/setup-node@v4
|
|
14
|
+
with:
|
|
15
|
+
node-version: '20'
|
|
16
|
+
cache: 'npm'
|
|
17
|
+
- name: Install
|
|
18
|
+
run: npm ci
|
|
19
|
+
- name: Test
|
|
20
|
+
run: npm test
|
package/.mcp.json
ADDED
package/.releaserc.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"branches": ["develop"],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@semantic-release/commit-analyzer",
|
|
5
|
+
"@semantic-release/release-notes-generator",
|
|
6
|
+
["@semantic-release/changelog", {
|
|
7
|
+
"changelogFile": "CHANGELOG.md"
|
|
8
|
+
}],
|
|
9
|
+
"@semantic-release/npm",
|
|
10
|
+
["@semantic-release/github", {
|
|
11
|
+
"assets": []
|
|
12
|
+
}],
|
|
13
|
+
["@semantic-release/git", {
|
|
14
|
+
"assets": ["CHANGELOG.md", "package.json", "package-lock.json"],
|
|
15
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
16
|
+
}]
|
|
17
|
+
]
|
|
18
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,152 @@
|
|
|
1
|
+
## [2.3.3](https://github.com/mkXultra/claude-code-mcp/compare/v2.3.2...v2.3.3) (2026-01-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* trigger release with correct version ([a0af8cf](https://github.com/mkXultra/claude-code-mcp/commit/a0af8cf25c8d3a1fd3ca7ef26d22f85981cc6f2f))
|
|
7
|
+
|
|
8
|
+
# 1.0.0 (2026-01-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add fetch-tags to checkout for semantic-release ([33b8650](https://github.com/mkXultra/claude-code-mcp/commit/33b8650bbeb77169c083256f82534ded14f6ecd2))
|
|
14
|
+
* Apply npm pkg fix for bin path ([e47140d](https://github.com/mkXultra/claude-code-mcp/commit/e47140d6beebacc60ca1cf55903608f9f207ff94))
|
|
15
|
+
* Remove commented-out debug logs from server.ts ([1ef44bb](https://github.com/mkXultra/claude-code-mcp/commit/1ef44bb280fea68dc874fb0d978fea682ddbb681))
|
|
16
|
+
* retry release after tag cleanup ([825838b](https://github.com/mkXultra/claude-code-mcp/commit/825838b05b7e6a10ae01d7bc7bb9179a8d6095bc))
|
|
17
|
+
* rm not use param ([ad9670c](https://github.com/mkXultra/claude-code-mcp/commit/ad9670cfe04507e40abab2427702b680b00353db))
|
|
18
|
+
* trigger release for semantic-release setup ([5e117ee](https://github.com/mkXultra/claude-code-mcp/commit/5e117ee31583ccef2e49c820c815c19716abe392))
|
|
19
|
+
* update tests to match current implementation ([2aa7758](https://github.com/mkXultra/claude-code-mcp/commit/2aa775813678d0a9da7150411fd9a1429ff7736f))
|
|
20
|
+
* use VITEST env check for test detection and add createTestClient helper ([84fa153](https://github.com/mkXultra/claude-code-mcp/commit/84fa1535aa2c50acf9d5a9650bf881df7ff8d470))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* Add CHANGELOG and finalize server ([c50a6bb](https://github.com/mkXultra/claude-code-mcp/commit/c50a6bbb5d7dd8d849b1877e19e97a5aedd63493))
|
|
26
|
+
* add CWD to code prompt and bump version to 1.1.0 ([b62c9c2](https://github.com/mkXultra/claude-code-mcp/commit/b62c9c2c802f84d0d4eb80e970d08ef25a1a9c40))
|
|
27
|
+
* add Gemini CLI support to MCP server ([a9942bc](https://github.com/mkXultra/claude-code-mcp/commit/a9942bc3b0410f5cb45e99108d1b13c252cc5655))
|
|
28
|
+
* Add GitHub Actions CI workflow for build checks ([#2](https://github.com/mkXultra/claude-code-mcp/issues/2)) ([613c0cb](https://github.com/mkXultra/claude-code-mcp/commit/613c0cb855b408d83c661a2317db328548dc72e8))
|
|
29
|
+
* add process cleanup tool and simplify list output ([cc03323](https://github.com/mkXultra/claude-code-mcp/commit/cc03323df9a24be3c4dcbb6fa1f41d2056b942e4))
|
|
30
|
+
* add semantic-release with npm trusted publishing ([ffdf7c8](https://github.com/mkXultra/claude-code-mcp/commit/ffdf7c876060c96cfaf58a74573bda462552fd83))
|
|
31
|
+
* add wait tool ,support gemini 3.9 and continue conversation gemini ([5d249ca](https://github.com/mkXultra/claude-code-mcp/commit/5d249ca7c36a6ea2eea26fd15b4796b2721d19f3))
|
|
32
|
+
* Codex セッション再開機能とMCP設定ファイルの追加 ([d02b329](https://github.com/mkXultra/claude-code-mcp/commit/d02b329a69df0fcfef65e16609cbb78dc582f1ff))
|
|
33
|
+
* Finalize server with dynamic path finding and JSON output ([6c3c410](https://github.com/mkXultra/claude-code-mcp/commit/6c3c4106f4c5f6fdc5cc8e25bb3b0ea142d7e015))
|
|
34
|
+
* Integrate CWD parsing from prompt, fix lint errors ([5113edb](https://github.com/mkXultra/claude-code-mcp/commit/5113edba01a905637075a34fe771d0df66aef6e1))
|
|
35
|
+
* Organize screenshots, enhance CI, and clean up Git tracking ([7bbc42d](https://github.com/mkXultra/claude-code-mcp/commit/7bbc42d8df204ff6cb1a704ab812d97ff55a2bda))
|
|
36
|
+
* Refine server, JSON parsing, docs, and metadata ([4ab9a7f](https://github.com/mkXultra/claude-code-mcp/commit/4ab9a7f8ee0d84d730e3f0faba6fed302be23736))
|
|
37
|
+
* Resolve npm link, ESM import, and MCP config issues ([7b0cc83](https://github.com/mkXultra/claude-code-mcp/commit/7b0cc8395eddf25f53835a79d156efee6363bc2a))
|
|
38
|
+
* **server:** Prepend system instruction to Claude prompts for broader file access context ([08b9f2d](https://github.com/mkXultra/claude-code-mcp/commit/08b9f2d0cfb0294758cb05cdfc63ec9e5a414b53))
|
|
39
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([4382617](https://github.com/mkXultra/claude-code-mcp/commit/4382617bf90924e7df66c807240f928fa3b45507))
|
|
40
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([855be94](https://github.com/mkXultra/claude-code-mcp/commit/855be9478cdd2772ff03ea26b2541561422e8599))
|
|
41
|
+
* support codex for gpt5 ([e3111d8](https://github.com/mkXultra/claude-code-mcp/commit/e3111d822c33fd58e6c18adbf8ecd4e31919cf9f))
|
|
42
|
+
* Unify tools into agentic 'code' tool (v1.4.0) ([87c6704](https://github.com/mkXultra/claude-code-mcp/commit/87c6704ea0bed49140e271d56a50cf268dc510e2))
|
|
43
|
+
* update 'code' tool description in server.ts for clarity and power ([dfd2327](https://github.com/mkXultra/claude-code-mcp/commit/dfd2327abff2123fc9b3cccb8d5f6e2cdfc01d1d))
|
|
44
|
+
|
|
45
|
+
# 1.0.0 (2026-01-20)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* Apply npm pkg fix for bin path ([e47140d](https://github.com/mkXultra/claude-code-mcp/commit/e47140d6beebacc60ca1cf55903608f9f207ff94))
|
|
51
|
+
* Remove commented-out debug logs from server.ts ([1ef44bb](https://github.com/mkXultra/claude-code-mcp/commit/1ef44bb280fea68dc874fb0d978fea682ddbb681))
|
|
52
|
+
* retry release after tag cleanup ([825838b](https://github.com/mkXultra/claude-code-mcp/commit/825838b05b7e6a10ae01d7bc7bb9179a8d6095bc))
|
|
53
|
+
* rm not use param ([ad9670c](https://github.com/mkXultra/claude-code-mcp/commit/ad9670cfe04507e40abab2427702b680b00353db))
|
|
54
|
+
* trigger release for semantic-release setup ([5e117ee](https://github.com/mkXultra/claude-code-mcp/commit/5e117ee31583ccef2e49c820c815c19716abe392))
|
|
55
|
+
* update tests to match current implementation ([2aa7758](https://github.com/mkXultra/claude-code-mcp/commit/2aa775813678d0a9da7150411fd9a1429ff7736f))
|
|
56
|
+
* use VITEST env check for test detection and add createTestClient helper ([84fa153](https://github.com/mkXultra/claude-code-mcp/commit/84fa1535aa2c50acf9d5a9650bf881df7ff8d470))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Features
|
|
60
|
+
|
|
61
|
+
* Add CHANGELOG and finalize server ([c50a6bb](https://github.com/mkXultra/claude-code-mcp/commit/c50a6bbb5d7dd8d849b1877e19e97a5aedd63493))
|
|
62
|
+
* add CWD to code prompt and bump version to 1.1.0 ([b62c9c2](https://github.com/mkXultra/claude-code-mcp/commit/b62c9c2c802f84d0d4eb80e970d08ef25a1a9c40))
|
|
63
|
+
* add Gemini CLI support to MCP server ([a9942bc](https://github.com/mkXultra/claude-code-mcp/commit/a9942bc3b0410f5cb45e99108d1b13c252cc5655))
|
|
64
|
+
* Add GitHub Actions CI workflow for build checks ([#2](https://github.com/mkXultra/claude-code-mcp/issues/2)) ([613c0cb](https://github.com/mkXultra/claude-code-mcp/commit/613c0cb855b408d83c661a2317db328548dc72e8))
|
|
65
|
+
* add process cleanup tool and simplify list output ([cc03323](https://github.com/mkXultra/claude-code-mcp/commit/cc03323df9a24be3c4dcbb6fa1f41d2056b942e4))
|
|
66
|
+
* add semantic-release with npm trusted publishing ([ffdf7c8](https://github.com/mkXultra/claude-code-mcp/commit/ffdf7c876060c96cfaf58a74573bda462552fd83))
|
|
67
|
+
* add wait tool ,support gemini 3.9 and continue conversation gemini ([5d249ca](https://github.com/mkXultra/claude-code-mcp/commit/5d249ca7c36a6ea2eea26fd15b4796b2721d19f3))
|
|
68
|
+
* Codex セッション再開機能とMCP設定ファイルの追加 ([d02b329](https://github.com/mkXultra/claude-code-mcp/commit/d02b329a69df0fcfef65e16609cbb78dc582f1ff))
|
|
69
|
+
* Finalize server with dynamic path finding and JSON output ([6c3c410](https://github.com/mkXultra/claude-code-mcp/commit/6c3c4106f4c5f6fdc5cc8e25bb3b0ea142d7e015))
|
|
70
|
+
* Integrate CWD parsing from prompt, fix lint errors ([5113edb](https://github.com/mkXultra/claude-code-mcp/commit/5113edba01a905637075a34fe771d0df66aef6e1))
|
|
71
|
+
* Organize screenshots, enhance CI, and clean up Git tracking ([7bbc42d](https://github.com/mkXultra/claude-code-mcp/commit/7bbc42d8df204ff6cb1a704ab812d97ff55a2bda))
|
|
72
|
+
* Refine server, JSON parsing, docs, and metadata ([4ab9a7f](https://github.com/mkXultra/claude-code-mcp/commit/4ab9a7f8ee0d84d730e3f0faba6fed302be23736))
|
|
73
|
+
* Resolve npm link, ESM import, and MCP config issues ([7b0cc83](https://github.com/mkXultra/claude-code-mcp/commit/7b0cc8395eddf25f53835a79d156efee6363bc2a))
|
|
74
|
+
* **server:** Prepend system instruction to Claude prompts for broader file access context ([08b9f2d](https://github.com/mkXultra/claude-code-mcp/commit/08b9f2d0cfb0294758cb05cdfc63ec9e5a414b53))
|
|
75
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([4382617](https://github.com/mkXultra/claude-code-mcp/commit/4382617bf90924e7df66c807240f928fa3b45507))
|
|
76
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([855be94](https://github.com/mkXultra/claude-code-mcp/commit/855be9478cdd2772ff03ea26b2541561422e8599))
|
|
77
|
+
* support codex for gpt5 ([e3111d8](https://github.com/mkXultra/claude-code-mcp/commit/e3111d822c33fd58e6c18adbf8ecd4e31919cf9f))
|
|
78
|
+
* Unify tools into agentic 'code' tool (v1.4.0) ([87c6704](https://github.com/mkXultra/claude-code-mcp/commit/87c6704ea0bed49140e271d56a50cf268dc510e2))
|
|
79
|
+
* update 'code' tool description in server.ts for clarity and power ([dfd2327](https://github.com/mkXultra/claude-code-mcp/commit/dfd2327abff2123fc9b3cccb8d5f6e2cdfc01d1d))
|
|
80
|
+
|
|
81
|
+
# 1.0.0 (2026-01-20)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
### Bug Fixes
|
|
85
|
+
|
|
86
|
+
* Apply npm pkg fix for bin path ([e47140d](https://github.com/mkXultra/claude-code-mcp/commit/e47140d6beebacc60ca1cf55903608f9f207ff94))
|
|
87
|
+
* Remove commented-out debug logs from server.ts ([1ef44bb](https://github.com/mkXultra/claude-code-mcp/commit/1ef44bb280fea68dc874fb0d978fea682ddbb681))
|
|
88
|
+
* rm not use param ([ad9670c](https://github.com/mkXultra/claude-code-mcp/commit/ad9670cfe04507e40abab2427702b680b00353db))
|
|
89
|
+
* trigger release for semantic-release setup ([5e117ee](https://github.com/mkXultra/claude-code-mcp/commit/5e117ee31583ccef2e49c820c815c19716abe392))
|
|
90
|
+
* update tests to match current implementation ([2aa7758](https://github.com/mkXultra/claude-code-mcp/commit/2aa775813678d0a9da7150411fd9a1429ff7736f))
|
|
91
|
+
* use VITEST env check for test detection and add createTestClient helper ([84fa153](https://github.com/mkXultra/claude-code-mcp/commit/84fa1535aa2c50acf9d5a9650bf881df7ff8d470))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
|
|
96
|
+
* Add CHANGELOG and finalize server ([c50a6bb](https://github.com/mkXultra/claude-code-mcp/commit/c50a6bbb5d7dd8d849b1877e19e97a5aedd63493))
|
|
97
|
+
* add CWD to code prompt and bump version to 1.1.0 ([b62c9c2](https://github.com/mkXultra/claude-code-mcp/commit/b62c9c2c802f84d0d4eb80e970d08ef25a1a9c40))
|
|
98
|
+
* add Gemini CLI support to MCP server ([a9942bc](https://github.com/mkXultra/claude-code-mcp/commit/a9942bc3b0410f5cb45e99108d1b13c252cc5655))
|
|
99
|
+
* Add GitHub Actions CI workflow for build checks ([#2](https://github.com/mkXultra/claude-code-mcp/issues/2)) ([613c0cb](https://github.com/mkXultra/claude-code-mcp/commit/613c0cb855b408d83c661a2317db328548dc72e8))
|
|
100
|
+
* add process cleanup tool and simplify list output ([cc03323](https://github.com/mkXultra/claude-code-mcp/commit/cc03323df9a24be3c4dcbb6fa1f41d2056b942e4))
|
|
101
|
+
* add semantic-release with npm trusted publishing ([ffdf7c8](https://github.com/mkXultra/claude-code-mcp/commit/ffdf7c876060c96cfaf58a74573bda462552fd83))
|
|
102
|
+
* add wait tool ,support gemini 3.9 and continue conversation gemini ([5d249ca](https://github.com/mkXultra/claude-code-mcp/commit/5d249ca7c36a6ea2eea26fd15b4796b2721d19f3))
|
|
103
|
+
* Codex セッション再開機能とMCP設定ファイルの追加 ([d02b329](https://github.com/mkXultra/claude-code-mcp/commit/d02b329a69df0fcfef65e16609cbb78dc582f1ff))
|
|
104
|
+
* Finalize server with dynamic path finding and JSON output ([6c3c410](https://github.com/mkXultra/claude-code-mcp/commit/6c3c4106f4c5f6fdc5cc8e25bb3b0ea142d7e015))
|
|
105
|
+
* Integrate CWD parsing from prompt, fix lint errors ([5113edb](https://github.com/mkXultra/claude-code-mcp/commit/5113edba01a905637075a34fe771d0df66aef6e1))
|
|
106
|
+
* Organize screenshots, enhance CI, and clean up Git tracking ([7bbc42d](https://github.com/mkXultra/claude-code-mcp/commit/7bbc42d8df204ff6cb1a704ab812d97ff55a2bda))
|
|
107
|
+
* Refine server, JSON parsing, docs, and metadata ([4ab9a7f](https://github.com/mkXultra/claude-code-mcp/commit/4ab9a7f8ee0d84d730e3f0faba6fed302be23736))
|
|
108
|
+
* Resolve npm link, ESM import, and MCP config issues ([7b0cc83](https://github.com/mkXultra/claude-code-mcp/commit/7b0cc8395eddf25f53835a79d156efee6363bc2a))
|
|
109
|
+
* **server:** Prepend system instruction to Claude prompts for broader file access context ([08b9f2d](https://github.com/mkXultra/claude-code-mcp/commit/08b9f2d0cfb0294758cb05cdfc63ec9e5a414b53))
|
|
110
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([4382617](https://github.com/mkXultra/claude-code-mcp/commit/4382617bf90924e7df66c807240f928fa3b45507))
|
|
111
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([855be94](https://github.com/mkXultra/claude-code-mcp/commit/855be9478cdd2772ff03ea26b2541561422e8599))
|
|
112
|
+
* support codex for gpt5 ([e3111d8](https://github.com/mkXultra/claude-code-mcp/commit/e3111d822c33fd58e6c18adbf8ecd4e31919cf9f))
|
|
113
|
+
* Unify tools into agentic 'code' tool (v1.4.0) ([87c6704](https://github.com/mkXultra/claude-code-mcp/commit/87c6704ea0bed49140e271d56a50cf268dc510e2))
|
|
114
|
+
* update 'code' tool description in server.ts for clarity and power ([dfd2327](https://github.com/mkXultra/claude-code-mcp/commit/dfd2327abff2123fc9b3cccb8d5f6e2cdfc01d1d))
|
|
115
|
+
|
|
116
|
+
# 1.0.0 (2026-01-20)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Bug Fixes
|
|
120
|
+
|
|
121
|
+
* Apply npm pkg fix for bin path ([e47140d](https://github.com/mkXultra/claude-code-mcp/commit/e47140d6beebacc60ca1cf55903608f9f207ff94))
|
|
122
|
+
* Remove commented-out debug logs from server.ts ([1ef44bb](https://github.com/mkXultra/claude-code-mcp/commit/1ef44bb280fea68dc874fb0d978fea682ddbb681))
|
|
123
|
+
* rm not use param ([ad9670c](https://github.com/mkXultra/claude-code-mcp/commit/ad9670cfe04507e40abab2427702b680b00353db))
|
|
124
|
+
* update tests to match current implementation ([2aa7758](https://github.com/mkXultra/claude-code-mcp/commit/2aa775813678d0a9da7150411fd9a1429ff7736f))
|
|
125
|
+
* use VITEST env check for test detection and add createTestClient helper ([84fa153](https://github.com/mkXultra/claude-code-mcp/commit/84fa1535aa2c50acf9d5a9650bf881df7ff8d470))
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
### Features
|
|
129
|
+
|
|
130
|
+
* Add CHANGELOG and finalize server ([c50a6bb](https://github.com/mkXultra/claude-code-mcp/commit/c50a6bbb5d7dd8d849b1877e19e97a5aedd63493))
|
|
131
|
+
* add CWD to code prompt and bump version to 1.1.0 ([b62c9c2](https://github.com/mkXultra/claude-code-mcp/commit/b62c9c2c802f84d0d4eb80e970d08ef25a1a9c40))
|
|
132
|
+
* add Gemini CLI support to MCP server ([a9942bc](https://github.com/mkXultra/claude-code-mcp/commit/a9942bc3b0410f5cb45e99108d1b13c252cc5655))
|
|
133
|
+
* Add GitHub Actions CI workflow for build checks ([#2](https://github.com/mkXultra/claude-code-mcp/issues/2)) ([613c0cb](https://github.com/mkXultra/claude-code-mcp/commit/613c0cb855b408d83c661a2317db328548dc72e8))
|
|
134
|
+
* add process cleanup tool and simplify list output ([cc03323](https://github.com/mkXultra/claude-code-mcp/commit/cc03323df9a24be3c4dcbb6fa1f41d2056b942e4))
|
|
135
|
+
* add semantic-release with npm trusted publishing ([ffdf7c8](https://github.com/mkXultra/claude-code-mcp/commit/ffdf7c876060c96cfaf58a74573bda462552fd83))
|
|
136
|
+
* add wait tool ,support gemini 3.9 and continue conversation gemini ([5d249ca](https://github.com/mkXultra/claude-code-mcp/commit/5d249ca7c36a6ea2eea26fd15b4796b2721d19f3))
|
|
137
|
+
* Codex セッション再開機能とMCP設定ファイルの追加 ([d02b329](https://github.com/mkXultra/claude-code-mcp/commit/d02b329a69df0fcfef65e16609cbb78dc582f1ff))
|
|
138
|
+
* Finalize server with dynamic path finding and JSON output ([6c3c410](https://github.com/mkXultra/claude-code-mcp/commit/6c3c4106f4c5f6fdc5cc8e25bb3b0ea142d7e015))
|
|
139
|
+
* Integrate CWD parsing from prompt, fix lint errors ([5113edb](https://github.com/mkXultra/claude-code-mcp/commit/5113edba01a905637075a34fe771d0df66aef6e1))
|
|
140
|
+
* Organize screenshots, enhance CI, and clean up Git tracking ([7bbc42d](https://github.com/mkXultra/claude-code-mcp/commit/7bbc42d8df204ff6cb1a704ab812d97ff55a2bda))
|
|
141
|
+
* Refine server, JSON parsing, docs, and metadata ([4ab9a7f](https://github.com/mkXultra/claude-code-mcp/commit/4ab9a7f8ee0d84d730e3f0faba6fed302be23736))
|
|
142
|
+
* Resolve npm link, ESM import, and MCP config issues ([7b0cc83](https://github.com/mkXultra/claude-code-mcp/commit/7b0cc8395eddf25f53835a79d156efee6363bc2a))
|
|
143
|
+
* **server:** Prepend system instruction to Claude prompts for broader file access context ([08b9f2d](https://github.com/mkXultra/claude-code-mcp/commit/08b9f2d0cfb0294758cb05cdfc63ec9e5a414b53))
|
|
144
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([4382617](https://github.com/mkXultra/claude-code-mcp/commit/4382617bf90924e7df66c807240f928fa3b45507))
|
|
145
|
+
* **server:** Release v1.6.0 - Updates timeout, changelog, error handling, and description ([855be94](https://github.com/mkXultra/claude-code-mcp/commit/855be9478cdd2772ff03ea26b2541561422e8599))
|
|
146
|
+
* support codex for gpt5 ([e3111d8](https://github.com/mkXultra/claude-code-mcp/commit/e3111d822c33fd58e6c18adbf8ecd4e31919cf9f))
|
|
147
|
+
* Unify tools into agentic 'code' tool (v1.4.0) ([87c6704](https://github.com/mkXultra/claude-code-mcp/commit/87c6704ea0bed49140e271d56a50cf268dc510e2))
|
|
148
|
+
* update 'code' tool description in server.ts for clarity and power ([dfd2327](https://github.com/mkXultra/claude-code-mcp/commit/dfd2327abff2123fc9b3cccb8d5f6e2cdfc01d1d))
|
|
149
|
+
|
|
1
150
|
# Changelog
|
|
2
151
|
|
|
3
152
|
All notable changes to this project will be documented in this file.
|
|
@@ -123,4 +272,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
123
272
|
- Set default execution timeout for `claude-code-cli` to 5 minutes (300,000 ms).
|
|
124
273
|
|
|
125
274
|
---
|
|
126
|
-
*Older versions might not have detailed changelog entries.*
|
|
275
|
+
*Older versions might not have detailed changelog entries.*
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ This MCP server provides tools that can be used by LLMs to interact with AI CLI
|
|
|
18
18
|
- Run Claude CLI with all permissions bypassed (using `--dangerously-skip-permissions`)
|
|
19
19
|
- Execute Codex CLI with automatic approval mode (using `--full-auto`)
|
|
20
20
|
- Execute Gemini CLI with automatic approval mode (using `-y`)
|
|
21
|
-
- Support multiple AI models: Claude (sonnet, opus, haiku), Codex (gpt-5-
|
|
21
|
+
- Support multiple AI models: Claude (sonnet, opus, haiku), Codex (gpt-5.2-codex, gpt-5.1-codex-mini, gpt-5.1-codex-max, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5-codex, gpt-5-codex-mini, gpt-5), and Gemini (gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview)
|
|
22
22
|
- Manage background processes with PID tracking
|
|
23
23
|
- Parse and return structured outputs from both tools
|
|
24
24
|
|
|
@@ -153,7 +153,7 @@ This server exposes the following tools:
|
|
|
153
153
|
|
|
154
154
|
### `run`
|
|
155
155
|
|
|
156
|
-
Executes a prompt using
|
|
156
|
+
Executes a prompt using Claude CLI, Codex CLI, or Gemini CLI. The appropriate CLI is automatically selected based on the model name.
|
|
157
157
|
|
|
158
158
|
**Arguments:**
|
|
159
159
|
- `prompt` (string, optional): The prompt to send to the AI agent. Either `prompt` or `prompt_file` is required.
|
|
@@ -161,9 +161,10 @@ Executes a prompt using either Claude CLI or Codex CLI. The appropriate CLI is a
|
|
|
161
161
|
- `workFolder` (string, required): The working directory for the CLI execution. Must be an absolute path.
|
|
162
162
|
- `model` (string, optional): The model to use:
|
|
163
163
|
- Claude models: "sonnet", "opus", "haiku"
|
|
164
|
-
- Codex models: "gpt-5-
|
|
165
|
-
- Gemini models: "gemini-2.5-pro", "gemini-2.5-flash"
|
|
166
|
-
- `
|
|
164
|
+
- Codex models: "gpt-5.2-codex", "gpt-5.1-codex-mini", "gpt-5.1-codex-max", "gpt-5.2", "gpt-5.1", "gpt-5.1-codex", "gpt-5-codex", "gpt-5-codex-mini", "gpt-5"
|
|
165
|
+
- Gemini models: "gemini-2.5-pro", "gemini-2.5-flash", "gemini-3-pro-preview"
|
|
166
|
+
- `reasoning_effort` (string, optional): Codex only. Sets `model_reasoning_effort` (allowed: "low", "medium", "high").
|
|
167
|
+
- `session_id` (string, optional): Optional session ID to resume a previous session. Supported for: haiku, sonnet, opus, gemini-2.5-pro, gemini-2.5-flash, gemini-3-pro-preview.
|
|
167
168
|
|
|
168
169
|
### `list_processes`
|
|
169
170
|
|
|
@@ -202,7 +203,8 @@ Terminates a running AI agent process by PID.
|
|
|
202
203
|
"arguments": {
|
|
203
204
|
"prompt": "Create a REST API with Express.js",
|
|
204
205
|
"workFolder": "/Users/username/my_project",
|
|
205
|
-
"model": "gpt-5-
|
|
206
|
+
"model": "gpt-5.2-codex",
|
|
207
|
+
"reasoning_effort": "high"
|
|
206
208
|
}
|
|
207
209
|
}
|
|
208
210
|
```
|
|
@@ -345,8 +347,8 @@ This will open a web interface where you can:
|
|
|
345
347
|
2. Test each tool with different parameters
|
|
346
348
|
3. Test different AI models including:
|
|
347
349
|
- Claude models: `sonnet`, `opus`, `haiku`
|
|
348
|
-
- Codex models: `gpt-5-
|
|
349
|
-
- Gemini models: `gemini-2.5-pro`, `gemini-2.5-flash`
|
|
350
|
+
- Codex models: `gpt-5.2-codex`, `gpt-5.1-codex-mini`, `gpt-5.1-codex-max`, `gpt-5.2`, `gpt-5.1`, `gpt-5.1-codex`, `gpt-5-codex`, `gpt-5-codex-mini`, `gpt-5`
|
|
351
|
+
- Gemini models: `gemini-2.5-pro`, `gemini-2.5-flash`, `gemini-3-pro-preview`
|
|
350
352
|
|
|
351
353
|
Example test: Select the `run` tool and provide:
|
|
352
354
|
- `prompt`: "What is 2+2?"
|
|
@@ -371,4 +373,4 @@ Submit issues and pull requests to the [GitHub repository](https://github.com/mk
|
|
|
371
373
|
|
|
372
374
|
## License
|
|
373
375
|
|
|
374
|
-
MIT
|
|
376
|
+
MIT
|
|
@@ -52,6 +52,10 @@ describe('Claude Code MCP E2E Tests', () => {
|
|
|
52
52
|
type: 'string',
|
|
53
53
|
description: expect.stringContaining('sonnet'),
|
|
54
54
|
},
|
|
55
|
+
reasoning_effort: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: expect.stringContaining('model_reasoning_effort'),
|
|
58
|
+
},
|
|
55
59
|
session_id: {
|
|
56
60
|
type: 'string',
|
|
57
61
|
description: expect.stringContaining('session ID'),
|
|
@@ -100,7 +100,10 @@ describe('Claude Code Edge Cases', () => {
|
|
|
100
100
|
}));
|
|
101
101
|
const results = await Promise.allSettled(promises);
|
|
102
102
|
const successful = results.filter(r => r.status === 'fulfilled');
|
|
103
|
-
|
|
103
|
+
const failures = results
|
|
104
|
+
.filter((r) => r.status === 'rejected')
|
|
105
|
+
.map((r) => r.reason?.message ?? String(r.reason));
|
|
106
|
+
expect(successful.length, `Concurrent run failures: ${failures.join(' | ')}`).toBeGreaterThan(0);
|
|
104
107
|
});
|
|
105
108
|
});
|
|
106
109
|
describe('Large Prompts', () => {
|
|
@@ -501,6 +501,78 @@ describe('ClaudeCodeServer Unit Tests', () => {
|
|
|
501
501
|
// Verify spawn was called with -r flag
|
|
502
502
|
expect(mockSpawn).toHaveBeenCalledWith(expect.any(String), expect.arrayContaining(['-r', 'test-session-123', '-p', 'test prompt']), expect.any(Object));
|
|
503
503
|
});
|
|
504
|
+
it('should handle session_id parameter for Codex using exec resume', async () => {
|
|
505
|
+
mockHomedir.mockReturnValue('/home/user');
|
|
506
|
+
mockExistsSync.mockReturnValue(true);
|
|
507
|
+
// Set up Server mock
|
|
508
|
+
setupServerMock();
|
|
509
|
+
const module = await import('../server.js');
|
|
510
|
+
// @ts-ignore
|
|
511
|
+
const { ClaudeCodeServer } = module;
|
|
512
|
+
const server = new ClaudeCodeServer();
|
|
513
|
+
const mockServerInstance = vi.mocked(Server).mock.results[0].value;
|
|
514
|
+
// Find the CallToolRequest handler
|
|
515
|
+
const callToolCall = mockServerInstance.setRequestHandler.mock.calls.find((call) => call[0].name === 'callTool');
|
|
516
|
+
const handler = callToolCall[1];
|
|
517
|
+
// Create mock process
|
|
518
|
+
const mockProcess = new EventEmitter();
|
|
519
|
+
mockProcess.pid = 12350;
|
|
520
|
+
mockProcess.stdout = new EventEmitter();
|
|
521
|
+
mockProcess.stderr = new EventEmitter();
|
|
522
|
+
mockProcess.stdout.on = vi.fn();
|
|
523
|
+
mockProcess.stderr.on = vi.fn();
|
|
524
|
+
mockProcess.kill = vi.fn();
|
|
525
|
+
mockSpawn.mockReturnValue(mockProcess);
|
|
526
|
+
const result = await handler({
|
|
527
|
+
params: {
|
|
528
|
+
name: 'run',
|
|
529
|
+
arguments: {
|
|
530
|
+
prompt: 'test prompt',
|
|
531
|
+
workFolder: '/tmp',
|
|
532
|
+
model: 'gpt-5.2',
|
|
533
|
+
session_id: 'codex-session-456'
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
// Verify spawn was called with 'exec resume' subcommand for Codex
|
|
538
|
+
expect(mockSpawn).toHaveBeenCalledWith(expect.any(String), expect.arrayContaining(['exec', 'resume', 'codex-session-456']), expect.any(Object));
|
|
539
|
+
});
|
|
540
|
+
it('should handle session_id parameter for Gemini using -r flag', async () => {
|
|
541
|
+
mockHomedir.mockReturnValue('/home/user');
|
|
542
|
+
mockExistsSync.mockReturnValue(true);
|
|
543
|
+
// Set up Server mock
|
|
544
|
+
setupServerMock();
|
|
545
|
+
const module = await import('../server.js');
|
|
546
|
+
// @ts-ignore
|
|
547
|
+
const { ClaudeCodeServer } = module;
|
|
548
|
+
const server = new ClaudeCodeServer();
|
|
549
|
+
const mockServerInstance = vi.mocked(Server).mock.results[0].value;
|
|
550
|
+
// Find the CallToolRequest handler
|
|
551
|
+
const callToolCall = mockServerInstance.setRequestHandler.mock.calls.find((call) => call[0].name === 'callTool');
|
|
552
|
+
const handler = callToolCall[1];
|
|
553
|
+
// Create mock process
|
|
554
|
+
const mockProcess = new EventEmitter();
|
|
555
|
+
mockProcess.pid = 12351;
|
|
556
|
+
mockProcess.stdout = new EventEmitter();
|
|
557
|
+
mockProcess.stderr = new EventEmitter();
|
|
558
|
+
mockProcess.stdout.on = vi.fn();
|
|
559
|
+
mockProcess.stderr.on = vi.fn();
|
|
560
|
+
mockProcess.kill = vi.fn();
|
|
561
|
+
mockSpawn.mockReturnValue(mockProcess);
|
|
562
|
+
const result = await handler({
|
|
563
|
+
params: {
|
|
564
|
+
name: 'run',
|
|
565
|
+
arguments: {
|
|
566
|
+
prompt: 'test prompt',
|
|
567
|
+
workFolder: '/tmp',
|
|
568
|
+
model: 'gemini-2.5-pro',
|
|
569
|
+
session_id: 'gemini-session-789'
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
// Verify spawn was called with -r flag for Gemini
|
|
574
|
+
expect(mockSpawn).toHaveBeenCalledWith(expect.any(String), expect.arrayContaining(['-r', 'gemini-session-789']), expect.any(Object));
|
|
575
|
+
});
|
|
504
576
|
it('should handle prompt_file parameter', async () => {
|
|
505
577
|
mockHomedir.mockReturnValue('/home/user');
|
|
506
578
|
mockExistsSync.mockImplementation((path) => {
|
|
@@ -111,7 +111,7 @@ const DEFAULT_SERVER_PATH = 'dist/server.js';
|
|
|
111
111
|
* Automatically unsets VITEST env so the server actually starts
|
|
112
112
|
*/
|
|
113
113
|
export function createTestClient(options = {}) {
|
|
114
|
-
const { serverPath = DEFAULT_SERVER_PATH, claudeCliName = '/tmp/claude-code-test-mock/claudeMocked', debug = true, env = {}, } = options;
|
|
114
|
+
const { serverPath = DEFAULT_SERVER_PATH, claudeCliName = process.env.TEST_CLAUDE_CLI_NAME || '/tmp/claude-code-test-mock/claudeMocked', debug = true, env = {}, } = options;
|
|
115
115
|
return new MCPTestClient(serverPath, {
|
|
116
116
|
VITEST: '', // Unset so server starts
|
|
117
117
|
MCP_CLAUDE_DEBUG: debug ? 'true' : '',
|
|
@@ -2,12 +2,14 @@ import { ClaudeMock } from './claude-mock.js';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
4
|
let sharedMock = null;
|
|
5
|
+
const workerId = process.env.VITEST_WORKER_ID || process.env.VITEST_POOL_ID || process.pid.toString();
|
|
6
|
+
const mockName = `claudeMocked-${workerId}`;
|
|
7
|
+
const mockPath = join('/tmp', 'claude-code-test-mock', mockName);
|
|
5
8
|
export async function getSharedMock() {
|
|
6
9
|
if (!sharedMock) {
|
|
7
|
-
sharedMock = new ClaudeMock(
|
|
10
|
+
sharedMock = new ClaudeMock(mockName);
|
|
8
11
|
}
|
|
9
12
|
// Always ensure mock exists
|
|
10
|
-
const mockPath = join('/tmp', 'claude-code-test-mock', 'claudeMocked');
|
|
11
13
|
if (!existsSync(mockPath)) {
|
|
12
14
|
console.error(`[DEBUG] Mock not found at ${mockPath}, creating it...`);
|
|
13
15
|
await sharedMock.setup();
|
|
@@ -15,6 +17,7 @@ export async function getSharedMock() {
|
|
|
15
17
|
else {
|
|
16
18
|
console.error(`[DEBUG] Mock already exists at ${mockPath}`);
|
|
17
19
|
}
|
|
20
|
+
process.env.TEST_CLAUDE_CLI_NAME = mockPath;
|
|
18
21
|
return sharedMock;
|
|
19
22
|
}
|
|
20
23
|
export async function cleanupSharedMock() {
|
|
@@ -88,6 +88,7 @@ describe('Argument Validation Tests', () => {
|
|
|
88
88
|
prompt: z.string(),
|
|
89
89
|
workFolder: z.string(),
|
|
90
90
|
model: z.string().optional(),
|
|
91
|
+
reasoning_effort: z.string().optional(),
|
|
91
92
|
session_id: z.string().optional()
|
|
92
93
|
});
|
|
93
94
|
// Test valid cases
|
|
@@ -113,6 +114,7 @@ describe('Argument Validation Tests', () => {
|
|
|
113
114
|
prompt: z.string(),
|
|
114
115
|
workFolder: z.string(),
|
|
115
116
|
model: z.string().optional(),
|
|
117
|
+
reasoning_effort: z.string().optional(),
|
|
116
118
|
session_id: z.string().optional()
|
|
117
119
|
});
|
|
118
120
|
// Test invalid cases
|
|
@@ -126,6 +128,7 @@ describe('Argument Validation Tests', () => {
|
|
|
126
128
|
prompt: z.string(),
|
|
127
129
|
workFolder: z.string(),
|
|
128
130
|
model: z.string().optional(),
|
|
131
|
+
reasoning_effort: z.string().optional(),
|
|
129
132
|
session_id: z.string().optional()
|
|
130
133
|
});
|
|
131
134
|
try {
|
|
@@ -143,6 +146,7 @@ describe('Argument Validation Tests', () => {
|
|
|
143
146
|
prompt: z.string(),
|
|
144
147
|
workFolder: z.string(),
|
|
145
148
|
model: z.string().optional(),
|
|
149
|
+
reasoning_effort: z.string().optional(),
|
|
146
150
|
session_id: z.string().optional()
|
|
147
151
|
});
|
|
148
152
|
const result = schema.parse({ prompt: 'test', workFolder: '/tmp' });
|
|
@@ -154,6 +158,7 @@ describe('Argument Validation Tests', () => {
|
|
|
154
158
|
prompt: z.string(),
|
|
155
159
|
workFolder: z.string(),
|
|
156
160
|
model: z.string().optional(),
|
|
161
|
+
reasoning_effort: z.string().optional(),
|
|
157
162
|
session_id: z.string().optional()
|
|
158
163
|
});
|
|
159
164
|
// By default, Zod strips unknown keys
|
|
@@ -231,5 +236,35 @@ describe('Argument Validation Tests', () => {
|
|
|
231
236
|
}
|
|
232
237
|
})).rejects.toThrow('Either prompt or prompt_file must be provided');
|
|
233
238
|
});
|
|
239
|
+
it('should reject invalid reasoning_effort values', async () => {
|
|
240
|
+
await setupServer();
|
|
241
|
+
const handler = handlers.get('callTool');
|
|
242
|
+
await expect(handler({
|
|
243
|
+
params: {
|
|
244
|
+
name: 'run',
|
|
245
|
+
arguments: {
|
|
246
|
+
prompt: 'test',
|
|
247
|
+
workFolder: '/tmp',
|
|
248
|
+
model: 'gpt-5.2-codex',
|
|
249
|
+
reasoning_effort: 'fast'
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
})).rejects.toThrow(/reasoning_effort/i);
|
|
253
|
+
});
|
|
254
|
+
it('should reject reasoning_effort for non-codex models', async () => {
|
|
255
|
+
await setupServer();
|
|
256
|
+
const handler = handlers.get('callTool');
|
|
257
|
+
await expect(handler({
|
|
258
|
+
params: {
|
|
259
|
+
name: 'run',
|
|
260
|
+
arguments: {
|
|
261
|
+
prompt: 'test',
|
|
262
|
+
workFolder: '/tmp',
|
|
263
|
+
model: 'sonnet',
|
|
264
|
+
reasoning_effort: 'low'
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
})).rejects.toThrow(/reasoning_effort/i);
|
|
268
|
+
});
|
|
234
269
|
});
|
|
235
270
|
});
|
package/dist/parsers.js
CHANGED
|
@@ -9,13 +9,23 @@ export function parseCodexOutput(stdout) {
|
|
|
9
9
|
const lines = stdout.trim().split('\n');
|
|
10
10
|
let lastMessage = null;
|
|
11
11
|
let tokenCount = null;
|
|
12
|
+
let threadId = null;
|
|
12
13
|
for (const line of lines) {
|
|
13
14
|
if (line.trim()) {
|
|
14
15
|
try {
|
|
15
16
|
const parsed = JSON.parse(line);
|
|
16
|
-
if (parsed.
|
|
17
|
+
if (parsed.type === 'thread.started' && parsed.thread_id) {
|
|
18
|
+
threadId = parsed.thread_id;
|
|
19
|
+
}
|
|
20
|
+
else if (parsed.item?.type === 'agent_message') {
|
|
21
|
+
lastMessage = parsed.item.text;
|
|
22
|
+
}
|
|
23
|
+
else if (parsed.msg?.type === 'agent_message') {
|
|
17
24
|
lastMessage = parsed.msg.message;
|
|
18
25
|
}
|
|
26
|
+
else if (parsed.item?.type === 'reasoning') {
|
|
27
|
+
// Ignore reasoning-only items for message selection.
|
|
28
|
+
}
|
|
19
29
|
else if (parsed.msg?.type === 'token_count') {
|
|
20
30
|
tokenCount = parsed.msg;
|
|
21
31
|
}
|
|
@@ -26,10 +36,11 @@ export function parseCodexOutput(stdout) {
|
|
|
26
36
|
}
|
|
27
37
|
}
|
|
28
38
|
}
|
|
29
|
-
if (lastMessage || tokenCount) {
|
|
39
|
+
if (lastMessage || tokenCount || threadId) {
|
|
30
40
|
return {
|
|
31
41
|
message: lastMessage,
|
|
32
|
-
token_count: tokenCount
|
|
42
|
+
token_count: tokenCount,
|
|
43
|
+
session_id: threadId
|
|
33
44
|
};
|
|
34
45
|
}
|
|
35
46
|
}
|