Skip to content

API Reference parrot_tools._exports

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools._exports

View source

Shared plumbing of the export tools (PA-11): write ONLY through the tenant-partitioned artifact store.

Everything here is behind the host's store-only mode (app[STUDIO_EXPORTS_STORE_ONLY], see :mod:parrot.tools.exports_mode); with the mode off the tools behave exactly as before PA-11.

In store-only mode an export tool never lets the LLM choose where it writes: the path, file name, overwrite and template-path arguments are not in its schema. When the tool has an artifact_store (a server-managed constructor parameter, filled from app["artifact_store"]) the produced file goes to the store under the partition of the SERVER-bound tool scope and the tool returns {url, filename, bytes}. Without a store the tool keeps its legacy behaviour (a file under its own constructor-configured output_dir) — except inside a Studio tool scope, where a missing store is a refusal: a Studio call never writes a local file.

Class ExportStoreUnavailable

A Studio-scoped export call with no artifact store configured.

Class ExportsToStoreMixin

Mixin of an :class:~parrot.tools.abstract.AbstractTool: artifact_store + :meth:_publish_export.

Attributes:

Attribute Type Description
artifact_store Any
exports_to_store bool Whether this instance publishes to the artifact store (a store was supplied).

Attribute STORE_PARAM

Attribute UNSAFE_NAME_CHARS

Attribute logger

Function safe_template_name

name when it is a plain file name; ValueError for anything that is a path (separators, absolute, ..).

Only enforced in the host's store-only mode; with it off a template argument is passed through unchanged.

safe_template_name(name: str | None) -> str | None

Parameter Type Default Description
name str | None

Returns: str | None

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally