[GH-ISSUE #186] [Issue]: Long-Term Memory omits saved admin secret from privileged API requests #95

Closed
opened 2026-10-20 17:24:19 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Aug 2, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/186

Originally assigned to: @Promansis on GitHub.

Summary

Long-Term Memory cannot load its status or settings when Marinara Engine is hosted remotely and requires admin-secret authentication. The package's client makes direct fetch calls without forwarding the admin secret already saved by the Engine UI.

Affected package

long-term-memory (currently 1.0.8)

Expected behavior

Long-Term Memory requests should use the saved marinara_admin_secret browser value as the X-Admin-Secret header, matching Marinara Engine's shared API client. Status, settings, and package downloads should load normally when the configured secret is valid.

Actual behavior

The user sees:

  • Long-Term Memory status could not load.
  • Could not load memory settings
  • An admin-secret error despite the secret being saved in the browser

The package registers its routes through registerPrivilegedRoutes, so remote requests receive 403 when the header is absent. Reinstalling the package and restarting Engine do not change the behavior.

Steps to reproduce

  1. Run Marinara Engine on a Raspberry Pi Linux host and access it from another device/browser rather than through loopback.
  2. Configure ADMIN_SECRET on the Engine and save the same value in Settings -> Advanced -> Admin Access.
  3. Install and activate Long-Term Memory, then open its detail view.
  4. Observe the status and Memory Settings requests fail with the messages above.
  5. In browser network tools, compare Long-Term Memory requests with Engine API requests: the Long-Term Memory requests omit X-Admin-Secret.

Environment

  • Marinara Engine version: Latest reported by user
  • Package version: 1.0.8
  • Install type: Downloaded agent package
  • OS + version: Raspberry Pi Linux
  • Browser or app shell: Browser, exact browser not reported

Logs, screenshots, or video

No logs or screenshots supplied. Do not include the admin secret or private chat data in follow-up evidence.

Additional context

Root cause identified in the package source:

  • packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts calls fetch without the Engine's saved admin-secret header.
  • ActivityView.tsx and MemorySettings.tsx also use direct fetches for downloads.
  • The Engine API client reads marinara_admin_secret from local storage and sends X-Admin-Secret.

Smallest fix: add the saved admin-secret header in the shared Long-Term Memory request path, reuse it for the two direct download requests, add a regression assertion, bump the package version, and rebuild the Long-Term Memory artifact/catalog entry. No server privilege change is needed.

Target branch: staging.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Aug 2, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/186 Originally assigned to: @Promansis on GitHub. ## Summary Long-Term Memory cannot load its status or settings when Marinara Engine is hosted remotely and requires admin-secret authentication. The package's client makes direct `fetch` calls without forwarding the admin secret already saved by the Engine UI. ## Affected package `long-term-memory` (currently `1.0.8`) ## Expected behavior Long-Term Memory requests should use the saved `marinara_admin_secret` browser value as the `X-Admin-Secret` header, matching Marinara Engine's shared API client. Status, settings, and package downloads should load normally when the configured secret is valid. ## Actual behavior The user sees: - `Long-Term Memory status could not load.` - `Could not load memory settings` - An admin-secret error despite the secret being saved in the browser The package registers its routes through `registerPrivilegedRoutes`, so remote requests receive `403` when the header is absent. Reinstalling the package and restarting Engine do not change the behavior. ## Steps to reproduce 1. Run Marinara Engine on a Raspberry Pi Linux host and access it from another device/browser rather than through loopback. 2. Configure `ADMIN_SECRET` on the Engine and save the same value in Settings -> Advanced -> Admin Access. 3. Install and activate Long-Term Memory, then open its detail view. 4. Observe the status and Memory Settings requests fail with the messages above. 5. In browser network tools, compare Long-Term Memory requests with Engine API requests: the Long-Term Memory requests omit `X-Admin-Secret`. ## Environment - Marinara Engine version: Latest reported by user - Package version: `1.0.8` - Install type: Downloaded agent package - OS + version: Raspberry Pi Linux - Browser or app shell: Browser, exact browser not reported ## Logs, screenshots, or video No logs or screenshots supplied. Do not include the admin secret or private chat data in follow-up evidence. ## Additional context Root cause identified in the package source: - `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/api.ts` calls `fetch` without the Engine's saved admin-secret header. - `ActivityView.tsx` and `MemorySettings.tsx` also use direct fetches for downloads. - The Engine API client reads `marinara_admin_secret` from local storage and sends `X-Admin-Secret`. Smallest fix: add the saved admin-secret header in the shared Long-Term Memory request path, reuse it for the two direct download requests, add a regression assertion, bump the package version, and rebuild the Long-Term Memory artifact/catalog entry. No server privilege change is needed. Target branch: `staging`. ## Template check - [ ] I DID NOT read this template and provide the requested details.
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-Agents#95
No description provided.