ftown 0.25.3 → 0.26.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/coordination/board.d.ts +12 -0
- package/dist/coordination/board.js +240 -0
- package/dist/coordination/board.js.map +1 -0
- package/dist/coordination/card-store.d.ts +9 -0
- package/dist/coordination/card-store.js +188 -0
- package/dist/coordination/card-store.js.map +1 -0
- package/dist/coordination/contract.d.ts +236 -0
- package/dist/coordination/contract.js +63 -0
- package/dist/coordination/contract.js.map +1 -0
- package/dist/coordination/format.d.ts +5 -0
- package/dist/coordination/format.js +60 -0
- package/dist/coordination/format.js.map +1 -0
- package/dist/coordination/tree-events.d.ts +31 -0
- package/dist/coordination/tree-events.js +226 -0
- package/dist/coordination/tree-events.js.map +1 -0
- package/dist/coordination/wiring.d.ts +48 -0
- package/dist/coordination/wiring.js +143 -0
- package/dist/coordination/wiring.js.map +1 -0
- package/dist/coordination-cli.d.ts +34 -0
- package/dist/coordination-cli.js +460 -0
- package/dist/coordination-cli.js.map +1 -0
- package/dist/ftown-cli.js +9 -2
- package/dist/ftown-cli.js.map +1 -1
- package/dist/index.js +30 -7
- package/dist/index.js.map +1 -1
- package/dist/local-api-server.d.ts +6 -1
- package/dist/local-api-server.js +282 -5
- package/dist/local-api-server.js.map +1 -1
- package/dist/mail-delivery.d.ts +16 -2
- package/dist/mail-delivery.js +331 -77
- package/dist/mail-delivery.js.map +1 -1
- package/dist/mail-store.d.ts +7 -0
- package/dist/mail-store.js +71 -1
- package/dist/mail-store.js.map +1 -1
- package/dist/pull-request-events.d.ts +5 -0
- package/dist/pull-request-events.js +21 -1
- package/dist/pull-request-events.js.map +1 -1
- package/dist/security/bridge/permissions.js +20 -0
- package/dist/security/bridge/permissions.js.map +1 -1
- package/dist/types.d.ts +5 -1
- package/dist/wire-types.d.ts +17 -1
- package/dist/wire-types.js +1 -1
- package/dist/wire-types.js.map +1 -1
- package/package.json +2 -2
- package/skills/ftown/SKILL.md +29 -4
- package/skills/ftown/references/orchestrator.md +12 -7
- package/skills/ftown/references/sessions.md +45 -3
package/dist/wire-types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wire-types.js","sourceRoot":"","sources":["../src/wire-types.ts"],"names":[],"mappings":"AAAA,0EAA0E;
|
|
1
|
+
{"version":3,"file":"wire-types.js","sourceRoot":"","sources":["../src/wire-types.ts"],"names":[],"mappings":"AAAA,0EAA0E;AA6D1E,MAAM,CAAC,MAAM,UAAU,GAAwB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;AAiBlG,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAA6B,CAAC;AACrE,MAAM,CAAC,MAAM,0BAA0B,GAAG,0DAA0D,CAAC;AAErG;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,UAAmB;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,iBAAiB,CAAC,CAAc;IAC9C,OAAO,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;AACpE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ftown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "CLI bridge for ftown — generic PTY-over-Centrifugo relay",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"overrides": {
|
|
74
74
|
"qs": "6.16.1"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "033b06c892db214c1104779f68ef4f36e3c567f8"
|
|
77
77
|
}
|
package/skills/ftown/SKILL.md
CHANGED
|
@@ -51,6 +51,8 @@ ftown sessions preview --add ./extra.html
|
|
|
51
51
|
ftown sessions preview --remove notes.md
|
|
52
52
|
ftown sessions preview --clear
|
|
53
53
|
ftown sessions preview-reply --message "The preview is ready."
|
|
54
|
+
ftown status set --state working --headline "Reviewing the API client" --progress 0/1
|
|
55
|
+
ftown board
|
|
54
56
|
ftown harness mail send <session-id> --type task "review the API client"
|
|
55
57
|
ftown harness mail read
|
|
56
58
|
ftown env --help
|
|
@@ -95,10 +97,33 @@ ftown harness mail send --parent --type escalation "Blocked: need the API contra
|
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
Mail arrives as `[ftown mail]` context through harness hooks/extensions where
|
|
98
|
-
available.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
available. Mail is for directed instructions (`--type task`), results
|
|
101
|
+
(`--type result`) and escalations (`--type escalation`). Use `--type fyi` for
|
|
102
|
+
non-urgent notes; `fyi` never wakes the recipient. Progress and status go on
|
|
103
|
+
your card (below), never as mail. Each new batch of mail nudges the recipient
|
|
104
|
+
at most once; un-read mail stays in the inbox — read it with
|
|
105
|
+
`ftown harness mail read`. Prefer mail for agent communication; use terminal
|
|
106
|
+
key injection only when the task needs it. Inspect peers with `ftown board`
|
|
107
|
+
and `ftown sessions list`.
|
|
108
|
+
|
|
109
|
+
## Status and board
|
|
110
|
+
|
|
111
|
+
Keep your card current with `ftown status set` at meaningful transitions —
|
|
112
|
+
starting, becoming blocked, finishing — not every turn. Set state
|
|
113
|
+
(`working`, `blocked`, `waiting_review`, `done`, `failed`), a short headline,
|
|
114
|
+
progress and any blocker. Writing a card wakes nobody. Parents read
|
|
115
|
+
`ftown board` (one line per child) instead of screening quiet workers, and
|
|
116
|
+
wait with `ftown board --wait --until any-done|any-blocked|any-ready` or
|
|
117
|
+
`ftown events --wait`. Idle workers show on the board and as an `idle` event.
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
ftown status set --state working --headline "Implementing the card store" --progress 1/4
|
|
121
|
+
ftown status set --state blocked --headline "Need the API contract" --on parent --text "Waiting on the contract decision"
|
|
122
|
+
ftown status set --state done --headline "Card store shipped; checks green"
|
|
123
|
+
ftown board
|
|
124
|
+
ftown board --wait --until any-done --timeout 300
|
|
125
|
+
ftown events --wait
|
|
126
|
+
```
|
|
102
127
|
|
|
103
128
|
## Human attention and pull requests
|
|
104
129
|
|
|
@@ -20,16 +20,21 @@ harness's model list. Never route to `exhausted`.
|
|
|
20
20
|
ftown sessions list
|
|
21
21
|
ftown sessions create --parent --workdir /path/to/repo --name review-auth \
|
|
22
22
|
--prompt "Review auth; read-only. Report concrete findings and validation."
|
|
23
|
-
ftown
|
|
24
|
-
ftown
|
|
23
|
+
ftown board --wait --until any-done --timeout 300
|
|
24
|
+
ftown board
|
|
25
25
|
ftown harness mail send <worker-id> --type task "Check the expired-token case too"
|
|
26
|
-
ftown sessions tell --children "Pause and report status"
|
|
27
26
|
```
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
Coordinate in a loop: spawn children, wait with
|
|
29
|
+
`ftown board --wait --until any-done --timeout 300` (or `any-blocked`,
|
|
30
|
+
`any-ready`, `all-done`; `ftown events --wait` waits for the next event), act
|
|
31
|
+
on the board and mail, then repeat until every child is done. Children keep
|
|
32
|
+
their cards current; progress goes on the card, never as mail. Use
|
|
33
|
+
`ftown sessions screen <worker-id> --limit 100` only to investigate terminal
|
|
34
|
+
detail. Mail handles directed instructions, results and escalations; read it
|
|
35
|
+
with `ftown harness mail read`. Each new batch nudges the recipient at most
|
|
36
|
+
once, and a nudge may append a one-line digest of child status. Parallel tasks
|
|
37
|
+
need disjoint write ownership and serialized shared resources.
|
|
33
38
|
|
|
34
39
|
After accepting a worker's result, request any concrete follow-up before
|
|
35
40
|
explicit cleanup with `ftown sessions remove <worker-id>`.
|
|
@@ -51,6 +51,43 @@ ftown sessions archive
|
|
|
51
51
|
ftown sessions revive <session-id>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
+
## Status, board and events
|
|
55
|
+
|
|
56
|
+
Each session has a card: state (`working`, `blocked`, `waiting_review`,
|
|
57
|
+
`done`, `failed`), headline, optional progress, blocker and next step. Keep
|
|
58
|
+
your own card current at meaningful transitions, not every turn. Writing a
|
|
59
|
+
card wakes nobody. The target defaults to `FTOWN_SESSION_ID`; `--session-id
|
|
60
|
+
<id>` selects another session.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Print my card
|
|
64
|
+
ftown status [--json] [--session-id <id>]
|
|
65
|
+
|
|
66
|
+
# Update my card (omitted fields unchanged; first write needs --state and --headline)
|
|
67
|
+
ftown status set [--state <s>] [--headline <t>] [--progress <d>/<t>|--no-progress] \
|
|
68
|
+
[--on human|parent|external|session:<id>] [--text <t>] [--next <t>|--no-next] [--session-id <id>]
|
|
69
|
+
|
|
70
|
+
# Remove my card
|
|
71
|
+
ftown status clear [--session-id <id>]
|
|
72
|
+
|
|
73
|
+
# One line per child of my tree
|
|
74
|
+
ftown board [--json] [--since <n>] [--ready] [--all] [--session-id <id>]
|
|
75
|
+
|
|
76
|
+
# Wait until a board condition holds
|
|
77
|
+
ftown board [--wait --until any-change|any-done|any-blocked|all-done|any-ready [--timeout <s≤300>]] [--session-id <id>]
|
|
78
|
+
|
|
79
|
+
# Tree events for my tree (status, attention, pr, preview, exit, idle, result, mail)
|
|
80
|
+
ftown events [--json] [--since <n>] [--limit <n>] [--wait [--timeout <s≤300>]] [--session-id <id>]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
`--ready` lists only children whose PR checks passed and who are not done;
|
|
84
|
+
`--all` includes archived/completed children; `--since <n>` limits the board
|
|
85
|
+
to children with events after that cursor (the board prints its cursor).
|
|
86
|
+
Pass the cursor back as `--since` to see only what changed.
|
|
87
|
+
|
|
88
|
+
Exit codes for `status`, `board` and `events`: 0 ok, 1 error, 2 usage,
|
|
89
|
+
3 wait timed out with the condition unmet.
|
|
90
|
+
|
|
54
91
|
## Preview session files
|
|
55
92
|
|
|
56
93
|
```bash
|
|
@@ -213,8 +250,12 @@ reports the conversation id and delivers mail at turn end.
|
|
|
213
250
|
Grok and Antigravity hooks do not run in the interactive TUI until the folder
|
|
214
251
|
has been trusted in that CLI's own trust prompt; the owner answers it once per
|
|
215
252
|
folder, and ftown does not bypass it.
|
|
216
|
-
Cursor and shell sessions rely on
|
|
217
|
-
mail read` instead.
|
|
253
|
+
Cursor and shell sessions rely on a one-line nudge to run `ftown harness
|
|
254
|
+
mail read` instead. Each new batch of mail nudges the recipient at most once;
|
|
255
|
+
un-read mail stays in the inbox. Mail types are `message`, `task`, `result`,
|
|
256
|
+
`escalation` and `fyi`; `fyi` is for non-urgent notes and never wakes the
|
|
257
|
+
recipient. Progress and status go on the session card (see above), never as
|
|
258
|
+
mail.
|
|
218
259
|
|
|
219
260
|
```bash
|
|
220
261
|
# Tell a specific session
|
|
@@ -265,7 +306,8 @@ ftown sessions list
|
|
|
265
306
|
ftown sessions create --prompt "Run tests and report" --workdir "$PWD" --parent
|
|
266
307
|
# -> note session.id from JSON
|
|
267
308
|
|
|
268
|
-
ftown
|
|
309
|
+
ftown board --wait --until any-done --timeout 300
|
|
310
|
+
ftown board
|
|
269
311
|
ftown sessions grep <child-id> --pattern 'FAIL|Error'
|
|
270
312
|
```
|
|
271
313
|
|