revamp plugin system with entry points - #36
Merged
Merged
Conversation
- move core and runtime assets to `packages/minisky` - move tangram to `packages/tangram-minisky` - old plugin loader and behaviour remains unchanged.
… packages - use legacy wrappers for now
…ugin id addresses #19 (comment) continues work in fb70b16
- keep synchronous `init_plugin` for now
- make legacy cmd dict and decorated module commands use it - check plugin state names - keep `init_plugin` and `TimedFunctionManager`
- stack owns at most one pending awaitable command, others are suspended until it completes - for `Simulation.step` return true when timestep is complete and false while awaitable owns boundary - add command pending and wait for pending for future async plugin loading
…inSpec` - make `Plugin` the "package declaration" - move entry point to private `_PluginRecord` - validate `config_class` with `pydantic.TypeAdapter` and pass that to plugins - `ctx.mount()` - setup new test infra
- bind command and hook declarations to instance passed to mount - reject static method and classmethods - use shared public name validation for commands - infer docstring -> help, method signature -> brief text - allow stacked hooks and validate them
- add `@plugin.replacement` and `PreparedReplacement` - extend `PluginSpec` and `PluginContext.finish()` with explicit replacements - add prepared replacement records and runtime-local validation - remove `TrafficArrays.__subclasses__()` discovery from active selection - migrate `minisky-example-customautopilot` plugin - register `MVP` (though it should be isolated to a new plugin soon) addresses 47a1e2d
- accumulate simulated time directly - clear reset typed-hook elapsed state
- add restricted `PluginRuntime` capabilities and read-only `PluginStatus` - add async lifespans to `PluginSpec` - serialize plugin loading with a manager-owned lock - complete lifespan startup before publishing registrations - remove registrations and revoke capabilities before teardown - add runtime-owned console subscriptions - migrate `minisky-tangram` and `PLUGINS LOAD` to the async lifecycle - remove legacy initializer, command scanner, and timed-hook
…atch - remove `CommandStack.addcommand()`, its reimplementation and custom-command-class compatibility - remove unused `Command.parent` and `Command.notimplemented()`
- rename all settings to config
- also cleanup useless tests
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
minisky | 37ab076 | Aug 01 2026, 02:24 PM |
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.
Previously, plugins are 1) not independently distributable, 2) uses
ast/sys.pathhacks to scan plugin metadata in a local directory and 3) lacks a way to properly manage background threads. Following #19 (comment) and #28, this PR implements and closes #24.Following the approach in tangram, plugins are now normal Python packages exposing a
Pluginvalue through theminisky.pluginsentry-point group:which points to a
buildfunction inside the plugin:Mounted components declare their contributions:
Replaceable implementations are also now explicitly contributed by the plugin:
Plugins can also provide an FastAPI-style async lifespan to manage resources like
httpx/postgreslike:The
plugin_pathandenabled_pluginssettings are removed. The[plugins.<id>]now stores the plugin-specific configuration, much liketangram, and is validated before calling itsbuildfunction.Note that plugins are not loaded by default and must be done via
LOAD PLUGINorawait runtime.plugins.load_configured().Future work planned but not included in this PR:
argumentsDSL withAnnotated[...]