Ziwako AI (Mayele)Guide développeurComposants
Arborescence d'une distribution
Organisation complète d'un package — manifest, composants, références et packaging.
Un package Ziwako AI est un dossier (archivé en .zip) qui contient un manifest.json
et les fichiers .md des composants. Chaque dossier correspond à un type de composant.
Arborescence complète
mon-package/
├── manifest.json
├── distributions/
│ └── <distribution-slug>.md
├── agents/
│ └── <agent-slug>.md
├── workflows/
│ └── <workflow-slug>.md
├── custom_mcp/
│ └── <connector-slug>.md
├── channels/
│ └── <channel-slug>.md
├── knowledge/
│ └── <pack-slug>.md
├── skills/
│ └── <skill-name>/
│ └── SKILL.md
└── plugins/
└── <plugin-slug>.md| Dossier | Type | Obligatoire |
|---|---|---|
distributions/ | distribution | Oui pour kind: distribution |
agents/ | agent | Non |
workflows/ | workflow | Non |
custom_mcp/ | custom_mcp | Non |
channels/ | channel | Non |
knowledge/ | knowledge_pack | Non (non installé en v1) |
skills/<name>/ | skill | Non |
plugins/ | plugin | Oui pour kind: plugin |
Règles de nommage
- Un fichier
.md= un composant. - Le dossier doit correspondre au
typedu frontmatter. - Slugs en kebab-case, uniques dans le package.
- Skills :
skills/<name>/SKILL.mdavec un dossier identique auname. - Évitez les caractères spéciaux et les espaces dans les noms de fichiers.
Le manifest.json
{
"name": "crm-automation",
"version": "1.0.0",
"kind": "distribution",
"description": "Automatisation CRM",
"author": "Votre nom",
"license": "MIT",
"category": "CRM",
"tags": ["crm", "ventes"],
"entry": ["distributions/crm-automation.md"],
"target": null
}| Champ | Règle |
|---|---|
name | Minuscules + tirets |
version | Semver (1.0.0) |
kind | plugin, distribution ou mixed |
entry | Obligatoire pour kind: distribution : pointe exactement une distribution |
target | { kind, slug } pour publier une nouvelle version d'un item existant |
kind: distribution→ exactement une distribution, référencée parentry.kind: plugin→ un package de plugin.kind: mixed→ plusieurs composants indépendants, sans distribution unique.
Les références par slug
| Dans | Champ | Valeur |
|---|---|---|
| workflow | run.agentId | Slug d'un agent du package (ou mayele-central) |
| workflow imbriqué | run.workflowId | Slug d'un workflow |
| channel | agentSlug | Slug d'un agent |
| distribution | components.agents[] | { slug } |
| distribution | components.workflows[] | { slug } |
| distribution | components.connecteurs[] | { slug } |
| distribution | components.channels[] | { slug } |
| distribution | components.knowledge[] | { slug } (skipped v1) |
| distribution | components.skills[] | { slug } |
| distribution | plugins[] | { slug, version, required } |
Références par slug
Les composants se référencent par slug, jamais par identifiant de base. Le serveur résout les slugs à l'import et à l'installation.
Exemple minimal complet
crm-automation/
├── manifest.json
├── distributions/crm-automation.md
├── agents/assistant-crm.md
└── skills/triage-tickets/SKILL.mdmanifest.json :
{
"name": "crm-automation",
"version": "1.0.0",
"kind": "distribution",
"description": "Automatisation CRM",
"author": "Votre nom",
"entry": ["distributions/crm-automation.md"],
"target": null
}agents/assistant-crm.md :
---
type: agent
name: Assistant CRM
slug: assistant-crm
modelId: openai/gpt-4o
status: active
---
Tu aides les commerciaux à qualifier leurs opportunités.distributions/crm-automation.md :
---
type: distribution
name: CRM Automation
slug: crm-automation
status: active
components:
agents: [{ slug: assistant-crm }]
skills: [{ slug: triage-tickets }]
plugins: []
---
Distribution CRM prête à installer.skills/triage-tickets/SKILL.md :
---
type: skill
name: triage-tickets
description: Trier les tickets par priorité.
---
1. Lis le ticket.
2. Attribue une priorité (P0–P3).Packaging
| Règle | Détail |
|---|---|
| Archive | .zip du dossier |
| Types de fichiers | .md, .json, images (.png, .jpg, .webp, .svg) |
| Interdits | Path traversal (..), binaires exécutables |
| Limites | Taille et nombre de fichiers limités côté serveur |
| Secrets | Jamais en clair : {{ENV_VAR}} |
Vérifier l'arborescence
npx @ziwako/ai-authoring validate ./crm-automation
npx @ziwako/ai-authoring validate ./crm-automation.zip