| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add optional --lws-mode flag to support W3C Linked Web Storage (LWS) protocol semantics alongside the current Solid Protocol/LDP implementation.
Status: 📋 Draft/Exploratory - LWS spec is in early stages (PR #37 just merged Jan 2026)
Priority: Low (monitor ecosystem first)
Related: w3c/lws-protocol#37
The W3C Linked Web Storage protocol suite defines CRUD operations with different conventions than Solid/LDP:
JSS implements Solid Protocol conventions based on LDP:
| Aspect | Solid/LDP (Current) | LWS Protocol (Proposed) |
|---|---|---|
| Resource Creation | PUT or POST | POST only |
| PUT Semantics | Create or update | Update only (404 if not exists) |
| Container Detection | Trailing slash (/alice/) | Link header: rel="type" |
| Metadata Updates | N3 Patch, SPARQL Update | JSON Merge Patch on linkset |
| Concurrency Control | Optional ETag | Mandatory ETag |
| Slash Semantics | Standard (containers end with /) | Removed (header-based only) |
# LWS mode
jss start --lws-mode
# Solid/LDP mode (default, current behavior)
jss startEffort: 3 hours
export async function handlePut(request, reply) {
const lwsMode = request.lwsMode || false;
if (lwsMode) {
// LWS: PUT only for updates
const stats = await storage.stat(storagePath);
if (\!stats) {
return reply.code(404).send({
error: 'Use POST to create resources in LWS mode'
});
}
} else {
// LDP: PUT creates or updates (current)
const existed = stats \!== null;
}
}Effort: 4 hours
export function isContainer(urlPath, request) {
if (request?.lwsMode) {
// LWS: Check Link header for Container type
const linkHeader = request?.headers?.link || '';
return linkHeader.includes('ldp#Container');
} else {
// LDP: Trailing slash
return urlPath.endsWith('/');
}
}Files affected: src/utils/url.js, src/handlers/resource.js, src/handlers/container.js, src/ldp/headers.js
Effort: 8 hours
New file: src/handlers/linkset.js
Effort: 2 hours
Add --lws-mode flag to CLI and config system.
Effort: 12 hours
Duplicate all CRUD tests for LWS mode (223 tests × 2 modes = 446 tests total).
| Component | Effort | Files | Risk |
|---|---|---|---|
| Config flag | 2h | 3 | Low |
| PUT behavior | 3h | 1 | Medium |
| Container detection | 4h | 4 | High |
| Linkset endpoints | 8h | 1 new | Medium |
| Testing | 12h | All | High |
| Documentation | 2h | 2 | Low |
| Total | ~31 hours | ~15 | High |
Do NOT implement until:
Instead of core branching, design protocol adapters:
jss start --protocol=lws # LWS semantics
jss start --protocol=solid # LDP semantics (default)
jss start --protocol=s3 # Future: S3-compatibleBenefits:
Priority: Low - Monitor but don't implement
Timeline:
Keep focus on:
| Back | FazBrowse Home | New Git URL |
Activity
feat: add LWS protocol mode (draft implementation)
melvincarvalho commented on Jan 14, 2026
Update from Solid CG Call
Eric clarified that in the LWS protocol, PUT CAN do creation - it's not forbidden. The spec emphasizes POST for creation (with server-assigned URIs via Slug), but PUT for creation is still allowed.
Impact on This Issue
This significantly changes the analysis:
Original understanding:
Corrected understanding:
What This Means
The PUT semantics difference is smaller than assumed. The main LWS distinctions are:
Impact on PR #88
PR #88's current implementation rejects PUT creation in LWS mode - this is too strict based on Eric's clarification.
Options:
Recommendation: Remove the PUT restriction from PR #88 and focus LWS mode on the actual differentiators (linkset endpoints, Link header semantics) when we implement them.
The current PR is marked as draft anyway, so this is a good opportunity to course-correct before any merge consideration.
cc: This validates the "monitor ecosystem" approach - specs are still evolving!
fix: remove PUT restriction in LWS mode
melvincarvalho commented on Oct 14, 2026
Superseded by #621. This issue was written against the Jan 2026 draft (lws-protocol#37: PUT update-only, slashless containers); the current editor's draft (5 Oct 2026) is substantially different — storage descriptions, application/lws+json containers with pagination, linksets + JSON Merge Patch, an authorization server with RFC 8693 token exchange, access grants, signed webhooks. #621 tracks that surface against Touchstone, with a core/plugin split, and references the two reference implementations now available (Jesse Wright's CSS plugin, Erich Bremer's lws-server).