Hyperlinkv0.8.0-beta.28

hyperlink-ts

Hyperlink156

Constructors

Spec Fields

constantconstDefine a constant field — a value resolved once when the resource is acquired, surfaced as a plain property (p.x: A, no yield), identical local and remote.effectfunctionTwo-stage effect — override the client-facing type with a Client (an Effect type; a read surfaces as Effect<Success>) that must narrow the schema-derived shape: effect<Client>()(success).effectFnfunctionTwo-stage effectFn — override the client-facing type with a Client that must narrow the schema-derived shape: effectFn<Client>()(payload).fleetconstMark a contract method as a fleet field — one combined across the nodes (its layer impl folds peers + its own value).localconstDeclare a local-only member (see LocalMethod).logStreamLevelconstStamp level onto a tag for Hyperlink.logs stream filtering.logStreamLevelAllconstlogStreamLevelDebugconstlogStreamLevelErrorconstlogStreamLevelInfoconstlogStreamLevelNoneconstlogStreamLevelWarnconstmutatePairfunctionLike effectFn, but the payload must be a 2-tuple schema surfaced as two call arguments (first, second?) — used by custom-queue add(item, level?).refconstDefine a ref field — reactive state surfaced as a Subscribable<A> (get + changes), uniform local and remote.streamfunctionDefine a stream (a live, idempotent push source) whose elements are success.unsafeEffectfunctionTwo-stage effect that lets you override the client-facing type with an unconstrained Client — here an Effect type (a read surfaces as Effect<Success>, not a function): unsafeEffect<Client>()(success).unsafeEffectFnfunctionTwo-stage effectFn that lets you override the client-facing type with an unconstrained Client: unsafeEffectFn<Client>()(payload).withReadinessconstAttach a Readiness derivation to a tag — the seam the node's /health and NodeStatus aggregate over.withStoreconstAttach a public store spec to a resource tag (pipe combinator).

Layers & Serving

Serving

Services

Clients

Transports

Nodes & Fleet

andNodeconstAppend one Node to a Tag's set (C1).distributedconstStamp a discoverable empty Node set (D3) — .pipe(Hyperlink.distributed) ≡ nodes([]).distributedOfconstAlias of nodesOf.fleetHealthconstA fleet fold of successful peer leaf picks keyed by node (plus selfNode).identityconstMark a Tag as identity-claiming (S1): layer / serve claim the resource key at Lookup first — winner runs the local impl; loser becomes a client of the winner's endpoint.kindconstThe kind stamped on a bare Hyperlink.Tag that declares none — every resource tag carries a kind, and a plain resource's is this.nodeKindOfconstThe declared ProtocolKind of the Node a tag is bound to (how a client reaches it — Http/WebSocket/IpcSocket), or undefined for a nodeless/bare tag or a node with no declared kind.nodesconstStamp a Tag's Node set (C1) — overwrites.nodesOfconstRead a Tag's Node set (C1), or [] when undeclared.peersconstThe resource's peer clients — the OTHER nodes' full services, keyed by node — for a resource's own cross-node logic.peersFromconstProvide the peers capability from an explicit client map — for a holder that already holds the per-node clients (a dashboard's per-node bundles), or for a test.peersLayerconstProvide the peers capability on this node: connect every OTHER node in the tag's distributed / nodes set and expose them as the peer clients.selfNodeconstThe node key this instance runs as — the same key its peers are keyed by.selfNodeLayerconstProvide the selfNode capability on this node — the node key this instance runs as.

Models

AnyLocalMethodtypeAny LocalMethod, erased.AnyMethodtypeAny Method, erased — the element type of a Spec.BareLocalinterfaceThe bare local marker — Hyperlink.local used without ().BuiltHyperlinkinterfaceA resource impl before worker-context discharge — the impl still carries requirement R on its Effect methods, paired with the Context.Context captured at build time.ClientVerifyErrortypeErrors default-on / deep client verify may surface on addressed client Layers.ClientVerifyModetypeDefault-on verify mode for addressed client / clientHttp / socketClient.ConstantFieldtypeA Method marked as a constant field (via constant) — resolved once at acquire, surfaced as a plain value.DecodedtypeA schema's decoded value type (.Type), prettified — { to: string }, not the Schema.Struct.ReadonlySide<…> alias, and with the schema's readonly dropped.DiscoverClientOptionstypeOptions for discoverClient / discoverClients — Lookup soft-pick plus default-lookup bootstrap knobs.FleetFieldtypeA Method marked as a fleet field (via fleet) — combined across the nodes (in the layer via peers); served + client-visible like any query, but excluded from peers.FromLocalMethodinterfaceA fromService local member as it sits in the resolved spec: a LocalMethod that additionally carries the service interface's member type M, so ServiceOf surfaces it via InjectLocal (its own Effect/function + Local) instead of the value-obtain LocalEffect a plain local<T>() gets.Hyperlinktypeyield Tag — mirrors Effect.EffectEffect.Effect.HyperlinkInstanceinterfaceOne instance of a factory paired with its implementation — the element of Hyperlink.serveInstances.HyperlinkTaginterfaceThe type of a resource tag carrying spec S — what Hyperlink.Tag / a Hyperlink.tagFor factory produce (and what you extend).ImplOftypeThe implementation a localLayer / serve expects: wire members are their Effect/Stream/function, and each LocalMethod is its raw value T (the toolkit wraps it to require the Local).InjectLocaltypeInject the Local capability into a service member's requirement channel — how a fromService local member surfaces.LocalinterfaceGranted only by a resource's local layer (Hyperlink.layer / serve) — never by Hyperlink.client.LocalEffecttypeA local-only member as surfaced in ServiceOf — Effect requiring Local to obtain the value.LocalMethodinterfaceA local-only member of a resource contract — built by Hyperlink.local.LocalNeedsTypeinterfaceThe error surface a bare local resolves to when the service interface has no member at that key — a required, unsatisfiable field, so the whole contract argument fails to type-check at the call.LocalShapetypeShapeOf with Local stripped from local-member effects — for callers that already hold the local layer.LocalShapeOftypeShape with Local stripped from local-member effects.LookupClientOptionstypeOptions for lookupClient — opt-in soft pick when the directory is ambiguous and placement advice is absent or stale.LookupClientPicktypeSoft pick when lookupClient sees N&gt;1 directory rows (D4) and no live Lookup.Advice prefer matches a row.MethodinterfaceOne method of a resource contract — built by effect / effectFn / Hyperlink.stream.MethodAnnotationsinterfaceTool metadata attached to a method via Method.annotate — the Effect annotation idiom.MethodKindtypeHow a method behaves, for tools (CLI/TUI/dashboard) — explicit, never inferred; encoded by the constructor used (effect vs effectFn): - query — an idempotent read (CLI prints it, dashboard reads it as an Atom); - mutate — a mutation (CLI confirms, dashboard calls it as runtime.fn).MethodMetainterfaceThe resolved tool metadata for one method — what CLI/TUI/dashboard read to render it.MonitoredDependencyinterfaceSpec + readiness from monitoredDependency.MonitoredDependencyOptionsinterfaceAuthoring options for monitoredDependency.MonitoredDependencyServiceinterfaceThe service slice monitoredDependency readiness reads — status only.MonitoredDependencySpectypeWire spec for a monitoredDependency — status effect + changes stream.NodeBoundTaginterfaceA HyperlinkTag bound to a concrete Node — its [nodeSym] narrowed to that node's NodeKey<HSelf>, which is how Hyperlink.client discriminates the node-aware path.NodeTagFactoryinterfaceA node-bearing tagFor factory: every instance it makes carries the family's Node, so each is a node-bearing tag (Hyperlink.client resolves the transport from it).Oftypeyield Tag inferred from the tag identifier — Hyperlink.Of<Counter>.ProvidedContexttypeRemove the requirement channel R from every Effect method in an impl shape — the per-method-precise result of provideContext.ReadinessinterfaceA resource's readiness — derived from its own status (its single source of truth), aggregated into a node's /health and NodeStatus.ReadinessOftypeDerive Readiness from a resource's materialized service — read its status, don't store new state.RefFieldtypeA Method marked as a ref field (via ref) — surfaces as a Subscribable.ResolveLocalstypeResolve a fromService contract C into a runnable Spec: each bare local becomes a FromLocalMethod carrying the service interface's type at that key, so the impl (ImplOf) and service (ServiceOf) both derive from I.ServedHyperlinkinterfaceOne served resource's registry entry — its group (folded into the shared server), wire id, kind, and readiness derivation.ServedHyperlinksclassThe served-resources registry — an accumulator serve appends to and httpServer reads.ServeImplOftypeThe implementation serve expects — the tag's wire members, whose handlers may share a run-time requirement R.ServeMethodtypeA serve handler for one wire method — like ServiceMethod, but the handler may carry a run-time requirement R (a dependency it yields), which serve preserves so a per-resource Layer.provide can discharge it in isolation.ServeRequirementstypeThe union of every handler's run-time requirement R in a serve impl — extracted from the impl value (not a mapped-type parameter), so serve can infer it.ServiceOftypeThe full service interface inferred from a Spec.ShapetypeMaterialized service shape for tag T — Hyperlink.Shape<Test> ≡ Test["Service"].ShapeOftypeMaterialized service shape from a Spec — Hyperlink.ShapeOf<typeof mySpec, MyTag>.SpecinterfaceA resource contract: method name → wire Method or off-wire LocalMethod.SpecOftypeRecover the (possibly nested) Spec a tag was built from — for annotating an extracted impl without hand-threading it: obj satisfies ImplOf<SpecOf<typeof MyTag>>.SubscribableinterfaceA read-only reactive value: its current value (Subscribable.get, an Effect) plus a stream of every change (Subscribable.changes).TagFactoryinterfaceA tagFor factory: <Self>(key) => tag, plus the shared family metadata (groupId / description / spec / group) that serveInstances reads without an instance.TagHandlerstypeA partial set of per-_tag handlers over a tagged-event union — the handler-map form of Hyperlink.runForEachTag.ValidatetypeValidate a fromService contract C against its service interface I: a bare local at a key absent from I (or with no I at all) becomes a LocalNeedsType error the user's value can't satisfy, so the contract argument is rejected at the call site.WiretypeWire-only ServiceOf — local members stripped.WireMismatchinterfaceThe error surface a wired fromService member resolves to when its success schema disagrees with the service interface at that key — rejected at the call, naming the key.WireOftypeWire-only Shape for tag T.WireShapetypeWire-only ShapeOf — local members removed entirely.WithRequirementtypeAdd Req to the requirement channel of every Effect method in an impl shape — the inverse of ProvidedContext, and a parameterized cousin of Store.AddStorageReq.

Reactivity

Introspection

Guards

Errors

DuplicateGroupIdclassTwo resources declared the same group id (the wire prefix) — they'd collide on a shared RpcServer.DuplicateHyperlinkKeyclassTwo resources declared the same instance key.DuplicateInstanceclassAn instance was passed to Hyperlink.serveInstances more than once.EffectFnMissingPayloadclasseffectFn was called without a payload — inputless members belong on effect.IdentityMultiNodeclassIdentity-stamped Tags may carry at most one Node (S1).IdentitySelfRequiredclassIdentity-claiming resources need Lookup's Identity client and a dialable Node — Tag-bound (nodes / { node }) and/or the ListenNode from Node.unix / Node.http / Node.ws (including minted address-less Nodes).InstanceRoutingErrorclassA family request reached the server with no routable instance key header — a protocol-level fault (the contract was satisfied), surfaced as a defect.LocalOnlyMethodclassA Hyperlink.local (local-only) method was reached through a client.LookupClientErrorclasslookupClient could not resolve exactly one dial target for the Tag (missing = none; ambiguous = more than one directory row and no LookupClientOptions.pick).MissingClientProtocolclassA nodeless Hyperlink.client(tag) was built with no ambient RpcClient.Protocol.MissingContractMethodclassA contract method was absent from the generated RPC client — a wiring bug (the group and client derive from the same spec, so this should be unreachable).ProtocolMismatchclassAn RPC call failed with a signature that means the client transport doesn't match the server (classic: http client → WebSocket server → Effect's "empty HTTP response" defect).

Types

Functions & Values