@seedgrid/ai-toolkit 0.4.1 → 0.4.2
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/dist/adapters/shared.js +1 -0
- package/dist/core/content.js +5 -0
- package/docs/formato.md +1 -0
- package/package.json +1 -1
- package/seedgridKB/manifest.json +1 -1
package/dist/adapters/shared.js
CHANGED
|
@@ -132,6 +132,7 @@ export function agentsMdBlock(bundle, targets, mode) {
|
|
|
132
132
|
'',
|
|
133
133
|
`Bloco gerenciado pelo \`seedgrid-ai\` (conteúdo ${bundle.contentVersion}, modo \`${mode}\`). Não edite entre os marcadores; personalize em \`.ai/local/\`.`,
|
|
134
134
|
'',
|
|
135
|
+
...(bundle.agentsNotes.length > 0 ? [...bundle.agentsNotes.map((n) => `> ${n}`), ''] : []),
|
|
135
136
|
'Cada pasta de `.ai/` tem um `index.md` com o que há nela: comece por ele e leia só o que a tarefa pedir.',
|
|
136
137
|
'',
|
|
137
138
|
'- Regras: `.ai/rules/`. Antes de tarefas não triviais, leia `coordenacao.md`.',
|
package/dist/core/content.js
CHANGED
|
@@ -510,6 +510,10 @@ export async function loadContent(root) {
|
|
|
510
510
|
checkBrain(ctx, brain.notes, brain.entrypoints, brain.base);
|
|
511
511
|
shared.push(...brain.notes);
|
|
512
512
|
}
|
|
513
|
+
const rawNotes = manifest.agentsNotes ?? [];
|
|
514
|
+
if (!Array.isArray(rawNotes) || rawNotes.length > 10 || rawNotes.some((n) => typeof n !== 'string' || n.trim() === '' || n.length > 600 || n.includes('\n'))) {
|
|
515
|
+
ctx.errors.push('manifest: agentsNotes deve ser uma lista de até 10 linhas de texto (até 600 caracteres, sem quebra de linha)');
|
|
516
|
+
}
|
|
513
517
|
if (ctx.errors.length > 0) {
|
|
514
518
|
throw new ToolkitError(`Conteúdo inválido em ${absRoot}`, ctx.errors);
|
|
515
519
|
}
|
|
@@ -523,6 +527,7 @@ export async function loadContent(root) {
|
|
|
523
527
|
brain: brain
|
|
524
528
|
? { notes: brain.notes.length, entrypoints: brain.entrypoints.map((e) => `.ai/brain/${brain.base}/${e}`) }
|
|
525
529
|
: null,
|
|
530
|
+
agentsNotes: rawNotes,
|
|
526
531
|
sourceFiles: [...ctx.sources].sort(),
|
|
527
532
|
};
|
|
528
533
|
}
|
package/docs/formato.md
CHANGED
|
@@ -87,6 +87,7 @@ Arquivos e pastas que começam com ponto são ignorados.
|
|
|
87
87
|
| --- | --- |
|
|
88
88
|
| `schemaVersion` | `2` (versão do formato do manifesto) |
|
|
89
89
|
| `contentVersion` | semver; deve ser **igual** à versão do pacote (`package.json`); aumente a cada mudança de conteúdo |
|
|
90
|
+
| `agentsNotes` | (opcional) até 10 linhas curtas que o bloco do `AGENTS.md` mostra no topo, como aviso (ex.: o modo de trabalho que uma camada adicional exige) |
|
|
90
91
|
| `toolkitBase` | pasta do vault onde ficam `agents/`, `rules/`, `templates/`, `references/` e `skills/` (aqui, `SeedGrid/Toolkit`) |
|
|
91
92
|
| `components[].id` | único; para skills, `skill:<name>` |
|
|
92
93
|
| `components[].type` | `agents`, `rules`, `templates`, `references`, `skill` ou `brain` |
|
package/package.json
CHANGED