feat: compile GLS protocols into native runtime guards
This commit is contained in:
parent
96769846ac
commit
d6b1290e1c
13 changed files with 1909 additions and 6 deletions
|
|
@ -69,6 +69,31 @@ interface DevelopmentWriteLaneStatus {
|
|||
acquiredAtUnixMs?: number
|
||||
observedAtUnixMs: number
|
||||
}
|
||||
interface ZeroCoreNumberingKernelSnapshot {
|
||||
state: string
|
||||
authorityMapId: string
|
||||
authorityMapVersion: string
|
||||
authorityMapState: string
|
||||
sourceCommit: string
|
||||
sourcePath: string
|
||||
humanRouteNamespaces: string[]
|
||||
numberShapeIsAuthority: boolean
|
||||
automaticIdentityIssuance: boolean
|
||||
unknownNumber: string
|
||||
}
|
||||
interface GlsProtocolRuntimeSnapshot {
|
||||
state: string
|
||||
sourceRepository: string
|
||||
sourceCommit: string
|
||||
sourceRoot: string
|
||||
protocolCount: number
|
||||
executableProjectionCount: number
|
||||
inventoriedNotExecutableCount: number
|
||||
activeAdapters: string[]
|
||||
rawProtocolTextExecuted: boolean
|
||||
arbitraryProtocolCodeAllowed: boolean
|
||||
unprojectedProtocolBehavior: string
|
||||
}
|
||||
interface PersonalChannelIdentity { humanSubjectId: string; displayName: string; channelId: string; createdAtUnixMs: number }
|
||||
interface PersonalChannelModule { moduleId: string; kind: string; displayName: string; state: string; installedAtUnixMs: number; timeZone: string; calendarName: string; clockVerification: string }
|
||||
interface LoginSession { username: string; host: string; domain: string; signedInAtUnixMs: number }
|
||||
|
|
@ -581,6 +606,8 @@ function HoloLakeApp() {
|
|||
const [serverPnccBusy, setServerPnccBusy] = useState(false)
|
||||
const [serverPnccReadback, setServerPnccReadback] = useState<'WAITING' | 'LIVE' | 'UNAVAILABLE'>('WAITING')
|
||||
const [developmentLane, setDevelopmentLane] = useState<DevelopmentWriteLaneStatus | null>(null)
|
||||
const [numberingKernel, setNumberingKernel] = useState<ZeroCoreNumberingKernelSnapshot | null>(null)
|
||||
const [glsRuntime, setGlsRuntime] = useState<GlsProtocolRuntimeSnapshot | null>(null)
|
||||
const [enterpriseEntry, setEnterpriseEntry] = useState<EnterpriseEntry | null>(null)
|
||||
const [enterpriseEntryBusy, setEnterpriseEntryBusy] = useState(false)
|
||||
const [enterpriseReceiptBusy, setEnterpriseReceiptBusy] = useState(false)
|
||||
|
|
@ -609,13 +636,15 @@ function HoloLakeApp() {
|
|||
setBeijingCoordinate(startup.coordinate)
|
||||
} catch { /* 联网失败时其余首页能力仍可启动。 */ }
|
||||
const localAccountId = getOrCreateLocalId('hololake-local-account', 'human-local')
|
||||
const [homeResult, personalResult, knowledgeResult, codeResult, eraResult, developmentResult] = await Promise.allSettled([
|
||||
const [homeResult, personalResult, knowledgeResult, codeResult, eraResult, developmentResult, numberingResult, glsRuntimeResult] = await Promise.allSettled([
|
||||
invoke<HomeStatus>('get_hololake_home_status'),
|
||||
invoke<PersonalChannelSnapshot>('get_personal_channel_snapshot'),
|
||||
invoke<KnowledgeSnapshot>('get_knowledge_snapshot'),
|
||||
invoke<CodeChannelSnapshot>('get_code_channel_snapshot'),
|
||||
invoke<GuanghuEraTimeline>('get_guanghu_era_timeline'),
|
||||
invoke<DevelopmentWriteLaneStatus>('inspect_development_write_lane', { input: { accountId: localAccountId } }),
|
||||
invoke<ZeroCoreNumberingKernelSnapshot>('get_zero_core_numbering_kernel'),
|
||||
invoke<GlsProtocolRuntimeSnapshot>('get_gls_protocol_runtime'),
|
||||
])
|
||||
if (homeResult.status === 'fulfilled') setStatus(homeResult.value)
|
||||
if (personalResult.status === 'fulfilled') setPersonal(personalResult.value)
|
||||
|
|
@ -626,6 +655,8 @@ function HoloLakeApp() {
|
|||
setBeijingCoordinate(eraResult.value.currentCoordinate)
|
||||
}
|
||||
setDevelopmentLane(developmentResult.status === 'fulfilled' ? developmentResult.value : null)
|
||||
setNumberingKernel(numberingResult.status === 'fulfilled' ? numberingResult.value : null)
|
||||
setGlsRuntime(glsRuntimeResult.status === 'fulfilled' ? glsRuntimeResult.value : null)
|
||||
}, [])
|
||||
const loadReceipts = useCallback(async () => {
|
||||
try {
|
||||
|
|
@ -1333,6 +1364,8 @@ function HoloLakeApp() {
|
|||
<button className="secondary-button" type="button" disabled={serverPnccBusy} onClick={() => void refreshServerPncc()}>{serverPnccBusy ? '正在读取…' : '重新读取主控状态'}</button>
|
||||
</section>
|
||||
<section className="plain-panel"><header><div><h2>本机 GH-PNCC 投影</h2><p>本机仓库挂载、开发写入通道与读取回执来自同一运行事件流。</p></div></header><dl className="evidence-list"><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' ? '开发执行环境已由 HoloLake 持有单写通道' : status.codeRepositoryMountCount > 0 && status.pnccReceiptCount > 0 ? '已有可核验运行记录' : '接口已接入,尚无完整运行记录'}</dd></div></dl></section>
|
||||
<section className="plain-panel"><header><div><h2>GLS 协议运行层</h2><p>正本先编译为机器合同;只有已经登记确定性适配器的协议进入执行集。</p></div><span className={glsRuntime?.state === 'ACTIVE_EXPLICIT_PROJECTIONS_ONLY' ? 'status-chip online' : 'status-chip'}>{glsRuntime ? '原生注册表已加载' : '失败关闭'}</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.protocolCount}</dd></div><div><dt>当前工程执行</dt><dd>{glsRuntime.executableProjectionCount}</dd></div><div><dt>已收录待工程化</dt><dd>{glsRuntime.inventoriedNotExecutableCount}</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>零点原核编号内核</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>
|
||||
<section className="plain-panel">
|
||||
<header><div><h2>用户编号验证</h2><p>用户编号必须通过登记服务验证。验证结果不构成人格绑定、模型载体绑定或执行授权。</p></div><span className={zeroPoint?.route === 'verified' ? 'status-chip online' : 'status-chip'}>{zeroPoint ? (zeroPoint.route === 'verified' ? '验证有效' : '功能受限') : '正在读取'}</span></header>
|
||||
<dl className="evidence-list">
|
||||
|
|
|
|||
Loading…
Reference in a new issue