@dhzh/foundry 6.3.1 → 7.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/README.md +115 -170
- package/dist/index.mjs +4 -3
- package/dist/skills/foundry/SKILL.md +29 -109
- package/dist/skills/foundry/references/backups.md +31 -0
- package/dist/skills/foundry/references/settings.md +44 -113
- package/dist/web/assets/index-CQ9xJtJX.css +1 -0
- package/dist/web/assets/index-zxnJ0c_Z.js +70 -0
- package/dist/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/index.html +2 -2
- package/package.json +2 -1
- package/dist/skills/foundry/references/captures.md +0 -237
- package/dist/skills/foundry/references/cli-conventions.md +0 -145
- package/dist/skills/foundry/references/data-transfer.md +0 -154
- package/dist/skills/foundry/references/providers.md +0 -146
- package/dist/web/assets/BottomSheet-Bs6VGQRD.js +0 -1
- package/dist/web/assets/ItemSwipeLayer-N9jsy2FE.js +0 -1
- package/dist/web/assets/MenuBottomSheet-B4cYS_67.js +0 -1
- package/dist/web/assets/index-Cht7A7U2.css +0 -591
- package/dist/web/assets/index-DgKRKmzj.js +0 -105
- package/dist/web/assets/poppins-devanagari-400-normal-CJDn6rn8.woff2 +0 -0
- package/dist/web/assets/poppins-devanagari-400-normal-CqVvlrh5.woff +0 -0
- package/dist/web/assets/poppins-devanagari-500-normal-BIdkeU1p.woff2 +0 -0
- package/dist/web/assets/poppins-devanagari-500-normal-DMPDjHtT.woff +0 -0
- package/dist/web/assets/poppins-devanagari-600-normal-ClASKHrr.woff +0 -0
- package/dist/web/assets/poppins-devanagari-600-normal-STEjXBNN.woff2 +0 -0
- package/dist/web/assets/poppins-devanagari-700-normal-O-jipLrW.woff2 +0 -0
- package/dist/web/assets/poppins-devanagari-700-normal-fHs-vx92.woff +0 -0
- package/dist/web/assets/poppins-latin-400-normal-BOb3E3N0.woff +0 -0
- package/dist/web/assets/poppins-latin-400-normal-cpxAROuN.woff2 +0 -0
- package/dist/web/assets/poppins-latin-500-normal-C8OXljZJ.woff2 +0 -0
- package/dist/web/assets/poppins-latin-500-normal-DGXqpDMm.woff +0 -0
- package/dist/web/assets/poppins-latin-600-normal-BJdTmd5m.woff +0 -0
- package/dist/web/assets/poppins-latin-600-normal-zEkxB9Mr.woff2 +0 -0
- package/dist/web/assets/poppins-latin-700-normal-BVuQR_eA.woff +0 -0
- package/dist/web/assets/poppins-latin-700-normal-Qrb0O0WB.woff2 +0 -0
- package/dist/web/assets/poppins-latin-ext-400-normal-DaBSavcJ.woff +0 -0
- package/dist/web/assets/poppins-latin-ext-400-normal-by3JarPu.woff2 +0 -0
- package/dist/web/assets/poppins-latin-ext-500-normal-CK-6C4Hw.woff2 +0 -0
- package/dist/web/assets/poppins-latin-ext-500-normal-CgAe2rWW.woff +0 -0
- package/dist/web/assets/poppins-latin-ext-600-normal-CAhIAdZj.woff2 +0 -0
- package/dist/web/assets/poppins-latin-ext-600-normal-Df5ffKXP.woff +0 -0
- package/dist/web/assets/poppins-latin-ext-700-normal-DctTR6Tg.woff +0 -0
- package/dist/web/assets/poppins-latin-ext-700-normal-cby-RkWa.woff2 +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/web/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="icon" href="/favicon.png" />
|
|
7
7
|
<title>Foundry</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-zxnJ0c_Z.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CQ9xJtJX.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhzh/foundry",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0",
|
|
5
5
|
"devEngines": {
|
|
6
6
|
"packageManager": {
|
|
7
7
|
"name": "pnpm",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@commitlint/cli": "^21.2.4",
|
|
44
44
|
"@commitlint/config-conventional": "^21.2.4",
|
|
45
45
|
"@dhzh/eslint-config": "^3.1.3",
|
|
46
|
+
"@dhzh/foundry-shared": "0.0.0",
|
|
46
47
|
"@j178/prek": "^0.5.7",
|
|
47
48
|
"@types/node": "^26.6.5",
|
|
48
49
|
"@types/yauzl": "^3.4.0",
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# Captures
|
|
2
|
-
|
|
3
|
-
A capture is an agent-facing bookmark. It records what a saved URL is about so
|
|
4
|
-
an agent can decide whether the URL is relevant and then visit it or run a fresh
|
|
5
|
-
web search for details.
|
|
6
|
-
|
|
7
|
-
Foundry does not store a page copy as the primary capture result. It sends one
|
|
8
|
-
capture-discovery request through the configured fetcher and stores the raw
|
|
9
|
-
response. The response contains result titles, descriptions, metadata, and
|
|
10
|
-
summaries that help identify the product, library, or resource.
|
|
11
|
-
|
|
12
|
-
## Commands
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
foundry captures list [--filter all|no-successful]
|
|
16
|
-
foundry captures counts
|
|
17
|
-
foundry captures get <capture-id>
|
|
18
|
-
foundry captures create <url> [--note <text>]
|
|
19
|
-
foundry captures recapture <capture-id>
|
|
20
|
-
foundry captures note <capture-id> <text>
|
|
21
|
-
foundry captures delete <capture-id>
|
|
22
|
-
foundry captures jobs list <capture-id>
|
|
23
|
-
foundry captures jobs get <capture-id> <job-id>
|
|
24
|
-
foundry captures jobs recapture <capture-id>
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Aliases: `foundry capture ...`; `list` supports `ls`; `create` supports `add`;
|
|
28
|
-
`delete` supports `remove` and `rm`; nested job `list` supports `ls` and
|
|
29
|
-
nested job `get` supports `show`.
|
|
30
|
-
|
|
31
|
-
## Capture Summary
|
|
32
|
-
|
|
33
|
-
```json
|
|
34
|
-
{
|
|
35
|
-
"id": "<capture-id>",
|
|
36
|
-
"url": "https://ui.shadcn.com/",
|
|
37
|
-
"title": "shadcn/ui - The Foundation for your Design System",
|
|
38
|
-
"userNote": "Components for the next project",
|
|
39
|
-
"latestSuccessfulJobId": "<job-id>",
|
|
40
|
-
"createdAt": "<iso>",
|
|
41
|
-
"updatedAt": "<iso>"
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The title comes from the best matching fetcher result. Exact URL results are
|
|
46
|
-
preferred, then the same site's homepage, then the first result on the same
|
|
47
|
-
site.
|
|
48
|
-
|
|
49
|
-
## Capture Detail
|
|
50
|
-
|
|
51
|
-
`captures get` returns:
|
|
52
|
-
|
|
53
|
-
```json
|
|
54
|
-
{
|
|
55
|
-
"capture": {
|
|
56
|
-
"id": "<capture-id>",
|
|
57
|
-
"url": "https://ui.shadcn.com/",
|
|
58
|
-
"title": "shadcn/ui - The Foundation for your Design System",
|
|
59
|
-
"userNote": "Components for the next project",
|
|
60
|
-
"latestSuccessfulJobId": "<job-id>",
|
|
61
|
-
"createdAt": "<iso>",
|
|
62
|
-
"updatedAt": "<iso>"
|
|
63
|
-
},
|
|
64
|
-
"rawResponse": {
|
|
65
|
-
"success": true,
|
|
66
|
-
"data": {
|
|
67
|
-
"web": [
|
|
68
|
-
{
|
|
69
|
-
"url": "https://ui.shadcn.com/",
|
|
70
|
-
"title": "shadcn/ui - The Foundation for your Design System",
|
|
71
|
-
"description": "Composable, accessible components...",
|
|
72
|
-
"summary": "The fetcher's longer page summary...",
|
|
73
|
-
"metadata": {
|
|
74
|
-
"sourceURL": "https://ui.shadcn.com/",
|
|
75
|
-
"statusCode": 200
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
]
|
|
79
|
-
},
|
|
80
|
-
"creditsUsed": 2
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
`rawResponse` is the unmodified response from the configured fetcher. It is
|
|
86
|
-
`null` until a job succeeds. The response shape depends on that fetcher; use
|
|
87
|
-
result metadata and descriptions as supporting evidence rather than treating
|
|
88
|
-
any generated summary as the canonical product description.
|
|
89
|
-
|
|
90
|
-
## Fetcher Behavior
|
|
91
|
-
|
|
92
|
-
The current fetcher implementation uses the official Firecrawl Node SDK to call
|
|
93
|
-
`POST /v2/search`. A fetch job uses a query derived from the submitted URL:
|
|
94
|
-
|
|
95
|
-
- Root URL: `site:<hostname> <brand-token>`
|
|
96
|
-
- Path URL: `site:<hostname> <last-meaningful-path-segment>`
|
|
97
|
-
|
|
98
|
-
Examples:
|
|
99
|
-
|
|
100
|
-
| URL | Query |
|
|
101
|
-
| --- | --- |
|
|
102
|
-
| `https://ui.shadcn.com/` | `site:ui.shadcn.com shadcn` |
|
|
103
|
-
| `https://ui.shadcn.com/docs` | `site:ui.shadcn.com docs` |
|
|
104
|
-
| `https://models.dev/labs/apodex/` | `site:models.dev apodex` |
|
|
105
|
-
| `https://github.com/vercel/next.js` | `site:github.com next.js` |
|
|
106
|
-
|
|
107
|
-
The request uses five web results, `formats: ["summary"]`, main-content
|
|
108
|
-
filtering, cache reuse, ad blocking, automatic proxy selection, and a
|
|
109
|
-
two-day `maxAge`. `captures.maxAttempts` is passed to the SDK as its total
|
|
110
|
-
request-attempt limit; Foundry does not run a separate retry loop. In the
|
|
111
|
-
current Firecrawl SDK, automatic retries apply only to HTTP `502` responses.
|
|
112
|
-
Other retryable Firecrawl errors, including `408`, `429`, and other `5xx`
|
|
113
|
-
responses, are returned immediately.
|
|
114
|
-
|
|
115
|
-
Foundry records the final SDK response only. A job succeeds when Firecrawl
|
|
116
|
-
returns a valid successful response with a numeric `creditsUsed` value,
|
|
117
|
-
including when the search has zero results or no result on the requested site.
|
|
118
|
-
The job fails when the SDK request fails, Firecrawl reports an error, or the
|
|
119
|
-
response does not contain `creditsUsed`.
|
|
120
|
-
|
|
121
|
-
## Child Jobs
|
|
122
|
-
|
|
123
|
-
Jobs are capture-owned children. They are not a global top-level CLI resource.
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
foundry captures jobs list <capture-id>
|
|
127
|
-
foundry captures jobs get <capture-id> <job-id>
|
|
128
|
-
foundry captures jobs recapture <capture-id>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
`jobs get` requires both IDs because Foundry verifies that the job belongs to
|
|
132
|
-
the specified capture:
|
|
133
|
-
|
|
134
|
-
- unknown capture -> `CAPTURE_NOT_FOUND`
|
|
135
|
-
- unknown job or job owned by another capture -> `JOB_NOT_FOUND`
|
|
136
|
-
|
|
137
|
-
Job shape:
|
|
138
|
-
|
|
139
|
-
```json
|
|
140
|
-
{
|
|
141
|
-
"id": "<job-id>",
|
|
142
|
-
"captureId": "<capture-id>",
|
|
143
|
-
"status": "succeeded",
|
|
144
|
-
"fetcher": "firecrawl",
|
|
145
|
-
"creditsUsed": 2,
|
|
146
|
-
"errorCode": null,
|
|
147
|
-
"errorMessage": null,
|
|
148
|
-
"createdAt": "<iso>",
|
|
149
|
-
"updatedAt": "<iso>"
|
|
150
|
-
}
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Statuses:
|
|
154
|
-
|
|
155
|
-
- `pending`: queued, not started.
|
|
156
|
-
- `running`: fetcher request in progress.
|
|
157
|
-
- `succeeded`: Firecrawl returned a valid response with `creditsUsed`, and the
|
|
158
|
-
raw response was persisted. Zero search results still count as success.
|
|
159
|
-
- `failed`: the SDK request failed, Firecrawl reported an error, or the
|
|
160
|
-
response did not report `creditsUsed`.
|
|
161
|
-
|
|
162
|
-
The job response does not include the raw response. Use
|
|
163
|
-
`foundry captures get <capture-id>` for the latest successful response.
|
|
164
|
-
`creditsUsed` is the authoritative per-job Firecrawl charge; `null` means no
|
|
165
|
-
charge was reported.
|
|
166
|
-
|
|
167
|
-
`jobs list` returns the capture's non-deleted jobs, newest first. An existing
|
|
168
|
-
capture with no jobs returns `[]`.
|
|
169
|
-
|
|
170
|
-
`jobs recapture` creates a new job with the current fetcher configuration, waits
|
|
171
|
-
for it to reach `succeeded` or `failed`, and returns the final job summary.
|
|
172
|
-
|
|
173
|
-
## Create
|
|
174
|
-
|
|
175
|
-
```bash
|
|
176
|
-
foundry captures create https://ui.shadcn.com/ --note "Component library"
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Preconditions:
|
|
180
|
-
|
|
181
|
-
- `settings.features.library.captures.fetcher` must be `firecrawl` or `null`.
|
|
182
|
-
- The configured fetcher API key must be non-empty.
|
|
183
|
-
- The URL must be HTTP or HTTPS after trimming whitespace.
|
|
184
|
-
- The same normalized URL cannot already have an active capture.
|
|
185
|
-
|
|
186
|
-
The command creates the capture, queues its first fetch job, waits until that
|
|
187
|
-
job reaches `succeeded` or `failed`, and returns `capture`, `rawResponse`, and
|
|
188
|
-
`job`.
|
|
189
|
-
|
|
190
|
-
A completed create command can return `job.status: "failed"` and
|
|
191
|
-
`rawResponse: null`. That is a discovery failure, not a capture-create failure.
|
|
192
|
-
Read `errorCode` and `errorMessage`.
|
|
193
|
-
|
|
194
|
-
## Recapture
|
|
195
|
-
|
|
196
|
-
`foundry captures recapture <capture-id>` creates a new child job, waits for
|
|
197
|
-
completion, and returns the same `capture`, `rawResponse`, and `job` structure
|
|
198
|
-
as `captures create`.
|
|
199
|
-
|
|
200
|
-
Preconditions:
|
|
201
|
-
|
|
202
|
-
- The capture must exist.
|
|
203
|
-
- No pending or running job may already exist for it.
|
|
204
|
-
- The current fetcher and its API key must be configured.
|
|
205
|
-
|
|
206
|
-
## Update Note
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
foundry captures note <capture-id> "New note"
|
|
210
|
-
foundry captures note <capture-id> ""
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
Notes are trimmed. An empty string stores `null` and clears the note.
|
|
214
|
-
|
|
215
|
-
## Delete
|
|
216
|
-
|
|
217
|
-
Deletion is soft deletion of the capture and its jobs. It is blocked while a
|
|
218
|
-
pending or running job exists. Response:
|
|
219
|
-
|
|
220
|
-
```json
|
|
221
|
-
{
|
|
222
|
-
"deleted": true,
|
|
223
|
-
"id": "<capture-id>"
|
|
224
|
-
}
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Errors
|
|
228
|
-
|
|
229
|
-
- `INVALID_URL`: URL is not HTTP or HTTPS.
|
|
230
|
-
- `CAPTURE_ALREADY_EXISTS`: active capture with the same URL exists.
|
|
231
|
-
- `FETCHER_NOT_CONFIGURED`: no fetcher or fetcher API key is configured.
|
|
232
|
-
- `ACTIVE_JOB_EXISTS`: capture already has pending/running work.
|
|
233
|
-
- `CAPTURE_NOT_FOUND`: unknown or deleted capture.
|
|
234
|
-
- `JOB_NOT_FOUND`: unknown job or a job owned by another capture.
|
|
235
|
-
|
|
236
|
-
Job failures are returned as a valid final job with `status: "failed"`; do not
|
|
237
|
-
assume a successful command means a successful fetcher response.
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
# CLI Conventions
|
|
2
|
-
|
|
3
|
-
## Prerequisite
|
|
4
|
-
|
|
5
|
-
Use the installed `foundry` executable on `PATH`. Check availability with
|
|
6
|
-
`foundry --version` or the user's normal command-discovery mechanism.
|
|
7
|
-
|
|
8
|
-
If the command is unavailable, stop and report that the Foundry CLI is not
|
|
9
|
-
installed or not on `PATH`. Do not initialize storage manually.
|
|
10
|
-
|
|
11
|
-
## Command Discovery
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
foundry --help
|
|
15
|
-
foundry <command> --help
|
|
16
|
-
foundry <command> <subcommand> --help
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Running bare `foundry` prints help. It does not initialize storage or start the
|
|
20
|
-
Web UI.
|
|
21
|
-
|
|
22
|
-
Command aliases:
|
|
23
|
-
|
|
24
|
-
- `provider` -> `providers`
|
|
25
|
-
- `capture` -> `captures`
|
|
26
|
-
- `data` -> `data-transfer`
|
|
27
|
-
- `ls` -> `list` where listed by command help
|
|
28
|
-
- `show` -> `get` where listed by command help
|
|
29
|
-
- `add` -> `create` where listed by command help
|
|
30
|
-
- `remove` / `rm` -> `delete` for captures
|
|
31
|
-
- `restore` -> `import` for data transfer
|
|
32
|
-
|
|
33
|
-
## JSON Contract
|
|
34
|
-
|
|
35
|
-
Successful feature commands write one JSON value to stdout. Do not parse
|
|
36
|
-
localized human prose. Help output is plain text and is only for command
|
|
37
|
-
discovery.
|
|
38
|
-
|
|
39
|
-
Expected domain failures write a JSON envelope to stderr:
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"error": {
|
|
44
|
-
"code": "CAPTURE_NOT_FOUND",
|
|
45
|
-
"message": "Capture not found"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
The process exit code is `1` for handled command errors. A failed fetch is
|
|
51
|
-
different: capture commands can return successful JSON with `job.status` set to
|
|
52
|
-
`"failed"`, so always inspect the job payload.
|
|
53
|
-
|
|
54
|
-
Citty argument/usage errors may print command help instead of the JSON error
|
|
55
|
-
envelope. Correct the command shape and retry.
|
|
56
|
-
|
|
57
|
-
## JSON Input
|
|
58
|
-
|
|
59
|
-
Commands that accept structured input support:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
foundry providers create --input '{"name":"Local"}'
|
|
63
|
-
foundry providers create --input-file ./provider.json
|
|
64
|
-
printf '%s' '{"name":"Local"}' | foundry providers create --input -
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Use a file or stdin for large payloads and secrets. Provide either `--input` or
|
|
68
|
-
`--input-file`, not both.
|
|
69
|
-
|
|
70
|
-
Error codes for input handling include:
|
|
71
|
-
|
|
72
|
-
- `INPUT_REQUIRED`
|
|
73
|
-
- `CONFLICTING_INPUT`
|
|
74
|
-
- `INPUT_READ_FAILED`
|
|
75
|
-
- `INVALID_JSON`
|
|
76
|
-
|
|
77
|
-
## IDs
|
|
78
|
-
|
|
79
|
-
Use IDs exactly as returned. Do not infer them from names, URLs, or timestamps.
|
|
80
|
-
|
|
81
|
-
- Provider create returns a top-level `id`.
|
|
82
|
-
- Capture create returns `capture.id` and `job.id`.
|
|
83
|
-
- Capture list/get returns `capture.id`.
|
|
84
|
-
- Job list/get returns `job.id` and `captureId`.
|
|
85
|
-
|
|
86
|
-
Jobs are capture-owned. Query a job with both IDs:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
foundry captures jobs get <capture-id> <job-id>
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Timestamps
|
|
93
|
-
|
|
94
|
-
CLI timestamps are ISO-8601 strings such as
|
|
95
|
-
`2026-10-29T08:58:12.061Z`. Convert them for presentation only when the user
|
|
96
|
-
asks; preserve the original value when passing data between commands.
|
|
97
|
-
|
|
98
|
-
## Secrets
|
|
99
|
-
|
|
100
|
-
Provider responses and settings responses include stored API keys. This is
|
|
101
|
-
intentional for a local-only product. Do not print, quote, summarize, or write
|
|
102
|
-
those values to logs unless the user explicitly requests them.
|
|
103
|
-
|
|
104
|
-
For backup passphrases:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
export FOUNDRY_PASSPHRASE='...'
|
|
108
|
-
foundry data-transfer export --output ./foundry.foundry-backup
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
Prefer the environment variable over `--passphrase`.
|
|
112
|
-
|
|
113
|
-
## Web UI
|
|
114
|
-
|
|
115
|
-
Start the Web UI only when the user asks for the browser interface:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
foundry web
|
|
119
|
-
foundry web --no-open
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
This is a long-running process on `http://127.0.0.1:11111`. For data operations,
|
|
123
|
-
use the feature CLI commands instead of keeping the Web server running.
|
|
124
|
-
|
|
125
|
-
## Downloading The Skill
|
|
126
|
-
|
|
127
|
-
The installed Foundry package contains this skill. Download the complete skill
|
|
128
|
-
directory by copying it into one or both supported workspace targets:
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
foundry settings download-skill --target .agents
|
|
132
|
-
foundry settings download-skill --target .agents,.claude
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Target destinations are relative to the user home directory. Here `<home>` is
|
|
136
|
-
`~` on POSIX and `%USERPROFILE%` on Windows:
|
|
137
|
-
|
|
138
|
-
- `.agents` -> `<home>/.agents/skills/foundry`
|
|
139
|
-
- `.claude` -> `<home>/.claude/skills/foundry`
|
|
140
|
-
|
|
141
|
-
Selecting both copies the same skill into both locations. An existing selected
|
|
142
|
-
destination is replaced with the bundled version; unselected destinations are
|
|
143
|
-
left untouched.
|
|
144
|
-
|
|
145
|
-
The Web UI exposes the same multi-select operation from Advanced settings.
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# Data Transfer
|
|
2
|
-
|
|
3
|
-
## Commands
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
foundry data-transfer status
|
|
7
|
-
foundry data-transfer export --output <path> [--force]
|
|
8
|
-
foundry data-transfer inspect <path>
|
|
9
|
-
foundry data-transfer import <path>
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Alias: `foundry data ...`. `import` also supports `restore`.
|
|
13
|
-
|
|
14
|
-
Pass the passphrase through `FOUNDRY_PASSPHRASE`; `--passphrase` is also
|
|
15
|
-
accepted but may expose the secret in shell history or process inspection.
|
|
16
|
-
|
|
17
|
-
## Status
|
|
18
|
-
|
|
19
|
-
```json
|
|
20
|
-
{
|
|
21
|
-
"activeJobCount": 0,
|
|
22
|
-
"isBusy": false
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
`activeJobCount` counts pending/running fetch jobs. Export, inspect, and import
|
|
27
|
-
are blocked when the current Foundry storage has active jobs. Concurrent
|
|
28
|
-
transfers return `BUSY`.
|
|
29
|
-
|
|
30
|
-
## Export
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
export FOUNDRY_PASSPHRASE='...'
|
|
34
|
-
foundry data-transfer export --output ./foundry.foundry-backup
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Behavior:
|
|
38
|
-
|
|
39
|
-
- Exports and imports JSON snapshots with `data/foundry.json`. SQLite-based
|
|
40
|
-
backup archives are not supported.
|
|
41
|
-
|
|
42
|
-
- Produces an encrypted `.foundry-backup` archive.
|
|
43
|
-
- Settings are included in the JSON snapshot. Device connection configuration
|
|
44
|
-
is not exported.
|
|
45
|
-
- If `--output` is omitted, writes `foundry-<iso-timestamp>.foundry-backup` in
|
|
46
|
-
the current directory.
|
|
47
|
-
- Appends `.foundry-backup` when the destination lacks that extension.
|
|
48
|
-
- Creates missing destination directories.
|
|
49
|
-
- Refuses to overwrite by default; use `--force` only with explicit intent.
|
|
50
|
-
- Uses restrictive file permissions on POSIX systems.
|
|
51
|
-
|
|
52
|
-
Response:
|
|
53
|
-
|
|
54
|
-
```json
|
|
55
|
-
{
|
|
56
|
-
"filePath": "/absolute/path/foundry.foundry-backup",
|
|
57
|
-
"providerCount": 2,
|
|
58
|
-
"captureCount": 10,
|
|
59
|
-
"jobCount": 14
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Counts describe records present in the exported snapshot.
|
|
64
|
-
|
|
65
|
-
## Inspect
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
foundry data-transfer inspect ./foundry.foundry-backup
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Inspection:
|
|
72
|
-
|
|
73
|
-
- requires a non-empty passphrase
|
|
74
|
-
- blocks if current Foundry has active jobs
|
|
75
|
-
- decrypts and validates the archive
|
|
76
|
-
- verifies manifest, checksums, JSON format compatibility, record references, provider/capture/job rows, and capture success pointers
|
|
77
|
-
- returns a preview without replacing current data
|
|
78
|
-
|
|
79
|
-
Response:
|
|
80
|
-
|
|
81
|
-
```json
|
|
82
|
-
{
|
|
83
|
-
"importId": "<temporary-id>",
|
|
84
|
-
"fileName": "foundry.foundry-backup",
|
|
85
|
-
"exportedAt": "<iso>",
|
|
86
|
-
"appVersion": "3.1.3",
|
|
87
|
-
"dataFormatVersion": 1,
|
|
88
|
-
"settingsVersion": 1,
|
|
89
|
-
"providerCount": 2,
|
|
90
|
-
"captureCount": 10,
|
|
91
|
-
"jobCount": 14
|
|
92
|
-
}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
The `importId` is for the temporary API-style inspection flow. The CLI cleans
|
|
96
|
-
the staged import before exiting, so do not attempt to reuse that ID in a later
|
|
97
|
-
command.
|
|
98
|
-
|
|
99
|
-
## Import
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
export FOUNDRY_PASSPHRASE='...'
|
|
103
|
-
foundry data-transfer import ./foundry.foundry-backup
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Import performs inspection and commit in one process:
|
|
107
|
-
|
|
108
|
-
1. Validate current state has no active jobs.
|
|
109
|
-
2. Decrypt and validate the archive.
|
|
110
|
-
3. Stage the imported JSON snapshot, including settings.
|
|
111
|
-
4. Replace current providers, captures, fetch jobs, and settings in one
|
|
112
|
-
recoverable JSON file transaction. Device connection configuration is left unchanged.
|
|
113
|
-
|
|
114
|
-
This operation is destructive: the current Foundry storage and settings are
|
|
115
|
-
replaced by the archive. Run `inspect` first and summarize the preview unless
|
|
116
|
-
the user explicitly asked for immediate restoration of a known-good file.
|
|
117
|
-
|
|
118
|
-
Response:
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"status": "imported",
|
|
123
|
-
"preview": {
|
|
124
|
-
"importId": "<temporary-id>",
|
|
125
|
-
"fileName": "foundry.foundry-backup",
|
|
126
|
-
"exportedAt": "<iso>",
|
|
127
|
-
"appVersion": "3.1.3",
|
|
128
|
-
"dataFormatVersion": 1,
|
|
129
|
-
"settingsVersion": 1,
|
|
130
|
-
"providerCount": 2,
|
|
131
|
-
"captureCount": 10,
|
|
132
|
-
"jobCount": 14
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
After import, query the affected feature commands to verify the new state.
|
|
138
|
-
|
|
139
|
-
## Errors
|
|
140
|
-
|
|
141
|
-
- `PASSPHRASE_REQUIRED`: no passphrase supplied.
|
|
142
|
-
- `INVALID_PASSPHRASE`: decryption failed.
|
|
143
|
-
- `INVALID_ARCHIVE`: malformed, incomplete, corrupt, or semantically invalid
|
|
144
|
-
backup.
|
|
145
|
-
- `UNSUPPORTED_ARCHIVE`: unsupported archive or settings version.
|
|
146
|
-
- `NEWER_SCHEMA`: archive data format is newer than the installed Foundry.
|
|
147
|
-
- `ACTIVE_JOBS`: pending/running jobs block transfer.
|
|
148
|
-
- `BUSY`: another transfer is already running.
|
|
149
|
-
- `IMPORT_NOT_FOUND`: staged import is unavailable.
|
|
150
|
-
- `IO_ERROR`: filesystem or other transfer I/O failure.
|
|
151
|
-
- `OUTPUT_EXISTS`: export destination exists and `--force` was not supplied.
|
|
152
|
-
|
|
153
|
-
Do not extract, patch, or repack a `.foundry-backup` manually. Treat the archive
|
|
154
|
-
format and manifest validation as compatibility contracts.
|