☰
VSuite

@vsuite/packs

Loads enterprise agent packs (vsuite-pack.yaml + Liquid templates), verifies them against vsuite.lock.json, merges them with the built-in catalog into one registry, and renders pack entries. Non-goals: the Liquid engine and built-in partials (@vsuite/templates), writing outputs (@vsuite/core), and CLI/UI commands (@vsuite/workflows).

This is a private, source-only workspace package (exports → ./src/index.ts), bundled into the @krizic/vsuite CLI and the UI main process. For authors, see the pack author guide, the template context reference, and the example pack.

Public API

Area Exports Description
Errors PackError, PACK_ERROR_CODES, fromTemplateError, fromLintDiagnostics Every pack failure, with code, pack (config name, or "catalog" for built-ins), file, line, column, hint, and issues. Converts renderer TPL_* errors and MD_LINT diagnostics.
Manifest parseManifest, packManifestSchema, MANIFEST_FILE Validates vsuite-pack.yaml.
Front matter splitFrontMatter, parseFrontMatter, frontMatterSchema Validates template front matter.
Reading readPack, MAX_PACK_FILE_BYTES, MAX_PACK_FILES Reads a pack directory within the layout limits (256 KB per file, 500 files, symlinks inside the pack).
Sources resolvePathSource, resolveNpmSource, parseNpmSpec, resolveGitSource, parseGitSource Resolve path:, npm:, and git:<url>#<ref> sources.
Integrity computeIntegrity, hashPackFiles, INTEGRITY_PREFIX sha256-<base64> over the sorted file list and contents.
Lockfile readLockfile, writeLockfile, verifyLock, pruneLockfile, emptyLockfile, LOCKFILE_NAME, LOCKFILE_VERSION vsuite.lock.json version 2 (reads version 1). path: mismatches warn and relock; npm:/git: mismatches fail with PACK_INTEGRITY unless updates are allowed.
Registry loadRegistry, mergeRegistry, defaultRegistryCatalog, sameLock Loads every configured pack and merges it with the catalog: new ids are added, matching ids override the built-in when selected with source: "pack:<name>".
Rendering renderAgentEntry, renderSkillEntry Render one pack entry with the shared template context; required sections are auto-appended.
Semver satisfies Checks the manifest vsuite range.

Dependencies

  • Workspace: @vsuite/catalog, @vsuite/config, @vsuite/templates. Dev: @vsuite/test-utils.
  • Third-party: yaml, zod.
  • Used by: @vsuite/core, @vsuite/workflows.

Testing

pnpm vitest run --project @vsuite/packs