@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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** User-facing diagnosis and recovery guidance for hook readiness. */
|
|
2
|
+
import { type CommandDeps } from './commands-core.js';
|
|
3
|
+
import { type ActiveHarnessSession } from './commands-harness-context.js';
|
|
4
|
+
import { type Installation } from './install-hooks.js';
|
|
5
|
+
export declare const CODEX_HOOK_APPROVAL_USER_ACTION: {
|
|
6
|
+
readonly code: "codex_hook_approval_required";
|
|
7
|
+
readonly harness: "codex";
|
|
8
|
+
readonly action: "approve_or_enable_notifai_hooks";
|
|
9
|
+
readonly message: "Open `/hooks` in Codex, approve or enable the Notifai handlers, then tell me when it is done. I will finish setup and verify a fresh session.";
|
|
10
|
+
};
|
|
11
|
+
export declare const CODEX_FRESH_SESSION_USER_ACTION: {
|
|
12
|
+
readonly code: "codex_fresh_session_required";
|
|
13
|
+
readonly harness: "codex";
|
|
14
|
+
readonly action: "start_fresh_codex_session";
|
|
15
|
+
readonly message: "Start one fresh Codex session, send one prompt in it, then retry the question.";
|
|
16
|
+
};
|
|
17
|
+
export declare const CODEX_STALE_STOP_DEFINITION_PROBLEM = "the exact Codex Agent Session activated before the current Stop definition; Codex can keep the earlier timeout in that session even when the file on disk is current. Start one fresh Codex session, send one prompt in it, then retry";
|
|
18
|
+
export declare const CODEX_STOP_DEFINITION_NOT_SINGULAR_PROBLEM = "the active Codex configuration does not contain exactly one Notifai Stop definition, so no singular turn-end owner can be proven";
|
|
19
|
+
/**
|
|
20
|
+
* One fail-closed admission gate shared by every active harness route.
|
|
21
|
+
* Finding a file is not readiness: the exact session, one current definition,
|
|
22
|
+
* the stable adapter, a long enough Stop owner, and (for Codex) trust must all
|
|
23
|
+
* be true before `ask` is allowed to create an answerable notification.
|
|
24
|
+
*/
|
|
25
|
+
export declare function activeQuestionRouteProblems(deps: CommandDeps, active: ActiveHarnessSession, installations: Installation[]): string[];
|
|
26
|
+
/** The least disruptive verified way to make each installed adapter run once. */
|
|
27
|
+
export declare function hookActivationAdvice(installations: Installation[]): string;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/** User-facing diagnosis and recovery guidance for hook readiness. */
|
|
2
|
+
import {} from './commands-core.js';
|
|
3
|
+
import {} from './commands-harness-context.js';
|
|
4
|
+
import { stopShapeProblems } from './commands-hook-shape.js';
|
|
5
|
+
import { HERMES_QUESTION_ROUTING_UNAVAILABLE, isHookInstallableHarness, questionRoutingCapability, } from './harnesses.js';
|
|
6
|
+
import { inspectHookAdapter } from './hook-adapter.js';
|
|
7
|
+
import { HOOK_EVENTS } from './hook-events.js';
|
|
8
|
+
import { readSessionState } from './hook-session-state.js';
|
|
9
|
+
import { codexStopDefinitionFingerprint, codexTrustProblems, handlerEvent, } from './install-hooks.js';
|
|
10
|
+
export const CODEX_HOOK_APPROVAL_USER_ACTION = {
|
|
11
|
+
code: 'codex_hook_approval_required',
|
|
12
|
+
harness: 'codex',
|
|
13
|
+
action: 'approve_or_enable_notifai_hooks',
|
|
14
|
+
message: 'Open `/hooks` in Codex, approve or enable the Notifai handlers, then tell me when it is done. I will finish setup and verify a fresh session.',
|
|
15
|
+
};
|
|
16
|
+
export const CODEX_FRESH_SESSION_USER_ACTION = {
|
|
17
|
+
code: 'codex_fresh_session_required',
|
|
18
|
+
harness: 'codex',
|
|
19
|
+
action: 'start_fresh_codex_session',
|
|
20
|
+
message: 'Start one fresh Codex session, send one prompt in it, then retry the question.',
|
|
21
|
+
};
|
|
22
|
+
export const CODEX_STALE_STOP_DEFINITION_PROBLEM = 'the exact Codex Agent Session activated before the current Stop definition; Codex can keep the earlier timeout in that session even when the file on disk is current. Start one fresh Codex session, send one prompt in it, then retry';
|
|
23
|
+
export const CODEX_STOP_DEFINITION_NOT_SINGULAR_PROBLEM = 'the active Codex configuration does not contain exactly one Notifai Stop definition, so no singular turn-end owner can be proven';
|
|
24
|
+
/**
|
|
25
|
+
* One fail-closed admission gate shared by every active harness route.
|
|
26
|
+
* Finding a file is not readiness: the exact session, one current definition,
|
|
27
|
+
* the stable adapter, a long enough Stop owner, and (for Codex) trust must all
|
|
28
|
+
* be true before `ask` is allowed to create an answerable notification.
|
|
29
|
+
*/
|
|
30
|
+
export function activeQuestionRouteProblems(deps, active, installations) {
|
|
31
|
+
const problems = [];
|
|
32
|
+
if (active.sessionId === undefined) {
|
|
33
|
+
problems.push(`the active ${active.label} shell does not expose an exact session id; a project-level last-writer pointer can cross-wire two sessions. Use a blocking \`notifai send --reply\` question`);
|
|
34
|
+
}
|
|
35
|
+
const capability = isHookInstallableHarness(active.harness)
|
|
36
|
+
? questionRoutingCapability(active.harness, deps.hookPlatform ?? process.platform)
|
|
37
|
+
: HERMES_QUESTION_ROUTING_UNAVAILABLE;
|
|
38
|
+
if (capability.stopContinuation === 'unsupported') {
|
|
39
|
+
problems.push(`${active.label}: ${capability.deliveryContract}`);
|
|
40
|
+
}
|
|
41
|
+
const matching = installations.filter((installation) => installation.harness === active.harness);
|
|
42
|
+
if (matching.length > 1) {
|
|
43
|
+
problems.push(`${matching.length} ${active.label} definitions are active (${matching.map((entry) => entry.file).join(', ')}); reinstall so exactly one remains`);
|
|
44
|
+
}
|
|
45
|
+
for (const installation of matching) {
|
|
46
|
+
for (const problem of installation.problems ?? []) {
|
|
47
|
+
problems.push(`${installation.file}: ${problem}`);
|
|
48
|
+
}
|
|
49
|
+
for (const handler of installation.handlers) {
|
|
50
|
+
const event = handlerEvent(handler.command);
|
|
51
|
+
if (event !== null && !HOOK_EVENTS.includes(event)) {
|
|
52
|
+
problems.push(`${handler.event} in ${installation.file} names the unsupported event ${event}; reinstall the ${active.label} hooks`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
for (const problem of inspectHookAdapter(deps.hookAdapterHome, deps.hookPlatform).problems) {
|
|
57
|
+
problems.push(problem);
|
|
58
|
+
}
|
|
59
|
+
for (const installation of matching)
|
|
60
|
+
problems.push(...stopShapeProblems(installation, deps.hookPlatform));
|
|
61
|
+
problems.push(...codexTrustProblems(matching, deps.env));
|
|
62
|
+
if (active.harness === 'codex' && active.sessionId !== undefined) {
|
|
63
|
+
const state = readSessionState(active.sessionId, deps.env);
|
|
64
|
+
const currentFingerprint = codexStopDefinitionFingerprint(matching);
|
|
65
|
+
if (matching.length === 1 && currentFingerprint === undefined) {
|
|
66
|
+
problems.push(CODEX_STOP_DEFINITION_NOT_SINGULAR_PROBLEM);
|
|
67
|
+
}
|
|
68
|
+
else if (currentFingerprint !== undefined &&
|
|
69
|
+
state.harness === 'codex' &&
|
|
70
|
+
state.codex_stop_definition_fingerprint !== currentFingerprint) {
|
|
71
|
+
problems.push(CODEX_STALE_STOP_DEFINITION_PROBLEM);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return [...new Set(problems)];
|
|
75
|
+
}
|
|
76
|
+
/** The least disruptive verified way to make each installed adapter run once. */
|
|
77
|
+
export function hookActivationAdvice(installations) {
|
|
78
|
+
const harnesses = new Set(installations.map((installation) => installation.harness));
|
|
79
|
+
const advice = [];
|
|
80
|
+
if (harnesses.has('claude-code')) {
|
|
81
|
+
advice.push('Claude Code: start one fresh session, send one prompt, then run `notifai doctor`');
|
|
82
|
+
}
|
|
83
|
+
if (harnesses.has('cursor')) {
|
|
84
|
+
advice.push('Cursor: start one fresh conversation, send one prompt, finish its first turn, then run `notifai doctor`');
|
|
85
|
+
}
|
|
86
|
+
if (harnesses.has('codex')) {
|
|
87
|
+
advice.push('Codex: start one fresh session, send one prompt, then run `notifai doctor`; the separate Codex hook trust check says explicitly if `/hooks` needs your attention');
|
|
88
|
+
}
|
|
89
|
+
if (harnesses.has('opencode')) {
|
|
90
|
+
advice.push('OpenCode: restart it, then send one prompt; plugins load at startup, but non-blocking question continuation is intentionally unsupported');
|
|
91
|
+
}
|
|
92
|
+
if (harnesses.has('openclaw')) {
|
|
93
|
+
advice.push('OpenClaw: restart the Gateway, then send one prompt; plugins load at startup, but non-blocking question continuation is intentionally unsupported');
|
|
94
|
+
}
|
|
95
|
+
return `${advice.join('. ')}.`;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=commands-hook-diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands-hook-diagnostics.js","sourceRoot":"","sources":["../src/commands-hook-diagnostics.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAoB,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAA6B,MAAM,+BAA+B,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,EAClB,YAAY,GAEb,MAAM,oBAAoB,CAAA;AAC3B,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,iCAAiC;IACzC,OAAO,EAAE,+IAA+I;CAChJ,CAAA;AAEV,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,2BAA2B;IACnC,OAAO,EAAE,gFAAgF;CACjF,CAAA;AAEV,MAA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AAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAA;AAChC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type CommandDeps } from './commands-core.js';
|
|
2
|
+
import { type HookInstallableHarness } from './harnesses.js';
|
|
3
|
+
export interface HooksInstallFlags {
|
|
4
|
+
harness?: string;
|
|
5
|
+
/** Init owns the final setup result and suppresses per-harness close narration. */
|
|
6
|
+
narrate?: boolean;
|
|
7
|
+
/** Test seam; production resolves the running CLI. */
|
|
8
|
+
execPath?: string;
|
|
9
|
+
scriptPath?: string;
|
|
10
|
+
}
|
|
11
|
+
/** True when this process is `npx` / `npm exec`, not a global or linked install. */
|
|
12
|
+
export declare function runningViaNpx(env: NodeJS.ProcessEnv, scriptPath: string): boolean;
|
|
13
|
+
export declare function hooksInstallCommand(deps: CommandDeps, flags: HooksInstallFlags): number;
|
|
14
|
+
export declare function hooksUninstallCommand(deps: CommandDeps, flags: HooksInstallFlags): number;
|
|
15
|
+
/**
|
|
16
|
+
* Remove Notifai's own Project-scoped definitions discoverable from this
|
|
17
|
+
* Project. Foreign handlers sharing those files are never touched, and a file
|
|
18
|
+
* Notifai did not write is never deleted.
|
|
19
|
+
*/
|
|
20
|
+
export declare function removeLegacyProjectInstallations(deps: CommandDeps, harness: HookInstallableHarness, scriptPath: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Which harnesses to wire. An explicit `--harness` still wins as a singleton.
|
|
23
|
+
* Otherwise: every detected harness, or a human picker when detection is empty
|
|
24
|
+
* or names more than one.
|
|
25
|
+
*/
|
|
26
|
+
export declare function pickHarnessesToInstall(deps: CommandDeps, requested?: string): Promise<HookInstallableHarness[] | null>;
|