dsh-sun-space 0.2.2 → 0.2.3

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/client.js +8 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-sun-space",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "description": "Sun Space:DeepSeek Harness 个人超智能体插件——Router/Worker 双预设工具白名单、钉钉待办轮询、Obsidian 知识库落库、会话工作台与定时任务管理。",
6
6
  "exports": {
package/src/client.js CHANGED
@@ -22,7 +22,7 @@ window.__ModuleLoader__.load({
22
22
  // 会话解析链:session/list(sun-router 会话)→ 90-Meta/system/state.json 裁决 → updatedAt 最新兜底。
23
23
  // vault 解析链:会话 cwd 推 HOME → 约定布局探测 state.json → state.json 的 vault 字段裁决(跨机自愈)。
24
24
  // 写回:① 创建会话后经 session/prompt 引导自登记(含 vault 字段);② 晨报自检发现缺失/不一致自动修正。
25
- const WB_REV = 'v13' // 根节点 data-wb-rev 版本标记:判别浏览器是否吃到旧 client.js(immutable 缓存坑,HANDOFF 踩坑 1)
25
+ const WB_REV = 'v15' // 根节点 data-wb-rev 版本标记:判别浏览器是否吃到旧 client.js(immutable 缓存坑,HANDOFF 踩坑 1)
26
26
 
27
27
  const STATUS_META = {
28
28
  proposed: { label: '待确认派发', color: '#9e9e9e' },
@@ -379,13 +379,13 @@ window.__ModuleLoader__.load({
379
379
  function OnboardPanel({ checks, currentSessionId, onRetry }) {
380
380
  const steps = [
381
381
  { n: 1, ok: checks.presets, title: '确认依赖插件', desc: checks.presets ? '智能体协作 / 子智能体插件已启用' : '打开插件面板,启用 sun-space / 智能体协作相关插件后重启实例', action: checks.presets ? null : 'plugins' },
382
- { n: 2, ok: !!checks.routerSession, title: '创建 Router 会话', desc: checks.routerSession ? `已就绪:${checks.routerSession.slice(0, 28)}…` : '一键创建 sun-router 预设会话并自动登记(工作台与定时任务都挂在这上面)', action: checks.presets && !checks.routerSession ? 'create-router' : null },
382
+ { n: 2, ok: !!checks.routerSession, title: '创建 Router 会话', desc: checks.routerSession ? `已就绪:${checks.routerSession.slice(0, 28)}…` : '一键创建 sun-router 预设会话并自动登记(孙学空间与定时任务都挂在这上面)', action: checks.presets && !checks.routerSession ? 'create-router' : null },
383
383
  { n: 3, ok: checks.vault, title: '知识库就绪', desc: checks.vault ? `已就绪:${checks.vaultPath}` : `用 Obsidian 打开(或创建)~/Workspace/云顶天宫 并放好 90-Meta 骨架;自定义位置让 Router 把绝对路径写进 state.json 的 vault 字段`, action: null },
384
384
  ]
385
385
  const allOk = steps.every(x => x.ok)
386
386
  return h('div', null, [
387
387
  h('h2', { key: 'h', style: { margin: '0 0 4px', fontSize: 18 } }, '三步启用 Sun'),
388
- h('p', { key: 'sub', style: { margin: '0 0 14px', fontSize: 12, opacity: 0.6 } }, '工作台与定时任务都挂在 Router 会话上——三步完成后,本页即变为日常工作台。'),
388
+ h('p', { key: 'sub', style: { margin: '0 0 14px', fontSize: 12, opacity: 0.6 } }, '孙学空间与定时任务都挂在 Router 会话上——三步完成后,本页即变为日常入口。'),
389
389
  ...steps.map(st => h('div', { key: st.n, style: { ...cardStyle(st.ok ? '#57b26a' : 'rgba(128,128,128,0.35)'), alignItems: 'flex-start', marginBottom: 10, padding: '10px 14px' } }, [
390
390
  h('span', { key: 'n', style: { width: 22, height: 22, borderRadius: 11, flexShrink: 0, marginTop: 2, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', fontSize: 12, fontWeight: 600, background: st.ok ? '#57b26a' : 'rgba(128,128,128,0.25)', color: st.ok ? '#fff' : 'inherit' } }, st.ok ? '✓' : String(st.n)),
391
391
  h('div', { key: 'b', style: { flex: 1 } }, [
@@ -461,7 +461,7 @@ window.__ModuleLoader__.load({
461
461
  h(SunIcon, { key: 'i', size: 20 }),
462
462
  h('div', { key: 'b', style: { flex: 1, fontSize: 13, lineHeight: 1.7 } }, [
463
463
  h('div', { key: 't', style: { fontWeight: 600 } }, '本会话不是当前 Router 会话'),
464
- h('div', { key: 'd', style: { opacity: 0.7, fontSize: 12 } }, `Sun 工作台在 Router 会话上(当前:${routerSession.slice(0, 28)}…)。派活树、定时任务与初始化检查都在那边。`),
464
+ h('div', { key: 'd', style: { opacity: 0.7, fontSize: 12 } }, `孙学空间在 Router 会话上(当前:${routerSession.slice(0, 28)}…)。派活树、定时任务与初始化检查都在那边。`),
465
465
  ]),
466
466
  h('button', { key: 'go', onClick: () => { try { hostCtx.uiWorkspace.openSession(routerSession) } catch (e) { D.errors.push(String(e)) } }, style: btnStyle }, '打开 Router 会话'),
467
467
  ]),
@@ -484,13 +484,13 @@ window.__ModuleLoader__.load({
484
484
  h(SunErrorBoundary, { key: 'eb' }, [
485
485
  h('div', { key: 'head', style: { display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12 } }, [
486
486
  h(SunIcon, { key: 'i', size: 22 }),
487
- h('h1', { key: 't', style: { margin: 0, fontSize: 20 } }, 'Sun 工作台'),
487
+ h('h1', { key: 't', style: { margin: 0, fontSize: 20 } }, '孙学空间'),
488
488
  h('button', { key: 'r', onClick: () => { reload(); runChecks() }, style: { marginLeft: 'auto', fontSize: 12, padding: '4px 10px', borderRadius: 6, border: '1px solid rgba(128,128,128,0.35)', background: 'transparent', color: 'inherit', cursor: 'pointer' } }, state.loading ? '刷新中…' : '刷新'),
489
489
  ]),
490
490
  // 初始化面板:三项检查任一未就绪时出现(含无 Router 会话的场景)
491
- h('div', { key: 'tabs', style: { display: 'flex', gap: 18, marginBottom: 14, borderBottom: '1px solid rgba(128,128,128,0.2)' } }, [
491
+ h('div', { key: 'tabs', style: { display: 'flex', gap: 3, marginBottom: 16, background: 'rgba(128,128,128,0.12)', borderRadius: 8, padding: 3 } }, [
492
492
  ['overview', '总览'], ['schedules', '定时任务'], ['setup', '设置'],
493
- ].map(([id, label]) => h('button', { key: id, onClick: () => setTab(id), style: { border: 'none', background: 'transparent', cursor: 'pointer', fontSize: 14, padding: '6px 2px', color: 'inherit', opacity: tab === id ? 1 : 0.55, borderBottom: tab === id ? '2px solid currentColor' : '2px solid transparent' } }, label))),
493
+ ].map(([id, label]) => h('button', { key: id, onClick: () => setTab(id), style: { flex: 1, border: 'none', cursor: 'pointer', fontSize: 13, padding: '6px 0', borderRadius: 6, color: 'inherit', background: tab === id ? 'rgba(128,128,128,0.28)' : 'transparent', opacity: tab === id ? 1 : 0.6, transition: 'background 0.15s' } }, label))),
494
494
  h('div', { key: 'cnt', style: { display: 'flex', gap: 18, marginBottom: 16 } },
495
495
  counters.map(([label, n, color]) => h('div', { key: label, style: { display: 'flex', alignItems: 'center', gap: 6 } }, [
496
496
  h('span', { key: 'd', style: { width: 8, height: 8, borderRadius: 4, background: color, display: 'inline-block' } }),
@@ -564,7 +564,7 @@ window.__ModuleLoader__.load({
564
564
  name: 'conversation.view',
565
565
  id: PANEL_ID,
566
566
  order: 40,
567
- label: () => '工作台',
567
+ label: () => '孙学空间',
568
568
  inject: (sessionId) => { D.currentSessionId = sessionId; return {} },
569
569
  }, Workbench)
570
570
  })