[PR #1668] [MERGED] Clean up unused Knip exports across engine and feature slices #5200

Closed
opened 2026-10-22 04:14:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1668
Author: @cha1latte
Created: 5/30/2026
Status: ✅ Merged
Merged: 5/30/2026
Merged by: @cha1latte

Base: refactor ← Head: knip/integration-cleanup


📝 Commits (8)

  • 07eda0e Remove unused feature exports
  • 044a2e9 Remove unused engine helper exports
  • 1352992 Remove unused mode exports
  • 31d9bf9 Remove unused contract exports
  • 515d29a Merge branch 'knip/ai2-engine-helpers' into knip/integration-cleanup
  • 2b4d8d8 Merge branch 'knip/ai3-modes' into knip/integration-cleanup
  • db4c1e1 Merge branch 'knip/ai4-contracts' into knip/integration-cleanup
  • 3db7894 Remove unused agent and Mari exports

📊 Changes

65 files changed (+173 additions, -1240 deletions)

View changed files

📝 src/engine/agents-runtime/debug.ts (+1 -1)
📝 src/engine/agents-runtime/executor/agent-executor.ts (+5 -13)
📝 src/engine/agents-runtime/knowledge/knowledge-router.ts (+8 -8)
📝 src/engine/agents-runtime/pipeline/agent-pipeline.ts (+3 -10)
📝 src/engine/contracts/constants/image-generation-defaults.ts (+6 -22)
📝 src/engine/contracts/constants/model-lists.ts (+9 -114)
📝 src/engine/contracts/constants/providers.ts (+1 -1)
📝 src/engine/contracts/schemas/agent.schema.ts (+2 -2)
📝 src/engine/contracts/schemas/character.schema.ts (+4 -4)
📝 src/engine/contracts/schemas/chat.schema.ts (+2 -2)
📝 src/engine/contracts/schemas/connection.schema.ts (+1 -1)
📝 src/engine/contracts/schemas/custom-tool.schema.ts (+1 -1)
📝 src/engine/contracts/schemas/lorebook.schema.ts (+6 -6)
📝 src/engine/contracts/schemas/prompt.schema.ts (+8 -8)
📝 src/engine/contracts/schemas/regex.schema.ts (+1 -1)
📝 src/engine/core/clock.ts (+0 -9)
📝 src/engine/core/ids.ts (+0 -4)
📝 src/engine/core/json.ts (+0 -4)
📝 src/engine/generation-core/llm/base-provider.ts (+1 -1)
📝 src/engine/generation-core/lorebooks/game-lorebook-scope.ts (+1 -6)

...and 45 more files

📄 Description

Linked issue

N/A

Why this change

  • Cleans up unused Knip export findings across feature, engine helper, mode, contract, agent-runtime, and Mari slices.
  • Keeps remaining public contract/capability surfaces intact instead of blindly deleting API-looking exports.

What changed

  • Localized or removed unused private exports reported by knip --exports.
  • Removed duplicate/unused feature exports, engine helper exports, mode helper exports, and agent/Mari internal helper exports.
  • Preserved contract, capability, and Mari type surfaces that appear to be intentional public API candidates.

Refactor impact

Primary owner:

Knip/export cleanup across engine, feature, contracts, agents-runtime, and Mari surfaces.

Impact areas reviewed:

  • Feature catalog/runtime exports
  • Engine helper exports
  • Chat, game, and roleplay mode exports
  • Contract schema/constants exports
  • Agents-runtime and Mari helper exports

Boundary notes:

  • No runtime behavior changes intended.
  • Contract/capability type surfaces were treated as public-surface-risk and left for a separate policy decision where uncertain.
  • Remaining knip --exports findings are intentionally documented rather than hidden by config in this PR.

Pressure points touched:

  • Engine generation helpers
  • Mode-owned engine files for chat/game/roleplay
  • Contract schema/type files
  • Agents-runtime internals
  • Mari internals
  • Feature catalog/runtime helper exports

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Codex ran pnpm typecheck: passed.
  • Codex ran pnpm build: passed, with the existing Vite large-chunk warning.
  • Codex ran pnpm exec knip --files --no-config-hints: passed.
  • Codex ran pnpm exec knip --dependencies --no-config-hints: passed.
  • Codex ran pnpm exec knip --exports --no-config-hints: still reports 10 unused exports and 120 unused exported types, preserved as public contract/capability/Mari surface candidates for a separate policy/API decision.
  • Codex ran git diff --check upstream/refactor...HEAD: passed.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A. This is a static export cleanup with no intended UI behavior changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1668 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/30/2026 **Status:** ✅ Merged **Merged:** 5/30/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `knip/integration-cleanup` --- ### 📝 Commits (8) - [`07eda0e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/07eda0e10092752e71c1547724f3203135b3db81) Remove unused feature exports - [`044a2e9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/044a2e9bd7e05c81b07b55693d73c0d85585206e) Remove unused engine helper exports - [`1352992`](https://github.com/Pasta-Devs/Marinara-Engine/commit/13529927119c39163f39e658cb274b7cda170002) Remove unused mode exports - [`31d9bf9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/31d9bf9e3215b6e8cd2b1a3834655486483b22c4) Remove unused contract exports - [`515d29a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/515d29af32f8cde60102bfa39cfc63fb25071784) Merge branch 'knip/ai2-engine-helpers' into knip/integration-cleanup - [`2b4d8d8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2b4d8d8ae00ecb32988779dfec02d76d6a890d8a) Merge branch 'knip/ai3-modes' into knip/integration-cleanup - [`db4c1e1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/db4c1e1c0f6de6228d4676353ccac7ca67b02e2c) Merge branch 'knip/ai4-contracts' into knip/integration-cleanup - [`3db7894`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3db7894c7eba15bbc9fe5d02fd66e79190bdac6e) Remove unused agent and Mari exports ### 📊 Changes **65 files changed** (+173 additions, -1240 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/agents-runtime/debug.ts` (+1 -1) 📝 `src/engine/agents-runtime/executor/agent-executor.ts` (+5 -13) 📝 `src/engine/agents-runtime/knowledge/knowledge-router.ts` (+8 -8) 📝 `src/engine/agents-runtime/pipeline/agent-pipeline.ts` (+3 -10) 📝 `src/engine/contracts/constants/image-generation-defaults.ts` (+6 -22) 📝 `src/engine/contracts/constants/model-lists.ts` (+9 -114) 📝 `src/engine/contracts/constants/providers.ts` (+1 -1) 📝 `src/engine/contracts/schemas/agent.schema.ts` (+2 -2) 📝 `src/engine/contracts/schemas/character.schema.ts` (+4 -4) 📝 `src/engine/contracts/schemas/chat.schema.ts` (+2 -2) 📝 `src/engine/contracts/schemas/connection.schema.ts` (+1 -1) 📝 `src/engine/contracts/schemas/custom-tool.schema.ts` (+1 -1) 📝 `src/engine/contracts/schemas/lorebook.schema.ts` (+6 -6) 📝 `src/engine/contracts/schemas/prompt.schema.ts` (+8 -8) 📝 `src/engine/contracts/schemas/regex.schema.ts` (+1 -1) 📝 `src/engine/core/clock.ts` (+0 -9) 📝 `src/engine/core/ids.ts` (+0 -4) 📝 `src/engine/core/json.ts` (+0 -4) 📝 `src/engine/generation-core/llm/base-provider.ts` (+1 -1) 📝 `src/engine/generation-core/lorebooks/game-lorebook-scope.ts` (+1 -6) _...and 45 more files_ </details> ### 📄 Description ## Linked issue N/A ## Why this change - Cleans up unused Knip export findings across feature, engine helper, mode, contract, agent-runtime, and Mari slices. - Keeps remaining public contract/capability surfaces intact instead of blindly deleting API-looking exports. ## What changed - Localized or removed unused private exports reported by `knip --exports`. - Removed duplicate/unused feature exports, engine helper exports, mode helper exports, and agent/Mari internal helper exports. - Preserved contract, capability, and Mari type surfaces that appear to be intentional public API candidates. ## Refactor impact Primary owner: Knip/export cleanup across engine, feature, contracts, agents-runtime, and Mari surfaces. Impact areas reviewed: - Feature catalog/runtime exports - Engine helper exports - Chat, game, and roleplay mode exports - Contract schema/constants exports - Agents-runtime and Mari helper exports Boundary notes: - No runtime behavior changes intended. - Contract/capability type surfaces were treated as public-surface-risk and left for a separate policy decision where uncertain. - Remaining `knip --exports` findings are intentionally documented rather than hidden by config in this PR. Pressure points touched: - Engine generation helpers - Mode-owned engine files for chat/game/roleplay - Contract schema/type files - Agents-runtime internals - Mari internals - Feature catalog/runtime helper exports ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Codex ran `pnpm typecheck`: passed. - Codex ran `pnpm build`: passed, with the existing Vite large-chunk warning. - Codex ran `pnpm exec knip --files --no-config-hints`: passed. - Codex ran `pnpm exec knip --dependencies --no-config-hints`: passed. - Codex ran `pnpm exec knip --exports --no-config-hints`: still reports 10 unused exports and 120 unused exported types, preserved as public contract/capability/Mari surface candidates for a separate policy/API decision. - Codex ran `git diff --check upstream/refactor...HEAD`: passed. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A. This is a static export cleanup with no intended UI behavior changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:14:10 +07:00
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#5200
No description provided.