Give every workspace a README describing what it does, its entry points, and a short usage example, and link them from the root package table. Frame Tailshare in the root README as the application the libraries exist to be composed into, with the other apps as development and testing surfaces. Its own README records what works today and what the open issues intend for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@webnet/taildrive
Taildrive peer discovery, WebDAV client helpers, and a server-side bridge, built on @webnet/webdav.
Taildrive exposes a WebDAV endpoint (/v0/drive) over each Tailscale node's peerapi. On the client side, listDrivePeersWithShares lists an IpnClient's Taildrive peers (via IPN.listDrivePeers) and probes each one over WebDAV, filtering out peers that are unreachable or export no shares; createTaildriveClient returns a @webnet/webdav DAVClient for a given peer, dialing through the IPN's dial/dialTLS methods rather than a real network socket. On the server side, bridgeDriveHandler adapts a @webnet/http Handler into the RawDriveHandler shape IPN.serveDrive expects, translating between the wasm bridge's request/response objects and @webnet/http's Context.
Entry points
| Entry point | Description |
|---|---|
@webnet/taildrive |
Re-exports both ./client and ./server. |
@webnet/taildrive/client |
createTaildriveClient, listDrivePeersWithShares. |
@webnet/taildrive/server |
bridgeDriveHandler. |
Usage
import { listDrivePeersWithShares, createTaildriveClient } from "@webnet/taildrive/client"
import type { IpnClient } from "@webnet/tsconnect"
async function browsePeerShares(ipn: IpnClient) {
const peers = await listDrivePeersWithShares(ipn)
for (const peer of peers) {
const client = createTaildriveClient(ipn, peer)
const { entries } = await client.statAndReaddir("/")
console.log(
peer.name,
entries.map((e) => e.path),
)
}
}
import { bridgeDriveHandler } from "@webnet/taildrive/server"
import type { IpnClient } from "@webnet/tsconnect"
import type { Handler } from "@webnet/http/server"
function serveTaildrive(ipn: IpnClient, davHandler: Handler) {
ipn.serveDrive(bridgeDriveHandler(davHandler))
}
See also
@webnet/tsconnect—IpnClient,IPN.dial/dialTLS/serveDrive/listDrivePeersused by this package.@webnet/webdav—DAVClientand the WebDAV serverHandlerthis package bridges to Taildrive.@webnet/http— theContext/HandlershapebridgeDriveHandleradapts.