codex-toys 0.140.11 → 0.140.13

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.
Files changed (55) hide show
  1. package/README.md +35 -15
  2. package/dist/cli/actions.d.ts +1 -1
  3. package/dist/cli/actions.d.ts.map +1 -1
  4. package/dist/cli/actions.js +1 -0
  5. package/dist/cli/actions.js.map +1 -1
  6. package/dist/cli/args.d.ts +25 -20
  7. package/dist/cli/args.d.ts.map +1 -1
  8. package/dist/cli/args.js +67 -33
  9. package/dist/cli/args.js.map +1 -1
  10. package/dist/cli/help.d.ts.map +1 -1
  11. package/dist/cli/help.js +18 -16
  12. package/dist/cli/help.js.map +1 -1
  13. package/dist/cli/index.js +68 -57
  14. package/dist/cli/index.js.map +1 -1
  15. package/dist/cli/toybox.js +3 -3
  16. package/dist/internal/feed/index.d.ts +26 -1
  17. package/dist/internal/feed/index.d.ts.map +1 -1
  18. package/dist/internal/feed/index.js +102 -1
  19. package/dist/internal/feed/index.js.map +1 -1
  20. package/dist/internal/package.json +5 -0
  21. package/dist/internal/workbench/{deferred-run-methods.d.ts → dispatch-run-methods.d.ts} +12 -12
  22. package/dist/internal/workbench/{deferred-run-methods.d.ts.map → dispatch-run-methods.d.ts.map} +1 -1
  23. package/dist/internal/workbench/{deferred-run-methods.js → dispatch-run-methods.js} +61 -61
  24. package/dist/internal/workbench/{deferred-run-methods.js.map → dispatch-run-methods.js.map} +1 -1
  25. package/dist/internal/workbench/fetch.js +1 -1
  26. package/dist/internal/workbench/fetch.js.map +1 -1
  27. package/dist/internal/workbench/index.d.ts +1 -1
  28. package/dist/internal/workbench/index.js +1 -1
  29. package/dist/internal/workbench/workbench-overview.d.ts +9 -9
  30. package/dist/internal/workbench/workbench-overview.js +12 -12
  31. package/dist/internal/workbench/workbench-runtime.d.ts +75 -120
  32. package/dist/internal/workbench/workbench-runtime.d.ts.map +1 -1
  33. package/dist/internal/workbench/workbench-runtime.js +293 -621
  34. package/dist/internal/workbench/workbench-runtime.js.map +1 -1
  35. package/dist/internal/workbench/workflow.d.ts.map +1 -1
  36. package/dist/internal/workbench/workflow.js +106 -11
  37. package/dist/internal/workbench/workflow.js.map +1 -1
  38. package/docs/pages/{reference → components}/cli.md +13 -14
  39. package/docs/pages/{primitives → components}/toybox.md +4 -4
  40. package/docs/pages/guides/capability-kit-setup.md +135 -0
  41. package/docs/pages/guides/dashboard-over-toybox.md +145 -0
  42. package/docs/pages/guides/delegated-repo-work.md +119 -0
  43. package/docs/pages/guides/feed-to-workflow.md +138 -0
  44. package/docs/pages/guides/local-scheduled-workbench.md +149 -0
  45. package/docs/pages/guides/remote-codex-workbench.md +147 -0
  46. package/docs/pages/guides/repository-autonomy.md +163 -0
  47. package/docs/pages/index.md +35 -11
  48. package/docs/pages/primitives/{deferred-queues.md → dispatch-queues.md} +21 -21
  49. package/docs/pages/primitives/feed.md +18 -9
  50. package/docs/pages/primitives/workbench.md +26 -21
  51. package/docs/pages/primitives/workflow.md +6 -5
  52. package/docs/pages/reference/packages.md +14 -2
  53. package/package.json +1 -1
  54. /package/docs/pages/{primitives → components}/kits.md +0 -0
  55. /package/docs/pages/{primitives → components}/proxy.md +0 -0
@@ -1,16 +1,17 @@
1
1
  ---
2
- title: Deferred Queues
2
+ title: Dispatch And Queues
3
3
  description: Durable future run intents, prompt queues, local handoffs, retries, and collection.
4
4
  ---
5
5
 
6
- # Deferred Queues
6
+ # Dispatch And Queues
7
7
 
8
- Deferred queues give codex-toys a durable way to say "do this later" without
9
- leaving an agent process running. All queues are stored under the workbench state
8
+ Dispatch is the durable "run this later" primitive. Prompt queue and local
9
+ handoff queue are intake surfaces that create dispatch intents without leaving
10
+ an agent process running. All dispatch state is stored under the workbench state
10
11
  root for the selected mode.
11
12
 
12
13
  ```text
13
- .codex/workbench/local/deferred/
14
+ .codex/workbench/local/dispatch/
14
15
  intents/
15
16
  attempts/
16
17
  outputs/
@@ -18,26 +19,25 @@ root for the selected mode.
18
19
  collect-cursors/
19
20
  ```
20
21
 
21
- Actions mode uses `.codex/workbench/actions/deferred`.
22
+ Actions mode uses `.codex/workbench/actions/dispatch`.
22
23
 
23
- ## Deferred Runs
24
+ ## Dispatch Runs
24
25
 
25
- The base deferred queue stores future workbench intents. A target can be:
26
+ The base dispatch queue stores future workbench intents. A target can be:
26
27
 
27
28
  - a direct Codex turn
28
29
  - a named workflow
29
30
  - a configured workbench task
30
31
 
31
32
  ```bash
32
- codex-toys workbench deferred create --params-json '{"runAt":"2026-01-01T14:00:00.000Z","target":{"kind":"turn","prompt":"Review the workbench."}}'
33
- codex-toys workbench deferred list --json
34
- codex-toys workbench deferred run-due
35
- codex-toys workbench deferred read <intent-id> --include-output --json
36
- codex-toys workbench deferred pull <intent-id> --json
37
- codex-toys workbench deferred collect --cursor operator --json
38
- codex-toys workbench deferred cancel <intent-id>
39
- codex-toys workbench deferred retry <intent-id>
40
- codex-toys workbench deferred prune --older-than-days 30 --dry-run
33
+ codex-toys workbench dispatch create --params-json '{"runAt":"2026-01-01T14:00:00.000Z","target":{"kind":"turn","prompt":"Review the workbench."}}'
34
+ codex-toys workbench dispatch list --json
35
+ codex-toys workbench dispatch run-due
36
+ codex-toys workbench dispatch read <intent-id> --include-output --json
37
+ codex-toys workbench dispatch collect --cursor operator --json
38
+ codex-toys workbench dispatch cancel <intent-id>
39
+ codex-toys workbench dispatch retry <intent-id>
40
+ codex-toys workbench dispatch prune --older-than-days 30 --dry-run
41
41
  ```
42
42
 
43
43
  One-shot intents run at most once. Retry creates a new pending intent from
@@ -46,7 +46,7 @@ terminal history and leaves the original intent, attempts, and outputs in place.
46
46
  ## Prompt Queue
47
47
 
48
48
  The prompt queue is the friendly surface for one-off prompts. It stores prompts
49
- as deferred turn intents with `source.kind = "prompt-queue"`.
49
+ as dispatch turn intents with `source.kind = "prompt-queue"`.
50
50
 
51
51
  ```bash
52
52
  codex-toys workbench prompt enqueue "Draft migration notes." --queue low-priority --effort low
@@ -60,7 +60,7 @@ codex-toys workbench prompt retry <intent-id>
60
60
 
61
61
  Prompt entries can target an existing thread with `--thread-id`, set turn
62
62
  options such as `--model`, `--service-tier`, `--effort`, `--sandbox`,
63
- `--approval-policy`, or `--permissions`, and depend on another deferred intent:
63
+ `--approval-policy`, or `--permissions`, and depend on another dispatch intent:
64
64
 
65
65
  ```bash
66
66
  codex-toys workbench prompt enqueue "Continue after the audit." \
@@ -73,7 +73,7 @@ codex-toys workbench prompt enqueue "Continue after the audit." \
73
73
  ## Local Handoff Queue
74
74
 
75
75
  The local handoff queue is for work discovered in one workbench that requires a
76
- specific local controller host or local-only capability. Handoffs are deferred
76
+ specific local controller host or local-only capability. Handoffs are dispatch
77
77
  turn intents with `source.kind = "local-handoff"`, but generic drains skip them.
78
78
 
79
79
  ```bash
@@ -113,7 +113,7 @@ SSH is transport, not a third queue. With `--ssh`, queue commands operate on the
113
113
  remote workbench's local queue through the remote toybox.
114
114
 
115
115
  ```bash
116
- codex-toys --ssh <target> --cwd <remote-workbench> workbench deferred list --json
116
+ codex-toys --ssh <target> --cwd <remote-workbench> workbench dispatch list --json
117
117
  codex-toys --ssh <target> --cwd <remote-workbench> workbench prompt run-due --limit 1
118
118
  codex-toys --ssh <target> --cwd <remote-workbench> workbench handoff collect --cursor operator --json
119
119
  ```
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  title: Feed
3
- description: RSS and Atom intake, durable items, cursors, and ack-aware dispatch.
3
+ description: RSS, Atom, and manual intake, durable items, cursors, and ack-aware dispatch.
4
4
  ---
5
5
 
6
6
  # Feed
7
7
 
8
- Feed is the durable external signal intake primitive. It polls RSS or Atom
9
- sources, normalizes entries into feed items, records source checkpoints, and lets
10
- consumers collect items with named cursors.
8
+ Feed is the durable signal intake primitive. It polls RSS or Atom sources,
9
+ normalizes entries into feed items, records source checkpoints, accepts
10
+ manual/local event items, and lets consumers collect items with named cursors.
11
11
 
12
12
  Feed does not decide what a signal means. A workflow, workbench task, dashboard,
13
- or product function decides whether to enqueue a prompt, create a deferred run,
13
+ or product function decides whether to enqueue a prompt, create a dispatch run,
14
14
  or ignore the item.
15
15
 
16
16
  ## Config
@@ -44,6 +44,7 @@ codex-toys feed source list --json
44
44
  codex-toys feed poll --source project-releases --json
45
45
  codex-toys feed item list --source project-releases --status new --json
46
46
  codex-toys feed item read <item-id> --json
47
+ codex-toys feed item append --source hq-dispatch-results --params-json '{"externalId":"run-123","title":"Dispatch result","raw":{"status":"completed"}}' --json
47
48
  codex-toys feed collect --cursor radar --limit 50 --no-advance --json
48
49
  codex-toys feed cursor advance --cursor radar --item <item-id> --json
49
50
  codex-toys feed dispatch --source project-releases --cursor radar --target workbench-task:release-check --json
@@ -87,6 +88,7 @@ under an Actions environment.
87
88
  ```ts
88
89
  import {
89
90
  advanceFeedCursor,
91
+ appendFeedItem,
90
92
  collectFeedItems,
91
93
  createFeedContext,
92
94
  dispatchFeedItems,
@@ -100,6 +102,13 @@ const config = await loadFeedConfig(context);
100
102
 
101
103
  await pollFeedSources(context, config, { sourceId: "project-releases" });
102
104
 
105
+ await appendFeedItem(context, {
106
+ sourceId: "hq-dispatch-results",
107
+ externalId: "run-123",
108
+ title: "Dispatch result",
109
+ raw: { status: "completed" }
110
+ });
111
+
103
112
  const batch = await collectFeedItems(context, {
104
113
  cursor: "radar",
105
114
  limit: 50,
@@ -121,9 +130,9 @@ await dispatchFeedItems(context, config, {
121
130
 
122
131
  ## Boundary
123
132
 
124
- Feed owns source config, polling, HTTP checkpoints, item dedupe, durable item
125
- storage, collection cursors, cursor advancement, ack-aware dispatch mechanics,
126
- and pruning.
133
+ Feed owns source config, polling, HTTP checkpoints, manual/local item append,
134
+ item dedupe, durable item storage, collection cursors, cursor advancement,
135
+ ack-aware dispatch mechanics, and pruning.
127
136
 
128
137
  Products own source catalogs, scoring, filtering, prompt templates, dashboards,
129
- deferred-run policy, and external writes.
138
+ dispatch-run policy, and external writes.
@@ -35,17 +35,18 @@ repo `.codex` home so CI work can use repo-local skills and memories.
35
35
  ```bash
36
36
  codex-toys workbench doctor
37
37
  codex-toys workbench doctor --mode actions --json
38
- codex-toys workbench tick --mode local
39
38
  codex-toys workbench run <task-id> --mode actions
39
+ codex-toys workbench dispatch run-due --mode actions
40
40
  codex-toys workbench overview --json
41
- codex-toys workbench init actions --forgejo
41
+ codex-toys workbench init actions --forgejo [--image <ref>|--no-image]
42
42
  ```
43
43
 
44
44
  `doctor` reports mode, roots, config, memory presence, task health, latest runs,
45
- queue health, and local runner visibility when available.
45
+ and queue health.
46
46
 
47
- `tick` creates due scheduled task intents, runs due deferred work, and evaluates
48
- reactive rules. `run <task-id>` runs one configured task immediately.
47
+ `run <task-id>` runs one configured task immediately. `dispatch run-due` drains
48
+ durable queued dispatch work. Clocks are owned by the host scheduler: systemd
49
+ timers for local machines and Actions schedules for repository autonomy.
49
50
 
50
51
  ## Config
51
52
 
@@ -58,26 +59,23 @@ id = "daily-check"
58
59
  enabled = true
59
60
  kind = "workflow"
60
61
  workflow = "release-check"
61
- schedule = "0 14 * * *"
62
+ history = "latest"
62
63
 
63
64
  [[workbench.tasks]]
64
65
  id = "node-version"
65
66
  enabled = true
66
67
  kind = "command"
67
68
  command = ["node", "--version"]
68
- schedule = "0 * * * *"
69
-
70
- [[workbench.reactive]]
71
- id = "repair-failing-task"
72
- enabled = true
73
- task = "*"
74
- consecutive_failures_gte = 3
75
- kind = "skill"
76
- skill = "skill-repair"
69
+ history = "full"
77
70
  ```
78
71
 
79
- Task ids should be lowercase slug-like ids. Schedules use five-field cron
80
- syntax.
72
+ Task ids should be lowercase slug-like ids. `history = "full"` is the default
73
+ and writes per-run status and output files. `history = "latest"` overwrites
74
+ stable latest status and output files for that task.
75
+
76
+ Task-level schedules and reactive rule blocks are not workbench config
77
+ surfaces. Put recurrence in systemd timers or Actions workflow schedules and
78
+ have those schedulers call explicit codex-toys commands.
81
79
 
82
80
  ## Task Kinds
83
81
 
@@ -100,9 +98,16 @@ codex-toys workbench init actions --forgejo
100
98
  codex-toys workbench init actions --github
101
99
  ```
102
100
 
103
- The generated runner prepares auth, runs `workbench tick --mode actions`,
104
- cleans up runtime-only files, and preserves durable workbench state. Durable
105
- state may include:
101
+ For the full GitHub Actions schedule setup, see
102
+ [Repository autonomy](../guides/repository-autonomy).
103
+
104
+ The generated runner prepares auth, runs `workbench dispatch run-due --mode actions`,
105
+ cleans up runtime-only files, and preserves durable workbench state. By default
106
+ it runs inside `ghcr.io/peezy-tech/codex-toys-actions:latest`, which supplies
107
+ Node, VitePlus, native Codex CLI, codex-toys, Git, and common shell tools. Pass
108
+ `--image <ref>` to use a custom image built from that base image, or `--no-image`
109
+ to generate a workflow that installs the runtime during every run. Durable state
110
+ may include:
106
111
 
107
112
  ```text
108
113
  .codex/memories/
@@ -121,7 +126,7 @@ where that history belongs in git.
121
126
 
122
127
  - fetch and doctor summary
123
128
  - queue counts and compact intents
124
- - latest deferred output status
129
+ - latest dispatch output status
125
130
  - workflows
126
131
  - functions
127
132
  - recent cwd threads
@@ -165,7 +165,8 @@ method, not a direct app-server method.
165
165
 
166
166
  ## Workbench Tasks
167
167
 
168
- Workbench tasks can run named workflows on a schedule or from `workbench run`:
168
+ Workbench tasks can run named workflows from `workbench run`, dispatch targets,
169
+ or feed dispatch:
169
170
 
170
171
  ```toml
171
172
  [workbench]
@@ -176,9 +177,9 @@ id = "release-check"
176
177
  enabled = true
177
178
  kind = "workflow"
178
179
  workflow = "release-check"
179
- schedule = "0 14 * * *"
180
180
  ```
181
181
 
182
- Scheduled workflow tasks create deferred run intents, so scheduled work and
183
- one-shot deferred work share the same claiming, attempt, output, retry, and
184
- collection path.
182
+ Use systemd timers or Actions schedules to call explicit commands when a
183
+ workflow should run on a clock. Durable dispatch and feed dispatch can also
184
+ target the workflow-backed task so queued work shares the same attempt, output,
185
+ retry, and collection path.
@@ -37,6 +37,7 @@ Feed intake helpers:
37
37
 
38
38
  - `.codex/feed.toml` config
39
39
  - RSS/Atom polling and normalization
40
+ - manual/local feed item append
40
41
  - source checkpoints
41
42
  - durable feed item storage
42
43
  - collection cursors
@@ -45,6 +46,7 @@ Feed intake helpers:
45
46
 
46
47
  ```ts
47
48
  import {
49
+ appendFeedItem,
48
50
  createFeedContext,
49
51
  loadFeedConfig,
50
52
  pollFeedSources,
@@ -58,8 +60,8 @@ Workbench runtime and policy helpers:
58
60
 
59
61
  - workflow script execution and workflow host helpers
60
62
  - remote workflow toybox methods
61
- - workbench doctor, tick, task execution, and Actions scaffolding
62
- - deferred runs, prompt queue, and local handoff queue
63
+ - workbench doctor, task execution, dispatch drains, and Actions scaffolding
64
+ - dispatch runs, prompt queue, and local handoff queue
63
65
  - delegation methods and state
64
66
  - workbench functions
65
67
  - workbench and host overview
@@ -88,6 +90,16 @@ Actions-mode helpers:
88
90
  These helpers prepare repo-local auth for Actions mode and clean runtime-only
89
91
  files without deleting durable workbench state.
90
92
 
93
+ ## `ghcr.io/peezy-tech/codex-toys-actions`
94
+
95
+ Actions-mode runner image. Use
96
+ `ghcr.io/peezy-tech/codex-toys-actions:<version>` to pin the runtime to a
97
+ codex-toys release, or build a custom image from it when a workbench needs extra
98
+ system packages. The generated Actions-mode workflow uses
99
+ `ghcr.io/peezy-tech/codex-toys-actions:latest` by default. The OpenAI Codex
100
+ release feed publishes `codex-<codex-version>` tags that bake native Codex into
101
+ the image before the bindings workflow runs.
102
+
91
103
  ## `codex-toys/remote`
92
104
 
93
105
  SSH-backed transport and preflight helpers. This package creates toybox
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-toys",
3
- "version": "0.140.11",
3
+ "version": "0.140.13",
4
4
  "description": "Codex CLI and umbrella runtime export for bridge, toybox, feed, remote, workbench, actions, proxy, and kits.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
File without changes
File without changes