@raidiant/notifai 11.6.3-beta.2 → 11.7.0-beta.2
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/CHANGELOG.md +15 -3
- package/dist/atomic-file.d.ts +1 -1
- package/dist/atomic-file.js.map +1 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/codex-answer-control.d.ts +14 -0
- package/dist/codex-answer-control.js +41 -0
- package/dist/codex-answer-control.js.map +1 -0
- package/dist/codex-answer-presentation.d.ts +18 -0
- package/dist/codex-answer-presentation.js +113 -0
- package/dist/codex-answer-presentation.js.map +1 -0
- package/dist/codex-input-lifecycle.d.ts +10 -0
- package/dist/codex-input-lifecycle.js +63 -0
- package/dist/codex-input-lifecycle.js.map +1 -0
- package/dist/codex-native-control.d.ts +13 -0
- package/dist/codex-native-control.js +120 -0
- package/dist/codex-native-control.js.map +1 -0
- package/dist/codex-native-turn.d.ts +18 -0
- package/dist/codex-native-turn.js +46 -4
- package/dist/codex-native-turn.js.map +1 -1
- package/dist/codex-question-bindings.d.ts +76 -0
- package/dist/codex-question-bindings.js +151 -0
- package/dist/codex-question-bindings.js.map +1 -0
- package/dist/codex-queue-control.d.ts +21 -0
- package/dist/codex-queue-control.js +59 -0
- package/dist/codex-queue-control.js.map +1 -0
- package/dist/codex-tool-messages.js +40 -16
- package/dist/codex-tool-messages.js.map +1 -1
- package/dist/commands-acknowledge.d.ts +2 -4
- package/dist/commands-acknowledge.js +7 -0
- package/dist/commands-acknowledge.js.map +1 -1
- package/dist/commands-ask.js +64 -12
- package/dist/commands-ask.js.map +1 -1
- package/dist/commands-auth.d.ts +3 -1
- package/dist/commands-auth.js +88 -28
- package/dist/commands-auth.js.map +1 -1
- package/dist/commands-close.js +51 -3
- package/dist/commands-close.js.map +1 -1
- package/dist/commands-core.d.ts +7 -0
- package/dist/commands-core.js +1 -0
- package/dist/commands-core.js.map +1 -1
- package/dist/commands-hook-attend.js +50 -10
- package/dist/commands-hook-attend.js.map +1 -1
- package/dist/commands-hook-run.js +2 -1
- package/dist/commands-hook-run.js.map +1 -1
- package/dist/commands-init.d.ts +2 -0
- package/dist/commands-init.js +3 -3
- package/dist/commands-init.js.map +1 -1
- package/dist/commands-io.js +7 -0
- package/dist/commands-io.js.map +1 -1
- package/dist/commands-native-acknowledge.d.ts +8 -0
- package/dist/commands-native-acknowledge.js +114 -0
- package/dist/commands-native-acknowledge.js.map +1 -0
- package/dist/credentials.d.ts +5 -0
- package/dist/credentials.js.map +1 -1
- package/dist/hermes-attendant.js +4 -0
- package/dist/hermes-attendant.js.map +1 -1
- package/dist/hook-acknowledgements.d.ts +1 -0
- package/dist/hook-acknowledgements.js +3 -1
- package/dist/hook-acknowledgements.js.map +1 -1
- package/dist/hook-lifecycle.d.ts +12 -1
- package/dist/hook-lifecycle.js +145 -79
- package/dist/hook-lifecycle.js.map +1 -1
- package/dist/hook-question-retirement.js +2 -1
- package/dist/hook-question-retirement.js.map +1 -1
- package/dist/hook-question-state.d.ts +6 -2
- package/dist/hook-question-state.js +19 -7
- package/dist/hook-question-state.js.map +1 -1
- package/dist/hook-session-state.d.ts +5 -1
- package/dist/hook-session-state.js +48 -14
- package/dist/hook-session-state.js.map +1 -1
- package/dist/hook-types.d.ts +23 -1
- package/dist/hook-types.js.map +1 -1
- package/dist/native-answer-operation.d.ts +70 -0
- package/dist/native-answer-operation.js +247 -0
- package/dist/native-answer-operation.js.map +1 -0
- package/dist/pairing-qr.d.ts +5 -0
- package/dist/pairing-qr.js +24 -0
- package/dist/pairing-qr.js.map +1 -0
- package/dist/pending-pairing.d.ts +1 -0
- package/dist/pending-pairing.js +7 -5
- package/dist/pending-pairing.js.map +1 -1
- package/dist/program.js +9 -3
- package/dist/program.js.map +1 -1
- package/dist/session-attendant-probe.d.ts +1 -1
- package/dist/session-attendant-probe.js +2 -1
- package/dist/session-attendant-probe.js.map +1 -1
- package/dist/session-attendant-state.d.ts +5 -0
- package/dist/session-attendant-state.js +29 -10
- package/dist/session-attendant-state.js.map +1 -1
- package/dist/session-delivery.d.ts +29 -0
- package/dist/session-delivery.js +3 -1
- package/dist/session-delivery.js.map +1 -1
- package/dist/session-input-wakes.d.ts +78 -0
- package/dist/session-input-wakes.js +239 -0
- package/dist/session-input-wakes.js.map +1 -0
- package/dist/session-inputs.d.ts +41 -6
- package/dist/session-inputs.js +199 -19
- package/dist/session-inputs.js.map +1 -1
- package/dist/skill-source/manifest.json +8 -4
- package/dist/skill-source/notifai/SKILL.md +30 -28
- package/dist/skill-source/notifai/references/harness-setup.md +33 -20
- package/dist/skill-source/notifai/references/native-questions.md +51 -0
- package/package.json +10 -3
|
@@ -14,23 +14,31 @@ diagnosing, or recovering — not before.
|
|
|
14
14
|
|
|
15
15
|
## Signing this machine in
|
|
16
16
|
|
|
17
|
-
Run `notifai init --json` yourself.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`approve_url
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
Run `notifai init --json` yourself. An unapproved Machine starts one approval,
|
|
18
|
+
defaults to QR without asking for email, polls once, and returns. Progress is
|
|
19
|
+
on stderr and final readiness on stdout. The `credential` state's
|
|
20
|
+
`technical.pairing` holds protected local `qr_path` and `qr_text_path` artifacts,
|
|
21
|
+
the `approve_url`, and matching `code`. Present the QR before requesting a scan:
|
|
22
|
+
show the local image where supported, or read `qr_text_path` and reproduce the
|
|
23
|
+
library-generated QR verbatim in a fenced text block in a terminal/text-only harness.
|
|
24
|
+
Display the matching code beside it. Never include the QR
|
|
25
|
+
or proof-bearing link in any Notification Request field or media. Use T2 from
|
|
26
|
+
<https://app.notifai.sh/setup.md>: the User reviews their Account, computer, and
|
|
27
|
+
matching code in their signed-in Companion App before approving. A valid Auth
|
|
28
|
+
Session needs no additional email code merely to approve a Machine. Only the User can approve; opening review never approves automatically.
|
|
29
|
+
If the harness cannot display the local QR, present the browser alternative
|
|
30
|
+
truthfully rather than claiming a QR was shown.
|
|
31
|
+
|
|
32
|
+
Only when the User chooses an approval notification, ask for their Account
|
|
33
|
+
email; never infer it from other services or files. Run `notifai init --approval notification --approval-email <email>
|
|
34
|
+
--json`. Requested delivery is not confirmed delivery. For the browser
|
|
35
|
+
alternative use `--approval browser`; it opens no browser by default. Every
|
|
36
|
+
route resumes the same pending approval. When the User says it is approved,
|
|
37
|
+
run setup again. If it reports a new code, relay that code. A timeout or closed
|
|
38
|
+
shell does not strand an approval already given.
|
|
39
|
+
|
|
40
|
+
`--name <name>` sets the Machine name; the hostname is the default.
|
|
41
|
+
`notifai logout` discards the saved credential and any pending approval and QR.
|
|
34
42
|
|
|
35
43
|
`notifai auth status --json` says whether this machine is paired.
|
|
36
44
|
`notifai auth access --json` says whether the account has access, including
|
|
@@ -263,13 +271,18 @@ meter differs per harness:
|
|
|
263
271
|
Direct inbox wake is unavailable, but it is not needed while this exact Stop
|
|
264
272
|
continuation owns the answer.
|
|
265
273
|
- **Codex:** a detached observer starts after submission and waits in the
|
|
266
|
-
background for the complete answer window; Stop provides recovery.
|
|
267
|
-
|
|
268
|
-
|
|
274
|
+
background for the complete answer window; Stop provides recovery. While a
|
|
275
|
+
trusted tool hook can hand input into a working turn, Notifai uses that hook.
|
|
276
|
+
Idle sessions, or sessions whose live input path cannot be established, use
|
|
277
|
+
a content-free wake for the exact Agent Session in the same Codex home.
|
|
278
|
+
Notifai does not cold-start or resume Codex to obtain a control connection.
|
|
279
|
+
Pending notes and answers remain in Notifai until
|
|
269
280
|
a trusted tool hook, prompt hook, or `notifai receive` drains a bounded batch.
|
|
270
281
|
A late wake-up cannot repeat an acknowledged answer: it contains no answer
|
|
271
282
|
text. Queue success proves wake storage, not input presentation. Inputs are
|
|
272
283
|
claimed immediately before presentation; uncertain writes are never replayed.
|
|
284
|
+
Verified queue control can remove a stale wake owned by Notifai; unavailable
|
|
285
|
+
control leaves the harmless wake in place and preserves human prompts.
|
|
273
286
|
Keep the original question and request identities when investigating a delay.
|
|
274
287
|
- **Grok:** the Stop hook stays held through the complete answer window and
|
|
275
288
|
returns the answer as a decision block to the same Agent Session. Its native
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Native questions linked to Notifai
|
|
2
|
+
|
|
3
|
+
Use this flow only when `ask` returns `native_question`. Native forms are
|
|
4
|
+
optional; Question Routing still works without them. New linking requires both
|
|
5
|
+
local eligibility and confirmed service support. Capability absence leaves
|
|
6
|
+
the ordinary conversation and app-answer flow available.
|
|
7
|
+
|
|
8
|
+
## Before emitting the form
|
|
9
|
+
|
|
10
|
+
Use the returned tool, titles and options exactly, in the registration turn.
|
|
11
|
+
The short title marker identifies a registered question; wording alone does
|
|
12
|
+
not. Keep the returned question and choice IDs for reporting its answer.
|
|
13
|
+
An unsupported form or missing binding stays ordinary. Preserve unrelated
|
|
14
|
+
native forms, even when they contain identical wording.
|
|
15
|
+
|
|
16
|
+
## When the native answer arrives
|
|
17
|
+
|
|
18
|
+
Read the actual native answer. As the first command before work depending on
|
|
19
|
+
that answer, run the `notifai acknowledge q_…` command printed by `ask`, filling
|
|
20
|
+
in the actual answer IDs or typed text and an authored acknowledgement naming
|
|
21
|
+
the concrete work it causes. Report partial answers as partial: only include
|
|
22
|
+
questions the User answered. An app answer relayed through a native envelope
|
|
23
|
+
keeps its printed app acknowledgement command; do not report it as a new
|
|
24
|
+
native submission.
|
|
25
|
+
|
|
26
|
+
`--native-answers` accepts an array: a choice answer looks like
|
|
27
|
+
`[{"question_id":"q1","choice_ids":["staging"]}]`; a typed answer looks like
|
|
28
|
+
`[{"question_id":"q1","text":"Wait until tomorrow"}]`. Substitute the actual
|
|
29
|
+
returned question/choice IDs and the User's actual words.
|
|
30
|
+
|
|
31
|
+
Choose a distinct operation ID for each distinct native submission. Retrying
|
|
32
|
+
the same submission uses the same operation ID, answers and acknowledgement.
|
|
33
|
+
An identity-only retry is valid only after the command confirms it saved the
|
|
34
|
+
operation. Follow its recovery output when submission or acknowledgement is
|
|
35
|
+
unconfirmed; keep the original question instead of registering another one.
|
|
36
|
+
|
|
37
|
+
Success confirms that the native answer and authored acknowledgement were
|
|
38
|
+
recorded. Review `other_submissions` before acting. Preserve distinct app and
|
|
39
|
+
native answers; a conflict needs clarification before further dependent work.
|
|
40
|
+
An already acknowledged operation must not repeat work it previously caused.
|
|
41
|
+
|
|
42
|
+
Keep the original app answer watcher after native acknowledgement: a reply may
|
|
43
|
+
already be in flight, and the User can still answer within its original window.
|
|
44
|
+
Use `close` for explicit withdrawal, not as native-answer acknowledgement.
|
|
45
|
+
If you never emitted the exact returned form, an ordinary conversation answer
|
|
46
|
+
still uses the unlinked question's `close` flow.
|
|
47
|
+
|
|
48
|
+
Reporting an answer does not prove a native form closed. Native settlement
|
|
49
|
+
depends on the harness capabilities and exact binding; missing or uncertain
|
|
50
|
+
control must leave unrelated forms untouched. Describe only the result the
|
|
51
|
+
command actually confirms.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raidiant/notifai",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.7.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Send native device notifications from agents and local programs",
|
|
6
6
|
"bin": {
|
|
@@ -12,13 +12,20 @@
|
|
|
12
12
|
],
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@clack/prompts": "^1.7.0",
|
|
15
|
-
"@raidiant/notifai-protocol": "8.
|
|
15
|
+
"@raidiant/notifai-protocol": "8.2.0-beta.2",
|
|
16
16
|
"commander": "^14.0.0",
|
|
17
17
|
"jsonc-parser": "^3.3.1",
|
|
18
18
|
"picocolors": "^1.1.1",
|
|
19
|
-
"
|
|
19
|
+
"qrcode": "1.5.4",
|
|
20
|
+
"smol-toml": "^1.4.0",
|
|
21
|
+
"ws": "8.21.0"
|
|
20
22
|
},
|
|
21
23
|
"devDependencies": {
|
|
24
|
+
"@types/pngjs": "6.0.5",
|
|
25
|
+
"@types/qrcode": "1.5.6",
|
|
26
|
+
"@types/ws": "8.18.1",
|
|
27
|
+
"jsqr": "1.4.0",
|
|
28
|
+
"pngjs": "7.0.0",
|
|
22
29
|
"typescript": "^5.8.0",
|
|
23
30
|
"vitest": "4.1.11"
|
|
24
31
|
},
|