@budgetary/mcp
Advanced tools
Sorry, the diff of this file is too big to display
@@ -75,2 +75,3 @@ import { ActualsTraceStep, BudgetaryClientOptions, BudgetaryClient } from '@budgetary/sdk'; | ||
| forecast_p90?: number; | ||
| source?: string; | ||
| } | ||
@@ -77,0 +78,0 @@ interface PendingStoreFile { |
+1
-1
@@ -10,3 +10,3 @@ import { | ||
| submitActuals | ||
| } from "./chunk-Z6JQASWK.js"; | ||
| } from "./chunk-5KYJFA6O.js"; | ||
| export { | ||
@@ -13,0 +13,0 @@ MAX_ATTEMPTS, |
+1
-1
| { | ||
| "name": "@budgetary/mcp", | ||
| "version": "0.5.0", | ||
| "version": "0.6.0", | ||
| "description": "Model Context Protocol server for Budgetary: a portable pre-flight token-spend estimate tool for any MCP-capable host.", | ||
@@ -5,0 +5,0 @@ "mcpName": "io.github.thriftell/budgetary", |
+22
-0
@@ -125,2 +125,23 @@ # @budgetary/mcp | ||
| ## Optional: `BUDGETARY_SOURCE` — an operator's label for a batch of runs | ||
| **Ordinary users have nothing to set here, and nothing changes if you don't.** This exists for operators who drive this client from an automated harness (a benchmark, a load test, a scripted evaluation) and want those runs labelled so they can tell them apart from real ones afterwards. | ||
| Set it **in the environment of the process you launch for that batch**, so its lifetime is the batch: | ||
| ```bash | ||
| BUDGETARY_SOURCE=my-harness-run <the command your harness runs> | ||
| ``` | ||
| > **Do not put this one in your MCP host config.** Unlike `BUDGETARY_HOST` and `BUDGETARY_LANGUAGE`, this label should *not* go in `claude mcp add --env`, `~/.claude.json`, `.mcp.json`, or `~/.budgetary/config.json`. Those are **machine-wide and permanent**: a label you set there for one batch silently outlives it, and every ordinary session on that machine is labelled with it afterwards — undetectably, because the rows still look perfectly normal. `~/.budgetary/config.json` is not even read for this variable, on purpose. A label that describes *a run* should not outlive the run. | ||
| Each actuals submission carries this label. It defaults to `mcp_client`. It is an **opaque string** — the client attaches no meaning to it, validates only its shape (up to 64 characters of `A–Z a–z 0–9 . _ -`), and ignores anything malformed, falling back to the default rather than failing your submission. (Run with `BUDGETARY_DEBUG=1` to have it say so on stderr when it rejects a label; otherwise a typo is silent.) | ||
| Two things it is deliberately **not**: | ||
| - **It does not change how your data is treated.** It is a label, not a setting. Setting it (or not) grants nothing, unlocks nothing, and alters nothing about what is recorded or how it is used. | ||
| - **It is not a per-task field, and the model never sets it.** Like `BUDGETARY_HOST` and `BUDGETARY_LANGUAGE`, it is **declared** in the environment. There is intentionally no `source` argument on the `estimate` tool. | ||
| The label is resolved once, when the estimate is made, and stored on that estimate's pending entry — so if a submission has to be retried later (from a different session, with a different environment), it still reports the label of the run that actually happened. | ||
| ## Actuals — automatic where possible, manual otherwise, never fabricated | ||
@@ -165,2 +186,3 @@ | ||
| - After a run, the **token counts** (`tokens_in`, `tokens_out`), a `success` flag, and a duration. | ||
| - A constant **client label** — `mcp_client` unless an operator overrode it with `BUDGETARY_SOURCE` (see above). It says which client sent the row and nothing else: it is a fixed string, derived from no part of you, your machine, or your task. | ||
| - On Claude Code, a **behavior trace**: per step, the host tool name (e.g. `Read`, `Bash`), its token count, a **redacted descriptor** of what it acted on, and whether it succeeded. The descriptor exposes a program name *in the clear only when it is a common, non-sensitive tool* (e.g. `pytest`, `npm run`) — a pasted credential or a private script name is never shown, only its **salted digest**; everything after the program (paths, arguments, the rest of the command) always lives inside the digest, or a bare path digest for a file tool. Custom/internal tool names (e.g. an org's private MCP tool) are reported generically as `mcp:other`, never verbatim. **No file contents, absolute paths, command arguments, or output ever leave the machine** — only an allowlisted program name and an opaque key. Set `BUDGETARY_TRACE_TARGET=off` to drop the descriptor entirely (the trace falls back to tool names + token counts); any value other than an explicit `1`/`true`/`on`/`yes` is treated as off. | ||
@@ -167,0 +189,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
699059
0.64%18555
0.22%195
12.72%18
5.88%