notes
All repositories: gitoria
2.6 KB
\* hl:data — NEED EVALUATION, the one implementation every realm edge uses.A component's need is a member whose initializer calls a provider class(SPEC.md §9.2); the graph publishes each as { key, provider, method, args,project }. Evaluating one is: resolve the arguments against the caller'scontext — a folded constant, a route group's member, or a `session`field — call the provider method, and take the projected field. hl:web didthis per request and per push; hl:ipc does it per peer push. It lived inhl:web until the second edge existed (2026-09-01), which is when "shared"stopped being a word and became this plugin. *\\* Every need of one component, against the provider instances of the callingedge. One memo per evaluation: two needs fed by the same call cost ONE call. *\runNeeds(Hybrid needs \\ the graph's need list for the component&providers \\ class name → provider instance (the edge module's)¶ms \\ route groups; {} for a peer that matched no route&sdata \\ the session bag; {} for a peer with no session) {let out = {}let memo = {}for (need of needs) {out[need.key] = runNeed(&need, &providers, ¶ms, &sdata, &memo)}return out}\* One need: the value its MEMBER holds. `need.project` is the field taken offthe returned hybrid ("" = the member IS the return value). A provider readanswers for null arguments (the 074 contract), so an anonymous callerevaluates the same needs and simply sees nothing of anyone. *\runNeed(&need, &providers, ¶ms, &sdata, &memo) {let provider = providers[need.provider]if (provider == null) {return null}let args = []for (a of need.args) {if (a.group != null) {args[] = params[a.group]} else if (a.session != null) {if (a.session.length == 0) {args[] = sdata} else {args[] = sdata[a.session]}} else {args[] = a.value}}let ck = need.provider + "." + need.method + "(" + JSON.stringify(args) + ")"// a call that ANSWERED null is simply not memoized — repeating it is correctlet result = memo[ck]if (result == null) {result = callProvider(&provider, need.method, &args)memo[ck] = result}if (need.project.length == 0) {return result}if (result == null) {return null}return result[need.project]}// The provider call itself — the method name is DATA, so the call is computed.callProvider(&provider, method, &args) {if (args.length == 0) {return provider[method]()}if (args.length == 1) {return provider[method](args[0])}if (args.length == 2) {return provider[method](args[0], args[1])}return provider[method](args[0], args[1], args[2])}
Branches
Latest commits
- 4dd46dadsync-components: copy icons/icons.hl + README (F4); testsmre
- c92e4a0ftests/e2e-outside.mjs: real-Chrome E2E, a note pushed from another device while open, then typingmre
- 0516b4ccmd-editor.hl: verbatim copy of components f3-mdvalue (an older text handed back is kept)mre
- 38cc11ecmd-editor.hl: verbatim copy of components f3-mdvalue (an outside value change is shown by the editor)mre
- 3e7e79f5reports/H1-hydrate.mdmre
- d98775e8tests/browser.mjs: wait for hydration before the clicks after a goto('/') (tables new note, phone sidebar)mre
- 1f3198b6tests/cdp.mjs: HL_CPU_THROTTLE=<rate> optional CPU throttling for gate runsmre
- 39cf9fdfre-vendor Hybriel 5406d146 (hl:web batches 9+10: #72 emits while the socket is closed delivered after reconnect, browser boot linear, faster list appends; contains int 6–14 + m406)mre
- db07aa84tests: short-id-switch ports from env (NOTES_SWITCH_IDENT_PORT/_PORT), defaults unchangedmre
- ef9f9feere-vendor Hybriel 6f8a0689 (int 6–11: streaming cursors, #203 index heal + close() fix, fd403 listDir/cursor fds, hl:time browser side, hl:web batches 5+6)mre
- 5485467cdocker-compose: nofile 65536 (Hybriel int 6+ boot opened >1024 files in the tracker)mre
- 86ea4a85deploy: backup copies index files first and *.mpack data last (hot-copy skew, hybriel #203)mre
- edeab20fnotes mission 015: mission, report, LOG, STATUSmre
- 542a0383notes mission 015: e2e-chrome E2E_HOST (own cookie jar in the shared Chrome)mre
- 8b30f510notes mission 015: main-menu from layouts 0bcc629, current = true kept (route marks only /), server-HTML marker checksmre
- 84b574c4notes mission 015: re-vendor plugins from hybriel f9614007 (incl. web, #117)mre
- 447da53dnotes mission 014: report — remaining gates and lisbeth E2E proofmre
- fd9f92c3notes mission 014: report (partial), LOG, STATUSmre
- b2501360notes mission 014: open() sets asking=false before flush(0) (hybriel#196)mre
- 9414ce59notes mission 014: merge theme 76f99f6, components 3794c59, strict single-press openAsk (fails on old open())mre