@raidiant/notifai 0.5.1 → 1.0.1

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 (57) hide show
  1. package/CHANGELOG.md +173 -0
  2. package/README.md +11 -4
  3. package/dist/commands.d.ts +16 -1
  4. package/dist/commands.js +385 -158
  5. package/dist/commands.js.map +1 -1
  6. package/dist/config-schema.d.ts +1 -1
  7. package/dist/config-schema.js +2 -14
  8. package/dist/config-schema.js.map +1 -1
  9. package/dist/config.d.ts +19 -8
  10. package/dist/config.js +50 -7
  11. package/dist/config.js.map +1 -1
  12. package/dist/harnesses.d.ts +1 -0
  13. package/dist/harnesses.js +6 -0
  14. package/dist/harnesses.js.map +1 -1
  15. package/dist/hook-adapter.d.ts +10 -1
  16. package/dist/hook-adapter.js +79 -10
  17. package/dist/hook-adapter.js.map +1 -1
  18. package/dist/install-hooks.d.ts +60 -20
  19. package/dist/install-hooks.js +246 -100
  20. package/dist/install-hooks.js.map +1 -1
  21. package/dist/interactive.d.ts +32 -1
  22. package/dist/interactive.js +163 -47
  23. package/dist/interactive.js.map +1 -1
  24. package/dist/main.js +8 -8
  25. package/dist/main.js.map +1 -1
  26. package/dist/native-skills.d.ts +1 -1
  27. package/dist/native-skills.js +23 -58
  28. package/dist/native-skills.js.map +1 -1
  29. package/dist/pack-feedback-slice.d.ts +35 -0
  30. package/dist/pack-feedback-slice.js +126 -0
  31. package/dist/pack-feedback-slice.js.map +1 -0
  32. package/dist/readiness.d.ts +20 -0
  33. package/dist/readiness.js +24 -0
  34. package/dist/readiness.js.map +1 -1
  35. package/package.json +3 -2
  36. package/src/commands.test.ts +411 -42
  37. package/src/commands.ts +468 -178
  38. package/src/config-schema.ts +2 -17
  39. package/src/config.test.ts +29 -4
  40. package/src/config.ts +67 -11
  41. package/src/harnesses.ts +7 -0
  42. package/src/hook-adapter.test.ts +43 -1
  43. package/src/hook-adapter.ts +83 -11
  44. package/src/hooks.test.ts +4 -5
  45. package/src/install-hooks.test.ts +180 -8
  46. package/src/install-hooks.ts +227 -47
  47. package/src/interactive.test.ts +338 -0
  48. package/src/interactive.ts +221 -49
  49. package/src/main.ts +8 -8
  50. package/src/native-skills.test.ts +75 -0
  51. package/src/native-skills.ts +31 -75
  52. package/src/pack-feedback-slice.test.ts +212 -0
  53. package/src/pack-feedback-slice.ts +187 -0
  54. package/src/readiness.test.ts +25 -0
  55. package/src/readiness.ts +38 -0
  56. package/src/skill.test.ts +43 -0
  57. package/src/ui/config-view.test.ts +5 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,173 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
9
+ and [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
10
+
11
+ ## [Unreleased]
12
+
13
+ ## [1.0.1] - 2026-08-13
14
+
15
+ ### Fixed
16
+
17
+ - Codex hook installation writes inline `[hooks]` in `config.toml`. It does not create the legacy `hooks.json`.
18
+ - Hook installation is one scope: project or machine-global, not both. A project install is a no-op when global already covers the machine.
19
+
20
+ ## [1.0.0] - 2026-08-13
21
+
22
+ ### Removed
23
+
24
+ - **BREAKING** Service origin is no longer a user setting. The compiled default and the origin stored on the credential stay; override only with `--base-url` or `NOTIFAI_BASE_URL`.
25
+ - **BREAKING** Personal project preferences leave the project tree and live under the user config directory, keyed by project root.
26
+
27
+ ### Added
28
+
29
+ - A bounded, consented slice of the local log can be packed for feedback.
30
+ - Test notifications are sent by kind rather than by inventing a sound.
31
+ - The agent skill walks setup itself and treats `--sound` / `--level` as overrides.
32
+ - Every detected harness is installed instead of picking one.
33
+ - The interactive app offers labeled hooks install and uninstall.
34
+
35
+ ### Fixed
36
+
37
+ - Codex hooks are written in the layer's existing representation.
38
+ - Readiness work that cannot change the next action is skipped.
39
+ - Unfinished import changes from the skill rewrite are dropped.
40
+ - Setup closes are short.
41
+
42
+ ## [0.5.1] - 2026-08-13
43
+
44
+ ### Fixed
45
+
46
+ - Republished the 0.5.0 source. The previous tarball carried 0.4.0's compiled output, so agent-wake modules never reached npm.
47
+
48
+ ## [0.5.0] - 2026-08-13
49
+
50
+ ### Added
51
+
52
+ - Answers now reach the agent that asked without the user returning to the terminal.
53
+ - Asynchronous Claude Code Stop hook: it returns at once and posts the answer into the same session over its inbox socket.
54
+ - Codex Stop hook continues the turn directly, and resumes a stopped thread only behind a writer-lock probe.
55
+
56
+ ### Removed
57
+
58
+ - **BREAKING** Presence gate and the held-turn budget. `require_idle`, `away_after_seconds`, and `hook_reply_timeout_seconds` are gone rather than deprecated.
59
+
60
+ ### Changed
61
+
62
+ - A registered question must carry a commitment to the work each answer resumes, and that commitment must not name where the answer arrives.
63
+
64
+ ## [0.4.0] - 2026-08-12
65
+
66
+ ### Added
67
+
68
+ - Agent-facing local logs.
69
+ - Crash-safe question continuation.
70
+ - Additive submission protocol updates required by the current CLI.
71
+
72
+ ## [0.3.0] - 2026-08-10
73
+
74
+ ### Added
75
+
76
+ - Interactive app.
77
+ - Self-describing settings: a config schema that documents and validates itself, and a themed presentation layer for the banner, help, and config views.
78
+
79
+ ## [0.2.1] - 2026-08-09
80
+
81
+ ### Added
82
+
83
+ - Question queue: asks never supersede each other; only replies supersede replies.
84
+
85
+ ### Fixed
86
+
87
+ - `init` no longer stops at a routing pointer that has not fired yet.
88
+
89
+ ## [0.2.0] - 2026-08-09
90
+
91
+ ### Changed
92
+
93
+ - **BREAKING** A reply request carries a set of 1–4 questions instead of a single kind/choices pair.
94
+ - **BREAKING** One `--choice` flag per answer. The comma delimiter is gone.
95
+
96
+ ### Added
97
+
98
+ - Free-text or closed questions, multi-select, and typed answers beside choices.
99
+ - `--detail` / `--detail-file`, and `ask --form` for several questions as one form.
100
+
101
+ ## [0.1.8] - 2026-08-08
102
+
103
+ ### Changed
104
+
105
+ - Human-facing product spelling is Notifai.
106
+ - Protocol dependency advanced to 0.1.2.
107
+
108
+ ## [0.1.7] - 2026-08-05
109
+
110
+ ### Changed
111
+
112
+ - Release engineering and companion-install guidance.
113
+
114
+ ## [0.1.6] - 2026-08-05
115
+
116
+ ### Added
117
+
118
+ - Native skills setup composed into `init`.
119
+
120
+ ## [0.1.5] - 2026-08-05
121
+
122
+ ### Added
123
+
124
+ - Release pin verification.
125
+
126
+ ## [0.1.4] - 2026-08-05
127
+
128
+ ### Added
129
+
130
+ - Pinned skill installer source.
131
+
132
+ ## [0.1.3] - 2026-08-05
133
+
134
+ ### Changed
135
+
136
+ - Portable, time-bounded release checks.
137
+
138
+ ## [0.1.2] - 2026-08-05
139
+
140
+ ### Fixed
141
+
142
+ - CLI package installable from npm.
143
+
144
+ ## [0.1.1] - 2026-08-05
145
+
146
+ ### Added
147
+
148
+ - Receipt-backed setup.
149
+
150
+ ## [0.1.0] - 2026-08-05
151
+
152
+ ### Added
153
+
154
+ - First public release of the `notifai` CLI under Apache-2.0.
155
+
156
+ [unreleased]: https://github.com/Raidiant-io/notifai/compare/v1.0.1...HEAD
157
+ [1.0.1]: https://github.com/Raidiant-io/notifai/compare/v1.0.0...v1.0.1
158
+ [1.0.0]: https://github.com/Raidiant-io/notifai/compare/v0.5.1...v1.0.0
159
+ [0.5.1]: https://github.com/Raidiant-io/notifai/compare/v0.5.0...v0.5.1
160
+ [0.5.0]: https://github.com/Raidiant-io/notifai/compare/v0.4.0...v0.5.0
161
+ [0.4.0]: https://github.com/Raidiant-io/notifai/compare/v0.3.0...v0.4.0
162
+ [0.3.0]: https://github.com/Raidiant-io/notifai/compare/v0.2.1...v0.3.0
163
+ [0.2.1]: https://github.com/Raidiant-io/notifai/compare/v0.2.0...v0.2.1
164
+ [0.2.0]: https://github.com/Raidiant-io/notifai/compare/v0.1.8...v0.2.0
165
+ [0.1.8]: https://github.com/Raidiant-io/notifai/compare/v0.1.7...v0.1.8
166
+ [0.1.7]: https://github.com/Raidiant-io/notifai/compare/v0.1.6...v0.1.7
167
+ [0.1.6]: https://github.com/Raidiant-io/notifai/compare/v0.1.5...v0.1.6
168
+ [0.1.5]: https://github.com/Raidiant-io/notifai/compare/v0.1.4...v0.1.5
169
+ [0.1.4]: https://github.com/Raidiant-io/notifai/compare/v0.1.3...v0.1.4
170
+ [0.1.3]: https://github.com/Raidiant-io/notifai/compare/v0.1.2...v0.1.3
171
+ [0.1.2]: https://github.com/Raidiant-io/notifai/compare/v0.1.1...v0.1.2
172
+ [0.1.1]: https://github.com/Raidiant-io/notifai/compare/v0.1.0...v0.1.1
173
+ [0.1.0]: https://github.com/Raidiant-io/notifai/releases/tag/v0.1.0
package/README.md CHANGED
@@ -12,6 +12,11 @@ npm install -g @raidiant/notifai
12
12
  notifai init
13
13
  ```
14
14
 
15
+ If you do not want a global bin, `npx --yes @raidiant/notifai@<version>` is
16
+ supported. Pin the version. `hooks install` then writes that same pinned npx
17
+ invocation into the harness adapter. This is slower than a real install and
18
+ is not the default path.
19
+
15
20
  `init` walks the setup one step at a time and tells you the single next
16
21
  thing to do. Run it again after each step; it works out what remains.
17
22
 
@@ -55,10 +60,12 @@ For a harness that cannot resume an idle agent turn, `notifai send
55
60
  notifai hooks install
56
61
  ```
57
62
 
58
- Wires question routing into Claude Code, Codex, Cursor or OpenCode. This
59
- is what lets an agent's question reach your phone without the agent
60
- having to cooperate — no question detection, no state in a context window
61
- that compaction will eat.
63
+ Wires question routing into every supported harness detected on this
64
+ machine (Claude Code, Codex, Cursor, OpenCode). `notifai init` does the
65
+ same and, at a terminal, lets you keep the detected set, pick a subset,
66
+ or add one it did not see. This is what lets an agent's question reach
67
+ your phone without the agent having to cooperate — no question detection,
68
+ no state in a context window that compaction will eat.
62
69
 
63
70
  Every harness definition calls one stable user-level adapter at
64
71
  `~/.notifai/bin/hook-adapter`. Node, package manager, CLI version, checkout,
@@ -1,12 +1,13 @@
1
1
  import { type ListRepliesResponse, type Platform, type QuestionT, type ReplyView, type RoutableDevice } from '@raidiant/notifai-protocol';
2
2
  import { type ApiClient, type ClientOptions } from './client.js';
3
3
  import type { CredentialStore } from './credentials.js';
4
- import { type Readiness } from './readiness.js';
4
+ import { type Readiness, type ReadinessRefresh } from './readiness.js';
5
5
  import type { Tone } from './ui/theme.js';
6
6
  import { type HookHarness } from './hooks.js';
7
7
  import { type Logger } from './logging.js';
8
8
  import { type ClaudeWakeAdapters } from './claude-wake.js';
9
9
  import { type CodexWakeAdapters } from './codex-wake.js';
10
+ import { type HookAdapterTarget } from './hook-adapter.js';
10
11
  import { type SendFlags } from './send.js';
11
12
  import type { NativeSkills, SkillScope } from './native-skills.js';
12
13
  export interface CommandIo {
@@ -28,6 +29,12 @@ export interface CommandIo {
28
29
  label: string;
29
30
  hint?: string;
30
31
  }[]): Promise<string | null>;
32
+ /** Interactive multi-select. `initial` are pre-selected values. */
33
+ multiselect?(message: string, options: {
34
+ value: string;
35
+ label: string;
36
+ hint?: string;
37
+ }[], initial?: string[]): Promise<string[] | null>;
31
38
  intro?(title: string): Promise<void>;
32
39
  outro?(message: string): Promise<void>;
33
40
  note?(message: string, title?: string): Promise<void>;
@@ -52,6 +59,8 @@ export interface CommandDeps {
52
59
  cwd: string;
53
60
  /** Test seam; production fixes the hook adapter under os.homedir(). */
54
61
  hookAdapterHome?: string;
62
+ /** Test seam; production uses this process's Node and CLI paths. */
63
+ hookInstallTarget?: HookAdapterTarget;
55
64
  /** Test seam; production uses fetch against base_url. */
56
65
  clientFactory?: (baseUrl: string, bearer: string | null, options?: ClientOptions) => ApiClient;
57
66
  /** Test seam for bounded polling without wall-clock sleeps. */
@@ -228,6 +237,8 @@ export interface HooksInstallFlags {
228
237
  execPath?: string;
229
238
  scriptPath?: string;
230
239
  }
240
+ /** True when this process is `npx` / `npm exec`, not a global or linked install. */
241
+ export declare function runningViaNpx(env: NodeJS.ProcessEnv, scriptPath: string): boolean;
231
242
  export declare function hooksInstallCommand(deps: CommandDeps, flags: HooksInstallFlags): number;
232
243
  export declare function hooksUninstallCommand(deps: CommandDeps, flags: HooksInstallFlags): number;
233
244
  export declare function configShowCommand(deps: CommandDeps, flags: {
@@ -338,9 +349,13 @@ export declare function initCommand(deps: CommandDeps, flags: InitFlags): Promis
338
349
  */
339
350
  export declare function assessReadiness(deps: CommandDeps, options?: {
340
351
  skillScope?: SkillScope;
352
+ previous?: Readiness;
353
+ refresh?: readonly ReadinessRefresh[];
341
354
  }): Promise<Readiness>;
342
355
  export declare function doctorCommand(deps: CommandDeps, flags: {
343
356
  json?: boolean;
357
+ }, options?: {
358
+ readiness?: Readiness;
344
359
  }): Promise<number>;
345
360
  export declare function realIo(env?: NodeJS.ProcessEnv): CommandIo;
346
361
  export {};