Draft
Conversation
Add optional --lws-mode flag to support W3C Linked Web Storage protocol semantics alongside current Solid/LDP implementation. Changes: - Add lwsMode config flag (CLI, env var, config file) - Implement PUT restriction in LWS mode (updates only, not creation) - Add request.lwsMode decoration in server - Add basic LWS tests demonstrating PUT/POST behavior - Document LWS mode in README with examples Key difference: In LWS mode, PUT returns 404 for non-existent resources and suggests using POST for creation (server-assigned URIs with Slug). Status: DRAFT - LWS spec is in early stages. This captures the basic infrastructure for future development. See issue #87 for full plan. Related: #87 Spec: w3c/lws-protocol#37
4 tasks
Per Eric's clarification on Solid CG call, LWS protocol allows PUT for resource creation - it's not forbidden. POST with Slug is the emphasized pattern, but PUT creation is still valid. Changes: - Remove PUT 404 rejection in LWS mode (src/handlers/resource.js) - Update tests to verify PUT creation works (test/lws.test.js) - Update README to reflect correct LWS semantics - Document that current LWS mode is infrastructure-only LWS mode now primarily serves as foundation for future features: - Link header-based container detection - Linkset metadata endpoints - JSON Merge Patch for metadata Related: #87 (comment added with CG clarification)
Contributor
Author
Update: PUT Restriction RemovedChanges in Latest CommitRemoved the PUT restriction that was in the initial implementation. The PUT/POST semantics are now identical between LWS mode and default mode. What changed:
Current StatusThe
Real LWS Differentiators (for future implementation)
Since this now has zero behavioral impact, could potentially merge as foundation infrastructure, or keep as draft until actual LWS features are implemented. See issue #87 for discussion: #87 (comment) |
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds preliminary implementation of W3C Linked Web Storage (LWS) protocol mode as an optional configuration flag.
Status: 🚧 DRAFT - This PR captures the initial infrastructure for LWS support. Not intended for immediate merge - waiting for ecosystem signals (see #87).
Changes
Config Infrastructure
--lws-modeCLI flagJSS_LWS_MODEenvironment variable supportlwsModeconfig file optionCore Implementation
request.lwsModeavailable to all handlersTesting
test/lws.test.js)Documentation
Key Difference
Solid/LDP Mode (default):
LWS Mode:
PUT /alice/new.json → 404 Not Found (suggests POST instead) POST /alice/ + Slug → 201 Created (required for creation) PUT /alice/existing.json → 204 No Content (updates work)What's NOT Implemented Yet
From the full plan in #87, this PR only implements the foundation:
/resource;linkset)These are intentionally deferred until we see ecosystem adoption.
Why This PR Exists
This PR:
Decision Criteria for Merge
Recommend merging when:
Current status (Jan 2026):
Testing
Related
Checklist
Note: Keeping as draft until ecosystem signals warrant merge. Can be rebased/updated as LWS spec evolves.