@conduit-ai/mcp-server 0.0.3 → 0.0.4
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/dist/index.js +17 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28454,7 +28454,7 @@ async function applyPendingConfig() {
|
|
|
28454
28454
|
const resp = await fetch(\`\${API_URL}/api/config/pending\`, {
|
|
28455
28455
|
headers: { "Authorization": \`Bearer \${TOKEN}\` },
|
|
28456
28456
|
});
|
|
28457
|
-
if (!resp.ok) return;
|
|
28457
|
+
if (!resp.ok || resp.status === 204) return;
|
|
28458
28458
|
const body = await resp.json();
|
|
28459
28459
|
const content = body?.data?.content;
|
|
28460
28460
|
if (!content) return;
|
|
@@ -28649,8 +28649,8 @@ function startPromptStream(client) {
|
|
|
28649
28649
|
}
|
|
28650
28650
|
|
|
28651
28651
|
export const ConduitPlugin = async ({ client }) => {
|
|
28652
|
-
await syncConfigToConduit();
|
|
28653
28652
|
await applyPendingConfig();
|
|
28653
|
+
await syncConfigToConduit();
|
|
28654
28654
|
|
|
28655
28655
|
// Start the real-time SSE prompt stream for immediate delivery
|
|
28656
28656
|
startPromptStream(client);
|
|
@@ -28669,6 +28669,21 @@ export const ConduitPlugin = async ({ client }) => {
|
|
|
28669
28669
|
const props = event.properties ?? {};
|
|
28670
28670
|
const sessionId = extractSessionId(t, props);
|
|
28671
28671
|
await send(t, sessionId, props);
|
|
28672
|
+
|
|
28673
|
+
// Detect compaction start from message.part.updated with a compaction part
|
|
28674
|
+
if (t === "message.part.updated") {
|
|
28675
|
+
const part = props.info?.part ?? props.part;
|
|
28676
|
+
if (part && part.type === "compaction") {
|
|
28677
|
+
await send("session.compacting", sessionId, props);
|
|
28678
|
+
}
|
|
28679
|
+
}
|
|
28680
|
+
}
|
|
28681
|
+
|
|
28682
|
+
// Forward session.compacted event (compaction finished)
|
|
28683
|
+
if (t === "session.compacted") {
|
|
28684
|
+
const props = event.properties ?? {};
|
|
28685
|
+
const sessionId = props.sessionID ?? props.sessionId ?? "unknown";
|
|
28686
|
+
await send("session.compacted", sessionId, props);
|
|
28672
28687
|
}
|
|
28673
28688
|
|
|
28674
28689
|
// On session.idle, check for pending prompts using the now-idle session
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduit-ai/mcp-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Conduit MCP server — universal AI coding agent integration. Monitor sessions, relay prompts, track metrics from any MCP-compatible client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|