open-index/open-npm huggingface dataset:
npm package: @ming-suhi/djs-firestore
Description: A package for managing your Discord bot's structured Firestore.
Author: 明suhi
Latest version: 0.1.0

<p align="center">
  <img src="https://raw.githubusercontent.com/ming-suhi/ming-suhi/master/djs-firestore.svg" width="100" align="center" />
</p>

<p align="center">
  <a href="https://github.com/ming-suhi/djs-firestore" target="_blank">
    <strong>@ming-suhi/djs-firestore</strong>
  </a>
</p>

<p align="center">Powered by Firebase Firestore</p>


## I. About
A package for managing your Discord bot's structured Firestore. For an in-depth documentation visit the <a href="https://ming-suhi.github.io/djs-firestore/" target="_blank">documentation website</a>. 


## II. Getting Started

## A. Installing

##### Run npm install on the command line or terminal.
```
npm install @ming-suhi/djs-firestore
```


## B. Setting environment

1. Create a `.env` file in the root directory

    ```
    PROJECT_ID=
    CLIENT_EMAIL=
    PRIVATE_KEY=
    ```

2. Get `project_id`, `client_email`, and `private_key` of your Firebase service account and store it correspondingly.

## C. Setting up manager

1. Require `FirestoreManager`
    ```js
    const { FirestoreManager } = require('@ming-suhi/djs-firestore');
    ```

2. Attach an instance to discord client.
    ```js
    client.db = new FirestoreManager();
    ```

3. Initialize guilds.
    ```js
    client.db.initializeGuilds(client);
    ```

## D. Creating base documents

1. Listen to `guildCreate`
    ```js
    client.on('guildCreate', async guild => {
      // Code here
    });
    ```

2. Create guild doc.
    ```js
    // If needed require GuildDocument
    const { GuildDocument } = = require('@ming-suhi/djs-firestore');
    // Check if a guild doc for the guild exist
    var guildDb = client.db.guilds.get(guild.id);
    // If not existing create document
    if (!guildDb) {
      var guildDb = new GuildDocument(guild.id);
      guildDb.initialize();
      await guildDb.update({id: guild.id, name: guild.name});
      // Put a reference to guilds
      client.db.guilds.set(guild.id, guildDb);
    }
    ```

## E. Other methods

1. Get field method
    ```js
    const guildDb = client.db.guilds.get(guildId);
    const fieldValue = guildDb.get('fieldName');
    console.log(fieldValue);
    ```

2. Update method
    ```js
    const guildDb = client.db.guilds.get(guildId);
    await guildDb.update({"updated": true});
    ```

3. Delete method
    ```js
    const guildDb = client.db.guilds.get(guildId);
    await guildDb.delete();
    ```


## III. Contributing
## A. Issues
This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.

For help and questions about using this project, please open a GitHub issue.

## B. Pull requests

1. Fork the project.

2. Create a topic branch from master.

3. Make some commits to improve the project.

4. Push this branch to your GitHub project.

5. Open a Pull Request on GitHub.

6. Discuss, and optionally continue committing.


## IV. License
MIT © 明suhi
npm package: @ming-suhi/djsc-cli
Description: A package for posting, updating, deleting slash commands from your terminal.
Author: 明suhi
Latest version: 1.1.0

<p align="right">
  <a href="https://discord.com/invite/P3UMxQCEaY" target="_blank">
    <img src="https://discordapp.com/api/guilds/753818535440023593/widget.png?style=shield" alt="Discord Server">
  </a>
</p>
<p align="right">
  <a href="https://discord.com/invite/P3UMxQCEaY" target="_blank">
    <text>Join Support Server | Meet Developer</text>
  </a>
</p>

# **[@ming-suhi/djsc-cli](https://github.com/ming-suhi/djsc-cli)**
A package for posting, updating, and deleting Discord Application Commands from the command line or terminal. 

It has a `sync` command; which will `post` to discord local commands not posted, `update` to discord commands modified locally, and `delete` from discord commands that doesn't exist locally.

It also offers manual `post` and `delete` command to accommodate special needs. To make manual operations more easier, the package also offers a `compare` command that compares the status of commands locally and on Discord. Open CLI package main menu for list of commands.

## Quick Start
### A. Installing

Run npm install on the command line or terminal.
```
npm install @ming-suhi/djsc-cli
```

### B. Setting up config

Create a config file on the project root with name `djsc.config.js`.
```js
module.exports = {
  appId: "DISCORD_APPLICATION_ID",
  botToken: "DISCORD_BOT_TOKEN",
  mapCommands: () => {
    // function that return array of JSON(raw-data) of local commands
  }
}
``` 

For `discord.js` builders, it has an inbuilt function for getting the raw-data of a command.
```js
mapCommands: () => {
  // Example for discord.js users
  const commands = [];
  const commandsDir = path.resolve("src/commands");
  for(let filePath of fs.readdirSync(commandsDir)) {
    const commandPath = path.resolve(commandsDir, filePath);
    const command = require(commandPath);
    commands.push(command.toJSON());
  }
  return commands;
}
```
`mapCommands` is essential because it is through which that the cli package can sense the local commands.

### C. Usage
To access the main menu of the cli tool, open a terminal inside the project directory and run `npx djsc` or `npx djsc help`.
```
npx djsc
```

## Contributing
### A. Issues
This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new issue.

For help and questions about using this project, please open a GitHub issue.

### B. Pull requests

1. Fork the project.

2. Create a topic branch from master.

3. Make some commits to improve the project.

4. Push this branch to your GitHub project.

5. Open a Pull Request on GitHub.

6. Discuss, and optionally continue committing.


## License
MIT © 明suhi
npm package: @ming2882/ele-designer
Description: 好用的Vue低代码可视化表单设计器，可以通过拖拽的方式快速创建表单，提高开发者对表单的开发效率。
Author: xaboy
Latest version: 3.4.4

<p align="center">
    <a href="https://www.form-create.com">
        <img width="300" alt="FormCreate" src="https://static.form-create.com/file/img/info-logo2.png">
    </a>
</p>

<p align="center">
    <a href="https://www.form-create.com/" target="_blank">官网</a>
    <span>&nbsp;|&nbsp;</span>
    <a href="https://view.form-create.com/" target="_blank">帮助文档</a>
    <span>&nbsp;|&nbsp;</span>
    <a href="https://form-create.com/v3/designer/" target="_blank">在线演示</a>
    <span>&nbsp;|&nbsp;</span>
    <a href="https://form-create.com/v3/" target="_blank">FormCreate 文档</a>
</p>

<p align="center">
  <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="TIM" /></a>
  <a href="https://github.com/xaboy/form-create" target="_blank"><img src="https://img.shields.io/npm/dt/@form-create/designer.svg" alt="dt" /></a>
</p>

**FcDesigner 是基于 [@form-create/element-ui](https://github.com/xaboy/form-create) 实现的低代码表单设计器组件。可以通过拖拽的方式快速创建表单，提高开发者对表单的开发效率，节省开发者的时间。支持 Vue2 和 Vue3**

[![FcDesigner](https://static.form-create.com/file/img/banner-m2.jpg?20251027)](https://pro.form-create.com/view)

## 特点

- 使用 JSON 数据生成表单
- 支持扩展自定义组件
- 内置 30+常用的表单组件和布局组件
- 提供丰富的表单操作 API
- 支持子表单和分组
- 支持事件配置
- 支持样式配置
- 支持表格布局
- 支持表单验证
- 支持多语言
- 支持表单多语言

## 支持的 UI 框架

[![FcDesigner](https://static.form-create.com/file/img/products.jpg)](https://form-create.com/)

> 如果对您有帮助，您可以点右上角 **"Star"** 支持一下 谢谢！本项目还在不断开发完善中,如有任何建议或问题[请在这里提出](https://github.com/xaboy/form-create-designer/issues/new)

> 开发者讨论群[629709230](https://jq.qq.com/?_wv=1027&k=F1FlEFIV)

- **预览**

![demo1](https://static.form-create.com/file/img/open-designer.jpg)

## 引入

**CDN:**

```html
<link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css"></link>
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/element-plus/dist/index.full.js"></script>
<script src="https://unpkg.com/@form-create/element-ui@next/dist/form-create.min.js"></script>
<script src="https://unpkg.com/@form-create/designer@next/dist/index.umd.js"></script>
```

**NodeJs:**

```shell
npm install @form-create/designer@next
npm install @form-create/element-ui@next
npm install element-plus
```

```js
import FcDesigner from "@form-create/designer";
import ELEMENT from "element-plus";
import "element-plus/dist/index.css";

app.use(ELEMENT);
app.use(FcDesigner);
app.use(FcDesigner.formCreate);
```

## 使用

```html
<fc-designer ref="designer" />
```

## 联系

![http://static.form-create.com/file/img/support.jpg](http://static.form-create.com/file/img/support.jpg)

## License

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2021-present xaboy

二次修改以下功能：

1、表格表单 设计 增加字段排序调整；

2、表单表单 展示 新增复制、数据排序等功能

3、增加数据表格，描述列表，显示字段组件

4、对栅格布局增加标题控制
npm package: @ming822/ocr-reciept-helper
Description: Extract all the pairs of an item and a price of the reciept object from google ocr api response
Author: Minji Kim
Latest version: 1.0.2

![npm](https://img.shields.io/npm/v/@ming822/ocr-reciept-helper)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@ming822/ocr-reciept-helper)


# Ocr Reciept Helper
Ocr Reciept Helper is a javascript library for extracting all the pairs of an item and a price of a reciept object from google ocr api response.
Notice
- Specialized in the forms of reciepts in Korea
- Using Linear equation when detect a line of an item and a price 
  - Work well with Rotated or sligtly curved reciepts
  - Poor work with curved or folded reciepts

## Installation
Use npm to install ocr reciept helper.
```bash
npm install @ming822/ocr-reciept-helper
```

## Usage

- `response.json` below is a response from your [google ocr api request] (https://cloud.google.com/vision/docs/ocr?)
- parameters when declare new instance
  - `resJson` : required. the object of google api response. It must have textAnnotations.
  - `placeName` : the name of the place of receipt.
  - `sumKeywords`
    - the words which refer sum.
    - they play a role of startline to detect lines of reciepts.
    - recommend to use common words at the bottom parts of receipt as it detects from bottom to top.
  - `dateKeywords` : the words which refer date.
  - `skipwords` : all the unnecessary words
- variables of an instance
  - `whitespace`
    - the minimum distance of phrase
    - an average width of all the character * 2
    - return value of `calcSpace` method
  - `dateInfo`
    - lines which contains dateKeywords.
    - also check lines of yyyy-mm-dd or yyyy-m-d through `findDate` in `getDateInfo`
  - `priceTable`
    - all the pairs of an item and a price of reciepts
    - pairs which are expected to be below the skipwords and above the sumKeywords are extracted through `filterSkipwords`

```javascript
const recieptHelper = require('@ming822/ocr-reciept-helper')

const res = fs.readFileSync('response.json', {encoding:'utf-8', flag:'r'})
const resJson = JSON.parse(res)
const reciept = new recieptHelper(resJson)
console.log(reciept.priceTable)
```

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License
[MIT](https://choosealicense.com/licenses/mit/)
npm package: @minga/text-clipper
Description: Fast and correct clip functions for HTML and plain text.
Author: Speakap B.V.
Latest version: 1.2.2

text-clipper.js
===============

Fast and correct clip functions for HTML and plain text.

[![Build Status](https://travis-ci.org/arendjr/text-clipper.svg?branch=master)](https://travis-ci.org/arendjr/text-clipper)
[![text-clipper on NPM](https://img.shields.io/npm/v/text-clipper.svg)](https://www.npmjs.com/package/text-clipper)

Written by [Arend van Beelen jr.](https://github.com/arendjr) @ [Speakap](https://www.speakap.com).

Why use text-clipper?
---------------------

text-clipper offers the following advantages over similar libraries that allow clipping HTML:

 * **Correctness**
   * HTML is processed through a proper state machine, no regular expression hacks.
   * Valid HTML input always produces valid HTML output.
   * Heavily unit-tested to support the above statement.
 * **Proper Unicode handling**
   * Unicode-awareness makes sure Unicode characters such as emojis don't get clipped halfway.
 * **Performance**
   * Text-clipper has been carefully optimized and is typically as fast as or faster than its
     competitors (see: [blog](http://www.arendjr.nl/2016/09/how-i-made-text-clipper-fastest-html.html)).
 * **Consistent API and behavior for both HTML and plain text**

Setup
-----

Make sure you have Node.js installed and run:

    $ npm install text-clipper

Usage
-----

Basic example:

    var clip = require('text-clipper');
    var clippedString = clip(string, 80); // returns a string of at most 80 characters

You can also specify options:

    var clippedHtml = clip(htmlString, 140, { html: true, maxLines: 5 });

Options
-------

### breakWords

By default, text-clipper tries to break only at word boundaries so words don't get clipped halfway.
Set this option to `true` if you want words to be broken up.

### html

By default, text-clipper treats the input string as plain text. This is undesirable if the input
string is HTML, because it might result in broken HTML tags. Set this option to `true` to make
text-clipper treat the input as HTML, in which case it will try to always return valid HTML,
provided the input is valid as well.

### imageWeight

The amount of characters to assume for images. This is used whenever an image is encountered, but
also for embedded SVG and MathML content. The default is 2.

### newlineWeight

The amount of characters to assume for newlines. This is used whenever a newline is encountered. By
default this is 1.

### indicator

The string to insert to indicate the string was clipped. Default: `'…'`.

Note the indicator is only inserted when the clipping doesn't occur at a line-break.

### maxLines

Maximum amount of lines allowed. If given, the string will be clipped either at the moment the
maximum amount of characters is exceeded or the moment maxLines newlines are discovered, whichever
comes first.

Note when in HTML mode, block-level elements trigger newlines and text-clipper assumes the text
will be displayed with a CSS white-space setting that treats `\n` as a line break. Of course the
HTML tag `<br>` is also counted.
npm package: @mingai/core
Description: MingAI Core - 命理计算工具核心库（SDK）
Latest version: 3.0.0

# @mingai/core

MingAI 的命理术数算法核心库。

它提供两类能力：

- 各术数（八字、紫薇、奇门、大六壬、六爻、梅花易数、塔罗、黄历）的算法、类型，以及规范化 text/json 输出
- MCP 工具定义、输入校验、执行入口与统一响应适配

## 安装

```bash
npm install @mingai/core
```

如需使用 GitHub Packages 镜像包，请改用 `@hhszzzz/mingai-core`。npmjs 主包名仍然是 `@mingai/core`。

## Quick Start

### 直接使用某个术数

```ts
import { calculateBazi, toBaziText, toBaziJson } from '@mingai/core/bazi';

const chart = calculateBazi({
  gender: 'male',
  birthYear: 1990,
  birthMonth: 1,
  birthDay: 15,
  birthHour: 9,
});

const text = toBaziText(chart);
const json = toBaziJson(chart);
```

### 按 MCP 工具名执行

```ts
import { executeTool, renderToolResult } from '@mingai/core/mcp';

const result = await executeTool('qimen', {
  year: 2026,
  month: 3,
  day: 19,
  hour: 21,
  minute: 30,
  timezone: 'Asia/Shanghai',
});

const rendered = renderToolResult('qimen', result, 'json');
```

## 选择入口

- `@mingai/core`
  - 根入口，聚合常用术数能力与类型
- `@mingai/core/mcp`
  - MCP 工具执行与输出适配
- `@mingai/core/<domain>`
  - 某个术数的算法、类型、`to*Text()`、`to*Json()`

当前 domain 子路径包括：

- `@mingai/core/bazi`
- `@mingai/core/bazi-dayun`
- `@mingai/core/bazi-pillars-resolve`
- `@mingai/core/almanac`
- `@mingai/core/liuyao`
- `@mingai/core/meihua`
- `@mingai/core/ziwei`
- `@mingai/core/ziwei-horoscope`
- `@mingai/core/ziwei-flying-star`
- `@mingai/core/qimen`
- `@mingai/core/daliuren`
- `@mingai/core/tarot`

额外公开的共享子路径：

- `@mingai/core/utils`
- `@mingai/core/timezone-utils`
- `@mingai/core/data/hexagrams`
- `@mingai/core/data/shensha`

## 包结构

- `domains/`
  - 各术数 domain 的算法、本领域类型，以及 canonical text/json 输出
- `mcp/`
  - MCP 工具定义、schema、执行与统一 payload 适配
- `shared/`
  - 跨 domain 复用的公共工具
- `data/`
  - 干支、神煞、卦象文本等基础数据

## 工具列表

| 工具 | 说明 |
|------|------|
| `bazi` | 八字排盘 |
| `bazi_pillars_resolve` | 四柱反推出生时间候选 |
| `bazi_dayun` | 大运、小运、流年链路计算 |
| `ziwei` | 紫微斗数排盘 |
| `ziwei_horoscope` | 紫微运限 |
| `ziwei_flying_star` | 紫微飞星与四化落宫分析 |
| `liuyao` | 六爻排卦与分析 |
| `meihua` | 梅花易数起卦与断卦 |
| `tarot` | 塔罗抽牌 |
| `almanac` | 黄历与择日信息 |
| `qimen` | 奇门遁甲排盘 |
| `daliuren` | 大六壬排盘 |

## 输出约定

`@mingai/core/mcp` 的 `renderToolResult(...)` 和 `buildToolSuccessPayload(...)` 使用统一输出契约：

- `content`
  - 始终返回 canonical text，适合直接阅读
- `structuredContent`
  - 当工具声明了 `outputSchema` 时返回 canonical JSON，适合程序消费

也就是说：

- 如果你是人类阅读场景，读 `content`
- 如果你是 schema 驱动场景，读 `structuredContent`

## 地点与真太阳时

- `@mingai/core` 本身不接地图服务，也不会把地点名自动换算成经度
- `birthPlace` 仅用于展示或存档
- 需要真太阳时时，请显式传入 `longitude`
- 如果上层只收“广东广州”这类地点名，应先在 web/server 或 MCP 外层做地理编码，再把经度传给 core

## Related Packages

- [`@mingai/mcp`](https://www.npmjs.com/package/@mingai/mcp)
  - 适合本地 `stdio` MCP Server 场景
- [`@mingai/mcp-server`](https://www.npmjs.com/package/@mingai/mcp-server)
  - 适合独立部署的 MCP 服务端场景
npm package: @mingai/mcp
Description: MingAI MCP Server - 命理计算工具 (stdio)
Latest version: 3.0.0

# @mingai/mcp

MingAI 的本地 `stdio` MCP Server，适合直接接入 Claude Desktop、Cursor、Cherry Studio 等支持 MCP 的客户端。

## 快速开始

在 MCP 客户端配置中加入：

```json
{
  "mcpServers": {
    "mingai": {
      "command": "npx",
      "args": ["-y", "@mingai/mcp"]
    }
  }
}
```

要求：

- 本机已安装 [Node.js](https://nodejs.org/)
- 客户端支持 MCP `stdio` 连接方式

如需从 GitHub Packages 安装镜像包，请改用 `@hhszzzz/mingai-mcp`，并把 `@hhszzzz` scope 指向 `https://npm.pkg.github.com`。npmjs 主包名仍然是 `@mingai/mcp`。

## 可用工具

| 工具 | 说明 |
|------|------|
| `bazi` | 八字排盘 |
| `bazi_pillars_resolve` | 四柱反推 |
| `bazi_dayun` | 大运、小运、流年链路 |
| `ziwei` | 紫微斗数排盘 |
| `ziwei_horoscope` | 紫微运限 |
| `ziwei_flying_star` | 紫微飞星 |
| `liuyao` | 六爻排卦分析 |
| `meihua` | 梅花易数起卦与断卦 |
| `tarot` | 塔罗抽牌 |
| `almanac` | 黄历查询 |
| `qimen` | 奇门遁甲排盘 |
| `daliuren` | 大六壬排盘 |

所有工具都支持 `responseFormat`：

- `json`: `content[0].text` 返回 canonical text
- `markdown`: `content[0].text` 返回适合直接展示给 AI 的规范文本

`liuyao` 额外支持 `detailLevel`：

- `safe`（默认）：返回 AI-safe 降噪结构
- `debug`：在 safe 结构外附带 `debug.rawCanonical` 与 `debug.rawText`

当工具定义存在 `outputSchema` 时，本地 MCP 响应会统一返回：

- `structuredContent`: canonical JSON，并与工具 `outputSchema` 对齐
- `content`: 文本通道；`responseFormat=json` 与 `responseFormat=markdown` 都承载 canonical text

这套响应策略由 `@mingai/core/transport` 统一提供。

注意：

- canonical JSON 在 `structuredContent`
- `content[0].text` 只用于人类/AI 阅读，不再作为 JSON 通道

关于出生地点与真太阳时：

- 本地 `@mingai/mcp` 当前不做在线地理编码。
- 若需要真太阳时，请显式传入 `longitude`。
- 若你只有地点名，需要由调用方先做地理编码，再把经度传给工具。

## 其他安装方式

```bash
npm install -g @mingai/mcp
```

全局安装后也可以在 MCP 客户端中改成：

```json
{
  "mcpServers": {
    "mingai": {
      "command": "mingai-mcp"
    }
  }
}
```

## 本地开发

```bash
pnpm install
pnpm -C packages/core build
pnpm -C packages/mcp build
node packages/mcp/dist/index.js
```

## 相关包

- [`@mingai/core`](https://www.npmjs.com/package/@mingai/core): 共享算法、工具定义与 transport 适配器

## 版本批次

| 版本 | 批次说明 |
|------|----------|
| `3.0.0` | 新增 `meihua` 梅花易数，优化架构 |
| `2.0.0` | 规范输出结构：`content` 输出规范文本，`structuredContent` 输出 JSON |
| `1.5.0` | 同步导出、共享、结构化输出策略与在线服务对齐 |
| `1.4.0` | 新增 `daliuren` 大六壬 |
| `1.3.0` | 新增 `qimen` 奇门遁甲 |
| `1.2.6` | 补丁，集中修复输出契约、鉴权与运行时边界 |
| `1.2.5` | 旧基线版本，作为本次版本重排的对比起点 |
npm package: @mingai/mcp-core
Description: MingAI MCP Core - 命理计算工具核心库
Latest version: 1.2.5
Deprecated: 已迁移到 @mingai/core，请勿继续使用。MCP 本地服务请改用 @mingai/mcp。

# @mingai/mcp-core

MingAI 命理计算核心库，提供八字、紫微斗数、六爻、塔罗等计算能力。

可作为 SDK 直接在 Node.js 项目中调用，也是 [@mingai/mcp](https://www.npmjs.com/package/@mingai/mcp) 的底层依赖。

## 安装

```bash
npm install @mingai/mcp-core
```

## 使用示例

```typescript
import { handleToolCall } from '@mingai/mcp-core';

// 八字排盘（支持真太阳时）
const bazi = await handleToolCall('bazi_calculate', {
  gender: 'male',
  birthYear: 1990,
  birthMonth: 1,
  birthDay: 15,
  birthHour: 9,
  longitude: 116.4, // 可选：出生地经度，启用真太阳时校正
});

// 紫微斗数排盘（含宫干自化、流年虚岁、斗君等）
const ziwei = await handleToolCall('ziwei_calculate', {
  gender: 'male',
  birthYear: 2003,
  birthMonth: 9,
  birthDay: 2,
  birthHour: 10,
  birthMinute: 30,
  longitude: 116.4, // 可选：出生地经度，启用真太阳时校正
});

// 六爻排卦
const liuyao = await handleToolCall('liuyao', {
  question: '事业发展如何',
  yongShenTargets: ['官鬼'],
});
```

## 可用工具

| 工具 | 说明 |
|------|------|
| `bazi_calculate` | 八字排盘 |
| `bazi_pillars_resolve` | 八字反查（四柱 → 出生时间候选） |
| `bazi_dayun` | 八字大运计算 |
| `ziwei_calculate` | 紫微斗数排盘（含长生12神、博士12神、四化分布等） |
| `ziwei_horoscope` | 紫微运限（大限/小限/流年/流月/流日/流时） |
| `ziwei_flying_star` | 紫微飞星分析（飞化/自化/四化落宫/三方四正） |
| `liuyao` | 六爻排卦分析 |
| `tarot` | 塔罗抽牌 |
| `almanac` | 黄历查询 |

## API

```typescript
import { tools, handleToolCall, formatAsMarkdown } from '@mingai/mcp-core';

// tools - 所有工具的定义数组（含 inputSchema / outputSchema）
// handleToolCall(name, args) - 调用指定工具，返回结构化结果
// formatAsMarkdown(name, result) - 将结果格式化为 Markdown 文本
```

## 如果你想在 AI 客户端中使用

不需要直接安装 mcp-core，请使用 [@mingai/mcp](https://www.npmjs.com/package/@mingai/mcp)，它是开箱即用的 MCP Server：

```json
{
  "mcpServers": {
    "mingai": {
      "command": "npx",
      "args": ["-y", "@mingai/mcp"]
    }
  }
}
```

## 更新日志

### 1.2.4 (2026-03-15)

**全工具硬算法功能大幅扩充：**

**八字 (bazi_calculate):**
- ✨ 新增天干五合检测（相邻柱甲己/乙庚/丙辛/丁壬/戊癸合化）
- ✨ 新增地支半合检测（8种半合模式，排除已成三合）
- ✨ 神煞扩充至51种（太极贵人、文昌、禄神、飞刃、驿马、桃花、华盖、将星、劫煞、亡神、灾煞、孤辰寡宿、红鸾天喜、魁罡、阴差阳错、十恶大败、三奇、天罗地网等）
- 🐛 三合局神煞改为同时检查年支和日支

**大运流年 (bazi_dayun):**
- ✨ 新增大运与原局地支关系分析（六合/六冲/三合/相刑/相害）
- ✨ 每步大运含10年流年详情（干支、十神、纳音、地支关系）
- ✨ 新增太岁标注（值/冲/合/刑/害/破太岁）
- ✨ 新增小运排列（时柱起算，阳男阴女顺排）

**六爻 (liuyao):**
- ✨ 新增互卦、错卦、综卦计算
- ✨ 新增卦身计算（世爻阳从子起/阴从午起）
- ✨ 新增时间起卦（梅花易数，先天八卦数）
- ✨ 新增数字起卦（2数法/3数法）

**紫微斗数 (ziwei_calculate + ziwei_horoscope):**
- ✨ 新增命主星（时辰查表）、身主星（年支查表）
- ✨ 新增小限（三合局起始宫，男顺女逆，12年循环）
- ✨ 新增博士十二星（禄存起始，阳男阴女/阴男阳女方向）
- ✨ 新增流年星曜（流禄/流羊/流陀/流昌/流曲）
- ✨ 每宫输出三方四正宫位

**塔罗 (tarot):**
- ✨ 新增5种牌阵（马蹄形/抉择/身心灵/处境分析/是否）
- ✨ 78张牌全部添加独立逆位关键词
- ✨ 22张大阿卡纳添加星座/行星对应
- ✨ 全部牌添加元素对应（火/水/风/土）

**黄历 (almanac):**
- ✨ 新增方位系统（财神/喜神/福神/阳贵/阴贵）
- ✨ 新增建除十二值星、黄道黑道日、天神
- ✨ 新增12时辰吉凶（干支/天神/冲煞/宜忌）
- ✨ 新增二十八星宿、纳音

### 1.1.4 (2026-03-13)

**六爻增强：**
- ✨ `liuyao` 的 `date` 字段现为必填，且必须包含时间部分（格式：`YYYY-MM-DDTHH:MM` 或 `YYYY-MM-DD HH:MM:SS`），时辰影响时柱与空亡计算
- 🗑️ 移除 `seed` 输入参数，改为基于日期时辰自动生成确定性随机序列（相同日期时辰可复现）
npm package: @mingbo_zhang/utils
Description: <!--  * @Descripttion:   * @version: 1.0.0  * @Author: mingbo.zhang@hand-china.com  * @Date: 2022-04-26 15:25:23  * @LastEditors: mingbo.zhang@hand-china.com  * @LastEditTime: 2022-04-26 15:25:25 -->
Latest version: 1.0.0

<!--
 * @Descripttion: 
 * @version: 1.0.0
 * @Author: mingbo.zhang@hand-china.com
 * @Date: 2022-04-26 15:25:23
 * @LastEditors: mingbo.zhang@hand-china.com
 * @LastEditTime: 2022-04-26 15:25:25
-->
npm package: @mingchang137/pdf-to-image-node
Description: 不依賴 canvas 的 PDF 轉圖片 Node.js Library
Latest version: 0.0.1

# `pdf-to-image-node` - 不依賴 `canvas` 的 PDF 轉圖片 Node.js Library

> [!IMPORTANT]  
> 安裝本套件前，需要先在作業系統中安裝 `poppler` 與 `cairo` 動態連結庫
>
> -   `poppler`：[https://poppler.freedesktop.org/](https://poppler.freedesktop.org/)
> -   `cairo` ：[https://www.cairographics.org/download/](https://www.cairographics.org/download/)

## 使用範例

```javascript
import { PdfToImage } from "pdf-to-image-node";

// 指定輸出 PNG 檔案時，以多少 DPI 渲染 PDF 檔，預設為 `150`，不修改可填 null 或 undefined
const targetDpi = 100;
try {
    new PdfToImage("*PDF 檔案路徑*", "*PDF 檔案密碼，如無密碼可留空或填 null*").toImage(
        "*輸出檔案目錄路徑*",
        targetDpi
    );
} catch (error) {
    /// TODO: 可能的錯誤場景，請參閱每個 method 的 TypeScript Type Definition
}
```
npm package: @mingchang137/pdf-to-image-node-darwin-arm64
Description: 不依賴 canvas 的 PDF 轉圖片 Node.js Library
Latest version: 0.0.1

# `@mingchang137/pdf-to-image-node-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@mingchang137/pdf-to-image-node`
npm package: @mingchang137/pdf-to-image-node-darwin-x64
Description: 不依賴 canvas 的 PDF 轉圖片 Node.js Library
Latest version: 0.0.1

# `@mingchang137/pdf-to-image-node-darwin-x64`

This is the **x86_64-apple-darwin** binary for `@mingchang137/pdf-to-image-node`
npm package: @mingchang137/pdf-to-image-node-linux-x64-gnu
Description: 不依賴 canvas 的 PDF 轉圖片 Node.js Library
Latest version: 0.0.1

# `@mingchang137/pdf-to-image-node-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@mingchang137/pdf-to-image-node`