Hyperlink156
Constructors
builtHyperlinkconstPair a pre-provide impl with the worker context captured at build time.contractconstNarrow a resource contract object through the builder (prefer over as const satisfies).fromServiceconstBuild a resource tag from an existing service interface as the single source of truth.grantLocalconstDischarge a BuiltHyperlink's captured worker context into every Effect method — yields the R-free ImplOf shape for layer / the local grant in serve.instanceconstPair a factory instance tag with its implementation, for Hyperlink.serveInstances.makefunctionAnchor a reusable impl to its contract at the definition site.monitoredDependencyconstBuild the common monitored dependency contract: status (one-shot read), changes (live snapshot stream), and readiness derived from status.TagconstCreate a resource service tag from a Spec.tagForfunctionBuild a factory tag-maker that bakes a shared Spec once under a groupId: every instance shares the same contract + RPC group, and callers never pass the spec — only an instance key.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
provideconstProvide one dependency Layer to several serve layers at once — sugar for Layer.mergeAll(resources).pipe(Layer.provide(dependency)).provideContextconstProvide a Context.Context to every Effect method of an impl — the one-liner that replaces a repetitive per-method Effect.provideContext(...) wrapping.serveconstExpose a Tag's implementation as an RPC server layer — the served counterpart of layer.servedHyperlinksLayerconstA fresh ServedHyperlinks registry.serveInstancesconstThe family server layer: serve many instances of one factory behind a single contract group, dispatching each request to the right instance by the per-call key header.serveRemoteconstA resource's served-only handler layer — mounts the tag's group handlers (wire members only, no local grant), with the handlers' requirement R preserved (not erased).storefunctionRegister a Node on an app Store.Service — node-wide durable log journal (match-all follower).verifyConnectionfunctionVerify a node is reachable, eagerly — a fail-fast startup check for a remote Node.Services
Clients
clientfunctionThe client layer for a resource: drive it over RPC as if it were local — the exact same yield Tag code as the local layer, only the provided layer differs, so it doesn't matter where the resource actually runs.clientHttpfunctionThe single-resource client mirror of httpServer.clientInstancesconstThe client layer for many instances of one factory, sharing a single RPC client — the client mirror of Hyperlink.serveInstances.connectconstDial a resource tag over a transport you provide — the no-batteries client.discoverClientconstSugar: lookupClient + Lookup.layer / Lookup.layerOptions — discover an endpoint for tag via Lookup (identity, then directory) and dial it.discoverClientsfunctiondiscoverClient for many tags — one Lookup bootstrap, then Layer.mergeAll of each lookupClient.httpconstWire a Node's transport over http — the server/CLI/backend case.lookupClientconstLookup-resolved nodeless client (D7/D4) — you do not pass a Node; Lookup chooses the dial target.nPipeconstDial a Node over a Windows named pipe — the client sibling of Node.nPipe.unixconstPer-node ipc shortcut — connect + protocolIpc (same-machine Unix socket).wsconstWire a Node's transport over a WebSocket — the browser counterpart to http.Transports
clientHostconstThe default host a bare-port client shorthand resolves against — an Effect Config (EFFECT_PM_CLIENT_HOST) defaulting to "localhost".layerPeerProtocolconstSet the wire a fleet's peers mesh dials on — the (url) => Layer<RpcClient.Protocol> builder (protocolHttp by default, or protocolWebsocket).layerProtocolconstThe standard way to set the RPC client transport: hand it any RpcClient.Protocol layer and it becomes the ambient transport that every nodeless Hyperlink.client — and each node's peers fold — reads.protocolHttpconstBuild an http client Protocol (Fetch + ndjson serialization) for an endpoint — the value you hand layerProtocol or connect.protocolIpcconstBuild an ipc client Protocol — Effect socket RPC over a Unix-domain path (NodeSocket.layerNet({ path })).protocolWebsocketconstBuild a WebSocket client Protocol (one multiplexed connection + ndjson) for one endpoint url (default "/rpc").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>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
mapEffectsconstThe generic impl-transform primitive — the Hyperlink counterpart to Store.mapEffects.mapSubscribableconstDerive a Subscribable from another by mapping both its current value and its changes — one source of truth feeds every view (a queue's size/isEmpty from its status).runForEachTagconstConsume a tagged-event Stream, dispatching each element to a handler by its _tag — the stream-native replacement for lifecycle callbacks (one off-fiber consumer, not a fiber per item).runForEachTagScopedconstLike runForEachTag, but non-blocking: it forks the consumer into the enclosing Scope (Effect.forkScoped) and hands back the Fiber, instead of running the stream to completion.subscribableconstBuild a Subscribable view over a SubscriptionRef — the impl side of a ref field: the impl owns the ref (writes it), consumers get read + observe.Introspection
Guards
isBuiltHyperlinkconstTrue when u is a BuiltHyperlink bundle.isEffectconstTrue when a wire member was built with effect (no payload schema) — including unit run gates and value reads.isIdentityconstTrue when tag was piped through identity.isVoidCommandconstTrue when a spec member is an inputless void command (Hyperlink.effect(Schema.Void)), as opposed to an inputless value read (Hyperlink.effect with a non-void success).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
nodeKindsOfconstThe full set of ProtocolKinds a tag's Node speaks — every transport in its endpoints set (a multi-protocol node has several), or its single primary kind, or [] for a nodeless/bare tag.servedKeyOfconstThe served tag's key stamped on a serve layer, or undefined.servedKeySymconstStamped on a serve layer with the served tag's key — lets an anonymous listen derive a legible node name from the first resource it serves without building the layer.