@raidiant/notifai 9.2.0 → 9.2.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 +21 -0
- package/README.md +5 -3
- package/dist/commands-auth.js +3 -2
- package/dist/commands-auth.js.map +1 -1
- package/dist/commands-devices.js +5 -1
- package/dist/commands-devices.js.map +1 -1
- package/dist/commands-harness-context.d.ts +2 -2
- package/dist/commands-harness-context.js +1 -1
- package/dist/commands-hooks.d.ts +2 -0
- package/dist/commands-hooks.js +12 -6
- package/dist/commands-hooks.js.map +1 -1
- package/dist/commands-init.js +18 -13
- package/dist/commands-init.js.map +1 -1
- package/dist/commands-send-support.js +1 -1
- package/dist/commands-send-support.js.map +1 -1
- package/dist/commands-send.js +1 -1
- package/dist/config.d.ts +5 -5
- package/dist/config.js +2 -2
- package/dist/invocation-context.d.ts +1 -1
- package/dist/invocation-context.js +2 -2
- package/dist/invocation-context.js.map +1 -1
- package/dist/program.js +14 -14
- package/dist/program.js.map +1 -1
- package/dist/send.d.ts +2 -2
- package/package.json +2 -2
- package/src/commands-auth.ts +3 -2
- package/src/commands-devices.test.ts +15 -0
- package/src/commands-devices.ts +5 -1
- package/src/commands-harness-context.ts +2 -2
- package/src/commands-hooks.ts +15 -9
- package/src/commands-init.ts +24 -14
- package/src/commands-send-support.ts +1 -1
- package/src/commands-send.ts +1 -1
- package/src/commands.test.ts +89 -26
- package/src/config.ts +5 -5
- package/src/invocation-context.test.ts +1 -1
- package/src/invocation-context.ts +2 -2
- package/src/onboarding-docs.test.ts +25 -0
- package/src/program.ts +14 -14
- package/src/send.ts +2 -2
- package/src/skill.test.ts +12 -3
package/src/program.ts
CHANGED
|
@@ -216,7 +216,7 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
216
216
|
'Set up Notifai here, idempotently: sign-in, project id, hooks, device readiness, live receipt proof. ' +
|
|
217
217
|
'Interactive at a human terminal; never prompts otherwise (agents: pass flags)',
|
|
218
218
|
)
|
|
219
|
-
.option('--project-id <id>', '
|
|
219
|
+
.option('--project-id <id>', 'Project identifier slug (default: derived from the directory name)')
|
|
220
220
|
.option('--json', 'machine-readable final readiness; never prompts')
|
|
221
221
|
.option('--skills', 'install/update the agent skill from its pinned public release')
|
|
222
222
|
.option('--no-skills', 'suppress the optional agent-skill status line')
|
|
@@ -339,13 +339,13 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
339
339
|
)
|
|
340
340
|
.optionsGroup(SEND_GROUP.routing)
|
|
341
341
|
.option('--kind <kind>', 'what this is (required): update | done | failed | blocked (no User reply would resume it) — question is set by --reply')
|
|
342
|
-
.option('--project <id>', '
|
|
342
|
+
.option('--project <id>', 'Project identifier override (otherwise configured or inferred)')
|
|
343
343
|
.option('--device <id>', 'target a device id (repeatable)', (v: string, all: string[] = []) => [...all, v])
|
|
344
344
|
.option('--all', 'target all routable devices (overrides configured devices)')
|
|
345
|
-
.option('--session-id <id>', 'low-level automation override for an opaque exact
|
|
345
|
+
.option('--session-id <id>', 'low-level automation override for an opaque exact Agent Session (env: NOTIFAI_SESSION_ID)')
|
|
346
346
|
.option(
|
|
347
347
|
'--session-label <text>',
|
|
348
|
-
'human
|
|
348
|
+
'human Agent Session name; safe to repeat, with the first accepted name frozen (env: NOTIFAI_SESSION_LABEL)',
|
|
349
349
|
)
|
|
350
350
|
.optionsGroup(SEND_GROUP.presentation)
|
|
351
351
|
.option('--collapse-key <key>', 'replace earlier notifications with the same key')
|
|
@@ -421,7 +421,7 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
421
421
|
.helpGroup(GROUP.agent)
|
|
422
422
|
.summary('Retrieve replies to a question')
|
|
423
423
|
.description('Retrieve replies for a notification request')
|
|
424
|
-
.option('--pending', 'use the pushed question pending for this
|
|
424
|
+
.option('--pending', 'use the pushed question pending for this Project and Agent Session')
|
|
425
425
|
.option('--wait <seconds>', 'how long to wait for a reply', (v: string) => Number(v))
|
|
426
426
|
.option('--after <seq>', 'return replies after this sequence number', (v: string) => Number(v))
|
|
427
427
|
.option('--json', 'machine-readable output')
|
|
@@ -481,10 +481,10 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
481
481
|
'alt text paired with --image occurrences by position (repeatable)',
|
|
482
482
|
(v: string, all: string[] = []) => [...all, v],
|
|
483
483
|
)
|
|
484
|
-
.option('--project <id>', '
|
|
484
|
+
.option('--project <id>', 'Project identifier override (otherwise configured or inferred)')
|
|
485
485
|
.option(
|
|
486
486
|
'--session-label <text>',
|
|
487
|
-
'human
|
|
487
|
+
'human Agent Session name; safe to repeat, with the first accepted name frozen (env: NOTIFAI_SESSION_LABEL)',
|
|
488
488
|
)
|
|
489
489
|
.action(async (question: string | undefined, opts: {
|
|
490
490
|
choice?: string[]
|
|
@@ -551,9 +551,9 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
551
551
|
.helpGroup(GROUP.agent)
|
|
552
552
|
.summary('Retire a question so late answers are rejected')
|
|
553
553
|
.description(
|
|
554
|
-
'Retire a question so late answers are rejected rather than lost. Pass --pending to withdraw this
|
|
554
|
+
'Retire a question so late answers are rejected rather than lost. Pass --pending to withdraw this Agent Session\'s outstanding registrations, including ones the turn-end hook has not pushed yet.',
|
|
555
555
|
)
|
|
556
|
-
.option('--pending', 'retire this
|
|
556
|
+
.option('--pending', 'retire this Agent Session\'s outstanding questions, including ones not yet pushed')
|
|
557
557
|
.option('--json', 'machine-readable output')
|
|
558
558
|
.action(async (requestId: string | undefined, opts: { json?: boolean; pending?: boolean }) => {
|
|
559
559
|
exit(await runners.close(deps, requestId, opts))
|
|
@@ -615,9 +615,9 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
615
615
|
.option('--event <name>', 'only this event; repeatable', (v: string, all: string[] = []) => [...all, v])
|
|
616
616
|
.option('--run <id>', 'everything one command invocation did')
|
|
617
617
|
.option('--request <id>', 'everything about one notification request')
|
|
618
|
-
.option('--session <id>', 'only this
|
|
619
|
-
.option('--project <id>', 'only this
|
|
620
|
-
.option('--all-projects', 'do not scope to the
|
|
618
|
+
.option('--session <id>', 'only this Agent Session')
|
|
619
|
+
.option('--project <id>', 'only this Project')
|
|
620
|
+
.option('--all-projects', 'do not scope to the Project in this directory')
|
|
621
621
|
.option('--grep <text>', 'only records containing this text')
|
|
622
622
|
.option('--json', 'one JSON record per line on stdout')
|
|
623
623
|
.option('--path', 'print the log file paths instead of the records')
|
|
@@ -656,7 +656,7 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
656
656
|
)
|
|
657
657
|
.option('--project', 'write to the shared .notifai/config.toml instead')
|
|
658
658
|
.option('--local', 'write a personal project preference on this machine (not in the repo)')
|
|
659
|
-
.option('--session <id>', 'apply only to one
|
|
659
|
+
.option('--session <id>', 'apply only to one Agent Session')
|
|
660
660
|
.option('--yes', 'skip the confirmation gate')
|
|
661
661
|
.action(
|
|
662
662
|
async (
|
|
@@ -674,7 +674,7 @@ export function buildProgram(deps: CommandDeps, options: BuildProgramOptions = {
|
|
|
674
674
|
)
|
|
675
675
|
.option('--project', 'remove from the shared .notifai/config.toml instead')
|
|
676
676
|
.option('--local', 'remove a personal project preference stored on this machine')
|
|
677
|
-
.option('--session <id>', 'remove from one
|
|
677
|
+
.option('--session <id>', 'remove from one Agent Session')
|
|
678
678
|
.option('--yes', 'skip the confirmation gate')
|
|
679
679
|
.action(
|
|
680
680
|
async (
|
package/src/send.ts
CHANGED
|
@@ -34,9 +34,9 @@ export interface SendFlags {
|
|
|
34
34
|
/** What this notification is; absent means update. */
|
|
35
35
|
kind?: string
|
|
36
36
|
project?: string
|
|
37
|
-
/** Opaque exact
|
|
37
|
+
/** Opaque exact Agent Session override. */
|
|
38
38
|
sessionId?: string
|
|
39
|
-
/** Human-readable
|
|
39
|
+
/** Human-readable Agent Session label override. */
|
|
40
40
|
sessionLabel?: string
|
|
41
41
|
device?: string[]
|
|
42
42
|
all?: boolean
|
package/src/skill.test.ts
CHANGED
|
@@ -229,8 +229,8 @@ describe('Notifai agent skill', () => {
|
|
|
229
229
|
const send = section('## Send')
|
|
230
230
|
expect(send).toContain('--session-label')
|
|
231
231
|
expect(send).toMatch(/2-6 words/i)
|
|
232
|
-
expect(send).toMatch(/when the current
|
|
233
|
-
expect(send).toMatch(/without an exact
|
|
232
|
+
expect(send).toMatch(/when the current environment exposes its exact\s+identifier/i)
|
|
233
|
+
expect(send).toMatch(/without an exact Agent Session[\s\S]{0,160}usage\s+error/i)
|
|
234
234
|
expect(send).toMatch(/omit `--session-label`/i)
|
|
235
235
|
expect(send).toMatch(/name the\s+environment supplies wins/i)
|
|
236
236
|
expect(send).toMatch(/freezes one semantic name/i)
|
|
@@ -309,7 +309,14 @@ describe('Notifai agent skill', () => {
|
|
|
309
309
|
expect(setup).toMatch(/never tell the\s+user to run a command you could have run/i)
|
|
310
310
|
expect(setup).toMatch(/browser/i)
|
|
311
311
|
expect(setup).toMatch(/companion/i)
|
|
312
|
-
|
|
312
|
+
const decisions = setup.search(/both user decisions/i)
|
|
313
|
+
const init = setup.indexOf('notifai init --setup-scope')
|
|
314
|
+
expect(decisions).toBeGreaterThan(0)
|
|
315
|
+
expect(init).toBeGreaterThan(decisions)
|
|
316
|
+
expect(setup).toMatch(/setup scope[\s\S]*this project[\s\S]*every project here/i)
|
|
317
|
+
expect(setup).toMatch(/Question Routing[\s\S]*devices[\s\S]*terminal/i)
|
|
318
|
+
expect(setup).toContain('<--hooks|--no-hooks>')
|
|
319
|
+
expect(setup).not.toMatch(/```bash\s+notifai init --json/m)
|
|
313
320
|
expect(setup).toMatch(/do not follow a successful structured init\s+with doctor/i)
|
|
314
321
|
expect(setup).toContain('--setup-scope')
|
|
315
322
|
})
|
|
@@ -389,6 +396,8 @@ describe('Notifai agent skill', () => {
|
|
|
389
396
|
}
|
|
390
397
|
// The agent runs what a process can run; the human only does the human part.
|
|
391
398
|
expect(harnessReference).toMatch(/let init install and assess\s+the hooks/i)
|
|
399
|
+
expect(harnessReference).toContain('--setup-scope <project|global>')
|
|
400
|
+
expect(harnessReference).not.toContain('--setup-scope project')
|
|
392
401
|
expect(harnessReference).toMatch(/run `notifai login` yourself/i)
|
|
393
402
|
expect(harnessReference).toMatch(/only the user can approve/i)
|
|
394
403
|
})
|