context-doctor 0.31.0 → 0.31.1
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/dist/mcp.js +1 -1
- package/dist/proxy.d.ts +1 -1
- package/dist/proxy.js +1 -1
- package/package.json +17 -2
package/dist/mcp.js
CHANGED
|
@@ -52,7 +52,7 @@ const STRATEGY_IDS = ["dedupe", "trim-tool-results", "trim-tool-calls", "strip-b
|
|
|
52
52
|
* recommended pattern.
|
|
53
53
|
*/
|
|
54
54
|
function createServer({ fileAccess = true } = {}) {
|
|
55
|
-
const server = new McpServer({ name: "context-doctor", version: "0.31.
|
|
55
|
+
const server = new McpServer({ name: "context-doctor", version: "0.31.1" }, { instructions: SERVER_INSTRUCTIONS });
|
|
56
56
|
server.tool("profile_context", "Profile an LLM conversation or prompt: token breakdown, largest blocks, and actionable findings about wasted context (duplicates, oversized pastes or tool results, base64 blobs, long history). Two inputs, pass ONE: `conversation` (full OpenAI/Anthropic JSON or raw text, for agents, files and proxies) or `sketch` (for chat apps such as Claude Desktop or ChatGPT where you cannot export the conversation: the turn count plus the few blocks that matter, ~120 tokens to write). Call it whenever the user asks about token usage, context size, cost, speed or limits, and on your own once the conversation passes ~30 turns or holds 3+ large pastes. Act on the top finding in your reply.", {
|
|
57
57
|
conversation: z.string().optional().describe("Conversation JSON (OpenAI or Anthropic format, or bare message array) or raw prompt text. Omit in chat apps and pass `sketch`."),
|
|
58
58
|
sketch: z.object({
|
package/dist/proxy.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface ProxyOptions extends OptimizeOptions {
|
|
|
48
48
|
googleUpstream?: string;
|
|
49
49
|
}
|
|
50
50
|
/** Reported by /health so `autopilot status` can tell an outdated service from a current one. */
|
|
51
|
-
export declare const PROXY_VERSION = "0.31.
|
|
51
|
+
export declare const PROXY_VERSION = "0.31.1";
|
|
52
52
|
/**
|
|
53
53
|
* Remove a leading `/t/<token>` from a request path, or return undefined when
|
|
54
54
|
* the prefix is absent or the token differs. The comparison is constant time
|
package/dist/proxy.js
CHANGED
|
@@ -20,7 +20,7 @@ import { formatTokens, CHARS_PER_TOKEN, providerFor } from "./tokens.js";
|
|
|
20
20
|
import { formatUsd, inputCostUsd, pricingFor } from "./pricing.js";
|
|
21
21
|
import { recordLedger } from "./ledger.js";
|
|
22
22
|
/** Reported by /health so `autopilot status` can tell an outdated service from a current one. */
|
|
23
|
-
export const PROXY_VERSION = "0.31.
|
|
23
|
+
export const PROXY_VERSION = "0.31.1";
|
|
24
24
|
/** Connection-level headers that must not be forwarded. */
|
|
25
25
|
const SKIP_REQUEST_HEADERS = new Set(["host", "content-length", "connection", "transfer-encoding", "accept-encoding", "expect"]);
|
|
26
26
|
const SKIP_RESPONSE_HEADERS = new Set(["content-length", "content-encoding", "transfer-encoding", "connection"]);
|
package/package.json
CHANGED
|
@@ -1,31 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "context-doctor",
|
|
3
|
-
"version": "0.31.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.31.1",
|
|
4
|
+
"description": "Context and token optimizer for LLM agents: see where Claude Code, Cursor, Codex and Gemini CLI tokens go, then cut them: an every-prompt hook, smarter compaction, a cache-safe proxy, RAG chunk packing and an MCP server. Local, no API key. By gAI Ventures.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
7
7
|
"ai-agents",
|
|
8
|
+
"ai-tools",
|
|
8
9
|
"anthropic",
|
|
10
|
+
"anthropic-sdk",
|
|
9
11
|
"autocompact",
|
|
12
|
+
"chunking",
|
|
10
13
|
"claude",
|
|
11
14
|
"claude-code",
|
|
12
15
|
"claude-desktop",
|
|
13
16
|
"codex",
|
|
17
|
+
"compaction",
|
|
18
|
+
"context-compression",
|
|
14
19
|
"context-engineering",
|
|
15
20
|
"context-management",
|
|
16
21
|
"context-window",
|
|
17
22
|
"cost",
|
|
18
23
|
"cursor",
|
|
19
24
|
"developer-tools",
|
|
25
|
+
"gemini",
|
|
26
|
+
"gemini-cli",
|
|
20
27
|
"gpt",
|
|
28
|
+
"langchain",
|
|
29
|
+
"llamaindex",
|
|
21
30
|
"llm",
|
|
22
31
|
"llm-cost",
|
|
32
|
+
"llm-tools",
|
|
23
33
|
"mcp",
|
|
24
34
|
"model-context-protocol",
|
|
25
35
|
"openai",
|
|
36
|
+
"openai-sdk",
|
|
37
|
+
"prompt-cache",
|
|
26
38
|
"prompt-caching",
|
|
27
39
|
"prompt-engineering",
|
|
28
40
|
"proxy",
|
|
41
|
+
"rag",
|
|
42
|
+
"token-counter",
|
|
43
|
+
"token-optimization",
|
|
29
44
|
"token-usage",
|
|
30
45
|
"tokens"
|
|
31
46
|
],
|