Skip to content

docs: document $SLSKD_SCRIPT_DATA JSON schema for all event types#1688

Open
cattz wants to merge 1 commit intoslskd:masterfrom
xabarin-forks:docs/script-data-schema
Open

docs: document $SLSKD_SCRIPT_DATA JSON schema for all event types#1688
cattz wants to merge 1 commit intoslskd:masterfrom
xabarin-forks:docs/script-data-schema

Conversation

@cattz
Copy link
Copy Markdown

@cattz cattz commented Apr 2, 2026

Summary

  • Documents the JSON schema for the $SLSKD_SCRIPT_DATA environment variable passed to user-defined scripts
  • Covers all 7 event types: DownloadFileComplete, DownloadDirectoryComplete, UploadFileComplete, PrivateMessageReceived, RoomMessageReceived, SoulseekClientConnected, SoulseekClientDisconnected
  • Includes full Transfer object schema with TransferStates flags reference table

Context

The existing docs mention $SLSKD_SCRIPT_DATA and explain how to safely consume it, but don't document the actual JSON structure. This makes it difficult for external tools integrating via scripts (or webhooks) to parse the data without reading the source code.

Test plan

  • Verify JSON examples match actual serialization output from ScriptService (uses JsonNamingPolicy.CamelCase + JsonStringEnumConverter)
  • Review property names against Transfer, PrivateMessage, RoomMessage, and Event source types

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant