@raidiant/notifai 10.1.7 → 11.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.
- package/CHANGELOG.md +42 -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 +549 -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 +72 -60
- package/dist/install-hooks.js +292 -211
- 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 +41 -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,19 @@ 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 writes `hooks.json` and only joins `config.toml` when the User's own
|
|
18
|
+
* hooks already live there. Notifai lives in one of them, never both.
|
|
14
19
|
*
|
|
15
20
|
* Cursor's native format is flat and lower-camel-cased, while OpenCode's
|
|
16
21
|
* extension point is a JavaScript plugin module. Each therefore has a bounded
|
|
@@ -22,20 +27,17 @@ export interface HookHandler {
|
|
|
22
27
|
timeout?: number;
|
|
23
28
|
async?: boolean;
|
|
24
29
|
statusMessage?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Codex-only. Approximate token threshold for spilling `additionalContext`.
|
|
32
|
+
* Unset uses Codex's 2,500-token default; `0` passes the full context.
|
|
33
|
+
*/
|
|
34
|
+
additionalContextLimit?: number;
|
|
25
35
|
}
|
|
26
36
|
export interface HookGroup {
|
|
27
37
|
matcher?: string;
|
|
28
38
|
hooks: HookHandler[];
|
|
29
39
|
}
|
|
30
40
|
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
41
|
export interface HookCommandOptions {
|
|
40
42
|
platform?: NodeJS.Platform | HookHostPlatform;
|
|
41
43
|
/** Registered Node used to interpret the Windows adapter. Ignored on POSIX. */
|
|
@@ -111,11 +113,20 @@ interface CursorSettingsDocument {
|
|
|
111
113
|
/** Cursor's native schema is flat and uses lower-camel lifecycle event names. */
|
|
112
114
|
export declare function buildCursorHookConfig(options: BuildOptions): CursorHookConfig;
|
|
113
115
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
|
|
116
|
+
* The one file each harness reads Notifai's lifecycle wiring from: the current
|
|
117
|
+
* User's account, in that harness's active home.
|
|
118
|
+
*/
|
|
119
|
+
export declare function settingsFile(harness: HookInstallableHarness, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string;
|
|
120
|
+
/**
|
|
121
|
+
* Files an older build may have left inside this Project, which Notifai now
|
|
122
|
+
* only ever reads in order to remove.
|
|
123
|
+
*
|
|
124
|
+
* Nothing installs here any more. Every path is still enumerated because a
|
|
125
|
+
* leftover Project-scoped handler keeps firing beside the Machine one, and
|
|
126
|
+
* silently leaving it would be exactly the duplicate-routing defect dropping
|
|
127
|
+
* the second scope was meant to end.
|
|
117
128
|
*/
|
|
118
|
-
export declare function
|
|
129
|
+
export declare function legacyProjectHookFiles(harness: HookInstallableHarness, cwd: string): string[];
|
|
119
130
|
/**
|
|
120
131
|
* The account home harness config roots are resolved against.
|
|
121
132
|
*
|
|
@@ -139,21 +150,6 @@ export declare function harnessAccountHome(env?: NodeJS.ProcessEnv, platform?: N
|
|
|
139
150
|
* `.claude/settings.local.json` — so this deliberately applies to Codex only.
|
|
140
151
|
*/
|
|
141
152
|
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
153
|
/**
|
|
158
154
|
* Harness-specific home variables relocate the whole active harness home.
|
|
159
155
|
* This matters under session managers that give each Codex account its own
|
|
@@ -180,8 +176,17 @@ export interface CodexLayerPaths {
|
|
|
180
176
|
hooksJson: string;
|
|
181
177
|
configToml: string;
|
|
182
178
|
}
|
|
183
|
-
/** The two files Codex will look at
|
|
184
|
-
export declare function
|
|
179
|
+
/** The two files Codex will look at in the Machine layer Notifai installs into. */
|
|
180
|
+
export declare function codexMachineLayerPaths(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): CodexLayerPaths;
|
|
181
|
+
/**
|
|
182
|
+
* Project layers an older build may have written into, for removal only.
|
|
183
|
+
*
|
|
184
|
+
* Codex resolves a project hook file against the main repository, so a linked
|
|
185
|
+
* worktree has two candidate directories: the main checkout's `.codex`, which
|
|
186
|
+
* Codex reads, and the worktree's own, which older builds sometimes created and
|
|
187
|
+
* Codex never reads. Both are legacy residue and both are enumerated here.
|
|
188
|
+
*/
|
|
189
|
+
export declare function codexLegacyProjectLayers(cwd: string): CodexLayerPaths[];
|
|
185
190
|
export interface CodexLayerInspection {
|
|
186
191
|
paths: CodexLayerPaths;
|
|
187
192
|
/** Every event this file defines a handler for, whoever owns it. */
|
|
@@ -190,23 +195,25 @@ export interface CodexLayerInspection {
|
|
|
190
195
|
/** The subset of those events whose handlers are Notifai's own. */
|
|
191
196
|
ourJsonEvents: string[];
|
|
192
197
|
ourTomlEvents: string[];
|
|
198
|
+
/** Whether `config.toml` holds at least one hook handler Notifai does not own. */
|
|
199
|
+
foreignTomlHooks: boolean;
|
|
193
200
|
writeTarget: string;
|
|
194
201
|
}
|
|
195
202
|
/**
|
|
196
|
-
* Where Notifai writes in this Codex layer:
|
|
197
|
-
*
|
|
198
|
-
* `config.toml` for a hook-empty or already-mixed layer.
|
|
203
|
+
* Where Notifai writes in this Codex layer: `hooks.json`, unless the User's own
|
|
204
|
+
* hooks already live inline in the same layer's `config.toml`.
|
|
199
205
|
*
|
|
200
|
-
*
|
|
201
|
-
*
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
206
|
+
* `config.toml` is the User's whole Codex configuration and Codex rewrites it
|
|
207
|
+
* itself for `[hooks.state]`; keeping Notifai out of it bounds the blast radius
|
|
208
|
+
* to hooks, removes a second writer racing those trust records, and replaces
|
|
209
|
+
* TOML splicing with the same JSON merge Claude Code uses. Joining an inline
|
|
210
|
+
* layer that already has the User's handlers is the one exception, and it
|
|
211
|
+
* exists only so Codex never prints its dual-representation warning.
|
|
205
212
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
213
|
+
* Notifai's *own* inline handlers are not a reason to stay: the installer moves
|
|
214
|
+
* them to `hooks.json` and strips them from `config.toml`. `[hooks.state]` is
|
|
215
|
+
* the trust store rather than a hook definition, so it never counts as a
|
|
216
|
+
* representation and is preserved through every write.
|
|
210
217
|
*/
|
|
211
218
|
export declare function inspectCodexLayer(paths: CodexLayerPaths): CodexLayerInspection;
|
|
212
219
|
/**
|
|
@@ -214,10 +221,10 @@ export declare function inspectCodexLayer(paths: CodexLayerPaths): CodexLayerIns
|
|
|
214
221
|
* layer, then inspect that layer only after acquiring the shared anchor.
|
|
215
222
|
*/
|
|
216
223
|
export declare function withCodexLayerTransaction<T>(paths: CodexLayerPaths, action: (inspection: CodexLayerInspection) => T): T;
|
|
217
|
-
/** Every file
|
|
218
|
-
export declare function
|
|
224
|
+
/** Every Machine-layer file this harness might already be reading hooks from. */
|
|
225
|
+
export declare function machineHookFiles(harness: HookInstallableHarness, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string[];
|
|
219
226
|
/**
|
|
220
|
-
*
|
|
227
|
+
* The Machine layer with *Notifai* installed in both Codex representations.
|
|
221
228
|
*
|
|
222
229
|
* A layer that uses `hooks.json` and inline `[hooks]` at once is not by itself
|
|
223
230
|
* a Notifai fault: Codex supports both, loads both, runs every matching
|
|
@@ -233,9 +240,10 @@ export declare function hookDefinitionFiles(harness: HookInstallableHarness, glo
|
|
|
233
240
|
* the other one. Uninstall strips Notifai from both files, so the remedy is
|
|
234
241
|
* exact — and it never touches a foreign handler.
|
|
235
242
|
*/
|
|
236
|
-
export declare function codexRepresentationProblems(
|
|
243
|
+
export declare function codexRepresentationProblems(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string[];
|
|
237
244
|
/**
|
|
238
|
-
*
|
|
245
|
+
* The Machine layer where Notifai and someone else each own one Codex
|
|
246
|
+
* representation.
|
|
239
247
|
*
|
|
240
248
|
* This is not a fault and never fails a check. Codex loads `hooks.json` and
|
|
241
249
|
* inline `[hooks]` together and runs every matching handler, so both sets fire
|
|
@@ -244,7 +252,7 @@ export declare function codexRepresentationProblems(cwd: string, env?: NodeJS.Pr
|
|
|
244
252
|
* Notifai's, which is not, and that Notifai will not touch the one it does not
|
|
245
253
|
* own. Saying nothing here is what made the warning look like Notifai's bug.
|
|
246
254
|
*/
|
|
247
|
-
export declare function codexCoexistenceNotes(
|
|
255
|
+
export declare function codexCoexistenceNotes(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform | HookHostPlatform): string[];
|
|
248
256
|
/**
|
|
249
257
|
* What `CODEX_HOME` is doing to this shell, when it is doing anything.
|
|
250
258
|
*
|
|
@@ -336,21 +344,15 @@ export interface InstalledHandler {
|
|
|
336
344
|
timeout?: number;
|
|
337
345
|
async?: boolean;
|
|
338
346
|
statusMessage?: string;
|
|
347
|
+
additionalContextLimit?: number;
|
|
339
348
|
}
|
|
340
349
|
export interface Installation {
|
|
341
350
|
harness: HookInstallableHarness;
|
|
342
351
|
file: string;
|
|
343
|
-
global: boolean;
|
|
344
352
|
handlers: InstalledHandler[];
|
|
345
353
|
/** Structural defects that require reinstalling this generated adapter. */
|
|
346
354
|
problems?: string[];
|
|
347
355
|
}
|
|
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
356
|
export declare function codexHookIdentityHash(handler: InstalledHandler): string;
|
|
355
357
|
/** Best-effort mirror of current Codex's persisted key for one handler. */
|
|
356
358
|
export declare function codexTrustKey(installation: Installation, handler: InstalledHandler): string;
|
|
@@ -373,7 +375,17 @@ export declare function codexStopDefinitionFingerprint(installations: Installati
|
|
|
373
375
|
* `/hooks` remains the source of truth.
|
|
374
376
|
*/
|
|
375
377
|
export declare function codexTrustProblems(installations: Installation[], env?: NodeJS.ProcessEnv): string[];
|
|
376
|
-
/**
|
|
377
|
-
|
|
378
|
+
/**
|
|
379
|
+
* The one Machine installation each harness would read a Notifai handler from.
|
|
380
|
+
*/
|
|
381
|
+
export declare function findInstallations(env?: NodeJS.ProcessEnv, adapterHome?: string, platform?: NodeJS.Platform | HookHostPlatform): Installation[];
|
|
382
|
+
/**
|
|
383
|
+
* Notifai handlers a previous build left in Project-scoped files.
|
|
384
|
+
*
|
|
385
|
+
* These are never an install target and never a fallback: they are residue to
|
|
386
|
+
* report and remove once the Machine installation is proven current. Foreign
|
|
387
|
+
* handlers sharing those files are not returned and are never touched.
|
|
388
|
+
*/
|
|
389
|
+
export declare function findLegacyProjectInstallations(cwd: string, env?: NodeJS.ProcessEnv, adapterHome?: string, platform?: NodeJS.Platform | HookHostPlatform): Installation[];
|
|
378
390
|
/** The hook event a handler's command actually invokes, e.g. `stop`. */
|
|
379
391
|
export declare function handlerEvent(command: string): string | null;
|