@soundbi/sound-connect 0.1.0
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 +111 -0
- package/dist/__tests__/ingest.test.d.ts +18 -0
- package/dist/__tests__/ingest.test.d.ts.map +1 -0
- package/dist/__tests__/ingest.test.js +639 -0
- package/dist/__tests__/ingest.test.js.map +1 -0
- package/dist/__tests__/isolation.test.d.ts +12 -0
- package/dist/__tests__/isolation.test.d.ts.map +1 -0
- package/dist/__tests__/isolation.test.js +149 -0
- package/dist/__tests__/isolation.test.js.map +1 -0
- package/dist/__tests__/retry-queue.test.d.ts +11 -0
- package/dist/__tests__/retry-queue.test.d.ts.map +1 -0
- package/dist/__tests__/retry-queue.test.js +458 -0
- package/dist/__tests__/retry-queue.test.js.map +1 -0
- package/dist/auth.d.ts +80 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +211 -0
- package/dist/auth.js.map +1 -0
- package/dist/config.d.ts +35 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +66 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest.d.ts +253 -0
- package/dist/ingest.d.ts.map +1 -0
- package/dist/ingest.js +573 -0
- package/dist/ingest.js.map +1 -0
- package/dist/proxy.d.ts +79 -0
- package/dist/proxy.d.ts.map +1 -0
- package/dist/proxy.js +217 -0
- package/dist/proxy.js.map +1 -0
- package/dist/retry-queue.d.ts +236 -0
- package/dist/retry-queue.d.ts.map +1 -0
- package/dist/retry-queue.js +461 -0
- package/dist/retry-queue.js.map +1 -0
- package/dist/tools.d.ts +75 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +368 -0
- package/dist/tools.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Sound Connect Bridge
|
|
2
|
+
|
|
3
|
+
Local stdio MCP server that connects Claude Desktop and Claude Code to your Sound Connect workspace.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
> **Important:** You must sign in **before** starting Claude. The bridge runs as a background process launched by Claude — its output is not visible to you, so a login prompt there would cause a silent hang. Always log in from a separate terminal first.
|
|
10
|
+
|
|
11
|
+
### Step 1 — Install Node (if needed)
|
|
12
|
+
|
|
13
|
+
The bridge requires Node.js 18 or later. Download from [nodejs.org](https://nodejs.org).
|
|
14
|
+
|
|
15
|
+
### Step 2 — Sign in (terminal only)
|
|
16
|
+
|
|
17
|
+
Open a terminal (not inside Claude) and run:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npx @soundbi/sound-connect login
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
You will see a URL and a short code. Open the URL in a browser, enter the code, and sign in with your Sound BI Microsoft account. When the terminal shows "Signed in as: ...", you are done.
|
|
24
|
+
|
|
25
|
+
Your token is stored securely in the OS credential store (Windows Credential Manager / macOS Keychain). You only need to do this once — the bridge refreshes tokens silently on subsequent starts.
|
|
26
|
+
|
|
27
|
+
### Step 3 — Configure Claude
|
|
28
|
+
|
|
29
|
+
**Claude Code** — add to your project's `.mcp.json`:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"sound-connect": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["@soundbi/sound-connect"],
|
|
37
|
+
"env": {
|
|
38
|
+
"SC_BACKEND_URL": "https://<your-backend-url>",
|
|
39
|
+
"SC_CLIENT_SLUG": "<your-client-slug>"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Claude Desktop** — add to `claude_desktop_config.json` (location varies by OS):
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"mcpServers": {
|
|
51
|
+
"sound-connect": {
|
|
52
|
+
"command": "npx",
|
|
53
|
+
"args": ["@soundbi/sound-connect"],
|
|
54
|
+
"env": {
|
|
55
|
+
"SC_BACKEND_URL": "https://<your-backend-url>",
|
|
56
|
+
"SC_CLIENT_SLUG": "<your-client-slug>"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Replace `<your-backend-url>` and `<your-client-slug>` with the values provided by your workspace admin.
|
|
64
|
+
|
|
65
|
+
### Step 4 — Start Claude
|
|
66
|
+
|
|
67
|
+
Start (or restart) Claude Desktop / reload the MCP server in Claude Code. The bridge will connect silently using your cached token.
|
|
68
|
+
|
|
69
|
+
If you see the error `Not signed in — run 'npx @soundbi/sound-connect login' in a terminal`, go back to Step 2.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Signing out
|
|
74
|
+
|
|
75
|
+
To clear your stored token:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
npx @soundbi/sound-connect logout
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
After signing out, run `login` again before your next Claude session.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Troubleshooting
|
|
86
|
+
|
|
87
|
+
| Symptom | Fix |
|
|
88
|
+
|---|---|
|
|
89
|
+
| Tools return "Not signed in" | Run `npx @soundbi/sound-connect login` in a terminal, then restart Claude |
|
|
90
|
+
| Token expired after a long break | Run `npx @soundbi/sound-connect login` again |
|
|
91
|
+
| Wrong account signed in | Run `logout`, then `login` with the correct account |
|
|
92
|
+
| Bridge not showing in Claude | Check that `SC_BACKEND_URL` and `SC_CLIENT_SLUG` are set correctly in your config |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Configuration reference
|
|
97
|
+
|
|
98
|
+
| Variable | CLI arg | Required | Description |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| `SC_BACKEND_URL` | `--backend-url` | Yes | Base URL of the Sound Connect backend |
|
|
101
|
+
| `SC_CLIENT_SLUG` | `--client-slug` | Yes | Your client workspace identifier |
|
|
102
|
+
| `SC_ENTRA_CLIENT_ID` | — | No | Override the Entra app registration client ID |
|
|
103
|
+
| `SC_AUTH_SCOPE` | — | No | Override the OAuth scope (default: `api://sound-connect/.default`) |
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Why is login a separate command?
|
|
108
|
+
|
|
109
|
+
Claude launches the bridge as a background stdio process. The MCP protocol uses the process's stdout for message framing — anything else written to stdout (including a browser login prompt) is never shown to you. Running the device-code flow inside the Claude-spawned process would cause a silent hang that looks like "it doesn't work."
|
|
110
|
+
|
|
111
|
+
The solution: `login` is always a separate terminal command you run once. After that, every Claude session authenticates silently from the cached token.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* STORY-011 / STORY-012 — ingest_file / ingest_folder unit tests.
|
|
3
|
+
*
|
|
4
|
+
* Tests the pure logic functions in src/ingest.ts:
|
|
5
|
+
* - validateAndResolvePath: path confinement and extension check (AC3)
|
|
6
|
+
* - normalizeMarkdown: normalization (AC1)
|
|
7
|
+
* - chunkContent: chunking (AC1)
|
|
8
|
+
* - sha256: hash computation (AC2)
|
|
9
|
+
* - sourceTypeForExt: source_type derivation (STORY-012 AC2)
|
|
10
|
+
* - parseGlobToExtensions: glob filter parsing (STORY-012 AC1)
|
|
11
|
+
* - enumerateFolder: folder file enumeration (STORY-012 AC1)
|
|
12
|
+
* - ingestFolder: full folder ingest pipeline with mocked backend (STORY-012)
|
|
13
|
+
*
|
|
14
|
+
* Network-touching code (postChunk / ingestMarkdownFile / ingestFolder) is tested
|
|
15
|
+
* via fetch mocks rather than live backend calls.
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ingest.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingest.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/ingest.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}
|