Repository navigation
Add an on/off switch for the four feature plugins - #2569
Merged
Merged
Conversation
The Settings page gets a Plugins section with one switch per plugin (social, tree, timeline, workflow). The switch is kept in FlyBot's own state.json and read at the plugin's apply() on the next start; the packages stay installed, so a flip never unloads a running session. A plugin that is off registers no tools, slots, endpoints or prompt text, and the interface drops its slot entries. Fixes #2564 Docs-not-needed: the switch is one Settings row and one host module; docs/subsystems/core-host.md describes the team store, not plugin loading.
The four host files are mirrors in patches/ds-bot/files/, the three edited upstream files get fresh hunks, and core/client.js is rebuilt from src/client. Verified with the git-free applier: 10 patches apply cleanly and core/ equals ds-bot/ + patches. Fixes #2564 Docs-not-needed: the switch is one Settings row and one host module; docs/subsystems/core-host.md describes the team store, not plugin loading.
Hand-written hunks drifted from what generate writes; the canonical split is what CI compares against. check and canonical are both clean at this tip. Fixes #2564 Docs-not-needed: the switch is one Settings row and one host module; docs/subsystems/core-host.md describes the team store, not plugin loading.
The zh dictionary needs the Plugins page lines and the page-list test counts the new page; the client bundle and the patch series follow. Fixes #2564 Docs-not-needed: the switch is one Settings row and one host module; docs/subsystems/core-host.md describes the team store, not plugin loading.
Collaborator
Author
|
Verdict: PASS at a4ae440 Ran at this tip: Red first, on the same clean tip tree with only Review points:
|
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.
Written-by: Dev
Fixes #2564
Owner: Chief
Reviewer: Reviewer
Tip SHA: a4ae440
Base: 4526118
Docs-not-needed: the switch is one Settings row and one host module; docs/subsystems/core-host.md describes the team store, not plugin loading.
What changed
Settings → Plugins lists the four feature plugins with their package, a one-line purpose and a switch. The switch writes FlyBot's own
state.json(flybot.plugins.<id>.enabled); the packages stay in the DSH profile, so nothing is installed or uninstalled.A plugin reads the switch once, in its own
apply()at start, through the host'sflybot.pluginEnabled(id). When it is off the plugin returns before registering anything: its tools, its endpoints, its prompt text and its panels are all absent, and the next start brings them back. That is the owner's chosen scope — state.json + next start, never a hot unload.The interface side needed its own switch because a disabled plugin's browser bundle still loads: the slot registry now drops entries belonging to a disabled plugin, and the boot path asks the host once.
Ran at the tip
node --import ./test/harness-resolve.mjs --test test/plugin-switches.test.js— 7/7 pass.core/src/host/hooks.jsandcore/src/client/flybot-registry.jsput back to their base blobs: 0/7 (red first).test/flybot-client.test.js test/client-bundle.test.js test/client-apply-order.test.js test/api-route.test.js test/install.test.js test/flybot.test.js— 82/82 pass.node scripts/ds-bot-patches.mjs checkand… canonical— 10 patches apply,core/equalsds-bot/+patches/ds-bot/, and generate is a no-op on the committed split.node scripts/build-client.mjs --check— clean.node .github/scripts/changelog.mjs check— clean.Not run
npm run verifyend to end and the full core suite (not enough time in this slot); CItests-okis the authority.npm run lint'sarch-docshalf: it needsorigin/mainand this box has no git; theDocs-not-needed:trailer is in the branch commit and here.core/src/host/turns|delivery|indexchanged.Checkpoint
{
"pr": 2569,
"claim": "Chief",
"issue": 2564,
"summary": "Settings gains a Plugins page with one switch each for Bot Social, Tree, Timeline and Workflow. The answer is stored in FlyBot's own state.json and read when the plugin loads on the next start, so the packages stay installed and no running session loses a tool. A plugin that is off registers no tools, endpoints, prompt text or panels. Defaults stay on.",
"files": [
"core/src/host/plugins.js",
"core/src/host/hooks.js",
"core/src/client/flybot-registry.js",
"core/src/client/settings.js",
"core/test/plugin-switches.test.js",
"plugins/workflow/index.js"
],
"checks": {
"ran": "test/plugin-switches.test.js (7/7) + ds-bot-patches check/canonical + build-client --check",
"result": "green",
"at": "a4ae4400bd5ca32f66e1e7766fb116db8f64f3ed"
},
"next": "Review: panel hiding maps slot ids to plugins by prefix; the new test lists every id the four bundles register today."
}