@raidiant/notifai 0.5.0 → 1.0.0

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 (74) hide show
  1. package/CHANGELOG.md +165 -0
  2. package/README.md +11 -4
  3. package/dist/claude-wake.d.ts +101 -0
  4. package/dist/claude-wake.js +397 -0
  5. package/dist/claude-wake.js.map +1 -0
  6. package/dist/codex-wake.d.ts +84 -0
  7. package/dist/codex-wake.js +238 -0
  8. package/dist/codex-wake.js.map +1 -0
  9. package/dist/commands.d.ts +31 -11
  10. package/dist/commands.js +679 -232
  11. package/dist/commands.js.map +1 -1
  12. package/dist/config-schema.d.ts +3 -3
  13. package/dist/config-schema.js +11 -49
  14. package/dist/config-schema.js.map +1 -1
  15. package/dist/config.d.ts +23 -45
  16. package/dist/config.js +61 -39
  17. package/dist/config.js.map +1 -1
  18. package/dist/harnesses.d.ts +4 -13
  19. package/dist/harnesses.js +12 -17
  20. package/dist/harnesses.js.map +1 -1
  21. package/dist/hook-adapter.d.ts +10 -1
  22. package/dist/hook-adapter.js +79 -10
  23. package/dist/hook-adapter.js.map +1 -1
  24. package/dist/hooks.d.ts +119 -65
  25. package/dist/hooks.js +330 -285
  26. package/dist/hooks.js.map +1 -1
  27. package/dist/install-hooks.d.ts +76 -24
  28. package/dist/install-hooks.js +301 -125
  29. package/dist/install-hooks.js.map +1 -1
  30. package/dist/interactive.d.ts +32 -1
  31. package/dist/interactive.js +165 -51
  32. package/dist/interactive.js.map +1 -1
  33. package/dist/main.js +14 -21
  34. package/dist/main.js.map +1 -1
  35. package/dist/native-skills.d.ts +1 -1
  36. package/dist/native-skills.js +23 -58
  37. package/dist/native-skills.js.map +1 -1
  38. package/dist/pack-feedback-slice.d.ts +35 -0
  39. package/dist/pack-feedback-slice.js +126 -0
  40. package/dist/pack-feedback-slice.js.map +1 -0
  41. package/dist/readiness.d.ts +20 -0
  42. package/dist/readiness.js +24 -0
  43. package/dist/readiness.js.map +1 -1
  44. package/dist/release.d.ts +31 -0
  45. package/dist/release.js +52 -0
  46. package/dist/release.js.map +1 -0
  47. package/dist/ui/theme.d.ts +1 -1
  48. package/package.json +11 -10
  49. package/src/commands.test.ts +386 -36
  50. package/src/commands.ts +473 -182
  51. package/src/config-schema.ts +2 -17
  52. package/src/config.test.ts +29 -4
  53. package/src/config.ts +67 -11
  54. package/src/harnesses.ts +7 -0
  55. package/src/hook-adapter.test.ts +43 -1
  56. package/src/hook-adapter.ts +83 -11
  57. package/src/hooks.test.ts +4 -5
  58. package/src/install-hooks.test.ts +154 -2
  59. package/src/install-hooks.ts +231 -44
  60. package/src/interactive.test.ts +338 -0
  61. package/src/interactive.ts +221 -49
  62. package/src/main.ts +14 -20
  63. package/src/native-skills.test.ts +75 -0
  64. package/src/native-skills.ts +31 -75
  65. package/src/pack-feedback-slice.test.ts +212 -0
  66. package/src/pack-feedback-slice.ts +187 -0
  67. package/src/readiness.test.ts +25 -0
  68. package/src/readiness.ts +38 -0
  69. package/src/release.ts +51 -0
  70. package/src/skill.test.ts +43 -0
  71. package/src/ui/config-view.test.ts +5 -4
  72. package/dist/idle.d.ts +0 -16
  73. package/dist/idle.js +0 -44
  74. package/dist/idle.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { type ConfigKey } from './config.js';
2
2
  export type ConfigKind = 'string' | 'url' | 'integer' | 'boolean' | 'enum' | 'list';
3
3
  /**
4
- * Which surface a key belongs to. Grouping is the difference between fourteen
5
- * flat keys and four short lists a reader can hold in their head.
4
+ * Which surface a key belongs to. Grouping is the difference between a flat
5
+ * list of keys and a few short ones a reader can hold in their head.
6
6
  */
7
- export type ConfigGroup = 'questions' | 'delivery' | 'project' | 'diagnostics' | 'connection';
7
+ export type ConfigGroup = 'questions' | 'delivery' | 'project' | 'diagnostics';
8
8
  export declare const CONFIG_GROUPS: {
9
9
  id: ConfigGroup;
10
10
  title: string;
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * What every configuration key means, in the reader's words.
3
3
  *
4
- * `config.ts` already documented all fourteen keys carefully — but in TypeScript
4
+ * `config.ts` already documented every key carefully — but in TypeScript
5
5
  * comments, which is the one audience that never needed them. Someone running
6
- * `notifai config show` saw `require_idle = true` and had no way to learn what
7
- * it did short of reading the source, so this module is that knowledge moved to
8
- * where it can be printed.
6
+ * `notifai config show` saw `ask_grace_seconds = 0` and had no way to learn
7
+ * what it did short of reading the source, so this module is that knowledge
8
+ * moved to where it can be printed.
9
9
  *
10
10
  * It is the single source for `config show`, `config set`'s errors, `config
11
11
  * explain`, the help footer, and the interactive settings screen. One
@@ -13,16 +13,16 @@
13
13
  *
14
14
  * `summary` is the one-line form that fits beside a value in a list.
15
15
  * `detail` is the paragraph shown once the reader has asked for this key
16
- * specifically — progressive disclosure, so a list of fourteen settings stays
17
- * a list and not an essay.
16
+ * specifically — progressive disclosure, so the list of settings stays a list
17
+ * and not an essay.
18
18
  */
19
19
  import { CLI_SOUNDS, INTERRUPTION_LEVELS } from '@raidiant/notifai-protocol';
20
20
  import { LOG_LEVELS, configBounds } from './config.js';
21
21
  export const CONFIG_GROUPS = [
22
22
  {
23
23
  id: 'questions',
24
- title: 'Questions & presence',
25
- blurb: 'When a question an agent registered is allowed to leave this terminal and reach your devices.',
24
+ title: 'Questions',
25
+ blurb: 'Whether a question an agent registered may leave this terminal and reach your devices, and how soon.',
26
26
  },
27
27
  {
28
28
  id: 'delivery',
@@ -39,11 +39,6 @@ export const CONFIG_GROUPS = [
39
39
  title: 'Local logs',
40
40
  blurb: 'What this machine records about its own activity, so an agent can find out afterwards what happened.',
41
41
  },
42
- {
43
- id: 'connection',
44
- title: 'Connection',
45
- blurb: 'Which Notifai service this machine talks to. Most people never change this.',
46
- },
47
42
  ];
48
43
  const INFO = {
49
44
  ask_notifications: {
@@ -54,41 +49,15 @@ const INFO = {
54
49
  detail: 'The master switch for question routing. When this is off, a question an agent registers with `notifai ask` stays in the terminal and never leaves this machine, whatever the presence settings say. Turn it off to stop being reached for a while without uninstalling the harness hooks.',
55
50
  example: 'true',
56
51
  },
57
- require_idle: {
58
- label: 'Only when I have stepped away',
59
- group: 'questions',
60
- kind: 'boolean',
61
- summary: 'Whether sitting at this keyboard holds a question back',
62
- detail: 'Off (the default) means notify me even while I am using this machine. `ask_grace_seconds` still runs, so the terminal is offered the question first; I just do not need to walk away before it may leave. Turn this on when local keyboard or mouse activity should keep questions in the terminal.\n\nThis is separate from `ask_notifications`, which switches routing off altogether: wanting to be reached only while away is different from not wanting to be reached.',
63
- example: 'false',
64
- },
65
- away_after_seconds: {
66
- label: 'Away after',
67
- group: 'questions',
68
- kind: 'integer',
69
- unit: 's',
70
- summary: 'Keyboard and mouse idle time before this machine counts as unattended',
71
- detail: 'How long the keyboard and mouse must be quiet before you count as away. Only consulted while `require_idle` is on.\n\nWhere the operating system exposes no idle signal, silence since your last prompt is used instead, which is the conservative reading.',
72
- example: '120',
73
- },
74
52
  ask_grace_seconds: {
75
53
  label: 'Terminal-first grace',
76
54
  group: 'questions',
77
55
  kind: 'integer',
78
56
  unit: 's',
79
57
  summary: 'Optional delay before a question may reach your devices',
80
- detail: 'Zero (the default) sends the question to your devices as soon as the agent turn ends. Set a positive duration to offer the terminal an exclusive answer window first; the timer is measured from the moment the agent asked.\n\nA timer and nothing more. It is honoured whether or not presence is consulted at all, because how long to wait and whether anyone is watching are separate questions, and answering one should not answer the other.',
58
+ detail: 'Zero (the default) sends the question to your devices as soon as the agent turn ends. Set a positive duration to offer the terminal an exclusive answer window first; the timer is measured from the moment the agent asked.\n\nA timer and nothing more. Whether you happen to be at this keyboard does not change it: waiting no longer holds your terminal, so there is nothing your being here would protect you from.',
81
59
  example: '0',
82
60
  },
83
- hook_reply_timeout_seconds: {
84
- label: 'Hook wait for an answer',
85
- group: 'questions',
86
- kind: 'integer',
87
- unit: 's',
88
- summary: 'How long the harness hook blocks waiting for your answer',
89
- detail: 'After a question has gone out, the harness continuation owner waits up to this long for your answer. The device reply window uses the same bound, so Notifai never accepts an answer after an agent with no dormant-session wake has already returned.\n\nThe ceiling exists because command-hook harnesses bound their Stop processes. Grace plus this value plus installer headroom stays inside that budget.',
90
- example: '480',
91
- },
92
61
  sound: {
93
62
  label: 'Sound',
94
63
  group: 'delivery',
@@ -206,15 +175,6 @@ const INFO = {
206
175
  advanced: true,
207
176
  example: '3',
208
177
  },
209
- base_url: {
210
- label: 'Service URL',
211
- group: 'connection',
212
- kind: 'url',
213
- summary: 'Which Notifai service this machine talks to',
214
- detail: 'Points the CLI at a Notifai service. The default is the hosted service, and signing in stores the URL the credential belongs to, so this rarely needs setting by hand.\n\nChanging it does not move your credential: a URL that does not match the one you paired against will not authenticate.',
215
- advanced: true,
216
- example: 'https://notifai.fly.dev',
217
- },
218
178
  };
219
179
  export function configInfo(key) {
220
180
  return { key, ...INFO[key] };
@@ -280,6 +240,8 @@ export function describeSource(source) {
280
240
  return { label: 'default', path: null };
281
241
  if (source === 'flag')
282
242
  return { label: 'this command', path: null };
243
+ if (source === 'env')
244
+ return { label: 'environment', path: null };
283
245
  const separator = source.indexOf(':');
284
246
  if (separator === -1)
285
247
  return { label: source, path: null };
@@ -1 +1 @@
1
- {"version":3,"file":"config-schema.js","sourceRoot":"","sources":["../src/config-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAA;AAUtE,MAAM,CAAC,MAAM,aAAa,GAAwD;IAChF;QACE,EAAE,EAAE,WAAW;QACf,KAAK,EAAE,sBAAsB;QAC7B,KAAK,EAAE,+FAA+F;KACvG;IACD;QACE,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE,mFAAmF;KAC3F;IACD;QACE,EAAE,EAAE,SAAS;QACb,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,iGAAiG;KACzG;IACD;QACE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AAI,KAAK,GAAG,KAAK,KAAK,CAAC;QAAE,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,CAAA;IACnD,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC;QAAE,OAAO,GAAG,KAAK,GAAG,IAAI,GAAG,CAAA;IACjD,IAAI,KAAK,GAAG,EAAE,KAAK,CAAC;QAAE,OAAO,GAAG,KAAK,GAAG,EAAE,GAAG,CAAA;IAC7C,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK,KAAK,GAAG,EAAE,GAAG,CAAA;AACpD,CAAC"}
package/dist/config.d.ts CHANGED
@@ -9,14 +9,13 @@ import type { CLI_SOUNDS, INTERRUPTION_LEVELS } from '@raidiant/notifai-protocol
9
9
  * than in the agent's context, because context is lost to compaction and a
10
10
  * preference that evaporates mid-session is worse than none.
11
11
  *
12
- * `project-local` is `.notifai/config.local.toml`, intended to be gitignored.
13
- * `.notifai/config.toml` is intended for committed, shared configuration, so it
14
- * must not be where a personal "route my questions to my devices" preference
15
- * lands. The CLI does not edit a repository's ignore rules or create commits.
12
+ * `project-local` is a personal file under the user's config directory, keyed
13
+ * by the project root so a checkout does not have to gitignore anything. Shared
14
+ * `.notifai/config.toml` stays in the tree for committed project identity.
16
15
  *
17
16
  * `config show --explain` surfaces the winning layer per key.
18
17
  */
19
- export type ConfigSource = 'flag' | `session:${string}` | `project-local:${string}` | `project:${string}` | `global:${string}` | 'default';
18
+ export type ConfigSource = 'flag' | 'env' | `session:${string}` | `project-local:${string}` | `project:${string}` | `global:${string}` | 'default';
20
19
  export interface ResolvedValue<T> {
21
20
  value: T;
22
21
  source: ConfigSource;
@@ -42,49 +41,16 @@ export interface CliConfig {
42
41
  project: ResolvedValue<string | null>;
43
42
  /** Free-text notification criteria agents consult before sending. */
44
43
  notify_criteria: ResolvedValue<string | null>;
45
- /** Route a registered agent question to companion devices after the presence gate. */
44
+ /** Whether a registered agent question may reach companion devices at all. */
46
45
  ask_notifications: ResolvedValue<boolean>;
47
- /**
48
- * Whether being at this machine suppresses a question. Sitting at the
49
- * keyboard is not the same as not wanting to be reached — needing to stop
50
- * using the machine in order to be notified is its own kind of interruption.
51
- *
52
- * On, the default, is the original behaviour: a question stays in the
53
- * terminal while the keyboard is in use, because the person is right there
54
- * and a push would be redundant. Off says notify me anyway — the grace window
55
- * still runs, so the question is still offered to the terminal first, it just
56
- * no longer needs the user to walk away before it may leave.
57
- *
58
- * This is deliberately separate from `ask_notifications`, which switches
59
- * escalation off altogether. Wanting to be reached while working is the
60
- * opposite of not wanting to be reached.
61
- */
62
- require_idle: ResolvedValue<boolean>;
63
- /**
64
- * Keyboard/mouse idle time after which this machine counts as unattended.
65
- * When the OS idle signal is unavailable, silence since the user's last prompt
66
- * is the conservative fallback. Below the threshold the hooks stay out of the
67
- * way entirely, because a blocking hook also blocks the terminal prompt the
68
- * present user would use.
69
- *
70
- * Only consulted while `require_idle` is on.
71
- */
72
- away_after_seconds: ResolvedValue<number>;
73
- /**
74
- * How long a hook blocks waiting for a companion-device answer before falling through
75
- * to the harness's own prompt. Runtime arbitration keeps the complete Stop
76
- * invocation inside its fixed 480s owner budget and 540s adapter ceiling.
77
- */
78
- hook_reply_timeout_seconds: ResolvedValue<number>;
79
46
  /**
80
47
  * Terminal-first grace window, measured from the moment the question was
81
48
  * sent: the agent asks in the terminal and starts a timer, and only once it
82
49
  * elapses does the question reach companion devices.
83
50
  *
84
- * A timer, and only a timer. It is configured independently of
85
- * `away_after_seconds` and honoured whether or not presence is consulted at
86
- * all — how long to wait and whether anyone is watching are separate
87
- * questions, and answering one should not answer the other.
51
+ * A timer, and only a timer. Whether the user happens to be at this keyboard
52
+ * decides nothing — the waiter no longer holds their terminal, so there is
53
+ * nothing for their presence to protect them from.
88
54
  */
89
55
  ask_grace_seconds: ResolvedValue<number>;
90
56
  /**
@@ -106,7 +72,7 @@ export interface CliConfig {
106
72
  /** Log files kept in total, the active one included. */
107
73
  log_max_files: ResolvedValue<number>;
108
74
  }
109
- export declare const CONFIG_KEYS: readonly ["base_url", "wait_seconds", "ttl_seconds", "collapse_key", "devices", "sound", "interruption_level", "project", "notify_criteria", "ask_notifications", "require_idle", "away_after_seconds", "hook_reply_timeout_seconds", "ask_grace_seconds", "log_level", "log_max_bytes", "log_max_files"];
75
+ export declare const CONFIG_KEYS: readonly ["wait_seconds", "ttl_seconds", "collapse_key", "devices", "sound", "interruption_level", "project", "notify_criteria", "ask_notifications", "ask_grace_seconds", "log_level", "log_max_bytes", "log_max_files"];
110
76
  export type ConfigKey = (typeof CONFIG_KEYS)[number];
111
77
  /** Keys whose TOML value must parse as a boolean; used by `config set`. */
112
78
  export declare const BOOLEAN_CONFIG_KEYS: readonly ConfigKey[];
@@ -120,6 +86,8 @@ export declare const NUMERIC_CONFIG_KEYS: readonly ConfigKey[];
120
86
  * is the same discipline the numeric bounds follow.
121
87
  */
122
88
  export declare const ENUM_CONFIG_VALUES: Partial<Record<ConfigKey, readonly string[]>>;
89
+ /** Compiled service origin. Not a user-facing setting; override with `--base-url` or `NOTIFAI_BASE_URL`. */
90
+ export declare const DEFAULT_BASE_URL = "https://notifai.fly.dev";
123
91
  /** The shipped value beneath every user-controlled configuration layer. */
124
92
  export declare function configDefaultValue(key: ConfigKey): unknown;
125
93
  export declare function globalConfigDir(env?: NodeJS.ProcessEnv): string;
@@ -148,8 +116,18 @@ export declare function sanitizeSessionId(sessionId: string): string;
148
116
  */
149
117
  export declare function projectSessionPointerPath(cwd: string, env?: NodeJS.ProcessEnv): string;
150
118
  export declare function findProjectConfigPath(startDir: string): string | null;
151
- /** Personal sibling of the shared project config; callers should keep it gitignored. */
152
- export declare function findProjectLocalConfigPath(startDir: string): string | null;
119
+ /**
120
+ * Stable identity for personal project preferences.
121
+ *
122
+ * Prefer the directory that owns the shared `.notifai/config.toml`, then the
123
+ * git checkout root, then cwd. Subdirectories of one project therefore share
124
+ * one personal file, and nothing is written inside the repository.
125
+ */
126
+ export declare function personalProjectIdentity(cwd: string): string;
127
+ /** Personal project layer: `$XDG_CONFIG_HOME/notifai/projects/<identity>.toml`. */
128
+ export declare function personalProjectConfigPath(cwd: string, env?: NodeJS.ProcessEnv): string;
129
+ /** Existing personal project file, or null when this checkout has none. */
130
+ export declare function findProjectLocalConfigPath(startDir: string, env?: NodeJS.ProcessEnv): string | null;
153
131
  export declare function configBounds(key: ConfigKey): {
154
132
  min: number;
155
133
  max: number;
package/dist/config.js CHANGED
@@ -3,7 +3,6 @@ import { existsSync, readFileSync, realpathSync } from 'node:fs';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { parse as parseToml } from 'smol-toml';
6
- import { HOOK_TIMING } from './harnesses.js';
7
6
  /**
8
7
  * How much the local log records. Defined here rather than in `logging.ts`
9
8
  * because it is a configuration vocabulary first — `logging.ts` reads config,
@@ -11,7 +10,6 @@ import { HOOK_TIMING } from './harnesses.js';
11
10
  */
12
11
  export const LOG_LEVELS = ['off', 'error', 'info', 'debug'];
13
12
  export const CONFIG_KEYS = [
14
- 'base_url',
15
13
  'wait_seconds',
16
14
  'ttl_seconds',
17
15
  'collapse_key',
@@ -21,25 +19,17 @@ export const CONFIG_KEYS = [
21
19
  'project',
22
20
  'notify_criteria',
23
21
  'ask_notifications',
24
- 'require_idle',
25
- 'away_after_seconds',
26
- 'hook_reply_timeout_seconds',
27
22
  'ask_grace_seconds',
28
23
  'log_level',
29
24
  'log_max_bytes',
30
25
  'log_max_files',
31
26
  ];
32
27
  /** Keys whose TOML value must parse as a boolean; used by `config set`. */
33
- export const BOOLEAN_CONFIG_KEYS = [
34
- 'ask_notifications',
35
- 'require_idle',
36
- ];
28
+ export const BOOLEAN_CONFIG_KEYS = ['ask_notifications'];
37
29
  /** Keys whose TOML value must parse as an integer within its configured bounds. */
38
30
  export const NUMERIC_CONFIG_KEYS = [
39
31
  'wait_seconds',
40
32
  'ttl_seconds',
41
- 'away_after_seconds',
42
- 'hook_reply_timeout_seconds',
43
33
  'ask_grace_seconds',
44
34
  'log_max_bytes',
45
35
  'log_max_files',
@@ -54,8 +44,9 @@ export const NUMERIC_CONFIG_KEYS = [
54
44
  export const ENUM_CONFIG_VALUES = {
55
45
  log_level: LOG_LEVELS,
56
46
  };
47
+ /** Compiled service origin. Not a user-facing setting; override with `--base-url` or `NOTIFAI_BASE_URL`. */
48
+ export const DEFAULT_BASE_URL = 'https://notifai.fly.dev';
57
49
  const DEFAULTS = {
58
- base_url: 'https://notifai.fly.dev',
59
50
  wait_seconds: 10,
60
51
  ttl_seconds: 86400,
61
52
  collapse_key: null,
@@ -67,14 +58,8 @@ const DEFAULTS = {
67
58
  // Installing the hooks is the opt-in; these exist to switch the behaviour
68
59
  // back off for a project or a session without uninstalling anything.
69
60
  ask_notifications: true,
70
- // Questions reach devices immediately by default. Both a terminal-first
71
- // grace and presence gating remain independent opt-in controls.
72
- require_idle: false,
73
- away_after_seconds: 120,
74
- // Runtime waits stay inside a 480s budget. Harnesses that require a declared
75
- // Stop limit use a preference-stable 540s; Codex uses its host-owned Stop
76
- // default. Neither definition changes when these preferences do.
77
- hook_reply_timeout_seconds: 480,
61
+ // Questions reach devices as soon as the turn ends. A terminal-first grace
62
+ // window is an opt-in delay on top of that.
78
63
  ask_grace_seconds: 0,
79
64
  // On by default: the log is the only account of what a headless hook did, and
80
65
  // a diagnostic nobody switched on before the thing went wrong is not one.
@@ -163,27 +148,53 @@ function findProjectFile(startDir, name) {
163
148
  export function findProjectConfigPath(startDir) {
164
149
  return findProjectFile(startDir, 'config.toml');
165
150
  }
166
- /** Personal sibling of the shared project config; callers should keep it gitignored. */
167
- export function findProjectLocalConfigPath(startDir) {
168
- return findProjectFile(startDir, 'config.local.toml');
151
+ /** Walk up from cwd looking for a `.git` file or directory (worktree or checkout). */
152
+ function findGitRoot(startDir) {
153
+ let dir = path.resolve(startDir);
154
+ for (;;) {
155
+ if (existsSync(path.join(dir, '.git')))
156
+ return canonicalDir(dir);
157
+ const parent = path.dirname(dir);
158
+ if (parent === dir)
159
+ return null;
160
+ dir = parent;
161
+ }
162
+ }
163
+ /**
164
+ * Stable identity for personal project preferences.
165
+ *
166
+ * Prefer the directory that owns the shared `.notifai/config.toml`, then the
167
+ * git checkout root, then cwd. Subdirectories of one project therefore share
168
+ * one personal file, and nothing is written inside the repository.
169
+ */
170
+ export function personalProjectIdentity(cwd) {
171
+ const projectConfig = findProjectConfigPath(cwd);
172
+ const root = projectConfig !== null ? path.dirname(path.dirname(projectConfig)) : (findGitRoot(cwd) ?? cwd);
173
+ return createHash('sha256').update(canonicalDir(root)).digest('hex').slice(0, 32);
174
+ }
175
+ /** Personal project layer: `$XDG_CONFIG_HOME/notifai/projects/<identity>.toml`. */
176
+ export function personalProjectConfigPath(cwd, env = process.env) {
177
+ return path.join(globalConfigDir(env), 'projects', `${personalProjectIdentity(cwd)}.toml`);
178
+ }
179
+ /** Existing personal project file, or null when this checkout has none. */
180
+ export function findProjectLocalConfigPath(startDir, env = process.env) {
181
+ const file = personalProjectConfigPath(startDir, env);
182
+ return existsSync(file) ? file : null;
169
183
  }
170
184
  /**
171
185
  * Ranges every layer is clamped to. Config is readable from a repository, so an
172
- * out-of-range value is attacker input, not a typo: `away_after_seconds = -1`
173
- * would make a user who just typed count as absent, and an oversized reply
174
- * timeout would exhaust the hook process budget and kill it after the user has
175
- * already answered.
186
+ * out-of-range value is attacker input, not a typo: an unbounded grace window
187
+ * would consume the waiter's whole ceiling and silently leave no time at all in
188
+ * which the user's answer could still be accepted.
176
189
  */
177
190
  const NUMERIC_BOUNDS = {
178
191
  wait_seconds: { min: 0, max: 300 },
179
192
  ttl_seconds: { min: 0, max: 7 * 24 * 3600 },
180
- away_after_seconds: { min: 5, max: 24 * 3600 },
181
- // The runtime clamps grace + reply work below the host process ceiling; this
182
- // maximum is never copied into the installed definition.
183
- // The wire protocol's minimum reply window is 60s; matching it prevents the
184
- // server from accepting an answer after a shorter local wait has returned.
185
- hook_reply_timeout_seconds: { min: 60, max: 540 },
186
- ask_grace_seconds: { min: 0, max: HOOK_TIMING.maxGraceSeconds },
193
+ // A plain number, no longer derived from a hook budget's leftovers. Six
194
+ // minutes leaves two clear minutes of the waiter's 480s ceiling, so the
195
+ // longest window a user can choose still leaves an answer window the server
196
+ // will accept — with room to spare for a timer that wakes late.
197
+ ask_grace_seconds: { min: 0, max: 360 },
187
198
  // The floor keeps rotation from thrashing (a file smaller than a handful of
188
199
  // records would rotate on nearly every write); the ceiling is the point past
189
200
  // which "local diagnostics" has become "a database on your disk".
@@ -217,6 +228,20 @@ function readTomlFile(filePath) {
217
228
  throw new Error(`Could not parse ${filePath}: ${String(err)}`);
218
229
  }
219
230
  }
231
+ /**
232
+ * Service origin is not a user setting. Flag and env are developer/self-host
233
+ * overrides; signed-in traffic still pins to the credential origin elsewhere.
234
+ */
235
+ function resolveServiceUrl(flags, env) {
236
+ if (typeof flags.base_url === 'string' && flags.base_url !== '') {
237
+ return { value: flags.base_url, source: 'flag' };
238
+ }
239
+ const fromEnv = env['NOTIFAI_BASE_URL'];
240
+ if (typeof fromEnv === 'string' && fromEnv !== '') {
241
+ return { value: fromEnv, source: 'env' };
242
+ }
243
+ return { value: DEFAULT_BASE_URL, source: 'default' };
244
+ }
220
245
  export function loadConfig(options) {
221
246
  const env = options.env ?? process.env;
222
247
  const flags = options.flags ?? {};
@@ -225,7 +250,7 @@ export function loadConfig(options) {
225
250
  const cwd = options.cwd ?? process.cwd();
226
251
  const projectPath = findProjectConfigPath(cwd);
227
252
  const projectRaw = projectPath ? readTomlFile(projectPath) : {};
228
- const projectLocalPath = findProjectLocalConfigPath(cwd);
253
+ const projectLocalPath = findProjectLocalConfigPath(cwd, env);
229
254
  const projectLocalRaw = projectLocalPath ? readTomlFile(projectLocalPath) : {};
230
255
  const sessionId = options.sessionId ?? env['NOTIFAI_SESSION'];
231
256
  const sessionPath = sessionId ? sessionConfigPath(sessionId, env) : null;
@@ -249,7 +274,7 @@ export function loadConfig(options) {
249
274
  return { value: DEFAULTS[key], source: 'default' };
250
275
  }
251
276
  return {
252
- base_url: resolve('base_url'),
277
+ base_url: resolveServiceUrl(flags, env),
253
278
  wait_seconds: resolve('wait_seconds'),
254
279
  ttl_seconds: resolve('ttl_seconds'),
255
280
  collapse_key: resolve('collapse_key'),
@@ -259,9 +284,6 @@ export function loadConfig(options) {
259
284
  project: resolve('project'),
260
285
  notify_criteria: resolve('notify_criteria'),
261
286
  ask_notifications: resolve('ask_notifications'),
262
- require_idle: resolve('require_idle'),
263
- away_after_seconds: resolve('away_after_seconds'),
264
- hook_reply_timeout_seconds: resolve('hook_reply_timeout_seconds'),
265
287
  ask_grace_seconds: resolve('ask_grace_seconds'),
266
288
  log_level: resolve('log_level'),
267
289
  log_max_bytes: resolve('log_max_bytes'),
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAChE,OAAO,EAAE,MAAM,SAAS,CAAA;AACxB,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAoC5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAU,CAAA;AAgFpE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,UAAU;IACV,cAAc;IACd,aAAa;IACb,cAAc;IACd,SAAS;IACT,OAAO;IACP,oBAAoB;IACpB,SAAS;IACT,iBAAiB;IACjB,mBAAmB;IACnB,cAAc;IACd,oBAAoB;IACpB,4BAA4B;IAC5B,mBAAmB;IACnB,WAAW;IACX,eAAe;IACf,eAAe;CACP,CAAA;AAGV,2EAA2E;AAC3E,MAAM,CAAC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AAC,GAAG,CAAC,EAAE,UAAU,UAAU,EAAE,CAAC;SACzC,CAAA;QACD,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YACnC,IAAI,GAAG,KAAK,SAAS;gBAAE,SAAQ;YAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAChC,IAAI,OAAO,KAAK,SAAS;gBAAE,SAAQ;YACnC,OAAO,EAAE,KAAK,EAAE,OAAgB,EAAE,MAAM,EAAE,CAAA;QAC5C,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;IAC7D,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC;QACvC,YAAY,EAAE,OAAO,CAAC,cAAc,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC,aAAa,CAAC;QACnC,YAAY,EAAE,OAAO,CAAC,cAAc,CAAC;QACrC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;QAC3B,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC;QACvB,kBAAkB,EAAE,OAAO,CAAC,oBAAoB,CAAC;QACjD,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC;QAC3B,eAAe,EAAE,OAAO,CAAC,iBAAiB,CAAC;QAC3C,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,CAAC;QAC/C,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC;QAC/B,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC;QACvC,aAAa,EAAE,OAAO,CAAC,eAAe,CAAC;KACxC,CAAA;AACH,CAAC"}
@@ -1,23 +1,14 @@
1
1
  /** Every harness Notifai ships. This is the sole source of the harness union. */
2
2
  export declare const HARNESSES: readonly ["claude-code", "codex", "cursor", "opencode"];
3
3
  export type Harness = (typeof HARNESSES)[number];
4
- /** One canonical wall-clock budget shared by config, hooks, and installers. */
5
- export declare const HOOK_TIMING: Readonly<{
6
- totalSeconds: 480;
7
- finalizationReserveSeconds: 45;
8
- submissionReserveSeconds: 40;
9
- minimumReplySeconds: 60;
10
- schedulingSlackSeconds: 1;
11
- stdoutReserveSeconds: 5;
12
- hostHeadroomSeconds: 60;
13
- maxGraceSeconds: 334;
14
- }>;
4
+ export declare const HARNESS_LABELS: Record<Harness, string>;
5
+ export type DeliveryRoute = 'hook-continuation' | 'inbox-socket' | 'owned-control-plane' | 'cold-resume' | 'hold-for-next-turn' | 'unsupported';
15
6
  export type StopContinuation = 'decision-block' | 'followup-message' | 'unsupported';
16
7
  export interface HarnessCapability {
17
8
  /** How an answer is admitted to another turn in the already-open session. */
18
9
  stopContinuation: StopContinuation;
19
- /** Whether delivery remains native after the turn-end event has returned. */
20
- dormantWake: 'unsupported' | 'native-session-prompt';
10
+ /** Available answer-delivery routes, best current route first. */
11
+ deliveryRoutes: readonly DeliveryRoute[];
21
12
  /** Concise, honest readiness text for doctor and installation guidance. */
22
13
  deliveryContract: string;
23
14
  }
package/dist/harnesses.js CHANGED
@@ -1,16 +1,11 @@
1
1
  /** Every harness Notifai ships. This is the sole source of the harness union. */
2
2
  export const HARNESSES = ['claude-code', 'codex', 'cursor', 'opencode'];
3
- /** One canonical wall-clock budget shared by config, hooks, and installers. */
4
- export const HOOK_TIMING = Object.freeze({
5
- totalSeconds: 480,
6
- finalizationReserveSeconds: 45,
7
- submissionReserveSeconds: 40,
8
- minimumReplySeconds: 60,
9
- schedulingSlackSeconds: 1,
10
- stdoutReserveSeconds: 5,
11
- hostHeadroomSeconds: 60,
12
- maxGraceSeconds: 334,
13
- });
3
+ export const HARNESS_LABELS = {
4
+ 'claude-code': 'Claude Code',
5
+ codex: 'Codex',
6
+ cursor: 'Cursor',
7
+ opencode: 'OpenCode',
8
+ };
14
9
  /**
15
10
  * Exhaustive runtime contract. Adding a harness without deciding every
16
11
  * continuation joint is a type error, not a silently degraded notification.
@@ -18,22 +13,22 @@ export const HOOK_TIMING = Object.freeze({
18
13
  export const HARNESS_CAPABILITIES = {
19
14
  'claude-code': {
20
15
  stopContinuation: 'decision-block',
21
- dormantWake: 'unsupported',
22
- deliveryContract: 'live Stop continuation; no automatic wake after its bounded wait returns',
16
+ deliveryRoutes: ['hook-continuation', 'inbox-socket', 'cold-resume', 'hold-for-next-turn'],
17
+ deliveryContract: 'the Stop hook returns at once and waits out of band, then posts the answer into this same session over its own inbox socket; a session that has stopped is resumed only once a liveness probe proves it stopped',
23
18
  },
24
19
  codex: {
25
20
  stopContinuation: 'decision-block',
26
- dormantWake: 'unsupported',
27
- deliveryContract: 'live Stop continuation; no automatic wake after its bounded wait returns',
21
+ deliveryRoutes: ['hook-continuation', 'cold-resume', 'hold-for-next-turn'],
22
+ deliveryContract: 'live Stop continuation while the turn is held; once it returns, a stopped thread is resumed behind its writer lock and anything else waits for the next turn',
28
23
  },
29
24
  cursor: {
30
25
  stopContinuation: 'unsupported',
31
- dormantWake: 'unsupported',
26
+ deliveryRoutes: ['unsupported'],
32
27
  deliveryContract: 'the hook can return a live follow-up, but the invoking shell exposes no exact conversation id; asynchronous ask is unsupported',
33
28
  },
34
29
  opencode: {
35
30
  stopContinuation: 'unsupported',
36
- dormantWake: 'unsupported',
31
+ deliveryRoutes: ['unsupported'],
37
32
  deliveryContract: 'no proven answer continuation after session.idle; use a blocking reply command',
38
33
  },
39
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"harnesses.js","sourceRoot":"","sources":["../src/harnesses.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAA;AAIhF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IACvC,YAAY,EAAE,GAAG;IAC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,KAAK,EAAE;QACL,gBAAgB,EAAE,gBAAgB;QAClC,cAAc,EAAE,CAAC,mBAAmB,EAAE,aAAa,EAAE,oBAAoB,CAAC;QAC1E,gBAAgB,EACd,8JAA8J;KACjK;IACD,MAAM,EAAE;QACN,gBAAgB,EAAE,aAAa;QAC/B,cAAc,EAAE,CAAC,aAAa,CAAC;QAC/B,gBAAgB,EACd,gIAAgI;KACnI;IACD,QAAQ,EAAE;QACR,gBAAgB,EAAE,aAAa;QAC/B,cAAc,EAAE,CAAC,aAAa,CAAC;QAC/B,gBAAgB,EACd,gFAAgF;KACnF;CACF,CAAA"}
@@ -1,7 +1,16 @@
1
- export interface HookAdapterTarget {
1
+ export interface HookAdapterFileTarget {
2
+ kind?: 'file';
2
3
  execPath: string;
3
4
  scriptPath: string;
4
5
  }
6
+ export interface HookAdapterNpxTarget {
7
+ kind: 'npx';
8
+ execPath: string;
9
+ npmCli: string;
10
+ spec: string;
11
+ }
12
+ export type HookAdapterTarget = HookAdapterFileTarget | HookAdapterNpxTarget;
13
+ export declare function isNpxAdapterTarget(target: HookAdapterTarget): target is HookAdapterNpxTarget;
5
14
  export interface HookAdapterInspection {
6
15
  path: string;
7
16
  target: HookAdapterTarget | null;