lowdown-proxy 0.1.3 → 0.1.5

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 CHANGED
@@ -1,33 +1,33 @@
1
1
  # lowdown-proxy
2
2
 
3
- Agents should not have to trust an agent/tool they've never interacted with.
3
+ Agents should not have to trust anyone they've never interacted with.
4
4
 
5
- `lowdown-proxy`는 MCP 클라이언트와 서버 사이를 투명하게 통과하는 stdio 프록시입니다.
6
- 통신 내용은 그대로 전달하면서, 동시에 어떤 도구가 호출됐고 성공/실패했는지, 얼마나
7
- 걸렸는지를 자동으로 기록합니다.
5
+ `lowdown-proxy` records interactions between AI agents, tools, and services — and makes
6
+ that history queryable by anyone. Before choosing a tool, calling an API, or delegating
7
+ to another agent, you can ask: *what has the community seen from this one?*
8
8
 
9
- 기록된 데이터는 다른 에이전트가 "이 도구를 써도 되는가"를 판단할 때 참고할 수 있는
10
- 최소한의 공통 근거가 됩니다.
9
+ A transparent stdio proxy for MCP servers is the first entry point. The reputation layer
10
+ is open to any agent, tool, or service — not just MCP.
11
11
 
12
- 자세한 배경과 설계 원칙은 [DESIGN.md](./DESIGN.md)를 참고하세요.
12
+ See [DESIGN.md](./DESIGN.md) for background and design principles.
13
13
 
14
- ## 설치 없이 실행
14
+ ## Quick start
15
15
 
16
16
  ```bash
17
17
  npx lowdown-proxy -- npx some-mcp-server
18
18
  ```
19
19
 
20
- 기존 MCP 클라이언트 설정에서 서버를 감싸기만 하면 됩니다.
20
+ Wrap any MCP server in your client config:
21
21
 
22
22
  ```jsonc
23
- // 기존
23
+ // before
24
24
  {
25
25
  "mcpServers": {
26
26
  "search": { "command": "npx", "args": ["search-mcp-server"] }
27
27
  }
28
28
  }
29
29
 
30
- // lowdown-proxy로 감싼 뒤
30
+ // after
31
31
  {
32
32
  "mcpServers": {
33
33
  "search": {
@@ -38,37 +38,86 @@ npx lowdown-proxy -- npx some-mcp-server
38
38
  }
39
39
  ```
40
40
 
41
- ## 옵션
41
+ ## Options
42
42
 
43
- | 플래그 | 설명 | 기본값 |
43
+ | Flag | Description | Default |
44
44
  |---|---|---|
45
- | `--actor` | 호출 주체 식별자 | `anonymous` |
46
- | `--target` | 기록될 대상 이름 (도구 식별자) | 실행 명령어 문자열 |
45
+ | `--actor` | Identifier of the calling agent | `anonymous` |
46
+ | `--target` | Label for the target tool | command string |
47
47
  | `--source` | `organic` \| `seeded` \| `synthetic` | `organic` |
48
48
 
49
- ## 환경변수
49
+ ## Environment variables
50
50
 
51
- 기록 기능을 쓰려면 아래 두 값이 필요합니다. 없어도 프록시는 정상 동작합니다
52
- (패스스루가 최우선, 기록은 부가 기능).
51
+ Required for recording. The proxy works as a pure pass-through without them.
53
52
 
54
53
  ```bash
55
54
  export LOWDOWN_SUPABASE_URL="https://xxxx.supabase.co"
56
55
  export LOWDOWN_SUPABASE_KEY="..."
57
56
  ```
58
57
 
59
- ## 설계 원칙 (요약)
58
+ ## Public API
60
59
 
61
- - **패스스루 우선**: 기록 로직이 실패하거나 느려도 실제 MCP 통신은 절대 막지 않습니다.
62
- - **사실만 기록**: v0는 성공/실패/지연시간만 기록합니다. 품질 판단(별점 등)은 범위 밖입니다.
63
- - **출처 구분**: 모든 기록은 `organic`(자연 유입) / `seeded`(직접 심은 트래픽) /
64
- `synthetic`(합성 벤치마크)으로 태깅됩니다. 나중에 "실제 수요가 있었는가"를 검증할 때
65
- 이 구분이 핵심 근거가 됩니다.
60
+ No auth required.
61
+
62
+ ```bash
63
+ # Get reputation of a tool
64
+ curl https://lowdown-proxy.vercel.app/api/reputation/brave-search
65
+
66
+ # Record an interaction
67
+ curl -X POST https://lowdown-proxy.vercel.app/api/interactions \
68
+ -H "Content-Type: application/json" \
69
+ -d '{"actor":"agent:my-bot","target":"mcp:modelcontextprotocol/brave-search","target_type":"tool","task_type":"web_search","outcome":"success"}'
70
+ ```
71
+
72
+ Example response:
73
+
74
+ ```json
75
+ {
76
+ "target": "brave-search",
77
+ "target_type": "tool",
78
+ "interactions": 30,
79
+ "success_rate": 0.933,
80
+ "confidence": "medium"
81
+ }
82
+ ```
83
+
84
+ Fuzzy matching supported — short names like `brave-search`, `fetch`, `github` resolve automatically.
85
+
86
+ ## Design principles
66
87
 
67
- ## 상태
88
+ - **Pass-through first**: recording never blocks or degrades MCP communication.
89
+ - **Facts only**: v0 records success/failure and latency. Quality judgments are out of scope.
90
+ - **Provenance always tagged**: every record carries `organic` / `seeded` / `synthetic` so bootstrap data and real traffic are always distinguishable.
68
91
 
69
- 이 프로젝트는 2026년 9월 시작된 **30일 공개 실험**입니다. 확장 계획과 소거된 방향들은
70
- [DESIGN.md](./DESIGN.md)에 정리되어 있습니다.
92
+ ## Status
93
+
94
+ 30-day public experiment, started September 2026.
95
+ See [DESIGN.md](./DESIGN.md) for what's in scope and what's been ruled out.
71
96
 
72
97
  ## License
73
98
 
74
99
  MIT
100
+
101
+ ---
102
+
103
+ ## 한국어
104
+
105
+ 한 번도 거래한 적 없는 상대를 에이전트가 무조건 신뢰할 필요는 없습니다.
106
+
107
+ `lowdown-proxy`는 AI 에이전트, 도구, 서비스 사이의 상호작용을 기록하고,
108
+ 그 이력을 누구나 조회할 수 있게 만듭니다. 도구를 선택하거나, API를 호출하거나,
109
+ 다른 에이전트에게 작업을 위임하기 전에 물어볼 수 있습니다:
110
+ *커뮤니티는 이 상대에 대해 무엇을 봤는가?*
111
+
112
+ MCP 서버를 감싸는 stdio 프록시가 첫 번째 진입점입니다.
113
+ 평판 레이어는 MCP에 국한되지 않고 모든 에이전트, 도구, 서비스에 열려 있습니다.
114
+
115
+ 기록된 데이터는 다른 에이전트가 판단할 때 참고할 수 있는 최소한의 공통 근거가 됩니다.
116
+
117
+ ### 설계 원칙 (요약)
118
+
119
+ - **패스스루 우선**: 기록 로직이 실패하거나 느려도 실제 MCP 통신은 절대 막지 않습니다.
120
+ - **사실만 기록**: v0는 성공/실패/지연시간만 기록합니다. 품질 판단은 범위 밖입니다.
121
+ - **출처 구분**: 모든 기록은 `organic` / `seeded` / `synthetic`으로 태깅됩니다.
122
+
123
+ 자세한 배경과 설계 원칙은 [DESIGN.md](./DESIGN.md)를 참고하세요.
@@ -0,0 +1,25 @@
1
+ import { randomUUID } from "node:crypto";
2
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import { homedir } from "node:os";
4
+ import { join } from "node:path";
5
+ export function getNodeId() {
6
+ const dir = join(homedir(), ".lowdown");
7
+ const file = join(dir, "node.json");
8
+ if (existsSync(file)) {
9
+ try {
10
+ const data = JSON.parse(readFileSync(file, "utf-8"));
11
+ if (data.node_id)
12
+ return data.node_id;
13
+ }
14
+ catch {
15
+ // 파일 손상 시 새로 생성
16
+ }
17
+ }
18
+ const identity = {
19
+ node_id: "ld_" + randomUUID().replace(/-/g, "").slice(0, 12),
20
+ created_at: new Date().toISOString(),
21
+ };
22
+ mkdirSync(dir, { recursive: true });
23
+ writeFileSync(file, JSON.stringify(identity, null, 2), "utf-8");
24
+ return identity.node_id;
25
+ }
package/dist/proxy.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import { createInterface } from "node:readline";
3
3
  import { recordInteraction } from "./supabase.js";
4
+ import { getNodeId } from "./node-identity.js";
4
5
  /**
5
6
  * lowdown-proxy 핵심 로직.
6
7
  *
@@ -10,6 +11,7 @@ import { recordInteraction } from "./supabase.js";
10
11
  * - tool_execution 성공(JSON-RPC 에러 없음)과 실제 결과 품질은 다른 문제 — v0는 전자만 다룬다.
11
12
  */
12
13
  export function runProxy(opts) {
14
+ const nodeId = getNodeId();
13
15
  const child = spawn(opts.command, opts.args, {
14
16
  stdio: ["pipe", "pipe", "inherit"], // stderr는 그대로 상위로 흘려보냄(디버깅용)
15
17
  });
@@ -56,6 +58,7 @@ export function runProxy(opts) {
56
58
  outcome,
57
59
  latency_ms,
58
60
  source: opts.source,
61
+ node_id: nodeId,
59
62
  };
60
63
  // fire-and-forget — 응답 전달을 기다리게 하지 않음
61
64
  void recordInteraction(record);
package/dist/supabase.js CHANGED
@@ -37,6 +37,7 @@ export async function recordInteraction(record) {
37
37
  outcome: record.outcome,
38
38
  latency_ms: record.latency_ms ?? null,
39
39
  source: record.source ?? "organic",
40
+ node_id: record.node_id ?? null,
40
41
  });
41
42
  if (error && process.env.LOWDOWN_DEBUG) {
42
43
  console.error("[lowdown] interaction 기록 실패:", error.message);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "lowdown-proxy",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "mcpName": "io.github.PetShopBros/lowdown-proxy",
5
- "description": "Transparent stdio proxy that records MCP tool call interactions for the Lowdown reputation experiment.",
5
+ "description": "Record and query AI agent/tool/service interactions. Shared reputation layer for the multi-agent ecosystem.",
6
6
  "type": "module",
7
7
  "bin": {
8
- "lowdown-proxy": "./dist/cli.js",
9
- "lowdown-mcp": "./dist/mcp-server.js"
8
+ "lowdown-proxy": "dist/cli.js",
9
+ "lowdown-mcp": "dist/mcp-server.js"
10
10
  },
11
11
  "main": "./dist/cli.js",
12
12
  "files": [
@@ -18,9 +18,11 @@
18
18
  },
19
19
  "keywords": [
20
20
  "mcp",
21
- "agent",
21
+ "ai-agent",
22
22
  "reputation",
23
23
  "interaction",
24
+ "proxy",
25
+ "trust",
24
26
  "lowdown"
25
27
  ],
26
28
  "license": "MIT",
@@ -38,4 +40,4 @@
38
40
  "engines": {
39
41
  "node": ">=18"
40
42
  }
41
- }
43
+ }