tagword-codeagent 1.1.6__py3-none-any.whl

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 (173) hide show
  1. codeagent/__init__.py +10 -0
  2. codeagent/__main__.py +13 -0
  3. codeagent/cli/__init__.py +13 -0
  4. codeagent/cli/entrypoint.py +161 -0
  5. codeagent/cli/main.py +979 -0
  6. codeagent/core/__init__.py +2 -0
  7. codeagent/core/attachments.py +342 -0
  8. codeagent/core/audio_models.py +50 -0
  9. codeagent/core/bootstrap.py +178 -0
  10. codeagent/core/default_presets.py +159 -0
  11. codeagent/core/env.py +106 -0
  12. codeagent/core/folder_picker.py +151 -0
  13. codeagent/core/image_understanding.py +90 -0
  14. codeagent/core/models.py +6 -0
  15. codeagent/core/paths.py +238 -0
  16. codeagent/core/pricing.py +107 -0
  17. codeagent/core/process_ports.py +258 -0
  18. codeagent/core/seed_bridge.py +21 -0
  19. codeagent/core/settings.py +98 -0
  20. codeagent/core/speech_synth.py +330 -0
  21. codeagent/core/team_config.py +247 -0
  22. codeagent/core/team_manager.py +245 -0
  23. codeagent/core/token_counter.py +41 -0
  24. codeagent/core/tts_voices.py +103 -0
  25. codeagent/core/usage_billing.py +72 -0
  26. codeagent/core/vision_models.py +93 -0
  27. codeagent/memory/diary.py +144 -0
  28. codeagent/persona_defaults/README.md +12 -0
  29. codeagent/persona_defaults/agent.md +352 -0
  30. codeagent/persona_defaults/identity.md +29 -0
  31. codeagent/persona_defaults/memory.md +4 -0
  32. codeagent/persona_defaults/skills.md +325 -0
  33. codeagent/persona_defaults/soul.md +38 -0
  34. codeagent/persona_defaults/tools.md +41 -0
  35. codeagent/persona_defaults/user.md +18 -0
  36. codeagent/runtime/__init__.py +11 -0
  37. codeagent/runtime/agent_context.py +6 -0
  38. codeagent/runtime/agent_runtime.py +21 -0
  39. codeagent/runtime/compact_prompt.py +9 -0
  40. codeagent/runtime/compact_state.py +40 -0
  41. codeagent/runtime/llm_worker.py +132 -0
  42. codeagent/runtime/orchestrator.py +161 -0
  43. codeagent/runtime/prompt_enrichment.py +324 -0
  44. codeagent/runtime/session_manager.py +30 -0
  45. codeagent/runtime/task_split.py +38 -0
  46. codeagent/runtime/turn_loop.py +13 -0
  47. codeagent/runtime/worker.py +48 -0
  48. codeagent/server/__init__.py +505 -0
  49. codeagent/server/app_factory.py +1292 -0
  50. codeagent/server/attachment_api.py +261 -0
  51. codeagent/server/hub.py +175 -0
  52. codeagent/server/icon.png +0 -0
  53. codeagent/server/self_healing.py +143 -0
  54. codeagent/server/team_engine.py +243 -0
  55. codeagent/server/tts_api.py +51 -0
  56. codeagent/server/webui_api_app.py +3180 -0
  57. codeagent/skills/__init__.py +2 -0
  58. codeagent/skills/select.py +144 -0
  59. codeagent/tools/__init__.py +6 -0
  60. codeagent/tools/agent_tools.py +10 -0
  61. codeagent/web/__init__.py +1 -0
  62. codeagent/web/__pycache__/__init__.cpython-313.pyc +0 -0
  63. codeagent/web/__pycache__/app.cpython-313.pyc +0 -0
  64. codeagent/web/__pycache__/auth_impl.cpython-313.pyc +0 -0
  65. codeagent/web/auth_impl.py +326 -0
  66. codeagent/web/static/00-marked.min.js +6 -0
  67. codeagent/web/static/00-mermaid.min.js +2314 -0
  68. codeagent/web/static/00-purify.min.js +3 -0
  69. codeagent/web/static/00-storage.js +83 -0
  70. codeagent/web/static/00-utils.js +51 -0
  71. codeagent/web/static/01-theme.css +96 -0
  72. codeagent/web/static/01a-scroll.js +86 -0
  73. codeagent/web/static/01b-think.js +62 -0
  74. codeagent/web/static/01c-session-identity.js +81 -0
  75. codeagent/web/static/01c-session-thinking.js +61 -0
  76. codeagent/web/static/01c-session-tree-menus.js +349 -0
  77. codeagent/web/static/01c-session-tree.js +531 -0
  78. codeagent/web/static/01c-session-utilities.js +83 -0
  79. codeagent/web/static/01c-vision-model.js +132 -0
  80. codeagent/web/static/01d-image-gen-model.js +84 -0
  81. codeagent/web/static/01e-audio-model.js +97 -0
  82. codeagent/web/static/01f-compose-ui.js +88 -0
  83. codeagent/web/static/01g-tts-settings.js +128 -0
  84. codeagent/web/static/01h-music-model.js +85 -0
  85. codeagent/web/static/01i-model-stack.js +291 -0
  86. codeagent/web/static/01j-video-gen-model.js +85 -0
  87. codeagent/web/static/01k-model-stack-bootstrap.js +66 -0
  88. codeagent/web/static/01k-model-stack-state.js +209 -0
  89. codeagent/web/static/01q-inflight.js +195 -0
  90. codeagent/web/static/02-reset.css +22 -0
  91. codeagent/web/static/02-session-ui.js +201 -0
  92. codeagent/web/static/03-layout-p1.css +2 -0
  93. codeagent/web/static/03-layout-p2.css +2 -0
  94. codeagent/web/static/03a-links-stream.js +88 -0
  95. codeagent/web/static/03b-stream-text.js +119 -0
  96. codeagent/web/static/03c-render-bubble.js +520 -0
  97. codeagent/web/static/03d-agent-bubble.js +126 -0
  98. codeagent/web/static/03e-tool-trace.js +182 -0
  99. codeagent/web/static/03f-timeline.js +54 -0
  100. codeagent/web/static/03g-bubble-tts.js +292 -0
  101. codeagent/web/static/04-components-p1.css +1 -0
  102. codeagent/web/static/04-components-p2b.css +1 -0
  103. codeagent/web/static/04-components-p3.css +2 -0
  104. codeagent/web/static/04-components-p4.css +1 -0
  105. codeagent/web/static/04-components-p5.css +1 -0
  106. codeagent/web/static/04-components-p6.css +58 -0
  107. codeagent/web/static/04-components-p7.css +4 -0
  108. codeagent/web/static/04-components-p8.css +1 -0
  109. codeagent/web/static/04-components-p9.css +1 -0
  110. codeagent/web/static/04-ws-connect.js +351 -0
  111. codeagent/web/static/04-ws-helpers.js +116 -0
  112. codeagent/web/static/05-chat-p1.css +1058 -0
  113. codeagent/web/static/05-chat-p2.css +1 -0
  114. codeagent/web/static/05-chat-p3.css +295 -0
  115. codeagent/web/static/05a-session-history.js +176 -0
  116. codeagent/web/static/05b-session-list.js +114 -0
  117. codeagent/web/static/05c-dialog.js +123 -0
  118. codeagent/web/static/05d-project-create.js +172 -0
  119. codeagent/web/static/05e-project-remote.js +143 -0
  120. codeagent/web/static/06-chat.js +552 -0
  121. codeagent/web/static/06-utilities.css +181 -0
  122. codeagent/web/static/06b-attachments.js +304 -0
  123. codeagent/web/static/06c-camera.js +488 -0
  124. codeagent/web/static/07-activity-bar.css +127 -0
  125. codeagent/web/static/09-git-p1.css +1 -0
  126. codeagent/web/static/09-git-p2.css +1 -0
  127. codeagent/web/static/09a-init-bind.js +110 -0
  128. codeagent/web/static/09b-panel-toggle.js +80 -0
  129. codeagent/web/static/09c-api-refresh.js +100 -0
  130. codeagent/web/static/09d-status-log.js +80 -0
  131. codeagent/web/static/09e-commit.js +80 -0
  132. codeagent/web/static/09f-remote.js +93 -0
  133. codeagent/web/static/11a-cron-parse.js +117 -0
  134. codeagent/web/static/11b-cron-panel.js +100 -0
  135. codeagent/web/static/11c-cron-card.js +133 -0
  136. codeagent/web/static/11d-cron-form.js +105 -0
  137. codeagent/web/static/11e-env-config.js +168 -0
  138. codeagent/web/static/11f-env-llm-a-state.js +136 -0
  139. codeagent/web/static/11f-env-llm-b-form.js +409 -0
  140. codeagent/web/static/11f-env-llm-c-board.js +322 -0
  141. codeagent/web/static/11g-env-paths-git.js +973 -0
  142. codeagent/web/static/11h-env-mcp-a-state.js +161 -0
  143. codeagent/web/static/11h-env-mcp-b-form.js +229 -0
  144. codeagent/web/static/11h-env-mcp-c-board.js +565 -0
  145. codeagent/web/static/12-plugins.js +127 -0
  146. codeagent/web/static/13a-skills.js +156 -0
  147. codeagent/web/static/13a-todo-utils.js +140 -0
  148. codeagent/web/static/13b-todo-fetch.js +106 -0
  149. codeagent/web/static/13b-tools.js +127 -0
  150. codeagent/web/static/13c-todo-crud.js +92 -0
  151. codeagent/web/static/14-activity-bar.js +177 -0
  152. codeagent/web/static/15-plans.css +194 -0
  153. codeagent/web/static/15-plans.js +219 -0
  154. codeagent/web/static/16-mobile.css +612 -0
  155. codeagent/web/static/16-mobile.js +178 -0
  156. codeagent/web/static/17-preset-ux.css +287 -0
  157. codeagent/web/static/18-agent-mgr.css +616 -0
  158. codeagent/web/static/18-agent-mgr.js +204 -0
  159. codeagent/web/static/24-health-dashboard.js +68 -0
  160. codeagent/web/static/99-brand-polish.css +152 -0
  161. codeagent/web/static/body.html +824 -0
  162. codeagent/web/static/setup/setup_form.html +171 -0
  163. codeagent/web/static/setup/setup_head.html +100 -0
  164. codeagent/web/static/setup/setup_tail.html +264 -0
  165. codeagent/web/static/setup/setup_test.html +38 -0
  166. codeagent/web/web_login.html +265 -0
  167. codeagent/web/webui.html +35 -0
  168. tagword_codeagent-1.1.6.dist-info/METADATA +273 -0
  169. tagword_codeagent-1.1.6.dist-info/RECORD +173 -0
  170. tagword_codeagent-1.1.6.dist-info/WHEEL +5 -0
  171. tagword_codeagent-1.1.6.dist-info/entry_points.txt +3 -0
  172. tagword_codeagent-1.1.6.dist-info/licenses/LICENSE +21 -0
  173. tagword_codeagent-1.1.6.dist-info/top_level.txt +1 -0
@@ -0,0 +1,178 @@
1
+ ;(function initMobileUi() {
2
+ var MQ = window.matchMedia('(max-width: 768px)');
3
+
4
+ function isMobile() {
5
+ return MQ.matches;
6
+ }
7
+
8
+ function closeSidebar() {
9
+ document.body.classList.remove('sidebar-open');
10
+ var btn = document.getElementById('btnToggleSidebar');
11
+ if (btn) btn.classList.remove('is-active');
12
+ var backdrop = document.getElementById('sidebarBackdrop');
13
+ if (backdrop) backdrop.setAttribute('aria-hidden', 'true');
14
+ }
15
+
16
+ function openSidebar() {
17
+ if (!isMobile()) return;
18
+ var mode = document.body.getAttribute('data-activity-mode');
19
+ if (mode && mode !== 'chat') return;
20
+ document.body.classList.add('sidebar-open');
21
+ var btn = document.getElementById('btnToggleSidebar');
22
+ if (btn) btn.classList.add('is-active');
23
+ var backdrop = document.getElementById('sidebarBackdrop');
24
+ if (backdrop) backdrop.setAttribute('aria-hidden', 'false');
25
+ }
26
+
27
+ function toggleSidebar() {
28
+ if (document.body.classList.contains('sidebar-open')) closeSidebar();
29
+ else openSidebar();
30
+ }
31
+
32
+ function syncActivityModeAttr(mode) {
33
+ if (mode) document.body.setAttribute('data-activity-mode', mode);
34
+ if (isMobile()) closeSidebar();
35
+ }
36
+
37
+ // Expose for activity-bar.js
38
+ window.webuiMobileCloseSidebar = closeSidebar;
39
+ window.webuiMobileSyncMode = syncActivityModeAttr;
40
+
41
+ var sidebarBtn = document.getElementById('btnToggleSidebar');
42
+ if (sidebarBtn) {
43
+ sidebarBtn.addEventListener('click', function(e) {
44
+ e.stopPropagation();
45
+ toggleSidebar();
46
+ });
47
+ }
48
+
49
+ var backdrop = document.getElementById('sidebarBackdrop');
50
+ if (backdrop) {
51
+ backdrop.addEventListener('click', closeSidebar);
52
+ }
53
+
54
+ // Close drawer after picking a session
55
+ window.addEventListener('session-changed', function() {
56
+ if (isMobile()) closeSidebar();
57
+ });
58
+
59
+ // Close drawer when switching project
60
+ window.addEventListener('project-changed', function() {
61
+ if (isMobile()) closeSidebar();
62
+ });
63
+
64
+ // Resize Monaco editor on orientation change
65
+ MQ.addEventListener('change', function() {
66
+ closeSidebar();
67
+ window.dispatchEvent(new Event('resize'));
68
+ });
69
+
70
+ // iOS keyboard: keep compose visible
71
+ if (window.visualViewport) {
72
+ var composeEl = null;
73
+ var pageEl = null;
74
+ var activityBarEl = null;
75
+ function onViewportResize() {
76
+ if (!isMobile()) {
77
+ document.documentElement.style.removeProperty('--vv-offset');
78
+ return;
79
+ }
80
+ var vv = window.visualViewport;
81
+ var offset = Math.max(0, window.innerHeight - vv.height - vv.offsetTop);
82
+ document.documentElement.style.setProperty('--vv-offset', offset + 'px');
83
+ if (!composeEl) composeEl = document.querySelector('.compose');
84
+ if (!pageEl) pageEl = document.getElementById('page-chat');
85
+ if (!activityBarEl) activityBarEl = document.getElementById('activityBar');
86
+ var keyboardOpen = offset > 0;
87
+ if (composeEl && document.activeElement && document.activeElement.id === 'msg') {
88
+ composeEl.style.transform = keyboardOpen ? 'translateY(-' + offset + 'px)' : '';
89
+ } else if (composeEl) {
90
+ composeEl.style.transform = '';
91
+ }
92
+ // 键盘弹出时:iOS 上 fixed 和 absolute 坐标系统不一致,
93
+ // activity-bar(fixed, z-index:120)会拦截 compose dock 的触摸事件。
94
+ // 临时降低 activity-bar 层级到 page(z-index:1)之下。
95
+ if (activityBarEl) {
96
+ activityBarEl.style.zIndex = keyboardOpen ? '0' : '';
97
+ }
98
+ }
99
+ window.visualViewport.addEventListener('resize', onViewportResize);
100
+ window.visualViewport.addEventListener('scroll', onViewportResize);
101
+ var msgInput = document.getElementById('msg');
102
+ if (msgInput) {
103
+ msgInput.addEventListener('blur', function() {
104
+ if (composeEl) composeEl.style.transform = '';
105
+ if (activityBarEl) activityBarEl.style.zIndex = '';
106
+ document.documentElement.style.removeProperty('--vv-offset');
107
+ });
108
+ }
109
+ }
110
+
111
+ // 手机视图 + 键盘弹出时:compose dock 按钮(思考/加号/发送等)在 touchstart 阶段
112
+ // 立即 blur 输入框 + 主动触发对应操作,避免键盘收起 → viewport resize → 按钮位移 → 事件丢失
113
+ function initComposeDockTouchFix() {
114
+ if (!isMobile()) return;
115
+ var dock = document.querySelector('.compose__dock');
116
+ if (!dock) return;
117
+ dock.addEventListener('touchstart', function(e) {
118
+ var targetBtn = e.target.closest('.compose__tool-btn, .compose__chip, .btn--send, .compose__attach-option');
119
+ if (!targetBtn) return;
120
+ if (!(document.activeElement && document.activeElement.id === 'msg')) return;
121
+ // 键盘弹出时:先 blur 让键盘收起
122
+ // blur 是同步操作,此时 compose 的 transform 还没被 visualViewport.resize 重置,
123
+ // 按钮坐标没变。同步触发 click 能命中正确位置。
124
+ document.activeElement.blur();
125
+ e.preventDefault();
126
+ // 同步触发 click(blur 在同一 task 中,resize 事件尚未触发)
127
+ targetBtn.click();
128
+ }, { passive: false });
129
+ }
130
+ if (document.readyState === 'loading') {
131
+ document.addEventListener('DOMContentLoaded', initComposeDockTouchFix);
132
+ } else {
133
+ initComposeDockTouchFix();
134
+ }
135
+
136
+ // Initial mode attribute + page visibility (after activity bar init in 14-*.js)
137
+ try {
138
+ var saved = tryGetLS(STORAGE_KEYS.SESS_ACTIVITY_MODE) || 'chat';
139
+ document.body.setAttribute('data-activity-mode', saved);
140
+ if (typeof switchToPage === 'function') switchToPage(saved);
141
+ } catch (_) {
142
+ document.body.setAttribute('data-activity-mode', 'chat');
143
+ if (typeof switchToPage === 'function') switchToPage('chat');
144
+ }
145
+
146
+ // ======== 面板关闭按钮(所有尺寸通用):点击 ✕ 关闭 Plan/Todo/Git 面板 ========
147
+ document.addEventListener('click', function(e) {
148
+ var closeBtn = e.target.closest('.panel-close-btn');
149
+ if (!closeBtn) return;
150
+ var panelId = closeBtn.getAttribute('data-panel');
151
+ if (!panelId) return;
152
+ var panel = document.getElementById(panelId);
153
+ if (!panel) return;
154
+ // 隐藏面板
155
+ panel.style.display = 'none';
156
+ // 清除对应 toggle 按钮的 is-active
157
+ var btnMap = {
158
+ todoPanel: 'btnToggleTodos',
159
+ planPanel: 'btnTogglePlans',
160
+ gitPanel: 'btnToggleGit'
161
+ };
162
+ var btnId = btnMap[panelId];
163
+ if (btnId) {
164
+ var btn = document.getElementById(btnId);
165
+ if (btn) btn.classList.remove('is-active');
166
+ }
167
+ // 清除 localStorage 标志
168
+ var lsMap = {
169
+ todoPanel: 'oa_todo_panel_open',
170
+ planPanel: 'oa_plan_panel_open',
171
+ gitPanel: 'oa_git_panel_open'
172
+ };
173
+ var lsKey = lsMap[panelId];
174
+ if (lsKey) {
175
+ try { localStorage.setItem(lsKey, '0'); } catch (_) {}
176
+ }
177
+ });
178
+ })();
@@ -0,0 +1,287 @@
1
+ /* ============ Preset board (capability-grouped config) ============ */
2
+ .preset-board {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--sp-4);
6
+ }
7
+ .preset-board-section {
8
+ border: 1px solid var(--border);
9
+ border-radius: var(--r-lg);
10
+ background: var(--bg-panel);
11
+ overflow: hidden;
12
+ }
13
+ .preset-board-section__head {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ gap: var(--sp-2);
18
+ padding: var(--sp-2) var(--sp-3);
19
+ background: var(--bg-subtle);
20
+ border-bottom: 1px solid var(--border);
21
+ }
22
+ .preset-board-section__title {
23
+ margin: 0;
24
+ font-size: 12px;
25
+ font-weight: 650;
26
+ letter-spacing: 0.04em;
27
+ color: var(--text);
28
+ display: inline-flex;
29
+ align-items: center;
30
+ gap: 6px;
31
+ }
32
+ .preset-board-section__count {
33
+ font-size: 10px;
34
+ font-weight: 600;
35
+ color: var(--text-muted);
36
+ background: var(--bg-panel);
37
+ border: 1px solid var(--border);
38
+ border-radius: var(--r-full);
39
+ padding: 0 6px;
40
+ line-height: 1.5;
41
+ }
42
+ .preset-board-section__body {
43
+ display: flex;
44
+ flex-direction: column;
45
+ gap: var(--sp-2);
46
+ padding: var(--sp-2) var(--sp-3) var(--sp-3);
47
+ }
48
+ .preset-board-section__empty {
49
+ margin: 0;
50
+ padding: var(--sp-2) 0;
51
+ font-size: 12px;
52
+ color: var(--text-muted);
53
+ line-height: 1.55;
54
+ }
55
+
56
+ /* Capability segmented control */
57
+ .preset-use-type-seg {
58
+ display: flex;
59
+ flex-wrap: wrap;
60
+ gap: 4px;
61
+ margin-bottom: var(--sp-2);
62
+ }
63
+ .preset-use-type-seg__btn {
64
+ border: 1px solid var(--border);
65
+ border-radius: var(--r-full);
66
+ background: var(--bg-panel);
67
+ color: var(--text-secondary);
68
+ font-size: 11.5px;
69
+ font-weight: 600;
70
+ padding: 4px 10px;
71
+ cursor: pointer;
72
+ transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
73
+ }
74
+ .preset-use-type-seg__btn:hover {
75
+ border-color: var(--border-strong);
76
+ color: var(--text);
77
+ }
78
+ .preset-use-type-seg__btn.is-active {
79
+ background: var(--accent-softer);
80
+ border-color: var(--accent-soft);
81
+ color: var(--accent);
82
+ }
83
+ .preset-copy-row { margin-top: var(--sp-2); }
84
+
85
+ /* ============ Compose model stack ============ */
86
+ .compose-stack-grid {
87
+ grid-template-columns: 1fr;
88
+ }
89
+ .compose-stack-primary .compose__field-select {
90
+ font-size: 13px;
91
+ font-weight: 500;
92
+ }
93
+ .compose-stack-panel {
94
+ border: 1px solid var(--border);
95
+ border-radius: var(--r-md);
96
+ background: var(--bg-panel);
97
+ overflow: hidden;
98
+ }
99
+ .compose-stack-panel__summary {
100
+ list-style: none;
101
+ cursor: pointer;
102
+ padding: 8px 10px;
103
+ font-size: 11px;
104
+ font-weight: 650;
105
+ letter-spacing: 0.05em;
106
+ text-transform: uppercase;
107
+ color: var(--text-muted);
108
+ user-select: none;
109
+ }
110
+ .compose-stack-panel__summary::-webkit-details-marker { display: none; }
111
+ .compose-stack-panel__summary::before {
112
+ content: '▸';
113
+ display: inline-block;
114
+ margin-right: 6px;
115
+ transition: transform 0.12s ease;
116
+ }
117
+ .compose-stack-panel[open] .compose-stack-panel__summary::before {
118
+ transform: rotate(90deg);
119
+ }
120
+ .compose-stack-panel__body {
121
+ padding: 0 10px 10px;
122
+ display: flex;
123
+ flex-direction: column;
124
+ gap: 8px;
125
+ }
126
+ .compose-stack-panel__body--grid {
127
+ display: grid;
128
+ grid-template-columns: repeat(2, minmax(0, 1fr));
129
+ gap: 8px 10px;
130
+ }
131
+ .compose-stack-row {
132
+ display: grid;
133
+ grid-template-columns: 52px minmax(0, 1fr);
134
+ align-items: center;
135
+ gap: 8px;
136
+ }
137
+ .compose-stack-row__label {
138
+ font-size: 11px;
139
+ font-weight: 600;
140
+ color: var(--text-subtle);
141
+ }
142
+ .compose-stack-missing {
143
+ margin: 2px 0 0;
144
+ font-size: 11px;
145
+ color: var(--text-muted);
146
+ line-height: 1.5;
147
+ }
148
+ .compose-stack-missing__link {
149
+ color: var(--accent);
150
+ text-decoration: none;
151
+ }
152
+ .compose-stack-missing__link:hover { text-decoration: underline; }
153
+
154
+ /* ============ MCP server board ============ */
155
+ .mcp-board {
156
+ display: flex;
157
+ flex-direction: column;
158
+ gap: var(--sp-2);
159
+ margin-top: var(--sp-2);
160
+ }
161
+ .mcp-board-empty {
162
+ margin: 0;
163
+ padding: var(--sp-3) 0;
164
+ font-size: 12px;
165
+ color: var(--text-muted);
166
+ line-height: 1.55;
167
+ }
168
+ .mcp-board-toolbar {
169
+ align-items: center;
170
+ }
171
+ .mcp-card-wrap { margin-bottom: 0; }
172
+ .mcp-card {
173
+ display: flex;
174
+ align-items: center;
175
+ justify-content: space-between;
176
+ background: var(--bg-subtle);
177
+ border: 1px solid var(--border);
178
+ border-radius: var(--r-md);
179
+ padding: var(--sp-3) var(--sp-4);
180
+ transition: border-color 0.12s ease;
181
+ }
182
+ .mcp-card:hover { border-color: var(--accent); }
183
+ .mcp-card-wrap .mcp-card { border-radius: var(--r-md) var(--r-md) 0 0; }
184
+ .mcp-card-wrap .mcp-edit-wrap {
185
+ background: var(--bg-panel);
186
+ border: 1px solid var(--border);
187
+ border-top: none;
188
+ border-radius: 0 0 var(--r-md) var(--r-md);
189
+ padding: var(--sp-3) var(--sp-4) var(--sp-4);
190
+ }
191
+ .mcp-card-wrap.is-new .mcp-edit-wrap {
192
+ border-radius: var(--r-md);
193
+ border: 1px solid var(--accent);
194
+ }
195
+ .mcp-card__info { flex: 1; min-width: 0; }
196
+ .mcp-card__name {
197
+ font-weight: 600;
198
+ font-size: 13px;
199
+ color: var(--text);
200
+ line-height: 1.4;
201
+ }
202
+ .mcp-card__detail {
203
+ font-size: 11.5px;
204
+ color: var(--text-subtle);
205
+ margin-top: 2px;
206
+ overflow: hidden;
207
+ text-overflow: ellipsis;
208
+ white-space: nowrap;
209
+ }
210
+ .mcp-card__actions {
211
+ display: flex;
212
+ gap: var(--sp-1);
213
+ flex-shrink: 0;
214
+ margin-left: var(--sp-3);
215
+ }
216
+ .mcp-card__badge {
217
+ display: inline-block;
218
+ font-weight: 500;
219
+ font-size: 10px;
220
+ color: var(--text-muted);
221
+ background: var(--bg-panel);
222
+ border: 1px solid var(--border);
223
+ border-radius: var(--r-xs);
224
+ padding: 0 5px;
225
+ margin-left: 6px;
226
+ vertical-align: middle;
227
+ line-height: 1.5;
228
+ }
229
+ .mcp-card__badge--ok {
230
+ color: var(--accent);
231
+ border-color: var(--accent-soft);
232
+ background: var(--accent-softer);
233
+ }
234
+ .mcp-del { color: var(--danger); }
235
+ .mcp-del:hover { background: var(--danger); color: #fff; }
236
+ .mcp-edit-wrap .form-input-sm,
237
+ .mcp-edit-wrap textarea.form-input-sm {
238
+ max-width: 100%;
239
+ width: 100%;
240
+ box-sizing: border-box;
241
+ }
242
+
243
+ /* ---- MCP 表单分组 ---- */
244
+ .mcp-form-section {
245
+ display: flex;
246
+ flex-direction: column;
247
+ gap: var(--sp-1);
248
+ }
249
+ .mcp-field-group {
250
+ background: var(--bg-subtle);
251
+ border: 1px solid var(--border);
252
+ border-radius: var(--r-sm);
253
+ padding: var(--sp-2) var(--sp-3);
254
+ margin-top: var(--sp-1);
255
+ }
256
+ .mcp-field-group__label {
257
+ font-size: 10px;
258
+ font-weight: 600;
259
+ text-transform: uppercase;
260
+ letter-spacing: 0.5px;
261
+ color: var(--text-muted);
262
+ margin-bottom: var(--sp-1);
263
+ padding-bottom: var(--sp-1);
264
+ border-bottom: 1px solid var(--border);
265
+ }
266
+ .mcp-field-group .form-label {
267
+ margin-top: var(--sp-1);
268
+ }
269
+
270
+ /* ---- 卡片内联编辑动作 ---- */
271
+ .mcp-edit-actions {
272
+ padding-top: var(--sp-2);
273
+ border-top: 1px solid var(--border-soft);
274
+ }
275
+
276
+ /* ---- 卡片错误行 ---- */
277
+ .mcp-card__error {
278
+ font-size: 11px;
279
+ color: var(--danger);
280
+ margin-top: 3px;
281
+ overflow: hidden;
282
+ text-overflow: ellipsis;
283
+ white-space: nowrap;
284
+ max-width: 100%;
285
+ }
286
+
287
+ /* ---- 卡片传输类型标签(由 JS 内联 style 控制) ---- */