fcp-python 0.1.2__tar.gz → 0.1.3__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.
Files changed (44) hide show
  1. {fcp_python-0.1.2 → fcp_python-0.1.3}/PKG-INFO +1 -1
  2. {fcp_python-0.1.2 → fcp_python-0.1.3}/pyproject.toml +1 -1
  3. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/bridge.py +8 -7
  4. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/main.py +11 -1
  5. {fcp_python-0.1.2 → fcp_python-0.1.3}/uv.lock +1 -1
  6. {fcp_python-0.1.2 → fcp_python-0.1.3}/.claude-plugin/plugin.json +0 -0
  7. {fcp_python-0.1.2 → fcp_python-0.1.3}/.github/workflows/ci.yml +0 -0
  8. {fcp_python-0.1.2 → fcp_python-0.1.3}/.github/workflows/release.yml +0 -0
  9. {fcp_python-0.1.2 → fcp_python-0.1.3}/.mcp.json +0 -0
  10. {fcp_python-0.1.2 → fcp_python-0.1.3}/CLAUDE.md +0 -0
  11. {fcp_python-0.1.2 → fcp_python-0.1.3}/Makefile +0 -0
  12. {fcp_python-0.1.2 → fcp_python-0.1.3}/README.md +0 -0
  13. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/__init__.py +0 -0
  14. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/domain/__init__.py +0 -0
  15. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/domain/format.py +0 -0
  16. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/domain/model.py +0 -0
  17. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/domain/mutation.py +0 -0
  18. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/domain/query.py +0 -0
  19. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/domain/verbs.py +0 -0
  20. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/lsp/__init__.py +0 -0
  21. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/lsp/client.py +0 -0
  22. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/lsp/lifecycle.py +0 -0
  23. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/lsp/transport.py +0 -0
  24. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/lsp/types.py +0 -0
  25. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/lsp/workspace_edit.py +0 -0
  26. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/resolver/__init__.py +0 -0
  27. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/resolver/index.py +0 -0
  28. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/resolver/pipeline.py +0 -0
  29. {fcp_python-0.1.2 → fcp_python-0.1.3}/src/fcp_python/resolver/selectors.py +0 -0
  30. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/__init__.py +0 -0
  31. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_bridge.py +0 -0
  32. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_client.py +0 -0
  33. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_format.py +0 -0
  34. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_index.py +0 -0
  35. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_lifecycle.py +0 -0
  36. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_model.py +0 -0
  37. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_mutation.py +0 -0
  38. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_pipeline.py +0 -0
  39. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_query.py +0 -0
  40. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_selectors.py +0 -0
  41. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_transport.py +0 -0
  42. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_types.py +0 -0
  43. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_verbs.py +0 -0
  44. {fcp_python-0.1.2 → fcp_python-0.1.3}/tests/test_workspace_edit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fcp-python
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Python Code Intelligence FCP — semantic Python code operations for LLMs via pylsp
5
5
  Requires-Python: <3.14,>=3.11
6
6
  Requires-Dist: fastmcp>=3.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fcp-python"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Python Code Intelligence FCP — semantic Python code operations for LLMs via pylsp"
5
5
  requires-python = ">=3.11,<3.14"
6
6
  dependencies = [
@@ -66,24 +66,25 @@ def start_bridge(
66
66
  handle_session: Callable[[str], Awaitable[str]],
67
67
  handle_query: Callable[[str], Awaitable[str]],
68
68
  handle_mutation: Callable[[list[str]], Awaitable[str]],
69
- ) -> None:
69
+ ) -> threading.Thread | None:
70
70
  """Connect to Slipstream daemon if available.
71
71
 
72
- Spawns a daemon thread with its own event loop. Silently returns
73
- if the socket is not found or any connection error occurs.
72
+ Spawns a daemon thread with its own event loop. Returns the thread
73
+ (for join in bridge-only mode) or None if no socket found.
74
74
  """
75
75
  try:
76
76
  path = _discover_socket()
77
77
  if path is None:
78
- return
78
+ return None
79
79
  t = threading.Thread(
80
80
  target=_bridge_thread,
81
81
  args=(path, handle_session, handle_query, handle_mutation),
82
82
  daemon=True,
83
83
  )
84
84
  t.start()
85
+ return t
85
86
  except Exception: # noqa: BLE001
86
- pass
87
+ return None
87
88
 
88
89
 
89
90
  def _bridge_thread(
@@ -137,9 +138,9 @@ async def _run_bridge_at(
137
138
  "jsonrpc": "2.0",
138
139
  "method": "fcp.register",
139
140
  "params": {
140
- "handler_name": "fcp-py",
141
+ "handler_name": "fcp-python",
141
142
  "extensions": ["py"],
142
- "capabilities": ["ops", "query", "session"],
143
+ "capabilities": {"ops": True, "query": True, "session": True},
143
144
  "agent_help": _AGENT_HELP,
144
145
  },
145
146
  }
@@ -279,7 +279,17 @@ def main() -> None:
279
279
  results.append(await dispatch_mutation(_model, _registry, op))
280
280
  return "\n\n".join(results)
281
281
 
282
- start_bridge(_bridge_session, _bridge_query, _bridge_mutation)
282
+ bridge_thread = start_bridge(_bridge_session, _bridge_query, _bridge_mutation)
283
+
284
+ # Bridge-only mode: when spawned by slipstream (stdin is /dev/null),
285
+ # mcp.run() would get immediate EOF and exit, killing the bridge thread.
286
+ # Instead, block on the bridge thread directly.
287
+ if os.environ.get("SLIPSTREAM_SOCKET") and not os.isatty(0):
288
+ if bridge_thread is not None:
289
+ bridge_thread.join()
290
+ return
291
+ # No bridge thread means socket wasn't found — nothing to do
292
+ return
283
293
 
284
294
  mcp.run()
285
295
 
@@ -386,7 +386,7 @@ wheels = [
386
386
 
387
387
  [[package]]
388
388
  name = "fcp-python"
389
- version = "0.1.2"
389
+ version = "0.1.3"
390
390
  source = { editable = "." }
391
391
  dependencies = [
392
392
  { name = "fastmcp" },
File without changes
File without changes
File without changes
File without changes
File without changes