[GH-ISSUE #3848] [Issue]: Remove obsolete shared registries and redundant public surface #2079

Closed
opened 2026-10-21 05:45:12 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Xelvanis on GitHub (Jul 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3848

Originally assigned to: @SpicyMarinara on GitHub.

Summary

The shared package retains three groups of unnecessary surface: obsolete package-extraction registries, unused public exports, and duplicate representations. The live registries and tool definitions still affect Engine behavior, but the extra generators, branches, modules, aliases, and array copy do not.

Expected behavior

The base Engine should generate and publicly export only live shared contracts. Package-owned agents and turn games should be represented through the active runtime registries, without empty bundled registries suggesting that the base Engine can still ship implementations. Generated built-in tools should have one canonical array without changing the existing mutable public type or tool order, and presence status should use one canonical type name.

Actual behavior

Package-extraction fossils

  • packages/shared/scripts/generate-feature-registries.mjs still scans for bundled agents and turn games even though package extraction removed every corresponding manifest from the Engine repository.
  • Those branches regenerate permanently empty agent-registry.generated.ts and registry.generated.ts files on every shared build.
  • BUNDLED_AGENT_MANIFESTS is permanently empty, and isBuiltInAgentHiddenFromLibrary() has no consumer.
  • BUNDLED_TURN_GAME_ENGINES is permanently empty. The only reset caller passes false, so the includeBundled branch can never repopulate the registry. listTurnGameTypes() also has no consumer.

Unused public exports

  • types/vn and constants/chat-modes are exported from the shared root without a client, server, script, or Marinara-Agents source consumer.
  • Root export * declarations also expose agent and turn-game registry implementation helpers that have no client, server, or official package consumer.

Duplicate representations

  • The generated BUILT_IN_TOOL_MANIFESTS array is immediately shallow-copied into public BUILT_IN_TOOLS. Client and server consumers are non-mutating: they only iterate, filter, find, or test membership.
  • ConversationManualPresenceStatus is an exact alias of ConversationPresenceStatus and is used only by ConversationStatusOverride.status.

Steps to reproduce

  1. Run or inspect packages/shared/scripts/generate-feature-registries.mjs in the current Engine tree.
  2. Observe that the agent and turn-game scans find no manifests and emit empty arrays.
  3. Trace BUNDLED_AGENT_MANIFESTS, isBuiltInAgentHiddenFromLibrary, BUNDLED_TURN_GAME_ENGINES, the includeBundled reset path, and listTurnGameTypes; none has a live behavior consumer.
  4. Trace every symbol from types/vn and constants/chat-modes; none is imported by Engine or Marinara-Agents source.
  5. Trace BUILT_IN_TOOL_MANIFESTS into BUILT_IN_TOOLS and observe that the latter is only a shallow copy with non-mutating consumers.
  6. Trace ConversationManualPresenceStatus and observe that it only renames ConversationPresenceStatus for one interface property.

Environment

  • Marinara Engine version: staging checkout, package version 2.3.3
  • Install type: source
  • OS + version: Not environment-dependent
  • Browser or app shell: Not applicable

Logs, screenshots, or video

Not applicable; this is a static shared-contract and package-boundary trace.

Additional context

For the package-extraction portion, commit 5610c23f moved the concrete agents and turn games into downloadable packages. It intentionally changed both bundled registries to permanent empty arrays, but left their generators, reset branches, and root-public helpers in place.

Proposed scope:

Package-extraction fossils

  • Remove the agent and turn-game order lists, generator calls, and empty generated outputs from the Engine repository. Keep the tool registry generator.
  • Remove BUNDLED_AGENT_MANIFESTS and isBuiltInAgentHiddenFromLibrary().
  • Remove BUNDLED_TURN_GAME_ENGINES and listTurnGameTypes(), simplify resetTurnGameRegistry() to clear only the active registry, and update its sole caller from resetTurnGameRegistry(false) to resetTurnGameRegistry().

Unused public exports

  • Delete the unused types/vn and constants/chat-modes modules and their root-barrel exports. Update documentation and comments that still present CHAT_MODES as a source of truth.
  • Replace the two broad registry barrel exports with the live host API only:
    • Agent registry: BUILT_IN_AGENT_MANIFESTS, getBuiltInAgentDefaultPrompt, and isBuiltInAgentRuntimeDisabled.
    • Turn-game registry: registerTurnGameEngine, resetTurnGameRegistry, getTurnGameEngine, listTurnGames, and, if retained as a named public return type, TurnGameSummary.
  • Keep getBuiltInAgentManifest and replaceBuiltInAgentManifestRegistry available to shared internals through direct imports, but stop exposing them from the package root.

Duplicate representations

  • Generate the canonical tool array directly as BUILT_IN_TOOLS: ToolDefinition[] and re-export it from tool-definitions.ts. Preserve TOOL_ORDER and the existing mutable public type; do not retain a second array or cast away readonly.
  • Remove ConversationManualPresenceStatus and type ConversationStatusOverride.status directly as ConversationPresenceStatus.

Acceptance criteria:

  • A shared build no longer creates empty agent or turn-game generated registries.
  • The base Engine exposes no bundled-agent or bundled-game reset path.
  • The shared root no longer exposes registry implementation helpers without a client, server, or official package consumer.
  • Exactly one built-in tool array is generated and exposed as mutable ToolDefinition[], with unchanged ordering and contents.
  • ConversationStatusOverride.status uses ConversationPresenceStatus directly, with no duplicate alias.
  • Active package installation, activation, deactivation, and registry refresh behavior is unchanged.
  • The turn-game catalog continues to list dynamically registered package games.
  • The shared package, Engine client/server, and affected Marinara-Agents packages build successfully.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jul 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3848 Originally assigned to: @SpicyMarinara on GitHub. ## Summary The shared package retains three groups of unnecessary surface: obsolete package-extraction registries, unused public exports, and duplicate representations. The live registries and tool definitions still affect Engine behavior, but the extra generators, branches, modules, aliases, and array copy do not. ## Expected behavior The base Engine should generate and publicly export only live shared contracts. Package-owned agents and turn games should be represented through the active runtime registries, without empty bundled registries suggesting that the base Engine can still ship implementations. Generated built-in tools should have one canonical array without changing the existing mutable public type or tool order, and presence status should use one canonical type name. ## Actual behavior ### Package-extraction fossils - `packages/shared/scripts/generate-feature-registries.mjs` still scans for bundled agents and turn games even though package extraction removed every corresponding manifest from the Engine repository. - Those branches regenerate permanently empty `agent-registry.generated.ts` and `registry.generated.ts` files on every shared build. - `BUNDLED_AGENT_MANIFESTS` is permanently empty, and `isBuiltInAgentHiddenFromLibrary()` has no consumer. - `BUNDLED_TURN_GAME_ENGINES` is permanently empty. The only reset caller passes `false`, so the `includeBundled` branch can never repopulate the registry. `listTurnGameTypes()` also has no consumer. ### Unused public exports - `types/vn` and `constants/chat-modes` are exported from the shared root without a client, server, script, or Marinara-Agents source consumer. - Root `export *` declarations also expose agent and turn-game registry implementation helpers that have no client, server, or official package consumer. ### Duplicate representations - The generated `BUILT_IN_TOOL_MANIFESTS` array is immediately shallow-copied into public `BUILT_IN_TOOLS`. Client and server consumers are non-mutating: they only iterate, filter, find, or test membership. - `ConversationManualPresenceStatus` is an exact alias of `ConversationPresenceStatus` and is used only by `ConversationStatusOverride.status`. ## Steps to reproduce 1. Run or inspect `packages/shared/scripts/generate-feature-registries.mjs` in the current Engine tree. 2. Observe that the agent and turn-game scans find no manifests and emit empty arrays. 3. Trace `BUNDLED_AGENT_MANIFESTS`, `isBuiltInAgentHiddenFromLibrary`, `BUNDLED_TURN_GAME_ENGINES`, the `includeBundled` reset path, and `listTurnGameTypes`; none has a live behavior consumer. 4. Trace every symbol from `types/vn` and `constants/chat-modes`; none is imported by Engine or Marinara-Agents source. 5. Trace `BUILT_IN_TOOL_MANIFESTS` into `BUILT_IN_TOOLS` and observe that the latter is only a shallow copy with non-mutating consumers. 6. Trace `ConversationManualPresenceStatus` and observe that it only renames `ConversationPresenceStatus` for one interface property. ## Environment - Marinara Engine version: staging checkout, package version 2.3.3 - Install type: source - OS + version: Not environment-dependent - Browser or app shell: Not applicable ## Logs, screenshots, or video Not applicable; this is a static shared-contract and package-boundary trace. ## Additional context For the package-extraction portion, commit `5610c23f` moved the concrete agents and turn games into downloadable packages. It intentionally changed both bundled registries to permanent empty arrays, but left their generators, reset branches, and root-public helpers in place. Proposed scope: ### Package-extraction fossils - Remove the agent and turn-game order lists, generator calls, and empty generated outputs from the Engine repository. Keep the tool registry generator. - Remove `BUNDLED_AGENT_MANIFESTS` and `isBuiltInAgentHiddenFromLibrary()`. - Remove `BUNDLED_TURN_GAME_ENGINES` and `listTurnGameTypes()`, simplify `resetTurnGameRegistry()` to clear only the active registry, and update its sole caller from `resetTurnGameRegistry(false)` to `resetTurnGameRegistry()`. ### Unused public exports - Delete the unused `types/vn` and `constants/chat-modes` modules and their root-barrel exports. Update documentation and comments that still present `CHAT_MODES` as a source of truth. - Replace the two broad registry barrel exports with the live host API only: - Agent registry: `BUILT_IN_AGENT_MANIFESTS`, `getBuiltInAgentDefaultPrompt`, and `isBuiltInAgentRuntimeDisabled`. - Turn-game registry: `registerTurnGameEngine`, `resetTurnGameRegistry`, `getTurnGameEngine`, `listTurnGames`, and, if retained as a named public return type, `TurnGameSummary`. - Keep `getBuiltInAgentManifest` and `replaceBuiltInAgentManifestRegistry` available to shared internals through direct imports, but stop exposing them from the package root. ### Duplicate representations - Generate the canonical tool array directly as `BUILT_IN_TOOLS: ToolDefinition[]` and re-export it from `tool-definitions.ts`. Preserve `TOOL_ORDER` and the existing mutable public type; do not retain a second array or cast away `readonly`. - Remove `ConversationManualPresenceStatus` and type `ConversationStatusOverride.status` directly as `ConversationPresenceStatus`. Acceptance criteria: - A shared build no longer creates empty agent or turn-game generated registries. - The base Engine exposes no bundled-agent or bundled-game reset path. - The shared root no longer exposes registry implementation helpers without a client, server, or official package consumer. - Exactly one built-in tool array is generated and exposed as mutable `ToolDefinition[]`, with unchanged ordering and contents. - `ConversationStatusOverride.status` uses `ConversationPresenceStatus` directly, with no duplicate alias. - Active package installation, activation, deactivation, and registry refresh behavior is unchanged. - The turn-game catalog continues to list dynamically registered package games. - The shared package, Engine client/server, and affected Marinara-Agents packages build successfully. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:12 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

@SpicyMarinara is taking this. I’ll remove only the package-extraction fossils and redundant shared exports/representations listed here, keeping active package registration and catalog behavior unchanged.

<!-- gh-comment-id:5020079710 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): @SpicyMarinara is taking this. I’ll remove only the package-extraction fossils and redundant shared exports/representations listed here, keeping active package registration and catalog behavior unchanged.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 20, 2026):

Addressed in #3853 and merged into staging.

<!-- gh-comment-id:5020383612 --> @SpicyMarinara commented on GitHub (Jul 20, 2026): Addressed in #3853 and merged into staging.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2079
No description provided.