cladogram 0.5.5-beta.3 → 0.5.5-beta.5
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/bin/clado.js +88 -2
- package/docs/release.md +12 -0
- package/package.json +1 -1
- package/plugins/agent/index.js +37 -33
- package/plugins/agent/style.css +128 -20
- package/plugins/brand/style.css +30 -15
- package/plugins/directory/style.css +37 -0
- package/plugins/view-controls/style.css +2 -2
- package/src/agent/runtime.js +1 -1
- package/src/core/parse.js +56 -6
- package/src/core/tags.js +197 -0
- package/src/html/app-css.js +27 -10
- package/src/html/canvas-focus.js +1 -1
- package/src/html/canvas-ui.css +122 -36
- package/src/html/canvas-wires.js +5 -2
- package/src/html/media-anchors.js +233 -5
- package/src/html/mindmap-connectors.js +7 -3
- package/src/html/page.js +1 -1
- package/src/html/plugin-ui.css +28 -21
- package/src/html/runtime.js +74 -5
- package/src/server/assets/library.css +3 -3
- package/src/server/assets/library.html +1 -1
- package/src/server/plugin-registry.js +344 -0
- package/src/server/plugins.js +1 -1
- package/src/server/workspace.js +23 -1
- package/src/workspace/references.js +32 -4
package/bin/clado.js
CHANGED
|
@@ -314,6 +314,7 @@ ${c.bold('用法')}
|
|
|
314
314
|
clado serve [项目目录或文档目录] [--port 4317] [--entry overview.mdc]
|
|
315
315
|
clado build [目录或文件.mdc] [选项]
|
|
316
316
|
clado install [目录] [--to agents] [--list] [--dry-run] [--force]
|
|
317
|
+
clado plugin <list|create|install|remove|search> [参数] 管理工作区插件、脚手架与市场索引
|
|
317
318
|
clado update [--check] 检查并升级全局 npm 安装;--check 只检查
|
|
318
319
|
clado changelog 查看随安装包提供的版本更新说明
|
|
319
320
|
clado help / version
|
|
@@ -332,6 +333,9 @@ ${c.bold('选项')}
|
|
|
332
333
|
--port=4317 网页与 MCP 共用本机端口,0 为自动分配
|
|
333
334
|
--experimental-plugins serve 启用 .clado/plugins 下的本地 UI 插件
|
|
334
335
|
--agent=acp|codex|off 灵感 Agent(默认 acp,预设 ZCode)
|
|
336
|
+
--kind=ui|executor plugin create 模板类型(默认 ui)
|
|
337
|
+
--name=文字 plugin create 显示名称
|
|
338
|
+
--registry=路径或URL plugin search 使用的轻量市场索引
|
|
335
339
|
-o, --out=路径 build 输出(默认 clado.html)
|
|
336
340
|
--split build 为每份文档单独输出 HTML
|
|
337
341
|
--title=文字 build 显示标题
|
|
@@ -372,6 +376,10 @@ async function main() {
|
|
|
372
376
|
port: { type: 'string' },
|
|
373
377
|
'experimental-plugins': { type: 'boolean' },
|
|
374
378
|
agent: { type: 'string' },
|
|
379
|
+
// ---- 只有 plugin 用
|
|
380
|
+
kind: { type: 'string' },
|
|
381
|
+
name: { type: 'string' },
|
|
382
|
+
registry: { type: 'string' },
|
|
375
383
|
},
|
|
376
384
|
allowPositionals: true,
|
|
377
385
|
strict: true,
|
|
@@ -406,8 +414,9 @@ async function main() {
|
|
|
406
414
|
if (flags.check && !['update', 'upgrade'].includes(command)) throw new UsageError('--check 仅用于 clado update 或 clado upgrade。');
|
|
407
415
|
if (flags['experimental-plugins'] && command !== 'serve') throw new UsageError('--experimental-plugins 仅用于 clado serve。');
|
|
408
416
|
if (flags.agent !== undefined && (command !== 'serve' || !['acp','codex','off'].includes(flags.agent))) throw new UsageError('--agent 支持 acp、codex 或 off,仅用于 serve。');
|
|
417
|
+
if ((flags.kind !== undefined || flags.name !== undefined || flags.registry !== undefined) && command !== 'plugin') throw new UsageError('--kind / --name / --registry 仅用于 clado plugin。');
|
|
409
418
|
// Skill 安装、帮助和版本查询只依赖 Node 内置模块;不提前加载 YAML 或 MCP。
|
|
410
|
-
if (['init', 'build', 'serve'].includes(command)) {
|
|
419
|
+
if (['init', 'build', 'serve', 'plugin'].includes(command)) {
|
|
411
420
|
({ DocumentError } = await import('../src/workspace/documents.js'));
|
|
412
421
|
}
|
|
413
422
|
switch (command) {
|
|
@@ -439,6 +448,83 @@ async function main() {
|
|
|
439
448
|
}
|
|
440
449
|
case 'install':
|
|
441
450
|
return await cmdInstall(rest, flags);
|
|
451
|
+
case 'plugin': {
|
|
452
|
+
const [sub, ...subArgs] = rest;
|
|
453
|
+
if (!sub || !['list', 'create', 'install', 'remove', 'search'].includes(sub)) {
|
|
454
|
+
throw new UsageError('用法:clado plugin <list|create|install|remove|search> [参数]');
|
|
455
|
+
}
|
|
456
|
+
const [{ contextFor, initialize }, { BUILT_IN_PLUGINS }, registryMod] = await Promise.all([
|
|
457
|
+
import('../src/workspace/storage.js'),
|
|
458
|
+
import('../src/server/plugins.js'),
|
|
459
|
+
import('../src/server/plugin-registry.js'),
|
|
460
|
+
]);
|
|
461
|
+
if (sub === 'list') {
|
|
462
|
+
if (subArgs.length > 1) throw new UsageError('用法:clado plugin list [工作区目录]');
|
|
463
|
+
const ws = resolve(subArgs[0] || '.');
|
|
464
|
+
const ctx = contextFor(ws, ws);
|
|
465
|
+
const installed = registryMod.listInstalledWorkspacePlugins(ctx.state);
|
|
466
|
+
const payload = { workspace: ws, builtin: BUILT_IN_PLUGINS, installed };
|
|
467
|
+
if (flags.json) { process.stdout.write(JSON.stringify(payload) + '\n'); return 0; }
|
|
468
|
+
process.stdout.write(`内置受保护插件(${BUILT_IN_PLUGINS.length}):\n`);
|
|
469
|
+
for (const p of BUILT_IN_PLUGINS) process.stdout.write(` - ${p.id} [${p.kind}]\n`);
|
|
470
|
+
process.stdout.write(`\n工作区已安装插件(${installed.length}):\n`);
|
|
471
|
+
if (!installed.length) process.stdout.write(' (无;可用 clado plugin create 或 clado plugin install 添加)\n');
|
|
472
|
+
for (const p of installed) {
|
|
473
|
+
process.stdout.write(` - ${p.id}@${p.version} (${p.name}) · 风险级别:${p.audit.highestRisk}\n`);
|
|
474
|
+
}
|
|
475
|
+
return 0;
|
|
476
|
+
}
|
|
477
|
+
if (sub === 'create') {
|
|
478
|
+
if (subArgs.length < 1 || subArgs.length > 2) throw new UsageError('用法:clado plugin create <pluginId> [输出目录] [--kind ui|executor] [--name 显示名]');
|
|
479
|
+
const created = registryMod.scaffoldPlugin({
|
|
480
|
+
id: subArgs[0],
|
|
481
|
+
dir: subArgs[1] || subArgs[0],
|
|
482
|
+
kind: flags.kind || 'ui',
|
|
483
|
+
name: flags.name,
|
|
484
|
+
});
|
|
485
|
+
if (flags.json) { process.stdout.write(JSON.stringify(created) + '\n'); return 0; }
|
|
486
|
+
process.stdout.write(`已生成插件脚手架:${displayPath(created.directory)} (${created.id}, ${created.kind})\n`);
|
|
487
|
+
process.stdout.write(`权限审计(${created.audit.highestRisk}):${created.audit.items.map(i => i.permission).join(', ')}\n`);
|
|
488
|
+
process.stdout.write(`下一步:clado plugin install ${displayPath(created.directory)} <工作区目录>\n`);
|
|
489
|
+
return 0;
|
|
490
|
+
}
|
|
491
|
+
if (sub === 'install') {
|
|
492
|
+
if (subArgs.length < 1 || subArgs.length > 2) throw new UsageError('用法:clado plugin install <插件本地目录> [工作区目录]');
|
|
493
|
+
const ws = resolve(subArgs[1] || '.');
|
|
494
|
+
if (!existsSync(ws)) mkdirSync(ws, { recursive: true });
|
|
495
|
+
const ctx = contextFor(ws, ws);
|
|
496
|
+
initialize(ctx);
|
|
497
|
+
const installed = registryMod.installPluginFromDirectory(ctx, subArgs[0]);
|
|
498
|
+
if (flags.json) { process.stdout.write(JSON.stringify(installed) + '\n'); return 0; }
|
|
499
|
+
process.stdout.write(`已安装插件 ${installed.id}@${installed.version} (${installed.name}) → ${displayPath(ctx.state)}/plugins/${installed.id}\n`);
|
|
500
|
+
process.stdout.write(`权限审计(${installed.audit.highestRisk}):${installed.audit.items.map(i => i.summary).join(';') || '无额外权限'}\n`);
|
|
501
|
+
return 0;
|
|
502
|
+
}
|
|
503
|
+
if (sub === 'remove') {
|
|
504
|
+
if (subArgs.length < 1 || subArgs.length > 2) throw new UsageError('用法:clado plugin remove <pluginId> [工作区目录]');
|
|
505
|
+
const ws = resolve(subArgs[1] || '.');
|
|
506
|
+
const ctx = contextFor(ws, ws);
|
|
507
|
+
const removed = registryMod.removeWorkspacePlugin(ctx, subArgs[0]);
|
|
508
|
+
if (flags.json) { process.stdout.write(JSON.stringify(removed) + '\n'); return 0; }
|
|
509
|
+
process.stdout.write(`已卸载插件:${removed.id}\n`);
|
|
510
|
+
return 0;
|
|
511
|
+
}
|
|
512
|
+
if (sub === 'search') {
|
|
513
|
+
const query = subArgs.join(' ');
|
|
514
|
+
const ws = resolve('.');
|
|
515
|
+
const ctx = contextFor(ws, ws);
|
|
516
|
+
const reg = await registryMod.loadRegistryIndex({ registry: flags.registry || '', stateDir: ctx.state });
|
|
517
|
+
const results = registryMod.searchRegistry(reg, query);
|
|
518
|
+
const payload = { registry: reg.name, origin: reg.origin, query, results };
|
|
519
|
+
if (flags.json) { process.stdout.write(JSON.stringify(payload) + '\n'); return 0; }
|
|
520
|
+
process.stdout.write(`插件索引:${reg.name}(命中 ${results.length} 项)\n`);
|
|
521
|
+
for (const item of results) {
|
|
522
|
+
process.stdout.write(` - ${item.id}@${item.version} [${item.category}] ${item.name}(风险:${item.audit.highestRisk})\n ${item.description}\n`);
|
|
523
|
+
}
|
|
524
|
+
return 0;
|
|
525
|
+
}
|
|
526
|
+
return 0;
|
|
527
|
+
}
|
|
442
528
|
case 'update':
|
|
443
529
|
case 'upgrade': {
|
|
444
530
|
if (rest.length || flags.json && !flags.check) throw new UsageError('用法:clado update [--check [--json]]');
|
|
@@ -476,7 +562,7 @@ async function main() {
|
|
|
476
562
|
return 0;
|
|
477
563
|
default:
|
|
478
564
|
process.stderr.write(`${c.red('✖')} 没有这个命令:"${command}"\n`);
|
|
479
|
-
process.stderr.write(`${c.dim('可用命令:init / build / serve / install / update / changelog / help / version。文档操作请连接 serve 的 MCP。试试: clado --help')}\n`);
|
|
565
|
+
process.stderr.write(`${c.dim('可用命令:init / build / serve / install / plugin / update / changelog / help / version。文档操作请连接 serve 的 MCP。试试: clado --help')}\n`);
|
|
480
566
|
return 2;
|
|
481
567
|
}
|
|
482
568
|
} catch (err) {
|
package/docs/release.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# 版本更新说明
|
|
2
2
|
|
|
3
|
+
## 0.5.5-beta.5 · 单色透明毛玻璃 UI、PC/移动端适配与统一语义 Tag 锚点(灰度版)
|
|
4
|
+
|
|
5
|
+
- **克制单色透明毛玻璃视觉与 AI 体感柔光**:移除卡片、决策卡与插件弹窗上的四周边彩框与不透明底色,升级为浅/深双色统一透明毛玻璃;仅在 AI 活跃处理或生成时,于卡片 / 灵感面板底部中央呈现延伸至 ≥80% 宽度的渐隐羽化呼吸柔光(普通点击与静止卡片零打扰)。
|
|
6
|
+
- **PC / 移动端通用响应式布局与触控手势**:完整保留桌面端四角悬浮控件,小屏(`≤ 680px`)自动适配安全区(紧凑顶栏、底栏防重叠截断、灵感对话/文档目录/插件管理自动切换为底部抽屉 Bottom Sheet 与 44px 触控热区),画布原生支持双指捏合缩放与单指平滑拖拽。
|
|
7
|
+
- **统一语义 Tag 锚点(卡片 + Tag 二元连线模型)**:支持 6 色语义 Tag(有字低饱和胶囊 `[新增]{#id .green}` 与无字 `5.5px` 极简纯色圆点 `[]{#id .amber}`,无冗余外圈,视觉自动归左),同步支持代码块行尾注释 Tag(`// {#id .blue}` 视觉自动提取至左侧边槽)与 Mermaid 注释 Tag(`%% {#id .green}`);同文档 `[文案](#id)` 与跨文档 `[文案](other.md#id)` 统一连线,解析器新增 `MD_TAG_DUPLICATE_ID` 唯一性校验并兼容既有 `clado:code:` / `clado:to:` 语法与模板五色标记。
|
|
8
|
+
|
|
9
|
+
## 0.5.5-beta.4 · 轻量插件市场底座、`clado plugin` CLI 与权限审计(灰度版)
|
|
10
|
+
|
|
11
|
+
- 新增 `clado plugin <list|create|install|remove|search>` 完整命令行插件管理:支持一键生成可运行的 UI 能力插件(`--kind ui`)与 ACP 外包执行器插件(`--kind executor`)脚手架、本地安全打包安装与卸载。
|
|
12
|
+
- 新增轻量 JSON 插件市场索引(支持内置示例源、工作区 `.clado/plugin-registry.json` 企业私有源与远程 HTTP(S) 源)以及在线服务端点 `GET /library/plugin-registry`、`DELETE /library/install-plugin`。
|
|
13
|
+
- 新增插件权限分级风险审计(`low` / `medium` / `high`),严格守护 `clado.*` 内置命名空间不可覆盖、不可伪造、不可卸载。
|
|
14
|
+
|
|
3
15
|
## 0.5.5-beta.3 · 对称「行连行」与稳定语义锚点(灰度版)
|
|
4
16
|
|
|
5
17
|
- 画布连线升级为 100% 标准 Markdown 对称表达:行内正文/列表行(`clado:to:line:<锚点>`)与代码块/表格/Mermaid 起点(`;to:line|code|table|mermaid:...`)均可精准落点到目标卡的正文行、代码行、表格数据行或 Mermaid 节点,彻底消除“仅 MCP 可见”的不对称能力。
|
package/package.json
CHANGED
package/plugins/agent/index.js
CHANGED
|
@@ -24,41 +24,44 @@
|
|
|
24
24
|
灵感
|
|
25
25
|
</button>
|
|
26
26
|
<section id="clado-agent-panel" class="clado-ui-glass clado-ui-glass-panel clado-agent-panel" aria-labelledby="clado-agent-title" hidden>
|
|
27
|
-
<
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
<span class="clado-ai-aura" aria-hidden="true"></span>
|
|
28
|
+
<div class="clado-agent-panel-body">
|
|
29
|
+
<header>
|
|
30
|
+
<div class="clado-agent-heading"><h2 id="clado-agent-title">灵感</h2><small class="clado-agent-provider"></small></div>
|
|
31
|
+
<div class="clado-agent-header-actions">
|
|
32
|
+
<button type="button" class="clado-ui-button clado-agent-follow" aria-pressed="${initialFollowAi ? 'true' : 'false'}" title="跟随 AI 视角:AI 定位或修改卡片时平滑平移镜头">跟随</button>
|
|
33
|
+
<button type="button" class="clado-ui-button clado-agent-history" aria-expanded="false" title="切换历史会话">历史</button>
|
|
34
|
+
<button type="button" class="clado-ui-button clado-agent-new">新对话</button>
|
|
35
|
+
<button type="button" class="clado-ui-button clado-agent-close" aria-label="关闭 灵感 对话">×</button>
|
|
36
|
+
</div>
|
|
37
|
+
</header>
|
|
38
|
+
<div class="clado-agent-sessions" hidden></div>
|
|
39
|
+
<div class="clado-agent-modes" role="group" aria-label="工作模式">
|
|
40
|
+
<button type="button" class="clado-ui-button clado-agent-chip" data-workflow="design" aria-pressed="true">架构设计</button>
|
|
41
|
+
<button type="button" class="clado-ui-button clado-agent-chip" data-workflow="qa" aria-pressed="false">测试用例</button>
|
|
42
|
+
<button type="button" class="clado-ui-button clado-agent-chip" data-workflow="audit" aria-pressed="false">Diff 验收</button>
|
|
43
|
+
<button type="button" class="clado-ui-button clado-agent-chip" data-workflow="dispatch" aria-pressed="false">派发开发</button>
|
|
34
44
|
</div>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
<div class="clado-agent-persona-bar">
|
|
46
|
+
<label for="clado-agent-persona">人设</label>
|
|
47
|
+
<select id="clado-agent-persona" class="clado-agent-select">
|
|
48
|
+
<option value="architect">研发架构师</option>
|
|
49
|
+
<option value="qa">QA 测试专家</option>
|
|
50
|
+
<option value="auditor">验收审计官</option>
|
|
51
|
+
</select>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="clado-agent-executor-bar" hidden>
|
|
54
|
+
<label for="clado-agent-executor">执行器</label>
|
|
55
|
+
<select id="clado-agent-executor" class="clado-agent-select"></select>
|
|
56
|
+
</div>
|
|
57
|
+
<div class="clado-agent-log" role="log" aria-label="对话消息" aria-live="off"></div>
|
|
58
|
+
<p class="clado-agent-status" role="status" hidden></p>
|
|
59
|
+
<form>
|
|
60
|
+
<textarea aria-label="给 灵感 的消息" placeholder="给 灵感 发一条消息…" rows="2" maxlength="12000"></textarea>
|
|
61
|
+
<button class="clado-ui-button clado-agent-stop" type="button" hidden>停止</button>
|
|
62
|
+
<button class="clado-ui-button clado-ui-button-primary clado-agent-send" type="submit" disabled>发送</button>
|
|
63
|
+
</form>
|
|
54
64
|
</div>
|
|
55
|
-
<div class="clado-agent-log" role="log" aria-label="对话消息" aria-live="off"></div>
|
|
56
|
-
<p class="clado-agent-status" role="status" hidden></p>
|
|
57
|
-
<form>
|
|
58
|
-
<textarea aria-label="给 灵感 的消息" placeholder="给 灵感 发一条消息…" rows="2" maxlength="12000"></textarea>
|
|
59
|
-
<button class="clado-ui-button clado-agent-stop" type="button" hidden>停止</button>
|
|
60
|
-
<button class="clado-ui-button clado-ui-button-primary clado-agent-send" type="submit" disabled>发送</button>
|
|
61
|
-
</form>
|
|
62
65
|
</section>`;
|
|
63
66
|
host.mount('bottom-right', root, 'clado.agent');
|
|
64
67
|
|
|
@@ -95,6 +98,7 @@
|
|
|
95
98
|
});
|
|
96
99
|
const canSubmit = () => !running && (workflow === 'dispatch' || workflow === 'audit' || !!input.value.trim());
|
|
97
100
|
const syncActions = () => {
|
|
101
|
+
panel.classList.toggle('clado-ai-working', running);
|
|
98
102
|
send.disabled = !canSubmit();
|
|
99
103
|
send.textContent = workflow === 'dispatch' ? '派发' : '发送';
|
|
100
104
|
stop.hidden = !running;
|
package/plugins/agent/style.css
CHANGED
|
@@ -27,7 +27,58 @@
|
|
|
27
27
|
min-height: 240px;
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
|
+
overflow: visible;
|
|
31
|
+
}
|
|
32
|
+
.clado-agent-panel-body {
|
|
33
|
+
display: flex;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
flex: 1;
|
|
36
|
+
min-height: 0;
|
|
30
37
|
overflow: hidden;
|
|
38
|
+
border-radius: inherit;
|
|
39
|
+
}
|
|
40
|
+
@keyframes clado-agent-aura-breathe {
|
|
41
|
+
0%, 100% { opacity: .64; transform: translateX(-50%) scaleX(.96) scaleY(.86); }
|
|
42
|
+
50% { opacity: 1; transform: translateX(-50%) scaleX(1.03) scaleY(1.18); }
|
|
43
|
+
}
|
|
44
|
+
@keyframes clado-agent-aura-drift {
|
|
45
|
+
0%, 100% { filter: blur(12px) hue-rotate(-8deg); }
|
|
46
|
+
50% { filter: blur(14px) hue-rotate(12deg); }
|
|
47
|
+
}
|
|
48
|
+
.clado-ai-aura {
|
|
49
|
+
display: none;
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: 0;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
z-index: -1;
|
|
54
|
+
}
|
|
55
|
+
.clado-agent-panel.clado-ai-working > .clado-ai-aura { display: block; }
|
|
56
|
+
.clado-agent-panel.clado-ai-working > .clado-ai-aura::before {
|
|
57
|
+
content: "";
|
|
58
|
+
position: absolute;
|
|
59
|
+
left: 50%;
|
|
60
|
+
bottom: -.5px;
|
|
61
|
+
width: 86%;
|
|
62
|
+
height: 1px;
|
|
63
|
+
transform: translateX(-50%);
|
|
64
|
+
background: linear-gradient(90deg, transparent 0%, rgba(56,189,248,.22) 10%, rgba(56,189,248,.52) 28%, rgba(129,140,248,.66) 50%, rgba(232,121,249,.44) 72%, rgba(244,114,182,.18) 90%, transparent 100%);
|
|
65
|
+
}
|
|
66
|
+
.clado-agent-panel.clado-ai-working > .clado-ai-aura::after {
|
|
67
|
+
content: "";
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 50%;
|
|
70
|
+
top: calc(100% - 2px);
|
|
71
|
+
width: 96%;
|
|
72
|
+
height: 46px;
|
|
73
|
+
transform-origin: 50% 0%;
|
|
74
|
+
transform: translateX(-50%);
|
|
75
|
+
background:
|
|
76
|
+
radial-gradient(ellipse 36% 44% at 30% 6%, rgba(56,189,248,.34) 0%, rgba(56,189,248,.10) 48%, transparent 76%),
|
|
77
|
+
radial-gradient(ellipse 34% 52% at 50% 4%, rgba(139,92,246,.34) 0%, rgba(139,92,246,.10) 46%, transparent 74%),
|
|
78
|
+
radial-gradient(ellipse 34% 42% at 70% 7%, rgba(244,114,182,.26) 0%, rgba(244,114,182,.08) 44%, transparent 72%);
|
|
79
|
+
mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.42) 12%, #000 32%, #000 68%, rgba(0,0,0,.42) 88%, transparent 100%);
|
|
80
|
+
-webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.42) 12%, #000 32%, #000 68%, rgba(0,0,0,.42) 88%, transparent 100%);
|
|
81
|
+
animation: clado-agent-aura-breathe 2.9s ease-in-out infinite, clado-agent-aura-drift 5.5s ease-in-out infinite;
|
|
31
82
|
}
|
|
32
83
|
.clado-agent-panel header {
|
|
33
84
|
display: flex;
|
|
@@ -119,9 +170,12 @@
|
|
|
119
170
|
color: var(--clado-ui-muted);
|
|
120
171
|
}
|
|
121
172
|
.clado-agent-session-open small.waiting {
|
|
122
|
-
color: #
|
|
173
|
+
color: #b45309;
|
|
123
174
|
font-weight: 600;
|
|
124
175
|
}
|
|
176
|
+
[data-theme="dark"] .clado-agent-session-open small.waiting {
|
|
177
|
+
color: #fbbf24;
|
|
178
|
+
}
|
|
125
179
|
.clado-agent-session-del {
|
|
126
180
|
border: 0;
|
|
127
181
|
background: transparent;
|
|
@@ -233,13 +287,13 @@
|
|
|
233
287
|
margin-top: 8px;
|
|
234
288
|
padding: 8px 10px;
|
|
235
289
|
border-radius: 10px;
|
|
236
|
-
border: 1px solid
|
|
237
|
-
background: color-mix(in srgb, var(--clado-ui-
|
|
290
|
+
border: 1px solid var(--clado-ui-edge);
|
|
291
|
+
background: color-mix(in srgb, var(--clado-ui-well) 65%, transparent);
|
|
238
292
|
}
|
|
239
293
|
.clado-agent-changes-title {
|
|
240
294
|
font-size: 11px;
|
|
241
295
|
font-weight: 600;
|
|
242
|
-
color: var(--clado-ui-
|
|
296
|
+
color: var(--clado-ui-muted);
|
|
243
297
|
margin-bottom: 5px;
|
|
244
298
|
}
|
|
245
299
|
.clado-agent-changes-list {
|
|
@@ -266,37 +320,48 @@
|
|
|
266
320
|
background: var(--clado-ui-active);
|
|
267
321
|
}
|
|
268
322
|
.clado-agent-change-item .dot {
|
|
269
|
-
width:
|
|
270
|
-
height:
|
|
323
|
+
width: 5.5px;
|
|
324
|
+
height: 5.5px;
|
|
271
325
|
border-radius: 50%;
|
|
272
|
-
background:
|
|
326
|
+
background: #10b981;
|
|
273
327
|
flex: none;
|
|
274
328
|
}
|
|
275
329
|
.clado-agent-question {
|
|
276
330
|
margin-top: 8px;
|
|
277
331
|
padding: 10px 11px;
|
|
278
332
|
border-radius: 11px;
|
|
279
|
-
border: 1px solid
|
|
280
|
-
background:
|
|
333
|
+
border: 1px solid var(--clado-ui-edge);
|
|
334
|
+
background: color-mix(in srgb, var(--clado-ui-well) 65%, transparent);
|
|
281
335
|
display: flex;
|
|
282
336
|
flex-direction: column;
|
|
283
337
|
gap: 8px;
|
|
284
338
|
}
|
|
285
339
|
.clado-agent-question.answered {
|
|
286
340
|
border-color: var(--clado-ui-edge);
|
|
287
|
-
background: color-mix(in srgb, var(--clado-ui-well)
|
|
341
|
+
background: color-mix(in srgb, var(--clado-ui-well) 45%, transparent);
|
|
288
342
|
}
|
|
289
343
|
.clado-agent-question-badge {
|
|
344
|
+
display: inline-flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
gap: 6px;
|
|
290
347
|
font-size: 11px;
|
|
291
|
-
font-weight:
|
|
292
|
-
color:
|
|
348
|
+
font-weight: 620;
|
|
349
|
+
color: var(--clado-ui-text);
|
|
293
350
|
}
|
|
294
|
-
|
|
295
|
-
|
|
351
|
+
.clado-agent-question-badge::before {
|
|
352
|
+
content: "";
|
|
353
|
+
width: 6px;
|
|
354
|
+
height: 6px;
|
|
355
|
+
border-radius: 50%;
|
|
356
|
+
background: #f59e0b;
|
|
357
|
+
flex: none;
|
|
296
358
|
}
|
|
297
359
|
.clado-agent-question.answered .clado-agent-question-badge {
|
|
298
360
|
color: var(--clado-ui-muted);
|
|
299
361
|
}
|
|
362
|
+
.clado-agent-question.answered .clado-agent-question-badge::before {
|
|
363
|
+
background: var(--clado-ui-muted);
|
|
364
|
+
}
|
|
300
365
|
.clado-agent-question-text {
|
|
301
366
|
font-size: 12.5px;
|
|
302
367
|
line-height: 1.5;
|
|
@@ -311,7 +376,7 @@
|
|
|
311
376
|
.clado-agent-option-btn {
|
|
312
377
|
border: 1px solid var(--clado-ui-edge);
|
|
313
378
|
border-radius: 9px;
|
|
314
|
-
background: var(--clado-ui-well);
|
|
379
|
+
background: color-mix(in srgb, var(--clado-ui-well) 70%, transparent);
|
|
315
380
|
color: var(--clado-ui-text);
|
|
316
381
|
padding: 7px 10px;
|
|
317
382
|
text-align: left;
|
|
@@ -320,11 +385,10 @@
|
|
|
320
385
|
display: flex;
|
|
321
386
|
flex-direction: column;
|
|
322
387
|
gap: 2px;
|
|
323
|
-
transition:
|
|
388
|
+
transition: background 140ms ease;
|
|
324
389
|
}
|
|
325
390
|
.clado-agent-option-btn:hover:not(:disabled) {
|
|
326
|
-
|
|
327
|
-
background: rgb(217 119 6 / .08);
|
|
391
|
+
background: var(--clado-ui-active);
|
|
328
392
|
}
|
|
329
393
|
.clado-agent-option-btn:disabled {
|
|
330
394
|
opacity: .55;
|
|
@@ -391,6 +455,50 @@
|
|
|
391
455
|
font: inherit;
|
|
392
456
|
}
|
|
393
457
|
.clado-agent-panel textarea:focus-visible { outline: 2px solid var(--clado-ui-accent); outline-offset: 1px; }
|
|
394
|
-
@media (max-width:
|
|
395
|
-
.clado-agent-
|
|
458
|
+
@media (max-width: 680px) {
|
|
459
|
+
.clado-agent-launch { height: 42px; padding-inline: 12px; border-radius: 15px; }
|
|
460
|
+
.clado-agent-panel {
|
|
461
|
+
position: fixed;
|
|
462
|
+
left: 0;
|
|
463
|
+
right: 0;
|
|
464
|
+
bottom: 0;
|
|
465
|
+
width: 100vw;
|
|
466
|
+
max-width: 100vw;
|
|
467
|
+
height: min(78dvh, 620px);
|
|
468
|
+
max-height: 78dvh;
|
|
469
|
+
border-radius: 22px 22px 0 0;
|
|
470
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
471
|
+
z-index: 30;
|
|
472
|
+
}
|
|
473
|
+
.clado-agent-panel-body::before {
|
|
474
|
+
content: "";
|
|
475
|
+
display: block;
|
|
476
|
+
width: 36px;
|
|
477
|
+
height: 4px;
|
|
478
|
+
border-radius: 99px;
|
|
479
|
+
background: var(--clado-ui-edge);
|
|
480
|
+
margin: 8px auto 2px;
|
|
481
|
+
flex: none;
|
|
482
|
+
}
|
|
483
|
+
/* 移动端 Bottom Sheet 贴底,AI 处理柔光自动移至抽屉顶边中央 ≥80% 处,永不被屏幕底部裁切 */
|
|
484
|
+
.clado-agent-panel.clado-ai-working > .clado-ai-aura::before {
|
|
485
|
+
bottom: auto;
|
|
486
|
+
top: -.5px;
|
|
487
|
+
}
|
|
488
|
+
.clado-agent-panel.clado-ai-working > .clado-ai-aura::after {
|
|
489
|
+
top: auto;
|
|
490
|
+
bottom: calc(100% - 2px);
|
|
491
|
+
transform-origin: 50% 100%;
|
|
492
|
+
background:
|
|
493
|
+
radial-gradient(ellipse 36% 44% at 30% 94%, rgba(56,189,248,.34) 0%, rgba(56,189,248,.10) 48%, transparent 76%),
|
|
494
|
+
radial-gradient(ellipse 34% 52% at 50% 96%, rgba(139,92,246,.34) 0%, rgba(139,92,246,.10) 46%, transparent 74%),
|
|
495
|
+
radial-gradient(ellipse 34% 42% at 70% 93%, rgba(244,114,182,.26) 0%, rgba(244,114,182,.08) 44%, transparent 72%);
|
|
496
|
+
}
|
|
497
|
+
.clado-agent-modes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
|
|
498
|
+
.clado-agent-modes::-webkit-scrollbar { display: none; }
|
|
499
|
+
.clado-agent-chip { min-height: 32px; padding: 4px 12px; flex: none; }
|
|
500
|
+
.clado-agent-panel textarea { font-size: 16px; min-height: 44px; }
|
|
501
|
+
.clado-agent-question-custom input { font-size: 16px; min-height: 40px; }
|
|
502
|
+
.clado-agent-send, .clado-agent-stop { min-height: 44px; padding-inline: 16px; }
|
|
503
|
+
.clado-agent-option-btn { min-height: 44px; padding: 10px 12px; }
|
|
396
504
|
}
|
package/plugins/brand/style.css
CHANGED
|
@@ -84,19 +84,19 @@
|
|
|
84
84
|
:is(.clado-plugin-manager,.clado-plugin-editor) h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
|
|
85
85
|
.clado-plugin-manager-actions { display: flex; align-items: center; gap: 6px; }
|
|
86
86
|
.clado-plugin-manager .clado-plugin-install-trigger {
|
|
87
|
-
background:
|
|
88
|
-
border-color:
|
|
89
|
-
color:
|
|
87
|
+
background: var(--clado-ui-accent);
|
|
88
|
+
border-color: var(--clado-ui-accent);
|
|
89
|
+
color: var(--clado-ui-solid);
|
|
90
90
|
}
|
|
91
|
-
.clado-plugin-manager .clado-plugin-install-trigger:hover {
|
|
91
|
+
.clado-plugin-manager .clado-plugin-install-trigger:hover { opacity: .88; }
|
|
92
92
|
.clado-plugin-install {
|
|
93
93
|
margin-top: 12px;
|
|
94
94
|
padding: 10px 12px;
|
|
95
|
-
border: 1px solid
|
|
95
|
+
border: 1px solid var(--clado-ui-edge);
|
|
96
96
|
border-radius: 11px;
|
|
97
|
-
background:
|
|
97
|
+
background: var(--clado-ui-well);
|
|
98
98
|
}
|
|
99
|
-
.clado-plugin-install p { margin: 0 0 8px; overflow-wrap: anywhere; color:
|
|
99
|
+
.clado-plugin-install p { margin: 0 0 8px; overflow-wrap: anywhere; color: var(--clado-ui-muted); }
|
|
100
100
|
.clado-plugin-install .clado-plugin-manager-actions { justify-content: end; }
|
|
101
101
|
.clado-plugin-manager-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
|
|
102
102
|
.clado-plugin-manager-list article {
|
|
@@ -107,13 +107,13 @@
|
|
|
107
107
|
gap: 6px;
|
|
108
108
|
min-height: 116px;
|
|
109
109
|
padding: 12px;
|
|
110
|
-
border: 1px solid
|
|
110
|
+
border: 1px solid var(--clado-ui-edge);
|
|
111
111
|
border-radius: calc(var(--clado-ui-radius) - 4px);
|
|
112
|
-
background:
|
|
112
|
+
background: color-mix(in srgb, var(--clado-ui-well) 70%, transparent);
|
|
113
113
|
}
|
|
114
|
-
.clado-plugin-manager-list article:has(input:not(:checked)) { background:
|
|
115
|
-
.clado-plugin-card-icon { grid-area: 1 / 1; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid
|
|
116
|
-
.clado-plugin-card-icon svg { width: 17px; height: 17px; fill: none; stroke:
|
|
114
|
+
.clado-plugin-manager-list article:has(input:not(:checked)) { background: transparent; }
|
|
115
|
+
.clado-plugin-card-icon { grid-area: 1 / 1; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--clado-ui-edge); border-radius: 9px; background: color-mix(in srgb, var(--clado-ui-solid) 75%, transparent); }
|
|
116
|
+
.clado-plugin-card-icon svg { width: 17px; height: 17px; fill: none; stroke: var(--clado-ui-text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
117
117
|
.clado-plugin-manager-list strong {
|
|
118
118
|
grid-area: 2 / 1 / auto / -1;
|
|
119
119
|
align-self: center;
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
width: 13px;
|
|
141
141
|
height: 13px;
|
|
142
142
|
border-radius: 50%;
|
|
143
|
-
background:
|
|
143
|
+
background: var(--clado-ui-solid);
|
|
144
144
|
}
|
|
145
145
|
.clado-plugin-manager-list input:checked { background: var(--clado-ui-accent); }
|
|
146
146
|
.clado-plugin-manager-list input:checked::before { transform: translateX(14px); }
|
|
@@ -152,11 +152,26 @@
|
|
|
152
152
|
box-sizing: border-box;
|
|
153
153
|
width: 100%;
|
|
154
154
|
padding: 10px;
|
|
155
|
-
border: 1px solid
|
|
155
|
+
border: 1px solid var(--clado-ui-edge);
|
|
156
156
|
border-radius: 10px;
|
|
157
|
-
background:
|
|
157
|
+
background: var(--clado-ui-well);
|
|
158
|
+
color: var(--clado-ui-text);
|
|
158
159
|
font: 13px/1.5 ui-monospace, monospace;
|
|
159
160
|
resize: vertical;
|
|
160
161
|
}
|
|
161
162
|
.clado-plugin-editor details { padding: 10px 0; color: var(--clado-ui-muted); }
|
|
162
163
|
.clado-plugin-editor pre { max-height: 180px; overflow: auto; }
|
|
164
|
+
@media (max-width: 680px) {
|
|
165
|
+
.clado-brand { width: 42px; height: 42px; padding: 6px; justify-content: center; }
|
|
166
|
+
.clado-brand strong { display: none; }
|
|
167
|
+
.clado-plugin-manager, .clado-plugin-editor {
|
|
168
|
+
inset: auto 0 0 0;
|
|
169
|
+
margin: 0;
|
|
170
|
+
width: 100vw;
|
|
171
|
+
max-width: 100vw;
|
|
172
|
+
max-height: 82dvh;
|
|
173
|
+
border-radius: 22px 22px 0 0;
|
|
174
|
+
padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
|
|
175
|
+
}
|
|
176
|
+
.clado-plugin-manager-list { grid-template-columns: minmax(0, 1fr); }
|
|
177
|
+
}
|
|
@@ -57,3 +57,40 @@
|
|
|
57
57
|
.workspace-button small{flex:none;font-size:10px;color:var(--muted)}
|
|
58
58
|
.workspace-open-tab{flex:none;display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;font-size:11px;text-decoration:none;color:var(--muted)}
|
|
59
59
|
.workspace-open-tab:hover{color:var(--ink)}
|
|
60
|
+
@media (max-width: 680px) {
|
|
61
|
+
.directory-toggle { max-width: calc(100vw - 116px); height: 42px; padding: 7px 11px; }
|
|
62
|
+
#currentWorkspaceName { max-width: 72px; }
|
|
63
|
+
#directory {
|
|
64
|
+
position: fixed;
|
|
65
|
+
left: 0;
|
|
66
|
+
right: 0;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
width: 100vw;
|
|
69
|
+
max-width: 100vw;
|
|
70
|
+
border-radius: 22px 22px 0 0;
|
|
71
|
+
z-index: 29;
|
|
72
|
+
}
|
|
73
|
+
.directory-scroll {
|
|
74
|
+
max-height: 74dvh;
|
|
75
|
+
padding: 18px 14px calc(16px + env(safe-area-inset-bottom));
|
|
76
|
+
}
|
|
77
|
+
.directory-scroll::before {
|
|
78
|
+
content: "";
|
|
79
|
+
display: block;
|
|
80
|
+
width: 36px;
|
|
81
|
+
height: 4px;
|
|
82
|
+
border-radius: 99px;
|
|
83
|
+
background: var(--clado-ui-edge);
|
|
84
|
+
margin: -6px auto 12px;
|
|
85
|
+
}
|
|
86
|
+
.document-button { min-height: 44px; padding: 10px 12px; }
|
|
87
|
+
.directory-search input { font-size: 16px; min-height: 40px; }
|
|
88
|
+
.clado-directory-plugin dialog {
|
|
89
|
+
inset: auto 0 0 0;
|
|
90
|
+
margin: 0;
|
|
91
|
+
width: 100vw;
|
|
92
|
+
max-width: 100vw;
|
|
93
|
+
max-height: 82dvh;
|
|
94
|
+
border-radius: 22px 22px 0 0;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
[data-theme="dark"] .clado-view-status .clado-issue-count { color: #efb860; }
|
|
62
62
|
[data-theme="dark"] .clado-view-status .has-errors { color: #ffacb6; }
|
|
63
63
|
|
|
64
|
-
@media (max-width:
|
|
65
|
-
.clado-view-modes .clado-ui-button { padding-inline:
|
|
64
|
+
@media (max-width: 680px) {
|
|
65
|
+
.clado-view-modes .clado-ui-button { padding-inline: 11px; min-height: 36px; font-size: 12.5px; }
|
|
66
66
|
}
|
package/src/agent/runtime.js
CHANGED
|
@@ -21,7 +21,7 @@ const MODE_PROMPTS = {
|
|
|
21
21
|
'当前工作模式:【研发设计与代码架构】',
|
|
22
22
|
'1. 涉及存量代码时,先调用 probe_tree / probe_search / probe_read 核对真实类名、方法名与边界,绝不编造。',
|
|
23
23
|
'2. 先用 clado_templates 读取对应模板(如 call-chain / data-design / business-flow)再创建或修改 .md 画布。',
|
|
24
|
-
'3.
|
|
24
|
+
'3. 同画布跨卡连线支持「卡片 + Tag」二元目标:可在目标行打唯一语义 Tag(有字胶囊 `[新增]{#id .green}`、无字小圆点 `[]{#id .amber}`、代码行尾 `// {#id .blue}`、Mermaid `%% {#node .green}`),再以 `[文案](#id)` 精准连线,也可兼容 `clado:code:` / `clado:to:`;避免卡片末尾裸卡片连卡片。',
|
|
25
25
|
'4. 遇到需求歧义或方案二选一时,优先调用 ask_user 给出清晰选项让观察者拍板,不要替用户擅自猜测。',
|
|
26
26
|
'5. 每次修改后核对 diagnostics,确保 0 error 再给 3–5 行精炼汇报。',
|
|
27
27
|
].join('\n'),
|