Skip to content

Update plugin driver documentation to reflect native plugin support#52

Merged
thiagoralves merged 1 commit into
developmentfrom
devin/1766406086-update-plugin-driver-docs
Dec 22, 2025
Merged

Update plugin driver documentation to reflect native plugin support#52
thiagoralves merged 1 commit into
developmentfrom
devin/1766406086-update-plugin-driver-docs

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Update plugin driver documentation to reflect native plugin support

Summary

The plugin driver system documentation was outdated, stating that native C/C++ plugins were "planned for future release" when the implementation already exists. This PR updates the documentation to accurately reflect the current state of the codebase.

Key changes:

  • Updated README.md to document native plugins as "Supported" instead of "Planned"
  • Fixed incorrect type comment in plugin_config.h (was 0 = native, 1 = python, should be 0 = python, 1 = native)
  • Added critical documentation about native plugin args lifetime (must copy during init, pointer freed after)
  • Updated Python import examples to use correct from shared import syntax
  • Added SafeLoggingAccess to documented components
  • Documented that cycle_start/cycle_end are reserved hooks (loaded but not currently invoked)
  • Updated DEVELOPMENT.md plugin section with accurate lifecycle description

Review & Testing Checklist for Human

  • Verify native plugin implementation works: Load the example plugin at plugins/native/examples/test_plugin.so and confirm init/start_loop/stop_loop/cleanup are called correctly
  • Verify Python import path: Confirm from shared import SafeBufferAccess, safe_extract_runtime_args_from_capsule works in actual plugins
  • Verify type mapping fix: Confirm that type=0 in plugins.conf means Python and type=1 means Native (check against actual runtime behavior)

Recommended test plan: Build and run the native plugin example using the Makefile at plugins/native/examples/, then configure it in plugins.conf with type=1 and verify it loads correctly when the runtime starts.

Notes

  • The cycle_start and cycle_end hooks are documented as "reserved" because while the symbols are loaded via dlsym, they are not actually invoked anywhere in the runtime code
  • The args lifetime documentation is critical for native plugin authors - storing the pointer instead of copying will cause use-after-free bugs

Link to Devin run: https://app.devin.ai/sessions/7bb7a40970384ea79ffea4adc955a73a
Requested by: Thiago Alves (@thiagoralves)

- Update README.md to document that native C/C++ plugins are now fully supported
- Fix incorrect type comment in plugin_config.h (0=python, 1=native)
- Update DEVELOPMENT.md plugin section with accurate lifecycle description
- Document native plugin args lifetime (must copy during init)
- Update Python import examples to use correct 'from shared import' syntax
- Add native plugin examples to See Also section

Co-Authored-By: Thiago Alves <thiagoralves@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@thiagoralves thiagoralves merged commit e4312b2 into development Dec 22, 2025
1 check passed
@thiagoralves thiagoralves deleted the devin/1766406086-update-plugin-driver-docs branch December 22, 2025 12:38
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