Skip to main content

enterprise_ai.packs.layout

Source: sdks/python/src/enterprise_ai/packs/layout.py. Back to the Python SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Model PackReport​

Validation report of a pack folder: manifest, errors and objects found.

Fields:

NameTypeRequiredDescription
pathPathyesAbsolute path of the pack folder.
manifestdictnoContent of plugin.yaml, {} when it is missing or unreadable.
errorslist[str]noProblems found, one readable message each; empty when the pack is valid.
objectsdict[str, list[str]]noNames found per kind: agents, subagents, skills, tools, connectors, prompts, policies, alerts.

Attributes:

NameTypeRequiredDescription
namestryesmetadata.name of the manifest, empty when absent.
validboolyesTrue when no error was found.
versionstryesmetadata.version of the manifest, empty when absent.

PackReport.to_dict​

to_dict() -> dict[str, Any]

The report as a JSON ready dict.

This element takes no parameter.

Returns: dict[str, Any]. Dict {path, name, version, valid, errors, objects}.

Functions​

unsafe_scope​

unsafe_scope(scope: str) -> bool

Tell whether a permission scope is too broad for a pack: a wildcard, an administrative root (admin, secrets, audit...) or an action such as impersonate.

NameTypeDefaultRequiredDescription
scopestryesScope to check, parts separated by . or :.

Returns: bool. True when the scope is refused.

pack_files​

pack_files(root: Path) -> list[Path]

Files of the pack in a stable order, without caches, build output or virtual environments.

NameTypeDefaultRequiredDescription
rootPathyesFolder of the pack.

Returns: list[Path]. Sorted file paths, without hidden entries, __pycache__, dist, .venv and .pyc or .pyo files.

front_matter​

front_matter(text: str) -> tuple[dict, str]

Split a Markdown text into its YAML front matter (between --- lines) and its body.

NameTypeDefaultRequiredDescription
textstryesContent of a Markdown file such as SKILL.md.

Returns: tuple[dict, str]. Tuple (metadata dict, body); {} and the whole text when there is no front matter, {} when it is not valid YAML.

validate_pack​

validate_pack(path: str | Path) -> PackReport

Check a pack folder before building: plugin.yaml (format pack), mandatory files and folders, licence, permissions, every object against its contract, documentation in en and fr.

NameTypeDefaultRequiredDescription
pathstr | PathyesFolder of the pack.

Returns: PackReport. A PackReport; valid is false when errors is not empty.