Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
aef9b7d
Merge pull request #143 from daintreehq/main
gregpriday Nov 17, 2026
18e7f99
feat(client): tell agents to attach screenshots to visual questions
gregpriday Nov 18, 2026
9050d8b
Merge pull request #144 from daintreehq/feature/encourage-ask-human-s…
gregpriday Nov 18, 2026
eff2ca7
feat(relay): let the owner desktop ask for a push when an agent stops
gregpriday Nov 19, 2026
e08e7c3
docs: describe the agent-stopped push and what the relay learns from it
gregpriday Nov 19, 2026
83da938
style: format migration tests
gregpriday Nov 19, 2026
dfedbf0
fix(relay): keep the agent-stopped declaration per endpoint and refus…
gregpriday Nov 19, 2026
6b1fffc
fix(relay): apply an agent-stopped declaration only to rows of the sa…
gregpriday Nov 19, 2026
bf9517c
Merge pull request #162 from daintreehq/feature/issue-145-let-the-own…
gregpriday Nov 19, 2026
b78a37b
fix(worker): replay an accepted question create after its deadline
gregpriday Nov 19, 2026
2ea888a
feat(app): show an agent-stopped push as fixed text that opens the qu…
gregpriday Nov 19, 2026
01de0dc
feat(client): let a host app ask for an agent-stopped push
gregpriday Nov 19, 2026
83a0d9f
fix(client): keep relay history when a lost create's retry replays it…
gregpriday Nov 19, 2026
e89be90
style(worker): format the deadline tests
gregpriday Nov 19, 2026
a2bbf3e
test(client): cover the agent-stopped push gates, older relays and no…
gregpriday Nov 19, 2026
c00acf5
fix(client): follow no redirect when sending a request once
gregpriday Nov 19, 2026
8738873
style: format the agent-stopped push files
gregpriday Nov 19, 2026
59ac65f
fix(worker): limit question push lifetime to the time left to answer
gregpriday Nov 19, 2026
1b1094c
docs(protocol): describe the push lifetime of deadline-bound questions
gregpriday Nov 19, 2026
42f1302
feat(app): declare the agent-stopped push only for a service worker t…
gregpriday Nov 19, 2026
2f2314a
style: format push lifetime changes
gregpriday Nov 19, 2026
9539615
docs: say that a notification can also say an agent stopped
gregpriday Nov 19, 2026
98f41a6
style: format
gregpriday Nov 19, 2026
13469c0
fix(client): state what a stop during an agent-stopped push still sends
gregpriday Nov 19, 2026
2dbd27f
fix(worker): report a reconciled question expired once its deadline p…
gregpriday Nov 19, 2026
d1e56aa
fix(app): read the relay rows just before declaring, and keep declari…
gregpriday Nov 19, 2026
093e85e
fix(worker): keep reply pushes through quiet hours and stop dropped r…
gregpriday Nov 19, 2026
9ba0022
test(app): pin that the worker is asked before the relay rows are read
gregpriday Nov 19, 2026
f0ba862
Merge pull request #164 from daintreehq/bugfix/issue-151-replay-an-ac…
gregpriday Nov 19, 2026
36b9424
Merge pull request #163 from daintreehq/feature/issue-147-let-a-host-…
gregpriday Nov 19, 2026
01ceeff
test(worker): hold the proxy notice before quiet hours end in the rep…
gregpriday Nov 19, 2026
b703720
test(app): type the push test tables so the app typecheck passes
gregpriday Nov 19, 2026
e26869b
Merge remote-tracking branch 'origin/develop' into feature/issue-146-…
gregpriday Nov 19, 2026
c520f57
Merge pull request #165 from daintreehq/bugfix/issue-158-limit-questi…
gregpriday Nov 19, 2026
60d1b23
Merge pull request #166 from daintreehq/feature/issue-146-show-an-age…
gregpriday Nov 19, 2026
ccda530
feat(app): queue a phone decline through the outbox
gregpriday Nov 19, 2026
589ccc1
feat(app): settle a queued decline from the verified thread
gregpriday Nov 19, 2026
546bf1a
feat(app): show a queued dismissal as local until it settles
gregpriday Nov 19, 2026
913352f
fix(app): admit one submission per question and settle declines from …
gregpriday Nov 19, 2026
bb3c645
fix(app): bound a decline's send and wait for the thread before namin…
gregpriday Nov 19, 2026
8fe5f85
fix(app): read a decline back off the send path until it settles
gregpriday Nov 19, 2026
96d6764
Merge pull request #167 from daintreehq/feature/issue-156-queue-a-pho…
gregpriday Nov 19, 2026
9a4d2b8
test(client): wait for the socket ticket in the phone-images declarat…
gregpriday Nov 19, 2026
cc642ce
feat(protocol): define the signed contract for advisory questions wit…
gregpriday Nov 19, 2026
3cc51bb
test(relay): prove advisory admission, rounds and old readers against…
gregpriday Nov 19, 2026
bcbbdea
style: format advisory contract files
gregpriday Nov 19, 2026
3067ce7
fix(protocol): match the relay's order in the round table and refuse …
gregpriday Nov 19, 2026
edc1950
fix(protocol): keep blocking content readable and claim no requiremen…
gregpriday Nov 19, 2026
8178f9f
fix(protocol): refuse malformed advisory content in every round
gregpriday Nov 19, 2026
f8979ad
feat: listen for answers over HTTP without a live socket
gregpriday Nov 19, 2026
db3aa48
fix(client): bound background work and settle a typed answer in one w…
gregpriday Nov 19, 2026
4d3286b
test(client): run the phone-images declaration test with and without …
gregpriday Nov 19, 2026
61bfc2d
Merge pull request #169 from daintreehq/feature/issue-150-define-the-…
gregpriday Nov 19, 2026
c1dda34
Merge pull request #170 from daintreehq/bugfix/issue-168-bridge-featu…
gregpriday Nov 19, 2026
db81d6d
Merge pull request #171 from daintreehq/feature/issue-161-offer-a-con…
gregpriday Nov 19, 2026
7dfc3df
fix(client): use the current signed round when the bridge processes a…
gregpriday Nov 19, 2026
88fee94
test(client): cover expiry rounds, superseded closure notices and rec…
gregpriday Nov 19, 2026
465fa79
style: format
gregpriday Nov 19, 2026
0b8c137
fix(client): close the gaps the review found in expiry rounds
gregpriday Nov 19, 2026
ea6e943
fix(client): narrow the round and replay guards to what they protect
gregpriday Nov 19, 2026
685ca28
test(client): send the relay's own expiry shape in the create replay …
gregpriday Nov 19, 2026
3bd650e
fix(client): judge an expiry by its round's signed claims while rows …
gregpriday Nov 19, 2026
a7fb75e
fix(client): take every reopen claim that names the round, by event o…
gregpriday Nov 19, 2026
7eaa5c1
fix(client): leave rows this run reopened to the reopen, not the back…
gregpriday Nov 19, 2026
2528496
fix(client): tag the reopen's turn so the type check narrows it
gregpriday Nov 19, 2026
58907ab
fix(client): record a reopen for the background pass only once its ro…
gregpriday Nov 19, 2026
0a7285e
test(client): send a real expiry in the HTTP listener delivery test
gregpriday Nov 19, 2026
a97c48b
Merge pull request #172 from daintreehq/bugfix/issue-152-use-the-curr…
gregpriday Nov 19, 2026
f4bdde2
feat(client): let ask_human ask for a relative deadline or for advice…
gregpriday Nov 19, 2026
b0ece69
test(client): prove ask_human's reply window, advice and retries; doc…
gregpriday Nov 19, 2026
4a7bca0
test(client): expire the outcome test's questions at their signed dea…
gregpriday Nov 19, 2026
fbe94ca
feat(app): show the advisory deadline and planned fallback in the pho…
gregpriday Nov 19, 2026
559bf09
fix(app): believe the relay's expiry of an unreadable advisory questi…
gregpriday Nov 19, 2026
5eafa55
fix(client): close the review's gaps in advice, retries and the receipt
gregpriday Nov 19, 2026
ff9ab29
fix(app): take no expiry as the outcome of a round this device can't …
gregpriday Nov 19, 2026
11d5257
fix(client): bind retries to the gate's policy version and keep an an…
gregpriday Nov 19, 2026
3ed0cae
fix(client): say when an older bridge could not confirm a deadline wi…
gregpriday Nov 19, 2026
109a78a
test(client): assert the tool result's first content item for the str…
gregpriday Nov 19, 2026
655368c
Merge pull request #173 from daintreehq/feature/issue-157-show-the-ad…
gregpriday Nov 19, 2026
f37435f
Merge pull request #174 from daintreehq/feature/issue-154-let-ask-hum…
gregpriday Nov 19, 2026
425016d
feat(client): settle questions that run out of time before they reach…
gregpriday Nov 19, 2026
6466bf6
feat(client): document the never-published outcome and fit the get_de…
gregpriday Nov 19, 2026
889503e
test(client): drive the cancel-during-upload race with a single image
gregpriday Nov 19, 2026
72b50a3
fix(client): recheck claims under the lock and close the person's ite…
gregpriday Nov 19, 2026
f66c218
style(client): format the publisher and deadline tests
gregpriday Nov 19, 2026
cb87537
fix(client): settle never-published only on the relay's word, and clo…
gregpriday Nov 19, 2026
4a34fcf
test(client): pin the withdrawal-wins case before the deadline and th…
gregpriday Nov 19, 2026
efa0185
fix(client): give every send its own claim, unclaim before withdrawin…
gregpriday Nov 19, 2026
34e0068
fix(client): resolve a possibly-committed create only by the relay, a…
gregpriday Nov 19, 2026
1092c0c
fix(client): read the advisory policy again once the content is open
gregpriday Nov 19, 2026
c2bb0ed
Merge pull request #175 from daintreehq/feature/issue-153-reconcile-q…
gregpriday Nov 19, 2026
6525766
feat(client): type an advisory question's unanswered deadline as its …
gregpriday Nov 19, 2026
3e211dd
test(client): prove the advisory notice's routing, races and recovery…
gregpriday Nov 19, 2026
a16d2b3
test(client): wait for the replayed frames instead of fixed ticks; fo…
gregpriday Nov 19, 2026
6985064
fix(client): hold the advisory notice until the ledger is read, and k…
gregpriday Nov 19, 2026
adf89f7
fix(client): bound the advisory notice's wait for the ledger and keep…
gregpriday Nov 19, 2026
96dc45b
fix(client): wait per question for the ledger, never past an unapplie…
gregpriday Nov 19, 2026
1b21642
fix(client): bound the passes a ledger wait adds, and never leave a w…
gregpriday Nov 19, 2026
111067d
Merge pull request #176 from daintreehq/feature/issue-155-deliver-adv…
gregpriday Nov 19, 2026
32c188a
test(client): wait for the socket's state in the replay expiry tests,…
gregpriday Nov 19, 2026
ef20a42
test(client): read the replay tests' own socket and count notices as …
gregpriday Nov 19, 2026
2347e06
test(client): leave the replay tests room for every wait, and say wha…
gregpriday Nov 19, 2026
1519ba9
Merge pull request #178 from daintreehq/bugfix/issue-177-socket-repla…
gregpriday Nov 19, 2026
119a296
feat(cli): wait for a question's outcome from durable state, and reco…
gregpriday Nov 19, 2026
46ec314
test(cli): cover ask --wait, wait and get, and document the standalon…
gregpriday Nov 19, 2026
17ca99b
fix(cli): check the question exists before a wait takes over receiving
gregpriday Nov 19, 2026
0948d80
fix(cli): report a wait's outcome only once its own sink has settled,…
gregpriday Nov 19, 2026
71052da
fix(cli): keep a wait's result to the round it saw, and hand publishi…
gregpriday Nov 19, 2026
7281f49
fix(cli): never ask after a signal, trust only a written advisory not…
gregpriday Nov 19, 2026
fa103a5
fix(cli): let a plain ask's own pump finish writing before it exits
gregpriday Nov 19, 2026
0a91821
test(cli): keep the result record's fields typed in the wait tests
gregpriday Nov 19, 2026
79c354f
Merge pull request #179 from daintreehq/feature/issue-159-make-standa…
gregpriday Nov 19, 2026
9e5f17f
fix(client): withhold a never-published advisory plan the host no lon…
gregpriday Nov 19, 2026
e93dd35
fix(client): keep a never-published plan that may be on screen after …
gregpriday Nov 19, 2026
fd9f2e7
test(client): pin each signal a never-published plan follows, and rea…
gregpriday Nov 19, 2026
2c4fcd8
Merge pull request #196 from daintreehq/bugfix/issue-180-a-never-publ…
gregpriday Nov 19, 2026
3f49807
fix(client): deliver again after a stopped bridge is started
gregpriday Nov 19, 2026
62a21fe
fix(client): recover beside the readers when a restart is behind a write
gregpriday Nov 19, 2026
aff910c
fix(client): close delivery during background recovery and retry a fa…
gregpriday Nov 19, 2026
cacb95b
fix(cli): declare the device's features before a plain ask publishes
gregpriday Nov 19, 2026
564136f
fix(app): read the device list again when a question arrives from a d…
gregpriday Nov 19, 2026
830d5be
fix(cli,app): declare only what the relay lacks, and keep the newest …
gregpriday Nov 19, 2026
826dd17
fix(cli): declare what a receiver would when the device list cannot b…
gregpriday Nov 19, 2026
6488282
fix(client): never give up on an event a transient failure holds
gregpriday Nov 19, 2026
61b463a
style(client): format the inbox outage tests
gregpriday Nov 19, 2026
80138d0
fix(client): wait out unreadable grants and key stores, bound a missi…
gregpriday Nov 19, 2026
a84f3ad
fix(client): stop on a revocation read, wait out a locked Host key store
gregpriday Nov 19, 2026
61e177e
docs(readme): show the 15-minute advisory question and recovery by ID
gregpriday Nov 19, 2026
855422a
Merge pull request #198 from daintreehq/bugfix/issue-188-restarting-a…
gregpriday Nov 19, 2026
f827483
Merge pull request #199 from daintreehq/bugfix/issue-185-a-plain-deci…
gregpriday Nov 19, 2026
7f80d13
fix(cli): keep doctor off a receiving process's socket, and end a rec…
gregpriday Nov 19, 2026
7a9238f
style(cli): format the receiver tests
gregpriday Nov 19, 2026
720dec3
fix(cli): bound doctor's hold on the receiver lock, and tighten the r…
gregpriday Nov 19, 2026
40f4493
docs(readme): state the outcomes and the notice sink exactly
gregpriday Nov 19, 2026
450a8c7
Merge pull request #197 from daintreehq/bugfix/issue-181-decisions-do…
gregpriday Nov 19, 2026
7ea65f0
fix(cli): say what the listener delivered instead of calling every de…
gregpriday Nov 19, 2026
ff25d40
style(client): format bridge
gregpriday Nov 19, 2026
2dcabff
fix(cli): label never-published notices neutrally and test the listen…
gregpriday Nov 19, 2026
5b026f0
Merge pull request #200 from daintreehq/bugfix/issue-182-an-answer-ca…
gregpriday Nov 19, 2026
9fbfe49
test(cli): reproduce a 0.8.0 relay's refused late retry reported as f…
gregpriday Nov 19, 2026
efb4381
fix(client): ask the relay whether it holds a question before taking …
gregpriday Nov 19, 2026
5c39d09
test(client): cover a refused late retry the relay holds, cannot be a…
gregpriday Nov 19, 2026
d856be2
fix(client): keep a refused create queued until the relay says whethe…
gregpriday Nov 19, 2026
71f7343
fix(client): refuse only on a signed record, drop a create whose hist…
gregpriday Nov 19, 2026
24c45b6
Merge pull request #201 from daintreehq/bugfix/issue-184-wait-reports…
gregpriday Nov 19, 2026
9d98f76
Merge pull request #203 from daintreehq/bugfix/issue-187-the-listener…
gregpriday Nov 19, 2026
d76153f
Merge pull request #202 from daintreehq/feature/issue-191-show-the-15…
gregpriday Nov 19, 2026
bdc7cf6
docs(threat-model): describe the agent-stopped push
gregpriday Nov 19, 2026
9c5bb74
test(e2e): run advisory questions end to end on a controllable clock
gregpriday Nov 19, 2026
d2e8c90
style(e2e): format the advisory suite and clock
gregpriday Nov 19, 2026
fa5e0c1
test(e2e): harden the clocked relay and pin each advisory outcome to …
gregpriday Nov 19, 2026
858ec59
test(e2e): sample an expired approval before it is typed, and widen t…
gregpriday Nov 19, 2026
046d904
Merge pull request #204 from daintreehq/feature/issue-190-describe-th…
gregpriday Nov 19, 2026
a56f773
fix(client): keep a refused advisory write with its notice so other p…
gregpriday Nov 19, 2026
41e77e9
docs(operations): say when another process reports a due advisory plan
gregpriday Nov 19, 2026
63982e9
style: format the advisory notice tests
gregpriday Nov 19, 2026
d25cb2c
fix(client): keep a refused advisory notice waiting for its own unapp…
gregpriday Nov 19, 2026
782508d
fix(client): read a refused notice's hold from the store after the row
gregpriday Nov 19, 2026
5f29a67
fix(client): bound a refused notice's hold on a full look at unapplie…
gregpriday Nov 19, 2026
8ccb521
test(client): cover a store that cannot read its processed history
gregpriday Nov 19, 2026
ad22613
fix(client): report a store that cannot repair reopened rounds at start
gregpriday Nov 19, 2026
6277185
fix(client): never hold a start behind an inbox pass, and report a st…
gregpriday Nov 19, 2026
8b3c43d
fix(client): hold the history check before the store is first called
gregpriday Nov 19, 2026
2dc0676
test(release): check released packages against the new ones and back
gregpriday Nov 19, 2026
58bb02f
test(release): read pretty-printed CLI output and the audit's event n…
gregpriday Nov 19, 2026
3afe1f4
test(release): drop an unused scenario argument
gregpriday Nov 19, 2026
08afd5b
test(release): tighten the compatibility check after review
gregpriday Nov 19, 2026
e9e9c56
test(release): report a bad compat-check argument as a usage error
gregpriday Nov 19, 2026
0a2d34a
test(release): finish compat-check processes that never started, and …
gregpriday Nov 19, 2026
4300036
test(release): start nothing once compat-check is stopping, and check…
gregpriday Nov 19, 2026
0d57eac
Merge pull request #205 from daintreehq/feature/issue-192-run-an-advi…
gregpriday Nov 19, 2026
5f7141e
Merge pull request #207 from daintreehq/feature/issue-194-check-relea…
gregpriday Nov 19, 2026
b77e1b0
Merge pull request #208 from daintreehq/bugfix/issue-189-reopen-repai…
gregpriday Nov 19, 2026
ad71d2a
Merge pull request #206 from daintreehq/bugfix/issue-183-wait-and-get…
gregpriday Nov 19, 2026
b85cacc
fix(client): hold an answer entry this client cannot type, and refuse…
gregpriday Nov 19, 2026
970b5dc
fix(client): let the first start choose, and flag a hold on a fresh read
gregpriday Nov 19, 2026
66eaedd
Merge pull request #209 from daintreehq/bugfix/issue-186-an-older-cli…
gregpriday Nov 19, 2026
cb7cfa7
test(e2e): cover advisory faults and restarts through the standalone …
gregpriday Nov 19, 2026
aaa3940
test(e2e): tighten the advisory fault suite after review
gregpriday Nov 19, 2026
78ee7ae
test(e2e): count the relay's history after the whole catch-up, and fi…
gregpriday Nov 19, 2026
5c98a1e
Merge pull request #210 from daintreehq/feature/issue-193-cover-advis…
gregpriday Nov 19, 2026
d64c27a
test(release): check a cached 0.8.0 phone app against a 0.9.0 relay
gregpriday Nov 19, 2026
d833a0c
test(release): reread the cached app's push rows after its settings s…
gregpriday Nov 19, 2026
b1a79fc
test(release): read the declared row back through the updated app, an…
gregpriday Nov 19, 2026
ad1ccfc
test(release): require the active worker's own answer before a declar…
gregpriday Nov 19, 2026
2930416
test(release): count removed subscriptions, and report a worker's rep…
gregpriday Nov 19, 2026
5f2bed3
test(release): accept a declaration whose response the reload cut off…
gregpriday Nov 19, 2026
8fb7135
test(release): read the phone's row back at the end, and wait on the …
gregpriday Nov 19, 2026
ebb0254
test(release): check the cached page's tickets once it has closed, an…
gregpriday Nov 19, 2026
445a5bc
test(release): keep the cached page's ticket check where the reviewed…
gregpriday Nov 19, 2026
9de528d
Merge pull request #211 from daintreehq/feature/issue-195-check-a-cac…
gregpriday Nov 19, 2026
8bafcdb
chore: release v0.9.0
gregpriday Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Everything runs in **your own Cloudflare account**. There is no Daintree-operate
- Answers are typed into the exact pane they were asked from, or not at all. If that pane or session cannot be found, the answer waits and tells you.
- Answers are typed as inert, delimited data. Control characters and escape sequences are stripped, and nothing in an answer can close the block or pose as a field.
- An expired question never authorizes anything.
- Push notifications say only "a question needs your input". Never the question.
- Push notifications say only "a question needs your input", or "an agent stopped" when Daintree is set to send it. Never the question.

<img src="docs/readme/pairing.png" alt="Two phones: the six-digit pairing code to check against the same code on the computer, and a paired computer's details under Settings, Devices, with its key fingerprint in four-character groups and Copy fingerprint." width="100%">

Expand All @@ -82,7 +82,7 @@ The app is an installable PWA served by your own Worker: no app store, push noti
└── answer typed into the right terminal, when it is idle ◀── hibernatable WebSocket ───┘
```

- **The Decisions MCP** is a plain HTTP MCP server that you can add to any agent. Inside Daintree it is wired in for you; anywhere else run `decisions mcp` and it prints the exact `claude mcp add --transport http …` line. It serves `/mcp` by default; `--path /mcp/decisions` (or `path` in `createDecisionsMcpHandler`) mounts it somewhere else, matched exactly. Its tools carry MCP annotations, so agents that gate tool calls (Codex, for one) let `ask_human` through without asking first.
- **The Decisions MCP** is a plain HTTP MCP server that you can add to any agent. Inside Daintree it is wired in for you; anywhere else run `decisions mcp` and it prints the exact `claude mcp add --transport http …` line. It serves `/mcp` by default; `--path /mcp/decisions` (or `path` in `createDecisionsMcpHandler`) mounts it somewhere else, matched exactly. Its tools carry MCP annotations, so agents that gate tool calls (Codex, for one) let `ask_human` through without asking first. Where a WebSocket cannot stay open, `decisions mcp --no-socket` (or `decisions listen --no-socket`) polls the relay over HTTP instead ([operations](docs/operations.md#listening-without-a-live-socket)).
- **The relay** is a Cloudflare Worker, one SQLite Durable Object, and a private R2 bucket. The desktop and phone stay connected through Cloudflare's WebSocket Hibernation API, so an idle connection costs almost nothing. It only ever stores ciphertext.
- **The crypto** is WebCrypto everywhere: P-256 ECDSA and ECDH, HKDF, AES-256-GCM, with content keys in epochs that rotate when a device is revoked.
- **The protocol** is versioned and written down in [docs/protocol.md](docs/protocol.md). Any server that implements it is a valid relay.
Expand Down Expand Up @@ -112,14 +112,41 @@ You need a Cloudflare account (the free plan is enough for one person), Node 22+
5. **Test it.**

```bash
pnpm decisions ask "Does this work?" --option yes=Yes --option no=No
pnpm decisions ask "Does this work?" --option yes=Yes --option no=No --wait
```

Answer on your phone.
Answer on your phone. `--wait` stays until the outcome and exits with it (0 answered); `--expires-in 15m` sets a reply window, `--planned-fallback` asks for advice instead of a decision, and `decisions wait <question_id>` picks the wait up again later. [docs/operations.md](docs/operations.md#asking-from-a-script-or-an-agent-without-daintree) has the outcomes, exit codes and JSON records.

> [!IMPORTANT]
> Back up your keys: `pnpm decisions recovery export --out decisions-recovery.json`. **If you lose every device that holds your keys, the encrypted data on Cloudflare cannot be recovered.** See [docs/key-recovery.md](docs/key-recovery.md).

## A 15-minute question with a planned fallback

Some questions are worth asking but not worth blocking on. Give one a deadline and say what you will do if nobody answers:

```bash
pnpm decisions --json ask "Which fixture should I use?" \
--option mem="In memory" --option disk="On disk" \
--expires-in 15m \
--planned-fallback "I will use the in-memory fixture." \
--wait
```

An agent does the same through `ask_human` with `expires_in: "15m"` and `planned_fallback`, and gets the question ID back at once. If the relay cannot be read at that moment, the call is refused with `invalid_state: support-unknown`; ask again once it can be reached.

- **Answered in time:** the answer is the person's decision (`status: human-answered` with `provenance: human`), and its notice is written to the sink of the process that receives for this computer (in Daintree, typed into the asking terminal).
- **No answer in 15 minutes:** once this computer has read the relay's expiry, the question ends as `advisory-expired` (exit 13, `fallback_due: true`). The stated plan is the agent's to carry out at its own discretion. Nothing was decided or approved. If the deadline passed before the question reached the relay, the outcome is `never-published` (exit 14) and `fallback_due` says whether the plan may go ahead; a host that does not allow the plan to go ahead reports `expired` (exit 12) instead.
- **A question that is not advisory, or an approval:** an approval cannot carry a planned fallback, and a question without one waits for a decision. When it expires the outcome is `expired` (exit 12) and nothing may go ahead. An expired question never turns into consent.

To get an outcome back later by question ID, for example after a restart or a lost terminal:

```bash
pnpm decisions wait <question_id> # waits again, with the same outcomes and exit codes
pnpm decisions get <question_id> # says where the question stands now, without waiting
```

An agent connected through `decisions mcp` calls `get_decision` with the ID, or runs `decisions wait <question_id> --pane mcp` from its shell (`decisions wait` and `decisions get` take `--pane mcp` for a question asked through the MCP). The full walkthrough, with the outcomes, exit codes and JSON records, is in [docs/operations.md](docs/operations.md#asking-from-a-script-or-an-agent-without-daintree).

## Repository layout

| Path | What it is |
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@daintreehq/decisions-app",
"version": "0.8.0",
"version": "0.9.0",
"private": true,
"description": "Daintree Decisions phone app: installable PWA served by the user's own relay.",
"license": "Apache-2.0",
Expand Down
Loading
Loading