[PR #3693] [MERGED] feat: expose capability API 1.3 host services #6053

Closed
opened 2026-10-23 04:06:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3693
Author: @thetopham
Created: 7/16/2026
Status: ✅ Merged
Merged: 7/16/2026
Merged by: @SpicyMarinara

Base: staging ← Head: release/hierarchical-maps-api-1.2-engine-2.3


📝 Commits (10+)

  • 08fcbf1 Expose capability runtime logging API
  • 7c309d5 Merge remote-tracking branch 'origin/staging' into feature/capability-runtime-logging
  • 000d0d3 Expose transactional capability persistence API
  • 5aba152 Extend capability definition persistence
  • 81eb8d9 Vary classic Game map topology
  • 940417c Expose capability route resources
  • c797c0d Bridge Maps client capability state
  • a56e50e Expose capability client recovery states
  • 8afe4a2 Increase capability recovery touch targets
  • 20bd419 Restore spatial prompt and checkpoint parity

📊 Changes

42 files changed (+2173 additions, -134 deletions)

View changed files

📝 docs/development/optional-agent-packages.md (+17 -0)
📝 e2e/core-flows.e2e.ts (+106 -5)
➕ packages/client/src/components/agents/FeatureAgentDetailHost.tsx (+187 -0)
📝 packages/client/src/components/capabilities/CapabilityElement.tsx (+308 -6)
📝 packages/client/src/components/chat/ChatInput.tsx (+1 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+44 -6)
📝 packages/client/src/components/game/GameInput.tsx (+1 -0)
📝 packages/client/src/components/game/GameMap.tsx (+4 -0)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+24 -0)
📝 packages/client/src/components/game/GameSurface.tsx (+3 -0)
📝 packages/client/src/components/layout/AppShell.tsx (+92 -3)
📝 packages/client/src/hooks/use-capability-packages.ts (+153 -6)
📝 packages/server/src/db/schema/checkpoints.ts (+4 -0)
📝 packages/server/src/routes/chats.routes.ts (+135 -25)
📝 packages/server/src/routes/game.routes.ts (+21 -12)
📝 packages/server/src/routes/generate.routes.ts (+3 -4)
📝 packages/server/src/routes/generate/dry-run-route.ts (+0 -1)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+10 -2)
📝 packages/server/src/routes/generate/retry-agents-route.ts (+6 -6)
📝 packages/server/src/routes/lorebooks.routes.ts (+1 -1)

...and 22 more files

📄 Description

Linked issue

Closes #3690

Why this change

  • Engine staging exposes capability API 1.0, so it rejects downloadable packages that require the generic API 1.3 host contract.
  • Packages need safe access to Engine-owned persistence, history, resources, model routing, logging, and client contribution lifecycle without importing private Engine code.
  • Hierarchical Maps is the first consumer, but its implementation remains package-owned in Pasta-Devs/Marinara-Agents.

What changed

  • Expose capability API 1.3 with public package logging, language-model, normalized resource, route, persistence, definition-metadata, transaction, and history/checkpoint operations.
  • Add package-generic client-module loading, readiness, error, retry, contribution-host behavior, and feature-agent detail hosting.
  • Delegate spatial prompt/history compatibility calls through registered package services instead of passing Engine database objects into the package.
  • Preserve Engine ownership of storage integrity, chat/message/swipe/checkpoint transactions, provider credentials, package loading, shared contracts, and compatibility handling.
  • Keep Maps source, drafting, routes, movement/domain logic, prompt formatting, package UI, manifests, bundles, artifacts, and catalog entries out of Marinara Engine.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Current merged-head validation at d1308698c:
    • pnpm check — passed.
    • pnpm regression:spatial — passed.
    • pnpm regression:prompt — passed.
    • git diff --check — passed.
    • Capability package lifecycle regression — passed.
    • Browser matrix — 25 passed, with 7 intentional mobile skips reserved for real-device sign-off.
  • Merged current staging (29f8b7d6e). The earlier chat settings conflict was resolved in favor of staging's package-owned settings placement; the server route resolution retains both API 1.3 game-state parsing and staging's speaker-tag cleanup. The latest staging sync merged without additional conflicts.
  • The validated API 1.3 implementation baseline 7d5c09975abfd28e7e5e6645ff3b0bdeef86e1d7 is merged with the CodeRabbit correctness fixes at current head d1308698c.
  • Earlier paired-candidate sign-off confirmed package readiness, visible retry recovery, uninstall/reinstall recovery, and unchanged definition/snapshot fingerprints.
  • Real-device host-layout failures remain tracked in #3691 and Pasta-Devs/Marinara-Agents#51.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

This PR targets staging and does not directly prepare or publish a main release. The paired package work is Pasta-Devs/Marinara-Agents#50 and Pasta-Devs/Marinara-Agents#52.

UI evidence (if applicable)

No screenshots are attached. Engine supplies generic contribution hosts and package loading/recovery states; all Hierarchical Maps presentation belongs to Marinara Agents. Known real-device mobile issues are tracked separately in #3691 and Pasta-Devs/Marinara-Agents#51.

Summary by CodeRabbit

  • New Features

    • Added richer capability runtime support for logging, language models, resources, persistence, transactions, and spatial snapshots.
    • Improved capability loading and runtime error states with clearer messages and retry controls.
    • Added checkpoint snapshot preservation and safer restoration behavior.
    • Enhanced lorebook content in live prompt previews.
    • Improved spatial transition handling and map generation guidance.
  • Bug Fixes

    • Ensured chat and game-state timestamps remain correctly ordered.
    • Added support for restoring checkpoint messages as visible game-state anchors.

🔄 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/3693 **Author:** [@thetopham](https://github.com/thetopham) **Created:** 7/16/2026 **Status:** ✅ Merged **Merged:** 7/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `release/hierarchical-maps-api-1.2-engine-2.3` --- ### 📝 Commits (10+) - [`08fcbf1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/08fcbf1eaabe47fc3b450c0b4a733a01cde81cd6) Expose capability runtime logging API - [`7c309d5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7c309d5b66b0a69b872551f1f30faa5b21218f3b) Merge remote-tracking branch 'origin/staging' into feature/capability-runtime-logging - [`000d0d3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/000d0d37ec2fa970a9e53acfe9f02e3b4e0a44fa) Expose transactional capability persistence API - [`5aba152`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5aba1529c427a3b1296d90f205ff6221334918b8) Extend capability definition persistence - [`81eb8d9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/81eb8d94b8cc72277f01e12bb7d4ca358aae38da) Vary classic Game map topology - [`940417c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/940417c2693fc303365872a38b548a7d2cd344f1) Expose capability route resources - [`c797c0d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c797c0da1500d25776c8f74b5b246a90adf5a588) Bridge Maps client capability state - [`a56e50e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a56e50e1354e3c6518ea08d9591c52d8f7a2bce1) Expose capability client recovery states - [`8afe4a2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8afe4a2857ae5731a494dcc765a20ebfddbfbaef) Increase capability recovery touch targets - [`20bd419`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20bd419e9bd5b5550f3e26e068cd083aa4ff8745) Restore spatial prompt and checkpoint parity ### 📊 Changes **42 files changed** (+2173 additions, -134 deletions) <details> <summary>View changed files</summary> 📝 `docs/development/optional-agent-packages.md` (+17 -0) 📝 `e2e/core-flows.e2e.ts` (+106 -5) ➕ `packages/client/src/components/agents/FeatureAgentDetailHost.tsx` (+187 -0) 📝 `packages/client/src/components/capabilities/CapabilityElement.tsx` (+308 -6) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+1 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+44 -6) 📝 `packages/client/src/components/game/GameInput.tsx` (+1 -0) 📝 `packages/client/src/components/game/GameMap.tsx` (+4 -0) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+24 -0) 📝 `packages/client/src/components/game/GameSurface.tsx` (+3 -0) 📝 `packages/client/src/components/layout/AppShell.tsx` (+92 -3) 📝 `packages/client/src/hooks/use-capability-packages.ts` (+153 -6) 📝 `packages/server/src/db/schema/checkpoints.ts` (+4 -0) 📝 `packages/server/src/routes/chats.routes.ts` (+135 -25) 📝 `packages/server/src/routes/game.routes.ts` (+21 -12) 📝 `packages/server/src/routes/generate.routes.ts` (+3 -4) 📝 `packages/server/src/routes/generate/dry-run-route.ts` (+0 -1) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+10 -2) 📝 `packages/server/src/routes/generate/retry-agents-route.ts` (+6 -6) 📝 `packages/server/src/routes/lorebooks.routes.ts` (+1 -1) _...and 22 more files_ </details> ### 📄 Description ## Linked issue Closes #3690 ## Why this change - Engine `staging` exposes capability API 1.0, so it rejects downloadable packages that require the generic API 1.3 host contract. - Packages need safe access to Engine-owned persistence, history, resources, model routing, logging, and client contribution lifecycle without importing private Engine code. - Hierarchical Maps is the first consumer, but its implementation remains package-owned in `Pasta-Devs/Marinara-Agents`. ## What changed - Expose capability API 1.3 with public package logging, language-model, normalized resource, route, persistence, definition-metadata, transaction, and history/checkpoint operations. - Add package-generic client-module loading, readiness, error, retry, contribution-host behavior, and feature-agent detail hosting. - Delegate spatial prompt/history compatibility calls through registered package services instead of passing Engine database objects into the package. - Preserve Engine ownership of storage integrity, chat/message/swipe/checkpoint transactions, provider credentials, package loading, shared contracts, and compatibility handling. - Keep Maps source, drafting, routes, movement/domain logic, prompt formatting, package UI, manifests, bundles, artifacts, and catalog entries out of Marinara Engine. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Current merged-head validation at `d1308698c`: - `pnpm check` — passed. - `pnpm regression:spatial` — passed. - `pnpm regression:prompt` — passed. - `git diff --check` — passed. - Capability package lifecycle regression — passed. - Browser matrix — 25 passed, with 7 intentional mobile skips reserved for real-device sign-off. - Merged current `staging` (`29f8b7d6e`). The earlier chat settings conflict was resolved in favor of staging's package-owned settings placement; the server route resolution retains both API 1.3 game-state parsing and staging's speaker-tag cleanup. The latest staging sync merged without additional conflicts. - The validated API 1.3 implementation baseline `7d5c09975abfd28e7e5e6645ff3b0bdeef86e1d7` is merged with the CodeRabbit correctness fixes at current head `d1308698c`. - Earlier paired-candidate sign-off confirmed package readiness, visible retry recovery, uninstall/reinstall recovery, and unchanged definition/snapshot fingerprints. - Real-device host-layout failures remain tracked in #3691 and Pasta-Devs/Marinara-Agents#51. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) This PR targets `staging` and does not directly prepare or publish a `main` release. The paired package work is Pasta-Devs/Marinara-Agents#50 and Pasta-Devs/Marinara-Agents#52. ## UI evidence (if applicable) No screenshots are attached. Engine supplies generic contribution hosts and package loading/recovery states; all Hierarchical Maps presentation belongs to Marinara Agents. Known real-device mobile issues are tracked separately in #3691 and Pasta-Devs/Marinara-Agents#51. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added richer capability runtime support for logging, language models, resources, persistence, transactions, and spatial snapshots. * Improved capability loading and runtime error states with clearer messages and retry controls. * Added checkpoint snapshot preservation and safer restoration behavior. * Enhanced lorebook content in live prompt previews. * Improved spatial transition handling and map generation guidance. * **Bug Fixes** * Ensured chat and game-state timestamps remain correctly ordered. * Added support for restoring checkpoint messages as visible game-state anchors. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:06:38 +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#6053
No description provided.