Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mode": "pre",
"tag": "alpha",
"initialVersions": {
"@arkts/mcp": "0.0.1"
},
"changesets": []
}
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ jobs:
with:
name: ${{ matrix.settings.artifact }}
path: target

- name: Publish
run: pnpm changeset publish
44 changes: 41 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ on:
pull_request:
branches:
- main
paths:
paths-ignore:
- '!README.md'
- '!LICENSE'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
build:
name: Build
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -44,14 +54,39 @@ jobs:
- name: Build
run: pnpm build --build-exe

- name: Show built files
run: node scripts/tree.ts

- name: Upload Artifacts
uses: actions/upload-artifact@v6
with:
name: ${{ matrix.settings.artifact }}
path: target

test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 25.9.0
registry-url: 'https://registry.npmjs.org'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10.33.0
run_install: true

- name: Test
run: pnpm test:ci

publish:
name: Publish packages to pkg.pr.new
name: Continuous release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
Expand All @@ -71,5 +106,8 @@ jobs:
version: 10.33.0
run_install: true

- name: Build
run: pnpm build

- name: Publish packages
run: pnpm dlx pkg-pr-new publish --compact --pnpm .
run: pnpm dlx pkg-pr-new publish --compact --pnpm --bin .
12 changes: 12 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"servers": {
"arkts-mcp-server": {
"type": "stdio",
"command": "node",
"args": [
"dist/bin.mjs"
]
}
},
"inputs": []
}
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,16 @@
"scss",
"pcss",
"postcss"
],
"cSpell.words": [
"arkts",
"cfworker",
"cppjieba",
"harmonyos",
"minisearch",
"modelcontextprotocol",
"Naily",
"nodejieba",
"vstils"
]
}
13 changes: 13 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Setup & build

- Basic environment: See [package.json](package.json) `packageManager` field and [.node-version](.node-version) file.
- Install steps: `pnpm install`
- Build library: `pnpm build`, outDir is `dist`
- Build library and executable: `pnpm build --build-exe`, the executable outDir is `target`, binary name is `arkts-mcp`
- Executable outDir is `target`
- Executable binary name is `arkts-mcp`; if current platform is Windows, the binary name is `arkts-mcp.exe`
- Must copy the `.node` dynamic library to the executable directory `target/lib`, and the assets (like [logo.png](target/assets/logo.png)) to the executable directory `target/assets`.

## About this mcp server

- This mcp server is for the ArkTS language. ArkTS is a programming language for the HarmonyOS/OpenHarmony platform, It is a superset of TypeScript.
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import antfu from '@antfu/eslint-config'
import naily from 'naily-eslint-config'

export default antfu()
export default naily()
Empty file added install.sh
Empty file.
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@arkts/mcp",
"type": "module",
"version": "1.1.7",
"version": "0.0.1-alpha.0",
"packageManager": "pnpm@10.33.0",
"description": "MCP Server for ArkTS.",
"author": "Naily Zero <zero@naily.cc> (https://naily.cc)",
Expand All @@ -28,7 +28,9 @@
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"bin": "./dist/bin.cjs",
"bin": {
"arkts-mcp": "./dist/bin.mjs"
},
"files": [
"dist"
],
Expand All @@ -38,25 +40,30 @@
"scripts": {
"build": "vp pack",
"test": "vp test watch --globals --coverage --ui",
"test:ci": "vp test --globals --coverage",
"prepublishOnly": "vp pack"
},
"dependencies": {
"@cfworker/json-schema": "^4.1.1",
"@modelcontextprotocol/server": "^2.0.0-alpha.2",
"@vstils/core": "^0.0.8",
"ajv": "^8.18.0",
"axios": "^1.15.0",
"minisearch": "^7.2.0",
"nodejieba": "^3.5.8",
"source-map-support": "^0.5.21",
"zod": "^4.3.6"
},
"devDependencies": {
"@antfu/eslint-config": "^8.2.0",
"@changesets/cli": "^2.31.0",
"@modelcontextprotocol/server": "^2.0.0-alpha.2",
"@tsdown/exe": "^0.21.9",
"@types/node": "^25.6.0",
"@vitest/coverage-v8": "^4.1.4",
"@vitest/ui": "^4.1.4",
"eslint": "^10.2.1",
"naily-eslint-config": "^0.0.3",
"pnpm": "^10.33.0",
"tinyglobby": "^0.2.17",
"typescript": "^6.0.3",
"vite-plus": "^0.1.18"
}
Expand Down
Loading
Loading