Skip to content

[codex] Extract shared Lua core#1

Merged
ruttydm merged 1 commit intomainfrom
codex/share-lua-core
Apr 1, 2026
Merged

[codex] Extract shared Lua core#1
ruttydm merged 1 commit intomainfrom
codex/share-lua-core

Conversation

@ruttydm
Copy link
Copy Markdown
Contributor

@ruttydm ruttydm commented Apr 1, 2026

What changed

This extracts the PHP-side shared Lua core into opencompanyapp/integration-core.

The package now includes:

  • a host-facing LuaToolInvoker contract
  • a shared LuaBridge for routing app.* calls to tool slugs
  • a shared LuaCatalogBuilder for namespace/function/parameter map generation
  • a shared LuaDocRenderer for namespace docs, function docs, search, and summaries

Why

OpenCompany and KosmoKrator need to share the same Lua-facing bridge/catalog/docs layer without duplicating the path routing and doc generation logic in each host.

Keeping this in integration-core preserves a small package surface:

  • integration-core owns shared tool contracts and shared Lua PHP logic
  • integration-* packages stay focused on actual integrations
  • the native lua-sandbox runtime remains separate
  • prism-relay remains focused on provider normalization

Impact

This PR does not yet wire host applications to the extracted classes by itself. It establishes the reusable package layer that host adapters can consume.

Validation

Validated by syntax-checking the new PHP files and then consuming the extracted classes from OpenCompany locally, where the affected Lua feature tests passed:

  • tests/Feature/LuaApiDocGeneratorTest.php
  • tests/Feature/LuaBridgeTest.php
  • tests/Feature/Tools/LuaExecTest.php

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