[PR #1539] [MERGED] chore(long-term-memory): split the shared schema file into ten area files (#1536) #1536

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1539
Author: @Promansis
Created: 10/21/2026
Status: ✅ Merged
Merged: 10/21/2026
Merged by: @Promansis

Base: staging ← Head: chore(long-term-memory)/schema-split


📝 Commits (2)

  • fab5bb2 chore(long-term-memory): split the shared schema file into ten area files (#1536)
  • d11d928 Merge upstream/staging into chore(long-term-memory)/schema-split; release long-term-memory 1.4.72

📊 Changes

25 files changed (+3573 additions, -3420 deletions)

View changed files

➕ artifacts/long-term-memory-1.4.72.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+4 -0)
📝 packages/long-term-memory/client.js (+24 -24)
📝 packages/long-term-memory/docs/ARCHITECTURE.md (+20 -0)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+64 -64)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts (+2 -2)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+10 -3282)
➕ packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/backup.ts (+46 -0)
➕ packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/debug.ts (+60 -0)
➕ packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/drafts.ts (+604 -0)
➕ packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/identity.ts (+210 -0)
➕ packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/indexes.ts (+369 -0)
➕ packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/notes.ts (+735 -0)

...and 5 more files

📄 Description

Pull request

Linked issue

Closes #1536

Why this change

  • The shared schema file for Long-Term Memory is one 3,282-line module covering settings, notes, drafts, sources and backups. Splitting it by area makes each part reviewable and lets later changes stay small. This is a pure move with no behaviour change.

What changed

  • schema.ts becomes a barrel that re-exports ten area files under schema/ (primitives, settings, debug, recall, notes, indexes, identity, drafts, sources, backup), so every importer keeps its specifier.
  • constants.ts reads its four types from schema/primitives instead, which removes the type-only cycle between constants and schema.
  • The move was made by a script kept outside the repository: it takes each top-level statement of schema.ts by symbol name, writes it unchanged into its part in a fixed order (each part imports only from earlier parts, so every schema is defined before use and the parts cannot form a cycle), adds the imports each part needs, and runs Prettier on the touched files. A second script compared every moved statement with the unsplit file: 377 of 377 verbatim, ignoring an added export. A third found no unresolved import and no value cycle. Seven names that used to be file-private are now exported from their part: LTM_EXTRACTION_MODES, ltmStringRecordSchema, ltmIdentifierSchema, hasLocalCharacterSubject, allowedStoredNoteIdPrefixes, ltmPoliciesConfigSchema, ltmRetrievalConfigSchema.
  • docs/ARCHITECTURE.md lists the new folder and what each file defines; the changelog notes the internal change.
  • Release: long-term-memory 1.4.72 on staging 5ed4568e3, with the CHANGELOG entry, version, manifest, rebuilt server.mjs and client.js, artifact and catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: none; the built bundles grow by about 0.5 KB (server) and 36 bytes (client) from repeated zod imports

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • On the move commit (base 5984f0784): the strict package typecheck (the ten new files are in its scope), npm run check, the package build, the missing-tsc typecheck regression and every Long-Term Memory regression suite pass. On the release head: the package rebuild leaves the tree clean, the catalog, locale and release-notes checks and the typecheck pass, and the storage, routes and installation suites pass. Hosted CI runs the full suite list on this head.
  • Bundle size: server.mjs +554 bytes (one import { z } from "zod" per part, since zod is external in the server build), client.js +36 bytes (module order only).

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

  • Not applicable; no UI change.

🤖 Generated with Claude Code


🔄 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-Agents/pull/1539 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `chore(long-term-memory)/schema-split` --- ### 📝 Commits (2) - [`fab5bb2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/fab5bb29b180a51c8717594d5487ffeb4fa51df6) chore(long-term-memory): split the shared schema file into ten area files (#1536) - [`d11d928`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d11d928016c4348f71df5d8ac05bfa74cd2a3809) Merge upstream/staging into chore(long-term-memory)/schema-split; release long-term-memory 1.4.72 ### 📊 Changes **25 files changed** (+3573 additions, -3420 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.4.72.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+4 -0) 📝 `packages/long-term-memory/client.js` (+24 -24) 📝 `packages/long-term-memory/docs/ARCHITECTURE.md` (+20 -0) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+64 -64) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/constants.ts` (+2 -2) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+10 -3282) ➕ `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/backup.ts` (+46 -0) ➕ `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/debug.ts` (+60 -0) ➕ `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/drafts.ts` (+604 -0) ➕ `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/identity.ts` (+210 -0) ➕ `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/indexes.ts` (+369 -0) ➕ `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema/notes.ts` (+735 -0) _...and 5 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #1536 ## Why this change - The shared schema file for Long-Term Memory is one 3,282-line module covering settings, notes, drafts, sources and backups. Splitting it by area makes each part reviewable and lets later changes stay small. This is a pure move with no behaviour change. ## What changed - `schema.ts` becomes a barrel that re-exports ten area files under `schema/` (`primitives`, `settings`, `debug`, `recall`, `notes`, `indexes`, `identity`, `drafts`, `sources`, `backup`), so every importer keeps its specifier. - `constants.ts` reads its four types from `schema/primitives` instead, which removes the type-only cycle between `constants` and `schema`. - The move was made by a script kept outside the repository: it takes each top-level statement of `schema.ts` by symbol name, writes it unchanged into its part in a fixed order (each part imports only from earlier parts, so every schema is defined before use and the parts cannot form a cycle), adds the imports each part needs, and runs Prettier on the touched files. A second script compared every moved statement with the unsplit file: 377 of 377 verbatim, ignoring an added `export`. A third found no unresolved import and no value cycle. Seven names that used to be file-private are now exported from their part: `LTM_EXTRACTION_MODES`, `ltmStringRecordSchema`, `ltmIdentifierSchema`, `hasLocalCharacterSubject`, `allowedStoredNoteIdPrefixes`, `ltmPoliciesConfigSchema`, `ltmRetrievalConfigSchema`. - `docs/ARCHITECTURE.md` lists the new folder and what each file defines; the changelog notes the internal change. - **Release:** `long-term-memory` 1.4.72 on staging 5ed4568e3, with the CHANGELOG entry, version, manifest, rebuilt `server.mjs` and `client.js`, artifact and catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: none; the built bundles grow by about 0.5 KB (server) and 36 bytes (client) from repeated `zod` imports ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - On the move commit (base 5984f0784): the strict package typecheck (the ten new files are in its scope), `npm run check`, the package build, the missing-tsc typecheck regression and every Long-Term Memory regression suite pass. On the release head: the package rebuild leaves the tree clean, the catalog, locale and release-notes checks and the typecheck pass, and the storage, routes and installation suites pass. Hosted CI runs the full suite list on this head. - Bundle size: `server.mjs` +554 bytes (one `import { z } from "zod"` per part, since zod is external in the server build), `client.js` +36 bytes (module order only). ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) - Not applicable; no UI change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:03:12 +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-Agents#1536
No description provided.