open-index/open-npm huggingface dataset:
npm package: @onedayai/web-search
Description: 一个具备网页搜索能力的 MCP（模型上下文协议）插件，允许大语言模型执行网页搜索并获取相关信息。
Latest version: 0.0.1

# @onedayai/web-search

[![npm version](https://img.shields.io/npm/v/@onedayai/web-search)](https://www.npmjs.com/package/@onedayai/web-search)

一个具备网页搜索能力的 MCP（模型上下文协议）插件，允许大语言模型执行网页搜索并获取相关信息。

## 功能

- `web_search` - 执行网页搜索
- `batch_search` - 并发批量搜索（最多 10 个并发，上限 100 个查询）
- `web_fetch` - 获取并提取网页内容（支持 full / truncated / selective 三种模式，自动识别 HTML 与非 HTML 内容）
- `batch_fetch` - 并发批量获取网页内容（最多 10 个并发，上限 100 个 URL）

## 安装

```bash
npm install -g @onedayai/web-search
```

## 配置

### 环境变量

| 变量 | 必填 | 默认值 | 说明 |
|------|------|--------|------|
| `ANTHROPIC_BASE_URL` | 否 | - | API 基础地址 |
| `ANTHROPIC_AUTH_TOKEN` | 否 | - | API-KEY，留空读环境变量 |
| `MCP_ENDPOINT` | 否 | `${ANTHROPIC_BASE_URL}/mcp/kiro-search` | 搜索端点（优先级最高） |

### Claude Desktop 配置

在 `~/.config/claude/claude_desktop_config.json` 中添加：

```json
{
  "mcpServers": {
    "onedayai-web-search": {
      "command": "npx",
      "args": ["-y", "@onedayai/web-search"],
      "env": {
        "MCP_ENDPOINT": "https://your-mcp-endpoint/mcp/kiro-search"
      }
    }
  }
}
```

## 工具说明

### web_search

搜索网页，返回结果包含：
- `title` - 标题
- `url` - 链接
- `snippet` - 摘要
- `publishedDate` - 发布日期
- `isPublicDomain` - 是否公共领域
- `id` - 唯一标识
- `domain` - 域名

### batch_search

并发批量搜索，支持数组或换行分隔的查询字符串。最多 10 个并发请求，上限 100 个查询，自动去重。

参数：
- `queries` - 查询列表（数组或换行分隔字符串）
- `maxResultsPerQuery` - 每个查询的最大结果数（默认 10）

### web_fetch

获取并提取网页内容，仅支持 HTTPS。对于 HTML 内容使用 Readability 提取正文，非 HTML 内容（JSON、纯文本等）直接返回原文。

参数：
- `url` - 目标 URL（必须为 HTTPS）
- `mode` - 获取模式：
  - `truncated` - 截断模式，8KB 预览（默认）
  - `full` - 完整模式，最大 10MB
  - `selective` - 选择模式，仅返回包含指定短语的段落
- `searchPhrase` - selective 模式下必填，要搜索的短语

### batch_fetch

并发批量获取多个 URL 的内容。最多 10 个并发请求，上限 100 个 URL，自动去重和 HTTPS 验证。无效 URL 会返回错误项而非静默跳过。

参数：
- `urls` - URL 列表（数组或换行分隔字符串）
- `mode` - `full` 或 `truncated`（默认 `truncated`）

## 开发

```bash
# 开发模式
npm run dev

# 构建
npm run build

# 测试
npm test
```

## 测试

```bash
# 测试 tools/list
echo '{"jsonrpc":"2.0","id":"1","method":"tools/list"}' | node dist/index.js

# 测试 web_search
MCP_ENDPOINT=http://127.0.0.1:8080/mcp/kiro-search node dist/index.js <<< '{"jsonrpc":"2.0","id":"2","method":"tools/call","params":{"name":"web_search","arguments":{"query":"TypeScript tutorial"}}}'
```

## License

MIT
npm package: @onedaycat/gqlimport
Description: import multiple graphql schema
Author: Onedaycat
Latest version: 1.0.0

# gqlscalars

Use [gqlgen](https://github.com/99designs/gqlgen)

## Installation

```sh
go get -u github.com/onedaycat/gqlscalars/...
```

## Custom Scalars

In `.gqlgen.yml` point to the name without the Marshal|Unmarshal in front:

```yml
models:
  AWSJSON:
    model: github.com/onedaycat/gqlscalars.AWSJSON
```

Add type in gqaphql schema

```graphql
scalar AWSJSON

Query {
  ...
}

Mutation {
  ...
}
```

Run cmd on directory which graphql schema

```sh
gqlscalars
```

## Schema Directives

If you get missing ditrective error, add directive in graphql schema

```graphql
directive @aws_subscribe(mutations: [String]!) on FIELD_DEFINITION
```

## Graphql Import

[Read doc](https://oss.prisma.io/content/graphql-import/overview)

### Installation

```sh
npm install -g @onedaycat/gqlimport
```

### Usage

```sh
gqlimport <root_schema> <to_schema>
Example: gqlimport ./main.graphql ./schema.graphql
```
npm package: @onedaycat/ts-error
Description: A library to create application error
Author: Onedaycat
Latest version: 2.0.5

[![npm (scoped)](https://img.shields.io/npm/v/@onedaycat/ts-error.svg)](https://www.npmjs.com/package/@onedaycat/ts-error)
[![GitHub](https://img.shields.io/github/license/onedaycat/ts-error.svg)](LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/onedaycat/ts-error/badge.svg?branch=master)](https://coveralls.io/github/onedaycat/ts-error?branch=master)
[![Build Status](https://travis-ci.org/onedaycat/ts-error.svg?branch=master)](https://travis-ci.org/onedaycat/ts-error)

# ts-error
A library to create application error, there are 8 definition type that including
- BAD_REQUEST
- NOT_FOUND
- TIMEOUT
- FORBIDDEN
- UNAUTHORIZED
- MAINTENANCE
- VALIDATION_ERROR
- INTERNAL_ERROR

## Install
```sh
npm install @onedaycat/ts-error
```

## Usage
```typescript
import { def } from '@onedaycat/ts-error';

// define application error
const error = {
  userNotFound: def.notFound('user_not_found', 'user not found');
  productNotFound: def.notFound('product_not_found', 'product not found');
}

try {
  // do stuff
} catch (e) {
  // throw application error that defined instead
  throw error.userNotFound.new().withCause(e);
}
```

## Contributing
1. Fork this repository.
2. Create new branch with feature name in format `feature/FEATURE_NAME`
3. Run `npm install` or `yarn`
3. Create your feature.
4. Commit and set commit message with feature name.
5. Push your code to your fork repository.
6. Create pull request.
npm package: @onedaycat/ts-validator
Description: Application validator
Author: Onedaycat
Latest version: 1.2.4

[![npm (scoped)](https://img.shields.io/npm/v/@onedaycat/ts-validator.svg)](https://www.npmjs.com/package/@onedaycat/ts-validator)
[![GitHub](https://img.shields.io/github/license/onedaycat/ts-validator.svg)](LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/onedaycat/ts-validator/badge.svg?branch=master)](https://coveralls.io/github/onedaycat/ts-validator?branch=master)
[![Build Status](https://travis-ci.org/onedaycat/ts-validator.svg?branch=master)](https://travis-ci.org/onedaycat/ts-validator)

# ts-validator
Application validator. Internally uses [validator.js](https://github.com/chriso/validator.js) to perform validation.

## Install
```sh
npm install @onedaycat/ts-validator
```
or
```sh
yarn add @onedaycat/ts-validator
```

## Usage
```typescript
import Validator, { isEmail } from '@onedaycat/ts-validator'

const schema = {
  email: [isEmail()],
}
const values = {
  email: 'john.doe@mail.com',
}

// throw error
Validator.test(schema, values)
```

## Example
#### Main.ts
Customizing the error messages **(optional)**.

```typescript
import Validator from '@onedaycat/ts-validator'

Validator.message = {
  ...Validator.message,
  min: 'YOUR_MESSAGE'
  max: 'YOUR_MESSAGE'
}
```

### SignInInput.ts
```typescript
import Validator, { isEmail, min } from '@onedaycat/ts-validator'

export default class SignInInput {
  constructor(
    public email: string,
    public password: string,
  ) {}

  public validate() { 
    const schema = {
      email: [isEmail()],
      password: [min(10)]
    }

    const values = {
      email: this.email,
      password: this.password,
    }

    // throw error
    Validator.test(schema, values)
  }
}
```

## Validators
| Validators | Description |
|------------|-------------|
| min(value: number) | check if the number is less than or equal to minimum. |
| max(value: number) | check if the number is more than or equal to maximum. |
| isEmail() | check if the string is an email. |
| isEmpty() | check if the string has a length of zero. |
| isNotEmpty() | check if the string has length more than zero. |
| compareWith(field: string) | check if the value matched with the expected field. |
| minLength(value: number) | check if the string has length less than or equal to minimum. |
| maxLength(value: number) | check if the string has length more than or equal to maximum. |

## Contributing
1. Fork this repository.
2. Create new branch with feature name in format `feature/FEATURE_NAME`
3. Run `npm install` or `yarn`
3. Create your feature.
4. Commit and set commit message with feature name.
5. Push your code to your fork repository.
6. Create pull request.

## Licence
[MIT](LICENSE)
npm package: @onedaycat/vue-test-actions
Description: A utility to unit test Vuex actions
Author: Onedaycat
Latest version: 1.0.6

[![npm (scoped)](https://img.shields.io/npm/v/@onedaycat/vue-test-actions.svg)](https://www.npmjs.com/package/@onedaycat/vue-test-actions)
[![GitHub](https://img.shields.io/github/license/onedaycat/vue-test-actions.svg)](LICENSE)
[![Coverage Status](https://coveralls.io/repos/github/onedaycat/vue-test-actions/badge.svg?branch=master)](https://coveralls.io/github/onedaycat/vue-test-actions?branch=master)
[![Build Status](https://travis-ci.org/onedaycat/vue-test-actions.svg?branch=master)](https://travis-ci.org/onedaycat/vue-test-actions)

# vue-test-actions
A utility to unit test Vuex actions

## Install
```sh
npm install @onedaycat/vue-test-actions
```
or
```sh
yarn add @onedaycat/vue-test-actions
```

## Usage
```typescript
import testAction from '@onedaycat/vue-test-actions'

const value = await testAction(ACTION, EXPECTED_MUTATIONS, EXPECTED_DISPATCHS, ACTION_PAYLOAD, STORE)
```

## Example
#### types.ts
```typescript
export enum Mutations {
  FETCH_PRODUCT_BEGIN = 'fetchProductBegin',
  FETCH_PRODUCT_SUCCESS = 'fetchProductSuccess',
  FETCH_PRODUCT_FAILURE = 'fetchProductFailure',
}
```

#### actions.ts
```typescript
import { ActionTree } from 'vuex'
import { Mutations } from './types'

const actions: ActionTree<Store.Product, Store.Root> = {
  async fetchProduct(context, payload: number) {
    context.commit(Mutations.FETCH_PRODUCT_BEGIN)
    try {
      context.commit(Mutations.FETCH_PRODUCT_SUCCESS, payload)
    } catch (e) {
      context.commit(Mutations.FETCH_PRODUCT_FAILURE, e)
    }
  },
}

export default actions
```

#### actions.test.ts
```typescript
import { Mutations } from './types'
import testAction from '@onedaycat/vue-test-actions'
import actions from './actions'

it('should fetch product success', async () => {
  const actionPayload = 1
  const expectedMutations = [{
    type: Mutations.FETCH_PRODUCT_BEGIN,
  }, {
    type: Mutations.FETCH_PRODUCT_SUCCESS,
    payload: actionPayload,
  }]

  const expectedDispatchs = []

  await testAction(actions.fetchProduct, expectedMutations, expectedDispatchs, actionPayload)
})
```

## Contributing
1. Fork this repository.
2. Create new branch with feature name in format `feature/FEATURE_NAME`
3. Run `npm install` or `yarn`
3. Create your feature.
4. Commit and set commit message with feature name.
5. Push your code to your fork repository.
6. Create pull request.

## Licence
[MIT](LICENSE)