@dhzh/foundry 10.1.2 → 11.0.0
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/index.mjs +8 -10
- package/dist/skills/foundry/references/skills.md +13 -9
- package/dist/web/assets/{code-editor-DBM7ibgv.js → code-editor-nzWSuQtM.js} +3 -3
- package/dist/web/assets/{freemarker2-D0oCGBj0.js → freemarker2-DHQoHiPb.js} +1 -1
- package/dist/web/assets/{handlebars-B-SMZykn.js → handlebars-DXczUGF6.js} +1 -1
- package/dist/web/assets/{html-C2Lrfr7W.js → html-DcesQGzC.js} +1 -1
- package/dist/web/assets/{index-B1nT-DfA.js → index-w6dNh3TV.js} +51 -51
- package/dist/web/assets/{javascript-DxGVkhKJ.js → javascript-vAZsUsqM.js} +1 -1
- package/dist/web/assets/{jsonMode-B6p3dHw8.js → jsonMode-DMcEdUDm.js} +1 -1
- package/dist/web/assets/{liquid-Bpa3U8oP.js → liquid-CHCQdCnk.js} +1 -1
- package/dist/web/assets/{mdx-DamwAxVE.js → mdx-7MupVbKD.js} +1 -1
- package/dist/web/assets/{python-DXKSh5aR.js → python-QHvruH3i.js} +1 -1
- package/dist/web/assets/{razor-B8QiyY0u.js → razor-CMwZtfAe.js} +1 -1
- package/dist/web/assets/{typescript-DhaCkbV9.js → typescript-Ce8ibwuy.js} +1 -1
- package/dist/web/assets/{xml-Cz6tdJml.js → xml-CVHaNyVN.js} +1 -1
- package/dist/web/assets/{yaml-Chz05fhD.js → yaml-zhZ-tRNi.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
|
@@ -14,21 +14,22 @@ foundry skills get hello
|
|
|
14
14
|
`list` returns a JSON array of `{ name, description }` summaries, or `[]` for
|
|
15
15
|
an empty library. `get` returns one complete Skill with `name`, `description`,
|
|
16
16
|
`content`, and nested `files`. Each file has a full skill-relative `path` and
|
|
17
|
-
`content`; each folder has `path` and `children`.
|
|
18
|
-
|
|
17
|
+
`content`; each folder has `path` and `children`. File content is the complete
|
|
18
|
+
source text, including YAML frontmatter in `SKILL.md`. The top-level `content`
|
|
19
|
+
contains only the Markdown body. Edit the file entry to save source changes.
|
|
19
20
|
|
|
20
21
|
## Save file changes
|
|
21
22
|
|
|
22
23
|
Prefer stdin for agent workflows: read the detail into memory, change its
|
|
23
24
|
`files`, and submit the JSON through `--file -`. Foundry reads this input in
|
|
24
25
|
memory and does not create an intermediate JSON file. For example, update only
|
|
25
|
-
the primary
|
|
26
|
+
the primary file while retaining every other entry:
|
|
26
27
|
|
|
27
28
|
```bash
|
|
28
29
|
node <<'JS'
|
|
29
30
|
const { execFileSync } = require('node:child_process');
|
|
30
31
|
const skill = JSON.parse(execFileSync('foundry', ['skills', 'get', 'hello'], { encoding: 'utf8' }));
|
|
31
|
-
skill.files.find((file) => file.path === 'SKILL.md').content
|
|
32
|
+
skill.files.find((file) => file.path === 'SKILL.md').content += '\n# Updated\n';
|
|
32
33
|
const saved = execFileSync('foundry', ['skills', 'save', 'hello', '--file', '-'], {
|
|
33
34
|
input: JSON.stringify({ files: skill.files }),
|
|
34
35
|
encoding: 'utf8',
|
|
@@ -44,12 +45,12 @@ project or home directory when stdin can carry the input.
|
|
|
44
45
|
|
|
45
46
|
Input is `{ "files": [...] }`, or the complete `get` output. Only `files` is
|
|
46
47
|
applied; top-level `name`, `description`, and `content` are ignored. Use `edit`
|
|
47
|
-
|
|
48
|
+
to rename the Skill. Other metadata can be changed in `SKILL.md`. Example file tree:
|
|
48
49
|
|
|
49
50
|
```json
|
|
50
51
|
{
|
|
51
52
|
"files": [
|
|
52
|
-
{ "path": "SKILL.md", "content": "# Hello\n" },
|
|
53
|
+
{ "path": "SKILL.md", "content": "---\nname: hello\ndescription: Use when greeting users.\n---\n# Hello\n" },
|
|
53
54
|
{
|
|
54
55
|
"path": "scripts",
|
|
55
56
|
"children": [
|
|
@@ -64,7 +65,9 @@ for metadata changes. Example file tree:
|
|
|
64
65
|
Saving replaces the complete editable tree: new paths are created, included
|
|
65
66
|
text is replaced, and omitted entries are deleted. Include every entry you
|
|
66
67
|
want to retain. An empty folder uses `children: []`. `SKILL.md` is required;
|
|
67
|
-
its `content` replaces
|
|
68
|
+
its `content` replaces the complete file verbatim, including frontmatter.
|
|
69
|
+
Frontmatter must contain a valid name matching the directory and a valid
|
|
70
|
+
description. Invalid metadata rejects the entire save. Binary or
|
|
68
71
|
oversized existing files are returned with `content: null`; retain that entry
|
|
69
72
|
unchanged to preserve it, or omit it to delete it. Null cannot create a file.
|
|
70
73
|
Child symlinks are hidden from the tree, preserved, and never followed.
|
|
@@ -347,8 +350,9 @@ has file navigation on the left and a Monaco source editor on the right,
|
|
|
347
350
|
including for an empty `SKILL.md` body. Save with the toolbar button or Cmd/Ctrl+S.
|
|
348
351
|
`GET /api/skills/:name` returns metadata and the complete nested `files` tree.
|
|
349
352
|
Files contain `path` and `content`; folders contain `path` and `children`.
|
|
350
|
-
|
|
351
|
-
|
|
353
|
+
All editable files contain their full source text, including `SKILL.md` YAML
|
|
354
|
+
frontmatter, comments, and whitespace. Save writes that text verbatim after
|
|
355
|
+
validating metadata; use Overview to rename the Skill. Binary and large
|
|
352
356
|
files use `content: null` and remain unchanged unless deleted from the draft.
|
|
353
357
|
File additions, edits, and deletions stay local until Save sends `{ files }` to
|
|
354
358
|
`PUT /api/skills/:name`. One transaction applies the complete tree. Existing agent
|