fcp-python 0.1.2__tar.gz → 0.1.4__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.
- {fcp_python-0.1.2 → fcp_python-0.1.4}/.claude-plugin/plugin.json +1 -1
- {fcp_python-0.1.2 → fcp_python-0.1.4}/PKG-INFO +1 -1
- {fcp_python-0.1.2 → fcp_python-0.1.4}/pyproject.toml +1 -1
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/bridge.py +8 -7
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/main.py +11 -1
- {fcp_python-0.1.2 → fcp_python-0.1.4}/uv.lock +1 -1
- {fcp_python-0.1.2 → fcp_python-0.1.4}/.github/workflows/ci.yml +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/.github/workflows/release.yml +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/.mcp.json +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/CLAUDE.md +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/Makefile +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/README.md +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/__init__.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/domain/__init__.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/domain/format.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/domain/model.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/domain/mutation.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/domain/query.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/domain/verbs.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/lsp/__init__.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/lsp/client.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/lsp/lifecycle.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/lsp/transport.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/lsp/types.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/lsp/workspace_edit.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/resolver/__init__.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/resolver/index.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/resolver/pipeline.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/src/fcp_python/resolver/selectors.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/__init__.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_bridge.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_client.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_format.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_index.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_lifecycle.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_model.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_mutation.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_pipeline.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_query.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_selectors.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_transport.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_types.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_verbs.py +0 -0
- {fcp_python-0.1.2 → fcp_python-0.1.4}/tests/test_workspace_edit.py +0 -0
|
@@ -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.
|
|
73
|
-
|
|
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
|
-
|
|
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-
|
|
141
|
+
"handler_name": "fcp-python",
|
|
141
142
|
"extensions": ["py"],
|
|
142
|
-
"capabilities":
|
|
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
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|