@josephyan/qingflow-cli 0.2.0-beta.65 → 0.2.0-beta.66

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/README.md CHANGED
@@ -3,13 +3,13 @@
3
3
  Install:
4
4
 
5
5
  ```bash
6
- npm install @josephyan/qingflow-cli@0.2.0-beta.65
6
+ npm install @josephyan/qingflow-cli@0.2.0-beta.66
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @josephyan/qingflow-cli@0.2.0-beta.65 qingflow
12
+ npx -y -p @josephyan/qingflow-cli@0.2.0-beta.66 qingflow
13
13
  ```
14
14
 
15
15
  Environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@josephyan/qingflow-cli",
3
- "version": "0.2.0-beta.65",
3
+ "version": "0.2.0-beta.66",
4
4
  "description": "Human-friendly Qingflow command line interface for auth, record operations, import, tasks, and stable builder flows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qingflow-mcp"
7
- version = "0.2.0b65"
7
+ version = "0.2.0b66"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,13 +1,14 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  import json
4
+ import re
4
5
 
5
6
 
6
7
  DEFAULT_ICON_COLOR = "qing-orange"
7
8
  DEFAULT_ICON_STYLE_POOL: tuple[tuple[str, str], ...] = (
8
9
  ("briefcase", "qing-orange"),
9
10
  ("calendar", "emerald"),
10
- ("folder", "azure"),
11
+ ("files-folder", "azure"),
11
12
  ("shield-check", "indigo"),
12
13
  ("user-group", "qing-purple"),
13
14
  ("chart-square-bar", "blue"),
@@ -16,41 +17,41 @@ DEFAULT_ICON_STYLE_POOL: tuple[tuple[str, str], ...] = (
16
17
  ("home", "orange"),
17
18
  ("globe", "red"),
18
19
  )
19
- SUPPORTED_EX_ICONS = {
20
- "ex-alert-outlined",
21
- "ex-clock-outlined",
22
- "ex-folder-outlined",
23
- "ex-form-outlined",
24
- "ex-home-outlined",
25
- "ex-user-outlined",
20
+ LEGACY_EX_ICON_MAP = {
21
+ "ex-alert-outlined": "exclamation-circle",
22
+ "ex-clock-outlined": "clock",
23
+ "ex-folder-outlined": "folder",
24
+ "ex-form-outlined": "template",
25
+ "ex-home-outlined": "home",
26
+ "ex-user-outlined": "user",
26
27
  }
27
28
 
28
29
  ICON_ALIAS_MAP = {
29
- "archive-box": "ex-form-outlined",
30
- "beaker": "ex-form-outlined",
31
- "briefcase": "ex-folder-outlined",
32
- "building-office": "ex-form-outlined",
33
- "calendar": "ex-clock-outlined",
34
- "chat": "ex-clock-outlined",
35
- "chat-bubble-left-right": "ex-clock-outlined",
36
- "chart-bar": "ex-form-outlined",
37
- "chart-square-bar": "ex-form-outlined",
38
- "check-badge": "ex-alert-outlined",
39
- "check-circle": "ex-alert-outlined",
40
- "clipboard-check": "ex-form-outlined",
41
- "clock": "ex-clock-outlined",
42
- "cube": "ex-form-outlined",
43
- "document-text": "ex-form-outlined",
44
- "folder": "ex-folder-outlined",
45
- "home": "ex-home-outlined",
46
- "office-building": "ex-form-outlined",
47
- "shield-check": "ex-alert-outlined",
48
- "template": "ex-form-outlined",
49
- "user": "ex-user-outlined",
50
- "user-group": "ex-user-outlined",
51
- "users": "ex-user-outlined",
52
- "view-grid": "ex-home-outlined",
53
- "warning": "ex-alert-outlined",
30
+ "archive-box": "template",
31
+ "beaker": "beaker",
32
+ "briefcase": "briefcase",
33
+ "building-office": "office-building",
34
+ "calendar": "calendar",
35
+ "chat": "chat",
36
+ "chat-bubble-left-right": "chat",
37
+ "chart-bar": "chart-bar",
38
+ "chart-square-bar": "chart-square-bar",
39
+ "check-badge": "badge-check",
40
+ "check-circle": "check-circle",
41
+ "clipboard-check": "clipboard-check",
42
+ "clock": "clock",
43
+ "cube": "cube-transparent",
44
+ "document-text": "document-text",
45
+ "folder": "files-folder",
46
+ "home": "home",
47
+ "office-building": "office-building",
48
+ "shield-check": "shield-check",
49
+ "template": "template",
50
+ "user": "user",
51
+ "user-group": "user-group",
52
+ "users": "user-group",
53
+ "view-grid": "view-grid",
54
+ "warning": "exclamation-circle",
54
55
  }
55
56
 
56
57
 
@@ -64,8 +65,6 @@ def encode_workspace_icon(
64
65
  if icon and _looks_like_icon_json(icon):
65
66
  return icon
66
67
  normalized_icon_name = normalize_workspace_icon_name(icon or fallback_icon_name)
67
- if normalized_icon_name and normalized_icon_name.startswith("ex-") and not color:
68
- return normalized_icon_name
69
68
  icon_name = normalized_icon_name
70
69
  icon_color = color or DEFAULT_ICON_COLOR
71
70
  if icon_name:
@@ -156,27 +155,31 @@ def normalize_workspace_icon_name(icon: str | None) -> str | None:
156
155
  try:
157
156
  payload = json.loads(icon)
158
157
  except Exception:
159
- return "ex-form-outlined"
160
- return normalize_workspace_icon_name(payload.get("iconName")) or "ex-form-outlined"
161
- if icon in SUPPORTED_EX_ICONS:
162
- return icon
158
+ return "template"
159
+ return normalize_workspace_icon_name(payload.get("iconName")) or "template"
163
160
  normalized = icon.strip().lower()
161
+ if normalized in LEGACY_EX_ICON_MAP:
162
+ return LEGACY_EX_ICON_MAP[normalized]
164
163
  if normalized in ICON_ALIAS_MAP:
165
164
  return ICON_ALIAS_MAP[normalized]
166
165
  for token in normalized.replace("_", "-").split("-"):
167
166
  if token in ICON_ALIAS_MAP:
168
167
  return ICON_ALIAS_MAP[token]
169
168
  if "folder" in normalized or "package" in normalized:
170
- return "ex-folder-outlined"
171
- if "home" in normalized or "portal" in normalized or "dashboard" in normalized:
172
- return "ex-home-outlined"
169
+ return "files-folder"
170
+ if "home" in normalized:
171
+ return "home"
172
+ if "portal" in normalized or "dashboard" in normalized:
173
+ return "view-grid"
173
174
  if "user" in normalized or "member" in normalized or "contact" in normalized:
174
- return "ex-user-outlined"
175
+ return "user"
175
176
  if "clock" in normalized or "time" in normalized or "schedule" in normalized or "log" in normalized:
176
- return "ex-clock-outlined"
177
+ return "clock"
177
178
  if "risk" in normalized or "alert" in normalized or "warn" in normalized or "safety" in normalized:
178
- return "ex-alert-outlined"
179
- return "ex-form-outlined"
179
+ return "exclamation-circle"
180
+ if re.fullmatch(r"[a-z0-9-]+", normalized):
181
+ return normalized
182
+ return "template"
180
183
 
181
184
 
182
185
  def _looks_like_icon_json(value: str) -> bool: