foldrun 0.9.0 → 1.1.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/bin/foldrun.mjs +33 -11
- package/docs/agents.md +3 -1
- package/docs/api-usage.md +16 -2
- package/docs/api.md +30 -5
- package/docs/assistant.md +139 -0
- package/docs/backups-and-restore.md +35 -66
- package/docs/budgets-and-billing.md +1 -1
- package/docs/cli.md +23 -9
- package/docs/flows.md +1 -1
- package/docs/hooks.md +139 -0
- package/docs/network.md +158 -0
- package/docs/notifications.md +7 -1
- package/docs/secrets.md +54 -0
- package/docs/security.md +28 -7
- package/docs/tools.md +36 -5
- package/docs/versions.md +39 -2
- package/package.json +3 -3
- package/src/commands.mjs +904 -21
- package/src/guide.mjs +1 -1
- package/src/terminal.mjs +85 -0
package/docs/tools.md
CHANGED
|
@@ -123,6 +123,12 @@ a `name @ url` is refused, with a line in the log.
|
|
|
123
123
|
never seen the program, and say when to use the tool in `description` — that
|
|
124
124
|
sentence is what decides whether it gets called at all.
|
|
125
125
|
|
|
126
|
+
The program gets each argument the agent fills in as a long flag,
|
|
127
|
+
`--<name> <value>`: the tool above runs as
|
|
128
|
+
`run.py --query "SELECT …" --files sales.csv`. An argument left out or empty
|
|
129
|
+
is not passed, so give optional ones a default in the program. What it
|
|
130
|
+
prints, stdout and stderr together, is what the agent reads back.
|
|
131
|
+
|
|
126
132
|
## MCP — someone else's tools
|
|
127
133
|
|
|
128
134
|
```yaml
|
|
@@ -1408,11 +1414,36 @@ own defaults.
|
|
|
1408
1414
|
next one: the cookies and localStorage the call ends with are written to
|
|
1409
1415
|
`workspace/state/browser/<name>.json` and loaded before any later call that
|
|
1410
1416
|
names it, in this run or a run next month. It is the agent's own login,
|
|
1411
|
-
made with `actions` from credentials it can see —
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1417
|
+
made with `actions` from credentials it can see — or a login a cookie secret
|
|
1418
|
+
seeded, when `state_key` encrypts it (below). Without a key `state` refuses
|
|
1419
|
+
`cookies=` and a session they seeded, and it always refuses `storage=`,
|
|
1420
|
+
because `state/` is a workspace file every later step can read, and a vault
|
|
1421
|
+
secret written there in the clear would stop being one. `mode=diff` keeps its
|
|
1422
|
+
baselines in the same place, under `state/browser/diff/`, for the same
|
|
1423
|
+
reason: they must outlive the run.
|
|
1424
|
+
|
|
1425
|
+
**A cookie secret that seeds a saved login.** Some sites — Google above all —
|
|
1426
|
+
rotate their sign-in cookies while they are used, so a copied `Cookie` line in
|
|
1427
|
+
the vault goes stale within the hour and every later run meets a sign-in
|
|
1428
|
+
page. Put `state:` and `state_key:` beside `cookies:` in the block:
|
|
1429
|
+
|
|
1430
|
+
```yaml
|
|
1431
|
+
web:
|
|
1432
|
+
browse:
|
|
1433
|
+
cookies: YOUTUBE_COOKIES
|
|
1434
|
+
cookie_domain: .youtube.com
|
|
1435
|
+
state: youtube
|
|
1436
|
+
state_key: BROWSER_STATE_KEY
|
|
1437
|
+
secrets: [YOUTUBE_COOKIES, BROWSER_STATE_KEY]
|
|
1438
|
+
```
|
|
1439
|
+
|
|
1440
|
+
The first call seeds from the secret; every call saves the session it ends
|
|
1441
|
+
with, encrypted, and the next loads that rather than the vault's copy. The
|
|
1442
|
+
state file records which secret seeded it and a keyed fingerprint of its
|
|
1443
|
+
value, so pasting fresh cookies into the secret seeds it again. Script in the
|
|
1444
|
+
page (`js`, `eval`, a `get` of storage) stays refused on such a login, as it
|
|
1445
|
+
is on the secret itself. `check` refuses `state` beside `cookies` without
|
|
1446
|
+
`state_key`.
|
|
1416
1447
|
|
|
1417
1448
|
### Where the browser runs
|
|
1418
1449
|
|
package/docs/versions.md
CHANGED
|
@@ -22,8 +22,45 @@ under its own name — `v2026.09.30.2` deployed again is still `v2026.09.30.2`.
|
|
|
22
22
|
Behind each name are the commits of the parts that make up the platform —
|
|
23
23
|
`core` (the runtime), `platform` (queue, worker, storage, billing), `web` (the
|
|
24
24
|
dashboard and the API), `docs` and `infra` — recorded when it was deployed.
|
|
25
|
-
The `foldrun` CLI and `@foldrun/core` on npm are packages
|
|
26
|
-
|
|
25
|
+
The `foldrun` CLI and `@foldrun/core` on npm are packages, and follow
|
|
26
|
+
semantic versioning instead — see [the packages](#the-packages).
|
|
27
|
+
|
|
28
|
+
## The packages
|
|
29
|
+
|
|
30
|
+
`foldrun` (the CLI) and `@foldrun/core` follow
|
|
31
|
+
[Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html) from 1.0.0:
|
|
32
|
+
|
|
33
|
+
| | Means | Example |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Patch | a bug fix, nothing new — safe to update | 1.4.2 → 1.4.3 |
|
|
36
|
+
| Minor | a new feature; everything that worked still works | 1.4.2 → 1.5.0 |
|
|
37
|
+
| Major | a breaking change: something old stops working or works differently | 1.4.2 → 2.0.0 |
|
|
38
|
+
|
|
39
|
+
What the promise covers is the public API. For the CLI that is every command
|
|
40
|
+
and flag `foldrun --help` lists, and the Node.js version it needs. For
|
|
41
|
+
`@foldrun/core` it is `@foldrun/core` itself and the subpaths in its
|
|
42
|
+
`package.json` under `foldrun.publicApi`. Other `@foldrun/core/*` modules can
|
|
43
|
+
be imported, but they are internal and may change in any release.
|
|
44
|
+
|
|
45
|
+
The release decides the number, not a person's memory. It compares the
|
|
46
|
+
public API at the last release with the new one. Anything gone, or a
|
|
47
|
+
function that now needs more arguments, makes it a major. Anything new makes
|
|
48
|
+
it at least a minor. A change in behaviour that the API cannot show is marked
|
|
49
|
+
in the commit, and that makes it a major too. A major's release notes open
|
|
50
|
+
with **Breaking changes**, saying what stops working.
|
|
51
|
+
|
|
52
|
+
Nothing is removed without warning. A command, flag or export is first marked
|
|
53
|
+
deprecated, in a minor, and still works. It is taken out in a later major.
|
|
54
|
+
Both are in the release notes.
|
|
55
|
+
|
|
56
|
+
Pre-releases, like `1.5.0-rc.1`, are published under npm's `next` tag. So
|
|
57
|
+
`npm install -g foldrun` gets the last stable release, and
|
|
58
|
+
`npm install -g foldrun@next` gets the pre-release. A stable CLI never
|
|
59
|
+
suggests updating to a pre-release.
|
|
60
|
+
|
|
61
|
+
`npm install -g foldrun@^1` stays within 1.x, so nothing that works breaks
|
|
62
|
+
under it. Every release is listed in each package's `CHANGELOG.md` and on
|
|
63
|
+
GitHub Releases.
|
|
27
64
|
|
|
28
65
|
## Rollback and the database
|
|
29
66
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldrun",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Agents are just folders. Write them, check them, run them — on your machine.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"node": ">=22"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@foldrun/core": "^
|
|
14
|
+
"@foldrun/core": "^1.1.0"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"bin",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"e2e": "FOLDRUN_E2E=1 FOLDRUN_DATA=$(mktemp -d /tmp/foldrun-e2e-XXXXXX) node --test --test-timeout=300000 tests/e2e.test.ts",
|
|
24
|
-
"test": "FOLDRUN_DATA=$(mktemp -d /tmp/foldrun-test-XXXXXX) node --test tests/cli-account.test.ts tests/model-credential.test.ts tests/cli-approvals.test.ts tests/cli-stop.test.ts tests/cli-account-settings.test.ts tests/cli-schedule.test.ts tests/cli-billing.test.ts tests/cli-storage.test.ts tests/cli-scaffold.test.ts tests/cli-secrets.test.ts tests/cli-site-login.test.ts tests/cli-check-library.test.ts tests/cli-check-timezone.test.ts tests/cli-check-frontmatter.test.ts tests/cli-agent-import.test.ts tests/cli-check-subagents.test.ts tests/cli-connect.test.ts tests/cli-accounts.test.ts tests/cli-remote.test.ts tests/cli-stream.test.ts tests/cli-doctor.test.ts tests/cli-tool-test.test.ts tests/cli-agent-run.test.ts tests/cli-check-remote.test.ts tests/cli-shares.test.ts tests/cli-triggers.test.ts tests/cli-providers.test.ts tests/cli-rerun-put.test.ts tests/cli-guide.test.ts tests/cli-runtimes.test.ts tests/cli-deploy-safety.test.ts tests/cli-operator.test.ts tests/cli-flow-patterns.test.ts tests/cli-flow-rm-step.test.ts tests/cli-flow-dup-step.test.ts tests/cli-flow-write-stale.test.ts tests/cli-agent-link-stale.test.ts tests/cli-parity.test.ts tests/cli-invoke-inputs.test.ts tests/cli-audit-keys.test.ts tests/cli-version.test.ts tests/cli-check-web-warnings.test.ts tests/cli-report-image.test.ts tests/cli-check-workspace-paths.test.ts tests/cli-parity-dashboard.test.ts tests/cli-api-standards.test.ts tests/cli-backups-onboarding.test.ts tests/cli-check-limits.test.ts tests/cli-gallery.test.ts tests/cli-status-platform.test.ts tests/cli-webhooks-notifications.test.ts tests/cli-flags.test.ts tests/cli-api-coverage.test.ts",
|
|
24
|
+
"test": "FOLDRUN_DATA=$(mktemp -d /tmp/foldrun-test-XXXXXX) node --test tests/cli-account.test.ts tests/model-credential.test.ts tests/cli-approvals.test.ts tests/cli-stop.test.ts tests/cli-account-settings.test.ts tests/cli-schedule.test.ts tests/cli-billing.test.ts tests/cli-storage.test.ts tests/cli-scaffold.test.ts tests/cli-secrets.test.ts tests/cli-site-login.test.ts tests/cli-check-library.test.ts tests/cli-check-timezone.test.ts tests/cli-check-frontmatter.test.ts tests/cli-agent-import.test.ts tests/cli-check-subagents.test.ts tests/cli-connect.test.ts tests/cli-accounts.test.ts tests/cli-remote.test.ts tests/cli-stream.test.ts tests/cli-doctor.test.ts tests/cli-tool-test.test.ts tests/cli-agent-run.test.ts tests/cli-check-remote.test.ts tests/cli-shares.test.ts tests/cli-triggers.test.ts tests/cli-providers.test.ts tests/cli-rerun-put.test.ts tests/cli-guide.test.ts tests/cli-runtimes.test.ts tests/cli-deploy-safety.test.ts tests/cli-operator.test.ts tests/cli-flow-patterns.test.ts tests/cli-flow-rm-step.test.ts tests/cli-flow-dup-step.test.ts tests/cli-flow-write-stale.test.ts tests/cli-agent-link-stale.test.ts tests/cli-parity.test.ts tests/cli-invoke-inputs.test.ts tests/cli-audit-keys.test.ts tests/cli-version.test.ts tests/cli-check-web-warnings.test.ts tests/cli-report-image.test.ts tests/cli-check-workspace-paths.test.ts tests/cli-parity-dashboard.test.ts tests/cli-api-standards.test.ts tests/cli-backups-onboarding.test.ts tests/cli-check-limits.test.ts tests/cli-gallery.test.ts tests/cli-status-platform.test.ts tests/cli-webhooks-notifications.test.ts tests/cli-flags.test.ts tests/cli-api-coverage.test.ts tests/cli-hooks.test.ts tests/cli-release.test.ts tests/cli-terminal.test.ts tests/cli-network.test.ts tests/cli-assistant.test.ts",
|
|
25
25
|
"release": "node scripts/release.mjs",
|
|
26
26
|
"typecheck": "tsc -p tsconfig.json",
|
|
27
27
|
"docs:sync": "node scripts/sync-docs.mjs",
|