@cntxt-labs/medha-cli 0.7.1 → 0.7.2
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.
- package/README.md +5 -3
- package/SKILL.md +3 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -63,9 +63,9 @@ Most memory tools store unstructured chat history or flat key-value assertions.
|
|
|
63
63
|
$$T = \min\big(\text{ceiling}, L \times G \times R \times D\big)$$
|
|
64
64
|
- **$L$ (Wilson Lower Bound)**: 95% confidence interval on success rate $k/n$. Protects against small-sample overconfidence ($2/2 \ne 200/200$).
|
|
65
65
|
- **$G$ (Guard Factor)**: 1.0 if verified by test/AST guard; penalized if failing or unverified.
|
|
66
|
-
- **$R$ (Recency Decay)**: Exponential decay based on time elapsed since last use (default
|
|
66
|
+
- **$R$ (Recency Decay)**: Exponential decay based on time elapsed since last use (default 45-day half-life, floor 0.30).
|
|
67
67
|
- **$D$ (Durability Factor)**: Logarithmic bonus for rules validated across multiple git commits, branches, or weeks.
|
|
68
|
-
- **Ceiling**: Unguarded entities cannot exceed 0.85, preventing unverified heuristics from becoming `trusted`.
|
|
68
|
+
- **Ceiling**: Unguarded entities cannot exceed 0.50 (customizable per kind up to 0.85), preventing unverified heuristics from becoming `trusted`.
|
|
69
69
|
|
|
70
70
|
## Install
|
|
71
71
|
|
|
@@ -251,11 +251,13 @@ host can inject the most trusted guidance without overrunning its context.
|
|
|
251
251
|
|
|
252
252
|
## Inspect and share
|
|
253
253
|
|
|
254
|
-
- **`medha
|
|
254
|
+
- **`medha primer [topic]`** reads token-frugal agent guidance on specific topics (`overview`, `mental-model`, `signals`, `guards`, `decisions`, `drift`, `config`, `sync`).
|
|
255
|
+
- **`medha ui`** launches a local real-time web dashboard over the store.
|
|
255
256
|
- **`medha report`** writes a standalone, offline HTML snapshot you can attach to a review.
|
|
256
257
|
- **`medha issue [title]`** prepares a GitHub issue prefilled with sanitized runtime and store diagnostics.
|
|
257
258
|
- **`medha sync status|pull|push`** shares evidence between machines through a git ref or a file.
|
|
258
259
|
Registries travel with the episodes, so custom kinds and signals do not have to be copied by hand.
|
|
260
|
+
- **Documentation**: Complete guides and reference are published at [nimishph.github.io/medha](https://nimishph.github.io/medha/). In this repository, run `bun run docs:dev` to launch the local VitePress documentation reader.
|
|
259
261
|
|
|
260
262
|
## Extend it
|
|
261
263
|
|
package/SKILL.md
CHANGED
|
@@ -43,7 +43,7 @@ You record evidence; **you** decide what to do with it.
|
|
|
43
43
|
|
|
44
44
|
- **Fast Inner Loop**: Read `hints` (or `medha show`) before applying rules. Treat unknown entities as `probation`.
|
|
45
45
|
- **Slow Outer Loop**: Report ground truth as events occur (`record_signal`, `report_guard`).
|
|
46
|
-
- **Trust Formula**: $T = \min(\text{ceiling}, L \times G \times R \times D)$. Usage alone never exceeds 0.85; a passing guard is required to achieve `trusted`.
|
|
46
|
+
- **Trust Formula**: $T = \min(\text{ceiling}, L \times G \times R \times D)$. Usage alone never exceeds 0.50 (customizable up to 0.85); a passing guard is required to achieve `trusted`.
|
|
47
47
|
|
|
48
48
|
## Setup
|
|
49
49
|
|
|
@@ -85,7 +85,8 @@ A kind can carry its own policy. Set it at init with `medha init --config <file>
|
|
|
85
85
|
so passing it proves nothing. Escalate to a human instead.
|
|
86
86
|
|
|
87
87
|
## Workflow
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
0. **Understand on demand**: Use MCP `primer` or `medha primer [topic]` for focused, token-frugal guidance on topics (`overview`, `mental-model`, `signals`, `guards`, `decisions`, `drift`, `config`, `sync`).
|
|
89
90
|
1. **Read** before relying on a rule: MCP `hints` (pass `compact: true` for cheap output) or
|
|
90
91
|
`medha show --id <id>`. `hints` returns `{ hints, unknown }` — treat `unknown` keys as probation.
|
|
91
92
|
2. **Propose** a new rule: `propose` / `medha propose --id <id> --source <who> [--text ..]`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntxt-labs/medha-cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Evidential memory for rules, recipes and tools: records what happened and returns trust hints. CLI and MCP server.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"node": ">=18"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@cntxt-labs/medha-linux-x64": "0.7.
|
|
44
|
-
"@cntxt-labs/medha-linux-arm64": "0.7.
|
|
45
|
-
"@cntxt-labs/medha-darwin-arm64": "0.7.
|
|
46
|
-
"@cntxt-labs/medha-darwin-x64": "0.7.
|
|
47
|
-
"@cntxt-labs/medha-win32-x64": "0.7.
|
|
43
|
+
"@cntxt-labs/medha-linux-x64": "0.7.2",
|
|
44
|
+
"@cntxt-labs/medha-linux-arm64": "0.7.2",
|
|
45
|
+
"@cntxt-labs/medha-darwin-arm64": "0.7.2",
|
|
46
|
+
"@cntxt-labs/medha-darwin-x64": "0.7.2",
|
|
47
|
+
"@cntxt-labs/medha-win32-x64": "0.7.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.30.0",
|