@myrialabs/clopen 0.4.43 → 0.4.44

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.html CHANGED
@@ -63,7 +63,7 @@
63
63
  }
64
64
  })();
65
65
  </script>
66
- <script type="module" crossorigin src="/assets/main-CMRXlv2f.js"></script>
66
+ <script type="module" crossorigin src="/assets/main-DOkwqXRU.js"></script>
67
67
  <link rel="stylesheet" crossorigin href="/assets/main-DzCY0n-j.css">
68
68
  </head>
69
69
  <body
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrialabs/clopen",
3
- "version": "0.4.43",
3
+ "version": "0.4.44",
4
4
  "description": "All-in-one web workspace for AI coding agents — Claude Code, OpenCode, Codex, Copilot, Qwen Code, Pi, Cline, and Cursor — with chat, terminal, git, browser preview, database client, checkpoints, and real-time collaboration",
5
5
  "author": "Myria Labs",
6
6
  "license": "MIT",
@@ -77,8 +77,8 @@
77
77
  "prepublishOnly": "bun run build"
78
78
  },
79
79
  "devDependencies": {
80
- "@anthropic-ai/claude-agent-sdk": "0.3.229",
81
- "@anthropic-ai/sdk": "0.116.0",
80
+ "@anthropic-ai/claude-agent-sdk": "0.3.284",
81
+ "@anthropic-ai/sdk": "0.129.0",
82
82
  "@cline/agents": "0.0.74",
83
83
  "@cline/sdk": "0.0.74",
84
84
  "@cursor/sdk": "1.0.27",
@@ -117,7 +117,7 @@
117
117
  "@huggingface/tokenizers": "0.1.3",
118
118
  "@iconify-json/lucide": "1.2.96",
119
119
  "@iconify-json/material-icon-theme": "1.2.55",
120
- "@modelcontextprotocol/sdk": "1.29.0",
120
+ "@modelcontextprotocol/sdk": "1.31.0",
121
121
  "@monaco-editor/loader": "1.7.0",
122
122
  "@myrialabs/ptykit": "0.0.7",
123
123
  "@myrialabs/tunnelkit": "0.0.15",
@@ -146,7 +146,7 @@
146
146
  "ssh2": "1.17.0",
147
147
  "systeminformation": "5.33.1",
148
148
  "typebox": "1.1.38",
149
- "zod": "4.3.6"
149
+ "zod": "4.6.5"
150
150
  },
151
151
  "trustedDependencies": [
152
152
  "puppeteer",
@@ -95,6 +95,8 @@ export {
95
95
  toCanonicalToolName,
96
96
  } from './tool';
97
97
 
98
+ export { toMcpServerStatus } from './stream';
99
+
98
100
  export type {
99
101
  SubAgentToolActivity,
100
102
  SubAgentTextActivity,
@@ -80,9 +80,46 @@ export interface SystemInitEvent {
80
80
  mcpServers: McpServerStatus[];
81
81
  }
82
82
 
83
+ /**
84
+ * MCP connection state as the engine reported it at session init.
85
+ *
86
+ * The vocabulary is the Claude Agent SDK's, which is the widest any adapter
87
+ * feeds in; `disconnected` is Clopen's own fallback for a producer that sent no
88
+ * status at all (Qwen types the field as a bare `string`). Two of these are not
89
+ * failures and must not raise a toast: `needs-auth` means the server wants
90
+ * credentials configured in Settings → MCP, and `pending` means still
91
+ * connecting — routine since claude-agent-sdk 0.3.282 made MCP servers connect
92
+ * in the background so a slow server no longer delays session start. See the
93
+ * `system_init` arm of stream-manager.ts.
94
+ */
83
95
  export interface McpServerStatus {
84
96
  name: string;
85
- status: 'connected' | 'disconnected' | 'error';
97
+ status: 'connected' | 'pending' | 'needs-auth' | 'failed' | 'disabled' | 'disconnected';
98
+ }
99
+
100
+ const MCP_SERVER_STATUSES = new Set<McpServerStatus['status']>([
101
+ 'connected', 'pending', 'needs-auth', 'failed', 'disabled', 'disconnected'
102
+ ]);
103
+
104
+ /**
105
+ * Narrow an engine-reported MCP status string into the union above.
106
+ *
107
+ * Every SDK that carries this field types it as a bare `string` — the Claude
108
+ * Agent SDK included, whose own richer `McpServerStatus` belongs to a different
109
+ * API surface than the `system:init` payload. So the value has to be checked,
110
+ * not asserted, and the check lives here rather than beside each call site: a
111
+ * per-adapter copy of the vocabulary is how one of them goes stale while
112
+ * type-checking clean.
113
+ *
114
+ * Anything unrecognised or absent becomes `disconnected`, which reads as
115
+ * "reported nothing usable" and raises a toast. Do not fold it into a soft
116
+ * status to quiet the toast: a genuinely unreachable server would then be
117
+ * indistinguishable from one that is still connecting.
118
+ */
119
+ export function toMcpServerStatus(status: string | undefined): McpServerStatus['status'] {
120
+ return MCP_SERVER_STATUSES.has(status as McpServerStatus['status'])
121
+ ? (status as McpServerStatus['status'])
122
+ : 'disconnected';
86
123
  }
87
124
 
88
125
  export type RateLimitType =