@gloaming/poke 0.1.0 → 0.2.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/daemon.js +94 -94
- package/package.json +1 -1
- package/poke-skill.md +8 -4
- package/poke.js +88 -88
- package/types/imap/main.js +1 -1
package/package.json
CHANGED
package/poke-skill.md
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: poke
|
|
3
|
-
description: "
|
|
3
|
+
description: "Wait for things outside the harness: poke resumes this Session (Wake), starts a new Session or thread (Spawn), or runs a command once a condition comes true. The condition can be anything you can describe or script: a webhook from any service, a change in what a command, URL, feed, calendar, folder, mailbox, chat, device or MCP server shows, a time, a schedule, or a pattern of Events. Use it to wait, poll, check back, follow up, remind, or continue once an outside X happens or at a later time, one-off or recurring. For an X due within hours, `--await` runs as a background command the harness tracks, so the thread can stay busy while it waits."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# poke
|
|
7
7
|
|
|
8
8
|
poke is a local daemon that watches **Sources** (webhooks, polled scripts, timers) and, when an **Event** matches a **Rule**, Wakes a Session with a message, Spawns a new Session, or Runs a command. Drive it with the `poke` CLI. `poke <command> --help` lists every flag; add `--json` for output you parse.
|
|
9
9
|
|
|
10
|
-
Reach for poke
|
|
10
|
+
Reach for poke when work should continue after something outside this Session happens, or at a later time. When the harness already tracks the work, such as a background command you started, a Monitor or a watched pull request, use the harness's own wait instead.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Pick how to wait by how soon X should come, and whether you can do anything until it does:
|
|
13
|
+
|
|
14
|
+
- A one-off X due within minutes or hours (CI passes, a deploy finishes, a review lands): `poke on <source> … --await [--timeout 2h]`, started as a background command. Its exit brings you back with what fired, so keep working meanwhile and take it as "by the way, X finished". If you can do nothing useful until X, also hold the turn with the harness's background wait (in T3 Code, `t3_background_wait` with its task id), so the thread stays busy while it waits. Give `--timeout` the longest wait you'd accept. Exit 1 with `did not fire within …` means it timed out and the Rule is retired. Any other exit 1 prints why, such as the Rule being removed.
|
|
15
|
+
- A one-off X with no known time, due in days, or that must outlast this harness process (a vendor reply, "remind me Friday"): `poke on <source> … --wake` (One-shot by default), then carry on or end your turn: the Rule carries the waiting. A background `--await` would die with the harness.
|
|
13
16
|
- Start a fresh Session or thread when X happens: `--spawn claude|t3 … --prompt '…'`, every time with `--standing`.
|
|
14
17
|
- At a time or on a schedule: a `--timer --in 2h` / `--timer --at <ISO>` or `--cron '<expr>'` Source with a Rule on it.
|
|
15
18
|
- Something no Source kind covers yet: write a Source type (below). Flexibility is the point; the kinds here are building blocks, not a closed list.
|
|
@@ -19,7 +22,8 @@ Reach for poke whenever work should continue later, then end your turn: the Rule
|
|
|
19
22
|
```sh
|
|
20
23
|
poke on <source> [--type <t>]… [--where 'field=value other!=x'] [--if '<plain-language condition>'] \
|
|
21
24
|
(--wake [--queue] [--debounce 30s] | --spawn claude --cwd <dir> --prompt '<instruction>' \
|
|
22
|
-
| --spawn t3 --project <path> [--worktree] --prompt '<instruction>' | --run '<command>'
|
|
25
|
+
| --spawn t3 --project <path> [--worktree] --prompt '<instruction>' | --run '<command>' \
|
|
26
|
+
| --await [--timeout 2h]) \
|
|
23
27
|
[--standing | --once] [--max-age 1h]
|
|
24
28
|
```
|
|
25
29
|
|