@first-tree-ai/context-tree 0.1.11 → 0.1.12

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 CHANGED
@@ -23,12 +23,12 @@ are credential-free `OWNER/REPO` identities, never URLs containing credentials.
23
23
  npm install --global @first-tree-ai/context-tree
24
24
  ```
25
25
 
26
- That installs the `context-tree` command and copies the seven skills into the
26
+ That installs the `context-tree` command and copies the eight skills into the
27
27
  skill directory of every agent you already have:
28
28
 
29
29
  ```text
30
- ✓ claude → ~/.claude/skills/ (7 skills)
31
- ✓ codex → ~/.codex/skills/ (7 skills)
30
+ ✓ claude → ~/.claude/skills/ (8 skills)
31
+ ✓ codex → ~/.codex/skills/ (8 skills)
32
32
  ```
33
33
 
34
34
  Restart your agent so it discovers them, then try asking:
@@ -181,9 +181,64 @@ commit if anything changed. It preserves useful context and protected decisions.
181
181
  > Clean the entire tree and publish the changes. If another writer advances it,
182
182
  > defer until the next run.
183
183
 
184
- Schedule this prompt in your host; start daily with one cleaner per tree.
185
- See [Claude Code scheduling](https://code.claude.com/docs/en/scheduled-tasks) or
186
- [Codex scheduled tasks](https://learn.chatgpt.com/docs/automations?surface=app).
184
+ Use `context-tree-schedule-cleanup` to create or update a persistent local
185
+ cleanup task:
186
+
187
+ ```text
188
+ # Codex
189
+ $context-tree-schedule-cleanup every 2 hours
190
+
191
+ # Claude Code
192
+ /context-tree-schedule-cleanup every 2 hours
193
+ ```
194
+
195
+ The CLI manages one schedule per tree on this machine:
196
+
197
+ ```bash
198
+ context-tree cleanup schedule --project-path /absolute/project --agent codex
199
+ context-tree cleanup schedule --project-path /absolute/project --agent claude --every 2h
200
+ context-tree cleanup status --project-path /absolute/project
201
+ context-tree cleanup run --project-path /absolute/project
202
+ context-tree cleanup remove --project-path /absolute/project
203
+ ```
204
+
205
+ All four operations accept `--json`. Scheduling starts no immediate cleanup.
206
+ Cadence defaults to one hour and accepts positive whole-minute durations (`30m`,
207
+ `2h`, `1d`, up to `365d`). Repeating schedule updates the same tree's entry.
208
+ Remove an active schedule before changing it. Local identity is the resolved
209
+ path; GitHub identity is the repository, case-insensitively. Connection changes
210
+ require explicit removal and rescheduling.
211
+
212
+ macOS uses user LaunchAgents, each invoking an executable named
213
+ `context-tree-cleanup` at `~/.context-tree/cleanup/launchers/<schedule-id>/`.
214
+ This private launcher executes the configured Node cleanup command and is removed
215
+ with the schedule. Linux uses systemd user timers and services. The
216
+ machine must be awake and the user scheduler available. No desktop app, root
217
+ installation, daemon, or Linux lingering is needed. Cancel any previously created
218
+ Codex desktop task or Claude Desktop routine before replacing it: the CLI cannot
219
+ inspect or remove those tasks. Keep one designated cleaner per tree across machines.
220
+
221
+ Agents use existing CLI authentication. Defaults are `gpt-5.6-luna` with low
222
+ reasoning effort and `claude-haiku-4-5`; `--model` selects an explicit override.
223
+ Codex uses workspace-write sandboxing and Claude uses file-editing permissions
224
+ with a restricted tool list. Permission and authentication failures stop the run;
225
+ models are never silently substituted. See [Codex noninteractive mode](https://learn.chatgpt.com/docs/non-interactive-mode)
226
+ and the [Claude CLI reference](https://code.claude.com/docs/en/cli-reference).
227
+
228
+ Scheduling opens a 24-hour activity window. Successful ordinary `create`,
229
+ `connect`, `sync`, `read`, `prepare-write`, and `finish-write` use refreshes it.
230
+ Cleanup and status never do. Missing or older activity skips before network or
231
+ model work; successfully inspected unchanged commits skip the model. Each run
232
+ uses a fresh isolated worktree, one agent with a 15-minute timeout, shared
233
+ editorial instructions, verification, and at most one publication attempt.
234
+
235
+ Private atomic state in `~/.context-tree/cleanup` holds configuration, activity,
236
+ the last successful commit, and only the latest outcome. `status` reports native
237
+ registration/running state and whether inactivity prevents cleanup. `remove`
238
+ disables future runs and stops the native scheduled process and its children,
239
+ preserving unfinished worktrees. Publication already underway may have completed;
240
+ uncertain outcomes are reported without rollback or retries. Failures and
241
+ `WRITE_OUTDATED` never advance the successful-inspection checkpoint.
187
242
 
188
243
  ## Project identity
189
244
 
@@ -211,7 +266,8 @@ install uninstall create connect list resolve sync prepare-write
211
266
  finish-write publish read verify
212
267
  ```
213
268
 
214
- Setup, create, connect, read, write, publish, and cleanup ship as seven skills; setup
269
+ Setup, create, connect, read, write, publish, cleanup, and schedule-cleanup ship as
270
+ eight skills; setup
215
271
  orchestrates the five concrete workflows. `install` is the distribution
216
272
  entry point, run for you by `npm install`; `uninstall` is its supported reverse.
217
273
  `resolve`, `sync`, `prepare-write`,
@@ -223,7 +279,7 @@ separate user intentions; `list` backs setup's connect-target discovery.
223
279
  `create`, `connect`, `list`, `resolve`, `publish`, `read`, and `verify` print
224
280
  human-readable text by default and accept `--json` to emit their strict schema
225
281
  version `1` payload for scripts and agents; in text mode a failure prints a
226
- sanitized message to stderr with a non-zero exit code. The seven skills always
282
+ sanitized message to stderr with a non-zero exit code. The eight skills always
227
283
  pass `--json`. `sync`, `prepare-write`, `finish-write`, `install`, and `uninstall` are
228
284
  low-level plumbing and always emit that JSON (with the error envelope on stdout).
229
285
  `--help` and `--version` are always plain text.