@dhzh/foundry 9.1.1 → 9.2.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 -8
- package/dist/skills/foundry/references/skills.md +60 -12
- package/dist/web/assets/{code-editor-BombKnxr.js → code-editor-SlAHw7WM.js} +3 -3
- package/dist/web/assets/{freemarker2-CFYjOxxU.js → freemarker2-CTW2Q6lg.js} +1 -1
- package/dist/web/assets/{handlebars-BCMd0LPM.js → handlebars-DoCS6t_B.js} +1 -1
- package/dist/web/assets/{html-BDt1ojKT.js → html-DQeAKWQI.js} +1 -1
- package/dist/web/assets/{index-7ABd8xcs.js → index-BwlUA7eu.js} +80 -77
- package/dist/web/assets/index-DEAU5Oyq.css +1 -0
- package/dist/web/assets/{javascript-VuPBz442.js → javascript-aTH0MD5v.js} +1 -1
- package/dist/web/assets/{jsonMode-CGc4pzYb.js → jsonMode-Bx1n6MmB.js} +1 -1
- package/dist/web/assets/{liquid-BP4hCTcz.js → liquid-ofFWZO1Q.js} +1 -1
- package/dist/web/assets/{mdx-DryWHdI5.js → mdx-DU5fvHMS.js} +1 -1
- package/dist/web/assets/{python-CXsrtDyi.js → python-Dz5U3eMU.js} +1 -1
- package/dist/web/assets/{razor-CDFWlyN0.js → razor-DHIGN3pi.js} +1 -1
- package/dist/web/assets/{typescript-BC3yPX5l.js → typescript-Cq3erAOV.js} +1 -1
- package/dist/web/assets/{xml-vvORCIui.js → xml-DnNcMySf.js} +1 -1
- package/dist/web/assets/{yaml-BZ_pihB9.js → yaml-sFXSMxdB.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-CzWReBQn.css +0 -1
|
@@ -117,6 +117,7 @@ and files use `0700` and `0600` permissions.
|
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
119
|
foundry skills create local ./my-skill
|
|
120
|
+
foundry skills create local ./skills-collection
|
|
120
121
|
foundry skills create local ./collection.zip
|
|
121
122
|
foundry skills create local ./example.skill
|
|
122
123
|
```
|
|
@@ -125,12 +126,14 @@ Pass one source path, absolute or relative to the current directory. The CLI
|
|
|
125
126
|
reads it directly without opening a picker or starting the Web server. The
|
|
126
127
|
same service and validation as Web import apply:
|
|
127
128
|
|
|
128
|
-
- A folder
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
- A folder or archive with root `SKILL.md` is one Skill, including its complete
|
|
130
|
+
resource tree. Root entry presence takes priority even if its metadata is invalid.
|
|
131
|
+
- Without root `SKILL.md`, only immediate child folders are candidates; each must
|
|
132
|
+
have its own root `SKILL.md`. Root files are ignored; grandchildren are never
|
|
133
|
+
discovered as separate Skills.
|
|
131
134
|
- Metadata `name` determines the destination under `~/.foundry/skills`.
|
|
132
135
|
Existing destinations are never overwritten. Standalone `.md` files are rejected.
|
|
133
|
-
- In
|
|
136
|
+
- In collection mode, invalid, unreadable, or conflicting candidates are skipped;
|
|
134
137
|
other candidates continue. The CLI does not search deeper for Skills.
|
|
135
138
|
|
|
136
139
|
Success prints `{ "imported": [...], "skipped": [...] }`. Imported items are
|
|
@@ -141,6 +144,34 @@ unreadable/corrupt archive prints the JSON error envelope on stderr and exits
|
|
|
141
144
|
with code 1. Original files, resources, extra metadata, and empty directories
|
|
142
145
|
are preserved. Import does not assign Skills to agents.
|
|
143
146
|
|
|
147
|
+
## Import from a URL
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
foundry skills create url https://example.com/example.skill
|
|
151
|
+
foundry skills create url https://example.com/collection.zip
|
|
152
|
+
foundry skills create url https://example.com/SKILL.md
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Pass a direct HTTP or HTTPS file URL without embedded credentials. Foundry
|
|
156
|
+
follows up to five redirects and downloads the file itself; no Web server is
|
|
157
|
+
needed. The final URL filename or download response's `Content-Disposition`
|
|
158
|
+
filename must be `.skill`, `.zip`, or exactly `SKILL.md`. Query parameters are
|
|
159
|
+
allowed. Use a raw file link rather than a GitHub file preview or directory
|
|
160
|
+
page; for folders, supply a ZIP download URL.
|
|
161
|
+
|
|
162
|
+
Archives follow the local import rules above, including collection discovery,
|
|
163
|
+
skipped candidates, conflicts, and JSON results. A standalone `SKILL.md` creates
|
|
164
|
+
one Skill using its YAML `name` and `description`; the directory name comes from
|
|
165
|
+
`name`, and all original file bytes and extra metadata are preserved. Only that
|
|
166
|
+
file is downloaded, so use an archive when the Skill needs sibling resources.
|
|
167
|
+
Existing names are never overwritten and import does not assign agents.
|
|
168
|
+
|
|
169
|
+
Downloads have a 30-second timeout and a 32 MiB limit; expanded archives also
|
|
170
|
+
have the local import limits. Standalone `SKILL.md` is limited to 2 MiB. Invalid
|
|
171
|
+
URLs, HTML pages, unsupported filenames, download errors, invalid metadata,
|
|
172
|
+
and single-Skill conflicts fail with a JSON error on stderr and exit code 1.
|
|
173
|
+
Fix the link or download the source and use local import after a network error.
|
|
174
|
+
|
|
144
175
|
## Edit metadata
|
|
145
176
|
|
|
146
177
|
```bash
|
|
@@ -235,8 +266,8 @@ for filesystem behavior and official agent references.
|
|
|
235
266
|
indicate an invalid `--file` path. Operation errors use the JSON error
|
|
236
267
|
envelope on stderr and exit with code 1.
|
|
237
268
|
|
|
238
|
-
CLI creation supports `manual` and `
|
|
239
|
-
|
|
269
|
+
CLI creation supports `manual`, `local`, and `url`. The Web UI supports the
|
|
270
|
+
same creation sources. Creation does not distribute the Skill;
|
|
240
271
|
editing refreshes assigned agent links. Skill sources and assignments are
|
|
241
272
|
included in version-4 encrypted backups with complete source files and resources.
|
|
242
273
|
Import replaces source files first; Agent configuration is applied only by the
|
|
@@ -250,8 +281,11 @@ a native picker on the computer running Foundry. Select
|
|
|
250
281
|
one folder or one `.skill` / `.zip` archive. Standalone Markdown files and
|
|
251
282
|
multiple selection are not supported.
|
|
252
283
|
|
|
253
|
-
- A selected folder
|
|
254
|
-
|
|
284
|
+
- A selected folder with root `SKILL.md` is one Skill, including its entire
|
|
285
|
+
resource tree. Without root `SKILL.md`, only its immediate child folders are
|
|
286
|
+
checked as candidates; each needs its own root `SKILL.md`. Invalid, unreadable,
|
|
287
|
+
or conflicting candidates are skipped. Root files are ignored and discovery
|
|
288
|
+
never descends to grandchildren.
|
|
255
289
|
- An archive with root `SKILL.md` is one Skill. Its frontmatter `name` determines
|
|
256
290
|
the destination directory, independent of the archive filename.
|
|
257
291
|
- An archive without root `SKILL.md` checks each immediate child folder as a
|
|
@@ -267,7 +301,8 @@ the source directly; file contents never pass through the browser.
|
|
|
267
301
|
Import validates each candidate before writing it. Invalid UTF-8/frontmatter,
|
|
268
302
|
unsafe or duplicate paths, and symbolic links are rejected. Archive corruption,
|
|
269
303
|
unsafe archive paths, or archive-wide limits abort the request before any import.
|
|
270
|
-
|
|
304
|
+
Source-wide entry and byte limits are checked before any import, including
|
|
305
|
+
folder collections. Sources support at most 5,000 entries and 32 MiB of file contents;
|
|
271
306
|
Skill paths support 32 levels and `SKILL.md` is limited to 2 MiB. An occupied
|
|
272
307
|
destination is never overwritten. Each accepted Skill uses its own recovery
|
|
273
308
|
transaction; rejected candidates do not undo other successful imports. Import
|
|
@@ -276,18 +311,31 @@ does not assign Skills to agents.
|
|
|
276
311
|
`POST /api/skills/import/local` accepts JSON `{ "path": "/absolute/source/path" }`.
|
|
277
312
|
It returns `{ imported: Skill[], skipped: [{ source, code, message }] }` with
|
|
278
313
|
HTTP 201 when any Skill was imported, or HTTP 200 when every candidate was
|
|
279
|
-
skipped. A source with no candidates is invalid. Missing/unreadable sources use
|
|
314
|
+
skipped. A source with no child folder candidates is invalid. Missing/unreadable sources use
|
|
280
315
|
`SKILL_IMPORT_READ_FAILED` (400). Single-Skill validation errors use specific
|
|
281
316
|
`SKILL_IMPORT_*` codes (400), total-size errors use `SKILL_IMPORT_TOO_LARGE`
|
|
282
317
|
(413), `SKILL.md` over 2 MiB uses `SKILL_IMPORT_SKILL_MD_TOO_LARGE` (413), and
|
|
283
|
-
occupied names use `SKILL_NAME_CONFLICT` (409). In
|
|
284
|
-
candidate validation and conflict errors appear in `skipped` instead.
|
|
318
|
+
occupied names use `SKILL_NAME_CONFLICT` (409). In collection mode,
|
|
319
|
+
candidate validation, read, and conflict errors appear in `skipped` instead.
|
|
285
320
|
|
|
286
321
|
The Web UI shows imported/skipped counts and skipped folder names. One successful
|
|
287
322
|
Skill with no skipped items opens its detail page; collections and partial
|
|
288
323
|
results stay in the refreshed library list. Cancelling the picker sends no
|
|
289
324
|
business request.
|
|
290
325
|
|
|
326
|
+
Use **New skill → Import from URL** to enter a direct file URL. The backend
|
|
327
|
+
performs the download. URL validation disables submission until an HTTP(S) URL
|
|
328
|
+
without embedded credentials is entered. The dialog prevents duplicate submits
|
|
329
|
+
and closure during download; errors retain the input for retry. Import uses the
|
|
330
|
+
same result notifications and navigation as local import.
|
|
331
|
+
|
|
332
|
+
`POST /api/skills/import/url` accepts JSON `{ "url": "https://example.com/SKILL.md" }`
|
|
333
|
+
and returns the same result and statuses as local import. URL-specific failures
|
|
334
|
+
use HTTP 400: `SKILL_IMPORT_INVALID_URL`, `SKILL_IMPORT_UNSUPPORTED_URL_FILE`,
|
|
335
|
+
`SKILL_IMPORT_DOWNLOAD_FAILED`, and `SKILL_IMPORT_DOWNLOAD_TIMEOUT`.
|
|
336
|
+
Download and expanded-content size failures use the existing 413 codes.
|
|
337
|
+
Downloads are bounded in memory and do not leave temporary files.
|
|
338
|
+
|
|
291
339
|
At `#/library/skills`, select **New skill → Create manually**, enter the same
|
|
292
340
|
metadata, and submit. Success opens `#/library/skills/<name>`. The detail page
|
|
293
341
|
has file navigation on the left and a Monaco source editor on the right,
|