iagenify 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -148,6 +148,44 @@ const result = await agent.run({
148
148
  })
149
149
  ```
150
150
 
151
+ ### Design : projets et agent natif
152
+
153
+ `api.design.document()` crée ou valide un document en mémoire sans requête réseau. Les projets sauvegardés et
154
+ les modèles passent par `api.design.projects` et `api.design.templates` :
155
+
156
+ ```js
157
+ const project = await api.design.projects.create({ type: "design", label: "Landing", template: "web-landing" })
158
+ const savedProject = await api.design.projects.get(project.id)
159
+ const doc = await savedProject.open()
160
+ const frameId = doc.toJSON().pages[0].frames[0]
161
+ doc.apply([{ op: "set", id: frameId, path: "style.fill", value: "#16212d" }])
162
+ await doc.save()
163
+ ```
164
+
165
+ Un agent local peut sélectionner les outils Design natifs avec le `tools` existant. Le prompt lui donne l’id du
166
+ projet ouvert ; il doit envoyer cet id avec chaque appel d’outil :
167
+
168
+ ```js
169
+ const designAgent = api.agents.create({
170
+ runtime: "local",
171
+ machine: pc,
172
+ model: "gemini-3.5-flash",
173
+ mode: "auto",
174
+ tools: ["design_read", "design_apply", "design_render", "design_check", "design_template"],
175
+ })
176
+ const result = await designAgent.run({
177
+ inputs: [{ type: "text", content: `Inspect and improve Design project ${project.id}. Pass this exact id as projectId.` }],
178
+ })
179
+ ```
180
+
181
+ - `design_read({ projectId, node? })` inspects the saved page and layer tree.
182
+ - `design_apply({ projectId, operations })` validates and saves a batch of 1–100 document operations; the open editor receives that batch and the new version.
183
+ - `design_render({ projectId, frame? })` attaches a PNG preview for visual review.
184
+ - `design_check({ projectId })` runs deterministic design checks.
185
+ - `design_template({ id? })` lists templates or returns one template and its starting document.
186
+
187
+ These are SDK catalogue tools, not `customTools` callbacks or extra `api.agents.create()` parameters.
188
+
151
189
  ### Skills et sous-agents
152
190
 
153
191
  Ils appartiennent au **compte** (P73) et vous suivent donc sur tous vos appareils, y compris là où il n'y a pas de