@foleo/cli 0.1.9 → 0.1.11
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 +31 -5
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +492 -114
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/skills/foleo/SKILL.md +41 -7
package/README.md
CHANGED
|
@@ -16,6 +16,11 @@ npx -y @foleo/cli whoami
|
|
|
16
16
|
npx -y @foleo/cli doctor
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
The default key can read, publish, and reversibly unpublish artifacts. Deletion
|
|
20
|
+
uses incremental authority: re-run login with `--allow-delete` before delete or
|
|
21
|
+
restore, and add `--allow-purge` only when you intentionally need irreversible
|
|
22
|
+
purge. Purge is never requested by a normal installation.
|
|
23
|
+
|
|
19
24
|
That runs npm `latest` with no global install, which is the intended steady state — there is no need to install anything permanently. Optional: `npm install --global @foleo/cli` puts `foleo` on PATH.
|
|
20
25
|
|
|
21
26
|
`npx -y @foleo/cli skill get` prints the version-matched bundled skill to stdout — it installs nothing. To keep it across sessions, write that output wherever your agent loads reusable skills or instructions from. `skill path` prints where that file lives on disk, which is only a stable location under a global install — under `npx` it resolves inside a temporary cache. Agents can read the live contract at [https://foleo.app/agents.md](https://foleo.app/agents.md), also available as `https://foleo.app/CLAUDE.md`. Foleo has no MCP service during this beta.
|
|
@@ -24,13 +29,32 @@ That runs npm `latest` with no global install, which is the intended steady stat
|
|
|
24
29
|
|
|
25
30
|
Production is the default. Use `--staging` on any command for a staging rehearsal, or run `npx -y @foleo/cli environment --staging` to verify the selected API. `FOLEO_API_BASE` remains an explicit custom override.
|
|
26
31
|
|
|
27
|
-
##
|
|
32
|
+
## Artifact discovery and lifecycle
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npx -y @foleo/cli list --json
|
|
36
|
+
npx -y @foleo/cli list --kind document --format markdown --json
|
|
37
|
+
npx -y @foleo/cli get <id> --json
|
|
38
|
+
npx -y @foleo/cli status <id> --json
|
|
39
|
+
npx -y @foleo/cli unpublish <id> --revision <etag> --json
|
|
40
|
+
npx -y @foleo/cli delete <id> --revision <etag> --json
|
|
41
|
+
npx -y @foleo/cli restore <id> --revision <deletion-etag> --json
|
|
42
|
+
npx -y @foleo/cli purge <id> --revision <etag> --confirm <id> --json
|
|
43
|
+
npx -y @foleo/cli deletion-status <id> --json
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
These commands are artifact-generic: the server resolves source format from the
|
|
47
|
+
id. `unpublish` is reversible, timerless, and byte-preserving. `delete` takes the
|
|
48
|
+
artifact offline and starts a 30-day restore window; it never deletes local user
|
|
49
|
+
files. `purge` skips that window but remains asynchronous. A `202` response is
|
|
50
|
+
acceptance, not proof of erasure—only `deletion-status` state `complete` confirms
|
|
51
|
+
that Foleo-held bytes are gone. Always carry the returned opaque `etag` exactly.
|
|
52
|
+
|
|
53
|
+
## Markdown publishing
|
|
28
54
|
|
|
29
55
|
```sh
|
|
30
56
|
npx -y @foleo/cli publish ./notes.md --json
|
|
31
57
|
npx -y @foleo/cli update <id> ./notes.md --version <version> --json
|
|
32
|
-
npx -y @foleo/cli status <id> --json
|
|
33
|
-
npx -y @foleo/cli unpublish <id> --json
|
|
34
58
|
```
|
|
35
59
|
|
|
36
60
|
## Trusted HTML alpha
|
|
@@ -39,13 +63,15 @@ HTML is executable content. A human must inspect the local source and explicitly
|
|
|
39
63
|
|
|
40
64
|
```sh
|
|
41
65
|
npx -y @foleo/cli html-publish ./site --accept-hosting-risk --json
|
|
42
|
-
npx -y @foleo/cli html-status <id> --json
|
|
43
66
|
npx -y @foleo/cli html-visibility <id> --set private --revision <stateRevision> --json
|
|
44
67
|
npx -y @foleo/cli html-password <id> --password '<12–256 character password>' --revision <stateRevision> --json
|
|
45
68
|
npx -y @foleo/cli html-visibility <id> --set unlisted --revision <stateRevision> --json
|
|
46
|
-
npx -y @foleo/cli html-unpublish <id> --revision <stateRevision> --json
|
|
47
69
|
```
|
|
48
70
|
|
|
49
71
|
Carry the latest returned `stateRevision` into every HTML mutation. Public HTML is not available during this alpha.
|
|
72
|
+
The `html-*` commands remain supported format-specific commands until generic
|
|
73
|
+
publish and settings are available. Use the artifact-generic discovery and
|
|
74
|
+
lifecycle commands above where they exist. No `html-delete`, `html-restore`, or
|
|
75
|
+
`html-purge` commands exist.
|
|
50
76
|
|
|
51
77
|
The CLI stores its credential in macOS Keychain after login. Signing in to the Mac app does not sign in the CLI. Never write credentials into source files, prompts, artifacts, or repositories. See [https://foleo.app/agents.md](https://foleo.app/agents.md) for the concise agent contract.
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,13 @@ export interface CliDeps {
|
|
|
27
27
|
nodeVersion?: string;
|
|
28
28
|
now?(): number;
|
|
29
29
|
sleep?(milliseconds: number): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Jitter source for upload pacing and retry backoff, in [0, 1). Injectable so
|
|
32
|
+
* tests assert the pacing invariant deterministically instead of tolerating a
|
|
33
|
+
* random spread — a test that accepts any value in a range cannot tell correct
|
|
34
|
+
* pacing from pacing that is merely close.
|
|
35
|
+
*/
|
|
36
|
+
random?(): number;
|
|
30
37
|
}
|
|
31
38
|
export interface BrowserCallback {
|
|
32
39
|
callbackUrl: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA6BA,iGAAiG;AACjG,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAgB1E,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;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