/*! For license information please see 9804.32565c40.js.LICENSE.txt */
"use strict";(self.webpackChunkfeno_web=self.webpackChunkfeno_web||[]).push([["9804"],{32631(e,t,s){s.r(t),s.d(t,{KnowledgeDetail:()=>S});var a=s(10199),r=s(90063),n=s(56543),l=s(56574),o=s(69650),i=s(10576),c=s(96334),d=s(85604),x=s(45047),h=s(80457),m=s(31286),p=s(66564),v=s(92768),f=s(17342),u=s(69540),b=s(39069),g=s(54910),j=s(80817),y=s(44541),k=s(7695);let w=(0,r.lazy)(()=>Promise.resolve().then(s.bind(s,90218)).then(e=>({default:e.MonacoPreview}))),N=[{id:"doc-1",title:"Pair protocol — v6",cwd:"~/codes/feno-core/docs/pair-protocol-v6.md",tags:["protocol","mesh","security"],lines:642,updated:"12 min ago",selected:!0},{id:"doc-2",title:"Tunnel envelope reference",cwd:"~/codes/feno-core/docs/tunnel-protocol.md",tags:["protocol","transport"],lines:388,updated:"2 hours ago"},{id:"doc-3",title:"AskUserQuestion lifecycle",cwd:"~/codes/feno-core/docs/agent-transport-channels.md",tags:["agent","acp"],lines:271,updated:"yesterday"}],A=`# Pair protocol — v5

> Status: STABLE \xb7 Last reviewed 2026-04-21

## Overview

The pair protocol establishes an end-to-end encrypted channel between two
Feno nodes ("initiator" and "responder") that have never met before. The
flow runs over the relay or, when both nodes share a network, directly via
mDNS-discovered transport.

The handshake produces:

- A **mesh identity binding**: a long-lived Curve25519 keypair authenticated
  by a short-lived QR-encoded one-time secret.
- A **session root**: 256-bit symmetric key used to derive per-channel keys
  via HKDF.
- A **trust record**: stored locally in each node's keychain; shared during
  multi-device sync.

## Sequence

1. Initiator generates a fresh ephemeral X25519 keypair \`(eᵢ, Eᵢ)\`.
2. Responder, on QR scan, recovers the one-time secret \`s\`.
3. Both sides compute \`shared = X25519(eᵢ, Eᵣ)\` and derive

       k_root = HKDF(salt = s, ikm = shared, info = "feno/pair/v5/root")
       k_send = HKDF(salt = k_root, info = "send")
       k_recv = HKDF(salt = k_root, info = "recv")

4. The first ciphertext is a **commitment frame** binding both static
   keys; rejection is fatal — the secret is treated as compromised.

## Compatibility

| version | status      | notes                                  |
|--------:|:------------|:---------------------------------------|
| v3      | deprecated  | no replay window                       |
| v4      | sunset      | drops on cluster restart, end-of-life Q3 |
| v5      | stable      | adds replay window + commitment frame  |

## Security boundaries

- The relay sees only opaque ciphertext.
- The QR secret has a 4-minute lifetime; expired secrets are rejected.
- Replay window: 30 seconds, rotated on each frame.

> Implementations MUST reject the commitment frame if the responder's
> static key fingerprint differs from the QR-bound fingerprint.
`;function S(){let{theme:e}=(0,j.D)(),[t,s]=(0,r.useState)("doc-1"),S=N.find(e=>e.id===t)??N[0];return(0,a.jsxs)("div",{className:"flex h-full w-full bg-[var(--color-bg)]",children:[(0,a.jsx)(u.B,{selectedRoute:"knowledge",starredSessions:g.qW,sessions:g.Gg}),(0,a.jsxs)("main",{className:"flex min-w-0 flex-1 flex-col",children:[(0,a.jsx)(u.c,{tabs:[{id:"knowledge",title:"Knowledge",closable:!1}],activeTabId:"knowledge"}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[(0,a.jsxs)("aside",{className:"w-[320px] shrink-0 border-r border-[var(--color-border)] bg-[var(--color-bg-subtle)]",children:[(0,a.jsxs)("div",{className:"px-4 pt-4 pb-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-2xs)] uppercase tracking-wider text-[var(--color-text-faint)]",children:"Knowledge"}),(0,a.jsx)(b.Su,{icon:l.A,label:"Add document",size:"xs",tone:"accent"})]}),(0,a.jsx)("h1",{className:"mt-1 text-[length:var(--text-xl)] font-semibold tracking-tighter text-[var(--color-text)]",children:"Documents"}),(0,a.jsxs)("div",{className:"mt-3 flex h-8 items-center gap-2 rounded-md border border-[var(--color-border)] bg-[var(--color-surface)] px-2.5 focus-within:border-[var(--color-border-focus)]",children:[(0,a.jsx)(b.In,{as:o.A,size:12,className:"text-[var(--color-text-muted)]"}),(0,a.jsx)("input",{placeholder:"Search documents…",className:"flex-1 bg-transparent text-[length:var(--text-xs)] text-[var(--color-text)] placeholder:text-[var(--color-text-muted)] focus:outline-none"}),(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-2xs)] text-[var(--color-text-faint)]",children:"⌘K"})]})]}),(0,a.jsx)("ul",{className:"flex flex-col gap-px px-2 pb-4",children:N.map(e=>{let r=e.id===t;return(0,a.jsx)(n.P.li,{variants:k.Qu,initial:"hidden",animate:"visible",children:(0,a.jsxs)("button",{type:"button",onClick:()=>s(e.id),className:(0,y.cn)("group relative flex w-full flex-col gap-1 rounded-md px-3 py-2.5 text-left transition-colors duration-150",r?"bg-[var(--color-surface-active)]":"hover:bg-[var(--color-surface-hover)]"),children:[r&&(0,a.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute left-0 top-2.5 bottom-2.5 w-[2px] rounded-r-sm bg-[var(--color-text)]"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(b.In,{as:i.A,size:12,className:(0,y.cn)(r?"text-[var(--color-text)]":"text-[var(--color-text-muted)]")}),(0,a.jsx)("span",{className:"truncate text-[length:var(--text-sm)] font-medium text-[var(--color-text)]",children:e.title}),(0,a.jsxs)("span",{className:"ml-auto shrink-0 font-mono text-[length:var(--text-2xs)] text-[var(--color-text-faint)] tabular-nums",children:[e.lines,"L"]})]}),(0,a.jsx)("div",{className:"truncate font-mono text-[length:var(--text-2xs)] text-[var(--color-text-muted)]",children:e.cwd}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:e.tags.map(e=>(0,a.jsx)(b.ab,{size:"xs",variant:"neutral",asSpan:!0,icon:c.A,children:e},e))})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col bg-[var(--color-bg)]",children:[(0,a.jsxs)("header",{className:"flex shrink-0 items-start justify-between gap-3 border-b border-[var(--color-border)] px-6 py-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-2xs)] uppercase tracking-wider text-[var(--color-text-faint)]",children:"Doc \xb7 markdown"}),(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-2xs)] text-[var(--color-text-faint)]",children:"\xb7"}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[length:var(--text-2xs)] text-[var(--color-text-muted)]",children:[(0,a.jsx)(b.In,{as:d.A,size:11}),"updated ",S.updated]})]}),(0,a.jsx)("h2",{className:"mt-1 truncate text-[length:var(--text-xl)] font-semibold tracking-tighter text-[var(--color-text)]",children:S.title}),(0,a.jsx)("div",{className:"mt-1 truncate font-mono text-[length:var(--text-xs)] text-[var(--color-text-muted)]",children:S.cwd})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[(0,a.jsx)(b.ab,{size:"sm",variant:"accent",asSpan:!0,icon:x.A,children:"ask Claude"}),(0,a.jsx)(b.Su,{icon:h.A,label:"Copy",size:"md"}),(0,a.jsx)(b.Su,{icon:m.A,label:"Edit",size:"md"}),(0,a.jsx)(b.Su,{icon:p.A,label:"Open externally",size:"md"})]})]}),(0,a.jsx)(n.P.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:k.kY.in,className:"flex shrink-0 items-stretch divide-x divide-[var(--color-border)] border-b border-[var(--color-border)] bg-[var(--color-bg-subtle)]",children:[["Lines",String(S.lines),c.A],["Sections","7",v.A],["Words","2,184",f.A],["References","14",i.A]].map(e=>{let[t,s,r]=e;return(0,a.jsxs)("div",{className:"flex flex-1 items-center gap-3 px-5 py-2.5",children:[(0,a.jsx)(b.In,{as:r,size:14,className:"text-[var(--color-text-muted)]"}),(0,a.jsxs)("div",{className:"flex flex-col leading-tight",children:[(0,a.jsx)("span",{className:"text-[length:var(--text-2xs)] uppercase tracking-wider text-[var(--color-text-muted)]",children:t}),(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-md)] tabular-nums text-[var(--color-text)]",children:s})]})]},t)})}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden",children:(0,a.jsx)(b.Zp,{padding:"none",className:"m-4 h-[calc(100%-32px)] overflow-hidden",children:(0,a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between border-b border-[var(--color-border)] bg-[var(--color-bg-subtle)] px-3 py-1.5",children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-[var(--color-success)]"}),(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-2xs)] text-[var(--color-text-muted)]",children:S.cwd.split("/").slice(-1)[0]})]}),(0,a.jsx)("span",{className:"font-mono text-[length:var(--text-2xs)] uppercase tracking-wider text-[var(--color-text-faint)]",children:"read-only \xb7 markdown"})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1",children:(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("div",{className:"flex h-full items-center justify-center text-[length:var(--text-sm)] text-[var(--color-text-muted)]",children:"Loading editor…"}),children:(0,a.jsx)(w,{value:A,language:"markdown",theme:"dark"===e?"feno-dark":"feno-light"})})})]})})})]})]})]})]})}},85604(e,t,s){s.d(t,{A:()=>a});let a=(0,s(16994).A)("calendar-days",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]])},92768(e,t,s){s.d(t,{A:()=>a});let a=(0,s(16994).A)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])}}]);