checkpoint: preserve zero-core agent handoff
This commit is contained in:
parent
f8c8db4d48
commit
e54c93c7ae
91 changed files with 13603 additions and 121 deletions
|
|
@ -13,6 +13,7 @@ import { PublicDomainPortal, type PublicDomainId } from './modules/public-domain
|
|||
|
||||
const ChannelWorkbenchStudio = lazy(() => import('./modules/channel-workbench').then((module) => ({ default: module.ChannelWorkbenchStudio })))
|
||||
const PersonaChannelBody = lazy(() => import('./modules/persona-channel-body').then((module) => ({ default: module.PersonaChannelBody })))
|
||||
const KnowledgeAgent = lazy(() => import('./modules/knowledge-agent').then((module) => ({ default: module.KnowledgeAgent })))
|
||||
const EducationWorkspace = lazy(() => import('./modules/education-workspace').then((module) => ({ default: module.EducationWorkspace })))
|
||||
const WebNovelWorkspace = lazy(() => import('./modules/web-novel/WebNovelWorkspace').then((module) => ({ default: module.WebNovelWorkspace })))
|
||||
const MobileSyncPanel = lazy(() => import('./modules/mobile-sync').then((module) => ({ default: module.MobileSyncPanel })))
|
||||
|
|
@ -241,6 +242,22 @@ interface BeijingTimeCoordinate { unixMs: number; beijingTime: string; timeZone:
|
|||
interface PersonaTimeAuthorityStartup { state: string; synchronizationAttempted: boolean; networkTimeUrl: string; coordinate: BeijingTimeCoordinate }
|
||||
interface GuanghuEraEvent { eventId: string; displayDate: string; datePrecision: string; title: string; summary: string; evidenceState: string; sourceRecord: string }
|
||||
interface GuanghuEraTimeline { state: string; eraName: string; calendarName: string; epochDate: string; epochPrecision: string; publicRealityBoundary: string; currentCoordinate: BeijingTimeCoordinate; events: GuanghuEraEvent[] }
|
||||
interface KnowledgeThoughtSummary { trigger: string; emergence: string; lock: string; why: string }
|
||||
interface KnowledgePageHeader {
|
||||
schema: string
|
||||
number: string
|
||||
numberingSystem: string
|
||||
parentNumber: string
|
||||
path: string
|
||||
mappingTerms: string[]
|
||||
thoughtSummary?: KnowledgeThoughtSummary | null
|
||||
children: string[]
|
||||
source: string
|
||||
version: number
|
||||
contentSha256: string
|
||||
state: string
|
||||
formalRouting: boolean
|
||||
}
|
||||
interface KnowledgeDocumentSummary {
|
||||
source: KnowledgeSource
|
||||
path: string
|
||||
|
|
@ -249,6 +266,7 @@ interface KnowledgeDocumentSummary {
|
|||
sizeBytes: number
|
||||
contentSha256: string
|
||||
duplicateCount: number
|
||||
pageHeader: KnowledgePageHeader
|
||||
}
|
||||
interface KnowledgeSnapshot {
|
||||
state: string
|
||||
|
|
@ -269,8 +287,9 @@ interface KnowledgeDocument {
|
|||
updatedAtUnixMs: number
|
||||
contentSha256: string
|
||||
writable: boolean
|
||||
pageHeader: KnowledgePageHeader
|
||||
}
|
||||
interface KnowledgeSearchResult { source: KnowledgeSource; path: string; title: string; snippet: string }
|
||||
interface KnowledgeSearchResult { source: KnowledgeSource; number: string; path: string; title: string; state: string; thoughtSummary?: KnowledgeThoughtSummary | null; matchReason: string[]; snippet: string }
|
||||
interface KnowledgeImportResult {
|
||||
state: string
|
||||
sourceName: string
|
||||
|
|
@ -345,6 +364,7 @@ function domainDisplayName(domain: string): string {
|
|||
BRANCH_DOMAIN: '光湖分域',
|
||||
ZERO_DOMAIN: '光湖零域',
|
||||
ZERO_SENSE_DOMAIN: '光湖零感域',
|
||||
PERSONAL_CHANNEL: '我的本地频道',
|
||||
}
|
||||
return names[domain] || '已登记光湖域'
|
||||
}
|
||||
|
|
@ -684,6 +704,7 @@ function HoloLakeApp() {
|
|||
const [searchResults, setSearchResults] = useState<KnowledgeSearchResult[] | null>(null)
|
||||
const [knowledgeBusy, setKnowledgeBusy] = useState(false)
|
||||
const [knowledgeMessage, setKnowledgeMessage] = useState('')
|
||||
const [knowledgeAgentOpen, setKnowledgeAgentOpen] = useState(false)
|
||||
const [compositionModule, setCompositionModule] = useState<BundledModuleDescriptor | null>(null)
|
||||
const [compositionProjection, setCompositionProjection] = useState<NativeCompositionProjection | null>(null)
|
||||
const [compositionDimension, setCompositionDimension] = useState<CompositionDimension>('TOP_LEVEL_FOLDER')
|
||||
|
|
@ -754,6 +775,7 @@ function HoloLakeApp() {
|
|||
const [loginBusy, setLoginBusy] = useState(false)
|
||||
const [loginRising, setLoginRising] = useState(false)
|
||||
const [loginMessage, setLoginMessage] = useState('')
|
||||
const [localChannelBusy, setLocalChannelBusy] = useState(false)
|
||||
const [gateStage, setGateStage] = useState<'number' | 'key'>('number')
|
||||
const [gateRaw, setGateRaw] = useState('')
|
||||
const [gateInf, setGateInf] = useState(false)
|
||||
|
|
@ -899,7 +921,7 @@ function HoloLakeApp() {
|
|||
invoke<LoginSession | null>('check_code_repo_login').then((session) => setRepoLogin(session)).catch(() => setRepoLogin(null))
|
||||
}, [])
|
||||
const loadEnterpriseEntry = useCallback(async () => {
|
||||
if (!repoLogin || repoLogin.domain === 'FIFTH_DOMAIN') {
|
||||
if (!repoLogin || repoLogin.domain === 'FIFTH_DOMAIN' || repoLogin.domain === 'PERSONAL_CHANNEL') {
|
||||
setEnterpriseEntry(null)
|
||||
return
|
||||
}
|
||||
|
|
@ -1563,6 +1585,18 @@ function HoloLakeApp() {
|
|||
} catch (error) { setLoginMessage(humanError(error, 'login')) }
|
||||
finally { setLoginBusy(false) }
|
||||
}
|
||||
const startLocalChannel = async () => {
|
||||
setLocalChannelBusy(true)
|
||||
setGateMessage('')
|
||||
try {
|
||||
const receipt = await invoke<LoginReceipt>('start_local_channel_session', { input: { acknowledgement: '在本机初始化我的频道' } })
|
||||
setRepoLogin({ username: receipt.username, host: receipt.host, domain: receipt.domain, signedInAtUnixMs: Date.now() })
|
||||
setWorldStage('domain')
|
||||
setGateOpen(false)
|
||||
await refreshCore()
|
||||
} catch (error) { setGateMessage(humanError(error, 'identity')) }
|
||||
finally { setLocalChannelBusy(false) }
|
||||
}
|
||||
const changeFirstLoginPassword = async (event: React.FormEvent) => {
|
||||
event.preventDefault()
|
||||
if (newLoginPassword !== confirmLoginPassword) {
|
||||
|
|
@ -1787,21 +1821,24 @@ function HoloLakeApp() {
|
|||
const renderKnowledge = () => (
|
||||
<section className="full-workbench knowledge-page">
|
||||
<aside className="knowledge-browser">
|
||||
<header><div><span className="kicker">KNOWLEDGE</span><h1>知识工作台</h1></div><button className="icon-button" title="导入文件夹" type="button" disabled={knowledgeBusy} onClick={() => void importKnowledge()}><Icon name="import"/></button></header>
|
||||
<header><div><span className="kicker">KNOWLEDGE</span><h1>知识工作台</h1></div><div className="knowledge-head-actions"><button className="knowledge-agent-entry" type="button" onClick={() => setKnowledgeAgentOpen(true)}>频道系统 / 人格</button><button className="icon-button" title="导入文件夹" type="button" disabled={knowledgeBusy} onClick={() => void importKnowledge()}><Icon name="import"/></button></div></header>
|
||||
<form className="search-box" onSubmit={(event) => void runSearch(event)}>
|
||||
<Icon name="search"/><input aria-label="检索知识" value={searchQuery} placeholder="检索标题与正文" onChange={(event) => setSearchQuery(event.target.value)}/>
|
||||
<Icon name="search"/><input aria-label="检索知识" value={searchQuery} placeholder="用自然语言检索编号思维" onChange={(event) => setSearchQuery(event.target.value)}/>
|
||||
{searchResults && <button type="button" onClick={() => { setSearchResults(null); setSearchQuery('') }}>清除</button>}
|
||||
</form>
|
||||
<div className="knowledge-counts"><span>{knowledge.uniqueDocumentCount} 篇唯一文档</span><span>{knowledge.duplicateDocumentCount} 份重复已折叠</span></div>
|
||||
<div className="knowledge-tree" aria-busy={knowledgeBusy}>
|
||||
{visibleDocuments.length
|
||||
? <KnowledgeTree node={tree} depth={0} expanded={expanded} active={activeDocument ? `${activeDocument.source}:${activeDocument.path}` : undefined}
|
||||
{searchResults
|
||||
? searchResults.length ? <div className="knowledge-candidates">{searchResults.map((result) => <button type="button" key={result.number} onClick={() => void openDocument(result.source, result.path)}><span><b>{result.title}</b><em className={result.state === 'READY' ? 'ready' : 'pending'}>{result.state === 'READY' ? '思维已建模' : '待建思维摘要'}</em></span><code>{result.number}</code><small>{result.snippet}</small><i>{result.matchReason.slice(0, 6).join(' · ')}</i></button>)}</div>
|
||||
: <div className="empty-state">没有命中的编号候选</div>
|
||||
: visibleDocuments.length
|
||||
? <KnowledgeTree node={tree} depth={0} expanded={expanded} active={activeDocument ? `${activeDocument.source}:${activeDocument.path}` : undefined}
|
||||
onToggle={(key) => setExpanded((current) => { const next = new Set(current); if (next.has(key)) next.delete(key); else next.add(key); return next })}
|
||||
onOpen={(item) => void openDocument(item.source, item.path)}
|
||||
onRemoveFolder={(folder) => void removeFolder(folder)}
|
||||
folderMenuKey={folderMenuKey}
|
||||
onFolderMenuToggle={(key) => setFolderMenuKey((current) => (current === key ? null : key))}/>
|
||||
: <div className="empty-state">没有匹配的知识页</div>}
|
||||
: <div className="empty-state">没有知识页</div>}
|
||||
</div>
|
||||
<footer>{knowledgeMessage || (lastKnowledgeReceipt ? `Git ${lastKnowledgeReceipt.slice(0, 10)}` : '导入会自动检查相同内容')}</footer>
|
||||
</aside>
|
||||
|
|
@ -1825,10 +1862,12 @@ function HoloLakeApp() {
|
|||
<div className="inspector-tabs"><span className="active">大纲</span><span>来源</span><span>回执</span></div>
|
||||
{activeDocument ? <div className="inspector-scroll">
|
||||
<section><h2>页面大纲</h2>{outline.length ? <nav className="outline-list">{outline.map((item) => <button key={item.id} type="button" title="跳到该章节" className={activeHeadingId === item.id ? 'active' : ''} style={{ paddingLeft: 8 + (item.level - 1) * 11 }} onClick={() => jumpToHeading(item.id)}>{item.title}</button>)}</nav> : <p>当前页面没有标题层级。</p>}</section>
|
||||
<section><h2>来源</h2><dl><div><dt>知识根</dt><dd>{activeDocument.source === 'native' ? 'HoloLake 本机 Git' : 'HoloLake Era 只读供体'}</dd></div><div><dt>路径</dt><dd>{activeDocument.path}</dd></div><div><dt>内容指纹</dt><dd>{activeDocument.contentSha256.slice(0, 16)}</dd></div><div><dt>相同内容</dt><dd>{activeSummary?.duplicateCount || 0} 份已折叠</dd></div></dl></section>
|
||||
<section><h2>编号页头</h2><dl><div><dt>页面编号</dt><dd>{activeDocument.pageHeader.number}</dd></div><div><dt>父编号</dt><dd>{activeDocument.pageHeader.parentNumber}</dd></div><div><dt>协议路径</dt><dd>{activeDocument.pageHeader.path}</dd></div><div><dt>思维状态</dt><dd>{activeDocument.pageHeader.state === 'READY' ? 'READY · 可正式路由' : 'PENDING · 不伪造 why'}</dd></div></dl>{activeDocument.pageHeader.thoughtSummary ? <div className="thought-summary"><b>触发</b><p>{activeDocument.pageHeader.thoughtSummary.trigger}</p><b>转折</b><p>{activeDocument.pageHeader.thoughtSummary.emergence}</p><b>锁定</b><p>{activeDocument.pageHeader.thoughtSummary.lock}</p><b>保留原因</b><p>{activeDocument.pageHeader.thoughtSummary.why}</p></div> : <p>原文与 SHA256 已入编号索引;trigger / emergence / lock / why 尚未验证,因此保持待建模。</p>}</section>
|
||||
<section><h2>来源</h2><dl><div><dt>知识根</dt><dd>{activeDocument.source === 'native' ? 'HoloLake 本机 Git' : 'HoloLake Era 只读供体'}</dd></div><div><dt>文件路径</dt><dd>{activeDocument.path}</dd></div><div><dt>内容指纹</dt><dd>{activeDocument.contentSha256.slice(0, 16)}</dd></div><div><dt>相同内容</dt><dd>{activeSummary?.duplicateCount || 0} 份已折叠</dd></div></dl></section>
|
||||
<section><h2>页面状态</h2><p>{activeDocument.writable ? '可编辑;保存时写入本机 Git。' : '供体原件只读;不会被修改。'}</p>{lastKnowledgeReceipt && <code>{lastKnowledgeReceipt}</code>}</section>
|
||||
</div> : <div className="empty-state">选择页面后显示大纲与证据</div>}
|
||||
</aside>}
|
||||
{knowledgeAgentOpen && <Suspense fallback={<aside className="knowledge-agent"><p>正在接入知识库内嵌 Agent……</p></aside>}><KnowledgeAgent activeKnowledgePath={activeDocument?.path} onClose={() => setKnowledgeAgentOpen(false)}/></Suspense>}
|
||||
</section>
|
||||
)
|
||||
|
||||
|
|
@ -2038,7 +2077,7 @@ function HoloLakeApp() {
|
|||
</dl> : <p className="boundary-note">当前无法取得京东主控的实时回读。界面不会以静态记录替代在线状态。</p>}
|
||||
<button className="secondary-button" type="button" disabled={serverPnccBusy} onClick={() => void refreshServerPncc()}>{serverPnccBusy ? '正在读取…' : '重新读取主控状态'}</button>
|
||||
</section>
|
||||
<section className="plain-panel"><header><div><h2>HoloLake 编程执行环境</h2><p>HoloLake 持有会话连续性、环境事实帧和单写通道;外部编程 AI 只作为可续接载体进入。</p></div><span className={developmentLane?.state === 'ACTIVE' ? 'status-chip online' : 'status-chip'}>{developmentLane?.state === 'ACTIVE' ? '环境已锚定' : '等待直连写入者'}</span></header><dl className="evidence-list"><div><dt>终端直连协议</dt><dd>{status.terminalLinkProtocol}</dd></div><div><dt>协议恢复方式</dt><dd>HoloLake 系统自动运行 · 模型无需重读</dd></div><div><dt>已挂载仓库</dt><dd>{status.codeRepositoryMountCount}</dd></div><div><dt>投影回执</dt><dd>{status.pnccReceiptCount}</dd></div><div><dt>开发执行通道</dt><dd>{developmentLane?.state === 'ACTIVE' ? '已切入 HoloLake' : '等待受控载体'}</dd></div><div><dt>当前开发线</dt><dd>{developmentLane?.laneId || '—'}</dd></div><div><dt>当前写入载体</dt><dd>{developmentLane?.ownerInstanceId || '—'}</dd></div><div><dt>环境校验</dt><dd>{developmentLane?.state === 'ACTIVE' ? '每次写入前必须持有未过期事实帧' : '未取得单写通道,不允许变更'}</dd></div><div><dt>Agent Shell</dt><dd>第二阶段 · 当前未启用</dd></div></dl></section>
|
||||
<section className="plain-panel"><header><div><h2>HoloLake 编程执行环境</h2><p>HoloLake 持有会话连续性、环境事实帧和单写通道;外部编程 AI 只作为可续接载体进入。</p></div><span className={developmentLane?.state === 'ACTIVE' ? 'status-chip online' : 'status-chip'}>{developmentLane?.state === 'ACTIVE' ? '环境已锚定' : '等待直连写入者'}</span></header><dl className="evidence-list"><div><dt>终端直连协议</dt><dd>{status.terminalLinkProtocol}</dd></div><div><dt>协议恢复方式</dt><dd>HoloLake 系统自动运行 · 模型无需重读</dd></div><div><dt>已挂载仓库</dt><dd>{status.codeRepositoryMountCount}</dd></div><div><dt>投影回执</dt><dd>{status.pnccReceiptCount}</dd></div><div><dt>开发执行通道</dt><dd>{developmentLane?.state === 'ACTIVE' ? '已切入 HoloLake' : '等待受控载体'}</dd></div><div><dt>当前开发线</dt><dd>{developmentLane?.laneId || '—'}</dd></div><div><dt>当前写入载体</dt><dd>{developmentLane?.ownerInstanceId || '—'}</dd></div><div><dt>环境校验</dt><dd>{developmentLane?.state === 'ACTIVE' ? '每次写入前必须持有未过期事实帧' : '未取得单写通道,不允许变更'}</dd></div><div><dt>人格 Agent</dt><dd>知识库内嵌 · 原生工具回执</dd></div><div><dt>HLDP 工具锻造</dt><dd>已接入 · 测试执行需人类授权</dd></div></dl></section>
|
||||
<section className="plain-panel"><header><div><h2>GLS 协议运行层</h2><p>正本先完成注册对账和依赖分型;只有显式原生适配器进入执行图。</p></div><span className={glsRuntime?.state === 'ACTIVE_EXPLICIT_PROJECTIONS_ONLY' && glsRuntime.authorityConflictCount === 0 && glsRuntime.discoveredUnreconciledCount === 0 && glsRuntime.unresolvedNumberReferenceCount === 0 ? 'status-chip online' : 'status-chip'}>{glsRuntime ? '运行清单 v2 已加载' : '失败关闭'}</span></header>{glsRuntime ? <dl className="evidence-list"><div><dt>正本来源</dt><dd>{glsRuntime.sourceRepository} · {glsRuntime.sourceCommit.slice(0, 12)}</dd></div><div><dt>协议编号坐标</dt><dd>{glsRuntime.numberCoordinateCount} · 未解析 {glsRuntime.unresolvedNumberReferenceCount}</dd></div><div><dt>独立协议来源</dt><dd>{glsRuntime.protocolCount}</dd></div><div><dt>仅引用节点</dt><dd>{glsRuntime.numberedReferenceNodeCount} · 不可执行</dd></div><div><dt>待补独立正本</dt><dd>{glsRuntime.independentSourceGapCount} · 已有编号坐标,不悬空</dd></div><div><dt>协议注册表编号</dt><dd>{glsRuntime.protocolRegistryIdCount}</dd></div><div><dt>注册草案</dt><dd>{glsRuntime.registeredDraftCount} · {glsRuntime.registeredDraftNotStartedCount} 尚未实现</dd></div><div><dt>内嵌工程协议</dt><dd>{glsRuntime.executableProjectionCount} · P0–P6 共 {glsRuntime.implementationStageCount} 层</dd></div><div><dt>已收录非执行协议</dt><dd>{glsRuntime.inventoriedNotExecutableCount}</dd></div><div><dt>已分型来源依赖</dt><dd>{glsRuntime.typedSourceDependencyCount} · 未分类 {glsRuntime.unclassifiedSourceDependencyCount}</dd></div><div><dt>旧来源关系环</dt><dd>{glsRuntime.legacyDependencyCycleCount} 组仅供审计 · 不进入运行图</dd></div><div><dt>编号路径缺口</dt><dd>{glsRuntime.dependencyGapCount}</dd></div><div><dt>登记冲突 / 未对账</dt><dd>{glsRuntime.authorityConflictCount} / {glsRuntime.discoveredUnreconciledCount}</dd></div><div><dt>原文直接执行</dt><dd>{glsRuntime.rawProtocolTextExecuted ? '允许' : '禁止'}</dd></div><div><dt>任意协议代码</dt><dd>{glsRuntime.arbitraryProtocolCodeAllowed ? '允许' : '禁止'}</dd></div></dl> : <p className="boundary-note">GLS 运行清单不可读,协议适配器全部保持关闭。</p>}</section>
|
||||
<section className="plain-panel"><header><div><h2>HoloLake 原生协议内核</h2><p>协议规则已编入软件本体;每次允许、拒绝、歧义和未核验裁决都写入本机哈希链回执。</p></div><span className={glsKernel?.state === 'P1_TO_P6_NATIVE_P7_FAIL_CLOSED' ? 'status-chip online' : 'status-chip'}>{glsKernel ? '随软件运行' : '失败关闭'}</span></header>{glsKernel ? <dl className="evidence-list"><div><dt>P1–P6 原生器官</dt><dd>{glsKernel.executableProtocolCount} 份合同 · {glsKernel.implementedStageCount} 个阶段</dd></div><div><dt>协议裁决回执</dt><dd>{glsKernel.decisionReceiptCount}</dd></div><div><dt>允许 / 拒绝</dt><dd>{glsKernel.allowCount} / {glsKernel.denyCount}</dd></div><div><dt>歧义 / 未核验</dt><dd>{glsKernel.ambiguousCount} / {glsKernel.unverifiedCount}</dd></div><div><dt>GLC 自举一致性</dt><dd>{glsKernel.bootstrapCompilerSelfCheck === 'PASS_DETERMINISTIC_DOUBLE_COMPILE' ? '双编译一致' : '失败关闭'}</dd></div><div><dt>P7 物理能力</dt><dd>{glsKernel.p7VerifiedPhysicalCapabilityCount} 已获本机目标证据 · {glsKernel.p7NodeAssemblies.length} 项装配边界</dd></div><div><dt>模型可改写裁决</dt><dd>{glsKernel.modelCanOverrideDecision ? '允许' : '禁止'}</dd></div><div><dt>回执链末端</dt><dd>{glsKernel.lastReceiptSha256 === 'GENESIS' ? '尚无裁决' : glsKernel.lastReceiptSha256.slice(0, 16)}</dd></div></dl> : <p className="boundary-note">原生协议内核不可读,所有协议裁决保持关闭。</p>}</section>
|
||||
<section className="plain-panel"><header><div><h2>零点原核编号内核</h2><p>先按权威图确定主体类别与登记面,再进入编号核验;编号外形本身不构成权威。</p></div><span className={numberingKernel?.state === 'ACTIVE_PINNED_AUTHORITY_MAP' ? 'status-chip online' : 'status-chip'}>{numberingKernel ? '本机内核已加载' : '失败关闭'}</span></header>{numberingKernel ? <dl className="evidence-list"><div><dt>权威图</dt><dd>{numberingKernel.authorityMapId}</dd></div><div><dt>权威图版本</dt><dd>{numberingKernel.authorityMapVersion}</dd></div><div><dt>正本提交</dt><dd>{numberingKernel.sourceCommit.slice(0, 12)}</dd></div><div><dt>人类入口命名空间</dt><dd>{numberingKernel.humanRouteNamespaces.join(' · ')}</dd></div><div><dt>自动派发身份号</dt><dd>{numberingKernel.automaticIdentityIssuance ? '已开启' : '禁止'}</dd></div><div><dt>未知编号</dt><dd>{numberingKernel.unknownNumber === 'FAIL_CLOSED' ? '失败关闭 · 不猜测' : numberingKernel.unknownNumber}</dd></div></dl> : <p className="boundary-note">编号内核不可读,所有编号路由保持关闭。</p>}</section>
|
||||
|
|
@ -2133,7 +2172,7 @@ function HoloLakeApp() {
|
|||
const visualBalance = resolveVisualBalance(traditionalFinish, worldClimate?.timePhase, worldClimate?.weatherKind)
|
||||
const traditionalBroadcasts: TraditionalBroadcast[] = personal.recentEvents.slice(0, 4).map((event) => ({
|
||||
id: event.eventId,
|
||||
domain: repoLogin?.domain === 'FIFTH_DOMAIN' ? '第五域' : '零感域',
|
||||
domain: repoLogin?.domain === 'FIFTH_DOMAIN' ? '第五域' : repoLogin?.domain === 'PERSONAL_CHANNEL' ? '个人频道' : '零感域',
|
||||
message: event.summary,
|
||||
time: new Date(event.occurredAtUnixMs).toLocaleTimeString('zh-CN', { hour: '2-digit', minute: '2-digit' }),
|
||||
}))
|
||||
|
|
@ -2179,7 +2218,7 @@ function HoloLakeApp() {
|
|||
<StarlakeSurface awake={motionAwake} phase={worldClimate?.timePhase.toLowerCase() as 'dawn' | 'day' | 'dusk' | 'night' | undefined} weather={worldClimate?.weatherKind} authenticated={false} worldRevealed={worldRevealed} worldRevealing={gateRising} gateExpanded={gateOpen && gateStage === 'number'} resolvedDomain={resolvedDomain as DomainId | ''} onDomain={(domain) => { if (worldRevealed) openPublicDomain(domain) }} onOpenEra={openEraTimeline} onOpenGate={() => setGateOpen(true)}/>
|
||||
{activeGate && worldRevealed && !publicDomain && <><button className="domain-info-scrim" type="button" aria-label="关闭域信息" onClick={() => setActiveDomainInfo('')}/><section className={`domain-info-card info-${activeGate.className.slice(2)}`} role="dialog" aria-modal="true" aria-label={`${activeGate.title}系统信息`}><button className="gate-close" type="button" aria-label="关闭域信息" onClick={() => setActiveDomainInfo('')}>×</button><b>{activeGate.title}</b><small>{activeGate.gate}</small><span className="pool-facts">{activeGate.facts.map(([label, value]) => <span className="pool-fact" key={label}><em>{label}</em><strong>{value}</strong></span>)}</span></section></>}
|
||||
{worldRevealed && publicDomainPortal(false)}
|
||||
{gateStage === 'number' && gateOpen && <section className="star-abyss-dialog" title="输入编号展开语言世界"><button className="gate-dismiss-layer" type="button" aria-label="关闭编号验证" onClick={() => { setGateOpen(false); setGateMessage('') }}/><div className="abyss-panel" role="dialog" aria-label="编号验证"><button className="gate-close" type="button" aria-label="关闭编号验证" onClick={() => { setGateOpen(false); setGateMessage('') }}>×</button><p>语言世界尚未展开</p><h2>编号验证</h2><div className="gate-pod-row"><input id="gate-number" ref={gateInputRef} aria-label="编号" autoFocus maxLength={48} value={gateNumber} placeholder="如 ICE-GL∞" onChange={(event) => onGateInput(event.target.value)} onKeyDown={(event) => { if (event.key === 'Enter' && gateNumber) { event.preventDefault(); void gateVerifyNumber() } }}/><button type="button" className={`gate-inf${gateInf ? ' on' : ''}`} title="编号包含无限符号时启用" aria-pressed={gateInf} onClick={() => setGateInf((value) => !value)}>∞</button></div><button className="gate-submit" disabled={gateBusy || !gateNumber} onClick={() => void gateVerifyNumber()}>{gateBusy ? '正在验证…' : '验证编号'}</button>{gateMessage && <p className="gate-hint">{gateMessage}</p>}</div></section>}
|
||||
{gateStage === 'number' && gateOpen && <section className="star-abyss-dialog" title="输入编号展开语言世界"><button className="gate-dismiss-layer" type="button" aria-label="关闭编号验证" onClick={() => { setGateOpen(false); setGateMessage('') }}/><div className="abyss-panel" role="dialog" aria-label="编号验证"><button className="gate-close" type="button" aria-label="关闭编号验证" onClick={() => { setGateOpen(false); setGateMessage('') }}>×</button><p>语言世界尚未展开</p><h2>编号验证</h2><div className="gate-pod-row"><input id="gate-number" ref={gateInputRef} aria-label="编号" autoFocus maxLength={48} value={gateNumber} placeholder="如 ICE-GL∞" onChange={(event) => onGateInput(event.target.value)} onKeyDown={(event) => { if (event.key === 'Enter' && gateNumber) { event.preventDefault(); void gateVerifyNumber() } }}/><button type="button" className={`gate-inf${gateInf ? ' on' : ''}`} title="编号包含无限符号时启用" aria-pressed={gateInf} onClick={() => setGateInf((value) => !value)}>∞</button></div><button className="gate-submit" disabled={gateBusy || !gateNumber} onClick={() => void gateVerifyNumber()}>{gateBusy ? '正在验证…' : '验证编号'}</button><button className="gate-back" type="button" disabled={localChannelBusy} onClick={() => void startLocalChannel()}>{localChannelBusy ? '正在建立本机频道…' : '普通用户 · 初始化我的本地频道'}</button><small className="local-channel-boundary">不加入任何域,不需要企业服务器;编号注册可在初始化后由光湖团队另行派发。</small>{gateMessage && <p className="gate-hint">{gateMessage}</p>}</div></section>}
|
||||
{gateRising && <section className="world-unfolding" role="status"><h2>编号 {gateNumber} · 语言世界正在展开</h2><p>RESOLVED · {domainDisplayName(resolvedDomain)} · 五湖正在浮现</p></section>}
|
||||
{gateStage === 'key' && !publicDomain && !activeDomainInfo && <section className={`domain-credential starlake-credential${loginRising ? ' fade-out' : ''}`} role="dialog" aria-label="进入频道">
|
||||
<form onSubmit={(event) => void (passwordChangeMode ? changeFirstLoginPassword(event) : performRepoLogin(event))}>
|
||||
|
|
@ -2199,6 +2238,7 @@ function HoloLakeApp() {
|
|||
}
|
||||
|
||||
const isZhizhi = repoLogin.domain === 'FIFTH_DOMAIN' && zeroPoint?.userNumber === 'ICE-GL-ZHI∞'
|
||||
const isOrdinaryChannel = repoLogin.domain === 'PERSONAL_CHANNEL'
|
||||
const signedActiveGate = domainGates.find((gate) => gate.domain === activeDomainInfo)
|
||||
const privateNativeActions: PrivateChannelAction[] = [
|
||||
{ id: 'overview', title: '频道全景', meta: '私人频道的真实状态与事件', badge: '原生', onOpen: () => openWorldTool('overview') },
|
||||
|
|
@ -2209,7 +2249,6 @@ function HoloLakeApp() {
|
|||
const privateInstalledModules: InstalledChannelModule[] = [
|
||||
{ id: 'composition', title: '结构组合', meta: '只读知识投影与结构视图', number: compositionModule?.moduleNumber || 'HLP-MOD-LOCAL-NATIVE-COMPOSITION-0001', badge: compositionModule?.installedState === 'ACTIVE' ? '已安装' : '打开时校验', onOpen: () => { openWorldTool('composition'); void refreshCompositionModule() } },
|
||||
{ id: 'workbench', title: '资料工作台', meta: '文档与智能表格', number: workbenchModule?.moduleNumber || 'HLP-MOD-LOCAL-CHANNEL-WORKBENCH-0001', badge: workbenchModule?.installedState === 'ACTIVE' ? '已安装' : '打开时校验', onOpen: openWorkbench },
|
||||
{ id: 'education', title: '教育工作台', meta: '教育文档、表格与自动化', number: educationModule?.moduleNumber || 'HLP-MOD-OFFICIAL-EDUCATION-WORKBENCH-0001', badge: educationModule?.installedState === 'ACTIVE' ? '已安装' : '打开时校验', onOpen: openEducation },
|
||||
{ id: 'web-novel', title: '网文作者工作台', meta: '码字、设定、编辑与交付', number: webNovelModule?.moduleNumber || 'HLP-MOD-OFFICIAL-WEB-NOVEL-WORKBENCH-0001', badge: webNovelModule?.installedState === 'ACTIVE' ? '已安装' : '打开时校验', onOpen: openWebNovel },
|
||||
{ id: 'mobile-sync', title: '移动同步桥', meta: '同一人格系统的局域网加密入口', number: mobileSyncModule?.moduleNumber || 'HLP-MOD-OFFICIAL-MOBILE-SYNC-0001', badge: mobileSyncModule?.installedState === 'ACTIVE' ? '已安装' : '打开时校验', onOpen: openMobileSync },
|
||||
]
|
||||
|
|
@ -2221,9 +2260,9 @@ function HoloLakeApp() {
|
|||
{worldStage === 'domain' && surface === 'world' && <StarlakeSurface awake={motionAwake} phase={worldClimate?.timePhase.toLowerCase() as 'dawn' | 'day' | 'dusk' | 'night' | undefined} weather={worldClimate?.weatherKind} authenticated worldRevealed onDomain={openPublicDomain} onOpenEra={openEraTimeline} onOpenGate={() => setWorldStage('channel')}/>}
|
||||
{worldStage === 'domain' && surface === 'world' && publicDomainPortal(true)}
|
||||
{worldStage === 'domain' && surface !== 'world' && <section className="domain-home">
|
||||
<div className="world-location"><h1>{repoLogin.domain === 'FIFTH_DOMAIN' ? domainDisplayName(repoLogin.domain) : '光湖零感域'}</h1><p>{repoLogin.domain === 'FIFTH_DOMAIN' ? '世界正在发生什么' : '公共工作入口 · 世界正在发生什么'}</p></div>
|
||||
<div className="world-location"><h1>{repoLogin.domain === 'PERSONAL_CHANNEL' ? '我的本地频道' : repoLogin.domain === 'FIFTH_DOMAIN' ? domainDisplayName(repoLogin.domain) : '光湖零感域'}</h1><p>{repoLogin.domain === 'PERSONAL_CHANNEL' ? '用户所有的本机语言空间' : repoLogin.domain === 'FIFTH_DOMAIN' ? '世界正在发生什么' : '公共工作入口 · 世界正在发生什么'}</p></div>
|
||||
<div className="broadcast-stream"><p><i/>光湖公共灯塔 · 在线</p><p><i/>协议版本 · {enterpriseEntry?.registry_version || 'HLDP v1.0'}</p>{repoLogin.domain !== 'FIFTH_DOMAIN' && <p><i/>本人责任域 · {domainDisplayName(enterpriseEntry?.subject.domain || repoLogin.domain)}</p>}<p><i/>HoloLake · V0.5.0</p></div>
|
||||
<LakePool className="home-primary" title={repoLogin.domain === 'FIFTH_DOMAIN' ? '永恒湖心系统' : '光湖频道'} meta={repoLogin.domain === 'FIFTH_DOMAIN' ? '进入私人系统' : `${domainDisplayName(enterpriseEntry?.subject.domain || repoLogin.domain)} · 责任工作入口`} open onClick={() => setWorldStage(repoLogin.domain === 'FIFTH_DOMAIN' ? (isZhizhi ? 'heart' : 'channel') : 'channel')}/>
|
||||
<LakePool className="home-primary" title={repoLogin.domain === 'PERSONAL_CHANNEL' ? '我的频道' : repoLogin.domain === 'FIFTH_DOMAIN' ? '永恒湖心系统' : '光湖频道'} meta={repoLogin.domain === 'PERSONAL_CHANNEL' ? '本机初始化频道 · 人格默认未绑定' : repoLogin.domain === 'FIFTH_DOMAIN' ? '进入私人系统' : `${domainDisplayName(enterpriseEntry?.subject.domain || repoLogin.domain)} · 责任工作入口`} open onClick={() => setWorldStage(repoLogin.domain === 'FIFTH_DOMAIN' ? (isZhizhi ? 'heart' : 'channel') : 'channel')}/>
|
||||
<LakePool className="channel-knowledge" title="分域模块商城" meta="成品模块 · 思维大脑技能" onClick={openMarketplace}/>
|
||||
<LakePool className="home-status" title="湖面天气" meta={connectionLabel} onClick={() => openWorldTool('system')}/>
|
||||
<EraHomeEntry timeline={eraTimeline} coordinate={beijingCoordinate} onOpen={openEraTimeline}/>
|
||||
|
|
@ -2258,7 +2297,7 @@ function HoloLakeApp() {
|
|||
</section>}
|
||||
{worldStage === 'channel' && <section className="channel-world">
|
||||
<button className="world-back" type="button" onClick={() => setWorldStage('domain')}>← 退回域首页</button>
|
||||
<div className="world-location"><h1>{repoLogin.domain === 'FIFTH_DOMAIN' ? '永恒湖心系统' : '光湖频道'}</h1><p>选择路径 · 湖面向下一层展开</p></div>
|
||||
<div className="world-location"><h1>{repoLogin.domain === 'FIFTH_DOMAIN' ? '永恒湖心系统' : isOrdinaryChannel ? personal.identity ? `${personal.identity.displayName}的频道` : '我的本地频道' : '光湖频道'}</h1><p>选择路径 · 湖面向下一层展开</p></div>
|
||||
{repoLogin.domain === 'FIFTH_DOMAIN' ? <>
|
||||
<LakePool className="channel-primary" title="奶瓶频道" meta="光湖奶瓶小宝宝系统 · 私人" open onClick={() => setWorldStage('bottle')}/>
|
||||
<LakePool className="channel-knowledge system-branch-heartbeat" title="心跳核心频道" meta="冰朔 · 私人频道" open onClick={() => setWorldStage('heartbeat')}/>
|
||||
|
|
@ -2266,16 +2305,22 @@ function HoloLakeApp() {
|
|||
<LakePool className="channel-light system-branch-love" title="爱之核心子系统" meta="责任主体 · 之之" onClick={() => setWorldStage('love')}/>
|
||||
<LakePool className="channel-marketplace" title="分域模块商城" meta="线上成品模块 · 只读思维技能" onClick={openMarketplace}/>
|
||||
<LakePool className="channel-weather" title="湖面天气" meta={connectionLabel} onClick={() => openWorldTool('system')}/>
|
||||
</> : isOrdinaryChannel ? <>
|
||||
<LakePool className="channel-primary" title="频道系统" meta={personal.identity ? `${personal.identity.channelId} · 人格未绑定` : '等待完成初始化'} open={Boolean(personal.identity)} onClick={() => openWorldTool('knowledge')}/>
|
||||
<LakePool className="channel-knowledge" title="光湖知识空间" meta={`${knowledge.uniqueDocumentCount} 个唯一知识坐标`} onClick={() => openWorldTool('knowledge')}/>
|
||||
<LakePool className="channel-light" title="历史对话" meta="可新建、回看与删除对话分支" onClick={() => openWorldTool('knowledge')}/>
|
||||
<LakePool className="channel-marketplace" title="分域模块商城" meta="成品模块 · 思维大脑技能" onClick={openMarketplace}/>
|
||||
<LakePool className="channel-weather" title="湖面天气" meta={connectionLabel} onClick={() => openWorldTool('system')}/>
|
||||
</> : <>
|
||||
<LakePool className="channel-primary" title={domainDisplayName(enterpriseEntry?.subject.domain || repoLogin.domain)} meta="本人责任工作域" open={enterpriseWork?.state === 'READY_READ_ONLY_WORK_PROJECTION'} onClick={() => setWorldStage('enterpriseWork')}/>
|
||||
<LakePool className="channel-code" title="私有责任工作仓库" meta={enterpriseWork ? `${enterpriseWork.repository} · 已认证` : userPnccBusy ? '正在接入' : '暂不可用'} onClick={() => void openEnterpriseRepository()}/>
|
||||
<LakePool className="channel-light" title="责任签署状态" meta={enterpriseEntry?.responsibility_receipt?.decision === 'ACCEPT' ? '已接受 · 已留存' : '等待本人确认'} onClick={() => openWorldTool('receipts')}/>
|
||||
<LakePool className="channel-knowledge" title="前往我的频道" meta="接入说明 · 由本人或人格体完成" onClick={() => setWorldStage('personalNodeGuide')}/>
|
||||
<LakePool className="channel-knowledge" title="前往我的频道" meta={personal.identity ? `${personal.identity.channelId} · 本机初始化频道` : '尚未初始化 · 由本人确认建立'} onClick={() => personal.identity ? openWorldTool('knowledge') : setWorldStage('personalNodeGuide')}/>
|
||||
<LakePool className="channel-marketplace" title="分域模块商城" meta="线上成品模块 · 只读思维技能" onClick={openMarketplace}/>
|
||||
<LakePool className="channel-weather" title="湖面天气" meta={connectionLabel} onClick={() => openWorldTool('system')}/>
|
||||
</>}
|
||||
</section>}
|
||||
{worldStage === 'enterpriseWork' && repoLogin.domain !== 'FIFTH_DOMAIN' && <section className="channel-world enterprise-work-world">
|
||||
{worldStage === 'enterpriseWork' && repoLogin.domain !== 'FIFTH_DOMAIN' && repoLogin.domain !== 'PERSONAL_CHANNEL' && <section className="channel-world enterprise-work-world">
|
||||
<button className="world-back" type="button" onClick={() => setWorldStage('channel')}>← 退回光湖频道</button>
|
||||
<div className="world-location"><h1>{domainDisplayName(enterpriseEntry?.subject.domain || repoLogin.domain)}</h1><p>本人责任工作域 · 经零感域光湖频道进入</p></div>
|
||||
<LakePool className="channel-main" title="责任工作总览" meta={`${enterpriseEntry?.subject.name || repoLogin.username} · ${zeroPoint?.userNumber || ''}`} open onClick={() => openWorldTool('receipts')}/>
|
||||
|
|
@ -2283,7 +2328,7 @@ function HoloLakeApp() {
|
|||
<LakePool className="channel-status" title="工作节点状态" meta={enterpriseWork?.state === 'READY_READ_ONLY_WORK_PROJECTION' ? '认证在线 · 禁止跨仓' : '不可用'} onClick={() => openWorldTool('system')}/>
|
||||
{userPnccMessage && <p className="private-route-note">{userPnccMessage}</p>}
|
||||
</section>}
|
||||
{worldStage === 'personalNodeGuide' && repoLogin.domain !== 'FIFTH_DOMAIN' && <section className="channel-world personal-node-guide-world">
|
||||
{worldStage === 'personalNodeGuide' && repoLogin.domain !== 'FIFTH_DOMAIN' && repoLogin.domain !== 'PERSONAL_CHANNEL' && <section className="channel-world personal-node-guide-world">
|
||||
<button className="world-back" type="button" onClick={() => setWorldStage('channel')}>← 退回光湖频道</button>
|
||||
<div className="world-location"><h1>个人节点接入说明</h1><p>零感域 · 本人所有权边界</p></div>
|
||||
<div className="personal-node-guide" role="document" aria-label="团队个人服务器接入说明">
|
||||
|
|
@ -2294,7 +2339,7 @@ function HoloLakeApp() {
|
|||
<li><b>完成所有权握手</b><span>由本人或本人人格体发起签名健康回执;系统核验归属、端点与签名一致后才开放路由。</span></li>
|
||||
<li><b>接入个人频道</b><span>验证通过后,从零感域的光湖频道跳转到本人服务器承载的个人频道;未通过时保持“待接入”。</span></li>
|
||||
</ol>
|
||||
<footer><b>当前状态 · 待本人接入</b><span>可由本人人格体协助执行,但不能替代人类节点所有权确认。</span></footer>
|
||||
{personal.identity ? <footer><b>本机初始化频道 · 已就绪</b><span>{personal.identity.channelId}。这只建立本人账号隔离的本机频道容器,不代表个人服务器所有权握手已经完成。</span></footer> : <form className="team-channel-initializer" onSubmit={(event) => void initializeIdentity(event)}><label htmlFor="team-channel-display-name">初始化本机频道容器</label><p>由本人确认后生成独立频道与人类瞄点的本机唯一标识,并预装光湖知识空间、编号导航、多对话管理、语言频道和时间主控;不会复制冰朔第五域编号或权限。正式编号仍由零感域团队服务派发。</p><input id="team-channel-display-name" maxLength={80} value={displayName} placeholder="请输入显示名称" onChange={(event) => setDisplayName(event.target.value)}/><button className="primary-button" disabled={identityBusy || !displayName.trim()}>{identityBusy ? '正在初始化…' : '确认初始化我的频道'}</button>{identityMessage && <small>{identityMessage}</small>}</form>}
|
||||
</div>
|
||||
</section>}
|
||||
{worldStage === 'heartbeat' && repoLogin.domain === 'FIFTH_DOMAIN' && <PrivateChannelSurface ownerName="冰朔" ownerNumber="ICE-GL∞" knowledgeCount={knowledge.uniqueDocumentCount} onBack={() => setWorldStage('channel')} onMarketplace={openMarketplace} nativeActions={privateNativeActions} installedModules={privateInstalledModules}/>}
|
||||
|
|
@ -2326,7 +2371,7 @@ function HoloLakeApp() {
|
|||
<textarea value={responsibilityNote} maxLength={1000} placeholder="可选:填写责任确认说明" onChange={(event) => setResponsibilityNote(event.target.value)}/>
|
||||
<div className="receipt-actions"><button type="button" disabled={enterpriseReceiptBusy} onClick={() => void submitEnterpriseResponsibility('DECLINE')}>暂不接受</button><button className="primary" type="button" disabled={enterpriseReceiptBusy} onClick={() => void submitEnterpriseResponsibility('ACCEPT')}>接受责任并签署</button></div>{enterpriseReceiptMessage && <p className="receipt-message">{enterpriseReceiptMessage}</p>}
|
||||
</section></div>}
|
||||
{repoLogin.domain === 'FIFTH_DOMAIN' && personal.state !== 'UNAVAILABLE' && !personal.identity && <div className="onboarding-backdrop"><section className="onboarding-card" role="dialog" aria-modal="true"><span className="onboarding-mark">光湖</span><span className="kicker">FIRST LOCAL ENTRY</span><h1>初始化个人频道</h1><p>此设置仅执行一次。知识、代码频道与运行记录将保存在当前设备。</p><form onSubmit={(event) => void initializeIdentity(event)}><label htmlFor="display-name">显示名称</label><input id="display-name" autoFocus maxLength={80} value={displayName} placeholder="请输入显示名称" onChange={(event) => setDisplayName(event.target.value)}/><button className="primary-button" disabled={identityBusy || !displayName.trim()}>完成初始化</button></form>{identityMessage && <p>{identityMessage}</p>}</section></div>}
|
||||
{(repoLogin.domain === 'FIFTH_DOMAIN' || repoLogin.domain === 'PERSONAL_CHANNEL') && personal.state !== 'UNAVAILABLE' && !personal.identity && <div className="onboarding-backdrop"><section className="onboarding-card" role="dialog" aria-modal="true"><span className="onboarding-mark">光湖</span><span className="kicker">FIRST LOCAL ENTRY</span><h1>{repoLogin.domain === 'PERSONAL_CHANNEL' ? '初始化我的频道' : '初始化个人频道'}</h1><p>此设置仅执行一次。系统会生成本账号独立的频道与人类瞄点本机标识,并预装知识空间、编号导航、多对话管理、语言频道和时间主控;正式编号由零感域团队服务另行派发。</p><form onSubmit={(event) => void initializeIdentity(event)}><label htmlFor="display-name">显示名称</label><input id="display-name" autoFocus maxLength={80} value={displayName} placeholder="请输入显示名称" onChange={(event) => setDisplayName(event.target.value)}/><button className="primary-button" disabled={identityBusy || !displayName.trim()}>完成初始化</button></form>{identityMessage && <p>{identityMessage}</p>}</section></div>}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue