whetstone-mcp 0.1.0__tar.gz
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.
- whetstone_mcp-0.1.0/.gitignore +45 -0
- whetstone_mcp-0.1.0/LICENSE +21 -0
- whetstone_mcp-0.1.0/PKG-INFO +153 -0
- whetstone_mcp-0.1.0/README.md +113 -0
- whetstone_mcp-0.1.0/pyproject.toml +125 -0
- whetstone_mcp-0.1.0/src/whetstone/__init__.py +5 -0
- whetstone_mcp-0.1.0/src/whetstone/compaction.py +256 -0
- whetstone_mcp-0.1.0/src/whetstone/config.py +143 -0
- whetstone_mcp-0.1.0/src/whetstone/embeddings.py +186 -0
- whetstone_mcp-0.1.0/src/whetstone/metrics.py +149 -0
- whetstone_mcp-0.1.0/src/whetstone/paths.py +37 -0
- whetstone_mcp-0.1.0/src/whetstone/retrieval.py +188 -0
- whetstone_mcp-0.1.0/src/whetstone/scoring.py +58 -0
- whetstone_mcp-0.1.0/src/whetstone/server.py +901 -0
- whetstone_mcp-0.1.0/src/whetstone/store/__init__.py +28 -0
- whetstone_mcp-0.1.0/src/whetstone/store/access.py +317 -0
- whetstone_mcp-0.1.0/src/whetstone/store/entries.py +39 -0
- whetstone_mcp-0.1.0/src/whetstone/store/index.py +365 -0
- whetstone_mcp-0.1.0/src/whetstone/store/layout.py +309 -0
- whetstone_mcp-0.1.0/src/whetstone/store/markdown.py +279 -0
- whetstone_mcp-0.1.0/src/whetstone/store/slug.py +68 -0
- whetstone_mcp-0.1.0/src/whetstone/telemetry.py +181 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Agent private working notes (CONTRIBUTING.md §2) — never committed
|
|
2
|
+
.planning/
|
|
3
|
+
|
|
4
|
+
# Agent memory — symlink to the harness's canonical per-project memory dir
|
|
5
|
+
# (~/.claude/projects/<hash>/memory). Kept visible in-tree but never committed.
|
|
6
|
+
/memory
|
|
7
|
+
|
|
8
|
+
# Python
|
|
9
|
+
__pycache__/
|
|
10
|
+
*.py[cod]
|
|
11
|
+
*.egg-info/
|
|
12
|
+
.eggs/
|
|
13
|
+
build/
|
|
14
|
+
dist/
|
|
15
|
+
.venv/
|
|
16
|
+
venv/
|
|
17
|
+
env/
|
|
18
|
+
.pytest_cache/
|
|
19
|
+
.mypy_cache/
|
|
20
|
+
.ruff_cache/
|
|
21
|
+
.coverage
|
|
22
|
+
htmlcov/
|
|
23
|
+
|
|
24
|
+
# Local model / embedding caches
|
|
25
|
+
.cache/
|
|
26
|
+
*.onnx
|
|
27
|
+
|
|
28
|
+
# M3 showcase harness: the live, per-skill Whetstone store the harness seeds while generating
|
|
29
|
+
# artifacts is throwaway (each store is its own nested git repo). The committed proof lives in
|
|
30
|
+
# harness/out/, not here. Secrets for the generation runner also stay local.
|
|
31
|
+
harness/.store/
|
|
32
|
+
harness/.env
|
|
33
|
+
|
|
34
|
+
# M3 Quarto site: rendered output + caches are built by CI (slice 9), not committed. The .qmd
|
|
35
|
+
# sources under docs/ ARE committed.
|
|
36
|
+
docs/_site/
|
|
37
|
+
docs/.quarto/
|
|
38
|
+
.quarto/
|
|
39
|
+
|
|
40
|
+
# great-docs build directory (ephemeral). The great-docs.yml config IS committed; the generated
|
|
41
|
+
# great-docs/ tree (Quarto sources + _site) is rebuilt by `great-docs build` and never committed.
|
|
42
|
+
great-docs/
|
|
43
|
+
|
|
44
|
+
# OS / editor
|
|
45
|
+
.DS_Store
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hrudith Lakshminarasimman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: whetstone-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A local MCP server that lets any skill learn from use.
|
|
5
|
+
Project-URL: Homepage, https://github.com/HrudithL/whetstone
|
|
6
|
+
Project-URL: Repository, https://github.com/HrudithL/whetstone
|
|
7
|
+
Project-URL: Documentation, https://github.com/HrudithL/whetstone
|
|
8
|
+
Author-email: Hrudith Lakshminarasimman <hrudith.lakshminarasimman@posit.co>
|
|
9
|
+
Maintainer-email: Hrudith Lakshminarasimman <hrudith.lakshminarasimman@posit.co>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent,learning,mcp,memory,model-context-protocol,retrieval,skills
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: mcp
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
25
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
26
|
+
Provides-Extra: docs
|
|
27
|
+
Requires-Dist: great-docs>=0.15; extra == 'docs'
|
|
28
|
+
Provides-Extra: embeddings
|
|
29
|
+
Requires-Dist: sentence-transformers; extra == 'embeddings'
|
|
30
|
+
Provides-Extra: showcase
|
|
31
|
+
Requires-Dist: claude-agent-sdk; extra == 'showcase'
|
|
32
|
+
Requires-Dist: great-tables; extra == 'showcase'
|
|
33
|
+
Requires-Dist: ipykernel; extra == 'showcase'
|
|
34
|
+
Requires-Dist: jupyter; extra == 'showcase'
|
|
35
|
+
Requires-Dist: matplotlib; extra == 'showcase'
|
|
36
|
+
Requires-Dist: pandas; extra == 'showcase'
|
|
37
|
+
Requires-Dist: python-pptx; extra == 'showcase'
|
|
38
|
+
Requires-Dist: pyyaml; extra == 'showcase'
|
|
39
|
+
Description-Content-Type: text/markdown
|
|
40
|
+
|
|
41
|
+
# Whetstone
|
|
42
|
+
|
|
43
|
+
A local [MCP](https://modelcontextprotocol.io) server that lets any skill learn from use.
|
|
44
|
+
|
|
45
|
+
Whetstone attaches to an existing skill and maintains a git-tracked, per-skill store of what a
|
|
46
|
+
user likes (`LEARNINGS`) and what the skill got wrong (`ISSUES`), so the skill can improve from
|
|
47
|
+
ordinary use without a benchmark, dataset, or eval harness. See
|
|
48
|
+
[`LEARNING_SKILLS_DESIGN.md`](https://github.com/HrudithL/whetstone/blob/main/LEARNING_SKILLS_DESIGN.md)
|
|
49
|
+
for the full design.
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
Requires Python 3.11+. The base install is light and dependency-free at retrieval time: it uses a
|
|
54
|
+
small, deterministic `hashing` embedding backend (no torch, no network).
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
pipx install whetstone-mcp # installs the `whetstone` command on your PATH
|
|
58
|
+
# or: pip install whetstone-mcp
|
|
59
|
+
# or, run without installing: uvx whetstone-mcp
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
An install (pipx/pip) puts two equivalent console scripts on your PATH — `whetstone` (primary, used
|
|
63
|
+
throughout this README) and `whetstone-mcp` (same entry point, so `pipx run whetstone-mcp` /
|
|
64
|
+
`uvx whetstone-mcp` resolve without the short name).
|
|
65
|
+
|
|
66
|
+
Register it with an MCP host (e.g. Claude Code) — point the host at whichever you used:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
# if you installed it (pipx/pip): the command is already on PATH
|
|
70
|
+
claude mcp add whetstone -- whetstone
|
|
71
|
+
# no install — let uv fetch & run it on demand:
|
|
72
|
+
claude mcp add whetstone -- uvx whetstone-mcp
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For higher-quality embeddings, pull in the optional extra and set
|
|
76
|
+
`embedding_backend = "sentence-transformers"` in config. Match the command to how it's installed:
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
pipx install "whetstone-mcp[embeddings]" # fresh install, with the extra
|
|
80
|
+
pipx inject whetstone-mcp sentence-transformers # add to an existing pipx install
|
|
81
|
+
pip install "whetstone-mcp[embeddings]" # pip
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### From source (contributors)
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
python3 -m venv .venv
|
|
88
|
+
.venv/bin/pip install -e '.[dev]'
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
.venv/bin/pip install -e '.[embeddings]' # pulls in sentence-transformers
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Run
|
|
96
|
+
|
|
97
|
+
Start the stdio MCP server:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
whetstone # PyPI install
|
|
101
|
+
.venv/bin/whetstone # from-source dev install
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Register it with an MCP host (e.g. Claude Code) under the server id `whetstone`, pointing the
|
|
105
|
+
command at the `whetstone` entry point above.
|
|
106
|
+
|
|
107
|
+
## Tools
|
|
108
|
+
|
|
109
|
+
The server exposes five MCP tools:
|
|
110
|
+
|
|
111
|
+
- **`attach`** — register a skill so Whetstone tracks its learned layer (scaffolds the store).
|
|
112
|
+
- **`recall`** — at the start of a task, retrieve the learnings (weighted preferences) and issues
|
|
113
|
+
(mandatory constraints) relevant to an *elaborated* intent.
|
|
114
|
+
- **`capture`** — the moment you act on new user feedback, distill it into a scoped, deduped entry
|
|
115
|
+
(a preference → a learning; an always/never rule → an issue).
|
|
116
|
+
- **`revise`** — reinforce / weaken / remove / promote / demote an entry `recall` already showed
|
|
117
|
+
(by id); confirmation-gated.
|
|
118
|
+
- **`metrics`** — reporting only: the §11 KPIs per skill from each store's `events.jsonl`.
|
|
119
|
+
|
|
120
|
+
### Maintenance
|
|
121
|
+
|
|
122
|
+
Store compaction (retiring stale learnings, merging near-duplicate scopes) is deliberately **not**
|
|
123
|
+
an MCP tool — it is out-of-band maintenance, run from the command line:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
whetstone compact <skill> # PyPI install
|
|
127
|
+
.venv/bin/whetstone compact <skill> # from-source dev install
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Storage & config
|
|
131
|
+
|
|
132
|
+
Per-skill stores live under the XDG data dir, defaulting to
|
|
133
|
+
`~/.local/share/whetstone/<skill-slug>/`, overridable via the `WHETSTONE_STORE_ROOT` environment
|
|
134
|
+
variable or `store_root` in the config file. Configuration is read from
|
|
135
|
+
`~/.config/whetstone/config.toml` (XDG config dir); every key also has a `WHETSTONE_*` env
|
|
136
|
+
override. Each store is its own git repository:
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
<store-root>/<skill-slug>/
|
|
140
|
+
learnings/<scope-slug>.md source of truth, grouped by scope
|
|
141
|
+
issues/<scope-slug>.md source of truth, grouped by scope
|
|
142
|
+
next_ids.json per-store monotonic id counters
|
|
143
|
+
index.sqlite derived embedding cache (rebuildable, git-ignored)
|
|
144
|
+
events.jsonl per-run telemetry for metrics (git-ignored)
|
|
145
|
+
.git/ version history of the markdown
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Development
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
.venv/bin/ruff check .
|
|
152
|
+
.venv/bin/pytest
|
|
153
|
+
```
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Whetstone
|
|
2
|
+
|
|
3
|
+
A local [MCP](https://modelcontextprotocol.io) server that lets any skill learn from use.
|
|
4
|
+
|
|
5
|
+
Whetstone attaches to an existing skill and maintains a git-tracked, per-skill store of what a
|
|
6
|
+
user likes (`LEARNINGS`) and what the skill got wrong (`ISSUES`), so the skill can improve from
|
|
7
|
+
ordinary use without a benchmark, dataset, or eval harness. See
|
|
8
|
+
[`LEARNING_SKILLS_DESIGN.md`](https://github.com/HrudithL/whetstone/blob/main/LEARNING_SKILLS_DESIGN.md)
|
|
9
|
+
for the full design.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Requires Python 3.11+. The base install is light and dependency-free at retrieval time: it uses a
|
|
14
|
+
small, deterministic `hashing` embedding backend (no torch, no network).
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
pipx install whetstone-mcp # installs the `whetstone` command on your PATH
|
|
18
|
+
# or: pip install whetstone-mcp
|
|
19
|
+
# or, run without installing: uvx whetstone-mcp
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
An install (pipx/pip) puts two equivalent console scripts on your PATH — `whetstone` (primary, used
|
|
23
|
+
throughout this README) and `whetstone-mcp` (same entry point, so `pipx run whetstone-mcp` /
|
|
24
|
+
`uvx whetstone-mcp` resolve without the short name).
|
|
25
|
+
|
|
26
|
+
Register it with an MCP host (e.g. Claude Code) — point the host at whichever you used:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
# if you installed it (pipx/pip): the command is already on PATH
|
|
30
|
+
claude mcp add whetstone -- whetstone
|
|
31
|
+
# no install — let uv fetch & run it on demand:
|
|
32
|
+
claude mcp add whetstone -- uvx whetstone-mcp
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For higher-quality embeddings, pull in the optional extra and set
|
|
36
|
+
`embedding_backend = "sentence-transformers"` in config. Match the command to how it's installed:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pipx install "whetstone-mcp[embeddings]" # fresh install, with the extra
|
|
40
|
+
pipx inject whetstone-mcp sentence-transformers # add to an existing pipx install
|
|
41
|
+
pip install "whetstone-mcp[embeddings]" # pip
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### From source (contributors)
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
python3 -m venv .venv
|
|
48
|
+
.venv/bin/pip install -e '.[dev]'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
.venv/bin/pip install -e '.[embeddings]' # pulls in sentence-transformers
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Run
|
|
56
|
+
|
|
57
|
+
Start the stdio MCP server:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
whetstone # PyPI install
|
|
61
|
+
.venv/bin/whetstone # from-source dev install
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Register it with an MCP host (e.g. Claude Code) under the server id `whetstone`, pointing the
|
|
65
|
+
command at the `whetstone` entry point above.
|
|
66
|
+
|
|
67
|
+
## Tools
|
|
68
|
+
|
|
69
|
+
The server exposes five MCP tools:
|
|
70
|
+
|
|
71
|
+
- **`attach`** — register a skill so Whetstone tracks its learned layer (scaffolds the store).
|
|
72
|
+
- **`recall`** — at the start of a task, retrieve the learnings (weighted preferences) and issues
|
|
73
|
+
(mandatory constraints) relevant to an *elaborated* intent.
|
|
74
|
+
- **`capture`** — the moment you act on new user feedback, distill it into a scoped, deduped entry
|
|
75
|
+
(a preference → a learning; an always/never rule → an issue).
|
|
76
|
+
- **`revise`** — reinforce / weaken / remove / promote / demote an entry `recall` already showed
|
|
77
|
+
(by id); confirmation-gated.
|
|
78
|
+
- **`metrics`** — reporting only: the §11 KPIs per skill from each store's `events.jsonl`.
|
|
79
|
+
|
|
80
|
+
### Maintenance
|
|
81
|
+
|
|
82
|
+
Store compaction (retiring stale learnings, merging near-duplicate scopes) is deliberately **not**
|
|
83
|
+
an MCP tool — it is out-of-band maintenance, run from the command line:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
whetstone compact <skill> # PyPI install
|
|
87
|
+
.venv/bin/whetstone compact <skill> # from-source dev install
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Storage & config
|
|
91
|
+
|
|
92
|
+
Per-skill stores live under the XDG data dir, defaulting to
|
|
93
|
+
`~/.local/share/whetstone/<skill-slug>/`, overridable via the `WHETSTONE_STORE_ROOT` environment
|
|
94
|
+
variable or `store_root` in the config file. Configuration is read from
|
|
95
|
+
`~/.config/whetstone/config.toml` (XDG config dir); every key also has a `WHETSTONE_*` env
|
|
96
|
+
override. Each store is its own git repository:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
<store-root>/<skill-slug>/
|
|
100
|
+
learnings/<scope-slug>.md source of truth, grouped by scope
|
|
101
|
+
issues/<scope-slug>.md source of truth, grouped by scope
|
|
102
|
+
next_ids.json per-store monotonic id counters
|
|
103
|
+
index.sqlite derived embedding cache (rebuildable, git-ignored)
|
|
104
|
+
events.jsonl per-run telemetry for metrics (git-ignored)
|
|
105
|
+
.git/ version history of the markdown
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
.venv/bin/ruff check .
|
|
112
|
+
.venv/bin/pytest
|
|
113
|
+
```
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "whetstone-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A local MCP server that lets any skill learn from use."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Hrudith Lakshminarasimman", email = "hrudith.lakshminarasimman@posit.co" },
|
|
14
|
+
]
|
|
15
|
+
maintainers = [
|
|
16
|
+
{ name = "Hrudith Lakshminarasimman", email = "hrudith.lakshminarasimman@posit.co" },
|
|
17
|
+
]
|
|
18
|
+
keywords = [
|
|
19
|
+
"mcp",
|
|
20
|
+
"model-context-protocol",
|
|
21
|
+
"skills",
|
|
22
|
+
"learning",
|
|
23
|
+
"memory",
|
|
24
|
+
"retrieval",
|
|
25
|
+
"agent",
|
|
26
|
+
]
|
|
27
|
+
classifiers = [
|
|
28
|
+
"Development Status :: 4 - Beta",
|
|
29
|
+
"Intended Audience :: Developers",
|
|
30
|
+
"Environment :: Console",
|
|
31
|
+
"License :: OSI Approved :: MIT License",
|
|
32
|
+
"Programming Language :: Python :: 3",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
36
|
+
]
|
|
37
|
+
dependencies = [
|
|
38
|
+
"mcp",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://github.com/HrudithL/whetstone"
|
|
43
|
+
Repository = "https://github.com/HrudithL/whetstone"
|
|
44
|
+
Documentation = "https://github.com/HrudithL/whetstone"
|
|
45
|
+
|
|
46
|
+
[project.optional-dependencies]
|
|
47
|
+
dev = [
|
|
48
|
+
"pytest",
|
|
49
|
+
"ruff",
|
|
50
|
+
]
|
|
51
|
+
# Heavy, optional. The default "hashing" embedding backend needs none of this; only the
|
|
52
|
+
# "sentence-transformers" backend does. Install with: pip install "whetstone-mcp[embeddings]".
|
|
53
|
+
embeddings = [
|
|
54
|
+
"sentence-transformers",
|
|
55
|
+
]
|
|
56
|
+
# Showcase harness only (M3). Never needed to run the MCP server; used by the internal, command-only
|
|
57
|
+
# harness under `harness/` to generate the site's before/after artifacts and metrics. The harness
|
|
58
|
+
# also requires the `embeddings` extra (it runs on the sentence-transformers backend) and the Claude
|
|
59
|
+
# Code CLI on PATH (claude-agent-sdk drives it). Install with:
|
|
60
|
+
# pip install -e ".[showcase,embeddings]"
|
|
61
|
+
showcase = [
|
|
62
|
+
"great-tables",
|
|
63
|
+
"pandas",
|
|
64
|
+
"claude-agent-sdk",
|
|
65
|
+
"matplotlib",
|
|
66
|
+
"pyyaml",
|
|
67
|
+
# The pptx showcase skill's generated deck.py builds a deck with python-pptx; the --agent runner
|
|
68
|
+
# runs that script in this venv, so the dep must be importable here.
|
|
69
|
+
"python-pptx",
|
|
70
|
+
# Quarto site render (jupyter engine): the docs/ pages execute Python to read out/ and render
|
|
71
|
+
# great-tables natively + matplotlib charts.
|
|
72
|
+
"jupyter",
|
|
73
|
+
"ipykernel",
|
|
74
|
+
]
|
|
75
|
+
# Docs site (spike/great-docs-site): great-docs auto-generates the /docs API+MCP reference site.
|
|
76
|
+
# Needs Quarto on PATH too (installed separately, not a pip package). Install with:
|
|
77
|
+
# pip install -e ".[docs]"
|
|
78
|
+
docs = [
|
|
79
|
+
"great-docs>=0.15",
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
[project.scripts]
|
|
83
|
+
whetstone = "whetstone.server:main"
|
|
84
|
+
# Alias so `uvx whetstone-mcp` / `pipx run whetstone-mcp` resolve without knowing the short name.
|
|
85
|
+
# `whetstone` remains the primary command referenced in docs.
|
|
86
|
+
whetstone-mcp = "whetstone.server:main"
|
|
87
|
+
|
|
88
|
+
[tool.hatch.build.targets.wheel]
|
|
89
|
+
packages = ["src/whetstone"]
|
|
90
|
+
|
|
91
|
+
# Lean sdist: only what's needed to build + install the package, plus the files PyPI renders/needs
|
|
92
|
+
# for licensing. Explicitly excludes harness/ (incl. harness/data/*.csv, ~920KB, and harness/out/),
|
|
93
|
+
# docs/, site/, tests/, and the design *.md files — none of that is needed to run the MCP server.
|
|
94
|
+
# Note: hatchling's sdist builder unconditionally force-includes the project's .gitignore as VCS
|
|
95
|
+
# metadata (SdistBuilder.get_default_build_data(), no config knob to disable) — it will still show
|
|
96
|
+
# up in the tarball listing alongside these; its contents are plain ignore globs, nothing sensitive.
|
|
97
|
+
[tool.hatch.build.targets.sdist]
|
|
98
|
+
# Patterns are anchored to the project root with a leading "/" — otherwise hatchling matches
|
|
99
|
+
# README.md/LICENSE at any depth (gitignore-style), which pulls in harness/*/README.md too.
|
|
100
|
+
include = [
|
|
101
|
+
"/src/whetstone",
|
|
102
|
+
"/README.md",
|
|
103
|
+
"/LICENSE",
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
[tool.ruff]
|
|
107
|
+
line-length = 100
|
|
108
|
+
target-version = "py311"
|
|
109
|
+
src = ["src", "tests"]
|
|
110
|
+
# Vendored third-party content (the great-tables Claude skill copied from the sibling gtskill repo)
|
|
111
|
+
# is not ours to lint/format. `harness/out` is model-generated showcase output, committed verbatim so
|
|
112
|
+
# the site can embed it and cold->warm diffs stay reviewable — an artifact, not source to lint.
|
|
113
|
+
extend-exclude = ["harness/skill", "harness/out"]
|
|
114
|
+
|
|
115
|
+
[tool.ruff.lint]
|
|
116
|
+
select = ["E", "F", "I", "W", "UP", "B"]
|
|
117
|
+
|
|
118
|
+
[tool.pytest.ini_options]
|
|
119
|
+
testpaths = ["tests"]
|
|
120
|
+
markers = [
|
|
121
|
+
# Backend-sensitive checks that need the real sentence-transformers model (the [embeddings]
|
|
122
|
+
# extra). Run as a separate CI job: `pytest -m embeddings`. The fast default job excludes them
|
|
123
|
+
# with `pytest -m "not embeddings"`, and they self-skip when the extra is not installed.
|
|
124
|
+
"embeddings: requires the sentence-transformers backend ([embeddings] extra)",
|
|
125
|
+
]
|