Skip to content

fix: support memory fragment type and gracefully format validation errors#5

Merged
jessn-dev merged 2 commits into
mainfrom
develop
Jun 26, 2026
Merged

fix: support memory fragment type and gracefully format validation errors#5
jessn-dev merged 2 commits into
mainfrom
develop

Conversation

@jessn-dev

Copy link
Copy Markdown
Owner

This pull request addresses two open bugs related to agenticscope.toml manifest validation:

  1. Support for Memory Fragments (Closes init scaffolds .scope/memory/ but the manifest schema rejects type = "memory" #3)**

    • Added memory to the FragmentType enum so agenticscope init's default scaffolded .scope/memory/ directory correctly passes schema validation.
    • Updated the type precedence mapping and vendor targets to process and correctly render the new memory fragment type in generated context files.
  2. Clean Validation Error Formatting (Closes build dumps a raw ZodError stacktrace on an invalid manifest (lint fails cleanly) #4)**

    • Wrapped loadManifest in a helper function (loadManifestOrExit) across the build, pack, and lint CLI commands.
    • Now, if the manifest violates the Zod schema, the CLI catches the ZodError and elegantly prints the exact validation failures (along with their property paths), rather than instantly crashing and dumping a raw Node stacktrace to the user.

- Added 'memory' to the FragmentType enum so that `init` scaffolds don't fail schema validation. (Closes #3)

- Wrapped manifest loading across all CLI commands (`build`, `pack`, `lint`) to format ZodError validation failures cleanly
  instead of dumping a raw stack trace. (Closes #4)
# Conflicts:
#	CHANGELOG.md
@jessn-dev jessn-dev self-assigned this Jun 26, 2026
@jessn-dev jessn-dev added enhancement New feature or request bug Something isn't working labels Jun 26, 2026
@jessn-dev jessn-dev merged commit 1f341b0 into main Jun 26, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request released

Projects

None yet

2 participants