Skip to content

Releases: newcore-network/opencore

v0.3.3

24 Jan 14:57
0d3d86c

Choose a tag to compare

OpenCore Framework v0.3.3

Highlights

  • Native Binary Isolation: Introduced a robust system to execute heavy or sensitive logic in isolated operating system processes, outside the FiveM runtime.
  • Language-Agnostic Services: Binary services can be implemented in any language (Go, Rust, C++, etc.) that supports standard I/O (stdin/stdout).
  • Asynchronous Proxy Pattern: Methods decorated with @BinaryCall are automatically transformed into asynchronous proxies, making external execution feel like native TypeScript.

New Features

  • @BinaryService Decorator: New decorator to declare and manage the lifecycle of external binary processes.
  • @binarycall Decorator: New decorator to mark class methods as remote actions to be executed by the associated binary.
  • BinaryProcessManager: A centralized runtime service that handles process spawning, JSON-RPC communication, and automatic timeout management.
  • Enhanced Observability: Added detailed debug logging for service registration, process lifecycle events, and RPC call/response cycles.
  • Peer dependencies: move dependencies to peerDependencies

Internal Changes

  • JSON-RPC Over Stdin/Stdout: Implemented a lightweight protocol for bidirectional communication between OpenCore and external binaries.
  • Platform-Specific Resolution: Automated resolution of binary executables based on the host operating system (Windows/Linux).
  • Graceful Error Handling: Comprehensive error propagation from external processes back to the TypeScript runtime, including stderr capture.

Notes

This release marks a significant milestone in OpenCore's architecture, providing developers with the tools to build high-performance, isolated systems that leverage native code while maintaining the ease of use of the framework's decorator-based DI system.

v0.3.2

18 Jan 13:13
f809782

Choose a tag to compare

OpenCore Framework v0.3.2


Highlights

  • Command Parameter Intelligence: The framework now correctly differentiates between TypeScript's spread operator (...args: string[]) and direct array parameters (args: string[]).
  • Improved Reflection: Added source-code analysis to overcome TypeScript's reflection limitations (design:paramtypes ambiguity).

Fixes

  • Spread Operator Handling: Fixed an issue where using ...args would sometimes result in arguments being joined by commas or passed incorrectly.
  • Array Parameter Support: Resolved "join is not a function" errors when using args: string[] by ensuring the full array is passed as a single argument.
  • Argument Consistency: Ensured that single-word and multi-word inputs are handled consistently across both Command and OnNet (NetEvents) systems.

Internal Changes

  • Added getSpreadParameterIndices to function-helper.ts for runtime parameter inspection.
  • Updated CommandMetadata to track hasSpreadParam.
  • Refined validateAndExecuteCommand to implement conditional argument flattening.

Notes

This release ensures that the framework respects the intended TypeScript parameter types, providing a more intuitive and reliable experience for building complex command handlers and event listeners.

v0.3.1

18 Jan 12:22
c515987

Choose a tag to compare

OpenCore Framework v0.3.1


Highlights

  • Hot-Reload Stability: Fixed critical race condition that caused resources to hang during hot-reload
  • Command System Reliability: Improved command registration and execution flow with better error handling (Now Array types means spreed operator in commands and netEvents parameters handler, string[] === rest of the arguments, and supporting spreed operator as string[])
  • Bidirectional Core Detection: Enhanced core ready detection mechanism for late-starting resources

Changes

  • Core Initialization

    • Added bidirectional ready detection with core:request-ready event for hot-reload scenarios
    • Reordered core dependency detection to register event listener before requesting status
    • Removed artificial delay in ReadyController, set isReady=true immediately
  • Command System

    • Allow command re-registration from same resource during hot-reload
    • Fixed tuple schema validation to properly handle rest array parameters
    • Added comprehensive debug logging for command registration and execution flow
    • Enhanced error handling in remote command service

Notes

This release focuses on improving the developer experience during hot-reload scenarios. Resources that are restarted or hot-reloaded will now properly detect the Core's ready state without hanging, and commands will continue to function correctly after resource restarts.

v0.3.0

17 Jan 20:56
917f674

Choose a tag to compare

OpenCore Framework v0.3.0 ⚠️ BREAKING CHANGE

This release introduces massive structural simplifications, a hard boundary between runtimes, and a robust telemetry/logging system.
Backward compatibility with previous versions is not guaranteed.
Please read the notes carefully before upgrading.


Highlights

  • Dynamic Log Level Control (NEW)
    The framework now supports granular log level control. You can configure the global logLevel during Server.init(), which overrides build-time defaults. Supported levels: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF.

  • Telemetry Bridge & State Inspection (NEW)
    Refactored the DevMode bridge to focus on telemetry. The OpenCore CLI can now stream logs and capture real-time snapshots of the framework state (DI container, active sessions, registered commands) via a WebSocket/HTTP bridge.

  • Offline Player Simulation (NEW)
    Enhanced the PlayerSimulatorService to allow testing complex game logic without a running game client. Supports automatic connection of virtual players on startup.

  • Zero-Config Feature System (NEW)
    Features are now enabled by default and providers are auto-inferred based on the runtime mode (CORE, RESOURCE, or STANDALONE). Manual provider configuration and export flags have been removed from the public API.

  • Universal Node.js Compatibility (NEW)
    Refactored core services (ChatService, SessionController) to remove direct dependencies on FiveM globals, enabling full framework testing and simulation in pure Node.js.

  • Authoritative DI & Bootstrap (IMPROVED)
    Redesigned the Dependency Injection lifecycle to eliminate circular dependency issues. The framework now uses a two-phase bootstrap that ensures critical services (World, Players) are ready before controllers are resolved, removing the need for delay() in most use cases.

  • Hard runtime separation (Client / Server)
    OpenCore now enforces a strict boundary between client and server runtimes. Server-only code can no longer be accidentally bundled into client resources.


🚨 Breaking Changes

  • DevMode Refactor:
    • Removed internal Hot-Reload server. Resource reloading is now handled exclusively by the OpenCore CLI or platform-native tools (txAdmin).
    • Removed hotReload property from DevModeConfig.
  • Imports: now you only have 3 ways to imports, @open-core/framework, @open-core/framework/server, @open-core/framework/client
  • API Simplification: UserFeatureConfig now only supports a disabled list. provider and export fields are removed.
  • Initialization: Server.init() options have been simplified. resourceGrants has been entirely removed.
  • Package Exports: The package root (@open-core/framework) now only exposes kernel (runtime-agnostic) APIs. Runtime-specific APIs must be imported via @open-core/framework/client or @open-core/framework/server.
  • Database Removal: The internal database feature has been removed.
  • Logging Infrastructure: coreLogger now uses a two-stage filtering system (Global vs. Transport). Environment detection is more strict.

Changes

  • Core Simplification:
    • Implemented DefaultPrincipalProvider for out-of-the-box @Guard support.
    • Refactored ChatService and SessionController for better platform independence.
    • Optimized resolveRuntimeOptions to build internal feature contracts automatically.
    • DI Stability: Added explicit @inject() decorators to all interface-based dependencies to ensure reliable resolution across different bundlers.
    • Security: Hardened VehicleController by removing client-authoritative entity creation and movement events.
  • Logging & Telemetry:
    • Implemented __OPENCORE_LOG_LEVEL__ build-time injection.
    • Updated LoggerService with comprehensive TSDocs and dual-stage filtering logic.
    • DI-Ready Logger: LoggerService is now fully integrated into the DI container with support for optional configurations via tokens.
    • Refactored DevModeService to focus on state inspection and telemetry.
  • Architectural Cleanup:
    • Reorganized package exports so the kernel is the main public entrypoint.
    • Consolidated former utils into kernel/shared/utils.
    • Introduced explicit api.ts barrel files for both client and server runtimes.
    • Bootstrap Reordering: Controllers are now loaded and registered before system processors to allow user-defined service overrides.

Migration Notes

If you are upgrading from v0.2.x, you will need to:

  1. Update Server Initialization:

    // Old
    await Server.init({
      mode: 'CORE',
      features: { commands: { enabled: true, provider: 'local', export: true } },
    })
    
    // New (Sane defaults, dynamic logs)
    await Server.init({ 
      mode: 'CORE',
      logLevel: 'DEBUG' // Optional
    })
  2. Update Imports:

    // Old
    import { X } from '@open-core/framework/kernel/di'
    
    // New
    import { X } from '@open-core/framework'
    import { Server } from '@open-core/framework/server'
    import { Client } from '@open-core/framework/client'

Notes

This release establishes hard architectural boundaries and massive boilerplate reduction required for a stable, platform-agnostic multiplayer runtime as OpenCore grows.

v0.2.9

11 Jan 20:04
75741fe

Choose a tag to compare

OpenCore Framework v0.2.9

Highlights

  • Migration of the parallel compute system to native Node.js worker threads, enabling true parallel execution with improved lifecycle management, error handling, and inter-thread communication.
  • Improved NUI integration by returning handler results in successful callback responses, enabling more robust bidirectional UI ↔ runtime workflows.

Changes

  • Complete refactor of the parallel compute service:
    • Removal of virtual worker implementation.
    • Adoption of native worker_threads with a dedicated entrypoint (native-worker.entry.ts).
  • Release workflow improvements:
    • GitHub Actions pinned to specific versions for better reproducibility.
    • Replacement of auto-generated release notes with a manually maintained RELEASE.md.
  • Documentation improvements:
    • Consolidation of links in the README.
    • Addition of CI, npm, license, and TypeScript badges.
    • Homepage updated to https://opencorejs.dev.
  • Examples updated to consistently use the Server.Player namespace in decorators (Guard, OnNet).

Fixes

  • Correct error handling in NUI callbacks using explicit instanceof Error checks.
  • Minor documentation and example corrections to avoid namespace ambiguity.

Notes

  • This release does not introduce breaking changes to the public API.
  • Highly recommended for projects using intensive NUI workflows or parallel execution.
  • Compatible with the v0.2.x series.

v0.2.8

08 Jan 20:32
1ca230f

Choose a tag to compare

Full Changelog: v0.2.7...v0.2.8

Changes

  • Added a new @command decorator overload supporting CommandConfig + Zod schema for type-safe command validation.
  • Introduced a SessionRecoveryService with fallback logic.
  • Emitted a framework event on session recovery to allow proper state rehydration.
  • Added dependency configuration and lifecycle hooks (onReady, waitFor).
  • Implemented automatic core ready emit/receive flow (CORE → RESOURCES).
  • Fixed optional empty handlers in on() listeners.
  • Fixed optional value and typing issues in log level configuration.
  • Removed version pinning from README.

v0.2.7

05 Jan 18:26
d79c050

Choose a tag to compare

What's Changed

Full Changelog: v0.2.6...v0.2.7

v0.2.6

05 Jan 17:22
8520675

Choose a tag to compare

What's Changed

  • chore: add GitHub Actions CI/CD workflows and test scripts by @Flussen in #24
  • refactor: improve type safety and code organization by @Flussen in #25
  • test: Add missing parameters to mock implementations and fix null ret… by @Flussen in #26
  • feat: publish prerelease versions with appropriate npm dist-tags by @Flussen in #27
  • Feature: added unlinkedID method and deleted from the LifeCyclePort, improve framework event. by @Flussen in #28

Full Changelog: v0.2.5...v0.2.6

v0.2.5

05 Jan 17:05
4f0b9c4

Choose a tag to compare

Full Changelog: v0.2.4...v0.2.5

v0.2.4

03 Jan 00:03
810f7c5

Choose a tag to compare

Full Changelog: v0.2.2-beta.1...v0.2.4