fold-agent 0.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/README.md +14 -0
- package/bin/fold-agent.js +2 -0
- package/dist/cli/app.d.ts +4 -0
- package/dist/cli/app.js +1113 -0
- package/dist/cli/app.js.map +1 -0
- package/dist/cli/bin.d.ts +2 -0
- package/dist/cli/bin.js +8 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/cli/context.d.ts +5 -0
- package/dist/cli/context.js +2 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/operations.d.ts +126 -0
- package/dist/cli/operations.js +1159 -0
- package/dist/cli/operations.js.map +1 -0
- package/dist/cli/output.d.ts +22 -0
- package/dist/cli/output.js +245 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/package-info.d.ts +5 -0
- package/dist/cli/package-info.js +12 -0
- package/dist/cli/package-info.js.map +1 -0
- package/dist/cli/results.d.ts +393 -0
- package/dist/cli/results.js +2 -0
- package/dist/cli/results.js.map +1 -0
- package/dist/cli/skill-install.d.ts +7 -0
- package/dist/cli/skill-install.js +211 -0
- package/dist/cli/skill-install.js.map +1 -0
- package/dist/deploy/public-origin.d.ts +15 -0
- package/dist/deploy/public-origin.js +59 -0
- package/dist/deploy/public-origin.js.map +1 -0
- package/dist/rooms/append-log-api.d.ts +16 -0
- package/dist/rooms/append-log-api.js +72 -0
- package/dist/rooms/append-log-api.js.map +1 -0
- package/dist/rooms/append-log-validation.d.ts +2 -0
- package/dist/rooms/append-log-validation.js +16 -0
- package/dist/rooms/append-log-validation.js.map +1 -0
- package/dist/rooms/comments.d.ts +63 -0
- package/dist/rooms/comments.js +136 -0
- package/dist/rooms/comments.js.map +1 -0
- package/dist/rooms/crypto.d.ts +11 -0
- package/dist/rooms/crypto.js +44 -0
- package/dist/rooms/crypto.js.map +1 -0
- package/dist/rooms/encrypted-records.d.ts +5 -0
- package/dist/rooms/encrypted-records.js +21 -0
- package/dist/rooms/encrypted-records.js.map +1 -0
- package/dist/rooms/markdown-snapshot.d.ts +23 -0
- package/dist/rooms/markdown-snapshot.js +126 -0
- package/dist/rooms/markdown-snapshot.js.map +1 -0
- package/dist/rooms/metadata.d.ts +32 -0
- package/dist/rooms/metadata.js +118 -0
- package/dist/rooms/metadata.js.map +1 -0
- package/dist/rooms/personas.d.ts +16 -0
- package/dist/rooms/personas.js +78 -0
- package/dist/rooms/personas.js.map +1 -0
- package/dist/rooms/project-state.d.ts +41 -0
- package/dist/rooms/project-state.js +249 -0
- package/dist/rooms/project-state.js.map +1 -0
- package/dist/rooms/proposals.d.ts +63 -0
- package/dist/rooms/proposals.js +254 -0
- package/dist/rooms/proposals.js.map +1 -0
- package/dist/rooms/replay.d.ts +13 -0
- package/dist/rooms/replay.js +19 -0
- package/dist/rooms/replay.js.map +1 -0
- package/dist/rooms/room-reference.d.ts +21 -0
- package/dist/rooms/room-reference.js +142 -0
- package/dist/rooms/room-reference.js.map +1 -0
- package/dist/rooms/timeline.d.ts +26 -0
- package/dist/rooms/timeline.js +68 -0
- package/dist/rooms/timeline.js.map +1 -0
- package/package.json +35 -0
- package/skills/fold/SKILL.md +81 -0
- package/skills/fold/agents/openai.yaml +4 -0
- package/skills/fold/references/cli.md +33 -0
- package/skills/fold/references/security.md +14 -0
- package/skills/fold/references/workflow.md +48 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fold
|
|
3
|
+
description: Work safely in encrypted Fold Markdown project rooms. Use when joining or resuming a Fold room from an agent handoff, handling fold:v1 tokens or room URLs, exporting project context, replying to Fold comments/requests, or submitting reviewable Markdown proposals through the Fold CLI.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fold
|
|
7
|
+
|
|
8
|
+
Fold is an encrypted Markdown project room for humans and coding agents. Use the
|
|
9
|
+
Fold CLI for room work. Treat this skill as reusable operating policy; live
|
|
10
|
+
project memory comes from encrypted room replay through `fold-agent bootstrap`,
|
|
11
|
+
`fold-agent resume`, or `fold-agent context`, not from the skill.
|
|
12
|
+
|
|
13
|
+
## Start Here
|
|
14
|
+
|
|
15
|
+
When a handoff contains a pinned `fold-agent bootstrap` command, run that first:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx --yes fold-agent@0.1.0 bootstrap --room "fold:v1:..." --alias "launch" --output ./fold-project --json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If `fold` is not globally installed but you are inside the Fold repo, use the
|
|
22
|
+
repo-local wrapper from the handoff:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm run --silent cli -- bootstrap --room "fold:v1:..." --alias "launch" --output ./fold-project --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Do not use `/usr/bin/fold`. That is the Unix text-wrapping command, not Fold.
|
|
29
|
+
The Fold skill teaches agent behavior; `fold-agent` performs encrypted room
|
|
30
|
+
operations.
|
|
31
|
+
|
|
32
|
+
If `fold-agent resume` is unavailable, use the fallback sequence in
|
|
33
|
+
`references/workflow.md`.
|
|
34
|
+
|
|
35
|
+
## Rules
|
|
36
|
+
|
|
37
|
+
- Keep room URLs, `fold:v1:` tokens, `#key` fragments, and `.fold/rooms.json`
|
|
38
|
+
secret.
|
|
39
|
+
- Never paste room keys, tokens, or decrypted access files into logs, issues,
|
|
40
|
+
pull requests, or third-party services.
|
|
41
|
+
- Use `fold-agent post` for fresh Markdown files. Use proposals for changes to
|
|
42
|
+
existing accepted files unless the room policy explicitly asks for direct
|
|
43
|
+
edits.
|
|
44
|
+
- Do not self-assign a visible persona. Fold assigns agent personas from
|
|
45
|
+
room/system logic.
|
|
46
|
+
- Use saved aliases after the first join. Repeat agents should not reinstall
|
|
47
|
+
this skill every time.
|
|
48
|
+
|
|
49
|
+
## Normal Workflow
|
|
50
|
+
|
|
51
|
+
1. Resume the room.
|
|
52
|
+
2. Read open requests, comments, and pending proposals from the resume output.
|
|
53
|
+
3. Edit exported files locally.
|
|
54
|
+
4. Post fresh Markdown files directly:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
fold-agent post ./fold-project/NEW_FILE.md --room "launch" --path "NEW_FILE.md" --json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
5. Submit existing-file changes as one reviewable proposal:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
fold-agent propose ./fold-project \
|
|
64
|
+
--room "launch" \
|
|
65
|
+
--title "Describe the change" \
|
|
66
|
+
--comment "Summarize what changed." \
|
|
67
|
+
--json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
6. Reply instead of proposing when a human request needs clarification:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
fold-agent reply "<thread-id>" --room "launch" --text "Short reply." --json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## References
|
|
77
|
+
|
|
78
|
+
- Read `references/security.md` before handling secret-bearing room access.
|
|
79
|
+
- Read `references/workflow.md` when `fold-agent resume` is unavailable or a handoff
|
|
80
|
+
gives only older commands.
|
|
81
|
+
- Read `references/cli.md` for command examples and repeat-agent behavior.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Fold CLI Reference
|
|
2
|
+
|
|
3
|
+
Development wrapper inside the Fold repo:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm run --silent cli -- <command>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Do not use `/usr/bin/fold`. That is the Unix text-wrapping command, not Fold.
|
|
10
|
+
|
|
11
|
+
Primary fresh-agent command:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx --yes fold-agent@0.1.0 bootstrap --room "fold:v1:..." --alias "launch" --output ./fold-project --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Installed CLI repeat command:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
fold-agent resume --room "launch" --output ./fold-project --json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Bundled skill commands:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
fold-agent skill
|
|
27
|
+
fold-agent skill status
|
|
28
|
+
fold-agent skill update
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Do not use `npm install -g fold` or `npx fold`; the public unscoped npm package
|
|
32
|
+
name is not Fold's CLI package. Use the pinned `fold-agent` package-runner
|
|
33
|
+
command from the handoff.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Fold Security
|
|
2
|
+
|
|
3
|
+
- Treat `fold:v1:` tokens, room URLs with `#key`, copied agent handoffs, and
|
|
4
|
+
`.fold/rooms.json` as decryption-capable secrets.
|
|
5
|
+
- The room key belongs client-side. Never send URL fragments or room secrets to
|
|
6
|
+
server APIs.
|
|
7
|
+
- Routine JSON output should stay redacted. If command output contains
|
|
8
|
+
`fold:v1:`, `#key=`, or `roomSecret`, handle it as secret-bearing invite or
|
|
9
|
+
profile output.
|
|
10
|
+
- The server may see plaintext routing metadata such as `roomId`, sequence, and
|
|
11
|
+
sender id. Markdown bodies, comments, proposals, and timeline payloads are
|
|
12
|
+
decrypted client-side.
|
|
13
|
+
- Losing the room key means losing access unless someone still has a saved
|
|
14
|
+
alias, token, room URL, or export.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Fold Workflow
|
|
2
|
+
|
|
3
|
+
Use this fallback when `fold-agent bootstrap` is not available.
|
|
4
|
+
|
|
5
|
+
First join:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
fold-agent room add "fold:v1:..." --alias "launch"
|
|
9
|
+
fold-agent status --room "launch" --json
|
|
10
|
+
fold-agent export --room "launch" --output ./fold-project --json
|
|
11
|
+
fold-agent context --room "launch" --json
|
|
12
|
+
fold-agent requests --room "launch" --json
|
|
13
|
+
fold-agent comments --room "launch" --type comment --open --json
|
|
14
|
+
fold-agent proposals --room "launch" --json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Repeat work in the same project:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
fold-agent resume --room "launch" --output ./fold-project --json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Post a fresh Markdown file directly:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
fold-agent post ./fold-project/NEW_FILE.md --room "launch" --path "NEW_FILE.md" --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Submit changes to existing files as a proposal:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
fold-agent propose ./fold-project --room "launch" --title "Describe the change" --comment "Summarize what changed." --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Reply to a human request:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
fold-agent reply "<thread-id>" --room "launch" --text "Short reply." --json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Review only when explicitly asked:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
fold-agent proposals --room "launch" --json
|
|
45
|
+
fold-agent show-proposal "<proposal-id>" --room "launch" --json
|
|
46
|
+
fold-agent accept "<proposal-id>" --room "launch" --json
|
|
47
|
+
fold-agent reject "<proposal-id>" --room "launch" --json
|
|
48
|
+
```
|