bilinc 2.3.0__tar.gz → 2.3.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bilinc
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Cloud-only memory SDK and MCP adapter for autonomous agents
5
5
  Author: Bilinc Team
6
6
  License-Expression: BUSL-1.1
@@ -56,7 +56,7 @@ Dynamic: license-file
56
56
 
57
57
  Retrieval answers *"what is similar to this?"*. Long-running agents also need to answer *"who wrote this state, was it verified, did it contradict what we already knew, and can we undo it?"* — that is the layer Bilinc provides.
58
58
 
59
- Bilinc 2.3.0 on PyPI is the public cloud-only package: a thin Python SDK, CLI, and MCP adapter for Bilinc Cloud. It does not ship the local StatePlane, storage backends, eval, observability, integrations, or server runtime internals.
59
+ Bilinc 2.3.1 on PyPI is the public cloud-only package: a thin Python SDK, CLI, and MCP adapter for Bilinc Cloud. It does not ship the local StatePlane, storage backends, eval, observability, integrations, or server runtime internals.
60
60
 
61
61
  > **Frozen regression receipt** — LongMemEval-s cleaned retrieval fixture, 500 questions: **Hit@5 98.0%**, **NDCG@5 0.913**, no LLM reranker, no paid API. This is an isolated retrieval guardrail, not a current hosted SLA, end-to-end agent score, or competitor ranking — see [Benchmark receipt](#benchmark-receipt) for the full scope and qualification.
62
62
 
@@ -119,7 +119,7 @@ Cloud status check.
119
119
  To reproduce this release exactly:
120
120
 
121
121
  ```bash
122
- pip install -U bilinc==2.3.0
122
+ pip install -U bilinc==2.3.1
123
123
  ```
124
124
 
125
125
  If you prefer a browser guide, open https://bilinc.space/install and follow the
@@ -131,18 +131,28 @@ Bilinc exposes a standard Model Context Protocol server over **stdio**, so any
131
131
  MCP-compatible client can connect — Claude Code, Codex, Cursor, Hermes-Agent,
132
132
  opencode, and others.
133
133
 
134
+ After `bilinc login`, let the CLI write the setup for your client:
135
+
136
+ ```bash
137
+ bilinc mcp install --client claude-code # prints a ready `claude mcp add ...` command
138
+ bilinc mcp install --client claude-desktop # prints the config and where Claude Desktop keeps it
139
+ bilinc mcp install # plain mcpServers JSON for any other client
140
+ ```
141
+
134
142
  ```json
135
143
  {
136
144
  "mcpServers": {
137
145
  "bilinc": {
138
- "command": "python",
139
- "args": ["-m", "bilinc.cloud_mcp"],
140
- "env": { "BILINC_API_KEY": "bil_live_..." }
146
+ "command": "/path/to/python3",
147
+ "args": ["-m", "bilinc.cloud_mcp"]
141
148
  }
142
149
  }
143
150
  }
144
151
  ```
145
152
 
153
+ `command` is the interpreter that has Bilinc installed, and the adapter reads the key saved by `bilinc login`, so
154
+ the config carries no key. On a machine without a saved key, add `"env": { "BILINC_API_KEY": "bil_live_..." }`.
155
+
146
156
  Eight tools — the core memory lifecycle, and nothing else:
147
157
 
148
158
  | Tool | What it does |
@@ -14,7 +14,7 @@
14
14
 
15
15
  Retrieval answers *"what is similar to this?"*. Long-running agents also need to answer *"who wrote this state, was it verified, did it contradict what we already knew, and can we undo it?"* — that is the layer Bilinc provides.
16
16
 
17
- Bilinc 2.3.0 on PyPI is the public cloud-only package: a thin Python SDK, CLI, and MCP adapter for Bilinc Cloud. It does not ship the local StatePlane, storage backends, eval, observability, integrations, or server runtime internals.
17
+ Bilinc 2.3.1 on PyPI is the public cloud-only package: a thin Python SDK, CLI, and MCP adapter for Bilinc Cloud. It does not ship the local StatePlane, storage backends, eval, observability, integrations, or server runtime internals.
18
18
 
19
19
  > **Frozen regression receipt** — LongMemEval-s cleaned retrieval fixture, 500 questions: **Hit@5 98.0%**, **NDCG@5 0.913**, no LLM reranker, no paid API. This is an isolated retrieval guardrail, not a current hosted SLA, end-to-end agent score, or competitor ranking — see [Benchmark receipt](#benchmark-receipt) for the full scope and qualification.
20
20
 
@@ -77,7 +77,7 @@ Cloud status check.
77
77
  To reproduce this release exactly:
78
78
 
79
79
  ```bash
80
- pip install -U bilinc==2.3.0
80
+ pip install -U bilinc==2.3.1
81
81
  ```
82
82
 
83
83
  If you prefer a browser guide, open https://bilinc.space/install and follow the
@@ -89,18 +89,28 @@ Bilinc exposes a standard Model Context Protocol server over **stdio**, so any
89
89
  MCP-compatible client can connect — Claude Code, Codex, Cursor, Hermes-Agent,
90
90
  opencode, and others.
91
91
 
92
+ After `bilinc login`, let the CLI write the setup for your client:
93
+
94
+ ```bash
95
+ bilinc mcp install --client claude-code # prints a ready `claude mcp add ...` command
96
+ bilinc mcp install --client claude-desktop # prints the config and where Claude Desktop keeps it
97
+ bilinc mcp install # plain mcpServers JSON for any other client
98
+ ```
99
+
92
100
  ```json
93
101
  {
94
102
  "mcpServers": {
95
103
  "bilinc": {
96
- "command": "python",
97
- "args": ["-m", "bilinc.cloud_mcp"],
98
- "env": { "BILINC_API_KEY": "bil_live_..." }
104
+ "command": "/path/to/python3",
105
+ "args": ["-m", "bilinc.cloud_mcp"]
99
106
  }
100
107
  }
101
108
  }
102
109
  ```
103
110
 
111
+ `command` is the interpreter that has Bilinc installed, and the adapter reads the key saved by `bilinc login`, so
112
+ the config carries no key. On a machine without a saved key, add `"env": { "BILINC_API_KEY": "bil_live_..." }`.
113
+
104
114
  Eight tools — the core memory lifecycle, and nothing else:
105
115
 
106
116
  | Tool | What it does |
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "bilinc"
7
- version = "2.3.0"
7
+ version = "2.3.1"
8
8
  description = "Cloud-only memory SDK and MCP adapter for autonomous agents"
9
9
  readme = "README.md"
10
10
  license = "BUSL-1.1"
@@ -1,4 +1,4 @@
1
- """Bilinc 2.3.0: cloud-only SDK for agent memory."""
1
+ """Bilinc 2.3.1: cloud-only SDK for agent memory."""
2
2
 
3
3
  from bilinc.client import (
4
4
  ACTIVATION_SIGNUP_URL,
@@ -25,7 +25,7 @@ from bilinc.client import (
25
25
  CloudClient,
26
26
  )
27
27
 
28
- __version__ = "2.3.0"
28
+ __version__ = "2.3.1"
29
29
  version = __version__
30
30
 
31
31
  __all__ = [
@@ -6,6 +6,8 @@ from __future__ import annotations
6
6
  import argparse
7
7
  import json
8
8
  import os
9
+ import shlex
10
+ import subprocess
9
11
  import sys
10
12
  import time
11
13
  import webbrowser
@@ -64,16 +66,38 @@ def _print_start_guide(*, opened: bool = False) -> None:
64
66
  )
65
67
 
66
68
 
69
+ MCP_KEY_PLACEHOLDER = "bil_live_..."
70
+
71
+
72
+ def _mcp_server_entry() -> dict[str, Any]:
73
+ # The absolute interpreter works where a bare `python` does not: macOS ships
74
+ # only python3, and Claude Desktop launches servers without the shell PATH.
75
+ entry: dict[str, Any] = {"command": sys.executable, "args": ["-m", "bilinc.cloud_mcp"]}
76
+ if not load_config_api_key():
77
+ # With a key saved by `bilinc login` the adapter reads it itself, so the
78
+ # client config carries no key at all. Without one, the client must pass it.
79
+ entry["env"] = {"BILINC_API_KEY": MCP_KEY_PLACEHOLDER}
80
+ return entry
81
+
82
+
67
83
  def _mcp_config() -> dict[str, Any]:
68
- return {
69
- "mcpServers": {
70
- "bilinc": {
71
- "command": "python",
72
- "args": ["-m", "bilinc.cloud_mcp"],
73
- "env": {"BILINC_API_KEY": "${BILINC_API_KEY}"},
74
- }
75
- }
76
- }
84
+ return {"mcpServers": {"bilinc": _mcp_server_entry()}}
85
+
86
+
87
+ def _claude_code_command() -> str:
88
+ argv = ["claude", "mcp", "add", "--scope", "user", "bilinc"]
89
+ if not load_config_api_key():
90
+ argv += ["-e", f"BILINC_API_KEY={MCP_KEY_PLACEHOLDER}"]
91
+ argv += ["--", sys.executable, "-m", "bilinc.cloud_mcp"]
92
+ return subprocess.list2cmdline(argv) if os.name == "nt" else shlex.join(argv)
93
+
94
+
95
+ def _claude_desktop_config_path() -> str:
96
+ if sys.platform == "darwin":
97
+ return "~/Library/Application Support/Claude/claude_desktop_config.json"
98
+ if os.name == "nt":
99
+ return r"%APPDATA%\Claude\claude_desktop_config.json"
100
+ return "~/.config/Claude/claude_desktop_config.json"
77
101
 
78
102
 
79
103
  def build_parser() -> argparse.ArgumentParser:
@@ -174,7 +198,14 @@ def build_parser() -> argparse.ArgumentParser:
174
198
 
175
199
  mcp = sub.add_parser("mcp", help="Print hosted Cloud MCP adapter configuration")
176
200
  mcp_sub = mcp.add_subparsers(dest="mcp_command")
177
- mcp_sub.add_parser("install", help="Print MCP config for agent runtimes")
201
+ mcp_install = mcp_sub.add_parser("install", help="Print MCP config for agent runtimes")
202
+ mcp_install.add_argument(
203
+ "--client",
204
+ choices=["json", "claude-code", "claude-desktop"],
205
+ default="json",
206
+ help="json: mcpServers config (default); claude-code: a `claude mcp add` command; "
207
+ "claude-desktop: the config plus where Claude Desktop keeps it",
208
+ )
178
209
 
179
210
  sub.add_parser("signup", help="Print the signup URL (free, no card required)")
180
211
 
@@ -252,7 +283,22 @@ def main(argv: list[str] | None = None) -> int:
252
283
  )
253
284
  return 0
254
285
  if args.command == "mcp" and args.mcp_command == "install":
255
- _print(_mcp_config())
286
+ # stdout stays copy-paste clean; guidance goes to stderr.
287
+ if args.client == "claude-code":
288
+ print(_claude_code_command())
289
+ else:
290
+ _print(_mcp_config())
291
+ if args.client == "claude-desktop":
292
+ print(
293
+ f'Merge the "bilinc" entry into mcpServers in {_claude_desktop_config_path()}, '
294
+ "then restart Claude Desktop.",
295
+ file=sys.stderr,
296
+ )
297
+ if not load_config_api_key():
298
+ print(
299
+ f"No saved key yet: run `bilinc login` first, or replace {MCP_KEY_PLACEHOLDER} with your API key.",
300
+ file=sys.stderr,
301
+ )
256
302
  return 0
257
303
  if args.command is None:
258
304
  parser.print_help()
@@ -1,6 +1,6 @@
1
1
  """Bilinc Cloud client.
2
2
 
3
- Bilinc 2.3.0 is cloud-only: the PyPI package is a thin SDK and MCP adapter for
3
+ Bilinc 2.3.1 is cloud-only: the PyPI package is a thin SDK and MCP adapter for
4
4
  https://bilinc.space. Local self-hosted StatePlane internals are no longer
5
5
  shipped in the public package.
6
6
  """
@@ -18,7 +18,7 @@ from dataclasses import dataclass
18
18
  from pathlib import Path
19
19
  from typing import Any, Callable
20
20
 
21
- __version__ = "2.3.0"
21
+ __version__ = "2.3.1"
22
22
  DEFAULT_BASE_URL = "https://bilinc.space"
23
23
  SIGNUP_URL = "https://bilinc.space/signup"
24
24
  ACTIVATION_CAMPAIGN = "activation_2_3_0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bilinc
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Cloud-only memory SDK and MCP adapter for autonomous agents
5
5
  Author: Bilinc Team
6
6
  License-Expression: BUSL-1.1
@@ -56,7 +56,7 @@ Dynamic: license-file
56
56
 
57
57
  Retrieval answers *"what is similar to this?"*. Long-running agents also need to answer *"who wrote this state, was it verified, did it contradict what we already knew, and can we undo it?"* — that is the layer Bilinc provides.
58
58
 
59
- Bilinc 2.3.0 on PyPI is the public cloud-only package: a thin Python SDK, CLI, and MCP adapter for Bilinc Cloud. It does not ship the local StatePlane, storage backends, eval, observability, integrations, or server runtime internals.
59
+ Bilinc 2.3.1 on PyPI is the public cloud-only package: a thin Python SDK, CLI, and MCP adapter for Bilinc Cloud. It does not ship the local StatePlane, storage backends, eval, observability, integrations, or server runtime internals.
60
60
 
61
61
  > **Frozen regression receipt** — LongMemEval-s cleaned retrieval fixture, 500 questions: **Hit@5 98.0%**, **NDCG@5 0.913**, no LLM reranker, no paid API. This is an isolated retrieval guardrail, not a current hosted SLA, end-to-end agent score, or competitor ranking — see [Benchmark receipt](#benchmark-receipt) for the full scope and qualification.
62
62
 
@@ -119,7 +119,7 @@ Cloud status check.
119
119
  To reproduce this release exactly:
120
120
 
121
121
  ```bash
122
- pip install -U bilinc==2.3.0
122
+ pip install -U bilinc==2.3.1
123
123
  ```
124
124
 
125
125
  If you prefer a browser guide, open https://bilinc.space/install and follow the
@@ -131,18 +131,28 @@ Bilinc exposes a standard Model Context Protocol server over **stdio**, so any
131
131
  MCP-compatible client can connect — Claude Code, Codex, Cursor, Hermes-Agent,
132
132
  opencode, and others.
133
133
 
134
+ After `bilinc login`, let the CLI write the setup for your client:
135
+
136
+ ```bash
137
+ bilinc mcp install --client claude-code # prints a ready `claude mcp add ...` command
138
+ bilinc mcp install --client claude-desktop # prints the config and where Claude Desktop keeps it
139
+ bilinc mcp install # plain mcpServers JSON for any other client
140
+ ```
141
+
134
142
  ```json
135
143
  {
136
144
  "mcpServers": {
137
145
  "bilinc": {
138
- "command": "python",
139
- "args": ["-m", "bilinc.cloud_mcp"],
140
- "env": { "BILINC_API_KEY": "bil_live_..." }
146
+ "command": "/path/to/python3",
147
+ "args": ["-m", "bilinc.cloud_mcp"]
141
148
  }
142
149
  }
143
150
  }
144
151
  ```
145
152
 
153
+ `command` is the interpreter that has Bilinc installed, and the adapter reads the key saved by `bilinc login`, so
154
+ the config carries no key. On a machine without a saved key, add `"env": { "BILINC_API_KEY": "bil_live_..." }`.
155
+
146
156
  Eight tools — the core memory lifecycle, and nothing else:
147
157
 
148
158
  | Tool | What it does |
@@ -12,8 +12,8 @@ import pytest
12
12
  def test_public_api_is_cloud_only():
13
13
  import bilinc
14
14
 
15
- assert bilinc.__version__ == "2.3.0"
16
- assert bilinc.version == "2.3.0"
15
+ assert bilinc.__version__ == "2.3.1"
16
+ assert bilinc.version == "2.3.1"
17
17
  assert "utm_campaign=activation_2_3_0" in bilinc.ACTIVATION_SIGNUP_URL
18
18
  assert hasattr(bilinc, "Bilinc")
19
19
  assert hasattr(bilinc, "CloudClient")
@@ -110,9 +110,9 @@ def test_cloud_client_commit_posts_to_hosted_api():
110
110
  "headers": {
111
111
  "Authorization": "Bearer bil_live_test",
112
112
  "Content-Type": "application/json",
113
- "User-Agent": "bilinc-python/2.3.0",
113
+ "User-Agent": "bilinc-python/2.3.1",
114
114
  "X-Bilinc-Client": "python-sdk",
115
- "X-Bilinc-Client-Version": "2.3.0",
115
+ "X-Bilinc-Client-Version": "2.3.1",
116
116
  },
117
117
  "body": json.dumps(
118
118
  {
@@ -188,7 +188,7 @@ def test_cloud_client_status_reads_the_authenticated_status_endpoint():
188
188
  "url": "https://bilinc.space/api/cloud/status",
189
189
  "headers": {
190
190
  "Authorization": "Bearer bil_live_test",
191
- "User-Agent": "bilinc-python/2.3.0",
191
+ "User-Agent": "bilinc-python/2.3.1",
192
192
  },
193
193
  "body": None,
194
194
  "timeout": 30.0,
@@ -327,6 +327,56 @@ def test_cli_start_login_doctor_quicktest_and_mcp_config(monkeypatch, capsys, tm
327
327
  assert "bil_live_cli_test" not in mcp_out.out
328
328
 
329
329
 
330
+ def test_mcp_install_uses_the_login_key_and_a_real_interpreter(monkeypatch, capsys, tmp_path):
331
+ import sys
332
+
333
+ from bilinc.cli import main as cli_main
334
+
335
+ monkeypatch.delenv("BILINC_API_KEY", raising=False)
336
+ monkeypatch.setenv("BILINC_CONFIG_DIR", str(tmp_path))
337
+ assert cli_main.main(["login", "--api-key", "bil_live_saved_key"]) == 0
338
+ capsys.readouterr()
339
+
340
+ # Default JSON: absolute interpreter, and no env block — the adapter reads the saved key.
341
+ assert cli_main.main(["mcp", "install"]) == 0
342
+ out = capsys.readouterr()
343
+ server = json.loads(out.out)["mcpServers"]["bilinc"]
344
+ assert server == {"command": sys.executable, "args": ["-m", "bilinc.cloud_mcp"]}
345
+ assert "bil_live_saved_key" not in out.out + out.err
346
+ assert "${BILINC_API_KEY}" not in out.out
347
+
348
+ # Claude Code: one runnable command, user scope, no key on the command line.
349
+ assert cli_main.main(["mcp", "install", "--client", "claude-code"]) == 0
350
+ out = capsys.readouterr()
351
+ assert out.out.startswith("claude mcp add --scope user bilinc -- ")
352
+ assert out.out.rstrip().endswith("-m bilinc.cloud_mcp")
353
+ assert "BILINC_API_KEY" not in out.out
354
+ assert "bil_live_saved_key" not in out.out + out.err
355
+
356
+ # Claude Desktop: clean JSON on stdout, the config location on stderr.
357
+ assert cli_main.main(["mcp", "install", "--client", "claude-desktop"]) == 0
358
+ out = capsys.readouterr()
359
+ assert json.loads(out.out)["mcpServers"]["bilinc"]["command"] == sys.executable
360
+ assert "claude_desktop_config.json" in out.err
361
+ assert "bil_live_saved_key" not in out.out + out.err
362
+
363
+
364
+ def test_mcp_install_without_a_saved_key_asks_for_one(monkeypatch, capsys, tmp_path):
365
+ from bilinc.cli import main as cli_main
366
+
367
+ monkeypatch.delenv("BILINC_API_KEY", raising=False)
368
+ monkeypatch.setenv("BILINC_CONFIG_DIR", str(tmp_path))
369
+
370
+ assert cli_main.main(["mcp", "install"]) == 0
371
+ out = capsys.readouterr()
372
+ assert json.loads(out.out)["mcpServers"]["bilinc"]["env"] == {"BILINC_API_KEY": "bil_live_..."}
373
+ assert "bilinc login" in out.err
374
+
375
+ assert cli_main.main(["mcp", "install", "--client", "claude-code"]) == 0
376
+ out = capsys.readouterr()
377
+ assert "-e BILINC_API_KEY=bil_live_..." in out.out
378
+
379
+
330
380
  def _forbidden_package_prefixes(root: str = "") -> tuple[str, ...]:
331
381
  return tuple(
332
382
  f"{root}{prefix}"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes