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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.1] - 2026-06-05

### Fixed

- MCP: bulk operations (`conv bulk-status`) now carry the MCP `destructiveHint`, so clients prompt before running them — previously only `delete`/`remove` tools were flagged. Corrected the MCP guide to describe exactly which tools are marked destructive (`delete`/`remove`/`bulk`) versus plain writes (`create`/`update`).

## [0.10.0] - 2026-06-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Full command reference for the hscli command-line interface.

<!-- AUTO-GENERATED from the oclif manifest by scripts/gen-commands.mjs — do not edit by hand. -->

Reference for `hscli` v0.10.0 (89 commands). Every command also accepts the global flags `--output table|json|yaml|csv`, `--jq`, `--fields`, `--profile`, `--no-color`, `--verbose`, `--no-retry`, and `--timeout`.
Reference for `hscli` v0.10.1 (89 commands). Every command also accepts the global flags `--output table|json|yaml|csv`, `--jq`, `--fields`, `--profile`, `--no-color`, `--verbose`, `--no-retry`, and `--timeout`.

## Top-level

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wavyx/hscli",
"version": "0.10.0",
"version": "0.10.1",
"publishConfig": {
"access": "public"
},
Expand Down
8 changes: 6 additions & 2 deletions src/lib/mcp/catalog.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ const WRITE_OVERRIDE = new Set(['conv:status'])
* @returns {'read'|'write'|'destructive'}
*/
export function classifyKind(id) {
if (/(^|:)(delete|remove)(-|$)/.test(id)) return 'destructive'
if (WRITE_OVERRIDE.has(id)) return 'write'
const [topic] = id.split(':')
const leaf = id.split(':').pop()
// delete/remove and bulk operations hit data destructively — flag them so MCP
// clients prompt before running them.
if (/^(delete|remove)(-|$)/.test(leaf) || leaf.startsWith('bulk')) {
return 'destructive'
}
if (WRITE_OVERRIDE.has(id)) return 'write'
if (READ_TOPICS.has(topic) || READ_LEAVES.has(leaf)) return 'read'
return 'write'
}
Expand Down
1 change: 1 addition & 0 deletions test/lib/mcp/catalog.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('classifyKind', () => {
['conv:delete', 'destructive'],
['docs:article:delete-draft', 'destructive'],
['webhook:delete', 'destructive'],
['conv:bulk-status', 'destructive'], // bulk ops hit many records — flag for confirm
['conv:status', 'write'], // can mutate via --set, so gated
['conv:reply', 'write'],
['backup', 'write'],
Expand Down
7 changes: 4 additions & 3 deletions website/src/content/docs/automation/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ claude mcp add hscli -- hscli mcp serve --allow-writes
tool is available; when not, write tools simply aren't listed.

:::note[Two layers of safety]
Write tools are gated by `--allow-writes`, **and** each carries an MCP `destructiveHint` so
the client (e.g. Claude Desktop) prompts you to approve a `delete` or `bulk` call before it
runs. Reads are marked `readOnlyHint` and run without prompting.
Write tools are gated by `--allow-writes`, **and** the destructive ones — `delete`, `remove`,
and `bulk` operations — carry an MCP `destructiveHint` so the client (e.g. Claude Desktop)
prompts you before running them. Reads are marked `readOnlyHint` and run without prompting;
other writes (`create`/`update`) carry no hint either way.
:::

## How it maps
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ hscli <group> <action> [target] [flags]
```

Run `hscli <group> --help` for the live, self-describing version of any command.
This page lists all 89 commands in `hscli` v0.10.0.
This page lists all 89 commands in `hscli` v0.10.1.

## alias

Expand Down
Loading