@raidiant/notifai 10.1.7 → 11.0.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 +56 -0
- package/README.md +23 -13
- package/dist/claude-wake.d.ts +1 -2
- package/dist/claude-wake.js +15 -61
- package/dist/claude-wake.js.map +1 -1
- package/dist/cli-bin.js +3 -14
- package/dist/cli-bin.js.map +1 -1
- package/dist/cli-contract.d.ts +12 -0
- package/dist/cli-contract.js +19 -0
- package/dist/cli-contract.js.map +1 -0
- package/dist/cli-release.d.ts +0 -1
- package/dist/cli-release.js +5 -21
- package/dist/cli-release.js.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/codex-wake.d.ts +1 -1
- package/dist/codex-wake.js +8 -36
- package/dist/codex-wake.js.map +1 -1
- package/dist/command-session.js +2 -1
- package/dist/command-session.js.map +1 -1
- package/dist/commands-acknowledge.d.ts +13 -0
- package/dist/commands-acknowledge.js +67 -0
- package/dist/commands-acknowledge.js.map +1 -0
- package/dist/commands-ask.d.ts +63 -0
- package/dist/commands-ask.js +407 -0
- package/dist/commands-ask.js.map +1 -0
- package/dist/commands-close.d.ts +6 -0
- package/dist/commands-close.js +197 -0
- package/dist/commands-close.js.map +1 -0
- package/dist/commands-config.js +2 -2
- package/dist/commands-config.js.map +1 -1
- package/dist/commands-core.js +2 -2
- package/dist/commands-core.js.map +1 -1
- package/dist/commands-doctor.js +61 -120
- package/dist/commands-doctor.js.map +1 -1
- package/dist/commands-harness-context.d.ts +0 -1
- package/dist/commands-harness-context.js +2 -4
- package/dist/commands-harness-context.js.map +1 -1
- package/dist/commands-hook-diagnostics.d.ts +27 -0
- package/dist/commands-hook-diagnostics.js +97 -0
- package/dist/commands-hook-diagnostics.js.map +1 -0
- package/dist/commands-hook-install.d.ts +26 -0
- package/dist/commands-hook-install.js +551 -0
- package/dist/commands-hook-install.js.map +1 -0
- package/dist/commands-hook-run.d.ts +29 -0
- package/dist/commands-hook-run.js +517 -0
- package/dist/commands-hook-run.js.map +1 -0
- package/dist/commands-init.d.ts +2 -7
- package/dist/commands-init.js +59 -92
- package/dist/commands-init.js.map +1 -1
- package/dist/commands-send.js +35 -3
- package/dist/commands-send.js.map +1 -1
- package/dist/commands-skill.js +5 -5
- package/dist/commands-skill.js.map +1 -1
- package/dist/commands-update.js +17 -31
- package/dist/commands-update.js.map +1 -1
- package/dist/commands.d.ts +11 -6
- package/dist/commands.js +9 -4
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts +14 -4
- package/dist/config.js +35 -9
- package/dist/config.js.map +1 -1
- package/dist/file-lock.d.ts +3 -0
- package/dist/file-lock.js +33 -17
- package/dist/file-lock.js.map +1 -1
- package/dist/guidance-content.js +30 -15
- package/dist/guidance-content.js.map +1 -1
- package/dist/hook-acknowledgements.d.ts +42 -0
- package/dist/hook-acknowledgements.js +316 -0
- package/dist/hook-acknowledgements.js.map +1 -0
- package/dist/hook-events.d.ts +6 -0
- package/dist/hook-events.js +22 -0
- package/dist/hook-events.js.map +1 -0
- package/dist/hook-gates.d.ts +7 -0
- package/dist/hook-gates.js +21 -0
- package/dist/hook-gates.js.map +1 -0
- package/dist/hook-lifecycle.d.ts +93 -0
- package/dist/{hooks.js → hook-lifecycle.js} +61 -1359
- package/dist/hook-lifecycle.js.map +1 -0
- package/dist/hook-project-sessions.d.ts +28 -0
- package/dist/hook-project-sessions.js +141 -0
- package/dist/hook-project-sessions.js.map +1 -0
- package/dist/hook-question-lock.d.ts +7 -0
- package/dist/hook-question-lock.js +173 -0
- package/dist/hook-question-lock.js.map +1 -0
- package/dist/hook-question-retirement.d.ts +57 -0
- package/dist/hook-question-retirement.js +261 -0
- package/dist/hook-question-retirement.js.map +1 -0
- package/dist/hook-question-state.d.ts +45 -0
- package/dist/hook-question-state.js +196 -0
- package/dist/hook-question-state.js.map +1 -0
- package/dist/hook-session-state.d.ts +31 -0
- package/dist/hook-session-state.js +249 -0
- package/dist/hook-session-state.js.map +1 -0
- package/dist/{hooks.d.ts → hook-types.d.ts} +17 -236
- package/dist/hook-types.js +4 -0
- package/dist/hook-types.js.map +1 -0
- package/dist/install-hooks.d.ts +75 -60
- package/dist/install-hooks.js +299 -209
- package/dist/install-hooks.js.map +1 -1
- package/dist/interactive.d.ts +3 -16
- package/dist/interactive.js +19 -95
- package/dist/interactive.js.map +1 -1
- package/dist/local-path.d.ts +7 -0
- package/dist/local-path.js +27 -0
- package/dist/local-path.js.map +1 -0
- package/dist/node-floor.js +3 -10
- package/dist/node-floor.js.map +1 -1
- package/dist/npm-invocation.d.ts +34 -0
- package/dist/npm-invocation.js +53 -0
- package/dist/npm-invocation.js.map +1 -0
- package/dist/openclaw-plugin.d.ts +12 -3
- package/dist/openclaw-plugin.js +42 -16
- package/dist/openclaw-plugin.js.map +1 -1
- package/dist/opencode-plugin.d.ts +2 -2
- package/dist/opencode-plugin.js +4 -6
- package/dist/opencode-plugin.js.map +1 -1
- package/dist/program.js +11 -13
- package/dist/program.js.map +1 -1
- package/dist/project-enablement.d.ts +6 -0
- package/dist/project-enablement.js +11 -27
- package/dist/project-enablement.js.map +1 -1
- package/dist/question-settlement-process.d.ts +1 -1
- package/dist/readiness.d.ts +0 -2
- package/dist/readiness.js +0 -4
- package/dist/readiness.js.map +1 -1
- package/dist/send.d.ts +8 -4
- package/dist/send.js +145 -26
- package/dist/send.js.map +1 -1
- package/dist/session-activation.d.ts +3 -1
- package/dist/session-activation.js +16 -0
- package/dist/session-activation.js.map +1 -1
- package/dist/skill-source/manifest.json +4 -4
- package/dist/skill-source/notifai/SKILL.md +60 -60
- package/dist/skill-source/notifai/references/harness-setup.md +42 -16
- package/dist/ui/config-view.d.ts +0 -2
- package/dist/ui/config-view.js +1 -5
- package/dist/ui/config-view.js.map +1 -1
- package/dist/ui/theme.d.ts +0 -3
- package/dist/ui/theme.js +0 -1
- package/dist/ui/theme.js.map +1 -1
- package/dist/version.d.ts +22 -0
- package/dist/version.js +51 -0
- package/dist/version.js.map +1 -0
- package/dist/wake-support.d.ts +8 -0
- package/dist/wake-support.js +38 -0
- package/dist/wake-support.js.map +1 -0
- package/package.json +2 -2
- package/dist/cli-update-contract.d.ts +0 -7
- package/dist/cli-update-contract.js +0 -10
- package/dist/cli-update-contract.js.map +0 -1
- package/dist/commands-hooks.d.ts +0 -160
- package/dist/commands-hooks.js +0 -1800
- package/dist/commands-hooks.js.map +0 -1
- package/dist/hooks.js.map +0 -1
package/dist/install-hooks.d.ts
CHANGED
|
@@ -3,14 +3,20 @@ import { type HookInstallableHarness } from './harnesses.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Harness hook installation.
|
|
5
5
|
*
|
|
6
|
+
* Notifai owns exactly one lifecycle mechanism per harness, in the current
|
|
7
|
+
* User's account and that harness's active home. There is no second install
|
|
8
|
+
* scope: whether Notifai activates in a Project is Project Enablement's
|
|
9
|
+
* question, and Project-scoped hook files are read only as migration evidence
|
|
10
|
+
* to remove.
|
|
11
|
+
*
|
|
6
12
|
* Claude Code's `settings.json` and Codex's hook files use the same shape —
|
|
7
13
|
* `hooks` maps an event name to matcher groups, each holding command handlers
|
|
8
14
|
* with an optional timeout — so one generator serves both. Only the file
|
|
9
15
|
* location and the event set differ. Codex supports either a dedicated
|
|
10
|
-
* `hooks.json` or inline `[hooks]` tables in the same layer's `config.toml
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* never both.
|
|
16
|
+
* `hooks.json` or inline `[hooks]` tables in the same layer's `config.toml`;
|
|
17
|
+
* Notifai preserves whichever one already owns its approved handlers. A fresh
|
|
18
|
+
* install writes `hooks.json`, except when the User's own hooks already live
|
|
19
|
+
* inline. Notifai lives in one of them, never both.
|
|
14
20
|
*
|
|
15
21
|
* Cursor's native format is flat and lower-camel-cased, while OpenCode's
|
|
16
22
|
* extension point is a JavaScript plugin module. Each therefore has a bounded
|
|
@@ -22,20 +28,17 @@ export interface HookHandler {
|
|
|
22
28
|
timeout?: number;
|
|
23
29
|
async?: boolean;
|
|
24
30
|
statusMessage?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Codex-only. Approximate token threshold for spilling `additionalContext`.
|
|
33
|
+
* Unset uses Codex's 2,500-token default; `0` passes the full context.
|
|
34
|
+
*/
|
|
35
|
+
additionalContextLimit?: number;
|
|
25
36
|
}
|
|
26
37
|
export interface HookGroup {
|
|
27
38
|
matcher?: string;
|
|
28
39
|
hooks: HookHandler[];
|
|
29
40
|
}
|
|
30
41
|
export type HookConfig = Record<string, HookGroup[]>;
|
|
31
|
-
export interface InstallPlan {
|
|
32
|
-
harness: HookInstallableHarness;
|
|
33
|
-
/** Absolute path of the settings file that will be written. */
|
|
34
|
-
file: string;
|
|
35
|
-
/** True when the file is machine-wide rather than per-project. */
|
|
36
|
-
global: boolean;
|
|
37
|
-
config: HookConfig;
|
|
38
|
-
}
|
|
39
42
|
export interface HookCommandOptions {
|
|
40
43
|
platform?: NodeJS.Platform | HookHostPlatform;
|
|
41
44
|
/** Registered Node used to interpret the Windows adapter. Ignored on POSIX. */
|
|
@@ -111,11 +114,20 @@ interface CursorSettingsDocument {
|
|
|
111
114
|
/** Cursor's native schema is flat and uses lower-camel lifecycle event names. */
|
|
112
115
|
export declare function buildCursorHookConfig(options: BuildOptions): CursorHookConfig;
|
|
113
116
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
|
|
117
|
+
* The one file each harness reads Notifai's lifecycle wiring from: the current
|
|
118
|
+
* User's account, in that harness's active home.
|
|
119
|
+
*/
|
|
120
|
+
export declare function settingsFile(harness: HookInstallableHarness, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string;
|
|
121
|
+
/**
|
|
122
|
+
* Files an older build may have left inside this Project, which Notifai now
|
|
123
|
+
* only ever reads in order to remove.
|
|
124
|
+
*
|
|
125
|
+
* Nothing installs here any more. Every path is still enumerated because a
|
|
126
|
+
* leftover Project-scoped handler keeps firing beside the Machine one, and
|
|
127
|
+
* silently leaving it would be exactly the duplicate-routing defect dropping
|
|
128
|
+
* the second scope was meant to end.
|
|
117
129
|
*/
|
|
118
|
-
export declare function
|
|
130
|
+
export declare function legacyProjectHookFiles(harness: HookInstallableHarness, cwd: string): string[];
|
|
119
131
|
/**
|
|
120
132
|
* The account home harness config roots are resolved against.
|
|
121
133
|
*
|
|
@@ -139,21 +151,6 @@ export declare function harnessAccountHome(env?: NodeJS.ProcessEnv, platform?: N
|
|
|
139
151
|
* `.claude/settings.local.json` — so this deliberately applies to Codex only.
|
|
140
152
|
*/
|
|
141
153
|
export declare function codexProjectRoot(cwd: string): string;
|
|
142
|
-
/**
|
|
143
|
-
* The `.codex` directory that has to exist for Codex to load project hooks at
|
|
144
|
-
* all, or null when nothing extra is needed.
|
|
145
|
-
*
|
|
146
|
-
* Codex splits the two halves of "which project am I in": it discovers the
|
|
147
|
-
* project layer by walking up from cwd for a `.codex` directory, but resolves
|
|
148
|
-
* the hook file inside that layer against the main repository. In an ordinary
|
|
149
|
-
* checkout both land on the same directory and the split is invisible. In a
|
|
150
|
-
* worktree they diverge, and writing only the main repository's file leaves it
|
|
151
|
-
* unread — Codex never looks, because nothing at or above cwd told it there was
|
|
152
|
-
* a project layer to load. Proven 2026-08-03: with cwd in a worktree, an *empty*
|
|
153
|
-
* `.codex` directory there was the difference between the main repository's
|
|
154
|
-
* handler running and nothing running.
|
|
155
|
-
*/
|
|
156
|
-
export declare function codexLayerDir(cwd: string): string | null;
|
|
157
154
|
/**
|
|
158
155
|
* Harness-specific home variables relocate the whole active harness home.
|
|
159
156
|
* This matters under session managers that give each Codex account its own
|
|
@@ -180,8 +177,17 @@ export interface CodexLayerPaths {
|
|
|
180
177
|
hooksJson: string;
|
|
181
178
|
configToml: string;
|
|
182
179
|
}
|
|
183
|
-
/** The two files Codex will look at
|
|
184
|
-
export declare function
|
|
180
|
+
/** The two files Codex will look at in the Machine layer Notifai installs into. */
|
|
181
|
+
export declare function codexMachineLayerPaths(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): CodexLayerPaths;
|
|
182
|
+
/**
|
|
183
|
+
* Project layers an older build may have written into, for removal only.
|
|
184
|
+
*
|
|
185
|
+
* Codex resolves a project hook file against the main repository, so a linked
|
|
186
|
+
* worktree has two candidate directories: the main checkout's `.codex`, which
|
|
187
|
+
* Codex reads, and the worktree's own, which older builds sometimes created and
|
|
188
|
+
* Codex never reads. Both are legacy residue and both are enumerated here.
|
|
189
|
+
*/
|
|
190
|
+
export declare function codexLegacyProjectLayers(cwd: string): CodexLayerPaths[];
|
|
185
191
|
export interface CodexLayerInspection {
|
|
186
192
|
paths: CodexLayerPaths;
|
|
187
193
|
/** Every event this file defines a handler for, whoever owns it. */
|
|
@@ -190,23 +196,27 @@ export interface CodexLayerInspection {
|
|
|
190
196
|
/** The subset of those events whose handlers are Notifai's own. */
|
|
191
197
|
ourJsonEvents: string[];
|
|
192
198
|
ourTomlEvents: string[];
|
|
199
|
+
/** Whether `config.toml` holds at least one hook handler Notifai does not own. */
|
|
200
|
+
foreignTomlHooks: boolean;
|
|
193
201
|
writeTarget: string;
|
|
194
202
|
}
|
|
195
203
|
/**
|
|
196
|
-
* Where Notifai writes in this Codex layer
|
|
197
|
-
*
|
|
198
|
-
*
|
|
204
|
+
* Where Notifai writes in this Codex layer. An existing single Notifai
|
|
205
|
+
* representation is stable: upgrades refresh it in place because Codex keys
|
|
206
|
+
* approval by both handler identity and source path. Only a fresh installation
|
|
207
|
+
* chooses between `hooks.json` and inline `config.toml`.
|
|
199
208
|
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
209
|
+
* `config.toml` is the User's whole Codex configuration and Codex rewrites it
|
|
210
|
+
* itself for `[hooks.state]`; keeping Notifai out of it bounds the blast radius
|
|
211
|
+
* to hooks, removes a second writer racing those trust records, and replaces
|
|
212
|
+
* TOML splicing with the same JSON merge Claude Code uses. Joining an inline
|
|
213
|
+
* layer that already has the User's handlers is the one exception, and it
|
|
214
|
+
* exists only so Codex never prints its dual-representation warning.
|
|
205
215
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
216
|
+
* A fresh installation uses `hooks.json` unless foreign inline handlers make
|
|
217
|
+
* `config.toml` the layer's established representation. `[hooks.state]` is the
|
|
218
|
+
* trust store rather than a hook definition, so it never counts as a
|
|
219
|
+
* representation and is preserved through every write.
|
|
210
220
|
*/
|
|
211
221
|
export declare function inspectCodexLayer(paths: CodexLayerPaths): CodexLayerInspection;
|
|
212
222
|
/**
|
|
@@ -214,10 +224,10 @@ export declare function inspectCodexLayer(paths: CodexLayerPaths): CodexLayerIns
|
|
|
214
224
|
* layer, then inspect that layer only after acquiring the shared anchor.
|
|
215
225
|
*/
|
|
216
226
|
export declare function withCodexLayerTransaction<T>(paths: CodexLayerPaths, action: (inspection: CodexLayerInspection) => T): T;
|
|
217
|
-
/** Every file
|
|
218
|
-
export declare function
|
|
227
|
+
/** Every Machine-layer file this harness might already be reading hooks from. */
|
|
228
|
+
export declare function machineHookFiles(harness: HookInstallableHarness, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string[];
|
|
219
229
|
/**
|
|
220
|
-
*
|
|
230
|
+
* The Machine layer with *Notifai* installed in both Codex representations.
|
|
221
231
|
*
|
|
222
232
|
* A layer that uses `hooks.json` and inline `[hooks]` at once is not by itself
|
|
223
233
|
* a Notifai fault: Codex supports both, loads both, runs every matching
|
|
@@ -233,9 +243,10 @@ export declare function hookDefinitionFiles(harness: HookInstallableHarness, glo
|
|
|
233
243
|
* the other one. Uninstall strips Notifai from both files, so the remedy is
|
|
234
244
|
* exact — and it never touches a foreign handler.
|
|
235
245
|
*/
|
|
236
|
-
export declare function codexRepresentationProblems(
|
|
246
|
+
export declare function codexRepresentationProblems(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string[];
|
|
237
247
|
/**
|
|
238
|
-
*
|
|
248
|
+
* The Machine layer where Notifai and someone else each own one Codex
|
|
249
|
+
* representation.
|
|
239
250
|
*
|
|
240
251
|
* This is not a fault and never fails a check. Codex loads `hooks.json` and
|
|
241
252
|
* inline `[hooks]` together and runs every matching handler, so both sets fire
|
|
@@ -244,7 +255,7 @@ export declare function codexRepresentationProblems(cwd: string, env?: NodeJS.Pr
|
|
|
244
255
|
* Notifai's, which is not, and that Notifai will not touch the one it does not
|
|
245
256
|
* own. Saying nothing here is what made the warning look like Notifai's bug.
|
|
246
257
|
*/
|
|
247
|
-
export declare function codexCoexistenceNotes(
|
|
258
|
+
export declare function codexCoexistenceNotes(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string[];
|
|
248
259
|
/**
|
|
249
260
|
* What `CODEX_HOME` is doing to this shell, when it is doing anything.
|
|
250
261
|
*
|
|
@@ -336,21 +347,15 @@ export interface InstalledHandler {
|
|
|
336
347
|
timeout?: number;
|
|
337
348
|
async?: boolean;
|
|
338
349
|
statusMessage?: string;
|
|
350
|
+
additionalContextLimit?: number;
|
|
339
351
|
}
|
|
340
352
|
export interface Installation {
|
|
341
353
|
harness: HookInstallableHarness;
|
|
342
354
|
file: string;
|
|
343
|
-
global: boolean;
|
|
344
355
|
handlers: InstalledHandler[];
|
|
345
356
|
/** Structural defects that require reinstalling this generated adapter. */
|
|
346
357
|
problems?: string[];
|
|
347
358
|
}
|
|
348
|
-
/**
|
|
349
|
-
* Best-effort mirror of the identity current Codex builds compare with
|
|
350
|
-
* `hooks.state.*.trusted_hash`. This persisted format is diagnostic evidence,
|
|
351
|
-
* not an API: Codex's `/hooks` UI remains authoritative and Notifai never
|
|
352
|
-
* writes the trust store.
|
|
353
|
-
*/
|
|
354
359
|
export declare function codexHookIdentityHash(handler: InstalledHandler): string;
|
|
355
360
|
/** Best-effort mirror of current Codex's persisted key for one handler. */
|
|
356
361
|
export declare function codexTrustKey(installation: Installation, handler: InstalledHandler): string;
|
|
@@ -373,7 +378,17 @@ export declare function codexStopDefinitionFingerprint(installations: Installati
|
|
|
373
378
|
* `/hooks` remains the source of truth.
|
|
374
379
|
*/
|
|
375
380
|
export declare function codexTrustProblems(installations: Installation[], env?: NodeJS.ProcessEnv): string[];
|
|
376
|
-
/**
|
|
377
|
-
|
|
381
|
+
/**
|
|
382
|
+
* The one Machine installation each harness would read a Notifai handler from.
|
|
383
|
+
*/
|
|
384
|
+
export declare function findInstallations(env?: NodeJS.ProcessEnv, adapterHome?: string, platform?: NodeJS.Platform | HookHostPlatform): Installation[];
|
|
385
|
+
/**
|
|
386
|
+
* Notifai handlers a previous build left in Project-scoped files.
|
|
387
|
+
*
|
|
388
|
+
* These are never an install target and never a fallback: they are residue to
|
|
389
|
+
* report and remove once the Machine installation is proven current. Foreign
|
|
390
|
+
* handlers sharing those files are not returned and are never touched.
|
|
391
|
+
*/
|
|
392
|
+
export declare function findLegacyProjectInstallations(cwd: string, env?: NodeJS.ProcessEnv, adapterHome?: string, platform?: NodeJS.Platform | HookHostPlatform): Installation[];
|
|
378
393
|
/** The hook event a handler's command actually invokes, e.g. `stop`. */
|
|
379
394
|
export declare function handlerEvent(command: string): string | null;
|