Module manifest

Module manifest 

Source
Expand description

Manifest file parsing and validation for AGPM projects.

This module handles agpm.toml manifest files for declarative dependency management using a lockfile-based system similar to Cargo.

§Features

  • Git-based source repositories with version constraints
  • Local and remote dependency resolution with transitive support
  • Multi-tool support (claude-code, opencode, agpm, custom)
  • MCP server and hook configuration management
  • TOML patches for customization without forking
  • Cross-platform path handling

§Basic Structure

[sources]
official = "https://github.com/owner/agpm-resources.git"

[agents]
helper = { source = "official", path = "agents/helper.md", version = "v1.0.0" }

[snippets]
utils = "../local/snippets/utils.md"

§Dependency Formats

  • Simple: helper = "../local/helper.md" (local path only)
  • Detailed: { source = "name", path = "path/to/file.md", version = "v1.0.0" }
  • Custom target: Add target = "custom/dir" (relative to tool directory)
  • Custom filename: Add filename = "custom-name.md"

§Version Constraints

Supports semantic versions (v1.0.0), latest, branches (main), commits, and tags.

§Transitive Dependencies

Resources can declare dependencies in YAML frontmatter (Markdown) or JSON fields:

dependencies:
  agents:
    - path: agents/helper.md
      version: v1.0.0

§Security

Never include credentials in agpm.toml. Use ~/.agpm/config.toml for authentication or SSH keys for git@ URLs.

§Integration

Works with crate::resolver for dependency resolution, crate::lockfile for reproducible installations, and crate::git for source management.

Re-exports§

pub use dependency_spec::DependencyMetadata;
pub use dependency_spec::DependencySpec;
pub use helpers::expand_url;
pub use helpers::find_manifest;
pub use helpers::find_manifest_from;
pub use helpers::find_manifest_with_optional;
pub use patches::ManifestPatches;
pub use patches::PatchConflict;
pub use patches::PatchData;
pub use patches::PatchOrigin;
pub use resource_dependency::DetailedDependency;
pub use resource_dependency::ResourceDependency;
pub use tool_config::ArtifactTypeConfig;
pub use tool_config::ResourceConfig;
pub use tool_config::ToolsConfig;
pub use tool_config::WellKnownTool;

Modules§

dependency_spec
Transitive dependency specifications for resources.
helpers
Helper functions for manifest file operations.
patches
Manifest patch support for overriding resource metadata.
resource_dependency
Resource dependency types and implementations.
tool_config
Tool configuration types for multi-tool support.

Structs§

Manifest
ProjectConfig
The main manifest file structure representing a complete agpm.toml file.