Skip to content

Minicontrol 0.20 draft pull request#96

Draft
reaby wants to merge 165 commits into
mainfrom
dev
Draft

Minicontrol 0.20 draft pull request#96
reaby wants to merge 165 commits into
mainfrom
dev

Conversation

@reaby

@reaby reaby commented Jan 6, 2026

Copy link
Copy Markdown
Member

MINIcontrol Changelog - Dev Branch

154 commits - 284 files changed

++ 18,956 lines added
-- 10,200 lines removed

🎉 Major Features

New Plugin System Architecture

  • Plugin Manifests: All plugins now require a manifest.json file with version constraints and dependency specifications
  • Smart Dependency Resolution: Automatic plugin loading order based on dependency graphs with semantic versioning support
  • Plugin Registry: Type-safe plugin access with tmc.getPlugin<PluginId>(id) instead of dynamic object access
  • Wildcard Plugin Loading: Support for pattern-based plugin whitelisting (e.g., PLUGINS="kacky/*")
  • Install/Remove API: New methods tmc.installPlugin(), tmc.removePlugin(), and tmc.listPlugins()

New UI System - Forge/JSX

  • React-like JSX Components: UI elements can now be built with JSX/TSX instead of Twig templates
  • Type-safe Components: Full TypeScript support for UI components
  • Examples: EmotesWidget.tsx, LabelWidget.tsx demonstrating the new system

⚠️ Breaking Changes

Database Migrations Directory

  • IMPORTANT: Migration files have been reorganized
  • Old location: core/migrations/ → New location: core/plugins/*/migrations/ and userdata/plugins/*/migrations
  • Action Required: If you're upgrading from 0.10 you are required to run the migration script tsx --env-file=.env migrate-to-012.ts to update your database

Plugin Structure Changes

  • Plugins now extend from @core/plugins with new lifecycle methods
  • New methods: addListener(), addCommand(), addSetting(), addColor()
  • Automatic cleanup on unload (no need for manual removeListener calls)

📚 Documentation

  • Brand New Plugin Developer Documentation available at GitHub Pages
  • Complete guides for plugin development, manifest structure, and API reference

🔧 Notable Improvements

Admin Plugin

  • Completely rewritten settings/colors windows with improved UX
  • New ModeSettingsWindow with entry fields and apply/cancel buttons
  • Better handling of mode script settings with type validation

Database Plugin

  • Cleaner model structure moved to models/ subdirectory
  • Migration discovery now uses glob patterns for all plugins
  • Optional database support (can skip if DATABASE env not set)

Performance & Stability

  • Better GC triggering and memory management
  • Enhanced error handling in plugin loading
  • Faster map list synchronization

Developer Experience

  • Bun and Deno runtime support alongside Node.js
    • npm run start:deno | npm run start:bun
  • Better TypeScript definitions and autocomplete
  • Debug tooling improvements
  • VSCode configuration included

🐛 Bug Fixes

  • Fixed color parsing in various UI elements
  • Improved Trackmania color code to ANSI conversion

📝 Environment Variables

  • New PLUGINS variable for plugin whitelisting (replaces the EXCLUDED_PLUGINS)
  • Added XMLRPC_LIMIT_SCRIPT_CALLBACKS option
  • Font customization variables added

For full details, see the comparison at: main...dev

reaby and others added 30 commits May 29, 2025 00:47
…ncies.

- Added scripts for checking records load and resolver fallback scenarios.
- Updated all plugins to use the new `addListener` and `addCommand` methods for better consistency and maintainability.
- Removed unnecessary listener and command removal in `onUnload` methods, as the framework now handles this automatically.
- Enhanced the `removeListener` method in the server class to handle wrapper listeners.
- Added `unregister` and `unregisterColor` methods to the settings manager for better settings management.
- Updated package.json to include new dependencies and scripts for Bun.
- Introduced a new test file for HTTP request handling with keep-alive support.
- plugin loader will use PLUGINS="" for inclusive plugin loading, EXCLUDED_PLUGINS is removed.
- if no plugins are defined, everything will be loaded.
- changed manialink template loader to use relative paths for plugin path, if you define path-like string for the template, it'll try to load from work directory.
- changed plugins to use new relative paths for widgets.
… tidy dependencies from plugin classes, as they're not anymore used for anything
add jukebox history and votes limits
reaby and others added 30 commits December 31, 2025 15:58
fix modesettings window
…ling, and improve performance

- Replaced the instantiation of Deserializer with a reusable instance in GbxClient.
- Optimized buffer handling by tracking offsets and compacting the buffer after processing messages.
- Updated method response and callback processing to utilize the reusable deserializer.
- Changed logging mechanism in log.ts to initialize on module load and cache ANSI level and formatter.
- Updated DebugTool settings to default to false instead of relying on environment variables.
- Removed unused widget.xml.twig file from DebugTool plugin.
- Improved performance in RecordsWidget by awaiting displayManialink calls and ensuring records are converted properly.
- Enhanced SettingsManager to safely call callbacks with optional chaining.
- Added disposeScript and reverseArray functions in forge.ts for better resource management.
- Updated Manialink class to build script blocks more efficiently and handle cleanup properly.
- Improved Widget class to ensure open actions are removed before setting new ones.
- Enhanced Window class to log errors during cleanup without interrupting the process.
- Optimized UiManager to reuse regex patterns and cache global action IDs for efficiency.
special thanks for burgers  for initial work and sending me patch
- MiniControl overview and Kacky plugin suite docs
- Key file reference: api.ts, redis bridge, web client, admin commands
- Data flow diagram: MiniControl ↔ Redis Streams ↔ KackyGG API
- Plugin conventions and related repository links

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…epos

- AGENTS.md: reasoning topology (shared across all Kacky repos)
- .claude/rules/: project-conventions, testing, cross-repo guidance
- .claude/agents/: code-reviewer (Opus), implementer (GPT 5.5), test-writer (GPT 5.5)
- CLAUDE.md: updated with rules reference and model split docs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Patch-level bumps (no breaking changes) addressing the runtime-relevant
advisories; cleared 6 of 22 vulnerabilities (22 -> 16).

- sequelize 6.37.7 -> 6.37.8: fixes the direct HIGH SQL-injection advisory
  via JSON columns (the most important runtime fix) and the bundled uuid.
- ajv 8.17.1 -> 8.20.0: ReDoS hardening (within 8.x).
- twing 7.2.2 -> 7.3.1: latest patch.
- npm audit fix (non-breaking) for remaining safe transitive bumps.

Knowingly left as residual (not worth the risk on this core fork):
- locutus (critical/high via twing): twing pins locutus 2.x; locutus 3.x
  reorganized into an exports map that breaks twing's bare-directory imports
  (locutus/php/strings, locutus/php/math -> ERR_MODULE_NOT_FOUND), so a forced
  override breaks template rendering. Low real exposure (dev-authored
  templates, Twig-escaped data). Track upstream twing for a locutus 3 move.
- sqlite3 -> node-gyp/tar/cacache chain (high): build-time only, not loaded
  at runtime; sqlite3 6 is a breaking major. Deferred.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

4 participants