New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wiki-plugin-commasutra

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wiki-plugin-commasutra

Timeboxed collaborative editing plugin for federated wiki - allows users to collaboratively edit content for a limited time

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source

Mostly Harmless - Timeboxed Collaborative Wiki Hub

A federated wiki plugin that enables timeboxed collaborative contribution. Multiple users can contribute content within a limited time window, with each contributor getting their own linked page on the main hub.

Features

  • ⏱️ Countdown Timer - Visual countdown showing time remaining (5 minutes by default)
  • 👥 Collaborative Hub - Multiple users contribute to create a collection of linked pages
  • 🔗 Individual Content Spaces - Each contributor gets their own wiki page
  • 📋 Contributor List - Main hub displays links to all contributor pages
  • 🔗 Shareable URLs - Generate unique session URLs to invite collaborators
  • 🎨 Clean UI - Gradient design with responsive layout
  • ✅ Sessionless Auth Ready - Built with support for Sessionless authentication

Installation

npm install wiki-plugin-mostly-harmless

IMPORTANT: After installation, restart your wiki server for the plugin to load.

If you encounter issues, see TROUBLESHOOTING.md.

Usage

Creating a New Session

Add a mostly-harmless item to your wiki page:

{
  "type": "mostly-harmless",
  "id": "abc123"
}

When the page loads, a new collaborative editing session will be created automatically with a 5-minute timer.

Joining an Existing Session

To join an existing session, add a mostly-harmless item with a sessionId:

{
  "type": "mostly-harmless",
  "id": "abc123",
  "sessionId": "your-session-id-here"
}

How It Works

  • Owner (logged in) creates a session - Adds the plugin to their wiki page, creating a new timeboxed session
  • Owner clicks "View Hub Page" - The green button navigates to the hub page where all contributions will be linked
  • Owner shares the hub page URL - Copies and sends the URL to collaborators
  • Contributors (NOT logged in) can participate - No authentication required to view or contribute!
  • Contributors click "Contribute" - Opens a full-screen writing interface
  • Contributors enter their handle - Any name/pseudonym they choose
  • Contributors type content - Up to 2000 characters
  • Contributors click Submit - Each gets their own wiki page created automatically
  • Hub page updates - The hub page now shows a link to the new contribution page
  • Session expires - After 5 minutes, no more contributions accepted

Important: Only the page owner needs to be logged in. Contributors access the session via the shared URL without any login.

The Hub Page: This is where all the magic happens! The hub page contains:

  • The plugin UI showing the timer and contributor count
  • Clickable links to every contribution (added as paragraph items to the page)
  • Share URL for inviting more contributors

Key Concept: Individual Spaces, Collective Hub

Unlike traditional collaborative editing where everyone edits the same document, Mostly Harmless gives each contributor their own content space:

  • Each contributor gets their own wiki page - No overwriting or conflicts
  • The hub page collects all the links - Easy navigation to all contributions
  • Time-boxed collaboration - Creates urgency and focused contribution windows
  • Perfect for brainstorming sessions - Everyone contributes their own ideas
  • Great for anthology creation - Multiple authors, linked from one hub

Architecture

Client-Side (client/mostly-harmless.js)

  • Renders the hub interface with countdown timer
  • Handles user input (handle and content)
  • Submits content to server
  • Displays list of all contributors with links to their pages
  • Auto-refreshes timer every second
  • Updates contributor list in real-time after submissions

Server-Side (server/server.js)

  • Manages sessions in-memory (Map data structure)
  • Creates new sessions with expiration times
  • Accepts content submissions and generates page slugs
  • Tracks multiple contributions per session
  • Validates session expiration
  • Cleans up expired sessions automatically

API Endpoints

POST /plugin/mostly-harmless/create-session

  • Creates a new collaborative hub session
  • Returns: { sessionId, createdAt, expiresAt, contributions }

GET /plugin/mostly-harmless/session/:sessionId

  • Retrieves session information
  • Returns: Session details and all contributions with page URLs

POST /plugin/mostly-harmless/submit

  • Submits content to a session and creates a page URL
  • Body: { sessionId, handle, content }
  • Returns: { success, contribution, pageUrl, contributionCount }
  • Each contribution gets a unique page slug: mostly-harmless-{sessionId}-{handle-slug}

GET /plugin/mostly-harmless/session/:sessionId/history (optional)

  • Retrieves full list of contributions for a session

Configuration

Session Duration

Default: 5 minutes (300 seconds)

To change the duration, modify SESSION_DURATION in client/mostly-harmless.js:

const SESSION_DURATION = 300; // 5 minutes in seconds

And SESSION_DURATION_MS in server/server.js:

const SESSION_DURATION_MS = 5 * 60 * 1000; // 5 minutes

Content Limits

  • Handle: 30 characters max
  • Content: 2000 characters max

Use Cases

Brainstorming Sessions

  • Host creates a session with a topic prompt
  • Team members contribute their ideas within 5 minutes
  • All ideas linked from one central hub page
  • Perfect for async or synchronous brainstorming

Writing Anthologies

  • Create a collaborative short story collection
  • Each author writes their own piece
  • Hub page becomes the table of contents
  • Time limit encourages focused writing

Event Coverage

  • Multiple reporters covering an event
  • Each submits their perspective
  • Hub aggregates all viewpoints
  • Creates a multi-faceted event record

Learning Exercises

  • Teacher creates a session with a prompt
  • Students submit their responses
  • Hub becomes a gallery of student work
  • Encourages participation without direct competition

Wiki Page Creation

✅ Implemented! When a user submits their contribution, the plugin automatically creates a real wiki page for them.

Page Structure

Each contributor's page includes:

  • Title: "{Handle}'s Contribution"
  • Content: The full text they submitted
  • Attribution: "—{Handle}"
  • Timestamp: When it was submitted

Page Format

{
  "title": "Alice's Contribution",
  "story": [
    {
      "type": "paragraph",
      "text": "The actual content submitted by the user..."
    },
    {
      "type": "paragraph",
      "text": "—Alice"
    },
    {
      "type": "paragraph",
      "text": "Submitted 1/19/2026, 3:45:00 PM"
    }
  ]
}

What Happens

  • User submits contribution
  • Server generates unique page slug: mostly-harmless-{sessionId}-{handle-slug}
  • Server creates actual wiki page using fedwiki's pagehandler
  • Page appears in wiki's page list
  • "View Page →" link works immediately
  • Page is discoverable via wiki search

Future Enhancements

Sessionless Authentication Integration

The plugin is designed to integrate with Sessionless authentication:

// Generate signature for session access
const sessionUrl = await sessionless.generateAuthenticatedUrl(sessionId);

This would enable:

  • Verified identities for contributors
  • Access control (only invited users can join)
  • Cryptographically signed submissions
  • Contributor verification

BDO Persistence

Instead of in-memory sessions, use BDO (Big Dumb Object) storage:

// Save session to BDO
await bdo.updateBDO(uuid, `mostly-harmless-${sessionId}`, sessionData, true);

// Retrieve session from BDO
const sessionData = await bdo.getBDO(uuid, `mostly-harmless-${sessionId}`);

Benefits:

  • Sessions persist across server restarts
  • Distributed session management
  • Long-term archival of collaborative history

Real-Time Updates

Add WebSocket support for live updates:

// Notify all connected clients when new contribution added
io.to(sessionId).emit('new-contribution', contribution);

Users would see new contributors appear in real-time without refreshing the page.

Development

Build

No build step required - pure JavaScript.

Testing Locally

  • Install in your federated wiki instance:

    npm install /path/to/wiki-plugin-mostly-harmless
    
  • Restart your wiki server

  • Add a mostly-harmless item to a page

  • Open the page and start collaborating!

License

MIT

Author

Planet Nine (planetnineisaspaceship)

Date

January 19, 2026 - Initial release

Keywords

wiki

FAQs

Package last updated on 03 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts