@raidiant/notifai 3.0.1 → 4.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.
package/src/skill.test.ts CHANGED
@@ -13,11 +13,13 @@ describe('Notifai agent skill', () => {
13
13
  expect(skill.indexOf('## When to notify')).toBeLessThan(skill.indexOf('## Compose and send'))
14
14
  })
15
15
 
16
- it('teaches kind profiles and a correctly classified completion', () => {
16
+ it('separates semantic kind from native-banner attention', () => {
17
17
  expect(skill).toContain('--kind done')
18
- expect(skill).toContain('| `update` (default) | `none` | `passive` |')
19
- expect(skill).toContain('| `done` | `done` | `passive` |')
20
- expect(skill).toContain('| question (`--reply`) | `attention` | `active` |')
18
+ expect(skill).toMatch(/Kind never chooses a native-banner sound\s+or\s+interruption level/)
19
+ expect(skill).toContain('lets the destination use its normal behavior')
20
+ expect(skill).not.toContain('Kind profiles')
21
+ expect(skill).not.toMatch(/\| `failed` \| `alert`/)
22
+ expect(skill).not.toMatch(/\| `blocked` \| `attention`/)
21
23
  })
22
24
 
23
25
  it('makes the agent the setup wizard', () => {
@@ -36,8 +38,25 @@ describe('Notifai agent skill', () => {
36
38
  expect(harnessReference).not.toContain('do not install them without being asked')
37
39
  })
38
40
 
41
+ it('teaches one Markdown body, ordered media, and substance-only titles', () => {
42
+ for (const required of [
43
+ 'one canonical Markdown body',
44
+ '--body-file <path|->',
45
+ 'media:1',
46
+ 'maximum 8',
47
+ 'Never repeat the type or Project in the title',
48
+ 'All 42 tests passed',
49
+ ]) {
50
+ expect(skill).toContain(required)
51
+ }
52
+ expect(skill).not.toContain('--detail')
53
+ expect(skill).not.toContain('Done ·')
54
+ expect(skill).not.toContain('Failed ·')
55
+ expect(skill).not.toContain('Question ·')
56
+ })
57
+
39
58
  it('treats --sound and --level as overrides, not completeness', () => {
40
- expect(skill).toMatch(/Never pass `--sound` or `--level` unless/)
59
+ expect(skill).toMatch(/Do not pass `--sound` or `--level` unless/)
41
60
  const examples = [...skill.matchAll(/```(?:bash)?\n([\s\S]*?)```/g)].map((match) => match[1])
42
61
  const sendExamples = examples.filter((example) => example.includes('notifai send'))
43
62
  expect(sendExamples.length).toBeGreaterThan(0)
@@ -47,18 +66,23 @@ describe('Notifai agent skill', () => {
47
66
  }
48
67
  })
49
68
 
50
- it('documents reply lifecycle, routing, session minting, and doctor exits', () => {
69
+ it('documents reply lifecycle, routing, inferred source context, and doctor exits', () => {
51
70
  for (const required of [
52
71
  '--reply-choice',
53
72
  'notifai close <request_id>',
54
73
  'notifai devices',
55
74
  '--device',
56
75
  '--all',
57
- "require('node:crypto').randomUUID()",
76
+ 'Project identity from the invocation directory',
77
+ '--session-id',
78
+ 'NOTIFAI_SESSION_ID',
79
+ 'Do not mint an id',
58
80
  'exit status is nonzero',
59
81
  ]) {
60
82
  expect(skill).toContain(required)
61
83
  }
84
+ expect(skill).not.toContain("require('node:crypto').randomUUID()")
85
+ expect(skill).not.toMatch(/`NOTIFAI_SESSION`/)
62
86
  })
63
87
 
64
88
  it('turns a registered question into a same-turn work-resumption commitment', () => {