enterprise_ai.packs.layout
Source: sdks/python/src/enterprise_ai/packs/layout.py. Back to the Python SDK reference index.
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:
| Name | Type | Required | Description |
|---|---|---|---|
path | Path | yes | Absolute path of the pack folder. |
manifest | dict | no | Content of plugin.yaml, {} when it is missing or unreadable. |
errors | list[str] | no | Problems found, one readable message each; empty when the pack is valid. |
objects | dict[str, list[str]] | no | Names found per kind: agents, subagents, skills, tools, connectors, prompts, policies, alerts. |
Attributes:
| Name | Type | Required | Description |
|---|---|---|---|
name | str | yes | metadata.name of the manifest, empty when absent. |
valid | bool | yes | True when no error was found. |
version | str | yes | metadata.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.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
scope | str | yes | Scope 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.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
root | Path | yes | Folder 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.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
text | str | yes | Content 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.
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
path | str | Path | yes | Folder of the pack. |
Returns: PackReport. A PackReport; valid is false when errors is not empty.