Skip to content

Expand Runtime concept with comprehensive frontend/backend details#106

Closed
caidobot wants to merge 1 commit intomainfrom
main-2dacd308a8d5bb75
Closed

Expand Runtime concept with comprehensive frontend/backend details#106
caidobot wants to merge 1 commit intomainfrom
main-2dacd308a8d5bb75

Conversation

@caidobot
Copy link
Contributor

Summary

This PR expands the Runtime concept documentation to provide comprehensive details about the JavaScript runtime environments available in Caido plugins. The improvements help plugin developers understand what APIs and modules are available in each runtime and how they differ.

Changes

  • Enhanced Frontend Runtime section with available globals (DOM APIs, Web APIs, ES2023+) and module support (ES modules, npm packages)
  • Significantly expanded Backend Runtime section with:
    • QuickJS engine details and ES2023 compliance
    • Comprehensive list of available globals (Object, Array, EventEmitter, Streams, Buffer, etc.)
    • Complete documentation of all re-implemented Node.js modules (child_process, fs, path, os, net, crypto, buffer, sqlite)
    • Module usage patterns (CommonJS and dynamic imports)
    • Clear intentional limitations with workarounds
  • New Runtime Detection patterns — practical code examples for detecting which runtime your code executes in
  • Module and Import Compatibility — best practices for structuring code across frontend/backend boundaries
  • Cross-references — links to related concepts and SDK references

Why This Matters

This update directly addresses the documentation gap identified in the SDK reference for the Runtime topic (part of the core concepts that all plugin developers must understand). Plugin developers now have a clear, complete reference for:

  • What JavaScript features are available in their chosen runtime
  • What built-in modules and globals they can use
  • How to detect and handle differences between frontend and backend environments
  • Best practices for organizing code across these boundaries

Scope

This is a concept improvement (Diátaxis explanation type) focused on the runtime environment, complementing the existing SDK reference materials. It does not introduce any new API surface but rather clarifies existing capabilities.

🤖 Generated with [Claude Code]((claude.com/redacted)

Generated by Doc-developer - Add Guides ·

Expand the Runtime explanation to provide deeper understanding of:
- Differences between frontend and backend JavaScript environments
- Available globals and built-in objects in each runtime (DOM APIs, Web APIs, EventEmitter, Streams, Buffer)
- Complete list of re-implemented Node.js modules available in QuickJS backend
- Module and import compatibility patterns (ES modules vs CommonJS)
- Runtime detection patterns for conditional code
- Clear limitations and workarounds for each runtime
- Links to related concepts and SDK references for further learning

This concept now serves as a comprehensive guide for plugin developers to understand what runtime environment they are in, what APIs are available, and how to structure code appropriately.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@caidobot caidobot requested a review from Corb3nik as a code owner March 14, 2026 15:26
@caidobot caidobot temporarily deployed to main-2dacd308a8d5bb75 - doc-developer PR #106 March 14, 2026 15:26 — with Render Destroyed
@Corb3nik
Copy link
Member

Too much factually incorrect stuff.

@Corb3nik Corb3nik closed this Mar 14, 2026
@Corb3nik Corb3nik deleted the main-2dacd308a8d5bb75 branch March 14, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants